!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).Str={})}(this,function(e){"use strict";function t(e,t,s,r){if("a"===s&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===s?r:"a"===s?r.call(e):r?r.value:t.get(e)}function s(e,t,s,r,n){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!n)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?n.call(e,s):n?n.value=s:t.set(e,s),s}var r,n,i;"function"==typeof SuppressedError&&SuppressedError,e.Mode=void 0,(i=e.Mode||(e.Mode={}))[i.MB_CASE_UPPER=0]="MB_CASE_UPPER",i[i.MB_CASE_LOWER=1]="MB_CASE_LOWER",i[i.MB_CASE_TITLE=2]="MB_CASE_TITLE",i[i.MB_CASE_FOLD=3]="MB_CASE_FOLD",i[i.MB_CASE_UPPER_SIMPLE=4]="MB_CASE_UPPER_SIMPLE",i[i.MB_CASE_LOWER_SIMPLE=5]="MB_CASE_LOWER_SIMPLE",i[i.MB_CASE_TITLE_SIMPLE=6]="MB_CASE_TITLE_SIMPLE",i[i.MB_CASE_FOLD_SIMPLE=7]="MB_CASE_FOLD_SIMPLE";class a{static of(e){return new o(e)}static after(e,t){return""===t?e:e.slice(e.indexOf(t)+t.length)}static afterLast(e,t){if(""===t)return e;const s=e.lastIndexOf(t);return-1===s?e:e.substring(s+t.length)}static ascii(e){return e.normalize("NFD").replace(/[\u0300-\u036f]/g,"")}static before(e,t){if(""===t)return e;const s=e.substring(0,e.indexOf(t));return""===s?e:s}static beforeLast(e,t){if(""===t)return e;const s=e.lastIndexOf(t);return-1===s?e:this.substr(e,0,s)}static between(e,t,s){return""===t||""===s?e:this.beforeLast(this.after(e,t),s)}static betweenFirst(e,t,s){return""===t||""===s?e:this.before(this.after(e,t),s)}static camel(e){return this.lcfirst(this.studly(e))}static charAt(e,t){return e.charAt(t)}static chopStart(e,t){let s=e;t=Array.isArray(t)?t:[t];for(const r of t)e.startsWith(r)&&(s=e.substring(r.length));return s}static chopEnd(e,t){let s=e;t=Array.isArray(t)?t:[t];for(const r of t)e.endsWith(r)&&(s=e.substring(0,e.length-r.length));return s}static contains(e,t,s=!1){s&&(e=e.toLowerCase()),t=Array.isArray(t)?t:[t];for(let r of t)if(s&&(r=r.toLowerCase()),""!==r&&e.includes(r))return!0;return!1}static containsAll(e,t,s=!1){for(const r of t)if(this.doesntContain(e,r,s))return!1;return!0}static doesntContain(e,t,s=!1){return!this.contains(e,t,s)}static convertCase(t,s=e.Mode.MB_CASE_FOLD){switch(s){case e.Mode.MB_CASE_UPPER:t=t.toLocaleUpperCase();break;case e.Mode.MB_CASE_LOWER:t=t.toLocaleLowerCase();break;case e.Mode.MB_CASE_TITLE:t=this.title(t);break;case e.Mode.MB_CASE_FOLD:t=t.toLocaleLowerCase();break;case e.Mode.MB_CASE_UPPER_SIMPLE:t=t.toUpperCase();break;case e.Mode.MB_CASE_LOWER_SIMPLE:t=t.toLowerCase();break;case e.Mode.MB_CASE_TITLE_SIMPLE:t=this.title(t);break;case e.Mode.MB_CASE_FOLD_SIMPLE:t=t.toLowerCase();break;default:throw new Error("Argument #2 (mode) must be one of the Mode.MB_CASE_* constants")}return t}static deduplicate(e,t=" "){return Array.isArray(t)?t.reduce((e,t)=>e.replace(new RegExp(`${t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}+`,"gu"),t),e):e.replace(new RegExp(`${c(t)}+`,"gu"),t)}static endsWith(e,t){return(t=Array.isArray(t)?t:[t]).some(t=>""!==t&&e.endsWith(t))}static doesntEndWith(e,t){return!this.endsWith(e,t)}static excerpt(e,t="",s={}){var r,n;const i=null!==(r=s.radius)&&void 0!==r?r:100,a=null!==(n=s.omission)&&void 0!==n?n:"...",o=e.match(new RegExp(`^(.*?)(${c(t)})(.*)$`,"iu"));if(null===o)return null;let l=o[1].trimStart(),u=o[3].trimEnd();return l=this.of(this.substr(l,Math.max(l.length-i,0),i)).ltrim().unless(e=>e.exactly(l),e=>e.prepend(a)).toString(),u=this.of(this.substr(u,0,i)).rtrim().unless(e=>e.exactly(u),e=>e.append(a)).toString(),this.of(l).append(o[2],u).toString()}static finish(e,t){return e.endsWith(t)?e:e+t}static wrap(e,t,s=null){return t+e+(null!=s?s:t)}static unwrap(e,t,s=null){return this.startsWith(e,t)&&(e=this.replaceFirst(t,"",e)),this.endsWith(e,null!=s?s:t)&&(e=this.replaceLast(null!=s?s:t,"",e)),e}static is(e,t,s=!1){let r=Array.isArray(e)?e:[e];for(let e of r){if(e===t)return!0;if(s&&e.toLowerCase()===t.toLowerCase())return!0;e=e.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&").replace(/\\\*/g,".*");if(new RegExp(`^${e}$`,s?"iu":"u").test(t))return!0}return!1}static isAscii(e){return!/[^ -~\t\r\n]/.test(e)}static isJson(e){try{JSON.parse(e)}catch(e){return!1}return!0}static isUrl(e,t=[]){const s=0===t.length?"https?|ftp|file|mailto|tel|data|irc|magnet":t.join("|");return new RegExp(`^(?:${s}):\\/\\/(?:[\\w-]+(?:\\.[\\w-]+)+|localhost|\\d{1,3}(?:\\.\\d{1,3}){3})(?::\\d+)?(?:\\S*)?$`,"i").test(e)}static isUuid(e){return new RegExp(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/).test(e)}static isUlid(e){var t;return"string"==typeof e&&(26===e.length&&(e.length===(null===(t=e.match(/[0123456789ABCDEFGHJKMNPQRSTVWXYZabcdefghjkmnpqrstvwxyz]/g))||void 0===t?void 0:t.length)&&Number.parseInt(e.charAt(0))<=7))}static kebab(e){return this.snake(e,"-")}static length(e){return e.length}static limit(e,t=100,s="...",r=!1){if(e.length<=t)return e;if(!r)return this.substr(e,0,t).trim()+s;e=e.replace(/[\n\r]+/," ");const n=this.substr(e,0,t).trim();return" "===this.substr(e,t,1)?`${n}${s}`:`${n.replace(/(.*)\s.*/,"$1")}${s}`}static lower(e){return e.toLowerCase()}static words(e,t=100,s="..."){var r,n;const i=null!==(n=null===(r=e.match(/\S+\s*/g))||void 0===r?void 0:r.splice(0,t))&&void 0!==n?n:[],a=i.join("");return 1===i.length||this.length(e)===this.length(a)?e:a.trim()+s}static mask(e,t,s,r=null){if(""===t)return e;let n=s,i=null!=r?r:e.length;n<0&&(n=e.length+n,i=n+(null!=r?r:0)),0===i&&(i=n);let a=e.substring(n,i);if(""===a)return e;let o=e.length,l=s;s<0&&(l=s<-o?0:o+s),n=e.substring(0,l);let u=a.length,c=e.substring(l+u);return n+t.substring(0,1).repeat(u)+c}static match(e,t){var s;const r=e.exec(t);return null===r?"":null!==(s=r[1])&&void 0!==s?s:r[0]}static isMatch(e,t){e=Array.isArray(e)?e:[e];for(const s of e)if(s.exec(t))return!0;return!1}static matchAll(e,t){const s=[...new Set([...e.toString().match(/[gimsuy]/g)||[],"g"])].join(""),r=new RegExp(e,s),n=[...t.matchAll(r)];return 0===n.length?[]:n.map(e=>String(1===e.length?e[0]:e[1]))}static numbers(e){return e.replace(/\D/g,"")}static padBoth(e,t,s=" "){const r=Math.max(0,t-e.length),n=Math.floor(r/2),i=Math.ceil(r/2);return s.repeat(n).substring(0,n)+e+s.repeat(i).substring(0,i)}static padLeft(e,t,s=" "){var r;const n=Math.max(0,t-(null!==(r=e.length)&&void 0!==r?r:0));return s.repeat(n).substring(0,n)+e}static padRight(e,t,s=" "){const r=Math.max(0,t-e.length);return e+s.repeat(r).substring(0,r)}static plural(e,t=2){if(void 0!==t&&1===t||""===e.trim())return e;const s={"^(.*)menu$":"$1menus","^tights$":"tights","^shorts$":"shorts","^glasses$":"glasses","^pants$":"pants","(alumn|bacill|cact|foc|fung|nucle|radi|stimul|syllab|termin|vir)us$":"$1i","(vir)us$":"$1i","([ti])um$":"$1a","(tax)on$":"$1a","(criteri)on$":"$1a","(matr)ix$":"$1ices","(vert|ind)ex$":"$1ices","(buffal|her|potat|tomat|volcan)o$":"$1oes","(h|bl)ouse$":"$1ouses",ouse$:"ouses","([^aeiouy]|qu)y$":"$1ies","([lr])f$":"$1ves","([^fo])fe$":"$1ves","(shea|loa|lea|thie)f$":"$1ves","(li|wi|kni)fe$":"$1ves","(analys|ax|cris|test|thes)is$":"$1es","(alias|status|bus)$":"$1es","(shoe|slave)$":"$1s","(corpse)$":"$1s","(drive|dive|hive|olive|tive)$":"$1s","([ftw]ax)$":"$1es","([m|l])ouse$":"$1ice","(x|ch|ss|sh)$":"$1es",o$:"oes","(quiz)$":"$1zes","^(ox)$":"$1en","(p)erson$":"$1eople","(m)an$":"$1en","(c)hild$":"$1hildren","(f)oot$":"$1eet","(m)ouse$":"$1ice","(t)ooth$":"$1eeth","(g)oose$":"$1eese","(n)ews$":"$1ews",eau$:"eaus","(^analy)sis$":"$1ses","((a)naly|(b)a|(d)iagno|(p)arenthe|(p)rogno|(s)ynop|(t)he)sis$":"$1$2ses","(m)ovie$":"$1ovies","(s)eries$":"$1eries","([^a])us$":"$1uses",us$:"uses","(s)tatus$":"$1tatuses","(c)ampus$":"$1ampuses",$:"s"},r={abuse:"abuses",alumna:"alumnae",alumnus:"alumni",analysis:"analyses",appendix:"appendices",atlas:"atlases",avalanche:"avalanches",axis:"axes",axe:"axes",bacillus:"bacilli",bacterium:"bacteria",basis:"bases",beau:"beaux",beef:"beefs",blouse:"blouses",brother:"brothers",brownie:"brownies",bureau:"bureaux",cache:"caches",cactus:"cacti",cafe:"cafes",calf:"calves",canvas:"canvases",cave:"caves",chateau:"chateaux",child:"children",cookie:"cookies",corpus:"corpuses",cow:"cows",crisis:"crises",criterion:"criteria",curriculum:"curricula",curve:"curves",datum:"data",deer:"deer",demo:"demos",diagnosis:"diagnoses",domino:"dominoes",echo:"echoes",elf:"elves",ellipsis:"ellipses",emphasis:"emphases",epoch:"epochs",fish:"fish",focus:"foci",foe:"foes",foot:"feet",formula:"formulae",fungus:"fungi",ganglion:"ganglions",gas:"gases",genie:"genies",genus:"genera",goose:"geese",graffito:"graffiti",grave:"graves",half:"halves",hippopotamus:"hippopotami",hoax:"hoaxes",hoof:"hoofs",human:"humans",iris:"irises",knife:"knives",larva:"larvae",leaf:"leaves",lens:"lenses",life:"lives",loaf:"loaves",man:"men",matrix:"matrices",means:"means",medium:"media",memorandum:"memoranda",money:"monies",mongoose:"mongooses",mouse:"mice",motto:"mottoes",move:"moves",mythos:"mythoi",nebula:"nebulae",neurosis:"neuroses",niche:"niches",niveau:"niveaux",nucleus:"nuclei",numen:"numina",oasis:"oases",occiput:"occiputs",octopus:"octopuses",offspring:"offspring",opus:"opuses",ox:"oxen",parenthesis:"parentheses",passerby:"passersby",penis:"penises",person:"people",phenomenon:"phenomena",plateau:"plateaux",radius:"radii","runner-up":"runners-up",safe:"safes",save:"saves",scarf:"scarves",self:"selves",series:"series",sex:"sexes",sheep:"sheep",shelf:"shelves",sieve:"sieves",soliloquy:"soliloquies","son-in-law":"sons-in-law",species:"species",stadium:"stadiums",stimulus:"stimuli",stratum:"strata",swine:"swine",syllabus:"syllabi",synthesis:"syntheses",testis:"testes",thesis:"theses",thief:"thieves",tooth:"teeth",tornado:"tornadoes",trilby:"trilbys",turf:"turfs",valve:"valves",volcano:"volcanoes",wave:"waves",wife:"wives",wolf:"wolves",zombie:"zombies"};if(new Set(["advice","aircraft","amoyese","art","audio","baggage","bison","borghese","bream","breeches","britches","buffalo","butter","cantus","carp","cattle","chassis","clippers","clothing","coal","cod","coitus","compensation","congoese","contretemps","coreopsis","corps","cotton","data","debris","deer","diabetes","djinn","education","eland","elk","emoji","equipment","evidence","faroese","feedback","fish","flounder","flour","foochowese","food","furniture","gallows","genevese","genoese","gilbertese","gold","headquarters","herpes","hijinks","homework","hovercraft","hottentotese","impatience","information","innings","jackanapes","jeans","jedi","kin","kiplingese","knowledge","kongoese","leather","love","lucchese","luggage","mackerel","Maltese","management","metadata","mews","money","moose","mumps","music","nankingese","news","nexus","niasese","nutrition","oil","offspring","patience","pekingese","piedmontese","pike","pincers","pistoiese","plankton","pliers","pokemon","police","polish","portuguese","proceedings","progress","rabies","rain","research","rhinoceros","rice","salmon","sand","sarawakese","scissors","sea[- ]bass","series","shavese","shears","sheep","shrimp","siemens","silk","sms","soap","social media","spacecraft","spam","species","staff","sugar","swine","talent","toothpaste","traffic","travel","trousers","trout","tuna","us","vermontese","vinegar","weather","wenchowese","wheat","whiting","wildebeest","wood","wool","yengeese","you"]).has(e.toLowerCase()))return h(e,e);for(const t in r){const s=new RegExp(`${t}$`,"i");if(s.test(e))return h(e.replace(s,r[t]),e)}for(const t in s){const r=new RegExp(t,"i");if(r.test(e))return h(e.replace(r,s[t]),e)}return h(e,e)}static pluralStudly(e,t=2){const s=e.split(/(.)(?=[A-Z])/),r=s.pop();return s.join("")+this.ucfirst(this.plural(r,t))}static pluralPascal(e,t=2){return this.pluralStudly(e,t)}static password(e=32,t=!0,s=!0,r=!0,n=!1){let i=[],a={};t&&(a.letters=["a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"]),s&&(a.numbers=["0","1","2","3","4","5","6","7","8","9"]),r&&(a.symbols=["~","!","#","$","%","^","&","*","(",")","-","_",".",",","<",">","?","/","\\","{","}","[","]","|",":",";"]),n&&(a.spaces=[" "]);for(const e in a){const t=a[e];i.push(t[Math.floor(Math.random()*t.length)])}const o=Object.values(a).flat();e-=i.length;for(let t=0;t<e;t++){const e=Math.floor(Math.random()*o.length);i.push(o[e])}return i.toSorted(()=>Math.random()-.5).reduce((e,t)=>t+e,"")}static position(e,t,s=0){const r=e.indexOf(t,Math.max(s,0));return-1!==r&&r}static random(e=16){if(null!==this.randomStringFactory)return this.randomStringFactory(e);let t=3*Math.ceil(e/3),s=crypto.getRandomValues(new Uint8Array(t)).join(""),r=btoa(s);for(const e of["/","+","="])r=r.replace(e,"");return r.substring(0,e)}static createRandomStringsUsing(e=null){this.randomStringFactory=e}static createRandomStringsUsingSequence(e,t=null){let s=0;null!=t||(t=e=>{const t=this.randomStringFactory;this.randomStringFactory=null;const r=this.random(e);return this.randomStringFactory=t,s++,r}),this.createRandomStringsUsing(r=>void 0!==e[s]?e[s++]:t(r))}static createRandomStringsNormally(){this.randomStringFactory=null}static repeat(e,t=1){return e.repeat(t)}static replaceArray(e,t,s){var r;const n=s.split(e);let i=n.shift();for(const s of n)i+=a.toStringOr(null!==(r=t.shift())&&void 0!==r?r:e,e)+s;return i}static replace(e,t,s,r=!0){var n,i;e=Array.isArray(e)?e:[e];for(const a of e){const o=e.indexOf(a),l=Array.isArray(s)?null!==(n=s[o])&&void 0!==n?n:"":s,u=Array.isArray(t)?null!==(i=t[o])&&void 0!==i?i:"":t,c=r?a:new RegExp(a,"gi"),h=l.replaceAll(c,u);Array.isArray(s)?s[o]=h:s=h}return s}static replaceFirst(e,t,s){if(""===e)return s;return-1!==s.indexOf(e)?s.replace(e,t):s}static replaceStart(e,t,s){return""===e?s:this.startsWith(s,e)?this.replaceFirst(e,t,s):s}static replaceLast(e,t,s){if(""===e)return s;let r=s.lastIndexOf(e);return-1!==r?s.substring(0,r)+t+s.substring(r+e.length):s}static replaceEnd(e,t,s){return""===e?s:this.endsWith(s,e)?this.replaceLast(e,t,s):s}static replaceMatches(e,t,s,r=-1){var n;const i=Array.isArray(e)?e:[e];for(const e of i){const a=i.indexOf(e),o=[...new Set([...e.toString().match(/[gimsuy]/g)||[],"g"])].join(""),l=new RegExp(e,o);let u=0;if("function"==typeof t)s=s.replace(l,(e,...s)=>r<0||u<r?(u++,t([e,s[0]])):e);else{const e=Array.isArray(t)?null!==(n=t[a])&&void 0!==n?n:"":t;s=s.replace(l,t=>r<0||u<r?(u++,e):t)}}return s}static remove(e,t,s=!0){return this.replace(e,"",t,null==s||s)}static reverse(e){return e.split("").reverse().join("")}static start(e,t){const s=c(t,"/");return t+e.replace(new RegExp(`^(?:${s})+`,"u"),"")}static upper(e){return e.toUpperCase()}static title(e){return e.split(/[^A-Za-z]/).map(e=>""===e?e:this.ucfirst(e[0]+e.substring(1).toLowerCase())).join(" ")}static headline(e){let t=e.split(" ");return t=t.length>1?t.map(e=>this.title(e)):this.ucsplit(t.join("_")).map(e=>this.title(e)),this.replace(["-","_"," "],"_",t.join("_")).split("_").filter(Boolean).join(" ").trim()}static apa(e){if(""===e)return e;const t=new Set(["and","as","but","for","if","nor","or","so","yet","a","an","the","at","by","in","of","off","on","per","to","up","via"]),s=new Set([".","!","?",":","—",","]);let r=e.split(/\s+/).filter(Boolean);r[0]=r[0].charAt(0).toUpperCase()+r[0].slice(1).toLowerCase();for(let e=0;e<r.length;e++){let n=r[e].toLowerCase();if(n.includes("-")){let s=n.split("-");s=s.map(e=>t.has(e)&&e.length<=3?e:this.ucfirst(e)),r[e]=s.join("-")}else t.has(n)&&n.length<=3&&0!==e&&!s.has(r[e-1].slice(-1))?r[e]=n:r[e]=this.ucfirst(n)}return r.join(" ")}static singular(e){const t={"^(.*)(menu)s$":"$1$2","^tights$":"tights","^shorts$":"shorts","^glasses$":"glasses","^pants$":"pants","(alumn|bacill|cact|foc|fung|nucle|radi|stimul|syllab|termin|viri?)i$":"$1us","(vir)i$":"$1us","([ti])a$":"$1um","([ti])a(?<!regatta)$":"$1um","(tax)a$":"$1on","(c)riteria$":"$1riterion","(matr)ices$":"$1ix","(vert|ind)ices$":"$1ex","(buffal|her|potat|tomat|volcan)oes$":"$1o","(h|bl)ouses$":"$1ouse",ouses$:"ouse","([^aeiouy]|qu)ies$":"$1y","([lr])ves$":"$1f","([^fo])ves$":"$1fe","(shea|loa|lea|thie)ves$":"$1f","(li|wi|kni)ves$":"$1fe","(analys|ax|cris|test|thes)es$":"$1is","(cris|ax|test)es$":"$1is","(alias|status|bus)es$":"$1","(shoe|slave)s$":"$1","(corpse)s$":"$1","(drive|dive|hive|olive|tive)s$":"$1","([ftw]ax)es":"$1","([m|l])ice$":"$1ouse","(o)es$":"$1","(x|ch|ss|sh)es$":"$1","(quiz)zes$":"$1","^(ox)en$":"$1","(p)eople$":"$1erson","(m)en$":"$1an","(c)hildren$":"$1hild","(f)eet$":"$1oot","(m)ice$":"$1ouse","(t)eeth$":"$1ooth","(g)eese$":"$1oose","(n)ews$":"$1ews",eaus$:"eau","(^analy)ses$":"$1sis","((a)naly|(b)a|(d)iagno|(p)arenthe|(p)rogno|(s)ynop|(t)he)ses$":"$1$2sis","(m)ovies$":"$1ovie","(s)eries$":"$1eries","([^a])uses$":"$1us","(us)es$":"$1","(s)tatus(es)?$":"$1tatus","(c)ampus$":"$1ampus",s$:""},s={abuses:"abuse",alumnae:"alumna",alumni:"alumnus",analyses:"analysis",appendices:"appendix",atlases:"atlas",avalanches:"avalanche",axes:"axis",bacilli:"bacillus",bacteria:"bacterium",bases:"basis",beaux:"beau",beefs:"beef",blouses:"blouse",brothers:"brother",brownies:"brownie",bureaux:"bureau",caches:"cache",cacti:"cactus",cafes:"cafe",calves:"calf",canvases:"canvas",caves:"cave",chateaux:"chateau",children:"child",cookies:"cookie",corpuses:"corpus",cows:"cow",crises:"crisis",criteria:"criterion",curricula:"curriculum",curves:"curve",deer:"deer",demos:"demo",diagnoses:"diagnosis",dominoes:"domino",echoes:"echo",elves:"elf",ellipses:"ellipsis",emphases:"emphasis",epochs:"epoch",fish:"fish",foci:"focus",foes:"foe",feet:"foot",formulae:"formula",fungi:"fungus",ganglions:"ganglion",gases:"gas",genies:"genie",genera:"genus",geese:"goose",graffiti:"graffito",graves:"grave",halves:"half",hippopotami:"hippopotamus",hoaxes:"hoax",hoofs:"hoof",humans:"human",irises:"iris",knives:"knife",larvae:"larva",leaves:"leaf",lenses:"lens",lives:"life",loaves:"loaf",men:"man",matrices:"matrix",means:"means",media:"medium",memoranda:"memorandum",monies:"money",mongooses:"mongoose",mice:"mouse",mottoes:"motto",moves:"move",mythoi:"mythos",nebulae:"nebula",neuroses:"neurosis",niches:"niche",niveaux:"niveau",nuclei:"nucleus",numina:"numen",oases:"oasis",occiputs:"occiput",octopuses:"octopus",offspring:"offspring",opuses:"opus",oxen:"ox",parentheses:"parenthesis",passersby:"passerby",penises:"penis",people:"person",phenomena:"phenomenon",plateaux:"plateau",radii:"radius","runners-up":"runner-up",safes:"safe",saves:"save",scarves:"scarf",selves:"self",series:"series",sexes:"sex",sheep:"sheep",shelves:"shelf",sieves:"sieve",soliloquies:"soliloquy","sons-in-law":"son-in-law",species:"species",stadiums:"stadium",stimuli:"stimulus",strata:"stratum",swine:"swine",syllabi:"syllabus",syntheses:"synthesis",testes:"testis",theses:"thesis",thieves:"thief",teeth:"tooth",tornadoes:"tornado",trilbys:"trilby",turfs:"turf",valves:"valve",volcanoes:"volcano",waves:"wave",wives:"wife",wolves:"wolf",zombies:"zombie"};if(new Set(["advice","aircraft","amoyese","art","audio","baggage","bison","borghese","bream","breeches","britches","buffalo","butter","cantus","carp","cattle","chassis","clippers","clothing","coal","cod","coitus","compensation","congoese","contretemps","coreopsis","corps","cotton","data","debris","deer","diabetes","djinn","education","eland","elk","emoji","equipment","evidence","faroese","feedback","fish","flounder","flour","foochowese","food","furniture","gallows","genevese","genoese","gilbertese","gold","headquarters","herpes","hijinks","homework","hovercraft","hottentotese","impatience","information","innings","jackanapes","jeans","jedi","kin","kiplingese","knowledge","kongoese","leather","love","lucchese","luggage","mackerel","Maltese","management","metadata","mews","money","moose","mumps","music","nankingese","news","nexus","niasese","nutrition","oil","offspring","patience","pekingese","piedmontese","pike","pincers","pistoiese","plankton","pliers","pokemon","police","polish","portuguese","proceedings","progress","rabies","rain","research","rhinoceros","rice","salmon","sand","sarawakese","scissors","sea[- ]bass","series","shavese","shears","sheep","shrimp","siemens","silk","sms","soap","social media","spacecraft","spam","species","staff","sugar","swine","talent","toothpaste","traffic","travel","trousers","trout","tuna","us","vermontese","vinegar","weather","wenchowese","wheat","whiting","wildebeest","wood","wool","yengeese","you"]).has(e.toLowerCase()))return h(e,e);for(const t in s){const r=new RegExp(`${t}$`,"i");if(r.test(e))return h(e.replace(r,s[t]),e)}for(const s in t){const r=new RegExp(s,"i");if(r.test(e))return h(e.replace(r,t[s]),e)}return h(e,e)}static slug(e,t="-",s={"@":"at"}){let r="-"===t?"_":"-";e=e.replace(`![${c(r)}]+!u`,t);for(let e in s)s[e]=t+s[e]+t;for(let t in s)e=e.replaceAll(t,s[t]);return(e=this.lower(e).replace(`![^${c(t)}pLpNs]+!u`,"")).replaceAll(/\s/g,t).replace(new RegExp("\\"+t+"+","g"),t)}static snake(e,t="_"){return e=function(e,t=" \t\r\n\f\v"){return e.split(t).map(e=>{var t;return(null===(t=e[0])||void 0===t?void 0:t.toUpperCase())+e.substring(1)}).join(" ")}(e).replace(new RegExp(/\s+/,"u"),""),e=this.lower(e.replace(new RegExp(/(.)(?=[A-Z])/,"ug"),`$1${t}`))}static trim(e,t=null){var s;if(null===t)return e.trim();if(""===t)return e;if(" "===t)return e.replaceAll(" ","");t=t.split("").join("|");const r=new RegExp(`${t}+`,"g");return null!==(s=e.replace(r,""))&&void 0!==s?s:e}static ltrim(e,t=null){if(null===t)return e.trimStart();if(""===t)return e;if(" "===t)return this.replaceStart(" ","",e);for(const s of t.split(""))e=this.replaceStart(s,"",e);return e}static rtrim(e,t=null){if(null===t)return e.trimEnd();if(""===t)return e;if(" "===t)return this.replaceEnd(" ","",e);for(const s of t.split(""))e=this.replaceEnd(s,"",e);return e}static squish(e){return e.replace(/\s\s+/g," ").trim()}static startsWith(e,t){t=Array.isArray(t)?t:[t];for(const s of t)if(""!==s&&e.startsWith(s))return!0;return!1}static doesntStartWith(e,t){return!this.startsWith(e,t)}static studly(e){return this.replace(["-","_"]," ",e).split(" ").map(e=>this.ucfirst(e)).join("")}static pascal(e){return this.studly(e)}static substr(e,t,s=null){return t<0&&(t=e.length+t)<0&&(t=0),null!==s&&s<=0?"":null===s||0===s?e.substring(t,e.length):e.substring(t,t+s)}static substrCount(e,t,s=0,r=null){return r?e.substring(s).substring(0,r).split(t).length-1:e.substring(s).split(t).length-1}static substrReplace(e,t,s=0,r=null){return null!==r?e.substring(0,s)+t+e.substring(s):e.substring(0,s)+t}static swap(e,t){for(const s in e)t=t.replace(s,e[s]);return t}static take(e,t){return t<0?this.substr(e,t):this.substr(e,0,t)}static toBase64(e){return btoa(e)}static fromBase64(e){return atob(e)}static lcfirst(e){return this.lower(this.substr(e,0,1))+this.substr(e,1,e.length)}static ucfirst(e){return this.upper(this.substr(e,0,1))+this.substr(e,1,e.length)}static ucwords(e,t=" \t\r\n\f\v"){const s=new RegExp(`(^|[${c(t,"/")}])(\\p{Ll})`,"gu");return e.replace(s,e=>e.toUpperCase())}static ucsplit(e){return e.split(new RegExp(/(?=\p{Lu})/u))}static wordCount(e){return e.split(/\s+/).length}static wordWrap(e,t=75,s="\n",r=!1){const n=r?s+"­":s,i=new RegExp(`.{1,${t}}`,"g"),a=e.replace(i,e=>e.trim()+n);return this.replaceLast(s,"",a)}static uuid(){if(null!==this.uuidFactory)return this.uuidFactory();let e=Number.parseInt((Math.random()*Number.MAX_SAFE_INTEGER+1).toString().substring(0,13));return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){let s=Math.trunc((e+16*Math.random())%16);return e=Math.floor(e/16),("x"===t?s:3&s|8).toString(16)})}static uuid7(e=null){if(null!==this.uuidFactory)return this.uuidFactory();const t=new Uint32Array(3);crypto.getRandomValues(t);const s=e?e.getTime():Date.now();if(s<0||s>0xffffffffffff)throw new RangeError("Timestamp must be a 48-bit positive integer");const[r,n,i]=t,a=4095&r,o=1073741823&n,l=i,u=new Uint8Array(16);u[0]=s/Math.pow(2,40),u[1]=s/Math.pow(2,32),u[2]=s/Math.pow(2,24),u[3]=s/Math.pow(2,16),u[4]=s/Math.pow(2,8),u[5]=s,u[6]=112|a>>>8,u[7]=a,u[8]=128|o>>>24,u[9]=o>>>16,u[10]=o>>>8,u[11]=o,u[12]=l>>>24,u[13]=l>>>16,u[14]=l>>>8,u[15]=l;const c="0123456789abcdef";let h="";for(let e=0;e<16;e++)h+=c.charAt(u[e]>>>4),h+=c.charAt(15&u[e]),3!==e&&5!==e&&7!==e&&9!==e||(h+="-");return h}static orderedUuid(){if(null!==this.uuidFactory)return this.uuidFactory();let e=Date.now();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){let s=Math.trunc((e+16*Math.random())%16);return e=Math.floor(e/16),("x"===t?s:3&s|8).toString(16)})}static createUuidsUsing(e=null){this.uuidFactory=e}static createUuidsUsingSequence(e,t=null){let s=0;null!=t||(t=()=>{const e=this.uuidFactory;this.uuidFactory=null;const t=this.uuid();return this.uuidFactory=e,s++,t}),this.createUuidsUsing(()=>void 0!==e[s]?e[s++]:t())}static freezeUuids(e=null){const t=this.uuid();if(this.createUuidsUsing(()=>t),null!==e)try{e(t)}finally{this.createUuidsNormally()}return t}static createUuidsNormally(){this.uuidFactory=null}static ulid(){if(null!==this.ulidFactory)return this.ulidFactory();const e="0123456789ABCDEFGHJKMNPQRSTVWXYZ";function t(){const e=new Uint8Array(1);return crypto.getRandomValues(e),e[0]/255}return function(){let t="",s=Date.now();for(let r=10;r>0;r--){const r=s%32;t=e.charAt(r)+t,s=(s-r)/32}return t}()+function(){let s="";for(let r=16;r>0;r--){let r=Math.floor(32*t());32===r&&(r=31),s+=e.charAt(r)}return s}()}static createUlidsUsing(e=null){this.ulidFactory=e}static createUlidsUsingSequence(e,t=null){let s=0;null!=t||(t=()=>{const e=this.ulidFactory;this.ulidFactory=null;const t=this.ulid();return this.ulidFactory=e,s++,t}),this.createUlidsUsing(()=>void 0!==e[s]?e[s++]:t())}static freezeUlids(e=null){const t=this.ulid();if(this.createUlidsUsing(()=>t),null!==e)try{e(t)}finally{this.createUlidsNormally()}return t}static createUlidsNormally(){this.ulidFactory=null}static toStringOr(e,t){return null==e||"object"==typeof e||"function"==typeof e?t:String(e)}}Object.defineProperty(a,"uuidFactory",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(a,"ulidFactory",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(a,"randomStringFactory",{enumerable:!0,configurable:!0,writable:!0,value:null});class o{constructor(e=""){r.set(this,void 0),s(this,r,e,"f")}after(e){return new o(a.after(t(this,r,"f"),e))}afterLast(e){return new o(a.afterLast(t(this,r,"f"),e))}append(...e){return new o(t(this,r,"f")+e.join(""))}newLine(e=1){return this.append("\n".repeat(e))}ascii(){return new o(a.ascii(t(this,r,"f")))}basename(e=""){let s=t(this,r,"f");return t(this,r,"f").split("/")[0]!==t(this,r,"f")&&(s=t(this,r,"f").split("/").pop()),t(this,r,"f").split("\\")[0]!==t(this,r,"f")&&(s=t(this,r,"f").split("\\").pop()),""!==e&&(s=s.replace(e,"")),new o(s)}charAt(e){return a.charAt(t(this,r,"f"),e)}chopStart(e){return new o(a.chopStart(t(this,r,"f"),e))}chopEnd(e){return new o(a.chopEnd(t(this,r,"f"),e))}classBasename(){return this.basename()}before(e){return new o(a.before(t(this,r,"f"),e))}beforeLast(e){return new o(a.beforeLast(t(this,r,"f"),e))}between(e,s){return new o(a.between(t(this,r,"f"),e,s))}betweenFirst(e,s){return new o(a.betweenFirst(t(this,r,"f"),e,s))}camel(){return new o(a.camel(t(this,r,"f")))}contains(e,s=!1){return a.contains(t(this,r,"f"),e,s)}containsAll(e,s=!1){return a.containsAll(t(this,r,"f"),e,s)}doesntContain(e,t=!1){return!this.contains(e,t)}convertCase(s=e.Mode.MB_CASE_FOLD){return new o(a.convertCase(t(this,r,"f"),s))}deduplicate(e=" "){return new o(a.deduplicate(t(this,r,"f"),e))}dirname(e=1){const s=t(this,r,"f").includes("/")?"/":"\\";let n=t(this,r,"f").split(s);if(n.length<=e)return t(this,r,"f").startsWith(s)?new o(s):t(this,r,"f").match(/^[a-zA-Z]:\\/)?new o(n[0]+"\\"):new o(".");let i=n.slice(0,-e).join(s);return i||(i=s),"\\"===s&&i.endsWith(":")&&(i+="\\"),new o(i)}endsWith(e){return a.endsWith(t(this,r,"f"),e)}doesntEndWith(e){return!this.endsWith(e)}exactly(e){return e instanceof o&&(e=e.toString()),t(this,r,"f")===e}excerpt(e="",s={}){return a.excerpt(t(this,r,"f"),e,s)}explode(e,s=0){let n=t(this,r,"f").split(e);const i=s-1>=n.length?n.length-1:s-1;return n=[...n.slice(0,i),n.splice(i).join(" ")],n}split(e,s=-1){var n,i;if("number"==typeof e)return[...null!==(n=t(this,r,"f").trim().match(new RegExp(`.{1,${e}}`,"g")))&&void 0!==n?n:[]];const a=[...new Set([...e.toString().match(/[gimsuy]/g)||[],"g"])].join(""),o=new RegExp(e,a);let l=t(this,r,"f").trim().split(o);if(s>0){const e=s-1>=l.length?l.length-1:s-1;l=[...l.slice(0,e),l.splice(e).join(" ")]}return null!==(i=l.map(e=>e.trim()))&&void 0!==i?i:[]}finish(e){return new o(a.finish(t(this,r,"f"),e))}is(e,s=!1){return a.is(e,t(this,r,"f"),s)}isAscii(){return a.isAscii(t(this,r,"f"))}isJson(){return a.isJson(t(this,r,"f"))}isUrl(){return a.isUrl(t(this,r,"f"))}isUuid(){return a.isUuid(t(this,r,"f"))}isUlid(){return a.isUlid(t(this,r,"f"))}isEmpty(){return""===t(this,r,"f").trim()}isNotEmpty(){return!this.isEmpty()}kebab(){return new o(a.kebab(t(this,r,"f")))}length(){return a.length(t(this,r,"f"))}limit(e=100,s="...",n=!1){return new o(a.limit(t(this,r,"f"),e,s,n))}lower(){return new o(a.lower(t(this,r,"f")))}mask(e,s,n=null){return new o(a.mask(t(this,r,"f"),e,s,n))}match(e){return new o(a.match(e,t(this,r,"f")))}isMatch(...e){return a.isMatch(e,t(this,r,"f"))}matchAll(e){return a.matchAll(e,t(this,r,"f"))}test(e){return this.match(e).isNotEmpty()}numbers(){return new o(a.numbers(t(this,r,"f")))}padBoth(e,s=" "){return new o(a.padBoth(t(this,r,"f"),e,s))}padLeft(e,s=" "){return new o(a.padLeft(t(this,r,"f"),e,s))}padRight(e,s=" "){return new o(a.padRight(t(this,r,"f"),e,s))}pipe(e){return"string"==typeof e&&"function"==typeof t(this,r,"f")[e]?new o(t(this,r,"f")[e]()):new o(e(this).toString())}plural(e=2){return new o(a.plural(t(this,r,"f"),e))}pluralStudly(e=2){return new o(a.pluralStudly(t(this,r,"f"),e))}pluralPascal(e=2){return new o(a.pluralPascal(t(this,r,"f"),e))}position(e,s=0){return a.position(t(this,r,"f"),e,s)}prepend(...e){return new o(e.join("")+t(this,r,"f"))}remove(e,s=!0){return new o(a.remove(e,t(this,r,"f"),s))}reverse(){return new o(a.reverse(t(this,r,"f")))}repeat(e){return new o(a.repeat(t(this,r,"f"),e))}replace(e,s,n=!0){return new o(a.replace(e,s,t(this,r,"f"),n))}replaceArray(e,s){return new o(a.replaceArray(e,s,t(this,r,"f")))}replaceFirst(e,s){return new o(a.replaceFirst(e,s,t(this,r,"f")))}replaceStart(e,s){return new o(a.replaceStart(e,s,t(this,r,"f")))}replaceLast(e,s){return new o(a.replaceLast(e,s,t(this,r,"f")))}replaceEnd(e,s){return new o(a.replaceEnd(e,s,t(this,r,"f")))}replaceMatches(e,s,n=-1){return new o(a.replaceMatches(e,s,t(this,r,"f"),n))}squish(){return new o(a.squish(t(this,r,"f")))}start(e){return new o(a.start(t(this,r,"f"),e))}upper(){return new o(a.upper(t(this,r,"f")))}title(){return new o(a.title(t(this,r,"f")))}headline(){return new o(a.headline(t(this,r,"f")))}apa(){return new o(a.apa(t(this,r,"f")))}singular(){return new o(a.singular(t(this,r,"f")))}slug(e="-",s={"@":"at"}){return new o(a.slug(t(this,r,"f"),e,s))}snake(e="_"){return new o(a.snake(t(this,r,"f"),e))}startsWith(e){return a.startsWith(t(this,r,"f"),e)}doesntStartWith(e){return a.doesntStartWith(t(this,r,"f"),e)}studly(){return new o(a.studly(t(this,r,"f")))}pascal(){return new o(a.pascal(t(this,r,"f")))}substr(e,s=null){return new o(a.substr(t(this,r,"f"),e,s))}substrCount(e,s=0,n=null){return a.substrCount(t(this,r,"f"),e,s,n)}substrReplace(e,s=0,n=null){return new o(a.substrReplace(t(this,r,"f"),e,s,n))}swap(e){return new o(a.swap(e,t(this,r,"f")))}take(e){return e<0?this.substr(e):this.substr(0,e)}tap(e){return e(this),this}trim(e=null){return new o(a.trim(t(this,r,"f"),e))}ltrim(e=null){return new o(a.ltrim(t(this,r,"f"),e))}rtrim(e=null){return new o(a.rtrim(t(this,r,"f"),e))}lcfirst(){return new o(a.lcfirst(t(this,r,"f")))}ucfirst(){return new o(a.ucfirst(t(this,r,"f")))}ucwords(e=" \t\r\n\f\v"){return new o(a.ucwords(t(this,r,"f"),e))}ucsplit(){return a.ucsplit(t(this,r,"f"))}when(e,t,s=null){var r,n;return(e="function"==typeof e?e(this):e)?null!==(r=t(this,e))&&void 0!==r?r:this:s&&null!==(n=s(this,e))&&void 0!==n?n:this}unless(e,t,s=null){var r,n;return(e="function"==typeof e?e(this):e)?s&&null!==(n=s(this,e))&&void 0!==n?n:this:null!==(r=t(this,e))&&void 0!==r?r:this}whenContains(e,t,s=null){return this.when(this.contains(e),t,s)}whenContainsAll(e,t,s=null){return this.when(this.containsAll(e),t,s)}whenEmpty(e,t=null){return this.when(this.isEmpty(),e,t)}whenNotEmpty(e,t=null){return this.when(this.isNotEmpty(),e,t)}whenEndsWith(e,t,s=null){return this.when(this.endsWith(e),t,s)}whenDoesntEndWith(e,t,s=null){return this.when(this.doesntEndWith(e),t,s)}whenExactly(e,t,s=null){return this.when(this.exactly(e),t,s)}whenNotExactly(e,t,s=null){return this.when(!this.exactly(e),t,s)}whenIs(e,t,s=null){return this.when(this.is(e),t,s)}whenIsAscii(e,t=null){return this.when(this.isAscii(),e,t)}whenIsUuid(e,t=null){return this.when(this.isUuid(),e,t)}whenIsUlid(e,t=null){return this.when(this.isUlid(),e,t)}whenStartsWith(e,t,s=null){return this.when(this.startsWith(e),t,s)}whenDoesntStartWith(e,t,s=null){return this.when(this.doesntStartWith(e),t,s)}whenTest(e,t,s=null){return this.when(this.test(e),t,s)}words(e=100,s="..."){return new o(a.words(t(this,r,"f"),e,s))}wordCount(){return a.wordCount(t(this,r,"f"))}wordWrap(e=75,s="\n",n=!1){return new o(a.wordWrap(t(this,r,"f"),e,s,n))}wrap(e,s=null){return new o(a.wrap(t(this,r,"f"),e,s))}unwrap(e,s=null){return new o(a.unwrap(t(this,r,"f"),e,s))}toHtmlString(){return new l(t(this,r,"f")).toHtml()}toBase64(){return new o(a.toBase64(t(this,r,"f")))}fromBase64(){return new o(a.fromBase64(t(this,r,"f")))}dump(){console.log(t(this,r,"f"))}dd(){throw this.dump(),new Error("dd()")}value(){return this.toString()}toString(){return t(this,r,"f")}toInteger(e=10){const s=Number.parseInt(t(this,r,"f"),e);return Number.isNaN(s)||!Number.isFinite(s)?0:s}toFloat(){const e=Number.parseFloat(t(this,r,"f"));return Number.isNaN(e)?0:e}toBoolean(){switch(t(this,r,"f")){case"1":case"true":case"on":case"yes":return!0;default:return!1}}toDate(e=null,s=null){var n;if("Invalid Date"===new Date(t(this,r,"f")).toString())return"Invalid Date";if(null===e)return new Date(t(this,r,"f")).toLocaleDateString("en-us",{year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric",hour12:!1,timeZone:null!=s?s:void 0});let i="";const l=new Date(new Date(t(this,r,"f")).toLocaleString("en-US",{year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric",fractionalSecondDigits:3,hour12:!1,timeZone:null!=s?s:void 0})),u=l.getMonth(),c=l.getDay(),h=l.getDate(),f=l.getFullYear(),p=l.getHours(),d=l.getMinutes(),m=l.getSeconds(),g=l.getMilliseconds(),w=e.match(/\\?.|./g);for(const e of w)switch(e){case"d":i+=a.padLeft(h.toString(),2,"0");break;case"D":i+=l.toLocaleString("en-US",{weekday:"short"});break;case"j":i+=h;break;case"l":i+=l.toLocaleString("en-US",{weekday:"long"});break;case"N":case"w":i+=c;break;case"S":i+=null!==(n={1:"st",2:"nd",3:"rd",21:"st",22:"nd",23:"rd",31:"st"}[h])&&void 0!==n?n:"th";break;case"z":{let e=new Date(f,0,0),t=l-e+60*(e.getTimezoneOffset()-l.getTimezoneOffset())*1e3,s=864e5;i+=Math.floor(t/s);break}case"W":{let e=new Date(Date.UTC(f,u,h)),t=e.getUTCDay()||7;e.setUTCDate(e.getUTCDate()+4-t);let s=new Date(Date.UTC(e.getUTCFullYear(),0,1)),r=Math.ceil(((e-s)/864e5+1)/7);i+=a.padLeft(r.toString(),2,"0");break}case"F":i+=l.toLocaleString("en-US",{month:"long"});break;case"m":{const e=u+1;i+=a.padLeft(e.toString(),2,"0");break}case"M":i+=l.toLocaleString("en-US",{month:"short"});break;case"n":i+=u+1;break;case"t":i+=new Date(f,u+1,0).getDate();break;case"L":i+=1===new Date(f,1,29).getMonth()?"1":"0";break;case"o":i+=l.toISOString().substring(0,4);break;case"X":i+=f<0?"-"+f:"+"+f;break;case"x":i+=f<1e4?f:"-"+f;break;case"Y":i+=f;break;case"y":i+=f.toString().substring(2);break;case"a":i+=p<12?"am":"pm";break;case"A":i+=p<12?"AM":"PM";break;case"B":{const e=l.getUTCHours(),t=l.getUTCMinutes(),s=l.getUTCSeconds();i+=Math.floor(1e3*((e+1)%24+t/60+s/3600)/24);break}case"g":i+=p>12?p-12:p;break;case"G":i+=p;break;case"h":i+=a.padLeft((p>12?p-12:p).toString(),2,"0");break;case"H":i+=a.padLeft(p.toString(),2,"0");break;case"i":i+=a.padLeft(d.toString(),2,"0");break;case"s":i+=a.padLeft(m.toString(),2,"0");break;case"u":throw new Error("Microseconds are not supported.");case"v":i+=a.padLeft(g.toString(),3,"0");break;case"e":i+=Intl.DateTimeFormat("en-us",{timeZone:null!=s?s:void 0}).resolvedOptions().timeZone;break;case"I":{let e=new Date(f,0,1).getTimezoneOffset(),t=new Date(f,6,1).getTimezoneOffset();i+=Math.max(e,t)===l.getTimezoneOffset()?"0":"1";break}case"O":{const e=l.toLocaleDateString("en-us",{timeZoneName:"longOffset",timeZone:null!=s?s:void 0}).split(", ").pop().trim();i+=3===e.length?"+0000":e.substring(3).replace(":","");break}case"P":{const e=l.toLocaleDateString("en-us",{timeZoneName:"longOffset",timeZone:null!=s?s:void 0}).split(", ").pop().trim();i+=3===e.length?"+00:00":e.substring(3);break}case"p":{const e=l.toLocaleDateString("en-us",{timeZoneName:"longOffset",timeZone:null!=s?s:void 0}).split(", ").pop().trim();i+="GMT"===e?"Z":e.substring(3);break}case"T":{const e=l.toLocaleDateString("en-us",{timeZoneName:"short",timeZone:null!=s?s:void 0}).split(", ").pop().trim();i+=null!=s?s:e.replace("GMT","UTC").split(/[+-]/)[0];break}case"Z":{const e=l.toLocaleDateString("en-us",{timeZoneName:"longOffset",timeZone:null!=s?s:void 0}),t=e.match(/[+-]/),r=e.split(/[+-]/),n=t?t.pop():"+",a=2===r.length?r[1]:"0:00";i+=`${n}${3600*Number.parseInt(a.split(":")[0])+60*Number.parseInt(a.split(":")[1])}`;break}case"c":i+=`${this.toDate("Y-m-d\\TH:i:sP")}`;break;case"r":i+=new o(t(this,r,"f")).toDate("D, d M Y H:i:s O",s);break;case"U":i+=Math.floor(l.getTime()/1e3);break;default:i+=e.length>=2&&e.includes("\\")?e.replace("\\",""):e}return i}}r=new WeakMap;class l{constructor(e=""){n.set(this,void 0),s(this,n,e,"f")}toHtml(){const e=new RegExp(/(?!<!DOCTYPE)<([^\s>]+)(\s|>)+/).exec(t(this,n,"f"));if(null===e)return t(this,n,"f");const s=document.createElement(e[1]);return s.innerHTML=t(this,n,"f"),"html"===e[1]?s:s.firstChild}isEmpty(){return""===t(this,n,"f")}isNotEmpty(){return!this.isEmpty()}toString(){const e=this.toHtml();return e instanceof HTMLElement?e.outerHTML:e instanceof Node?e.textContent:e}}function u(e=""){return a.of(e)}function c(e,t=null){const s=["-",".","\\","+","*","?","[","^","]","$","(",")","{","}","=","!","<",">","|",":",t].filter(Boolean).map(e=>`\\${e}`).join("");return e.replace(new RegExp(`[${s}]`,"g"),"\\$&")}function h(e,t){const s=[e=>e.toLowerCase(),e=>e.toUpperCase(),e=>e.charAt(0).toUpperCase()+e.slice(1),e=>e.replace(/\b\w/g,e=>e.toUpperCase())];for(const r of s)if(r(t)===t)return r(e);return e}if(n=new WeakMap,void 0!==e&&(module.exports.Mode=e.Mode,module.exports.Str=a,module.exports.Stringable=o,module.exports.HtmlString=l,module.exports.str=u),void 0!==globalThis.global){const t=globalThis.global;t.Mode=e.Mode,t.Str=a,t.Stringable=o,t.HtmlString=l,t.str=u}e.HtmlString=l,e.Str=a,e.Stringable=o,e.str=u});
//# sourceMappingURL=main.min.js.map
