storyly-web 1.0.0
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/.babelrc +10 -0
- package/.eslintrc.js +21 -0
- package/.github/workflows/commit-message-checker.yml +32 -0
- package/.github/workflows/enforce-pr-labels.yml +27 -0
- package/.husky/pre-commit +4 -0
- package/.parcel-cache/081b21d675a52722 +0 -0
- package/.parcel-cache/adbf3c8817e7b823 +0 -0
- package/.parcel-cache/data.mdb +0 -0
- package/.parcel-cache/f0ace7bde139ae65.txt +2 -0
- package/.parcel-cache/lock.mdb +0 -0
- package/.prettierrc +5 -0
- package/.vscode/launch.json +15 -0
- package/.vscode/settings.json +6 -0
- package/README.md +41 -0
- package/dist/AdGroup.8ca7e3ac.js +5 -0
- package/dist/esm.eba669ad.js +175 -0
- package/dist/index.js +416 -0
- package/dist/storyly-web.css +1 -0
- package/dist/storyly-web.js +416 -0
- package/index.html +210 -0
- package/package.json +53 -0
- package/styleConvertor.js +30 -0
- package/yarn-error.log +5685 -0
|
@@ -0,0 +1,416 @@
|
|
|
1
|
+
parcelRequire=function(e,r,t,n){var i,o="function"==typeof parcelRequire&&parcelRequire,u="function"==typeof require&&require;function f(t,n){if(!r[t]){if(!e[t]){var i="function"==typeof parcelRequire&&parcelRequire;if(!n&&i)return i(t,!0);if(o)return o(t,!0);if(u&&"string"==typeof t)return u(t);var c=new Error("Cannot find module '"+t+"'");throw c.code="MODULE_NOT_FOUND",c}p.resolve=function(r){return e[t][1][r]||r},p.cache={};var l=r[t]=new f.Module(t);e[t][0].call(l.exports,p,l,l.exports,this)}return r[t].exports;function p(e){return f(p.resolve(e))}}f.isParcelRequire=!0,f.Module=function(e){this.id=e,this.bundle=f,this.exports={}},f.modules=e,f.cache=r,f.parent=o,f.register=function(r,t){e[r]=[function(e,r){r.exports=t},{}]};for(var c=0;c<t.length;c++)try{f(t[c])}catch(e){i||(i=e)}if(t.length){var l=f(t[t.length-1]);"object"==typeof exports&&"undefined"!=typeof module?module.exports=l:"function"==typeof define&&define.amd?define(function(){return l}):n&&(this[n]=l)}if(parcelRequire=f,i)throw i;return f}({"fcMS":[function(require,module,exports) {
|
|
2
|
+
function o(o,e){if(!(o instanceof e))throw new TypeError("Cannot call a class as a function")}module.exports=o,module.exports.__esModule=!0,module.exports.default=module.exports;
|
|
3
|
+
},{}],"b9XL":[function(require,module,exports) {
|
|
4
|
+
function o(e){return module.exports=o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},module.exports.__esModule=!0,module.exports.default=module.exports,o(e)}module.exports=o,module.exports.__esModule=!0,module.exports.default=module.exports;
|
|
5
|
+
},{}],"BvG2":[function(require,module,exports) {
|
|
6
|
+
var e=require("./typeof.js").default;function r(r,t){if("object"!==e(r)||null===r)return r;var o=r[Symbol.toPrimitive];if(void 0!==o){var u=o.call(r,t||"default");if("object"!==e(u))return u;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(r)}module.exports=r,module.exports.__esModule=!0,module.exports.default=module.exports;
|
|
7
|
+
},{"./typeof.js":"b9XL"}],"GBoX":[function(require,module,exports) {
|
|
8
|
+
var e=require("./typeof.js").default,r=require("./toPrimitive.js");function o(o){var t=r(o,"string");return"symbol"===e(t)?t:String(t)}module.exports=o,module.exports.__esModule=!0,module.exports.default=module.exports;
|
|
9
|
+
},{"./typeof.js":"b9XL","./toPrimitive.js":"BvG2"}],"P8NW":[function(require,module,exports) {
|
|
10
|
+
var e=require("./toPropertyKey.js");function r(r,o){for(var t=0;t<o.length;t++){var u=o[t];u.enumerable=u.enumerable||!1,u.configurable=!0,"value"in u&&(u.writable=!0),Object.defineProperty(r,e(u.key),u)}}function o(e,o,t){return o&&r(e.prototype,o),t&&r(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e}module.exports=o,module.exports.__esModule=!0,module.exports.default=module.exports;
|
|
11
|
+
},{"./toPropertyKey.js":"GBoX"}],"AkAO":[function(require,module,exports) {
|
|
12
|
+
function e(o,t){return module.exports=e=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,o){return e.__proto__=o,e},module.exports.__esModule=!0,module.exports.default=module.exports,e(o,t)}module.exports=e,module.exports.__esModule=!0,module.exports.default=module.exports;
|
|
13
|
+
},{}],"d4H2":[function(require,module,exports) {
|
|
14
|
+
var e=require("./setPrototypeOf.js");function o(o,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");o.prototype=Object.create(t&&t.prototype,{constructor:{value:o,writable:!0,configurable:!0}}),Object.defineProperty(o,"prototype",{writable:!1}),t&&e(o,t)}module.exports=o,module.exports.__esModule=!0,module.exports.default=module.exports;
|
|
15
|
+
},{"./setPrototypeOf.js":"AkAO"}],"E7HD":[function(require,module,exports) {
|
|
16
|
+
function e(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}module.exports=e,module.exports.__esModule=!0,module.exports.default=module.exports;
|
|
17
|
+
},{}],"pxk2":[function(require,module,exports) {
|
|
18
|
+
var e=require("./typeof.js").default,r=require("./assertThisInitialized.js");function o(o,t){if(t&&("object"===e(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return r(o)}module.exports=o,module.exports.__esModule=!0,module.exports.default=module.exports;
|
|
19
|
+
},{"./typeof.js":"b9XL","./assertThisInitialized.js":"E7HD"}],"UJE0":[function(require,module,exports) {
|
|
20
|
+
function e(o){return module.exports=e=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},module.exports.__esModule=!0,module.exports.default=module.exports,e(o)}module.exports=e,module.exports.__esModule=!0,module.exports.default=module.exports;
|
|
21
|
+
},{}],"vNP7":[function(require,module,exports) {
|
|
22
|
+
function e(e){return-1!==Function.toString.call(e).indexOf("[native code]")}module.exports=e,module.exports.__esModule=!0,module.exports.default=module.exports;
|
|
23
|
+
},{}],"QFb6":[function(require,module,exports) {
|
|
24
|
+
function e(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}module.exports=e,module.exports.__esModule=!0,module.exports.default=module.exports;
|
|
25
|
+
},{}],"dJhE":[function(require,module,exports) {
|
|
26
|
+
var e=require("./setPrototypeOf.js"),o=require("./isNativeReflectConstruct.js");function t(u,l,r){return o()?(module.exports=t=Reflect.construct.bind(),module.exports.__esModule=!0,module.exports.default=module.exports):(module.exports=t=function(o,t,u){var l=[null];l.push.apply(l,t);var r=new(Function.bind.apply(o,l));return u&&e(r,u.prototype),r},module.exports.__esModule=!0,module.exports.default=module.exports),t.apply(null,arguments)}module.exports=t,module.exports.__esModule=!0,module.exports.default=module.exports;
|
|
27
|
+
},{"./setPrototypeOf.js":"AkAO","./isNativeReflectConstruct.js":"QFb6"}],"ozpi":[function(require,module,exports) {
|
|
28
|
+
var e=require("./getPrototypeOf.js"),t=require("./setPrototypeOf.js"),r=require("./isNativeFunction.js"),o=require("./construct.js");function u(n){var s="function"==typeof Map?new Map:void 0;return module.exports=u=function(u){if(null===u||!r(u))return u;if("function"!=typeof u)throw new TypeError("Super expression must either be null or a function");if(void 0!==s){if(s.has(u))return s.get(u);s.set(u,n)}function n(){return o(u,arguments,e(this).constructor)}return n.prototype=Object.create(u.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),t(n,u)},module.exports.__esModule=!0,module.exports.default=module.exports,u(n)}module.exports=u,module.exports.__esModule=!0,module.exports.default=module.exports;
|
|
29
|
+
},{"./getPrototypeOf.js":"UJE0","./setPrototypeOf.js":"AkAO","./isNativeFunction.js":"vNP7","./construct.js":"dJhE"}],"vBxD":[function(require,module,exports) {
|
|
30
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=o(require("@babel/runtime/helpers/classCallCheck")),t=o(require("@babel/runtime/helpers/createClass")),r=o(require("@babel/runtime/helpers/inherits")),i=o(require("@babel/runtime/helpers/possibleConstructorReturn")),l=o(require("@babel/runtime/helpers/getPrototypeOf")),n=o(require("@babel/runtime/helpers/wrapNativeSuper"));function o(e){return e&&e.__esModule?e:{default:e}}function u(e){var t=a();return function(){var r,n=(0,l.default)(e);if(t){var o=(0,l.default)(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return(0,i.default)(this,r)}}function a(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}var s=function(i){(0,r.default)(n,i);var l=u(n);function n(){var t;return(0,e.default)(this,n),(t=l.call(this)).init_=!1,t.autoPlay_=!1,t.groupId_=null,t}return(0,t.default)(n,[{key:"connectedCallback",value:function(){this.init_=!0,this.hasAttribute("group")&&(this.groupId_=+this.getAttribute("group")),this.getContainerRatio_()}},{key:"getContainerRatio_",value:function(){var e=this;new MutationObserver(function(t){t.forEach(function(t){if("childList"===t.type){if(!e.groupId_)throw e.innerHTML="",new Error("No Group Attribute For Storyly Embed!");var r=getComputedStyle(e.firstElementChild),i=parseFloat(r.getPropertyValue("height")),l=parseFloat(r.getPropertyValue("width")),n=parseFloat(r.getPropertyValue("position"));if(e.hasAttribute("inPhone")){var o=(window.innerHeight-e.firstElementChild.offsetHeight)/2;e.firstElementChild.style.marginTop="".concat(o,"px"),e.firstElementChild.style.width="min(100vw, calc((100vh * 9) / 16))",e.firstElementChild.style.height="min(100vh, calc((100vw * 16) / 9))"}else i&&l||(l=360,i=640,e.firstElementChild.style.width="".concat(l,"px"),e.firstElementChild.style.height="".concat(i,"px"));["absolute","fixed","relative"].includes(n)||(e.firstElementChild.style.position="relative");var u=e.querySelector("storyly-web");u&&u.setEmbedContainerRatio({height:i,width:l})}})}).observe(this,{childList:!0})}}]),n}((0,n.default)(HTMLElement)),c=s;exports.default=c;
|
|
31
|
+
},{"@babel/runtime/helpers/classCallCheck":"fcMS","@babel/runtime/helpers/createClass":"P8NW","@babel/runtime/helpers/inherits":"d4H2","@babel/runtime/helpers/possibleConstructorReturn":"pxk2","@babel/runtime/helpers/getPrototypeOf":"UJE0","@babel/runtime/helpers/wrapNativeSuper":"ozpi"}],"NVR6":[function(require,module,exports) {
|
|
32
|
+
function e(e,o){(null==o||o>e.length)&&(o=e.length);for(var l=0,r=new Array(o);l<o;l++)r[l]=e[l];return r}module.exports=e,module.exports.__esModule=!0,module.exports.default=module.exports;
|
|
33
|
+
},{}],"XfJI":[function(require,module,exports) {
|
|
34
|
+
var r=require("./arrayLikeToArray.js");function e(e){if(Array.isArray(e))return r(e)}module.exports=e,module.exports.__esModule=!0,module.exports.default=module.exports;
|
|
35
|
+
},{"./arrayLikeToArray.js":"NVR6"}],"OMTj":[function(require,module,exports) {
|
|
36
|
+
function e(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}module.exports=e,module.exports.__esModule=!0,module.exports.default=module.exports;
|
|
37
|
+
},{}],"UyFj":[function(require,module,exports) {
|
|
38
|
+
var r=require("./arrayLikeToArray.js");function e(e,t){if(e){if("string"==typeof e)return r(e,t);var o=Object.prototype.toString.call(e).slice(8,-1);return"Object"===o&&e.constructor&&(o=e.constructor.name),"Map"===o||"Set"===o?Array.from(e):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?r(e,t):void 0}}module.exports=e,module.exports.__esModule=!0,module.exports.default=module.exports;
|
|
39
|
+
},{"./arrayLikeToArray.js":"NVR6"}],"wFNi":[function(require,module,exports) {
|
|
40
|
+
function e(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}module.exports=e,module.exports.__esModule=!0,module.exports.default=module.exports;
|
|
41
|
+
},{}],"Fhqp":[function(require,module,exports) {
|
|
42
|
+
var e=require("./arrayWithoutHoles.js"),r=require("./iterableToArray.js"),o=require("./unsupportedIterableToArray.js"),u=require("./nonIterableSpread.js");function t(t){return e(t)||r(t)||o(t)||u()}module.exports=t,module.exports.__esModule=!0,module.exports.default=module.exports;
|
|
43
|
+
},{"./arrayWithoutHoles.js":"XfJI","./iterableToArray.js":"OMTj","./unsupportedIterableToArray.js":"UyFj","./nonIterableSpread.js":"wFNi"}],"OUZ9":[function(require,module,exports) {
|
|
44
|
+
function e(e){if(Array.isArray(e))return e}module.exports=e,module.exports.__esModule=!0,module.exports.default=module.exports;
|
|
45
|
+
},{}],"vKPt":[function(require,module,exports) {
|
|
46
|
+
function e(e,l){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var t,u,n,o,f=[],a=!0,i=!1;try{if(n=(r=r.call(e)).next,0===l){if(Object(r)!==r)return;a=!1}else for(;!(a=(t=n.call(r)).done)&&(f.push(t.value),f.length!==l);a=!0);}catch(d){i=!0,u=d}finally{try{if(!a&&null!=r.return&&(o=r.return(),Object(o)!==o))return}finally{if(i)throw u}}return f}}module.exports=e,module.exports.__esModule=!0,module.exports.default=module.exports;
|
|
47
|
+
},{}],"Rom6":[function(require,module,exports) {
|
|
48
|
+
function e(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}module.exports=e,module.exports.__esModule=!0,module.exports.default=module.exports;
|
|
49
|
+
},{}],"HETk":[function(require,module,exports) {
|
|
50
|
+
var e=require("./arrayWithHoles.js"),r=require("./iterableToArrayLimit.js"),o=require("./unsupportedIterableToArray.js"),t=require("./nonIterableRest.js");function u(u,s){return e(u)||r(u,s)||o(u,s)||t()}module.exports=u,module.exports.__esModule=!0,module.exports.default=module.exports;
|
|
51
|
+
},{"./arrayWithHoles.js":"OUZ9","./iterableToArrayLimit.js":"vKPt","./unsupportedIterableToArray.js":"UyFj","./nonIterableRest.js":"Rom6"}],"agGE":[function(require,module,exports) {
|
|
52
|
+
function e(e,o,t,n,r,u,i){try{var d=e[u](i),l=d.value}catch(s){return void t(s)}d.done?o(l):Promise.resolve(l).then(n,r)}function o(o){return function(){var t=this,n=arguments;return new Promise(function(r,u){var i=o.apply(t,n);function d(o){e(i,r,u,d,l,"next",o)}function l(o){e(i,r,u,d,l,"throw",o)}d(void 0)})}}module.exports=o,module.exports.__esModule=!0,module.exports.default=module.exports;
|
|
53
|
+
},{}],"IxO8":[function(require,module,exports) {
|
|
54
|
+
var e=require("./toPropertyKey.js");function r(r,o,t){return(o=e(o))in r?Object.defineProperty(r,o,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[o]=t,r}module.exports=r,module.exports.__esModule=!0,module.exports.default=module.exports;
|
|
55
|
+
},{"./toPropertyKey.js":"GBoX"}],"mDCk":[function(require,module,exports) {
|
|
56
|
+
var define;
|
|
57
|
+
var t,r=require("./typeof.js").default;function e(){"use strict";module.exports=e=function(){return t},module.exports.__esModule=!0,module.exports.default=module.exports;var t={},n=Object.prototype,o=n.hasOwnProperty,i=Object.defineProperty||function(t,r,e){t[r]=e.value},a="function"==typeof Symbol?Symbol:{},u=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",l=a.toStringTag||"@@toStringTag";function f(t,r,e){return Object.defineProperty(t,r,{value:e,enumerable:!0,configurable:!0,writable:!0}),t[r]}try{f({},"")}catch(P){f=function(t,r,e){return t[r]=e}}function h(t,r,e,n){var o=r&&r.prototype instanceof d?r:d,a=Object.create(o.prototype),u=new k(n||[]);return i(a,"_invoke",{value:E(t,e,u)}),a}function s(t,r,e){try{return{type:"normal",arg:t.call(r,e)}}catch(P){return{type:"throw",arg:P}}}t.wrap=h;var p={};function d(){}function v(){}function y(){}var g={};f(g,u,function(){return this});var m=Object.getPrototypeOf,w=m&&m(m(G([])));w&&w!==n&&o.call(w,u)&&(g=w);var x=y.prototype=d.prototype=Object.create(g);function L(t){["next","throw","return"].forEach(function(r){f(t,r,function(t){return this._invoke(r,t)})})}function b(t,e){var n;i(this,"_invoke",{value:function(i,a){function u(){return new e(function(n,u){!function n(i,a,u,c){var l=s(t[i],t,a);if("throw"!==l.type){var f=l.arg,h=f.value;return h&&"object"==r(h)&&o.call(h,"__await")?e.resolve(h.__await).then(function(t){n("next",t,u,c)},function(t){n("throw",t,u,c)}):e.resolve(h).then(function(t){f.value=t,u(f)},function(t){return n("throw",t,u,c)})}c(l.arg)}(i,a,n,u)})}return n=n?n.then(u,u):u()}})}function E(t,r,e){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return N()}for(e.method=o,e.arg=i;;){var a=e.delegate;if(a){var u=_(a,e);if(u){if(u===p)continue;return u}}if("next"===e.method)e.sent=e._sent=e.arg;else if("throw"===e.method){if("suspendedStart"===n)throw n="completed",e.arg;e.dispatchException(e.arg)}else"return"===e.method&&e.abrupt("return",e.arg);n="executing";var c=s(t,r,e);if("normal"===c.type){if(n=e.done?"completed":"suspendedYield",c.arg===p)continue;return{value:c.arg,done:e.done}}"throw"===c.type&&(n="completed",e.method="throw",e.arg=c.arg)}}}function _(t,r){var e=r.method,n=t.iterator[e];if(void 0===n)return r.delegate=null,"throw"===e&&t.iterator.return&&(r.method="return",r.arg=void 0,_(t,r),"throw"===r.method)||"return"!==e&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+e+"' method")),p;var o=s(n,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,p;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=void 0),r.delegate=null,p):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,p)}function j(t){var r={tryLoc:t[0]};1 in t&&(r.catchLoc=t[1]),2 in t&&(r.finallyLoc=t[2],r.afterLoc=t[3]),this.tryEntries.push(r)}function O(t){var r=t.completion||{};r.type="normal",delete r.arg,t.completion=r}function k(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(j,this),this.reset(!0)}function G(t){if(t){var r=t[u];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var e=-1,n=function r(){for(;++e<t.length;)if(o.call(t,e))return r.value=t[e],r.done=!1,r;return r.value=void 0,r.done=!0,r};return n.next=n}}return{next:N}}function N(){return{value:void 0,done:!0}}return v.prototype=y,i(x,"constructor",{value:y,configurable:!0}),i(y,"constructor",{value:v,configurable:!0}),v.displayName=f(y,l,"GeneratorFunction"),t.isGeneratorFunction=function(t){var r="function"==typeof t&&t.constructor;return!!r&&(r===v||"GeneratorFunction"===(r.displayName||r.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,y):(t.__proto__=y,f(t,l,"GeneratorFunction")),t.prototype=Object.create(x),t},t.awrap=function(t){return{__await:t}},L(b.prototype),f(b.prototype,c,function(){return this}),t.AsyncIterator=b,t.async=function(r,e,n,o,i){void 0===i&&(i=Promise);var a=new b(h(r,e,n,o),i);return t.isGeneratorFunction(e)?a:a.next().then(function(t){return t.done?t.value:a.next()})},L(x),f(x,l,"Generator"),f(x,u,function(){return this}),f(x,"toString",function(){return"[object Generator]"}),t.keys=function(t){var r=Object(t),e=[];for(var n in r)e.push(n);return e.reverse(),function t(){for(;e.length;){var n=e.pop();if(n in r)return t.value=n,t.done=!1,t}return t.done=!0,t}},t.values=G,k.prototype={constructor:k,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(O),!t)for(var r in this)"t"===r.charAt(0)&&o.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=void 0)},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 e(e,n){return a.type="throw",a.arg=t,r.next=e,n&&(r.method="next",r.arg=void 0),!!n}for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n],a=i.completion;if("root"===i.tryLoc)return e("end");if(i.tryLoc<=this.prev){var u=o.call(i,"catchLoc"),c=o.call(i,"finallyLoc");if(u&&c){if(this.prev<i.catchLoc)return e(i.catchLoc,!0);if(this.prev<i.finallyLoc)return e(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return e(i.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return e(i.finallyLoc)}}}},abrupt:function(t,r){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc<=this.prev&&o.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var i=n;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=r&&r<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=r,i?(this.method="next",this.next=i.finallyLoc,p):this.complete(a)},complete:function(t,r){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&&r&&(this.next=r),p},finish:function(t){for(var r=this.tryEntries.length-1;r>=0;--r){var e=this.tryEntries[r];if(e.finallyLoc===t)return this.complete(e.completion,e.afterLoc),O(e),p}},catch:function(t){for(var r=this.tryEntries.length-1;r>=0;--r){var e=this.tryEntries[r];if(e.tryLoc===t){var n=e.completion;if("throw"===n.type){var o=n.arg;O(e)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,e){return this.delegate={iterator:G(t),resultName:r,nextLoc:e},"next"===this.method&&(this.arg=void 0),p}},t}module.exports=e,module.exports.__esModule=!0,module.exports.default=module.exports;
|
|
58
|
+
},{"./typeof.js":"b9XL"}],"PMvg":[function(require,module,exports) {
|
|
59
|
+
function e(o){return(e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(o)}var o=require("../helpers/regeneratorRuntime")();module.exports=o;try{regeneratorRuntime=o}catch(t){"object"===("undefined"==typeof globalThis?"undefined":e(globalThis))?globalThis.regeneratorRuntime=o:Function("r","regeneratorRuntime = r")(o)}
|
|
60
|
+
},{"../helpers/regeneratorRuntime":"mDCk"}],"saRr":[function(require,module,exports) {
|
|
61
|
+
"use strict";var e;Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=o;var t=new Uint8Array(16);function o(){if(!e&&!(e="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return e(t)}
|
|
62
|
+
},{}],"Kfyb":[function(require,module,exports) {
|
|
63
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;exports.default=e;
|
|
64
|
+
},{}],"dh4g":[function(require,module,exports) {
|
|
65
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=t(require("./regex.js"));function t(e){return e&&e.__esModule?e:{default:e}}function r(t){return"string"==typeof t&&e.default.test(t)}var u=r;exports.default=u;
|
|
66
|
+
},{"./regex.js":"Kfyb"}],"Okf7":[function(require,module,exports) {
|
|
67
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=r(require("./validate.js"));function r(e){return e&&e.__esModule?e:{default:e}}for(var t=[],i=0;i<256;++i)t.push((i+256).toString(16).substr(1));function o(r){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,o=(t[r[i+0]]+t[r[i+1]]+t[r[i+2]]+t[r[i+3]]+"-"+t[r[i+4]]+t[r[i+5]]+"-"+t[r[i+6]]+t[r[i+7]]+"-"+t[r[i+8]]+t[r[i+9]]+"-"+t[r[i+10]]+t[r[i+11]]+t[r[i+12]]+t[r[i+13]]+t[r[i+14]]+t[r[i+15]]).toLowerCase();if(!(0,e.default)(o))throw TypeError("Stringified UUID is invalid");return o}var u=o;exports.default=u;
|
|
68
|
+
},{"./validate.js":"dh4g"}],"ds1e":[function(require,module,exports) {
|
|
69
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e,r,s=o(require("./rng.js")),n=o(require("./stringify.js"));function o(e){return e&&e.__esModule?e:{default:e}}var u=0,t=0;function a(o,a,l){var d=a&&l||0,i=a||new Array(16),c=(o=o||{}).node||e,v=void 0!==o.clockseq?o.clockseq:r;if(null==c||null==v){var f=o.random||(o.rng||s.default)();null==c&&(c=e=[1|f[0],f[1],f[2],f[3],f[4],f[5]]),null==v&&(v=r=16383&(f[6]<<8|f[7]))}var q=void 0!==o.msecs?o.msecs:Date.now(),m=void 0!==o.nsecs?o.nsecs:t+1,p=q-u+(m-t)/1e4;if(p<0&&void 0===o.clockseq&&(v=v+1&16383),(p<0||q>u)&&void 0===o.nsecs&&(m=0),m>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");u=q,t=m,r=v;var w=(1e4*(268435455&(q+=122192928e5))+m)%4294967296;i[d++]=w>>>24&255,i[d++]=w>>>16&255,i[d++]=w>>>8&255,i[d++]=255&w;var _=q/4294967296*1e4&268435455;i[d++]=_>>>8&255,i[d++]=255&_,i[d++]=_>>>24&15|16,i[d++]=_>>>16&255,i[d++]=v>>>8|128,i[d++]=255&v;for(var g=0;g<6;++g)i[d+g]=c[g];return a||(0,n.default)(i)}var l=a;exports.default=l;
|
|
70
|
+
},{"./rng.js":"saRr","./stringify.js":"Okf7"}],"i9qQ":[function(require,module,exports) {
|
|
71
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=r(require("./validate.js"));function r(e){return e&&e.__esModule?e:{default:e}}function t(r){if(!(0,e.default)(r))throw TypeError("Invalid UUID");var t,s=new Uint8Array(16);return s[0]=(t=parseInt(r.slice(0,8),16))>>>24,s[1]=t>>>16&255,s[2]=t>>>8&255,s[3]=255&t,s[4]=(t=parseInt(r.slice(9,13),16))>>>8,s[5]=255&t,s[6]=(t=parseInt(r.slice(14,18),16))>>>8,s[7]=255&t,s[8]=(t=parseInt(r.slice(19,23),16))>>>8,s[9]=255&t,s[10]=(t=parseInt(r.slice(24,36),16))/1099511627776&255,s[11]=t/4294967296&255,s[12]=t>>>24&255,s[13]=t>>>16&255,s[14]=t>>>8&255,s[15]=255&t,s}var s=t;exports.default=s;
|
|
72
|
+
},{"./validate.js":"dh4g"}],"jljL":[function(require,module,exports) {
|
|
73
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=s,exports.URL=exports.DNS=void 0;var e=t(require("./stringify.js")),r=t(require("./parse.js"));function t(e){return e&&e.__esModule?e:{default:e}}function n(e){e=unescape(encodeURIComponent(e));for(var r=[],t=0;t<e.length;++t)r.push(e.charCodeAt(t));return r}var a="6ba7b810-9dad-11d1-80b4-00c04fd430c8";exports.DNS=a;var o="6ba7b811-9dad-11d1-80b4-00c04fd430c8";function s(t,s,u){function i(t,a,o,i){if("string"==typeof t&&(t=n(t)),"string"==typeof a&&(a=(0,r.default)(a)),16!==a.length)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");var d=new Uint8Array(16+t.length);if(d.set(a),d.set(t,a.length),(d=u(d))[6]=15&d[6]|s,d[8]=63&d[8]|128,o){i=i||0;for(var f=0;f<16;++f)o[i+f]=d[f];return o}return(0,e.default)(d)}try{i.name=t}catch(d){}return i.DNS=a,i.URL=o,i}exports.URL=o;
|
|
74
|
+
},{"./stringify.js":"Okf7","./parse.js":"i9qQ"}],"z990":[function(require,module,exports) {
|
|
75
|
+
"use strict";function n(n){if("string"==typeof n){var t=unescape(encodeURIComponent(n));n=new Uint8Array(t.length);for(var o=0;o<t.length;++o)n[o]=t.charCodeAt(o)}return r(e(u(n),8*n.length))}function r(n){for(var r=[],t=32*n.length,e=0;e<t;e+=8){var u=n[e>>5]>>>e%32&255,o=parseInt("0123456789abcdef".charAt(u>>>4&15)+"0123456789abcdef".charAt(15&u),16);r.push(o)}return r}function t(n){return 14+(n+64>>>9<<4)+1}function e(n,r){n[r>>5]|=128<<r%32,n[t(r)-1]=r;for(var e=1732584193,u=-271733879,f=-1732584194,a=271733878,v=0;v<n.length;v+=16){var s=e,d=u,p=f,g=a;e=c(e,u,f,a,n[v],7,-680876936),a=c(a,e,u,f,n[v+1],12,-389564586),f=c(f,a,e,u,n[v+2],17,606105819),u=c(u,f,a,e,n[v+3],22,-1044525330),e=c(e,u,f,a,n[v+4],7,-176418897),a=c(a,e,u,f,n[v+5],12,1200080426),f=c(f,a,e,u,n[v+6],17,-1473231341),u=c(u,f,a,e,n[v+7],22,-45705983),e=c(e,u,f,a,n[v+8],7,1770035416),a=c(a,e,u,f,n[v+9],12,-1958414417),f=c(f,a,e,u,n[v+10],17,-42063),u=c(u,f,a,e,n[v+11],22,-1990404162),e=c(e,u,f,a,n[v+12],7,1804603682),a=c(a,e,u,f,n[v+13],12,-40341101),f=c(f,a,e,u,n[v+14],17,-1502002290),e=i(e,u=c(u,f,a,e,n[v+15],22,1236535329),f,a,n[v+1],5,-165796510),a=i(a,e,u,f,n[v+6],9,-1069501632),f=i(f,a,e,u,n[v+11],14,643717713),u=i(u,f,a,e,n[v],20,-373897302),e=i(e,u,f,a,n[v+5],5,-701558691),a=i(a,e,u,f,n[v+10],9,38016083),f=i(f,a,e,u,n[v+15],14,-660478335),u=i(u,f,a,e,n[v+4],20,-405537848),e=i(e,u,f,a,n[v+9],5,568446438),a=i(a,e,u,f,n[v+14],9,-1019803690),f=i(f,a,e,u,n[v+3],14,-187363961),u=i(u,f,a,e,n[v+8],20,1163531501),e=i(e,u,f,a,n[v+13],5,-1444681467),a=i(a,e,u,f,n[v+2],9,-51403784),f=i(f,a,e,u,n[v+7],14,1735328473),e=h(e,u=i(u,f,a,e,n[v+12],20,-1926607734),f,a,n[v+5],4,-378558),a=h(a,e,u,f,n[v+8],11,-2022574463),f=h(f,a,e,u,n[v+11],16,1839030562),u=h(u,f,a,e,n[v+14],23,-35309556),e=h(e,u,f,a,n[v+1],4,-1530992060),a=h(a,e,u,f,n[v+4],11,1272893353),f=h(f,a,e,u,n[v+7],16,-155497632),u=h(u,f,a,e,n[v+10],23,-1094730640),e=h(e,u,f,a,n[v+13],4,681279174),a=h(a,e,u,f,n[v],11,-358537222),f=h(f,a,e,u,n[v+3],16,-722521979),u=h(u,f,a,e,n[v+6],23,76029189),e=h(e,u,f,a,n[v+9],4,-640364487),a=h(a,e,u,f,n[v+12],11,-421815835),f=h(f,a,e,u,n[v+15],16,530742520),e=l(e,u=h(u,f,a,e,n[v+2],23,-995338651),f,a,n[v],6,-198630844),a=l(a,e,u,f,n[v+7],10,1126891415),f=l(f,a,e,u,n[v+14],15,-1416354905),u=l(u,f,a,e,n[v+5],21,-57434055),e=l(e,u,f,a,n[v+12],6,1700485571),a=l(a,e,u,f,n[v+3],10,-1894986606),f=l(f,a,e,u,n[v+10],15,-1051523),u=l(u,f,a,e,n[v+1],21,-2054922799),e=l(e,u,f,a,n[v+8],6,1873313359),a=l(a,e,u,f,n[v+15],10,-30611744),f=l(f,a,e,u,n[v+6],15,-1560198380),u=l(u,f,a,e,n[v+13],21,1309151649),e=l(e,u,f,a,n[v+4],6,-145523070),a=l(a,e,u,f,n[v+11],10,-1120210379),f=l(f,a,e,u,n[v+2],15,718787259),u=l(u,f,a,e,n[v+9],21,-343485551),e=o(e,s),u=o(u,d),f=o(f,p),a=o(a,g)}return[e,u,f,a]}function u(n){if(0===n.length)return[];for(var r=8*n.length,e=new Uint32Array(t(r)),u=0;u<r;u+=8)e[u>>5]|=(255&n[u/8])<<u%32;return e}function o(n,r){var t=(65535&n)+(65535&r);return(n>>16)+(r>>16)+(t>>16)<<16|65535&t}function f(n,r){return n<<r|n>>>32-r}function a(n,r,t,e,u,a){return o(f(o(o(r,n),o(e,a)),u),t)}function c(n,r,t,e,u,o,f){return a(r&t|~r&e,n,r,u,o,f)}function i(n,r,t,e,u,o,f){return a(r&e|t&~e,n,r,u,o,f)}function h(n,r,t,e,u,o,f){return a(r^t^e,n,r,u,o,f)}function l(n,r,t,e,u,o,f){return a(t^(r|~e),n,r,u,o,f)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var v=n;exports.default=v;
|
|
76
|
+
},{}],"Nc2A":[function(require,module,exports) {
|
|
77
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=t(require("./v35.js")),r=t(require("./md5.js"));function t(e){return e&&e.__esModule?e:{default:e}}var u=(0,e.default)("v3",48,r.default),d=u;exports.default=d;
|
|
78
|
+
},{"./v35.js":"jljL","./md5.js":"z990"}],"HQTZ":[function(require,module,exports) {
|
|
79
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=t(require("./rng.js")),r=t(require("./stringify.js"));function t(e){return e&&e.__esModule?e:{default:e}}function u(t,u,n){var a=(t=t||{}).random||(t.rng||e.default)();if(a[6]=15&a[6]|64,a[8]=63&a[8]|128,u){n=n||0;for(var f=0;f<16;++f)u[n+f]=a[f];return u}return(0,r.default)(a)}var n=u;exports.default=n;
|
|
80
|
+
},{"./rng.js":"saRr","./stringify.js":"Okf7"}],"F2vf":[function(require,module,exports) {
|
|
81
|
+
"use strict";function r(r,e,t,a){switch(r){case 0:return e&t^~e&a;case 1:return e^t^a;case 2:return e&t^e&a^t&a;case 3:return e^t^a}}function e(r,e){return r<<e|r>>>32-e}function t(t){var a=[1518500249,1859775393,2400959708,3395469782],o=[1732584193,4023233417,2562383102,271733878,3285377520];if("string"==typeof t){var n=unescape(encodeURIComponent(t));t=[];for(var s=0;s<n.length;++s)t.push(n.charCodeAt(s))}else Array.isArray(t)||(t=Array.prototype.slice.call(t));t.push(128);for(var f=t.length/4+2,u=Math.ceil(f/16),c=new Array(u),l=0;l<u;++l){for(var i=new Uint32Array(16),v=0;v<16;++v)i[v]=t[64*l+4*v]<<24|t[64*l+4*v+1]<<16|t[64*l+4*v+2]<<8|t[64*l+4*v+3];c[l]=i}c[u-1][14]=8*(t.length-1)/Math.pow(2,32),c[u-1][14]=Math.floor(c[u-1][14]),c[u-1][15]=8*(t.length-1)&4294967295;for(var h=0;h<u;++h){for(var p=new Uint32Array(80),y=0;y<16;++y)p[y]=c[h][y];for(var d=16;d<80;++d)p[d]=e(p[d-3]^p[d-8]^p[d-14]^p[d-16],1);for(var A=o[0],g=o[1],w=o[2],M=o[3],x=o[4],U=0;U<80;++U){var C=Math.floor(U/20),_=e(A,5)+r(C,g,w,M)+x+a[C]+p[U]>>>0;x=M,M=w,w=e(g,30)>>>0,g=A,A=_}o[0]=o[0]+A>>>0,o[1]=o[1]+g>>>0,o[2]=o[2]+w>>>0,o[3]=o[3]+M>>>0,o[4]=o[4]+x>>>0}return[o[0]>>24&255,o[0]>>16&255,o[0]>>8&255,255&o[0],o[1]>>24&255,o[1]>>16&255,o[1]>>8&255,255&o[1],o[2]>>24&255,o[2]>>16&255,o[2]>>8&255,255&o[2],o[3]>>24&255,o[3]>>16&255,o[3]>>8&255,255&o[3],o[4]>>24&255,o[4]>>16&255,o[4]>>8&255,255&o[4]]}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var a=t;exports.default=a;
|
|
82
|
+
},{}],"oZbo":[function(require,module,exports) {
|
|
83
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=t(require("./v35.js")),r=t(require("./sha1.js"));function t(e){return e&&e.__esModule?e:{default:e}}var u=(0,e.default)("v5",80,r.default),s=u;exports.default=s;
|
|
84
|
+
},{"./v35.js":"jljL","./sha1.js":"F2vf"}],"Bkgj":[function(require,module,exports) {
|
|
85
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e="00000000-0000-0000-0000-000000000000";exports.default=e;
|
|
86
|
+
},{}],"kmp0":[function(require,module,exports) {
|
|
87
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=r(require("./validate.js"));function r(e){return e&&e.__esModule?e:{default:e}}function t(r){if(!(0,e.default)(r))throw TypeError("Invalid UUID");return parseInt(r.substr(14,1),16)}var u=t;exports.default=u;
|
|
88
|
+
},{"./validate.js":"dh4g"}],"D6fo":[function(require,module,exports) {
|
|
89
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"v1",{enumerable:!0,get:function(){return e.default}}),Object.defineProperty(exports,"v3",{enumerable:!0,get:function(){return r.default}}),Object.defineProperty(exports,"v4",{enumerable:!0,get:function(){return t.default}}),Object.defineProperty(exports,"v5",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(exports,"NIL",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(exports,"version",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(exports,"validate",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(exports,"stringify",{enumerable:!0,get:function(){return f.default}}),Object.defineProperty(exports,"parse",{enumerable:!0,get:function(){return s.default}});var e=a(require("./v1.js")),r=a(require("./v3.js")),t=a(require("./v4.js")),n=a(require("./v5.js")),u=a(require("./nil.js")),i=a(require("./version.js")),o=a(require("./validate.js")),f=a(require("./stringify.js")),s=a(require("./parse.js"));function a(e){return e&&e.__esModule?e:{default:e}}
|
|
90
|
+
},{"./v1.js":"ds1e","./v3.js":"Nc2A","./v4.js":"HQTZ","./v5.js":"oZbo","./nil.js":"Bkgj","./version.js":"kmp0","./validate.js":"dh4g","./stringify.js":"Okf7","./parse.js":"i9qQ"}],"qmVm":[function(require,module,exports) {
|
|
91
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var t=o(require("@babel/runtime/helpers/classCallCheck")),e=o(require("@babel/runtime/helpers/createClass"));function o(t){return t&&t.__esModule?t:{default:t}}var r=function(){function o(){(0,t.default)(this,o),this.storylyWebDom_=null}return(0,e.default)(o,null,[{key:"getNodeByInstanceId",value:function(t){if(this.storylyWebDom_=document.querySelector('storyly-web[data-storyly-instance-id="'.concat(t,'"')),!this.storylyWebDom_){for(var e,o=document.querySelectorAll("body *:not(style):not(meta):not(link):not(script)"),r=o.length,n=0;n<r;n+=1){var s=Array.from(o)[n];if(s.shadowRoot&&s.shadowRoot.querySelector('storyly-web[data-storyly-instance-id="'.concat(t,'"'))){e=s.shadowRoot.querySelector('storyly-web[data-storyly-instance-id="'.concat(t,'"'));break}}this.storylyWebDom_=e}return this}},{key:"getInstanceIdByDom",value:function(t){var e=+t.getRootNode().host.dataset.storylyInstanceId;return this.getNodeByInstanceId(e),this}},{key:"getDataFromGlobal",value:function(){return new Proxy(this.storylyWebDom_,{get:function(t,e){return t[e]}})}}]),o}(),n=r;exports.default=n;
|
|
92
|
+
},{"@babel/runtime/helpers/classCallCheck":"fcMS","@babel/runtime/helpers/createClass":"P8NW"}],"NA5d":[function(require,module,exports) {
|
|
93
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=r(require("@babel/runtime/helpers/defineProperty")),t=r(require("@babel/runtime/helpers/classCallCheck")),n=r(require("@babel/runtime/helpers/createClass"));function r(e){return e&&e.__esModule?e:{default:e}}function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function i(t){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{};n%2?a(Object(r),!0).forEach(function(n){(0,e.default)(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):a(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}var s,l="Storyly__localData";try{s=window.localStorage}catch(d){var o={storedData:{},getItem:function(e,t){var n;return null!==(n=this.storedData[e])&&void 0!==n?n:t?{}:null},setItem:function(e,t){this.storedData[e]=t}};s=o}var u=function(){function r(){(0,t.default)(this,r),this.instanceId_=null}return(0,n.default)(r,null,[{key:"setInstanceId",value:function(e){return this.instanceId_=e,this}},{key:"getInstanceIdByDom",value:function(e){if(!e)return null;var t=e.getRootNode().host;return this.instanceId_=+t.dataset.storylyInstanceId,this}},{key:"getItemFromInstance",value:function(e){var t,n,r,a=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return null!==(r=(null!==(t=null===(n=(s.getItem(l)?JSON.parse(s.getItem(l)):{}).instances)||void 0===n?void 0:n[this.instanceId_])&&void 0!==t?t:{})[e])&&void 0!==r?r:a?{}:null}},{key:"setItemToInstance",value:function(t,n){var r,a,o,u=s.getItem(l)?JSON.parse(s.getItem(l)):{},c=null!==(r=null===(a=u.instances)||void 0===a?void 0:a[this.instanceId_])&&void 0!==r?r:{},d=i(i({},u),{},{instances:i(i({},null!==(o=u.instances)&&void 0!==o?o:{}),{},(0,e.default)({},this.instanceId_,i(i({},c),{},(0,e.default)({},t,n))))});return s.setItem(l,JSON.stringify(d)),n}},{key:"getItemFromGlobal",value:function(e){var t,n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return null!==(t=(s.getItem(l)?JSON.parse(s.getItem(l)):{})[e])&&void 0!==t?t:n?{}:null}},{key:"setItemToGlobal",value:function(t,n){var r=i(i({},s.getItem(l)?JSON.parse(s.getItem(l)):{}),{},(0,e.default)({},t,n));return s.setItem(l,JSON.stringify(r)),n}},{key:"removeItemFromInstance",value:function(t){var n,r,a=null!==(n=s.getItem(l))&&void 0!==n?n:{},o=JSON.parse(null!==(r=a[this.instanceId_])&&void 0!==r?r:"{}"),u=i(i({},a),{},{instances:i(i({},a.instances),{},(0,e.default)({},this.instanceId_,i(i({},o),{},(0,e.default)({},t,void 0))))});return s.setItem(l,JSON.stringify(u)),t}}]),r}(),c=u;exports.default=c;
|
|
94
|
+
},{"@babel/runtime/helpers/defineProperty":"IxO8","@babel/runtime/helpers/classCallCheck":"fcMS","@babel/runtime/helpers/createClass":"P8NW"}],"nMub":[function(require,module,exports) {
|
|
95
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var t=i(require("@babel/runtime/helpers/defineProperty")),e=i(require("@babel/runtime/helpers/asyncToGenerator")),r=i(require("@babel/runtime/helpers/classCallCheck")),n=i(require("@babel/runtime/helpers/createClass")),a=i(require("@babel/runtime/regenerator")),s=i(require("./proxy")),o=i(require("./storage"));function i(t){return t&&t.__esModule?t:{default: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 u(e){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?c(Object(n),!0).forEach(function(r){(0,t.default)(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):c(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var l="v1.0",d=function(){function t(e,n){var a;(0,r.default)(this,t),this.instanceId_=n;var o=s.default.getNodeByInstanceId(this.instanceId_).getDataFromGlobal().globalInstanceData,i=new URLSearchParams(window.location.search);this.token_=e,this.eventPayload_=o.eventPayload,this.url_="https://api.storyly.io/web/".concat(l),this.eventUrl_="https://trk.storyly.io/traffic",this.productDetailsUrl_="https://api.storyly.io/products/web/".concat(l),"qa"===i.get("env")?(this.url_="https://api.qa.storyly.io/web/".concat(l),this.eventUrl_="https://trk.qa.storyly.io/traffic",this.productDetailsUrl_="https://api.qa.storyly.io/products/web/".concat(l)):"blue"===i.get("env")&&(this.url_="https://api-beta.storyly.io/web/".concat(l)),this.isBlockEvent_=null!==(a=i.get("StorylyTestEnv"))&&void 0!==a?a:o.presentationData||!1,this.isBlockeTag_="dashboard.storyly.io"===window.location.hostname||"docs.developers.storyly.io"===window.location.hostname}return(0,n.default)(t,[{key:"getGroups",value:function(){var t=(0,e.default)(a.default.mark(function t(e){var r,n,s;return a.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return r=o.default.setInstanceId(this.instanceId_).getItemFromInstance("Storyly_responseData"),n=r.story_groups,t.next=3,fetch("".concat(this.url_,"/").concat(this.token_),{method:"POST",headers:u({"Content-Type":"application/json"},o.default.setInstanceId(this.instanceId_).getItemFromInstance("Storyly_eTag",!1)&&!this.isBlockeTag_&&n?{"If-None-Match":o.default.setInstanceId(this.instanceId_).getItemFromInstance("Storyly_eTag",!1)}:{}),body:JSON.stringify(u({},e))});case 3:if(200!==(s=t.sent).status){t.next=8;break}s.headers.get("etag")&&o.default.setInstanceId(this.instanceId_).setItemToInstance("Storyly_eTag",s.headers.get("etag")),t.next=12;break;case 8:if(304!==s.status){t.next=12;break}if(o.default.setInstanceId(this.instanceId_).setItemToInstance("Storyly_responseData",u(u({},o.default.setInstanceId(this.instanceId_).getItemFromInstance("Storyly_responseData")),{},{ttl:Date.now()})),!n){t.next=12;break}return t.abrupt("return",Promise.resolve(o.default.setInstanceId(this.instanceId_).getItemFromInstance("Storyly_responseData")));case 12:return t.abrupt("return",s.json());case 13:case"end":return t.stop()}},t,this)}));return function(e){return t.apply(this,arguments)}}()},{key:"sendEvent",value:function(){var t=(0,e.default)(a.default.mark(function t(){var e,r,n,s=arguments;return a.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(e=s.length>0&&void 0!==s[0]?s[0]:{},!this.isBlockEvent_){t.next=3;break}return t.abrupt("return",null);case 3:return r=u(u({},this.eventPayload_),{},{payload:u({},e)}),t.next=6,fetch("".concat(this.eventUrl_,"/").concat(this.token_),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(r)});case 6:return n=t.sent,t.abrupt("return",n.json());case 8:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}()},{key:"getProductDetails",value:function(){var t=(0,e.default)(a.default.mark(function t(){var e,r,n=arguments;return a.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return e=n.length>0&&void 0!==n[0]?n[0]:{},t.next=3,fetch("".concat(this.productDetailsUrl_,"/").concat(this.token_),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});case 3:return r=t.sent,t.abrupt("return",r.json());case 5:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}()}]),t}(),p=d;exports.default=p;
|
|
96
|
+
},{"@babel/runtime/helpers/defineProperty":"IxO8","@babel/runtime/helpers/asyncToGenerator":"agGE","@babel/runtime/helpers/classCallCheck":"fcMS","@babel/runtime/helpers/createClass":"P8NW","@babel/runtime/regenerator":"PMvg","./proxy":"qmVm","./storage":"NA5d"}],"w67G":[function(require,module,exports) {
|
|
97
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e="rtl",t="ltr",r={RTL:e,LTR:t};exports.default=r;
|
|
98
|
+
},{}],"ttLI":[function(require,module,exports) {
|
|
99
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e="pulse",t={PULSE:e};exports.default=t;
|
|
100
|
+
},{}],"vgU2":[function(require,module,exports) {
|
|
101
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.setClass=i,exports.removeClass=a,exports.setStyle=l,exports.resetStyle=c,exports.inlineStyle=u,exports.slotStyle=void 0;var n=s(require("@babel/runtime/helpers/slicedToArray")),o=s(require("@babel/runtime/helpers/toConsumableArray")),r=s(require("../constants/directions")),t=s(require("../constants/animation")),e=s(require("./proxy"));function s(n){return n&&n.__esModule?n:{default:n}}function i(n,r){var t;Array.isArray(r)?(t=n.classList).add.apply(t,(0,o.default)(r)):n.classList.add(r)}function a(n,o){n.classList.remove(o)}function l(o,r){var t=(0,n.default)(r,3),e=t[0],s=t[1],i=t[2];o.style.setProperty(e,s,i)}function c(n,o){var r=n;o.forEach(function(n){r.style[n]=null})}var p="[slot^='story-group-'] * {\n pointer-events: none;\n }\n [slot^='story-group-'] .storyly__story-preview {\n transition: background-image 0.3s ease-in-out;\n }\n [slot^='story-group-'] .storyly__story-group-title {\n z-index: 1;\n }\n [slot^='story-group-']::after, [slot^='story-group-']::before {\n pointer-events: none;\n }";function y(n){var o=n.type;return o===t.default.PULSE?"\n .animating-".concat(o," .storyly__story-group-cover::before {\n animation: pulse-before 1s infinite;\n }\n .animating-").concat(o," .storyly__story-group-cover::after {\n content: '';\n animation: pulse-after 1s infinite;\n }\n @keyframes pulse-after {\n from {\n transform: scale(1);\n opacity: 1;\n }\n to {\n transform: scale(1.15);\n opacity: 0;\n }\n }\n @keyframes pulse-before {\n from {\n transform: scale(0.95);\n box-shadow: 0px 0px 0px 0px rgba(255, 255, 255, 1);\n }\n to {\n transform: scale(1);\n box-shadow: 0px 0px 0px 4px rgba(255, 255, 255, 0.1);\n }\n }\n "):""}function u(o,t){var s=o.storyGroupBorderRadius,i=o.storyGroupSize,a=o.storyGroupTextColor,l=o.storyGroupTextFont,c=o.storyGroupMarginHorizontal,p=o.storyGroupIconBorderColorNotSeen,u=o.storyGroupIconBorderColorSeen,d=o.storyGroupTextSize,g=o.storyGroupTextWeight,x=o.storyGroupBorderSize,b=o.storyGroupTextLineHeight,_=o.storyGroupTextVisibility,f=o.storyGroupPinBackgroundColor,h=o.storyGroupPinBorderColor,m=o.scrollIndicatorOptions,k=o.storyGroupPinIcon,v=o.storyGroupTextMarginTop,w=o.storyGroupTextSeenColor,G=o.storyBorderGapSize,z=o.storyBorderGapColor,L=o.storyGroupAnimation,B=m.indicatorWidth,S=m.indicatorHeight,C=m.indicatorBorderRadius,T=m.indicatorBorderColor,I=m.indicatorBoxShadow,M=m.indicatorBoxBackgroundColor,j=m.leftIndicatorMargin,P=m.rightIndicatorMargin,q=i.split("x"),A=(0,n.default)(q,2),N=A[0],H=A[1],R="linear-gradient(to right, ".concat(p.join(", "),")"),V="linear-gradient(to right, ".concat(u.join(", "),")");1===p.length&&(R=(0,n.default)(p,1)[0]);1===u.length&&(V=(0,n.default)(u,1)[0]);var D=x>=4?x:4,E=e.default.getNodeByInstanceId(t).getDataFromGlobal().globalInstanceData,F="\n .storyly__story-groups::-webkit-scrollbar-track {\n -webkit-box-shadow: none !important;\n background-color: transparent;\n }\n .storyly__story-groups::-webkit-scrollbar {\n width: 0px !important;\n height: 0px !important;\n background-color: transparent;\n }\n .storyly__story-groups::-webkit-scrollbar-thumb {\n background-color: transparent;\n }\n .storyly__groups-list::-webkit-scrollbar-track {\n -webkit-box-shadow: none !important;\n background-color: transparent;\n }\n .storyly__groups-list::-webkit-scrollbar {\n width: 0px !important;\n height: 0px !important;\n background-color: transparent;\n }\n .storyly__groups-list::-webkit-scrollbar-thumb {\n background-color: transparent;\n }\n .storyly__groups-list {\n display: flex;\n scrollbar-width: none;\n padding-top: 2px;\n ".concat(E.direction===r.default.RTL?"direction: rtl; overflow-x: auto;":"","\n }\n .storyly__story-groups {\n overflow-y: hidden;\n scrollbar-width: none;\n padding: 4px 4px 4px 0px;\n display: flex;\n direction: ltr;\n overflow-x: auto;\n }\n .storyly__story-groups[embed-mode] {\n display: none;\n }\n .storyly__story-groups .group .icon {\n background: url('").concat(k||'data:image/svg+xml;charset=utf-8,<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M12 3L15.09 9.25342L22 10.2624L17 15.1272L18.18 22L12 18.7534L5.82 22L7 15.1272L2 10.2624L8.91 9.25342L12 3V3Z" fill="white"/></svg>',"') no-repeat;\n background-position: center;\n display: inline-block;\n width: 100%;\n height: 100%;\n background-size: ").concat(.357*N*.6,"px ").concat(.357*H*.6,"px;\n }\n .storyly__story-groups .group .pin-icon {\n width: ").concat(.357*N,"px;\n height: ").concat(.357*N,"px;\n position: absolute;\n bottom: 0px;\n right: 0px;\n background-color: ").concat(f,";\n ").concat(h?"border: 1px solid ".concat(h,";"):"","\n border-radius: 50%;\n z-index: 2;\n display: none;\n box-sizing: border-box;\n }\n .storyly__story-groups .group.pinned .pin-icon {\n display: block;\n }\n .storyly__story-groups.right::before {\n content: '';\n flex: 1;\n }\n .storyly__story-groups.center::before,\n .storyly__story-groups.center::after {\n content: '';\n flex: 1;\n }\n .storyly__story-groups .group.hidden {\n display: none !important;\n }\n .storyly__story-groups .group {\n height: auto;\n margin-inline-start : ").concat(2*Number(c),"px;\n text-align: center;\n cursor: pointer;\n position: relative;\n width: ").concat(+N+20,"px;\n display: flex;\n flex-direction: column;\n align-items: center;\n -webkit-touch-callout: none;\n -webkit-user-select: none;\n -khtml-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n padding-top: inherit;\n }\n .storyly__story-groups .storyly__story-group-container:not(.storyly__story-group-container-no-flex) {\n display: flex;\n }\n .storyly__story-group-cover {\n pointer-events: none;\n }\n .storyly__story-group-cover::before {\n background: ").concat(R,";\n content: '';\n position: absolute;\n top: 0; right: 0; bottom: 0; left: 0;\n z-index: 1;\n margin: -2px;\n border-radius: inherit;\n }\n .storyly__story-group-cover::after {\n ").concat(1===p.length?"background: ".concat(R,";"):"background-image: ".concat(R,";"),"\n position: absolute;\n top: 0; right: 0; bottom: 0; left: 0;\n z-index: 0;\n margin: -2px;\n border-radius: inherit;\n background-repeat: no-repeat;\n }\n .storyly__story-groups .group.reposition {\n animation: expandGroup 1s linear;\n position: relative;\n }\n .storyly__story-groups .group.seen .storyly__story-group-title {\n color: ").concat(w,";\n }\n .storyly__story-groups .group.seen .storyly__story-group-cover::before{\n background: ").concat(V,";\n animation: none;\n }\n .storyly__story-groups .group.seen .storyly__story-group-cover::after{\n animation: none;\n }\n .storyly__story-group-cover {\n position: relative;\n box-sizing: border-box;\n background: transparent;\n background-clip: padding-box;\n border-radius: ").concat(s,"px;\n min-width: ").concat(+N+D,"px;\n min-height: ").concat(+H+D,"px;\n display: flex;\n justify-content: center;\n align-items: center\n }\n .storyly__story-groups .group img {\n width: ").concat(N,"px;\n height: ").concat(H,"px;\n border-radius: ").concat(s,"px;\n border: ").concat(G,"px solid ").concat(z,";\n z-index: 1;\n position: relative;\n pointer-events: none;\n opacity: 0;\n }\n .storyly__story-groups .group[onView] img {\n opacity: 1;\n }\n .storyly__story-groups .group .storyly__story-group-title {\n font-size: ").concat(d,"px;\n color: ").concat(a,";\n font-family: ").concat(l,", sans-serif;\n font-weight: ").concat(g,";\n display: ").concat(_?"block":"none",";\n pointer-events: none;\n line-height: ").concat(b,";\n margin-top: ").concat(v,'px;\n }\n .storyly__story-groups .group[data-sortorder="0"] {\n margin-inline-start : 0;\n }\n .storyly__scroll-indicator {\n display: flex;\n justify-content: center;\n align-items: center;\n transition: opacity 0.3s ease-in-out;\n }\n .storyly__scroll-indicator:first-child {\n margin-right: ').concat(j,"px;\n }\n .storyly__scroll-indicator:last-child {\n margin-left: ").concat(P,"px;\n }\n .storyly__scroll-indicator div {\n z-index: 99;\n background-color: ").concat(M,";\n box-sizing: border-box;\n cursor: pointer;\n width: ").concat(B,"px;\n height: ").concat(S,"px;\n border: 1px solid ").concat(T,";\n border-radius: ").concat(C,"px;\n margin-bottom: ").concat(Number(d)+6,"px;\n display: flex;\n justify-content: center;\n align-items: center;\n background-repeat: no-repeat;\n background-position: center;\n background-size: cover;\n box-shadow: ").concat(I,";\n }\n @keyframes expandGroup {\n from {\n left: 0;\n }\n to {\n left: 50%;\n }\n }\n ");L&&(F+=y(L));return F.replace(/\s+/g," ")}exports.slotStyle=p;
|
|
102
|
+
},{"@babel/runtime/helpers/slicedToArray":"HETk","@babel/runtime/helpers/toConsumableArray":"Fhqp","../constants/directions":"w67G","../constants/animation":"ttLI","./proxy":"qmVm"}],"kQhN":[function(require,module,exports) {
|
|
103
|
+
var e=require("./arrayWithHoles.js"),r=require("./iterableToArray.js"),o=require("./unsupportedIterableToArray.js"),u=require("./nonIterableRest.js");function t(t){return e(t)||r(t)||o(t)||u()}module.exports=t,module.exports.__esModule=!0,module.exports.default=module.exports;
|
|
104
|
+
},{"./arrayWithHoles.js":"OUZ9","./iterableToArray.js":"OMTj","./unsupportedIterableToArray.js":"UyFj","./nonIterableRest.js":"Rom6"}],"kUgL":[function(require,module,exports) {
|
|
105
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e="modern",t="classic",r={MODERN:e,CLASSIC:t};exports.default=r;
|
|
106
|
+
},{}],"d0lR":[function(require,module,exports) {
|
|
107
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.EventTypes=exports.CustomerEventTypes=exports.LayerEventTypes=exports.GestureTypes=void 0;var e="OnScreen",o="Complete",r="NextClicked",t="PreviousClicked",d="Impression",n="Closed",i="GroupComplete",y="PrevSwiped",c="NextSwiped",s="Selected",S="Paused",u="Resumed",l="LinkShared",C="BarViewed",a="click_story_arrow",p="click_keyboard_shortcut",k="default_progress_skip",w="click_story_highlight",P="click_story_group_button",m="click_icon",A="mobile_touch_story",v="mobile_swiped_story",_="ActionClicked",x="ReactionClicked",g="PollSelected",R="ProductTagClicked",h="ProductCardClicked",G="PromoCodeCopied",T="QuizAnswered",Q="Rated",z="CommentSent",B="ImageQuizAnswered",N="StoryProductAdded",V="StoryProductUpdated",I="StoryProductRemoved",b="StoryCheckoutButtonClicked",E="StoryCartButtonClicked",L="StoryCartViewClicked",O="StoryProductCatalogClicked",f="StoryProductSelected",F="onStoryPollAnswered",H="onStoryQuizAnswered",U="onStoryReactionAnswered",j="onStoryQuestionAnswered",K="onStoryRatingAnswered",M="onStoryImageQuizAnswered",q="onStoryGroupViewed",D="onStoryViewed",J="onNextStory",W="onPreviousStory",X="onNextStoryGroup",Y="onPreviousStoryGroup",Z="onStoryShowFailed",$="onRenderedStoryGroups",ee="onStoryProductAdded",oe="onStoryCartClicked",re="onStorylyHydration",te={Arrow:a,Keyboard:p,Progress:k,StoryClick:w,Button:P,Icon:m,ClickByTouch:A,Swiped:v};exports.GestureTypes=te;var de={ActionClicked:_,ReactionClicked:x,PollSelected:g,ProductTagClicked:R,ProductCardClicked:h,PromoCodeCopied:G,QuizAnswered:T,Rated:Q,CommentSent:z,ImageQuizAnswered:B,StoryProductAdded:N,StoryProductUpdated:V,StoryProductRemoved:I,StoryCheckoutButtonClicked:b,StoryCartButtonClicked:E,StoryCartViewClicked:L,StoryProductCatalogClicked:O,StoryProductSelected:f};exports.LayerEventTypes=de;var ne={onStoryPollAnswered:F,onStoryQuizAnswered:H,onStoryReactionAnswered:U,onStoryQuestionAnswered:j,onStoryRatingAnswered:K,onStoryImageQuizAnswered:M,onStoryGroupViewed:q,onStoryViewed:D,onNextStory:J,onPreviousStory:W,onNextStoryGroup:X,onPreviousStoryGroup:Y,onStoryShowFailed:Z,onRenderedStoryGroups:$,onStoryProductAdded:ee,onStoryCartClicked:oe,onStorylyHydration:re};exports.CustomerEventTypes=ne;var ie={OnScreen:e,Complete:o,NextClicked:r,PreviousClicked:t,Impression:d,Closed:n,GroupComplete:i,PrevSwiped:y,NextSwiped:c,Selected:s,Paused:S,Resumed:u,LinkShared:l,BarViewed:C};exports.EventTypes=ie;
|
|
108
|
+
},{}],"aJRz":[function(require,module,exports) {
|
|
109
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.LayerTemplateTypes=exports.IMAGE_QUIZ=exports.PRODUCT_CATALOG=exports.PRODUCT_CARD=exports.QUESTION=exports.EMBED_CODE=exports.PROMO_CODE=exports.PRODUCT_TAG=exports.COUNTDOWN=exports.IMAGE_CTA=exports.TEXT=exports.BLANKSTORY=exports.VIDEO=exports.IMAGE=exports.SWIPE=exports.BUTTON=exports.MEDIA=exports.QUIZ=exports.RATING=exports.POLL=exports.EMOJI=void 0;var r="emoji";exports.EMOJI=r;var e="poll";exports.POLL=e;var t="rating";exports.RATING=t;var o="quiz";exports.QUIZ=o;var p="media";exports.MEDIA=p;var s="button";exports.BUTTON=s;var O="swipe";exports.SWIPE=O;var T="image";exports.IMAGE=T;var x="video";exports.VIDEO=x;var E="blankstory";exports.BLANKSTORY=E;var a="text";exports.TEXT=a;var A="image_cta";exports.IMAGE_CTA=A;var I="countdown";exports.COUNTDOWN=I;var D="product_tag";exports.PRODUCT_TAG=D;var _="promo_code";exports.PROMO_CODE=_;var C="embed";exports.EMBED_CODE=C;var v="comment";exports.QUESTION=v;var U="product_card";exports.PRODUCT_CARD=U;var M="product_catalog";exports.PRODUCT_CATALOG=M;var R="image_quiz";exports.IMAGE_QUIZ=R;var P={POLL:e,RATING:t,QUIZ:o,MEDIA:p,BUTTON:s,SWIPE:O,IMAGE:T,VIDEO:x,BLANKSTORY:E,TEXT:a,IMAGE_CTA:A,EMOJI:r,COUNTDOWN:I,PRODUCT_TAG:D,PROMO_CODE:_,EMBED_CODE:C,QUESTION:v,PRODUCT_CARD:U,PRODUCT_CATALOG:M,IMAGE_QUIZ:R};exports.LayerTemplateTypes=P;
|
|
110
|
+
},{}],"PesM":[function(require,module,exports) {
|
|
111
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.getProductLayers=exports.calcBorderRadius=exports.isHexColor=exports.currencyFormatter=exports.kFormatter=exports.getGestureType=exports.isArraysEqual=exports.openProductDetail=exports.getContrastBgColor=exports.getStoryAssetFromLayers=exports.removeClickEventListener=exports.setClickEventListener=exports.decodeJwt=exports.isStringHTML=exports.getFontFamily=exports.getAssetRatio=exports.debounce=exports.copyToClipboard=exports.openLink=exports.splitTime=exports.isIphone=exports.domShow=exports.domHide=exports.createAndDispatchEvent=exports.stopEventBubbling=exports.getBrowser=exports.convertHex=exports.isMobileView=exports.randomAlphaNum=exports.objectLength=exports.generateHtmlFromTemplate=exports.removeAttribute=exports.setAttribute=void 0;var t=c(require("@babel/runtime/helpers/defineProperty")),e=c(require("@babel/runtime/helpers/toArray")),r=c(require("@babel/runtime/helpers/toConsumableArray")),o=c(require("../constants/layouts")),n=require("../constants/events"),i=c(require("./proxy")),a=require("../constants/layerTypes"),s=void 0;function c(t){return t&&t.__esModule?t:{default:t}}function u(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,o)}return r}function l(e){for(var r=1;r<arguments.length;r++){var o=null!=arguments[r]?arguments[r]:{};r%2?u(Object(o),!0).forEach(function(r){(0,t.default)(e,r,o[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):u(Object(o)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))})}return e}var p=function(t,e,r){t.setAttribute(e,r)};exports.setAttribute=p;var f=function(t,e){t.removeAttribute(e)};exports.removeAttribute=f;var d=function(t){var e=document.createElement("template");return e.innerHTML=t,e.content.firstElementChild.cloneNode(!0)};exports.generateHtmlFromTemplate=d;var v=function(t){return Object.keys(t).length};exports.objectLength=v;var g=function(t){for(var e="0123456789ABCDEFGHIJKLMNOPQRSTUWVXYZabcdefghijklmnoprqstuwvxyz",r="",o=0;o<t;o+=1)r+=e[Math.floor(Math.random()*e.length)];return r};exports.randomAlphaNum=g;var h=function(){return(/mobile/i.test(navigator.userAgent)||window.innerWidth<481)&&!/ipad|tablet/i.test(navigator.userAgent)};exports.isMobileView=h;var m=function(t,e){var r=t.substring(1,3),o=t.substring(3,9),n={FF:100,FC:99,FA:98,F7:97,F5:96,F2:95,F0:94,ED:93,EB:92,E8:91,E6:90,E3:89,E0:88,DE:87,DB:86,D9:85,D6:84,D4:83,D1:82,CF:81,CC:80,C9:79,C7:78,C4:77,C2:76,BF:75,BD:74,BA:73,B8:72,B5:71,B3:70,B0:69,AD:68,AB:67,A8:66,A6:65,A3:64,A1:63,"9E":62,"9C":61,99:60,96:59,94:58,91:57,"8F":56,"8C":55,"8A":54,87:53,85:52,82:51,80:50,"7D":49,"7A":48,78:47,75:46,73:45,70:44,"6E":43,"6B":42,69:41,66:40,63:39,61:38,"5E":37,"5C":36,59:35,57:34,54:33,52:32,"4F":31,"4D":30,"4A":29,47:28,45:27,42:26,40:25,"3D":24,"3B":23,38:22,36:21,33:20,30:19,"2E":18,"2B":17,29:16,26:15,24:14,21:13,"1F":12,"1C":11,"1A":10,17:9,14:8,12:7,"0F":6,"0D":5,"0A":4,"08":3,"05":2,"03":1,"00":0}[r.toLocaleUpperCase()],i=parseInt(o.substring(0,2),16),a=parseInt(o.substring(2,4),16),s=parseInt(o.substring(4,6),16);return"rgba(".concat(i,", ").concat(a,", ").concat(s,", ").concat(null!=e?e:n/100,")")};exports.convertHex=m;var x=function(){var t=function(t){return t.test(window.navigator.userAgent)};switch(!0){case t(/edg/i):return"edge";case t(/trident/i):return"explorer";case t(/firefox|fxios/i):return"firefox";case t(/opr\//i):return"opera";case t(/ucbrowser/i):return"uc_browser";case t(/samsungbrowser/i):return"samsung_browser";case t(/chrome|chromium|crios/i):return"chrome";case t(/safari/i):return"safari";default:return"other"}};exports.getBrowser=x;var b=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"click",r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];t.addEventListener(e,function(t){t.stopPropagation(),r&&t.preventDefault(),t.stopImmediatePropagation()})};exports.stopEventBubbling=b;var A=function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],n=new CustomEvent(e,{detail:r,bubbles:o});t.dispatchEvent(n)};exports.createAndDispatchEvent=A;var C=function(t){return p(t,"hidden",!0)};exports.domHide=C;var y=function(t){return f(t,"hidden")};exports.domShow=y;var w=function(){return window.navigator.userAgent.toLocaleLowerCase().includes("iphone")};exports.isIphone=w;var F=function(t){return(t<0?0:t).toString().padStart(2,"0").split("")};exports.splitTime=F;var D=function(t){var e=t.match(/(http|https|:\/\/)/g)?t:"http://".concat(t);h()?window.location.href=e:window.open(e,"_blank")};exports.openLink=D;var L=function(t){if(window.clipboardData&&window.clipboardData.setData)return window.clipboardData.setData("Text",t);var e=document.createElement("textarea");e.textContent=t,e.style.position="fixed",document.body.appendChild(e),e.select(),e.setSelectionRange(0,99999);try{return navigator.clipboard.writeText(e.value)}catch(r){return window.prompt("Copy to clipboard: Ctrl+C, Enter",t)}finally{document.body.removeChild(e)}};exports.copyToClipboard=L;var E=function(t){var e,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:500;return function(){for(var o=arguments.length,n=new Array(o),i=0;i<o;i++)n[i]=arguments[i];clearTimeout(e),e=setTimeout(function(){t.apply(s,n)},r)}};exports.debounce=E;var T=function(t,e){return new Promise(function(r){if("video"===e){var o=document.createElement("video");return o.addEventListener("loadedmetadata",function(){r({asset:o,width:o.videoWidth,height:o.videoHeight})}),void(o.src=t)}var n=new Image;n.src=t,n.onload=function(){r({asset:n,width:n.width,height:n.height})}})};exports.getAssetRatio=T;var O=function(t){var e=t.font,o=t.instanceId,n=i.default.getNodeByInstanceId(o).getDataFromGlobal().globalInstanceData;if(!n.properties)return"";var a=n.properties.storyTextFont,s=["Storyly-Poppins","Storyly-Inter"];return!e||s.includes(e)&&a?(0,r.default)(new Set([a,e].concat(s,["sans-serif"]))).filter(Boolean).join(", "):e};exports.getFontFamily=O;var B=function(t){return"string"==typeof t&&!t.replace(/<([^>]+?)([^>]*?)>(.*?)<\/\1>/gi,"").replace(/(<([^>]+)>)/gi,"").trim()};exports.isStringHTML=B;var S=function(t){return JSON.parse(atob(t.split(".")[1]))};exports.decodeJwt=S;var _=function(t,e){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];window.navigator.maxTouchPoints>0?t.addEventListener("pointerdown",e,r):t.addEventListener("click",e,r)};exports.setClickEventListener=_;var R=function(t,e){window.navigator.maxTouchPoints>0?t.removeEventListener("pointerdown",e):t.removeEventListener("click",e)};exports.removeClickEventListener=R;var P=function(t){var r,o=t.find(function(t){return"studio_main_layer"===t.studio_component_type}),n=null!==(r=t.find(function(t){return t.is_bg}))&&void 0!==r?r:{bg_color:"#FF000000"},i=t.filter(function(t){return"studio_main_layer"!==t.studio_component_type&&!t.is_bg}),a=o;if(!o){var s=(0,e.default)(t);a=s[0],i=s.slice(1)}return{storyData:a,layers:i,storyBg:l(l({},n),{},{bg_color:m(n.bg_color)})}};function G(){}exports.getStoryAssetFromLayers=P,G.prototype={fontSize:14,rgbClass:{toString:function(){return"<r: ".concat(this.r," g: ").concat(this.g," b: ").concat(this.b," >")}},isValidSixDigitColorCode:function(t){return/^(#)?([0-9a-fA-F]{6})?$/.test(t)},isValidThreeDigitColorCode:function(t){return/^(#)?([0-9a-fA-F]{3})?$/.test(t)},isValidColorCode:function(t){return this.isValidSixDigitColorCode(t)||this.isValidThreeDigitColorCode(t)},isValidRatio:function(t){return"number"==typeof t},convertColorToSixDigit:function(t){return"#".concat(t[1]).concat(t[1]).concat(t[2]).concat(t[2]).concat(t[3]).concat(t[3])},hexToLuminance:function(t){if(!this.isValidColorCode(t))throw new Error("Invalid Color :".concat(t));this.isValidThreeDigitColorCode(t)&&(t=this.convertColorToSixDigit(t)),t=this.getRGBFromHex(t);var e=this.calculateLRGB(t);return this.calculateLuminance(e)},check:function(t,e,r,o){if(void 0!==r&&(this.fontSize=r),!t||!e)return!1;var n=this.hexToLuminance(t),i=this.hexToLuminance(e),a=this.getContrastRatio(n,i);return void 0!==o?!!this.isValidRatio(o)&&this.verifyCustomContrastRatio(a,o):this.verifyContrastRatio(a)},calculateLuminance:function(t){return.2126*t.r+.7152*t.g+.0722*t.b},isLevelAA:function(t,e,r){return this.check(t,e,r).WCAG_AA},isLevelAAA:function(t,e,r){return this.check(t,e,r).WCAG_AAA},isLevelCustom:function(t,e,r){return this.check(t,e,void 0,r).customRatio},getRGBFromHex:function(t){var e=Object.create(this.rgbClass);if("string"!=typeof t)throw new Error("must use string");var r=parseInt(t.slice(1,3),16),o=parseInt(t.slice(3,5),16),n=parseInt(t.slice(5,7),16);return e.r=r,e.g=o,e.b=n,e},calculateSRGB:function(t){var e,r=Object.create(this.rgbClass);for(e in t)t.hasOwnProperty(e)&&(r[e]=parseFloat(t[e]/255,10));return r},calculateLRGB:function(t){var e,r=this.calculateSRGB(t),o=Object.create(this.rgbClass),n=0;for(e in r)r.hasOwnProperty(e)&&(n=parseFloat(r[e],10),o[e]=n<=.03928?n/12.92:Math.pow((n+.055)/1.055,2.4));return o},getContrastRatio:function(t,e){var r,o;return t>=e?(r=t,o=e):(r=e,o=t),(r+.05)/(o+.05)},verifyContrastRatio:function(t){var e=Object.create({toString:function(){return"< WCAG-AA: ".concat(this.WCAG_AA?"pass":"fail"," WCAG-AAA: ").concat(this.WCAG_AAA?"pass":"fail"," >")}});return(this.fontSize||14)>=18?(e.WCAG_AA=t>=3,e.WCAG_AAA=t>=4.5):(e.WCAG_AA=t>=4.5,e.WCAG_AAA=t>=7),e},verifyCustomContrastRatio:function(t,e){var r=Object.create({toString:function(){return"< Custom Ratio: ".concat(this.customRatio?"pass":"fail"," >")}});return r.customRatio=t>=e,r}};var j=function(t){var e=new G;if(!t||3!==t.length&&6!==t.length&&9!==t.length)return"#ff000000";var r=e.hexToLuminance("#".concat("#ff000000".slice(3))),o=e.hexToLuminance("#".concat("#ffffffff".slice(3))),n=e.hexToLuminance("#".concat(null==t?void 0:t.slice(3)));return e.getContrastRatio(r,n)>e.getContrastRatio(o,n)?"#ff000000":"#ffffffff"};exports.getContrastBgColor=j;var k=function(t){return i.default.getNodeByInstanceId(t).getDataFromGlobal().globalInstanceData.layout===o.default.MODERN?"onModalOpen":"onBottomSheetOpen"};exports.openProductDetail=k;var I=function(t,e){return t.length===e.length&&t.every(function(t,r){return t===e[r]})};exports.isArraysEqual=I;var H=function(t){switch(t){case n.GestureTypes.Progress:return"progress";case n.GestureTypes.Swiped:return"swiped";default:return"clicked"}};exports.getGestureType=H;var M=function(t){var e=t||0;return e<1e3?e:e>=1e3&&e<1e6?"".concat(+(e/1e3).toFixed(),"k"):e>=1e6&&e<1e9?"".concat(+(e/1e6).toFixed(),"m"):e>=1e9&&e<1e12?"".concat(+(e/1e9).toFixed(),"b"):e>=1e12?"".concat(+(e/1e12).toFixed(),"t"):e};exports.kFormatter=M;var W=function(t,e){return new Intl.NumberFormat(Intl.NumberFormat.supportedLocalesOf(navigator.languages||navigator.language,{localeMatcher:"lookup"}),{style:"currency",currency:e}).format(t)};exports.currencyFormatter=W;var V=function(t){return/^#[0-9A-F]{6}$/i.test(t)};exports.isHexColor=V;var q=function(t,e){var r=parseFloat(t.h)*e.offsetHeight/100;return t.border_radius/100*(r/2)};exports.calcBorderRadius=q;var N=function(t){return[t.stories.flatMap(function(t){return t.media}).flatMap(function(t){return t.layers}).filter(function(t){return t.type===a.LayerTemplateTypes.PRODUCT_CATALOG})]};exports.getProductLayers=N;
|
|
112
|
+
},{"@babel/runtime/helpers/defineProperty":"IxO8","@babel/runtime/helpers/toArray":"kQhN","@babel/runtime/helpers/toConsumableArray":"Fhqp","../constants/layouts":"kUgL","../constants/events":"d0lR","./proxy":"qmVm","../constants/layerTypes":"aJRz"}],"Ooqf":[function(require,module,exports) {
|
|
113
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e="sg",t="s",s={STORY_GROUP:e,STORY:t};exports.default=s;
|
|
114
|
+
},{}],"WCGv":[function(require,module,exports) {
|
|
115
|
+
|
|
116
|
+
},{}],"QF55":[function(require,module,exports) {
|
|
117
|
+
|
|
118
|
+
},{"../layers/CTA/style.scss":"WCGv","../layers/Countdown/style.scss":"WCGv","../layers/EmbedCode/style.scss":"WCGv","../layers/Emoji/style.scss":"WCGv","../layers/ImageCTA/style.scss":"WCGv","../layers/Media/style.scss":"WCGv","../layers/Poll/style.scss":"WCGv","../layers/ProductTag/style.scss":"WCGv","../layers/PromoCode/style.scss":"WCGv","../layers/Question/style.scss":"WCGv","../layers/Quiz/style.scss":"WCGv","../layers/Rating/style.scss":"WCGv","../layers/Text/style.scss":"WCGv","../layers/ProductCard/style.scss":"WCGv","../layers/ImageQuiz/style.scss":"WCGv","../layers/ProductCatalog/style.scss":"WCGv"}],"yCDU":[function(require,module,exports) {
|
|
119
|
+
|
|
120
|
+
},{"./layers/style.scss":"QF55","./layouts/Modern/style.scss":"WCGv","./layouts/Classic/style.scss":"WCGv","./components/style.scss":"WCGv"}],"TkWu":[function(require,module,exports) {
|
|
121
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.handleCustomStoryGroupStyles=s,exports.handleCustomStoryGroupElement=a;var e=require("../lib/style"),t=require("../lib/util"),r=o(require("../lib/storage"));function o(e){return e&&e.__esModule?e:{default:e}}function s(o,s,a,i){var l=s.querySelector(".storyly__story-preview"),n=s.classList.contains("storyly__bar-layout");if(l||n){var y,u=l.getAttribute("fallbackURL"),c=function(){var e,t;if(a)return a;var l=null!==(e=null===(t=r.default.setInstanceId(i).getItemFromInstance("Storyly_story-state")[s.getAttribute("data-id")])||void 0===t?void 0:t.length)&&void 0!==e?e:0;return l>=o.stories.length||l-1<0?0:l-1}(),_=(0,t.getStoryAssetFromLayers)(o.stories[c].media.layers).storyData,d=_.image_path;"video"===_.type&&(n?(d=_.video_path,y=o.stories[c].media.thumbnail_url):d=o.stories[c].media.thumbnail_url);var p=o.stories[c].preview_path&&"".concat(o.media_host).concat(o.stories[c].preview_path),v=s.querySelector(".storyly__story-preview-video");if(v&&n&&"video"===_.type){var m=v.cloneNode(!0);m.querySelector("source").src="".concat(o.media_host).concat(d),m.poster=y?"".concat(o.media_host).concat(y):"",v.remove(),s.querySelector(".storyly__story-preview-video-wrapper").appendChild(m)}else(0,e.setStyle)(l,["background-image","url(".concat(p||u?null!=p?p:u:"".concat(o.media_host).concat(d),")")])}}function a(r,o,a,i){var l=(0,t.generateHtmlFromTemplate)(a);l.slot="story-group-".concat(r.group_id),l.dataset.id=r.group_id,l.dataset.order=o,l.tabIndex="0",l.role="listitem",(0,e.setClass)(l,["storyly__story-group-container","storyly__story-group-container-no-flex"]);var n=l.querySelector(".storyly__story-group-cover"),y=l.querySelector(".storyly__story-group-title"),u=l.querySelector(".storyly__story-group-pin");return i&&(0,e.setClass)(l,"storyly__story-group-seen"),!r.pinned&&u&&(0,e.setStyle)(u,["display","none"]),n&&(n.src=r.icon_image_url),y&&(y.innerHTML=r.title),s(r,l),l}
|
|
122
|
+
},{"../lib/style":"vgU2","../lib/util":"PesM","../lib/storage":"NA5d"}],"VKZr":[function(require,module,exports) {
|
|
123
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.layerScales=exports.placeholderFields=exports.groupTypes=void 0;var e={PERSONALIZED:"personalized",DEFAULT:"default"};exports.groupTypes=e;var t={swipe:"button_text|outlink",text:"text",image:"image_url",button:"text|outlink"};exports.placeholderFields=t;var r=[.64,.8,1];exports.layerScales=r;
|
|
124
|
+
},{}],"vYYL":[function(require,module,exports) {
|
|
125
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=a;var e=o(require("@babel/runtime/helpers/slicedToArray")),r=o(require("@babel/runtime/helpers/defineProperty")),t=require("../constants/common");function o(e){return e&&e.__esModule?e:{default:e}}function i(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),t.push.apply(t,o)}return t}function n(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?i(Object(o),!0).forEach(function(t){(0,r.default)(e,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):i(Object(o)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(o,r))})}return e}function a(r,o){var i=o.template,a=(i=void 0===i?{}:i).max_story_count,s=o.stories,l=s[0].media.layers;if(!a)return Promise.reject();for(var c=[],u=0,p=0;p<a;p+=1){var f=[],b=r[p],d=!0;if(!b)break;for(var y=l.length,O=0;O<y;O+=1){var v=n({},l[O]);if(v.is_template_layer||v.placeholder){var m=t.placeholderFields[v.type].split("|"),h=(0,e.default)(m,2),j=h[0],P=h[1],g=v[j];if(P){var _=v[P];if(!b[_]){d=!1;break}v[P]=b[_]}if(!b[g]){d=!1;break}v[j]=b[g]}f.push(v)}d&&c.push(n(n({},s[0]),{},{story_id:u-=1,media:n(n({},s[0].media),{},{layers:f})}))}var w=n(n({},o),{},{stories:c,hidden:!c.length});return Promise.resolve(w)}
|
|
126
|
+
},{"@babel/runtime/helpers/slicedToArray":"HETk","@babel/runtime/helpers/defineProperty":"IxO8","../constants/common":"VKZr"}],"EE4e":[function(require,module,exports) {
|
|
127
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=u;var e=t(require("@babel/runtime/helpers/toConsumableArray")),r=t(require("@babel/runtime/helpers/defineProperty"));function t(e){return e&&e.__esModule?e:{default:e}}function n(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),t.push.apply(t,n)}return t}function o(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?n(Object(o),!0).forEach(function(t){(0,r.default)(e,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):n(Object(o)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(o,r))})}return e}function u(t,n){for(var u,a,i=(u=t||{},a=Object.keys(u).map(function(e){var t="@".concat(e);return(0,r.default)({},t,u[e])}),Object.assign.apply(Object,[{}].concat((0,e.default)(a)))),c=function(e){return null==e?void 0:e.every(function(e){return!!i[e]})},l=JSON.parse(JSON.stringify(n)),f=/@{(.*?)}/g,s=["icon_image_url","title"],p=!1,b=s.length,d=function(e){var r=s[e],t=l[r].match(f),n=c(t);if(!n&&null!=t&&t.length)return p=!0,"break";n&&(t.forEach(function(e){l[r]=l[r].replace(e,i[e])}),l.is_user_property_used=!0)},y=0;y<b;y+=1){if("break"===d(y))break}if(p)return o(o({},n),{},{hidden:!0});for(var O=l.stories,h=O.length,g=function(e){var r=O[e].media.layers;if(O[e].alt_text){var t=O[e].alt_text.match(f),n=c(t);if(!n&&null!=t&&t.length)return O[e].delete=!0,"break";n&&(t.forEach(function(r){O[e].alt_text=O[e].alt_text.replace(r,i[r])}),l.is_user_property_used=!0)}for(var o=r.length,u=function(t){for(var n=r[t],o=Object.keys(n).filter(function(e){return"string"==typeof n[e]&&!!n[e].match(f)}),u=o.length,a=function(r){var t,u=o[r],a=null===(t=n[u])||void 0===t?void 0:t.match(f),s=c(a);if(!s&&null!=a&&a.length)return O[e].delete=!0,"break";s&&(l.is_user_property_used=!0,O[e].delete=!1,a.forEach(function(e){n[u]=n[u].replace(new RegExp(e),i[e])}))},s=0;s<u;s+=1){if("break"===a(s))break}},a=0;a<o;a+=1)u(a)},v=0;v<h;v+=1){if("break"===g(v))break}var _=O.some(function(e){return e.delete});return o(o({},l),{},{hidden:_})}
|
|
128
|
+
},{"@babel/runtime/helpers/toConsumableArray":"Fhqp","@babel/runtime/helpers/defineProperty":"IxO8"}],"eyBV":[function(require,module,exports) {
|
|
129
|
+
"use strict";function e(e,r){return new IntersectionObserver(r,{root:e,rootMargin:"0px",threshold:[0]})}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=e;
|
|
130
|
+
},{}],"BQvw":[function(require,module,exports) {
|
|
131
|
+
var define;
|
|
132
|
+
var global = arguments[3];
|
|
133
|
+
var t,e=arguments[3];!function(e,n){"function"==typeof t&&t.amd?t(n):"object"==typeof module&&module.exports?module.exports=n():e.EvEmitter=n()}("undefined"!=typeof window?window:this,function(){"use strict";function t(){}var e=t.prototype;return e.on=function(t,e){if(t&&e){var n=this._events=this._events||{},i=n[t]=n[t]||[];return-1==i.indexOf(e)&&i.push(e),this}},e.once=function(t,e){if(t&&e){this.on(t,e);var n=this._onceEvents=this._onceEvents||{};return(n[t]=n[t]||{})[e]=!0,this}},e.off=function(t,e){var n=this._events&&this._events[t];if(n&&n.length){var i=n.indexOf(e);return-1!=i&&n.splice(i,1),this}},e.emitEvent=function(t,e){var n=this._events&&this._events[t];if(n&&n.length){n=n.slice(0),e=e||[];for(var i=this._onceEvents&&this._onceEvents[t],s=0;s<n.length;s++){var o=n[s];i&&i[o]&&(this.off(t,o),delete i[o]),o.apply(this,e)}return this}},e.allOff=function(){delete this._events,delete this._onceEvents},t});
|
|
134
|
+
},{}],"SpQD":[function(require,module,exports) {
|
|
135
|
+
var define;
|
|
136
|
+
var t;!function(e,i){"function"==typeof t&&t.amd?t(i):"object"==typeof module&&module.exports?module.exports=i():e.getSize=i()}(window,function(){"use strict";function t(t){var e=parseFloat(t);return-1==t.indexOf("%")&&!isNaN(e)&&e}var e="undefined"==typeof console?function(){}:function(t){console.error(t)},i=["paddingLeft","paddingRight","paddingTop","paddingBottom","marginLeft","marginRight","marginTop","marginBottom","borderLeftWidth","borderRightWidth","borderTopWidth","borderBottomWidth"],o=i.length;function r(t){var i=getComputedStyle(t);return i||e("Style returned "+i+". Are you running this code in a hidden iframe on Firefox? See https://bit.ly/getsizebug1"),i}var d,n=!1;function h(e){if(function(){if(!n){n=!0;var e=document.createElement("div");e.style.width="200px",e.style.padding="1px 2px 3px 4px",e.style.borderStyle="solid",e.style.borderWidth="1px 2px 3px 4px",e.style.boxSizing="border-box";var i=document.body||document.documentElement;i.appendChild(e);var o=r(e);d=200==Math.round(t(o.width)),h.isBoxSizeOuter=d,i.removeChild(e)}}(),"string"==typeof e&&(e=document.querySelector(e)),e&&"object"==typeof e&&e.nodeType){var a=r(e);if("none"==a.display)return function(){for(var t={width:0,height:0,innerWidth:0,innerHeight:0,outerWidth:0,outerHeight:0},e=0;e<o;e++)t[i[e]]=0;return t}();var g={};g.width=e.offsetWidth,g.height=e.offsetHeight;for(var p=g.isBorderBox="border-box"==a.boxSizing,u=0;u<o;u++){var f=i[u],m=a[f],s=parseFloat(m);g[f]=isNaN(s)?0:s}var l=g.paddingLeft+g.paddingRight,c=g.paddingTop+g.paddingBottom,b=g.marginLeft+g.marginRight,x=g.marginTop+g.marginBottom,y=g.borderLeftWidth+g.borderRightWidth,v=g.borderTopWidth+g.borderBottomWidth,W=p&&d,w=t(a.width);!1!==w&&(g.width=w+(W?0:l+y));var B=t(a.height);return!1!==B&&(g.height=B+(W?0:c+v)),g.innerWidth=g.width-(l+y),g.innerHeight=g.height-(c+v),g.outerWidth=g.width+b,g.outerHeight=g.height+x,g}}return h});
|
|
137
|
+
},{}],"PZ9L":[function(require,module,exports) {
|
|
138
|
+
var define;
|
|
139
|
+
var e;!function(t,r){"use strict";"function"==typeof e&&e.amd?e(r):"object"==typeof module&&module.exports?module.exports=r():t.matchesSelector=r()}(window,function(){"use strict";var e=function(){var e=window.Element.prototype;if(e.matches)return"matches";if(e.matchesSelector)return"matchesSelector";for(var t=["webkit","moz","ms","o"],r=0;r<t.length;r++){var o=t[r]+"MatchesSelector";if(e[o])return o}}();return function(t,r){return t[e](r)}});
|
|
140
|
+
},{}],"PmK6":[function(require,module,exports) {
|
|
141
|
+
var define;
|
|
142
|
+
var e;!function(t,r){"function"==typeof e&&e.amd?e(["desandro-matches-selector/matches-selector"],function(e){return r(t,e)}):"object"==typeof module&&module.exports?module.exports=r(t,require("desandro-matches-selector")):t.fizzyUIUtils=r(t,t.matchesSelector)}(window,function(e,t){"use strict";var r={extend:function(e,t){for(var r in t)e[r]=t[r];return e},modulo:function(e,t){return(e%t+t)%t}},n=Array.prototype.slice;r.makeArray=function(e){return Array.isArray(e)?e:null==e?[]:"object"==typeof e&&"number"==typeof e.length?n.call(e):[e]},r.removeFrom=function(e,t){var r=e.indexOf(t);-1!=r&&e.splice(r,1)},r.getParent=function(e,r){for(;e.parentNode&&e!=document.body;)if(e=e.parentNode,t(e,r))return e},r.getQueryElement=function(e){return"string"==typeof e?document.querySelector(e):e},r.handleEvent=function(e){var t="on"+e.type;this[t]&&this[t](e)},r.filterFindElements=function(e,n){e=r.makeArray(e);var o=[];return e.forEach(function(e){if(e instanceof HTMLElement)if(n){t(e,n)&&o.push(e);for(var r=e.querySelectorAll(n),a=0;a<r.length;a++)o.push(r[a])}else o.push(e)}),o},r.debounceMethod=function(e,t,r){r=r||100;var n=e.prototype[t],o=t+"Timeout";e.prototype[t]=function(){var e=this[o];clearTimeout(e);var t=arguments,a=this;this[o]=setTimeout(function(){n.apply(a,t),delete a[o]},r)}},r.docReady=function(e){var t=document.readyState;"complete"==t||"interactive"==t?setTimeout(e):document.addEventListener("DOMContentLoaded",e)},r.toDashed=function(e){return e.replace(/(.)([A-Z])/g,function(e,t,r){return t+"-"+r}).toLowerCase()};var o=e.console;return r.htmlInit=function(t,n){r.docReady(function(){var a=r.toDashed(n),u="data-"+a,c=document.querySelectorAll("["+u+"]"),i=document.querySelectorAll(".js-"+a),s=r.makeArray(c).concat(r.makeArray(i)),l=u+"-options",d=e.jQuery;s.forEach(function(e){var r,a=e.getAttribute(u)||e.getAttribute(l);try{r=a&&JSON.parse(a)}catch(i){return void(o&&o.error("Error parsing "+u+" on "+e.className+": "+i))}var c=new t(e,r);d&&d.data(e,n,c)})})},r});
|
|
143
|
+
},{"desandro-matches-selector":"PZ9L"}],"molc":[function(require,module,exports) {
|
|
144
|
+
var define;
|
|
145
|
+
var t;!function(i,n){"function"==typeof t&&t.amd?t(["ev-emitter/ev-emitter","get-size/get-size"],n):"object"==typeof module&&module.exports?module.exports=n(require("ev-emitter"),require("get-size")):(i.Outlayer={},i.Outlayer.Item=n(i.EvEmitter,i.getSize))}(window,function(t,i){"use strict";var n=document.documentElement.style,o="string"==typeof n.transition?"transition":"WebkitTransition",e="string"==typeof n.transform?"transform":"WebkitTransform",s={WebkitTransition:"webkitTransitionEnd",transition:"transitionend"}[o],r={transform:e,transition:o,transitionDuration:o+"Duration",transitionProperty:o+"Property",transitionDelay:o+"Delay"};function a(t,i){t&&(this.element=t,this.layout=i,this.position={x:0,y:0},this._create())}var h=a.prototype=Object.create(t.prototype);h.constructor=a,h._create=function(){this._transn={ingProperties:{},clean:{},onEnd:{}},this.css({position:"absolute"})},h.handleEvent=function(t){var i="on"+t.type;this[i]&&this[i](t)},h.getSize=function(){this.size=i(this.element)},h.css=function(t){var i=this.element.style;for(var n in t){i[r[n]||n]=t[n]}},h.getPosition=function(){var t=getComputedStyle(this.element),i=this.layout._getOption("originLeft"),n=this.layout._getOption("originTop"),o=t[i?"left":"right"],e=t[n?"top":"bottom"],s=parseFloat(o),r=parseFloat(e),a=this.layout.size;-1!=o.indexOf("%")&&(s=s/100*a.width),-1!=e.indexOf("%")&&(r=r/100*a.height),s=isNaN(s)?0:s,r=isNaN(r)?0:r,s-=i?a.paddingLeft:a.paddingRight,r-=n?a.paddingTop:a.paddingBottom,this.position.x=s,this.position.y=r},h.layoutPosition=function(){var t=this.layout.size,i={},n=this.layout._getOption("originLeft"),o=this.layout._getOption("originTop"),e=n?"paddingLeft":"paddingRight",s=n?"left":"right",r=n?"right":"left",a=this.position.x+t[e];i[s]=this.getXValue(a),i[r]="";var h=o?"paddingTop":"paddingBottom",l=o?"top":"bottom",u=o?"bottom":"top",p=this.position.y+t[h];i[l]=this.getYValue(p),i[u]="",this.css(i),this.emitEvent("layout",[this])},h.getXValue=function(t){var i=this.layout._getOption("horizontal");return this.layout.options.percentPosition&&!i?t/this.layout.size.width*100+"%":t+"px"},h.getYValue=function(t){var i=this.layout._getOption("horizontal");return this.layout.options.percentPosition&&i?t/this.layout.size.height*100+"%":t+"px"},h._transitionTo=function(t,i){this.getPosition();var n=this.position.x,o=this.position.y,e=t==this.position.x&&i==this.position.y;if(this.setPosition(t,i),!e||this.isTransitioning){var s=t-n,r=i-o,a={};a.transform=this.getTranslate(s,r),this.transition({to:a,onTransitionEnd:{transform:this.layoutPosition},isCleaning:!0})}else this.layoutPosition()},h.getTranslate=function(t,i){return"translate3d("+(t=this.layout._getOption("originLeft")?t:-t)+"px, "+(i=this.layout._getOption("originTop")?i:-i)+"px, 0)"},h.goTo=function(t,i){this.setPosition(t,i),this.layoutPosition()},h.moveTo=h._transitionTo,h.setPosition=function(t,i){this.position.x=parseFloat(t),this.position.y=parseFloat(i)},h._nonTransition=function(t){for(var i in this.css(t.to),t.isCleaning&&this._removeStyles(t.to),t.onTransitionEnd)t.onTransitionEnd[i].call(this)},h.transition=function(t){if(parseFloat(this.layout.options.transitionDuration)){var i=this._transn;for(var n in t.onTransitionEnd)i.onEnd[n]=t.onTransitionEnd[n];for(n in t.to)i.ingProperties[n]=!0,t.isCleaning&&(i.clean[n]=!0);if(t.from){this.css(t.from);this.element.offsetHeight;null}this.enableTransition(t.to),this.css(t.to),this.isTransitioning=!0}else this._nonTransition(t)};var l="opacity,"+e.replace(/([A-Z])/g,function(t){return"-"+t.toLowerCase()});h.enableTransition=function(){if(!this.isTransitioning){var t=this.layout.options.transitionDuration;t="number"==typeof t?t+"ms":t,this.css({transitionProperty:l,transitionDuration:t,transitionDelay:this.staggerDelay||0}),this.element.addEventListener(s,this,!1)}},h.onwebkitTransitionEnd=function(t){this.ontransitionend(t)},h.onotransitionend=function(t){this.ontransitionend(t)};var u={"-webkit-transform":"transform"};h.ontransitionend=function(t){if(t.target===this.element){var i=this._transn,n=u[t.propertyName]||t.propertyName;if(delete i.ingProperties[n],function(t){for(var i in t)return!1;return!0}(i.ingProperties)&&this.disableTransition(),n in i.clean&&(this.element.style[t.propertyName]="",delete i.clean[n]),n in i.onEnd)i.onEnd[n].call(this),delete i.onEnd[n];this.emitEvent("transitionEnd",[this])}},h.disableTransition=function(){this.removeTransitionStyles(),this.element.removeEventListener(s,this,!1),this.isTransitioning=!1},h._removeStyles=function(t){var i={};for(var n in t)i[n]="";this.css(i)};var p={transitionProperty:"",transitionDuration:"",transitionDelay:""};return h.removeTransitionStyles=function(){this.css(p)},h.stagger=function(t){t=isNaN(t)?0:t,this.staggerDelay=t+"ms"},h.removeElem=function(){this.element.parentNode.removeChild(this.element),this.css({display:""}),this.emitEvent("remove",[this])},h.remove=function(){o&&parseFloat(this.layout.options.transitionDuration)?(this.once("transitionEnd",function(){this.removeElem()}),this.hide()):this.removeElem()},h.reveal=function(){delete this.isHidden,this.css({display:""});var t=this.layout.options,i={};i[this.getHideRevealTransitionEndProperty("visibleStyle")]=this.onRevealTransitionEnd,this.transition({from:t.hiddenStyle,to:t.visibleStyle,isCleaning:!0,onTransitionEnd:i})},h.onRevealTransitionEnd=function(){this.isHidden||this.emitEvent("reveal")},h.getHideRevealTransitionEndProperty=function(t){var i=this.layout.options[t];if(i.opacity)return"opacity";for(var n in i)return n},h.hide=function(){this.isHidden=!0,this.css({display:""});var t=this.layout.options,i={};i[this.getHideRevealTransitionEndProperty("hiddenStyle")]=this.onHideTransitionEnd,this.transition({from:t.visibleStyle,to:t.hiddenStyle,isCleaning:!0,onTransitionEnd:i})},h.onHideTransitionEnd=function(){this.isHidden&&(this.css({display:"none"}),this.emitEvent("hide"))},h.destroy=function(){this.css({position:"",left:"",right:"",top:"",bottom:"",transition:"",transform:""})},a});
|
|
146
|
+
},{"ev-emitter":"BQvw","get-size":"SpQD"}],"k1dT":[function(require,module,exports) {
|
|
147
|
+
var define;
|
|
148
|
+
var t;!function(e,i){"use strict";"function"==typeof t&&t.amd?t(["ev-emitter/ev-emitter","get-size/get-size","fizzy-ui-utils/utils","./item"],function(t,n,s,o){return i(e,t,n,s,o)}):"object"==typeof module&&module.exports?module.exports=i(e,require("ev-emitter"),require("get-size"),require("fizzy-ui-utils"),require("./item")):e.Outlayer=i(e,e.EvEmitter,e.getSize,e.fizzyUIUtils,e.Outlayer.Item)}(window,function(t,e,i,n,s){"use strict";var o=t.console,r=t.jQuery,a=function(){},h=0,u={};function m(t,e){var i=n.getQueryElement(t);if(i){this.element=i,r&&(this.$element=r(this.element)),this.options=n.extend({},this.constructor.defaults),this.option(e);var s=++h;this.element.outlayerGUID=s,u[s]=this,this._create(),this._getOption("initLayout")&&this.layout()}else o&&o.error("Bad element for "+this.constructor.namespace+": "+(i||t))}m.namespace="outlayer",m.Item=s,m.defaults={containerStyle:{position:"relative"},initLayout:!0,originLeft:!0,originTop:!0,resize:!0,resizeContainer:!0,transitionDuration:"0.4s",hiddenStyle:{opacity:0,transform:"scale(0.001)"},visibleStyle:{opacity:1,transform:"scale(1)"}};var c=m.prototype;function l(t){function e(){t.apply(this,arguments)}return e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e}n.extend(c,e.prototype),c.option=function(t){n.extend(this.options,t)},c._getOption=function(t){var e=this.constructor.compatOptions[t];return e&&void 0!==this.options[e]?this.options[e]:this.options[t]},m.compatOptions={initLayout:"isInitLayout",horizontal:"isHorizontal",layoutInstant:"isLayoutInstant",originLeft:"isOriginLeft",originTop:"isOriginTop",resize:"isResizeBound",resizeContainer:"isResizingContainer"},c._create=function(){this.reloadItems(),this.stamps=[],this.stamp(this.options.stamp),n.extend(this.element.style,this.options.containerStyle),this._getOption("resize")&&this.bindResize()},c.reloadItems=function(){this.items=this._itemize(this.element.children)},c._itemize=function(t){for(var e=this._filterFindItemElements(t),i=this.constructor.Item,n=[],s=0;s<e.length;s++){var o=new i(e[s],this);n.push(o)}return n},c._filterFindItemElements=function(t){return n.filterFindElements(t,this.options.itemSelector)},c.getItemElements=function(){return this.items.map(function(t){return t.element})},c.layout=function(){this._resetLayout(),this._manageStamps();var t=this._getOption("layoutInstant"),e=void 0!==t?t:!this._isLayoutInited;this.layoutItems(this.items,e),this._isLayoutInited=!0},c._init=c.layout,c._resetLayout=function(){this.getSize()},c.getSize=function(){this.size=i(this.element)},c._getMeasurement=function(t,e){var n,s=this.options[t];s?("string"==typeof s?n=this.element.querySelector(s):s instanceof HTMLElement&&(n=s),this[t]=n?i(n)[e]:s):this[t]=0},c.layoutItems=function(t,e){t=this._getItemsForLayout(t),this._layoutItems(t,e),this._postLayout()},c._getItemsForLayout=function(t){return t.filter(function(t){return!t.isIgnored})},c._layoutItems=function(t,e){if(this._emitCompleteOnItems("layout",t),t&&t.length){var i=[];t.forEach(function(t){var n=this._getItemLayoutPosition(t);n.item=t,n.isInstant=e||t.isLayoutInstant,i.push(n)},this),this._processLayoutQueue(i)}},c._getItemLayoutPosition=function(){return{x:0,y:0}},c._processLayoutQueue=function(t){this.updateStagger(),t.forEach(function(t,e){this._positionItem(t.item,t.x,t.y,t.isInstant,e)},this)},c.updateStagger=function(){var t=this.options.stagger;if(null!=t)return this.stagger=function(t){if("number"==typeof t)return t;var e=t.match(/(^\d*\.?\d*)(\w*)/),i=e&&e[1],n=e&&e[2];if(!i.length)return 0;i=parseFloat(i);var s=f[n]||1;return i*s}(t),this.stagger;this.stagger=0},c._positionItem=function(t,e,i,n,s){n?t.goTo(e,i):(t.stagger(s*this.stagger),t.moveTo(e,i))},c._postLayout=function(){this.resizeContainer()},c.resizeContainer=function(){if(this._getOption("resizeContainer")){var t=this._getContainerSize();t&&(this._setContainerMeasure(t.width,!0),this._setContainerMeasure(t.height,!1))}},c._getContainerSize=a,c._setContainerMeasure=function(t,e){if(void 0!==t){var i=this.size;i.isBorderBox&&(t+=e?i.paddingLeft+i.paddingRight+i.borderLeftWidth+i.borderRightWidth:i.paddingBottom+i.paddingTop+i.borderTopWidth+i.borderBottomWidth),t=Math.max(t,0),this.element.style[e?"width":"height"]=t+"px"}},c._emitCompleteOnItems=function(t,e){var i=this;function n(){i.dispatchEvent(t+"Complete",null,[e])}var s=e.length;if(e&&s){var o=0;e.forEach(function(e){e.once(t,r)})}else n();function r(){++o==s&&n()}},c.dispatchEvent=function(t,e,i){var n=e?[e].concat(i):i;if(this.emitEvent(t,n),r)if(this.$element=this.$element||r(this.element),e){var s=r.Event(e);s.type=t,this.$element.trigger(s,i)}else this.$element.trigger(t,i)},c.ignore=function(t){var e=this.getItem(t);e&&(e.isIgnored=!0)},c.unignore=function(t){var e=this.getItem(t);e&&delete e.isIgnored},c.stamp=function(t){(t=this._find(t))&&(this.stamps=this.stamps.concat(t),t.forEach(this.ignore,this))},c.unstamp=function(t){(t=this._find(t))&&t.forEach(function(t){n.removeFrom(this.stamps,t),this.unignore(t)},this)},c._find=function(t){if(t)return"string"==typeof t&&(t=this.element.querySelectorAll(t)),t=n.makeArray(t)},c._manageStamps=function(){this.stamps&&this.stamps.length&&(this._getBoundingRect(),this.stamps.forEach(this._manageStamp,this))},c._getBoundingRect=function(){var t=this.element.getBoundingClientRect(),e=this.size;this._boundingRect={left:t.left+e.paddingLeft+e.borderLeftWidth,top:t.top+e.paddingTop+e.borderTopWidth,right:t.right-(e.paddingRight+e.borderRightWidth),bottom:t.bottom-(e.paddingBottom+e.borderBottomWidth)}},c._manageStamp=a,c._getElementOffset=function(t){var e=t.getBoundingClientRect(),n=this._boundingRect,s=i(t);return{left:e.left-n.left-s.marginLeft,top:e.top-n.top-s.marginTop,right:n.right-e.right-s.marginRight,bottom:n.bottom-e.bottom-s.marginBottom}},c.handleEvent=n.handleEvent,c.bindResize=function(){t.addEventListener("resize",this),this.isResizeBound=!0},c.unbindResize=function(){t.removeEventListener("resize",this),this.isResizeBound=!1},c.onresize=function(){this.resize()},n.debounceMethod(m,"onresize",100),c.resize=function(){this.isResizeBound&&this.needsResizeLayout()&&this.layout()},c.needsResizeLayout=function(){var t=i(this.element);return this.size&&t&&t.innerWidth!==this.size.innerWidth},c.addItems=function(t){var e=this._itemize(t);return e.length&&(this.items=this.items.concat(e)),e},c.appended=function(t){var e=this.addItems(t);e.length&&(this.layoutItems(e,!0),this.reveal(e))},c.prepended=function(t){var e=this._itemize(t);if(e.length){var i=this.items.slice(0);this.items=e.concat(i),this._resetLayout(),this._manageStamps(),this.layoutItems(e,!0),this.reveal(e),this.layoutItems(i)}},c.reveal=function(t){if(this._emitCompleteOnItems("reveal",t),t&&t.length){var e=this.updateStagger();t.forEach(function(t,i){t.stagger(i*e),t.reveal()})}},c.hide=function(t){if(this._emitCompleteOnItems("hide",t),t&&t.length){var e=this.updateStagger();t.forEach(function(t,i){t.stagger(i*e),t.hide()})}},c.revealItemElements=function(t){var e=this.getItems(t);this.reveal(e)},c.hideItemElements=function(t){var e=this.getItems(t);this.hide(e)},c.getItem=function(t){for(var e=0;e<this.items.length;e++){var i=this.items[e];if(i.element==t)return i}},c.getItems=function(t){t=n.makeArray(t);var e=[];return t.forEach(function(t){var i=this.getItem(t);i&&e.push(i)},this),e},c.remove=function(t){var e=this.getItems(t);this._emitCompleteOnItems("remove",e),e&&e.length&&e.forEach(function(t){t.remove(),n.removeFrom(this.items,t)},this)},c.destroy=function(){var t=this.element.style;t.height="",t.position="",t.width="",this.items.forEach(function(t){t.destroy()}),this.unbindResize();var e=this.element.outlayerGUID;delete u[e],delete this.element.outlayerGUID,r&&r.removeData(this.element,this.constructor.namespace)},m.data=function(t){var e=(t=n.getQueryElement(t))&&t.outlayerGUID;return e&&u[e]},m.create=function(t,e){var i=l(m);return i.defaults=n.extend({},m.defaults),n.extend(i.defaults,e),i.compatOptions=n.extend({},m.compatOptions),i.namespace=t,i.data=m.data,i.Item=l(s),n.htmlInit(i,t),r&&r.bridget&&r.bridget(t,i),i};var f={ms:1,s:1e3};return m.Item=s,m});
|
|
149
|
+
},{"ev-emitter":"BQvw","get-size":"SpQD","fizzy-ui-utils":"PmK6","./item":"molc"}],"Tr1i":[function(require,module,exports) {
|
|
150
|
+
var define;
|
|
151
|
+
var t;!function(o,e){"function"==typeof t&&t.amd?t(["outlayer/outlayer"],e):"object"==typeof module&&module.exports?module.exports=e(require("outlayer")):(o.Isotope=o.Isotope||{},o.Isotope.Item=e(o.Outlayer))}(window,function(t){"use strict";function o(){t.Item.apply(this,arguments)}var e=o.prototype=Object.create(t.Item.prototype),a=e._create;e._create=function(){this.id=this.layout.itemGUID++,a.call(this),this.sortData={}},e.updateSortData=function(){if(!this.isIgnored){this.sortData.id=this.id,this.sortData["original-order"]=this.id,this.sortData.random=Math.random();var t=this.layout.options.getSortData,o=this.layout._sorters;for(var e in t){var a=o[e];this.sortData[e]=a(this.element,this)}}};var i=e.destroy;return e.destroy=function(){i.apply(this,arguments),this.css({display:""})},o});
|
|
152
|
+
},{"outlayer":"k1dT"}],"Nkzt":[function(require,module,exports) {
|
|
153
|
+
var define;
|
|
154
|
+
var e;!function(t,i){"function"==typeof e&&e.amd?e(["get-size/get-size","outlayer/outlayer"],i):"object"==typeof module&&module.exports?module.exports=i(require("get-size"),require("outlayer")):(t.Isotope=t.Isotope||{},t.Isotope.LayoutMode=i(t.getSize,t.Outlayer))}(window,function(e,t){"use strict";function i(e){this.isotope=e,e&&(this.options=e.options[this.namespace],this.element=e.element,this.items=e.filteredItems,this.size=e.size)}var o=i.prototype;return["_resetLayout","_getItemLayoutPosition","_manageStamp","_getContainerSize","_getElementOffset","needsResizeLayout","_getOption"].forEach(function(e){o[e]=function(){return t.prototype[e].apply(this.isotope,arguments)}}),o.needsVerticalResizeLayout=function(){var t=e(this.isotope.element);return this.isotope.size&&t&&t.innerHeight!=this.isotope.size.innerHeight},o._getMeasurement=function(){this.isotope._getMeasurement.apply(this,arguments)},o.getColumnWidth=function(){this.getSegmentSize("column","Width")},o.getRowHeight=function(){this.getSegmentSize("row","Height")},o.getSegmentSize=function(e,t){var i=e+t,o="outer"+t;if(this._getMeasurement(i,o),!this[i]){var s=this.getFirstItemSize();this[i]=s&&s[o]||this.isotope.size["inner"+t]}},o.getFirstItemSize=function(){var t=this.isotope.filteredItems[0];return t&&t.element&&e(t.element)},o.layout=function(){this.isotope.layout.apply(this.isotope,arguments)},o.getSize=function(){this.isotope.getSize(),this.size=this.isotope.size},i.modes={},i.create=function(e,t){function s(){i.apply(this,arguments)}return s.prototype=Object.create(o),s.prototype.constructor=s,t&&(s.options=t),s.prototype.namespace=e,i.modes[e]=s,s},i});
|
|
155
|
+
},{"get-size":"SpQD","outlayer":"k1dT"}],"l7pb":[function(require,module,exports) {
|
|
156
|
+
var define;
|
|
157
|
+
var t;!function(i,o){"function"==typeof t&&t.amd?t(["outlayer/outlayer","get-size/get-size"],o):"object"==typeof module&&module.exports?module.exports=o(require("outlayer"),require("get-size")):i.Masonry=o(i.Outlayer,i.getSize)}(window,function(t,i){"use strict";var o=t.create("masonry");o.compatOptions.fitWidth="isFitWidth";var e=o.prototype;return e._resetLayout=function(){this.getSize(),this._getMeasurement("columnWidth","outerWidth"),this._getMeasurement("gutter","outerWidth"),this.measureColumns(),this.colYs=[];for(var t=0;t<this.cols;t++)this.colYs.push(0);this.maxY=0,this.horizontalColIndex=0},e.measureColumns=function(){if(this.getContainerWidth(),!this.columnWidth){var t=this.items[0],o=t&&t.element;this.columnWidth=o&&i(o).outerWidth||this.containerWidth}var e=this.columnWidth+=this.gutter,h=this.containerWidth+this.gutter,n=h/e,s=e-h%e;n=Math[s&&s<1?"round":"floor"](n),this.cols=Math.max(n,1)},e.getContainerWidth=function(){var t=this._getOption("fitWidth")?this.element.parentNode:this.element,o=i(t);this.containerWidth=o&&o.innerWidth},e._getItemLayoutPosition=function(t){t.getSize();var i=t.size.outerWidth%this.columnWidth,o=Math[i&&i<1?"round":"ceil"](t.size.outerWidth/this.columnWidth);o=Math.min(o,this.cols);for(var e=this[this.options.horizontalOrder?"_getHorizontalColPosition":"_getTopColPosition"](o,t),h={x:this.columnWidth*e.col,y:e.y},n=e.y+t.size.outerHeight,s=o+e.col,r=e.col;r<s;r++)this.colYs[r]=n;return h},e._getTopColPosition=function(t){var i=this._getTopColGroup(t),o=Math.min.apply(Math,i);return{col:i.indexOf(o),y:o}},e._getTopColGroup=function(t){if(t<2)return this.colYs;for(var i=[],o=this.cols+1-t,e=0;e<o;e++)i[e]=this._getColGroupY(e,t);return i},e._getColGroupY=function(t,i){if(i<2)return this.colYs[t];var o=this.colYs.slice(t,t+i);return Math.max.apply(Math,o)},e._getHorizontalColPosition=function(t,i){var o=this.horizontalColIndex%this.cols;o=t>1&&o+t>this.cols?0:o;var e=i.size.outerWidth&&i.size.outerHeight;return this.horizontalColIndex=e?o+t:this.horizontalColIndex,{col:o,y:this._getColGroupY(o,t)}},e._manageStamp=function(t){var o=i(t),e=this._getElementOffset(t),h=this._getOption("originLeft")?e.left:e.right,n=h+o.outerWidth,s=Math.floor(h/this.columnWidth);s=Math.max(0,s);var r=Math.floor(n/this.columnWidth);r-=n%this.columnWidth?0:1,r=Math.min(this.cols-1,r);for(var a=(this._getOption("originTop")?e.top:e.bottom)+o.outerHeight,u=s;u<=r;u++)this.colYs[u]=Math.max(a,this.colYs[u])},e._getContainerSize=function(){this.maxY=Math.max.apply(Math,this.colYs);var t={height:this.maxY};return this._getOption("fitWidth")&&(t.width=this._getContainerFitWidth()),t},e._getContainerFitWidth=function(){for(var t=0,i=this.cols;--i&&0===this.colYs[i];)t++;return(this.cols-t)*this.columnWidth-this.gutter},e.needsResizeLayout=function(){var t=this.containerWidth;return this.getContainerWidth(),t!=this.containerWidth},o});
|
|
158
|
+
},{"outlayer":"k1dT","get-size":"SpQD"}],"U5Zw":[function(require,module,exports) {
|
|
159
|
+
var define;
|
|
160
|
+
var t;!function(o,e){"function"==typeof t&&t.amd?t(["../layout-mode","masonry-layout/masonry"],e):"object"==typeof module&&module.exports?module.exports=e(require("../layout-mode"),require("masonry-layout")):e(o.Isotope.LayoutMode,o.Masonry)}(window,function(t,o){"use strict";var e=t.create("masonry"),i=e.prototype,s={_getElementOffset:!0,layout:!0,_getMeasurement:!0};for(var r in o.prototype)s[r]||(i[r]=o.prototype[r]);var n=i.measureColumns;i.measureColumns=function(){this.items=this.isotope.filteredItems,n.call(this)};var u=i._getOption;return i._getOption=function(t){return"fitWidth"==t?void 0!==this.options.isFitWidth?this.options.isFitWidth:this.options.fitWidth:u.apply(this.isotope,arguments)},e});
|
|
161
|
+
},{"../layout-mode":"Nkzt","masonry-layout":"l7pb"}],"SiBL":[function(require,module,exports) {
|
|
162
|
+
var define;
|
|
163
|
+
var t;!function(e,i){"function"==typeof t&&t.amd?t(["../layout-mode"],i):"object"==typeof exports?module.exports=i(require("../layout-mode")):i(e.Isotope.LayoutMode)}(window,function(t){"use strict";var e=t.create("fitRows"),i=e.prototype;return i._resetLayout=function(){this.x=0,this.y=0,this.maxY=0,this._getMeasurement("gutter","outerWidth")},i._getItemLayoutPosition=function(t){t.getSize();var e=t.size.outerWidth+this.gutter,i=this.isotope.size.innerWidth+this.gutter;0!==this.x&&e+this.x>i&&(this.x=0,this.y=this.maxY);var o={x:this.x,y:this.y};return this.maxY=Math.max(this.maxY,this.y+t.size.outerHeight),this.x+=e,o},i._getContainerSize=function(){return{height:this.maxY}},e});
|
|
164
|
+
},{"../layout-mode":"Nkzt"}],"rlDn":[function(require,module,exports) {
|
|
165
|
+
var define;
|
|
166
|
+
var t;!function(e,o){"function"==typeof t&&t.amd?t(["../layout-mode"],o):"object"==typeof module&&module.exports?module.exports=o(require("../layout-mode")):o(e.Isotope.LayoutMode)}(window,function(t){"use strict";var e=t.create("vertical",{horizontalAlignment:0}),o=e.prototype;return o._resetLayout=function(){this.y=0},o._getItemLayoutPosition=function(t){t.getSize();var e=(this.isotope.size.innerWidth-t.size.outerWidth)*this.options.horizontalAlignment,o=this.y;return this.y+=t.size.outerHeight,{x:e,y:o}},o._getContainerSize=function(){return{height:this.y}},e});
|
|
167
|
+
},{"../layout-mode":"Nkzt"}],"bsRB":[function(require,module,exports) {
|
|
168
|
+
var define;
|
|
169
|
+
var t;!function(e,i){"function"==typeof t&&t.amd?t(["outlayer/outlayer","get-size/get-size","desandro-matches-selector/matches-selector","fizzy-ui-utils/utils","./item","./layout-mode","./layout-modes/masonry","./layout-modes/fit-rows","./layout-modes/vertical"],function(t,r,o,s,n,a){return i(e,t,r,o,s,n,a)}):"object"==typeof module&&module.exports?module.exports=i(e,require("outlayer"),require("get-size"),require("desandro-matches-selector"),require("fizzy-ui-utils"),require("./item"),require("./layout-mode"),require("./layout-modes/masonry"),require("./layout-modes/fit-rows"),require("./layout-modes/vertical")):e.Isotope=i(e,e.Outlayer,e.getSize,e.matchesSelector,e.fizzyUIUtils,e.Isotope.Item,e.Isotope.LayoutMode)}(window,function(t,e,i,r,o,s,n){"use strict";var a=t.jQuery,u=String.prototype.trim?function(t){return t.trim()}:function(t){return t.replace(/^\s+|\s+$/g,"")},h=e.create("isotope",{layoutMode:"masonry",isJQueryFiltering:!0,sortAscending:!0});h.Item=s,h.LayoutMode=n;var l=h.prototype;l._create=function(){for(var t in this.itemGUID=0,this._sorters={},this._getSorters(),e.prototype._create.call(this),this.modes={},this.filteredItems=this.items,this.sortHistory=["original-order"],n.modes)this._initLayoutMode(t)},l.reloadItems=function(){this.itemGUID=0,e.prototype.reloadItems.call(this)},l._itemize=function(){for(var t=e.prototype._itemize.apply(this,arguments),i=0;i<t.length;i++){t[i].id=this.itemGUID++}return this._updateItemsSortData(t),t},l._initLayoutMode=function(t){var e=n.modes[t],i=this.options[t]||{};this.options[t]=e.options?o.extend(e.options,i):i,this.modes[t]=new e(this)},l.layout=function(){this._isLayoutInited||!this._getOption("initLayout")?this._layout():this.arrange()},l._layout=function(){var t=this._getIsInstant();this._resetLayout(),this._manageStamps(),this.layoutItems(this.filteredItems,t),this._isLayoutInited=!0},l.arrange=function(t){this.option(t),this._getIsInstant();var e=this._filter(this.items);this.filteredItems=e.matches,this._bindArrangeComplete(),this._isInstant?this._noTransition(this._hideReveal,[e]):this._hideReveal(e),this._sort(),this._layout()},l._init=l.arrange,l._hideReveal=function(t){this.reveal(t.needReveal),this.hide(t.needHide)},l._getIsInstant=function(){var t=this._getOption("layoutInstant"),e=void 0!==t?t:!this._isLayoutInited;return this._isInstant=e,e},l._bindArrangeComplete=function(){var t,e,i,r=this;function o(){t&&e&&i&&r.dispatchEvent("arrangeComplete",null,[r.filteredItems])}this.once("layoutComplete",function(){t=!0,o()}),this.once("hideComplete",function(){e=!0,o()}),this.once("revealComplete",function(){i=!0,o()})},l._filter=function(t){var e=this.options.filter;e=e||"*";for(var i=[],r=[],o=[],s=this._getFilterTest(e),n=0;n<t.length;n++){var a=t[n];if(!a.isIgnored){var u=s(a);u&&i.push(a),u&&a.isHidden?r.push(a):u||a.isHidden||o.push(a)}}return{matches:i,needReveal:r,needHide:o}},l._getFilterTest=function(t){return a&&this.options.isJQueryFiltering?function(e){return a(e.element).is(t)}:"function"==typeof t?function(e){return t(e.element)}:function(e){return r(e.element,t)}},l.updateSortData=function(t){var e;t?(t=o.makeArray(t),e=this.getItems(t)):e=this.items,this._getSorters(),this._updateItemsSortData(e)},l._getSorters=function(){var t=this.options.getSortData;for(var e in t){var i=t[e];this._sorters[e]=m(i)}},l._updateItemsSortData=function(t){for(var e=t&&t.length,i=0;e&&i<e;i++){t[i].updateSortData()}};var m=function(){return function(t){if("string"!=typeof t)return t;var e=u(t).split(" "),i=e[0],r=i.match(/^\[(.+)\]$/),o=function(t,e){return t?function(e){return e.getAttribute(t)}:function(t){var i=t.querySelector(e);return i&&i.textContent}}(r&&r[1],i),s=h.sortDataParsers[e[1]];return t=s?function(t){return t&&s(o(t))}:function(t){return t&&o(t)}}}();h.sortDataParsers={parseInt:function(t){return parseInt(t,10)},parseFloat:function(t){return parseFloat(t)}},l._sort=function(){if(this.options.sortBy){var t=o.makeArray(this.options.sortBy);this._getIsSameSortBy(t)||(this.sortHistory=t.concat(this.sortHistory));var e=function(t,e){return function(i,r){for(var o=0;o<t.length;o++){var s=t[o],n=i.sortData[s],a=r.sortData[s];if(n>a||n<a){var u=void 0!==e[s]?e[s]:e,h=u?1:-1;return(n>a?1:-1)*h}}return 0}}(this.sortHistory,this.options.sortAscending);this.filteredItems.sort(e)}},l._getIsSameSortBy=function(t){for(var e=0;e<t.length;e++)if(t[e]!=this.sortHistory[e])return!1;return!0},l._mode=function(){var t=this.options.layoutMode,e=this.modes[t];if(!e)throw new Error("No layout mode: "+t);return e.options=this.options[t],e},l._resetLayout=function(){e.prototype._resetLayout.call(this),this._mode()._resetLayout()},l._getItemLayoutPosition=function(t){return this._mode()._getItemLayoutPosition(t)},l._manageStamp=function(t){this._mode()._manageStamp(t)},l._getContainerSize=function(){return this._mode()._getContainerSize()},l.needsResizeLayout=function(){return this._mode().needsResizeLayout()},l.appended=function(t){var e=this.addItems(t);if(e.length){var i=this._filterRevealAdded(e);this.filteredItems=this.filteredItems.concat(i)}},l.prepended=function(t){var e=this._itemize(t);if(e.length){this._resetLayout(),this._manageStamps();var i=this._filterRevealAdded(e);this.layoutItems(this.filteredItems),this.filteredItems=i.concat(this.filteredItems),this.items=e.concat(this.items)}},l._filterRevealAdded=function(t){var e=this._filter(t);return this.hide(e.needHide),this.reveal(e.matches),this.layoutItems(e.matches,!0),e.matches},l.insert=function(t){var e=this.addItems(t);if(e.length){var i,r,o=e.length;for(i=0;i<o;i++)r=e[i],this.element.appendChild(r.element);var s=this._filter(e).matches;for(i=0;i<o;i++)e[i].isLayoutInstant=!0;for(this.arrange(),i=0;i<o;i++)delete e[i].isLayoutInstant;this.reveal(s)}};var d=l.remove;return l.remove=function(t){t=o.makeArray(t);var e=this.getItems(t);d.call(this,t);for(var i=e&&e.length,r=0;i&&r<i;r++){var s=e[r];o.removeFrom(this.filteredItems,s)}},l.shuffle=function(){for(var t=0;t<this.items.length;t++){this.items[t].sortData.random=Math.random()}this.options.sortBy="random",this._sort(),this._layout()},l._noTransition=function(t,e){var i=this.options.transitionDuration;this.options.transitionDuration=0;var r=t.apply(this,e);return this.options.transitionDuration=i,r},l.getFilteredItemElements=function(){return this.filteredItems.map(function(t){return t.element})},h});
|
|
170
|
+
},{"outlayer":"k1dT","get-size":"SpQD","desandro-matches-selector":"PZ9L","fizzy-ui-utils":"PmK6","./item":"Tr1i","./layout-mode":"Nkzt","./layout-modes/masonry":"U5Zw","./layout-modes/fit-rows":"SiBL","./layout-modes/vertical":"rlDn"}],"FkU0":[function(require,module,exports) {
|
|
171
|
+
var define;
|
|
172
|
+
var t;!function(e,o){"function"==typeof t&&t.amd?t(["isotope-layout/js/layout-mode"],o):"object"==typeof module&&module.exports?module.exports=o(require("isotope-layout/js/layout-mode")):o(e.Isotope.LayoutMode)}(window,function(t){"use strict";var e=t.create("horiz",{verticalAlignment:0}),o=e.prototype;return o._resetLayout=function(){this.x=0},o._getItemLayoutPosition=function(t){t.getSize();var e=(this.isotope.size.innerHeight-t.size.outerHeight)*this.options.verticalAlignment,o=this.x;return this.x+=t.size.outerWidth,{x:o,y:e}},o._getContainerSize=function(){return{width:this.x}},o.needsResizeLayout=function(){return this.needsVerticalResizeLayout()},e});
|
|
173
|
+
},{"isotope-layout/js/layout-mode":"Nkzt"}],"bHi6":[function(require,module,exports) {
|
|
174
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=a;var e=o(require("isotope-layout"));require("isotope-horizontal");var t=o(require("../constants/directions")),r=o(require("../lib/proxy"));function o(e){return e&&e.__esModule?e:{default:e}}function a(o,a){var i=r.default.getNodeByInstanceId(a).getDataFromGlobal().globalInstanceData;return new e.default(o,{itemSelector:".storyly__story-group-container",layoutMode:"horiz",originLeft:i.direction===t.default.LTR,getSortData:{order:"[data-sortorder] parseInt"}})}
|
|
175
|
+
},{"isotope-layout":"bsRB","isotope-horizontal":"FkU0","../constants/directions":"w67G","../lib/proxy":"qmVm"}],"kohK":[function(require,module,exports) {
|
|
176
|
+
var global = arguments[3];
|
|
177
|
+
var define;
|
|
178
|
+
var e,t=arguments[3];(function(){"use strict";var r={function:!0,object:!0},i=r[typeof window]&&window||this,n=r[typeof exports]&&exports,a=r[typeof module]&&module&&!module.nodeType&&module,o=n&&a&&"object"==typeof t&&t;!o||o.global!==o&&o.window!==o&&o.self!==o||(i=o);var l=Math.pow(2,53)-1,s=/\bOpera/,b=Object.prototype,p=b.hasOwnProperty,c=b.toString;function u(e){return(e=String(e)).charAt(0).toUpperCase()+e.slice(1)}function d(e){return e=m(e),/^(?:webOS|i(?:OS|P))/.test(e)?e:u(e)}function f(e,t){for(var r in e)p.call(e,r)&&t(e[r],r,e)}function S(e){return null==e?u(e):c.call(e).slice(8,-1)}function x(e){return String(e).replace(/([ -])(?!$)/g,"$1?")}function h(e,t){var r=null;return function(e,t){var r=-1,i=e?e.length:0;if("number"==typeof i&&i>-1&&i<=l)for(;++r<i;)t(e[r],r,e);else f(e,t)}(e,function(i,n){r=t(r,i,n,e)}),r}function m(e){return String(e).replace(/^ +| +$/g,"")}var g=function e(t){var r=i,n=t&&"object"==typeof t&&"String"!=S(t);n&&(r=t,t=null);var a=r.navigator||{},o=a.userAgent||"";t||(t=o);var l,b,p,u,g,O=n?!!a.likeChrome:/\bChrome\b/.test(t)&&!/internal|\n/i.test(c.toString()),y=n?"Object":"ScriptBridgingProxyObject",M=n?"Object":"Environment",E=n&&r.java?"JavaPackage":S(r.java),w=n?"Object":"RuntimeObject",v=/\bJava/.test(E)&&r.java,P=v&&S(r.environment)==M,C=v?"a":"α",B=v?"b":"β",W=r.document||{},k=r.operamini||r.opera,R=s.test(R=n&&k?k["[[Class]]"]:S(k))?R:k=null,A=t,I=[],F=null,T=t==o,G=T&&k&&"function"==typeof k.version&&k.version(),$=h([{label:"EdgeHTML",pattern:"Edge"},"Trident",{label:"WebKit",pattern:"AppleWebKit"},"iCab","Presto","NetFront","Tasman","KHTML","Gecko"],function(e,r){return e||RegExp("\\b"+(r.pattern||x(r))+"\\b","i").exec(t)&&(r.label||r)}),j=function(e){return h(e,function(e,r){return e||RegExp("\\b"+(r.pattern||x(r))+"\\b","i").exec(t)&&(r.label||r)})}(["Adobe AIR","Arora","Avant Browser","Breach","Camino","Electron","Epiphany","Fennec","Flock","Galeon","GreenBrowser","iCab","Iceweasel","K-Meleon","Konqueror","Lunascape","Maxthon",{label:"Microsoft Edge",pattern:"(?:Edge|Edg|EdgA|EdgiOS)"},"Midori","Nook Browser","PaleMoon","PhantomJS","Raven","Rekonq","RockMelt",{label:"Samsung Internet",pattern:"SamsungBrowser"},"SeaMonkey",{label:"Silk",pattern:"(?:Cloud9|Silk-Accelerated)"},"Sleipnir","SlimBrowser",{label:"SRWare Iron",pattern:"Iron"},"Sunrise","Swiftfox","Vivaldi","Waterfox","WebPositive",{label:"Yandex Browser",pattern:"YaBrowser"},{label:"UC Browser",pattern:"UCBrowser"},"Opera Mini",{label:"Opera Mini",pattern:"OPiOS"},"Opera",{label:"Opera",pattern:"OPR"},"Chromium","Chrome",{label:"Chrome",pattern:"(?:HeadlessChrome)"},{label:"Chrome Mobile",pattern:"(?:CriOS|CrMo)"},{label:"Firefox",pattern:"(?:Firefox|Minefield)"},{label:"Firefox for iOS",pattern:"FxiOS"},{label:"IE",pattern:"IEMobile"},{label:"IE",pattern:"MSIE"},"Safari"]),X=V([{label:"BlackBerry",pattern:"BB10"},"BlackBerry",{label:"Galaxy S",pattern:"GT-I9000"},{label:"Galaxy S2",pattern:"GT-I9100"},{label:"Galaxy S3",pattern:"GT-I9300"},{label:"Galaxy S4",pattern:"GT-I9500"},{label:"Galaxy S5",pattern:"SM-G900"},{label:"Galaxy S6",pattern:"SM-G920"},{label:"Galaxy S6 Edge",pattern:"SM-G925"},{label:"Galaxy S7",pattern:"SM-G930"},{label:"Galaxy S7 Edge",pattern:"SM-G935"},"Google TV","Lumia","iPad","iPod","iPhone","Kindle",{label:"Kindle Fire",pattern:"(?:Cloud9|Silk-Accelerated)"},"Nexus","Nook","PlayBook","PlayStation Vita","PlayStation","TouchPad","Transformer",{label:"Wii U",pattern:"WiiU"},"Wii","Xbox One",{label:"Xbox 360",pattern:"Xbox"},"Xoom"]),K=function(e){return h(e,function(e,r,i){return e||(r[X]||r[/^[a-z]+(?: +[a-z]+\b)*/i.exec(X)]||RegExp("\\b"+x(i)+"(?:\\b|\\w*\\d)","i").exec(t))&&i})}({Apple:{iPad:1,iPhone:1,iPod:1},Alcatel:{},Archos:{},Amazon:{Kindle:1,"Kindle Fire":1},Asus:{Transformer:1},"Barnes & Noble":{Nook:1},BlackBerry:{PlayBook:1},Google:{"Google TV":1,Nexus:1},HP:{TouchPad:1},HTC:{},Huawei:{},Lenovo:{},LG:{},Microsoft:{Xbox:1,"Xbox One":1},Motorola:{Xoom:1},Nintendo:{"Wii U":1,Wii:1},Nokia:{Lumia:1},Oppo:{},Samsung:{"Galaxy S":1,"Galaxy S2":1,"Galaxy S3":1,"Galaxy S4":1},Sony:{PlayStation:1,"PlayStation Vita":1},Xiaomi:{Mi:1,Redmi:1}}),N=function(e){return h(e,function(e,r){var i=r.pattern||x(r);return!e&&(e=RegExp("\\b"+i+"(?:/[\\d.]+|[ \\w.]*)","i").exec(t))&&(e=function(e,t,r){var i={"10.0":"10",6.4:"10 Technical Preview",6.3:"8.1",6.2:"8",6.1:"Server 2008 R2 / 7","6.0":"Server 2008 / Vista",5.2:"Server 2003 / XP 64-bit",5.1:"XP",5.01:"2000 SP1","5.0":"2000","4.0":"NT","4.90":"ME"};return t&&r&&/^Win/i.test(e)&&!/^Windows Phone /i.test(e)&&(i=i[/[\d.]+$/.exec(e)])&&(e="Windows "+i),e=String(e),t&&r&&(e=e.replace(RegExp(t,"i"),r)),e=d(e.replace(/ ce$/i," CE").replace(/\bhpw/i,"web").replace(/\bMacintosh\b/,"Mac OS").replace(/_PowerPC\b/i," OS").replace(/\b(OS X) [^ \d]+/i,"$1").replace(/\bMac (OS X)\b/,"$1").replace(/\/(\d)/," $1").replace(/_/g,".").replace(/(?: BePC|[ .]*fc[ \d.]+)$/i,"").replace(/\bx86\.64\b/gi,"x86_64").replace(/\b(Windows Phone) OS\b/,"$1").replace(/\b(Chrome OS \w+) [\d.]+\b/,"$1").split(" on ")[0])}(e,i,r.label||r)),e})}(["Windows Phone","KaiOS","Android","CentOS",{label:"Chrome OS",pattern:"CrOS"},"Debian",{label:"DragonFly BSD",pattern:"DragonFly"},"Fedora","FreeBSD","Gentoo","Haiku","Kubuntu","Linux Mint","OpenBSD","Red Hat","SuSE","Ubuntu","Xubuntu","Cygwin","Symbian OS","hpwOS","webOS ","webOS","Tablet OS","Tizen","Linux","Mac OS X","Macintosh","Mac","Windows 98;","Windows "]);function V(e){return h(e,function(e,r){var i=r.pattern||x(r);return!e&&(e=RegExp("\\b"+i+" *\\d+[.\\w_]*","i").exec(t)||RegExp("\\b"+i+" *\\w+-[\\w]*","i").exec(t)||RegExp("\\b"+i+"(?:; *(?:[a-z]+[_-])?[a-z]+\\d+|[^ ();-]*)","i").exec(t))&&((e=String(r.label&&!RegExp(i,"i").test(r.label)?r.label:e).split("/"))[1]&&!/[\d.]+/.test(e[0])&&(e[0]+=" "+e[1]),r=r.label||r,e=d(e[0].replace(RegExp(i,"i"),r).replace(RegExp("; *(?:"+r+"[_-])?","i")," ").replace(RegExp("("+r+")[-_.]?(\\w)","i"),"$1 $2"))),e})}function z(e){return h(e,function(e,r){return e||(RegExp(r+"(?:-[\\d.]+/|(?: for [\\w-]+)?[ /-])([\\d.]+[^ ();/_-]*)","i").exec(t)||0)[1]||null})}if($&&($=[$]),/\bAndroid\b/.test(N)&&!X&&(l=/\bAndroid[^;]*;(.*?)(?:Build|\) AppleWebKit)\b/i.exec(t))&&(X=m(l[1]).replace(/^[a-z]{2}-[a-z]{2};\s*/i,"")||null),K&&!X?X=V([K]):K&&X&&(X=X.replace(RegExp("^("+x(K)+")[-_.\\s]","i"),K+" ").replace(RegExp("^("+x(K)+")[-_.]?(\\w)","i"),K+" $2")),(l=/\bGoogle TV\b/.exec(X))&&(X=l[0]),/\bSimulator\b/i.test(t)&&(X=(X?X+" ":"")+"Simulator"),"Opera Mini"==j&&/\bOPiOS\b/.test(t)&&I.push("running in Turbo/Uncompressed mode"),"IE"==j&&/\blike iPhone OS\b/.test(t)?(K=(l=e(t.replace(/like iPhone OS/,""))).manufacturer,X=l.product):/^iP/.test(X)?(j||(j="Safari"),N="iOS"+((l=/ OS ([\d_]+)/i.exec(t))?" "+l[1].replace(/_/g,"."):"")):"Konqueror"==j&&/^Linux\b/i.test(N)?N="Kubuntu":K&&"Google"!=K&&(/Chrome/.test(j)&&!/\bMobile Safari\b/i.test(t)||/\bVita\b/.test(X))||/\bAndroid\b/.test(N)&&/^Chrome/.test(j)&&/\bVersion\//i.test(t)?(j="Android Browser",N=/\bAndroid\b/.test(N)?N:"Android"):"Silk"==j?(/\bMobi/i.test(t)||(N="Android",I.unshift("desktop mode")),/Accelerated *= *true/i.test(t)&&I.unshift("accelerated")):"UC Browser"==j&&/\bUCWEB\b/.test(t)?I.push("speed mode"):"PaleMoon"==j&&(l=/\bFirefox\/([\d.]+)\b/.exec(t))?I.push("identifying as Firefox "+l[1]):"Firefox"==j&&(l=/\b(Mobile|Tablet|TV)\b/i.exec(t))?(N||(N="Firefox OS"),X||(X=l[1])):!j||(l=!/\bMinefield\b/i.test(t)&&/\b(?:Firefox|Safari)\b/.exec(j))?(j&&!X&&/[\/,]|^[^(]+?\)/.test(t.slice(t.indexOf(l+"/")+8))&&(j=null),(l=X||K||N)&&(X||K||/\b(?:Android|Symbian OS|Tablet OS|webOS)\b/.test(N))&&(j=/[a-z]+(?: Hat)?/i.exec(/\bAndroid\b/.test(N)?N:l)+" Browser")):"Electron"==j&&(l=(/\bChrome\/([\d.]+)\b/.exec(t)||0)[1])&&I.push("Chromium "+l),G||(G=z(["(?:Cloud9|CriOS|CrMo|Edge|Edg|EdgA|EdgiOS|FxiOS|HeadlessChrome|IEMobile|Iron|Opera ?Mini|OPiOS|OPR|Raven|SamsungBrowser|Silk(?!/[\\d.]+$)|UCBrowser|YaBrowser)","Version",x(j),"(?:Firefox|Minefield|NetFront)"])),(l=("iCab"==$&&parseFloat(G)>3?"WebKit":/\bOpera\b/.test(j)&&(/\bOPR\b/.test(t)?"Blink":"Presto"))||/\b(?:Midori|Nook|Safari)\b/i.test(t)&&!/^(?:Trident|EdgeHTML)$/.test($)&&"WebKit"||!$&&/\bMSIE\b/i.test(t)&&("Mac OS"==N?"Tasman":"Trident")||"WebKit"==$&&/\bPlayStation\b(?! Vita\b)/i.test(j)&&"NetFront")&&($=[l]),"IE"==j&&(l=(/; *(?:XBLWP|ZuneWP)(\d+)/i.exec(t)||0)[1])?(j+=" Mobile",N="Windows Phone "+(/\+$/.test(l)?l:l+".x"),I.unshift("desktop mode")):/\bWPDesktop\b/i.test(t)?(j="IE Mobile",N="Windows Phone 8.x",I.unshift("desktop mode"),G||(G=(/\brv:([\d.]+)/.exec(t)||0)[1])):"IE"!=j&&"Trident"==$&&(l=/\brv:([\d.]+)/.exec(t))&&(j&&I.push("identifying as "+j+(G?" "+G:"")),j="IE",G=l[1]),T){if(u="global",g=null!=(p=r)?typeof p[u]:"number",/^(?:boolean|number|string|undefined)$/.test(g)||"object"==g&&!p[u])S(l=r.runtime)==y?(j="Adobe AIR",N=l.flash.system.Capabilities.os):S(l=r.phantom)==w?(j="PhantomJS",G=(l=l.version||null)&&l.major+"."+l.minor+"."+l.patch):"number"==typeof W.documentMode&&(l=/\bTrident\/(\d+)/i.exec(t))?(G=[G,W.documentMode],(l=+l[1]+4)!=G[1]&&(I.push("IE "+G[1]+" mode"),$&&($[1]=""),G[1]=l),G="IE"==j?String(G[1].toFixed(1)):G[0]):"number"==typeof W.documentMode&&/^(?:Chrome|Firefox)\b/.test(j)&&(I.push("masking as "+j+" "+G),j="IE",G="11.0",$=["Trident"],N="Windows");else if(v&&(A=(l=v.lang.System).getProperty("os.arch"),N=N||l.getProperty("os.name")+" "+l.getProperty("os.version")),P){try{G=r.require("ringo/engine").version.join("."),j="RingoJS"}catch(L){(l=r.system)&&l.global.system==r.system&&(j="Narwhal",N||(N=l[0].os||null))}j||(j="Rhino")}else"object"==typeof r.process&&!r.process.browser&&(l=r.process)&&("object"==typeof l.versions&&("string"==typeof l.versions.electron?(I.push("Node "+l.versions.node),j="Electron",G=l.versions.electron):"string"==typeof l.versions.nw&&(I.push("Chromium "+G,"Node "+l.versions.node),j="NW.js",G=l.versions.nw)),j||(j="Node.js",A=l.arch,N=l.platform,G=(G=/[\d.]+/.exec(l.version))?G[0]:null));N=N&&d(N)}if(G&&(l=/(?:[ab]|dp|pre|[ab]\d+pre)(?:\d+\+?)?$/i.exec(G)||/(?:alpha|beta)(?: ?\d)?/i.exec(t+";"+(T&&a.appMinorVersion))||/\bMinefield\b/i.test(t)&&"a")&&(F=/b/i.test(l)?"beta":"alpha",G=G.replace(RegExp(l+"\\+?$"),"")+("beta"==F?B:C)+(/\d+\+?/.exec(l)||"")),"Fennec"==j||"Firefox"==j&&/\b(?:Android|Firefox OS|KaiOS)\b/.test(N))j="Firefox Mobile";else if("Maxthon"==j&&G)G=G.replace(/\.[\d.]+/,".x");else if(/\bXbox\b/i.test(X))"Xbox 360"==X&&(N=null),"Xbox 360"==X&&/\bIEMobile\b/.test(t)&&I.unshift("mobile mode");else if(!/^(?:Chrome|IE|Opera)$/.test(j)&&(!j||X||/Browser|Mobi/.test(j))||"Windows CE"!=N&&!/Mobi/i.test(t))if("IE"==j&&T)try{null===r.external&&I.unshift("platform preview")}catch(L){I.unshift("embedded")}else(/\bBlackBerry\b/.test(X)||/\bBB10\b/.test(t))&&(l=(RegExp(X.replace(/ +/g," *")+"/([.\\d]+)","i").exec(t)||0)[1]||G)?(N=((l=[l,/BB10/.test(t)])[1]?(X=null,K="BlackBerry"):"Device Software")+" "+l[0],G=null):this!=f&&"Wii"!=X&&(T&&k||/Opera/.test(j)&&/\b(?:MSIE|Firefox)\b/i.test(t)||"Firefox"==j&&/\bOS X (?:\d+\.){2,}/.test(N)||"IE"==j&&(N&&!/^Win/.test(N)&&G>5.5||/\bWindows XP\b/.test(N)&&G>8||8==G&&!/\bTrident\b/.test(t)))&&!s.test(l=e.call(f,t.replace(s,"")+";"))&&l.name&&(l="ing as "+l.name+((l=l.version)?" "+l:""),s.test(j)?(/\bIE\b/.test(l)&&"Mac OS"==N&&(N=null),l="identify"+l):(l="mask"+l,j=R?d(R.replace(/([a-z])([A-Z])/g,"$1 $2")):"Opera",/\bIE\b/.test(l)&&(N=null),T||(G=null)),$=["Presto"],I.push(l));else j+=" Mobile";(l=(/\bAppleWebKit\/([\d.]+\+?)/i.exec(t)||0)[1])&&(l=[parseFloat(l.replace(/\.(\d)$/,".0$1")),l],"Safari"==j&&"+"==l[1].slice(-1)?(j="WebKit Nightly",F="alpha",G=l[1].slice(0,-1)):G!=l[1]&&G!=(l[2]=(/\bSafari\/([\d.]+\+?)/i.exec(t)||0)[1])||(G=null),l[1]=(/\b(?:Headless)?Chrome\/([\d.]+)/i.exec(t)||0)[1],537.36==l[0]&&537.36==l[2]&&parseFloat(l[1])>=28&&"WebKit"==$&&($=["Blink"]),T&&(O||l[1])?($&&($[1]="like Chrome"),l=l[1]||((l=l[0])<530?1:l<532?2:l<532.05?3:l<533?4:l<534.03?5:l<534.07?6:l<534.1?7:l<534.13?8:l<534.16?9:l<534.24?10:l<534.3?11:l<535.01?12:l<535.02?"13+":l<535.07?15:l<535.11?16:l<535.19?17:l<536.05?18:l<536.1?19:l<537.01?20:l<537.11?"21+":l<537.13?23:l<537.18?24:l<537.24?25:l<537.36?26:"Blink"!=$?"27":"28")):($&&($[1]="like Safari"),l=(l=l[0])<400?1:l<500?2:l<526?3:l<533?4:l<534?"4+":l<535?5:l<537?6:l<538?7:l<601?8:l<602?9:l<604?10:l<606?11:l<608?12:"12"),$&&($[1]+=" "+(l+="number"==typeof l?".x":/[.+]/.test(l)?"":"+")),"Safari"==j&&(!G||parseInt(G)>45)?G=l:"Chrome"==j&&/\bHeadlessChrome/i.test(t)&&I.unshift("headless")),"Opera"==j&&(l=/\bzbov|zvav$/.exec(N))?(j+=" ",I.unshift("desktop mode"),"zvav"==l?(j+="Mini",G=null):j+="Mobile",N=N.replace(RegExp(" *"+l+"$"),"")):"Safari"==j&&/\bChrome\b/.exec($&&$[1])?(I.unshift("desktop mode"),j="Chrome Mobile",G=null,/\bOS X\b/.test(N)?(K="Apple",N="iOS 4.3+"):N=null):/\bSRWare Iron\b/.test(j)&&!G&&(G=z("Chrome")),G&&0==G.indexOf(l=/[\d.]+$/.exec(N))&&t.indexOf("/"+l+"-")>-1&&(N=m(N.replace(l,""))),N&&-1!=N.indexOf(j)&&!RegExp(j+" OS").test(N)&&(N=N.replace(RegExp(" *"+x(j)+" *"),"")),$&&!/\b(?:Avant|Nook)\b/.test(j)&&(/Browser|Lunascape|Maxthon/.test(j)||"Safari"!=j&&/^iOS/.test(N)&&/\bSafari\b/.test($[1])||/^(?:Adobe|Arora|Breach|Midori|Opera|Phantom|Rekonq|Rock|Samsung Internet|Sleipnir|SRWare Iron|Vivaldi|Web)/.test(j)&&$[1])&&(l=$[$.length-1])&&I.push(l),I.length&&(I=["("+I.join("; ")+")"]),K&&X&&X.indexOf(K)<0&&I.push("on "+K),X&&I.push((/^on /.test(I[I.length-1])?"":"on ")+X),N&&(l=/ ([\d.+]+)$/.exec(N),b=l&&"/"==N.charAt(N.length-l[0].length-1),N={architecture:32,family:l&&!b?N.replace(l[0],""):N,version:l?l[1]:null,toString:function(){var e=this.version;return this.family+(e&&!b?" "+e:"")+(64==this.architecture?" 64-bit":"")}}),(l=/\b(?:AMD|IA|Win|WOW|x86_|x)64\b/i.exec(A))&&!/\bi686\b/i.test(A)?(N&&(N.architecture=64,N.family=N.family.replace(RegExp(" *"+l),"")),j&&(/\bWOW64\b/i.test(t)||T&&/\w(?:86|32)$/.test(a.cpuClass||a.platform)&&!/\bWin64; x64\b/i.test(t))&&I.unshift("32-bit")):N&&/^OS X/.test(N.family)&&"Chrome"==j&&parseFloat(G)>=39&&(N.architecture=64),t||(t=null);var H={};return H.description=t,H.layout=$&&$[0],H.manufacturer=K,H.name=j,H.prerelease=F,H.product=X,H.ua=t,H.version=j&&G,H.os=N||{architecture:null,family:null,version:null,toString:function(){return"null"}},H.parse=e,H.toString=function(){return this.description||""},H.version&&I.unshift(G),H.name&&I.unshift(j),N&&j&&(N!=String(N).split(" ")[0]||N!=j.split(" ")[0]&&!X)&&I.push(X?"("+N+")":"on "+N),I.length&&(H.description=I.join(" ")),H}();"function"==typeof e&&"object"==typeof e.amd&&e.amd?(i.platform=g,e(function(){return g})):n&&a?f(g,function(e,t){n[t]=e}):i.platform=g}).call(this);
|
|
179
|
+
},{}],"PYdG":[function(require,module,exports) {
|
|
180
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=o;var e=r(require("platform"));function r(e){return e&&e.__esModule?e:{default:e}}function o(){var r=(e.default.name||"").toLocaleLowerCase().replace(" ","_").replace("_mobile",""),o=e.default.os;return{os:{name:(o.family||"").toLocaleLowerCase().replace(" ","_"),version:o.version},browser:{name:r,version:e.default.version}}}
|
|
181
|
+
},{"platform":"kohK"}],"irwm":[function(require,module,exports) {
|
|
182
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.trashIcon=exports.shoppingBagIcon=exports.embedRePlayIcon=exports.embedPlayIcon=exports.accessibilityIcon=exports.checkIconGradient=exports.xIcon=exports.checkIcon=exports.loadingIcon=exports.sendIcon=exports.userPropImage=exports.copyIcon=exports.arrowRight=exports.chevronRight=exports.chevronLeft=void 0;var n=function(n){return'<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path d="M15 18L9 12L15 6" stroke="'.concat(n,'" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>\n</svg>\n')};exports.chevronLeft=n;var e=function(n){return'<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path d="M9 18L15 12L9 6" stroke="'.concat(n,'" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>\n</svg>\n')};exports.chevronRight=e;var t=function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"#000";return'\n <svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path d="M2.66669 8H13.3334" stroke="'.concat(n,'" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>\n <path d="M9.33331 4L13.3333 8L9.33331 12" stroke="').concat(n,'" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>\n </svg>')};exports.arrowRight=t;var o=function(n){return'<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path fill-rule="evenodd" clip-rule="evenodd" d="M3 4C3 3.44772 3.44772 3 4 3H13C13.5523 3 14 3.44772 14 4V5C14 5.55228 14.4477 6 15 6C15.5523 6 16 5.55228 16 5V4C16 2.34315 14.6569 1 13 1H4C2.34315 1 1 2.34315 1 4V13C1 14.6569 2.34315 16 4 16H5C5.55228 16 6 15.5523 6 15C6 14.4477 5.55228 14 5 14H4C3.44772 14 3 13.5523 3 13V4ZM11 8C9.34315 8 8 9.34315 8 11V20C8 21.6569 9.34315 23 11 23H20C21.6569 23 23 21.6569 23 20V11C23 9.34315 21.6569 8 20 8H11ZM10 11C10 10.4477 10.4477 10 11 10H20C20.5523 10 21 10.4477 21 11V20C21 20.5523 20.5523 21 20 21H11C10.4477 21 10 20.5523 10 20V11Z" fill="url(#paint0_linear_336_5910_'.concat(n,')"/>\n<defs>\n<linearGradient id="paint0_linear_336_5910_').concat(n,'" x1="23" y1="12" x2="1" y2="12" gradientUnits="userSpaceOnUse">\n<stop stop-color="#7A4BFF"/>\n<stop offset="1" stop-color="#00E0E4"/>\n</linearGradient>\n</defs>\n</svg>\n\n')};exports.copyIcon=o;var r="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAL4AAAC8CAYAAADGvBSWAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAhGVYSWZNTQAqAAAACAAFARIAAwAAAAEAAQAAARoABQAAAAEAAABKARsABQAAAAEAAABSASgAAwAAAAEAAgAAh2kABAAAAAEAAABaAAAAAAAAANgAAAABAAAA2AAAAAEAA6ABAAMAAAABAAEAAKACAAQAAAABAAAAvqADAAQAAAABAAAAvAAAAAAZsGcGAAAACXBIWXMAACE4AAAhOAFFljFgAAABWWlUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iWE1QIENvcmUgNi4wLjAiPgogICA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPgogICAgICA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIgogICAgICAgICAgICB4bWxuczp0aWZmPSJodHRwOi8vbnMuYWRvYmUuY29tL3RpZmYvMS4wLyI+CiAgICAgICAgIDx0aWZmOk9yaWVudGF0aW9uPjE8L3RpZmY6T3JpZW50YXRpb24+CiAgICAgIDwvcmRmOkRlc2NyaXB0aW9uPgogICA8L3JkZjpSREY+CjwveDp4bXBtZXRhPgoZXuEHAAAXbUlEQVR4Ae2dfewlVXnH77qyK7LrLi+uWDDLosHi8qJdQNIWWUxJq13EqhArICW6qbFN7B82GpMaxLZpoklt2iataNoCahW1xaWFxsbdlTZBgbaw5UWqLBsFfFlell0WF1m338/9zfnt3Htn5s7MnTnnzNznSZ7fzD1z5pzn+Z7vPHPmzJzzWzIwmRmBQ4cOrVEhb5CeLT1V+grpKukK6ZHSZdKl0iWJajPcZ3uIPxK26EHpc9Jnpfuke6Tfl94vvUP6zSVLlvxYW5MZEKAhTEoiIIIfo6yXSC+Qni49QbpS+gKpT/m5KtsrfUS6Q7pVeqMuiCe0NSmBgBG/ACQRfYMOXyXdKF0nfbE0Ztkv43ZKt0n/ThfCXdqaZCBgxE+BIqKv1s8PSN8ufbWULkqXhS7Td6Rfkf6FLoSnuuxMk7bPPfFFdvrj10g3SY+V9hUTnh8el94s/aguAp4b5lb62siFDZr01T+pTBdJ+0z2PBzcRbBFGT44j88Gc0V8Ef531NAfkb5KOle+y9884SL4rvRPdQH8fV6mvqX3vvFF9pVqtGulF0tf1LcGbNifn6q8m6SbdRHsbbjsqIrrLfFFeMbTPyM9V+p7uDGqRq5hDMOlt0vfqwuA9we9k94RX4TnJdL10lOkvfPPMwPpBj0ovUIXAC/PeiO9IYYI/zq1yg1SIn1v/IqEaVwARP7LdQH8dyQ2zWRG5wkiwjMc+TXpmdLO+zNTa7Z/MhfA3dK36ALo9HBoZ/u+IvwR0hvVCA9LXys10guElgWMwfphsKcNWq6vteI7SXwB/iEhwqjDO6Sd9KG1FvVTMJiD/d6kLfzU2mAtnYqSAvmV8v3r0nUNYmBFzY7AThVxobo/35u9KD8ldCZaivSfFiSMMBjp/XCjSi20yYNJG1U5L1je6CO+wGSUZpuUb95N4keAuQIbFf2jHv+POuKL9NcIxB1SI338hHcW0lY7krZzadFto4z4Ao3PDL4lJdqbdBcBov7rFf2j+/whuogv0p8nsH4kNdJ3l/DOctrwR0mburQotlERXwBdLVS2SY+UmvQDAdpyW9K20XgUTVdHwGwTKudHg4wZ0gYC29Xt2dhGwVXLDE58Ef4oGX2vdG1V4y1/JxHYJavX6wJ4JqT1Qbs6Ij0vpB6VGulDssBv3bT1o0nb+605VVsw4stxHmLvk74kZY/tzgcCtPl9CQeCeByE+HL4zfJ2q3RZEK+t0hgQoO23Jlzwbo934svRy+TlFulS795ahbEhAAe2JJzwaptX4svBzfLuOqnXer0iapVVRQAuXJdwo+q5tfN7G9WRY5fLyn+QGulrN1evT2Se75Ua7WEWXevihfgi/dvkCZNGjPStN2mnK4D8l4j8X23bi9aJL9L/hpxg9S7r07fdmv0o/6Dc2CTy39qmO60SX6RfL+P/R/rCNp2wsnuHwPPy6LUiPy82W5HWiC/SHyeLd0ljX2G4FWCt0JkR2K8S1or8u2cuKaOAVogv0jMJ+QdS+44+A3RLKo0Ak1pOFPl/VvqMkhnbeti8U/Ub6Us2gmXLRQAOwaXGpXHiK9r/raw8o3FLrcB5ReCMhFON+t9oV0cG/ras+5y00XIb9dgK6yICh2T0ZeryfKEp4xsjqEi/TkaxCoKN4DTVOlZOGgFGek4R+XemE+vuN0n8x2TE8XUNsfMMgRII/FDEf3mJfFOzNNLHV7T/R9VkpJ8Kt2WYEYHjxbVGujszR3wZsknOsGjrzGXNCIqdPh8I0N9n0Vq+BqgtM5FVpF+ump+U2uTw2k1gJ9ZA4Fmdc7TIf6DGucNTZu3q3KJSjPR10bfz6iIA5+BebalNfEV7ZlFtrF2znWgIzIbAxoSDtUqp1dVRhVww/LNgVjwzMQRCIcAKbavV5eFz5kpSN+LzZG2krwS1ZW4BAThYa5SncsRXtF+ryh6S1r1oWvDfipxjBIj2Jyvq76qCQR3yMoxU57wqdlleQ6AsAnCx8tBmJQIr2r9VlZxW1iLLZwh4QuC0hJulq6vU1VHhu1XysaVLt4yGgD8Edqu789Ky1ZWO+CL9+1Wokb4sspbPNwLHJRwtVW/piK9CGb5cVapUy2QIhEFgj6L+6jJVl4r4Iv2HVJiRvgyilickAqsSrk61oVTEV2FPqyQbt58Kp2WIAIG9ivpTFyKeGvFF+t810kfQnGZCWQRWJpwtzD814quQx1SCfWtfCKMdjAyBqRNWCiO+SH+hkT6yJjVzyiDAhBW4myuFEV8n36czT8092w4YAvEicL/6+q/JMy+X+CI9K6GxoE9unrxCLd0QiAABZmqtEfl56TohRV2dP1duI/0EZJbQEQTgLhzOlFxiK+LzrfOKzLMs0RDoBgL7FPEzh+EzI75I/w75ZaTvRuOalfkIrEi4PJEjM+Ir853KuWEityUYAt1D4C5F/bPGzc4jPqvT2opo42jZ7y4i8LyIz+rdIzLR1VG036wcRvoRmOxHhxF4YcLpERcmIr4y3aMcp4/k8vzjgFZN+c63B4PdjwwGe5/IrvyCd+k/Qx+Tfayp1Ee+u2AH2zw7mqqr6XKOO2EwQE9SS54ctDWb9qxWeTsU9UdW8M6K7MFeWEH4//ynweABkT6kQPJvfH4wgPBdFYIGCpYrFSDe+vsL2676M6PdE5weIb6i/SZVMJI2Y4WlT4ds//xX4SPr4yILdnAR9kXA9kufGAwuFvm5CzQtru3Gy+WOvFxLP/3CqwaDdbrrcAEGEro7/EO5m1394yT/PXfA59YBxzakODv6RHqHJz7dpAv60j9sh4BZbefSHtoxGPyH7uS/eM5gcLb+B2agCwBuLxJ//OH2XAeUz+0dt4aP9Pjbt0g/3oaQny5cKKHbFfCuPsLtReLrVsCNaJVvUGiM0H16fN6pqOQilG8MfNbHc0vIZ5eAd1VmZy12ttJdnfeoASZGedpulEenPEByW6R/ON43pe/YpED8POH2fMb5C/3VvDwxpRNMGBWje5ElHDtB/e5QAvkZxHijRuY8CtyG43raGX2QvYgE38LIQ55AevqkTZM8q76f5Njxq7+1QPqsc2JNAy8uVC4AupHjEjLiO1sINNjno21dndrC8Qnin5bKEMUukd4XMIzmZMmr9UDWVYH8WcRvuku3TBfaePR+TqS+e3t+9xHSc7enjT3KelfXsKujvg99/VLLMrgTfWx9kb7IlxhsKLKv6Jgv26mHEZtxIWgwjJp3oeWlj5fT4O+j4bqGNX/uHm4Zv/fev2/QISsqQgS4IIoiOlHfs8BxuL64+OubPBtg1c0JAr7uOhXgHHLdjeqcVeFEy5qBACMlDMvysO4e2hiJ4naf1Q3IKMKS/CAw5Loj/jo/dfavFvqpt3x2gfBp7yC/GzPnAXPOv5VJQxN6/yQMcH187y+uQnvfRP2QnjeRRUOy1OPyBXiYa8LNvpUxHMR5gZ5yj5JnLvL3zclW/any+t3dGVo1yAovgwAfrB1FxD+vTG7LM4oAffqqEdx9Jjxakv0KgMB5EH/k450ARnSyyrrfF3HBmARH4FyI7/fdWXCfmzEgr1/Pdz3v/9TC57dZNeWdl5XX0lpD4HSIv7a14ntccN7LF4iPuO3Cr8N/8847nMP2PCCwFuJH96mCB8dnriLvxYz7NsZtxyvKO288n/1uFYHVjOasbLWKnhbOy6msrxwhfB7pgWL88+qy8FDmPfroC+GF2K/oq1GT2gisJOLriwqTqgjUfRtb52tPZk1BfLpJKF89hpxJVRWrCPMfCfGXhzSsq31eCFw1ejO/oOoFA8GzRpBIM/LXZu5yiL+09ukNnJj3HTxFB5qUXNqrN2k+T1kbycdnC1Ukj/SuDCO/Q6LydinE51PNIEKfNauf7IypGlHdeb62jszTyI8fVb/VmUZ652OXyR/wbr+Eh1vvxMdhSF/0EAiZYic+5MPOKz66MMcVEjJOj3+M3mB/na8zy5I+TX72x2dBueMht0Wr3RXd7Vu2eUj8lus4XDzRnUnGvOqfdrXnjYMfLi2uPQhe58F13IuqpHfnc9EhsZH/WF38eQIfsLvqc09eeVXSvXZ19onwLiLmGUmkZIJ3CDDybPKVPo30YFKES4zdHu56RXdufObOX/W7pxnbxG/EzzPWdQtYaq5Ly3jk+VMnvQzp09HcRfjxulx6Ou94Ht+/eefAKm55AvFRLhDu9EXTFfPKqJpOH/+Q1Hs/P20oZO9a1yZt/6z7VUnvSO1IPl6/S3f5xo/7/s0aPoyAsc5PUWSf1hto0O5DED+40FA86LCkNSBNGyUJbnCDBlQlvavakdqR3KW7bV66O+57SxQnorOkCGvqsI5R0UXQtn1RRHwAQFlcFNJza5yHNd3rkt6Romvkp23dIIDr3jhfPG+H6+nQ1fEiLDxU9KCDEVwAt2oOa9H4vhdjW65kVtI78yB/0QOvyxfDlpE8CE9/3313FMiuYVfnoCr38vaW2x0KubkVA0KeMOzJ8oF9lKZI77CZFvldvpBb995m2jC2JxsPMpx5wFNli9Vwy+Nh1jXY4oHUDg86aN+kadI7fGKO/Mw648G2iPRuZK/ohZfztYHtAfr4+6UrGyischHcogElr1sD8ad1jSpXGvCEtkjvXHKBJLYH228X3NmxnSDoeRh7PxF/nwMuxLbozR5dor5I26R3OMUW+QleRe3Iy0qIT8T3KPsg/lMeK5yoyrPDE/X7SPBFeudLTOQv+h6HoWsifQB5CuLvClDx3FTpm/QO2FjI/3TBXbvobu/8aGm7C+IX/C+Qlqqdk2JDkd7B6/r87nds24B3+x0Q//bYAOmDPaFJ3wcMW/Thdoh/W4sVzGXRRvrom/02/jvEMzLz+ehN7YiBRvroG+p5OE/ER4KO7CyY0P2/RvpOtOGQ6474D3fC5IiNNNJH3Dijpj3MT0f8O0eP2a8qCBjpq6AVPO+Q6474twQ3p6MGGOk713BDrjvi3yzzvX2e3Dmocgw20ucAE28yHIfrC10d/u+n9p8kwaQcAkb6cjhFluvJhOuLfXzsuzcyI6M1x0gfbdNMM2yR466rwwlbpp01j8fHvyHvEunHbZ/H9hvzeZHjaeJrwl9c/XyfDZc3wT09Ra5LpKfB8/7tUJ/mOIwRu+gn/Xs4PpRF4qvvw3d0e5J0b5uiD5WYje+L/HwimyVMj4T8XSI9mGE3s56yZE6Jvyfh+BASZmClhQ/WNC3An+RFWixgAsOXPjEYnKlvtpmonhbm7hZdNOm8ZfaZ/Z83cymPQOlyOTfv/HS+GPbBzpf4Clwl/Bn5GHOc+H+tArwSn9XTIHAeQJA/i3iXa6HWJolPxEfzpkGWALYTWQg0vohPm3LXjkTg9qKMEF+3gpv1z2/5YG0kfTF3CzuQl4aIIVry/Tp3mLyLsAX3vRYJ1lXX6C9jYBbBmXII6YumHXrscvFh2nD83vmTRfD7ddDjzXBhASkibRFIzuA2t0TDi/XPG1j3pW/kd6Qv6lrWxfY5RXaegaoKd3tPAqdHZPHhNpX6l6l9L7ttNkpVB4hCrOfTBkGq2tJUfrpw+BRwqt+EK6ywQbt7kglOZy4Wq+7Oz2RQ1t2gVTuJ+IxGlOn20Mdvew0WbtUot220S8KFC+F5aGfbptBu119TvgZsq/ofYsqXPpGTbs4R46l55L5bGTeMZ277N4DQz2a5CQjHAqN0OYomLLdpE88evh4E2/QjprI9kx7X4fKE5BH/z5TzxoncnhIAh2UnAi094cnL+auG7g0LAnvs4gAyXJ6QzK4OudTd2avNiokzLMEQGEOArk7ewy1BjOcmulyeCY+V+9TNWTlm7vBnEfGvV47Ls06yNEOgIwjcIOJfkWVrEfGP0wk/lubmySrQ0gyBSBDg25w1Iv7uLHuyhjOH+ZITHsg6ydIMgQ4g8EAe6bE9l/iJYx/ogINmoiGQhUAhd6d2Y/SQ+5hKPT6rZEszBCJF4IeK9i8vsm1axOfcq4sKsGOGQIQIXD3NpqkRnwIU9Z/WJnNYaFoFdtwQ8IzAXkX7l0yrs0zEp4w/mVaQHTcEIkGgFFdLRXwcUtRn6bVVkThnZhgCWQgwy2p11oHxtLIRn/M+Mn6y/TYEIkOgNEdLR3wcVNT/iTa82DIxBGJDYLei/UvLGlUl4lPm5rIFWz5DwDMClbhZKeLjiKK+PhgenObZKavOEChC4H8V7SvNGqxD/LWy4CFp1btFkeF2zBCoiwDLX54s4u+qUkBl8iYVfLlKJZbXEGgRgS9XJT22VI74nKTuDhcMw5v2UgtATEIhwJyR1SI+Ub+SVI74lJ5U9E7t8umniSEQAgG49846pMfYWhHfeanI/w3tX+B+29YQ8IjAVpH+jXXrm5X4y1Xxk1J/C0XU9dTO6xMCWoJgcLSIf6CuU7W6Oq6ypOJL9du6PA4U27aNAFy7dBbSY+BMxKcAGcDSbF9k38QQ8IDAFxPOzVTVTF2ddM3q79uElTQgtt8GAlMnmJStdOaIn6rol7XPgrMmhkAbCMAtONaINEZ83X52yqJ3S62/30jTWCEpBODUuxOOpZLr7zZGfEyQYV/Q5jP1zbEzDYFMBK5NuJV5sE5iY338dOXq77Ne4RnpNNs3BGoicI9If2bNc3NPa4v4R6jGH0jX5NZsBwyB6QiwoNmJIj6rdzcqjXZ1nGWJoev1e79Ls60hUBEBuLO+DdJjRyvEp2AZzNJt50htpAdATKogAGfOSThU5bzSeVsjPhbI8Hu1uUh6kN8mhkAJBODKpoQ7JbLXy9Iq8TFJDuh/nAwulVb+dJTzTeYKATjC5wj/1rbXrRMfB+TIV7W5UmrkBxCTLATgxpUJV7KON5rmhfhYLIdu0OZ9UiM/gJikEYAT70s4kk5vbb+V4cwiazXGf5mOXyf1dtEV2WPHgiMA6Xkr+zmflngnPs6J/G/W5mvSpfw2mVsEeJB9i0j/r74RCEJ8nBT5z9Pm36XL+G0ydwg8J49/TaS/LYTnwYiPsyL/K7X5L+nU1W3Jb9IbBFh9+5dE+u+F8igo8XFa5D9KG8b71/LbpPcI7JKHvJF9JqSnwR8wAUB6kkDYHhIIq9sLAttpa9rcS20FlQQnvrNNYGzU/sekNtzpQOnPljb9WNLGUXi1JAorUkYkD728ubOVG1K4dHiXFRF+XaQP8hCbh1t0xMdQkZ8V2r4lPZXfJp1F4H5Z/nqRnhXPopJoujppVABK+hql/bGUsV6TbiFAm32cNoyR9EAZZcRPt7GiP1F/m3RNOt32o0WAySMbRXiifbQSZcRPowWA0pcp7VqpPfimwYlrn7ZhbuzLYic9sEUf8dNtq+jPC6+vS9el020/OAI7ZcGFInywF1JVEYg+4qcdAljpyUr7sLT2uonpMm1/JgRogw/TJl0iPR53KuKnm0jRnwntn5e+TdqpCzjtR0f36dYwx+JdInzjE8F9YNJZ4jtwdAG8Qvt86ckSFJ33x/kV6ZaFnVg6hi8qvx+pjaXM6nykpAGkr5O3G6SMJNA4Js0iAKZguwGsu056oOldhNQd4Gz5db30lD76J598CoR/UHqFyH6Hz4rbrqt3xHeA6QJg/J/lDM+Vdv7O5vzytKUPf7v0vSJ81OPxdfHoLfEdILoAVmv/b6QXS1/k0m2bicBPlXqTdLMIH91nBpkW10zsfSRUAz4l5Z+EHSmMrpL+n9SeAw4TBizA5CowSrDqNelxvfcRHyfHRXeBY5T2SSmLXR0rnTccIPvj0i3SD4rsT2g7VzJvDT7RuLoIGA79uPQ3pX2+CBzZ/0V+/pHI3unhSPkwk8w98dPoJc8Df6C0t0sZFVqWPt7BfSZ0MyrzFemnRHb+KbeJEDDiF9BAF8IGHX6P9A3SddIXS2OW/TJup/Sb0s+K6HfFbGxI24z4FdBPng0u0SkXSE+XnihdIfU9SMBw4z4p/4Ngh3Sr9MZ57KvL71pixK8F2+hJuiCYK3C+9Cwp7w94blgl5aJgNIku01IpeDvM3Za+N8IWPSili/KsFHLvkdIfZzz9Tul2EZxv3k1mQOD/ASx89TeqJHWDAAAAAElFTkSuQmCC";exports.userPropImage=r;var i=function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"#FFF";return'<svg width="20" height="21" viewBox="0 0 20 21" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M0.602285 0.598969C0.41242 0.606084 0.236084 0.698994 0.122945 0.851749C0.00994551 1.00436 -0.0275779 1.20023 0.0212453 1.3838L2.10363 9.18887L11.299 10.5963L2.10506 12.0025L0.0214237 19.8097C-0.0205676 19.9658 -0.000338941 20.1323 0.0777825 20.2737C0.156044 20.4153 0.285921 20.5212 0.440483 20.5689C0.594913 20.6166 0.7619 20.6027 0.906288 20.5298L19.6556 11.1552C19.7944 11.0854 19.9021 10.9667 19.958 10.8218C20.014 10.677 20.014 10.5165 19.958 10.3717C19.9021 10.2269 19.7944 10.1081 19.6556 10.0383L0.906288 0.663649C0.812123 0.616775 0.707495 0.594594 0.602449 0.598919L0.602285 0.598969Z" fill="'.concat(n,'"/>\n</svg>\n')};exports.sendIcon=i;var A=function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"#FFF";return'<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path fill-rule="evenodd" clip-rule="evenodd" d="M13 2C13 1.44772 12.5523 1 12 1C11.4477 1 11 1.44772 11 2V6C11 6.55228 11.4477 7 12 7C12.5523 7 13 6.55228 13 6V2ZM13 18C13 17.4477 12.5523 17 12 17C11.4477 17 11 17.4477 11 18V22C11 22.5523 11.4477 23 12 23C12.5523 23 13 22.5523 13 22V18ZM4.22282 4.22295C4.61335 3.83242 5.24651 3.83242 5.63704 4.22295L8.46704 7.05295C8.85756 7.44347 8.85756 8.07664 8.46704 8.46716C8.07651 8.85768 7.44335 8.85768 7.05282 8.46716L4.22282 5.63716C3.8323 5.24664 3.8323 4.61347 4.22282 4.22295ZM16.9471 15.5329C16.5566 15.1424 15.9234 15.1424 15.5329 15.5329C15.1424 15.9234 15.1424 16.5566 15.5329 16.9471L18.3629 19.7771C18.7534 20.1676 19.3866 20.1676 19.7771 19.7771C20.1676 19.3866 20.1676 18.7534 19.7771 18.3629L16.9471 15.5329ZM1 12C1 11.4477 1.44772 11 2 11H6C6.55228 11 7 11.4477 7 12C7 12.5523 6.55228 13 6 13H2C1.44772 13 1 12.5523 1 12ZM18 11C17.4477 11 17 11.4477 17 12C17 12.5523 17.4477 13 18 13H22C22.5523 13 23 12.5523 23 12C23 11.4477 22.5523 11 22 11H18ZM8.46704 15.5329C8.85756 15.9234 8.85756 16.5566 8.46704 16.9471L5.63704 19.7771C5.24651 20.1676 4.61335 20.1676 4.22282 19.7771C3.8323 19.3866 3.8323 18.7534 4.22282 18.3629L7.05282 15.5329C7.44335 15.1424 8.07651 15.1424 8.46704 15.5329ZM19.7771 5.63716C20.1676 5.24664 20.1676 4.61347 19.7771 4.22295C19.3866 3.83242 18.7534 3.83242 18.3629 4.22295L15.5329 7.05295C15.1424 7.44347 15.1424 8.07664 15.5329 8.46716C15.9234 8.85768 16.5566 8.85768 16.9471 8.46716L19.7771 5.63716Z" fill="'.concat(n,'"/>\n</svg>\n')};exports.loadingIcon=A;var l=function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"#FFF";return'<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M20 7L9 18L4 13" stroke="'.concat(n,'" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"/>\n</svg>')};exports.checkIcon=l;var C=function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"#FFF";return'\n<svg width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path fill-rule="evenodd" clip-rule="evenodd" d="M14.194 3.80598C14.625 4.2369 14.625 4.93557 14.194 5.36649L5.36646 14.1941C4.93554 14.625 4.23687 14.625 3.80595 14.1941C3.37503 13.7632 3.37503 13.0645 3.80595 12.6336L12.6335 3.80598C13.0645 3.37506 13.7631 3.37506 14.194 3.80598Z" fill="'.concat(n,'"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M3.80595 3.80598C4.23687 3.37506 4.93554 3.37506 5.36646 3.80598L14.194 12.6336C14.625 13.0645 14.625 13.7632 14.194 14.1941C13.7631 14.625 13.0645 14.625 12.6335 14.1941L3.80595 5.36649C3.37503 4.93557 3.37503 4.2369 3.80595 3.80598Z" fill="').concat(n,'"/>\n</svg>')};exports.xIcon=C;var d='<svg width="25" height="24" viewBox="0 0 25 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M20.1702 7L9.17023 18L4.17023 13" stroke="url(#paint0_linear_101_13400)" stroke-width="1.70213" stroke-linecap="round" stroke-linejoin="round"/>\n<defs>\n<linearGradient id="paint0_linear_101_13400" x1="20.1702" y1="12.5" x2="4.17023" y2="12.5" gradientUnits="userSpaceOnUse">\n<stop stop-color="#7A4BFF"/>\n<stop offset="1" stop-color="#00E0E4"/>\n</linearGradient>\n</defs>\n</svg>\n';exports.checkIconGradient=d;var s='<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n <rect width="24" height="24" rx="12" fill="white"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M10.1831 11.3257C9.96822 13.792 9.40247 16.1845 8.5206 18.5101C8.30534 19.078 8.59157 19.7137 9.15938 19.9289C9.72731 20.1442 10.3629 19.8579 10.5782 19.2901C11.2023 17.6438 11.6796 15.9665 11.9999 14.2566C12.3203 15.9667 12.7973 17.644 13.4216 19.2901C13.6369 19.8581 14.2725 20.1442 14.8404 19.9289C15.4084 19.7137 15.6945 19.078 15.4792 18.5101C14.5981 16.1856 14.0323 13.7947 13.8172 11.3302C15.1351 11.2655 16.4538 11.1273 17.7724 10.9131C18.3718 10.8157 18.7794 10.25 18.682 9.65063C18.5846 9.05117 18.0188 8.64354 17.4195 8.74095C13.8045 9.32848 10.1891 9.30533 6.57408 8.73999C5.9742 8.64613 5.41079 9.05705 5.31707 9.65693C5.22321 10.2571 5.63413 10.8202 6.23401 10.9141C7.55034 11.1199 8.86642 11.2579 10.183 11.3254L10.1831 11.3257Z" fill="black"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M13.9861 6.27208C13.9861 7.36879 13.0969 8.25789 12.0001 8.25789C10.9033 8.25789 10.0142 7.36876 10.0142 6.27208C10.0142 5.17523 10.9033 4.28613 12.0001 4.28613C13.0969 4.28613 13.9861 5.17526 13.9861 6.27208Z" fill="black"/>\n </svg>';exports.accessibilityIcon=s;var v='\n<svg width="86" height="86" viewBox="0 0 86 86" fill="none" xmlns="http://www.w3.org/2000/svg">\n<circle cx="43" cy="43" r="41.5" fill="white" fill-opacity="0.3" stroke="white" stroke-width="3"/>\n<path d="M34.6241 26.3185C33.2917 25.4937 31.5714 26.452 31.5714 28.019V57.9813C31.5714 59.5483 33.2917 60.5066 34.6241 59.6818L58.8244 44.7007C60.0875 43.9188 60.0875 42.0815 58.8244 41.2996L34.6241 26.3185Z" fill="white"/>\n</svg>\n';exports.embedPlayIcon=v;var p='\n<svg width="86" height="86" viewBox="0 0 86 86" fill="none" xmlns="http://www.w3.org/2000/svg">\n<circle cx="43" cy="43" r="41.5" fill="white" fill-opacity="0.3" stroke="white" stroke-width="3"/>\n<path d="M28.5477 46.4528L28.5464 46.4385L28.5442 46.4244C28.463 45.8964 28.2442 45.4375 27.8786 45.0718C27.5016 44.6949 27.0329 44.5004 26.5 44.5004C25.9368 44.5004 25.4445 44.7016 25.0615 45.1071C24.684 45.5068 24.5065 45.9951 24.5516 46.5407C24.9283 51.3314 26.8761 55.3648 30.3851 58.6171C33.8966 61.8716 38.1105 63.5004 43 63.5004C45.5639 63.5004 47.9728 63.0214 50.2215 62.0601C52.4618 61.1025 54.4239 59.7836 56.1036 58.1039C57.7832 56.4243 59.1021 54.4622 60.0598 52.2219C61.021 49.9732 61.5 47.5643 61.5 45.0004C61.5 42.4365 61.021 40.0276 60.0598 37.7789C59.1021 35.5386 57.7832 33.5765 56.1036 31.8968C54.4239 30.2171 52.4618 28.8983 50.2215 27.9406C47.9895 26.9865 45.5997 26.5075 43.057 26.5005L45.1036 24.4539C45.4701 24.0874 45.65 23.6241 45.65 23.1004C45.65 22.5775 45.4714 22.1094 45.1237 21.7182L45.1042 21.6962L45.0822 21.6767C44.691 21.329 44.2229 21.1504 43.7 21.1504C43.1763 21.1504 42.713 21.3303 42.3464 21.6968L37.0464 26.9968C36.8462 27.1971 36.6841 27.4188 36.5858 27.6647C36.4929 27.8968 36.45 28.144 36.45 28.4004C36.45 28.6567 36.4929 28.904 36.5858 29.1361C36.6841 29.382 36.8462 29.6037 37.0464 29.8039L42.2964 35.0539C42.6839 35.4414 43.1587 35.6504 43.7 35.6504C44.2413 35.6504 44.7161 35.4414 45.1036 35.0539C45.491 34.6665 45.7 34.1917 45.7 33.6504C45.7 33.1091 45.491 32.6343 45.1036 32.2468L43.3574 30.5007C47.3451 30.5255 50.6791 31.9317 53.3914 34.7238C56.1316 37.5446 57.5 40.9602 57.5 45.0004C57.5 49.036 56.0933 52.45 53.2714 55.2718C50.4496 58.0937 47.0356 59.5004 43 59.5004C39.1877 59.5004 35.9255 58.2529 33.1869 55.7559C30.4457 53.2566 28.9026 50.1632 28.5477 46.4528Z" fill="white" stroke="white"/>\n</svg>\n';exports.embedRePlayIcon=p;var h=function(n){return'<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path d="M4 1.33325L2 3.99992V13.3333C2 13.6869 2.14048 14.026 2.39052 14.2761C2.64057 14.5261 2.97971 14.6666 3.33333 14.6666H12.6667C13.0203 14.6666 13.3594 14.5261 13.6095 14.2761C13.8595 14.026 14 13.6869 14 13.3333V3.99992L12 1.33325H4Z" stroke="'.concat(n,'" stroke-width="1.33333" stroke-linecap="round" stroke-linejoin="round"/>\n <path d="M2 4H14" stroke="').concat(n,'" stroke-width="1.33333" stroke-linecap="round" stroke-linejoin="round"/>\n <path d="M10.6668 6.66675C10.6668 7.37399 10.3859 8.05227 9.88578 8.55237C9.38568 9.05246 8.70741 9.33341 8.00016 9.33341C7.29292 9.33341 6.61464 9.05246 6.11454 8.55237C5.61445 8.05227 5.3335 7.37399 5.3335 6.66675" stroke="').concat(n,'" stroke-width="1.33333" stroke-linecap="round" stroke-linejoin="round"/>\n </svg>')};exports.shoppingBagIcon=h;var a=function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"#FF4D50";return'\n<svg width="33" height="33" viewBox="0 0 33 33" fill="none" xmlns="http://www.w3.org/2000/svg">\n <g clip-path="url(#clip0_2997_92830)">\n <g filter="url(#filter0_d_2997_92830)">\n <path fill-rule="evenodd" clip-rule="evenodd" d="M12.789 4.55576C13.1041 4.2406 13.5316 4.06354 13.9773 4.06354H19.3551C19.8008 4.06354 20.2282 4.2406 20.5434 4.55576C20.8586 4.87093 21.0356 5.29839 21.0356 5.7441V7.42465H12.2968V5.7441C12.2968 5.29839 12.4738 4.87093 12.789 4.55576ZM10.2801 7.42465V5.7441C10.2801 4.76353 10.6696 3.82313 11.363 3.12977C12.0563 2.4364 12.9967 2.04688 13.9773 2.04688H19.3551C20.3356 2.04688 21.2761 2.4364 21.9694 3.12977C22.6628 3.82313 23.0523 4.76353 23.0523 5.7441V7.42465H26.0773H28.7662C29.3231 7.42465 29.7745 7.8761 29.7745 8.43299C29.7745 8.98987 29.3231 9.44132 28.7662 9.44132H27.0856V27.2552C27.0856 28.2358 26.6961 29.1762 26.0027 29.8695C25.3094 30.5629 24.369 30.9524 23.3884 30.9524H9.94397C8.96341 30.9524 8.023 30.5629 7.32964 29.8695C6.63628 29.1762 6.24675 28.2358 6.24675 27.2552V9.44132H4.56619C4.00931 9.44132 3.55786 8.98987 3.55786 8.43299C3.55786 7.8761 4.00931 7.42465 4.56619 7.42465H7.25508H10.2801ZM8.26342 9.44132V27.2552C8.26342 27.7009 8.44047 28.1284 8.75564 28.4435C9.07081 28.7587 9.49826 28.9358 9.94397 28.9358H23.3884C23.8341 28.9358 24.2616 28.7587 24.5767 28.4435C24.8919 28.1284 25.069 27.7009 25.069 27.2552V9.44132H22.044H11.2884H8.26342ZM13.9773 14.1469C14.5342 14.1469 14.9856 14.5983 14.9856 15.1552V23.2219C14.9856 23.7788 14.5342 24.2302 13.9773 24.2302C13.4204 24.2302 12.969 23.7788 12.969 23.2219V15.1552C12.969 14.5983 13.4204 14.1469 13.9773 14.1469ZM20.3634 15.1552C20.3634 14.5983 19.912 14.1469 19.3551 14.1469C18.7982 14.1469 18.3468 14.5983 18.3468 15.1552V23.2219C18.3468 23.7788 18.7982 24.2302 19.3551 24.2302C19.912 24.2302 20.3634 23.7788 20.3634 23.2219V15.1552Z" fill="'.concat(n,'"/>\n </g>\n </g>\n <defs>\n <filter id="filter0_d_2997_92830" x="0.868973" y="-0.642014" width="31.5943" height="34.284" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">\n <feFlood flood-opacity="0" result="BackgroundImageFix"/>\n <feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>\n <feOffset/>\n <feGaussianBlur stdDeviation="1.34444"/>\n <feComposite in2="hardAlpha" operator="out"/>\n <feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.1 0"/>\n <feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_2997_92830"/>\n <feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_2997_92830" result="shape"/>\n </filter>\n <clipPath id="clip0_2997_92830">\n <rect width="32.2667" height="32.2667" fill="white" transform="translate(0.533203 0.365234)"/>\n </clipPath>\n </defs>\n</svg>\n')};exports.trashIcon=a;
|
|
183
|
+
},{}],"JpL0":[function(require,module,exports) {
|
|
184
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=o(require("@babel/runtime/helpers/slicedToArray")),t=require("../lib/style"),r=require("../lib/util"),l=require("../lib/icons");function o(e){return e&&e.__esModule?e:{default:e}}var i='\n <div class="storyly__scroll-indicator">\n <div></div>\n </div>',n=function o(n,a){if(a.scrollIndicator&&!(0,r.isMobileView)()){var c,s=n.querySelector(".storyly__groups-list");(c=n.querySelectorAll(".storyly__scroll-indicator")).length&&c.forEach(function(e){return e.remove()});var d=s.scrollWidth,u=s.clientWidth;if(window.addEventListener("resize",(0,r.debounce)(function(){o(n,a)})),!(u>=d)){var f=a.scrollIndicatorOptions,y=f.customLeftIndicator,p=f.customRightIndicator,v=f.indicatorDefaultIconsColor,h=s.firstChild.offsetWidth+2*Number(a.storyGroupMarginHorizontal),m=(0,r.generateHtmlFromTemplate)(i),b=(0,r.generateHtmlFromTemplate)(i),g=(0,e.default)(m.children,1)[0],S=(0,e.default)(b.children,1)[0];if(y)(0,t.setStyle)(g,["background-image","url(".concat(y,")")]);else{var _=(0,r.generateHtmlFromTemplate)((0,l.chevronLeft)(v));g.appendChild(_)}if(p)(0,t.setStyle)(S,["background-image","url(".concat(p,")")]);else{var L=(0,r.generateHtmlFromTemplate)((0,l.chevronRight)(v));S.appendChild(L)}(0,t.setStyle)(s,["overflow-x","auto"]),(0,t.setStyle)(s,["overflow-y","hidden"]),(0,t.setStyle)(m,["opacity","0"]),n.prepend(m),n.appendChild(b),s.addEventListener("scroll",function(){var e=s.scrollWidth,r=s.scrollLeft,l=s.clientWidth;r>0?(0,t.setStyle)(m,["opacity","1"]):(0,t.setStyle)(m,["opacity","0"]),r+l+Number(a.storyGroupMarginHorizontal)>=e?(0,t.setStyle)(b,["opacity","0"]):(0,t.setStyle)(b,["opacity","1"])}),S.addEventListener("click",function(){s.scroll({left:s.scrollLeft+h,behavior:"smooth"})}),g.addEventListener("click",function(){s.scroll({left:s.scrollLeft-h,behavior:"smooth"})})}}},a=n;exports.default=a;
|
|
185
|
+
},{"@babel/runtime/helpers/slicedToArray":"HETk","../lib/style":"vgU2","../lib/util":"PesM","../lib/icons":"irwm"}],"vfVQ":[function(require,module,exports) {
|
|
186
|
+
var define;
|
|
187
|
+
var global = arguments[3];
|
|
188
|
+
var e,t=arguments[3];function s(e,t,s){return t in e?Object.defineProperty(e,t,{value:s,enumerable:!0,configurable:!0,writable:!0}):e[t]=s,e}function a(e){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}!function(t,s){"object"===("undefined"==typeof exports?"undefined":a(exports))&&"undefined"!=typeof module?module.exports=s():"function"==typeof e&&e.amd?e(s):(t="undefined"!=typeof globalThis?globalThis:t||self).Swiper=s()}(this,function(){"use strict";function e(e){return null!==e&&"object"===a(e)&&"constructor"in e&&e.constructor===Object}function t(s={},a={}){Object.keys(a).forEach(i=>{void 0===s[i]?s[i]=a[i]:e(a[i])&&e(s[i])&&Object.keys(a[i]).length>0&&t(s[i],a[i])})}const i={body:{},addEventListener:function(){},removeEventListener:function(){},activeElement:{blur:function(){},nodeName:""},querySelector:function(){return null},querySelectorAll:function(){return[]},getElementById:function(){return null},createEvent:function(){return{initEvent:function(){}}},createElement:function(){return{children:[],childNodes:[],style:{},setAttribute:function(){},getElementsByTagName:function(){return[]}}},createElementNS:function(){return{}},importNode:function(){return null},location:{hash:"",host:"",hostname:"",href:"",origin:"",pathname:"",protocol:"",search:""}};function n(){const e="undefined"!=typeof document?document:{};return t(e,i),e}const r={document:i,navigator:{userAgent:""},location:{hash:"",host:"",hostname:"",href:"",origin:"",pathname:"",protocol:"",search:""},history:{replaceState:function(){},pushState:function(){},go:function(){},back:function(){}},CustomEvent:function(){return this},addEventListener:function(){},removeEventListener:function(){},getComputedStyle:function(){return{getPropertyValue:function(){return""}}},Image:function(){},Date:function(){},screen:{},setTimeout:function(){},clearTimeout:function(){},matchMedia:function(){return{}},requestAnimationFrame:function(e){return"undefined"==typeof setTimeout?(e(),null):setTimeout(e,0)},cancelAnimationFrame:function(e){"undefined"!=typeof setTimeout&&clearTimeout(e)}};function o(){const e="undefined"!=typeof window?window:{};return t(e,r),e}class l extends Array{constructor(e){super(...e||[]),function(e){const t=e.__proto__;Object.defineProperty(e,"__proto__",{get:function(){return t},set:function(e){t.__proto__=e}})}(this)}}function c(e=[]){const t=[];return e.forEach(e=>{Array.isArray(e)?t.push(...c(e)):t.push(e)}),t}function d(e,t){return Array.prototype.filter.call(e,t)}function p(e,t){const s=o(),a=n();let i=[];if(!t&&e instanceof l)return e;if(!e)return new l(i);if("string"==typeof e){const s=e.trim();if(s.indexOf("<")>=0&&s.indexOf(">")>=0){let e="div";0===s.indexOf("<li")&&(e="ul"),0===s.indexOf("<tr")&&(e="tbody"),0!==s.indexOf("<td")&&0!==s.indexOf("<th")||(e="tr"),0===s.indexOf("<tbody")&&(e="table"),0===s.indexOf("<option")&&(e="select");const t=a.createElement(e);t.innerHTML=s;for(let s=0;s<t.childNodes.length;s+=1)i.push(t.childNodes[s])}else i=function(e,t){if("string"!=typeof e)return[e];const s=[],a=t.querySelectorAll(e);for(let i=0;i<a.length;i+=1)s.push(a[i]);return s}(e.trim(),t||a)}else if(e.nodeType||e===s||e===a)i.push(e);else if(Array.isArray(e)){if(e instanceof l)return e;i=e}return new l(function(e){const t=[];for(let s=0;s<e.length;s+=1)-1===t.indexOf(e[s])&&t.push(e[s]);return t}(i))}p.fn=l.prototype;const u={addClass:function(...e){const t=c(e.map(e=>e.split(" ")));return this.forEach(e=>{e.classList.add(...t)}),this},removeClass:function(...e){const t=c(e.map(e=>e.split(" ")));return this.forEach(e=>{e.classList.remove(...t)}),this},hasClass:function(...e){const t=c(e.map(e=>e.split(" ")));return d(this,e=>t.filter(t=>e.classList.contains(t)).length>0).length>0},toggleClass:function(...e){const t=c(e.map(e=>e.split(" ")));this.forEach(e=>{t.forEach(t=>{e.classList.toggle(t)})})},attr:function(e,t){if(1===arguments.length&&"string"==typeof e)return this[0]?this[0].getAttribute(e):void 0;for(let s=0;s<this.length;s+=1)if(2===arguments.length)this[s].setAttribute(e,t);else for(const t in e)this[s][t]=e[t],this[s].setAttribute(t,e[t]);return this},removeAttr:function(e){for(let t=0;t<this.length;t+=1)this[t].removeAttribute(e);return this},transform:function(e){for(let t=0;t<this.length;t+=1)this[t].style.transform=e;return this},transition:function(e){for(let t=0;t<this.length;t+=1)this[t].style.transitionDuration="string"!=typeof e?"".concat(e,"ms"):e;return this},on:function(...e){let[t,s,a,i]=e;function n(e){const t=e.target;if(!t)return;const i=e.target.dom7EventData||[];if(i.indexOf(e)<0&&i.unshift(e),p(t).is(s))a.apply(t,i);else{const e=p(t).parents();for(let t=0;t<e.length;t+=1)p(e[t]).is(s)&&a.apply(e[t],i)}}function r(e){const t=e&&e.target&&e.target.dom7EventData||[];t.indexOf(e)<0&&t.unshift(e),a.apply(this,t)}"function"==typeof e[1]&&([t,a,i]=e,s=void 0),i||(i=!1);const o=t.split(" ");let l;for(let c=0;c<this.length;c+=1){const e=this[c];if(s)for(l=0;l<o.length;l+=1){const t=o[l];e.dom7LiveListeners||(e.dom7LiveListeners={}),e.dom7LiveListeners[t]||(e.dom7LiveListeners[t]=[]),e.dom7LiveListeners[t].push({listener:a,proxyListener:n}),e.addEventListener(t,n,i)}else for(l=0;l<o.length;l+=1){const t=o[l];e.dom7Listeners||(e.dom7Listeners={}),e.dom7Listeners[t]||(e.dom7Listeners[t]=[]),e.dom7Listeners[t].push({listener:a,proxyListener:r}),e.addEventListener(t,r,i)}}return this},off:function(...e){let[t,s,a,i]=e;"function"==typeof e[1]&&([t,a,i]=e,s=void 0),i||(i=!1);const n=t.split(" ");for(let r=0;r<n.length;r+=1){const e=n[r];for(let t=0;t<this.length;t+=1){const n=this[t];let r;if(!s&&n.dom7Listeners?r=n.dom7Listeners[e]:s&&n.dom7LiveListeners&&(r=n.dom7LiveListeners[e]),r&&r.length)for(let t=r.length-1;t>=0;t-=1){const s=r[t];a&&s.listener===a?(n.removeEventListener(e,s.proxyListener,i),r.splice(t,1)):a&&s.listener&&s.listener.dom7proxy&&s.listener.dom7proxy===a?(n.removeEventListener(e,s.proxyListener,i),r.splice(t,1)):a||(n.removeEventListener(e,s.proxyListener,i),r.splice(t,1))}}}return this},trigger:function(...e){const t=o(),s=e[0].split(" "),a=e[1];for(let i=0;i<s.length;i+=1){const n=s[i];for(let s=0;s<this.length;s+=1){const i=this[s];if(t.CustomEvent){const s=new t.CustomEvent(n,{detail:a,bubbles:!0,cancelable:!0});i.dom7EventData=e.filter((e,t)=>t>0),i.dispatchEvent(s),i.dom7EventData=[],delete i.dom7EventData}}}return this},transitionEnd:function(e){const t=this;return e&&t.on("transitionend",function s(a){a.target===this&&(e.call(this,a),t.off("transitionend",s))}),this},outerWidth:function(e){if(this.length>0){if(e){const e=this.styles();return this[0].offsetWidth+parseFloat(e.getPropertyValue("margin-right"))+parseFloat(e.getPropertyValue("margin-left"))}return this[0].offsetWidth}return null},outerHeight:function(e){if(this.length>0){if(e){const e=this.styles();return this[0].offsetHeight+parseFloat(e.getPropertyValue("margin-top"))+parseFloat(e.getPropertyValue("margin-bottom"))}return this[0].offsetHeight}return null},styles:function(){const e=o();return this[0]?e.getComputedStyle(this[0],null):{}},offset:function(){if(this.length>0){const e=o(),t=n(),s=this[0],a=s.getBoundingClientRect(),i=t.body,r=s.clientTop||i.clientTop||0,l=s.clientLeft||i.clientLeft||0,c=s===e?e.scrollY:s.scrollTop,d=s===e?e.scrollX:s.scrollLeft;return{top:a.top+c-r,left:a.left+d-l}}return null},css:function(e,t){const s=o();let a;if(1===arguments.length){if("string"!=typeof e){for(a=0;a<this.length;a+=1)for(const t in e)this[a].style[t]=e[t];return this}if(this[0])return s.getComputedStyle(this[0],null).getPropertyValue(e)}if(2===arguments.length&&"string"==typeof e){for(a=0;a<this.length;a+=1)this[a].style[e]=t;return this}return this},each:function(e){return e?(this.forEach((t,s)=>{e.apply(t,[t,s])}),this):this},html:function(e){if(void 0===e)return this[0]?this[0].innerHTML:null;for(let t=0;t<this.length;t+=1)this[t].innerHTML=e;return this},text:function(e){if(void 0===e)return this[0]?this[0].textContent.trim():null;for(let t=0;t<this.length;t+=1)this[t].textContent=e;return this},is:function(e){const t=o(),s=n(),a=this[0];let i,r;if(!a||void 0===e)return!1;if("string"==typeof e){if(a.matches)return a.matches(e);if(a.webkitMatchesSelector)return a.webkitMatchesSelector(e);if(a.msMatchesSelector)return a.msMatchesSelector(e);for(i=p(e),r=0;r<i.length;r+=1)if(i[r]===a)return!0;return!1}if(e===s)return a===s;if(e===t)return a===t;if(e.nodeType||e instanceof l){for(i=e.nodeType?[e]:e,r=0;r<i.length;r+=1)if(i[r]===a)return!0;return!1}return!1},index:function(){let e,t=this[0];if(t){for(e=0;null!==(t=t.previousSibling);)1===t.nodeType&&(e+=1);return e}},eq:function(e){if(void 0===e)return this;const t=this.length;if(e>t-1)return p([]);if(e<0){const s=t+e;return p(s<0?[]:[this[s]])}return p([this[e]])},append:function(...e){let t;const s=n();for(let a=0;a<e.length;a+=1){t=e[a];for(let e=0;e<this.length;e+=1)if("string"==typeof t){const a=s.createElement("div");for(a.innerHTML=t;a.firstChild;)this[e].appendChild(a.firstChild)}else if(t instanceof l)for(let s=0;s<t.length;s+=1)this[e].appendChild(t[s]);else this[e].appendChild(t)}return this},prepend:function(e){const t=n();let s,a;for(s=0;s<this.length;s+=1)if("string"==typeof e){const i=t.createElement("div");for(i.innerHTML=e,a=i.childNodes.length-1;a>=0;a-=1)this[s].insertBefore(i.childNodes[a],this[s].childNodes[0])}else if(e instanceof l)for(a=0;a<e.length;a+=1)this[s].insertBefore(e[a],this[s].childNodes[0]);else this[s].insertBefore(e,this[s].childNodes[0]);return this},next:function(e){return this.length>0?e?this[0].nextElementSibling&&p(this[0].nextElementSibling).is(e)?p([this[0].nextElementSibling]):p([]):this[0].nextElementSibling?p([this[0].nextElementSibling]):p([]):p([])},nextAll:function(e){const t=[];let s=this[0];if(!s)return p([]);for(;s.nextElementSibling;){const a=s.nextElementSibling;e?p(a).is(e)&&t.push(a):t.push(a),s=a}return p(t)},prev:function(e){if(this.length>0){const t=this[0];return e?t.previousElementSibling&&p(t.previousElementSibling).is(e)?p([t.previousElementSibling]):p([]):t.previousElementSibling?p([t.previousElementSibling]):p([])}return p([])},prevAll:function(e){const t=[];let s=this[0];if(!s)return p([]);for(;s.previousElementSibling;){const a=s.previousElementSibling;e?p(a).is(e)&&t.push(a):t.push(a),s=a}return p(t)},parent:function(e){const t=[];for(let s=0;s<this.length;s+=1)null!==this[s].parentNode&&(e?p(this[s].parentNode).is(e)&&t.push(this[s].parentNode):t.push(this[s].parentNode));return p(t)},parents:function(e){const t=[];for(let s=0;s<this.length;s+=1){let a=this[s].parentNode;for(;a;)e?p(a).is(e)&&t.push(a):t.push(a),a=a.parentNode}return p(t)},closest:function(e){let t=this;return void 0===e?p([]):(t.is(e)||(t=t.parents(e).eq(0)),t)},find:function(e){const t=[];for(let s=0;s<this.length;s+=1){const a=this[s].querySelectorAll(e);for(let e=0;e<a.length;e+=1)t.push(a[e])}return p(t)},children:function(e){const t=[];for(let s=0;s<this.length;s+=1){const a=this[s].children;for(let s=0;s<a.length;s+=1)e&&!p(a[s]).is(e)||t.push(a[s])}return p(t)},filter:function(e){return p(d(this,e))},remove:function(){for(let e=0;e<this.length;e+=1)this[e].parentNode&&this[e].parentNode.removeChild(this[e]);return this}};function h(e,t=0){return setTimeout(e,t)}function m(){return Date.now()}function f(e,t="x"){const s=o();let a,i,n;const r=function(e){const t=o();let s;return t.getComputedStyle&&(s=t.getComputedStyle(e,null)),!s&&e.currentStyle&&(s=e.currentStyle),s||(s=e.style),s}(e);return s.WebKitCSSMatrix?((i=r.transform||r.webkitTransform).split(",").length>6&&(i=i.split(", ").map(e=>e.replace(",",".")).join(", ")),n=new s.WebKitCSSMatrix("none"===i?"":i)):a=(n=r.MozTransform||r.OTransform||r.MsTransform||r.msTransform||r.transform||r.getPropertyValue("transform").replace("translate(","matrix(1, 0, 0, 1,")).toString().split(","),"x"===t&&(i=s.WebKitCSSMatrix?n.m41:16===a.length?parseFloat(a[12]):parseFloat(a[4])),"y"===t&&(i=s.WebKitCSSMatrix?n.m42:16===a.length?parseFloat(a[13]):parseFloat(a[5])),i||0}function g(e){return"object"===a(e)&&null!==e&&e.constructor&&"Object"===Object.prototype.toString.call(e).slice(8,-1)}function v(...e){const t=Object(e[0]),s=["__proto__","constructor","prototype"];for(let i=1;i<e.length;i+=1){const n=e[i];if(null!=n&&(a=n,!("undefined"!=typeof window&&void 0!==window.HTMLElement?a instanceof HTMLElement:a&&(1===a.nodeType||11===a.nodeType)))){const e=Object.keys(Object(n)).filter(e=>s.indexOf(e)<0);for(let s=0,a=e.length;s<a;s+=1){const a=e[s],i=Object.getOwnPropertyDescriptor(n,a);void 0!==i&&i.enumerable&&(g(t[a])&&g(n[a])?n[a].__swiper__?t[a]=n[a]:v(t[a],n[a]):!g(t[a])&&g(n[a])?(t[a]={},n[a].__swiper__?t[a]=n[a]:v(t[a],n[a])):t[a]=n[a])}}}var a;return t}function w(e,t,s){e.style.setProperty(t,s)}function b({swiper:e,targetPosition:t,side:a}){const i=o(),n=-e.translate;let r,l=null;const c=e.params.speed;e.wrapperEl.style.scrollSnapType="none",i.cancelAnimationFrame(e.cssModeFrameID);const d=t>n?"next":"prev",p=(e,t)=>"next"===d&&e>=t||"prev"===d&&e<=t,u=()=>{r=(new Date).getTime(),null===l&&(l=r);const o=Math.max(Math.min((r-l)/c,1),0),d=.5-Math.cos(o*Math.PI)/2;let h=n+d*(t-n);if(p(h,t)&&(h=t),e.wrapperEl.scrollTo(s({},a,h)),p(h,t))return e.wrapperEl.style.overflow="hidden",e.wrapperEl.style.scrollSnapType="",setTimeout(()=>{e.wrapperEl.style.overflow="",e.wrapperEl.scrollTo(s({},a,h))}),void i.cancelAnimationFrame(e.cssModeFrameID);e.cssModeFrameID=i.requestAnimationFrame(u)};u()}let x,y,E;function T(){return x||(x=function(){const e=o(),t=n();return{smoothScroll:t.documentElement&&"scrollBehavior"in t.documentElement.style,touch:!!("ontouchstart"in e||e.DocumentTouch&&t instanceof e.DocumentTouch),passiveListener:function(){let t=!1;try{const a=Object.defineProperty({},"passive",{get:function(){t=!0}});e.addEventListener("testPassiveListener",null,a)}catch(s){}return t}(),gestures:"ongesturestart"in e}}()),x}function C(e={}){return y||(y=function({userAgent:e}={}){const t=T(),s=o(),a=s.navigator.platform,i=e||s.navigator.userAgent,n={ios:!1,android:!1},r=s.screen.width,l=s.screen.height,c=i.match(/(Android);?[\s\/]+([\d.]+)?/);let d=i.match(/(iPad).*OS\s([\d_]+)/);const p=i.match(/(iPod)(.*OS\s([\d_]+))?/),u=!d&&i.match(/(iPhone\sOS|iOS)\s([\d_]+)/),h="Win32"===a;let m="MacIntel"===a;return!d&&m&&t.touch&&["1024x1366","1366x1024","834x1194","1194x834","834x1112","1112x834","768x1024","1024x768","820x1180","1180x820","810x1080","1080x810"].indexOf("".concat(r,"x").concat(l))>=0&&((d=i.match(/(Version)\/([\d.]+)/))||(d=[0,1,"13_0_0"]),m=!1),c&&!h&&(n.os="android",n.android=!0),(d||u||p)&&(n.os="ios",n.ios=!0),n}(e)),y}function S(){return E||(E=function(){const e=o();return{isSafari:function(){const t=e.navigator.userAgent.toLowerCase();return t.indexOf("safari")>=0&&t.indexOf("chrome")<0&&t.indexOf("android")<0}(),isWebView:/(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/i.test(e.navigator.userAgent)}}()),E}Object.keys(u).forEach(e=>{Object.defineProperty(p.fn,e,{value:u[e],writable:!0})});var M={on:function(e,t,s){const a=this;if("function"!=typeof t)return a;const i=s?"unshift":"push";return e.split(" ").forEach(e=>{a.eventsListeners[e]||(a.eventsListeners[e]=[]),a.eventsListeners[e][i](t)}),a},once:function(e,t,s){const a=this;if("function"!=typeof t)return a;function i(...s){a.off(e,i),i.__emitterProxy&&delete i.__emitterProxy,t.apply(a,s)}return i.__emitterProxy=t,a.on(e,i,s)},onAny:function(e,t){const s=this;if("function"!=typeof e)return s;const a=t?"unshift":"push";return s.eventsAnyListeners.indexOf(e)<0&&s.eventsAnyListeners[a](e),s},offAny:function(e){const t=this;if(!t.eventsAnyListeners)return t;const s=t.eventsAnyListeners.indexOf(e);return s>=0&&t.eventsAnyListeners.splice(s,1),t},off:function(e,t){const s=this;return s.eventsListeners?(e.split(" ").forEach(e=>{void 0===t?s.eventsListeners[e]=[]:s.eventsListeners[e]&&s.eventsListeners[e].forEach((a,i)=>{(a===t||a.__emitterProxy&&a.__emitterProxy===t)&&s.eventsListeners[e].splice(i,1)})}),s):s},emit:function(...e){const t=this;if(!t.eventsListeners)return t;let s,a,i;return"string"==typeof e[0]||Array.isArray(e[0])?(s=e[0],a=e.slice(1,e.length),i=t):(s=e[0].events,a=e[0].data,i=e[0].context||t),a.unshift(i),(Array.isArray(s)?s:s.split(" ")).forEach(e=>{t.eventsAnyListeners&&t.eventsAnyListeners.length&&t.eventsAnyListeners.forEach(t=>{t.apply(i,[e,...a])}),t.eventsListeners&&t.eventsListeners[e]&&t.eventsListeners[e].forEach(e=>{e.apply(i,a)})}),t}};function P({swiper:e,runCallbacks:t,direction:s,step:a}){const{activeIndex:i,previousIndex:n}=e;let r=s;if(r||(r=i>n?"next":i<n?"prev":"reset"),e.emit("transition".concat(a)),t&&i!==n){if("reset"===r)return void e.emit("slideResetTransition".concat(a));e.emit("slideChangeTransition".concat(a)),"next"===r?e.emit("slideNextTransition".concat(a)):e.emit("slidePrevTransition".concat(a))}}function $(e){const t=this,s=n(),a=o(),i=t.touchEventsData,{params:r,touches:l,enabled:c}=t;if(!c)return;if(t.animating&&r.preventInteractionOnTransition)return;!t.animating&&r.cssMode&&r.loop&&t.loopFix();let d=e;d.originalEvent&&(d=d.originalEvent);let u=p(d.target);if("wrapper"===r.touchEventsTarget&&!u.closest(t.wrapperEl).length)return;if(i.isTouchEvent="touchstart"===d.type,!i.isTouchEvent&&"which"in d&&3===d.which)return;if(!i.isTouchEvent&&"button"in d&&d.button>0)return;if(i.isTouched&&i.isMoved)return;!!r.noSwipingClass&&""!==r.noSwipingClass&&d.target&&d.target.shadowRoot&&e.path&&e.path[0]&&(u=p(e.path[0]));const h=r.noSwipingSelector?r.noSwipingSelector:".".concat(r.noSwipingClass),f=!(!d.target||!d.target.shadowRoot);if(r.noSwiping&&(f?function(e,t=this){return function t(s){return s&&s!==n()&&s!==o()?(s.assignedSlot&&(s=s.assignedSlot),s.closest(e)||t(s.getRootNode().host)):null}(t)}(h,d.target):u.closest(h)[0]))return void(t.allowClick=!0);if(r.swipeHandler&&!u.closest(r.swipeHandler)[0])return;l.currentX="touchstart"===d.type?d.targetTouches[0].pageX:d.pageX,l.currentY="touchstart"===d.type?d.targetTouches[0].pageY:d.pageY;const g=l.currentX,v=l.currentY,w=r.edgeSwipeDetection||r.iOSEdgeSwipeDetection,b=r.edgeSwipeThreshold||r.iOSEdgeSwipeThreshold;if(w&&(g<=b||g>=a.innerWidth-b)){if("prevent"!==w)return;e.preventDefault()}if(Object.assign(i,{isTouched:!0,isMoved:!1,allowTouchCallbacks:!0,isScrolling:void 0,startMoving:void 0}),l.startX=g,l.startY=v,i.touchStartTime=m(),t.allowClick=!0,t.updateSize(),t.swipeDirection=void 0,r.threshold>0&&(i.allowThresholdMove=!1),"touchstart"!==d.type){let e=!0;u.is(i.focusableElements)&&(e=!1),s.activeElement&&p(s.activeElement).is(i.focusableElements)&&s.activeElement!==u[0]&&s.activeElement.blur();const a=e&&t.allowTouchMove&&r.touchStartPreventDefault;!r.touchStartForcePreventDefault&&!a||u[0].isContentEditable||d.preventDefault()}t.emit("touchStart",d)}function k(){const e=this,{params:t,el:s}=e;if(s&&0===s.offsetWidth)return;t.breakpoints&&e.setBreakpoint();const{allowSlideNext:a,allowSlidePrev:i,snapGrid:n}=e;e.allowSlideNext=!0,e.allowSlidePrev=!0,e.updateSize(),e.updateSlides(),e.updateSlidesClasses(),("auto"===t.slidesPerView||t.slidesPerView>1)&&e.isEnd&&!e.isBeginning&&!e.params.centeredSlides?e.slideTo(e.slides.length-1,0,!1,!0):e.slideTo(e.activeIndex,0,!1,!0),e.autoplay&&e.autoplay.running&&e.autoplay.paused&&e.autoplay.run(),e.allowSlidePrev=i,e.allowSlideNext=a,e.params.watchOverflow&&n!==e.snapGrid&&e.checkOverflow()}let z=!1;function O(){}const I=(e,t)=>{const s=n(),{params:a,touchEvents:i,el:r,wrapperEl:o,device:l,support:c}=e,d=!!a.nested,p="on"===t?"addEventListener":"removeEventListener",u=t;if(c.touch){const t=!("touchstart"!==i.start||!c.passiveListener||!a.passiveListeners)&&{passive:!0,capture:!1};r[p](i.start,e.onTouchStart,t),r[p](i.move,e.onTouchMove,c.passiveListener?{passive:!1,capture:d}:d),r[p](i.end,e.onTouchEnd,t),i.cancel&&r[p](i.cancel,e.onTouchEnd,t)}else r[p](i.start,e.onTouchStart,!1),s[p](i.move,e.onTouchMove,d),s[p](i.end,e.onTouchEnd,!1);(a.preventClicks||a.preventClicksPropagation)&&r[p]("click",e.onClick,!0),a.cssMode&&o[p]("scroll",e.onScroll),a.updateOnWindowResize?e[u](l.ios||l.android?"resize orientationchange observerUpdate":"resize observerUpdate",k,!0):e[u]("observerUpdate",k,!0)};const L=(e,t)=>e.grid&&t.grid&&t.grid.rows>1;var A={init:!0,direction:"horizontal",touchEventsTarget:"wrapper",initialSlide:0,speed:300,cssMode:!1,updateOnWindowResize:!0,resizeObserver:!0,nested:!1,createElements:!1,enabled:!0,focusableElements:"input, select, option, textarea, button, video, label",width:null,height:null,preventInteractionOnTransition:!1,userAgent:null,url:null,edgeSwipeDetection:!1,edgeSwipeThreshold:20,autoHeight:!1,setWrapperSize:!1,virtualTranslate:!1,effect:"slide",breakpoints:void 0,breakpointsBase:"window",spaceBetween:0,slidesPerView:1,slidesPerGroup:1,slidesPerGroupSkip:0,slidesPerGroupAuto:!1,centeredSlides:!1,centeredSlidesBounds:!1,slidesOffsetBefore:0,slidesOffsetAfter:0,normalizeSlideIndex:!0,centerInsufficientSlides:!1,watchOverflow:!0,roundLengths:!1,touchRatio:1,touchAngle:45,simulateTouch:!0,shortSwipes:!0,longSwipes:!0,longSwipesRatio:.5,longSwipesMs:300,followFinger:!0,allowTouchMove:!0,threshold:0,touchMoveStopPropagation:!1,touchStartPreventDefault:!0,touchStartForcePreventDefault:!1,touchReleaseOnEdges:!1,uniqueNavElements:!0,resistance:!0,resistanceRatio:.85,watchSlidesProgress:!1,grabCursor:!1,preventClicks:!0,preventClicksPropagation:!0,slideToClickedSlide:!1,preloadImages:!0,updateOnImagesReady:!0,loop:!1,loopAdditionalSlides:0,loopedSlides:null,loopFillGroupWithBlank:!1,loopPreventsSlide:!0,rewind:!1,allowSlidePrev:!0,allowSlideNext:!0,swipeHandler:null,noSwiping:!0,noSwipingClass:"swiper-no-swiping",noSwipingSelector:null,passiveListeners:!0,containerModifierClass:"swiper-",slideClass:"swiper-slide",slideBlankClass:"swiper-slide-invisible-blank",slideActiveClass:"swiper-slide-active",slideDuplicateActiveClass:"swiper-slide-duplicate-active",slideVisibleClass:"swiper-slide-visible",slideDuplicateClass:"swiper-slide-duplicate",slideNextClass:"swiper-slide-next",slideDuplicateNextClass:"swiper-slide-duplicate-next",slidePrevClass:"swiper-slide-prev",slideDuplicatePrevClass:"swiper-slide-duplicate-prev",wrapperClass:"swiper-wrapper",runCallbacksOnInit:!0,_emitClasses:!1};function D(e,t){return function(s={}){const i=Object.keys(s)[0],n=s[i];"object"===a(n)&&null!==n?(["navigation","pagination","scrollbar"].indexOf(i)>=0&&!0===e[i]&&(e[i]={auto:!0}),i in e&&"enabled"in n?(!0===e[i]&&(e[i]={enabled:!0}),"object"!==a(e[i])||"enabled"in e[i]||(e[i].enabled=!0),e[i]||(e[i]={enabled:!1}),v(t,s)):v(t,s)):v(t,s)}}const G={eventsEmitter:M,update:{updateSize:function(){const e=this;let t,s;const a=e.$el;t=void 0!==e.params.width&&null!==e.params.width?e.params.width:a[0].clientWidth,s=void 0!==e.params.height&&null!==e.params.height?e.params.height:a[0].clientHeight,0===t&&e.isHorizontal()||0===s&&e.isVertical()||(t=t-parseInt(a.css("padding-left")||0,10)-parseInt(a.css("padding-right")||0,10),s=s-parseInt(a.css("padding-top")||0,10)-parseInt(a.css("padding-bottom")||0,10),Number.isNaN(t)&&(t=0),Number.isNaN(s)&&(s=0),Object.assign(e,{width:t,height:s,size:e.isHorizontal()?t:s}))},updateSlides:function(){const e=this;function t(t){return e.isHorizontal()?t:{width:"height","margin-top":"margin-left","margin-bottom ":"margin-right","margin-left":"margin-top","margin-right":"margin-bottom","padding-left":"padding-top","padding-right":"padding-bottom",marginRight:"marginBottom"}[t]}function a(e,s){return parseFloat(e.getPropertyValue(t(s))||0)}const i=e.params,{$wrapperEl:n,size:r,rtlTranslate:o,wrongRTL:l}=e,c=e.virtual&&i.virtual.enabled,d=c?e.virtual.slides.length:e.slides.length,p=n.children(".".concat(e.params.slideClass)),u=c?e.virtual.slides.length:p.length;let h=[];const m=[],f=[];let g=i.slidesOffsetBefore;"function"==typeof g&&(g=i.slidesOffsetBefore.call(e));let v=i.slidesOffsetAfter;"function"==typeof v&&(v=i.slidesOffsetAfter.call(e));const b=e.snapGrid.length,x=e.slidesGrid.length;let y=i.spaceBetween,E=-g,T=0,C=0;if(void 0===r)return;"string"==typeof y&&y.indexOf("%")>=0&&(y=parseFloat(y.replace("%",""))/100*r),e.virtualSize=-y,o?p.css({marginLeft:"",marginBottom:"",marginTop:""}):p.css({marginRight:"",marginBottom:"",marginTop:""}),i.centeredSlides&&i.cssMode&&(w(e.wrapperEl,"--swiper-centered-offset-before",""),w(e.wrapperEl,"--swiper-centered-offset-after",""));const S=i.grid&&i.grid.rows>1&&e.grid;let M;S&&e.grid.initSlides(u);const P="auto"===i.slidesPerView&&i.breakpoints&&Object.keys(i.breakpoints).filter(e=>void 0!==i.breakpoints[e].slidesPerView).length>0;for(let s=0;s<u;s+=1){M=0;const n=p.eq(s);if(S&&e.grid.updateSlide(s,n,u,t),"none"!==n.css("display")){if("auto"===i.slidesPerView){P&&(p[s].style[t("width")]="");const r=getComputedStyle(n[0]),o=n[0].style.transform,l=n[0].style.webkitTransform;if(o&&(n[0].style.transform="none"),l&&(n[0].style.webkitTransform="none"),i.roundLengths)M=e.isHorizontal()?n.outerWidth(!0):n.outerHeight(!0);else{const e=a(r,"width"),t=a(r,"padding-left"),s=a(r,"padding-right"),i=a(r,"margin-left"),o=a(r,"margin-right"),l=r.getPropertyValue("box-sizing");if(l&&"border-box"===l)M=e+i+o;else{const{clientWidth:a,offsetWidth:r}=n[0];M=e+t+s+i+o+(r-a)}}o&&(n[0].style.transform=o),l&&(n[0].style.webkitTransform=l),i.roundLengths&&(M=Math.floor(M))}else M=(r-(i.slidesPerView-1)*y)/i.slidesPerView,i.roundLengths&&(M=Math.floor(M)),p[s]&&(p[s].style[t("width")]="".concat(M,"px"));p[s]&&(p[s].swiperSlideSize=M),f.push(M),i.centeredSlides?(E=E+M/2+T/2+y,0===T&&0!==s&&(E=E-r/2-y),0===s&&(E=E-r/2-y),Math.abs(E)<.001&&(E=0),i.roundLengths&&(E=Math.floor(E)),C%i.slidesPerGroup==0&&h.push(E),m.push(E)):(i.roundLengths&&(E=Math.floor(E)),(C-Math.min(e.params.slidesPerGroupSkip,C))%e.params.slidesPerGroup==0&&h.push(E),m.push(E),E=E+M+y),e.virtualSize+=M+y,T=M,C+=1}}if(e.virtualSize=Math.max(e.virtualSize,r)+v,o&&l&&("slide"===i.effect||"coverflow"===i.effect)&&n.css({width:"".concat(e.virtualSize+i.spaceBetween,"px")}),i.setWrapperSize&&n.css(s({},t("width"),"".concat(e.virtualSize+i.spaceBetween,"px"))),S&&e.grid.updateWrapperSize(M,h,t),!i.centeredSlides){const t=[];for(let s=0;s<h.length;s+=1){let a=h[s];i.roundLengths&&(a=Math.floor(a)),h[s]<=e.virtualSize-r&&t.push(a)}h=t,Math.floor(e.virtualSize-r)-Math.floor(h[h.length-1])>1&&h.push(e.virtualSize-r)}if(0===h.length&&(h=[0]),0!==i.spaceBetween){const a=e.isHorizontal()&&o?"marginLeft":t("marginRight");p.filter((e,t)=>!i.cssMode||t!==p.length-1).css(s({},a,"".concat(y,"px")))}if(i.centeredSlides&&i.centeredSlidesBounds){let e=0;f.forEach(t=>{e+=t+(i.spaceBetween?i.spaceBetween:0)});const t=(e-=i.spaceBetween)-r;h=h.map(e=>e<0?-g:e>t?t+v:e)}if(i.centerInsufficientSlides){let e=0;if(f.forEach(t=>{e+=t+(i.spaceBetween?i.spaceBetween:0)}),(e-=i.spaceBetween)<r){const t=(r-e)/2;h.forEach((e,s)=>{h[s]=e-t}),m.forEach((e,s)=>{m[s]=e+t})}}if(Object.assign(e,{slides:p,snapGrid:h,slidesGrid:m,slidesSizesGrid:f}),i.centeredSlides&&i.cssMode&&!i.centeredSlidesBounds){w(e.wrapperEl,"--swiper-centered-offset-before","".concat(-h[0],"px")),w(e.wrapperEl,"--swiper-centered-offset-after","".concat(e.size/2-f[f.length-1]/2,"px"));const t=-e.snapGrid[0],s=-e.slidesGrid[0];e.snapGrid=e.snapGrid.map(e=>e+t),e.slidesGrid=e.slidesGrid.map(e=>e+s)}u!==d&&e.emit("slidesLengthChange"),h.length!==b&&(e.params.watchOverflow&&e.checkOverflow(),e.emit("snapGridLengthChange")),m.length!==x&&e.emit("slidesGridLengthChange"),i.watchSlidesProgress&&e.updateSlidesOffset()},updateAutoHeight:function(e){const t=this,s=[],a=t.virtual&&t.params.virtual.enabled;let i,n=0;"number"==typeof e?t.setTransition(e):!0===e&&t.setTransition(t.params.speed);const r=e=>a?t.slides.filter(t=>parseInt(t.getAttribute("data-swiper-slide-index"),10)===e)[0]:t.slides.eq(e)[0];if("auto"!==t.params.slidesPerView&&t.params.slidesPerView>1)if(t.params.centeredSlides)t.visibleSlides.each(e=>{s.push(e)});else for(i=0;i<Math.ceil(t.params.slidesPerView);i+=1){const e=t.activeIndex+i;if(e>t.slides.length&&!a)break;s.push(r(e))}else s.push(r(t.activeIndex));for(i=0;i<s.length;i+=1)if(void 0!==s[i]){const e=s[i].offsetHeight;n=e>n?e:n}(n||0===n)&&t.$wrapperEl.css("height","".concat(n,"px"))},updateSlidesOffset:function(){const e=this,t=e.slides;for(let s=0;s<t.length;s+=1)t[s].swiperSlideOffset=e.isHorizontal()?t[s].offsetLeft:t[s].offsetTop},updateSlidesProgress:function(e=this&&this.translate||0){const t=this,s=t.params,{slides:a,rtlTranslate:i,snapGrid:n}=t;if(0===a.length)return;void 0===a[0].swiperSlideOffset&&t.updateSlidesOffset();let r=-e;i&&(r=e),a.removeClass(s.slideVisibleClass),t.visibleSlidesIndexes=[],t.visibleSlides=[];for(let o=0;o<a.length;o+=1){const e=a[o];let l=e.swiperSlideOffset;s.cssMode&&s.centeredSlides&&(l-=a[0].swiperSlideOffset);const c=(r+(s.centeredSlides?t.minTranslate():0)-l)/(e.swiperSlideSize+s.spaceBetween),d=(r-n[0]+(s.centeredSlides?t.minTranslate():0)-l)/(e.swiperSlideSize+s.spaceBetween),p=-(r-l),u=p+t.slidesSizesGrid[o];(p>=0&&p<t.size-1||u>1&&u<=t.size||p<=0&&u>=t.size)&&(t.visibleSlides.push(e),t.visibleSlidesIndexes.push(o),a.eq(o).addClass(s.slideVisibleClass)),e.progress=i?-c:c,e.originalProgress=i?-d:d}t.visibleSlides=p(t.visibleSlides)},updateProgress:function(e){const t=this;if(void 0===e){const s=t.rtlTranslate?-1:1;e=t&&t.translate&&t.translate*s||0}const s=t.params,a=t.maxTranslate()-t.minTranslate();let{progress:i,isBeginning:n,isEnd:r}=t;const o=n,l=r;0===a?(i=0,n=!0,r=!0):(n=(i=(e-t.minTranslate())/a)<=0,r=i>=1),Object.assign(t,{progress:i,isBeginning:n,isEnd:r}),(s.watchSlidesProgress||s.centeredSlides&&s.autoHeight)&&t.updateSlidesProgress(e),n&&!o&&t.emit("reachBeginning toEdge"),r&&!l&&t.emit("reachEnd toEdge"),(o&&!n||l&&!r)&&t.emit("fromEdge"),t.emit("progress",i)},updateSlidesClasses:function(){const e=this,{slides:t,params:s,$wrapperEl:a,activeIndex:i,realIndex:n}=e,r=e.virtual&&s.virtual.enabled;let o;t.removeClass("".concat(s.slideActiveClass," ").concat(s.slideNextClass," ").concat(s.slidePrevClass," ").concat(s.slideDuplicateActiveClass," ").concat(s.slideDuplicateNextClass," ").concat(s.slideDuplicatePrevClass)),(o=r?e.$wrapperEl.find(".".concat(s.slideClass,'[data-swiper-slide-index="').concat(i,'"]')):t.eq(i)).addClass(s.slideActiveClass),s.loop&&(o.hasClass(s.slideDuplicateClass)?a.children(".".concat(s.slideClass,":not(.").concat(s.slideDuplicateClass,')[data-swiper-slide-index="').concat(n,'"]')).addClass(s.slideDuplicateActiveClass):a.children(".".concat(s.slideClass,".").concat(s.slideDuplicateClass,'[data-swiper-slide-index="').concat(n,'"]')).addClass(s.slideDuplicateActiveClass));let l=o.nextAll(".".concat(s.slideClass)).eq(0).addClass(s.slideNextClass);s.loop&&0===l.length&&(l=t.eq(0)).addClass(s.slideNextClass);let c=o.prevAll(".".concat(s.slideClass)).eq(0).addClass(s.slidePrevClass);s.loop&&0===c.length&&(c=t.eq(-1)).addClass(s.slidePrevClass),s.loop&&(l.hasClass(s.slideDuplicateClass)?a.children(".".concat(s.slideClass,":not(.").concat(s.slideDuplicateClass,')[data-swiper-slide-index="').concat(l.attr("data-swiper-slide-index"),'"]')).addClass(s.slideDuplicateNextClass):a.children(".".concat(s.slideClass,".").concat(s.slideDuplicateClass,'[data-swiper-slide-index="').concat(l.attr("data-swiper-slide-index"),'"]')).addClass(s.slideDuplicateNextClass),c.hasClass(s.slideDuplicateClass)?a.children(".".concat(s.slideClass,":not(.").concat(s.slideDuplicateClass,')[data-swiper-slide-index="').concat(c.attr("data-swiper-slide-index"),'"]')).addClass(s.slideDuplicatePrevClass):a.children(".".concat(s.slideClass,".").concat(s.slideDuplicateClass,'[data-swiper-slide-index="').concat(c.attr("data-swiper-slide-index"),'"]')).addClass(s.slideDuplicatePrevClass)),e.emitSlidesClasses()},updateActiveIndex:function(e){const t=this,s=t.rtlTranslate?t.translate:-t.translate,{slidesGrid:a,snapGrid:i,params:n,activeIndex:r,realIndex:o,snapIndex:l}=t;let c,d=e;if(void 0===d){for(let e=0;e<a.length;e+=1)void 0!==a[e+1]?s>=a[e]&&s<a[e+1]-(a[e+1]-a[e])/2?d=e:s>=a[e]&&s<a[e+1]&&(d=e+1):s>=a[e]&&(d=e);n.normalizeSlideIndex&&(d<0||void 0===d)&&(d=0)}if(i.indexOf(s)>=0)c=i.indexOf(s);else{const e=Math.min(n.slidesPerGroupSkip,d);c=e+Math.floor((d-e)/n.slidesPerGroup)}if(c>=i.length&&(c=i.length-1),d===r)return void(c!==l&&(t.snapIndex=c,t.emit("snapIndexChange")));const p=parseInt(t.slides.eq(d).attr("data-swiper-slide-index")||d,10);Object.assign(t,{snapIndex:c,realIndex:p,previousIndex:r,activeIndex:d}),t.emit("activeIndexChange"),t.emit("snapIndexChange"),o!==p&&t.emit("realIndexChange"),(t.initialized||t.params.runCallbacksOnInit)&&t.emit("slideChange")},updateClickedSlide:function(e){const t=this,s=t.params,a=p(e).closest(".".concat(s.slideClass))[0];let i,n=!1;if(a)for(let r=0;r<t.slides.length;r+=1)if(t.slides[r]===a){n=!0,i=r;break}if(!a||!n)return t.clickedSlide=void 0,void(t.clickedIndex=void 0);t.clickedSlide=a,t.virtual&&t.params.virtual.enabled?t.clickedIndex=parseInt(p(a).attr("data-swiper-slide-index"),10):t.clickedIndex=i,s.slideToClickedSlide&&void 0!==t.clickedIndex&&t.clickedIndex!==t.activeIndex&&t.slideToClickedSlide()}},translate:{getTranslate:function(e=(this.isHorizontal()?"x":"y")){const{params:t,rtlTranslate:s,translate:a,$wrapperEl:i}=this;if(t.virtualTranslate)return s?-a:a;if(t.cssMode)return a;let n=f(i[0],e);return s&&(n=-n),n||0},setTranslate:function(e,t){const s=this,{rtlTranslate:a,params:i,$wrapperEl:n,wrapperEl:r,progress:o}=s;let l,c=0,d=0;s.isHorizontal()?c=a?-e:e:d=e,i.roundLengths&&(c=Math.floor(c),d=Math.floor(d)),i.cssMode?r[s.isHorizontal()?"scrollLeft":"scrollTop"]=s.isHorizontal()?-c:-d:i.virtualTranslate||n.transform("translate3d(".concat(c,"px, ").concat(d,"px, ").concat(0,"px)")),s.previousTranslate=s.translate,s.translate=s.isHorizontal()?c:d;const p=s.maxTranslate()-s.minTranslate();(l=0===p?0:(e-s.minTranslate())/p)!==o&&s.updateProgress(e),s.emit("setTranslate",s.translate,t)},minTranslate:function(){return-this.snapGrid[0]},maxTranslate:function(){return-this.snapGrid[this.snapGrid.length-1]},translateTo:function(e=0,t=this.params.speed,a=!0,i=!0,n){const r=this,{params:o,wrapperEl:l}=r;if(r.animating&&o.preventInteractionOnTransition)return!1;const c=r.minTranslate(),d=r.maxTranslate();let p;if(p=i&&e>c?c:i&&e<d?d:e,r.updateProgress(p),o.cssMode){const e=r.isHorizontal();if(0===t)l[e?"scrollLeft":"scrollTop"]=-p;else{var u;if(!r.support.smoothScroll)return b({swiper:r,targetPosition:-p,side:e?"left":"top"}),!0;l.scrollTo((s(u={},e?"left":"top",-p),s(u,"behavior","smooth"),u))}return!0}return 0===t?(r.setTransition(0),r.setTranslate(p),a&&(r.emit("beforeTransitionStart",t,n),r.emit("transitionEnd"))):(r.setTransition(t),r.setTranslate(p),a&&(r.emit("beforeTransitionStart",t,n),r.emit("transitionStart")),r.animating||(r.animating=!0,r.onTranslateToWrapperTransitionEnd||(r.onTranslateToWrapperTransitionEnd=function(e){r&&!r.destroyed&&e.target===this&&(r.$wrapperEl[0].removeEventListener("transitionend",r.onTranslateToWrapperTransitionEnd),r.$wrapperEl[0].removeEventListener("webkitTransitionEnd",r.onTranslateToWrapperTransitionEnd),r.onTranslateToWrapperTransitionEnd=null,delete r.onTranslateToWrapperTransitionEnd,a&&r.emit("transitionEnd"))}),r.$wrapperEl[0].addEventListener("transitionend",r.onTranslateToWrapperTransitionEnd),r.$wrapperEl[0].addEventListener("webkitTransitionEnd",r.onTranslateToWrapperTransitionEnd))),!0}},transition:{setTransition:function(e,t){const s=this;s.params.cssMode||s.$wrapperEl.transition(e),s.emit("setTransition",e,t)},transitionStart:function(e=!0,t){const s=this,{params:a}=s;a.cssMode||(a.autoHeight&&s.updateAutoHeight(),P({swiper:s,runCallbacks:e,direction:t,step:"Start"}))},transitionEnd:function(e=!0,t){const{params:s}=this;this.animating=!1,s.cssMode||(this.setTransition(0),P({swiper:this,runCallbacks:e,direction:t,step:"End"}))}},slide:{slideTo:function(e=0,t=this.params.speed,i=!0,n,r){if("number"!=typeof e&&"string"!=typeof e)throw new Error("The 'index' argument cannot have type other than 'number' or 'string'. [".concat(a(e),"] given."));if("string"==typeof e){const t=parseInt(e,10);if(!isFinite(t))throw new Error("The passed-in 'index' (string) couldn't be converted to 'number'. [".concat(e,"] given."));e=t}const o=this;let l=e;l<0&&(l=0);const{params:c,snapGrid:d,slidesGrid:p,previousIndex:u,activeIndex:h,rtlTranslate:m,wrapperEl:f,enabled:g}=o;if(o.animating&&c.preventInteractionOnTransition||!g&&!n&&!r)return!1;const v=Math.min(o.params.slidesPerGroupSkip,l);let w=v+Math.floor((l-v)/o.params.slidesPerGroup);w>=d.length&&(w=d.length-1),(h||c.initialSlide||0)===(u||0)&&i&&o.emit("beforeSlideChangeStart");const x=-d[w];if(o.updateProgress(x),c.normalizeSlideIndex)for(let s=0;s<p.length;s+=1){const e=-Math.floor(100*x),t=Math.floor(100*p[s]),a=Math.floor(100*p[s+1]);void 0!==p[s+1]?e>=t&&e<a-(a-t)/2?l=s:e>=t&&e<a&&(l=s+1):e>=t&&(l=s)}if(o.initialized&&l!==h){if(!o.allowSlideNext&&x<o.translate&&x<o.minTranslate())return!1;if(!o.allowSlidePrev&&x>o.translate&&x>o.maxTranslate()&&(h||0)!==l)return!1}let y;if(y=l>h?"next":l<h?"prev":"reset",m&&-x===o.translate||!m&&x===o.translate)return o.updateActiveIndex(l),c.autoHeight&&o.updateAutoHeight(),o.updateSlidesClasses(),"slide"!==c.effect&&o.setTranslate(x),"reset"!==y&&(o.transitionStart(i,y),o.transitionEnd(i,y)),!1;if(c.cssMode){const e=o.isHorizontal(),a=m?x:-x;if(0===t){const t=o.virtual&&o.params.virtual.enabled;t&&(o.wrapperEl.style.scrollSnapType="none",o._immediateVirtual=!0),f[e?"scrollLeft":"scrollTop"]=a,t&&requestAnimationFrame(()=>{o.wrapperEl.style.scrollSnapType="",o._swiperImmediateVirtual=!1})}else{var E;if(!o.support.smoothScroll)return b({swiper:o,targetPosition:a,side:e?"left":"top"}),!0;f.scrollTo((s(E={},e?"left":"top",a),s(E,"behavior","smooth"),E))}return!0}return o.setTransition(t),o.setTranslate(x),o.updateActiveIndex(l),o.updateSlidesClasses(),o.emit("beforeTransitionStart",t,n),o.transitionStart(i,y),0===t?o.transitionEnd(i,y):o.animating||(o.animating=!0,o.onSlideToWrapperTransitionEnd||(o.onSlideToWrapperTransitionEnd=function(e){o&&!o.destroyed&&e.target===this&&(o.$wrapperEl[0].removeEventListener("transitionend",o.onSlideToWrapperTransitionEnd),o.$wrapperEl[0].removeEventListener("webkitTransitionEnd",o.onSlideToWrapperTransitionEnd),o.onSlideToWrapperTransitionEnd=null,delete o.onSlideToWrapperTransitionEnd,o.transitionEnd(i,y))}),o.$wrapperEl[0].addEventListener("transitionend",o.onSlideToWrapperTransitionEnd),o.$wrapperEl[0].addEventListener("webkitTransitionEnd",o.onSlideToWrapperTransitionEnd)),!0},slideToLoop:function(e=0,t=this.params.speed,s=!0,a){const i=this;let n=e;return i.params.loop&&(n+=i.loopedSlides),i.slideTo(n,t,s,a)},slideNext:function(e=this.params.speed,t=!0,s){const a=this,{animating:i,enabled:n,params:r}=a;if(!n)return a;let o=r.slidesPerGroup;"auto"===r.slidesPerView&&1===r.slidesPerGroup&&r.slidesPerGroupAuto&&(o=Math.max(a.slidesPerViewDynamic("current",!0),1));const l=a.activeIndex<r.slidesPerGroupSkip?1:o;if(r.loop){if(i&&r.loopPreventsSlide)return!1;a.loopFix(),a._clientLeft=a.$wrapperEl[0].clientLeft}return r.rewind&&a.isEnd?a.slideTo(0,e,t,s):a.slideTo(a.activeIndex+l,e,t,s)},slidePrev:function(e=this.params.speed,t=!0,s){const a=this,{params:i,animating:n,snapGrid:r,slidesGrid:o,rtlTranslate:l,enabled:c}=a;if(!c)return a;if(i.loop){if(n&&i.loopPreventsSlide)return!1;a.loopFix(),a._clientLeft=a.$wrapperEl[0].clientLeft}function d(e){return e<0?-Math.floor(Math.abs(e)):Math.floor(e)}const p=d(l?a.translate:-a.translate),u=r.map(e=>d(e));let h=r[u.indexOf(p)-1];if(void 0===h&&i.cssMode){let e;r.forEach((t,s)=>{p>=t&&(e=s)}),void 0!==e&&(h=r[e>0?e-1:e])}let m=0;return void 0!==h&&((m=o.indexOf(h))<0&&(m=a.activeIndex-1),"auto"===i.slidesPerView&&1===i.slidesPerGroup&&i.slidesPerGroupAuto&&(m=m-a.slidesPerViewDynamic("previous",!0)+1,m=Math.max(m,0))),i.rewind&&a.isBeginning?a.slideTo(a.slides.length-1,e,t,s):a.slideTo(m,e,t,s)},slideReset:function(e=this.params.speed,t=!0,s){return this.slideTo(this.activeIndex,e,t,s)},slideToClosest:function(e=this.params.speed,t=!0,s,a=.5){const i=this;let n=i.activeIndex;const r=Math.min(i.params.slidesPerGroupSkip,n),o=r+Math.floor((n-r)/i.params.slidesPerGroup),l=i.rtlTranslate?i.translate:-i.translate;if(l>=i.snapGrid[o]){const e=i.snapGrid[o];l-e>(i.snapGrid[o+1]-e)*a&&(n+=i.params.slidesPerGroup)}else{const e=i.snapGrid[o-1];l-e<=(i.snapGrid[o]-e)*a&&(n-=i.params.slidesPerGroup)}return n=Math.max(n,0),n=Math.min(n,i.slidesGrid.length-1),i.slideTo(n,e,t,s)},slideToClickedSlide:function(){const e=this,{params:t,$wrapperEl:s}=e,a="auto"===t.slidesPerView?e.slidesPerViewDynamic():t.slidesPerView;let i,n=e.clickedIndex;if(t.loop){if(e.animating)return;i=parseInt(p(e.clickedSlide).attr("data-swiper-slide-index"),10),t.centeredSlides?n<e.loopedSlides-a/2||n>e.slides.length-e.loopedSlides+a/2?(e.loopFix(),n=s.children(".".concat(t.slideClass,'[data-swiper-slide-index="').concat(i,'"]:not(.').concat(t.slideDuplicateClass,")")).eq(0).index(),h(()=>{e.slideTo(n)})):e.slideTo(n):n>e.slides.length-a?(e.loopFix(),n=s.children(".".concat(t.slideClass,'[data-swiper-slide-index="').concat(i,'"]:not(.').concat(t.slideDuplicateClass,")")).eq(0).index(),h(()=>{e.slideTo(n)})):e.slideTo(n)}else e.slideTo(n)}},loop:{loopCreate:function(){const e=this,t=n(),{params:s,$wrapperEl:a}=e,i=a.children().length>0?p(a.children()[0].parentNode):a;i.children(".".concat(s.slideClass,".").concat(s.slideDuplicateClass)).remove();let r=i.children(".".concat(s.slideClass));if(s.loopFillGroupWithBlank){const e=s.slidesPerGroup-r.length%s.slidesPerGroup;if(e!==s.slidesPerGroup){for(let a=0;a<e;a+=1){const e=p(t.createElement("div")).addClass("".concat(s.slideClass," ").concat(s.slideBlankClass));i.append(e)}r=i.children(".".concat(s.slideClass))}}"auto"!==s.slidesPerView||s.loopedSlides||(s.loopedSlides=r.length),e.loopedSlides=Math.ceil(parseFloat(s.loopedSlides||s.slidesPerView,10)),e.loopedSlides+=s.loopAdditionalSlides,e.loopedSlides>r.length&&(e.loopedSlides=r.length);const o=[],l=[];r.each((t,s)=>{const a=p(t);s<e.loopedSlides&&l.push(t),s<r.length&&s>=r.length-e.loopedSlides&&o.push(t),a.attr("data-swiper-slide-index",s)});for(let n=0;n<l.length;n+=1)i.append(p(l[n].cloneNode(!0)).addClass(s.slideDuplicateClass));for(let n=o.length-1;n>=0;n-=1)i.prepend(p(o[n].cloneNode(!0)).addClass(s.slideDuplicateClass))},loopFix:function(){const e=this;e.emit("beforeLoopFix");const{activeIndex:t,slides:s,loopedSlides:a,allowSlidePrev:i,allowSlideNext:n,snapGrid:r,rtlTranslate:o}=e;let l;e.allowSlidePrev=!0,e.allowSlideNext=!0;const c=-r[t]-e.getTranslate();t<a?(l=s.length-3*a+t,l+=a,e.slideTo(l,0,!1,!0)&&0!==c&&e.setTranslate((o?-e.translate:e.translate)-c)):t>=s.length-a&&(l=-s.length+t+a,l+=a,e.slideTo(l,0,!1,!0)&&0!==c&&e.setTranslate((o?-e.translate:e.translate)-c));e.allowSlidePrev=i,e.allowSlideNext=n,e.emit("loopFix")},loopDestroy:function(){const{$wrapperEl:e,params:t,slides:s}=this;e.children(".".concat(t.slideClass,".").concat(t.slideDuplicateClass,",.").concat(t.slideClass,".").concat(t.slideBlankClass)).remove(),s.removeAttr("data-swiper-slide-index")}},grabCursor:{setGrabCursor:function(e){if(this.support.touch||!this.params.simulateTouch||this.params.watchOverflow&&this.isLocked||this.params.cssMode)return;const t="container"===this.params.touchEventsTarget?this.el:this.wrapperEl;t.style.cursor="move",t.style.cursor=e?"-webkit-grabbing":"-webkit-grab",t.style.cursor=e?"-moz-grabbin":"-moz-grab",t.style.cursor=e?"grabbing":"grab"},unsetGrabCursor:function(){this.support.touch||this.params.watchOverflow&&this.isLocked||this.params.cssMode||(this["container"===this.params.touchEventsTarget?"el":"wrapperEl"].style.cursor="")}},events:{attachEvents:function(){const e=this,t=n(),{params:s,support:a}=e;e.onTouchStart=$.bind(e),e.onTouchMove=function(e){const t=n(),s=this,a=s.touchEventsData,{params:i,touches:r,rtlTranslate:o,enabled:l}=s;if(!l)return;let c=e;if(c.originalEvent&&(c=c.originalEvent),!a.isTouched)return void(a.startMoving&&a.isScrolling&&s.emit("touchMoveOpposite",c));if(a.isTouchEvent&&"touchmove"!==c.type)return;const d="touchmove"===c.type&&c.targetTouches&&(c.targetTouches[0]||c.changedTouches[0]),u="touchmove"===c.type?d.pageX:c.pageX,h="touchmove"===c.type?d.pageY:c.pageY;if(c.preventedByNestedSwiper)return r.startX=u,void(r.startY=h);if(!s.allowTouchMove)return s.allowClick=!1,void(a.isTouched&&(Object.assign(r,{startX:u,startY:h,currentX:u,currentY:h}),a.touchStartTime=m()));if(a.isTouchEvent&&i.touchReleaseOnEdges&&!i.loop)if(s.isVertical()){if(h<r.startY&&s.translate<=s.maxTranslate()||h>r.startY&&s.translate>=s.minTranslate())return a.isTouched=!1,void(a.isMoved=!1)}else if(u<r.startX&&s.translate<=s.maxTranslate()||u>r.startX&&s.translate>=s.minTranslate())return;if(a.isTouchEvent&&t.activeElement&&c.target===t.activeElement&&p(c.target).is(a.focusableElements))return a.isMoved=!0,void(s.allowClick=!1);if(a.allowTouchCallbacks&&s.emit("touchMove",c),c.targetTouches&&c.targetTouches.length>1)return;r.currentX=u,r.currentY=h;const f=r.currentX-r.startX,g=r.currentY-r.startY;if(s.params.threshold&&Math.sqrt(f**2+g**2)<s.params.threshold)return;if(void 0===a.isScrolling){let e;s.isHorizontal()&&r.currentY===r.startY||s.isVertical()&&r.currentX===r.startX?a.isScrolling=!1:f*f+g*g>=25&&(e=180*Math.atan2(Math.abs(g),Math.abs(f))/Math.PI,a.isScrolling=s.isHorizontal()?e>i.touchAngle:90-e>i.touchAngle)}if(a.isScrolling&&s.emit("touchMoveOpposite",c),void 0===a.startMoving&&(r.currentX===r.startX&&r.currentY===r.startY||(a.startMoving=!0)),a.isScrolling)return void(a.isTouched=!1);if(!a.startMoving)return;s.allowClick=!1,!i.cssMode&&c.cancelable&&c.preventDefault(),i.touchMoveStopPropagation&&!i.nested&&c.stopPropagation(),a.isMoved||(i.loop&&!i.cssMode&&s.loopFix(),a.startTranslate=s.getTranslate(),s.setTransition(0),s.animating&&s.$wrapperEl.trigger("webkitTransitionEnd transitionend"),a.allowMomentumBounce=!1,!i.grabCursor||!0!==s.allowSlideNext&&!0!==s.allowSlidePrev||s.setGrabCursor(!0),s.emit("sliderFirstMove",c)),s.emit("sliderMove",c),a.isMoved=!0;let v=s.isHorizontal()?f:g;r.diff=v,v*=i.touchRatio,o&&(v=-v),s.swipeDirection=v>0?"prev":"next",a.currentTranslate=v+a.startTranslate;let w=!0,b=i.resistanceRatio;if(i.touchReleaseOnEdges&&(b=0),v>0&&a.currentTranslate>s.minTranslate()?(w=!1,i.resistance&&(a.currentTranslate=s.minTranslate()-1+(-s.minTranslate()+a.startTranslate+v)**b)):v<0&&a.currentTranslate<s.maxTranslate()&&(w=!1,i.resistance&&(a.currentTranslate=s.maxTranslate()+1-(s.maxTranslate()-a.startTranslate-v)**b)),w&&(c.preventedByNestedSwiper=!0),!s.allowSlideNext&&"next"===s.swipeDirection&&a.currentTranslate<a.startTranslate&&(a.currentTranslate=a.startTranslate),!s.allowSlidePrev&&"prev"===s.swipeDirection&&a.currentTranslate>a.startTranslate&&(a.currentTranslate=a.startTranslate),s.allowSlidePrev||s.allowSlideNext||(a.currentTranslate=a.startTranslate),i.threshold>0){if(!(Math.abs(v)>i.threshold||a.allowThresholdMove))return void(a.currentTranslate=a.startTranslate);if(!a.allowThresholdMove)return a.allowThresholdMove=!0,r.startX=r.currentX,r.startY=r.currentY,a.currentTranslate=a.startTranslate,void(r.diff=s.isHorizontal()?r.currentX-r.startX:r.currentY-r.startY)}i.followFinger&&!i.cssMode&&((i.freeMode&&i.freeMode.enabled&&s.freeMode||i.watchSlidesProgress)&&(s.updateActiveIndex(),s.updateSlidesClasses()),s.params.freeMode&&i.freeMode.enabled&&s.freeMode&&s.freeMode.onTouchMove(),s.updateProgress(a.currentTranslate),s.setTranslate(a.currentTranslate))}.bind(e),e.onTouchEnd=function(e){const t=this,s=t.touchEventsData,{params:a,touches:i,rtlTranslate:n,slidesGrid:r,enabled:o}=t;if(!o)return;let l=e;if(l.originalEvent&&(l=l.originalEvent),s.allowTouchCallbacks&&t.emit("touchEnd",l),s.allowTouchCallbacks=!1,!s.isTouched)return s.isMoved&&a.grabCursor&&t.setGrabCursor(!1),s.isMoved=!1,void(s.startMoving=!1);a.grabCursor&&s.isMoved&&s.isTouched&&(!0===t.allowSlideNext||!0===t.allowSlidePrev)&&t.setGrabCursor(!1);const c=m(),d=c-s.touchStartTime;if(t.allowClick){const e=l.path||l.composedPath&&l.composedPath();t.updateClickedSlide(e&&e[0]||l.target),t.emit("tap click",l),d<300&&c-s.lastClickTime<300&&t.emit("doubleTap doubleClick",l)}if(s.lastClickTime=m(),h(()=>{t.destroyed||(t.allowClick=!0)}),!s.isTouched||!s.isMoved||!t.swipeDirection||0===i.diff||s.currentTranslate===s.startTranslate)return s.isTouched=!1,s.isMoved=!1,void(s.startMoving=!1);let p;if(s.isTouched=!1,s.isMoved=!1,s.startMoving=!1,p=a.followFinger?n?t.translate:-t.translate:-s.currentTranslate,a.cssMode)return;if(t.params.freeMode&&a.freeMode.enabled)return void t.freeMode.onTouchEnd({currentPos:p});let u=0,f=t.slidesSizesGrid[0];for(let h=0;h<r.length;h+=h<a.slidesPerGroupSkip?1:a.slidesPerGroup){const e=h<a.slidesPerGroupSkip-1?1:a.slidesPerGroup;void 0!==r[h+e]?p>=r[h]&&p<r[h+e]&&(u=h,f=r[h+e]-r[h]):p>=r[h]&&(u=h,f=r[r.length-1]-r[r.length-2])}const g=(p-r[u])/f,v=u<a.slidesPerGroupSkip-1?1:a.slidesPerGroup;if(d>a.longSwipesMs){if(!a.longSwipes)return void t.slideTo(t.activeIndex);"next"===t.swipeDirection&&(g>=a.longSwipesRatio?t.slideTo(u+v):t.slideTo(u)),"prev"===t.swipeDirection&&(g>1-a.longSwipesRatio?t.slideTo(u+v):t.slideTo(u))}else{if(!a.shortSwipes)return void t.slideTo(t.activeIndex);!t.navigation||l.target!==t.navigation.nextEl&&l.target!==t.navigation.prevEl?("next"===t.swipeDirection&&t.slideTo(u+v),"prev"===t.swipeDirection&&t.slideTo(u)):l.target===t.navigation.nextEl?t.slideTo(u+v):t.slideTo(u)}}.bind(e),s.cssMode&&(e.onScroll=function(){const e=this,{wrapperEl:t,rtlTranslate:s,enabled:a}=e;if(!a)return;let i;e.previousTranslate=e.translate,e.isHorizontal()?e.translate=-t.scrollLeft:e.translate=-t.scrollTop,-0===e.translate&&(e.translate=0),e.updateActiveIndex(),e.updateSlidesClasses();const n=e.maxTranslate()-e.minTranslate();(i=0===n?0:(e.translate-e.minTranslate())/n)!==e.progress&&e.updateProgress(s?-e.translate:e.translate),e.emit("setTranslate",e.translate,!1)}.bind(e)),e.onClick=function(e){const t=this;t.enabled&&(t.allowClick||(t.params.preventClicks&&e.preventDefault(),t.params.preventClicksPropagation&&t.animating&&(e.stopPropagation(),e.stopImmediatePropagation())))}.bind(e),a.touch&&!z&&(t.addEventListener("touchstart",O),z=!0),I(e,"on")},detachEvents:function(){I(this,"off")}},breakpoints:{setBreakpoint:function(){const e=this,{activeIndex:t,initialized:s,loopedSlides:a=0,params:i,$el:n}=e,r=i.breakpoints;if(!r||r&&0===Object.keys(r).length)return;const o=e.getBreakpoint(r,e.params.breakpointsBase,e.el);if(!o||e.currentBreakpoint===o)return;const l=(o in r?r[o]:void 0)||e.originalParams,c=L(e,i),d=L(e,l),p=i.enabled;c&&!d?(n.removeClass("".concat(i.containerModifierClass,"grid ").concat(i.containerModifierClass,"grid-column")),e.emitContainerClasses()):!c&&d&&(n.addClass("".concat(i.containerModifierClass,"grid")),(l.grid.fill&&"column"===l.grid.fill||!l.grid.fill&&"column"===i.grid.fill)&&n.addClass("".concat(i.containerModifierClass,"grid-column")),e.emitContainerClasses());const u=l.direction&&l.direction!==i.direction,h=i.loop&&(l.slidesPerView!==i.slidesPerView||u);u&&s&&e.changeDirection(),v(e.params,l);const m=e.params.enabled;Object.assign(e,{allowTouchMove:e.params.allowTouchMove,allowSlideNext:e.params.allowSlideNext,allowSlidePrev:e.params.allowSlidePrev}),p&&!m?e.disable():!p&&m&&e.enable(),e.currentBreakpoint=o,e.emit("_beforeBreakpoint",l),h&&s&&(e.loopDestroy(),e.loopCreate(),e.updateSlides(),e.slideTo(t-a+e.loopedSlides,0,!1)),e.emit("breakpoint",l)},getBreakpoint:function(e,t="window",s){if(!e||"container"===t&&!s)return;let a=!1;const i=o(),n="window"===t?i.innerHeight:s.clientHeight,r=Object.keys(e).map(e=>{if("string"==typeof e&&0===e.indexOf("@")){const t=parseFloat(e.substr(1));return{value:n*t,point:e}}return{value:e,point:e}});r.sort((e,t)=>parseInt(e.value,10)-parseInt(t.value,10));for(let o=0;o<r.length;o+=1){const{point:e,value:n}=r[o];"window"===t?i.matchMedia("(min-width: ".concat(n,"px)")).matches&&(a=e):n<=s.clientWidth&&(a=e)}return a||"max"}},checkOverflow:{checkOverflow:function(){const e=this,{isLocked:t,params:s}=e,{slidesOffsetBefore:a}=s;if(a){const t=e.slides.length-1,s=e.slidesGrid[t]+e.slidesSizesGrid[t]+2*a;e.isLocked=e.size>s}else e.isLocked=1===e.snapGrid.length;!0===s.allowSlideNext&&(e.allowSlideNext=!e.isLocked),!0===s.allowSlidePrev&&(e.allowSlidePrev=!e.isLocked),t&&t!==e.isLocked&&(e.isEnd=!1),t!==e.isLocked&&e.emit(e.isLocked?"lock":"unlock")}},classes:{addClasses:function(){const{classNames:e,params:t,rtl:s,$el:i,device:n,support:r}=this,o=function(e,t){const s=[];return e.forEach(e=>{"object"===a(e)?Object.keys(e).forEach(a=>{e[a]&&s.push(t+a)}):"string"==typeof e&&s.push(t+e)}),s}(["initialized",t.direction,{"pointer-events":!r.touch},{"free-mode":this.params.freeMode&&t.freeMode.enabled},{autoheight:t.autoHeight},{rtl:s},{grid:t.grid&&t.grid.rows>1},{"grid-column":t.grid&&t.grid.rows>1&&"column"===t.grid.fill},{android:n.android},{ios:n.ios},{"css-mode":t.cssMode},{centered:t.cssMode&&t.centeredSlides}],t.containerModifierClass);e.push(...o),i.addClass([...e].join(" ")),this.emitContainerClasses()},removeClasses:function(){const{$el:e,classNames:t}=this;e.removeClass(t.join(" ")),this.emitContainerClasses()}},images:{loadImage:function(e,t,s,a,i,n){const r=o();let l;function c(){n&&n()}p(e).parent("picture")[0]||e.complete&&i?c():t?((l=new r.Image).onload=c,l.onerror=c,a&&(l.sizes=a),s&&(l.srcset=s),t&&(l.src=t)):c()},preloadImages:function(){const e=this;function t(){null!=e&&e&&!e.destroyed&&(void 0!==e.imagesLoaded&&(e.imagesLoaded+=1),e.imagesLoaded===e.imagesToLoad.length&&(e.params.updateOnImagesReady&&e.update(),e.emit("imagesReady")))}e.imagesToLoad=e.$el.find("img");for(let s=0;s<e.imagesToLoad.length;s+=1){const a=e.imagesToLoad[s];e.loadImage(a,a.currentSrc||a.getAttribute("src"),a.srcset||a.getAttribute("srcset"),a.sizes||a.getAttribute("sizes"),!0,t)}}}},N={};class B{constructor(...e){let t,s;if(1===e.length&&e[0].constructor&&"Object"===Object.prototype.toString.call(e[0]).slice(8,-1)?s=e[0]:[t,s]=e,s||(s={}),s=v({},s),t&&!s.el&&(s.el=t),s.el&&p(s.el).length>1){const e=[];return p(s.el).each(t=>{const a=v({},s,{el:t});e.push(new B(a))}),e}const a=this;a.__swiper__=!0,a.support=T(),a.device=C({userAgent:s.userAgent}),a.browser=S(),a.eventsListeners={},a.eventsAnyListeners=[],a.modules=[...a.__modules__],s.modules&&Array.isArray(s.modules)&&a.modules.push(...s.modules);const i={};a.modules.forEach(e=>{e({swiper:a,extendParams:D(s,i),on:a.on.bind(a),once:a.once.bind(a),off:a.off.bind(a),emit:a.emit.bind(a)})});const n=v({},A,i);return a.params=v({},n,N,s),a.originalParams=v({},a.params),a.passedParams=v({},s),a.params&&a.params.on&&Object.keys(a.params.on).forEach(e=>{a.on(e,a.params.on[e])}),a.params&&a.params.onAny&&a.onAny(a.params.onAny),a.$=p,Object.assign(a,{enabled:a.params.enabled,el:t,classNames:[],slides:p(),slidesGrid:[],snapGrid:[],slidesSizesGrid:[],isHorizontal:function(){return"horizontal"===a.params.direction},isVertical:function(){return"vertical"===a.params.direction},activeIndex:0,realIndex:0,isBeginning:!0,isEnd:!1,translate:0,previousTranslate:0,progress:0,velocity:0,animating:!1,allowSlideNext:a.params.allowSlideNext,allowSlidePrev:a.params.allowSlidePrev,touchEvents:function(){const e=["touchstart","touchmove","touchend","touchcancel"],t=["pointerdown","pointermove","pointerup"];return a.touchEventsTouch={start:e[0],move:e[1],end:e[2],cancel:e[3]},a.touchEventsDesktop={start:t[0],move:t[1],end:t[2]},a.support.touch||!a.params.simulateTouch?a.touchEventsTouch:a.touchEventsDesktop}(),touchEventsData:{isTouched:void 0,isMoved:void 0,allowTouchCallbacks:void 0,touchStartTime:void 0,isScrolling:void 0,currentTranslate:void 0,startTranslate:void 0,allowThresholdMove:void 0,focusableElements:a.params.focusableElements,lastClickTime:m(),clickTimeout:void 0,velocities:[],allowMomentumBounce:void 0,isTouchEvent:void 0,startMoving:void 0},allowClick:!0,allowTouchMove:a.params.allowTouchMove,touches:{startX:0,startY:0,currentX:0,currentY:0,diff:0},imagesToLoad:[],imagesLoaded:0}),a.emit("_swiper"),a.params.init&&a.init(),a}enable(){const e=this;e.enabled||(e.enabled=!0,e.params.grabCursor&&e.setGrabCursor(),e.emit("enable"))}disable(){const e=this;e.enabled&&(e.enabled=!1,e.params.grabCursor&&e.unsetGrabCursor(),e.emit("disable"))}setProgress(e,t){e=Math.min(Math.max(e,0),1);const s=this.minTranslate(),a=(this.maxTranslate()-s)*e+s;this.translateTo(a,void 0===t?0:t),this.updateActiveIndex(),this.updateSlidesClasses()}emitContainerClasses(){const e=this;if(!e.params._emitClasses||!e.el)return;const t=e.el.className.split(" ").filter(t=>0===t.indexOf("swiper")||0===t.indexOf(e.params.containerModifierClass));e.emit("_containerClasses",t.join(" "))}getSlideClasses(e){const t=this;return e.className.split(" ").filter(e=>0===e.indexOf("swiper-slide")||0===e.indexOf(t.params.slideClass)).join(" ")}emitSlidesClasses(){const e=this;if(!e.params._emitClasses||!e.el)return;const t=[];e.slides.each(s=>{const a=e.getSlideClasses(s);t.push({slideEl:s,classNames:a}),e.emit("_slideClass",s,a)}),e.emit("_slideClasses",t)}slidesPerViewDynamic(e="current",t=!1){const{params:s,slides:a,slidesGrid:i,slidesSizesGrid:n,size:r,activeIndex:o}=this;let l=1;if(s.centeredSlides){let e,t=a[o].swiperSlideSize;for(let s=o+1;s<a.length;s+=1)a[s]&&!e&&(l+=1,(t+=a[s].swiperSlideSize)>r&&(e=!0));for(let s=o-1;s>=0;s-=1)a[s]&&!e&&(l+=1,(t+=a[s].swiperSlideSize)>r&&(e=!0))}else if("current"===e)for(let c=o+1;c<a.length;c+=1){(t?i[c]+n[c]-i[o]<r:i[c]-i[o]<r)&&(l+=1)}else for(let c=o-1;c>=0;c-=1){i[o]-i[c]<r&&(l+=1)}return l}update(){const e=this;if(!e||e.destroyed)return;const{snapGrid:t,params:s}=e;function a(){const t=e.rtlTranslate?-1*e.translate:e.translate,s=Math.min(Math.max(t,e.maxTranslate()),e.minTranslate());e.setTranslate(s),e.updateActiveIndex(),e.updateSlidesClasses()}let i;s.breakpoints&&e.setBreakpoint(),e.updateSize(),e.updateSlides(),e.updateProgress(),e.updateSlidesClasses(),e.params.freeMode&&e.params.freeMode.enabled?(a(),e.params.autoHeight&&e.updateAutoHeight()):(i=("auto"===e.params.slidesPerView||e.params.slidesPerView>1)&&e.isEnd&&!e.params.centeredSlides?e.slideTo(e.slides.length-1,0,!1,!0):e.slideTo(e.activeIndex,0,!1,!0))||a(),s.watchOverflow&&t!==e.snapGrid&&e.checkOverflow(),e.emit("update")}changeDirection(e,t=!0){const s=this,a=s.params.direction;return e||(e="horizontal"===a?"vertical":"horizontal"),e===a||"horizontal"!==e&&"vertical"!==e?s:(s.$el.removeClass("".concat(s.params.containerModifierClass).concat(a)).addClass("".concat(s.params.containerModifierClass).concat(e)),s.emitContainerClasses(),s.params.direction=e,s.slides.each(t=>{"vertical"===e?t.style.width="":t.style.height=""}),s.emit("changeDirection"),t&&s.update(),s)}mount(e){const t=this;if(t.mounted)return!0;const s=p(e||t.params.el);if(!(e=s[0]))return!1;e.swiper=t;const a=()=>".".concat((t.params.wrapperClass||"").trim().split(" ").join("."));let i=(()=>{if(e&&e.shadowRoot&&e.shadowRoot.querySelector){const t=p(e.shadowRoot.querySelector(a()));return t.children=(e=>s.children(e)),t}return s.children(a())})();if(0===i.length&&t.params.createElements){const e=n().createElement("div");i=p(e),e.className=t.params.wrapperClass,s.append(e),s.children(".".concat(t.params.slideClass)).each(e=>{i.append(e)})}return Object.assign(t,{$el:s,el:e,$wrapperEl:i,wrapperEl:i[0],mounted:!0,rtl:"rtl"===e.dir.toLowerCase()||"rtl"===s.css("direction"),rtlTranslate:"horizontal"===t.params.direction&&("rtl"===e.dir.toLowerCase()||"rtl"===s.css("direction")),wrongRTL:"-webkit-box"===i.css("display")}),!0}init(e){const t=this;return t.initialized?t:!1===t.mount(e)?t:(t.emit("beforeInit"),t.params.breakpoints&&t.setBreakpoint(),t.addClasses(),t.params.loop&&t.loopCreate(),t.updateSize(),t.updateSlides(),t.params.watchOverflow&&t.checkOverflow(),t.params.grabCursor&&t.enabled&&t.setGrabCursor(),t.params.preloadImages&&t.preloadImages(),t.params.loop?t.slideTo(t.params.initialSlide+t.loopedSlides,0,t.params.runCallbacksOnInit,!1,!0):t.slideTo(t.params.initialSlide,0,t.params.runCallbacksOnInit,!1,!0),t.attachEvents(),t.initialized=!0,t.emit("init"),t.emit("afterInit"),t)}destroy(e=!0,t=!0){const s=this,{params:a,$el:i,$wrapperEl:n,slides:r}=s;return void 0===s.params||s.destroyed?null:(s.emit("beforeDestroy"),s.initialized=!1,s.detachEvents(),a.loop&&s.loopDestroy(),t&&(s.removeClasses(),i.removeAttr("style"),n.removeAttr("style"),r&&r.length&&r.removeClass([a.slideVisibleClass,a.slideActiveClass,a.slideNextClass,a.slidePrevClass].join(" ")).removeAttr("style").removeAttr("data-swiper-slide-index")),s.emit("destroy"),Object.keys(s.eventsListeners).forEach(e=>{s.off(e)}),!1!==e&&(s.$el[0].swiper=null,function(e){const t=e;Object.keys(t).forEach(e=>{try{t[e]=null}catch(s){}try{delete t[e]}catch(s){}})}(s)),s.destroyed=!0,null)}static extendDefaults(e){v(N,e)}static get extendedDefaults(){return N}static get defaults(){return A}static installModule(e){B.prototype.__modules__||(B.prototype.__modules__=[]);const t=B.prototype.__modules__;"function"==typeof e&&t.indexOf(e)<0&&t.push(e)}static use(e){return Array.isArray(e)?(e.forEach(e=>B.installModule(e)),B):(B.installModule(e),B)}}function X(e,t,s,a){const i=n();return e.params.createElements&&Object.keys(a).forEach(n=>{if(!s[n]&&!0===s.auto){let r=e.$el.children(".".concat(a[n]))[0];r||((r=i.createElement("div")).className=a[n],e.$el.append(r)),s[n]=r,t[n]=r}}),s}function H(e=""){return".".concat(e.trim().replace(/([\.:!\/])/g,"\\$1").replace(/ /g,"."))}function Y(e){const t=this,{$wrapperEl:s,params:i}=t;if(i.loop&&t.loopDestroy(),"object"===a(e)&&"length"in e)for(let a=0;a<e.length;a+=1)e[a]&&s.append(e[a]);else s.append(e);i.loop&&t.loopCreate(),i.observer||t.update()}function W(e){const t=this,{params:s,$wrapperEl:i,activeIndex:n}=t;s.loop&&t.loopDestroy();let r=n+1;if("object"===a(e)&&"length"in e){for(let t=0;t<e.length;t+=1)e[t]&&i.prepend(e[t]);r=n+e.length}else i.prepend(e);s.loop&&t.loopCreate(),s.observer||t.update(),t.slideTo(r,0,!1)}function j(e,t){const s=this,{$wrapperEl:i,params:n,activeIndex:r}=s;let o=r;n.loop&&(o-=s.loopedSlides,s.loopDestroy(),s.slides=i.children(".".concat(n.slideClass)));const l=s.slides.length;if(e<=0)return void s.prependSlide(t);if(e>=l)return void s.appendSlide(t);let c=o>e?o+1:o;const d=[];for(let a=l-1;a>=e;a-=1){const e=s.slides.eq(a);e.remove(),d.unshift(e)}if("object"===a(t)&&"length"in t){for(let e=0;e<t.length;e+=1)t[e]&&i.append(t[e]);c=o>e?o+t.length:o}else i.append(t);for(let a=0;a<d.length;a+=1)i.append(d[a]);n.loop&&s.loopCreate(),n.observer||s.update(),n.loop?s.slideTo(c+s.loopedSlides,0,!1):s.slideTo(c,0,!1)}function R(e){const t=this,{params:s,$wrapperEl:i,activeIndex:n}=t;let r=n;s.loop&&(r-=t.loopedSlides,t.loopDestroy(),t.slides=i.children(".".concat(s.slideClass)));let o,l=r;if("object"===a(e)&&"length"in e){for(let s=0;s<e.length;s+=1)o=e[s],t.slides[o]&&t.slides.eq(o).remove(),o<l&&(l-=1);l=Math.max(l,0)}else o=e,t.slides[o]&&t.slides.eq(o).remove(),o<l&&(l-=1),l=Math.max(l,0);s.loop&&t.loopCreate(),s.observer||t.update(),s.loop?t.slideTo(l+t.loopedSlides,0,!1):t.slideTo(l,0,!1)}function _(){const e=this,t=[];for(let s=0;s<e.slides.length;s+=1)t.push(s);e.removeSlide(t)}function V(e){const{effect:t,swiper:s,on:a,setTranslate:i,setTransition:n,overwriteParams:r,perspective:o}=e;a("beforeInit",()=>{if(s.params.effect!==t)return;s.classNames.push("".concat(s.params.containerModifierClass).concat(t)),o&&o()&&s.classNames.push("".concat(s.params.containerModifierClass,"3d"));const e=r?r():{};Object.assign(s.params,e),Object.assign(s.originalParams,e)}),a("setTranslate",()=>{s.params.effect===t&&i()}),a("setTransition",(e,a)=>{s.params.effect===t&&n(a)})}function q(e,t){return e.transformEl?t.find(e.transformEl).css({"backface-visibility":"hidden","-webkit-backface-visibility":"hidden"}):t}function F({swiper:e,duration:t,transformEl:s,allSlides:a}){const{slides:i,activeIndex:n,$wrapperEl:r}=e;if(e.params.virtualTranslate&&0!==t){let t,o=!1;(t=a?s?i.find(s):i:s?i.eq(n).find(s):i.eq(n)).transitionEnd(()=>{if(o)return;if(!e||e.destroyed)return;o=!0,e.animating=!1;const t=["webkitTransitionEnd","transitionend"];for(let e=0;e<t.length;e+=1)r.trigger(t[e])})}}function U(e,t,s){const a="swiper-slide-shadow".concat(s?"-".concat(s):""),i=e.transformEl?t.find(e.transformEl):t;let n=i.children(".".concat(a));return n.length||(n=p('<div class="swiper-slide-shadow'.concat(s?"-".concat(s):"",'"></div>')),i.append(n)),n}Object.keys(G).forEach(e=>{Object.keys(G[e]).forEach(t=>{B.prototype[t]=G[e][t]})}),B.use([function({swiper:e,on:t,emit:s}){const a=o();let i=null;const n=()=>{e&&!e.destroyed&&e.initialized&&(s("beforeResize"),s("resize"))},r=()=>{e&&!e.destroyed&&e.initialized&&s("orientationchange")};t("init",()=>{e.params.resizeObserver&&void 0!==a.ResizeObserver?e&&!e.destroyed&&e.initialized&&(i=new ResizeObserver(t=>{const{width:s,height:a}=e;let i=s,r=a;t.forEach(({contentBoxSize:t,contentRect:s,target:a})=>{a&&a!==e.el||(i=s?s.width:(t[0]||t).inlineSize,r=s?s.height:(t[0]||t).blockSize)}),i===s&&r===a||n()})).observe(e.el):(a.addEventListener("resize",n),a.addEventListener("orientationchange",r))}),t("destroy",()=>{i&&i.unobserve&&e.el&&(i.unobserve(e.el),i=null),a.removeEventListener("resize",n),a.removeEventListener("orientationchange",r)})},function({swiper:e,extendParams:t,on:s,emit:a}){const i=[],n=o(),r=(e,t={})=>{const s=new(n.MutationObserver||n.WebkitMutationObserver)(e=>{if(1===e.length)return void a("observerUpdate",e[0]);const t=function(){a("observerUpdate",e[0])};n.requestAnimationFrame?n.requestAnimationFrame(t):n.setTimeout(t,0)});s.observe(e,{attributes:void 0===t.attributes||t.attributes,childList:void 0===t.childList||t.childList,characterData:void 0===t.characterData||t.characterData}),i.push(s)};t({observer:!1,observeParents:!1,observeSlideChildren:!1}),s("init",()=>{if(e.params.observer){if(e.params.observeParents){const t=e.$el.parents();for(let e=0;e<t.length;e+=1)r(t[e])}r(e.$el[0],{childList:e.params.observeSlideChildren}),r(e.$wrapperEl[0],{attributes:!1})}}),s("destroy",()=>{i.forEach(e=>{e.disconnect()}),i.splice(0,i.length)})}]);const K=[function({swiper:e,extendParams:t,on:s}){let i;function n(t,s){const a=e.params.virtual;if(a.cache&&e.virtual.cache[s])return e.virtual.cache[s];const i=a.renderSlide?p(a.renderSlide.call(e,t,s)):p('<div class="'.concat(e.params.slideClass,'" data-swiper-slide-index="').concat(s,'">').concat(t,"</div>"));return i.attr("data-swiper-slide-index")||i.attr("data-swiper-slide-index",s),a.cache&&(e.virtual.cache[s]=i),i}function r(t){const{slidesPerView:s,slidesPerGroup:a,centeredSlides:i}=e.params,{addSlidesBefore:r,addSlidesAfter:o}=e.params.virtual,{from:l,to:c,slides:d,slidesGrid:p,offset:u}=e.virtual;e.params.cssMode||e.updateActiveIndex();const h=e.activeIndex||0;let m,f,g;m=e.rtlTranslate?"right":e.isHorizontal()?"left":"top",i?(f=Math.floor(s/2)+a+o,g=Math.floor(s/2)+a+r):(f=s+(a-1)+o,g=a+r);const v=Math.max((h||0)-g,0),w=Math.min((h||0)+f,d.length-1),b=(e.slidesGrid[v]||0)-(e.slidesGrid[0]||0);function x(){e.updateSlides(),e.updateProgress(),e.updateSlidesClasses(),e.lazy&&e.params.lazy.enabled&&e.lazy.load()}if(Object.assign(e.virtual,{from:v,to:w,offset:b,slidesGrid:e.slidesGrid}),l===v&&c===w&&!t)return e.slidesGrid!==p&&b!==u&&e.slides.css(m,"".concat(b,"px")),void e.updateProgress();if(e.params.virtual.renderExternal)return e.params.virtual.renderExternal.call(e,{offset:b,from:v,to:w,slides:function(){const e=[];for(let t=v;t<=w;t+=1)e.push(d[t]);return e}()}),void(e.params.virtual.renderExternalUpdate&&x());const y=[],E=[];if(t)e.$wrapperEl.find(".".concat(e.params.slideClass)).remove();else for(let n=l;n<=c;n+=1)(n<v||n>w)&&e.$wrapperEl.find(".".concat(e.params.slideClass,'[data-swiper-slide-index="').concat(n,'"]')).remove();for(let e=0;e<d.length;e+=1)e>=v&&e<=w&&(void 0===c||t?E.push(e):(e>c&&E.push(e),e<l&&y.push(e)));E.forEach(t=>{e.$wrapperEl.append(n(d[t],t))}),y.sort((e,t)=>t-e).forEach(t=>{e.$wrapperEl.prepend(n(d[t],t))}),e.$wrapperEl.children(".swiper-slide").css(m,"".concat(b,"px")),x()}t({virtual:{enabled:!1,slides:[],cache:!0,renderSlide:null,renderExternal:null,renderExternalUpdate:!0,addSlidesBefore:0,addSlidesAfter:0}}),e.virtual={cache:{},from:void 0,to:void 0,slides:[],offset:0,slidesGrid:[]},s("beforeInit",()=>{e.params.virtual.enabled&&(e.virtual.slides=e.params.virtual.slides,e.classNames.push("".concat(e.params.containerModifierClass,"virtual")),e.params.watchSlidesProgress=!0,e.originalParams.watchSlidesProgress=!0,e.params.initialSlide||r())}),s("setTranslate",()=>{e.params.virtual.enabled&&(e.params.cssMode&&!e._immediateVirtual?(clearTimeout(i),i=setTimeout(()=>{r()},100)):r())}),s("init update resize",()=>{e.params.virtual.enabled&&e.params.cssMode&&w(e.wrapperEl,"--swiper-virtual-size","".concat(e.virtualSize,"px"))}),Object.assign(e.virtual,{appendSlide:function(t){if("object"===a(t)&&"length"in t)for(let s=0;s<t.length;s+=1)t[s]&&e.virtual.slides.push(t[s]);else e.virtual.slides.push(t);r(!0)},prependSlide:function(t){const s=e.activeIndex;let a=s+1,i=1;if(Array.isArray(t)){for(let s=0;s<t.length;s+=1)t[s]&&e.virtual.slides.unshift(t[s]);a=s+t.length,i=t.length}else e.virtual.slides.unshift(t);if(e.params.virtual.cache){const t=e.virtual.cache,s={};Object.keys(t).forEach(e=>{const a=t[e],n=a.attr("data-swiper-slide-index");n&&a.attr("data-swiper-slide-index",parseInt(n,10)+i),s[parseInt(e,10)+i]=a}),e.virtual.cache=s}r(!0),e.slideTo(a,0)},removeSlide:function(t){if(null==t)return;let s=e.activeIndex;if(Array.isArray(t))for(let a=t.length-1;a>=0;a-=1)e.virtual.slides.splice(t[a],1),e.params.virtual.cache&&delete e.virtual.cache[t[a]],t[a]<s&&(s-=1),s=Math.max(s,0);else e.virtual.slides.splice(t,1),e.params.virtual.cache&&delete e.virtual.cache[t],t<s&&(s-=1),s=Math.max(s,0);r(!0),e.slideTo(s,0)},removeAllSlides:function(){e.virtual.slides=[],e.params.virtual.cache&&(e.virtual.cache={}),r(!0),e.slideTo(0,0)},update:r})},function({swiper:e,extendParams:t,on:s,emit:a}){const i=n(),r=o();function l(t){if(!e.enabled)return;const{rtlTranslate:s}=e;let n=t;n.originalEvent&&(n=n.originalEvent);const o=n.keyCode||n.charCode,l=e.params.keyboard.pageUpDown,c=l&&33===o,d=l&&34===o,p=37===o,u=39===o,h=38===o,m=40===o;if(!e.allowSlideNext&&(e.isHorizontal()&&u||e.isVertical()&&m||d))return!1;if(!e.allowSlidePrev&&(e.isHorizontal()&&p||e.isVertical()&&h||c))return!1;if(!(n.shiftKey||n.altKey||n.ctrlKey||n.metaKey||i.activeElement&&i.activeElement.nodeName&&("input"===i.activeElement.nodeName.toLowerCase()||"textarea"===i.activeElement.nodeName.toLowerCase()))){if(e.params.keyboard.onlyInViewport&&(c||d||p||u||h||m)){let t=!1;if(e.$el.parents(".".concat(e.params.slideClass)).length>0&&0===e.$el.parents(".".concat(e.params.slideActiveClass)).length)return;const a=e.$el,i=a[0].clientWidth,n=a[0].clientHeight,o=r.innerWidth,l=r.innerHeight,c=e.$el.offset();s&&(c.left-=e.$el[0].scrollLeft);const d=[[c.left,c.top],[c.left+i,c.top],[c.left,c.top+n],[c.left+i,c.top+n]];for(let e=0;e<d.length;e+=1){const s=d[e];if(s[0]>=0&&s[0]<=o&&s[1]>=0&&s[1]<=l){if(0===s[0]&&0===s[1])continue;t=!0}}if(!t)return}e.isHorizontal()?((c||d||p||u)&&(n.preventDefault?n.preventDefault():n.returnValue=!1),((d||u)&&!s||(c||p)&&s)&&e.slideNext(),((c||p)&&!s||(d||u)&&s)&&e.slidePrev()):((c||d||h||m)&&(n.preventDefault?n.preventDefault():n.returnValue=!1),(d||m)&&e.slideNext(),(c||h)&&e.slidePrev()),a("keyPress",o)}}function c(){e.keyboard.enabled||(p(i).on("keydown",l),e.keyboard.enabled=!0)}function d(){e.keyboard.enabled&&(p(i).off("keydown",l),e.keyboard.enabled=!1)}e.keyboard={enabled:!1},t({keyboard:{enabled:!1,onlyInViewport:!0,pageUpDown:!0}}),s("init",()=>{e.params.keyboard.enabled&&c()}),s("destroy",()=>{e.keyboard.enabled&&d()}),Object.assign(e.keyboard,{enable:c,disable:d})},function({swiper:e,extendParams:t,on:s,emit:a}){const i=o();let n;t({mousewheel:{enabled:!1,releaseOnEdges:!1,invert:!1,forceToAxis:!1,sensitivity:1,eventsTarget:"container",thresholdDelta:null,thresholdTime:null}}),e.mousewheel={enabled:!1};let r,l=m();const c=[];function d(){e.enabled&&(e.mouseEntered=!0)}function u(){e.enabled&&(e.mouseEntered=!1)}function f(t){return!(e.params.mousewheel.thresholdDelta&&t.delta<e.params.mousewheel.thresholdDelta||e.params.mousewheel.thresholdTime&&m()-l<e.params.mousewheel.thresholdTime||!(t.delta>=6&&m()-l<60)&&(t.direction<0?e.isEnd&&!e.params.loop||e.animating||(e.slideNext(),a("scroll",t.raw)):e.isBeginning&&!e.params.loop||e.animating||(e.slidePrev(),a("scroll",t.raw)),l=(new i.Date).getTime(),1))}function g(t){let s=t,i=!0;if(!e.enabled)return;const o=e.params.mousewheel;e.params.cssMode&&s.preventDefault();let l=e.$el;if("container"!==e.params.mousewheel.eventsTarget&&(l=p(e.params.mousewheel.eventsTarget)),!e.mouseEntered&&!l[0].contains(s.target)&&!o.releaseOnEdges)return!0;s.originalEvent&&(s=s.originalEvent);let d=0;const u=e.rtlTranslate?-1:1,g=function(e){let t=0,s=0,a=0,i=0;return"detail"in e&&(s=e.detail),"wheelDelta"in e&&(s=-e.wheelDelta/120),"wheelDeltaY"in e&&(s=-e.wheelDeltaY/120),"wheelDeltaX"in e&&(t=-e.wheelDeltaX/120),"axis"in e&&e.axis===e.HORIZONTAL_AXIS&&(t=s,s=0),a=10*t,i=10*s,"deltaY"in e&&(i=e.deltaY),"deltaX"in e&&(a=e.deltaX),e.shiftKey&&!a&&(a=i,i=0),(a||i)&&e.deltaMode&&(1===e.deltaMode?(a*=40,i*=40):(a*=800,i*=800)),a&&!t&&(t=a<1?-1:1),i&&!s&&(s=i<1?-1:1),{spinX:t,spinY:s,pixelX:a,pixelY:i}}(s);if(o.forceToAxis)if(e.isHorizontal()){if(!(Math.abs(g.pixelX)>Math.abs(g.pixelY)))return!0;d=-g.pixelX*u}else{if(!(Math.abs(g.pixelY)>Math.abs(g.pixelX)))return!0;d=-g.pixelY}else d=Math.abs(g.pixelX)>Math.abs(g.pixelY)?-g.pixelX*u:-g.pixelY;if(0===d)return!0;o.invert&&(d=-d);let v=e.getTranslate()+d*o.sensitivity;if(v>=e.minTranslate()&&(v=e.minTranslate()),v<=e.maxTranslate()&&(v=e.maxTranslate()),(i=!!e.params.loop||!(v===e.minTranslate()||v===e.maxTranslate()))&&e.params.nested&&s.stopPropagation(),e.params.freeMode&&e.params.freeMode.enabled){const t={time:m(),delta:Math.abs(d),direction:Math.sign(d)},i=r&&t.time<r.time+500&&t.delta<=r.delta&&t.direction===r.direction;if(!i){r=void 0,e.params.loop&&e.loopFix();let l=e.getTranslate()+d*o.sensitivity;const p=e.isBeginning,u=e.isEnd;if(l>=e.minTranslate()&&(l=e.minTranslate()),l<=e.maxTranslate()&&(l=e.maxTranslate()),e.setTransition(0),e.setTranslate(l),e.updateProgress(),e.updateActiveIndex(),e.updateSlidesClasses(),(!p&&e.isBeginning||!u&&e.isEnd)&&e.updateSlidesClasses(),e.params.freeMode.sticky){clearTimeout(n),n=void 0,c.length>=15&&c.shift();const s=c.length?c[c.length-1]:void 0,a=c[0];if(c.push(t),s&&(t.delta>s.delta||t.direction!==s.direction))c.splice(0);else if(c.length>=15&&t.time-a.time<500&&a.delta-t.delta>=1&&t.delta<=6){const s=d>0?.8:.2;r=t,c.splice(0),n=h(()=>{e.slideToClosest(e.params.speed,!0,void 0,s)},0)}n||(n=h(()=>{r=t,c.splice(0),e.slideToClosest(e.params.speed,!0,void 0,.5)},500))}if(i||a("scroll",s),e.params.autoplay&&e.params.autoplayDisableOnInteraction&&e.autoplay.stop(),l===e.minTranslate()||l===e.maxTranslate())return!0}}else{const s={time:m(),delta:Math.abs(d),direction:Math.sign(d),raw:t};c.length>=2&&c.shift();const a=c.length?c[c.length-1]:void 0;if(c.push(s),a?(s.direction!==a.direction||s.delta>a.delta||s.time>a.time+150)&&f(s):f(s),function(t){const s=e.params.mousewheel;if(t.direction<0){if(e.isEnd&&!e.params.loop&&s.releaseOnEdges)return!0}else if(e.isBeginning&&!e.params.loop&&s.releaseOnEdges)return!0;return!1}(s))return!0}return s.preventDefault?s.preventDefault():s.returnValue=!1,!1}function v(t){let s=e.$el;"container"!==e.params.mousewheel.eventsTarget&&(s=p(e.params.mousewheel.eventsTarget)),s[t]("mouseenter",d),s[t]("mouseleave",u),s[t]("wheel",g)}function w(){return e.params.cssMode?(e.wrapperEl.removeEventListener("wheel",g),!0):!e.mousewheel.enabled&&(v("on"),e.mousewheel.enabled=!0,!0)}function b(){return e.params.cssMode?(e.wrapperEl.addEventListener(event,g),!0):!!e.mousewheel.enabled&&(v("off"),e.mousewheel.enabled=!1,!0)}s("init",()=>{!e.params.mousewheel.enabled&&e.params.cssMode&&b(),e.params.mousewheel.enabled&&w()}),s("destroy",()=>{e.params.cssMode&&w(),e.mousewheel.enabled&&b()}),Object.assign(e.mousewheel,{enable:w,disable:b})},function({swiper:e,extendParams:t,on:s,emit:a}){function i(t){let s;return t&&(s=p(t),e.params.uniqueNavElements&&"string"==typeof t&&s.length>1&&1===e.$el.find(t).length&&(s=e.$el.find(t))),s}function n(t,s){const a=e.params.navigation;t&&t.length>0&&(t[s?"addClass":"removeClass"](a.disabledClass),t[0]&&"BUTTON"===t[0].tagName&&(t[0].disabled=s),e.params.watchOverflow&&e.enabled&&t[e.isLocked?"addClass":"removeClass"](a.lockClass))}function r(){if(e.params.loop)return;const{$nextEl:t,$prevEl:s}=e.navigation;n(s,e.isBeginning&&!e.params.rewind),n(t,e.isEnd&&!e.params.rewind)}function o(t){t.preventDefault(),(!e.isBeginning||e.params.loop||e.params.rewind)&&e.slidePrev()}function l(t){t.preventDefault(),(!e.isEnd||e.params.loop||e.params.rewind)&&e.slideNext()}function c(){const t=e.params.navigation;if(e.params.navigation=X(e,e.originalParams.navigation,e.params.navigation,{nextEl:"swiper-button-next",prevEl:"swiper-button-prev"}),!t.nextEl&&!t.prevEl)return;const s=i(t.nextEl),a=i(t.prevEl);s&&s.length>0&&s.on("click",l),a&&a.length>0&&a.on("click",o),Object.assign(e.navigation,{$nextEl:s,nextEl:s&&s[0],$prevEl:a,prevEl:a&&a[0]}),e.enabled||(s&&s.addClass(t.lockClass),a&&a.addClass(t.lockClass))}function d(){const{$nextEl:t,$prevEl:s}=e.navigation;t&&t.length&&(t.off("click",l),t.removeClass(e.params.navigation.disabledClass)),s&&s.length&&(s.off("click",o),s.removeClass(e.params.navigation.disabledClass))}t({navigation:{nextEl:null,prevEl:null,hideOnClick:!1,disabledClass:"swiper-button-disabled",hiddenClass:"swiper-button-hidden",lockClass:"swiper-button-lock"}}),e.navigation={nextEl:null,$nextEl:null,prevEl:null,$prevEl:null},s("init",()=>{c(),r()}),s("toEdge fromEdge lock unlock",()=>{r()}),s("destroy",()=>{d()}),s("enable disable",()=>{const{$nextEl:t,$prevEl:s}=e.navigation;t&&t[e.enabled?"removeClass":"addClass"](e.params.navigation.lockClass),s&&s[e.enabled?"removeClass":"addClass"](e.params.navigation.lockClass)}),s("click",(t,s)=>{const{$nextEl:i,$prevEl:n}=e.navigation,r=s.target;if(e.params.navigation.hideOnClick&&!p(r).is(n)&&!p(r).is(i)){if(e.pagination&&e.params.pagination&&e.params.pagination.clickable&&(e.pagination.el===r||e.pagination.el.contains(r)))return;let t;i?t=i.hasClass(e.params.navigation.hiddenClass):n&&(t=n.hasClass(e.params.navigation.hiddenClass)),a(!0===t?"navigationShow":"navigationHide"),i&&i.toggleClass(e.params.navigation.hiddenClass),n&&n.toggleClass(e.params.navigation.hiddenClass)}}),Object.assign(e.navigation,{update:r,init:c,destroy:d})},function({swiper:e,extendParams:t,on:s,emit:a}){const i="swiper-pagination";let n;t({pagination:{el:null,bulletElement:"span",clickable:!1,hideOnClick:!1,renderBullet:null,renderProgressbar:null,renderFraction:null,renderCustom:null,progressbarOpposite:!1,type:"bullets",dynamicBullets:!1,dynamicMainBullets:1,formatFractionCurrent:e=>e,formatFractionTotal:e=>e,bulletClass:"".concat(i,"-bullet"),bulletActiveClass:"".concat(i,"-bullet-active"),modifierClass:"".concat(i,"-"),currentClass:"".concat(i,"-current"),totalClass:"".concat(i,"-total"),hiddenClass:"".concat(i,"-hidden"),progressbarFillClass:"".concat(i,"-progressbar-fill"),progressbarOppositeClass:"".concat(i,"-progressbar-opposite"),clickableClass:"".concat(i,"-clickable"),lockClass:"".concat(i,"-lock"),horizontalClass:"".concat(i,"-horizontal"),verticalClass:"".concat(i,"-vertical")}}),e.pagination={el:null,$el:null,bullets:[]};let r=0;function o(){return!e.params.pagination.el||!e.pagination.el||!e.pagination.$el||0===e.pagination.$el.length}function l(t,s){const{bulletActiveClass:a}=e.params.pagination;t[s]().addClass("".concat(a,"-").concat(s))[s]().addClass("".concat(a,"-").concat(s,"-").concat(s))}function c(){const t=e.rtl,s=e.params.pagination;if(o())return;const i=e.virtual&&e.params.virtual.enabled?e.virtual.slides.length:e.slides.length,c=e.pagination.$el;let d;const u=e.params.loop?Math.ceil((i-2*e.loopedSlides)/e.params.slidesPerGroup):e.snapGrid.length;if(e.params.loop?((d=Math.ceil((e.activeIndex-e.loopedSlides)/e.params.slidesPerGroup))>i-1-2*e.loopedSlides&&(d-=i-2*e.loopedSlides),d>u-1&&(d-=u),d<0&&"bullets"!==e.params.paginationType&&(d=u+d)):d=void 0!==e.snapIndex?e.snapIndex:e.activeIndex||0,"bullets"===s.type&&e.pagination.bullets&&e.pagination.bullets.length>0){const a=e.pagination.bullets;let i,o,u;if(s.dynamicBullets&&(n=a.eq(0)[e.isHorizontal()?"outerWidth":"outerHeight"](!0),c.css(e.isHorizontal()?"width":"height","".concat(n*(s.dynamicMainBullets+4),"px")),s.dynamicMainBullets>1&&void 0!==e.previousIndex&&((r+=d-(e.previousIndex-e.loopedSlides||0))>s.dynamicMainBullets-1?r=s.dynamicMainBullets-1:r<0&&(r=0)),i=Math.max(d-r,0),u=((o=i+(Math.min(a.length,s.dynamicMainBullets)-1))+i)/2),a.removeClass(["","-next","-next-next","-prev","-prev-prev","-main"].map(e=>"".concat(s.bulletActiveClass).concat(e)).join(" ")),c.length>1)a.each(e=>{const t=p(e),a=t.index();a===d&&t.addClass(s.bulletActiveClass),s.dynamicBullets&&(a>=i&&a<=o&&t.addClass("".concat(s.bulletActiveClass,"-main")),a===i&&l(t,"prev"),a===o&&l(t,"next"))});else{const t=a.eq(d),n=t.index();if(t.addClass(s.bulletActiveClass),s.dynamicBullets){const t=a.eq(i),r=a.eq(o);for(let e=i;e<=o;e+=1)a.eq(e).addClass("".concat(s.bulletActiveClass,"-main"));if(e.params.loop)if(n>=a.length){for(let e=s.dynamicMainBullets;e>=0;e-=1)a.eq(a.length-e).addClass("".concat(s.bulletActiveClass,"-main"));a.eq(a.length-s.dynamicMainBullets-1).addClass("".concat(s.bulletActiveClass,"-prev"))}else l(t,"prev"),l(r,"next");else l(t,"prev"),l(r,"next")}}if(s.dynamicBullets){const i=Math.min(a.length,s.dynamicMainBullets+4),r=(n*i-n)/2-u*n,o=t?"right":"left";a.css(e.isHorizontal()?o:"top","".concat(r,"px"))}}if("fraction"===s.type&&(c.find(H(s.currentClass)).text(s.formatFractionCurrent(d+1)),c.find(H(s.totalClass)).text(s.formatFractionTotal(u))),"progressbar"===s.type){let t;t=s.progressbarOpposite?e.isHorizontal()?"vertical":"horizontal":e.isHorizontal()?"horizontal":"vertical";const a=(d+1)/u;let i=1,n=1;"horizontal"===t?i=a:n=a,c.find(H(s.progressbarFillClass)).transform("translate3d(0,0,0) scaleX(".concat(i,") scaleY(").concat(n,")")).transition(e.params.speed)}"custom"===s.type&&s.renderCustom?(c.html(s.renderCustom(e,d+1,u)),a("paginationRender",c[0])):a("paginationUpdate",c[0]),e.params.watchOverflow&&e.enabled&&c[e.isLocked?"addClass":"removeClass"](s.lockClass)}function d(){const t=e.params.pagination;if(o())return;const s=e.virtual&&e.params.virtual.enabled?e.virtual.slides.length:e.slides.length,i=e.pagination.$el;let n="";if("bullets"===t.type){let a=e.params.loop?Math.ceil((s-2*e.loopedSlides)/e.params.slidesPerGroup):e.snapGrid.length;e.params.freeMode&&e.params.freeMode.enabled&&!e.params.loop&&a>s&&(a=s);for(let s=0;s<a;s+=1)t.renderBullet?n+=t.renderBullet.call(e,s,t.bulletClass):n+="<".concat(t.bulletElement,' class="').concat(t.bulletClass,'"></').concat(t.bulletElement,">");i.html(n),e.pagination.bullets=i.find(H(t.bulletClass))}"fraction"===t.type&&(n=t.renderFraction?t.renderFraction.call(e,t.currentClass,t.totalClass):'<span class="'.concat(t.currentClass,'"></span>')+" / "+'<span class="'.concat(t.totalClass,'"></span>'),i.html(n)),"progressbar"===t.type&&(n=t.renderProgressbar?t.renderProgressbar.call(e,t.progressbarFillClass):'<span class="'.concat(t.progressbarFillClass,'"></span>'),i.html(n)),"custom"!==t.type&&a("paginationRender",e.pagination.$el[0])}function u(){e.params.pagination=X(e,e.originalParams.pagination,e.params.pagination,{el:"swiper-pagination"});const t=e.params.pagination;if(!t.el)return;let s=p(t.el);0!==s.length&&(e.params.uniqueNavElements&&"string"==typeof t.el&&s.length>1&&(s=e.$el.find(t.el)).length>1&&(s=s.filter(t=>p(t).parents(".swiper")[0]===e.el)),"bullets"===t.type&&t.clickable&&s.addClass(t.clickableClass),s.addClass(t.modifierClass+t.type),s.addClass(t.modifierClass+e.params.direction),"bullets"===t.type&&t.dynamicBullets&&(s.addClass("".concat(t.modifierClass).concat(t.type,"-dynamic")),r=0,t.dynamicMainBullets<1&&(t.dynamicMainBullets=1)),"progressbar"===t.type&&t.progressbarOpposite&&s.addClass(t.progressbarOppositeClass),t.clickable&&s.on("click",H(t.bulletClass),function(t){t.preventDefault();let s=p(this).index()*e.params.slidesPerGroup;e.params.loop&&(s+=e.loopedSlides),e.slideTo(s)}),Object.assign(e.pagination,{$el:s,el:s[0]}),e.enabled||s.addClass(t.lockClass))}function h(){const t=e.params.pagination;if(o())return;const s=e.pagination.$el;s.removeClass(t.hiddenClass),s.removeClass(t.modifierClass+t.type),s.removeClass(t.modifierClass+e.params.direction),e.pagination.bullets&&e.pagination.bullets.removeClass&&e.pagination.bullets.removeClass(t.bulletActiveClass),t.clickable&&s.off("click",H(t.bulletClass))}s("init",()=>{u(),d(),c()}),s("activeIndexChange",()=>{e.params.loop?c():void 0===e.snapIndex&&c()}),s("snapIndexChange",()=>{e.params.loop||c()}),s("slidesLengthChange",()=>{e.params.loop&&(d(),c())}),s("snapGridLengthChange",()=>{e.params.loop||(d(),c())}),s("destroy",()=>{h()}),s("enable disable",()=>{const{$el:t}=e.pagination;t&&t[e.enabled?"removeClass":"addClass"](e.params.pagination.lockClass)}),s("lock unlock",()=>{c()}),s("click",(t,s)=>{const i=s.target,{$el:n}=e.pagination;if(e.params.pagination.el&&e.params.pagination.hideOnClick&&n.length>0&&!p(i).hasClass(e.params.pagination.bulletClass)){if(e.navigation&&(e.navigation.nextEl&&i===e.navigation.nextEl||e.navigation.prevEl&&i===e.navigation.prevEl))return;const t=n.hasClass(e.params.pagination.hiddenClass);a(!0===t?"paginationShow":"paginationHide"),n.toggleClass(e.params.pagination.hiddenClass)}}),Object.assign(e.pagination,{render:d,update:c,init:u,destroy:h})},function({swiper:e,extendParams:t,on:s,emit:a}){const i=n();let r,o,l,c,d=!1,u=null,m=null;function f(){if(!e.params.scrollbar.el||!e.scrollbar.el)return;const{scrollbar:t,rtlTranslate:s,progress:a}=e,{$dragEl:i,$el:n}=t,r=e.params.scrollbar;let c=o,d=(l-o)*a;s?(d=-d)>0?(c=o-d,d=0):-d+o>l&&(c=l+d):d<0?(c=o+d,d=0):d+o>l&&(c=l-d),e.isHorizontal()?(i.transform("translate3d(".concat(d,"px, 0, 0)")),i[0].style.width="".concat(c,"px")):(i.transform("translate3d(0px, ".concat(d,"px, 0)")),i[0].style.height="".concat(c,"px")),r.hide&&(clearTimeout(u),n[0].style.opacity=1,u=setTimeout(()=>{n[0].style.opacity=0,n.transition(400)},1e3))}function g(){if(!e.params.scrollbar.el||!e.scrollbar.el)return;const{scrollbar:t}=e,{$dragEl:s,$el:a}=t;s[0].style.width="",s[0].style.height="",l=e.isHorizontal()?a[0].offsetWidth:a[0].offsetHeight,c=e.size/(e.virtualSize+e.params.slidesOffsetBefore-(e.params.centeredSlides?e.snapGrid[0]:0)),o="auto"===e.params.scrollbar.dragSize?l*c:parseInt(e.params.scrollbar.dragSize,10),e.isHorizontal()?s[0].style.width="".concat(o,"px"):s[0].style.height="".concat(o,"px"),a[0].style.display=c>=1?"none":"",e.params.scrollbar.hide&&(a[0].style.opacity=0),e.params.watchOverflow&&e.enabled&&t.$el[e.isLocked?"addClass":"removeClass"](e.params.scrollbar.lockClass)}function v(t){return e.isHorizontal()?"touchstart"===t.type||"touchmove"===t.type?t.targetTouches[0].clientX:t.clientX:"touchstart"===t.type||"touchmove"===t.type?t.targetTouches[0].clientY:t.clientY}function w(t){const{scrollbar:s,rtlTranslate:a}=e,{$el:i}=s;let n;n=(v(t)-i.offset()[e.isHorizontal()?"left":"top"]-(null!==r?r:o/2))/(l-o),n=Math.max(Math.min(n,1),0),a&&(n=1-n);const c=e.minTranslate()+(e.maxTranslate()-e.minTranslate())*n;e.updateProgress(c),e.setTranslate(c),e.updateActiveIndex(),e.updateSlidesClasses()}function b(t){const s=e.params.scrollbar,{scrollbar:i,$wrapperEl:n}=e,{$el:o,$dragEl:l}=i;d=!0,r=t.target===l[0]||t.target===l?v(t)-t.target.getBoundingClientRect()[e.isHorizontal()?"left":"top"]:null,t.preventDefault(),t.stopPropagation(),n.transition(100),l.transition(100),w(t),clearTimeout(m),o.transition(0),s.hide&&o.css("opacity",1),e.params.cssMode&&e.$wrapperEl.css("scroll-snap-type","none"),a("scrollbarDragStart",t)}function x(t){const{scrollbar:s,$wrapperEl:i}=e,{$el:n,$dragEl:r}=s;d&&(t.preventDefault?t.preventDefault():t.returnValue=!1,w(t),i.transition(0),n.transition(0),r.transition(0),a("scrollbarDragMove",t))}function y(t){const s=e.params.scrollbar,{scrollbar:i,$wrapperEl:n}=e,{$el:r}=i;d&&(d=!1,e.params.cssMode&&(e.$wrapperEl.css("scroll-snap-type",""),n.transition("")),s.hide&&(clearTimeout(m),m=h(()=>{r.css("opacity",0),r.transition(400)},1e3)),a("scrollbarDragEnd",t),s.snapOnRelease&&e.slideToClosest())}function E(t){const{scrollbar:s,touchEventsTouch:a,touchEventsDesktop:n,params:r,support:o}=e,l=s.$el[0],c=!(!o.passiveListener||!r.passiveListeners)&&{passive:!1,capture:!1},d=!(!o.passiveListener||!r.passiveListeners)&&{passive:!0,capture:!1};if(!l)return;const p="on"===t?"addEventListener":"removeEventListener";o.touch?(l[p](a.start,b,c),l[p](a.move,x,c),l[p](a.end,y,d)):(l[p](n.start,b,c),i[p](n.move,x,c),i[p](n.end,y,d))}function T(){const{scrollbar:t,$el:s}=e;e.params.scrollbar=X(e,e.originalParams.scrollbar,e.params.scrollbar,{el:"swiper-scrollbar"});const a=e.params.scrollbar;if(!a.el)return;let i=p(a.el);e.params.uniqueNavElements&&"string"==typeof a.el&&i.length>1&&1===s.find(a.el).length&&(i=s.find(a.el));let n=i.find(".".concat(e.params.scrollbar.dragClass));0===n.length&&(n=p('<div class="'.concat(e.params.scrollbar.dragClass,'"></div>')),i.append(n)),Object.assign(t,{$el:i,el:i[0],$dragEl:n,dragEl:n[0]}),a.draggable&&e.params.scrollbar.el&&E("on"),i&&i[e.enabled?"removeClass":"addClass"](e.params.scrollbar.lockClass)}function C(){e.params.scrollbar.el&&E("off")}t({scrollbar:{el:null,dragSize:"auto",hide:!1,draggable:!1,snapOnRelease:!0,lockClass:"swiper-scrollbar-lock",dragClass:"swiper-scrollbar-drag"}}),e.scrollbar={el:null,dragEl:null,$el:null,$dragEl:null},s("init",()=>{T(),g(),f()}),s("update resize observerUpdate lock unlock",()=>{g()}),s("setTranslate",()=>{f()}),s("setTransition",(t,s)=>{!function(t){e.params.scrollbar.el&&e.scrollbar.el&&e.scrollbar.$dragEl.transition(t)}(s)}),s("enable disable",()=>{const{$el:t}=e.scrollbar;t&&t[e.enabled?"removeClass":"addClass"](e.params.scrollbar.lockClass)}),s("destroy",()=>{C()}),Object.assign(e.scrollbar,{updateSize:g,setTranslate:f,init:T,destroy:C})},function({swiper:e,extendParams:t,on:s}){t({parallax:{enabled:!1}});const a=(t,s)=>{const{rtl:a}=e,i=p(t),n=a?-1:1,r=i.attr("data-swiper-parallax")||"0";let o=i.attr("data-swiper-parallax-x"),l=i.attr("data-swiper-parallax-y");const c=i.attr("data-swiper-parallax-scale"),d=i.attr("data-swiper-parallax-opacity");if(o||l?(o=o||"0",l=l||"0"):e.isHorizontal()?(o=r,l="0"):(l=r,o="0"),o=o.indexOf("%")>=0?"".concat(parseInt(o,10)*s*n,"%"):"".concat(o*s*n,"px"),l=l.indexOf("%")>=0?"".concat(parseInt(l,10)*s,"%"):"".concat(l*s,"px"),null!=d){const e=d-(d-1)*(1-Math.abs(s));i[0].style.opacity=e}if(null==c)i.transform("translate3d(".concat(o,", ").concat(l,", 0px)"));else{const e=c-(c-1)*(1-Math.abs(s));i.transform("translate3d(".concat(o,", ").concat(l,", 0px) scale(").concat(e,")"))}},i=()=>{const{$el:t,slides:s,progress:i,snapGrid:n}=e;t.children("[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y], [data-swiper-parallax-opacity], [data-swiper-parallax-scale]").each(e=>{a(e,i)}),s.each((t,s)=>{let r=t.progress;e.params.slidesPerGroup>1&&"auto"!==e.params.slidesPerView&&(r+=Math.ceil(s/2)-i*(n.length-1)),r=Math.min(Math.max(r,-1),1),p(t).find("[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y], [data-swiper-parallax-opacity], [data-swiper-parallax-scale]").each(e=>{a(e,r)})})};s("beforeInit",()=>{e.params.parallax.enabled&&(e.params.watchSlidesProgress=!0,e.originalParams.watchSlidesProgress=!0)}),s("init",()=>{e.params.parallax.enabled&&i()}),s("setTranslate",()=>{e.params.parallax.enabled&&i()}),s("setTransition",(t,s)=>{e.params.parallax.enabled&&((t=e.params.speed)=>{const{$el:s}=e;s.find("[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y], [data-swiper-parallax-opacity], [data-swiper-parallax-scale]").each(e=>{const s=p(e);let a=parseInt(s.attr("data-swiper-parallax-duration"),10)||t;0===t&&(a=0),s.transition(a)})})(s)})},function({swiper:e,extendParams:t,on:s,emit:a}){const i=o();t({zoom:{enabled:!1,maxRatio:3,minRatio:1,toggle:!0,containerClass:"swiper-zoom-container",zoomedSlideClass:"swiper-slide-zoomed"}}),e.zoom={enabled:!1};let n,r,l,c=1,d=!1;const u={$slideEl:void 0,slideWidth:void 0,slideHeight:void 0,$imageEl:void 0,$imageWrapEl:void 0,maxRatio:3},h={isTouched:void 0,isMoved:void 0,currentX:void 0,currentY:void 0,minX:void 0,minY:void 0,maxX:void 0,maxY:void 0,width:void 0,height:void 0,startX:void 0,startY:void 0,touchesStart:{},touchesCurrent:{}},m={x:void 0,y:void 0,prevPositionX:void 0,prevPositionY:void 0,prevTime:void 0};let g=1;function v(e){if(e.targetTouches.length<2)return 1;const t=e.targetTouches[0].pageX,s=e.targetTouches[0].pageY,a=e.targetTouches[1].pageX,i=e.targetTouches[1].pageY;return Math.sqrt((a-t)**2+(i-s)**2)}function w(t){const s=e.support,a=e.params.zoom;if(r=!1,l=!1,!s.gestures){if("touchstart"!==t.type||"touchstart"===t.type&&t.targetTouches.length<2)return;r=!0,u.scaleStart=v(t)}u.$slideEl&&u.$slideEl.length||(u.$slideEl=p(t.target).closest(".".concat(e.params.slideClass)),0===u.$slideEl.length&&(u.$slideEl=e.slides.eq(e.activeIndex)),u.$imageEl=u.$slideEl.find(".".concat(a.containerClass)).eq(0).find("picture, img, svg, canvas, .swiper-zoom-target").eq(0),u.$imageWrapEl=u.$imageEl.parent(".".concat(a.containerClass)),u.maxRatio=u.$imageWrapEl.attr("data-swiper-zoom")||a.maxRatio,0!==u.$imageWrapEl.length)?(u.$imageEl&&u.$imageEl.transition(0),d=!0):u.$imageEl=void 0}function b(t){const s=e.support,a=e.params.zoom,i=e.zoom;if(!s.gestures){if("touchmove"!==t.type||"touchmove"===t.type&&t.targetTouches.length<2)return;l=!0,u.scaleMove=v(t)}u.$imageEl&&0!==u.$imageEl.length?(s.gestures?i.scale=t.scale*c:i.scale=u.scaleMove/u.scaleStart*c,i.scale>u.maxRatio&&(i.scale=u.maxRatio-1+(i.scale-u.maxRatio+1)**.5),i.scale<a.minRatio&&(i.scale=a.minRatio+1-(a.minRatio-i.scale+1)**.5),u.$imageEl.transform("translate3d(0,0,0) scale(".concat(i.scale,")"))):"gesturechange"===t.type&&w(t)}function x(t){const s=e.device,a=e.support,i=e.params.zoom,n=e.zoom;if(!a.gestures){if(!r||!l)return;if("touchend"!==t.type||"touchend"===t.type&&t.changedTouches.length<2&&!s.android)return;r=!1,l=!1}u.$imageEl&&0!==u.$imageEl.length&&(n.scale=Math.max(Math.min(n.scale,u.maxRatio),i.minRatio),u.$imageEl.transition(e.params.speed).transform("translate3d(0,0,0) scale(".concat(n.scale,")")),c=n.scale,d=!1,1===n.scale&&(u.$slideEl=void 0))}function y(t){const s=e.zoom;if(!u.$imageEl||0===u.$imageEl.length)return;if(e.allowClick=!1,!h.isTouched||!u.$slideEl)return;h.isMoved||(h.width=u.$imageEl[0].offsetWidth,h.height=u.$imageEl[0].offsetHeight,h.startX=f(u.$imageWrapEl[0],"x")||0,h.startY=f(u.$imageWrapEl[0],"y")||0,u.slideWidth=u.$slideEl[0].offsetWidth,u.slideHeight=u.$slideEl[0].offsetHeight,u.$imageWrapEl.transition(0));const a=h.width*s.scale,i=h.height*s.scale;if(!(a<u.slideWidth&&i<u.slideHeight)){if(h.minX=Math.min(u.slideWidth/2-a/2,0),h.maxX=-h.minX,h.minY=Math.min(u.slideHeight/2-i/2,0),h.maxY=-h.minY,h.touchesCurrent.x="touchmove"===t.type?t.targetTouches[0].pageX:t.pageX,h.touchesCurrent.y="touchmove"===t.type?t.targetTouches[0].pageY:t.pageY,!h.isMoved&&!d){if(e.isHorizontal()&&(Math.floor(h.minX)===Math.floor(h.startX)&&h.touchesCurrent.x<h.touchesStart.x||Math.floor(h.maxX)===Math.floor(h.startX)&&h.touchesCurrent.x>h.touchesStart.x))return void(h.isTouched=!1);if(!e.isHorizontal()&&(Math.floor(h.minY)===Math.floor(h.startY)&&h.touchesCurrent.y<h.touchesStart.y||Math.floor(h.maxY)===Math.floor(h.startY)&&h.touchesCurrent.y>h.touchesStart.y))return void(h.isTouched=!1)}t.cancelable&&t.preventDefault(),t.stopPropagation(),h.isMoved=!0,h.currentX=h.touchesCurrent.x-h.touchesStart.x+h.startX,h.currentY=h.touchesCurrent.y-h.touchesStart.y+h.startY,h.currentX<h.minX&&(h.currentX=h.minX+1-(h.minX-h.currentX+1)**.8),h.currentX>h.maxX&&(h.currentX=h.maxX-1+(h.currentX-h.maxX+1)**.8),h.currentY<h.minY&&(h.currentY=h.minY+1-(h.minY-h.currentY+1)**.8),h.currentY>h.maxY&&(h.currentY=h.maxY-1+(h.currentY-h.maxY+1)**.8),m.prevPositionX||(m.prevPositionX=h.touchesCurrent.x),m.prevPositionY||(m.prevPositionY=h.touchesCurrent.y),m.prevTime||(m.prevTime=Date.now()),m.x=(h.touchesCurrent.x-m.prevPositionX)/(Date.now()-m.prevTime)/2,m.y=(h.touchesCurrent.y-m.prevPositionY)/(Date.now()-m.prevTime)/2,Math.abs(h.touchesCurrent.x-m.prevPositionX)<2&&(m.x=0),Math.abs(h.touchesCurrent.y-m.prevPositionY)<2&&(m.y=0),m.prevPositionX=h.touchesCurrent.x,m.prevPositionY=h.touchesCurrent.y,m.prevTime=Date.now(),u.$imageWrapEl.transform("translate3d(".concat(h.currentX,"px, ").concat(h.currentY,"px,0)"))}}function E(){const t=e.zoom;u.$slideEl&&e.previousIndex!==e.activeIndex&&(u.$imageEl&&u.$imageEl.transform("translate3d(0,0,0) scale(1)"),u.$imageWrapEl&&u.$imageWrapEl.transform("translate3d(0,0,0)"),t.scale=1,c=1,u.$slideEl=void 0,u.$imageEl=void 0,u.$imageWrapEl=void 0)}function T(t){const s=e.zoom,a=e.params.zoom;if(u.$slideEl||(t&&t.target&&(u.$slideEl=p(t.target).closest(".".concat(e.params.slideClass))),u.$slideEl||(e.params.virtual&&e.params.virtual.enabled&&e.virtual?u.$slideEl=e.$wrapperEl.children(".".concat(e.params.slideActiveClass)):u.$slideEl=e.slides.eq(e.activeIndex)),u.$imageEl=u.$slideEl.find(".".concat(a.containerClass)).eq(0).find("picture, img, svg, canvas, .swiper-zoom-target").eq(0),u.$imageWrapEl=u.$imageEl.parent(".".concat(a.containerClass))),!u.$imageEl||0===u.$imageEl.length||!u.$imageWrapEl||0===u.$imageWrapEl.length)return;let n,r,o,l,d,m,f,g,v,w,b,x,y,E,T,C,S,M;e.params.cssMode&&(e.wrapperEl.style.overflow="hidden",e.wrapperEl.style.touchAction="none"),u.$slideEl.addClass("".concat(a.zoomedSlideClass)),void 0===h.touchesStart.x&&t?(n="touchend"===t.type?t.changedTouches[0].pageX:t.pageX,r="touchend"===t.type?t.changedTouches[0].pageY:t.pageY):(n=h.touchesStart.x,r=h.touchesStart.y),s.scale=u.$imageWrapEl.attr("data-swiper-zoom")||a.maxRatio,c=u.$imageWrapEl.attr("data-swiper-zoom")||a.maxRatio,t?(S=u.$slideEl[0].offsetWidth,M=u.$slideEl[0].offsetHeight,d=(o=u.$slideEl.offset().left+i.scrollX)+S/2-n,m=(l=u.$slideEl.offset().top+i.scrollY)+M/2-r,v=u.$imageEl[0].offsetWidth,w=u.$imageEl[0].offsetHeight,b=v*s.scale,x=w*s.scale,T=-(y=Math.min(S/2-b/2,0)),C=-(E=Math.min(M/2-x/2,0)),(f=d*s.scale)<y&&(f=y),f>T&&(f=T),(g=m*s.scale)<E&&(g=E),g>C&&(g=C)):(f=0,g=0),u.$imageWrapEl.transition(300).transform("translate3d(".concat(f,"px, ").concat(g,"px,0)")),u.$imageEl.transition(300).transform("translate3d(0,0,0) scale(".concat(s.scale,")"))}function C(){const t=e.zoom,s=e.params.zoom;u.$slideEl||(e.params.virtual&&e.params.virtual.enabled&&e.virtual?u.$slideEl=e.$wrapperEl.children(".".concat(e.params.slideActiveClass)):u.$slideEl=e.slides.eq(e.activeIndex),u.$imageEl=u.$slideEl.find(".".concat(s.containerClass)).eq(0).find("picture, img, svg, canvas, .swiper-zoom-target").eq(0),u.$imageWrapEl=u.$imageEl.parent(".".concat(s.containerClass))),u.$imageEl&&0!==u.$imageEl.length&&u.$imageWrapEl&&0!==u.$imageWrapEl.length&&(e.params.cssMode&&(e.wrapperEl.style.overflow="",e.wrapperEl.style.touchAction=""),t.scale=1,c=1,u.$imageWrapEl.transition(300).transform("translate3d(0,0,0)"),u.$imageEl.transition(300).transform("translate3d(0,0,0) scale(1)"),u.$slideEl.removeClass("".concat(s.zoomedSlideClass)),u.$slideEl=void 0)}function S(t){const s=e.zoom;s.scale&&1!==s.scale?C():T(t)}function M(){const t=e.support;return{passiveListener:!("touchstart"!==e.touchEvents.start||!t.passiveListener||!e.params.passiveListeners)&&{passive:!0,capture:!1},activeListenerWithCapture:!t.passiveListener||{passive:!1,capture:!0}}}function P(){return".".concat(e.params.slideClass)}function $(t){const{passiveListener:s}=M(),a=P();e.$wrapperEl[t]("gesturestart",a,w,s),e.$wrapperEl[t]("gesturechange",a,b,s),e.$wrapperEl[t]("gestureend",a,x,s)}function k(){n||(n=!0,$("on"))}function z(){n&&(n=!1,$("off"))}function O(){const t=e.zoom;if(t.enabled)return;t.enabled=!0;const s=e.support,{passiveListener:a,activeListenerWithCapture:i}=M(),n=P();s.gestures?(e.$wrapperEl.on(e.touchEvents.start,k,a),e.$wrapperEl.on(e.touchEvents.end,z,a)):"touchstart"===e.touchEvents.start&&(e.$wrapperEl.on(e.touchEvents.start,n,w,a),e.$wrapperEl.on(e.touchEvents.move,n,b,i),e.$wrapperEl.on(e.touchEvents.end,n,x,a),e.touchEvents.cancel&&e.$wrapperEl.on(e.touchEvents.cancel,n,x,a)),e.$wrapperEl.on(e.touchEvents.move,".".concat(e.params.zoom.containerClass),y,i)}function I(){const t=e.zoom;if(!t.enabled)return;const s=e.support;t.enabled=!1;const{passiveListener:a,activeListenerWithCapture:i}=M(),n=P();s.gestures?(e.$wrapperEl.off(e.touchEvents.start,k,a),e.$wrapperEl.off(e.touchEvents.end,z,a)):"touchstart"===e.touchEvents.start&&(e.$wrapperEl.off(e.touchEvents.start,n,w,a),e.$wrapperEl.off(e.touchEvents.move,n,b,i),e.$wrapperEl.off(e.touchEvents.end,n,x,a),e.touchEvents.cancel&&e.$wrapperEl.off(e.touchEvents.cancel,n,x,a)),e.$wrapperEl.off(e.touchEvents.move,".".concat(e.params.zoom.containerClass),y,i)}Object.defineProperty(e.zoom,"scale",{get:function(){return g},set:function(e){if(g!==e){const t=u.$imageEl?u.$imageEl[0]:void 0,s=u.$slideEl?u.$slideEl[0]:void 0;a("zoomChange",e,t,s)}g=e}}),s("init",()=>{e.params.zoom.enabled&&O()}),s("destroy",()=>{I()}),s("touchStart",(t,s)=>{e.zoom.enabled&&function(t){const s=e.device;u.$imageEl&&0!==u.$imageEl.length&&(h.isTouched||(s.android&&t.cancelable&&t.preventDefault(),h.isTouched=!0,h.touchesStart.x="touchstart"===t.type?t.targetTouches[0].pageX:t.pageX,h.touchesStart.y="touchstart"===t.type?t.targetTouches[0].pageY:t.pageY))}(s)}),s("touchEnd",(t,s)=>{e.zoom.enabled&&function(){const t=e.zoom;if(!u.$imageEl||0===u.$imageEl.length)return;if(!h.isTouched||!h.isMoved)return h.isTouched=!1,void(h.isMoved=!1);h.isTouched=!1,h.isMoved=!1;let s=300,a=300;const i=m.x*s,n=h.currentX+i,r=m.y*a,o=h.currentY+r;0!==m.x&&(s=Math.abs((n-h.currentX)/m.x)),0!==m.y&&(a=Math.abs((o-h.currentY)/m.y));const l=Math.max(s,a);h.currentX=n,h.currentY=o;const c=h.width*t.scale,d=h.height*t.scale;h.minX=Math.min(u.slideWidth/2-c/2,0),h.maxX=-h.minX,h.minY=Math.min(u.slideHeight/2-d/2,0),h.maxY=-h.minY,h.currentX=Math.max(Math.min(h.currentX,h.maxX),h.minX),h.currentY=Math.max(Math.min(h.currentY,h.maxY),h.minY),u.$imageWrapEl.transition(l).transform("translate3d(".concat(h.currentX,"px, ").concat(h.currentY,"px,0)"))}()}),s("doubleTap",(t,s)=>{!e.animating&&e.params.zoom.enabled&&e.zoom.enabled&&e.params.zoom.toggle&&S(s)}),s("transitionEnd",()=>{e.zoom.enabled&&e.params.zoom.enabled&&E()}),s("slideChange",()=>{e.zoom.enabled&&e.params.zoom.enabled&&e.params.cssMode&&E()}),Object.assign(e.zoom,{enable:O,disable:I,in:T,out:C,toggle:S})},function({swiper:e,extendParams:t,on:s,emit:a}){t({lazy:{checkInView:!1,enabled:!1,loadPrevNext:!1,loadPrevNextAmount:1,loadOnTransitionStart:!1,scrollingElement:"",elementClass:"swiper-lazy",loadingClass:"swiper-lazy-loading",loadedClass:"swiper-lazy-loaded",preloaderClass:"swiper-lazy-preloader"}}),e.lazy={};let i=!1,n=!1;function r(t,s=!0){const i=e.params.lazy;if(void 0===t)return;if(0===e.slides.length)return;const n=e.virtual&&e.params.virtual.enabled?e.$wrapperEl.children(".".concat(e.params.slideClass,'[data-swiper-slide-index="').concat(t,'"]')):e.slides.eq(t),o=n.find(".".concat(i.elementClass,":not(.").concat(i.loadedClass,"):not(.").concat(i.loadingClass,")"));!n.hasClass(i.elementClass)||n.hasClass(i.loadedClass)||n.hasClass(i.loadingClass)||o.push(n[0]),0!==o.length&&o.each(t=>{const o=p(t);o.addClass(i.loadingClass);const l=o.attr("data-background"),c=o.attr("data-src"),d=o.attr("data-srcset"),u=o.attr("data-sizes"),h=o.parent("picture");e.loadImage(o[0],c||l,d,u,!1,()=>{if(null!=e&&e&&(!e||e.params)&&!e.destroyed){if(l?(o.css("background-image",'url("'.concat(l,'")')),o.removeAttr("data-background")):(d&&(o.attr("srcset",d),o.removeAttr("data-srcset")),u&&(o.attr("sizes",u),o.removeAttr("data-sizes")),h.length&&h.children("source").each(e=>{const t=p(e);t.attr("data-srcset")&&(t.attr("srcset",t.attr("data-srcset")),t.removeAttr("data-srcset"))}),c&&(o.attr("src",c),o.removeAttr("data-src"))),o.addClass(i.loadedClass).removeClass(i.loadingClass),n.find(".".concat(i.preloaderClass)).remove(),e.params.loop&&s){const t=n.attr("data-swiper-slide-index");n.hasClass(e.params.slideDuplicateClass)?r(e.$wrapperEl.children('[data-swiper-slide-index="'.concat(t,'"]:not(.').concat(e.params.slideDuplicateClass,")")).index(),!1):r(e.$wrapperEl.children(".".concat(e.params.slideDuplicateClass,'[data-swiper-slide-index="').concat(t,'"]')).index(),!1)}a("lazyImageReady",n[0],o[0]),e.params.autoHeight&&e.updateAutoHeight()}}),a("lazyImageLoad",n[0],o[0])})}function l(){const{$wrapperEl:t,params:s,slides:a,activeIndex:i}=e,o=e.virtual&&s.virtual.enabled,l=s.lazy;let c=s.slidesPerView;function d(e){if(o){if(t.children(".".concat(s.slideClass,'[data-swiper-slide-index="').concat(e,'"]')).length)return!0}else if(a[e])return!0;return!1}function u(e){return o?p(e).attr("data-swiper-slide-index"):p(e).index()}if("auto"===c&&(c=0),n||(n=!0),e.params.watchSlidesProgress)t.children(".".concat(s.slideVisibleClass)).each(e=>{r(o?p(e).attr("data-swiper-slide-index"):p(e).index())});else if(c>1)for(let e=i;e<i+c;e+=1)d(e)&&r(e);else r(i);if(l.loadPrevNext)if(c>1||l.loadPrevNextAmount&&l.loadPrevNextAmount>1){const e=l.loadPrevNextAmount,t=c,s=Math.min(i+t+Math.max(e,t),a.length),n=Math.max(i-Math.max(t,e),0);for(let a=i+c;a<s;a+=1)d(a)&&r(a);for(let a=n;a<i;a+=1)d(a)&&r(a)}else{const e=t.children(".".concat(s.slideNextClass));e.length>0&&r(u(e));const a=t.children(".".concat(s.slidePrevClass));a.length>0&&r(u(a))}}function c(){const t=o();if(!e||e.destroyed)return;const s=e.params.lazy.scrollingElement?p(e.params.lazy.scrollingElement):p(t),a=s[0]===t,n=a?t.innerWidth:s[0].offsetWidth,r=a?t.innerHeight:s[0].offsetHeight,d=e.$el.offset(),{rtlTranslate:u}=e;let h=!1;u&&(d.left-=e.$el[0].scrollLeft);const m=[[d.left,d.top],[d.left+e.width,d.top],[d.left,d.top+e.height],[d.left+e.width,d.top+e.height]];for(let e=0;e<m.length;e+=1){const t=m[e];if(t[0]>=0&&t[0]<=n&&t[1]>=0&&t[1]<=r){if(0===t[0]&&0===t[1])continue;h=!0}}const f=!("touchstart"!==e.touchEvents.start||!e.support.passiveListener||!e.params.passiveListeners)&&{passive:!0,capture:!1};h?(l(),s.off("scroll",c,f)):i||(i=!0,s.on("scroll",c,f))}s("beforeInit",()=>{e.params.lazy.enabled&&e.params.preloadImages&&(e.params.preloadImages=!1)}),s("init",()=>{e.params.lazy.enabled&&(e.params.lazy.checkInView?c():l())}),s("scroll",()=>{e.params.freeMode&&e.params.freeMode.enabled&&!e.params.freeMode.sticky&&l()}),s("scrollbarDragMove resize _freeModeNoMomentumRelease",()=>{e.params.lazy.enabled&&(e.params.lazy.checkInView?c():l())}),s("transitionStart",()=>{e.params.lazy.enabled&&(e.params.lazy.loadOnTransitionStart||!e.params.lazy.loadOnTransitionStart&&!n)&&(e.params.lazy.checkInView?c():l())}),s("transitionEnd",()=>{e.params.lazy.enabled&&!e.params.lazy.loadOnTransitionStart&&(e.params.lazy.checkInView?c():l())}),s("slideChange",()=>{const{lazy:t,cssMode:s,watchSlidesProgress:a,touchReleaseOnEdges:i,resistanceRatio:n}=e.params;t.enabled&&(s||a&&(i||0===n))&&l()}),Object.assign(e.lazy,{load:l,loadInSlide:r})},function({swiper:e,extendParams:t,on:s}){function a(e,t){const s=function(){let e,t,s;return(a,i)=>{for(t=-1,e=a.length;e-t>1;)a[s=e+t>>1]<=i?t=s:e=s;return e}}();let a,i;return this.x=e,this.y=t,this.lastIndex=e.length-1,this.interpolate=function(e){return e?(i=s(this.x,e),a=i-1,(e-this.x[a])*(this.y[i]-this.y[a])/(this.x[i]-this.x[a])+this.y[a]):0},this}function i(){e.controller.control&&e.controller.spline&&(e.controller.spline=void 0,delete e.controller.spline)}t({controller:{control:void 0,inverse:!1,by:"slide"}}),e.controller={control:void 0},s("beforeInit",()=>{e.controller.control=e.params.controller.control}),s("update",()=>{i()}),s("resize",()=>{i()}),s("observerUpdate",()=>{i()}),s("setTranslate",(t,s,a)=>{e.controller.control&&e.controller.setTranslate(s,a)}),s("setTransition",(t,s,a)=>{e.controller.control&&e.controller.setTransition(s,a)}),Object.assign(e.controller,{setTranslate:function(t,s){const i=e.controller.control;let n,r;const o=e.constructor;function l(t){const s=e.rtlTranslate?-e.translate:e.translate;"slide"===e.params.controller.by&&(function(t){e.controller.spline||(e.controller.spline=e.params.loop?new a(e.slidesGrid,t.slidesGrid):new a(e.snapGrid,t.snapGrid))}(t),r=-e.controller.spline.interpolate(-s)),r&&"container"!==e.params.controller.by||(n=(t.maxTranslate()-t.minTranslate())/(e.maxTranslate()-e.minTranslate()),r=(s-e.minTranslate())*n+t.minTranslate()),e.params.controller.inverse&&(r=t.maxTranslate()-r),t.updateProgress(r),t.setTranslate(r,e),t.updateActiveIndex(),t.updateSlidesClasses()}if(Array.isArray(i))for(let e=0;e<i.length;e+=1)i[e]!==s&&i[e]instanceof o&&l(i[e]);else i instanceof o&&s!==i&&l(i)},setTransition:function(t,s){const a=e.constructor,i=e.controller.control;let n;function r(s){s.setTransition(t,e),0!==t&&(s.transitionStart(),s.params.autoHeight&&h(()=>{s.updateAutoHeight()}),s.$wrapperEl.transitionEnd(()=>{i&&(s.params.loop&&"slide"===e.params.controller.by&&s.loopFix(),s.transitionEnd())}))}if(Array.isArray(i))for(n=0;n<i.length;n+=1)i[n]!==s&&i[n]instanceof a&&r(i[n]);else i instanceof a&&s!==i&&r(i)}})},function({swiper:e,extendParams:t,on:s}){t({a11y:{enabled:!0,notificationClass:"swiper-notification",prevSlideMessage:"Previous slide",nextSlideMessage:"Next slide",firstSlideMessage:"This is the first slide",lastSlideMessage:"This is the last slide",paginationBulletMessage:"Go to slide {{index}}",slideLabelMessage:"{{index}} / {{slidesLength}}",containerMessage:null,containerRoleDescriptionMessage:null,itemRoleDescriptionMessage:null,slideRole:"group"}});let a=null;function i(e){const t=a;0!==t.length&&(t.html(""),t.html(e))}function n(e){e.attr("tabIndex","0")}function r(e){e.attr("tabIndex","-1")}function o(e,t){e.attr("role",t)}function l(e,t){e.attr("aria-roledescription",t)}function c(e,t){e.attr("aria-label",t)}function d(e){e.attr("aria-disabled",!0)}function u(e){e.attr("aria-disabled",!1)}function h(t){if(13!==t.keyCode&&32!==t.keyCode)return;const s=e.params.a11y,a=p(t.target);e.navigation&&e.navigation.$nextEl&&a.is(e.navigation.$nextEl)&&(e.isEnd&&!e.params.loop||e.slideNext(),e.isEnd?i(s.lastSlideMessage):i(s.nextSlideMessage)),e.navigation&&e.navigation.$prevEl&&a.is(e.navigation.$prevEl)&&(e.isBeginning&&!e.params.loop||e.slidePrev(),e.isBeginning?i(s.firstSlideMessage):i(s.prevSlideMessage)),e.pagination&&a.is(H(e.params.pagination.bulletClass))&&a[0].click()}function m(){if(e.params.loop||e.params.rewind||!e.navigation)return;const{$nextEl:t,$prevEl:s}=e.navigation;s&&s.length>0&&(e.isBeginning?(d(s),r(s)):(u(s),n(s))),t&&t.length>0&&(e.isEnd?(d(t),r(t)):(u(t),n(t)))}function f(){return e.pagination&&e.pagination.bullets&&e.pagination.bullets.length}function g(){return f()&&e.params.pagination.clickable}const v=(e,t,s)=>{n(e),"BUTTON"!==e[0].tagName&&(o(e,"button"),e.on("keydown",h)),c(e,s),function(e,t){e.attr("aria-controls",t)}(e,t)};function w(){const t=e.params.a11y;e.$el.append(a);const s=e.$el;t.containerRoleDescriptionMessage&&l(s,t.containerRoleDescriptionMessage),t.containerMessage&&c(s,t.containerMessage);const i=e.$wrapperEl,n=i.attr("id")||"swiper-wrapper-".concat(function(e=16){return"x".repeat(e).replace(/x/g,()=>Math.round(16*Math.random()).toString(16))}(16)),r=e.params.autoplay&&e.params.autoplay.enabled?"off":"polite";var d;d=n,i.attr("id",d),function(e,t){e.attr("aria-live",t)}(i,r),t.itemRoleDescriptionMessage&&l(p(e.slides),t.itemRoleDescriptionMessage),o(p(e.slides),t.slideRole);const u=e.params.loop?e.slides.filter(t=>!t.classList.contains(e.params.slideDuplicateClass)).length:e.slides.length;let m,f;e.slides.each((s,a)=>{const i=p(s),n=e.params.loop?parseInt(i.attr("data-swiper-slide-index"),10):a;c(i,t.slideLabelMessage.replace(/\{\{index\}\}/,n+1).replace(/\{\{slidesLength\}\}/,u))}),e.navigation&&e.navigation.$nextEl&&(m=e.navigation.$nextEl),e.navigation&&e.navigation.$prevEl&&(f=e.navigation.$prevEl),m&&m.length&&v(m,n,t.nextSlideMessage),f&&f.length&&v(f,n,t.prevSlideMessage),g()&&e.pagination.$el.on("keydown",H(e.params.pagination.bulletClass),h)}s("beforeInit",()=>{a=p('<span class="'.concat(e.params.a11y.notificationClass,'" aria-live="assertive" aria-atomic="true"></span>'))}),s("afterInit",()=>{e.params.a11y.enabled&&(w(),m())}),s("toEdge",()=>{e.params.a11y.enabled&&m()}),s("fromEdge",()=>{e.params.a11y.enabled&&m()}),s("paginationUpdate",()=>{e.params.a11y.enabled&&function(){const t=e.params.a11y;f()&&e.pagination.bullets.each(s=>{const a=p(s);e.params.pagination.clickable&&(n(a),e.params.pagination.renderBullet||(o(a,"button"),c(a,t.paginationBulletMessage.replace(/\{\{index\}\}/,a.index()+1)))),a.is(".".concat(e.params.pagination.bulletActiveClass))?a.attr("aria-current","true"):a.removeAttr("aria-current")})}()}),s("destroy",()=>{e.params.a11y.enabled&&function(){let t,s;a&&a.length>0&&a.remove(),e.navigation&&e.navigation.$nextEl&&(t=e.navigation.$nextEl),e.navigation&&e.navigation.$prevEl&&(s=e.navigation.$prevEl),t&&t.off("keydown",h),s&&s.off("keydown",h),g()&&e.pagination.$el.off("keydown",H(e.params.pagination.bulletClass),h)}()})},function({swiper:e,extendParams:t,on:s}){t({history:{enabled:!1,root:"",replaceState:!1,key:"slides"}});let a=!1,i={};const n=e=>e.toString().replace(/\s+/g,"-").replace(/[^\w-]+/g,"").replace(/--+/g,"-").replace(/^-+/,"").replace(/-+$/,""),r=e=>{const t=o();let s;const a=(s=e?new URL(e):t.location).pathname.slice(1).split("/").filter(e=>""!==e),i=a.length;return{key:a[i-2],value:a[i-1]}},l=(t,s)=>{const i=o();if(!a||!e.params.history.enabled)return;let r;r=e.params.url?new URL(e.params.url):i.location;const l=e.slides.eq(s);let c=n(l.attr("data-history"));if(e.params.history.root.length>0){let s=e.params.history.root;"/"===s[s.length-1]&&(s=s.slice(0,s.length-1)),c="".concat(s,"/").concat(t,"/").concat(c)}else r.pathname.includes(t)||(c="".concat(t,"/").concat(c));const d=i.history.state;d&&d.value===c||(e.params.history.replaceState?i.history.replaceState({value:c},null,c):i.history.pushState({value:c},null,c))},c=(t,s,a)=>{if(s)for(let i=0,r=e.slides.length;i<r;i+=1){const r=e.slides.eq(i);if(n(r.attr("data-history"))===s&&!r.hasClass(e.params.slideDuplicateClass)){const s=r.index();e.slideTo(s,t,a)}}else e.slideTo(0,t,a)},d=()=>{i=r(e.params.url),c(e.params.speed,e.paths.value,!1)};s("init",()=>{e.params.history.enabled&&(()=>{const t=o();if(e.params.history){if(!t.history||!t.history.pushState)return e.params.history.enabled=!1,void(e.params.hashNavigation.enabled=!0);a=!0,((i=r(e.params.url)).key||i.value)&&(c(0,i.value,e.params.runCallbacksOnInit),e.params.history.replaceState||t.addEventListener("popstate",d))}})()}),s("destroy",()=>{e.params.history.enabled&&(()=>{const t=o();e.params.history.replaceState||t.removeEventListener("popstate",d)})()}),s("transitionEnd _freeModeNoMomentumRelease",()=>{a&&l(e.params.history.key,e.activeIndex)}),s("slideChange",()=>{a&&e.params.cssMode&&l(e.params.history.key,e.activeIndex)})},function({swiper:e,extendParams:t,emit:s,on:a}){let i=!1;const r=n(),l=o();t({hashNavigation:{enabled:!1,replaceState:!1,watchState:!1}});const c=()=>{s("hashChange");const t=r.location.hash.replace("#","");if(t!==e.slides.eq(e.activeIndex).attr("data-hash")){const s=e.$wrapperEl.children(".".concat(e.params.slideClass,'[data-hash="').concat(t,'"]')).index();if(void 0===s)return;e.slideTo(s)}},d=()=>{if(i&&e.params.hashNavigation.enabled)if(e.params.hashNavigation.replaceState&&l.history&&l.history.replaceState)l.history.replaceState(null,null,"#".concat(e.slides.eq(e.activeIndex).attr("data-hash"))||""),s("hashSet");else{const t=e.slides.eq(e.activeIndex),a=t.attr("data-hash")||t.attr("data-history");r.location.hash=a||"",s("hashSet")}};a("init",()=>{e.params.hashNavigation.enabled&&(()=>{if(!e.params.hashNavigation.enabled||e.params.history&&e.params.history.enabled)return;i=!0;const t=r.location.hash.replace("#","");if(t){const s=0;for(let a=0,i=e.slides.length;a<i;a+=1){const i=e.slides.eq(a);if((i.attr("data-hash")||i.attr("data-history"))===t&&!i.hasClass(e.params.slideDuplicateClass)){const t=i.index();e.slideTo(t,s,e.params.runCallbacksOnInit,!0)}}}e.params.hashNavigation.watchState&&p(l).on("hashchange",c)})()}),a("destroy",()=>{e.params.hashNavigation.enabled&&e.params.hashNavigation.watchState&&p(l).off("hashchange",c)}),a("transitionEnd _freeModeNoMomentumRelease",()=>{i&&d()}),a("slideChange",()=>{i&&e.params.cssMode&&d()})},function({swiper:e,extendParams:t,on:s,emit:a}){let i;function r(){const t=e.slides.eq(e.activeIndex);let s=e.params.autoplay.delay;t.attr("data-swiper-autoplay")&&(s=t.attr("data-swiper-autoplay")||e.params.autoplay.delay),clearTimeout(i),i=h(()=>{let t;e.params.autoplay.reverseDirection?e.params.loop?(e.loopFix(),t=e.slidePrev(e.params.speed,!0,!0),a("autoplay")):e.isBeginning?e.params.autoplay.stopOnLastSlide?l():(t=e.slideTo(e.slides.length-1,e.params.speed,!0,!0),a("autoplay")):(t=e.slidePrev(e.params.speed,!0,!0),a("autoplay")):e.params.loop?(e.loopFix(),t=e.slideNext(e.params.speed,!0,!0),a("autoplay")):e.isEnd?e.params.autoplay.stopOnLastSlide?l():(t=e.slideTo(0,e.params.speed,!0,!0),a("autoplay")):(t=e.slideNext(e.params.speed,!0,!0),a("autoplay")),e.params.cssMode&&e.autoplay.running?r():!1===t&&r()},s)}function o(){return void 0===i&&!e.autoplay.running&&(e.autoplay.running=!0,a("autoplayStart"),r(),!0)}function l(){return!!e.autoplay.running&&void 0!==i&&(i&&(clearTimeout(i),i=void 0),e.autoplay.running=!1,a("autoplayStop"),!0)}function c(t){e.autoplay.running&&(e.autoplay.paused||(i&&clearTimeout(i),e.autoplay.paused=!0,0!==t&&e.params.autoplay.waitForTransition?["transitionend","webkitTransitionEnd"].forEach(t=>{e.$wrapperEl[0].addEventListener(t,p)}):(e.autoplay.paused=!1,r())))}function d(){const t=n();"hidden"===t.visibilityState&&e.autoplay.running&&c(),"visible"===t.visibilityState&&e.autoplay.paused&&(r(),e.autoplay.paused=!1)}function p(t){e&&!e.destroyed&&e.$wrapperEl&&t.target===e.$wrapperEl[0]&&(["transitionend","webkitTransitionEnd"].forEach(t=>{e.$wrapperEl[0].removeEventListener(t,p)}),e.autoplay.paused=!1,e.autoplay.running?r():l())}function u(){e.params.autoplay.disableOnInteraction?l():c(),["transitionend","webkitTransitionEnd"].forEach(t=>{e.$wrapperEl[0].removeEventListener(t,p)})}function m(){e.params.autoplay.disableOnInteraction||(e.autoplay.paused=!1,r())}e.autoplay={running:!1,paused:!1},t({autoplay:{enabled:!1,delay:3e3,waitForTransition:!0,disableOnInteraction:!0,stopOnLastSlide:!1,reverseDirection:!1,pauseOnMouseEnter:!1}}),s("init",()=>{e.params.autoplay.enabled&&(o(),n().addEventListener("visibilitychange",d),e.params.autoplay.pauseOnMouseEnter&&(e.$el.on("mouseenter",u),e.$el.on("mouseleave",m)))}),s("beforeTransitionStart",(t,s,a)=>{e.autoplay.running&&(a||!e.params.autoplay.disableOnInteraction?e.autoplay.pause(s):l())}),s("sliderFirstMove",()=>{e.autoplay.running&&(e.params.autoplay.disableOnInteraction?l():c())}),s("touchEnd",()=>{e.params.cssMode&&e.autoplay.paused&&!e.params.autoplay.disableOnInteraction&&r()}),s("destroy",()=>{e.$el.off("mouseenter",u),e.$el.off("mouseleave",m),e.autoplay.running&&l(),n().removeEventListener("visibilitychange",d)}),Object.assign(e.autoplay,{pause:c,run:r,start:o,stop:l})},function({swiper:e,extendParams:t,on:s}){t({thumbs:{swiper:null,multipleActiveThumbs:!0,autoScrollOffset:0,slideThumbActiveClass:"swiper-slide-thumb-active",thumbsContainerClass:"swiper-thumbs"}});let a=!1,i=!1;function n(){const t=e.thumbs.swiper;if(!t)return;const s=t.clickedIndex,a=t.clickedSlide;if(a&&p(a).hasClass(e.params.thumbs.slideThumbActiveClass))return;if(null==s)return;let i;if(i=t.params.loop?parseInt(p(t.clickedSlide).attr("data-swiper-slide-index"),10):s,e.params.loop){let t=e.activeIndex;e.slides.eq(t).hasClass(e.params.slideDuplicateClass)&&(e.loopFix(),e._clientLeft=e.$wrapperEl[0].clientLeft,t=e.activeIndex);const s=e.slides.eq(t).prevAll('[data-swiper-slide-index="'.concat(i,'"]')).eq(0).index(),a=e.slides.eq(t).nextAll('[data-swiper-slide-index="'.concat(i,'"]')).eq(0).index();i=void 0===s?a:void 0===a?s:a-t<t-s?a:s}e.slideTo(i)}function r(){const{thumbs:t}=e.params;if(a)return!1;a=!0;const s=e.constructor;if(t.swiper instanceof s)e.thumbs.swiper=t.swiper,Object.assign(e.thumbs.swiper.originalParams,{watchSlidesProgress:!0,slideToClickedSlide:!1}),Object.assign(e.thumbs.swiper.params,{watchSlidesProgress:!0,slideToClickedSlide:!1});else if(g(t.swiper)){const a=Object.assign({},t.swiper);Object.assign(a,{watchSlidesProgress:!0,slideToClickedSlide:!1}),e.thumbs.swiper=new s(a),i=!0}return e.thumbs.swiper.$el.addClass(e.params.thumbs.thumbsContainerClass),e.thumbs.swiper.on("tap",n),!0}function o(t){const s=e.thumbs.swiper;if(!s)return;const a="auto"===s.params.slidesPerView?s.slidesPerViewDynamic():s.params.slidesPerView,i=e.params.thumbs.autoScrollOffset,n=i&&!s.params.loop;if(e.realIndex!==s.realIndex||n){let r,o,l=s.activeIndex;if(s.params.loop){s.slides.eq(l).hasClass(s.params.slideDuplicateClass)&&(s.loopFix(),s._clientLeft=s.$wrapperEl[0].clientLeft,l=s.activeIndex);const t=s.slides.eq(l).prevAll('[data-swiper-slide-index="'.concat(e.realIndex,'"]')).eq(0).index(),a=s.slides.eq(l).nextAll('[data-swiper-slide-index="'.concat(e.realIndex,'"]')).eq(0).index();r=void 0===t?a:void 0===a?t:a-l==l-t?s.params.slidesPerGroup>1?a:l:a-l<l-t?a:t,o=e.activeIndex>e.previousIndex?"next":"prev"}else o=(r=e.realIndex)>e.previousIndex?"next":"prev";n&&(r+="next"===o?i:-1*i),s.visibleSlidesIndexes&&s.visibleSlidesIndexes.indexOf(r)<0&&(s.params.centeredSlides?r=r>l?r-Math.floor(a/2)+1:r+Math.floor(a/2)-1:r>l&&s.params.slidesPerGroup,s.slideTo(r,t?0:void 0))}let r=1;const o=e.params.thumbs.slideThumbActiveClass;if(e.params.slidesPerView>1&&!e.params.centeredSlides&&(r=e.params.slidesPerView),e.params.thumbs.multipleActiveThumbs||(r=1),r=Math.floor(r),s.slides.removeClass(o),s.params.loop||s.params.virtual&&s.params.virtual.enabled)for(let l=0;l<r;l+=1)s.$wrapperEl.children('[data-swiper-slide-index="'.concat(e.realIndex+l,'"]')).addClass(o);else for(let l=0;l<r;l+=1)s.slides.eq(e.realIndex+l).addClass(o)}e.thumbs={swiper:null},s("beforeInit",()=>{const{thumbs:t}=e.params;t&&t.swiper&&(r(),o(!0))}),s("slideChange update resize observerUpdate",()=>{e.thumbs.swiper&&o()}),s("setTransition",(t,s)=>{const a=e.thumbs.swiper;a&&a.setTransition(s)}),s("beforeDestroy",()=>{const t=e.thumbs.swiper;t&&i&&t&&t.destroy()}),Object.assign(e.thumbs,{init:r,update:o})},function({swiper:e,extendParams:t,emit:s,once:a}){t({freeMode:{enabled:!1,momentum:!0,momentumRatio:1,momentumBounce:!0,momentumBounceRatio:1,momentumVelocityRatio:1,sticky:!1,minimumVelocity:.02}}),Object.assign(e,{freeMode:{onTouchMove:function(){const{touchEventsData:t,touches:s}=e;0===t.velocities.length&&t.velocities.push({position:s[e.isHorizontal()?"startX":"startY"],time:t.touchStartTime}),t.velocities.push({position:s[e.isHorizontal()?"currentX":"currentY"],time:m()})},onTouchEnd:function({currentPos:t}){const{params:i,$wrapperEl:n,rtlTranslate:r,snapGrid:o,touchEventsData:l}=e,c=m()-l.touchStartTime;if(t<-e.minTranslate())e.slideTo(e.activeIndex);else if(t>-e.maxTranslate())e.slides.length<o.length?e.slideTo(o.length-1):e.slideTo(e.slides.length-1);else{if(i.freeMode.momentum){if(l.velocities.length>1){const t=l.velocities.pop(),s=l.velocities.pop(),a=t.position-s.position,n=t.time-s.time;e.velocity=a/n,e.velocity/=2,Math.abs(e.velocity)<i.freeMode.minimumVelocity&&(e.velocity=0),(n>150||m()-t.time>300)&&(e.velocity=0)}else e.velocity=0;e.velocity*=i.freeMode.momentumVelocityRatio,l.velocities.length=0;let t=1e3*i.freeMode.momentumRatio;const c=e.velocity*t;let d=e.translate+c;r&&(d=-d);let p,u=!1;const h=20*Math.abs(e.velocity)*i.freeMode.momentumBounceRatio;let f;if(d<e.maxTranslate())i.freeMode.momentumBounce?(d+e.maxTranslate()<-h&&(d=e.maxTranslate()-h),p=e.maxTranslate(),u=!0,l.allowMomentumBounce=!0):d=e.maxTranslate(),i.loop&&i.centeredSlides&&(f=!0);else if(d>e.minTranslate())i.freeMode.momentumBounce?(d-e.minTranslate()>h&&(d=e.minTranslate()+h),p=e.minTranslate(),u=!0,l.allowMomentumBounce=!0):d=e.minTranslate(),i.loop&&i.centeredSlides&&(f=!0);else if(i.freeMode.sticky){let t;for(let e=0;e<o.length;e+=1)if(o[e]>-d){t=e;break}d=-(d=Math.abs(o[t]-d)<Math.abs(o[t-1]-d)||"next"===e.swipeDirection?o[t]:o[t-1])}if(f&&a("transitionEnd",()=>{e.loopFix()}),0!==e.velocity){if(t=r?Math.abs((-d-e.translate)/e.velocity):Math.abs((d-e.translate)/e.velocity),i.freeMode.sticky){const s=Math.abs((r?-d:d)-e.translate),a=e.slidesSizesGrid[e.activeIndex];t=s<a?i.speed:s<2*a?1.5*i.speed:2.5*i.speed}}else if(i.freeMode.sticky)return void e.slideToClosest();i.freeMode.momentumBounce&&u?(e.updateProgress(p),e.setTransition(t),e.setTranslate(d),e.transitionStart(!0,e.swipeDirection),e.animating=!0,n.transitionEnd(()=>{e&&!e.destroyed&&l.allowMomentumBounce&&(s("momentumBounce"),e.setTransition(i.speed),setTimeout(()=>{e.setTranslate(p),n.transitionEnd(()=>{e&&!e.destroyed&&e.transitionEnd()})},0))})):e.velocity?(s("_freeModeNoMomentumRelease"),e.updateProgress(d),e.setTransition(t),e.setTranslate(d),e.transitionStart(!0,e.swipeDirection),e.animating||(e.animating=!0,n.transitionEnd(()=>{e&&!e.destroyed&&e.transitionEnd()}))):e.updateProgress(d),e.updateActiveIndex(),e.updateSlidesClasses()}else{if(i.freeMode.sticky)return void e.slideToClosest();i.freeMode&&s("_freeModeNoMomentumRelease")}(!i.freeMode.momentum||c>=i.longSwipesMs)&&(e.updateProgress(),e.updateActiveIndex(),e.updateSlidesClasses())}}}})},function({swiper:e,extendParams:t}){let a,i,n;t({grid:{rows:1,fill:"column"}}),e.grid={initSlides:t=>{const{slidesPerView:s}=e.params,{rows:r,fill:o}=e.params.grid;i=a/r,n=Math.floor(t/r),a=Math.floor(t/r)===t/r?t:Math.ceil(t/r)*r,"auto"!==s&&"row"===o&&(a=Math.max(a,s*r))},updateSlide:(t,s,r,o)=>{const{slidesPerGroup:l,spaceBetween:c}=e.params,{rows:d,fill:p}=e.params.grid;let u,h,m;if("row"===p&&l>1){const e=Math.floor(t/(l*d)),i=t-d*l*e,n=0===e?l:Math.min(Math.ceil((r-e*d*l)/d),l);u=(h=i-(m=Math.floor(i/n))*n+e*l)+m*a/d,s.css({"-webkit-order":u,order:u})}else"column"===p?(m=t-(h=Math.floor(t/d))*d,(h>n||h===n&&m===d-1)&&(m+=1)>=d&&(m=0,h+=1)):h=t-(m=Math.floor(t/i))*i;s.css(o("margin-top"),0!==m?c&&"".concat(c,"px"):"")},updateWrapperSize:(t,i,n)=>{const{spaceBetween:r,centeredSlides:o,roundLengths:l}=e.params,{rows:c}=e.params.grid;if(e.virtualSize=(t+r)*a,e.virtualSize=Math.ceil(e.virtualSize/c)-r,e.$wrapperEl.css(s({},n("width"),"".concat(e.virtualSize+r,"px"))),o){i.splice(0,i.length);const t=[];for(let s=0;s<i.length;s+=1){let a=i[s];l&&(a=Math.floor(a)),i[s]<e.virtualSize+i[0]&&t.push(a)}i.push(...t)}}}},function({swiper:e}){Object.assign(e,{appendSlide:Y.bind(e),prependSlide:W.bind(e),addSlide:j.bind(e),removeSlide:R.bind(e),removeAllSlides:_.bind(e)})},function({swiper:e,extendParams:t,on:s}){t({fadeEffect:{crossFade:!1,transformEl:null}}),V({effect:"fade",swiper:e,on:s,setTranslate:()=>{const{slides:t}=e,s=e.params.fadeEffect;for(let a=0;a<t.length;a+=1){const t=e.slides.eq(a);let i=-t[0].swiperSlideOffset;e.params.virtualTranslate||(i-=e.translate);let n=0;e.isHorizontal()||(n=i,i=0);const r=e.params.fadeEffect.crossFade?Math.max(1-Math.abs(t[0].progress),0):1+Math.min(Math.max(t[0].progress,-1),0);q(s,t).css({opacity:r}).transform("translate3d(".concat(i,"px, ").concat(n,"px, 0px)"))}},setTransition:t=>{const{transformEl:s}=e.params.fadeEffect;(s?e.slides.find(s):e.slides).transition(t),F({swiper:e,duration:t,transformEl:s,allSlides:!0})},overwriteParams:()=>({slidesPerView:1,slidesPerGroup:1,watchSlidesProgress:!0,spaceBetween:0,virtualTranslate:!e.params.cssMode})})},function({swiper:e,extendParams:t,on:s}){t({cubeEffect:{slideShadows:!0,shadow:!0,shadowOffset:20,shadowScale:.94}}),V({effect:"cube",swiper:e,on:s,setTranslate:()=>{const{$el:t,$wrapperEl:s,slides:a,width:i,height:n,rtlTranslate:r,size:o,browser:l}=e,c=e.params.cubeEffect,d=e.isHorizontal(),u=e.virtual&&e.params.virtual.enabled;let h,m=0;c.shadow&&(d?(0===(h=s.find(".swiper-cube-shadow")).length&&(h=p('<div class="swiper-cube-shadow"></div>'),s.append(h)),h.css({height:"".concat(i,"px")})):0===(h=t.find(".swiper-cube-shadow")).length&&(h=p('<div class="swiper-cube-shadow"></div>'),t.append(h)));for(let e=0;e<a.length;e+=1){const t=a.eq(e);let s=e;u&&(s=parseInt(t.attr("data-swiper-slide-index"),10));let i=90*s,n=Math.floor(i/360);r&&(i=-i,n=Math.floor(-i/360));const l=Math.max(Math.min(t[0].progress,1),-1);let h=0,f=0,g=0;s%4==0?(h=4*-n*o,g=0):(s-1)%4==0?(h=0,g=4*-n*o):(s-2)%4==0?(h=o+4*n*o,g=o):(s-3)%4==0&&(h=-o,g=3*o+4*o*n),r&&(h=-h),d||(f=h,h=0);const v="rotateX(".concat(d?0:-i,"deg) rotateY(").concat(d?i:0,"deg) translate3d(").concat(h,"px, ").concat(f,"px, ").concat(g,"px)");if(l<=1&&l>-1&&(m=90*s+90*l,r&&(m=90*-s-90*l)),t.transform(v),c.slideShadows){let e=d?t.find(".swiper-slide-shadow-left"):t.find(".swiper-slide-shadow-top"),s=d?t.find(".swiper-slide-shadow-right"):t.find(".swiper-slide-shadow-bottom");0===e.length&&(e=p('<div class="swiper-slide-shadow-'.concat(d?"left":"top",'"></div>')),t.append(e)),0===s.length&&(s=p('<div class="swiper-slide-shadow-'.concat(d?"right":"bottom",'"></div>')),t.append(s)),e.length&&(e[0].style.opacity=Math.max(-l,0)),s.length&&(s[0].style.opacity=Math.max(l,0))}}if(s.css({"-webkit-transform-origin":"50% 50% -".concat(o/2,"px"),"transform-origin":"50% 50% -".concat(o/2,"px")}),c.shadow)if(d)h.transform("translate3d(0px, ".concat(i/2+c.shadowOffset,"px, ").concat(-i/2,"px) rotateX(90deg) rotateZ(0deg) scale(").concat(c.shadowScale,")"));else{const e=Math.abs(m)-90*Math.floor(Math.abs(m)/90),t=1.5-(Math.sin(2*e*Math.PI/360)/2+Math.cos(2*e*Math.PI/360)/2),s=c.shadowScale,a=c.shadowScale/t,i=c.shadowOffset;h.transform("scale3d(".concat(s,", 1, ").concat(a,") translate3d(0px, ").concat(n/2+i,"px, ").concat(-n/2/a,"px) rotateX(-90deg)"))}const f=l.isSafari||l.isWebView?-o/2:0;s.transform("translate3d(0px,0,".concat(f,"px) rotateX(").concat(e.isHorizontal()?0:m,"deg) rotateY(").concat(e.isHorizontal()?-m:0,"deg)"))},setTransition:t=>{const{$el:s,slides:a}=e;a.transition(t).find(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").transition(t),e.params.cubeEffect.shadow&&!e.isHorizontal()&&s.find(".swiper-cube-shadow").transition(t)},perspective:()=>!0,overwriteParams:()=>({slidesPerView:1,slidesPerGroup:1,watchSlidesProgress:!0,resistanceRatio:0,spaceBetween:0,centeredSlides:!1,virtualTranslate:!0})})},function({swiper:e,extendParams:t,on:s}){t({flipEffect:{slideShadows:!0,limitRotation:!0,transformEl:null}}),V({effect:"flip",swiper:e,on:s,setTranslate:()=>{const{slides:t,rtlTranslate:s}=e,a=e.params.flipEffect;for(let i=0;i<t.length;i+=1){const n=t.eq(i);let r=n[0].progress;e.params.flipEffect.limitRotation&&(r=Math.max(Math.min(n[0].progress,1),-1));const o=n[0].swiperSlideOffset;let l=-180*r,c=0,d=e.params.cssMode?-o-e.translate:-o,p=0;if(e.isHorizontal()?s&&(l=-l):(p=d,d=0,c=-l,l=0),n[0].style.zIndex=-Math.abs(Math.round(r))+t.length,a.slideShadows){let t=e.isHorizontal()?n.find(".swiper-slide-shadow-left"):n.find(".swiper-slide-shadow-top"),s=e.isHorizontal()?n.find(".swiper-slide-shadow-right"):n.find(".swiper-slide-shadow-bottom");0===t.length&&(t=U(a,n,e.isHorizontal()?"left":"top")),0===s.length&&(s=U(a,n,e.isHorizontal()?"right":"bottom")),t.length&&(t[0].style.opacity=Math.max(-r,0)),s.length&&(s[0].style.opacity=Math.max(r,0))}const u="translate3d(".concat(d,"px, ").concat(p,"px, 0px) rotateX(").concat(c,"deg) rotateY(").concat(l,"deg)");q(a,n).transform(u)}},setTransition:t=>{const{transformEl:s}=e.params.flipEffect;(s?e.slides.find(s):e.slides).transition(t).find(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").transition(t),F({swiper:e,duration:t,transformEl:s})},perspective:()=>!0,overwriteParams:()=>({slidesPerView:1,slidesPerGroup:1,watchSlidesProgress:!0,spaceBetween:0,virtualTranslate:!e.params.cssMode})})},function({swiper:e,extendParams:t,on:s}){t({coverflowEffect:{rotate:50,stretch:0,depth:100,scale:1,modifier:1,slideShadows:!0,transformEl:null}}),V({effect:"coverflow",swiper:e,on:s,setTranslate:()=>{const{width:t,height:s,slides:a,slidesSizesGrid:i}=e,n=e.params.coverflowEffect,r=e.isHorizontal(),o=e.translate,l=r?t/2-o:s/2-o,c=r?n.rotate:-n.rotate,d=n.depth;for(let e=0,p=a.length;e<p;e+=1){const t=a.eq(e),s=i[e],o=(l-t[0].swiperSlideOffset-s/2)/s*n.modifier;let p=r?c*o:0,u=r?0:c*o,h=-d*Math.abs(o),m=n.stretch;"string"==typeof m&&-1!==m.indexOf("%")&&(m=parseFloat(n.stretch)/100*s);let f=r?0:m*o,g=r?m*o:0,v=1-(1-n.scale)*Math.abs(o);Math.abs(g)<.001&&(g=0),Math.abs(f)<.001&&(f=0),Math.abs(h)<.001&&(h=0),Math.abs(p)<.001&&(p=0),Math.abs(u)<.001&&(u=0),Math.abs(v)<.001&&(v=0);const w="translate3d(".concat(g,"px,").concat(f,"px,").concat(h,"px) rotateX(").concat(u,"deg) rotateY(").concat(p,"deg) scale(").concat(v,")");if(q(n,t).transform(w),t[0].style.zIndex=1-Math.abs(Math.round(o)),n.slideShadows){let e=r?t.find(".swiper-slide-shadow-left"):t.find(".swiper-slide-shadow-top"),s=r?t.find(".swiper-slide-shadow-right"):t.find(".swiper-slide-shadow-bottom");0===e.length&&(e=U(n,t,r?"left":"top")),0===s.length&&(s=U(n,t,r?"right":"bottom")),e.length&&(e[0].style.opacity=o>0?o:0),s.length&&(s[0].style.opacity=-o>0?-o:0)}}},setTransition:t=>{const{transformEl:s}=e.params.coverflowEffect;(s?e.slides.find(s):e.slides).transition(t).find(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").transition(t)},perspective:()=>!0,overwriteParams:()=>({watchSlidesProgress:!0})})},function({swiper:e,extendParams:t,on:s}){t({creativeEffect:{transformEl:null,limitProgress:1,shadowPerProgress:!1,progressMultiplier:1,perspective:!0,prev:{translate:[0,0,0],rotate:[0,0,0],opacity:1,scale:1},next:{translate:[0,0,0],rotate:[0,0,0],opacity:1,scale:1}}});const a=e=>"string"==typeof e?e:"".concat(e,"px");V({effect:"creative",swiper:e,on:s,setTranslate:()=>{const{slides:t,$wrapperEl:s,slidesSizesGrid:i}=e,n=e.params.creativeEffect,{progressMultiplier:r}=n,o=e.params.centeredSlides;if(o){const t=i[0]/2-e.params.slidesOffsetBefore||0;s.transform("translateX(calc(50% - ".concat(t,"px))"))}for(let l=0;l<t.length;l+=1){const s=t.eq(l),i=s[0].progress,c=Math.min(Math.max(s[0].progress,-n.limitProgress),n.limitProgress);let d=c;o||(d=Math.min(Math.max(s[0].originalProgress,-n.limitProgress),n.limitProgress));const p=s[0].swiperSlideOffset,u=[e.params.cssMode?-p-e.translate:-p,0,0],h=[0,0,0];let m=!1;e.isHorizontal()||(u[1]=u[0],u[0]=0);let f={translate:[0,0,0],rotate:[0,0,0],scale:1,opacity:1};c<0?(f=n.next,m=!0):c>0&&(f=n.prev,m=!0),u.forEach((e,t)=>{u[t]="calc(".concat(e,"px + (").concat(a(f.translate[t])," * ").concat(Math.abs(c*r),"))")}),h.forEach((e,t)=>{h[t]=f.rotate[t]*Math.abs(c*r)}),s[0].style.zIndex=-Math.abs(Math.round(i))+t.length;const g=u.join(", "),v="rotateX(".concat(h[0],"deg) rotateY(").concat(h[1],"deg) rotateZ(").concat(h[2],"deg)"),w="scale(".concat(d<0?1+(1-f.scale)*d*r:1-(1-f.scale)*d*r,")"),b=d<0?1+(1-f.opacity)*d*r:1-(1-f.opacity)*d*r,x="translate3d(".concat(g,") ").concat(v," ").concat(w);if(m&&f.shadow||!m){let e=s.children(".swiper-slide-shadow");if(0===e.length&&f.shadow&&(e=U(n,s)),e.length){const t=n.shadowPerProgress?c*(1/n.limitProgress):c;e[0].style.opacity=Math.min(Math.max(Math.abs(t),0),1)}}const y=q(n,s);y.transform(x).css({opacity:b}),f.origin&&y.css("transform-origin",f.origin)}},setTransition:t=>{const{transformEl:s}=e.params.creativeEffect;(s?e.slides.find(s):e.slides).transition(t).find(".swiper-slide-shadow").transition(t),F({swiper:e,duration:t,transformEl:s,allSlides:!0})},perspective:()=>e.params.creativeEffect.perspective,overwriteParams:()=>({watchSlidesProgress:!0,virtualTranslate:!e.params.cssMode})})},function({swiper:e,extendParams:t,on:s}){t({cardsEffect:{slideShadows:!0,transformEl:null}}),V({effect:"cards",swiper:e,on:s,setTranslate:()=>{const{slides:t,activeIndex:s}=e,a=e.params.cardsEffect,{startTranslate:i,isTouched:n}=e.touchEventsData,r=e.translate;for(let o=0;o<t.length;o+=1){const l=t.eq(o),c=l[0].progress,d=Math.min(Math.max(c,-4),4);let p=l[0].swiperSlideOffset;e.params.centeredSlides&&!e.params.cssMode&&e.$wrapperEl.transform("translateX(".concat(e.minTranslate(),"px)")),e.params.centeredSlides&&e.params.cssMode&&(p-=t[0].swiperSlideOffset);let u=e.params.cssMode?-p-e.translate:-p,h=0;const m=-100*Math.abs(d);let f=1,g=-2*d,v=8-.75*Math.abs(d);const w=(o===s||o===s-1)&&d>0&&d<1&&(n||e.params.cssMode)&&r<i,b=(o===s||o===s+1)&&d<0&&d>-1&&(n||e.params.cssMode)&&r>i;if(w||b){const e=(1-Math.abs((Math.abs(d)-.5)/.5))**.5;g+=-28*d*e,f+=-.5*e,v+=96*e,h="".concat(-25*e*Math.abs(d),"%")}if(u=d<0?"calc(".concat(u,"px + (").concat(v*Math.abs(d),"%))"):d>0?"calc(".concat(u,"px + (-").concat(v*Math.abs(d),"%))"):"".concat(u,"px"),!e.isHorizontal()){const e=h;h=u,u=e}const x="".concat(d<0?1+(1-f)*d:1-(1-f)*d),y="\n translate3d(".concat(u,", ").concat(h,", ").concat(m,"px)\n rotateZ(").concat(g,"deg)\n scale(").concat(x,")\n ");if(a.slideShadows){let e=l.find(".swiper-slide-shadow");0===e.length&&(e=U(a,l)),e.length&&(e[0].style.opacity=Math.min(Math.max((Math.abs(d)-.5)/.5,0),1))}l[0].style.zIndex=-Math.abs(Math.round(c))+t.length,q(a,l).transform(y)}},setTransition:t=>{const{transformEl:s}=e.params.cardsEffect;(s?e.slides.find(s):e.slides).transition(t).find(".swiper-slide-shadow").transition(t),F({swiper:e,duration:t,transformEl:s})},perspective:()=>!0,overwriteParams:()=>({watchSlidesProgress:!0,virtualTranslate:!e.params.cssMode})})}];return B.use(K),B});
|
|
189
|
+
},{}],"ev02":[function(require,module,exports) {
|
|
190
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e="safari",r="chrome",t="ie",o="firefox",s={SAFARI:e,CHROME:r,IE:t,FIREFOX:o};exports.default=s;
|
|
191
|
+
},{}],"al7D":[function(require,module,exports) {
|
|
192
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=c;var e=s(require("@babel/runtime/helpers/defineProperty")),r=s(require("swiper/swiper-bundle")),t=s(require("../constants/browsers")),o=require("../lib/util");require("swiper/swiper-bundle.css");var n=s(require("../constants/layouts"));function s(e){return e&&e.__esModule?e:{default:e}}function u(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),t.push.apply(t,o)}return t}function a(r){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?u(Object(o),!0).forEach(function(t){(0,e.default)(r,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(o)):u(Object(o)).forEach(function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(o,e))})}return r}function c(e,s){var u={effect:"cube",cubeEffect:{shadow:!0,slideShadows:!0,shadowOffset:20,shadowScale:.94}};return((0,o.getBrowser)()===t.default.SAFARI||(0,o.isIphone)())&&(u={effect:"creative",creativeEffect:{prev:{shadow:!1,translate:["-120%",0,-100]},next:{shadow:!1,translate:["120%",0,-100]}}}),new r.default(e,a({grabCursor:!0,a11y:{enabled:!1}},s===n.default.MODERN?{grabCursor:!1,allowTouchMove:!1}:u))}
|
|
193
|
+
},{"@babel/runtime/helpers/defineProperty":"IxO8","swiper/swiper-bundle":"vfVQ","../constants/browsers":"ev02","../lib/util":"PesM","swiper/swiper-bundle.css":"WCGv","../constants/layouts":"kUgL"}],"pXwr":[function(require,module,exports) {
|
|
194
|
+
"use strict";function e(e){var i,d;void 0!==document.hidden?(i="hidden",d="visibilitychange"):void 0!==document.msHidden?(i="msHidden",d="msvisibilitychange"):void 0!==document.webkitHidden&&(i="webkitHidden",d="webkitvisibilitychange"),document.addEventListener(d,function(){return e(i)})}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=e;
|
|
195
|
+
},{}],"QGoa":[function(require,module,exports) {
|
|
196
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=i(require("@babel/runtime/helpers/defineProperty")),t=i(require("@babel/runtime/helpers/classCallCheck")),n=i(require("@babel/runtime/helpers/createClass")),r=require("../constants/events");function i(e){return e&&e.__esModule?e:{default:e}}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function s(t){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{};n%2?o(Object(r),!0).forEach(function(n){(0,e.default)(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):o(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}var _=function(){function e(n,r,i,o,s){(0,t.default)(this,e),this.api_=s,this.getActiveGroup_=r,this.getPrevGroup_=i,this.getNextGroup_=o,this.storyShadowRoot_=n,this.defaultPayload_={},this.setEventListener_()}return(0,n.default)(e,[{key:"setEventListener_",value:function(){this.storyShadowRoot_.addEventListener("onStoryComplete",this.handleCompleteStoryEvent.bind(this)),this.storyShadowRoot_.addEventListener("onShareStoryEvent",this.handleShareEvent.bind(this)),this.storyShadowRoot_.addEventListener("onPlayPauseEvent",this.handlePlayPauseEvent.bind(this))}},{key:"onScreenEvent",value:function(){var e={event_type:r.EventTypes.OnScreen,story_group_id:null,story_id:null,story_group_type:null,story_interactive_id:null,story_interactive_type:null,watch_length:null,event_time:Date.now()};this.api_.sendEvent(e)}},{key:"onBarViewedEvent",value:function(e){var t=s({event_type:r.EventTypes.BarViewed,story_group_id:null,story_id:null,story_group_type:null,story_interactive_id:null,story_interactive_type:null,watch_length:null,event_time:Date.now()},e);this.api_.sendEvent(t)}},{key:"handleCompleteStoryEvent",value:function(e){var t=this.getActiveGroup_(),n=t.instance.getPrevStory();"groupCompleted"===e&&(n=t.instance.getActiveStory());var i=n.instance.getWatchLength(),o={event_type:r.EventTypes.Complete,story_group_id:t.group_id,story_id:n.story_id,story_group_type:"default",story_interactive_id:null,story_interactive_type:null,watch_length:i,event_time:Date.now()};this.api_.sendEvent(o)}},{key:"handleSwipingStoryEvent",value:function(e,t){var n=this.getActiveGroup_(),i=n.instance.getActiveStory(),o=i.instance.getWatchLength(),s=r.EventTypes.PreviousClicked;"next"===e&&(s=r.EventTypes.NextClicked);var _={event_type:s,story_group_id:n.group_id,story_id:i.story_id,story_group_type:"default",story_interactive_id:null,story_interactive_type:null,watch_length:o,event_time:Date.now(),gesture_type:t};this.api_.sendEvent(_)}},{key:"handleImpressionEvent",value:function(){var e=this.getActiveGroup_(),t=e.instance.getActiveStory(),n=t.instance.getWatchLength(),i={event_type:r.EventTypes.Impression,story_group_id:e.group_id,story_id:t.story_id,story_group_type:e.ad?"ad":"default",story_interactive_id:null,story_interactive_type:null,watch_length:n,event_time:Date.now()};this.api_.sendEvent(i)}},{key:"handleCloseEvent",value:function(e){var t=this.getActiveGroup_(),n=t.instance.getActiveStory(),i=n.instance.getWatchLength(),o={event_type:r.EventTypes.Closed,story_group_id:t.group_id,story_id:n.story_id,story_group_type:"default",story_interactive_id:null,story_interactive_type:null,watch_length:i,event_time:Date.now(),gesture_type:e};this.api_.sendEvent(o)}},{key:"handleCompleteGroupEvent",value:function(){var e=this.getActiveGroup_(),t=e.instance.getActiveStory(),n=t.instance.getWatchLength(),i={event_type:r.EventTypes.GroupComplete,story_group_id:e.group_id,story_id:t.story_id,story_group_type:"default",story_interactive_id:null,story_interactive_type:null,watch_length:n,event_time:Date.now()};this.api_.sendEvent(i)}},{key:"handleSwipingGroupEvent",value:function(e,t){var n,i,o=this.getNextGroup_(),s=null!==(n=this.getActiveGroup_())&&void 0!==n?n:o,_=r.EventTypes.PrevSwiped;if("next"===e&&(_=r.EventTypes.NextSwiped,o=this.getPrevGroup_()),!(null!==(i=o)&&void 0!==i&&i.ad||null!=s&&s.ad)){var a=o.instance.getActiveStory(),y=a.instance.getWatchLength(),u=s.instance.getActiveStory(),l={event_type:_,story_group_id:o.group_id,story_id:a.story_id,story_group_type:"default",story_interactive_id:null,story_interactive_type:null,target_story_group_id:s.group_id,target_story_id:u.story_id,watch_length:y,event_time:Date.now(),gesture_type:t};this.api_.sendEvent(l)}}},{key:"handleSelectedGroupEvent",value:function(){var e=this.getActiveGroup_(),t=e.instance.getActiveStory(),n={event_type:r.EventTypes.Selected,story_group_id:e.group_id,story_id:t.story_id,story_group_type:"default",story_interactive_id:null,story_interactive_type:null,watch_length:null,event_time:Date.now()};this.api_.sendEvent(n)}},{key:"handlePlayPauseEvent",value:function(e){var t,n;if(e&&"detail"in e){var r=e.detail;t=r.gesture,n=r.eventType}var i=this.getActiveGroup_(),o=i.instance.getActiveStory(),s={event_type:n,story_group_id:i.group_id,story_id:o.story_id,story_group_type:"default",story_interactive_id:null,story_interactive_type:null,watch_length:null,event_time:Date.now(),gesture_type:t};this.api_.sendEvent(s)}},{key:"handleShareEvent",value:function(e){var t;e&&"detail"in e&&(t=e.detail.gesture);var n=this.getActiveGroup_(),i=n.instance.getActiveStory(),o={event_type:r.EventTypes.LinkShared,story_group_id:n.group_id,story_id:i.story_id,story_group_type:"default",story_interactive_id:null,story_interactive_type:null,watch_length:null,event_time:Date.now(),gesture_type:t};this.api_.sendEvent(o)}}]),e}(),a=_;exports.default=a;
|
|
197
|
+
},{"@babel/runtime/helpers/defineProperty":"IxO8","@babel/runtime/helpers/classCallCheck":"fcMS","@babel/runtime/helpers/createClass":"P8NW","../constants/events":"d0lR"}],"x2n1":[function(require,module,exports) {
|
|
198
|
+
"use strict";function t(t){var e,r,o=window.innerWidth,s=window.innerHeight;s/o<16/9?(r=100,e=100*(s/(16/9))/o):(e=100,r=100*(o*(16/9))/s);t.style.setProperty("--storyly-story-vh","".concat(r,"vh"),"important"),t.style.setProperty("--storyly-story-width","".concat(e,"%"),"important"),t.style.setProperty("--storyly-story-height","".concat(r,"%"),"important")}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=t;
|
|
199
|
+
},{}],"F7DI":[function(require,module,exports) {
|
|
200
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=e;var t=n(require("../lib/proxy"));function n(t){return t&&t.__esModule?t:{default:t}}var r=function(t){return'<slot class="storyly__story-group-container" name="story-group-'.concat(t.group_id,'"></slot>')},o=function(n,r){var o=n.title,e=o;o.length>25&&(e="".concat(o.substring(0,25),"..."));var s=t.default.getNodeByInstanceId(r).getDataFromGlobal().globalInstanceData;return'\n <div class="group storyly__story-group-container" role="text" tabindex="0" title="'.concat(o.length>25?o:"",'" dir="').concat(s.direction,'">\n <div class="storyly__story-group-cover">\n <img src="" />\n <div class="pin-icon">\n <span class="icon"></span>\n </div>\n </div>\n <span class="storyly__story-group-title">').concat(e,"</span>\n </div>\n ")};function e(t){return t?r:o}
|
|
201
|
+
},{"../lib/proxy":"qmVm"}],"UISh":[function(require,module,exports) {
|
|
202
|
+
"use strict";function e(e,t){var r=e.detail.asset,a=t.querySelector(".background-blur-canvas"),i=a.getContext("2d");if(r){if(r.hasAttribute("poster")){var o=new Image;o.src=r.getAttribute("poster"),o.width=r.videoWidth,o.height=r.videoHeight,r=o}i.drawImage(r,0,0,a.width,a.height);var d=i.createLinearGradient(0,0,0,3);d.addColorStop(0,"rgba(0, 0, 0, .75)"),d.addColorStop("0.5","rgba(0, 0, 0, .35)"),d.addColorStop(1,"rgba(0, 0, 0, .75)"),i.fillStyle=d}else i.fillStyle="rgba(0, 0, 0)";i.fillRect(0,0,a.width,a.height)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=e;
|
|
203
|
+
},{}],"Dl4t":[function(require,module,exports) {
|
|
204
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=a(require("@babel/runtime/helpers/classCallCheck")),t=a(require("@babel/runtime/helpers/createClass"));function a(e){return e&&e.__esModule?e:{default:e}}var n=function(){function a(){(0,e.default)(this,a)}return(0,t.default)(a,null,[{key:"add",value:function(e,t){if(e.length&&t){var a=t.mode,n=t.type;this.remove(e,t),a?e[0].classList.add("animating-".concat(n)):e.forEach(function(e){return e.classList.add("animating-".concat(n))})}}},{key:"remove",value:function(e,t){if(e.length&&t){var a=t.type;e.forEach(function(e){return e.classList.remove("animating-".concat(a))})}}}]),a}(),r=n;exports.default=r;
|
|
205
|
+
},{"@babel/runtime/helpers/classCallCheck":"fcMS","@babel/runtime/helpers/createClass":"P8NW"}],"O1Mq":[function(require,module,exports) {
|
|
206
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=t(require("../lib/proxy"));function t(e){return e&&e.__esModule?e:{default:e}}function a(t,a){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1e3;if(e.default.getInstanceIdByDom(t).getDataFromGlobal().globalInstanceData.accessibility){var o=document.createElement("span");o.innerHTML=a,t.appendChild(o),setTimeout(function(){t.removeChild(o)},n)}}var n=a;exports.default=n;
|
|
207
|
+
},{"../lib/proxy":"qmVm"}],"FheM":[function(require,module,exports) {
|
|
208
|
+
var t=null;function e(){return t||(t=n()),t}function n(){try{throw new Error}catch(e){var t=(""+e.stack).match(/(https?|file|ftp|chrome-extension|moz-extension):\/\/[^)\n]+/g);if(t)return r(t[0])}return"/"}function r(t){return(""+t).replace(/^((?:https?|file|ftp|chrome-extension|moz-extension):\/\/.+)\/[^/]+$/,"$1")+"/"}exports.getBundleURL=e,exports.getBaseURL=r;
|
|
209
|
+
},{}],"TUK3":[function(require,module,exports) {
|
|
210
|
+
var r=require("./bundle-url").getBundleURL;function e(r){Array.isArray(r)||(r=[r]);var e=r[r.length-1];try{return Promise.resolve(require(e))}catch(n){if("MODULE_NOT_FOUND"===n.code)return new s(function(n,i){t(r.slice(0,-1)).then(function(){return require(e)}).then(n,i)});throw n}}function t(r){return Promise.all(r.map(u))}var n={};function i(r,e){n[r]=e}module.exports=exports=e,exports.load=t,exports.register=i;var o={};function u(e){var t;if(Array.isArray(e)&&(t=e[1],e=e[0]),o[e])return o[e];var i=(e.substring(e.lastIndexOf(".")+1,e.length)||e).toLowerCase(),u=n[i];return u?o[e]=u(r()+e).then(function(r){return r&&module.bundle.register(t,r),r}).catch(function(r){throw delete o[e],r}):void 0}function s(r){this.executor=r,this.promise=null}s.prototype.then=function(r,e){return null===this.promise&&(this.promise=new Promise(this.executor)),this.promise.then(r,e)},s.prototype.catch=function(r){return null===this.promise&&(this.promise=new Promise(this.executor)),this.promise.catch(r)};
|
|
211
|
+
},{"./bundle-url":"FheM"}],"saY7":[function(require,module,exports) {
|
|
212
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=i(require("@babel/runtime/helpers/asyncToGenerator")),t=i(require("@babel/runtime/helpers/classCallCheck")),r=i(require("@babel/runtime/helpers/createClass")),s=i(require("@babel/runtime/regenerator"));function i(e){return e&&e.__esModule?e:{default:e}}var n=function(){function i(){(0,t.default)(this,i),this.init_=!1,this.allowDomains_=["https://www.migros.com.tr","https://www.footasylum.com","https://www.sevenstore.com","https://picard-fashion.com/","https://birbank.az/","https://www.dominos.com.tr/"]}return(0,r.default)(i,[{key:"init",value:function(){var t=(0,e.default)(s.default.mark(function e(){return s.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return this.allowDomains_.includes(window.location.origin),e.abrupt("return");case 2:return e.next=4,require("_bundle_loader")(require.resolve("@sentry/browser"));case 4:this.Sentry_=e.sent,this.Sentry_.init({dsn:"https://281e821128514da6acd966c584d504f7@o1120595.ingest.sentry.io/6782776",defaultIntegrations:!1,allowUrls:["https://web-story.storyly.io/v2/storyly-web.js"],initialScope:{user:{website:window.location.hostname}},tracesSampleRate:1}),this.init_=!0;case 7:case"end":return e.stop()}},e,this)}));return function(){return t.apply(this,arguments)}}()},{key:"errorWrapper",value:function(e){if(this.init_)try{e()}catch(t){this.Sentry_.captureException(t)}else e()}}]),i}(),a=n;exports.default=a;
|
|
213
|
+
},{"@babel/runtime/helpers/asyncToGenerator":"agGE","@babel/runtime/helpers/classCallCheck":"fcMS","@babel/runtime/helpers/createClass":"P8NW","@babel/runtime/regenerator":"PMvg","_bundle_loader":"TUK3","@sentry/browser":[["esm.eba669ad.js","cUe8"],"cUe8"]}],"HgmH":[function(require,module,exports) {
|
|
214
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e="energized",t="classic",r={ENERGIZED:e,CLASSIC:t};exports.default=r;
|
|
215
|
+
},{}],"Ysjr":[function(require,module,exports) {
|
|
216
|
+
"use strict";function o(){return'\n <div>\n <div class="custom-story-group-container storyly__bar-layout">\n <div class="custom-story-group">\n <div class="storyly__story-preview"></div>\n <div class="storyly__story-preview-video-wrapper">\n <video\n muted\n onloadedmetadata="this.muted = true"\n disablePictureInPicture\n controlsList="nodownload"\n playsinline\n preload="none"\n class="storyly__story-preview-video"\n loop\n >\n <source src="" type="video/mp4">\n </video>\n </div>\n <svg width="27" height="27" viewBox="0 0 42 42" fill="none" xmlns="http://www.w3.org/2000/svg" class="storyly__fullscreen-icon">\n <path fill-rule="evenodd" clip-rule="evenodd" d="M10.2986 31.4328H17.8488C18.5795 31.4328 19.1724 32.0256 19.1724 32.7564C19.1724 33.4871 18.5795 34.08 17.8488 34.08H8.97498C8.24426 34.08 7.65137 33.4871 7.65137 32.7564V23.8826C7.65137 23.1519 8.24424 22.559 8.97498 22.559C9.7057 22.559 10.2986 23.1518 10.2986 23.8826V31.4328ZM32.0041 31.4328V23.8826C32.0041 23.1519 32.597 22.559 33.3278 22.559C34.0585 22.559 34.6514 23.1518 34.6514 23.8826V32.7564C34.6514 33.4871 34.0585 34.08 33.3278 34.08H24.454C23.7232 34.08 23.1304 33.4871 23.1304 32.7564C23.1304 32.0257 23.7232 31.4328 24.454 31.4328H32.0041ZM32.0041 9.72718H24.454C23.7232 9.72718 23.1304 9.13431 23.1304 8.40357C23.1304 7.67285 23.7232 7.07996 24.454 7.07996H33.3278C34.0585 7.07996 34.6514 7.67283 34.6514 8.40357V17.2774C34.6514 18.0081 34.0585 18.601 33.3278 18.601C32.597 18.601 32.0041 18.0081 32.0041 17.2774V9.72718ZM10.2986 9.72718V17.2774C10.2986 18.0081 9.70572 18.601 8.97498 18.601C8.24426 18.601 7.65137 18.0081 7.65137 17.2774V8.40357C7.65137 7.67285 8.24424 7.07996 8.97498 7.07996H17.8488C18.5795 7.07996 19.1724 7.67283 19.1724 8.40357C19.1724 9.13429 18.5795 9.72718 17.8488 9.72718H10.2986Z" fill="white"/>\n </svg>\n <div class="storyly__story-group-title-container">\n <div class="storyly__story-group-cover-wrapper">\n <img class="storyly__story-group-cover" />\n </div>\n <span class="storyly__story-group-title"></span>\n </div>\n <span class="storyly__story-group-pin">\n <svg width="36" height="36" viewBox="0 0 36 36" fill="none" xmlns="http://www.w3.org/2000/svg">\n <rect x="0.4" y="0.4" width="35.2" height="35.2" rx="17.6" fill="white"/>\n <path d="M16.5896 14.0166C17.1246 12.6826 17.3922 12.0157 17.8268 11.9233C17.9411 11.899 18.0592 11.899 18.1735 11.9233C18.6082 12.0157 18.8757 12.6826 19.4108 14.0166C19.715 14.7751 19.8672 15.1544 20.1518 15.4124C20.2317 15.4847 20.3184 15.5492 20.4107 15.6048C20.7397 15.8031 21.1504 15.8399 21.9719 15.9135C23.3626 16.038 24.0579 16.1003 24.2702 16.4967C24.3142 16.5788 24.3441 16.6677 24.3587 16.7597C24.4291 17.2039 23.9179 17.669 22.8956 18.5991L22.6117 18.8574C22.1337 19.2922 21.8948 19.5096 21.7565 19.781C21.6736 19.9437 21.618 20.119 21.592 20.2998C21.5485 20.6012 21.6185 20.9166 21.7585 21.5475L21.8085 21.7728C22.0595 22.9041 22.185 23.4698 22.0283 23.7478C21.8876 23.9975 21.6284 24.1574 21.3421 24.1711C21.0233 24.1863 20.5741 23.8203 19.6758 23.0883C19.084 22.6061 18.7881 22.3649 18.4595 22.2707C18.1593 22.1846 17.841 22.1846 17.5408 22.2707C17.2123 22.3649 16.9164 22.6061 16.3245 23.0883C15.4262 23.8203 14.977 24.1863 14.6583 24.1711C14.3719 24.1574 14.1127 23.9975 13.972 23.7478C13.8154 23.4698 13.9409 22.9041 14.1918 21.7728L14.2419 21.5475C14.3818 20.9166 14.4518 20.6012 14.4084 20.2998C14.3823 20.119 14.3267 19.9437 14.2438 19.781C14.1056 19.5096 13.8666 19.2922 13.3886 18.8574L13.1048 18.5991C12.0824 17.669 11.5713 17.2039 11.6417 16.7597C11.6562 16.6677 11.6861 16.5788 11.7301 16.4967C11.9424 16.1003 12.6378 16.038 14.0284 15.9135C14.8499 15.8399 15.2606 15.8031 15.5897 15.6048C15.682 15.5492 15.7686 15.4847 15.8485 15.4124C16.1332 15.1544 16.2853 14.7751 16.5896 14.0166Z" fill="#212121" stroke="#212121" stroke-width="1.6"/>\n <rect x="0.4" y="0.4" width="35.2" height="35.2" rx="17.6" stroke="#EEEEEE" stroke-width="0.8"/>\n </svg>\n </span>\n <div class="storyly__story-group-bar-overlay"></div>\n </div>\n </div>\n </div>\n '}function n(o){var n=o.height,r=9/(16/n);return'\n <style>\n .custom-story-group-container[data-sortorder="0"] .custom-story-group .storyly__story-preview,\n .custom-story-group-container[data-sortorder="0"] .custom-story-group .storyly__story-preview-video {\n animation: preview-shrink-animation 7s infinite;\n }\n .custom-story-group-container {\n cursor: pointer;\n height: '.concat(n,"px;\n width: ").concat(r,"px;\n margin-left: ").concat(.05*n,"px;\n margin-right: ").concat(.05*n,"px;\n border: 1px solid #E0E0E0;\n border-radius: 12px;\n overflow: hidden;\n pointer-events: auto !important;\n animation: bounce-scale-initial 0.6s ease-in-out forwards;\n }\n .custom-story-group-container.storyly__story-group-hovered {\n animation: bounce-scale-hover 0.6s ease-in-out forwards;\n z-index: 10;\n }\n .custom-story-group-container.storyly__story-group-hovered .storyly__story-group-title-container,\n .custom-story-group-container.storyly__story-group-hovered .storyly__story-group-pin {\n opacity: 0;\n }\n .custom-story-group-container.storyly__story-group-hovered .storyly__story-preview-video,\n .custom-story-group-container.storyly__story-group-hovered .storyly__story-preview {\n opacity: 1 !important;\n transform: scale(1) !important;\n animation-play-state: paused !important;\n }\n .custom-story-group-container.storyly__story-group-hovered .storyly__story-group-bar-overlay {\n display: none;\n }\n .custom-story-group-container.storyly__story-group-hovered .storyly__fullscreen-icon {\n display: block !important;\n }\n .custom-story-group-container.storyly__story-group-seen .storyly__story-preview-video,\n .custom-story-group-container.storyly__story-group-seen .storyly__story-preview {\n opacity: 0.6;\n }\n .custom-story-group-container .custom-story-group .storyly__story-group-bar-overlay{\n width: 100%;\n height: 100%;\n background: linear-gradient(180deg, rgba(0, 0, 0, 0) 65.55%, rgba(0, 0, 0, 0.4) 100%), transparent;\n position: relative;\n z-index: 1;\n }\n .custom-story-group-container .custom-story-group {\n position: relative;\n cursor: pointer;\n border-radius: 16px;\n width: 100%;\n height: 100%;\n }\n .custom-story-group-container .custom-story-group .storyly__fullscreen-icon {\n display: none;\n position: absolute;\n bottom: 10px;\n right: 10px;\n }\n .custom-story-group-container .custom-story-group .storyly__story-preview-video {\n position: absolute;\n flex-shrink: 0;\n top: 0;\n margin: auto;\n float: left;\n user-select: none;\n height: 100%;\n }\n .custom-story-group-container .custom-story-group .storyly__story-preview {\n position: absolute;\n left: 0;\n right: 0;\n top: 0;\n bottom: 0;\n background-size: cover;\n background-position: center;\n background-repeat: no-repeat;\n }\n .custom-story-group .storyly__story-group-title-container {\n position: absolute;\n bottom: 8%;\n left: 50%;\n transform: translateX(-50%);\n display: flex;\n flex-direction: column;\n align-items: center;\n width: 100%;\n z-index: 2;\n transition: opacity 0.3s ease-in-out;\n opacity: 1;\n }\n .custom-story-group .storyly__story-group-title-container .storyly__story-group-title{\n color: #fff;\n font-weight: 600;\n font-size: 16px;\n margin-top: 16px;\n width: ").concat(r,"px;\n box-sizing: border-box;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n text-align: center;\n padding: 0 5px;\n }\n .custom-story-group .storyly__story-group-cover-wrapper:before {\n background: #ffffff;\n content: '';\n position: absolute;\n top: 0; right: 0; bottom: 0; left: 0;\n z-index: 1;\n margin: -3px;\n border-radius: inherit;\n }\n .custom-story-group .storyly__story-group-cover-wrapper .storyly__story-group-cover{\n width: 100%;\n height: 100%;\n position: absolute;\n pointer-events: none;\n z-index: 2;\n border-radius: 50%;\n }\n .custom-story-group .storyly__story-group-cover-wrapper {\n height: 72px;\n width: 72px;\n border-radius: 50%;\n box-sizing: border-box;\n filter: drop-shadow(0px 16px 20px rgba(36, 36, 80, 0.16));\n position: relative;\n }\n .custom-story-group .storyly__story-group-pin {\n z-index: 1;\n position: absolute;\n left: 8px;\n top: 8px;\n transition: opacity 0.1s ease-in-out;\n opacity: 1;\n }\n @keyframes bounce-scale-hover {\n 0% {\n transform: scale(1);\n }\n 50% {\n transform: scale(1.18);\n }\n 100% {\n transform: scale(1.15);\n }\n }\n @keyframes bounce-scale-initial {\n 0% {\n transform: scale(1.15);\n }\n 50% {\n transform: scale(0.97);\n }\n 100% {\n transform: scale(1);\n }\n }\n @keyframes preview-shrink-animation {\n 0% {\n transform: scale(1);\n }\n 50% {\n transform: scale(1.2);\n }\n 100% {\n transform: scale(1);\n }\n }\n </style>\n ")}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var r={htmlTemplate:o,tmeplateStyle:n};exports.default=r;
|
|
217
|
+
},{}],"wKVQ":[function(require,module,exports) {
|
|
218
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=a;var e=l(require("../../constants/barLayouts")),t=require("../../lib/util"),r=l(require("./templates/energized-template"));function l(e){return e&&e.__esModule?e:{default:e}}function a(l,a){var u;if(l.view===e.default.ENERGIZED){var n=(0,t.generateHtmlFromTemplate)(r.default.tmeplateStyle(l.style));a.appendChild(n),u=(0,t.generateHtmlFromTemplate)(r.default.htmlTemplate(l)).innerHTML}return u}
|
|
219
|
+
},{"../../constants/barLayouts":"HgmH","../../lib/util":"PesM","./templates/energized-template":"Ysjr"}],"hs1C":[function(require,module,exports) {
|
|
220
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"createPersonalizedImpl",{enumerable:!0,get:function(){return e.default}}),Object.defineProperty(exports,"createUserPropertyImpl",{enumerable:!0,get:function(){return r.default}}),Object.defineProperty(exports,"intersectionObserverImpl",{enumerable:!0,get:function(){return t.default}}),Object.defineProperty(exports,"isotopeImpl",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(exports,"platformIml",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(exports,"renderScrollIndicator",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(exports,"swiperImpl",{enumerable:!0,get:function(){return l.default}}),Object.defineProperty(exports,"tabVisibilityImpl",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(exports,"EventImpl",{enumerable:!0,get:function(){return p.default}}),Object.defineProperty(exports,"calcStorySizeImpl",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(exports,"storyGroupCircleTemplateImpl",{enumerable:!0,get:function(){return c.default}}),Object.defineProperty(exports,"backgroundBlurImpl",{enumerable:!0,get:function(){return f.default}}),Object.defineProperty(exports,"StoryGroupAnimationImpl",{enumerable:!0,get:function(){return m.default}}),Object.defineProperty(exports,"readAccessibilityText",{enumerable:!0,get:function(){return b.default}}),Object.defineProperty(exports,"SentryImpl",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(exports,"barLayoutImpl",{enumerable:!0,get:function(){return d.default}});var e=y(require("./create-personalized-impl")),r=y(require("./create-user-property-impl")),t=y(require("./intersection-observer-impl")),n=y(require("./isotope-impl")),i=y(require("./platform-impl")),u=y(require("./scroll-Indicator")),l=y(require("./swiper-impl")),o=y(require("./tab-visibility-impl")),p=y(require("./event-impl")),a=y(require("./calculate-story-size-impl")),c=y(require("./story-group-circle-template-impl")),f=y(require("./background-blur-impl")),m=y(require("./story-group-animation-impl")),b=y(require("./read-accessibility-text-impl")),s=y(require("./sentry-impl")),d=y(require("./BarLayout/bar-layout.impl"));function y(e){return e&&e.__esModule?e:{default:e}}
|
|
221
|
+
},{"./create-personalized-impl":"vYYL","./create-user-property-impl":"EE4e","./intersection-observer-impl":"eyBV","./isotope-impl":"bHi6","./platform-impl":"PYdG","./scroll-Indicator":"JpL0","./swiper-impl":"al7D","./tab-visibility-impl":"pXwr","./event-impl":"QGoa","./calculate-story-size-impl":"x2n1","./story-group-circle-template-impl":"F7DI","./background-blur-impl":"UISh","./story-group-animation-impl":"Dl4t","./read-accessibility-text-impl":"O1Mq","./sentry-impl":"saY7","./BarLayout/bar-layout.impl":"wKVQ"}],"JUot":[function(require,module,exports) {
|
|
222
|
+
module.exports=function(){var e=document.getSelection();if(!e.rangeCount)return function(){};for(var n=document.activeElement,t=[],a=0;a<e.rangeCount;a++)t.push(e.getRangeAt(a));switch(n.tagName.toUpperCase()){case"INPUT":case"TEXTAREA":n.blur();break;default:n=null}return e.removeAllRanges(),function(){"Caret"===e.type&&e.removeAllRanges(),e.rangeCount||t.forEach(function(n){e.addRange(n)}),n&&n.focus()}};
|
|
223
|
+
},{}],"xbqV":[function(require,module,exports) {
|
|
224
|
+
"use strict";var e=require("toggle-selection"),t={"text/plain":"Text","text/html":"Url",default:"Text"},o="Copy to clipboard: #{key}, Enter";function a(e){var t=(/mac os x/i.test(navigator.userAgent)?"⌘":"Ctrl")+"+C";return e.replace(/#{\s*key\s*}/g,t)}function n(n,r){var c,l,s,i,d,p,u=!1;r||(r={}),c=r.debug||!1;try{if(s=e(),i=document.createRange(),d=document.getSelection(),(p=document.createElement("span")).textContent=n,p.ariaHidden="true",p.style.all="unset",p.style.position="fixed",p.style.top=0,p.style.clip="rect(0, 0, 0, 0)",p.style.whiteSpace="pre",p.style.webkitUserSelect="text",p.style.MozUserSelect="text",p.style.msUserSelect="text",p.style.userSelect="text",p.addEventListener("copy",function(e){if(e.stopPropagation(),r.format)if(e.preventDefault(),void 0===e.clipboardData){c&&console.warn("unable to use e.clipboardData"),c&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var o=t[r.format]||t.default;window.clipboardData.setData(o,n)}else e.clipboardData.clearData(),e.clipboardData.setData(r.format,n);r.onCopy&&(e.preventDefault(),r.onCopy(e.clipboardData))}),document.body.appendChild(p),i.selectNodeContents(p),d.addRange(i),!document.execCommand("copy"))throw new Error("copy command was unsuccessful");u=!0}catch(m){c&&console.error("unable to copy using execCommand: ",m),c&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(r.format||"text",n),r.onCopy&&r.onCopy(window.clipboardData),u=!0}catch(m){c&&console.error("unable to copy using clipboardData: ",m),c&&console.error("falling back to prompt"),l=a("message"in r?r.message:o),window.prompt(l,n)}}finally{d&&("function"==typeof d.removeRange?d.removeRange(i):d.removeAllRanges()),p&&document.body.removeChild(p),s()}return u}module.exports=n;
|
|
225
|
+
},{"toggle-selection":"JUot"}],"fRik":[function(require,module,exports) {
|
|
226
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var n=function(){var n,a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{story:{}},t=a.story,e=a.type,o=a.mediaHost,i=a.thumbnail,c=a.altText,r=a.storyBg,d="".concat(o).concat(t.image_path);return"image_url"in t&&(d=t.image_url),"video"===e&&(d="".concat(o).concat(t.video_path),"video_url"in t&&(d=t.video_url),i&&(n="".concat(o).concat(i))),'\n <div class="storyly__story" data-id="'.concat(t.story_id,'" aria-label="').concat(c?"".concat(c.replace(/['"]+/g,"")):"there is no story alt text",'" aria-hidden="true" style="background-color: ').concat(r.bg_color,'">\n ').concat(e?'\n <div class="story-bg" aria-hidden="true" tabindex="-1">\n '.concat("video"===e?'\n <video\n muted\n onloadedmetadata="this.muted = true"\n disablePictureInPicture\n controlsList="nodownload"\n playsinline\n class="story-video"\n preload="none"\n '.concat(n?'poster="'.concat(n,'"'):"",'\n >\n <source src="').concat(d,'" type="video/mp4">\n </video>\n '):'\n <img src="'.concat(d,'" loading="lazy" class="story-image" alt="Storyly Story Image" />\n '),'\n </div>\n <div class="share-container">\n <div class="share-wrapper">\n <div class="get-link">\n <div class="share-icon">\n <button aria-label="Share" tabindex="-1" aria-hidden="true" class="icon share"></button>\n </div>\n <p tabindex="-1" aria-hidden="true">Get Link</p>\n </div>\n <button aria-hidden="true" aria-label="Close" class="icon close-black close-share"></button>\n </div>\n </div>\n <p class="copied" aria-hidden="true">\n <button tabindex="-1" aria-hidden="true" class="icon check"></button>\n <span>Link Copied</span>\n </p>\n '):"","\n </div>\n ")};exports.default=n;
|
|
227
|
+
},{}],"QY4G":[function(require,module,exports) {
|
|
228
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var t=function(){return'\n\t<div class="storyly__story-bottom_sheet">\n\t\t<div class="storyly__story-bottom_sheet__overlay"></div>\n\t\t<div class="storyly__story-bottom_sheet__sheet">\n\t\t\t<div class="storyly__story-bottom_sheet__handle">\n\t\t\t\t\t<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n\t\t\t\t\t\t<rect width="24.0005" height="24.0005" rx="12.0002" fill="#F5F5F5"/>\n\t\t\t\t\t\t<path fill-rule="evenodd" clip-rule="evenodd" d="M16.5889 7.4101C16.9143 7.73555 16.9143 8.2632 16.5889 8.58865L8.58865 16.5889C8.2632 16.9143 7.73555 16.9143 7.4101 16.5889C7.08465 16.2634 7.08465 15.7358 7.4101 15.4103L15.4103 7.4101C15.7358 7.08465 16.2634 7.08465 16.5889 7.4101Z" fill="#616161"/>\n\t\t\t\t\t\t<path fill-rule="evenodd" clip-rule="evenodd" d="M7.4101 7.4101C7.73555 7.08465 8.2632 7.08465 8.58865 7.4101L16.5889 15.4103C16.9143 15.7358 16.9143 16.2634 16.5889 16.5889C16.2634 16.9143 15.7358 16.9143 15.4103 16.5889L7.4101 8.58865C7.08465 8.2632 7.08465 7.73555 7.4101 7.4101Z" fill="#616161"/>\n\t\t\t\t\t</svg>\n\t\t\t</div>\n\t\t\t<div class="storyly__story-bottom_sheet__sheet__inner-container"></div>\n\t\t</div>\n\t</div>'};exports.default=t;
|
|
229
|
+
},{}],"skR7":[function(require,module,exports) {
|
|
230
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=r(require("@babel/runtime/helpers/classCallCheck")),t=r(require("@babel/runtime/helpers/createClass")),a=r(require("../lib/proxy")),n=r(require("../lib/storage")),o=require("../lib/style");function r(e){return e&&e.__esModule?e:{default:e}}var l=function(){function r(t){var o=t.type,l=t.storyDom,i=t.instanceId;(0,e.default)(this,r),this.storyDom_=l,this.componentType_=o,this.instanceId=i,this.instanceClass=a.default.getNodeByInstanceId(this.instanceId).getDataFromGlobal(),this.globalInstanceData=this.instanceClass.globalInstanceData,this.api=this.globalInstanceData.API,n.default.setInstanceId(this.instanceId)}return(0,t.default)(r,[{key:"getLocalComponentData",value:function(){return n.default.getItemFromInstance("Storyly_componentsData")}},{key:"setLocalComponentData",value:function(e){return this.globalInstanceData.presentationData?null:(n.default.setItemToInstance("Storyly_componentsData",e),e)}},{key:"selector",value:function(e,t){return e.querySelector(t)}},{key:"selectorAll",value:function(e,t){return e.querySelectorAll(t)}},{key:"setStyle",value:function(e,t,a){e.style[t]=a}},{key:"getStyle",value:function(e,t){return e.style[t]}},{key:"setDataset",value:function(e,t,a){e.dataset[t]=a}},{key:"sumArrayValues",value:function(e){return e.map(Number).reduce(function(e,t){return e+t},0)}},{key:"isTextOverflow",value:function(e){return e.scrollHeight>e.clientHeight}},{key:"generateHtmlFromTemplate",value:function(e){var t=document.createElement("template");return t.innerHTML=e,t.content.firstElementChild.cloneNode(!0)}},{key:"generateComponentAndAppendToPage",value:function(e){var t=this.generateHtmlFromTemplate(e);return this.storyDom_.appendChild(t),this.layerDom_=t.firstElementChild,Promise.resolve(t.firstElementChild)}},{key:"getComponentLocalData",value:function(e,t){var a,o=n.default.getItemFromInstance("Storyly_localComponentData")[e];return o&&null!==(a=o[t.uid])&&void 0!==a?a:{}}},{key:"setComponentLocalData",value:function(e,t){var a;if(!this.globalInstanceData.presentationData){var o=n.default.getItemFromInstance("Storyly_localComponentData"),r=o[e];(r=null!==(a=r)&&void 0!==a?a:{})[t.uid]=t,o[e]=r,n.default.setItemToInstance("Storyly_localComponentData",o)}}},{key:"storyObserver_",value:function(e){if(!this.storyDom_.classList.contains("layers-container"))throw Error("Story Dom Not Found!");var t=new MutationObserver(e);return t.observe(this.storyDom_.parentElement,{attributes:!0}),t}},{key:"hideLayer",value:function(){var e=this;(0,o.setClass)(this.layerDom_,"timed-interactive-animation-visually-hide"),setTimeout(function(){(0,o.setClass)(e.layerDom_,"timed-interactive-animation-hide")},20)}},{key:"showLayer",value:function(){var e=this;(0,o.removeClass)(this.layerDom_,"timed-interactive-animation-hide"),setTimeout(function(){(0,o.removeClass)(e.layerDom_,"timed-interactive-animation-visually-hide")},100)}}]),r}(),i=l;exports.default=i;
|
|
231
|
+
},{"@babel/runtime/helpers/classCallCheck":"fcMS","@babel/runtime/helpers/createClass":"P8NW","../lib/proxy":"qmVm","../lib/storage":"NA5d","../lib/style":"vgU2"}],"l2Mf":[function(require,module,exports) {
|
|
232
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var t=l(require("@babel/runtime/helpers/classCallCheck")),e=l(require("@babel/runtime/helpers/createClass")),s=l(require("@babel/runtime/helpers/inherits")),i=l(require("@babel/runtime/helpers/possibleConstructorReturn")),r=l(require("@babel/runtime/helpers/getPrototypeOf")),n=require("../../lib/util"),a=l(require("./template")),o=require("../../lib/style"),h=l(require("../../layers/base"));function l(t){return t&&t.__esModule?t:{default:t}}function _(t){var e=c();return function(){var s,n=(0,r.default)(t);if(e){var a=(0,r.default)(this).constructor;s=Reflect.construct(n,arguments,a)}else s=n.apply(this,arguments);return(0,i.default)(this,s)}}function c(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}var d=function(i){(0,s.default)(h,i);var r=_(h);function h(e){var s,i=e.parentDom,n=e.instanceId;return(0,t.default)(this,h),(s=r.call(this,{storyDom:i,instanceId:n})).parentDom_=i,s.active_=!1,s.yOffset_=0,s.transformStyle_="transform 250ms cubic-bezier(0.4, 0, 0.2, 1)",s.attachCallbacksToElement_(),s.init_(),s}return(0,e.default)(h,[{key:"init_",value:function(){this.dom_=this.generateHtmlFromTemplate((0,a.default)()),this.parentDom_.appendChild(this.dom_),this.overlay_=this.dom_.querySelector(".storyly__story-bottom_sheet__overlay"),this.handle_=this.dom_.querySelector(".storyly__story-bottom_sheet__handle"),this.sheet_=this.dom_.querySelector(".storyly__story-bottom_sheet__sheet"),this.innerHTMLContainer_=this.dom_.querySelector(".storyly__story-bottom_sheet__sheet__inner-container"),this.setEventListeners_()}},{key:"attachCallbacksToElement_",value:function(){this.activate=this.activate.bind(this),this.deactivate=this.deactivate.bind(this),this.dragStart_=this.dragStart_.bind(this),this.dragEnd_=this.dragEnd_.bind(this),this.drag_=this.drag_.bind(this),this.setEventListeners_=this.setEventListeners_.bind(this)}},{key:"setEventListeners_",value:function(){var t=this;this.overlay_.addEventListener("pointerdown",function(){return t.deactivate()}),(0,n.setClickEventListener)(this.handle_.firstElementChild,function(){return t.deactivate()}),this.handle_.addEventListener("pointerdown",this.dragStart_),this.handle_.addEventListener("pointerleave",this.dragEnd_),this.handle_.addEventListener("pointerup",this.dragEnd_),this.handle_.addEventListener("pointermove",this.drag_),this.handle_.addEventListener("touchstart",this.dragStart_),this.handle_.addEventListener("touchend",this.dragEnd_),this.handle_.addEventListener("touchmove",this.drag_),(0,n.stopEventBubbling)(this.dom_,"touchstart",!1),(0,n.stopEventBubbling)(this.dom_,"touchend",!1),(0,n.stopEventBubbling)(this.dom_,"touchmove",!1),this.innerHTMLContainer_.addEventListener("scroll",function(){t.innerHTMLContainer_.scrollTop>5?(0,o.setClass)(t.handle_,"bordered"):(0,o.removeClass)(t.handle_,"bordered")})}},{key:"dragStart_",value:function(t){this.active_=!0,this.sheet_.classList.add("active"),"touchstart"===t.type?this.initialY_=t.touches[0].clientY-this.yOffset_:this.initialY_=t.clientY-this.yOffset_,this.sheet_.style.setProperty("--translateY","translateY(0)"),this.sheet_.style.setProperty("transition","unset")}},{key:"dragEnd_",value:function(){this.active_=!1,this.sheet_.classList.remove("active"),this.yOffset_=0,this.initialY_=this.currentY_,this.sheet_.style.setProperty("transition",this.transformStyle_),this.sheet_.style.setProperty("--translateY","translateY(".concat(this.currentY_,"px)"))}},{key:"drag_",value:function(t){this.active_&&(t.preventDefault(),"touchmove"===t.type?this.currentY_=t.touches[0].clientY-this.initialY_:this.currentY_=t.clientY-this.initialY_,this.yOffset_=this.currentX,this.currentY_>this.sheet_.offsetHeight/3?this.deactivate(this.currentY):(this.currentY_<=-40?this.currentY_=this.currentY_/10-41:this.currentY_<=-60&&(this.currentY_=-60),this.sheet_.style.setProperty("--translateY","translateY(".concat(this.currentY_,"px)"))))}},{key:"activate",value:function(t,e,s){if(s)return this.innerHTMLContainer_.firstElementChild.replaceWith(t),void(e&&(e.classList.add("storyly__story-bottom_sheet__footer"),this.sheet_.lastElementChild.replaceWith(e)));if(!this.dom_.classList.contains("bottomSheetActive")&&t){this.innerHTMLContainer_.appendChild(t),e&&(e.classList.add("storyly__story-bottom_sheet__footer"),this.sheet_.appendChild(e)),this.dom_.classList.add("bottomSheetActive");var i=this.instanceClass.getActiveStory_();i.instance.paused||i.instance.playAndPauseStory()}else this.deactivate()}},{key:"deactivate",value:function(t){var e=this;if(this.dom_.classList.contains("bottomSheetActive")){t?(this.sheet_.style.setProperty("transition",this.transformStyle_),this.sheet_.style.setProperty("--translateY","translateY(".concat(t,"px)"))):this.sheet_.style.setProperty("--translateY","translateY(0)");var s=this.dom_.querySelector(".storyly__story-bottom_sheet__footer");this.sheet_.removeChild(s),this.sheet_.classList.remove("active"),this.dom_.classList.remove("bottomSheetActive"),setTimeout(function(){e.innerHTMLContainer_.innerHTML=""},250);var i=this.instanceClass.getActiveStory_();i.instance.paused&&i.instance.playAndPauseStory()}}}]),h}(h.default),u=d;exports.default=u;
|
|
233
|
+
},{"@babel/runtime/helpers/classCallCheck":"fcMS","@babel/runtime/helpers/createClass":"P8NW","@babel/runtime/helpers/inherits":"d4H2","@babel/runtime/helpers/possibleConstructorReturn":"pxk2","@babel/runtime/helpers/getPrototypeOf":"UJE0","../../lib/util":"PesM","./template":"QY4G","../../lib/style":"vgU2","../../layers/base":"skR7"}],"fFPd":[function(require,module,exports) {
|
|
234
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var n=require("../../../lib/util"),t=function(t){var e=(0,n.convertHex)(t.bg_color);return'\n <div class="component-layer blank-story">\n <div\n class="blank-story"\n style="\n width: 100%;\n height: 100%;\n position: absolute;\n left: 0;\n right: 0;\n top: 0;\n bottom: 0;\n background-color: '.concat(e,';\n "\n ></div>\n </div>\n ')};exports.default=t;
|
|
235
|
+
},{"../../../lib/util":"PesM"}],"ODzA":[function(require,module,exports) {
|
|
236
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=l(require("@babel/runtime/helpers/defineProperty")),t=l(require("@babel/runtime/helpers/classCallCheck")),r=l(require("@babel/runtime/helpers/inherits")),n=l(require("@babel/runtime/helpers/possibleConstructorReturn")),o=l(require("@babel/runtime/helpers/getPrototypeOf")),u=require("../../constants/layerTypes"),a=l(require("../base")),c=l(require("./template"));function l(e){return e&&e.__esModule?e:{default:e}}function i(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function s(t){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?i(Object(n),!0).forEach(function(r){(0,e.default)(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function f(e){var t=p();return function(){var r,u=(0,o.default)(e);if(t){var a=(0,o.default)(this).constructor;r=Reflect.construct(u,arguments,a)}else r=u.apply(this,arguments);return(0,n.default)(this,r)}}function p(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}var y=function(e){(0,r.default)(o,e);var n=f(o);function o(e){var r,a=e.layer,l=e.storyDom,i=e.instanceId;return(0,t.default)(this,o),(r=n.call(this,{type:u.LayerTemplateTypes.BLANKSTORY,storyDom:l,instanceId:i})).blankStoryData_=s({},a),r.generateComponentAndAppendToPage((0,c.default)(r.blankStoryData_)),r}return o}(a.default),b=y;exports.default=b;
|
|
237
|
+
},{"@babel/runtime/helpers/defineProperty":"IxO8","@babel/runtime/helpers/classCallCheck":"fcMS","@babel/runtime/helpers/inherits":"d4H2","@babel/runtime/helpers/possibleConstructorReturn":"pxk2","@babel/runtime/helpers/getPrototypeOf":"UJE0","../../constants/layerTypes":"aJRz","../base":"skR7","./template":"fFPd"}],"Nt0A":[function(require,module,exports) {
|
|
238
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=t(require("@babel/runtime/helpers/defineProperty")),r=require("../../lib/util");function t(e){return e&&e.__esModule?e:{default:e}}function a(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);r&&(a=a.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),t.push.apply(t,a)}return t}function c(r){for(var t=1;t<arguments.length;t++){var c=null!=arguments[t]?arguments[t]:{};t%2?a(Object(c),!0).forEach(function(t){(0,e.default)(r,t,c[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(c)):a(Object(c)).forEach(function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(c,e))})}return r}var o=function(e,t){return Object.keys(e).reduce(function(a,o){var n=c({},a);switch(o){case"x":n.sdkLeft=e[o];break;case"w":n.width="".concat(e[o],"%");break;case"y":n.sdkTop=e[o];break;case"h":n.height="".concat(e[o],"%");break;case"left":var s;if(Number.isInteger(e[o])){var i=100*e[o]/360;s="".concat(i<0?0:i,"%")}else s="".concat(parseFloat(e[o]),"%");n.left=s;break;case"top":var u;u=Number.isInteger(e[o])?"".concat(100*e[o]/640,"%"):"".concat(parseFloat(e[o]),"%"),n.top=u;break;case"type":n.type=e[o];break;case"rotation":n.transform="rotate(".concat(e[o],"deg)");break;case"image_url":n.image_url=e[o];break;case"outlink":n.outlink=e[o];break;case"z_index":n.zIndex=e[o];break;case"uid":n.uid=e[o];break;case"border_radius":n.border_radius=(0,r.calcBorderRadius)(e,t)}return n},{})},n=o;exports.default=n;
|
|
239
|
+
},{"@babel/runtime/helpers/defineProperty":"IxO8","../../lib/util":"PesM"}],"jMEQ":[function(require,module,exports) {
|
|
240
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var n=function(n){var t;return'\n <div class="component-layer">\n <div\n aria-hidden="true"\n tabindex="-1"\n class="image-cta-wrapper"\n style="\n width: '.concat(n.width,";\n height: ").concat(n.height,";\n left: ").concat(n.left,";\n top: ").concat(n.top,";\n ").concat(n.transform?"transform: ".concat(n.transform,";"):"","\n z-index: ").concat(n.zIndex,';\n "\n >\n <img src="').concat(n.image_url,'" style="border-radius: ').concat(null!==(t=n.border_radius)&&void 0!==t?t:0,'px;" alt="Component Image" />\n </div>\n </div>\n')};exports.default=n;
|
|
241
|
+
},{}],"J7D7":[function(require,module,exports) {
|
|
242
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var t=d(require("@babel/runtime/helpers/classCallCheck")),e=d(require("@babel/runtime/helpers/createClass")),i=d(require("@babel/runtime/helpers/inherits")),r=d(require("@babel/runtime/helpers/possibleConstructorReturn")),a=d(require("@babel/runtime/helpers/getPrototypeOf")),n=require("../../constants/events"),o=require("../../constants/layerTypes"),s=require("../../lib/util"),l=d(require("../base")),u=d(require("./dataConvertor")),c=d(require("./template"));function d(t){return t&&t.__esModule?t:{default:t}}function _(t){var e=h();return function(){var i,n=(0,a.default)(t);if(e){var o=(0,a.default)(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return(0,r.default)(this,i)}}function h(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}var f=function(r){(0,i.default)(l,r);var a=_(l);function l(e){var i,r=e.layer,n=e.story,s=e.group,d=e.storyDom,_=e.instanceId;return(0,t.default)(this,l),(i=a.call(this,{type:o.LayerTemplateTypes.IMAGE_CTA,storyDom:d,instanceId:_})).story_=n,i.group_=s,i.imageCtaData_=(0,u.default)(r,d),i.generateComponentAndAppendToPage((0,c.default)(i.imageCtaData_)).then(function(t){i.dom_=t,i.init_()}),i.attachCallbacksToElement_(),i}return(0,e.default)(l,[{key:"attachCallbacksToElement_",value:function(){this.handleClick_=this.handleClick_.bind(this)}},{key:"init_",value:function(){(0,s.setClickEventListener)(this.dom_,this.handleClick_),(0,s.stopEventBubbling)(this.dom_,"touchstart")}},{key:"handleClick_",value:function(){var t,e=this,i={event_type:n.LayerEventTypes.ActionClicked,story_group_id:+this.group_.group_id,story_id:+this.story_.story_id,story_group_type:"default",story_interactive_id:null,story_interactive_type:"image_cta",watch_length:null,event_time:Date.now(),uid:this.imageCtaData_.uid,click_url:null!==(t=this.imageCtaData_.outlink)&&void 0!==t?t:""};if(this.api.sendEvent(i),this.globalInstanceData.events.actionClicked){var r=this.group_.stories.findIndex(function(t){return t.story_id===e.story_.story_id}),a={id:this.story_.story_id,title:this.story_.title,seen:!0,index:r,group_id:this.group_.group_id,media:{actionUrl:this.imageCtaData_.outlink}};this.globalInstanceData.events.actionClicked(a)}else this.imageCtaData_.outlink&&(0,s.openLink)(this.imageCtaData_.outlink)}}]),l}(l.default),p=f;exports.default=p;
|
|
243
|
+
},{"@babel/runtime/helpers/classCallCheck":"fcMS","@babel/runtime/helpers/createClass":"P8NW","@babel/runtime/helpers/inherits":"d4H2","@babel/runtime/helpers/possibleConstructorReturn":"pxk2","@babel/runtime/helpers/getPrototypeOf":"UJE0","../../constants/events":"d0lR","../../constants/layerTypes":"aJRz","../../lib/util":"PesM","../base":"skR7","./dataConvertor":"Nt0A","./template":"jMEQ"}],"Qewu":[function(require,module,exports) {
|
|
244
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=o(require("@babel/runtime/helpers/slicedToArray")),r=o(require("@babel/runtime/helpers/defineProperty")),t=require("../../constants/layerTypes"),a=require("../../lib/util");function o(e){return e&&e.__esModule?e:{default:e}}function c(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);r&&(a=a.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),t.push.apply(t,a)}return t}function n(e){for(var t=1;t<arguments.length;t++){var a=null!=arguments[t]?arguments[t]:{};t%2?c(Object(a),!0).forEach(function(t){(0,r.default)(e,t,a[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):c(Object(a)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(a,r))})}return e}var s=function(r,o){var c,s=n(n({},r),{},{text_font:null!==(c=r.text_font)&&void 0!==c?c:"Poppins-Regular"});return Object.keys(s).forEach(function(r){switch(r){case"bg_color":case"background_color":case"text_span_color":var c=(0,a.convertHex)(s[r]);s.background=c;break;case"text_color":var n=(0,a.convertHex)(s[r]);s.color=n;break;case"icon_color":var i=(0,a.convertHex)(s[r]),l=(0,a.getContrastBgColor)(s[r]);s.background_color=i,s.text_color=(0,a.convertHex)(l),s.border_color=(0,a.convertHex)(l,.3);break;case"rotation":s.transform="rotate(".concat(s[r],"deg)");break;case"is_bold":s.fontWeight=s[r]?700:"normal";break;case"is_italic":s.fontStyle=s[r]?"italic":"normal";break;case"text_font":if(s[r]){var b=s[r].split("-"),u=(0,e.default)(b,2),f=u[0],d=u[1];s.fontFamily="Storyly-".concat(f),s.fontWeight=d.includes("Bold")?700:"normal",s.fontStyle=d.includes("Italic")?"italic":"normal"}break;case"text_size":var p=2*s[r]+14;s.fontSize=p;break;case"x":s.sdkLeft=s[r];break;case"w":s.width="".concat(s[r],"%");break;case"y":s.sdkTop=s[r];break;case"left":var k;if(Number.isInteger(s[r])){var v=100*s[r]/360;k="".concat(v<0?0:v,"%")}else k="".concat(parseFloat(s[r]),"%");s.left=k;break;case"top":var y;y=Number.isInteger(s[r])?"".concat(100*s[r]/640,"%"):"".concat(parseFloat(s[r]),"%"),s.top=y;break;case"h":s.height="".concat(s[r],"%");break;case"border_color":if(!s[r])break;var _=(0,a.convertHex)(s[r]);s.borderColor=_;break;case"text_alignment":var g="left";1===s[r]&&(g="center"),2===s[r]&&(g="right"),s.textAlign=g;break;case"border_thickness":if(!1===s[r])break;var x=2*s[r]>=0?2*s[r]+2:0;s.borderWidth=x;break;case"scale":var O=s[r]+1;s.compScale=O;break;case"z_index":s.zIndex=s[r];break;case"border_radius":s.type===t.LayerTemplateTypes.BUTTON&&(s.border_radius=(0,a.calcBorderRadius)(s,o));break;default:return!0}return!0}),s},i=s;exports.default=i;
|
|
245
|
+
},{"@babel/runtime/helpers/slicedToArray":"HETk","@babel/runtime/helpers/defineProperty":"IxO8","../../constants/layerTypes":"aJRz","../../lib/util":"PesM"}],"lx7w":[function(require,module,exports) {
|
|
246
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var n=o(require("@babel/runtime/helpers/toConsumableArray")),t=require("../../../lib/util");function o(n){return n&&n.__esModule?n:{default:n}}var e=function(n){return'\n<div class="arrow-lines">\n <span class="arrow-lines-left" '.concat(n?'style="background-color: '.concat(n,'"'):"",'></span>\n <span class="arrow-lines-right" ').concat(n?'style="background-color: '.concat(n,'"'):"","></span>\n</div>")},c=function(o,c,a){var r;return'\n <div class="component-layer swipe" dir="'.concat(c.direction,'">\n <div\n class="swipe-up"\n style="\n z-index: ').concat(null!==(r=o.zIndex)&&void 0!==r?r:1,';\n "\n >\n ').concat(o.button_text?e(o.background_color):"",'\n <button\n style="\n font-family: ').concat((0,t.getFontFamily)({font:o.fontFamily,instanceId:a}),";\n font-weight: ").concat(o.fontWeight,";\n font-style: ").concat(o.fontStyle,";\n border-color: ").concat(o.border_color,";\n --text-color: ").concat(o.text_color,";\n --background-color: ").concat(o.background_color,';\n "\n aria-hidden="true"\n aria-label="').concat(o.button_text,', opens in a new tab"\n class="swipe-up-button"\n >\n ').concat(o.button_text||(0,n.default)(Array(2)).map(function(){var n=e();return"".concat(n)}).join(""),"\n </button>\n </div>\n </div>")};exports.default=c;
|
|
247
|
+
},{"@babel/runtime/helpers/toConsumableArray":"Fhqp","../../../lib/util":"PesM"}],"SgTT":[function(require,module,exports) {
|
|
248
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var n=require("../../../lib/util"),t=function(t,o,c){var e,a=[18,22,26].indexOf(t.fontSize)+1;return'\n <div class="component-layer" dir="'.concat(o.direction,'">\n <button\n aria-hidden="true"\n class="cta-button"\n aria-label="').concat(t.text,', opens in a new tab"\n data-scale="').concat(a,'"\n ').concat(null!=t&&t.outlink?'href="'.concat(null==t?void 0:t.outlink,'"'):"",'\n style="\n font-family: ').concat((0,n.getFontFamily)({font:t.fontFamily,instanceId:c}),";\n font-style: ").concat(t.fontStyle,";\n font-weight: ").concat(t.fontWeight,";\n transform: ").concat(t.transform?t.transform:"none",";\n left: ").concat(t.left,";\n top: ").concat(t.top,";\n background-color: ").concat(t.background,";\n border-color: ").concat(t.borderColor,";\n border-width: ").concat(t.borderWidth,"px;\n color: ").concat(t.color,";\n width: ").concat(t.w,"%;\n z-index: ").concat(null!==(e=t.zIndex)&&void 0!==e?e:1,";\n border-radius: ").concat("number"==typeof t.border_radius?"".concat(t.border_radius,"px"):["0.5625em","0.6em","0.5714em"][a-1],';\n "\n >\n ').concat(t.text,"\n </button>\n </div>\n ")};exports.default=t;
|
|
249
|
+
},{"../../../lib/util":"PesM"}],"lS5I":[function(require,module,exports) {
|
|
250
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var t=p(require("@babel/runtime/helpers/asyncToGenerator")),e=p(require("@babel/runtime/helpers/classCallCheck")),r=p(require("@babel/runtime/helpers/createClass")),i=p(require("@babel/runtime/helpers/inherits")),a=p(require("@babel/runtime/helpers/possibleConstructorReturn")),n=p(require("@babel/runtime/helpers/getPrototypeOf")),s=p(require("@babel/runtime/regenerator")),l=require("../../constants/layerTypes"),o=require("../../lib/util"),u=p(require("../base")),c=p(require("./dataConvertor")),h=p(require("./template/swipe")),d=p(require("./template/button")),_=require("../../constants/events");function p(t){return t&&t.__esModule?t:{default:t}}function y(t){var e=f();return function(){var r,i=(0,n.default)(t);if(e){var s=(0,n.default)(this).constructor;r=Reflect.construct(i,arguments,s)}else r=i.apply(this,arguments);return(0,a.default)(this,r)}}function f(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}var b=function(a){(0,i.default)(u,a);var n=y(u);function u(t){var r,i=t.layer,a=t.group,s=t.story,o=t.type,_=t.storyDom,p=t.instanceId;return(0,e.default)(this,u),(r=n.call(this,{type:o,storyDom:_,instanceId:p})).story_=s,r.group_=a,r.type_=o,r.ctaData_=(0,c.default)(i,r.storyDom_),r.generateComponentAndAppendToPage(r.ctaData_.type===l.LayerTemplateTypes.SWIPE?(0,h.default)(r.ctaData_,r.globalInstanceData,p):(0,d.default)(r.ctaData_,r.globalInstanceData,p)).then(function(t){r.dom_=t,o===l.LayerTemplateTypes.SWIPE&&(r.dom_=t.parentElement),r.init_()}),r.attachCallbacksToElement_(),r}return(0,r.default)(u,[{key:"attachCallbacksToElement_",value:function(){this.handleClickCTA_=this.handleClickCTA_.bind(this),this.storyObserverCallback_=this.storyObserverCallback_.bind(this)}},{key:"init_",value:function(){this.type_===l.LayerTemplateTypes.SWIPE?((0,o.setClickEventListener)(this.dom_.firstElementChild,this.handleClickCTA_),(0,o.stopEventBubbling)(this.dom_.firstElementChild,"touchstart")):((0,o.setClickEventListener)(this.dom_,this.handleClickCTA_),(0,o.stopEventBubbling)(this.dom_,"click"),(0,o.stopEventBubbling)(this.dom_,"touchstart")),this.type_===l.LayerTemplateTypes.SWIPE&&(this.storyObserver_(this.storyObserverCallback_),this.handleSwipe_())}},{key:"storyObserverCallback_",value:function(t){var e=this;t.forEach(function(t){"attributes"===t.type&&"show"===t.attributeName&&e.dom_.firstElementChild.classList.toggle("animating")})}},{key:"handleClickCTA_",value:function(){0!==this.touchstartY&&this.type_===l.LayerTemplateTypes.SWIPE||this.ctaData_.outlink&&this.handleClickOrSwipe_()}},{key:"handleClickOrSwipe_",value:function(){var e=(0,t.default)(s.default.mark(function t(){var e,r,i,a,n,u=this;return s.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(this.story_.story_id&&this.group_.group_id&&this.ctaData_.outlink){t.next=2;break}return t.abrupt("return");case 2:if(r={event_type:_.LayerEventTypes.ActionClicked,story_group_id:+this.group_.group_id,story_id:+this.story_.story_id,story_group_type:"default",story_interactive_id:null,story_interactive_type:this.type_===l.LayerTemplateTypes.SWIPE?"swipe":"button",watch_length:null,event_time:Date.now(),uid:this.ctaData_.uid,click_url:null!==(e=this.ctaData_.outlink)&&void 0!==e?e:""},this.api.sendEvent(r),!this.globalInstanceData.events.actionClicked){t.next=9;break}return a=this.group_.stories.findIndex(function(t){return t.story_id===u.story_.story_id}),n={id:this.story_.story_id,title:null!==(i=this.story_.title)&&void 0!==i?i:null,seen:!0,index:a,group_id:this.group_.group_id,media:{actionUrl:this.ctaData_.outlink}},this.globalInstanceData.events.actionClicked(n),t.abrupt("return");case 9:this.ctaData_.outlink&&(0,o.openLink)(this.ctaData_.outlink);case 10:case"end":return t.stop()}},t,this)}));return function(){return e.apply(this,arguments)}}()},{key:"handleSwipe_",value:function(){var t=this;this.touchstartY=0,this.touchendY=0,this.dom_.parentElement.addEventListener("touchstart",function(e){t.touchstartY=e.changedTouches[0].screenY>0&&e.changedTouches[0].screenY},!1),this.dom_.parentElement.addEventListener("touchend",function(e){t.touchendY=e.changedTouches[0].screenY,t.handleGesture_(e)},!1)}},{key:"handleGesture_",value:function(){this.touchstartY-this.touchendY>100&&this.handleClickOrSwipe_()}}]),u}(u.default),v=b;exports.default=v;
|
|
251
|
+
},{"@babel/runtime/helpers/asyncToGenerator":"agGE","@babel/runtime/helpers/classCallCheck":"fcMS","@babel/runtime/helpers/createClass":"P8NW","@babel/runtime/helpers/inherits":"d4H2","@babel/runtime/helpers/possibleConstructorReturn":"pxk2","@babel/runtime/helpers/getPrototypeOf":"UJE0","@babel/runtime/regenerator":"PMvg","../../constants/layerTypes":"aJRz","../../lib/util":"PesM","../base":"skR7","./dataConvertor":"Qewu","./template/swipe":"lx7w","./template/button":"SgTT","../../constants/events":"d0lR"}],"XMhj":[function(require,module,exports) {
|
|
252
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=o(require("@babel/runtime/helpers/defineProperty")),r=require("../../constants/common"),t=require("../../lib/util");function o(e){return e&&e.__esModule?e:{default:e}}function a(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),t.push.apply(t,o)}return t}function c(r){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?a(Object(o),!0).forEach(function(t){(0,e.default)(r,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(o)):a(Object(o)).forEach(function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(o,e))})}return r}var n=function(e){var o=c({},e);return Object.keys(e).forEach(function(a){switch(a){case"left":var c;if(Number.isInteger(e[a])){var n=100*e[a]/360;c="".concat(n<0?0:n,"%")}else c="".concat(parseFloat(e[a]),"%");o.left=c;break;case"top":var f;f=Number.isInteger(e[a])?"".concat(100*e[a]/640,"%"):"".concat(parseFloat(e[a]),"%"),o.top=f;break;case"w":o.width="".concat(e[a],"%");break;case"h":o.height="".concat(e[a],"%");break;case"scale":o.scale=r.layerScales[e[a]];break;case"primary_color":o.backgroundColor=(0,t.convertHex)(e[a]);break;case"secondary_color":var l=(0,t.convertHex)(e[a],.9);"#ff000000"===e[a]?(o.borderColor="rgba(0, 0, 0, 0.15)",o.textShadowColor="0px 1px 2px rgba(0, 0, 0, 0.32)"):(o.borderColor="rgba(255, 255, 255, 0.15)",o.textShadowColor="0px 2px 4px rgba(255,255,255, 0.25)"),o.textColor=l;break;case"theme":if(o.primary_color||o.secondary_color){o.theme=null;break}"Dark"===e[a]?(o.backgroundColor=(0,t.convertHex)("#ff212121"),o.textColor=(0,t.convertHex)("#ffffffff"),o.borderColor="rgba(0, 0, 0, 0.15)",o.textShadowColor="0px 1px 2px rgba(0, 0, 0, 0.32)"):(o.backgroundColor=(0,t.convertHex)("#ffffffff"),o.textColor=(0,t.convertHex)("#ff141414"),o.borderColor="rgba(255, 255, 255, 0.15)",o.textShadowColor="0px 2px 4px rgba(255,255,255, 0.25)");break;default:return!0}return!0}),o},f=n;exports.default=f;
|
|
253
|
+
},{"@babel/runtime/helpers/defineProperty":"IxO8","../../constants/common":"VKZr","../../lib/util":"PesM"}],"YwuF":[function(require,module,exports) {
|
|
254
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var t=require("../../../lib/util"),n=function(n,o){return'\n <div class="component-layer">\n <div\n class="poll-component"\n role="component"\n data-group=""\n data-story=""\n style="\n font-family: '.concat((0,t.getFontFamily)({instanceId:o}),";\n left: ").concat(n.left,";\n top: ").concat(n.top,";\n z-index: ").concat(n.z_index,";\n width: ").concat(n.width,";\n --background-color: ").concat(n.backgroundColor,";\n --text-color: ").concat(n.textColor,";\n --border-color: ").concat(n.borderColor,";\n --text-shadow-color: ").concat(n.textShadowColor,";\n ").concat(n.rotation?"transform: rotate(".concat(n.rotation,"deg);"):"",'\n "\n data-scale="').concat(n.scale,'"\n data-mode="').concat(n.theme,'"\n tabindex="-1"\n aria-hidden="true"\n aria-label="').concat(n.p_text,", has two options, ").concat(n.l_o_text," or ").concat(n.r_o_text,'"\n >\n ').concat(n.has_title?'<p class="question">'.concat(n.p_text,"</p>"):"",'\n <div class="options">\n <button\n class="poll-left-button"\n aria-live="polite"\n aria-label="select ').concat(n.l_o_text,'"\n style="font-family: ').concat((0,t.getFontFamily)({instanceId:o}),';"\n type="button">\n <span class="option-title">').concat(n.l_o_text,'</span>\n <span class="vote"></span>\n </button>\n <button\n class="poll-right-button"\n aria-live="polite"\n aria-label="select ').concat(n.r_o_text,'"\n style="font-family: ').concat((0,t.getFontFamily)({instanceId:o}),';"\n type="button">\n <span class="option-title">').concat(n.r_o_text,'</span>\n <span class="vote"></span>\n </button>\n </div>\n </div>\n </div>\n')};exports.default=n;
|
|
255
|
+
},{"../../../lib/util":"PesM"}],"fJSh":[function(require,module,exports) {
|
|
256
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var t=d(require("@babel/runtime/helpers/asyncToGenerator")),e=d(require("@babel/runtime/helpers/slicedToArray")),a=d(require("@babel/runtime/helpers/classCallCheck")),o=d(require("@babel/runtime/helpers/createClass")),l=d(require("@babel/runtime/helpers/inherits")),r=d(require("@babel/runtime/helpers/possibleConstructorReturn")),i=d(require("@babel/runtime/helpers/getPrototypeOf")),s=d(require("@babel/runtime/regenerator")),n=require("../../constants/layerTypes"),u=d(require("../base")),_=d(require("./dataConvertor")),c=require("../../lib/util"),h=d(require("./template")),p=require("../../constants/events");function d(t){return t&&t.__esModule?t:{default:t}}function y(t){var e=f();return function(){var a,o=(0,i.default)(t);if(e){var l=(0,i.default)(this).constructor;a=Reflect.construct(o,arguments,l)}else a=o.apply(this,arguments);return(0,r.default)(this,a)}}function f(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}var v=function(r){(0,l.default)(u,r);var i=y(u);function u(t){var o,l=t.layer,r=t.group,s=t.storyDom,c=t.story,p=t.instanceId;return(0,a.default)(this,u),(o=i.call(this,{type:n.LayerTemplateTypes.POLL,storyDom:s,instanceId:p})).story_=c,o.group_=r,o.pollData_=(0,_.default)(l),o.localData=o.getLocalComponentData(),o.key_=null,o.generateComponentAndAppendToPage((0,h.default)(o.pollData_,p)).then(function(t){o.dom_=t;var a=o.selectorAll(o.dom_,"button"),l=(0,e.default)(a,2),r=l[0],i=l[1];o.leftButton_=r,o.rightButton_=i,o.init_()}),o}return(0,o.default)(u,[{key:"init_",value:function(){var t=this;if(this.localData[this.pollData_.uid]){this.checkPollDataDiff_()&&(this.key_="left"===this.localData[this.pollData_.uid]?0:1),this.calcPollPercentage_(),this.dom_.classList.add("voted");var e=[this.pollData_.l_o_text,this.pollData_.r_o_text];this.dom_.ariaLabel="".concat(this.pollData_.p_text,", selected ").concat(e[this.key_])}else this.selectorAll(this.dom_,"button").forEach(function(e,a){(0,c.stopEventBubbling)(e,"touchstart"),(0,c.stopEventBubbling)(e,"touchend"),(0,c.setClickEventListener)(e,function(){return t.clickPoll_({key:a})},!0)})}},{key:"calcPollPercentage_",value:function(){var t,e,a=null!==(t=this.pollData_.l_o_vote_count)&&void 0!==t?t:0,o=null!==(e=this.pollData_.r_o_vote_count)&&void 0!==e?e:0;0===this.key_?(this.leftButton_.classList.add("selected"),a+=1):1===this.key_&&(this.rightButton_.classList.add("selected"),o+=1),this.localData=this.getLocalComponentData(),this.localData[this.pollData_.uid]=0===this.key_?"left":"right",this.setLocalComponentData(this.localData);var l=a+o,r=Math.round(a/l*100),i=Math.round(o/l*100),s=r,n=i,u=this.getMinWidthThreshold_();r<u&&100!==i&&(n=100-(s=u)),i<u&&100!==r&&(s=100-(n=u)),this.setStyle(this.leftButton_,"width","".concat(s,"%")),this.setStyle(this.rightButton_,"width","".concat(n,"%")),this.selector(this.leftButton_,".vote").innerHTML="".concat(r,"%"),this.selector(this.rightButton_,".vote").innerHTML="".concat(i,"%");var _=[r,i],h=_.findIndex(function(t){return 0===t});h>=0&&(0,c.setAttribute)(this.dom_.lastElementChild,"data-percentage-".concat(h),_[h])}},{key:"getMinWidthThreshold_",value:function(){switch(this.pollData_.scale){case 0:return 33;case 1:return 30;default:return 29}}},{key:"checkPollDataDiff_",value:function(){var t=this.getComponentLocalData(n.LayerTemplateTypes.POLL,this.pollData_);return this.pollData_.l_o_vote_count===t.l_o_vote_count&&this.pollData_.r_o_vote_count===t.r_o_vote_count}},{key:"clickPoll_",value:function(){var e=(0,t.default)(s.default.mark(function t(e){var a,o,l;return s.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(a=e.key,!this.localData[this.pollData_.uid]){t.next=3;break}return t.abrupt("return");case 3:this.key_=a,this.dom_.classList.add("voted"),this.calcPollPercentage_(),o={event_type:p.LayerEventTypes.PollSelected,story_group_id:+this.group_.group_id,story_id:+this.story_.story_id,story_group_index:null,story_index:null,story_group_type:"default",story_interactive_type:"poll",story_interactive_x:this.pollData_.l_o_vote_count,story_interactive_y:this.pollData_.r_o_vote_count,duration:null,watch_length:null,event_time:Date.now(),activity:0===this.key_?"L":"R",uid:this.pollData_.uid},this.setComponentLocalData(n.LayerTemplateTypes.POLL,this.pollData_),this.api.sendEvent(o),l={group:this.group_,story_id:this.story_.story_id,alt_text:this.story_.alt_text,is_sharable:this.story_.is_sharable,track_id:this.pollData_.custom_payload,title:this.pollData_.p_text,answers:[this.pollData_.l_o_text,this.pollData_.r_o_text],answer:0===this.key_?this.pollData_.l_o_text:this.pollData_.r_o_text},(0,c.createAndDispatchEvent)(this.storyDom_,"onCustomerEvent",{eventName:p.CustomerEventTypes.onStoryPollAnswered,params:l});case 11:case"end":return t.stop()}},t,this)}));return function(t){return e.apply(this,arguments)}}()}]),u}(u.default),D=v;exports.default=D;
|
|
257
|
+
},{"@babel/runtime/helpers/asyncToGenerator":"agGE","@babel/runtime/helpers/slicedToArray":"HETk","@babel/runtime/helpers/classCallCheck":"fcMS","@babel/runtime/helpers/createClass":"P8NW","@babel/runtime/helpers/inherits":"d4H2","@babel/runtime/helpers/possibleConstructorReturn":"pxk2","@babel/runtime/helpers/getPrototypeOf":"UJE0","@babel/runtime/regenerator":"PMvg","../../constants/layerTypes":"aJRz","../base":"skR7","./dataConvertor":"XMhj","../../lib/util":"PesM","./template":"YwuF","../../constants/events":"d0lR"}],"UkqP":[function(require,module,exports) {
|
|
258
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=t(require("@babel/runtime/helpers/defineProperty"));function t(e){return e&&e.__esModule?e:{default:e}}function r(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,a)}return r}function a(t){for(var a=1;a<arguments.length;a++){var c=null!=arguments[a]?arguments[a]:{};a%2?r(Object(c),!0).forEach(function(r){(0,e.default)(t,r,c[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(c)):r(Object(c)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(c,e))})}return t}var c=function(e){var t=a({},e);return Object.keys(e).forEach(function(r){switch(r){case"x":t.sdkLeft=e[r];break;case"w":t.width="".concat(e[r],"%");break;case"y":t.sdkTop=e[r];break;case"h":t.height="".concat(e[r],"%");break;case"left":var a;if(Number.isInteger(e[r])){var c=100*e[r]/360;a="".concat(c<0?0:c,"%")}else a="".concat(parseFloat(e[r]),"%");t.left=a;break;case"top":var o;o=Number.isInteger(e[r])?"".concat(100*e[r]/640,"%"):"".concat(parseFloat(e[r]),"%"),t.top=o;break;case"scale":var n=e[r]+1;t.compScale=n;break;case"title":t.title=e[r];break;case"has_title":t.has_title=e[r];break;case"theme":t.mode=e[r];break;case"type":t.type=e[r];break;case"uid":t.uid=e[r];break;case"emoji_code":t.emoji_code=e[r];break;case"custom_payload":t.custom_payload=e[r];break;case"rotation":t.transform="rotate(".concat(e[r],"deg)");break;case"z_index":t.zIndex=e[r];break;default:return!0}return!0}),t},o=c;exports.default=o;
|
|
259
|
+
},{"@babel/runtime/helpers/defineProperty":"IxO8"}],"LwBz":[function(require,module,exports) {
|
|
260
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var n=require("../../../lib/util"),a=function(a,t){return'\n <div class="component-layer">\n <div\n aria-hidden="true"\n class="rating-component"\n style="\n font-family: '.concat((0,n.getFontFamily)({instanceId:t}),";\n left: ").concat(a.left,";\n top: ").concat(a.top,";\n z-index: ").concat(a.zIndex,";\n ").concat(a.transform?"transform: ".concat(a.transform,";"):"",'\n "\n role="component"\n data-group=""\n data-story=""\n data-mode="').concat(a.mode,'"\n data-scale="').concat(a.compScale,'"\n data-has-title="').concat(!!a.has_title,'"\n >\n ').concat(a.has_title?'<div class="title"><span>'.concat(a.title,"</span></div>"):"",'\n <div class="slider-container">\n <div class="slider">\n <div class="slider-colored"></div>\n <span role="img" aria-label="emoji" class="indicator-animation">').concat(a.emoji_code,'</span>\n <span role="img" aria-label="emoji" class="indicator">').concat(a.emoji_code,'</span>\n <span class="average-tooltip">Average Answer</span>\n </div>\n </div>\n </div>\n </div>\n')};exports.default=a;
|
|
261
|
+
},{"../../../lib/util":"PesM"}],"raea":[function(require,module,exports) {
|
|
262
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var t=_(require("@babel/runtime/helpers/asyncToGenerator")),e=_(require("@babel/runtime/helpers/classCallCheck")),i=_(require("@babel/runtime/helpers/createClass")),a=_(require("@babel/runtime/helpers/inherits")),r=_(require("@babel/runtime/helpers/possibleConstructorReturn")),s=_(require("@babel/runtime/helpers/getPrototypeOf")),n=_(require("@babel/runtime/regenerator")),o=require("../../constants/events"),l=require("../../constants/layerTypes"),h=require("../../lib/util"),c=_(require("../base")),u=_(require("./dataConvertor")),d=_(require("./template"));function _(t){return t&&t.__esModule?t:{default:t}}function p(t){var e=v();return function(){var i,a=(0,s.default)(t);if(e){var n=(0,s.default)(this).constructor;i=Reflect.construct(a,arguments,n)}else i=a.apply(this,arguments);return(0,r.default)(this,i)}}function v(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}var y=function(r){(0,a.default)(c,r);var s=p(c);function c(t){var i,a=t.layer,r=t.group,n=t.storyDom,o=t.story,h=t.instanceId;return(0,e.default)(this,c),(i=s.call(this,{type:l.LayerTemplateTypes.RATING,storyDom:n,instanceId:h})).story_=o,i.group_=r,i.ratingData=(0,u.default)(a),i.localData=i.getLocalComponentData(),i.attachCallbacksToElement_(),i.generateComponentAndAppendToPage((0,d.default)(i.ratingData,h)).then(function(t){i.dom_=t,i.init_()}),i}return(0,i.default)(c,[{key:"attachCallbacksToElement_",value:function(){this.indicatorDragDown_=this.indicatorDragDown_.bind(this),this.indicatorDrag_=this.indicatorDrag_.bind(this),this.closeDragElement_=this.closeDragElement_.bind(this),this.storyObserverCallback_=this.storyObserverCallback_.bind(this)}},{key:"init_",value:function(){this.indicator=this.selector(this.dom_,".indicator"),this.sliderColored=this.selector(this.dom_,".slider-colored"),this.tooltip=this.selector(this.dom_,".average-tooltip"),this.indicatorAnimationDom_=this.selector(this.dom_,".indicator-animation"),this.slider=this.selector(this.dom_,".slider"),"number"==typeof this.localData[this.ratingData.uid]?this.renderRatingData_():(this.storyObserverInstance_=this.storyObserver_(this.storyObserverCallback_),(0,h.stopEventBubbling)(this.dom_,"touchmove"),this.renderIndicator_())}},{key:"storyObserverCallback_",value:function(t){var e=this;t.forEach(function(t){"attributes"===t.type&&("show"===t.attributeName&&t.target.hasAttribute("show")?(e.setStyle(e.indicator,"animation-name","indicatorMoveAnimation"),e.setStyle(e.sliderColored,"animation-name","sliderColoredMoveAnimation")):t.target.hasAttribute("show")||(e.setStyle(e.indicator,"animation-name",null),e.setStyle(e.sliderColored,"animation-name",null)))})}},{key:"renderRatingData_",value:function(){var t=0,e=0,i=this.localData[this.ratingData.uid];this.checkRatingDataDiff_()&&(t=i,e=1);var a=(this.ratingData.answer_count*this.ratingData.average_answer+t)/(this.ratingData.answer_count+e);this.setStyle(this.tooltip,"left","".concat(a,"%")),this.setStyle(this.sliderColored,"width","".concat(i,"%")),this.setStyle(this.indicator,"left","".concat(i-5,"%")),this.setStyle(this.tooltip,"display","block")}},{key:"renderIndicator_",value:function(){this.pos1=0,this.pos3=0;var t=this.getStyle(this.dom_,"transform");this.ratingRotation=t&&+t.match(/.*?\((.*)deg/)[1],this.axis=this.ratingRotation>=45&&this.ratingRotation<=135||this.ratingRotation>=225&&this.ratingRotation<=315?"clientY":"clientX",this.indicator.addEventListener("pointerdown",this.indicatorDragDown_,{once:!0})}},{key:"indicatorDragDown_",value:function(t){var e,i=t||window.event;i.preventDefault(),(0,h.createAndDispatchEvent)(this.dom_,"onPlayPause"),this.pos3=null!==(e=i[this.axis])&&void 0!==e?e:i.targetTouches[0][this.axis],this.dom_.addEventListener("pointerup",this.closeDragElement_,{once:!0}),this.dom_.addEventListener("pointermove",this.indicatorDrag_)}},{key:"indicatorDrag_",value:function(t){var e,i,a=t||window.event;a.preventDefault(),a.stopImmediatePropagation(),a.stopPropagation(),this.pos1=this.pos3-(null!==(e=a[this.axis])&&void 0!==e?e:a.targetTouches[0][this.axis]),this.pos3=null!==(i=a[this.axis])&&void 0!==i?i:a.targetTouches[0][this.axis];var r=this.indicator.offsetLeft,s=this.ratingRotation>=130&&this.ratingRotation<=315?r+this.pos1:r-this.pos1;if(!(s<=-10||s>this.slider.offsetWidth-10)){var n=100*s/this.slider.offsetWidth;this.setStyle(this.indicator,"left","".concat(n,"%")),this.setStyle(this.sliderColored,"width","".concat(n+5,"%"))}}},{key:"closeDragElement_",value:function(){this.tooltip.classList.add("show"),this.dom_.removeEventListener("pointermove",this.indicatorDrag_),this.indicator.removeEventListener("pointermove",this.indicatorDrag_),this.setStyle(this.indicator,"animation",null),this.setStyle(this.sliderColored,"animation",null),this.calcAverageAnswer_(),this.storyObserverInstance_.disconnect(),(0,h.createAndDispatchEvent)(this.dom_,"onPlayPause")}},{key:"calcAverageAnswer_",value:function(){var t=Math.floor(100*(this.indicator.offsetLeft+10)/this.slider.offsetWidth);t=t>100?100:t;var e=(this.ratingData.answer_count*this.ratingData.average_answer+t)/(this.ratingData.answer_count+1),i=this.slider.offsetWidth*e/100;this.setStyle(this.tooltip,"left","".concat(i,"px")),this.componentsData=this.getLocalComponentData(),this.componentsData[this.ratingData.uid]=t,this.setLocalComponentData(this.componentsData),this.sendRatingEvent_(t)}},{key:"checkRatingDataDiff_",value:function(){var t=this.getComponentLocalData(l.LayerTemplateTypes.RATING,this.ratingData);return this.ratingData.average_answer===t.average_answer}},{key:"sendRatingEvent_",value:function(){var e=(0,t.default)(n.default.mark(function t(e){var i,a;return n.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:i={event_type:o.LayerEventTypes.Rated,story_group_id:+this.group_.group_id,story_id:+this.story_.story_id,story_group_index:null,story_index:null,story_group_type:"default",uid:this.ratingData.uid,story_interactive_type:"rating",story_interactive_x:this.ratingData.x,story_interactive_y:this.ratingData.y,duration:null,watch_length:null,event_time:Date.now(),activity:e.toString()},this.setComponentLocalData(l.LayerTemplateTypes.RATING,this.ratingData),this.api.sendEvent(i),a={group:this.group_,story_id:this.story_.story_id,alt_text:this.story_.alt_text,is_sharable:this.story_.is_sharable,track_id:this.ratingData.custom_payload,title:this.ratingData.title,emoji_code:this.ratingData.emoji_code,answer:e.toString()},(0,h.createAndDispatchEvent)(this.storyDom_,"onCustomerEvent",{eventName:o.CustomerEventTypes.onStoryRatingAnswered,params:a});case 5:case"end":return t.stop()}},t,this)}));return function(t){return e.apply(this,arguments)}}()}]),c}(c.default),f=y;exports.default=f;
|
|
263
|
+
},{"@babel/runtime/helpers/asyncToGenerator":"agGE","@babel/runtime/helpers/classCallCheck":"fcMS","@babel/runtime/helpers/createClass":"P8NW","@babel/runtime/helpers/inherits":"d4H2","@babel/runtime/helpers/possibleConstructorReturn":"pxk2","@babel/runtime/helpers/getPrototypeOf":"UJE0","@babel/runtime/regenerator":"PMvg","../../constants/events":"d0lR","../../constants/layerTypes":"aJRz","../../lib/util":"PesM","../base":"skR7","./dataConvertor":"UkqP","./template":"LwBz"}],"Wuka":[function(require,module,exports) {
|
|
264
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=t(require("@babel/runtime/helpers/defineProperty")),r=require("../../lib/util");function t(e){return e&&e.__esModule?e:{default:e}}function c(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(e);r&&(c=c.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),t.push.apply(t,c)}return t}function o(r){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?c(Object(o),!0).forEach(function(t){(0,e.default)(r,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(o)):c(Object(o)).forEach(function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(o,e))})}return r}var a=function(e){var t=o({},e),c={1:[1],2:[1,2],3:[1,3,2],4:[1,3,4,2],5:[1,3,5,4,2]};return Object.keys(e).forEach(function(o){switch(o){case"background_color":var a=(0,r.convertHex)(e[o]);t.mode="rgba(255, 255, 255, 0.5)"===a?"Light":"Dark";break;case"emoji_codes":t.emoji_codes=e.emoji_codes.map(function(r,t){return{emoji:r,count:e.click_counts[r],animate_order:c[e.emoji_codes.length][t]}});break;case"left":var n;if(Number.isInteger(e[o])){var i=100*e[o]/360;n="".concat(i<0?0:i,"%")}else n="".concat(parseFloat(e[o]),"%");t.left=n;break;case"top":var s;s=Number.isInteger(e[o])?"".concat(100*e[o]/640,"%"):"".concat(parseFloat(e[o]),"%"),t.top=s;break;case"x":t.sdkLeft=e[o];break;case"w":t.width="".concat(e[o],"%");break;case"y":t.sdkTop=e[o];break;case"h":t.height="".concat(e[o],"%");break;case"z_index":t.zIndex=e[o];break;default:return!0}return!0}),t},n=a;exports.default=n;
|
|
265
|
+
},{"@babel/runtime/helpers/defineProperty":"IxO8","../../lib/util":"PesM"}],"KBRU":[function(require,module,exports) {
|
|
266
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var n=require("../../../lib/util"),o=function(o){var t;return'\n<div class="component-layer">\n <div\n aria-hidden="true"\n style="\n left: '.concat(o.left,";\n top: ").concat(o.top,";\n z-index: ").concat(o.z_index,'\n "\n class="reactions ').concat(90===o.rotation?"rotated":"",'"\n data-mode="').concat(o.mode,'""\n >\n ').concat(null===(t=o.emoji_codes)||void 0===t?void 0:t.map(function(t){return'\n <div\n class="emoji-container"\n style="--animate-order: '.concat(t.animate_order,"; --background-color: ").concat("Light"===o.mode?"#fff":"#000",'">\n <span class="emoji no-pointer-events">').concat(t.emoji,'</span>\n <span class="count no-pointer-events">').concat((0,n.kFormatter)(t.count),"</span>\n </div>\n ")}).join(""),"\n </div>\n</div>")};exports.default=o;
|
|
267
|
+
},{"../../../lib/util":"PesM"}],"GGza":[function(require,module,exports) {
|
|
268
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var t=m(require("@babel/runtime/helpers/asyncToGenerator")),e=m(require("@babel/runtime/helpers/toConsumableArray")),a=m(require("@babel/runtime/helpers/classCallCheck")),i=m(require("@babel/runtime/helpers/createClass")),s=m(require("@babel/runtime/helpers/inherits")),n=m(require("@babel/runtime/helpers/possibleConstructorReturn")),o=m(require("@babel/runtime/helpers/getPrototypeOf")),r=m(require("@babel/runtime/regenerator")),l=require("../../constants/events"),c=require("../../constants/layerTypes"),u=require("../../lib/util"),h=m(require("../base")),d=m(require("./dataConvertor")),_=m(require("./template"));function m(t){return t&&t.__esModule?t:{default:t}}function y(t){var e=f();return function(){var a,i=(0,o.default)(t);if(e){var s=(0,o.default)(this).constructor;a=Reflect.construct(i,arguments,s)}else a=i.apply(this,arguments);return(0,n.default)(this,a)}}function f(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}var p=function(n){(0,s.default)(h,n);var o=y(h);function h(t){var e,i=t.layer,s=t.group,n=t.storyDom,r=t.story,l=t.instanceId;return(0,a.default)(this,h),(e=o.call(this,{type:c.LayerTemplateTypes.EMOJI,storyDom:n,instanceId:l})).story_=r,e.storyDom_=n,e.group_=s,e.emojiData_=(0,d.default)(i),e.animationStart_=!1,e.selectedEmoji_=null,e.localData_=e.getLocalComponentData(),e.generateComponentAndAppendToPage((0,_.default)(e.emojiData_)).then(function(t){e.dom_=t,e.init_()}),e.attachCallbacksToElement_(),e}return(0,i.default)(h,[{key:"attachCallbacksToElement_",value:function(){this.handleClickEmoji_=this.handleClickEmoji_.bind(this),this.handleLocalData_=this.handleLocalData_.bind(this),this.handleEvent_=this.handleEvent_.bind(this),this.handleDom_=this.handleDom_.bind(this),this.storyObserverCallback_=this.storyObserverCallback_.bind(this)}},{key:"init_",value:function(){var t=this;this.storyObserver_(this.storyObserverCallback_),this.globalInstanceData.storylyEmbed.init&&(0,u.stopEventBubbling)(this.dom_,"click"),this.localData_[this.emojiData_.uid]&&(this.dom_.classList.add("reacted"),this.emojiData_.click_counts=this.localData_[this.emojiData_.uid].counts,this.handleDom_(this.localData_[this.emojiData_.uid].selected)),this.dom_.querySelectorAll(".emoji-container").forEach(function(e){(0,u.stopEventBubbling)(e,"touchstart"),(0,u.stopEventBubbling)(e,"touchend"),e.addEventListener("pointerdown",t.handleClickEmoji_)})}},{key:"storyObserverCallback_",value:function(t){var e=this;t.forEach(function(t){"attributes"===t.type&&"show"===t.attributeName&&(t.target.hasAttribute("show")&&e.dom_.classList.add("animating"),t.target.hasAttribute("show")||(e.dom_.classList.remove("animating"),e.handleEvent_()))})}},{key:"animationDom_",value:function(t){return'\n <div class="emoji-animation">\n '.concat((0,e.default)(Array(20).keys()).map(function(){return'<span style="bottom: -'.concat(10*Math.random()-10,"%; left: ").concat(90*Math.random(),"%; animation-delay: ").concat(1.2*Math.random(),'s">').concat(t,"</span>")}).join(""),"\n </div>\n ")}},{key:"handleClickEmoji_",value:function(t){var e=this,a=t.target,i=a.querySelector(".emoji").innerHTML;if(a.classList.contains("clicked"))return this.selectedEmoji_=null,a.classList.remove("clicked"),this.dom_.classList.remove("reacted"),this.dom_.classList.add("deselected"),this.emojiData_.click_counts[i]-=1,this.localData_[this.emojiData_.uid]=null,void this.setLocalComponentData(this.localData_);var s=this.generateHtmlFromTemplate(this.animationDom_(i));this.animationStart_||(this.storyDom_.appendChild(s),this.selectedEmoji_&&(this.emojiData_.click_counts[this.selectedEmoji_]-=1),this.emojiData_.click_counts[i]+=1,this.selectedEmoji_=i,this.handleDom_(i),this.handleLocalData_(),this.animationStart_=!0),this.dom_.classList.add("reacted"),setTimeout(function(){s.remove(),e.animationStart_=!1},2500)}},{key:"handleLocalData_",value:function(){this.selectedEmoji_&&(this.localData_=this.getLocalComponentData(),this.localData_[this.emojiData_.uid]={counts:this.emojiData_.click_counts,selected:this.selectedEmoji_},this.setLocalComponentData(this.localData_))}},{key:"handleDom_",value:function(t){var e=this;Array.from(this.dom_.children).forEach(function(a){var i=a.firstElementChild.innerHTML;a.lastElementChild.innerHTML=(0,u.kFormatter)(e.emojiData_.click_counts[i]),i===t?a.classList.add("clicked"):a.classList.remove("clicked")})}},{key:"handleEvent_",value:function(){var e=(0,t.default)(r.default.mark(function t(){var e,a;return r.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(this.selectedEmoji_){t.next=2;break}return t.abrupt("return");case 2:e={event_type:l.LayerEventTypes.ReactionClicked,story_group_id:+this.group_.group_id,story_id:+this.story_.story_id,story_group_index:null,story_index:null,story_group_type:"default",story_interactive_x:null,story_interactive_y:null,duration:null,watch_length:null,event_time:Date.now(),uid:this.emojiData_.uid,activity:this.selectedEmoji_},this.api.sendEvent(e),a={group:this.group_,story_id:this.story_.story_id,alt_text:this.story_.alt_text,is_sharable:this.story_.is_sharable,track_id:this.emojiData_.custom_payload,answers:this.emojiData_.emoji_codes,answer:this.selectedEmoji_},(0,u.createAndDispatchEvent)(this.storyDom_,"onCustomerEvent",{eventName:l.CustomerEventTypes.onStoryReactionAnswered,params:a});case 6:case"end":return t.stop()}},t,this)}));return function(){return e.apply(this,arguments)}}()}]),h}(h.default),v=p;exports.default=v;
|
|
269
|
+
},{"@babel/runtime/helpers/asyncToGenerator":"agGE","@babel/runtime/helpers/toConsumableArray":"Fhqp","@babel/runtime/helpers/classCallCheck":"fcMS","@babel/runtime/helpers/createClass":"P8NW","@babel/runtime/helpers/inherits":"d4H2","@babel/runtime/helpers/possibleConstructorReturn":"pxk2","@babel/runtime/helpers/getPrototypeOf":"UJE0","@babel/runtime/regenerator":"PMvg","../../constants/events":"d0lR","../../constants/layerTypes":"aJRz","../../lib/util":"PesM","../base":"skR7","./dataConvertor":"Wuka","./template":"KBRU"}],"WBGL":[function(require,module,exports) {
|
|
270
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=t(require("@babel/runtime/helpers/defineProperty"));function t(e){return e&&e.__esModule?e:{default:e}}function r(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,a)}return r}function a(t){for(var a=1;a<arguments.length;a++){var c=null!=arguments[a]?arguments[a]:{};a%2?r(Object(c),!0).forEach(function(r){(0,e.default)(t,r,c[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(c)):r(Object(c)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(c,e))})}return t}var c=function(e){var t=a({},e);return Object.keys(e).forEach(function(r){switch(r){case"custom_payload":t.custom_payload=e[r];break;case"x":t.sdkLeft=e[r];break;case"w":t.width="".concat(e[r],"%");break;case"y":t.sdkTop=e[r];break;case"left":var a;if(Number.isInteger(e[r])){var c=100*e[r]/360;a="".concat(c<0?0:c,"%")}else a="".concat(parseFloat(e[r]),"%");t.left=a;break;case"top":var o;o=Number.isInteger(e[r])?"".concat(100*e[r]/640,"%"):"".concat(parseFloat(e[r]),"%"),t.top=o;break;case"h":t.height="".concat(e[r],"%");break;case"q_answer":t.q_answer=e[r];break;case"q_o_texts":t.q_o_texts=e[r];break;case"q_o_votes":t.q_o_votes=e[r];break;case"q_text":t.q_text=e[r];break;case"has_title":t.has_title=e[r];break;case"o_h":t.o_h=e[r];break;case"scale":var s=e[r]+1;t.compScale=s;break;case"theme":t.mode=e[r];break;case"type":t.type=e[r];break;case"uid":t.uid=e[r];break;case"rotation":t.transform="rotate(".concat(e[r],"deg)");break;case"z_index":t.zIndex=e[r];break;default:return!0}return!0}),t},o=c;exports.default=o;
|
|
271
|
+
},{"@babel/runtime/helpers/defineProperty":"IxO8"}],"KbCg":[function(require,module,exports) {
|
|
272
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var n=require("../../../lib/util"),t=function(t,a){var c=["A","B","C","D"];return'\n <div class="component-layer">\n <div\n aria-hidden="true"\n class="quiz-component"\n style="\n font-family: '.concat((0,n.getFontFamily)({instanceId:a}),";\n left: ").concat(t.left,";\n top: ").concat(t.top,";\n z-index: ").concat(t.zIndex,";\n ").concat(t.transform?"transform: ".concat(t.transform,";"):"",'";\n role="component"\n data-group=""\n data-story=""\n data-mode="').concat(t.mode,'"\n data-scale="').concat(t.compScale,'"\n data-has-title=').concat(!!t.has_title,"\n >\n ").concat(t.has_title?'<div class="question"><span>'.concat(t.q_text,"</span></div>"):"",'\n <div class="answers" data-has-title=').concat(!!t.has_title,">\n ").concat(t.q_o_texts.map(function(n,t){return'<div class="answer">\n <span>'.concat(c[t],"</span>\n <span>").concat(n,"</span>\n </div>")}).join(""),"\n </div>\n </div>\n </div>\n ")};exports.default=t;
|
|
273
|
+
},{"../../../lib/util":"PesM"}],"lrR5":[function(require,module,exports) {
|
|
274
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=y(require("@babel/runtime/helpers/asyncToGenerator")),t=y(require("@babel/runtime/helpers/toConsumableArray")),r=y(require("@babel/runtime/helpers/classCallCheck")),i=y(require("@babel/runtime/helpers/createClass")),a=y(require("@babel/runtime/helpers/inherits")),n=y(require("@babel/runtime/helpers/possibleConstructorReturn")),s=y(require("@babel/runtime/helpers/getPrototypeOf")),o=y(require("@babel/runtime/regenerator")),u=y(require("../base")),l=require("../../constants/layerTypes"),c=y(require("./dataConvertor")),h=require("../../lib/util"),d=y(require("./template")),_=require("../../constants/events");function y(e){return e&&e.__esModule?e:{default:e}}function p(e){var t=f();return function(){var r,i=(0,s.default)(e);if(t){var a=(0,s.default)(this).constructor;r=Reflect.construct(i,arguments,a)}else r=i.apply(this,arguments);return(0,n.default)(this,r)}}function f(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}var v=function(n){(0,a.default)(u,n);var s=p(u);function u(e){var t,i=e.layer,a=e.group,n=e.story,o=e.storyDom,h=e.instanceId;return(0,r.default)(this,u),(t=s.call(this,{type:l.LayerTemplateTypes.QUIZ,storyDom:o,instanceId:h})).story_=n,t.group_=a,t.quizData_=(0,c.default)(i),t.localData=t.getLocalComponentData(),t.sumAnswers=[],t.incorrectIcon='<svg width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path fill-rule="evenodd" clip-rule="evenodd" d="M14.1942 3.80598C14.6251 4.2369 14.6251 4.93557 14.1942 5.36649L5.36661 14.1941C4.93569 14.625 4.23703 14.625 3.8061 14.1941C3.37518 13.7632 3.37518 13.0645 3.8061 12.6336L12.6337 3.80598C13.0646 3.37506 13.7633 3.37506 14.1942 3.80598Z" fill="#FF4D50"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M3.8061 3.80598C4.23703 3.37506 4.93569 3.37506 5.36661 3.80598L14.1942 12.6336C14.6251 13.0645 14.6251 13.7632 14.1942 14.1941C13.7633 14.625 13.0646 14.625 12.6337 14.1941L3.8061 5.36649C3.37518 4.93557 3.37518 4.2369 3.8061 3.80598Z" fill="#FF4D50"/>\n </svg>',t.correctIcon='<svg width="15" height="11" viewBox="0 0 15 11" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path fill-rule="evenodd" clip-rule="evenodd" d="M14.2168 0.805981C14.6477 1.2369 14.6477 1.93557 14.2168 2.36649L6.12485 10.4584C5.69393 10.8894 4.99526 10.8894 4.56434 10.4584L0.886181 6.78028C0.455257 6.34936 0.455257 5.6507 0.886181 5.21977C1.3171 4.78885 2.01577 4.78885 2.44669 5.21977L5.3446 8.11768L12.6563 0.805981C13.0872 0.375057 13.7859 0.375057 14.2168 0.805981Z" fill="#51C41A"/>\n </svg>',t.generateComponentAndAppendToPage((0,d.default)(t.quizData_,h)).then(function(e){t.dom_=e,t.init_()}),t}return(0,i.default)(u,[{key:"init_",value:function(){var e=this;"number"==typeof this.localData[this.quizData_.uid]?(this.key=this.localData[this.quizData_.uid],this.makeChoice_()):this.selectorAll(this.dom_,".answer").forEach(function(t,r){(0,h.stopEventBubbling)(t,"touchstart"),(0,h.stopEventBubbling)(t,"touchend"),t.addEventListener("pointerdown",function(){return e.clickChoice_({key:r})},{once:!0})})}},{key:"handlePercentageTypeAnswerStyles_",value:function(e,t,r){var i,a=this.checkQuizDataDiff_()?0:1,n=null!==(i=this.quizData_.q_o_votes)&&void 0!==i?i:[100,100,100,100],s=this.sumArrayValues(null!=n?n:[])+a,o=r===this.key?Number(n[r])+a:Number(n[r]),u=Math.round(o/s*100),l=document.createElement("div");l.classList.add("bg-percent"),e.appendChild(l),this.key===r&&this.setStyle(e,"border-color","#BDBDBD"),this.setStyle(l,"width","".concat(u,"%")),this.setStyle(t,"border","none"),this.sumAnswers.push(u),t.innerHTML="".concat(u,"%")}},{key:"handleCorrectTypeAnswerStyles_",value:function(e,t,r){var i=this.quizData_.q_answer===this.key;t.innerHTML=i&&r===this.key||this.quizData_.q_answer===r?this.correctIcon:this.incorrectIcon,r===this.key?e.classList.add(i?"correct-choice":"incorrect-choice"):e.classList.add(r===this.quizData_.q_answer?"correct-choice":"other-choice","blurred")}},{key:"handleSummedPercentages_",value:function(){var e,r=this.sumArrayValues(null!==(e=this.sumAnswers)&&void 0!==e?e:[]);if(100!==r){var i,a=Math.max.apply(Math,(0,t.default)(null!==(i=this.sumAnswers)&&void 0!==i?i:[])),n=a+(100-r),s=this.sumAnswers.findIndex(function(e){return e===a});this.selectorAll(this.dom_,".answer")[s].firstElementChild.innerHTML="".concat(n,"%")}}},{key:"makeChoice_",value:function(){var e=this;this.localData=this.getLocalComponentData(),this.localData[this.quizData_.uid]=this.key,this.setLocalComponentData(this.localData);var t=null===this.quizData_.q_answer;this.selectorAll(this.dom_,".answer").forEach(function(r,i){var a=r.firstElementChild;return t?e.handlePercentageTypeAnswerStyles_(r,a,i):(e.handleCorrectTypeAnswerStyles_(r,a,i),!0)}),t&&this.handleSummedPercentages_()}},{key:"checkQuizDataDiff_",value:function(){var e,t=this.getComponentLocalData(l.LayerTemplateTypes.QUIZ,this.quizData_);return!(t.uid!==this.quizData_.uid||!t.q_o_votes)&&(null!==(e=this.quizData_.q_o_votes)&&void 0!==e?e:[]).some(function(e,r){var i;return(null===(i=t.q_o_votes)||void 0===i?void 0:i[r])!==e})}},{key:"clickChoice_",value:function(){var t=(0,e.default)(o.default.mark(function e(t){var r,i,a;return o.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(r=t.key,"number"!=typeof this.localData[this.quizData_.uid]){e.next=3;break}return e.abrupt("return");case 3:this.key=r,this.makeChoice_(),i={event_type:_.LayerEventTypes.QuizAnswered,story_group_id:+this.group_.group_id,story_id:+this.story_.story_id,story_group_index:null,story_index:null,story_group_type:"default",story_interactive_type:"quiz",story_interactive_x:this.quizData_.x,story_interactive_y:this.quizData_.y,duration:null,watch_length:null,event_time:Date.now(),activity:String(this.key),uid:this.quizData_.uid},this.setComponentLocalData(l.LayerTemplateTypes.QUIZ,this.quizData_),this.api.sendEvent(i),a={group:this.group_,story_id:this.story_.story_id,alt_text:this.story_.alt_text,is_sharable:this.story_.is_sharable,track_id:this.quizData_.custom_payload,title:this.quizData_.q_text,answers:this.quizData_.q_o_texts,answer:this.quizData_.q_o_texts[this.key],correct_answer:this.quizData_.q_o_texts[this.quizData_.q_answer]},(0,h.createAndDispatchEvent)(this.storyDom_,"onCustomerEvent",{eventName:_.CustomerEventTypes.onStoryQuizAnswered,params:a});case 10:case"end":return e.stop()}},e,this)}));return function(e){return t.apply(this,arguments)}}()}]),u}(u.default),m=v;exports.default=m;
|
|
275
|
+
},{"@babel/runtime/helpers/asyncToGenerator":"agGE","@babel/runtime/helpers/toConsumableArray":"Fhqp","@babel/runtime/helpers/classCallCheck":"fcMS","@babel/runtime/helpers/createClass":"P8NW","@babel/runtime/helpers/inherits":"d4H2","@babel/runtime/helpers/possibleConstructorReturn":"pxk2","@babel/runtime/helpers/getPrototypeOf":"UJE0","@babel/runtime/regenerator":"PMvg","../base":"skR7","../../constants/layerTypes":"aJRz","./dataConvertor":"WBGL","../../lib/util":"PesM","./template":"KbCg","../../constants/events":"d0lR"}],"YvuL":[function(require,module,exports) {
|
|
276
|
+
var global = arguments[3];
|
|
277
|
+
var t=arguments[3];Object.defineProperty(exports,"__esModule",{value:!0}),exports.create=exports.default=void 0;var e={};!function t(e,n,a,r){var o=!!(e.Worker&&e.Blob&&e.Promise&&e.OffscreenCanvas&&e.OffscreenCanvasRenderingContext2D&&e.HTMLCanvasElement&&e.HTMLCanvasElement.prototype.transferControlToOffscreen&&e.URL&&e.URL.createObjectURL);function i(){}function l(t){var a=n.exports.Promise,r=void 0!==a?a:e.Promise;return"function"==typeof r?new r(t):(t(i,i),null)}var c,s,u,d,f,h=(u=Math.floor(1e3/60),d={},f=0,"function"==typeof requestAnimationFrame&&"function"==typeof cancelAnimationFrame?(c=function(t){var e=Math.random();return d[e]=requestAnimationFrame(function n(a){f===a||f+u-1<a?(f=a,delete d[e],t()):d[e]=requestAnimationFrame(n)}),e},s=function(t){d[t]&&cancelAnimationFrame(d[t])}):(c=function(t){return setTimeout(t,u)},s=function(t){return clearTimeout(t)}),{frame:c,cancel:s}),g=function(){var e,n,r={};return function(){if(e)return e;if(!a&&o){var i=["var CONFETTI, SIZE = {}, module = {};","("+t.toString()+")(this, module, true, SIZE);","onmessage = function(msg) {"," if (msg.data.options) {"," CONFETTI(msg.data.options).then(function () {"," if (msg.data.callback) {"," postMessage({ callback: msg.data.callback });"," }"," });"," } else if (msg.data.reset) {"," CONFETTI.reset();"," } else if (msg.data.resize) {"," SIZE.width = msg.data.resize.width;"," SIZE.height = msg.data.resize.height;"," } else if (msg.data.canvas) {"," SIZE.width = msg.data.canvas.width;"," SIZE.height = msg.data.canvas.height;"," CONFETTI = module.exports.create(msg.data.canvas);"," }","}"].join("\n");try{e=new Worker(URL.createObjectURL(new Blob([i])))}catch(c){return void 0!==typeof console&&"function"==typeof console.warn&&console.warn("🎊 Could not load worker",c),null}!function(t){function e(e,n){t.postMessage({options:e||{},callback:n})}t.init=function(e){var n=e.transferControlToOffscreen();t.postMessage({canvas:n},[n])},t.fire=function(a,o,i){if(n)return e(a,null),n;var c=Math.random().toString(36).slice(2);return n=l(function(o){function l(e){e.data.callback===c&&(delete r[c],t.removeEventListener("message",l),n=null,i(),o())}t.addEventListener("message",l),e(a,c),r[c]=l.bind(null,{data:{callback:c}})})},t.reset=function(){for(var e in t.postMessage({reset:!0}),r)r[e](),delete r[e]}}(e)}return e}}(),m={particleCount:50,angle:90,spread:45,startVelocity:45,decay:.9,gravity:1,drift:0,ticks:200,x:.5,y:.5,shapes:["square","circle"],zIndex:100,colors:["#26ccff","#a25afd","#ff5e7e","#88ff5a","#fcff42","#ffa62d","#ff36ff"],disableForReducedMotion:!1,scalar:1};function v(t,e,n){return function(t,e){return e?e(t):t}(t&&null!=t[e]?t[e]:m[e],n)}function b(t){return t<0?0:Math.floor(t)}function p(t){return parseInt(t,16)}function y(t){return t.map(M)}function M(t){var e=String(t).replace(/[^0-9a-f]/gi,"");return e.length<6&&(e=e[0]+e[0]+e[1]+e[1]+e[2]+e[2]),{r:p(e.substring(0,2)),g:p(e.substring(2,4)),b:p(e.substring(4,6))}}function w(t){t.width=document.documentElement.clientWidth,t.height=document.documentElement.clientHeight}function x(t){var e=t.getBoundingClientRect();t.width=e.width,t.height=e.height}function C(t,e,n,o,i){var c,s,u=e.slice(),d=t.getContext("2d"),f=l(function(e){function l(){c=s=null,d.clearRect(0,0,o.width,o.height),i(),e()}c=h.frame(function e(){!a||o.width===r.width&&o.height===r.height||(o.width=t.width=r.width,o.height=t.height=r.height),o.width||o.height||(n(t),o.width=t.width,o.height=t.height),d.clearRect(0,0,o.width,o.height),(u=u.filter(function(t){return function(t,e){e.x+=Math.cos(e.angle2D)*e.velocity+e.drift,e.y+=Math.sin(e.angle2D)*e.velocity+e.gravity,e.wobble+=.1,e.velocity*=e.decay,e.tiltAngle+=.1,e.tiltSin=Math.sin(e.tiltAngle),e.tiltCos=Math.cos(e.tiltAngle),e.random=Math.random()+5,e.wobbleX=e.x+10*e.scalar*Math.cos(e.wobble),e.wobbleY=e.y+10*e.scalar*Math.sin(e.wobble);var n=e.tick++/e.totalTicks,a=e.x+e.random*e.tiltCos,r=e.y+e.random*e.tiltSin,o=e.wobbleX+e.random*e.tiltCos,i=e.wobbleY+e.random*e.tiltSin;return t.fillStyle="rgba("+e.color.r+", "+e.color.g+", "+e.color.b+", "+(1-n)+")",t.beginPath(),"circle"===e.shape?t.ellipse?t.ellipse(e.x,e.y,Math.abs(o-a)*e.ovalScalar,Math.abs(i-r)*e.ovalScalar,Math.PI/10*e.wobble,0,2*Math.PI):function(t,e,n,a,r,o,i,l,c){t.save(),t.translate(e,n),t.rotate(o),t.scale(a,r),t.arc(0,0,1,i,l,c),t.restore()}(t,e.x,e.y,Math.abs(o-a)*e.ovalScalar,Math.abs(i-r)*e.ovalScalar,Math.PI/10*e.wobble,0,2*Math.PI):(t.moveTo(Math.floor(e.x),Math.floor(e.y)),t.lineTo(Math.floor(e.wobbleX),Math.floor(r)),t.lineTo(Math.floor(o),Math.floor(i)),t.lineTo(Math.floor(a),Math.floor(e.wobbleY))),t.closePath(),t.fill(),e.tick<e.totalTicks}(d,t)})).length?c=h.frame(e):l()}),s=l});return{addFettis:function(t){return u=u.concat(t),f},canvas:t,promise:f,reset:function(){c&&h.cancel(c),s&&s()}}}function k(t,n){var a,r=!t,i=!!v(n||{},"resize"),c=v(n,"disableForReducedMotion",Boolean),s=o&&!!v(n||{},"useWorker")?g():null,u=r?w:x,d=!(!t||!s)&&!!t.__confetti_initialized,f="function"==typeof matchMedia&&matchMedia("(prefers-reduced-motion)").matches;function h(e,n,r){for(var o,i,l,c,s,d=v(e,"particleCount",b),f=v(e,"angle",Number),h=v(e,"spread",Number),g=v(e,"startVelocity",Number),m=v(e,"decay",Number),p=v(e,"gravity",Number),M=v(e,"drift",Number),w=v(e,"colors",y),x=v(e,"ticks",Number),k=v(e,"shapes"),I=v(e,"scalar"),T=function(t){var e=v(t,"origin",Object);return e.x=v(e,"x",Number),e.y=v(e,"y",Number),e}(e),E=d,S=[],F=t.width*T.x,N=t.height*T.y;E--;)S.push((o={x:F,y:N,angle:f,spread:h,startVelocity:g,color:w[E%w.length],shape:k[(c=0,s=k.length,Math.floor(Math.random()*(s-c))+c)],ticks:x,decay:m,gravity:p,drift:M,scalar:I},i=void 0,l=void 0,i=o.angle*(Math.PI/180),l=o.spread*(Math.PI/180),{x:o.x,y:o.y,wobble:10*Math.random(),velocity:.5*o.startVelocity+Math.random()*o.startVelocity,angle2D:-i+(.5*l-Math.random()*l),tiltAngle:Math.random()*Math.PI,color:o.color,shape:o.shape,tick:0,totalTicks:o.ticks,decay:o.decay,drift:o.drift,random:Math.random()+5,tiltSin:0,tiltCos:0,wobbleX:0,wobbleY:0,gravity:3*o.gravity,ovalScalar:.6,scalar:o.scalar}));return a?a.addFettis(S):(a=C(t,S,u,n,r)).promise}function m(n){var o=c||v(n,"disableForReducedMotion",Boolean),g=v(n,"zIndex",Number);if(o&&f)return l(function(t){t()});r&&a?t=a.canvas:r&&!t&&(t=function(t){var e=document.createElement("canvas");return e.style.position="fixed",e.style.top="0px",e.style.left="0px",e.style.pointerEvents="none",e.style.zIndex=t,e}(g),document.body.appendChild(t)),i&&!d&&u(t);var m={width:t.width,height:t.height};function b(){if(s){var e={getBoundingClientRect:function(){if(!r)return t.getBoundingClientRect()}};return u(e),void s.postMessage({resize:{width:e.width,height:e.height}})}m.width=m.height=null}function p(){a=null,i&&e.removeEventListener("resize",b),r&&t&&(document.body.removeChild(t),t=null,d=!1)}return s&&!d&&s.init(t),d=!0,s&&(t.__confetti_initialized=!0),i&&e.addEventListener("resize",b,!1),s?s.fire(n,m,p):h(n,m,p)}return m.reset=function(){s&&s.reset(),a&&a.reset()},m}n.exports=k(null,{useWorker:!0,resize:!0}),n.exports.create=k}(function(){return"undefined"!=typeof window?window:"undefined"!=typeof self?self:this||{}}(),e,!1);var n=e.exports;exports.default=n;var a=e.exports.create;exports.create=a;
|
|
278
|
+
},{}],"Adv1":[function(require,module,exports) {
|
|
279
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=t(require("@babel/runtime/helpers/defineProperty")),r=require("../../constants/common");function t(e){return e&&e.__esModule?e:{default:e}}function a(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);r&&(a=a.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),t.push.apply(t,a)}return t}function c(r){for(var t=1;t<arguments.length;t++){var c=null!=arguments[t]?arguments[t]:{};t%2?a(Object(c),!0).forEach(function(t){(0,e.default)(r,t,c[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(c)):a(Object(c)).forEach(function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(c,e))})}return r}var n=function(e){var t=c({},e);return Object.keys(e).forEach(function(a){switch(a){case"left":var c;if(Number.isInteger(e[a])){var n=100*e[a]/360;c="".concat(n<0?0:n,"%")}else c="".concat(parseFloat(e[a]),"%");t.left=c;break;case"top":var o;o=Number.isInteger(e[a])?"".concat(100*e[a]/640,"%"):"".concat(parseFloat(e[a]),"%"),t.top=o;break;case"w":t.width="".concat(e[a],"%");break;case"h":t.height="".concat(e[a],"%");break;case"scale":t.scale=r.layerScales[e[a]];break;case"theme":t.mode=e[a];break;case"rotation":t.transform="rotate(".concat(e[a],"deg)");break;case"z_index":t.zIndex=e[a];break;default:return!0}return!0}),t},o=n;exports.default=o;
|
|
280
|
+
},{"@babel/runtime/helpers/defineProperty":"IxO8","../../constants/common":"VKZr"}],"QFdH":[function(require,module,exports) {
|
|
281
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var n=require("../../../lib/util"),s=function(s,a){return'\n <div class="component-layer">\n <div\n aria-hidden="true"\n tabindex="-1"\n class="countdown"\n style="\n font-family: '.concat((0,n.getFontFamily)({instanceId:a}),";\n left: ").concat(s.left,";\n top: ").concat(s.top,";\n width: ").concat(s.width,";\n z-index: ").concat(s.zIndex,";\n ").concat(s.transform?"transform: ".concat(s.transform,";"):"",';\n "\n data-mode="').concat(s.mode,'"\n data-scale="').concat(s.scale,'"\n data-reminder=').concat(!!s.notificationEnd,'"\n >\n ').concat(s.has_title?'\n <div class="title">\n <span>'.concat(s.title,"</span>\n </div>"):"",'\n <div class="times">\n <div class="days">\n <div class="day-times">\n <div class="time"><span>0</span></div>\n <div class="time"><span>0</span></div>\n </div>\n <span class="time-name">days</span>\n </div>\n <span class="dot"><span>:</span></span>\n <div class="hours">\n <div class="hour-times">\n <div class="time"><span>0</span></div>\n <div class="time"><span>0</span></div>\n </div>\n <span class="time-name">hours</span>\n </div>\n <span class="dot"><span>:</span></span>\n <div class="minutes">\n <div class="minute-times">\n <div class="time"><span>0</span></div>\n <div class="time"><span>0</span></div>\n </div>\n <span class="time-name">minutes</span>\n </div>\n <span class="dot"><span>:</span></span>\n <div class="seconds">\n <div class="second-times">\n <div class="time"><span>0</span></div>\n <div class="time"><span>0</span></div>\n </div>\n <span class="time-name">seconds</span>\n </div>\n </div>\n </div>\n </div>\n')};exports.default=s;
|
|
282
|
+
},{"../../../lib/util":"PesM"}],"YoYr":[function(require,module,exports) {
|
|
283
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=h(require("@babel/runtime/helpers/defineProperty")),t=h(require("@babel/runtime/helpers/asyncToGenerator")),r=h(require("@babel/runtime/helpers/classCallCheck")),n=h(require("@babel/runtime/helpers/createClass")),a=h(require("@babel/runtime/helpers/inherits")),i=h(require("@babel/runtime/helpers/possibleConstructorReturn")),o=h(require("@babel/runtime/helpers/getPrototypeOf")),s=h(require("@babel/runtime/regenerator")),u=h(require("canvas-confetti")),l=require("../../constants/layerTypes"),c=require("../../lib/util"),d=h(require("../base")),f=h(require("./dataConvertor")),m=h(require("./template"));function h(e){return e&&e.__esModule?e:{default:e}}function y(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function _(t){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?y(Object(n),!0).forEach(function(r){(0,e.default)(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):y(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function p(e){var t=v();return function(){var r,n=(0,o.default)(e);if(t){var a=(0,o.default)(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return(0,i.default)(this,r)}}function v(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}var b=function(e){(0,a.default)(o,e);var i=p(o);function o(e){var t,n=e.layer,a=e.group,s=e.storyDom,u=e.story,c=e.instanceId;return(0,r.default)(this,o),(t=i.call(this,{type:l.LayerTemplateTypes.COUNTDOWN,storyDom:s,instanceId:c})).story_=u,t.group_=a,t.countdownData_=(0,f.default)(n),t.animationStatus_=!1,t.daysHidden_=!1,t.storyDom_=s,t.generateComponentAndAppendToPage((0,m.default)(t.countdownData_,c)).then(function(e){var r;t.dom_=e,t.daysDom_=null===(r=t.dom_.querySelector(".day-times"))||void 0===r?void 0:r.querySelectorAll(".time"),t.hoursDom_=t.dom_.querySelector(".hour-times").querySelectorAll(".time"),t.minutesDom_=t.dom_.querySelector(".minute-times").querySelectorAll(".time"),t.secondsDom_=t.dom_.querySelector(".second-times").querySelectorAll(".time"),t.init_()}),t.attachCallbacksToElement_(),t}return(0,n.default)(o,[{key:"attachCallbacksToElement_",value:function(){this.storyObserverCallback_=this.storyObserverCallback_.bind(this)}},{key:"init_",value:function(){this.globalInstanceData.storylyEmbed.init&&(0,c.stopEventBubbling)(this.dom_),this.countdownData_.has_seconds||(this.dom_.querySelector(".seconds").setAttribute("hidden","true"),this.dom_.lastElementChild.setAttribute("data-seconds","false")),this.storyObserver_(this.storyObserverCallback_)}},{key:"createAnimationCanvas_",value:function(){this.animationCanvas_=document.createElement("canvas"),this.animationCanvas_.classList.add("confetti-animation"),this.storyDom_.appendChild(this.animationCanvas_)}},{key:"handleAnimation_",value:function(){var e=(0,t.default)(s.default.mark(function e(){var t,r,n=this;return s.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:this.animationStatus_=!0,this.animationCanvas_.confetti=this.animationCanvas_.confetti||u.default.create(this.animationCanvas_,{resize:!0}),200,t={origin:{y:.4}},(r=function(e,r){n.animationCanvas_.confetti(_(_(_({},t),r),{},{particleCount:Math.floor(200*e),origin:{y:n.countdownData_.sdkTop/100+.15}}))})(.2,{spread:26,startVelocity:55}),r(.2,{spread:60}),r(.2,{spread:100,decay:.91,scalar:.8}),r(.2,{spread:120,startVelocity:25,decay:.92,scalar:1.2}),r(.2,{spread:120,startVelocity:45});case 10:case"end":return e.stop()}},e,this)}));return function(){return e.apply(this,arguments)}}()},{key:"storyObserverCallback_",value:function(e){var t=this;e.forEach(function(e){if("attributes"===e.type)if("show"===e.attributeName&&e.target.hasAttribute("show"))t.handleTimer_(),t.createAnimationCanvas_();else if(!e.target.hasAttribute("show")){var r;if(clearInterval(t.countdownTime_),t.animationCanvas_)t.animationCanvas_.remove(),null===(r=t.animationCanvas_.confetti)||void 0===r||r.reset();t.animationStatus_=!1}})}},{key:"renderTime_",value:function(){var e=this,t=0,r=0,n=0,a=0,i=new Date(1e3*this.countdownData_.end)-new Date;i>0&&(a=(n=(r=(t=i/864e5)%1*24)%1*60)%1*60,t=Math.floor(t),r=Math.floor(r),a=Math.floor(a),n=Math.floor(n),n+=n<59&&a>0?1:0),0!==t||this.daysHidden_||(this.dom_.querySelector(".days").setAttribute("hidden","true"),this.dom_.querySelector(".seconds").removeAttribute("hidden","false"),this.dom_.lastElementChild.setAttribute("data-days","false"),this.dom_.lastElementChild.removeAttribute("data-seconds"),this.daysHidden_=!0);var o=0===t&&0===r&&0===n;o&&(this.animationStatus_||setTimeout(function(){e.handleAnimation_()},150),clearInterval(this.countdownTime_));var s=[(0,c.splitTime)(t),(0,c.splitTime)(r),(0,c.splitTime)(n),(0,c.splitTime)(a)];return t=s[0],r=s[1],n=s[2],a=s[3],this.daysDom_.forEach(function(e,r){e.querySelector("span").innerHTML=t[r]}),this.hoursDom_.forEach(function(e,t){e.querySelector("span").innerHTML=r[t]}),this.minutesDom_.forEach(function(e,t){e.querySelector("span").innerHTML=n[t]}),this.secondsDom_.forEach(function(e,t){e.querySelector("span").innerHTML=a[t]}),Promise.resolve(o)}},{key:"handleTimer_",value:function(){var e=this;this.renderTime_().then(function(t){t||(e.countdownTime_=setInterval(function(){e.renderTime_()},1e3))})}}]),o}(d.default),C=b;exports.default=C;
|
|
284
|
+
},{"@babel/runtime/helpers/defineProperty":"IxO8","@babel/runtime/helpers/asyncToGenerator":"agGE","@babel/runtime/helpers/classCallCheck":"fcMS","@babel/runtime/helpers/createClass":"P8NW","@babel/runtime/helpers/inherits":"d4H2","@babel/runtime/helpers/possibleConstructorReturn":"pxk2","@babel/runtime/helpers/getPrototypeOf":"UJE0","@babel/runtime/regenerator":"PMvg","canvas-confetti":"YvuL","../../constants/layerTypes":"aJRz","../../lib/util":"PesM","../base":"skR7","./dataConvertor":"Adv1","./template":"QFdH"}],"Ms5h":[function(require,module,exports) {
|
|
285
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e="ios",t="windows",o="linux",s={IOS:e,WINDOWS:t,LINUX:o};exports.default=s;
|
|
286
|
+
},{}],"L7Hj":[function(require,module,exports) {
|
|
287
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=t(require("@babel/runtime/helpers/defineProperty")),r=require("../../lib/util");function t(e){return e&&e.__esModule?e:{default:e}}function c(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(e);r&&(c=c.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),t.push.apply(t,c)}return t}function a(r){for(var t=1;t<arguments.length;t++){var a=null!=arguments[t]?arguments[t]:{};t%2?c(Object(a),!0).forEach(function(t){(0,e.default)(r,t,a[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(a)):c(Object(a)).forEach(function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(a,e))})}return r}var o=function(e){var t=a({},e);return Object.keys(e).forEach(function(c){switch(c){case"x":t.sdkLeft=e[c];break;case"w":t.width="".concat(e[c],"%");break;case"y":t.sdkTop=e[c];break;case"h":t.height="".concat(e[c],"%");break;case"left":t.left="".concat(parseFloat(e[c]),"%");break;case"top":t.top="".concat(parseFloat(e[c]),"%");break;case"scale":var a=e[c]+1;t.compScale=a;break;case"theme":t.mode=e[c];break;case"rotation":t.transform="rotate(".concat(e[c],"deg)");break;case"z_index":t.zIndex=e[c];break;case"primary_color":t.color=e[c].includes("rgba")?e[c]:(0,r.convertHex)(e[c]);break;case"secondary_color":t.background=e[c].includes("rgba")?e[c]:(0,r.convertHex)(e[c])}return!0}),t},n=o;exports.default=n;
|
|
288
|
+
},{"@babel/runtime/helpers/defineProperty":"IxO8","../../lib/util":"PesM"}],"hHV8":[function(require,module,exports) {
|
|
289
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var n=require("../../../lib/util"),t=function(t,o,c){return'\n <div class="component-layer" dir="'.concat(o.direction,'">\n <div\n aria-hidden="true"\n tabindex="-1"\n class="question-component"\n role="component"\n data-group=""\n data-story=""\n style="\n font-family: ').concat((0,n.getFontFamily)({instanceId:c}),";\n left: ").concat(t.left,";\n top: ").concat(t.top,";\n width: ").concat(t.width,";\n z-index: ").concat(t.zIndex,";\n ").concat(t.transform?"transform: ".concat(t.transform,";"):"","\n background-color: ").concat(t.background,";\n border: 1px solid ").concat((0,n.convertHex)(t.primary_color,.1),";\n color: ").concat(t.color,';\n "\n data-scale="').concat(t.compScale,'"\n >\n <div\n style="\n border-right: 20px solid ').concat(t.background,';\n "\n class="question-component-tail">\n </div>\n <div>\n <div class="question-component-container">\n ').concat(t.has_title?'<div class="question-component-container-title">\n <h6>'.concat(t.title,"</h6>\n </div>"):"",'\n <div class="question-component-container-button">\n <p>').concat(t.placeholder,"</p>\n </div>\n </div>\n </div>\n </div>\n </div>\n")};exports.default=t;
|
|
290
|
+
},{"../../../lib/util":"PesM"}],"K7o6":[function(require,module,exports) {
|
|
291
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var n=require("../../../lib/icons"),t=require("../../../lib/util"),a=function(a,e,o){return'\n <div class="question-textbox-container" aria-hidden="true" tabindex="-1" dir="'.concat(e.direction,'">\n <div class="question-textbox-container-overlay"></div>\n <form\n aria-hidden="true"\n class="question-textbox-container-form"\n style="\n font-family: ').concat((0,t.getFontFamily)({instanceId:o}),";\n background-color: ").concat(a.background,";\n color: ").concat(a.color,';\n ">\n ').concat(a.has_title?'<label for="form-'.concat(a.uid,'">').concat(a.title,"</label>"):"",'\n <textarea\n autofocus\n id="form-').concat(a.uid,'"\n name="form-').concat(a.uid,'"\n maxlength="200"\n required\n data-gramm="false"\n data-gramm_editor="false"\n data-enable-grammarly="false"\n ></textarea>\n <button\n aria-hidden="true"\n tabindex="-1"\n type="submit"\n style="background-color: ').concat(a.color,';"\n >\n ').concat((0,n.sendIcon)(a.background),"\n </button>\n </form>\n </div>")};exports.default=a;
|
|
292
|
+
},{"../../../lib/icons":"irwm","../../../lib/util":"PesM"}],"KeqT":[function(require,module,exports) {
|
|
293
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var t=v(require("@babel/runtime/helpers/classCallCheck")),e=v(require("@babel/runtime/helpers/createClass")),i=v(require("@babel/runtime/helpers/inherits")),s=v(require("@babel/runtime/helpers/possibleConstructorReturn")),a=v(require("@babel/runtime/helpers/getPrototypeOf")),n=v(require("platform")),o=require("../../constants/layerTypes"),r=v(require("../../constants/os")),l=v(require("../base")),u=v(require("./dataConvertor")),h=require("../../lib/util"),_=v(require("./template/layer")),c=v(require("./template/textbox")),d=require("../../constants/events"),y=require("../../lib/icons");function v(t){return t&&t.__esModule?t:{default:t}}function f(t){var e=p();return function(){var i,n=(0,a.default)(t);if(e){var o=(0,a.default)(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return(0,s.default)(this,i)}}function p(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}var m=function(s){(0,i.default)(l,s);var a=f(l);function l(e){var i,s=e.layer,n=e.group,r=e.storyDom,h=e.story,c=e.storiesContainer,d=e.instanceId;return(0,t.default)(this,l),(i=a.call(this,{type:o.LayerTemplateTypes.QUESTION,storyDom:r,instanceId:d})).story_=h,i.storiesContainer_=c,i.group_=n,i.questionData_=(0,u.default)(s),i.attachCallbacksToElement_(),i.generateComponentAndAppendToPage((0,_.default)(i.questionData_,i.globalInstanceData,d)).then(function(t){i.dom_=t,i.init_()}),i}return(0,e.default)(l,[{key:"attachCallbacksToElement_",value:function(){this.onClickTapButton_=this.onClickTapButton_.bind(this),this.onClickOverlay_=this.onClickOverlay_.bind(this),this.onQuestionSent=this.onQuestionSent.bind(this),this.onTextAreaChange_=this.onTextAreaChange_.bind(this),this.storyObserverCallback_=this.storyObserverCallback_.bind(this),this.setInitialFormOffsetHeight_=this.setInitialFormOffsetHeight_.bind(this)}},{key:"init_",value:function(){var t,e,i=null===(t=n.default.os)||void 0===t?void 0:null===(e=t.family)||void 0===e?void 0:e.toLocaleLowerCase();this.isIos_=i===r.default.IOS,this.tapButton_=this.dom_.querySelector(".question-component-container-button"),this.textBoxContainer_=this.generateHtmlFromTemplate((0,c.default)(this.questionData_,this.globalInstanceData,this.instanceId)),this.dom_.parentElement.appendChild(this.textBoxContainer_),this.form_=this.textBoxContainer_.querySelector("form"),this.textarea_=this.textBoxContainer_.querySelector("textarea"),this.textarea_.oninput=this.onTextAreaChange_,this.isIos_&&(this.textarea_.placeholder=this.questionData_.placeholder),this.submitButton_=this.form_.querySelector("button"),this.submitButton_.onclick=this.onQuestionSent,this.overlay_=this.textBoxContainer_.querySelector(".question-textbox-container-overlay"),this.eventListeners_()}},{key:"eventListeners_",value:function(){var t=this;(0,h.isMobileView)()?(this.tapButton_.addEventListener("touchstart",this.onClickTapButton_),this.overlay_.addEventListener("touchstart",this.onClickOverlay_),(0,h.stopEventBubbling)(this.overlay_,"touchstart"),(0,h.stopEventBubbling)(this.overlay_,"touchend")):(this.dom_.addEventListener("click",this.onClickTapButton_),this.overlay_.addEventListener("click",this.onClickOverlay_),(0,h.stopEventBubbling)(this.overlay_,"click")),this.textarea_.addEventListener("keydown",function(e){e.stopPropagation(),"Escape"===e.key&&t.onClickOverlay_()}),this.storyObserver_(this.storyObserverCallback_)}},{key:"storyObserverCallback_",value:function(t){var e=this;t.forEach(function(t){"attributes"===t.type&&("show"===t.attributeName&&(t.target.hasAttribute("show")||e.onClickOverlay_()),"paused"===t.attributeName&&(e.isStoryPaused_=t.target.hasAttribute("paused")),"class"===t.attributeName&&(e.isStoryPaused_=!1))})}},{key:"setInitialFormOffsetHeight_",value:function(){this.textarea_.value||(this.initialFormOffsetHeight_||(this.initialFormOffsetHeight_=this.form_.offsetHeight),this.setStyle(this.form_,"max-height","".concat(this.initialFormOffsetHeight_-this.submitButton_.offsetHeight,"px")))}},{key:"setInitialStyle_",value:function(){this.setInitialFormOffsetHeight_(),this.textarea_.style.height="",this.submitButton_.classList.remove("active")}},{key:"onClickTapButton_",value:function(){var t=this;if((0,h.isMobileView)()&&!this.isIos_){var e=this.storiesContainer_.getBoundingClientRect().width;this.setStyle(this.storiesContainer_,"width","".concat(e,"px")),this.textBoxContainer_.classList.add("android")}requestAnimationFrame(this.setInitialFormOffsetHeight_),this.isIos_||setTimeout(function(){t.textarea_.focus()},200),this.textBoxContainer_.classList.add("active"),this.isStoryPaused_||(0,h.createAndDispatchEvent)(this.dom_,"onPlayPause")}},{key:"onClickOverlay_",value:function(){var t=this;this.textBoxContainer_.classList.remove("active"),this.textarea_.blur(),(0,h.isMobileView)()&&setTimeout(function(){t.storiesContainer_.style.removeProperty("width")},400),this.isStoryPaused_&&(this.isStoryPaused_=!1,(0,h.createAndDispatchEvent)(this.dom_,"onPlayPause"))}},{key:"onTextAreaChange_",value:function(){this.textarea_.value?(this.form_.style.maxHeight="45%",this.textarea_.style.height="",this.textarea_.style.height="".concat(this.textarea_.scrollHeight,"px"),this.submitButton_.classList.add("active")):this.setInitialStyle_()}},{key:"onQuestionSent",value:function(t){var e=this;t.preventDefault();var i=this.textBoxContainer_.querySelector("button"),s={event_type:d.LayerEventTypes.CommentSent,story_group_id:+this.group_.group_id,story_id:+this.story_.story_id,story_group_index:null,story_index:null,story_group_type:"default",story_interactive_type:o.LayerTemplateTypes.QUESTION,duration:null,watch_length:null,event_time:Date.now(),activity:this.textarea_.value,uid:this.questionData_.uid};i.innerHTML=(0,y.loadingIcon)(this.questionData_.background),this.api.sendEvent(s).then(function(){i.innerHTML=(0,y.checkIcon)(e.questionData_.background),setTimeout(function(){e.textarea_.value="",e.onClickOverlay_(),e.setInitialStyle_(),i.innerHTML=(0,y.sendIcon)(e.questionData_.background)},1e3)});var a={group:this.group_,story_id:this.story_.story_id,alt_text:this.story_.alt_text,is_sharable:this.story_.is_sharable,track_id:this.questionData_.custom_payload,title:this.questionData_.title,question:this.textarea_.value};(0,h.createAndDispatchEvent)(this.storyDom_,"onCustomerEvent",{eventName:d.CustomerEventTypes.onStoryQuestionAnswered,params:a})}}]),l}(l.default),b=m;exports.default=b;
|
|
294
|
+
},{"@babel/runtime/helpers/classCallCheck":"fcMS","@babel/runtime/helpers/createClass":"P8NW","@babel/runtime/helpers/inherits":"d4H2","@babel/runtime/helpers/possibleConstructorReturn":"pxk2","@babel/runtime/helpers/getPrototypeOf":"UJE0","platform":"kohK","../../constants/layerTypes":"aJRz","../../constants/os":"Ms5h","../base":"skR7","./dataConvertor":"L7Hj","../../lib/util":"PesM","./template/layer":"hHV8","./template/textbox":"K7o6","../../constants/events":"d0lR","../../lib/icons":"irwm"}],"qy6d":[function(require,module,exports) {
|
|
295
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=t(require("@babel/runtime/helpers/defineProperty"));function t(e){return e&&e.__esModule?e:{default:e}}function r(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(e);t&&(c=c.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,c)}return r}function c(t){for(var c=1;c<arguments.length;c++){var a=null!=arguments[c]?arguments[c]:{};c%2?r(Object(a),!0).forEach(function(r){(0,e.default)(t,r,a[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(a)):r(Object(a)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(a,e))})}return t}var a=function(e){return Object.keys(e).reduce(function(t,r){var a=c({},t);switch(r){case"x":a.sdkLeft=e[r];break;case"w":a.width="".concat(e[r],"%");break;case"y":a.sdkTop=e[r];break;case"h":a.height="".concat(e[r],"%");break;case"left":var n;if(Number.isInteger(e[r])){var o=100*e[r]/360;n="".concat(o<0?0:o,"%")}else n="".concat(parseFloat(e[r]),"%");a.left=n;break;case"top":var s;s=Number.isInteger(e[r])?"".concat(100*e[r]/640,"%"):"".concat(parseFloat(e[r]),"%"),a.top=s;break;case"rotation":a.transform="rotate(".concat(e[r],"deg)");break;case"z_index":a.zIndex=e[r]}return a},c({},e))},n=a;exports.default=n;
|
|
296
|
+
},{"@babel/runtime/helpers/defineProperty":"IxO8"}],"QPFf":[function(require,module,exports) {
|
|
297
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var n=function(n){var t,e,o="".concat(n.mediaHost).concat(null!==(t=n.image_path)&&void 0!==t?t:n.video_path);("image_url"in n||"video_url"in n)&&(o=null!==(e=n.image_url)&&void 0!==e?e:n.video_url);return'\n <div class="component-layer">\n <div\n aria-hidden="true"\n class="media-component"\n style="\n width: '.concat(n.width,";\n height: ").concat(n.height,";\n left: ").concat(n.left,";\n top: ").concat(n.top,";\n ").concat(n.transform?"transform: ".concat(n.transform,";"):"","\n z-index: ").concat(n.zIndex,';\n "\n >\n ').concat("video"===n.type?'<video width="320" height="240" autoplay disablepictureinpicture muted controls>\n <source src="'.concat(o,'" type="video/mp4" />\n </video>'):'<img src="'.concat(o,'" style="border-radius: ').concat(n.border_radius,'px;" alt="Component Image" />'),"\n </div>\n </div>\n ")};exports.default=n;
|
|
298
|
+
},{}],"VEUS":[function(require,module,exports) {
|
|
299
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=f(require("@babel/runtime/helpers/defineProperty")),t=f(require("@babel/runtime/helpers/classCallCheck")),r=f(require("@babel/runtime/helpers/createClass")),n=f(require("@babel/runtime/helpers/inherits")),a=f(require("@babel/runtime/helpers/possibleConstructorReturn")),i=f(require("@babel/runtime/helpers/getPrototypeOf")),u=require("../../constants/layerTypes"),o=require("../../lib/util"),s=f(require("../base")),l=f(require("./dataConvertor")),c=f(require("./template"));function f(e){return e&&e.__esModule?e:{default:e}}function p(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function d(t){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?p(Object(n),!0).forEach(function(r){(0,e.default)(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):p(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function b(e){var t=y();return function(){var r,n=(0,i.default)(e);if(t){var u=(0,i.default)(this).constructor;r=Reflect.construct(n,arguments,u)}else r=n.apply(this,arguments);return(0,a.default)(this,r)}}function y(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}var h=function(e){(0,n.default)(i,e);var a=b(i);function i(e){var r,n=e.layer,o=e.mediaHost,s=e.storyDom,c=e.instanceId;return(0,t.default)(this,i),(r=a.call(this,{type:u.LayerTemplateTypes.MEDIA,storyDom:s,instanceId:c})).mediaData_=d(d({},(0,l.default)(n)),{},{mediaHost:o}),r.init_(),r}return(0,r.default)(i,[{key:"init_",value:function(){var e=(0,o.calcBorderRadius)(this.mediaData_,this.storyDom_);this.mediaData_.border_radius=this.mediaData_.border_radius?e:0,this.generateComponentAndAppendToPage((0,c.default)(this.mediaData_))}}]),i}(s.default),m=h;exports.default=m;
|
|
300
|
+
},{"@babel/runtime/helpers/defineProperty":"IxO8","@babel/runtime/helpers/classCallCheck":"fcMS","@babel/runtime/helpers/createClass":"P8NW","@babel/runtime/helpers/inherits":"d4H2","@babel/runtime/helpers/possibleConstructorReturn":"pxk2","@babel/runtime/helpers/getPrototypeOf":"UJE0","../../constants/layerTypes":"aJRz","../../lib/util":"PesM","../base":"skR7","./dataConvertor":"qy6d","./template":"QPFf"}],"I4RP":[function(require,module,exports) {
|
|
301
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=t(require("@babel/runtime/helpers/defineProperty"));function t(e){return e&&e.__esModule?e:{default:e}}function r(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function n(t){for(var n=1;n<arguments.length;n++){var o=null!=arguments[n]?arguments[n]:{};n%2?r(Object(o),!0).forEach(function(r){(0,e.default)(t,r,o[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):r(Object(o)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))})}return t}var o=function(e){var t=n(n({},e),{},{scale:+(e.w/28.7).toFixed(2)||1});return Object.keys(e).forEach(function(r){switch(r){case"x":if(t.left)break;t.left="".concat(e[r],"%");break;case"y":if(t.top)break;t.top="".concat(e[r],"%");break;default:return!0}return!0}),t},c=o;exports.default=c;
|
|
302
|
+
},{"@babel/runtime/helpers/defineProperty":"IxO8"}],"pEwR":[function(require,module,exports) {
|
|
303
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var t=require("../../../lib/util"),c=require("../../../lib/icons"),n=function(n,a){return'\n <div class="component-layer">\n <div\n class="product-card-interactive"\n role="component"\n data-scale="'.concat(n.scale,'"\n data-radius="').concat(!!n.border_radius,'"\n style="\n font-family: ').concat((0,t.getFontFamily)({instanceId:a}),";\n left: ").concat(n.left,";\n z-index: ").concat(n.z_index,";\n --product-card-rotation: ").concat(n.rotation,";\n --product-card-top: ").concat(n.top,';\n "\n tabindex="-1"\n aria-hidden="true"\n >\n <img class="product-card-interactive-image" alt="product image" src="').concat(n.image_url,'" />\n ').concat(n.title?'<div class="product-card-interactive-title"><h6>'.concat(n.title,"</h6></div>"):"",'\n <div class="product-card-interactive-price">\n ').concat(n.old_price?'<span class="product-card-interactive-price-old">'.concat(n.old_price,"</span>"):"",'\n <div class="product-card-interactive-price-current">\n <span>').concat(n.price,'</span>\n <button type="button" class="product-card-interactive-price-current-button">\n ').concat((0,c.arrowRight)("#000000"),"\n </button>\n </div>\n </div>\n </div>\n </div>\n")};exports.default=n;
|
|
304
|
+
},{"../../../lib/util":"PesM","../../../lib/icons":"irwm"}],"ldNI":[function(require,module,exports) {
|
|
305
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var t=d(require("@babel/runtime/helpers/classCallCheck")),e=d(require("@babel/runtime/helpers/createClass")),r=d(require("@babel/runtime/helpers/inherits")),a=d(require("@babel/runtime/helpers/possibleConstructorReturn")),i=d(require("@babel/runtime/helpers/getPrototypeOf")),n=require("../../constants/layerTypes"),o=d(require("../base")),s=d(require("./dataConvertor")),u=require("../../lib/util"),l=d(require("./template")),c=require("../../constants/events");function d(t){return t&&t.__esModule?t:{default:t}}function _(t){var e=p();return function(){var r,n=(0,i.default)(t);if(e){var o=(0,i.default)(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return(0,a.default)(this,r)}}function p(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}var h=function(a){(0,r.default)(o,a);var i=_(o);function o(e){var r,a=e.layer,u=e.group,c=e.storyDom,d=e.story,_=e.instanceId;return(0,t.default)(this,o),(r=i.call(this,{type:n.LayerTemplateTypes.PRODUCT_CARD,storyDom:c,instanceId:_})).story_=d,r.group_=u,r.productCardData_=(0,s.default)(a),r.attachCallbacksToElement_(),r.generateComponentAndAppendToPage((0,l.default)(r.productCardData_,_)).then(function(t){r.dom_=t,r.init_()}),r}return(0,e.default)(o,[{key:"attachCallbacksToElement_",value:function(){this.storyObserverCallback_=this.storyObserverCallback_.bind(this),this.onRedirect_=this.onRedirect_.bind(this)}},{key:"init_",value:function(){this.storyObserver_(this.storyObserverCallback_),(0,u.setClickEventListener)(this.dom_,this.onRedirect_),(0,u.stopEventBubbling)(this.dom_,"touchstart"),(0,u.stopEventBubbling)(this.dom_,"touchend")}},{key:"storyObserverCallback_",value:function(t){var e=this;t.forEach(function(t){var r=t.type,a=t.target,i=t.attributeName;"attributes"===r&&"show"===i&&(a.hasAttribute("show")?e.dom_.classList.add("product-card-interactive-animating"):e.dom_.classList.remove("product-card-interactive-animating"))})}},{key:"onRedirect_",value:function(){var t={event_type:c.LayerEventTypes.ProductCardClicked,story_group_id:+this.group_.group_id,story_id:+this.story_.story_id,story_group_index:null,story_index:null,story_group_type:"default",story_interactive_type:n.LayerTemplateTypes.PRODUCT_CARD,story_interactive_x:this.productCardData_.x,story_interactive_y:this.productCardData_.y,duration:null,watch_length:null,event_time:Date.now(),uid:this.productCardData_.uid};this.api.sendEvent(t),this.handleRedirectURL_()}},{key:"handleRedirectURL_",value:function(){var t=this.productCardData_.outlink;t&&(0,u.openLink)(t)}}]),o}(o.default),y=h;exports.default=y;
|
|
306
|
+
},{"@babel/runtime/helpers/classCallCheck":"fcMS","@babel/runtime/helpers/createClass":"P8NW","@babel/runtime/helpers/inherits":"d4H2","@babel/runtime/helpers/possibleConstructorReturn":"pxk2","@babel/runtime/helpers/getPrototypeOf":"UJE0","../../constants/layerTypes":"aJRz","../base":"skR7","./dataConvertor":"I4RP","../../lib/util":"PesM","./template":"pEwR","../../constants/events":"d0lR"}],"zYZy":[function(require,module,exports) {
|
|
307
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var n=c(require("@babel/runtime/helpers/toConsumableArray")),t=c(require("../../../constants/layouts")),a=require("../../../lib/util");function c(n){return n&&n.__esModule?n:{default:n}}var e=function(t,c){var e=t[c].variant.map(function(n){return n.v}),r=t.flatMap(function(n){return n.variant}),i=t.map(function(n){return n.variant.map(function(n){return n.v})}),o=(0,n.default)(new Set(r.map(function(n){return n.n}))).map(function(t){return{title:t,values:(0,n.default)(new Set(r.filter(function(n){return n.n===t}).map(function(n){return n.v}))).map(function(t){return{value:t,selected:e.includes(t),isColor:(0,a.isHexColor)(t),disabled:function(a){var c=(0,n.default)(e);return c[a]=t,c.length=a+1,!i.find(function(n){return n.toString().startsWith(c.toString())})}}})}});return o.map(function(n,t){var a=n.title,c=n.values;return'\n <div class="product-detail-variant">\n <h6 class="product-detail-title-small">'.concat(a.toLocaleUpperCase(),'</h6>\n <div class="product-detail-variant-row">\n ').concat(c.map(function(n){var c=n.isColor,e=n.selected,r=n.value,i=n.disabled;return'\n <div\n class="'.concat(function(n,t,a){return t(a)&&0!==a?"disabled":n?"selected":""}(e,i,t),'"\n data-variant="').concat(a,'"\n data-value="').concat(r,'"\n data-order="').concat(t,'">\n ').concat(c?'<span style="background-color: '.concat(r,'"></span>'):"<span>".concat(r,"</span>"),"\n </div>")}).join(""),"\n </div>\n </div>")}).join("")},r=function(n){return'\n <div class="product-detail-price">\n '.concat(!n.sales_price&&n.price?'<span class="product-card-current-price">'.concat((0,a.currencyFormatter)(n.price,n.price_currency),"</span>"):"","\n ").concat(n.sales_price&&n.price?'\n <span class="product-card-current-price">'.concat((0,a.currencyFormatter)(n.sales_price,n.price_currency),'</span>\n <span class="product-card-old-price">').concat((0,a.currencyFormatter)(n.price,n.price_currency),"</span>\n "):"","\n </div>\n")},i=function(n){return'\n <div class="product-detail-description">\n <h6 class="product-detail-title-small">DESCRIPTION</h6>\n <p>'.concat(n.description||"","</p>\n </div>\n")},o=function(n,a){return"\n ".concat(n.length>1||!a.layout===t.default.MODERN?'<div class="product-detail-media-small">\n '.concat(n.map(function(n,t){return'<div class="product-detail-media-small-container '.concat(0===t?"selected":"",'">\n <img src="').concat(n,'" />\n </div>')}).join(""),"\n </div>"):"",'\n <div class="product-detail-media-large">\n <img src="').concat(n[0],'" />\n </div>\n')},l=function(n,c,l,u){return'\n <div\n class="product-detail '.concat(l.layout===t.default.MODERN?"modal":"bottom-sheet",'"\n style="font-family: ').concat((0,a.getFontFamily)({instanceId:u}),';"\n >\n <div class="product-detail-media">\n ').concat(o(n[c].image_urls,l),'\n </div>\n <div class="product-detail-variants">\n <h4 class="product-detail-title-md">').concat(n[c].title,"</h4>\n ").concat(r(n[c]),"\n ").concat(e(n,c),"\n ").concat(i(n[c]),"\n </div>\n </div>")};exports.default=l;
|
|
308
|
+
},{"@babel/runtime/helpers/toConsumableArray":"Fhqp","../../../constants/layouts":"kUgL","../../../lib/util":"PesM"}],"BYjw":[function(require,module,exports) {
|
|
309
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var t=e(require("../../../constants/layouts")),n=require("../../../lib/util");function e(t){return t&&t.__esModule?t:{default:t}}var o=function(e,o,r){return'\n <div\n class="product-detail-footer '.concat(o.layout===t.default.MODERN?"modal":"bottom-sheet",'"\n style="font-family: ').concat((0,n.getFontFamily)({instanceId:r}),';"\n >\n <div class="product-detail-footer-price">\n ').concat(!e.sales_price&&e.price?'<span class="product-card-current-price">'.concat((0,n.currencyFormatter)(e.price,e.price_currency),"</span>"):"","\n ").concat(e.sales_price&&e.price?'\n <span class="product-card-current-price">'.concat((0,n.currencyFormatter)(e.sales_price,e.price_currency),'</span>\n <span class="product-card-old-price">').concat((0,n.currencyFormatter)(e.price,e.price_currency),"</span>\n "):"",'\n </div>\n <div class="product-detail-footer-action">\n <div class="counter">\n <button class="counter-button" data-type="minus">\n <svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path d="M3.3335 8H12.6668" stroke="#242450" stroke-width="1.48201" stroke-linecap="round" stroke-linejoin="round"/>\n </svg>\n </button>\n <span class="counter-count">1</span>\n <button class="counter-button" data-type="plus">\n <svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path fill-rule="evenodd" clip-rule="evenodd" d="M8.74106 3.33329C8.74106 2.92405 8.4093 2.59229 8.00005 2.59229C7.5908 2.59229 7.25904 2.92405 7.25904 3.33329V7.25904H3.33366C2.92441 7.25904 2.59265 7.5908 2.59265 8.00005C2.59265 8.40929 2.92441 8.74105 3.33366 8.74105H7.25904V12.6666C7.25904 13.0759 7.5908 13.4076 8.00005 13.4076C8.4093 13.4076 8.74106 13.0759 8.74106 12.6666V8.74105H12.667C13.0762 8.74105 13.408 8.40929 13.408 8.00005C13.408 7.5908 13.0762 7.25904 12.667 7.25904H8.74106V3.33329Z" fill="#242450"/>\n </svg>\n </button>\n </div>\n <button class="product-detail-footer-action-button">\n <div class="product-detail-footer-action-button-icon"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path d="M3.99988 1.33325L1.99988 3.99992V13.3333C1.99988 13.6869 2.14035 14.026 2.3904 14.2761C2.64045 14.5261 2.97959 14.6666 3.33321 14.6666H12.6665C13.0202 14.6666 13.3593 14.5261 13.6094 14.2761C13.8594 14.026 13.9999 13.6869 13.9999 13.3333V3.99992L11.9999 1.33325H3.99988Z" stroke="white" stroke-width="1.39705" stroke-linecap="round" stroke-linejoin="round"/>\n <path d="M1.99988 4H13.9999" stroke="white" stroke-width="1.39705" stroke-linecap="round" stroke-linejoin="round"/>\n <path d="M10.6665 6.6665C10.6665 7.37375 10.3855 8.05203 9.88541 8.55212C9.38532 9.05222 8.70704 9.33317 7.9998 9.33317C7.29255 9.33317 6.61428 9.05222 6.11418 8.55212C5.61408 8.05203 5.33313 7.37375 5.33313 6.6665" stroke="white" stroke-width="1.39705" stroke-linecap="round" stroke-linejoin="round"/>\n </svg></div>\n <span>').concat(e.p_b_text,"</span>\n </button>\n </div>\n </div>\n")};exports.default=o;
|
|
310
|
+
},{"../../../constants/layouts":"kUgL","../../../lib/util":"PesM"}],"vFtU":[function(require,module,exports) {
|
|
311
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var t=require("../../../lib/util"),n=function(n,o){return'\n <div class="product-checkout-footer" style="font-family: '.concat((0,t.getFontFamily)({instanceId:o}),';">\n <p>\n <svg width="48" height="48" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path d="M40 14L18 36L8 26" stroke="#212121" stroke-width="4" stroke-linecap="round" stroke-linejoin="round"/>\n </svg>\n <span>').concat(n.s_message,'</span>\n </p>\n <div class="product-checkout-footer-buttons">\n <button type="button" class="continue-button"><span>').concat(n.s_b_back_text,'</span></button>\n <button type="button" class="checkout-button">\n <svg width="17" height="17" viewBox="0 0 17 17" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path d="M4.49902 1.88086L2.49902 4.54753V13.8809C2.49902 14.2345 2.6395 14.5736 2.88955 14.8237C3.1396 15.0737 3.47873 15.2142 3.83236 15.2142H13.1657C13.5193 15.2142 13.8585 15.0737 14.1085 14.8237C14.3585 14.5736 14.499 14.2345 14.499 13.8809V4.54753L12.499 1.88086H4.49902Z" stroke="white" stroke-width="1.39705" stroke-linecap="round" stroke-linejoin="round"/>\n <path d="M2.49902 4.54785H14.499" stroke="white" stroke-width="1.39705" stroke-linecap="round" stroke-linejoin="round"/>\n <path d="M11.1663 7.21387C11.1663 7.92111 10.8854 8.59939 10.3853 9.09949C9.8852 9.59958 9.20692 9.88053 8.49967 9.88053C7.79243 9.88053 7.11415 9.59958 6.61406 9.09949C6.11396 8.59939 5.83301 7.92111 5.83301 7.21387" stroke="white" stroke-width="1.39705" stroke-linecap="round" stroke-linejoin="round"/>\n </svg>\n <span>').concat(n.s_b_cart_text,"</span>\n </button>\n </div>\n </div>\n")};exports.default=n;
|
|
312
|
+
},{"../../../lib/util":"PesM"}],"lyP4":[function(require,module,exports) {
|
|
313
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"ProductDetailTemplate",{enumerable:!0,get:function(){return e.default}}),Object.defineProperty(exports,"ProductDetailFooterTemplate",{enumerable:!0,get:function(){return t.default}}),Object.defineProperty(exports,"ProductCheckoutFooterTemplate",{enumerable:!0,get:function(){return r.default}});var e=o(require("./productDetail")),t=o(require("./productDetailFooter")),r=o(require("./productCheckoutFooter"));function o(e){return e&&e.__esModule?e:{default:e}}
|
|
314
|
+
},{"./productDetail":"zYZy","./productDetailFooter":"BYjw","./productCheckoutFooter":"vFtU"}],"VSr3":[function(require,module,exports) {
|
|
315
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=function(e){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e;return'<div\n style="\n width: '.concat(e/64,"em;\n height: ").concat(i/64,'em;\n "\n class="storyly-android-spinner storyly-spinner-container"><div></div><div></div><div></div><div></div>\n </div>')};exports.default=e;
|
|
316
|
+
},{}],"hb2d":[function(require,module,exports) {
|
|
317
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=o(require("platform")),t=o(require("../../constants/os")),r=o(require("./template/android"));function o(e){return e&&e.__esModule?e:{default:e}}var u=function(o){var u,a;null===(u=e.default.os)||void 0===u||null===(a=u.family)||void 0===a||a.toLocaleLowerCase(),t.default.IOS;return(0,r.default)(o)};exports.default=u;
|
|
318
|
+
},{"platform":"kohK","../../constants/os":"Ms5h","./template/android":"VSr3"}],"tk2H":[function(require,module,exports) {
|
|
319
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var C=require("../../lib/icons"),t=function(t){var e=t.text;return'\n <div class="storyly__alert-box">\n <div class="storyly__alert-box-icon">\n <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path d="M11.9964 17.3535C12.3263 17.3535 12.5987 17.2496 12.8136 17.0419C13.0285 16.8342 13.1359 16.5654 13.1359 16.2354C13.1359 15.9054 13.0297 15.6306 12.8173 15.4111C12.6048 15.1915 12.3336 15.0817 12.0037 15.0817C11.6737 15.0817 11.4013 15.1914 11.1864 15.4106C10.9716 15.6299 10.8641 15.9045 10.8641 16.2345C10.8641 16.5645 10.9703 16.8335 11.1828 17.0415C11.3952 17.2495 11.6664 17.3535 11.9964 17.3535ZM12.0794 13.1893C12.3591 13.1893 12.5933 13.0939 12.7821 12.9031C12.9708 12.7122 13.0652 12.4776 13.0652 12.1991V7.61434C13.0652 7.3359 12.9694 7.10125 12.7777 6.91039C12.586 6.71954 12.3503 6.62411 12.0706 6.62411C11.7909 6.62411 11.5567 6.71954 11.3679 6.91039C11.1792 7.10125 11.0848 7.3359 11.0848 7.61434V12.1991C11.0848 12.4776 11.1806 12.7122 11.3723 12.9031C11.564 13.0939 11.7997 13.1893 12.0794 13.1893ZM12.0086 22.3535C10.5719 22.3535 9.226 22.0835 7.97095 21.5436C6.71592 21.0037 5.61808 20.2634 4.67743 19.3228C3.7368 18.3821 2.99652 17.2843 2.4566 16.0293C1.91669 14.7744 1.64673 13.4278 1.64673 11.9897C1.64673 10.5515 1.91669 9.20432 2.4566 7.94804C2.99652 6.69175 3.73606 5.59721 4.67523 4.66441C5.61438 3.73161 6.7118 2.99315 7.96748 2.44901C9.22315 1.90488 10.5704 1.63281 12.0094 1.63281C13.4483 1.63281 14.7965 1.90451 16.0539 2.44791C17.3113 2.99131 18.406 3.72879 19.3381 4.66034C20.2702 5.59189 21.0081 6.68732 21.5518 7.94664C22.0955 9.20595 22.3674 10.5549 22.3674 11.9936C22.3674 13.4316 22.0953 14.778 21.5512 16.0329C21.0071 17.2878 20.2686 18.3835 19.3358 19.3199C18.403 20.2563 17.3078 20.996 16.0502 21.539C14.7925 22.082 13.4453 22.3535 12.0086 22.3535ZM12.0125 20.373C14.3332 20.373 16.3067 19.5586 17.9332 17.9297C19.5596 16.3009 20.3728 14.3202 20.3728 11.9877C20.3728 9.66706 19.5612 7.69351 17.9378 6.06706C16.3145 4.44061 14.3329 3.62739 11.9929 3.62739C9.67591 3.62739 7.70236 4.43905 6.07228 6.06239C4.44221 7.6857 3.62718 9.66734 3.62718 12.0073C3.62718 14.3243 4.44161 16.2979 6.07048 17.9279C7.69935 19.558 9.68002 20.373 12.0125 20.373Z" fill="#212121"/>\n </svg>\n </div>\n <div class="storyly__alert-box-message">\n <p>'.concat(e,'</p>\n </div>\n <div class="storyly__alert-box-close">\n ').concat((0,C.xIcon)("#616161"),"\n </div>\n </div>\n")};exports.default=t;
|
|
320
|
+
},{"../../lib/icons":"irwm"}],"GdVG":[function(require,module,exports) {
|
|
321
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var t=_(require("@babel/runtime/helpers/defineProperty")),e=_(require("@babel/runtime/helpers/classCallCheck")),r=_(require("@babel/runtime/helpers/createClass")),o=_(require("@babel/runtime/helpers/inherits")),n=_(require("@babel/runtime/helpers/possibleConstructorReturn")),i=_(require("@babel/runtime/helpers/getPrototypeOf")),s=require("./template"),a=require("../../constants/events"),c=require("../../lib/util"),u=_(require("../../layers/base")),l=_(require("../../constants/layouts")),d=_(require("../LoadingSpinner")),h=_(require("../Alert"));function _(t){return t&&t.__esModule?t:{default:t}}function p(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,o)}return r}function y(e){for(var r=1;r<arguments.length;r++){var o=null!=arguments[r]?arguments[r]:{};r%2?p(Object(o),!0).forEach(function(r){(0,t.default)(e,r,o[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):p(Object(o)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))})}return e}function v(t){var e=f();return function(){var r,o=(0,i.default)(t);if(e){var s=(0,i.default)(this).constructor;r=Reflect.construct(o,arguments,s)}else r=o.apply(this,arguments);return(0,n.default)(this,r)}}function f(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}var m=function(t){(0,o.default)(i,t);var n=v(i);function i(t){var r,o=t.instanceId,a=t.layer,c=t.storyDom,u=t.group,l=t.story;return(0,e.default)(this,i),(r=n.call(this,{instanceId:o,storyDom:c})).group_=u,r.story_=l,r.selectedProduct_={},r.productCatalogData_=a,r.loading_=!1,r.productCheckoutFooter_=r.generateHtmlFromTemplate((0,s.ProductCheckoutFooterTemplate)(r.productCatalogData_,o)),r.attachCallbacksToElement_(),r}return(0,r.default)(i,[{key:"attachCallbacksToElement_",value:function(){this.eventListeners_=this.eventListeners_.bind(this),this.onPurchase=this.onPurchase.bind(this),this.onCounter_=this.onCounter_.bind(this),this.onMediaSelect_=this.onMediaSelect_.bind(this),this.onVariantSelect_=this.onVariantSelect_.bind(this),this.onAddToCart_=this.onAddToCart_.bind(this),this.renderCheckoutBottomSheetFooter_=this.renderCheckoutBottomSheetFooter_.bind(this),this.onCheckoutToCart_=this.onCheckoutToCart_.bind(this),this.onSuccess_=this.onSuccess_.bind(this),this.onError_=this.onError_.bind(this)}},{key:"eventListeners_",value:function(){var t=this;this.counterButton_.forEach(function(e){return(0,c.setClickEventListener)(e,t.onCounter_)});var e=this.productCheckoutFooter_.querySelector(".continue-button"),r=this.productCheckoutFooter_.querySelector(".checkout-button");((0,c.setClickEventListener)(this.addToCartButton_,this.onAddToCart_),(0,c.setClickEventListener)(r,this.onCheckoutToCart_),(0,c.setClickEventListener)(e,function(){(0,c.createAndDispatchEvent)(t.storyDom_,(0,c.openProductDetail)(t.instanceId))}),(0,c.isMobileView)())?(this.productDetailBody_.querySelectorAll(".product-detail-variant-row").forEach(function(e){e.addEventListener("touchstart",function(r){r.stopPropagation(),r.stopImmediatePropagation(),e.childNodes.forEach(function(e){e.addEventListener("touchend",t.onVariantSelect_)})}),e.addEventListener("scroll",function(){e.childNodes.forEach(function(e){e.removeEventListener("touchend",t.onVariantSelect_)})})}),this.productDetailBody_.parentElement.addEventListener("scroll",function(){t.variants_.forEach(function(e){e.removeEventListener("touchend",t.onVariantSelect_)})})):(this.medias_.forEach(function(e){return(0,c.setClickEventListener)(e,t.onMediaSelect_)}),this.variants_.forEach(function(e){e.addEventListener("click",t.onVariantSelect_)}))}},{key:"renderCheckoutModalFooter_",value:function(){this.productCheckoutFooter_.classList.add("modal");var t=this.productDetailFooter_.parentNode,e=this.productDetailBody_.parentNode,r=t.parentElement;r.insertBefore(this.productCheckoutFooter_,t),this.setStyle(this.productDetailBody_,"opacity","0.3"),this.setStyle(r,"maxHeight","calc(100vh * 0.65 + 50px)"),this.setStyle(e,"boxShadow","rgb(134 134 134 / 20%) 0px 7px 10.5px"),this.setStyle(e,"borderBottomLeftRadius","8px"),this.setStyle(e,"borderBottomRightRadius","8px"),this.setStyle(e,"pointerEvents","none");var o=new KeyframeEffect(t,[{opacity:1},{opacity:0,pointerEvents:"none"}],{duration:300,iterations:1,fill:"forwards"});new Animation(o).play()}},{key:"renderCheckoutBottomSheetFooter_",value:function(){var t=this.generateHtmlFromTemplate('<div style="display: none;"></div>');this.productCheckoutFooter_.classList.add("bottom-sheet"),(0,c.createAndDispatchEvent)(this.storyDom_,(0,c.openProductDetail)(this.instanceId),{body:this.productCheckoutFooter_,footer:t,rerender:!0})}},{key:"onPurchase",value:function(t,e){var r=this;this.loading_=!1;var o=this.productCatalogData_.products,n=o.find(function(e){return e.product_id===t}),i=o.filter(function(t){return t.product_group_id===n.product_group_id}),u=i.findIndex(function(e){return e.product_id===t});this.selectedProduct_=n,this.selectedProducGroup_=i,this.productDetailBody_=this.generateHtmlFromTemplate((0,s.ProductDetailTemplate)(i,u,this.globalInstanceData,this.instanceId)),this.medias_=this.productDetailBody_.querySelectorAll(".product-detail-media-small-container"),this.variants_=this.productDetailBody_.querySelectorAll(".product-detail-variant-row div"),this.productDetailFooter_=this.generateHtmlFromTemplate((0,s.ProductDetailFooterTemplate)(y(y({},n),{},{p_b_text:this.productCatalogData_.p_b_text}),this.globalInstanceData,this.instanceId)),this.counterButton_=this.productDetailFooter_.querySelectorAll(".counter .counter-button"),this.addToCartButton_=this.productDetailFooter_.querySelector(".product-detail-footer-action-button"),(0,c.createAndDispatchEvent)(this.storyDom_,(0,c.openProductDetail)(this.instanceId),{body:this.productDetailBody_,footer:this.productDetailFooter_,rerender:e}),this.handleEvent_(a.LayerEventTypes.StoryProductSelected,n),this.alert_=this.generateHtmlFromTemplate((0,h.default)({text:""}));var l=this.alert_.querySelector(".storyly__alert-box-close");(0,c.setClickEventListener)(l,function(){return r.alert_.classList.remove("active")}),this.productDetailBody_.prepend(this.alert_),this.eventListeners_()}},{key:"onCounter_",value:function(t){if(!this.loading_){var e=t.target.dataset,r=this.productDetailFooter_.querySelector(".counter-count"),o=Number(r.innerHTML);"plus"===e.type?(o+=1,r.innerHTML=o):o>1&&"minus"===e.type&&(o-=1,r.innerHTML=o)}}},{key:"onAddToCart_",value:function(){var t=this;if(!this.loading_){var e=this.productDetailFooter_.querySelector(".counter-count").innerHTML,r={group:this.group_,story_id:this.story_.story_id,alt_text:this.story_.alt_text,is_sharable:this.story_.is_sharable,product:y(y({},this.selectedProduct_),{},{quantity:Number(e)}),onError:this.onError_,onSuccess:this.onSuccess_};this.timeout_=setTimeout(function(){t.onError_({message:"Something went wrong!"})},5e3),this.loading_=!0;var o=this.generateHtmlFromTemplate((0,d.default)(16));this.addToCartButtonSvg_=this.addToCartButton_.querySelector(".product-detail-footer-action-button-icon"),this.addToCartButtonSvg_.replaceWith(o),(0,c.createAndDispatchEvent)(this.storyDom_,"onCustomerEvent",{eventName:a.CustomerEventTypes.onStoryProductAdded,params:r}),this.handleEvent_(a.LayerEventTypes.StoryProductAdded,{product:this.selectedProduct_,quantity:Number(e)})}}},{key:"onSuccess_",value:function(t){var e=this;setTimeout(function(){return clearTimeout(e.timeout_)},0),this.alert_.classList.remove("active"),this.instanceClass.setProductCartItems(t),this.globalInstanceData.layout===l.default.MODERN?this.renderCheckoutModalFooter_():this.renderCheckoutBottomSheetFooter_()}},{key:"onError_",value:function(t){var e=this,r=t.message;setTimeout(function(){return clearTimeout(e.timeout_)},0),this.alert_.querySelector("p").innerHTML=r,this.alert_.classList.add("active"),this.loading_=!1,this.addToCartButton_.querySelector(".storyly-spinner-container").replaceWith(this.addToCartButtonSvg_)}},{key:"onMediaSelect_",value:function(t){var e=t.target,r=e.src,o=this.productDetailBody_.querySelector(".product-detail-media-large img");Array.from(this.medias_).find(function(t){return t.classList.contains("selected")}).classList.remove("selected"),o.src!==r&&(o.src=r),e.parentElement.classList.add("selected")}},{key:"onVariantSelect_",value:function(t){var e=t.target,r=e.dataset,o=r.value,n=r.order;if(!e.classList.contains("selected")){var i="0"===n?null:this.selectedProduct_.variant[0].v,s=this.selectedProducGroup_.find(function(t){var e=t.variant.map(function(t){return t.v}),r=[i,o],s="0"===n;s&&r.shift();var a=r.filter(function(t){return t&&e.includes(t)});return s?a.length>0:a.length>1});this.onPurchase(s.product_id,!0)}}},{key:"onCheckoutToCart_",value:function(){var t=this.instanceClass.storylyCheckoutProducts,e={group:this.group_,story_id:this.story_.story_id,alt_text:this.story_.alt_text,is_sharable:this.story_.is_sharable,products:t.products};(0,c.createAndDispatchEvent)(this.storyDom_,"onCustomerEvent",{eventName:a.CustomerEventTypes.onStoryCartClicked,params:e}),this.handleEvent_(a.LayerEventTypes.StoryCartButtonClicked)}},{key:"handleEvent_",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=y({event_type:t,story_group_id:+this.group_.group_id,story_id:+this.story_.story_id,story_group_index:null,story_index:null,story_group_type:"default",story_interactive_x:null,story_interactive_y:null,duration:null,watch_length:null,event_time:Date.now()},e);this.api.sendEvent(r)}}]),i}(u.default),b=m;exports.default=b;
|
|
322
|
+
},{"@babel/runtime/helpers/defineProperty":"IxO8","@babel/runtime/helpers/classCallCheck":"fcMS","@babel/runtime/helpers/createClass":"P8NW","@babel/runtime/helpers/inherits":"d4H2","@babel/runtime/helpers/possibleConstructorReturn":"pxk2","@babel/runtime/helpers/getPrototypeOf":"UJE0","./template":"lyP4","../../constants/events":"d0lR","../../lib/util":"PesM","../../layers/base":"skR7","../../constants/layouts":"kUgL","../LoadingSpinner":"hb2d","../Alert":"tk2H"}],"Pi05":[function(require,module,exports) {
|
|
323
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var c=require("../../../lib/util"),r=function(r){var t;return'\n <div\n class="product-card"\n data-product-id="'.concat(r.product_id,'"\n tabindex="-1"\n aria-hidden="true"\n >\n ').concat(null!==(t=r.image_urls)&&void 0!==t&&t.length?'<img class="product-card-media" src="'.concat(r.image_urls[0],'" alt="product" />'):"",'\n <div class="product-card-right-container">\n ').concat(r.is_title_visible?'<p class="product-card-right-container-description">'.concat(r.title,"</p>"):"",'\n <div class="product-card-right-container-bottom-section">\n <div class="product-card-price-container">').concat(r.is_price_visible&&!r.sales_price?'<span class="product-card-current-price">'.concat((0,c.currencyFormatter)(r.price,r.price_currency),"</span>"):"").concat(r.is_s_price_visible?'<span class="product-card-current-price">'.concat((0,c.currencyFormatter)(r.sales_price,r.price_currency),'</span><span class="product-card-old-price">').concat((0,c.currencyFormatter)(r.price,r.price_currency),"</span>"):"","</div>\n ").concat(r.c_b_text?'<button\n class="product-card-purchase-button">\n <span>'.concat(r.c_b_text,"</span>\n </button>"):"","\n </div>\n </div>\n </div>\n")};exports.default=r;
|
|
324
|
+
},{"../../../lib/util":"PesM"}],"WudP":[function(require,module,exports) {
|
|
325
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var n=require("../../../lib/util"),t=function(t,e){return'\n <div class="component-layer product-list-layer">\n <div class="product-list-container">\n <div\n class="product-list"\n role="component"\n data-group=""\n data-story=""\n style="font-family: '.concat((0,n.getFontFamily)({instanceId:e}),';"\n tabindex="-1"\n aria-hidden="true"\n dir="').concat(t.direction,'"\n ></div>\n <div class="product-list-arrow left-arrow" hidden>\n <svg class="no-pointer-events" width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path class="no-pointer-events" d="M13.333 8L2.66634 8" stroke="white" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>\n <path class="no-pointer-events" d="M6.66699 12L2.66699 8L6.66699 4" stroke="white" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>\n </svg>\n </div>\n <div class="product-list-arrow right-arrow" hidden>\n <svg class="no-pointer-events" width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path class="no-pointer-events" d="M2.66699 8H13.3337" stroke="white" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>\n <path class="no-pointer-events" d="M9.33301 4L13.333 8L9.33301 12" stroke="white" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>\n </svg>\n </div>\n </div>\n </div>\n')};exports.default=t;
|
|
326
|
+
},{"../../../lib/util":"PesM"}],"kvuH":[function(require,module,exports) {
|
|
327
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"ProductCardTemplate",{enumerable:!0,get:function(){return e.default}}),Object.defineProperty(exports,"ProductCatalogTemplate",{enumerable:!0,get:function(){return t.default}});var e=r(require("./productCard")),t=r(require("./productCatalog"));function r(e){return e&&e.__esModule?e:{default:e}}
|
|
328
|
+
},{"./productCard":"Pi05","./productCatalog":"WudP"}],"rFjg":[function(require,module,exports) {
|
|
329
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var t=y(require("@babel/runtime/helpers/slicedToArray")),e=y(require("@babel/runtime/helpers/defineProperty")),r=y(require("@babel/runtime/helpers/asyncToGenerator")),o=y(require("@babel/runtime/helpers/classCallCheck")),n=y(require("@babel/runtime/helpers/createClass")),a=y(require("@babel/runtime/helpers/inherits")),i=y(require("@babel/runtime/helpers/possibleConstructorReturn")),s=y(require("@babel/runtime/helpers/getPrototypeOf")),u=y(require("@babel/runtime/regenerator")),c=y(require("../base")),d=y(require("../../components/StoryProduct")),l=require("./template"),p=require("../../constants/layerTypes"),h=require("../../lib/util"),_=y(require("../../constants/layouts")),f=require("../../constants/events");function y(t){return t&&t.__esModule?t:{default:t}}function C(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,o)}return r}function v(t){for(var r=1;r<arguments.length;r++){var o=null!=arguments[r]?arguments[r]:{};r%2?C(Object(o),!0).forEach(function(r){(0,e.default)(t,r,o[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):C(Object(o)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))})}return t}function b(t){var e=g();return function(){var r,o=(0,s.default)(t);if(e){var n=(0,s.default)(this).constructor;r=Reflect.construct(o,arguments,n)}else r=o.apply(this,arguments);return(0,i.default)(this,r)}}function g(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}var m=function(e){(0,a.default)(s,e);var i=b(s);function s(t){var e,r=t.layer,n=t.group,a=t.storyDom,u=t.story,c=t.instanceId;return(0,o.default)(this,s),(e=i.call(this,{type:p.LayerTemplateTypes.PRODUCT_CATALOG,storyDom:a,instanceId:c})).story_=u,e.group_=n,e.dom_=null,e.productCatalogData_=r,e.rendered_=!1,e.storyPaused_=!1,e.attachCallbacksToElement_(),e.generateComponentAndAppendToPage((0,l.ProductCatalogTemplate)(e.globalInstanceData,c)).then(function(t){e.dom_=t,e.init_(),e.storyObserver_(e.storyObserverCallback_)}),e}return(0,n.default)(s,[{key:"attachCallbacksToElement_",value:function(){this.storyObserverCallback_=this.storyObserverCallback_.bind(this),this.onClickArrow_=this.onClickArrow_.bind(this),this.renderProducts_=this.renderProducts_.bind(this),this.handleScrollArrows_=this.handleScrollArrows_.bind(this)}},{key:"init_",value:function(){var t=(0,r.default)(u.default.mark(function t(){var e,r,o=this;return u.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:this.productCardsContainer_=this.dom_.querySelector(".product-list"),(0,h.stopEventBubbling)(this.productCardsContainer_,"touchmove",!1),e=this.instanceClass.storylyHydration,r=e.filter(function(t){return o.productCatalogData_.products.find(function(e){return e.product_group_id===t.product_group_id})}),this.productCatalogData_=v(v({},this.productCatalogData_),{},{products:r,selected_product_ids:this.productCatalogData_.products.map(function(t){return t.product_id})}),this.storyProduct_=new d.default({instanceId:this.instanceId,layer:this.productCatalogData_,storyDom:this.storyDom_,group:this.group_,story:this.story_}),this.handleScrollArrows_();case 7:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}()},{key:"storyObserverCallback_",value:function(t){var e=this;t.forEach(function(t){var r=t.type,o=t.attributeName,n=t.target;if("attributes"===r&&"show"===o){if(n.hasAttribute("show")){var a=e.renderProducts_();setTimeout(function(){return a.classList.add("active")},0),a.ontransitionend=function(){e.rendered_=!0}}n.hasAttribute("show")||(e.productCardsContainer_.classList.remove("active"),e.productCardsContainer_.scrollTo(0,0))}"attributes"===r&&"paused"===o&&(e.storyPaused_=n.hasAttribute("paused"))})}},{key:"handleScrollArrows_",value:function(){var e=this;if(this.productCatalogData_.selected_product_ids.length>1){var r=this.dom_.querySelectorAll(".product-list-arrow"),o=(0,t.default)(r,2),n=o[0],a=o[1];this.globalInstanceData.layout===_.default.MODERN&&r.forEach(function(t,r){1===r&&a.removeAttribute("hidden"),t.addEventListener("click",e.onClickArrow_)}),this.productCardsContainer_.addEventListener("scroll",function(t){var r=t.currentTarget,o=r.scrollLeft,i=r.clientWidth,s=r.scrollWidth;e.storyPaused_||(0,h.createAndDispatchEvent)(e.dom_,"onPlayPause"),e.globalInstanceData.layout!==_.default.CLASSIC&&(o+i>=s-1?a.setAttribute("hidden","true"):(o>0&&(n.removeAttribute("hidden"),a.removeAttribute("hidden")),0===o&&n.setAttribute("hidden","true")))})}}},{key:"onClickArrow_",value:function(t){var e=t.target;this.storyPaused_||(0,h.createAndDispatchEvent)(this.dom_,"onPlayPause");var r=this.productCardsContainer_.firstElementChild.offsetWidth;e.classList.contains("right-arrow")?this.productCardsContainer_.scrollTo({left:this.productCardsContainer_.scrollLeft+r}):this.productCardsContainer_.scrollTo({left:this.productCardsContainer_.scrollLeft-r})}},{key:"renderProducts_",value:function(){var t=this;if(this.rendered_){var e=this.productCatalogData_.products,r=this.instanceClass.storylyHydration.filter(function(t){return e.filter(function(e){return e.product_group_id===t.product_group_id}).length});if((0,h.isArraysEqual)(r,e))return this.productCardsContainer_;this.productCatalogData_=v(v({},this.productCatalogData_),{},{products:r}),this.productCardsContainer_.innerHTML=""}var o=function(e){var r=e.target.closest(".product-card");t.handleEvent_(f.LayerEventTypes.StoryProductCatalogClicked),t.storyProduct_.onPurchase(r.dataset.productId,!1)};return this.productCatalogData_.selected_product_ids.forEach(function(e){var r=t.productCatalogData_.products.find(function(t){return t.product_id===e});if(r){var o=t.generateHtmlFromTemplate((0,l.ProductCardTemplate)(v(v({},t.productCatalogData_),r)));t.productCardsContainer_.appendChild(o)}}),(0,h.isMobileView)()?(this.productCardsContainer_.addEventListener("touchstart",function(e){e.stopPropagation(),e.stopImmediatePropagation(),t.productCardsContainer_.childNodes.forEach(function(t){t.addEventListener("touchend",o)})}),this.productCardsContainer_.addEventListener("scroll",function(){t.productCardsContainer_.childNodes.forEach(function(t){t.removeEventListener("touchend",o)})}),(0,h.stopEventBubbling)(this.productCardsContainer_,"touchend",!1)):this.productCardsContainer_.childNodes.forEach(function(t){t.addEventListener("click",o)}),this.productCardsContainer_}},{key:"handleEvent_",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=v({event_type:t,story_group_id:+this.group_.group_id,story_id:+this.story_.story_id,story_group_index:null,story_index:null,story_group_type:"default",story_interactive_x:null,story_interactive_y:null,duration:null,watch_length:null,event_time:Date.now()},e);this.api.sendEvent(r)}}]),s}(c.default),P=m;exports.default=P;
|
|
330
|
+
},{"@babel/runtime/helpers/slicedToArray":"HETk","@babel/runtime/helpers/defineProperty":"IxO8","@babel/runtime/helpers/asyncToGenerator":"agGE","@babel/runtime/helpers/classCallCheck":"fcMS","@babel/runtime/helpers/createClass":"P8NW","@babel/runtime/helpers/inherits":"d4H2","@babel/runtime/helpers/possibleConstructorReturn":"pxk2","@babel/runtime/helpers/getPrototypeOf":"UJE0","@babel/runtime/regenerator":"PMvg","../base":"skR7","../../components/StoryProduct":"GdVG","./template":"kvuH","../../constants/layerTypes":"aJRz","../../lib/util":"PesM","../../constants/layouts":"kUgL","../../constants/events":"d0lR"}],"gzP3":[function(require,module,exports) {
|
|
331
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=t(require("@babel/runtime/helpers/defineProperty")),r=require("../../lib/util");function t(e){return e&&e.__esModule?e:{default:e}}function a(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);r&&(a=a.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),t.push.apply(t,a)}return t}function c(r){for(var t=1;t<arguments.length;t++){var c=null!=arguments[t]?arguments[t]:{};t%2?a(Object(c),!0).forEach(function(t){(0,e.default)(r,t,c[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(c)):a(Object(c)).forEach(function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(c,e))})}return r}var o=function(e){var t=c({},e);return Object.keys(e).forEach(function(a){switch(a){case"x":t.sdkLeft=e[a];break;case"y":t.sdkTop=e[a];break;case"left":var c;if(Number.isInteger(e[a])){var o=100*e[a]/360;c="".concat(o<0?0:o,"%")}else c="".concat(parseFloat(e[a]),"%");t.left=c;break;case"top":var n;n=Number.isInteger(e[a])?"".concat(100*e[a]/640,"%"):"".concat(parseFloat(e[a]),"%"),t.top=n;break;case"title":t.title=e[a];break;case"price":t.price=e[a];break;case"old_price":t.old_price=e[a];break;case"primary_color":t.color=e[a].includes("rgba")?e[a]:(0,r.convertHex)(e[a]),t.borderColor=e[a].includes("rgba")?e[a]:(0,r.convertHex)(e[a],.3);break;case"secondary_color":t.background=e[a].includes("rgba")?e[a]:(0,r.convertHex)(e[a]);break;case"icon_type":t.icon_type=e[a];break;case"outlink":t.outlink=e[a];break;case"has_title":t.has_title=e[a];break;case"tooltip_placement":t.tooltip_placement=e[a];break;case"theme":t.mode=e[a];break;case"type":t.type=e[a];break;case"uid":t.uid=e[a];break;case"z_index":t.zIndex=e[a];break;default:return!0}return!0}),t},n=o;exports.default=n;
|
|
332
|
+
},{"@babel/runtime/helpers/defineProperty":"IxO8","../../lib/util":"PesM"}],"m7GC":[function(require,module,exports) {
|
|
333
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var n=require("../../../lib/util"),o=function(o,c){var l,t,a,r,i,e,d,s;return'\n <div class="component-layer">\n <div\n class="product-tag-dot"\n role="component"\n data-group=""\n data-story=""\n style="\n font-family: '.concat((0,n.getFontFamily)({instanceId:c}),";\n left: ").concat(o.left,";\n top: ").concat(o.top,";\n background-color: ").concat(null!==(l=o.background)&&void 0!==l?l:"#FFFFFF",";\n border-color: ").concat(null!==(t=o.color)&&void 0!==t?t:"#000000",';\n ">\n <button\n class="product-tag-tooltip"\n style="\n color: ').concat(null!==(a=o.color)&&void 0!==a?a:"#000000",";\n background-color: ").concat(null!==(r=o.background)&&void 0!==r?r:"#FFFFFF",";\n border-color: ").concat(null!==(i=o.borderColor)&&void 0!==i?i:"rgba(0,0,0,0.3)",';\n ">\n <div class="title-container ').concat(null!=o&&o.price||null!=o&&o.old_price?"":"no-price",'">\n <span class="tag-title">').concat(o.title,'</span>\n <span>\n <svg width="8" height="12" viewBox="0 0 8 12" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path d="M1.29006 0.710022C0.900059 1.10002 0.900059 1.73002 1.29006 2.12002L5.17006 6.00002L1.29006 9.88002C0.900059 10.27 0.900059 10.9 1.29006 11.29C1.68006 11.68 2.31006 11.68 2.70006 11.29L7.29006 6.70002C7.68006 6.31002 7.68006 5.68002 7.29006 5.29002L2.70006 0.700022C2.32006 0.320022 1.68006 0.320022 1.29006 0.710022Z" fill="').concat(null!==(e=o.color)&&void 0!==e?e:"#000000",'"/>\n </svg>\n </span>\n </div>\n ').concat(((null==o?void 0:o.price)||(null==o?void 0:o.old_price))&&'<div class="price-container" aria-hidden="true">\n '.concat((null==o?void 0:o.price)&&'<span style="background-color: '.concat(null!==(d=o.color)&&void 0!==d?d:"#000000","; color: ").concat(null!==(s=o.background)&&void 0!==s?s:"#FFFFFF",';" class="price"\n >').concat(null==o?void 0:o.price,"</span>"),"\n ").concat((null==o?void 0:o.old_price)&&'<span class="old-price">'.concat(null==o?void 0:o.old_price,"</span>"),"\n </div>"),"\n </button>\n </div>\n </div>\n")};exports.default=o;
|
|
334
|
+
},{"../../../lib/util":"PesM"}],"cjPL":[function(require,module,exports) {
|
|
335
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var t=p(require("@babel/runtime/helpers/classCallCheck")),e=p(require("@babel/runtime/helpers/createClass")),i=p(require("@babel/runtime/helpers/inherits")),o=p(require("@babel/runtime/helpers/possibleConstructorReturn")),s=p(require("@babel/runtime/helpers/getPrototypeOf")),n=require("../../constants/layerTypes"),a=p(require("../base")),r=p(require("./dataConvertor")),c=require("../../lib/util"),l=require("../../lib/style"),d=p(require("./template")),u=require("../../constants/events"),h=require("../../lib/icons");function p(t){return t&&t.__esModule?t:{default:t}}function _(t){var e=g();return function(){var i,n=(0,s.default)(t);if(e){var a=(0,s.default)(this).constructor;i=Reflect.construct(n,arguments,a)}else i=n.apply(this,arguments);return(0,o.default)(this,i)}}function g(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}var v=function(o){(0,i.default)(a,o);var s=_(a);function a(e){var i,o=e.layer,c=e.group,l=e.storyDom,u=e.story,p=e.instanceId;return(0,t.default)(this,a),(i=s.call(this,{type:n.LayerTemplateTypes.PRODUCT_TAG,storyDom:l,instanceId:p})).story_=u,i.group_=c,i.productTagData_=(0,r.default)(o),i.tooltip_=null,i.isPlacementSet_=!1,i.placement={"top-left":0,"top-middle":1,"top-right":2,"down-right":3,"down-middle":4,"down-left":5},i.shoppingBagIcon_=(0,h.shoppingBagIcon)(i.productTagData_.color),i.shoppingCartIcon_='<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path d="M12.5 12H4.78092C4.66383 12 4.55045 11.9589 4.46055 11.8839C4.37065 11.8088 4.30993 11.7046 4.28899 11.5894L2.6201 2.41056C2.59915 2.29535 2.53844 2.19115 2.44854 2.11612C2.35864 2.0411 2.24526 2 2.12817 2H1" stroke="'.concat(i.productTagData_.color,'" stroke-linecap="round" stroke-linejoin="round"/>\n <path d="M5 14.5C5.69036 14.5 6.25 13.9404 6.25 13.25C6.25 12.5596 5.69036 12 5 12C4.30964 12 3.75 12.5596 3.75 13.25C3.75 13.9404 4.30964 14.5 5 14.5Z" stroke="').concat(i.productTagData_.color,'" stroke-linecap="round" stroke-linejoin="round"/>\n <path d="M12.5 14.5C13.1904 14.5 13.75 13.9404 13.75 13.25C13.75 12.5596 13.1904 12 12.5 12C11.8096 12 11.25 12.5596 11.25 13.25C11.25 13.9404 11.8096 14.5 12.5 14.5Z" stroke="').concat(i.productTagData_.color,'" stroke-linecap="round" stroke-linejoin="round"/>\n <path d="M3 4.5H13.9009C13.9741 4.5 14.0465 4.51609 14.1128 4.54713C14.1791 4.57817 14.2378 4.6234 14.2848 4.67963C14.3317 4.73585 14.3657 4.8017 14.3844 4.87252C14.403 4.94333 14.4059 5.01739 14.3928 5.08944L13.5746 9.58944C13.5537 9.70465 13.493 9.80885 13.4031 9.88388C13.3132 9.9589 13.1998 10 13.0827 10H4" stroke="').concat(i.productTagData_.color,'" stroke-linecap="round" stroke-linejoin="round"/>\n </svg>'),i.productTagIcon_='<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path fill-rule="evenodd" clip-rule="evenodd" d="M14.7268 9.93992L9.94683 14.7199C9.69674 14.9703 9.35738 15.111 9.0035 15.111C8.64962 15.111 8.31025 14.9703 8.06016 14.7199L2.3335 8.99992V2.33325H9.00016L14.7268 8.05992C15.2438 8.57997 15.2438 9.41987 14.7268 9.93992Z" stroke="'.concat(i.productTagData_.color,'" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>\n <circle cx="6" cy="6" r="1" fill="none"/>\n </svg>'),i.percentIcon_='<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path d="M12.5 3.5L3.5 12.5" stroke="'.concat(i.productTagData_.color,'" stroke-width="1.3" stroke-linecap="round" stroke-linejoin="round"/>\n <path d="M4.75 6.5C5.7165 6.5 6.5 5.7165 6.5 4.75C6.5 3.7835 5.7165 3 4.75 3C3.7835 3 3 3.7835 3 4.75C3 5.7165 3.7835 6.5 4.75 6.5Z" stroke="').concat(i.productTagData_.color,'" stroke-width="1.3" stroke-miterlimit="10"/>\n <path d="M11.25 13C12.2165 13 13 12.2165 13 11.25C13 10.2835 12.2165 9.5 11.25 9.5C10.2835 9.5 9.5 10.2835 9.5 11.25C9.5 12.2165 10.2835 13 11.25 13Z" stroke="').concat(i.productTagData_.color,'" stroke-width="1.3" stroke-miterlimit="10"/>\n </svg>'),i.dotIcon_='<svg width="8" height="8" viewBox="0 0 8 8" fill="none" xmlns="http://www.w3.org/2000/svg">\n <rect width="8" height="8" rx="4" fill="'.concat(i.productTagData_.color,'"/>\n </svg>'),i.attachCallbacksToElement_(),i.generateComponentAndAppendToPage((0,d.default)(i.productTagData_,p)).then(function(t){i.dom_=t,i.init_()}),i}return(0,e.default)(a,[{key:"attachCallbacksToElement_",value:function(){this.dispatchClickEvent_=this.dispatchClickEvent_.bind(this),this.showTooltip_=this.showTooltip_.bind(this),this.clearTimeouts_=this.clearTimeouts_.bind(this),this.handleRedirectURL_=this.handleRedirectURL_.bind(this),this.storyObserverCallback_=this.storyObserverCallback_.bind(this),this.eventListeners_=this.eventListeners_.bind(this)}},{key:"init_",value:function(){this.handleProductTagIcon_(),this.tooltip_=this.selector(this.dom_,".product-tag-tooltip"),this.eventListeners_(),(0,c.stopEventBubbling)(this.dom_,"touchstart"),(0,c.stopEventBubbling)(this.dom_,"touchend")}},{key:"eventListeners_",value:function(){(0,c.setClickEventListener)(this.dom_,this.dispatchClickEvent_),this.storyDom_.addEventListener("onProductTagClearTimeouts",this.clearTimeouts_),this.storyDom_.addEventListener("onProductTagClick",this.showTooltip_),(0,c.setClickEventListener)(this.tooltip_,this.handleRedirectURL_),this.storyObserver_(this.storyObserverCallback_)}},{key:"storyObserverCallback_",value:function(t){var e=this;t.forEach(function(t){"attributes"===t.type&&("show"===t.attributeName&&(t.target.hasAttribute("show")&&(e.isStoryActive_=!0,e.handleAnimation_()),t.target.hasAttribute("show")||(e.isStoryActive_=!1,(0,l.removeClass)(e.dom_,"active"),e.clearTimeouts_())),"paused"!==t.attributeName||e.globalInstanceData.accessibility||(t.target.hasAttribute("paused")&&(e.storyPaused_=!0),t.target.hasAttribute("paused")||(e.storyPaused_=!1,(0,l.removeClass)(e.dom_,"active"))))})}},{key:"dispatchClickEvent_",value:function(t){var e=this;if(t.target===this.dom_){var i=this.dom_.classList.contains("active");if((!this.storyPaused_||this.storyPaused_&&i)&&(0,c.createAndDispatchEvent)(this.dom_,"onPlayPause"),i||(0,c.createAndDispatchEvent)(this.storyDom_,"onProductTagClick"),(0,c.createAndDispatchEvent)(this.storyDom_,"onProductTagClearTimeouts"),!i){var o={event_type:u.LayerEventTypes.ProductTagClicked,story_group_id:+this.group_.group_id,story_id:+this.story_.story_id,story_group_index:null,story_index:null,story_group_type:"default",story_interactive_type:"product_tag",story_interactive_x:this.productTagData_.x,story_interactive_y:this.productTagData_.y,duration:null,watch_length:null,event_time:Date.now(),uid:this.productTagData_.uid};if(this.api.sendEvent(o),this.globalInstanceData.events.productTagExpanded){var s=this.productTagData_,n=s.outlink,a=s.title,r=s.uid,l=this.group_.stories.findIndex(function(t){return t.story_id===e.story_.story_id}),d={id:this.story_.story_id,productTagId:r,title:a,seen:!0,index:l,media:{actionUrl:n}};this.globalInstanceData.events.productTagExpanded(d)}}}}},{key:"showTooltip_",value:function(){this.isStoryActive_&&this.dom_.classList.toggle("active")}},{key:"clearTimeouts_",value:function(){this.timeout_&&clearTimeout(this.timeout_)}},{key:"handleTooltipPlacement_",value:function(){var t=this;if(!this.isPlacementSet_){var e=this.productTagData_.tooltip_placement,i=Object.keys(this.placement).find(function(i){return t.placement[i]===e}),o=this.storyDom_.offsetWidth,s="".concat(.55*o,"px");if(this.setStyle(this.tooltip_,"max-width",s),e===this.placement["top-middle"]||e===this.placement["down-middle"]){var n=this.tooltip_.offsetWidth;this.setStyle(this.tooltip_,"margin-left","-".concat(n/2,"px"))}this.tooltip_.classList.add(null!=i?i:"top-middle"),this.isPlacementSet_=!0}}},{key:"handleAnimation_",value:function(){var t=this;new Promise(function(e){t.handleTooltipPlacement_(),t.timeout_=setTimeout(function(){t.showTooltip_(),e()},500)}).then(function(){t.globalInstanceData.accessibility||(t.timeout_=setTimeout(function(){t.showTooltip_()},2e3))})}},{key:"handleProductTagIcon_",value:function(){var t={shopping_bag:this.shoppingBagIcon_,price_tag:this.productTagIcon_,shopping_cart:this.shoppingCartIcon_,percent:this.percentIcon_,dot:this.dotIcon_},e=window.btoa(t[this.productTagData_.icon_type]);this.setStyle(this.dom_,"background-image","url(data:image/svg+xml;base64,".concat(e,")")),"dot"===this.productTagData_.icon_type&&this.setStyle(this.dom_,"background-size","auto")}},{key:"handleRedirectURL_",value:function(){var t=this,e=this.productTagData_,i=e.outlink,o=e.title,s=e.uid;if(this.globalInstanceData.events.productTagClicked){var n=this.group_.stories.findIndex(function(e){return e.story_id===t.story_.story_id}),a={id:this.story_.story_id,productTagId:s,title:o,seen:!0,index:n,media:{actionUrl:i}};this.globalInstanceData.events.productTagClicked(a)}else i&&(0,c.openLink)(i)}}]),a}(a.default),y=v;exports.default=y;
|
|
336
|
+
},{"@babel/runtime/helpers/classCallCheck":"fcMS","@babel/runtime/helpers/createClass":"P8NW","@babel/runtime/helpers/inherits":"d4H2","@babel/runtime/helpers/possibleConstructorReturn":"pxk2","@babel/runtime/helpers/getPrototypeOf":"UJE0","../../constants/layerTypes":"aJRz","../base":"skR7","./dataConvertor":"gzP3","../../lib/util":"PesM","../../lib/style":"vgU2","./template":"m7GC","../../constants/events":"d0lR","../../lib/icons":"irwm"}],"tSb3":[function(require,module,exports) {
|
|
337
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=function(e){var a={};return Object.keys(e).forEach(function(t){switch(t){case"rotation":a.transform="rotate(".concat(e[t],"deg)");break;case"x":a.sdkLeft=e[t];break;case"w":a.width="".concat(e[t],"%");break;case"y":a.sdkTop=e[t];break;case"left":var r;if(Number.isInteger(e[t])){var c=100*e[t]/360;r="".concat(c<0?0:c,"%")}else r="".concat(parseFloat(e[t]),"%");a.left=r;break;case"top":var o;o=Number.isInteger(e[t])?"".concat(100*e[t]/640,"%"):"".concat(parseFloat(e[t]),"%"),a.top=o;break;case"h":a.height="".concat(e[t],"%");break;case"z_index":a.zIndex=e[t];break;case"placeholder":a.placeholder=e[t];break;case"code":a.code=decodeURIComponent(e[t]);break;case"type":a.type=e[t];break;default:return!0}return!0}),a},a=e;exports.default=a;
|
|
338
|
+
},{}],"VIQz":[function(require,module,exports) {
|
|
339
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var n=function(n){var e=n.code;return new RegExp(/^<iframe.*?><\/iframe>$/g).test(e)&&!e.includes("srcdoc")||(e='<iframe width="100%" height="100%" src=\'\' title="Embed Code"></iframe>'),'\n <div class="component-layer">\n <div\n aria-hidden="true"\n class="embed-code-component"\n style="\n width: '.concat(n.width,";\n height: ").concat(n.height,";\n left: ").concat(n.left,";\n top: ").concat(n.top,";\n ").concat(n.transform?"transform: ".concat(n.transform,";"):"","\n z-index: ").concat(n.zIndex,';\n "\n >\n ').concat(e,'\n <div class="loader-container">\n <div class="loader"></div>\n </div>\n </div>\n </div>\n ')};exports.default=n;
|
|
340
|
+
},{}],"QZzK":[function(require,module,exports) {
|
|
341
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=c(require("@babel/runtime/helpers/classCallCheck")),t=c(require("@babel/runtime/helpers/createClass")),r=c(require("@babel/runtime/helpers/inherits")),n=c(require("@babel/runtime/helpers/possibleConstructorReturn")),i=c(require("@babel/runtime/helpers/getPrototypeOf")),a=require("../../constants/layerTypes"),o=require("../../lib/style"),s=require("../../lib/util"),l=c(require("../base")),u=c(require("./dataConvertor")),d=c(require("./template"));function c(e){return e&&e.__esModule?e:{default:e}}function h(e){var t=m();return function(){var r,a=(0,i.default)(e);if(t){var o=(0,i.default)(this).constructor;r=Reflect.construct(a,arguments,o)}else r=a.apply(this,arguments);return(0,n.default)(this,r)}}function m(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}var f=function(n){(0,r.default)(l,n);var i=h(l);function l(t){var r,n=t.layer,o=t.story,s=t.group,d=t.storyDom,c=t.instanceId;return(0,e.default)(this,l),(r=i.call(this,{type:a.LayerTemplateTypes.EMBED_CODE,storyDom:d,instanceId:c})).story_=o,r.group_=s,r.iframeEl_=null,r.loaderEl_=null,r.embedCodeData_=(0,u.default)(n),r.attachCallbacksToElement_(),r.storyObserver_(r.storyObserverCallback_),r}return(0,t.default)(l,[{key:"attachCallbacksToElement_",value:function(){this.storyObserverCallback_=this.storyObserverCallback_.bind(this),this.embedLoadListener_=this.embedLoadListener_.bind(this),this.embedErrorListener_=this.embedErrorListener_.bind(this),this.unMount_=this.unMount_.bind(this)}},{key:"renderIframe_",value:function(){var e=this.embedCodeData_.code,t='\n <!DOCTYPE html>\n <html lang="en">\n <head>\n <meta charset="UTF-8">\n <meta http-equiv="X-UA-Compatible" content="IE=edge">\n <meta name="viewport" content="width=device-width, initial-scale=1.0">\n <title></title>\n\n <style>\n body, html { padding: 0; margin: 0; }\n #content {\n width: 100vw;\n height: 100vh;\n }\n #content > iframe {\n width: 100%;\n height: 100%;\n }\n </style>\n </head>\n <body>\n <div id="content">\n '.concat(e,"\n </div>\n </body>\n </html>\n ");this.iframeEl_.contentWindow.document.open(),this.iframeEl_.contentWindow.document.write(t),this.iframeEl_.contentWindow.document.close()}},{key:"storyObserverCallback_",value:function(e){var t=this;e.forEach(function(e){"attributes"===e.type&&("show"===e.attributeName&&e.target.hasAttribute("show")?t.generateComponentAndAppendToPage((0,d.default)(t.embedCodeData_)).then(function(e){t.dom_=e,t.iframeEl_=t.dom_.querySelector("iframe"),t.loaderEl_=t.dom_.querySelector(".loader-container"),t.renderIframe_(),t.init_()}):e.target.hasAttribute("show")||t.dom_&&(t.unMount_(),t.dom_.parentElement.remove()))})}},{key:"init_",value:function(){this.iframeEl_.hasAttribute("srcDoc")?(this.iframeEl_.addEventListener("load",this.embedLoadListener_),this.iframeEl_.addEventListener("error",this.embedErrorListener_)):this.showIframe_(),(0,s.stopEventBubbling)(this.iframeEl_,"touchstart")}},{key:"showIframe_",value:function(){var e=this;setTimeout(function(){e.loaderEl_&&(0,o.setStyle)(e.loaderEl_,["display","none"]),(0,o.setClass)(e.iframeEl_,"show")},this.iframeEl_.hasAttribute("srcDoc")?1500:500)}},{key:"unMount_",value:function(){this.iframeEl_.removeEventListener("load",this.embedLoadListener_)}},{key:"embedLoadListener_",value:function(){this.iframeEl_.contentWindow.document.body.style.margin="0px",this.iframeEl_.contentWindow.document.body.firstElementChild.style.margin="0px",this.showIframe_()}},{key:"embedErrorListener_",value:function(){this.dom_.remove()}}]),l}(l.default),_=f;exports.default=_;
|
|
342
|
+
},{"@babel/runtime/helpers/classCallCheck":"fcMS","@babel/runtime/helpers/createClass":"P8NW","@babel/runtime/helpers/inherits":"d4H2","@babel/runtime/helpers/possibleConstructorReturn":"pxk2","@babel/runtime/helpers/getPrototypeOf":"UJE0","../../constants/layerTypes":"aJRz","../../lib/style":"vgU2","../../lib/util":"PesM","../base":"skR7","./dataConvertor":"tSb3","./template":"VIQz"}],"z7fV":[function(require,module,exports) {
|
|
343
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=t(require("@babel/runtime/helpers/defineProperty"));function t(e){return e&&e.__esModule?e:{default:e}}function r(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,a)}return r}function a(t){for(var a=1;a<arguments.length;a++){var c=null!=arguments[a]?arguments[a]:{};a%2?r(Object(c),!0).forEach(function(r){(0,e.default)(t,r,c[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(c)):r(Object(c)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(c,e))})}return t}var c=function(e){var t=a({},e);return Object.keys(e).forEach(function(r){switch(r){case"x":t.sdkLeft=e[r];break;case"w":t.width="".concat(e[r],"%");break;case"y":t.sdkTop=e[r];break;case"h":t.height="".concat(e[r],"%");break;case"left":var a;if(Number.isInteger(e[r])){var c=100*e[r]/360;a="".concat(c<0?0:c,"%")}else a="".concat(parseFloat(e[r]),"%");t.left=a;break;case"top":var o;o=Number.isInteger(e[r])?"".concat(100*e[r]/640,"%"):"".concat(parseFloat(e[r]),"%"),t.top=o;break;case"scale":var n=e[r]+1;t.compScale=n;break;case"theme":t.mode=e[r];break;case"type":t.type=e[r];break;case"uid":t.uid=e[r];break;case"rotation":t.transform="rotate(".concat(e[r],"deg)"),t.rotation="".concat(e[r],"deg");break;case"z_index":t.zIndex=e[r];break;case"text":t.text=e[r];break;case"placeholder":t.placeholder=e[r];break;default:return!0}return!0}),t},o=c;exports.default=o;
|
|
344
|
+
},{"@babel/runtime/helpers/defineProperty":"IxO8"}],"NM5M":[function(require,module,exports) {
|
|
345
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var n=require("../../../lib/icons"),o=require("../../../lib/util"),t=function(t,a){return'\n <div class="component-layer">\n <div\n aria-hidden="true"\n class="promo-code-component"\n style="\n font-family: '.concat((0,o.getFontFamily)({instanceId:a}),";\n left: ").concat(t.left.startsWith("-")&&!t.rotation?"0%":t.left,";\n top: ").concat(t.top,";\n z-index: ").concat(t.zIndex,";\n ").concat(t.transform?"transform: ".concat(t.transform,"; --data-rotation: ").concat(t.rotation):"",'\n "\n role="component"\n data-group=""\n data-story=""\n data-mode="').concat(t.mode,'"\n data-scale="').concat(t.scale,'"\n >\n <div class="promo-code">\n <span class="promo-code-title">').concat(t.text,'</span>\n <span class="promo-code-icon">').concat((0,n.copyIcon)((0,o.randomAlphaNum)(4)),'</span>\n </div>\n <span class="promo-code-component-copied">Copied</span>\n </div>\n </div>\n')};exports.default=t;
|
|
346
|
+
},{"../../../lib/icons":"irwm","../../../lib/util":"PesM"}],"N5Sp":[function(require,module,exports) {
|
|
347
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=p(require("@babel/runtime/helpers/classCallCheck")),t=p(require("@babel/runtime/helpers/createClass")),o=p(require("@babel/runtime/helpers/inherits")),r=p(require("@babel/runtime/helpers/possibleConstructorReturn")),n=p(require("@babel/runtime/helpers/getPrototypeOf")),i=p(require("copy-to-clipboard")),a=require("../../constants/events"),s=require("../../constants/layerTypes"),u=require("../../lib/icons"),l=p(require("../base")),c=p(require("./dataConvertor")),d=p(require("./template"));function p(e){return e&&e.__esModule?e:{default:e}}function _(e){var t=y();return function(){var o,i=(0,n.default)(e);if(t){var a=(0,n.default)(this).constructor;o=Reflect.construct(i,arguments,a)}else o=i.apply(this,arguments);return(0,r.default)(this,o)}}function y(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}var f=function(r){(0,o.default)(l,r);var n=_(l);function l(t){var o,r=t.layer,i=t.group,a=t.storyDom,u=t.story,p=t.instanceId;return(0,e.default)(this,l),(o=n.call(this,{type:s.LayerTemplateTypes.PROMO_CODE,storyDom:a,instanceId:p})).story_=u,o.group_=i,o.promoCodeData_=(0,c.default)(r),o.generateComponentAndAppendToPage((0,d.default)(o.promoCodeData_,p)).then(function(e){o.dom_=e,o.init_()}),o.attachCallbacksToElement_(),o}return(0,t.default)(l,[{key:"attachCallbacksToElement_",value:function(){this.onCopy_=this.onCopy_.bind(this)}},{key:"init_",value:function(){this.dom_.addEventListener("pointerdown",this.onCopy_)}},{key:"onCopy_",value:function(){this.setStyle(this.dom_,"animation","none");var e=this.promoCodeData_.text,t={event_type:a.LayerEventTypes.PromoCodeCopied,ivod_total_session_time:0,event_time:Date.now(),story_group_id:+this.group_.group_id,story_id:+this.story_.story_id,duration:null,story_interactive_type:"promo_code",story_interactive_y:this.promoCodeData_.y,watch_length:null,story_interactive_x:this.promoCodeData_.x,uid:this.promoCodeData_.uid,story_group_type:"default",story_group_index:null,story_index:null};(0,i.default)(e);var o=this.dom_.querySelector(".promo-code-component-copied"),r=this.dom_.querySelector(".promo-code-icon"),n=r.innerHTML;r.innerHTML=u.checkIconGradient,o.classList.add("show"),setTimeout(function(){o.classList.remove("show"),r.innerHTML=n},2e3),this.api.sendEvent(t)}}]),l}(l.default),h=f;exports.default=h;
|
|
348
|
+
},{"@babel/runtime/helpers/classCallCheck":"fcMS","@babel/runtime/helpers/createClass":"P8NW","@babel/runtime/helpers/inherits":"d4H2","@babel/runtime/helpers/possibleConstructorReturn":"pxk2","@babel/runtime/helpers/getPrototypeOf":"UJE0","copy-to-clipboard":"xbqV","../../constants/events":"d0lR","../../constants/layerTypes":"aJRz","../../lib/icons":"irwm","../base":"skR7","./dataConvertor":"z7fV","./template":"NM5M"}],"GO24":[function(require,module,exports) {
|
|
349
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=c(require("@babel/runtime/helpers/defineProperty")),r=require("../../constants/common"),t=require("../../lib/util");function c(e){return e&&e.__esModule?e:{default:e}}function o(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(e);r&&(c=c.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),t.push.apply(t,c)}return t}function n(r){for(var t=1;t<arguments.length;t++){var c=null!=arguments[t]?arguments[t]:{};t%2?o(Object(c),!0).forEach(function(t){(0,e.default)(r,t,c[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(c)):o(Object(c)).forEach(function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(c,e))})}return r}var a=function(e){var c=n({},e);return Object.keys(c).forEach(function(o){switch(o){case"w":var n="".concat(parseFloat(e[o]),"%");c.width=n;break;case"h":var a="".concat(parseFloat(e[o]),"%");c.height=a;break;case"q_title_color":var i=(0,t.convertHex)(e[o]);c.q_title_color=i;break;case"scale":c.scale=r.layerScales[e[o]];break;default:return!0}return!0}),c},i=a;exports.default=i;
|
|
350
|
+
},{"@babel/runtime/helpers/defineProperty":"IxO8","../../constants/common":"VKZr","../../lib/util":"PesM"}],"OpIm":[function(require,module,exports) {
|
|
351
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var n=["A","B","C","D"],t=function(t){return'\n <div class="component-layer">\n <div\n class="image-quiz-component"\n role="component"\n style="\n width: '.concat(t.width,";\n left: ").concat(t.left,";\n top: ").concat(t.top,";\n z-index: ").concat(t.z_index,";\n transform: rotate(").concat(t.rotation,'deg);\n "\n data-scale="').concat(t.scale,'"\n aria-label="Quiz sticker, ').concat(t.q_title?"Quiz sticker title ".concat(t.q_title):"",' "\n >\n ').concat(t.q_title?'<div class="image-quiz-component-header">\n <h6>'.concat(t.q_title,"</h6>\n </div>"):"",'\n <div class="image-quiz-component-questions">\n ').concat(t.q_o_images.map(function(e,o){var i,a,c;return'\n <button\n type="button"\n aria-label="Option '.concat(n[o]," is ").concat((null===(i=t.alt_texts)||void 0===i?void 0:i[o])||(null!==(a=t.q_o_texts)&&void 0!==a?a:[])[o],'"\n class="image-quiz-component-question"\n style="background-image: url(').concat(e,')"\n >\n <div class="image-quiz-component-question-letter"><span>').concat(n[o],'</span></div>\n <div class="image-quiz-component-question-title">\n <span>').concat((null!==(c=t.q_o_texts)&&void 0!==c?c:[])[o]||"","</span>\n </div>\n </button>")}).join(""),"\n </div>\n </div>\n </div>\n")};exports.default=t;
|
|
352
|
+
},{}],"Mxyn":[function(require,module,exports) {
|
|
353
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=d(require("@babel/runtime/helpers/asyncToGenerator")),t=d(require("@babel/runtime/helpers/classCallCheck")),a=d(require("@babel/runtime/helpers/createClass")),i=d(require("@babel/runtime/helpers/inherits")),n=d(require("@babel/runtime/helpers/possibleConstructorReturn")),r=d(require("@babel/runtime/helpers/getPrototypeOf")),s=d(require("@babel/runtime/regenerator")),o=d(require("../base")),c=d(require("./dataConvertor")),u=d(require("./template"));require("./style.scss");var l=require("../../lib/util"),_=require("../../lib/icons"),h=require("../../constants/layerTypes"),p=require("../../constants/events");function d(e){return e&&e.__esModule?e:{default:e}}function m(e){var t=y();return function(){var a,i=(0,r.default)(e);if(t){var s=(0,r.default)(this).constructor;a=Reflect.construct(i,arguments,s)}else a=i.apply(this,arguments);return(0,n.default)(this,a)}}function y(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}var f=function(n){(0,i.default)(o,n);var r=m(o);function o(e){var a,i=e.layer,n=e.group,s=e.story,l=e.type,h=e.storyDom,p=e.instanceId;return(0,t.default)(this,o),(a=r.call(this,{type:l,storyDom:h,instanceId:p})).story_=s,a.group_=n,a.type_=l,a.imageQuizData_=(0,c.default)(i),a.isPercentageType_=null===a.imageQuizData_.q_answer,a.localData_=a.getLocalComponentData(),a.partyEmoji_='<span class="correct-emoji">🥳</span>',a.sadEmoji_='<span class="wrong-emoji">😕</span>',a.wrongIconTemplate_='<span class="wrong-icon">'.concat((0,_.xIcon)("#FF4D50"),"</span>"),a.correctIconTemplate_='<span class="correct-icon">'.concat((0,_.checkIcon)("#51C41A"),"</span>"),a.percentageIconTemplate_=function(e){return'<div style="--width-percentage: '.concat(e,'%" class="percentage-icon"><span>').concat(e,"%</span></div>")},a.generateComponentAndAppendToPage((0,u.default)(a.imageQuizData_)).then(function(e){a.dom_=e,a.questions_=Array.from(a.dom_.lastElementChild.children),a.storyObserver_(a.storyObserverCallback_),a.init_()}),a.attachCallbacksToElement_(),a}return(0,a.default)(o,[{key:"attachCallbacksToElement_",value:function(){this.storyObserverCallback_=this.storyObserverCallback_.bind(this),this.onQuestionClick_=this.onQuestionClick_.bind(this),this.handleCorrectAnswerType_=this.handleCorrectAnswerType_.bind(this),this.handlePercentageAnswerType_=this.handlePercentageAnswerType_.bind(this)}},{key:"init_",value:function(){var e=this,t=this.localData_[this.imageQuizData_.uid];if("number"==typeof t){if(this.questions_[t].classList.add("selected"),this.isPercentageType_)return void this.handlePercentageAnswerType_(this.questions_[t]);this.questions_.forEach(function(t,a){e.imageQuizData_.q_answer===a?e.handleOptions_(t,"correct-option",e.correctIconTemplate_):e.handleOptions_(t,"wrong-option",e.wrongIconTemplate_)})}else this.questions_.forEach(function(t,a){(0,l.stopEventBubbling)(t,"touchstart"),(0,l.stopEventBubbling)(t,"touchend"),(0,l.setClickEventListener)(t,function(t){return e.onQuestionClick_(t,a)},!0)})}},{key:"storyObserverCallback_",value:function(e){var t=this;e.forEach(function(e){"attributes"===e.type&&"show"===e.attributeName&&(e.target.hasAttribute("show")&&t.exposeAccessibilityElements_(),e.target.hasAttribute("show")||t.hideAccessibilityElements_())})}},{key:"exposeAccessibilityElements_",value:function(){this.dom_.setAttribute("tabindex","21"),this.questions_.forEach(function(e){return e.setAttribute("tabindex","21")})}},{key:"hideAccessibilityElements_",value:function(){this.dom_.removeAttribute("tabindex"),this.questions_.forEach(function(e){return e.removeAttribute("tabindex")})}},{key:"onQuestionClick_",value:function(e,t){var a=e.target;"number"!=typeof this.localData_[this.imageQuizData_.uid]&&(this.localData_=this.getLocalComponentData(),this.localData_[this.imageQuizData_.uid]=t,this.setLocalComponentData(this.localData_),this.questions_.forEach(function(e){return e.classList.remove("selected")}),a.classList.add("selected"),this.isPercentageType_?this.handlePercentageAnswerType_(a):this.handleCorrectAnswerType_(a),this.handleEvent_(t))}},{key:"handleCorrectAnswerType_",value:function(e){var t=this;this.dom_.lastElementChild.classList.add("correct"),this.questions_[this.imageQuizData_.q_answer]===e?(this.handleOptions_(e,"correct-option",this.partyEmoji_),setTimeout(function(){t.questions_.forEach(function(a){a!==e&&t.handleOptions_(a,"wrong-option",t.wrongIconTemplate_)}),e.removeChild(e.querySelector(".correct-emoji")),e.appendChild(t.generateHtmlFromTemplate(t.correctIconTemplate_))},1400)):(this.handleOptions_(e,"wrong-option",this.sadEmoji_),setTimeout(function(){t.questions_.forEach(function(a,i){i===t.imageQuizData_.q_answer&&t.handleOptions_(a,"correct-option",t.correctIconTemplate_),a!==e&&i!==t.imageQuizData_.q_answer&&t.handleOptions_(a,"wrong-option",t.wrongIconTemplate_)}),e.removeChild(e.querySelector(".wrong-emoji")),e.appendChild(t.generateHtmlFromTemplate(t.wrongIconTemplate_))},1400))}},{key:"handleOptions_",value:function(e,t,a){e.classList.add(t);var i=e.querySelector(".image-quiz-component-question-letter"),n=this.generateHtmlFromTemplate(a),r=e.querySelector(".image-quiz-component-question-title span").innerHTML;if(e.removeChild(i),e.appendChild(n),"percentage-option"===t){var s=e.querySelector(".percentage-icon span").innerHTML;e.setAttribute("aria-label","".concat(r," was selected by ").concat(s," of users."))}else e.setAttribute("aria-label","".concat(r," is the ").concat("correct-option"===t?"correct":"wrong"," answer"))}},{key:"handlePercentageAnswerType_",value:function(e){var t,a=this,i=this.checkQuizDataDiff_()?0:1,n=null!==(t=this.imageQuizData_.q_o_votes)&&void 0!==t?t:Array.from({length:this.imageQuizData_.q_o_votes.length},function(){return 100}),r=this.sumArrayValues(null!=n?n:[])+i;this.dom_.lastElementChild.classList.add("percentage"),this.questions_.forEach(function(t,s){var o;t===e?(o=Number(n[s])+i,e.classList.add("selected")):o=Number(n[s]);var c=Math.round(o/r*100);a.handleOptions_(t,"percentage-option",a.percentageIconTemplate_(c))})}},{key:"checkQuizDataDiff_",value:function(){var e,t=this.getComponentLocalData(h.LayerTemplateTypes.IMAGE_QUIZ,this.imageQuizData_);return!(t.uid!==this.imageQuizData_.uid||!t.q_o_votes)&&(null!==(e=this.imageQuizData_.q_o_votes)&&void 0!==e?e:[]).some(function(e,a){var i;return(null===(i=t.q_o_votes)||void 0===i?void 0:i[a])!==e})}},{key:"handleEvent_",value:function(){var t=(0,e.default)(s.default.mark(function e(t){var a,i;return s.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:a={event_type:p.LayerEventTypes.ImageQuizAnswered,story_group_id:+this.group_.group_id,story_id:+this.story_.story_id,story_group_index:null,story_index:null,story_group_type:"default",story_interactive_type:"image_quiz",story_interactive_x:this.imageQuizData_.x,story_interactive_y:this.imageQuizData_.y,duration:null,watch_length:null,event_time:Date.now(),activity:String(t),uid:this.imageQuizData_.uid},this.setComponentLocalData(h.LayerTemplateTypes.IMAGE_QUIZ,this.imageQuizData_),this.api.sendEvent(a),i={group:this.group_,story_id:this.story_.story_id,alt_text:this.story_.alt_text,is_sharable:this.story_.is_sharable,track_id:this.imageQuizData_.custom_payload,title:this.imageQuizData_.q_title,questions:this.imageQuizData_.q_o_texts,images:this.imageQuizData_.q_o_images,votes:this.imageQuizData_.q_o_votes,answer:t,correct_answer:this.imageQuizData_.q_answer},(0,l.createAndDispatchEvent)(this.storyDom_,"onCustomerEvent",{eventName:p.CustomerEventTypes.onStoryImageQuizAnswered,params:i});case 5:case"end":return e.stop()}},e,this)}));return function(e){return t.apply(this,arguments)}}()}]),o}(o.default),g=f;exports.default=g;
|
|
354
|
+
},{"@babel/runtime/helpers/asyncToGenerator":"agGE","@babel/runtime/helpers/classCallCheck":"fcMS","@babel/runtime/helpers/createClass":"P8NW","@babel/runtime/helpers/inherits":"d4H2","@babel/runtime/helpers/possibleConstructorReturn":"pxk2","@babel/runtime/helpers/getPrototypeOf":"UJE0","@babel/runtime/regenerator":"PMvg","../base":"skR7","./dataConvertor":"GO24","./template":"OpIm","./style.scss":"WCGv","../../lib/util":"PesM","../../lib/icons":"irwm","../../constants/layerTypes":"aJRz","../../constants/events":"d0lR"}],"xzwX":[function(require,module,exports) {
|
|
355
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=a(require("@babel/runtime/helpers/slicedToArray")),r=a(require("@babel/runtime/helpers/defineProperty")),t=require("../../lib/util");function a(e){return e&&e.__esModule?e:{default:e}}function o(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);r&&(a=a.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),t.push.apply(t,a)}return t}function c(e){for(var t=1;t<arguments.length;t++){var a=null!=arguments[t]?arguments[t]:{};t%2?o(Object(a),!0).forEach(function(t){(0,r.default)(e,t,a[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):o(Object(a)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(a,r))})}return e}var n={6:.375,4:.34375,2:.28125},i=function(r){var a,o=c(c({},r),{},{text_font:null!==(a=r.text_font)&&void 0!==a?a:"Poppins-Regular"});return Object.keys(o).forEach(function(r){switch(r){case"text_span_color":var a=(0,t.convertHex)(o[r]);o.background=a;break;case"text_color":var c=(0,t.convertHex)(o[r]);o.color=c;break;case"rotation":o.transform="rotate(".concat(o[r],"deg)");break;case"is_bold":o.fontWeight=o[r]?700:"normal";break;case"is_italic":o.fontStyle=o[r]?"italic":"normal";break;case"text_font":if(o[r]){var i=o[r].split("-"),l=(0,e.default)(i,2),s=l[0],b=l[1];o.fontFamily="Storyly-".concat(s),o.fontWeight=b.includes("Bold")?700:"normal",o.fontStyle=b.includes("Italic")?"italic":"normal"}break;case"text_size":o.fontSize="".concat(n[o[r]],"em");break;case"x":o.sdkLeft=o[r];break;case"w":o.width="".concat(o[r],"%");break;case"y":o.sdkTop=o[r];break;case"left":var f;if(Number.isInteger(o[r])){var u=100*o[r]/360;f="".concat(u<0?0:u,"%")}else f="".concat(parseFloat(o[r]),"%");o.left=f;break;case"top":var p;p=Number.isInteger(o[r])?"".concat(100*o[r]/640,"%"):"".concat(parseFloat(o[r]),"%"),o.top=p;break;case"h":o.height="".concat(o[r],"%");break;case"border_color":if(!o[r])break;var d=(0,t.convertHex)(o[r]);o.borderColor=d;break;case"text_alignment":var k="left";1===o[r]&&(k="center"),2===o[r]&&(k="right"),o.textAlign=k;break;case"border_thickness":if(!1===o[r])break;var v=o[r]+1;o.borderWidth=v;break;case"scale":var y=o[r]+1;o.compScale=y;break;case"text":o.text=o[r];break;case"type":o.type=o[r];break;case"z_index":o.zIndex=o[r];break;case"placeholder":o.placeholder=o[r];break;default:return!0}return!0}),o},l=i;exports.default=l;
|
|
356
|
+
},{"@babel/runtime/helpers/slicedToArray":"HETk","@babel/runtime/helpers/defineProperty":"IxO8","../../lib/util":"PesM"}],"tJpD":[function(require,module,exports) {
|
|
357
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var n=require("../../../lib/util"),t=function(t,o,c){var e,a;return'\n <div class="component-layer" dir="'.concat(o.direction,'">\n <div\n class="text-component"\n aria-hidden="true"\n style="\n color: ').concat(t.color,";\n font-size: ").concat(t.fontSize,";\n font-family: ").concat((0,n.getFontFamily)({font:t.fontFamily,instanceId:c}),";\n font-style: ").concat(t.fontStyle,";\n font-weight: ").concat(t.fontWeight,";\n transform: ").concat(t.transform?t.transform:"none",";\n left: ").concat(t.left,";\n top: ").concat(t.top,";\n text-align: ").concat(t.textAlign,";\n width: ").concat(t.width,";\n ").concat(!t.l_c&&t.height?"height: ".concat(t.height,";"):"","\n z-index: ").concat(null!==(e=t.zIndex)&&void 0!==e?e:1,';\n "\n >\n <span style="background: ').concat(null!==(a=t.background)&&void 0!==a?a:"unset",';">').concat(t.text,"</span>\n </div>\n </div>\n")};exports.default=t;
|
|
358
|
+
},{"../../../lib/util":"PesM"}],"youg":[function(require,module,exports) {
|
|
359
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var t=u(require("@babel/runtime/helpers/classCallCheck")),e=u(require("@babel/runtime/helpers/createClass")),a=u(require("@babel/runtime/helpers/inherits")),r=u(require("@babel/runtime/helpers/possibleConstructorReturn")),n=u(require("@babel/runtime/helpers/getPrototypeOf")),i=require("../../constants/layerTypes"),l=require("../../lib/util"),o=u(require("../base")),s=u(require("./dataConvertor")),c=u(require("./template"));function u(t){return t&&t.__esModule?t:{default:t}}function h(t){var e=d();return function(){var a,i=(0,n.default)(t);if(e){var l=(0,n.default)(this).constructor;a=Reflect.construct(i,arguments,l)}else a=i.apply(this,arguments);return(0,r.default)(this,a)}}function d(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}var f=function(r){(0,a.default)(o,r);var n=h(o);function o(e){var a,r=e.layer,l=e.storyDom,u=e.instanceId;return(0,t.default)(this,o),(a=n.call(this,{type:i.LayerTemplateTypes.TEXT,storyDom:l,instanceId:u})).textData_=(0,s.default)(r),a.attachCallbacksToElement_(),a.generateComponentAndAppendToPage((0,c.default)(a.textData_,a.globalInstanceData,u)).then(function(t){a.dom_=t,a.setLineClamp_(t)}),a}return(0,e.default)(o,[{key:"attachCallbacksToElement_",value:function(){this.storyObserverCallback_=this.storyObserverCallback_.bind(this),this.handleBottomSheet_=this.handleBottomSheet_.bind(this)}},{key:"storyObserverCallback_",value:function(t){var e=this;t.forEach(function(t){if("attributes"===t.type){if(t.target.hasAttribute("show")&&"show"===t.attributeName)e.isTextOverflow(e.dom_)&&e.dom_.addEventListener("pointerdown",e.handleBottomSheet_);t.target.hasAttribute("show")||e.dom_.removeEventListener("pointerdown",e.handleBottomSheet_)}})}},{key:"setLineClamp_",value:function(t){this.textData_.l_c&&(t.classList.add("line-clamp"),this.setStyle(t,"line-clamp",this.textData_.l_c),this.setStyle(t,"-webkit-line-clamp",this.textData_.l_c),(0,l.stopEventBubbling)(this.dom_,"touchstart"),(0,l.stopEventBubbling)(this.dom_,"touchend"),this.storyObserver_(this.storyObserverCallback_))}},{key:"handleBottomSheet_",value:function(t){if(!this.clickableSafeArea_){var e=this.dom_.getBoundingClientRect(),a=e.bottom,r=e.height/this.textData_.l_c;this.clickableSafeArea_=a-r}if(t.clientY>this.clickableSafeArea_){var n=this.generateHtmlFromTemplate('<p style="font-family: '.concat((0,l.getFontFamily)({instanceId:this.instanceId}),';" class="text-component-bottom-sheet">').concat(this.textData_.text,"</p>")),i=this.generateHtmlFromTemplate('<div style="display: none;"></div>');(0,l.createAndDispatchEvent)(this.dom_,"onBottomSheetOpen",{body:n,footer:i})}}}]),o}(o.default),m=f;exports.default=m;
|
|
360
|
+
},{"@babel/runtime/helpers/classCallCheck":"fcMS","@babel/runtime/helpers/createClass":"P8NW","@babel/runtime/helpers/inherits":"d4H2","@babel/runtime/helpers/possibleConstructorReturn":"pxk2","@babel/runtime/helpers/getPrototypeOf":"UJE0","../../constants/layerTypes":"aJRz","../../lib/util":"PesM","../base":"skR7","./dataConvertor":"xzwX","./template":"tJpD"}],"UKq4":[function(require,module,exports) {
|
|
361
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=O(require("@babel/runtime/helpers/asyncToGenerator")),t=O(require("@babel/runtime/helpers/defineProperty")),s=O(require("@babel/runtime/helpers/toConsumableArray")),i=O(require("@babel/runtime/helpers/classCallCheck")),r=O(require("@babel/runtime/helpers/createClass")),o=O(require("@babel/runtime/regenerator")),a=O(require("copy-to-clipboard")),n=require("../../../constants/layerTypes"),h=require("../../../lib/style"),l=require("../../../lib/util"),d=O(require("../templates/story")),u=O(require("../../../components/BottomSheet")),y=require("../../../constants/events"),_=O(require("../../../constants/directions")),c=require("../../../service"),p=O(require("../../../lib/proxy")),m=O(require("../../../layers/BlankStory")),v=O(require("../../../layers/ImageCTA")),g=O(require("../../../layers/CTA")),f=O(require("../../../layers/Poll")),A=O(require("../../../layers/Rating")),b=O(require("../../../layers/Emoji")),S=O(require("../../../layers/Quiz")),D=O(require("../../../layers/Countdown")),E=O(require("../../../layers/Question")),P=O(require("../../../layers/Media")),T=O(require("../../../layers/ProductCard")),L=O(require("../../../layers/ProductCatalog")),C=O(require("../../../layers/ProductTag")),k=O(require("../../../layers/EmbedCode")),q=O(require("../../../layers/PromoCode")),w=O(require("../../../layers/ImageQuiz")),I=O(require("../../../layers/Text"));function O(e){return e&&e.__esModule?e:{default:e}}function x(e,t){var s=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),s.push.apply(s,i)}return s}function V(e){for(var s=1;s<arguments.length;s++){var i=null!=arguments[s]?arguments[s]:{};s%2?x(Object(i),!0).forEach(function(s){(0,t.default)(e,s,i[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):x(Object(i)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))})}return e}var B=function(){function t(e){var s=e.story,r=e.key,o=e.group,a=e.storiesContainer,n=e.groupWrapper,d=e.progressDoms,u=e.instanceId;(0,i.default)(this,t),this.storyDom_=null,this.layersContainer_=document.createElement("div"),this.story_=s,this.storyData_={},this.layers_=[],this.group_=o,this.key_=r,this.storiesContainer_=a,this.groupWrapper_=n,this.progressDoms_=d,this.storyProgressSecond_=7,this.progressPaused_=!0,this.imageAsset_=null,this.videoAsset_=null,this.hasEmbedCode_=!1,this.storyProgressRemain_=this.storyProgressSecond_,this.progressTime_=0,this.isBlankStory_=!1,this.imageAssetLoaded_=!1,this.instanceId=u,this.timedLayers_=[],(0,h.setClass)(this.layersContainer_,"layers-container"),(0,l.setAttribute)(this.layersContainer_,"dir",_.default.LTR),this.attachCallbacksToElement_(),this.render_()}return(0,r.default)(t,[{key:"attachCallbacksToElement_",value:function(){this.onVideoLoadedData_=this.onVideoLoadedData_.bind(this),this.onVideoEnded_=this.onVideoEnded_.bind(this),this.onVideoWaiting_=this.onVideoWaiting_.bind(this),this.onVideoPlaying_=this.onVideoPlaying_.bind(this),this.handleSoundStory_=this.handleSoundStory_.bind(this),this.playAndPauseStory=this.playAndPauseStory.bind(this),this.handleCloseGroup_=this.handleCloseGroup_.bind(this),this.renderBottomSheet_=this.renderBottomSheet_.bind(this),this.onImageLoad_=this.onImageLoad_.bind(this),this.renderShareWidget=this.renderShareWidget.bind(this)}},{key:"setCustomEvents_",value:function(){this.storyDom_.addEventListener("onPlayPause",this.playAndPauseStory)}},{key:"render_",value:function(){var e=(0,l.getStoryAssetFromLayers)(this.story_.media.layers),t=e.storyData,i=e.layers,r=e.storyBg;this.storyData_=t,this.layers_=(0,s.default)(i);var o=(0,d.default)({story:V(V({},this.storyData_),{},{story_id:this.story_.story_id}),type:this.storyData_.type,altText:this.story_.alt_text,mediaHost:this.group_.media_host,thumbnail:this.story_.media.thumbnail_url,storyBg:r});this.storyDom_=(0,l.generateHtmlFromTemplate)(o),this.storyDom_.appendChild(this.layersContainer_),this.storiesContainer_.appendChild(this.storyDom_),"video"===this.storyData_.type?(this.videoAsset_=this.storyDom_.querySelector("video"),this.handleVideoEvents_()):this.isBlankStory_||(this.imageAsset_=this.storyDom_.querySelector("img"),this.imageAsset_.addEventListener("load",this.onImageLoad_,{once:!0})),this.loadLayers_();var a=p.default.getNodeByInstanceId(this.instanceId).getDataFromGlobal().globalInstanceData;this.globalInstanceData=a,this.setCustomEvents_(),this.renderBottomSheet_()}},{key:"onImageLoad_",value:function(){if(!this.imageAssetLoaded_){this.imageAssetLoaded_=!0,this.startProgressSteps_();var e=this.imageAsset_,t=e.clientHeight,s=e.clientWidth;this.setStoryClassByAsset_({height:t,width:s})}}},{key:"startProgressSteps_",value:function(){this.hasEmbedCode_||(this.startProgressLine_(),this.startProgress_())}},{key:"setStoryClassByAsset_",value:function(e){var t=e.width;+(56.25*e.height/t).toFixed(2)<100&&(0,h.setClass)(this.storyDom_,"story-9_16")}},{key:"handleVideoEvents_",value:function(){this.videoAsset_.addEventListener("loadedmetadata",this.onVideoLoadedData_),this.videoAsset_.addEventListener("ended",this.onVideoEnded_),this.videoAsset_.addEventListener("waiting",this.onVideoWaiting_),this.videoAsset_.addEventListener("playing",this.onVideoPlaying_)}},{key:"onVideoLoadedData_",value:function(){this.setStoryClassByAsset_({height:this.videoAsset_.videoHeight,width:this.videoAsset_.videoWidth}),this.storyProgressRemain_=this.videoAsset_.duration,this.storyProgressSecond_=this.videoAsset_.duration}},{key:"onVideoEnded_",value:function(){this.globalInstanceData.accessibility||(0,l.createAndDispatchEvent)(this.storyDom_,"onNextStory",{gesture:y.GestureTypes.Progress})}},{key:"onVideoWaiting_",value:function(){this.progressPaused_=!0}},{key:"onVideoPlaying_",value:function(){this.soundOn_?this.soundOn():this.soundOff(),this.progressPaused_=!1,this.hasEmbedCode_||this.startProgress_()}},{key:"removeEvents_",value:function(){this.videoAsset_&&(this.videoAsset_.removeEventListener("loadedmetadata",this.onVideoLoadedData_),this.videoAsset_.removeEventListener("ended",this.onVideoEnded_),this.videoAsset_.removeEventListener("waiting",this.onVideoWaiting_),this.videoAsset_.removeEventListener("playing",this.onVideoPlaying_));var e=this.groupWrapper_.querySelector(".storyly__story-actions"),t=e.querySelector('button[data-type="sound"]'),s=e.querySelector('button[data-type="share"]');this.playPauseAction_&&this.playPauseAction_.removeEventListener("click",this.playAndPauseStory),t.removeEventListener("click",this.handleSoundStory_),s.removeEventListener("click",this.renderShareWidget)}},{key:"loadLayers_",value:function(){var t=this;this.layers_.forEach(function(){var s=(0,e.default)(o.default.mark(function e(s){var i,r;return o.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:i=s,r={layer:s,group:t.group_,story:t.story_,storyDom:t.layersContainer_,instanceId:t.instanceId},s.type===n.LayerTemplateTypes.IMAGE&&s.bg_color&&(t.isBlankStory_=!0,i.instance=new m.default(V({},r))),s.type===n.LayerTemplateTypes.EMOJI&&(i.instance=new b.default(V({},r))),s.type===n.LayerTemplateTypes.POLL&&(i.instance=new f.default(V({},r))),s.type===n.LayerTemplateTypes.RATING&&(i.instance=new A.default(V({},r))),s.type===n.LayerTemplateTypes.QUIZ&&(i.instance=new S.default(V({},r))),s.type===n.LayerTemplateTypes.COUNTDOWN&&(i.instance=new D.default(V({},r))),s.type===n.LayerTemplateTypes.IMAGE_CTA&&(i.instance=new v.default(V(V({},r),{},{type:n.LayerTemplateTypes.IMAGE_CTA}))),s.type!==n.LayerTemplateTypes.BUTTON&&s.type!==n.LayerTemplateTypes.SWIPE||(i.instance=new g.default(V(V({},r),{},{type:s.type===n.LayerTemplateTypes.BUTTON?n.LayerTemplateTypes.BUTTON:n.LayerTemplateTypes.SWIPE}))),s.type===n.LayerTemplateTypes.IMAGE&&(s.image_path||s.video_path||s.image_url)&&(i.instance=new P.default(V(V({},r),{},{mediaHost:t.group_.media_host}))),s.type===n.LayerTemplateTypes.TEXT&&(i.instance=new I.default(V({},r))),s.type===n.LayerTemplateTypes.PRODUCT_TAG&&(i.instance=new C.default(V({},r))),s.type===n.LayerTemplateTypes.PROMO_CODE&&(i.instance=new q.default(V({},r))),s.type===n.LayerTemplateTypes.EMBED_CODE&&(t.hasEmbedCode_=!0,i.instance=new k.default(V({},r))),s.type===n.LayerTemplateTypes.QUESTION&&(i.instance=new E.default(V(V({},r),{},{storiesContainer:t.storiesContainer_}))),s.type===n.LayerTemplateTypes.PRODUCT_CARD&&(i.instance=new T.default(V({},r))),s.type===n.LayerTemplateTypes.PRODUCT_CATALOG&&(i.instance=new L.default(V({},r))),s.type===n.LayerTemplateTypes.IMAGE_QUIZ&&(i.instance=new w.default(V({},r))),(i.start_time||i.end_time)&&(i.instance.hideLayer(),t.timedLayers_.push(i));case 20:case"end":return e.stop()}},e)}));return function(e){return s.apply(this,arguments)}}())}},{key:"startProgress_",value:function(){var e=this;this.progressInterval_||(this.progressInterval_=setInterval(function(){e.progressPaused_||(e.progressTime_+=1,e.handleLayersVisibility_(),e.storyProgressRemain_-=1,e.videoAsset_?e.play():e.handleProgress_())},1e3))}},{key:"handleLayersVisibility_",value:function(){var e=this;this.progressPaused_||this.timedLayers_.forEach(function(t){var s=t.start_time?1e3*t.start_time-300:0,i=t.end_time?1e3*t.end_time:e.videoAsset_?1e3*e.videoAsset_.duration:1e3*e.storyProgressSecond_;1e3*e.progressTime_>=s&&1e3*e.progressTime_<=i?t.instance.showLayer():t.instance.hideLayer()})}},{key:"handleProgress_",value:function(){this.storyProgressRemain_<=0&&!this.globalInstanceData.accessibility&&((0,l.createAndDispatchEvent)(this.storyDom_,"onNextStory",{gesture:y.GestureTypes.Progress}),clearInterval(this.progressInterval_))}},{key:"handleStoryActions_",value:function(){var e=this.groupWrapper_.querySelector(".storyly__story-actions"),t=e.querySelector('button[data-type="sound"]'),s=e.querySelector('button[data-type="share"]');this.playPauseAction_=e.querySelector('button[data-type="play-pause"]'),(0,l.removeAttribute)(this.playPauseAction_,"hidden"),this.hasEmbedCode_&&(0,l.setAttribute)(this.playPauseAction_,"hidden",!0),this.playPauseAction_.classList.replace("play","pause"),this.playPauseAction_.addEventListener("click",this.playAndPauseStory),this.videoAsset_?((0,l.removeAttribute)(t,"hidden"),t.addEventListener("click",this.handleSoundStory_)):(0,l.setAttribute)(t,"hidden",!0),!this.globalInstanceData.videoMuted&&this.videoAsset_?(this.videoAsset_.muted=!1,this.soundOn_=!0,t.classList.replace("sound-off","sound-on")):this.videoAsset_&&(this.videoAsset_.muted=!0,this.soundOn_=!1,t.classList.replace("sound-on","sound-off")),this.story_.is_sharable&&((0,l.removeAttribute)(s,"hidden"),s.addEventListener("click",this.renderShareWidget))}},{key:"renderBottomSheet_",value:function(){var e=this;this.bottomSheet_=new u.default({parentDom:this.storyDom_,instanceId:this.instanceId}),this.storyDom_.addEventListener("onBottomSheetOpen",function(t){var s=t.detail;return e.bottomSheet_.activate(s.body,s.footer,s.rerender)})}},{key:"handleCloseGroup_",value:function(){(0,l.createAndDispatchEvent)(this.storyDom_,"onCloseGroup")}},{key:"handleSoundStory_",value:function(e){var t=e.target,s="sound-on",i="sound-off";t.classList.contains("sound-off")?((0,c.readAccessibilityText)(this.storyDom_,"Story Unmuted"),t.setAttribute("aria-pressed","false"),this.soundOn_=!0,this.soundOn(),this.globalInstanceData.videoMuted=!1):((0,c.readAccessibilityText)(this.storyDom_,"Story Muted"),t.setAttribute("aria-pressed","true"),this.soundOn_=!1,this.soundOff(),s="sound-off",i="sound-on",this.globalInstanceData.videoMuted=!0),t.classList.replace(i,s)}},{key:"startProgressLine_",value:function(){var e=this,t=0;clearInterval(this.startInterval_),this.startInterval_=setInterval(function(){if(!(e.progressPaused_||(t+=1)>100)){var s=e.progressDoms_[e.key_].querySelector("span");(0,h.setStyle)(s,["width","".concat(t,"%")]),(0,h.setStyle)(s,["--animation-speed","".concat(10*e.storyProgressSecond_,"ms")])}},10*this.storyProgressSecond_)}},{key:"exposeAccessibilityElements_",value:function(){this.storyDom_.querySelectorAll(".cta-button").forEach(function(e){(0,l.setAttribute)(e,"tabindex","21"),(0,l.setAttribute)(e,"aria-hidden","false")}),this.storyDom_.querySelectorAll(".swipe-up-button").forEach(function(e){(0,l.setAttribute)(e,"tabindex","21"),(0,l.setAttribute)(e,"aria-hidden","false")}),this.storyDom_.querySelectorAll(".product-tag-tooltip").forEach(function(e){(0,l.setAttribute)(e,"tabindex","21"),(0,l.setAttribute)(e,"aria-hidden","false")}),this.storyDom_.querySelectorAll(".poll-component").forEach(function(e){e.querySelectorAll("button").forEach(function(e){return(0,l.setAttribute)(e,"tabindex","22")}),(0,l.setAttribute)(e,"tabindex","22"),(0,l.setAttribute)(e,"aria-hidden","false")})}},{key:"hideAccessibilityElements_",value:function(){this.storyDom_.querySelectorAll(".cta-button").forEach(function(e){(0,l.removeAttribute)(e,"tabindex"),(0,l.setAttribute)(e,"aria-hidden","true")}),this.storyDom_.querySelectorAll(".swipe-up-button").forEach(function(e){(0,l.removeAttribute)(e,"tabindex"),(0,l.setAttribute)(e,"aria-hidden","true")}),this.storyDom_.querySelectorAll(".product-tag-tooltip").forEach(function(e){(0,l.removeAttribute)(e,"tabindex"),(0,l.setAttribute)(e,"aria-hidden","true")}),this.storyDom_.querySelectorAll(".poll-component").forEach(function(e){e.querySelectorAll("button").forEach(function(e){return(0,l.removeAttribute)(e,"tabindex")}),(0,l.removeAttribute)(e,"tabindex"),(0,l.setAttribute)(e,"aria-hidden","true")})}},{key:"renderShareWidget",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:y.GestureTypes.Icon;if(this.story_.is_sharable){var s=new URLSearchParams(window.location.search);s.set("storyly","[".concat(this.group_.group_id,", ").concat(this.story_.story_id,"]"));var i,r={title:"Storyly",text:this.group_.title,url:"".concat(window.location.origin).concat(window.location.pathname,"?").concat(s.toString())};this.pause(),this.shareContainer_=this.storyDom_.querySelector(".share-container"),(0,l.stopEventBubbling)(this.shareContainer_,"click"),this.shareContainer_.querySelector(".close-share").addEventListener("click",function(){(0,h.setStyle)(e.shareContainer_,["display","none"]),e.storyDom_.focus(),e.play()}),"https:"===window.location.protocol&&navigator.share?navigator.share(r).then(function(){e.play()}).catch(function(t){20===t.code?e.play():(0,h.setStyle)(e.shareContainer_,["display","flex"])}):(0,h.setStyle)(this.shareContainer_,["display","flex"]),this.shareContainer_.querySelector(".get-link button").focus(),this.shareContainer_.querySelector(".get-link").addEventListener("click",function(){(0,a.default)(r.url),(0,l.createAndDispatchEvent)(e.storyDom_,"onShareStoryEvent",{gesture:t}),(0,h.setClass)(e.storyDom_.querySelector(".copied"),"show"),(0,h.setStyle)(e.shareContainer_,["display","none"]),e.play(),i&&clearTimeout(i),i=setTimeout(function(){(0,h.removeClass)(e.storyDom_.querySelector(".copied"),"show")},2e3)})}}},{key:"soundOn",value:function(){this.videoAsset_.muted=!1}},{key:"soundOff",value:function(){this.videoAsset_.muted=!0}},{key:"pause",value:function(){arguments.length>0&&void 0!==arguments[0]&&arguments[0]&&this.shareContainer_&&(0,h.setStyle)(this.shareContainer_,["display","none"]),this.progressPaused_=!0,this.storyDom_.setAttribute("paused",""),this.videoAsset_&&this.videoAsset_.pause()}},{key:"play",value:function(){arguments.length>0&&void 0!==arguments[0]&&arguments[0]&&this.playPauseAction_.classList.contains("play")&&this.playPauseAction_.classList.replace("play","pause"),this.progressPaused_=!1,this.storyDom_.removeAttribute("paused"),this.videoAsset_&&this.videoAsset_.play()}},{key:"playAndPauseStory",value:function(e){if(!this.globalInstanceData.accessibility){var t,s="play",i="pause";e&&(e.gesture&&(t=e.gesture),e.target===this.playPauseAction_&&(t=y.GestureTypes.Icon)),this.playPauseAction_.classList.contains("pause")?(this.pause(),this.playPauseAction_.setAttribute("aria-pressed","true"),(0,l.createAndDispatchEvent)(this.storyDom_,"onPlayPauseEvent",{gesture:t,eventType:y.EventTypes.Paused})):(this.play(),this.playPauseAction_.setAttribute("aria-pressed","false"),(0,l.createAndDispatchEvent)(this.storyDom_,"onPlayPauseEvent",{gesture:t,eventType:y.EventTypes.Resumed}),s="pause",i="play"),this.playPauseAction_.classList.replace(i,s)}}},{key:"setStoryAsset",value:function(){var e,t="".concat(this.group_.media_host).concat(this.storyData_.image_path);if("image_url"in this.storyData_&&(t=this.storyData_.image_url),"video"===this.storyData_.type)return t="".concat(this.group_.media_host).concat(this.storyData_.video_path),"video_url"in this.storyData_&&(t=this.storyData_.video_url),this.story_.media.thumbnail_url&&(e="".concat(this.group_.media_host).concat(this.story_.media.thumbnail_url),(0,l.setAttribute)(this.storyDom_.querySelector("video"),"poster",e)),void(this.storyDom_.querySelector("video").src=t);this.storyDom_.querySelector("img").src=t}},{key:"sendStoryViewedEvent_",value:function(){var e=V({},this.getStoryData());(0,l.createAndDispatchEvent)(this.storyDom_,"onCustomerEvent",{eventName:y.CustomerEventTypes.onStoryViewed,params:e})}},{key:"show",value:function(){var e,t=this;this.storyDom_.setAttribute("show",""),(0,l.createAndDispatchEvent)(this.storyDom_,"onStoryChange",{asset:this.isBlankStory_?"":null!==(e=this.imageAsset_)&&void 0!==e?e:this.videoAsset_}),this.handleStoryActions_(),this.progressPaused_=!1,this.storyProgressRemain_=this.storyProgressSecond_,this.progressTime_=0,(0,h.removeClass)(this.progressDoms_[this.key_],"seen"),this.videoAsset_?(this.handleVideoEvents_(),this.videoAsset_.play().then(function(){t.hasEmbedCode_||t.startProgressLine_()})):this.isBlankStory_||this.imageAssetLoaded_?this.startProgressSteps_():this.imageAsset_.style.paddingBottom="0.5px",this.hasEmbedCode_&&(0,h.setStyle)(this.progressDoms_[this.key_].querySelector("span"),["width","10%"]),this.globalInstanceData.accessibility&&(0,h.setStyle)(this.playPauseAction_,["display","none"]),this.exposeAccessibilityElements_(),(0,h.setClass)(this.progressDoms_[this.key_],"active"),(0,h.setClass)(this.storyDom_,"active"),setTimeout(function(){t.storyDom_.focus()},500),this.sendStoryViewedEvent_()}},{key:"hide",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.isBack,s=void 0!==t&&t,i=e.holdActive,r=void 0!==i&&i;this.storyDom_.removeAttribute("show"),this.storyDom_.hasAttribute("paused")&&this.storyDom_.removeAttribute("paused"),this.hideAccessibilityElements_(),clearInterval(this.progressInterval_),clearInterval(this.startInterval_),this.bottomSheet_.deactivate(),this.progressInterval_=null,this.startInterval_=null,this.videoAsset_&&(this.videoAsset_.currentTime=0,this.videoAsset_.pause()),this.removeEvents_(),this.progressPaused_=!0,(0,h.removeClass)(this.progressDoms_[this.key_],"active"),r||(0,h.removeClass)(this.storyDom_,"active"),(0,h.resetStyle)(this.progressDoms_[this.key_].querySelector("span"),["transition","width"]),s?(0,h.removeClass)(this.progressDoms_[this.key_],"seen"):(0,h.setClass)(this.progressDoms_[this.key_],"seen"),this.shareContainer_&&(0,h.setStyle)(this.shareContainer_,["display","none"]),this.timedLayers_.forEach(function(e){return e.instance.hideLayer()})}},{key:"getWatchLength",value:function(){return 1e3*(this.storyProgressSecond_-this.storyProgressRemain_)}},{key:"getProgressPausedStatus",value:function(){return this.progressPaused_}},{key:"getStoryData",value:function(){var e="".concat(this.group_.media_host).concat(this.storyData_.image_path);return"video"===this.storyData_.type&&(e="".concat(this.group_.media_host).concat(this.storyData_.video_path)),{story_id:this.story_.story_id,media:e,group:this.group_,index:this.key_}}},{key:"sendStoryClickedEvent",value:function(e,t){var s=V(V({},this.getStoryData()),{},{gesture_type:(0,l.getGestureType)(e)});(0,l.createAndDispatchEvent)(this.storyDom_,"onCustomerEvent",{eventName:"next"===t?y.CustomerEventTypes.onNextStory:y.CustomerEventTypes.onPreviousStory,params:s})}}]),t}(),W=B;exports.default=W;
|
|
362
|
+
},{"@babel/runtime/helpers/asyncToGenerator":"agGE","@babel/runtime/helpers/defineProperty":"IxO8","@babel/runtime/helpers/toConsumableArray":"Fhqp","@babel/runtime/helpers/classCallCheck":"fcMS","@babel/runtime/helpers/createClass":"P8NW","@babel/runtime/regenerator":"PMvg","copy-to-clipboard":"xbqV","../../../constants/layerTypes":"aJRz","../../../lib/style":"vgU2","../../../lib/util":"PesM","../templates/story":"fRik","../../../components/BottomSheet":"l2Mf","../../../constants/events":"d0lR","../../../constants/directions":"w67G","../../../service":"hs1C","../../../lib/proxy":"qmVm","../../../layers/BlankStory":"ODzA","../../../layers/ImageCTA":"J7D7","../../../layers/CTA":"lS5I","../../../layers/Poll":"fJSh","../../../layers/Rating":"raea","../../../layers/Emoji":"GGza","../../../layers/Quiz":"lrR5","../../../layers/Countdown":"YoYr","../../../layers/Question":"KeqT","../../../layers/Media":"VEUS","../../../layers/ProductCard":"ldNI","../../../layers/ProductCatalog":"rFjg","../../../layers/ProductTag":"cjPL","../../../layers/EmbedCode":"QZzK","../../../layers/PromoCode":"N5Sp","../../../layers/ImageQuiz":"Mxyn","../../../layers/Text":"youg"}],"EpxL":[function(require,module,exports) {
|
|
363
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var t=r(require("@babel/runtime/helpers/classCallCheck")),e=r(require("@babel/runtime/helpers/createClass"));function r(t){return t&&t.__esModule?t:{default:t}}var n=function(){function r(e){var n=e.dom;(0,t.default)(this,r),this.countDom_=n.querySelector(".storyly__story-product-cart-count span"),this.currNum_=0}return(0,e.default)(r,[{key:"scrollNumber_",value:function(t){this.countDom_.querySelectorAll("span[data-value]").forEach(function(e,r){e.style.transform="translateY(-".concat(100*parseInt(t[r],10),"%)")})}},{key:"addDigit_",value:function(t){var e=Array(10).join(0).split(0).map(function(t,e){return"<span>".concat(e,"</span>")}).join("");this.countDom_.insertAdjacentHTML("beforeend",'<span style="transform: translateY(-100%)" data-value="'.concat(t,'">\n ').concat(e,"\n </span>")),this.countDom_.lastElementChild.className="visible"}},{key:"removeDigit_",value:function(){var t=this.countDom_.lastElementChild;t.classList.remove("visible"),t.remove()}},{key:"setup",value:function(t){var e=this,r=t.toString().split("");r.forEach(function(){return e.addDigit_("0",!0)}),this.scrollNumber_(r),this.currNum_=t}},{key:"update",value:function(t){for(var e=t.toString().split(""),r=this.currNum_.toString().split(""),n=r.length-e.length;n>0;n-=1)this.removeDigit_();for(var a=e.length-r.length;a>0;a-=1)this.addDigit_(e[a]);this.scrollNumber_(e),this.currNum_=t}}]),r}(),a=n;exports.default=a;
|
|
364
|
+
},{"@babel/runtime/helpers/classCallCheck":"fcMS","@babel/runtime/helpers/createClass":"P8NW"}],"vrqB":[function(require,module,exports) {
|
|
365
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var t=require("../../../../lib/icons"),o=require("../../../../lib/util"),r=function(r){var n=r.instanceId,c=r.isModernLayout;return"\n\t<div class='storyly__story-product-cart-container ".concat(c?"modern-layout-product-cart":"",'\'>\n\t\t<div class="storyly__story-product-cart" nocount="true">\n\t\t\t<div class="storyly__story-product-cart-icon">').concat((0,t.shoppingBagIcon)("#212121"),'</div>\n\t\t\t<div class="storyly__story-product-cart-count" style="font-family: ').concat((0,o.getFontFamily)({instanceId:n}),'"><span class="count-number"></span></div>\n\t\t</div>\n\t</div>')};exports.default=r;
|
|
366
|
+
},{"../../../../lib/icons":"irwm","../../../../lib/util":"PesM"}],"PIHR":[function(require,module,exports) {
|
|
367
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var t=require("../../../../lib/util"),e=function(e){var r=e.instanceId,o=e.isModernLayout;return'\n<div style="font-family: '.concat((0,t.getFontFamily)({instanceId:r}),";\" class='storyly__story-product-cart-items-container ").concat(o?"modern-layout-product-cart-container":"",'\'>\n <ul class="storyly__story-product-cart-items">\n </ul>\n</div>')};exports.default=e;
|
|
368
|
+
},{"../../../../lib/util":"PesM"}],"TTLt":[function(require,module,exports) {
|
|
369
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var t=require("../../../../lib/icons"),r=require("../../../../lib/util"),c=function(t){return'<p class="storyly__story-product-cart-product-variants"> '.concat(t.map(function(t){var c=t.v;return(0,r.isHexColor)(c)?'<span style="background-color: '.concat(c,'" data-type="bg"></span>'):"<span>".concat(c,"</span>")}).join(", "),"\n </p>")},n=function(t){return'\n <div class="storyly__story-product-cart-product-price">\n '.concat(!t.sales_price&&t.price?'<span class="storyly__story-product-cart-product-price-current">'.concat((0,r.currencyFormatter)(t.price,t.price_currency),"</span>"):"","\n ").concat(t.sales_price&&t.price?'\n <span class="storyly__story-product-cart-product-price-sales">'.concat((0,r.currencyFormatter)(t.price,t.price_currency),'</span>\n <span class="storyly__story-product-cart-product-price-current">').concat((0,r.currencyFormatter)(t.sales_price,t.price_currency),"</span>\n "):"","\n </div>\n")},o=function(r){return'\n<li class="storyly__story-product-cart-item">\n <div class="storyly__story-product-cart-product-container" data-product-id="'.concat(r.product_id,'">\n <div class="storyly__story-product-cart-product-image">\n <img src="').concat(r.image_urls[0],'" alt="').concat(r.title,'">\n </div>\n <div class="storyly__story-product-cart-product-info">\n <div class="storyly__story-product-cart-product-variants-container">\n <div class="storyly__story-product-cart-product-title"><h3>').concat(r.title,"</h3></div>\n ").concat(c(r.variant),'\n </div>\n <div class="storyly__story-product-cart-product-counter">\n ').concat(n(r),'\n <div class="counter">\n <button data-product-id="').concat(r.product_id,'" class="counter-button" data-type="minus">\n <svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path d="M3.3335 8H12.6668" stroke="#242450" stroke-width="1.48201" stroke-linecap="round" stroke-linejoin="round"/>\n </svg>\n </button>\n <span class="counter-count">').concat(r.quantity,'</span>\n <button data-product-id="').concat(r.product_id,'" class="counter-button" data-type="plus">\n <svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path fill-rule="evenodd" clip-rule="evenodd" d="M8.74106 3.33329C8.74106 2.92405 8.4093 2.59229 8.00005 2.59229C7.5908 2.59229 7.25904 2.92405 7.25904 3.33329V7.25904H3.33366C2.92441 7.25904 2.59265 7.5908 2.59265 8.00005C2.59265 8.40929 2.92441 8.74105 3.33366 8.74105H7.25904V12.6666C7.25904 13.0759 7.5908 13.4076 8.00005 13.4076C8.4093 13.4076 8.74106 13.0759 8.74106 12.6666V8.74105H12.667C13.0762 8.74105 13.408 8.40929 13.408 8.00005C13.408 7.5908 13.0762 7.25904 12.667 7.25904H8.74106V3.33329Z" fill="#242450"/>\n </svg>\n </button>\n </div>\n </div>\n </div>\n </div>\n <div class="storyly__story-product-cart-product-delete">\n <div>\n ').concat((0,t.trashIcon)(),"\n </div>\n </div>\n</li>")};exports.default=o;
|
|
370
|
+
},{"../../../../lib/icons":"irwm","../../../../lib/util":"PesM"}],"laCG":[function(require,module,exports) {
|
|
371
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var t=require("../../../../lib/icons"),r=require("../../../../lib/util"),c=function(c){var o=c.instanceId,n=c.price,a=c.sales_price,e=c.price_currency,s=c.isModernLayout;return"\n<div class='storyly__story-product-cart-items-footer ".concat(s?"modern-layout-product-cart":"","' style=\"font-family: ").concat((0,r.getFontFamily)({instanceId:o}),'">\n <div class="storyly__story-product-cart-items-footer-price">\n <p>Total</p>\n <div class="total-price-container">\n ').concat(!a&&n?'<span class="total_price">'.concat((0,r.currencyFormatter)(n,e),"</span>"):"","\n ").concat(a&&n?'\n <span class="total_price">'.concat((0,r.currencyFormatter)(a,e),'</span>\n <span class="total_sales_price">').concat((0,r.currencyFormatter)(n,e),"</span>\n "):"",'\n </div>\n\n </div>\n <button class="storyly__story-product-cart-items-footer-button"><span>Go to checkout</span> ').concat((0,t.arrowRight)("#FFFFFF"),"</button>\n</div>")};exports.default=c;
|
|
372
|
+
},{"../../../../lib/icons":"irwm","../../../../lib/util":"PesM"}],"yyQY":[function(require,module,exports) {
|
|
373
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var t=require("../../../../lib/icons"),o=require("../../../../lib/util"),r=function(r){return'\n<div class="storyly__story-product-cart-modal" style="font-family: '.concat((0,o.getFontFamily)({instanceId:r}),'">\n <div class="storyly__story-product-cart-modal-overlay"></div>\n <div class="storyly__story-product-cart-modal-content">\n <div class="storyly__story-product-cart-modal-message">\n <div class="storyly__story-product-cart-modal-delete-icon">').concat((0,t.trashIcon)("#212121"),'</div>\n <div>Are you sure you want to remove this item?</div>\n </div>\n <div class="storyly__story-product-cart-modal-actions">\n <button class="storyly__story-product-cart-modal-cancel">Cancel</button>\n <button class="storyly__story-product-cart-modal-remove">Remove</button>\n </div>\n </div>\n</div>\n')};exports.default=r;
|
|
374
|
+
},{"../../../../lib/icons":"irwm","../../../../lib/util":"PesM"}],"WMYh":[function(require,module,exports) {
|
|
375
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"CartButton",{enumerable:!0,get:function(){return e.default}}),Object.defineProperty(exports,"Container",{enumerable:!0,get:function(){return t.default}}),Object.defineProperty(exports,"Content",{enumerable:!0,get:function(){return r.default}}),Object.defineProperty(exports,"Footer",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(exports,"Modal",{enumerable:!0,get:function(){return u.default}});var e=o(require("./CartButton")),t=o(require("./Container")),r=o(require("./Content")),n=o(require("./Footer")),u=o(require("./Modal"));function o(e){return e&&e.__esModule?e:{default:e}}
|
|
376
|
+
},{"./CartButton":"vrqB","./Container":"PIHR","./Content":"TTLt","./Footer":"laCG","./Modal":"yyQY"}],"HCYR":[function(require,module,exports) {
|
|
377
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var t=require("../../../../lib/icons"),o=require("../../../../lib/util"),s=function(s){var e=s.instanceId,n=s.isModernLayout;return'\n <div \n style="font-family: '.concat((0,o.getFontFamily)({instanceId:e}),"\"\n class='storyly__story-product-cart-empty-state ").concat(n?"modern-layout-empty-state":"",'\'\n >\n <div class="storyly__story-product-cart-empty-state-body">\n <div class="storyly__story-product-cart-empty-state-body-icon">\n ').concat((0,t.shoppingBagIcon)("#212121"),'\n </div>\n <div class="storyly__story-product-cart-empty-state-body-text">\n <p>Your cart is empty</p>\n </div>\n </div>\n <div class="storyly__story-product-cart-empty-state-button">\n <button>Continue with stories</button>\n </div>\n </div>')};exports.default=s;
|
|
378
|
+
},{"../../../../lib/icons":"irwm","../../../../lib/util":"PesM"}],"TJeL":[function(require,module,exports) {
|
|
379
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var t=f(require("@babel/runtime/helpers/defineProperty")),e=f(require("@babel/runtime/helpers/slicedToArray")),r=f(require("@babel/runtime/helpers/classCallCheck")),n=f(require("@babel/runtime/helpers/createClass")),i=f(require("@babel/runtime/helpers/inherits")),o=f(require("@babel/runtime/helpers/possibleConstructorReturn")),s=f(require("@babel/runtime/helpers/getPrototypeOf")),a=require("../../constants/events"),c=f(require("../../constants/layouts")),u=f(require("../../layers/base")),l=require("../../lib/util"),d=f(require("../Alert")),h=f(require("../LoadingSpinner")),_=f(require("./countUpdater")),p=require("./template"),y=f(require("./template/EmptyState"));function f(t){return t&&t.__esModule?t:{default:t}}function v(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(e){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?v(Object(n),!0).forEach(function(r){(0,t.default)(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):v(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function g(t){var e=b();return function(){var r,n=(0,s.default)(t);if(e){var i=(0,s.default)(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return(0,o.default)(this,r)}}function b(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}var E=function(t){(0,i.default)(s,t);var o=g(s);function s(t){var e,n=t.parentDom,i=t.instanceId;return(0,r.default)(this,s),(e=o.call(this,{storyDom:n,instanceId:i})).isDragging_=!1,e.initialX_=null,e.selectedProducts_=[],e.loading_=!1,e.clickedButton_=null,e.deletedProduct_=null,e.isCartActive_=e.instanceClass.isStorylyCartActive,e.attachCallbacksToElement_(),e.isCartActive_&&e.generateComponentAndAppendToPage((0,p.CartButton)({instanceId:e.instanceId,isModernLayout:e.globalInstanceData.layout===c.default.MODERN})).then(function(t){e.dom_=t,e.init_()}),e}return(0,n.default)(s,[{key:"init_",value:function(){this.eventListeners_(),this.countUpdater=new _.default({dom:this.dom_}),this.countUpdater.setup(this.selectedProducts_.length),this.refresh()}},{key:"attachCallbacksToElement_",value:function(){this.onCartOpen_=this.onCartOpen_.bind(this),this.onProductCountChange_=this.onProductCountChange_.bind(this),this.updateProducts=this.updateProducts.bind(this),this.onError_=this.onError_.bind(this),this.onSuccess_=this.onSuccess_.bind(this),this.handleEvent_=this.handleEvent_.bind(this)}},{key:"eventListeners_",value:function(){(0,l.setClickEventListener)(this.dom_.parentElement,this.onCartOpen_),(0,l.stopEventBubbling)(this.dom_.parentElement,"touchstart"),(0,l.stopEventBubbling)(this.dom_.parentElement,"touchend"),(0,l.stopEventBubbling)(this.dom_.parentElement,"touchmove")}},{key:"onCartOpen_",value:function(){var t=this;if(this.handleEvent_(a.LayerEventTypes.StoryCartViewClicked),this.selectedProducts_.length){this.container_=this.generateHtmlFromTemplate((0,p.Container)({instanceId:this.instanceId,isModernLayout:this.globalInstanceData.layout===c.default.MODERN})),this.footer_=this.generateHtmlFromTemplate((0,p.Footer)({instanceId:this.instanceId,price:this.price_,sales_price:this.sales_price,price_currency:this.price_currency,isModernLayout:this.globalInstanceData.layout===c.default.MODERN})),this.selectedProducts_.forEach(function(r){var n=t.generateHtmlFromTemplate((0,p.Content)(r)),i=n.querySelector(".storyly__story-product-cart-product-container"),o=n.querySelector(".storyly__story-product-cart-product-delete"),s=n.querySelectorAll(".counter-button"),a=(0,e.default)(s,2),c=a[0],u=a[1];(0,l.setClickEventListener)(c,function(e){return t.onProductCountChange_(e,r)}),(0,l.setClickEventListener)(u,function(e){return t.onProductCountChange_(e,r)}),t.onSwipeLeft_(i,o),t.container_.firstElementChild.appendChild(n)});var r=this.footer_.querySelector("button");(0,l.setClickEventListener)(r,function(){t.handleEvent_(a.LayerEventTypes.StoryCheckoutButtonClicked)});var n=this.container_.querySelector(".storyly__story-product-cart-items");this.alert_=this.generateHtmlFromTemplate((0,d.default)({text:"We're sorry to inform you that the item you're interested in purchasing is currently out of stock."}));var i=this.alert_.querySelector(".storyly__alert-box-close");(0,l.setClickEventListener)(i,function(){return t.alert_.classList.remove("active")}),n.prepend(this.alert_),(0,l.createAndDispatchEvent)(this.dom_,(0,l.openProductDetail)(this.instanceId),{body:this.container_,footer:this.footer_})}else this.renderEmptyState_()}},{key:"onSwipeLeft_",value:function(t){var e=this;t.addEventListener("touchstart",function(t){e.isDragging_=!0,e.initialX_=t.touches[0].clientX}),t.addEventListener("touchend",function(r){e.isDragging_&&(r.changedTouches[0].clientX-e.initialX_<-72?e.onDeleteModalOpen_(t):(e.setStyle(t,"transition","transform 0.3s cubic-bezier(0.65, 0.05, 0.36, 1) 0s"),e.setStyle(t,"transform","translateX(0)")));e.isDragging_=!1,e.initialX_=null}),t.addEventListener("touchmove",function(r){if(e.isDragging_){var n=r.touches[0].clientX-e.initialX_;if(n<0&&n>-72){var i=Math.max(n,-t.offsetWidth);e.setStyle(t,"transition","unset"),e.setStyle(t,"transform","translateX(".concat(i,"px)"))}}})}},{key:"onDeleteModalOpen_",value:function(t){var e=this,r=this.storyDom_.getRootNode().querySelector(".storyly__group-container"),n=this.generateHtmlFromTemplate((0,p.Modal)(this.instanceId)),i=n.querySelector(".storyly__story-product-cart-modal-cancel"),o=n.querySelector(".storyly__story-product-cart-modal-remove");(0,l.stopEventBubbling)(n,"touchstart"),(0,l.stopEventBubbling)(n,"touchend"),(0,l.stopEventBubbling)(n,"touchmove"),r.appendChild(n),(0,l.setClickEventListener)(i,function(){return e.onDeleteModalCancel_(r,n,t)}),(0,l.setClickEventListener)(o,function(){return e.onDeleteModalConfirm_(r,n,t)})}},{key:"onDeleteModalCancel_",value:function(t,e,r){this.onFadeOut_(t,e),this.setStyle(r,"transition","transform 0.3s cubic-bezier(0.65, 0.05, 0.36, 1) 0s"),this.setStyle(r,"transform","translateX(0)")}},{key:"onDeleteModalConfirm_",value:function(t,e,r){this.onFadeOut_(t,e);var n=this.selectedProducts_.find(function(t){return String(t.product_id)===r.dataset.productId}),i=this.instanceClass.getActiveStory_(),o={group:this.instanceClass.getActiveGroupWithoutInstance(),story_id:i.story_id,alt_text:i.alt_text,is_sharable:i.is_sharable,product:m(m({},n),{},{quantity:0}),onError:this.onError_,onSuccess:this.onSuccess_};this.handleEvent_(a.LayerEventTypes.StoryProductRemoved),this.deletedProduct_=r.parentElement,(0,l.createAndDispatchEvent)(this.storyDom_,"onCustomerEvent",{eventName:a.CustomerEventTypes.onStoryProductAdded,params:o})}},{key:"onError_",value:function(t){var e=this,r=t.message;setTimeout(function(){return clearTimeout(e.timeout_)},0),this.container_.querySelector(".storyly__story-product-cart-items").scrollTo(0,0),this.alert_.querySelector("p").innerHTML=r,this.alert_.classList.add("active"),this.onLoadingFalse_()}},{key:"onSuccess_",value:function(t){var e=this;setTimeout(function(){return clearTimeout(e.timeout_)},0),this.instanceClass.setProductCartItems(t)}},{key:"onFadeOut_",value:function(t,e){e.animate([{opacity:1},{opacity:0}],{duration:300,iterations:1,fill:"forwards"}),setTimeout(function(){return t.removeChild(e)},300)}},{key:"onProductCountChange_",value:function(t,e){var r=this;if(!this.loading_){t.stopPropagation(),t.stopImmediatePropagation();var n=t.target,i="minus"===n.dataset.type,o=n.parentElement.querySelector(".counter-count"),s=Number(o.innerHTML);if(1===s&&i){var c=n.closest(".storyly__story-product-cart-product-container");this.onDeleteModalOpen_(c)}else{i?s-=1:s+=1,this.loading_=!0;var u=this.generateHtmlFromTemplate((0,h.default)(24));this.clickedButton_=n,n.replaceWith(u);var d=this.instanceClass.getActiveStory_(),_={group:this.instanceClass.getActiveGroupWithoutInstance(),story_id:d.story_id,alt_text:d.alt_text,is_sharable:d.is_sharable,product:m(m({},e),{},{quantity:s}),onError:this.onError_,onSuccess:this.onSuccess_};this.handleEvent_(a.LayerEventTypes.StoryProductUpdated,{product:m(m({},e),{},{quantity:s}),change:i?-1:1}),(0,l.createAndDispatchEvent)(this.storyDom_,"onCustomerEvent",{eventName:a.CustomerEventTypes.onStoryProductAdded,params:_}),this.timeout_=setTimeout(function(){r.onError_({message:"Something went wrong!"})},5e3)}}}},{key:"renderEmptyState_",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],r=this.generateHtmlFromTemplate((0,y.default)({instanceId:this.instanceId,isModernLayout:this.globalInstanceData.layout===c.default.MODERN})),n=this.generateHtmlFromTemplate('<div style="display: none;"></div>');if(this.globalInstanceData.layout===c.default.MODERN){var i=this.generateHtmlFromTemplate('<div class="storyly__story-product-cart-empty-state-button modern-layout-footer-button">\n <button>Continue with stories</button>\n </div>'),o=r.querySelector(".storyly__story-product-cart-empty-state-button");r.removeChild(o),(0,l.createAndDispatchEvent)(this.dom_,(0,l.openProductDetail)(this.instanceId),{body:r,footer:i,rerender:e}),(0,l.setClickEventListener)(i,function(){(0,l.createAndDispatchEvent)(t.storyDom_,(0,l.openProductDetail)(t.instanceId))})}else{(0,l.createAndDispatchEvent)(this.dom_,(0,l.openProductDetail)(this.instanceId),{body:r,footer:n,rerender:e});var s=r.querySelector(".storyly__story-product-cart-empty-state-button button");(0,l.setClickEventListener)(s,function(){(0,l.createAndDispatchEvent)(t.storyDom_,(0,l.openProductDetail)(t.instanceId))})}}},{key:"onLoadingFalse_",value:function(){var t=this;if(this.clickedButton_){var e=this.container_.querySelector(".storyly-spinner-container"),r=e.nextElementSibling,n=e.previousElementSibling,i=r||n,o=this.selectedProducts_.find(function(e){return String(e.product_id)===t.clickedButton_.dataset.productId});i.innerHTML=o.quantity,e.replaceWith(this.clickedButton_),this.loading_=!1,this.clickedButton_=null}}},{key:"onUpdatePrice_",value:function(){if(this.footer_){var t=this.footer_.querySelector(".total_price"),e=this.footer_.querySelector(".total_sales_price");this.sales_price&&e&&t?(t.innerHTML=(0,l.currencyFormatter)(this.sales_price,this.price_currency),e.innerHTML=(0,l.currencyFormatter)(this.price_,this.price_currency)):t&&(t.innerHTML=(0,l.currencyFormatter)(this.price_,this.price_currency))}}},{key:"updateProducts",value:function(t){var e=this;if(this.isCartActive_){var r,n=t.products,i=t.price,o=t.sales_price,s=t.price_currency;if(this.selectedProducts_=n,this.price_=i,this.sales_price=o,this.price_currency=s,this.onUpdatePrice_(),this.countUpdater.update(n.length),!n.length&&this.deletedProduct_)return this.renderEmptyState_(!0),void this.dom_.setAttribute("nocount","true");if(n.length)this.dom_.removeAttribute("nocount"),null===(r=this.alert_)||void 0===r||r.classList.remove("active");if(this.onLoadingFalse_(),this.deletedProduct_){var a=this.deletedProduct_.offsetHeight,c=[{opacity:1,height:"".concat(a,"px")},{opacity:0,height:0}];this.deletedProduct_.animate(c,{duration:300,iterations:1,fill:"forwards"}),setTimeout(function(){e.container_.firstElementChild.removeChild(e.deletedProduct_),e.deletedProduct_=null},300)}}}},{key:"refresh",value:function(){if(this.isCartActive_){var t=this.instanceClass.storylyCheckoutProducts,e=t.products,r=t.price,n=t.sales_price,i=t.price_currency;this.selectedProducts_=e,this.price_=r,this.sales_price=n,this.price_currency=i,this.onUpdatePrice_(),this.selectedProducts_.length&&(this.dom_.removeAttribute("nocount"),this.countUpdater.update(this.selectedProducts_.length))}}},{key:"handleEvent_",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=this.instanceClass.getActiveStory_(),n=m({event_type:t,story_group_id:+this.instanceClass.getActiveGroupWithoutInstance().group_id,story_id:+r.story_id,story_group_index:null,story_index:null,story_group_type:"default",story_interactive_x:null,story_interactive_y:null,duration:null,watch_length:null,event_time:Date.now()},e);this.api.sendEvent(n)}}]),s}(u.default),C=E;exports.default=C;
|
|
380
|
+
},{"@babel/runtime/helpers/defineProperty":"IxO8","@babel/runtime/helpers/slicedToArray":"HETk","@babel/runtime/helpers/classCallCheck":"fcMS","@babel/runtime/helpers/createClass":"P8NW","@babel/runtime/helpers/inherits":"d4H2","@babel/runtime/helpers/possibleConstructorReturn":"pxk2","@babel/runtime/helpers/getPrototypeOf":"UJE0","../../constants/events":"d0lR","../../constants/layouts":"kUgL","../../layers/base":"skR7","../../lib/util":"PesM","../Alert":"tk2H","../LoadingSpinner":"hb2d","./countUpdater":"EpxL","./template":"WMYh","./template/EmptyState":"HCYR"}],"LuBi":[function(require,module,exports) {
|
|
381
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var t=require("../../../lib/util"),n=new URLSearchParams(window.location.search),a=function(a,e,o){var i=a.title,s=a.icon_image_url,r=a.ad;return'\n <div class="storyly__story-header">\n <div class="storyly__story-info">\n <div\n style="\n font-family: '.concat((0,t.getFontFamily)({font:"Storyly-Inter",instanceId:e}),";\n ").concat(n.get("storylyMail")||o.inboxStory?"visibility: hidden":"",'\n "\n class="storyly__sg-info"\n title="').concat(i.length>25?i:"",'">\n ').concat(r?'<div class="ad-group-icon"></div>':'<img aria-hidden="true" src='.concat(s,' alt="Story Group Icon" />'),'\n <h4 tabindex="').concat(r?"-1":"15",'">').concat(i,'</h4>\n </div>\n <div class="storyly__story-actions">\n <button type="button" aria-label="Share" data-type="share" tabindex="25" class="action icon share" hidden></button>\n <button type="button" aria-label="Sound off" aria-pressed="false" data-type="sound" tabindex="30" class="action icon sound-off" hidden></button>\n <button type="button" aria-label="Pause" aria-pressed="false" data-type="play-pause" tabindex="35" class="action icon pause" hidden></button>\n </div>\n </div>\n </div>\n')};exports.default=a;
|
|
382
|
+
},{"../../../lib/util":"PesM"}],"vAQQ":[function(require,module,exports) {
|
|
383
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=function(){return'\n <div class="progress">\n <span></span>\n </div>\n'};exports.default=e;
|
|
384
|
+
},{}],"wvHA":[function(require,module,exports) {
|
|
385
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=g(require("@babel/runtime/helpers/defineProperty")),t=g(require("@babel/runtime/helpers/slicedToArray")),r=g(require("@babel/runtime/helpers/asyncToGenerator")),s=g(require("@babel/runtime/helpers/classCallCheck")),o=g(require("@babel/runtime/helpers/createClass")),n=g(require("@babel/runtime/regenerator")),i=g(require("../../../constants/playmode")),a=require("../../../lib/style"),d=require("../../../lib/util"),u=g(require("../../../lib/storage")),y=g(require("../Story")),c=g(require("../../../components/StoryCart")),l=g(require("../templates/storyHeader")),h=g(require("../templates/storyProgress")),p=require("../../../constants/events"),_=g(require("../../../constants/directions")),v=g(require("../../../lib/proxy"));function g(e){return e&&e.__esModule?e:{default:e}}function f(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,s)}return r}function S(t){for(var r=1;r<arguments.length;r++){var s=null!=arguments[r]?arguments[r]:{};r%2?f(Object(s),!0).forEach(function(r){(0,e.default)(t,r,s[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(s)):f(Object(s)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(s,e))})}return t}var I=function(){function e(t,r,o){(0,s.default)(this,e),this.group_=t,this.key_=r,this.storyInstances_=[],this.progressDoms_=[],this.activeStoryIndex_=0,this.lastSeenStoryIndex_=0,this.loadded_=!1,this.instanceId_=o,this.attachCallbacksToElement_(),this.setEventListeners_(),u.default.setInstanceId(this.instanceId_)}return(0,o.default)(e,[{key:"attachCallbacksToElement_",value:function(){this.nextStory=this.nextStory.bind(this),this.prevStory=this.prevStory.bind(this),this.hide=this.hide.bind(this)}},{key:"setEventListeners_",value:function(){var e=this;window.addEventListener("resize",(0,d.debounce)(function(){var t=e.storiesContainer_.childNodes[e.activeStoryIndex_];if(t){var r=t.offsetWidth,s=window.innerWidth/2-r/2;e.activeStoryCenteredPosition_=s,e.renderStories_()}}))}},{key:"render",value:function(){this.groupWrapper_=document.createElement("div"),(0,a.setClass)(this.groupWrapper_,["storyly__story-group","swiper-slide"]),this.groupWrapper_.ariaHidden="true",(0,d.setAttribute)(this.groupWrapper_,"role","presentation"),this.groupWrapper_.dataset.id=this.group_.group_id,this.storiesContainer_=document.createElement("div"),(0,a.setClass)(this.storiesContainer_,["storyly__stories-container"]),this.groupWrapper_.appendChild(this.storiesContainer_);var e=v.default.getNodeByInstanceId(this.instanceId_).getDataFromGlobal().globalInstanceData;return this.globalInstanceData=e,Promise.resolve(this.groupWrapper_)}},{key:"setStoryInstancesAndListeners_",value:function(){var e=this;this.group_.stories.forEach(function(t,r){e.storyInstances_[r]=new y.default({story:t,key:r,group:e.group_,storiesContainer:e.storiesContainer_,groupWrapper:e.groupWrapper_,progressDoms:e.progressDoms_,instanceId:e.instanceId_})}),this.storiesContainer_.childNodes.forEach(function(t,r){t.addEventListener("click",function(){var s=t.classList;s.contains("storyly__story-passive")&&(s.contains("storyly__story-next-story")&&((0,d.createAndDispatchEvent)(e.groupWrapper_,"onNextStory",{gesture:"".concat(p.GestureTypes.StoryClick,"_").concat(r-e.activeStoryIndex_),storyIndex:r}),e.handleProgressBarByParameters_(r)),s.contains("storyly__story-prev-story")&&((0,d.createAndDispatchEvent)(e.groupWrapper_,"onPrevStory",{gesture:"".concat(p.GestureTypes.StoryClick,"_").concat(e.activeStoryIndex_-r),storyIndex:r}),e.handleProgressBarByParameters_(r)))})})}},{key:"renderStoryGroupHeader_",value:function(){var e,t=(0,d.generateHtmlFromTemplate)((0,l.default)(this.group_,this.instanceId_,this.globalInstanceData));null===(e=this.groupWrapper_.querySelector(".storyly__story-header"))||void 0===e||e.remove(),this.groupWrapper_.prepend(t),(0,d.stopEventBubbling)(t),this.renderProgressLines_()}},{key:"renderProgressLines_",value:function(){var e=document.createElement("div");(0,a.setClass)(e,"storyly__story-group-progress-bar");var t=document.createElement("div");(0,a.setClass)(t,"progress-wrapper"),e.appendChild(t);for(var r=this.group_.stories.length,s=0;s<r;s+=1){var o=(0,d.generateHtmlFromTemplate)((0,h.default)());s<this.activeStoryIndex_&&(0,a.setClass)(o,"seen"),t.appendChild(o),this.progressDoms_.push(o)}this.groupWrapper_.prepend(e)}},{key:"renderProductCart_",value:function(){var e=(0,r.default)(n.default.mark(function e(){var r,s,o,i;return n.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:r=(0,d.getProductLayers)(this.group_),s=(0,t.default)(r,1),o=s[0],i=this.groupWrapper_.querySelector(".storyly__story-actions"),o.length&&(this.storyCart=new c.default({instanceId:this.instanceId_,parentDom:i}));case 3:case"end":return e.stop()}},e,this)}));return function(){return e.apply(this,arguments)}}()},{key:"renderStoryNavigations_",value:function(){var e=this,t=(0,d.generateHtmlFromTemplate)('<button class="prev-story-button" aria-label="Previous story in a current group" tabindex="10"></button>'),r=(0,d.generateHtmlFromTemplate)('<button class="next-story-button" aria-label="Next story in a current group" tabindex="40"></button>'),s=this.globalInstanceData.direction;t.addEventListener("click",function(t){t.preventDefault(),(0,d.createAndDispatchEvent)(e.groupWrapper_,s===_.default.RTL?"onNextStory":"onPrevStory",{gesture:p.GestureTypes.Arrow})}),r.addEventListener("click",function(t){t.preventDefault(),(0,d.createAndDispatchEvent)(e.groupWrapper_,s===_.default.RTL?"onPrevStory":"onNextStory",{gesture:p.GestureTypes.Arrow})}),this.groupWrapper_.appendChild(t),this.groupWrapper_.appendChild(r)}},{key:"prevStory",value:function(e,t){var r=this;if(this.globalInstanceData.shareParams.playMode!==i.default.STORY||this.globalInstanceData.shareParams.group.group_id!==this.group_.group_id){var s=this.storyInstances_[this.activeStoryIndex_];if(0===this.activeStoryIndex_)return(0,d.createAndDispatchEvent)(this.groupWrapper_,"onPrevGroup",{gesture:t}),void(0!==this.key_&&s.hide({holdActive:!0,isBack:!0}));s.hide({isBack:!0}),this.storyState_().remove(),this.activeStoryIndex_=null!=e?e:this.activeStoryIndex_-1,this.lastSeenStoryIndex_=this.activeStoryIndex_,this.renderStories_().then(function(){r.storyInstances_[r.activeStoryIndex_].show(),(0,d.createAndDispatchEvent)(r.groupWrapper_,"onStoryImpression")})}else(0,d.createAndDispatchEvent)(this.groupWrapper_,"onCloseGroup",{gesture:t})}},{key:"nextStory",value:function(e,t){var r=this;if(this.globalInstanceData.shareParams.playMode!==i.default.STORY||this.globalInstanceData.shareParams.group.group_id!==this.group_.group_id){var s=this.storyInstances_[this.activeStoryIndex_];if(this.group_.stories.length-1===this.activeStoryIndex_)return this.storyState_().add(),(0,d.createAndDispatchEvent)(this.groupWrapper_,"onNextGroup",{gesture:t}),void s.hide({isBack:!0});s.hide(),this.activeStoryIndex_=null!=e?e:this.activeStoryIndex_+1,this.lastSeenStoryIndex_=this.activeStoryIndex_,this.storyState_().add(),this.renderStories_().then(function(){r.storyInstances_[r.activeStoryIndex_].show(),(0,d.createAndDispatchEvent)(r.groupWrapper_,"onStoryImpression"),(0,d.createAndDispatchEvent)(r.groupWrapper_,"onStoryComplete")})}else(0,d.createAndDispatchEvent)(this.groupWrapper_,"onCloseGroup",{gesture:t})}},{key:"renderStories_",value:function(){var e=this,t=this.globalInstanceData.direction===_.default.RTL?"right":"left";return this.storiesContainer_.childNodes.forEach(function(r,s){if(s<e.activeStoryIndex_){(0,a.removeClass)(r,"storyly__story-next-story"),(0,a.setClass)(r,["storyly__story-passive","storyly__story-prev-story"]),(0,d.setAttribute)(r,"tabindex","-1"),(0,d.setAttribute)(r,"aria-hidden","true");var o=r.offsetWidth;e.activeStoryIndex_-s==1?(0,a.setStyle)(r,[t,"".concat(e.activeStoryCenteredPosition_-o-54,"px")]):(0,a.setStyle)(r,[t,"".concat(e.activeStoryCenteredPosition_-o-54-(.6*o+20)*(e.activeStoryIndex_-s-1),"px")])}if(s>e.activeStoryIndex_)if((0,a.removeClass)(r,"storyly__story-prev-story"),(0,a.setClass)(r,["storyly__story-passive","storyly__story-next-story"]),(0,d.setAttribute)(r,"tabindex","-1"),(0,d.setAttribute)(r,"aria-hidden","true"),s-e.activeStoryIndex_==1)(0,a.setStyle)(r,[t,"".concat(e.activeStoryCenteredPosition_+e.activeStoryOffsetWidth_+54,"px")]);else{var n=r.offsetWidth;(0,a.setStyle)(r,[t,"".concat(e.activeStoryCenteredPosition_+e.activeStoryOffsetWidth_+54+(s-e.activeStoryIndex_-1)*(.6*n+20),"px")])}s===e.activeStoryIndex_&&((0,a.removeClass)(r,"storyly__story-passive"),(0,a.removeClass)(r,"storyly__story-next-story"),(0,a.removeClass)(r,"storyly__story-prev-story"),(0,d.setAttribute)(r,"aria-hidden","false"),(0,d.setAttribute)(r,"tabindex","20"),(0,a.setStyle)(r,[t,"".concat(e.activeStoryCenteredPosition_,"px")]))}),Promise.resolve()}},{key:"loadState_",value:function(){var e=this.storyState_().get();this.activeStoryIndex_=e}},{key:"storyState_",value:function(){var e=this,t=this.group_.group_id;return{add:function(){var r,s=u.default.getItemFromInstance("Storyly_story-state"),o=e.group_.stories[e.activeStoryIndex_];(null===(r=s[t])||void 0===r?void 0:r.some(function(e){return e.storyId===o.story_id}))||(s[t]?s[t].push({storyIndex:e.activeStoryIndex_,storyId:o.story_id,time:Date.now()}):s[t]=[{storyIndex:e.activeStoryIndex_,storyId:o.story_id,time:Date.now()}],u.default.setItemToInstance("Storyly_story-state",s))},remove:function(r){var s,o=u.default.getItemFromInstance("Storyly_story-state"),n=e.group_.stories[e.activeStoryIndex_].story_id;r&&(n=r);var i=null===(s=o[t])||void 0===s?void 0:s.filter(function(e){return e.storyId!==n});o[t]=null!=i?i:{},u.default.setItemToInstance("Storyly_story-state",o)},get:function(){var r=S({},u.default.getItemFromInstance("Storyly_story-state")||{}),s=0;if(r[t]){var o,n=!0,i=r[t].map(function(e){return e.storyId});return e.group_.stories.forEach(function(e,t){"number"!=typeof o?i.includes(e.story_id)||(o=t,n=!1):n=!1}),n?0:(s=o)>=0?s:(i.forEach(function(t){var r=e.group_.stories.findIndex(function(e){return e.story_id===t});r>=0?s=r:e.storyState_().remove(t)}),s)}return s}}}},{key:"handleProgressBarByParameters_",value:function(e){for(var t=this.progressDoms_.length,r=0;r<t;r+=1)r<e?(0,a.setClass)(this.progressDoms_[r],"seen"):(0,a.removeClass)(this.progressDoms_[r],"seen")}},{key:"sendGroupViewedEvent_",value:function(){var e=S({},this.group_);(0,d.createAndDispatchEvent)(this.groupWrapper_,"onCustomerEvent",{eventName:p.CustomerEventTypes.onStoryGroupViewed,params:e})}},{key:"show",value:function(){this.storyCart?this.storyCart.refresh():this.renderProductCart_(),this.sendGroupViewedEvent_(),this.storyInstances_[this.activeStoryIndex_].show(),this.storyState_().add()}},{key:"load",value:function(){if(!this.loadded_){this.loadState_(),this.storyInstances_=[],this.progressDoms_=[],this.renderStoryGroupHeader_(),this.renderStoryNavigations_(),this.setStoryInstancesAndListeners_();var e=window.innerHeight/100*85*9/16,t=window.innerWidth/2-e/2;this.activeStoryCenteredPosition_=t,this.activeStoryOffsetWidth_=e,this.renderStories_(),this.loadded_=!0}}},{key:"loadByParameters",value:function(e){this.storyInstances_.length||this.load(),(0,a.removeClass)(this.storyInstances_[this.activeStoryIndex_].storyDom_,"active"),this.activeStoryIndex_=e,this.loadedByParameters_=!0,this.handleProgressBarByParameters_(e),this.renderStories_()}},{key:"unLoad",value:function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).holdActive,t=void 0!==e&&e,r=this.group_.stories.length-1===this.activeStoryIndex_;this.storyInstances_[this.activeStoryIndex_].hide({holdActive:!r&&!this.loadedByParameters_&&t}),this.loadedByParameters_&&(this.loadState_(),this.loadedByParameters_=!1,this.handleProgressBarByParameters_(this.activeStoryIndex_),this.renderStories_()),r&&(this.activeStoryIndex_=0,this.progressDoms_.forEach(function(e){(0,a.removeClass)(e,"seen")}),this.renderStories_())}},{key:"hide",value:function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).holdActive,t=void 0!==e&&e;this.unLoad({holdActive:t}),this.globalInstanceData.shareParams={}}},{key:"getActiveStory",value:function(){var e,t=this.storyInstances_[this.activeStoryIndex_];return S(S({},null!==(e=this.group_.stories[this.activeStoryIndex_])&&void 0!==e?e:{}),{},{storyIndex:this.activeStoryIndex_,instance:t})}},{key:"getPrevStory",value:function(){var e,t=this.storyInstances_[this.activeStoryIndex_-1];return S(S({},null!==(e=this.group_.stories[this.activeStoryIndex_-1])&&void 0!==e?e:{}),{},{instance:t})}},{key:"setKey",value:function(e){this.key_=e}},{key:"isAllStoriesSeen",value:function(){return this.group_.stories.length-1===this.lastSeenStoryIndex_}},{key:"sendGroupClickedEvent",value:function(e,t){var r=S(S({},this.group_),{},{gesture_type:(0,d.getGestureType)(e)});(0,d.createAndDispatchEvent)(this.groupWrapper_,"onCustomerEvent",{eventName:"next"===t?p.CustomerEventTypes.onNextStoryGroup:p.CustomerEventTypes.onPreviousStoryGroup,params:r})}}]),e}(),m=I;exports.default=m;
|
|
386
|
+
},{"@babel/runtime/helpers/defineProperty":"IxO8","@babel/runtime/helpers/slicedToArray":"HETk","@babel/runtime/helpers/asyncToGenerator":"agGE","@babel/runtime/helpers/classCallCheck":"fcMS","@babel/runtime/helpers/createClass":"P8NW","@babel/runtime/regenerator":"PMvg","../../../constants/playmode":"Ooqf","../../../lib/style":"vgU2","../../../lib/util":"PesM","../../../lib/storage":"NA5d","../Story":"UKq4","../../../components/StoryCart":"TJeL","../templates/storyHeader":"LuBi","../templates/storyProgress":"vAQQ","../../../constants/events":"d0lR","../../../constants/directions":"w67G","../../../lib/proxy":"qmVm"}],"u7Oq":[function(require,module,exports) {
|
|
387
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var n=function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"prev";return'\n <div class="story-group-navigation-button '.concat(n,'-story-group">\n <h6 aria-hidden="true">').concat("prev"===n?"PREVIOUS STORIES":"NEXT STORIES",'</h6>\n <button \n class="story-group-navigation-button-container" \n tabindex="').concat("prev"===n?"5":"45",'"\n aria-label="').concat("prev"===n?"Previous group of story":"Next group of story",'"\n >\n <div class="story-group-navigation-button-container-icon">\n <span class="next-story-group-icon"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path d="M2.66663 8H13.3333" stroke="white" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>\n <path d="M9.33337 4L13.3334 8L9.33337 12" stroke="white" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>\n </svg></span>\n <span class="prev-story-group-icon"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path d="M13.3333 8H2.66659" stroke="white" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>\n <path d="M6.66675 4L2.66675 8L6.66675 12" stroke="white" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>\n </svg>\n </span>\n </div>\n <div class="story-group-navigation-button-container-inner">\n <div class="story-group-cover-image">\n <img src="" alt="story group cover image" aria-hidden="true" />\n </div>\n <div class="story-group-title">\n <span></span>\n </div>\n </div>\n </button>\n </div>\n ')};exports.default=n;
|
|
388
|
+
},{}],"KwS7":[function(require,module,exports) {
|
|
389
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var t=function(){return'\n <div class="storyly__keyboard-shortcuts" tabindex="-1" aria-hidden="true">\n <h6>KEYBOARD SHORTCUTS</h6>\n <ul id="storyly__keyboard-shortcuts-menu" class="storyly__keyboard-shortcuts-menu">\n <li class="storyly__keyboard-shortcuts-menu-item" role="menuitem" tabindex="51" aria-label="Right Arrow for Next Story">\n <span class="storyly__keyboard-shortcuts-menu-item-icon">\n <svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path d="M2.66663 8H13.3333" stroke="white" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>\n <path d="M9.33337 4L13.3334 8L9.33337 12" stroke="white" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>\n </svg>\n </span>\n <span>Next story</span>\n </li>\n <li class="storyly__keyboard-shortcuts-menu-item" role="menuitem" tabindex="51" aria-label="Left Arrow for Previous Story">\n <span class="storyly__keyboard-shortcuts-menu-item-icon">\n <svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path d="M13.3333 8H2.66659" stroke="white" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>\n <path d="M6.66675 4L2.66675 8L6.66675 12" stroke="white" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>\n </svg>\n </span>\n <span>Previous story</span>\n </li>\n <li class="storyly__keyboard-shortcuts-menu-item" role="menuitem" tabindex="-1" aria-hidden="true">\n <span class="storyly__keyboard-shortcuts-menu-item-icon">\n <svg width="23" height="6" viewBox="0 0 23 6" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path d="M1.95703 4.39844C2.67969 4.39844 3.21094 4.22656 3.47656 3.96094C3.73828 3.69531 3.83984 3.41016 3.83984 3.08203C3.83984 2.75781 3.74609 2.49609 3.55469 2.30078C3.36328 2.10547 3.13281 1.97266 2.86328 1.90625C2.58984 1.83984 2.32031 1.78906 2.05078 1.75391C1.78125 1.71875 1.55469 1.66797 1.36328 1.59375C1.17188 1.52344 1.07812 1.41797 1.07812 1.27344C1.07812 1.01172 1.33203 0.878906 1.83984 0.878906C2.33594 0.878906 2.62891 1.03906 2.71875 1.35938H3.71875C3.69922 0.957031 3.52344 0.628906 3.19531 0.375C2.86719 0.125 2.42969 0 1.87891 0C1.30469 0 0.859375 0.117188 0.546875 0.351562C0.234375 0.589844 0.078125 0.886719 0.078125 1.24219C0.078125 1.52344 0.148438 1.75781 0.285156 1.94531C0.421875 2.13672 0.589844 2.26953 0.796875 2.34766C1 2.42578 1.22266 2.49219 1.46094 2.54688C1.69922 2.60547 1.91797 2.64453 2.125 2.66797C2.53125 2.71484 2.83984 2.84766 2.83984 3.08203C2.83984 3.375 2.55859 3.51953 2 3.51953C1.43359 3.52344 1.10156 3.32422 1 2.92188H0C0.0195312 3.32422 0.203125 3.67188 0.550781 3.96094C0.898438 4.25391 1.36719 4.39844 1.95703 4.39844Z" fill="white"/>\n <path d="M5.90903 5.92188V3.92188H5.94809C6.2645 4.23828 6.62388 4.39844 7.02622 4.39844C7.54575 4.39844 7.95981 4.21094 8.27622 3.83594C8.59262 3.46094 8.74887 2.91406 8.74887 2.19922C8.74887 1.48438 8.59262 0.941406 8.27622 0.5625C7.95981 0.1875 7.54575 0 7.02622 0C6.7645 0 6.53013 0.0625 6.32309 0.1875C6.11216 0.3125 5.97544 0.421875 5.90903 0.519531H5.86606L5.78794 0.0820312H4.94809V5.92188H5.90903ZM6.827 3.51953C6.24888 3.51953 5.86606 3.05469 5.86606 2.19922C5.86606 1.34375 6.24888 0.878906 6.827 0.878906C7.10434 0.878906 7.33481 0.992188 7.51841 1.22266C7.69809 1.45312 7.78794 1.77734 7.78794 2.19922C7.78794 2.62109 7.69809 2.94531 7.5145 3.17578C7.33091 3.40625 7.10434 3.51953 6.827 3.51953Z" fill="white"/>\n <path d="M11.2165 3.51953C10.736 3.51953 10.4978 3.35938 10.4978 3.03906C10.4978 2.71875 10.736 2.55859 11.2165 2.55859H12.2556V2.67969C12.2556 2.91016 12.1618 3.10547 11.9704 3.26953C11.779 3.4375 11.5251 3.51953 11.2165 3.51953ZM11.0563 4.39844C11.5915 4.39844 11.9899 4.19922 12.2556 3.80078H12.2946L12.4157 4.32031H13.2165V1.60156C13.2165 1.11328 13.0603 0.726562 12.7517 0.433594C12.4431 0.144531 12.0095 0 11.4548 0C10.9118 0 10.4938 0.125 10.2009 0.378906C9.90791 0.632812 9.73994 0.949219 9.69697 1.32031H10.6579C10.6774 1.20703 10.7595 1.10547 10.8962 1.01562C11.0329 0.925781 11.2087 0.878906 11.4157 0.878906C11.6657 0.878906 11.8688 0.945312 12.0251 1.07812C12.1774 1.21094 12.2556 1.37109 12.2556 1.55859V1.76172H11.2165C10.0876 1.76172 9.53681 2.25 9.53681 3.08203C9.53681 3.89844 10.0759 4.39844 11.0563 4.39844Z" fill="white"/>\n <path d="M16.2466 4.39844C17.2349 4.39844 17.9185 3.83594 18.1646 2.87891H17.2037C17.0474 3.28516 16.6958 3.51953 16.2466 3.51953C15.5865 3.51953 15.1646 3.05469 15.1646 2.19922C15.1646 1.34375 15.5865 0.878906 16.2466 0.878906C16.6958 0.878906 17.0435 1.11328 17.2037 1.51953H18.1646C17.9185 0.5625 17.2349 0 16.2466 0C15.6372 0 15.1451 0.199219 14.7701 0.59375C14.3912 0.992188 14.2037 1.52734 14.2037 2.19922C14.2037 2.87109 14.3912 3.40625 14.7701 3.80078C15.149 4.19922 15.6412 4.39844 16.2466 4.39844Z" fill="white"/>\n <path d="M20.9955 4.39844C21.5385 4.39844 21.9564 4.26172 22.2494 3.99219C22.5385 3.72266 22.7299 3.40625 22.8275 3.03906H21.8666C21.7064 3.35938 21.4018 3.51953 20.9525 3.51953C20.6439 3.51953 20.3978 3.42578 20.2143 3.23828C20.0307 3.05469 19.9174 2.8125 19.8744 2.51953H22.9525L22.9955 2.08203C22.9955 1.44531 22.8119 0.941406 22.4486 0.5625C22.0814 0.1875 21.5971 0 20.9955 0C20.351 0 19.8432 0.191406 19.4721 0.578125C19.101 0.964844 18.9135 1.50781 18.9135 2.19922C18.9135 2.89453 19.101 3.43359 19.4721 3.82031C19.8432 4.20703 20.351 4.39844 20.9955 4.39844ZM19.8744 1.83984C19.9682 1.25 20.3393 0.878906 20.9564 0.878906C21.5736 0.878906 21.9603 1.26172 22.0346 1.83984H19.8744Z" fill="white"/>\n </svg>\n </span>\n <span>Play/Pause</span>\n </li>\n <li class="storyly__keyboard-shortcuts-menu-item" role="menuitem" tabindex="51" aria-label="Escape key for close story">\n <span class="storyly__keyboard-shortcuts-menu-item-icon">\n <svg width="14" height="5" viewBox="0 0 14 5" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path d="M2.03125 4.39844C2.52734 4.39844 2.93359 4.27734 3.25 4.03125C3.56641 3.78906 3.78906 3.47266 3.91797 3.08203H2.91797C2.6875 3.39844 2.39453 3.55859 2.03906 3.55859C1.72266 3.55859 1.47266 3.46094 1.28125 3.26172C1.08984 3.06641 0.980469 2.80469 0.960938 2.48047H3.96094L4 2.08203C4 1.49219 3.82031 1 3.46484 0.597656C3.10938 0.199219 2.62109 0 2 0C1.39062 0 0.90625 0.195312 0.542969 0.582031C0.179688 0.972656 0 1.51172 0 2.19922C0 2.89453 0.183594 3.43359 0.546875 3.82031C0.910156 4.20703 1.40625 4.39844 2.03125 4.39844ZM0.960938 1.76172C1.08984 1.18359 1.45703 0.839844 2 0.839844C2.28906 0.839844 2.52344 0.925781 2.70703 1.09766C2.88672 1.26953 2.99609 1.49219 3.03906 1.76172H0.960938Z" fill="white"/>\n <path d="M6.64031 4.39844C7.21453 4.39844 7.65203 4.28125 7.95281 4.04297C8.25359 3.80469 8.40203 3.5 8.40203 3.12109C8.40203 2.85156 8.34344 2.625 8.22234 2.44141C8.10125 2.25781 7.94891 2.12891 7.76922 2.04688C7.58562 1.96875 7.39031 1.89844 7.17938 1.83594C6.96844 1.77734 6.77313 1.73047 6.59344 1.69922C6.23016 1.64062 5.96063 1.48828 5.96063 1.24219C5.96063 0.972656 6.17547 0.839844 6.60125 0.839844C6.99969 0.84375 7.25359 0.976562 7.35906 1.24219H8.35906C8.19109 0.480469 7.60125 0 6.60125 0C6.09734 0 5.70672 0.117188 5.42547 0.351562C5.14031 0.589844 4.99969 0.886719 4.99969 1.24219C4.99969 1.56641 5.08563 1.82812 5.25359 2.02734C5.42156 2.22656 5.62469 2.36328 5.86688 2.43359C6.10516 2.50781 6.34344 2.56641 6.58172 2.60938C6.82 2.65625 7.02313 2.71875 7.19109 2.79297C7.35906 2.86719 7.44109 2.97656 7.44109 3.12109C7.44109 3.41406 7.17547 3.55859 6.64031 3.55859C6.21453 3.55859 5.92156 3.36719 5.83953 3.08203H4.83953C4.92547 3.48047 5.12078 3.80078 5.42938 4.03906C5.73406 4.27734 6.13641 4.39844 6.64031 4.39844Z" fill="white"/>\n <path d="M11.2806 4.39844C11.7767 4.39844 12.1869 4.26562 12.5111 4.00391C12.8353 3.74219 13.0541 3.40625 13.1595 3H12.2416C12.0345 3.37109 11.7142 3.55859 11.2806 3.55859C10.9564 3.55859 10.6947 3.44141 10.4955 3.20312C10.2963 2.96484 10.1986 2.63281 10.1986 2.19922C10.1986 1.76562 10.2963 1.43359 10.4955 1.19531C10.6947 0.957031 10.9564 0.839844 11.2806 0.839844C11.7142 0.839844 12.0345 1.02734 12.2416 1.39844H13.1595C13.0541 0.996094 12.8353 0.660156 12.5111 0.394531C12.1869 0.132812 11.7767 0 11.2806 0C10.6713 0 10.1869 0.195312 9.82359 0.582031C9.46031 0.972656 9.28063 1.51172 9.28063 2.19922C9.28063 2.88672 9.46422 3.42578 9.8275 3.8125C10.1908 4.20312 10.6752 4.39844 11.2806 4.39844Z" fill="white"/>\n </svg>\n </span>\n <span>Close story</span>\n </li>\n <li class="storyly__keyboard-shortcuts-menu-item" role="menuitem" tabindex="51" aria-label="S Key for Share Story">\n <span class="storyly__keyboard-shortcuts-menu-item-icon">\n <svg width="7" height="9" viewBox="0 0 7 9" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path d="M3.24414 8.10742C4.18945 8.10742 4.91992 7.89258 5.44092 7.46826C5.95654 7.04395 6.21436 6.46924 6.21436 5.74414C6.21436 5.35742 6.13916 5.02441 5.9834 4.74512C5.67725 4.18652 5.16699 3.93408 4.5708 3.73535C3.97461 3.54199 3.35693 3.4292 2.86816 3.27344C2.37402 3.12305 2.03564 2.85449 2.03564 2.44629C2.03564 2.18848 2.1377 1.96826 2.3418 1.78564C2.5459 1.60303 2.86279 1.51172 3.29785 1.51172C4.00146 1.51172 4.42578 1.82324 4.56543 2.44629H6.04785C5.98877 1.7749 5.72021 1.23242 5.24219 0.813477C4.76416 0.399902 4.09814 0.19043 3.24414 0.19043C2.46533 0.19043 1.82617 0.38916 1.31592 0.78125C0.805664 1.17871 0.547852 1.73193 0.547852 2.44629C0.547852 2.85449 0.623047 3.20361 0.778809 3.49902C0.93457 3.79443 1.1333 4.01465 1.38037 4.16504C1.62744 4.31543 1.90137 4.43896 2.19678 4.54102C2.79297 4.73975 3.40527 4.83105 3.89941 4.95996C4.39355 5.09424 4.73193 5.35205 4.73193 5.74414C4.73193 6.3457 4.22705 6.7915 3.24414 6.7915C2.85205 6.7915 2.51904 6.68408 2.25049 6.47461C1.98193 6.26514 1.8208 6.00732 1.76172 5.69043H0.273926C0.327637 6.4585 0.628418 7.05469 1.18164 7.47363C1.72949 7.89795 2.41699 8.10742 3.24414 8.10742Z" fill="white"/>\n </svg>\n </span>\n <span>Share story link</span>\n </li>\n </ul>\n </div>\n '};exports.default=t;
|
|
390
|
+
},{}],"ttcm":[function(require,module,exports) {
|
|
391
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var t=function(){return'\n\t<div class="storyly__story-modal">\n\t\t<div class="storyly__story-modal-header">\n\t\t\t<div class="storyly__story-modal-header-close-icon">\n\t\t\t\t<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">\n\t\t\t\t\t<path fill-rule="evenodd" clip-rule="evenodd" d="M12.5899 3.41108C12.9153 3.73652 12.9153 4.26418 12.5899 4.58962L4.58962 12.5899C4.26418 12.9153 3.73652 12.9153 3.41108 12.5899C3.08563 12.2644 3.08563 11.7368 3.41108 11.4113L11.4113 3.41108C11.7368 3.08563 12.2644 3.08563 12.5899 3.41108Z" fill="#616161"/>\n\t\t\t\t\t<path fill-rule="evenodd" clip-rule="evenodd" d="M3.41108 3.41108C3.73652 3.08563 4.26418 3.08563 4.58962 3.41108L12.5899 11.4113C12.9153 11.7368 12.9153 12.2644 12.5899 12.5899C12.2644 12.9153 11.7368 12.9153 11.4113 12.5899L3.41108 4.58962C3.08563 4.26418 3.08563 3.73652 3.41108 3.41108Z" fill="#616161"/>\n\t\t\t\t</svg>\n\t\t\t</div>\n\t\t</div>\n\t\t<div class="storyly__story-modal-body"></div>\n\t\t<div class="storyly__story-modal-footer"></div>\n\t</div>'};exports.default=t;
|
|
392
|
+
},{}],"b3z1":[function(require,module,exports) {
|
|
393
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=l(require("@babel/runtime/helpers/asyncToGenerator")),t=l(require("@babel/runtime/helpers/classCallCheck")),s=l(require("@babel/runtime/helpers/createClass")),a=l(require("@babel/runtime/regenerator")),i=require("../../lib/util"),r=l(require("./template"));function l(e){return e&&e.__esModule?e:{default:e}}require("./style.scss");var n=function(){function l(e){var s=e.groupsOverlay,a=e.getActiveGroup;(0,t.default)(this,l),this.groupsOverlay_=s,this.active_=!1,this.getActiveGroup_=a,this.overlay_=this.groupsOverlay_.querySelector(".storyly__story-group-overlay"),this.attachCallbacksToElement_(),this.storyObserver_(this.storyObserverCallback_)}return(0,s.default)(l,[{key:"attachCallbacksToElement_",value:function(){this.handlePlayStatus_=this.handlePlayStatus_.bind(this),this.toggle=this.toggle.bind(this),this.activate_=this.activate_.bind(this),this.deactivate_=this.deactivate_.bind(this),this.storyObserverCallback_=this.storyObserverCallback_.bind(this),this.storyObserver_=this.storyObserver_.bind(this)}},{key:"init_",value:function(){this.active_||(this.modal_=(0,i.generateHtmlFromTemplate)((0,r.default)()),this.closeIcon_=this.modal_.querySelector(".storyly__story-modal-header-close-icon"),this.closeIcon_.addEventListener("click",this.toggle))}},{key:"activate_",value:function(e,t){var s=this;if(e&&t){this.init_(),this.modal_.children[1].appendChild(e),this.modal_.lastElementChild.appendChild(t),setTimeout(function(){return s.modal_.classList.add("active")},0),this.overlay_.classList.add("active");var a=this.groupsOverlay_.querySelector(".swiper");a.insertBefore(this.modal_,a.firstChild),this.active_=!0}}},{key:"deactivate_",value:function(){this.modal_.classList.remove("active"),this.overlay_.classList.remove("active"),this.groupsOverlay_.querySelector(".swiper").removeChild(this.modal_),this.active_=!1}},{key:"toggle",value:function(e,t,s){var a;s?this.rerender_(e,t):null!==(a=this.modal_)&&void 0!==a&&a.classList.contains("active")?this.deactivate_():this.activate_(e,t),this.handlePlayStatus_()}},{key:"rerender_",value:function(){var t=(0,e.default)(a.default.mark(function e(t,s){var i,r;return a.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:i=this.modal_.children[1].firstElementChild,r=this.modal_.lastElementChild.firstElementChild,i.replaceWith(t),r.replaceWith(s);case 4:case"end":return e.stop()}},e,this)}));return function(e,s){return t.apply(this,arguments)}}()},{key:"handlePlayStatus_",value:function(){var e=this.getActiveGroup_().instance.getActiveStory(),t=this.overlay_.classList.contains("active");t&&!e.instance.getProgressPausedStatus()?e.instance.playAndPauseStory():!t&&e.instance.getProgressPausedStatus()&&e.instance.playAndPauseStory()}},{key:"storyObserver_",value:function(e){new MutationObserver(e).observe(this.groupsOverlay_,{attributes:!0})}},{key:"storyObserverCallback_",value:function(e){var t=this;e.forEach(function(e){var s=e.type,a=e.attributeName,i=e.target;"attributes"===s&&"class"===a&&!i.classList.contains("active")&&t.active_&&t.deactivate_()})}}]),l}(),o=n;exports.default=o;
|
|
394
|
+
},{"@babel/runtime/helpers/asyncToGenerator":"agGE","@babel/runtime/helpers/classCallCheck":"fcMS","@babel/runtime/helpers/createClass":"P8NW","@babel/runtime/regenerator":"PMvg","../../lib/util":"PesM","./template":"ttcm","./style.scss":"WCGv"}],"ajqo":[function(require,module,exports) {
|
|
395
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=p(require("@babel/runtime/helpers/slicedToArray")),t=p(require("@babel/runtime/helpers/classCallCheck")),r=p(require("@babel/runtime/helpers/createClass")),n=p(require("./Group")),o=require("../../lib/style"),a=require("../../lib/util"),i=p(require("./templates/navigationButtons")),s=p(require("./templates/keyboardShortcuts")),u=require("../../constants/events"),l=require("../../lib/icons"),c=p(require("../../components/Modal")),d=p(require("../../lib/proxy"));function p(e){return e&&e.__esModule?e:{default:e}}var y=function(){function p(e,r,n){(0,t.default)(this,p),this.groupsOverlay_=e,this.instanceId_=n;var o=d.default.getNodeByInstanceId(this.instanceId_).getDataFromGlobal().globalInstanceData;this.globalInstanceData=o,this.getActiveGroup_=r,this.storyGroupActionListeners_()}return(0,r.default)(p,[{key:"setGroupInstance",value:function(e,t){return new n.default(e,t,this.instanceId_)}},{key:"storyGroupActionListeners_",value:function(){var t=this,r=this.renderActionsContainer_(),n=this.renderCloseButton_(),o=this.renderKeyboardShortcuts_(),i=(0,e.default)(o,3),s=i[0],l=i[1],c=i[2],d=this.renderStoryGroupButtonNavigation_(),p=(0,e.default)(d,2),y=p[0],v=p[1];r.append(s,n,l);var h=function(){var e=t.getActiveGroup_().instance.getActiveStory(),n=r.classList.contains("active");n&&!e.instance.getProgressPausedStatus()?e.instance.playAndPauseStory():!n&&e.instance.getProgressPausedStatus()&&e.instance.playAndPauseStory()},_=function(){r.classList.remove("active"),c.classList.remove("active"),h()};n.addEventListener("click",function(e){e.preventDefault(),_(),(0,a.createAndDispatchEvent)(t.groupsOverlay_,"onCloseGroup",{gesture:u.GestureTypes.Icon})}),y.addEventListener("click",function(){(0,a.createAndDispatchEvent)(t.groupsOverlay_,"onPrevGroup",{gesture:u.GestureTypes.Button})}),v.addEventListener("click",function(){(0,a.createAndDispatchEvent)(t.groupsOverlay_,"onNextGroup",{gesture:u.GestureTypes.Button})}),s.addEventListener("click",function(e){e.preventDefault(),r.classList.toggle("active"),h(),c.classList.toggle("active"),c.classList.contains("active")?(l.setAttribute("aria-hidden","false"),l.removeAttribute("tabindex")):(l.setAttribute("aria-hidden","true"),l.setAttribute("tabindex","-1"))}),c.addEventListener("click",function(e){e.preventDefault(),_(),t.modal_&&t.modal_.toggle()}),this.groupsOverlay_.addEventListener("onModalOpen",function(e){var r=e.detail;return t.handleModal_(r.body,r.footer,r.rerender)})}},{key:"renderActionsContainer_",value:function(){var e=document.createElement("div");return e.classList.add("storyly__action-container"),this.groupsOverlay_.querySelector(".swiper").appendChild(e),e}},{key:"renderKeyboardShortcuts_",value:function(){var e=document.createElement("button");(0,a.setAttribute)(e,"tabindex","50"),(0,a.setAttribute)(e,"aria-label","Keyboard Shortcuts"),(0,a.setAttribute)(e,"aria-haspopup","menu"),(0,a.setAttribute)(e,"aria-controls","storyly__keyboard-shortcuts-menu"),e.classList.add("icon","keyboard-shortcut");var t=(0,a.generateHtmlFromTemplate)((0,s.default)());return this.overlay_=document.createElement("div"),(0,o.setClass)(this.overlay_,"storyly__story-group-overlay"),this.groupsOverlay_.querySelector(".swiper").appendChild(this.overlay_),[e,t,this.overlay_]}},{key:"renderCloseButton_",value:function(){var e=document.createElement("button");return(0,a.setAttribute)(e,"tabindex","55"),(0,a.setAttribute)(e,"aria-label","Close Story"),(0,a.setAttribute)(e,"id","storyly__close-story-button"),e.classList.add("icon","close","close-story"),e}},{key:"renderStoryGroupButtonNavigation_",value:function(){this.prevStoryGroupButtonContainer_=(0,a.generateHtmlFromTemplate)((0,i.default)("prev")),this.nextStoryGroupButtonContainer_=(0,a.generateHtmlFromTemplate)((0,i.default)("next"));var e=this.prevStoryGroupButtonContainer_.querySelector(".story-group-navigation-button-container"),t=this.nextStoryGroupButtonContainer_.querySelector(".story-group-navigation-button-container"),r=this.groupsOverlay_.querySelector(".swiper");return r.appendChild(this.prevStoryGroupButtonContainer_),r.appendChild(this.nextStoryGroupButtonContainer_),[e,t]}},{key:"handleModal_",value:function(e,t,r){this.modal_||(this.modal_=new c.default({groupsOverlay:this.groupsOverlay_,getActiveGroup:this.getActiveGroup_})),this.modal_.toggle(e,t,r)}},{key:"handleStoryGroupButton_",value:function(e,t){var r=this.globalInstanceData.shareParams.playMode;if(t&&!r){e.querySelector(".story-group-title").firstElementChild.innerHTML=t.title;var n=e.querySelector(".story-group-cover-image").firstElementChild;n.src=t.icon_image_url,n.onerror=function(){n.src=l.userPropImage},(0,o.setStyle)(e,["display","flex"])}else(0,o.setStyle)(e,["display","none"])}},{key:"handleStoryGroupNavigationButtons",value:function(e,t){var r,n,o=null!==(r=e[t+1])&&void 0!==r&&r.ad?e[t+2]:e[t+1],a=null!==(n=e[t-1])&&void 0!==n&&n.ad?e[t-2]:e[t-1];this.handleStoryGroupButton_(this.prevStoryGroupButtonContainer_,a),this.handleStoryGroupButton_(this.nextStoryGroupButtonContainer_,o)}}]),p}(),v=y;exports.default=v;
|
|
396
|
+
},{"@babel/runtime/helpers/slicedToArray":"HETk","@babel/runtime/helpers/classCallCheck":"fcMS","@babel/runtime/helpers/createClass":"P8NW","./Group":"wvHA","../../lib/style":"vgU2","../../lib/util":"PesM","./templates/navigationButtons":"u7Oq","./templates/keyboardShortcuts":"KwS7","../../constants/events":"d0lR","../../lib/icons":"irwm","../../components/Modal":"b3z1","../../lib/proxy":"qmVm"}],"k65U":[function(require,module,exports) {
|
|
397
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var n=function(){var n,a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{story:{}},e=a.story,t=a.type,i=a.mediaHost,o=a.thumbnail,c=a.altText,r=a.storyBg,s="".concat(i).concat(e.image_path);return"image_url"in e&&(s=e.image_url),"video"===t&&(s="".concat(i).concat(e.video_path),"video_url"in e&&(s=e.video_url),o&&(n="".concat(i).concat(o))),'\n <div class="storyly__story" aria-hidden="true" aria-label="'.concat(c?"".concat(c.replace(/['"]+/g,"")):"there is no story alt text",'" style="background-color: ').concat(r.bg_color,'">\n ').concat(t?'\n <div class="story-bg" tabindex="-1" aria-hidden="true">\n '.concat("video"===t?'\n <video\n muted\n onloadedmetadata="this.muted = true"\n disablePictureInPicture\n controlsList="nodownload"\n playsinline\n webkit-playsinline\n class="story-video"\n '.concat(n?'poster="'.concat(n,'"'):"",'\n preload="none"\n >\n <source src="').concat(s,'" type="video/mp4">\n </video>\n '):'\n <img src="'.concat(s,'" loading="lazy" class="story-image" alt="Storyly Story Image" />\n '),'\n </div>\n <div class="share-container">\n <div class="share-wrapper">\n <div class="get-link">\n <div class="share-icon">\n <button aria-label="Share" tabindex="-1" aria-hidden="true" class="icon share"></button>\n </div>\n <p tabindex="-1" aria-hidden="true">Get Link</p>\n </div>\n <button aria-hidden="true" aria-label="Close" class="icon close-black close-share"></button>\n </div>\n </div>\n <p class="copied" aria-hidden="true">\n <button tabindex="-1" aria-hidden="true" aria-label="Copy Link" class="icon check"></button>\n <span>Link Copied</span>\n </p>\n '):"","\n </div>\n ")};exports.default=n;
|
|
398
|
+
},{}],"eUG5":[function(require,module,exports) {
|
|
399
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=V(require("@babel/runtime/helpers/defineProperty")),t=V(require("@babel/runtime/helpers/asyncToGenerator")),s=V(require("@babel/runtime/helpers/classCallCheck")),i=V(require("@babel/runtime/helpers/createClass")),a=V(require("@babel/runtime/regenerator")),r=V(require("platform")),o=V(require("copy-to-clipboard")),n=V(require("../../../constants/os")),l=V(require("../../../constants/browsers")),y=require("../../../constants/layerTypes"),h=require("../../../lib/style"),d=require("../../../lib/util"),u=V(require("../templates/story")),c=require("../../../constants/events"),_=V(require("../../../constants/directions")),p=V(require("../../../lib/storage")),b=require("../../../service"),v=V(require("../../../lib/proxy")),m=V(require("../../../layers/BlankStory")),g=V(require("../../../layers/ImageCTA")),A=V(require("../../../layers/CTA")),f=V(require("../../../layers/Poll")),D=V(require("../../../layers/Rating")),S=V(require("../../../layers/Emoji")),E=V(require("../../../layers/Quiz")),P=V(require("../../../layers/Countdown")),T=V(require("../../../layers/Question")),L=V(require("../../../layers/Media")),C=V(require("../../../layers/ProductCard")),k=V(require("../../../layers/ProductCatalog")),I=V(require("../../../layers/ProductTag")),q=V(require("../../../layers/EmbedCode")),w=V(require("../../../layers/PromoCode")),O=V(require("../../../layers/ImageQuiz")),x=V(require("../../../layers/Text"));function V(e){return e&&e.__esModule?e:{default:e}}function B(e,t){var s=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),s.push.apply(s,i)}return s}function G(t){for(var s=1;s<arguments.length;s++){var i=null!=arguments[s]?arguments[s]:{};s%2?B(Object(i),!0).forEach(function(s){(0,e.default)(t,s,i[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):B(Object(i)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))})}return t}var M=function(){function e(t){var i,a,o=t.story,n=t.key,l=t.group,y=t.storiesContainer,u=t.progressDoms,c=t.instanceId;(0,s.default)(this,e),this.storyDom_=null,this.layersContainer_=document.createElement("div"),this.story_=o,this.storyData_={},this.layers_=[],this.group_=l,this.key_=n,this.storiesContainer_=y,this.progressDoms_=u,this.storyProgressSecond_=7,this.progressPaused_=!0,this.imageAsset_=null,this.videoAsset_=null,this.hasEmbedCode_=!1,this.videoAssetLoadingStarted_=!1,this.storyProgressRemain_=this.storyProgressSecond_,this.progressTime_=0,this.osFamily_=null===(i=r.default.os)||void 0===i?void 0:null===(a=i.family)||void 0===a?void 0:a.toLocaleLowerCase(),this.isBlankStory_=!1,this.imageAssetLoaded_=!1,this.instanceId_=c,this.timedLayers_=[],(0,h.setClass)(this.layersContainer_,"layers-container"),(0,d.setAttribute)(this.layersContainer_,"dir",_.default.LTR),this.attachCallbacksToElement_(),this.render_()}return(0,i.default)(e,[{key:"paused",get:function(){return this.progressPaused_}},{key:"attachCallbacksToElement_",value:function(){this.onVideoLoadedData_=this.onVideoLoadedData_.bind(this),this.onVideoEnded_=this.onVideoEnded_.bind(this),this.onVideoWaiting_=this.onVideoWaiting_.bind(this),this.onVideoPlaying_=this.onVideoPlaying_.bind(this),this.onPlay_=this.onPlay_.bind(this),this.onPlayThrough_=this.onPlayThrough_.bind(this),this.handleSoundStory_=this.handleSoundStory_.bind(this),this.playAndPauseStory=this.playAndPauseStory.bind(this),this.handleCloseGroup_=this.handleCloseGroup_.bind(this),this.renderShareWidget=this.renderShareWidget.bind(this),this.onImageLoad_=this.onImageLoad_.bind(this),this.handleAccessibilityOnOff_=this.handleAccessibilityOnOff_.bind(this)}},{key:"setCustomEvents_",value:function(){this.storyDom_.addEventListener("onPlayPause",this.playAndPauseStory)}},{key:"render_",value:function(){var e=this,t=(0,d.getStoryAssetFromLayers)(this.story_.media.layers),s=t.storyData,i=t.layers,a=t.storyBg;this.storyData_=s,this.layers_=i;var r=(0,u.default)({story:this.storyData_,type:this.storyData_.type,mediaHost:this.group_.media_host,thumbnail:this.story_.media.thumbnail_url,altText:this.story_.alt_text,storyBg:a});this.storyDom_=(0,d.generateHtmlFromTemplate)(r),this.storyDom_.appendChild(this.layersContainer_),this.storyDom_.setAttribute("data-story-id",this.story_.story_id),this.storiesContainer_.appendChild(this.storyDom_),this.loadLayers_(),"video"===this.storyData_.type?(this.videoAsset_=this.storyDom_.querySelector("video"),this.videoAsset_.addEventListener("loadstart",function(){e.videoAssetLoadingStarted_=!0},{once:!0}),this.videoAsset_.addEventListener("loadeddata",this.onVideoLoadedData_,{once:!0})):this.isBlankStory_||(this.imageAsset_=this.storyDom_.querySelector("img"),this.imageAsset_.addEventListener("load",this.onImageLoad_,{once:!0}));var o=v.default.getNodeByInstanceId(this.instanceId_).getDataFromGlobal().globalInstanceData;this.globalInstanceData=o,this.setCustomEvents_()}},{key:"onImageLoad_",value:function(){if(!this.imageAssetLoaded_){this.startProgressSteps_();var e=this.imageAsset_,t=e.clientHeight,s=e.clientWidth;this.setStoryClassByAsset_({height:t,width:s}),this.imageAssetLoaded_=!0}}},{key:"startProgressSteps_",value:function(){this.hasEmbedCode_||this.globalInstanceData.storylyEmbed.init&&!this.globalInstanceData.storylyEmbed.canPlay||(this.startProgressLine_(),this.startProgress_())}},{key:"setStoryClassByAsset_",value:function(e){var t=e.width;+(56.25*e.height/t).toFixed(2)<100&&(0,h.setClass)(this.storyDom_,"story-9_16")}},{key:"handleVideoEvents_",value:function(){this.videoAsset_.addEventListener("ended",this.onVideoEnded_),this.videoAsset_.addEventListener("waiting",this.onVideoWaiting_),this.videoAsset_.addEventListener("playing",this.onVideoPlaying_),this.videoAsset_.addEventListener("canplaythrough",this.onPlayThrough_),this.videoAsset_.addEventListener("canplay",this.onPlay_)}},{key:"onPlayThrough_",value:function(){var e=this.globalInstanceData.storylyEmbed.canPlay;("boolean"!=typeof e||e)&&this.videoAsset_.play()}},{key:"onPlay_",value:function(){!this.hasEmbedCode_&&this.globalInstanceData.storylyEmbed.canPlay&&this.startProgressLine_()}},{key:"onVideoLoadedData_",value:function(){this.setStoryClassByAsset_({height:this.videoAsset_.videoHeight,width:this.videoAsset_.videoWidth}),this.storyProgressRemain_=this.videoAsset_.duration,this.storyProgressSecond_=this.videoAsset_.duration}},{key:"onVideoEnded_",value:function(){this.globalInstanceData.accessibility||(0,d.createAndDispatchEvent)(this.storyDom_,"onNextStory",{gesture:c.GestureTypes.Progress})}},{key:"onVideoWaiting_",value:function(){this.progressPaused_=!0}},{key:"onVideoPlaying_",value:function(){this.soundOn_?this.soundOn():this.soundOff(),this.progressPaused_=!1,this.hasEmbedCode_||this.globalInstanceData.storylyEmbed.init&&!this.globalInstanceData.storylyEmbed.canPlay||this.startProgress_()}},{key:"removeEvents_",value:function(){this.videoAsset_&&(this.videoAsset_.removeEventListener("ended",this.onVideoEnded_),this.videoAsset_.removeEventListener("waiting",this.onVideoWaiting_),this.videoAsset_.removeEventListener("playing",this.onVideoPlaying_),this.videoAsset_.removeEventListener("canplay",this.onPlay_),this.videoAsset_.removeEventListener("canplaythrough",this.onPlayThrough_));var e=this.storiesContainer_.querySelector(".storyly__story-actions"),t=e.querySelector('button[data-type="sound"]'),s=e.querySelector('button[data-type="share"]');this.playPauseAction_&&(0,d.removeClickEventListener)(this.playPauseAction_,this.playAndPauseStory),this.accessibilityAction_&&this.accessibilityAction_.removeEventListener("pointerdown",this.handleAccessibilityOnOff_),(0,d.removeClickEventListener)(t,this.handleSoundStory_),s.removeEventListener("pointerup",this.renderShareWidget)}},{key:"loadLayers_",value:function(){var e=this;this.layers_.forEach(function(){var s=(0,t.default)(a.default.mark(function t(s){var i,r;return a.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:i=s,r={layer:s,group:e.group_,story:e.story_,storyDom:e.layersContainer_,instanceId:e.instanceId_},s.type===y.LayerTemplateTypes.IMAGE&&s.bg_color&&(e.isBlankStory_=!0,i.instance=new m.default(G({},r))),s.type===y.LayerTemplateTypes.EMOJI&&(i.instance=new S.default(G({},r))),s.type===y.LayerTemplateTypes.POLL&&(i.instance=new f.default(G({},r))),s.type===y.LayerTemplateTypes.RATING&&(i.instance=new D.default(G({},r))),s.type===y.LayerTemplateTypes.QUIZ&&(i.instance=new E.default(G({},r))),s.type===y.LayerTemplateTypes.COUNTDOWN&&(i.instance=new P.default(G({},r))),s.type===y.LayerTemplateTypes.IMAGE_CTA&&(i.instance=new g.default(G(G({},r),{},{type:y.LayerTemplateTypes.IMAGE_CTA}))),s.type!==y.LayerTemplateTypes.BUTTON&&s.type!==y.LayerTemplateTypes.SWIPE||(i.instance=new A.default(G(G({},r),{},{type:s.type===y.LayerTemplateTypes.BUTTON?y.LayerTemplateTypes.BUTTON:y.LayerTemplateTypes.SWIPE}))),s.type===y.LayerTemplateTypes.IMAGE&&(s.image_path||s.video_path||s.image_url)&&(i.instance=new L.default(G(G({},r),{},{mediaHost:e.group_.media_host}))),s.type===y.LayerTemplateTypes.TEXT&&(i.instance=new x.default(G({},r))),s.type===y.LayerTemplateTypes.PRODUCT_TAG&&(i.instance=new I.default(G({},r))),s.type===y.LayerTemplateTypes.PROMO_CODE&&(i.instance=new w.default(G({},r))),s.type===y.LayerTemplateTypes.EMBED_CODE&&(e.hasEmbedCode_=!0,i.instance=new q.default(G({},r))),s.type===y.LayerTemplateTypes.QUESTION&&(i.instance=new T.default(G(G({},r),{},{storiesContainer:e.storiesContainer_}))),s.type===y.LayerTemplateTypes.PRODUCT_CARD&&(i.instance=new C.default(G({},r))),s.type===y.LayerTemplateTypes.PRODUCT_CATALOG&&(i.instance=new k.default(G({},r))),s.type===y.LayerTemplateTypes.IMAGE_QUIZ&&(i.instance=new O.default(G({},r))),(i.start_time||i.end_time)&&(i.instance.hideLayer(),e.timedLayers_.push(i));case 20:case"end":return t.stop()}},t)}));return function(e){return s.apply(this,arguments)}}())}},{key:"startProgress_",value:function(){var e=this;this.progressInterval_||this.globalInstanceData.storylyEmbed.init&&!this.globalInstanceData.storylyEmbed.autoPlay||(this.progressInterval_=setInterval(function(){e.progressPaused_||(e.progressTime_+=1,e.handleLayersVisibility_(),e.storyProgressRemain_-=1,e.videoAsset_?e.play():e.handleProgress_())},1e3))}},{key:"handleLayersVisibility_",value:function(){var e=this;this.progressPaused_||this.timedLayers_.forEach(function(t){var s=t.start_time?1e3*t.start_time-300:0,i=t.end_time?1e3*t.end_time:e.videoAsset_?1e3*e.videoAsset_.duration:1e3*e.storyProgressSecond_;1e3*e.progressTime_>=s&&1e3*e.progressTime_<=i?t.instance.showLayer():t.instance.hideLayer()})}},{key:"handleProgress_",value:function(){this.storyProgressRemain_<=0&&!this.globalInstanceData.accessibility&&((0,d.createAndDispatchEvent)(this.storyDom_,"onNextStory",{gesture:c.GestureTypes.Progress}),clearInterval(this.progressInterval_))}},{key:"handleStoryActions_",value:function(){var e=this.storiesContainer_.querySelector(".storyly__story-actions"),t=e.querySelector('button[data-type="sound"]'),s=e.querySelector('button[data-type="share"]');this.playPauseAction_=e.querySelector('button[data-type="play-pause"]'),(0,d.isMobileView)()?((0,d.setAttribute)(this.playPauseAction_,"hidden",!0),this.accessibilityAction_=this.storiesContainer_.querySelector(".accessibility-switch-button"),this.accessibilityAction_&&this.accessibilityAction_.addEventListener("pointerdown",this.handleAccessibilityOnOff_)):(0,d.removeAttribute)(this.playPauseAction_,"hidden");var i=e.querySelector('button[data-type="close"]');(this.globalInstanceData.storylyEmbed.init&&this.globalInstanceData.storylyEmbed.closeButton||(0,d.isMobileView)())&&((0,d.removeAttribute)(i,"hidden"),(0,d.setClickEventListener)(i,this.handleCloseGroup_)),this.hasEmbedCode_&&(0,d.setAttribute)(this.playPauseAction_,"hidden",!0),this.playPauseAction_.classList.replace("play","pause"),(0,d.setClickEventListener)(this.playPauseAction_,this.playAndPauseStory),this.videoAsset_?((0,d.removeAttribute)(t,"hidden"),(0,d.setClickEventListener)(t,this.handleSoundStory_)):(0,d.setAttribute)(t,"hidden",!0),!this.globalInstanceData.videoMuted&&this.videoAsset_?(this.videoAsset_.muted=!1,this.soundOn_=!0,t.classList.replace("sound-off","sound-on")):this.videoAsset_&&(this.videoAsset_.muted=!0,this.soundOn_=!1,t.classList.replace("sound-on","sound-off"));var a=this.story_.is_sharable,r=this.globalInstanceData.storylyEmbed.init&&this.globalInstanceData.storylyEmbed.shareButton;a&&!r?this.handleShareButton_(s):a&&r&&this.handleShareButton_(s)}},{key:"handleShareButton_",value:function(e){var t,s=null===(t=r.default.name)||void 0===t?void 0:t.toLocaleLowerCase();this.osFamily_===n.default.IOS||s===l.default.SAFARI?e.classList.add("share-ios"):e.classList.add("share-android"),(0,d.removeAttribute)(e,"hidden"),e.addEventListener("pointerup",this.renderShareWidget)}},{key:"handleCloseGroup_",value:function(){(0,d.createAndDispatchEvent)(this.storyDom_,"onCloseGroup")}},{key:"handleSoundStory_",value:function(e){var t=e.target,s="sound-on",i="sound-off";t.classList.contains("sound-off")?((0,b.readAccessibilityText)(this.storyDom_,"Story Unmuted"),t.setAttribute("aria-label","mute story"),this.soundOn_=!0,this.soundOn(),this.globalInstanceData.videoMuted=!1):((0,b.readAccessibilityText)(this.storyDom_,"Story Muted"),t.setAttribute("aria-label","unmute story"),this.soundOn_=!1,this.soundOff(),s="sound-off",i="sound-on",this.globalInstanceData.videoMuted=!0),t.classList.replace(i,s)}},{key:"startProgressLine_",value:function(){var e=this;if(!(this.progressStarted_||this.globalInstanceData.storylyEmbed.init&&!this.globalInstanceData.storylyEmbed.autoPlay)){this.progressStarted_=!0;var t=0;this.startInterval_=setInterval(function(){e.progressPaused_||(t+=1)>100||(0,h.setStyle)(e.progressDoms_[e.key_].querySelector("span"),["width","".concat(t,"%")])},10*this.storyProgressSecond_)}}},{key:"handleAccessibilityAltText_",value:function(){if((0,d.setAttribute)(this.storyDom_,"tabindex","20"),(0,d.setAttribute)(this.storyDom_,"aria-hidden","false"),this.osFamily_===n.default.IOS){var e=this.storiesContainer_.querySelector(".storyly__sg-info");(0,d.setAttribute)(e,"aria-hidden","false"),(0,d.setAttribute)(e,"aria-label",this.story_.alt_text||"there is no story alt text"),(0,d.removeAttribute)(this.storyDom_,"aria-label")}this.globalInstanceData.accessibility&&this.accessibilityAction_&&(0,d.setAttribute)(this.accessibilityAction_,"aria-label","Disable Accessibility")}},{key:"handleAccessibilityFocus_",value:function(){var e=this;!(0,d.isMobileView)()||!this.globalInstanceData.storiesHasAltText||this.osFamily_===n.default.IOS&&this.globalInstanceData.accessibility||(this.globalInstanceData.accessibility?setTimeout(function(){e.storyDom_.focus()},500):(this.accessibilityAction_.blur(),setTimeout(function(){e.accessibilityAction_.focus()},500)))}},{key:"exposeAccessibilityElements_",value:function(){this.storyDom_.querySelectorAll(".cta-button").forEach(function(e){(0,d.setAttribute)(e,"tabindex","21"),(0,d.setAttribute)(e,"aria-hidden","false")}),this.storyDom_.querySelectorAll(".swipe-up-button").forEach(function(e){(0,d.setAttribute)(e,"tabindex","21"),(0,d.setAttribute)(e,"aria-hidden","false")}),this.storyDom_.querySelectorAll(".product-tag-tooltip").forEach(function(e){(0,d.setAttribute)(e,"tabindex","21"),(0,d.setAttribute)(e,"aria-hidden","false")}),this.storyDom_.querySelectorAll(".poll-component").forEach(function(e){e.querySelectorAll("button").forEach(function(e){return(0,d.setAttribute)(e,"tabindex","22")}),(0,d.setAttribute)(e,"tabindex","22"),(0,d.setAttribute)(e,"aria-hidden","false")})}},{key:"hideAccessibilityElements_",value:function(){this.storyDom_.querySelectorAll(".cta-button").forEach(function(e){(0,d.removeAttribute)(e,"tabindex"),(0,d.setAttribute)(e,"aria-hidden","true")}),this.storyDom_.querySelectorAll(".swipe-up-button").forEach(function(e){(0,d.removeAttribute)(e,"tabindex"),(0,d.setAttribute)(e,"aria-hidden","true")}),this.storyDom_.querySelectorAll(".product-tag-tooltip").forEach(function(e){(0,d.removeAttribute)(e,"tabindex"),(0,d.setAttribute)(e,"aria-hidden","true")}),this.storyDom_.querySelectorAll(".poll-component").forEach(function(e){e.querySelectorAll("button").forEach(function(e){return(0,d.removeAttribute)(e,"tabindex")}),(0,d.removeAttribute)(e,"tabindex"),(0,d.setAttribute)(e,"aria-hidden","true")})}},{key:"handleAccessibilityOnOff_",value:function(e){var t=e.target,s="true"===t.getAttribute("data-pressed");e.target.setAttribute("data-pressed",String(!s)),this.globalInstanceData.accessibility?(this.storyDom_.hasAttribute("paused")?this.play():(this.startProgressLine_(),this.startProgress_()),(0,b.readAccessibilityText)(this.storyDom_,"Accessibility is off"),t.setAttribute("aria-label","Double tap to enable accessibility"),p.default.setItemToGlobal("accessibilitiy",!1),this.globalInstanceData.accessibility=!1,(0,d.createAndDispatchEvent)(this.storyDom_,"onAccessibilityTriggered",{accessibilityEnabled:!1})):(this.globalInstanceData.accessibility=!0,(0,b.readAccessibilityText)(this.storyDom_,"Accessibility is on"),this.pause(),t.setAttribute("aria-label","Disable Accessibility"),p.default.setItemToGlobal("accessibilitiy",!0),(0,d.createAndDispatchEvent)(this.storyDom_,"onAccessibilityTriggered",{accessibilityEnabled:!0}))}},{key:"sendStoryViewedEvent_",value:function(){var e=G({},this.getStoryData());(0,d.createAndDispatchEvent)(this.storyDom_,"onCustomerEvent",{eventName:c.CustomerEventTypes.onStoryViewed,params:e})}},{key:"renderShareWidget",value:function(){var e=(0,t.default)(a.default.mark(function e(){var t,s,i,r,n,l,y,u,c,_,p,b,v=this;return a.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(this.story_.is_sharable){e.next=2;break}return e.abrupt("return");case 2:if((t=new URLSearchParams(window.location.search)).set("storyly","[".concat(this.group_.group_id,", ").concat(this.story_.story_id,"]")),s={title:"Storyly",text:this.group_.title,url:"".concat(window.location.origin).concat(window.location.pathname,"?").concat(t.toString())},this.pause(),this.shareContainer_=this.storyDom_.querySelector(".share-container"),(0,d.stopEventBubbling)(this.shareContainer_,"pointerdown"),(0,d.stopEventBubbling)(this.shareContainer_,"touchstart"),(i=this.shareContainer_.querySelector(".close-share")).ariaHidden="false",r=function(){(0,h.setStyle)(v.shareContainer_,["display","none"]),i.ariaHidden="true",v.play()},(0,d.setClickEventListener)(i,r),"https:"!==window.location.protocol||!navigator.share){e.next=26;break}return n=this.getStoryData(),l=n.media,e.next=17,fetch(l);case 17:return y=e.sent,e.next=20,y.blob();case 20:u=e.sent,c=[new File([u],"image.jpg",{type:u.type,lastModified:(new Date).getTime()})],t.get("shareTest")&&(s.url=void 0),navigator.share(G(G({},s),{},{files:c})).then(function(){v.play()}).catch(function(e){20===e.code?v.play():(0,h.setStyle)(v.shareContainer_,["display","flex"])}),e.next=27;break;case 26:(0,h.setStyle)(this.shareContainer_,["display","flex"]);case 27:this.shareContainer_.querySelector(".get-link button").focus(),p=function(){(0,o.default)(s.url),(0,h.setClass)(v.storyDom_.querySelector(".copied"),"show"),(0,h.setStyle)(v.shareContainer_,["display","none"]),(0,d.createAndDispatchEvent)(v.storyDom_,"onShareStoryEvent"),v.play(),_&&clearTimeout(_),_=setTimeout(function(){(0,h.removeClass)(v.storyDom_.querySelector(".copied"),"show")},2e3)},b=this.shareContainer_.querySelector(".get-link"),(0,d.setClickEventListener)(b,p);case 32:case"end":return e.stop()}},e,this)}));return function(){return e.apply(this,arguments)}}()},{key:"soundOn",value:function(){this.videoAsset_.muted=!1}},{key:"soundOff",value:function(){this.videoAsset_.muted=!0}},{key:"pause",value:function(){arguments.length>0&&void 0!==arguments[0]&&arguments[0]&&this.shareContainer_&&(0,h.setStyle)(this.shareContainer_,["display","none"]),this.progressPaused_=!0,this.storyDom_.setAttribute("paused",""),this.videoAsset_&&this.videoAsset_.pause()}},{key:"play",value:function(){arguments.length>0&&void 0!==arguments[0]&&arguments[0]&&this.playPauseAction_.classList.contains("play")&&this.playPauseAction_.classList.replace("play","pause"),this.progressPaused_=!1,this.storyDom_.removeAttribute("paused"),this.videoAsset_&&this.videoAsset_.play()}},{key:"playAndPauseStory",value:function(){if(!this.globalInstanceData.accessibility){var e="play",t="pause";this.playPauseAction_.classList.contains("pause")?((0,b.readAccessibilityText)(this.storyDom_,"Story Paused"),this.pause(),(0,d.createAndDispatchEvent)(this.storyDom_,"onPlayPauseEvent",{eventType:c.EventTypes.Paused})):((0,b.readAccessibilityText)(this.storyDom_,"Story Resumed"),this.playPauseAction_.setAttribute("aria-label","Pause Story"),this.play(),(0,d.createAndDispatchEvent)(this.storyDom_,"onPlayPauseEvent",{eventType:c.EventTypes.Resumed}),e="pause",t="play"),this.playPauseAction_.classList.replace(t,e)}}},{key:"pauseByTouch",value:function(){this.pause(),(0,h.setStyle)(this.storiesContainer_.querySelector(".storyly__story-header"),["opacity",0])}},{key:"playAfterTouch",value:function(){(0,h.setStyle)(this.storiesContainer_.querySelector(".storyly__story-header"),["opacity",1]),this.play(),clearInterval(this.touchTimeout)}},{key:"renderLayer",value:function(){(0,h.setClass)(this.layersContainer_,"active")}},{key:"playByEmbed",value:function(){this.videoAsset_?this.videoAsset_.play():(this.startProgressLine_(),this.startProgress_())}},{key:"show",value:function(){var e=this;this.storyDom_.setAttribute("show",""),this.handleStoryActions_(),this.exposeAccessibilityElements_(),this.handleAccessibilityAltText_(),this.progressPaused_=!1,this.storyProgressRemain_=this.storyProgressSecond_,this.progressTime_=0,(0,h.removeClass)(this.progressDoms_[this.key_],"seen"),this.videoAsset_?(0!==this.videoAsset_.currentTime&&(this.videoAsset_.currentTime=0),this.handleVideoEvents_(),this.videoAssetLoadingStarted_?this.globalInstanceData.storylyEmbed.init&&!this.globalInstanceData.storylyEmbed.canPlay||this.videoAsset_.play().then(function(){e.hasEmbedCode_||e.startProgressLine_()}):this.videoAsset_.load()):(this.isBlankStory_||this.imageAssetLoaded_)&&this.startProgressSteps_(),this.globalInstanceData.storylyEmbed.init&&!this.globalInstanceData.storylyEmbed.autoPlay?(0,h.setStyle)(this.progressDoms_[this.key_].querySelector("span"),["width","100%"]):this.hasEmbedCode_&&(0,h.setStyle)(this.progressDoms_[this.key_].querySelector("span"),["width","10%"]),this.globalInstanceData.accessibility&&this.playPauseAction_&&(0,h.setStyle)(this.playPauseAction_,["display","none"]),(0,h.setClass)(this.progressDoms_[this.key_],"active"),(0,h.setClass)(this.storyDom_,"active"),this.renderLayer(),this.sendStoryViewedEvent_(),this.handleAccessibilityFocus_()}},{key:"hide",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},s=t.isBack,i=void 0!==s&&s,a=t.holdActive,r=void 0!==a&&a;this.storyDom_.removeAttribute("show"),this.storyDom_.hasAttribute("paused")&&this.storyDom_.removeAttribute("paused"),(0,h.removeClass)(this.layersContainer_,"active"),(0,d.setAttribute)(this.storyDom_,"aria-hidden","true"),(0,d.setAttribute)(this.storyDom_,"tabindex","-1"),this.hideAccessibilityElements_(),clearInterval(this.progressInterval_),clearInterval(this.startInterval_),this.progressInterval_=null,this.startInterval_=null,this.progressStarted_=!1,this.videoAsset_&&setTimeout(function(){e.videoAsset_.pause()},300),this.removeEvents_(),this.progressPaused_=!0,(0,h.removeClass)(this.progressDoms_[this.key_],"active"),r||(0,h.removeClass)(this.storyDom_,"active"),(0,h.resetStyle)(this.progressDoms_[this.key_].querySelector("span"),["transition","width"]),i?(0,h.removeClass)(this.progressDoms_[this.key_],"seen"):(0,h.setClass)(this.progressDoms_[this.key_],"seen"),this.shareContainer_&&(0,h.setStyle)(this.shareContainer_,["display","none"]),this.timedLayers_.forEach(function(e){return e.instance.hideLayer()})}},{key:"getWatchLength",value:function(){return 1e3*(this.storyProgressSecond_-this.storyProgressRemain_)}},{key:"getStoryData",value:function(){var e="".concat(this.group_.media_host).concat(this.storyData_.image_path);return"video"===this.storyData_.type&&(e="".concat(this.group_.media_host).concat(this.storyData_.video_path)),{story_id:this.story_.story_id,media:e,group:this.group_,index:this.key_}}},{key:"sendStoryClickedEvent",value:function(e,t){var s=G(G({},this.getStoryData()),{},{gesture_type:(0,d.getGestureType)(e)});(0,d.createAndDispatchEvent)(this.storyDom_,"onCustomerEvent",{eventName:"next"===t?c.CustomerEventTypes.onNextStory:c.CustomerEventTypes.onPreviousStory,params:s})}}]),e}(),R=M;exports.default=R;
|
|
400
|
+
},{"@babel/runtime/helpers/defineProperty":"IxO8","@babel/runtime/helpers/asyncToGenerator":"agGE","@babel/runtime/helpers/classCallCheck":"fcMS","@babel/runtime/helpers/createClass":"P8NW","@babel/runtime/regenerator":"PMvg","platform":"kohK","copy-to-clipboard":"xbqV","../../../constants/os":"Ms5h","../../../constants/browsers":"ev02","../../../constants/layerTypes":"aJRz","../../../lib/style":"vgU2","../../../lib/util":"PesM","../templates/story":"k65U","../../../constants/events":"d0lR","../../../constants/directions":"w67G","../../../lib/storage":"NA5d","../../../service":"hs1C","../../../lib/proxy":"qmVm","../../../layers/BlankStory":"ODzA","../../../layers/ImageCTA":"J7D7","../../../layers/CTA":"lS5I","../../../layers/Poll":"fJSh","../../../layers/Rating":"raea","../../../layers/Emoji":"GGza","../../../layers/Quiz":"lrR5","../../../layers/Countdown":"YoYr","../../../layers/Question":"KeqT","../../../layers/Media":"VEUS","../../../layers/ProductCard":"ldNI","../../../layers/ProductCatalog":"rFjg","../../../layers/ProductTag":"cjPL","../../../layers/EmbedCode":"QZzK","../../../layers/PromoCode":"N5Sp","../../../layers/ImageQuiz":"Mxyn","../../../layers/Text":"youg"}],"R5lM":[function(require,module,exports) {
|
|
401
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var t=require("../../../lib/util"),n=new URLSearchParams(window.location.search),o=function(o,a,e){var i=o.title,s=o.icon_image_url,r=o.ad;return'\n <div class="storyly__story-header">\n <div class="storyly__story-info">\n <div\n role="text"\n aria-hidden="true"\n style="\n font-family: '.concat((0,t.getFontFamily)({font:"Storyly-Inter",instanceId:a}),";\n ").concat(n.get("storylyMail")||e.inboxStory?"visibility: hidden":"",'\n "\n class="storyly__sg-info"\n title="').concat(i.length>25?i:"",'">\n ').concat(r?'<div class="ad-group-icon"></div>':"<img src=".concat(s,' aria-hidden="true" alt="Story Group Icon" />'),"\n <h4>").concat(i,'</h4>\n </div>\n <div class="storyly__story-actions">\n <button type="button" aria-label="Share Story" tabindex="30" data-type="share" class="action icon" hidden></button>\n <button type="button" aria-label="Mute Story" tabindex="35" data-type="sound" class="action icon sound-off" hidden></button>\n <button type="button" aria-label="Pause Story" tabindex="40" data-type="play-pause" class="action icon pause" hidden></button>\n <button type="button" id="storyly__close-story-button" aria-label="Close Story" tabindex="45" class="action icon close" data-type="close" hidden></button>\n </div>\n </div>\n </div>\n')};exports.default=o;
|
|
402
|
+
},{"../../../lib/util":"PesM"}],"Otdq":[function(require,module,exports) {
|
|
403
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=function(){return'\n <div class="progress">\n <span></span>\n </div>\n'};exports.default=e;
|
|
404
|
+
},{}],"YcfY":[function(require,module,exports) {
|
|
405
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=m(require("@babel/runtime/helpers/defineProperty")),t=m(require("@babel/runtime/helpers/slicedToArray")),r=m(require("@babel/runtime/helpers/asyncToGenerator")),s=m(require("@babel/runtime/helpers/classCallCheck")),i=m(require("@babel/runtime/helpers/createClass")),o=m(require("@babel/runtime/regenerator")),a=m(require("../Story")),n=m(require("../../../components/BottomSheet")),l=m(require("../../../components/StoryCart")),h=m(require("../../../constants/playmode")),d=require("../../../lib/style"),u=require("../../../lib/util"),c=m(require("../../../lib/storage")),p=m(require("../templates/storyHeader")),y=m(require("../templates/storyProgress")),_=require("../../../lib/icons"),v=require("../../../constants/events"),g=m(require("../../../lib/proxy"));function m(e){return e&&e.__esModule?e:{default:e}}function b(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,s)}return r}function I(t){for(var r=1;r<arguments.length;r++){var s=null!=arguments[r]?arguments[r]:{};r%2?b(Object(s),!0).forEach(function(r){(0,e.default)(t,r,s[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(s)):b(Object(s)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(s,e))})}return t}var f=function(){function e(t,r,i){(0,s.default)(this,e),this.group_=t,this.key_=r,this.storyInstances_=[],this.progressDoms_=[],this.activeStoryIndex_=0,this.lastSeenStoryIndex_=0,this.playable_=!0,this.loadded_=!1,this.groupWrapper_=null,this.instanceId_=i,this.attachCallbacksToElement_(),c.default.setInstanceId(this.instanceId_)}return(0,i.default)(e,[{key:"attachCallbacksToElement_",value:function(){this.nextStory=this.nextStory.bind(this),this.prevStory=this.prevStory.bind(this),this.hide=this.hide.bind(this),this.handleClickEmbedPlay_=this.handleClickEmbedPlay_.bind(this)}},{key:"render",value:function(){this.groupWrapper_=document.createElement("div"),(0,d.setClass)(this.groupWrapper_,["storyly__story-group","swiper-slide"]),(0,u.setAttribute)(this.groupWrapper_,"aria-hidden","true"),(0,u.setAttribute)(this.groupWrapper_,"role","presentation"),this.playable_&&(0,u.setAttribute)(this.groupWrapper_,"playable",this.playable_),this.groupWrapper_.dataset.id=this.group_.group_id,this.storiesContainer_=document.createElement("div"),(0,d.setClass)(this.storiesContainer_,"storyly__stories-container"),this.groupWrapper_.appendChild(this.storiesContainer_);var e=g.default.getNodeByInstanceId(this.instanceId_).getDataFromGlobal().globalInstanceData;return this.globalInstanceData=e,this.globalInstanceData.storylyEmbed.init&&this.renderEmbedAssets_(),this.renderBottomSheet_(),this.renderProductCart_(),Promise.resolve(this.groupWrapper_)}},{key:"renderProductCart_",value:function(){var e=(0,r.default)(o.default.mark(function e(){var r,s;return o.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:r=(0,u.getProductLayers)(this.group_),s=(0,t.default)(r,1),s[0].length&&(this.storyCart=new l.default({instanceId:this.instanceId_,parentDom:this.groupWrapper_}));case 2:case"end":return e.stop()}},e,this)}));return function(){return e.apply(this,arguments)}}()},{key:"renderBottomSheet_",value:function(){var e=this;this.bottomSheet_=new n.default({parentDom:this.groupWrapper_,instanceId:this.instanceId_}),this.groupWrapper_.addEventListener("onBottomSheetOpen",function(t){var r=t.detail;e.bottomSheet_.activate(r.body,r.footer,r.rerender)})}},{key:"renderEmbedAssets_",value:function(){this.playable_=!1,this.embedContainer_=document.createElement("div");var e=(0,u.generateHtmlFromTemplate)(_.embedPlayIcon),t=(0,u.generateHtmlFromTemplate)(_.embedRePlayIcon);t.classList.add("re-play-icon"),e.classList.add("play-icon"),(0,d.setClass)(this.embedContainer_,["storyly__embed-play-container","play"]),this.embedContainer_.appendChild(e),this.embedContainer_.appendChild(t),(0,u.setClickEventListener)(this.embedContainer_,this.handleClickEmbedPlay_),(0,u.stopEventBubbling)(this.embedContainer_,"click"),(0,u.stopEventBubbling)(this.embedContainer_,"pointerdown"),(0,u.stopEventBubbling)(this.embedContainer_,"pointerup"),(0,u.stopEventBubbling)(this.embedContainer_,"pointermove"),this.groupWrapper_.appendChild(this.embedContainer_)}},{key:"handleClickEmbedPlay_",value:function(){this.playable_=!0,this.globalInstanceData.storylyEmbed.canPlay=!0,(0,u.removeAttribute)(this.groupWrapper_,"playable"),(0,u.removeAttribute)(this.groupWrapper_,"replay"),this.storyInstances_[this.activeStoryIndex_].playByEmbed()}},{key:"handleEmbedReplay_",value:function(){var e=this.storyInstances_[this.activeStoryIndex_];this.playable_=!1,(0,u.setAttribute)(this.groupWrapper_,"playable",this.playable_),(0,u.setAttribute)(this.groupWrapper_,"replay",this.playable_),e.hide({isBack:!0}),this.activeStoryIndex_=0,this.loadState_(),this.progressDoms_.forEach(function(e){(0,d.removeClass)(e,"seen")}),this.globalInstanceData.storylyEmbed.canPlay=!1,this.show()}},{key:"renderStoryHeader_",value:function(){var e,t=(0,u.generateHtmlFromTemplate)((0,p.default)(this.group_,this.instanceId_,this.globalInstanceData));null===(e=this.storiesContainer_.querySelector(".storyly__story-header"))||void 0===e||e.remove(),this.storiesContainer_.prepend(t),(0,u.stopEventBubbling)(t),(0,u.isMobileView)()&&((0,u.stopEventBubbling)(t,this.globalInstanceData.storylyEmbed.init?"pointerdown":"touchstart"),(0,u.stopEventBubbling)(t,this.globalInstanceData.storylyEmbed.init?"pointerup":"touchend"),(0,u.stopEventBubbling)(t,"touchmove")),this.renderProgressLines_(t)}},{key:"renderAccessibilityButton_",value:function(){if(this.globalInstanceData.storiesHasAltText&&(0,u.isMobileView)()){var e=this.globalInstanceData.accessibility,t=document.createElement("button");t.classList.add("accessibility-switch-button"),t.setAttribute("data-pressed",e),t.ariaLabel=e?"Disable accessibility":"Double tap to enable accessibility";var r=(0,u.generateHtmlFromTemplate)(_.accessibilityIcon);t.appendChild(r),(0,u.stopEventBubbling)(t,"touchstart"),(0,u.stopEventBubbling)(t,"touchend"),this.storiesContainer_.prepend(t)}}},{key:"renderProgressLines_",value:function(e){var t=document.createElement("div");(0,d.setClass)(t,"progress-wrapper");for(var r=this.group_.stories.length,s=0;s<r;s+=1){var i=(0,u.generateHtmlFromTemplate)((0,y.default)());s<this.activeStoryIndex_&&(0,d.setClass)(i,"seen"),t.appendChild(i),this.progressDoms_.push(i)}e.prepend(t)}},{key:"prevStory",value:function(){var e=this;if(this.playable_)if(this.globalInstanceData.shareParams.playMode!==h.default.STORY||this.globalInstanceData.shareParams.group.group_id!==this.group_.group_id){var t=this.storyInstances_[this.activeStoryIndex_];if(0===this.activeStoryIndex_)return(0,u.createAndDispatchEvent)(this.groupWrapper_,"onPrevGroup"),void(0!==this.key_&&t.hide({holdActive:!0,isBack:!0}));t.hide({isBack:!0}),this.bottomSheet_.deactivate(),this.storyState_().remove(),this.activeStoryIndex_-=1,this.lastSeenStoryIndex_=this.activeStoryIndex_,this.renderStories_().then(function(){e.storyInstances_[e.activeStoryIndex_].show(),(0,u.createAndDispatchEvent)(e.groupWrapper_,"onStoryImpression")})}else(0,u.createAndDispatchEvent)(this.groupWrapper_,"onCloseGroup")}},{key:"nextStory",value:function(e,t){var r=this;if(this.playable_)if(this.globalInstanceData.shareParams.playMode!==h.default.STORY||this.globalInstanceData.shareParams.group.group_id!==this.group_.group_id){var s=this.storyInstances_[this.activeStoryIndex_];if(this.group_.stories.length-1===this.activeStoryIndex_)return this.globalInstanceData.storylyEmbed.init?void this.handleEmbedReplay_():(this.storyState_().add(),(0,u.createAndDispatchEvent)(this.groupWrapper_,"onNextGroup",{gesture:t}),void s.hide({isBack:!0}));this.bottomSheet_.deactivate(),s.hide(),this.activeStoryIndex_+=1,this.lastSeenStoryIndex_=this.activeStoryIndex_,this.storyState_().add(),this.renderStories_().then(function(){r.storyInstances_[r.activeStoryIndex_].show(),(0,u.createAndDispatchEvent)(r.groupWrapper_,"onStoryImpression"),(0,u.createAndDispatchEvent)(r.groupWrapper_,"onStoryComplete")})}else(0,u.createAndDispatchEvent)(this.groupWrapper_,"onCloseGroup")}},{key:"renderStories_",value:function(){var e=this,t=this.activeStoryIndex_-1,r=this.activeStoryIndex_+1,s=this.activeStoryIndex_,i=this.group_.stories.length-1,o=[];return t>=0&&!this.storyInstances_[t]&&o.push({story:this.group_.stories[t],key:t}),s>=0&&!this.storyInstances_[s]&&o.push({story:this.group_.stories[s],key:s}),r<=i&&!this.storyInstances_[r]&&o.push({story:this.group_.stories[r],key:r}),o.forEach(function(t){var r=t.story,s=t.key;e.storyInstances_[s]=new a.default({story:r,key:s,group:e.group_,storiesContainer:e.storiesContainer_,progressDoms:e.progressDoms_,instanceId:e.instanceId_})}),(0,d.setClass)(this.storyInstances_[this.activeStoryIndex_].storyDom_,"active"),Promise.resolve()}},{key:"loadState_",value:function(){var e=this.storyState_().get();this.activeStoryIndex_=e}},{key:"storyState_",value:function(){var e=this,t=this.group_.group_id;return{add:function(){var r,s=c.default.getItemFromInstance("Storyly_story-state"),i=e.group_.stories[e.activeStoryIndex_];(null===(r=s[t])||void 0===r?void 0:r.some(function(e){return e.storyId===i.story_id}))||(s[t]?s[t].push({storyIndex:e.activeStoryIndex_,storyId:i.story_id,time:Date.now()}):s[t]=[{storyIndex:e.activeStoryIndex_,storyId:i.story_id,time:Date.now()}],c.default.setItemToInstance("Storyly_story-state",s))},remove:function(r){var s,i=c.default.getItemFromInstance("Storyly_story-state"),o=e.group_.stories[e.activeStoryIndex_].story_id;r&&(o=r);var a=null===(s=i[t])||void 0===s?void 0:s.filter(function(e){return e.storyId!==o});i[t]=null!=a?a:{},c.default.setItemToInstance("Storyly_story-state",i)},get:function(){var r=I({},c.default.getItemFromInstance("Storyly_story-state")||{}),s=0;if(r[t]){var i,o=!0,a=r[t].map(function(e){return e.storyId});return e.group_.stories.forEach(function(e,t){"number"!=typeof i?a.includes(e.story_id)||(i=t,o=!1):o=!1}),o?0:(s=i)>=0?s:(a.forEach(function(t){var r=e.group_.stories.findIndex(function(e){return e.story_id===t});r>=0?s=r:e.storyState_().remove(t)}),s)}return s}}}},{key:"handleProgressBarByParameters_",value:function(e){for(var t=this.progressDoms_.length,r=0;r<t;r+=1)r<e?(0,d.setClass)(this.progressDoms_[r],"seen"):(0,d.removeClass)(this.progressDoms_[r],"seen")}},{key:"sendGroupViewedEvent_",value:function(){var e=I({},this.group_);(0,u.createAndDispatchEvent)(this.groupWrapper_,"onCustomerEvent",{eventName:v.CustomerEventTypes.onStoryGroupViewed,params:e})}},{key:"show",value:function(){var e;this.sendGroupViewedEvent_(),this.storyInstances_[this.activeStoryIndex_].show(),this.storyState_().add(),null===(e=this.storyCart)||void 0===e||e.refresh()}},{key:"loadStoryLayers",value:function(){this.storyInstances_[this.activeStoryIndex_].renderLayer()}},{key:"load",value:function(){this.loadded_||(this.loadState_(),this.storyInstances_=[],this.progressDoms_=[],this.renderStoryHeader_(),this.renderStories_(),this.renderAccessibilityButton_(),this.loadded_=!0)}},{key:"loadByParameters",value:function(e){this.load(),(0,d.removeClass)(this.storyInstances_[this.activeStoryIndex_].storyDom_,"active"),this.activeStoryIndex_=e,this.loadedByParameters_=!0;var t=this.group_.stories[e].story_id;this.storiesContainer_.querySelector('[data-story-id="'.concat(t,'"]'))||(this.storyInstances_[e]=new a.default({story:this.group_.stories[e],key:e,group:this.group_,storiesContainer:this.storiesContainer_,progressDoms:this.progressDoms_,instanceId:this.instanceId_})),this.handleProgressBarByParameters_(e)}},{key:"unLoad",value:function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).holdActive,t=void 0!==e&&e,r=this.group_.stories.length-1===this.activeStoryIndex_;this.storyInstances_[this.activeStoryIndex_].hide({holdActive:!r&&!this.loadedByParameters_&&t}),this.bottomSheet_.deactivate(),this.loadedByParameters_&&(this.loadState_(),this.loadedByParameters_=!1,this.handleProgressBarByParameters_(this.activeStoryIndex_)),r&&(this.activeStoryIndex_=0,this.storyInstances_[0]||(this.storyInstances_[0]=new a.default({story:this.group_.stories[0],key:0,group:this.group_,storiesContainer:this.storiesContainer_,progressDoms:this.progressDoms_,instanceId:this.instanceId_})),this.progressDoms_.forEach(function(e){(0,d.removeClass)(e,"seen")}))}},{key:"hide",value:function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).holdActive,t=void 0!==e&&e;this.unLoad({holdActive:t}),this.globalInstanceData.shareParams={}}},{key:"getActiveStory",value:function(){var e,t=this.storyInstances_[this.activeStoryIndex_];return I(I({},null!==(e=this.group_.stories[this.activeStoryIndex_])&&void 0!==e?e:{}),{},{storyIndex:this.activeStoryIndex_,instance:t})}},{key:"getPrevStory",value:function(){var e,t=this.storyInstances_[this.activeStoryIndex_-1];return I(I({},null!==(e=this.group_.stories[this.activeStoryIndex_-1])&&void 0!==e?e:{}),{},{instance:t})}},{key:"setKey",value:function(e){this.key_=e}},{key:"isAllStoriesSeen",value:function(){return this.group_.stories.length-1===this.lastSeenStoryIndex_}},{key:"sendGroupClickedEvent",value:function(e,t){var r=I(I({},this.group_),{},{gesture_type:(0,u.getGestureType)(e)});(0,u.createAndDispatchEvent)(this.groupWrapper_,"onCustomerEvent",{eventName:"next"===t?v.CustomerEventTypes.onNextStoryGroup:v.CustomerEventTypes.onPreviousStoryGroup,params:r})}}]),e}(),S=f;exports.default=S;
|
|
406
|
+
},{"@babel/runtime/helpers/defineProperty":"IxO8","@babel/runtime/helpers/slicedToArray":"HETk","@babel/runtime/helpers/asyncToGenerator":"agGE","@babel/runtime/helpers/classCallCheck":"fcMS","@babel/runtime/helpers/createClass":"P8NW","@babel/runtime/regenerator":"PMvg","../Story":"eUG5","../../../components/BottomSheet":"l2Mf","../../../components/StoryCart":"TJeL","../../../constants/playmode":"Ooqf","../../../lib/style":"vgU2","../../../lib/util":"PesM","../../../lib/storage":"NA5d","../templates/storyHeader":"R5lM","../templates/storyProgress":"Otdq","../../../lib/icons":"irwm","../../../constants/events":"d0lR","../../../lib/proxy":"qmVm"}],"egGP":[function(require,module,exports) {
|
|
407
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var t=s(require("@babel/runtime/helpers/classCallCheck")),e=s(require("@babel/runtime/helpers/createClass")),n=s(require("../../constants/directions")),r=require("../../lib/util"),i=s(require("./Group"));require("../../layers/base");var a=s(require("../../lib/proxy"));function s(t){return t&&t.__esModule?t:{default:t}}var o=function(){function s(e,n){(0,t.default)(this,s),this.groupsOverlay_=e,this.instanceId_=n;var r=a.default.getNodeByInstanceId(n).getDataFromGlobal().globalInstanceData;this.globalInstanceData=r,this.globalInstanceData.storylyEmbed.init||this.renderGroupActions_(),this.renderGroupNavigations_=this.renderGroupNavigations_.bind(this),this.groupsOverlay_.addEventListener("onAccessibilityTriggered",this.renderGroupNavigations_)}return(0,e.default)(s,[{key:"setGroupInstance",value:function(t,e){return new i.default(t,e,this.instanceId_)}},{key:"renderGroupActions_",value:function(){var t=this,e=document.createElement("button");(0,r.setAttribute)(e,"aria-label","Close"),e.classList.add("storyly__mobile-view-close-story"),e.tabIndex="50",e.setAttribute("direction",this.globalInstanceData.direction),this.groupsOverlay_.appendChild(e),(0,r.stopEventBubbling)(e,"touchstart"),(0,r.setClickEventListener)(e,function(){(0,r.createAndDispatchEvent)(t.groupsOverlay_,"onCloseGroup")}),this.renderGroupNavigations_()}},{key:"renderGroupNavigations_",value:function(t){var e=(0,r.isMobileView)(),i=this.globalInstanceData,a=i.accessibility,s=i.direction,o=this.groupsOverlay_.querySelector(".storyly__group-container");if(!t||t.detail.accessibilityEnabled){var u='\n <div class="navigation-buttons" style="'.concat(e&&!a||!e&&a?"display: none":"",'">\n <div class="navigate-button prev-button">\n <button aria-label="Previous story in a current group" tabindex="5"></button>\n </div>\n <div class="navigate-button next-button" >\n <button aria-label="Next story in a current group" tabindex="25"></button>\n </div>\n </div>\n '),l=(0,r.generateHtmlFromTemplate)(u),c=l.querySelector(".next-button"),d=l.querySelector(".prev-button");a&&(l.classList.add("accessibility-navigation-buttons"),(0,r.stopEventBubbling)(c,"touchstart"),(0,r.stopEventBubbling)(c,"touchend"),(0,r.stopEventBubbling)(d,"touchstart"),(0,r.stopEventBubbling)(d,"touchend")),(0,r.setClickEventListener)(c,function(){return(0,r.createAndDispatchEvent)(o,s===n.default.RTL?"onPrevStory":"onNextStory")}),(0,r.setClickEventListener)(d,function(){return(0,r.createAndDispatchEvent)(o,s===n.default.RTL?"onNextStory":"onPrevStory")}),o.appendChild(l)}else{var b=o.querySelector(".navigation-buttons");o.removeChild(b)}}}]),s}(),u=o;exports.default=u;
|
|
408
|
+
},{"@babel/runtime/helpers/classCallCheck":"fcMS","@babel/runtime/helpers/createClass":"P8NW","../../constants/directions":"w67G","../../lib/util":"PesM","./Group":"YcfY","../../layers/base":"skR7","../../lib/proxy":"qmVm"}],"Lwlj":[function(require,module,exports) {
|
|
409
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=k(require("@babel/runtime/helpers/toConsumableArray")),t=k(require("@babel/runtime/helpers/slicedToArray")),r=k(require("@babel/runtime/helpers/asyncToGenerator")),s=k(require("@babel/runtime/helpers/defineProperty")),o=k(require("@babel/runtime/helpers/classCallCheck")),n=k(require("@babel/runtime/helpers/createClass")),i=k(require("@babel/runtime/helpers/inherits")),a=k(require("@babel/runtime/helpers/possibleConstructorReturn")),u=k(require("@babel/runtime/helpers/getPrototypeOf")),l=k(require("@babel/runtime/helpers/wrapNativeSuper")),d=k(require("@babel/runtime/regenerator")),h=require("uuid"),c=k(require("./lib/api")),p=k(require("./lib/storage")),_=require("./lib/style"),y=require("./lib/util"),v=k(require("./constants/playmode"));require("./main.scss");var g=require("./service/custom-story-group-design-impl"),f=require("./constants/common"),m=require("./service"),S=k(require("./constants/layouts")),b=require("./constants/events"),w=k(require("./constants/directions")),C=require("./constants/layerTypes"),E=k(require("./layouts/Modern")),I=k(require("./layouts/Classic")),G=k(require("./constants/barLayouts"));function k(e){return e&&e.__esModule?e:{default:e}}function x(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,s)}return r}function P(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?x(Object(r),!0).forEach(function(t){(0,s.default)(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):x(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function A(e){var t=T();return function(){var r,s=(0,u.default)(e);if(t){var o=(0,u.default)(this).constructor;r=Reflect.construct(s,arguments,o)}else r=s.apply(this,arguments);return(0,a.default)(this,r)}}function T(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}var D=function(s){(0,i.default)(u,s);var a=A(u);function u(){var e;return(0,o.default)(this,u),(e=a.call(this)).groupShadowRoot_=e.attachShadow({mode:"open"}),e.storyShadowRoot_=null,e.groups_=[],e.token_=null,e.externalData_=[],e.uuid_=null,e.sessionId_=null,e.selectedGroup_={},e.storylyOpen_=!1,e.retryCount_=0,e.shareParams_={},e.openStoryParams_=null,e.seenGroups_=[],e.groupCircleNodes_=[],e.hiddenPersonalizedGroupCircleNodes_=[],e.currentGroupIndex_=0,e.adGroups_=[],e.adSettings_={},e.properties_={storyGroupTextColor:"#333",storyGroupTextVisibility:!0,storyGroupSize:"56x56",storyGroupBorderRadius:12,storyGroupTextFont:"Arial",storyTextFont:"Storyly-Poppins",storyGroupAlign:"center",storyGroupMarginHorizontal:12,storyGroupIconBorderColorNotSeen:[],storyGroupIconBorderColorSeen:[],storyGroupTextSize:12,storyGroupTextWeight:"normal",storyGroupBorderSize:4,storyGroupTextLineHeight:1,storyGroupPinBackgroundColor:"#FFCB00",storyGroupPinBorderColor:"",storyGroupPinIcon:null,storyGroupTextMarginTop:6,storyGroupTextSeenColor:"#333",storyBorderGapSize:2,storyBorderGapColor:"#fff",storyGroupAnimation:{},scrollIndicatorOptions:{indicatorWidth:32,indicatorHeight:32,indicatorBorderRadius:16,indicatorBorderColor:"#D8D8D8",indicatorBoxBackgroundColor:"#FFFFFF",indicatorDefaultIconsColor:"#000000",indicatorBoxShadow:"none",customLeftIndicator:"",customRightIndicator:"",leftIndicatorMargin:8,rightIndicatorMargin:8}},e.events_={},e.payload_={app:{bundle:window.location.host,version:"1.0.0"},device:{height:window.innerHeight,unique_id:null,locale:navigator.language,timezone:Intl.DateTimeFormat().resolvedOptions().timeZone,width:window.innerWidth,userAgent:navigator.userAgent,is_test:!1},geo:{country:"US",lat:0,long:0},sdk_version:"latest",user:{segments:null},custom_parameter:null,session_id:null,preview_session_id:null,payload:{}},e.swipingDown_={scrollY:0,pageY:0},e.swiperMove_=!1,e.isMobileView_=(0,y.isMobileView)(),e.layout_=S.default.MODERN,e.layoutInstance_=null,e.userConfig_={},e.hasAdblocker_=!1,e.storylyConnected_=!1,e.init_=!1,e.sentry_=new m.SentryImpl,e.documentDir_=document.documentElement.dir||w.default.LTR,e.storylyCheckoutProducts={products:[],price:"",sales_price:"",price_currency:""},e.isStorylyCartActive=!1,e.storylyHydration=[],e.globalInstanceData={shareParams:{},direction:e.documentDir_,accessibility:p.default.getItemFromGlobal("accessibilitiy",!1),storylyEmbed:{},videoMuted:!0},e.storylyWebCss_=null,e}return(0,n.default)(u,[{key:"connectedCallback",value:function(){var e=this;this.storylyConnected_||(this.attachCallbacksToElement_(),this.renderMainDoms_(),this.adBlockerDetector_(),this.storylyConnected_=!0,this.sentry_.init(),window.addEventListener("resize",function(){e.isMobileView_&&(0,m.calcStorySizeImpl)(e.groupsOverlay_),e.setOverlayVh_()}))}},{key:"attachCallbacksToElement_",value:function(){this.handleNextGroup_=this.handleNextGroup_.bind(this),this.handlePrevGroup_=this.handlePrevGroup_.bind(this),this.handleCloseGroup_=this.handleCloseGroup_.bind(this),this.handleContainerTouchStart_=this.handleContainerTouchStart_.bind(this),this.handleContainerTouchEnd_=this.handleContainerTouchEnd_.bind(this),this.handleContainerTouchMove_=this.handleContainerTouchMove_.bind(this),this.handleNextStory_=this.handleNextStory_.bind(this),this.handlePrevStory_=this.handlePrevStory_.bind(this),this.handleImpressionEvent_=this.handleImpressionEvent_.bind(this),this.handleKeyboard_=this.handleKeyboard_.bind(this),this.handleClickGroup_=this.handleClickGroup_.bind(this),this.handleContextMenu_=this.handleContextMenu_.bind(this),this.getStoryGroupElement_=this.getStoryGroupElement_.bind(this),this.groupObserverCallback_=this.groupObserverCallback_.bind(this),this.handleTabVisibility_=this.handleTabVisibility_.bind(this),this.handleCustomerEvent_=this.handleCustomerEvent_.bind(this)}},{key:"renderMainDoms_",value:function(){this.storyShadowDom_=document.createElement("storyly-stories"),this.storyShadowRoot_=this.storyShadowDom_.attachShadow({mode:"open"}),this.storyShadowDom_.setAttribute("tabindex","-1"),this.storyShadowDom_.setAttribute("role","application"),this.setAttribute("role","application"),this.swiperContainer_=document.createElement("div"),this.swiperWrapper_=document.createElement("div"),this.groupContainer_=document.createElement("div"),this.groupsWrapper_=document.createElement("div"),this.groupsList_=document.createElement("div"),this.groupsOverlay_=document.createElement("div");var e=this.parentElement.parentElement;if("STORYLY-WEB-EMBED"===e.nodeName){e.firstElementChild.appendChild(this.storyShadowDom_),this.globalInstanceData.storylyEmbed={init:!0,autoPlay:e.hasAttribute("autoplay"),closeButton:e.hasAttribute("useClose"),shareButton:e.hasAttribute("useShare"),container:e,canPlay:!1},(0,y.setAttribute)(this.groupsOverlay_,"embed-mode",!0),(0,y.setAttribute)(this.groupsWrapper_,"embed-mode",!0);var t=e.getAttribute("group");this.openStoryParams_=[t]}else document.body.appendChild(this.storyShadowDom_);var r=[w.default.LTR,w.default.RTL].includes(this.documentDir_)?this.documentDir_:w.default.LTR;this.globalInstanceData.direction=r,(0,y.setAttribute)(this.swiperContainer_,"dir",r),(0,y.setAttribute)(this.groupsOverlay_,"direction",r),(0,y.setAttribute)(this.groupsList_,"role","list"),(0,y.setAttribute)(this.groupsOverlay_,"role","dialog"),(0,y.setAttribute)(this.groupsOverlay_,"aria-modal","true"),this.groupsOverlay_.style.visibility="hidden",(0,_.setClass)(this.groupContainer_,"storyly__group-container"),(0,_.setClass)(this.swiperContainer_,"swiper"),(0,_.setClass)(this.swiperWrapper_,"swiper-wrapper"),(0,_.setClass)(this.groupsWrapper_,"storyly__story-groups"),(0,_.setClass)(this.groupsOverlay_,"storyly__groups-overlay"),(0,_.setClass)(this.groupsList_,"storyly__groups-list"),this.groupsWrapper_.appendChild(this.groupsList_),this.swiperContainer_.appendChild(this.swiperWrapper_),this.groupContainer_.appendChild(this.swiperContainer_),this.groupsOverlay_.appendChild(this.groupContainer_),this.storyShadowRoot_.appendChild(this.groupsOverlay_),this.groupShadowRoot_.appendChild(this.groupsWrapper_)}},{key:"init",value:function(e){var t=this;if(!this.init_){this.init_=!0,this.userConfig_=null!=e?e:{};var s=p.default.getItemFromGlobal("Storyly_userConfig");this.userConfigChanged_=JSON.stringify(P(P({},s),{},{props:void 0}))!==JSON.stringify(P(P({},e),{},{props:void 0})),p.default.setItemToGlobal("Storyly_userConfig",this.userConfig_);var o=this.userConfig_,n=o.token,i=o.props,a=o.events,u=o.externalData,l=o.userPropertyData,c=o.customStoryGroupHTML,v=o.presentationData,g=o.layout,f=o.barLayout,b=o.isProductFallbackEnabled,w=o.inboxStory;if(!n)throw new Error("Token not found!");this.token_=n;var C=!v&&(0,y.decodeJwt)(this.token_);this.instanceId_=v?n:C.ins_id,(0,y.setAttribute)(this,"data-storyly-instance-id",this.instanceId_),(0,y.setAttribute)(this.storyShadowDom_,"data-storyly-instance-id",this.instanceId_),this.uuid_=p.default.setInstanceId(this.instanceId_).getItemFromInstance("Storyly_uuid",!1)||p.default.setInstanceId(this.instanceId_).setItemToInstance("Storyly_uuid",(0,h.v4)(),!1),this.sessionId_=p.default.setInstanceId(this.instanceId_).setItemToInstance("Storyly_session_id",(0,h.v4)(),!1),this.presentationData_=v,this.externalData_=Array.isArray(u)?u:[],this.isProductFallbackEnabled_=!!b;var E=this.globalInstanceData.storylyEmbed.init?S.default.CLASSIC:null==g?void 0:g.toLocaleLowerCase(),I=[S.default.MODERN,S.default.CLASSIC].includes(E);if(this.layout_=I?null==g?void 0:g.toLowerCase():S.default.MODERN,f&&[G.default.CLASSIC,G.default.ENERGIZED].includes(f.view)&&!c){var k,x=320;(null===(k=f.style)||void 0===k?void 0:k.height)>0&&(x=f.style.height<200?200:f.style.height),this.barLayout_=P(P({},f),{},{style:P(P({},null==f?void 0:f.style),{},{height:x})}),(0,_.setStyle)(this.groupsWrapper_,["padding","".concat(.1*this.barLayout_.style.height,"px")]),this.customStoryGroupHTML_=(0,m.barLayoutImpl)(this.barLayout_,this)}this.isMobileView_&&(this.layout_=S.default.CLASSIC),l&&"Object"===Object.getPrototypeOf(l).constructor.name&&!v?this.userPropertyData_=l:this.setPropsByParams_(),this.properties_=P(P(P({},this.properties_),i),{},{scrollIndicatorOptions:P(P({},this.properties_.scrollIndicatorOptions),(null==i?void 0:i.scrollIndicatorOptions)||{})}),c&&(0,y.isStringHTML)(c)&&(this.customStoryGroupHTML_=c,this.properties_.storyGroupAnimation=void 0),this.events_=null!=a?a:{},this.globalInstanceData.events=this.events_,this.globalInstanceData.properties=this.properties_,this.globalInstanceData.presentationData=!!this.presentationData_,this.globalInstanceData.layout=this.layout_,this.globalInstanceData.inboxStory=w,this.sentry_.errorWrapper((0,r.default)(d.default.mark(function e(){return d.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return t.loadInlineStyle_(),e.next=3,t.setLayoutInstance_();case 3:t.setPayload_(),t.buildCallback_(),t.implementEvent_();case 6:case"end":return e.stop()}},e)})))}}},{key:"setPropsByParams_",value:function(){var e=new URLSearchParams(window.location.search),r={},s=e.get("userProps"),o=e.get("customParameter");s&&(s.split(",").forEach(function(e){var s=e.split(":"),o=(0,t.default)(s,2),n=o[0],i=o[1];r["{".concat(n,"}")]=i}),this.userPropertyData_=r);o&&(this.userConfig_=P(P({},this.userConfig_),{},{customParameter:o}))}},{key:"setStorylyBarObserver_",value:function(){var e=this;(0,m.intersectionObserverImpl)(null,function(t){t.forEach(function(t){t.isIntersecting&&(e.isoTopeSorting_=(0,m.isotopeImpl)(e.groupsList_,e.instanceId_),e.setContainerHeight_(),(0,m.renderScrollIndicator)(e.groupsWrapper_,e.properties_),setTimeout(function(){return e.sendBarViewEvent_()},100))})}).observe(this)}},{key:"sendBarViewEvent_",value:function(){var e=[],t=[];this.groups_.forEach(function(r){var s=r;r.onView&&!r.viewEventSend&&(e.push(r.group_id),s.viewEventSend=!0),r.onView&&t.push(P(P({},r),{},{instance:void 0}))}),this.barViewed_=!0;var r={sg_ids:e},s={detail:{eventName:b.CustomerEventTypes.onRenderedStoryGroups,params:t}};this.EventImpl.onBarViewedEvent(r),this.handleCustomerEvent_(s)}},{key:"setLayoutInstance_",value:function(){var e=(0,r.default)(d.default.mark(function e(){var t,r,s;return d.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:this.layout_===S.default.MODERN?(t=new E.default(this.groupsOverlay_,this.getActiveGroup_.bind(this),this.instanceId_),this.layoutInstance_=t,(r=document.createElement("canvas")).width=3,r.height=3,(0,_.setClass)(r,"background-blur-canvas"),this.groupsOverlay_.appendChild(r)):(s=new I.default(this.groupsOverlay_,this.instanceId_),this.layoutInstance_=s),(0,_.setClass)(this.groupContainer_,this.layout_===S.default.MODERN?"storyly__modern-layout":"storyly__classic-layout"),this.globalInstanceData.storylyEmbed.init&&(0,y.setAttribute)(this.groupContainer_,"embed-mode",this.globalInstanceData.storylyEmbed.init),(0,y.setAttribute)(this.groupContainer_,"direction",this.documentDir_);case 4:case"end":return e.stop()}},e,this)}));return function(){return e.apply(this,arguments)}}()},{key:"implementEvent_",value:function(){var e=this.getActiveGroup_.bind(this),t=this.getPrevGroup_.bind(this),r=this.getNextGroup_.bind(this);this.EventImpl=new m.EventImpl(this.storyShadowRoot_,e,t,r,this.api_)}},{key:"setPayload_",value:function(){var e=this.userConfig_,t=e.is_test,r=e.segments,s=e.customParameter,o=(0,m.platformIml)(),n=o.os,i=o.browser;this.payload_=P(P({},this.payload_),{},{device:P(P({},this.payload_.device),{},{unique_id:this.uuid_,is_test:t,os:n,browser:i}),user:P(P({},this.payload_.user),{},{segments:null!=r?r:null}),custom_parameter:s?String(s):null,session_id:this.sessionId_}),this.globalInstanceData.eventPayload=this.payload_}},{key:"buildCallback_",value:function(){this.setAPI_(),this.setEventListeners_(),this.presentationData_?this.handleGroupsData_(this.presentationData_):this.fetchGroups_()}},{key:"setAPI_",value:function(){this.api_=new c.default(this.token_,this.instanceId_),this.globalInstanceData.API=this.api_}},{key:"setEventListeners_",value:function(){var e=this;this.storyShadowRoot_.addEventListener("onNextGroup",this.handleNextGroup_),this.storyShadowRoot_.addEventListener("onPrevGroup",this.handlePrevGroup_),this.storyShadowRoot_.addEventListener("onStoryImpression",this.handleImpressionEvent_),this.storyShadowRoot_.addEventListener("onCloseGroup",this.handleCloseGroup_),this.storyShadowRoot_.addEventListener("onNextStory",this.handleNextStory_),this.storyShadowRoot_.addEventListener("onPrevStory",this.handlePrevStory_),this.storyShadowRoot_.addEventListener("onCustomerEvent",this.handleCustomerEvent_),this.addEventListener("keydown",this.handleTabKeyPressListener_),this.layout_===S.default.MODERN&&this.storyShadowRoot_.addEventListener("onStoryChange",function(t){return(0,m.backgroundBlurImpl)(t,e.groupsOverlay_)}),(0,m.tabVisibilityImpl)(this.handleTabVisibility_)}},{key:"handleCustomerEvent_",value:function(e){var t=e.detail,r=t.eventName,s=t.params;this.handleEvent_(r,s)}},{key:"handleTabKeyPressListener_",value:function(e){var t=e.code,r=this.shadowRoot.activeElement;if(r=r||document.activeElement){this.lastActiveElement_=r;["Space","Enter"].includes(t)&&(r.classList.contains("group")||r.hasAttribute("slot"))&&(e.stopImmediatePropagation(),this.globalInstanceData.storiesHasAltText&&(this.globalInstanceData.accessibility=!0),this.handleClickGroup_({target:r}))}}},{key:"handleTabVisibility_",value:function(e){if(this.storylyOpen_&&this.globalInstanceData.storylyEmbed.canPlay){var t,r=this.getActiveStory_();if(document[e])r.instance.pause(!0);else null===(t=this.lastActiveElement_)||void 0===t||t.focus(),r.instance.play(!0)}}},{key:"setStoryNavigationEvents_",value:function(){this.isMobileView_&&(window.addEventListener(this.globalInstanceData.storylyEmbed.init?"pointerdown":"touchstart",this.handleContainerTouchStart_),window.addEventListener(this.globalInstanceData.storylyEmbed.init?"pointerup":"touchend",this.handleContainerTouchEnd_),this.globalInstanceData.storylyEmbed.init||window.addEventListener("touchmove",this.handleContainerTouchMove_),window.oncontextmenu=this.handleContextMenu_),this.globalInstanceData.storylyEmbed.init&&!this.isMobileView_&&this.groupsOverlay_.addEventListener("click",this.handleContainerTouchEnd_),window.addEventListener("keydown",this.handleKeyboard_)}},{key:"removeStoryNavigationEvents_",value:function(){this.isMobileView_&&(window.removeEventListener(this.globalInstanceData.storylyEmbed.init?"pointerdown":"touchstart",this.handleContainerTouchStart_),window.removeEventListener(this.globalInstanceData.storylyEmbed.init?"pointerup":"touchend",this.handleContainerTouchEnd_),this.globalInstanceData.storylyEmbed.init||window.removeEventListener("touchmove",this.handleContainerTouchMove_),window.oncontextmenu=null),window.removeEventListener("keydown",this.handleKeyboard_)}},{key:"handleContextMenu_",value:function(e){return e.preventDefault(),e.stopPropagation(),!1}},{key:"handleKeyboard_",value:function(e){var t=this.focusableEls_[0],r=this.focusableEls_[this.focusableEls_.length-1];if(("Tab"===e.key||9===e.keyCode)&&(e.shiftKey&&this.storyShadowRoot_.activeElement===t&&(r.focus(),e.preventDefault()),this.storyShadowRoot_.activeElement===r&&(t.focus(),e.preventDefault())),this.storylyOpen_){var s,o=e.key,n=e.code,i=e.keyCode,a=this.layout_===S.default.MODERN?{detail:{gesture:b.GestureTypes.Keyboard}}:void 0;if("ArrowRight"===o||39===i)this.documentDir_===w.default.RTL?this.handlePrevStory_(a):this.handleNextStory_(a);else if("ArrowLeft"===o||37===i)this.documentDir_===w.default.RTL?this.handleNextStory_(a):this.handlePrevStory_(a);else if("Escape"===o||27===i){var u=this.groupsOverlay_.querySelector(".storyly__action-container");if(null==u?void 0:u.classList.contains("active")){var l=this.groupsOverlay_.querySelector(".storyly__story-group-overlay");return u.classList.remove("active"),l.classList.remove("active"),this.getActiveStory_().instance.playAndPauseStory(),void this.storyShadowRoot_.activeElement.blur()}this.handleCloseGroup_(a)}else if("Space"!==n&&32!==i||"BUTTON"===(null===(s=this.storyShadowRoot_.activeElement)||void 0===s?void 0:s.tagName)){if("KeyS"===n){this.getActiveStory_().instance.renderShareWidget(b.GestureTypes.Keyboard)}}else{this.getActiveStory_().instance.playAndPauseStory({gesture:b.GestureTypes.Keyboard})}}}},{key:"handleContainerTouchStart_",value:function(e){e.stopPropagation(),this.handleNavigation_=!0,this.storyPauseByTouch_()}},{key:"handleContainerTouchEnd_",value:function(e){this.handleStoryNavigationByTouch_(e),!this.globalInstanceData.storylyEmbed.init&&this.isMobileView_&&this.closeStorylyBySwiping_(),this.storyPlayAfterTouched_()}},{key:"closeStorylyBySwiping_",value:function(){var e=this;this.swiperMove_||(this.swipingDown_.scrollY>15*this.groupContainer_.offsetHeight/100?(this.groupContainer_.style.setProperty("transform","translateY(50vh) scale(0)"),this.groupsOverlay_.style.setProperty("background","transparent"),window.requestAnimationFrame(function(){e.handleCloseGroup_(),setTimeout(function(){e.groupContainer_.style.removeProperty("transform"),e.groupsOverlay_.style.removeProperty("background")},300)})):this.groupContainer_.style.setProperty("transform","translateY(0)"),this.swipingDown_={scrollY:0,pageY:0})}},{key:"handleStoryNavigationByTouch_",value:function(e){var t,r,s;if(this.globalInstanceData.storylyEmbed.init||this.handleNavigation_&&this.isMobileView_){var o=null!==(t=null===(r=e.changedTouches)||void 0===r?void 0:null===(s=r[0])||void 0===s?void 0:s.pageX)&&void 0!==t?t:e.offsetX,n=this.groupsOverlay_.offsetWidth,i=20*n/100,a=n-20*n/100,u={detail:{gesture:"".concat(b.GestureTypes.ClickByTouch)}};o>0&&o<i?this.documentDir_===w.default.RTL?this.handleNextStory_(u):this.handlePrevStory_(u):o>a&&o<n&&(this.documentDir_===w.default.RTL?this.handlePrevStory_(u):this.handleNextStory_(u)),this.handleNavigation_=!0}}},{key:"handleContainerTouchMove_",value:function(e){this.handleNavigation_=!1;var t=e.changedTouches[0].pageY;this.swiperMove_||(this.swipingDown_.scrollY+=this.swipingDown_.pageY>0?t-this.swipingDown_.pageY:0,this.swipingDown_.pageY=t,this.swipingDown_.scrollY>=0&&(this.groupContainer_.style.transform="translateY(".concat(this.swipingDown_.scrollY,"px)")))}},{key:"storyPauseByTouch_",value:function(){var e=this;this.isMobileView_&&(this.touchTimeout_=setTimeout(function(){e.getActiveStory_().instance.pauseByTouch(),e.storyTouchAction_=!0,e.handleNavigation_=!1},300))}},{key:"storyPlayAfterTouched_",value:function(){if(this.isMobileView_){if(this.storyTouchAction_)this.getActiveStory_().instance.playAfterTouch();clearTimeout(this.touchTimeout_)}}},{key:"handleCloseGroup_",value:function(e){var t,r=this;if(this.storylyOpen_)if(this.globalInstanceData.storylyEmbed.init){var s=this.getActiveGroup_();this.handleEvent_("closeStoryGroup",P(P({},null!=s?s:{}),{},{instance:void 0}))}else{var o;if(e&&"detail"in e)o=e.detail.gesture;this.groupsOverlay_.ariaHidden="true",this.swiper_.slides[this.swiper_.realIndex].ariaHidden="true",this.storyShadowDom_.setAttribute("tabindex","-1"),(0,_.removeClass)(this.groupsOverlay_,"active"),this.storylyOpen_=!1,this.removeStoryNavigationEvents_(),this.addEventListener("keydown",this.handleTabKeyPressListener_),null===(t=this.lastActiveElement_)||void 0===t||t.focus(),this.EventImpl.handleCloseEvent(o),this.resetStyleToDocument_(),this.shareParams_.playMode&&(this.swiper_.allowTouchMove=!0),this.shareParams_={};var n=this.getActiveGroup_();if(this.handleEvent_("closeStoryGroup",P(P({},null!=n?n:{}),{},{instance:void 0})),n.instance.hide({holdActive:!0}),this.removeAdGroups_(),this.isAdEnable_()&&document.querySelectorAll(".storyly-ad-wrapper").forEach(function(e){return e.remove()}),this.customStoryGroupHTML_){var i=n.instance.getActiveStory().storyIndex,a=this.getStoryGroupElement_(n),u=this.getCustomGroupAssignedElement_(a);(0,g.handleCustomStoryGroupStyles)(n,u,i,this.instanceId_)}this.presentationData_||this.handleSeenGroupsPosition_().then(function(){r.isoTopeSorting_.updateSortData(),r.isoTopeSorting_.arrange({sortBy:"order"}),r.groups_.forEach(function(e,t){e.instance.setKey(t)})}).catch(function(){})}}},{key:"removeAdGroups_",value:function(){if(this.isAdEnable_()&&0!==this.adGroups_.length){var e=[],t=[];this.groups_.forEach(function(r,s){r.ad?t.push(s):e.push(r)}),this.groups_=e,this.swiper_.removeSlide(t)}}},{key:"handleSeenGroupsPosition_",value:function(){var e=this;return 0===this.seenGroups_.length?Promise.reject():(this.seenGroups_.forEach(function(t){var r=e.getStoryGroupElement_(t);if(!t.pinned){var s=e.groupCircleNodes_.length-1;e.groupCircleNodes_.forEach(function(e,t){e.dataset.ad||e.classList.contains("seen")&&r.dataset.order<+e.dataset.order||(s=t)});var o=+r.dataset.sortorder;e.groupCircleNodes_.splice(o,1),e.groupCircleNodes_.splice(s,0,r),e.groupCircleNodes_.forEach(function(t,r){e.customStoryGroupHTML_&&(e.getCustomGroupAssignedElement_(t).dataset.sortorder=r);t.dataset.ad||(e.groupsList_.querySelector('.storyly__story-group-container[data-id="'.concat(t.dataset.id,'"]')).dataset.sortorder=r);var s=e.hiddenPersonalizedGroupCircleNodes_.find(function(e){return e.dataset.id===t.dataset.id});s&&(s.dataset.sortOrder=t.dataset.sortorder,s.dataset.order=t.dataset.order)});var n=e.swiper_.slides[o];e.swiper_.removeSlide(o),e.swiper_.addSlide(s,n);var i=e.groups_[o];e.groups_.splice(o,1),e.groups_.splice(s,0,i)}e.customStoryGroupHTML_&&e.getCustomGroupAssignedElement_(r).classList.toggle("storyly__story-group-seen");r.classList.toggle("seen")}),this.seenGroups_=[],Promise.resolve())}},{key:"getActiveGroup_",value:function(){return this.groups_[this.currentGroupIndex_]}},{key:"getNextGroup_",value:function(){return this.groups_[this.currentGroupIndex_+1]}},{key:"getPrevGroup_",value:function(){return this.groups_[this.currentGroupIndex_-1]}},{key:"getActiveStory_",value:function(){return this.getActiveGroup_().instance.getActiveStory()}},{key:"getPrevStory_",value:function(){return this.getActiveGroup_().instance.getPrevStory()}},{key:"getCustomGroupAssignedElement_",value:function(e){return"SLOT"===e.tagName?e.assignedElements()[0]:e}},{key:"getStoryGroupElement_",value:function(e){return this.groupCircleNodes_.find(function(t){return+t.dataset.id===e.group_id})}},{key:"getActiveGroupWithoutInstance",value:function(){var e=P({},this.getActiveGroup_());return delete e.instance,delete e.currentOrder,delete e.onView,e}},{key:"handleNextGroup_",value:function(e){var t=e.detail.gesture;if(this.handleCompleteGroupEvent_(),this.shareParams_.playMode!==v.default.STORY_GROUP||this.getActiveGroup_().group_id!==this.shareParams_.group.group_id)if(this.currentGroupIndex_===this.groups_.length-1)this.handleCloseGroup_();else{if(this.getActiveGroup_().instance.sendGroupClickedEvent(t,"next"),t===b.GestureTypes.Button)this.getActiveStory_().instance.sendStoryClickedEvent(t,"next");var r=this.getNextGroup_();this.groups_[this.currentGroupIndex_].instance.unLoad({holdActive:!0}),this.currentGroupIndex_+=1,this.loadNextGroupInstance_(),this.swiper_.slideTo(this.currentGroupIndex_),r.instance.show(),this.EventImpl.handleSwipingGroupEvent("next",t),this.handleImpressionEvent_()}else this.handleCloseGroup_()}},{key:"handleCompleteGroupEvent_",value:function(){var e=this.getActiveGroup_();!e.ad&&e.instance.isAllStoriesSeen()&&(this.EventImpl.handleCompleteStoryEvent("groupCompleted"),this.EventImpl.handleCompleteGroupEvent())}},{key:"loadNextGroupInstance_",value:function(){var e=this.getNextGroup_(),t=this.getPrevGroup_();!e||null!=e&&e.onView||e.ad||this.loadGroupInstance_(e),!t||null!=t&&t.onView||t.ad||this.loadGroupInstance_(t)}},{key:"handlePrevGroup_",value:function(e){var t=e.detail.gesture;if(this.shareParams_.playMode!==v.default.STORY_GROUP||this.getActiveGroup_().group_id!==this.shareParams_.group.group_id){if(0!==this.currentGroupIndex_){if(this.getActiveGroup_().instance.sendGroupClickedEvent(t,"prev"),t===b.GestureTypes.Button)this.getActiveStory_().instance.sendStoryClickedEvent(t,"prev");var r=this.getPrevGroup_();this.groups_[this.currentGroupIndex_].instance.unLoad({holdActive:!0}),this.currentGroupIndex_-=1,this.loadNextGroupInstance_(),this.swiper_.slideTo(this.currentGroupIndex_),r.instance.show(),this.EventImpl.handleSwipingGroupEvent("prev",t),this.handleImpressionEvent_()}}else this.handleCloseGroup_()}},{key:"handleNextStory_",value:function(e){var t,r;if(e&&"detail"in e){var s=e.detail;t=s.gesture,r=s.storyIndex}this.getActiveStory_().instance.sendStoryClickedEvent(t,"next"),this.EventImpl.handleSwipingStoryEvent("next",t),this.getActiveGroup_().instance.nextStory(r,t)}},{key:"handlePrevStory_",value:function(e){var t,r;if(e&&"detail"in e){var s=e.detail;t=s.gesture,r=s.storyIndex}this.getActiveStory_().instance.sendStoryClickedEvent(t,"prev"),this.EventImpl.handleSwipingStoryEvent("prev",t),this.getActiveGroup_().instance.prevStory(r,t)}},{key:"fetchGroups_",value:function(){var e=this;if(!this.checkCacheData_()){var t,r=[],s=!1,o=setTimeout(function(){var o,n;s=!0;var i=p.default.setInstanceId(e.instanceId_).getItemFromInstance("Storyly_responseData");r=null!==(o=i.story_groups)&&void 0!==o?o:[],(t=null!==(n=i.ad)&&void 0!==n?n:{})&&(e.adSettings_=t),r?e.handleGroupsData_(r):(e.retryCount_+=1,e.retryCount_<3?e.fetchGroups_():e.removeStoryly_())},2e3);this.api_.getGroups(this.payload_).then(function(n){var i;n.error||(clearTimeout(o),p.default.setInstanceId(e.instanceId_).setItemToInstance("Storyly_responseData",P(P({},n),{},{ttl:Date.now()})),0!==n.story_groups.length?(r=n.story_groups,t=null!==(i=n.ad)&&void 0!==i?i:{},s||(e.adSettings_=t,e.handleGroupsData_(r))):e.removeStoryly_())})}}},{key:"checkCacheData_",value:function(){if("dashboard.storyly.io"===window.location.hostname||"docs.developers.storyly.io"===window.location.hostname||"dev.storyly"===window.location.hostname||this.userConfigChanged_)return!1;var e=p.default.setInstanceId(this.instanceId_).getItemFromInstance("Storyly_responseData"),t=e.story_groups,r=e.ads,s=e.ttl,o=new Date(Date.now()-s);if(t&&o.getMinutes()<5){var n=null!=t?t:[];return this.adSettings_=null!=r?r:{},this.handleGroupsData_(n),!0}return!1}},{key:"handleGroupsData_",value:function(){var s=(0,r.default)(d.default.mark(function s(){var o,n,i,a,u,l,h,c,p,_=this,y=arguments;return d.default.wrap(function(s){for(;;)switch(s.prev=s.next){case 0:if(o=y.length>0&&void 0!==y[0]?y[0]:[],n=o,i=new URLSearchParams(window.location.search),(this.globalInstanceData.storylyEmbed.init||i.get("storylyMail")||this.globalInstanceData.inboxStory)&&(a=(0,t.default)(this.openStoryParams_,1),u=a[0],n=n.filter(function(e){return e.group_id===+u})),!this.externalData_.length){s.next=10;break}return l=(0,e.default)(n),s.next=8,n.forEach(function(){var e=(0,r.default)(d.default.mark(function e(t,r){var s,o;return d.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(t.type!==f.groupTypes.PERSONALIZED){e.next=5;break}return e.next=3,(0,m.createPersonalizedImpl)(_.externalData_,t);case 3:s=e.sent,l[r]=s;case 5:l[r].stories.length&&(o=(0,m.createUserPropertyImpl)(_.userPropertyData_,l[r]),l[r]=o);case 6:case"end":return e.stop()}},e)}));return function(t,r){return e.apply(this,arguments)}}());case 8:return this.loadGroupCircles_(l),s.abrupt("return");case 10:return h=(0,e.default)(n),c=[],s.next=14,n.forEach(function(){var t=(0,r.default)(d.default.mark(function t(r,s){var o,n,i,a;return d.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:r.type===f.groupTypes.PERSONALIZED&&(h[s]=P(P({},r),{},{hidden:!0})),o=_.handleProductGroups_(r),n=o.productGroup,i=o.productIds,c.push.apply(c,(0,e.default)(i)),h[s]=n,h[s].stories.length&&!h[s].hidden&&(a=(0,m.createUserPropertyImpl)(_.userPropertyData_,h[s]),h[s]=a);case 5:case"end":return t.stop()}},t)}));return function(e,r){return t.apply(this,arguments)}}());case 14:if(!c.length){s.next=25;break}if(this.handleEvent_(b.CustomerEventTypes.onStorylyHydration,c),!this.isProductFallbackEnabled_){s.next=25;break}if(!i.get("storylyMail")&&!this.globalInstanceData.inboxStory){s.next=24;break}return s.next=20,this.api_.getProductDetails(c);case 20:p=s.sent,this.storylyHydration=p.products,s.next=25;break;case 24:this.api_.getProductDetails(c).then(function(e){_.setStorylyHydration(e.products)});case 25:this.loadGroupCircles_(h);case 26:case"end":return s.stop()}},s,this)}));return function(){return s.apply(this,arguments)}}()},{key:"handleProductGroups_",value:function(e){var r=(0,y.getProductLayers)(e),s=(0,t.default)(r,1)[0],o=s.flatMap(function(e){return e.products}),n=new URLSearchParams(window.location.search);return{productGroup:P(P({},e),{},{hidden:!(n.get("storylyMail")||this.globalInstanceData.inboxStory)&&s.length}),productIds:o}}},{key:"createGroupInstanceAndReorderCircleNodes_",value:function(e){var t=this,r=this.hiddenPersonalizedGroupCircleNodes_.find(function(t){return+t.dataset.id===e.group_id}),s=r.dataset.sortorder,o=this.swiper_.slides.findIndex(function(t){return+t.dataset.id===e.group_id});o>-1&&this.swiper_.removeSlide(o);var n=this.setGroupInstance_(e,s);if(n.instance.render().then(function(e){t.swiper_.addSlide(s,e)}),e.is_user_property_used){var i=e.title,a=e.icon_image_url,u=r;"SLOT"===r.tagName&&(u=this.querySelector("[slot='story-group-".concat(e.group_id,"']")));var l=u.querySelector(".storyly__story-group-title"),d=u.querySelector(".storyly__story-group-cover");d&&(d.src=a),l&&(i.length>25?((0,y.setAttribute)(r,"title",i),l.innerHTML="".concat(i.substring(0,25),"...")):((0,y.setAttribute)(r,"title",""),l.innerHTML=i))}return(0,_.removeClass)(r,"hidden"),this.groupCircleNodes_.splice(s,0,r),this.groupsList_.insertBefore(r,this.groupsList_.children[s]),{newGroupInstance:n,order:s}}},{key:"adBlockerDetector_",value:function(){var e=document.createElement("div");e.classList.add("adsbygoogle"),this.groupsOverlay_.appendChild(e),"none"===getComputedStyle(e).getPropertyValue("display")&&(this.hasAdblocker_=!0),e.remove()}},{key:"isAdEnable_",value:function(){return Object.keys(this.adSettings_).length>0&&!this.hasAdblocker_}},{key:"loadAdGroups_",value:function(){var e=(0,r.default)(d.default.mark(function e(t){var r,s,o,n,i,a,u,l,h,c,p,_,v,g,f=this;return d.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(this.isAdEnable_()){e.next=2;break}return e.abrupt("return");case 2:return this.loadAdStyle_(),r=this.adSettings_,s=r.ad_cap,o=r.ad_manager_body,(n=document.createElement("div")).style.position="absolute",n.style.top="-100vh",i=[],a=[],u=[],e.next=12,require("_bundle_loader")(require.resolve("./components/AdGroup"));case 12:for(l=e.sent,h=l.default,c=0;c<=s;c+=1)p={ad:!0,title:"Sponsored",settings:this.adSettings_,id:(0,y.randomAlphaNum)(10)},_=new h(p,p.id,this.groupsOverlay_,this.layout_,this.instanceId_),p.instance=_,v=_.render(),g=_.load(),i.push(v),a.push(g),u.push(p);Promise.all(i).then(function(e){e.forEach(function(e,r){n.appendChild(e),f.storyShadowRoot_.appendChild(n),u[r].node=e,a[r].then(function(e){"filled"===e&&(f.adGroups_.push(u[r]),o||f.renderAdGroup_(t,u[r]))})})});case 16:case"end":return e.stop()}},e,this)}));return function(t){return e.apply(this,arguments)}}()},{key:"loadAdStyle_",value:function(){if(!this.storyShadowDom_.querySelector('style[data-type="ad-style"]')){var e=document.createElement("style");e.dataset.type="ad-style",e.textContent="\n .storyly-adsense {\n --i--storyly-story-desktop-one-panel-ratio: 69/116;\n --i--storyly-story-desktop-one-panel-responsive-margin: max(74px,8.25vh);\n --i--storyly-story-desktop-one-panel-height: calc(100vh - var(--i--storyly-story-desktop-one-panel-responsive-margin)*2);\n --i--storyly-story-desktop-one-panel-width: calc(var(--i--storyly-story-desktop-one-panel-height)*var(--i--storyly-story-desktop-one-panel-ratio));\n position: absolute;\n left: 50%;\n top: 12%;\n transform: translateX(-50%);\n width: calc(var(--i--storyly-story-desktop-one-panel-width) - 20%) !important;\n height: calc(var(--i--storyly-story-desktop-one-panel-height) - 20%) !important;\n text-align: center;\n }\n .storyly-ad-manager {\n position: absolute;\n left: 50%;\n top: 12%;\n transform: translateX(-50%);\n text-align: center;\n min-width: 300px;\n min-height: 200px;\n }\n ".replace(/\s+/g," "),this.storyShadowDom_.appendChild(e)}}},{key:"removeStoryly_",value:function(){this.remove(),this.handleEvent_("noStoryGroup")}},{key:"handleEvent_",value:function(e,t){if(this.events_[e]&&"function"==typeof this.events_[e])this.events_[e](t);else if(this.events_[e])throw TypeError("".concat(e," event must be a function!"))}},{key:"onPlayerReady",value:function(){var t=this,r=this.hiddenPersonalizedGroups_.map(function(e){return P(P({},e),{},{type:"externalData"})}),s=[].concat((0,e.default)(this.groups_),(0,e.default)(r)).filter(function(e){return!e.ad}).map(function(e){return{title:e.title,image:e.icon_image_url,id:e.group_id,pinned:e.pinned,mediaHost:e.media_host,stories:e.stories,type:e.type}});this.handleEvent_("isReady",s),this.EventImpl.onScreenEvent(),this.handleOpenStoryByUrl_(),this.adSettings_.ad_manager_body&&(this.adInterval_=setInterval(function(){window.googletag&&(t.loadAdGroups_(),clearInterval(t.adInterval_))},100)),this.setStorylyBarObserver_()}},{key:"setContainerHeight_",value:function(){var e=[];this.groupsWrapper_.querySelectorAll(".storyly__story-group-container").forEach(function(t){return e.push(t.offsetHeight)});var t=Math.max.apply(Math,e);(0,_.setStyle)(this.groupsWrapper_,["height","".concat(t+2,"px")])}},{key:"handleOpenStoryByUrl_",value:function(){var e=this.shareParams_,t=e.group,r=e.storyIndex;void 0===t||"number"!=typeof r&&r>0||this.showStory_()}},{key:"setSeenForGroup_",value:function(){var e=this.getSeenGroups_(),t=this.getActiveGroup_(),r=this.getActiveStory_();if(!t.ad){e[t.group_id]?e[t.group_id].stories.includes(r.story_id)||e[t.group_id].stories.push(r.story_id):e[t.group_id]={seen:!0,stories:[r.story_id]},p.default.setInstanceId(this.instanceId_).setItemToInstance("Storyly_groupSeenState",e);var s=this.groups_.find(function(e){return e.group_id===t.group_id}),o=this.groupCircleNodes_.some(function(e){return+e.dataset.id===s.group_id&&e.classList.contains("seen")}),n=this.seenGroups_.some(function(e){return e.group_id===s.group_id});!this.checkSeenStories_(s)||o||n||this.seenGroups_.push(s)}}},{key:"handleImpressionEvent_",value:function(){this.EventImpl.handleImpressionEvent(),this.setSeenForGroup_()}},{key:"loadGroupCircles_",value:function(){var t=(0,r.default)(d.default.mark(function t(r){var s,o,n,i,a,u,l,h,c,p=this;return d.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(0!==r.length){t.next=2;break}return t.abrupt("return");case 2:return s=this.properties_.storyGroupAlign,o={seenList:[],unseenList:[]},n={seenList:[],unseenList:[]},i=(0,m.intersectionObserverImpl)(this.groupsWrapper_,this.groupObserverCallback_),a=[],u=[],l=(0,m.storyGroupCircleTemplateImpl)(this.customStoryGroupHTML_),this.swiper_=(0,m.swiperImpl)(this.swiperContainer_,this.layout_),h=this.groupsWrapper_.classList.contains("style-scope"),r.forEach(function(e,t){var s,i=e.title,d=e.pinned,c=(0,y.generateHtmlFromTemplate)(l(e,p.instanceId_)),v=p.checkSeenStories_(e);p.customStoryGroupHTML_&&(s=(0,g.handleCustomStoryGroupElement)(e,t,p.customStoryGroupHTML_,v),h?c=s:p.appendChild(s)),c.dataset.id=e.group_id,e.hidden&&(0,_.setClass)(c,"hidden"),d?((0,_.setClass)(c,"pinned"),a.push(e),u.push(c),v&&(0,_.setClass)(c,"seen")):v&&e.type!==f.groupTypes.PERSONALIZED?((0,_.setClass)(c,"seen"),o.seenList.push(c),n.seenList.push(e)):(o.unseenList.push(c),n.unseenList.push(e)),c.dataset.order=t,c.ariaLabel="of ".concat(r.length,", ").concat(i,", ").concat(d?"pinned, ":"").concat(v?"seen":"unseen"),s&&(s.ariaLabel="Story position ".concat(t+1," of ").concat(r.length,", ").concat(i,", ").concat(d?"pinned, ":"").concat(v?"seen":"unseen")),(e.stories.some(function(e){return e.alt_text})||p.globalInstanceData.accessibility)&&(p.globalInstanceData.storiesHasAltText=!0),c.addEventListener("click",p.handleClickGroup_,!1),p.customStoryGroupHTML_&&p.barLayout_&&p.handleBarStyleEvents_(c)}),c=[].concat(a,(0,e.default)(n.unseenList),(0,e.default)(n.seenList)),this.hiddenPersonalizedGroups_=c.filter(function(e){return e.hidden}),t.next=16,c.filter(function(e){return!e.hidden}).map(function(e,t){var r=e;return(r=p.setGroupInstance_(e,t)).instance.render().then(function(e){p.swiper_.appendSlide(e)}),r});case 16:this.groups_=t.sent,[].concat(u,(0,e.default)(o.unseenList),(0,e.default)(o.seenList)).forEach(function(e,t){var r=e;if(e.classList.contains("hidden")?p.hiddenPersonalizedGroupCircleNodes_.push(e):(p.groupCircleNodes_.push(e),p.groupsList_.appendChild(e)),r.ariaLabel="Story position ".concat(t+1," ").concat(r.ariaLabel),p.customStoryGroupHTML_){var s=p.getCustomGroupAssignedElement_(e);s&&(s.dataset.sortorder=t)}r.dataset.sortorder=t,i.observe(e)}),(0,_.setClass)(this.groupsWrapper_,s),this.loadShareParams_().catch(function(){}),this.onPlayerReady(),m.StoryGroupAnimationImpl.add(this.groupCircleNodes_,this.properties_.storyGroupAnimation);case 22:case"end":return t.stop()}},t,this)}));return function(e){return t.apply(this,arguments)}}()},{key:"handleBarStyleEvents_",value:function(e){var t=this;e.addEventListener("mouseenter",function(){var r=t.getCustomGroupAssignedElement_(e);(0,_.setClass)(r,"storyly__story-group-hovered"),r.querySelector("video").play()},!1),e.addEventListener("mouseleave",function(){var r=t.getCustomGroupAssignedElement_(e);(0,_.removeClass)(r,"storyly__story-group-hovered"),r.querySelector("video").pause()},!1)}},{key:"groupObserverCallback_",value:function(e){var t=this;e.forEach(function(e){if(e.isIntersecting){var r,s=e.target,o=s.dataset.id;t.groups_.forEach(function(e){e.group_id===+o&&(r=e)}),r.onView||(t.loadGroupInstance_(r),s.setAttribute("onView",""),"SLOT"!==s.nodeName&&(s.querySelector("img").src=r.icon_image_url),clearTimeout(t.eventTimeout_),t.barViewed_&&(t.eventTimeout_=setTimeout(function(){return t.sendBarViewEvent_()},2500))),r.onView=!0}})}},{key:"loadShareParams_",value:function(){var e,r,s,o=new URLSearchParams(window.location.search).get("storyly");if(!o&&!this.openStoryParams_)return Promise.reject();if(2===(o=this.openStoryParams_||JSON.parse(o)).length){var n=o,i=(0,t.default)(n,2);e=i[0],"number"==typeof(s=i[1])&&(r=s)}else{var a=o,u=(0,t.default)(a,3);e=u[0],r=u[1],s=u[2]}var l=this.groups_.find(function(t){return t.group_id===+e}),d=null==l?void 0:l.stories.findIndex(function(e){return e.story_id===+r});if(!l){var h={detail:{eventName:b.CustomerEventTypes.onStoryShowFailed,params:{errorMessage:"story group does not exist."}}};return this.handleCustomerEvent_(h),Promise.reject(new Error("story group does not exist."))}if(-1===d&&r){var c={detail:{eventName:b.CustomerEventTypes.onStoryShowFailed,params:{errorMessage:"story does not exist."}}};return this.handleCustomerEvent_(c),Promise.reject(new Error("story does not exist."))}return r||(d=0),this.shareParams_={group:l,storyIndex:d,playMode:s},s&&(this.swiper_.allowTouchMove=!1),this.globalInstanceData.shareParams=this.shareParams_,Promise.resolve()}},{key:"setSwiperEvents_",value:function(){var e=this;this.swiper_.on("sliderFirstMove",function(){e.swiperMove_=!0}),this.swiper_.on("realIndexChange",function(t){e.storylyOpen_&&(e.getActiveStory_().instance.pause(),e.groups_[t.activeIndex].ad||e.layout_!==S.default.CLASSIC||e.groups_[t.activeIndex].instance.loadStoryLayers(),e.layout_===S.default.MODERN&&e.layoutInstance_.handleStoryGroupNavigationButtons(e.groups_,t.activeIndex))}),this.swiper_.on("transitionEnd",function(t){if(e.swiperMove_=!1,e.storylyOpen_){if(t.activeIndex!==e.currentGroupIndex_){if(e.layout_===S.default.CLASSIC){var r=e.getActiveGroup_(),s=t.realIndex<t.previousIndex?"prev":"next";r.instance.sendGroupClickedEvent(b.GestureTypes.Swiped,s),e.getActiveStory_().instance.sendStoryClickedEvent(b.GestureTypes.Swiped,s)}e.handleCompleteGroupEvent_(),e.groups_[e.currentGroupIndex_].instance.unLoad({holdActive:!0}),e.currentGroupIndex_=t.activeIndex,e.loadNextGroupInstance_(),e.EventImpl.handleSwipingGroupEvent(t.swipeDirection),e.groups_[e.currentGroupIndex_].instance.show(),e.handleImpressionEvent_()}else{e.getActiveStory_().instance.play(),e.storyTouchAction_=!1}t.slides.forEach(function(e){e.classList.contains("swiper-slide-active")?(0,y.setAttribute)(e,"aria-hidden","false"):(0,y.setAttribute)(e,"aria-hidden","true")})}})}},{key:"setGroupInstance_",value:function(e,t){var r=this.layoutInstance_.setGroupInstance(e,t);return P(P({},e),{},{currentOrder:t,instance:r})}},{key:"loadGroupInstance_",value:function(e){e.instance&&this.sentry_.errorWrapper(function(){e.instance.load()})}},{key:"checkSeenStories_",value:function(e){var t=this.getSeenGroups_();return e.stories.every(function(r){var s,o;return!(null===(s=t[e.group_id])||void 0===s||null===(o=s.stories)||void 0===o||!o.includes(r.story_id)||e.hidden)})}},{key:"renderAdGroup_",value:function(e,t){if(this.isAdEnable_()&&0!==this.adGroups_.length){var r=this.adSettings_,s=r.ad_frequency,o=r.ad_first,n=r.ad_cap,i=0,a=e+o,u=0;this.groups_.forEach(function(e,t){e.ad&&(u=t,a=t+(s+1),i+=1)}),i>=n||u===this.groups_.length-1||(this.groups_.splice(a,0,t),this.swiper_.addSlide(a,t.node))}}},{key:"handleClickGroup_",value:function(e){var t,r,s=this,o=e.target.dataset.id;this.groups_.forEach(function(e,s){e.group_id===+o&&(r=s,t=e)}),this.adSettings_.ad_manager_body?this.adGroups_.forEach(function(e){s.renderAdGroup_(r,e)}):this.loadAdGroups_(r),this.showGroup_(t,r)}},{key:"setFocusableElements_",value:function(){var e=[];if(this.layout_===S.default.CLASSIC){var t=this.groupsOverlay_.querySelector("button.storyly__mobile-view-close-story");e=[this.groupsOverlay_.querySelector(".navigate-button.prev-button button"),t]}if(this.layout_===S.default.MODERN){var r=this.groupsOverlay_.querySelector("button.close-story"),s=this.groupsOverlay_.querySelector(".story-group-navigation-button.prev-story-group .story-group-navigation-button-container");"none"===s.parentElement.style.display&&(s=this.groupsOverlay_.querySelector(".prev-story-button")),e=[s,r]}this.focusableEls_=e}},{key:"showGroup_",value:function(e,t){var r=this;this.isMobileView_&&(0,m.calcStorySizeImpl)(this.groupsOverlay_),this.setOverlayVh_(),this.setStoryNavigationEvents_(),this.removeEventListener("keydown",this.handleTabKeyPressListener_),this.setStyleToDocument_(),m.StoryGroupAnimationImpl.remove(this.groupCircleNodes_,this.properties_.storyGroupAnimation),this.swiper_.slideTo(t),this.swiper_.update();var s=this.swiper_.slides[t];this.storylyOpen_=!0,setTimeout(function(){r.sentry_.errorWrapper(function(){e.instance.show(),(0,_.setClass)(r.groupsOverlay_,"active"),s.ariaHidden="false",r.storyShadowDom_.removeAttribute("tabindex"),r.groupsOverlay_.ariaHidden="false",r.setFocusableElements_()})},150),this.currentGroupIndex_=t,this.handleEvent_("openStoryGroup",P(P({},null!=e?e:{}),{},{instance:void 0})),this.loadNextGroupInstance_(),this.setSwiperEvents_(),this.layout_===S.default.MODERN&&this.layoutInstance_.handleStoryGroupNavigationButtons(this.groups_,t),this.EventImpl.handleSelectedGroupEvent(),this.handleImpressionEvent_()}},{key:"setStyleToDocument_",value:function(){this.globalInstanceData.storylyEmbed.init||((0,_.setStyle)(document.documentElement,["overflow","hidden"]),(0,_.setStyle)(document.documentElement,["overscrollBehaviorX","none"]))}},{key:"resetStyleToDocument_",value:function(){(0,_.resetStyle)(document.documentElement,["overflow","overscrollBehaviorX","position"])}},{key:"openOnFullScreen_",value:function(){this.groupsOverlay_.requestFullscreen?this.groupsOverlay_.requestFullscreen():this.groupsOverlay_.webkitRequestFullscreen?this.groupsOverlay_.webkitRequestFullscreen():this.groupsOverlay_.msRequestFullscreen&&this.groupsOverlay_.msRequestFullscreen()}},{key:"exitFullScreen_",value:function(){var e;document.exitFullscreen?null===(e=document)||void 0===e||e.exitFullscreen():document.webkitExitFullscreen?document.webkitExitFullscreen():document.msExitFullscreen&&document.msExitFullscreen()}},{key:"showStory_",value:function(){var e=this,t=this.shareParams_,r=t.group,s=t.storyIndex,o=t.playMode,n=this.groups_.find(function(e){return e.group_id===r.group_id}),i=this.getStoryGroupElement_(r),a=this.groups_.findIndex(function(e){return e.group_id===r.group_id});i.setAttribute("onView","");var u=i.querySelector("img");u&&(u.src=n.icon_image_url),n.onView=!0,n.instance.loadByParameters(s),"string"!=typeof o&&(this.adSettings_.ad_manager_body?this.adGroups_.forEach(function(t){e.renderAdGroup_(a,t)}):this.loadAdGroups_(a)),this.showGroup_(n,a)}},{key:"getSeenGroups_",value:function(){return p.default.setInstanceId(this.instanceId_).getItemFromInstance("Storyly_groupSeenState")}},{key:"loadInlineStyle_",value:function(){var e=document.createElement("style");if(e.textContent=(0,_.inlineStyle)(this.properties_,this.instanceId_),this.groupShadowRoot_.appendChild(e),this.customStoryGroupHTML_){var t=document.createElement("style");t.textContent=_.slotStyle.replace(/\s+/g," "),this.appendChild(t)}this.storylyFontCss_=document.createElement("link"),this.storylyFontCss_.rel="stylesheet",this.storylyFontCss_.href="https://web-story.storyly.io/fonts/storyly-web-fonts.css",document.head.appendChild(this.storylyFontCss_),this.setOverlayVh_();var r=document.createElement("style");return this.storyShadowRoot_.appendChild(r),void(r.textContent+=this.storylyWebCss_)}},{key:"setOverlayVh_",value:function(){var e=.01*window.innerHeight;this.groupsOverlay_.style.setProperty("--vh","".concat(e,"px"))}},{key:"close",value:function(){this.handleCloseGroup_()}},{key:"openStory",value:function(e){var t=this,r=e.group,s=e.story,o=e.playMode;this.openStoryParams_=[r,s,o],this.groups_.length>0&&this.loadShareParams_().then(function(){t.handleOpenStoryByUrl_()}).catch(function(){})}},{key:"setSegments",value:function(t){var r;this.groupShadowRoot_.innerHTML="",this.storylyFontCss_.remove(),this.renderMainDoms_();var s=[].concat((0,e.default)(null!==(r=this.userConfig_.segments)&&void 0!==r?r:[]),(0,e.default)(t));this.init_=!1,this.userConfig_=P(P({},this.userConfig_),{},{segments:(0,e.default)(new Set(s))}),this.init(this.userConfig_)}},{key:"setProperties",value:function(e){(0,_.removeClass)(this.groupsWrapper_,this.properties_.storyGroupAlign),this.properties_=P(P(P({},this.properties_),e),{},{scrollIndicatorOptions:P(P({},this.properties_.scrollIndicatorOptions),(null==e?void 0:e.scrollIndicatorOptions)||{})}),(0,_.setClass)(this.groupsWrapper_,this.properties_.storyGroupAlign),(0,m.renderScrollIndicator)(this.groupsWrapper_,this.properties_),this.globalInstanceData.properties=this.properties_,this.groupShadowRoot_.querySelector("style").textContent=(0,_.inlineStyle)(this.properties_,this.instanceId_)}},{key:"setExternalData",value:function(){var t=(0,r.default)(d.default.mark(function t(s){var o,n=this;return d.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(s&&0!==!s.length){t.next=2;break}return t.abrupt("return");case 2:if(this.externalData_=s,!(this.hiddenPersonalizedGroups_.length>0)){t.next=14;break}return o=(0,e.default)(this.groups_),t.next=7,this.hiddenPersonalizedGroups_.forEach(function(){var e=(0,r.default)(d.default.mark(function e(t){var r,s,i,a,u;return d.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(t.type!==f.groupTypes.PERSONALIZED){e.next=11;break}return e.next=3,(0,m.createPersonalizedImpl)(n.externalData_,t);case 3:if(!(r=e.sent).hidden){e.next=6;break}return e.abrupt("return");case 6:if(!(s=(0,m.createUserPropertyImpl)(n.userPropertyData_,r)).hidden){e.next=9;break}return e.abrupt("return");case 9:i=n.createGroupInstanceAndReorderCircleNodes_(s),a=i.newGroupInstance,u=i.order,o.splice(u,0,P(P({},a),{},{hidden:void 0}));case 11:case"end":return e.stop()}},e)}));return function(t){return e.apply(this,arguments)}}());case 7:this.groups_=o.filter(function(e){return Boolean(e)}),this.isoTopeSorting_.reloadItems(),this.isoTopeSorting_.updateSortData(),this.isoTopeSorting_.arrange({sortBy:"order"}),this.setContainerHeight_(),m.StoryGroupAnimationImpl.add(this.groupCircleNodes_,this.properties_.storyGroupAnimation),setTimeout(function(){(0,m.renderScrollIndicator)(n.groupsWrapper_,n.properties_)},750);case 14:case"end":return t.stop()}},t,this)}));return function(e){return t.apply(this,arguments)}}()},{key:"setUserPropertiesData",value:function(){var t=(0,r.default)(d.default.mark(function t(r){var s,o,n,i=this;return d.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(r&&null!==(s=Object.keys(r))&&void 0!==s&&s.length){t.next=2;break}return t.abrupt("return");case 2:this.userPropertyData_=r,this.hiddenPersonalizedGroups_.length>0&&(o=this.hiddenPersonalizedGroups_.map(function(e){return e.group_id}),n=(0,e.default)(this.groups_.filter(function(e){return!o.includes(e.group_id)})),this.hiddenPersonalizedGroups_.forEach(function(e){var t=(0,m.createUserPropertyImpl)(i.userPropertyData_,e);if(!t.hidden){var r=i.createGroupInstanceAndReorderCircleNodes_(t),s=r.newGroupInstance,o=r.order;n.splice(o,0,P(P({},s),{},{hidden:void 0}))}}),this.groups_=n.filter(function(e){return Boolean(e)}),this.isoTopeSorting_.reloadItems(),this.isoTopeSorting_.updateSortData(),this.isoTopeSorting_.arrange({sortBy:"order"}),this.setContainerHeight_(),m.StoryGroupAnimationImpl.add(this.groupCircleNodes_,this.properties_.storyGroupAnimation),setTimeout(function(){(0,m.renderScrollIndicator)(i.groupsWrapper_,i.properties_)},750));case 4:case"end":return t.stop()}},t,this)}));return function(e){return t.apply(this,arguments)}}()},{key:"setEmbedContainerRatio",value:function(e){this.groupsOverlay_.style.setProperty("--i--storyly-story-layer-width","".concat(e.width,"px")),this.groupsOverlay_.style.setProperty("--i--storyly-story-layer-height","".concat(e.height,"px"))}},{key:"setStorylyHydration",value:function(){var t=this,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];if(!Array.isArray(r))throw new Error("Hydration Data must be an Array!");if(this.storylyHydration=r,this.hiddenPersonalizedGroups_.length>0){var s=this.hiddenPersonalizedGroups_.map(function(e){return e.group_id}),o=(0,e.default)(this.groups_.filter(function(e){return!s.includes(e.group_id)}));this.hiddenPersonalizedGroups_.forEach(function(e){if(e.stories.flatMap(function(e){return e.media}).flatMap(function(e){return e.layers}).filter(function(e){return e.type===C.LayerTemplateTypes.PRODUCT_CATALOG}).flatMap(function(e){return e.products}).every(function(e){return t.storylyHydration.some(function(t){return t.product_group_id===e.product_group_id})})){var r=t.createGroupInstanceAndReorderCircleNodes_(e),s=r.newGroupInstance,n=r.order;o.splice(n,0,P(P({},s),{},{hidden:!1}))}}),this.groups_=o.filter(function(e){return Boolean(e)}),this.isoTopeSorting_.reloadItems(),this.isoTopeSorting_.updateSortData(),this.isoTopeSorting_.arrange({sortBy:"order"}),this.setContainerHeight_(),m.StoryGroupAnimationImpl.add(this.groupCircleNodes_,this.properties_.storyGroupAnimation),this.groupsWrapper_.addEventListener("transitionend",function(){(0,m.renderScrollIndicator)(t.groupsWrapper_,t.properties_)},{once:!0})}}},{key:"updateProducts",value:function(e){this.isStorylyCartActive=!0,this.setProductCartItems(e)}},{key:"setProductCartItems",value:function(e){this.storylyCheckoutProducts=e||{products:[],price:"",sales_price:"",price_currency:""};var t=this.getActiveGroup_();if(t){var r=t.instance;r&&r.storyCart&&e&&r.storyCart.updateProducts(e)}}},{key:"remove",value:function(){this.parentElement.removeChild(this),this.storyShadowDom_.remove(),this.storylyFontCss_.remove()}}]),u}((0,l.default)(HTMLElement));window.StorylyWeb=D;var L=D;exports.default=L;
|
|
410
|
+
},{"@babel/runtime/helpers/toConsumableArray":"Fhqp","@babel/runtime/helpers/slicedToArray":"HETk","@babel/runtime/helpers/asyncToGenerator":"agGE","@babel/runtime/helpers/defineProperty":"IxO8","@babel/runtime/helpers/classCallCheck":"fcMS","@babel/runtime/helpers/createClass":"P8NW","@babel/runtime/helpers/inherits":"d4H2","@babel/runtime/helpers/possibleConstructorReturn":"pxk2","@babel/runtime/helpers/getPrototypeOf":"UJE0","@babel/runtime/helpers/wrapNativeSuper":"ozpi","@babel/runtime/regenerator":"PMvg","uuid":"D6fo","./lib/api":"nMub","./lib/storage":"NA5d","./lib/style":"vgU2","./lib/util":"PesM","./constants/playmode":"Ooqf","./main.scss":"yCDU","./service/custom-story-group-design-impl":"TkWu","./constants/common":"VKZr","./service":"hs1C","./constants/layouts":"kUgL","./constants/events":"d0lR","./constants/directions":"w67G","./constants/layerTypes":"aJRz","./layouts/Modern":"ajqo","./layouts/Classic":"egGP","./constants/barLayouts":"HgmH","_bundle_loader":"TUK3","./components/AdGroup":[["AdGroup.8ca7e3ac.js","R6v9"],"R6v9"]}],"Focm":[function(require,module,exports) {
|
|
411
|
+
"use strict";var e=n(require("./StorylyEmbed")),t=n(require("./StorylyWeb")),o=n(require("./lib/storage"));function n(e){return e&&e.__esModule?e:{default:e}}var r=new URLSearchParams(window.location.search),l=r.get("StorylyTestEnv"),s=r.get("ip"),y=o.default.getItemFromGlobal("Storyly_userConfig"),i=["v2-beta","latest","local"];l&&y&&i.includes(l)?window.storylyInit||(window.storylyInit=!0,HTMLElement.prototype.init=function(){},fetch("local"===l?"https://".concat(null!=s?s:"dev.storyly",":8083/src.a2b27638.js"):"https://web-story.storyly.io/".concat(l,"/storyly-web.js")).then(function(e){return e.text()}).then(function(e){customElements.define("storyly-web",window.StorylyWeb);var t=document.createElement("script");t.setAttribute("custom-element","storyly-web"),t.innerHTML=e,t.async=!0,document.body.appendChild(t),setTimeout(function(){var e=document.querySelector("storyly-web"),t=document.createElement("div");t.innerText='Storyly Test Env Activated!!. Now you are in "'.concat(l,'" script!'),t.style.color="red",t.style.fontSize="20px",t.style.fontWeight="bold",e.parentNode.insertBefore(t,e),e.init(y)},7500)})):(customElements.get("storyly-web")||customElements.define("storyly-web",t.default),customElements.get("storyly-web-embed")||customElements.define("storyly-web-embed",e.default));
|
|
412
|
+
},{"./StorylyEmbed":"vBxD","./StorylyWeb":"Lwlj","./lib/storage":"NA5d"}],"Yi9z":[function(require,module,exports) {
|
|
413
|
+
module.exports=function(n){return new Promise(function(e,o){var r=document.createElement("script");r.async=!0,r.type="text/javascript",r.charset="utf-8",r.src=n,r.onerror=function(n){r.onerror=r.onload=null,o(n)},r.onload=function(){r.onerror=r.onload=null,e()},document.getElementsByTagName("head")[0].appendChild(r)})};
|
|
414
|
+
},{}],0:[function(require,module,exports) {
|
|
415
|
+
var b=require("TUK3");b.register("js",require("Yi9z"));
|
|
416
|
+
},{}]},{},[0,"Focm"], null)
|