import{aG as Ti}from"./globals-BVeJWRKG.js";var E={},U={};for(var Li=[],w=0;w<64;)Li[w]=0|4294967296*Math.sin(++w%Math.PI);function Fi(r){var n,i,t,f=[n=1732584193,i=4023233417,~n,~i],u=[],o=unescape(encodeURI(r))+"€",l=o.length;for(r=--l/4+2|15,u[--r]=8*l;~l;)u[l>>2]|=o.charCodeAt(l)<<8*l--;for(w=o=0;w>4]+Li[o]+~~u[w|15&[o,5*o+1,3*o+5,7*o][l]])<<(l=[7,12,17,22,5,9,14,20,4,11,16,23,6,10,15,21][4*l+o++%4])|t>>>-l),n,i])n=0|l[1],i=l[2];for(o=4;o;)f[--o]+=l[o]}for(r="";o<32;)r+=(f[o>>3]>>4*(1^o++)&15).toString(16);return r}const Hi=Object.freeze(Object.defineProperty({__proto__:null,default:Fi},Symbol.toStringTag,{value:"Module"})),Wi=Ti(Hi);var H={exports:{}},Me;function ge(){return Me||(Me=1,function(r,n){(function(i,t){r.exports=function(f,u,o,l,d){for(u=u.split?u.split("."):u,l=0;l>>20,u-i|0}return qe=t,qe}/** * @license Apache-2.0 * * Copyright (c) 2018 The Stdlib Authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */var _e,di;function tt(){if(di)return _e;di=1;var r=at();return _e=r,_e}/** * @license Apache-2.0 * * Copyright (c) 2018 The Stdlib Authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */var Ae,hi;function ut(){if(hi)return Ae;hi=1;var r=mi(),n=Ri(),i=gi(),t=ji(),f=Ci(),u=Xi(),o=Si(),l=Oi(),d=Ya(),c=nt(),p=tt(),_=Ui(),m=Ei(),A=2220446049250313e-31,M=2148532223,h=[0,0],y=[0,0];function $(e,a){var v,s;return e===0||o(e)||l(e)?e:(c(h,e),e=h[0],a+=h[1],a+=p(e),at?e<0?n:r:(a<=f?(a+=52,s=A):s=1,_(y,e),v=y[0],v&=M,v|=a+i<<20,s*m(v,y[1])))}return Ae=$,Ae}/** * @license Apache-2.0 * * Copyright (c) 2018 The Stdlib Authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */var Le,yi;function ft(){if(yi)return Le;yi=1;var r=ut();return Le=r,Le}var me={},bi;function ot(){if(bi)return me;bi=1;function r(n,i,t){i.split&&(i=i.split("."));for(var f=0,u=i.length,o=n,l,d;f1?(v.pop(),s=(0,i.default)($,v.join("."))):s=h,typeof s=="object"){if(a.copy){var b=(0,i.default)($,a.copy);b!==void 0&&(0,f.dset)(h,e,b)}else if(a.move){var q=(0,i.default)($,a.move);q!==void 0&&(0,f.dset)(h,e,q),(0,u.unset)(h,a.move)}else a.hasOwnProperty("set")&&(0,f.dset)(h,e,a.set);if(a.to_string){var L=(0,i.default)(h,e);if(typeof L=="string"||typeof L=="object"&&L!==null)continue;L!==void 0?(0,f.dset)(h,e,JSON.stringify(L)):(0,f.dset)(h,e,"undefined")}}}}function _(h,y){return y.sample.percent<=0?!1:y.sample.percent>=1?!0:y.sample.path?A(h,y):m(y.sample.percent)}function m(h){return Math.random()<=h}function A(h,y){var $=(0,i.default)(h,y.sample.path),e=(0,n.default)(JSON.stringify($)),a=-64,v=[];M(e.slice(0,8),v);for(var s=0,b=0;b<64&&v[b]!==1;b++)s++;if(s!==0){var q=[];M(e.slice(9,16),q),a-=s,v.splice(0,s),q.splice(64-s),v=v.concat(q)}return v[63]=v[63]===0?1:0,(0,t.default)(parseInt(v.join(""),2),a)=1;a/=2)e-a>=0?(e-=a,y.push(1)):y.push(0)}return U}var I={},qi;function st(){if(qi)return I;qi=1;var r=I&&I.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(I,"__esModule",{value:!0});var n=r(ge());function i(e,a){if(!a)throw new Error("No matcher supplied!");switch(a.type){case"all":return t();case"fql":return f(a.ir,e);default:throw new Error("Matcher of type ".concat(a.type," unsupported."))}}I.default=i;function t(){return!0}function f(e,a){if(!e)return!1;try{e=JSON.parse(e)}catch(s){throw new Error('Failed to JSON.parse FQL intermediate representation "'.concat(e,'": ').concat(s))}var v=u(e,a);return typeof v!="boolean"?!1:v}function u(e,a){if(!Array.isArray(e))return o(e,a)===!0;var v=e[0];switch(v){case"!":return!u(e[1],a);case"or":for(var s=1;s":case">=":return d(o(e[1],a),o(e[2],a),v,a);case"in":return l(o(e[1],a),o(e[2],a),a);case"contains":return p(o(e[1],a),o(e[2],a));case"match":return _(o(e[1],a),o(e[2],a));case"lowercase":var b=o(e[1],a);return typeof b!="string"?null:b.toLowerCase();case"typeof":return typeof o(e[1],a);case"length":return m(o(e[1],a));default:throw new Error("FQL IR could not evaluate for token: ".concat(v))}}function o(e,a){return Array.isArray(e)?e:typeof e=="object"?e.value:(0,n.default)(a,e)}function l(e,a,v){return a.find(function(s){return o(s,v)===e})!==void 0}function d(e,a,v,s){if(A(e)&&(e=u(e,s)),A(a)&&(a=u(a,s)),typeof e!="number"||typeof a!="number")return!1;switch(v){case"<=":return e<=a;case">=":return e>=a;case"<":return e":return e>a;default:throw new Error("Invalid operator in compareNumbers: ".concat(v))}}function c(e,a,v,s){switch(A(e)&&(e=u(e,s)),A(a)&&(a=u(a,s)),typeof e=="object"&&typeof a=="object"&&(e=JSON.stringify(e),a=JSON.stringify(a)),v){case"=":return e===a;case"!=":return e!==a;default:throw new Error("Invalid operator in compareItems: ".concat(v))}}function p(e,a){return typeof e!="string"||typeof a!="string"?!1:e.indexOf(a)!==-1}function _(e,a){return typeof e!="string"||typeof a!="string"?!1:M(a,e)}function m(e){return e===null?0:!Array.isArray(e)&&typeof e!="string"?NaN:e.length}function A(e){return Array.isArray(e)?(e[0]==="lowercase"||e[0]==="length"||e[0]==="typeof")&&e.length===2||(e[0]==="contains"||e[0]==="match")&&e.length===3:!1}function M(e,a){var v,s;r:for(;e.length>0;){var b=void 0,q=void 0;if(v=h(e),b=v.star,q=v.chunk,e=v.pattern,b&&q==="")return!0;var L=y(q,a),R=L.t,N=L.ok,g=L.err;if(g)return!1;if(N&&(R.length===0||e.length>0)){a=R;continue}if(b)for(var S=0;S0)continue;a=R;continue r}if(g)return!1}return!1}return a.length===0}function h(e){for(var a={star:!1,chunk:"",pattern:""};e.length>0&&e[0]==="*";)e=e.slice(1),a.star=!0;var v=!1,s;r:for(s=0;s0;){if(a.length===0)return b;switch(e[0]){case"[":var q=a[0];a=a.slice(1),e=e.slice(1);var L=!0;e.length>0&&e[0]==="^"&&(L=!1,e=e.slice(1));for(var R=!1,N=0;;){if(e.length>0&&e[0]==="]"&&N>0){e=e.slice(1);break}var g="",S="",P=void 0;if(v=$(e),g=v.char,e=v.newChunk,P=v.err,P||(S=g,e[0]==="-"&&(s=$(e.slice(1)),S=s.char,e=s.newChunk,P=s.err,P)))return b;g<=q&&q<=S&&(R=!0),N++}if(R!==L)return b;break;case"?":a=a.slice(1),e=e.slice(1);break;case"\\":if(e=e.slice(1),e.length===0)return b.err=!0,b;default:if(e[0]!==a[0])return b;a=a.slice(1),e=e.slice(1)}}return b.t=a,b.ok=!0,b.err=!1,b}function $(e){var a={char:"",newChunk:"",err:!1};return e.length===0||e[0]==="-"||e[0]==="]"||e[0]==="\\"&&(e=e.slice(1),e.length===0)?(a.err=!0,a):(a.char=e[0],a.newChunk=e.slice(1),a.newChunk.length===0&&(a.err=!0),a)}return I}var T={},_i;function ct(){if(_i)return T;_i=1,Object.defineProperty(T,"__esModule",{value:!0});var r=function(){function n(i){this.rules=[],this.rules=i||[]}return n.prototype.getRulesByDestinationName=function(i){for(var t=[],f=0,u=this.rules;f