@optable/web-sdk 0.18.7 → 0.18.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -173,8 +173,8 @@ To get the targeting information associated by the configured DCN with the user'
173
173
  sdk
174
174
  .targeting()
175
175
  .then((response) => {
176
- console.log(`Audience targeting: ${targeting.audience}`)
177
- console.log(`User targeting: ${targeting.user}`)
176
+ console.log(`Audience targeting: ${targeting.audience}`);
177
+ console.log(`User targeting: ${targeting.user}`);
178
178
  })
179
179
  .catch((err) => console.warn(`Targeting API Error: ${err.message}`));
180
180
  ```
@@ -590,6 +590,7 @@ The above example uses various personalization tags as documented in [Braze's us
590
590
  On your website destination page, you can call a helper method provided by the SDK which will attempt to parse and validate a given query string parameter as EID (defaults to **oeid**), when found, it will automatically trigger a call to Optable's **identify** API.
591
591
 
592
592
  For example:
593
+
593
594
  ```html
594
595
  <!-- Optable SDK async load: -->
595
596
  <script async src="https://cdn.optable.co/web-sdk/v0/sdk.js"></script>
@@ -610,7 +611,6 @@ For example:
610
611
  // from the URL parameter even if it may not be a SHA256-hashed email.
611
612
  // For example, optable.instance.tryIdentifyFromParams("email_md5", "c2");
612
613
  // You can find a list of supported prefixes at https://docs.optable.co/optable-documentation/dmp/reference/identifier-types#type-prefixes
613
-
614
614
  });
615
615
  </script>
616
616
  ```
@@ -621,7 +621,6 @@ To fetch Google Privacy Sandbox topics using the Optable SDK, you can use the `g
621
621
 
622
622
  It is recommended to call this method before making ad calls to ensure that the latest topics are available for targeting.
623
623
 
624
-
625
624
  ```javascript
626
625
  // Optable SDK async load:
627
626
  <script async src="https://cdn.optable.co/web-sdk/latest/sdk.js"></script>
@@ -644,11 +643,13 @@ You can browse a recent (but not necessarily the latest) released version of the
644
643
  Note that the demo pages at [https://demo.optable.co/](https://demo.optable.co/) will by default rely on secure HTTP first-party cookies as described [here](https://github.com/Optable/optable-web-sdk#domains-and-cookies). To see an example based on [LocalStorage](https://github.com/Optable/optable-web-sdk#localstorage), see the [index-nocookies variant here](https://demo.optable.co/index-nocookies.html).
645
644
 
646
645
  To build and run the demos locally, you will need [Docker](https://www.docker.com/), `docker-compose` and `make`:
646
+
647
647
  ```
648
648
  $ cd path/to/optable-web-sdk
649
649
  $ make
650
650
  $ docker-compose up
