/* COPYRIGHT Esri - https://js.arcgis.com/5.1.2/LICENSE.txt */
import{getDeepValue as t}from"./object.js";const e=/\{([^}]+)\}/g;function n(t){return t??""}function r(r,l){return l?r.replaceAll(e,"object"==typeof l?(e,r)=>n(t(r,l)):(t,e)=>n(l(e))):r}function l(e,n){return e.replaceAll(/\$\{([^\s:}]*)(?::([^\s:}]+))?\}/g,(e,r)=>{if(""===r)return"$";const l=t(r,n);return(l??"").toString()})}function u(t,e){return t.replaceAll(/([.$?*|{}()[\]\\/+\-^])/g,t=>e?.includes(t)?t:`\\${t}`)}function o(t){let e=0;for(let n=0;n<t.length;n++)e=(e<<5)-e+t.charCodeAt(n),e|=0;return e}function i(t,e=0){let n=3735928559^e,r=1103547991^e;for(let l,u=0;u<t.length;u++)l=t.charCodeAt(u),n=Math.imul(n^l,2654435761),r=Math.imul(r^l,1597334677);return n=Math.imul(n^n>>>16,2246822507),n^=Math.imul(r^r>>>13,3266489909),r=Math.imul(r^r>>>16,2246822507),r^=Math.imul(n^n>>>13,3266489909),4294967296*(2097151&r)+(n>>>0)}let c;function f(t){c??=new DOMParser;return c.parseFromString(t||"","text/html").body.innerText||""}function a(t,e){return new RegExp(`{${e}}`,"ig").test(t)}function h(t,...e){let n=t[0];for(let r=0;r<e.length;++r)n+=e[r]+t[r+1];return n}export{i as cyrb53,u as escapeRegExpString,o as numericHash,r as replace,h as safeToString,f as stripHTML,l as substitute,a as templateHasKey};
