!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).Apptimize=e()}}(function(){return function a(s,l,o){function u(t,e){if(!l[t]){if(!s[t]){var r="function"==typeof require&&require;if(!e&&r)return r(t,!0);if(h)return h(t,!0);var i=new Error("Cannot find module '"+t+"'");throw i.code="MODULE_NOT_FOUND",i}var n=l[t]={exports:{}};s[t][0].call(n.exports,function(e){return u(s[t][1][e]||e)},n,n.exports,a,s,l,o)}return l[t].exports}for(var h="function"==typeof require&&require,e=0;e<o.length;e++)u(o[e]);return u}({1:[function(e,t,r){"use strict";var i={};(0,e("./lib/utils/common").assign)(i,e("./lib/deflate"),e("./lib/inflate"),e("./lib/zlib/constants")),t.exports=i},{"./lib/deflate":2,"./lib/inflate":3,"./lib/utils/common":4,"./lib/zlib/constants":7}],2:[function(e,t,r){"use strict";var s=e("./zlib/deflate"),l=e("./utils/common"),o=e("./utils/strings"),n=e("./zlib/messages"),a=e("./zlib/zstream"),u=Object.prototype.toString,h=0,c=-1,p=0,_=8;function m(e){if(!(this instanceof m))return new m(e);this.options=l.assign({level:c,method:_,chunkSize:16384,windowBits:15,memLevel:8,strategy:p,to:""},e||{});var t=this.options;t.raw&&0<t.windowBits?t.windowBits=-t.windowBits:t.gzip&&0<t.windowBits&&t.windowBits<16&&(t.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new a,this.strm.avail_out=0;var r=s.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(r!==h)throw new Error(n[r]);if(t.header&&s.deflateSetHeader(this.strm,t.header),t.dictionary){var i;if(i="string"==typeof t.dictionary?o.string2buf(t.dictionary):"[object ArrayBuffer]"===u.call(t.dictionary)?new Uint8Array(t.dictionary):t.dictionary,(r=s.deflateSetDictionary(this.strm,i))!==h)throw new Error(n[r]);this._dict_set=!0}}function i(e,t){var r=new m(t);if(r.push(e,!0),r.err)throw r.msg||n[r.err];return r.result}m.prototype.push=function(e,t){var r,i,n=this.strm,a=this.options.chunkSize;if(this.ended)return!1;i=t===~~t?t:!0===t?4:0,"string"==typeof e?n.input=o.string2buf(e):"[object ArrayBuffer]"===u.call(e)?n.input=new Uint8Array(e):n.input=e,n.next_in=0,n.avail_in=n.input.length;do{if(0===n.avail_out&&(n.output=new l.Buf8(a),n.next_out=0,n.avail_out=a),1!==(r=s.deflate(n,i))&&r!==h)return this.onEnd(r),!(this.ended=!0);0!==n.avail_out&&(0!==n.avail_in||4!==i&&2!==i)||("string"===this.options.to?this.onData(o.buf2binstring(l.shrinkBuf(n.output,n.next_out))):this.onData(l.shrinkBuf(n.output,n.next_out)))}while((0<n.avail_in||0===n.avail_out)&&1!==r);return 4===i?(r=s.deflateEnd(this.strm),this.onEnd(r),this.ended=!0,r===h):2!==i||(this.onEnd(h),!(n.avail_out=0))},m.prototype.onData=function(e){this.chunks.push(e)},m.prototype.onEnd=function(e){e===h&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=l.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg},r.Deflate=m,r.deflate=i,r.deflateRaw=function(e,t){return(t=t||{}).raw=!0,i(e,t)},r.gzip=function(e,t){return(t=t||{}).gzip=!0,i(e,t)}},{"./utils/common":4,"./utils/strings":5,"./zlib/deflate":9,"./zlib/messages":14,"./zlib/zstream":16}],3:[function(e,t,r){"use strict";var c=e("./zlib/inflate"),p=e("./utils/common"),_=e("./utils/strings"),m=e("./zlib/constants"),i=e("./zlib/messages"),n=e("./zlib/zstream"),a=e("./zlib/gzheader"),f=Object.prototype.toString;function s(e){if(!(this instanceof s))return new s(e);this.options=p.assign({chunkSize:16384,windowBits:0,to:""},e||{});var t=this.options;t.raw&&0<=t.windowBits&&t.windowBits<16&&(t.windowBits=-t.windowBits,0===t.windowBits&&(t.windowBits=-15)),!(0<=t.windowBits&&t.windowBits<16)||e&&e.windowBits||(t.windowBits+=32),15<t.windowBits&&t.windowBits<48&&0==(15&t.windowBits)&&(t.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new n,this.strm.avail_out=0;var r=c.inflateInit2(this.strm,t.windowBits);if(r!==m.Z_OK)throw new Error(i[r]);if(this.header=new a,c.inflateGetHeader(this.strm,this.header),t.dictionary&&("string"==typeof t.dictionary?t.dictionary=_.string2buf(t.dictionary):"[object ArrayBuffer]"===f.call(t.dictionary)&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(r=c.inflateSetDictionary(this.strm,t.dictionary))!==m.Z_OK))throw new Error(i[r])}function l(e,t){var r=new s(t);if(r.push(e,!0),r.err)throw r.msg||i[r.err];return r.result}s.prototype.push=function(e,t){var r,i,n,a,s,l=this.strm,o=this.options.chunkSize,u=this.options.dictionary,h=!1;if(this.ended)return!1;i=t===~~t?t:!0===t?m.Z_FINISH:m.Z_NO_FLUSH,"string"==typeof e?l.input=_.binstring2buf(e):"[object ArrayBuffer]"===f.call(e)?l.input=new Uint8Array(e):l.input=e,l.next_in=0,l.avail_in=l.input.length;do{if(0===l.avail_out&&(l.output=new p.Buf8(o),l.next_out=0,l.avail_out=o),(r=c.inflate(l,m.Z_NO_FLUSH))===m.Z_NEED_DICT&&u&&(r=c.inflateSetDictionary(this.strm,u)),r===m.Z_BUF_ERROR&&!0===h&&(r=m.Z_OK,h=!1),r!==m.Z_STREAM_END&&r!==m.Z_OK)return this.onEnd(r),!(this.ended=!0);l.next_out&&(0!==l.avail_out&&r!==m.Z_STREAM_END&&(0!==l.avail_in||i!==m.Z_FINISH&&i!==m.Z_SYNC_FLUSH)||("string"===this.options.to?(n=_.utf8border(l.output,l.next_out),a=l.next_out-n,s=_.buf2string(l.output,n),l.next_out=a,l.avail_out=o-a,a&&p.arraySet(l.output,l.output,n,a,0),this.onData(s)):this.onData(p.shrinkBuf(l.output,l.next_out)))),0===l.avail_in&&0===l.avail_out&&(h=!0)}while((0<l.avail_in||0===l.avail_out)&&r!==m.Z_STREAM_END);return r===m.Z_STREAM_END&&(i=m.Z_FINISH),i===m.Z_FINISH?(r=c.inflateEnd(this.strm),this.onEnd(r),this.ended=!0,r===m.Z_OK):i!==m.Z_SYNC_FLUSH||(this.onEnd(m.Z_OK),!(l.avail_out=0))},s.prototype.onData=function(e){this.chunks.push(e)},s.prototype.onEnd=function(e){e===m.Z_OK&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=p.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg},r.Inflate=s,r.inflate=l,r.inflateRaw=function(e,t){return(t=t||{}).raw=!0,l(e,t)},r.ungzip=l},{"./utils/common":4,"./utils/strings":5,"./zlib/constants":7,"./zlib/gzheader":10,"./zlib/inflate":12,"./zlib/messages":14,"./zlib/zstream":16}],4:[function(e,t,r){"use strict";var i="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;r.assign=function(e){for(var t,r,i=Array.prototype.slice.call(arguments,1);i.length;){var n=i.shift();if(n){if("object"!=typeof n)throw new TypeError(n+"must be non-object");for(var a in n)t=n,r=a,Object.prototype.hasOwnProperty.call(t,r)&&(e[a]=n[a])}}return e},r.shrinkBuf=function(e,t){return e.length===t?e:e.subarray?e.subarray(0,t):(e.length=t,e)};var n={arraySet:function(e,t,r,i,n){if(t.subarray&&e.subarray)e.set(t.subarray(r,r+i),n);else for(var a=0;a<i;a++)e[n+a]=t[r+a]},flattenChunks:function(e){var t,r,i,n,a,s;for(t=i=0,r=e.length;t<r;t++)i+=e[t].length;for(s=new Uint8Array(i),t=n=0,r=e.length;t<r;t++)a=e[t],s.set(a,n),n+=a.length;return s}},a={arraySet:function(e,t,r,i,n){for(var a=0;a<i;a++)e[n+a]=t[r+a]},flattenChunks:function(e){return[].concat.apply([],e)}};r.setTyped=function(e){e?(r.Buf8=Uint8Array,r.Buf16=Uint16Array,r.Buf32=Int32Array,r.assign(r,n)):(r.Buf8=Array,r.Buf16=Array,r.Buf32=Array,r.assign(r,a))},r.setTyped(i)},{}],5:[function(e,t,r){"use strict";var o=e("./common"),n=!0,a=!0;try{String.fromCharCode.apply(null,[0])}catch(e){n=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(e){a=!1}for(var u=new o.Buf8(256),i=0;i<256;i++)u[i]=252<=i?6:248<=i?5:240<=i?4:224<=i?3:192<=i?2:1;function h(e,t){if(t<65534&&(e.subarray&&a||!e.subarray&&n))return String.fromCharCode.apply(null,o.shrinkBuf(e,t));for(var r="",i=0;i<t;i++)r+=String.fromCharCode(e[i]);return r}u[254]=u[254]=1,r.string2buf=function(e){var t,r,i,n,a,s=e.length,l=0;for(n=0;n<s;n++)55296==(64512&(r=e.charCodeAt(n)))&&n+1<s&&56320==(64512&(i=e.charCodeAt(n+1)))&&(r=65536+(r-55296<<10)+(i-56320),n++),l+=r<128?1:r<2048?2:r<65536?3:4;for(t=new o.Buf8(l),n=a=0;a<l;n++)55296==(64512&(r=e.charCodeAt(n)))&&n+1<s&&56320==(64512&(i=e.charCodeAt(n+1)))&&(r=65536+(r-55296<<10)+(i-56320),n++),r<128?t[a++]=r:(r<2048?t[a++]=192|r>>>6:(r<65536?t[a++]=224|r>>>12:(t[a++]=240|r>>>18,t[a++]=128|r>>>12&63),t[a++]=128|r>>>6&63),t[a++]=128|63&r);return t},r.buf2binstring=function(e){return h(e,e.length)},r.binstring2buf=function(e){for(var t=new o.Buf8(e.length),r=0,i=t.length;r<i;r++)t[r]=e.charCodeAt(r);return t},r.buf2string=function(e,t){var r,i,n,a,s=t||e.length,l=new Array(2*s);for(r=i=0;r<s;)if((n=e[r++])<128)l[i++]=n;else if(4<(a=u[n]))l[i++]=65533,r+=a-1;else{for(n&=2===a?31:3===a?15:7;1<a&&r<s;)n=n<<6|63&e[r++],a--;1<a?l[i++]=65533:n<65536?l[i++]=n:(n-=65536,l[i++]=55296|n>>10&1023,l[i++]=56320|1023&n)}return h(l,i)},r.utf8border=function(e,t){var r;for((t=t||e.length)>e.length&&(t=e.length),r=t-1;0<=r&&128==(192&e[r]);)r--;return r<0?t:0===r?t:r+u[e[r]]>t?r:t}},{"./common":4}],6:[function(e,t,r){"use strict";t.exports=function(e,t,r,i){for(var n=65535&e|0,a=e>>>16&65535|0,s=0;0!==r;){for(r-=s=2e3<r?2e3:r;a=a+(n=n+t[i++]|0)|0,--s;);n%=65521,a%=65521}return n|a<<16|0}},{}],7:[function(e,t,r){"use strict";t.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},{}],8:[function(e,t,r){"use strict";var l=function(){for(var e,t=[],r=0;r<256;r++){e=r;for(var i=0;i<8;i++)e=1&e?3988292384^e>>>1:e>>>1;t[r]=e}return t}();t.exports=function(e,t,r,i){var n=l,a=i+r;e^=-1;for(var s=i;s<a;s++)e=e>>>8^n[255&(e^t[s])];return-1^e}},{}],9:[function(e,t,r){"use strict";var o,p=e("../utils/common"),u=e("./trees"),_=e("./adler32"),m=e("./crc32"),i=e("./messages"),h=0,c=1,f=3,d=4,g=5,v=0,A=1,y=-2,n=-3,T=-5,b=-1,a=1,w=2,N=3,S=4,s=0,l=2,x=8,E=9,z=15,I=8,k=286,B=30,F=19,O=2*k+1,P=15,C=3,D=258,R=D+C+1,L=32,U=42,M=69,K=73,V=91,q=103,G=113,Y=666,j=1,H=2,Z=3,J=4,W=3;function X(e,t){return e.msg=i[t],t}function Q(e){return(e<<1)-(4<e?9:0)}function $(e){for(var t=e.length;0<=--t;)e[t]=0}function ee(e){var t=e.state,r=t.pending;r>e.avail_out&&(r=e.avail_out),0!==r&&(p.arraySet(e.output,t.pending_buf,t.pending_out,r,e.next_out),e.next_out+=r,t.pending_out+=r,e.total_out+=r,e.avail_out-=r,t.pending-=r,0===t.pending&&(t.pending_out=0))}function te(e,t){u._tr_flush_block(e,0<=e.block_start?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,ee(e.strm)}function re(e,t){e.pending_buf[e.pending++]=t}function ie(e,t){e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=255&t}function ne(e,t){var r,i,n=e.max_chain_length,a=e.strstart,s=e.prev_length,l=e.nice_match,o=e.strstart>e.w_size-R?e.strstart-(e.w_size-R):0,u=e.window,h=e.w_mask,c=e.prev,p=e.strstart+D,_=u[a+s-1],m=u[a+s];e.prev_length>=e.good_match&&(n>>=2),l>e.lookahead&&(l=e.lookahead);do{if(u[(r=t)+s]===m&&u[r+s-1]===_&&u[r]===u[a]&&u[++r]===u[a+1]){a+=2,r++;do{}while(u[++a]===u[++r]&&u[++a]===u[++r]&&u[++a]===u[++r]&&u[++a]===u[++r]&&u[++a]===u[++r]&&u[++a]===u[++r]&&u[++a]===u[++r]&&u[++a]===u[++r]&&a<p);if(i=D-(p-a),a=p-D,s<i){if(e.match_start=t,l<=(s=i))break;_=u[a+s-1],m=u[a+s]}}}while((t=c[t&h])>o&&0!=--n);return s<=e.lookahead?s:e.lookahead}function ae(e){var t,r,i,n,a,s,l,o,u,h,c=e.w_size;do{if(n=e.window_size-e.lookahead-e.strstart,e.strstart>=c+(c-R)){for(p.arraySet(e.window,e.window,c,c,0),e.match_start-=c,e.strstart-=c,e.block_start-=c,t=r=e.hash_size;i=e.head[--t],e.head[t]=c<=i?i-c:0,--r;);for(t=r=c;i=e.prev[--t],e.prev[t]=c<=i?i-c:0,--r;);n+=c}if(0===e.strm.avail_in)break;if(s=e.strm,l=e.window,o=e.strstart+e.lookahead,u=n,h=void 0,h=s.avail_in,u<h&&(h=u),r=0===h?0:(s.avail_in-=h,p.arraySet(l,s.input,s.next_in,h,o),1===s.state.wrap?s.adler=_(s.adler,l,h,o):2===s.state.wrap&&(s.adler=m(s.adler,l,h,o)),s.next_in+=h,s.total_in+=h,h),e.lookahead+=r,e.lookahead+e.insert>=C)for(a=e.strstart-e.insert,e.ins_h=e.window[a],e.ins_h=(e.ins_h<<e.hash_shift^e.window[a+1])&e.hash_mask;e.insert&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[a+C-1])&e.hash_mask,e.prev[a&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=a,a++,e.insert--,!(e.lookahead+e.insert<C)););}while(e.lookahead<R&&0!==e.strm.avail_in)}function se(e,t){for(var r,i;;){if(e.lookahead<R){if(ae(e),e.lookahead<R&&t===h)return j;if(0===e.lookahead)break}if(r=0,e.lookahead>=C&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+C-1])&e.hash_mask,r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),0!==r&&e.strstart-r<=e.w_size-R&&(e.match_length=ne(e,r)),e.match_length>=C)if(i=u._tr_tally(e,e.strstart-e.match_start,e.match_length-C),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=C){for(e.match_length--;e.strstart++,e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+C-1])&e.hash_mask,r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart,0!=--e.match_length;);e.strstart++}else e.strstart+=e.match_length,e.match_length=0,e.ins_h=e.window[e.strstart],e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+1])&e.hash_mask;else i=u._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(i&&(te(e,!1),0===e.strm.avail_out))return j}return e.insert=e.strstart<C-1?e.strstart:C-1,t===d?(te(e,!0),0===e.strm.avail_out?Z:J):e.last_lit&&(te(e,!1),0===e.strm.avail_out)?j:H}function le(e,t){for(var r,i,n;;){if(e.lookahead<R){if(ae(e),e.lookahead<R&&t===h)return j;if(0===e.lookahead)break}if(r=0,e.lookahead>=C&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+C-1])&e.hash_mask,r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),e.prev_length=e.match_length,e.prev_match=e.match_start,e.match_length=C-1,0!==r&&e.prev_length<e.max_lazy_match&&e.strstart-r<=e.w_size-R&&(e.match_length=ne(e,r),e.match_length<=5&&(e.strategy===a||e.match_length===C&&4096<e.strstart-e.match_start)&&(e.match_length=C-1)),e.prev_length>=C&&e.match_length<=e.prev_length){for(n=e.strstart+e.lookahead-C,i=u._tr_tally(e,e.strstart-1-e.prev_match,e.prev_length-C),e.lookahead-=e.prev_length-1,e.prev_length-=2;++e.strstart<=n&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+C-1])&e.hash_mask,r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),0!=--e.prev_length;);if(e.match_available=0,e.match_length=C-1,e.strstart++,i&&(te(e,!1),0===e.strm.avail_out))return j}else if(e.match_available){if((i=u._tr_tally(e,0,e.window[e.strstart-1]))&&te(e,!1),e.strstart++,e.lookahead--,0===e.strm.avail_out)return j}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&(i=u._tr_tally(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart<C-1?e.strstart:C-1,t===d?(te(e,!0),0===e.strm.avail_out?Z:J):e.last_lit&&(te(e,!1),0===e.strm.avail_out)?j:H}function oe(e,t,r,i,n){this.good_length=e,this.max_lazy=t,this.nice_length=r,this.max_chain=i,this.func=n}function ue(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=x,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new p.Buf16(2*O),this.dyn_dtree=new p.Buf16(2*(2*B+1)),this.bl_tree=new p.Buf16(2*(2*F+1)),$(this.dyn_ltree),$(this.dyn_dtree),$(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new p.Buf16(P+1),this.heap=new p.Buf16(2*k+1),$(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new p.Buf16(2*k+1),$(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function he(e){var t;return e&&e.state?(e.total_in=e.total_out=0,e.data_type=l,(t=e.state).pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=t.wrap?U:G,e.adler=2===t.wrap?0:1,t.last_flush=h,u._tr_init(t),v):X(e,y)}function ce(e){var t,r=he(e);return r===v&&((t=e.state).window_size=2*t.w_size,$(t.head),t.max_lazy_match=o[t.level].max_lazy,t.good_match=o[t.level].good_length,t.nice_match=o[t.level].nice_length,t.max_chain_length=o[t.level].max_chain,t.strstart=0,t.block_start=0,t.lookahead=0,t.insert=0,t.match_length=t.prev_length=C-1,t.match_available=0,t.ins_h=0),r}function pe(e,t,r,i,n,a){if(!e)return y;var s=1;if(t===b&&(t=6),i<0?(s=0,i=-i):15<i&&(s=2,i-=16),n<1||E<n||r!==x||i<8||15<i||t<0||9<t||a<0||S<a)return X(e,y);8===i&&(i=9);var l=new ue;return(e.state=l).strm=e,l.wrap=s,l.gzhead=null,l.w_bits=i,l.w_size=1<<l.w_bits,l.w_mask=l.w_size-1,l.hash_bits=n+7,l.hash_size=1<<l.hash_bits,l.hash_mask=l.hash_size-1,l.hash_shift=~~((l.hash_bits+C-1)/C),l.window=new p.Buf8(2*l.w_size),l.head=new p.Buf16(l.hash_size),l.prev=new p.Buf16(l.w_size),l.lit_bufsize=1<<n+6,l.pending_buf_size=4*l.lit_bufsize,l.pending_buf=new p.Buf8(l.pending_buf_size),l.d_buf=1*l.lit_bufsize,l.l_buf=3*l.lit_bufsize,l.level=t,l.strategy=a,l.method=r,ce(e)}o=[new oe(0,0,0,0,function(e,t){var r=65535;for(r>e.pending_buf_size-5&&(r=e.pending_buf_size-5);;){if(e.lookahead<=1){if(ae(e),0===e.lookahead&&t===h)return j;if(0===e.lookahead)break}e.strstart+=e.lookahead,e.lookahead=0;var i=e.block_start+r;if((0===e.strstart||e.strstart>=i)&&(e.lookahead=e.strstart-i,e.strstart=i,te(e,!1),0===e.strm.avail_out))return j;if(e.strstart-e.block_start>=e.w_size-R&&(te(e,!1),0===e.strm.avail_out))return j}return e.insert=0,t===d?(te(e,!0),0===e.strm.avail_out?Z:J):(e.strstart>e.block_start&&(te(e,!1),e.strm.avail_out),j)}),new oe(4,4,8,4,se),new oe(4,5,16,8,se),new oe(4,6,32,32,se),new oe(4,4,16,16,le),new oe(8,16,32,32,le),new oe(8,16,128,128,le),new oe(8,32,128,256,le),new oe(32,128,258,1024,le),new oe(32,258,258,4096,le)],r.deflateInit=function(e,t){return pe(e,t,x,z,I,s)},r.deflateInit2=pe,r.deflateReset=ce,r.deflateResetKeep=he,r.deflateSetHeader=function(e,t){return e&&e.state?2!==e.state.wrap?y:(e.state.gzhead=t,v):y},r.deflate=function(e,t){var r,i,n,a;if(!e||!e.state||g<t||t<0)return e?X(e,y):y;if(i=e.state,!e.output||!e.input&&0!==e.avail_in||i.status===Y&&t!==d)return X(e,0===e.avail_out?T:y);if(i.strm=e,r=i.last_flush,i.last_flush=t,i.status===U)if(2===i.wrap)e.adler=0,re(i,31),re(i,139),re(i,8),i.gzhead?(re(i,(i.gzhead.text?1:0)+(i.gzhead.hcrc?2:0)+(i.gzhead.extra?4:0)+(i.gzhead.name?8:0)+(i.gzhead.comment?16:0)),re(i,255&i.gzhead.time),re(i,i.gzhead.time>>8&255),re(i,i.gzhead.time>>16&255),re(i,i.gzhead.time>>24&255),re(i,9===i.level?2:i.strategy>=w||i.level<2?4:0),re(i,255&i.gzhead.os),i.gzhead.extra&&i.gzhead.extra.length&&(re(i,255&i.gzhead.extra.length),re(i,i.gzhead.extra.length>>8&255)),i.gzhead.hcrc&&(e.adler=m(e.adler,i.pending_buf,i.pending,0)),i.gzindex=0,i.status=M):(re(i,0),re(i,0),re(i,0),re(i,0),re(i,0),re(i,9===i.level?2:i.strategy>=w||i.level<2?4:0),re(i,W),i.status=G);else{var s=x+(i.w_bits-8<<4)<<8;s|=(i.strategy>=w||i.level<2?0:i.level<6?1:6===i.level?2:3)<<6,0!==i.strstart&&(s|=L),s+=31-s%31,i.status=G,ie(i,s),0!==i.strstart&&(ie(i,e.adler>>>16),ie(i,65535&e.adler)),e.adler=1}if(i.status===M)if(i.gzhead.extra){for(n=i.pending;i.gzindex<(65535&i.gzhead.extra.length)&&(i.pending!==i.pending_buf_size||(i.gzhead.hcrc&&i.pending>n&&(e.adler=m(e.adler,i.pending_buf,i.pending-n,n)),ee(e),n=i.pending,i.pending!==i.pending_buf_size));)re(i,255&i.gzhead.extra[i.gzindex]),i.gzindex++;i.gzhead.hcrc&&i.pending>n&&(e.adler=m(e.adler,i.pending_buf,i.pending-n,n)),i.gzindex===i.gzhead.extra.length&&(i.gzindex=0,i.status=K)}else i.status=K;if(i.status===K)if(i.gzhead.name){n=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>n&&(e.adler=m(e.adler,i.pending_buf,i.pending-n,n)),ee(e),n=i.pending,i.pending===i.pending_buf_size)){a=1;break}a=i.gzindex<i.gzhead.name.length?255&i.gzhead.name.charCodeAt(i.gzindex++):0,re(i,a)}while(0!==a);i.gzhead.hcrc&&i.pending>n&&(e.adler=m(e.adler,i.pending_buf,i.pending-n,n)),0===a&&(i.gzindex=0,i.status=V)}else i.status=V;if(i.status===V)if(i.gzhead.comment){n=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>n&&(e.adler=m(e.adler,i.pending_buf,i.pending-n,n)),ee(e),n=i.pending,i.pending===i.pending_buf_size)){a=1;break}a=i.gzindex<i.gzhead.comment.length?255&i.gzhead.comment.charCodeAt(i.gzindex++):0,re(i,a)}while(0!==a);i.gzhead.hcrc&&i.pending>n&&(e.adler=m(e.adler,i.pending_buf,i.pending-n,n)),0===a&&(i.status=q)}else i.status=q;if(i.status===q&&(i.gzhead.hcrc?(i.pending+2>i.pending_buf_size&&ee(e),i.pending+2<=i.pending_buf_size&&(re(i,255&e.adler),re(i,e.adler>>8&255),e.adler=0,i.status=G)):i.status=G),0!==i.pending){if(ee(e),0===e.avail_out)return i.last_flush=-1,v}else if(0===e.avail_in&&Q(t)<=Q(r)&&t!==d)return X(e,T);if(i.status===Y&&0!==e.avail_in)return X(e,T);if(0!==e.avail_in||0!==i.lookahead||t!==h&&i.status!==Y){var l=i.strategy===w?function(e,t){for(var r;;){if(0===e.lookahead&&(ae(e),0===e.lookahead)){if(t===h)return j;break}if(e.match_length=0,r=u._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,r&&(te(e,!1),0===e.strm.avail_out))return j}return e.insert=0,t===d?(te(e,!0),0===e.strm.avail_out?Z:J):e.last_lit&&(te(e,!1),0===e.strm.avail_out)?j:H}(i,t):i.strategy===N?function(e,t){for(var r,i,n,a,s=e.window;;){if(e.lookahead<=D){if(ae(e),e.lookahead<=D&&t===h)return j;if(0===e.lookahead)break}if(e.match_length=0,e.lookahead>=C&&0<e.strstart&&(i=s[n=e.strstart-1])===s[++n]&&i===s[++n]&&i===s[++n]){a=e.strstart+D;do{}while(i===s[++n]&&i===s[++n]&&i===s[++n]&&i===s[++n]&&i===s[++n]&&i===s[++n]&&i===s[++n]&&i===s[++n]&&n<a);e.match_length=D-(a-n),e.match_length>e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=C?(r=u._tr_tally(e,1,e.match_length-C),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(r=u._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),r&&(te(e,!1),0===e.strm.avail_out))return j}return e.insert=0,t===d?(te(e,!0),0===e.strm.avail_out?Z:J):e.last_lit&&(te(e,!1),0===e.strm.avail_out)?j:H}(i,t):o[i.level].func(i,t);if(l!==Z&&l!==J||(i.status=Y),l===j||l===Z)return 0===e.avail_out&&(i.last_flush=-1),v;if(l===H&&(t===c?u._tr_align(i):t!==g&&(u._tr_stored_block(i,0,0,!1),t===f&&($(i.head),0===i.lookahead&&(i.strstart=0,i.block_start=0,i.insert=0))),ee(e),0===e.avail_out))return i.last_flush=-1,v}return t!==d?v:i.wrap<=0?A:(2===i.wrap?(re(i,255&e.adler),re(i,e.adler>>8&255),re(i,e.adler>>16&255),re(i,e.adler>>24&255),re(i,255&e.total_in),re(i,e.total_in>>8&255),re(i,e.total_in>>16&255),re(i,e.total_in>>24&255)):(ie(i,e.adler>>>16),ie(i,65535&e.adler)),ee(e),0<i.wrap&&(i.wrap=-i.wrap),0!==i.pending?v:A)},r.deflateEnd=function(e){var t;return e&&e.state?(t=e.state.status)!==U&&t!==M&&t!==K&&t!==V&&t!==q&&t!==G&&t!==Y?X(e,y):(e.state=null,t===G?X(e,n):v):y},r.deflateSetDictionary=function(e,t){var r,i,n,a,s,l,o,u,h=t.length;if(!e||!e.state)return y;if(2===(a=(r=e.state).wrap)||1===a&&r.status!==U||r.lookahead)return y;for(1===a&&(e.adler=_(e.adler,t,h,0)),r.wrap=0,h>=r.w_size&&(0===a&&($(r.head),r.strstart=0,r.block_start=0,r.insert=0),u=new p.Buf8(r.w_size),p.arraySet(u,t,h-r.w_size,r.w_size,0),t=u,h=r.w_size),s=e.avail_in,l=e.next_in,o=e.input,e.avail_in=h,e.next_in=0,e.input=t,ae(r);r.lookahead>=C;){for(i=r.strstart,n=r.lookahead-(C-1);r.ins_h=(r.ins_h<<r.hash_shift^r.window[i+C-1])&r.hash_mask,r.prev[i&r.w_mask]=r.head[r.ins_h],r.head[r.ins_h]=i,i++,--n;);r.strstart=i,r.lookahead=C-1,ae(r)}return r.strstart+=r.lookahead,r.block_start=r.strstart,r.insert=r.lookahead,r.lookahead=0,r.match_length=r.prev_length=C-1,r.match_available=0,e.next_in=l,e.input=o,e.avail_in=s,r.wrap=a,v},r.deflateInfo="pako deflate (from Nodeca project)"},{"../utils/common":4,"./adler32":6,"./crc32":8,"./messages":14,"./trees":15}],10:[function(e,t,r){"use strict";t.exports=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}},{}],11:[function(e,t,r){"use strict";t.exports=function(e,t){var r,i,n,a,s,l,o,u,h,c,p,_,m,f,d,g,v,A,y,T,b,w,N,S,x;r=e.state,i=e.next_in,S=e.input,n=i+(e.avail_in-5),a=e.next_out,x=e.output,s=a-(t-e.avail_out),l=a+(e.avail_out-257),o=r.dmax,u=r.wsize,h=r.whave,c=r.wnext,p=r.window,_=r.hold,m=r.bits,f=r.lencode,d=r.distcode,g=(1<<r.lenbits)-1,v=(1<<r.distbits)-1;e:do{m<15&&(_+=S[i++]<<m,m+=8,_+=S[i++]<<m,m+=8),A=f[_&g];t:for(;;){if(_>>>=y=A>>>24,m-=y,0===(y=A>>>16&255))x[a++]=65535&A;else{if(!(16&y)){if(0==(64&y)){A=f[(65535&A)+(_&(1<<y)-1)];continue t}if(32&y){r.mode=12;break e}e.msg="invalid literal/length code",r.mode=30;break e}T=65535&A,(y&=15)&&(m<y&&(_+=S[i++]<<m,m+=8),T+=_&(1<<y)-1,_>>>=y,m-=y),m<15&&(_+=S[i++]<<m,m+=8,_+=S[i++]<<m,m+=8),A=d[_&v];r:for(;;){if(_>>>=y=A>>>24,m-=y,!(16&(y=A>>>16&255))){if(0==(64&y)){A=d[(65535&A)+(_&(1<<y)-1)];continue r}e.msg="invalid distance code",r.mode=30;break e}if(b=65535&A,m<(y&=15)&&(_+=S[i++]<<m,(m+=8)<y&&(_+=S[i++]<<m,m+=8)),o<(b+=_&(1<<y)-1)){e.msg="invalid distance too far back",r.mode=30;break e}if(_>>>=y,m-=y,(y=a-s)<b){if(h<(y=b-y)&&r.sane){e.msg="invalid distance too far back",r.mode=30;break e}if(N=p,(w=0)===c){if(w+=u-y,y<T){for(T-=y;x[a++]=p[w++],--y;);w=a-b,N=x}}else if(c<y){if(w+=u+c-y,(y-=c)<T){for(T-=y;x[a++]=p[w++],--y;);if(w=0,c<T){for(T-=y=c;x[a++]=p[w++],--y;);w=a-b,N=x}}}else if(w+=c-y,y<T){for(T-=y;x[a++]=p[w++],--y;);w=a-b,N=x}for(;2<T;)x[a++]=N[w++],x[a++]=N[w++],x[a++]=N[w++],T-=3;T&&(x[a++]=N[w++],1<T&&(x[a++]=N[w++]))}else{for(w=a-b;x[a++]=x[w++],x[a++]=x[w++],x[a++]=x[w++],2<(T-=3););T&&(x[a++]=x[w++],1<T&&(x[a++]=x[w++]))}break}}break}}while(i<n&&a<l);i-=T=m>>3,_&=(1<<(m-=T<<3))-1,e.next_in=i,e.next_out=a,e.avail_in=i<n?n-i+5:5-(i-n),e.avail_out=a<l?l-a+257:257-(a-l),r.hold=_,r.bits=m}},{}],12:[function(e,t,r){"use strict";var I=e("../utils/common"),k=e("./adler32"),B=e("./crc32"),F=e("./inffast"),O=e("./inftrees"),P=0,C=1,D=2,R=4,L=5,U=6,M=0,K=1,V=2,q=-2,G=-3,Y=-4,j=-5,H=8,Z=1,J=2,W=3,X=4,Q=5,$=6,ee=7,te=8,re=9,ie=10,ne=11,ae=12,se=13,le=14,oe=15,ue=16,he=17,ce=18,pe=19,_e=20,me=21,fe=22,de=23,ge=24,ve=25,Ae=26,ye=27,Te=28,be=29,we=30,Ne=31,Se=32,i=852,n=592,a=15;function xe(e){return(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24)}function s(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new I.Buf16(320),this.work=new I.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function l(e){var t;return e&&e.state?(t=e.state,e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=1&t.wrap),t.mode=Z,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new I.Buf32(i),t.distcode=t.distdyn=new I.Buf32(n),t.sane=1,t.back=-1,M):q}function o(e){var t;return e&&e.state?((t=e.state).wsize=0,t.whave=0,t.wnext=0,l(e)):q}function u(e,t){var r,i;return e&&e.state?(i=e.state,t<0?(r=0,t=-t):(r=1+(t>>4),t<48&&(t&=15)),t&&(t<8||15<t)?q:(null!==i.window&&i.wbits!==t&&(i.window=null),i.wrap=r,i.wbits=t,o(e))):q}function h(e,t){var r,i;return e?(i=new s,(e.state=i).window=null,(r=u(e,t))!==M&&(e.state=null),r):q}var c,p,_=!0;function Ee(e){if(_){var t;for(c=new I.Buf32(512),p=new I.Buf32(32),t=0;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(O(C,e.lens,0,288,c,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;O(D,e.lens,0,32,p,0,e.work,{bits:5}),_=!1}e.lencode=c,e.lenbits=9,e.distcode=p,e.distbits=5}function ze(e,t,r,i){var n,a=e.state;return null===a.window&&(a.wsize=1<<a.wbits,a.wnext=0,a.whave=0,a.window=new I.Buf8(a.wsize)),i>=a.wsize?(I.arraySet(a.window,t,r-a.wsize,a.wsize,0),a.wnext=0,a.whave=a.wsize):(i<(n=a.wsize-a.wnext)&&(n=i),I.arraySet(a.window,t,r-i,n,a.wnext),(i-=n)?(I.arraySet(a.window,t,r-i,i,0),a.wnext=i,a.whave=a.wsize):(a.wnext+=n,a.wnext===a.wsize&&(a.wnext=0),a.whave<a.wsize&&(a.whave+=n))),0}r.inflateReset=o,r.inflateReset2=u,r.inflateResetKeep=l,r.inflateInit=function(e){return h(e,a)},r.inflateInit2=h,r.inflate=function(e,t){var r,i,n,a,s,l,o,u,h,c,p,_,m,f,d,g,v,A,y,T,b,w,N,S,x=0,E=new I.Buf8(4),z=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!e||!e.state||!e.output||!e.input&&0!==e.avail_in)return q;(r=e.state).mode===ae&&(r.mode=se),s=e.next_out,n=e.output,o=e.avail_out,a=e.next_in,i=e.input,l=e.avail_in,u=r.hold,h=r.bits,c=l,p=o,w=M;e:for(;;)switch(r.mode){case Z:if(0===r.wrap){r.mode=se;break}for(;h<16;){if(0===l)break e;l--,u+=i[a++]<<h,h+=8}if(2&r.wrap&&35615===u){E[r.check=0]=255&u,E[1]=u>>>8&255,r.check=B(r.check,E,2,0),h=u=0,r.mode=J;break}if(r.flags=0,r.head&&(r.head.done=!1),!(1&r.wrap)||(((255&u)<<8)+(u>>8))%31){e.msg="incorrect header check",r.mode=we;break}if((15&u)!==H){e.msg="unknown compression method",r.mode=we;break}if(h-=4,b=8+(15&(u>>>=4)),0===r.wbits)r.wbits=b;else if(b>r.wbits){e.msg="invalid window size",r.mode=we;break}r.dmax=1<<b,e.adler=r.check=1,r.mode=512&u?ie:ae,h=u=0;break;case J:for(;h<16;){if(0===l)break e;l--,u+=i[a++]<<h,h+=8}if(r.flags=u,(255&r.flags)!==H){e.msg="unknown compression method",r.mode=we;break}if(57344&r.flags){e.msg="unknown header flags set",r.mode=we;break}r.head&&(r.head.text=u>>8&1),512&r.flags&&(E[0]=255&u,E[1]=u>>>8&255,r.check=B(r.check,E,2,0)),h=u=0,r.mode=W;case W:for(;h<32;){if(0===l)break e;l--,u+=i[a++]<<h,h+=8}r.head&&(r.head.time=u),512&r.flags&&(E[0]=255&u,E[1]=u>>>8&255,E[2]=u>>>16&255,E[3]=u>>>24&255,r.check=B(r.check,E,4,0)),h=u=0,r.mode=X;case X:for(;h<16;){if(0===l)break e;l--,u+=i[a++]<<h,h+=8}r.head&&(r.head.xflags=255&u,r.head.os=u>>8),512&r.flags&&(E[0]=255&u,E[1]=u>>>8&255,r.check=B(r.check,E,2,0)),h=u=0,r.mode=Q;case Q:if(1024&r.flags){for(;h<16;){if(0===l)break e;l--,u+=i[a++]<<h,h+=8}r.length=u,r.head&&(r.head.extra_len=u),512&r.flags&&(E[0]=255&u,E[1]=u>>>8&255,r.check=B(r.check,E,2,0)),h=u=0}else r.head&&(r.head.extra=null);r.mode=$;case $:if(1024&r.flags&&(l<(_=r.length)&&(_=l),_&&(r.head&&(b=r.head.extra_len-r.length,r.head.extra||(r.head.extra=new Array(r.head.extra_len)),I.arraySet(r.head.extra,i,a,_,b)),512&r.flags&&(r.check=B(r.check,i,_,a)),l-=_,a+=_,r.length-=_),r.length))break e;r.length=0,r.mode=ee;case ee:if(2048&r.flags){if(0===l)break e;for(_=0;b=i[a+_++],r.head&&b&&r.length<65536&&(r.head.name+=String.fromCharCode(b)),b&&_<l;);if(512&r.flags&&(r.check=B(r.check,i,_,a)),l-=_,a+=_,b)break e}else r.head&&(r.head.name=null);r.length=0,r.mode=te;case te:if(4096&r.flags){if(0===l)break e;for(_=0;b=i[a+_++],r.head&&b&&r.length<65536&&(r.head.comment+=String.fromCharCode(b)),b&&_<l;);if(512&r.flags&&(r.check=B(r.check,i,_,a)),l-=_,a+=_,b)break e}else r.head&&(r.head.comment=null);r.mode=re;case re:if(512&r.flags){for(;h<16;){if(0===l)break e;l--,u+=i[a++]<<h,h+=8}if(u!==(65535&r.check)){e.msg="header crc mismatch",r.mode=we;break}h=u=0}r.head&&(r.head.hcrc=r.flags>>9&1,r.head.done=!0),e.adler=r.check=0,r.mode=ae;break;case ie:for(;h<32;){if(0===l)break e;l--,u+=i[a++]<<h,h+=8}e.adler=r.check=xe(u),h=u=0,r.mode=ne;case ne:if(0===r.havedict)return e.next_out=s,e.avail_out=o,e.next_in=a,e.avail_in=l,r.hold=u,r.bits=h,V;e.adler=r.check=1,r.mode=ae;case ae:if(t===L||t===U)break e;case se:if(r.last){u>>>=7&h,h-=7&h,r.mode=ye;break}for(;h<3;){if(0===l)break e;l--,u+=i[a++]<<h,h+=8}switch(r.last=1&u,h-=1,3&(u>>>=1)){case 0:r.mode=le;break;case 1:if(Ee(r),r.mode=_e,t===U){u>>>=2,h-=2;break e}break;case 2:r.mode=he;break;case 3:e.msg="invalid block type",r.mode=we}u>>>=2,h-=2;break;case le:for(u>>>=7&h,h-=7&h;h<32;){if(0===l)break e;l--,u+=i[a++]<<h,h+=8}if((65535&u)!=(u>>>16^65535)){e.msg="invalid stored block lengths",r.mode=we;break}if(r.length=65535&u,h=u=0,r.mode=oe,t===U)break e;case oe:r.mode=ue;case ue:if(_=r.length){if(l<_&&(_=l),o<_&&(_=o),0===_)break e;I.arraySet(n,i,a,_,s),l-=_,a+=_,o-=_,s+=_,r.length-=_;break}r.mode=ae;break;case he:for(;h<14;){if(0===l)break e;l--,u+=i[a++]<<h,h+=8}if(r.nlen=257+(31&u),u>>>=5,h-=5,r.ndist=1+(31&u),u>>>=5,h-=5,r.ncode=4+(15&u),u>>>=4,h-=4,286<r.nlen||30<r.ndist){e.msg="too many length or distance symbols",r.mode=we;break}r.have=0,r.mode=ce;case ce:for(;r.have<r.ncode;){for(;h<3;){if(0===l)break e;l--,u+=i[a++]<<h,h+=8}r.lens[z[r.have++]]=7&u,u>>>=3,h-=3}for(;r.have<19;)r.lens[z[r.have++]]=0;if(r.lencode=r.lendyn,r.lenbits=7,N={bits:r.lenbits},w=O(P,r.lens,0,19,r.lencode,0,r.work,N),r.lenbits=N.bits,w){e.msg="invalid code lengths set",r.mode=we;break}r.have=0,r.mode=pe;case pe:for(;r.have<r.nlen+r.ndist;){for(;g=(x=r.lencode[u&(1<<r.lenbits)-1])>>>16&255,v=65535&x,!((d=x>>>24)<=h);){if(0===l)break e;l--,u+=i[a++]<<h,h+=8}if(v<16)u>>>=d,h-=d,r.lens[r.have++]=v;else{if(16===v){for(S=d+2;h<S;){if(0===l)break e;l--,u+=i[a++]<<h,h+=8}if(u>>>=d,h-=d,0===r.have){e.msg="invalid bit length repeat",r.mode=we;break}b=r.lens[r.have-1],_=3+(3&u),u>>>=2,h-=2}else if(17===v){for(S=d+3;h<S;){if(0===l)break e;l--,u+=i[a++]<<h,h+=8}h-=d,b=0,_=3+(7&(u>>>=d)),u>>>=3,h-=3}else{for(S=d+7;h<S;){if(0===l)break e;l--,u+=i[a++]<<h,h+=8}h-=d,b=0,_=11+(127&(u>>>=d)),u>>>=7,h-=7}if(r.have+_>r.nlen+r.ndist){e.msg="invalid bit length repeat",r.mode=we;break}for(;_--;)r.lens[r.have++]=b}}if(r.mode===we)break;if(0===r.lens[256]){e.msg="invalid code -- missing end-of-block",r.mode=we;break}if(r.lenbits=9,N={bits:r.lenbits},w=O(C,r.lens,0,r.nlen,r.lencode,0,r.work,N),r.lenbits=N.bits,w){e.msg="invalid literal/lengths set",r.mode=we;break}if(r.distbits=6,r.distcode=r.distdyn,N={bits:r.distbits},w=O(D,r.lens,r.nlen,r.ndist,r.distcode,0,r.work,N),r.distbits=N.bits,w){e.msg="invalid distances set",r.mode=we;break}if(r.mode=_e,t===U)break e;case _e:r.mode=me;case me:if(6<=l&&258<=o){e.next_out=s,e.avail_out=o,e.next_in=a,e.avail_in=l,r.hold=u,r.bits=h,F(e,p),s=e.next_out,n=e.output,o=e.avail_out,a=e.next_in,i=e.input,l=e.avail_in,u=r.hold,h=r.bits,r.mode===ae&&(r.back=-1);break}for(r.back=0;g=(x=r.lencode[u&(1<<r.lenbits)-1])>>>16&255,v=65535&x,!((d=x>>>24)<=h);){if(0===l)break e;l--,u+=i[a++]<<h,h+=8}if(g&&0==(240&g)){for(A=d,y=g,T=v;g=(x=r.lencode[T+((u&(1<<A+y)-1)>>A)])>>>16&255,v=65535&x,!(A+(d=x>>>24)<=h);){if(0===l)break e;l--,u+=i[a++]<<h,h+=8}u>>>=A,h-=A,r.back+=A}if(u>>>=d,h-=d,r.back+=d,r.length=v,0===g){r.mode=Ae;break}if(32&g){r.back=-1,r.mode=ae;break}if(64&g){e.msg="invalid literal/length code",r.mode=we;break}r.extra=15&g,r.mode=fe;case fe:if(r.extra){for(S=r.extra;h<S;){if(0===l)break e;l--,u+=i[a++]<<h,h+=8}r.length+=u&(1<<r.extra)-1,u>>>=r.extra,h-=r.extra,r.back+=r.extra}r.was=r.length,r.mode=de;case de:for(;g=(x=r.distcode[u&(1<<r.distbits)-1])>>>16&255,v=65535&x,!((d=x>>>24)<=h);){if(0===l)break e;l--,u+=i[a++]<<h,h+=8}if(0==(240&g)){for(A=d,y=g,T=v;g=(x=r.distcode[T+((u&(1<<A+y)-1)>>A)])>>>16&255,v=65535&x,!(A+(d=x>>>24)<=h);){if(0===l)break e;l--,u+=i[a++]<<h,h+=8}u>>>=A,h-=A,r.back+=A}if(u>>>=d,h-=d,r.back+=d,64&g){e.msg="invalid distance code",r.mode=we;break}r.offset=v,r.extra=15&g,r.mode=ge;case ge:if(r.extra){for(S=r.extra;h<S;){if(0===l)break e;l--,u+=i[a++]<<h,h+=8}r.offset+=u&(1<<r.extra)-1,u>>>=r.extra,h-=r.extra,r.back+=r.extra}if(r.offset>r.dmax){e.msg="invalid distance too far back",r.mode=we;break}r.mode=ve;case ve:if(0===o)break e;if(_=p-o,r.offset>_){if((_=r.offset-_)>r.whave&&r.sane){e.msg="invalid distance too far back",r.mode=we;break}_>r.wnext?(_-=r.wnext,m=r.wsize-_):m=r.wnext-_,_>r.length&&(_=r.length),f=r.window}else f=n,m=s-r.offset,_=r.length;for(o<_&&(_=o),o-=_,r.length-=_;n[s++]=f[m++],--_;);0===r.length&&(r.mode=me);break;case Ae:if(0===o)break e;n[s++]=r.length,o--,r.mode=me;break;case ye:if(r.wrap){for(;h<32;){if(0===l)break e;l--,u|=i[a++]<<h,h+=8}if(p-=o,e.total_out+=p,r.total+=p,p&&(e.adler=r.check=r.flags?B(r.check,n,p,s-p):k(r.check,n,p,s-p)),p=o,(r.flags?u:xe(u))!==r.check){e.msg="incorrect data check",r.mode=we;break}h=u=0}r.mode=Te;case Te:if(r.wrap&&r.flags){for(;h<32;){if(0===l)break e;l--,u+=i[a++]<<h,h+=8}if(u!==(4294967295&r.total)){e.msg="incorrect length check",r.mode=we;break}h=u=0}r.mode=be;case be:w=K;break e;case we:w=G;break e;case Ne:return Y;case Se:default:return q}return e.next_out=s,e.avail_out=o,e.next_in=a,e.avail_in=l,r.hold=u,r.bits=h,(r.wsize||p!==e.avail_out&&r.mode<we&&(r.mode<ye||t!==R))&&ze(e,e.output,e.next_out,p-e.avail_out)?(r.mode=Ne,Y):(c-=e.avail_in,p-=e.avail_out,e.total_in+=c,e.total_out+=p,r.total+=p,r.wrap&&p&&(e.adler=r.check=r.flags?B(r.check,n,p,e.next_out-p):k(r.check,n,p,e.next_out-p)),e.data_type=r.bits+(r.last?64:0)+(r.mode===ae?128:0)+(r.mode===_e||r.mode===oe?256:0),(0===c&&0===p||t===R)&&w===M&&(w=j),w)},r.inflateEnd=function(e){if(!e||!e.state)return q;var t=e.state;return t.window&&(t.window=null),e.state=null,M},r.inflateGetHeader=function(e,t){var r;return e&&e.state?0==(2&(r=e.state).wrap)?q:((r.head=t).done=!1,M):q},r.inflateSetDictionary=function(e,t){var r,i=t.length;return e&&e.state?0!==(r=e.state).wrap&&r.mode!==ne?q:r.mode===ne&&k(1,t,i,0)!==r.check?G:ze(e,t,i,i)?(r.mode=Ne,Y):(r.havedict=1,M):q},r.inflateInfo="pako inflate (from Nodeca project)"},{"../utils/common":4,"./adler32":6,"./crc32":8,"./inffast":11,"./inftrees":13}],13:[function(e,t,r){"use strict";var P=e("../utils/common"),C=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],D=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],R=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],L=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];t.exports=function(e,t,r,i,n,a,s,l){var o,u,h,c,p,_,m,f,d,g=l.bits,v=0,A=0,y=0,T=0,b=0,w=0,N=0,S=0,x=0,E=0,z=null,I=0,k=new P.Buf16(16),B=new P.Buf16(16),F=null,O=0;for(v=0;v<=15;v++)k[v]=0;for(A=0;A<i;A++)k[t[r+A]]++;for(b=g,T=15;1<=T&&0===k[T];T--);if(T<b&&(b=T),0===T)return n[a++]=20971520,n[a++]=20971520,l.bits=1,0;for(y=1;y<T&&0===k[y];y++);for(b<y&&(b=y),v=S=1;v<=15;v++)if(S<<=1,(S-=k[v])<0)return-1;if(0<S&&(0===e||1!==T))return-1;for(B[1]=0,v=1;v<15;v++)B[v+1]=B[v]+k[v];for(A=0;A<i;A++)0!==t[r+A]&&(s[B[t[r+A]]++]=A);if(0===e?(z=F=s,_=19):1===e?(z=C,I-=257,F=D,O-=257,_=256):(z=R,F=L,_=-1),v=y,p=a,N=A=E=0,h=-1,c=(x=1<<(w=b))-1,1===e&&852<x||2===e&&592<x)return 1;for(;;){for(m=v-N,s[A]<_?(f=0,d=s[A]):s[A]>_?(f=F[O+s[A]],d=z[I+s[A]]):(f=96,d=0),o=1<<v-N,y=u=1<<w;n[p+(E>>N)+(u-=o)]=m<<24|f<<16|d|0,0!==u;);for(o=1<<v-1;E&o;)o>>=1;if(0!==o?(E&=o-1,E+=o):E=0,A++,0==--k[v]){if(v===T)break;v=t[r+s[A]]}if(b<v&&(E&c)!==h){for(0===N&&(N=b),p+=y,S=1<<(w=v-N);w+N<T&&!((S-=k[w+N])<=0);)w++,S<<=1;if(x+=1<<w,1===e&&852<x||2===e&&592<x)return 1;n[h=E&c]=b<<24|w<<16|p-a|0}}return 0!==E&&(n[p+E]=v-N<<24|64<<16|0),l.bits=b,0}},{"../utils/common":4}],14:[function(e,t,r){"use strict";t.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},{}],15:[function(e,t,r){"use strict";var o=e("../utils/common"),l=4,u=0,h=1,c=2;function i(e){for(var t=e.length;0<=--t;)e[t]=0}var p=0,_=1,m=2,s=29,f=256,d=f+1+s,g=30,v=19,A=2*d+1,y=15,n=16,T=7,b=256,w=16,N=17,S=18,x=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],E=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],z=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],I=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],k=new Array(2*(d+2));i(k);var B=new Array(2*g);i(B);var F=new Array(512);i(F);var O=new Array(256);i(O);var P=new Array(s);i(P);var C,D,R,L=new Array(g);function U(e,t,r,i,n){this.static_tree=e,this.extra_bits=t,this.extra_base=r,this.elems=i,this.max_length=n,this.has_stree=e&&e.length}function a(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}function M(e){return e<256?F[e]:F[256+(e>>>7)]}function K(e,t){e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255}function V(e,t,r){e.bi_valid>n-r?(e.bi_buf|=t<<e.bi_valid&65535,K(e,e.bi_buf),e.bi_buf=t>>n-e.bi_valid,e.bi_valid+=r-n):(e.bi_buf|=t<<e.bi_valid&65535,e.bi_valid+=r)}function q(e,t,r){V(e,r[2*t],r[2*t+1])}function G(e,t){for(var r=0;r|=1&e,e>>>=1,r<<=1,0<--t;);return r>>>1}function Y(e,t,r){var i,n,a=new Array(y+1),s=0;for(i=1;i<=y;i++)a[i]=s=s+r[i-1]<<1;for(n=0;n<=t;n++){var l=e[2*n+1];0!==l&&(e[2*n]=G(a[l]++,l))}}function j(e){var t;for(t=0;t<d;t++)e.dyn_ltree[2*t]=0;for(t=0;t<g;t++)e.dyn_dtree[2*t]=0;for(t=0;t<v;t++)e.bl_tree[2*t]=0;e.dyn_ltree[2*b]=1,e.opt_len=e.static_len=0,e.last_lit=e.matches=0}function H(e){8<e.bi_valid?K(e,e.bi_buf):0<e.bi_valid&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0}function Z(e,t,r,i){var n=2*t,a=2*r;return e[n]<e[a]||e[n]===e[a]&&i[t]<=i[r]}function J(e,t,r){for(var i=e.heap[r],n=r<<1;n<=e.heap_len&&(n<e.heap_len&&Z(t,e.heap[n+1],e.heap[n],e.depth)&&n++,!Z(t,i,e.heap[n],e.depth));)e.heap[r]=e.heap[n],r=n,n<<=1;e.heap[r]=i}function W(e,t,r){var i,n,a,s,l=0;if(0!==e.last_lit)for(;i=e.pending_buf[e.d_buf+2*l]<<8|e.pending_buf[e.d_buf+2*l+1],n=e.pending_buf[e.l_buf+l],l++,0===i?q(e,n,t):(q(e,(a=O[n])+f+1,t),0!==(s=x[a])&&V(e,n-=P[a],s),q(e,a=M(--i),r),0!==(s=E[a])&&V(e,i-=L[a],s)),l<e.last_lit;);q(e,b,t)}function X(e,t){var r,i,n,a=t.dyn_tree,s=t.stat_desc.static_tree,l=t.stat_desc.has_stree,o=t.stat_desc.elems,u=-1;for(e.heap_len=0,e.heap_max=A,r=0;r<o;r++)0!==a[2*r]?(e.heap[++e.heap_len]=u=r,e.depth[r]=0):a[2*r+1]=0;for(;e.heap_len<2;)a[2*(n=e.heap[++e.heap_len]=u<2?++u:0)]=1,e.depth[n]=0,e.opt_len--,l&&(e.static_len-=s[2*n+1]);for(t.max_code=u,r=e.heap_len>>1;1<=r;r--)J(e,a,r);for(n=o;r=e.heap[1],e.heap[1]=e.heap[e.heap_len--],J(e,a,1),i=e.heap[1],e.heap[--e.heap_max]=r,e.heap[--e.heap_max]=i,a[2*n]=a[2*r]+a[2*i],e.depth[n]=(e.depth[r]>=e.depth[i]?e.depth[r]:e.depth[i])+1,a[2*r+1]=a[2*i+1]=n,e.heap[1]=n++,J(e,a,1),2<=e.heap_len;);e.heap[--e.heap_max]=e.heap[1],function(e,t){var r,i,n,a,s,l,o=t.dyn_tree,u=t.max_code,h=t.stat_desc.static_tree,c=t.stat_desc.has_stree,p=t.stat_desc.extra_bits,_=t.stat_desc.extra_base,m=t.stat_desc.max_length,f=0;for(a=0;a<=y;a++)e.bl_count[a]=0;for(o[2*e.heap[e.heap_max]+1]=0,r=e.heap_max+1;r<A;r++)m<(a=o[2*o[2*(i=e.heap[r])+1]+1]+1)&&(a=m,f++),o[2*i+1]=a,u<i||(e.bl_count[a]++,s=0,_<=i&&(s=p[i-_]),l=o[2*i],e.opt_len+=l*(a+s),c&&(e.static_len+=l*(h[2*i+1]+s)));if(0!==f){do{for(a=m-1;0===e.bl_count[a];)a--;e.bl_count[a]--,e.bl_count[a+1]+=2,e.bl_count[m]--,f-=2}while(0<f);for(a=m;0!==a;a--)for(i=e.bl_count[a];0!==i;)u<(n=e.heap[--r])||(o[2*n+1]!==a&&(e.opt_len+=(a-o[2*n+1])*o[2*n],o[2*n+1]=a),i--)}}(e,t),Y(a,u,e.bl_count)}function Q(e,t,r){var i,n,a=-1,s=t[1],l=0,o=7,u=4;for(0===s&&(o=138,u=3),t[2*(r+1)+1]=65535,i=0;i<=r;i++)n=s,s=t[2*(i+1)+1],++l<o&&n===s||(l<u?e.bl_tree[2*n]+=l:0!==n?(n!==a&&e.bl_tree[2*n]++,e.bl_tree[2*w]++):l<=10?e.bl_tree[2*N]++:e.bl_tree[2*S]++,a=n,(l=0)===s?(o=138,u=3):n===s?(o=6,u=3):(o=7,u=4))}function $(e,t,r){var i,n,a=-1,s=t[1],l=0,o=7,u=4;for(0===s&&(o=138,u=3),i=0;i<=r;i++)if(n=s,s=t[2*(i+1)+1],!(++l<o&&n===s)){if(l<u)for(;q(e,n,e.bl_tree),0!=--l;);else 0!==n?(n!==a&&(q(e,n,e.bl_tree),l--),q(e,w,e.bl_tree),V(e,l-3,2)):l<=10?(q(e,N,e.bl_tree),V(e,l-3,3)):(q(e,S,e.bl_tree),V(e,l-11,7));a=n,(l=0)===s?(o=138,u=3):n===s?(o=6,u=3):(o=7,u=4)}}i(L);var ee=!1;function te(e,t,r,i){var n,a,s,l;V(e,(p<<1)+(i?1:0),3),a=t,s=r,l=!0,H(n=e),l&&(K(n,s),K(n,~s)),o.arraySet(n.pending_buf,n.window,a,s,n.pending),n.pending+=s}r._tr_init=function(e){ee||(function(){var e,t,r,i,n,a=new Array(y+1);for(i=r=0;i<s-1;i++)for(P[i]=r,e=0;e<1<<x[i];e++)O[r++]=i;for(O[r-1]=i,i=n=0;i<16;i++)for(L[i]=n,e=0;e<1<<E[i];e++)F[n++]=i;for(n>>=7;i<g;i++)for(L[i]=n<<7,e=0;e<1<<E[i]-7;e++)F[256+n++]=i;for(t=0;t<=y;t++)a[t]=0;for(e=0;e<=143;)k[2*e+1]=8,e++,a[8]++;for(;e<=255;)k[2*e+1]=9,e++,a[9]++;for(;e<=279;)k[2*e+1]=7,e++,a[7]++;for(;e<=287;)k[2*e+1]=8,e++,a[8]++;for(Y(k,d+1,a),e=0;e<g;e++)B[2*e+1]=5,B[2*e]=G(e,5);C=new U(k,x,f+1,d,y),D=new U(B,E,0,g,y),R=new U(new Array(0),z,0,v,T)}(),ee=!0),e.l_desc=new a(e.dyn_ltree,C),e.d_desc=new a(e.dyn_dtree,D),e.bl_desc=new a(e.bl_tree,R),e.bi_buf=0,e.bi_valid=0,j(e)},r._tr_stored_block=te,r._tr_flush_block=function(e,t,r,i){var n,a,s=0;0<e.level?(e.strm.data_type===c&&(e.strm.data_type=function(e){var t,r=4093624447;for(t=0;t<=31;t++,r>>>=1)if(1&r&&0!==e.dyn_ltree[2*t])return u;if(0!==e.dyn_ltree[18]||0!==e.dyn_ltree[20]||0!==e.dyn_ltree[26])return h;for(t=32;t<f;t++)if(0!==e.dyn_ltree[2*t])return h;return u}(e)),X(e,e.l_desc),X(e,e.d_desc),s=function(e){var t;for(Q(e,e.dyn_ltree,e.l_desc.max_code),Q(e,e.dyn_dtree,e.d_desc.max_code),X(e,e.bl_desc),t=v-1;3<=t&&0===e.bl_tree[2*I[t]+1];t--);return e.opt_len+=3*(t+1)+5+5+4,t}(e),n=e.opt_len+3+7>>>3,(a=e.static_len+3+7>>>3)<=n&&(n=a)):n=a=r+5,r+4<=n&&-1!==t?te(e,t,r,i):e.strategy===l||a===n?(V(e,(_<<1)+(i?1:0),3),W(e,k,B)):(V(e,(m<<1)+(i?1:0),3),function(e,t,r,i){var n;for(V(e,t-257,5),V(e,r-1,5),V(e,i-4,4),n=0;n<i;n++)V(e,e.bl_tree[2*I[n]+1],3);$(e,e.dyn_ltree,t-1),$(e,e.dyn_dtree,r-1)}(e,e.l_desc.max_code+1,e.d_desc.max_code+1,s+1),W(e,e.dyn_ltree,e.dyn_dtree)),j(e),i&&H(e)},r._tr_tally=function(e,t,r){return e.pending_buf[e.d_buf+2*e.last_lit]=t>>>8&255,e.pending_buf[e.d_buf+2*e.last_lit+1]=255&t,e.pending_buf[e.l_buf+e.last_lit]=255&r,e.last_lit++,0===t?e.dyn_ltree[2*r]++:(e.matches++,t--,e.dyn_ltree[2*(O[r]+f+1)]++,e.dyn_dtree[2*M(t)]++),e.last_lit===e.lit_bufsize-1},r._tr_align=function(e){var t;V(e,_<<1,3),q(e,b,k),16===(t=e).bi_valid?(K(t,t.bi_buf),t.bi_buf=0,t.bi_valid=0):8<=t.bi_valid&&(t.pending_buf[t.pending++]=255&t.bi_buf,t.bi_buf>>=8,t.bi_valid-=8)}},{"../utils/common":4}],16:[function(e,t,r){"use strict";t.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},{}],17:[function(br,e,t){(function(e){(function(){!function(e,i){"use strict";var t,r={},n=function(){return or.__string_rec(this,"")},z=z||{};function a(e,t){var r=Object.create(e);for(var i in t)r[i]=t[i];return t.toString!==Object.prototype.toString&&(r.toString=t.toString),r}var I=e.Apptimize=function(){};(r["apptimize.Apptimize"]=I).__name__="apptimize.Apptimize",I._isInitialized=function(){return g._isInitialized()},I.setCustomerUserId=e.setCustomerUserId=function(e){(!it.isNullOrString(e)||null!=e&&""==j.ltrim(e))&&(d.w("The `customerUserID` argument cannot be set to a non-string value, be empty or be whitespace only, setting to null instead.",{fileName:"src/apptimize/Apptimize.hx",lineNumber:71,className:"apptimize.Apptimize",methodName:"setCustomerUserId"}),e=null);var t=I.getCustomerUserId();if(null==t||t!=e)if(null!=t||null!=e){var r=I.getApptimizeAnonUserId(),i=new le(t,r,Ge.loadObject(Ge.kCustomPropertiesKey),C.getAppKey(),je.sharedInstance(),We.sharedInstance()),n=new le(e,r,null,C.getAppKey(),je.sharedInstance(),We.sharedInstance()),a=C.sharedInstance();I._isInitialized()&&a.dispatchUnenrollmentsForUserChanged(i),Ge.saveString(Ge.kUserIDKey,e),I.setMixpanelCohortId(e),I.setCustomAttributes(null);var s=C.sharedInstance().getMetaData(C.getAppKey());null!=s&&s.clearAlterationCache(),I._isInitialized()&&(a.logUserTransition(i,n),a.dispatchEnrollmentsForUserChanged(n)),d.v("Customer User ID set to: "+e,{fileName:"src/apptimize/Apptimize.hx",lineNumber:115,className:"apptimize.Apptimize",methodName:"setCustomerUserId"})}else d.w("Ignoring redundant setCustomerUserId(null)",{fileName:"src/apptimize/Apptimize.hx",lineNumber:83,className:"apptimize.Apptimize",methodName:"setCustomerUserId"});else d.w("Not setting customerUserId if ID already set.",{fileName:"src/apptimize/Apptimize.hx",lineNumber:79,className:"apptimize.Apptimize",methodName:"setCustomerUserId"})},I.setMixpanelCohortId=function(e){var t;t=null==e?null:"i_"+e,We.sharedInstance().setPropertyForNamespace("_cohort_id",t,Ze.Mixpanel)},I.getCustomerUserId=e.getCustomerUserId=function(){var e=Ge.loadString(Ge.kUserIDKey);return(!it.isNullOrString(e)||null!=e&&""==j.ltrim(e))&&(d.w("Invalid CustomerUserId saved. Resetting to null.",{fileName:"src/apptimize/Apptimize.hx",lineNumber:142,className:"apptimize.Apptimize",methodName:"getCustomerUserId"}),e=null),e},I.getApptimizeAnonUserId=e.getApptimizeAnonUserId=function(){return I._getApptimizeAnonUserId()},I.setCustomAttributes=e.setCustomAttributes=function(e){var t=lt.nativeObjectToStringMap(e);Ge.saveStringMap(Ge.kCustomPropertiesKey,t);var r=Ge.loadStringMap(Ge.kCustomPropertiesKey);d.v("Custom Attributes:\n"+(null==r?"null":D.stringify(r.h)),{fileName:"src/apptimize/Apptimize.hx",lineNumber:174,className:"apptimize.Apptimize",methodName:"setCustomAttributes"}),C.sharedInstance().onEnvPropsChanged(C.getAppKey())},I.getCustomAttributes=e.getCustomAttributes=function(){return lt.stringMapToNativeDictionary(Ge.loadStringMap(Ge.kCustomPropertiesKey))},I.setPilotTargetingId=e.setPilotTargetingId=function(e){it.isNullOrString(e)?(We.sharedInstance().setPropertyForNamespace("pilot_targeting_id",e,Ze.ApptimizeLocal),C.sharedInstance().onEnvPropsChanged(C.getAppKey())):d.e("Invalid PilotTargetingId. Id not set. Please use a valid string.",{fileName:"src/apptimize/Apptimize.hx",lineNumber:206,className:"apptimize.Apptimize",methodName:"setPilotTargetingId"})},I.getPilotTargetingId=e.getPilotTargetingId=function(){return We.sharedInstance().valueForNamespacedProperty("pilot_targeting_id",Ze.ApptimizeLocal)},I.setOnEnrolledInExperimentCallback=e.setOnEnrolledInExperimentCallback=function(e){H.setOnEnrolledInExperimentCallback(e),d.v("OnEnrolledInExperimentCallback set!",{fileName:"src/apptimize/Apptimize.hx",lineNumber:233,className:"apptimize.Apptimize",methodName:"setOnEnrolledInExperimentCallback"})},I.setOnUnenrolledInExperimentCallback=e.setOnUnenrolledInExperimentCallback=function(e){H.setOnUnenrolledInExperimentCallback(e),d.v("OnUnenrolledInExperimentCallback set!",{fileName:"src/apptimize/Apptimize.hx",lineNumber:244,className:"apptimize.Apptimize",methodName:"setOnUnenrolledInExperimentCallback"})},I._getApptimizeAnonUserId=function(){var e=Ge.loadString(Ge.kAnonymousGuidKey);return null!=e&&""!=e&&q.isValidGuid(e)||(e=q.generateUserGuid(),Ge.saveString(Ge.kAnonymousGuidKey,e)),e},I.setAppVersion=e.setAppVersion=function(e){je.sharedInstance().setProperty("app_version",e);var t=je.sharedInstance().valueForProperty("app_version");d.v("App Version set to: "+t,{fileName:"src/apptimize/Apptimize.hx",lineNumber:267,className:"apptimize.Apptimize",methodName:"setAppVersion"})},I.setAppName=e.setAppName=function(e){je.sharedInstance().setProperty("app_name",e);var t=je.sharedInstance().valueForProperty("app_name");d.v("App Name set to: "+t,{fileName:"src/apptimize/Apptimize.hx",lineNumber:278,className:"apptimize.Apptimize",methodName:"setAppName"})},I.setOnParticipationCallback=e.setOnParticipationCallback=function(e){H.setOnParticipationCallback(e),d.w("setOnParticipationCallback is deprecated - please use setOnParticipatedInExperimentCallback.",{fileName:"src/apptimize/Apptimize.hx",lineNumber:299,className:"apptimize.Apptimize",methodName:"setOnParticipationCallback"})},I.setOnMetadataUpdatedCallback=e.setOnMetadataUpdatedCallback=function(e){H.setOnMetadataUpdatedCallback(e),d.v("OnMetadataProcessedCallback set!",{fileName:"src/apptimize/Apptimize.hx",lineNumber:318,className:"apptimize.Apptimize",methodName:"setOnMetadataUpdatedCallback"})},I.setOnApptimizeInitializedCallback=e.setOnApptimizeInitializedCallback=function(e){H.setOnApptimizeInitializedCallback(e),d.v("OnApptimizeInitializedCallback set!",{fileName:"src/apptimize/Apptimize.hx",lineNumber:339,className:"apptimize.Apptimize",methodName:"setOnApptimizeInitializedCallback"})},I.setOnParticipatedInExperimentCallback=e.setOnParticipatedInExperimentCallback=function(e){H.setOnParticipatedInExperimentCallback(e),d.v("OnParticipatedInExperimentCallback set!",{fileName:"src/apptimize/Apptimize.hx",lineNumber:357,className:"apptimize.Apptimize",methodName:"setOnParticipatedInExperimentCallback"})},I.setup=e.setup=function(e,t){null!=e&&""!=e?null==C.getAppKey()||C.getAppKey()!=e?g._setup(e,t,function(){null!=C.getAppKey()&&C.getAppKey()!=e&&C.clear(),d.v("Set Anonymous User ID: "+I._getApptimizeAnonUserId(),{fileName:"src/apptimize/Apptimize.hx",lineNumber:427,className:"apptimize.Apptimize",methodName:"setup"}),d.i("Apptimize "+I.getApptimizeSDKPlatform()+" SDK initialized.\nApptimize SDK Version: "+I.getApptimizeSDKVersion(),{fileName:"src/apptimize/Apptimize.hx",lineNumber:428,className:"apptimize.Apptimize",methodName:"setup"}),I._initialize(e)}):d.w('Apptimize is already initialized with app key: "'+e+'".',{fileName:"src/apptimize/Apptimize.hx",lineNumber:416,className:"apptimize.Apptimize",methodName:"setup"}):d.c("Unable to initialize Apptimize due to missing app key.",{fileName:"src/apptimize/Apptimize.hx",lineNumber:413,className:"apptimize.Apptimize",methodName:"setup"})},I.updateApptimizeMetadataOnce=e.updateApptimizeMetadataOnce=function(){try{C.checkForUpdatedMetaData(!0)}catch(e){gt.lastError=e;var t=ct.caught(e).unwrap();d.e("Failed to update Metadata: "+O.string(t),{fileName:"src/apptimize/Apptimize.hx",lineNumber:460,className:"apptimize.Apptimize",methodName:"updateApptimizeMetadataOnce"})}},I.flushTracking=e.flushTracking=function(){I._isInitialized()?C.sharedInstance().flushTracking():d.w("Tracking can only be flushed after setup().",{fileName:"src/apptimize/Apptimize.hx",lineNumber:475,className:"apptimize.Apptimize",methodName:"flushTracking"})},I.getApptimizeSDKVersion=e.getApptimizeSDKVersion=function(){return"1.2.44"},I.getApptimizeSDKPlatform=e.getApptimizeSDKPlatform=function(){return"JavaScript"},I._initialize=function(e){C.sharedInstance().loadMetaData(e),g.setState(2),C.sharedInstance().hasMetadata(C.getAppKey())&&0==He.sharedInstance().valueForProperty(He.REFRESH_META_DATA_ON_SETUP)&&g._trySetReady()&&(H.dispatchOnApptimizeInitialized(),d.i('Apptimize initialized with app key "'+e+'".',{fileName:"src/apptimize/Apptimize.hx",lineNumber:532,className:"apptimize.Apptimize",methodName:"_initialize"}))},I._getAlterations=function(e,t){if(C._checkForUpdatedMetadataIfNecessary(),I._isInitialized()){var r=new le(e,I._getApptimizeAnonUserId(),t,C.getAppKey(),je.sharedInstance(),We.sharedInstance());return g._getAlterations(r)}return[]},I._getCodeBlockMethod=function(e,t,r){C._checkForUpdatedMetadataIfNecessary();var i=new le(t,I._getApptimizeAnonUserId(),r,C.getAppKey(),je.sharedInstance(),We.sharedInstance());return g._getCodeBlockMethod(i,e)},I.runCodeBlock=e.runCodeBlock=function(e,t,r,i){null!=r?(d.w("The `userID` argument is deprecated. Please use the `setCustomerUserId()` method instead.",{fileName:"src/apptimize/macros/ABTClientMacro.hx",lineNumber:19,className:"apptimize.Apptimize",methodName:"runCodeBlock"}),it.isString(r)&&""!=j.ltrim(r)||(d.w("The `userID` argument cannot be set to a non-string value, be empty or be whitespace only, setting to null instead.",{fileName:"src/apptimize/macros/ABTClientMacro.hx",lineNumber:21,className:"apptimize.Apptimize",methodName:"runCodeBlock"}),r=null)):r=I.getCustomerUserId(),null!=i&&d.w("The `customAttributes` argument is deprecated. Please use the `setCustomAttributes()` method instead.",{fileName:"src/apptimize/macros/ABTClientMacro.hx",lineNumber:31,className:"apptimize.Apptimize",methodName:"runCodeBlock"}),null==i&&(i=I.getCustomAttributes());var n=lt.nativeObjectToStringMap(i),a=I._getCodeBlockMethod(e,r,n),s=lt.nativeObjectToStringMap(t);if(null!=a&&""!=a)if(null==t||null==s.h[a]){var l=F.getProperty(t,a);null!=l?l.apply(t,[]):d.w("Supplied callbacks do not include method: "+a,{fileName:"src/apptimize/Apptimize.hx",lineNumber:635,className:"apptimize.Apptimize",methodName:"runCodeBlock"})}else{d.v("Calling callback method: "+a,{fileName:"src/apptimize/Apptimize.hx",lineNumber:638,className:"apptimize.Apptimize",methodName:"runCodeBlock"});var o=s.h[a];if(!F.isFunction(o))return void d.e("runCodeBlock() called with callback that isn't a function/method.",{fileName:"src/apptimize/Apptimize.hx",lineNumber:642,className:"apptimize.Apptimize",methodName:"runCodeBlock"});o()}else d.w("No Code Block with variable name "+e+" found, skipping callback.",{fileName:"src/apptimize/Apptimize.hx",lineNumber:627,className:"apptimize.Apptimize",methodName:"runCodeBlock"})},I.isFeatureFlagEnabled=e.isFeatureFlagEnabled=function(e,t,r){return I.getBool(e,!1,t,r)},I.getString=e.getString=function(e,t,r,i){var n=I._getValue(e,r,c.String,null,i);return null==n?t:n},I.getBool=e.getBool=function(e,t,r,i){var n=I._getValue(e,r,c.Boolean,null,i);return null==n?t:n},I.getInt=e.getInt=function(e,t,r,i){var n=I._getValue(e,r,c.Integer,null,i);return null==n?t:n},I.getDouble=e.getDouble=function(e,t,r,i){var n=I._getValue(e,r,c.Double,null,i);return null==n?t:n},I.getStringArray=e.getStringArray=function(e,t,r,i){var n=I._getValue(e,r,c.Array,c.String,i);return null==n?t:st.toNativeArray(n,at.String)},I.getBoolArray=e.getBoolArray=function(e,t,r,i){var n=I._getValue(e,r,c.Array,c.Boolean,i);return null==n?t:st.toNativeArray(n,at.Bool)},I.getIntArray=e.getIntArray=function(e,t,r,i){var n=I._getValue(e,r,c.Array,c.Integer,i);return null==n?t:st.toNativeArray(n,at.Int)},I.getDoubleArray=e.getDoubleArray=function(e,t,r,i){var n=I._getValue(e,r,c.Array,c.Double,i);return null==n?t:st.toNativeArray(n,at.Double)},I.getStringDictionary=e.getStringDictionary=function(e,t,r,i){var n=I._getValue(e,r,c.Dictionary,c.String,i);return null==n?t:n},I.getBoolDictionary=e.getBoolDictionary=function(e,t,r,i){var n=I._getValue(e,r,c.Dictionary,c.Boolean,i);return null==n?t:n},I.getIntDictionary=e.getIntDictionary=function(e,t,r,i){var n=I._getValue(e,r,c.Dictionary,c.Integer,i);return null==n?t:n},I.getDoubleDictionary=e.getDoubleDictionary=function(e,t,r,i){var n=I._getValue(e,r,c.Dictionary,c.Double,i);return null==n?t:n},I._getValue=function(e,t,r,i,n){if(!I._isInitialized())return null;null!=t?(d.w("The `userID` argument is deprecated. Please use the `setCustomerUserId()` method instead.",{fileName:"src/apptimize/macros/ABTClientMacro.hx",lineNumber:19,className:"apptimize.Apptimize",methodName:"_getValue"}),it.isString(t)&&""!=j.ltrim(t)||(d.w("The `userID` argument cannot be set to a non-string value, be empty or be whitespace only, setting to null instead.",{fileName:"src/apptimize/macros/ABTClientMacro.hx",lineNumber:21,className:"apptimize.Apptimize",methodName:"_getValue"}),t=null)):t=I.getCustomerUserId(),null!=n&&d.w("The `customAttributes` argument is deprecated. Please use the `setCustomAttributes()` method instead.",{fileName:"src/apptimize/macros/ABTClientMacro.hx",lineNumber:31,className:"apptimize.Apptimize",methodName:"_getValue"}),null==n&&(n=I.getCustomAttributes());var a=lt.nativeObjectToStringMap(n),s=new le(t,I._getApptimizeAnonUserId(),a,C.getAppKey(),je.sharedInstance(),We.sharedInstance());return m.getValue(s,e,r,i)},I.getVariantInfo=e.getVariantInfo=function(e,t){null!=e?(d.w("The `userID` argument is deprecated. Please use the `setCustomerUserId()` method instead.",{fileName:"src/apptimize/macros/ABTClientMacro.hx",lineNumber:19,className:"apptimize.Apptimize",methodName:"getVariantInfo"}),it.isString(e)&&""!=j.ltrim(e)||(d.w("The `userID` argument cannot be set to a non-string value, be empty or be whitespace only, setting to null instead.",{fileName:"src/apptimize/macros/ABTClientMacro.hx",lineNumber:21,className:"apptimize.Apptimize",methodName:"getVariantInfo"}),e=null)):e=I.getCustomerUserId(),null!=t&&d.w("The `customAttributes` argument is deprecated. Please use the `setCustomAttributes()` method instead.",{fileName:"src/apptimize/macros/ABTClientMacro.hx",lineNumber:31,className:"apptimize.Apptimize",methodName:"getVariantInfo"}),null==t&&(t=I.getCustomAttributes());for(var r=[],i=I._getApptimizeAnonUserId(),n=lt.nativeObjectToStringMap(t),a=new le(e,i,n,C.getAppKey(),je.sharedInstance(),We.sharedInstance()),s=0,l=g._getVariants(a,!1);s<l.length;){var o=l[s];++s,r.push(k.initWithVariant(o,e,i))}return st.toNativeArray(r,at.VariantInfo)},I.getWinnerVariantInfo=e.getWinnerVariantInfo=function(){return g.getWinnerVariantInfo(I.getCustomerUserId(),I._getApptimizeAnonUserId(),I.getCustomAttributes())},I._getVariantInfoForAlteration=function(e,t,r){for(var i=I._getApptimizeAnonUserId(),n=0,a=I._getAlterations(t,r);n<a.length;){var s=a[n];if(++n,s.getKey()==e)return k.initWithVariant(s.getVariant(),t,i)}return null},I._getVariantInfoForDynamicVariable=function(e,t,r){null!=t?(d.w("The `userID` argument is deprecated. Please use the `setCustomerUserId()` method instead.",{fileName:"src/apptimize/macros/ABTClientMacro.hx",lineNumber:19,className:"apptimize.Apptimize",methodName:"_getVariantInfoForDynamicVariable"}),it.isString(t)&&""!=j.ltrim(t)||(d.w("The `userID` argument cannot be set to a non-string value, be empty or be whitespace only, setting to null instead.",{fileName:"src/apptimize/macros/ABTClientMacro.hx",lineNumber:21,className:"apptimize.Apptimize",methodName:"_getVariantInfoForDynamicVariable"}),t=null)):t=I.getCustomerUserId(),null!=r&&d.w("The `customAttributes` argument is deprecated. Please use the `setCustomAttributes()` method instead.",{fileName:"src/apptimize/macros/ABTClientMacro.hx",lineNumber:31,className:"apptimize.Apptimize",methodName:"_getVariantInfoForDynamicVariable"}),null==r&&(r=I.getCustomAttributes());var i=lt.nativeObjectToStringMap(r);return I._getVariantInfoForAlteration(e,t,i)},I._getVariantInfoForExperiment=function(e,t,r){null!=t?(d.w("The `userID` argument is deprecated. Please use the `setCustomerUserId()` method instead.",{fileName:"src/apptimize/macros/ABTClientMacro.hx",lineNumber:19,className:"apptimize.Apptimize",methodName:"_getVariantInfoForExperiment"}),it.isString(t)&&""!=j.ltrim(t)||(d.w("The `userID` argument cannot be set to a non-string value, be empty or be whitespace only, setting to null instead.",{fileName:"src/apptimize/macros/ABTClientMacro.hx",lineNumber:21,className:"apptimize.Apptimize",methodName:"_getVariantInfoForExperiment"}),t=null)):t=I.getCustomerUserId(),null!=r&&d.w("The `customAttributes` argument is deprecated. Please use the `setCustomAttributes()` method instead.",{fileName:"src/apptimize/macros/ABTClientMacro.hx",lineNumber:31,className:"apptimize.Apptimize",methodName:"_getVariantInfoForExperiment"}),null==r&&(r=I.getCustomAttributes());for(var i=I._getApptimizeAnonUserId(),n=lt.nativeObjectToStringMap(r),a=new le(t,i,n,C.getAppKey(),je.sharedInstance(),We.sharedInstance()),s=0,l=g._getVariants(a);s<l.length;){var o=l[s];if(++s,o.getExperimentName()==e)return k.initWithVariant(o,t,i)}return null},I.track=e.track=function(e,t,r){if(I._isInitialized()){null!=t?(d.w("The `userID` argument is deprecated. Please use the `setCustomerUserId()` method instead.",{fileName:"src/apptimize/macros/ABTClientMacro.hx",lineNumber:19,className:"apptimize.Apptimize",methodName:"track"}),it.isString(t)&&""!=j.ltrim(t)||(d.w("The `userID` argument cannot be set to a non-string value, be empty or be whitespace only, setting to null instead.",{fileName:"src/apptimize/macros/ABTClientMacro.hx",lineNumber:21,className:"apptimize.Apptimize",methodName:"track"}),t=null)):t=I.getCustomerUserId(),null!=r&&d.w("The `customAttributes` argument is deprecated. Please use the `setCustomAttributes()` method instead.",{fileName:"src/apptimize/macros/ABTClientMacro.hx",lineNumber:31,className:"apptimize.Apptimize",methodName:"track"}),null==r&&(r=I.getCustomAttributes());var i=lt.nativeObjectToStringMap(r),n=new le(t,I._getApptimizeAnonUserId(),i,C.getAppKey(),je.sharedInstance(),We.sharedInstance());g.generateTrackEvent(n,e,null)}else d.w("Events can only be tracked after setup() has been called.",{fileName:"src/apptimize/Apptimize.hx",lineNumber:1253,className:"apptimize.Apptimize",methodName:"track"})},I.trackValue=e.trackValue=function(e,t,r,i){if(I._isInitialized()){if(null!=r?(d.w("The `userID` argument is deprecated. Please use the `setCustomerUserId()` method instead.",{fileName:"src/apptimize/macros/ABTClientMacro.hx",lineNumber:19,className:"apptimize.Apptimize",methodName:"trackValue"}),it.isString(r)&&""!=j.ltrim(r)||(d.w("The `userID` argument cannot be set to a non-string value, be empty or be whitespace only, setting to null instead.",{fileName:"src/apptimize/macros/ABTClientMacro.hx",lineNumber:21,className:"apptimize.Apptimize",methodName:"trackValue"}),r=null)):r=I.getCustomerUserId(),null!=i&&d.w("The `customAttributes` argument is deprecated. Please use the `setCustomAttributes()` method instead.",{fileName:"src/apptimize/macros/ABTClientMacro.hx",lineNumber:31,className:"apptimize.Apptimize",methodName:"trackValue"}),null==i&&(i=I.getCustomAttributes()),"number"!=typeof t&&!or.__instanceof(t,at.Int))return void d.w("trackValue() called with a non-float value. Event not logged.",{fileName:"src/apptimize/Apptimize.hx",lineNumber:1284,className:"apptimize.Apptimize",methodName:"trackValue"});var n=lt.nativeObjectToStringMap(i),a=new le(r,I._getApptimizeAnonUserId(),n,C.getAppKey(),je.sharedInstance(),We.sharedInstance());g.generateTrackEvent(a,e,t)}else d.w("Events can only be tracked after setup() has been called.",{fileName:"src/apptimize/Apptimize.hx",lineNumber:1292,className:"apptimize.Apptimize",methodName:"trackValue"})},I.getMetadataSequenceNumber=e.getMetadataSequenceNumber=function(){var e=C.sharedInstance().getMetaData(C.getAppKey());return null!=e?e.getSequenceNumber():0};var s=function(){};(r.Apptimize=s).__name__="Apptimize",s.__super__=I,s.prototype=a(I.prototype,{__class__:s});var k=e.VariantInfo=function(e,t,r,i,n,a,s,l,o,u,h){this._variantId=e,this._variantName=t,this._experimentId=r,this._experimentName=i,this._experimentType=k.apptimizeExperimentTypeForString(n),this._experimentTypeName=n,this._cycle=a,this._currentPhase=s,this._participationPhase=l,this._userId=o,this._anonymousUserId=u,this._userHasParticipated=h};(r["apptimize.VariantInfo"]=k).__name__="apptimize.VariantInfo",k.initWithVariant=function(e,t,r){var i=0,n="v"+e.getVariantID()+"_"+e.getCycle(),a=!1;return We.sharedInstance().isNamespacedPropertyAvailable(n,Ze.ApptimizeInternal)&&(i=We.sharedInstance().valueForNamespacedProperty(n,Ze.ApptimizeInternal),a=!0),new k(e.getVariantID(),e.getVariantName(),e.getExperimentID(),e.getExperimentName(),e.getExperimentType(),e.getCycle(),e.getPhase(),i,t,r,a)},k.apptimizeExperimentTypeForString=function(e){switch(e.toLowerCase()){case"code-block":return v.CodeBlock;case"double-value":return v.DynamicVariables;case"feature-config":return v.FeatureVariables;case"feature-flag":return v.FeatureFlag;case"int-value":case"string-value":case"variables":return v.DynamicVariables;case"wysiwyg":return v.Visual;default:return v.Unknown}},k.prototype={_variantId:null,_variantName:null,_experimentId:null,_experimentName:null,_experimentType:null,_experimentTypeName:null,_currentPhase:null,_participationPhase:null,_cycle:null,_userId:null,_anonymousUserId:null,_userHasParticipated:null,getVariantId:function(){return this._variantId},getVariantName:function(){return this._variantName},getExperimentId:function(){return this._experimentId},getExperimentName:function(){return this._experimentName},getExperimentType:function(){return this._experimentType},getExperimentTypeName:function(){return this._experimentTypeName},getCurrentPhase:function(){return this._currentPhase},getParticipationPhase:function(){return this._participationPhase},getCycle:function(){return this._cycle},getUserId:function(){return this._userId},getAnonymousUserId:function(){return this._anonymousUserId},getUserHasParticipated:function(){return this._userHasParticipated},__class__:k};var l=function(e,t,r,i,n,a,s,l,o,u,h){k.call(this,e,t,r,i,n,a,s,l,o,u,h)};(r.VariantInfo=l).__name__="VariantInfo",l.__super__=k,l.prototype=a(k.prototype,{__class__:l});var o=function(e,t){this.r=new RegExp(e,t.split("u").join(""))};(r.EReg=o).__name__="EReg",o.prototype={r:null,match:function(e){return this.r.global&&(this.r.lastIndex=0),this.r.m=this.r.exec(e),this.r.s=e,null!=this.r.m},matched:function(e){if(null!=this.r.m&&0<=e&&e<this.r.m.length)return this.r.m[e];throw ct.thrown("EReg::matched")},matchedPos:function(){if(null==this.r.m)throw ct.thrown("No string matched");return{pos:this.r.m.index,len:this.r.m[0].length}},matchSub:function(e,t,r){var i;return null==r&&(r=-1),this.r.global?(this.r.lastIndex=t,this.r.m=this.r.exec(r<0?e:Y.substr(e,0,t+r)),(i=null!=this.r.m)&&(this.r.s=e)):(i=this.match(r<0?Y.substr(e,t,null):Y.substr(e,t,r)))&&(this.r.s=e,this.r.m.index+=t),i},split:function(e){var t="#__delim__#";return e.replace(this.r,t).split(t)},map:function(e,t){for(var r=0,i="";!(r>=e.length);){if(!this.matchSub(e,r)){i+=O.string(Y.substr(e,r,null));break}var n=this.matchedPos();if(i+=O.string(Y.substr(e,r,n.pos-r)),i+=O.string(t(this)),0==n.len?(i+=O.string(Y.substr(e,n.pos,1)),r=n.pos+1):r=n.pos+n.len,!this.r.global)break}return!this.r.global&&0<r&&r<e.length&&(i+=O.string(Y.substr(e,r,null))),i},__class__:o};var Y=function(){};(r.HxOverrides=Y).__name__="HxOverrides",Y.dateStr=function(e){var t=e.getMonth()+1,r=e.getDate(),i=e.getHours(),n=e.getMinutes(),a=e.getSeconds();return e.getFullYear()+"-"+(t<10?"0"+t:""+t)+"-"+(r<10?"0"+r:""+r)+" "+(i<10?"0"+i:""+i)+":"+(n<10?"0"+n:""+n)+":"+(a<10?"0"+a:""+a)},Y.strDate=function(e){switch(e.length){case 8:var t=e.split(":"),r=new Date;return r.setTime(0),r.setUTCHours(t[0]),r.setUTCMinutes(t[1]),r.setUTCSeconds(t[2]),r;case 10:t=e.split("-");return new Date(t[0],t[1]-1,t[2],0,0,0);case 19:var i=(t=e.split(" "))[0].split("-"),n=t[1].split(":");return new Date(i[0],i[1]-1,i[2],n[0],n[1],n[2]);default:throw ct.thrown("Invalid date format : "+e)}},Y.cca=function(e,t){var r=e.charCodeAt(t);if(r==r)return r},Y.substr=function(e,t,r){if(null==r)r=e.length;else if(r<0){if(0!=t)return"";r=e.length+r}return e.substr(t,r)},Y.remove=function(e,t){var r=e.indexOf(t);return-1!=r&&(e.splice(r,1),!0)},Y.now=function(){return Date.now()};var B=function(){};(r.Lambda=B).__name__="Lambda",B.array=function(e){for(var t=[],r=_r(e);r.hasNext();){var i=r.next();t.push(i)}return t},B.exists=function(e,t){for(var r=_r(e);r.hasNext();){if(t(r.next()))return!0}return!1},Math.__name__="Math";var F=function(){};(r.Reflect=F).__name__="Reflect",F.field=function(e,t){try{return e[t]}catch(e){return gt.lastError=e,null}},F.getProperty=function(e,t){var r;return null==e?null:!!e.__properties__&&(r=e.__properties__["get_"+t])?e[r]():e[t]},F.fields=function(e){var t=[];if(null!=e){var r=Object.prototype.hasOwnProperty;for(var i in e)"__id__"!=i&&"hx__closures__"!=i&&r.call(e,i)&&t.push(i)}return t},F.isFunction=function(e){return"function"==typeof e&&!(e.__name__||e.__ename__)},F.deleteField=function(e,t){return!!Object.prototype.hasOwnProperty.call(e,t)&&(delete e[t],!0)};var O=function(){};(r.Std=O).__name__="Std",O.string=function(e){return or.__string_rec(e,"")},O.parseInt=function(e){if(null!=e)for(var t=0,r=e.length;t<r;){var i=t++,n=e.charCodeAt(i);if(n<=8||14<=n&&32!=n&&45!=n){var a=e.charCodeAt(i+1),s=parseInt(e,120==a||88==a?16:10);return isNaN(s)?null:s}}return null};var u=function(){this.b=""};(r.StringBuf=u).__name__="StringBuf",u.prototype={b:null,__class__:u};var j=function(){};(r.StringTools=j).__name__="StringTools",j.isSpace=function(e,t){var r=Y.cca(e,t);return 8<r&&r<14||32==r},j.ltrim=function(e){for(var t=e.length,r=0;r<t&&j.isSpace(e,r);)++r;return 0<r?Y.substr(e,r,t-r):e},j.rtrim=function(e){for(var t=e.length,r=0;r<t&&j.isSpace(e,t-r-1);)++r;return 0<r?Y.substr(e,0,t-r):e},j.trim=function(e){return j.ltrim(j.rtrim(e))},j.lpad=function(e,t,r){if(t.length<=0)return e;var i="";for(r-=e.length;i.length<r;)i+=null==t?"null":""+t;return i+=null==e?"null":""+e},j.replace=function(e,t,r){return e.split(t).join(r)},j.hex=function(e,t){for(var r="";r="0123456789ABCDEF".charAt(15&e)+r,0<(e>>>=4););if(null!=t)for(;r.length<t;)r="0"+r;return r};var h=z.ValueType={__ename__:"ValueType",__constructs__:null,TNull:{_hx_name:"TNull",_hx_index:0,__enum__:"ValueType",toString:n},TInt:{_hx_name:"TInt",_hx_index:1,__enum__:"ValueType",toString:n},TFloat:{_hx_name:"TFloat",_hx_index:2,__enum__:"ValueType",toString:n},TBool:{_hx_name:"TBool",_hx_index:3,__enum__:"ValueType",toString:n},TObject:{_hx_name:"TObject",_hx_index:4,__enum__:"ValueType",toString:n},TFunction:{_hx_name:"TFunction",_hx_index:5,__enum__:"ValueType",toString:n},TClass:(t=function(e){return{_hx_index:6,c:e,__enum__:"ValueType",toString:n}},t._hx_name="TClass",t.__params__=["c"],t),TEnum:(t=function(e){return{_hx_index:7,e:e,__enum__:"ValueType",toString:n}},t._hx_name="TEnum",t.__params__=["e"],t),TUnknown:{_hx_name:"TUnknown",_hx_index:8,__enum__:"ValueType",toString:n}};h.__constructs__=[h.TNull,h.TInt,h.TFloat,h.TBool,h.TObject,h.TFunction,h.TClass,h.TEnum,h.TUnknown];var P=function(){};(r.Type=P).__name__="Type",P.createInstance=function(e,t){return new(Function.prototype.bind.apply(e,[null].concat(t)))},P.createEnum=function(e,t,r){var i=F.field(e,t);if(null==i)throw ct.thrown("No such constructor "+t);if(F.isFunction(i)){if(null==r)throw ct.thrown("Constructor "+t+" need parameters");return i.apply(e,r)}if(null!=r&&0!=r.length)throw ct.thrown("Constructor "+t+" does not need parameters");return i},P.getInstanceFields=function(e){var t=[];for(var r in e.prototype)t.push(r);return Y.remove(t,"__class__"),Y.remove(t,"__properties__"),t},P.typeof=function(e){switch(typeof e){case"boolean":return h.TBool;case"function":return e.__name__||e.__ename__?h.TObject:h.TFunction;case"number":return Math.ceil(e)==e%2147483648?h.TInt:h.TFloat;case"object":if(null==e)return h.TNull;var t=e.__enum__;if(null!=t)return h.TEnum(z[t]);var r=or.getClass(e);return null!=r?h.TClass(r):h.TObject;case"string":return h.TClass(String);case"undefined":return h.TNull;default:return h.TUnknown}},P.enumParameters=function(e){var t=z[e.__enum__].__constructs__[e._hx_index].__params__;if(null!=t){for(var r=[],i=0;i<t.length;){var n=t[i];++i,r.push(e[n])}return r}return[]};var c=z["apptimize.ABTApptimizeVariableType"]={__ename__:"apptimize.ABTApptimizeVariableType",__constructs__:null,Invalid:{_hx_name:"Invalid",_hx_index:0,__enum__:"apptimize.ABTApptimizeVariableType",toString:n},String:{_hx_name:"String",_hx_index:1,__enum__:"apptimize.ABTApptimizeVariableType",toString:n},Double:{_hx_name:"Double",_hx_index:2,__enum__:"apptimize.ABTApptimizeVariableType",toString:n},Integer:{_hx_name:"Integer",_hx_index:3,__enum__:"apptimize.ABTApptimizeVariableType",toString:n},Boolean:{_hx_name:"Boolean",_hx_index:4,__enum__:"apptimize.ABTApptimizeVariableType",toString:n},Array:{_hx_name:"Array",_hx_index:5,__enum__:"apptimize.ABTApptimizeVariableType",toString:n},Dictionary:{_hx_name:"Dictionary",_hx_index:6,__enum__:"apptimize.ABTApptimizeVariableType",toString:n}};c.__constructs__=[c.Invalid,c.String,c.Double,c.Integer,c.Boolean,c.Array,c.Dictionary];var m=function(){};(r["apptimize.ABTApptimizeVariable"]=m).__name__="apptimize.ABTApptimizeVariable",m.getValue=function(e,t,r,i){C._checkForUpdatedMetadataIfNecessary();var n=C.sharedInstance(),a=n.getMetaData(e.appkey);if(null==a)return null;for(var s=n.makeEnvironment(e),l=a.selectAlterationsIntoArray(s),o=0;o<l.length;){var u=l[o];if(++o,u.getKey()==t){var h=u instanceof Ae?u:null;if(null==h)return d.v('Alteration found for key "'+u.getKey()+"\" isn't a value alteration.",{fileName:"src/apptimize/ABTApptimizeVariable.hx",lineNumber:41,className:"apptimize.ABTApptimizeVariable",methodName:"getValue"}),null;var c=m.apptimizeVariableTypeForString(h.getType()),p=null;if(null!=h.getNestedType()&&(p=m.apptimizeVariableTypeForString(h.getNestedType())),c==r&&p==i){var _=h.getVariant();if(C.sharedInstance().incrementVariantRunCount(e,_),!h.useDefaultValue())return h.getValue()}}}return d.v('No alteration found for dynamic variable "'+t+'".',{fileName:"src/apptimize/ABTApptimizeVariable.hx",lineNumber:63,className:"apptimize.ABTApptimizeVariable",methodName:"getValue"}),null},m.apptimizeVariableTypeForString=function(e){var t=e.toLowerCase();return"string"==t?c.String:"double"==t?c.Double:"int"==t?c.Integer:"boolean"==t?c.Boolean:"list"==t?c.Array:"dictionary"==t?c.Dictionary:c.Invalid};var p=function(){};(r["apptimize.util.PlatformLock"]=p).__name__="apptimize.util.PlatformLock",p.__isInterface__=!0,p.prototype={acquire:null,release:null,__class__:p};var _=function(){};(r["apptimize.util.DefaultPlatformLock"]=_).__name__="apptimize.util.DefaultPlatformLock",_.__interfaces__=[p],_.prototype={acquire:function(){return!0},release:function(){},hxUnserialize:function(e){},__class__:_};var f=function(){};(r["apptimize.util.ABTDataLock"]=f).__name__="apptimize.util.ABTDataLock",f.getNewLock=function(e){return new _};var C=function(){this.sdkParameters=new Ne(null),this.resultDispatchQueue=new R("Results Logging Dispatch Queue"),this.resultDispatchQueue.start(),this.newMdFetcher=new K,this.propChangeFetcher=new K,this.metaDataCache=new D};(r["apptimize.ABTDataStore"]=C).__name__="apptimize.ABTDataStore",C.sharedInstance=function(){return null==C._instance&&(C._instance=new C),C._instance},C.clear=function(){Ge.clear(),C._instance=null},C.shutdown=function(){null!=C._instance&&null!=C._instance.resultTimer&&C._instance.resultTimer.stop(),C._instance=null,C.appKey=null,C.serverGuid=null},C._getLastCheckTime=function(){var e=Ge.loadString(Ge.kMetadataLastCheckTimeKey);return null!=e?parseFloat(e):-1e4},C._updateLastCheckTime=function(e){Ge.saveString(Ge.kMetadataLastCheckTimeKey,null==e?"null":""+e)},C._resetCheckTimeIfNeeded=function(){var e=!1;f.CHECK_TIME_LOCK.acquire();try{var t=parseFloat(He.sharedInstance().valueForProperty(He.METADATA_POLLING_INTERVAL_MS_KEY)),r=(new Date).getTime();t<r-C._getLastCheckTime()&&(C._updateLastCheckTime(r),e=!0)}catch(e){gt.lastError=e;var i=ct.caught(e).unwrap();throw f.CHECK_TIME_LOCK.release(),ct.thrown(i)}return f.CHECK_TIME_LOCK.release(),e},C._getLastSubmitTime=function(){var e=Ge.loadString(Ge.kResultLastSubmitTimeKey);return null!=e?parseFloat(e):-1e4},C._updateLastSubmitTime=function(e){Ge.saveString(Ge.kResultLastSubmitTimeKey,null==e?"null":""+e)},C.getAppKey=function(){return C.appKey},C.checkForUpdatedMetaData=function(e){null==e&&(e=!1),C.shouldDisable()?d.w("This SDK version disabled; not checking for updated metadata",{fileName:"src/apptimize/ABTDataStore.hx",lineNumber:223,className:"apptimize.ABTDataStore",methodName:"checkForUpdatedMetaData"}):(d.v("Checking for updated metadata...",{fileName:"src/apptimize/ABTDataStore.hx",lineNumber:226,className:"apptimize.ABTDataStore",methodName:"checkForUpdatedMetaData"}),I._isInitialized()&&(C._resetCheckTimeIfNeeded()||e)&&y.sharedInstance().downloadMetaDataForKey(C.getAppKey(),C.sharedInstance()._getCurrentEtag(C.getAppKey())))},C._checkForUpdatedMetadataIfNecessary=function(){},C.shouldDisable=function(){var e=Ge.loadObject(Ge.kDisabledVersions);return null!=e&&-1<e.indexOf(I.getApptimizeSDKVersion())},C.prototype={resultLogs:null,metaDataCache:null,newMdFetcher:null,propChangeFetcher:null,resultDispatchQueue:null,sdkParameters:null,resultTimer:null,initialize:function(){if(this.resultLogs=Ge.loadObject(Ge.kResultLogsKey),null==this.resultLogs){var e=He.sharedInstance().valueForProperty(He.RESULTS_CACHE_SIZE_KEY);or.getClass(e)==String&&null==(e=O.parseInt(e))&&(d.e("Invalid value specified for results_cache_size, defaulting to 10",{fileName:"src/apptimize/ABTDataStore.hx",lineNumber:102,className:"apptimize.ABTDataStore",methodName:"initialize"}),e=10),this.resultLogs=new rt(e)}},hasMetadata:function(e){var t=!1;f.METADATA_LOCK.acquire();try{t=Object.prototype.hasOwnProperty.call(this.metaDataCache.h,e)}catch(e){gt.lastError=e;var r=ct.caught(e).unwrap();throw f.METADATA_LOCK.release(),ct.thrown(r)}return f.METADATA_LOCK.release(),t},_getCurrentEtag:function(e){var t=this.getMetaData(e);return null==t?null:t.getEtag()},loadMetaData:function(e){C.appKey=e,this.reloadFromDisk(),C.shouldDisable()||(C._resetCheckTimeIfNeeded()||1==He.sharedInstance().valueForProperty(He.REFRESH_META_DATA_ON_SETUP))&&y.sharedInstance().downloadMetaDataForKey(e,this._getCurrentEtag(e))},_resetSubmitTimeIfNeeded:function(e){null==e&&(e=!1);var t=!1;f.CHECK_TIME_LOCK.acquire();try{var r=this._getMinTimeBetweenPosts(e),i=(new Date).getTime();r<i-C._getLastSubmitTime()&&(C._updateLastSubmitTime(i),t=!0)}catch(e){gt.lastError=e;var n=ct.caught(e).unwrap();throw f.CHECK_TIME_LOCK.release(),ct.thrown(n)}return f.CHECK_TIME_LOCK.release(),t},_getMinTimeBetweenPosts:function(e){null==e&&(e=!1);var t=parseFloat(He.sharedInstance().valueForProperty(He.RESULT_POST_DELAY_MS_KEY)),r=this.sdkParameters.minPostFrequencyMs;return e?null==r?-1:r:null!=r&&t<r?r:t},_submitResultsIfNecessary:function(){},reloadFromDisk:function(){var e=Ge.loadObject(Ge.kMetadataKey);null!=e?(d.v("Existing metadata loaded from storage, will update if necessary.",{fileName:"src/apptimize/ABTDataStore.hx",lineNumber:261,className:"apptimize.ABTDataStore",methodName:"reloadFromDisk"}),this.onMetadataLoaded(e)):d.v("No existing metadata found in storage.",{fileName:"src/apptimize/ABTDataStore.hx",lineNumber:264,className:"apptimize.ABTDataStore",methodName:"reloadFromDisk"})},getRequestlessEnvironment:function(e){var t=I.getApptimizeAnonUserId(),r=I.getCustomerUserId(),i=Ge.loadStringMap(Ge.kCustomPropertiesKey),n=new le(r,t,i,e.getAppKey(),je.sharedInstance(),We.sharedInstance());return e.makeEnvironment(n,this.sdkParameters)},getUrlsForMetadata:function(e){var t=this.getRequestlessEnvironment(e);return e.extractNeededSecondaryUrls(t)},onMetadataLoaded:function(i){var n=this;this.sdkParameters=i.extractSdkParameters(this.getRequestlessEnvironment(i));var a=this.getUrlsForMetadata(i);this.newMdFetcher.fetch(a,i.getSecondaryValues(),function(e,t){var r=n.getUrlsForMetadata(i);if(n.newMdFetcher.needNewUrls(a,r))return d.w("urls changed while fetching values, retrying",{fileName:"src/apptimize/ABTDataStore.hx",lineNumber:314,className:"apptimize.ABTDataStore",methodName:"onMetadataLoaded"}),void n.onMetadataLoaded(i);i.setSecondaryValues(e),n.overrideMetadata(i,!1,t)})},onMetadataReceived:function(i){var n=this;if(this.newMdFetcher.fetching())d.e("onMetadataReceived called while fetch already in progress",{fileName:"src/apptimize/ABTDataStore.hx",lineNumber:335,className:"apptimize.ABTDataStore",methodName:"onMetadataReceived"});else{this.sdkParameters=i.extractSdkParameters(this.getRequestlessEnvironment(i));var a=this.getUrlsForMetadata(i),e=null,t=this.getMetaData(i.getAppKey());null!=t&&(e=t.getSecondaryValues()),this.newMdFetcher.fetch(a,e,function(e,t){var r=n.getUrlsForMetadata(i);if(n.newMdFetcher.needNewUrls(a,r))return d.w("urls changed while fetching values, retrying",{fileName:"src/apptimize/ABTDataStore.hx",lineNumber:351,className:"apptimize.ABTDataStore",methodName:"onMetadataReceived"}),void n.onMetadataReceived(i);i.setSecondaryValues(e),n.overrideMetadata(i,!0,t)})}},onEnvPropsChanged:function(n){var a=this,s=this.getMetaData(n);if(null!=s){s.resetFilterEvaluations();var l=this.getUrlsForMetadata(s),e=s.getSecondaryValues();this.newMdFetcher.fetching()||this.propChangeFetcher.fetching()||this.propChangeFetcher.fetch(l,e,function(e,t){if(a.getMetaData(n)==s){var r=a.getUrlsForMetadata(s);if(a.newMdFetcher.needNewUrls(l,r))return d.w("urls changed while fetching values, retrying",{fileName:"src/apptimize/ABTDataStore.hx",lineNumber:396,className:"apptimize.ABTDataStore",methodName:"onEnvPropsChanged"}),void a.onEnvPropsChanged(n);var i=s.clone();i.setSecondaryValues(e),a.overrideMetadata(i,!0,t)}})}},overrideMetadata:function(e,t,r){var i=null,n=!0,a=!1;f.METADATA_LOCK.acquire();try{n=e.getAppKey()==C.getAppKey();var s=e.getAppKey();i=this.metaDataCache.h[s],n&&((null==i||i.getSequenceNumber()<e.getSequenceNumber())&&(a=!0),(a||r)&&(this.metaDataCache.h[s]=e,this.sdkParameters=e.extractSdkParameters(this.getRequestlessEnvironment(e)),t&&Ge.saveObject(Ge.kDisabledVersions,e.getDisabledVersions())))}catch(e){gt.lastError=e;var l=ct.caught(e).unwrap();throw f.METADATA_LOCK.release(),ct.thrown(l)}f.METADATA_LOCK.release(),e.copyPersistentValues(i),(a&&t||r)&&(this.writeToDiskIfNeeded(),this.dispatchEnrollmentChangeCallbacks(i,e)),a?(H.dispatchOnMetadataUpdated(),d.i('Updated metadata for app key "'+e.getAppKey()+'".',{fileName:"src/apptimize/ABTDataStore.hx",lineNumber:456,className:"apptimize.ABTDataStore",methodName:"overrideMetadata"}),d.v("New metadata:\n"+Pt.print(e.getMetaData(),null,"  "),{fileName:"src/apptimize/ABTDataStore.hx",lineNumber:458,className:"apptimize.ABTDataStore",methodName:"overrideMetadata"}),null!=i&&1!=He.sharedInstance().valueForProperty(He.REFRESH_META_DATA_ON_SETUP)||!g._trySetReady()||(H.dispatchOnApptimizeInitialized(),d.i("Apptimize initialized after metadata download.",{fileName:"src/apptimize/ABTDataStore.hx",lineNumber:465,className:"apptimize.ABTDataStore",methodName:"overrideMetadata"}))):(d.i("Existing metadata is up-to-date.",{fileName:"src/apptimize/ABTDataStore.hx",lineNumber:469,className:"apptimize.ABTDataStore",methodName:"overrideMetadata"}),1==He.sharedInstance().valueForProperty(He.REFRESH_META_DATA_ON_SETUP)&&g._trySetReady()&&(H.dispatchOnApptimizeInitialized(),d.i("Apptimize initialized after metadata unchanged.",{fileName:"src/apptimize/ABTDataStore.hx",lineNumber:476,className:"apptimize.ABTDataStore",methodName:"overrideMetadata"})))},getMetaData:function(e){if(null==this.metaDataCache)return null;var t=null;f.METADATA_LOCK.acquire();try{t=this.metaDataCache.h[e]}catch(e){gt.lastError=e;var r=ct.caught(e).unwrap();throw f.METADATA_LOCK.release(),ct.thrown(r)}return f.METADATA_LOCK.release(),null!=t&&t.getAppKey()!=e?(d.e("Metadata appkey does not match requested key",{fileName:"src/apptimize/ABTDataStore.hx",lineNumber:494,className:"apptimize.ABTDataStore",methodName:"getMetaData"}),null):t},dispatchEnrollmentChangeCallbacks:function(e,t){if(H.isEnrollmentListenerRegistered()||H.isUnenrollmentListenerRegistered()){for(var r=I.getCustomerUserId(),i=I.getApptimizeAnonUserId(),n=Ge.loadStringMap(Ge.kCustomPropertiesKey),a=new le(r,i,n,C.getAppKey(),je.sharedInstance(),We.sharedInstance()),s=t.makeEnvironment(a,this.sdkParameters),l=null==e?s:e.makeEnvironment(a,this.sdkParameters),o=null==e?[]:e.uncachedSelectAlterationsIntoArray(l,!1),u=t.uncachedSelectAlterationsIntoArray(s,!1),h=new It,c=new It,p=0;p<u.length;){var _=u[p];++p;var m=_.getVariant();if(or.getClass(m)==ze){var f=m;h.add(f.getHotfixName())}else c.add(m)}for(var d=t.getAllVariants(),g=new Array(d.length),v=(p=0,d.length);p<v;){var A=p++;g[A]=d[A].getExperimentID()}var y=g,T=new It,b=new It,w=new It,N=new It;for(p=0;p<o.length;){_=o[p];++p;m=[_.getVariant()];if(or.getClass(m[0])!=ze&&!B.exists(b,function(t){return function(e){return e==t[0].getVariantID()}}(m))){var S=k.initWithVariant(m[0],r,i);T.add(m[0].getExperimentID()),b.add(m[0].getVariantID()),h.filter(function(t){return function(e){return e==t[0].getExperimentName()}}(m)).isEmpty()?B.exists(y,function(t){return function(e){return e==t[0].getExperimentID()}}(m))?B.exists(c,function(t){return function(e){return e.getExperimentID()==t[0].getExperimentID()}}(m))?B.exists(c,function(t){return function(e){return e.getVariantID()==t[0].getVariantID()}}(m))||(H.dispatchOnUnenrolledInExperiment(S,G.VariantChanged),w.add(m[0].getExperimentID())):H.dispatchOnUnenrolledInExperiment(S,G.Other):H.dispatchOnUnenrolledInExperiment(S,G.ExperimentStopped):H.dispatchOnUnenrolledInExperiment(S,G.ExperimentWinnerSelected)}}N=new It;for(var x=c.h;null!=x;){var E=x.item;x=x.next;var z=[E];if(!B.exists(N,function(t){return function(e){return e==t[0].getVariantID()}}(z))&&(N.add(z[0].getVariantID()),!B.exists(T,function(t){return function(e){return e==t[0].getExperimentID()}}(z))||B.exists(w,function(t){return function(e){return e==t[0].getExperimentID()}}(z)))){S=k.initWithVariant(z[0],r,i);H.dispatchOnEnrolledInExperiment(S)}}}},dispatchUnenrollmentsForUserChanged:function(e){var t=this.getMetaData(e.appkey);if(null!=t){for(var r=t.makeEnvironment(e,this.sdkParameters),i=t.uncachedSelectAlterationsIntoArray(r),n=new It,a=0,s=new Array(i.length),l=0,o=i.length;l<o;){s[p=l++]=i[p].getVariant()}l=[],o=0;for(var u=s;o<u.length;){var h=u[o];++o,or.getClass(h)!=ze&&l.push(h)}var c=l;for(s=new Array(c.length),l=0,o=c.length;l<o;){var p;s[p=l++]=k.initWithVariant(c[p],r.userID,r.anonID)}for(l=s;a<l.length;){var _=[l[a]];++a,B.exists(n,function(t){return function(e){return e==t[0].getVariantId()}}(_))||(n.add(_[0].getVariantId()),H.dispatchOnUnenrolledInExperiment(_[0],G.UserIdChanged))}}},dispatchEnrollmentsForUserChanged:function(e){var t=this.getMetaData(e.appkey);if(null!=t){for(var r=t.makeEnvironment(e,this.sdkParameters),i=t.uncachedSelectAlterationsIntoArray(r),n=new It,a=0,s=new Array(i.length),l=0,o=i.length;l<o;){s[p=l++]=i[p].getVariant()}l=[],o=0;for(var u=s;o<u.length;){var h=u[o];++o,or.getClass(h)!=ze&&l.push(h)}var c=l;for(s=new Array(c.length),l=0,o=c.length;l<o;){var p;s[p=l++]=k.initWithVariant(c[p],r.userID,r.anonID)}for(l=s;a<l.length;){var _=[l[a]];++a,B.exists(n,function(t){return function(e){return e==t[0].getVariantId()}}(_))||(n.add(_[0].getVariantId()),H.dispatchOnEnrolledInExperiment(_[0]))}}},makeEnvironment:function(e){var t=this.getMetaData(e.appkey);return null==t?null:t.makeEnvironment(e,this.sdkParameters)},writeToDiskIfNeeded:function(){var e=this.getMetaData(C.getAppKey());null!=e&&Ge.saveObject(Ge.kMetadataKey,e,null,!0)},_saveResultLogs:function(){Ge.saveObject(Ge.kResultLogsKey,this.resultLogs,null,!0)},addResultLogEntry:function(e,t){var r=e.getUniqueUserID();C.resultsLock.acquire();try{var i=this.resultLogs.getValue(r);null==i&&(i=new Le(e),this.resultLogs.insert(r,i,mr(this,this._submitResultLog),this.resultDispatchQueue)),i.logEntry(t),i.entryCount()>He.sharedInstance().valueForProperty(He.MAXIMUM_RESULT_ENTRIES_KEY)&&this.resultLogs.remove(r,mr(this,this._submitResultLog),this.resultDispatchQueue),null==this.resultTimer&&(this.resultTimer=At.delay(mr(this,this._flushTrackingForTimer),this._getMinTimeBetweenPosts())),this._saveResultLogs(),this._submitResultsIfNecessary()}catch(e){gt.lastError=e;var n=ct.caught(e).unwrap();throw C.resultsLock.release(),ct.thrown(n)}C.resultsLock.release()},logUserTransition:function(e,t){var r=this.makeEnvironment(e),i=this.makeEnvironment(t);if(null!=r&&null!=i){var n=new Pe(r,i.userID),a=new Ce(i,r.userID);this.addResultLogEntry(r,n),this.addResultLogEntry(i,a)}},_submitResultLog:function(e){C.shouldDisable()||(y.sharedInstance().postResultsForKey(e.getAppKey(),e),this._saveResultLogs())},flushTracking:function(){this._resetSubmitTimeIfNeeded(!0)&&(this._flushTrackingInternal(),null!=this.resultTimer&&(this.resultTimer.stop(),this.resultTimer=null))},_flushTrackingForTimer:function(){this.resultTimer=null,this._flushTrackingInternal(),this._resetSubmitTimeIfNeeded()},_flushTrackingInternal:function(){d.v("Posting results...",{fileName:"src/apptimize/ABTDataStore.hx",lineNumber:752,className:"apptimize.ABTDataStore",methodName:"_flushTrackingInternal"}),C.resultsLock.acquire();try{this.resultLogs.clear(mr(this,this._submitResultLog),this.resultDispatchQueue),this._saveResultLogs()}catch(e){gt.lastError=e;var t=ct.caught(e).unwrap();throw C.resultsLock.release(),ct.thrown(t)}C.resultsLock.release()},incrementVariantRunCount:function(e,t){if(or.getClass(t)!=ze){var r="v"+t.getVariantID()+"_"+t.getCycle(),i="e"+t.getExperimentID()+"_"+t.getCycle(),n=t.getPhase(),a=!1;if(e.internalProps.isNamespacedPropertyAvailable(r,Ze.ApptimizeInternal))n=e.internalProps.valueForNamespacedProperty(r,Ze.ApptimizeInternal);else{e.internalProps.valueForNamespacedProperty(r,Ze.ApptimizeInternal),e.internalProps.valueForNamespacedProperty(i,Ze.ApptimizeInternal);e.internalProps.setPropertyForNamespace(r,n,Ze.ApptimizeInternal),e.internalProps.setPropertyForNamespace(i,n,Ze.ApptimizeInternal),d.v("Setting stickiness attributes "+r+" and "+i+" to participation phase "+t.getPhase(),{fileName:"src/apptimize/ABTDataStore.hx",lineNumber:781,className:"apptimize.ABTDataStore",methodName:"incrementVariantRunCount"}),a=!0}var s=this.makeEnvironment(e),l=new ke(s,t.getVariantID(),t.getCycle(),n);d.v('Incrementing variant run count for variant ID "'+t.getVariantID()+'".',{fileName:"src/apptimize/ABTDataStore.hx",lineNumber:787,className:"apptimize.ABTDataStore",methodName:"incrementVariantRunCount"});var o=k.initWithVariant(t,s.userID,s.anonID);H.dispatchOnParticipatedInExperiment(o,a),this.addResultLogEntry(s,l)}},generateEvent:function(e,t,r,i){if(I._isInitialized()&&null!=C.sharedInstance().getMetaData(i.appkey)){var n=this.makeEnvironment(i),a=new Be(n,e,t,r),s='Event "'+e+'"';null!=r&&(s=s+" with value "+O.string(r.h[g.kABTValueEventKey])),s+=" tracked.",d.v(s,{fileName:"src/apptimize/ABTDataStore.hx",lineNumber:812,className:"apptimize.ABTDataStore",methodName:"generateEvent"}),this.addResultLogEntry(n,a)}else d.w('Event "'+e+'" will not be tracked until Apptimize.setup() is called and MetaData available.',{fileName:"src/apptimize/ABTDataStore.hx",lineNumber:798,className:"apptimize.ABTDataStore",methodName:"generateEvent"})},__class__:C};var d=function(){};(r["apptimize.ABTLogger"]=d).__name__="apptimize.ABTLogger",d.logLevelFromString=function(e){var t=e.toUpperCase();return"LOG_LEVEL_VERBOSE"==t?d.LOG_LEVEL_VERBOSE:"LOG_LEVEL_DEBUG"==t?d.LOG_LEVEL_DEBUG:"LOG_LEVEL_INFO"==t?d.LOG_LEVEL_INFO:"LOG_LEVEL_WARN"==t?d.LOG_LEVEL_WARN:"LOG_LEVEL_ERROR"==t?d.LOG_LEVEL_ERROR:d.LOG_LEVEL_NONE},d.setLogLevel=function(e){d.logLevel=e},d.c=function(e,t){d.log_out(e,t),Qe.throwException(e)},d.e=function(e,t){d.logLevel<=d.LOG_LEVEL_ERROR&&d.log_out(e,t)},d.w=function(e,t){d.logLevel<=d.LOG_LEVEL_WARN&&d.log_out(e,t)},d.i=function(e,t){d.logLevel<=d.LOG_LEVEL_INFO&&d.log_out(e,t)},d.d=function(e,t){d.logLevel<=d.LOG_LEVEL_DEBUG&&d.log_out(e,t)},d.v=function(e,t){d.logLevel<=d.LOG_LEVEL_VERBOSE&&d.log_out(e,t)},d.log_out=function(e,t){d.useTraceForLogging&&dt.trace!=d.trace?dt.trace(e,t):d.traceInternal("Apptimize: "+e,t)},d.redirectTraceStatements=function(){dt.trace=d.trace},d.traceInternal=function(e,t){"undefined"!=typeof console&&null!=console.log&&console.log(e)},d.trace=function(e,t){var r=O.string(e);d.v(r,t)};var g=function(){};(r["apptimize.ApptimizeInternal"]=g).__name__="apptimize.ApptimizeInternal",g._isInitialized=function(){var e=!1;f.INITIALIZATION.acquire();try{e=2==g._state||3==g._state}catch(e){gt.lastError=e;var t=ct.caught(e).unwrap();throw f.INITIALIZATION.release(),ct.thrown(t)}return f.INITIALIZATION.release(),e},g.setState=function(e){f.INITIALIZATION.acquire();try{g._state=e}catch(e){gt.lastError=e;var t=ct.caught(e).unwrap();throw f.INITIALIZATION.release(),ct.thrown(t)}f.INITIALIZATION.release()},g._trySetReady=function(){var e=!1;f.INITIALIZATION.acquire();try{2==g._state&&(e=!0,g._state=3)}catch(e){gt.lastError=e;var t=ct.caught(e).unwrap();throw f.INITIALIZATION.release(),ct.thrown(t)}return f.INITIALIZATION.release(),e},g._setup=function(e,t,r){var i=!0;f.INITIALIZATION.acquire();try{0!=g._state?(d.w("Apptimize setup has already been called.",{fileName:"src/apptimize/ApptimizeInternal.hx",lineNumber:73,className:"apptimize.ApptimizeInternal",methodName:"_setup"}),i=!1):g._state=1}catch(e){gt.lastError=e;var n=ct.caught(e).unwrap();throw f.INITIALIZATION.release(),ct.thrown(n)}if(f.INITIALIZATION.release(),0!=i){d.redirectTraceStatements();var a=He.sharedInstance();if(null!=t&&a.setProperties(lt.nativeObjectToStringMap(t)),a.isPropertyAvailable(He.LOG_LEVEL_KEY)){var s=a.valueForProperty(He.LOG_LEVEL_KEY);d.setLogLevel(d.logLevelFromString(s))}if(a.isPropertyAvailable(He.APPTIMIZE_ENVIRONMENT_KEY)||a.isPropertyAvailable(He.APPTIMIZE_REGION_KEY)){var l=a.valueForProperty(He.APPTIMIZE_ENVIRONMENT_KEY);null==l&&(l="prod");var o=a.valueForProperty(He.APPTIMIZE_REGION_KEY);switch(null==o&&(o="default"),o){case"eucs":switch(l){case"local":a.setProperty(He.META_DATA_URL_KEY,"https://local.apptimize.co/api/metadata/v4/"),a.setProperty(He.GROUPS_BASE_URL_KEY,"https://local.apptimize.co"),a.setProperty(He.APPTIMIZE_MAXEXP_SEED_KEY,0);break;case"prod":a.setProperty(He.META_DATA_URL_LL_KEY,"https://md-ll.apptimize.eu/api/metadata/v4/"),a.setProperty(He.META_DATA_URL_HL_KEY,"https://md-hl.apptimize.eu/api/metadata/v4/"),a.setProperty(He.GROUPS_BASE_URL_KEY,"https://mapi.apptimize.eu"),a.setProperty(He.APPTIMIZE_MAXEXP_SEED_KEY,6925);break;case"staging":"default"!=o&&d.v("Apptimize region '"+o+"' does not have a staging environment. Falling back to default region.",{fileName:"src/apptimize/ApptimizeInternal.hx",lineNumber:116,className:"apptimize.ApptimizeInternal",methodName:"_setup"}),a.setProperty(He.META_DATA_URL_KEY,"https://staging-md.apptimize.co/api/metadata/v4/"),a.setProperty(He.GROUPS_BASE_URL_KEY,"https://staging-mapi.apptimize.co"),a.setProperty(He.APPTIMIZE_MAXEXP_SEED_KEY,206245)}break;case"gcp":switch(l){case"local":a.setProperty(He.META_DATA_URL_KEY,"https://local.apptimize.co/api/metadata/v4/"),a.setProperty(He.GROUPS_BASE_URL_KEY,"https://local.apptimize.co"),a.setProperty(He.APPTIMIZE_MAXEXP_SEED_KEY,0);break;case"staging":a.setProperty(He.META_DATA_URL_KEY,"https://gcp-stag-md.apptimize.co/api/metadata/v4/"),a.setProperty(He.GROUPS_BASE_URL_KEY,"https://gcp-stag-mapi.apptimize.co"),a.setProperty(He.APPTIMIZE_MAXEXP_SEED_KEY,206245)}break;default:switch(l){case"local":a.setProperty(He.META_DATA_URL_KEY,"https://local.apptimize.co/api/metadata/v4/"),a.setProperty(He.GROUPS_BASE_URL_KEY,"https://local.apptimize.co"),a.setProperty(He.APPTIMIZE_MAXEXP_SEED_KEY,0);break;case"staging":"default"!=o&&d.v("Apptimize region '"+o+"' does not have a staging environment. Falling back to default region.",{fileName:"src/apptimize/ApptimizeInternal.hx",lineNumber:116,className:"apptimize.ApptimizeInternal",methodName:"_setup"}),a.setProperty(He.META_DATA_URL_KEY,"https://staging-md.apptimize.co/api/metadata/v4/"),a.setProperty(He.GROUPS_BASE_URL_KEY,"https://staging-mapi.apptimize.co"),a.setProperty(He.APPTIMIZE_MAXEXP_SEED_KEY,206245)}}}null!=e&&d.v('Initializing Apptimize with app key: "'+e+'".',{fileName:"src/apptimize/ApptimizeInternal.hx",lineNumber:129,className:"apptimize.ApptimizeInternal",methodName:"_setup"}),C.sharedInstance().initialize(),Me.initialize();var u=8;a.isPropertyAvailable(He.RESULT_POST_THREAD_POOL_SIZE_KEY)&&(u=a.valueForProperty(He.RESULT_POST_THREAD_POOL_SIZE_KEY)),Ge.loadFromHighLatency(function(){L.loadPendingLogs(),r(),L.startDispatching(u)})}},g.shutdown=function(){f.INITIALIZATION.acquire();try{2==g._state||3==g._state?(L.savePendingLogs(),Ge.saveToHighLatency(),Me.shutdownPlatform(),C.shutdown(),Ge.shutdown(),g._state=0,d.i("Apptimize has shutdown",{fileName:"src/apptimize/ApptimizeInternal.hx",lineNumber:160,className:"apptimize.ApptimizeInternal",methodName:"shutdown"})):d.w("Apptimize is not initialized. Unable to shutdown().",{fileName:"src/apptimize/ApptimizeInternal.hx",lineNumber:162,className:"apptimize.ApptimizeInternal",methodName:"shutdown"})}catch(e){gt.lastError=e;var t=ct.caught(e).unwrap();throw f.INITIALIZATION.release(),ct.thrown(t)}f.INITIALIZATION.release()},g.generateTrackEvent=function(e,t,r){var i=null;if(null!=r){var n=new D;n.h[g.kABTValueEventKey]=r,i=n}C.sharedInstance().generateEvent(t,g.kABTEventSourceApptimize,i,e)},g._getCodeBlockMethod=function(e,t){var r=t;if(null==r||""==r)d.w("Attempting to runCodeBlock() without specifying a code block name! Returning baseline original variant.",{fileName:"src/apptimize/ApptimizeInternal.hx",lineNumber:179,className:"apptimize.ApptimizeInternal",methodName:"_getCodeBlockMethod"});else{for(var i=0,n=g._getAlterations(e);i<n.length;){var a=n[i];if(++i,null!=a&&or.getClass(a)==ve){var s=a;if(s.getVariant().getCodeBlockName()!=r)continue;return C.sharedInstance().incrementVariantRunCount(e,s.getVariant()),s.methodName}}d.w('Not participating in any code block experiments with name "'+t+'". Returning baseline original variant.',{fileName:"src/apptimize/ApptimizeInternal.hx",lineNumber:194,className:"apptimize.ApptimizeInternal",methodName:"_getCodeBlockMethod"})}return"baseline"},g.getWinnerVariantInfo=function(e,t,r){for(var i=[],n=lt.nativeObjectToStringMap(r),a=new le(e,t,n,C.getAppKey(),je.sharedInstance(),We.sharedInstance()),s=0,l=g._getVariants(a,!0);s<l.length;){var o=l[s];++s;var u=o;i.push(A.initWithVariant(u,e,t))}return st.toNativeArray(i,at.WinnerVariantInfo)},g._getVariants=function(e,t){null==t&&(t=!1),C._checkForUpdatedMetadataIfNecessary();for(var r=g._getAlterations(e),i=new zt,n=0;n<r.length;){var a=r[n];++n;var s=a.getVariant();if(t&&or.getClass(s)==ze||!t&&or.getClass(s)!=ze){var l=s.getVariantID();if(!i.h.hasOwnProperty(l)){var o=s.getVariantID();i.h[o]=s}}}return B.array(i)},g._getAlterations=function(e){var t=[],r=C.sharedInstance(),i=r.getMetaData(e.appkey);return null!=i&&(t=i.selectAlterationsIntoArray(r.makeEnvironment(e))),t};var v=z["apptimize.ApptimizeExperimentType"]={__ename__:"apptimize.ApptimizeExperimentType",__constructs__:null,CodeBlock:{_hx_name:"CodeBlock",_hx_index:0,__enum__:"apptimize.ApptimizeExperimentType",toString:n},FeatureFlag:{_hx_name:"FeatureFlag",_hx_index:1,__enum__:"apptimize.ApptimizeExperimentType",toString:n},DynamicVariables:{_hx_name:"DynamicVariables",_hx_index:2,__enum__:"apptimize.ApptimizeExperimentType",toString:n},Visual:{_hx_name:"Visual",_hx_index:3,__enum__:"apptimize.ApptimizeExperimentType",toString:n},Unknown:{_hx_name:"Unknown",_hx_index:4,__enum__:"apptimize.ApptimizeExperimentType",toString:n},FeatureVariables:{_hx_name:"FeatureVariables",_hx_index:5,__enum__:"apptimize.ApptimizeExperimentType",toString:n}};v.__constructs__=[v.CodeBlock,v.FeatureFlag,v.DynamicVariables,v.Visual,v.Unknown,v.FeatureVariables];var A=e.WinnerVariantInfo=function(e,t,r,i,n){this._variantId=e,this._hotfixName=t,this._userId=r,this._experimentId=n,this._anonymousUserId=i};(r["apptimize.WinnerVariantInfo"]=A).__name__="apptimize.WinnerVariantInfo",A.initWithVariant=function(e,t,r){return new A(e.getVariantID(),e.getHotfixName(),t,r,e.getExperimentID())},A.prototype={_hotfixName:null,_variantId:null,_userId:null,_anonymousUserId:null,_experimentId:null,getExperimentId:function(){return this._experimentId},getWinnerName:function(){return this._hotfixName},getUserId:function(){return this._userId},getVariantId:function(){return this._variantId},getAnonymousUserId:function(){return this._anonymousUserId},__class__:A};var y=function(){};(r["apptimize.api.ABTApiClient"]=y).__name__="apptimize.api.ABTApiClient",y.sharedInstance=function(){return null==y._instance&&(y._instance=new y),y._instance},y.prototype={downloadMetaDataForKey:function(e,t){new T(this,e,t,function(e,t){var r=Te.loadFromString(e);r.setEtag(t),C.sharedInstance().onMetadataReceived(r)},function(e){d.e("Failed to download metadata with error: "+e,{fileName:"src/apptimize/api/ABTApiClient.hx",lineNumber:25,className:"apptimize.api.ABTApiClient",methodName:"downloadMetaDataForKey"}),g._trySetReady()&&H.dispatchOnApptimizeInitialized()})},postResultsForKey:function(e,t){var r=new L(this,e,t,function(e){},function(e){});L.pushRequest(r)},__class__:y};var T=function(e,t,r,i,n){var a=this;this.apiClient=e,this.appKey=t,this.successCallback=i,this.failureCallback=n;var s=this._getMetadataUrl();s+=t,d.v("Checking for new metadata from url: "+s,{fileName:"src/apptimize/api/ABTApiMetadataRequest.hx",lineNumber:28,className:"apptimize.api.ABTApiMetadataRequest",methodName:"new"}),me.get(s,this._headersForRequest(r),function(e){a._apiSuccess(e)},function(e){a.failureCallback(e.text)})};(r["apptimize.api.ABTApiMetadataRequest"]=T).__name__="apptimize.api.ABTApiMetadataRequest",T.prototype={apiClient:null,appKey:null,successCallback:null,failureCallback:null,_apiSuccess:function(e){if(304==e.responseCode)return d.v("Got HTTP response 304, metadata not updated.",{fileName:"src/apptimize/api/ABTApiMetadataRequest.hx",lineNumber:39,className:"apptimize.api.ABTApiMetadataRequest",methodName:"_apiSuccess"}),void(g._trySetReady()&&H.dispatchOnApptimizeInitialized());var t=M.jsonFromMetadataDownload(e.bytes);if(null!=t)d.v("Request for metadata completed successfully.",{fileName:"src/apptimize/api/ABTApiMetadataRequest.hx",lineNumber:50,className:"apptimize.api.ABTApiMetadataRequest",methodName:"_apiSuccess"}),this.successCallback(t,e.etag);else{var r="Failed to download metadata with error: response was empty.";d.w(r,{fileName:"src/apptimize/api/ABTApiMetadataRequest.hx",lineNumber:54,className:"apptimize.api.ABTApiMetadataRequest",methodName:"_apiSuccess"}),this.failureCallback(r)}},_getMetadataUrl:function(){var e=He.sharedInstance().valueForProperty(He.META_DATA_URL_KEY);return null!=e?e:C.sharedInstance().hasMetadata(this.appKey)?He.sharedInstance().valueForProperty(He.META_DATA_URL_HL_KEY):He.sharedInstance().valueForProperty(He.META_DATA_URL_LL_KEY)},_headersForRequest:function(e){if(null!=e){var t=new D;return t.h.ETag=e,t.h["If-None-Match"]=e,t}return null},__class__:T};var b=function(e){null==e&&(e=0),this.lock=new sr,this._value=e};(r["hx.concurrent.atomic._AtomicInt.AtomicIntImpl"]=b).__name__="hx.concurrent.atomic._AtomicInt.AtomicIntImpl",b.prototype={lock:null,_value:null,get_value:function(){this.lock.acquire();var e=this._value;return this.lock.release(),e},set_value:function(e){return this.lock.acquire(),this._value=e,this.lock.release(),e},incrementAndGet:function(e){null==e&&(e=1),this.lock.acquire();var t=this._value+=e;return this.lock.release(),t},__class__:b,__properties__:{set_value:"set_value",get_value:"get_value"}};var w=function(){};(r["haxe.IMap"]=w).__name__="haxe.IMap",w.__isInterface__=!0;var D=function(){this.h=Object.create(null)};(r["haxe.ds.StringMap"]=D).__name__="haxe.ds.StringMap",D.__interfaces__=[w],D.createCopy=function(e){var t=new D;for(var r in e)t.h[r]=e[r];return t},D.stringify=function(e){var t="{",r=!0;for(var i in e)r?r=!1:t+=",",t+=i+" => "+O.string(e[i]);return t+"}"},D.prototype={h:null,__class__:D};var N={_new:function(e){var t=new E;return null!=e&&t.addAll(e),t}},S=function(){};(r["hx.concurrent.collection.Collection"]=S).__name__="hx.concurrent.collection.Collection",S.__isInterface__=!0,S.prototype={iterator:null,__class__:S};var x=function(){};(r["hx.concurrent.collection.OrderedCollection"]=x).__name__="hx.concurrent.collection.OrderedCollection",x.__isInterface__=!0,x.__interfaces__=[S];var E=function(){this._sync=new sr,this._items=new It};(r["hx.concurrent.collection._SynchronizedLinkedList.SynchronizedLinkedListImpl"]=E).__name__="hx.concurrent.collection._SynchronizedLinkedList.SynchronizedLinkedListImpl",E.__interfaces__=[x],E.prototype={_items:null,_sync:null,get_length:function(){var r=this;return this._sync.execute(function(){for(var e=0,t=r._items.h;null!=t;){t.item;t=t.next;++e}return e})},add:function(e){var t=this;this._sync.execute(function(){t._items.add(e)})},addAll:function(l){var o=this;this._sync.execute(function(){var e=l;switch(e._hx_index){case 0:for(var t=e.v.iterator();t.hasNext();){var r=t.next();o._items.add(r)}break;case 1:for(var i=e.v,n=0;n<i.length;){t=i[n];++n,o._items.add(t)}break;case 2:for(var a=e.v.h;null!=a;){var s=a.item;a=a.next;t=s;o._items.add(t)}}})},clear:function(){var e=this;this._sync.execute(function(){return e._items=new It})},remove:function(e){var t=this;return this._sync.execute(function(){return-1!=t.indexOf(e)&&t._items.remove(e)})},indexOf:function(i,n){null==n&&(n=0);var a=this;return this._sync.execute(function(){for(var e=0,t=a._items.h;null!=t;){var r=t.item;if(t=t.next,n<=e&&r==i)return e;++e}return-1})},iterator:function(){var e=this;return this._sync.execute(function(){return new Bt(e._items.h)})},toArray:function(){var n=this;return this._sync.execute(function(){for(var e=[],t=n._items.h;null!=t;){var r=t.item;t=t.next;var i=r;e.push(i)}return e})},__class__:E,__properties__:{get_length:"get_length"}};var R=function(e){this.delayedTasks=N._new(),this.executor=null,this.name=e};(r["apptimize.util.ABTDispatch"]=R).__name__="apptimize.util.ABTDispatch",R.dispatchImmediately=function(e){e()},R.prototype={executor:null,delayedTasks:null,name:null,dispatch:function(e,t){if(null==t&&(t=0),null!=this.executor)try{var r=rr.a(e);this.executor.submit(r,Jt.ONCE(t))}catch(e){gt.lastError=e;var i=ct.caught(e).unwrap();d.e("Dispatcher '"+this.name+"' threw an exception submitting a task: "+O.string(i),{fileName:"src/apptimize/util/ABTDispatch.hx",lineNumber:56,className:"apptimize.util.ABTDispatch",methodName:"dispatch"})}else this.delayedTasks.add(new Xe(e,t))},start:function(e){if(null==e&&(e=1),null==this.executor){e<1&&(d.w("Invalid thread count of "+e+". Starting dispatcher '"+this.name+"' with minimum thread pool size of 1.",{fileName:"src/apptimize/util/ABTDispatch.hx",lineNumber:76,className:"apptimize.util.ABTDispatch",methodName:"start"}),e=1),this.executor=Wt.create(e);for(var t=new It,r=this.delayedTasks.iterator();r.hasNext();){var i=r.next();try{var n=or.__cast(Math.max(0,i.startTimestampMs-(new Date).getTime()),dr),a=rr.a(i.task);this.executor.submit(a,Jt.ONCE(n))}catch(e){gt.lastError=e;var s=ct.caught(e).unwrap();t.add(s)}}if(this.delayedTasks.clear(),!t.isEmpty()){d.e("One or more errors occurred starting dispatcher '"+this.name+"':",{fileName:"src/apptimize/util/ABTDispatch.hx",lineNumber:97,className:"apptimize.util.ABTDispatch",methodName:"start"});for(var l=t.h;null!=l;){var o=l.item;l=l.next;var u=o;d.e("Dispatcher '"+this.name+"' threw an exception submitting a task: "+u,{fileName:"src/apptimize/util/ABTDispatch.hx",lineNumber:99,className:"apptimize.util.ABTDispatch",methodName:"start"})}}}},__class__:R};var L=function(e,t,r,i,n){this._failureCount=0,this._apiClient=e,this._appKey=t,this._success=i,this._failure=n,this._uniqueID=r.getUniqueUserKey(),this._url=this._getUrl(t);var a=wt.ofString(r.toJSON());this._requestBytes=a};(r["apptimize.api.ABTApiResultsPost"]=L).__name__="apptimize.api.ABTApiResultsPost",L._getPendingResultsCount=function(){var e=0;L.PENDING_LOCK.acquire();try{e=L._pendingResults.get_length()}catch(e){gt.lastError=e;var t=ct.caught(e).unwrap();throw L.PENDING_LOCK.release(),ct.thrown(t)}return L.PENDING_LOCK.release(),e},L.onSuccess=function(e,t){L.clearFailureDelay(),L.PENDING_LOCK.acquire();try{L._pendingResults.remove(e),0<L.decrementPendingCount(e._uniqueID)&&L.postNextRequestForID(e._uniqueID)}catch(e){gt.lastError=e;var r=ct.caught(e).unwrap();throw L.PENDING_LOCK.release(),ct.thrown(r)}L.PENDING_LOCK.release(),null!=e&&null!=e._success&&e._success(t),L.savePendingLogs()},L.postNextRequestForID=function(e){L.PENDING_LOCK.acquire();try{for(var t=L._pendingResults.iterator();t.hasNext();){var r=[t.next()];if(r[0]._uniqueID==e){var i=function(e){return function(){e[0]._post()}}(r);null!=L._postDispatch?L._postDispatch.dispatch(i,0):R.dispatchImmediately(i);break}}}catch(e){gt.lastError=e;var n=ct.caught(e).unwrap();throw L.PENDING_LOCK.release(),ct.thrown(n)}L.PENDING_LOCK.release()},L.decrementPendingCount=function(e){var t=0;L.PENDING_LOCK.acquire();try{if(t=L._pendingMap.h[e],0==--t){var r=L._pendingMap;Object.prototype.hasOwnProperty.call(r.h,e)&&delete r.h[e]}else L._pendingMap.h[e]=t}catch(e){gt.lastError=e;var i=ct.caught(e).unwrap();throw L.PENDING_LOCK.release(),ct.thrown(i)}return L.PENDING_LOCK.release(),t},L.incrementFailureDelay=function(){var e=2*L._failureDelayMs.get_value();return e>L.MAX_FAILURE_DELAY_MS&&(e=L.MAX_FAILURE_DELAY_MS),L._failureDelayMs.set_value(e),L._failureDelayMs.get_value()},L.clearFailureDelay=function(){L._failureDelayMs.set_value(L.DEFAULT_FAILURE_DELAY_MS)},L.onFailure=function(e,t){if(e._failureCount>He.sharedInstance().valueForProperty(He.MAXIMUM_RESULT_POST_FAILURE_KEY)){d.e("Dropping result post after repeated failure.",{fileName:"src/apptimize/api/ABTApiResultsPost.hx",lineNumber:267,className:"apptimize.api.ABTApiResultsPost",methodName:"onFailure"}),L.PENDING_LOCK.acquire();try{L._pendingResults.remove(e),0<L.decrementPendingCount(e._uniqueID)&&L.postNextRequestForID(e._uniqueID)}catch(e){gt.lastError=e;var r=ct.caught(e).unwrap();throw L.PENDING_LOCK.release(),ct.thrown(r)}L.PENDING_LOCK.release()}else{var i=function(){e._post()};null!=L._postDispatch?L._postDispatch.dispatch(i,L.incrementFailureDelay()):R.dispatchImmediately(i)}null!=e._failure&&e._failure(t),L.savePendingLogs()},L.pushRequest=function(e,t){null==t&&(t=!0),L.PENDING_LOCK.acquire();try{if(L._pendingResults.add(e),Object.prototype.hasOwnProperty.call(L._pendingMap.h,e._uniqueID))L._pendingMap.h[e._uniqueID]+=1;else{L._pendingMap.h[e._uniqueID]=1;var r=function(){e._post()};null!=L._postDispatch?L._postDispatch.dispatch(r,0):R.dispatchImmediately(r)}t&&L.savePendingLogs()}catch(e){gt.lastError=e;var i=ct.caught(e).unwrap();throw L.PENDING_LOCK.release(),ct.thrown(i)}L.PENDING_LOCK.release()},L.savePendingLogs=function(){L.PENDING_LOCK.acquire();try{Ge.saveObject(Ge.kResultPostsListKey,L._pendingResults.toArray())}catch(e){gt.lastError=e;var t=ct.caught(e).unwrap();throw L.PENDING_LOCK.release(),ct.thrown(t)}L.PENDING_LOCK.release()},L.loadPendingLogs=function(){L.PENDING_LOCK.acquire();try{if(0==L._loadedPending){var e=Ge.loadObject(Ge.kResultPostsListKey);try{for(var t=null==e?[]:e,r=0;r<t.length;){var i=t[r];++r,L.pushRequest(i,!1)}}catch(r){gt.lastError=r;var n=ct.caught(r).unwrap();d.e("Unable to load pending results posts: "+O.string(n),{fileName:"src/apptimize/api/ABTApiResultsPost.hx",lineNumber:335,className:"apptimize.api.ABTApiResultsPost",methodName:"loadPendingLogs"})}}L._loadedPending=!0}catch(r){gt.lastError=r;n=ct.caught(r).unwrap();throw L.PENDING_LOCK.release(),ct.thrown(n)}L.PENDING_LOCK.release()},L.startDispatching=function(e){L._postDispatch.start(e)},L.prototype={_apiClient:null,_appKey:null,_uniqueID:null,_requestBytes:null,_success:null,_failure:null,_failureCount:null,_url:null,_getUrl:function(e){var t=C.sharedInstance().getMetaData(e);if(null==t)return null;var r=t.getCheckinUrls();if(null==r||r.length<1)return null;return r[Math.floor((r.length-1+1)*Math.random())]+"v4/"},_post:function(){var t=this;if(g._isInitialized()){if(null==this._url&&(this._url=this._getUrl(this._appKey),null==this._url))return d.e("Unable to post results until metadata is available.",{fileName:"src/apptimize/api/ABTApiResultsPost.hx",lineNumber:155,className:"apptimize.api.ABTApiResultsPost",methodName:"_post"}),void L.onFailure(this,null);d.v("Posting results to: "+this._url,{fileName:"src/apptimize/api/ABTApiResultsPost.hx",lineNumber:161,className:"apptimize.api.ABTApiResultsPost",methodName:"_post"}),me.post(this._url,this._requestBytes,this._appKey,function(e){d.d("Successfully posted results.",{fileName:"src/apptimize/api/ABTApiResultsPost.hx",lineNumber:171,className:"apptimize.api.ABTApiResultsPost",methodName:"_post"}),d.d("Results JSON:\n"+O.string(t._requestBytes),{fileName:"src/apptimize/api/ABTApiResultsPost.hx",lineNumber:173,className:"apptimize.api.ABTApiResultsPost",methodName:"_post"}),L.onSuccess(t,e)},function(e){t.incrementFailureCountForCode(e.responseCode),d.e("Failed to post results, queuing for retry later: "+e.responseCode+" "+e.text,{fileName:"src/apptimize/api/ABTApiResultsPost.hx",lineNumber:180,className:"apptimize.api.ABTApiResultsPost",methodName:"_post"}),d.e("Results JSON:\n"+O.string(t._requestBytes),{fileName:"src/apptimize/api/ABTApiResultsPost.hx",lineNumber:182,className:"apptimize.api.ABTApiResultsPost",methodName:"_post"}),L.onFailure(t,e)})}},incrementFailureCountForCode:function(e){400<=e&&this._failureCount++},hxSerialize:function(e){e.serialize(this._appKey),e.serialize(this._requestBytes),e.serialize(this._failureCount),e.serialize(this._url),e.serialize(this._uniqueID)},hxUnserialize:function(e){this._appKey=e.unserialize(),this._requestBytes=e.unserialize(),this._failureCount=e.unserialize(),this._url=e.unserialize(),this._uniqueID=e.unserialize()},__class__:L};var U=function(){};(r["apptimize.api.ABTMetadataPoller"]=U).__name__="apptimize.api.ABTMetadataPoller",U.stopPolling=function(){U._stopMetadataTimer(),U._isPolling=!1},U.startPolling=function(e){null==e&&(e=!0),U._isThreadingEnabled=He.sharedInstance().valueForProperty(He.THREADING_ENABLED_KEY),U._interval=He.sharedInstance().valueForProperty(He.METADATA_POLLING_INTERVAL_MS_KEY),U._backgroundInterval=He.sharedInstance().valueForProperty(He.METADATA_POLLING_BACKGROUND_INTERVAL_MS_KEY),U._stopMetadataTimer();var t=e?U._interval:U._backgroundInterval;0<t&&(d.v("Metadata update interval set to "+t+" milliseconds.",{fileName:"src/apptimize/api/ABTMetadataPoller.hx",lineNumber:52,className:"apptimize.api.ABTMetadataPoller",methodName:"startPolling"}),U._startMetadataTimer(t),U._isPolling=!0)},U._stopMetadataTimer=function(){null!=U._metadataTimer&&(U._metadataTimer.stop(),U._metadataTimer=null)},U._startMetadataTimer=function(e){null!=U._metadataTimer&&U._stopMetadataTimer(),(U._metadataTimer=new At(e)).run=I.updateApptimizeMetadataOnce};var M=function(){};(r["apptimize.api.ABTMetadataProcessor"]=M).__name__="apptimize.api.ABTMetadataProcessor",M.jsonFromMetadataDownload=function(e){var t=ot.decompress(e);return t.getString(0,t.length)};var K=function(){this._fetching=!1};(r["apptimize.api.ABTSecondaryValuesClient"]=K).__name__="apptimize.api.ABTSecondaryValuesClient",K.prototype={_fetching:null,fetching:function(){return this._fetching},fetch:function(e,t,r){var i=this;this._fetching=!0;var n=new V(e,t),a=!n.missingUrls.isEmpty();this.fetchNext(n,function(e){i._fetching=!1,r(e,a)})},fetchNext:function(n,a){var s=this;if(n.missingUrls.isEmpty())a(n.allValues);else{var l=n.missingUrls.pop();me.get(l,null,function(e){var t=wt.ofData(e.bytes),r=n.allValues,i=new Ot(t.getString(0,t.length)).doParse();r.h[l]=i,s.fetchNext(n,a)},function(e){d.e("GET "+l+" failed: "+e.responseCode,{fileName:"src/apptimize/api/ABTSecondaryValuesClient.hx",lineNumber:47,className:"apptimize.api.ABTSecondaryValuesClient",methodName:"fetchNext"}),s.fetchNext(n,a)})}},needNewUrls:function(e,t){for(var r=[],i=0,n=t;i<n.length;){var a=n[i];++i,e.indexOf(a)<0&&r.push(a)}return 0<r.length},__class__:K};var V=function(e,t){for(var r=new It,i=new D,n=0;n<e.length;){var a=e[n];if(++n,null!=t&&Object.prototype.hasOwnProperty.call(t.h,a)){var s=t.h[a];i.h[a]=s}else r.add(a)}this.missingUrls=r,this.allValues=i};(r["apptimize.api.ABTSecValFetchState"]=V).__name__="apptimize.api.ABTSecValFetchState",V.prototype={missingUrls:null,allValues:null,__class__:V};var q=function(){};(r["apptimize.api.ABTUserGuid"]=q).__name__="apptimize.api.ABTUserGuid",q.generateUserGuid=function(){return q._userGuid=q.S4()+q.S4()+"-"+q.S4()+"-"+q.S4()+"-"+q.S4()+"-"+q.S4()+q.S4()+q.S4(),q._userGuid},q.S4=function(e){null==e&&(e=Math.random);var t=65536*e()|0;return j.hex(t,4)},q.isValidGuid=function(e){return new o("(^([0-9A-Fa-f]{8}[-][0-9A-Fa-f]{4}[-][0-9A-Fa-f]{4}[-][0-9A-Fa-f]{4}[-][0-9A-Fa-f]{12})$)","").match(e)};var G=z["apptimize.events.ApptimizeUnenrollmentReason"]={__ename__:"apptimize.events.ApptimizeUnenrollmentReason",__constructs__:null,ExperimentStopped:{_hx_name:"ExperimentStopped",_hx_index:0,__enum__:"apptimize.events.ApptimizeUnenrollmentReason",toString:n},ExperimentWinnerSelected:{_hx_name:"ExperimentWinnerSelected",_hx_index:1,__enum__:"apptimize.events.ApptimizeUnenrollmentReason",toString:n},VariantChanged:{_hx_name:"VariantChanged",_hx_index:2,__enum__:"apptimize.events.ApptimizeUnenrollmentReason",toString:n},UserIdChanged:{_hx_name:"UserIdChanged",_hx_index:3,__enum__:"apptimize.events.ApptimizeUnenrollmentReason",toString:n},Other:{_hx_name:"Other",_hx_index:4,__enum__:"apptimize.events.ApptimizeUnenrollmentReason",toString:n},Unknown:{_hx_name:"Unknown",_hx_index:5,__enum__:"apptimize.events.ApptimizeUnenrollmentReason",toString:n}};G.__constructs__=[G.ExperimentStopped,G.ExperimentWinnerSelected,G.VariantChanged,G.UserIdChanged,G.Other,G.Unknown];var H=function(){};(r["apptimize.events.ABTEventManager"]=H).__name__="apptimize.events.ABTEventManager",H.setOnMetadataUpdatedCallback=function(e){H._onMetadataUpdatedCallback=e},H.dispatchOnMetadataUpdated=function(){null!=H._onMetadataUpdatedCallback&&H._onMetadataUpdatedCallback()},H.setOnParticipationCallback=function(e){H._onParticipationCallback=e},H.dispatchOnParticipation=function(e,t){null!=H._onParticipationCallback&&H._onParticipationCallback(e,t)},H.setOnParticipatedInExperimentCallback=function(e){H._onParticipatedInExperimentCallback=e},H.dispatchOnParticipatedInExperiment=function(e,t){null!=H._onParticipatedInExperimentCallback&&H._onParticipatedInExperimentCallback(e,t),H.dispatchOnParticipation(e.getExperimentName(),e.getVariantName())},H.setOnEnrolledInExperimentCallback=function(e){H._onEnrolledInExperimentCallback=e},H.dispatchOnEnrolledInExperiment=function(e){null!=H._onEnrolledInExperimentCallback&&H._onEnrolledInExperimentCallback(e)},H.setOnUnenrolledInExperimentCallback=function(e){H._onUnenrolledInExperimentCallback=e},H.dispatchOnUnenrolledInExperiment=function(e,t){null!=H._onUnenrolledInExperimentCallback&&H._onUnenrolledInExperimentCallback(e,t)},H.setOnApptimizeInitializedCallback=function(e){H._onApptimizeInitializedCallback=e},H.dispatchOnApptimizeInitialized=function(){null!=H._onApptimizeInitializedCallback&&H._onApptimizeInitializedCallback()},H.isEnrollmentListenerRegistered=function(){return null!=H._onEnrolledInExperimentCallback},H.isUnenrollmentListenerRegistered=function(){return null!=H._onUnenrolledInExperimentCallback};var Z=z["apptimize.filter.ABTFilterResult"]={__ename__:"apptimize.filter.ABTFilterResult",__constructs__:null,ABTFilterResultUnknown:{_hx_name:"ABTFilterResultUnknown",_hx_index:0,__enum__:"apptimize.filter.ABTFilterResult",toString:n},ABTFilterResultFalse:{_hx_name:"ABTFilterResultFalse",_hx_index:1,__enum__:"apptimize.filter.ABTFilterResult",toString:n},ABTFilterResultTrue:{_hx_name:"ABTFilterResultTrue",_hx_index:2,__enum__:"apptimize.filter.ABTFilterResult",toString:n}};Z.__constructs__=[Z.ABTFilterResultUnknown,Z.ABTFilterResultFalse,Z.ABTFilterResultTrue];var J=z["apptimize.filter.ABTFilterPropertySource"]={__ename__:"apptimize.filter.ABTFilterPropertySource",__constructs__:null,ABTFilterPropertySourceDevice:{_hx_name:"ABTFilterPropertySourceDevice",_hx_index:0,__enum__:"apptimize.filter.ABTFilterPropertySource",toString:n},ABTFilterPropertySourceUser:{_hx_name:"ABTFilterPropertySourceUser",_hx_index:1,__enum__:"apptimize.filter.ABTFilterPropertySource",toString:n},ABTFilterPropertySourcePrefixed:{_hx_name:"ABTFilterPropertySourcePrefixed",_hx_index:2,__enum__:"apptimize.filter.ABTFilterPropertySource",toString:n}};J.__constructs__=[J.ABTFilterPropertySourceDevice,J.ABTFilterPropertySourceUser,J.ABTFilterPropertySourcePrefixed];var W=z["apptimize.filter.ABTFilterType"]={__ename__:"apptimize.filter.ABTFilterType",__constructs__:null,ABTFilterTypeUnknown:{_hx_name:"ABTFilterTypeUnknown",_hx_index:0,__enum__:"apptimize.filter.ABTFilterType",toString:n},ABTFilterTypeSimple:{_hx_name:"ABTFilterTypeSimple",_hx_index:1,__enum__:"apptimize.filter.ABTFilterType",toString:n},ABTFilterTypeList:{_hx_name:"ABTFilterTypeList",_hx_index:2,__enum__:"apptimize.filter.ABTFilterType",toString:n},ABTFilterTypeSet:{_hx_name:"ABTFilterTypeSet",_hx_index:3,__enum__:"apptimize.filter.ABTFilterType",toString:n},ABTFilterTypeCompound:{_hx_name:"ABTFilterTypeCompound",_hx_index:4,__enum__:"apptimize.filter.ABTFilterType",toString:n},ABTFilterTypePropertyless:{_hx_name:"ABTFilterTypePropertyless",_hx_index:5,__enum__:"apptimize.filter.ABTFilterType",toString:n},ABTFilterTypeNamed:{_hx_name:"ABTFilterTypeNamed",_hx_index:6,__enum__:"apptimize.filter.ABTFilterType",toString:n}};W.__constructs__=[W.ABTFilterTypeUnknown,W.ABTFilterTypeSimple,W.ABTFilterTypeList,W.ABTFilterTypeSet,W.ABTFilterTypeCompound,W.ABTFilterTypePropertyless,W.ABTFilterTypeNamed];var X=z["apptimize.filter.ABTFilterOperator"]={__ename__:"apptimize.filter.ABTFilterOperator",__constructs__:null,ABTFilterOperatorUnknown:{_hx_name:"ABTFilterOperatorUnknown",_hx_index:0,__enum__:"apptimize.filter.ABTFilterOperator",toString:n},ABTFilterOperatorEquals:{_hx_name:"ABTFilterOperatorEquals",_hx_index:1,__enum__:"apptimize.filter.ABTFilterOperator",toString:n},ABTFilterOperatorNotEquals:{_hx_name:"ABTFilterOperatorNotEquals",_hx_index:2,__enum__:"apptimize.filter.ABTFilterOperator",toString:n},ABTFilterOperatorRegex:{_hx_name:"ABTFilterOperatorRegex",_hx_index:3,__enum__:"apptimize.filter.ABTFilterOperator",toString:n},ABTFilterOperatorNotRegex:{_hx_name:"ABTFilterOperatorNotRegex",_hx_index:4,__enum__:"apptimize.filter.ABTFilterOperator",toString:n},ABTFilterOperatorGreaterThan:{_hx_name:"ABTFilterOperatorGreaterThan",_hx_index:5,__enum__:"apptimize.filter.ABTFilterOperator",toString:n},ABTFilterOperatorGreaterThanOrEqual:{_hx_name:"ABTFilterOperatorGreaterThanOrEqual",_hx_index:6,__enum__:"apptimize.filter.ABTFilterOperator",toString:n},ABTFilterOperatorLessThan:{_hx_name:"ABTFilterOperatorLessThan",_hx_index:7,__enum__:"apptimize.filter.ABTFilterOperator",toString:n},ABTFilterOperatorLessThanOrEqual:{_hx_name:"ABTFilterOperatorLessThanOrEqual",_hx_index:8,__enum__:"apptimize.filter.ABTFilterOperator",toString:n},ABTFilterOperatorInList:{_hx_name:"ABTFilterOperatorInList",_hx_index:9,__enum__:"apptimize.filter.ABTFilterOperator",toString:n},ABTFilterOperatorNotInList:{_hx_name:"ABTFilterOperatorNotInList",_hx_index:10,__enum__:"apptimize.filter.ABTFilterOperator",toString:n},ABTFilterOperatorIntersection:{_hx_name:"ABTFilterOperatorIntersection",_hx_index:11,__enum__:"apptimize.filter.ABTFilterOperator",toString:n},ABTFilterOperatorCompoundOr:{_hx_name:"ABTFilterOperatorCompoundOr",_hx_index:12,__enum__:"apptimize.filter.ABTFilterOperator",toString:n},ABTFilterOperatorCompoundAnd:{_hx_name:"ABTFilterOperatorCompoundAnd",_hx_index:13,__enum__:"apptimize.filter.ABTFilterOperator",toString:n},ABTFilterOperatorCompoundSingleNot:{_hx_name:"ABTFilterOperatorCompoundSingleNot",_hx_index:14,__enum__:"apptimize.filter.ABTFilterOperator",toString:n},ABTFilterOperatorCompoundSingleIsNull:{_hx_name:"ABTFilterOperatorCompoundSingleIsNull",_hx_index:15,__enum__:"apptimize.filter.ABTFilterOperator",toString:n},ABTFilterOperatorCompoundSingleIsNotNull:{_hx_name:"ABTFilterOperatorCompoundSingleIsNotNull",_hx_index:16,__enum__:"apptimize.filter.ABTFilterOperator",toString:n},ABTFilterOperatorPropertyIsNull:{_hx_name:"ABTFilterOperatorPropertyIsNull",_hx_index:17,__enum__:"apptimize.filter.ABTFilterOperator",toString:n},ABTFilterOperatorPropertyIsNotNull:{_hx_name:"ABTFilterOperatorPropertyIsNotNull",_hx_index:18,__enum__:"apptimize.filter.ABTFilterOperator",toString:n},ABTFilterOperatorPropertyIsRecognized:{_hx_name:"ABTFilterOperatorPropertyIsRecognized",_hx_index:19,__enum__:"apptimize.filter.ABTFilterOperator",toString:n},ABTFilterOperatorPropertyIsNotRecognized:{_hx_name:"ABTFilterOperatorPropertyIsNotRecognized",_hx_index:20,__enum__:"apptimize.filter.ABTFilterOperator",toString:n},ABTFilterOperatorOperatorIsRecognized:{_hx_name:"ABTFilterOperatorOperatorIsRecognized",_hx_index:21,__enum__:"apptimize.filter.ABTFilterOperator",toString:n},ABTFilterOperatorOperatorIsNotRecognized:{_hx_name:"ABTFilterOperatorOperatorIsNotRecognized",_hx_index:22,__enum__:"apptimize.filter.ABTFilterOperator",toString:n},ABTFilterOperatorValueOf:{_hx_name:"ABTFilterOperatorValueOf",_hx_index:23,__enum__:"apptimize.filter.ABTFilterOperator",toString:n}};X.__constructs__=[X.ABTFilterOperatorUnknown,X.ABTFilterOperatorEquals,X.ABTFilterOperatorNotEquals,X.ABTFilterOperatorRegex,X.ABTFilterOperatorNotRegex,X.ABTFilterOperatorGreaterThan,X.ABTFilterOperatorGreaterThanOrEqual,X.ABTFilterOperatorLessThan,X.ABTFilterOperatorLessThanOrEqual,X.ABTFilterOperatorInList,X.ABTFilterOperatorNotInList,X.ABTFilterOperatorIntersection,X.ABTFilterOperatorCompoundOr,X.ABTFilterOperatorCompoundAnd,X.ABTFilterOperatorCompoundSingleNot,X.ABTFilterOperatorCompoundSingleIsNull,X.ABTFilterOperatorCompoundSingleIsNotNull,X.ABTFilterOperatorPropertyIsNull,X.ABTFilterOperatorPropertyIsNotNull,X.ABTFilterOperatorPropertyIsRecognized,X.ABTFilterOperatorPropertyIsNotRecognized,X.ABTFilterOperatorOperatorIsRecognized,X.ABTFilterOperatorOperatorIsNotRecognized,X.ABTFilterOperatorValueOf];var Q=function(){};(r["apptimize.filter.ABTFilter"]=Q).__name__="apptimize.filter.ABTFilter",Q.filterFromJSON=function(e){var t=Q.filterForTypeFromJSON(e),r=Q.classForType(t);if(null==r)return d.e("Unable to find filter type: "+O.string(t),{fileName:"src/apptimize/filter/ABTFilter.hx",lineNumber:110,className:"apptimize.filter.ABTFilter",methodName:"filterFromJSON"}),null;var i=P.createInstance(r,[]);return i.fromJSON(e),i},Q.classForType=function(e){return e==W.ABTFilterTypeSimple?$:e==W.ABTFilterTypeCompound?ee:e==W.ABTFilterTypeList?te:e==W.ABTFilterTypeSet?re:e==W.ABTFilterTypeNamed?ae:ie},Q.filterForTypeFromJSON=function(e){var t=Q.operatorFromString(F.field(e,Q.kABTFilterKeyOperator));return Q.typeFromOperator(t)},Q.operatorFromString=function(e){return"="==e?X.ABTFilterOperatorEquals:"!="==e?X.ABTFilterOperatorNotEquals:"regex"==e?X.ABTFilterOperatorRegex:"not_regex"==e?X.ABTFilterOperatorNotRegex:">"==e?X.ABTFilterOperatorGreaterThan:">="==e?X.ABTFilterOperatorGreaterThanOrEqual:"<"==e?X.ABTFilterOperatorLessThan:"<="==e?X.ABTFilterOperatorLessThanOrEqual:"in"==e?X.ABTFilterOperatorInList:"not_in"==e?X.ABTFilterOperatorNotInList:"intersection"==e?X.ABTFilterOperatorIntersection:"or"==e?X.ABTFilterOperatorCompoundOr:"and"==e?X.ABTFilterOperatorCompoundAnd:"not"==e?X.ABTFilterOperatorCompoundSingleNot:"is_null"==e?X.ABTFilterOperatorCompoundSingleIsNull:"is_not_null"==e?X.ABTFilterOperatorCompoundSingleIsNotNull:"is_property_null"==e?X.ABTFilterOperatorPropertyIsNull:"is_property_not_null"==e?X.ABTFilterOperatorPropertyIsNotNull:"is_recognized_property"==e?X.ABTFilterOperatorPropertyIsRecognized:"is_not_recognized_property"==e?X.ABTFilterOperatorPropertyIsNotRecognized:"is_recognized_operator"==e?X.ABTFilterOperatorOperatorIsRecognized:"is_not_recognized_operator"==e?X.ABTFilterOperatorOperatorIsNotRecognized:"value_of"==e?X.ABTFilterOperatorValueOf:X.ABTFilterOperatorUnknown},Q.typeFromOperator=function(e){switch(e._hx_index){case 0:break;case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 8:return W.ABTFilterTypeSimple;case 9:case 10:return W.ABTFilterTypeList;case 11:return W.ABTFilterTypeSet;case 12:case 13:case 14:case 15:case 16:return W.ABTFilterTypeCompound;case 17:case 18:case 19:case 20:case 21:case 22:return W.ABTFilterTypePropertyless;case 23:return W.ABTFilterTypeNamed}return d.e("Unknown filter type. Filter match is unknown.",{fileName:"src/apptimize/filter/ABTFilter.hx",lineNumber:298,className:"apptimize.filter.ABTFilter",methodName:"typeFromOperator"}),W.ABTFilterTypeUnknown},Q.prototype={property:null,propertySource:null,value:null,filterType:null,filterOperator:null,callServerURLKey:null,fromJSON:function(e){var t=F.field(e,Q.kABTFilterKeyProperty);null!=t?(this.property=t,this.propertySource=J.ABTFilterPropertySourceDevice):null!=(t=F.field(e,Q.kABTFilterKeyUserAttribute))?(this.property=t,this.propertySource=J.ABTFilterPropertySourceUser):null!=(t=F.field(e,Q.kABTFilterKeyPrefixedAttribute))&&(this.property=t,this.propertySource=J.ABTFilterPropertySourcePrefixed),this.filterOperator=Q.operatorFromString(F.field(e,Q.kABTFilterKeyOperator)),this.filterType=Q.filterForTypeFromJSON(e),this.filterType==W.ABTFilterTypeUnknown&&(d.w("Unknown filter type: setting value without type checking.",{fileName:"src/apptimize/filter/ABTFilter.hx",lineNumber:149,className:"apptimize.filter.ABTFilter",methodName:"fromJSON"}),this.value=F.field(e,Q.kABTFilterKeyValue)),this.callServerURLKey=F.field(e,Q.kABTFilterKeyCallURLKey)},isSupportedOperator:function(e){return Q.operatorFromString(e)!=X.ABTFilterOperatorUnknown},isSupportedProperty:function(e,t,r){var i=null!=e.valueForProperty(t,r);return i||d.d('Property "'+t+'" not found which is expected by a filter.',{fileName:"src/apptimize/filter/ABTFilter.hx",lineNumber:166,className:"apptimize.filter.ABTFilter",methodName:"isSupportedProperty"}),i},currentDeviceValue:function(e){return e.valueForProperty(this.property,this.propertySource)},hasSupportedProperty:function(e){return this.isSupportedProperty(e,this.property,this.propertySource)},filterMatchesEnvironment:function(e){return d.e("Unknown filter type. Filter match is unknown.",{fileName:"src/apptimize/filter/ABTFilter.hx",lineNumber:181,className:"apptimize.filter.ABTFilter",methodName:"filterMatchesEnvironment"}),Z.ABTFilterResultUnknown},getUrlKeys:function(){return null==this.callServerURLKey?[]:[this.callServerURLKey]},__class__:Q};var $=function(){Q.call(this)};(r["apptimize.filter.ABTSimpleFilter"]=$).__name__="apptimize.filter.ABTSimpleFilter",$.__super__=Q,$.prototype=a(Q.prototype,{fromJSON:function(e){Q.prototype.fromJSON.call(this,e),this.value=F.field(e,Q.kABTFilterKeyValue)},filterMatchesEnvironment:function(e){if(!this.hasSupportedProperty(e))return Z.ABTFilterResultUnknown;var t=this.currentDeviceValue(e),r=this.value;return null==t||null==r?(d.w("Filter has null value type. Filter match is unknown.",{fileName:"src/apptimize/filter/ABTFilter.hx",lineNumber:329,className:"apptimize.filter.ABTSimpleFilter",methodName:"filterMatchesEnvironment"}),Z.ABTFilterResultUnknown):or.getClass(t)==String?P.typeof(r)==h.TFloat||P.typeof(r)==h.TInt?se.ABTEvaluateNumber(t,this.filterOperator,r):or.getClass(r)!=String?(d.w("Filter value does not match property type of string. Filter match is unknown.",{fileName:"src/apptimize/filter/ABTFilter.hx",lineNumber:340,className:"apptimize.filter.ABTSimpleFilter",methodName:"filterMatchesEnvironment"}),Z.ABTFilterResultUnknown):"apptimize_version"==this.property||"system_version"==this.property||"app_version"==this.property||"operating_system_version"==this.property?se.ABTEvaluateVersionString(t,this.filterOperator,r):se.ABTEvaluateString(t,this.filterOperator,r):P.typeof(t)==h.TFloat||P.typeof(t)==h.TInt?or.getClass(r)==String?se.ABTEvaluateNumber(t,this.filterOperator,r):P.typeof(r)!=h.TFloat&&P.typeof(r)!=h.TInt?(d.w("Filter value does not match property type of number. Filter match is unknown.",{fileName:"src/apptimize/filter/ABTFilter.hx",lineNumber:358,className:"apptimize.filter.ABTSimpleFilter",methodName:"filterMatchesEnvironment"}),Z.ABTFilterResultUnknown):se.ABTEvaluateNumber(t,this.filterOperator,r):P.typeof(t)==h.TBool?(or.getClass(r)==String&&("true"==r.toLowerCase()?r=!0:"false"==r.toLowerCase()&&(r=!1)),se.ABTEvaluateBool(t,this.filterOperator,r)):(d.w("Simple filter match is unknown.",{fileName:"src/apptimize/filter/ABTFilter.hx",lineNumber:378,className:"apptimize.filter.ABTSimpleFilter",methodName:"filterMatchesEnvironment"}),Z.ABTFilterResultUnknown)},__class__:$});var ee=function(){Q.call(this)};(r["apptimize.filter.ABTCompoundFilter"]=ee).__name__="apptimize.filter.ABTCompoundFilter",ee.__super__=Q,ee.prototype=a(Q.prototype,{fromJSON:function(e){Q.prototype.fromJSON.call(this,e);for(var t=[],r=e.value,i=0;i<r.length;){var n=r[i];++i;var a=Q.filterFromJSON(n);t.push(a)}this.value=t},filterMatchesEnvironment:function(e){var t=this.value;if(t.length<1)return d.w('Compound filter "'+O.string(this)+'" has an empty compound set. Filter match is unknown.',{fileName:"src/apptimize/filter/ABTFilter.hx",lineNumber:407,className:"apptimize.filter.ABTCompoundFilter",methodName:"filterMatchesEnvironment"}),Z.ABTFilterResultUnknown;if(this.filterOperator==X.ABTFilterOperatorCompoundAnd){for(var r=Z.ABTFilterResultTrue,i=0;i<t.length;){var n=t[i];++i;var a=n.filterMatchesEnvironment(e);r=se.ABTFilterAnd(r,a)}return r}if(this.filterOperator==X.ABTFilterOperatorCompoundOr){var r=Z.ABTFilterResultFalse;for(i=0;i<t.length;){n=t[i];++i;a=n.filterMatchesEnvironment(e);r=se.ABTFilterOr(r,a)}return r}return this.filterOperator==X.ABTFilterOperatorCompoundSingleNot&&1==t.length?((r=t[0].filterMatchesEnvironment(e))==Z.ABTFilterResultFalse?r=Z.ABTFilterResultTrue:r==Z.ABTFilterResultTrue&&(r=Z.ABTFilterResultFalse),r):this.filterOperator==X.ABTFilterOperatorCompoundSingleIsNull&&1==t.length?r=t[0].filterMatchesEnvironment(e)==Z.ABTFilterResultUnknown?Z.ABTFilterResultTrue:Z.ABTFilterResultFalse:this.filterOperator==X.ABTFilterOperatorCompoundSingleIsNotNull&&1==t.length?t[0].filterMatchesEnvironment(e)!=Z.ABTFilterResultUnknown?Z.ABTFilterResultTrue:Z.ABTFilterResultFalse:(d.w('Filter "'+O.string(this)+'" has an unsupported compound operator or children count. Filter match is unknown.',{fileName:"src/apptimize/filter/ABTFilter.hx",lineNumber:463,className:"apptimize.filter.ABTCompoundFilter",methodName:"filterMatchesEnvironment"}),Z.ABTFilterResultUnknown)},getUrlKeys:function(){for(var e=[],t=0,r=this.value;t<r.length;){var i=r[t++];e.push(i.getUrlKeys())}for(var n=[],a=_r(e);a.hasNext();)for(i=_r(a.next());i.hasNext();){var s=i.next();n.push(s)}var l=B.array(n);return null==this.callServerURLKey?l:[this.callServerURLKey].concat(l)},__class__:ee});var te=function(){Q.call(this)};(r["apptimize.filter.ABTListFilter"]=te).__name__="apptimize.filter.ABTListFilter",te.__super__=Q,te.prototype=a(Q.prototype,{fromJSON:function(e){Q.prototype.fromJSON.call(this,e),this.value=e.value},filterMatchesEnvironment:function(e){if(!this.hasSupportedProperty(e))return Z.ABTFilterResultUnknown;var t=this.value,r=this.currentDeviceValue(e);if(null==r)return d.w('Filter "'+O.string(this)+'" is attempting to match against a null device property.',{fileName:"src/apptimize/filter/ABTFilter.hx",lineNumber:502,className:"apptimize.filter.ABTListFilter",methodName:"filterMatchesEnvironment"}),-1<t.indexOf(r)?this.filterOperator==X.ABTFilterOperatorInList?Z.ABTFilterResultTrue:Z.ABTFilterResultFalse:this.filterOperator==X.ABTFilterOperatorInList?Z.ABTFilterResultFalse:Z.ABTFilterResultTrue;for(var i=!1,n=0;n<t.length;){var a=t[n];++n,i=or.getClass(r)==String?i||se.ABTEvaluateString(r,X.ABTFilterOperatorEquals,a)==Z.ABTFilterResultTrue:i||se.ABTEvaluateNumber(r,X.ABTFilterOperatorEquals,a)==Z.ABTFilterResultTrue}return this.filterOperator==X.ABTFilterOperatorNotInList?i?Z.ABTFilterResultFalse:Z.ABTFilterResultTrue:i?Z.ABTFilterResultTrue:Z.ABTFilterResultFalse},__class__:te});var re=function(){Q.call(this)};(r["apptimize.filter.ABTSetFilter"]=re).__name__="apptimize.filter.ABTSetFilter",re.__super__=Q,re.prototype=a(Q.prototype,{fromJSON:function(e){Q.prototype.fromJSON.call(this,e);for(var t=[],r=e.value,i=0;i<r.length;){var n=r[i];++i,t.push(n)}this.value=t},filterMatchesEnvironment:function(e){if(this.filterOperator!=X.ABTFilterOperatorIntersection)return d.v("Set filter with unsupported operator "+O.string(this.filterOperator),{fileName:"src/apptimize/filter/ABTFilter.hx",lineNumber:554,className:"apptimize.filter.ABTSetFilter",methodName:"filterMatchesEnvironment"}),Z.ABTFilterResultUnknown;var t=e.secondaryUrlForKey(this.callServerURLKey);if(null==t)return Z.ABTFilterResultUnknown;var r=e.getSecondaryValuesForUrl(t);if(null==r)return Z.ABTFilterResultUnknown;var i=this.value;if(null==i)return d.v("Set filter with a non-list value",{fileName:"src/apptimize/filter/ABTFilter.hx",lineNumber:573,className:"apptimize.filter.ABTSetFilter",methodName:"filterMatchesEnvironment"}),Z.ABTFilterResultUnknown;for(var n=[],a=0,s=r;a<s.length;){var l=s[a];++a,0<=i.indexOf(l)&&n.push(l)}return 0==n.length?Z.ABTFilterResultFalse:Z.ABTFilterResultTrue},__class__:re});var ie=function(){Q.call(this)};(r["apptimize.filter.ABTUnknownFilter"]=ie).__name__="apptimize.filter.ABTUnknownFilter",ie.__super__=Q,ie.prototype=a(Q.prototype,{fromJSON:function(e){Q.prototype.fromJSON.call(this,e)},filterMatchesEnvironment:function(e){return d.e("Unknown filter requested. Filter match is unknown.",{fileName:"src/apptimize/filter/ABTFilter.hx",lineNumber:599,className:"apptimize.filter.ABTUnknownFilter",methodName:"filterMatchesEnvironment"}),Z.ABTFilterResultUnknown},__class__:ie});var ne=function(){Q.call(this)};(r["apptimize.filter.ABTPropertylessFilter"]=ne).__name__="apptimize.filter.ABTPropertylessFilter",ne.__super__=Q,ne.prototype=a(Q.prototype,{fromJSON:function(e){Q.prototype.fromJSON.call(this,e),this.value=F.field(e,Q.kABTFilterKeyValue)},filterMatchesEnvironment:function(e){var t=this.value;if(null==t||or.getClass(t)!=String)return d.w("Property-less filter requires a string value. Filter match is unknown.",{fileName:"src/apptimize/filter/ABTFilter.hx",lineNumber:619,className:"apptimize.filter.ABTPropertylessFilter",methodName:"filterMatchesEnvironment"}),Z.ABTFilterResultUnknown;var r=t;return this.filterOperator==X.ABTFilterOperatorPropertyIsNull?null==e.valueForProperty(r,J.ABTFilterPropertySourceDevice)?Z.ABTFilterResultTrue:Z.ABTFilterResultFalse:this.filterOperator==X.ABTFilterOperatorPropertyIsNotNull?null!=e.valueForProperty(r,J.ABTFilterPropertySourceDevice)?Z.ABTFilterResultTrue:Z.ABTFilterResultFalse:this.filterOperator==X.ABTFilterOperatorPropertyIsRecognized?1==this.isSupportedProperty(e,r,J.ABTFilterPropertySourceDevice)?Z.ABTFilterResultTrue:Z.ABTFilterResultFalse:this.filterOperator==X.ABTFilterOperatorPropertyIsNotRecognized?0==this.isSupportedProperty(e,r,J.ABTFilterPropertySourceDevice)?Z.ABTFilterResultTrue:Z.ABTFilterResultFalse:this.filterOperator==X.ABTFilterOperatorOperatorIsRecognized?1==this.isSupportedOperator(r)?Z.ABTFilterResultTrue:Z.ABTFilterResultFalse:this.filterOperator==X.ABTFilterOperatorOperatorIsNotRecognized?0==this.isSupportedOperator(r)?Z.ABTFilterResultTrue:Z.ABTFilterResultFalse:(d.w("Property-less filter attempted with an invalid operator. Filter match is unknown.",{fileName:"src/apptimize/filter/ABTFilter.hx",lineNumber:651,className:"apptimize.filter.ABTPropertylessFilter",methodName:"filterMatchesEnvironment"}),Z.ABTFilterResultUnknown)},__class__:ne});var ae=function(){Q.call(this)};(r["apptimize.filter.ABTNamedFilterProxy"]=ae).__name__="apptimize.filter.ABTNamedFilterProxy",ae.__super__=Q,ae.prototype=a(Q.prototype,{namedFilter:null,fromJSON:function(e){Q.prototype.fromJSON.call(this,e),this.namedFilter=F.field(e,Q.kABTFilterKeyNamedFilter)},filterMatchesEnvironment:function(e){return e.namedFilterResult(this.namedFilter)},__class__:ae});var se=function(){};(r["apptimize.filter.ABTFilterUtils"]=se).__name__="apptimize.filter.ABTFilterUtils",se.ABTFilterAnd=function(e,t){return e==Z.ABTFilterResultTrue&&t==Z.ABTFilterResultUnknown?Z.ABTFilterResultUnknown:e==Z.ABTFilterResultTrue&&t==Z.ABTFilterResultFalse?Z.ABTFilterResultFalse:e==Z.ABTFilterResultUnknown&&t==Z.ABTFilterResultFalse?Z.ABTFilterResultFalse:e},se.ABTFilterOr=function(e,t){return e==Z.ABTFilterResultUnknown&&t==Z.ABTFilterResultFalse?Z.ABTFilterResultUnknown:e==Z.ABTFilterResultTrue&&t==Z.ABTFilterResultFalse?Z.ABTFilterResultTrue:e==Z.ABTFilterResultTrue&&t==Z.ABTFilterResultUnknown?Z.ABTFilterResultTrue:t},se.ABTEvaluateString=function(e,t,r){var i="",n="";return null==e||null==r?(d.w("String comparison attempted with null string. Filter match is unknown.",{fileName:"src/apptimize/filter/ABTFilter.hx",lineNumber:703,className:"apptimize.filter.ABTFilterUtils",methodName:"ABTEvaluateString"}),Z.ABTFilterResultUnknown):(or.getClass(e)==String&&(i=e),or.getClass(r)==String&&(n=r),i=i.toLowerCase(),n=n.toLowerCase(),t==X.ABTFilterOperatorEquals?i==n?Z.ABTFilterResultTrue:Z.ABTFilterResultFalse:t==X.ABTFilterOperatorNotEquals?i!=n?Z.ABTFilterResultTrue:Z.ABTFilterResultFalse:(d.w("String comparison attempted with an invalid operator. Filter match is unknown.",{fileName:"src/apptimize/filter/ABTFilter.hx",lineNumber:723,className:"apptimize.filter.ABTFilterUtils",methodName:"ABTEvaluateString"}),Z.ABTFilterResultUnknown))},se.ABTEvaluateBool=function(e,t,r){return t==X.ABTFilterOperatorEquals?e==r?Z.ABTFilterResultTrue:Z.ABTFilterResultFalse:t==X.ABTFilterOperatorNotEquals?e!=r?Z.ABTFilterResultTrue:Z.ABTFilterResultFalse:(d.w("Bool comparison attempted with an invalid operator. Filter match is unknown.",{fileName:"src/apptimize/filter/ABTFilter.hx",lineNumber:732,className:"apptimize.filter.ABTFilterUtils",methodName:"ABTEvaluateBool"}),Z.ABTFilterResultUnknown)},se.ABTEvaluateNumber=function(e,t,r){var i,n;return null==e||null==r?Z.ABTFilterResultUnknown:(i=or.getClass(e)==String?parseFloat(e):e,n=or.getClass(r)==String?parseFloat(r):r,t==X.ABTFilterOperatorEquals?i==n?Z.ABTFilterResultTrue:Z.ABTFilterResultFalse:t==X.ABTFilterOperatorNotEquals?i!=n?Z.ABTFilterResultTrue:Z.ABTFilterResultFalse:t==X.ABTFilterOperatorGreaterThan?n<i?Z.ABTFilterResultTrue:Z.ABTFilterResultFalse:t==X.ABTFilterOperatorGreaterThanOrEqual?n<=i?Z.ABTFilterResultTrue:Z.ABTFilterResultFalse:t==X.ABTFilterOperatorLessThan?i<n?Z.ABTFilterResultTrue:Z.ABTFilterResultFalse:t==X.ABTFilterOperatorLessThanOrEqual?i<=n?Z.ABTFilterResultTrue:Z.ABTFilterResultFalse:(d.w("Number comparison attempted with an invalid operator. Filter match is unknown.",{fileName:"src/apptimize/filter/ABTFilter.hx",lineNumber:764,className:"apptimize.filter.ABTFilterUtils",methodName:"ABTEvaluateNumber"}),Z.ABTFilterResultUnknown))},se.ABTEvaluateVersionString=function(e,t,r){if(null!=e&&""!=e||(e="0"),null!=r&&""!=r||(r="0"),or.getClass(e)!=String||or.getClass(r)!=String)return d.w("Unable to compare versions as values are not strings. Filter match is unknown.",{fileName:"src/apptimize/filter/ABTFilter.hx",lineNumber:782,className:"apptimize.filter.ABTFilterUtils",methodName:"ABTEvaluateVersionString"}),Z.ABTFilterResultUnknown;var i=e,n=r,a=i.split("."),s=n.split("."),l=a.length;if(l<3)for(var o=l,u=3;o<u;){o++;a.push("0")}var h,c,p=s.length;if(p<3)for(o=p,u=3;o<u;){o++;s.push("0")}i=a.join("."),n=s.join(".");try{h=cr.stringToVersion(i)}catch(o){return gt.lastError=o,d.w("Unable to validate left (current) version: "+i+". Filter match is unknown.",{fileName:"src/apptimize/filter/ABTFilter.hx",lineNumber:822,className:"apptimize.filter.ABTFilterUtils",methodName:"ABTEvaluateVersionString"}),Z.ABTFilterResultUnknown}try{c=cr.stringToVersion(n)}catch(o){return gt.lastError=o,d.w("Unable to validate right (filter) version: "+n+". Filter match is unknown.",{fileName:"src/apptimize/filter/ABTFilter.hx",lineNumber:828,className:"apptimize.filter.ABTFilterUtils",methodName:"ABTEvaluateVersionString"}),Z.ABTFilterResultUnknown}return t==X.ABTFilterOperatorEquals?cr.equals(h,c)?Z.ABTFilterResultTrue:Z.ABTFilterResultFalse:t==X.ABTFilterOperatorNotEquals?cr.equals(h,c)?Z.ABTFilterResultFalse:Z.ABTFilterResultTrue:t==X.ABTFilterOperatorGreaterThan?cr.greaterThan(h,c)?Z.ABTFilterResultTrue:Z.ABTFilterResultFalse:t==X.ABTFilterOperatorGreaterThanOrEqual?cr.greaterThanOrEqual(h,c)?Z.ABTFilterResultTrue:Z.ABTFilterResultFalse:t==X.ABTFilterOperatorLessThan?cr.lessThan(h,c)?Z.ABTFilterResultTrue:Z.ABTFilterResultFalse:t==X.ABTFilterOperatorLessThanOrEqual?cr.lessThanOrEqual(h,c)?Z.ABTFilterResultTrue:Z.ABTFilterResultFalse:(d.w("Version comparison attempted with an invalid operator. Filter match is unknown.",{fileName:"src/apptimize/filter/ABTFilter.hx",lineNumber:840,className:"apptimize.filter.ABTFilterUtils",methodName:"ABTEvaluateVersionString"}),Z.ABTFilterResultUnknown)};var le=function(e,t,r,i,n,a){this.userID=e,this.anonID=t,this.internalProps=a,this.customAttrs=r,this.appkey=i,this.appProps=n};(r["apptimize.filter.ABTFilterEnvParams"]=le).__name__="apptimize.filter.ABTFilterEnvParams",le.prototype={userID:null,anonID:null,customAttrs:null,appProps:null,appkey:null,internalProps:null,__class__:le};var oe=function(e,t,r,i,n,a){this.userID=e.userID,this.anonID=e.anonID,this.customProperties=new Je,this.secondaryValueUrlTemplates=t,this.secondaryValueLists=r,this.applicationProperties=e.appProps,this.internalProperties=e.internalProps,this.appkey=e.appkey,this.sequenceNumber=i,null!=e.customAttrs&&this.customProperties.setProperties(e.customAttrs),this.customProperties.setPropertyForNamespace("app_key",e.appkey,Ze.ApptimizeLocal),this.namedFilters=n,null==this.namedFilters&&(this.namedFilters=[]);for(var s=new D,l=0,o=this.namedFilters;l<o.length;){var u=o[l];++l,s.h[u.filterName]=u}this.namedFilterCalculator=new ue(s,a,[])};(r["apptimize.filter.ABTFilterEnvironment"]=oe).__name__="apptimize.filter.ABTFilterEnvironment",oe.prototype={userID:null,anonID:null,customProperties:null,applicationProperties:null,internalProperties:null,sequenceNumber:null,appkey:null,secondaryValueUrlTemplates:null,secondaryValueLists:null,namedFilters:null,namedFilterCalculator:null,hash:function(){var e=new $e,t=[null==this.userID?this.anonID:this.userID,this.customProperties.availableProperties,this.applicationProperties.availableProperties,this.internalProperties.availableProperties,this.secondaryValueLists,this.secondaryValueUrlTemplates,this.sequenceNumber];return e.push(wt.ofString(Pt.print(t,null,null))),e.hash().toHex()},getUniqueUserID:function(){return this.appkey+"_"+this.getUserOrAnonID()},getUserOrAnonID:function(){return null!=this.userID?this.userID:this.anonID},getUserID:function(){return this.userID},getAnonID:function(){return this.anonID},getSecondaryValuesForUrl:function(e){return this.secondaryValueLists.h[e]},valueForProperty:function(e,t){if(t==J.ABTFilterPropertySourceDevice)return this.applicationProperties.valueForProperty(e);if(t==J.ABTFilterPropertySourceUser)return this.customProperties.valueForNamespacedProperty(e,Ze.UserAttribute);if(t==J.ABTFilterPropertySourcePrefixed){var r=this.customProperties.valueForProperty(e);return null==r&&(r=this.internalProperties.valueForProperty(e)),r}return null},namedFilterResult:function(e){return this.namedFilterCalculator.resolve(e,this)},secondaryUrlForKey:function(e){if(null==e||""==e)return null;var t=this.secondaryValueUrlTemplates.h[e];if(null==t)return d.e("unknown secondary url key "+e,{fileName:"src/apptimize/filter/ABTFilterEnvironment.hx",lineNumber:160,className:"apptimize.filter.ABTFilterEnvironment",methodName:"secondaryUrlForKey"}),null;var r=this.injectPropsInUrlTemplate(t);if(null==r)return null;var i="&";return-1==r.indexOf("?")&&(i="?"),""+r+i+"metadataSequenceNumber="+this.sequenceNumber},injectPropsInUrlTemplate:function(e){var i=this,t=new o("\\{([^}]+)}","g"),n=!1,r=t.map(e,function(e){var t=e.matched(1),r=i.valueForProperty(t,J.ABTFilterPropertySourcePrefixed);return null==r?(n=!0,"<MISSING:"+t+"}>"):encodeURIComponent(r)});return n?null:r},__class__:oe};var ue=function(e,t,r){this.allNamedFilters=e,this.evaluations=t,this.evaluationStack=r};(r["apptimize.filter.ABTNamedFilterCalculator"]=ue).__name__="apptimize.filter.ABTNamedFilterCalculator",ue.prototype={allNamedFilters:null,evaluations:null,evaluationStack:null,resolve:function(e,t){var r=this.allNamedFilters.h[e];if(null==r)return d.e("Failed to resolve filter "+e,{fileName:"src/apptimize/filter/ABTFilterEnvironment.hx",lineNumber:230,className:"apptimize.filter.ABTNamedFilterCalculator",methodName:"resolve"}),Z.ABTFilterResultUnknown;var i=this.getExistingResult(r);if(null!=i)return i;if(-1!=this.evaluationStack.indexOf(e))return d.e("Found a circular reference on resolving "+e,{fileName:"src/apptimize/filter/ABTFilterEnvironment.hx",lineNumber:241,className:"apptimize.filter.ABTNamedFilterCalculator",methodName:"resolve"}),Z.ABTFilterResultUnknown;this.evaluationStack.push(e);var n=r.performFilterMatchingWithEnvironment(t).result;return this.evaluations.h[e]=n,Y.remove(this.evaluationStack,e),n},getExistingResult:function(e){if(!Object.prototype.hasOwnProperty.call(this.evaluations.h,e.filterName))return null;var t=this.evaluations.h[e.filterName];return t==Z.ABTFilterResultTrue&&e.trueIsSticky||t==Z.ABTFilterResultFalse&&e.falseIsSticky||t==Z.ABTFilterResultUnknown&&e.nullIsSticky?t:null},__class__:ue};var he=function(){this.initialize()};(r["apptimize.filter.ABTFilterableObject"]=he).__name__="apptimize.filter.ABTFilterableObject",he.prototype={filters:null,filters2:null,overridingInclusiveFilters:null,matchingFilters:null,nonMatchingFilters:null,initialize:function(){this.filters=[],this.filters2=[],this.matchingFilters=[],this.nonMatchingFilters=[],this.overridingInclusiveFilters=[]},performFilterMatchingWithEnvironment:function(e){for(var t={result:Z.ABTFilterResultTrue,overriding:!1},r=0,i=this.filters;r<i.length;){var n=i[r];++r;var a=n.filterMatchesEnvironment(e);t.result=se.ABTFilterAnd(t.result,a)}for(r=0,i=this.overridingInclusiveFilters;r<i.length;){n=i[r];++r,(a=n.filterMatchesEnvironment(e))==Z.ABTFilterResultTrue&&(t.result=Z.ABTFilterResultTrue,t.overriding=!0)}return t},computeNewOverrideState:function(e,t){if(e){if(t.overriding)return!1}else if(t.result!=Z.ABTFilterResultTrue)return!0;return e},fromJSON:function(e){this.filters=this.jsonToFilterArray(e.filters),this.filters2=this.jsonToFilterArray(e.filters2),this.overridingInclusiveFilters=this.jsonToFilterArray(e.overridingInclusiveFilters),0<this.filters2.length&&(this.filters=this.filters.concat(this.filters2))},jsonToFilterArray:function(e){for(var t=null==e?[]:e,r=new Array(t.length),i=0,n=t.length;i<n;){var a=i++;r[a]=Q.filterFromJSON(t[a])}return r},getUrlKeys:function(){return this.getLocalUrlKeys().concat(this.getUrlKeysFrom(this.getUrlKeyProviders()))},getUrlKeyProviders:function(){return[]},getUrlKeysFrom:function(e){for(var t=[],r=0,i=e;r<i.length;){var n=i[r++];t.push(n.getUrlKeys())}for(var a=[],s=_r(t);s.hasNext();)for(n=_r(s.next());n.hasNext();){var l=n.next();a.push(l)}return B.array(a)},getLocalUrlKeys:function(){return this.getUrlKeysFrom(this.filters).concat(this.getUrlKeysFrom(this.overridingInclusiveFilters))},asUrlProviders:function(e){for(var t=new Array(e.length),r=0,i=e.length;r<i;){var n=r++;t[n]=e[n]}return t},__class__:he};var ce=function(e){he.call(this),this.fromJSON(e)};(r["apptimize.filter.ABTNamedFilter"]=ce).__name__="apptimize.filter.ABTNamedFilter",ce.__super__=he,ce.prototype=a(he.prototype,{filterName:null,trueIsSticky:null,falseIsSticky:null,nullIsSticky:null,fromJSON:function(e){he.prototype.fromJSON.call(this,e),this.filterName=F.field(e,ce.kABTNamedFilterKeyFilterName),this.trueIsSticky=F.field(e,ce.kABTNamedFilterKeyTrueIsSticky),this.falseIsSticky=F.field(e,ce.kABTNamedFilterKeyFalseIsSticky),this.nullIsSticky=F.field(e,ce.kABTNamedFilterKeyNullIsSticky)},__class__:ce});var pe=function(){this.responseCode=-1,this.text="",this.bytes=null};(r["apptimize.http.ABTHttpResponse"]=pe).__name__="apptimize.http.ABTHttpResponse",pe.prototype={bytes:null,text:null,responseCode:null,etag:null,isSuccess:function(){return 200==this.responseCode||304==this.responseCode},__class__:pe};var _e=function(){};(r["apptimize.http.ABTHttpRequestInterface"]=_e).__name__="apptimize.http.ABTHttpRequestInterface",_e.__isInterface__=!0,_e.prototype={get:null,post:null,__class__:_e};var me=function(){};(r["apptimize.http.ABTHttpRequest"]=me).__name__="apptimize.http.ABTHttpRequest",me.getRequestInterface=function(){return me.getRealRequestInterface()},me.getRealRequestInterface=function(){return new fe},me.get=function(e,t,r,i){me.getRequestInterface().get(e,t,r,i)},me.post=function(e,t,r,i,n){me.getRequestInterface().post(e,t,r,i,n)};var fe=function(){};(r["apptimize.http.ABTHttpRequestJS"]=fe).__name__="apptimize.http.ABTHttpRequestJS",fe.__interfaces__=[_e],fe.prototype={_sentDate:null,get:function(n,e,a,s){var l=this,o=new XMLHttpRequest;if(this._sentDate=new Date,o.open("GET",n,!0),null!=e)for(var t=e.h,r=Object.keys(t),i=r.length,u=0;u<i;){var h=r[u++];o.setRequestHeader(h,e.h[h])}this._logRequest("GET",n,e),o.responseType="arraybuffer",o.onerror=function(e){var t=new pe;o.response;t.responseCode=o.status,l._logResponse(n,o),s(t)},o.onload=function(e){var t=new pe,r=o.response;if(null==r)return r=o.responseText,t.text="Unable to parse response on this browser.",t.responseCode=o.status,l._logResponse(n,o,wt.ofString(t.text)),void s(t);var i=l._getDataForResponse(r);l._logResponse(n,o,i),t.bytes=i.b.bufferValue,t.responseCode=o.status,t.etag=o.getResponseHeader("etag"),t.isSuccess()?a(t):s(t)},o.send()},post:function(n,e,t,a,s){var l=this,o=new XMLHttpRequest;this._sentDate=new Date,o.open("POST",n,!0);var r=new D;r.h["X-App-Key"]=t,r.h["Content-Type"]="application/json; charset=UTF-8";for(var i=r,u=i.h,h=Object.keys(u),c=h.length,p=0;p<c;){var _=h[p++];o.setRequestHeader(_,i.h[_])}this._logRequest("POST",n,i,e),o.onerror=function(e){var t=new pe;o.response;t.responseCode=o.status,l._logResponse(n,o),s(t)},o.onload=function(e){var t=new pe,r=o.response;if(null==r)return r=o.responseText,t.text="Unable to parse response on this browser.",t.responseCode=o.status,l._logResponse(n,o,wt.ofString(t.text)),void s(t);var i=l._getDataForResponse(r);l._logResponse(n,o,i),t.bytes=i.b.bufferValue,t.responseCode=o.status,t.isSuccess()?a(t):s(t)},o.send(e.b.bufferValue)},_logRequest:function(e,t,r,i){if(de.shouldLog()){var n=null==r?"[]":D.stringify(r.h),a=null==i?"":i.toString();de.logRequest(e,t,n,a)}},_logResponse:function(e,t,r){if(de.shouldLog()){var i=(new Date).getTime()-this._sentDate.getTime(),n=null==r?"":r.toString();de.logResponse(e,i,t.getAllResponseHeaders().toString(),n)}},_getDataForResponse:function(e){if("string"==typeof e)return wt.ofString(e);for(var t=new Uint8Array(e),r=new wt(new ArrayBuffer(t.length)),i=0,n=t.length;i<n;){var a=i++;r.b[a]=t[a]}return r},__class__:fe};var de=function(){};(r["apptimize.http.ABTNetworkLogger"]=de).__name__="apptimize.http.ABTNetworkLogger",de.shouldLog=function(){return d.logLevel==d.LOG_LEVEL_VERBOSE},de.logRequest=function(e,t,r,i){d.v("URL Request "+e+" "+t+"\nHeaders: "+O.string(r)+"\nBody: "+i,{fileName:"src/apptimize/http/ABTNetworkLogger.hx",lineNumber:9,className:"apptimize.http.ABTNetworkLogger",methodName:"logRequest"})},de.logResponse=function(e,t,r,i){d.v("URL Response "+e+"\nHeaders: "+O.string(r)+"\nBody: "+i+"\nResponse Time(ms): "+t,{fileName:"src/apptimize/http/ABTNetworkLogger.hx",lineNumber:13,className:"apptimize.http.ABTNetworkLogger",methodName:"logResponse"})};var ge=function(){he.call(this)};(r["apptimize.models.ABTAlteration"]=ge).__name__="apptimize.models.ABTAlteration",ge.alterationFromJSON=function(e,t){var r=ge.classForType(e.type),i=P.createInstance(r,[]);return i.initialize(),i.fromJSON(e),i._variant=t,i},ge.classForType=function(e){return"block"==e?ve:Ae},ge.__super__=he,ge.prototype=a(he.prototype,{_variant:null,_key:null,fromJSON:function(e){he.prototype.fromJSON.call(this,e)},selectAlterationsIntoArray:function(e,t,r){var i=this.performFilterMatchingWithEnvironment(e);(i.overriding||!r)&&i.result==Z.ABTFilterResultTrue&&(d.v('Selecting alteration "'+this.getKey()+'" for variant "'+this.getVariant().getVariantName()+'" for user '+e.getUserOrAnonID()+".",{fileName:"src/apptimize/models/ABTAlteration.hx",lineNumber:50,className:"apptimize.models.ABTAlteration",methodName:"selectAlterationsIntoArray"}),t.push(this))},getKey:function(){return this._key},getVariant:function(){return this._variant},__class__:ge});var ve=function(){ge.call(this)};(r["apptimize.models.ABTBlockAlteration"]=ve).__name__="apptimize.models.ABTBlockAlteration",ve.__super__=ge,ve.prototype=a(ge.prototype,{methodName:null,fromJSON:function(e){ge.prototype.fromJSON.call(this,e),this._key=e.key,this.methodName=e.methodName},__class__:ve});var Ae=function(){ge.call(this)};(r["apptimize.models.ABTValueAlteration"]=Ae).__name__="apptimize.models.ABTValueAlteration",Ae.__super__=ge,Ae.prototype=a(ge.prototype,{_value:null,_type:null,_nestedType:null,_useDefaultValue:null,fromJSON:function(e){ge.prototype.fromJSON.call(this,e),this._key=e.key,this._value=e.value,this._type=e.type,this._nestedType=e.nestedType,this._useDefaultValue=e.useDefaultValue,null!=this._value&&"dictionary"==this._type&&(this._value=lt.dynamicToNativeDictionary(this._value))},useDefaultValue:function(){return this._useDefaultValue},getValue:function(){return this._value},getType:function(){return this._type},getNestedType:function(){return this._nestedType},__class__:Ae});var ye=function(){};(r["apptimize.models.ABTJSONObject"]=ye).__name__="apptimize.models.ABTJSONObject";var Te=function(){this._alterationCache=new rt(He.sharedInstance().valueForProperty(He.ALTERATION_CACHE_SIZE_KEY)),this._namedFiltersEvaluations=new D};(r["apptimize.models.ABTMetadata"]=Te).__name__="apptimize.models.ABTMetadata",Te.loadFromString=function(e){var t=new Te;return t._load_data(e),t},Te.prototype={_jsonData:null,_seedGroups:null,_hotfixes:null,_alterationCache:null,_namedFilters:null,_namedFiltersEvaluations:null,_etag:null,_secondaryValues:null,resetFilterEvaluations:function(){this._namedFiltersEvaluations.h=Object.create(null)},copyPersistentValues:function(e){null!=e&&null!=e._namedFiltersEvaluations&&(this._namedFiltersEvaluations=D.createCopy(e._namedFiltersEvaluations.h))},makeEnvironment:function(e,t){var r=this._secondaryValues,i=new D,n=this.getGroupsUrlTemplate("lpilot_targeting_id");i.h.groupsApiUrl=n;n=this.getGroupsUrlTemplate("m_cohort_id");i.h.cohortsApiUrl=n;var a=i;return null!=t&&null!=t.callServerUrls&&(a=t.callServerUrls),new oe(e,a,r,this.getSequenceNumber(),this._namedFilters,this._namedFiltersEvaluations)},getGroupsUrlTemplate:function(e){return He.sharedInstance().valueForProperty(He.GROUPS_BASE_URL_KEY)+"/api/pilot-groups/?appKey={lapp_key}&pilotTargetingId={"+e+"}"},_load_data:function(e){this._alterationCache=new rt(He.sharedInstance().valueForProperty(He.ALTERATION_CACHE_SIZE_KEY)),this._jsonData=new Ot(e).doParse(),this.reprocessJson()},reprocessJson:function(){if(null==this._jsonData)throw ct.thrown("Unable to process metadata");if(this._seedGroups=[],null!=this._jsonData.seedGroups)for(var e=0,t=this._jsonData.seedGroups;e<t.length;){var r=t[e];++e,this._seedGroups.push(new xe(r))}if(this._hotfixes=[],null!=this._jsonData.hotfixes)for(e=0,t=this._jsonData.hotfixes;e<t.length;){var i=t[e];++e,this._hotfixes.push(new ze(i))}if(d.i("JSONNamedFilters: "+O.string(this._jsonData.namedFilters),{fileName:"src/apptimize/models/ABTMetadata.hx",lineNumber:199,className:"apptimize.models.ABTMetadata",methodName:"reprocessJson"}),this._namedFilters=[],null!=this._jsonData.namedFilters)for(e=0,t=this._jsonData.namedFilters;e<t.length;){var n=t[e];++e,this._namedFilters.push(new ce(n))}},getAllVariants:function(){for(var e=[],t=0,r=this._seedGroups;t<r.length;){var i=r[t];++t,i.addAllVariantsIntoArray(e)}return e},clone:function(){var e=new Te;return e.setEtag(this.getEtag()),e._jsonData=this._jsonData,e.copyPersistentValues(this),e.reprocessJson(),e},uncachedSelectAlterationsIntoArray:function(e,t){null==t&&(t=!0);var r=e.hash();if(t){var i=this.getAlterationCacheValue(r);if(null!=i)return i}for(var n=[],a=0,s=this._seedGroups;a<s.length;){var l=s[a];++a,l.selectAlterationsIntoArray(e,n,!1)}for(a=0,s=this._hotfixes;a<s.length;){var o=s[a];++a,o.selectAlterationsIntoArray(e,n,!1)}return n},selectAlterationsIntoArray:function(e){var t=e.hash(),r=this.getAlterationCacheValue(t);if(null!=r)return r;var i=this.uncachedSelectAlterationsIntoArray(e,!1);return this._alterationCache.insert(t,i),this.metadataProcessed(e,i),i},getAlterationCacheValue:function(e){return this._alterationCache.getValue(e)},extractNeededSecondaryUrls:function(e){for(var t=[],r=0,i=this._seedGroups;r<i.length;){var n=i[r];++r,t=t.concat(n.getUrlKeys())}for(r=0,i=this._hotfixes;r<i.length;){var a=i[r];++r,t=t.concat(a.getUrlKeys())}var s=[],l=Object.create(null);for(r=0;r<t.length;){var o=t[r];if(++r,!Object.prototype.hasOwnProperty.call(l,o)){var u=e.secondaryUrlForKey(o);null!=(l[o]=u)&&s.push(u)}}return s},extractSdkParameters:function(e){var t=new Ne(null);if(null!=this._seedGroups)for(var r=0,i=this._seedGroups;r<i.length;){var n=i[r];++r,n.applySdkParameters(t,e)}return t},metadataProcessed:function(e,t){var r=new Fe(e,this.getSequenceNumber(),this.getVariantsCyclesPhases(t));C.sharedInstance().addResultLogEntry(e,r)},getVariantsCyclesPhases:function(e){for(var t=new zt,r=0;r<e.length;){var i=e[r];++r;var n,a=i.getVariant(),s=a.getPhase(),l="v"+a.getVariantID()+"_"+a.getCycle();if(We.sharedInstance().isNamespacedPropertyAvailable(l,Ze.ApptimizeInternal)&&(s=We.sharedInstance().valueForNamespacedProperty(l,Ze.ApptimizeInternal)),or.getClass(a)!=ze){var o=a.getVariantID();n=!t.h.hasOwnProperty(o)}else n=!1;if(n){var u=a.getVariantID(),h={v:a.getVariantID(),c:a.getCycle(),p:s};t.h[u]=h}}return B.array(t)},clearAlterationCache:function(){this._alterationCache.clear()},getMetaData:function(){return this._jsonData},getSequenceNumber:function(){return this._jsonData.sequenceNumber},getCheckinUrls:function(){return this._jsonData.checkinUrls},getAppKey:function(){return this._jsonData.appKey},getEtag:function(){return this._etag},setEtag:function(e){this._etag=e},setSecondaryValues:function(e){this._secondaryValues=e},getSecondaryValues:function(){return this._secondaryValues},getDisabledVersions:function(){var e=F.field(this._jsonData,"disableAllVersions"),t=F.field(this._jsonData,"disabledCrossPlatformVersions"),r=[];return e&&r.push(I.getApptimizeSDKVersion()),null!=t&&(r=r.concat(this._jsonData.disabledCrossPlatformVersions)),r},hxSerialize:function(e){this.serializeV1(e),e.serialize(this._secondaryValues),e.serialize(this._namedFiltersEvaluations)},serializeV1:function(e){e.serialize(Pt.print(this._jsonData,null,null)),e.serialize(this._etag)},hxUnserialize:function(e){this._load_data(e.unserialize()),this._etag=e.unserialize();try{this._secondaryValues=e.unserialize()}catch(e){gt.lastError=e,this._secondaryValues=null}try{this._namedFiltersEvaluations=e.unserialize()}catch(e){gt.lastError=e,this._namedFiltersEvaluations=new D}},__class__:Te};var be=function(e){this.fromJSON(e)};(r["apptimize.models.ABTRange"]=be).__name__="apptimize.models.ABTRange",be.prototype={start:null,end:null,fromJSON:function(e){this.start=e[0],this.end=e[1]},__class__:be};var we=function(e){he.call(this),this.fromJSON(e)};(r["apptimize.models.ABTRangeGroup"]=we).__name__="apptimize.models.ABTRangeGroup",we.__super__=he,we.prototype=a(he.prototype,{ranges:null,sdkParameters:null,seedGroups:null,variants:null,fromJSON:function(e){he.prototype.fromJSON.call(this,e);var t=e;if(this.ranges=[],null!=t.ranges)for(var r=0,i=t.ranges;r<i.length;){var n=i[r];++r,this.ranges.push(new be(n))}if(this.seedGroups=[],null!=t.seedGroups)for(r=0,i=t.seedGroups;r<i.length;){var a=i[r];++r,this.seedGroups.push(new xe(a))}if(this.variants=[],null!=t.variants)for(r=0,i=t.variants;r<i.length;){var s=i[r];++r,this.variants.push(new Ee(s))}Object.prototype.hasOwnProperty.call(e,"sdkParameters")&&(this.sdkParameters=new Ne(e.sdkParameters))},addAllVariantsIntoArray:function(e){for(var t=0,r=this.variants;t<r.length;){var i=r[t];++t,e.push(i)}for(t=0,r=this.seedGroups;t<r.length;){var n=r[t];++t,n.addAllVariantsIntoArray(e)}},selectAlterationsIntoArray:function(e,t,r){for(var i=this.performFilterMatchingWithEnvironment(e),n=this.computeNewOverrideState(r,i),a=0,s=this.variants;a<s.length;){var l=s[a];++a,l.selectAlterationsIntoArray(e,t,n)}for(a=0,s=this.seedGroups;a<s.length;){var o=s[a];++a,o.selectAlterationsIntoArray(e,t,n)}},isSelectedBySeed:function(e){for(var t=0,r=this.ranges;t<r.length;){var i=r[t];if(++t,e>=i.start&&e<i.end)return!0}return!1},getUrlKeyProviders:function(){return this.asUrlProviders(this.seedGroups).concat(this.asUrlProviders(this.variants))},applySdkParameters:function(e,t){null!=this.sdkParameters&&e.mergeOther(this.sdkParameters);for(var r=0,i=this.seedGroups;r<i.length;){var n=i[r];++r,n.applySdkParameters(e,t)}},__class__:we});var Ne=function(e){this.minPostFrequencyMs=null,(this.callServerUrls=null)!=e&&this.fromJSON(e)};(r["apptimize.models.ABTSdkParameters"]=Ne).__name__="apptimize.models.ABTSdkParameters",Ne.prototype={minPostFrequencyMs:null,callServerUrls:null,fromJSON:function(e){var t=F.field(e,"minPostFrequencyMs");null!=t&&(this.minPostFrequencyMs=t),null!=(t=F.field(e,"callServerUrls"))&&(this.callServerUrls=lt.dynamicObjectToStringMap(t))},mergeOther:function(e){null!=e.minPostFrequencyMs&&(this.minPostFrequencyMs=e.minPostFrequencyMs),null!=e.callServerUrls&&(this.callServerUrls=e.callServerUrls)},__class__:Ne};var Se=function(e){this.fromDef(e)};(r["apptimize.models.ABTSeed"]=Se).__name__="apptimize.models.ABTSeed",Se.prototype={type:null,value:null,fromDef:function(e){this.type=e.type,this.value=e.value},computedSeedMaterial:function(e,t){if("guid"==this.type){if(null!=e.getUserID()&&0==t)return $e.Sha1(wt.ofString(e.getUserID()));var r=wt.ofString("0123456789abcdef"),i=null==e.getUserID()?e.getAnonID():e.getUserID(),n=j.replace(i,"-","").toLowerCase();try{if(32==n.length)return $e.Sha1(new xt(r).decodeBytes(wt.ofString(n)))}catch(e){if(gt.lastError=e,"string"!=typeof ct.caught(e).unwrap())throw e;d.w("Invalid GUID supplied - treating as string ID:"+n,{fileName:"src/apptimize/models/ABTSeed.hx",lineNumber:38,className:"apptimize.models.ABTSeed",methodName:"computedSeedMaterial"})}return $e.Sha1(wt.ofString(i))}return null!=this.value?$e.Sha1(wt.ofString(this.value)):(d.e("Unable to calculate seed for supplied user ID of type: "+this.type+".",{fileName:"src/apptimize/models/ABTSeed.hx",lineNumber:46,className:"apptimize.models.ABTSeed",methodName:"computedSeedMaterial"}),null)},__class__:Se};var xe=function(e){he.call(this),this.fromJSON(e)};(r["apptimize.models.ABTSeedGroup"]=xe).__name__="apptimize.models.ABTSeedGroup",xe.__super__=he,xe.prototype=a(he.prototype,{rangeGroups:null,seeds:null,fromJSON:function(e){he.prototype.fromJSON.call(this,e);var t=e;if(this.rangeGroups=[],null!=t.rangeGroups)for(var r=0,i=t.rangeGroups;r<i.length;){var n=i[r];++r,this.rangeGroups.push(new we(n))}if(this.seeds=[],null!=t.seeds)for(r=0,i=t.seeds;r<i.length;){var a=i[r];++r,this.seeds.push(new Se(a))}},computedSeedMaterial:function(e,t){for(var r=new Ct,i=0,n=this.seeds;i<n.length;){var a=n[i];++i;var s=a.computedSeedMaterial(e,t);r.addBytes(s,0,s.length)}return $e.Sha1(r.getBytes())},seed:function(e){var t=this.shouldForceLegacyEncoding(e),r=this.computedSeedMaterial(e,t),i=r.length;if(i<4)return d.e("User ID length too short for seed: "+i+".",{fileName:"src/apptimize/models/ABTSeedGroup.hx",lineNumber:65,className:"apptimize.models.ABTSeedGroup",methodName:"seed"}),0;var n=i-4,a=r.b[n+3]|r.b[n+2]<<8|r.b[n+1]<<16|r.b[n]<<24;return a&=1073741823,t?d.v("Using Legacy seed for user: "+e.getAnonID()+":"+e.getUserID()+": "+a+".",{fileName:"src/apptimize/models/ABTSeedGroup.hx",lineNumber:78,className:"apptimize.models.ABTSeedGroup",methodName:"seed"}):d.v("Got seed for user: "+e.getAnonID()+":"+e.getUserID()+": "+a+".",{fileName:"src/apptimize/models/ABTSeedGroup.hx",lineNumber:80,className:"apptimize.models.ABTSeedGroup",methodName:"seed"}),a},selectAlterationsIntoArray:function(e,t,r){var i=this.performFilterMatchingWithEnvironment(e),n=this.computeNewOverrideState(r,i),a=this.seed(e);d.v("Calculated seed for user "+e.getAnonID()+":"+e.getUserID()+": "+a+".",{fileName:"src/apptimize/models/ABTSeedGroup.hx",lineNumber:97,className:"apptimize.models.ABTSeedGroup",methodName:"selectAlterationsIntoArray"});for(var s=0,l=this.rangeGroups;s<l.length;){var o=l[s];++s,o.isSelectedBySeed(a)?o.selectAlterationsIntoArray(e,t,n):o.selectAlterationsIntoArray(e,t,!0)}},addAllVariantsIntoArray:function(e){for(var t=0,r=this.rangeGroups;t<r.length;){var i=r[t];++t,i.addAllVariantsIntoArray(e)}},getUrlKeyProviders:function(){return this.asUrlProviders(this.rangeGroups)},applySdkParameters:function(e,t){if(this.performFilterMatchingWithEnvironment(t).result==Z.ABTFilterResultTrue)for(var r=this.seed(t),i=0,n=this.rangeGroups;i<n.length;){var a=n[i];++i,a.isSelectedBySeed(r)&&a.applySdkParameters(e,t)}},shouldForceLegacyEncoding:function(e){for(var t=!1,r=!1,i=0,n=0,a=this.seeds;n<a.length;){var s=a[n];if(++n,"constant"!=s.type||"experiment"!=s.value&&"feature flag"!=s.value&&"feature config"!=s.value){if(r&&0==i){var l=O.parseInt(s.value);null!=l&&(i=l)}}else r=!0}var o=He.sharedInstance().valueForProperty(He.APPTIMIZE_MAXEXP_SEED_KEY);return r&&i<o&&(t=!0),t},__class__:xe});var Ee=function(e){he.call(this),this.fromJSON(e)};(r["apptimize.models.ABTVariant"]=Ee).__name__="apptimize.models.ABTVariant",Ee.__super__=he,Ee.prototype=a(he.prototype,{alterations:null,alterations2:null,codeBlockName:null,experimentId:null,experimentName:null,experimentType:null,startTime:null,variantId:null,variantName:null,cycle:null,phase:null,fromJSON:function(e){he.prototype.fromJSON.call(this,e);var t=e;this.alterations=[],this.alterations2=[];for(var r=0,i=t.alterations;r<i.length;){var n=i[r];++r,this.alterations.push(ge.alterationFromJSON(n,this))}if(this.codeBlockName=t.codeBlockName,this.variantId=t.variantId,this.experimentId=t.experimentId,or.getClass(this)!=ze&&(this.experimentName=t.experimentName,this.experimentType=t.experimentType,this.startTime=t.startTime,this.variantName=t.variantName,this.cycle=t.cycle,this.phase=t.phase),Object.prototype.hasOwnProperty.call(t,"alterations2")&&null!=t.alterations2){for(r=0,i=t.alterations2;r<i.length;){n=i[r];++r,this.alterations2.push(ge.alterationFromJSON(n,this))}this.alterations=this.alterations.concat(this.alterations2)}},selectAlterationsIntoArray:function(e,t,r){for(var i=this.performFilterMatchingWithEnvironment(e),n=this.computeNewOverrideState(r,i),a=0,s=this.alterations;a<s.length;){var l=s[a];++a,l.selectAlterationsIntoArray(e,t,n)}},getVariantID:function(){return this.variantId},getVariantName:function(){return this.variantName},getExperimentID:function(){return this.experimentId},getExperimentName:function(){return this.experimentName},getExperimentType:function(){return this.experimentType},getCodeBlockName:function(){return this.codeBlockName},getPhase:function(){return this.phase},getCycle:function(){return this.cycle},getUrlKeyProviders:function(){return this.asUrlProviders(this.alterations)},__class__:Ee});var ze=function(e){Ee.call(this,e)};(r["apptimize.models.ABTHotfixVariant"]=ze).__name__="apptimize.models.ABTHotfixVariant",ze.__super__=Ee,ze.prototype=a(Ee.prototype,{hotfixName:null,fromJSON:function(e){Ee.prototype.fromJSON.call(this,e);var t=e;this.hotfixName=t.hotfixName},getHotfixName:function(){return this.hotfixName},__class__:ze});var Ie=function(e){Ie.RESULT_ENTRY_CREATION_LOCK.acquire();try{this._id=this._getNextSequenceNumber(),this._deviceTimestamp=ft.fromFloat((new Date).getTime()),this._monotonicTimestamp=this._getMonotonicTimestamp(this._deviceTimestamp)}catch(e){gt.lastError=e;var t=ct.caught(e).unwrap();throw Ie.RESULT_ENTRY_CREATION_LOCK.release(),ct.thrown(t)}Ie.RESULT_ENTRY_CREATION_LOCK.release(),this._prefixedAttributes=new D,null!=e&&null!=e.customProperties.availableProperties&&e.customProperties.addJSONProperties(this._prefixedAttributes),We.sharedInstance().addJSONProperties(this._prefixedAttributes),e.applicationProperties.addJSONProperties(this._prefixedAttributes)};(r["apptimize.models.results.ABTResultEntry"]=Ie).__name__="apptimize.models.results.ABTResultEntry",Ie.__super__=ye,Ie.prototype=a(ye.prototype,{_id:null,_monotonicTimestamp:null,_deviceTimestamp:null,_userAttributes:null,_prefixedAttributes:null,_getNextSequenceNumber:function(){var e=Ge.loadString(Ge.kResultEntrySequenceKey),t=new mt(0,0);null!=e&&(t=ft.parseString(e));(t=new mt(t.high,t.low)).low++;if(t.low=0|t.low,0==t.low){t.high++;t.high=0|t.high}return Ge.saveString(Ge.kResultEntrySequenceKey,_t.toString(t)),t},_getMonotonicTimestamp:function(e){var t=e,r=new mt(0,0),i=Ge.loadString(Ge.kResultEntryTimestampKey);null!=i&&(r=ft.parseString(i));var n=r.high-e.high|0;if(0==n&&(n=pt.ucompare(r.low,e.low)),0<=(r.high<0?e.high<0?n:-1:0<=e.high?n:1)){var a=r.high+0|0,s=r.low+1|0;if(pt.ucompare(s,r.low)<0){a++;a|=0}t=new mt(a,s)}return Ge.saveString(Ge.kResultEntryTimestampKey,_t.toString(t)),t},JSONRepresentation:function(){var e=new D,t=et.toPreprocessedString(this._id);e.h.ei=t;t=et.toPreprocessedString(this._monotonicTimestamp);e.h.mt=t;t=et.toPreprocessedString(this._deviceTimestamp);e.h.dt=t;t=lt.filterNullValues(this._prefixedAttributes);e.h.pa=t;var r=e;if(null!=this._userAttributes){var i=lt.filterNullValues(this._userAttributes);r.h.ua=i}return r},hxSerialize:function(e){et._serializeInt64(this._id,e),et._serializeInt64(this._monotonicTimestamp,e),et._serializeInt64(this._deviceTimestamp,e),e.serialize(this._userAttributes),e.serialize(this._prefixedAttributes)},hxUnserialize:function(e){this._id=et._deserializeInt64(e),this._monotonicTimestamp=et._deserializeInt64(e),this._deviceTimestamp=et._deserializeInt64(e),this._userAttributes=e.unserialize(),this._prefixedAttributes=e.unserialize()},__class__:Ie});var ke=function(e,t,r,i){this._type="v",Ie.call(this,e),this._variantID=t,this._cycle=r,this._phase=i};(r["apptimize.models.results.ABTResultEntryVariantShown"]=ke).__name__="apptimize.models.results.ABTResultEntryVariantShown",ke.__super__=Ie,ke.prototype=a(Ie.prototype,{_type:null,_variantID:null,_cycle:null,_phase:null,JSONRepresentation:function(){var e=Ie.prototype.JSONRepresentation.call(this),t=this._type;e.h.ty=t;t=this._variantID;e.h.v=t;var r=new D;r.h.v=this._variantID,r.h.c=this._cycle,r.h.p=this._phase;t=r;return e.h.vp=t,e},hxSerialize:function(e){Ie.prototype.hxSerialize.call(this,e),e.serialize(this._type),e.serialize(this._variantID),e.serialize(this._cycle),e.serialize(this._phase)},hxUnserialize:function(e){Ie.prototype.hxUnserialize.call(this,e),this._type=e.unserialize(),this._variantID=e.unserialize(),this._cycle=e.unserialize(),this._phase=e.unserialize()},__class__:ke});var Be=function(e,t,r,i){this._type="ee",Ie.call(this,e),this._name=t,this._source=r,this._attributes=i};(r["apptimize.models.results.ABTResultEntryEvent"]=Be).__name__="apptimize.models.results.ABTResultEntryEvent",Be.__super__=Ie,Be.prototype=a(Ie.prototype,{_type:null,_name:null,_source:null,_attributes:null,JSONRepresentation:function(){var e=Ie.prototype.JSONRepresentation.call(this),t=this._type;e.h.ty=t;t=this._name;e.h.n=t;t=this._source;e.h.s=t;t=this._attributes;return e.h.a=t,e},hxSerialize:function(e){Ie.prototype.hxSerialize.call(this,e),e.serialize(this._type),e.serialize(this._name),e.serialize(this._source),e.serialize(this._attributes)},hxUnserialize:function(e){Ie.prototype.hxUnserialize.call(this,e),this._type=e.unserialize(),this._name=e.unserialize(),this._source=e.unserialize(),this._attributes=e.unserialize()},__class__:Be});var Fe=function(e,t,r){this._type="md",Ie.call(this,e),this._metadataSequenceNumber=t,this._enrolledVariantsCyclesPhases=r,this._enrolledVariantIDs=[];for(var i=0,n=this._enrolledVariantsCyclesPhases;i<n.length;){var a=n[i];++i,this._enrolledVariantIDs.push(a.v)}};(r["apptimize.models.results.ABTResultEntryMetadataProcessed"]=Fe).__name__="apptimize.models.results.ABTResultEntryMetadataProcessed",Fe.__super__=Ie,Fe.prototype=a(Ie.prototype,{_type:null,_metadataSequenceNumber:null,_enrolledVariantsCyclesPhases:null,_enrolledVariantIDs:null,JSONRepresentation:function(){var e=Ie.prototype.JSONRepresentation.call(this);if(0<this._enrolledVariantsCyclesPhases.length){var t=this._enrolledVariantsCyclesPhases;e.h.vp=t}t=this._enrolledVariantIDs;e.h.v=t;t=this._metadataSequenceNumber;e.h.s=t;t=this._type;return e.h.ty=t,e},hxSerialize:function(e){Ie.prototype.hxSerialize.call(this,e),e.serialize(this._type),e.serialize(this._metadataSequenceNumber),e.serialize(this._enrolledVariantIDs),e.serialize(this._enrolledVariantsCyclesPhases)},hxUnserialize:function(e){Ie.prototype.hxUnserialize.call(this,e),this._type=e.unserialize(),this._metadataSequenceNumber=e.unserialize(),this._enrolledVariantIDs=e.unserialize(),this._enrolledVariantsCyclesPhases=e.unserialize()},__class__:Fe});var Oe=function(e,t){this._type="ac",Ie.call(this,e),this._enrolledVariantsCyclesPhases=t,this._enrolledVariantIDs=[];for(var r=0,i=this._enrolledVariantsCyclesPhases;r<i.length;){var n=i[r];++r,this._enrolledVariantIDs.push(n.v)}};(r["apptimize.models.results.ABTResultEntryAttributesChanged"]=Oe).__name__="apptimize.models.results.ABTResultEntryAttributesChanged",Oe.__super__=Ie,Oe.prototype=a(Ie.prototype,{_type:null,_enrolledVariantsCyclesPhases:null,_enrolledVariantIDs:null,JSONRepresentation:function(){var e=Ie.prototype.JSONRepresentation.call(this),t=this._type;e.h.ty=t;t=this._enrolledVariantIDs;if(e.h.v=t,0<this._enrolledVariantsCyclesPhases.length){t=this._enrolledVariantsCyclesPhases;e.h.vp=t}return e},hxSerialize:function(e){Ie.prototype.hxSerialize.call(this,e),e.serialize(this._type),e.serialize(this._enrolledVariantIDs),e.serialize(this._enrolledVariantsCyclesPhases)},hxUnserialize:function(e){Ie.prototype.hxUnserialize.call(this,e),this._type=e.unserialize(),this._enrolledVariantIDs=e.unserialize(),this._enrolledVariantsCyclesPhases=e.unserialize()},__class__:Oe});var Pe=function(e,t){this._type="ue",Ie.call(this,e),this._nextUserID=t};(r["apptimize.models.results.ABTResultEntryUserEnd"]=Pe).__name__="apptimize.models.results.ABTResultEntryUserEnd",Pe.__super__=Ie,Pe.prototype=a(Ie.prototype,{_type:null,_nextUserID:null,JSONRepresentation:function(){var e=Ie.prototype.JSONRepresentation.call(this),t=this._type;e.h.ty=t;t=this._nextUserID;return e.h.n=t,e},hxSerialize:function(e){Ie.prototype.hxSerialize.call(this,e),e.serialize(this._type),e.serialize(this._nextUserID)},hxUnserialize:function(e){Ie.prototype.hxUnserialize.call(this,e),this._type=e.unserialize(),this._nextUserID=e.unserialize()},__class__:Pe});var Ce=function(e,t){this._type="us",Ie.call(this,e),this._previousUserID=t};(r["apptimize.models.results.ABTResultEntryUserStart"]=Ce).__name__="apptimize.models.results.ABTResultEntryUserStart",Ce.__super__=Ie,Ce.prototype=a(Ie.prototype,{_type:null,_previousUserID:null,JSONRepresentation:function(){var e=Ie.prototype.JSONRepresentation.call(this),t=this._type;e.h.ty=t;t=this._previousUserID;return e.h.p=t,e},hxSerialize:function(e){Ie.prototype.hxSerialize.call(this,e),e.serialize(this._type),e.serialize(this._previousUserID)},hxUnserialize:function(e){Ie.prototype.hxUnserialize.call(this,e),this._type=e.unserialize(),this._previousUserID=e.unserialize()},__class__:Ce});var De=function(e,t,r){var i=new mt(0,0);this._lastEntryID=i;i=new mt(0,0);this._firstEntryID=i;i=new mt(0,0);this._timestampFromServer=i,this._type="sp",Ie.call(this,null),this._timestampFromServer=e,this._firstEntryID=t,this._lastEntryID=r};(r["apptimize.models.results.ABTResultEntrySuccessfullyPosted"]=De).__name__="apptimize.models.results.ABTResultEntrySuccessfullyPosted",De.__super__=Ie,De.prototype=a(Ie.prototype,{_type:null,_timestampFromServer:null,_firstEntryID:null,_lastEntryID:null,JSONRepresentation:function(){var e=Ie.prototype.JSONRepresentation.call(this),t=this._type;e.h.ty=t;t=et.toPreprocessedString(this._timestampFromServer);e.h.t=t;t=et.toPreprocessedString(this._firstEntryID);e.h.f=t;t=et.toPreprocessedString(this._lastEntryID);return e.h.l=t,e},hxSerialize:function(e){Ie.prototype.hxSerialize.call(this,e),e.serialize(this._type),et._serializeInt64(this._timestampFromServer,e),et._serializeInt64(this._firstEntryID,e),et._serializeInt64(this._lastEntryID,e)},hxUnserialize:function(e){Ie.prototype.hxUnserialize.call(this,e),this._type=e.unserialize(),this._timestampFromServer=et._deserializeInt64(e),this._firstEntryID=et._deserializeInt64(e),this._lastEntryID=et._deserializeInt64(e)},__class__:De});var Re=function(e){var t=new mt(0,0);this._currentEntryCount=t,this._type="dl",Ie.call(this,null),this._currentEntryCount=e};(r["apptimize.models.results.ABTResultEntryDataTypeLimitReached"]=Re).__name__="apptimize.models.results.ABTResultEntryDataTypeLimitReached",Re.__super__=Ie,Re.prototype=a(Ie.prototype,{_type:null,_currentEntryCount:null,JSONRepresentation:function(){var e=Ie.prototype.JSONRepresentation.call(this),t=this._type;e.h.ty=t;t=et.toPreprocessedString(this._currentEntryCount);return e.h.c=t,e},hxSerialize:function(e){Ie.prototype.hxSerialize.call(this,e),e.serialize(this._type),et._serializeInt64(this._currentEntryCount,e)},hxUnserialize:function(e){Ie.prototype.hxUnserialize.call(this,e),this._type=e.unserialize(),this._currentEntryCount=et._deserializeInt64(e)},__class__:Re});var Le=function(e){null!=e&&(this.userID=e.userID,this.anonID=e.anonID,this.appkey=e.appkey,this.uniqueID=e.getUniqueUserID()),this.entries=[]};(r["apptimize.models.results.ABTResultLog"]=Le).__name__="apptimize.models.results.ABTResultLog",Le.prototype={entries:null,userID:null,anonID:null,appkey:null,uniqueID:null,logEntry:function(e){this.entries.push(e)},entryCount:function(){return this.entries.length},getAppKey:function(){return this.appkey},getUniqueUserKey:function(){return this.uniqueID},toJSON:function(){for(var e=new D,t=[],r=0,i=this.entries;r<i.length;){var n=i[r];++r,t.push(n.JSONRepresentation())}var a="v4";e.h.type=a;a=this.getAppKey();if(e.h.a=a,null!=this.anonID){a=this.anonID;e.h.g=a}new Date;var s=ft.fromFloat((new Date).getTime());a=et.toPreprocessedString(s);e.h.c=a;a=t;e.h.e=a;a="Cross Platform "+I.getApptimizeSDKVersion();if(e.h.v=a,null!=this.userID){a=this.userID;e.h.u=a}return tt.stringify(e)},__class__:Le};var Ue=br("pako"),Me=function(){};(r["apptimize.support.initialize.ABTPlatformInitialize"]=Me).__name__="apptimize.support.initialize.ABTPlatformInitialize",Me.initialize=function(){Ge.saveString(Ge.kApptimizeVersionKey,I.getApptimizeSDKVersion()),Me._isThreadingEnabled=He.sharedInstance().valueForProperty(He.THREADING_ENABLED_KEY);var e=window;e.onblur=Me.onBlur,e.onfocus=Me.onFocus,e.onunload=I.flushTracking,U.startPolling(),Me.hookShutdown(Me._isThreadingEnabled)},Me.hookShutdown=function(e){He.sharedInstance().valueForProperty(He.AUTOMATIC_SHUTDOWN_HOOK)||d.v("Process exits will not be handled to persist Apptimize library state across server restarts.",{fileName:"src/apptimize/support/initialize/ABTPlatformInitialize.hx",lineNumber:119,className:"apptimize.support.initialize.ABTPlatformInitialize",methodName:"hookShutdown"})},Me.shutdownPlatform=function(){U.stopPolling()},Me.onBlur=function(){I.flushTracking(),U.startPolling(!1)},Me.onFocus=function(){U.startPolling()};var Ke=function(){};(r["apptimize.support.persistence.ABTPersistentInterface"]=Ke).__name__="apptimize.support.persistence.ABTPersistentInterface",Ke.prototype={save:function(e,t,r,i){throw null==i&&(i=!1),null==r&&(r=0),ct.thrown("ABTPersistentInterface.save not implemented")},load:function(e,t,r){throw null==t&&(t=0),ct.thrown("ABTPersistentInterface.load not implemented")},clear:function(e){null==e&&(e=2)},saveObject:function(e,t,r,i){null==i&&(i=!1),null==r&&(r=0);var n=new vt;n.serialize(t),n.serialize(I.getApptimizeSDKVersion()),this.save(e,n.toString(),r,i)},loadObject:function(e,t,n){null==t&&(t=0);var a=this,s=null,r=function(t,e){if(null!=e){try{var r=new Tt(e);null!=(s=r.unserialize())&&a.hasDidUnserialize(s)&&s.didUnserialize()}catch(e){gt.lastError=e;var i=ct.caught(e).unwrap();d.e('Error deserializing "'+t+'" from persistent storage. Error: '+O.string(i),{fileName:"src/apptimize/support/persistence/ABTPersistence.hx",lineNumber:50,className:"apptimize.support.persistence.ABTPersistentInterface",methodName:"loadObject"})}if(null!=n)return n(t,s),s}return null!=n&&n(t,null),s};return null!=n?this.load(e,t,r):r(e,this.load(e,t,n))},hasDidUnserialize:function(e){return null!=e.didUnserialize},__class__:Ke};var Ve=function(){this.syncedKeys=[],this.sharedCache=window.document.defaultView.localStorage,this.localCache=window.document.defaultView.sessionStorage,window.onstorage=mr(this,this.onStorage)};(r["apptimize.support.persistence.ABTPIBrowserSyncedCache"]=Ve).__name__="apptimize.support.persistence.ABTPIBrowserSyncedCache",Ve.isSyncedCacheSupported=function(){try{return null!=window.document.defaultView.localStorage&&null!=window.document.defaultView.sessionStorage&&nt.getHumanReadableBrowserName(i.navigator.userAgent)!=nt.kBrowserNameInternetExplorer}catch(e){gt.lastError=e;var t=ct.caught(e).unwrap();return d.e("Error checking local storage status: "+O.string(t),{fileName:"src/apptimize/support/persistence/ABTPIBrowserSyncedCache.hx",lineNumber:39,className:"apptimize.support.persistence.ABTPIBrowserSyncedCache",methodName:"isSyncedCacheSupported"}),!1}},Ve.__super__=Ke,Ve.prototype=a(Ke.prototype,{sharedCache:null,localCache:null,syncedKeys:null,_isKeySynced:function(e,t){null==t&&(t=!1);var r=-1!=this.syncedKeys.indexOf(e);return t&&!r&&this._syncKey(e),r},_syncKey:function(e){this._isKeySynced(e,!1)||this.syncedKeys.push(e)},onStorage:function(e){this._isKeySynced(e.key,!0),this.localCache.setItem(e.key,e.newValue)},save:function(e,t,r,i){null==i&&(i=!1),null==r&&(r=0),i&&He.sharedInstance().valueForProperty(He.COMPRESS_PERSISTENCE_STORE_KEY)&&(t=Ve.compressionPrefix+ot.compressStringToBase64(t)),null!=t?(this.localCache.setItem(e,t),this.sharedCache.setItem(e,t)):(this.localCache.removeItem(e),this.sharedCache.removeItem(e)),this._syncKey(e)},load:function(e,t,r){if(null==t&&(t=0),!this._isKeySynced(e,!0)){var i=this.sharedCache.getItem(e);null!=i&&this.localCache.setItem(e,i)}var n=this.localCache.getItem(e);return this.isCompressed(n)&&(d.v("Requested persistence key "+e+" is compressed.",{fileName:"src/apptimize/support/persistence/ABTPIBrowserSyncedCache.hx",lineNumber:101,className:"apptimize.support.persistence.ABTPIBrowserSyncedCache",methodName:"load"}),n=ot.decompressBase64ToString(Y.substr(n,Ve.compressionPrefix.length,null))),null!=r&&r(e,n),n},clear:function(e){null==e&&(e=2),this.syncedKeys=[],this.sharedCache.clear(),this.localCache.clear()},isCompressed:function(e){return!(null==e||e.length<Ve.compressionPrefix.length||Y.substr(e,0,Ve.compressionPrefix.length)!=Ve.compressionPrefix)},__class__:Ve});var qe=function(){this.cacheMap=new D};(r["apptimize.support.persistence.ABTPICacheStorage"]=qe).__name__="apptimize.support.persistence.ABTPICacheStorage",qe.__super__=Ke,qe.prototype=a(Ke.prototype,{cacheMap:null,save:function(e,t,r,i){if(null==i&&(i=!1),null==r&&(r=0),null!=t)this.cacheMap.h[e]=t;else{var n=this.cacheMap;Object.prototype.hasOwnProperty.call(n.h,e)&&delete n.h[e]}},saveObject:function(e,t,r,i){if(null==i&&(i=!1),null==r&&(r=0),null!=t)this.cacheMap.h[e]=t;else{var n=this.cacheMap;Object.prototype.hasOwnProperty.call(n.h,e)&&delete n.h[e]}},loadObject:function(e,t,r){null==t&&(t=0);var i=this.cacheMap.h[e];return null!=r&&r(e,i),i},load:function(e,t,r){null==t&&(t=0);var i=this.cacheMap.h[e];return null!=r&&r(e,i),i},clear:function(e){null==e&&(e=0),this.cacheMap=new D},__class__:qe});var Ge=function(){};(r["apptimize.support.persistence.ABTPersistence"]=Ge).__name__="apptimize.support.persistence.ABTPersistence",Ge.getPersistentInterface=function(){if(null==Ge._persistentInterface){if(He.sharedInstance().isPropertyAvailable(He.STORAGE_TYPE_KEY)&&"memory"==He.sharedInstance().valueForProperty(He.STORAGE_TYPE_KEY))return Ge._persistentInterface=new qe,Ge._persistentInterface;Ve.isSyncedCacheSupported()?Ge._persistentInterface=new Ve:(d.w("Local storage not available.  Using local memory cache. No data will be persisted between sessions or tabs.",{fileName:"src/apptimize/support/persistence/ABTPersistence.hx",lineNumber:138,className:"apptimize.support.persistence.ABTPersistence",methodName:"getPersistentInterface"}),Ge._persistentInterface=new qe)}return Ge._persistentInterface},Ge.shutdown=function(){Ge._persistentInterface=null},Ge.loadFromHighLatency=function(e){e()},Ge.saveToHighLatency=function(){},Ge.clear=function(){f.SYSTEM_DATA_LOCK.acquire();try{Ge.getPersistentInterface().clear(Ge.ALL_LATENCY)}catch(e){gt.lastError=e;var t=ct.caught(e).unwrap();throw f.SYSTEM_DATA_LOCK.release(),ct.thrown(t)}f.SYSTEM_DATA_LOCK.release()},Ge.saveString=function(t,e,r,i){null==i&&(i=!1),null==r&&(r=0),f.SYSTEM_DATA_LOCK.acquire();try{try{Ge.getPersistentInterface().save(t,e,r,i)}catch(e){gt.lastError=e;var n=ct.caught(e).unwrap();Ge._isFlushing||d.e('Unable to store "'+t+'" to persistent storage. Submitting all pending results data. Error: '+O.string(n),{fileName:"src/apptimize/support/persistence/ABTPersistence.hx",lineNumber:215,className:"apptimize.support.persistence.ABTPersistence",methodName:"saveString"}),Ge.flushTracking()}}catch(e){gt.lastError=e;var a=ct.caught(e).unwrap();throw f.SYSTEM_DATA_LOCK.release(),ct.thrown(a)}f.SYSTEM_DATA_LOCK.release()},Ge.saveObject=function(t,e,r,i){null==i&&(i=!1),null==r&&(r=0),f.SYSTEM_DATA_LOCK.acquire();try{try{Ge.getPersistentInterface().saveObject(t,e,r,i)}catch(e){gt.lastError=e;var n=ct.caught(e).unwrap();Ge._isFlushing||d.e('Unable to store "'+t+'" to persistent storage. Submitting all pending results data. Error: '+O.string(n),{fileName:"src/apptimize/support/persistence/ABTPersistence.hx",lineNumber:229,className:"apptimize.support.persistence.ABTPersistence",methodName:"saveObject"}),Ge.flushTracking()}}catch(e){gt.lastError=e;var a=ct.caught(e).unwrap();throw f.SYSTEM_DATA_LOCK.release(),ct.thrown(a)}f.SYSTEM_DATA_LOCK.release()},Ge.flushTracking=function(){if(!Ge._isFlushing){Ge._isFlushing=!0;try{I.flushTracking(),Ge._isFlushing=!1}catch(e){var t=ct.caught(e);Ge._isFlushing=!1,d.e("Error on flushing pending results data "+O.string(t),{fileName:"src/apptimize/support/persistence/ABTPersistence.hx",lineNumber:247,className:"apptimize.support.persistence.ABTPersistence",methodName:"flushTracking"})}}},Ge.saveStringMap=function(e,t){Ge.saveObject(e,t,0,!1)},Ge.loadString=function(t,e){null==e&&(e=0);var r=null;f.SYSTEM_DATA_LOCK.acquire();try{try{r=Ge.getPersistentInterface().load(t,e)}catch(e){gt.lastError=e;var i=ct.caught(e).unwrap();return d.e('Unable to retrieve "'+t+'" from persistent storage. Error: '+O.string(i),{fileName:"src/apptimize/support/persistence/ABTPersistence.hx",lineNumber:261,className:"apptimize.support.persistence.ABTPersistence",methodName:"loadString"}),null}}catch(e){gt.lastError=e;var n=ct.caught(e).unwrap();throw f.SYSTEM_DATA_LOCK.release(),ct.thrown(n)}return f.SYSTEM_DATA_LOCK.release(),r},Ge.loadObject=function(t,e){null==e&&(e=0);var r=null;f.SYSTEM_DATA_LOCK.acquire();try{try{r=Ge.getPersistentInterface().loadObject(t,e,null)}catch(e){gt.lastError=e;var i=ct.caught(e).unwrap();return d.e('Unable to retrieve "'+t+'" from persistent storage. Error: '+O.string(i),{fileName:"src/apptimize/support/persistence/ABTPersistence.hx",lineNumber:274,className:"apptimize.support.persistence.ABTPersistence",methodName:"loadObject"}),null}}catch(e){gt.lastError=e;var n=ct.caught(e).unwrap();throw f.SYSTEM_DATA_LOCK.release(),ct.thrown(n)}return f.SYSTEM_DATA_LOCK.release(),r},Ge.loadStringMap=function(e,t){return null==t&&(t=0),Ge.loadObject(e,t)};var Ye=function(){this.PROPERTYLOCK=f.getNewLock("property_lock"),this.availableProperties=new D,this.PROPERTYLOCK.acquire();try{this.availableProperties=new D,this.setPropertyDefaults()}catch(e){gt.lastError=e;var t=ct.caught(e).unwrap();throw this.PROPERTYLOCK.release(),ct.thrown(t)}this.PROPERTYLOCK.release()};(r["apptimize.support.properties.ABTProperties"]=Ye).__name__="apptimize.support.properties.ABTProperties",Ye.prototype={availableProperties:null,PROPERTYLOCK:null,setPropertyDefaults:function(){},isPropertyAvailable:function(e){var t=null;this.PROPERTYLOCK.acquire();try{t=this.availableProperties.h[e]}catch(e){gt.lastError=e;var r=ct.caught(e).unwrap();throw this.PROPERTYLOCK.release(),ct.thrown(r)}return this.PROPERTYLOCK.release(),null!=t},valueForProperty:function(e){var t=null;this.PROPERTYLOCK.acquire();try{t=this.availableProperties.h[e]}catch(e){gt.lastError=e;var r=ct.caught(e).unwrap();throw this.PROPERTYLOCK.release(),ct.thrown(r)}return this.PROPERTYLOCK.release(),t},setProperty:function(e,t){this.PROPERTYLOCK.acquire();try{this.availableProperties.h[e]=t}catch(e){gt.lastError=e;var r=ct.caught(e).unwrap();throw this.PROPERTYLOCK.release(),ct.thrown(r)}this.PROPERTYLOCK.release()},setProperties:function(e){for(var t=e.h,r=Object.keys(t),i=r.length,n=0;n<i;){var a=r[n++];this.setProperty(a,e.h[a])}},__class__:Ye};var je=function(){Ye.call(this)};(r["apptimize.support.properties.ABTApplicationProperties"]=je).__name__="apptimize.support.properties.ABTApplicationProperties",je.sharedInstance=function(){return null==je._instance&&(je._instance=new je),je._instance},je.getPlatformVersion=function(){return""},je.__super__=Ye,je.prototype=a(Ye.prototype,{setPropertyDefaults:function(){var e=this.availableProperties,t=I.getApptimizeSDKVersion();e.h.apptimize_version=t;e=this.availableProperties,t=I.getApptimizeSDKPlatform();e.h.apptimize_platform=t;t=null;this.availableProperties.h.app_version=t;t=null;this.availableProperties.h.app_name=t;e=this.availableProperties,t=je.getPlatformVersion();if(e.h.system_version=t,ur.get_supported()){e=this.availableProperties,t=i.navigator.language.split("-")[0];e.h.system_language=t;e=this.availableProperties,t=i.navigator.language;e.h.browser_language=t;var r=i.navigator.userAgent;this.availableProperties.h.browser_userAgent=r;e=this.availableProperties,t=nt.getHumanReadableBrowserName(r);e.h.browser_name=t;e=this.availableProperties,t=nt.getBrowserVersion(r);e.h.browser_version=t;e=this.availableProperties,t=nt.getDeviceCategory(r);e.h.device_category=t}},addJSONProperties:function(e){for(var t=this.availableProperties.h,r=Object.keys(t),i=r.length,n=0;n<i;){var a=r[n++],s=this.availableProperties.h[a];e.h[je._sigilForApplicationNamespace+a]=s}},__class__:je});var He=function(){Ye.call(this)};(r["apptimize.support.properties.ABTConfigProperties"]=He).__name__="apptimize.support.properties.ABTConfigProperties",He.sharedInstance=function(){return null==He._instance&&(He._instance=new He),He._instance},He.__super__=Ye,He.prototype=a(Ye.prototype,{setPropertyDefaults:function(){this.availableProperties.h[He.META_DATA_URL_LL_KEY]="https://md-ll.apptimize.com/api/metadata/v4/",this.availableProperties.h[He.META_DATA_URL_HL_KEY]="https://md-hl.apptimize.com/api/metadata/v4/";var e=null;this.availableProperties.h[He.META_DATA_URL_KEY]=e,this.availableProperties.h[He.REFRESH_META_DATA_ON_SETUP]=!1,this.availableProperties.h[He.LOG_LEVEL_KEY]="LOG_LEVEL_WARN",this.availableProperties.h[He.FOREGROUND_PERIOD_MS_KEY]=1e4,this.availableProperties.h[He.RESULT_POST_DELAY_MS_KEY]=6e4,this.availableProperties.h[He.ALTERATION_CACHE_SIZE_KEY]=10,this.availableProperties.h[He.RESULTS_CACHE_SIZE_KEY]=10,this.availableProperties.h[He.MAXIMUM_RESULT_ENTRIES_KEY]=1e3,this.availableProperties.h[He.MAXIMUM_PENDING_RESULTS_KEY]=1e3,this.availableProperties.h[He.METADATA_POLLING_INTERVAL_MS_KEY]=6e5,this.availableProperties.h[He.MAXIMUM_RESULT_POST_FAILURE_KEY]=3,this.availableProperties.h[He.MAXIMUM_RESULT_POST_SENDER_TIMEOUT_MS_KEY]=3e3,this.availableProperties.h[He.METADATA_POLLING_BACKGROUND_INTERVAL_MS_KEY]=864e5;e=null;this.availableProperties.h[He.STORAGE_TYPE_KEY]=e;e=null;this.availableProperties.h[He.APPTIMIZE_ENVIRONMENT_KEY]=e,this.availableProperties.h[He.AUTOMATIC_SHUTDOWN_HOOK]=!0,this.availableProperties.h[He.GROUPS_BASE_URL_KEY]="https://mapi.apptimize.com",this.availableProperties.h[He.LOCAL_DISK_STORAGE_PATH_KEY]="data/apptimize/";e=null;this.availableProperties.h[He.REACT_NATIVE_STORAGE_KEY]=e,this.availableProperties.h[He.APPTIMIZE_MAXEXP_SEED_KEY]=137900,this.availableProperties.h[He.THREADING_ENABLED_KEY]=!1,this.availableProperties.h[He.RESULT_POST_THREAD_POOL_SIZE_KEY]=1,this.availableProperties.h[He.EXCEPTIONS_ENABLED_KEY]=!1,this.availableProperties.h[He.COMPRESS_PERSISTENCE_STORE_KEY]=!0},__class__:He});var Ze=z["apptimize.support.properties.CustomPropertyNamespace"]={__ename__:"apptimize.support.properties.CustomPropertyNamespace",__constructs__:null,UserAttribute:{_hx_name:"UserAttribute",_hx_index:0,__enum__:"apptimize.support.properties.CustomPropertyNamespace",toString:n},ApptimizeLocal:{_hx_name:"ApptimizeLocal",_hx_index:1,__enum__:"apptimize.support.properties.CustomPropertyNamespace",toString:n},ApptimizeInternal:{_hx_name:"ApptimizeInternal",_hx_index:2,__enum__:"apptimize.support.properties.CustomPropertyNamespace",toString:n},Mixpanel:{_hx_name:"Mixpanel",_hx_index:3,__enum__:"apptimize.support.properties.CustomPropertyNamespace",toString:n}};Ze.__constructs__=[Ze.UserAttribute,Ze.ApptimizeLocal,Ze.ApptimizeInternal,Ze.Mixpanel];var Je=function(){Ye.call(this)};(r["apptimize.support.properties.ABTCustomProperties"]=Je).__name__="apptimize.support.properties.ABTCustomProperties",Je.__super__=Ye,Je.prototype=a(Ye.prototype,{setPropertyDefaults:function(){},setProperty:function(e,t){this.setPropertyForNamespace(e,t,Ze.UserAttribute)},setPropertyForNamespace:function(e,t,r){Ye.prototype.setProperty.call(this,this.sigilForNamespace(r)+e,t)},sigilForNamespace:function(e){switch(e._hx_index){case 0:return"%";case 1:return"l";case 2:return"^";case 3:return"m"}},isNamespacedPropertyAvailable:function(e,t){return Ye.prototype.isPropertyAvailable.call(this,this.sigilForNamespace(t)+e)},valueForNamespacedProperty:function(e,t){return Ye.prototype.valueForProperty.call(this,this.sigilForNamespace(t)+e)},addJSONProperties:function(e){for(var t=this.availableProperties.h,r=Object.keys(t),i=r.length,n=0;n<i;){var a=r[n++];if(a.charAt(0)!=this.sigilForNamespace(Ze.ApptimizeLocal)){var s=this.availableProperties.h[a];e.h[a]=s}}},__class__:Je});var We=function(){Je.call(this)};(r["apptimize.support.properties.ABTInternalProperties"]=We).__name__="apptimize.support.properties.ABTInternalProperties",We.sharedInstance=function(){return null==We._instance&&(We._instance=new We),We._instance},We.__super__=Je,We.prototype=a(Je.prototype,{isPropertyAvailable:function(e){return this._loadProperties(),Je.prototype.isPropertyAvailable.call(this,e)},valueForProperty:function(e){return this._loadProperties(),this.availableProperties.h[e]},setProperty:function(e,t){this.setPropertyForNamespace(e,t,Ze.ApptimizeInternal)},_loadProperties:function(){this.availableProperties=Ge.loadObject(Ge.kInternalPropertiesKey),null==this.availableProperties&&(this.availableProperties=new D)},_saveProperties:function(){Ge.saveObject(Ge.kInternalPropertiesKey,this.availableProperties)},setPropertyForNamespace:function(e,t,r){this._loadProperties(),Je.prototype.setPropertyForNamespace.call(this,e,t,r),this._saveProperties()},isNamespacedPropertyAvailable:function(e,t){return this._loadProperties(),Je.prototype.isNamespacedPropertyAvailable.call(this,e,t)},valueForNamespacedProperty:function(e,t){return this._loadProperties(),Je.prototype.valueForNamespacedProperty.call(this,e,t)},__class__:We});var Xe=function(e,t){this.task=e,this.startTimestampMs=(new Date).getTime()+t};(r["apptimize.util.ABTDispatchTask"]=Xe).__name__="apptimize.util.ABTDispatchTask",Xe.prototype={task:null,startTimestampMs:null,__class__:Xe};var Qe=function(){};(r["apptimize.util.ABTException"]=Qe).__name__="apptimize.util.ABTException",Qe.throwException=function(e){if(He.sharedInstance().valueForProperty(He.EXCEPTIONS_ENABLED_KEY))throw ct.thrown(e)};var $e=function(){this.bytesBuffer=new Ct};(r["apptimize.util.ABTHash"]=$e).__name__="apptimize.util.ABTHash",$e.Sha1=function(e){return Et.make(e)},$e.prototype={bytesBuffer:null,push:function(e){this.bytesBuffer.addBytes(e,0,e.length)},hash:function(){return $e.Sha1(this.bytesBuffer.getBytes())},__class__:$e};var et=function(){};(r["apptimize.util.ABTInt64Utils"]=et).__name__="apptimize.util.ABTInt64Utils",et.toPreprocessedString=function(e){return"wideInt_"+_t.toString(e)+"_wideInt"},et._serializeInt64=function(e,t){t.serialize(e.high),t.serialize(e.low)},et._deserializeInt64=function(e){return new mt(e.unserialize(),e.unserialize())};var tt=function(){};(r["apptimize.util.ABTJSONUtils"]=tt).__name__="apptimize.util.ABTJSONUtils",tt.stringify=function(e){var t=Pt.print(e,null,null);return t=j.replace(t,'"wideInt_',""),t=j.replace(t,'_wideInt"',"")};var rt=function(e){this.cacheLock=f.getNewLock("ABTLRUCache_lock"),this._cacheSize=e,this.clear()};(r["apptimize.util.ABTLRUCache"]=rt).__name__="apptimize.util.ABTLRUCache",rt.prototype={_cacheSize:null,_list:null,_map:null,cacheLock:null,clear:function(t,e){this.cacheLock.acquire();try{if(null!=t)for(var r=0,i=this._list;r<i.length;){var n=i[r];++r;var a=function(e){return function(){t(e[0])}}([this._map.h[n]]);null!=e?e.dispatch(a,0):R.dispatchImmediately(a)}this._list=[],this._map=new D}catch(r){gt.lastError=r;var s=ct.caught(r).unwrap();throw this.cacheLock.release(),ct.thrown(s)}this.cacheLock.release()},hasKey:function(e){var t=!1;this.cacheLock.acquire();try{t=null!=this._map.h[e]}catch(e){gt.lastError=e;var r=ct.caught(e).unwrap();throw this.cacheLock.release(),ct.thrown(r)}return this.cacheLock.release(),t},getValue:function(e){var t=null;this.cacheLock.acquire();try{this.hasKey(e)&&(t=this._map.h[e])}catch(e){gt.lastError=e;var r=ct.caught(e).unwrap();throw this.cacheLock.release(),ct.thrown(r)}return this.cacheLock.release(),t},remove:function(e,t,r){this.cacheLock.acquire();try{if(!this.hasKey(e))return;if(null!=t){var i=this._map.h[e],n=function(){t(i)};null!=r?r.dispatch(n,0):R.dispatchImmediately(n)}Y.remove(this._list,e);var a=this._map;Object.prototype.hasOwnProperty.call(a.h,e)&&delete a.h[e]}catch(e){gt.lastError=e;var s=ct.caught(e).unwrap();throw this.cacheLock.release(),ct.thrown(s)}this.cacheLock.release()},insert:function(e,t,r,i){this.cacheLock.acquire();try{if(this.hasKey(e))this._map.h[e]=t,Y.remove(this._list,e),this._list.push(e);else if(this._map.h[e]=t,this._list.push(e),this._list.length>this._cacheSize){var n=this._list.shift();if(null!=r){t=this._map.h[n];var a=function(){r(t)};null!=i?i.dispatch(a,0):R.dispatchImmediately(a)}var s=this._map;Object.prototype.hasOwnProperty.call(s.h,n)&&delete s.h[n]}}catch(e){gt.lastError=e;var l=ct.caught(e).unwrap();throw this.cacheLock.release(),ct.thrown(l)}this.cacheLock.release()},hxSerialize:function(e){var t=new D;t.h._cacheSize=this._cacheSize,t.h._list=this._list,t.h._map=this._map;var r=t;e.serialize(r)},hxUnserialize:function(e){var t=e.unserialize();this._cacheSize=t.h._cacheSize,this._list=t.h._list,this._map=t.h._map,this.initMissingFields()},didUnserialize:function(){this.initMissingFields()},initMissingFields:function(){null==this.cacheLock&&(this.cacheLock=f.getNewLock("ABTLRUCache_lock"))},__class__:rt};var it=function(){};(r["apptimize.util.ABTTypes"]=it).__name__="apptimize.util.ABTTypes",it.isString=function(e){var t=P.typeof(e);return 6==t._hx_index&&"String"==t.c.__name__},it.isNullOrString=function(e){return null==e||it.isString(e)};var nt=function(){};(r["apptimize.util.ABTUserAgentParser"]=nt).__name__="apptimize.util.ABTUserAgentParser",nt.getBrowserName=function(e){var t=nt.kBrowserUnknown;return 0<=e.indexOf(nt.kBrowserSeaMonkey)?t=nt.kBrowserSeaMonkey:0<=e.indexOf(nt.kBrowserFirefox)?t=nt.kBrowserFirefox:0<=e.indexOf(nt.kBrowserFirefoxiOS)?t=nt.kBrowserFirefoxiOS:0<=e.indexOf(nt.kBrowserInternetExplorer)?t=nt.kBrowserInternetExplorer:0<=e.indexOf(nt.kBrowserInternetExplorer11)?t=nt.kBrowserInternetExplorer11:0<=e.indexOf(nt.kBrowserEdge)?t=nt.kBrowserEdge:0<=e.indexOf(nt.kBrowserEdgeiOS)?t=nt.kBrowserEdgeiOS:0<=e.indexOf(nt.kBrowserEdgeAndroid)?t=nt.kBrowserEdgeAndroid:0<=e.indexOf(nt.kBrowserOperaNew)?t=j.trim(nt.kBrowserOperaNew):0<=e.indexOf(nt.kBrowserOpera)?t=nt.kBrowserOpera:0<=e.indexOf(nt.kBrowserChromeiOS)?t=nt.kBrowserChromeiOS:0<=e.indexOf(nt.kBrowserChrome)?t=0<=e.indexOf(nt.kBrowserAndroidWebViewGeneral)&&0<=e.indexOf(nt.kBrowserAndroidWebViewLAbove)?j.trim(nt.kBrowserAndroidWebViewLAbove):0<=e.indexOf(nt.kBrowserAndroidWebViewGeneral)&&0<=e.indexOf(nt.kBrowserAndroidWebViewKtoL)?j.trim(nt.kBrowserAndroidWebViewKtoL):nt.kBrowserChrome:0<=e.indexOf(nt.kBrowserChromium)?t=j.trim(nt.kBrowserChromium):0<=e.indexOf(nt.kBrowserAndroidWebViewPreK)?t=j.trim(nt.kBrowserAndroidWebViewPreK):0<=e.indexOf(nt.kBrowserSafari)&&(t=nt.kBrowserSafari),t},nt.getBrowserVersion=function(e){var t=nt.kBrowserUnknown,r=nt.getBrowserName(e);if(r!=nt.kBrowserUnknown){j.trim(nt.kBrowserAndroidWebViewLAbove)==r||j.trim(nt.kBrowserAndroidWebViewKtoL)==r?r=nt.kBrowserChrome:nt.kBrowserInternetExplorer==r&&(r=nt.kBrowserInternetExplorer11);var i=r+"[ /]",n=new o("[; )$]","");t=null==(t=new o(i,"").split(e)[1])?nt.kBrowserUnknown:n.split(t)[0]}return t},nt.getDeviceCategory=function(e){var t=new o("Mobi","").match(e),r=new o("iPad","").match(e),i=new o("Android","").match(e);return t&&!r?nt.kDeviceCategoryMobile:r||i&&!t?nt.kDeviceCategoryTablet:nt.kDeviceCategoryDesktop},nt.getHumanReadableBrowserName=function(e){var t=nt.getBrowserName(e);return t==nt.kBrowserChrome||t==nt.kBrowserChromeiOS||t==nt.kBrowserChromium?nt.kBrowserNameChrome:t==nt.kBrowserFirefox||t==nt.kBrowserFirefoxiOS?nt.kBrowserNameFirefox:t==nt.kBrowserSafari?nt.kBrowserNameSafari:t==nt.kBrowserInternetExplorer||t==nt.kBrowserInternetExplorer11?nt.kBrowserNameInternetExplorer:nt.kBrowserNameUnknown};var at=z["apptimize.util.ArrayType"]={__ename__:"apptimize.util.ArrayType",__constructs__:null,Int:{_hx_name:"Int",_hx_index:0,__enum__:"apptimize.util.ArrayType",toString:n},Bool:{_hx_name:"Bool",_hx_index:1,__enum__:"apptimize.util.ArrayType",toString:n},Double:{_hx_name:"Double",_hx_index:2,__enum__:"apptimize.util.ArrayType",toString:n},String:{_hx_name:"String",_hx_index:3,__enum__:"apptimize.util.ArrayType",toString:n},VariantInfo:{_hx_name:"VariantInfo",_hx_index:4,__enum__:"apptimize.util.ArrayType",toString:n},WinnerVariantInfo:{_hx_name:"WinnerVariantInfo",_hx_index:5,__enum__:"apptimize.util.ArrayType",toString:n}};at.__constructs__=[at.Int,at.Bool,at.Double,at.String,at.VariantInfo,at.WinnerVariantInfo];var st=function(){};(r["apptimize.util.ABTUtilArray"]=st).__name__="apptimize.util.ABTUtilArray",st.toNativeArray=function(e,t){return e};var lt=function(){};(r["apptimize.util.ABTUtilDictionary"]=lt).__name__="apptimize.util.ABTUtilDictionary",lt.dynamicToNativeDictionary=function(e){var t={},r=e;if(P.typeof(r)==h.TObject&&(r=lt.dynamicObjectToStringMap(e)),null!=r)for(var i=r.h,n=Object.keys(i),a=n.length,s=0;s<a;){var l=n[s++];t[l]=r.h[l]}return t},lt.stringMapToNativeDictionary=function(e){var t={};if(null!=e)for(var r=e.h,i=Object.keys(r),n=i.length,a=0;a<n;){var s=i[a++];t[s]=e.h[s]}return t},lt.nativeObjectToStringMap=function(e){return P.typeof(e)==h.TObject?lt.dynamicObjectToStringMap(e):or.getClass(e)==D?e:lt.dynamicMapToStringMap(e)},lt.dynamicObjectToStringMap=function(e){for(var t=new D,r=F.fields(e),i=0;i<r.length;){var n=r[i];++i;var a=F.getProperty(e,n);t.h[n]=a}return t},lt.dynamicMapToStringMap=function(e){for(var t=new D,r=e,i=0,n=F.fields(r);i<n.length;){var a=n[i];++i,t.h[a]=r[a]}return t},lt.filterNullValues=function(e){for(var t=new D,r=e.h,i=Object.keys(r),n=i.length,a=0;a<n;){var s=i[a++],l=e.h[s];null!=l&&(t.h[s]=l)}return t};var ot=function(){};(r["apptimize.util.ABTUtilGzip"]=ot).__name__="apptimize.util.ABTUtilGzip",ot.jsonSignatureLength=function(e){var t=wt.ofData(e);return t.b[0]<<8|t.b[1]},ot.decompressBytes=function(e){var t=Rt.fromBytes(e),r=null;try{r=Ue.inflate(t,{gzip:!0})}catch(e){gt.lastError=e;var i=ct.caught(e).unwrap();return d.e("Error decompressing data "+O.string(i),{fileName:"src/apptimize/util/ABTUtilGzip.hx",lineNumber:45,className:"apptimize.util.ABTUtilGzip",methodName:"decompressBytes"}),null}return wt.ofData(r.buffer)},ot.decompress=function(e){var t=wt.ofData(e),r=ot.jsonSignatureLength(e)+2,i=t.length-r,n=wt.ofData(e).sub(r,i);return ot.decompressBytes(n)},ot.compress=function(e){var t=Ue.deflate(Rt.fromBytes(e),{gzip:!0});return wt.ofData(t.buffer)},ot.compressStringToBase64=function(e){if(null==e)return null;var t=wt.ofString(e),r=ot.compress(t);return St.encode(r)},ot.decompressBase64ToString=function(e){if(null==e)return null;var t=St.decode(e);return ot.decompressBytes(t).toString()};var ut=z["haxe.StackItem"]={__ename__:"haxe.StackItem",__constructs__:null,CFunction:{_hx_name:"CFunction",_hx_index:0,__enum__:"haxe.StackItem",toString:n},Module:(t=function(e){return{_hx_index:1,m:e,__enum__:"haxe.StackItem",toString:n}},t._hx_name="Module",t.__params__=["m"],t),FilePos:(t=function(e,t,r,i){return{_hx_index:2,s:e,file:t,line:r,column:i,__enum__:"haxe.StackItem",toString:n}},t._hx_name="FilePos",t.__params__=["s","file","line","column"],t),Method:(t=function(e,t){return{_hx_index:3,classname:e,method:t,__enum__:"haxe.StackItem",toString:n}},t._hx_name="Method",t.__params__=["classname","method"],t),LocalFunction:(t=function(e){return{_hx_index:4,v:e,__enum__:"haxe.StackItem",toString:n}},t._hx_name="LocalFunction",t.__params__=["v"],t)};ut.__constructs__=[ut.CFunction,ut.Module,ut.FilePos,ut.Method,ut.LocalFunction];var ht={callStack:function(){return gt.toHaxe(gt.callStack())},exceptionStack:function(e){null==e&&(e=!1);var t=gt.toHaxe(gt.exceptionStack());return e?t:ht.subtract(t,ht.callStack())},toString:function(e){for(var t=new u,r=0,i=e;r<i.length;){var n=i[r];++r,t.b+="\nCalled from ",ht.itemToString(t,n)}return t.b},subtract:function(e,t){for(var r=-1,i=-1;++i<e.length;){for(var n=0,a=t.length;n<a;){var s=n++;if(ht.equalItems(e[i],t[s])){if(r<0&&(r=i),++i>=e.length)break}else r=-1}if(0<=r)break}return 0<=r?e.slice(0,r):e},equalItems:function(e,t){if(null==e)return null==t;switch(e._hx_index){case 0:return null!=t&&0==t._hx_index;case 1:if(null==t)return!1;if(1==t._hx_index){var r=t.m;return e.m==r}return!1;case 2:if(null==t)return!1;if(2==t._hx_index){var i=t.s,n=t.file,a=t.line,s=t.column,l=e.column,o=e.line,u=e.file,h=e.s;return u==n&&o==a&&l==s&&ht.equalItems(h,i)}return!1;case 3:if(null==t)return!1;if(3==t._hx_index){var c=t.classname,p=t.method,_=e.method;return e.classname==c&&_==p}return!1;case 4:if(null==t)return!1;if(4==t._hx_index){var m=t.v;return e.v==m}return!1}},itemToString:function(e,t){switch(t._hx_index){case 0:e.b+="a C function";break;case 1:var r=t.m;e.b+="module ",e.b+=null==r?"null":""+r;break;case 2:var i=t.s,n=t.file,a=t.line,s=t.column;null!=i&&(ht.itemToString(e,i),e.b+=" ("),e.b+=null==n?"null":""+n,e.b+=" line ",e.b+=null==a?"null":""+a,null!=s&&(e.b+=" column ",e.b+=null==s?"null":""+s),null!=i&&(e.b+=")");break;case 3:var l=t.classname,o=t.method;e.b+=O.string(null==l?"<unknown>":l),e.b+=".",e.b+=null==o?"null":""+o;break;case 4:var u=t.v;e.b+="local function #",e.b+=null==u?"null":""+u}}},ct=function(e,t,r){Error.call(this,e),this.message=e,this.__previousException=t,this.__nativeException=null!=r?r:this,this.__skipStack=0;var i=Error.prepareStackTrace;if(Error.prepareStackTrace=function(e){return e.stack},r instanceof Error)this.stack=r.stack;else{var n=null;if(Error.captureStackTrace)Error.captureStackTrace(this,ct),n=this;else if(void 0===(n=new Error).stack){try{throw n}catch(e){}this.__skipStack++}this.stack=n.stack}Error.prepareStackTrace=i};(r["haxe.Exception"]=ct).__name__="haxe.Exception",ct.caught=function(e){return e instanceof ct?e:e instanceof Error?new ct(e.message,null,e):new bt(e,null,e)},ct.thrown=function(e){if(e instanceof ct)return e.get_native();if(e instanceof Error)return e;var t=new bt(e);return t.__skipStack++,t},ct.__super__=Error,ct.prototype=a(Error.prototype,{__skipStack:null,__nativeException:null,__previousException:null,unwrap:function(){return this.__nativeException},toString:function(){return this.get_message()},__shiftStack:function(){this.__skipStack++},get_message:function(){return this.message},get_native:function(){return this.__nativeException},get_stack:function(){var e=this.__exceptionStack;if(null==e){var t=gt.toHaxe(gt.normalize(this.stack),this.__skipStack);return this.setProperty("__exceptionStack",t),t}return e},setProperty:function(t,r){try{Object.defineProperty(this,t,{value:r})}catch(e){this[t]=r}},__class__:ct,__properties__:{get_native:"get_native",get_stack:"get_stack",get_message:"get_message"}});var pt={ucompare:function(e,t){return e<0?t<0?~t-~e|0:1:t<0?-1:e-t|0}},_t={toString:function(e){var t=e,r=0,i=0;if(t.high==r&&t.low==i)return"0";var n="",a=!1;t.high<0&&(a=!0);for(var s=e=new mt(0,10);;){r=0,i=0;if(t.high==r&&t.low==i)break;var l=_t.divMod(t,s);if(l.modulus.high<0){var o=l.modulus,u=~o.high,h=1+~o.low|0;if(0==h){u++;u|=0}n=h+n;var c=l.quotient,p=~c.high,_=1+~c.low|0;if(0==_){p++;p|=0}t=e=new mt(p,_)}else n=l.modulus.low+n,t=l.quotient}return a&&(n="-"+n),n},divMod:function(e,t){if(0==t.high)switch(t.low){case 0:throw ct.thrown("divide by zero");case 1:return{quotient:new mt(e.high,e.low),modulus:new mt(0,0)}}var r,i=e.high<0!=t.high<0;if(e.high<0){var n=~e.high;if(0==(c=1+~e.low|0)){n++;n|=0}r=new mt(n,c)}else{r=new mt(e.high,e.low)}if(t.high<0){n=~t.high;if(0==(c=1+~t.low|0)){n++;n|=0}t=new mt(n,c)}for(var a=new mt(0,0),s=new mt(0,1);!(t.high<0);){var l=0!=(h=pt.ucompare(t.high,r.high))?h:pt.ucompare(t.low,r.low),o=1;if(0==(o&=63))t=new mt(t.high,t.low);else if(o<32){t=new mt(t.high<<o|t.low>>>32-o,t.low<<o)}else{t=new mt(t.low<<o-32,0)}var u=1;if(0==(u&=63))s=new mt(s.high,s.low);else if(u<32){s=new mt(s.high<<u|s.low>>>32-u,s.low<<u)}else{s=new mt(s.low<<u-32,0)}if(0<=l)break}for(;;){var h;if(0==s.high&&0==s.low)break;if(0<=(0!=(h=pt.ucompare(r.high,t.high))?h:pt.ucompare(r.low,t.low))){a=new mt(a.high|s.high,a.low|s.low);n=r.high-t.high|0;var c=r.low-t.low|0;if(pt.ucompare(r.low,t.low)<0){n--;n|=0}r=new mt(n,c)}o=1;if(0==(o&=63))s=new mt(s.high,s.low);else if(o<32){s=new mt(s.high>>>o,s.high<<32-o|s.low>>>o)}else{s=new mt(0,s.high>>>o-32)}u=1;if(0==(u&=63))t=new mt(t.high,t.low);else if(u<32){t=new mt(t.high>>>u,t.high<<32-u|t.low>>>u)}else{t=new mt(0,t.high>>>u-32)}}if(i){n=~a.high;if(0==(c=1+~a.low|0)){n++;n|=0}a=new mt(n,c)}if(e.high<0){n=~r.high;if(0==(c=1+~r.low|0)){n++;n|=0}r=new mt(n,c)}return{quotient:a,modulus:r}}},mt=function(e,t){this.high=e,this.low=t};(r["haxe._Int64.___Int64"]=mt).__name__="haxe._Int64.___Int64",mt.prototype={high:null,low:null,__class__:mt};var ft=function(){};(r["haxe.Int64Helper"]=ft).__name__="haxe.Int64Helper",ft.parseString=function(e){var t=new mt(0,0),r=new mt(0,1),i=!1,n=j.trim(e);"-"==n.charAt(0)&&(i=!0,n=n.substring(1,n.length));for(var a=n.length,s=0,l=a;s<l;){var o=s++,u=Y.cca(n,a-1-o)-48;if(u<0||9<u)throw ct.thrown("NumberFormatError");if(0!=u){var h=u>>31,c=u;if(i){var p=65535&r.low,_=r.low>>>16,m=65535&c,f=c>>>16,d=pt._mul(p,m),g=pt._mul(_,m),v=pt._mul(p,f),A=d,y=(pt._mul(_,f)+(v>>>16)|0)+(g>>>16)|0;if(A=A+(v<<=16)|0,pt.ucompare(A,v)<0){y++;y|=0}if(A=A+(g<<=16)|0,pt.ucompare(A,g)<0){y++;y|=0}var T=y=y+(pt._mul(r.low,h)+pt._mul(r.high,c)|0)|0,b=A,w=t.high-T|0,N=t.low-b|0;if(pt.ucompare(t.low,b)<0){w--;w|=0}if(!((t=new mt(w,N)).high<0))throw ct.thrown("NumberFormatError: Underflow")}else{var S=65535&r.low,x=r.low>>>16,E=65535&c,z=c>>>16,I=pt._mul(S,E),k=pt._mul(x,E),B=pt._mul(S,z),F=I,O=(pt._mul(x,z)+(B>>>16)|0)+(k>>>16)|0;if(F=F+(B<<=16)|0,pt.ucompare(F,B)<0){O++;O|=0}if(F=F+(k<<=16)|0,pt.ucompare(F,k)<0){O++;O|=0}var P=O=O+(pt._mul(r.low,h)+pt._mul(r.high,c)|0)|0,C=F,D=t.high+P|0,R=t.low+C|0;if(pt.ucompare(R,t.low)<0){D++;D|=0}if((t=new mt(D,R)).high<0)throw ct.thrown("NumberFormatError: Overflow")}}var L=65535&r.low,U=r.low>>>16,M=pt._mul(L,10),K=pt._mul(U,10),V=pt._mul(L,0),q=M,G=(pt._mul(U,0)+(V>>>16)|0)+(K>>>16)|0;if(q=q+(V<<=16)|0,pt.ucompare(q,V)<0){G++;G|=0}if(q=q+(K<<=16)|0,pt.ucompare(q,K)<0){G++;G|=0}G=G+(pt._mul(r.low,0)+pt._mul(r.high,10)|0)|0,r=new mt(G,q)}return t},ft.fromFloat=function(e){if(isNaN(e)||!isFinite(e))throw ct.thrown("Number is NaN or Infinite");var t=e-e%1;if(9007199254740991<t)throw ct.thrown("Conversion overflow");if(t<-9007199254740991)throw ct.thrown("Conversion underflow");for(var r=new mt(0,0),i=t<0,n=i?-t:t,a=0;1<=n;){var s=n%2;if(n/=2,1<=s){var l,o=a;if(0==(o&=63))l=new mt(0,1);else if(o<32){l=new mt(0<<o|1>>>32-o,1<<o)}else{l=new mt(1<<o-32,0)}var u=r.high+l.high|0,h=r.low+l.low|0;if(pt.ucompare(h,r.low)<0){u++;u|=0}r=new mt(u,h)}++a}if(i){u=~r.high;if(0==(h=1+~r.low|0)){u++;u|=0}r=new mt(u,h)}return r};var dt=function(){};(r["haxe.Log"]=dt).__name__="haxe.Log",dt.formatOutput=function(e,t){var r=O.string(e);if(null==t)return r;var i=t.fileName+":"+t.lineNumber;if(null!=t.customParams)for(var n=0,a=t.customParams;n<a.length;){e=a[n];++n,r+=", "+O.string(e)}return i+": "+r},dt.trace=function(e,t){var r=dt.formatOutput(e,t);"undefined"!=typeof console&&null!=console.log&&console.log(r)};var gt=function(){};(r["haxe.NativeStackTrace"]=gt).__name__="haxe.NativeStackTrace",gt.saveStack=function(e){gt.lastError=e},gt.callStack=function(){var e=new Error(""),t=gt.tryHaxeStack(e);if(void 0===t){try{throw e}catch(e){}t=e.stack}return gt.normalize(t,2)},gt.exceptionStack=function(){return gt.normalize(gt.tryHaxeStack(gt.lastError))},gt.toHaxe=function(e,t){if(null==t&&(t=0),null==e)return[];if("string"==typeof e){var r=e.split("\n");"Error"==r[0]&&r.shift();for(var i=[],n=0,a=r.length;n<a;){var s=n++;if(!(s<t)){var l=r[s],o=l.match(/^    at ([A-Za-z0-9_. ]+) \(([^)]+):([0-9]+):([0-9]+)\)$/);if(null!=o){var u=o[1].split(".");"$hxClasses"==u[0]&&u.shift();var h=u.pop(),c=o[2],p=O.parseInt(o[3]),_=O.parseInt(o[4]);i.push(ut.FilePos("Anonymous function"==h?ut.LocalFunction():"Global code"==h?null:ut.Method(u.join("."),h),c,p,_))}else i.push(ut.Module(j.trim(l)))}}return i}return 0<t&&Array.isArray(e)?e.slice(t):e},gt.tryHaxeStack=function(e){if(null==e)return[];var t=Error.prepareStackTrace;Error.prepareStackTrace=gt.prepareHxStackTrace;var r=e.stack;return Error.prepareStackTrace=t,r},gt.prepareHxStackTrace=function(e,t){for(var r=[],i=0;i<t.length;){var n=t[i];++i,null!=gt.wrapCallSite&&(n=gt.wrapCallSite(n));var a=null,s=n.getFunctionName();if(null!=s){var l=s.lastIndexOf(".");if(0<=l){var o=s.substring(0,l),u=s.substring(l+1);a=ut.Method(o,u)}else a=ut.Method(null,s)}var h=n.getFileName(),c=null==h?-1:h.indexOf("file:");null!=gt.wrapCallSite&&0<c&&(h=h.substring(c+6)),r.push(ut.FilePos(a,h,n.getLineNumber(),n.getColumnNumber()))}return r},gt.normalize=function(e,t){if(null==t&&(t=0),Array.isArray(e)&&0<t)return e.slice(t);if("string"==typeof e){switch(e.substring(0,6)){case"Error\n":case"Error:":++t}return gt.skipLines(e,t)}return e},gt.skipLines=function(e,t,r){return null==r&&(r=0),0<t?(r=e.indexOf("\n",r))<0?"":gt.skipLines(e,--t,r+1):e.substring(r)};var vt=function(){this.buf=new u,this.cache=[],this.useCache=vt.USE_CACHE,this.useEnumIndex=vt.USE_ENUM_INDEX,this.shash=new D,this.scount=0};(r["haxe.Serializer"]=vt).__name__="haxe.Serializer",vt.prototype={buf:null,cache:null,shash:null,scount:null,useCache:null,useEnumIndex:null,toString:function(){return this.buf.b},serializeString:function(e){var t=this.shash.h[e];if(null!=t)return this.buf.b+="R",void(this.buf.b+=null==t?"null":""+t);this.shash.h[e]=this.scount++,this.buf.b+="y",e=encodeURIComponent(e),this.buf.b+=O.string(e.length),this.buf.b+=":",this.buf.b+=null==e?"null":""+e},serializeRef:function(e){for(var t=typeof e,r=0,i=this.cache.length;r<i;){var n=r++,a=this.cache[n];if(typeof a==t&&a==e)return this.buf.b+="r",this.buf.b+=null==n?"null":""+n,!0}return this.cache.push(e),!1},serializeFields:function(e){for(var t=0,r=F.fields(e);t<r.length;){var i=r[t];++t,this.serializeString(i),this.serialize(F.field(e,i))}this.buf.b+="g"},serialize:function(e){switch((x=P.typeof(e))._hx_index){case 0:this.buf.b+="n";break;case 1:if(0==(t=e))return void(this.buf.b+="z");this.buf.b+="i",this.buf.b+=null==t?"null":""+t;break;case 2:var t=e;isNaN(t)?this.buf.b+="k":isFinite(t)?(this.buf.b+="d",this.buf.b+=null==t?"null":""+t):this.buf.b+=t<0?"m":"p";break;case 3:this.buf.b+=e?"t":"f";break;case 4:if(or.__instanceof(e,yr)){var r=e.__name__;this.buf.b+="A",this.serializeString(r)}else if(or.__instanceof(e,Tr))this.buf.b+="B",this.serializeString(e.__ename__);else{if(this.useCache&&this.serializeRef(e))return;this.buf.b+="o",this.serializeFields(e)}break;case 5:throw ct.thrown("Cannot serialize function");case 6:var i=x.c;if(i==String)return void this.serializeString(e);if(this.useCache&&this.serializeRef(e))return;switch(i){case Array:var n=0;this.buf.b+="a";for(var a=0,s=e.length;a<s;){null==e[p=a++]?++n:(0<n&&(1==n?this.buf.b+="n":(this.buf.b+="u",this.buf.b+=null==n?"null":""+n),n=0),this.serialize(e[p]))}0<n&&(1==n?this.buf.b+="n":(this.buf.b+="u",this.buf.b+=null==n?"null":""+n)),this.buf.b+="h";break;case Date:var l=e;this.buf.b+="v",this.buf.b+=O.string(l.getTime());break;case zt:this.buf.b+="q";for(var o=(t=e).keys();o.hasNext();){var u=o.next();this.buf.b+=":",this.buf.b+=null==u?"null":""+u,this.serialize(t.h[u])}this.buf.b+="h";break;case It:this.buf.b+="l";for(var h=(t=e).h;null!=h;){var c=h.item;h=h.next;var p=c;this.serialize(p)}this.buf.b+="h";break;case Ft:this.buf.b+="M";for(o=(t=e).keys();o.hasNext();){u=o.next();var _=F.field(u,"__id__");F.deleteField(u,"__id__"),this.serialize(u),u.__id__=_,this.serialize(t.h[u.__id__])}this.buf.b+="h";break;case D:this.buf.b+="b";for(var m=(t=e).h,f=Object.keys(m),d=f.length,g=0;g<d;){o=f[g++];this.serializeString(o),this.serialize(t.h[o])}this.buf.b+="h";break;case wt:t=e;this.buf.b+="s",this.buf.b+=O.string(Math.ceil(8*t.length/6)),this.buf.b+=":";p=0;var v=t.length-2,A=vt.BASE64_CODES;if(null==A){A=new Array(vt.BASE64.length);for(a=0,s=vt.BASE64.length;a<s;){var y=a++;A[y]=Y.cca(vt.BASE64,y)}vt.BASE64_CODES=A}for(;p<v;){var T=t.b[p++],b=t.b[p++],w=t.b[p++];this.buf.b+=String.fromCodePoint(A[T>>2]),this.buf.b+=String.fromCodePoint(A[63&(T<<4|b>>4)]),this.buf.b+=String.fromCodePoint(A[63&(b<<2|w>>6)]),this.buf.b+=String.fromCodePoint(A[63&w])}if(p==v){T=t.b[p++],b=t.b[p++];this.buf.b+=String.fromCodePoint(A[T>>2]),this.buf.b+=String.fromCodePoint(A[63&(T<<4|b>>4)]),this.buf.b+=String.fromCodePoint(A[b<<2&63])}else if(p==v+1){T=t.b[p++];this.buf.b+=String.fromCodePoint(A[T>>2]),this.buf.b+=String.fromCodePoint(A[T<<4&63])}break;default:this.useCache&&this.cache.pop(),null!=e.hxSerialize?(this.buf.b+="C",this.serializeString(i.__name__),this.useCache&&this.cache.push(e),e.hxSerialize(this),this.buf.b+="g"):(this.buf.b+="c",this.serializeString(i.__name__),this.useCache&&this.cache.push(e),this.serializeFields(e))}break;case 7:var N=x.e;if(this.useCache){if(this.serializeRef(e))return;this.cache.pop()}if(this.buf.b+=O.string(this.useEnumIndex?"j":"w"),this.serializeString(N.__ename__),this.useEnumIndex)this.buf.b+=":",this.buf.b+=O.string(e._hx_index);else{N=e;this.serializeString(z[N.__enum__].__constructs__[N._hx_index]._hx_name)}this.buf.b+=":";var S=P.enumParameters(e);this.buf.b+=O.string(S.length);for(var x=0;x<S.length;){var E=S[x];++x,this.serialize(E)}this.useCache&&this.cache.push(e);break;default:throw ct.thrown("Cannot serialize "+O.string(e))}},__class__:vt};var At=function(e){var t=this;this.id=setInterval(function(){t.run()},e)};(r["haxe.Timer"]=At).__name__="haxe.Timer",At.delay=function(e,t){var r=new At(t);return r.run=function(){r.stop(),e()},r},At.prototype={id:null,stop:function(){null!=this.id&&(clearInterval(this.id),this.id=null)},run:function(){},__class__:At};var yt=function(){};(r["haxe._Unserializer.DefaultResolver"]=yt).__name__="haxe._Unserializer.DefaultResolver",yt.prototype={resolveClass:function(e){return r[e]},resolveEnum:function(e){return z[e]},__class__:yt};var Tt=function(e){this.buf=e,this.length=this.buf.length,this.pos=0,this.scache=[],this.cache=[];var t=Tt.DEFAULT_RESOLVER;null==t&&(t=new yt,Tt.DEFAULT_RESOLVER=t),this.resolver=t};(r["haxe.Unserializer"]=Tt).__name__="haxe.Unserializer",Tt.initCodes=function(){for(var e=[],t=0,r=Tt.BASE64.length;t<r;){var i=t++;e[Tt.BASE64.charCodeAt(i)]=i}return e},Tt.prototype={buf:null,pos:null,length:null,cache:null,scache:null,resolver:null,readDigits:function(){for(var e=0,t=!1,r=this.pos;;){var i=this.buf.charCodeAt(this.pos);if(i!=i)break;if(45!=i){if(i<48||57<i)break;e=10*e+(i-48),this.pos++}else{if(this.pos!=r)break;t=!0,this.pos++}}return t&&(e*=-1),e},readFloat:function(){for(var e=this.pos;;){var t=this.buf.charCodeAt(this.pos);if(t!=t)break;if(!(43<=t&&t<58||101==t||69==t))break;this.pos++}return parseFloat(Y.substr(this.buf,e,this.pos-e))},unserializeObject:function(e){for(;;){if(this.pos>=this.length)throw ct.thrown("Invalid object");if(103==this.buf.charCodeAt(this.pos))break;var t=this.unserialize();if("string"!=typeof t)throw ct.thrown("Invalid object key");var r=this.unserialize();e[t]=r}this.pos++},unserializeEnum:function(e,t){if(58!=this.buf.charCodeAt(this.pos++))throw ct.thrown("Invalid enum format");var r=this.readDigits();if(0==r)return P.createEnum(e,t);for(var i=[];0<r--;)i.push(this.unserialize());return P.createEnum(e,t,i)},unserialize:function(){switch(this.buf.charCodeAt(this.pos++)){case 65:var e=this.unserialize();if(null==(o=this.resolver.resolveClass(e)))throw ct.thrown("Class not found "+e);return o;case 66:e=this.unserialize();if(null==(f=this.resolver.resolveEnum(e)))throw ct.thrown("Enum not found "+e);return f;case 67:e=this.unserialize();if(null==(o=this.resolver.resolveClass(e)))throw ct.thrown("Class not found "+e);var t=Object.create(o.prototype);if(this.cache.push(t),t.hxUnserialize(this),103!=this.buf.charCodeAt(this.pos++))throw ct.thrown("Invalid custom data");return t;case 77:var r=new Ft;this.cache.push(r);for(var i=this.buf;104!=this.buf.charCodeAt(this.pos);){var n=this.unserialize();r.set(n,this.unserialize())}return this.pos++,r;case 82:if((s=this.readDigits())<0||s>=this.scache.length)throw ct.thrown("Invalid string reference");return this.scache[s];case 97:i=this.buf;var a=[];for(this.cache.push(a);;){if(104==(g=this.buf.charCodeAt(this.pos))){this.pos++;break}if(117==g){this.pos++;var s=this.readDigits();a[a.length+s-1]=null}else a.push(this.unserialize())}return a;case 98:r=new D;this.cache.push(r);for(i=this.buf;104!=this.buf.charCodeAt(this.pos);){n=this.unserialize();var l=this.unserialize();r.h[n]=l}return this.pos++,r;case 99:var o;e=this.unserialize();if(null==(o=this.resolver.resolveClass(e)))throw ct.thrown("Class not found "+e);t=Object.create(o.prototype);return this.cache.push(t),this.unserializeObject(t),t;case 100:return this.readFloat();case 102:return!1;case 105:return this.readDigits();case 106:e=this.unserialize();if(null==(k=this.resolver.resolveEnum(e)))throw ct.thrown("Enum not found "+e);this.pos++;for(var u=this.readDigits(),h=k.__constructs__,c=new Array(h.length),p=0,_=h.length;p<_;){c[v=p++]=h[v]._hx_name}var m=c[u];if(null==m)throw ct.thrown("Unknown enum index "+e+"@"+u);var f=this.unserializeEnum(k,m);return this.cache.push(f),f;case 107:return NaN;case 108:var d=new It;this.cache.push(d);for(i=this.buf;104!=this.buf.charCodeAt(this.pos);)d.add(this.unserialize());return this.pos++,d;case 109:return-1/0;case 110:return null;case 111:t={};return this.cache.push(t),this.unserializeObject(t),t;case 112:return 1/0;case 113:r=new zt;this.cache.push(r);i=this.buf;for(var g=this.buf.charCodeAt(this.pos++);58==g;){var v=this.readDigits();l=this.unserialize();r.h[v]=l,g=this.buf.charCodeAt(this.pos++)}if(104!=g)throw ct.thrown("Invalid IntMap format");return r;case 114:if((s=this.readDigits())<0||s>=this.cache.length)throw ct.thrown("Invalid reference");return this.cache[s];case 115:var A=this.readDigits();i=this.buf;if(58!=this.buf.charCodeAt(this.pos++)||this.length-this.pos<A)throw ct.thrown("Invalid bytes length");var y=Tt.CODES;null==y&&(y=Tt.initCodes(),Tt.CODES=y);for(var T=3&A,b=(v=this.pos)+(A-T),w=new wt(new ArrayBuffer(3*(A>>2)+(2<=T?T-1:0))),N=0;v<b;){var S=y[i.charCodeAt(v++)],x=y[i.charCodeAt(v++)];w.b[N++]=S<<2|x>>4;var E=y[i.charCodeAt(v++)];w.b[N++]=x<<4|E>>2;var z=y[i.charCodeAt(v++)];w.b[N++]=E<<6|z}if(2<=T){S=y[i.charCodeAt(v++)],x=y[i.charCodeAt(v++)];if(w.b[N++]=S<<2|x>>4,3==T){E=y[i.charCodeAt(v++)];w.b[N++]=x<<4|E>>2}}return this.pos+=A,this.cache.push(w),w;case 116:return!0;case 118:var I;return 48<=this.buf.charCodeAt(this.pos)&&this.buf.charCodeAt(this.pos)<=57&&48<=this.buf.charCodeAt(this.pos+1)&&this.buf.charCodeAt(this.pos+1)<=57&&48<=this.buf.charCodeAt(this.pos+2)&&this.buf.charCodeAt(this.pos+2)<=57&&48<=this.buf.charCodeAt(this.pos+3)&&this.buf.charCodeAt(this.pos+3)<=57&&45==this.buf.charCodeAt(this.pos+4)?(I=Y.strDate(Y.substr(this.buf,this.pos,19)),this.pos+=19):I=new Date(this.readFloat()),this.cache.push(I),I;case 119:var k;e=this.unserialize();if(null==(k=this.resolver.resolveEnum(e)))throw ct.thrown("Enum not found "+e);f=this.unserializeEnum(k,this.unserialize());return this.cache.push(f),f;case 120:throw ct.thrown(this.unserialize());case 121:A=this.readDigits();if(58!=this.buf.charCodeAt(this.pos++)||this.length-this.pos<A)throw ct.thrown("Invalid string length");n=Y.substr(this.buf,this.pos,A);return this.pos+=A,n=decodeURIComponent(n.split("+").join(" ")),this.scache.push(n),n;case 122:return 0}throw this.pos--,ct.thrown("Invalid char "+this.buf.charAt(this.pos)+" at position "+this.pos)},__class__:Tt};var bt=function(e,t,r){ct.call(this,String(e),t,r),this.value=e,this.__skipStack++};(r["haxe.ValueException"]=bt).__name__="haxe.ValueException",bt.__super__=ct,bt.prototype=a(ct.prototype,{value:null,unwrap:function(){return this.value},__class__:bt});var wt=function(e){this.length=e.byteLength,this.b=new Uint8Array(e),(this.b.bufferValue=e).hxBytes=this,e.bytes=this.b};(r["haxe.io.Bytes"]=wt).__name__="haxe.io.Bytes",wt.ofString=function(e,t){if(t==Nt.RawNative){for(var r=new Uint8Array(e.length<<1),i=0,n=e.length;i<n;){var a=i++,s=e.charCodeAt(a);r[a<<1]=255&s,r[a<<1|1]=s>>8}return new wt(r.buffer)}var l=[];for(a=0;a<e.length;){55296<=(s=e.charCodeAt(a++))&&s<=56319&&(s=s-55232<<10|1023&e.charCodeAt(a++)),s<=127?l.push(s):(s<=2047?l.push(192|s>>6):(s<=65535?l.push(224|s>>12):(l.push(240|s>>18),l.push(128|s>>12&63)),l.push(128|s>>6&63)),l.push(128|63&s))}return new wt(new Uint8Array(l).buffer)},wt.ofData=function(e){var t=e.hxBytes;return null!=t?t:new wt(e)},wt.prototype={length:null,b:null,sub:function(e,t){if(e<0||t<0||e+t>this.length)throw ct.thrown(Dt.OutsideBounds);return new wt(this.b.buffer.slice(e+this.b.byteOffset,e+this.b.byteOffset+t))},getString:function(e,t,r){if(e<0||t<0||e+t>this.length)throw ct.thrown(Dt.OutsideBounds);null==r&&(r=Nt.UTF8);var i="",n=this.b,a=e,s=e+t;switch(r._hx_index){case 0:for(;a<s;){if((h=n[a++])<128){if(0==h)break;i+=String.fromCodePoint(h)}else if(h<224){var l=(63&h)<<6|127&n[a++];i+=String.fromCodePoint(l)}else if(h<240){var o=(31&h)<<12|(127&n[a++])<<6|127&n[a++];i+=String.fromCodePoint(o)}else{var u=(15&h)<<18|(127&n[a++])<<12|(127&n[a++])<<6|127&n[a++];i+=String.fromCodePoint(u)}}break;case 1:for(;a<s;){var h=n[a++]|n[a++]<<8;i+=String.fromCodePoint(h)}}return i},toString:function(){return this.getString(0,this.length)},toHex:function(){for(var e="",t=[],r="0123456789abcdef",i=0,n=r.length;i<n;){var a=i++;t.push(Y.cca(r,a))}for(i=0,n=this.length;i<n;){a=i++;var s=this.b[a];e+=String.fromCodePoint(t[s>>4]),e+=String.fromCodePoint(t[15&s])}return e},__class__:wt};var Nt=z["haxe.io.Encoding"]={__ename__:"haxe.io.Encoding",__constructs__:null,UTF8:{_hx_name:"UTF8",_hx_index:0,__enum__:"haxe.io.Encoding",toString:n},RawNative:{_hx_name:"RawNative",_hx_index:1,__enum__:"haxe.io.Encoding",toString:n}};Nt.__constructs__=[Nt.UTF8,Nt.RawNative];var St=function(){};(r["haxe.crypto.Base64"]=St).__name__="haxe.crypto.Base64",St.encode=function(e,t){null==t&&(t=!0);var r=new xt(St.BYTES).encodeBytes(e).toString();if(t)switch(e.length%3){case 1:r+="==";break;case 2:r+="="}return r},St.decode=function(e,t){if(null==t&&(t=!0),t)for(;61==Y.cca(e,e.length-1);)e=Y.substr(e,0,-1);return new xt(St.BYTES).decodeBytes(wt.ofString(e))};var xt=function(e){for(var t=e.length,r=1;1<<r<t;)++r;if(8<r||t!=1<<r)throw ct.thrown("BaseCode : base length must be a power of two.");this.base=e,this.nbits=r};(r["haxe.crypto.BaseCode"]=xt).__name__="haxe.crypto.BaseCode",xt.prototype={base:null,nbits:null,tbl:null,encodeBytes:function(e){for(var t=this.nbits,r=this.base,i=8*e.length/t|0,n=new wt(new ArrayBuffer(i+(8*e.length%t==0?0:1))),a=0,s=0,l=(1<<t)-1,o=0,u=0;u<i;){for(;s<t;)s+=8,a<<=8,a|=e.b[o++];s-=t,n.b[u++]=r.b[a>>s&l]}return 0<s&&(n.b[u++]=r.b[a<<t-s&l]),n},initTable:function(){for(var e=[],t=0;t<256;){e[i=t++]=-1}t=0;for(var r=this.base.length;t<r;){var i=t++;e[this.base.b[i]]=i}this.tbl=e},decodeBytes:function(e){var t=this.nbits;this.base;null==this.tbl&&this.initTable();for(var r=this.tbl,i=e.length*t>>3,n=new wt(new ArrayBuffer(i)),a=0,s=0,l=0,o=0;o<i;){for(;s<8;){s+=t,a<<=t;var u=r[e.b[l++]];if(-1==u)throw ct.thrown("BaseCode : invalid encoded char");a|=u}s-=8,n.b[o++]=a>>s&255}return n},__class__:xt};var Et=function(){};(r["haxe.crypto.Sha1"]=Et).__name__="haxe.crypto.Sha1",Et.make=function(e){var t=(new Et).doEncode(Et.bytes2blks(e)),r=new wt(new ArrayBuffer(20)),i=0;return r.b[i++]=t[0]>>>24,r.b[i++]=t[0]>>16&255,r.b[i++]=t[0]>>8&255,r.b[i++]=255&t[0],r.b[i++]=t[1]>>>24,r.b[i++]=t[1]>>16&255,r.b[i++]=t[1]>>8&255,r.b[i++]=255&t[1],r.b[i++]=t[2]>>>24,r.b[i++]=t[2]>>16&255,r.b[i++]=t[2]>>8&255,r.b[i++]=255&t[2],r.b[i++]=t[3]>>>24,r.b[i++]=t[3]>>16&255,r.b[i++]=t[3]>>8&255,r.b[i++]=255&t[3],r.b[i++]=t[4]>>>24,r.b[i++]=t[4]>>16&255,r.b[i++]=t[4]>>8&255,r.b[i++]=255&t[4],r},Et.bytes2blks=function(e){for(var t=1+(e.length+8>>6),r=[],i=0,n=16*t;i<n;){r[a=i++]=0}for(i=0,n=e.length;i<n;){r[(a=i++)>>2]|=e.b[a]<<24-((3&a)<<3)}var a;return r[(a=e.length)>>2]|=128<<24-((3&a)<<3),r[16*t-1]=8*e.length,r},Et.prototype={doEncode:function(e){for(var t=[],r=1732584193,i=-271733879,n=-1732584194,a=271733878,s=-1009589776,l=0;l<e.length;){for(var o=r,u=i,h=n,c=a,p=s,_=0;_<80;){if(_<16)t[_]=e[l+_];else{var m=t[_-3]^t[_-8]^t[_-14]^t[_-16];t[_]=m<<1|m>>>31}var f=(r<<5|r>>>27)+this.ft(_,i,n,a)+s+t[_]+this.kt(_);s=a,a=n,n=i<<30|i>>>2,i=r,r=f,++_}r+=o,i+=u,n+=h,a+=c,s+=p,l+=16}return[r,i,n,a,s]},ft:function(e,t,r,i){return e<20?t&r|~t&i:e<40?t^r^i:e<60?t&r|t&i|r&i:t^r^i},kt:function(e){return e<20?1518500249:e<40?1859775393:e<60?-1894007588:-899497514},__class__:Et};var zt=function(){this.h={}};(r["haxe.ds.IntMap"]=zt).__name__="haxe.ds.IntMap",zt.__interfaces__=[w],zt.prototype={h:null,keys:function(){var e=[];for(var t in this.h)this.h.hasOwnProperty(t)&&e.push(+t);return new Lt(e)},iterator:function(){return{ref:this.h,it:this.keys(),hasNext:function(){return this.it.hasNext()},next:function(){var e=this.it.next();return this.ref[e]}}},__class__:zt};var It=function(){this.length=0};(r["haxe.ds.List"]=It).__name__="haxe.ds.List",It.prototype={h:null,q:null,length:null,add:function(e){var t=new kt(e,null);null==this.h?this.h=t:this.q.next=t,this.q=t,this.length++},pop:function(){if(null==this.h)return null;var e=this.h.item;return this.h=this.h.next,null==this.h&&(this.q=null),this.length--,e},isEmpty:function(){return null==this.h},remove:function(e){for(var t=null,r=this.h;null!=r;){if(r.item==e)return null==t?this.h=r.next:t.next=r.next,this.q==r&&(this.q=t),this.length--,!0;r=(t=r).next}return!1},iterator:function(){return new Bt(this.h)},filter:function(e){for(var t=new It,r=this.h;null!=r;){var i=r.item;r=r.next,e(i)&&t.add(i)}return t},__class__:It};var kt=function(e,t){this.item=e,this.next=t};(r["haxe.ds._List.ListNode"]=kt).__name__="haxe.ds._List.ListNode",kt.prototype={item:null,next:null,__class__:kt};var Bt=function(e){this.head=e};(r["haxe.ds._List.ListIterator"]=Bt).__name__="haxe.ds._List.ListIterator",Bt.prototype={head:null,hasNext:function(){return null!=this.head},next:function(){var e=this.head.item;return this.head=this.head.next,e},__class__:Bt};var Ft=function(){this.h={__keys__:{}}};(r["haxe.ds.ObjectMap"]=Ft).__name__="haxe.ds.ObjectMap",Ft.__interfaces__=[w],Ft.prototype={h:null,set:function(e,t){var r=e.__id__;null==r&&(r=e.__id__=i.$haxeUID++),this.h[r]=t,this.h.__keys__[r]=e},keys:function(){var e=[];for(var t in this.h.__keys__)this.h.hasOwnProperty(t)&&e.push(this.h.__keys__[t]);return new Lt(e)},__class__:Ft};var Ot=function(e){this.str=e,this.pos=0};(r["haxe.format.JsonParser"]=Ot).__name__="haxe.format.JsonParser",Ot.prototype={str:null,pos:null,doParse:function(){for(var e,t=this.parseRec();;){e=this.str.charCodeAt(this.pos++);if(e!=e)break;switch(e){case 9:case 10:case 13:case 32:break;default:this.invalidChar()}}return t},parseRec:function(){for(;;){var e=this.str.charCodeAt(this.pos++);switch(e){case 9:case 10:case 13:case 32:break;case 34:return this.parseString();case 45:case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:for(var t=e,r=this.pos-1,i=45==t,n=!i,a=48==t,s=!1,l=!1,o=!1,u=!1;;){switch(t=this.str.charCodeAt(this.pos++)){case 43:case 45:l&&!o||this.invalidNumber(r),o=!(n=!1);break;case 46:(i||s||l)&&this.invalidNumber(r),s=!(n=!1);break;case 48:a&&!s&&this.invalidNumber(r),i&&(a=!(i=!1)),n=!0;break;case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:a&&!s&&this.invalidNumber(r),i&&(i=!1),a=!(n=!0);break;case 69:case 101:(i||a||l)&&this.invalidNumber(r),l=!(n=!1);break;default:n||this.invalidNumber(r),this.pos--,u=!0}if(u)break}var h=parseFloat(Y.substr(this.str,r,this.pos-r));if(s)return h;var c=0|h;return c==h?c:h;case 91:for(var p=[],_=null;;){switch(this.str.charCodeAt(this.pos++)){case 9:case 10:case 13:case 32:break;case 44:_?_=!1:this.invalidChar();break;case 93:return 0==_&&this.invalidChar(),p;default:_&&this.invalidChar(),this.pos--,p.push(this.parseRec()),_=!0}}break;case 102:var m=this.pos;return 97==this.str.charCodeAt(this.pos++)&&108==this.str.charCodeAt(this.pos++)&&115==this.str.charCodeAt(this.pos++)&&101==this.str.charCodeAt(this.pos++)||(this.pos=m,this.invalidChar()),!1;case 110:var f=this.pos;return 117==this.str.charCodeAt(this.pos++)&&108==this.str.charCodeAt(this.pos++)&&108==this.str.charCodeAt(this.pos++)||(this.pos=f,this.invalidChar()),null;case 116:var d=this.pos;return 114==this.str.charCodeAt(this.pos++)&&117==this.str.charCodeAt(this.pos++)&&101==this.str.charCodeAt(this.pos++)||(this.pos=d,this.invalidChar()),!0;case 123:for(var g={},v=null,A=null;;){switch(this.str.charCodeAt(this.pos++)){case 9:case 10:case 13:case 32:break;case 34:(null!=v||A)&&this.invalidChar(),v=this.parseString();break;case 44:A?A=!1:this.invalidChar();break;case 58:null==v&&this.invalidChar(),g[v]=this.parseRec(),A=!(v=null);break;case 125:return null==v&&0!=A||this.invalidChar(),g;default:this.invalidChar()}}break;default:this.invalidChar()}}},parseString:function(){for(var e=this.pos,t=null,r=-1;;){var i=this.str.charCodeAt(this.pos++);if(34==i)break;if(92==i){null==t&&(t=new u);var n=this.str,a=this.pos-e-1;switch(t.b+=null==a?Y.substr(n,e,null):Y.substr(n,e,a),117!=(i=this.str.charCodeAt(this.pos++))&&-1!=r&&(t.b+=String.fromCodePoint(65533),r=-1),i){case 34:case 47:case 92:t.b+=String.fromCodePoint(i);break;case 98:t.b+=String.fromCodePoint(8);break;case 102:t.b+=String.fromCodePoint(12);break;case 110:t.b+=String.fromCodePoint(10);break;case 114:t.b+=String.fromCodePoint(13);break;case 116:t.b+=String.fromCodePoint(9);break;case 117:var s=O.parseInt("0x"+Y.substr(this.str,this.pos,4));this.pos+=4,-1!=r?(t.b+=s<56320||57343<s?String.fromCodePoint(65533):String.fromCodePoint(s-56320+(r-55296<<10)+65536),r=-1):55296<=s&&s<=56319?r=s:t.b+=String.fromCodePoint(s);break;default:throw ct.thrown("Invalid escape sequence \\"+String.fromCodePoint(i)+" at position "+(this.pos-1))}e=this.pos}else if(i!=i)throw ct.thrown("Unclosed string")}if(-1!=r&&(t.b+=String.fromCodePoint(65533),r=-1),null==t)return Y.substr(this.str,e,this.pos-e-1);n=this.str,a=this.pos-e-1;return t.b+=null==a?Y.substr(n,e,null):Y.substr(n,e,a),t.b},invalidChar:function(){throw this.pos--,ct.thrown("Invalid char "+this.str.charCodeAt(this.pos)+" at position "+this.pos)},invalidNumber:function(e){throw ct.thrown("Invalid number at position "+e+": "+Y.substr(this.str,e,this.pos-e))},__class__:Ot};var Pt=function(e,t){this.replacer=e,this.indent=t,this.pretty=null!=t,this.nind=0,this.buf=new u};(r["haxe.format.JsonPrinter"]=Pt).__name__="haxe.format.JsonPrinter",Pt.print=function(e,t,r){var i=new Pt(t,r);return i.write("",e),i.buf.b},Pt.prototype={buf:null,replacer:null,indent:null,pretty:null,nind:null,write:function(e,t){null!=this.replacer&&(t=this.replacer(e,t));var r=P.typeof(t);switch(r._hx_index){case 0:this.buf.b+="null";break;case 1:this.buf.b+=O.string(t);break;case 2:var i=isFinite(t)?O.string(t):"null";this.buf.b+=O.string(i);break;case 3:this.buf.b+=O.string(t);break;case 4:this.fieldsString(t,F.fields(t));break;case 5:this.buf.b+='"<fun>"';break;case 6:var n=r.c;if(n==String)this.quote(t);else if(n==Array){i=t;this.buf.b+=String.fromCodePoint(91);for(var a=i.length,s=a-1,l=0,o=a;l<o;){if(0<(d=l++)?this.buf.b+=String.fromCodePoint(44):this.nind++,this.pretty&&(this.buf.b+=String.fromCodePoint(10)),this.pretty){var u=j.lpad("",this.indent,this.nind*this.indent.length);this.buf.b+=O.string(u)}if(this.write(d,i[d]),d==s&&(this.nind--,this.pretty&&(this.buf.b+=String.fromCodePoint(10)),this.pretty)){var h=j.lpad("",this.indent,this.nind*this.indent.length);this.buf.b+=O.string(h)}}this.buf.b+=String.fromCodePoint(93)}else if(n==D){for(var c={},p=(i=t).h,_=Object.keys(p),m=_.length,f=0;f<m;){c[e=_[f++]]=i.h[e]}i=c;this.fieldsString(i,F.fields(i))}else if(n==Date){i=t;this.quote(Y.dateStr(i))}else this.classString(t);break;case 7:l=r.e;var d=t._hx_index;this.buf.b+=O.string(d);break;case 8:this.buf.b+='"???"'}},classString:function(e){this.fieldsString(e,P.getInstanceFields(or.getClass(e)))},fieldsString:function(e,t){this.buf.b+=String.fromCodePoint(123);for(var r=t.length,i=r-1,n=!0,a=0,s=r;a<s;){var l=a++,o=t[l],u=F.field(e,o);if(!F.isFunction(u)){if(n?(this.nind++,n=!1):this.buf.b+=String.fromCodePoint(44),this.pretty&&(this.buf.b+=String.fromCodePoint(10)),this.pretty){var h=j.lpad("",this.indent,this.nind*this.indent.length);this.buf.b+=O.string(h)}if(this.quote(o),this.buf.b+=String.fromCodePoint(58),this.pretty&&(this.buf.b+=String.fromCodePoint(32)),this.write(o,u),l==i&&(this.nind--,this.pretty&&(this.buf.b+=String.fromCodePoint(10)),this.pretty)){var c=j.lpad("",this.indent,this.nind*this.indent.length);this.buf.b+=O.string(c)}}}this.buf.b+=String.fromCodePoint(125)},quote:function(e){this.buf.b+=String.fromCodePoint(34);for(var t=0,r=e.length;t<r;){var i=e.charCodeAt(t++);switch(i){case 8:this.buf.b+="\\b";break;case 9:this.buf.b+="\\t";break;case 10:this.buf.b+="\\n";break;case 12:this.buf.b+="\\f";break;case 13:this.buf.b+="\\r";break;case 34:this.buf.b+='\\"';break;case 92:this.buf.b+="\\\\";break;default:this.buf.b+=String.fromCodePoint(i)}}this.buf.b+=String.fromCodePoint(34)},__class__:Pt};var Ct=function(){this.pos=0,this.size=0};(r["haxe.io.BytesBuffer"]=Ct).__name__="haxe.io.BytesBuffer",Ct.prototype={buffer:null,view:null,u8:null,pos:null,size:null,addBytes:function(e,t,r){if(t<0||r<0||t+r>e.length)throw ct.thrown(Dt.OutsideBounds);if(this.pos+r>this.size&&this.grow(r),0!=this.size){var i=new Uint8Array(e.b.buffer,e.b.byteOffset+t,r);this.u8.set(i,this.pos),this.pos+=r}},grow:function(e){for(var t=this.pos+e,r=0==this.size?16:this.size;r<t;)r=3*r>>1;var i=new ArrayBuffer(r),n=new Uint8Array(i);0<this.size&&n.set(this.u8),this.size=r,this.buffer=i,this.u8=n,this.view=new DataView(this.buffer)},getBytes:function(){if(0==this.size)return new wt(new ArrayBuffer(0));var e=new wt(this.buffer);return e.length=this.pos,e},__class__:Ct};var Dt=z["haxe.io.Error"]={__ename__:"haxe.io.Error",__constructs__:null,Blocked:{_hx_name:"Blocked",_hx_index:0,__enum__:"haxe.io.Error",toString:n},Overflow:{_hx_name:"Overflow",_hx_index:1,__enum__:"haxe.io.Error",toString:n},OutsideBounds:{_hx_name:"OutsideBounds",_hx_index:2,__enum__:"haxe.io.Error",toString:n},Custom:(t=function(e){return{_hx_index:3,e:e,__enum__:"haxe.io.Error",toString:n}},t._hx_name="Custom",t.__params__=["e"],t)};Dt.__constructs__=[Dt.Blocked,Dt.Overflow,Dt.OutsideBounds,Dt.Custom];var Rt={fromBytes:function(e,t,r){return null==t&&(t=0),null==r&&(r=e.length-t),new Uint8Array(e.b.bufferValue,t,r)}},Lt=function(e){this.current=0,this.array=e};(r["haxe.iterators.ArrayIterator"]=Lt).__name__="haxe.iterators.ArrayIterator",Lt.prototype={array:null,current:null,hasNext:function(){return this.current<this.array.length},next:function(){return this.array[this.current++]},__class__:Lt};var Ut=function(e){this.cause=e,this.causeStackTrace=ht.exceptionStack()};(r["hx.concurrent.ConcurrentException"]=Ut).__name__="hx.concurrent.ConcurrentException",Ut.prototype={cause:null,causeStackTrace:null,toString:function(){var e="";e+="rethrown exception:\n",e+="  ",e+="--------------------\n",e+="  ",e+="| Exception : ",e+=O.string(this.cause),e+="\n";for(var t=0,r=ht.toString(this.causeStackTrace).split("\n");t<r.length;){var i=r[t];++t,""!=i&&(e+="  ",e+=O.string(j.replace(i,"Called from","| at")),e+="\n")}return e+="  ",e+="--------------------"},__class__:Ut};var Mt=function(){};(r["hx.concurrent.Future"]=Mt).__name__="hx.concurrent.Future",Mt.__isInterface__=!0;var Kt=z["hx.concurrent.FutureResult"]={__ename__:"hx.concurrent.FutureResult",__constructs__:null,VALUE:(t=function(e,t,r){return{_hx_index:0,result:e,time:t,future:r,__enum__:"hx.concurrent.FutureResult",toString:n}},t._hx_name="VALUE",t.__params__=["result","time","future"],t),FAILURE:(t=function(e,t,r){return{_hx_index:1,ex:e,time:t,future:r,__enum__:"hx.concurrent.FutureResult",toString:n}},t._hx_name="FAILURE",t.__params__=["ex","time","future"],t),PENDING:(t=function(e){return{_hx_index:2,future:e,__enum__:"hx.concurrent.FutureResult",toString:n}},t._hx_name="PENDING",t.__params__=["future"],t)};Kt.__constructs__=[Kt.VALUE,Kt.FAILURE,Kt.PENDING];var Vt=function(){this.sync=new sr,this.completionListeners=[],this.result=Kt.PENDING(this)};(r["hx.concurrent.AbstractFuture"]=Vt).__name__="hx.concurrent.AbstractFuture",Vt.__interfaces__=[Mt],Vt.prototype={completionListeners:null,sync:null,result:null,isComplete:function(){var e=this.result;if(2==e._hx_index){e.future;return!1}return!0},__class__:Vt};var qt=function(){Vt.call(this)};(r["hx.concurrent.CompletableFuture"]=qt).__name__="hx.concurrent.CompletableFuture",qt.__super__=Vt,qt.prototype=a(Vt.prototype,{complete:function(a,s){null==s&&(s=!1);var l=this;return this.sync.execute(function(){if(s||!l.isComplete()){switch((r=a)._hx_index){case 0:var e=r.v;l.result=Kt.VALUE(e,Date.now(),l);break;case 1:var t=r.v;l.result=Kt.FAILURE(t,Date.now(),l)}for(var r=0,i=l.completionListeners;r<i.length;){var n=i[r];++r;try{n(l.result)}catch(e){t=ct.caught(e);dt.trace(t,{fileName:"hx/concurrent/Future.hx",lineNumber:117,className:"hx.concurrent.CompletableFuture",methodName:"complete"})}}return!0}return!1})},__class__:qt});var Gt=function(){};(r["hx.concurrent.Service"]=Gt).__name__="hx.concurrent.Service",Gt.__isInterface__=!0;var Yt=z["hx.concurrent.ServiceState"]={__ename__:"hx.concurrent.ServiceState",__constructs__:null,STARTING:{_hx_name:"STARTING",_hx_index:0,__enum__:"hx.concurrent.ServiceState",toString:n},RUNNING:{_hx_name:"RUNNING",_hx_index:1,__enum__:"hx.concurrent.ServiceState",toString:n},STOPPING:{_hx_name:"STOPPING",_hx_index:2,__enum__:"hx.concurrent.ServiceState",toString:n},STOPPED:{_hx_name:"STOPPED",_hx_index:3,__enum__:"hx.concurrent.ServiceState",toString:n}};Yt.__constructs__=[Yt.STARTING,Yt.RUNNING,Yt.STOPPING,Yt.STOPPED];var jt=function(){this._stateLock=new sr,this.state=Yt.STOPPED,this.id=jt._ids.incrementAndGet(),dt.trace("["+O.string(this)+"] instantiated.",{fileName:"hx/concurrent/Service.hx",lineNumber:53,className:"hx.concurrent.ServiceBase",methodName:"new"})};(r["hx.concurrent.ServiceBase"]=jt).__name__="hx.concurrent.ServiceBase",jt.__interfaces__=[Gt],jt.prototype={id:null,state:null,set_state:function(e){switch(e._hx_index){case 0:dt.trace("["+O.string(this)+"] is starting...",{fileName:"hx/concurrent/Service.hx",lineNumber:42,className:"hx.concurrent.ServiceBase",methodName:"set_state"});break;case 1:dt.trace("["+O.string(this)+"] is running.",{fileName:"hx/concurrent/Service.hx",lineNumber:43,className:"hx.concurrent.ServiceBase",methodName:"set_state"});break;case 2:dt.trace("["+O.string(this)+"] is stopping...",{fileName:"hx/concurrent/Service.hx",lineNumber:44,className:"hx.concurrent.ServiceBase",methodName:"set_state"});break;case 3:dt.trace("["+O.string(this)+"] is stopped.",{fileName:"hx/concurrent/Service.hx",lineNumber:45,className:"hx.concurrent.ServiceBase",methodName:"set_state"})}return this.state=e},_stateLock:null,start:function(){var e=this;this._stateLock.execute(function(){switch(e.state._hx_index){case 0:case 1:break;case 2:throw ct.thrown("Service ["+O.string(e)+"] is currently stopping!");case 3:e.set_state(Yt.STARTING),e.onStart(),e.set_state(Yt.RUNNING)}})},onStart:function(){},toString:function(){return or.getClass(this).__name__+"#"+this.id},__class__:jt,__properties__:{set_state:"set_state"}};var Ht={_new:function(e){var t=new Zt;return null!=e&&t.addAll(e),t}},Zt=function(){this._sync=new sr,this._items=[]};(r["hx.concurrent.collection._CopyOnWriteArray.CopyOnWriteArrayImpl"]=Zt).__name__="hx.concurrent.collection._CopyOnWriteArray.CopyOnWriteArrayImpl",Zt.__interfaces__=[x],Zt.prototype={_items:null,_sync:null,addAll:function(u){var h=this;this._sync.execute(function(){var e=null,t=u;switch(t._hx_index){case 0:var r=t.v;e=h._items.slice();for(var i=r.iterator();i.hasNext();){var n=i.next();e.push(n)}break;case 1:var a=t.v;e=h._items.concat(a);break;case 2:var s=t.v;e=h._items.slice();for(var l=s.h;null!=l;){var o=l.item;l=l.next;i=o;e.push(i)}}h._items=e})},iterator:function(){return new Lt(this._items)},__class__:Zt};var Jt=z["hx.concurrent.executor.Schedule"]={__ename__:"hx.concurrent.executor.Schedule",__constructs__:null,ONCE:(t=function(e){return{_hx_index:0,initialDelayMS:e,__enum__:"hx.concurrent.executor.Schedule",toString:n}},t._hx_name="ONCE",t.__params__=["initialDelayMS"],t),FIXED_DELAY:(t=function(e,t){return{_hx_index:1,intervalMS:e,initialDelayMS:t,__enum__:"hx.concurrent.executor.Schedule",toString:n}},t._hx_name="FIXED_DELAY",t.__params__=["intervalMS","initialDelayMS"],t),FIXED_RATE:(t=function(e,t){return{_hx_index:2,intervalMS:e,initialDelayMS:t,__enum__:"hx.concurrent.executor.Schedule",toString:n}},t._hx_name="FIXED_RATE",t.__params__=["intervalMS","initialDelayMS"],t),HOURLY:(t=function(e,t){return{_hx_index:3,minute:e,second:t,__enum__:"hx.concurrent.executor.Schedule",toString:n}},t._hx_name="HOURLY",t.__params__=["minute","second"],t),DAILY:(t=function(e,t,r){return{_hx_index:4,hour:e,minute:t,second:r,__enum__:"hx.concurrent.executor.Schedule",toString:n}},t._hx_name="DAILY",t.__params__=["hour","minute","second"],t),WEEKLY:(t=function(e,t,r,i){return{_hx_index:5,day:e,hour:t,minute:r,second:i,__enum__:"hx.concurrent.executor.Schedule",toString:n}},t._hx_name="WEEKLY",t.__params__=["day","hour","minute","second"],t)};Jt.__constructs__=[Jt.ONCE,Jt.FIXED_DELAY,Jt.FIXED_RATE,Jt.HOURLY,Jt.DAILY,Jt.WEEKLY];var Wt=function(){this.completionListeners=Ht._new(),jt.call(this)};(r["hx.concurrent.executor.Executor"]=Wt).__name__="hx.concurrent.executor.Executor",Wt.create=function(e,t){return null==t&&(t=!0),null==e&&(e=1),new er(t)},Wt.__super__=jt,Wt.prototype=a(jt.prototype,{completionListeners:null,notifyResult:function(e){for(var t=0,r=this.completionListeners._items;t<r.length;){var i=r[t++];try{i(e)}catch(e){var n=ct.caught(e);dt.trace(n,{fileName:"hx/concurrent/executor/Executor.hx",lineNumber:49,className:"hx.concurrent.executor.Executor",methodName:"notifyResult"})}}if(0==this.completionListeners._items.length&&1==e._hx_index){e.time,e.future,n=e.ex;dt.trace(n,{fileName:"hx/concurrent/executor/Executor.hx",lineNumber:52,className:"hx.concurrent.executor.Executor",methodName:"notifyResult"})}},submit:null,__class__:Wt});var Xt=function(){};(r["hx.concurrent.executor.TaskFuture"]=Xt).__name__="hx.concurrent.executor.TaskFuture",Xt.__isInterface__=!0,Xt.__interfaces__=[Mt];var Qt=function(e,t,r){this.isStopped=!1,qt.call(this),this._executor=e,this._task=t,this.schedule=$t.assertValid(r)};(r["hx.concurrent.executor.AbstractTaskFuture"]=Qt).__name__="hx.concurrent.executor.AbstractTaskFuture",Qt.__interfaces__=[Xt],Qt.__super__=qt,Qt.prototype=a(qt.prototype,{schedule:null,isStopped:null,_executor:null,_task:null,__class__:Qt});var $t=function(){};(r["hx.concurrent.executor.ScheduleTools"]=$t).__name__="hx.concurrent.executor.ScheduleTools",$t.applyDefaults=function(e){switch(e._hx_index){case 0:if(null==e.initialDelayMS)return Jt.ONCE(0);break;case 1:var t=e.intervalMS;if(null==e.initialDelayMS)return Jt.FIXED_DELAY(t,0);break;case 2:t=e.intervalMS;if(null==e.initialDelayMS)return Jt.FIXED_RATE(t,0);break;case 3:var r=e.minute,i=e.second;if(null==r||null==i)return Jt.HOURLY(null==r?0:r,null==i?0:i);break;case 4:var n=e.hour;r=e.minute,i=e.second;if(null==n||null==r||null==i)return Jt.DAILY(null==n?0:n,null==r?0:r,null==i?0:i);break;case 5:var a=e.day;n=e.hour,r=e.minute,i=e.second;if(null==a||null==n||null==r||null==i)return Jt.WEEKLY(null==a?0:a,null==n?0:n,null==r?0:r,null==i?0:i)}return e},$t.assertValid=function(e){switch((e=$t.applyDefaults(e))._hx_index){case 0:if((r=e.initialDelayMS)<0)throw ct.thrown("[Schedule.ONCE.initialDelayMS] must be >= 0");break;case 1:var t=e.intervalMS,r=e.initialDelayMS;if(t<=0)throw ct.thrown("[Schedule.FIXED_DELAY.intervalMS] must be > 0");if(null==r||r<0)throw ct.thrown("[Schedule.FIXED_DELAY.initialDelayMS] must be >= 0");break;case 2:t=e.intervalMS,r=e.initialDelayMS;if(t<=0)throw ct.thrown("[Schedule.FIXED_RATE.intervalMS] must be > 0");if(r<0)throw ct.thrown("[Schedule.FIXED_RATE.initialDelayMS] must be >= 0");break;case 3:var i=e.minute,n=e.second;if(null==i||i<0)throw ct.thrown("[Schedule.DAILY.minute] must be between >= 0 and <= 59");if(null==n||n<0)throw ct.thrown("[Schedule.DAILY.second] must be between >= 0 and <= 59");break;case 4:var a=e.hour;i=e.minute,n=e.second;if(null==a||a<0)throw ct.thrown("[Schedule.DAILY.hour] must be between >= 0 and <= 23");if(null==i||i<0)throw ct.thrown("[Schedule.DAILY.minute] must be between >= 0 and <= 59");if(null==n||n<0)throw ct.thrown("[Schedule.DAILY.second] must be between >= 0 and <= 59");break;case 5:e.day,a=e.hour,i=e.minute,n=e.second;if(null==a||a<0)throw ct.thrown("[Schedule.WEEKLY.hour] must be between >= 0 and <= 23");if(null==i||i<0)throw ct.thrown("[Schedule.WEEKLY.minute] must be between >= 0 and <= 59");if(null==n||n<0)throw ct.thrown("[Schedule.WEEKLY.second] must be between >= 0 and <= 59")}return e},$t.firstRunAt=function(e){switch((e=$t.assertValid(e))._hx_index){case 0:var t=e.initialDelayMS;return Date.now()+t;case 1:case 2:e.intervalMS,t=e.initialDelayMS;return Date.now()+t;case 3:var r=e.minute,i=e.second,n=Date.now(),a=60*r+i,s=60*(o=new Date(n)).getMinutes()+o.getSeconds();return n+1e3*(a-s)+(a<s?36e5:0);case 4:var l=e.hour;r=e.minute,i=e.second;return(n=Date.now())+1e3*((h=60*l*60+60*r+i)-(c=60*(o=new Date(n)).getHours()*60+60*o.getMinutes()+o.getSeconds()))+(h<c?864e5:0);case 5:var o,u=e.day,h=(l=e.hour,r=e.minute,i=e.second,n=Date.now(),60*l*60+60*r+i),c=60*(o=new Date(n)).getHours()*60+60*o.getMinutes()+o.getSeconds(),p=u;return p==o.getDay()?n+1e3*(h-c)+(h<c?6048e5:0):o.getDate()<p?n+1e3*(h-c)+864e5*(p-o.getDate()):n+1e3*(h-c)+864e5*(7-(p-o.getDate()))}};var er=function(e){null==e&&(e=!0),this._scheduledTasks=[],Wt.call(this),e&&this.start()};(r["hx.concurrent.executor.TimerExecutor"]=er).__name__="hx.concurrent.executor.TimerExecutor",er.__super__=Wt,er.prototype=a(Wt.prototype,{_scheduledTasks:null,submit:function(i,e){var n=this,a=null==e?Wt.NOW_ONCE:e;return this._stateLock.execute(function(){if(n.state!=Yt.RUNNING)throw ct.thrown("Cannot accept new tasks. Executor is not in state [RUNNING] but ["+O.string(n.state)+"].");for(var e=n._scheduledTasks.length;0<e--;)n._scheduledTasks[e].isStopped&&n._scheduledTasks.splice(e,1);var t=new tr(n,i,a);if(0==a._hx_index){var r=a.initialDelayMS;null==r?n._scheduledTasks.push(t):0!=r&&n._scheduledTasks.push(t)}else n._scheduledTasks.push(t);return t})},__class__:er});var tr=function(e,t,r){Qt.call(this,e,t,r);var i=$t.firstRunAt(this.schedule)-Date.now()|0;i<0&&(i=0),At.delay(mr(this,this.run),i)};(r["hx.concurrent.executor._TimerExecutor.TaskFutureImpl"]=tr).__name__="hx.concurrent.executor._TimerExecutor.TaskFutureImpl",tr.__super__=Qt,tr.prototype=a(Qt.prototype,{_timer:null,run:function(){if(!this.isStopped){if(null==this._timer){var e=null;switch((i=this.schedule)._hx_index){case 2:i.initialDelayMS;var t=i.intervalMS;(e=new At(t)).run=mr(this,this.run);break;case 3:i.minute,i.second;(e=new At(36e5)).run=mr(this,this.run);break;case 4:i.hour,i.minute,i.second;(e=new At(864e5)).run=mr(this,this.run);break;case 5:i.day,i.hour,i.minute,i.second;(e=new At(6048e5)).run=mr(this,this.run)}this._timer=e}var r;try{var i;switch((i=this._task)._hx_index){case 0:var n=i.v;r=rr.a(n());break;case 1:(0,i.v)(),r=null}}catch(i){var a=ct.caught(i);r=rr.b(new Ut(a))}switch((i=this.schedule)._hx_index){case 0:i.initialDelayMS;this.isStopped=!0;break;case 1:i.initialDelayMS,t=i.intervalMS;this._timer=At.delay(mr(this,this.run),t)}this.complete(r,!0),this._executor.notifyResult(this.result)}},__class__:tr});var rr=z["hx.concurrent.internal._Either2._Either2"]={__ename__:"hx.concurrent.internal._Either2._Either2",__constructs__:null,a:(t=function(e){return{_hx_index:0,v:e,__enum__:"hx.concurrent.internal._Either2._Either2",toString:n}},t._hx_name="a",t.__params__=["v"],t),b:(t=function(e){return{_hx_index:1,v:e,__enum__:"hx.concurrent.internal._Either2._Either2",toString:n}},t._hx_name="b",t.__params__=["v"],t)};rr.__constructs__=[rr.a,rr.b];var ir=z["hx.concurrent.internal._Either3._Either3"]={__ename__:"hx.concurrent.internal._Either3._Either3",__constructs__:null,a:(t=function(e){return{_hx_index:0,v:e,__enum__:"hx.concurrent.internal._Either3._Either3",toString:n}},t._hx_name="a",t.__params__=["v"],t),b:(t=function(e){return{_hx_index:1,v:e,__enum__:"hx.concurrent.internal._Either3._Either3",toString:n}},t._hx_name="b",t.__params__=["v"],t),c:(t=function(e){return{_hx_index:2,v:e,__enum__:"hx.concurrent.internal._Either3._Either3",toString:n}},t._hx_name="c",t.__params__=["v"],t)};ir.__constructs__=[ir.a,ir.b,ir.c];var nr=function(){};(r["hx.concurrent.lock.Acquirable"]=nr).__name__="hx.concurrent.lock.Acquirable",nr.__isInterface__=!0;var ar=function(){};(r["hx.concurrent.lock.AbstractAcquirable"]=ar).__name__="hx.concurrent.lock.AbstractAcquirable",ar.__interfaces__=[nr],ar.prototype={release:null,acquire:null,execute:function(e,t){null==t&&(t=!1);var r=null,i=null;this.acquire();try{i=e()}catch(e){var n=ct.caught(e);r=new Ut(n)}if(this.release(),!t&&null!=r)throw ct.thrown(r.toString());return i},__class__:ar};var sr=function(){this._holderEntranceCount=0,this._holder=null};(r["hx.concurrent.lock.RLock"]=sr).__name__="hx.concurrent.lock.RLock",sr.__super__=ar,sr.prototype=a(ar.prototype,{_holder:null,_holderEntranceCount:null,acquire:function(){this._holder=lr.get_current(),this._holderEntranceCount++},release:function(){if(this._holder!=lr.get_current())throw null!=this._holder&&this._holder!=lr.get_current()?ct.thrown("Lock was aquired by another thread!"):ct.thrown("Lock was not aquired by any thread!");this._holderEntranceCount--,0==this._holderEntranceCount&&(this._holder=null)},__class__:sr});var lr=function(){};(r["hx.concurrent.thread.Threads"]=lr).__name__="hx.concurrent.thread.Threads",lr.__properties__={get_current:"get_current"},lr.get_current=function(){return"MainThread"};var or=function(){};(r["js.Boot"]=or).__name__="js.Boot",or.getClass=function(e){if(null==e)return null;if(e instanceof Array)return Array;var t=e.__class__;if(null!=t)return t;var r=or.__nativeClassName(e);return null!=r?or.__resolveNativeClass(r):null},or.__string_rec=function(a,s){if(null==a)return"null";if(5<=s.length)return"<...>";var e=typeof a;switch("function"==e&&(a.__name__||a.__ename__)&&(e="object"),e){case"function":return"<function>";case"object":if(a.__enum__){var l=z[a.__enum__].__constructs__[a._hx_index],t=l._hx_name;return l.__params__?(s+="\t",t+"("+function(e){for(var t=[],r=0,i=l.__params__;r<i.length;){var n=i[r];r+=1,t.push(or.__string_rec(a[n],s))}return t}().join(",")+")"):t}if(a instanceof Array){var r="[";s+="\t";for(var i=0,n=a.length;i<n;){var o=i++;r+=(0<o?",":"")+or.__string_rec(a[o],s)}return r+="]"}var u;try{u=a.toString}catch(i){return gt.lastError=i,"???"}if(null!=u&&u!=Object.toString&&"function"==typeof u){var h=a.toString();if("[object Object]"!=h)return h}r="{\n";s+="\t";var c=null!=a.hasOwnProperty,p=null;for(p in a)c&&!a.hasOwnProperty(p)||"prototype"!=p&&"__class__"!=p&&"__super__"!=p&&"__interfaces__"!=p&&"__properties__"!=p&&(2!=r.length&&(r+=", \n"),r+=s+p+" : "+or.__string_rec(a[p],s));return r+="\n"+(s=s.substring(1))+"}";case"string":return a;default:return String(a)}},or.__interfLoop=function(e,t){if(null==e)return!1;if(e==t)return!0;var r=e.__interfaces__;if(null!=r)for(var i=0,n=r.length;i<n;){var a=r[i++];if(a==t||or.__interfLoop(a,t))return!0}return or.__interfLoop(e.__super__,t)},or.__instanceof=function(e,t){if(null==t)return!1;switch(t){case Array:return e instanceof Array;case Ar:return"boolean"==typeof e;case gr:return null!=e;case vr:return"number"==typeof e;case dr:return"number"==typeof e&&(0|e)===e;case String:return"string"==typeof e;default:if(null==e)return!1;if("function"==typeof t){if(or.__downcastCheck(e,t))return!0}else if("object"==typeof t&&or.__isNativeObj(t)&&e instanceof t)return!0;return t==yr&&null!=e.__name__||(t==Tr&&null!=e.__ename__||null!=e.__enum__&&z[e.__enum__]==t)}},or.__downcastCheck=function(e,t){return e instanceof t||!!t.__isInterface__&&or.__interfLoop(or.getClass(e),t)},or.__cast=function(e,t){if(null==e||or.__instanceof(e,t))return e;throw ct.thrown("Cannot cast "+O.string(e)+" to "+O.string(t))},or.__nativeClassName=function(e){var t=or.__toStr.call(e).slice(8,-1);return"Object"==t||"Function"==t||"Math"==t||"JSON"==t?null:t},or.__isNativeObj=function(e){return null!=or.__nativeClassName(e)},or.__resolveNativeClass=function(e){return i[e]};var ur=function(){};(r["js.Browser"]=ur).__name__="js.Browser",ur.__properties__={get_supported:"get_supported"},ur.get_supported=function(){return"undefined"!=typeof window&&void 0!==window.location&&"string"==typeof window.location.protocol};var hr=function(){};(r["js.lib._ArrayBuffer.ArrayBufferCompat"]=hr).__name__="js.lib._ArrayBuffer.ArrayBufferCompat",hr.sliceImpl=function(e,t){var r=new Uint8Array(this,e,null==t?null:t-e),i=new Uint8Array(r.byteLength);return i.set(r),i.buffer};var cr={stringToVersion:function(e){if(!cr.VERSION.match(e))throw ct.thrown('Invalid SemVer format for "'+e+'"');return{version:[O.parseInt(cr.VERSION.matched(1)),O.parseInt(cr.VERSION.matched(2)),O.parseInt(cr.VERSION.matched(3))],pre:cr.parseIdentifiers(cr.VERSION.matched(4)),build:cr.parseIdentifiers(cr.VERSION.matched(5))}},equals:function(e,t){return e.version[0]==t.version[0]&&e.version[1]==t.version[1]&&e.version[2]==t.version[2]&&cr.equalsIdentifiers(e.pre,t.pre)},greaterThan:function(e,t){return 0<e.pre.length&&0<t.pre.length?e.version[0]==t.version[0]&&e.version[1]==t.version[1]&&e.version[2]==t.version[2]&&cr.greaterThanIdentifiers(e.pre,t.pre):0<t.pre.length?e.version[0]!=t.version[0]?e.version[0]>t.version[0]:e.version[1]!=t.version[1]?e.version[1]>t.version[1]:e.version[2]!=t.version[2]?e.version[2]>t.version[2]:!(0<e.pre.length)||cr.greaterThanIdentifiers(e.pre,t.pre):e.pre.length<=0&&(e.version[0]!=t.version[0]?e.version[0]>t.version[0]:e.version[1]!=t.version[1]?e.version[1]>t.version[1]:e.version[2]!=t.version[2]?e.version[2]>t.version[2]:cr.greaterThanIdentifiers(e.pre,t.pre))},greaterThanOrEqual:function(e,t){return!!cr.equals(e,t)||cr.greaterThan(e,t)},lessThan:function(e,t){return!cr.greaterThanOrEqual(e,t)},lessThanOrEqual:function(e,t){return!cr.greaterThan(e,t)},parseIdentifiers:function(e){for(var t=(null==e?"":e).split("."),r=cr.sanitize,i=new Array(t.length),n=0,a=t.length;n<a;){i[o=n++]=r(t[o])}n=[],a=0;for(var s=i;a<s.length;){var l=s[a];++a,""!=l&&n.push(l)}for(t=n,r=cr.parseIdentifier,i=new Array(t.length),n=0,a=t.length;n<a;){var o;i[o=n++]=r(t[o])}return i},parseIdentifier:function(e){var t=O.parseInt(e);return null==t?pr.StringId(e):pr.IntId(t)},equalsIdentifiers:function(e,t){if(e.length!=t.length)return!1;for(var r=0,i=e.length;r<i;){var n=r++,a=e[n],s=t[n];switch(a._hx_index){case 0:if(0==s._hx_index){var l=s.value;if(a.value!=l)return!1}break;case 1:if(1==s._hx_index){var o=s.value;if(a.value!=o)return!1}}}return!0},greaterThanIdentifiers:function(e,t){for(var r=0,i=e.length;r<i;){var n=r++,a=e[n],s=t[n];switch(a._hx_index){case 0:var l=a.value;switch(s._hx_index){case 0:var o=s.value;if(l==o)continue;return o<l;case 1:s.value;return!0;default:return!1}break;case 1:var u=a.value;if(1==s._hx_index){var h=s.value;if(u==h)continue;return h<u}return!1;default:return!1}}return!1},sanitize:function(e){return e.replace(cr.SANITIZER.r,"")}},pr=z["thx.semver.Identifier"]={__ename__:"thx.semver.Identifier",__constructs__:null,StringId:(t=function(e){return{_hx_index:0,value:e,__enum__:"thx.semver.Identifier",toString:n}},t._hx_name="StringId",t.__params__=["value"],t),IntId:(t=function(e){return{_hx_index:1,value:e,__enum__:"thx.semver.Identifier",toString:n}},t._hx_name="IntId",t.__params__=["value"],t)};function _r(e){return e instanceof Array?new Lt(e):e.iterator()}function mr(e,t){return null==t?null:(null==t.__id__&&(t.__id__=i.$haxeUID++),null==e.hx__closures__?e.hx__closures__={}:r=e.hx__closures__[t.__id__],null==r&&(r=t.bind(e),e.hx__closures__[t.__id__]=r),r);var r}pr.__constructs__=[pr.StringId,pr.IntId],i.$haxeUID|=0,"undefined"!=typeof performance&&"function"==typeof performance.now&&(Y.now=performance.now.bind(performance)),r.Math=Math,null==String.fromCodePoint&&(String.fromCodePoint=function(e){return e<65536?String.fromCharCode(e):String.fromCharCode(55232+(e>>10))+String.fromCharCode(56320+(1023&e))}),String.prototype.__class__=r.String=String,String.__name__="String",r.Array=Array,Array.__name__="Array",Date.prototype.__class__=r.Date=Date,Date.__name__="Date";var fr,dr={},gr={},vr=Number,Ar=Boolean,yr={},Tr={};Ft.count=0,or.__toStr={}.toString,null==ArrayBuffer.prototype.slice&&(ArrayBuffer.prototype.slice=hr.sliceImpl),f.SYSTEM_DATA_LOCK=f.getNewLock("system_data_lock"),f.METADATA_LOCK=f.getNewLock("meta_data_lock"),f.CHECK_TIME_LOCK=f.getNewLock("last_check_time_lock"),f.INITIALIZATION=f.getNewLock("initialize_lock"),C.resultsLock=f.getNewLock("datastore_results_lock"),d.LOG_LEVEL_VERBOSE=0,d.LOG_LEVEL_DEBUG=1,d.LOG_LEVEL_INFO=2,d.LOG_LEVEL_WARN=3,d.LOG_LEVEL_ERROR=4,d.LOG_LEVEL_NONE=5,d.logLevel=d.LOG_LEVEL_VERBOSE,d.useTraceForLogging=!1,g.kABTEventSourceApptimize="a",g.kABTValueEventKey="value",g._state=0,L.MAX_FAILURE_DELAY_MS=6e4,L.DEFAULT_FAILURE_DELAY_MS=1e3,L._failureDelayMs=(null==(fr=L.DEFAULT_FAILURE_DELAY_MS)&&(fr=0),new b(fr)),L._pendingMap=new D,L._pendingResults=N._new(),L._postDispatch=new R("Results Post Dispatch Queue"),L._loadedPending=!1,L.PENDING_LOCK=f.getNewLock("pending_results_key"),Q.kABTFilterKeyValue="value",Q.kABTFilterKeyType="type",Q.kABTFilterKeyProperty="property",Q.kABTFilterKeyOperator="operator",Q.kABTFilterKeyPropertySource="propertySource",Q.kABTFilterKeyCallServerInputs="callServerInputs",Q.kABTFilterKeyCallURLKey="callServerUrlKey",Q.kABTFilterKeyUserAttribute="userAttribute",Q.kABTFilterKeyPrefixedAttribute="prefixedAttribute",Q.kABTFilterKeyNamedFilter="namedFilter",se.__meta__={statics:{ABTEvaluateString:{static:null},ABTEvaluateBool:{static:null},ABTEvaluateNumber:{static:null}}},ce.kABTNamedFilterKeyFilterName="filterName",ce.kABTNamedFilterKeyTrueIsSticky="trueIsSticky",ce.kABTNamedFilterKeyFalseIsSticky="falseIsSticky",ce.kABTNamedFilterKeyNullIsSticky="nullIsSticky",Ie.RESULT_ENTRY_CREATION_LOCK=f.getNewLock("result_entry_creation_lock_key"),Ve.compressionPrefix="ABTGZIP+",Ge.ALL_LATENCY=2,Ge.kMetadataKey="METADATA_KEY",Ge.kUserIDKey="USER_ID_KEY",Ge.kAnonymousGuidKey="ANONYMOUS_GUID_KEY",Ge.kCustomPropertiesKey="CUSTOM_PROPERTIES_KEY",Ge.kInternalPropertiesKey="INTERNAL_PROPERTIES_KEY",Ge.kResultLogsKey="RESULT_LOGS_KEY",Ge.kResultPostsListKey="RESULT_POSTS_LIST_KEY",Ge.kResultEntrySequenceKey="RESULT_ENTRY_SEQUENCE_KEY",Ge.kResultEntryTimestampKey="RESULT_ENTRY_TIMESTAMP_KEY",Ge.kApptimizeVersionKey="APPTIMIZE_VERSION_KEY",Ge.kResultLastSubmitTimeKey="RESULT_LAST_SUBMIT_TIME_KEY",Ge.kMetadataLastCheckTimeKey="METADATA_LAST_CHECK_TIME_KEY",Ge.kDisabledVersions="DISABLED_VERSIONS_KEY",Ge._isFlushing=!1,je._sigilForApplicationNamespace="$",He.META_DATA_URL_KEY="meta_data_url",He.META_DATA_URL_LL_KEY="meta_data_ll_url",He.META_DATA_URL_HL_KEY="meta_data_hl_url",He.LOG_LEVEL_KEY="log_level",He.FOREGROUND_PERIOD_MS_KEY="foreground_period_ms",He.RESULT_POST_DELAY_MS_KEY="result_post_delay_ms",He.THREADING_ENABLED_KEY="threading_enabled",He.RESULT_POST_THREAD_POOL_SIZE_KEY="result_post_thread_pool_size",He.ALTERATION_CACHE_SIZE_KEY="alteration_cache_size",He.RESULTS_CACHE_SIZE_KEY="results_cache_size",He.MAXIMUM_RESULT_ENTRIES_KEY="maximum_result_entries",He.MAXIMUM_PENDING_RESULTS_KEY="maximum_pending_results",He.METADATA_POLLING_INTERVAL_MS_KEY="metadata_polling_interval_ms",He.METADATA_POLLING_BACKGROUND_INTERVAL_MS_KEY="metadata_polling_background_interval_ms",He.EXCEPTIONS_ENABLED_KEY="exceptions_enabled",He.MAXIMUM_RESULT_POST_FAILURE_KEY="maximum_result_failures",He.MAXIMUM_RESULT_POST_SENDER_TIMEOUT_MS_KEY="maximum_result_post_sender_timeout_ms",He.STORAGE_TYPE_KEY="storage_type",He.AUTOMATIC_SHUTDOWN_HOOK="automatic_shutdown_hook",He.APPTIMIZE_ENVIRONMENT_KEY="apptimize_environment",He.APPTIMIZE_MAXEXP_SEED_KEY="apptimize_maxseed",He.APPTIMIZE_REGION_KEY="apptimize_region",He.COMPRESS_PERSISTENCE_STORE_KEY="compress_persistence_store",He.GROUPS_BASE_URL_KEY="groups_base_url",He.REACT_NATIVE_STORAGE_KEY="react_native_storage",He.REFRESH_META_DATA_ON_SETUP="refresh_metadata_on_setup",He.LOCAL_DISK_STORAGE_PATH_KEY="local_disk_storage_path",nt.kBrowserNameUnknown="Unknown",nt.kBrowserNameChrome="Chrome",nt.kBrowserNameFirefox="Firefox",nt.kBrowserNameSafari="Safari",nt.kBrowserNameInternetExplorer="Internet Explorer",nt.kBrowserAndroidWebViewGeneral=" Version/",nt.kBrowserAndroidWebViewPreK=" Android ",nt.kBrowserAndroidWebViewKtoL=" Mobile ",nt.kBrowserAndroidWebViewLAbove=" wv",nt.kBrowserChrome="Chrome",nt.kBrowserChromeiOS="CriOS",nt.kBrowserChromium=" Chromium",nt.kBrowserEdge="Edge",nt.kBrowserEdgeiOS="EdgiOS",nt.kBrowserEdgeAndroid="EdgA",nt.kBrowserFirefox="Firefox",nt.kBrowserFirefoxiOS="FxiOS",nt.kBrowserInternetExplorer="MSIE",nt.kBrowserInternetExplorer11="Trident",nt.kBrowserSafari="Safari",nt.kBrowserSeaMonkey="SeaMonkey",nt.kBrowserOpera="Opera",nt.kBrowserOperaNew=" OPR",nt.kBrowserUnknown="Unknown",nt.kDeviceCategoryDesktop="Desktop",nt.kDeviceCategoryTablet="Tablet",nt.kDeviceCategoryMobile="Mobile",pt._mul=null!=Math.imul?Math.imul:function(e,t){return e*(65535&t)+(e*(t>>>16)<<16|0)|0},vt.USE_CACHE=!1,vt.USE_ENUM_INDEX=!1,vt.BASE64="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789%:",Tt.DEFAULT_RESOLVER=new yt,Tt.BASE64="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789%:",St.CHARS="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",St.BYTES=wt.ofString(St.CHARS),jt._ids=new b(0),Wt.NOW_ONCE=Jt.ONCE(0),cr.VERSION=new o("^(\\d+)\\.(\\d+)\\.(\\d+)(?:[-]([a-z0-9.-]+))?(?:[+]([a-z0-9.-]+))?$","i"),cr.SANITIZER=new o("[^0-9A-Za-z-]","g")}(void 0!==t?t:"undefined"!=typeof window?window:"undefined"!=typeof self?self:this,"undefined"!=typeof window?window:void 0!==e?e:"undefined"!=typeof self?self:this)}).call(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{pako:1}]},{},[17])(17)});