651
651
  ```
652
+
652
653
  Then head to [https://localhost:8180/](localhost:8180) to see the demo pages. You can modify the code in each demo, then run `make build` and finally refresh the demo pages to see your changes take effect. If you want to test the demos with your own DCN, make sure to update the configuration (hostname and site slug) given to the OptableSDK (see `webpack.config.js` for the react example).
653
654
 
654
655
  Note that using HTTP first-party cookies with a local instance of the demos pages pointing to an Optable DCN will not work because [https://localhost:8180/](localhost:8180) does not share the same top-level domain name `.optable.co`. We recommend using [LocalStorage](https://github.com/Optable/optable-web-sdk#localstorage) instead.
@@ -1,2 +1,2 @@
1
1
  /*! For license information please see sdk.js.LICENSE.txt */
2
- (()=>{var __webpack_modules__={228:t=>{t.exports=function(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}},858:t=>{t.exports=function(t){if(Array.isArray(t))return t}},646:(t,e,r)=>{var n=r(228);t.exports=function(t){if(Array.isArray(t))return n(t)}},926:t=>{function e(t,e,r,n,o,i,a){try{var s=t[i](a),c=s.value}catch(t){return void r(t)}s.done?e(c):Promise.resolve(c).then(n,o)}t.exports=function(t){return function(){var r=this,n=arguments;return new Promise((function(o,i){var a=t.apply(r,n);function s(t){e(a,o,i,s,c,"next",t)}function c(t){e(a,o,i,s,c,"throw",t)}s(void 0)}))}}},575:t=>{t.exports=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}},913:t=>{function e(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}t.exports=function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}},713:t=>{t.exports=function(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}},860:t=>{t.exports=function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}},884:t=>{t.exports=function(t,e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t)){var r=[],n=!0,o=!1,i=void 0;try{for(var a,s=t[Symbol.iterator]();!(n=(a=s.next()).done)&&(r.push(a.value),!e||r.length!==e);n=!0);}catch(t){o=!0,i=t}finally{try{n||null==s.return||s.return()}finally{if(o)throw i}}return r}}},521:t=>{t.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}},206:t=>{t.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}},38:(t,e,r)=>{var n=r(858),o=r(884),i=r(379),a=r(521);t.exports=function(t,e){return n(t)||o(t,e)||i(t,e)||a()}},319:(t,e,r)=>{var n=r(646),o=r(860),i=r(379),a=r(206);t.exports=function(t){return n(t)||o(t)||i(t)||a()}},379:(t,e,r)=>{var n=r(228);t.exports=function(t,e){if(t){if("string"==typeof t)return n(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n(t,e):void 0}}},757:(t,e,r)=>{t.exports=r(666)},23:(module,exports,__webpack_require__)=>{var __WEBPACK_AMD_DEFINE_RESULT__;(function(){"use strict";var ERROR="input is invalid type",WINDOW="object"==typeof window,root=WINDOW?window:{};root.JS_SHA256_NO_WINDOW&&(WINDOW=!1);var WEB_WORKER=!WINDOW&&"object"==typeof self,NODE_JS=!root.JS_SHA256_NO_NODE_JS&&"object"==typeof process&&process.versions&&process.versions.node;NODE_JS?root=__webpack_require__.g:WEB_WORKER&&(root=self);var COMMON_JS=!root.JS_SHA256_NO_COMMON_JS&&module.exports,AMD=__webpack_require__.amdO,ARRAY_BUFFER=!root.JS_SHA256_NO_ARRAY_BUFFER&&"undefined"!=typeof ArrayBuffer,HEX_CHARS="0123456789abcdef".split(""),EXTRA=[-2147483648,8388608,32768,128],SHIFT=[24,16,8,0],K=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],OUTPUT_TYPES=["hex","array","digest","arrayBuffer"],blocks=[];!root.JS_SHA256_NO_NODE_JS&&Array.isArray||(Array.isArray=function(t){return"[object Array]"===Object.prototype.toString.call(t)}),!ARRAY_BUFFER||!root.JS_SHA256_NO_ARRAY_BUFFER_IS_VIEW&&ArrayBuffer.isView||(ArrayBuffer.isView=function(t){return"object"==typeof t&&t.buffer&&t.buffer.constructor===ArrayBuffer});var createOutputMethod=function(t,e){return function(r){return new Sha256(e,!0).update(r)[t]()}},createMethod=function(t){var e=createOutputMethod("hex",t);NODE_JS&&(e=nodeWrap(e,t)),e.create=function(){return new Sha256(t)},e.update=function(t){return e.create().update(t)};for(var r=0;r<OUTPUT_TYPES.length;++r){var n=OUTPUT_TYPES[r];e[n]=createOutputMethod(n,t)}return e},nodeWrap=function(method,is224){var crypto=eval("require('crypto')"),Buffer=eval("require('buffer').Buffer"),algorithm=is224?"sha224":"sha256",nodeMethod=function(t){if("string"==typeof t)return crypto.createHash(algorithm).update(t,"utf8").digest("hex");if(null==t)throw new Error(ERROR);return t.constructor===ArrayBuffer&&(t=new Uint8Array(t)),Array.isArray(t)||ArrayBuffer.isView(t)||t.constructor===Buffer?crypto.createHash(algorithm).update(new Buffer(t)).digest("hex"):method(t)};return nodeMethod},createHmacOutputMethod=function(t,e){return function(r,n){return new HmacSha256(r,e,!0).update(n)[t]()}},createHmacMethod=function(t){var e=createHmacOutputMethod("hex",t);e.create=function(e){return new HmacSha256(e,t)},e.update=function(t,r){return e.create(t).update(r)};for(var r=0;r<OUTPUT_TYPES.length;++r){var n=OUTPUT_TYPES[r];e[n]=createHmacOutputMethod(n,t)}return e};function Sha256(t,e){e?(blocks[0]=blocks[16]=blocks[1]=blocks[2]=blocks[3]=blocks[4]=blocks[5]=blocks[6]=blocks[7]=blocks[8]=blocks[9]=blocks[10]=blocks[11]=blocks[12]=blocks[13]=blocks[14]=blocks[15]=0,this.blocks=blocks):this.blocks=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],t?(this.h0=3238371032,this.h1=914150663,this.h2=812702999,this.h3=4144912697,this.h4=4290775857,this.h5=1750603025,this.h6=1694076839,this.h7=3204075428):(this.h0=1779033703,this.h1=3144134277,this.h2=1013904242,this.h3=2773480762,this.h4=1359893119,this.h5=2600822924,this.h6=528734635,this.h7=1541459225),this.block=this.start=this.bytes=this.hBytes=0,this.finalized=this.hashed=!1,this.first=!0,this.is224=t}function HmacSha256(t,e,r){var n,o=typeof t;if("string"===o){var i,a=[],s=t.length,c=0;for(n=0;n<s;++n)(i=t.charCodeAt(n))<128?a[c++]=i:i<2048?(a[c++]=192|i>>6,a[c++]=128|63&i):i<55296||i>=57344?(a[c++]=224|i>>12,a[c++]=128|i>>6&63,a[c++]=128|63&i):(i=65536+((1023&i)<<10|1023&t.charCodeAt(++n)),a[c++]=240|i>>18,a[c++]=128|i>>12&63,a[c++]=128|i>>6&63,a[c++]=128|63&i);t=a}else{if("object"!==o)throw new Error(ERROR);if(null===t)throw new Error(ERROR);if(ARRAY_BUFFER&&t.constructor===ArrayBuffer)t=new Uint8Array(t);else if(!(Array.isArray(t)||ARRAY_BUFFER&&ArrayBuffer.isView(t)))throw new Error(ERROR)}t.length>64&&(t=new Sha256(e,!0).update(t).array());var u=[],h=[];for(n=0;n<64;++n){var l=t[n]||0;u[n]=92^l,h[n]=54^l}Sha256.call(this,e,r),this.update(h),this.oKeyPad=u,this.inner=!0,this.sharedMemory=r}Sha256.prototype.update=function(t){if(!this.finalized){var e,r=typeof t;if("string"!==r){if("object"!==r)throw new Error(ERROR);if(null===t)throw new Error(ERROR);if(ARRAY_BUFFER&&t.constructor===ArrayBuffer)t=new Uint8Array(t);else if(!(Array.isArray(t)||ARRAY_BUFFER&&ArrayBuffer.isView(t)))throw new Error(ERROR);e=!0}for(var n,o,i=0,a=t.length,s=this.blocks;i<a;){if(this.hashed&&(this.hashed=!1,s[0]=this.block,s[16]=s[1]=s[2]=s[3]=s[4]=s[5]=s[6]=s[7]=s[8]=s[9]=s[10]=s[11]=s[12]=s[13]=s[14]=s[15]=0),e)for(o=this.start;i<a&&o<64;++i)s[o>>2]|=t[i]<<SHIFT[3&o++];else for(o=this.start;i<a&&o<64;++i)(n=t.charCodeAt(i))<128?s[o>>2]|=n<<SHIFT[3&o++]:n<2048?(s[o>>2]|=(192|n>>6)<<SHIFT[3&o++],s[o>>2]|=(128|63&n)<<SHIFT[3&o++]):n<55296||n>=57344?(s[o>>2]|=(224|n>>12)<<SHIFT[3&o++],s[o>>2]|=(128|n>>6&63)<<SHIFT[3&o++],s[o>>2]|=(128|63&n)<<SHIFT[3&o++]):(n=65536+((1023&n)<<10|1023&t.charCodeAt(++i)),s[o>>2]|=(240|n>>18)<<SHIFT[3&o++],s[o>>2]|=(128|n>>12&63)<<SHIFT[3&o++],s[o>>2]|=(128|n>>6&63)<<SHIFT[3&o++],s[o>>2]|=(128|63&n)<<SHIFT[3&o++]);this.lastByteIndex=o,this.bytes+=o-this.start,o>=64?(this.block=s[16],this.start=o-64,this.hash(),this.hashed=!0):this.start=o}return this.bytes>4294967295&&(this.hBytes+=this.bytes/4294967296<<0,this.bytes=this.bytes%4294967296),this}},Sha256.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var t=this.blocks,e=this.lastByteIndex;t[16]=this.block,t[e>>2]|=EXTRA[3&e],this.block=t[16],e>=56&&(this.hashed||this.hash(),t[0]=this.block,t[16]=t[1]=t[2]=t[3]=t[4]=t[5]=t[6]=t[7]=t[8]=t[9]=t[10]=t[11]=t[12]=t[13]=t[14]=t[15]=0),t[14]=this.hBytes<<3|this.bytes>>>29,t[15]=this.bytes<<3,this.hash()}},Sha256.prototype.hash=function(){var t,e,r,n,o,i,a,s,c,u=this.h0,h=this.h1,l=this.h2,f=this.h3,p=this.h4,d=this.h5,y=this.h6,v=this.h7,g=this.blocks;for(t=16;t<64;++t)e=((o=g[t-15])>>>7|o<<25)^(o>>>18|o<<14)^o>>>3,r=((o=g[t-2])>>>17|o<<15)^(o>>>19|o<<13)^o>>>10,g[t]=g[t-16]+e+g[t-7]+r<<0;for(c=h&l,t=0;t<64;t+=4)this.first?(this.is224?(i=300032,v=(o=g[0]-1413257819)-150054599<<0,f=o+24177077<<0):(i=704751109,v=(o=g[0]-210244248)-1521486534<<0,f=o+143694565<<0),this.first=!1):(e=(u>>>2|u<<30)^(u>>>13|u<<19)^(u>>>22|u<<10),n=(i=u&h)^u&l^c,v=f+(o=v+(r=(p>>>6|p<<26)^(p>>>11|p<<21)^(p>>>25|p<<7))+(p&d^~p&y)+K[t]+g[t])<<0,f=o+(e+n)<<0),e=(f>>>2|f<<30)^(f>>>13|f<<19)^(f>>>22|f<<10),n=(a=f&u)^f&h^i,y=l+(o=y+(r=(v>>>6|v<<26)^(v>>>11|v<<21)^(v>>>25|v<<7))+(v&p^~v&d)+K[t+1]+g[t+1])<<0,e=((l=o+(e+n)<<0)>>>2|l<<30)^(l>>>13|l<<19)^(l>>>22|l<<10),n=(s=l&f)^l&u^a,d=h+(o=d+(r=(y>>>6|y<<26)^(y>>>11|y<<21)^(y>>>25|y<<7))+(y&v^~y&p)+K[t+2]+g[t+2])<<0,e=((h=o+(e+n)<<0)>>>2|h<<30)^(h>>>13|h<<19)^(h>>>22|h<<10),n=(c=h&l)^h&f^s,p=u+(o=p+(r=(d>>>6|d<<26)^(d>>>11|d<<21)^(d>>>25|d<<7))+(d&y^~d&v)+K[t+3]+g[t+3])<<0,u=o+(e+n)<<0;this.h0=this.h0+u<<0,this.h1=this.h1+h<<0,this.h2=this.h2+l<<0,this.h3=this.h3+f<<0,this.h4=this.h4+p<<0,this.h5=this.h5+d<<0,this.h6=this.h6+y<<0,this.h7=this.h7+v<<0},Sha256.prototype.hex=function(){this.finalize();var t=this.h0,e=this.h1,r=this.h2,n=this.h3,o=this.h4,i=this.h5,a=this.h6,s=this.h7,c=HEX_CHARS[t>>28&15]+HEX_CHARS[t>>24&15]+HEX_CHARS[t>>20&15]+HEX_CHARS[t>>16&15]+HEX_CHARS[t>>12&15]+HEX_CHARS[t>>8&15]+HEX_CHARS[t>>4&15]+HEX_CHARS[15&t]+HEX_CHARS[e>>28&15]+HEX_CHARS[e>>24&15]+HEX_CHARS[e>>20&15]+HEX_CHARS[e>>16&15]+HEX_CHARS[e>>12&15]+HEX_CHARS[e>>8&15]+HEX_CHARS[e>>4&15]+HEX_CHARS[15&e]+HEX_CHARS[r>>28&15]+HEX_CHARS[r>>24&15]+HEX_CHARS[r>>20&15]+HEX_CHARS[r>>16&15]+HEX_CHARS[r>>12&15]+HEX_CHARS[r>>8&15]+HEX_CHARS[r>>4&15]+HEX_CHARS[15&r]+HEX_CHARS[n>>28&15]+HEX_CHARS[n>>24&15]+HEX_CHARS[n>>20&15]+HEX_CHARS[n>>16&15]+HEX_CHARS[n>>12&15]+HEX_CHARS[n>>8&15]+HEX_CHARS[n>>4&15]+HEX_CHARS[15&n]+HEX_CHARS[o>>28&15]+HEX_CHARS[o>>24&15]+HEX_CHARS[o>>20&15]+HEX_CHARS[o>>16&15]+HEX_CHARS[o>>12&15]+HEX_CHARS[o>>8&15]+HEX_CHARS[o>>4&15]+HEX_CHARS[15&o]+HEX_CHARS[i>>28&15]+HEX_CHARS[i>>24&15]+HEX_CHARS[i>>20&15]+HEX_CHARS[i>>16&15]+HEX_CHARS[i>>12&15]+HEX_CHARS[i>>8&15]+HEX_CHARS[i>>4&15]+HEX_CHARS[15&i]+HEX_CHARS[a>>28&15]+HEX_CHARS[a>>24&15]+HEX_CHARS[a>>20&15]+HEX_CHARS[a>>16&15]+HEX_CHARS[a>>12&15]+HEX_CHARS[a>>8&15]+HEX_CHARS[a>>4&15]+HEX_CHARS[15&a];return this.is224||(c+=HEX_CHARS[s>>28&15]+HEX_CHARS[s>>24&15]+HEX_CHARS[s>>20&15]+HEX_CHARS[s>>16&15]+HEX_CHARS[s>>12&15]+HEX_CHARS[s>>8&15]+HEX_CHARS[s>>4&15]+HEX_CHARS[15&s]),c},Sha256.prototype.toString=Sha256.prototype.hex,Sha256.prototype.digest=function(){this.finalize();var t=this.h0,e=this.h1,r=this.h2,n=this.h3,o=this.h4,i=this.h5,a=this.h6,s=this.h7,c=[t>>24&255,t>>16&255,t>>8&255,255&t,e>>24&255,e>>16&255,e>>8&255,255&e,r>>24&255,r>>16&255,r>>8&255,255&r,n>>24&255,n>>16&255,n>>8&255,255&n,o>>24&255,o>>16&255,o>>8&255,255&o,i>>24&255,i>>16&255,i>>8&255,255&i,a>>24&255,a>>16&255,a>>8&255,255&a];return this.is224||c.push(s>>24&255,s>>16&255,s>>8&255,255&s),c},Sha256.prototype.array=Sha256.prototype.digest,Sha256.prototype.arrayBuffer=function(){this.finalize();var t=new ArrayBuffer(this.is224?28:32),e=new DataView(t);return e.setUint32(0,this.h0),e.setUint32(4,this.h1),e.setUint32(8,this.h2),e.setUint32(12,this.h3),e.setUint32(16,this.h4),e.setUint32(20,this.h5),e.setUint32(24,this.h6),this.is224||e.setUint32(28,this.h7),t},HmacSha256.prototype=new Sha256,HmacSha256.prototype.finalize=function(){if(Sha256.prototype.finalize.call(this),this.inner){this.inner=!1;var t=this.array();Sha256.call(this,this.is224,this.sharedMemory),this.update(this.oKeyPad),this.update(t),Sha256.prototype.finalize.call(this)}};var exports=createMethod();exports.sha256=exports,exports.sha224=createMethod(!0),exports.sha256.hmac=createHmacMethod(),exports.sha224.hmac=createHmacMethod(!0),COMMON_JS?module.exports=exports:(root.sha256=exports.sha256,root.sha224=exports.sha224,AMD&&(__WEBPACK_AMD_DEFINE_RESULT__=function(){return exports}.call(exports,__webpack_require__,exports,module),void 0===__WEBPACK_AMD_DEFINE_RESULT__||(module.exports=__WEBPACK_AMD_DEFINE_RESULT__)))})()},666:t=>{var e=function(t){"use strict";var e,r=Object.prototype,n=r.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",s=o.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function u(t,e,r,n){var o=e&&e.prototype instanceof v?e:v,i=Object.create(o.prototype),a=new R(n||[]);return i._invoke=function(t,e,r){var n=l;return function(o,i){if(n===p)throw new Error("Generator is already running");if(n===d){if("throw"===o)throw i;return C()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var s=H(a,r);if(s){if(s===y)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(n===l)throw n=d,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n=p;var c=h(t,e,r);if("normal"===c.type){if(n=r.done?d:f,c.arg===y)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(n=d,r.method="throw",r.arg=c.arg)}}}(t,r,a),i}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=u;var l="suspendedStart",f="suspendedYield",p="executing",d="completed",y={};function v(){}function g(){}function _(){}var w={};w[i]=function(){return this};var b=Object.getPrototypeOf,m=b&&b(b(x([])));m&&m!==r&&n.call(m,i)&&(w=m);var S=_.prototype=v.prototype=Object.create(w);function A(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function E(t,e){function r(o,i,a,s){var c=h(t[o],t,i);if("throw"!==c.type){var u=c.arg,l=u.value;return l&&"object"==typeof l&&n.call(l,"__await")?e.resolve(l.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(l).then((function(t){u.value=t,a(u)}),(function(t){return r("throw",t,a,s)}))}s(c.arg)}var o;this._invoke=function(t,n){function i(){return new e((function(e,o){r(t,n,e,o)}))}return o=o?o.then(i,i):i()}}function H(t,r){var n=t.iterator[r.method];if(n===e){if(r.delegate=null,"throw"===r.method){if(t.iterator.return&&(r.method="return",r.arg=e,H(t,r),"throw"===r.method))return y;r.method="throw",r.arg=new TypeError("The iterator does not provide a 'throw' method")}return y}var o=h(n,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,y;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,y):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,y)}function O(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function k(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function R(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(O,this),this.reset(!0)}function x(t){if(t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,a=function r(){for(;++o<t.length;)if(n.call(t,o))return r.value=t[o],r.done=!1,r;return r.value=e,r.done=!0,r};return a.next=a}}return{next:C}}function C(){return{value:e,done:!0}}return g.prototype=S.constructor=_,_.constructor=g,g.displayName=c(_,s,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,_):(t.__proto__=_,c(t,s,"GeneratorFunction")),t.prototype=Object.create(S),t},t.awrap=function(t){return{__await:t}},A(E.prototype),E.prototype[a]=function(){return this},t.AsyncIterator=E,t.async=function(e,r,n,o,i){void 0===i&&(i=Promise);var a=new E(u(e,r,n,o),i);return t.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},A(S),c(S,s,"Generator"),S[i]=function(){return this},S.toString=function(){return"[object Generator]"},t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=x,R.prototype={constructor:R,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(k),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function o(n,o){return s.type="throw",s.arg=t,r.next=n,o&&(r.method="next",r.arg=e),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),u=n.call(a,"finallyLoc");if(c&&u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,y):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),y},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),k(r),y}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;k(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:x(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),y}},t}(t.exports);try{regeneratorRuntime=e}catch(t){Function("r","regeneratorRuntime = r")(e)}}},__webpack_module_cache__={};function __webpack_require__(t){var e=__webpack_module_cache__[t];if(void 0!==e)return e.exports;var r=__webpack_module_cache__[t]={exports:{}};return __webpack_modules__[t](r,r.exports,__webpack_require__),r.exports}__webpack_require__.amdO={},__webpack_require__.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return __webpack_require__.d(e,{a:e}),e},__webpack_require__.d=(t,e)=>{for(var r in e)__webpack_require__.o(e,r)&&!__webpack_require__.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},__webpack_require__.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),__webpack_require__.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);var __webpack_exports__={};(()=>{"use strict";var t=__webpack_require__(575),e=__webpack_require__.n(t),r=__webpack_require__(913),n=__webpack_require__.n(r);function o(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}const i=function(){function t(r){if(e()(this,t),this.cmds=r,Array.isArray(this.cmds)){var n,i=function(t,e){var r;if("undefined"==typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return o(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?o(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,i=function(){};return{s:i,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,s=!0,c=!1;return{s:function(){r=t[Symbol.iterator]()},n:function(){var t=r.next();return s=t.done,t},e:function(t){c=!0,a=t},f:function(){try{s||null==r.return||r.return()}finally{if(c)throw a}}}}(this.cmds);try{for(i.s();!(n=i.n()).done;){var a=n.value;"function"==typeof a&&a()}}catch(t){i.e(t)}finally{i.f()}}}return n()(t,[{key:"push",value:function(t){t()}}]),t}();var a=__webpack_require__(757),s=__webpack_require__.n(a),c=__webpack_require__(926),u=__webpack_require__.n(c),h=__webpack_require__(713),l=__webpack_require__.n(h);function f(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function p(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?f(Object(r),!0).forEach((function(e){l()(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):f(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}var d={insecure:!1,cookies:!0,initPassport:!0};const y="v0.18.7";var v,g=__webpack_require__(38),_=__webpack_require__.n(g),w=__webpack_require__(319),b=__webpack_require__.n(w);function m(t){return S.apply(this,arguments)}function S(){return(S=u()(s().mark((function t(e){var r;return s().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,T("/config",e,{method:"GET",headers:{Accept:"application/json"}});case 2:return r=t.sent,new x(e).setSite(r),t.abrupt("return",r);case 6:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function A(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}!function(t){t[t.DeviceID=1]="DeviceID",t[t.InAppImpression=2]="InAppImpression",t[t.PersonID=3]="PersonID"}(v||(v={}));var E="loblawmedia.ca";function H(t){return O.apply(this,arguments)}function O(){return(O=u()(s().mark((function t(e){var r;return s().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,T("/v2/targeting",e,{method:"GET",headers:{Accept:"application/json"}});case 2:return(r=t.sent)&&new x(e).setTargeting(r),t.abrupt("return",r);case 5:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function k(t){var e,r;return{user:{data:(null!==(e=null==t?void 0:t.audience)&&void 0!==e?e:[]).map((function(t){return{name:t.provider,segment:t.ids,ext:{segtax:t.rtb_segtax}}})),ext:{eids:(null!==(r=null==t?void 0:t.user)&&void 0!==r?r:[]).map((function(t){return{source:t.provider,uids:t.ids.map((function(t){return{id:t.id,atype:v.PersonID}}))}}))}}}}function R(t){var e,r={};if(!t)return r;var n,o=function(t,e){var r;if("undefined"==typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return A(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?A(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){r=t[Symbol.iterator]()},n:function(){var t=r.next();return a=t.done,t},e:function(t){s=!0,i=t},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw i}}}}(null!==(e=t.audience)&&void 0!==e?e:[]);try{for(o.s();!(n=o.n()).done;){var i,a=n.value;a.keyspace&&(a.keyspace in r||(r[a.keyspace]=[]),(i=r[a.keyspace]).push.apply(i,b()(a.ids.map((function(t){return t.id})))))}}catch(t){o.e(t)}finally{o.f()}return r}var x=function(){function t(r){e()(this,t),this.Config=r,l()(this,"passportKey",void 0),l()(this,"targetingV1Key",void 0),l()(this,"targetingKey",void 0),l()(this,"lmpidKey",void 0),l()(this,"siteKey",void 0);var n=btoa(function(t){for(var e=new Uint16Array(t.length),r=0;r<e.length;r++)e[r]=t.charCodeAt(r);return String.fromCharCode.apply(String,b()(new Uint8Array(e.buffer)))}("".concat(this.Config.host,"/").concat(this.Config.site)));this.targetingV1Key="OPTABLE_TGT_"+n,this.passportKey="OPTABLE_PASS_"+n,this.targetingKey="OPTABLE_V2_TGT_"+n,this.lmpidKey="__lmpid",this.siteKey="OPTABLE_SITE_"+n}return n()(t,[{key:"getPassport",value:function(){return window.localStorage.getItem(this.passportKey)}},{key:"getV1Targeting",value:function(){var t=window.localStorage.getItem(this.targetingV1Key),e=t?JSON.parse(t):null;return e?{user:[],audience:Object.entries(e).map((function(t){var e,r=_()(t,2),n=r[0],o=r[1];return{provider:"optable.co",keyspace:n,rtb_segtax:5001,ids:(e=[]).concat.apply(e,[o]).map((function(t){return{id:String(t)}}))}}))}:null}},{key:"getTargeting",value:function(){var t=window.localStorage.getItem(this.targetingKey);return(t?JSON.parse(t):null)||this.getV1Targeting()}},{key:"setPassport",value:function(t){t&&t.length>0&&window.localStorage.setItem(this.passportKey,t)}},{key:"setTargeting",value:function(t){t&&(window.localStorage.setItem(this.targetingKey,JSON.stringify(t)),this.setLmpid(t))}},{key:"setSite",value:function(t){t&&window.localStorage.setItem(this.siteKey,JSON.stringify(t))}},{key:"getSite",value:function(){var t=window.localStorage.getItem(this.siteKey);return t?JSON.parse(t):null}},{key:"setLmpid",value:function(t){var e,r,n,o,i=null===(e=t.user)||void 0===e?void 0:e.find((function(t){return t.provider===E}));i&&window.localStorage.setItem(this.lmpidKey,null!==(r=null===(n=i.ids)||void 0===n||null===(o=n[0])||void 0===o?void 0:o.id)&&void 0!==r?r:"")}},{key:"getLmpid",value:function(){var t;return null!==(t=window.localStorage.getItem(this.lmpidKey))&&void 0!==t?t:null}},{key:"clearPassport",value:function(){window.localStorage.removeItem(this.passportKey)}},{key:"clearTargeting",value:function(){window.localStorage.removeItem(this.targetingKey)}},{key:"clearSite",value:function(){window.localStorage.removeItem(this.siteKey)}}]),t}();function C(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function P(t,e,r){var n=e.site,o=e.host,i=e.insecure,a=e.cookies,s=i?"http":"https",c=new URL("".concat(n).concat(t),"".concat(s,"://").concat(o));if(a)c.search=new URLSearchParams({cookies:"yes",osdk:"web-".concat(y)}).toString();else{var u=new x(e).getPassport();c.search=new URLSearchParams({cookies:"no",passport:u||"",osdk:"web-".concat(y)}).toString()}var h=function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?C(Object(r),!0).forEach((function(e){l()(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):C(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}({},r);return h.credentials="include",new Request(c.toString(),h)}function T(t,e,r){return I.apply(this,arguments)}function I(){return(I=u()(s().mark((function t(e,r,n){var o,i,a;return s().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,globalThis.fetch(P(e,r,n));case 2:if(o=t.sent,!(null==(i=o.headers.get("Content-Type"))?void 0:i.startsWith("application/json"))){t.next=10;break}return t.next=7,o.json();case 7:t.t0=t.sent,t.next=13;break;case 10:return t.next=12,o.text();case 12:t.t0=t.sent;case 13:if(a=t.t0,o.ok){t.next=16;break}throw new Error(a.error);case 16:return a.passport&&(new x(r).setPassport(a.passport),delete a.passport),t.abrupt("return",a);case 18:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function j(t,e){return T("/identify",t,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})}function X(t,e){return T("/uid2/token",t,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})}function L(t,e,r){var n={event:e,properties:r};return T("/witness",t,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)})}function F(t,e){var r={traits:e};return T("/profile",t,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(r)})}var U=__webpack_require__(23);const B=function(){function t(r){var n;e()(this,t),l()(this,"dcn",void 0),l()(this,"init",void 0),this.dcn=(n=r,p(p({},d),n));var o=function(){};this.init=this.dcn.initPassport?m(this.dcn).then(o).catch(o):Promise.resolve()}var r,o,i,a,c,h,f,y;return n()(t,[{key:"identify",value:(y=u()(s().mark((function t(){var e,r,n,o=arguments;return s().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.init;case 2:for(e=o.length,r=new Array(e),n=0;n<e;n++)r[n]=o[n];return t.abrupt("return",j(this.dcn,r.filter((function(t){return t}))));case 4:case"end":return t.stop()}}),t,this)}))),function(){return y.apply(this,arguments)})},{key:"uid2Token",value:(f=u()(s().mark((function t(e){return s().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.init;case 2:return t.abrupt("return",X(this.dcn,e));case 3:case"end":return t.stop()}}),t,this)}))),function(t){return f.apply(this,arguments)})},{key:"targeting",value:(h=u()(s().mark((function t(){return s().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.init;case 2:return t.abrupt("return",H(this.dcn));case 3:case"end":return t.stop()}}),t,this)}))),function(){return h.apply(this,arguments)})},{key:"targetingFromCache",value:function(){return t=this.dcn,new x(t).getTargeting();var t}},{key:"site",value:(c=u()(s().mark((function t(){return s().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",m(this.dcn));case 1:case"end":return t.stop()}}),t,this)}))),function(){return c.apply(this,arguments)})},{key:"siteFromCache",value:function(){return t=this.dcn,new x(t).getSite();var t}},{key:"targetingClearCache",value:function(){var t;t=this.dcn,new x(t).clearTargeting()}},{key:"lmpidFromCache",value:function(){return t=this.dcn,new x(t).getLmpid();var t}},{key:"prebidORTB2",value:(a=u()(s().mark((function t(){return s().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.t0=k,t.next=3,this.targeting();case 3:return t.t1=t.sent,t.abrupt("return",(0,t.t0)(t.t1));case 5:case"end":return t.stop()}}),t,this)}))),function(){return a.apply(this,arguments)})},{key:"prebidORTB2FromCache",value:function(){return k(this.targetingFromCache())}},{key:"targetingKeyValues",value:(i=u()(s().mark((function t(){return s().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.t0=R,t.next=3,this.targeting();case 3:return t.t1=t.sent,t.abrupt("return",(0,t.t0)(t.t1));case 5:case"end":return t.stop()}}),t,this)}))),function(){return i.apply(this,arguments)})},{key:"targetingKeyValuesFromCache",value:function(){return R(this.targetingFromCache())}},{key:"witness",value:(o=u()(s().mark((function t(e){var r,n=arguments;return s().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=n.length>1&&void 0!==n[1]?n[1]:{},t.next=3,this.init;case 3:return t.abrupt("return",L(this.dcn,e,r));case 4:case"end":return t.stop()}}),t,this)}))),function(t){return o.apply(this,arguments)})},{key:"profile",value:(r=u()(s().mark((function t(e){return s().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.init;case 2:return t.abrupt("return",F(this.dcn,e));case 3:case"end":return t.stop()}}),t,this)}))),function(t){return r.apply(this,arguments)})}],[{key:"eid",value:function(t){return t?"e:"+U.sha256.hex(t.toLowerCase().trim()):""}},{key:"cid",value:function(t){return t?"c:"+t.trim():""}},{key:"TargetingKeyValues",value:function(t){return R(t)}},{key:"PrebidORTB2",value:function(t){return k(t)}}]),t}();function N(t){var e,r,n,o,i,a,s,c,u,h;return{advertiserId:null===(e=t.advertiserId)||void 0===e?void 0:e.toString(),campaignId:null===(r=t.campaignId)||void 0===r?void 0:r.toString(),creativeId:null===(n=t.creativeId)||void 0===n?void 0:n.toString(),isEmpty:null===(o=t.isEmpty)||void 0===o?void 0:o.toString(),lineItemId:null===(i=t.lineItemId)||void 0===i?void 0:i.toString(),serviceName:null===(a=t.serviceName)||void 0===a?void 0:a.toString(),size:null===(s=t.size)||void 0===s?void 0:s.toString(),slotElementId:null===(c=t.slot)||void 0===c?void 0:c.getSlotElementId(),sourceAgnosticCreativeId:null===(u=t.sourceAgnosticCreativeId)||void 0===u?void 0:u.toString(),sourceAgnosticLineItemId:null===(h=t.sourceAgnosticLineItemId)||void 0===h?void 0:h.toString()}}function D(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}B.prototype.installGPTEventListeners=function(){var t=this;t.installGPTEventListeners=function(){},window.googletag=window.googletag||{cmd:[]};var e=window.googletag;e.cmd.push((function(){e.pubads().addEventListener("slotRenderEnded",(function(e){t.witness("googletag.events.slotRenderEnded",N(e))})),e.pubads().addEventListener("impressionViewable",(function(e){t.witness("googletag.events.impressionViewable",N(e))}))}))},B.prototype.installGPTSecureSignals=function(){var t=this;t.installGPTSecureSignals=function(){},window.googletag=window.googletag||{cmd:[]};var e=window.googletag;e.cmd.push((function(){e.secureSignalProviders||(e.secureSignalProviders=[]),e.secureSignalProviders.push({id:E,collectorFunction:function(){return Promise.resolve(t.lmpidFromCache())}})}))};var K=/^[a-f0-9]{64}$/i;function q(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function M(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?q(Object(r),!0).forEach((function(e){l()(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):q(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function W(t,e){var r;if("undefined"==typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return J(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?J(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){r=t[Symbol.iterator]()},n:function(){var t=r.next();return a=t.done,t},e:function(t){s=!0,i=t},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw i}}}}function J(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}B.prototype.tryIdentifyFromParams=function(t,e){var r,n=new RegExp("^".concat(t||"oeid","$"),"i"),o="",i=function(t,e){var r;if("undefined"==typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return D(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?D(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){r=t[Symbol.iterator]()},n:function(){var t=r.next();return a=t.done,t},e:function(t){s=!0,i=t},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw i}}}}(new URLSearchParams(window.location.search));try{for(i.s();!(r=i.n()).done;){var a=_()(r.value,2),s=a[0],c=a[1];if(n.test(s)){o=c;break}}}catch(t){i.e(t)}finally{i.f()}""!=o&&(e||function(t){return K.test(t)}(o))&&this.identify((e||"e")+":"+o.toLowerCase())},B.prototype.auctionConfigFromCache=function(){var t,e=this.siteFromCache();return e&&null!==(t=e.auctionConfig)&&void 0!==t?t:null},B.prototype.installGPTAuctionConfigs=function(t){if(!window.googletag)throw"googletag not found";var e=window.googletag.pubads().getSlots();t&&(e=e.filter(t));var r=this.auctionConfigFromCache();if(r){var n,o=W(e);try{for(o.s();!(n=o.n()).done;){var i,a=n.value,s=a.getSizes(),c=[],u=W(s);try{for(u.s();!(i=u.n()).done;){var h=i.value;"fluid"!==h&&c.push({configKey:r.seller+"-"+h.getWidth()+"x"+h.getHeight(),auctionConfig:M(M({},r),{},{requestedSize:{width:h.getWidth()+"px",height:h.getHeight()+"px"}})})}}catch(t){u.e(t)}finally{u.f()}a.setConfig({componentAuction:c})}}catch(t){o.e(t)}finally{o.f()}}},B.prototype.runAdAuction=function(){var t=u()(s().mark((function t(e){var r,n,o,i,a,c;return s().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=document.getElementById(e)){t.next=3;break}throw"spot not found";case 3:if(s=r,u=void 0,u=window.getComputedStyle(s,null),n={width:u.getPropertyValue("width"),height:u.getPropertyValue("height")},o=this.auctionConfigFromCache()){t.next=7;break}return t.abrupt("return");case 7:return i=M(M({},o),{},{requestedSize:n,resolveToConfig:!0}),t.next=10,navigator.runAdAuction(i);case 10:if(a=t.sent){t.next=14;break}return r.replaceChildren(),t.abrupt("return");case 14:(c=document.createElement("fencedframe")).config=a,c.style.border="none",r.replaceChildren(c);case 18:case"end":return t.stop()}var s,u}),t,this)})));return function(e){return t.apply(this,arguments)}}(),B.prototype.joinAdInterestGroups=u()(s().mark((function t(){var e,r,n,o;return s().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.site();case 2:if((e=t.sent).interestGroupPixel){t.next=5;break}throw"origin not enabled for protected audience apis";case 5:return r=new URL(e.interestGroupPixel),(n=document.createElement("iframe")).src=r.toString(),n.allow="join-ad-interest-group "+r.origin,n.style.display="none",o=new Promise((function(t,e){window.addEventListener("message",(function(r){r.source===n.contentWindow&&("success"!==r.data.result?e():t())}))})),document.body.appendChild(n),t.abrupt("return",o);case 13:case"end":return t.stop()}}),t,this)}))),B.prototype.getTopics=u()(s().mark((function t(){var e,r,n,o;return s().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.site();case 2:if((e=t.sent).getTopicsURL){t.next=5;break}throw"origin not enabled for topics api";case 5:return r=new URL(e.getTopicsURL),(n=document.createElement("iframe")).src=r.toString(),n.allow="browsing-topics "+r.origin,n.style.display="none",o=new Promise((function(t,e){window.addEventListener("message",(function(r){r.source===n.contentWindow&&(r.data.error?e(new Error(r.data.error.toString())):t(r.data.result))}))})),document.body.appendChild(n),t.abrupt("return",o);case 13:case"end":return t.stop()}}),t,this)}))),B.prototype.ingestTopics=function(){var t=this;this.getTopics().then((function(e){if(e.length){var r=e.reduce((function(t,e){var r="topics_v".concat(e.taxonomyVersion);return t[r]?t[r]+=",":t[r]="",t[r]+=String(e.topic),t}),{});t.profile(r)}})).catch((function(){}))},window.optable=window.optable||{},window.optable.SDK=B,window.optable.cmd=new i(window.optable.cmd||[])})()})();
2
+ (()=>{var __webpack_modules__={228:t=>{t.exports=function(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}},858:t=>{t.exports=function(t){if(Array.isArray(t))return t}},646:(t,e,r)=>{var n=r(228);t.exports=function(t){if(Array.isArray(t))return n(t)}},926:t=>{function e(t,e,r,n,o,i,a){try{var s=t[i](a),c=s.value}catch(t){return void r(t)}s.done?e(c):Promise.resolve(c).then(n,o)}t.exports=function(t){return function(){var r=this,n=arguments;return new Promise((function(o,i){var a=t.apply(r,n);function s(t){e(a,o,i,s,c,"next",t)}function c(t){e(a,o,i,s,c,"throw",t)}s(void 0)}))}}},575:t=>{t.exports=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}},913:t=>{function e(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}t.exports=function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}},713:t=>{t.exports=function(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}},860:t=>{t.exports=function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}},884:t=>{t.exports=function(t,e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t)){var r=[],n=!0,o=!1,i=void 0;try{for(var a,s=t[Symbol.iterator]();!(n=(a=s.next()).done)&&(r.push(a.value),!e||r.length!==e);n=!0);}catch(t){o=!0,i=t}finally{try{n||null==s.return||s.return()}finally{if(o)throw i}}return r}}},521:t=>{t.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}},206:t=>{t.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}},38:(t,e,r)=>{var n=r(858),o=r(884),i=r(379),a=r(521);t.exports=function(t,e){return n(t)||o(t,e)||i(t,e)||a()}},319:(t,e,r)=>{var n=r(646),o=r(860),i=r(379),a=r(206);t.exports=function(t){return n(t)||o(t)||i(t)||a()}},379:(t,e,r)=>{var n=r(228);t.exports=function(t,e){if(t){if("string"==typeof t)return n(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n(t,e):void 0}}},757:(t,e,r)=>{t.exports=r(666)},23:(module,exports,__webpack_require__)=>{var __WEBPACK_AMD_DEFINE_RESULT__;(function(){"use strict";var ERROR="input is invalid type",WINDOW="object"==typeof window,root=WINDOW?window:{};root.JS_SHA256_NO_WINDOW&&(WINDOW=!1);var WEB_WORKER=!WINDOW&&"object"==typeof self,NODE_JS=!root.JS_SHA256_NO_NODE_JS&&"object"==typeof process&&process.versions&&process.versions.node;NODE_JS?root=__webpack_require__.g:WEB_WORKER&&(root=self);var COMMON_JS=!root.JS_SHA256_NO_COMMON_JS&&module.exports,AMD=__webpack_require__.amdO,ARRAY_BUFFER=!root.JS_SHA256_NO_ARRAY_BUFFER&&"undefined"!=typeof ArrayBuffer,HEX_CHARS="0123456789abcdef".split(""),EXTRA=[-2147483648,8388608,32768,128],SHIFT=[24,16,8,0],K=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],OUTPUT_TYPES=["hex","array","digest","arrayBuffer"],blocks=[];!root.JS_SHA256_NO_NODE_JS&&Array.isArray||(Array.isArray=function(t){return"[object Array]"===Object.prototype.toString.call(t)}),!ARRAY_BUFFER||!root.JS_SHA256_NO_ARRAY_BUFFER_IS_VIEW&&ArrayBuffer.isView||(ArrayBuffer.isView=function(t){return"object"==typeof t&&t.buffer&&t.buffer.constructor===ArrayBuffer});var createOutputMethod=function(t,e){return function(r){return new Sha256(e,!0).update(r)[t]()}},createMethod=function(t){var e=createOutputMethod("hex",t);NODE_JS&&(e=nodeWrap(e,t)),e.create=function(){return new Sha256(t)},e.update=function(t){return e.create().update(t)};for(var r=0;r<OUTPUT_TYPES.length;++r){var n=OUTPUT_TYPES[r];e[n]=createOutputMethod(n,t)}return e},nodeWrap=function(method,is224){var crypto=eval("require('crypto')"),Buffer=eval("require('buffer').Buffer"),algorithm=is224?"sha224":"sha256",nodeMethod=function(t){if("string"==typeof t)return crypto.createHash(algorithm).update(t,"utf8").digest("hex");if(null==t)throw new Error(ERROR);return t.constructor===ArrayBuffer&&(t=new Uint8Array(t)),Array.isArray(t)||ArrayBuffer.isView(t)||t.constructor===Buffer?crypto.createHash(algorithm).update(new Buffer(t)).digest("hex"):method(t)};return nodeMethod},createHmacOutputMethod=function(t,e){return function(r,n){return new HmacSha256(r,e,!0).update(n)[t]()}},createHmacMethod=function(t){var e=createHmacOutputMethod("hex",t);e.create=function(e){return new HmacSha256(e,t)},e.update=function(t,r){return e.create(t).update(r)};for(var r=0;r<OUTPUT_TYPES.length;++r){var n=OUTPUT_TYPES[r];e[n]=createHmacOutputMethod(n,t)}return e};function Sha256(t,e){e?(blocks[0]=blocks[16]=blocks[1]=blocks[2]=blocks[3]=blocks[4]=blocks[5]=blocks[6]=blocks[7]=blocks[8]=blocks[9]=blocks[10]=blocks[11]=blocks[12]=blocks[13]=blocks[14]=blocks[15]=0,this.blocks=blocks):this.blocks=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],t?(this.h0=3238371032,this.h1=914150663,this.h2=812702999,this.h3=4144912697,this.h4=4290775857,this.h5=1750603025,this.h6=1694076839,this.h7=3204075428):(this.h0=1779033703,this.h1=3144134277,this.h2=1013904242,this.h3=2773480762,this.h4=1359893119,this.h5=2600822924,this.h6=528734635,this.h7=1541459225),this.block=this.start=this.bytes=this.hBytes=0,this.finalized=this.hashed=!1,this.first=!0,this.is224=t}function HmacSha256(t,e,r){var n,o=typeof t;if("string"===o){var i,a=[],s=t.length,c=0;for(n=0;n<s;++n)(i=t.charCodeAt(n))<128?a[c++]=i:i<2048?(a[c++]=192|i>>6,a[c++]=128|63&i):i<55296||i>=57344?(a[c++]=224|i>>12,a[c++]=128|i>>6&63,a[c++]=128|63&i):(i=65536+((1023&i)<<10|1023&t.charCodeAt(++n)),a[c++]=240|i>>18,a[c++]=128|i>>12&63,a[c++]=128|i>>6&63,a[c++]=128|63&i);t=a}else{if("object"!==o)throw new Error(ERROR);if(null===t)throw new Error(ERROR);if(ARRAY_BUFFER&&t.constructor===ArrayBuffer)t=new Uint8Array(t);else if(!(Array.isArray(t)||ARRAY_BUFFER&&ArrayBuffer.isView(t)))throw new Error(ERROR)}t.length>64&&(t=new Sha256(e,!0).update(t).array());var u=[],h=[];for(n=0;n<64;++n){var l=t[n]||0;u[n]=92^l,h[n]=54^l}Sha256.call(this,e,r),this.update(h),this.oKeyPad=u,this.inner=!0,this.sharedMemory=r}Sha256.prototype.update=function(t){if(!this.finalized){var e,r=typeof t;if("string"!==r){if("object"!==r)throw new Error(ERROR);if(null===t)throw new Error(ERROR);if(ARRAY_BUFFER&&t.constructor===ArrayBuffer)t=new Uint8Array(t);else if(!(Array.isArray(t)||ARRAY_BUFFER&&ArrayBuffer.isView(t)))throw new Error(ERROR);e=!0}for(var n,o,i=0,a=t.length,s=this.blocks;i<a;){if(this.hashed&&(this.hashed=!1,s[0]=this.block,s[16]=s[1]=s[2]=s[3]=s[4]=s[5]=s[6]=s[7]=s[8]=s[9]=s[10]=s[11]=s[12]=s[13]=s[14]=s[15]=0),e)for(o=this.start;i<a&&o<64;++i)s[o>>2]|=t[i]<<SHIFT[3&o++];else for(o=this.start;i<a&&o<64;++i)(n=t.charCodeAt(i))<128?s[o>>2]|=n<<SHIFT[3&o++]:n<2048?(s[o>>2]|=(192|n>>6)<<SHIFT[3&o++],s[o>>2]|=(128|63&n)<<SHIFT[3&o++]):n<55296||n>=57344?(s[o>>2]|=(224|n>>12)<<SHIFT[3&o++],s[o>>2]|=(128|n>>6&63)<<SHIFT[3&o++],s[o>>2]|=(128|63&n)<<SHIFT[3&o++]):(n=65536+((1023&n)<<10|1023&t.charCodeAt(++i)),s[o>>2]|=(240|n>>18)<<SHIFT[3&o++],s[o>>2]|=(128|n>>12&63)<<SHIFT[3&o++],s[o>>2]|=(128|n>>6&63)<<SHIFT[3&o++],s[o>>2]|=(128|63&n)<<SHIFT[3&o++]);this.lastByteIndex=o,this.bytes+=o-this.start,o>=64?(this.block=s[16],this.start=o-64,this.hash(),this.hashed=!0):this.start=o}return this.bytes>4294967295&&(this.hBytes+=this.bytes/4294967296<<0,this.bytes=this.bytes%4294967296),this}},Sha256.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var t=this.blocks,e=this.lastByteIndex;t[16]=this.block,t[e>>2]|=EXTRA[3&e],this.block=t[16],e>=56&&(this.hashed||this.hash(),t[0]=this.block,t[16]=t[1]=t[2]=t[3]=t[4]=t[5]=t[6]=t[7]=t[8]=t[9]=t[10]=t[11]=t[12]=t[13]=t[14]=t[15]=0),t[14]=this.hBytes<<3|this.bytes>>>29,t[15]=this.bytes<<3,this.hash()}},Sha256.prototype.hash=function(){var t,e,r,n,o,i,a,s,c,u=this.h0,h=this.h1,l=this.h2,f=this.h3,p=this.h4,d=this.h5,y=this.h6,v=this.h7,g=this.blocks;for(t=16;t<64;++t)e=((o=g[t-15])>>>7|o<<25)^(o>>>18|o<<14)^o>>>3,r=((o=g[t-2])>>>17|o<<15)^(o>>>19|o<<13)^o>>>10,g[t]=g[t-16]+e+g[t-7]+r<<0;for(c=h&l,t=0;t<64;t+=4)this.first?(this.is224?(i=300032,v=(o=g[0]-1413257819)-150054599<<0,f=o+24177077<<0):(i=704751109,v=(o=g[0]-210244248)-1521486534<<0,f=o+143694565<<0),this.first=!1):(e=(u>>>2|u<<30)^(u>>>13|u<<19)^(u>>>22|u<<10),n=(i=u&h)^u&l^c,v=f+(o=v+(r=(p>>>6|p<<26)^(p>>>11|p<<21)^(p>>>25|p<<7))+(p&d^~p&y)+K[t]+g[t])<<0,f=o+(e+n)<<0),e=(f>>>2|f<<30)^(f>>>13|f<<19)^(f>>>22|f<<10),n=(a=f&u)^f&h^i,y=l+(o=y+(r=(v>>>6|v<<26)^(v>>>11|v<<21)^(v>>>25|v<<7))+(v&p^~v&d)+K[t+1]+g[t+1])<<0,e=((l=o+(e+n)<<0)>>>2|l<<30)^(l>>>13|l<<19)^(l>>>22|l<<10),n=(s=l&f)^l&u^a,d=h+(o=d+(r=(y>>>6|y<<26)^(y>>>11|y<<21)^(y>>>25|y<<7))+(y&v^~y&p)+K[t+2]+g[t+2])<<0,e=((h=o+(e+n)<<0)>>>2|h<<30)^(h>>>13|h<<19)^(h>>>22|h<<10),n=(c=h&l)^h&f^s,p=u+(o=p+(r=(d>>>6|d<<26)^(d>>>11|d<<21)^(d>>>25|d<<7))+(d&y^~d&v)+K[t+3]+g[t+3])<<0,u=o+(e+n)<<0;this.h0=this.h0+u<<0,this.h1=this.h1+h<<0,this.h2=this.h2+l<<0,this.h3=this.h3+f<<0,this.h4=this.h4+p<<0,this.h5=this.h5+d<<0,this.h6=this.h6+y<<0,this.h7=this.h7+v<<0},Sha256.prototype.hex=function(){this.finalize();var t=this.h0,e=this.h1,r=this.h2,n=this.h3,o=this.h4,i=this.h5,a=this.h6,s=this.h7,c=HEX_CHARS[t>>28&15]+HEX_CHARS[t>>24&15]+HEX_CHARS[t>>20&15]+HEX_CHARS[t>>16&15]+HEX_CHARS[t>>12&15]+HEX_CHARS[t>>8&15]+HEX_CHARS[t>>4&15]+HEX_CHARS[15&t]+HEX_CHARS[e>>28&15]+HEX_CHARS[e>>24&15]+HEX_CHARS[e>>20&15]+HEX_CHARS[e>>16&15]+HEX_CHARS[e>>12&15]+HEX_CHARS[e>>8&15]+HEX_CHARS[e>>4&15]+HEX_CHARS[15&e]+HEX_CHARS[r>>28&15]+HEX_CHARS[r>>24&15]+HEX_CHARS[r>>20&15]+HEX_CHARS[r>>16&15]+HEX_CHARS[r>>12&15]+HEX_CHARS[r>>8&15]+HEX_CHARS[r>>4&15]+HEX_CHARS[15&r]+HEX_CHARS[n>>28&15]+HEX_CHARS[n>>24&15]+HEX_CHARS[n>>20&15]+HEX_CHARS[n>>16&15]+HEX_CHARS[n>>12&15]+HEX_CHARS[n>>8&15]+HEX_CHARS[n>>4&15]+HEX_CHARS[15&n]+HEX_CHARS[o>>28&15]+HEX_CHARS[o>>24&15]+HEX_CHARS[o>>20&15]+HEX_CHARS[o>>16&15]+HEX_CHARS[o>>12&15]+HEX_CHARS[o>>8&15]+HEX_CHARS[o>>4&15]+HEX_CHARS[15&o]+HEX_CHARS[i>>28&15]+HEX_CHARS[i>>24&15]+HEX_CHARS[i>>20&15]+HEX_CHARS[i>>16&15]+HEX_CHARS[i>>12&15]+HEX_CHARS[i>>8&15]+HEX_CHARS[i>>4&15]+HEX_CHARS[15&i]+HEX_CHARS[a>>28&15]+HEX_CHARS[a>>24&15]+HEX_CHARS[a>>20&15]+HEX_CHARS[a>>16&15]+HEX_CHARS[a>>12&15]+HEX_CHARS[a>>8&15]+HEX_CHARS[a>>4&15]+HEX_CHARS[15&a];return this.is224||(c+=HEX_CHARS[s>>28&15]+HEX_CHARS[s>>24&15]+HEX_CHARS[s>>20&15]+HEX_CHARS[s>>16&15]+HEX_CHARS[s>>12&15]+HEX_CHARS[s>>8&15]+HEX_CHARS[s>>4&15]+HEX_CHARS[15&s]),c},Sha256.prototype.toString=Sha256.prototype.hex,Sha256.prototype.digest=function(){this.finalize();var t=this.h0,e=this.h1,r=this.h2,n=this.h3,o=this.h4,i=this.h5,a=this.h6,s=this.h7,c=[t>>24&255,t>>16&255,t>>8&255,255&t,e>>24&255,e>>16&255,e>>8&255,255&e,r>>24&255,r>>16&255,r>>8&255,255&r,n>>24&255,n>>16&255,n>>8&255,255&n,o>>24&255,o>>16&255,o>>8&255,255&o,i>>24&255,i>>16&255,i>>8&255,255&i,a>>24&255,a>>16&255,a>>8&255,255&a];return this.is224||c.push(s>>24&255,s>>16&255,s>>8&255,255&s),c},Sha256.prototype.array=Sha256.prototype.digest,Sha256.prototype.arrayBuffer=function(){this.finalize();var t=new ArrayBuffer(this.is224?28:32),e=new DataView(t);return e.setUint32(0,this.h0),e.setUint32(4,this.h1),e.setUint32(8,this.h2),e.setUint32(12,this.h3),e.setUint32(16,this.h4),e.setUint32(20,this.h5),e.setUint32(24,this.h6),this.is224||e.setUint32(28,this.h7),t},HmacSha256.prototype=new Sha256,HmacSha256.prototype.finalize=function(){if(Sha256.prototype.finalize.call(this),this.inner){this.inner=!1;var t=this.array();Sha256.call(this,this.is224,this.sharedMemory),this.update(this.oKeyPad),this.update(t),Sha256.prototype.finalize.call(this)}};var exports=createMethod();exports.sha256=exports,exports.sha224=createMethod(!0),exports.sha256.hmac=createHmacMethod(),exports.sha224.hmac=createHmacMethod(!0),COMMON_JS?module.exports=exports:(root.sha256=exports.sha256,root.sha224=exports.sha224,AMD&&(__WEBPACK_AMD_DEFINE_RESULT__=function(){return exports}.call(exports,__webpack_require__,exports,module),void 0===__WEBPACK_AMD_DEFINE_RESULT__||(module.exports=__WEBPACK_AMD_DEFINE_RESULT__)))})()},666:t=>{var e=function(t){"use strict";var e,r=Object.prototype,n=r.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",s=o.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function u(t,e,r,n){var o=e&&e.prototype instanceof v?e:v,i=Object.create(o.prototype),a=new R(n||[]);return i._invoke=function(t,e,r){var n=l;return function(o,i){if(n===p)throw new Error("Generator is already running");if(n===d){if("throw"===o)throw i;return C()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var s=H(a,r);if(s){if(s===y)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(n===l)throw n=d,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n=p;var c=h(t,e,r);if("normal"===c.type){if(n=r.done?d:f,c.arg===y)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(n=d,r.method="throw",r.arg=c.arg)}}}(t,r,a),i}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=u;var l="suspendedStart",f="suspendedYield",p="executing",d="completed",y={};function v(){}function g(){}function _(){}var w={};w[i]=function(){return this};var m=Object.getPrototypeOf,b=m&&m(m(x([])));b&&b!==r&&n.call(b,i)&&(w=b);var S=_.prototype=v.prototype=Object.create(w);function A(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function E(t,e){function r(o,i,a,s){var c=h(t[o],t,i);if("throw"!==c.type){var u=c.arg,l=u.value;return l&&"object"==typeof l&&n.call(l,"__await")?e.resolve(l.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(l).then((function(t){u.value=t,a(u)}),(function(t){return r("throw",t,a,s)}))}s(c.arg)}var o;this._invoke=function(t,n){function i(){return new e((function(e,o){r(t,n,e,o)}))}return o=o?o.then(i,i):i()}}function H(t,r){var n=t.iterator[r.method];if(n===e){if(r.delegate=null,"throw"===r.method){if(t.iterator.return&&(r.method="return",r.arg=e,H(t,r),"throw"===r.method))return y;r.method="throw",r.arg=new TypeError("The iterator does not provide a 'throw' method")}return y}var o=h(n,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,y;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,y):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,y)}function O(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function k(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function R(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(O,this),this.reset(!0)}function x(t){if(t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,a=function r(){for(;++o<t.length;)if(n.call(t,o))return r.value=t[o],r.done=!1,r;return r.value=e,r.done=!0,r};return a.next=a}}return{next:C}}function C(){return{value:e,done:!0}}return g.prototype=S.constructor=_,_.constructor=g,g.displayName=c(_,s,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,_):(t.__proto__=_,c(t,s,"GeneratorFunction")),t.prototype=Object.create(S),t},t.awrap=function(t){return{__await:t}},A(E.prototype),E.prototype[a]=function(){return this},t.AsyncIterator=E,t.async=function(e,r,n,o,i){void 0===i&&(i=Promise);var a=new E(u(e,r,n,o),i);return t.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},A(S),c(S,s,"Generator"),S[i]=function(){return this},S.toString=function(){return"[object Generator]"},t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=x,R.prototype={constructor:R,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(k),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function o(n,o){return s.type="throw",s.arg=t,r.next=n,o&&(r.method="next",r.arg=e),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),u=n.call(a,"finallyLoc");if(c&&u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,y):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),y},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),k(r),y}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;k(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:x(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),y}},t}(t.exports);try{regeneratorRuntime=e}catch(t){Function("r","regeneratorRuntime = r")(e)}}},__webpack_module_cache__={};function __webpack_require__(t){var e=__webpack_module_cache__[t];if(void 0!==e)return e.exports;var r=__webpack_module_cache__[t]={exports:{}};return __webpack_modules__[t](r,r.exports,__webpack_require__),r.exports}__webpack_require__.amdO={},__webpack_require__.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return __webpack_require__.d(e,{a:e}),e},__webpack_require__.d=(t,e)=>{for(var r in e)__webpack_require__.o(e,r)&&!__webpack_require__.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},__webpack_require__.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),__webpack_require__.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);var __webpack_exports__={};(()=>{"use strict";var t=__webpack_require__(575),e=__webpack_require__.n(t),r=__webpack_require__(913),n=__webpack_require__.n(r);function o(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}const i=function(){function t(r){if(e()(this,t),this.cmds=r,Array.isArray(this.cmds)){var n,i=function(t,e){var r;if("undefined"==typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return o(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?o(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,i=function(){};return{s:i,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,s=!0,c=!1;return{s:function(){r=t[Symbol.iterator]()},n:function(){var t=r.next();return s=t.done,t},e:function(t){c=!0,a=t},f:function(){try{s||null==r.return||r.return()}finally{if(c)throw a}}}}(this.cmds);try{for(i.s();!(n=i.n()).done;){var a=n.value;"function"==typeof a&&a()}}catch(t){i.e(t)}finally{i.f()}}}return n()(t,[{key:"push",value:function(t){t()}}]),t}();var a=__webpack_require__(757),s=__webpack_require__.n(a),c=__webpack_require__(926),u=__webpack_require__.n(c),h=__webpack_require__(713),l=__webpack_require__.n(h);function f(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function p(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?f(Object(r),!0).forEach((function(e){l()(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):f(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}var d={insecure:!1,cookies:!0,initPassport:!0};const y="v0.18.8";var v,g=__webpack_require__(38),_=__webpack_require__.n(g),w=__webpack_require__(319),m=__webpack_require__.n(w);function b(t){return S.apply(this,arguments)}function S(){return(S=u()(s().mark((function t(e){var r;return s().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,P("/config",e,{method:"GET",headers:{Accept:"application/json"}});case 2:return r=t.sent,new x(e).setSite(r),t.abrupt("return",r);case 6:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function A(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}!function(t){t[t.DeviceID=1]="DeviceID",t[t.InAppImpression=2]="InAppImpression",t[t.PersonID=3]="PersonID"}(v||(v={}));var E="loblawmedia.ca";function H(t){return O.apply(this,arguments)}function O(){return(O=u()(s().mark((function t(e){var r;return s().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,P("/v2/targeting",e,{method:"GET",headers:{Accept:"application/json"}});case 2:return(r=t.sent)&&new x(e).setTargeting(r),t.abrupt("return",r);case 5:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function k(t){var e,r;return{user:{data:(null!==(e=null==t?void 0:t.audience)&&void 0!==e?e:[]).map((function(t){return{name:t.provider,segment:t.ids,ext:{segtax:t.rtb_segtax}}})),ext:{eids:(null!==(r=null==t?void 0:t.user)&&void 0!==r?r:[]).map((function(t){return{source:t.provider,uids:t.ids.map((function(t){return{id:t.id,atype:v.PersonID}}))}}))}}}}function R(t){var e,r={};if(!t)return r;var n,o=function(t,e){var r;if("undefined"==typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return A(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?A(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){r=t[Symbol.iterator]()},n:function(){var t=r.next();return a=t.done,t},e:function(t){s=!0,i=t},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw i}}}}(null!==(e=t.audience)&&void 0!==e?e:[]);try{for(o.s();!(n=o.n()).done;){var i,a=n.value;a.keyspace&&(a.keyspace in r||(r[a.keyspace]=[]),(i=r[a.keyspace]).push.apply(i,m()(a.ids.map((function(t){return t.id})))))}}catch(t){o.e(t)}finally{o.f()}return r}var x=function(){function t(r){e()(this,t),this.Config=r,l()(this,"passportKey",void 0),l()(this,"targetingV1Key",void 0),l()(this,"targetingKey",void 0),l()(this,"lmpidKey",void 0),l()(this,"siteKey",void 0);var n=btoa(function(t){for(var e=new Uint16Array(t.length),r=0;r<e.length;r++)e[r]=t.charCodeAt(r);return String.fromCharCode.apply(String,m()(new Uint8Array(e.buffer)))}("".concat(this.Config.host,"/").concat(this.Config.site)));this.targetingV1Key="OPTABLE_TGT_"+n,this.passportKey="OPTABLE_PASS_"+n,this.targetingKey="OPTABLE_V2_TGT_"+n,this.lmpidKey="__lmpid",this.siteKey="OPTABLE_SITE_"+n}return n()(t,[{key:"getPassport",value:function(){return window.localStorage.getItem(this.passportKey)}},{key:"getV1Targeting",value:function(){var t=window.localStorage.getItem(this.targetingV1Key),e=t?JSON.parse(t):null;return e?{user:[],audience:Object.entries(e).map((function(t){var e,r=_()(t,2),n=r[0],o=r[1];return{provider:"optable.co",keyspace:n,rtb_segtax:5001,ids:(e=[]).concat.apply(e,[o]).map((function(t){return{id:String(t)}}))}}))}:null}},{key:"getTargeting",value:function(){var t=window.localStorage.getItem(this.targetingKey);return(t?JSON.parse(t):null)||this.getV1Targeting()}},{key:"setPassport",value:function(t){t&&t.length>0&&window.localStorage.setItem(this.passportKey,t)}},{key:"setTargeting",value:function(t){t&&(window.localStorage.setItem(this.targetingKey,JSON.stringify(t)),this.setLmpid(t))}},{key:"setSite",value:function(t){t&&window.localStorage.setItem(this.siteKey,JSON.stringify(t))}},{key:"getSite",value:function(){var t=window.localStorage.getItem(this.siteKey);return t?JSON.parse(t):null}},{key:"setLmpid",value:function(t){var e,r,n,o,i=null===(e=t.user)||void 0===e?void 0:e.find((function(t){return t.provider===E}));i&&window.localStorage.setItem(this.lmpidKey,null!==(r=null===(n=i.ids)||void 0===n||null===(o=n[0])||void 0===o?void 0:o.id)&&void 0!==r?r:"")}},{key:"getLmpid",value:function(){var t;return null!==(t=window.localStorage.getItem(this.lmpidKey))&&void 0!==t?t:null}},{key:"clearPassport",value:function(){window.localStorage.removeItem(this.passportKey)}},{key:"clearTargeting",value:function(){window.localStorage.removeItem(this.targetingKey)}},{key:"clearSite",value:function(){window.localStorage.removeItem(this.siteKey)}}]),t}();function C(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function T(t,e,r){var n=e.site,o=e.host,i=e.insecure,a=e.cookies,s=i?"http":"https",c=new URL("".concat(n).concat(t),"".concat(s,"://").concat(o));if(a)c.search=new URLSearchParams({cookies:"yes",osdk:"web-".concat(y)}).toString();else{var u=new x(e).getPassport();c.search=new URLSearchParams({cookies:"no",passport:u||"",osdk:"web-".concat(y)}).toString()}var h=function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?C(Object(r),!0).forEach((function(e){l()(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):C(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}({},r);return h.credentials="include",new Request(c.toString(),h)}function P(t,e,r){return I.apply(this,arguments)}function I(){return(I=u()(s().mark((function t(e,r,n){var o,i,a;return s().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,globalThis.fetch(T(e,r,n));case 2:if(o=t.sent,!(null==(i=o.headers.get("Content-Type"))?void 0:i.startsWith("application/json"))){t.next=10;break}return t.next=7,o.json();case 7:t.t0=t.sent,t.next=13;break;case 10:return t.next=12,o.text();case 12:t.t0=t.sent;case 13:if(a=t.t0,o.ok){t.next=16;break}throw new Error(a.error);case 16:return a.passport&&(new x(r).setPassport(a.passport),delete a.passport),t.abrupt("return",a);case 18:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function j(t,e){return P("/identify",t,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})}function X(t,e){return P("/uid2/token",t,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})}function L(t,e,r){var n={event:e,properties:r};return P("/witness",t,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)})}function F(t,e){var r={traits:e};return P("/profile",t,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(r)})}var U=__webpack_require__(23);const B=function(){function t(r){var n;e()(this,t),l()(this,"dcn",void 0),l()(this,"init",void 0),this.dcn=(n=r,p(p({},d),n));var o=function(){};this.init=this.dcn.initPassport?b(this.dcn).then(o).catch(o):Promise.resolve()}var r,o,i,a,c,h,f,y;return n()(t,[{key:"identify",value:(y=u()(s().mark((function t(){var e,r,n,o=arguments;return s().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.init;case 2:for(e=o.length,r=new Array(e),n=0;n<e;n++)r[n]=o[n];return t.abrupt("return",j(this.dcn,r.filter((function(t){return t}))));case 4:case"end":return t.stop()}}),t,this)}))),function(){return y.apply(this,arguments)})},{key:"uid2Token",value:(f=u()(s().mark((function t(e){return s().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.init;case 2:return t.abrupt("return",X(this.dcn,e));case 3:case"end":return t.stop()}}),t,this)}))),function(t){return f.apply(this,arguments)})},{key:"targeting",value:(h=u()(s().mark((function t(){return s().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.init;case 2:return t.abrupt("return",H(this.dcn));case 3:case"end":return t.stop()}}),t,this)}))),function(){return h.apply(this,arguments)})},{key:"targetingFromCache",value:function(){return t=this.dcn,new x(t).getTargeting();var t}},{key:"site",value:(c=u()(s().mark((function t(){return s().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",b(this.dcn));case 1:case"end":return t.stop()}}),t,this)}))),function(){return c.apply(this,arguments)})},{key:"siteFromCache",value:function(){return t=this.dcn,new x(t).getSite();var t}},{key:"targetingClearCache",value:function(){var t;t=this.dcn,new x(t).clearTargeting()}},{key:"lmpidFromCache",value:function(){return t=this.dcn,new x(t).getLmpid();var t}},{key:"prebidORTB2",value:(a=u()(s().mark((function t(){return s().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.t0=k,t.next=3,this.targeting();case 3:return t.t1=t.sent,t.abrupt("return",(0,t.t0)(t.t1));case 5:case"end":return t.stop()}}),t,this)}))),function(){return a.apply(this,arguments)})},{key:"prebidORTB2FromCache",value:function(){return k(this.targetingFromCache())}},{key:"targetingKeyValues",value:(i=u()(s().mark((function t(){return s().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.t0=R,t.next=3,this.targeting();case 3:return t.t1=t.sent,t.abrupt("return",(0,t.t0)(t.t1));case 5:case"end":return t.stop()}}),t,this)}))),function(){return i.apply(this,arguments)})},{key:"targetingKeyValuesFromCache",value:function(){return R(this.targetingFromCache())}},{key:"witness",value:(o=u()(s().mark((function t(e){var r,n=arguments;return s().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=n.length>1&&void 0!==n[1]?n[1]:{},t.next=3,this.init;case 3:return t.abrupt("return",L(this.dcn,e,r));case 4:case"end":return t.stop()}}),t,this)}))),function(t){return o.apply(this,arguments)})},{key:"profile",value:(r=u()(s().mark((function t(e){return s().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.init;case 2:return t.abrupt("return",F(this.dcn,e));case 3:case"end":return t.stop()}}),t,this)}))),function(t){return r.apply(this,arguments)})}],[{key:"eid",value:function(t){return t?"e:"+U.sha256.hex(t.toLowerCase().trim()):""}},{key:"cid",value:function(t){return t?"c:"+t.trim():""}},{key:"TargetingKeyValues",value:function(t){return R(t)}},{key:"PrebidORTB2",value:function(t){return k(t)}}]),t}();function N(t){var e,r,n,o,i,a,s,c,u,h;return{advertiserId:null===(e=t.advertiserId)||void 0===e?void 0:e.toString(),campaignId:null===(r=t.campaignId)||void 0===r?void 0:r.toString(),creativeId:null===(n=t.creativeId)||void 0===n?void 0:n.toString(),isEmpty:null===(o=t.isEmpty)||void 0===o?void 0:o.toString(),lineItemId:null===(i=t.lineItemId)||void 0===i?void 0:i.toString(),serviceName:null===(a=t.serviceName)||void 0===a?void 0:a.toString(),size:null===(s=t.size)||void 0===s?void 0:s.toString(),slotElementId:null===(c=t.slot)||void 0===c?void 0:c.getSlotElementId(),sourceAgnosticCreativeId:null===(u=t.sourceAgnosticCreativeId)||void 0===u?void 0:u.toString(),sourceAgnosticLineItemId:null===(h=t.sourceAgnosticLineItemId)||void 0===h?void 0:h.toString()}}function D(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}B.prototype.installGPTEventListeners=function(){var t=this;t.installGPTEventListeners=function(){},window.googletag=window.googletag||{cmd:[]};var e=window.googletag;e.cmd.push((function(){e.pubads().addEventListener("slotRenderEnded",(function(e){t.witness("googletag.events.slotRenderEnded",N(e))})),e.pubads().addEventListener("impressionViewable",(function(e){t.witness("googletag.events.impressionViewable",N(e))}))}))},B.prototype.installGPTSecureSignals=function(){var t=this;t.installGPTSecureSignals=function(){},window.googletag=window.googletag||{cmd:[],secureSignalProviders:[]};var e=window.googletag;e.cmd.push((function(){e.secureSignalProviders.push({id:E,collectorFunction:function(){var e;return Promise.resolve(null!==(e=t.lmpidFromCache())&&void 0!==e?e:"")}})}))};var K=/^[a-f0-9]{64}$/i;function q(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function M(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?q(Object(r),!0).forEach((function(e){l()(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):q(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function W(t,e){var r;if("undefined"==typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return J(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?J(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){r=t[Symbol.iterator]()},n:function(){var t=r.next();return a=t.done,t},e:function(t){s=!0,i=t},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw i}}}}function J(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}B.prototype.tryIdentifyFromParams=function(t,e){var r,n=new RegExp("^".concat(t||"oeid","$"),"i"),o="",i=function(t,e){var r;if("undefined"==typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return D(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?D(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){r=t[Symbol.iterator]()},n:function(){var t=r.next();return a=t.done,t},e:function(t){s=!0,i=t},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw i}}}}(new URLSearchParams(window.location.search));try{for(i.s();!(r=i.n()).done;){var a=_()(r.value,2),s=a[0],c=a[1];if(n.test(s)){o=c;break}}}catch(t){i.e(t)}finally{i.f()}""!=o&&(e||function(t){return K.test(t)}(o))&&this.identify((e||"e")+":"+o.toLowerCase())},B.prototype.auctionConfigFromCache=function(){var t,e=this.siteFromCache();return e&&null!==(t=e.auctionConfig)&&void 0!==t?t:null},B.prototype.installGPTAuctionConfigs=function(t){var e=this;e.installGPTAuctionConfigs=function(){},window.googletag=window.googletag||{cmd:[]};var r=window.googletag;r.cmd.push((function(){var n=r.pubads().getSlots();t&&(n=n.filter(t));var o=e.auctionConfigFromCache();if(o){var i,a=W(n);try{for(a.s();!(i=a.n()).done;){var s,c=i.value,u=c.getSizes(),h=[],l=W(u);try{for(l.s();!(s=l.n()).done;){var f=s.value;"fluid"!==f&&h.push({configKey:o.seller+"-"+f.getWidth()+"x"+f.getHeight(),auctionConfig:M(M({},o),{},{requestedSize:{width:f.getWidth()+"px",height:f.getHeight()+"px"}})})}}catch(t){l.e(t)}finally{l.f()}c.setConfig({componentAuction:h})}}catch(t){a.e(t)}finally{a.f()}}}))},B.prototype.runAdAuction=function(){var t=u()(s().mark((function t(e){var r,n,o,i,a,c;return s().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=document.getElementById(e)){t.next=3;break}throw"spot not found";case 3:if(s=r,u=void 0,u=window.getComputedStyle(s,null),n={width:u.getPropertyValue("width"),height:u.getPropertyValue("height")},o=this.auctionConfigFromCache()){t.next=7;break}return t.abrupt("return");case 7:return i=M(M({},o),{},{requestedSize:n,resolveToConfig:!0}),t.next=10,navigator.runAdAuction(i);case 10:if(a=t.sent){t.next=14;break}return r.replaceChildren(),t.abrupt("return");case 14:(c=document.createElement("fencedframe")).config=a,c.style.border="none",r.replaceChildren(c);case 18:case"end":return t.stop()}var s,u}),t,this)})));return function(e){return t.apply(this,arguments)}}(),B.prototype.joinAdInterestGroups=u()(s().mark((function t(){var e,r,n,o;return s().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.site();case 2:if((e=t.sent).interestGroupPixel){t.next=5;break}throw"origin not enabled for protected audience apis";case 5:return r=new URL(e.interestGroupPixel),(n=document.createElement("iframe")).src=r.toString(),n.allow="join-ad-interest-group "+r.origin,n.style.display="none",o=new Promise((function(t,e){window.addEventListener("message",(function(r){r.source===n.contentWindow&&("success"!==r.data.result?e():t())}))})),document.body.appendChild(n),t.abrupt("return",o);case 13:case"end":return t.stop()}}),t,this)}))),B.prototype.getTopics=u()(s().mark((function t(){var e,r,n,o;return s().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.site();case 2:if((e=t.sent).getTopicsURL){t.next=5;break}throw"origin not enabled for topics api";case 5:return r=new URL(e.getTopicsURL),(n=document.createElement("iframe")).src=r.toString(),n.allow="browsing-topics "+r.origin,n.style.display="none",o=new Promise((function(t,e){window.addEventListener("message",(function(r){r.source===n.contentWindow&&(r.data.error?e(new Error(r.data.error.toString())):t(r.data.result))}))})),document.body.appendChild(n),t.abrupt("return",o);case 13:case"end":return t.stop()}}),t,this)}))),B.prototype.ingestTopics=function(){var t=this;this.getTopics().then((function(e){if(e.length){var r=e.reduce((function(t,e){var r="topics_v".concat(e.taxonomyVersion);return t[r]?t[r]+=",":t[r]="",t[r]+=String(e.topic),t}),{});t.profile(r)}})).catch((function(){}))},window.optable=window.optable||{},window.optable.SDK=B,window.optable.cmd=new i(window.optable.cmd||[])})()})();
@@ -1,8 +1,3 @@
1
- declare global {
2
- interface Window {
3
- googletag?: any;
4
- }
5
- }
6
1
  declare module "../sdk" {
7
2
  interface OptableSDK {
8
3
  installGPTEventListeners: () => void;
@@ -42,17 +42,15 @@ OptableSDK.prototype.installGPTSecureSignals = function () {
42
42
  // Next time we get called is a no-op:
43
43
  const sdk = this;
44
44
  sdk.installGPTSecureSignals = function () { };
45
- window.googletag = window.googletag || { cmd: [] };
45
+ window.googletag = window.googletag || { cmd: [], secureSignalProviders: [] };
46
46
  const gpt = window.googletag;
47
47
  gpt.cmd.push(function () {
48
- if (!gpt.secureSignalProviders) {
49
- gpt.secureSignalProviders = [];
50
- }
51
48
  // Install lmpid secure signal
52
49
  gpt.secureSignalProviders.push({
53
50
  id: lmpidProvider,
54
51
  collectorFunction: function () {
55
- return Promise.resolve(sdk.lmpidFromCache());
52
+ var _a;
53
+ return Promise.resolve((_a = sdk.lmpidFromCache()) !== null && _a !== void 0 ? _a : "");
56
54
  },
57
55
  });
58
56
  });
@@ -22,8 +22,8 @@ OptableSDK.prototype.auctionConfigFromCache = function () {
22
22
  function elementInnerSize(element) {
23
23
  const style = window.getComputedStyle(element, null);
24
24
  return {
25
- width: style.getPropertyValue('width'),
26
- height: style.getPropertyValue('height'),
25
+ width: style.getPropertyValue("width"),
26
+ height: style.getPropertyValue("height"),
27
27
  };
28
28
  }
29
29
  /*
@@ -31,32 +31,35 @@ function elementInnerSize(element) {
31
31
  * and installs it into the page GPT slots, optionally filtered.
32
32
  */
33
33
  OptableSDK.prototype.installGPTAuctionConfigs = function (filter) {
34
- if (!window.googletag) {
35
- throw ("googletag not found");
36
- }
37
- let slots = window.googletag.pubads().getSlots();
38
- if (filter) {
39
- slots = slots.filter(filter);
40
- }
41
- const siteAuctionConfig = this.auctionConfigFromCache();
42
- if (!siteAuctionConfig) {
43
- return;
44
- }
45
- for (const slot of slots) {
46
- const sizes = slot.getSizes();
47
- const componentAuction = [];
48
- for (const size of sizes) {
49
- if (size === "fluid") {
50
- continue;
34
+ const sdk = this;
35
+ sdk.installGPTAuctionConfigs = function () { };
36
+ window.googletag = window.googletag || { cmd: [] };
37
+ const gpt = window.googletag;
38
+ gpt.cmd.push(function () {
39
+ let slots = gpt.pubads().getSlots();
40
+ if (filter) {
41
+ slots = slots.filter(filter);
42
+ }
43
+ const siteAuctionConfig = sdk.auctionConfigFromCache();
44
+ if (!siteAuctionConfig) {
45
+ return;
46
+ }
47
+ for (const slot of slots) {
48
+ const sizes = slot.getSizes();
49
+ const componentAuction = [];
50
+ for (const size of sizes) {
51
+ if (size === "fluid") {
52
+ continue;
53
+ }
54
+ componentAuction.push({
55
+ configKey: siteAuctionConfig.seller + "-" + size.getWidth() + "x" + size.getHeight(),
56
+ auctionConfig: Object.assign(Object.assign({}, siteAuctionConfig), { requestedSize: { width: size.getWidth() + "px", height: size.getHeight() + "px" } }),
57
+ });
51
58
  }
52
- componentAuction.push({
53
- configKey: siteAuctionConfig.seller + "-" + size.getWidth() + "x" + size.getHeight(),
54
- auctionConfig: Object.assign(Object.assign({}, siteAuctionConfig), { requestedSize: { width: size.getWidth() + "px", height: size.getHeight() + "px" } }),
55
- });
59
+ // @ts-ignore // outdated typings for componentAuction expects some legacy field names
60
+ slot.setConfig({ componentAuction });
56
61
  }
57
- // @ts-ignore // outdated typings for componentAuction expects some legacy field names
58
- slot.setConfig({ componentAuction });
59
- }
62
+ });
60
63
  };
61
64
  /*
62
65
  * runAdAuction runs an ad auction locally for a given spot dom ID.
@@ -65,7 +68,7 @@ OptableSDK.prototype.runAdAuction = function (domID) {
65
68
  return __awaiter(this, void 0, void 0, function* () {
66
69
  const spot = document.getElementById(domID);
67
70
  if (!spot) {
68
- throw ("spot not found");
71
+ throw "spot not found";
69
72
  }
70
73
  const requestedSize = elementInnerSize(spot);
71
74
  const siteAuctionConfig = this.auctionConfigFromCache();
@@ -91,7 +94,7 @@ OptableSDK.prototype.joinAdInterestGroups = function () {
91
94
  return __awaiter(this, void 0, void 0, function* () {
92
95
  const siteConfig = yield this.site();
93
96
  if (!siteConfig.interestGroupPixel) {
94
- throw ("origin not enabled for protected audience apis");
97
+ throw "origin not enabled for protected audience apis";
95
98
  }
96
99
  const pixelURL = new URL(siteConfig.interestGroupPixel);
97
100
  const pixel = document.createElement("iframe");
@@ -15,7 +15,7 @@ OptableSDK.prototype.getTopics = function () {
15
15
  return __awaiter(this, void 0, void 0, function* () {
16
16
  const siteConfig = yield this.site();
17
17
  if (!siteConfig.getTopicsURL) {
18
- throw ("origin not enabled for topics api");
18
+ throw "origin not enabled for topics api";
19
19
  }
20
20
  const getTopicsURL = new URL(siteConfig.getTopicsURL);
21
21
  const topicsFrame = document.createElement("iframe");
@@ -1,3 +1,3 @@
1
1
  {
2
- "version": "v0.18.7"
2
+ "version": "v0.18.8"
3
3
  }
@@ -14,7 +14,7 @@ function Site(config) {
14
14
  return __awaiter(this, void 0, void 0, function* () {
15
15
  const response = yield fetch("/config", config, {
16
16
  method: "GET",
17
- headers: { "Accept": "application/json" },
17
+ headers: { Accept: "application/json" },
18
18
  });
19
19
  const ls = new LocalStorage(config);
20
20
  ls.setSite(response);
@@ -15,7 +15,7 @@ function Targeting(config) {
15
15
  return __awaiter(this, void 0, void 0, function* () {
16
16
  const response = yield fetch("/v2/targeting", config, {
17
17
  method: "GET",
18
- headers: { "Accept": "application/json" },
18
+ headers: { Accept: "application/json" },
19
19
  });
20
20
  if (response) {
21
21
  const ls = new LocalStorage(config);
@@ -62,8 +62,8 @@ function PrebidORTB2(tdata) {
62
62
  source: identifiers.provider,
63
63
  uids: identifiers.ids.map(({ id }) => ({ id, atype: UIDAgentType.PersonID })),
64
64
  })),
65
- }
66
- }
65
+ },
66
+ },
67
67
  };
68
68
  }
69
69
  function TargetingKeyValues(tdata) {
@@ -72,7 +72,7 @@ function TargetingKeyValues(tdata) {
72
72
  if (!tdata) {
73
73
  return result;
74
74
  }
75
- for (const identifiers of ((_a = tdata.audience) !== null && _a !== void 0 ? _a : [])) {
75
+ for (const identifiers of (_a = tdata.audience) !== null && _a !== void 0 ? _a : []) {
76
76
  if (identifiers.keyspace) {
77
77
  if (!(identifiers.keyspace in result)) {
78
78
  result[identifiers.keyspace] = [];
package/lib/dist/sdk.js CHANGED
@@ -11,7 +11,7 @@ import { getConfig } from "./config";
11
11
  import { Identify } from "./edge/identify";
12
12
  import { Uid2Token } from "./edge/uid2_token";
13
13
  import { Site, SiteFromCache } from "./edge/site";
14
- import { TargetingKeyValues, Targeting, TargetingFromCache, TargetingClearCache, PrebidORTB2, LmpidFromCache } from "./edge/targeting";
14
+ import { TargetingKeyValues, Targeting, TargetingFromCache, TargetingClearCache, PrebidORTB2, LmpidFromCache, } from "./edge/targeting";
15
15
  import { Witness } from "./edge/witness";
16
16
  import { Profile } from "./edge/profile";
17
17
  import { sha256 } from "js-sha256";
package/package.json CHANGED
@@ -6,7 +6,7 @@
6
6
  "repository": "https://github.com/optable/optable-web-sdk",
7
7
  "homepage": "https://optable.co",
8
8
  "license": "SEE LICENSE IN LICENSE",
9
- "version": "v0.18.7",
9
+ "version": "v0.18.8",
10
10
  "devDependencies": {
11
11
  "@babel/core": "^7.12.3",
12
12
  "@babel/plugin-proposal-class-properties": "^7.12.1",