/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
See https://js.arcgis.com/4.34/esri/copyright.txt for details.
v4.34.0-next.147 */
var i=class{constructor(){this.promise=new Promise((e,o)=>{this.resolve=e,this.reject=o})}},E=(t,e)=>{let o=e>d?m:e/h,s=0,n=setInterval(()=>{s+=o,s>=e&&(clearInterval(n),t())},o);return n},d=4e3,m=2e3,h=4;var I=t=>t.replace(w,(e,o)=>`${o===0?"":"-"}${e.toLowerCase()}`),w=/[A-Z]+(?![a-z])|[A-Z]/gu;var l='"',p="'",u=(t,e)=>new Array(e+1).join(t),U=t=>{let e=l,o=p;t.includes(e)&&!t.includes(o)&&(o=l,e=p);let n=new RegExp(`(^|[^\\\\])((?:\\\\{2})*)((?:\\\\${o})+)`,"gu");t=t.replace(n,($,r,c,a)=>r+c+u(o,a.length/2));let g=new RegExp(`(^|[^\\\\])((?:\\\\{2})*)(${e}+)`,"gu");return t=t.replace(g,($,r,c,a)=>r+c+u(`\\${e}`,a.length)),e+t+e},x=t=>{let e=t?t.replaceAll(/[-[\]/{}()*+?.\\^$|]/gu,"\\$&"):"^.*$";return new RegExp(e,"i")},y=t=>`\u200E${t??""}\u200E`,A="randomUUID"in crypto,R=()=>{if(A)return crypto.randomUUID();let t=crypto.getRandomValues(new Uint16Array(8));t[3]=t[3]&4095|16384,t[4]=t[4]&16383|32768;let e=o=>t[o].toString(16).padStart(4,"0");return`${e(0)+e(1)}-${e(2)}-${e(3)}-${e(4)}-${e(5)}${e(6)}${e(7)}`};var b=(t,e={})=>(t??"").replace(/\{(?<valueName>.*?)\}/gu,(o,s)=>e[s]??o);export{i as a,E as b,I as c,U as d,x as e,y as f,R as g,b as h};
