apxor-rtm 1.12.0 → 2.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.
@@ -1,11 +1,10 @@
1
- !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("apxor"),require("apxor-qe")):"function"==typeof define&&define.amd?define(["exports","apxor","apxor-qe"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self)["apxor-rtm"]={},e.Apxor,e.CE)}(this,(function(exports,Apxor,CE){"use strict";function _iterableToArrayLimit$1(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var i,o,a,r,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(i=a.call(n)).done)&&(s.push(i.value),s.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=n.return&&(r=n.return(),Object(r)!==r))return}finally{if(l)throw o}}return s}}function ownKeys(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function _objectSpread2$1(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ownKeys(Object(n),!0).forEach((function(t){_defineProperty$1(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ownKeys(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function _typeof$1(e){return(_typeof$1="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 _classCallCheck$1(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties$1(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,_toPropertyKey(i.key),i)}}function _createClass$1(e,t,n){return t&&_defineProperties$1(e.prototype,t),n&&_defineProperties$1(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function _defineProperty$1(e,t,n){return(t=_toPropertyKey(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _inherits$1(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&_setPrototypeOf$1(e,t)}function _getPrototypeOf$1(e){return(_getPrototypeOf$1=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function _setPrototypeOf$1(e,t){return(_setPrototypeOf$1=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function _isNativeReflectConstruct(){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}}function _assertThisInitialized$1(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _possibleConstructorReturn$1(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized$1(e)}function _createSuper(e){var t=_isNativeReflectConstruct();return function(){var n,i=_getPrototypeOf$1(e);if(t){var o=_getPrototypeOf$1(this).constructor;n=Reflect.construct(i,arguments,o)}else n=i.apply(this,arguments);return _possibleConstructorReturn$1(this,n)}}function _slicedToArray$1(e,t){return _arrayWithHoles$1(e)||_iterableToArrayLimit$1(e,t)||_unsupportedIterableToArray(e,t)||_nonIterableRest$1()}function _toConsumableArray(e){return _arrayWithoutHoles(e)||_iterableToArray(e)||_unsupportedIterableToArray(e)||_nonIterableSpread()}function _arrayWithoutHoles(e){if(Array.isArray(e))return _arrayLikeToArray(e)}function _arrayWithHoles$1(e){if(Array.isArray(e))return e}function _iterableToArray(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function _unsupportedIterableToArray(e,t){if(e){if("string"==typeof e)return _arrayLikeToArray(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_arrayLikeToArray(e,t):void 0}}function _arrayLikeToArray(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _nonIterableRest$1(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _createForOfIteratorHelper(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=_unsupportedIterableToArray(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var i=0,o=function(){};return{s:o,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,r=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return r=e.done,e},e:function(e){s=!0,a=e},f:function(){try{r||null==n.return||n.return()}finally{if(s)throw a}}}}function _toPrimitive(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function _toPropertyKey(e){var t=_toPrimitive(e,"string");return"symbol"==typeof t?t:String(t)}var VERSION=139,SERVER_URL="https://server.apxor.com",RTA_VALIDATE_URL=SERVER_URL+"/v2/sync/<app_id>/configs/validate?platform=web&userId=<u_id>&actionType=rta&version="+VERSION,TRACK_PAGES_EVENTS_API=SERVER_URL+"/v3/sync/track-pages-events?appId=<app_id>&eventsVersion=<events_version>&pagesVersion=<pages_version>",RTA_SYNC_URL=SERVER_URL+"/v2/sync/<app_id>/rta?platform=web&userId=<u_id>&version="+VERSION,SURVEY_VALIDATE_URL=SERVER_URL+"/v2/sync/<app_id>/configs/validate?platform=web&userId=<u_id>&actionType=survey&version="+VERSION,SURVEY_SYNC_URL=SERVER_URL+"/v2/sync/<app_id>/surveys?platform=web&userId=<u_id>&version="+VERSION,SURVEY_RESPONSE_URL=SERVER_URL+"/v2/api/survey-response?appId=<app_id>",CONFIG_API_URL=SERVER_URL+"/v1/sse/art-config?appId=<app_id>&deviceId=<u_id>&isExperiment=true",TEST_DEVICES_API_URL=SERVER_URL+"/v1/external/test-devices/validate?appId=<app_id>&deviceId=<u_id>",ANSWER_TYPES={SINGLE_CHOICE:1,MULTI_CHOICE:2,RATING:3,SHORT_ANSWER:4,YES_NO:5},APX_OVERLAY="apx-oly",APX_DIALOG_CONTENT="apx-dlg-c",APX_DIALOG_YES="apx-dy",APX_DIALOG_NO="apx-dn",INAPP_SHOWN="inapp_shown",INAPP_XICON_CLICKED="InAppXIconClicked",INAPP_BUTTON_CLICKED=function(e){return"InApp".concat(e,"Clicked")},WALK_THROUGH_CANCELLED="walk_through_cancelled",SURVEY_ON_DISMISS="on_dismiss",USER_ATTRIBUTES="u",SESSION_ATTRIBUTES="s",APPLICATION_VIEW_ID="v",EVENT_TYPE="ev",VARIABLE_TYPE="t",DEFAULT_VALUE="def",ATTRIBUTE_NAME="n",DYNAMIC_TEXT="Script",EVENT_PROPERTY_NAME="prop",IN_APP_TYPE="IN_APP",CENTER="center",EMOJI_ICONS_10=["&#128545;","&#128544;","&#128534;","&#128547;","&#128577;","&#128528;","&#128578;","&#128512;","&#128516;","&#128515;","&#128525;"],EMOJI_ICONS_5=["&#128545;","&#128577;","&#128528;","&#128515;","&#128525;"],RATING_COLORS_5=["#E5510A","#EA731D","#F8C94F","#A3CF6A","#7BB65C"],RATING_COLORS_10=["#E5510A","#EA731D","#EA8F4D","#EA8F4D","#F1B052","#F8C94F","#F6DE4F","#D7D55A","#B7CF6A","#A3CF6A","#7BB65C"],SCROLL_BEHAVIOUR={SMOOTH:"smooth"},CAROUSEL_TYPE={NUMBER:"number",CAROUSEL:"carousel"},BUTTON_CONTAINER_POSITION={TOP:"top",CENTER:"center",BOTTOM:"bottom",SURVEY_BOTTOM:"survey_bottom"},CLOSE_BUTTON_STYLE={NORMAL:"normal",FILL:"filled"},ACTION_TYPE={REDIRECT:"redirect",SKIP:"skip"},REDIRECT_TYPE={INTERNAL:"internal",EXTERNAL:"external"},BACK_BUTTON_STYLE={NORMAL:"normal",FILL:"fill"},INAPP_POSITION={TOP_LEFT:"top-left",TOP_RIGHT:"top-right",BOTTOM_LEFT:"bottom-left",BOTTOM_RIGHT:"bottom-right",TOP_CENTER:"top-center",BOTTOM_CENTER:"bottom-center",CENTER:"center"},DIRECTION={HORIZONTAL:"horizontal",VERTICAL:"vertical"},EVENT_PREFIX={INAPP:"InApp_",INLINE:"InLine_",SURVEY:"Survey_"},VIDEOS_MODES={PLAYER:"mini",PIP:"PIP"},INAPP_TYPE={VIDEO:"videos",MODAL:"modal"},COLORS={BLACK:"#000000",WHITE:"#ffffff"},APX_PREVIEW_CAMPAIGN_NAME="APX-PR3VI3W-CAMPGAIN",APX_TERMINATION_ID$1="apx_termination_ID",APX_SSE_TIMEOUT_CONFIG={delay:0,type:"IN_APP",action_class:"inapp",layout_type:"modal",display_type:"IN_APP",width:24,bg_color:"#ffffff",dismiss_outside_touch:!1,enable_padding:!0,padding:{top:16,bottom:16,left:16,right:16},enable_margin:!0,margin:{bottom:0,left:0,right:0,top:0},enable_dimbackground:!0,dimbackground:{color:"#000000",opacity:.3},enable_border:!0,border:{radius:16,color:"#0C4A6E",width:0,style:"solid"},enable_title:!0,title:{text:"Connection Timed out",color:"#212121",alignment:"center",font:{family:"inherit",size:25,style:"normal",weight:"bold"},enable_margin:!0,margin:{bottom:12,left:0,right:0,top:12},enable_padding:!0,padding:{top:0,bottom:0,left:0,right:0},enable_icon:!1,icon:{path:"https://i.ibb.co/R2JTvkM/8-x-8.png",height:40,width:40,alignment:"center",enable_border:!0,border:{radius:10,color:"#000000",width:0,style:"solid"}}},enable_description:!0,description:{text:"Your connection has been timed out please reconnect your app with the dashboard",color:"#212121",alignment:"center",font:{family:"inherit",size:16,style:"normal",weight:"normal"},enable_margin:!0,margin:{bottom:12,left:0,right:0,top:0},enable_padding:!0,padding:{top:0,bottom:0,left:0,right:0}},direction:{nudge:"vertical",non_media:"vertical",buttons:"horizontal"},enable_buttons:!0,buttons_count:5,buttons:{enable_top:!0,top:[],enable_center:!0,center:[],enable_bottom:!0,bottom:[{__id:"3bh48woPu-1cC2mOMhJq",slot:3,color:"#017dfd",enable_action:!0,action:{type:"reload",action:"reload",url:"",is_external:!0,is_ir:!1,is_within:!1,callback:"",is_deep_link:!1,activity:"",deep_link:{uri:""},internal_redirection:[]},enable_border:!0,border:{radius:8,color:"#4F4F4F",width:0,style:"solid"},enable_margin:!0,margin:{bottom:0,left:0,right:4,top:0},enable_padding:!0,padding:{top:8,bottom:8,left:24,right:24},enable_text:!0,text:{text:"RECONNECT",color:"#FFFFFF",alignment:"left",font:{family:"sans-serif",size:16,style:"normal",weight:"bold"},enable_margin:!0,margin:{bottom:0,left:0,right:0,top:0},enable_padding:!0,padding:{top:0,bottom:0,left:0,right:0}}}]},enable_close_button:!1,close_button:{color:"#fffafa",fill_color:"#666464",type:"filled",path:"",offset_top:8,offset_right:8,offset_left:8,height:20,width:20,shape:"circle",action:"dismiss",enable:!1},enable_scroll:!1,scroll:{height:300,enable_border:!0,border:{radius:10,color:"#000000",width:0,style:"solid"}},enable_shadow:!0,shadow:{color:"#707070",offset_x:0,offset_y:0,blur_radius:20,spread_radius:0},enable_dismiss_actions:!0,dismiss_actions:{outside_touch:!1,target_touch:!0},enable_icon:!1,icon:{path:"https://i.ibb.co/R2JTvkM/8-x-8.png",height:40,width:40,alignment:"center",enable_border:!0,border:{radius:10,color:"#000000",width:0,style:"solid"},enable_padding:!0,padding:{top:0,bottom:0,left:0,right:0},enable_margin:!0,margin:{bottom:0,left:0,right:0,top:0}},enable_image:!0,image:{path:"https://cdn.jsdelivr.net/gh/DileepApxor/FlutterWebTest@main/ssetimeout.png",height:96,width:164,enable_border:!0,border:{radius:2,color:"#000000",width:0,style:"solid"},enable_background_image:!1,background_image:{mask_opacity:.5,mask_color:"#ffffff"}},enable_video:!1,video:{path:"https://www.w3schools.com/tags/movie.mp4",height:9,width:16,enable_border:!0,border:{radius:0,color:"#000000",width:0,style:"solid"},enable_embed:!1,embed:{html:""},enable_audio:!0},position:{position:"center",enable_offset:!0}},APX_RELAUNCH_CONFIG={delay:0,type:"IN_APP",action_class:"inapp",layout_type:"modal",display_type:"IN_APP",width:24,bg_color:"#ffffff",dismiss_outside_touch:!0,enable_padding:!0,padding:{top:16,bottom:16,left:16,right:16},enable_margin:!0,margin:{bottom:0,left:0,right:0,top:0},enable_dimbackground:!0,dimbackground:{color:"#000000",opacity:.3},enable_border:!0,border:{radius:16,color:"#0C4A6E",width:0,style:"solid"},enable_title:!0,title:{text:"Relaunch & Test",color:"#212121",alignment:"left",font:{family:"inherit",size:25,style:"normal",weight:"bold"},enable_margin:!0,margin:{bottom:12,left:0,right:0,top:12},enable_padding:!0,padding:{top:0,bottom:0,left:0,right:0},enable_icon:!1,icon:{path:"https://i.ibb.co/R2JTvkM/8-x-8.png",height:40,width:40,alignment:"center",enable_border:!0,border:{radius:10,color:"#000000",width:0,style:"solid"}}},enable_description:!0,description:{text:"Execute the conditions set up in the dashboard after relaunching the app to view the campaign",color:"#212121",alignment:"left",font:{family:"inherit",size:16,style:"normal",weight:"normal"},enable_margin:!0,margin:{bottom:12,left:0,right:0,top:0},enable_padding:!0,padding:{top:0,bottom:0,left:0,right:0}},direction:{nudge:"vertical",non_media:"vertical",buttons:"horizontal"},enable_buttons:!0,buttons_count:5,buttons:{enable_top:!0,top:[],enable_center:!0,center:[],enable_bottom:!0,bottom:[{__id:"3bh48woPu-1cC2mOMhJq",slot:3,color:"#017dfd",enable_action:!0,action:{type:"reload",action:"reload",url:"",is_external:!0,is_ir:!1,is_within:!1,callback:"",is_deep_link:!1,activity:"",deep_link:{uri:""},internal_redirection:[]},enable_border:!0,border:{radius:8,color:"#4F4F4F",width:0,style:"solid"},enable_margin:!0,margin:{bottom:0,left:0,right:4,top:0},enable_padding:!0,padding:{top:8,bottom:8,left:24,right:24},enable_text:!0,text:{text:"RELAUNCH WEBSITE",color:"#FFFFFF",alignment:"left",font:{family:"sans-serif",size:16,style:"normal",weight:"bold"},enable_margin:!0,margin:{bottom:0,left:0,right:0,top:0},enable_padding:!0,padding:{top:0,bottom:0,left:0,right:0}}}]},enable_close_button:!1,close_button:{color:"#F0F9FF",fill_color:"#0EA5E9",type:"filled",path:"",offset_top:8,offset_right:8,offset_left:8,height:20,width:20,shape:"circle",action:"dismiss",enable:!1},enable_scroll:!1,scroll:{height:300,enable_border:!0,border:{radius:10,color:"#000000",width:0,style:"solid"}},enable_shadow:!0,shadow:{color:"#707070",offset_x:0,offset_y:0,blur_radius:20,spread_radius:0},enable_dismiss_actions:!0,dismiss_actions:{outside_touch:!0,target_touch:!0},enable_icon:!1,icon:{path:"https://i.ibb.co/R2JTvkM/8-x-8.png",height:40,width:40,alignment:"center",enable_border:!0,border:{radius:10,color:"#000000",width:0,style:"solid"},enable_padding:!0,padding:{top:0,bottom:0,left:0,right:0},enable_margin:!0,margin:{bottom:0,left:0,right:0,top:0}},enable_image:!0,image:{path:"https://cdn.jsdelivr.net/gh/DileepApxor/FlutterWebTest@main/relaunch.png",height:421,width:722,enable_border:!0,border:{radius:2,color:"#000000",width:0,style:"solid"},enable_background_image:!1,background_image:{mask_opacity:.5,mask_color:"#ffffff"}},enable_video:!1,video:{path:"https://www.w3schools.com/tags/movie.mp4",height:9,width:16,enable_border:!0,border:{radius:0,color:"#000000",width:0,style:"solid"},enable_embed:!1,embed:{html:""},enable_audio:!0},position:{position:"center",enable_offset:!0}},REGISTER_EVENTS="register-events",REGISTER_PAGES="register-pages",VIEW_SELECTION="view-selection",APX_AUTO_EVENT_VERSION="apx_auto_event_version",APX_AUTO_EVENTS="apx_auto_events",APX_AUTO_PAGE_EVENT_VERSION="apx_auto_page_event_version",APX_AUTO_PAGE_EVENTS="apx_auto_page_events",isUndefined$2=function(e){return void 0===e},isNull$1=function(e){return null===e},isDefined$1=function(e){return void 0!==e&&!isNull$1(e)},isNumber$2=function(e){return isDefined$1(e)&&!isNull$1(e)&&!isNaN(e)},getElementByXPath=function(e){var t=e.indexOf("svg");-1!==t&&(e=e.substring(0,t)+"svg:svg");try{return document.evaluate(e,document,(function(e){return"svg"===e?"http://www.w3.org/2000/svg":null}),XPathResult.FIRST_ORDERED_NODE_TYPE,null).singleNodeValue}catch(e){window.ApxorLogger.error("Error finding element in DOM:"+e)}return null},getShuffledArr=function(e){return _toConsumableArray(e).map((function(e,t,n){var i=t+Math.floor(Math.random()*(n.length-t)),o=[n[t],n[i]];return n[i]=o[0],n[t]=o[1],n[t]}))},getButtonPosition=function(e){switch(e){case"center":return"center";case"left":return"flex-start";case"right":return"flex-end";case"ends":return"space-between";default:return"center"}},getButtonsCSSFromConfig=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0,i=arguments.length>3?arguments[3]:void 0,o=arguments.length>4?arguments[4]:void 0,a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"space-between",r="",s=0,c=0;c=o===BUTTON_CONTAINER_POSITION.TOP?3:o===BUTTON_CONTAINER_POSITION.BOTTOM||o===BUTTON_CONTAINER_POSITION.SURVEY_BOTTOM?5:1;var l,d={},p={};e.enable_numbered&&(d=e.numbered,p=null===(l=d)||void 0===l?void 0:l.font);var u=a;return t.forEach((function(e,i){var a,l,h,g,f=e.slot,m=e.type,_=e.sub_type,v=e.bg_color,b=e.text_color,y=e.text_alignment,x=e.size,w=e.style,C=e.weight,E=e.font_family,k=e.enable_border,S=e.border,T=S.width,A=S.color,I=S.radius,P=S.style,O=e.enable_margin,L=e.margin,N=L.bottom,B=L.left,D=L.right,M=L.top,F=e.enable_padding,$=e.padding,R=$.bottom,V=$.left,H=$.right,q=$.top,U=e.text_margin,j=U.bottom,z=U.left,W=U.right,Y=U.top,X=e.text_padding,G=X.bottom,Q=X.left,Z=X.right,K=X.top,J=e.enable_gradient,ee=e.gradient,te=void 0===ee?{}:ee,ne=e.custom_font,ie=e.enable_icon,oe=e.icon,ae=void 0===oe?{}:oe;J&&(l=te.direction||"to right",h=te.colors[0]||COLORS.BLACK,g=te.colors[1]||COLORS.WHITE);var re=!1,se=!1;if(null!==(a="vertical"!==n)&&void 0!==a?a:o!==BUTTON_CONTAINER_POSITION.BOTTOM){var ce,le=(null===(ce=t[i+1])||void 0===ce?void 0:ce.slot)||c+1;o!==BUTTON_CONTAINER_POSITION.TOP&&2===t.length&&(2===f&&3===le||4===f&&3===s||3===f&&(2===s||4===le))?u="center":(f-s>1&&(re=!0),le-f>1&&(se=!0),3===f&&o!==BUTTON_CONTAINER_POSITION.TOP&&(re=2!=t.length||1!==s,se=2!=t.length||5!==le),2===f&&o===BUTTON_CONTAINER_POSITION.TOP&&(re=!0,se=!0)),s=f}o===BUTTON_CONTAINER_POSITION.CENTER&&(re=!0,se=!0);var de="";k&&(de="border:".concat(T,"px ").concat(P," ").concat(A,";border-radius: ").concat(I,"px;"));var pe="";O&&(pe="margin:".concat(M,"px ").concat(D,"px ").concat(N,"px ").concat(B,"px;"));var ue="";F&&(ue="padding:".concat(q,"px ").concat(H,"px ").concat(R,"px ").concat(V,"px;"));var he="";if(J&&(he="background-image:linear-gradient(".concat(l,", ").concat(h,", ").concat(g,");")),ie){var ge="";ae.enable_border&&(ge="\n border-radius:".concat(ae.border.radius,"%;\n border:").concat(ae.border.width,"px ").concat(ae.border.style," ").concat(ae.border.color,";\n "));var fe="";ae.enable_margin&&(fe="\n margin-top:".concat(ae.margin.top,"px;\n margin-bottom:").concat(ae.margin.bottom,"px;\n margin-left:").concat(ae.margin.left,"px;\n margin-right:").concat(ae.margin.right,"px;\n "));var me="";ae.enable_padding&&(me="\n padding-top:".concat(ae.padding.top,"px;\n padding-bottom:").concat(ae.padding.bottom,"px;\n padding-left:").concat(ae.padding.left,"px;\n padding-right:").concat(ae.padding.right,"px;\n ")),r+=ie?"\n .apxor-survey-request-button-icon-container".concat(i," {\n text-align:").concat(ae.alignment,";\n }\n .apxor-survey-request-button-icon-content").concat(i," {\n height: ").concat(ae.height,"px;\n width: ").concat(ae.width,"px;\n ").concat(ge,"\n ").concat(fe,"\n ").concat(me,"\n }\n .apxor-survey-request-button-icon-Button-container").concat(i," {\n display: flex;\n }\n "):""}r+="stepper"!==m?"\n ".concat(ne,"\n div .button-div.").concat(o,"-button-").concat(i,"-slot-").concat(f,"{\n ").concat("wide"===m?"width:100%;text-align:center;":"width:auto;","\n height:auto;\n cursor: pointer;\n background-color: ").concat("#"===v?"transparent":v,";\n ").concat(de,"\n ").concat(pe,"\n ").concat(ue,"\n ").concat(re?"margin-left:auto;":"","\n ").concat(se?"margin-right:auto;":"","\n ").concat(he,"\n }\n .").concat(o,"-button-").concat(i,"-slot-").concat(f,"{\n cursor: pointer;\n color: ").concat(b,";\n text-align:").concat(y,";\n white-space:pre;\n background-color: transparent;\n font-size: ").concat(x,"px;\n border:none;\n font-family: ").concat(E,";\n font-weight: ").concat(C,";\n font-style: ").concat(w,";\n margin: ").concat(Y,"px ").concat(W,"px ").concat(j,"px ").concat(z,"px;\n padding: ").concat(K,"px ").concat(Z,"px ").concat(G,"px ").concat(Q,"px;\n }\n "):"\n div .button-div.".concat(o,"-button-").concat(i,"-slot-").concat(f,"{\n width:auto;\n height:auto;\n cursor: pointer;\n background-color: transparent;\n ").concat(re?"margin-left:auto;":"","\n ").concat(se?"margin-right:auto;":"margin-right:12px;","\n ").concat(he,"\n }\n ").concat(_===CAROUSEL_TYPE.NUMBER?"div .stepper-".concat(_,"{\n font-family:").concat(p.family,";\n font-size: ").concat(p.size,"px;\n font-style:").concat(p.style,";\n font-width:").concat(p.width,";\n color:").concat(d.color,";\n }"):"","\n\n ").concat(_===CAROUSEL_TYPE.CAROUSAL?"div .stepper-".concat(_,'{\n font-size:"20px";\n }'):"","\n ")})),"\n div .".concat(o,"-buttons-container {\n width:100%;\n display: flex;\n flex-direction:").concat(n!==DIRECTION.VERTICAL||o!==BUTTON_CONTAINER_POSITION.BOTTOM&&o!==BUTTON_CONTAINER_POSITION.SURVEY_BOTTOM?"row":"column",";\n justify-content:").concat(u,";\n align-items:").concat(n===DIRECTION.HORIZONTAL?"center":getButtonPosition(i),";\n flex-wrap:wrap;\n }\n ").concat(r,"\n ")},getButtonsCSS=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"right",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:DIRECTION.HORIZONTAL,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",o="";if(e.length>0){var a,r,s,c=e[0],l=c.bg_color,d=c.text_color,p=c.size,u=c.font_family,h=c.borders,g=h.stroke_color,f=h.radius,m=c.enable_gradient,_=c.gradient,v=void 0===_?{}:_,b=_setFontFaceAtRule({family:u});m&&(a=v.gradient_direction||"to right",r=v.gradient_c1||COLORS.BLACK,s=v.gradient_c2||COLORS.WHITE),o="\n ".concat(b[1],"\n ").concat(i," footer .shepherd-button.button-o {\n cursor: pointer;\n background-color: ").concat("#"===l?"transparent":l,";\n color: ").concat(d,";font-size: ").concat(p,"px;font-family: ").concat(b[0],";\n font-weight: ").concat("bold"!==u?"normal":u,";\n font-style: ").concat("italic"===u?"italic":"unset",";\n border: 0px solid ").concat(g,";border-radius: ").concat(f,"px;\n ").concat(m?"background-image:linear-gradient(".concat(a,", ").concat(r,", ").concat(s,");"):"","\n margin-right:").concat("#"===l?0:"12px","\n }\n ")}if(e.length>1){var y,x,w,C=e[1],E=C.bg_color,k=C.text_color,S=C.size,T=C.font_family,A=C.borders,I=A.stroke_color,P=A.radius,O=C.gradient_config,L=void 0===O?{}:O,N=_setFontFaceAtRule({family:T}),B=L.enable_gradient||!1;B&&(y=L.gradient_direction||"to right",x=(null==L?void 0:L.colors[0])||COLORS.BLACK,w=(null==L?void 0:L.colors[1])||COLORS.WHITE),o+="\n ".concat(N[1],"\n ").concat(i," footer .shepherd-button.button-t {\n cursor: pointer;\n background-color: ").concat("#"===E?"transparent":E,";\n color: ").concat(k,";font-size: ").concat(S,"px;font-family: ").concat(N[0],";\n font-weight: ").concat("bold"!==T?"normal":T,";\n font-style: ").concat("italic"===T?"italic":"unset",";\n ").concat(B?"background-image:linear-gradient(".concat(y,", ").concat(x,", ").concat(w,");"):"","\n border: 0px solid ").concat(I,";border-radius: ").concat(P,"px;\n }\n ")}return"\n ".concat(i," footer .shepherd-button {\n display: inline-block;\n *display: inline;\n vertical-align: middle;\n *vertical-align: auto;\n *zoom: 1;\n border: 0;border-radius: 3px;cursor: pointer;display: inline;font-family: inherit;\n font-size: .8em;letter-spacing: .01em;line-height: 18px;margin-right: 12px;\n padding: 8px 16px;text-transform: none;transition: all .5s ease\n }\n ").concat(o,"\n ").concat(i," footer .shepherd-button:last-child {\n }\n\n ").concat(i," footer {\n border-bottom-left-radius: 5px;\n border-bottom-right-radius: 5px;\n display: flex;\n flex-direction:").concat(n===DIRECTION.HORIZONTAL?"row":"column",";\n\n align-items:center;\n justify-content: ").concat(n===DIRECTION.HORIZONTAL?getButtonPosition(t):"space-evenly",";\n padding: 0 .8em .8em;\n }\n ")},generateButtons=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0,i=arguments.length>3?arguments[3]:void 0,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"Inline_",a=window.ApxorRTM,r=[],s=[];return e.forEach((function(e,c){var l,d,p,u,h,g,f,m,_,v,b,y,x=null!==(l=null==e||null===(d=e.action_config)||void 0===d?void 0:d.action)&&void 0!==l?l:"end",w=null!==(p=null==e||null===(u=e.action_config)||void 0===u?void 0:u.vmap)&&void 0!==p?p:{},C=null!==(h=null==e||null===(g=e.action_config)||void 0===g?void 0:g.url)&&void 0!==h?h:"",E=null===(f=null==e||null===(m=e.action_config)||void 0===m?void 0:m.is_external)||void 0===f||f,k=null!==(_=null==e||null===(v=e.action_config)||void 0===v?void 0:v.is_within)&&void 0!==_&&_,S=null!==(b=null==e||null===(y=e.action_config)||void 0===y?void 0:y.callback_func)&&void 0!==b?b:"";x=x.toLowerCase(),resolveDynamicText(e.text_config);var T,A=e.borders,I=e.color,P=e.text_config,O=P.text,L=P.color,N=P.size,B=P.style,D=P.font_family,M=e.gradient_config,F=void 0===M?{}:M;try{switch(x){case"done":case"dismiss":T=function(){a.logActionEvent(o+O+"_Clicked",n,i),t.complete(!1,"dismiss")};break;case"next":T=function(){t.complete(!1,"dismiss"),a.logActionEvent(o+O+"_Clicked",n,i)};break;case"prev":T=function(){t.complete(!1,"prev"),a.logActionEvent(o+O+"_Clicked",n,i)};break;case"redirect":T=function(){a.logActionEvent(o+O+"_Clicked",n,i),k||E?window.open(C,k?"_self":"_blank"):a.logClientEvent("REDIRECT",{url:C}),t.next(!1,"redirect")};break;case"callback":T=function(){for(var e=S.split("."),r=window,s=0;s<e.length;++s)if(!(r=r[e[s]]))return;var c=evaluateCallBackArguments(w);r&&r(c),t.complete(!1,"callback"),a.logActionEvent(o+O+"_Clicked",n,i)};break;case"cancel":T=function(){t._isCancelled=!0,t.cancel(!0,"cancel"),a.logActionEvent(o+O+"_Clicked",n,i)};break;case"never":T=function(){Apxor.logEvent("never_show_clicked"),t._isCancelled=!0;var e=JSON.parse(Apxor.getController().getFromStorage("_apx_never_show_ids"));!isNull$1(e)&&Array.isArray(e)||(e=[]);var i=removeLastPartOfId$1(n);e.includes(i)||e.push(i),Apxor.getController().persistToStorage("_apx_never_show_ids",JSON.stringify(e)),t.complete(!1,"dismiss",c),console.log(e)};break;default:T=function(){a.logActionEvent(o+O+"_Clicked",n,i),t.cancel(!1,"cancel")}}}catch(e){window.ApxorLogger.error("Error setting actions on the buttons:"+e)}s.push({borders:A,bg_color:I,text_color:L,size:N,style:B,font_family:D,gradient_config:F}),r.push({classes:0===c?"button-o":"button-t",text:O,action:T})})),{buttons_array:r,buttons_css:s}},generateButtonsFromConfig=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0,i=arguments.length>3?arguments[3]:void 0,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"Inline_",a=arguments.length>5?arguments[5]:void 0,r=arguments.length>6?arguments[6]:void 0,s=arguments.length>7?arguments[7]:void 0,c=arguments.length>8?arguments[8]:void 0,l=arguments.length>9?arguments[9]:void 0,d=window.ApxorRTM,p=[],u=[];return e.sort((function(e,t){return e.slot-t.slot})),e.forEach((function(e,h){var g="end",f="",m="",_="",v=function(){};if(e.enable_action){var b,y,x=e.action;g=x.type,f=x.url,m=x.is_external,_=null!==(b=x.is_within)&&void 0!==b&&b,v=null!==(y=x.callback)&&void 0!==y?y:function(){}}var w,C,E={};e.enable_text&&(E=null!==(w=null===(C=e.text)||void 0===C||null===(C=C.script)||void 0===C?void 0:C.vmap)&&void 0!==w?w:{});resolveDynamicText(e.text);var k,S=e.slot,T=e.type,A=e.sub_type,I=e.enable_border,P=e.border,O=e.color,L=e.enable_margin,N=e.margin,B=e.enable_padding,D=e.padding,M=e.text,F=M.text,$=M.alignment,R=M.color,V=M.font,H=V.size,q=V.style,U=V.weight,j=M.margin,z=M.padding,W=e.gradient,Y=void 0===W?{}:W,X=e.enable_gradient,G=e.enable_icon,Q=e.icon,Z=void 0===Q?{}:Q;try{switch(g){case"done":case"dismiss":k=function(){d.logActionEvent(o+F+"_Clicked",n,i,l),t.complete(!1,"dismiss",h)};break;case"submit":k=function(){t.complete(!1,"submit",h),d.logActionEvent(o+F+"_Clicked",n,i,l)};break;case"next":k=function(){t.complete(!1,"next",h),r&&c+1<s.length&&t.next(n,c+1),d.logActionEvent(o+F+"_Clicked",n,i,l)};break;case"prev":k=function(){t.complete(!1,"prev",h),r&&c-1>=0&&t.prev(n,c-1),d.logActionEvent(o+F+"_Clicked",n,i,l)};break;case"skip":k=function(){t.complete(!1,"skip",h),d.logActionEvent(o+F+"_Clicked",n,i,l)};break;case"yes":k=function(){t.complete(!1,"yes"),d.logActionEvent(o+F+"_Clicked",n,i,l)};break;case"no":k=function(){t.complete(!1,"no"),d.logActionEvent(o+F+"_Clicked",n,i,l)};break;case"redirect":k=function(){d.logActionEvent(o+F+"_Clicked",n,i,l),_||m?window.open(f,_?"_self":"_blank"):d.logClientEvent("REDIRECT",{url:f}),t.next(!1,"redirect",h)};break;case"reload":k=function(){t.complete(!1,"dismiss"),d.logActionEvent(o+F+"_Clicked",n,i),window.location.reload()};break;case"callback":k=function(){for(var e=v.split("."),a=window,r=0;r<e.length;++r)if(!(a=a[e[r]]))return;var s=evaluateCallBackArguments(E);a&&a(s),t.complete(!1,"callback",h),d.logActionEvent(o+F+"_Clicked",n,i,l)};break;case"cancel":k=function(){d.logActionEvent(o+F+"_Clicked",n,i,l),t._isCancelled=!0,t.cancel(!0,"cancel",h)};break;case"never":k=function(){Apxor.logEvent("never_show_clicked"),t._isCancelled=!0;var e=JSON.parse(Apxor.getController().getFromStorage("_apx_never_show_ids"));!isNull$1(e)&&Array.isArray(e)||(e=[]);var i=removeLastPartOfId$1(n);e.includes(i)||e.push(i),Apxor.getController().persistToStorage("_apx_never_show_ids",JSON.stringify(e)),console.log(e),t.complete(!1,"dismiss",h)};break;default:k=function(){d.logActionEvent(o+F+"_Clicked",n,i,l),t.cancel(!1,"cancel",h)}}}catch(e){window.ApxorLogger.error("Error setting actions on the buttons:"+e)}var K=_setFontFaceAtRule(e.text.font),J=K[0];u.push({slot:S,type:T,sub_type:A,enable_border:I,border:P,bg_color:O,text_color:R,text_alignment:$,size:H,style:q,weight:U,font_family:J,text_margin:j,text_padding:z,enable_margin:L,margin:N,enable_padding:B,padding:D,enable_gradient:X,gradient:Y,custom_font:K[1],enable_icon:G,icon:Z}),p.push({type:"".concat(T||"button"),sub_type:"".concat(A||""),classes:"".concat(a,"-button-").concat(h,"-slot-").concat(S),text:F,action:k,_action:g,enable_icon:G,icon:Z})})),{buttons_array:p,buttons_css:u}};function hexToRgb$1(e){e=e.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i,(function(e,t,n,i){return t+t+n+n+i+i}));var t=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);return t?{r:parseInt(t[1],16),g:parseInt(t[2],16),b:parseInt(t[3],16)}:null}var createDialog$1=function(e,t,n){var i=n.dim_background,o=void 0===i||i,a=n.dim_bg_color,r=void 0===a?"#000000":a,s=n.dim_bg_opacity,c=void 0===s?.87:s,l=n.position,d=document.createElement("div");d.setAttribute("id",APX_OVERLAY);var p=document.createElement("style"),u="center",h="center";switch(l){case"bottom-left":u="flex-start",h="flex-end";break;case"bottom-right":u="flex-end",h="flex-end";break;case"top-left":u="flex-start",h="flex-start";break;case"top-right":u="flex-end",h="flex-start"}var g="none";if(o){var f=hexToRgb$1(r);g="rgb(".concat(f.r,", ").concat(f.g,", ").concat(f.b,", ").concat(c,")")}p.innerHTML="\n#apx-oly {\n width:100%;height:100%;position:fixed;top:0;left:0;background-color:".concat(g,";\n display:flex;justify-content:").concat(u,";align-items:").concat(h,";border-radius:3px;z-index:2147483647\n}\n#apx-oly > * {font-family: inherit;box-sizing:unset}\n.apx-dlg-c {\n width:").concat(e,"px;min-height:").concat(t,"%;background:white;z-index:99999999;opacity:0;position:relative;visibility:hidden;\n transition:all 500ms cubic-bezier(0, -0.37, 0, 2.06);top:-15px;border-radius:3px;margin:20px\n}\n.apx-dlg-c.open {opacity:1;visibility:visible;top:0}\n ").replaceAll("\n","").replace(/[\s]{2,999}/g,"");var m=document.createElement("div");return m.setAttribute("id",APX_DIALOG_CONTENT),m.classList.add(APX_DIALOG_CONTENT),d.appendChild(m),d.appendChild(p),document.body.appendChild(d),d},getCookie=function(e){if(window.document)for(var t=e+"=",n=window.document.cookie.split(";"),i=0;i<n.length;i++){for(var o=n[i];" "===o.charAt(0);)o=o.substring(1,o.length);if(0===o.indexOf(t))return decodeURIComponent(o.substring(t.length,o.length))}return null},uuid$1=function e(t){return[Math.random,function(){return e.last?e.last+Math.random():Math.random()},Math.random,Date.now,Math.random].map((function(e){return e().toString(t||16+20*Math.random()).substr(-8)})).join("-")},hexToRGB=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:.5,n=parseInt(e.slice(1,3),16),i=parseInt(e.slice(3,5),16),o=parseInt(e.slice(5,7),16);return t?"rgba("+n+", "+i+", "+o+", "+t+")":"rgb("+n+", "+i+", "+o+")"},getAnimationValue=function(e){return 50===e?10:16},translateDir=function(e,t){switch(e.toLowerCase()){case"top":case"top-start":case"top-end":return"translateY(".concat(getAnimationValue(t)-26,"px)");case"right":case"right-start":case"right-end":return"translateX(".concat(getAnimationValue(t),"px)");case"bottom":case"bottom-start":case"bottom-end":return"translateY(".concat(getAnimationValue(t),"px)");case"left":case"left-start":case"left-end":return"translateX(".concat(getAnimationValue(t)-26,"px)")}},removeLastPartOfId$1=function(e){return e.includes("-testing")?e.substring(0,e.length-10)+"-1":e.substring(0,e.length-2)+"-1"},checkForNeverShow$1=function(e){var t=JSON.parse(Apxor.getController().getFromStorage("_apx_never_show_ids"));if(isNull$1(t)||!Array.isArray(t))return!0;var n=removeLastPartOfId$1(e);return!t.includes(n)},isElementInViewport=function(e){var t=null==e?void 0:e.offsetHeight,n=null==e?void 0:e.offsetWidth;if(isUndefined$2(t)&&isUndefined$2(n)){var i=null==e?void 0:e.getBBox();n=null==i?void 0:i.width,t=null==i?void 0:i.height}var o=e.getBoundingClientRect();return o.left>=-n&&o.top>=-t&&o.right<=(window.innerWidth||document.documentElement.clientWidth)+n&&o.bottom<=(window.innerHeight||document.documentElement.clientHeight)+t},replaceStringBetweenIndeces=function(e,t,n,i){return e.substring(0,t)+i+e.substring(n)},evaluateDynamicText=function(e){var t=Apxor.getController().getUserAttributes(),n=Apxor.getController().getSessionAttributes(),i=e.script.vmap,o=e.script.src,a=o.indexOf("{"),r=o.indexOf("}"),s=Apxor.getController().getListOfEventsLogged();try{for(;-1!=a&&-1!=r&&a<r;){var c=o.substring(a+1,r),l=i[c][VARIABLE_TYPE],d=i[c][ATTRIBUTE_NAME],p=i[c][DEFAULT_VALUE],u="";if(l===SESSION_ATTRIBUTES)u=n[d]?n[d]:p;else if(l===USER_ATTRIBUTES)u=t[d]?t[d]:p;else if(l===APPLICATION_VIEW_ID)if(Apxor.isFlutter()){var h=Apxor.getApxorFlutterHelper().getText(d);u=h.r&&1==h.r.st?h.r.t:p}else{var g=getElementFromSelector(d);(u=null==g?void 0:g.textContent)||(u=(null==g?void 0:g.value)||p)}else if(l===EVENT_TYPE){var f=i[c][ATTRIBUTE_NAME],m=i[c][EVENT_PROPERTY_NAME];u=s[f]&&s[f][m]?s[f][m]:p}a=(o=replaceStringBetweenIndeces(o,a,r+1,u)).indexOf("{"),r=o.indexOf("}")}e.text=o}catch(e){console.log("Can't evaluate the dynamic text")}},evaluateCallBackArguments=function(e){var t=Apxor.getController().getUserAttributes(),n=Apxor.getController().getSessionAttributes(),i=e,o={},a=Apxor.getController().getLoggedEventsList();try{return Object.keys(i).forEach((function(e){var r=i[e],s=r[VARIABLE_TYPE],c=r[ATTRIBUTE_NAME],l=r[DEFAULT_VALUE],d="";if(s===SESSION_ATTRIBUTES)d=n[c]?n[c]:l;else if(s===USER_ATTRIBUTES)d=t[c]?t[c]:l;else if(s===APPLICATION_VIEW_ID){var p=getElementFromSelector(c);(d=null==p?void 0:p.textContent)||(d=(null==p?void 0:p.value)||l)}else if(s===EVENT_TYPE){var u=i[e][ATTRIBUTE_NAME],h=i[e][EVENT_PROPERTY_NAME];d=a[u]&&a[u][h]?a[u][h]:l}o[e]=d})),o}catch(e){console.log("Can't evaluate the dynamic text")}},evaluateDynamicScript=function(e){var t=Apxor.getController().getUserAttributes(),n=Apxor.getController().getSessionAttributes(),i=e.script.vmap,o="",a=e.script.src,r=Apxor.getController().getListOfEventsLogged();Object.entries(i).forEach((function(e){var a=_slicedToArray$1(e,2),s=a[0],c=a[1],l=c[VARIABLE_TYPE],d=c[ATTRIBUTE_NAME],p=c[DEFAULT_VALUE],u="";if(l===SESSION_ATTRIBUTES)u=n[d]?n[d]:p;else if(l===USER_ATTRIBUTES)u=t[d]?t[d]:p;else if(l===APPLICATION_VIEW_ID)if(Apxor.isFlutter()){var h=Apxor.getApxorFlutterHelper().getText(d);u=h.r&&1==h.r.st?h.r.t:p}else{var g=getElementFromSelector(d);(u=null==g?void 0:g.textContent)||(u=(null==g?void 0:g.value)||p)}else if(l===EVENT_TYPE){var f=i[s][ATTRIBUTE_NAME],m=i[s][EVENT_PROPERTY_NAME];u=r[f]&&r[f][m]?r[f][m]:p}o="".concat(o," \n let ").concat(s,' = "').concat(u,'";')}));var s="".concat(o," \n ").concat(a);e.text=new Function(s)()},resolveDynamicText=function(e){(null==e?void 0:e.text)===DYNAMIC_TEXT&&(0===e.script.t?evaluateDynamicText(e):evaluateDynamicScript(e))},getStylisedText=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2?arguments[2]:void 0,i=arguments.length>3?arguments[3]:void 0,o=document.createElement("span");if(0==t.length?o.innerText=addLinksToText(e,i):t.forEach((function(t){var n=parseInt(t.start),a=parseInt(t.end),r=e.substring(n,a),s="";t.color&&(s="".concat(s,"color:").concat(t.color,";")),t.font_family&&(s="".concat(s,"font-family:").concat(t.font_family,";")),t.size&&(s="".concat(s,"font-size:").concat(t.size,"px;")),"italic"===t.style&&(s="".concat(s,"font-style:").concat(t.style,";")),"bold"===t.style&&(s="".concat(s,"font-weight:").concat(t.style,";")),"normal"===t.style&&(s="".concat(s,"font-weight:").concat(t.style,";")),1==t.underline&&(s="".concat(s,"text-decoration:underline;")),1==t.strike_through&&(s="".concat(s,"text-decoration:line-through;")),"super"==t.script&&(s="".concat(s,"vertical-align:super;")),"sub"==t.script&&(s="".concat(s,"vertical-align:sub;")),t.bg_color&&(s="".concat(s,"background-color:").concat(t.bg_color,";"));var c=document.createElement("span");c.style=s,c.innerHTML=addLinksToText(r,i),o.appendChild(c)})),void 0!==n){var a=document.createElement("blockquote"),r="";return n.color&&(r="border-left-color:".concat(n.color,";")),n.width&&(r="".concat(r,"border-left-width:").concat(n.width,"px;")),n.gap&&(r="".concat(r,"padding:").concat(n.gap,"px;")),a.appendChild(o),a.style=r,a}return o},addLinksToText=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=e;return t.forEach((function(t){t.text===e&&(n='<a style="text-decoration: none;" target="_blank" href="'.concat(t.url,'">').concat(e,"</a>"))})),n},_setFontFaceAtRule=function(e){if("unknown format"===getFontFormatFromCustomFontURL(e.family))return[e.family,""];var t=e.family,n=e.family.split("/").pop().replace(/[^A-Za-z0-9]/g,""),i="\n @font-face {\n font-family: ".concat(n,";\n src: url(").concat(t,") format(").concat(getFontFormatFromCustomFontURL(e.family),");\n }");return["".concat(n,", ").concat("sans-serif"),i]},createTextElement=function(e,t){var n=e.color,i=void 0===n?"#000":n,o=e.font_family,a=void 0===o?"cursive":o,r=e.size,s=void 0===r?14:r,c=e.style,l=void 0===c?"bold":c,d=e.text,p=e.segments,u=e.quote,h=e.link_config,g=void 0===h?[]:h,f=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"desc",m=document.createElement("span");m.setAttribute("id",t+"-"+f),m.className="apx-class-".concat(t,"-").concat(f);var _=_setFontFaceAtRule({family:a}),v=document.createElement("style");return v.innerHTML="\n ".concat(_[1],"\n \n .apx-class-").concat(t,"-").concat(f," {\n z-index:99999;\n color:").concat(i," !important;\n font-family:").concat(_[0]," !important;\n font-size:").concat(s,"px !important;\n font-weight:").concat(l," !important;\n font-style:").concat("normal"===l||"italic"===l?l+" !important":"unset",";\n max-width:400px;\n }\n "),m.appendChild(v),m.appendChild(getStylisedText(d,p,u,g)),m},createNewTextElement=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"desc",i=document.createElement("span");i.setAttribute("id",t+"-"+n),i.className="apx-class-".concat(t,"-").concat(n);var o=_setFontFaceAtRule(e.font),a=document.createElement("style");return a.innerHTML="\n ".concat(o[1],"\n .apx-class-").concat(t,"-").concat(n," {\n z-index:99999;\n color:").concat(e.color," !important;\n font-family:").concat(o[0]," !important;\n font-size:").concat(e.font.size,"px !important;\n font-weight:").concat(e.font.weight," !important;\n font-style:").concat("normal"===e.font.style||"italic"===e.font.style?e.font.style+" !important":"unset",";\n }\n "),i.appendChild(a),i.appendChild(getStylisedText(e.text,e.segments,e.quote,e.link_config)),i},makeid=function(e){for(var t="",n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",i=n.length,o=0;o<e;o++)t+=n.charAt(Math.floor(Math.random()*i));return t},getHeightWidthFromResolution=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:.5,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=0,o=0;try{var a=e.width,r=void 0===a?360:a,s=e.height,c=void 0===s?360:s,l=c/r,d=window.innerWidth,p=window.innerHeight;n?(o=(i=p*t)/l)>.7*d&&(i=(o=.7*d)*l):(i=(o=d*t)*l)>.7*p&&(o=(i=.7*p)/l)}catch(e){console.log("Error \n ".concat(e," \n occured while calculating the height and width"))}return{height:i,width:o}},generateButtonsBlock=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:EVENT_PREFIX.INAPP,o=arguments.length>4?arguments[4]:void 0,a=arguments.length>5?arguments[5]:void 0,r=arguments.length>6&&void 0!==arguments[6]?arguments[6]:"center",s=arguments.length>7?arguments[7]:void 0,c=arguments.length>8?arguments[8]:void 0,l=arguments.length>9?arguments[9]:void 0,d=arguments.length>10&&void 0!==arguments[10]?arguments[10]:{},p=arguments.length>11?arguments[11]:void 0,u=arguments.length>12?arguments[12]:void 0,h=arguments.length>13&&void 0!==arguments[13]?arguments[13]:"center",g=document.createElement("div");g.className="".concat(s,"-buttons-container"),g.style.zIndex=99999999;var f=generateButtonsFromConfig(o,c,e,t,i,s,l,d,p,u),m=f.buttons_array,_=f.buttons_css,v=document.createElement("style");return v.innerHTML=getButtonsCSSFromConfig(n,_,a,r,s,h),g.appendChild(v),m.forEach((function(e,t){var i=e.classes,o=e.type,a=e.sub_type,r=e.text,c=e.action,l=e._action,d=e.enable_icon,p=e.icon,u=document.createElement("div");if(u.setAttribute("id","apxor-".concat(s,"-").concat(l,"-button")),u.className="button-div "+i,"stepper"===o){var h=document.createElement("div");h.className=o+"-"+a,h.innerHTML=setCarousel(a,n),u.appendChild(h)}else if(d){var f=document.createElement("div");f.classList.add("apxor-survey-request-button-icon-Button-container".concat(t));var m=document.createElement("div");m.classList.add("apxor-survey-request-button-icon-container".concat(t));var _=document.createElement("img");_.src=p.path,_.classList.add("apxor-survey-request-button-icon-content".concat(t)),m.appendChild(_),f.appendChild(m);var v=document.createElement("button");v.className=i,v.innerHTML=r,f.appendChild(v),u.appendChild(f),u.onclick=function(){return c()}}else{var b=document.createElement("button");b.className=i,b.innerHTML=r,u.appendChild(b),u.onclick=function(){return c()}}g.appendChild(u)})),g},setCarousel=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(e===CAROUSEL_TYPE.NUMBER&&t.enable_numbered){var n=t.numbered;if(t.index<=t.length)return"number"===n.style?"".concat(t.index,"/").concat(t.length):"number_of"===n.style?"".concat(t.index," of ").concat(t.length):"step_number"===n.style?"Step ".concat(t.index,"/").concat(t.length):"Step ".concat(t.index," of ").concat(t.length)}else{if(e!==CAROUSEL_TYPE.CAROUSEL||!t.enable_pagination)return"slash"===e?"".concat(t.index," / ").concat(t.length):"question_slash"===e?"".concat(t.pagination_text.text," ").concat(t.index," / ").concat(t.length," "):"question_of"===e?"".concat(t.pagination_text.text," ").concat(t.index," of ").concat(t.length," "):"".concat(t.index," of ").concat(t.length);var i=t.carousel;if(t.index<=t.length)return createCarousel(t,i)}return""};function createCarousel(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,n=document.createElement("div");n.setAttribute("class","carousel-container");var i=document.createElement("style"),o=2*parseInt(t.active_radius);i.innerHTML=".carousel-container{\n display:flex;\n flex-direction:row;\n padding-left:8px;\n gap:".concat(t.spacebetween,";\n align-items:center;\n }\n .carousel-indicator-inactive{\n height: ").concat(t.inactive_radius,";\n width: ").concat(t.inactive_radius,";\n background-color: ").concat(t.inactive_color,";\n border-radius: 50%;\n display: inline-block;\n }\n .carousel-indicator-active-default{\n height: ").concat(t.inactive_radius,";\n width: ").concat(t.inactive_radius,";\n background-color: ").concat(t.active_color,";\n border-radius: 50%;\n display: inline-block;\n }\n .carousel-indicator-active-narrow\n {\n height: ").concat(t.inactive_radius,";\n width: ").concat(o,"px;\n border-radius:").concat(t.inactive_radius,";\n background-color: ").concat(t.active_color,";\n display: inline-block;\n }\n .carousel-indicator-active-circle\n {\n height: ").concat(t.active_radius,";\n width: ").concat(t.active_radius,";\n background-color: ").concat(t.active_color,";\n border-radius: 50%;\n display: inline-block;\n }\n\n "),n.appendChild(i);for(var a=0;a<=e.length;a++){var r=document.createElement("div");a===e.index?r.setAttribute("class","carousel-indicator-active-".concat(t.style)):r.setAttribute("class","carousel-indicator-inactive"),n.appendChild(r)}return n.outerHTML.toString()}var generateFormField=function(e){var t,n,i,o,a,r,s,c,l,d,p,u,h,g,f,m,_,v;switch(e.type){case"fullname":return'\n <div class="mainName" style="padding: 8px; display: flex;gap :8px" >\n <div class="first" style="width:50%">\n '.concat(e.name?'<label for="fname" style="line-height:1.5;">'.concat(null!==(t=null==e||null===(n=e.name)||void 0===n?void 0:n[0])&&void 0!==t?t:" ","</label><br />"):"",'\n <input type="text" id="fname" placeholder="').concat(null!==(i=null==e||null===(o=e.placeholder)||void 0===o?void 0:o[0])&&void 0!==i?i:" ",'" style="width: 90%;border-radius: 5px;padding: 8px;"/>\n </div>\n <div class="first" style="width:50%">\n ').concat(e.name?'<label for="fname" style="line-height:1.5;">'.concat(null!==(a=null==e||null===(r=e.name)||void 0===r?void 0:r[1])&&void 0!==a?a:" ","</label><br />"):"",'\n <input type="text" id="lname" placeholder="').concat(null!==(s=null==e||null===(c=e.placeholder)||void 0===c?void 0:c[1])&&void 0!==s?s:" ",'" style="width: 90%;border-radius: 5px;padding: 8px;"/>\n </div>\n </div>');case"name":return'\n <div class="mainFullName" style="width:100%;padding: 8px;box-sizing: border-box;">\n '.concat(e.name?'<label for="name" style="line-height:1.5;">'.concat(null!==(l=null==e?void 0:e.name)&&void 0!==l?l:" ","</label><br />"):"",'\n <input type="text" id="name" placeholder="').concat(null!==(d=null==e?void 0:e.placeholder)&&void 0!==d?d:" ",'" style="width: 95%;border-radius: 5px;padding: 8px;"/>\n </div>');case"email":return'\n <div class="mainEmail" style="width:100%;padding: 8px;box-sizing: border-box;">\n '.concat(e.name?'<label for="email" style="line-height:1.5;">'.concat(null!==(p=null==e?void 0:e.name)&&void 0!==p?p:" ","</label><br />"):"",'\n <input type="email" id="email" placeholder="').concat(null!==(u=null==e?void 0:e.placeholder)&&void 0!==u?u:" ",'" style="width: 95%;border-radius: 5px;padding: 8px;\n "/>\n </div>');case"phone":return'\n <div class="mainPhoneNumber" style="width:100%;padding: 8px;box-sizing: border-box;">\n '.concat(e.name?'<label for="phoneNumber" style="line-height:1.5;">'.concat(null!==(h=null==e?void 0:e.name)&&void 0!==h?h:" ","</label><br />"):"",'<input type="tel" id="phoneNumber" placeholder="').concat(null!==(g=null==e?void 0:e.placeholder)&&void 0!==g?g:" ",'" style="width: 95%;border-radius: 5px;padding: 8px;\n "/>\n </div>');case"date":return'\n <div class="mainDate" style="width:100%;padding: 8px;box-sizing: border-box;">\n '.concat(e.name?'<label for="date" style="line-height:1.5;">'.concat(null!==(f=null==e?void 0:e.name)&&void 0!==f?f:" ","</label><br />"):"",'\n <input type="date" id="date" style="width:95%;border-radius:5px;padding:8px;"/>\n </div>');case"message":return'\n <div class="mainTextField" style="width:100%;padding: 8px;box-sizing: border-box;">\n '.concat(e.name?'<label for="textField" style="line-height:1.5;">'.concat(null!==(m=null==e?void 0:e.name)&&void 0!==m?m:" ","</label><br />"):"",'\n <textarea id="textField" placeholder="').concat(null!==(_=null==e?void 0:e.placeholder)&&void 0!==_?_:" ",'" style="width: 95%;border-radius: 5px;padding: 8px;"></textarea>\n </div>');case"button":return'\n <div class="buttonClass" style="width:100%;padding: 8px;box-sizing: border-box;">\n <input type="submit" value="'.concat(null!==(v=null==e?void 0:e.value)&&void 0!==v?v:" ",'" style="max-width:99%;width:100%;border-radius:5px;padding:8px;">\n </div>\n ');default:return}},getPIPSVG=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:24,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:24,n=arguments.length>2?arguments[2]:void 0,i='\n <svg xmlns="http://www.w3.org/2000/svg" width="'.concat(e,'" height="').concat(t,'" fill=').concat(n,' class="bi bi-pip" viewBox="0 0 16 16">\n <path d="M0 3.5A1.5 1.5 0 0 1 1.5 2h13A1.5 1.5 0 0 1 16 3.5v9a1.5 1.5 0 0 1-1.5 1.5h-13A1.5 1.5 0 0 1 0 12.5v-9zM1.5 3a.5.5 0 0 0-.5.5v9a.5.5 0 0 0 .5.5h13a.5.5 0 0 0 .5-.5v-9a.5.5 0 0 0-.5-.5h-13z"/>\n <path d="M8 8.5a.5.5 0 0 1 .5-.5h5a.5.5 0 0 1 .5.5v3a.5.5 0 0 1-.5.5h-5a.5.5 0 0 1-.5-.5v-3z"/>\n </svg>');return i},getCloseWithCircleSVG=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:24,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:24,n=arguments.length>2?arguments[2]:void 0,i=arguments.length>3?arguments[3]:void 0,o='<svg viewBox="0 0 24 24" fill="none" width="'.concat(e,'" height="').concat(t,'" xmlns="http://www.w3.org/2000/svg">\n <path d="M12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22Z" fill="').concat(n,'"></path>\n <path d="M13.0594 12.0001L15.3594 9.70011C15.6494 9.41011 15.6494 8.93011 15.3594 8.64011C15.0694 8.35011 14.5894 8.35011 14.2994 8.64011L11.9994 10.9401L9.69937 8.64011C9.40937 8.35011 8.92937 8.35011 8.63938 8.64011C8.34938 8.93011 8.34938 9.41011 8.63938 9.70011L10.9394 12.0001L8.63938 14.3001C8.34938 14.5901 8.34938 15.0701 8.63938 15.3601C8.78938 15.5101 8.97937 15.5801 9.16937 15.5801C9.35937 15.5801 9.54937 15.5101 9.69937 15.3601L11.9994 13.0601L14.2994 15.3601C14.4494 15.5101 14.6394 15.5801 14.8294 15.5801C15.0194 15.5801 15.2094 15.5101 15.3594 15.3601C15.6494 15.0701 15.6494 14.5901 15.3594 14.3001L13.0594 12.0001Z" fill="').concat(i,'"></path>\n </svg>');return o},getCloseWithRectangleSVG=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:24,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:24,n=arguments.length>2?arguments[2]:void 0,i=arguments.length>3?arguments[3]:void 0,o='\n <svg viewBox="0 0 24 24" fill="currentColor" style="background-color:'.concat(n,";color:").concat(i,';" width="').concat(e,'" height="').concat(t,'">\n <path d="M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"></path>\n </svg>\n ');return o},getFilledBackArrowSvg=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:24,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:24,n=arguments.length>2?arguments[2]:void 0,i='<svg fill="'.concat(n,'" height="').concat(t,'" width="').concat(e,'" version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 512 512" xml:space="preserve" stroke="#c43131"><g id="SVGRepo_bgCarrier" stroke-width="0"></g><g id="SVGRepo_tracerCarrier" stroke-linecap="round" stroke-linejoin="round"></g><g id="SVGRepo_iconCarrier"> <g> <g> <path d="M0,0v512h512V0H0z M384,277.333H179.499l48.917,48.917c8.341,8.341,8.341,21.824,0,30.165 c-4.16,4.16-9.621,6.251-15.083,6.251c-5.461,0-10.923-2.091-15.083-6.251l-85.333-85.333c-1.963-1.963-3.52-4.309-4.608-6.933 c-2.155-5.205-2.155-11.093,0-16.299c1.088-2.624,2.645-4.971,4.608-6.933l85.333-85.333c8.341-8.341,21.824-8.341,30.165,0 s8.341,21.824,0,30.165l-48.917,48.917H384c11.776,0,21.333,9.557,21.333,21.333S395.776,277.333,384,277.333z"></path> </g> </g> </g></svg>');return i},getCloseSVG=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:24,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:24,n=arguments.length>2?arguments[2]:void 0,i='\n <svg xmlns="http://www.w3.org/2000/svg" width="'.concat(e,'" height="').concat(t,'" fill=').concat(n,' class="bi bi-x" viewBox="0 0 24 24" aria-hidden="true">\n <path d="M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"></path>\n </svg>');return i},getBackSVG=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:24,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:24,n=arguments.length>2?arguments[2]:void 0,i='\n <svg width="'.concat(e,'" height="').concat(t,'" viewBox="0 0 19 17" fill=').concat(n,' xmlns="http://www.w3.org/2000/svg">\n<path d="M19 7.4375H3.97961L9.78797 1.49812L8.3125 0L0 8.5L8.3125 17L9.77758 15.5019L3.97961 9.5625H19V7.4375Z" fill="').concat(n,'"/>\n</svg> ');return i},addClickListenerForFlutterElement=function(e,t){window.addEventListener("resize",window.ApxorRTM.removeAll);var n=e.getBoundingClientRect(),i=function e(i){var o=i.clientX,a=i.clientY;o>n.left&&o<n.right&&a>n.top&&a<n.bottom&&(t(),document.body.removeEventListener("click",e))};return document.body.addEventListener("click",i),i},getElementPositionFromFlutter=function(e){return Apxor.getApxorFlutterHelper().find(e).r},createTargetView=function(e){if(!e)return null;if(0==(null==e?void 0:e.st))return null;if(0===e.l&&0===e.t&&0===e.r&&0===e.b)return null;var t=document.createElement("div");return t.style.position="absolute",t.style.height=String(e.b-e.t)+"px",t.style.width=String(e.r-e.l)+"px",t.style.left=String(e.l)+"px",t.style.top=String(e.t)+"px",t.style.zIndex=-99999,document.body.appendChild(t),t},getElementFromSelector=function(e){var t,n,i,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",a=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};if(!(t=document.getElementById(e)))try{if(n=document.querySelectorAll(e),a)if(n.length>0)for(var s=0;s<n.length;s++){var c=contentBasedSearch(n[s],r);c&&(t=n[s])}else{n=document.querySelectorAll("*");for(var l=0;l<n.length;l++){var d=contentBasedSearch(n[l],r);d&&(t=n[l])}}else t=n[0]}catch(e){window.ApxorLogger.error("Error finding element in DOM:"+e)}(t||(t=getElementByXPath(e)),!t&&o.length>0)&&(t=null===(i=document.getElementById(o))||void 0===i||null===(i=i.contentWindow)||void 0===i||null===(i=i.document)||void 0===i?void 0:i.querySelector(e));return t},collapseSpaces=function(e){return e.replace(/\s+/g," ")},contentBasedSearch=function(e,t){var n,i=t.type,o=t.op,a=t.content,r=e.innerText.trim().toLowerCase();if(r=collapseSpaces(r),a=null===(n=a)||void 0===n?void 0:n.trim().toLowerCase(),a=collapseSpaces(a),"s"===i)switch(o){case"contains":return r.includes(a);case"does_not_contain":return!r.includes(a);case"exactly_matches":return r===a;case"does_not_match":return r!==a;case"starts_with":return r.startsWith(a);case"ends_with":return r.endsWith(a);case"matches_regex":return new RegExp(a).test(r);default:return!1}else{if("n"!==i)return!1;var s=parseFloat(a);if(isNaN(s))return!1;var c=parseFloat(r);switch(o){case"EQ":return c===s;case"NEQ":return c!==s;case"GT":return c>s;case"LT":return c<s;case"GTE":return c>=s;case"LTE":return c<=s;default:return!1}}};function isElementCovered(e){for(var t=e.getBoundingClientRect(),n=t.left+t.width/2,i=t.top+t.height/2,o=document.elementFromPoint(n,i),a=e;o;){if(o===e)return!1;o=o.parentElement}if(!o)for(var r=document.elementFromPoint(n,i);a;){if(a===r)return!1;a=a.parentElement}return!0}var getCheckMarkSVG=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:64,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:64,n=arguments.length>2?arguments[2]:void 0,i='\n <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0,0,256,256" width='.concat(e," height=").concat(t,' fill-rule="nonzero">\n <g fill="none" fill-rule="nonzero" stroke="none" stroke-width="none" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="10" stroke-dasharray="" stroke-dashoffset="0" font-family="none" font-weight="none" font-size="none" text-anchor="none" style="mix-blend-mode: normal">\n <g transform="scale(6.4,6.4)">\n <path d="M20,38.5c-10.2,0 -18.5,-8.3 -18.5,-18.5c0,-10.2 8.3,-18.5 18.5,-18.5c10.2,0 18.5,8.3 18.5,18.5c0,10.2 -8.3,18.5 -18.5,18.5z" fill= ').concat(n,' stroke="none" stroke-width="1"/>\n <path d="M20,2c9.9,0 18,8.1 18,18c0,9.9 -8.1,18 -18,18c-9.9,0 -18,-8.1 -18,-18c0,-9.9 8.1,-18 18,-18M20,1c-10.5,0 -19,8.5 -19,19c0,10.5 8.5,19 19,19c10.5,0 19,-8.5 19,-19c0,-10.5 -8.5,-19 -19,-19z" fill="#5e9c76" stroke="none" stroke-width="1"/>\n <path d="M11.2,20.1l5.8,5.8l13.2,-13.2" fill="none" stroke=').concat(COLORS.WHITE,' stroke-width="3"/>\n </g>\n </g>\n </svg>');return i},getDevice$1=function(){var e=window.navigator,t=(void 0===e?{}:e).userAgent,n=void 0===t?"":t;switch(!0){case/Windows Phone/i.test(n)||/WPDesktop/.test(n):return"Windows Phone";case/iPad/.test(n):return"iPad";case/iPod/.test(n):return"iPod Touch";case/iPhone/.test(n):return"iPhone";case/(BlackBerry|PlayBook|BB10)/i.test(n):return"BlackBerry";case/Android/.test(n):return"Android";default:return"Desktop"}},isIOSDevice=function(){var e=getDevice$1();return"iPad"===e||"iPod Touch"===e||"iPhone"===e},getNumberOrDefault=function(e,t){var n=Number(e);return n||0===n?n:t},getSlotNumberByPosition=function(e){return"left"===e?1:"center"===e?3:5},getBooleanOrDefault=function(e,t){var n=Boolean(e);return n||t},getStringOrDefault=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1?arguments[1]:void 0,n=String(e);return n||t},getColorOrDefault=function(e,t){if(!e)return t;var n=String(e);return n||t},getArrayOrDefault=function(e,t){return e&&Array.isArray(e)?e:t},isEmptyObject=function(e){return"object"!==_typeof$1(e)||0===Object.keys(e).length},getFontFormatFromCustomFontURL=function(e){var t=e.split(".").pop(),n={woff:"woff",woff2:"woff2",ttf:"truetype",otf:"opentype",eot:"embedded-opentype",svg:"svg"};return Object.hasOwn(n,t)?n[t]:"unknown format"},convertTheDirectionCode=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";switch(e){case"H":return"horizontal";case"V":return"vertical";default:return e}},convertThePositionCode=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";switch(e){case"TL":return"top-left";case"TC":case"T":return"top-center";case"TR":return"top-right";case"L":return"left";case"C":return"center";case"R":return"right";case"BL":return"bottom-left";case"BC":case"B":return"bottom-center";case"BR":return"bottom-right";default:return e}},convertThePositionCodeToFLexBoxPosition=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";switch(e){case"L":return"flex-start";case"C":return"center";case"R":default:return"flex-end"}},doesUrlMatchSkeleton=function(e,t,n){var i=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(!e||!t||!n)return!1;var o=n.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"),a=t.replace(new RegExp(o,"g"),"(.+)"),r=i?"^".concat(a):"".concat(a,"$"),s=new RegExp(r);return s.test(e)},feedBackMessagePopUp=function(e){var t='\n <style> \n .apx-container{\n padding:10px;\n }\n </style>\n <div id="apx-innerElement" class="apx-container">\n <div id="close-button" style="cursor: pointer;position:absolute;top:9px;right:9px;"><svg width="11" height="11" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path opacity="0.5" d="M11.0962 9.07071L17.8586 15.8331L15.8331 17.8586L9.0707 11.0962L8.99999 11.0255L8.92928 11.0962L2.16693 17.8586L0.141421 15.8331L6.90379 9.07071L6.9745 9L6.90379 8.92929L0.141421 2.16694L2.16693 0.141422L8.92928 6.9038L8.99999 6.97451L9.0707 6.9038L15.8331 0.141422L17.8586 2.16694L11.0962 8.92929L11.0255 9L11.0962 9.07071Z" fill="white" stroke="#002845" stroke-width="0.2"/>\n </svg>\n </div>\n <div style="font-family: inherit;font-style: normal;font-weight: 600;font-size: 16px;line-height: 22px;\n color: #FFFFFF; display: flex; gap: 12px;"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-circle-check-filled" width="33" height="33" viewBox="0 0 24 24" stroke-width="1.5" stroke="#ffffff" fill="none" stroke-linecap="round" stroke-linejoin="round">\n <path stroke="none" d="M0 0h24v24H0z" fill="none"/>\n <path d="M17 3.34a10 10 0 1 1 -14.995 8.984l-.005 -.324l.005 -.324a10 10 0 0 1 14.995 -8.336zm-1.293 5.953a1 1 0 0 0 -1.32 -.083l-.094 .083l-3.293 3.292l-1.293 -1.292l-.094 -.083a1 1 0 0 0 -1.403 1.403l.083 .094l2 2l.094 .083a1 1 0 0 0 1.226 0l.094 -.083l4 -4l.083 -.094a1 1 0 0 0 -.083 -1.32z" stroke-width="0" fill="currentColor" />\n</svg><div style = "align-self: center;padding-right:20px;">'.concat(e,"</div></div>\n </div>\n "),n=document.createElement("div");n.style="\n z-index:99999999;\n background:#16202f;\n position:fixed;\n top:1%;\n right:1%;\n border-radius: 12px;\n ",n.innerHTML=t,n.id="apx-container",document.body.appendChild(n)};
2
- /*! shepherd.js 4.0.0-beta.1 */
3
- function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"===_typeof$1(Symbol.iterator)?function(e){return _typeof$1(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":_typeof$1(e)})(e)}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function _createClass(e,t,n){return t&&_defineProperties(e.prototype,t),n&&_defineProperties(e,n),e}function _defineProperty(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _extends(){return(_extends=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e}).apply(this,arguments)}function _objectSpread2(e){for(var t=1;t<arguments.length;t++)if(t%2){var n=null!=arguments[t]?arguments[t]:{},i=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),i.forEach((function(t){_defineProperty(e,t,n[t])}))}else Object.defineProperties(e,Object.getOwnPropertyDescriptors(arguments[t]));return e}function _inherits(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&_setPrototypeOf(e,t)}function _getPrototypeOf(e){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function _setPrototypeOf(e,t){return(_setPrototypeOf=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _possibleConstructorReturn(e,t){return!t||"object"!==_typeof$1(t)&&"function"!=typeof t?_assertThisInitialized(e):t}function _slicedToArray(e,t){return _arrayWithHoles(e)||_iterableToArrayLimit(e,t)||_nonIterableRest()}function _arrayWithHoles(e){if(Array.isArray(e))return e}function _iterableToArrayLimit(e,t){var n=[],i=!0,o=!1,a=void 0;try{for(var r,s=e[Symbol.iterator]();!(i=(r=s.next()).done)&&(n.push(r.value),!t||n.length!==t);i=!0);}catch(e){o=!0,a=e}finally{try{i||null==s.return||s.return()}finally{if(o)throw a}}return n}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}function isElement$2(e){return e instanceof HTMLElement}function isFunction$1(e){return"function"==typeof e}function isNumber$1(e){return"number"==typeof e}function isString$1(e){return"string"==typeof e}function isUndefined$1(e){return void 0===e}
1
+ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("apxor"),require("apxor-qe")):"function"==typeof define&&define.amd?define(["exports","apxor","apxor-qe"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self)["apxor-rtm"]={},e.Apxor,e.CE)}(this,(function(exports,Apxor,CE){"use strict";function _iterableToArrayLimit$1(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var i,o,a,r,s=[],l=!0,c=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(i=a.call(n)).done)&&(s.push(i.value),s.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=n.return&&(r=n.return(),Object(r)!==r))return}finally{if(c)throw o}}return s}}function ownKeys(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function _objectSpread2$1(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ownKeys(Object(n),!0).forEach((function(t){_defineProperty$1(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ownKeys(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function _typeof$1(e){return(_typeof$1="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 _classCallCheck$1(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties$1(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,_toPropertyKey(i.key),i)}}function _createClass$1(e,t,n){return t&&_defineProperties$1(e.prototype,t),n&&_defineProperties$1(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function _defineProperty$1(e,t,n){return(t=_toPropertyKey(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _inherits$1(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&_setPrototypeOf$1(e,t)}function _getPrototypeOf$1(e){return(_getPrototypeOf$1=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function _setPrototypeOf$1(e,t){return(_setPrototypeOf$1=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function _isNativeReflectConstruct(){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}}function _assertThisInitialized$1(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _possibleConstructorReturn$1(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized$1(e)}function _createSuper(e){var t=_isNativeReflectConstruct();return function(){var n,i=_getPrototypeOf$1(e);if(t){var o=_getPrototypeOf$1(this).constructor;n=Reflect.construct(i,arguments,o)}else n=i.apply(this,arguments);return _possibleConstructorReturn$1(this,n)}}function _slicedToArray$1(e,t){return _arrayWithHoles$1(e)||_iterableToArrayLimit$1(e,t)||_unsupportedIterableToArray(e,t)||_nonIterableRest$1()}function _toConsumableArray(e){return _arrayWithoutHoles(e)||_iterableToArray(e)||_unsupportedIterableToArray(e)||_nonIterableSpread()}function _arrayWithoutHoles(e){if(Array.isArray(e))return _arrayLikeToArray(e)}function _arrayWithHoles$1(e){if(Array.isArray(e))return e}function _iterableToArray(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function _unsupportedIterableToArray(e,t){if(e){if("string"==typeof e)return _arrayLikeToArray(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_arrayLikeToArray(e,t):void 0}}function _arrayLikeToArray(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _nonIterableRest$1(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _createForOfIteratorHelper(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=_unsupportedIterableToArray(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var i=0,o=function(){};return{s:o,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,r=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return r=e.done,e},e:function(e){s=!0,a=e},f:function(){try{r||null==n.return||n.return()}finally{if(s)throw a}}}}function _toPrimitive(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function _toPropertyKey(e){var t=_toPrimitive(e,"string");return"symbol"==typeof t?t:String(t)}var VERSION=139,SERVER_URL="https://server.apxor.com",RTA_VALIDATE_URL=SERVER_URL+"/v2/sync/<app_id>/configs/validate?platform=web&userId=<u_id>&actionType=rta&version="+VERSION,TRACK_PAGES_EVENTS_API=SERVER_URL+"/v3/sync/track-pages-events?appId=<app_id>&eventsVersion=<events_version>&pagesVersion=<pages_version>",RTA_SYNC_URL=SERVER_URL+"/v2/sync/<app_id>/rta?platform=web&userId=<u_id>&version="+VERSION,SURVEY_VALIDATE_URL=SERVER_URL+"/v2/sync/<app_id>/configs/validate?platform=web&userId=<u_id>&actionType=survey&version="+VERSION,SURVEY_SYNC_URL=SERVER_URL+"/v2/sync/<app_id>/surveys?platform=web&userId=<u_id>&version="+VERSION,SURVEY_RESPONSE_URL=SERVER_URL+"/v2/api/survey-response?appId=<app_id>",CONFIG_API_URL=SERVER_URL+"/v1/sse/art-config?appId=<app_id>&deviceId=<u_id>&isExperiment=true",TEST_DEVICES_API_URL=SERVER_URL+"/v1/external/test-devices/validate?appId=<app_id>&deviceId=<u_id>",ANSWER_TYPES={SINGLE_CHOICE:1,MULTI_CHOICE:2,RATING:3,SHORT_ANSWER:4,YES_NO:5},LAST_SHOWN_TIMES="apx-last-shown-times",LAST_SHOWN_SESSION="apx-last-shown-session",APX_OVERLAY="apx-oly",APX_DIALOG_CONTENT="apx-dlg-c",APX_DIALOG_YES="apx-dy",APX_DIALOG_NO="apx-dn",INAPP_SHOWN="inapp_shown",INAPP_XICON_CLICKED="InAppXIconClicked",INAPP_BUTTON_CLICKED=function(e){return"InApp".concat(e,"Clicked")},WALK_THROUGH_CANCELLED="walk_through_cancelled",SURVEY_ON_DISMISS="on_dismiss",USER_ATTRIBUTES="u",SESSION_ATTRIBUTES="s",APPLICATION_VIEW_ID="v",EVENT_TYPE="ev",VARIABLE_TYPE="t",DEFAULT_VALUE="def",ATTRIBUTE_NAME="n",DYNAMIC_TEXT="Script",EVENT_PROPERTY_NAME="prop",IN_APP_TYPE="IN_APP",CENTER="center",EMOJI_ICONS_10=["&#128545;","&#128544;","&#128534;","&#128547;","&#128577;","&#128528;","&#128578;","&#128512;","&#128516;","&#128515;","&#128525;"],EMOJI_ICONS_5=["&#128545;","&#128577;","&#128528;","&#128515;","&#128525;"],RATING_COLORS_5=["#E5510A","#EA731D","#F8C94F","#A3CF6A","#7BB65C"],RATING_COLORS_10=["#E5510A","#EA731D","#EA8F4D","#EA8F4D","#F1B052","#F8C94F","#F6DE4F","#D7D55A","#B7CF6A","#A3CF6A","#7BB65C"],SCROLL_BEHAVIOUR={SMOOTH:"smooth"},CAROUSEL_TYPE={NUMBER:"number",CAROUSEL:"carousel"},BUTTON_CONTAINER_POSITION={TOP:"top",CENTER:"center",BOTTOM:"bottom",SURVEY_BOTTOM:"survey_bottom"},CLOSE_BUTTON_STYLE={NORMAL:"normal",FILL:"filled"},ACTION_TYPE={REDIRECT:"redirect",SKIP:"skip"},REDIRECT_TYPE={INTERNAL:"internal",EXTERNAL:"external"},BACK_BUTTON_STYLE={NORMAL:"normal",FILL:"fill"},INAPP_POSITION={TOP_LEFT:"top-left",TOP_RIGHT:"top-right",BOTTOM_LEFT:"bottom-left",BOTTOM_RIGHT:"bottom-right",TOP_CENTER:"top-center",BOTTOM_CENTER:"bottom-center",CENTER:"center"},DIRECTION={HORIZONTAL:"horizontal",VERTICAL:"vertical"},EVENT_PREFIX={INAPP:"InApp_",INLINE:"InLine_",SURVEY:"Survey_"},VIDEOS_MODES={PLAYER:"mini",PIP:"PIP"},INAPP_TYPE={VIDEO:"videos",MODAL:"modal"},COLORS={BLACK:"#000000",WHITE:"#ffffff"},APX_PREVIEW_CAMPAIGN_NAME="APX-PR3VI3W-CAMPGAIN",APX_TERMINATION_ID$1="apx_termination_ID",APX_SSE_TIMEOUT_CONFIG={delay:0,type:"IN_APP",action_class:"inapp",layout_type:"modal",display_type:"IN_APP",width:24,bg_color:"#ffffff",dismiss_outside_touch:!1,enable_padding:!0,padding:{top:16,bottom:16,left:16,right:16},enable_margin:!0,margin:{bottom:0,left:0,right:0,top:0},enable_dimbackground:!0,dimbackground:{color:"#000000",opacity:.3},enable_border:!0,border:{radius:16,color:"#0C4A6E",width:0,style:"solid"},enable_title:!0,title:{text:"Connection Timed out",color:"#212121",alignment:"center",font:{family:"inherit",size:25,style:"normal",weight:"bold"},enable_margin:!0,margin:{bottom:12,left:0,right:0,top:12},enable_padding:!0,padding:{top:0,bottom:0,left:0,right:0},enable_icon:!1,icon:{path:"https://i.ibb.co/R2JTvkM/8-x-8.png",height:40,width:40,alignment:"center",enable_border:!0,border:{radius:10,color:"#000000",width:0,style:"solid"}}},enable_description:!0,description:{text:"Your connection has been timed out please reconnect your app with the dashboard",color:"#212121",alignment:"center",font:{family:"inherit",size:16,style:"normal",weight:"normal"},enable_margin:!0,margin:{bottom:12,left:0,right:0,top:0},enable_padding:!0,padding:{top:0,bottom:0,left:0,right:0}},direction:{nudge:"vertical",non_media:"vertical",buttons:"horizontal"},enable_buttons:!0,buttons_count:5,buttons:{enable_top:!0,top:[],enable_center:!0,center:[],enable_bottom:!0,bottom:[{__id:"3bh48woPu-1cC2mOMhJq",slot:3,color:"#017dfd",enable_action:!0,action:{type:"reload",action:"reload",url:"",is_external:!0,is_ir:!1,is_within:!1,callback:"",is_deep_link:!1,activity:"",deep_link:{uri:""},internal_redirection:[]},enable_border:!0,border:{radius:8,color:"#4F4F4F",width:0,style:"solid"},enable_margin:!0,margin:{bottom:0,left:0,right:4,top:0},enable_padding:!0,padding:{top:8,bottom:8,left:24,right:24},enable_text:!0,text:{text:"RECONNECT",color:"#FFFFFF",alignment:"left",font:{family:"sans-serif",size:16,style:"normal",weight:"bold"},enable_margin:!0,margin:{bottom:0,left:0,right:0,top:0},enable_padding:!0,padding:{top:0,bottom:0,left:0,right:0}}}]},enable_close_button:!1,close_button:{color:"#fffafa",fill_color:"#666464",type:"filled",path:"",offset_top:8,offset_right:8,offset_left:8,height:20,width:20,shape:"circle",action:"dismiss",enable:!1},enable_scroll:!1,scroll:{height:300,enable_border:!0,border:{radius:10,color:"#000000",width:0,style:"solid"}},enable_shadow:!0,shadow:{color:"#707070",offset_x:0,offset_y:0,blur_radius:20,spread_radius:0},enable_dismiss_actions:!0,dismiss_actions:{outside_touch:!1,target_touch:!0},enable_icon:!1,icon:{path:"https://i.ibb.co/R2JTvkM/8-x-8.png",height:40,width:40,alignment:"center",enable_border:!0,border:{radius:10,color:"#000000",width:0,style:"solid"},enable_padding:!0,padding:{top:0,bottom:0,left:0,right:0},enable_margin:!0,margin:{bottom:0,left:0,right:0,top:0}},enable_image:!0,image:{path:"https://cdn.jsdelivr.net/gh/DileepApxor/FlutterWebTest@main/ssetimeout.png",height:96,width:164,enable_border:!0,border:{radius:2,color:"#000000",width:0,style:"solid"},enable_background_image:!1,background_image:{mask_opacity:.5,mask_color:"#ffffff"}},enable_video:!1,video:{path:"https://www.w3schools.com/tags/movie.mp4",height:9,width:16,enable_border:!0,border:{radius:0,color:"#000000",width:0,style:"solid"},enable_embed:!1,embed:{html:""},enable_audio:!0},position:{position:"center",enable_offset:!0}},APX_RELAUNCH_CONFIG={delay:0,type:"IN_APP",action_class:"inapp",layout_type:"modal",display_type:"IN_APP",width:24,bg_color:"#ffffff",dismiss_outside_touch:!0,enable_padding:!0,padding:{top:16,bottom:16,left:16,right:16},enable_margin:!0,margin:{bottom:0,left:0,right:0,top:0},enable_dimbackground:!0,dimbackground:{color:"#000000",opacity:.3},enable_border:!0,border:{radius:16,color:"#0C4A6E",width:0,style:"solid"},enable_title:!0,title:{text:"Relaunch & Test",color:"#212121",alignment:"left",font:{family:"inherit",size:25,style:"normal",weight:"bold"},enable_margin:!0,margin:{bottom:12,left:0,right:0,top:12},enable_padding:!0,padding:{top:0,bottom:0,left:0,right:0},enable_icon:!1,icon:{path:"https://i.ibb.co/R2JTvkM/8-x-8.png",height:40,width:40,alignment:"center",enable_border:!0,border:{radius:10,color:"#000000",width:0,style:"solid"}}},enable_description:!0,description:{text:"Execute the conditions set up in the dashboard after relaunching the app to view the campaign",color:"#212121",alignment:"left",font:{family:"inherit",size:16,style:"normal",weight:"normal"},enable_margin:!0,margin:{bottom:12,left:0,right:0,top:0},enable_padding:!0,padding:{top:0,bottom:0,left:0,right:0}},direction:{nudge:"vertical",non_media:"vertical",buttons:"horizontal"},enable_buttons:!0,buttons_count:5,buttons:{enable_top:!0,top:[],enable_center:!0,center:[],enable_bottom:!0,bottom:[{__id:"3bh48woPu-1cC2mOMhJq",slot:3,color:"#017dfd",enable_action:!0,action:{type:"reload",action:"reload",url:"",is_external:!0,is_ir:!1,is_within:!1,callback:"",is_deep_link:!1,activity:"",deep_link:{uri:""},internal_redirection:[]},enable_border:!0,border:{radius:8,color:"#4F4F4F",width:0,style:"solid"},enable_margin:!0,margin:{bottom:0,left:0,right:4,top:0},enable_padding:!0,padding:{top:8,bottom:8,left:24,right:24},enable_text:!0,text:{text:"RELAUNCH WEBSITE",color:"#FFFFFF",alignment:"left",font:{family:"sans-serif",size:16,style:"normal",weight:"bold"},enable_margin:!0,margin:{bottom:0,left:0,right:0,top:0},enable_padding:!0,padding:{top:0,bottom:0,left:0,right:0}}}]},enable_close_button:!1,close_button:{color:"#F0F9FF",fill_color:"#0EA5E9",type:"filled",path:"",offset_top:8,offset_right:8,offset_left:8,height:20,width:20,shape:"circle",action:"dismiss",enable:!1},enable_scroll:!1,scroll:{height:300,enable_border:!0,border:{radius:10,color:"#000000",width:0,style:"solid"}},enable_shadow:!0,shadow:{color:"#707070",offset_x:0,offset_y:0,blur_radius:20,spread_radius:0},enable_dismiss_actions:!0,dismiss_actions:{outside_touch:!0,target_touch:!0},enable_icon:!1,icon:{path:"https://i.ibb.co/R2JTvkM/8-x-8.png",height:40,width:40,alignment:"center",enable_border:!0,border:{radius:10,color:"#000000",width:0,style:"solid"},enable_padding:!0,padding:{top:0,bottom:0,left:0,right:0},enable_margin:!0,margin:{bottom:0,left:0,right:0,top:0}},enable_image:!0,image:{path:"https://cdn.jsdelivr.net/gh/DileepApxor/FlutterWebTest@main/relaunch.png",height:421,width:722,enable_border:!0,border:{radius:2,color:"#000000",width:0,style:"solid"},enable_background_image:!1,background_image:{mask_opacity:.5,mask_color:"#ffffff"}},enable_video:!1,video:{path:"https://www.w3schools.com/tags/movie.mp4",height:9,width:16,enable_border:!0,border:{radius:0,color:"#000000",width:0,style:"solid"},enable_embed:!1,embed:{html:""},enable_audio:!0},position:{position:"center",enable_offset:!0}},REGISTER_EVENTS="register-events",REGISTER_PAGES="register-pages",VIEW_SELECTION="view-selection",APX_AUTO_EVENT_VERSION="apx_auto_event_version",APX_AUTO_EVENTS="apx_auto_events",APX_AUTO_PAGE_EVENT_VERSION="apx_auto_page_event_version",APX_AUTO_PAGE_EVENTS="apx_auto_page_events",SESSION_STORAGE$1="session_storage",isUndefined$2=function(e){return void 0===e},isNull$1=function(e){return null===e},isDefined$1=function(e){return void 0!==e&&!isNull$1(e)},isNumber$2=function(e){return isDefined$1(e)&&!isNull$1(e)&&!isNaN(e)},getElementByXPath=function(e){var t=e.indexOf("svg");-1!==t&&(e=e.substring(0,t)+"svg:svg");try{return document.evaluate(e,document,(function(e){return"svg"===e?"http://www.w3.org/2000/svg":null}),XPathResult.FIRST_ORDERED_NODE_TYPE,null).singleNodeValue}catch(e){window.ApxorLogger.error("Error finding element in DOM:"+e)}return null},getShuffledArr=function(e){return _toConsumableArray(e).map((function(e,t,n){var i=t+Math.floor(Math.random()*(n.length-t)),o=[n[t],n[i]];return n[i]=o[0],n[t]=o[1],n[t]}))},getButtonPosition=function(e){switch(e){case"center":return"center";case"left":return"flex-start";case"right":return"flex-end";case"ends":return"space-between";default:return"center"}},getButtonsCSSFromConfig=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0,i=arguments.length>3?arguments[3]:void 0,o=arguments.length>4?arguments[4]:void 0,a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"space-between",r="",s=0,l=0;l=o===BUTTON_CONTAINER_POSITION.TOP?3:o===BUTTON_CONTAINER_POSITION.BOTTOM||o===BUTTON_CONTAINER_POSITION.SURVEY_BOTTOM?5:1;var c,d={},p={};e.enable_numbered&&(d=e.numbered,p=null===(c=d)||void 0===c?void 0:c.font);var u=a;return t.forEach((function(e,i){var a,c,h,g,f=e.slot,m=e.type,_=e.sub_type,v=e.bg_color,b=e.text_color,y=e.text_alignment,x=e.size,w=e.style,C=e.weight,E=e.font_family,k=e.enable_border,S=e.border,T=S.width,A=S.color,I=S.radius,P=S.style,O=e.enable_margin,L=e.margin,N=L.bottom,D=L.left,B=L.right,M=L.top,F=e.enable_padding,$=e.padding,R=$.bottom,H=$.left,V=$.right,q=$.top,U=e.text_margin,j=U.bottom,z=U.left,W=U.right,Y=U.top,X=e.text_padding,G=X.bottom,Q=X.left,Z=X.right,K=X.top,J=e.enable_gradient,ee=e.gradient,te=void 0===ee?{}:ee,ne=e.custom_font,ie=e.enable_icon,oe=e.icon,ae=void 0===oe?{}:oe;J&&(c=te.direction||"to right",h=te.colors[0]||COLORS.BLACK,g=te.colors[1]||COLORS.WHITE);var re=!1,se=!1;if(null!==(a="vertical"!==n)&&void 0!==a?a:o!==BUTTON_CONTAINER_POSITION.BOTTOM){var le,ce=(null===(le=t[i+1])||void 0===le?void 0:le.slot)||l+1;o!==BUTTON_CONTAINER_POSITION.TOP&&2===t.length&&(2===f&&3===ce||4===f&&3===s||3===f&&(2===s||4===ce))?u="center":(f-s>1&&(re=!0),ce-f>1&&(se=!0),3===f&&o!==BUTTON_CONTAINER_POSITION.TOP&&(re=2!=t.length||1!==s,se=2!=t.length||5!==ce),2===f&&o===BUTTON_CONTAINER_POSITION.TOP&&(re=!0,se=!0)),s=f}o===BUTTON_CONTAINER_POSITION.CENTER&&(re=!0,se=!0);var de="";k&&(de="border:".concat(T,"px ").concat(P," ").concat(A,";border-radius: ").concat(I,"px;"));var pe="";O&&(pe="margin:".concat(M,"px ").concat(B,"px ").concat(N,"px ").concat(D,"px;"));var ue="";F&&(ue="padding:".concat(q,"px ").concat(V,"px ").concat(R,"px ").concat(H,"px;"));var he="";if(J&&(he="background-image:linear-gradient(".concat(c,", ").concat(h,", ").concat(g,");")),ie){var ge="";ae.enable_border&&(ge="\n border-radius:".concat(ae.border.radius,"%;\n border:").concat(ae.border.width,"px ").concat(ae.border.style," ").concat(ae.border.color,";\n "));var fe="";ae.enable_margin&&(fe="\n margin-top:".concat(ae.margin.top,"px;\n margin-bottom:").concat(ae.margin.bottom,"px;\n margin-left:").concat(ae.margin.left,"px;\n margin-right:").concat(ae.margin.right,"px;\n "));var me="";ae.enable_padding&&(me="\n padding-top:".concat(ae.padding.top,"px;\n padding-bottom:").concat(ae.padding.bottom,"px;\n padding-left:").concat(ae.padding.left,"px;\n padding-right:").concat(ae.padding.right,"px;\n ")),r+=ie?"\n .apxor-survey-request-button-icon-container".concat(i," {\n text-align:").concat(ae.alignment,";\n }\n .apxor-survey-request-button-icon-content").concat(i," {\n height: ").concat(ae.height,"px;\n width: ").concat(ae.width,"px;\n ").concat(ge,"\n ").concat(fe,"\n ").concat(me,"\n }\n .apxor-survey-request-button-icon-Button-container").concat(i," {\n display: flex;\n }\n "):""}r+="stepper"!==m?"\n ".concat(ne,"\n div .button-div.").concat(o,"-button-").concat(i,"-slot-").concat(f,"{\n ").concat("wide"===m?"width:100%;text-align:center;":"width:auto;","\n height:auto;\n cursor: pointer;\n background-color: ").concat("#"===v?"transparent":v,";\n ").concat(de,"\n ").concat(pe,"\n ").concat(ue,"\n ").concat(re?"margin-left:auto;":"","\n ").concat(se?"margin-right:auto;":"","\n ").concat(he,"\n }\n .").concat(o,"-button-").concat(i,"-slot-").concat(f,"{\n cursor: pointer;\n color: ").concat(b,";\n text-align:").concat(y,";\n white-space:pre;\n background-color: transparent;\n font-size: ").concat(x,"px;\n border:none;\n font-family: ").concat(E,";\n font-weight: ").concat(C,";\n font-style: ").concat(w,";\n margin: ").concat(Y,"px ").concat(W,"px ").concat(j,"px ").concat(z,"px;\n padding: ").concat(K,"px ").concat(Z,"px ").concat(G,"px ").concat(Q,"px;\n }\n "):"\n div .button-div.".concat(o,"-button-").concat(i,"-slot-").concat(f,"{\n width:auto;\n height:auto;\n cursor: pointer;\n background-color: transparent;\n ").concat(re?"margin-left:auto;":"","\n ").concat(se?"margin-right:auto;":"margin-right:12px;","\n ").concat(he,"\n }\n ").concat(_===CAROUSEL_TYPE.NUMBER?"div .stepper-".concat(_,"{\n font-family:").concat(p.family,";\n font-size: ").concat(p.size,"px;\n font-style:").concat(p.style,";\n font-width:").concat(p.width,";\n color:").concat(d.color,";\n }"):"","\n\n ").concat(_===CAROUSEL_TYPE.CAROUSAL?"div .stepper-".concat(_,'{\n font-size:"20px";\n }'):"","\n ")})),"\n div .".concat(o,"-buttons-container {\n width:100%;\n display: flex;\n flex-direction:").concat(n!==DIRECTION.VERTICAL||o!==BUTTON_CONTAINER_POSITION.BOTTOM&&o!==BUTTON_CONTAINER_POSITION.SURVEY_BOTTOM?"row":"column",";\n justify-content:").concat(u,";\n align-items:").concat(n===DIRECTION.HORIZONTAL?"center":getButtonPosition(i),";\n flex-wrap:wrap;\n }\n ").concat(r,"\n ")},getButtonsCSS=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"right",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:DIRECTION.HORIZONTAL,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",o="";if(e.length>0){var a,r,s,l=e[0],c=l.bg_color,d=l.text_color,p=l.size,u=l.font_family,h=l.borders,g=h.stroke_color,f=h.radius,m=l.enable_gradient,_=l.gradient,v=void 0===_?{}:_,b=_setFontFaceAtRule({family:u});m&&(a=v.gradient_direction||"to right",r=v.gradient_c1||COLORS.BLACK,s=v.gradient_c2||COLORS.WHITE),o="\n ".concat(b[1],"\n ").concat(i," footer .shepherd-button.button-o {\n cursor: pointer;\n background-color: ").concat("#"===c?"transparent":c,";\n color: ").concat(d,";font-size: ").concat(p,"px;font-family: ").concat(b[0],";\n font-weight: ").concat("bold"!==u?"normal":u,";\n font-style: ").concat("italic"===u?"italic":"unset",";\n border: 0px solid ").concat(g,";border-radius: ").concat(f,"px;\n ").concat(m?"background-image:linear-gradient(".concat(a,", ").concat(r,", ").concat(s,");"):"","\n margin-right:").concat("#"===c?0:"12px","\n }\n ")}if(e.length>1){var y,x,w,C=e[1],E=C.bg_color,k=C.text_color,S=C.size,T=C.font_family,A=C.borders,I=A.stroke_color,P=A.radius,O=C.gradient_config,L=void 0===O?{}:O,N=_setFontFaceAtRule({family:T}),D=L.enable_gradient||!1;D&&(y=L.gradient_direction||"to right",x=(null==L?void 0:L.colors[0])||COLORS.BLACK,w=(null==L?void 0:L.colors[1])||COLORS.WHITE),o+="\n ".concat(N[1],"\n ").concat(i," footer .shepherd-button.button-t {\n cursor: pointer;\n background-color: ").concat("#"===E?"transparent":E,";\n color: ").concat(k,";font-size: ").concat(S,"px;font-family: ").concat(N[0],";\n font-weight: ").concat("bold"!==T?"normal":T,";\n font-style: ").concat("italic"===T?"italic":"unset",";\n ").concat(D?"background-image:linear-gradient(".concat(y,", ").concat(x,", ").concat(w,");"):"","\n border: 0px solid ").concat(I,";border-radius: ").concat(P,"px;\n }\n ")}return"\n ".concat(i," footer .shepherd-button {\n display: inline-block;\n *display: inline;\n vertical-align: middle;\n *vertical-align: auto;\n *zoom: 1;\n border: 0;border-radius: 3px;cursor: pointer;display: inline;font-family: inherit;\n font-size: .8em;letter-spacing: .01em;line-height: 18px;margin-right: 12px;\n padding: 8px 16px;text-transform: none;transition: all .5s ease\n }\n ").concat(o,"\n ").concat(i," footer .shepherd-button:last-child {\n }\n\n ").concat(i," footer {\n border-bottom-left-radius: 5px;\n border-bottom-right-radius: 5px;\n display: flex;\n flex-direction:").concat(n===DIRECTION.HORIZONTAL?"row":"column",";\n\n align-items:center;\n justify-content: ").concat(n===DIRECTION.HORIZONTAL?getButtonPosition(t):"space-evenly",";\n padding: 0 .8em .8em;\n }\n ")},generateButtons=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0,i=arguments.length>3?arguments[3]:void 0,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"Inline_",a=window.ApxorRTM,r=[],s=[];return e.forEach((function(e,l){var c,d,p,u,h,g,f,m,_,v,b,y,x=null!==(c=null==e||null===(d=e.action_config)||void 0===d?void 0:d.action)&&void 0!==c?c:"end",w=null!==(p=null==e||null===(u=e.action_config)||void 0===u?void 0:u.vmap)&&void 0!==p?p:{},C=null!==(h=null==e||null===(g=e.action_config)||void 0===g?void 0:g.url)&&void 0!==h?h:"",E=null===(f=null==e||null===(m=e.action_config)||void 0===m?void 0:m.is_external)||void 0===f||f,k=null!==(_=null==e||null===(v=e.action_config)||void 0===v?void 0:v.is_within)&&void 0!==_&&_,S=null!==(b=null==e||null===(y=e.action_config)||void 0===y?void 0:y.callback_func)&&void 0!==b?b:"";x=x.toLowerCase(),resolveDynamicText(e.text_config);var T,A=e.borders,I=e.color,P=e.text_config,O=P.text,L=P.color,N=P.size,D=P.style,B=P.font_family,M=e.gradient_config,F=void 0===M?{}:M;try{switch(x){case"done":case"dismiss":T=function(){a.logActionEvent(o+O+"_Clicked",n,i),t.complete(!1,"dismiss")};break;case"next":T=function(){t.complete(!1,"dismiss"),a.logActionEvent(o+O+"_Clicked",n,i)};break;case"prev":T=function(){t.complete(!1,"prev"),a.logActionEvent(o+O+"_Clicked",n,i)};break;case"redirect":T=function(){a.logActionEvent(o+O+"_Clicked",n,i),k||E?window.open(C,k?"_self":"_blank"):a.logClientEvent("REDIRECT",{url:C}),t.next(!1,"redirect")};break;case"callback":T=function(){for(var e=S.split("."),r=window,s=0;s<e.length;++s)if(!(r=r[e[s]]))return;var l=evaluateCallBackArguments(w);r&&r(l),t.complete(!1,"callback"),a.logActionEvent(o+O+"_Clicked",n,i)};break;case"cancel":T=function(){t._isCancelled=!0,t.cancel(!0,"cancel"),a.logActionEvent(o+O+"_Clicked",n,i)};break;case"never":T=function(){Apxor.logEvent("never_show_clicked"),t._isCancelled=!0;var e=JSON.parse(Apxor.getController().getFromStorage("_apx_never_show_ids"));!isNull$1(e)&&Array.isArray(e)||(e=[]);var i=removeLastPartOfId$1(n);e.includes(i)||e.push(i),Apxor.getController().persistToStorage("_apx_never_show_ids",JSON.stringify(e)),t.complete(!1,"dismiss",l)};break;default:T=function(){a.logActionEvent(o+O+"_Clicked",n,i),t.cancel(!1,"cancel")}}}catch(e){window.ApxorLogger.error("Error setting actions on the buttons:"+e)}s.push({borders:A,bg_color:I,text_color:L,size:N,style:D,font_family:B,gradient_config:F}),r.push({classes:0===l?"button-o":"button-t",text:O,action:T})})),{buttons_array:r,buttons_css:s}},generateButtonsFromConfig=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0,i=arguments.length>3?arguments[3]:void 0,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"Inline_",a=arguments.length>5?arguments[5]:void 0,r=arguments.length>6?arguments[6]:void 0,s=arguments.length>7?arguments[7]:void 0,l=arguments.length>8?arguments[8]:void 0,c=arguments.length>9?arguments[9]:void 0,d=window.ApxorRTM,p=[],u=[];return e.sort((function(e,t){return e.slot-t.slot})),e.forEach((function(e,h){var g="end",f="",m="",_="",v=function(){};if(e.enable_action){var b,y,x=e.action;g=x.type,f=x.url,m=x.is_external,_=null!==(b=x.is_within)&&void 0!==b&&b,v=null!==(y=x.callback)&&void 0!==y?y:function(){}}var w,C,E={};e.enable_text&&(E=null!==(w=null===(C=e.text)||void 0===C||null===(C=C.script)||void 0===C?void 0:C.vmap)&&void 0!==w?w:{});resolveDynamicText(e.text);var k,S=e.slot,T=e.type,A=e.sub_type,I=e.enable_border,P=e.border,O=e.color,L=e.enable_margin,N=e.margin,D=e.enable_padding,B=e.padding,M=e.text,F=M.text,$=M.alignment,R=M.color,H=M.font,V=H.size,q=H.style,U=H.weight,j=M.margin,z=M.padding,W=e.gradient,Y=void 0===W?{}:W,X=e.enable_gradient,G=e.enable_icon,Q=e.icon,Z=void 0===Q?{}:Q;try{switch(g){case"done":case"dismiss":k=function(){d.logActionEvent(o+F+"_Clicked",n,i,c),t.complete(!1,"dismiss",h)};break;case"submit":k=function(){t.complete(!1,"submit",h),d.logActionEvent(o+F+"_Clicked",n,i,c)};break;case"next":k=function(){t.complete(!1,"next",h),r&&l+1<s.length&&t.next(n,l+1),d.logActionEvent(o+F+"_Clicked",n,i,c)};break;case"prev":k=function(){t.complete(!1,"prev",h),r&&l-1>=0&&t.prev(n,l-1),d.logActionEvent(o+F+"_Clicked",n,i,c)};break;case"skip":k=function(){t.complete(!1,"skip",h),d.logActionEvent(o+F+"_Clicked",n,i,c)};break;case"yes":k=function(){t.complete(!1,"yes"),d.logActionEvent(o+F+"_Clicked",n,i,c)};break;case"no":k=function(){t.complete(!1,"no"),d.logActionEvent(o+F+"_Clicked",n,i,c)};break;case"redirect":k=function(){d.logActionEvent(o+F+"_Clicked",n,i,c),_||m?window.open(f,_?"_self":"_blank"):d.logClientEvent("REDIRECT",{url:f}),t.next(!1,"redirect",h)};break;case"reload":k=function(){t.complete(!1,"dismiss"),d.logActionEvent(o+F+"_Clicked",n,i),window.location.reload()};break;case"callback":k=function(){for(var e=v.split("."),a=window,r=0;r<e.length;++r)if(!(a=a[e[r]]))return;var s=evaluateCallBackArguments(E);a&&a(s),t.complete(!1,"callback",h),d.logActionEvent(o+F+"_Clicked",n,i,c)};break;case"cancel":k=function(){d.logActionEvent(o+F+"_Clicked",n,i,c),t._isCancelled=!0,t.cancel(!0,"cancel",h)};break;case"never":k=function(){Apxor.logEvent("never_show_clicked"),t._isCancelled=!0;var e=JSON.parse(Apxor.getController().getFromStorage("_apx_never_show_ids"));!isNull$1(e)&&Array.isArray(e)||(e=[]);var i=removeLastPartOfId$1(n);e.includes(i)||e.push(i),Apxor.getController().persistToStorage("_apx_never_show_ids",JSON.stringify(e)),t.complete(!1,"dismiss",h)};break;default:k=function(){d.logActionEvent(o+F+"_Clicked",n,i,c),t.cancel(!1,"cancel",h)}}}catch(e){window.ApxorLogger.error("Error setting actions on the buttons:"+e)}var K=_setFontFaceAtRule(e.text.font),J=K[0];u.push({slot:S,type:T,sub_type:A,enable_border:I,border:P,bg_color:O,text_color:R,text_alignment:$,size:V,style:q,weight:U,font_family:J,text_margin:j,text_padding:z,enable_margin:L,margin:N,enable_padding:D,padding:B,enable_gradient:X,gradient:Y,custom_font:K[1],enable_icon:G,icon:Z}),p.push({type:"".concat(T||"button"),sub_type:"".concat(A||""),classes:"".concat(a,"-button-").concat(h,"-slot-").concat(S),text:F,action:k,_action:g,enable_icon:G,icon:Z})})),{buttons_array:p,buttons_css:u}};function hexToRgb$1(e){e=e.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i,(function(e,t,n,i){return t+t+n+n+i+i}));var t=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);return t?{r:parseInt(t[1],16),g:parseInt(t[2],16),b:parseInt(t[3],16)}:null}var createDialog$1=function(e,t,n){var i=n.dim_background,o=void 0===i||i,a=n.dim_bg_color,r=void 0===a?"#000000":a,s=n.dim_bg_opacity,l=void 0===s?.87:s,c=n.position,d=document.createElement("div");d.setAttribute("id",APX_OVERLAY);var p=document.createElement("style"),u="center",h="center";switch(c){case"bottom-left":u="flex-start",h="flex-end";break;case"bottom-right":u="flex-end",h="flex-end";break;case"top-left":u="flex-start",h="flex-start";break;case"top-right":u="flex-end",h="flex-start"}var g="none";if(o){var f=hexToRgb$1(r);g="rgb(".concat(f.r,", ").concat(f.g,", ").concat(f.b,", ").concat(l,")")}p.innerHTML="\n#apx-oly {\n width:100%;height:100%;position:fixed;top:0;left:0;background-color:".concat(g,";\n display:flex;justify-content:").concat(u,";align-items:").concat(h,";border-radius:3px;z-index:2147483647\n}\n#apx-oly > * {font-family: inherit;box-sizing:unset}\n.apx-dlg-c {\n width:").concat(e,"px;min-height:").concat(t,"%;background:white;z-index:99999999;opacity:0;position:relative;visibility:hidden;\n transition:all 500ms cubic-bezier(0, -0.37, 0, 2.06);top:-15px;border-radius:3px;margin:20px\n}\n.apx-dlg-c.open {opacity:1;visibility:visible;top:0}\n ").replaceAll("\n","").replace(/[\s]{2,999}/g,"");var m=document.createElement("div");return m.setAttribute("id",APX_DIALOG_CONTENT),m.classList.add(APX_DIALOG_CONTENT),d.appendChild(m),d.appendChild(p),document.body.appendChild(d),d},getCookie=function(e){if(window.document)for(var t=e+"=",n=window.document.cookie.split(";"),i=0;i<n.length;i++){for(var o=n[i];" "===o.charAt(0);)o=o.substring(1,o.length);if(0===o.indexOf(t))return decodeURIComponent(o.substring(t.length,o.length))}return null},uuid$1=function e(t){return[Math.random,function(){return e.last?e.last+Math.random():Math.random()},Math.random,Date.now,Math.random].map((function(e){return e().toString(t||16+20*Math.random()).substr(-8)})).join("-")},hexToRGB=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:.5,n=parseInt(e.slice(1,3),16),i=parseInt(e.slice(3,5),16),o=parseInt(e.slice(5,7),16);return t?"rgba("+n+", "+i+", "+o+", "+t+")":"rgb("+n+", "+i+", "+o+")"},getAnimationValue=function(e){return 50===e?10:16},translateDir=function(e,t){switch(e.toLowerCase()){case"top":case"top-start":case"top-end":return"translateY(".concat(getAnimationValue(t)-26,"px)");case"right":case"right-start":case"right-end":return"translateX(".concat(getAnimationValue(t),"px)");case"bottom":case"bottom-start":case"bottom-end":return"translateY(".concat(getAnimationValue(t),"px)");case"left":case"left-start":case"left-end":return"translateX(".concat(getAnimationValue(t)-26,"px)")}},removeLastPartOfId$1=function(e){return e.includes("-testing")?e.substring(0,e.length-10)+"-1":e.substring(0,e.length-2)+"-1"},checkForNeverShow$1=function(e){var t=JSON.parse(Apxor.getController().getFromStorage("_apx_never_show_ids"));if(isNull$1(t)||!Array.isArray(t))return!0;var n=removeLastPartOfId$1(e);return!t.includes(n)},isElementInViewport=function(e){var t=null==e?void 0:e.offsetHeight,n=null==e?void 0:e.offsetWidth;if(isUndefined$2(t)&&isUndefined$2(n)){var i=null==e?void 0:e.getBBox();n=null==i?void 0:i.width,t=null==i?void 0:i.height}var o=e.getBoundingClientRect();return o.left>=-n&&o.top>=-t&&o.right<=(window.innerWidth||document.documentElement.clientWidth)+n&&o.bottom<=(window.innerHeight||document.documentElement.clientHeight)+t},replaceStringBetweenIndeces=function(e,t,n,i){return e.substring(0,t)+i+e.substring(n)},storeLastShownTime=function(e){var t=Date.now(),n=Apxor.getController().getFromStorage(LAST_SHOWN_TIMES);if(n=JSON.parse(n),isNull$1(n)||isUndefined$2(n)){n=[];var i={};i[e]=t,n.push(i)}else if(isKeyPresent(n,e))for(var o=0;o<n.length;o++)n[o].hasOwnProperty(e)&&(n[o][e]=t);else{var a={};a[e]=t,n.push(a)}Apxor.getController().persistToStorage(LAST_SHOWN_TIMES,JSON.stringify(n),!1),storeLastSession(e)},storeLastSession=function(e){var t=Apxor.getController().getFromStorage("apx_retained_session"),n=Apxor.getController().getFromStorage(LAST_SHOWN_SESSION);if(n=JSON.parse(n),isNull$1(n)||isUndefined$2(n)){n=[];var i={};i[e]=t,n.push(i)}else if(isKeyPresent(n,e))for(var o=0;o<n.length;o++)n[o].hasOwnProperty(e)&&(n[o][e]=t);else{var a={};a[e]=t,n.push(a)}Apxor.getController().persistToStorage(LAST_SHOWN_SESSION,JSON.stringify(n),!1)},isKeyPresent=function(e,t){for(var n=0;n<e.length;n++)if(e[n].hasOwnProperty(t))return!0;return!1},evaluateDynamicText=function(e){var t=Apxor.getController().getUserAttributes(),n=Apxor.getController().getSessionAttributes(),i=e.script.vmap,o=e.script.src,a=o.indexOf("{"),r=o.indexOf("}"),s=Apxor.getController().getListOfEventsLogged();try{for(;-1!=a&&-1!=r&&a<r;){var l=o.substring(a+1,r),c=i[l][VARIABLE_TYPE],d=i[l][ATTRIBUTE_NAME],p=i[l][DEFAULT_VALUE],u="";if(c===SESSION_ATTRIBUTES)u=n[d]?n[d]:p;else if(c===USER_ATTRIBUTES)u=t[d]?t[d]:p;else if(c===APPLICATION_VIEW_ID)if(Apxor.isFlutter()){var h=Apxor.getApxorFlutterHelper().getText(d);u=h.r&&1==h.r.st?h.r.t:p}else{var g=getElementFromSelector(d);(u=null==g?void 0:g.textContent)||(u=(null==g?void 0:g.value)||p)}else if(c===EVENT_TYPE){var f=i[l][ATTRIBUTE_NAME],m=i[l][EVENT_PROPERTY_NAME];u=s[f]&&s[f][m]?s[f][m]:p}a=(o=replaceStringBetweenIndeces(o,a,r+1,u)).indexOf("{"),r=o.indexOf("}")}e.text=o}catch(e){console.log("Can't evaluate the dynamic text")}},evaluateCallBackArguments=function(e){var t=Apxor.getController().getUserAttributes(),n=Apxor.getController().getSessionAttributes(),i=e,o={},a=Apxor.getController().getLoggedEventsList();try{return Object.keys(i).forEach((function(e){var r=i[e],s=r[VARIABLE_TYPE],l=r[ATTRIBUTE_NAME],c=r[DEFAULT_VALUE],d="";if(s===SESSION_ATTRIBUTES)d=n[l]?n[l]:c;else if(s===USER_ATTRIBUTES)d=t[l]?t[l]:c;else if(s===APPLICATION_VIEW_ID){var p=getElementFromSelector(l);(d=null==p?void 0:p.textContent)||(d=(null==p?void 0:p.value)||c)}else if(s===EVENT_TYPE){var u=i[e][ATTRIBUTE_NAME],h=i[e][EVENT_PROPERTY_NAME];d=a[u]&&a[u][h]?a[u][h]:c}o[e]=d})),o}catch(e){console.log("Can't evaluate the dynamic text")}},evaluateDynamicScript=function(e){var t=Apxor.getController().getUserAttributes(),n=Apxor.getController().getSessionAttributes(),i=e.script.vmap,o="",a=e.script.src,r=Apxor.getController().getListOfEventsLogged();Object.entries(i).forEach((function(e){var a=_slicedToArray$1(e,2),s=a[0],l=a[1],c=l[VARIABLE_TYPE],d=l[ATTRIBUTE_NAME],p=l[DEFAULT_VALUE],u="";if(c===SESSION_ATTRIBUTES)u=n[d]?n[d]:p;else if(c===USER_ATTRIBUTES)u=t[d]?t[d]:p;else if(c===APPLICATION_VIEW_ID)if(Apxor.isFlutter()){var h=Apxor.getApxorFlutterHelper().getText(d);u=h.r&&1==h.r.st?h.r.t:p}else{var g=getElementFromSelector(d);(u=null==g?void 0:g.textContent)||(u=(null==g?void 0:g.value)||p)}else if(c===EVENT_TYPE){var f=i[s][ATTRIBUTE_NAME],m=i[s][EVENT_PROPERTY_NAME];u=r[f]&&r[f][m]?r[f][m]:p}o="".concat(o," \n let ").concat(s,' = "').concat(u,'";')}));var s="".concat(o," \n ").concat(a);e.text=new Function(s)()},resolveDynamicText=function(e){(null==e?void 0:e.text)===DYNAMIC_TEXT&&(0===e.script.t?evaluateDynamicText(e):evaluateDynamicScript(e))},getStylisedText=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2?arguments[2]:void 0,i=arguments.length>3?arguments[3]:void 0,o=document.createElement("span");if(0==t.length?o.innerText=addLinksToText(e,i):t.forEach((function(t){var n=parseInt(t.start),a=parseInt(t.end),r=e.substring(n,a),s="";t.color&&(s="".concat(s,"color:").concat(t.color,";")),t.font_family&&(s="".concat(s,"font-family:").concat(t.font_family,";")),t.size&&(s="".concat(s,"font-size:").concat(t.size,"px;")),"italic"===t.style&&(s="".concat(s,"font-style:").concat(t.style,";")),"bold"===t.style&&(s="".concat(s,"font-weight:").concat(t.style,";")),"normal"===t.style&&(s="".concat(s,"font-weight:").concat(t.style,";")),1==t.underline&&(s="".concat(s,"text-decoration:underline;")),1==t.strike_through&&(s="".concat(s,"text-decoration:line-through;")),"super"==t.script&&(s="".concat(s,"vertical-align:super;")),"sub"==t.script&&(s="".concat(s,"vertical-align:sub;")),t.bg_color&&(s="".concat(s,"background-color:").concat(t.bg_color,";"));var l=document.createElement("span");l.style=s,l.innerHTML=addLinksToText(r,i),o.appendChild(l)})),void 0!==n){var a=document.createElement("blockquote"),r="";return n.color&&(r="border-left-color:".concat(n.color,";")),n.width&&(r="".concat(r,"border-left-width:").concat(n.width,"px;")),n.gap&&(r="".concat(r,"padding:").concat(n.gap,"px;")),a.appendChild(o),a.style=r,a}return o},addLinksToText=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=e;return t.forEach((function(t){t.text===e&&(n='<a style="text-decoration: none;" target="_blank" href="'.concat(t.url,'">').concat(e,"</a>"))})),n},_setFontFaceAtRule=function(e){if("unknown format"===getFontFormatFromCustomFontURL(e.family))return[e.family,""];var t=e.family,n=e.family.split("/").pop().replace(/[^A-Za-z0-9]/g,""),i="\n @font-face {\n font-family: ".concat(n,";\n src: url(").concat(t,") format(").concat(getFontFormatFromCustomFontURL(e.family),");\n }");return["".concat(n,", ").concat("sans-serif"),i]},createTextElement=function(e,t){var n=e.color,i=void 0===n?"#000":n,o=e.font_family,a=void 0===o?"cursive":o,r=e.size,s=void 0===r?14:r,l=e.style,c=void 0===l?"bold":l,d=e.text,p=e.segments,u=e.quote,h=e.link_config,g=void 0===h?[]:h,f=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"desc",m=document.createElement("span");m.setAttribute("id",t+"-"+f),m.className="apx-class-".concat(t,"-").concat(f);var _=_setFontFaceAtRule({family:a}),v=document.createElement("style");return v.innerHTML="\n ".concat(_[1],"\n \n .apx-class-").concat(t,"-").concat(f," {\n z-index:99999;\n color:").concat(i," !important;\n font-family:").concat(_[0]," !important;\n font-size:").concat(s,"px !important;\n font-weight:").concat(c," !important;\n font-style:").concat("normal"===c||"italic"===c?c+" !important":"unset",";\n max-width:400px;\n }\n "),m.appendChild(v),m.appendChild(getStylisedText(d,p,u,g)),m},createNewTextElement=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"desc",i=document.createElement("span");i.setAttribute("id",t+"-"+n),i.className="apx-class-".concat(t,"-").concat(n);var o=_setFontFaceAtRule(e.font),a=document.createElement("style");return a.innerHTML="\n ".concat(o[1],"\n .apx-class-").concat(t,"-").concat(n," {\n z-index:99999;\n color:").concat(e.color," !important;\n font-family:").concat(o[0]," !important;\n font-size:").concat(e.font.size,"px !important;\n font-weight:").concat(e.font.weight," !important;\n font-style:").concat("normal"===e.font.style||"italic"===e.font.style?e.font.style+" !important":"unset",";\n }\n "),i.appendChild(a),i.appendChild(getStylisedText(e.text,e.segments,e.quote,e.link_config)),i},makeid=function(e){for(var t="",n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",i=n.length,o=0;o<e;o++)t+=n.charAt(Math.floor(Math.random()*i));return t},getHeightWidthFromResolution=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:.5,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=0,o=0;try{var a=e.width,r=void 0===a?360:a,s=e.height,l=void 0===s?360:s,c=l/r,d=window.innerWidth,p=window.innerHeight;n?(o=(i=p*t)/c)>.7*d&&(i=(o=.7*d)*c):(i=(o=d*t)*c)>.7*p&&(o=(i=.7*p)/c)}catch(e){console.log("Error \n ".concat(e," \n occured while calculating the height and width"))}return{height:i,width:o}},generateButtonsBlock=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:EVENT_PREFIX.INAPP,o=arguments.length>4?arguments[4]:void 0,a=arguments.length>5?arguments[5]:void 0,r=arguments.length>6&&void 0!==arguments[6]?arguments[6]:"center",s=arguments.length>7?arguments[7]:void 0,l=arguments.length>8?arguments[8]:void 0,c=arguments.length>9?arguments[9]:void 0,d=arguments.length>10&&void 0!==arguments[10]?arguments[10]:{},p=arguments.length>11?arguments[11]:void 0,u=arguments.length>12?arguments[12]:void 0,h=arguments.length>13&&void 0!==arguments[13]?arguments[13]:"center",g=document.createElement("div");g.className="".concat(s,"-buttons-container"),g.style.zIndex=99999999;var f=generateButtonsFromConfig(o,l,e,t,i,s,c,d,p,u),m=f.buttons_array,_=f.buttons_css,v=document.createElement("style");return v.innerHTML=getButtonsCSSFromConfig(n,_,a,r,s,h),g.appendChild(v),m.forEach((function(e,t){var i=e.classes,o=e.type,a=e.sub_type,r=e.text,l=e.action,c=e._action,d=e.enable_icon,p=e.icon,u=document.createElement("div");if(u.setAttribute("id","apxor-".concat(s,"-").concat(c,"-button")),u.className="button-div "+i,"stepper"===o){var h=document.createElement("div");h.className=o+"-"+a,h.innerHTML=setCarousel(a,n),u.appendChild(h)}else if(d){var f=document.createElement("div");f.classList.add("apxor-survey-request-button-icon-Button-container".concat(t));var m=document.createElement("div");m.classList.add("apxor-survey-request-button-icon-container".concat(t));var _=document.createElement("img");_.src=p.path,_.classList.add("apxor-survey-request-button-icon-content".concat(t)),m.appendChild(_),f.appendChild(m);var v=document.createElement("button");v.className=i,v.innerHTML=r,f.appendChild(v),u.appendChild(f),u.onclick=function(){return l()}}else{var b=document.createElement("button");b.className=i,b.innerHTML=r,u.appendChild(b),u.onclick=function(){return l()}}g.appendChild(u)})),g},setCarousel=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(e===CAROUSEL_TYPE.NUMBER&&t.enable_numbered){var n=t.numbered;if(t.index<=t.length)return"number"===n.style?"".concat(t.index,"/").concat(t.length):"number_of"===n.style?"".concat(t.index," of ").concat(t.length):"step_number"===n.style?"Step ".concat(t.index,"/").concat(t.length):"Step ".concat(t.index," of ").concat(t.length)}else{if(e!==CAROUSEL_TYPE.CAROUSEL||!t.enable_pagination)return"slash"===e?"".concat(t.index," / ").concat(t.length):"question_slash"===e?"".concat(t.pagination_text.text," ").concat(t.index," / ").concat(t.length," "):"question_of"===e?"".concat(t.pagination_text.text," ").concat(t.index," of ").concat(t.length," "):"".concat(t.index," of ").concat(t.length);var i=t.carousel;if(t.index<=t.length)return createCarousel(t,i)}return""};function createCarousel(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,n=document.createElement("div");n.setAttribute("class","carousel-container");var i=document.createElement("style"),o=2*parseInt(t.active_radius);i.innerHTML=".carousel-container{\n display:flex;\n flex-direction:row;\n padding-left:8px;\n gap:".concat(t.spacebetween,";\n align-items:center;\n }\n .carousel-indicator-inactive{\n height: ").concat(t.inactive_radius,";\n width: ").concat(t.inactive_radius,";\n background-color: ").concat(t.inactive_color,";\n border-radius: 50%;\n display: inline-block;\n }\n .carousel-indicator-active-default{\n height: ").concat(t.inactive_radius,";\n width: ").concat(t.inactive_radius,";\n background-color: ").concat(t.active_color,";\n border-radius: 50%;\n display: inline-block;\n }\n .carousel-indicator-active-narrow\n {\n height: ").concat(t.inactive_radius,";\n width: ").concat(o,"px;\n border-radius:").concat(t.inactive_radius,";\n background-color: ").concat(t.active_color,";\n display: inline-block;\n }\n .carousel-indicator-active-circle\n {\n height: ").concat(t.active_radius,";\n width: ").concat(t.active_radius,";\n background-color: ").concat(t.active_color,";\n border-radius: 50%;\n display: inline-block;\n }\n\n "),n.appendChild(i);for(var a=0;a<=e.length;a++){var r=document.createElement("div");a===e.index?r.setAttribute("class","carousel-indicator-active-".concat(t.style)):r.setAttribute("class","carousel-indicator-inactive"),n.appendChild(r)}return n.outerHTML.toString()}var generateFormField=function(e){var t,n,i,o,a,r,s,l,c,d,p,u,h,g,f,m,_,v;switch(e.type){case"fullname":return'\n <div class="mainName" style="padding: 8px; display: flex;gap :8px" >\n <div class="first" style="width:50%">\n '.concat(e.name?'<label for="fname" style="line-height:1.5;">'.concat(null!==(t=null==e||null===(n=e.name)||void 0===n?void 0:n[0])&&void 0!==t?t:" ","</label><br />"):"",'\n <input type="text" id="fname" placeholder="').concat(null!==(i=null==e||null===(o=e.placeholder)||void 0===o?void 0:o[0])&&void 0!==i?i:" ",'" style="width: 90%;border-radius: 5px;padding: 8px;"/>\n </div>\n <div class="first" style="width:50%">\n ').concat(e.name?'<label for="fname" style="line-height:1.5;">'.concat(null!==(a=null==e||null===(r=e.name)||void 0===r?void 0:r[1])&&void 0!==a?a:" ","</label><br />"):"",'\n <input type="text" id="lname" placeholder="').concat(null!==(s=null==e||null===(l=e.placeholder)||void 0===l?void 0:l[1])&&void 0!==s?s:" ",'" style="width: 90%;border-radius: 5px;padding: 8px;"/>\n </div>\n </div>');case"name":return'\n <div class="mainFullName" style="width:100%;padding: 8px;box-sizing: border-box;">\n '.concat(e.name?'<label for="name" style="line-height:1.5;">'.concat(null!==(c=null==e?void 0:e.name)&&void 0!==c?c:" ","</label><br />"):"",'\n <input type="text" id="name" placeholder="').concat(null!==(d=null==e?void 0:e.placeholder)&&void 0!==d?d:" ",'" style="width: 95%;border-radius: 5px;padding: 8px;"/>\n </div>');case"email":return'\n <div class="mainEmail" style="width:100%;padding: 8px;box-sizing: border-box;">\n '.concat(e.name?'<label for="email" style="line-height:1.5;">'.concat(null!==(p=null==e?void 0:e.name)&&void 0!==p?p:" ","</label><br />"):"",'\n <input type="email" id="email" placeholder="').concat(null!==(u=null==e?void 0:e.placeholder)&&void 0!==u?u:" ",'" style="width: 95%;border-radius: 5px;padding: 8px;\n "/>\n </div>');case"phone":return'\n <div class="mainPhoneNumber" style="width:100%;padding: 8px;box-sizing: border-box;">\n '.concat(e.name?'<label for="phoneNumber" style="line-height:1.5;">'.concat(null!==(h=null==e?void 0:e.name)&&void 0!==h?h:" ","</label><br />"):"",'<input type="tel" id="phoneNumber" placeholder="').concat(null!==(g=null==e?void 0:e.placeholder)&&void 0!==g?g:" ",'" style="width: 95%;border-radius: 5px;padding: 8px;\n "/>\n </div>');case"date":return'\n <div class="mainDate" style="width:100%;padding: 8px;box-sizing: border-box;">\n '.concat(e.name?'<label for="date" style="line-height:1.5;">'.concat(null!==(f=null==e?void 0:e.name)&&void 0!==f?f:" ","</label><br />"):"",'\n <input type="date" id="date" style="width:95%;border-radius:5px;padding:8px;"/>\n </div>');case"message":return'\n <div class="mainTextField" style="width:100%;padding: 8px;box-sizing: border-box;">\n '.concat(e.name?'<label for="textField" style="line-height:1.5;">'.concat(null!==(m=null==e?void 0:e.name)&&void 0!==m?m:" ","</label><br />"):"",'\n <textarea id="textField" placeholder="').concat(null!==(_=null==e?void 0:e.placeholder)&&void 0!==_?_:" ",'" style="width: 95%;border-radius: 5px;padding: 8px;"></textarea>\n </div>');case"button":return'\n <div class="buttonClass" style="width:100%;padding: 8px;box-sizing: border-box;">\n <input type="submit" value="'.concat(null!==(v=null==e?void 0:e.value)&&void 0!==v?v:" ",'" style="max-width:99%;width:100%;border-radius:5px;padding:8px;">\n </div>\n ');default:return}},getPIPSVG=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:24,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:24,n=arguments.length>2?arguments[2]:void 0,i='\n <svg xmlns="http://www.w3.org/2000/svg" width="'.concat(e,'" height="').concat(t,'" fill=').concat(n,' class="bi bi-pip" viewBox="0 0 16 16">\n <path d="M0 3.5A1.5 1.5 0 0 1 1.5 2h13A1.5 1.5 0 0 1 16 3.5v9a1.5 1.5 0 0 1-1.5 1.5h-13A1.5 1.5 0 0 1 0 12.5v-9zM1.5 3a.5.5 0 0 0-.5.5v9a.5.5 0 0 0 .5.5h13a.5.5 0 0 0 .5-.5v-9a.5.5 0 0 0-.5-.5h-13z"/>\n <path d="M8 8.5a.5.5 0 0 1 .5-.5h5a.5.5 0 0 1 .5.5v3a.5.5 0 0 1-.5.5h-5a.5.5 0 0 1-.5-.5v-3z"/>\n </svg>');return i},getCloseWithCircleSVG=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:24,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:24,n=arguments.length>2?arguments[2]:void 0,i=arguments.length>3?arguments[3]:void 0,o='<svg viewBox="0 0 24 24" fill="none" width="'.concat(e,'" height="').concat(t,'" xmlns="http://www.w3.org/2000/svg">\n <path d="M12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22Z" fill="').concat(n,'"></path>\n <path d="M13.0594 12.0001L15.3594 9.70011C15.6494 9.41011 15.6494 8.93011 15.3594 8.64011C15.0694 8.35011 14.5894 8.35011 14.2994 8.64011L11.9994 10.9401L9.69937 8.64011C9.40937 8.35011 8.92937 8.35011 8.63938 8.64011C8.34938 8.93011 8.34938 9.41011 8.63938 9.70011L10.9394 12.0001L8.63938 14.3001C8.34938 14.5901 8.34938 15.0701 8.63938 15.3601C8.78938 15.5101 8.97937 15.5801 9.16937 15.5801C9.35937 15.5801 9.54937 15.5101 9.69937 15.3601L11.9994 13.0601L14.2994 15.3601C14.4494 15.5101 14.6394 15.5801 14.8294 15.5801C15.0194 15.5801 15.2094 15.5101 15.3594 15.3601C15.6494 15.0701 15.6494 14.5901 15.3594 14.3001L13.0594 12.0001Z" fill="').concat(i,'"></path>\n </svg>');return o},getCloseWithRectangleSVG=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:24,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:24,n=arguments.length>2?arguments[2]:void 0,i=arguments.length>3?arguments[3]:void 0,o='\n <svg viewBox="0 0 24 24" fill="currentColor" style="background-color:'.concat(n,";color:").concat(i,';" width="').concat(e,'" height="').concat(t,'">\n <path d="M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"></path>\n </svg>\n ');return o},getFilledBackArrowSvg=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:24,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:24,n=arguments.length>2?arguments[2]:void 0,i='<svg fill="'.concat(n,'" height="').concat(t,'" width="').concat(e,'" version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 512 512" xml:space="preserve" stroke="#c43131"><g id="SVGRepo_bgCarrier" stroke-width="0"></g><g id="SVGRepo_tracerCarrier" stroke-linecap="round" stroke-linejoin="round"></g><g id="SVGRepo_iconCarrier"> <g> <g> <path d="M0,0v512h512V0H0z M384,277.333H179.499l48.917,48.917c8.341,8.341,8.341,21.824,0,30.165 c-4.16,4.16-9.621,6.251-15.083,6.251c-5.461,0-10.923-2.091-15.083-6.251l-85.333-85.333c-1.963-1.963-3.52-4.309-4.608-6.933 c-2.155-5.205-2.155-11.093,0-16.299c1.088-2.624,2.645-4.971,4.608-6.933l85.333-85.333c8.341-8.341,21.824-8.341,30.165,0 s8.341,21.824,0,30.165l-48.917,48.917H384c11.776,0,21.333,9.557,21.333,21.333S395.776,277.333,384,277.333z"></path> </g> </g> </g></svg>');return i},getCloseSVG=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:24,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:24,n=arguments.length>2?arguments[2]:void 0,i='\n <svg xmlns="http://www.w3.org/2000/svg" width="'.concat(e,'" height="').concat(t,'" fill=').concat(n,' class="bi bi-x" viewBox="0 0 24 24" aria-hidden="true">\n <path d="M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"></path>\n </svg>');return i},getBackSVG=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:24,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:24,n=arguments.length>2?arguments[2]:void 0,i='\n <svg width="'.concat(e,'" height="').concat(t,'" viewBox="0 0 19 17" fill=').concat(n,' xmlns="http://www.w3.org/2000/svg">\n<path d="M19 7.4375H3.97961L9.78797 1.49812L8.3125 0L0 8.5L8.3125 17L9.77758 15.5019L3.97961 9.5625H19V7.4375Z" fill="').concat(n,'"/>\n</svg> ');return i},addClickListenerForFlutterElement=function(e,t){window.addEventListener("resize",window.ApxorRTM.removeAll);var n=e.getBoundingClientRect(),i=function e(i){var o=i.clientX,a=i.clientY;o>n.left&&o<n.right&&a>n.top&&a<n.bottom&&(t(),document.body.removeEventListener("click",e))};return document.body.addEventListener("click",i),i},getElementPositionFromFlutter=function(e){return Apxor.getApxorFlutterHelper().find(e).r},createTargetView=function(e){if(!e)return null;if(0==(null==e?void 0:e.st))return null;if(0===e.l&&0===e.t&&0===e.r&&0===e.b)return null;var t=document.createElement("div");return t.style.position="absolute",t.style.height=String(e.b-e.t)+"px",t.style.width=String(e.r-e.l)+"px",t.style.left=String(e.l)+"px",t.style.top=String(e.t)+"px",t.style.zIndex=-99999,document.body.appendChild(t),t},isDescendant=function(e,t){for(var n=t.parentNode;null!=n;){if(n==e)return!0;n=n.parentNode}return!1},getElementFromSelector=function(e){var t,n,i,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",a=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},s=arguments.length>4&&void 0!==arguments[4]&&arguments[4];if(!(t=document.getElementById(e)))try{if(n=document.querySelectorAll(e),a){if(n.length>0){for(var l=[],c=0;c<n.length;c++){var d=contentBasedSearch(n[c],r);d&&l.push(n[c])}t=s&&l?l:l[0]}}else t=s?n:n[0]}catch(e){window.ApxorLogger.error("Error finding element in DOM:"+e)}(t||(t=getElementByXPath(e)),!t&&o.length>0)&&(t=null===(i=document.getElementById(o))||void 0===i||null===(i=i.contentWindow)||void 0===i||null===(i=i.document)||void 0===i?void 0:i.querySelector(e));return t},getAdditionalInfo=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n={},i=Apxor.getController();return e&&e.forEach((function(e){var o=e.name,a=e.type,r=e.value;switch(a){case"storage":try{n[o]=getNestedLocalStorageValue(r)}catch(e){console.log("Error while getting data from storage ".concat(e),e),n[o]=null}break;case"tabList":try{var s,l=null==t?void 0:t.target;if(l)n[o]=(null==l||null===(s=l.textContent)||void 0===s?void 0:s.trim())||""}catch(e){console.log("Error while logging evnt for tab change ".concat(e),e),n[o]=null}break;case"clicked_on":var c="",d=t.target;d&&(c=d instanceof HTMLInputElement||d instanceof HTMLTextAreaElement||d instanceof HTMLSelectElement?d instanceof HTMLInputElement&&"checkbox"===d.type?d.checked:d.value:d.textContent||"",n[o]=c);break;case"target":var p,u=getElementFromSelector(r,"",!1,"",!0);if(u)u instanceof NodeList?(p=[],u.forEach((function(e){e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement||e instanceof HTMLSelectElement?p=e instanceof HTMLInputElement&&"checkbox"===e.type?e.checked:e.value:e instanceof HTMLImageElement?p.push(e.src):e instanceof HTMLAnchorElement?p.push(e.href):p.push(e.textContent)}))):p=u instanceof HTMLInputElement||u instanceof HTMLTextAreaElement||u instanceof HTMLSelectElement?u instanceof HTMLInputElement&&"checkbox"===u.type?u.checked:u.value:u instanceof HTMLImageElement?u.src:u instanceof HTMLAnchorElement?u.href:u.textContent,n[o]=Array.isArray(p)?0!==p.length?1===p.length?p[0]:p:null:p;else console.warn("Target element not found for selector '".concat(r,"'")),n[o]=null;break;case"target_TEXTNODE":var h,g=getElementFromSelector(r,"",!1,"",!0);if(g)g instanceof NodeList?(h=[],g.forEach((function(e){h.push(Array.from(e.childNodes).filter((function(e){return e.nodeType===Node.TEXT_NODE})).map((function(e){return e.textContent.trim()})).join(" ").trim())}))):h=Array.from(g.childNodes).filter((function(e){return e.nodeType===Node.TEXT_NODE})).map((function(e){return e.textContent.trim()})).join(" ").trim(),n[o]=h;else console.warn("Target element not found for selector '".concat(r,"'")),n[o]=null;break;case"target_relative_node":try{var f=t.target,m=_slicedToArray$1(r.split("___"),2),_=m[0],v=m[1];if(_&&v&&f){var b=f.closest(_);if(b){var y,x=b.querySelectorAll(v);if(x)x instanceof NodeList&&(y=[],x.forEach((function(e){e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement||e instanceof HTMLSelectElement?y=e instanceof HTMLInputElement&&"checkbox"===e.type?e.checked:e.value:e instanceof HTMLImageElement?y.push(e.src):e instanceof HTMLAnchorElement?y.push(e.href):y.push(e.textContent)}))),n[o]=0!==y.length?1===y.length?y[0]:y:null}}}catch(e){console.error("Target element not found for selector relative to target '".concat(r,"'"))}break;case"text_present":try{var w,C=getElementFromSelector(r);if(C)w=C instanceof HTMLInputElement||C instanceof HTMLTextAreaElement||C instanceof HTMLSelectElement?!!C.value:C instanceof HTMLImageElement?!!C.src:C instanceof HTMLAnchorElement?!!C.href:!!C.textContent,n[o]=w;else console.warn("Target element not found for selector '".concat(r,"'")),n[o]=null}catch(e){console.error("Target element not found for selector '".concat(r,"'"))}break;case"captured":var E=i.getFromStorage("captured_data",!0,SESSION_STORAGE$1);n[o]=E?E[r]:null;break;case"unique_identifier":var k,S=JSON.parse(i.getValueOrDefault("apx_unique_identifier_obj","{}")),T=_slicedToArray$1(r.split("___"),2),A=T[0],I=T[1];if("target"===A){var P=getElementFromSelector(I,"",!1,"",!1);P&&(k=P instanceof HTMLInputElement||P instanceof HTMLTextAreaElement||P instanceof HTMLSelectElement?P instanceof HTMLInputElement&&"checkbox"===P.type?P.checked:P.value:P instanceof HTMLImageElement?P.src:P instanceof HTMLAnchorElement?P.href:P.textContent)}else if("captured"===A){var O=i.getFromStorage("captured_data",!0,SESSION_STORAGE$1);k=O?O[I]:null}if(S[k])n[o]=S[k];else{var L=fnv1aHash(k);S[k]=L,i.persistToStorage("apx_unique_identifier_obj",JSON.stringify(S)),n[o]=L}break;default:n[o]=r}})),n},fnv1aHash=function(e){for(var t=2166136261,n=0;n<e.length;n++)t=16777619*(t^=e.charCodeAt(n))>>>0;return t},collapseSpaces=function(e){return e.replace(/\s+/g," ")},contentBasedSearch=function(e,t){var n,i=t.type,o=t.op,a=t.content,r=e.innerText.trim().toLowerCase();if(r=collapseSpaces(r),a=null===(n=a)||void 0===n?void 0:n.trim().toLowerCase(),a=collapseSpaces(a),"s"===i)switch(o){case"contains":return r.includes(a);case"does_not_contain":return!r.includes(a);case"exactly_matches":return r===a;case"does_not_match":return r!==a;case"starts_with":return r.startsWith(a);case"ends_with":return r.endsWith(a);case"matches_regex":return new RegExp(a).test(r);default:return!1}else{if("n"!==i)return!1;var s=parseFloat(a);if(isNaN(s))return!1;var l=parseFloat(r);switch(o){case"EQ":return l===s;case"NEQ":return l!==s;case"GT":return l>s;case"LT":return l<s;case"GTE":return l>=s;case"LTE":return l<=s;default:return!1}}};function isElementCovered(e){for(var t=e.getBoundingClientRect(),n=0;n<t.width;n+=t.width/5)for(var i=0;i<t.height;i+=t.height/5){var o=t.left+n,a=t.top+i,r=document.elementFromPoint(o,a);if(isNull$1(r))return!1;for(;r;){if(r===e)return!1;for(var s=r.children,l=0;l<s.length;l++){if(s[l]===e)return!1}r=r.parentElement}}return!0}var getCheckMarkSVG=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:64,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:64,n=arguments.length>2?arguments[2]:void 0,i='\n <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0,0,256,256" width='.concat(e," height=").concat(t,' fill-rule="nonzero">\n <g fill="none" fill-rule="nonzero" stroke="none" stroke-width="none" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="10" stroke-dasharray="" stroke-dashoffset="0" font-family="none" font-weight="none" font-size="none" text-anchor="none" style="mix-blend-mode: normal">\n <g transform="scale(6.4,6.4)">\n <path d="M20,38.5c-10.2,0 -18.5,-8.3 -18.5,-18.5c0,-10.2 8.3,-18.5 18.5,-18.5c10.2,0 18.5,8.3 18.5,18.5c0,10.2 -8.3,18.5 -18.5,18.5z" fill= ').concat(n,' stroke="none" stroke-width="1"/>\n <path d="M20,2c9.9,0 18,8.1 18,18c0,9.9 -8.1,18 -18,18c-9.9,0 -18,-8.1 -18,-18c0,-9.9 8.1,-18 18,-18M20,1c-10.5,0 -19,8.5 -19,19c0,10.5 8.5,19 19,19c10.5,0 19,-8.5 19,-19c0,-10.5 -8.5,-19 -19,-19z" fill="#5e9c76" stroke="none" stroke-width="1"/>\n <path d="M11.2,20.1l5.8,5.8l13.2,-13.2" fill="none" stroke=').concat(COLORS.WHITE,' stroke-width="3"/>\n </g>\n </g>\n </svg>');return i},getDevice$1=function(){var e=window.navigator,t=(void 0===e?{}:e).userAgent,n=void 0===t?"":t;switch(!0){case/Windows Phone/i.test(n)||/WPDesktop/.test(n):return"Windows Phone";case/iPad/.test(n):return"iPad";case/iPod/.test(n):return"iPod Touch";case/iPhone/.test(n):return"iPhone";case/(BlackBerry|PlayBook|BB10)/i.test(n):return"BlackBerry";case/Android/.test(n):return"Android";default:return"Desktop"}},isIOSDevice=function(){var e=getDevice$1();return"iPad"===e||"iPod Touch"===e||"iPhone"===e},getNumberOrDefault=function(e,t){var n=Number(e);return n||0===n?n:t},getSlotNumberByPosition=function(e){return"left"===e?1:"center"===e?3:5},getBooleanOrDefault=function(e,t){var n=Boolean(e);return n||t},getStringOrDefault=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1?arguments[1]:void 0,n=String(e);return n||t},getColorOrDefault=function(e,t){if(!e)return t;var n=String(e);return n||t},getArrayOrDefault=function(e,t){return e&&Array.isArray(e)?e:t},isEmptyObject=function(e){return"object"!==_typeof$1(e)||0===Object.keys(e).length},getFontFormatFromCustomFontURL=function(e){var t=e.split(".").pop(),n={woff:"woff",woff2:"woff2",ttf:"truetype",otf:"opentype",eot:"embedded-opentype",svg:"svg"};return Object.hasOwn(n,t)?n[t]:"unknown format"},convertTheDirectionCode=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";switch(e){case"H":return"horizontal";case"V":return"vertical";default:return e}},convertThePositionCode=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";switch(e){case"TL":return"top-left";case"TC":case"T":return"top-center";case"TR":return"top-right";case"L":return"left";case"C":return"center";case"R":return"right";case"BL":return"bottom-left";case"BC":case"B":return"bottom-center";case"BR":return"bottom-right";default:return e}},convertThePositionCodeToFLexBoxPosition=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";switch(e){case"L":return"flex-start";case"C":return"center";case"R":default:return"flex-end"}},doesUrlMatchSkeleton=function(e,t,n){var i=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(!e||!t||!n)return!1;var o=n.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"),a=t.replace(new RegExp(o,"g"),"(.+)"),r=i?"^".concat(a):"".concat(a,"$"),s=new RegExp(r);return s.test(e)},feedBackMessagePopUp=function(e){var t='\n <style> \n .apx-container{\n padding:10px;\n }\n </style>\n <div id="apx-innerElement" class="apx-container">\n <div id="close-button" style="cursor: pointer;position:absolute;top:9px;right:9px;"><svg width="11" height="11" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path opacity="0.5" d="M11.0962 9.07071L17.8586 15.8331L15.8331 17.8586L9.0707 11.0962L8.99999 11.0255L8.92928 11.0962L2.16693 17.8586L0.141421 15.8331L6.90379 9.07071L6.9745 9L6.90379 8.92929L0.141421 2.16694L2.16693 0.141422L8.92928 6.9038L8.99999 6.97451L9.0707 6.9038L15.8331 0.141422L17.8586 2.16694L11.0962 8.92929L11.0255 9L11.0962 9.07071Z" fill="white" stroke="#002845" stroke-width="0.2"/>\n </svg>\n </div>\n <div style="font-family: inherit;font-style: normal;font-weight: 600;font-size: 16px;line-height: 22px;\n color: #FFFFFF; display: flex; gap: 12px;"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-circle-check-filled" width="33" height="33" viewBox="0 0 24 24" stroke-width="1.5" stroke="#ffffff" fill="none" stroke-linecap="round" stroke-linejoin="round">\n <path stroke="none" d="M0 0h24v24H0z" fill="none"/>\n <path d="M17 3.34a10 10 0 1 1 -14.995 8.984l-.005 -.324l.005 -.324a10 10 0 0 1 14.995 -8.336zm-1.293 5.953a1 1 0 0 0 -1.32 -.083l-.094 .083l-3.293 3.292l-1.293 -1.292l-.094 -.083a1 1 0 0 0 -1.403 1.403l.083 .094l2 2l.094 .083a1 1 0 0 0 1.226 0l.094 -.083l4 -4l.083 -.094a1 1 0 0 0 -.083 -1.32z" stroke-width="0" fill="currentColor" />\n</svg><div style = "align-self: center;padding-right:20px;">'.concat(e,"</div></div>\n </div>\n "),n=document.createElement("div");n.style="\n z-index:99999999;\n background:#16202f;\n position:fixed;\n top:1%;\n right:1%;\n border-radius: 12px;\n ",n.innerHTML=t,n.id="apx-container",document.body.appendChild(n)},isElementCompletlyInView=function(e){var t=e.getBoundingClientRect(),n=window.innerHeight||document.documentElement.clientHeight,i=window.innerWidth||document.documentElement.clientWidth;return!!(t.top>=0&&t.bottom<=n&&t.left>=0&&t.right<=i)||(window.scrollTo({top:t.top+window.scrollY-n/2,behavior:"smooth"}),!1)};function getNestedLocalStorageValue(e){for(var t=e.split(",").map((function(e){return e.trim()})),n=JSON.parse(localStorage.getItem(t[0])),i=1;i<t.length;i++){if(null==n)return null;n=n[t[i]]}return n}
2
+ /*! shepherd.js 4.0.0-beta.1 */function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"===_typeof$1(Symbol.iterator)?function(e){return _typeof$1(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":_typeof$1(e)})(e)}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function _createClass(e,t,n){return t&&_defineProperties(e.prototype,t),n&&_defineProperties(e,n),e}function _defineProperty(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _extends(){return(_extends=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e}).apply(this,arguments)}function _objectSpread2(e){for(var t=1;t<arguments.length;t++)if(t%2){var n=null!=arguments[t]?arguments[t]:{},i=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),i.forEach((function(t){_defineProperty(e,t,n[t])}))}else Object.defineProperties(e,Object.getOwnPropertyDescriptors(arguments[t]));return e}function _inherits(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&_setPrototypeOf(e,t)}function _getPrototypeOf(e){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function _setPrototypeOf(e,t){return(_setPrototypeOf=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _possibleConstructorReturn(e,t){return!t||"object"!==_typeof$1(t)&&"function"!=typeof t?_assertThisInitialized(e):t}function _slicedToArray(e,t){return _arrayWithHoles(e)||_iterableToArrayLimit(e,t)||_nonIterableRest()}function _arrayWithHoles(e){if(Array.isArray(e))return e}function _iterableToArrayLimit(e,t){var n=[],i=!0,o=!1,a=void 0;try{for(var r,s=e[Symbol.iterator]();!(i=(r=s.next()).done)&&(n.push(r.value),!t||n.length!==t);i=!0);}catch(e){o=!0,a=e}finally{try{i||null==s.return||s.return()}finally{if(o)throw a}}return n}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}function isElement$2(e){return e instanceof HTMLElement}function isFunction$1(e){return"function"==typeof e}function isNumber$1(e){return"number"==typeof e}function isString$1(e){return"string"==typeof e}function isUndefined$1(e){return void 0===e}
4
3
  /**!
5
4
  * tippy.js v5.0.0-alpha.2
6
5
  * (c) 2017-2019 atomiks
7
6
  * MIT License
8
- */function _extends$1(){return(_extends$1=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e}).apply(this,arguments)}var isBrowser$1="undefined"!=typeof window&&"undefined"!=typeof document,ua=isBrowser$1?navigator.userAgent:"",isIE=/MSIE |Trident\//.test(ua),isUCBrowser=/UCBrowser\//.test(ua),isIOS=isBrowser$1&&/iPhone|iPad|iPod/.test(navigator.platform),defaultProps$1={allowHTML:!0,animateFill:!1,animation:"fade",appendTo:function(){return document.body},aria:"describedby",arrow:!0,boundary:"scrollParent",content:"",delay:0,distance:10,duration:[325,275],flip:!0,flipBehavior:"flip",flipOnUpdate:!1,hideOnClick:!0,ignoreAttributes:!1,inertia:!1,interactive:!1,interactiveBorder:2,interactiveDebounce:0,lazy:!0,maxWidth:350,multiple:!1,offset:0,onCreate:function(){},onHidden:function(){},onHide:function(){},onMount:function(){},onShow:function(){},onShown:function(){},onTrigger:function(){},onUntrigger:function(){},placement:"top",popperOptions:{},role:"tooltip",showOnCreate:!1,sticky:!1,theme:"",touch:!0,trigger:"mouseenter focus",triggerTarget:null,updateDuration:0,wait:null,zIndex:9999},POPPER_INSTANCE_DEPENDENCIES=["arrow","boundary","distance","flip","flipBehavior","flipOnUpdate","offset","placement","popperOptions"],PASSIVE={passive:!0},PREVENT_OVERFLOW_PADDING=5,ROUND_ARROW_INNER_HTML='<svg viewBox="0 0 18 7" xmlns="http://www.w3.org/2000/svg"><path d="M0 7s2.021-.015 5.253-4.218C6.584 1.051 7.797.007 9 0c1.203-.007 2.416 1.035 3.761 2.782C16.012 7.005 18 7 18 7H0z"/></svg>',IOS_CLASS="tippy-iOS",POPPER_CLASS="tippy-popper",TOOLTIP_CLASS="tippy-tooltip",CONTENT_CLASS$1="tippy-content",BACKDROP_CLASS$1="tippy-backdrop",ARROW_CLASS$1="tippy-arrow",SVG_ARROW_CLASS$1="tippy-svg-arrow",POPPER_SELECTOR="."+POPPER_CLASS,TOOLTIP_SELECTOR="."+TOOLTIP_CLASS,CONTENT_SELECTOR="."+CONTENT_CLASS$1,BACKDROP_SELECTOR="."+BACKDROP_CLASS$1,ARROW_SELECTOR="."+ARROW_CLASS$1,SVG_ARROW_SELECTOR="."+SVG_ARROW_CLASS$1,currentInput$1={isTouch:!1},lastMouseMoveTime$1=0;function onDocumentTouchStart$1(){currentInput$1.isTouch||(currentInput$1.isTouch=!0,isIOS&&document.body.classList.add(IOS_CLASS),window.performance&&document.addEventListener("mousemove",onDocumentMouseMove$1))}function onDocumentMouseMove$1(){var e=performance.now();e-lastMouseMoveTime$1<20&&(currentInput$1.isTouch=!1,document.removeEventListener("mousemove",onDocumentMouseMove$1),isIOS||document.body.classList.remove(IOS_CLASS)),lastMouseMoveTime$1=e}function onWindowBlur$1(){var e=document.activeElement,t=e._tippy;e&&e.blur&&t&&!t.state.isVisible&&e.blur()}function bindGlobalEventListeners$1(){document.addEventListener("touchstart",onDocumentTouchStart$1,_extends$1({},PASSIVE,{capture:!0})),window.addEventListener("blur",onWindowBlur$1)}var keys=Object.keys(defaultProps$1);function getDataAttributeProps$1(e){return keys.reduce((function(t,n){var i=(e.getAttribute("data-tippy-"+n)||"").trim();if(!i)return t;if("content"===n)t[n]=i;else try{t[n]=JSON.parse(i)}catch(e){t[n]=i}return t}),{})}function isReferenceElement$1(e){return!(!e||!e._tippy||e.classList.contains(POPPER_CLASS))}function hasOwnProperty(e,t){return{}.hasOwnProperty.call(e,t)}function getArrayOfElements$1(e){if(isRealElement(e))return[e];if(e instanceof NodeList)return arrayFrom$1(e);if(Array.isArray(e))return e;try{return arrayFrom$1(document.querySelectorAll(e))}catch(e){return[]}}function getValue(e,t,n){if(Array.isArray(e)){var i=e[t];return null==i?n:i}return e}function getModifier(e,t){return e&&e.modifiers&&e.modifiers[t]}function isRealElement(e){return e instanceof Element}function innerHTML$1(){return"innerHTML"}function invokeWithArgsOrReturn$1(e,t){return"function"==typeof e?e.apply(null,t):e}function setFlipModifierEnabled(e,t){e.filter((function(e){return"flip"===e.name}))[0].enabled=t}function setEscapeWithReference(e,t){e.filter((function(e){return"preventOverflow"===e.name}))[0].escapeWithReference=t}function div$1(){return document.createElement("div")}function setTransitionDuration$1(e,t){e.forEach((function(e){e&&(e.style.transitionDuration=t+"ms")}))}function setVisibilityState$1(e,t){e.forEach((function(e){e&&e.setAttribute("data-state",t)}))}function evaluateProps$1(e,t){var n=_extends$1({},t,{content:invokeWithArgsOrReturn$1(t.content,[e])},t.ignoreAttributes?{}:getDataAttributeProps$1(e));return n.animateFill&&(n.arrow=!1),(n.arrow||isUCBrowser)&&(n.animateFill=!1),n}function debounce$2(e,t){return 0===t?e:function(i){clearTimeout(n),n=setTimeout((function(){e(i)}),t)};var n}function preserveInvocation(e,t,n){e&&e!==t&&e.apply(null,n)}function arrayFrom$1(e){return[].slice.call(e)}function closestCallback(e,t){for(;e;){if(t(e))return e;e=e.parentElement}return null}function includes(e,t){return e.indexOf(t)>-1}function setInnerHTML(e,t){e[innerHTML$1()]=isRealElement(t)?t[innerHTML$1()]:t}function setContent$1(e,t){if(isRealElement(t.content))setInnerHTML(e,""),e.appendChild(t.content);else if("function"!=typeof t.content){e[t.allowHTML?"innerHTML":"textContent"]=t.content}}function getChildren$1(e){return{tooltip:e.querySelector(TOOLTIP_SELECTOR),backdrop:e.querySelector(BACKDROP_SELECTOR),content:e.querySelector(CONTENT_SELECTOR),arrow:e.querySelector(ARROW_SELECTOR)||e.querySelector(SVG_ARROW_SELECTOR)}}function addInertia(e){e.setAttribute("data-inertia","")}function removeInertia(e){e.removeAttribute("data-inertia")}function createArrowElement$1(e){var t=div$1();return!0===e?t.className=ARROW_CLASS$1:(t.className=SVG_ARROW_CLASS$1,isRealElement(e)?t.appendChild(e):setInnerHTML(t,"round"===e?ROUND_ARROW_INNER_HTML:e)),t}function createBackdropElement(e){var t=div$1();return t.className=BACKDROP_CLASS$1,t.setAttribute("data-state",e?"visible":"hidden"),t}function addInteractive(e){e.setAttribute("data-interactive","")}function removeInteractive(e){e.removeAttribute("data-interactive")}function updateTransitionEndListener$1(e,t,n){var i=isUCBrowser&&void 0!==document.body.style.webkitTransition?"webkitTransitionEnd":"transitionend";e[t+"EventListener"](i,n)}function getBasePlacement$2(e){return e.split("-")[0]}function reflow(e){e.offsetHeight}function updateTheme(e,t,n){n.split(" ").forEach((function(n){n&&e.classList[t](n+"-theme")}))}function createPopperElement(e,t){var n=div$1();n.className=POPPER_CLASS,n.style.position="absolute",n.style.top="0",n.style.left="0";var i=div$1();i.className=TOOLTIP_CLASS,i.id="tippy-"+e,i.setAttribute("data-state","hidden"),i.setAttribute("tabindex","-1"),updateTheme(i,"add",t.theme);var o=div$1();return o.className=CONTENT_CLASS$1,o.setAttribute("data-state","hidden"),t.interactive&&addInteractive(i),t.arrow&&(i.setAttribute("data-arrow",""),i.appendChild(createArrowElement$1(t.arrow))),t.animateFill&&(i.appendChild(createBackdropElement(!1)),i.setAttribute("data-animatefill","")),t.inertia&&addInertia(i),setContent$1(o,t),i.appendChild(o),n.appendChild(i),updatePopperElement(n,t,t,!1),n}function updatePopperElement(e,t,n,i){var o=getChildren$1(e),a=o.tooltip,r=o.content,s=o.backdrop,c=o.arrow;e.style.zIndex=""+n.zIndex,a.setAttribute("data-animation",n.animation),a.style.maxWidth=n.maxWidth+("number"==typeof n.maxWidth?"px":""),n.role?a.setAttribute("role",n.role):a.removeAttribute("role"),t.content!==n.content&&setContent$1(r,n),!t.animateFill&&n.animateFill?(a.appendChild(createBackdropElement(i)),a.setAttribute("data-animatefill","")):t.animateFill&&!n.animateFill&&(a.removeChild(s),a.removeAttribute("data-animatefill")),!t.arrow&&n.arrow?(a.appendChild(createArrowElement$1(n.arrow)),a.setAttribute("data-arrow","")):t.arrow&&!n.arrow?(a.removeChild(c),a.removeAttribute("data-arrow")):t.arrow!==n.arrow&&(a.removeChild(c),a.appendChild(createArrowElement$1(n.arrow))),!t.interactive&&n.interactive?addInteractive(a):t.interactive&&!n.interactive&&removeInteractive(a),!t.inertia&&n.inertia?addInertia(a):t.inertia&&!n.inertia&&removeInertia(a),t.theme!==n.theme&&(updateTheme(a,"remove",t.theme),updateTheme(a,"add",n.theme))}function isCursorOutsideInteractiveBorder$1(e,t,n,i){if(!e)return!0;var o=n.clientX,a=n.clientY,r=i.interactiveBorder,s=i.distance,c=t.top-a>("top"===e?r+s:r),l=a-t.bottom>("bottom"===e?r+s:r),d=t.left-o>("left"===e?r+s:r),p=o-t.right>("right"===e?r+s:r);return c||l||d||p}
7
+ */function _extends$1(){return(_extends$1=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e}).apply(this,arguments)}var isBrowser$1="undefined"!=typeof window&&"undefined"!=typeof document,ua=isBrowser$1?navigator.userAgent:"",isIE=/MSIE |Trident\//.test(ua),isUCBrowser=/UCBrowser\//.test(ua),isIOS=isBrowser$1&&/iPhone|iPad|iPod/.test(navigator.platform),defaultProps$1={allowHTML:!0,animateFill:!1,animation:"fade",appendTo:function(){return document.body},aria:"describedby",arrow:!0,boundary:"scrollParent",content:"",delay:0,distance:10,duration:[325,275],flip:!0,flipBehavior:"flip",flipOnUpdate:!1,hideOnClick:!0,ignoreAttributes:!1,inertia:!1,interactive:!1,interactiveBorder:2,interactiveDebounce:0,lazy:!0,maxWidth:350,multiple:!1,offset:0,onCreate:function(){},onHidden:function(){},onHide:function(){},onMount:function(){},onShow:function(){},onShown:function(){},onTrigger:function(){},onUntrigger:function(){},placement:"top",popperOptions:{},role:"tooltip",showOnCreate:!1,sticky:!1,theme:"",touch:!0,trigger:"mouseenter focus",triggerTarget:null,updateDuration:0,wait:null,zIndex:9999},POPPER_INSTANCE_DEPENDENCIES=["arrow","boundary","distance","flip","flipBehavior","flipOnUpdate","offset","placement","popperOptions"],PASSIVE={passive:!0},PREVENT_OVERFLOW_PADDING=5,ROUND_ARROW_INNER_HTML='<svg viewBox="0 0 18 7" xmlns="http://www.w3.org/2000/svg"><path d="M0 7s2.021-.015 5.253-4.218C6.584 1.051 7.797.007 9 0c1.203-.007 2.416 1.035 3.761 2.782C16.012 7.005 18 7 18 7H0z"/></svg>',IOS_CLASS="tippy-iOS",POPPER_CLASS="tippy-popper",TOOLTIP_CLASS="tippy-tooltip",CONTENT_CLASS$1="tippy-content",BACKDROP_CLASS$1="tippy-backdrop",ARROW_CLASS$1="tippy-arrow",SVG_ARROW_CLASS$1="tippy-svg-arrow",POPPER_SELECTOR="."+POPPER_CLASS,TOOLTIP_SELECTOR="."+TOOLTIP_CLASS,CONTENT_SELECTOR="."+CONTENT_CLASS$1,BACKDROP_SELECTOR="."+BACKDROP_CLASS$1,ARROW_SELECTOR="."+ARROW_CLASS$1,SVG_ARROW_SELECTOR="."+SVG_ARROW_CLASS$1,currentInput$1={isTouch:!1},lastMouseMoveTime$1=0;function onDocumentTouchStart$1(){currentInput$1.isTouch||(currentInput$1.isTouch=!0,isIOS&&document.body.classList.add(IOS_CLASS),window.performance&&document.addEventListener("mousemove",onDocumentMouseMove$1))}function onDocumentMouseMove$1(){var e=performance.now();e-lastMouseMoveTime$1<20&&(currentInput$1.isTouch=!1,document.removeEventListener("mousemove",onDocumentMouseMove$1),isIOS||document.body.classList.remove(IOS_CLASS)),lastMouseMoveTime$1=e}function onWindowBlur$1(){var e=document.activeElement,t=e._tippy;e&&e.blur&&t&&!t.state.isVisible&&e.blur()}function bindGlobalEventListeners$1(){document.addEventListener("touchstart",onDocumentTouchStart$1,_extends$1({},PASSIVE,{capture:!0})),window.addEventListener("blur",onWindowBlur$1)}var keys=Object.keys(defaultProps$1);function getDataAttributeProps$1(e){return keys.reduce((function(t,n){var i=(e.getAttribute("data-tippy-"+n)||"").trim();if(!i)return t;if("content"===n)t[n]=i;else try{t[n]=JSON.parse(i)}catch(e){t[n]=i}return t}),{})}function isReferenceElement$1(e){return!(!e||!e._tippy||e.classList.contains(POPPER_CLASS))}function hasOwnProperty(e,t){return{}.hasOwnProperty.call(e,t)}function getArrayOfElements$1(e){if(isRealElement(e))return[e];if(e instanceof NodeList)return arrayFrom$1(e);if(Array.isArray(e))return e;try{return arrayFrom$1(document.querySelectorAll(e))}catch(e){return[]}}function getValue(e,t,n){if(Array.isArray(e)){var i=e[t];return null==i?n:i}return e}function getModifier(e,t){return e&&e.modifiers&&e.modifiers[t]}function isRealElement(e){return e instanceof Element}function innerHTML$1(){return"innerHTML"}function invokeWithArgsOrReturn$1(e,t){return"function"==typeof e?e.apply(null,t):e}function setFlipModifierEnabled(e,t){e.filter((function(e){return"flip"===e.name}))[0].enabled=t}function setEscapeWithReference(e,t){e.filter((function(e){return"preventOverflow"===e.name}))[0].escapeWithReference=t}function div$1(){return document.createElement("div")}function setTransitionDuration$1(e,t){e.forEach((function(e){e&&(e.style.transitionDuration=t+"ms")}))}function setVisibilityState$1(e,t){e.forEach((function(e){e&&e.setAttribute("data-state",t)}))}function evaluateProps$1(e,t){var n=_extends$1({},t,{content:invokeWithArgsOrReturn$1(t.content,[e])},t.ignoreAttributes?{}:getDataAttributeProps$1(e));return n.animateFill&&(n.arrow=!1),(n.arrow||isUCBrowser)&&(n.animateFill=!1),n}function debounce$2(e,t){return 0===t?e:function(i){clearTimeout(n),n=setTimeout((function(){e(i)}),t)};var n}function preserveInvocation(e,t,n){e&&e!==t&&e.apply(null,n)}function arrayFrom$1(e){return[].slice.call(e)}function closestCallback(e,t){for(;e;){if(t(e))return e;e=e.parentElement}return null}function includes(e,t){return e.indexOf(t)>-1}function setInnerHTML(e,t){e[innerHTML$1()]=isRealElement(t)?t[innerHTML$1()]:t}function setContent$1(e,t){if(isRealElement(t.content))setInnerHTML(e,""),e.appendChild(t.content);else if("function"!=typeof t.content){e[t.allowHTML?"innerHTML":"textContent"]=t.content}}function getChildren$1(e){return{tooltip:e.querySelector(TOOLTIP_SELECTOR),backdrop:e.querySelector(BACKDROP_SELECTOR),content:e.querySelector(CONTENT_SELECTOR),arrow:e.querySelector(ARROW_SELECTOR)||e.querySelector(SVG_ARROW_SELECTOR)}}function addInertia(e){e.setAttribute("data-inertia","")}function removeInertia(e){e.removeAttribute("data-inertia")}function createArrowElement$1(e){var t=div$1();return!0===e?t.className=ARROW_CLASS$1:(t.className=SVG_ARROW_CLASS$1,isRealElement(e)?t.appendChild(e):setInnerHTML(t,"round"===e?ROUND_ARROW_INNER_HTML:e)),t}function createBackdropElement(e){var t=div$1();return t.className=BACKDROP_CLASS$1,t.setAttribute("data-state",e?"visible":"hidden"),t}function addInteractive(e){e.setAttribute("data-interactive","")}function removeInteractive(e){e.removeAttribute("data-interactive")}function updateTransitionEndListener$1(e,t,n){var i=isUCBrowser&&void 0!==document.body.style.webkitTransition?"webkitTransitionEnd":"transitionend";e[t+"EventListener"](i,n)}function getBasePlacement$2(e){return e.split("-")[0]}function reflow(e){e.offsetHeight}function updateTheme(e,t,n){n.split(" ").forEach((function(n){n&&e.classList[t](n+"-theme")}))}function createPopperElement(e,t){var n=div$1();n.className=POPPER_CLASS,n.style.position="absolute",n.style.top="0",n.style.left="0";var i=div$1();i.className=TOOLTIP_CLASS,i.id="tippy-"+e,i.setAttribute("data-state","hidden"),i.setAttribute("tabindex","-1"),updateTheme(i,"add",t.theme);var o=div$1();return o.className=CONTENT_CLASS$1,o.setAttribute("data-state","hidden"),t.interactive&&addInteractive(i),t.arrow&&(i.setAttribute("data-arrow",""),i.appendChild(createArrowElement$1(t.arrow))),t.animateFill&&(i.appendChild(createBackdropElement(!1)),i.setAttribute("data-animatefill","")),t.inertia&&addInertia(i),setContent$1(o,t),i.appendChild(o),n.appendChild(i),updatePopperElement(n,t,t,!1),n}function updatePopperElement(e,t,n,i){var o=getChildren$1(e),a=o.tooltip,r=o.content,s=o.backdrop,l=o.arrow;e.style.zIndex=""+n.zIndex,a.setAttribute("data-animation",n.animation),a.style.maxWidth=n.maxWidth+("number"==typeof n.maxWidth?"px":""),n.role?a.setAttribute("role",n.role):a.removeAttribute("role"),t.content!==n.content&&setContent$1(r,n),!t.animateFill&&n.animateFill?(a.appendChild(createBackdropElement(i)),a.setAttribute("data-animatefill","")):t.animateFill&&!n.animateFill&&(a.removeChild(s),a.removeAttribute("data-animatefill")),!t.arrow&&n.arrow?(a.appendChild(createArrowElement$1(n.arrow)),a.setAttribute("data-arrow","")):t.arrow&&!n.arrow?(a.removeChild(l),a.removeAttribute("data-arrow")):t.arrow!==n.arrow&&(a.removeChild(l),a.appendChild(createArrowElement$1(n.arrow))),!t.interactive&&n.interactive?addInteractive(a):t.interactive&&!n.interactive&&removeInteractive(a),!t.inertia&&n.inertia?addInertia(a):t.inertia&&!n.inertia&&removeInertia(a),t.theme!==n.theme&&(updateTheme(a,"remove",t.theme),updateTheme(a,"add",n.theme))}function isCursorOutsideInteractiveBorder$1(e,t,n,i){if(!e)return!0;var o=n.clientX,a=n.clientY,r=i.interactiveBorder,s=i.distance,l=t.top-a>("top"===e?r+s:r),c=a-t.bottom>("bottom"===e?r+s:r),d=t.left-o>("left"===e?r+s:r),p=o-t.right>("right"===e?r+s:r);return l||c||d||p}
9
8
  /**!
10
9
  * @fileOverview Kickass library to create and place poppers near their reference elements.
11
10
  * @version 1.15.0
@@ -29,15 +28,15 @@ function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"===_typeof
29
28
  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
30
29
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
31
30
  * SOFTWARE.
32
- */for(var isBrowser$1$1="undefined"!=typeof window&&"undefined"!=typeof document,longerTimeoutBrowsers=["Edge","Trident","Firefox"],timeoutDuration=0,i=0;i<longerTimeoutBrowsers.length;i+=1)if(isBrowser$1$1&&navigator.userAgent.indexOf(longerTimeoutBrowsers[i])>=0){timeoutDuration=1;break}function microtaskDebounce(e){var t=!1;return function(){t||(t=!0,window.Promise.resolve().then((function(){t=!1,e()})))}}function taskDebounce(e){var t=!1;return function(){t||(t=!0,setTimeout((function(){t=!1,e()}),timeoutDuration))}}var supportsMicroTasks=isBrowser$1$1&&window.Promise,debounce$1$1=supportsMicroTasks?microtaskDebounce:taskDebounce;function isFunction$1$1(e){return e&&"[object Function]"==={}.toString.call(e)}function getStyleComputedProperty(e,t){if(1!==e.nodeType)return[];var n=e.ownerDocument.defaultView.getComputedStyle(e,null);return t?n[t]:n}function getParentNode$1(e){return"HTML"===e.nodeName?e:e.parentNode||e.host}function getScrollParent$1(e){if(!e)return document.body;switch(e.nodeName){case"HTML":case"BODY":return e.ownerDocument.body;case"#document":return e.body}var t=getStyleComputedProperty(e),n=t.overflow,i=t.overflowX,o=t.overflowY;return/(auto|scroll|overlay)/.test(n+o+i)?e:getScrollParent$1(getParentNode$1(e))}var isIE11$1=isBrowser$1$1&&!(!window.MSInputMethodContext||!document.documentMode),isIE10=isBrowser$1$1&&/MSIE 10/.test(navigator.userAgent);function isIE$1(e){return 11===e?isIE11$1:10===e?isIE10:isIE11$1||isIE10}function getOffsetParent$1(e){if(!e)return document.documentElement;for(var t=isIE$1(10)?document.body:null,n=e.offsetParent||null;n===t&&e.nextElementSibling;)n=(e=e.nextElementSibling).offsetParent;var i=n&&n.nodeName;return i&&"BODY"!==i&&"HTML"!==i?-1!==["TH","TD","TABLE"].indexOf(n.nodeName)&&"static"===getStyleComputedProperty(n,"position")?getOffsetParent$1(n):n:e?e.ownerDocument.documentElement:document.documentElement}function isOffsetContainer(e){var t=e.nodeName;return"BODY"!==t&&("HTML"===t||getOffsetParent$1(e.firstElementChild)===e)}function getRoot(e){return null!==e.parentNode?getRoot(e.parentNode):e}function findCommonOffsetParent(e,t){if(!(e&&e.nodeType&&t&&t.nodeType))return document.documentElement;var n=e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_FOLLOWING,i=n?e:t,o=n?t:e,a=document.createRange();a.setStart(i,0),a.setEnd(o,0);var r=a.commonAncestorContainer;if(e!==r&&t!==r||i.contains(o))return isOffsetContainer(r)?r:getOffsetParent$1(r);var s=getRoot(e);return s.host?findCommonOffsetParent(s.host,t):findCommonOffsetParent(e,getRoot(t).host)}function getScroll(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"top",n="top"===t?"scrollTop":"scrollLeft",i=e.nodeName;if("BODY"===i||"HTML"===i){var o=e.ownerDocument.documentElement,a=e.ownerDocument.scrollingElement||o;return a[n]}return e[n]}function includeScroll(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=getScroll(t,"top"),o=getScroll(t,"left"),a=n?-1:1;return e.top+=i*a,e.bottom+=i*a,e.left+=o*a,e.right+=o*a,e}function getBordersSize(e,t){var n="x"===t?"Left":"Top",i="Left"===n?"Right":"Bottom";return parseFloat(e["border"+n+"Width"],10)+parseFloat(e["border"+i+"Width"],10)}function getSize(e,t,n,i){return Math.max(t["offset"+e],t["scroll"+e],n["client"+e],n["offset"+e],n["scroll"+e],isIE$1(10)?parseInt(n["offset"+e])+parseInt(i["margin"+("Height"===e?"Top":"Left")])+parseInt(i["margin"+("Height"===e?"Bottom":"Right")]):0)}function getWindowSizes(e){var t=e.body,n=e.documentElement,i=isIE$1(10)&&getComputedStyle(n);return{height:getSize("Height",t,n,i),width:getSize("Width",t,n,i)}}var classCallCheck=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},createClass=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),defineProperty=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},_extends$2=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e};function getClientRect(e){return _extends$2({},e,{right:e.left+e.width,bottom:e.top+e.height})}function getBoundingClientRect$1(e){var t={};try{if(isIE$1(10)){t=e.getBoundingClientRect();var n=getScroll(e,"top"),i=getScroll(e,"left");t.top+=n,t.left+=i,t.bottom+=n,t.right+=i}else t=e.getBoundingClientRect()}catch(e){}var o={left:t.left,top:t.top,width:t.right-t.left,height:t.bottom-t.top},a="HTML"===e.nodeName?getWindowSizes(e.ownerDocument):{},r=a.width||e.clientWidth||o.right-o.left,s=a.height||e.clientHeight||o.bottom-o.top,c=e.offsetWidth-r,l=e.offsetHeight-s;if(c||l){var d=getStyleComputedProperty(e);c-=getBordersSize(d,"x"),l-=getBordersSize(d,"y"),o.width-=c,o.height-=l}return getClientRect(o)}function getOffsetRectRelativeToArbitraryNode(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=isIE$1(10),o="HTML"===t.nodeName,a=getBoundingClientRect$1(e),r=getBoundingClientRect$1(t),s=getScrollParent$1(e),c=getStyleComputedProperty(t),l=parseFloat(c.borderTopWidth,10),d=parseFloat(c.borderLeftWidth,10);n&&o&&(r.top=Math.max(r.top,0),r.left=Math.max(r.left,0));var p=getClientRect({top:a.top-r.top-l,left:a.left-r.left-d,width:a.width,height:a.height});if(p.marginTop=0,p.marginLeft=0,!i&&o){var u=parseFloat(c.marginTop,10),h=parseFloat(c.marginLeft,10);p.top-=l-u,p.bottom-=l-u,p.left-=d-h,p.right-=d-h,p.marginTop=u,p.marginLeft=h}return(i&&!n?t.contains(s):t===s&&"BODY"!==s.nodeName)&&(p=includeScroll(p,t)),p}function getViewportOffsetRectRelativeToArtbitraryNode(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=e.ownerDocument.documentElement,i=getOffsetRectRelativeToArbitraryNode(e,n),o=Math.max(n.clientWidth,window.innerWidth||0),a=Math.max(n.clientHeight,window.innerHeight||0),r=t?0:getScroll(n),s=t?0:getScroll(n,"left"),c={top:r-i.top+i.marginTop,left:s-i.left+i.marginLeft,width:o,height:a};return getClientRect(c)}function isFixed(e){var t=e.nodeName;if("BODY"===t||"HTML"===t)return!1;if("fixed"===getStyleComputedProperty(e,"position"))return!0;var n=getParentNode$1(e);return!!n&&isFixed(n)}function getFixedPositionOffsetParent(e){if(!e||!e.parentElement||isIE$1())return document.documentElement;for(var t=e.parentElement;t&&"none"===getStyleComputedProperty(t,"transform");)t=t.parentElement;return t||document.documentElement}function getBoundaries(e,t,n,i){var o=arguments.length>4&&void 0!==arguments[4]&&arguments[4],a={top:0,left:0},r=o?getFixedPositionOffsetParent(e):findCommonOffsetParent(e,t);if("viewport"===i)a=getViewportOffsetRectRelativeToArtbitraryNode(r,o);else{var s=void 0;"scrollParent"===i?"BODY"===(s=getScrollParent$1(getParentNode$1(t))).nodeName&&(s=e.ownerDocument.documentElement):s="window"===i?e.ownerDocument.documentElement:i;var c=getOffsetRectRelativeToArbitraryNode(s,r,o);if("HTML"!==s.nodeName||isFixed(r))a=c;else{var l=getWindowSizes(e.ownerDocument),d=l.height,p=l.width;a.top+=c.top-c.marginTop,a.bottom=d+c.top,a.left+=c.left-c.marginLeft,a.right=p+c.left}}var u="number"==typeof(n=n||0);return a.left+=u?n:n.left||0,a.top+=u?n:n.top||0,a.right-=u?n:n.right||0,a.bottom-=u?n:n.bottom||0,a}function getArea(e){return e.width*e.height}function computeAutoPlacement$1(e,t,n,i,o){var a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0;if(-1===e.indexOf("auto"))return e;var r=getBoundaries(n,i,a,o),s={top:{width:r.width,height:t.top-r.top},right:{width:r.right-t.right,height:r.height},bottom:{width:r.width,height:r.bottom-t.bottom},left:{width:t.left-r.left,height:r.height}},c=Object.keys(s).map((function(e){return _extends$2({key:e},s[e],{area:getArea(s[e])})})).sort((function(e,t){return t.area-e.area})),l=c.filter((function(e){var t=e.width,i=e.height;return t>=n.clientWidth&&i>=n.clientHeight})),d=l.length>0?l[0].key:c[0].key,p=e.split("-")[1];return d+(p?"-"+p:"")}function getReferenceOffsets(e,t,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,o=i?getFixedPositionOffsetParent(t):findCommonOffsetParent(t,n);return getOffsetRectRelativeToArbitraryNode(n,o,i)}function getOuterSizes(e){var t=e.ownerDocument.defaultView.getComputedStyle(e),n=parseFloat(t.marginTop||0)+parseFloat(t.marginBottom||0),i=parseFloat(t.marginLeft||0)+parseFloat(t.marginRight||0);return{width:e.offsetWidth+i,height:e.offsetHeight+n}}function getOppositePlacement$1(e){var t={left:"right",right:"left",bottom:"top",top:"bottom"};return e.replace(/left|right|bottom|top/g,(function(e){return t[e]}))}function getPopperOffsets(e,t,n){n=n.split("-")[0];var i=getOuterSizes(e),o={width:i.width,height:i.height},a=-1!==["right","left"].indexOf(n),r=a?"top":"left",s=a?"left":"top",c=a?"height":"width",l=a?"width":"height";return o[r]=t[r]+t[c]/2-i[c]/2,o[s]=n===s?t[s]-i[l]:t[getOppositePlacement$1(s)],o}function find(e,t){return Array.prototype.find?e.find(t):e.filter(t)[0]}function findIndex(e,t,n){if(Array.prototype.findIndex)return e.findIndex((function(e){return e[t]===n}));var i=find(e,(function(e){return e[t]===n}));return e.indexOf(i)}function runModifiers(e,t,n){return(void 0===n?e:e.slice(0,findIndex(e,"name",n))).forEach((function(e){e.function&&console.warn("`modifier.function` is deprecated, use `modifier.fn`!");var n=e.function||e.fn;e.enabled&&isFunction$1$1(n)&&(t.offsets.popper=getClientRect(t.offsets.popper),t.offsets.reference=getClientRect(t.offsets.reference),t=n(t,e))})),t}function update(){if(!this.state.isDestroyed){var e={instance:this,styles:{},arrowStyles:{},attributes:{},flipped:!1,offsets:{}};e.offsets.reference=getReferenceOffsets(this.state,this.popper,this.reference,this.options.positionFixed),e.placement=computeAutoPlacement$1(this.options.placement,e.offsets.reference,this.popper,this.reference,this.options.modifiers.flip.boundariesElement,this.options.modifiers.flip.padding),e.originalPlacement=e.placement,e.positionFixed=this.options.positionFixed,e.offsets.popper=getPopperOffsets(this.popper,e.offsets.reference,e.placement),e.offsets.popper.position=this.options.positionFixed?"fixed":"absolute",e=runModifiers(this.modifiers,e),this.state.isCreated?this.options.onUpdate(e):(this.state.isCreated=!0,this.options.onCreate(e))}}function isModifierEnabled(e,t){return e.some((function(e){var n=e.name;return e.enabled&&n===t}))}function getSupportedPropertyName(e){for(var t=[!1,"ms","Webkit","Moz","O"],n=e.charAt(0).toUpperCase()+e.slice(1),i=0;i<t.length;i++){var o=t[i],a=o?""+o+n:e;if(void 0!==document.body.style[a])return a}return null}function destroy(){return this.state.isDestroyed=!0,isModifierEnabled(this.modifiers,"applyStyle")&&(this.popper.removeAttribute("x-placement"),this.popper.style.position="",this.popper.style.top="",this.popper.style.left="",this.popper.style.right="",this.popper.style.bottom="",this.popper.style.willChange="",this.popper.style[getSupportedPropertyName("transform")]=""),this.disableEventListeners(),this.options.removeOnDestroy&&this.popper.parentNode.removeChild(this.popper),this}function getWindow$1(e){var t=e.ownerDocument;return t?t.defaultView:window}function attachToScrollParents(e,t,n,i){var o="BODY"===e.nodeName,a=o?e.ownerDocument.defaultView:e;a.addEventListener(t,n,{passive:!0}),o||attachToScrollParents(getScrollParent$1(a.parentNode),t,n,i),i.push(a)}function setupEventListeners(e,t,n,i){n.updateBound=i,getWindow$1(e).addEventListener("resize",n.updateBound,{passive:!0});var o=getScrollParent$1(e);return attachToScrollParents(o,"scroll",n.updateBound,n.scrollParents),n.scrollElement=o,n.eventsEnabled=!0,n}function enableEventListeners(){this.state.eventsEnabled||(this.state=setupEventListeners(this.reference,this.options,this.state,this.scheduleUpdate))}function removeEventListeners(e,t){return getWindow$1(e).removeEventListener("resize",t.updateBound),t.scrollParents.forEach((function(e){e.removeEventListener("scroll",t.updateBound)})),t.updateBound=null,t.scrollParents=[],t.scrollElement=null,t.eventsEnabled=!1,t}function disableEventListeners(){this.state.eventsEnabled&&(cancelAnimationFrame(this.scheduleUpdate),this.state=removeEventListeners(this.reference,this.state))}function isNumeric(e){return""!==e&&!isNaN(parseFloat(e))&&isFinite(e)}function setStyles(e,t){Object.keys(t).forEach((function(n){var i="";-1!==["width","height","top","right","bottom","left"].indexOf(n)&&isNumeric(t[n])&&(i="px"),e.style[n]=t[n]+i}))}function setAttributes$1(e,t){Object.keys(t).forEach((function(n){!1!==t[n]?e.setAttribute(n,t[n]):e.removeAttribute(n)}))}function applyStyle(e){return setStyles(e.instance.popper,e.styles),setAttributes$1(e.instance.popper,e.attributes),e.arrowElement&&Object.keys(e.arrowStyles).length&&setStyles(e.arrowElement,e.arrowStyles),e}function applyStyleOnLoad(e,t,n,i,o){var a=getReferenceOffsets(o,t,e,n.positionFixed),r=computeAutoPlacement$1(n.placement,a,t,e,n.modifiers.flip.boundariesElement,n.modifiers.flip.padding);return t.setAttribute("x-placement",r),setStyles(t,{position:n.positionFixed?"fixed":"absolute"}),n}function getRoundedOffsets(e,t){var n=e.offsets,i=n.popper,o=n.reference,a=Math.round,r=Math.floor,s=function(e){return e},c=a(o.width),l=a(i.width),d=-1!==["left","right"].indexOf(e.placement),p=-1!==e.placement.indexOf("-"),u=t?d||p||c%2==l%2?a:r:s,h=t?a:s;return{left:u(c%2==1&&l%2==1&&!p&&t?i.left-1:i.left),top:h(i.top),bottom:h(i.bottom),right:u(i.right)}}var isFirefox=isBrowser$1$1&&/Firefox/i.test(navigator.userAgent);function computeStyle(e,t){var n=t.x,i=t.y,o=e.offsets.popper,a=find(e.instance.modifiers,(function(e){return"applyStyle"===e.name})).gpuAcceleration;void 0!==a&&console.warn("WARNING: `gpuAcceleration` option moved to `computeStyle` modifier and will not be supported in future versions of Popper.js!");var r=void 0!==a?a:t.gpuAcceleration,s=getOffsetParent$1(e.instance.popper),c=getBoundingClientRect$1(s),l={position:o.position},d=getRoundedOffsets(e,window.devicePixelRatio<2||!isFirefox),p="bottom"===n?"top":"bottom",u="right"===i?"left":"right",h=getSupportedPropertyName("transform"),g=void 0,f=void 0;if(f="bottom"===p?"HTML"===s.nodeName?-s.clientHeight+d.bottom:-c.height+d.bottom:d.top,g="right"===u?"HTML"===s.nodeName?-s.clientWidth+d.right:-c.width+d.right:d.left,r&&h)l[h]="translate3d("+g+"px, "+f+"px, 0)",l[p]=0,l[u]=0,l.willChange="transform";else{var m="bottom"===p?-1:1,_="right"===u?-1:1;l[p]=f*m,l[u]=g*_,l.willChange=p+", "+u}var v={"x-placement":e.placement};return e.attributes=_extends$2({},v,e.attributes),e.styles=_extends$2({},l,e.styles),e.arrowStyles=_extends$2({},e.offsets.arrow,e.arrowStyles),e}function isModifierRequired(e,t,n){var i=find(e,(function(e){return e.name===t})),o=!!i&&e.some((function(e){return e.name===n&&e.enabled&&e.order<i.order}));if(!o){var a="`"+t+"`",r="`"+n+"`";console.warn(r+" modifier is required by "+a+" modifier in order to work, be sure to include it before "+a+"!")}return o}function arrow$2(e,t){var n;if(!isModifierRequired(e.instance.modifiers,"arrow","keepTogether"))return e;var i=t.element;if("string"==typeof i){if(!(i=e.instance.popper.querySelector(i)))return e}else if(!e.instance.popper.contains(i))return console.warn("WARNING: `arrow.element` must be child of its popper element!"),e;var o=e.placement.split("-")[0],a=e.offsets,r=a.popper,s=a.reference,c=-1!==["left","right"].indexOf(o),l=c?"height":"width",d=c?"Top":"Left",p=d.toLowerCase(),u=c?"left":"top",h=c?"bottom":"right",g=getOuterSizes(i)[l];s[h]-g<r[p]&&(e.offsets.popper[p]-=r[p]-(s[h]-g)),s[p]+g>r[h]&&(e.offsets.popper[p]+=s[p]+g-r[h]),e.offsets.popper=getClientRect(e.offsets.popper);var f=s[p]+s[l]/2-g/2,m=getStyleComputedProperty(e.instance.popper),_=parseFloat(m["margin"+d],10),v=parseFloat(m["border"+d+"Width"],10),b=f-e.offsets.popper[p]-_-v;return b=Math.max(Math.min(r[l]-g,b),0),e.arrowElement=i,e.offsets.arrow=(defineProperty(n={},p,Math.round(b)),defineProperty(n,u,""),n),e}function getOppositeVariation(e){return"end"===e?"start":"start"===e?"end":e}var placements$1=["auto-start","auto","auto-end","top-start","top","top-end","right-start","right","right-end","bottom-end","bottom","bottom-start","left-end","left","left-start"],validPlacements=placements$1.slice(3);function clockwise(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=validPlacements.indexOf(e),i=validPlacements.slice(n+1).concat(validPlacements.slice(0,n));return t?i.reverse():i}var BEHAVIORS={FLIP:"flip",CLOCKWISE:"clockwise",COUNTERCLOCKWISE:"counterclockwise"};function flip$2(e,t){if(isModifierEnabled(e.instance.modifiers,"inner"))return e;if(e.flipped&&e.placement===e.originalPlacement)return e;var n=getBoundaries(e.instance.popper,e.instance.reference,t.padding,t.boundariesElement,e.positionFixed),i=e.placement.split("-")[0],o=getOppositePlacement$1(i),a=e.placement.split("-")[1]||"",r=[];switch(t.behavior){case BEHAVIORS.FLIP:r=[i,o];break;case BEHAVIORS.CLOCKWISE:r=clockwise(i);break;case BEHAVIORS.COUNTERCLOCKWISE:r=clockwise(i,!0);break;default:r=t.behavior}return r.forEach((function(s,c){if(i!==s||r.length===c+1)return e;i=e.placement.split("-")[0],o=getOppositePlacement$1(i);var l=e.offsets.popper,d=e.offsets.reference,p=Math.floor,u="left"===i&&p(l.right)>p(d.left)||"right"===i&&p(l.left)<p(d.right)||"top"===i&&p(l.bottom)>p(d.top)||"bottom"===i&&p(l.top)<p(d.bottom),h=p(l.left)<p(n.left),g=p(l.right)>p(n.right),f=p(l.top)<p(n.top),m=p(l.bottom)>p(n.bottom),_="left"===i&&h||"right"===i&&g||"top"===i&&f||"bottom"===i&&m,v=-1!==["top","bottom"].indexOf(i),b=!!t.flipVariations&&(v&&"start"===a&&h||v&&"end"===a&&g||!v&&"start"===a&&f||!v&&"end"===a&&m),y=!!t.flipVariationsByContent&&(v&&"start"===a&&g||v&&"end"===a&&h||!v&&"start"===a&&m||!v&&"end"===a&&f),x=b||y;(u||_||x)&&(e.flipped=!0,(u||_)&&(i=r[c+1]),x&&(a=getOppositeVariation(a)),e.placement=i+(a?"-"+a:""),e.offsets.popper=_extends$2({},e.offsets.popper,getPopperOffsets(e.instance.popper,e.offsets.reference,e.placement)),e=runModifiers(e.instance.modifiers,e,"flip"))})),e}function keepTogether(e){var t=e.offsets,n=t.popper,i=t.reference,o=e.placement.split("-")[0],a=Math.floor,r=-1!==["top","bottom"].indexOf(o),s=r?"right":"bottom",c=r?"left":"top",l=r?"width":"height";return n[s]<a(i[c])&&(e.offsets.popper[c]=a(i[c])-n[l]),n[c]>a(i[s])&&(e.offsets.popper[c]=a(i[s])),e}function toValue(e,t,n,i){var o=e.match(/((?:\-|\+)?\d*\.?\d*)(.*)/),a=+o[1],r=o[2];if(!a)return e;if(0===r.indexOf("%")){var s=void 0;switch(r){case"%p":s=n;break;case"%":case"%r":default:s=i}return getClientRect(s)[t]/100*a}if("vh"===r||"vw"===r){return("vh"===r?Math.max(document.documentElement.clientHeight,window.innerHeight||0):Math.max(document.documentElement.clientWidth,window.innerWidth||0))/100*a}return a}function parseOffset(e,t,n,i){var o=[0,0],a=-1!==["right","left"].indexOf(i),r=e.split(/(\+|\-)/).map((function(e){return e.trim()})),s=r.indexOf(find(r,(function(e){return-1!==e.search(/,|\s/)})));r[s]&&-1===r[s].indexOf(",")&&console.warn("Offsets separated by white space(s) are deprecated, use a comma (,) instead.");var c=/\s*,\s*|\s+/,l=-1!==s?[r.slice(0,s).concat([r[s].split(c)[0]]),[r[s].split(c)[1]].concat(r.slice(s+1))]:[r];return(l=l.map((function(e,i){var o=(1===i?!a:a)?"height":"width",r=!1;return e.reduce((function(e,t){return""===e[e.length-1]&&-1!==["+","-"].indexOf(t)?(e[e.length-1]=t,r=!0,e):r?(e[e.length-1]+=t,r=!1,e):e.concat(t)}),[]).map((function(e){return toValue(e,o,t,n)}))}))).forEach((function(e,t){e.forEach((function(n,i){isNumeric(n)&&(o[t]+=n*("-"===e[i-1]?-1:1))}))})),o}function offset$2(e,t){var n=t.offset,i=e.placement,o=e.offsets,a=o.popper,r=o.reference,s=i.split("-")[0],c=void 0;return c=isNumeric(+n)?[+n,0]:parseOffset(n,a,r,s),"left"===s?(a.top+=c[0],a.left-=c[1]):"right"===s?(a.top+=c[0],a.left+=c[1]):"top"===s?(a.left+=c[0],a.top-=c[1]):"bottom"===s&&(a.left+=c[0],a.top+=c[1]),e.popper=a,e}function preventOverflow$2(e,t){var n=t.boundariesElement||getOffsetParent$1(e.instance.popper);e.instance.reference===n&&(n=getOffsetParent$1(n));var i=getSupportedPropertyName("transform"),o=e.instance.popper.style,a=o.top,r=o.left,s=o[i];o.top="",o.left="",o[i]="";var c=getBoundaries(e.instance.popper,e.instance.reference,t.padding,n,e.positionFixed);o.top=a,o.left=r,o[i]=s,t.boundaries=c;var l=t.priority,d=e.offsets.popper,p={primary:function(e){var n=d[e];return d[e]<c[e]&&!t.escapeWithReference&&(n=Math.max(d[e],c[e])),defineProperty({},e,n)},secondary:function(e){var n="right"===e?"left":"top",i=d[n];return d[e]>c[e]&&!t.escapeWithReference&&(i=Math.min(d[n],c[e]-("right"===e?d.width:d.height))),defineProperty({},n,i)}};return l.forEach((function(e){var t=-1!==["left","top"].indexOf(e)?"primary":"secondary";d=_extends$2({},d,p[t](e))})),e.offsets.popper=d,e}function shift(e){var t=e.placement,n=t.split("-")[0],i=t.split("-")[1];if(i){var o=e.offsets,a=o.reference,r=o.popper,s=-1!==["bottom","top"].indexOf(n),c=s?"left":"top",l=s?"width":"height",d={start:defineProperty({},c,a[c]),end:defineProperty({},c,a[c]+a[l]-r[l])};e.offsets.popper=_extends$2({},r,d[i])}return e}function hide$2(e){if(!isModifierRequired(e.instance.modifiers,"hide","preventOverflow"))return e;var t=e.offsets.reference,n=find(e.instance.modifiers,(function(e){return"preventOverflow"===e.name})).boundaries;if(t.bottom<n.top||t.left>n.right||t.top>n.bottom||t.right<n.left){if(!0===e.hide)return e;e.hide=!0,e.attributes["x-out-of-boundaries"]=""}else{if(!1===e.hide)return e;e.hide=!1,e.attributes["x-out-of-boundaries"]=!1}return e}function inner(e){var t=e.placement,n=t.split("-")[0],i=e.offsets,o=i.popper,a=i.reference,r=-1!==["left","right"].indexOf(n),s=-1===["top","left"].indexOf(n);return o[r?"left":"top"]=a[n]-(s?o[r?"width":"height"]:0),e.placement=getOppositePlacement$1(t),e.offsets.popper=getClientRect(o),e}var modifiers={shift:{order:100,enabled:!0,fn:shift},offset:{order:200,enabled:!0,fn:offset$2,offset:0},preventOverflow:{order:300,enabled:!0,fn:preventOverflow$2,priority:["left","right","top","bottom"],padding:5,boundariesElement:"scrollParent"},keepTogether:{order:400,enabled:!0,fn:keepTogether},arrow:{order:500,enabled:!0,fn:arrow$2,element:"[x-arrow]"},flip:{order:600,enabled:!0,fn:flip$2,behavior:"flip",padding:5,boundariesElement:"viewport",flipVariations:!1,flipVariationsByContent:!1},inner:{order:700,enabled:!1,fn:inner},hide:{order:800,enabled:!0,fn:hide$2},computeStyle:{order:850,enabled:!0,fn:computeStyle,gpuAcceleration:!0,x:"bottom",y:"right"},applyStyle:{order:900,enabled:!0,fn:applyStyle,onLoad:applyStyleOnLoad,gpuAcceleration:void 0}},Defaults={placement:"bottom",positionFixed:!1,eventsEnabled:!0,removeOnDestroy:!1,onCreate:function(){},onUpdate:function(){},modifiers:modifiers},Popper=function(){function e(t,n){var i=this,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};classCallCheck(this,e),this.scheduleUpdate=function(){return requestAnimationFrame(i.update)},this.update=debounce$1$1(this.update.bind(this)),this.options=_extends$2({},e.Defaults,o),this.state={isDestroyed:!1,isCreated:!1,scrollParents:[]},this.reference=t&&t.jquery?t[0]:t,this.popper=n&&n.jquery?n[0]:n,this.options.modifiers={},Object.keys(_extends$2({},e.Defaults.modifiers,o.modifiers)).forEach((function(t){i.options.modifiers[t]=_extends$2({},e.Defaults.modifiers[t]||{},o.modifiers?o.modifiers[t]:{})})),this.modifiers=Object.keys(this.options.modifiers).map((function(e){return _extends$2({name:e},i.options.modifiers[e])})).sort((function(e,t){return e.order-t.order})),this.modifiers.forEach((function(e){e.enabled&&isFunction$1$1(e.onLoad)&&e.onLoad(i.reference,i.popper,i.options,e,i.state)})),this.update();var a=this.options.eventsEnabled;a&&this.enableEventListeners(),this.state.eventsEnabled=a}return createClass(e,[{key:"update",value:function(){return update.call(this)}},{key:"destroy",value:function(){return destroy.call(this)}},{key:"enableEventListeners",value:function(){return enableEventListeners.call(this)}},{key:"disableEventListeners",value:function(){return disableEventListeners.call(this)}}]),e}();Popper.Utils=("undefined"!=typeof window?window:global).PopperUtils,Popper.placements=placements$1,Popper.Defaults=Defaults;
31
+ */for(var isBrowser$1$1="undefined"!=typeof window&&"undefined"!=typeof document,longerTimeoutBrowsers=["Edge","Trident","Firefox"],timeoutDuration=0,i=0;i<longerTimeoutBrowsers.length;i+=1)if(isBrowser$1$1&&navigator.userAgent.indexOf(longerTimeoutBrowsers[i])>=0){timeoutDuration=1;break}function microtaskDebounce(e){var t=!1;return function(){t||(t=!0,window.Promise.resolve().then((function(){t=!1,e()})))}}function taskDebounce(e){var t=!1;return function(){t||(t=!0,setTimeout((function(){t=!1,e()}),timeoutDuration))}}var supportsMicroTasks=isBrowser$1$1&&window.Promise,debounce$1$1=supportsMicroTasks?microtaskDebounce:taskDebounce;function isFunction$1$1(e){return e&&"[object Function]"==={}.toString.call(e)}function getStyleComputedProperty(e,t){if(1!==e.nodeType)return[];var n=e.ownerDocument.defaultView.getComputedStyle(e,null);return t?n[t]:n}function getParentNode$1(e){return"HTML"===e.nodeName?e:e.parentNode||e.host}function getScrollParent$1(e){if(!e)return document.body;switch(e.nodeName){case"HTML":case"BODY":return e.ownerDocument.body;case"#document":return e.body}var t=getStyleComputedProperty(e),n=t.overflow,i=t.overflowX,o=t.overflowY;return/(auto|scroll|overlay)/.test(n+o+i)?e:getScrollParent$1(getParentNode$1(e))}var isIE11$1=isBrowser$1$1&&!(!window.MSInputMethodContext||!document.documentMode),isIE10=isBrowser$1$1&&/MSIE 10/.test(navigator.userAgent);function isIE$1(e){return 11===e?isIE11$1:10===e?isIE10:isIE11$1||isIE10}function getOffsetParent$1(e){if(!e)return document.documentElement;for(var t=isIE$1(10)?document.body:null,n=e.offsetParent||null;n===t&&e.nextElementSibling;)n=(e=e.nextElementSibling).offsetParent;var i=n&&n.nodeName;return i&&"BODY"!==i&&"HTML"!==i?-1!==["TH","TD","TABLE"].indexOf(n.nodeName)&&"static"===getStyleComputedProperty(n,"position")?getOffsetParent$1(n):n:e?e.ownerDocument.documentElement:document.documentElement}function isOffsetContainer(e){var t=e.nodeName;return"BODY"!==t&&("HTML"===t||getOffsetParent$1(e.firstElementChild)===e)}function getRoot(e){return null!==e.parentNode?getRoot(e.parentNode):e}function findCommonOffsetParent(e,t){if(!(e&&e.nodeType&&t&&t.nodeType))return document.documentElement;var n=e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_FOLLOWING,i=n?e:t,o=n?t:e,a=document.createRange();a.setStart(i,0),a.setEnd(o,0);var r=a.commonAncestorContainer;if(e!==r&&t!==r||i.contains(o))return isOffsetContainer(r)?r:getOffsetParent$1(r);var s=getRoot(e);return s.host?findCommonOffsetParent(s.host,t):findCommonOffsetParent(e,getRoot(t).host)}function getScroll(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"top",n="top"===t?"scrollTop":"scrollLeft",i=e.nodeName;if("BODY"===i||"HTML"===i){var o=e.ownerDocument.documentElement,a=e.ownerDocument.scrollingElement||o;return a[n]}return e[n]}function includeScroll(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=getScroll(t,"top"),o=getScroll(t,"left"),a=n?-1:1;return e.top+=i*a,e.bottom+=i*a,e.left+=o*a,e.right+=o*a,e}function getBordersSize(e,t){var n="x"===t?"Left":"Top",i="Left"===n?"Right":"Bottom";return parseFloat(e["border"+n+"Width"],10)+parseFloat(e["border"+i+"Width"],10)}function getSize(e,t,n,i){return Math.max(t["offset"+e],t["scroll"+e],n["client"+e],n["offset"+e],n["scroll"+e],isIE$1(10)?parseInt(n["offset"+e])+parseInt(i["margin"+("Height"===e?"Top":"Left")])+parseInt(i["margin"+("Height"===e?"Bottom":"Right")]):0)}function getWindowSizes(e){var t=e.body,n=e.documentElement,i=isIE$1(10)&&getComputedStyle(n);return{height:getSize("Height",t,n,i),width:getSize("Width",t,n,i)}}var classCallCheck=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},createClass=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),defineProperty=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},_extends$2=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e};function getClientRect(e){return _extends$2({},e,{right:e.left+e.width,bottom:e.top+e.height})}function getBoundingClientRect$1(e){var t={};try{if(isIE$1(10)){t=e.getBoundingClientRect();var n=getScroll(e,"top"),i=getScroll(e,"left");t.top+=n,t.left+=i,t.bottom+=n,t.right+=i}else t=e.getBoundingClientRect()}catch(e){}var o={left:t.left,top:t.top,width:t.right-t.left,height:t.bottom-t.top},a="HTML"===e.nodeName?getWindowSizes(e.ownerDocument):{},r=a.width||e.clientWidth||o.right-o.left,s=a.height||e.clientHeight||o.bottom-o.top,l=e.offsetWidth-r,c=e.offsetHeight-s;if(l||c){var d=getStyleComputedProperty(e);l-=getBordersSize(d,"x"),c-=getBordersSize(d,"y"),o.width-=l,o.height-=c}return getClientRect(o)}function getOffsetRectRelativeToArbitraryNode(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=isIE$1(10),o="HTML"===t.nodeName,a=getBoundingClientRect$1(e),r=getBoundingClientRect$1(t),s=getScrollParent$1(e),l=getStyleComputedProperty(t),c=parseFloat(l.borderTopWidth,10),d=parseFloat(l.borderLeftWidth,10);n&&o&&(r.top=Math.max(r.top,0),r.left=Math.max(r.left,0));var p=getClientRect({top:a.top-r.top-c,left:a.left-r.left-d,width:a.width,height:a.height});if(p.marginTop=0,p.marginLeft=0,!i&&o){var u=parseFloat(l.marginTop,10),h=parseFloat(l.marginLeft,10);p.top-=c-u,p.bottom-=c-u,p.left-=d-h,p.right-=d-h,p.marginTop=u,p.marginLeft=h}return(i&&!n?t.contains(s):t===s&&"BODY"!==s.nodeName)&&(p=includeScroll(p,t)),p}function getViewportOffsetRectRelativeToArtbitraryNode(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=e.ownerDocument.documentElement,i=getOffsetRectRelativeToArbitraryNode(e,n),o=Math.max(n.clientWidth,window.innerWidth||0),a=Math.max(n.clientHeight,window.innerHeight||0),r=t?0:getScroll(n),s=t?0:getScroll(n,"left"),l={top:r-i.top+i.marginTop,left:s-i.left+i.marginLeft,width:o,height:a};return getClientRect(l)}function isFixed(e){var t=e.nodeName;if("BODY"===t||"HTML"===t)return!1;if("fixed"===getStyleComputedProperty(e,"position"))return!0;var n=getParentNode$1(e);return!!n&&isFixed(n)}function getFixedPositionOffsetParent(e){if(!e||!e.parentElement||isIE$1())return document.documentElement;for(var t=e.parentElement;t&&"none"===getStyleComputedProperty(t,"transform");)t=t.parentElement;return t||document.documentElement}function getBoundaries(e,t,n,i){var o=arguments.length>4&&void 0!==arguments[4]&&arguments[4],a={top:0,left:0},r=o?getFixedPositionOffsetParent(e):findCommonOffsetParent(e,t);if("viewport"===i)a=getViewportOffsetRectRelativeToArtbitraryNode(r,o);else{var s=void 0;"scrollParent"===i?"BODY"===(s=getScrollParent$1(getParentNode$1(t))).nodeName&&(s=e.ownerDocument.documentElement):s="window"===i?e.ownerDocument.documentElement:i;var l=getOffsetRectRelativeToArbitraryNode(s,r,o);if("HTML"!==s.nodeName||isFixed(r))a=l;else{var c=getWindowSizes(e.ownerDocument),d=c.height,p=c.width;a.top+=l.top-l.marginTop,a.bottom=d+l.top,a.left+=l.left-l.marginLeft,a.right=p+l.left}}var u="number"==typeof(n=n||0);return a.left+=u?n:n.left||0,a.top+=u?n:n.top||0,a.right-=u?n:n.right||0,a.bottom-=u?n:n.bottom||0,a}function getArea(e){return e.width*e.height}function computeAutoPlacement$1(e,t,n,i,o){var a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0;if(-1===e.indexOf("auto"))return e;var r=getBoundaries(n,i,a,o),s={top:{width:r.width,height:t.top-r.top},right:{width:r.right-t.right,height:r.height},bottom:{width:r.width,height:r.bottom-t.bottom},left:{width:t.left-r.left,height:r.height}},l=Object.keys(s).map((function(e){return _extends$2({key:e},s[e],{area:getArea(s[e])})})).sort((function(e,t){return t.area-e.area})),c=l.filter((function(e){var t=e.width,i=e.height;return t>=n.clientWidth&&i>=n.clientHeight})),d=c.length>0?c[0].key:l[0].key,p=e.split("-")[1];return d+(p?"-"+p:"")}function getReferenceOffsets(e,t,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,o=i?getFixedPositionOffsetParent(t):findCommonOffsetParent(t,n);return getOffsetRectRelativeToArbitraryNode(n,o,i)}function getOuterSizes(e){var t=e.ownerDocument.defaultView.getComputedStyle(e),n=parseFloat(t.marginTop||0)+parseFloat(t.marginBottom||0),i=parseFloat(t.marginLeft||0)+parseFloat(t.marginRight||0);return{width:e.offsetWidth+i,height:e.offsetHeight+n}}function getOppositePlacement$1(e){var t={left:"right",right:"left",bottom:"top",top:"bottom"};return e.replace(/left|right|bottom|top/g,(function(e){return t[e]}))}function getPopperOffsets(e,t,n){n=n.split("-")[0];var i=getOuterSizes(e),o={width:i.width,height:i.height},a=-1!==["right","left"].indexOf(n),r=a?"top":"left",s=a?"left":"top",l=a?"height":"width",c=a?"width":"height";return o[r]=t[r]+t[l]/2-i[l]/2,o[s]=n===s?t[s]-i[c]:t[getOppositePlacement$1(s)],o}function find(e,t){return Array.prototype.find?e.find(t):e.filter(t)[0]}function findIndex(e,t,n){if(Array.prototype.findIndex)return e.findIndex((function(e){return e[t]===n}));var i=find(e,(function(e){return e[t]===n}));return e.indexOf(i)}function runModifiers(e,t,n){return(void 0===n?e:e.slice(0,findIndex(e,"name",n))).forEach((function(e){e.function&&console.warn("`modifier.function` is deprecated, use `modifier.fn`!");var n=e.function||e.fn;e.enabled&&isFunction$1$1(n)&&(t.offsets.popper=getClientRect(t.offsets.popper),t.offsets.reference=getClientRect(t.offsets.reference),t=n(t,e))})),t}function update(){if(!this.state.isDestroyed){var e={instance:this,styles:{},arrowStyles:{},attributes:{},flipped:!1,offsets:{}};e.offsets.reference=getReferenceOffsets(this.state,this.popper,this.reference,this.options.positionFixed),e.placement=computeAutoPlacement$1(this.options.placement,e.offsets.reference,this.popper,this.reference,this.options.modifiers.flip.boundariesElement,this.options.modifiers.flip.padding),e.originalPlacement=e.placement,e.positionFixed=this.options.positionFixed,e.offsets.popper=getPopperOffsets(this.popper,e.offsets.reference,e.placement),e.offsets.popper.position=this.options.positionFixed?"fixed":"absolute",e=runModifiers(this.modifiers,e),this.state.isCreated?this.options.onUpdate(e):(this.state.isCreated=!0,this.options.onCreate(e))}}function isModifierEnabled(e,t){return e.some((function(e){var n=e.name;return e.enabled&&n===t}))}function getSupportedPropertyName(e){for(var t=[!1,"ms","Webkit","Moz","O"],n=e.charAt(0).toUpperCase()+e.slice(1),i=0;i<t.length;i++){var o=t[i],a=o?""+o+n:e;if(void 0!==document.body.style[a])return a}return null}function destroy(){return this.state.isDestroyed=!0,isModifierEnabled(this.modifiers,"applyStyle")&&(this.popper.removeAttribute("x-placement"),this.popper.style.position="",this.popper.style.top="",this.popper.style.left="",this.popper.style.right="",this.popper.style.bottom="",this.popper.style.willChange="",this.popper.style[getSupportedPropertyName("transform")]=""),this.disableEventListeners(),this.options.removeOnDestroy&&this.popper.parentNode.removeChild(this.popper),this}function getWindow$1(e){var t=e.ownerDocument;return t?t.defaultView:window}function attachToScrollParents(e,t,n,i){var o="BODY"===e.nodeName,a=o?e.ownerDocument.defaultView:e;a.addEventListener(t,n,{passive:!0}),o||attachToScrollParents(getScrollParent$1(a.parentNode),t,n,i),i.push(a)}function setupEventListeners(e,t,n,i){n.updateBound=i,getWindow$1(e).addEventListener("resize",n.updateBound,{passive:!0});var o=getScrollParent$1(e);return attachToScrollParents(o,"scroll",n.updateBound,n.scrollParents),n.scrollElement=o,n.eventsEnabled=!0,n}function enableEventListeners(){this.state.eventsEnabled||(this.state=setupEventListeners(this.reference,this.options,this.state,this.scheduleUpdate))}function removeEventListeners(e,t){return getWindow$1(e).removeEventListener("resize",t.updateBound),t.scrollParents.forEach((function(e){e.removeEventListener("scroll",t.updateBound)})),t.updateBound=null,t.scrollParents=[],t.scrollElement=null,t.eventsEnabled=!1,t}function disableEventListeners(){this.state.eventsEnabled&&(cancelAnimationFrame(this.scheduleUpdate),this.state=removeEventListeners(this.reference,this.state))}function isNumeric(e){return""!==e&&!isNaN(parseFloat(e))&&isFinite(e)}function setStyles(e,t){Object.keys(t).forEach((function(n){var i="";-1!==["width","height","top","right","bottom","left"].indexOf(n)&&isNumeric(t[n])&&(i="px"),e.style[n]=t[n]+i}))}function setAttributes$1(e,t){Object.keys(t).forEach((function(n){!1!==t[n]?e.setAttribute(n,t[n]):e.removeAttribute(n)}))}function applyStyle(e){return setStyles(e.instance.popper,e.styles),setAttributes$1(e.instance.popper,e.attributes),e.arrowElement&&Object.keys(e.arrowStyles).length&&setStyles(e.arrowElement,e.arrowStyles),e}function applyStyleOnLoad(e,t,n,i,o){var a=getReferenceOffsets(o,t,e,n.positionFixed),r=computeAutoPlacement$1(n.placement,a,t,e,n.modifiers.flip.boundariesElement,n.modifiers.flip.padding);return t.setAttribute("x-placement",r),setStyles(t,{position:n.positionFixed?"fixed":"absolute"}),n}function getRoundedOffsets(e,t){var n=e.offsets,i=n.popper,o=n.reference,a=Math.round,r=Math.floor,s=function(e){return e},l=a(o.width),c=a(i.width),d=-1!==["left","right"].indexOf(e.placement),p=-1!==e.placement.indexOf("-"),u=t?d||p||l%2==c%2?a:r:s,h=t?a:s;return{left:u(l%2==1&&c%2==1&&!p&&t?i.left-1:i.left),top:h(i.top),bottom:h(i.bottom),right:u(i.right)}}var isFirefox=isBrowser$1$1&&/Firefox/i.test(navigator.userAgent);function computeStyle(e,t){var n=t.x,i=t.y,o=e.offsets.popper,a=find(e.instance.modifiers,(function(e){return"applyStyle"===e.name})).gpuAcceleration;void 0!==a&&console.warn("WARNING: `gpuAcceleration` option moved to `computeStyle` modifier and will not be supported in future versions of Popper.js!");var r=void 0!==a?a:t.gpuAcceleration,s=getOffsetParent$1(e.instance.popper),l=getBoundingClientRect$1(s),c={position:o.position},d=getRoundedOffsets(e,window.devicePixelRatio<2||!isFirefox),p="bottom"===n?"top":"bottom",u="right"===i?"left":"right",h=getSupportedPropertyName("transform"),g=void 0,f=void 0;if(f="bottom"===p?"HTML"===s.nodeName?-s.clientHeight+d.bottom:-l.height+d.bottom:d.top,g="right"===u?"HTML"===s.nodeName?-s.clientWidth+d.right:-l.width+d.right:d.left,r&&h)c[h]="translate3d("+g+"px, "+f+"px, 0)",c[p]=0,c[u]=0,c.willChange="transform";else{var m="bottom"===p?-1:1,_="right"===u?-1:1;c[p]=f*m,c[u]=g*_,c.willChange=p+", "+u}var v={"x-placement":e.placement};return e.attributes=_extends$2({},v,e.attributes),e.styles=_extends$2({},c,e.styles),e.arrowStyles=_extends$2({},e.offsets.arrow,e.arrowStyles),e}function isModifierRequired(e,t,n){var i=find(e,(function(e){return e.name===t})),o=!!i&&e.some((function(e){return e.name===n&&e.enabled&&e.order<i.order}));if(!o){var a="`"+t+"`",r="`"+n+"`";console.warn(r+" modifier is required by "+a+" modifier in order to work, be sure to include it before "+a+"!")}return o}function arrow$2(e,t){var n;if(!isModifierRequired(e.instance.modifiers,"arrow","keepTogether"))return e;var i=t.element;if("string"==typeof i){if(!(i=e.instance.popper.querySelector(i)))return e}else if(!e.instance.popper.contains(i))return console.warn("WARNING: `arrow.element` must be child of its popper element!"),e;var o=e.placement.split("-")[0],a=e.offsets,r=a.popper,s=a.reference,l=-1!==["left","right"].indexOf(o),c=l?"height":"width",d=l?"Top":"Left",p=d.toLowerCase(),u=l?"left":"top",h=l?"bottom":"right",g=getOuterSizes(i)[c];s[h]-g<r[p]&&(e.offsets.popper[p]-=r[p]-(s[h]-g)),s[p]+g>r[h]&&(e.offsets.popper[p]+=s[p]+g-r[h]),e.offsets.popper=getClientRect(e.offsets.popper);var f=s[p]+s[c]/2-g/2,m=getStyleComputedProperty(e.instance.popper),_=parseFloat(m["margin"+d],10),v=parseFloat(m["border"+d+"Width"],10),b=f-e.offsets.popper[p]-_-v;return b=Math.max(Math.min(r[c]-g,b),0),e.arrowElement=i,e.offsets.arrow=(defineProperty(n={},p,Math.round(b)),defineProperty(n,u,""),n),e}function getOppositeVariation(e){return"end"===e?"start":"start"===e?"end":e}var placements$1=["auto-start","auto","auto-end","top-start","top","top-end","right-start","right","right-end","bottom-end","bottom","bottom-start","left-end","left","left-start"],validPlacements=placements$1.slice(3);function clockwise(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=validPlacements.indexOf(e),i=validPlacements.slice(n+1).concat(validPlacements.slice(0,n));return t?i.reverse():i}var BEHAVIORS={FLIP:"flip",CLOCKWISE:"clockwise",COUNTERCLOCKWISE:"counterclockwise"};function flip$2(e,t){if(isModifierEnabled(e.instance.modifiers,"inner"))return e;if(e.flipped&&e.placement===e.originalPlacement)return e;var n=getBoundaries(e.instance.popper,e.instance.reference,t.padding,t.boundariesElement,e.positionFixed),i=e.placement.split("-")[0],o=getOppositePlacement$1(i),a=e.placement.split("-")[1]||"",r=[];switch(t.behavior){case BEHAVIORS.FLIP:r=[i,o];break;case BEHAVIORS.CLOCKWISE:r=clockwise(i);break;case BEHAVIORS.COUNTERCLOCKWISE:r=clockwise(i,!0);break;default:r=t.behavior}return r.forEach((function(s,l){if(i!==s||r.length===l+1)return e;i=e.placement.split("-")[0],o=getOppositePlacement$1(i);var c=e.offsets.popper,d=e.offsets.reference,p=Math.floor,u="left"===i&&p(c.right)>p(d.left)||"right"===i&&p(c.left)<p(d.right)||"top"===i&&p(c.bottom)>p(d.top)||"bottom"===i&&p(c.top)<p(d.bottom),h=p(c.left)<p(n.left),g=p(c.right)>p(n.right),f=p(c.top)<p(n.top),m=p(c.bottom)>p(n.bottom),_="left"===i&&h||"right"===i&&g||"top"===i&&f||"bottom"===i&&m,v=-1!==["top","bottom"].indexOf(i),b=!!t.flipVariations&&(v&&"start"===a&&h||v&&"end"===a&&g||!v&&"start"===a&&f||!v&&"end"===a&&m),y=!!t.flipVariationsByContent&&(v&&"start"===a&&g||v&&"end"===a&&h||!v&&"start"===a&&m||!v&&"end"===a&&f),x=b||y;(u||_||x)&&(e.flipped=!0,(u||_)&&(i=r[l+1]),x&&(a=getOppositeVariation(a)),e.placement=i+(a?"-"+a:""),e.offsets.popper=_extends$2({},e.offsets.popper,getPopperOffsets(e.instance.popper,e.offsets.reference,e.placement)),e=runModifiers(e.instance.modifiers,e,"flip"))})),e}function keepTogether(e){var t=e.offsets,n=t.popper,i=t.reference,o=e.placement.split("-")[0],a=Math.floor,r=-1!==["top","bottom"].indexOf(o),s=r?"right":"bottom",l=r?"left":"top",c=r?"width":"height";return n[s]<a(i[l])&&(e.offsets.popper[l]=a(i[l])-n[c]),n[l]>a(i[s])&&(e.offsets.popper[l]=a(i[s])),e}function toValue(e,t,n,i){var o=e.match(/((?:\-|\+)?\d*\.?\d*)(.*)/),a=+o[1],r=o[2];if(!a)return e;if(0===r.indexOf("%")){var s=void 0;switch(r){case"%p":s=n;break;case"%":case"%r":default:s=i}return getClientRect(s)[t]/100*a}if("vh"===r||"vw"===r){return("vh"===r?Math.max(document.documentElement.clientHeight,window.innerHeight||0):Math.max(document.documentElement.clientWidth,window.innerWidth||0))/100*a}return a}function parseOffset(e,t,n,i){var o=[0,0],a=-1!==["right","left"].indexOf(i),r=e.split(/(\+|\-)/).map((function(e){return e.trim()})),s=r.indexOf(find(r,(function(e){return-1!==e.search(/,|\s/)})));r[s]&&-1===r[s].indexOf(",")&&console.warn("Offsets separated by white space(s) are deprecated, use a comma (,) instead.");var l=/\s*,\s*|\s+/,c=-1!==s?[r.slice(0,s).concat([r[s].split(l)[0]]),[r[s].split(l)[1]].concat(r.slice(s+1))]:[r];return(c=c.map((function(e,i){var o=(1===i?!a:a)?"height":"width",r=!1;return e.reduce((function(e,t){return""===e[e.length-1]&&-1!==["+","-"].indexOf(t)?(e[e.length-1]=t,r=!0,e):r?(e[e.length-1]+=t,r=!1,e):e.concat(t)}),[]).map((function(e){return toValue(e,o,t,n)}))}))).forEach((function(e,t){e.forEach((function(n,i){isNumeric(n)&&(o[t]+=n*("-"===e[i-1]?-1:1))}))})),o}function offset$2(e,t){var n=t.offset,i=e.placement,o=e.offsets,a=o.popper,r=o.reference,s=i.split("-")[0],l=void 0;return l=isNumeric(+n)?[+n,0]:parseOffset(n,a,r,s),"left"===s?(a.top+=l[0],a.left-=l[1]):"right"===s?(a.top+=l[0],a.left+=l[1]):"top"===s?(a.left+=l[0],a.top-=l[1]):"bottom"===s&&(a.left+=l[0],a.top+=l[1]),e.popper=a,e}function preventOverflow$2(e,t){var n=t.boundariesElement||getOffsetParent$1(e.instance.popper);e.instance.reference===n&&(n=getOffsetParent$1(n));var i=getSupportedPropertyName("transform"),o=e.instance.popper.style,a=o.top,r=o.left,s=o[i];o.top="",o.left="",o[i]="";var l=getBoundaries(e.instance.popper,e.instance.reference,t.padding,n,e.positionFixed);o.top=a,o.left=r,o[i]=s,t.boundaries=l;var c=t.priority,d=e.offsets.popper,p={primary:function(e){var n=d[e];return d[e]<l[e]&&!t.escapeWithReference&&(n=Math.max(d[e],l[e])),defineProperty({},e,n)},secondary:function(e){var n="right"===e?"left":"top",i=d[n];return d[e]>l[e]&&!t.escapeWithReference&&(i=Math.min(d[n],l[e]-("right"===e?d.width:d.height))),defineProperty({},n,i)}};return c.forEach((function(e){var t=-1!==["left","top"].indexOf(e)?"primary":"secondary";d=_extends$2({},d,p[t](e))})),e.offsets.popper=d,e}function shift(e){var t=e.placement,n=t.split("-")[0],i=t.split("-")[1];if(i){var o=e.offsets,a=o.reference,r=o.popper,s=-1!==["bottom","top"].indexOf(n),l=s?"left":"top",c=s?"width":"height",d={start:defineProperty({},l,a[l]),end:defineProperty({},l,a[l]+a[c]-r[c])};e.offsets.popper=_extends$2({},r,d[i])}return e}function hide$2(e){if(!isModifierRequired(e.instance.modifiers,"hide","preventOverflow"))return e;var t=e.offsets.reference,n=find(e.instance.modifiers,(function(e){return"preventOverflow"===e.name})).boundaries;if(t.bottom<n.top||t.left>n.right||t.top>n.bottom||t.right<n.left){if(!0===e.hide)return e;e.hide=!0,e.attributes["x-out-of-boundaries"]=""}else{if(!1===e.hide)return e;e.hide=!1,e.attributes["x-out-of-boundaries"]=!1}return e}function inner(e){var t=e.placement,n=t.split("-")[0],i=e.offsets,o=i.popper,a=i.reference,r=-1!==["left","right"].indexOf(n),s=-1===["top","left"].indexOf(n);return o[r?"left":"top"]=a[n]-(s?o[r?"width":"height"]:0),e.placement=getOppositePlacement$1(t),e.offsets.popper=getClientRect(o),e}var modifiers={shift:{order:100,enabled:!0,fn:shift},offset:{order:200,enabled:!0,fn:offset$2,offset:0},preventOverflow:{order:300,enabled:!0,fn:preventOverflow$2,priority:["left","right","top","bottom"],padding:5,boundariesElement:"scrollParent"},keepTogether:{order:400,enabled:!0,fn:keepTogether},arrow:{order:500,enabled:!0,fn:arrow$2,element:"[x-arrow]"},flip:{order:600,enabled:!0,fn:flip$2,behavior:"flip",padding:5,boundariesElement:"viewport",flipVariations:!1,flipVariationsByContent:!1},inner:{order:700,enabled:!1,fn:inner},hide:{order:800,enabled:!0,fn:hide$2},computeStyle:{order:850,enabled:!0,fn:computeStyle,gpuAcceleration:!0,x:"bottom",y:"right"},applyStyle:{order:900,enabled:!0,fn:applyStyle,onLoad:applyStyleOnLoad,gpuAcceleration:void 0}},Defaults={placement:"bottom",positionFixed:!1,eventsEnabled:!0,removeOnDestroy:!1,onCreate:function(){},onUpdate:function(){},modifiers:modifiers},Popper=function(){function e(t,n){var i=this,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};classCallCheck(this,e),this.scheduleUpdate=function(){return requestAnimationFrame(i.update)},this.update=debounce$1$1(this.update.bind(this)),this.options=_extends$2({},e.Defaults,o),this.state={isDestroyed:!1,isCreated:!1,scrollParents:[]},this.reference=t&&t.jquery?t[0]:t,this.popper=n&&n.jquery?n[0]:n,this.options.modifiers={},Object.keys(_extends$2({},e.Defaults.modifiers,o.modifiers)).forEach((function(t){i.options.modifiers[t]=_extends$2({},e.Defaults.modifiers[t]||{},o.modifiers?o.modifiers[t]:{})})),this.modifiers=Object.keys(this.options.modifiers).map((function(e){return _extends$2({name:e},i.options.modifiers[e])})).sort((function(e,t){return e.order-t.order})),this.modifiers.forEach((function(e){e.enabled&&isFunction$1$1(e.onLoad)&&e.onLoad(i.reference,i.popper,i.options,e,i.state)})),this.update();var a=this.options.eventsEnabled;a&&this.enableEventListeners(),this.state.eventsEnabled=a}return createClass(e,[{key:"update",value:function(){return update.call(this)}},{key:"destroy",value:function(){return destroy.call(this)}},{key:"enableEventListeners",value:function(){return enableEventListeners.call(this)}},{key:"disableEventListeners",value:function(){return disableEventListeners.call(this)}}]),e}();Popper.Utils=("undefined"!=typeof window?window:global).PopperUtils,Popper.placements=placements$1,Popper.Defaults=Defaults;
33
32
  /**!
34
33
  * tippy.js v5.0.0-alpha.2
35
34
  * (c) 2017-2019 atomiks
36
35
  * MIT License
37
36
  */
38
- var version="5.0.0-alpha.2",idCounter$1=1,mouseMoveListeners$1=[];function createTippy$1(e,t){var n,i,o,a,r=evaluateProps$1(e,t);if(!r.multiple&&e._tippy)return null;var s,c,l,d=!1,p=!1,u=!1,h=[],g=debounce$2(D,r.interactiveDebounce),f=idCounter$1++,m=createPopperElement(f,r),_=getChildren$1(m),v=_.tooltip,b=_.content,y={currentPlacement:r.placement,isScheduledToShow:!1,isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},x={id:f,reference:e,popper:m,popperChildren:_,popperInstance:null,props:r,state:y,clearDelayTimeouts:function(){clearTimeout(i),clearTimeout(o),cancelAnimationFrame(a)},setProps:function(t){if(x.state.isDestroyed)return;N();var n=x.props,i=evaluateProps$1(e,_extends$1({},x.props,t,{ignoreAttributes:!0}));i.ignoreAttributes=hasOwnProperty(t,"ignoreAttributes")?t.ignoreAttributes||!1:n.ignoreAttributes,x.props=i,L(),S(),g=debounce$2(D,i.interactiveDebounce),updatePopperElement(m,n,i,x.state.isVisible),x.popperChildren=getChildren$1(m),x.popperInstance&&(POPPER_INSTANCE_DEPENDENCIES.some((function(e){return hasOwnProperty(t,e)&&t[e]!==n[e]}))?(x.popperInstance.destroy(),R(),x.state.isVisible&&x.popperInstance.enableEventListeners()):x.popperInstance.update())},setContent:function(e){x.setProps({content:e})},show:function(t,n){void 0===t&&(t=getValue(x.props.duration,0,defaultProps$1.duration[1]));void 0===n&&(n=!0);var i=x.state.isVisible,o=x.state.isDestroyed,a=!x.state.isEnabled,r=currentInput$1.isTouch&&!x.props.touch;if(i||o||a||r)return;if(k().hasAttribute("disabled"))return;if(!1===x.props.onShow(x))return;A(),m.style.visibility="visible",x.state.isVisible=!0;var s=E();setTransitionDuration$1(n?s.concat(m):s,0),c=function(){x.state.isVisible&&(x.popperInstance.update(),x.props.onMount(x),x.state.isMounted=!0,b.style.transitionDelay=x.popperChildren.backdrop?Math.round(t/12)+"ms":"",x.props.sticky&&(setTransitionDuration$1([m],isIE?0:x.props.updateDuration),function e(){x.popperInstance.scheduleUpdate(),x.state.isMounted?requestAnimationFrame(e):setTransitionDuration$1([m],0)}()),setTransitionDuration$1([m],x.props.updateDuration),setTransitionDuration$1(s,t),setVisibilityState$1(s,"visible"),function(e,t){P(e,t)}(t,(function(){x.props.aria&&k().setAttribute("aria-"+x.props.aria,v.id),x.props.onShown(x),x.state.isShown=!0})))},function(){p=!1;var t=x.props.appendTo,n="parent"===t?e.parentNode:invokeWithArgsOrReturn$1(t,[e]);n.contains(m)||n.appendChild(m);x.popperInstance?(setFlipModifierEnabled(x.popperInstance.modifiers,x.props.flip),x.popperInstance.enableEventListeners(),x.popperInstance.scheduleUpdate()):(R(),x.popperInstance.enableEventListeners())}()},hide:function(e){void 0===e&&(e=getValue(x.props.duration,1,defaultProps$1.duration[1]));var t=!x.state.isVisible&&!d,n=x.state.isDestroyed,i=!x.state.isEnabled&&!d;if(t||n||i)return;if(!1===x.props.onHide(x)&&!d)return;I(),m.style.visibility="hidden",x.state.isVisible=!1,x.state.isShown=!1;var o=E();setTransitionDuration$1(o,e),setVisibilityState$1(o,"hidden"),function(e,t){P(e,(function(){!x.state.isVisible&&m.parentNode&&m.parentNode.contains(m)&&t()}))}(e,(function(){x.props.aria&&k().removeAttribute("aria-"+x.props.aria),x.popperInstance.disableEventListeners(),x.popperInstance.options.placement=s,m.parentNode.removeChild(m),x.props.onHidden(x),x.state.isMounted=!1}))},enable:function(){x.state.isEnabled=!0},disable:function(){x.state.isEnabled=!1},destroy:function(){if(x.state.isDestroyed)return;d=!0,x.hide(0),N(),delete e._tippy,x.popperInstance&&x.popperInstance.destroy();d=!1,x.state.isDestroyed=!0}};return e._tippy=x,m._tippy=x,L(),r.lazy||R(),r.showOnCreate&&H(),m.addEventListener("mouseenter",(function(){x.props.interactive&&x.state.isVisible&&"mouseenter"===n&&x.clearDelayTimeouts()})),m.addEventListener("mouseleave",(function(){x.props.interactive&&"mouseenter"===n&&document.addEventListener("mousemove",g)})),r.onCreate(x),x;function w(){var e=x.props.touch;return Array.isArray(e)?e:[e,0]}function C(){return"hold"===w()[0]}function E(){return[v,b,x.popperChildren.backdrop]}function k(){return x.props.triggerTarget||e}function S(){document.body.removeEventListener("mouseleave",q),document.removeEventListener("mousemove",g),mouseMoveListeners$1=mouseMoveListeners$1.filter((function(e){return e!==g}))}function T(e){if(!x.props.interactive||!m.contains(e.target)){if(k().contains(e.target)){if(currentInput$1.isTouch)return;if(x.state.isVisible&&includes(x.props.trigger,"click"))return}!0===x.props.hideOnClick&&(x.clearDelayTimeouts(),x.hide(),u=!0,setTimeout((function(){u=!1})),x.state.isMounted||I())}}function A(){document.addEventListener("mousedown",T,!0)}function I(){document.removeEventListener("mousedown",T,!0)}function P(e,t){function n(e){e.target===v&&(updateTransitionEndListener$1(v,"remove",n),t())}if(0===e)return t();updateTransitionEndListener$1(v,"remove",l),updateTransitionEndListener$1(v,"add",n),l=n}function O(e,t,n){void 0===n&&(n=!1),k().addEventListener(e,t,n),h.push({eventType:e,handler:t,options:n})}function L(){C()&&(O("touchstart",B,PASSIVE),O("touchend",M,PASSIVE)),includes(x.props.trigger,"click")||O("click",(function(){currentInput$1.isTouch||!0!==x.props.hideOnClick||x.hide()})),x.props.trigger.trim().split(" ").forEach((function(e){if("manual"!==e)switch(O(e,B),e){case"mouseenter":O("mouseleave",M);break;case"focus":O(isIE?"focusout":"blur",F)}}))}function N(){h.forEach((function(e){var t=e.eventType,n=e.handler,i=e.options;k().removeEventListener(t,n,i)})),h=[]}function B(e){if(!u&&x.state.isEnabled&&!$(e))if(x.state.isVisible||(n=e.type,e instanceof MouseEvent&&mouseMoveListeners$1.forEach((function(t){return t(e)}))),"click"===e.type&&!1!==x.props.hideOnClick&&x.state.isVisible)q(e);else{var t=w(),o=t[0],a=t[1];currentInput$1.isTouch&&"hold"===o&&a?i=setTimeout((function(){H(e)}),a):H(e)}}function D(t){closestCallback(t.target,(function(t){return t===e||t===m}))||isCursorOutsideInteractiveBorder$1(getBasePlacement$2(x.state.currentPlacement),m.getBoundingClientRect(),t,x.props)&&(S(),q(t))}function M(e){if(!$(e))return x.props.interactive?(document.body.addEventListener("mouseleave",q),document.addEventListener("mousemove",g),void mouseMoveListeners$1.push(g)):void q(e)}function F(e){e.target===k()&&(x.props.interactive&&e.relatedTarget&&m.contains(e.relatedTarget)||q(e))}function $(e){var t="ontouchstart"in window,n=includes(e.type,"touch"),i=C();return t&&currentInput$1.isTouch&&i&&!n||currentInput$1.isTouch&&!i&&n}function R(){var t=x.props,n=t.popperOptions,i=t.placement,o=x.popperChildren.arrow,a=getModifier(n,"preventOverflow"),r=x.state.currentPlacement.split("-")[1];function c(e){x.state.currentPlacement=e.placement,x.props.flip&&!x.props.flipOnUpdate&&(e.flipped&&(x.popperInstance.options.placement=e.placement),setFlipModifierEnabled(x.popperInstance.modifiers,!1)),x.props.escapeWithReference&&setEscapeWithReference(x.popperInstance.modifiers,!0),v.setAttribute("data-placement",x.state.currentPlacement),!1!==e.attributes["x-out-of-boundaries"]?v.setAttribute("data-out-of-boundaries",""):v.removeAttribute("data-out-of-boundaries");var t=getBasePlacement$2(x.state.currentPlacement),n=v.style;n.top="0",n.left="0",n[includes(["top","bottom"],getBasePlacement$2(x.state.currentPlacement))?"top":"left"]=(includes(["bottom","right"],getBasePlacement$2(x.state.currentPlacement))?1:-1)*x.props.distance+"px";var i=a&&void 0!==a.padding?a.padding:PREVENT_OVERFLOW_PADDING,o="number"==typeof i,r=_extends$1({top:o?i:i.top,bottom:o?i:i.bottom,left:o?i:i.left,right:o?i:i.right},!o&&i);r[t]=o?i+x.props.distance:(i[t]||0)+x.props.distance,x.popperInstance.modifiers.filter((function(e){return"preventOverflow"===e.name}))[0].padding=r}var l=_extends$1({eventsEnabled:!1,placement:s=x.props.followCursor&&r?i.replace(r,"start"===r?"end":"start"):i},n,{modifiers:_extends$1({},n?n.modifiers:{},{preventOverflow:_extends$1({boundariesElement:x.props.boundary,padding:PREVENT_OVERFLOW_PADDING},a),arrow:_extends$1({element:o,enabled:!!o},getModifier(n,"arrow")),flip:_extends$1({enabled:x.props.flip,padding:x.props.distance+PREVENT_OVERFLOW_PADDING,behavior:x.props.flipBehavior},getModifier(n,"flip")),offset:_extends$1({offset:x.props.offset},getModifier(n,"offset"))}),onCreate:function(e){c(e),preserveInvocation(n&&n.onCreate,l.onCreate,[e]),V()},onUpdate:function(e){c(e),preserveInvocation(n&&n.onUpdate,l.onUpdate,[e]),V()}});x.popperInstance=new Popper(e,m,l)}function V(){!p&&c&&(p=!0,reflow(m),c())}function H(e){if(x.clearDelayTimeouts(),x.state.isScheduledToShow=!0,x.popperInstance||R(),e&&x.props.onTrigger(x,e),x.props.wait)return x.props.wait(x,e);A();var t=getValue(x.props.delay,0,defaultProps$1.delay);t?i=setTimeout((function(){x.show()}),t):x.show()}function q(e){if(x.clearDelayTimeouts(),x.props.onUntrigger(x,e),x.state.isVisible){x.state.isScheduledToShow=!1;var t=getValue(x.props.delay,1,defaultProps$1.delay);t?o=setTimeout((function(){x.state.isVisible&&x.hide()}),t):a=requestAnimationFrame((function(){x.hide()}))}else I()}}function tippy$1(e,t){bindGlobalEventListeners$1();var n=_extends$1({},defaultProps$1,t),i=getArrayOfElements$1(e).reduce((function(e,t){var i=t&&createTippy$1(t,n);return i&&e.push(i),e}),[]);return isRealElement(e)?i[0]:i}function autoInit(){arrayFrom$1(document.querySelectorAll("[data-tippy]")).forEach((function(e){var t=e.getAttribute("data-tippy");t&&tippy$1(e,{content:t})}))}tippy$1.version=version,tippy$1.defaultProps=defaultProps$1,tippy$1.currentInput=currentInput$1,tippy$1.setDefaultProps=function(e){Object.keys(e).forEach((function(t){defaultProps$1[t]=e[t]}))},tippy$1.hideAll=function(e){var t=void 0===e?{}:e,n=t.exclude,i=t.duration;arrayFrom$1(document.querySelectorAll(POPPER_SELECTOR)).forEach((function(e){var t=e._tippy;if(t){var o=!1;n&&(o=isReferenceElement$1(n)?t.reference===n:e===n.popper),o||t.hide(i)}}))},isBrowser$1&&setTimeout(autoInit)
37
+ var version="5.0.0-alpha.2",idCounter$1=1,mouseMoveListeners$1=[];function createTippy$1(e,t){var n,i,o,a,r=evaluateProps$1(e,t);if(!r.multiple&&e._tippy)return null;var s,l,c,d=!1,p=!1,u=!1,h=[],g=debounce$2(B,r.interactiveDebounce),f=idCounter$1++,m=createPopperElement(f,r),_=getChildren$1(m),v=_.tooltip,b=_.content,y={currentPlacement:r.placement,isScheduledToShow:!1,isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},x={id:f,reference:e,popper:m,popperChildren:_,popperInstance:null,props:r,state:y,clearDelayTimeouts:function(){clearTimeout(i),clearTimeout(o),cancelAnimationFrame(a)},setProps:function(t){if(x.state.isDestroyed)return;N();var n=x.props,i=evaluateProps$1(e,_extends$1({},x.props,t,{ignoreAttributes:!0}));i.ignoreAttributes=hasOwnProperty(t,"ignoreAttributes")?t.ignoreAttributes||!1:n.ignoreAttributes,x.props=i,L(),S(),g=debounce$2(B,i.interactiveDebounce),updatePopperElement(m,n,i,x.state.isVisible),x.popperChildren=getChildren$1(m),x.popperInstance&&(POPPER_INSTANCE_DEPENDENCIES.some((function(e){return hasOwnProperty(t,e)&&t[e]!==n[e]}))?(x.popperInstance.destroy(),R(),x.state.isVisible&&x.popperInstance.enableEventListeners()):x.popperInstance.update())},setContent:function(e){x.setProps({content:e})},show:function(t,n){void 0===t&&(t=getValue(x.props.duration,0,defaultProps$1.duration[1]));void 0===n&&(n=!0);var i=x.state.isVisible,o=x.state.isDestroyed,a=!x.state.isEnabled,r=currentInput$1.isTouch&&!x.props.touch;if(i||o||a||r)return;if(k().hasAttribute("disabled"))return;if(!1===x.props.onShow(x))return;A(),m.style.visibility="visible",x.state.isVisible=!0;var s=E();setTransitionDuration$1(n?s.concat(m):s,0),l=function(){x.state.isVisible&&(x.popperInstance.update(),x.props.onMount(x),x.state.isMounted=!0,b.style.transitionDelay=x.popperChildren.backdrop?Math.round(t/12)+"ms":"",x.props.sticky&&(setTransitionDuration$1([m],isIE?0:x.props.updateDuration),function e(){x.popperInstance.scheduleUpdate(),x.state.isMounted?requestAnimationFrame(e):setTransitionDuration$1([m],0)}()),setTransitionDuration$1([m],x.props.updateDuration),setTransitionDuration$1(s,t),setVisibilityState$1(s,"visible"),function(e,t){P(e,t)}(t,(function(){x.props.aria&&k().setAttribute("aria-"+x.props.aria,v.id),x.props.onShown(x),x.state.isShown=!0})))},function(){p=!1;var t=x.props.appendTo,n="parent"===t?e.parentNode:invokeWithArgsOrReturn$1(t,[e]);n.contains(m)||n.appendChild(m);x.popperInstance?(setFlipModifierEnabled(x.popperInstance.modifiers,x.props.flip),x.popperInstance.enableEventListeners(),x.popperInstance.scheduleUpdate()):(R(),x.popperInstance.enableEventListeners())}()},hide:function(e){void 0===e&&(e=getValue(x.props.duration,1,defaultProps$1.duration[1]));var t=!x.state.isVisible&&!d,n=x.state.isDestroyed,i=!x.state.isEnabled&&!d;if(t||n||i)return;if(!1===x.props.onHide(x)&&!d)return;I(),m.style.visibility="hidden",x.state.isVisible=!1,x.state.isShown=!1;var o=E();setTransitionDuration$1(o,e),setVisibilityState$1(o,"hidden"),function(e,t){P(e,(function(){!x.state.isVisible&&m.parentNode&&m.parentNode.contains(m)&&t()}))}(e,(function(){x.props.aria&&k().removeAttribute("aria-"+x.props.aria),x.popperInstance.disableEventListeners(),x.popperInstance.options.placement=s,m.parentNode.removeChild(m),x.props.onHidden(x),x.state.isMounted=!1}))},enable:function(){x.state.isEnabled=!0},disable:function(){x.state.isEnabled=!1},destroy:function(){if(x.state.isDestroyed)return;d=!0,x.hide(0),N(),delete e._tippy,x.popperInstance&&x.popperInstance.destroy();d=!1,x.state.isDestroyed=!0}};return e._tippy=x,m._tippy=x,L(),r.lazy||R(),r.showOnCreate&&V(),m.addEventListener("mouseenter",(function(){x.props.interactive&&x.state.isVisible&&"mouseenter"===n&&x.clearDelayTimeouts()})),m.addEventListener("mouseleave",(function(){x.props.interactive&&"mouseenter"===n&&document.addEventListener("mousemove",g)})),r.onCreate(x),x;function w(){var e=x.props.touch;return Array.isArray(e)?e:[e,0]}function C(){return"hold"===w()[0]}function E(){return[v,b,x.popperChildren.backdrop]}function k(){return x.props.triggerTarget||e}function S(){document.body.removeEventListener("mouseleave",q),document.removeEventListener("mousemove",g),mouseMoveListeners$1=mouseMoveListeners$1.filter((function(e){return e!==g}))}function T(e){if(!x.props.interactive||!m.contains(e.target)){if(k().contains(e.target)){if(currentInput$1.isTouch)return;if(x.state.isVisible&&includes(x.props.trigger,"click"))return}!0===x.props.hideOnClick&&(x.clearDelayTimeouts(),x.hide(),u=!0,setTimeout((function(){u=!1})),x.state.isMounted||I())}}function A(){document.addEventListener("mousedown",T,!0)}function I(){document.removeEventListener("mousedown",T,!0)}function P(e,t){function n(e){e.target===v&&(updateTransitionEndListener$1(v,"remove",n),t())}if(0===e)return t();updateTransitionEndListener$1(v,"remove",c),updateTransitionEndListener$1(v,"add",n),c=n}function O(e,t,n){void 0===n&&(n=!1),k().addEventListener(e,t,n),h.push({eventType:e,handler:t,options:n})}function L(){C()&&(O("touchstart",D,PASSIVE),O("touchend",M,PASSIVE)),includes(x.props.trigger,"click")||O("click",(function(){currentInput$1.isTouch||!0!==x.props.hideOnClick||x.hide()})),x.props.trigger.trim().split(" ").forEach((function(e){if("manual"!==e)switch(O(e,D),e){case"mouseenter":O("mouseleave",M);break;case"focus":O(isIE?"focusout":"blur",F)}}))}function N(){h.forEach((function(e){var t=e.eventType,n=e.handler,i=e.options;k().removeEventListener(t,n,i)})),h=[]}function D(e){if(!u&&x.state.isEnabled&&!$(e))if(x.state.isVisible||(n=e.type,e instanceof MouseEvent&&mouseMoveListeners$1.forEach((function(t){return t(e)}))),"click"===e.type&&!1!==x.props.hideOnClick&&x.state.isVisible)q(e);else{var t=w(),o=t[0],a=t[1];currentInput$1.isTouch&&"hold"===o&&a?i=setTimeout((function(){V(e)}),a):V(e)}}function B(t){closestCallback(t.target,(function(t){return t===e||t===m}))||isCursorOutsideInteractiveBorder$1(getBasePlacement$2(x.state.currentPlacement),m.getBoundingClientRect(),t,x.props)&&(S(),q(t))}function M(e){if(!$(e))return x.props.interactive?(document.body.addEventListener("mouseleave",q),document.addEventListener("mousemove",g),void mouseMoveListeners$1.push(g)):void q(e)}function F(e){e.target===k()&&(x.props.interactive&&e.relatedTarget&&m.contains(e.relatedTarget)||q(e))}function $(e){var t="ontouchstart"in window,n=includes(e.type,"touch"),i=C();return t&&currentInput$1.isTouch&&i&&!n||currentInput$1.isTouch&&!i&&n}function R(){var t=x.props,n=t.popperOptions,i=t.placement,o=x.popperChildren.arrow,a=getModifier(n,"preventOverflow"),r=x.state.currentPlacement.split("-")[1];function l(e){x.state.currentPlacement=e.placement,x.props.flip&&!x.props.flipOnUpdate&&(e.flipped&&(x.popperInstance.options.placement=e.placement),setFlipModifierEnabled(x.popperInstance.modifiers,!1)),x.props.escapeWithReference&&setEscapeWithReference(x.popperInstance.modifiers,!0),v.setAttribute("data-placement",x.state.currentPlacement),!1!==e.attributes["x-out-of-boundaries"]?v.setAttribute("data-out-of-boundaries",""):v.removeAttribute("data-out-of-boundaries");var t=getBasePlacement$2(x.state.currentPlacement),n=v.style;n.top="0",n.left="0",n[includes(["top","bottom"],getBasePlacement$2(x.state.currentPlacement))?"top":"left"]=(includes(["bottom","right"],getBasePlacement$2(x.state.currentPlacement))?1:-1)*x.props.distance+"px";var i=a&&void 0!==a.padding?a.padding:PREVENT_OVERFLOW_PADDING,o="number"==typeof i,r=_extends$1({top:o?i:i.top,bottom:o?i:i.bottom,left:o?i:i.left,right:o?i:i.right},!o&&i);r[t]=o?i+x.props.distance:(i[t]||0)+x.props.distance,x.popperInstance.modifiers.filter((function(e){return"preventOverflow"===e.name}))[0].padding=r}var c=_extends$1({eventsEnabled:!1,placement:s=x.props.followCursor&&r?i.replace(r,"start"===r?"end":"start"):i},n,{modifiers:_extends$1({},n?n.modifiers:{},{preventOverflow:_extends$1({boundariesElement:x.props.boundary,padding:PREVENT_OVERFLOW_PADDING},a),arrow:_extends$1({element:o,enabled:!!o},getModifier(n,"arrow")),flip:_extends$1({enabled:x.props.flip,padding:x.props.distance+PREVENT_OVERFLOW_PADDING,behavior:x.props.flipBehavior},getModifier(n,"flip")),offset:_extends$1({offset:x.props.offset},getModifier(n,"offset"))}),onCreate:function(e){l(e),preserveInvocation(n&&n.onCreate,c.onCreate,[e]),H()},onUpdate:function(e){l(e),preserveInvocation(n&&n.onUpdate,c.onUpdate,[e]),H()}});x.popperInstance=new Popper(e,m,c)}function H(){!p&&l&&(p=!0,reflow(m),l())}function V(e){if(x.clearDelayTimeouts(),x.state.isScheduledToShow=!0,x.popperInstance||R(),e&&x.props.onTrigger(x,e),x.props.wait)return x.props.wait(x,e);A();var t=getValue(x.props.delay,0,defaultProps$1.delay);t?i=setTimeout((function(){x.show()}),t):x.show()}function q(e){if(x.clearDelayTimeouts(),x.props.onUntrigger(x,e),x.state.isVisible){x.state.isScheduledToShow=!1;var t=getValue(x.props.delay,1,defaultProps$1.delay);t?o=setTimeout((function(){x.state.isVisible&&x.hide()}),t):a=requestAnimationFrame((function(){x.hide()}))}else I()}}function tippy$1(e,t){bindGlobalEventListeners$1();var n=_extends$1({},defaultProps$1,t),i=getArrayOfElements$1(e).reduce((function(e,t){var i=t&&createTippy$1(t,n);return i&&e.push(i),e}),[]);return isRealElement(e)?i[0]:i}function autoInit(){arrayFrom$1(document.querySelectorAll("[data-tippy]")).forEach((function(e){var t=e.getAttribute("data-tippy");t&&tippy$1(e,{content:t})}))}tippy$1.version=version,tippy$1.defaultProps=defaultProps$1,tippy$1.currentInput=currentInput$1,tippy$1.setDefaultProps=function(e){Object.keys(e).forEach((function(t){defaultProps$1[t]=e[t]}))},tippy$1.hideAll=function(e){var t=void 0===e?{}:e,n=t.exclude,i=t.duration;arrayFrom$1(document.querySelectorAll(POPPER_SELECTOR)).forEach((function(e){var t=e._tippy;if(t){var o=!1;n&&(o=isReferenceElement$1(n)?t.reference===n:e===n.popper),o||t.hide(i)}}))},isBrowser$1&&setTimeout(autoInit)
39
38
  /**!
40
39
  * tippy.js v5.0.0-alpha.2
41
40
  * (c) 2017-2019 atomiks
42
41
  * MIT License
43
- */;var css=".tippy-tooltip[data-animation=fade][data-state=hidden]{opacity:0}.tippy-iOS{cursor:pointer!important;-webkit-tap-highlight-color:transparent}.tippy-popper{pointer-events:none;max-width:calc(100% - 8px);transition-timing-function:cubic-bezier(.165,.84,.44,1)}.tippy-tooltip{position:relative;color:#fff;border-radius:.25rem;font-size:.875rem;line-height:1.4;background-color:#333;overflow:hidden;transition-property:visibility,opacity,transform;outline:0}.tippy-tooltip[data-placement^=top] .tippy-arrow{border-width:8px 8px 0;border-top-color:#333;margin:0 3px;transform-origin:50% 0;bottom:-8px}.tippy-tooltip[data-placement^=bottom] .tippy-arrow{border-width:0 8px 8px;border-bottom-color:#333;margin:0 3px;transform-origin:50% 7px;top:-8px}.tippy-tooltip[data-placement^=left] .tippy-arrow{border-width:8px 0 8px 8px;border-left-color:#333;margin:3px 0;transform-origin:0 50%;right:-8px}.tippy-tooltip[data-placement^=right] .tippy-arrow{border-width:8px 8px 8px 0;border-right-color:#333;margin:3px 0;transform-origin:7px 50%;left:-8px}.tippy-tooltip[data-arrow]{overflow:visible}.tippy-tooltip[data-animatefill]{background-color:transparent!important}.tippy-tooltip[data-interactive]{pointer-events:auto}.tippy-tooltip[data-inertia][data-state=visible]{transition-timing-function:cubic-bezier(.54,1.5,.38,1.11)}.tippy-tooltip[data-inertia][data-state=hidden]{transition-timing-function:ease}.tippy-arrow{border-color:transparent;border-style:solid;position:absolute}.tippy-arrow[data-state=hidden]{opacity:0}.tippy-content{padding:.3125rem .5625rem}";function injectCSS(e){if(isBrowser$1){var t=document.createElement("style");t.textContent=e,t.setAttribute("data-tippy-stylesheet","");var n=document.head,i=n.querySelector("style,link");i?n.insertBefore(t,i):n.appendChild(t)}}injectCSS(css);var missingTippy="Using the attachment feature of Shepherd requires the Tippy.js library",addShepherdClass=_createClassModifier("shepherd"),addHasTitleClass=_createClassModifier("shepherd-has-title"),centeredStylePopperModifier={computeStyle:{enabled:!0,fn:function(e){return e.styles=_extends({},e.styles,{left:"50%",top:"50%",transform:"translate(-50%, -50%)"}),e}},addShepherdClass:addShepherdClass},defaultPopperOptions={positionFixed:!0,modifiers:{addShepherdClass:addShepherdClass}};function createFromHTML(e){var t=document.createElement("div");return t.innerHTML=e,t.children[0]}function debounce$2$1(e,t,n){var i;return function(){var o=this,a=arguments,r=function(){i=null,n||e.apply(o,a)},s=n&&!i;clearTimeout(i),i=setTimeout(r,t),s&&e.apply(o,a)}}function drop(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return Array.isArray(e)?e.slice(t):[]}function setupTooltip(){if(isUndefined$1(tippy$1))throw new Error(missingTippy);this.tooltip&&this.tooltip.destroy();var e=this.parseAttachTo();this.tooltip=_makeTippyInstance.call(this,e),this.target=e.element||document.body,this.el.classList.add("shepherd-element")}function parseAttachTo(){var e=this.options.attachTo||{},t=_extends({},e);if(isString$1(e.element)){try{t.element=document.querySelector(e.element)}catch(e){}t.element||console.error("The element for this Shepherd step was not found ".concat(e.element))}return t}function _createClassModifier(e){return{enabled:!0,fn:function(t){return t.instance.popper.classList.add(e),t}}}function _makeTippyInstance(e){if(!e.element)return _makeCenteredTippy.call(this);var t=_makeAttachedTippyOptions.call(this,e);return tippy$1(e.element,t)}function _makeAttachedTippyOptions(e){var t={content:this.el,flipOnUpdate:!0,placement:e.on||"right"};return _extends(t,this.options.tippyOptions),this.options.title&&_extends(defaultPopperOptions.modifiers,{addHasTitleClass:addHasTitleClass}),this.options.tippyOptions&&this.options.tippyOptions.popperOptions&&_extends(defaultPopperOptions,this.options.tippyOptions.popperOptions),t.popperOptions=defaultPopperOptions,t}function _makeCenteredTippy(){var e=_objectSpread2({content:this.el,placement:"top"},this.options.tippyOptions);e.arrow=!1,e.popperOptions=e.popperOptions||{},this.options.title&&_extends(defaultPopperOptions.modifiers,{addHasTitleClass:addHasTitleClass});var t=_extends({},defaultPopperOptions,e.popperOptions,{modifiers:_extends(centeredStylePopperModifier,e.popperOptions.modifiers)});return e.popperOptions=t,tippy$1(document.body,e)}var Evented=function(){function e(){_classCallCheck(this,e)}return _createClass(e,[{key:"on",value:function(e,t,n){var i=!(arguments.length<=3||void 0===arguments[3])&&arguments[3];isUndefined$1(this.bindings)&&(this.bindings={}),isUndefined$1(this.bindings[e])&&(this.bindings[e]=[]),this.bindings[e].push({handler:t,ctx:n,once:i})}},{key:"once",value:function(e,t,n){this.on(e,t,n,!0)}},{key:"off",value:function(e,t){var n=this;if(isUndefined$1(this.bindings)||isUndefined$1(this.bindings[e]))return!1;isUndefined$1(t)?delete this.bindings[e]:this.bindings[e].forEach((function(i,o){i.handler===t&&n.bindings[e].splice(o,1)}))}},{key:"trigger",value:function(e){var t=this;if(!isUndefined$1(this.bindings)&&this.bindings[e]){var n=drop(Array.prototype.slice.call(arguments));this.bindings[e].forEach((function(i,o){var a=i.ctx,r=i.handler,s=i.once,c=a||t;r.apply(c,n),s&&t.bindings[e].splice(o,1)}))}}}]),e}();function _setupAdvanceOnHandler(e){var t=this;return function(n){if(t.isOpen()){var i=t.el&&n.target===t.el;(!isUndefined$1(e)&&n.target.matches(e)||i)&&t.tour.next()}}}function bindAdvance(){var e=this.options.advanceOn||{},t=e.event,n=e.selector;if(!t)return console.error("advanceOn was defined, but no event name was passed.");var i,o=_setupAdvanceOnHandler.call(this,n);try{i=document.querySelector(n)}catch(e){}if(!isUndefined$1(n)&&!i)return console.error("No element was found for the selector supplied to advanceOn: ".concat(n));i?(i.addEventListener(t,o),this.on("destroy",(function(){return i.removeEventListener(t,o)}))):(document.body.addEventListener(t,o,!0),this.on("destroy",(function(){return document.body.removeEventListener(t,o,!0)})))}function bindButtonEvents(e,t){var n=this;e.events=e.events||{},isUndefined$1(e.action)||(e.events.click=e.action),e.events&&Object.entries(e.events).forEach((function(e){var i=_slicedToArray(e,2),o=i[0],a=i[1];if(isString$1(a)){var r=a;a=function(){return n.tour.show(r)}}t.dataset.buttonEvent=!0,t.addEventListener(o,a),n.on("destroy",(function(){t.removeAttribute("data-button-event"),t.removeEventListener(o,a)}))}))}function bindCancelLink(e){var t=this;e.addEventListener("click",(function(e){e.preventDefault(),t.cancel()}))}function bindMethods(e){var t=this;e.map((function(e){t[e]=t[e].bind(t)}))}function createCommonjsModule(e,t){return e(t={exports:{}},t.exports),t.exports}Element.prototype.matches||(Element.prototype.matches=Element.prototype.matchesSelector||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector);var smoothscroll=createCommonjsModule((function(e,t){e.exports={polyfill:function(){var e=window,t=document;if(!("scrollBehavior"in t.documentElement.style)||!0===e.__forceSmoothScrollPolyfill__){var n,i=e.HTMLElement||e.Element,o={scroll:e.scroll||e.scrollTo,scrollBy:e.scrollBy,elementScroll:i.prototype.scroll||s,scrollIntoView:i.prototype.scrollIntoView},a=e.performance&&e.performance.now?e.performance.now.bind(e.performance):Date.now,r=(n=e.navigator.userAgent,new RegExp(["MSIE ","Trident/","Edge/"].join("|")).test(n)?1:0);e.scroll=e.scrollTo=function(){void 0!==arguments[0]&&(!0!==c(arguments[0])?g.call(e,t.body,void 0!==arguments[0].left?~~arguments[0].left:e.scrollX||e.pageXOffset,void 0!==arguments[0].top?~~arguments[0].top:e.scrollY||e.pageYOffset):o.scroll.call(e,void 0!==arguments[0].left?arguments[0].left:"object"!==_typeof$1(arguments[0])?arguments[0]:e.scrollX||e.pageXOffset,void 0!==arguments[0].top?arguments[0].top:void 0!==arguments[1]?arguments[1]:e.scrollY||e.pageYOffset))},e.scrollBy=function(){void 0!==arguments[0]&&(c(arguments[0])?o.scrollBy.call(e,void 0!==arguments[0].left?arguments[0].left:"object"!==_typeof$1(arguments[0])?arguments[0]:0,void 0!==arguments[0].top?arguments[0].top:void 0!==arguments[1]?arguments[1]:0):g.call(e,t.body,~~arguments[0].left+(e.scrollX||e.pageXOffset),~~arguments[0].top+(e.scrollY||e.pageYOffset)))},i.prototype.scroll=i.prototype.scrollTo=function(){if(void 0!==arguments[0])if(!0!==c(arguments[0])){var e=arguments[0].left,t=arguments[0].top;g.call(this,this,void 0===e?this.scrollLeft:~~e,void 0===t?this.scrollTop:~~t)}else{if("number"==typeof arguments[0]&&void 0===arguments[1])throw new SyntaxError("Value could not be converted");o.elementScroll.call(this,void 0!==arguments[0].left?~~arguments[0].left:"object"!==_typeof$1(arguments[0])?~~arguments[0]:this.scrollLeft,void 0!==arguments[0].top?~~arguments[0].top:void 0!==arguments[1]?~~arguments[1]:this.scrollTop)}},i.prototype.scrollBy=function(){void 0!==arguments[0]&&(!0!==c(arguments[0])?this.scroll({left:~~arguments[0].left+this.scrollLeft,top:~~arguments[0].top+this.scrollTop,behavior:arguments[0].behavior}):o.elementScroll.call(this,void 0!==arguments[0].left?~~arguments[0].left+this.scrollLeft:~~arguments[0]+this.scrollLeft,void 0!==arguments[0].top?~~arguments[0].top+this.scrollTop:~~arguments[1]+this.scrollTop))},i.prototype.scrollIntoView=function(){if(!0!==c(arguments[0])){var n=u(this),i=n.getBoundingClientRect(),a=this.getBoundingClientRect();n!==t.body?(g.call(this,n,n.scrollLeft+a.left-i.left,n.scrollTop+a.top-i.top),"fixed"!==e.getComputedStyle(n).position&&e.scrollBy({left:i.left,top:i.top,behavior:"smooth"})):e.scrollBy({left:a.left,top:a.top,behavior:"smooth"})}else o.scrollIntoView.call(this,void 0===arguments[0]||arguments[0])}}function s(e,t){this.scrollLeft=e,this.scrollTop=t}function c(e){if(null===e||"object"!==_typeof$1(e)||void 0===e.behavior||"auto"===e.behavior||"instant"===e.behavior)return!0;if("object"===_typeof$1(e)&&"smooth"===e.behavior)return!1;throw new TypeError("behavior member of ScrollOptions "+e.behavior+" is not a valid value for enumeration ScrollBehavior.")}function l(e,t){return"Y"===t?e.clientHeight+r<e.scrollHeight:"X"===t?e.clientWidth+r<e.scrollWidth:void 0}function d(t,n){var i=e.getComputedStyle(t,null)["overflow"+n];return"auto"===i||"scroll"===i}function p(e){var t=l(e,"Y")&&d(e,"Y"),n=l(e,"X")&&d(e,"X");return t||n}function u(e){for(;e!==t.body&&!1===p(e);)e=e.parentNode||e.host;return e}function h(t){var n,i,o,r,s=(a()-t.startTime)/468;r=s=s>1?1:s,n=.5*(1-Math.cos(Math.PI*r)),i=t.startX+(t.x-t.startX)*n,o=t.startY+(t.y-t.startY)*n,t.method.call(t.scrollable,i,o),i===t.x&&o===t.y||e.requestAnimationFrame(h.bind(e,t))}function g(n,i,r){var c,l,d,p,u=a();n===t.body?(c=e,l=e.scrollX||e.pageXOffset,d=e.scrollY||e.pageYOffset,p=o.scroll):(c=n,l=n.scrollLeft,d=n.scrollTop,p=s),h({scrollable:c,method:p,startTime:u,startX:l,startY:d,x:i,y:r})}}}}));smoothscroll.polyfill,smoothscroll.polyfill();var uniqueId=(id=0,function(){return++id}),id,Step=function(e){function t(e,n){var i;return _classCallCheck(this,t),(i=_possibleConstructorReturn(this,_getPrototypeOf(t).call(this,e,n))).tour=e,bindMethods.call(_assertThisInitialized(i),["_show","cancel","complete","destroy","hide","isOpen","scrollTo","setupElements","show"]),i.setOptions(n),i.bindAdvance=bindAdvance.bind(_assertThisInitialized(i)),i.bindButtonEvents=bindButtonEvents.bind(_assertThisInitialized(i)),i.bindCancelLink=bindCancelLink.bind(_assertThisInitialized(i)),i.setupTooltip=setupTooltip.bind(_assertThisInitialized(i)),i.parseAttachTo=parseAttachTo.bind(_assertThisInitialized(i)),_possibleConstructorReturn(i,_assertThisInitialized(i))}return _inherits(t,e),_createClass(t,[{key:"_addButtons",value:function(e){var t=this;if(Array.isArray(this.options.buttons)&&this.options.buttons.length){var n=document.createElement("footer");n.classList.add("shepherd-footer"),this.options.buttons.map((function(e){var i=createFromHTML('<button class="shepherd-button '.concat(e.classes||"",'" tabindex="0">').concat(e.text,"</button>"));n.appendChild(i),t.bindButtonEvents(e,i)})),e.appendChild(n)}}},{key:"_addCancelLink",value:function(e,t){if(this.options.showCancelLink){var n=createFromHTML('<a href class="shepherd-cancel-link"></a>');t.appendChild(n),e.classList.add("shepherd-has-cancel-link"),this.bindCancelLink(n)}}},{key:"_addContent",value:function(e,t){var n=createFromHTML('<div class="shepherd-text"\n id="'.concat(t,'"\n ></div>')),i=this.options.text;isFunction$1(i)&&(i=i.call(this,n)),i instanceof HTMLElement?n.appendChild(i):(isString$1(i)&&(i=[i]),i.map((function(e){n.innerHTML+="<p>".concat(e,"</p>")}))),e.appendChild(n)}},{key:"_addKeyDownHandler",value:function(e){var t=this,n=e.querySelectorAll('a[href], area[href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), button:not([disabled]), [tabindex="0"]'),i=_slicedToArray(n,1)[0],o=n[n.length-1];e.addEventListener("keydown",(function(e){switch(e.keyCode){case 9:if(1===n.length){e.preventDefault();break}e.shiftKey?document.activeElement===i&&(e.preventDefault(),o.focus()):document.activeElement===o&&(e.preventDefault(),i.focus());break;case 27:t.cancel();break;case 37:t.tour.back();break;case 39:t.tour.next()}}))}},{key:"_createTooltipContent",value:function(){var e=document.createElement("div"),t=this.options.classes||"",n="".concat(this.id,"-description"),i="".concat(this.id,"-label"),o=createFromHTML('<div class="'.concat(t,'"\n data-shepherd-step-id="').concat(this.id,'"\n role="dialog"\n tabindex="0">')),a=document.createElement("header");if(this.options.title){var r=document.createElement("h3");r.classList.add("shepherd-title"),r.innerHTML="".concat(this.options.title),r.id=i,o.setAttribute("aria-labeledby",i),a.appendChild(r)}return e.classList.add("shepherd-content"),a.classList.add("shepherd-header"),o.appendChild(e),e.appendChild(a),isUndefined$1(this.options.text)||(this._addContent(e,n),o.setAttribute("aria-describedby",n)),this._addButtons(e),this._addCancelLink(o,a),o}},{key:"getTour",value:function(){return this.tour}},{key:"cancel",value:function(){this.tour.cancel(),this.trigger("cancel")}},{key:"complete",value:function(){this.tour.complete(),this.trigger("complete")}},{key:"destroy",value:function(){try{this.tooltip&&(this.tooltip.destroy(),this.tooltip=null),isElement$2(this.el)&&this.el.parentNode&&(this.el.parentNode.removeChild(this.el),this.el=null),this.target&&this._updateStepTargetOnHide(),this.trigger("destroy")}catch(e){}}},{key:"hide",value:function(){this.tour.modal.hide(),this.trigger("before-hide"),document.body.removeAttribute("data-shepherd-step"),this.target&&this._updateStepTargetOnHide(),this.tooltip&&this.tooltip.hide(),this.trigger("hide")}},{key:"isOpen",value:function(){return Boolean(this.tooltip&&this.tooltip.state&&this.tooltip.state.isVisible)}},{key:"setupElements",value:function(){isUndefined$1(this.el)||this.destroy(),this.el=this._createTooltipContent(),this._addKeyDownHandler(this.el),this.options.advanceOn&&this.bindAdvance(),this.setupTooltip()}},{key:"scrollTo",value:function(e){var t=this.parseAttachTo().element;isFunction$1(this.options.scrollToHandler)?this.options.scrollToHandler(t):isElement$2(t)&&t.scrollIntoView(e)}},{key:"setOptions",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.options=t;var n=this.options.when;this.destroy(),this.id=this.options.id||"step-".concat(uniqueId()),n&&Object.entries(n).forEach((function(t){var n=_slicedToArray(t,2),i=n[0],o=n[1];e.on(i,o,e)}))}},{key:"show",value:function(){var e=this;if(isFunction$1(this.options.beforeShowPromise)){var t=this.options.beforeShowPromise();if(!isUndefined$1(t))return t.then((function(){return e._show()}))}this._show()}},{key:"_show",value:function(){var e=this;this.tour.beforeShowStep(this),this.trigger("before-show"),this.el||this.setupElements(),this.target.classList.add("shepherd-enabled","shepherd-target"),document.body.setAttribute("data-shepherd-step",this.id),this.options.scrollTo&&setTimeout((function(){e.scrollTo(e.options.scrollTo)})),this.tooltip.show(),this.trigger("show"),this.el.focus()}},{key:"_updateStepTargetOnHide",value:function(){this.options.highlightClass&&this.target.classList.remove(this.options.highlightClass),this.target.classList.remove("shepherd-enabled","shepherd-target")}}]),t}(Evented),svgNS$1="http://www.w3.org/2000/svg",elementIds$1={modalOverlay:"shepherdModalOverlayContainer",modalOverlayMask:"shepherdModalMask",modalOverlayMaskRect:"shepherdModalMaskRect",modalOverlayMaskOpening:"shepherdModalMaskOpening"},classNames={isVisible:"shepherd-modal-is-visible",modalTarget:"shepherd-modal-target"};function _createModalContainer$1(){var e=document.createElementNS(svgNS$1,"svg");return e.setAttributeNS(null,"id",elementIds$1.modalOverlay),e}function _createMaskContainer$1(){var e=document.createElementNS(svgNS$1,"mask");return _setAttributes(e,{height:"100%",id:elementIds$1.modalOverlayMask,width:"100%",x:"0",y:"0"}),e}function _createMaskRect$1(){var e=document.createElementNS(svgNS$1,"rect");return _setAttributes(e,{fill:"#FFFFFF",height:"100%",id:elementIds$1.modalOverlayMaskRect,width:"100%",x:"0",y:"0"}),e}function _createMaskOpening$1(){var e=document.createElementNS(svgNS$1,"rect");return _setAttributes(e,{fill:"#000000",id:elementIds$1.modalOverlayMaskOpening}),e}function _createMaskConsumer$1(){var e=document.createElementNS(svgNS$1,"rect");return _setAttributes(e,{height:"100%",width:"100%",x:"0",y:"0"}),e.setAttribute("mask","url(#".concat(elementIds$1.modalOverlayMask,")")),e}function createModalOverlay(){var e=_createModalContainer$1(),t=document.createElementNS(svgNS$1,"defs"),n=_createMaskContainer$1(),i=_createMaskRect$1(),o=_createMaskOpening$1(),a=_createMaskConsumer$1();return n.appendChild(i),n.appendChild(o),t.appendChild(n),e.appendChild(t),e.appendChild(a),e}function positionModalOpening$1(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;if(e.getBoundingClientRect&&t instanceof SVGElement){var i=e.getBoundingClientRect(),o=i.x,a=i.y,r=i.width,s=i.height,c=i.left,l=i.top;_setAttributes(t,{x:(o||c)-n,y:(a||l)-n,width:r+2*n,height:s+2*n})}}function closeModalOpening(e){e&&e instanceof SVGElement&&_setAttributes(e,{height:"0",x:"0",y:"0",width:"0"})}function getModalMaskOpening(e){return e.querySelector("#".concat(elementIds$1.modalOverlayMaskOpening))}function preventModalBodyTouch(e){e.preventDefault()}function preventModalOverlayTouch(e){e.stopPropagation()}function toggleShepherdModalClass(e){var t=document.querySelector("".concat(classNames.modalTarget));t&&t.classList.remove(classNames.modalTarget),e.classList.add(classNames.modalTarget)}function _setAttributes(e,t){Object.keys(t).forEach((function(n){e.setAttribute(n,t[n])}))}function getElementFromObject(e){var t=e.element;if(t instanceof HTMLElement)return t;if(t instanceof SVGElement)return t;try{return document.querySelector(t)}catch(e){}return null}function getElementForStep(e){var t=e.options.attachTo;if(!t)return null;var n=_typeof(t);return"string"===n?getElementFromString(t):"object"===n?getElementFromObject(t):null}function getElementFromString(e){var t=_slicedToArray(e.split(" "),1)[0];return document.querySelector(t)}function addStepEventListeners(){"function"==typeof this._onScreenChange&&(window.removeEventListener("resize",this._onScreenChange,!1),window.removeEventListener("scroll",this._onScreenChange,!0)),window.addEventListener("resize",this._onScreenChange,!1),window.addEventListener("scroll",this._onScreenChange,!0);var e=document.querySelector("#".concat(elementIds$1.modalOverlay));window.addEventListener("touchmove",preventModalBodyTouch,{passive:!1}),e&&e.addEventListener("touchmove",preventModalOverlayTouch,!1)}var Modal=function(){function e(t){return _classCallCheck(this,e),this.createModalOverlay(),this.options=t,this}return _createClass(e,[{key:"cleanup",value:function(){try{var e=this._modalOverlayElem;e&&e instanceof SVGElement&&e.parentNode.removeChild(e),this._modalOverlayElem=null,document.body.classList.remove(classNames.isVisible)}catch(e){}}},{key:"createModalOverlay",value:function(){if(!this._modalOverlayElem){var e=document.getElementById("shepherdModalOverlayContainer");this._modalOverlayElem=e||createModalOverlay(),this._modalOverlayOpening=getModalMaskOpening(this._modalOverlayElem),this.hide(),e||document.body.appendChild(this._modalOverlayElem)}}},{key:"hide",value:function(){document.body.classList.remove(classNames.isVisible),this._modalOverlayElem&&(this._modalOverlayElem.style.display="none")}},{key:"setupForStep",value:function(e){this.options.useModalOverlay?(this._styleForStep(e),this.show()):this.hide()}},{key:"show",value:function(){document.body.classList.add(classNames.isVisible),this._modalOverlayElem&&(this._modalOverlayElem.style.display="block")}},{key:"_styleForStep",value:function(e){var t=this._modalOverlayOpening,n=getElementForStep(e),i=e.options.modalOverlayOpeningPadding;n?(positionModalOpening$1(n,t,i),this._onScreenChange=debounce$2$1(positionModalOpening$1.bind(this,n,t,i),0),addStepEventListeners.call(this)):closeModalOpening(this._modalOverlayOpening)}}]),e}(),hasPassiveEvents=!1;if("undefined"!=typeof window){var passiveTestOptions={get passive(){hasPassiveEvents=!0}};window.addEventListener("testPassive",null,passiveTestOptions),window.removeEventListener("testPassive",null,passiveTestOptions)}var isIosDevice="undefined"!=typeof window&&window.navigator&&window.navigator.platform&&/iP(ad|hone|od)/.test(window.navigator.platform),locks=[],documentListenerAdded=!1,initialClientY=-1,previousBodyOverflowSetting,previousBodyPaddingRight,allowTouchMove=function(e){return locks.some((function(t){return!(!t.options.allowTouchMove||!t.options.allowTouchMove(e))}))},preventDefault=function(e){var t=e||window.event;return!!allowTouchMove(t.target)||(t.touches.length>1||(t.preventDefault&&t.preventDefault(),!1))},setOverflowHidden=function(e){setTimeout((function(){if(void 0===previousBodyPaddingRight){var t=!!e&&!0===e.reserveScrollBarGap,n=window.innerWidth-document.documentElement.clientWidth;t&&n>0&&(previousBodyPaddingRight=document.body.style.paddingRight,document.body.style.paddingRight="".concat(n,"px"))}void 0===previousBodyOverflowSetting&&(previousBodyOverflowSetting=document.body.style.overflow,document.body.style.overflow="hidden")}))},restoreOverflowSetting=function(){setTimeout((function(){void 0!==previousBodyPaddingRight&&(document.body.style.paddingRight=previousBodyPaddingRight,previousBodyPaddingRight=void 0),void 0!==previousBodyOverflowSetting&&(document.body.style.overflow=previousBodyOverflowSetting,previousBodyOverflowSetting=void 0)}))},isTargetElementTotallyScrolled=function(e){return!!e&&e.scrollHeight-e.scrollTop<=e.clientHeight},handleScroll=function(e,t){var n=e.targetTouches[0].clientY-initialClientY;return!allowTouchMove(e.target)&&(t&&0===t.scrollTop&&n>0||isTargetElementTotallyScrolled(t)&&n<0?preventDefault(e):(e.stopPropagation(),!0))},disableBodyScroll=function(e,t){if(isIosDevice){if(!e)return void console.error("disableBodyScroll unsuccessful - targetElement must be provided when calling disableBodyScroll on IOS devices.");if(e&&!locks.some((function(t){return t.targetElement===e}))){var n={targetElement:e,options:t||{}};locks=[].concat(_toConsumableArray(locks),[n]),e.ontouchstart=function(e){1===e.targetTouches.length&&(initialClientY=e.targetTouches[0].clientY)},e.ontouchmove=function(t){1===t.targetTouches.length&&handleScroll(t,e)},documentListenerAdded||(document.addEventListener("touchmove",preventDefault,hasPassiveEvents?{passive:!1}:void 0),documentListenerAdded=!0)}}else{setOverflowHidden(t);var i={targetElement:e,options:t||{}};locks=[].concat(_toConsumableArray(locks),[i])}},clearAllBodyScrollLocks=function(){isIosDevice?(locks.forEach((function(e){e.targetElement.ontouchstart=null,e.targetElement.ontouchmove=null})),documentListenerAdded&&(document.removeEventListener("touchmove",preventDefault,hasPassiveEvents?{passive:!1}:void 0),documentListenerAdded=!1),locks=[],initialClientY=-1):(restoreOverflowSetting(),locks=[])},defaults={trigger:"manual",arrow:!0,animation:"fade",duration:420,flip:!0,animateFill:!1,interactive:!0,hideOnClick:"toggle",multiple:!0};function cleanupSteps(e){e&&e.steps.forEach((function(e){if(e.options&&!1===e.options.canClickTarget&&e.options.attachTo){var t=getElementForStep(e);t instanceof HTMLElement&&(t.style.pointerEvents="auto")}}))}function cleanupStepEventListeners(){"function"==typeof this._onScreenChange&&(window.removeEventListener("resize",this._onScreenChange,!1),window.removeEventListener("scroll",this._onScreenChange,!1),this._onScreenChange=null),window.removeEventListener("touchmove",preventModalBodyTouch,{passive:!1})}var uniqueId$1=function(){var e=0;return function(){return++e}}(),Shepherd=new Evented,Tour=function(e){function t(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};_classCallCheck(this,t),e=_possibleConstructorReturn(this,_getPrototypeOf(t).call(this,n)),bindMethods.call(_assertThisInitialized(e),["back","cancel","complete","hide","next"]),e.options=n,e.steps=e.options.steps||[];var i=["active","cancel","complete","inactive","show","start"];return i.map((function(t){var n;n=t,e.on(n,(function(t){(t=t||{}).tour=_assertThisInitialized(e),Shepherd.trigger(n,t)}))})),e.modal=new Modal(n),e._setTooltipDefaults(),e._setTourID(),_possibleConstructorReturn(e,_assertThisInitialized(e))}return _inherits(t,e),_createClass(t,[{key:"addStep",value:function(e,t){var n,i;return isUndefined$1(t)?i=e:(n=e,i=t),i instanceof Step?i.tour=this:i=this.setupStep(i,n),this.steps.push(i),i}},{key:"back",value:function(){var e=this.steps.indexOf(this.currentStep);this.show(e-1,!1)}},{key:"cancel",value:function(){if(this.options.confirmCancel){var e=this.options.confirmCancelMessage||"Are you sure you want to stop the tour?";window.confirm(e)&&this.done("cancel")}else this.done("cancel")}},{key:"complete",value:function(){this.done("complete")}},{key:"done",value:function(e){Array.isArray(this.steps)&&this.steps.forEach((function(e){return e.destroy()})),cleanupStepEventListeners.call(this),cleanupSteps(this.tourObject),this.trigger(e),Shepherd.activeTour=null,this._removeBodyAttrs(),this.trigger("inactive",{tour:this}),this.options.disableScroll&&clearAllBodyScrollLocks(),this.modal.cleanup()}},{key:"getById",value:function(e){return this.steps.find((function(t){return t.id===e}))}},{key:"getCurrentStep",value:function(){return this.currentStep}},{key:"hide",value:function(){var e=this.getCurrentStep();if(e)return e.hide()}},{key:"isActive",value:function(){return Shepherd.activeTour===this}},{key:"next",value:function(){var e=this.steps.indexOf(this.currentStep);e===this.steps.length-1?this.complete():this.show(e+1,!0)}},{key:"removeStep",value:function(e){var t=this,n=this.getCurrentStep();this.steps.some((function(n,i){if(n.id===e)return n.isOpen()&&n.hide(),n.destroy(),t.steps.splice(i,1),!0})),n&&n.id===e&&(this.currentStep=void 0,this.steps.length?this.show(0):this.cancel())}},{key:"setupStep",value:function(e,t){return(isString$1(t)||isNumber$1(t))&&(e.id=t.toString()),e=_extends({},this.options.defaultStepOptions,e),new Step(this,e)}},{key:"beforeShowStep",value:function(e){this.modal.setupForStep(e),this._styleTargetElementForStep(e)}},{key:"show",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=isString$1(e)?this.getById(e):this.steps[e];if(n){this._updateStateBeforeShow();var i=isFunction$1(n.options.showOn)&&!n.options.showOn();i?this._skipStep(n,t):(this.trigger("show",{step:n,previous:this.currentStep}),this.currentStep=n,n.show())}}},{key:"start",value:function(){this.trigger("start"),this.options.disableScroll&&disableBodyScroll(),this.currentStep=null,this._setupActiveTour(),this.next()}},{key:"_setupActiveTour",value:function(){this.modal.createModalOverlay(),this._addBodyAttrs(),this.trigger("active",{tour:this}),Shepherd.activeTour=this}},{key:"_styleTargetElementForStep",value:function(e){var t=getElementForStep(e);t&&(toggleShepherdModalClass(t),e.options.highlightClass&&t.classList.add(e.options.highlightClass),!1===e.options.canClickTarget&&(t.style.pointerEvents="none"))}},{key:"_skipStep",value:function(e,t){var n=this.steps.indexOf(e),i=t?n+1:n-1;this.show(i,t)}},{key:"_setTooltipDefaults",value:function(){tippy$1.setDefaultProps(defaults)}},{key:"_updateStateBeforeShow",value:function(){this.currentStep&&this.currentStep.hide(),this.isActive()||this._setupActiveTour()}},{key:"_setTourID",value:function(){var e=this.options.tourName||"tour",t=uniqueId$1();this.id="".concat(e,"--").concat(t)}},{key:"_addBodyAttrs",value:function(){document.body.setAttribute("data-shepherd-active-tour",this.id),document.body.classList.add("shepherd-active")}},{key:"_removeBodyAttrs",value:function(){document.body.removeAttribute("data-shepherd-active-tour"),document.body.classList.remove("shepherd-active")}}]),t}(Evented),ApxorWalkthroughTour;_extends(Shepherd,{Tour:Tour,Step:Step,Evented:Evented});var onClickCallback=function(e,t,n){var i=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=arguments.length>4?arguments[4]:void 0;if(o)try{i&&e.logActionEvent("InlineTargetViewClicked",t,n,"tooltip"),ApxorWalkthroughTour.complete()}catch(t){e.isShowingAction=!1,e.currentAction=null}},flutterClickCallbackWrapper=null,getPropertyFrom=function(e){switch(e.toUpperCase()){case"TOP":return"top: -8px !important";case"LEFT":return"left: 0px !important";case"RIGHT":return"left: -0px !important";case"BOTTOM":return"top: 0px !important"}},addTourStep=function(e,t,n,i,o){var a,r=e.animation,s=void 0===r?{}:r,c=e.bg_color,l=void 0===c?"black":c,d=e.border,p=void 0===d?{}:d,u=e.buttons_config,h=void 0===u?[]:u,g=e.button_position,f=void 0===g?"right":g,m=e.button_direction,_=void 0===m?DIRECTION.HORIZONTAL:m,v=e.corners,b=void 0===v?{}:v,y=e.shadow,x=void 0===y?"0 8px 16px rgba(0,0,0,0.19), 0 6px 6px rgba(0,0,0,0.23)":y,w=e.opacity,C=void 0===w?1:w,E=e.dismiss_outside_touch,k=void 0!==E&&E,S=e.escapeWithReference,T=void 0!==S&&S,A=e.dismiss_target_touch,I=void 0===A||A,P=e.position,O=void 0===P?"TOP":P,L=e.text_config,N=void 0===L?{}:L,B=e.title_config,D=void 0===B?{}:B,M=e.view_id,F=e.show_shadow,$=void 0!==F&&F,R=e.show_close_icon,V=void 0!==R&&R,H=e.dim_background_color,q=void 0===H?"#0a0a0a":H,U=e.dim_background_opacity,j=void 0===U?.5:U,z=e.layout_type,W=void 0===z?"default":z,Y=e.pb_color,X=void 0===Y?"orange":Y,G=e.index,Q=void 0===G?0:G,Z=e.total,K=void 0===Z?1:Z,J=e.iframe_id,ee=void 0===J?"":J;n.currentAction=ApxorWalkthroughTour.complete;var te=(null==N?void 0:N.alignment)||"center",ne=(null==D?void 0:D.alignment)||"center",ie=t.configId,oe=t.configName,ae=generateButtons(h,ApxorWalkthroughTour,ie,oe),re=ae.buttons_array,se=ae.buttons_css,ce={color:N.color,fontSize:N.size,fontFamily:N.font_family,fontStyle:N.style};if(N.margin_config&&Object.keys(N.margin_config).length>0){var le=N.margin_config;ce.margin="".concat(le.top,"px ").concat(le.right,"px ").concat(le.bottom,"px ").concat(le.left,"px")}var de=N.style;"bold"===de&&(ce.fontWeight=de);var pe,ue={color:D.color,fontSize:D.size,fontFamily:D.font_family,fontStyle:D.style};if(D.margin_config&&Object.keys(D.margin_config).length>0){var he=D.margin_config;ue.margin="".concat(he.top,"px ").concat(he.right,"px ").concat(he.bottom,"px ").concat(he.left,"px")}switch("bold"===(de=D.style)&&(ce.fontWeight=de),W){case"with_progress":pe='\n<div>\n <div style="height: 6px;background: '.concat(X,";width: ").concat((Q+1)/K*100,"%;border-radius: ").concat(b.enabled?b.width:0,'px;"></div>\n <header class="shepherd-header" style="').concat(D?"padding: 10px 10px 0 10px":"",'">\n ').concat(D?'<h3 class="shepherd-title" id="apxor-step-'.concat(Q,'-label" style="padding: 0 !important;padding-right: 0.7em;text-align:').concat(ne,';">').concat(getStylisedText(null==D?void 0:D.text,null==D?void 0:D.segments,null==D?void 0:D.quote,null==D?void 0:D.link_config),"</h3>"):"",'\n </header>\n <p style="padding: 8px 10px;text-align:').concat(te,';">').concat(getStylisedText(null==N?void 0:N.text,null==N?void 0:N.segments,null==N?void 0:N.quote,null==N?void 0:N.link_config),"</p>\n</div>\n "),pe=(new DOMParser).parseFromString(pe,"text/html").body.children[0];break;default:pe=(null==N||null===(a=N.segments)||void 0===a?void 0:a.length)>0?getStylisedText(null==N?void 0:N.text,null==N?void 0:N.segments,null==N?void 0:N.quote,null==N?void 0:N.link_config):[N&&N.text?N.text:"Tap here"]}var ge,fe={"border-radius":b.enabled?b.width:0,background:l,"border-color":p.color,"border-width":p.width};if(Apxor.isFlutter()){var me=t.configId,_e=t.configName,ve=e.dismiss_target_touch,be=void 0===ve||ve;(ge=createTargetView(getElementPositionFromFlutter(M)))&&(flutterClickCallbackWrapper=addClickListenerForFlutterElement(ge,(function(){onClickCallback(n,me,_e,!0,be)})))}else ge=getElementFromSelector(M,ee);if(!ge)return null==Apxor||Apxor.logEvent("apx_nudge_not_shown",{apx_nudge_type:"campaign",apx_nudge_id:ie,apx_nudge_name:oe,apx_variant_code:ceWrapper.getInstance().getVariantCode(ie),apx_failure_type:"error",apx_reason:"View not found"}),void console.warn("Element not found with id or path");var ye=document.createElement("span");ye.setAttribute("id","apxor-style-"+ie+"-step-"+Q),ye.setAttribute("style","display: none");var xe=document.createElement("style");xe.innerHTML='\n#shepherdModalOverlayContainer {\n -ms-filter: "progid:dximagetransform.microsoft.gradient.alpha(Opacity=50)";\n filter: alpha(opacity=50);height: 100vh;left: 0;opacity: '.concat(null!=j?j:.5,";position: fixed;\n top: 0;transition: all .3s ease-out;width: 100vw;z-index: 9997;fill: ").concat(null!=q?q:"transparent","\n}\n#shepherdModalOverlayContainer #shepherdModalMask, #shepherdModalOverlayContainer #shepherdModalMaskRect {\n height: 100vh;width: 100vw\n}\n.shepherd-modal.shepherd-enabled {\n position: relative;z-index: 9998\n}\n.shepherd-active.shepherd-modal-is-visible :not(.shepherd-target) {\n pointer-events: none\n}\n.shepherd-active.shepherd-modal-is-visible .shepherd-button, .shepherd-active.shepherd-modal-is-visible .shepherd-button *, .shepherd-active.shepherd-modal-is-visible .shepherd-cancel-link, .shepherd-active.shepherd-modal-is-visible .shepherd-cancel-link *, .shepherd-active.shepherd-modal-is-visible .shepherd-element, .shepherd-active.shepherd-modal-is-visible .shepherd-element *, .shepherd-active.shepherd-modal-is-visible .shepherd-target, .shepherd-active.shepherd-modal-is-visible .shepherd-target * {\n pointer-events: auto\n}\n.tippy-popper.shepherd {\n z-index: 999999\n}\n.tippy-popper.shepherd[x-placement^=top] {\n margin-top: 0px\n}\n.tippy-popper.shepherd[x-placement^=bottom] {\n margin-top: 8px\n}\n.tippy-popper.shepherd[x-placement^=left] {\n margin-right: 0px\n}\n.tippy-popper.shepherd[x-placement^=right] {\n margin-left: 0px\n}\n.tippy-popper.shepherd .tippy-tooltip .tippy-content {\n max-height: 100%;padding-top:0px;padding-bottom:0px;text-align: left;max-width: 400px;\n}\n.shepherd-element, .shepherd-element *, .shepherd-element:after, .shepherd-element :after, .shepherd-element:before, .shepherd-element :before {\n box-sizing: border-box\n}\n.shepherd-element {\n outline: none;\n}\n.shepherd-element .shepherd-content header {\n *zoom: 1;align-items: left;border-top-left-radius: 5px;border-top-right-radius: 5px;\n display: flex;justify-content: left;line-height: 2em;").concat(V?"padding: .75em;":"",'\n}\n.shepherd-element .shepherd-content header:after {\n clear: both;content: "";display: table\n}\n.shepherd-element .shepherd-content header .shepherd-cancel-link, .shepherd-element .shepherd-content header .shepherd-title {\n margin: 0;padding: 0;position: relative;vertical-align: middle\n}\n.shepherd-element .shepherd-content header .shepherd-title {\n text-align:').concat(ne,";\n color: ").concat(ue.color,";display: flex;flex: 1 0 auto;\n font-size: ").concat(ue.fontSize,"px;font-family: ").concat(ue.fontFamily,";\n font-weight: ").concat("bold"!==ue.fontStyle?"normal":ue.fontStyle,";font-style: ").concat("italic"===ue.fontStyle?"italic":"unset",";\n line-height: ").concat("default"===W?"26":"20",'px;letter-spacing:0.01em;padding: .7em;padding-bottom: 0px;max-width: 400px;\n}\n.shepherd-element .shepherd-content header .shepherd-cancel-link {\n color: hsla(0, 0%, 70.2%, .75);font-size: 2em;margin-left: auto;\n text-decoration: none;transition: color .5s ease\n}\n.shepherd-element .shepherd-content header .shepherd-cancel-link:before {\n mix-blend-mode: screen;content: "×"\n}\n.shepherd-element .shepherd-content header .shepherd-cancel-link:hover {\n mix-blend-mode: difference;\n}\n.shepherd-element .shepherd-content .shepherd-text {\n text-align:').concat(te,";\n line-height: 1em;").concat("default"===W?"padding:14px;padding-top:4px":"","\n}\n.shepherd-element .shepherd-content .shepherd-text a,\n.shepherd-element .shepherd-content .shepherd-text a:active,\n.shepherd-element .shepherd-content .shepherd-text a:visited {\n border-bottom: 1px dotted rgba(0, 0, 0, .75);color: ").concat(ce.color,";\n opacity: 0.75;text-decoration: none\n}\n.shepherd-element .shepherd-content .shepherd-text a:active:hover, \n.shepherd-element .shepherd-content .shepherd-text a:hover,\n.shepherd-element .shepherd-content .shepherd-text a:visited:hover {\n border-bottom-style: solid\n}\n.shepherd-element .shepherd-content .shepherd-text p {\n margin-top: 0\n}\n.shepherd-element .shepherd-content .shepherd-text p:last-child {\n margin-bottom: 0\n}\n.shepherd-content > .shepherd-text p {\n font-size: ").concat(ce.fontSize,"px;font-family: ").concat(ce.fontFamily,"; \n font-weight: ").concat("bold"!==ce.fontStyle?"normal":ce.fontStyle,";\n font-style: ").concat("italic"===ce.fontStyle?"italic":"unset",";\n color: ").concat(ce.color,";line-height: ").concat("default"===W?"26":"20","px;letter-spacing:0.01em;\n}\n").concat(getButtonsCSS(se,f,_,".shepherd-element .shepherd-content "),"\n@-webkit-keyframes cycle {\n 0% { transform: ").concat(translateDir(O,0),"; }\n 50% { transform: ").concat(translateDir(O,50),"; }\n 100% { transform: ").concat(translateDir(O,100),"; }\n}\n@keyframes cycle {\n 0% { transform: ").concat(translateDir(O,0),"; }\n 50% { transform: ").concat(translateDir(O,50),"; }\n 100% { transform: ").concat(translateDir(O,100),"; }\n}\n.tippy-tooltip.apxor-").concat(ie,"-step-").concat(Q,"-theme {\n animation :").concat(s.enabled?s.type+" "+s.duration+"ms":"none",";\n animation-timing-function: ease-in-out;animation-iteration-count: infinite;\n box-shadow: ").concat($?x:"none",";color: ").concat(ce.color,";\n opacity: ").concat(C,";border-radius: ").concat(fe["border-radius"]+"px",";\n background-color: ").concat(fe.background,";").concat(getPropertyFrom(O),";\n}\n.apxor-").concat(ie,"-step-").concat(Q,"-theme .tippy-roundarrow {\n fill: ").concat(fe.background,";\n}\n.tippy-tooltip[data-placement^='top'] .tippy-arrow {\n border-top-color: ").concat(fe.background,";\n}\n.tippy-tooltip[data-placement^='bottom'] .tippy-arrow {\n border-bottom-color: ").concat(fe.background,";\n}\n.tippy-tooltip[data-placement^='left'] .tippy-arrow {\n border-left-color: ").concat(fe.background,";\n}\n.tippy-tooltip[data-placement^='right'] .tippy-arrow {\n border-right-color: ").concat(fe.background,";\n}\n "),ye.appendChild(xe),Apxor.isFlutter()?document.body.appendChild(ye):ge.parentNode.insertBefore(ye,ge);var we=function(){return onClickCallback(n,ie,oe,!0,I)},Ce=function(){var e;try{var t;null===(t=ApxorWalkthroughTour)||void 0===t||t.complete()}catch(e){console.error(e)}ke.disconnect(),Se.disconnect();try{var n,i=document.getElementById("apxor-style-"+ie+"-step-"+Q);null==i||null===(n=i.parentNode)||void 0===n||n.removeChild(i)}catch(e){window.ApxorLogger.error("Error removing the tooltip styles:"+e)}try{var a,r=document.getElementById("shepherdModalOverlayContainer");null==r||null===(a=r.parentNode)||void 0===a||a.removeChild(r)}catch(e){window.ApxorLogger.error("Error removing the tooltip overlay:"+e)}o&&o(null===(e=ApxorWalkthroughTour)||void 0===e?void 0:e._isCancelled),ge.removeEventListener("click",we),document.body.removeEventListener("click",flutterClickCallbackWrapper),Apxor.isFlutter()&&ge.remove()},Ee=!1,ke=new MutationObserver((function(){if(!document.body.contains(ge)){document.getElementById("shepherdModalOverlayContainer").remove();var e=document.getElementsByClassName("apxor-".concat(ie,"-step-").concat(Q,"-theme"));e.length>0&&e[0]&&e[0].parentNode&&e[0].parentNode.remove(),Ce()}})),Se=new IntersectionObserver((function(){var e=isElementInViewport(ge);if(!e&&Ee){document.getElementById("shepherdModalOverlayContainer").remove();var t=document.getElementsByClassName("apxor-".concat(ie,"-step-").concat(Q,"-theme"));t.length>0&&t[0]&&t[0].parentNode&&t[0].parentNode.remove(),Ce()}e&&(Ee=!0)})),Te=getStylisedText(null==D?void 0:D.text,null==D?void 0:D.segments,null==D?void 0:D.quote,null==D?void 0:D.link_config);ApxorWalkthroughTour.addStep("apxor-step-"+Q,{title:"default"===W?""===Te?null:Te.outerHTML:null,text:pe,classes:"apxor-".concat(ie,"-step-").concat(Q,"-theme"),attachTo:{element:ge,on:O.toLowerCase()},showCancelLink:V,buttons:re,tippyOptions:{allowHTML:!0,arrow:!0,flipOnUpdate:!0,interactive:!0,maxWidth:"100%",hideOnClick:k,escapeWithReference:T,theme:"apxor-".concat(ie,"-step-").concat(Q),onShow:function(){i&&i(),ge.addEventListener("click",we),ke.observe(document.body,{childList:!0,subtree:!0}),Se.observe(ge)},onHidden:Ce}})},showTooltip=function(e,t,n,i,o,a,r){var s,c,l,d,p=Array.isArray(t)&&t.length>0,u=e.delay,h=e.dim_background,g=e.view_id,f=e.iframe_id,m=e.find_interval,_=void 0===m?0:m,v=e.max_find_interval,b=void 0===v?1e4:v,y=e.scrollToView,x=void 0!==y&&y;(null===(s=e.title_config)||void 0===s?void 0:s.text)===DYNAMIC_TEXT&&(0===(null===(l=e.title_config.script)||void 0===l?void 0:l.t)?evaluateDynamicText(e.title_config):evaluateDynamicScript(e.title_config));(null===(c=e.text_config)||void 0===c?void 0:c.text)===DYNAMIC_TEXT&&(0===(null===(d=e.text_config.script)||void 0===d?void 0:d.t)?evaluateDynamicText(e.text_config):evaluateDynamicScript(e.text_config));var w=!1;x&&(w={behavior:"smooth",block:"center"}),ApxorWalkthroughTour=new Shepherd.Tour({defaultStepOptions:{scrollTo:w},useModalOverlay:p||h});var C=function(n){try{var s=n.getBoundingClientRect();if(0===s.width||0===s.height)return console.warn("Width and height are 0 for: ",g,". Can't show"),void(o.currentAction=null)}catch(e){return o.isShowingAction=!1,void(o.currentAction=null)}if(p?t.forEach((function(e){var t=e.ui;addTourStep(t,i,o,a,r)})):addTourStep(e,i,o,a,r),o.isShowingAction){var c=i.configId,l=i.configName;return null==Apxor||Apxor.logEvent("apx_nudge_not_shown",{apx_nudge_type:"campaign",apx_nudge_id:c,apx_nudge_name:l,apx_variant_code:ceWrapper.getInstance().getVariantCode(c),apx_failure_type:"error",apx_reason:"An action is already being shown"}),void window.ApxorLogger.error("An action already being shown")}try{ApxorWalkthroughTour.start(),o.isShowingAction=!0}catch(e){o.isShowingAction=!1,o.currentAction=null,console.error(e)}};return setTimeout((function(){var t=getElementFromSelector(g,f);if(t)C(t);else if(console.warn("Element with id:".concat(g," not found.")),_)console.warn("Rechecking"),function(t){var n=new Date,a=setInterval((function(){if(null===o.currentAction||void 0===o.currentAction){var r;if(Apxor.isFlutter()){var s=i.configId,c=i.configName,l=e.dismiss_target_touch,d=void 0===l||l;(r=createTargetView(getElementPositionFromFlutter(t)))&&(flutterClickCallbackWrapper=addClickListenerForFlutterElement(r,(function(){onClickCallback(o,s,c,!0,d)})))}else r=getElementFromSelector(t,f);if(r)clearInterval(a),C(r);else if(new Date-n>b){clearInterval(a);var p=i.configId,u=i.configName;null==Apxor||Apxor.logEvent("apx_nudge_not_shown",{apx_nudge_type:"campaign",apx_nudge_id:p,apx_nudge_name:u,apx_variant_code:ceWrapper.getInstance().getVariantCode(p),apx_failure_type:"error",apx_reason:"View not found"}),console.warn("Element with id:".concat(t," not found.")),o.currentAction=null}}else clearInterval(a)}),_)}(g);else{var n=i.configId,a=i.configName;null==Apxor||Apxor.logEvent("apx_nudge_not_shown",{apx_nudge_type:"campaign",apx_nudge_id:n,apx_nudge_name:a,apx_variant_code:ceWrapper.getInstance().getVariantCode(n),apx_failure_type:"error",apx_reason:"View not found"}),o.currentAction=null}}),u),!0===n.auto_dismiss&&setTimeout((function(){try{ApxorWalkthroughTour.complete()}catch(e){o.isShowingAction=!1,o.currentAction=null,console.error(e)}}),u+n.duration),ApxorWalkthroughTour.complete},svgNS="http://www.w3.org/2000/svg",elementIds={modalOverlay:"tippyModalOverlayContainer",modalOverlayMask:"tippyModalMask",modalOverlayMaskRect:"tippyModalMaskRect",modalOverlayMaskOpening:"tippyModalMaskOpening"},createMask=function(e,t){var n,i,o=arguments.length>2&&void 0!==arguments[2]&&arguments[2],a=arguments.length>3&&void 0!==arguments[3]&&arguments[3],r=_createModalContainer(),s=document.createElementNS(svgNS,"defs"),c=_createMaskContainer(),l=_createMaskRect();if(n=a?_createMaskOpeningCoachmark(o):_createMaskOpening(t),!a)var d=_createMaskOpeningBorder(t);return a?(i=_createMaskConsumer(),positionModalOpeningCoachmark(e,n),window.addEventListener("scroll",(function(){positionModalOpeningCoachmark(e,n),setAttributes(n,{"scroll-behavior":"smooth"})}))):(i=_createMaskConsumer(),positionModalOpening(e,n,d,t),window.addEventListener("scroll",(function(){positionModalOpening(e,n,d,t),setAttributes(n,{"scroll-behavior":"smooth"})}))),c.appendChild(l),c.appendChild(n),s.appendChild(c),r.appendChild(s),a||r.appendChild(d),r.appendChild(i),r};function setAttributes(e,t){Object.keys(t).forEach((function(n){e.setAttribute(n,t[n])}))}function _createModalContainer(){var e=document.createElementNS(svgNS,"svg");return e.setAttributeNS(null,"id",elementIds.modalOverlay),Apxor.isFlutter()&&(e.style.pointerEvents="none",e.style.position="absolute"),e}function _createMaskContainer(){var e=document.createElementNS(svgNS,"mask");return setAttributes(e,{height:"100%",id:elementIds.modalOverlayMask,width:"100%",x:"0",y:"0"}),e}function _createMaskRect(){var e=document.createElementNS(svgNS,"rect");return setAttributes(e,{fill:"#FFFFFF",height:"100%",id:elementIds.modalOverlayMaskRect,width:"100%",x:"0",y:"0"}),e}function _createMaskOpening(e){var t;return"rectangle"===e.shape?setAttributes(t=document.createElementNS(svgNS,"rect"),{fill:"#000000",id:elementIds.modalOverlayMaskOpening,rx:e.cornerRadius,ry:e.cornerRadius}):"circle"===e.shape&&setAttributes(t=document.createElementNS(svgNS,"circle"),{fill:"#000000",id:elementIds.modalOverlayMaskOpening}),t}function _createMaskOpeningCoachmark(e){var t=document.createElementNS(svgNS,"rect");return setAttributes(t,!0===e?{fill:"#000000",id:elementIds.modalOverlayMaskOpening,rx:"50%",ry:"50%"}:{fill:"#000000",id:elementIds.modalOverlayMaskOpening}),t}function _createMaskOpeningBorder(e){var t;return"rectangle"===e.shape?setAttributes(t=document.createElementNS(svgNS,"rect"),{fill:"none",stroke:e.border.color,"stroke-width":"".concat(e.border.width),"stroke-opacity":e.border.opacity,rx:e.cornerRadius,ry:e.cornerRadius}):"circle"===e.shape&&setAttributes(t=document.createElementNS(svgNS,"circle"),{fill:"none",stroke:e.border.color,"stroke-width":"".concat(e.border.width),"stroke-opacity":e.border.opacity}),t}function _createMaskConsumer(){var e=document.createElementNS(svgNS,"rect");return setAttributes(e,{height:"100%",width:"100%",x:"0",y:"0"}),e.setAttribute("mask","url(#".concat(elementIds.modalOverlayMask,")")),e}function createSVGDivMask(e){var t=e.getBoundingClientRect(),n=t.width,i=t.height,o=t.left,a=t.top,r=document.createElementNS("http://www.w3.org/2000/svg","svg");r.setAttribute("width",document.scrollingElement.scrollWidth),r.setAttribute("height",document.scrollingElement.scrollHeight),r.setAttribute("id","maskforflutter"),r.style.position="absolute",r.style.opacity="0",r.setAttribute("pointer-events","none");var s=document.createElementNS("http://www.w3.org/2000/svg","path");return s.setAttribute("d","m0 0 l".concat(document.scrollingElement.scrollWidth," 0 l0 ").concat(document.scrollingElement.scrollHeight," l-").concat(document.scrollingElement.scrollWidth," 0 l0 -").concat(document.scrollingElement.scrollHeight," l").concat(o," ").concat(a," l0 ").concat(i," l").concat(n," 0 l0 ").concat(-i," l").concat(-n," 0Z")),s.setAttribute("pointer-events","fill"),r.appendChild(s),r}function positionModalOpening(e,t,n,i){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0;if(e.getBoundingClientRect&&t instanceof SVGElement&&n instanceof SVGElement)if("rectangle"===i.shape){var a=e.getBoundingClientRect(),r=a.x,s=a.y,c=a.width,l=a.height,d=a.left,p=a.top;setAttributes(t,{x:(r||d)-o-i.offset.left,y:(s||p)-o-i.offset.top,width:c+o+i.offset.left+i.offset.right,height:l+o+i.offset.top+i.offset.bottom}),setAttributes(n,{x:(r||d)-o-i.offset.left,y:(s||p)-o-i.offset.top,width:c+o+i.offset.left+i.offset.right,height:l+o+i.offset.top+i.offset.bottom})}else if("circle"===i.shape){var u=e.getBoundingClientRect(),h=u.x,g=u.y,f=u.width,m=u.height,_=u.left,v=u.top;setAttributes(t,{cx:(h||_)+f/2,cy:(g||v)+m/2,r:Math.max(f,m)/2+i.offsetRadius}),setAttributes(n,{cx:(h||_)+f/2,cy:(g||v)+m/2,r:Math.max(f,m)/2+i.offsetRadius})}}function positionModalOpeningCoachmark(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;if(e.getBoundingClientRect&&t instanceof SVGElement){var i=e.getBoundingClientRect(),o=i.x,a=i.y,r=i.width,s=i.height,c=i.left,l=i.top;setAttributes(t,{x:(o||c)-n,y:(a||l)-n,width:r+2*n,height:s+2*n})}}var DEFAULT_PADDING$1=5,currentId=makeid(10);function getDocumentOffsetPosition(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=e.getBoundingClientRect(),i=0,o=0;t||(i=window.scrollX,o=window.scrollY);var a=n.left+i,r=n.top+o,s=n.right+i,c=n.bottom+o,l=isDefined$1(n.x)?n.x+i:a,d=isDefined$1(n.y)?n.y+o:r,p=n.width,u=n.height;return{left:a,top:r,right:s,bottom:c,x:l,y:d,width:p,height:u}}function createTitleDescriptionButtons(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],i=arguments.length>3?arguments[3]:void 0,o=arguments.length>4?arguments[4]:void 0,a=arguments.length>5?arguments[5]:void 0,r=arguments.length>6?arguments[6]:void 0,s=arguments.length>7?arguments[7]:void 0,c=arguments.length>8?arguments[8]:void 0,l=null;if(!t&&e?(l=createTextElement(e,currentId)).style.textAlign=(null==e?void 0:e.alignment)||"center":t&&e&&((l=document.createElement("div")).style.display="inline-flex",l.style.flexDirection="column",l.style.visibility="hidden",l.style.textAlign=(null==e?void 0:e.alignment)||"center",l.style.lineHeight="26px",l.style.letterSpacing="0.01em",l.appendChild(createTextElement(t,currentId)),l.appendChild(createTextElement(e,currentId))),n&&n.length>0){var d=document.createElement("footer");d.className="shepherd-footer",d.style.zIndex=99999,d.style.margin="8px",d.style.padding="0";var p=function(){s&&s()},u=generateButtons(n,{next:p,complete:p,cancel:p},a,r),h=u.buttons_array,g=u.buttons_css,f=document.createElement("style");f.innerHTML=getButtonsCSS(g,i,o),d.appendChild(f),h.forEach((function(e){var t=e.classes,n=e.text,i=e.action,o=document.createElement("button");o.className="shepherd-button "+t,o.innerHTML=n,o.onclick=function(){return i()},d.appendChild(o)}));var m=document.createElement("div");m.style.display="inline-flex",m.style.flexDirection="column",m.style.visibility="hidden",m.appendChild(l),m.appendChild(d),l=m}return l.style.position=c?"fixed":"absolute",document.body.appendChild(l),l}function addRippleStyles(e,t,n){return"\n<style>\n.ripple-animator {\n ".concat(Apxor.isFlutter()?"pointer-events:none;":"","\n position: relative;\n display: -webkit-box;\n display: flex;\n -webkit-box-orient: horizontal;\n -webkit-box-direction: normal;\n flex-direction: row;\n -webkit-box-pack: center;\n justify-content: center;\n -webkit-box-align: center;\n align-items: center;\n height: ").concat(n,"px !important;\n width: ").concat(t,"px !important;\n border-radius: ").concat("circle"===e?"100%":"0",";\n}\n.ripple-animator span {\n position: relative;\n font-size: 72px;\n top: 5px;left: -5px;\n}\n\n.ripple-animator:before,\n.ripple-animator:after {\n content: '';\n display: block;\n position: absolute;\n top: 0; \n right: 0; \n bottom: 0; \n left: 0;\n opacity:1;\n z-index:10;\n border: 0px solid white;\n border-radius: ").concat("circle"===e?"100%":"0%",";\n z-index: 99999;\n}\n\n.ripple-animator:before {\n animation: ripple 1s infinite ease-out;\n}\n\n@keyframes ripple{\n 0% { \n border: 0px solid white;\n transform: scale(0.8); \n }\n 100% { \n border: 20px solid white;\n transform: scale(1.5); \n opacity:0; \n }\n}\n</style>")}function createInnerCircle(e,t,n,i,o,a,r){var s=Math.sqrt(Math.pow(e,2)+Math.pow(t,2)),c=s,l=n-(s-e)/2,d=i-(s-t)/2;"circle"!=o&&(s=e,c=t,l=n,d=i);var p=document.createElement("div");return p.setAttribute("id",currentId+"-ripple-div"),a&&(p.innerHTML=addRippleStyles(o,s,c)),p.style.position=r?"fixed":"absolute",p.style.width="".concat(s,"px"),p.style.height="".concat(c,"px"),p.style.left="".concat(l,"px"),p.style.top="".concat(d,"px"),p.classList.add("ripple-animator"),p.style.borderRadius="".concat("circle"===o?"50%":"0"),p.style.visibility="hidden",Apxor.isFlutter()&&(p.style.pointerEvents="none"),document.body.appendChild(p),p}function getSVG(e,t){return'\n <svg\n style="position:absolute;"\n height="'.concat(document.scrollingElement.scrollHeight,'" \n width="').concat(document.scrollingElement.scrollWidth,'"\n class="apx-fade-in">\n <defs>\n <mask\n id="apx-mask"\n x="0"\n y="0"\n height="').concat(document.scrollingElement.scrollHeight,'" \n width="').concat(document.scrollingElement.scrollWidth,'">\n ').concat(e,"\n </mask>\n </defs>\n ").concat(t,"\n </svg>\n ")}function getCircleSVG(e){var t=e.bg_color,n=e.opacity,i=e.innerRadius,o=e.innerCenterX,a=e.innerCenterY,r=e.outerRadius,s=e.outerCircleCenterX,c=e.outerCircleCenterY;return getSVG('\n <rect\n x="'.concat(s-r,'"\n y="').concat(c-r<0?0:c-r,'"\n height="').concat(2*r,'"\n width="').concat(2*r,'"\n fill="#fff" />\n <circle\n cx="').concat(o,'"\n cy="').concat(a,'"\n r="').concat(i,'" />\n '),'\n <circle\n cx="'.concat(s,'" \n cy="').concat(c,'" \n r="').concat(r,'" \n fill="').concat(t,'" \n fill-opacity="').concat(n,'"\n mask="url(#apx-mask)" />\n '))}function getRectangleSVG(e){var t=e.bg_color,n=e.opacity,i=e.targetElementLeft,o=e.targetElementTop,a=e.targetElementWidth,r=e.targetElementHeight;return getSVG('\n <rect\n x="0" y="0"\n height="'.concat(document.scrollingElement.scrollHeight,'" \n width="').concat(document.scrollingElement.scrollWidth,'" \n fill="#fff"\n ').concat(Apxor.isFlutter()?'style="pointer-events:none"':"",'\n />\n <rect\n x="').concat(i,'" \n y="').concat(o,'" \n width="').concat(a,'" \n height="').concat(r,'"\n ').concat(Apxor.isFlutter()?'style="pointer-events:none"':""," />\n "),'\n <rect\n x="0" y="0"\n height="'.concat(document.scrollingElement.scrollHeight,'" \n width="').concat(document.scrollingElement.scrollWidth,'" \n mask="url(#apx-mask)"\n fill="').concat(t,'" \n fill-opacity="').concat(n,'" />\n '))}function createSVGDiv(e){var t=e.opacity,n=e.type,i=e.scroll_coachMark,o=e.element,a=document.createElement("div");a.setAttribute("id",currentId+"-svg"),a.style.position=i?"fixed":"absolute",a.style.left=0,a.style.top=0,a.style.zIndex=99998,a.style.width="100%",a.style.height="99%",Apxor.isFlutter()&&(a.style.pointerEvents="none");var r="";if(r="circle"===n?getCircleSVG(e):getRectangleSVG(e),a.innerHTML="\n <style>\n @keyframes apx-anim {\n from {\n opacity: 0;\n }\n \n to {\n opacity: ".concat(t,";\n }\n }\n .apx-fade-in {\n ").concat(Apxor.isFlutter()?"pointer-events:none;":"","\n animation: apx-anim 0.4s linear;\n }\n </style>\n ").concat(r),Apxor.isFlutter()){var s=createSVGDivMask(o);a.appendChild(s)}return document.body.appendChild(a),a}function showCoachmark(e,t,n,i,o){var a,r,s,c,l,d=e.target;(null===(a=e.title_config)||void 0===a?void 0:a.text)===DYNAMIC_TEXT&&(0===(null===(s=e.title_config.script)||void 0===s?void 0:s.t)?evaluateDynamicText(e.title_config):evaluateDynamicScript(e.title_config));(null===(r=e.text_config)||void 0===r?void 0:r.text)===DYNAMIC_TEXT&&(0===(null===(c=e.text_config.script)||void 0===c?void 0:c.t)?evaluateDynamicText(e.text_config):evaluateDynamicScript(e.text_config));if(l=Apxor.isFlutter()?createTargetView(getElementPositionFromFlutter(d.id)):getElementFromSelector(d.id,"",null==d?void 0:d.is_content_based,null==d?void 0:d.content)){if(isElementCovered(l))return void window.ApxorLogger.info("The tooltip is not visible because another element is overlapping the target element.");addStep(l,e,t,n,i,o)}else var p=e.find_interval,u=void 0===p?0:p,h=e.timeout,g=void 0===h?1e4:h,f=new Date,m=window.ApxorRTM,_=setInterval((function(){if(l=Apxor.isFlutter()?createTargetView(getElementPositionFromFlutter(d.id)):getElementFromSelector(d.id,"",null==d?void 0:d.is_content_based,null==d?void 0:d.content)){if(clearInterval(_),null!==m.currentAction&&void 0!==m.currentAction)return void window.ApxorLogger.error("An action is already being shown. Try after it gets dismissed");if(isElementCovered(l))return void window.ApxorLogger.info("The tooltip is not visible because another element is overlapping the target element.");addStep(l,e,t,n,i,o)}else{new Date-f>g&&(clearInterval(_),console.warn("Element with id:".concat(d.id," not found.")),m.currentAction=null)}}),u)}function addStep(e,t,n,i,o,a){var r=t.bg_color,s=t.scroll_coachMark,c=void 0!==s&&s,l=t.buttons_config,d=void 0===l?[]:l,p=t.button_position,u=t.button_direction,h=void 0===u?DIRECTION.HORIZONTAL:u,g=t.coach_mark_details,f=g.has_ripple,m=void 0!==f&&f,_=g.type,v=void 0===_?"circle":_,b=t.delay,y=t.dismiss_outside_touch,x=void 0!==y&&y,w=t.opacity,C=void 0===w?.8:w,E=t.position,k=void 0===E?"TOP":E,S=t.text_config,T=t.title_config,A=void 0===T?null:T,I=t.view_id,P=t.scroll_to_view,O=void 0!==P&&P,L=n.configId,N=n.configName,B=window.ApxorRTM,D=null;if(Apxor.isFlutter()&&e&&(D=addClickListenerForFlutterElement(e,(function(){fe()}))),!e)return null==Apxor||Apxor.logEvent("apx_nudge_not_shown",{apx_nudge_type:"campaign",apx_nudge_id:L,apx_nudge_name:N,apx_variant_code:ceWrapper.getInstance().getVariantCode(L),apx_failure_type:"error",apx_reason:"View not found"}),void console.warn("Element not found with id or path: ",I);if(currentId=makeid(10),O||isElementInViewport(e)){var M=!1,F=new MutationObserver((function(){document.body.contains(e)||G()})),$=new IntersectionObserver((function(){var t=isElementInViewport(e);!t&&M&&G(),t&&(M=!0)})),R=getDocumentOffsetPosition(e,c),V=R.left,H=void 0===V?0:V,q=R.top,U=void 0===q?0:q,j=R.width,z=void 0===j?0:j,W=R.height,Y=void 0===W?0:W,X=R.left<window.innerWidth/2;if(0!==Y&&0!==z){var G=function(){F.disconnect(),$.disconnect(),he.remove(),Q.parentNode.removeChild(Q),te.parentNode.removeChild(te),a&&a(),ge&&clearTimeout(ge),document.body.removeEventListener("click",D),Apxor.isFlutter()&&e.remove()};B.currentAction=G;var Q=createTitleDescriptionButtons(S,A,d,p,h,L,N,G,c),Z=Q.offsetWidth,K=Q.offsetHeight,J=0,ee=0;S&&S.margin_config&&(J=Number(S.margin_config.left)||0,ee=Number(S.margin_config.right)||0);var te=createInnerCircle(z,Y,H,U,v,m,c),ne=H+z/2,ie=U+Y/2,oe=Math.sqrt(Math.pow(z,2)+Math.pow(Y,2))/2,ae=oe+Math.max(Z,z)/2+2*DEFAULT_PADDING$1,re=-1,se=-1,ce=-1,le=-1,de=ie-oe,pe=ie+oe;switch(k){case"TOP":se=(ce=ne-Z/2)<0?DEFAULT_PADDING$1:ce,re="circle"===v?ie-oe-K-25:U-K-25,le=pe-Math.abs(pe-re)/2;break;case"BOTTOM":case"RIGHT":case"LEFT":se=(ce=ne-Z/2)<0?DEFAULT_PADDING$1:ce,le=de+((re="circle"===v?ie+oe+25:U+Y+25)+K-de)/2}if(-1!==se&&-1!==re&&-1!==le){!X&&se+Z>window.innerWidth&&(se=window.innerWidth-Z-J-ee-10),Q.style.left="".concat(se,"px"),Q.style.top="".concat(re,"px");var ue=((ce=Math.min(H,se))+Math.max(H+z,se+Z))/2;(ue=Math.min(ue,document.scrollingElement.scrollWidth))<0&&(ue=0),(le=Math.min(le,document.scrollingElement.scrollHeight))<0&&(le=0);var he=createSVGDiv({bg_color:r,opacity:C,innerRadius:oe,innerCenterX:ne,innerCenterY:ie,outerRadius:ae,outerCircleCenterX:ue,outerCircleCenterY:le,targetElementLeft:H,targetElementTop:U,targetElementWidth:z,targetElementHeight:Y,type:v,scroll_coachMark:c,element:e,dismiss_outside_touch:x,dismissCallback:fe});he.style.visibility="hidden",te.style.visibility="hidden",Q.style.visibility="hidden";var ge=null,fe=function(t){var i=!1,o=!1;void 0===t&&(o=!0);var a=e.getBoundingClientRect();void 0!==t&&t.clientX>=a.left&&t.clientX<=a.left+a.width&&t.clientY>=a.top&&t.clientY<=a.top+a.height&&(i=!0,B.logActionEvent("InlineTargetViewClicked",n.configId,n.configName,"coachmark")),(x||i||o)&&(i&&e.click&&e.click(),G())};i&&!0===i.auto_dismiss&&(ge=setTimeout((function(){return fe()}),b+i.duration)),he.style.visibility="visible",te.style.visibility="visible",Q.style.visibility="visible",Q.childElementCount>0&&(Q.children[0].style.visibility="visible"),x&&he.addEventListener("click",(function(){fe()})),te.addEventListener("click",fe),O&&("TOP"===k?window.scrollTo({top:le-ae,behavior:"smooth"}):"BOTTOM"===k&&window.scrollTo({top:Math.min(document.scrollingElement.scrollHeight,le+ae),behavior:"smooth"})),F.observe(document.body,{childList:!0,subtree:!0}),$.observe(e),o&&o()}else console.warn("Failed to identify the right place for text")}else console.warn("Can't show on an invisible element: ",I)}else console.warn("Element ",I," not in viewport. Can't show")}function showCoachmarkWithDelay(e,t,n,i,o){var a=window.ApxorRTM;if(null!==a.currentAction&&void 0!==a.currentAction){var r=t.configId,s=t.configName;return null==Apxor||Apxor.logEvent("apx_nudge_not_shown",{apx_nudge_type:"campaign",apx_nudge_id:r,apx_nudge_name:s,apx_variant_code:ceWrapper.getInstance().getVariantCode(r),apx_failure_type:"error",apx_reason:"An action is already being shown"}),void window.ApxorLogger.error("An action is already being shown. Try after it gets dismissed")}var c=t.configId;checkForNeverShow$1(c)&&(e&&e.delay<=0?showCoachmark(e,t,n,i,o):setTimeout((function(){if(null!==a.currentAction&&void 0!==a.currentAction){var r=t.configId,s=t.configName;return null==Apxor||Apxor.logEvent("apx_nudge_not_shown",{apx_nudge_type:"campaign",apx_nudge_id:r,apx_nudge_name:s,apx_variant_code:ceWrapper.getInstance().getVariantCode(r),apx_failure_type:"error",apx_reason:"An action is already being shown"}),void window.ApxorLogger.error("An action is already being shown. Try after it gets dismissed")}showCoachmark(e,t,n,i,o)}),e.delay))}var Border=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};_classCallCheck$1(this,e),this.radius=getNumberOrDefault(t.radius,0),this.color=getColorOrDefault(t.color,"#FFFFFF"),this.inactive_color=getColorOrDefault(t.inactive_color,"#FFFFFF"),this.width=getNumberOrDefault(t.width,0),this.style=getStringOrDefault(t.style,"solid")}return _createClass$1(e,null,[{key:"isEnabled",value:function(e){return!(isUndefined$2(e)||isNull$1(e)||isEmptyObject(e))}}]),e}(),DimBackground=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};_classCallCheck$1(this,e),this.opacity=getNumberOrDefault(t.opacity,.5),this.color=getColorOrDefault(t.color,"#FFF")}return _createClass$1(e,null,[{key:"isEnabled",value:function(e){return!(isUndefined$2(e)||isNull$1(e)||isEmptyObject(e))}}]),e}(),Direction=_createClass$1((function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};_classCallCheck$1(this,e),this.nudge=getStringOrDefault(convertTheDirectionCode(t.nudge),DIRECTION.VERTICAL),this.non_media=getStringOrDefault(convertTheDirectionCode(t.non_media),DIRECTION.VERTICAL),this.buttons=getStringOrDefault(convertTheDirectionCode(t.buttons),DIRECTION.HORIZONTAL)})),DismissActions=_createClass$1((function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};_classCallCheck$1(this,e),this.outside_touch=Boolean(t.outside_touch),this.target_touch=Boolean(t.target_touch)})),Padding=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};_classCallCheck$1(this,e),this.top=getNumberOrDefault(null==t?void 0:t.top,0),this.bottom=getNumberOrDefault(null==t?void 0:t.bottom,0),this.left=getNumberOrDefault(null==t?void 0:t.left,0),this.right=getNumberOrDefault(null==t?void 0:t.right,0)}return _createClass$1(e,null,[{key:"isEnabled",value:function(e){return!(isUndefined$2(e)||isNull$1(e)||isEmptyObject(e))}}]),e}(),Margin=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};_classCallCheck$1(this,e),this.top=getNumberOrDefault(null==t?void 0:t.top,0),this.bottom=getNumberOrDefault(null==t?void 0:t.bottom,0),this.left=getNumberOrDefault(null==t?void 0:t.left,0),this.right=getNumberOrDefault(null==t?void 0:t.right,0)}return _createClass$1(e,null,[{key:"isEnabled",value:function(e){return!(isUndefined$2(e)||isNull$1(e)||isEmptyObject(e))}}]),e}(),Font=_createClass$1((function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};_classCallCheck$1(this,e),"unknown format"===getFontFormatFromCustomFontURL(t.family)?this.family=getStringOrDefault(t.family,"sans-serif").toLowerCase():this.family=getStringOrDefault(t.family,"sans-serif"),this.size=getNumberOrDefault(t.size,"14"),this.style=getStringOrDefault(t.style,"bold").toLowerCase(),this.weight=t.weight})),Icon=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};_classCallCheck$1(this,e),this.position=getStringOrDefault(convertThePositionCode(null==t?void 0:t.position),"left"),this.path=getStringOrDefault(t.path,""),this.width=getNumberOrDefault(t.width,48),this.height=getNumberOrDefault(t.height,48),this.enable_margin=null==t?void 0:t.enable_margin,this.margin=new Margin(t.margin),this.enable_padding=null==t?void 0:t.enable_padding,this.padding=new Padding(t.padding),this.enable_border=null==t?void 0:t.enable_border,this.border=new Border(t.border),this.alignment=getStringOrDefault(t.alignment,CENTER)}return _createClass$1(e,null,[{key:"isEnabled",value:function(e){return!(isUndefined$2(e)||isNull$1(e)||isEmptyObject(e))}}]),e}(),Text=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};_classCallCheck$1(this,e),this.background_color=getColorOrDefault(null==t?void 0:t.background_color,"#FFF"),this.alignment=getStringOrDefault(t.alignment,"center").toLowerCase(),this.color=getColorOrDefault(t.color,"#FFF").toLowerCase(),this.font=new Font(t.font),this.text=getStringOrDefault(t.text,""),this.localized_messages=t.localized_messages,this.enable_margin=t.enable_margin,this.margin=new Margin(t.margin),this.enable_padding=t.enable_padding,this.padding=new Padding(t.padding),this.enable_icon=t.enable_icon,this.icon=new Icon(t.icon),this.link_config=t.link_config,this.is_dyn=null==t?void 0:t.is_dyn,this.is_dynamic_text=t.is_dynamic_text,this.is_dynamic_script=t.is_dynamic_script,this.script=t.script,this.segments=t.segments,this.quote=t.quote}return _createClass$1(e,null,[{key:"isEnabled",value:function(e){return!(isUndefined$2(e)||isNull$1(e)||isEmptyObject(e))}}]),e}(),Description=function(e){_inherits$1(n,e);var t=_createSuper(n);function n(){var e,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return _classCallCheck$1(this,n),(e=t.call(this,i)).is_title=!1,e.is_description=!0,e}return _createClass$1(n)}(Text),Title=function(e){_inherits$1(n,e);var t=_createSuper(n);function n(){var e,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return _classCallCheck$1(this,n),(e=t.call(this,i)).is_title=!0,e.is_description=!1,e}return _createClass$1(n)}(Text),BackgroundImage=_createClass$1((function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};_classCallCheck$1(this,e),this.mask_opacity=getNumberOrDefault(t.mask_opacity,.25),this.mask_color=getColorOrDefault(t.mask_color,"#000000")})),Image=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};_classCallCheck$1(this,e),this.path=getStringOrDefault(t.path,""),this.width=getNumberOrDefault(t.width,360),this.height=getNumberOrDefault(t.height,360),this.enable_background_image=t.enable_background_image,this.background_image&&(this.background_image=new BackgroundImage(t.background_image)),this.enable_border=t.enable_border,this.enable_border&&(this.border=new Border(t.border))}return _createClass$1(e,null,[{key:"isEnabled",value:function(e){return!(isUndefined$2(e)||isNull$1(e)||isEmptyObject(e))}}]),e}(),Gradient=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};_classCallCheck$1(this,e),this.direction=getStringOrDefault(t.direction,"to right"),this.colors=getArrayOrDefault(t.colors,["#FFF","000"])}return _createClass$1(e,null,[{key:"isEnabled",value:function(e){return!(isUndefined$2(e)||isNull$1(e)||isEmptyObject(e))}}]),e}(),NumberedStepper=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};_classCallCheck$1(this,e),this.style=getStringOrDefault(t.style,"number"),this.position=getStringOrDefault(t.position,"bottom-left"),this.font=new Font(t.font),this.color=getColorOrDefault(t.color,"#FFF")}return _createClass$1(e,null,[{key:"isEnabled",value:function(e){return!(isUndefined$2(e)||isNull$1(e)||isEmptyObject(e))}}]),e}(),Pagination=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};_classCallCheck$1(this,e),this.style=getStringOrDefault(t.style,"number"),this.position=getStringOrDefault(t.position,"bottom-left"),this.font=new Font(t.font),this.color=getColorOrDefault(t.color,"#FFF")}return _createClass$1(e,null,[{key:"isEnabled",value:function(e){return!(isUndefined$2(e)||isNull$1(e)||isEmptyObject(e))}}]),e}(),ProgressBar=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};_classCallCheck$1(this,e),this.position=getStringOrDefault(t.position,"top"),this.width=getNumberOrDefault(t.position,4),this.progress_color=getColorOrDefault(t.progress_color,"#000"),this.remaining_color=getColorOrDefault(t.remaining_color,"#FFFF")}return _createClass$1(e,null,[{key:"isEnabled",value:function(e){return!(isUndefined$2(e)||isNull$1(e)||isEmptyObject(e))}}]),e}(),Carousel=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};_classCallCheck$1(this,e),this.style=getStringOrDefault(t.style,"default"),this.spacebetween=this.position=getNumberOrDefault(t.space_between,4),this.active_radius=getNumberOrDefault(t.active_radius,4),this.inactive_radius=getNumberOrDefault(t.inactive_radius,2),this.active_color=getColorOrDefault(t.active_color,"#000000"),this.inactive_color=getColorOrDefault(t.inactive_color,"#FFF")}return _createClass$1(e,null,[{key:"isEnabled",value:function(e){return!(isUndefined$2(e)||isNull$1(e)||isEmptyObject(e))}}]),e}(),Stepper=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};_classCallCheck$1(this,e),this.index=getNumberOrDefault(t.index,1),this.length=getNumberOrDefault(t.length,1),this.enable_numbered=t.enable_numbered,this.enable_numbered&&(this.numbered=new NumberedStepper(t.numbered)),this.enable_pagination=t.enable_pagination,this.enable_pagination&&(this.pagination=new Pagination(t.pagination)),this.enable_carousel=t.enable_carousel,this.enable_carousel&&(this.carousel=new Carousel(t.carousel)),this.enable_progressbar=t.enable_progressbar,this.enable_progressbar&&(this.progressbar=new ProgressBar(t.progressbar)),this.type=null==t?void 0:t.type,this.pagination_text=new Text(null==t?void 0:t.pagination_text),this.enable_padding=null==t?void 0:t.enable_padding,this.enable_padding&&(this.padding=new Padding(t.padding)),this.enable_margin=null==t?void 0:t.enable_margin,this.enable_margin&&(this.margin=new Margin(t.margin))}return _createClass$1(e,null,[{key:"isEnabled",value:function(e){return!(isUndefined$2(e)||isNull$1(e)||isEmptyObject(e))}}]),e}(),Offset=_createClass$1((function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};_classCallCheck$1(this,e),this.skid=getNumberOrDefault(null==t?void 0:t.skid,0),this.distance=getNumberOrDefault(null==t?void 0:t.distance,0),this.x=getNumberOrDefault(null==t?void 0:t.x,0),this.y=getNumberOrDefault(null==t?void 0:t.y,0)})),Position=_createClass$1((function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};_classCallCheck$1(this,e),this.position=getStringOrDefault(convertThePositionCode(null==t?void 0:t.position),"top-left"),this.enable_offset=t.enable_offset,this.offset=new Offset(t.offset)})),CloseButton=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};_classCallCheck$1(this,e),this.color=getColorOrDefault(t.color,"#FFFFFF"),this.fill_color=getColorOrDefault(t.fill_color,"#FFFFFF"),this.type=getStringOrDefault(t.type,"normal"),this.path=t.path,this.height=getNumberOrDefault(t.height,24),this.width=getNumberOrDefault(t.width,24),this.offset_top=getNumberOrDefault(t.offset_top,8),this.offset_right=getNumberOrDefault(t.offset_right,8),this.action=getStringOrDefault(t.action,"dismiss"),this.shape=getStringOrDefault(t.shape,"circle"),null!=t&&t.position&&(this.position=new Position(t.position)),this.enable_margin=t.enable_margin,this.enable_margin&&(this.margin=new Margin(t.margin)),this.enable_padding=t.enable_padding,this.enable_padding&&(this.padding=new Padding(t.padding)),this.enable_border=t.enable_border,this.enable_border&&(this.border=new Border(t.border))}return _createClass$1(e,null,[{key:"isEnabled",value:function(e){return!(isUndefined$2(e)||isNull$1(e)||isEmptyObject(e))}}]),e}(),BackButton=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};_classCallCheck$1(this,e),this.path=t.path,this.type=getStringOrDefault(t.type,"normal"),this.color=getColorOrDefault(t.color,"#FFFFFF"),this.shape=getStringOrDefault(t.shape,"circle"),this.height=getNumberOrDefault(t.height,24),this.width=getNumberOrDefault(t.width,24),this.offset_top=getNumberOrDefault(t.offset_top,8),this.offset_left=getNumberOrDefault(t.offset_left,8),this.action=getStringOrDefault(null==t?void 0:t.action,"dismiss"),null!=t&&t.position&&(this.position=new Position(t.position)),this.enable_margin=t.enable_margin,this.enable_margin&&(this.margin=new Margin(t.margin)),this.enable_padding=t.enable_padding,this.enable_padding&&(this.padding=new Padding(t.padding)),this.enable_border=t.enable_border,this.enable_border&&(this.border=new Border(t.border))}return _createClass$1(e,null,[{key:"isEnabled",value:function(e){return!(isUndefined$2(e)||isNull$1(e)||isEmptyObject(e))}}]),e}(),Header=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};_classCallCheck$1(this,e),this.background_color=null==t?void 0:t.background_color,this.enable_stepper=t.enable_stepper,this.enable_stepper&&(this.stepper=new Stepper(t.stepper)),this.enable_close_button=t.enable_close_button,this.enable_close_button&&(this.closebutton=new CloseButton(t.close_button)),this.enable_back_button=t.enable_back_button,this.enable_back_button&&(this.backbutton=new BackButton(t.back_button)),this.enable_title=t.enable_title,this.enable_title&&(this.title=new Title(t.title)),this.enable_description=t.enable_description,this.enable_description&&(this.description=new Description(t.description)),this.enable_image=t.enable_image,this.enable_image&&(this.image=new Image(t.image)),this.enable_margin=t.enable_margin,this.enable_margin&&(this.margin=new Margin(t.margin)),this.enable_padding=t.enable_padding,this.enable_padding&&(this.padding=new Padding(t.padding)),this.enable_border=t.enable_border,this.enable_border&&(this.border=new Border(t.border)),this.enable_gradient=t.enable_gradient,this.enable_gradient&&(this.gradient=new Gradient(t.gradient))}return _createClass$1(e,null,[{key:"isEnabled",value:function(e){return!(isUndefined$2(e)||isNull$1(e)||isEmptyObject(e))}}]),e}(),SuccessMessage=_createClass$1((function e(t){_classCallCheck$1(this,e),this.background_color=getColorOrDefault(t.background_color,"#FFFFFF"),this.duration=1e3*getNumberOrDefault(t.duration,3),this.width=getNumberOrDefault(t.width,50),this.enable_icon=t.enable_icon,this.enable_icon&&(this.icon=new Icon(t.icon)),this.enable_title=t.enable_title,this.enable_title&&(this.title=new Title(t.title)),this.enable_description=t.enable_description,this.enable_description&&(this.description=new Description(t.description)),this.enable_gradient=t.enable_gradient,this.enable_gradient&&(this.gradient=new Gradient(t.gradient)),this.enable_border=t.enable_border,this.enable_border&&(this.border=new Border(t.border)),this.enable_margin=t.enable_margin,this.enable_margin&&(this.margin=new Margin(t.margin)),this.position=new Position(t.position)})),Labelelement=_createClass$1((function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};_classCallCheck$1(this,e),this.position=t.position,this.text=new Text(t.text)})),Labels=_createClass$1((function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};_classCallCheck$1(this,e),this.first_rating=new Labelelement(t.first_rating),this.last_rating=new Labelelement(t.last_rating)})),Question$1=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};_classCallCheck$1(this,e),this.id=null==t?void 0:t.id,this.paths=null==t?void 0:t.paths,this.paths_v2=null==t?void 0:t.paths_v2,this.enable_title=t.enable_title,this.enable_title&&(this.title=new Title(t.title)),this.enable_description=t.enable_description,this.enable_description&&(this.description=new Description(t.description)),this.enable_choice_prompt=t.enable_choice_prompt,this.enable_choice_prompt&&(this.choice_prompt=new Description(t.choice_prompt)),this.enable_icon=null==t?void 0:t.enable_icon,this.enable_icon&&(this.icon=new Icon(t.icon)),this.enable_margin=null==t?void 0:t.enable_margin,this.enable_margin&&(this.margin=new Margin(t.margin)),this.enable_padding=null==t?void 0:t.enable_padding,this.enable_padding&&(this.padding=new Padding(t.padding))}return _createClass$1(e,null,[{key:"isEnabled",value:function(e){return!(isUndefined$2(e)||isNull$1(e)||isEmptyObject(e))}}]),e}(),Suggestion=_createClass$1((function e(t){_classCallCheck$1(this,e),this.bg_color_active=t.bg_color_active,this.bg_color_inactive=t.bg_color_inactive,this.color_active=t.color_active,this.color_inactive=t.color_inactive,this.font=new Font(t.font),this.text=t.text,this.enable_padding=t.enable_padding,this.enable_padding&&(this.padding=new Padding(t.padding)),this.enable_margin=t.enable_margin,this.enable_margin&&(this.margin=new Margin(t.margin)),this.enable_border=t.enable_border,this.enable_border&&(this.border=new Border(t.border))})),QandS=function(){function e(t){_classCallCheck$1(this,e),this.start=t.start,this.end=t.end,this.enable_question=t.enable_question,this.enable_question&&(this.question=new Question$1(t.question)),this.enable_suggestion=t.enable_suggestion,this.enable_suggestion&&(this.suggestion=new Suggestion(t.suggestion)),this.enable_input_text=t.enable_input_text,this.enable_input_text&&(this.qandsInputAnswer="")}return _createClass$1(e,null,[{key:"isEnabled",value:function(e){return!(isUndefined$2(e)||isNull$1(e)||isEmptyObject(e))}}]),e}(),Shadow=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};_classCallCheck$1(this,e),this.color=getColorOrDefault(t.color,"#FFF"),this.offset_x=getNumberOrDefault(t.offset_x,0),this.offset_y=getNumberOrDefault(t.offset_y,0),this.blur_radius=getNumberOrDefault(t.blur_radius,0),this.spread_radius=getNumberOrDefault(t.spread_radius,0)}return _createClass$1(e,null,[{key:"isEnabled",value:function(e){return!(isUndefined$2(e)||isNull$1(e)||isEmptyObject(e))}}]),e}(),RatingButtons=_createClass$1((function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(_classCallCheck$1(this,e),this.type=t.type,this.start=t.start,this.end=t.end,this.start_from_index=0,0!==this.start&&(this.start_from_index=1),this.prev_selected_button=-1,this.selected_rating=[],this.start<this.end)for(var n=this.start;n<=this.end;n++)this.selected_rating.push(-1);else for(var i=this.end;i>=this.start;i--)this.selected_rating.push(-1);if(this.width=t.width,this.height=t.height,this.split_line=t.split_line,this.enable_fade=t.enable_fade||!1,this.enable_shadow=t.enable_shadow||!1,this.enable_shadow&&(this.shadow=new Shadow(t.shadow)),this.bg_color_active=getColorOrDefault(t.bg_color_active,"#FFF"),this.bg_color_inactive=getColorOrDefault(t.bg_color_inactive,"#FFF"),this.color_active=getColorOrDefault(t.color_active,"#FFF"),this.color_inactive=getColorOrDefault(t.color_inactive,"#FFF"),this.font=new Font(t.font),this.enable_box_model=t.enable_box_model||!1,this.enable_box_model&&(this.box_model=t.box_model),this.enable_colors=t.enable_colors,this.buttons=[],null!=t&&t.buttons&&0!==t.buttons.length)this.length=t.buttons.length,this.buttons=t.buttons;else{if(this.start>this.end){var o=[this.end,this.start];this.start=o[0],this.end=o[1]}for(var a=this.start;a<=this.end;a++){var r={};r.value=a,this.buttons.push(r)}}this.enable_border=t.enable_border,this.enable_border&&(this.border=t.border),this.enable_padding=t.enable_padding,this.enable_padding&&(this.padding=t.padding),this.enable_margin=t.enable_margin,this.enable_margin&&(this.margin=t.margin),this.prevSelectedRadioButton=-1,this.SelectedRadioButton=-1})),Reaction=_createClass$1((function e(t){_classCallCheck$1(this,e),this.start=t.start,this.end=t.end,this.enable_text=t.enable_text,this.enable_text&&(this.text=new Text(t.text)),this.text_position=t.text_position,this.enable_image=t.enable_image,this.enable_image&&(this.image=t.image)})),Rating=_createClass$1((function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(_classCallCheck$1(this,e),this.reactions=[],this.reaction_paths={},this.enable_reaction=!1,this.prevReactionIndex=-1,this.currReactionIndex=-1,null!=t&&t.reactions&&0!==t.reactions.length)for(var n=0;n<t.reactions.length;n++){this.enable_reaction=!0;for(var i=[],o=new Reaction(t.reactions[n]),a=o.start;a<=o.end;a++)i.push(parseInt(a));this.reaction_paths[n]=i,this.reactions.push(o)}this.ratingbuttons=new RatingButtons(t.buttons),this.enable_labels=t.enable_labels,this.enable_labels&&(this.ratingLabels=new Labels(t.labels)),this.QandSArray=[],this.qandsPaths={},this.enable_qands=!1,this.prevQandSArrayIndex=-1,this.stateOfQandS=[];for(var r=0;r<this.ratingbuttons.length;r++)this.stateOfQandS.push({suggestion:[],input_field:""});if(null!=t&&t.q_and_s&&0!==t.q_and_s.length)for(var s=0;s<t.q_and_s.length;s++){var c=new QandS(t.q_and_s[s]);this.enable_qands=!0;for(var l=[],d=c.start;d<=c.end;d++)l.push(parseInt(d));this.qandsPaths[s]=l,this.QandSArray.push(c)}})),List=function(){function e(t){_classCallCheck$1(this,e),this.id=t.id,this.value=t.value,this.is_other=t.is_other,this.next_question_id=t.next_question_id,this.is_selected=!1,this.other_answer="",this.d_type=getStringOrDefault(t.d_type,""),this.is_dyn=getStringOrDefault(t.is_dyn,!1),this.script=t.script||{},this.text=this.value}return _createClass$1(e,null,[{key:"isEnabled",value:function(e){return!(isUndefined$2(e)||isNull$1(e)||isEmptyObject(e))}}]),e}(),Choices=function(){function e(t){_classCallCheck$1(this,e),this.randomize_choices=null==t?void 0:t.randomize_choices,this.min_choices_enabled=null==t?void 0:t.min_choices_enabled,this.max_choices_enabled=null==t?void 0:t.max_choices_enabled,this.max_choices=null==t?void 0:t.max_choices,this.min_choices=null==t?void 0:t.min_choices,this.color_active=null==t?void 0:t.color_active,this.color_inactive=null==t?void 0:t.color_inactive,this.color_disable=null==t?void 0:t.color_disable,this.radio_color_active=null==t?void 0:t.radio_color_active,this.radio_color_inactive=null==t?void 0:t.radio_color_inactive,null!=t&&t.bg_type&&"normal"===t.bg_type?(this.choice_border_active=null==t?void 0:t.bg_color_active,this.choice_border_inactive=null==t?void 0:t.bg_color_inactive,this.bg_color_active="transparent",this.bg_color_inactive="transparent",this.bg_color_disable="transparent"):(this.bg_color_active=null==t?void 0:t.bg_color_active,this.bg_color_inactive=null==t?void 0:t.bg_color_inactive,this.bg_color_disable=null==t?void 0:t.bg_color_disable),this.before_parse_choices=t.list,this.list=[];for(var n=0;n<this.before_parse_choices.length;n++){var i=new List(this.before_parse_choices[n]);this.list.push(i)}this.enable_border=t.enable_border,this.enable_border&&(this.border=new Border(t.border)),this.randomize_choices&&(this.list=getShuffledArr(this.list))}return _createClass$1(e,null,[{key:"isEnabled",value:function(e){return!(isUndefined$2(e)||isNull$1(e)||isEmptyObject(e))}}]),e}(),InputText=_createClass$1((function e(t){_classCallCheck$1(this,e),this.id=null==t?void 0:t.id,this.background_color=getColorOrDefault(t.background_color,"#FFFFFF"),this.max_characters=t.max_characters||"150",this.enable_placeholder=t.enable_placeholder,this.enable_placeholder&&(this.placeholder=t.placeholder||{}),this.enable_border=t.enable_border,this.enable_border&&(this.border=t.border),this.text_color=t.text_color})),Scroll=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};_classCallCheck$1(this,e),this.height=getNumberOrDefault(t.height,400),this.enable_border=t.enable_border,this.border=new Border(t.border)}return _createClass$1(e,null,[{key:"isEnabled",value:function(e){return!(isUndefined$2(e)||isNull$1(e)||isEmptyObject(e))}}]),e}(),Answer=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};_classCallCheck$1(this,e),this.answer_mode=null==t?void 0:t.answer_mode,this.is_text_mandatory=null==t?void 0:t.is_text_mandatory,this.enable_scroll=t.enable_scroll||!1,this.enable_scroll&&(this.scroll=new Scroll(t.scroll)),this.background_color=getColorOrDefault(t.background_color),null!=t&&t.choices&&0!==Object.keys(t.choices).length&&(this.choices=new Choices(t.choices)),this.input_text={},null!=t&&t.input_text&&0!==Object.keys(t.input_text).length&&(this.input_text=new InputText(t.input_text),this.text_answer="",this.is_answered=!1),null!=t&&t.rating&&0!==Object.keys(t.rating).length&&(this.rating=new Rating(t.rating)),null!=t&&t.font&&(this.font=new Font(t.font)),this.enable_border=t.enable_border,this.enable_border&&(this.border=new Border(t.border)),this.enable_margin=t.enable_margin,this.enable_margin&&(this.margin=new Margin(t.margin)),this.enable_padding=t.enable_padding,this.enable_padding&&(this.padding=new Padding(t.padding))}return _createClass$1(e,null,[{key:"isEnabled",value:function(e){return!(isUndefined$2(e)||isNull$1(e)||isEmptyObject(e))}}]),e}(),Action=_createClass$1((function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};_classCallCheck$1(this,e),this.type=getStringOrDefault(t.type,"dismiss").toLowerCase(),this.url=getStringOrDefault(t.url,""),this.is_external=Boolean(t.is_external),this.is_ir=Boolean(t.is_ir),this.callback=t.callback||function(){},this.is_within=Boolean(t.is_within)})),Button=_createClass$1((function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};_classCallCheck$1(this,e),null!=t&&t.position&&(this.position=convertThePositionCode(new Position(t.position))),void 0===(null==t?void 0:t.slot)?this.slot=getSlotNumberByPosition(this.position.position):this.slot=getNumberOrDefault(t.slot,0),"wide"===(null==t?void 0:t.type)&&(this.slot=getSlotNumberByPosition("center")),this.type=getStringOrDefault(t.type,"button"),this.sub_type=getStringOrDefault(t.sub_type,""),this.fill_color=getColorOrDefault(t.fill_color,"#FFF"),this.color=getColorOrDefault(t.color||t.active_color,"#FFF"),this.active_color=getColorOrDefault(t.active_color,"#FFF"),this.inactive_color=getColorOrDefault(t.inactive_color,"#FFF"),this.enable_action=t.enable_action,this.action=new Action(t.action),this.enable_margin=t.enable_margin,this.margin=new Margin(t.margin),this.enable_padding=t.enable_padding,this.padding=new Padding(t.padding),this.enable_border=t.enable_border,this.border=new Border(t.border),this.enable_text=t.enable_text,this.text=new Text(t.text),this.enable_gradient=t.enable_gradient,this.gradient={},this.enable_gradient&&(this.gradient=new Gradient(t.gradient))})),BottomButton=function(e){_inherits$1(n,e);var t=_createSuper(n);function n(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return _classCallCheck$1(this,n),t.call(this,e)}return _createClass$1(n)}(Button),CenterButton=function(e){_inherits$1(n,e);var t=_createSuper(n);function n(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return _classCallCheck$1(this,n),t.call(this,e)}return _createClass$1(n)}(Button),FooterButton=function(e){_inherits$1(n,e);var t=_createSuper(n);function n(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return _classCallCheck$1(this,n),t.call(this,e)}return _createClass$1(n)}(Button),TopButton=function(e){_inherits$1(n,e);var t=_createSuper(n);function n(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return _classCallCheck$1(this,n),t.call(this,e)}return _createClass$1(n)}(Button),Buttons=_createClass$1((function e(){var t=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};_classCallCheck$1(this,e),this.background_color=n.background_color,this.enable_top=n.enable_top,this.enable_center=n.enable_center,this.enable_bottom=n.enable_bottom,this.bottom=[],this.center=[],this.top=[],this.buttons=[];var i=getArrayOrDefault(n.bottom,[]);i.forEach((function(e){t.bottom.push(new BottomButton(e))}));var o=getArrayOrDefault(n.center,[]);o.forEach((function(e){t.center.push(new CenterButton(e))}));var a=getArrayOrDefault(n.top,[]);a.forEach((function(e){t.top.push(new TopButton(e))}));var r=getArrayOrDefault(n.buttons,[]);r.forEach((function(e){t.buttons.push(new FooterButton(e))})),this.enable_margin=n.enable_margin,this.enable_margin&&(this.margin=new Margin(n.margin)),this.enable_padding=n.enable_padding,this.enable_padding&&(this.padding=new Padding(n.padding)),this.enable_border=n.enable_border,this.enable_border&&(this.border=new Border(n.border)),this.enable_gradient=n.enable_gradient,this.enable_gradient&&(this.gradient=new Gradient(n.gradient))})),QandA=_createClass$1((function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};_classCallCheck$1(this,e),this.q_and_a=[],this.questionIDs=[];for(var n=0;n<t.length;n++){var i=new Question$1(t[n].question);null!=i&&i.id&&this.questionIDs.push(i.id);var o=new Answer(t[n].answer),a=t[n].enable_footer,r=new Buttons(t[n].footer),s=getBooleanOrDefault(t[n].is_required,!1);this.q_and_a.push({question:i,answer:o,footer:r,is_required:s,enable_footer:a})}})),Survey=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};_classCallCheck$1(this,e),this.background_color=null==t?void 0:t.background_color,this.is_response_based_survey=null==t?void 0:t.is_response_based_survey,this.q_and_a=new QandA(null==t?void 0:t.q_and_a),this.enable_margin=t.enable_margin,this.enable_margin&&(this.margin=new Margin(t.margin)),this.enable_padding=t.enable_padding,this.enable_padding&&(this.padding=new Padding(t.padding)),this.enable_border=t.enable_border,this.enable_border&&(this.border=new Border(t.border)),this.enable_gradient=t.enable_gradient,this.enable_gradient&&(this.gradient=new Gradient(t.gradient))}return _createClass$1(e,null,[{key:"isEnabled",value:function(e){return!(isUndefined$2(e)||isNull$1(e)||isEmptyObject(e))}}]),e}(),SurveyRequestButton=function(e){_inherits$1(n,e);var t=_createSuper(n);function n(){var e,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return _classCallCheck$1(this,n),(e=t.call(this,i)).slot=void 0,e.enable_icon=i.enable_icon,e.enable_icon&&(e.icon=new Icon(i.icon)),e}return _createClass$1(n)}(BottomButton),Surveyrequest=_createClass$1((function e(t){var n=this;_classCallCheck$1(this,e),this.background_color=getColorOrDefault(t.background_color,"#FFFFFF"),this.width=getNumberOrDefault(t.width,50),this.position=new Position(t.position),this.enable_border=t.enable_border,this.border=new Border(t.border),this.enable_margin=t.enable_margin,this.enable_margin&&(this.margin=new Margin(t.margin)),this.enable_close_button=t.enable_close_button||!1,this.enable_close_button&&(this.closebutton=new CloseButton(t.close_button)),this.enable_icon=t.enable_icon,this.enable_icon&&(this.icon=new Icon(t.icon)),this.enable_title=t.enable_title,this.enable_title&&(this.title=new Title(t.title)),this.enable_description=t.enable_description,this.enable_description&&(this.description=new Description(t.description)),this.buttons=[],this.buttons_position=getStringOrDefault(convertThePositionCodeToFLexBoxPosition(t.buttons_container.buttons_position),"flex-end"),this.buttons_direction=getStringOrDefault(convertTheDirectionCode(t.buttons_container.buttons_direction),DIRECTION.HORIZONTAL),this.enable_buttons_container_margin=t.buttons_container.enable_margin,this.enable_buttons_container_margin&&(this.buttons_container_margin=new Margin(t.buttons_container.margin)),getArrayOrDefault(t.buttons_container.buttons,[]).forEach((function(e){n.buttons.push(new SurveyRequestButton(e))}))})),Logger$8=window.ApxorLogger,NewSurveys=function(){function e(t,n,i,o,a,r,s){var c=this;if(_classCallCheck$1(this,e),_defineProperty$1(this,"_getAnswerForQuestion",(function(e){var t;if(e>=c.QandAArray.length)return null;var n=c.QandAArray[e].question,i=c.QandAArray[e].answer;if(!n)return null;n.id;var o=i.answer_mode,a=void 0===o?"":o,r=i.choices,s=void 0===r?{}:r,l=i.input_text,d=void 0===l?{}:l,p=i.text_answer,u=void 0===p?{}:p,h=i.is_answered,g=void 0!==h&&h,f=null==s?void 0:s.list,m={answers:[],answerTexts:[],others:[]};switch(a){case"single_choice":case"multi_choice":f.forEach((function(e){e.is_selected&&(m.answers.push(e.id),m.answerTexts.push(e.value),e.is_other&&(m.isOtherChoiceSelected=!0),e.is_other&&null!==e.other_answer&&""!==e.other_answer.trim()&&m.others.push(e.other_answer))}));break;case"text":g&&""!==u&&""!==u.trim()&&null!==d&&m.answerTexts.push(u);break;case"rating":if(null!=c&&null!==(t=c.ratingButtons)&&void 0!==t&&t.selected_rating.includes(1)){var _,v,b,y,x;m.answers.push(parseInt(null===(_=c.ratingButtons)||void 0===_?void 0:_.buttons[c.ratingButtons.selected_rating.indexOf(1)].value)),m.answerTexts.push(parseInt(null===(v=c.ratingButtons)||void 0===v?void 0:v.buttons[c.ratingButtons.selected_rating.indexOf(1)].value));var w,C,E,k,S=c.ratingButtons.selected_rating.indexOf(1),T=c.getcurrentQandSArrayIndexFromQandSPaths(c.rating,parseInt(c.ratingButtons.start_from_index+S));if(null!==(b=c.QandSArray[T])&&void 0!==b&&b.enable_question)m.apx_nps_advanced_question=null!==(w=null===(C=c.QandSArray[T])||void 0===C||null===(C=C.question)||void 0===C||null===(C=C.title)||void 0===C?void 0:C.text)&&void 0!==w?w:"";if(null!==(y=c.QandSArray[T])&&void 0!==y&&y.enable_input_text)m.apx_nps_advanced_free_text=null!==(E=null===(k=c.rating.stateOfQandS[S])||void 0===k?void 0:k.input_field)&&void 0!==E?E:"";null!==(x=c.QandSArray[T])&&void 0!==x&&x.enable_suggestion&&(m.apx_nps_advanced_choice=c.rating.stateOfQandS[S].suggestion.map((function(e){return c.QandSArray[T].suggestion.text[e]})))}}return m})),_defineProperty$1(this,"_submitSurveyResponses",(function(e){e&&c.enable_success_message&&c._enableSuccessMessageContainer();var t={survey_id:c.configId,name:c.name,responses:[]};if(c.QandAArray.forEach((function(e,n){var i=c._getAnswerForQuestion(n),o=e.question;if(i){var a={question_id:o.id,answers_id:i.answers,answer_text:i.answerTexts};i.others.length>0&&(a.others=i.others),t.responses.push(a)}})),t.responses.length>0){var n=Math.pow(10,3);t.time_taken=Math.round((Date.now()-c.startTime)/1e3*n)/n;var i=Apxor.getController(),o=i.getFromStorage("_apx_cd",!0).session_info.launch_time;t.session_id=Apxor.getSessionId(),t.is_completed=e,t.app_version=i.getFromStorage("apx_ver",!1),t.device_uuid=Apxor.getClientId(),t.launch_time=o,t.user_attributes=i.getUserAttributes(),t.session_attributes=i.getSessionAttributes()}e&&setTimeout((function(){c._logSurveyAppEvent("apx_survey_completed",{apx_survey_id:c.configId,apx_survey_name:c.name,apx_survey_type:!0,apx_time_to_complete:Math.round((Date.now()-c.startTime)/1e3),campaign_type:"survey"})}),200)})),_defineProperty$1(this,"_sendReponseToServer",(function(e){var t=SURVEY_RESPONSE_URL.replace("<app_id>",Apxor.getSiteId());console.log(JSON.stringify(e)),fetch(t,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})})),_defineProperty$1(this,"_logSurveyAppEvent",(function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=null===(t=window.ApxorRTM)||void 0===t?void 0:t.getCampaignMeta(c.configId),o=i._attr;Apxor.logEvent(e,_objectSpread2$1(_objectSpread2$1({apx_survey_id:c.configId,apx_survey_name:c.name},n),o))})),_defineProperty$1(this,"_logSurveyQuestionEvent",(function(e){var t,n=c._getAnswerForQuestion(e),i=[];n.answerTexts.length>0&&n.answerTexts.forEach((function(e){i.push(e)}));var o={},a=c.QandAArray[e].question,r=c.QandAArray[e].answer;a.id;var s=r.answer_mode;r.choices,r.input_text,r.text_answer,r.is_answered,"single_choice"===s||"multi_choice"===s?(o.apx_choice=n.answerTexts,o.apx_free_text=n.others):"text"===s?(o.apx_choice="",o.apx_free_text=i):"rating"===s&&(o.apx_choice=n.answerTexts,o.apx_nps_advanced_question=n.apx_nps_advanced_question,o.apx_nps_advanced_choice=n.apx_nps_advanced_choice,o.apx_nps_advanced_free_text=n.apx_nps_advanced_free_text),c._logSurveyAppEvent("apx_survey_question_answered",_objectSpread2$1(_objectSpread2$1({apx_question_id:c.QandAArray[c.index].question.id,apx_question_name:null!==(t=c.QandAArray[c.index].question.title.text)&&void 0!==t?t:"",apx_question_type:c.QandAArray[c.index].answer.answer_mode,apx_question_position:c.index+1,apx_survey_id:c.configId,apx_survey_name:c.name,apx_survey_type:!0},o),{},{campaign_type:"survey"})),c.freeTextValue=""})),this.configId=t,this.name=n,this.uis=o,this.rtmInstance=a,this.showCallback=r,this.closeCallback=s,i){var l,d,p,u;if(this.delay=i.delay,this.width=i.width,this.height=i.height,this.background_color=i.background_color,this.cssPostFix="-".concat(t,"-").concat(n).replaceAll(" ","").replace(/[^\w\s]/gi,""),this.is_response_based_survey=i.is_response_based_survey,this.direction=new Direction(i.direction),this.position=new Position(i.position),this.enable_survey_request=i.enable_survey_request_latest,this.enable_survey_request&&(this.surveyrequest=new Surveyrequest(i.survey_request)),this.enable_dismiss_actions=i.enable_dismiss_actions,this.enable_dismiss_actions&&(this.dismiss_actions=new DismissActions(i.dismiss_actions)),this.enable_dimbackground=i.enable_dimbackground,this.enable_dimbackground&&(this.dimbackground=new DimBackground(i.dimbackground)),this.enable_padding=i.enable_padding,this.enable_padding&&(this.padding=new Padding(i.padding)),this.enable_margin=i.enable_margin,this.enable_margin&&(this.margin=new Margin(i.margin)),this.enable_border=i.enable_border,this.enable_border&&(this.border=new Border(i.border)),this.enable_success_message=i.enable_success_message_latest,this.enable_success_message&&(this.success_message=new SuccessMessage(i.success_message)),this.enable_progressbar=i.enable_progressbar,this.enable_progressbar&&(this.progressbar=new ProgressBar(i.progressbar)),this.enable_header=i.enable_header,this.enable_header&&(this.header=new Header(i.header)),this.header_close_icon=!1,this.enable_header&&(this.header_close_icon=i.header.enable_close_button),this.enable_close_icon=null==i||null===(l=i.survey)||void 0===l?void 0:l.enable_close_button,this.enable_close_icon)this.closeButton=null==i||null===(u=i.survey)||void 0===u?void 0:u.close_button;this.survey=new Survey(i.survey),this.QandAArray=null===(d=this.survey)||void 0===d||null===(d=d.q_and_a)||void 0===d?void 0:d.q_and_a,this.QandArrayLength=this.QandAArray.length,this.index=0,this.questionids=null===(p=this.survey)||void 0===p||null===(p=p.q_and_a)||void 0===p?void 0:p.questionIDs,this.visitedQuestion=[-1],this.overlayElement=null,this.surveylaunched=!1,this.freeTextValue="",this.bottomRatingDiv=null,this.ratingDiv=null,this.ceInstance=ceWrapper.getInstance(),this._setSurveyDimensions()}}return _createClass$1(e,[{key:"showNewSurvey",value:function(){try{this._canCreateSurvey()&&(this.createSurvey(),this.showCallback(),this.startTime=Date.now())}catch(e){this._resetRTMAction()}}},{key:"_canCreateSurvey",value:function(){return!(null!==this.rtmInstance.currentAction&&void 0!==this.rtmInstance.currentAction||this.rtmInstance.isShowingAction)||(null==Apxor||Apxor.logEvent("apx_nudge_not_shown",{apx_nudge_type:"survey",apx_nudge_id:this.configId,apx_nudge_name:this.name,apx_variant_code:this.ceInstance.getVariantCode(this.configId),apx_failure_type:"error",apx_reason:"An action is already being shown"}),Logger$8.info("A survey is being shown,can not show another survey"),!1)}},{key:"_resetRTMAction",value:function(){this.closeCallback()}},{key:"createSurvey",value:function(){this.enable_survey_request?(this.overlayElement=document.createElement("div"),this.overlayElement.classList.add("apxor-survey-overlay".concat(this.cssPostFix)),this.enable_dimbackground&&(this.dimBackgroundElement=document.createElement("div"),this.dimBackgroundElement.classList.add("apxor-survey-dimbackground-overlay".concat(this.cssPostFix)),this.overlayElement.appendChild(this.dimBackgroundElement)),document.body.appendChild(this.overlayElement),this._setSurveyRequestStyles(),this._createSurveyRequestContent()):(this._setBackgroundOverlay(),this._setStyles(),this._setSurveyContent())}},{key:"_setSurveyDimensions",value:function(){var e=this.width/100;this.enable_header&&this.header.enable_image?this._setDimenstionFromResolution(this.header.image.width,this.header.image.height,e,!1):this.width="".concat(this.width,"%")}},{key:"_setDimenstionFromResolution",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:.5,i=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=getHeightWidthFromResolution({width:e,height:t},n,i);this.media_width="".concat(o.width,"px"),this.media_height="".concat(o.height,"px"),this.width="".concat(o.width,"px")}},{key:"_setBackgroundOverlay",value:function(){this.overlayElement=document.createElement("div"),this.overlayElement.classList.add("apxor-survey-overlay".concat(this.cssPostFix)),this.enable_dimbackground&&(this.dimBackgroundElement=document.createElement("div"),this.dimBackgroundElement.classList.add("apxor-survey-dimbackground-overlay".concat(this.cssPostFix)),this.overlayElement.appendChild(this.dimBackgroundElement)),document.body.appendChild(this.overlayElement)}},{key:"_setStyles",value:function(){var e=" \n ".concat(this._setBackgroundOverlaystyles(),"\n ").concat(this._getSurveyContainerStyles(),"\n ").concat(this._getHeaderContainerStyles(),"\n ").concat(this._getHeaderTopContainerStyles(),"\n ").concat(this._getHeaderTopPaginationContainerStyles(),"\n ").concat(this._getHeaderImageContainerStyles(),"\n ").concat(this._getProgressBarStyles(),"\n ").concat(this._getNumberedStepperStyles(),"\n ").concat(this._getBackButtonStyles(),"\n ").concat(this._getQandAcontainerStyles(),"\n ").concat(this._getSuccessIconStyles(),"\n ").concat(this._getNpsTopContainerStyles(),"\n ").concat(this._getRatingBlockStyles(),"\n ").concat(this.getNpsQandSContainerStyles(),"\n ").replaceAll("\n","").replace(/[\s]{2,999}/g,""),t=document.createElement("style");t.innerHTML=e,this.overlayElement.appendChild(t)}},{key:"_setBackgroundOverlaystyles",value:function(){var e="";return this.enable_dimbackground&&(e="\n background:".concat(this.dimbackground.color,";\n opacity:").concat(this.dimbackground.opacity,";\n ")),"\n .apxor-survey-overlay".concat(this.cssPostFix," {\n width:100%;\n height:100%;\n }\n .apxor-survey-dimbackground-overlay").concat(this.cssPostFix," {\n width:100%;\n height:100%;\n position:fixed;\n top:0;\n left:0;\n z-index:999;\n ").concat(e,"\n overflow: auto;\n }")}},{key:"_getSurveyContainerStyles",value:function(){var e=this.enable_border?this.border.width:0,t=e,n=e,i=e,o=e;this.enable_padding&&(t+=this.padding.top,n+=this.padding.left,i+=this.padding.right,o+=this.padding.bottom),this.enable_margin&&(t+=this.margin.top,n+=this.margin.left,i+=this.margin.right,o+=this.margin.bottom);var a="";switch(this.position.position){case"top-left":a="\n top:".concat(t,"px;\n left:").concat(n,"px;\n ");break;case"top-center":a="\n left:50%;\n top:".concat(t,"px;\n -webkit-transform: translate(-50%, ").concat(.1*t,"px);\n -moz-transform: translate(-50%, ").concat(t,"px);\n ");break;case"top-right":a="\n top:".concat(t,"px;\n right:").concat(i,"px;\n ");break;case"bottom-left":a="\n bottom:".concat(o,"px;\n left:").concat(n,"px;\n ");break;case"bottom-center":a="\n left:50%;\n bottom:".concat(o,"px;\n -webkit-transform: translate(-50%, ").concat(.1*o,"px);\n -moz-transform: translate(-50%, ").concat(o,"px);\n ");break;case"bottom-right":a="\n bottom:".concat(o,"px;\n right:").concat(i,"px;\n ");break;case"left":a="\n left:".concat(n,"px;\n top:50%;\n -webkit-transform: translate(").concat(.1*n,"px, -50%);\n -moz-transform: translate(").concat(n,"px, -50%);\n ");break;case"right":a="\n right:".concat(i,"px;\n top:50%;\n -webkit-transform: translate(").concat(.1*i,"px, -50%);\n -moz-transform: translate(").concat(i,"px, -50%);\n ");break;default:a="\n left:50%;\n top:50%;\n -webkit-transform: translate(-50%, -50%);\n -moz-transform: translate(-50%, -50%);\n "}var r="";this.enable_margin&&(r="\n margin:".concat(this.margin.top,"px ").concat(this.margin.right,"px ").concat(this.margin.bottom,"px ").concat(this.margin.left,"px;\n "));var s="";this.enable_padding&&(s="\n padding:".concat(this.padding.top,"px ").concat(this.padding.right,"px ").concat(this.padding.bottom,"px ").concat(this.padding.left,"px;\n "));var c="";return this.enable_border&&(c="\n border-radius: ".concat(this.border.radius,"px;\n border: ").concat(this.border.width,"px ").concat(this.border.style," ").concat(this.border.color,";\n ")),"\n .apxor-survey-container".concat(this.cssPostFix,"{\n width:").concat(this.width,";\n height:auto;\n max-height:").concat(this.height,"%;\n overflow:auto;\n display:flex;\n flex-direction:column;\n background:").concat(this.background_color,";\n position:fixed;\n z-index:999999;\n transition:all .5s cubic-bezier(.96,.23,.07,.8);\n ").concat(a,";\n ").concat(r,";\n ").concat(s,";\n ").concat(c,";\n }")}},{key:"_getHeaderContainerStyles",value:function(){var e,t="";if(this.header_close_icon&&(e=this.header.closebutton.height+this.header.closebutton.margin.bottom+this.header.closebutton.margin.top+2*this.header.border.width),this.enable_header){var n="";this.header.enable_margin&&(n="\n margin:".concat(this.header.margin.top,"px ").concat(this.header.margin.right,"px ").concat(this.header.margin.bottom,"px ").concat(this.header.margin.left,"px;\n "));var i="";this.header.enable_padding&&(i="\n padding:".concat(this.header.padding.top,"px ").concat(this.header.padding.right,"px ").concat(this.header.padding.bottom,"px ").concat(this.header.padding.left,"px;\n "));var o="";this.header.enable_border&&(o="\n border-radius: ".concat(this.header.border.radius,"px;\n border: ").concat(this.header.border.width,"px ").concat(this.header.border.style," ").concat(this.header.border.color,";\n "));var a="";this.header.enable_gradient&&this.header.enable_gradient&&(a="\n background-image:linear-gradient(".concat(this.header.gradient.direction,", ").concat(this.header.gradient.colors[0],", ").concat(this.header.gradient.colors[1],");\n "));var r="";if(this.header.enable_image){var s=this.header.image.path;this.header.image.enable_background_image&&(r="background-image:url('".concat(s,"');background-repeat:no-repeat;width:auto;background-size:cover;height:auto;"))}t="\n .apxor-header-container".concat(this.cssPostFix,"{\n display:flex;\n flex-direction: column;\n ").concat(this.header_close_icon?"min-height: ".concat(e,"px;"):"",";\n background:").concat(this.header.background_color,";\n ").concat(n,";\n ").concat(i,";\n ").concat(o,";\n ").concat(a,";\n ").concat(r,";\n }")}return t}},{key:"_getHeaderTopContainerStyles",value:function(){var e="";return this.enable_header&&(e="\n .apxor-survey-header-top-container".concat(this.cssPostFix,"{\n width:100%;\n height:auto;\n }")),e}},{key:"_getHeaderTopPaginationContainerStyles",value:function(){var e="";if(this.enable_header){var t,n=this.header.enable_title||this.header.enable_description||!this.header.enable_image||null!==(t=this.header)&&void 0!==t&&null!==(t=t.image)&&void 0!==t&&t.enable_background_image?"position:relative;":"position:absolute;";e="\n .apxor-survey-pagination-button".concat(this.cssPostFix,"{\n ").concat(n,"\n display:flex;\n justify-content:center;\n width:100%;\n height:auto;\n }")}return e}},{key:"_getHeaderImageContainerStyles",value:function(){var e="";return this.enable_header&&this.header.enable_image&&(e=this.header.image.enable_background_image?"\n .apxor-survey-header-image".concat(this.cssPostFix,"{\n background:url('").concat(this.header.image.path,"') no-repeat 50% 50%;\n box-shadow: inset ").concat(this.header.image.width,"px ").concat(this.header.image.height,"px 0px 0px ").concat(hexToRGB(this.header.image.background_image.mask_color,this.header.image.background_image.mask_opacity),",inset -").concat(this.header.image.width,"px -").concat(this.header.image.height,"px 0px 0px ").concat(hexToRGB(this.header.image.background_image.mask_color,this.header.image.background_image.mask_opacity),";\n background-size:").concat(this.media_width," ").concat(this.media_height,";\n }\n "):"\n .apxor-survey-header-image-div".concat(this.cssPostFix,"{\n display:flex;\n }\n .apxor-survey-header-image").concat(this.cssPostFix,"{\n height: ").concat(this.media_height,";\n width: ").concat(this.media_width,";\n }\n ")),e}},{key:"_getProgressBarStyles",value:function(){var e="";return this.enable_progressbar&&(e="\n .apxor-survey-progress-bar".concat(this.cssPostFix,"{\n position:relative;\n width:100%;\n height:").concat(this.progressbar.width,"px;\n ").concat("top"===this.progressbar.position?"top:0px;":"bottom:0px;","\n left:0px;\n z-index:999999;\n overflow:hidden;\n cursor: pointer;\n background:").concat(this.progressbar.remaining_color||"transparent",";\n }\n .apxor-survey-bar").concat(this.cssPostFix,"{\n width:100%;\n height:100%;\n background:").concat(this.progressbar.progress_color,";\n }")),e}},{key:"_getNumberedStepperStyles",value:function(){var e="",t="";if(this.enable_header&&this.header.enable_stepper){var n=_setFontFaceAtRule(this.header.stepper.pagination_text.font);t="\n font-family:".concat(n[0],";\n font-size: ").concat(this.header.stepper.pagination_text.font.size,"px;\n font-style:").concat(this.header.stepper.pagination_text.font.style,";\n font-weight:").concat(this.header.stepper.pagination_text.font.weight,";\n color:").concat(this.header.stepper.pagination_text.color,";\n ");var i="";this.header.stepper.pagination_text.enable_padding&&(i="\n padding:".concat(this.header.stepper.pagination_text.padding.top,"px ").concat(this.header.stepper.pagination_text.padding.right,"px ").concat(this.header.stepper.pagination_text.padding.bottom,"px ").concat(this.header.stepper.pagination_text.padding.left,"px"));var o="";this.header.stepper.pagination_text.enable_margin&&(o="\n margin:".concat(this.header.stepper.pagination_text.margin.top||12,"px ").concat(this.header.stepper.pagination_text.margin.right,"px ").concat(this.header.stepper.pagination_text.margin.bottom,"px ").concat(this.header.stepper.pagination_text.margin.left,"px")),e="\n ".concat(n[1],"\n .stepper-").concat(this.header.stepper.type,"{\n ").concat(t,";\n ").concat(i,";\n ").concat(o,";\n }")}return e}},{key:"_getCloseButtonStyles",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n="",i="";e.enable_padding&&(i="\n padding:".concat(e.padding.top,"px ").concat(e.padding.right,"px ").concat(e.padding.bottom,"px ").concat(e.padding.left,"px"));var o="";e.enable_margin&&(o="\n margin:".concat(e.margin.top,"px ").concat(e.margin.right,"px ").concat(e.margin.bottom,"px ").concat(e.margin.left,"px"));var a="";e.enable_border&&(a="\n border:".concat(e.border.width,"px ").concat(e.border.style," ").concat(e.border.color,";\n border-radius:").concat(e.border.radius,"px"));var r,s,c,l,d="";null!=e&&e.position&&(d="top-right"===e.position.position||"TR"===e.position.position?"\n right:0px;\n -webkit-transform:translate(".concat(-(null===(r=e.position)||void 0===r||null===(r=r.offset)||void 0===r?void 0:r.x),"px,").concat(null===(s=e.position)||void 0===s||null===(s=s.offset)||void 0===s?void 0:s.y,"px);\n "):"\n left:0px;\n -webkit-transform:translate(-".concat(null===(c=e.position)||void 0===c||null===(c=c.offset)||void 0===c?void 0:c.x,"px,").concat(null===(l=e.position)||void 0===l?void 0:l.offset.y,"px);\n "));n="\n .apxor-".concat(t,"close-button").concat(this.cssPostFix,"{\n position:absolute;\n display:flex;\n text-align:center;\n top:0px;\n cursor:pointer;\n ").concat(d,";\n ").concat(i,";\n ").concat(o,";\n ").concat(a,";\n }").replaceAll("\n","").replace(/[\s]{2,999}/g,"");var p=document.createElement("style");return p.innerHTML=n,this.overlayElement.appendChild(p),n}},{key:"_getBackButtonStyles",value:function(){var e="";if(this.enable_header&&this.header.enable_back_button){var t,n="";this.header.backbutton.enable_padding&&(n="\n padding:".concat(this.header.backbutton.padding.top,"px ").concat(this.header.backbutton.padding.right,"px ").concat(this.header.backbutton.padding.bottom,"px ").concat(this.header.backbutton.padding.left,"px"));var i="";this.header.backbutton.enable_margin&&(i="\n margin:".concat(this.header.backbutton.margin.top,"px ").concat(this.header.backbutton.margin.right,"px ").concat(this.header.backbutton.margin.bottom,"px ").concat(this.header.backbutton.margin.left,"px"));var o="";this.header.backbutton.enable_border&&(o="\n border:".concat(this.header.backbutton.border.width,"px ").concat(this.header.backbutton.border.style," ").concat(this.header.backbutton.border.color,";\n border-radius:").concat(this.header.backbutton.border.radius,"px"));var a="";null!==(t=this.header.backbutton)&&void 0!==t&&t.position&&(a="top-left"===this.header.backbutton.position.position?"\n left:0px;\n -webkit-transform:translate(".concat(this.header.backbutton.position.offset.skid,"px,").concat(this.header.backbutton.position.offset.distance,"px)\n "):"\n right:0px;"),e="\n .apxor-back-button".concat(this.cssPostFix,"{\n position:absolute;\n display:flex;\n cursor:pointer;\n text-align:center;\n top:0px;\n ").concat(a,";\n ").concat(n,";\n ").concat(i,";\n ").concat(o,";\n }")}return e}},{key:"_getQandAcontainerStyles",value:function(){var e="";this.survey.enable_margin&&(e="\n margin:".concat(this.survey.margin.top,"px ").concat(this.survey.margin.right,"px ").concat(this.survey.margin.bottom,"px ").concat(this.survey.margin.left,"px\n "));var t="";this.survey.enable_padding&&(t="\n padding:".concat(this.survey.padding.top,"px ").concat(this.survey.padding.right,"px ").concat(this.survey.padding.bottom,"px ").concat(this.survey.padding.left,"px\n "));var n="";this.survey.enable_border&&(n="\n border-radius: ".concat(this.survey.border.radius,"px;\n border: ").concat(this.survey.border.width,"px ").concat(this.survey.border.style," ").concat(this.survey.border.color,";\n "));var i="";return this.survey.enable_gradient&&(i="\n background-image:linear-gradient(".concat(this.survey.gradient.direction,", ").concat(this.survey.gradient.colors[0],", ").concat(this.survey.gradient.colors[1],");\n ")),"\n .apxor-survey-QandA-container".concat(this.cssPostFix,"{\n background-color:").concat(this.survey.background_color,";\n ").concat(e,";\n ").concat(t,";\n ").concat(n,";\n ").concat(i,";\n overflow:auto;\n }")}},{key:"_getAnswerContainerStyles",value:function(){var e,t="\n .apxor-survey-answer-container".concat(this.cssPostFix,"{\n display:flex;\n flex-direction:column;\n background:").concat(null===(e=this.answer)||void 0===e?void 0:e.background_color,"\n }").replaceAll("\n","").replace(/[\s]{2,999}/g,""),n=document.createElement("style");n.innerHTML=t,this.overlayElement.appendChild(n)}},{key:"_getSuccessIconStyles",value:function(){var e="";if(this.enable_success_message&&this.success_message.enable_icon){var t="",n=this.success_message.icon;n.enable_margin&&(t="\n margin:".concat(n.margin.top,"px ").concat(n.margin.right,"px ").concat(n.margin.bottom,"px ").concat(n.margin.left,"px\n "));var i="";n.enable_padding&&(i="\n padding:".concat(n.padding.top,"px ").concat(n.padding.right,"px ").concat(n.padding.bottom,"px ").concat(n.padding.left,"px\n "));var o="";n.enable_border&&(o="\n border-radius: ".concat(n.border.radius,"px;\n border: ").concat(n.border.width,"px ").concat(n.border.style," ").concat(n.border.color,";\n ")),e="\n .apxor-success-icon-container".concat(this.cssPostFix,"{\n text-align:center;\n }\n .apxor-success-icon-content").concat(this.cssPostFix,"{\n height:").concat(n.height,"px;\n width:").concat(n.width,"px;\n ").concat(t,";\n ").concat(i,";\n ").concat(o,";\n }")}return e}},{key:"_setBottomButtonStyles",value:function(){var e="";this.footer.enable_margin&&(e="\n margin:".concat(this.footer.margin.top,"px ").concat(this.footer.margin.right,"px ").concat(this.footer.margin.bottom,"px ").concat(this.footer.margin.left,"px\n "));var t="";this.footer.enable_padding&&(t="\n padding:".concat(this.footer.padding.top,"px ").concat(this.footer.padding.right,"px ").concat(this.footer.padding.bottom,"px ").concat(this.footer.padding.left,"px\n "));var n="";this.footer.enable_border&&(n="\n border-radius: ".concat(this.footer.border.radius,"px;\n border: ").concat(this.footer.border.width,"px ").concat(this.footer.border.style," ").concat(this.footer.border.color,";\n "));var i="";this.footer.enable_gradient&&(i="\n background-image:linear-gradient(".concat(this.footer.gradient.direction,", ").concat(this.footer.gradient.colors[0],", ").concat(this.footer.gradient.colors[1],");\n "));var o="\n .apxor-survey-button-container".concat(this.cssPostFix,"{\n display:flex;\n justify-content:center;\n background:").concat(this.footer.background_color,";\n ").concat(e,";\n ").concat(t,";\n ").concat(n,";\n ").concat(i,";\n }\n ").replaceAll("\n","").replace(/[\s]{2,999}/g,""),a=document.createElement("style");a.innerHTML=o,this.overlayElement.appendChild(a)}},{key:"_getQuestionContainerStyles",value:function(e){var t="";e.enable_margin&&(t="\n margin:".concat(e.margin.top,"px ").concat(e.margin.right,"px ").concat(e.margin.bottom,"px ").concat(e.margin.left,"px\n "));var n="";e.enable_padding&&(n="\n padding:".concat(e.padding.top,"px ").concat(e.padding.right,"px ").concat(e.padding.bottom,"px ").concat(e.padding.left,"px\n "));var i="\n .apxor-survey-question-container-".concat(e.id).concat(this.cssPostFix,"{\n background:").concat(e.background_color,";\n ").concat(t,";\n ").concat(n,";\n }").replaceAll("\n","").replace(/[\s]{2,999}/g,""),o=document.createElement("style");o.innerHTML=i,this.overlayElement.appendChild(o)}},{key:"_getTitleStyles",value:function(e,t){var n="";e.enable_margin&&(n="\n margin:".concat(e.margin.top,"px ").concat(e.margin.right,"px ").concat(e.margin.bottom,"px ").concat(e.margin.left,"px\n "));var i="";e.enable_padding&&(i="\n padding:".concat(e.padding.top,"px ").concat(e.padding.right,"px ").concat(e.padding.bottom,"px ").concat(e.padding.left,"px\n "));var o="\n .apxor-survey-".concat(t,"-div").concat(this.cssPostFix,"{\n width:auto;\n position:relative;\n text-align:").concat(e.alignment,";\n background-color:").concat(e.background_color,";\n ").concat(n,";\n ").concat(i,";\n }").replaceAll("\n","").replace(/[\s]{2,999}/g,""),a=document.createElement("style");a.innerHTML=o,this.overlayElement.appendChild(a)}},{key:"_getTitleAndCloseIconStyles",value:function(){var e="\n .apxor-survey-question-closeicon-container-".concat(this.question.id).concat(this.cssPostFix,"{\n display:flex;\n flex-direction:row;\n position:relative;\n }").replaceAll("\n","").replace(/[\s]{2,999}/g,""),t=document.createElement("style");return t.innerHTML=e,this.overlayElement.appendChild(t),e}},{key:"_getDescriptionStyles",value:function(e,t){var n="";e.enable_margin&&(n="\n margin:".concat(e.margin.top,"px ").concat(e.margin.right,"px ").concat(e.margin.bottom,"px ").concat(e.margin.left,"px\n "));var i="";e.enable_padding&&(i="\n padding:".concat(e.padding.top,"px ").concat(e.padding.right,"px ").concat(e.padding.bottom,"px ").concat(e.padding.left,"px\n "));var o="\n .apxor-survey-".concat(t,"-div").concat(this.cssPostFix,"{\n text-align:").concat(e.alignment,";\n background-color:").concat(e.background_color,";\n ").concat(n,";\n ").concat(i,";\n }").replaceAll("\n","").replace(/[\s]{2,999}/g,""),a=document.createElement("style");return a.innerHTML=o,this.overlayElement.appendChild(a),o}},{key:"_getChoiceStyles",value:function(e,t,n){var i="";e.enable_margin&&(i="\n margin:".concat(e.margin.top,"px ").concat(e.margin.right,"px ").concat(e.margin.bottom,"px ").concat(e.margin.left,"px\n "));var o="";e.enable_padding&&(o="\n padding:".concat(e.padding.top,"px ").concat(e.padding.right,"px ").concat(e.padding.bottom,"px ").concat(e.padding.left+40,"px\n "));var a="";t.enable_border&&(a="\n border-radius:".concat(t.border.radius,"px;\n border:").concat(t.border.width,"px ").concat(t.border.style," ").concat(t.border.inactive_color));var r=_setFontFaceAtRule(e.font),s="\n font-size:".concat(e.font.size,"px;\n font-family:").concat(r[0],";\n font-style:").concat(e.font.style,";\n font-weight:").concat(e.font.weight,";\n ");t.color_active;var c=t.color_inactive,l=t.radio_color_active,d=t.radio_color_inactive,p=t.bg_color_active,u=t.bg_color_inactive,h="\n ".concat(r[1],"\n .apx-lc").concat(this.cssPostFix," {\n display: flex;\n align-items:center;\n position: relative;\n background: ").concat(u,";\n cursor: pointer;\n color: ").concat(c,";\n ").concat(s,";\n ").concat(a,";\n ").concat(i,";\n ").concat(o,";\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n }\n \n .apx-lc").concat(this.cssPostFix," input {\n position: absolute;\n opacity: 0;\n cursor: pointer;\n width: 0;\n height: 0;\n }\n \n .apx-i").concat(this.cssPostFix," {\n position: absolute;\n left: 12px;\n height: 16px;\n width: 16px;\n display:flex;\n justify-content:center;\n align-items:center;\n border: 1px solid ").concat(d,";\n background-color: white;\n border-radius:").concat("single_choice"===n?"50%":0,";\n }\n \n .apx-lc").concat(this.cssPostFix,":hover input ~ .apx-i").concat(this.cssPostFix," {\n border: 1px solid ").concat(l,";\n }\n\n .apx-lc").concat(this.cssPostFix," input:checked ~ .apx-i").concat(this.cssPostFix," {\n background: ").concat("single_choice"!==n?l:p,";\n border: 1px solid ").concat(l,";\n }\n \n .apx-i").concat(this.cssPostFix,':after {\n content: "";\n position: absolute;\n display: none;\n }\n \n .apx-lc').concat(this.cssPostFix," input:checked ~ .apx-i").concat(this.cssPostFix,":after {\n display: block;\n }\n\n .apx-lc").concat(this.cssPostFix," .apx-i").concat(this.cssPostFix,":after {\n width: ").concat("single_choice"===n?10:5,"px;\n height: ").concat(10,"px;\n border-radius: ").concat("single_choice"===n?"50%":"0",";\n background: ").concat("single_choice"===n?l:"transparent",";\n border: ").concat("single_choice"===n?"none":"solid ".concat(p),";\n border-width: ").concat("single_choice"===n?"unset":"0 3px 3px 0",";\n -webkit-transform: ").concat("single_choice"===n?"unset":"rotate(45deg)",";\n -ms-transform: ").concat("single_choice"===n?"unset":"rotate(45deg)",";\n transform: ").concat("single_choice"===n?"unset":"rotate(45deg)",";\n }\n ").replaceAll("\n","").replace(/[\s]{2,999}/g,""),g=document.createElement("style");g.innerHTML=h,this.overlayElement.appendChild(g)}},{key:"_getScrollStyles",value:function(e,t){var n="";e.enable_border&&(n="\n border-top: ".concat(e.border.width,"px ").concat(e.border.style," ").concat(e.border.color,";\n border-bottom : ").concat(e.border.width,"px ").concat(e.border.style," ").concat(e.border.color,";\n "));var i="\n .apxor-survey-".concat(t,"-scroll").concat(this.cssPostFix," {\n overflow:scroll; \n overflow-x: hidden;\n height:").concat(e.height,"px;\n ").concat(n,";\n }").replaceAll("\n","").replace(/[\s]{2,999}/g,""),o=document.createElement("style");return o.innerHTML=i,this.overlayElement.appendChild(o),i}},{key:"_getBottomButtonsStyles",value:function(){var e="";return 0===this.index&&(e="\n visibility:hidden;\n "),"\n #apxor-survey_bottom-prev-button{\n ".concat(e,"\n }\n #apxor-survey_bottom-next-button{\n pointer-events:none;\n opacity:0.5;\n }\n #apxor-survey_bottom-submit-button{\n pointer-events:none;\n opacity:0.5;\n }\n ")}},{key:"_setSurveyContent",value:function(){var e,t,n=this;this._createSurveyContainer(),this._createProgressBar(),this._createHeaderContainer(),this._createQuestionAndAnswerContainer(),this._createQuestionContainer(),this._createAnswerContainer(),this.enableFooter&&this._createButtonContainer(),this.surveylaunched||(this._logSurveyAppEvent("apx_survey_launched",{apx_survey_id:this.configId,apx_survey_name:this.name,apx_survey_type:!0,campaign_type:"survey"}),this.surveylaunched=!0),setTimeout((function(){var e;n._logSurveyAppEvent("apx_survey_question_asked",{apx_question_id:n.QandAArray[n.index].question.id,apx_question_name:null!==(e=n.QandAArray[n.index].question.title.text)&&void 0!==e?e:"",apx_question_type:n.QandAArray[n.index].answer.answer_mode,apx_question_position:n.index+1,apx_survey_id:n.configId,apx_survey_name:n.name,apx_survey_type:!0,campaign_type:"survey"})}),100),(null===(e=this.bottomRatingDiv)||void 0===e?void 0:e.offsetWidth)>(null===(t=this.questionContainer)||void 0===t?void 0:t.offsetWidth)&&(this.ratingDiv.style.alignItems="flex-start")}},{key:"_createSurveyContainer",value:function(){this.surveyContainer=document.createElement("div"),this.surveyContainer.classList.add("apxor-survey-container".concat(this.cssPostFix)),this.overlayElement.appendChild(this.surveyContainer)}},{key:"_setSurveyRequestStyles",value:function(){var e=" \n ".concat(this._setBackgroundOverlaystyles(),"\n ").concat(this._getSurveyRequestContainerStyles(),"\n ").concat(this._getSurveyRequestIconStyles()," \n ").concat(this._getSurveyRequestButtonsStyles(),"\n ").replaceAll("\n","").replace(/[\s]{2,999}/g,""),t=document.createElement("style");t.innerHTML=e,this.overlayElement.appendChild(t)}},{key:"_getSurveyRequestContainerStyles",value:function(){var e,t="";null!==(e=this.surveyrequest)&&void 0!==e&&e.enable_margin&&(t="\n margin-top:".concat(this.surveyrequest.margin.top,"px;\n margin-left:").concat(-this.surveyrequest.margin.right,"px;\n "));var n="";switch(this.surveyrequest.position.position){case"top-left":n="\n top:".concat(0,"px;\n left:").concat(0,"px;\n ");break;case"top-center":n="\n left:50%;\n top:".concat(0,"px;\n -webkit-transform: translate(-50%, ").concat(0,"px);\n -moz-transform: translate(-50%, ").concat(0,"px);\n ");break;case"top-right":n="\n top:".concat(0,"px;\n right:").concat(0,"px;\n ");break;case"bottom-left":n="\n bottom:".concat(0,"px;\n left:").concat(0,"px;\n ");break;case"bottom-center":n="\n left:50%;\n bottom:".concat(0,"px;\n -webkit-transform: translate(-50%, ").concat(0,"px);\n -moz-transform: translate(-50%, ").concat(0,"px);\n ");break;case"bottom-right":n="\n bottom:".concat(0,"px;\n right:").concat(0,"px;\n ");break;case"left":n="\n left:".concat(0,"px;\n top:50%;\n -webkit-transform: translate(").concat(0,"px, -50%);\n -moz-transform: translate(").concat(0,"px, -50%);\n ");break;case"right":n="\n right:".concat(0,"px;\n top:50%;\n -webkit-transform: translate(").concat(0,"px, -50%);\n -moz-transform: translate(").concat(0,"px, -50%);\n ");break;default:n="\n left:50%;\n top:50%;\n -webkit-transform: translate(-50%, -50%);\n -moz-transform: translate(-50%, -50%);\n "}var i="";return this.surveyrequest.enable_border&&(i="\n border-radius:".concat(this.surveyrequest.border.radius,"px;\n border:").concat(this.surveyrequest.border.width,"px ").concat(this.surveyrequest.border.style," ").concat(this.surveyrequest.border.color,";\n ")),"\n .apxor-survey-request-styles".concat(this.cssPostFix,"{\n width: ").concat(this.surveyrequest.width,"%;\n position: fixed;\n display:flex;\n flex-direction:column;\n align-items:center;\n z-index:999999;\n background: ").concat(this.surveyrequest.background_color,";\n ").concat(t,";\n ").concat(n,";\n ").concat(i,"\n }")}},{key:"_getSurveyRequestIconStyles",value:function(){var e="";if(this.surveyrequest.enable_icon){var t="";this.surveyrequest.icon.enable_border&&(t="\n border-radius:".concat(this.surveyrequest.icon.border.radius,"%;\n border:").concat(this.surveyrequest.icon.border.width,"px ").concat(this.surveyrequest.icon.border.style," ").concat(this.surveyrequest.icon.border.color,";\n "));var n="";this.surveyrequest.icon.enable_margin&&(n="\n margin-top:".concat(this.surveyrequest.icon.margin.top,"px;\n margin-bottom:").concat(this.surveyrequest.icon.margin.bottom,"px;\n margin-left:").concat(this.surveyrequest.icon.margin.left,"px;\n margin-right:").concat(this.surveyrequest.icon.margin.right,"px;\n "));var i="";this.surveyrequest.icon.enable_padding&&(i="\n padding-top:".concat(this.surveyrequest.icon.padding.top,"px;\n padding-bottom:").concat(this.surveyrequest.icon.padding.bottom,"px;\n padding-left:").concat(this.surveyrequest.icon.padding.left,"px;\n padding-right:").concat(this.surveyrequest.icon.padding.right,"px;\n ")),e="\n .apxor-survey-request-icon-container".concat(this.cssPostFix,' {\n align-self:"center";\n }\n .apxor-survey-request-icon-content').concat(this.cssPostFix," {\n height: ").concat(this.surveyrequest.icon.height,"px;\n width: ").concat(this.surveyrequest.icon.width,"px;\n ").concat(t,"\n ").concat(n,"\n ").concat(i,"\n }\n ")}return e}},{key:"_getSurveyRequestButtonsStyles",value:function(){var e="";return this.surveyrequest.enable_buttons_container_margin&&(e="\n padding-top:".concat(this.surveyrequest.buttons_container_margin.top,"px;\n padding-bottom:").concat(this.surveyrequest.buttons_container_margin.bottom,"px;\n padding-left:").concat(this.surveyrequest.buttons_container_margin.left,"px;\n padding-right:").concat(this.surveyrequest.buttons_container_margin.right,"px;\n ")),"\n .apxor-survey-request-buttons".concat(this.cssPostFix,"{\n width: 100%;\n box-sizing: border-box;\n display:flex;\n flex-direction:column;\n align-items:center;\n ").concat(e,"\n }")}},{key:"_createSurveyRequestContent",value:function(){this._createSurveyRequestContainer(),this._setSurveyRequestContent()}},{key:"_createSurveyRequestContainer",value:function(){this.surveyRequestContainer=document.createElement("div"),this.surveyRequestContainer.classList.add("apxor-survey-request-styles".concat(this.cssPostFix)),this.overlayElement.appendChild(this.surveyRequestContainer)}},{key:"_setSurveyRequestContent",value:function(){var e,t,n;if(this.surveyrequest.enable_close_button&&(this._getCloseButtonStyles(this.surveyrequest.closebutton,"dialog"),this.surveyRequestContainer.appendChild(this._setCloseButton(this.surveyrequest.closebutton,"dialog"))),this.surveyrequest.enable_icon){var i=document.createElement("div");i.classList.add("apxor-survey-request-icon-container".concat(this.cssPostFix));var o=document.createElement("img");o.src=this.surveyrequest.icon.path,o.classList.add("apxor-survey-request-icon-content".concat(this.cssPostFix)),i.appendChild(o),this.surveyRequestContainer.appendChild(i)}var a=document.createElement("div");this.surveyrequest.enable_title&&(this._getTitleStyles(this.surveyrequest.title,"survey-request-title"),a.appendChild(this._setTitleContent(this.surveyrequest.title,"survey-request-title",""))),this.surveyrequest.enable_description&&(this._getDescriptionStyles(this.surveyrequest.description,"survey-request-description"),a.appendChild(this._setDescriptionContent(this.surveyrequest.description,"survey-request-description",""))),(this.surveyrequest.enable_title||this.surveyrequest.enable_description)&&(a.style.width="100%",this.surveyRequestContainer.appendChild(a)),null!==(e=this.surveyrequest)&&void 0!==e&&e.buttons&&0!==this.surveyrequest.buttons.length&&(this.surveyRequestButtons=document.createElement("div"),this.surveyRequestButtons.classList.add("apxor-survey-request-buttons".concat(this.cssPostFix)),this.surveyRequestButtons.appendChild(this._setButtons(this.surveyrequest.buttons,!0)),this.surveyRequestContainer.appendChild(this.surveyRequestButtons)),this._logSurveyAppEvent("apx_survey_dialog_launched",{apx_survey_id:this.configId,apx_survey_name:this.name,apx_survey_type:(null!==(t=null==this?void 0:this.is_response_based_survey)&&void 0!==t?t:null==this||null===(n=this.survey)||void 0===n?void 0:n.is_response_based_survey)?"response_based":"default",campaign_type:"survey"})}},{key:"_createProgressBar",value:function(){this.enable_progressbar&&1!=this.QandArrayLength&&this.surveyContainer.appendChild(this._setProgressBar())}},{key:"_createHeaderContainer",value:function(){if(this.enable_header){var e=document.createElement("div");if(e.classList.add("apxor-header-container".concat(this.cssPostFix)),e.appendChild(this.createTopContainer()),this.header.enable_title&&(this._getTitleStyles(this.header.title,"header-title"),e.appendChild(this._setTitleContent(this.header.title,"header-title",this.index))),this.header.enable_description&&(this._getDescriptionStyles(this.header.description,"header-description"),e.appendChild(this._setDescriptionContent(this.header.description,"header-description",this.index))),this.header.enable_image)if(this.header.image.enable_background_image)e.classList.add("apxor-survey-header-image".concat(this.cssPostFix));else{var t=document.createElement("div");t.classList.add("apxor-survey-header-image-div".concat(this.cssPostFix));var n=document.createElement("img");n.src=this.header.image.path,n.classList.add("apxor-survey-header-image".concat(this.cssPostFix)),t.appendChild(n),e.appendChild(t)}if(!(this.header.enable_title||this.header.enable_description||this.header.enable_image||this.header.enable_stepper)&&this.header.enable_close_button){var i=this.header.closebutton.height+this.header.closebutton.margin.bottom+this.header.closebutton.margin.top;e.style.height="".concat(i,"px")}this.surveyContainer.appendChild(e)}}},{key:"createTopContainer",value:function(){var e=document.createElement("div");e.classList.add("apxor-survey-header-top-container".concat(this.cssPostFix));var t=document.createElement("div");if(t.classList.add("apxor-survey-pagination-button".concat(this.cssPostFix)),this.enable_header&&this.header.enable_stepper){this.header.stepper.index=this.index+1,this.header.stepper.length=this.QandAArray.length;var n=document.createElement("div");n.className="stepper-"+this.header.stepper.type,this.header.stepper.pagination_text.is_dyn&&resolveDynamicText(this.header.stepper.pagination_text),n.innerHTML=setCarousel(this.header.stepper.type,this.header.stepper),t.appendChild(n)}if(this.header.enable_close_button){this._getCloseButtonStyles(this.header.closebutton);var i=this._setCloseButton(this.header.closebutton);t.appendChild(i)}if(this.header.enable_back_button&&0!==this.index){var o=this._setBackButton();t.appendChild(o)}return e.appendChild(t),e}},{key:"_createQuestionAndAnswerContainer",value:function(){this.index<this.QandAArray.length&&this.index>=0&&(this.QandAContainer=document.createElement("div"),this.QandAContainer.classList.add("apxor-survey-QandA-container".concat(this.cssPostFix)),this.surveyContainer.appendChild(this.QandAContainer))}},{key:"_createQuestionContainer",value:function(){this.question=this.QandAArray[this.index].question,this.questionContainer=document.createElement("div"),this._getQuestionContainerStyles(this.question),this.questionContainer.classList.add("apxor-survey-question-container-".concat(this.question.id).concat(this.cssPostFix));var e=document.createElement("div");if(e.classList.add("apxor-survey-question-closeicon-container-".concat(this.question.id).concat(this.cssPostFix)),this._getTitleAndCloseIconStyles(),this.question.enable_title&&(this._getTitleStyles(this.question.title,"question-title"),e.appendChild(this._setTitleContent(this.question.title,"question-title",this.question.id))),this.enable_close_icon){this._getCloseButtonStyles(this.closeButton);var t=this._setCloseButton(this.closeButton);t.style.position="relative",e.appendChild(t)}this.questionContainer.appendChild(e),this.question.enable_description&&(this._getDescriptionStyles(this.question.description,"question-description"),this.questionContainer.appendChild(this._setDescriptionContent(this.question.description,"question-description",this.question.id))),this.question.enable_choice_prompt&&(this._getDescriptionStyles(this.question.choice_prompt,"question-choice-prompt"),this.questionContainer.appendChild(this._setDescriptionContent(this.question.choice_prompt,"question-choice-prompt",this.question.id))),this.QandAContainer.appendChild(this.questionContainer)}},{key:"_createAnswerContainer",value:function(){var e,t,n=this;this.answer_mode=null===(e=this.QandAArray[this.index])||void 0===e?void 0:e.answer.answer_mode,this.answer=null===(t=this.QandAArray[this.index])||void 0===t?void 0:t.answer,this.enableFooter=this.QandAArray[this.index].enable_footer,this.footer=this.QandAArray[this.index].footer,this.anyActiveChoices=!1,this.answerContainer=document.createElement("div"),this._getAnswerContainerStyles(),this.answerContainer.classList.add("apxor-survey-answer-container".concat(this.cssPostFix));var i=!1;if("single_choice"===this.answer_mode||"multi_choice"===this.answer_mode){var o;this.choices=null===(o=this.QandAArray[this.index])||void 0===o||null===(o=o.answer)||void 0===o?void 0:o.choices;var a="",r=this.choices,s=r.min_choices_enabled,c=r.max_choices_enabled,l=r.max_choices,d=r.min_choices;r.randomize_choices;var p=r.color_active,u=r.color_inactive,h=r.color_disable;r.radio_color_active,r.radio_color_inactive;var g=r.bg_color_active,f=r.bg_color_inactive,m=r.bg_color_disable,_=r.choice_border_active,v=void 0===_?"":_,b=r.choice_border_inactive,y=void 0===b?"":b,x=r.list;this._getChoiceStyles(this.answer,this.choices,this.answer_mode);var w=function(e,t){e.style.color=t?p:u},C=function(e,t){var n=t?g:f;e.style.background=n},E=function(e,t){n.choices.enable_border&&(e.style.border=t?"".concat(n.choices.border.width,"px ").concat(n.choices.border.style," ").concat(v||n.choices.border.color):"".concat(n.choices.border.width,"px ").concat(n.choices.border.style," ").concat(y||n.choices.border.inactive_color))};if(x.forEach((function(e,t){var o=document.createElement("label");o.className="apx-lc".concat(n.cssPostFix),e.is_dyn?(resolveDynamicText(e),o.innerText=e.text):o.innerText=e.value;var r=document.createElement("input");r.name=r.type="single_choice"===n.answer_mode?"radio":"checkbox",r.checked=e.is_selected;var p=document.createElement("span");p.className="apx-i".concat(n.cssPostFix),o.appendChild(r),o.appendChild(p),n.anyActiveChoices=n.anyActiveChoices||e.is_selected,C(o,e.is_selected),w(o,e.is_selected),E(o,e.is_selected),e.is_other&&(n.getTextAreaNodeStyles(n.answer,"other"),a=n.getTextAreaNode(n.answer.input_text,e.other_answer,"other"),i=!0,a.style.visibility="hidden",a.addEventListener("input",(function(t){var i;null!==(i=n.QandAArray[n.index])&&void 0!==i&&null!==(i=i.answer)&&void 0!==i&&i.is_text_mandatory&&n.changeButtonColor(!0),e.other_answer=t.target.value}))),e.is_selected&&e.is_other&&(a.style.visibility="visible"),"multi_choice"===n.answer_mode?(r.setAttribute("apx-key","checked"),r.setAttribute("apx-ci",t+""),r.onchange=function(e){var t=0;document.querySelectorAll('input[apx-key="checked"]').forEach((function(e){e.checked&&(t+=1)})),document.querySelectorAll('input[apx-key="checked"]').forEach((function(i,o){var r,s=i.checked;(x[o].is_selected=s,w(i.parentNode,s),C(i.parentNode,s),E(i.parentNode,s),x[o].is_other)&&(null!==(r=n.QandAArray[n.index])&&void 0!==r&&null!==(r=r.answer)&&void 0!==r&&r.is_text_mandatory,a.style.visibility=s?"visible":"hidden");if(e.target.checked&&c&&t===l)i.checked||(i.disabled=!0,i.parentNode.style.color=h,i.parentNode.style.background=m,i.parentNode.style.cursor="default");else if(!e.target.checked&&c&&t===l-1){var d=i.checked;d||(i.disabled=!1,w(i.parentNode,d),C(i.parentNode,d),i.parentNode.style.cursor="pointer")}})),s&&t>=d?n.changeButtonColor(!0):n.changeButtonColor(!1)}):(r.setAttribute("apx-key","radio"),r.setAttribute("apx-ci",t+""),r.onchange=function(){var e=!1;if(document.querySelectorAll('input[apx-key="radio"]').forEach((function(t,i){var o,r=t.checked;(x[i].is_selected=r,r&&(e=!0),w(t.parentNode,r),C(t.parentNode,r),E(t.parentNode,r),x[i].is_other)&&(null!==(o=n.QandAArray[n.index])&&void 0!==o&&null!==(o=o.answer)&&void 0!==o&&o.is_text_mandatory&&(e=!1),a.style.visibility=r?"visible":"hidden")})),n.changeButtonColor(e),!n.enableFooter){n.visitedQuestion.push(n.index),document.body.removeChild(n.overlayElement),n.survey.is_response_based_survey?(n._logSurveyQuestionEvent(n.index),n.index=n._getNextQuestionByResponseBasedSurvey()?n.index:n.index+1,n.index===n.QandAArray.length?(n.enable_success_message||n.closeCallback(),n._submitSurveyResponses(!0)):n.createSurvey()):(n._logSurveyQuestionEvent(n.index),n.index===n.QandAArray.length-1?(n.enable_success_message||n.closeCallback(),n._submitSurveyResponses(!0)):(n.index+=1,n.createSurvey()))}}),n.answerContainer.appendChild(o),i&&n.answerContainer.appendChild(a)})),this.answer.enable_scroll){this.answerContainer.classList.add("apxor-survey-".concat("choices","-scroll").concat(this.cssPostFix))}this.QandAContainer.appendChild(this.answerContainer)}else if("text"===this.answer_mode){this.getTextAreaNodeStyles(this.answer,"text");var k=this.getTextAreaNode(this.answer.input_text,this.answer.text_answer,"text");""!==this.answer.text_answer&&(this.anyActiveChoices=!0),k.addEventListener("input",(function(e){n.answer.text_answer=e.target.value,e.target.value&&e.target.value.length>0?(n.answer.is_answered=!0,n.anyActiveChoices=!0):(n.answer.is_answered=!1,n.anyActiveChoices=!1),n.changeButtonColor(n.anyActiveChoices)})),this.answerContainer.appendChild(k),this.QandAContainer.appendChild(this.answerContainer)}else if("rating"===this.answer_mode){var S,T,A,I;if(this.rating=null===(S=this.QandAArray[this.index])||void 0===S||null===(S=S.answer)||void 0===S?void 0:S.rating,this.reactions=null===(T=this.rating)||void 0===T?void 0:T.reactions,this.ratingButtons=this.rating.ratingbuttons,this.QandSArray=null===(A=this.rating)||void 0===A?void 0:A.QandSArray,this.ratingLabels=null===(I=this.rating)||void 0===I?void 0:I.ratingLabels,this.npsContainer=document.createElement("div"),this._getNpscontainerStyles(this.QandAArray[this.index].answer),this.npsContainer.classList.add("apxor-survey-nps-container".concat(this.cssPostFix)),this._getNpsTopContainerElementStyles(),this.npsTopContainer=document.createElement("div"),this.npsTopContainer.classList.add("apxor-survey-nps-topcontainer".concat(this.cssPostFix)),this.npsContainer.appendChild(this.npsTopContainer),this.ratingDiv=document.createElement("div"),this.ratingDiv.classList.add("apxor-survey-ratingdiv".concat(this.cssPostFix)),"slider"!==this.ratingButtons.type){var P=document.createElement("div");P.classList.add("apxor-survey-topratingdiv".concat(this.cssPostFix)),this.bottomRatingDiv=document.createElement("div"),this.bottomRatingDiv.classList.add("apxor-survey-bottomratingdiv".concat(this.cssPostFix)),"numbered"===this.ratingButtons.type?this._getRatingNumberButtonStyles(this.ratingButtons):"radio"===this.ratingButtons.type?this._getRatingRadioButtonStyles(this.ratingButtons):"star"===this.ratingButtons.type?this.getStarButtonStyling(this.ratingButtons):"emoji"===this.ratingButtons.type&&this.getEmojiButtonStyling(this.ratingButtons),this.rating.enable_labels&&this.getRatingLabelsStyling(this.ratingButtons,this.ratingLabels);var O=0;this.ratingButtons.buttons.forEach((function(e,t){O++,n.anyActiveChoices=n.anyActiveChoices||-1!==n.ratingButtons.selected_rating[t];var i=document.createElement("div");if(i.setAttribute("apx-survey-key","rating"),"radio"===n.ratingButtons.type&&(n.radioButtonContainer=document.createElement("div"),n.radioButtonContainer.classList.add("apxor-survey-radio-button-container-".concat(t,"-styling").concat(n.cssPostFix)),n.radioButtonContainer.appendChild(i)),"numbered"===n.ratingButtons.type)i.classList.add("apxor-survey-buttondiv-".concat(t,"-").concat(n.cssPostFix)),i.innerText=e.value;else if("radio"===n.ratingButtons.type)i.classList.add("apxor-survey-radiobutton-".concat(t,"-").concat(n.cssPostFix)),n.radioInnerDiv=document.createElement("div"),n.radioInnerDiv.classList.add("apxor-survey-radiobutton-inner-".concat(t,"-").concat(n.cssPostFix)),n.radioInnerDiv.classList.add("apxor-survey-radiobutton-inner-".concat(t,"-hidden-").concat(n.cssPostFix)),i.appendChild(n.radioInnerDiv),n.textForRadioButton=document.createElement("div"),n.textForRadioButton.setAttribute("apx-survey-radio-test","rating-text"),n.textForRadioButton.classList.add("apxor-survey-radiobutton-text-".concat(t,"-").concat(n.cssPostFix)),n.textForRadioButton.innerText=e.value,n.radioButtonContainer.appendChild(n.textForRadioButton);else if("star"===n.ratingButtons.type){i.classList.add("apxor-survey-starbutton-".concat(t).concat(n.cssPostFix));var o="",a="";n.ratingButtons.enable_colors?(o="white",a=n.ratingButtons.buttons[t].color):n.ratingButtons.enable_box_model?(o=n.ratingButtons.color_inactive,a=n.ratingButtons.box_model.inactive_color):(o=n.ratingButtons.color_inactive,a=n.ratingButtons.border.inactive_color),i.innerHTML=n.getStarSvg(36,36,o,a)}else"emoji"===n.ratingButtons.type&&(i.classList.add("apxor-survey-emoji-buttondiv-".concat(t,"-").concat(n.cssPostFix)),i.innerText=e.emoji);n.ratingButtons.split_line&&O<=6?"radio"===n.ratingButtons.type?P.appendChild(n.radioButtonContainer):P.appendChild(i):"radio"===n.ratingButtons.type?n.bottomRatingDiv.appendChild(n.radioButtonContainer):n.bottomRatingDiv.appendChild(i),i.onclick=function(e){var i=!1,o=!1;1===n.ratingButtons.selected_rating[t]&&(i=!1,o=!0,n.rating.enable_reaction&&(n.npsTopContainer.innerHTML="",n.npsTopContainerMessage.innerHTML=""),n.rating.enable_qands&&(n.QandSContainer.innerHTML="",n.resetQandSState(n.ratingButtons.prev_selected_button)),n.ratingButtons.prev_selected_button=-1);var a=document.querySelectorAll('div[apx-survey-key="rating"]'),r=[];if("radio"===n.ratingButtons.type&&(r=document.querySelectorAll('div[apx-survey-radio-test="rating-text"]')),document.querySelectorAll('div[apx-survey-key="rating"]').forEach((function(e,s){if(s===t&&1!==n.ratingButtons.selected_rating[s]){if(i=!0,"numbered"===n.ratingButtons.type&&(n.ratingButtons.enable_colors?e.classList.remove("apxor-survey-buttondiv-unselected"):e.classList.add("apxor-survey-buttondiv-selected-".concat(s,"-").concat(n.cssPostFix))),"radio"===n.ratingButtons.type&&(e.classList.add("apxor-survey-radiobutton-selected-".concat(s,"-").concat(n.cssPostFix)),e.firstChild.classList.remove("apxor-survey-radiobutton-inner-".concat(s,"-hidden-").concat(n.cssPostFix)),r[s].classList.add("apxor-survey-radiobutton-text-".concat(s,"-selected-").concat(n.cssPostFix)),n.ratingButtons.SelectedRadioButton=s),"star"===n.ratingButtons.type)for(var c=s;c>=0;c--){a[c].firstChild.remove();var l="",d="";n.ratingButtons.enable_colors?(l=n.ratingButtons.buttons[c].color,d=n.ratingButtons.buttons[c].color):n.ratingButtons.enable_box_model?(l=n.ratingButtons.color_active,d=n.ratingButtons.box_model.active_color):(l=n.ratingButtons.color_active,d=n.ratingButtons.border.color),a[c].innerHTML=n.getStarSvg(36,36,l,d),a[c].classList.add("apxor-survey-starbutton-active-".concat(c).concat(n.cssPostFix))}"emoji"===n.ratingButtons.type&&(e.classList.add("apxor-survey-emoji-buttondiv-active-".concat(s,"-").concat(n.cssPostFix)),e.classList.remove("apxor-survey-emoji-buttondiv-inactive-".concat(s,"-").concat(n.cssPostFix))),n.rating.enable_reaction&&n.createReactionAndMessageContainer(s),n.rating.enable_qands&&(n.resetQandSState(n.ratingButtons.prev_selected_button),n.createQansSContainer(s)),n.ratingButtons.selected_rating[s]=1,n.ratingButtons.prev_selected_button=s}else{if(n.ratingButtons.enable_colors&&"numbered"===n.ratingButtons.type)o?e.classList.remove("apxor-survey-buttondiv-unselected"):e.classList.add("apxor-survey-buttondiv-unselected");else if("numbered"===n.ratingButtons.type)e.classList.remove("apxor-survey-buttondiv-selected-".concat(s,"-").concat(n.cssPostFix));else if("radio"===n.ratingButtons.type)e.classList.remove("apxor-survey-radiobutton-selected-".concat(s,"-").concat(n.cssPostFix)),r[s].classList.remove("apxor-survey-radiobutton-text-".concat(s,"-selected-").concat(n.cssPostFix)),n.ratingButtons.prevSelectedRadioButton===s&&e.firstChild.classList.add("apxor-survey-radiobutton-inner-".concat(s,"-hidden-").concat(n.cssPostFix));else if("star"===n.ratingButtons.type){e.firstChild.remove();var p="",u="";n.ratingButtons.enable_colors?(p="white",u=n.ratingButtons.buttons[s].color):n.ratingButtons.enable_box_model?(p=n.ratingButtons.color_inactive,u=n.ratingButtons.box_model.inactive_color):(p=n.ratingButtons.color_inactive,u=n.ratingButtons.border.inactive_color),e.innerHTML=n.getStarSvg(36,36,p,u),e.classList.remove("apxor-survey-starbutton-active-".concat(s).concat(n.cssPostFix))}else"emoji"===n.ratingButtons.type&&(o?(e.classList.remove("apxor-survey-emoji-buttondiv-active-".concat(s,"-").concat(n.cssPostFix)),e.classList.remove("apxor-survey-emoji-buttondiv-inactive-".concat(s,"-").concat(n.cssPostFix))):(e.classList.remove("apxor-survey-emoji-buttondiv-active-".concat(s,"-").concat(n.cssPostFix)),n.ratingButtons.enable_fade||n.ratingButtons.enable_shadow?e.classList.add("apxor-survey-emoji-buttondiv-inactive-".concat(s,"-").concat(n.cssPostFix)):e.classList.remove("apxor-survey-emoji-buttondiv-inactive-".concat(s,"-").concat(n.cssPostFix))));n.ratingButtons.selected_rating[s]=-1}})),n.ratingButtons.prevSelectedRadioButton=n.ratingButtons.SelectedRadioButton,n.ratingButtons.SelectedRadioButton=-1,n.changeButtonColor(i),!n.enableFooter){n.visitedQuestion.push(n.index),document.body.removeChild(n.overlayElement),n.survey.is_response_based_survey?(n._logSurveyQuestionEvent(n.index),n.index=n._getNextQuestionByResponseBasedSurvey()?n.index:n.index+1,n.index===n.QandAArray.length?(n.enable_success_message||n.closeCallback(),n._submitSurveyResponses(!0)):n.createSurvey()):(n._logSurveyQuestionEvent(n.index),n.index===n.QandAArray.length-1?(n.enable_success_message||n.closeCallback(),n._submitSurveyResponses(!0)):(n.index+=1,n.createSurvey()))}}})),this.rating.enable_labels&&(this.firstlabelelement=document.createElement("div"),this.firstlabelelement.classList.add("apxor-survey-rating-first-label-styles-".concat(this.cssPostFix)),this._getTitleStyles(this.ratingLabels.first_rating.text,"first-label-text"),this.firstlabelelement.appendChild(this._setTitleContent(this.ratingLabels.first_rating.text,"first-label-text","")),this.lastlabelelement=document.createElement("div"),this.lastlabelelement.classList.add("apxor-survey-rating-last-label-styles-".concat(this.cssPostFix)),this._getTitleStyles(this.ratingLabels.last_rating.text,"last-label-text"),this.lastlabelelement.appendChild(this._setTitleContent(this.ratingLabels.last_rating.text,"last-label-text",""))),O>6&&this.ratingButtons.split_line?(this.rating.enable_labels&&(P.appendChild(this.firstlabelelement),this.bottomRatingDiv.appendChild(this.lastlabelelement)),this.ratingDiv.appendChild(P),this.ratingDiv.appendChild(this.bottomRatingDiv)):(this.rating.enable_labels&&(this.bottomRatingDiv.appendChild(this.firstlabelelement),this.bottomRatingDiv.appendChild(this.lastlabelelement)),this.ratingDiv.appendChild(this.bottomRatingDiv)),this.npsContainer.appendChild(this.ratingDiv)}else{this.getSliderStyles();var L=document.createElement("div");L.className="range";var N=document.createElement("div");N.className="sliderValue";var B=document.createElement("span");B.innerText=10,B.className="ValueOfSlider",N.appendChild(B),L.appendChild(N);var D=document.createElement("div");D.className="field";var M=document.createElement("input");M.name=M.type="range",M.min=this.ratingButtons.start,M.max=this.ratingButtons.end,M.value=-1===this.ratingButtons.prev_selected_button?this.ratingButtons.start:this.ratingButtons.prev_selected_button,M.step=1,D.appendChild(M),L.appendChild(D),this.ratingDiv.appendChild(L),M.oninput=function(){var e=M.value;B.textContent=e,B.style.left=100/n.ratingButtons.length*(e-n.ratingButtons.start)+"%",B.classList.add("show"),n.rating.enable_qands&&(n.resetQandSState(n.ratingButtons.prev_selected_button),n.createQansSContainer(e)),n.ratingButtons.selected_rating[e]=1,-1!==n.ratingButtons.prev_selected_button&&(n.ratingButtons.selected_rating[n.ratingButtons.prev_selected_button]=-1),n.ratingButtons.prev_selected_button=e,n.changeButtonColor(!0)},M.onblur=function(){B.classList.remove("show")},this.npsContainer.appendChild(this.ratingDiv)}if(this.npsTopContainerMessage=document.createElement("div"),this.npsTopContainerMessage.classList.add("apxor-survey-nps-topcontainer-message".concat(this.cssPostFix)),this.npsContainer.appendChild(this.npsTopContainerMessage),this._getNpsQandSContainerElementStyles(),this.QandSContainer=document.createElement("div"),this.QandSContainer.classList.add("apxor-survey-nps-qands-container".concat(this.cssPostFix)),this.npsContainer.appendChild(this.QandSContainer),this.answerContainer.appendChild(this.npsContainer),this.QandAContainer.appendChild(this.answerContainer),this.ratingButtons.selected_rating.includes(1)){if("slider"!==this.ratingButtons.type){var F=document.querySelectorAll('div[apx-survey-key="rating"]'),$=[];"radio"===this.ratingButtons.type&&($=document.querySelectorAll('div[apx-survey-radio-test="rating-text"]'));var R=this.ratingButtons.selected_rating.indexOf(1);F.forEach((function(e,t){if(t===R){if("numbered"===n.ratingButtons.type&&(n.ratingButtons.enable_colors?e.classList.remove("apxor-survey-buttondiv-unselected"):e.classList.add("apxor-survey-buttondiv-selected-".concat(t,"-").concat(n.cssPostFix))),"radio"===n.ratingButtons.type&&(e.classList.add("apxor-survey-radiobutton-selected-".concat(t,"-").concat(n.cssPostFix)),e.firstChild.classList.remove("apxor-survey-radiobutton-inner-".concat(t,"-hidden-").concat(n.cssPostFix)),$[t].classList.add("apxor-survey-radiobutton-text-".concat(t,"-selected-").concat(n.cssPostFix)),n.ratingButtons.SelectedRadioButton=t),"star"===n.ratingButtons.type)for(var i=t;i>=0;i--){F[i].firstChild.remove();var o="",a="";n.ratingButtons.enable_colors?(o=n.ratingButtons.buttons[i].color,a=n.ratingButtons.buttons[i].color):n.ratingButtons.enable_box_model?(o=n.ratingButtons.color_active,a=n.ratingButtons.box_model.active_color):(o=n.ratingButtons.color_active,a="transparent"),F[i].innerHTML=n.getStarSvg(36,36,o,a),F[i].classList.add("apxor-survey-starbutton-active-".concat(i).concat(n.cssPostFix))}"emoji"===n.ratingButtons.type&&(e.classList.add("apxor-survey-emoji-buttondiv-active-".concat(t,"-").concat(n.cssPostFix)),e.classList.remove("apxor-survey-emoji-buttondiv-inactive-".concat(t,"-").concat(n.cssPostFix))),n.rating.enable_reaction&&n.createReactionAndMessageContainer(t),n.rating.enable_qands&&n.createQansSContainer(t),n.ratingButtons.prev_selected_button=t}else if(n.ratingButtons.enable_colors&&"numbered"===n.ratingButtons.type)e.classList.add("apxor-survey-buttondiv-unselected");else if("numbered"===n.ratingButtons.type)e.classList.remove("apxor-survey-buttondiv-selected-".concat(t,"-").concat(n.cssPostFix));else if("radio"===n.ratingButtons.type)e.classList.remove("apxor-survey-radiobutton-selected-".concat(t,"-").concat(n.cssPostFix)),n.ratingButtons.prevSelectedRadioButton===t&&e.firstChild.classList.add("apxor-survey-radiobutton-inner-".concat(t,"-hidden-").concat(n.cssPostFix));else if("star"===n.ratingButtons.type){e.firstChild.remove();var r="",s="";n.ratingButtons.enable_colors?(r="white",s=n.ratingButtons.buttons[t].color):n.ratingButtons.enable_box_model?(r=n.ratingButtons.color_inactive,s=n.ratingButtons.box_model.inactive_color):(r=n.ratingButtons.color_inactive,s="transparent"),e.innerHTML=n.getStarSvg(36,36,r,s),e.classList.remove("apxor-survey-starbutton-active-".concat(t).concat(n.cssPostFix))}else"emoji"===n.ratingButtons.type&&(e.classList.remove("apxor-survey-emoji-buttondiv-active-".concat(t,"-").concat(n.cssPostFix)),n.ratingButtons.enable_fade||n.ratingButtons.enable_shadow?e.classList.add("apxor-survey-emoji-buttondiv-inactive-".concat(t,"-").concat(n.cssPostFix)):e.classList.remove("apxor-survey-emoji-buttondiv-inactive-".concat(t,"-").concat(n.cssPostFix)))}))}"slider"===this.ratingButtons.type&&this.rating.enable_qands&&(this.createQansSContainer(this.ratingButtons.prev_selected_button),this.anyActiveChoices=!0)}}}},{key:"getSliderStyles",value:function(){var e="\n .range{\n height: 80px;\n width: 380px;\n background: #fff;\n border-radius: 10px;\n padding: 0 65px 0 45px;\n background:transparent;\n }\n .sliderValue{\n position: relative;\n width: 100%;\n }\n .sliderValue span{\n position: absolute;\n text-align:center;\n height: 45px;\n width: 45px;\n transform: translateX(-50%) scale(0);\n font-weight: 500;\n top: -40px;\n line-height: 55px;\n z-index: 2;\n color: #fff;\n transform-origin: bottom;\n transition: transform 0.3s ease-in-out;\n }\n .sliderValue span.show{\n transform: translateX(-50%) scale(1);\n }\n .sliderValue span:after{\n position: absolute;\n content: '';\n height: 100%;\n width: 100%;\n background: #664AFF;\n border: 3px solid #fff;\n z-index: -1;\n left: 50%;\n transform: translateX(-50%) rotate(45deg);\n border-bottom-left-radius: 50%;\n box-shadow: 0px 0px 8px rgba(0,0,0,0.1);\n border-top-left-radius: 50%;\n border-top-right-radius: 50%;\n }\n .field{\n display: flex;\n align-items: center;\n justify-content: center;\n height: 100%;\n position: relative;\n }\n \n .range input{\n -webkit-appearance: none;\n width: 100%;\n height: 8px;\n background: #ddd;\n border-radius: 5px;\n outline: none;\n border: none;\n z-index: 2222;\n }\n .range input::-webkit-slider-thumb{\n -webkit-appearance: none;\n width: 20px;\n height: 20px;\n background: red;\n border-radius: 50%;\n background: #664AFF;\n border: 1px solid #664AFF;\n cursor: pointer;\n }\n .range input::-moz-range-thumb{\n -webkit-appearance: none;\n width: 20px;\n height: 20px;\n background: red;\n border-radius: 50%;\n background: #664AFF;\n border: 1px solid #664AFF;\n cursor: pointer;\n }\n .range input::-moz-range-progress{\n background: #664AFF; //this progress background is only shown on Firefox\n }".replaceAll("\n","").replace(/[\s]{2,999}/g,""),t=document.createElement("style");return t.innerHTML=e,this.overlayElement.appendChild(t),e}},{key:"resetQandSState",value:function(e){-1!==e&&(this.rating.stateOfQandS[e].suggestion=[],this.rating.stateOfQandS[e].input_field="")}},{key:"createQansSContainer",value:function(e){var t,n=this;this.QandSContainer.innerHTML="";var i=this.getcurrentQandSArrayIndexFromQandSPaths(this.rating,parseInt(this.ratingButtons.start_from_index+e));if(-1!==i){var o=document.createElement("div");o.setAttribute("apx-survey-key","qands-element"),o.classList.add("apxor-survey-nps-qands-container-element-".concat(i,"-").concat(e,"-").concat(this.cssPostFix));var a=document.createElement("div");a.classList.add("apxor-survey-nps-qands-question-container".concat(this.cssPostFix)),null!==(t=this.QandSArray[i])&&void 0!==t&&t.enable_question&&(this.QandSArray[i].question.enable_title&&(this._getTitleStyles(this.QandSArray[i].question.title,"nps-question-title-".concat(i,"-").concat(e)),a.appendChild(this._setTitleContent(this.QandSArray[i].question.title,"nps-question-title-".concat(i,"-").concat(e),this.configId))),this.QandSArray[i].question.enable_description&&(this._getDescriptionStyles(this.QandSArray[i].question.description,"nps-question-description-".concat(i,"-").concat(e)),a.appendChild(this._setDescriptionContent(this.QandSArray[i].question.description,"nps-question-description-".concat(i,"-").concat(e),this.configId))));var r=document.createElement("div");r.classList.add("apxor-survey-nps-qands-suggestion-container".concat(this.cssPostFix)),this.QandSArray[i].enable_suggestion&&(this._getNpsSuggestionElementStyles(this.QandSArray[i].suggestion,i,e),this.QandSArray[i].suggestion.text.forEach((function(t,o){var a=document.createElement("div");a.classList.add("apxor-survey-nps-qands-".concat(i,"-").concat(e,"-suggestion-").concat(o,"-").concat(n.cssPostFix)),n.rating.stateOfQandS[e].suggestion.includes(o)&&a.classList.add("apxor-survey-nps-qands-".concat(i,"-").concat(e,"-suggestion-").concat(o,"-selected-").concat(n.cssPostFix)),a.setAttribute("apx-nps-survey-key","suggestion"),a.innerText=t,a.onclick=function(){document.querySelectorAll('div[apx-nps-survey-key="suggestion"]').forEach((function(t,a){if(o===a)if(n.rating.stateOfQandS[e].suggestion.includes(o)){t.classList.remove("apxor-survey-nps-qands-".concat(i,"-").concat(e,"-suggestion-").concat(a,"-selected-").concat(n.cssPostFix));var r=n.rating.stateOfQandS[e].suggestion.indexOf(o);n.rating.stateOfQandS[e].suggestion.splice(r,1)}else t.classList.add("apxor-survey-nps-qands-".concat(i,"-").concat(e,"-suggestion-").concat(a,"-selected-").concat(n.cssPostFix)),n.rating.stateOfQandS[e].suggestion.push(o)}))},r.appendChild(a)})));var s=document.createElement("div");if(s.classList.add("apxor-survey-nps-qands-inputtextfield-container".concat(this.cssPostFix)),this.QandSArray[i].enable_input_text&&0!==Object.keys(this.answer.input_text).length){this.getTextAreaNodeStyles(this.answer,"qands");var c=this.getTextAreaNode(this.answer.input_text,this.rating.stateOfQandS[e].input_field,"qands");c.addEventListener("input",(function(t){n.rating.stateOfQandS[e].input_field=t.target.value})),s.appendChild(c)}o.appendChild(a),o.appendChild(r),o.appendChild(s),this.QandSContainer.appendChild(o)}}},{key:"createReactionAndMessageContainer",value:function(e){this.npsTopContainer.innerHTML="",this.npsTopContainerMessage.innerHTML="";var t=this.getReactionIndexFromReactionPath(this.rating,parseInt(this.ratingButtons.start_from_index+e));if(-1!==t){var n=document.createElement("div");n.setAttribute("apx-survey-key","rating-message"),n.classList.add("apxor-survey-nps-topcontainer-element-".concat(t,"-").concat(this.ratingButtons.start_from_index+e,"-").concat(this.cssPostFix));var i=document.createElement("div");i.classList.add("apxor-survey-nps-topcontainer-text-element-".concat(t,"-").concat(this.ratingButtons.start_from_index+e,"-").concat(this.cssPostFix)),this.reactions[t].enable_text&&"above_image"===this.reactions[t].text_position&&(this._getTitleStyles(this.reactions[t].text,"reaction-text-".concat(t)),i.appendChild(this._setTitleContent(this.reactions[t].text,"reaction-text-".concat(t),"")),n.appendChild(i));var o=document.createElement("div");if(o.classList.add("apxor-survey-nps-topcontainer-image-element-".concat(t,"-").concat(this.cssPostFix)),this.reactions[t].enable_image){this._getNpsTopImageStyles(this.reactions[t].image,t);var a=document.createElement("img");a.src=this.reactions[t].image.path,a.classList.add("apxor-survey-npstopcontainer-image-".concat(t)),o.appendChild(a)}n.appendChild(o),this.reactions[t].enable_text&&"below_image"===this.reactions[t].text_position&&(this._getTitleStyles(this.reactions[t].text,"reaction-text-".concat(t)),i.appendChild(this._setTitleContent(this.reactions[t].text,"reaction-text-".concat(t),"")),n.appendChild(i)),this.reactions[t].enable_text&&"below_buttons"===this.reactions[t].text_position&&(this._getTitleStyles(this.reactions[t].text,"reaction-text-".concat(t)),i.appendChild(this._setTitleContent(this.reactions[t].text,"reaction-text-".concat(t),"")),this.npsTopContainerMessage.appendChild(i)),this.npsTopContainer.appendChild(n)}}},{key:"changeButtonColor",value:function(e){if(this.QandAArray[this.index].is_required)if(e){if(document.getElementById("apxor-survey_bottom-next-button")){var t=document.getElementById("apxor-survey_bottom-next-button");t.style.pointerEvents="visible",t.style.background="".concat(this.buttonColorObject.next.active_color)}if(document.getElementById("apxor-survey_bottom-submit-button")){var n=document.getElementById("apxor-survey_bottom-submit-button");n.style.pointerEvents="visible",n.style.background="".concat(this.buttonColorObject.submit.active_color)}}else{if(document.getElementById("apxor-survey_bottom-next-button")){var i=document.getElementById("apxor-survey_bottom-next-button");i.style.pointerEvents="none",i.style.background="".concat(this.buttonColorObject.next.inactive_color)}if(document.getElementById("apxor-survey_bottom-submit-button")){var o=document.getElementById("apxor-survey_bottom-submit-button");o.style.pointerEvents="none",o.style.background="".concat(this.buttonColorObject.submit.inactive_color)}}}},{key:"getReactionIndexFromReactionPath",value:function(e,t){if(!e.enable_reaction)return-1;var n=e.reaction_paths,i=-1;return Object.keys(n).forEach((function(e){n[e].includes(t)&&(i=e)})),i}},{key:"getcurrentQandSArrayIndexFromQandSPaths",value:function(e,t){if(!e.enable_qands)return-1;var n=e.qandsPaths,i=-1;return Object.keys(n).forEach((function(e){n[e].includes(t)&&(i=e)})),parseInt(i)}},{key:"_getNpscontainerStyles",value:function(e){var t="";e.enable_margin&&(t="\n margin:".concat(e.margin.top,"px ").concat(e.margin.right,"px ").concat(e.margin.bottom,"px ").concat(e.margin.left,"px\n "));var n="";e.enable_padding&&(n="\n padding:".concat(e.padding.top,"px ").concat(e.padding.right,"px ").concat(e.padding.bottom,"px ").concat(e.padding.left,"px\n "));var i="";e.enable_border&&(i="\n border:".concat(e.border.width,"px ").concat(e.border.style," ").concat(e.border.color));var o="\n .apxor-survey-nps-container".concat(this.cssPostFix,"{\n width:auto;\n height:auto;\n display:flex;\n flex-direction:column;\n align-items:center;\n ").concat(t,";\n ").concat(n,";\n ").concat(i,";\n }").replaceAll("\n","").replace(/[\s]{2,999}/g,""),a=document.createElement("style");return a.innerHTML=o,this.overlayElement.appendChild(a),o}},{key:"_getNpsTopContainerStyles",value:function(){return"\n .apxor-survey-nps-topcontainer".concat(this.cssPostFix,"{\n width:100%;\n height:auto;\n display:flex;\n flex-direction:column;\n align-items:center;\n position:relative;\n margin:8px 0px 8px 0px;\n }\n .apxor-survey-nps-topcontainer-message").concat(this.cssPostFix,"{\n width:100%;\n height:auto;\n display:flex;\n flex-direction:column;\n align-items:center;\n position:relative;\n margin:8px 0px 8px 0px;\n }")}},{key:"_getNpsTopImageStyles",value:function(e,t){var n,i="";e.enable_border&&(i="\n border-radius:".concat(e.border.radius,"%;\n border:").concat(e.border.width,"px ").concat(e.border.style," ").concat(e.border.color,";\n "));var o="";e.enable_margin&&(o="\n margin:".concat(e.margin.top,"px ").concat(e.margin.right,"px ").concat(e.margin.bottom,"px ").concat(e.margin.left,"px;\n ")),n="\n .apxor-survey-nps-topcontainer-image-element-".concat(t,"-").concat(this.cssPostFix,"{\n width:100%;\n height:100%;\n text-align:").concat(e.position,";\n margin:4px 0px 4px 0px;\n }\n .apxor-survey-npstopcontainer-image-").concat(t,"{\n height: ").concat(e.height,"px;\n width: ").concat(e.width,"px;\n ").concat(i,";\n ").concat(o,";\n }").replaceAll("\n","").replace(/[\s]{2,999}/g,"");var a=document.createElement("style");return a.innerHTML=n,this.overlayElement.appendChild(a),n}},{key:"_getRatingBlockStyles",value:function(){return"\n .apxor-survey-ratingdiv".concat(this.cssPostFix,"{\n display:flex;\n flex-direction:column;\n align-items:center;\n width:100%;\n height:auto;\n margin:24px 0px 24px 0px;\n }\n .apxor-survey-topratingdiv").concat(this.cssPostFix,"{\n position:relative;\n display:flex;\n align-items:center;\n justify-content:center;\n width:auto;\n height:auto;\n }\n .apxor-survey-bottomratingdiv").concat(this.cssPostFix,"{\n position:relative;\n display:flex;\n align-items:center;\n justify-content:center;\n width:auto;\n height:auto;\n }")}},{key:"_getRatingNumberButtonStyles",value:function(e){var t=_setFontFaceAtRule(e.font),n="";null!=e&&e.font&&(n="\n font-size:".concat(e.font.size,"px;\n font-family:").concat(t[0],";\n font-style:").concat(e.font.style,";\n font-weight:").concat(e.font.weight,";\n "));var i="";e.enable_margin&&(i="\n margin:".concat(e.margin.top,"px ").concat(e.margin.right,"px ").concat(e.margin.bottom,"px ").concat(e.margin.left,"px;\n "));var o="";e.enable_padding&&(o="\n padding:".concat(e.padding.top,"px ").concat(e.padding.right,"px ").concat(e.padding.bottom,"px ").concat(e.padding.left,"px;\n "));var a="";e.enable_border&&(a="\n border:".concat(e.border.width,"px ").concat(e.border.style," ").concat(e.border.inactive_color,";\n border-radius:").concat(e.border.radius,"px;\n "));var r="";e.enable_border&&(r="\n border:".concat(e.border.width,"px ").concat(e.border.style," ").concat(e.border.color,";\n border-radius:").concat(e.border.radius,"px;\n "));for(var s="",c=0;c<e.buttons.length;c++)s+="\n ".concat(t[1],"\n .apxor-survey-buttondiv-").concat(c,"-").concat(this.cssPostFix,"{\n cursor:pointer;\n position:relative;\n display: flex;\n justify-content: space-evenly;\n align-items: center;\n width: ").concat(e.width,"px;\n height: ").concat(e.height,"px;\n ").concat(n,";\n ").concat(i,";\n ").concat(o,";\n ").concat(a,";\n color:").concat(e.color_inactive,";\n background-color: ").concat(e.enable_colors?e.buttons[c].color:e.bg_color_inactive,";\n }\n .apxor-survey-buttondiv-selected-").concat(c,"-").concat(this.cssPostFix,"{\n background:").concat(e.bg_color_active,"!important;\n color:").concat(e.color_active," !important;\n ").concat(r,";\n }");var l="\n .apxor-survey-buttondiv-unselected{\n opacity:0.3!important;\n }\n ".concat(s,";\n ").replaceAll("\n","").replace(/[\s]{2,999}/g,""),d=document.createElement("style");return d.innerHTML=l,this.overlayElement.appendChild(d),l}},{key:"_getRatingRadioButtonStyles",value:function(e){var t=this,n="";e.font&&(n="\n font-size:".concat(e.font.size,"px;\n font-family:").concat(e.font.family,";\n font-style:").concat(e.font.style,";\n font-weight:").concat(e.font.weight,";\n "));var i="";e.enable_margin&&(i="\n margin:".concat(e.margin.top,"px ").concat(e.margin.right,"px ").concat(e.margin.bottom,"px ").concat(e.margin.left,"px;\n "));var o="";e.enable_padding&&(o="\n padding:".concat(e.padding.top,"px ").concat(e.padding.right,"px ").concat(e.padding.bottom,"px ").concat(e.padding.left,"px;\n "));var a="";e.buttons.forEach((function(r,s){a+="\n .apxor-survey-radio-button-container-".concat(s,"-styling").concat(t.cssPostFix,"{\n width:auto;\n height:auto;\n display:flex;\n flex-direction:column;\n justify-content:center;\n align-items:center;\n gap:4px;\n ").concat(i,";\n ").concat(o,";\n }\n .apxor-survey-radiobutton-").concat(s,"-").concat(t.cssPostFix,"{\n cursor:pointer;\n position:relative;\n display: flex;\n justify-content: center;\n align-items: center;\n width: ").concat(e.width,"px;\n height: ").concat(e.height,"px;\n margin:0px 2px 0px 2px;\n border-radius:50px;\n border:2px solid ").concat(e.bg_color_inactive,";\n }\n .apxor-survey-radiobutton-selected-").concat(s,"-").concat(t.cssPostFix,"{\n border:2px solid ").concat(e.bg_color_active,";\n }\n .apxor-survey-radiobutton-inner-").concat(s,"-").concat(t.cssPostFix,"{\n width:").concat(e.width-10,"px;\n height:").concat(e.height-10,"px;\n border-radius:50px;\n background-color:").concat(e.bg_color_active,";\n }\n .apxor-survey-radiobutton-inner-").concat(s,"-hidden-").concat(t.cssPostFix,"{\n display:none;\n }\n .apxor-survey-radiobutton-text-").concat(s,"-").concat(t.cssPostFix,"{\n ").concat(n,";\n color:").concat(e.color_inactive,"\n }\n .apxor-survey-radiobutton-text-").concat(s,"-selected-").concat(t.cssPostFix,"{\n color:").concat(e.color_active,"\n }\n ")}));var r="\n ".concat(a).replaceAll("\n","").replace(/[\s]{2,999}/g,""),s=document.createElement("style");return s.innerHTML=r,this.overlayElement.appendChild(s),r}},{key:"getStarButtonStyling",value:function(e){var t=this,n="";e.enable_margin&&(n="\n margin:".concat(e.margin.top,"px ").concat(e.margin.right,"px ").concat(e.margin.bottom,"px ").concat(e.margin.left,"px\n ")),e.enable_box_model&&(e.border.color=e.box_model.active_color,e.border.inactive_color=e.box_model.inactive_color);var i="",o="";e.enable_border&&(i="\n border-radius:".concat(e.border.radius,"px;\n border:").concat(e.border.width,"px ").concat(e.border.style," ").concat(e.border.inactive_color,";\n "),o="\n border-radius:".concat(e.border.radius,"px;\n border:").concat(e.border.width,"px ").concat(e.border.style," ").concat(e.border.color,";\n "));var a="";e.buttons.forEach((function(r,s){a+="\n .apxor-survey-starbutton-".concat(s).concat(t.cssPostFix,"{\n position:relative;\n width:auto;\n display:flex;\n justify-content:center;\n align-items:center;\n background:").concat(e.bg_color_inactive,";\n ").concat(i,";\n ").concat(n,";\n }\n .apxor-survey-starbutton-active-").concat(s).concat(t.cssPostFix,"{\n background:").concat(e.bg_color_active,";\n ").concat(o,";\n }")}));var r="".concat(a,"\n ").replaceAll("\n","").replace(/[\s]{2,999}/g,""),s=document.createElement("style");return s.innerHTML=r,this.overlayElement.appendChild(s),r}},{key:"getEmojiButtonStyling",value:function(e){var t=this,n="";e.enable_margin&&(n="\n margin:".concat(e.margin.top,"px ").concat(e.margin.right,"px ").concat(e.margin.bottom,"px ").concat(e.margin.left,"px;\n "));var i="";e.enable_padding&&(i="\n padding:".concat(e.padding.top,"px ").concat(e.padding.right,"px ").concat(e.padding.bottom,"px ").concat(e.padding.left,"px;\n "));var o="",a="";e.enable_border&&(o="\n border: ".concat(e.border.width,"px ").concat(e.border.style," transparent;\n "),a="\n border: ".concat(e.border.width,"px ").concat(e.border.style," ").concat(e.border.color,";\n "));var r="";e.enable_shadow&&(r="\n text-shadow: ".concat(e.shadow.offset_x,"px ").concat(e.shadow.offset_y,"px 12px ").concat(e.shadow.color,";\n "));var s="",c="";e.enable_fade?(s="\n opacity:1;\n ",c="\n opacity:0.5;\n "):e.enable_shadow?(s="\n font-size:".concat(e.width+4,"px;\n ").concat(r,";\n "),c="\n font-size:".concat(e.width-4,"px;\n ")):(s="\n ".concat(a,";\n background:").concat(e.bg_color_active,";\n "),c="\n ");var l="";e.buttons.forEach((function(a,r){l+="\n .apxor-survey-emoji-buttondiv-".concat(r,"-").concat(t.cssPostFix,"{\n position:relative;\n display:flex;\n justify-content:center;\n align-items:center;\n overflow:hidden;\n font-size:").concat(e.width,"px;\n ").concat(n,";\n ").concat(i,";\n ").concat(o,";\n }\n .apxor-survey-emoji-buttondiv-active-").concat(r,"-").concat(t.cssPostFix,"{\n ").concat(s,";\n }\n .apxor-survey-emoji-buttondiv-inactive-").concat(r,"-").concat(t.cssPostFix,"{\n ").concat(c,";\n }\n ")}));var d;d="\n ".concat(l,"\n ").replaceAll("\n","").replace(/[\s]{2,999}/g,"");var p=document.createElement("style");return p.innerHTML=d,this.overlayElement.appendChild(p),d}},{key:"getRatingLabelsStyling",value:function(e,t){var n=0,i=0;e.enable_margin&&(n=e.margin.left,i=e.margin.right);var o="\n .apxor-survey-rating-first-label-styles-".concat(this.cssPostFix,"{\n position:absolute;\n pointer-events:none;\n ").concat("top"===t.first_rating.position?"bottom:100%;":"top:100%;","\n left:").concat(n,"px;\n }\n .apxor-survey-rating-last-label-styles-").concat(this.cssPostFix,"{\n position:absolute;\n pointer-events:none;\n ").concat("top"===t.last_rating.position?"bottom:100%;":"top:100%;","\n right:").concat(i,"px;\n }\n ").replaceAll("\n","").replace(/[\s]{2,999}/g,""),a=document.createElement("style");return a.innerHTML=o,this.overlayElement.appendChild(a),o}},{key:"getStarSvg",value:function(e,t,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"transparent",o='<svg xmlns="http://www.w3.org/2000/svg" width="'.concat(e,'" height="').concat(t,'" viewBox="0 0 36 33" fill="none">\n <path d="M18 0L22.0413 12.4377H35.119L24.5389 20.1246L28.5801 32.5623L18 24.8754L7.41987 32.5623L11.4611 20.1246L0.880983 12.4377H13.9587L18 0Z" fill="').concat(n,'" stroke="').concat(i,'"/>\n </svg>\n ');return o}},{key:"getNpsQandSContainerStyles",value:function(){return"\n .apxor-survey-nps-reactionandmessage-container".concat(this.cssPostFix,"{\n width:100%;\n\n }\n .apxor-survey-nps-qands-container").concat(this.cssPostFix,"{\n width:100%;\n height:auto;\n display:flex;\n flex-direction:column;\n }\n .apxor-survey-nps-qands-question-container").concat(this.cssPostFix,"{\n width:100%;\n height:auto;\n display:flex;\n flex-direction:column;\n margin:4px 0px 4px 0px;\n }\n .apxor-survey-nps-qands-suggestion-container").concat(this.cssPostFix,"{\n display:flex;\n flex-direction:row;\n flex-wrap:wrap;\n width:100%;\n margin:4px 0px 4px 0px;\n }\n .apxor-survey-nps-qands-inputtextfield-container").concat(this.cssPostFix,"{\n width:100%;\n height:auto;\n margin:4px 0px 4px 0px;\n }")}},{key:"_getNpsTopContainerElementStyles",value:function(){var e=this;if(this.rating.enable_reaction||0!==Object.keys(this.reactions).length){var t="";this.reactions.forEach((function(n,i){for(var o=n.start;o<=n.end;o++)t+="\n .apxor-survey-nps-topcontainer-element-".concat(i,"-").concat(o,"-").concat(e.cssPostFix,"{\n width:100%;\n height:100%;\n display:flex;\n flex-direction:column;\n align-items:center;\n }\n .apxor-survey-nps-topcontainer-text-element-").concat(i,"-").concat(o,"-").concat(e.cssPostFix,"{\n width:100%;\n height:100%;\n margin:4px 0px 4px 0px;\n }")}));var n="\n ".concat(t,"\n ;\n ").replaceAll("\n","").replace(/[\s]{2,999}/g,""),i=document.createElement("style");return i.innerHTML=n,this.overlayElement.appendChild(i),n}}},{key:"_getNpsQandSContainerElementStyles",value:function(){var e=this;if(this.rating.enable_qands||0!==Object.keys(this.QandSArray).length){var t="";this.QandSArray.forEach((function(n,i){for(var o=n.start;o<=n.end;o++)t+="\n .apxor-survey-nps-qands-container-element-".concat(i,"-").concat(o,"-").concat(e.cssPostFix,"{\n width:100%;\n height:auto;\n display:flex;\n flex-direction:column;\n align-items:center;\n }\n .apxor-survey-nps-qands-container-element-").concat(i,"-").concat(o,"-hidden-").concat(e.cssPostFix,"{\n display:none;\n }")}));var n="\n ".concat(t,"\n ;\n ").replaceAll("\n","").replace(/[\s]{2,999}/g,""),i=document.createElement("style");return i.innerHTML=n,this.overlayElement.appendChild(i),n}}},{key:"_getNpsSuggestionElementStyles",value:function(e,t,n){var i=this,o="";o=e.enable_margin?"\n margin:".concat(e.margin.top||4,"px ").concat(e.margin.right||4,"px ").concat(e.margin.bottom||4,"px ").concat(e.margin.left||4,"px;\n "):"\n margin:0px 4px 0px 4px;\n ";var a="";a=e.enable_padding?"\n padding:".concat(e.padding.top||8,"px ").concat(e.padding.right||16,"px ").concat(e.padding.bottom||8,"px ").concat(e.padding.left||16,"px;\n "):"\n padding:8px 16px 8px 16px;\n ";var r="";r=e.enable_border?"\n border-radius: ".concat(e.border.radius||16,"px;\n border: ").concat(e.border.width||2,"px ").concat(e.border.style," ").concat(e.border.color,";\n "):"\n border-radius: 16px;\n border:2px solid black;\n ";var s,c=_setFontFaceAtRule(e.font);s="\n font-size:".concat(e.font.size,"px;\n font-family:").concat(c[0],";\n font-style:").concat(e.font.style,";\n font-weight:").concat(e.font.weight,";\n ");var l="";e.text.forEach((function(d,p){l+="\n ".concat(c[1],"\n .apxor-survey-nps-qands-").concat(t,"-").concat(n,"-suggestion-").concat(p,"-").concat(i.cssPostFix,"{\n color:").concat(e.color_inactive,";\n background:").concat(e.bg_color_inactive,";\n ").concat(a,";\n ").concat(o,";\n ").concat(r,";\n ").concat(s,";\n }\n .apxor-survey-nps-qands-").concat(t,"-").concat(n,"-suggestion-").concat(p,"-selected-").concat(i.cssPostFix,"{\n background:").concat(e.bg_color_active,"!important;\n color:").concat(e.color_active," !important;\n }")}));var d="\n ".concat(l,";\n ").replaceAll("\n","").replace(/[\s]{2,999}/g,""),p=document.createElement("style");return p.innerHTML=d,this.overlayElement.appendChild(p),d}},{key:"getTextAreaNodeStyles",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n="";e.enable_margin&&"qands"!==t&&(n="\n margin:".concat(e.margin.top,"px ").concat(e.margin.right,"px ").concat(e.margin.bottom,"px ").concat(e.margin.left,"px\n "));var i,o,a="";i=0===e.padding.left?10:e.padding.left,o=0===e.padding.top?2:e.padding.top,e.enable_padding&&(a="\n padding:".concat(o,"px ").concat(e.padding.right,"px ").concat(e.padding.bottom,"px ").concat(i,"px\n "));var r="";e.input_text.enable_border&&(r="\n border:".concat(e.input_text.border.width,"px ").concat(e.input_text.border.style," ").concat(e.input_text.border.color,";\n border-radius:").concat(e.input_text.border.radius,"px;\n "));var s="";null!=e&&e.font&&(s="\n font-size:".concat(e.font.size,"px;\n font-family:").concat(e.font.family,";\n font-style:").concat(e.font.style,";\n font-weight:").concat(e.font.weight,";\n "));var c="";e.input_text.enable_placeholder&&(c="\n color:".concat(e.input_text.placeholder.color,";"));var l="\n .apxor-survey-".concat(t,"-textarea-container").concat(this.cssPostFix,"{\n display:flex;\n align-items:center;\n position:relative;\n ").concat(n,";\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n }\n .apxor-survey-").concat(t,"-textarea-content").concat(this.cssPostFix,"{\n width:100%;\n background-color:").concat(e.input_text.background_color,";\n color:").concat(e.input_text.text_color,";\n ").concat(s,";\n ").concat(a,";\n ").concat(r,";\n }\n .apxor-survey-").concat(t,"-textarea-content").concat(this.cssPostFix,"::placeholder{\n ").concat(c,";\n }\n ").replaceAll("\n","").replace(/[\s]{2,999}/g,""),d=document.createElement("style");return d.innerHTML=l,this.overlayElement.appendChild(d),l}},{key:"getTextAreaNode",value:function(e,t){var n=this,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";if(0!==Object.keys(e).length){var o=e.max_characters,a=e.placeholder,r=a.text;a.color;var s=document.createElement("div");s.classList.add("apxor-survey-".concat(i,"-textarea-container").concat(this.cssPostFix));var c=document.createElement("textarea");return c.classList.add("apxor-survey-".concat(i,"-textarea-content").concat(this.cssPostFix)),c.setAttribute("placeholder",r),c.setAttribute("maxlength",o),c.classList.add("apxor-survey-".concat(i,"-textarea-content").concat(this.cssPostFix,"::placeholder")),""!==t&&""!==t.trim()&&(c.innerText=t),addEventListener("change",(function(e){n.freeTextValue=c.value})),s.appendChild(c),s}}},{key:"_setCloseButton",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",i=document.createElement("div");return e.type===CLOSE_BUTTON_STYLE.NORMAL?i.innerHTML=getCloseSVG(e.width,e.height,e.color):e.type===CLOSE_BUTTON_STYLE.FILL?"circle"===e.shape?i.innerHTML=getCloseWithCircleSVG(e.width,e.height,e.fill_color,e.color):i.innerHTML=getCloseWithRectangleSVG(e.width,e.height,e.fill_color,e.color):i.innerHTML='<img src="'.concat(e.path,'" width="').concat(e.width,'px" height="').concat(e.height,'px"></img>'),i.classList.add("apxor-".concat(n,"close-button").concat(this.cssPostFix)),i.addEventListener("click",(function(){document.body.removeChild(t.overlayElement),t.closeCallback(),t.enable_survey_request?t._logSurveyAppEvent("apx_survey_dialog_close_icon_clicked",{apx_survey_id:t.configId,apx_survey_name:t.name,apx_survey_type:!0,apx_time_to_complete:Math.round((Date.now()-t.startTime)/1e3),campaign_type:"survey"}):t._logSurveyAppEvent("apx_survey_close_button_clicked",{apx_survey_id:t.configId,apx_survey_name:t.name,apx_survey_question_id:t.QandAArray[t.index].question.id,apx_survey_type:!0,apx_time_to_complete:Math.round((Date.now()-t.startTime)/1e3),campaign_type:"survey"}),t._logSurveyQuestionEvent(t.index),t._submitSurveyResponses(!1)})),i}},{key:"_setBackButton",value:function(){var e=this;if(this.enable_header&&this.header.enable_back_button){var t=document.createElement("div");return this.header.backbutton.type===BACK_BUTTON_STYLE.NORMAL?t.innerHTML=getBackSVG(this.header.backbutton.width,this.header.backbutton.height,this.header.backbutton.color):this.header.backbutton.type===BACK_BUTTON_STYLE.FILL?t.innerHTML=getFilledBackArrowSvg(this.header.backbutton.width,this.header.backbutton.height,this.header.backbutton.fill_color):t.innerHTML='<img src="'.concat(this.header.backbutton.path,'" width="').concat(this.header.backbutton.width,'px" height="').concat(this.header.backbutton.height,'px"></img>'),t.classList.add("apxor-back-button".concat(this.cssPostFix)),t.addEventListener("click",(function(){var t;document.body.removeChild(e.overlayElement),e._logSurveyAppEvent("apx_survey_back_button_clicked",{apx_question_id:e.QandAArray[e.index].question.id,apx_question_name:null!==(t=e.QandAArray[e.index].question.title.text)&&void 0!==t?t:"",apx_question_type:e.QandAArray[e.index].answer.answer_mode,apx_question_position:e.index+1,apx_survey_id:e.configId,apx_survey_name:e.name,apx_survey_type:!0,campaign_type:"survey"}),e.index=e.visitedQuestion.pop(),e.index<0?e.closeCallback():e.createSurvey()})),t}}},{key:"_setProgressBar",value:function(){if(this.enable_progressbar&&1!=this.QandArrayLength){var e=document.createElement("div");e.classList.add("apxor-survey-progress-bar".concat(this.cssPostFix));var t=document.createElement("div");return t.classList.add("apxor-survey-bar".concat(this.cssPostFix)),this.index<=this.QandAArray.length?t.style.transform="translateX(".concat(-(100-100/this.QandAArray.length*(this.index+1)),"%)"):e.style.visibility="hidden",e.appendChild(t),e}}},{key:"_setTitleContent",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";resolveDynamicText(e);var i=document.createElement("div");return i.classList.add("apxor-survey-".concat(t,"-div").concat(this.cssPostFix)),i.appendChild(createNewTextElement(e,n,t)),i}},{key:"_setDescriptionContent",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";resolveDynamicText(e);var i=document.createElement("div");return i.classList.add("apxor-survey-".concat(t,"-div").concat(this.cssPostFix)),i.appendChild(createNewTextElement(e,n,t)),i}},{key:"_createButtonContainer",value:function(){this.bottomButtonContainer=document.createElement("div"),this.bottomButtonContainer.classList.add("apxor-survey-button-container".concat(this.cssPostFix)),this._setBottomButtonStyles(),this.bottomButtonContainer.appendChild(this._setButtons(this.footer.buttons)),this.surveyContainer.appendChild(this.bottomButtonContainer),this.changeButtonColor(this.anyActiveChoices)}},{key:"_setButtons",value:function(e){var t,n,i=this,o=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.buttonColorObject={},e.forEach((function(e,t){i.buttonColorObject[e.action.type]={active_color:e.active_color,inactive_color:e.inactive_color},o&&"vertical"===i.surveyrequest.buttons_direction&&(e.type="wide",e.slot=3)}));var a=function(e,t){var n;if(i.visitedQuestion.push(i.index),document.body.removeChild(i.overlayElement),i._logSurveyAppEvent("apx_survey_skip_button_clicked",{apx_question_id:i.QandAArray[i.index].question.id,apx_question_name:null!==(n=i.QandAArray[i.index].question.title.text)&&void 0!==n?n:"",apx_question_type:i.QandAArray[i.index].answer.answer_mode,apx_question_position:i.index+1,apx_survey_id:i.configId,apx_survey_name:i.name,apx_survey_type:!0,campaign_type:"survey"}),i._logSurveyQuestionEvent(i.index),i.index+1>=i.QandAArray.length){if(i.enable_success_message)return;i.closeCallback()}else i.index+=1,i.createSurvey()},r=function(e,t){var n,o,a=!1,r=i.QandAArray[i.index].answer,s=r.answer_mode,c=void 0===s?"":s,l=r.choices,d=void 0===l?{}:l,p=r.input_text,u=void 0===p?{}:p,h=r.text_answer,g=void 0===h?{}:h,f=r.is_answered,m=void 0!==f&&f,_=null==d?void 0:d.list;switch(c){case"single_choice":case"multi_choice":_.forEach((function(e){(e.is_selected||e.is_other&&null!==e.other_answer&&""!==e.other_answer.trim())&&(a=!0)}));break;case"text":m&&""!==g&&""!==g.trim()&&null!==u&&(a=!0);break;case"rating":null!=i&&null!==(n=i.ratingButtons)&&void 0!==n&&n.selected_rating.includes(1)&&(a=!0)}a||i._logSurveyAppEvent("apx_survey_skip_button_clicked",{apx_question_id:i.QandAArray[i.index].question.id,apx_question_name:null!==(o=i.QandAArray[i.index].question.title.text)&&void 0!==o?o:"",apx_question_type:i.QandAArray[i.index].answer.answer_mode,apx_question_position:i.index+1,apx_survey_id:i.configId,apx_survey_name:i.name,apx_survey_type:!0});i.visitedQuestion.push(i.index),document.body.removeChild(i.overlayElement),i.survey.is_response_based_survey?(a&&i._logSurveyQuestionEvent(i.index),i.index=i._getNextQuestionByResponseBasedSurvey()?i.index:i.index+1,i.index===i.QandAArray.length?(i.enable_success_message||i.closeCallback(),i._submitSurveyResponses(!0)):i.createSurvey()):(a&&i._logSurveyQuestionEvent(i.index),i.index===i.QandAArray.length-1?(i.enable_success_message||i.closeCallback(),i._submitSurveyResponses(!0)):(i.index+=1,i.createSurvey()))},s=function(e,t){var n;document.body.removeChild(i.overlayElement),i._logSurveyAppEvent("apx_survey_prev_button_clicked",{apx_question_id:i.QandAArray[i.index].question.id,apx_question_name:null!==(n=i.QandAArray[i.index].question.title.text)&&void 0!==n?n:"",apx_question_type:i.QandAArray[i.index].answer.answer_mode,apx_question_position:i.index+1,apx_survey_id:i.configId,apx_survey_name:i.name,apx_survey_type:!0}),i.index=i.visitedQuestion.pop(),i.index<0?i.closeCallback():i.createSurvey()},c=function(e,t){if(i.enable_survey_request)i._logSurveyAppEvent("apx_survey_dialog_yes_clicked",{apx_survey_id:i.configId,apx_survey_name:i.name,apx_survey_type:!0,campaign_type:"survey"}),document.body.removeChild(i.overlayElement),i.enable_survey_request=!1,i.createSurvey();else{if(i.visitedQuestion.push(i.index),document.body.removeChild(i.overlayElement),i.index+1>=i.QandAArray.length)return void i.closeCallback();i.index+=1,i.createSurvey()}},l=function(e,t){i.enable_survey_request?(i._logSurveyAppEvent("apx_survey_dialog_no_clicked",{apx_survey_id:i.configId,apx_survey_name:i.name,apx_survey_type:!0,campaign_type:"survey"}),document.body.removeChild(i.overlayElement),i.closeCallback(),i.enable_survey_request=!1):(document.body.removeChild(i.overlayElement),i.closeCallback())},d=function(e,t){document.body.removeChild(i.overlayElement),i.closeCallback()},p=function(e,t){"next"===t?r():"prev"===t?s():"submit"===t?r():"skip"===t?a():"yes"===t?c():"no"===t?l():d()},u={complete:p,_isCancelled:!1,action:""},h=this.enable_survey_request?"row":this.direction.buttons,g=generateButtonsBlock(this.configId,this.name,{},EVENT_PREFIX.SURVEY,e,h,"","survey_bottom",u,!1,this.uis,0,"survey",o?null!==(t=null===(n=this.surveyrequest)||void 0===n?void 0:n.buttons_position)&&void 0!==t?t:"flex-end":"space-between");return g}},{key:"_getNextQuestionByResponseBasedSurvey",value:function(){var e,t,n,i,o=this,a=this._getAnswerForQuestion(this.index),r=null===(e=this.QandAArray[this.index])||void 0===e||null===(e=e.answer)||void 0===e?void 0:e.answer_mode,s=a.answers.sort(),c=(null==a||null===(t=a.answerTexts)||void 0===t?void 0:t[0])||"",l=null===(n=this.QandAArray[this.index].question)||void 0===n?void 0:n.paths,d=null===(i=this.QandAArray[this.index].question)||void 0===i?void 0:i.paths_v2,p=!1;switch(r){case"single_choice":case"multi_choice":case"rating":d?d.forEach((function(e){var t,n,i;p||(e.choices.forEach((function(e){if(e.length!==s.length||JSON.stringify(e.sort())!==JSON.stringify(s));else{var t;if(null!==(t=o.QandAArray[o.index])&&void 0!==t&&null!==(t=t.answer)&&void 0!==t&&t.is_text_mandatory&&a.isOtherChoiceSelected&&0===a.others.length)return;p=!0}})),null!=e&&e.is_wild_card&&(p=!0),p&&((null==e?void 0:e.action_type)===ACTION_TYPE.REDIRECT?(o._logSurveyAppEvent("apx_survey_redirected",{apx_question_id:o.QandAArray[o.index].question.id,apx_question_name:null!==(t=o.QandAArray[o.index].question.title.text)&&void 0!==t?t:"",apx_question_type:o.QandAArray[o.index].answer.answer_mode,apx_question_position:o.index+1,apx_survey_id:o.configId,apx_survey_name:o.name}),o.index=o.QandAArray.length,window.open(null==e||null===(n=e.action)||void 0===n?void 0:n.url,(null==e||null===(i=e.action)||void 0===i?void 0:i.type)===REDIRECT_TYPE.INTERNAL?"_self":"_blank")):(null==e?void 0:e.action_type)===ACTION_TYPE.SKIP&&("-1"===e.question_id?o.index=o.QandAArray.length:o.index=o.questionids.indexOf(parseInt(e.question_id)))))})):l&&Object.keys(l).forEach((function(e){p||l[e].forEach((function(t){if(t.length===s.length&&JSON.stringify(t.sort())===JSON.stringify(s)){var n;if(null!==(n=o.QandAArray[o.index])&&void 0!==n&&null!==(n=n.answer)&&void 0!==n&&n.is_text_mandatory&&a.isOtherChoiceSelected&&0===a.others.length)return;return p=!0,void(o.index="-1"===e?o.QandAArray.length:o.questionids.indexOf(parseInt(e)))}}))}));break;case"text":d?d.forEach((function(e){var t,n,i;p||(0===c.length||(p=!0,(null==e?void 0:e.action_type)===ACTION_TYPE.REDIRECT?(o._logSurveyAppEvent("apx_survey_redirected",{apx_question_id:o.QandAArray[o.index].question.id,apx_question_name:null!==(t=o.QandAArray[o.index].question.title.text)&&void 0!==t?t:"",apx_question_type:o.QandAArray[o.index].answer.answer_mode,apx_question_position:o.index+1,apx_survey_id:o.configId,apx_survey_name:o.name}),o.index=o.QandAArray.length,window.open(null==e||null===(n=e.action)||void 0===n?void 0:n.url,(null==e||null===(i=e.action)||void 0===i?void 0:i.type)===REDIRECT_TYPE.INTERNAL?"_self":"_blank")):(null==e?void 0:e.action_type)===ACTION_TYPE.SKIP&&("-1"===e.question_id?o.index=o.QandAArray.length:o.index=o.questionids.indexOf(parseInt(e.question_id)))))})):l&&Object.keys(l).forEach((function(e){if(!p)return 0!==c.length?(p=!0,void(o.index="-1"===e?o.QandAArray.length:o.questionids.indexOf(parseInt(e)))):void 0}))}return p}},{key:"_setSurveySuccessContainerStyles",value:function(){var e="\n ".concat(this._setBackgroundOverlaystyles()," \n ").concat(this._getSurveySuccessContainerStyles(),"\n ").concat(this._getSurveySuccessContainerIconStyles()," \n ").replaceAll("\n","").replace(/[\s]{2,999}/g,""),t=document.createElement("style");t.innerHTML=e,this.overlayElement.appendChild(t)}},{key:"_getSurveySuccessContainerStyles",value:function(){var e,t="";null!==(e=this.success_message)&&void 0!==e&&e.enable_margin&&(t="\n margin-top:".concat(this.success_message.margin.top,"px;\n margin-left:").concat(-this.success_message.margin.right,"px;\n "));var n="";switch(this.success_message.position.position){case"top-left":n="\n top:".concat(0,"px;\n left:").concat(0,"px;\n ");break;case"top-center":n="\n left:50%;\n top:".concat(0,"px;\n -webkit-transform: translate(-50%, ").concat(0,"px);\n -moz-transform: translate(-50%, ").concat(0,"px);\n ");break;case"top-right":n="\n top:".concat(0,"px;\n right:").concat(0,"px;\n ");break;case"bottom-left":n="\n bottom:".concat(0,"px;\n left:").concat(0,"px;\n ");break;case"bottom-center":n="\n left:50%;\n bottom:".concat(0,"px;\n -webkit-transform: translate(-50%, ").concat(0,"px);\n -moz-transform: translate(-50%, ").concat(0,"px);\n ");break;case"bottom-right":n="\n bottom:".concat(0,"px;\n right:").concat(0,"px;\n ");break;case"left":n="\n left:".concat(0,"px;\n top:50%;\n -webkit-transform: translate(").concat(0,"px, -50%);\n -moz-transform: translate(").concat(0,"px, -50%);\n ");break;case"right":n="\n right:".concat(0,"px;\n top:50%;\n -webkit-transform: translate(").concat(0,"px, -50%);\n -moz-transform: translate(").concat(0,"px, -50%);\n ");break;default:n="\n left:50%;\n top:50%;\n -webkit-transform: translate(-50%, -50%);\n -moz-transform: translate(-50%, -50%);\n "}var i="";return this.success_message.enable_border&&(i="\n border-radius:".concat(this.success_message.border.radius,"px;\n border:").concat(this.success_message.border.width,"px ").concat(this.success_message.border.style," ").concat(this.success_message.border.color,";\n ")),"\n .apxor-survey-Successcontainer".concat(this.cssPostFix,"{\n width: ").concat(this.success_message.width,"%;\n position: fixed;\n display:flex;\n flex-direction:column;\n align-items:center;\n z-index:999999;\n background: ").concat(this.success_message.background_color,";\n ").concat(t,";\n ").concat(n,";\n ").concat(i,"\n ").concat(this.success_message.enable_gradient?"background-image:linear-gradient(".concat(this.success_message.gradient.direction,", ").concat(this.success_message.gradient.colors[0],", ").concat(this.success_message.gradient.colors[1],");"):"","\n }")}},{key:"_getSurveySuccessContainerIconStyles",value:function(){var e="";if(this.success_message.enable_icon){var t="";this.success_message.icon.enable_border&&(t="\n border-radius:".concat(this.success_message.icon.border.radius,"%;\n border:").concat(this.success_message.icon.border.width,"px ").concat(this.success_message.icon.border.style," ").concat(this.success_message.icon.border.color,";\n "));var n="";this.success_message.icon.enable_margin&&(n="\n margin-top:".concat(this.success_message.icon.margin.top,"px;\n margin-bottom:").concat(this.success_message.icon.margin.bottom,"px;\n margin-left:").concat(this.success_message.icon.margin.left,"px;\n margin-right:").concat(this.success_message.icon.margin.right,"px;\n "));var i="";this.success_message.icon.enable_padding&&(i="\n padding-top:".concat(this.success_message.icon.padding.top,"px;\n padding-bottom:").concat(this.success_message.icon.padding.bottom,"px;\n padding-left:").concat(this.success_message.icon.padding.left,"px;\n padding-right:").concat(this.success_message.icon.padding.right,"px;\n ")),e="\n .apxor-success-icon-container".concat(this.cssPostFix,' {\n align-self:"center";\n }\n .apxor-success-icon-content').concat(this.cssPostFix," {\n height: ").concat(this.success_message.icon.height,"px;\n width: ").concat(this.success_message.icon.width,"px;\n ").concat(t,"\n ").concat(n,"\n ").concat(i,"\n }\n ")}return e}},{key:"_enableSuccessMessageContainer",value:function(){var e=this;if(this.enable_success_message){this._setBackgroundOverlay(),this._setSurveySuccessContainerStyles();var t=document.createElement("div");if(t.classList.add("apxor-survey-Successcontainer".concat(this.cssPostFix)),this.success_message.enable_icon){var n=document.createElement("div");n.classList.add("apxor-success-icon-container".concat(this.cssPostFix));var i=document.createElement("img");i.src=this.success_message.icon.path,i.classList.add("apxor-success-icon-content".concat(this.cssPostFix)),n.appendChild(i),t.appendChild(n)}var o=document.createElement("div");this.success_message.enable_title&&(this._getTitleStyles(this.success_message.title,"success-message-title"),o.appendChild(this._setTitleContent(this.success_message.title,"success-message-title",this.index))),this.success_message.enable_description&&(this._getDescriptionStyles(this.success_message.description,"success-message-description"),o.appendChild(this._setDescriptionContent(this.success_message.description,"success-message-description",this.index))),(this.success_message.enable_title||this.success_message.enable_description)&&(o.style.width="100%",t.appendChild(o)),this.overlayElement.appendChild(t),setTimeout((function(){document.body.removeChild(e.overlayElement),e.closeCallback()}),this.success_message.duration)}}}]),e}(),STYLISED_EMOJI_5=['<svg width="35" height="35" viewBox="0 0 23 22" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path d="M0 10.9046C0 4.88216 4.88188 3.24249e-05 10.9049 3.24249e-05C16.9267 3.24249e-05 21.8085 4.88216 21.8085 10.9046C21.8085 16.9269 16.9267 21.809 10.9049 21.809C4.88188 21.809 0 16.9269 0 10.9046Z" fill="#E5510A"/>\n <path d="M7.6916 8.87557C7.6916 9.62346 7.33083 10.2299 6.88691 10.2299C6.44426 10.2299 6.0835 9.62346 6.0835 8.87557C6.0835 8.12768 6.44426 7.52116 6.88691 7.52116C7.33083 7.52116 7.6916 8.12768 7.6916 8.87557Z" fill="black"/>\n <path d="M15.7255 8.87557C15.7255 9.62346 15.366 10.2299 14.9221 10.2299C14.4782 10.2299 14.1187 9.62346 14.1187 8.87557C14.1187 8.12768 14.4782 7.52116 14.9221 7.52116C15.366 7.52116 15.7255 8.12768 15.7255 8.87557Z" fill="black"/>\n <path d="M9.15239 6.99092L8.42062 7.72205L5.98096 5.28226L6.71273 4.55126L9.15239 6.99092Z" fill="black"/>\n <path d="M13.3882 7.72205L12.6577 6.99092L15.0974 4.55126L15.8279 5.28226L13.3882 7.72205Z" fill="black"/>\n <path d="M7 16.4995C8 12.4995 13 10.4995 15 16.4998" stroke="black" stroke-linecap="round"/>\n </svg>','<svg width="35" height="35" viewBox="0 0 23 22" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path d="M0.808594 10.9046C0.808594 4.88216 5.69048 3.24249e-05 11.7135 3.24249e-05C17.7353 3.24249e-05 22.6171 4.88216 22.6171 10.9046C22.6171 16.9269 17.7353 21.809 11.7135 21.809C5.69048 21.809 0.808594 16.9269 0.808594 10.9046Z" fill="#EA731D"/>\n <path d="M8.5002 8.87557C8.5002 9.62346 8.13942 10.2299 7.6955 10.2299C7.25286 10.2299 6.89209 9.62346 6.89209 8.87557C6.89209 8.12768 7.25286 7.52116 7.6955 7.52116C8.13942 7.52116 8.5002 8.12768 8.5002 8.87557Z" fill="black"/>\n <path d="M16.5341 8.87557C16.5341 9.62346 16.1746 10.2299 15.7307 10.2299C15.2867 10.2299 14.9272 9.62346 14.9272 8.87557C14.9272 8.12768 15.2867 7.52116 15.7307 7.52116C16.1746 7.52116 16.5341 8.12768 16.5341 8.87557Z" fill="black"/>\n <path d="M7.80859 16.4998C8.80859 12.4998 13.8086 10.4997 15.8086 16.5" stroke="black" stroke-linecap="round"/>\n </svg>','<svg width="35" height="35" viewBox="0 0 23 22" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path d="M0.234375 10.9046C0.234375 4.88216 5.11626 3.24249e-05 11.1393 3.24249e-05C17.161 3.24249e-05 22.0429 4.88216 22.0429 10.9046C22.0429 16.9269 17.161 21.809 11.1393 21.809C5.11626 21.809 0.234375 16.9269 0.234375 10.9046Z" fill="#F8C94F"/>\n <path d="M7.92598 8.87557C7.92598 9.62346 7.5652 10.2299 7.12128 10.2299C6.67864 10.2299 6.31787 9.62346 6.31787 8.87557C6.31787 8.12768 6.67864 7.52116 7.12128 7.52116C7.5652 7.52116 7.92598 8.12768 7.92598 8.87557Z" fill="black"/>\n <path d="M15.9599 8.87557C15.9599 9.62346 15.6004 10.2299 15.1564 10.2299C14.7125 10.2299 14.353 9.62346 14.353 8.87557C14.353 8.12768 14.7125 7.52116 15.1564 7.52116C15.6004 7.52116 15.9599 8.12768 15.9599 8.87557Z" fill="black"/>\n <path d="M7.73438 15.5002C9.73438 15.4999 11.7344 15.4997 14.7344 15.5" stroke="black" stroke-linecap="round"/>\n </svg>','<svg width="35" height="35" viewBox="0 0 23 22" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path d="M0.46875 10.9046C0.46875 4.88216 5.35063 3.24249e-05 11.3737 3.24249e-05C17.3954 3.24249e-05 22.2773 4.88216 22.2773 10.9046C22.2773 16.9269 17.3954 21.809 11.3737 21.809C5.35063 21.809 0.46875 16.9269 0.46875 10.9046Z" fill="#A3CF6A"/>\n <path d="M8.16035 8.87557C8.16035 9.62346 7.79958 10.2299 7.35566 10.2299C6.91301 10.2299 6.55225 9.62346 6.55225 8.87557C6.55225 8.12768 6.91301 7.52116 7.35566 7.52116C7.79958 7.52116 8.16035 8.12768 8.16035 8.87557Z" fill="black"/>\n <path d="M16.1942 8.87557C16.1942 9.62346 15.8347 10.2299 15.3908 10.2299C14.9469 10.2299 14.5874 9.62346 14.5874 8.87557C14.5874 8.12768 14.9469 7.52116 15.3908 7.52116C15.8347 7.52116 16.1942 8.12768 16.1942 8.87557Z" fill="black"/>\n <path d="M14.9688 13.375C14.4688 17.5002 7.96875 17.5003 7.46875 13.3751L14.9688 13.375Z" fill="black" stroke="black" stroke-linecap="round"/>\n </svg>\n ','<svg width="35" height="35" viewBox="0 0 23 22" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path d="M0.234375 10.9042C0.234375 4.8818 5.11626 -0.000333786 11.1393 -0.000333786C17.161 -0.000333786 22.0429 4.8818 22.0429 10.9042C22.0429 16.9266 17.161 21.8086 11.1393 21.8086C5.11626 21.8086 0.234375 16.9266 0.234375 10.9042Z" fill="#7BB65C"/>\n <path d="M14.7344 13.3748C14.2344 17.5 7.73438 17.5 7.23438 13.3749L14.7344 13.3748Z" fill="#646A6E" stroke="#646A6E" stroke-linecap="round"/>\n <path d="M9.63644 8.10736L9.63732 8.09652C9.63732 7.41374 9.14286 6.78855 8.40031 6.78855C7.81043 6.78855 7.46866 7.21257 7.35155 7.60952C7.23531 7.21257 6.89266 6.78855 6.30278 6.78855C5.56023 6.78855 5.06665 7.41374 5.06665 8.09652V8.10736C5.06318 8.25596 5.06665 9.76759 7.35068 10.9997V11L7.35155 10.9998V11L7.35241 10.9998V11V10.9997C9.63731 9.76759 9.64078 8.25596 9.63644 8.10736Z" fill="#646A6E"/>\n <path d="M17.3357 8.10736V8.09652C17.3357 7.41374 16.8421 6.78855 16.0995 6.78855C15.5097 6.78855 15.1679 7.21257 15.0508 7.60952C14.9345 7.21257 14.5919 6.78855 14.002 6.78855C13.2595 6.78855 12.7659 7.41374 12.7659 8.09652V8.10736C12.7624 8.25596 12.7659 9.76759 15.0499 10.9997V11L15.0508 10.9998V11L15.0516 10.9998V11V10.9997C17.3365 9.76759 17.34 8.25596 17.3357 8.10736Z" fill="#646A6E"/>\n </svg>'],STYLISED_EMOJI_10=['<svg width="35" height="35" viewBox="0 0 23 22" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path d="M0 10.9046C0 4.88216 4.88188 3.24249e-05 10.9049 3.24249e-05C16.9267 3.24249e-05 21.8085 4.88216 21.8085 10.9046C21.8085 16.9269 16.9267 21.809 10.9049 21.809C4.88188 21.809 0 16.9269 0 10.9046Z" fill="#E5510A"/>\n <path d="M7.6916 8.87557C7.6916 9.62346 7.33083 10.2299 6.88691 10.2299C6.44426 10.2299 6.0835 9.62346 6.0835 8.87557C6.0835 8.12768 6.44426 7.52116 6.88691 7.52116C7.33083 7.52116 7.6916 8.12768 7.6916 8.87557Z" fill="black"/>\n <path d="M15.7255 8.87557C15.7255 9.62346 15.366 10.2299 14.9221 10.2299C14.4782 10.2299 14.1187 9.62346 14.1187 8.87557C14.1187 8.12768 14.4782 7.52116 14.9221 7.52116C15.366 7.52116 15.7255 8.12768 15.7255 8.87557Z" fill="black"/>\n <path d="M9.15239 6.99092L8.42062 7.72205L5.98096 5.28226L6.71273 4.55126L9.15239 6.99092Z" fill="black"/>\n <path d="M13.3882 7.72205L12.6577 6.99092L15.0974 4.55126L15.8279 5.28226L13.3882 7.72205Z" fill="black"/>\n <path d="M7 16.4995C8 12.4995 13 10.4995 15 16.4998" stroke="black" stroke-linecap="round"/>\n </svg>','<svg width="35" height="35" viewBox="0 0 23 22" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path d="M0.808594 10.9046C0.808594 4.88216 5.69048 3.24249e-05 11.7135 3.24249e-05C17.7353 3.24249e-05 22.6171 4.88216 22.6171 10.9046C22.6171 16.9269 17.7353 21.809 11.7135 21.809C5.69048 21.809 0.808594 16.9269 0.808594 10.9046Z" fill="#EA731D"/>\n <path d="M8.5002 8.87557C8.5002 9.62346 8.13942 10.2299 7.6955 10.2299C7.25286 10.2299 6.89209 9.62346 6.89209 8.87557C6.89209 8.12768 7.25286 7.52116 7.6955 7.52116C8.13942 7.52116 8.5002 8.12768 8.5002 8.87557Z" fill="black"/>\n <path d="M16.5341 8.87557C16.5341 9.62346 16.1746 10.2299 15.7307 10.2299C15.2867 10.2299 14.9272 9.62346 14.9272 8.87557C14.9272 8.12768 15.2867 7.52116 15.7307 7.52116C16.1746 7.52116 16.5341 8.12768 16.5341 8.87557Z" fill="black"/>\n <path d="M7.80859 16.4998C8.80859 12.4998 13.8086 10.4997 15.8086 16.5" stroke="black" stroke-linecap="round"/>\n </svg>','<svg width="35" height="35" viewBox="0 0 23 22" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path d="M0.617188 10.9046C0.617188 4.88216 5.49907 3.24249e-05 11.5221 3.24249e-05C17.5439 3.24249e-05 22.4257 4.88216 22.4257 10.9046C22.4257 16.9269 17.5439 21.809 11.5221 21.809C5.49907 21.809 0.617188 16.9269 0.617188 10.9046Z" fill="#EA8F4D"/>\n <path d="M8.30879 8.87557C8.30879 9.62346 7.94802 10.2299 7.50409 10.2299C7.06145 10.2299 6.70068 9.62346 6.70068 8.87557C6.70068 8.12768 7.06145 7.52116 7.50409 7.52116C7.94802 7.52116 8.30879 8.12768 8.30879 8.87557Z" fill="black"/>\n <path d="M16.3427 8.87557C16.3427 9.62346 15.9832 10.2299 15.5393 10.2299C15.0953 10.2299 14.7358 9.62346 14.7358 8.87557C14.7358 8.12768 15.0953 7.52116 15.5393 7.52116C15.9832 7.52116 16.3427 8.12768 16.3427 8.87557Z" fill="black"/>\n <path d="M7.61719 15.4999C8.95052 13.0405 13.1172 11.9999 15.6172 15.5" stroke="black" stroke-linecap="round"/>\n </svg>','<svg width="35" height="35" viewBox="0 0 23 22" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path d="M0.425781 10.9046C0.425781 4.88216 5.30767 3.24249e-05 11.3307 3.24249e-05C17.3524 3.24249e-05 22.2343 4.88216 22.2343 10.9046C22.2343 16.9269 17.3524 21.809 11.3307 21.809C5.30767 21.809 0.425781 16.9269 0.425781 10.9046Z" fill="#F1B052"/>\n <path d="M8.11738 8.87557C8.11738 9.62346 7.75661 10.2299 7.31269 10.2299C6.87004 10.2299 6.50928 9.62346 6.50928 8.87557C6.50928 8.12768 6.87004 7.52116 7.31269 7.52116C7.75661 7.52116 8.11738 8.12768 8.11738 8.87557Z" fill="black"/>\n <path d="M16.1513 8.87557C16.1513 9.62346 15.7918 10.2299 15.3479 10.2299C14.9039 10.2299 14.5444 9.62346 14.5444 8.87557C14.5444 8.12768 14.9039 7.52116 15.3479 7.52116C15.7918 7.52116 16.1513 8.12768 16.1513 8.87557Z" fill="black"/>\n <path d="M8.42578 15.5002C9.92578 14.0001 12.4258 14.0001 13.9258 15.5001" stroke="black" stroke-linecap="round"/>\n </svg>','<svg width="35" height="35" viewBox="0 0 23 22" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path d="M0.234375 10.9046C0.234375 4.88216 5.11626 3.24249e-05 11.1393 3.24249e-05C17.161 3.24249e-05 22.0429 4.88216 22.0429 10.9046C22.0429 16.9269 17.161 21.809 11.1393 21.809C5.11626 21.809 0.234375 16.9269 0.234375 10.9046Z" fill="#F8C94F"/>\n <path d="M7.92598 8.87557C7.92598 9.62346 7.5652 10.2299 7.12128 10.2299C6.67864 10.2299 6.31787 9.62346 6.31787 8.87557C6.31787 8.12768 6.67864 7.52116 7.12128 7.52116C7.5652 7.52116 7.92598 8.12768 7.92598 8.87557Z" fill="black"/>\n <path d="M15.9599 8.87557C15.9599 9.62346 15.6004 10.2299 15.1564 10.2299C14.7125 10.2299 14.353 9.62346 14.353 8.87557C14.353 8.12768 14.7125 7.52116 15.1564 7.52116C15.6004 7.52116 15.9599 8.12768 15.9599 8.87557Z" fill="black"/>\n <path d="M7.73438 15.5002C9.73438 15.4999 11.7344 15.4997 14.7344 15.5" stroke="black" stroke-linecap="round"/>\n </svg>','<svg width="35" height="35" viewBox="0 0 23 22" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path d="M0 10.9046C0 4.88216 4.88188 3.20353e-05 10.9049 3.20353e-05C16.9267 3.20353e-05 21.8085 4.88216 21.8085 10.9046C21.8085 16.9269 16.9267 21.809 10.9049 21.809C4.88188 21.809 0 16.9269 0 10.9046Z" fill="#F8C94F"/>\n <path d="M7.6916 8.87557C7.6916 9.62346 7.33083 10.2299 6.88691 10.2299C6.44426 10.2299 6.0835 9.62346 6.0835 8.87557C6.0835 8.12768 6.44426 7.52116 6.88691 7.52116C7.33083 7.52116 7.6916 8.12768 7.6916 8.87557Z" fill="black"/>\n <path d="M15.7255 8.87557C15.7255 9.62346 15.366 10.2299 14.9221 10.2299C14.4782 10.2299 14.1187 9.62346 14.1187 8.87557C14.1187 8.12768 14.4782 7.52116 14.9221 7.52116C15.366 7.52116 15.7255 8.12768 15.7255 8.87557Z" fill="black"/>\n </svg>','<svg width="35" height="35" viewBox="0 0 23 22" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path d="M0.0429688 10.9046C0.0429688 4.88216 4.92485 3.24249e-05 10.9479 3.24249e-05C16.9696 3.24249e-05 21.8515 4.88216 21.8515 10.9046C21.8515 16.9269 16.9696 21.809 10.9479 21.809C4.92485 21.809 0.0429688 16.9269 0.0429688 10.9046Z" fill="#F6DE4F"/>\n <path d="M7.73457 8.87557C7.73457 9.62346 7.3738 10.2299 6.92987 10.2299C6.48723 10.2299 6.12646 9.62346 6.12646 8.87557C6.12646 8.12768 6.48723 7.52116 6.92987 7.52116C7.3738 7.52116 7.73457 8.12768 7.73457 8.87557Z" fill="black"/>\n <path d="M15.7685 8.87557C15.7685 9.62346 15.409 10.2299 14.965 10.2299C14.5211 10.2299 14.1616 9.62346 14.1616 8.87557C14.1616 8.12768 14.5211 7.52116 14.965 7.52116C15.409 7.52116 15.7685 8.12768 15.7685 8.87557Z" fill="black"/>\n <path d="M13.543 14.3751C12.043 15.8751 9.54297 15.8751 8.04297 14.3751" stroke="black" stroke-linecap="round"/>\n </svg>','<svg width="35" height="35" viewBox="0 0 23 22" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path d="M0.851562 10.9046C0.851562 4.88216 5.73345 3.24249e-05 11.7565 3.24249e-05C17.7782 3.24249e-05 22.6601 4.88216 22.6601 10.9046C22.6601 16.9269 17.7782 21.809 11.7565 21.809C5.73345 21.809 0.851562 16.9269 0.851562 10.9046Z" fill="#D7D55A"/>\n <path d="M8.54316 8.87557C8.54316 9.62346 8.18239 10.2299 7.73847 10.2299C7.29582 10.2299 6.93506 9.62346 6.93506 8.87557C6.93506 8.12768 7.29582 7.52116 7.73847 7.52116C8.18239 7.52116 8.54316 8.12768 8.54316 8.87557Z" fill="black"/>\n <path d="M16.577 8.87557C16.577 9.62346 16.2176 10.2299 15.7736 10.2299C15.3297 10.2299 14.9702 9.62346 14.9702 8.87557C14.9702 8.12768 15.3297 7.52116 15.7736 7.52116C16.2176 7.52116 16.577 8.12768 16.577 8.87557Z" fill="black"/>\n <path d="M15.3516 14.3749C13.8516 17.0001 9.85156 17.0002 7.85156 14.375" stroke="black" stroke-linecap="round"/>\n </svg>','<svg width="35" height="35" viewBox="0 0 23 22" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path d="M0.660156 10.9046C0.660156 4.88216 5.54204 3.24249e-05 11.5651 3.24249e-05C17.5868 3.24249e-05 22.4687 4.88216 22.4687 10.9046C22.4687 16.9269 17.5868 21.809 11.5651 21.809C5.54204 21.809 0.660156 16.9269 0.660156 10.9046Z" fill="#B7CF6A"/>\n <path d="M8.35176 8.87557C8.35176 9.62346 7.99099 10.2299 7.54706 10.2299C7.10442 10.2299 6.74365 9.62346 6.74365 8.87557C6.74365 8.12768 7.10442 7.52116 7.54706 7.52116C7.99099 7.52116 8.35176 8.12768 8.35176 8.87557Z" fill="black"/>\n <path d="M16.3856 8.87557C16.3856 9.62346 16.0262 10.2299 15.5822 10.2299C15.1383 10.2299 14.7788 9.62346 14.7788 8.87557C14.7788 8.12768 15.1383 7.52116 15.5822 7.52116C16.0262 7.52116 16.3856 8.12768 16.3856 8.87557Z" fill="black"/>\n <path d="M15.1602 13.375C14.6602 17.5002 8.16016 17.5003 7.66016 13.3751" stroke="black" stroke-linecap="round"/>\n </svg>','<svg width="35" height="35" viewBox="0 0 23 22" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path d="M0.46875 10.9046C0.46875 4.88216 5.35063 3.24249e-05 11.3737 3.24249e-05C17.3954 3.24249e-05 22.2773 4.88216 22.2773 10.9046C22.2773 16.9269 17.3954 21.809 11.3737 21.809C5.35063 21.809 0.46875 16.9269 0.46875 10.9046Z" fill="#A3CF6A"/>\n <path d="M8.16035 8.87557C8.16035 9.62346 7.79958 10.2299 7.35566 10.2299C6.91301 10.2299 6.55225 9.62346 6.55225 8.87557C6.55225 8.12768 6.91301 7.52116 7.35566 7.52116C7.79958 7.52116 8.16035 8.12768 8.16035 8.87557Z" fill="black"/>\n <path d="M16.1942 8.87557C16.1942 9.62346 15.8347 10.2299 15.3908 10.2299C14.9469 10.2299 14.5874 9.62346 14.5874 8.87557C14.5874 8.12768 14.9469 7.52116 15.3908 7.52116C15.8347 7.52116 16.1942 8.12768 16.1942 8.87557Z" fill="black"/>\n <path d="M14.9688 13.375C14.4688 17.5002 7.96875 17.5003 7.46875 13.3751L14.9688 13.375Z" fill="black" stroke="black" stroke-linecap="round"/>\n </svg>','<svg width="35" height="35" viewBox="0 0 23 22" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path d="M0 10.9042C0 4.8818 4.88188 -0.000333786 10.9049 -0.000333786C16.9267 -0.000333786 21.8085 4.8818 21.8085 10.9042C21.8085 16.9266 16.9267 21.8086 10.9049 21.8086C4.88188 21.8086 0 16.9266 0 10.9042Z" fill="#7BB65C"/>\n <path d="M14.5 13.3748C14 17.5 7.5 17.5 7 13.3749L14.5 13.3748Z" fill="#646A6E" stroke="#646A6E" stroke-linecap="round"/>\n <path d="M9.40207 8.10736L9.40294 8.09652C9.40294 7.41374 8.90848 6.78855 8.16593 6.78855C7.57606 6.78855 7.23428 7.21257 7.11718 7.60952C7.00094 7.21257 6.65828 6.78855 6.06841 6.78855C5.32586 6.78855 4.83227 7.41374 4.83227 8.09652V8.10736C4.8288 8.25596 4.83227 9.76759 7.1163 10.9997V11L7.11718 10.9998V11L7.11804 10.9998V11V10.9997C9.40294 9.76759 9.40641 8.25596 9.40207 8.10736Z" fill="#646A6E"/>\n <path d="M17.1013 8.10736V8.09652C17.1013 7.41374 16.6077 6.78855 15.8652 6.78855C15.2753 6.78855 14.9335 7.21257 14.8164 7.60952C14.7001 7.21257 14.3575 6.78855 13.7676 6.78855C13.0251 6.78855 12.5315 7.41374 12.5315 8.09652V8.10736C12.528 8.25596 12.5315 9.76759 14.8155 10.9997V11L14.8164 10.9998V11L14.8173 10.9998V11V10.9997C17.1022 9.76759 17.1056 8.25596 17.1013 8.10736Z" fill="#646A6E"/>\n </svg>'],STYLISED_EMOJI_GREY_10=['<svg width="35" height="35" viewBox="0 0 23 22" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path d="M0 10.9042C0 4.8818 4.88188 -0.000334176 10.9049 -0.000334176C16.9267 -0.000334176 21.8085 4.8818 21.8085 10.9042C21.8085 16.9266 16.9267 21.8086 10.9049 21.8086C4.88188 21.8086 0 16.9266 0 10.9042Z" fill="#D9DCDE"/>\n <path d="M7.69209 8.87521C7.69209 9.6231 7.33132 10.2295 6.88739 10.2295C6.44475 10.2295 6.08398 9.6231 6.08398 8.87521C6.08398 8.12732 6.44475 7.52079 6.88739 7.52079C7.33132 7.52079 7.69209 8.12732 7.69209 8.87521Z" fill="#646A6F"/>\n <path d="M15.726 8.87521C15.726 9.6231 15.3665 10.2295 14.9226 10.2295C14.4786 10.2295 14.1191 9.6231 14.1191 8.87521C14.1191 8.12732 14.4786 7.52079 14.9226 7.52079C15.3665 7.52079 15.726 8.12732 15.726 8.87521Z" fill="#646A6F"/>\n <path d="M9.1519 6.99055L8.42013 7.72168L5.98047 5.28189L6.71224 4.55089L9.1519 6.99055Z" fill="#646A6F"/>\n <path d="M13.3887 7.72168L12.6582 6.99055L15.0979 4.55089L15.8284 5.28189L13.3887 7.72168Z" fill="#646A6F"/>\n <path d="M7 16.4997C8 12.4996 13 10.4996 15 16.4999" stroke="#646A6E" stroke-linecap="round"/>\n </svg>','<svg width="35" height="35" viewBox="0 0 23 22" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path d="M0.808594 10.9042C0.808594 4.8818 5.69048 -0.000334176 11.7135 -0.000334176C17.7353 -0.000334176 22.6171 4.8818 22.6171 10.9042C22.6171 16.9266 17.7353 21.8086 11.7135 21.8086C5.69048 21.8086 0.808594 16.9266 0.808594 10.9042Z" fill="#D9DCDE"/>\n <path d="M8.50068 8.87521C8.50068 9.6231 8.13991 10.2295 7.69599 10.2295C7.25334 10.2295 6.89258 9.6231 6.89258 8.87521C6.89258 8.12732 7.25334 7.52079 7.69599 7.52079C8.13991 7.52079 8.50068 8.12732 8.50068 8.87521Z" fill="#646A6F"/>\n <path d="M16.5346 8.87521C16.5346 9.6231 16.1751 10.2295 15.7312 10.2295C15.2872 10.2295 14.9277 9.6231 14.9277 8.87521C14.9277 8.12732 15.2872 7.52079 15.7312 7.52079C16.1751 7.52079 16.5346 8.12732 16.5346 8.87521Z" fill="#646A6F"/>\n <path d="M7.80859 16.4997C8.80859 12.4996 13.8086 10.4996 15.8086 16.4999" stroke="#646A6E" stroke-linecap="round"/>\n </svg>','<svg width="35" height="35" viewBox="0 0 23 22" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path d="M0.617188 10.9042C0.617188 4.8818 5.49907 -0.000334176 11.5221 -0.000334176C17.5439 -0.000334176 22.4257 4.8818 22.4257 10.9042C22.4257 16.9266 17.5439 21.8086 11.5221 21.8086C5.49907 21.8086 0.617188 16.9266 0.617188 10.9042Z" fill="#D9DCDE"/>\n <path d="M8.30928 8.87521C8.30928 9.6231 7.9485 10.2295 7.50458 10.2295C7.06194 10.2295 6.70117 9.6231 6.70117 8.87521C6.70117 8.12732 7.06194 7.52079 7.50458 7.52079C7.9485 7.52079 8.30928 8.12732 8.30928 8.87521Z" fill="#646A6F"/>\n <path d="M16.3432 8.87521C16.3432 9.6231 15.9837 10.2295 15.5398 10.2295C15.0958 10.2295 14.7363 9.6231 14.7363 8.87521C14.7363 8.12732 15.0958 7.52079 15.5398 7.52079C15.9837 7.52079 16.3432 8.12732 16.3432 8.87521Z" fill="#646A6F"/>\n <path d="M7.61719 15.4995C8.95052 13.0401 13.1172 11.9996 15.6172 15.4996" stroke="#646A6E" stroke-linecap="round"/>\n </svg>','<svg width="35" height="35" viewBox="0 0 23 22" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path d="M0.425781 10.9042C0.425781 4.8818 5.30767 -0.000333786 11.3307 -0.000333786C17.3524 -0.000333786 22.2343 4.8818 22.2343 10.9042C22.2343 16.9266 17.3524 21.8086 11.3307 21.8086C5.30767 21.8086 0.425781 16.9266 0.425781 10.9042Z" fill="#D9DCDE"/>\n <path d="M8.11787 8.87521C8.11787 9.6231 7.7571 10.2295 7.31318 10.2295C6.87053 10.2295 6.50977 9.6231 6.50977 8.87521C6.50977 8.12732 6.87053 7.52079 7.31318 7.52079C7.7571 7.52079 8.11787 8.12732 8.11787 8.87521Z" fill="#646A6F"/>\n <path d="M16.1518 8.87521C16.1518 9.6231 15.7923 10.2295 15.3483 10.2295C14.9044 10.2295 14.5449 9.6231 14.5449 8.87521C14.5449 8.12732 14.9044 7.52079 15.3483 7.52079C15.7923 7.52079 16.1518 8.12732 16.1518 8.87521Z" fill="#646A6F"/>\n <path d="M8.42578 15.5001C9.92578 14 12.4258 14 13.9258 15.5" stroke="#646A6E" stroke-linecap="round"/>\n </svg>','<svg width="35" height="35" viewBox="0 0 23 22" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path d="M0.234375 10.9042C0.234375 4.8818 5.11626 -0.000333786 11.1393 -0.000333786C17.161 -0.000333786 22.0429 4.8818 22.0429 10.9042C22.0429 16.9266 17.161 21.8086 11.1393 21.8086C5.11626 21.8086 0.234375 16.9266 0.234375 10.9042Z" fill="#D9DCDE"/>\n <path d="M7.92647 8.87521C7.92647 9.6231 7.56569 10.2295 7.12177 10.2295C6.67912 10.2295 6.31836 9.6231 6.31836 8.87521C6.31836 8.12732 6.67912 7.52079 7.12177 7.52079C7.56569 7.52079 7.92647 8.12732 7.92647 8.87521Z" fill="#646A6F"/>\n <path d="M15.9603 8.87521C15.9603 9.6231 15.6009 10.2295 15.1569 10.2295C14.713 10.2295 14.3535 9.6231 14.3535 8.87521C14.3535 8.12732 14.713 7.52079 15.1569 7.52079C15.6009 7.52079 15.9603 8.12732 15.9603 8.87521Z" fill="#646A6F"/>\n <path d="M7.73438 15.5003C9.73438 15.5 11.7344 15.4998 14.7344 15.5001" stroke="#646A6E" stroke-linecap="round"/>\n </svg>','<svg width="35" height="35" viewBox="0 0 23 22" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path d="M0.234375 10.9042C0.234375 4.8818 5.11626 -0.000333786 11.1393 -0.000333786C17.161 -0.000333786 22.0429 4.8818 22.0429 10.9042C22.0429 16.9266 17.161 21.8086 11.1393 21.8086C5.11626 21.8086 0.234375 16.9266 0.234375 10.9042Z" fill="#D9DCDE"/>\n <path d="M7.92647 8.87521C7.92647 9.6231 7.56569 10.2295 7.12177 10.2295C6.67912 10.2295 6.31836 9.6231 6.31836 8.87521C6.31836 8.12732 6.67912 7.52079 7.12177 7.52079C7.56569 7.52079 7.92647 8.12732 7.92647 8.87521Z" fill="#646A6F"/>\n <path d="M15.9603 8.87521C15.9603 9.6231 15.6009 10.2295 15.1569 10.2295C14.713 10.2295 14.3535 9.6231 14.3535 8.87521C14.3535 8.12732 14.713 7.52079 15.1569 7.52079C15.6009 7.52079 15.9603 8.12732 15.9603 8.87521Z" fill="#646A6F"/>\n </svg>','<svg width="35" height="35" viewBox="0 0 23 22" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path d="M0.0429688 10.9042C0.0429688 4.8818 4.92485 -0.000333786 10.9479 -0.000333786C16.9696 -0.000333786 21.8515 4.8818 21.8515 10.9042C21.8515 16.9266 16.9696 21.8086 10.9479 21.8086C4.92485 21.8086 0.0429688 16.9266 0.0429688 10.9042Z" fill="#D9DCDE"/>\n <path d="M7.73506 8.87521C7.73506 9.6231 7.37429 10.2295 6.93036 10.2295C6.48772 10.2295 6.12695 9.6231 6.12695 8.87521C6.12695 8.12732 6.48772 7.52079 6.93036 7.52079C7.37429 7.52079 7.73506 8.12732 7.73506 8.87521Z" fill="#646A6F"/>\n <path d="M15.7689 8.87521C15.7689 9.6231 15.4095 10.2295 14.9655 10.2295C14.5216 10.2295 14.1621 9.6231 14.1621 8.87521C14.1621 8.12732 14.5216 7.52079 14.9655 7.52079C15.4095 7.52079 15.7689 8.12732 15.7689 8.87521Z" fill="#646A6F"/>\n <path d="M13.543 14.3749C12.043 15.875 9.54297 15.875 8.04297 14.375" stroke="#646A6E" stroke-linecap="round"/>\n </svg>','<svg width="35" height="35" viewBox="0 0 23 22" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path d="M0.851562 10.9042C0.851562 4.8818 5.73345 -0.000333786 11.7565 -0.000333786C17.7782 -0.000333786 22.6601 4.8818 22.6601 10.9042C22.6601 16.9266 17.7782 21.8086 11.7565 21.8086C5.73345 21.8086 0.851562 16.9266 0.851562 10.9042Z" fill="#D9DCDE"/>\n <path d="M8.54365 8.87521C8.54365 9.6231 8.18288 10.2295 7.73896 10.2295C7.29631 10.2295 6.93555 9.6231 6.93555 8.87521C6.93555 8.12732 7.29631 7.52079 7.73896 7.52079C8.18288 7.52079 8.54365 8.12732 8.54365 8.87521Z" fill="#646A6F"/>\n <path d="M16.5775 8.87521C16.5775 9.6231 16.218 10.2295 15.7741 10.2295C15.3302 10.2295 14.9707 9.6231 14.9707 8.87521C14.9707 8.12732 15.3302 7.52079 15.7741 7.52079C16.218 7.52079 16.5775 8.12732 16.5775 8.87521Z" fill="#646A6F"/>\n <path d="M15.3516 14.3748C13.8516 17 9.85156 17 7.85156 14.3749" stroke="#646A6E" stroke-linecap="round"/>\n </svg>','<svg width="35" height="35" viewBox="0 0 23 22" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path d="M0.660156 10.9042C0.660156 4.8818 5.54204 -0.000333786 11.5651 -0.000333786C17.5868 -0.000333786 22.4687 4.8818 22.4687 10.9042C22.4687 16.9266 17.5868 21.8086 11.5651 21.8086C5.54204 21.8086 0.660156 16.9266 0.660156 10.9042Z" fill="#D9DCDE"/>\n <path d="M8.35225 8.87521C8.35225 9.6231 7.99147 10.2295 7.54755 10.2295C7.10491 10.2295 6.74414 9.6231 6.74414 8.87521C6.74414 8.12732 7.10491 7.52079 7.54755 7.52079C7.99147 7.52079 8.35225 8.12732 8.35225 8.87521Z" fill="#646A6F"/>\n <path d="M16.3861 8.87521C16.3861 9.6231 16.0266 10.2295 15.5827 10.2295C15.1388 10.2295 14.7793 9.6231 14.7793 8.87521C14.7793 8.12732 15.1388 7.52079 15.5827 7.52079C16.0266 7.52079 16.3861 8.12732 16.3861 8.87521Z" fill="#646A6F"/>\n <path d="M15.1602 13.3748C14.6602 17.5 8.16016 17.5 7.66016 13.3749" stroke="#646A6E" stroke-linecap="round"/>\n </svg>','<svg width="35" height="35" viewBox="0 0 23 22" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path d="M0.46875 10.9042C0.46875 4.8818 5.35063 -0.000333786 11.3737 -0.000333786C17.3954 -0.000333786 22.2773 4.8818 22.2773 10.9042C22.2773 16.9266 17.3954 21.8086 11.3737 21.8086C5.35063 21.8086 0.46875 16.9266 0.46875 10.9042Z" fill="#D9DCDE"/>\n <path d="M8.16084 8.87521C8.16084 9.6231 7.80007 10.2295 7.35614 10.2295C6.9135 10.2295 6.55273 9.6231 6.55273 8.87521C6.55273 8.12732 6.9135 7.52079 7.35614 7.52079C7.80007 7.52079 8.16084 8.12732 8.16084 8.87521Z" fill="#646A6F"/>\n <path d="M16.1947 8.87521C16.1947 9.6231 15.8352 10.2295 15.3913 10.2295C14.9474 10.2295 14.5879 9.6231 14.5879 8.87521C14.5879 8.12732 14.9474 7.52079 15.3913 7.52079C15.8352 7.52079 16.1947 8.12732 16.1947 8.87521Z" fill="#646A6F"/>\n <path d="M14.9688 13.3748C14.4688 17.5 7.96875 17.5 7.46875 13.3749L14.9688 13.3748Z" fill="#646A6E" stroke="#646A6E" stroke-linecap="round"/>\n </svg>','<svg width="35" height="35" viewBox="0 0 23 22" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path d="M0 10.9042C0 4.8818 4.88188 -0.000333786 10.9049 -0.000333786C16.9267 -0.000333786 21.8085 4.8818 21.8085 10.9042C21.8085 16.9266 16.9267 21.8086 10.9049 21.8086C4.88188 21.8086 0 16.9266 0 10.9042Z" fill="#D9DCDE"/>\n <path d="M14.5 13.3748C14 17.5 7.5 17.5 7 13.3749L14.5 13.3748Z" fill="#646A6E" stroke="#646A6E" stroke-linecap="round"/>\n <path d="M9.40207 8.10736L9.40294 8.09652C9.40294 7.41374 8.90848 6.78855 8.16593 6.78855C7.57606 6.78855 7.23428 7.21257 7.11718 7.60952C7.00094 7.21257 6.65828 6.78855 6.06841 6.78855C5.32586 6.78855 4.83227 7.41374 4.83227 8.09652V8.10736C4.8288 8.25596 4.83227 9.76759 7.1163 10.9997V11L7.11718 10.9998V11L7.11804 10.9998V11V10.9997C9.40294 9.76759 9.40641 8.25596 9.40207 8.10736Z" fill="#646A6E"/>\n <path d="M17.1013 8.10736V8.09652C17.1013 7.41374 16.6077 6.78855 15.8652 6.78855C15.2753 6.78855 14.9335 7.21257 14.8164 7.60952C14.7001 7.21257 14.3575 6.78855 13.7676 6.78855C13.0251 6.78855 12.5315 7.41374 12.5315 8.09652V8.10736C12.528 8.25596 12.5315 9.76759 14.8155 10.9997V11L14.8164 10.9998V11L14.8173 10.9998V11V10.9997C17.1022 9.76759 17.1056 8.25596 17.1013 8.10736Z" fill="#646A6E"/>\n </svg>'],STYLISED_EMOJI_GREY_5=['<svg width="35" height="35" viewBox="0 0 23 22" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M0 10.9042C0 4.8818 4.88188 -0.000334176 10.9049 -0.000334176C16.9267 -0.000334176 21.8085 4.8818 21.8085 10.9042C21.8085 16.9266 16.9267 21.8086 10.9049 21.8086C4.88188 21.8086 0 16.9266 0 10.9042Z" fill="#D9DCDE"/>\n<path d="M7.69209 8.87521C7.69209 9.6231 7.33132 10.2295 6.88739 10.2295C6.44475 10.2295 6.08398 9.6231 6.08398 8.87521C6.08398 8.12732 6.44475 7.52079 6.88739 7.52079C7.33132 7.52079 7.69209 8.12732 7.69209 8.87521Z" fill="#646A6F"/>\n<path d="M15.726 8.87521C15.726 9.6231 15.3665 10.2295 14.9226 10.2295C14.4786 10.2295 14.1191 9.6231 14.1191 8.87521C14.1191 8.12732 14.4786 7.52079 14.9226 7.52079C15.3665 7.52079 15.726 8.12732 15.726 8.87521Z" fill="#646A6F"/>\n<path d="M9.1519 6.99055L8.42013 7.72168L5.98047 5.28189L6.71224 4.55089L9.1519 6.99055" fill="#646A6F"/>\n<path d="M13.3887 7.72168L12.6582 6.99055L15.0979 4.55089L15.8284 5.28189L13.3887 7.72168" fill="#646A6F"/>\n<path d="M7 16.4997C8 12.4996 13 10.4996 15 16.4999" stroke="#646A6E" stroke-linecap="round"/>\n</svg>','<svg width="35" height="35" viewBox="0 0 23 22" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M0.808594 10.9042C0.808594 4.8818 5.69048 -0.000333786 11.7135 -0.000333786C17.7353 -0.000333786 22.6171 4.8818 22.6171 10.9042C22.6171 16.9266 17.7353 21.8086 11.7135 21.8086C5.69048 21.8086 0.808594 16.9266 0.808594 10.9042Z" fill="#D9DCDE"/>\n<path d="M8.50068 8.87521C8.50068 9.6231 8.13991 10.2295 7.69599 10.2295C7.25334 10.2295 6.89258 9.6231 6.89258 8.87521C6.89258 8.12732 7.25334 7.52079 7.69599 7.52079C8.13991 7.52079 8.50068 8.12732 8.50068 8.87521Z" fill="#646A6F"/>\n<path d="M16.5346 8.87521C16.5346 9.6231 16.1751 10.2295 15.7312 10.2295C15.2872 10.2295 14.9277 9.6231 14.9277 8.87521C14.9277 8.12732 15.2872 7.52079 15.7312 7.52079C16.1751 7.52079 16.5346 8.12732 16.5346 8.87521Z" fill="#646A6F"/>\n<path d="M7.80859 15.4995C9.14193 13.0401 13.3086 11.9996 15.8086 15.4996" stroke="#646A6E" stroke-linecap="round"/>\n</svg>','<svg width="35" height="35" viewBox="0 0 23 22" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M0.617188 10.9042C0.617188 4.8818 5.49907 -0.000333786 11.5221 -0.000333786C17.5439 -0.000333786 22.4257 4.8818 22.4257 10.9042C22.4257 16.9266 17.5439 21.8086 11.5221 21.8086C5.49907 21.8086 0.617188 16.9266 0.617188 10.9042Z" fill="#D9DCDE"/>\n<path d="M8.30928 8.87521C8.30928 9.6231 7.9485 10.2295 7.50458 10.2295C7.06194 10.2295 6.70117 9.6231 6.70117 8.87521C6.70117 8.12732 7.06194 7.52079 7.50458 7.52079C7.9485 7.52079 8.30928 8.12732 8.30928 8.87521Z" fill="#646A6F"/>\n<path d="M16.3432 8.87521C16.3432 9.6231 15.9837 10.2295 15.5398 10.2295C15.0958 10.2295 14.7363 9.6231 14.7363 8.87521C14.7363 8.12732 15.0958 7.52079 15.5398 7.52079C15.9837 7.52079 16.3432 8.12732 16.3432 8.87521Z" fill="#646A6F"/>\n<path d="M8.11719 15.5003C10.1172 15.5 12.1172 15.4998 15.1172 15.5001" stroke="#646A6E" stroke-linecap="round"/>\n</svg>','<svg width="35" height="35" viewBox="0 0 23 22" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M0.425781 10.9042C0.425781 4.8818 5.30767 -0.000333786 11.3307 -0.000333786C17.3524 -0.000333786 22.2343 4.8818 22.2343 10.9042C22.2343 16.9266 17.3524 21.8086 11.3307 21.8086C5.30767 21.8086 0.425781 16.9266 0.425781 10.9042Z" fill="#D9DCDE"/>\n<path d="M8.11787 8.87521C8.11787 9.6231 7.7571 10.2295 7.31318 10.2295C6.87053 10.2295 6.50977 9.6231 6.50977 8.87521C6.50977 8.12732 6.87053 7.52079 7.31318 7.52079C7.7571 7.52079 8.11787 8.12732 8.11787 8.87521Z" fill="#646A6F"/>\n<path d="M16.1518 8.87521C16.1518 9.6231 15.7923 10.2295 15.3483 10.2295C14.9044 10.2295 14.5449 9.6231 14.5449 8.87521C14.5449 8.12732 14.9044 7.52079 15.3483 7.52079C15.7923 7.52079 16.1518 8.12732 16.1518 8.87521Z" fill="#646A6F"/>\n<path d="M14.9258 13.3748C14.4258 17.5 7.92578 17.5 7.42578 13.3749L14.9258 13.3748Z" fill="#646A6E" stroke="#646A6E" stroke-linecap="round"/>\n</svg>','<svg width="35" height="35" viewBox="0 0 23 22" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M0.234375 10.9042C0.234375 4.8818 5.11626 -0.000333786 11.1393 -0.000333786C17.161 -0.000333786 22.0429 4.8818 22.0429 10.9042C22.0429 16.9266 17.161 21.8086 11.1393 21.8086C5.11626 21.8086 0.234375 16.9266 0.234375 10.9042Z" fill="#D9DCDE"/>\n<path d="M14.7344 13.3748C14.2344 17.5 7.73438 17.5 7.23438 13.3749L14.7344 13.3748Z" fill="#646A6E" stroke="#646A6E" stroke-linecap="round"/>\n<path d="M9.63644 8.10736L9.63732 8.09652C9.63732 7.41374 9.14286 6.78855 8.40031 6.78855C7.81043 6.78855 7.46866 7.21257 7.35155 7.60952C7.23531 7.21257 6.89266 6.78855 6.30278 6.78855C5.56023 6.78855 5.06665 7.41374 5.06665 8.09652V8.10736C5.06318 8.25596 5.06665 9.76759 7.35068 10.9997V11L7.35155 10.9998V11L7.35241 10.9998V11V10.9997C9.63731 9.76759 9.64078 8.25596 9.63644 8.10736Z" fill="#646A6E"/>\n<path d="M17.3357 8.10736V8.09652C17.3357 7.41374 16.8421 6.78855 16.0995 6.78855C15.5097 6.78855 15.1679 7.21257 15.0508 7.60952C14.9345 7.21257 14.5919 6.78855 14.002 6.78855C13.2595 6.78855 12.7659 7.41374 12.7659 8.09652V8.10736C12.7624 8.25596 12.7659 9.76759 15.0499 10.9997V11L15.0508 10.9998V11L15.0516 10.9998V11V10.9997C17.3365 9.76759 17.34 8.25596 17.3357 8.10736Z" fill="#646A6E"/>\n</svg>'];function hexToRgb(e){e=e.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i,(function(e,t,n,i){return t+t+n+n+i+i}));var t=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);return t?{r:parseInt(t[1],16),g:parseInt(t[2],16),b:parseInt(t[3],16)}:null}var createDialog=function(e,t,n,i,o){var a=i.dim_background,r=i.dim_bg_color,s=i.dim_bg_opacity,c=i.position,l=o.question_background_color,d=document.createElement("div");d.setAttribute("id",APX_OVERLAY);var p=document.createElement("style"),u="center",h="center";switch(c){case"bottom-left":u="flex-start",h="flex-end";break;case"bottom-right":u="flex-end",h="flex-end";break;case"top-left":u="flex-start",h="flex-start";break;case"top-right":u="flex-end",h="flex-start"}var g="none";if(a){var f=hexToRgb(r);g="rgb(".concat(f.r,", ").concat(f.g,", ").concat(f.b,", ").concat(s,")")}p.innerHTML="\n#apx-oly {\n width:100%;height:100%;position:fixed;top:0;left:0;background-color:".concat(g,";\n display:flex;justify-content:").concat(u,";align-items:").concat(h,";border-radius:3px;z-index:99999999\n}\n#apx-oly > * {font-family: inherit;box-sizing:unset}\n.apx-dlg-c {\n width:").concat(e,"px;max-height:").concat(window.innerHeight,"px;overflow: auto;min-height:").concat(t,"%;background:").concat(l,";z-index:99999999;opacity:0;position:relative;visibility:hidden;\n transition:all 500ms cubic-bezier(0, -0.37, 0, 2.06);top:-15px;border-radius:3px;margin:20px\n}\n.apx-dlg-c.open {opacity:1;visibility:visible;top:0}\n ").replaceAll("\n","").replace(/[\s]{2,999}/g,"");var m=document.createElement("div");return m.setAttribute("id",APX_DIALOG_CONTENT),m.classList.add(APX_DIALOG_CONTENT),d.appendChild(m),d.appendChild(p),d[SURVEY_ON_DISMISS]=n,document.body.appendChild(d),d},getImage=function(e,t,n){return e&&""!==e&&0!==t&&0!==n?'<img id="apx_icon" src="'.concat(e,'" style="width:').concat(t,"px;height:").concat(n,'px;">'):""},generateRequestSurvey=function(e){var t=e.icon_name,n=void 0===t?"":t,i=e.title,o=void 0===i?"Some dummy title":i,a=e.yes_text,r=void 0===a?"Yes":a,s=e.icon_width,c=void 0===s?180:s,l=e.icon_height,d=void 0===l?100:l,p=e.no_text,u=void 0===p?"No, thanks":p,h=e.dialog_background_color,g=void 0===h?"#FFF":h,f=e.title_color,m=void 0===f?"#3C3C3C":f,_=e.yes_button_bg_color,v=void 0===_?"#017DFD":_,b=e.yes_button_text_color,y=void 0===b?"#FFF":b,x=e.no_button_text_color,w=void 0===x?"#017DFD":x,C=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:12,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:500;return"line-height:20px;letter-spacing:0.005em;font-size:".concat(e,"px;font-weight:").concat(t,";")};return'\n <div style="display:flex;flex-direction:column;height:100%;width:100%;background-color:'.concat(g,';align-items:center;padding-top:20px;border-radius:3px">\n ').concat(getImage(n,c,d),'<span style="').concat(C(16,600),"text-align:center;color:").concat(m,';margin:12px 0px;">').concat(o,'</span>\n <button id="').concat(APX_DIALOG_YES,'" style="').concat(C(14,500),"color:").concat(y,";background-color:").concat(v,';border-radius:2px;border:none;padding:8px 20px;margin-bottom:10px;cursor:pointer">').concat(r,'</button>\n <button id="').concat(APX_DIALOG_NO,'" style="').concat(C(14,500),"color:").concat(w,';background:none;border:none;cursor:pointer;margin-bottom:20px">').concat(u,"</button>\n </div>\n ")},getTextAreaCSS=function(e){return"\n .apx-ta:focus {\n border: none;\n outline: none;\n }\n .apx-ta::placeholder {\n color: ".concat(e,";\n opacity: 0.5;\n }\n ")},getSurveyOptionCSS=function(e,t,n,i,o,a){return"\n .apx-lc {\n display: flex;\n align-items:center;\n position: relative;\n background: ".concat("outline"===a?"unset":"filled"===a?n:"unset",";\n border: ").concat("outline"===a?"1px solid "+n:"filled"===a?n:"unset",";\n padding: ").concat("none"!==a?"10px 10px 10px 35px":"0px 0px 0px 35px",";\n margin-bottom: 12px;\n font-family: inherit;\n top: 10px;\n cursor: pointer;\n font-size: 18px;\n color: ").concat(o,";\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n }\n\n .apx-lc input {\n position: absolute;\n opacity: 0;\n cursor: pointer;\n width: 0;\n height: 0;\n }\n\n .apx-i {\n position: absolute;\n display:flex;\n align-items:center;\n justify-content:center;\n left: 6px;\n height: 14px;\n width: 14px;\n border: 1px solid ").concat(o,";\n background-color: white;\n border-radius: ").concat(e===ANSWER_TYPES.SINGLE_CHOICE?"50%":0,";\n }\n\n .apx-lc:hover input ~ .apx-i {\n border: 1px solid ").concat(i,";\n }\n\n .apx-lc input:checked ~ .apx-i {\n background-color: ").concat(t,";\n border: 1px solid ").concat(i,';\n }\n\n .apx-i:after {\n content: "";\n position: absolute;\n display: none;\n }\n\n .apx-lc input:checked ~ .apx-i:after {\n display: block;\n }\n\n .apx-lc .apx-i:after {\n top: ').concat(e===ANSWER_TYPES.SINGLE_CHOICE?2:1,"px;\n left: ").concat(e===ANSWER_TYPES.SINGLE_CHOICE?2:4,"px;\n width: ").concat(e===ANSWER_TYPES.SINGLE_CHOICE?10:4,"px;\n height: ").concat(e===ANSWER_TYPES.SINGLE_CHOICE?10:8,"px;\n border-radius: ").concat(e===ANSWER_TYPES.SINGLE_CHOICE?"50%":"0",";\n background: ").concat(e===ANSWER_TYPES.SINGLE_CHOICE?i:"transparent",";\n border: ").concat(e===ANSWER_TYPES.SINGLE_CHOICE?"none":"solid white",";\n border-width: ").concat(e===ANSWER_TYPES.SINGLE_CHOICE?"unset":"0 3px 3px 0",";\n -webkit-transform: ").concat(e===ANSWER_TYPES.SINGLE_CHOICE?"unset":"rotate(45deg)",";\n -ms-transform: ").concat(e===ANSWER_TYPES.SINGLE_CHOICE?"unset":"rotate(45deg)",";\n transform: ").concat(e===ANSWER_TYPES.SINGLE_CHOICE?"unset":"rotate(45deg)",";\n }\n ")},createSurveyHeaderNode=function(e,t,n,i){var o=e.cancel_button_color,a=e.previous_button_color,r=document.createElement("button"),s=document.createElement("button");r.disabled=0===t,r.setAttribute("type","button"),r.className="apx-b apx-pr",r.innerHTML="<style>.apx-pr::before{content:'\\2190';font-size:22px;color:".concat(a).concat(0===t?"54":"",";}.apx-pr{cursor:").concat(0===t?"no-drop":"pointer",";visibility:").concat(0===t?"hidden":"visible",";margin-top:-6px}</style>"),s.className="apx-b apx-cb",s.setAttribute("type","button"),s.innerHTML="<style>.apx-cb::before{content:'\\0000d7';font-size:26px;color:".concat(o,";}</style>");var c=document.createElement("div");c.style="display:flex;justify-content:space-between;align-items:center;padding:8px;padding-bottom:0";var l=document.createElement("span");return l.style="font-size:14px;color:#000;opacity:0.3;letter-spacing:0.005em;line-height:12px",l.innerText=i?"":"".concat(t+1,"/").concat(n),c.appendChild(r),c.appendChild(l),c.appendChild(s),{prevButton:r,closeButton:s,headerNode:c}},changeSubmitButtonBgColor=function(e,t){var n=e.answerMode,i=e.choices,o=void 0===i?[]:i,a=e.text_answer,r=void 0===a?"":a,s=e.selected_rating,c=void 0===s?-1:s,l=!0;n===ANSWER_TYPES.MULTI_CHOICE||n===ANSWER_TYPES.SINGLE_CHOICE?l=-1!==o.findIndex((function(e){return!0===e.is_selected})):n===ANSWER_TYPES.SHORT_ANSWER?l=r.length>0:n===ANSWER_TYPES.RATING&&(l=c>0);l?(t.className="apx-ba",t.disabled=!1):(t.className="apx-bi",t.disabled=!0)},createSurveyFooterNode=function(e,t,n,i,o){var a=e.skip_text_color,r=e.submit_text_color,s=e.submit_active_color,c=e.submit_inactive_color,l=n===i-1||o?null:document.createElement("button");l&&(l.innerText="Skip",l.className="apx-b",l.style="font-size:14px;font-weight:600;opacity:1;font-style:inherit;color:".concat(a,";background-color:transparent;margin:0px 12px"));var d=document.createElement("button");d.innerHTML="".concat(n===i-1&&"Next >"===t.submit_text?"Submit":t.submit_text,"<style>.apx-ba{background-color:").concat(s,";cursor:pointer}.apx-bi{background-color:").concat(c,";cursor:no-drop}</style>"),d.style="border:none;border-radius:2px;color:".concat(r,";padding:8px 15px;font-family:inherit"),changeSubmitButtonBgColor(t,d);var p=document.createElement("div");return p.style="padding:14px;display:flex;justify-content:flex-end",l&&p.appendChild(l),p.appendChild(d),{footerNode:p,skipButton:l,submitButton:d}},getTextAreaNode=function(e){var t,n=e.maximum_characters,i=e.background_color,o=e.placeholder,a=e.text_color,r=document.createElement("textarea"),s=null!==(t=null==e?void 0:e.textinput_border_color)&&void 0!==t?t:"black";return r.style="padding-top:4px;padding-left:4px;font-zie:14px;width:98%;height:100px;margin-top:8px;border: 1px solid ".concat(s,";resize:none;background:").concat(i,";color:").concat(a),r.className="apx-ta",r.setAttribute("placeholder",o),r.setAttribute("maxlength",n),r},createQuestionNode=function(e,t,n){var i=t.question_text_color,o=t.question_background_color,a=t.option_bg_color_active,r=t.option_bg_color_inactive,s=t.option_text_color_active,c=t.option_text_color_inactive,l=t.option_bg_type,d=e.rating_style,p=e.answerMode,u=e.choices,h=void 0===u?[]:u,g=e.rating,f=void 0===g?{rating_style:d,bg_color:"#D9DCDE",selected_bg_color:"#109B15"}:g,m=e.rating_scale,_=void 0===m?5:m,v=e.selected_rating,b=void 0===v?-1:v,y=e.text_answer,x=void 0===y?"":y,w=e.text_config?e.text_config:{maximum_characters:150,background_color:"#ccc",placeholder:"",text_color:"#000",placeholder_text_color:"#00000087"},C=!1,E=[];if(p===ANSWER_TYPES.SINGLE_CHOICE||p===ANSWER_TYPES.MULTI_CHOICE){var k=getTextAreaNode(w);k.style.visibility="hidden";var S=function(e,t){e.style.color=t?s:c},T=function(e,t){var n=t?a:r;"filled"===l?e.style.background=n:"outline"===l&&(e.style.borderColor=n)};h.forEach((function(t,i){var o=document.createElement("label");o.className="apx-lc",o.innerText=t.value;var a=document.createElement("input");a.name=a.type=p===ANSWER_TYPES.SINGLE_CHOICE?"radio":"checkbox",a.checked=t.is_selected;var r=document.createElement("span");r.className="apx-i",o.appendChild(a),o.appendChild(r),T(o,t.is_selected),S(o,t.is_selected),t.is_other&&(C=!0,k.addEventListener("input",(function(e){t.other_answer=e.target.value}))),t.is_selected&&t.is_other&&(k.style.visibility="visible",t.other_answer&&(k.value=t.other_answer)),p===ANSWER_TYPES.MULTI_CHOICE?a.onchange=function(i){var a=i.target.checked;t.is_selected=a,S(o,a),T(o,a),t.is_other&&(k.style.visibility=a?"visible":"hidden"),changeSubmitButtonBgColor(e,n)}:(a.setAttribute("apx-key","radio"),a.setAttribute("apx-ci",i+""),a.onchange=function(){document.querySelectorAll('input[apx-key="radio"]').forEach((function(e,n){var i=e.checked;h[n].is_selected=i,S(e.parentNode,i),T(e.parentNode,i),t.is_other?k.style.visibility=i?"visible":"hidden":k.style.visibility="hidden"})),changeSubmitButtonBgColor(e,n)}),E.push(o)})),C&&E.push(k)}else if(p===ANSWER_TYPES.SHORT_ANSWER&&null!==w){var A=w.example,I=w.example_text_color;if(""!==A&&""!==A.trim()){var P=document.createElement("span");P.innerHTML="Example: "+A,P.style.color=I,P.style.marginTop="12px",P.style.fontFamily="inherit",P.style.fontSize="15px",E.push(P)}var O=getTextAreaNode(w);O.addEventListener("input",(function(t){e.text_answer=t.target.value,t.target.value&&t.target.value.length>0&&(e.is_answered=!0),changeSubmitButtonBgColor(e,n)})),""!==x&&""!==x.trim()&&(O.innerText=x),E.push(O)}else if(p===ANSWER_TYPES.RATING){var L=f.rating_style,N=f.bg_color,B=f.selected_bg_color,D=document.createElement("div"),M="",F=[],$="",R="cursor:pointer;font-size:30px;width:auto;height:auto;";if("stylized"===L)F=5===_?STYLISED_EMOJI_GREY_5:STYLISED_EMOJI_GREY_10,D.style="display:flex;flex-wrap:wrap;justify-content:".concat(5===_?"space-evenly":"center",";gap:5px;padding-top:8px;padding-bottom:8px;overflow:hidden"),M="opacity:1 !important;",$="".concat(R,"padding-right:7px;padding-top:4px;padding-bottom:2px;border-radius:50%;background:transparent;opacity:1;filter:drop-shadow(0px 0.586957px 1.76087px rgba(0, 0, 0, 0.11))");else if("classic"===L)F=5===_?EMOJI_ICONS_5:EMOJI_ICONS_10,D.style="display:flex;flex-wrap:wrap;justify-content:".concat(5===_?"space-evenly":"center",";gap:5px;padding-top:8px;padding-bottom:8px;overflow:hidden"),M="opacity:1 !important;border:1.06px solid #017DFD; background-color:rgba(1, 125, 253, 0.1);\n ",$="".concat(R,"padding-right:7px;padding-top:4px;padding-bottom:2px;opacity:1;filter:drop-shadow(0px 0.586957px 1.76087px rgba(0, 0, 0, 0.11))");else if("star"===L){D.style="display:flex;flex-wrap:wrap;justify-content:".concat(5===_?"space-evenly":"center",";gap:5px;padding-top:8px;padding-bottom:8px;overflow:hidden");for(var V=0;V<_;V++)F.push("&#11088;");M="filter:grayscale(0%) !important",$="".concat(R,"filter:grayscale(100%)")}else"numbers"===L&&(F=5==_?["1","2","3","4","5"]:["0","1","2","3","4","5","6","7","8","9","10"],M="background:".concat(B," !important;color:white !important;"),$="display:flex;justify-content:space-evenly;align-items:center;color:#646A6E;margin-bottom:".concat(5===_?"0px":"10px",";font-size:15px;width:40px;height:40px;background-color:").concat(N,";box-shadow:0px 0.54801px 1.64403px 0.54801px rgba(0, 0, 0, 0.11);border-radius:50%"),D.style.marginTop="12px",D.style="display:flex;align-text:center;flex-wrap:wrap;justify-content:".concat(5===_?"space-evenly":"center",";gap:15px;padding-top:8px;padding-bottom:8px;overflow:hidden"));var H=document.createElement("style"),q="";(5==_?RATING_COLORS_5:RATING_COLORS_10).forEach((function(e,t){q+=".apx-rsel-".concat(t,"{\n background:").concat(e,"!important;\n color:white !important;\n }")})),H.innerHTML=".apx-rsel{".concat(M,"}")+q+".apx-r{".concat($,"}\n"),D.appendChild(H);for(var U=function(e){return"star"!==L?e+1===b:e+1<=b},j=[],z=0;z<F.length;z++){var W=document.createElement("div");W.innerHTML="".concat("").concat(F[z]);var Y=document.createElement("div");"classic"===L?(11==F.length?"".concat(Y.innerHTML=z):"".concat(Y.innerHTML=z+1),Y.style.fontSize="12.83px",Y.style.display="flex",Y.style.fontWeight="500",Y.style.justifyContent="center",Y.style.alignItems="center",W.appendChild(Y),W.style.display="flex",W.style.justifyContent="space-evenly",W.style.alignItems="center",W.style.flexDirection="column",W.style.width="40px",W.style.height="70px"):"stylized"===L&&(11==F.length?"".concat(Y.innerHTML=z):"".concat(Y.innerHTML=z+1),Y.style.fontSize="12.83px",Y.style.display="flex",Y.style.justifyContent="center",Y.style.alignItems="center",W.appendChild(Y),W.style.display="flex",W.style.justifyContent="space-evenly",W.style.alignItems="center",W.style.marginBottom="15px",W.style.marginRight="5px",W.style.gap="4px",W.style.flexDirection="column"),U(z)&&W.classList.add("apx-rsel"),W.classList.add("apx-r"),j.push(W)}var X=function(e,t,n,i,o){n.forEach((function(n,a){var r=document.createElement("div");r.innerHTML=5===_?a+1:a,r.style.fontSize="12.83px",r.style.display="flex",r.style.justifyContent="center",r.style.alignItems="center",e.appendChild(r),n.innerHTML=a===t?i[t]:o[a],n.appendChild(r)}))};j.forEach((function(t,i){e.selected_rating=i+1,t.addEventListener("click",(function(){if("stylized"===L&&(5===F.length?X(t,i,j,STYLISED_EMOJI_5,STYLISED_EMOJI_GREY_5):X(t,i,j,STYLISED_EMOJI_10,STYLISED_EMOJI_GREY_10)),"numbers"===L?t.classList.add("apx-rsel-".concat(i)):t.classList.add("apx-rsel"),e.is_answered=!0,changeSubmitButtonBgColor(e,n),e.selected_rating=i+1,"numbers"===L){for(var o=0;o<i;o++)j[o].classList.remove("apx-rsel-".concat(o));for(var a=i+1;a<F.length;a++)j[a].classList.remove("apx-rsel-".concat(a))}else if("star"===L){for(var r=0;r<i+1;r++)j[r].classList.add("apx-rsel");for(var s=i+1;s<F.length;s++)j[s].classList.remove("apx-rsel")}else{for(var c=0;c<i;c++)j[c].classList.remove("apx-rsel");for(var l=i+1;l<F.length;l++)j[l].classList.remove("apx-rsel")}e.rulesArray.forEach((function(t){if(e.selected_rating>=t.min&&e.selected_rating<=t.max){var i,o=document.createElement("span");o.setAttribute("id","nps_advanced"),o.innerHTML=null===(i=t.question)||void 0===i?void 0:i.question;var a=getTextAreaNode(w);a.addEventListener("input",(function(t){e.text_answer=t.target.value,t.target.value&&t.target.value.length>0&&(e.is_answered=!0),changeSubmitButtonBgColor(e,n)})),o.appendChild(a),D.appendChild(o);var r=document.getElementById("nps_advanced");r&&D.removeChild(r),o.appendChild(a),D.appendChild(o)}}))})),D.appendChild(t)})),E.push(D)}var G=document.createElement("div");G.style.padding="14px",G.style.display="flex",G.style.flexDirection="column",G.style.minHeight="340px";var Q=document.createElement("style"),Z="";p===ANSWER_TYPES.SHORT_ANSWER?Z=getTextAreaCSS(w.placeholder_text_color):p!==ANSWER_TYPES.SINGLE_CHOICE&&p!==ANSWER_TYPES.MULTI_CHOICE||(Z=getSurveyOptionCSS(p,a,r,s,c,l),C&&(Z+=getTextAreaCSS(w.placeholder_text_color))),Q.innerHTML=Z.replaceAll("\n","").replace(/[\s]{2,999}/g,""),G.appendChild(Q);var K=document.createElement("span");return K.innerText=e.title,K.style="margin-bottom:12px;color:".concat(i,";background-color:").concat(o,";font-size:16px;font-weight:600"),G.appendChild(K),E.forEach((function(e){return G.appendChild(e)})),G},getSurveyDialogContent=function(e,t,n,i,o,a){var r=createSurveyHeaderNode(e,i,o,a),s=r.headerNode,c=r.prevButton,l=r.closeButton,d=createSurveyFooterNode(e,n,i,o,n.is_required),p=d.skipButton,u=d.submitButton,h=d.footerNode,g=createQuestionNode(n,t,u),f=document.createElement("div");f.className="apx-sq";var m=document.createElement("style");return m.innerHTML=".apx-sq > * {font-family:inherit;}.apx-sq {height:100%;width:100%;display:flex;flex-direction:column}.apx-b{border:none;background:none;opacity:1;cursor:pointer;font-family:inherit}",f.appendChild(m),f.appendChild(s),f.appendChild(g),{questionRoot:f,footerNode:h,prevButton:c,closeButton:l,skipButton:p,submitButton:u}},createSuccessMessage=function(e,t){var n=t.success_message_bg_color,i=t.success_message_icon_color,o=t.success_message_text_color,a=document.createElement("div");return a.style="display:flex;justify-content:center;align-items:center;flex-direction:column;width:100%;height:100%;background: ".concat(n,"; min-height:480px"),a.innerHTML="\n <div>\n ".concat(getCheckMarkSVG(64,64,i),'\n </div>\n <div style="font-size: 17px;margin-top:15px;color:').concat(o,'">').concat(e,"</div>\n "),a},Logger$7=window.ApxorLogger,Choice=_createClass$1((function e(t){var n=this;_classCallCheck$1(this,e),_defineProperty$1(this,"resetState",(function(){n.is_selected=!1,n.other_answer=null}));var i=t.id,o=t.value,a=t.is_other,r=t.next_question_id;if(!i||!o)throw new Error("Invalid Choice");this.id=i,this.value=o,this.is_other=a,this.next_question_id=r,this.is_selected=!1,this.other_answer=null})),Question=_createClass$1((function e(t){var n=this;_classCallCheck$1(this,e),_defineProperty$1(this,"resetState",(function(){n.is_answered=!1,n.text_answer="",n.selected_rating=-1,n.choices.forEach((function(e){return e.resetState()}))}));var i=t.id,o=t.answer_mode,a=t.title,r=t.is_required,s=t.submit_text,c=t.rating_style,l=t.rating_scale,d=t.choices,p=void 0===d?[]:d,u=t.text_config,h=void 0===u?null:u,g=t.randomize_choices,f=void 0!==g&&g,m=t.response_cfg,_=void 0===m?{}:m,v=t.advanced_options,b=t.rules,y=void 0===b?[]:b;if(!i||!o)throw new Error("Invalid question");var x=-1;switch(o){case"single_choice":x=ANSWER_TYPES.SINGLE_CHOICE;break;case"multi_choice":x=ANSWER_TYPES.MULTI_CHOICE;break;case"text":x=ANSWER_TYPES.SHORT_ANSWER;break;case"rating":x=ANSWER_TYPES.RATING;break;default:x=-1}if(this.answerMode=x,this.id=i,this.is_required=r,this.submit_text=s,this.randomize_choices=f,this.response_cfg=_,this.text_config=h,this.title=a,this.rating_style=c,this.rating_scale=l,this.is_answered=!1,this.selected_rating=-1,this.rules=y,this.rulesArray=[],v&&this.rules.forEach((function(e){if(t[e.qid]){var i={max:e.max,min:e.min,question:t[e.qid]};n.rulesArray.push(i)}})),this.choices=[],this.answerMode===ANSWER_TYPES.SINGLE_CHOICE||this.answerMode===ANSWER_TYPES.MULTI_CHOICE){for(var w,C=[],E=0;E<p.length;E++){var k=new Choice(p[E]);k.is_other?C.push(k):this.choices.push(k)}f&&(this.choices=getShuffledArr(this.choices)),(w=this.choices).push.apply(w,C)}})),SurveyConfigItem=_createClass$1((function e(){var t=this;_classCallCheck$1(this,e),_defineProperty$1(this,"initialize",(function(e,n,i){var o=i.delay,a=i.dialog_config,r=void 0===a?null:a,s=i.show_progress_bar,c=void 0===s||s,l=i.is_response_based_survey,d=void 0!==l&&l,p=i.questions,u=void 0===p?[]:p,h=i.show_success_message,g=void 0===h||h,f=i.auto_hide_message,m=void 0===f?2e3:f,_=i.success_message,v=void 0===_?"":_,b=i.question_text_color,y=void 0===b?"#002845":b,x=i.submit_active_color,w=void 0===x?"#017DFD":x,C=i.submit_inactive_color,E=void 0===C?"#017DFD65":C,k=i.option_bg_type,S=void 0===k?"filled":k,T=i.option_text_color_active,A=void 0===T?"#002845":T,I=i.option_text_color_inactive,P=void 0===I?"#002845":I,O=i.option_bg_color_active,L=void 0===O?"#FFF":O,N=i.option_bg_color_inactive,B=void 0===N?"#FFF":N,D=i.question_background_color,M=void 0===D?"#FFF":D,F=i.success_message_bg_color,$=void 0===F?"#109B15":F,R=i.success_message_icon_color,V=void 0===R?"#109B15":R,H=i.success_message_text_color,q=void 0===H?"#002845":H,U=i.skip_text_color,j=void 0===U?"#017DFD":U,z=i.cancel_button_color,W=void 0===z?"#000":z,Y=i.previous_button_color,X=void 0===Y?"#000":Y,G=i.progress_bar_color,Q=void 0===G?"#017DFD":G,Z=i.submit_text_color,K=void 0===Z?"#FFF":Z,J=i.width,ee=void 0===J?350:J,te=i.min_height,ne=void 0===te?40:te,ie=i.position,oe=void 0===ie?"center":ie,ae=i.dim_background,re=void 0===ae||ae,se=i.dim_bg_color,ce=void 0===se?"#313131":se,le=i.dim_bg_opacity,de=void 0===le?.54:le;t.configId=e,t.name=n,t.delay=o,t.is_response_based_survey=d,t.show_success_message=g,t.success_message=v,t.auto_hide_message=m,t.questions=[],t.displayedQuestionIndeces=[],t.answered_questions=[],t.width=ee,t.min_height=ne,t.layoutConfig={show_progress_bar:c,skip_text_color:j,cancel_button_color:W,previous_button_color:X,progress_bar_color:Q,submit_text_color:K,submit_active_color:w,submit_inactive_color:E,success_message_bg_color:$,success_message_icon_color:V,success_message_text_color:q,position:oe,dim_background:re,dim_bg_color:ce,dim_bg_opacity:de},t.questionConfig={question_text_color:y,question_background_color:M,option_bg_color_active:L,option_bg_color_inactive:B,option_text_color_active:A,option_text_color_inactive:P,option_bg_type:S},r&&(t.dialog_config=r);for(var pe=0;pe<u.length;pe++)try{if("request_survey"===u[pe].answer_mode||"success_message"===u[pe].answer_mode)continue;t.questions.push(new Question(u[pe])),t.answered_questions.push(-1)}catch(e){return Logger$7.error("Failed to parse Q",pe,e),!1}return!(t.questions.length<1)||(t.isValid=!1,!1)})),_defineProperty$1(this,"showSurvey",(function(e,n){t.isValid&&setTimeout((function(){try{var i=window.ApxorRTM;if(null!==i.currentAction&&void 0!==i.currentAction)return null==Apxor||Apxor.logEvent("apx_nudge_not_shown",{apx_nudge_type:"survey",apx_nudge_id:t.configId,apx_nudge_name:t.name,apx_variant_code:t.ceInstance.getVariantCode(t.configId),apx_failure_type:"error",apx_reason:"An action is already being shown"}),void Logger$7.error("An action is already being shown.");t.startTime=Date.now();var o=createDialog(t.width,t.min_height,n,t.layoutConfig,t.questionConfig);if(t.bodyOverflow=document.body.style.overflow,document.body.style.overflow="hidden",t._logSurveyAppEvent("apx_survey_launched",{apx_survey_type:!0,campaign_type:"survey"}),t.dialog_config){var a=t.dialog_config,r=a.icon_name,s=void 0===r?"":r,c=a.icon_width,l=a.icon_height,d=o.children[0];o.style.visibility="hidden",d.style.visibility="hidden",setTimeout((function(){var e;null!=t&&null!==(e=t.dialog_config)&&void 0!==e&&e.dialog_background_color&&(d.style.backgroundColor=t.dialog_config.dialog_background_color),d.innerHTML=generateRequestSurvey(t.dialog_config),document.getElementById(APX_DIALOG_YES).onclick=function(){t._logSurveyAppEvent("apx_survey_dialog_yes_clicked",{apx_survey_type:!0,campaign_type:"survey"}),d.style.minHeight=t.min_height+"%",t._showQuestions(o,!0)},document.getElementById(APX_DIALOG_NO).onclick=function(){t._logSurveyAppEvent("apx_survey_dialog_no_clicked",{apx_survey_type:!0,campaign_type:"survey"}),t._closeDialog(o)};var n=function(){o.style.visibility="visible",d.style.visibility="visible",d.style.minHeight=""===s||0===c||0===l?"13%":"25%",d.classList.toggle("open"),t._logSurveyAppEvent("apx_survey_dialog_launched",{apx_survey_type:t.is_response_based_survey?"response_based":"default",campaign_type:"survey"})};if(""!==s&&c>0&&l>0){var i=document.getElementById("apx_icon");i.onload=function(){n()},i.onerror=function(){t._logSurveyAppEvent("apx_survey_dialog_icon_failed"),t._closeDialog(o)}}else n()}),100)}else t._showQuestions(o);e&&e((function(){return t._closeDialog(o)}))}catch(e){Logger$7.error(e)}}),t.delay)})),_defineProperty$1(this,"_showQuestions",(function(e){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=t.layoutConfig,o=i.show_progress_bar,a=i.progress_bar_color,r=document.createElement("div");r.className="apx-progress-bar",r.style="height:4px;overflow:hidden;position:relative;background:white;";var s=document.createElement("div");s.setAttribute("id","apx-pb"),s.style="border-radius:10px;top:0;left:0;width:100%;bottom:0;position:absolute;transition:transform 0.4s linear;transform-origin:left;background-color:".concat(a),r.appendChild(s),o||(r.style.visibility="hidden");var c=e.children[0];(n||c&&c.childElementCount>1)&&c.removeChild(c.children[c.childElementCount-1]),c.appendChild(r),t._displayQuestion(e,0),n||setTimeout((function(){e.children[0].classList.toggle("open")}),100)})),_defineProperty$1(this,"_getQuestionIndexFromId",(function(e){if(-1==e||!e)return-1;var n=t.questions.length;if(n>0)for(var i=0;i<n;i++)if(t.questions[i].id==e)return i;return-1})),_defineProperty$1(this,"_getNextQuestionIndex",(function(e,n){var i=e.answerMode,o=e.choices,a=void 0===o?[]:o;switch(i){case ANSWER_TYPES.RATING:var r=null==e?void 0:e.response_cfg[(null==e?void 0:e.selected_rating)||11];r?n=t._getQuestionIndexFromId(r):n+=1;break;case ANSWER_TYPES.SINGLE_CHOICE:var s;if(a.forEach((function(e){e.is_selected&&(s=e)})),s){var c=s.next_question_id;n=t._getQuestionIndexFromId(c)}else n+=1;break;case ANSWER_TYPES.MULTI_CHOICE:case ANSWER_TYPES.SHORT_ANSWER:default:n+=1}return n})),_defineProperty$1(this,"_displayQuestion",(function(e,n){var i;if(!(n>=t.questions.length)){var o=t.questions[n],a=getSurveyDialogContent(t.layoutConfig,t.questionConfig,o,n,t.questions.length,t.is_response_based_survey),r=a.prevButton,s=void 0===r?null:r,c=a.closeButton,l=void 0===c?null:c,d=a.submitButton,p=void 0===d?null:d,u=a.skipButton,h=void 0===u?null:u,g=a.questionRoot,f=a.footerNode,m=e.children[0];m&&m.childElementCount>2&&(m.removeChild(m.children[m.childElementCount-1]),m.removeChild(m.children[m.childElementCount-1])),null!=t&&null!==(i=t.questionConfig)&&void 0!==i&&i.question_background_color&&(m.style.backgroundColor=t.questionConfig.question_background_color),document.getElementById("apx-pb").style.transform="translateX(".concat(-(100-100/t.questions.length*(n+1)),"%)"),m.appendChild(g),m.appendChild(f),s&&(s.onclick=function(){t._logSurveyAppEvent("apx_survey_back_button_clicked",{apx_question_id:"",apx_question_name:"",apx_question_type:"",apx_question_position:2,apx_survey_type:"",campaign_type:"survey"}),t._logSurveyQuestionEvent(n);var i=t.displayedQuestionIndeces.pop();void 0!==i&&t._displayQuestion(e,i)}),l&&l.addEventListener("click",(function(){t._logSurveyAppEvent("apx_survey_close_clicked",{where:"question "+(n+1)}),t._logSurveyAppEvent("apx_survey_close_button_clicked",{apx_survey_type:!0,apx_time_to_complete:200,where:"question "+(n+1),campaign_type:"survey"}),t._logSurveyQuestionEvent(n),t._submitSurveyResponses(e,!1)})),p&&(p.onclick=function(){if(t.displayedQuestionIndeces.push(n),t.is_response_based_survey){t._logSurveyQuestionEvent(n);var i=t._getNextQuestionIndex(o,n);i===t.questions.length||-1===i?t._submitSurveyResponses(e,!0):t._displayQuestion(e,i)}else t._logSurveyQuestionEvent(n),n===t.questions.length-1?t._submitSurveyResponses(e,!0):t._displayQuestion(e,n+1)}),h&&(h.onclick=function(){t.displayedQuestionIndeces.push(n),n+1>=t.questions.length||(t._logSurveyAppEvent("apx_survey_skip_clicked",{where:"question "+(n+1)}),t._logSurveyAppEvent("apx_survey_skip_button_clicked",{apx_question_id:"",apx_question_name:"",apx_question_type:"",apx_question_position:2,apx_survey_type:"",where:"question "+(n+1),campaign_type:"survey"}),t._logSurveyQuestionEvent(n),t._displayQuestion(e,n+1))}),t._logSurveyAppEvent("apx_survey_question_asked",{apx_question_id:"",apx_question_name:"",apx_question_type:"",apx_question_position:2,apx_survey_type:"",campaign_type:"survey"})}})),_defineProperty$1(this,"_attributeForApxSurveyQuestionAnswered",(function(e){var n,i,o,a,r,s={};3===t.questions[e].answerMode&&(s.apx_nps_advanced_question=null!==(n=null===(i=t.questions[e].rulesArray)||void 0===i||null===(i=i[0])||void 0===i?void 0:i.question.question)&&void 0!==n?n:"",s.apx_nps_advanced_choice=[],s.apx_nps_advanced_free_text=[],null!==(o=t.questions[e])&&void 0!==o&&o.text_answer&&s.apx_nps_advanced_free_text.push(t.questions[e].text_answer),s.apx_nps_advanced_question_id=null!==(a=null===(r=t.questions[e].rules)||void 0===r||null===(r=r[0])||void 0===r?void 0:r.qid)&&void 0!==a?a:"");return s})),_defineProperty$1(this,"_logSurveyQuestionEvent",(function(e){if(-1===t.answered_questions[e]){var n=t._getAnswerForQuestion(e),i=[];n.textBasedQuestionAnswers.length>0&&n.textBasedQuestionAnswers.forEach((function(e){i.push(e.answer)})),n.answers.length>0&&(t._logSurveyAppEvent("apx_survey_question_answered",_objectSpread2$1(_objectSpread2$1({apx_question_id:"",apx_question_name:"",apx_question_type:"",apx_question_position:2,apx_survey_type:"",apx_choice:n.answerTexts,apx_choice_position:2,apx_free_text:n.textBasedQuestionAnswers},t._attributeForApxSurveyQuestionAnswered(e)),{},{apx_time_spent_to_answer:20,campaign_type:"survey"})),t._logSurveyAppEvent("apx_survey_".concat(t.questions[e].title),{answers:n.answerTexts,text_answers:i,campaign_type:"survey"}),t.answered_questions[e]=1)}})),_defineProperty$1(this,"_logSurveyAppEvent",(function(e){var n,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=null===(n=window.ApxorRTM)||void 0===n?void 0:n.getCampaignMeta(t.configId),a=o._attr;Apxor.logEvent(e,_objectSpread2$1(_objectSpread2$1({apx_survey_id:t.configId,apx_survey_name:t.name},i),a))})),_defineProperty$1(this,"_getAnswerForQuestion",(function(e){var n=t.questions[e];if(!n)return null;var i={answers:[],answerTexts:[],others:[],textBasedQuestionAnswers:[]},o=n.answerMode,a=n.choices,r=void 0===a?[]:a,s=n.selected_rating,c=void 0===s?-1:s,l=n.text_answer,d=void 0===l?"":l,p=n.is_answered,u=void 0!==p&&p,h=n.text_config,g=void 0===h?null:h;switch(o){case ANSWER_TYPES.SINGLE_CHOICE:case ANSWER_TYPES.MULTI_CHOICE:r.forEach((function(e){e.is_selected&&(i.answers.push(e.id),i.answerTexts.push(e.value),e.is_other&&null!==e.other_answer&&""!==e.other_answer.trim()&&i.others.push({id:e.id,answer:e.other_answer}))}));break;case ANSWER_TYPES.SHORT_ANSWER:u&&""!==d&&""!==d.trim()&&null!==g&&(i.answers.push(g.id),i.answerTexts.push(d),i.textBasedQuestionAnswers.push({id:g.id,answer:d}));break;case ANSWER_TYPES.RATING:-1!==c&&(i.answers.push(c),i.answerTexts.push(c))}return i})),_defineProperty$1(this,"_closeDialog",(function(e){e[SURVEY_ON_DISMISS]&&e[SURVEY_ON_DISMISS](),e.children[0].classList.toggle("open"),setTimeout((function(){e.parentNode.removeChild(e),document.body.style.overflow=t.bodyOverflow,t.bodyOverflow=""}),400)})),_defineProperty$1(this,"_showSuccessMessage",(function(e){var n=e.children[0];for(n.style.minHeight="unset";null!=n&&n.childElementCount;)n.removeChild(n.children[n.childElementCount-1]);var i=createSuccessMessage(t.success_message,t.layoutConfig);n.appendChild(i),setTimeout((function(){t._closeDialog(e)}),t.auto_hide_message)})),_defineProperty$1(this,"_submitSurveyResponses",(function(e,n){n&&t.show_success_message?t._showSuccessMessage(e):t._closeDialog(e);var i={survey_id:t.configId,name:t.name,responses:[]};if(t.questions.forEach((function(e,n){var o=t._getAnswerForQuestion(n);if(o.answers.length>0){var a={question_id:e.id,answers:o.answers};e.rules.length>0&&e.rulesArray.forEach((function(t){if(e.selected_rating>=t.min&&e.selected_rating<=t.max){var n=t.question.text_config,i=e.text_answer;a.answers=[].concat(_toConsumableArray(a.answers),[n.id]);var o={id:n.id,answer:i};a.others||(a.others=[]),a.others.push(o)}})),o.others.length>0?a.others=o.others:o.textBasedQuestionAnswers.length>0&&(a.others=o.textBasedQuestionAnswers),i.responses.push(a)}})),i.responses.length>0){var o=Math.pow(10,3);i.time_taken=Math.round((Date.now()-t.startTime)/1e3*o)/o;var a=Apxor.getController(),r=a.getFromStorage("_apx_cd",!0).session_info.launch_time;i.session_id=Apxor.getSessionId(),i.is_completed=n,i.app_version=a.getFromStorage("apx_ver",!1),i.device_uuid=Apxor.getClientId(),i.launch_time=r,i.user_attributes=a.getUserAttributes(),i.session_attributes=a.getSessionAttributes(),t._sendReponseToServer(i)}n&&t._logSurveyAppEvent("apx_survey_completed",{apx_survey_type:!0,apx_time_to_complete:200,campaign_type:"survey"}),t.questions.forEach((function(e,n){e.resetState(),t.answered_questions[n]=-1})),t.startTime=-1,t.bodyOverflow=""})),_defineProperty$1(this,"_sendReponseToServer",(function(e){var t=SURVEY_RESPONSE_URL.replace("<app_id>",Apxor.getSiteId());fetch(t,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})})),this.isValid=!0,this.dialog_config=null,this.ceInstance=ceWrapper.getInstance()})),ApxorSurveys=_createClass$1((function e(){_classCallCheck$1(this,e),_defineProperty$1(this,"parse",(function(e,t,n){var i=new SurveyConfigItem;return i.initialize(e,t,n)?i:null}))})),PIPButton=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};_classCallCheck$1(this,e),this.color=getColorOrDefault(t.color,"#FFFFFF"),this.fill_color=getColorOrDefault(t.fill_color,"#FFFFFF"),this.type=getStringOrDefault(t.type,"normal"),this.path=t.path,this.offset_top=getNumberOrDefault(t.offset_top,8),this.offset_right=getNumberOrDefault(t.offset_right,8),this.height=getNumberOrDefault(t.height,24),this.width=getNumberOrDefault(t.width,24),this.action=getStringOrDefault(t.action,"dismiss")}return _createClass$1(e,null,[{key:"isEnabled",value:function(e){return!(isUndefined$2(e)||isNull$1(e)||isEmptyObject(e))}}]),e}(),PIP=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};_classCallCheck$1(this,e),this.enable_toggles=t.enable_toggles}return _createClass$1(e,null,[{key:"isEnabled",value:function(e){return!(isUndefined$2(e)||isNull$1(e)||isEmptyObject(e))}}]),e}(),EmbeddedVideo=_createClass$1((function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};_classCallCheck$1(this,e),this.html=t.html})),Video=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};_classCallCheck$1(this,e),this.path=getStringOrDefault(t.path,""),this.width=getNumberOrDefault(t.width,360),this.height=getNumberOrDefault(t.height,360),this.enable_embed=t.enable_embed,this.embed=new EmbeddedVideo(t.embed),this.enable_border=t.enable_border,this.border=new Border(t.border),this.enable_audio=t.enable_audio,this.format=getStringOrDefault(t.format,"video/mp4")}return _createClass$1(e,null,[{key:"isEnabled",value:function(e){return!(isUndefined$2(e)||isNull$1(e)||isEmptyObject(e))}}]),e}(),Logger$6=window.ApxorLogger,VideoInApp=function(){function e(t,n,i,o,a,r){var s=this;_classCallCheck$1(this,e),_defineProperty$1(this,"showVideoInApp",(function(){s.createPlayer();try{if(s.mode==VIDEOS_MODES.PIP){var e=s.videoElement,t=s.hideCallback;e.onloadedmetadata=function(){var n=this;e.disablePictureInPicture=!1,e.requestPictureInPicture().then((function(){e.play()})).catch((function(e){Logger$6.error("Can't show PIP:".concat(e)),Apxor.logEvent("apx_video_inapp_failed",{campaignName:n.name,id:n.configId,failureReason:e,campaign_type:"modal"}),t()}))},e.onabort=function(){Logger$6.error("Can't show video: resource is not fully loaded"),Apxor.logEvent("apx_video_inapp_failed",{campaignName:this.name,id:this.configId,failureReason:"Can't show video, meta data not loaded",campaign_type:"modal"}),this.hideCallback()},e.onstalled=function(){Logger$6.error("Can't show video: data is unexpectedly not forthcoming"),Apxor.logEvent("apx_video_inapp_failed",{campaignName:this.name,id:this.configId,failureReason:"Can't show video, data is unexpectedly not forthcoming",campaign_type:"modal"}),this.hideCallback()}}else s.unhideVideoPlayer();s.showCallback()}catch(e){Logger$6.error("Can't show video:".concat(e)),Apxor.logEvent("apx_video_inapp_failed",{campaignName:s.name,id:s.configId,failureReason:e,campaign_type:"modal"}),s.hideCallback()}})),_defineProperty$1(this,"_getHeightWidthFromResolution",(function(){var e=getHeightWidthFromResolution(s.video),t=e.width,n=e.height;s.height=n,s.width=t})),_defineProperty$1(this,"_removeVideoPlayerStyles",(function(){var e=document.getElementById("apx-mpl-styles");e&&e.remove()})),_defineProperty$1(this,"_setVideoControlListeners",(function(){s.videoElement.addEventListener("ended",(function(){var e=document.getElementById("apx-cta-btn");e&&e.classList.remove("apx-video-hide-elmt".concat(s.cssPostFix)),document.fullscreenElement?(s.totalDurationMaximised+=Math.round(s.videoElement.duration)-Math.round(s.slotStartTime),s.durationMaximisedSlots.push("".concat(Math.round(s.slotStartTime),"-").concat(Math.round(s.videoElement.duration)))):(s.totalDurationMinimised+=Math.round(s.videoElement.duration)-Math.round(s.slotStartTime),s.durationMinimisedSlots.push("".concat(Math.round(s.slotStartTime),"-").concat(Math.round(s.videoElement.duration))))})),s.videoElement.addEventListener("play",(function(){s.inAppShown||(s.minimisedCount=0,s.maximisedCount=0,s.totalDurationMinimised=0,s.totalDurationMaximised=0,s.durationMinimisedSlots=[],s.durationMaximisedSlots=[],s.volumeClickedCount=0,s.slotStartTime=0,s.slotStartTimeVolumeChange=0,Apxor.logEvent("inapp_shown",{message_name:s.name,visibleScreen:location.pathname,inappType:"PIP Inapp",autoReplay:s.videoElement.loop?"On":"Off",defaultSound:s.videoElement.muted?"Mute":"Unmute",id:s.configId,videoDuration:Math.round(s.videoElement.duration),videoResolution:"".concat(s.videoElement.videoWidth,"x").concat(s.videoElement.videoHeight),videoConfiguration:"Streaming",campaign_type:"modal"}),s.inAppShown=!0),0!==s.videoElement.currentTime&&s.videoElement.currentTime!==s.videoElement.duration||(s.replayCount++,s.slotStartTime=0,s.slotStartTimeVolumeChange=0);var e=document.getElementById("apx-cta-btn");e&&e.classList.add("apx-video-hide-elmt".concat(s.cssPostFix))})),s.videoElement.addEventListener("fullscreenchange",(function(){s.slotEndTime=s.videoElement.currentTime,document.fullscreenElement?(s.maximisedCount++,s.durationMinimised=Math.round(s.slotEndTime)-Math.round(s.slotStartTime),s.videoElement.currentTime!==s.videoElement.duration&&(s.totalDurationMinimised+=s.durationMinimised,s.durationMinimisedSlots.push("".concat(Math.round(s.slotStartTime),"-").concat(Math.round(s.slotEndTime)))),Apxor.logEvent("apx_video_inapp_maximised",{message_name:s.name,durationMinimised:s.durationMinimised,durationSlotMinimised:"".concat(Math.round(s.slotStartTime),"-").concat(Math.round(s.slotEndTime)),id:s.configId,totalDurationWatched:Math.round(s.totalDurationMinimised),totalDurationWatchedSlot:s.durationMinimisedSlots,maximisedCount:s.maximisedCount,campaign_type:"modal"})):(s.durationMaximised=Math.round(s.slotEndTime)-Math.round(s.slotStartTime),s.minimisedCount++,s.videoElement.currentTime!==s.videoElement.duration&&(s.totalDurationMaximised+=s.durationMaximised,s.durationMaximisedSlots.push("".concat(Math.round(s.slotStartTime),"-").concat(Math.round(s.slotEndTime)))),Apxor.logEvent("apx_video_inapp_minimised",{message_name:s.name,durationMaximised:s.durationMaximised,durationSlotMaximised:"".concat(Math.round(s.slotStartTime),"-").concat(Math.round(s.slotEndTime)),id:s.configId,totalDurationWatched:Math.round(s.totalDurationMaximised),totalDurationWatchedSlot:s.durationMaximisedSlots,minimisedCount:s.minimisedCount,campaign_type:"modal"})),s.slotStartTime=s.videoElement.currentTime})),s.videoElement.addEventListener("volumechange",(function(){isNaN(s.slotStartTimeVolumeChange)||(s.volumeClickedCount++,Apxor.logEvent("apx_video_inapp_volume_button_clicked",{message_name:s.name,id:s.configId,actionPerformed:s.videoElement.muted?"mute":"unmute",totalDurationWatchedSlot:"".concat(Math.round(s.slotStartTimeVolumeChange),"-").concat(Math.round(s.videoElement.currentTime)),totalDurationWatched:Math.round(s.videoElement.currentTime)-Math.round(s.slotStartTimeVolumeChange),campaign_type:"modal"}),s.slotStartTimeVolumeChange=s.videoElement.currentTime)}))})),_defineProperty$1(this,"_setPIPtoggleListeners",(function(){var e;if("PIP"!==s.mode||null!==(e=s.terminationConfig)&&void 0!==e&&e.auto_dismiss){if("mini"===s.mode&&(s.enable_pip_button||isIOSDevice())){if(s.videoElement.addEventListener("enterpictureinpicture",(function(){s.videoPlayer.classList.add("apx-video-hide-elmt".concat(s.cssPostFix))}),!1),s.pip.enable_toggles){s.videoElement.addEventListener("leavepictureinpicture",(function(){s.videoElement.disablePictureInPicture=!0,s.videoPlayer.classList.remove("apx-video-hide-elmt".concat(s.cssPostFix))}),!1)}else s.videoElement.addEventListener("leavepictureinpicture",(function(){s._onClose("web_pip_x_icon_clicked")}),!1)}}else s.videoElement.addEventListener("leavepictureinpicture",(function(){s._onClose("web_pip_x_icon_clicked")}),!1)})),_defineProperty$1(this,"_setCustomControls",(function(){if(s.enable_close_button,s.enable_close_button&&!isIOSDevice()){var e=document.createElement("span");s.close_button.type===CLOSE_BUTTON_STYLE.NORMAL?e.innerHTML=getCloseSVG(s.close_button.width,s.close_button.height,s.close_button.color):s.close_button.type===CLOSE_BUTTON_STYLE.FILL?"circle"===s.close_button.shape?e.innerHTML=getCloseWithCircleSVG(s.close_button.width,s.close_button.height,s.close_button.fill_color,s.close_button.color):e.innerHTML=getCloseWithRectangleSVG(s.close_button.width,s.close_button.height,s.close_button.fill_color,s.close_button.color):e.innerHTML='<img src="'.concat(s.close_button.path,'" width="').concat(s.close_button.width,'px" height="').concat(s.close_button.height,'px"></img>'),e.classList.add("apx-video-close-btn".concat(s.cssPostFix)),e.addEventListener("click",(function(){s._onClose()})),s.videoPlayer.appendChild(e)}if(s.enable_pip_button&&!isIOSDevice()){var t=document.createElement("span");t.innerHTML=getPIPSVG(s.pip_button.width,s.pip_button.height,s.pip_button.color),s.pip_button.path&&(t.innerHTML='<img src="'.concat(s.pip_button.path,'" width="').concat(s.pip_button.width,'px" height="').concat(s.pip_button.height,'px"></img>')),t.classList.add("apx-video-pip-btn".concat(s.cssPostFix)),t.addEventListener("click",(function(){try{s.videoElement.disablePictureInPicture=!1,s.videoElement.requestPictureInPicture()}catch(e){console.log("Error \n ".concat(e," \n while starting the PIP"))}})),s.videoPlayer.appendChild(t)}})),_defineProperty$1(this,"hideVideoPlayer",(function(){s.videoPlayer.classList.add("apx-video-hide-elmt".concat(s.cssPostFix))})),_defineProperty$1(this,"unhideVideoPlayer",(function(){s.videoPlayer.classList.remove("apx-video-hide-elmt".concat(s.cssPostFix))})),_defineProperty$1(this,"getVideoElement",(function(){return s.videoElement})),this.videoPlayer=null,this.videoElement=null,this.showCallback=a,this.terminationConfig=n,this.hideCallback=r,this.height=320,this.width=320,this.configId=i,this.name=o||"VideoPlayer",this.cssPostFix="-".concat(this.configId,"-").concat(this.name).replaceAll(" ","").replace(/[^\w\s]/gi,""),this.replayCount=0,this.inAppShown=!1,this.videoConfig=t,this.bg_color=t.bg_color,this.mode=getStringOrDefault(t.mode,"PIP"),this.position=new Position(t.position),this.enable_buttons=t.enable_buttons,this.enable_buttons&&(this.buttons=new Buttons(t.buttons)),this.direction=new Direction(t.direction),this.enable_close_button=t.enable_close_button,this.enable_close_button&&(this.close_button=new CloseButton(t.close_button)),this.enable_pip_button=t.enable_pip_button,this.enable_pip_button&&(this.pip_button=new PIPButton(t.pip_button)),this.video=new Video(t.video),this.pip=new PIP(t.pip)}return _createClass$1(e,[{key:"createPlayer",value:function(){this.videoPlayer=document.createElement("div"),this.videoPlayer.setAttribute("id","apx-video-player"),this.videoPlayer.style.backgroundColor=this.bg_color,this._getHeightWidthFromResolution(),this._setVideoPlayerStyles(),this._setVideoPlayerPosition(),this._setPlayerContent(),this._setVideoControlListeners(),this._setPIPtoggleListeners(),this._setCustomControls(),this._setButtons(BUTTON_CONTAINER_POSITION.CENTER),this.hideVideoPlayer(),this._setAutoTerminate(),document.body.appendChild(this.videoPlayer)}},{key:"_setVideoPlayerStyles",value:function(){if(!document.getElementById("apx-mpl-styles")){var e=document.createElement("style");e.setAttribute("id","apx-mpl-styles");var t=this.enable_pip_button?"\n width: ".concat(this.pip_button.width,"px;\n height: ").concat(this.pip_button.height,"px;\n "):"",n=this.enable_close_button?"\n top: ".concat(this.close_button.offset_top,"px;\n right: ").concat(this.close_button.offset_right,"px;\n "):"";e.innerHTML="\n #apx-video-player {\n width: ".concat(this.width,"px;\n height: ").concat(this.height,"px;\n }\n\n div.apx-video-player").concat(this.cssPostFix,"--topLeft {\n position: fixed;\n top: 0;\n left: 0;\n background-color: ").concat(COLORS.BLACK,";\n z-index:99999999;\n }\n \n div.apx-video-player").concat(this.cssPostFix,"--topRight {\n position: fixed;\n top: 0;\n right: 0;\n background-color: ").concat(COLORS.BLACK,";\n z-index:99999999;\n }\n \n div.apx-video-player").concat(this.cssPostFix,"--bottomLeft {\n position: fixed;\n bottom: 0;\n left: 0;\n background-color: ").concat(COLORS.BLACK,";\n z-index:99999999;\n }\n \n div.apx-video-player").concat(this.cssPostFix,"--bottomRight {\n position: fixed;\n bottom: 0;\n right: 0;\n background-color: ").concat(COLORS.BLACK,";\n z-index:99999999;\n }\n\n div.apx-video-player").concat(this.cssPostFix,"--center {\n position: fixed;\n left: 50%;\n top: 50%;\n background-color: ").concat(COLORS.BLACK,";\n transform: translate(-50%, -50%);\n z-index:99999999;\n }\n .apx-video-hide-elmt").concat(this.cssPostFix," {\n display : none;\n }\n\n #apx-cta-btn.apx-video-hide-elmt").concat(this.cssPostFix," {\n display : none;\n }\n\n .apx-video-pip-btn").concat(this.cssPostFix," {\n position: absolute;\n top: 10px;\n left: 10px;\n opacity: 0.3;\n transition: opacity .3s ease;\n cursor: pointer;\n ").concat(t,"\n }\n\n video:hover~.apx-video-pip-btn").concat(this.cssPostFix," {\n opacity: 1;\n }\n \n .apx-video-close-btn").concat(this.cssPostFix," {\n position: absolute;\n opacity: 0.3;\n transition: opacity .3s ease;\n cursor: pointer;\n ").concat(n,"\n }\n\n video:hover~.apx-video-close-btn").concat(this.cssPostFix," {\n opacity: 1;\n }\n\n .apx-video-cta").concat(this.cssPostFix,' {\n position: absolute;\n top: 50%;\n left: 50%;\n -webkit-transform: translate(-50%, -50%);\n -moz-transform: translate(-50%, -50%);\n width: auto;\n height: auto;\n transition: opacity .3s ease;\n cursor: pointer;\n }\n \n .bi::before,\n [class^="bi-"]::before,\n [class*=" bi-"]::before {\n display: inline-block;\n font-style: normal;\n font-weight: normal !important;\n font-variant: normal;\n text-transform: none;\n line-height: 1;\n vertical-align: -.125em;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n }\n \n .bi-pip::before { \n content: "\f4ef"; \n }\n\n .bi-x-circle::before { \n content: "\f623"; \n }\n\n '),document.head.appendChild(e)}}},{key:"_setVideoPlayerPosition",value:function(){switch(this.position.position){case INAPP_POSITION.TOP_LEFT:this.videoPlayer.classList.add("apx-video-player".concat(this.cssPostFix,"--topLeft"));break;case INAPP_POSITION.TOP_RIGHT:this.videoPlayer.classList.add("apx-video-player".concat(this.cssPostFix,"--topRight"));break;case INAPP_POSITION.BOTTOM_LEFT:this.videoPlayer.classList.add("apx-video-player".concat(this.cssPostFix,"--bottomLeft"));break;case INAPP_POSITION.BOTTOM_RIGHT:this.videoPlayer.classList.add("apx-video-player".concat(this.cssPostFix,"--bottomRight"));break;case INAPP_POSITION.CENTER:this.videoPlayer.classList.add("apx-video-player".concat(this.cssPostFix,"--center"));break;default:this.videoPlayer.classList.add("apx-video-player".concat(this.cssPostFix,"--bottomRight"))}}},{key:"_setPlayerContent",value:function(){this.videoElement=document.createElement("video"),this.videoElement.width=this.width,this.videoElement.height=this.height,this.videoElement.style.objectFit="fill",this.videoElement.controlsList="nodownload",this.videoElement.controls=!0,isIOSDevice()&&(this.videoElement.playsInline=!0,this.videoElement.muted=!0),this.videoElement.disablePictureInPicture=!0,this.videoElement.autoplay=!0,this.video.enable_audio||(this.videoElement.muted=!0);var e=document.createElement("source");e.setAttribute("src",this.video.path),e.setAttribute("type",this.video.format),this.videoElement.appendChild(e),this.videoPlayer.appendChild(this.videoElement)}},{key:"_onClose",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"web_minimise_x_clicked";try{this.inAppShown&&(document.fullscreenElement?(this.totalDurationMaximised+=Math.round(this.videoElement.currentTime)-Math.round(this.slotStartTime),this.durationMaximisedSlots.push("".concat(Math.round(this.videoElement.currentTime),"-").concat(Math.round(this.slotStartTime)))):(this.totalDurationMinimised+=Math.round(this.videoElement.currentTime)-Math.round(this.slotStartTime),this.durationMinimisedSlots.push("".concat(Math.round(this.videoElement.currentTime),"-").concat(Math.round(this.slotStartTime))))),this.videoPlayer.remove(),this._removeVideoPlayerStyles(),"auto_dismiss"!==e&&Apxor.logEvent("apx_video_inapp_close_button_clicked",{message_name:this.name,id:this.configId,totalDurationWatchedSlot:"0-".concat(Math.round(this.videoElement.currentTime)),totalDurationWatched:Math.round(this.videoElement.currentTime),closeButtonName:e,campaign_type:"modal"}),Apxor.logEvent("apx_inapp_dismissed",{campaignName:this.name,id:this.configId,totalDurationWatched:Math.round(this.videoElement.currentTime),totalDurationWatchedSlot:"0-".concat(Math.round(this.videoElement.currentTime)),totalReplayCount:this.replayCount,totalMinimiseCount:this.minimisedCount,totalMaximiseCount:this.maximisedCount,totalDurationMinimised:Math.round(this.totalDurationMinimised),totalDurationMaximised:Math.round(this.totalDurationMaximised),dismissType:e,volumeClickedCount:this.volumeClickedCount,inappType:"PIP Inapp",apx_completed:this.videoElement.currentTime===this.videoElement.duration,apx_completion_percentage:this.videoElement.currentTime/this.videoElement.duration}),this.hideCallback("cancel")}catch(e){console.log("Error \n ".concat(e," \n occured while closing the video"))}}},{key:"_setButtons",value:function(e){var t=this;if(this.enable_buttons&&(this.buttons.enable_top||this.buttons.enable_center||this.buttons.enable_bottom)){var n=function(e,n,i){try{var o;t.buttons.enable_top&&t.buttons.top.length>0&&(o=t.buttons.top),t.buttons.enable_center&&t.buttons.center.length&&(o=t.buttons.center),t.buttons.enable_bottom&&t.buttons.bottom.length&&(o=t.buttons.bottom),Apxor.logEvent("apx_video_inapp_button_clicked",{buttonName:o.at(i).text.text,redirection:o.at(i).action.type,totalDurationWatched:Math.round(t.videoElement.currentTime),message_name:t.name,id:t.configId,totalDurationWatchedSlot:"0-".concat(Math.round(t.videoElement.currentTime)),replayCount:t.replayCount,campaign_type:"modal"}),t.videoPlayer.remove(),t._removeVideoPlayerStyles(),t.hideCallback()}catch(e){console.log("Can't close the video player\n".concat(e))}},i={next:n,prev:n,complete:n,cancel:n,_isCancelled:!1,action:""},o={};o=this.buttons.top.length>0?this.buttons.top:this.buttons.center.length>0?this.buttons.center:this.buttons.bottom;var a=generateButtonsBlock(this.configId,this.name,this.stepper,EVENT_PREFIX.INAPP,o,this.direction.buttons,"",e,i,this.isWalkthrough,this.uis,this.index,"modal");a.setAttribute("id","apx-cta-btn"),a.classList.add("apx-video-cta".concat(this.cssPostFix)),a.classList.add("apx-video-hide-elmt".concat(this.cssPostFix)),this.videoPlayer.appendChild(a)}}},{key:"_setAutoTerminate",value:function(){var e,t=this;!0===(null===(e=this.terminationConfig)||void 0===e?void 0:e.auto_dismiss)&&window.setTimeout((function(){document.pictureInPictureEnabled&&document.pictureInPictureElement&&(t.videoElement.pause(),document.exitPictureInPicture()),t._onClose("auto_dismiss")}),this.terminationConfig.duration)}}],[{key:"isAVideoBeingPlayed",value:function(){return!!document.getElementById("apx-video-player")}},{key:"canShowVideoInApp",value:function(e){var t=e.binding,n=e.activity,i=!0;return t&&""!=n&&window.location.pathname!==n&&(i=!1),i}}]),e}(),Form=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};_classCallCheck$1(this,e),this.font=new Font(t.font),this.padding=new Padding(t.padding),this.elements=t.elements}return _createClass$1(e,null,[{key:"isEnabled",value:function(e){return!(isUndefined$2(e)||isNull$1(e)||isEmptyObject(e))}}]),e}(),Marketing=_createClass$1((function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};_classCallCheck$1(this,e),this.message=new Text(t.message)})),ModalInApp=function(){function ModalInApp(e,t,n,i,o,a,r,s){var c=this,l=arguments.length>8&&void 0!==arguments[8]?arguments[8]:{},d=arguments.length>9?arguments[9]:void 0;_classCallCheck$1(this,ModalInApp),_defineProperty$1(this,"closeListener",(function(){clearTimeout(c.terminationTimeoutId),c.closeCallback(c.overlayElement,"dismiss",".apx-inapp-container".concat(c.cssPostFix),c.closeListener,c.redirectionListener)})),_defineProperty$1(this,"redirectionListener",(function(){window.location.href!==c.launchPageUrl&&c.closeCallback(c.overlayElement,"dismiss",".apx-inapp-container".concat(c.cssPostFix),c.closeListener,c.redirectionListener)})),_defineProperty$1(this,"_getMarketingStyles",(function(){if(!c.enable_marketing)return"";var e=c.marketing.message,t=e.alignment;return"left"===e.alignment?t="flex-start":"right"===e.alignment&&(t="flex-end"),"\n .apx-inapp-marketing".concat(c.cssPostFix," {\n align-self:").concat(t,";\n text-align:").concat(e.alignment,";\n }\n ")})),_defineProperty$1(this,"generateResponse",(function(e){var t={},n="";return e.forEach((function(e){var i,o,a,r,s,c,l,d,p,u;switch(e.type){case"fullname":document.getElementById("fname")&&(t["".concat(null!==(i=null==e||null===(o=e.name)||void 0===o?void 0:o[0])&&void 0!==i?i:"firstname")]=document.getElementById("fname").value),document.getElementById("lname")&&(t["".concat(null!==(a=null==e||null===(r=e.name)||void 0===r?void 0:r[1])&&void 0!==a?a:"lastname")]=document.getElementById("lname").value);break;case"name":document.getElementById("name")&&(t["".concat(null!==(s=null==e?void 0:e.name)&&void 0!==s?s:"name")]=document.getElementById("name").value);break;case"email":document.getElementById("email")&&(t["".concat(null!==(c=null==e?void 0:e.name)&&void 0!==c?c:"email")]=document.getElementById("email").value);break;case"phone":document.getElementById("phoneNumber")&&(t["".concat(null!==(l=null==e?void 0:e.name)&&void 0!==l?l:"phonenumber")]=document.getElementById("phoneNumber").value);break;case"date":document.getElementById("date")&&(t["".concat(null!==(d=null==e?void 0:e.name)&&void 0!==d?d:"date")]=document.getElementById("date").value);break;case"message":document.getElementById("textField")&&(t["".concat(null!==(p=null==e?void 0:e.name)&&void 0!==p?p:"feedback")]=document.getElementById("textField").value);break;case"button":n=null!==(u=null==e?void 0:e.callback)&&void 0!==u?u:""}})),{obj:t,callback:n}})),_defineProperty$1(this,"_setMarketingMessage",(function(){if(c.enable_marketing){var e=document.createElement("div");e.classList.add("apx-inapp-marketing".concat(c.cssPostFix));var t=createNewTextElement(c.marketing.message,c.currentId,"marketing");e.appendChild(t),c.inAppContainer.appendChild(e)}})),this.rtmInstance=window.ApxorRTM,this.index=d,this.uis=l,this.terminationConfig=t,this.terminationTimeoutId=null,this.isWalkthrough=s,this.cssPostFix="-".concat(n,"-").concat(i).replaceAll(" ","").replace(/[^\w\s]/gi,""),this.delay=e.delay||0,this.background_color=e.bg_color||COLORS.WHITE,this.width=e.width||50,this.height=e.height||50,this.direction=new Direction(e.direction),this.position=new Position(e.position),this.enable_dismiss_actions=e.enable_dismiss_actions,this.enable_dismiss_actions&&(this.dismiss_actions=new DismissActions(e.dismiss_actions)),this.enable_dimbackground=e.enable_dimbackground,this.enable_dimbackground&&(this.dimbackground=new DimBackground(e.dimbackground)),this.enable_padding=e.enable_padding,this.enable_padding&&(this.padding=new Padding(e.padding)),this.enable_margin=e.enable_margin,this.enable_margin&&(this.margin=new Margin(e.margin)),this.enable_border=e.enable_border,this.enable_border&&(this.border=new Border(e.border)),this.enable_close_button=e.enable_close_button,this.enable_close_button&&(this.close_button=new CloseButton(e.close_button)),this.enable_scroll=e.enable_scroll,this.enable_scroll&&(this.scroll=new Scroll(e.scroll)),this.enable_icon=e.enable_icon,this.enable_icon&&(this.icon=new Icon(e.icon)),this.enable_image=e.enable_image,this.enable_image&&(this.image=new Image(e.image)),this.enable_video=e.enable_video,this.enable_video&&(this.video=new Video(e.video)),this.enable_title=e.enable_title,this.enable_title&&(this.title=new Title(e.title)),this.enable_description=e.enable_description,this.enable_description&&(this.description=new Description(e.description)),this.enable_form=e.enable_form,this.enable_form&&(this.form=new Form(e.form)),this.enable_buttons=e.enable_buttons,this.enable_buttons&&(this.buttons=new Buttons(e.buttons)),this.enable_stepper=e.enable_stepper,this.enable_stepper&&(this.stepper=new Stepper(e.stepper)),this.enable_shadow=e.enable_shadow,this.enable_shadow&&(this.shadow=new Shadow(e.shadow)),this.enable_gradient=e.enable_gradient,this.enable_gradient&&(this.gradient=new Gradient(e.gradient)),this.enable_marketing=e.enable_marketing,this.enable_marketing&&(this.marketing=new Marketing(e.marketing)),this.min_width="",this.max_width="",this.inapp_width="auto",this.inapp_height="auto",this.media_container_height=0,this.media_width="auto",this.media_height="auto",this.configId=n,this.name=i,this.showCallback=o,this.closeCallback=a,this.stepperCallBack=r,this.currentId=makeid(10),this.dimBackgroundElement=null,this.overlayElement=null,this.inAppContainer=null,this.launchPageUrl=""}return _createClass$1(ModalInApp,[{key:"createInAppModal",value:function(){if(!checkForNeverShow$1(this.configId))return!1;this._setInAppDimensions(),this._setBackgroundOverlays(),this._setStyles(),this._setInAppModalContent(),this._setAutoTerminate(),this._showInApp()}},{key:"_setInAppDimensions",value:function(){var e=this.direction.nudge===DIRECTION.VERTICAL?this.width/100:this.height/100,t=this.direction.nudge!==DIRECTION.VERTICAL;this.enable_image?this._setDimenstionFromResolution(this.image.width,this.image.height,e,t):this.enable_video?this.video.enable_embed?this.direction.nudge===DIRECTION.VERTICAL?(this.inapp_width="".concat(this.video.width+(this.enable_border?2*this.border.width:0)+(this.enable_padding?this.padding.left+this.padding.right:0),"px"),this.media_width="".concat(this.video.width,"px")):(this.inapp_height="".concat(this.video.height+(this.enable_border?2*this.border.width:0)+(this.enable_padding?this.padding.left+this.padding.right:0),"px"),this.media_container_height=this.video.height,this.media_height="".concat(this.video.height,"px"),this.min_width="".concat(this.width,"%")):this._setDimenstionFromResolution(this.video.width,this.video.height,e,t):this.enable_icon?this.direction.nudge===DIRECTION.VERTICAL?this.inapp_width="".concat(this.width,"%"):this.min_width="".concat(this.width,"%"):this.direction.nudge===DIRECTION.VERTICAL?this.inapp_width="".concat(this.width,"%"):this.max_width="".concat(this.width,"%")}},{key:"_setDimenstionFromResolution",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:.5,i=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=getHeightWidthFromResolution({width:e,height:t},n,i);this.media_width="".concat(o.width,"px"),this.media_height="".concat(o.height,"px"),this.media_container_height=o.height,this.direction.nudge===DIRECTION.VERTICAL?this.inapp_width="".concat(o.width+(this.enable_border?2*this.border.width:0)+(this.enable_padding?this.padding.left+this.padding.right:0),"px"):(this.inapp_height="".concat(o.height+(this.enable_border?2*this.border.width:0)+(this.enable_padding?this.padding.top+this.padding.bottom:0),"px"),this.min_width="".concat(this.width,"%"))}},{key:"_setBackgroundOverlays",value:function(){var e=this;this.launchPageUrl=window.location.href,this.overlayElement=document.createElement("div"),this.overlayElement.classList.add("apx-inapp-overlay".concat(this.cssPostFix));var t=this.overlayElement;this.enable_dimbackground?(this.dimBackgroundElement=document.createElement("div"),this.dimBackgroundElement.classList.add("apx-inapp-dimbackground-overlay".concat(this.cssPostFix)),t=this.dimBackgroundElement,this.overlayElement.appendChild(this.dimBackgroundElement),this.enable_dismiss_actions&&this.dismiss_actions.outside_touch&&(t.onclick=function(){clearTimeout(e.terminationTimeoutId),t.onclick=null,e.closeCallback(e.overlayElement,"dismiss",".apx-inapp-container".concat(e.cssPostFix),e.closeListener,e.redirectionListener)})):this.enable_dismiss_actions&&this.dismiss_actions.outside_touch&&document.body.addEventListener("click",this.closeListener),this.enable_dimbackground||document.body.addEventListener("click",this.redirectionListener),document.body.appendChild(this.overlayElement)}},{key:"_setStyles",value:function(){var e="\n ".concat(this._getBackgroundContainerStyles()," \n ").concat(this._getInAppContainerStyles()," \n ").concat(this._getScrollStyles()," \n ").concat(this._getControlsStyles()," \n ").concat(this._getInAppMediaContainerStyles(),"\n ").concat(this._getInAppNonMediaContainerStyles(),"\n ").concat(this._getTextConatinerStyles(),"\n ").concat(this._getTitleStyles()," \n ").concat(this._getDescriptionStyles()," \n ").concat(this._getFormStyles(),"\n ").concat(this._getInAppButtonContainerStyles(),"\n ").concat(this._getIconStyles()," \n ").concat(this._getImageStyles()," \n ").concat(this._getVideoStyles()," \n ").concat(this._getMarketingStyles()," \n ").concat(this._getProgressBarStyles(),"\n ").concat(this._getBootstrapiconsStyles()," \n ").replaceAll("\n","").replace(/[\s]{2,999}/g,""),t=document.createElement("style");t.innerHTML=e,this.overlayElement.appendChild(t)}},{key:"_getBackgroundContainerStyles",value:function(){return"\n .apx-inapp-overlay".concat(this.cssPostFix," {\n width:100%;\n height:100%;\n }\n .apx-inapp-dimbackground-overlay").concat(this.cssPostFix," {\n width:100%;\n height:100%;\n position:fixed;\n top:0;\n left:0;\n z-index:999;\n background-color:").concat(this.enable_dimbackground?this.dimbackground.color:"transparent",";\n ").concat(this.enable_dimbackground?"opacity: ".concat(this.dimbackground.opacity,";"):"","\n overflow: auto;\n }\n ")}},{key:"_getInAppContainerStyles",value:function(){var e=this.enable_border?this.border.width:0,t=e,n=e,i=e,o=e;this.enable_padding&&(t+=this.padding.top,n+=this.padding.left,i+=this.padding.right,o+=this.padding.bottom),this.enable_margin&&(t+=this.margin.top,n+=this.margin.left,i+=this.margin.right,o+=this.margin.bottom);var a="";switch(this.position.position){case INAPP_POSITION.TOP_LEFT:a="\n top:".concat(t,"px;\n left:").concat(n,"px;\n ");break;case INAPP_POSITION.TOP_CENTER:a="\n left:50%;\n top:".concat(t,"px;\n -webkit-transform: translate(-50%, ").concat(.1*t,"px);\n -moz-transform: translate(-50%, ").concat(t,"px);\n ");break;case INAPP_POSITION.TOP_RIGHT:a="\n top:".concat(t,"px;\n right:").concat(i,"px;\n ");break;case INAPP_POSITION.BOTTOM_LEFT:a="\n bottom:".concat(o,"px;\n left:").concat(n,"px;\n ");break;case INAPP_POSITION.BOTTOM_CENTER:a="\n left:50%;\n bottom:".concat(o,"px;\n -webkit-transform: translate(-50%, ").concat(.1*o,"px);\n -moz-transform: translate(-50%, ").concat(o,"px);\n ");break;case INAPP_POSITION.BOTTOM_RIGHT:a="\n bottom:".concat(o,"px;\n right:").concat(i,"px;\n ");break;case INAPP_POSITION.CENTER:default:a="\n left:50%;\n top:50%;\n -webkit-transform: translate(-50%, -50%);\n -moz-transform: translate(-50%, -50%);\n "}var r="";this.min_width&&(r="min-width:".concat(this.min_width,";"));var s="";this.enable_border&&(s="\n border-radius: ".concat(this.border.radius,"px;\n border: ").concat(this.border.width,"px ").concat(this.border.style," ").concat(this.border.color,";\n "));var c="";this.enable_gradient&&(c="\n background-image:linear-gradient(".concat(this.gradient.direction,", ").concat(this.gradient.colors[0],", ").concat(this.gradient.colors[1],");\n "));var l="";this.enable_shadow&&(l="\n box-shadow: ".concat(this.shadow.offset_x,"px ").concat(this.shadow.offset_y,"px ").concat(this.shadow.blur_radius,"px ").concat(this.shadow.spread_radius,"px ").concat(this.shadow.color,";\n "));var d="";this.enable_padding&&(d="\n padding:".concat(this.padding.top,"px ").concat(this.padding.right,"px ").concat(this.padding.bottom,"px ").concat(this.padding.left,"px;\n "));var p=this.direction.nudge!==DIRECTION.VERTICAL?"flex-direction:row;":"flex-direction:column;";p=" ".concat(p,"\n justify-content:space-evenly;\n align-items:center;\n display:flex;\n ");var u="",h="",g="margin: auto";return this.direction.nudge===DIRECTION.HORIZONTAL&&(this.enable_image||this.enable_video||this.enable_icon?this.position.position===INAPP_POSITION.TOP_LEFT||this.position.position===INAPP_POSITION.BOTTOM_LEFT?g="margin-right: 20%; margin-block:auto":this.position.position!==INAPP_POSITION.TOP_RIGHT&&this.position.position!==INAPP_POSITION.BOTTOM_RIGHT||(g="margin-left: 20%; margin-block:auto"):u="max-width: ".concat(this.max_width)),this.enable_video&&this.video.enable_embed&&(u="max-width:100%;",h="max-height:100%;"),"\n .apx-inapp-container".concat(this.cssPostFix," {\n height:").concat(this.inapp_height,";\n width:").concat(this.inapp_width,";\n background-color:").concat(this.background_color,";\n z-index:9999;\n opacity:0;\n transition:all .5s cubic-bezier(.96,.23,.07,.8);\n position:fixed;\n visibility:hidden;\n\n ").concat(r,"\n ").concat(p,"\n ").concat(d,"\n ").concat(s,"\n ").concat(c,"\n ").concat(l,"\n ").concat(a,"\n ").concat(u,"\n ").concat(h,"\n ").concat(g,"\n }\n \n .apx-inapp-container").concat(this.cssPostFix,".open{\n opacity:1;\n visibility:visible;\n }\n ")}},{key:"_getScrollStyles",value:function(){var e=this.enable_scroll&&this.scroll.enable_border?"\n border-top: ".concat(this.scroll.border.width,"px ").concat(this.scroll.border.style," ").concat(this.scroll.border.color,";\n border-bottom : ").concat(this.scroll.border.width,"px ").concat(this.scroll.border.style," ").concat(this.scroll.border.color,";\n "):"";return this.enable_scroll?"\n .apx-inapp-scroll".concat(this.cssPostFix," {\n overflow:scroll; \n overflow-x: hidden;\n height:").concat(this.scroll.height,"px;\n ").concat(e,"\n }\n "):"\n .apx-inapp-scroll".concat(this.cssPostFix," {\n overflow : hidden;\n }\n ")}},{key:"_getControlsStyles",value:function(){if(!this.enable_close_button)return"";return this.direction.non_media===DIRECTION.VERTICAL||this.direction.nudge===DIRECTION.VERTICAL?"\n .apx-inapp-close".concat(this.cssPostFix," {\n position: absolute;\n z-index:99999;\n top: ").concat(this.close_button.offset_top,"px;\n right: ").concat(this.close_button.offset_right,"px;\n width: ").concat(this.close_button.width,"px;\n height: ").concat(this.close_button.height,"px;\n cursor: pointer;\n }\n "):"\n .apx-inapp-close".concat(this.cssPostFix," {\n display:flex;\n flex-direction:row;\n justify-content:center;\n align-items:center;\n width: ").concat(this.close_button.width,"px;\n height: ").concat(this.close_button.height,"px;\n cursor: pointer;\n z-index:99999;\n }\n ")}},{key:"_getInAppMediaContainerStyles",value:function(){return"\n .apx-inapp-media-container".concat(this.cssPostFix,"{\n ").concat(this.enable_icon?"align-self:".concat(this.icon.alignment,";"):"","\n ").concat(this.enable_image||this.enable_video?"display:flex;":"","\n }")}},{key:"_getInAppNonMediaContainerStyles",value:function(){var e="";this.direction.nudge===DIRECTION.VERTICAL?e="max-height:".concat(window.innerHeight-this.media_container_height,"px;"):(this.enable_image||this.enable_video)&&(e="max-height:".concat(this.media_container_height,"px;"));return this.direction.non_media===DIRECTION.VERTICAL?"\n .apx-inapp-nonmedia-container".concat(this.cssPostFix,"{\n width:100%;\n display:flex;\n flex-direction:column;\n justify-content:center;\n align-items:stretch;\n ").concat(e,"\n }\n "):"\n .apx-inapp-nonmedia-container".concat(this.cssPostFix,"{\n width:100%;\n flex-grow:2;\n display:flex;\n flex-direction:row;\n justify-content:space-between;\n align-items:center;\n ").concat(e,"\n }\n ")}},{key:"_getTextConatinerStyles",value:function(){return"\n .apx-inapp-text-container".concat(this.cssPostFix,"{\n width:auto;\n display:flex;\n flex-direction:column;\n justify-content: center;\n overflow: hidden;\n align-items:center;\n cursor:text;\n }\n ")}},{key:"_getTitleStyles",value:function(){if(!this.enable_title)return"";var e="";if(this.title.enable_icon){var t="";this.title.icon.enable_border&&(t="border-radius:".concat(this.title.icon.border.radius,"%;\n border:").concat(this.title.icon.border.width,"px ").concat(this.title.icon.border.style," ").concat(this.title.icon.border.color,";")),e="\n height: ".concat(this.title.icon.height,"px;\n width: ").concat(this.title.icon.width,"px;\n margin-right: 10px;\n ").concat(t,"\n ")}var n="";this.title.enable_margin&&(n=" \n margin-top:".concat(this.title.margin.top,"px;\n margin-bottom:").concat(this.title.margin.bottom,"px;\n margin-left:").concat(this.title.margin.left,"px;\n margin-right:").concat(this.title.margin.right,"px;\n "));var i="";return this.title.enable_padding&&(i=" \n padding-top:".concat(this.title.padding.top,"px;\n padding-bottom:").concat(this.title.padding.bottom,"px;\n padding-left:").concat(this.title.padding.left,"px;\n padding-right:").concat(this.title.padding.right,"px;\n ")),"\n .apx-inapp-title-div".concat(this.cssPostFix," {\n width:100%;\n display:flex;\n justify-content:").concat(this.title.alignment,";\n align-items: center;\n text-align:").concat(this.title.alignment,";\n pointer-events:none;\n ").concat(n,"\n ").concat(i,"\n }\n .apx-inapp-title-icon").concat(this.cssPostFix," {\n ").concat(e,"\n }\n ")}},{key:"_getDescriptionStyles",value:function(){if(!this.enable_description)return"";var e="";this.description.enable_margin&&(e=" \n margin-top:".concat(this.description.margin.top,"px;\n margin-bottom:").concat(this.description.margin.bottom,"px;\n margin-left:").concat(this.description.margin.left,"px;\n margin-right:").concat(this.description.margin.right,"px;\n "));var t="";return this.description.enable_padding&&(t=" \n padding-top:".concat(this.description.padding.top,"px;\n padding-bottom:").concat(this.description.padding.bottom,"px;\n padding-left:").concat(this.description.padding.left,"px;\n padding-right:").concat(this.description.padding.right,"px;\n ")),"\n .apx-inapp-description".concat(this.cssPostFix," {\n width:100%;\n justify-content:").concat(this.description.alignment,";\n text-align:").concat(this.description.alignment,";\n ").concat(e,"\n ").concat(t,"\n }\n ")}},{key:"_getFormStyles",value:function(){if(this.enable_form){var e="";return this.form.enable_padding&&(e="padding:".concat(this.form.padding.top,"px ").concat(this.form.padding.right,"px ").concat(this.form.padding.bottom,"px ").concat(this.form.padding.left,"px;")),"\n .apx-inapp-form-container".concat(this.cssPostFix,"{\n ").concat(e,"\n font-size:").concat(this.form.font.size,"px;\n font-family:").concat(this.form.font.family,";\n display:flex;\n flex-direction:column;\n }")}}},{key:"_getInAppButtonContainerStyles",value:function(){return"\n .apx-inapp-button-container".concat(this.cssPostFix,"{\n display:flex;\n flex-direction:row;\n align-items:center;\n justify-content:center;\n margin:0 10px 0 10px;\n }\n .apx-inapp-top-button-container").concat(this.cssPostFix,"{\n width:100%;\n height:auto;\n }\n .apx-inapp-center-button-container").concat(this.cssPostFix,"{\n width:100%;\n height:auto;\n }\n .apx-inapp-bottom-button-container").concat(this.cssPostFix,"{\n width:100%;\n height:auto;\n }")}},{key:"_getIconStyles",value:function(){var e="";if(this.enable_icon){var t="";this.icon.enable_border&&(t="\n border-radius:".concat(this.icon.border.radius,"%;\n border:").concat(this.icon.border.width,"px ").concat(this.icon.border.style," ").concat(this.icon.border.color,";\n "));var n="";this.icon.enable_margin&&(n="\n margin-top:".concat(this.icon.margin.top,"px;\n margin-bottom:").concat(this.icon.margin.bottom,"px;\n margin-left:").concat(this.icon.margin.left,"px;\n margin-right:").concat(this.icon.margin.right,"px;\n "));var i="";this.icon.enable_padding&&(i="\n padding-top:".concat(this.icon.padding.top,"px;\n padding-bottom:").concat(this.icon.padding.bottom,"px;\n padding-left:").concat(this.icon.padding.left,"px;\n padding-right:").concat(this.icon.padding.right,"px;\n ")),e="\n .apx-inapp-icon-container".concat(this.cssPostFix," {\n text-align:").concat(this.icon.alignment,";\n }\n .apx-inapp-icon-content").concat(this.cssPostFix," {\n height: ").concat(this.icon.height,"px;\n width: ").concat(this.icon.width,"px;\n ").concat(t,"\n ").concat(n,"\n ").concat(i,"\n }\n ")}return e}},{key:"_getImageStyles",value:function(){var e="";if(this.enable_image)if(this.image.enable_background_image)e="\n .apx-inapp-image".concat(this.cssPostFix,"{\n background-image: url('").concat(this.image.path,"');\n background-repeat: no-repeat;\n background-attachment: fixed; \n background-size: 100% 100%;\n height: ").concat(this.media_height,";\n width: ").concat(this.media_width,";\n box-shadow: inset ").concat(this.media_width," ").concat(this.media_height," 0px 0px ").concat(hexToRGB(this.image.background_image.mask_color,this.image.background_image.mask_opacity),",inset -").concat(this.media_width," -").concat(this.media_height," 0px 0px ").concat(hexToRGB(this.image.background_image.mask_color,this.image.background_image.mask_opacity),"\n }\n ");else{var t="";this.image.enable_border&&(t="\n border-radius:".concat(this.image.border.radius,"%;\n border:").concat(this.image.border.width,"px ").concat(this.image.border.style," ").concat(this.image.border.color,";\n ")),e="\n .apx-inapp-image".concat(this.cssPostFix,"{\n height: ").concat(this.media_height,";\n width: ").concat(this.media_width,";\n ").concat(t,"\n }\n ")}return e}},{key:"_getVideoStyles",value:function(){var e="";if(this.enable_video){var t="";this.video.enable_border&&(t="\n border-radius:".concat(this.video.border.radius,"%;\n border:").concat(this.video.border.width,"px ").concat(this.video.border.style," ").concat(this.video.border.color,";\n ")),e="\n .apx-inapp-video".concat(this.cssPostFix," {\n width:").concat(this.media_width,";\n height:").concat(this.media_height,";\n ").concat(t,"\n }\n ")}return e}},{key:"_getProgressBarStyles",value:function(){var e="";return this.has_progress_bar&&(e="\n .apx-inapp-progress-bar".concat(this.cssPostFix,"{\n position: absolute;\n width:100%;\n height:").concat(this.progressbar.width,"px;\n ").concat("top"===this.progressbar.position?"top:0px;":"bottom:0px;","\n left:0px;\n z-index:999999;\n overflow:hidden;\n cursor: pointer;\n background:").concat(this.progressbar.reamining_color,";\n }\n .apx-inapp-bar").concat(this.cssPostFix,"{\n width:100%;\n height:100%;\n background:").concat(this.progressbar.progress_color,";\n }")),e}},{key:"_getBootstrapiconsStyles",value:function(){return'\n .bi::before, [class^="bi-"]::before, [class*=" bi-"]::before {\n display: inline-block;\n font-style: normal;\n font-weight: normal !important;\n font-variant: normal;\n text-transform: none;\n line-height: 1;\n vertical-align: -.125em;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n }\n .bi-x::before { \n content: "62a"; \n }\n .bi-x-circle-fill::before { \n content: "622"; \n }\n '}},{key:"_setInAppModalContent",value:function(){this._createInAppContainer(),this.direction.nudge===DIRECTION.VERTICAL&&(this._createTopButtonContainer(),this._setButtons(BUTTON_CONTAINER_POSITION.TOP)),this._createMediaContainer(),this.direction.nudge===DIRECTION.VERTICAL&&(this._createCenterButtonContainer(),this._setButtons(BUTTON_CONTAINER_POSITION.CENTER)),this._setImageOptions(),this._setVideoOptions(),this._setIconOptions(),this._createNonMediaContainer(),this._setTextContainer(),this._setTitleContent(),this._setDescriptionContent(),this._setFormContent(),this._createButtonContainer(),this._createBottomButtonContainer(),this._setButtons(BUTTON_CONTAINER_POSITION.BOTTOM),this._setProgressBar(),this._setCloseButton(),this._setMarketingMessage()}},{key:"_createInAppContainer",value:function(){this.inAppContainer=document.createElement("div"),this.inAppContainer.classList.add("apx-inapp-container".concat(this.cssPostFix)),this.overlayElement.appendChild(this.inAppContainer),this.enable_dismiss_actions&&this.dismiss_actions.outside_touch&&(this.inAppContainer.onclick=function(e){e.stopPropagation()})}},{key:"_createMediaContainer",value:function(){this.mediaContainer=document.createElement("div"),this.mediaContainer.classList.add("apx-inapp-media-container".concat(this.cssPostFix)),this.inAppContainer.appendChild(this.mediaContainer)}},{key:"_setImageOptions",value:function(){if(this.enable_image)if(this.image.enable_background_image)this.inAppContainer.classList.add("apx-inapp-image".concat(this.cssPostFix));else{var e=document.createElement("img");e.src=this.image.path,e.classList.add("apx-inapp-image".concat(this.cssPostFix)),this.mediaContainer.appendChild(e)}}},{key:"_setVideoOptions",value:function(){if(this.enable_video)if(this.video.enable_embed){var e=document.createElement("div");e.classList.add("apx-inapp-video".concat(this.cssPostFix)),e.innerHTML="".concat(this.video.embed.html),this.mediaContainer.appendChild(e)}else{var t=document.createElement("video");t.classList.add("apx-inapp-video".concat(this.cssPostFix)),t.controlsList="noplaybackrate nodownload",t.disablePictureInPicture=!0,t.controls=!0,t.muted=!this.video.enable_audio;var n=document.createElement("source");n.setAttribute("src",this.video.path),n.setAttribute("type","video/mp4"),t.appendChild(n),this.mediaContainer.appendChild(t)}}},{key:"_setIconOptions",value:function(){if(this.enable_icon){var e=document.createElement("div");e.classList.add("apx-inapp-icon-container".concat(this.cssPostFix));var t=document.createElement("img");t.src=this.icon.path,t.classList.add("apx-inapp-icon-content".concat(this.cssPostFix)),e.appendChild(t),this.mediaContainer.appendChild(e)}}},{key:"_createNonMediaContainer",value:function(){this.nonMediaContainer=document.createElement("div"),this.nonMediaContainer.classList.add("apx-inapp-nonmedia-container".concat(this.cssPostFix)),this.inAppContainer.appendChild(this.nonMediaContainer)}},{key:"_setTextContainer",value:function(){this.textContainer=document.createElement("div"),this.textContainer.classList.add("apx-inapp-text-container".concat(this.cssPostFix)),this.nonMediaContainer.appendChild(this.textContainer)}},{key:"_setTitleContent",value:function(){if(this.enable_title){resolveDynamicText(this.title);var e=document.createElement("div");if(e.classList.add("apx-inapp-title-div".concat(this.cssPostFix)),this.title.enable_icon){var t=document.createElement("img");t.src=this.title.icon.path,t.classList.add("apx-inapp-title-icon".concat(this.cssPostFix)),e.appendChild(t)}e.appendChild(createNewTextElement(this.title,this.currentId,"title")),this.textContainer.appendChild(e)}}},{key:"_setDescriptionContent",value:function(){if(this.enable_description){resolveDynamicText(this.description);var e=document.createElement("div");e.classList.add("apx-inapp-description".concat(this.cssPostFix)),e.appendChild(createNewTextElement(this.description,this.currentId,"description")),e.classList.add("apx-inapp-scroll".concat(this.cssPostFix)),this.textContainer.appendChild(e)}}},{key:"_setFormContent",value:function _setFormContent(){var _this3=this;if(this.enable_form){var _this$form$elements,formContainer=document.createElement("form");formContainer.classList.add("apx-inapp-form-container".concat(this.cssPostFix));var dummy="";null===(_this$form$elements=this.form.elements)||void 0===_this$form$elements||_this$form$elements.forEach((function(e){dummy+=generateFormField(e)})),formContainer.innerHTML=dummy,this.nonMediaContainer.appendChild(formContainer);var form=document.querySelector(".apx-inapp-form-container".concat(this.cssPostFix));form.addEventListener("submit",(function(e){e.preventDefault();var _this3$generateRespon=_this3.generateResponse(_this3.form.elements),obj=_this3$generateRespon.obj,callback=_this3$generateRespon.callback,evalString="(obj)=>"+callback+"(obj)",evalFunction=eval(evalString);evalFunction(obj),clearTimeout(_this3.terminationTimeoutId),_this3.closeCallback(_this3.overlayElement,"dismiss",".apx-inapp-container".concat(_this3.cssPostFix),_this3.closeListener,_this3.redirectionListener)}))}}},{key:"_createButtonContainer",value:function(){this.direction.non_media!==DIRECTION.VERTICAL&&(this.buttonContainer=document.createElement("div"),this.buttonContainer.classList.add("apx-inapp-button-container".concat(this.cssPostFix)),this.nonMediaContainer.appendChild(this.buttonContainer))}},{key:"_setProgressBar",value:function(){if(this.enable_stepper&&this.stepper.enable_progressbar){this.progressbar=this.stepper.progressbar;var e=document.createElement("div");e.classList.add("apx-inapp-progress-bar".concat(this.cssPostFix));var t=document.createElement("div");t.classList.add("apx-inapp-bar".concat(this.cssPostFix)),this.stepper.index<=this.stepper.length?t.style.transform="translateX(".concat(-(100-100/this.stepper.length*this.stepper.index),"%)"):e.style.visibility="hidden",e.appendChild(t),this.inAppContainer.appendChild(e)}}},{key:"_createTopButtonContainer",value:function(){var e;this.enable_buttons&&null!==(e=this.buttons)&&void 0!==e&&e.enable_top&&(this.topButtonContainer=document.createElement("div"),this.topButtonContainer.classList.add("apx-inapp-top-button-container".concat(this.cssPostFix)),this.inAppContainer.appendChild(this.topButtonContainer))}},{key:"_createCenterButtonContainer",value:function(){var e;this.enable_buttons&&null!==(e=this.buttons)&&void 0!==e&&e.enable_center&&(this.centerButtonContainer=document.createElement("div"),this.centerButtonContainer.classList.add("apx-inapp-center-button-container".concat(this.cssPostFix)),this.inAppContainer.appendChild(this.centerButtonContainer))}},{key:"_createBottomButtonContainer",value:function(){var e;this.enable_buttons&&null!==(e=this.buttons)&&void 0!==e&&e.enable_bottom&&(this.bottomButtonContainer=document.createElement("div"),this.bottomButtonContainer.classList.add("apx-inapp-bottom-button-container".concat(this.cssPostFix)),this.direction.non_media===DIRECTION.VERTICAL?this.nonMediaContainer.appendChild(this.bottomButtonContainer):this.buttonContainer.appendChild(this.bottomButtonContainer))}},{key:"_setButtons",value:function(e){var t=this;if(this.enable_buttons&&(e===BUTTON_CONTAINER_POSITION.TOP&&this.buttons.enable_top||e===BUTTON_CONTAINER_POSITION.CENTER&&this.buttons.enable_center||e===BUTTON_CONTAINER_POSITION.BOTTOM&&this.buttons.enable_bottom)){var n=this.overlayElement,i=function(e,i){clearTimeout(t.terminationTimeoutId),t.closeCallback(n,i,"new-inline".concat(t.cssPostFix),t.closeListener,t.redirectionListener)},o={next:function(e,n){i(0,"next"),t.stepperCallBack(e,n)},prev:function(e,n){i(0,"prev"),t.stepperCallBack(e,n)},complete:i,cancel:i,_isCancelled:!1,action:""},a={};a=e===BUTTON_CONTAINER_POSITION.TOP?this.buttons.top:e===BUTTON_CONTAINER_POSITION.CENTER?this.buttons.center:this.buttons.bottom;var r=generateButtonsBlock(this.configId,this.name,this.stepper,EVENT_PREFIX.INAPP,a,this.direction.buttons,"",e,o,this.isWalkthrough,this.uis,this.index,"modal");e===BUTTON_CONTAINER_POSITION.TOP?this.topButtonContainer.appendChild(r):e===BUTTON_CONTAINER_POSITION.CENTER?this.centerButtonContainer.appendChild(r):this.bottomButtonContainer.appendChild(r)}}},{key:"_setCloseButton",value:function(){var e=this;if(this.enable_close_button){var t=document.createElement("span");this.close_button.type===CLOSE_BUTTON_STYLE.NORMAL?t.innerHTML=getCloseSVG(this.close_button.width,this.close_button.height,this.close_button.color):this.close_button.type===CLOSE_BUTTON_STYLE.FILL?"circle"===this.close_button.shape?t.innerHTML=getCloseWithCircleSVG(this.close_button.width,this.close_button.height,this.close_button.fill_color,this.close_button.color):t.innerHTML=getCloseWithRectangleSVG(this.close_button.width,this.close_button.height,this.close_button.fill_color,this.close_button.color):t.innerHTML='<img src="'.concat(this.close_button.path,'" width="').concat(this.close_button.width,'px" height="').concat(this.close_button.height,'px"></img>'),t.classList.add("apx-inapp-close".concat(this.cssPostFix)),t.addEventListener("click",(function(){clearTimeout(e.terminationTimeoutId),e.rtmInstance.logActionEvent("InAppXIconClicked",e.configId,e.name,"modal"),e.closeCallback(e.overlayElement,e.close_button.action,".apx-inapp-container".concat(e.cssPostFix),e.closeListener,e.redirectionListener)})),this.direction.non_media===DIRECTION.VERTICAL||this.direction.nudge===DIRECTION.VERTICAL?this.inAppContainer.appendChild(t):this.buttonContainer.appendChild(t)}}},{key:"_setAutoTerminate",value:function(){var e=this;!0===this.terminationConfig.auto_dismiss&&(this.terminationTimeoutId=window.setTimeout((function(){e.closeCallback(e.overlayElement,"dismiss",".apx-inapp-container".concat(e.cssPostFix),e.closeListener,e.redirectionListener)}),this.terminationConfig.duration))}},{key:"_showInApp",value:function(){this.inAppContainer.classList.toggle("open"),this.showCallback()}}]),ModalInApp}(),Logger$5=window.ApxorLogger;function createInApp(e,t,n){var i=n.dimmed_background,o=document.createElement("div");o.setAttribute("id",APX_OVERLAY);var a=document.createElement("style");a.innerHTML="#apx-oly {\n width:auto;height:auto;position:fixed;top:0;right:0;bottom:0;left:0;\n display:flex;justify-content:center;align-items:center;border-radius:3px;z-index:99999999;background-color:".concat(i?"#31313185":"transparent",";\n\n }\n #apx-oly > * {font-family:inherit;box-sizing:unset}\n .apx-dlg-c {\n height:auto;width:auto;z-index:99999999;opacity:0;transition:all .5s cubic-bezier(.96,.23,.07,.8);position:fixed;visibility:hidden;\n border-radius:3px;overflow:hidden\n }\n .apx-dlg-c.open{opacity:1;visibility:visible;width:100%;height:100%;}\n ").replaceAll("\n","").replace(/[\s]{2,999}/g,"");var r=document.createElement("div");return r.setAttribute("id",APX_DIALOG_CONTENT),r.classList.add(APX_DIALOG_CONTENT),o.appendChild(r),o.appendChild(a),document.body.appendChild(o),o}function createInAppVideo(e,t,n,i,o,a){VideoInApp.isAVideoBeingPlayed()||checkForNeverShow$1(n)&&VideoInApp.canShowVideoInApp(e)&&new VideoInApp(e,t,n,i,o,a).showVideoInApp()}function createInAppModal(e,t,n,i,o,a,r,s,c,l){new ModalInApp(e,t,n,i,o,a,r,s,c,l).createInAppModal()}var InAppConfigItem=_createClass$1((function e(){var t=this;_classCallCheck$1(this,e),_defineProperty$1(this,"_inApp",new ApxorInApp),_defineProperty$1(this,"initialize",(function(e,n,i){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,r=arguments.length>5?arguments[5]:void 0,s=arguments.length>6&&void 0!==arguments[6]&&arguments[6],c=i.delay,l=i.layout_type,d=void 0===l?"":l,p=i.html_config.data,u=void 0===p?"":p,h=i.window_attributes,g=h.width,f=void 0===g?"auto":g,m=h.height,_=void 0===m?"auto":m,v=h.dimmed_background,b=void 0===v||v,y=h.dismiss_outside_touch,x=void 0!==y&&y,w=h.position,C=void 0===w?CENTER:w;return t.configId=e,t.name=n,t.delay=c||0,t.width=f,t.height=_,t.layoutConfig={layout_type:d,dimmed_background:b,dismiss_outside_touch:x,position:C},t.htmlConfig={data:u},t.uis=o,t.index=a,t.ui=i,t.rtmInstance=window.ApxorRTM,t.on_show=function(){if(t.rtmInstance.logActionEvent("inapp_shown",t.configId,t.name,"modal"),t.rtmInstance.isShowingAction=!0,t.rtmInstance.currentAction=function(){},n===APX_PREVIEW_CAMPAIGN_NAME){feedBackMessagePopUp("previewing...");var e=document.getElementById("close-button");null==e||e.addEventListener("click",(function(){var e=document.getElementById("apx-container");null==e||e.remove()}))}},t.on_hide=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";t.rtmInstance.isShowingAction=!1,t.rtmInstance.currentAction=null,"cancel"!==e.toLowerCase()?t.rtmInstance.logActionEvent("inapp_dismissed",t.configId,t.name,"modal"):t.rtmInstance.logActionEvent("walkthrough_cancelled",t.configId,t.name,"modal");var n=document.getElementById("apx-container");null==n||n.remove()},t.stepperCallBack=r,t.isWalkthrough=s,!0})),_defineProperty$1(this,"showInApp",(function(e,n){if(!t.isValid)return!1;setTimeout((function(){if(null!==t.rtmInstance.currentAction&&void 0!==t.rtmInstance.currentAction)return null==Apxor||Apxor.logEvent("apx_nudge_not_shown",{apx_nudge_type:"campaign",apx_nudge_id:t.configId,apx_nudge_name:t.name,apx_variant_code:ceWrapper.getInstance().getVariantCode(t.configId),apx_failure_type:"error",apx_reason:"An action is already being shown"}),void Logger$5.error("An action is already being shown.");try{if(ceWrapper.getInstance().updateCount(t.configId),t.layoutConfig.layout_type===INAPP_TYPE.VIDEO)createInAppVideo(t.ui,n,t.configId,t.name,t.on_show,t.on_hide);else if(t.layoutConfig.layout_type===INAPP_TYPE.MODAL)createInAppModal(t.ui,n,t.configId,t.name,t.on_show,t._closeInApp,t.stepperCallBack,t.isWalkthrough,t.uis,t.index);else{var e=createInApp(t.width,t.height,t.layoutConfig);t.layoutConfig.dismiss_outside_touch&&(document.getElementById(APX_OVERLAY).onclick=function(){t._closeInApp(e)}),setTimeout((function(){e.children[0].classList.toggle("open"),e.children[0].innerHTML=t.htmlConfig.data,t._logInAppEvent(INAPP_SHOWN),t.on_show(),e.querySelectorAll("a").forEach((function(n){n.onclick=function(){return t._takeAction(e,n)}}))}),100)}}catch(e){Logger$5.error(e)}}),t.delay)})),_defineProperty$1(this,"_takeAction",(function(e,n){var i=n.getAttribute("href");if(null!=i&&i.includes("apxor")){var o,a=i.replace(/^apxor:\/\/([^?]*).*?$/,"$1");switch(a){case"cancel":t._logInAppEvent(WALK_THROUGH_CANCELLED);break;case"xclose":t._logInAppEvent(INAPP_XICON_CLICKED);break;case"close":o=i.replace(/(.*?)buttonName=([^&]*).*?$/,"$2"),t._logInAppEvent(INAPP_BUTTON_CLICKED(""===o?"Button":o));break;case"dl_url":var r=i.replace(/(.*?)uri=([^&]*).*?$/,"$2"),s=i.replace(/(.*?)external=([^&]*).*?$/,"$2");o=i.replace(/(.*?)buttonName=([^&]*).*?$/,"$2"),t._logInAppEvent(INAPP_BUTTON_CLICKED(""===o?"Button":o)),"true"==s?window.open(r,"_blank"):Apxor.logClientEvent("REDIRECT",{url:r})}return t._closeInApp(e,a),!1}return!0})),_defineProperty$1(this,"_closeInApp",(function(e,n){var i,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:".apx-dlg-c",a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null;document.body.removeEventListener("click",a),document.body.removeEventListener("click",r);var s=document.querySelector(o);null==s||null===(i=s.classList)||void 0===i||i.toggle("open"),e.remove(),t.on_hide(n)})),_defineProperty$1(this,"_logInAppEvent",(function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=t.rtmInstance.getCampaignMeta(t.configId),o=i._attr;Apxor.logEvent(e,_objectSpread2$1(_objectSpread2$1({id:t.configId,message_name:t.name},n),o))})),this.isValid=!0})),ApxorInApp=_createClass$1((function e(){_classCallCheck$1(this,e),_defineProperty$1(this,"parse",(function(e,t,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,a=arguments.length>5?arguments[5]:void 0,r=arguments.length>6&&void 0!==arguments[6]&&arguments[6],s=new InAppConfigItem;return s.initialize(e,t,n,i,o,a,r)?s:null}))})),SDK_VERSION=260,DEFAULT_COOKIE_EXPIRATION=730,DEFAULT_CONFIG={enable:!0,api_root:"https://server.apxor.com/v2/api",auto_track_events:["click","submit"],cookie_expiration:DEFAULT_COOKIE_EXPIRATION,name:"",domain:"",cookie_prefix:"_apx_",idle_time_out:1800,ed_t_time:-1,sct_time:108e5,events:{stop:[],action:[]}},APX_PREFIX="apx_",showEventsList=["inline_shown","inapp_shown","apx_onboarding_screen_shown"],surveyShowEventsList=["apx_survey_dialog_launched","apx_survey_launched"],dismissEventsList=["inline_dismissed","walk_through_cancelled","inapp_dismissed","apx_onboarding_completed","apx_onboarding_screen_dismissed"],surveyDismissEventsList=["apx_survey_completed"],actionEventsList=["apx_app_opened","install","apx_context_evaluated","InlineTargetViewClicked","InAppBackButtonPressed","InAppRedirectionFailed","inapp_show_failed","InAppXIconClicked","apx_video_inapp_button_clicked","apx_video_inapp_close_button_clicked","apx_video_inapp_failed","apx_video_inapp_maximised","apx_video_inapp_minimised","apx_video_inapp_volume_button_clicked"],surveyActionEventsList=["apx_survey_dialog_yes_clicked","apx_survey_dialog_close_icon_clicked","apx_survey_close_button_clicked","apx_survey_back_button_pressed","apx_survey_dialog_no_clicked","apx_survey_question_asked","apx_survey_question_answered","apx_survey_skip_button_clicked","apx_survey_back_button_clicked","apx_survey_"],ON_KEY="on",BROWSERS={OperaMini:"Opera Mini",Opera:"Opera",BlackBerry:"BlackBerry",IEMobile:"Internet Explorer Mobile",Edge:"Microsoft Edge",FB:"Facebook Mobile",Chrome:"Chrome",ChromeIOS:"Chrome iOS",UC:"UC Browser",FirefoxIOS:"Firefox iOS",SafariMobile:"Mobile Safari",Safari:"Safari",AndroidMobile:"Android Mobile",Konqueror:"Konqueror",Firefox:"Firefox",IE:"Internet Explorer",Mozilla:"Mozilla",Brave:"Brave"},APXOR_USER_ID="apx_id",APX_CONFIG_KEY="_apx_config",APX_USER_ATTR_KEY="_apx_ua",APX_SYNC="_apx_sc",APX_EVENTS_LOGGED="_apx_evl",APX_LAST_ENABLE_DISABLE_TIME="_apx_ledt",APX_LAST_ENABLED_FLAG="_apx_lef",APX_CONFIG_HASH="_apx_ch",APX_LAST_CONFIG_TIME="_apx_lct",APX_USER_INFO_HASH="_apx_uih",APX_INSTALL_KEY="apx_in",APP_VERSION_KEY="apx_ver",APX_LAST_BG_TIME_KEY="apx_lbgt",DETAILS_KEY="details",APXOR_STATUS_KEY="apxor_status",APXOR_STATUS_SUCCESS="APXOR_STATUS_SUCCESS",VISIBLE="visible",FOREGROUND="FOREGROUND",BACKGROUND="BACKGROUND",APX_PAGE_OPENED="APX_PAGE_OPENED",APX_APP_OPENED="apx_app_opened",REFERRER_KEY="referrer",AUTOMATION_KEY="automation",PLATFORM_KEY="platform",DATA_SAVE_MODE_KEY="data_save_mode",NETWORK_KEY="network",SYSTEM_EVENT="SYSTEM_EVENT",NAVIGATION_EVENT="NAVIGATION_EVENT",APP_EVENT="APP_EVENT",CLIENT_EVENT="CLIENT_EVENT",REATINED_SESSIONS="apx_retained_session",QE_STATE="qe_state",DEVICE_TYPE="device_type",APX_LAST_EVENT_TIME="_apx_lEt",APX_SESSION_ID="_apx_sId",APX_CURRENT_CHUNK="_apx_cd",OLD_SESSIONS_DATA="_apx_od",APX_LT_COUNT="_apx_lt_count",APX_UNSENT_CHUNK_DETAILS="_apx_use",APX_SESSION_CHUNK_NUMBER_MAP="_apx_scnm",APX_RETAINED_DAYS="apx_retained_days",APX_SESSION_START_TIME="apx_sst",APX_TERMINATION_ID="apx_termination_ID",apxorKeys=["apx_debug_enable","apx_log_level","_apx_config","apx_id","apx_ver","apx_ver","apx_in","_apx_od","_apx_use","_apx_cd","qe_state","apx_retained_session","apx_retained_days","_apx_ua","_apx_sc","_apx_ledt","_apx_lef","_apx_ch","_apx_lct","_apx_uih","apx_lbgt","_apx_lEt","_apx_sId","_apx_lt_count","apx_sst","apx_termination_ID","_apx_ew","_apx_scnm","0__lcfht","1__lcfht","_apx_td"];function safeAdd(e,t){var n=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(n>>16)<<16|65535&n}function bitRotateLeft(e,t){return e<<t|e>>>32-t}function md5cmn(e,t,n,i,o,a){return safeAdd(bitRotateLeft(safeAdd(safeAdd(t,e),safeAdd(i,a)),o),n)}function md5ff(e,t,n,i,o,a,r){return md5cmn(t&n|~t&i,e,t,o,a,r)}function md5gg(e,t,n,i,o,a,r){return md5cmn(t&i|n&~i,e,t,o,a,r)}function md5hh(e,t,n,i,o,a,r){return md5cmn(t^n^i,e,t,o,a,r)}function md5ii(e,t,n,i,o,a,r){return md5cmn(n^(t|~i),e,t,o,a,r)}function binlMD5(e,t){var n,i,o,a,r;e[t>>5]|=128<<t%32,e[14+(t+64>>>9<<4)]=t;var s=1732584193,c=-271733879,l=-1732584194,d=271733878;for(n=0;n<e.length;n+=16)i=s,o=c,a=l,r=d,s=md5ff(s,c,l,d,e[n],7,-680876936),d=md5ff(d,s,c,l,e[n+1],12,-389564586),l=md5ff(l,d,s,c,e[n+2],17,606105819),c=md5ff(c,l,d,s,e[n+3],22,-1044525330),s=md5ff(s,c,l,d,e[n+4],7,-176418897),d=md5ff(d,s,c,l,e[n+5],12,1200080426),l=md5ff(l,d,s,c,e[n+6],17,-1473231341),c=md5ff(c,l,d,s,e[n+7],22,-45705983),s=md5ff(s,c,l,d,e[n+8],7,1770035416),d=md5ff(d,s,c,l,e[n+9],12,-1958414417),l=md5ff(l,d,s,c,e[n+10],17,-42063),c=md5ff(c,l,d,s,e[n+11],22,-1990404162),s=md5ff(s,c,l,d,e[n+12],7,1804603682),d=md5ff(d,s,c,l,e[n+13],12,-40341101),l=md5ff(l,d,s,c,e[n+14],17,-1502002290),s=md5gg(s,c=md5ff(c,l,d,s,e[n+15],22,1236535329),l,d,e[n+1],5,-165796510),d=md5gg(d,s,c,l,e[n+6],9,-1069501632),l=md5gg(l,d,s,c,e[n+11],14,643717713),c=md5gg(c,l,d,s,e[n],20,-373897302),s=md5gg(s,c,l,d,e[n+5],5,-701558691),d=md5gg(d,s,c,l,e[n+10],9,38016083),l=md5gg(l,d,s,c,e[n+15],14,-660478335),c=md5gg(c,l,d,s,e[n+4],20,-405537848),s=md5gg(s,c,l,d,e[n+9],5,568446438),d=md5gg(d,s,c,l,e[n+14],9,-1019803690),l=md5gg(l,d,s,c,e[n+3],14,-187363961),c=md5gg(c,l,d,s,e[n+8],20,1163531501),s=md5gg(s,c,l,d,e[n+13],5,-1444681467),d=md5gg(d,s,c,l,e[n+2],9,-51403784),l=md5gg(l,d,s,c,e[n+7],14,1735328473),s=md5hh(s,c=md5gg(c,l,d,s,e[n+12],20,-1926607734),l,d,e[n+5],4,-378558),d=md5hh(d,s,c,l,e[n+8],11,-2022574463),l=md5hh(l,d,s,c,e[n+11],16,1839030562),c=md5hh(c,l,d,s,e[n+14],23,-35309556),s=md5hh(s,c,l,d,e[n+1],4,-1530992060),d=md5hh(d,s,c,l,e[n+4],11,1272893353),l=md5hh(l,d,s,c,e[n+7],16,-155497632),c=md5hh(c,l,d,s,e[n+10],23,-1094730640),s=md5hh(s,c,l,d,e[n+13],4,681279174),d=md5hh(d,s,c,l,e[n],11,-358537222),l=md5hh(l,d,s,c,e[n+3],16,-722521979),c=md5hh(c,l,d,s,e[n+6],23,76029189),s=md5hh(s,c,l,d,e[n+9],4,-640364487),d=md5hh(d,s,c,l,e[n+12],11,-421815835),l=md5hh(l,d,s,c,e[n+15],16,530742520),s=md5ii(s,c=md5hh(c,l,d,s,e[n+2],23,-995338651),l,d,e[n],6,-198630844),d=md5ii(d,s,c,l,e[n+7],10,1126891415),l=md5ii(l,d,s,c,e[n+14],15,-1416354905),c=md5ii(c,l,d,s,e[n+5],21,-57434055),s=md5ii(s,c,l,d,e[n+12],6,1700485571),d=md5ii(d,s,c,l,e[n+3],10,-1894986606),l=md5ii(l,d,s,c,e[n+10],15,-1051523),c=md5ii(c,l,d,s,e[n+1],21,-2054922799),s=md5ii(s,c,l,d,e[n+8],6,1873313359),d=md5ii(d,s,c,l,e[n+15],10,-30611744),l=md5ii(l,d,s,c,e[n+6],15,-1560198380),c=md5ii(c,l,d,s,e[n+13],21,1309151649),s=md5ii(s,c,l,d,e[n+4],6,-145523070),d=md5ii(d,s,c,l,e[n+11],10,-1120210379),l=md5ii(l,d,s,c,e[n+2],15,718787259),c=md5ii(c,l,d,s,e[n+9],21,-343485551),s=safeAdd(s,i),c=safeAdd(c,o),l=safeAdd(l,a),d=safeAdd(d,r);return[s,c,l,d]}function binl2rstr(e){var t,n="",i=32*e.length;for(t=0;t<i;t+=8)n+=String.fromCharCode(e[t>>5]>>>t%32&255);return n}function rstr2binl(e){var t,n=[];for(n[(e.length>>2)-1]=void 0,t=0;t<n.length;t+=1)n[t]=0;var i=8*e.length;for(t=0;t<i;t+=8)n[t>>5]|=(255&e.charCodeAt(t/8))<<t%32;return n}function rstrMD5(e){return binl2rstr(binlMD5(rstr2binl(e),8*e.length))}function rstrHMACMD5(e,t){var n,i,o=rstr2binl(e),a=[],r=[];for(a[15]=r[15]=void 0,o.length>16&&(o=binlMD5(o,8*e.length)),n=0;n<16;n+=1)a[n]=909522486^o[n],r[n]=1549556828^o[n];return i=binlMD5(a.concat(rstr2binl(t)),512+8*t.length),binl2rstr(binlMD5(r.concat(i),640))}function rstr2hex(e){var t,n,i="";for(n=0;n<e.length;n+=1)t=e.charCodeAt(n),i+="0123456789abcdef".charAt(t>>>4&15)+"0123456789abcdef".charAt(15&t);return i}function str2rstrUTF8(e){return unescape(encodeURIComponent(e))}function rawMD5(e){return rstrMD5(str2rstrUTF8(e))}function hexMD5(e){return rstr2hex(rawMD5(e))}function rawHMACMD5(e,t){return rstrHMACMD5(str2rstrUTF8(e),str2rstrUTF8(t))}function hexHMACMD5(e,t){return rstr2hex(rawHMACMD5(e,t))}var md5=function(e,t,n){return t?n?rawHMACMD5(t,e):hexHMACMD5(t,e):n?rawMD5(e):hexMD5(e)},EventHandler=_createClass$1((function e(){var t=this;_classCallCheck$1(this,e),_defineProperty$1(this,"notifyListeners",(function(e,n){if(t._listeners[e])for(var i=t._listeners[e],o=0;o<i.length;o++){(0,i[o])(n)}})),_defineProperty$1(this,"registerForEvent",(function(e,n){var i;isFunction(n)&&((i=t._listeners[e]?t._listeners[e]:[]).push(n),t._listeners[e]=i)})),_defineProperty$1(this,"unregisterFromEvent",(function(e,n){if(t._listeners[e]){for(var i=t._listeners[e],o=[],a=0;a<i.length;a++){var r=i[a];r!==n&&o.push(r)}t._listeners[e]=o}})),_defineProperty$1(this,"tearDown",(function(){t._listeners={}})),this._listeners={}})),ALL="ALL",makeSystemEvent=function(e,t){return{name:e===VISIBLE?FOREGROUND:BACKGROUND,time:isNumber(t)?toDecimalPoints(t):0}},makeEvent=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0,i=arguments.length>3?arguments[3]:void 0;if(isString(e)&&isObject(t))return{name:e,additional_info:t,category:isDefined(n)&&isString(n)?n:void 0,time:isNumber(i)?toDecimalPoints(i):0}},makeAppInfo=function(e,t,n,i,o){return{app_name:e,app_version:o=isDefined(o)?o:ALL,bundle_id:t,installation_time:n,app_mode:i}},makeDeviceInfo=function(e,t,n,i,o,a,r,s){return{id:e,hardware_model:t,dimensions:n,os_version:i,platform:"web",dpi:o,dimensions_in_pixels:a,browser:r,browser_version:s}},makeNavigationEvent=function(e,t,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;return{navigation_id:e,name:t,duration:isNumber(n)?toDecimalPoints(n):0,transition_time:isNumber(i)?toDecimalPoints(i):0}},DEFAULT_CHUNK_DETAILS={navigation_events:[],app_events:[],system_events:[],user_events:[],chunk_attributes:{},user_attributes:{},session_attributes:{}},getSdkInfo=function(e){return{sdk_version:SDK_VERSION,config_id:"apx",tick_interval:1,chunk_retry_window:1800,sdk_start_time:e}},chunkInitialState=function(e,t,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1;return Logger$4.debug("Model : Building the initial state of the Chunk"),{sdk_info:getSdkInfo(e),session_info:{id:n,launch_time:t,launch_time_string:formatDatetime(new Date(t)),startup_time:0,is_background:!1,is_first_session:!1,duration:0,total_duration:0,process_name:"",is_fatal:!1,launch_type:"normal"},app_info:{app_name:"",app_version:ALL,bundle_id:"",installation_time:Controller.getInstance().getInstallationTime(getNow()),app_mode:"production"},device_info:getDeviceInfo(window),chunk_meta:{id:n+":"+i,number:i,reporting_times:[]},chunk_details:_objectSpread2$1(_objectSpread2$1({},DEFAULT_CHUNK_DETAILS),{},{user_attributes:{},session_attributes:{}})}},Request=_createClass$1((function e(){var t=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};_classCallCheck$1(this,e),_defineProperty$1(this,"post",(function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2?arguments[2]:void 0,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},a=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],r=t.window.XMLHttpRequest;Logger$4.debug("Request : POST request with data"),r?t._makeXmlHttpRequest(e,n,i,o,a):(Logger$4.error("Request : Unknown browser"),i(403,"Unknown")),Logger$4.debug("Request : Sent request to server")})),_defineProperty$1(this,"get",(function(e,n){var i=t.window,o=i.fetch,a=i.XMLHttpRequest;if(o)o(e).then((function(e){try{if(e.ok)return e.json()}catch(e){Logger$4.debug("Request : Error while parsing the response ".concat(e))}return null})).then((function(e){isDefined(e)?n(200,e):(Logger$4.error("Request : API request failed. ".concat(JSON.stringify(e))),n(500,{}))})).catch((function(e){Logger$4.error("Request : API request failed. ".concat(e)),n(500,e)}));else if(a){var r=new a;r.open("GET",e,!0),r.onreadystatechange=function(){4===r.readyState&&n(r.status,r.responseText)},r.send()}else Logger$4.error("Request : Unknown browser"),n(403,"Unknown");Logger$4.debug("Request : sent request to server")})),_defineProperty$1(this,"_makeXmlHttpRequest",(function(e,n,i,o,a){var r=new XMLHttpRequest;r.onerror=function(e){Logger$4.error("Request : API request failed. ".concat(e)),i(500,null)},r.open("POST",e,a),r.setRequestHeader("Content-Type","application/json; charset=UTF-8"),Object.keys(null!=o?o:{}).forEach((function(e){r.setRequestHeader(e,o[e])})),r.onreadystatechange=function(){if(4===r.readyState){var o=r.responseText,a=o.match(/Failed to execute 'send' on 'XMLHttpRequest'/);if(!(isNull(a)||isUndefined(a)||isNull(a[0])||isUndefined(a[0])||"Failed to execute 'send' on 'XMLHttpRequest'"!==a[0]))return void t._makeXmlHttpRequest(e,n,i,!0);try{o=JSON.parse(o)}catch(e){Logger$4.debug("Request : Error while parsing the response ".concat(e))}i(r.status,o)}};try{r.send(JSON.stringify(n))}catch(e){Logger$4.error("Request : API request failed. ".concat(e)),i(500,e)}})),this.window=n})),CHUNKS_API="/<app-id>/chunks?isTestDevice=<test-device>",CONFIG_API$1="/config/<app-id>/web",SDK_ENABLED_API="/sdk/<app-id>/enabled-status?platform=web&version="+SDK_VERSION,POST_USER_INFO_API="/user?appId=<app-id>",API_ROOT=DEFAULT_CONFIG.api_root,_makeAPI=function(e,t){return API_ROOT+e.replace("<app-id>",t)},API=_createClass$1((function e(t){var n=this,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};_classCallCheck$1(this,e),_defineProperty$1(this,"_callback",(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(){return null},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){return null};return function(n,i){Logger$4.debug("XHR Response: [".concat(n,"]")),n<400?i&&i[APXOR_STATUS_KEY]===APXOR_STATUS_SUCCESS?i[DETAILS_KEY]?e(i[DETAILS_KEY]):e(i):200===n?e(i):t(n,i):t&&isFunction(t)&&t(n,i)}})),_defineProperty$1(this,"checkIfSDKEnabled",(function(e,t){n.makeGetRequest(n.sdkEnabledStatusAPI,e,t)})),_defineProperty$1(this,"getConfig",(function(e,t){n.makeGetRequest(n.configAPI,e,t)})),_defineProperty$1(this,"postUserInfo",(function(e,t,i){n.request.post(n.userInfoAPI,e,n._callback(t,i),{})})),_defineProperty$1(this,"postChunk",(function(e,t,i){var o=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];Logger$4.debug("Posting chunk"),n.request.post(n.chunksAPI,e,n._callback(t,i),{},o)})),_defineProperty$1(this,"makeGetRequest",(function(e,t,i){n.request.get(e,n._callback(t,i))})),_defineProperty$1(this,"makePostRequest",(function(e,t,i,o,a){n.request.post(e,t,n._callback(o,a),i)})),this.request=new Request(i),this.configAPI=_makeAPI(CONFIG_API$1,t),this.chunksAPI=_makeAPI(CHUNKS_API,t),this.chunksAPI=this.chunksAPI.replace("<test-device>",Controller.getInstance().isTestDevice()),this.sdkEnabledStatusAPI=_makeAPI(SDK_ENABLED_API,t),this.userInfoAPI=_makeAPI(POST_USER_INFO_API,t)})),SessionHandler=_createClass$1((function e(){var t=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;_classCallCheck$1(this,e),_defineProperty$1(this,"_lastBackgroundTime",-1),_defineProperty$1(this,"_totalBackgroundTime",0),_defineProperty$1(this,"getTotalBackgroundTime",(function(){return t._totalBackgroundTime})),_defineProperty$1(this,"getLastBackgroundTime",(function(){return t._lastBackgroundTime})),_defineProperty$1(this,"reset",(function(){t._lastBackgroundTime=-1,t._totalBackgroundTime=0})),_defineProperty$1(this,"_onSystemEvent",(function(e){if(e.name===FOREGROUND){if(-1!==t._lastBackgroundTime){var n=Math.round(millisToSeconds(Date.now()-t._lastBackgroundTime));t._totalBackgroundTime+=n;var i=Controller.getInstance().getFromStorage(APX_SESSION_ID);if(isDefined(i)&&Controller.getInstance().getSessionId()!==i){Controller.getInstance().createANewChunk();var o=Controller.getInstance().getSessionInfo(),a=o.total_duration,r=o.duration;t._totalBackgroundTime=a>r?a-r:0}}}else t._lastBackgroundTime=Date.now(),Controller.getInstance().persistToStorage(APX_LAST_BG_TIME_KEY,t._lastBackgroundTime)})),Controller.getInstance().registerForEvent(SYSTEM_EVENT,this._onSystemEvent),this._totalBackgroundTime=n,Controller.getInstance().persistToStorage(APX_LAST_BG_TIME_KEY,this._lastBackgroundTime)})),Storage=function(){function e(t){var n=this;_classCallCheck$1(this,e),_defineProperty$1(this,"_isStorageAvailable",!1),_defineProperty$1(this,"_isSupported",(function(e){var t=!0;try{window[e]?(window[e].setItem("_apx_","apx"),"apx"!==window[e].getItem("_apx_")&&(t=!1),window[e].removeItem("_apx_")):t=!1}catch(e){t=!1}return t||Logger$4.error("Storage : LocalStorage not supported"),t})),_defineProperty$1(this,"logError",(function(e){Logger$4.error("".concat(n.storageType," Error: "),e)})),_defineProperty$1(this,"get",(function(e){try{return n.storage.getItem(e)}catch(t){Logger$4.error("Storage : Error while getting the ".concat(e," from storage - ").concat(t))}return null})),_defineProperty$1(this,"getParsed",(function(e){try{return JSON.parse(n.storage.getItem(e))}catch(t){Logger$4.error("Storage : Error while parsing ".concat(e,"'s value from storage - ").concat(t))}return null})),_defineProperty$1(this,"set",(function(e,t){try{n.storage.setItem(e,t)}catch(t){Logger$4.error("Storage : Error while setting the ".concat(e,"'s value to storage - ").concat(t))}})),_defineProperty$1(this,"remove",(function(e){try{n.storage.removeItem(e)}catch(t){Logger$4.error("Storage : Error while removing the ".concat(e," from storage - ").concat(t))}})),_defineProperty$1(this,"clear",(function(){try{n.storage.removeItem(APX_CONFIG_KEY),n.storage.removeItem(APX_USER_ATTR_KEY),n.storage.removeItem(APX_LAST_EVENT_TIME),n.storage.removeItem(APX_SESSION_ID),n.storage.removeItem(APX_SYNC),n.storage.removeItem(APXOR_USER_ID),n.storage.removeItem(APX_INSTALL_KEY),n.storage.removeItem(APP_VERSION_KEY),n.storage.removeItem(APX_LAST_BG_TIME_KEY),n.storage.removeItem(APX_CURRENT_CHUNK),n.storage.removeItem(OLD_SESSIONS_DATA),n.storage.removeItem(APX_LT_COUNT),n.storage.removeItem(APX_UNSENT_CHUNK_DETAILS),n.storage.removeItem(APX_SESSION_CHUNK_NUMBER_MAP),n.storage.removeItem(APX_LAST_CONFIG_TIME),n.storage.removeItem(APX_CONFIG_HASH),n.storage.removeItem(APX_LAST_ENABLED_FLAG),n.storage.removeItem(APX_LAST_ENABLE_DISABLE_TIME)}catch(e){Logger$4.error("Storage : Error while clearing the storage - ".concat(e))}})),this._isStorageAvailable=this._isSupported(t),this._isStorageAvailable?(this.storage=window[t],this.storageType=t):(this.storageType=t,this.storage={length:0,getItem:function(){},setItem:function(){},removeItem:function(){},clear:function(){},get:function(){},set:function(){},remove:function(){},getParsed:function(){}})}return _createClass$1(e,[{key:"isStorageAvailable",value:function(){return this._isStorageAvailable}}],[{key:"waitForBrowserStorage",value:function(t){var n=15,i=setInterval((function(){n--,e.isLocalStorageEnabled()||n<=0?(Logger$4.debug("Storage : Local storage available"),clearInterval(i),t()):Logger$4.debug("Storage : Local storage not available yet")}),100)}},{key:"isLocalStorageEnabled",value:function(){try{var e="__apx_storage_test__";window.localStorage.setItem(e,"test");var t=window.localStorage.getItem(e);return window.localStorage.removeItem(e),"test"===t}catch(e){return Logger$4.debug("Browser storage is not enabled yet : ".concat(e)),!1}}}]),e}();function storage(){return new Storage("localStorage")}var Cookie=_createClass$1((function e(){_classCallCheck$1(this,e)}));_defineProperty$1(Cookie,"isCookieAvailable",(function(){try{var e=(new Date).getTime()+864e5;document.cookie="cookie_set=cookie_value; expires="+e;for(var t=document.cookie.split(";"),n=0;n<t.length;n++){if(-1!==t[n].indexOf("cookie_set"))return document.cookie="cookie_set=cookie_value; expires=Thu, 01 Jan 1970 00:00:01 GMT;",!0}return!1}catch(e){return!1}})),_defineProperty$1(Cookie,"get",(function(e){if(window.document)for(var t=e+"=",n=window.document.cookie.split(";"),i=0;i<n.length;i++){for(var o=n[i];" "===o.charAt(0);)o=o.substring(1,o.length);if(0===o.indexOf(t))return decodeURIComponent(o.substring(t.length,o.length))}return null}));var DataManager=function(){function e(t){var n=this;_classCallCheck$1(this,e),_defineProperty$1(this,"_siteId",""),_defineProperty$1(this,"getExistingConfig",(function(){var e,t=n.storage.get(APX_CONFIG_KEY);if(isDefined(t))try{t=JSON.parse(decode(n._siteId,t))}catch(e){t=null}return null!==(e=t)&&void 0!==e?e:DEFAULT_CONFIG})),_defineProperty$1(this,"persistConfig",(function(e){n.storage.set(APX_CONFIG_KEY,encode(n._siteId,JSON.stringify(e)))})),_defineProperty$1(this,"persistUserId",(function(e){n.storage.set(APXOR_USER_ID,e)})),_defineProperty$1(this,"getUserId",(function(){var e=null;try{e=n.storage.get(APXOR_USER_ID)}catch(e){Logger$4.debug("Datamaager : Can not get user id from storage-"+e)}return e})),_defineProperty$1(this,"persistAppVersion",(function(e){return n.storage.set(APP_VERSION_KEY,e)})),_defineProperty$1(this,"getAppVersion",(function(){var e=n.storage.get(APP_VERSION_KEY);if(!isDefined(e)&&Cookie.isCookieAvailable()){var t=Cookie.get(APP_VERSION_KEY);if(isDefined(t))return n.storage.set(APP_VERSION_KEY,t),t}return e})),_defineProperty$1(this,"persist",(function(e,t){n.storage.set(e,t)})),_defineProperty$1(this,"getItem",(function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=n.storage.get(e);if(t){var o=getJSONOrNull(i);if(null===o)try{i=JSON.parse(decode(n._siteId,i))}catch(t){Logger$4.debug("Datamanager : ".concat(e," - value not found in storage")),i=null}else i=o}return Logger$4.debug("Datamanager : ".concat(e,"'s value from storage is ").concat(JSON.stringify(i))),i})),_defineProperty$1(this,"getItemOrDefault",(function(e,t){var i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],o=n.getItem(e,i);return isDefined(o)?o:(Logger$4.debug("Datamanager : ".concat(e,"'s value is not defined. Returning default-").concat(JSON.stringify(t))),t)})),_defineProperty$1(this,"clearStorage",(function(){n.storage.clear()})),_defineProperty$1(this,"resetUserProperties",(function(){Logger$4.debug("Datamanager : Removing the user attributes form the storage"),n.storage.remove(APX_USER_ATTR_KEY)})),_defineProperty$1(this,"persistInstallationTime",(function(e){Logger$4.debug("DataManager : Setting the installation time to ".concat(e)),n.storage.set(APX_INSTALL_KEY,e)})),_defineProperty$1(this,"getInstallationTime",(function(e){var t=n.storage.get(APX_INSTALL_KEY);return isDefined(t)?(Logger$4.debug("Datamanager : Stored installation time ".concat(t)),Number(t)):(Logger$4.debug("Datamanager : Stored installation time not found. Persisting and returning the default time ".concat(e)),n.persistInstallationTime(e),e)})),_defineProperty$1(this,"persistOldChunk",(function(e){Logger$4.debug("Datamanager : Persisting the old session chunk to the storage"),n.storage.set(OLD_SESSIONS_DATA,encode(n._siteId,JSON.stringify(e)))})),_defineProperty$1(this,"getOldChunk",(function(){var e;Logger$4.debug("Datamanager : Getting the old session chunk details form the storage");var t=n.storage.get(OLD_SESSIONS_DATA),i=getJSONOrNull(t);if(null===i)try{t=JSON.parse(decode(n._siteId,t))}catch(e){t=null}else t=i;return null!==(e=t)&&void 0!==e?e:[]})),_defineProperty$1(this,"removeOldChunk",(function(){Logger$4.debug("Datamanager : Removing the old session chunk details form the storage"),n.storage.remove(OLD_SESSIONS_DATA)})),_defineProperty$1(this,"getOldChunkDetails",(function(){return n.getItem(APX_UNSENT_CHUNK_DETAILS,!0)})),_defineProperty$1(this,"persistOldChunkDetails",(function(e){Logger$4.debug("Datamanager : Persisting the old session chunk details to the storage"),n.storage.set(APX_UNSENT_CHUNK_DETAILS,encode(n._siteId,JSON.stringify(e)))})),_defineProperty$1(this,"removeOldChunkDetails",(function(){Logger$4.debug("Datamanager : Removing the old session chunk details form the storage"),n.storage.remove(APX_UNSENT_CHUNK_DETAILS)})),_defineProperty$1(this,"getSessionsChunkNumberMap",(function(){Logger$4.debug("Datamanager : Getting the session chunknumber map");var e=n.getItem(APX_SESSION_CHUNK_NUMBER_MAP,!0);return isDefined(e)||(e={}),e})),_defineProperty$1(this,"persistSessionsChunkNumberMap",(function(e){Logger$4.debug("Datamanager : Persisting the new session chunknumber map");var t=encode(n._siteId,JSON.stringify(e));n.persist(APX_SESSION_CHUNK_NUMBER_MAP,t)})),_defineProperty$1(this,"getNewChunk",(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Date.now(),t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Date.now(),i=arguments.length>2?arguments[2]:void 0,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:3600;Logger$4.debug("Datamanager : Creating a new chunk");var a,r=!1,s=Number(n.storage.get(APX_LAST_EVENT_TIME))||0,c=Date.now(),l=Math.round(millisToSeconds(c-s)),d=n.getCurrentChunk();if((l>o||isNotDefined(d))&&(r=!0),r)Logger$4.debug("Datamanager : This is a new session. Creating a new chunk"),a=chunkInitialState(e,t,i);else{Logger$4.debug("Datamanager : This is an old session. Updating the existing chunk");var p=d.chunk_meta.number,u=d.session_info.id,h=p+1;(a=_objectSpread2$1({},d)).chunk_meta=_objectSpread2$1(_objectSpread2$1({},a.chunk_meta),{},{number:h,id:u+":"+h,reporting_times:[Date.now()]}),a.chunk_details=_objectSpread2$1({},DEFAULT_CHUNK_DETAILS)}return{is_new_session:r,chunk:a}})),_defineProperty$1(this,"clearCurrentChunk",(function(){Logger$4.debug("Datamanager : Current chunk removed from storage"),n.storage.remove(APX_CURRENT_CHUNK)})),_defineProperty$1(this,"persistCurrentChunk",(function(e){Logger$4.debug("Datamanager : Persisting the Current chunk to storage"),ensureSessionInfoKeys(e),n.storage.set(APX_CURRENT_CHUNK,encode(n._siteId,JSON.stringify(e)))})),_defineProperty$1(this,"getCurrentChunk",(function(){return n.getItem(APX_CURRENT_CHUNK,!0)})),this._siteId=t,this.storage=storage(),Logger$4.debug("DataManager : Initialized")}return _createClass$1(e,[{key:"getltCount",value:function(e){try{var t=this.storage.get(APX_LT_COUNT);if(t){var n=decode(this._siteId,t);return JSON.parse(n)[e.replace("'","").replace("’","")]}}catch(t){Logger$4.error("Datamanager : Error gettting the LT Count for the event -"+e)}return 0}},{key:"updateRetainedDayCount",value:function(e){Logger$4.debug("Datamanager : Re-calculating and updating the retention day");var t=this.getItem(APX_INSTALL_KEY),n=Math.abs(t-e)/36e5,i=Math.floor(n/24);this.persist(APX_RETAINED_DAYS,i)}}]),e}(),VISIBILITY_CHANGE_EVENT="visibilitychange",SCROLL_EVENT_TYPES=["scroll","touchmove"],SystemEventMonitor=_createClass$1((function e(){var t=this,n=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];_classCallCheck$1(this,e),_defineProperty$1(this,"_isFirst",!0),_defineProperty$1(this,"listenSystemEvents",(function(){Logger$4.debug("Registering for System Event ",VISIBILITY_CHANGE_EVENT);var e=function(){var e=Controller.getInstance(),n=e.getSDKRunningTimeInSec(),i=window.document.visibilityState===VISIBLE,o=makeSystemEvent(window.document.visibilityState,n);if(i?(e.setBlockChunkReportingFlag(!1),t._lastBackgroundTime>-1&&(e.sendOldChunk((function(){e.dispatchEvent(SYSTEM_EVENT,o)})),o.background_time=toDecimalPoints(millisToSeconds(Date.now()-t._lastBackgroundTime)))):(e.setBlockChunkReportingFlag(!0),e.reportChunkOnVisibilityChange(),t._lastBackgroundTime=Date.now(),e.dispatchEvent(SYSTEM_EVENT,o)),i){var a=e.getUserAttributes().apx_browser;!t._isFirst||-1!==a.indexOf("Mobile Safari")&&-1!==a.indexOf("Safari")||(t._isFirst=!1)}else e.clearNavigation()};registerForEvent(document,VISIBILITY_CHANGE_EVENT,e),t._handlers.push(t._newHandler(VISIBILITY_CHANGE_EVENT,e))})),_defineProperty$1(this,"unregisterEvents",(function(){t._handlers.forEach((function(e){var t=e.type,n=e.handler;Logger$4.debug("Unregistering from event type ",t),SCROLL_EVENT_TYPES.includes(t)?deregisterFromEvent(window.document,t,n):deregisterFromEvent(document,t,n)})),t._handlers=[],t._scrollEvents=[],t._scrollData={}})),_defineProperty$1(this,"getScrollEvents",(function(){return[]})),_defineProperty$1(this,"_newHandler",(function(e,t){return{type:e,handler:t}})),this._lastBackgroundTime=-1,this._handlers=[],this._scrollEvents=[],this._scrollData={},this._isFirst=n,this.listenSystemEvents()})),Sync=_createClass$1((function e(){var t=this;_classCallCheck$1(this,e),_defineProperty$1(this,"_validateHash",!0),_defineProperty$1(this,"_siteId",""),_defineProperty$1(this,"_RTA",0),_defineProperty$1(this,"_SURVEYS",1),_defineProperty$1(this,"initialize",(function(e,n){t._siteId=n;var i=e.validate_hash,o=void 0===i||i,a=e.cs_ht_time,r=void 0===a?-1:a;t._validateHash=o,t.configsHashThrottleTime=r,Controller.getInstance().registerForEvent(APP_EVENT,(function(e){t._updateCountInStorage(e.name)}))})),_defineProperty$1(this,"fetchConfiguration",(function(e,n,i,o){if(isFunction(o))if(t._validateHash){var a=Controller.getInstance();if(t.configsHashThrottleTime>0){var r=a.getValueOrDefault(e+"_lcfht",-1);if(r>0)if(Math.abs(Date.now()-r)<t.configsHashThrottleTime)return void t._fetchFromStorageAndSend(e,o)}a.persistToStorage(e+"_lcfht",Date.now());var s=t._getSyncData(),c={pid_mid:[]},l=s[e];if(isDefined(l)){Array.isArray(l)||(l=[l]);var d=[];l.forEach((function(e){var t=e.pid+"_"+e.mid;d.includes(t)||d.push(t)})),d.length>0&&(c.pid_mid=d.join(","))}else l=[];var p=a.getUserAttributes().custom_user_id,u=void 0===p?null:p;u&&(n+="&customerId="+u),a.makePostRequest(n,c,{"Content-Type":"application/json"},(function(n){t._validateHashes(n,e,i,{configs:l,syncData:s},o)}),(function(){Logger$4.error("Failed to fetch"),o(e,{configs:l})}))}else t._fetchConfig(e,i,[],o)})),_defineProperty$1(this,"_getSyncData",(function(){var e=Controller.getInstance().getFromStorage(APX_SYNC);return isDefined(e)?JSON.parse((new TextDecoder).decode(stringToArrayBuffer(decode(Controller.getInstance().getSiteId(),e)))):{}})),_defineProperty$1(this,"_fetchFromStorageAndSend",(function(e,n){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,o=i;i||(o=t._getSyncData());var a=o[e];isDefined(a)&&(Array.isArray(a)||(a=[a]),Logger$4.debug("Reading from storage"),n(e,{configs:a}))})),_defineProperty$1(this,"_validateHashes",(function(e,n,i,o,a){var r=e.pull,s=void 0===r?[]:r,c=e.drop,l=void 0===c?[]:c,d=o.configs,p=o.syncData,u=JSON.parse(Controller.getInstance().getFromStorage(APX_TERMINATION_ID)),h=[];l.length>0||s.length>0?(l.forEach((function(e){var t=removeLastPartOfId(e);if(checkForNeverShow(t)){var n=JSON.parse(Controller.getInstance().getFromStorage("_apx_never_show_ids"));n=n.filter((function(e){return e!==t})),Controller.getInstance().persistToStorage("_apx_never_show_ids",JSON.stringify(n))}})),s.forEach((function(e){var t=removeLastPartOfId(e);if(checkForNeverShow(t)){var n=JSON.parse(Controller.getInstance().getFromStorage("_apx_never_show_ids"));n=n.filter((function(e){return e!==t})),Controller.getInstance().persistToStorage("_apx_never_show_ids",JSON.stringify(n))}})),d.forEach((function(e){l.includes(e.pid)||s.includes(e.pid)||h.push(e),l.includes(e.pid)&&null!==u&&null!=u&&u[e._id]&&(delete u[e._id],Controller.getInstance().persistToStorage(APX_TERMINATION_ID,JSON.stringify(u)))})),p[n]=h,Controller.getInstance().persistToStorage(APX_SYNC,encode(t._siteId,arrayBufferToString((new TextEncoder).encode(JSON.stringify(p)))))):(Logger$4.debug("Nothing to delete",n),h=d),s.length>0?(s.forEach((function(e){i+="&pids="+e})),t._fetchConfig(n,i,h,a)):(Logger$4.debug("Nothing to pull",n),a(n,{configs:h}))})),_defineProperty$1(this,"_fetchConfig",(function(e,n,i,o){Controller.getInstance().makeGetRequest(n,(function(n){if(isDefined(n.configs)&&Array.isArray(n.configs)&&0==n.configs.length)o("",{configs:[]});else if(isDefined(n.configs)&&Array.isArray(n.configs)){n.configs.forEach((function(n){var i,o,a,r,s;null===(i=Controller.getInstance())||void 0===i||i.logAppEvent("apx_config_received",{apx_nudge_type:e===t._SURVEYS?"survey":"campaign",apx_nudge_id:null==n?void 0:n._id,apx_nudge_name:null==n||null===(o=n.meta)||void 0===o?void 0:o.name,apx_variant_code:null!=n&&null!==(a=n.meta)&&void 0!==a&&a.isExperiment||null!=n&&null!==(r=n.meta)&&void 0!==r&&r.only_context?null==n||null===(s=n.meta)||void 0===s||null===(s=s.attr)||void 0===s?void 0:s.apx_variant_code:"TG"})}));var a=t._getSyncData(),r=[].concat(_toConsumableArray(i),_toConsumableArray(n.configs));a[e]=r,Controller.getInstance().persistToStorage(APX_SYNC,encode(t._siteId,arrayBufferToString((new TextEncoder).encode(JSON.stringify(a))))),o(e,{configs:r})}}),(function(){o(e,{configs:[]})}))})),_defineProperty$1(this,"handleNavigationEvent",(function(e){t._updateCountInStorage(e)})),_defineProperty$1(this,"_updateCountInStorage",(function(e){var n=t._getSyncData();if(isDefined(n.d)||(n.d={}),JSON.stringify(n.d).length>2097152)Logger$4.error("Sync : Reached maximum limit. Can't store further");else{var i=0;isDefined(n.d[e])&&(i=n.d[e]),i+=1,n.d[e]=i,Controller.getInstance().persistToStorage(APX_SYNC,encode(t._siteId,arrayBufferToString((new TextEncoder).encode(JSON.stringify(n)))))}})),_defineProperty$1(this,"getEventCount",(function(e){var n=t._getSyncData();return isDefined(n.d)&&isDefined(n.d[e])?n.d[e]:0}))})),errorFunction=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return function(){Logger$4.error("".concat(e,": Apxor SDK not initialised."))}},DefaultController={reportChunkOnVisibilityChange:errorFunction("reportChunkOnVisibilityChange"),logAppEvent:errorFunction("logAppEvent"),logClientEvent:errorFunction("logClientEvent"),logPageView:errorFunction("logPageView"),setUserId:errorFunction("setUserId"),setUserProperties:errorFunction("setUserProperties"),setSessionProperties:errorFunction("setSessionProperties"),setAppVersion:errorFunction("setAppVersion"),getClientId:errorFunction("getClientId"),getSessionId:errorFunction("getSessionId"),startSession:errorFunction("startSession"),endSession:errorFunction("endSession"),flattenJSON:errorFunction("flattenJSON"),setRedirectionHandler:errorFunction("setRedirectionHandler"),setInitFlag:errorFunction("setInitFlag")},Controller=function(){function e(){var t=this;return _classCallCheck$1(this,e),_defineProperty$1(this,"_eventHandler",{}),_defineProperty$1(this,"_isInitialized",!1),_defineProperty$1(this,"_appInfo",{}),_defineProperty$1(this,"_deviceInfo",{}),_defineProperty$1(this,"_sdkInfo",{}),_defineProperty$1(this,"_sessionInfo",{}),_defineProperty$1(this,"_userAttributes",{}),_defineProperty$1(this,"_sessionAttributes",{}),_defineProperty$1(this,"_chunkDetails",{}),_defineProperty$1(this,"_chunkNumber",1),_defineProperty$1(this,"_currentNavigation",null),_defineProperty$1(this,"_isRunning",!1),_defineProperty$1(this,"_isEventMonitorRegistered",!1),_defineProperty$1(this,"_dataManager",{}),_defineProperty$1(this,"_customEventListener",null),_defineProperty$1(this,"_systemEventMonitor",{}),_defineProperty$1(this,"_sessionHandler",{}),_defineProperty$1(this,"_sync",{}),_defineProperty$1(this,"_idleTimeout",3600),_defineProperty$1(this,"_maxEventsSentCount",20),_defineProperty$1(this,"_chunkSendInterval",-1),_defineProperty$1(this,"_internalChunkSendInterval",2e4),_defineProperty$1(this,"_chunk502RetryTime",-1),_defineProperty$1(this,"_maxSessionsInStorage",10),_defineProperty$1(this,"_isSending",!1),_defineProperty$1(this,"_isFirstSession",!1),_defineProperty$1(this,"_last502Time",-1),_defineProperty$1(this,"_batchEvents",!1),_defineProperty$1(this,"_bulkUpload",!0),_defineProperty$1(this,"clientEvents",[]),_defineProperty$1(this,"_stopEventsFromConfig",[]),_defineProperty$1(this,"_clientEventsFromConfig",[]),_defineProperty$1(this,"_appEventsFromConfig",[]),_defineProperty$1(this,"_data",{}),_defineProperty$1(this,"_sessionCount",0),_defineProperty$1(this,"_redirectionHandler",null),_defineProperty$1(this,"_sendChunkOnEventsId",null),_defineProperty$1(this,"_sendChunkOnETAId",null),_defineProperty$1(this,"_blockChunkReporting",!1),_defineProperty$1(this,"_SDKStartedAfterPluginInit",!1),_defineProperty$1(this,"_eventsLogged",{}),_defineProperty$1(this,"initWaitTime",1500),_defineProperty$1(this,"version",""),_defineProperty$1(this,"_deviceId",""),_defineProperty$1(this,"_configHash",""),_defineProperty$1(this,"sessionStartTime",null),_defineProperty$1(this,"sessionId",""),_defineProperty$1(this,"_ltCountObj",{}),_defineProperty$1(this,"_pendingChunk",!1),_defineProperty$1(this,"_initializePlugins",(function(e){var n=t.config.plugins;if(isDefined(n)&&isDefined(n.length))for(var i=0;i<n.length;i++){var o=n[i];try{var a;null===(a=window[o])||void 0===a||a.init(e),Logger$4.debug("Controller : Initialized plugin ".concat(o))}catch(e){Logger$4.error("Controller : Failed to initialize plugin ".concat(o," with error ").concat(e))}}})),_defineProperty$1(this,"initialize",(function(e,n,i,o,a,r){if(!t._isInitialized){var s=function(){Logger$4.debug("Controller : On Site enabled in config"),t._getConfigHash(c,r)},c=function(e){t._configHash=e,Logger$4.debug("Controller : On config hash fetch"),t._waitForResourceLoad(e,l)},l=function(){Logger$4.info("Controller : Waiting for resources completed"),t._setWYSIWYGCookie(),t._initializeLTCount(),t._updateAppInfo(),t._deviceId=t._getDeviceId(),t._setDeviceInfo(),t._setDefaultUserProperties(),t._postUserInfo(),t._mergeStoredAndDefaultUserAttributes(),t._getStoredListOfEventsLogged(),t._setDefaultSessionProperties(),t._setInitialSessionState(),t._reinitialiseChunkDetails(),t._downloadConfig(t._configHash);var e=t._getTotalBackgroundTime();t._sessionHandler=new SessionHandler(e),t._registerSystemEventMonitor(),t.sendOldChunk(d)},d=function(){t._isRunning=!0,t._isInitialized=!0;var e=t.createANewChunk();t._dataManager.persistCurrentChunk(e),t._initializePlugins(p)},p=function(){var e,n;(t._dispatchSystemEvent(t.window.document.visibilityState),t.newSession&&(t.sessionStartTime=Date.now(),t.logAppEvent(APX_APP_OPENED,{time:formatDatetime(new Date)}),t._resetCampaignSessionFrequency()),t.logPageView(t.window.location.pathname),t._sendChunkWithAtleastOneEvent(),t._registerIntervalBasedChunkReporting(),a(),null!==(e=o.ApxorRTM)&&void 0!==e&&e.isBadgePresent)&&(null===(n=o.ApxorRTM)||void 0===n||n.badgesLists.forEach((function(e){var n;t.isBadgeTriggerSatisfied(e)&&!document.getElementById("apxor-badge-container-".concat("-".concat(e).replaceAll(" ","").replace(/[^\w\s]/gi,"")))&&(null===(n=o.ApxorRTM)||void 0===n||null===(n=n.ceInstance)||void 0===n||n.notifyEventListener(makeEvent("apxor-badge-container-".concat("-".concat(e).replaceAll(" ","").replace(/[^\w\s]/gi,"")),{},void 0,t.getTimeElapsedInSession())))})))};t._waitForBrowserStorage((function(){Logger$4.debug("Controller : Wait for browser storage completed."),t._initializeStateVariables(e,n,i,o),t._setConfig(),t._initializeFieldsFromConfig(),t._sync.initialize(t.config,t.siteId),t._checkEnableStatusInConfig(s,r)}))}})),_defineProperty$1(this,"getSiteId",(function(){return t.siteId})),_defineProperty$1(this,"setRedirectionHandler",(function(e){t._isInitialized?t._redirectionHandler?t._redirectionHandler=e:(t._redirectionHandler=e,t.registerForEvent("CLIENT_EVENT",t._clientRedirectionHandler)):DefaultController.setRedirectionHandler()})),_defineProperty$1(this,"_clientRedirectionHandler",(function(e){e&&"REDIRECT"===e.name&&t._redirectionHandler(e.additional_info.url)})),_defineProperty$1(this,"makePostRequest",(function(e,n,i,o,a){t._api.makePostRequest(e,n,i,o,a)})),_defineProperty$1(this,"getDevInfo",(function(){return t._deviceInfo})),_defineProperty$1(this,"getListOfEventsLogged",(function(){return t._eventsLogged})),_defineProperty$1(this,"_updateListOfEventsLogged",(function(e,n){t._eventsLogged[e]=t._eventsLogged[e]||{first_logged_time:(new Date).toISOString()},t._eventsLogged[e]=_objectSpread2$1(_objectSpread2$1(_objectSpread2$1({},t._eventsLogged[e]),n),{},{latest_logged_time:(new Date).toISOString()}),t.persistToStorage(APX_EVENTS_LOGGED,encode(t.siteId,JSON.stringify(t._eventsLogged)))})),_defineProperty$1(this,"getInstallationTime",(function(){return t._dataManager.getInstallationTime(t.startTime)})),_defineProperty$1(this,"_waitForBrowserStorage",(function(e){Logger$4.debug("Controller : Checking if the browsers localstorage is available."),Storage.waitForBrowserStorage(e)})),_defineProperty$1(this,"_initializeStateVariables",(function(e,n,i,o){Logger$4.debug("Controller : Initializing the state variables"),t.window=o,t.startTime=n,t.siteId=e,t.clientConfig=i||{},t.initWaitTime=t.clientConfig.sdk_init_wait?1e3*t.clientConfig.sdk_init_wait:2e3,t._dataManager=new DataManager(t.siteId),t._api=new API(t.siteId,t.window),t._eventHandler=new EventHandler,t._sync=new Sync,t._sdkInfo=getSdkInfo(t.startTime),t.sessionStartTime=parseInt(t._dataManager.getItemOrDefault(APX_SESSION_START_TIME,n)),Logger$4.debug("Controller : session start time is ".concat(t.sessionStartTime)),Logger$4.debug("Controller : SDK start time is ".concat(t.startTime)),t.sessionId=t.getFromStorage(APX_SESSION_ID)})),_defineProperty$1(this,"_initializeLTCount",(function(){Logger$4.debug("Controller : Initializing the LT Count ");try{var e=t.getFromStorage(APX_LT_COUNT);if(e)t._ltCountObj=JSON.parse((new TextDecoder).decode(stringToArrayBuffer(decode(t.siteId,e))));else{t._ltCountObj={};var n=encode(t.siteId,arrayBufferToString((new TextEncoder).encode(JSON.stringify(t._ltCountObj))));t.persistToStorage(APX_LT_COUNT,n)}}catch(e){Logger$4.error("Controller : LT Count object parsing failed ".concat(e))}})),_defineProperty$1(this,"_setWYSIWYGCookie",(function(){var e=new URLSearchParams(location.search),n=e.get("_a")||e.get("_p")||e.get("_x")||e.get("_o")||e.get("_r");if(n||(n=t.getFromStorage("_apxor_url_param")),n)try{Logger$4.debug("Controller : Initialising in WYSIWYG mode");var i=decode(t.siteId,n),o=i=JSON.parse(i),a=o.app_id,r=o.expiry,s=Date.now();if(a===t.siteId&&s<=r){var c=new Date(r+6e4).toUTCString(),l=btoa("_apx_ew");document.cookie="_apx_ewc=".concat(l,"; expires=").concat(c),i.expiry=i.expiry+6e4,t.persistToStorage("_apx_ew",i,!0),Logger$4.debug("Controller : _apx_ewc cookie set")}e.delete("_a"),e.delete("_p"),e.delete("_x"),e.delete("_o"),e.delete("_r");var d=location.pathname,p=e.toString();""!==p&&(d+="?"+p),t.window.history.replaceState({},document.title,d),Logger$4.debug("Controller : Query params reset after removing dashboard embedded params")}catch(e){Logger$4.error("Controller : Error while setting the WYSIWYG cookie ".concat(e))}else Logger$4.debug("Controller : Not in WYSIWYG mode")})),_defineProperty$1(this,"_setConfig",(function(){Logger$4.debug("Controller : Setting the config");var e=t._dataManager.getExistingConfig();t._mergeConfigWithClientConfig(e)})),_defineProperty$1(this,"_mergeConfigWithClientConfig",(function(e){t.config=_objectSpread2$1(_objectSpread2$1({},e),t.clientConfig),Logger$4.debug("Controller : New config and client configs Configs merged")})),_defineProperty$1(this,"_initializeFieldsFromConfig",(function(){var e,n,i,o=t.config,a=o.version,r=void 0===a?"":a,s=o.bulk_upload,c=void 0===s||s,l=o.events_upload_time,d=o.idle_time_out,p=void 0===d?1800:d,u=o.events,h=void 0===u?{}:u,g=o.max_chunk_event_count,f=void 0===g?20:g,m=o.retry_time,_=o.max_sessions_in_storage,v=void 0===_?-1:_;t.version=t._validateAndGetAppVersion(r),t._bulkUpload=c,t._batchEvents=l>0,t._idleTimeout=isNumber(p)?p:1800,t._stopEventsFromConfig=null!==(e=h.stop)&&void 0!==e?e:[],t._clientEventsFromConfig=null!==(n=h.action)&&void 0!==n?n:[],t._appEventsFromConfig=null!==(i=h.app)&&void 0!==i?i:[],t._maxEventsSentCount=isDefined(f)&&isNumber(f)?f:20,t._chunkSendInterval=isDefined(l)&&isNumber(l)&&l>=1e3?l:-1,t._chunk502RetryTime=isDefined(m)&&isNumber(m)&&m>=1e3?m:-1,t._maxSessionsInStorage=isNumber(v)&&v>0?v:-1})),_defineProperty$1(this,"_validateAndGetAppVersion",(function(e){var n;if(isDefined(e))n=e,t._dataManager.persistAppVersion(n);else{var i=t._dataManager.getAppVersion();n=isDefined(i)?i:""}return n})),_defineProperty$1(this,"_checkEnableStatusInConfig",(function(e,n){if(Logger$4.debug("Controller : Checking if the Site is enabled existing config"),!t.config.enable)return Logger$4.debug("Controller : Site is disabled. Can't initialise"),t._downloadConfig(""),t._postUserInfo(),void n();e()})),_defineProperty$1(this,"_getConfigHash",(function(e,n){var i=t._dataManager.getExistingConfig(),o=t._dataManager.getItemOrDefault(APX_LAST_ENABLE_DISABLE_TIME,-1),a=i.ed_t_time;if(a>0&&o>0&&Math.abs(o-Date.now())<60*a*1e3)return Logger$4.debug("Controller : Reinitializing with in the throttling time."),t._dataManager.getItemOrDefault(APX_LAST_ENABLED_FLAG,!0)?void e(t._dataManager.getItemOrDefault(APX_CONFIG_HASH,"")):(Logger$4.debug("Controller : Site is not enabled from the last update. Can't initalise now. Recheck will happen after throttling time"),void n());t._checkEnableStatusFromServer(e,n)})),_defineProperty$1(this,"_checkEnableStatusFromServer",(function(e,n){Logger$4.debug("Controller : Getting the site enabled status from the server"),t.persistToStorage(APX_LAST_ENABLE_DISABLE_TIME,Date.now()),t._api.checkIfSDKEnabled((function(i){var o=i.enabled,a=i.hash;t.persistToStorage(APX_LAST_ENABLED_FLAG,o),o?(Logger$4.debug("Controller : Site is enabled"),e(a)):(Logger$4.debug("Controller : Site is disabled. Can't initialise the SDK"),t._isInitialized=!1,t._isRunning=!1,t._stopSDK(),n())}),(function(e){Logger$4.error("Controller : enabled-status API failed ".concat(e))}))})),_defineProperty$1(this,"_stopSDK",(function(){Logger$4.debug("Controller: Stopping the SDK");try{var e,n;t._isRunning=!1,t._isInitialized=!1,t._isSending=!1,null===(e=t._eventHandler)||void 0===e||e.tearDown(),null===(n=t._systemEventMonitor)||void 0===n||n.unregisterEvents()}catch(e){Logger$4.error("Controller : Failed to stop the SDK ".concat(e))}})),_defineProperty$1(this,"_waitForResourceLoad",(function(e,n){Logger$4.debug("Controller: Waiting ".concat(t.initWaitTime,"ms for all the resource loading to finish")),setTimeout((function(){n(e)}),t.initWaitTime)})),_defineProperty$1(this,"_getDeviceId",(function(){var e=t._dataManager.getUserId();if(!isDefined(e)){Logger$4.debug("Controller : Device id not found in localstorage");var n=t.config.client_id;isDefined(n)&&""!==n?(Logger$4.debug("Controller : client id from clientconfig is the deviceid"),e=n):(Logger$4.debug("Controller : Generated a new device id. This is a new device now"),e=uuid()),t._setNewUserFlags(e)}return Logger$4.debug("Controller : Device id is ".concat(e)),t._deviceId=e,e})),_defineProperty$1(this,"_setNewUserFlags",(function(e){t._dataManager.clearStorage(),t._dataManager.persistUserId(e),t._dataManager.persistInstallationTime(Date.now()),t._sessionInfo=_objectSpread2$1(_objectSpread2$1({},t._sessionInfo),{},{is_first_session:!0}),t._isFirstSession=!0})),_defineProperty$1(this,"_setInitialSessionState",(function(){Logger$4.debug("Controller : Setting the session state for session if ".concat(t.sessionId)),t.sessionId||(t.newSession=!0,t.sessionId=uuid(),t.persistToStorage(APX_SESSION_ID,t.sessionId),t.persistToStorage(APX_SESSION_START_TIME,t.sessionStartTime))})),_defineProperty$1(this,"_setDeviceInfo",(function(){var e=getDeviceInfo(t.window),n=e.device,i=e.os,o=e.browser_version,a=e.browser,r=e.dimensions,s=e.dpi,c=e.dimensions_in_pixels;t._deviceInfo=makeDeviceInfo(t._deviceId,n,r,i,s,c,a,o)})),_defineProperty$1(this,"_setDefaultUserProperties",(function(){Logger$4.debug("Controller : Setting the default User attributes");var e=_objectSpread2$1({},t._deviceInfo),n=getDefaultUserProperties(t.window,e);t._userAttributes=_objectSpread2$1(_objectSpread2$1({},t._userAttributes),n)})),_defineProperty$1(this,"_setDefaultSessionProperties",(function(){Logger$4.debug("Controller : Setting the default session attributes");var e=getDefaultSessionProperties(t.window);t._sessionAttributes=_objectSpread2$1(_objectSpread2$1({},t._sessionAttributes),e)})),_defineProperty$1(this,"_mergeStoredAndDefaultUserAttributes",(function(){Logger$4.debug("Controller : Merging the stored and default user attributes");var e=t.getFromStorage(APX_USER_ATTR_KEY,!0);if(isDefined(e)){var n,i=getJSONOrNull(e);if(null===i)try{i=JSON.parse(decode(t.siteId,e))}catch(e){i={}}t._userAttributes=_objectSpread2$1(_objectSpread2$1({},null!==(n=i)&&void 0!==n?n:{}),t._userAttributes)}})),_defineProperty$1(this,"_getStoredListOfEventsLogged",(function(){var e=t.getFromStorage(APX_EVENTS_LOGGED,!0);if(isDefined(e)){var n,i=getJSONOrNull(e);if(null===i)try{i=JSON.parse(decode(t.siteId,e))}catch(e){i={}}t._eventsLogged=_objectSpread2$1({},null!==(n=i)&&void 0!==n?n:{})}})),_defineProperty$1(this,"_reinitialiseChunkDetails",(function(){t._chunkDetails=_objectSpread2$1(_objectSpread2$1({},DEFAULT_CHUNK_DETAILS),{},{user_attributes:_objectSpread2$1({},t._userAttributes),session_attributes:_objectSpread2$1({},t._sessionAttributes)}),t._dataManager.persistOldChunkDetails(t._chunkDetails)})),_defineProperty$1(this,"sendOldChunk",(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(){};Logger$4.debug("Controller : Sending the old chunk to the server");var n=t._dataManager.getOldChunk();if(isDefined(n)){var i,o,a,r,s,c,l=_objectSpread2$1({},t._chunkDetails);if(t._chunkDetails=_objectSpread2$1({},n.chunk_details)||{},(null===(i=t._chunkDetails)||void 0===i||null===(i=i.app_events)||void 0===i?void 0:i.length)>0||t._addAndClearUnsentEvents(),!((null===(o=t._chunkDetails)||void 0===o||null===(o=o.app_events)||void 0===o?void 0:o.length)>0))return t._chunkDetails=_objectSpread2$1({},l),void e();var d=null!==(a=null===(r=n=_objectSpread2$1(_objectSpread2$1({},n),{},{chunk_details:_objectSpread2$1({},t._chunkDetails)}))||void 0===r||null===(r=r.session_info)||void 0===r?void 0:r.id)&&void 0!==a?a:"1",p=null!==(s=null===(c=n)||void 0===c||null===(c=c.chunk_meta)||void 0===c?void 0:c.number)&&void 0!==s?s:1;t._dataManager.persistCurrentChunk(n),t._api.postChunk(n,(function(){t._updateChunkNumberMap(d,p+1),Logger$4.debug("Controller : Old chunk reporting successful."),t._dataManager.removeOldChunk(),t._dataManager.removeOldChunkDetails(),t._reinitialiseChunkDetails(),t.createNewChunkAndPersist(),e()}),(function(){Logger$4.debug("Controller : Old chunk reporting failed."),e()}))}else e()})),_defineProperty$1(this,"_addAndClearUnsentEvents",(function(){var e=t._dataManager.getOldChunkDetails();if(isDefined(e)){var n=e.app_events,i=e.navigation_events,o=e.system_events,a=e.user_events;t._chunkDetails.app_events=[].concat(_toConsumableArray(t._chunkDetails.app_events||[]),_toConsumableArray(n)),t._chunkDetails.navigation_events=[].concat(_toConsumableArray(t._chunkDetails.navigation_events||[]),_toConsumableArray(i)),t._chunkDetails.system_events=[].concat(_toConsumableArray(t._chunkDetails.system_events||[]),_toConsumableArray(o)),t._chunkDetails.user_events=[].concat(_toConsumableArray(t._chunkDetails.user_events||[]),_toConsumableArray(a)),t._dataManager.removeOldChunkDetails()}})),_defineProperty$1(this,"_updateChunkNumberMap",(function(e,n){var i=t._dataManager.getSessionsChunkNumberMap();i[e]=n,t._dataManager.persistSessionsChunkNumberMap(i),t._chunkNumber=n})),_defineProperty$1(this,"createNewChunkAndPersist",(function(){var e=t.createANewChunk();return t._dataManager.persistCurrentChunk(e),e})),_defineProperty$1(this,"createANewChunk",(function(){var e=isDefined(t.config.name)?t.config.name:"",n=isDefined(t.config.domain)?t.config.domain:"",i=t._dataManager.getNewChunk(t.startTime,t.sessionStartTime,t.sessionId,t._idleTimeout),o=i.chunk,a=o.session_info,r=o.app_info,s=o.sdk_info,c=o.chunk_details,l=o.chunk_meta,d=c.session_attributes,p=c.user_attributes;return t._sessionInfo=_objectSpread2$1(_objectSpread2$1({},t._sessionInfo),a),t._sessionInfo.is_first_session=t._isFirstSession,t._sdkInfo=s,t._appInfo=_objectSpread2$1(_objectSpread2$1({},r),{},{app_name:e,bundle_id:n,app_version:""+t.version}),t._chunkNumber=l.number,t._userAttributes=_objectSpread2$1(_objectSpread2$1({},t._userAttributes),p),t._sessionAttributes=_objectSpread2$1(_objectSpread2$1({},t._sessionAttributes),d),t._chunkDetails=c,t._addAndClearUnsentEvents(),t.newSession=i.is_new_session,t.newSession||t._setSessionIdFromChunk(o),{sdk_info:t._sdkInfo,session_info:t._sessionInfo,app_info:t._appInfo,device_info:t._deviceInfo,chunk_details:c,chunk_meta:l}})),_defineProperty$1(this,"_setSessionIdFromChunk",(function(e){var n=e.session_info.id;n&&(t.sessionId=n,t.persistToStorage(APX_SESSION_ID,t.sessionId))})),_defineProperty$1(this,"_getTotalBackgroundTime",(function(){var e=t._sessionInfo,n=e.total_duration,i=e.duration;return n>i?n-i:0})),_defineProperty$1(this,"_downloadConfig",(function(e){if(Logger$4.debug("Controller : Fetch a new config"),t._canFetchConfig(e)){var n=t.config.sct_time,i=t._dataManager.getItemOrDefault(APX_LAST_CONFIG_TIME,-1);if(n>0&&i>0)if(Math.abs(Date.now()-i)<n)return void Logger$4.debug("Controller : No need to fetch config. Did not pass the throttle time");t.persistToStorage(APX_LAST_CONFIG_TIME,Date.now()),t._api.getConfig((function(e){var n;Logger$4.debug("Controller : New config fetched"),t._dataManager.persistConfig(e),t.persistToStorage(APX_CONFIG_HASH,null!==(n=e.hash)&&void 0!==n?n:md5(e)),t._mergeConfigWithClientConfig(e),t._updateAppInfo()}),(function(e){0!==e&&Logger$4.error("Controller : Failed to fetch config")}))}else Logger$4.debug("Controller : No need to fetch config. No change in hash")})),_defineProperty$1(this,"_postUserInfo",(function(){Logger$4.debug("Controller : Posting user info");var e=t._sdkInfo.sdk_version,n={sdk_version:JSON.stringify(e),app_info:t._appInfo,device_info:t._deviceInfo,user_attributes:t._userAttributes},i=md5(n),o=t._dataManager.getItemOrDefault(APX_USER_INFO_HASH,"");i!==o?t._api.postUserInfo(n,(function(){Logger$4.debug("Controller : Posted user info. Persisting the hash to localstorage"),t.persistToStorage(APX_USER_INFO_HASH,i)})):Logger$4.debug("Controller : No need to post user info. No change in it")})),_defineProperty$1(this,"_canFetchConfig",(function(e){return""===e||t._dataManager.getItemOrDefault(APX_CONFIG_HASH,"")!==e})),_defineProperty$1(this,"_dispatchSystemEvent",(function(e){Logger$4.debug("Controller : Dispatching SYSTEM_EVENT");var n=makeSystemEvent(e,t.getTimeElapsedInSession());t.dispatchEvent(SYSTEM_EVENT,n)})),_defineProperty$1(this,"_resetCampaignSessionFrequency",(function(){Logger$4.debug("Controller : Resetting the session frequncy of all the campaigns to 0");var e={};try{var n=t.getFromStorage(QE_STATE);isDefined(n)&&(e=JSON.parse(decode(t.siteId,n))),Object.entries(e).forEach((function(t){var n=_slicedToArray$1(t,1)[0];return e[n].SESSION=0}))}catch(t){e={},Logger$4.error("Controller : Can't reset campaign limits:".concat(t))}t.persistToStorage(QE_STATE,e,!0),t.window.ApxorRTM.resetFrequencyCounts()})),_defineProperty$1(this,"_registerSystemEventMonitor",(function(){Logger$4.debug("Registering a handler for the system events"),executeIfDOMReady(t.window,(function(){t._isEventMonitorRegistered||(t._executeBeforeUnload(),t._systemEventMonitor=new SystemEventMonitor(!1),t._isEventMonitorRegistered=!0)}))})),_defineProperty$1(this,"_executeBeforeUnload",(function(){var e=!1;executeBeforeUnload(window,(function(){(Logger$4.debug("Controller : Executing before unload"),e)||t._isRunning&&(e=!0,window.document.visibilityState===VISIBLE&&(t._endNavigation(!0),t._dispatchSystemEvent("hidden")),clearInterval(t._sendChunkOnEventsId),clearInterval(t._sendChunkOnETAId),t._bulkUpload&&t._dataManager.persistOldChunkDetails(t._chunkDetails),t._systemEventMonitor.unregisterEvents())}))})),_defineProperty$1(this,"_registerIntervalBasedChunkReporting",(function(){Logger$4.debug("Controller : Registering the handlers for chunk reporting"),clearInterval(t._sendChunkOnETAId),t._sendChunkOnETAId=setInterval((function(){t._sendChunkWithAtleastOneEvent()}),t._internalChunkSendInterval),t._batchEvents&&(clearInterval(t._sendChunkOnEventsId),t._sendChunkOnEventsId=setInterval((function(){t._sendChunkWithMaxedOutEvents()}),t._chunkSendInterval))})),_defineProperty$1(this,"_sendChunkWithAtleastOneEvent",(function(){var e=t._chunkDetails,n=e.app_events,i=e.navigation_events;n.length+i.length>0&&!t._blockChunkReporting&&t._prepareAndReportChunk()})),_defineProperty$1(this,"_sendChunkWithMaxedOutEvents",(function(){var e=t._chunkDetails,n=e.app_events,i=e.navigation_events,o=n.length+i.length;(!t._bulkUpload&&o>0||t._bulkUpload&&o>=t._maxEventsSentCount)&&t._prepareAndReportChunk()})),_defineProperty$1(this,"_prepareAndReportChunk",(function(){Logger$4.debug("Controller : Preparing and reporting chunk");var e=t._prepareChunk(t._chunkDetails);t._reportChunk(e,!1)})),_defineProperty$1(this,"_prepareChunk",(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Logger$4.debug("Controller : Preparing chunk"),t._updateDuration();var n={id:t.sessionId+":"+t._chunkNumber,number:t._chunkNumber,reporting_times:[Date.now()]};return e=_objectSpread2$1(_objectSpread2$1({},e),{},{user_attributes:t._userAttributes,session_attributes:t._sessionAttributes}),{sdk_info:t._sdkInfo,session_info:t._sessionInfo,app_info:t._appInfo,device_info:t._deviceInfo,chunk_meta:n,chunk_details:e}})),_defineProperty$1(this,"_updateDuration",(function(){Logger$4.debug("Controller : Updating the foreground time");var e=t.getSDKRunningTimeInSec(),n=e;e-=t._sessionHandler.getTotalBackgroundTime(),t._sessionInfo=_objectSpread2$1(_objectSpread2$1({},t._sessionInfo),{},{duration:toDecimalPoints(e),total_duration:toDecimalPoints(n)})})),_defineProperty$1(this,"_reportChunk",(function(e){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(){};if(Logger$4.debug("Controller : Reporting chunk"),t._isSending)t._pendingChunk=!0;else if(t._isSending||t._chunk502RetryTime>0&&-1!==t._last502Time&&Date.now()-t._last502Time<t._chunk502RetryTime)t._reinitialiseChunkDetails();else{var o=e.chunk_details,a=o.app_events,r=o.system_events,s=o.navigation_events,c=o.user_events;if(a.length<1&&r.length<1&&s.length<1&&c.length<1)return Logger$4.debug("Controller : Chunk not sent. No events in the chunk"),t._isSending=!1,void i();t._isSending=!0,t._updateChunkNumberMap(t._sessionInfo.id,t._chunkNumber+1),t._dataManager.removeOldChunkDetails(),t._dataManager.removeOldChunk(),t._reinitialiseChunkDetails(),n?(t._isSending=!1,t._dataManager.persistOldChunk(e),i()):(t._dataManager.persistCurrentChunk(e),t._api.postChunk(e,(function(){if(Logger$4.debug("Controller : Chunk successfully sent"),t._isSending=!1,t._last502Time=-1,i(),t._pendingChunk){t._pendingChunk=!1;var e=t._prepareChunk(t._chunkDetails);t._reportChunk(e)}}),(function(n){Logger$4.debug("Controller : Chunk sending failed"),0!==n&&(t._isSending=!1,n>=500&&(t._last502Time=Date.now()),413!==n&&417!==n&&t._dataManager.persistOldChunk(e),i())})))}})),_defineProperty$1(this,"setUserId",(function(e){t._isInitialized?t._isRunning?isUndefined(e)||(Logger$4.debug("Controller : User id set"),t.setUserProperties({custom_user_id:e})):Logger$4.warn("Apxor SDK is not running"):DefaultController.setUserId()})),_defineProperty$1(this,"setUserProperties",(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n={};if(t._isInitialized)if(t._isRunning){if(Object.keys(e).length>0){if(n=getFlatMapDiff(e,t._userAttributes),t.isTestDevice()&&Object.keys(n).length>0){var i=Object.keys(n);i.forEach((function(e){t.logAppEvent("apx_property_updated",{apx_property_type:"user",apx_property_name:e,apx_property_old_value:t._userAttributes[e]||"",apx_property_updated_value:n[e]})}))}t._userAttributes=_objectSpread2$1(_objectSpread2$1({},t._userAttributes),e);try{Logger$4.debug("Controller : User properties set"),t.persistToStorage(APX_USER_ATTR_KEY,encode(t.siteId,JSON.stringify(t._userAttributes)))}catch(e){Logger$4.debug("Controller : Error while setting the use properties ".concat(e))}}}else Logger$4.warn("Apxor SDK is not running");else DefaultController.setUserProperties()})),_defineProperty$1(this,"setSessionProperties",(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n={};if(t._isInitialized)if(t._isRunning){if(Object.keys(e).length>0){if(Logger$4.debug("Controller : Session properties set"),n=getFlatMapDiff(e,t._sessionAttributes),t.isTestDevice()&&Object.keys(n).length>0){var i=Object.keys(n);i.forEach((function(e){t.logAppEvent("apx_property_updated",{apx_property_type:"session",apx_property_name:e,apx_property_old_value:t._sessionAttributes[e]||"",apx_property_updated_value:n[e]})}))}t._sessionAttributes=_objectSpread2$1(_objectSpread2$1({},t._sessionAttributes),e)}}else Logger$4.warn("Apxor SDK is not running");else DefaultController.setSessionProperties()})),_defineProperty$1(this,"setAppVersion",(function(e){t._isInitialized?t._isRunning?t.version=e:Logger$4.warn("Apxor SDK is not running"):DefaultController.setAppVersion()})),_defineProperty$1(this,"_updateAppInfo",(function(){Logger$4.debug("Controller : Updating the App info");var e=t.config,n=e.name,i=void 0===n?"":n,o=e.domain,a=void 0===o?t.window.location.host:o,r=t._dataManager.getInstallationTime(t.startTime),s=getAppMode(t.window),c=isDefined(t.clientConfig.version)?""+t.clientConfig.version:t._dataManager.getAppVersion(),l=i;""===i&&"Unknown"===(l=getPageTitle(t.window))&&(l=""),t._appInfo=makeAppInfo(l,a,r,s,c)})),_defineProperty$1(this,"getEventCount",(function(e){var n=-1;return t.clientEvents.forEach((function(t){t.name===e&&(n+=1)})),-1===n?t._sync.getEventCount(e):n})),_defineProperty$1(this,"clearNavigation",(function(){t._endNavigation(),t._currentNavigation=null})),_defineProperty$1(this,"_endNavigation",(function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];Logger$4.debug("Controller : Ending the navigation"),isDefined(t._currentNavigation)&&(t._currentNavigation.duration=toDecimalPoints(t.getSDKRunningTimeInSec()-t._currentNavigation.transition_time),t.dispatchEvent(NAVIGATION_EVENT,_objectSpread2$1({},t._currentNavigation),e))})),_defineProperty$1(this,"getSessionId",(function(){return t.sessionId})),_defineProperty$1(this,"getDeviceId",(function(){return t._isInitialized?t._isRunning?t._deviceId:(Logger$4.warn("Controller : Apxor SDK is not running"),null):(DefaultController.getClientId(),null)})),_defineProperty$1(this,"reportChunkOnVisibilityChange",(function(){var e;if(t._isInitialized){var n=t._prepareChunk(t._chunkDetails),i=t.siteId,o=JSON.stringify(n);(null===(e=t._chunkDetails)||void 0===e?void 0:e.app_events.length)>0&&(Logger$4.debug("Reporting a chunk on visibility change with sendBeacon"),t._dataManager.removeOldChunkDetails(),t._dataManager.persistOldChunk(n),navigator.sendBeacon("https://server.apxor.com/v2/api/".concat(i,"/text-chunks?appId=").concat(i,"&isTestDevice=").concat(t.isTestDevice()),o))}})),_defineProperty$1(this,"_incrementLtCount",(function(e){if(isNotDefined(t._ltCountObj[e])&&0!==t._ltCountObj[e])t._ltCountObj[e]=0;else{var n=t._ltCountObj[e];n+=1,t._ltCountObj[e]=n}var i=encode(t.siteId,arrayBufferToString((new TextEncoder).encode(JSON.stringify(t._ltCountObj))));t.persistToStorage(APX_LT_COUNT,i)})),_defineProperty$1(this,"logAppEvent",(function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2?arguments[2]:void 0,o=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(!t._isInitialized||!t._isRunning)return Logger$4.warn("Controller : Can't log App event. SDK not initialised"),void DefaultController.logAppEvent();try{if(isString(e)&&isObject(n)){var a=e.replace("'","").replace("’","");t._incrementLtCount(a);var r=t._ltCountObj[a]||0;n=_objectSpread2$1(_objectSpread2$1({},n),{},{apx_lt_count:r}),t._updateListOfEventsLogged(e,n),n=_objectSpread2$1(_objectSpread2$1({},n),{},{first_logged_time:t._eventsLogged[e].first_logged_time,latest_logged_time:t._eventsLogged[e].latest_logged_time});var s=makeEvent(e,getCleanedProperties(n),i,t.getTimeElapsedInSession()),c=APP_EVENT;if(t._stopEventsFromConfig.includes(e))return;t._clientEventsFromConfig.includes(e)&&(c=CLIENT_EVENT),Logger$4.debug("Controller : Logging event ".concat(e)),t.dispatchEvent(c,s,!1,o)}else Logger$4.debug("Controller : Invalid App Event ".concat(e))}catch(e){Logger$4.error("LT Count object parsing failed ".concat(e))}})),_defineProperty$1(this,"logClientEvent",(function(e,n){if(!t._isInitialized||!t._isRunning)return Logger$4.warn("Controller : Can't log client event. SDK not initialised"),void DefaultController.logClientEvent();var i=t._dataManager.getltCount(e);n=_objectSpread2$1(_objectSpread2$1({},n),{},{apx_lt_count:i});var o=makeEvent(e,getCleanedProperties(n),null,t.getTimeElapsedInSession()),a=CLIENT_EVENT;t._stopEventsFromConfig.includes(e)||(t._appEventsFromConfig.includes(e)&&(a=APP_EVENT),o?(Logger$4.debug("Controller : Logging client event ".concat(e)),t._updateListOfEventsLogged(e,n),t.dispatchEvent(a,o)):Logger$4.debug("Controller : Invalid client event ".concat(e)))})),_defineProperty$1(this,"logPageView",(function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t.getTimeElapsedInSession();if(!t._isInitialized||!t._isRunning)return Logger$4.warn("Controller : Can't log page event. SDK not initialised"),void DefaultController.logPageView();if("string"==typeof e&&e&&e.length>0){var i=toDecimalPoints(n),o=makeNavigationEvent(e,getPageTitle(t.window),0,i);t._sync.handleNavigationEvent(e),isDefined(t._currentNavigation)?(t._endNavigation(),t._currentNavigation=o):t._currentNavigation=o,t.logAppEvent(APX_PAGE_OPENED,{time:formatDatetime(new Date),navigation_id:e}),Logger$4.debug("logPageView: page view is logged ",e)}else Logger$4.warn("Controller : Can't log page event as pathname is empty")})),_defineProperty$1(this,"setApxorEventListener",(function(e){t._customEventListener=e})),_defineProperty$1(this,"dispatchEvent",(function(e,n){var i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],o=arguments.length>3&&void 0!==arguments[3]&&arguments[3];t.isTestDevice()&&(o=!0),Logger$4.debug("Controller : Dispatching Event ".concat(n.name)),t._dataManager.updateRetainedDayCount(Date.now());var a=!1,r=function(){var r=t._chunkDetails.app_events;switch(a&&(n.time=t.getTimeElapsedInSession()),e){case APP_EVENT:t._chunkDetails=_objectSpread2$1(_objectSpread2$1({},t._chunkDetails),{},{app_events:[].concat(r,n)});break;case CLIENT_EVENT:t.clientEvents.push(n),t.isTestDevice()&&(t._chunkDetails=_objectSpread2$1(_objectSpread2$1({},t._chunkDetails),{},{app_events:[].concat(r,n)}))}if(t._eventHandler.notifyListeners(e,n),!a&&e!==CLIENT_EVENT){t._chunkDetails=_objectSpread2$1(_objectSpread2$1({},t._chunkDetails),{},{user_attributes:_objectSpread2$1({},t._userAttributes),session_attributes:_objectSpread2$1({},t._sessionAttributes)});var s=t._prepareChunk(t._chunkDetails,e);if(t._dataManager.persistOldChunkDetails(t._chunkDetails),t._dataManager.persistOldChunk(s),!0!==o)if(t._bulkUpload){if(r.length+1<t._maxEventsSentCount)return;t._reportChunk(s,i)}else i||e!==APP_EVENT||t._batchEvents||t._reportChunk(s,i);else t._reportChunk(s,i)}},s=function(){t.persistToStorage(APX_LAST_EVENT_TIME,Date.now()),r()},c=function(){a=!0,t.startNewSession(Date.now(),s)};if(e===APP_EVENT){var l=Date.now(),d=t.getFromStorage(APX_LAST_EVENT_TIME);if(d=Number(d),isNumber(d)&&d>0&&Math.round(millisToSeconds(l-d))>t._idleTimeout?t.endSession(!0,c):(t.persistToStorage(APX_LAST_EVENT_TIME,Date.now()),r()),t._customEventListener){var p=void 0!==n.additional_info.campaign_type?n.additional_info.campaign_type:"",u=void 0!==n.additional_info.id?n.additional_info.id:"",h=void 0!==n.additional_info.apx_survey_id?n.additional_info.apx_survey_id:"";if(showEventsList.includes(n.name))t._customEventListener.onEvent("apx_campaign_show",{nudge_type:"".concat(p),nudge_id:"".concat(u),timestamp:Date.now(),device_id:t.getDeviceId(),user_id:t._dataManager.getUserId(),attributes:n.additional_info});else if(dismissEventsList.includes(n.name))t._customEventListener.onEvent("apx_campaign_dismiss",{nudge_type:"".concat(p),nudge_id:"".concat(u),timestamp:Date.now(),device_id:t.getDeviceId(),user_id:t._dataManager.getUserId(),attributes:n.additional_info});else if(actionEventsList.includes(n.name))t._customEventListener.onEvent("apx_campaign_action",{nudge_type:"".concat(p),nudge_id:"".concat(u),timestamp:Date.now(),device_id:t.getDeviceId(),user_id:t._dataManager.getUserId(),attributes:n.additional_info});else if(surveyShowEventsList.includes(n.name))t._customEventListener.onEvent("apx_survey_show",{nudge_type:"".concat(p),nudge_id:"".concat(h),timestamp:Date.now(),device_id:t.getDeviceId(),user_id:t._dataManager.getUserId(),attributes:n.additional_info});else if(surveyDismissEventsList.includes(n.name))t._customEventListener.onEvent("apx_survey_dismiss",{nudge_type:"".concat(p),nudge_id:"".concat(h),timestamp:Date.now(),device_id:t.getDeviceId(),user_id:t._dataManager.getUserId(),attributes:n.additional_info});else if(surveyActionEventsList.includes(n.name))t._customEventListener.onEvent("apx_survey_action",{nudge_type:"".concat(p),nudge_id:"".concat(h),timestamp:Date.now(),device_id:t.getDeviceId(),user_id:t._dataManager.getUserId(),attributes:n.additional_info});else{var g=/^(InLine_|InApp_)[a-zA-Z0-9]+_Clicked$/,f=/^Survey_[a-zA-Z0-9]+_Clicked$/;g.test(n.name)?t._customEventListener.onEvent("apx_campaign_action",{nudge_type:"".concat(p),nudge_id:"".concat(n.additional_info.id),timestamp:Date.now(),device_id:t.getDeviceId(),user_id:t._dataManager.getUserId(),attributes:n.additional_info}):f.test(n.name)&&t._customEventListener.onEvent("apx_survey_action",{nudge_type:"".concat(p),nudge_id:"".concat(h),timestamp:Date.now(),device_id:t.getDeviceId(),user_id:t._dataManager.getUserId(),attributes:n.additional_info})}}}else r()})),_defineProperty$1(this,"startNewSession",(function(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Date.now(),i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){},o=arguments.length>2&&void 0!==arguments[2]&&arguments[2];t._isInitialized||o?(t._isRunning||(t.sessionId=uuid(),Logger$4.debug("Controller : New session started with id ".concat(t.sessionId)),t.persistToStorage(APX_SESSION_ID,t.sessionId),t._sessionCount=null!==(e=t.getFromStorage(REATINED_SESSIONS))&&void 0!==e?e:0,t._sessionCount=Number(t._sessionCount)+1,t.persistToStorage(REATINED_SESSIONS,t._sessionCount),t.sessionStartTime=n,t.persistToStorage(APX_SESSION_START_TIME,t.sessionStartTime),t._sessionHandler.reset(),t.createNewChunkAndPersist(),t._systemEventMonitor=new SystemEventMonitor(t.config),t._isRunning=!0,t._resetCampaignSessionFrequency()),i()):DefaultController.startSession()})),_defineProperty$1(this,"endSession",(function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){};if(t._isInitialized)if(t._isRunning){e||t._endNavigation();var i=_objectSpread2$1(_objectSpread2$1({},t._chunkDetails),{},{user_attributes:_objectSpread2$1({},t._userAttributes),session_attributes:_objectSpread2$1({},t._sessionAttributes)}),o=t._prepareChunk(i);t._dataManager.removeOldChunkDetails();var a=function(){t._dataManager.clearCurrentChunk(),t._sessionHandler.reset(),isDefined(t._systemEventMonitor)&&t._isEventMonitorRegistered&&t._systemEventMonitor.unregisterEvents(),unregisterBeforeUnloadCallback(document),t._isRunning=!1,n(),Logger$4.debug("Controller : Current session ended")};t._chunk502RetryTime>0&&t._last502Time>0?(t._dataManager.persistOldChunk(o),a()):t._reportChunk(o,!1,a)}else Logger$4.warn("Apxor SDK is not running. Please make sure to call 'startSession'");else DefaultController.endSession()})),_defineProperty$1(this,"resetUserProperties",(function(){t._dataManager.resetUserProperties();var e=getDefaultUserProperties(t.window,t.getDevInfo());t._userAttributes={},t.setUserProperties(e)})),_defineProperty$1(this,"resetSessionProperties",(function(){var e=getDefaultSessionProperties(t.window);t._sessionAttributes={},t.setSessionProperties(e)})),_defineProperty$1(this,"persistToStorage",(function(e,n){var i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],o=n;i&&isObject(o)&&(o=encode(t.siteId,JSON.stringify(o))),t._dataManager.persist(e,o)})),_defineProperty$1(this,"getFromStorage",(function(e){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return t._dataManager.getItem(e,n)})),_defineProperty$1(this,"getValueOrDefault",(function(e,n){var i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return t._dataManager.getItemOrDefault(e,n,i)})),_defineProperty$1(this,"getSessionInfo",(function(){return t._sessionInfo})),_defineProperty$1(this,"getUserAttributes",(function(){return t._userAttributes})),_defineProperty$1(this,"getSessionAttributes",(function(){return t._sessionAttributes})),_defineProperty$1(this,"makeGetRequest",(function(e,n,i){t._api.makeGetRequest(e,n,i)})),_defineProperty$1(this,"fetchConfiguration",(function(e,n,i,o){t._sync.fetchConfiguration(e,n,i,o)})),_defineProperty$1(this,"flattenJSON",(function(e){return getCleanedProperties(e,2)})),_defineProperty$1(this,"registerForEvent",(function(e,n){t._eventHandler.registerForEvent(e,n)})),_defineProperty$1(this,"unregisterFromEvent",(function(e,n){t._eventHandler.unregisterFromEvent(e,n)})),_defineProperty$1(this,"getSDKRunningTimeInSec",(function(){return millisToSeconds(Date.now()-t.startTime)})),_defineProperty$1(this,"getTimeElapsedInSession",(function(){var e=Date.now();return Logger$4.debug("Controller : Time elapsed in session is ".concat((e-t.sessionStartTime)/1e3,"sec")),millisToSeconds(e-t.sessionStartTime)})),_defineProperty$1(this,"setBlockChunkReportingFlag",(function(e){t._blockChunkReporting=e})),_defineProperty$1(this,"isTestDevice",(function(){try{var e=t.getFromStorage("_apx_td",!0);return!(!isDefined(e)||!isDefined(e.id))}catch(e){return!1}})),_defineProperty$1(this,"persistTerminationInfoLocally",(function(e){var n;null===t.getFromStorage(APX_TERMINATION_ID)&&t.persistToStorage(APX_TERMINATION_ID,JSON.stringify({}));var i=JSON.parse(t.getFromStorage(APX_TERMINATION_ID));i[e]||(i[e]={startDate:"",_startTime:"",goalAcheived:!1}),null!==(n=i[e])&&void 0!==n&&n.goalAcheived||(i[e].goalAcheived=!0),t.persistToStorage(APX_TERMINATION_ID,JSON.stringify(i))})),_defineProperty$1(this,"persistStartDateInfoLocally",(function(e){var n,i;null===t.getFromStorage(APX_TERMINATION_ID)&&t.persistToStorage(APX_TERMINATION_ID,JSON.stringify({}));var o=JSON.parse(t.getFromStorage(APX_TERMINATION_ID));o[e]||(o[e]={startDate:getDateInMMDDYYYY(),_startTime:_getTime(),goalAcheived:!1}),""===!(null!==(n=o[e])&&void 0!==n&&n.startDate)&&(o[e].startDate=getDateInMMDDYYYY()),""===!(null!==(i=o[e])&&void 0!==i&&i._startTime)&&(o[e]._startTime=_getTime()),t.persistToStorage(APX_TERMINATION_ID,JSON.stringify(o))})),_defineProperty$1(this,"isBadgeTriggerSatisfied",(function(e){var n,i;if(null===t.getFromStorage(APX_TERMINATION_ID))return!1;var o=JSON.parse(t.getFromStorage(APX_TERMINATION_ID));return!!o[e]&&(""!==!(null!==(n=o[e])&&void 0!==n&&n.startDate)||""!==!(null!==(i=o[e])&&void 0!==i&&i._startTime)||void 0)})),_defineProperty$1(this,"clearLocalStorage",(function(){for(var e=localStorage.length-1;e>=0;e--){var t=localStorage.key(e);apxorKeys.includes(t)||localStorage.removeItem(t)}})),e.instance||(e.instance=this),e.instance}return _createClass$1(e,null,[{key:"getInstance",value:function(){return e.instance||(e.instance=new e),e.instance}}]),e}();_defineProperty$1(Controller,"instance",void 0);var isUndefined=function(e){return void 0===e},isNull=function(e){return null===e},isDefined=function(e){return void 0!==e&&!isNull(e)},isNotDefined=function(e){return!isDefined(e)},isFunction=function(e){return"function"==typeof e},isString=function(e){return"string"==typeof e},isBoolean=function(e){return"boolean"==typeof e},isNumber=function(e){return isDefined(e)&&!isNull(e)&&!isNaN(e)},executeIfDOMReady=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;if(null!=t&&isFunction(t)){var n=e.document;"loading"!==n.readyState?t():isFunction(n.addEventListener)?n.addEventListener("DOMContentLoaded",t):isFunction(e.attachEvent)&&e.attachEvent("onreadystatechange",(function(e){"loading"!==n.readyState&&t(e)}))}},executeBeforeUnload=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){return null};isFunction(t)&&(e.addEventListener("pagehide",(function(e){return t(e),""})),e.addEventListener("beforeunload",(function(e){return t(e),""})),e.addEventListener("onunload",(function(e){return t(e),""})))},unregisterBeforeUnloadCallback=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){return null};isFunction(t)&&(e.removeEventListener("pagehide",t),e.removeEventListener("beforeunload",t),e.removeEventListener("onunload",t))},registerForEvent=function(e,t,n){var i=arguments.length>3&&void 0!==arguments[3]&&arguments[3];isFunction(e.addEventListener)?e.addEventListener(t,n,i):isFunction(e.attachEvent)?e.attachEvent(t,n):e[ON_KEY+t]=n},checkForNeverShow=function(e){var t=Controller.getInstance(),n=JSON.parse(t.getFromStorage("_apx_never_show_ids"));return!(isNull(n)||!Array.isArray(n))&&!!n.includes(e)},removeLastPartOfId=function(e){return e.includes("-testing")?e.substring(0,e.length-8)+"-1":e+"-1"},deregisterFromEvent=function(e,t,n){isFunction(e.removeEventListener)?e.removeEventListener(t,n):isFunction(e.detachEvent)?e.detachEvent(t,n):e[ON_KEY+t]=n},formatDatetime=function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=function(e){return e<10?"0"+e:e},i=e.getFullYear()+"-"+n(e.getMonth()+1)+"-"+n(e.getDate())+"T"+n(e.getHours())+":"+n(e.getMinutes())+":"+n(e.getSeconds());return t?i+e.toTimeString().split(" ")[1].replace(/GMT([+|-])(\d{2})(\d{2})/,"$1$2:$3"):i},getNow=function(){return Date.now()},uuid=function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return t?(t^16*Math.random()>>t/4).toString(16):([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,e)},getDevice=function(){var e=window.navigator,t=(void 0===e?{}:e).userAgent,n=void 0===t?"":t;switch(!0){case/Windows Phone/i.test(n)||/WPDesktop/.test(n):return"Windows Phone";case/iPad/.test(n):return"iPad";case/iPod/.test(n):return"iPod Touch";case/iPhone/.test(n):return"iPhone";case/(BlackBerry|PlayBook|BB10)/i.test(n):return"BlackBerry";case/Android/.test(n):return"Android";default:return"Desktop"}},getDeviceInfo=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.navigator,n=void 0===t?{}:t,i=n.userAgent,o=void 0===i?"":i,a=n.vendor,r=void 0===a?"":a,s=BROWSERS.OperaMini,c=BROWSERS.Opera,l=BROWSERS.BlackBerry,d=BROWSERS.IEMobile,p=BROWSERS.Edge,u=BROWSERS.FB,h=BROWSERS.Chrome,g=BROWSERS.ChromeIOS,f=BROWSERS.UC,m=BROWSERS.FirefoxIOS,_=BROWSERS.SafariMobile,v=BROWSERS.Safari,b=BROWSERS.AndroidMobile,y=BROWSERS.Konqueror,x=BROWSERS.Firefox,w=BROWSERS.IE,C=BROWSERS.Mozilla,E=BROWSERS.Brave,k=function(){var e;if(null!==(e=navigator)&&void 0!==e&&e.brave)return E;switch(!0){case o.includes(" OPR/"):return o.includes("Mini")?s:c;case/(BlackBerry|PlayBook|BB10)/i.test(o):return l;case o.includes("IEMobile")||o.includes("WPDesktop"):return d;case o.includes("FBIOS"):return u;case o.includes("Chrome"):return h;case o.includes("CriOS"):return g;case o.includes("Edge"):return p;case o.includes("UCWEB")||o.includes("UCBrowser"):return f;case o.includes("FxiOS"):return m;case r.includes("Apple"):return o.includes("Mobile")?_:v;case o.includes("Android"):return b;case o.includes("Konqueror"):return y;case o.includes("Firefox"):return x;case o.includes("MSIE")||o.includes("Trident/"):return w;case o.includes("Gecko"):return C;default:return""}},S=k(),T=function(){var e,t=(e={},_defineProperty$1(e,d,/rv:(\d+(\.\d+)?)/),_defineProperty$1(e,p,/Edge\/(\d+(\.\d+)?)/),_defineProperty$1(e,h,/Chrome\/(\d+(\.\d+)?)/),_defineProperty$1(e,g,/CriOS\/(\d+(\.\d+)?)/),_defineProperty$1(e,f,/(UCBrowser|UCWEB)\/(\d+(\.\d+)?)/),_defineProperty$1(e,v,/Version\/(\d+(\.\d+)?)/),_defineProperty$1(e,_,/Version\/(\d+(\.\d+)?)/),_defineProperty$1(e,c,/(Opera|OPR)\/(\d+(\.\d+)?)/),_defineProperty$1(e,x,/Firefox\/(\d+(\.\d+)?)/),_defineProperty$1(e,m,/FxiOS\/(\d+(\.\d+)?)/),_defineProperty$1(e,y,/Konqueror:(\d+(\.\d+)?)/),_defineProperty$1(e,l,/BlackBerry (\d+(\.\d+)?)/),_defineProperty$1(e,b,/android\s(\d+(\.\d+)?)/),_defineProperty$1(e,w,/(rv:|MSIE )(\d+(\.\d+)?)/),_defineProperty$1(e,C,/rv:(\d+(\.\d+)?)/),e)[S];if(void 0===t)return null;var n=o.match(t);return n?parseFloat(n[n.length-2]):null},A=function(){switch(!0){case/Windows/i.test(o):return/Phone/.test(o)||/WPDesktop/.test(o)?"Windows Phone":"Windows";case/(iPhone|iPad|iPod)/.test(o):return"iOS";case/Android/.test(o):return"Android";case/(BlackBerry|PlayBook|BB10)/i.test(o):return"BlackBerry";case/Mac/i.test(o):return"Mac OS X";case/Linux/.test(o):return"Linux";case/CrOS/.test(o):return"Chrome OS";default:return""}},I=function(){var t=e.screen,n=void 0===t?{width:0,height:0}:t,i=n.height,o=n.width,a=e.devicePixelRatio,r=void 0===a?1:a,s=function(e){var t=Math.round(e)*r,n=t%10;return t+(n>0?10:0)-n};return{dimensions:{width:o,height:i},dimensions_in_pixels:{width:s(o),height:s(i)},dpi:r.toString()}},P=T(),O=getDevice(),L=A();return _objectSpread2$1(_objectSpread2$1({},I()),{},{device:O,browser_version:P,browser:S,os:L})},getDefaultUserProperties=function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=t.navigator,o=void 0===i?{}:i,a=o.language,r=n.browser_version,s=n.browser,c=Cookie.isCookieAvailable();return _defineProperty$1(e={},APX_PREFIX+"browser",s),_defineProperty$1(e,APX_PREFIX+"browser_version",s+"_"+r),_defineProperty$1(e,APX_PREFIX+"language",a),_defineProperty$1(e,APX_PREFIX+"cookies_supported",c),e},getDefaultSessionProperties=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.navigator,n=void 0===t?{}:t,i=n.connection,o=void 0===i?{}:i,a=o.effectiveType,r=o.saveData,s=n.platform,c=n.webdriver,l=e.document.referrer,d={};a&&(d[APX_PREFIX+NETWORK_KEY]=a),r&&(d[APX_PREFIX+DATA_SAVE_MODE_KEY]=r),s&&(d[APX_PREFIX+PLATFORM_KEY]=s),isDefined(c)&&c&&(d[APX_PREFIX+AUTOMATION_KEY]=c),isDefined(l)&&l.length>0?d[APX_PREFIX+REFERRER_KEY]=l:d[APX_PREFIX+REFERRER_KEY]="direct";var p=getDevice();return d[APX_PREFIX+DEVICE_TYPE]=p,d},getPageTitle=function(e){var t=e.document.querySelector("title");return isDefined(t)&&isDefined(t.innerText)?t.innerText:"Unknown"},millisToSeconds=function(e){return isNumber(e)?toDecimalPoints(e/1e3):e},toDecimalPoints=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:3;if(!isNumber(e)||!isNumber(t))return e;if(t%1!=0)return e;var n=Math.pow(10,t);return Math.round(e*n)/n},FILE_PROTOCOL="file:",LOCALHOST="localhost",APP_MODE_PRODUCTION="production",APP_MODE_DEV="development",getAppMode=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.location,n=void 0===t?{}:t,i=n.protocol,o=n.host,a=n.hostName;return i===FILE_PROTOCOL||o===LOCALHOST||"0.0.0.0"===a||"127.0.0.1"===a?APP_MODE_DEV:APP_MODE_PRODUCTION},isObject=function(e){return e instanceof Object},getCleanedProperties=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;if(isObject(e)){var n={};return Object.keys(_objectSpread2$1({},e)).forEach((function(i){var o=e[i],a=i;isString(i)||(a=JSON.stringify(i)),isBoolean(o)||isNumber(o)?insertProperty(n,a,o):isString(o)?n[a]=trimText(o):Array.isArray(o)?handleJSONArray(n,a,o,t):isObject(o)&&handleJSONObject(n,i,o,t-1)})),n}return{}},handleJSONArray=function(e,t,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1;if(i<=0)insertProperty(e,t,JSON.stringify(n));else if(Array.isArray(n)){var o=n;if(o.length>0){var a="";isBoolean(o[0])?a="b":isString(o[0])?a="s":isNumber(o[0])?a="n":Array.isArray(o[0])?a="a":isObject(o[0])&&(a="o");var r=o.length;if(""===a)return void insertProperty(e,t,JSON.stringify(n));for(var s=1;s<r;s++)if("s"===a){if(!isString(o[s]))return void insertProperty(e,t,JSON.stringify(n))}else if("b"===a){if(!isBoolean(o[s]))return void insertProperty(e,t,JSON.stringify(n))}else if("n"===a){if(!isNumber(o[s]))return void insertProperty(e,t,JSON.stringify(n))}else if("a"===a){if(!Array.isArray(o[s]))return void insertProperty(e,t,JSON.stringify(n))}else if("o"===a&&!isObject(o[s]))return void insertProperty(e,t,JSON.stringify(n));if("o"===a)if(i-1<=0){for(var c=[],l=0;l<r;l++)c.push(JSON.stringify(o[l]));insertProperty(e,t,c)}else for(var d=0;d<r;d++)handleJSONObject(e,t,o[d],i-1);else if("a"===a)for(var p=0;p<r;p++)insertProperty(e,t,JSON.stringify(o[p]));else for(var u=0;u<r;u++)insertProperty(e,t,o[u])}else insertProperty(e,t,[])}},handleJSONObject=function e(t,n,i){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1;o<=0?insertProperty(t,n,JSON.stringify(i)):Object.keys(_objectSpread2$1({},i)).forEach((function(a){var r=n+"_"+a,s=i[a];isDefined(s)&&(Array.isArray(s)?handleJSONArray(t,r,s,o-1):isObject(s)?e(t,r,s,o-1):insertProperty(t,r,s))}))},insertProperty=function(e,t,n){if(isDefined(t)&&isDefined(n))if(e[t]){var i=e[t],o=i;Array.isArray(i)||((isNumber(i)&&!isNumber(n)||isBoolean(i)&&!isBoolean(n)||isString(i)&&!isString(n)||isObject(i)&&!isObject(n))&&(isString(i)||(i=JSON.stringify(i)),isString(n)||(n=JSON.stringify(n))),(o=[]).push(i)),o.push(n),e[t]=o}else e[t]=n},trimText=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:120;return isString(e)?e.length>t?e.slice(0,t)+"...":e:void 0},getJSONOrNull=function(e){if(!isDefined(e)&&!isString(e))return null;if("object"===_typeof$1(e)||isObject(e))return e;var t=e.replace(/(?:\r\n|\r|\n)/g,"").trim();try{return JSON.parse(t)}catch(e){}return null},encode=function(e,t){return isDefined(t)?b64_encode(t=xor_encrypt(e,t)):null},decode=function(e,t){return xor_decrypt(e,t=b64_decode(t))},b64_table="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",toStr,isCallable,maxSafeInteger,toLength;function b64_encode(e){var t,n,i,o,a,r,s=0,c="";if(!e)return e;do{t=(a=e[s++]<<16|e[s++]<<8|e[s++])>>18&63,n=a>>12&63,i=a>>6&63,o=63&a,c+=b64_table.charAt(t)+b64_table.charAt(n)+b64_table.charAt(i)+b64_table.charAt(o)}while(s<e.length);return((r=e.length%3)?c.slice(0,r-3):c)+"===".slice(r||3)}function b64_decode(e){var t,n,i,o,a,r,s=0,c=[];if(!e)return e;e+="";do{t=(r=b64_table.indexOf(e.charAt(s++))<<18|b64_table.indexOf(e.charAt(s++))<<12|(o=b64_table.indexOf(e.charAt(s++)))<<6|(a=b64_table.indexOf(e.charAt(s++))))>>16&255,n=r>>8&255,i=255&r,c.push(t),64!==o&&(c.push(n),64!==a&&c.push(i))}while(s<e.length);return c}function keyCharAt(e,t){return e.charCodeAt(Math.floor(t%e.length))}function xor_encrypt(e,t){return Array.from(t).map((function(t,n){return t.charCodeAt(0)^keyCharAt(e,n)}))}function xor_decrypt(e,t){return Array.from(t).map((function(t,n){return String.fromCharCode(t^keyCharAt(e,n))})).join("")}function stringToArrayBuffer(e){for(var t=new ArrayBuffer(e.length),n=new Uint8Array(t),i=0;i<e.length;i++)n[i]=e.charCodeAt(i);return t}function arrayBufferToString(e){for(var t="",n=new Uint8Array(e),i=0;i<n.length;i++)t+=String.fromCharCode(n[i]);return t}String.prototype.includes||(String.prototype.includes=function(){return-1!==String.prototype.indexOf.apply(this,arguments)}),Array.from||(Array.from=(toStr=Object.prototype.toString,isCallable=function(e){return"function"==typeof e||"[object Function]"===toStr.call(e)},maxSafeInteger=Math.pow(2,53)-1,toLength=function(e){var t=function(e){var t=Number(e);return isNaN(t)?0:0!==t&&isFinite(t)?(t>0?1:-1)*Math.floor(Math.abs(t)):t}(e);return Math.min(Math.max(t,0),maxSafeInteger)},function(e){var t=this,n=Object(e);if(null==e)throw new TypeError("Array.from requires an array-like object - not null or undefined");var i,o=arguments.length>1?arguments[1]:void 0;if(void 0!==o){if(!isCallable(o))throw new TypeError("Array.from: when provided, the second argument must be a function");arguments.length>2&&(i=arguments[2])}for(var a,r=toLength(n.length),s=isCallable(t)?Object(new t(r)):new Array(r),c=0;c<r;)a=n[c],s[c]=o?void 0===i?o(a,c):o.call(i,a,c):a,c+=1;return s.length=r,s})),Array.prototype.includes||Object.defineProperty(Array.prototype,"includes",{value:function(e,t){if(null==this)throw new TypeError('"this" is null or not defined');var n=Object(this),i=n.length>>>0;if(0===i)return!1;var o,a,r=0|t,s=Math.max(r>=0?r:i-Math.abs(r),0);for(;s<i;){if((o=n[s])===(a=e)||"number"==typeof o&&"number"==typeof a&&isNaN(o)&&isNaN(a))return!0;s++}return!1}});var getFlatMapDiff=function(e,t){var n=Object.keys(e),i={};return n.forEach((function(n){e[n]!==t[n]&&(i[n]=e[n])})),i},getDateInMMDDYYYY=function(){var e=new Date;return e.getMonth()+"/"+e.getDate()+"/"+e.getFullYear()},_getTime=function(){var e=new Date;return{hours:e.getHours(),mins:e.getMinutes()}},ensureSessionInfoKeys=function(e){var t={id:"",launch_time:0,launch_time_string:"",startup_time:0,is_background:!1,is_first_session:!1,duration:0,total_duration:0,process_name:"",is_fatal:!1,launch_type:"normal"};if(e.session_info)for(var n=0,i=Object.keys(t);n<i.length;n++){var o=i[n];o in e.session_info||(e.session_info[o]=t[o])}else e.session_info=t},_class,LEVELS=["log","debug","info","warn","error"],LEVELS_ENUM=LEVELS.reduce((function(e,t){return e[t]=t,e}),{}),getConsole=function(e){if(isUndefined(e)){var t=function(){return null};e=LEVELS.reduce((function(e,n){return e[n]=t,e}),{})}return e},Logger$4=function(){function e(){_classCallCheck$1(this,e)}return _createClass$1(e,null,[{key:"enabled",set:function(t){e._enabled=t}},{key:"level",set:function(t){e._level=t}},{key:"console",set:function(t){e._console=getConsole(t)}}]),e}();_class=Logger$4,_defineProperty$1(Logger$4,"_console",getConsole()),_defineProperty$1(Logger$4,"_enabled",!1),_defineProperty$1(Logger$4,"_level","error"),_defineProperty$1(Logger$4,"_render",(function(e){return function(){var t=LEVELS.indexOf(e)>=LEVELS.indexOf(_class._level);if(_class._enabled&&t){for(var n=arguments.length,i=new Array(n),o=0;o<n;o++)i[o]=arguments[o];_class._console[e].apply(_class._console,i)}}})),_defineProperty$1(Logger$4,"log",_class._render(LEVELS_ENUM.log)),_defineProperty$1(Logger$4,"info",_class._render(LEVELS_ENUM.info)),_defineProperty$1(Logger$4,"debug",_class._render(LEVELS_ENUM.debug)),_defineProperty$1(Logger$4,"warn",_class._render(LEVELS_ENUM.warn)),_defineProperty$1(Logger$4,"error",_class._render(LEVELS_ENUM.error));var onMouseOver=function(e){if(e.target){var t=e.target.classList,n=t.contains("apx-highlight")||-1!==t.toString().indexOf("apx-");t&&!n&&(e.target.classList.add("apx-highlight"),e.target.oldOnClick=e.target.onclick,e.target.onclick=null)}},onMouseOut=function(e){e.target&&e.target.classList&&e.target.classList.contains("apx-highlight")&&(e.target.classList.remove("apx-highlight"),e.target.onclick=e.target.oldOnClick,e.target.oldOnClick=null)},handleDocumentOnClick=function(e,t){var n=e.target;n&&n.classList.contains("apx-highlight")&&(e.preventDefault(),e.stopPropagation(),n.classList.remove("apx-highlight"),n.onclick=n.oldOnClick,n.oldOnClick=null,t&&t(n))};function dragElement(e){var t,n=window.innerHeight-8,i=8,o=window.innerWidth-8,a=8,r=0,s=0,c=0,l=0,d=document.getElementById(e.id+"-h");function p(n){n.preventDefault(),n.stopPropagation(),"touchstart"===(n=n||window.event).type?(c=n.targetTouches[0].pageX,l=n.targetTouches[0].pageY):(c=n.clientX,l=n.clientY),t=e.getBoundingClientRect(),document.addEventListener("mouseup",h),document.addEventListener("touchend",h,{passive:!1}),document.addEventListener("mousemove",u),document.addEventListener("touchmove",u,{passive:!1})}function u(d){d.preventDefault(),d.stopPropagation(),"touchmove"===(d=d||window.event).type?(r=c-d.targetTouches[0].pageX,s=l-d.targetTouches[0].pageY,c=d.targetTouches[0].pageX,l=d.targetTouches[0].pageY):(r=c-d.clientX,s=l-d.clientY,c=d.clientX,l=d.clientY);var p=e.offsetLeft-r,u=e.offsetTop-s;p<i||u<a||p+t.width>o||u+t.height>n||(e.style.top=e.offsetTop-s+"px",e.style.left=e.offsetLeft-r+"px",e.style.right="")}function h(){document.removeEventListener("mouseup",h),document.removeEventListener("touchend",h),document.removeEventListener("mousemove",u),document.removeEventListener("touchmove",u)}d?(d.addEventListener("mousedown",p),d.addEventListener("touchstart",p,{passive:!1})):(e.addEventListener("mousedown",p),e.addEventListener("touchstart",p,{passive:!1}))}function enclosePartialAttributes(e){return e.replace(/\[id\*=(.*?)\]/g,'[id*="$1"]').replace(/\[class\*=(.*?)\]/g,'[class*="$1"]')}var ON_HTML="<b>View Selection Mode: ON",OFF_HTML="<b>View Selection Mode: OFF</b>",SSE_API="https://server.apxor.com/v1/sse/",LAYOUT_URL=SSE_API+"layout?appId=<aid>&deviceId=<uid>",PREVIEW_API=SSE_API+"ui-config?appId=<aid>&deviceId=<uid>",CONFIG_API=SSE_API+"art-config?appId=<aid>&deviceId=<uid>",FRONTEND_API="https://server.apxor.com/v4/frontendapi/web/test-devices",ADD_TEST_DEVICE_API=FRONTEND_API+"?appId=<aid>",REMOVE_TEST_DEVICE_API=FRONTEND_API+"/<uid>?appId=<aid>",WYSIWYG=function(){function e(){var t=this;_classCallCheck$1(this,e),_defineProperty$1(this,"_styleNode",null),_defineProperty$1(this,"_viewPickerNode",null),_defineProperty$1(this,"_addRemoveTestDeviceDialog",null),_defineProperty$1(this,"_wysiwygRoot",null),_defineProperty$1(this,"_vid",""),_defineProperty$1(this,"_type",getDevice$1()),_defineProperty$1(this,"_heartbeatTimeout",void 0),_defineProperty$1(this,"_isShowingToastPopup",!1),_defineProperty$1(this,"_toastInApp",null),_defineProperty$1(this,"_elementSelector",void 0),_defineProperty$1(this,"_enableViewSelectionButton",null),_defineProperty$1(this,"_disableViewSelectionButton",null),_defineProperty$1(this,"_targetElement",void 0),_defineProperty$1(this,"_eventName",void 0),_defineProperty$1(this,"_eventTypeSelected",void 0),_defineProperty$1(this,"_eventPage",void 0),_defineProperty$1(this,"_defineEventPage",void 0),_defineProperty$1(this,"_sideBar",void 0),_defineProperty$1(this,"_selectedType",void 0),_defineProperty$1(this,"_selectedEventType",void 0),_defineProperty$1(this,"_dynamicUrl",void 0),_defineProperty$1(this,"_urlInEventObj",void 0),_defineProperty$1(this,"_is_dynamic",void 0),_defineProperty$1(this,"_selectorForEvent",void 0),_defineProperty$1(this,"_event_Type",void 0),_defineProperty$1(this,"_eventTypeSelectionPage",void 0),_defineProperty$1(this,"_eventDescription",void 0),_defineProperty$1(this,"_feature_field",void 0),_defineProperty$1(this,"_selector_created",void 0),_defineProperty$1(this,"_show_hide_toggleElement",null),_defineProperty$1(this,"_toggle_icon",void 0),_defineProperty$1(this,"_show_hide_toggle_text",null),_defineProperty$1(this,"_view_sideBar",null),_defineProperty$1(this,"_viewSelectorFound",void 0),_defineProperty$1(this,"_viewText",void 0),_defineProperty$1(this,"_viewSelectionTarget",void 0),_defineProperty$1(this,"_selectors_list",void 0),_defineProperty$1(this,"_selected_element_details",[]),_defineProperty$1(this,"_selector_generated",void 0),_defineProperty$1(this,"_selectorToBeSent",void 0),_defineProperty$1(this,"_is_text_based",!1),_defineProperty$1(this,"_text_type","s"),_defineProperty$1(this,"_text_op",void 0),_defineProperty$1(this,"_text_content",void 0),_defineProperty$1(this,"_selector_category",void 0),_defineProperty$1(this,"_number_op","EQ"),_defineProperty$1(this,"_content_op","contains"),_defineProperty$1(this,"_selection_mode","v1"),_defineProperty$1(this,"_dynamic_content_updated",void 0),_defineProperty$1(this,"_avf_updated_content",!1),_defineProperty$1(this,"init",(function(e,n){var i=getCookie("_apx_ewc");if(i){var o=atob(i);try{var a=Apxor.getController().getFromStorage(o,!0);if(!a)return;var r=a.app_id,s=a.expiry,c=a.volatile_id,l=a.mode,d=void 0===l?VIEW_SELECTION:l,p=a.selection_mode,u=void 0===p?"v1":p;if(console.log(a),t._vid=c,t._selection_mode=u,r===e&&Date.now()<=s){var h=document.createElement("span");if(h.style="z-index:99999999;visibility:hidden;position:fixed;top:50%;left:50%;transform:translate(-50%,-50%);padding:16px 24px;background:#252f37;border-radius:3px;opacity:0;font-size:24px;color:white;transition:all .3s ease-out",h.innerHTML=ON_HTML,t._viewPickerNode=h,document.body.appendChild(h),t._styleNode=document.createElement("style"),t._styleNode.innerHTML=".apx-highlight{height:auto;z-index:9999999999;outline: 2px solid red;cursor:crosshair}",document.body.appendChild(t._styleNode),t.isSelectionMode=!1,d===REGISTER_EVENTS)t.createNewWYSIWYG();else if(d===REGISTER_PAGES)t.createNewWYSIWYGForTrackingPages();else{if(t.testDeviceData=Apxor.getController().getFromStorage("_apx_td",!0),t.testDeviceData){var g=t.testDeviceData,f=g.name,m=void 0===f?"":f,_=g.id,v=void 0===_?"":_;""!==m&&""!==v&&(t._makeSSERequest("select","".concat(m," - ").concat(v),v),t.resetHeartbeatTimeout(),t.previewEventSource=new EventSource(PREVIEW_API.replace("<aid>",e).replace("<uid>",v)),t.artConfigEventSource=new EventSource(CONFIG_API.replace("<aid>",e).replace("<uid>",v)),t.previewEventSource.onmessage=t.artConfigEventSource.onmessage=function(e){e&&e.data&&"{}"===e.data?t.resetHeartbeatTimeout():e&&e.data&&"{}"!==e.data&&(clearTimeout(t._heartbeatTimeout),t._handleSSEResponse(n,e.data)),t._isShowingToastPopup&&t.dismissToastPopup()},t.previewEventSource.onerror=t.artConfigEventSource.onerror=function(){t.previewEventSource.readyState!==EventSource.CLOSED&&t.artConfigEventSource.readyState!==EventSource.CLOSED||(Logger$4.warn("SSE is disconnected"),t.showToastMessagePopUp(APX_SSE_TIMEOUT_CONFIG),t._isShowingToastPopup=!0)})}t.createNewWYSIWYGForSelection()}}}catch(e){window.ApxorLogger.error("WYSIWYG can not be initialised")}}})),_defineProperty$1(this,"createNewWYSIWYGForSelection",(function(e){var n,i,o,a;t.dropDownExpanded=!1;var r=null!==t.testDeviceData&&void 0!==t.testDeviceData&&t.testDeviceData.id&&t.testDeviceData.name;t._newwysiswg=document.createElement("div"),t._newwysiswg.id="apx-wr",t._newwysiswg.classList.add("apx-wrclass"),t._newwysiswg.style="z-index:99999999;visibility:visible;position:fixed;width:260px;height:50px;top:0%;left:50%;transform:translate(-50%, 0%);background:#F2F2F2;opacity:1;font-size:24px;color:white;border-radius:0%;border-bottom-left-radius:50cm;border-bottom-right-radius:50cm; user-select: none;box-shadow: rgb(0, 0, 0, 0.4) 0px 0px 6px 0px;",t.wysiwg_container=document.createElement("div"),t.wysiwg_container.classList.add("apx-wcclass"),t.wysiwg_container.style="position:relative;top:0%;left:0%;display:flex;flex-direction:row;height:50px;",t.imgContainer=document.createElement("div"),t.imgContainer.id="apx-wr-h",t.imgContainer.classList.add("apx-icclass"),t.imgContainer.style="background-color:#002845;border-bottom-left-radius:50cm;padding: 4px 25px 4px 30px;cursor:move;",t.imgContainer.innerHTML='<svg xmlns="http://www.w3.org/2000/svg" width="20" height="31" viewBox="0 0 20 31" fill="none">\n<path fill-rule="evenodd" clip-rule="evenodd" d="M18.6546 0.285222C19.1759 0.714811 19.2404 1.47412 18.7988 1.98119L7.59849 14.8419H4.48593L0.274291 9.76354C-0.154672 9.2463 -0.0713816 8.48872 0.460326 8.07143C0.992033 7.65414 1.77081 7.73516 2.19977 8.2524L5.66873 12.4352H6.45197L16.9112 0.425515C17.3528 -0.0815556 18.1333 -0.144367 18.6546 0.285222Z" fill="#FF7F33"/>\n<path fill-rule="evenodd" clip-rule="evenodd" d="M18.7534 30.7146C19.2746 30.285 19.3391 29.5257 18.8974 29.0187L8.08905 16.6122H5.04724L0.974613 21.5213C0.545563 22.0385 0.628726 22.7961 1.16036 23.2135C1.692 23.6308 2.47079 23.5499 2.89984 23.0328L6.22979 19.0189H6.94278L17.01 30.5746C17.4517 31.0816 18.2323 31.1443 18.7534 30.7146Z" fill="#00BDE1"/>\n</svg>',t.dropDownContainer=document.createElement("div"),t.dropDownContainer.classList.add("apx-ddcclass"),t.dropDownContainer.style="width:100%; display:flex; align-items: center;justify-content: center; cursor: pointer",t.dropDownText=document.createElement("div"),t.dropDownText.classList.add("apx-ddtclass"),t.dropDownText.style="color:black; font-size: 17px;",t.dropDownText.innerHTML="Select",t.dropDownImage=document.createElement("div"),t.dropDownImage.classList.add("apx-ddiclass"),t.dropDownImage.style="margin-left:12px; margin-top:2px;",t.dropDownImage.innerHTML='<style>@keyframes bounce {0%, 20%, 50%, 80%, 100% {transform: translateY(0);}40% {transform: translateY(-8px);}60% {transform: translateY(-4px);}}</style><svg class = "apx-ddisvg" width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg" style = "animation: bounce 2s infinite;"><path class = "apx-" d="M2.26544 5.21182C2.19383 5.14415 2.1096 5.09126 2.01756 5.05614C1.92551 5.02103 1.82745 5.00439 1.72897 5.00718C1.6305 5.00997 1.53353 5.03212 1.44362 5.07238C1.3537 5.11264 1.2726 5.17021 1.20494 5.24182C1.13727 5.31342 1.08438 5.39765 1.04926 5.4897C1.01415 5.58174 0.997514 5.6798 1.0003 5.77828C1.00309 5.87676 1.02524 5.97372 1.0655 6.06364C1.10576 6.15355 1.16333 6.23465 1.23494 6.30232L7.98494 12.6773C8.12419 12.809 8.30855 12.8823 8.50019 12.8823C8.69182 12.8823 8.87618 12.809 9.01544 12.6773L15.7662 6.30232C15.8394 6.2351 15.8984 6.15401 15.94 6.06377C15.9816 5.97352 16.0048 5.87592 16.0083 5.77662C16.0119 5.67733 15.9956 5.57832 15.9606 5.48535C15.9255 5.39239 15.8723 5.30731 15.8041 5.23507C15.7359 5.16283 15.654 5.10486 15.5632 5.06454C15.4724 5.02421 15.3745 5.00233 15.2751 5.00017C15.1758 4.99801 15.077 5.0156 14.9845 5.05194C14.8921 5.08827 14.8077 5.14262 14.7364 5.21182L8.50019 11.1008L2.26544 5.21182Z" fill="black"/></svg>',t.dropDownContainer.appendChild(t.dropDownText),t.dropDownContainer.appendChild(t.dropDownImage),t.dropDownContainer.onclick=function(e){e.stopImmediatePropagation(),t.dropDownBox.style.display=t.dropDownExpanded?"none":"block",t.dropDownExpanded=!t.dropDownExpanded,document.querySelector(".apx-ddisvg")&&(document.querySelector(".apx-ddisvg").style.animation="none"),t.dismissDropDownOutsideClick=function(){t.dropDownExpanded&&(t.dropDownBox.style.display="none",t.dropDownExpanded=!1,document.querySelector(".apx-ddisvg")&&(document.querySelector(".apx-ddisvg").style.animation="bounce 2s infinite"),document.body.removeEventListener("click",t.dismissDropDownOutsideClick))},document.body.addEventListener("click",t.dismissDropDownOutsideClick)},t.wysiwg_container.appendChild(t.imgContainer),t.wysiwg_container.appendChild(t.dropDownContainer),t.dropDownBox=document.createElement("div"),t.dropDownBox.classList.add("apx-ddbclass"),t.dropDownBox.style="position: absolute; background-color: #ffffff; margin-top: 4px; box-shadow: rgb(0, 0, 0, 0.4) 0px 0px 6px 0px;display: none;transform:border-radius: 12px; width: 260px",t.dropDownBoxButtons=document.createElement("div"),t.dropDownBoxButtons.innerHTML='\n <style>\n .apx-bh {\n padding:12px;\n }\n .apx-b {\n background: none;\n color: black;\n border-radius: 12px;\n border: 0px;\n padding-block: 8px;\n padding-inline: 16px;\n display: block;\n font-size: 16px;\n }\n .apx-b:hover {\n background-color: rgba(255, 199, 39, 0.10);\n color: #F97316;\n}\n </style>\n <div id="apx-bh" class="apx-cr apx-bh" style="display: flex; flex-direction: column; gap: 8px;">\n <button class="apx-b" id="apx-a" style="display:'.concat(r?"none":"block",'">\n Register Device\n </button>\n <button class="apx-b" id="apx-r" style="display:').concat(r?"block":"none",'">\n Remove as test device\n </button>\n <button class="apx-b" id="apx-ev" style="display:').concat(r&&t.isSelectionMode?"none":r?"block":"none",'">\n Enable view selection\n </button>\n <button class="apx-b" id="apx-dv" style="display:').concat(r&&t.isSelectionMode?"block":"none",'">\n Disable view selection\n </button>\n <button class="apx-b" id="apx-remove-widget" style="display:block">\n Stop Tracking\n </button>\n </div>');var s=document.createElement("div");s.id="apx-ddtd",s.style.display="none";var c=document.createElement("div");c.style="display: flex; justify-content: center; align-items: center; padding: 12px; gap: 4px; color: black; flex-direction: column; text-align: center;";var l=document.createElement("div");l.id="apx-ddtdname",l.innerHTML=null===(n=t.testDeviceData)||void 0===n?void 0:n.name;var d=document.createElement("div");d.id="apx-ddtdid",d.style="font-size: 10px; font-family: monospace; ",d.innerHTML=null===(i=t.testDeviceData)||void 0===i?void 0:i.id,c.appendChild(l),c.appendChild(d),s.appendChild(c),s.appendChild(document.createElement("hr")),t.dropDownBox.appendChild(s),t.dropDownBox.appendChild(t.dropDownBoxButtons),null!==(o=t.testDeviceData)&&void 0!==o&&o.name&&null!==(a=t.testDeviceData)&&void 0!==a&&a.id&&(s.style.display="block",t.dropDownBox.style.paddingTop="0px"),t._newwysiswg.appendChild(t.wysiwg_container),t._newwysiswg.appendChild(t.dropDownBox),document.body.appendChild(t._newwysiswg),t._wysiwygRoot=t._newwysiswg,t.handlingListenersForSelection(e)})),_defineProperty$1(this,"handlingListenersForSelection",(function(e){t.stopTrackingButton=document.getElementById("apx-remove-widget"),t.stopTrackingButton.addEventListener("click",(function(){document.body.removeChild(t._newwysiswg),t.removeWidgetDetails(),t.previewEventSource.close();var e=document.getElementById("apx-view-sidebar-root");e&&e.remove(),t.artConfigEventSource.close();var n=document.getElementById("apx-show-hide-icon");n&&n.remove(),t._viewSelectionTarget&&t._viewSelectionTarget.classList.remove("apx-highlight")}));var n=document.createElement("div");n.classList.add("apx-esc"),n.style="z-index:99999999;position:fixed;top:80%;left:50%;transform:translate(-50%,-50%);padding:16px 24px;background:black;border-radius:6px;font-size:16px;color:white; cursor:move;",n.innerHTML='press <strong style="font-size: 18px">Esc</strong> to go back to view selection page';var i=function(e){e.stopImmediatePropagation(),"Escape"===e.key&&(t._newwysiswg.style.display="block",s())},o=document.getElementById("apx-a");o.onclick=function(){t._showAddTestDeviceDialog(e)};var a=document.getElementById("apx-r");a.onclick=function(){document.getElementById("apx-ddtd").style.display="none",t.dropDownBox.style.paddingTop="12px",fetch(REMOVE_TEST_DEVICE_API.replace("<aid>",Apxor.getSiteId()).replace("<uid>",t.testDeviceData.id),{method:"DELETE",headers:{apx_web_key:"WTCKFAIVAJKYJA3HCV80WIKZU98R9NJG"}}).then((function(e){return e.ok&&200===e.status?e.json():null})).then((function(e){e&&(Apxor.getController().persistToStorage("_apx_td",{},!0),t.testDeviceData=null,o.style.display="block",a.style.display=r.style.display=c.style.display="none",t.isSelectionMode&&t._hideSelectionMode(),t.removeWidgetDetails(),t.previewEventSource.close(),t.artConfigEventSource.close())})).catch((function(e){return console.error(e)}))};var r=document.getElementById("apx-ev");r.onclick=function(){var e;if(e=document.querySelectorAll(".apx-view-sidebar-root-class"))for(var o=e.length-1;o>=0;o--){var a=e[o];a.parentNode.removeChild(a)}if(document.body.appendChild(n),dragElement(n),t._newwysiswg.style.display="none",document.addEventListener("keydown",i),t.isSelectionMode=!0,Apxor.isFlutter()){var p=Apxor.getApxorFlutterHelper();p.disableClick();var u=p.dump().r;t.clickListener=function(e){var n=e.clientX,i=e.clientY;console.log("x,y",n,i);var o=c.getBoundingClientRect();if(console.log("rect",o),!(n>=o.left&&n<=o.right&&i>=o.top&&i<=o.bottom)){t.traverseLayouts(u.views,n,i,0);var a=t.result.layout,r=a.id,l=a.path,p=a.bounds;t.result=null,r&&0!=r.length?navigator.clipboard.writeText(r):navigator.clipboard.writeText(l),d(p),s(),t._makeSSERequest("view",location.href,r+"___"+l),t._newwysiswg.style.display="block"}}}else window.addEventListener("mouseover",onMouseOver,!0),window.addEventListener("mouseout",onMouseOut,!0),t.clickListener=function(e){return handleDocumentOnClick(e,(function(e){var n=t.cssPath(e,!0);t._viewSelectorFound=n,t._viewText=e.innerText.toLowerCase(),t._viewSelectionTarget=e,t._selectors_list=t.generateSelectorslist(e);var i=t.xPath(e,!0);navigator.clipboard.writeText(n+"___"+i),l(),s(),"v2"===t._selection_mode&&t._viewSelectionTarget.classList.add("apx-highlight"),"v1"===t._selection_mode&&t._makeSSERequest("view",location.href,n+"___"+i),t._newwysiswg.style.display="block"}))};window.addEventListener("click",t.clickListener,!0),t._hideToast(!1),r.style.display="none",c.style.display="block"};var s=function(){t._hideSelectionMode(),document.removeEventListener("keydown",i);var e=document.querySelector(".apx-esc");e&&document.body.removeChild(e),c.style.display="none",r.style.display="block"},c=document.getElementById("apx-dv");c.onclick=s;var l=function(){var e=document.querySelector("#apx-ev");if(e.disabled=!0,"View selected. Go back to Apxor dashboard to proceed with campaign creation.","v1"===t._selection_mode)feedBackMessagePopUp("View selected. Go back to Apxor dashboard to proceed with campaign creation.");else{t._createViewSideBar(),t._selected_element_details=[];var n=document.getElementById("apx-generated-selector");n&&(n.innerText=t._viewSelectorFound)}var i=document.getElementById("close-button"),o=function(){var t=document.getElementById("apx-container");null==t||t.remove(),e.disabled=!1};window.setTimeout(o,5e3),null==i||i.addEventListener("click",o)},d=function(e){var n=document.createElement("div"),i=e.right-e.left,o=e.bottom-e.top;n.style="\n position:absolute;\n top:".concat(e.top,"px;\n left:").concat(e.left,"px;\n width:").concat(i,"px;\n height:").concat(o,"px;\n z-index:99999;outline: 2px solid red;cursor:default;\n "),document.body.appendChild(n);var a=document.querySelector("#apx-ev");a.disabled=!0;var r="View selected. Go back to Apxor dashboard to proceed with campaign creation.";"Desktop"!==t._type&&(r="View selected. Go back to Apxor dashboard to proceed with campaign creation.");var s='\n <style> \n .apx-container{\n padding:20px;\n }\n </style>\n <div id="apx-container" class="apx-container">\n <div id="close-button" style="position:fixed;top:20px;right:10px;"><svg width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path opacity="0.5" d="M11.0962 9.07071L17.8586 15.8331L15.8331 17.8586L9.0707 11.0962L8.99999 11.0255L8.92928 11.0962L2.16693 17.8586L0.141421 15.8331L6.90379 9.07071L6.9745 9L6.90379 8.92929L0.141421 2.16694L2.16693 0.141422L8.92928 6.9038L8.99999 6.97451L9.0707 6.9038L15.8331 0.141422L17.8586 2.16694L11.0962 8.92929L11.0255 9L11.0962 9.07071Z" fill="white" stroke="#002845" stroke-width="0.2"/>\n </svg>\n </div>\n <div style="font-family: inherit;font-style: normal;font-weight: 600;font-size: 16px;line-height: 22px;\n color: #FFFFFF;">'.concat(r,"</div>\n </div>\n "),c=document.createElement("div");c.style="\n z-index:99999999;\n background:#002845;\n position:fixed;\n top:50%;\n left:50%;\n transform:translate(-50%, -50%);\n ",c.innerHTML=s,document.body.appendChild(c),document.getElementById("close-button").addEventListener("click",(function(){document.getElementById("apx-container").remove(),n.remove(),a.disabled=!1,Apxor.getApxorFlutterHelper().enableClick()}))};t._wysiwygRoot.addEventListener("preview",s),t._wysiwygRoot.addEventListener("added",(function(){o.style.display="none",a.style.display="block",r.style.display="block"}))})),_defineProperty$1(this,"_createViewSideBar",(function(e){t._selector_category="default",t._view_sideBar=document.createElement("div"),t._view_sideBar.id="apx-view-sidebar-root",t._view_sideBar.classList.add("apx-view-sidebar-root-class"),t.viewsideBarStyles=document.createElement("style"),t.viewsideBarStyles.innerHTML="#apx-view-sidebar-root {\n z-index: 9999999999;\n position: fixed;\n top: 0;\n right: 0px;\n width: 370px;\n height: 100%;\n display:flex;\n background-color: #fff;\n box-shadow: -2px 0px 25.600000381469727px 0px #0000001A;\n transition: all .3s ease-out;\n}\n\n\n#apx-view-sidebar-container {\n display: flex;\n flex-direction: column;\n height: 100%;\n}\n\n#apx-view-sidebar-container-header {\n line-height: 21.78px;\n font-family: inherit;\n font-weight: 500;\n font-size: 18px;\n padding-left: 10%;\n display: flex;\n align-items: center;\n flex-basis: 8%;\n background-color: rgb(0, 40, 69);\n color: white;\n}\n#apx-view-sidebar-content {\n flex-basis: 84%;\n flex-direction:column;\n overflow:auto;\n}\noption{\n margin:10px;\n height:29px;\n}\n#apx-sidebar-container-footer {\n flex-basis: 8%;\n background-color: #F5F5F5;\n}",t._show_hide_toggleElement=document.createElement("div"),t._show_hide_toggleElement.id="apx-show-hide-icon",t._show_hide_toggleElement.style="width:20px;height:70px;background-color:rgb(0,40,69,0.9);position:fixed;right:369px;top:0px;color:rgb(255,255,255,0.7);transform:rotate(180deg);writing-mode:vertical-lr;text-align:center;border-top-right-radius:5px;border-bottom-right-radius:5px;cursor:pointer;z-index:99999997;display:flex;justify-content:center;align-items:center;gap:4px;",t._show_hide_toggle_text=document.createElement("div"),t._show_hide_toggle_text.innerText="hide",t._show_hide_toggleElement.appendChild(t._show_hide_toggle_text),t._toggle_icon=document.createElement("div"),t._toggle_icon.innerText="►",t._toggle_icon.style="transform:rotate(180deg);color:#ffffff;font-size:11px;",t._show_hide_toggleElement.appendChild(t._toggle_icon),t._clickHandlingForShowHideIcon(!0),document.body.appendChild(t._show_hide_toggleElement),t._view_sideBar.appendChild(t.viewsideBarStyles),t.viewSideBarContainer=document.createElement("div"),t.viewSideBarContainer.id="apx-view-sidebar-container",t.viewSideBarContainerHeader=document.createElement("div"),t.viewSideBarContainerHeader.id="apx-view-sidebar-container-header",t.viewSideBarContainerHeader.style="position: relative;";t.viewSideBarContainerHeader.innerHTML='<span>Define Element </span> <div id = "apx-view-closeSideBar" style = "position:absolute; top:50%; right:30px;transform: translate(0px, -50%); cursor:pointer;">'.concat('<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-x" width="24" height="24" viewBox="0 0 24 24" stroke-width="1.5" stroke="#ffffff" fill="none" stroke-linecap="round" stroke-linejoin="round">\n <path stroke="none" d="M0 0h24v24H0z" fill="none"/>\n <path d="M18 6l-12 12" />\n <path d="M6 6l12 12" />\n</svg>',"</div>"),t.viewSideBarContent=document.createElement("div"),t.viewSideBarContent.style="display:flex;gap:5px;",t.viewSideBarContent.id="apx-view-sidebar-content",t.viewsideBarContentHeading=document.createElement("div"),t.viewsideBarContentHeading.innerText="Feature Element Matching",t.viewsideBarContentHeading.style="font-size:14px;font-family:inherit;padding-top:20px;padding-inline:20px;font-weight:600",t.viewSideBarData=document.createElement("div"),t.viewSideBarData.innerHTML='\n <style>\n .apx-radio-buttons {\n accent-color: indianred;\n padding-block: 8px;\n padding-left:15px;\n }\n </style>\n <form id="apx-Form">\n <div class = "apx-radio-buttons">\n <input type="radio" name="apx-url" id="apx-suggested-match" value="Suggested Match" checked> <label for="apx-suggested-match">Suggested Match</label></div>\n <div id="apx-selector" style="padding-top: 2px;\n padding-left: 6%;\n margin-left:20px;\n margin-right:20px;\n background-color:#f4f4f7;\n border:1px solid #dadce5;\n display:flex;\n border-radius:5px;\n flex-direction:column;\n">\n <div style="color:#6a6c75;font-size:17px;padding-top:10px">\n Selection\n </div>\n <div style="font-size:15px;padding-top:5px;">\n '.concat(t._viewSelectorFound,'\n </div>\n <input type="text" id="apx-selector-input-editable" style="margin-right:20px;height:30px;margin-top:5px;margin-bottom:20px;">\n </div>\n <div class = "apx-radio-buttons">\n <input type="radio" name="apx-url" value="Rule Builder" id="apx-rule-builder"> <label for="apx-rule-builder">Rule Builder</label></div>\n\n\n <div id="apx-rule-builder-container" style="padding-top: 2px;\n padding-left: 6%;\n margin-left:20px;\n margin-right:13px;\n padding-bottom:20px;\n background-color:#f4f4f7;\n border:1px solid #dadce5;\n display:none;\n border-radius:5px;\n flex-direction:column;\n">\n <div style="color:#6a6c75;font-size:17px;padding-top:10px">\n Selection\n </div>\n <div id ="apx-generated-selector"style="font-size:15px;padding-top:5px;">\n ').concat(t._viewSelectorFound,'\n </div>\n <div style ="border-radius:5px;border:1px solid #000;width:290px;margin-top:7px;"\n >\n <div style ="background-color:#dadce5;margin:10px;border:2px solid #babcc5;border-radius:5px;padding-bottom:8px;"> \n <div style="style="display:flex;flex-direction:row;flex-wrap: wrap;">\n <div id ="apx-selectors-selected-list-inbox"></div>\n </div>\n <div style="font-weight:300;font-size:15px;padding-top:5px;color:rgb(0,0,0,0.5);padding-left:5px;"> Choose from below to add the rule </div>\n <div style ="font-weight:600;padding-top:5px;padding-left:5px;">Selectors</div>\n <div id ="apx-selectors-unselected-list-inbox"></div>\n </div>\n </div>\n </div>\n </div>\n <div style = "font-size:15px;font-family:inherit;padding-top:20px;padding-inline:20px;display:flex;justify-content: space-between;align-items: center;">\n <style>\n /* The switch - the box around the slider */\n .switch {\n position: relative;\n display: inline-block;\n width: 40px; /* Adjusted width */\n height: 20px; /* Adjusted height */\n }\n\n /* Hide default HTML checkbox */\n .switch input {\n opacity: 0;\n width: 0;\n height: 0;\n }\n\n /* The slider */\n .slider {\n position: absolute;\n cursor: pointer;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n background-color: #ccc;\n -webkit-transition: .4s;\n transition: .4s;\n }\n\n .slider:before {\n position: absolute;\n content: "";\n height: 16px; /* Adjusted height */\n width: 16px; /* Adjusted width */\n left: 2px; /* Adjusted left position */\n bottom: 2px; /* Adjusted bottom position */\n background-color: white;\n -webkit-transition: .4s;\n transition: .4s;\n }\n\n input:checked + .slider {\n background-color: #2196F3;\n }\n\n input:focus + .slider {\n box-shadow: 0 0 1px #2196F3;\n }\n\n input:checked + .slider:before {\n -webkit-transform: translateX(20px); /* Adjusted translation */\n -ms-transform: translateX(20px); /* Adjusted translation */\n transform: translateX(20px); /* Adjusted translation */\n }\n\n /* Rounded sliders */\n .slider.round {\n border-radius: 20px; /* Adjusted border radius */\n }\n\n .slider.round:before {\n border-radius: 50%;\n }\n .apx-labelnames {\n font-family: inherit;\n font-weight: 600;\n line-height: 1em;\n font-size: 14px;\n }\n .apx-inputfields {\n width: 48%;\n padding-left: 10px;\n box-sizing: border-box;\n margin-top: 10px;\n background-color: #F7F8F8;\n border: 1px solid #dadce5;\n height: 40px;\n border-radius: 12px;\n } \n option {\n font-size: 16px;\n }\n .apx-inputfields::placeholder{\n font-family:inherit;\n font-weight:400;\n font-size: 14px;\n line-height: 14px;\n }\n .apx-inputfields:focus{\n outline: 2px solid #007aff;\n }\n #apx-dynamicURL::placeholder{\n font-family:monospace;\n }\n .apx-radio-buttons {\n accent-color: indianred;\n padding-block: 12px;\n }\n</style>\n\n<div style = "color: #2a2c35;font-weight: 600;font-size: 14px;">Enable Text Based Selection</div>\n<label class="switch">\n <input type="checkbox" id="apx-contentSearchToggleSwitch">\n <span class="slider round"></span>\n</label>\n</div>\n<div style = "padding-top: 10px;padding-inline: 20px;margin-block: 10px;">Conditionally show a guide if an element\'s text or number content matches a given condition.</div>\n<div id = "apx-ContentSearchBox" style= "display:none;padding-inline: 20px;margin-block: 10px;">\n <div style = "display: inline-flex; flex-direction: column; gap: 10px; margin-block: 10px; width: 48%;">\n <label class="apx-labelnames">Content Type</label>\n <select id="apx-content-type" required class="apx-inputfields" style="padding-left: 10px; width: 100%;">\n <option value="Text">Text</option>\n <option value="Number">Number</option>\n </select>\n </div>\n <div style = "display: flex; flex-direction: column; gap: 10px; margin-block: 10px;">\n <label class="apx-labelnames">Only display guide when the value of this element...</label>\n <div style = "display: flex; gap: 5px;">\n <select id="apx-text-content-conditions" required class="apx-inputfields" style="padding-left: 10px; display: block;">\n <option value="contains">Contains</option>\n <option value="does_not_contain">Does Not Contain</option>\n <option value="exactly_matches">Exactly Matches</option>\n <option value="does_not_match">Does Not Match</option>\n </select>\n <select id="apx-number-content-conditions" required class="apx-inputfields" style="padding-left: 10px; display: none;">\n <option value="EQ">Equals</option>\n <option value="NEQ">Not Equal To</option>\n <option value="GT">Is Greater than</option>\n <option value="LT">Is Less Than</option>\n </select>\n <input type="text" name="apx-dynamicContent" id="apx-dynamicContent" class="apx-inputfields" required placeholder="placeholder" value="').concat(t._viewText,'"></div>\n </div>\n \n <div id = "status">Your rule <span id = "apx-does-not-pass" style="color: red; display: inline">does not pass</span> <span id = "apx-passes" style="color: green; display: none">passes</span> based on the current content of your target element (case-insensitive):</div>\n <div id = "apx-currentText" style = "border-left: 3px solid #eaecf1; padding-left: 10px; margin-top: 10px;">').concat(t._viewText,"</div>\n</div>\n </form>"),t.dynamicViewDetailsPage=document.createElement("div"),t.dynamicViewDetailsPage.id="apx-dynamic-view-page",t.dynamicViewDetailsPage.style="display:none;gap:7px;flex-basis: 84%;flex-direction:column",t.dynamicViewDetailsPage.innerHTML='\n <div style ="font-size:14px;font-weight:400;width:fit-content;padding-left:15px;padding-top:20px;padding-right:15px;font-family:Inter;text-align:justify;">Selectors are used to find features on your page. Apxor uses an exact match of the selector by default, but sometimes a more general match is useful.</div>\n <select id="apx-view-type" required class="apx-inputfields" style="padding-left: 5px;font-size:16px;height:39px;margin-left:20px;margin-right:20px">\n <option value="default" >Default</option>\n <option value="contains" >Contains</option>\n </select>\n <div class ="apx-current-selector" style ="font-size:14px;padding-top:5px;font-weight:500;font-family:Inter;padding-left:22px;"></div>\n <input type="text" class ="apx-selector-input" placeholder="Enter the part of selector" style="display:none;padding-left:10px;margin-left:20px;margin-right:20px;margin-top:5px;height:30px;">\n</div>\n ';var n=document.createElement("div");n.id="apx-footerButtonContainer",n.style="display:flex;justify-content: space-between;align-items: center;height: 100%;padding-inline: 10%;";var i=document.createElement("button");i.id="apx-cancel-viewpage",i.innerHTML="Cancel",i.style="display: none;background-color:#fff;color:#F97316;cursor:pointer;font-size:13px;font-weight:500;font-family:inherit;border-radius:11px;border:2px solid #F97316;padding: 12px;";var o=document.createElement("button");o.id="apx-apply-viewpage",o.innerHTML="Apply",o.style="display: none;background-color:#F97316;color:#fff;font-size:13px;align-items:center;font-weight:500;font-family:inherit;border-radius:11px;border:#F97316;padding-inline: 24px;padding-block: 12px;cursor:pointer;opacity:1;";var a=document.createElement("button");a.id="apx-submitButton",a.innerHTML="Save",a.style="margin-left:auto;display:block;background-color:#F97316;color:#fff;font-size:13px;align-items:center;font-weight:500;font-family:inherit;border-radius:11px;border:#F97316;padding-inline: 24px;padding-block: 12px;opacity:1;cursor:pointer";var r=document.createElement("button");(r.id="apx-cancel-viewpage-for-track-events",r.innerHTML="Cancel",r.style="display: block;background-color:#fff;color:#F97316;cursor:pointer;font-size:13px;font-weight:500;font-family:inherit;border-radius:11px;border:2px solid #F97316;padding: 12px;",e&&n.appendChild(r),n.appendChild(i),n.appendChild(o),n.appendChild(a),t.viewSideBarContainerFooter=document.createElement("div"),t.viewSideBarContainerFooter.id="apx-sidebar-container-footer",t.viewSideBarContainerFooter.appendChild(n),t.viewSideBarContainer.appendChild(t.viewSideBarContainerHeader),t.viewSideBarContent.appendChild(t.viewsideBarContentHeading),t.viewSideBarContent.appendChild(t.viewSideBarData),t.viewSideBarContainer.appendChild(t.viewSideBarContent),t.viewSideBarContainer.appendChild(t.dynamicViewDetailsPage),t.viewSideBarContainer.appendChild(t.viewSideBarContainerFooter),t._view_sideBar.appendChild(t.viewSideBarContainer),document.body.appendChild(t._view_sideBar),e)&&document.getElementById("apx-cancel-viewpage-for-track-events").addEventListener("click",(function(){var e,n=document.getElementById("apx-view-sidebar-root");n&&n.remove(),t._is_text_based=!1;var i=document.getElementById("apxor_sidebar");i&&i.remove(),t._targetElement&&t._targetElement.classList.remove("apx-highlight"),null===(e=t._show_hide_toggleElement)||void 0===e||e.remove();var o=document.querySelector(".apx-show-hide-button-class");o&&o.remove(),t.createEventsSideBar()}));var s=document.getElementById("apx-selectors-unselected-list-inbox");s.style="display:flex;flex-wrap:wrap;align-items:flex-start",t._selectors_list.forEach((function(e,t){var n="#"+(Math.random().toString(16)+"000000").slice(2,8),i='\n <div class="apx-selector-name" id = "apx-unselected-'.concat(t,'" style="background-color:#fff;border:2px solid ').concat(n,';font-family:inherit;border-radius:3px;box-sizing:border-box;font-size:12px;display:inline-flex;margin:5px 5px;padding:4px 8px;max-width:300px;text-align:left;overflow-wrap:anywhere;cursor:pointer;gap:3px;">\n <span style ="pointer-events:none">\n <svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-plus pendo-icon__content" aria-label="plus" display="block">\n <line x1="12" y1="5" x2="12" y2="19"></line>\n <line x1="5" y1="12" x2="19" y2="12"></line>\n </svg>\n </span>\n ').concat(e,"\n </div>\n "),o=document.createElement("div");o.innerHTML=i,s.appendChild(o)}));var c=document.getElementById("apx-selectors-selected-list-inbox");c.style="display:flex;flex-wrap:wrap;align-items:flex-start",t._selectors_list.forEach((function(e,t){var n="#"+(Math.random().toString(16)+"000000").slice(2,8),i='\n <div class="apx-selector-name" id = "apx-selected-'.concat(t,'" style="background-color:').concat(n,";border:2px solid ").concat(n,';font-family:inherit;border-radius:3px;box-sizing:border-box;font-size:12px;display:none;margin:5px 5px;padding:4px 8px;max-width:300px;text-align:left;overflow-wrap:anywhere;cursor:pointer;gap:3px;color:#fff">\n ').concat(e,'\n <span id="apx-settings-icon-selctor').concat(t,'" style ="padding-left:2px;padding-top:1px;display:none">\n <svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round" class="feather feather-settings pendo-icon__content" aria-label="settings" aria-hidden="true" display="block"><circle cx="12" cy="12" r="3"></circle><path d="M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1 2-2h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 2-2 2 2 0 0 1 2 2v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09a1.65 1.65 0 0 0-1.51 1z"></path></svg>\n </span>\n <span style ="pointer-events:none">\n <svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-x pendo-icon__content" aria-label="x" display="block"><line x1="18" y1="6" x2="6" y2="18"></line><line x1="6" y1="6" x2="18" y2="18"></line></svg>\n </span>\n </div>\n '),o=document.createElement("div");o.innerHTML=i,c.appendChild(o)}));var l=[];t._selectors_list.forEach((function(e,t){l.push("apx-selected-"+t)}));var d=[];t._selectors_list.forEach((function(e,t){d.push("apx-unselected-"+t)}));var p=document.getElementById("apx-selectors-unselected-list-inbox");p&&p.addEventListener("click",(function(e){var n,i;if(i=null===(n=e.target)||void 0===n?void 0:n.id){t._selected_element_details.push(e.target.innerText),t._selector_generated=t.generateElementDetails(t._selected_element_details);var o=document.getElementById("apx-generated-selector");o&&(o.innerText=t._selector_generated);var a,r,s,c=d.indexOf(i);if(c>=0)if(document.getElementById(i).style.display="none",a=l[c],document.getElementById(a).style.display="inline-flex",r=(r=e.target.innerText).replace(/ /g,"").replace(/\n/g,""))if("."===r[0]||"#"===r[0])(s=document.getElementById("apx-settings-icon-selctor".concat(c)))&&(s.style.display="flex",s.addEventListener("click",(function(){var e;if(e=document.getElementById("apx-dynamic-view-page")){e.style.display="flex";var t,n=document.getElementById("apx-view-sidebar-content");n&&(n.style.display="none"),(t=document.querySelector(".apx-current-selector"))&&(t.innerText=r);var i=document.getElementById("apx-submitButton");i&&(i.style.display="none");var o=document.getElementById("apx-cancel-viewpage-for-track-events");o&&(o.style.display="none");var a=document.getElementById("apx-cancel-viewpage");a&&(a.style.display="flex");var s=document.getElementById("apx-apply-viewpage");s&&(s.style.display="flex")}})))}}));var u,h,g=document.getElementById("apx-selectors-selected-list-inbox");g&&g.addEventListener("click",(function(e){var n,i;if(i=null===(n=e.target)||void 0===n?void 0:n.id){var o=l.indexOf(i);if(o>=0){var a=e.target.innerText;t._selected_element_details=t._selected_element_details.filter((function(e){return e!==a})),t._selector_generated=t.generateElementDetails(t._selected_element_details);var r,s=document.getElementById("apx-generated-selector");s&&(s.innerText=t._selector_generated),document.getElementById(i).style.display="none",r=d[o],document.getElementById(r).style.display="inline-flex"}}})),(u=document.getElementById("apx-suggested-match"))&&u.addEventListener("input",(function(){t._selector_category="default";var e=document.getElementById("apx-selector");"none"===e.style.display&&(e.style.display="flex");var n=document.getElementById("apx-rule-builder-container");n&&"flex"==n.style.display&&(n.style.display="none")})),(h=document.getElementById("apx-rule-builder"))&&h.addEventListener("input",(function(){t._selector_category="custom";var e=document.getElementById("apx-rule-builder-container");e&&"none"==e.style.display&&(e.style.display="flex");var n=document.getElementById("apx-selector");"flex"===n.style.display&&(n.style.display="none")}));var f=document.getElementById("apx-selector-input-editable"),m="".concat(t._viewSelectorFound);f.value=m;var _=function(){var e,n;contentBasedSearch(t._viewSelectionTarget,{type:t._text_type,op:"s"===t._text_type?t._content_op:t._number_op,content:null!==(e=null===(n=document.getElementById("apx-dynamicContent"))||void 0===n?void 0:n.value)&&void 0!==e?e:""})?(document.getElementById("apx-does-not-pass").style.display="none",document.getElementById("apx-passes").style.display="inline"):(document.getElementById("apx-does-not-pass").style.display="inline",document.getElementById("apx-passes").style.display="none")},v=document.getElementById("apx-dynamicContent");v&&v.addEventListener("input",(function(){_()}));var b=document.getElementById("apx-content-type");b&&b.addEventListener("change",(function(){"Text"===b.value?(t._text_type="s",document.getElementById("apx-text-content-conditions").style.display="block",document.getElementById("apx-number-content-conditions").style.display="none",document.getElementById("apx-currentText").innerHTML=t._viewText,v.type="text",v.value=t._viewText):(t._text_type="n",document.getElementById("apx-text-content-conditions").style.display="none",document.getElementById("apx-number-content-conditions").style.display="block",v.type="number",isNumber$2(t._viewText)?(document.getElementById("apx-currentText").innerHTML=t._viewText,v.value=t._viewText):(document.getElementById("apx-currentText").innerHTML="No numbers detected",v.value="",v.placeholder="Value to match")),_()}));var y=document.getElementById("apx-contentSearchToggleSwitch");y&&y.addEventListener("change",(function(){y.checked?(t._is_text_based=!0,document.getElementById("apx-ContentSearchBox").style.display="block",_()):(t._is_text_based=!1,document.getElementById("apx-ContentSearchBox").style.display="none")}));var x=document.getElementById("apx-cancel-viewpage");x&&x.addEventListener("click",(function(){var e;(e=document.getElementById("apx-view-sidebar-content"))&&(e.style.display="flex");var t=document.getElementById("apx-dynamic-view-page");if(t){t.style.display="none",a.style.display="block",i.style.display=o.style.display="none";var n=document.getElementById("cancel_button_for_track_events");n&&(n.style.display="block")}}));var w=document.getElementById("apx-apply-viewpage");w&&w.addEventListener("click",(function(){t.applyViewPageHandling()}));var C,E,k=document.getElementById("apx-view-closeSideBar");k&&k.addEventListener("click",(function(){var n;document.getElementById("apx-view-sidebar-root").remove(),null===(n=t._show_hide_toggleElement)||void 0===n||n.remove();var i=document.querySelector(".apx-show-hide-button-class");i&&i.remove(),t._viewSelectionTarget&&t._viewSelectionTarget.classList.remove("apx-highlight"),e&&(t.startTrackingButton.style.display="block",t._targetElement&&t._targetElement.classList.remove("apx-highlight"))})),(C=document.getElementById("apx-text-content-conditions"))&&C.addEventListener("change",(function(e){t._content_op=e.target.value,_()})),(E=document.getElementById("apx-number-content-conditions"))&&E.addEventListener("change",(function(e){t._number_op=e.target.value,_()})),document.addEventListener("input",(function(){if("none"!==t.viewSideBarContent.style.display){var e,n=!1;y.checked?document.getElementById("apx-dynamicContent").required=!0:document.getElementById("apx-dynamicContent").required=!1,(u.checked&&""===f.value||h.checked&&0===c.childElementCount||y.checked&&""===(null===(e=document.getElementById("apx-dynamicContent"))||void 0===e?void 0:e.value))&&(n=!0),n?(a.disabled=!0,a.style.opacity=.2,a.style.cursor="not-allowed"):(a.disabled=!1,a.style.opacity=1,a.style.cursor="pointer")}else if("none"!==t.dynamicViewDetailsPage.style.display){var i=!1;"contains"===document.getElementById("apx-view-type").value&&""===document.querySelector(".apx-selector-input").value&&(i=!0),i?(o.disabled=!0,o.style.opacity=.2,o.style.cursor="not-allowed"):(o.disabled=!1,o.style.opacity=1,o.style.cursor="pointer")}})),a.addEventListener("click",(function(e){e.preventDefault(),document.getElementById("apx-Form").requestSubmit()})),document.getElementById("apx-Form").addEventListener("submit",(function(n){var i,o,a;n.preventDefault(),"default"==t._selector_category?(o=document.getElementById("apx-selector-input-editable"),t._selectorToBeSent=o.value):"custom"==t._selector_category&&(o=document.getElementById("apx-generated-selector"),t._selectorToBeSent=o.innerText),null===(a=null===(i=document.getElementById("apx-dynamicContent"))||void 0===i?void 0:i.value)&&(a=""),t._dynamic_content_updated=a,t._selectorToBeSent=enclosePartialAttributes(t._selectorToBeSent),console.log(t._selectorToBeSent);var r={id:t._selectorToBeSent,is_content_based:t._is_text_based,content:{}};if(t._viewSelectionTarget&&t._viewSelectionTarget.classList.remove("apx-highlight"),r.is_content_based&&(r.content={type:t._text_type,op:"s"===t._text_type?t._content_op:t._number_op,content:a},t._avf_updated_content=r.content),console.log(r),e){var s;null===(s=t._show_hide_toggleElement)||void 0===s||s.remove();var c,l=document.querySelector(".apx-show-hide-button-class");l&&l.remove(),document.getElementById("apx-view-sidebar-root").style.display="none",c=getElementFromSelector(t._selectorToBeSent,"",t._is_text_based,r.content),t._targetElement&&t._targetElement.classList.remove("apx-highlight"),c&&(t._targetElement=c,t._targetElement.classList.add("apx-highlight")),t.createEventsSideBar(!0,!0)}else{var d;t._makeSSERequest("view",location.href,t._selectorToBeSent,(function(){}),(function(){}),r),(d=document.getElementById("apx-view-sidebar-root"))&&d.remove();var p=document.getElementById("apx-show-hide-icon");p&&p.remove()}document.querySelector(".apx-ddisvg").style.animation="bounce 2s infinite"})),document.getElementById("apx-view-type").addEventListener("change",(function(){var e=document.querySelector(".apx-selector-input"),t=this.value;e.style.display="contains"===t?"block":"none"}))})),_defineProperty$1(this,"applyViewPageHandling",(function(){var e,n;if("contains"===(n=document.getElementById("apx-view-type")).value){var i,o=document.querySelector(".apx-selector-input"),a=document.querySelector(".apx-current-selector");if("."===a.innerText[0]?i="[class*=".concat(o.value,"]"):"#"===a.innerText[0]&&(i="[id*=".concat(o.value,"]")),i){var r;t._selected_element_details=t._selected_element_details.map((function(e){return e.replace(a.innerText,i)})),a.innerText.startsWith("#")&&(r="[id*=".concat(a.innerText.substring(1),"]")),a.innerText.startsWith(".")&&(r="[class*=".concat(a.innerText.substring(1),"]")),t._selected_element_details=t._selected_element_details.map((function(e){return e.replace(r,i)})),t._selector_generated=t.generateElementDetails(t._selected_element_details);var s=document.getElementById("apx-generated-selector");s&&(s.innerText=t._selector_generated);var c=t.findIndexAfterNormalization(t._selectors_list,a.innerText);if(-1===c&&(c=t.findIndexAfterNormalization(t._selectors_list,r)),c>=0){var l,d;l=document.querySelector(".apx-current-selector");for(var p=0;p<t._selectors_list.length;p++){var u;t._selectors_list[p]===(null===(u=l)||void 0===u?void 0:u.innerText)&&(t._selectors_list[p]=i)}"."==l.innerText[0]&&(d="[class*=".concat(l.innerText.substring(1),"]")),"#"==l.innerText[0]&&(d="[id*=".concat(l.innerText.substring(1),"]"));for(var h=0;h<t._selectors_list.length;h++)t._selectors_list[h]===d&&(t._selectors_list[h]=i);var g=document.getElementById("apx-selected-".concat(c));g&&(g.innerHTML="\n ".concat(i,'\n <span id="apx-settings-icon-selctor').concat(c,'" style ="padding-left:2px;padding-top:1px;display:block">\n <svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round" class="feather feather-settings pendo-icon__content" aria-label="settings" aria-hidden="true" display="block"><circle cx="12" cy="12" r="3"></circle><path d="M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1 2-2h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 2-2 2 2 0 0 1 2 2v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09a1.65 1.65 0 0 0-1.51 1z"></path></svg>\n </span>\n <span style ="pointer-events:none">\n <svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-x pendo-icon__content" aria-label="x" display="block"><line x1="18" y1="6" x2="6" y2="18"></line><line x1="6" y1="6" x2="18" y2="18"></line></svg>\n </span>\n '));var f=document.getElementById("apx-unselected-".concat(c));f&&(f.innerHTML='<span style ="pointer-events:none">\n <svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-plus pendo-icon__content" aria-label="plus" display="block">\n <line x1="12" y1="5" x2="12" y2="19"></line>\n <line x1="5" y1="12" x2="19" y2="12"></line>\n </svg>\n </span>\n '.concat(i));var m=document.getElementById("apx-settings-icon-selctor".concat(c));m&&(m.style.display="flex",m.addEventListener("click",(function(){var e;if(e=document.getElementById("apx-dynamic-view-page")){e.style.display="flex";var t,n=document.getElementById("apx-view-sidebar-content");n&&(n.style.display="none"),(t=document.querySelector(".apx-current-selector"))&&((i.startsWith("[class")||"."==i[0])&&(t.innerText=".".concat(o.value)),(i.startsWith("[id")||"id"==i[0])&&(t.innerText="#".concat(o.value)));var a=document.getElementById("apx-submitButton");a&&(a.style.display="none");var r=document.getElementById("apx-cancel-viewpage");r&&(r.style.display="flex");var s=document.getElementById("apx-apply-viewpage");s&&(s.style.display="flex");var c=document.getElementById("apx-cancel-viewpage");c&&c.addEventListener("click",(function(){var e;(e=document.getElementById("apx-view-sidebar-content"))&&(e.style.display="flex");var t,n,i=document.getElementById("apx-dynamic-view-page");i&&(i.style.display="none",document.getElementById("apx-submitButton").style.display="block",t=document.getElementById("apx-cancel-viewpage"),n=document.getElementById("apx-apply-viewpage"),t.style.display=n.style.display="none")}))}})))}(e=document.getElementById("apx-view-sidebar-content"))&&(e.style.display="flex");var _,v,b,y=document.getElementById("apx-dynamic-view-page");if(y)y.style.display="none",document.getElementById("apx-submitButton").style.display="block",_=document.getElementById("apx-cancel-viewpage"),v=document.getElementById("apx-apply-viewpage"),_.style.display=v.style.display="none";if(null!=c)null===(b=document.getElementById("apx-settings-icon-selctor".concat(c)))||void 0===b||b.addEventListener("click",(function(){var e;if(e=document.getElementById("apx-dynamic-view-page")){e.style.display="flex";var t,n=document.getElementById("apx-view-sidebar-content");n&&(n.style.display="none"),(t=document.querySelector(".apx-current-selector"))&&((i.startsWith("[class")||"."==i[0])&&(t.innerText=".".concat(o.value)),(i.startsWith("[id")||"id"==i[0])&&(t.innerText="#".concat(o.value)));var a=document.getElementById("apx-submitButton");a&&(a.style.display="none");var r=document.getElementById("apx-cancel-viewpage");r&&(r.style.display="flex");var s=document.getElementById("apx-apply-viewpage");s&&(s.style.display="flex")}}))}}else if("default"===n.value){var x;(x=document.getElementById("apx-view-sidebar-content"))&&(x.style.display="flex");var w,C,E=document.getElementById("apx-dynamic-view-page");if(E)E.style.display="none",document.getElementById("apx-submitButton").style.display="block",w=document.getElementById("apx-cancel-viewpage"),C=document.getElementById("apx-apply-viewpage"),w.style.display=C.style.display="none"}})),_defineProperty$1(this,"findIndexAfterNormalization",(function(e,t){for(var n=t.replace(/\n/g,"").replace(/\s/g,""),i=0;i<e.length;i++){if(e[i].replace(/\n/g,"").replace(/\s/g,"")===n)return i}return-1})),_defineProperty$1(this,"generateSelectorslist",(function(e){var t=[];return t.push(e.tagName.toLowerCase()),e.id&&t.push("#".concat(e.id)),e.classList.length>0&&e.classList.forEach((function(e){t.push(".".concat(e))})),Array.from(e.attributes).forEach((function(e){"id"!==e.name&&"class"!==e.name&&t.push("[".concat(e.name,'="').concat(e.value,'"]'))})),t})),_defineProperty$1(this,"isTagName",(function(e){return!e.startsWith(".")&&!e.startsWith("#")&&!e.startsWith("[")})),_defineProperty$1(this,"generateElementDetails",(function(e){var n,i=t.hasTagName(e),o=e.filter((function(e){return e.startsWith(".")})).map((function(e){return e.slice(1)})),a=(null===(n=e.find((function(e){return e.startsWith("#")})))||void 0===n?void 0:n.slice(1))||"",r=e.filter((function(e){return e.startsWith("[")})).map((function(e){return e.slice(1,-1)}));return t.constructSelector(i,o,a,r)})),_defineProperty$1(this,"constructSelector",(function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],o=e;return n&&(n.startsWith("[")?o+="".concat(n):o+="#".concat(n)),t.length>0&&t.forEach((function(e){if(e.startsWith("["))o+="".concat(e);else{var t=e.match(/^\[.*\]$/);o+=t?t[0]:".".concat(e)}})),i.length>0&&i.forEach((function(e){o+="[".concat(e,"]")})),""===o?o:o.trim()})),_defineProperty$1(this,"createNewWYSIWYGForTrackingPages",(function(){var e;t._currentURL=null===(e=window)||void 0===e||null===(e=e.location)||void 0===e?void 0:e.href,t._newwysiswg=document.createElement("div"),t._newwysiswg.id="apx-wr",t._newwysiswg.classList.add("apx-wrclass"),t._newwysiswg.style="z-index:99999999;visibility:visible;position:fixed;width:260px;height:50px;top:0%;left:50%;transform:translate(-50%, 0%);background:#F2F2F2;opacity:1;font-size:24px;color:white;transition:all .3s ease-out;border-radius:0%;border-bottom-left-radius:50cm;border-bottom-right-radius:50cm; user-select: none;box-shadow: rgb(0, 0, 0, 0.4) 0px 0px 6px 0px;",t.wysiwg_container=document.createElement("div"),t.wysiwg_container.classList.add("apx-wcclass"),t.wysiwg_container.style="position:relative;top:0%;left:0%;display:flex;flex-direction:row;height:50px;",t.imgContainer=document.createElement("div"),t.imgContainer.classList.add("apx-icclass"),t.imgContainer.style="background-color:#002845;border-bottom-left-radius:50cm;padding: 4px 25px 4px 30px;",t.imgContainer.innerHTML='<svg xmlns="http://www.w3.org/2000/svg" width="20" height="31" viewBox="0 0 20 31" fill="none">\n<path fill-rule="evenodd" clip-rule="evenodd" d="M18.6546 0.285222C19.1759 0.714811 19.2404 1.47412 18.7988 1.98119L7.59849 14.8419H4.48593L0.274291 9.76354C-0.154672 9.2463 -0.0713816 8.48872 0.460326 8.07143C0.992033 7.65414 1.77081 7.73516 2.19977 8.2524L5.66873 12.4352H6.45197L16.9112 0.425515C17.3528 -0.0815556 18.1333 -0.144367 18.6546 0.285222Z" fill="#FF7F33"/>\n<path fill-rule="evenodd" clip-rule="evenodd" d="M18.7534 30.7146C19.2746 30.285 19.3391 29.5257 18.8974 29.0187L8.08905 16.6122H5.04724L0.974613 21.5213C0.545563 22.0385 0.628726 22.7961 1.16036 23.2135C1.692 23.6308 2.47079 23.5499 2.89984 23.0328L6.22979 19.0189H6.94278L17.01 30.5746C17.4517 31.0816 18.2323 31.1443 18.7534 30.7146Z" fill="#00BDE1"/>\n</svg>',t.dropDownContainer=document.createElement("div"),t.dropDownContainer.classList.add("apx-ddcclass"),t.dropDownContainer.style="width:100%; display:flex; align-items: center;justify-content: center; cursor: pointer",t.dropDownText=document.createElement("div"),t.dropDownText.classList.add("apx-ddtclass"),t.dropDownText.style="color:black; font-size: 17px;",t.dropDownText.innerHTML="Track Pages",t.dropDownImage=document.createElement("div"),t.dropDownImage.classList.add("apx-ddiclass"),t.dropDownImage.style="margin-left:12px; margin-top:2px;",t.dropDownImage.innerHTML='<style>@keyframes bounce {0%, 20%, 50%, 80%, 100% {transform: translateY(0);}40% {transform: translateY(-8px);}60% {transform: translateY(-4px);}}</style><svg class = "apx-ddisvg" width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg" style = "animation: bounce 2s infinite;"><path class = "apx-" d="M2.26544 5.21182C2.19383 5.14415 2.1096 5.09126 2.01756 5.05614C1.92551 5.02103 1.82745 5.00439 1.72897 5.00718C1.6305 5.00997 1.53353 5.03212 1.44362 5.07238C1.3537 5.11264 1.2726 5.17021 1.20494 5.24182C1.13727 5.31342 1.08438 5.39765 1.04926 5.4897C1.01415 5.58174 0.997514 5.6798 1.0003 5.77828C1.00309 5.87676 1.02524 5.97372 1.0655 6.06364C1.10576 6.15355 1.16333 6.23465 1.23494 6.30232L7.98494 12.6773C8.12419 12.809 8.30855 12.8823 8.50019 12.8823C8.69182 12.8823 8.87618 12.809 9.01544 12.6773L15.7662 6.30232C15.8394 6.2351 15.8984 6.15401 15.94 6.06377C15.9816 5.97352 16.0048 5.87592 16.0083 5.77662C16.0119 5.67733 15.9956 5.57832 15.9606 5.48535C15.9255 5.39239 15.8723 5.30731 15.8041 5.23507C15.7359 5.16283 15.654 5.10486 15.5632 5.06454C15.4724 5.02421 15.3745 5.00233 15.2751 5.00017C15.1758 4.99801 15.077 5.0156 14.9845 5.05194C14.8921 5.08827 14.8077 5.14262 14.7364 5.21182L8.50019 11.1008L2.26544 5.21182Z" fill="black"/></svg>',t.dropDownContainer.appendChild(t.dropDownText),t.dropDownContainer.appendChild(t.dropDownImage),t.dropDownContainer.onclick=function(e){e.stopImmediatePropagation(),t.dropDownBox.style.display=t.dropDownExpanded?"none":"block",t.dropDownExpanded=!t.dropDownExpanded,document.querySelector(".apx-ddisvg")&&(document.querySelector(".apx-ddisvg").style.animation="none"),t.dismissDropDownOutsideClick=function(){t.dropDownExpanded&&(t.dropDownBox.style.display="none",t.dropDownExpanded=!1,document.querySelector(".apx-ddisvg")&&(document.querySelector(".apx-ddisvg").style.animation="bounce 2s infinite"),document.body.removeEventListener("click",t.dismissDropDownOutsideClick))},document.body.addEventListener("click",t.dismissDropDownOutsideClick)},t.dropDownBox=document.createElement("div"),t.dropDownBox.classList.add("apx-ddbclass"),t.dropDownBox.style="position: absolute; background-color: #ffffff; margin-top: 4px; box-shadow: rgb(0, 0, 0, 0.4) 0px 0px 6px 0px;display: none;transform: translate(10%, 0px);border-radius: 12px; width: 220px",t.dropDownBox.innerHTML='\n <style>\n .apx-b {\n background: none;\n color: black;\n border-radius: 12px;\n border: 0px;\n padding-block: 8px;\n padding-inline: 16px;\n display: block;\n font-size: 16px;\n }\n .apx-b:hover {\n background-color: rgba(255, 199, 39, 0.10);\n color: #F97316;\n}\n </style>\n <div id="apx-bh" class="apx-cr apx-bh" style="padding:12px; display: flex; flex-direction: column; gap: 8px;">\n <button class="apx-b" id="apx-start" style="display: block">\n Start Tracking\n </button>\n <button class="apx-b" id="apx-stop" style="display:block">\n Stop Tracking\n </button>\n </div>',t.wysiwg_container.appendChild(t.imgContainer),t.wysiwg_container.appendChild(t.dropDownContainer),t._newwysiswg.appendChild(t.wysiwg_container),t._newwysiswg.appendChild(t.dropDownBox),document.body.appendChild(t._newwysiswg),t.createSideForPagesSelection(),t.startTrackingButton=document.getElementById("apx-start"),t.stopTrackingButton=document.getElementById("apx-stop"),t.startTrackingButton.addEventListener("click",t.showSideBarForPagesSelection),t.stopTrackingButton.addEventListener("click",(function(){document.body.removeChild(t._newwysiswg),document.body.removeChild(t.sideBarRoot),t.removeWidgetDetails();var e=document.getElementById("apx-show-hide-icon");e&&e.remove(),t._targetElement&&t._targetElement.classList.remove("apx-highlight")}))})),_defineProperty$1(this,"createSideForPagesSelection",(function(){var e;t.sideBarRoot=document.createElement("div"),t.sideBarRoot.id="apx-sidebar-root",t.sideBarStyles=document.createElement("style"),t.sideBarStyles.innerHTML="#apx-sidebar-root {\n z-index: 99999999;\n position: fixed;\n top: 0;\n right: -370px; /* initially hide sidebar */\n width: 370px;\n height: 100%;\n background-color: #fff;\n box-shadow: -2px 0px 25.600000381469727px 0px #0000001A;\n transition: left 0.3s ease; /* animate the left property */\n}\n\n#apx-sidebar-root.apx-sidebar-open {\n right: 0; /* display sidebar */\n}\n\n#apx-sidebar-container {\n display: flex;\n flex-direction: column;\n height: 100%;\n}\n\n#apx-sidebar-container-header {\n line-height: 21.78px;\n font-family: inherit;\n font-weight: 500;\n font-size: 18px;\n padding-left: 10%;\n display: flex;\n align-items: center;\n flex-basis: 8%;\n background-color: rgb(0, 40, 69);\n color: white;\n}\n#apx-sidebar-container-content {\n flex-basis: 84%;\n}\n#apx-sidebar-container-footer {\n flex-basis: 8%;\n background-color: #F5F5F5;\n}",t.sideBarRoot.appendChild(t.sideBarStyles),t.sideBarContainer=document.createElement("div"),t.sideBarContainer.id="apx-sidebar-container",t.sideBarContainerHeader=document.createElement("div"),t.sideBarContainerHeader.id="apx-sidebar-container-header",t.sideBarContainerHeader.style="position: relative;";t.sideBarContainerHeader.innerHTML='<span>Track Page</span> <div id = "apx-closeSideBar" style = "position:absolute; top:50%; right:30px;transform: translate(0px, -50%); cursor:pointer;">'.concat('<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-x" width="24" height="24" viewBox="0 0 24 24" stroke-width="1.5" stroke="#ffffff" fill="none" stroke-linecap="round" stroke-linejoin="round">\n <path stroke="none" d="M0 0h24v24H0z" fill="none"/>\n <path d="M18 6l-12 12" />\n <path d="M6 6l12 12" />\n</svg>',"</div>"),t.sideBarContainerContent=document.createElement("div"),t.sideBarContainerContent.id="apx-sidebar-container-content",t.sideBarContentPage1=document.createElement("div"),t.sideBarContentPage1.id="apx-sidebar-content-page1",t.sideBarContentPage1.style="height: 100%;flex-direction: column; display: flex; gap: 15px;justify-content: center; align-items: center;";var n=document.createElement("div");n.classList.add("apx-sidebar-icclass"),n.style="text-align: center;",n.innerHTML='<svg width="63" height="63" viewBox="0 0 63 63" fill="none" xmlns="http://www.w3.org/2000/svg">\n<circle cx="31.5" cy="31.5" r="31.5" fill="#F5F5F5"/>\n<mask id="mask0_486_3281" style="mask-type:alpha" maskUnits="userSpaceOnUse" x="0" y="0" width="63" height="63">\n<circle cx="31.5" cy="31.5" r="31.5" fill="#F4FBFF"/>\n</mask>\n<g mask="url(#mask0_486_3281)">\n<path d="M105.511 10.3516H17.0739C14.7282 10.3516 12.8267 12.2532 12.8267 14.5988V48.3711C12.8267 50.7167 14.7282 52.6183 17.0739 52.6183H105.511C107.857 52.6183 109.758 50.7167 109.758 48.3711V14.5988C109.758 12.2532 107.857 10.3516 105.511 10.3516Z" fill="white"/>\n<path d="M108.245 10.3516H14.3397C13.5041 10.3516 12.8267 11.029 12.8267 11.8647C12.8267 12.7003 13.5041 13.3777 14.3397 13.3777H108.245C109.081 13.3777 109.758 12.7003 109.758 11.8647C109.758 11.029 109.081 10.3516 108.245 10.3516Z" fill="#263238"/>\n<path d="M15.7465 11.8629C15.7465 12.1992 15.4739 12.4717 15.1377 12.4717C14.8015 12.4717 14.5254 12.1992 14.5254 11.8629C14.5254 11.5267 14.7979 11.2542 15.1342 11.2542C15.4704 11.2542 15.7465 11.5267 15.7465 11.8629Z" fill="#FFC727"/>\n<path d="M18.2346 11.8629C18.2346 12.1992 17.9621 12.4717 17.6259 12.4717C17.2896 12.4717 17.0171 12.1992 17.0171 11.8629C17.0171 11.5267 17.2896 11.2542 17.6259 11.2542C17.9621 11.2542 18.2346 11.5267 18.2346 11.8629Z" fill="white"/>\n<path d="M20.7263 11.8629C20.7263 12.1992 20.4538 12.4717 20.1176 12.4717C19.7813 12.4717 19.5088 12.1992 19.5088 11.8629C19.5088 11.5267 19.7813 11.2542 20.1176 11.2542C20.4538 11.2542 20.7263 11.5267 20.7263 11.8629Z" fill="#455A64"/>\n<path d="M98.7756 27.9244H23.7631C21.5465 27.9244 19.7495 29.7213 19.7495 31.938C19.7495 34.1546 21.5465 35.9516 23.7631 35.9516H98.7756C100.992 35.9516 102.789 34.1546 102.789 31.938C102.789 29.7213 100.992 27.9244 98.7756 27.9244Z" fill="#EBEBEB"/>\n<path d="M39.3503 39.3599H23.4092C21.388 39.3599 19.7495 40.9984 19.7495 43.0196C19.7495 45.0408 21.388 46.6793 23.4092 46.6793H39.3503C41.3715 46.6793 43.01 45.0408 43.01 43.0196C43.01 40.9984 41.3715 39.3599 39.3503 39.3599Z" fill="#FFC727"/>\n<path d="M52.4673 42.7374L53.8229 46.0112L52.4673 46.574L51.1047 43.2753L48.8643 45.0132V35.7861L55.3271 42.3091L52.4673 42.7374Z" fill="#263238"/>\n<path d="M49.3384 33.7333V31.5" stroke="#263238" stroke-width="0.353933" stroke-miterlimit="10"/>\n<path d="M46.7939 34.827L45.2153 33.2484" stroke="#263238" stroke-width="0.353933" stroke-miterlimit="10"/>\n<path d="M45.767 37.4001H43.5337" stroke="#263238" stroke-width="0.353933" stroke-miterlimit="10"/>\n<path d="M46.8608 39.9448L45.2822 41.5269" stroke="#263238" stroke-width="0.353933" stroke-miterlimit="10"/>\n<path d="M49.4341 40.9713V43.2046" stroke="#263238" stroke-width="0.353933" stroke-miterlimit="10"/>\n<path d="M51.9785 39.8776L53.5606 41.4596" stroke="#263238" stroke-width="0.353933" stroke-miterlimit="10"/>\n<path d="M53.0049 37.3045H55.2382" stroke="#263238" stroke-width="0.353933" stroke-miterlimit="10"/>\n<path d="M51.9116 34.7598L53.4937 33.1812" stroke="#263238" stroke-width="0.353933" stroke-miterlimit="10"/>\n</g>\n</svg>';var i=document.createElement("div");i.innerHTML="<span>Click the button below to define a new page</span>",i.style="width:60%;color:#989cab;font-size:13px;text-align:center;";var o=document.createElement("div");o.style.textAlign="center";var a=document.createElement("button");a.innerHTML="Define Page",a.style="background-color:#F97316;color:#fff;font-size:13px;align-items:center;font-weight:500;font-family:inherit;height:40px;width:120px;border-radius:11px;border:#F97316;cursor:pointer;",o.appendChild(a),a.onclick=function(){t.showEventDefiningPage()},t.sideBarContentPage1.appendChild(n),t.sideBarContentPage1.appendChild(i),t.sideBarContentPage1.appendChild(o),t.sideBarContentPage2=document.createElement("div"),t.sideBarContentPage2.id="apx-sidebar-content-page2",t.sideBarContentPage2.style="height: 100%;padding-left: 10%;padding-top: 8%;display:none;",t.sideBarContentPage2.innerHTML='\n <style>\n .apx-labelnames {\n font-family: inherit;\n font-weight: 500;\n line-height: 14.52px;\n font-size: 12px;\n }\n .apx-inputfields {\n padding-left: 10%;\n box-sizing: border-box;\n margin-top: 10px;\n background-color: #F7F8F8;\n border: none;\n width: 90%;\n height: 56px;\n border-radius: 12px;\n }\n .apx-inputfields::placeholder{\n font-family:inherit;\n font-weight:400;\n font-size: 14px;\n line-height: 14px;\n }\n .apx-inputfields:focus{\n outline: 2px solid #007aff;\n }\n #apx-dynamicURL::placeholder{\n font-family:monospace;\n }\n .apx-radio-buttons {\n accent-color: indianred;\n padding-block: 12px;\n }\n </style>\n <form id="apx-Form">\n <label for="name" class="apx-labelnames">Name</label>\n <span style="color: red; font-size: smaller;">*</span><br>\n <input type="text" id="apx-evname" required class="apx-inputfields" placeholder="Enter page name"><br><br>\n <label for="description" class="apx-labelnames">Description</label><br>\n <input type="text" id="apx-evDescription" required class="apx-inputfields" placeholder="Enter page description"><br><br>\n \n <label for="type" class="apx-labelnames">Type</label><br>\n <select id="apx-evtype" required class="apx-inputfields" style="padding-left: 10%">\n <option value="app_event">App Events</option>\n <option value="client_event">Client Events</option>\n </select><br><br>\n <div class="apx-labelnames"><label>URL</label></div>\n <div class = "apx-radio-buttons">\n <input type="radio" name="apx-url" id="apx-this-page" value="Only on this page" checked> <label for="apx-this-page">Only on this page</label></div>\n <div id="apx-extraField-url" style="display: block;padding-top: 2px;\n padding-left: 6%;\n font-family: monospace;\n font-weight: 400;\n color: #007aff;">\n <span id ="apx_current_url">'.concat(t._currentURL,'</span><br>\n </div>\n <div class = "apx-radio-buttons">\n <input type="radio" name="apx-url" value="On urls that match" id="apx-selectDynamicUrl"> <label for="apx-selectDynamicUrl">On urls that match</label></div>\n <div id="apx-extraField" style="display: none;">\n <input type="url" name="apx-dynamicURL" id="apx-dynamicURL" class="apx-inputfields" required placeholder=').concat(t._currentURL,'><div style="padding-top: 4px;"><span style="font-size: 12px;"><strong>Note:</strong> Replace all the dynamic parts with *</div><br>\n </div>\n <div class = "apx-radio-buttons">\n <input type="radio" name="apx-url" id="apx-all-pages" value="All pages"> <label for="apx-all-pages">All pages</label></div><br>\n \n </form>');var r=document.createElement("div");r.id="apx-footerButtonContainerPage2",r.style="display:none;justify-content: space-between;align-items: center;height: 100%;padding-inline: 10%;";var s=document.createElement("button");s.id="apx-footerbutton1-page2",s.innerHTML="Cancel",s.style="background-color:#fff;color:#F97316;cursor:pointer;font-size:13px;font-weight:500;font-family:inherit;border-radius:11px;border:2px solid #F97316;padding: 12px;";var c=document.createElement("button");c.id="apx-submitButton",c.innerHTML="Save",c.disabled=!0,c.style="background-color:#F97316;color:#fff;font-size:13px;align-items:center;font-weight:500;font-family:inherit;border-radius:11px;border:#F97316;padding-inline: 24px;padding-block: 12px;opacity:0.2;cursor:not-allowed",r.appendChild(s),r.appendChild(c),t.sideBarContainerFooter=document.createElement("div"),t.sideBarContainerFooter.id="apx-sidebar-container-footer",t.sideBarContainerContent.appendChild(t.sideBarContentPage1),t.sideBarContainerContent.appendChild(t.sideBarContentPage2),t.sideBarContainerFooter.appendChild(r),t.sideBarContainer.appendChild(t.sideBarContainerHeader),t.sideBarContainer.appendChild(t.sideBarContainerContent),t.sideBarContainer.appendChild(t.sideBarContainerFooter),t.sideBarRoot.appendChild(t.sideBarContainer),document.body.appendChild(t.sideBarRoot),s.addEventListener("click",(function(){document.getElementById("apx-Form").reset(),t.sideBarContentPage1.style.display="flex",t.sideBarContentPage2.style.display="none",document.getElementById("apx-footerButtonContainerPage2").style.display="none"})),c.addEventListener("click",(function(e){e.preventDefault(),document.getElementById("apx-Form").requestSubmit()})),null===(e=document.getElementById("apx-closeSideBar"))||void 0===e||e.addEventListener("click",(function(){t.sideBarRoot.classList.remove("apx-sidebar-open"),t.startTrackingButton.style.display="block",document.getElementById("apx-Form").reset()})),document.getElementById("apx-Form").addEventListener("submit",(function(e){var n;e.preventDefault();var i=document.getElementById("apx-evname").value,o=(null===(n=document.getElementById("apx-evDescription"))||void 0===n?void 0:n.value)||"",a=document.getElementById("apx-evtype").value,r=document.querySelector('input[name="apx-url"]:checked'),s=document.getElementById("apx-dynamicURL").value,c={action:i,description:o,type:a,all_url:"All pages"===r.value,url:"Only on this page"===r.value?window.location.href:null,dynamicURL:"On urls that match"===r.value?s:null};t._makeSSERequest("view","","",(function(){}),(function(){}),null,null,[c]),feedBackMessagePopUp("Saved Page Event");var l=document.getElementById("close-button"),d=function(){var e=document.getElementById("apx-container");null==e||e.remove()};window.setTimeout(d,2e4),l.addEventListener("click",d),document.getElementById("apx-Form").reset(),t.sideBarRoot.classList.remove("apx-sidebar-open"),t.startTrackingButton.style.display="block",document.querySelector(".apx-ddisvg").style.animation="bounce 2s infinite",console.log(c)})),document.addEventListener("input",(function(){var e=document.getElementById("apx-evname").value,t=document.getElementById("apx-evtype").value,n=document.querySelector('input[name="apx-url"]:checked'),i=document.getElementById("apx-dynamicURL").value,o=document.getElementById("apx-this-page"),a=document.getElementById("apx-selectDynamicUrl"),r=document.getElementById("apx-submitButton");o.checked||(document.getElementById("apx-extraField-url").style.display="none"),a.checked||(document.getElementById("apx-extraField").style.display="none",document.getElementById("apx-dynamicURL").required=!1,document.getElementById("apx-dynamicURL").value=""),r.disabled=!(e&&t&&n)||"On urls that match"===n.value&&!i,r.disabled?(c.style.opacity=.2,c.style.cursor="not-allowed"):(c.style.opacity=1,c.style.cursor="pointer")})),document.getElementById("apx-selectDynamicUrl").addEventListener("change",(function(e){e.target.checked?(document.getElementById("apx-extraField").style.display="block",document.getElementById("apx-dynamicURL").required=!0):(document.getElementById("apx-extraField").style.display="none",document.getElementById("apx-dynamicURL").required=!1)})),document.getElementById("apx-this-page").addEventListener("change",(function(e){e.target.checked?document.getElementById("apx-extraField-url").style.display="block":document.getElementById("apx-extraField-url").style.display="none"}))})),_defineProperty$1(this,"showEventDefiningPage",(function(){t.sideBarContentPage1.style.display="none",t.sideBarContentPage2.style.display="block";var e=document.getElementById("apx_current_url");if(e){var n=window.location.href;e.innerHTML=n}document.getElementById("apx-footerButtonContainerPage2").style.display="flex"})),_defineProperty$1(this,"showSideBarForPagesSelection",(function(){t.sideBarRoot.classList.add("apx-sidebar-open"),t.startTrackingButton.style.display="none",t.sideBarContentPage1.style.display="flex",t.sideBarContentPage2.style.display="none";var e=document.querySelector("#apx-footerButtonContainerPage2");e&&(e.style.display="none")})),_defineProperty$1(this,"createNewWYSIWYG",(function(){t._newwysiswg=document.createElement("div"),t._newwysiswg.id="apx-wr",t._newwysiswg.classList.add("apx-wrclass"),t._newwysiswg.style="z-index:99999999;visibility:visible;position:fixed;width:260px;height:50px;top:0%;left:50%;transform:translate(-50%, 0%);background:#F2F2F2;opacity:1;font-size:24px;color:white;transition:all .3s ease-out;border-radius:0%;border-bottom-left-radius:50cm;border-bottom-right-radius:50cm; user-select: none;box-shadow: rgb(0, 0, 0, 0.4) 0px 0px 6px 0px;",t.wysiwg_container=document.createElement("div"),t.wysiwg_container.classList.add("apx-wcclass"),t.wysiwg_container.style="position:relative;top:0%;left:0%;display:flex;flex-direction:row;height:50px;",t.imgContainer=document.createElement("div"),t.imgContainer.classList.add("apx-icclass"),t.imgContainer.style="background-color:#002845;border-bottom-left-radius:50cm;padding: 4px 25px 4px 30px;",t.imgContainer.innerHTML='<svg xmlns="http://www.w3.org/2000/svg" width="20" height="31" viewBox="0 0 20 31" fill="none">\n<path fill-rule="evenodd" clip-rule="evenodd" d="M18.6546 0.285222C19.1759 0.714811 19.2404 1.47412 18.7988 1.98119L7.59849 14.8419H4.48593L0.274291 9.76354C-0.154672 9.2463 -0.0713816 8.48872 0.460326 8.07143C0.992033 7.65414 1.77081 7.73516 2.19977 8.2524L5.66873 12.4352H6.45197L16.9112 0.425515C17.3528 -0.0815556 18.1333 -0.144367 18.6546 0.285222Z" fill="#FF7F33"/>\n<path fill-rule="evenodd" clip-rule="evenodd" d="M18.7534 30.7146C19.2746 30.285 19.3391 29.5257 18.8974 29.0187L8.08905 16.6122H5.04724L0.974613 21.5213C0.545563 22.0385 0.628726 22.7961 1.16036 23.2135C1.692 23.6308 2.47079 23.5499 2.89984 23.0328L6.22979 19.0189H6.94278L17.01 30.5746C17.4517 31.0816 18.2323 31.1443 18.7534 30.7146Z" fill="#00BDE1"/>\n</svg>',t.dropDownContainer=document.createElement("div"),t.dropDownContainer.classList.add("apx-ddcclass"),t.dropDownContainer.style="width:100%; display:flex; align-items: center;justify-content: center; cursor: pointer",t.dropDownText=document.createElement("div"),t.dropDownText.classList.add("apx-ddtclass"),t.dropDownText.style="color:black; font-size: 17px;",t.dropDownText.innerHTML="Track Events",t.dropDownImage=document.createElement("div"),t.dropDownImage.classList.add("apx-ddiclass"),t.dropDownImage.style="margin-left:12px; margin-top:2px;",t.dropDownImage.innerHTML='<style>@keyframes bounce {0%, 20%, 50%, 80%, 100% {transform: translateY(0);}40% {transform: translateY(-8px);}60% {transform: translateY(-4px);}}</style><svg class = "apx-ddisvg" width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg" style = "animation: bounce 2s infinite;"><path class = "apx-" d="M2.26544 5.21182C2.19383 5.14415 2.1096 5.09126 2.01756 5.05614C1.92551 5.02103 1.82745 5.00439 1.72897 5.00718C1.6305 5.00997 1.53353 5.03212 1.44362 5.07238C1.3537 5.11264 1.2726 5.17021 1.20494 5.24182C1.13727 5.31342 1.08438 5.39765 1.04926 5.4897C1.01415 5.58174 0.997514 5.6798 1.0003 5.77828C1.00309 5.87676 1.02524 5.97372 1.0655 6.06364C1.10576 6.15355 1.16333 6.23465 1.23494 6.30232L7.98494 12.6773C8.12419 12.809 8.30855 12.8823 8.50019 12.8823C8.69182 12.8823 8.87618 12.809 9.01544 12.6773L15.7662 6.30232C15.8394 6.2351 15.8984 6.15401 15.94 6.06377C15.9816 5.97352 16.0048 5.87592 16.0083 5.77662C16.0119 5.67733 15.9956 5.57832 15.9606 5.48535C15.9255 5.39239 15.8723 5.30731 15.8041 5.23507C15.7359 5.16283 15.654 5.10486 15.5632 5.06454C15.4724 5.02421 15.3745 5.00233 15.2751 5.00017C15.1758 4.99801 15.077 5.0156 14.9845 5.05194C14.8921 5.08827 14.8077 5.14262 14.7364 5.21182L8.50019 11.1008L2.26544 5.21182Z" fill="black"/></svg>',t.dropDownContainer.appendChild(t.dropDownText),t.dropDownContainer.appendChild(t.dropDownImage),t.dropDownContainer.onclick=function(e){e.stopImmediatePropagation(),t.dropDownBox.style.display=t.dropDownExpanded?"none":"block",t.dropDownExpanded=!t.dropDownExpanded,document.querySelector(".apx-ddisvg")&&(document.querySelector(".apx-ddisvg").style.animation="none"),t.dismissDropDownOutsideClick=function(){t.dropDownExpanded&&(t.dropDownBox.style.display="none",t.dropDownExpanded=!1,document.querySelector(".apx-ddisvg")&&(document.querySelector(".apx-ddisvg").style.animation="bounce 2s infinite"),document.body.removeEventListener("click",t.dismissDropDownOutsideClick))},document.body.addEventListener("click",t.dismissDropDownOutsideClick)},t.dropDownBox=document.createElement("div"),t.dropDownBox.classList.add("apx-ddbclass"),t.dropDownBox.style="position: absolute; background-color: #ffffff; margin-top: 4px; box-shadow: rgb(0, 0, 0, 0.4) 0px 0px 6px 0px;display: none;transform: translate(10%, 0px);border-radius: 12px; width: 220px",t.dropDownBox.innerHTML='\n <style>\n .apx-b {\n background: none;\n color: black;\n border-radius: 12px;\n border: 0px;\n padding-block: 8px;\n padding-inline: 16px;\n display: block;\n font-size: 16px;\n }\n .apx-b:hover {\n background-color: rgba(255, 199, 39, 0.10);\n color: #F97316;\n}\n </style>\n <div id="apx-bh" class="apx-cr apx-bh" style="padding:12px; display: flex; flex-direction: column; gap: 8px;">\n <button class="apx-b" id="apx-start" style="display: block">\n Start Tracking\n </button>\n <button class="apx-b" id="apx-stop" style="display:block">\n Stop Tracking\n </button>\n </div>',t.wysiwg_container.appendChild(t.imgContainer),t.wysiwg_container.appendChild(t.dropDownContainer),t._newwysiswg.appendChild(t.wysiwg_container),t._newwysiswg.appendChild(t.dropDownBox),t._newwysiswg&&document.body.appendChild(t._newwysiswg),t.startTrackingButton=document.getElementById("apx-start"),t.stopTrackingButton=document.getElementById("apx-stop"),t.startTrackingButton.addEventListener("click",t._viewSelectionHandler),t.stopTrackingButton.addEventListener("click",(function(){document.body.removeChild(t._newwysiswg),t._sideBar&&document.body.removeChild(t._sideBar),t.removeWidgetDetails();var e=document.getElementById("apx-view-sidebar-root");e&&e.remove();var n=document.getElementById("apx-show-hide-icon");n&&n.remove(),t._targetElement&&t._targetElement.classList.remove("apx-highlight")}))})),_defineProperty$1(this,"createEventsSideBar",(function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=function(){t._newwysiswg.style.display="block",window.removeEventListener("mouseover",onMouseOver,!0),window.removeEventListener("mouseout",onMouseOut,!0),window.removeEventListener("click",t.clickListener,!0),t.createEventsSideBar(),document.removeEventListener("keydown",t.escListenerforevents);var e=document.querySelector(".apx-esc");e&&document.body.removeChild(e)},o=document.createElement("div");o.classList.add("apx-esc"),o.style="z-index:99999999;position:fixed;top:80%;left:50%;transform:translate(-50%,-50%);padding:16px 24px;background:black;border-radius:6px;font-size:16px;color:white; cursor:move;",o.innerHTML='press <strong style="font-size: 18px">Esc</strong> to go back to view selection page',t.escListenerforevents=function(e){e.stopImmediatePropagation(),"Escape"===e.key&&i()},t._sideBar=document.createElement("div"),t._sideBar.style.position="fixed",t._sideBar.style.top="0",t._sideBar.id="apxor_sidebar",t._sideBar.classList.add("apx-sidebar-class"),t._sideBar.style.display="block",t._sideBar.style.right="-300px",t._sideBar.style.width="370px",t._sideBar.style.height="100%",t._sideBar.style.backgroundColor="#ffffff",t._sideBar.style.boxShadow="0 0 20px rgba(0, 0, 0, 0.2)",t._sideBar.style.transition="right 0.3s ease",t._sideBar.style.zIndex="9999999999",t._show_hide_toggleElement=document.createElement("div"),t._show_hide_toggleElement.id="apx-show-hide-icon",t._show_hide_toggleElement.style="width:20px;height:70px;background-color:rgb(0,40,69,0.9);position:fixed;right:369px;top:0px;color:rgb(255,255,255,0.7);transform:rotate(180deg);writing-mode:vertical-lr;text-align:center;border-top-right-radius:5px;border-bottom-right-radius:5px;cursor:pointer;z-index:99999997;display:flex;justify-content:center;align-items:center;gap:4px;",t._show_hide_toggle_text=document.createElement("div"),t._show_hide_toggle_text.innerText="hide",t._show_hide_toggleElement.appendChild(t._show_hide_toggle_text),t._toggle_icon=document.createElement("div"),t._toggle_icon.innerText="►",t._toggle_icon.style="transform:rotate(180deg);color:#ffffff;font-size:11px;",t._show_hide_toggleElement.appendChild(t._toggle_icon),t._clickHandlingForShowHideIcon(),document.body.appendChild(t._show_hide_toggleElement),t._defineEventPage=document.createElement("div"),t._defineEventPage.style.display="block",t._defineEventPage.style.zIndex="99999999";var a,r,s=document.createElement("span");s.innerText="Define Event",s.style="color:#ffffff;width:370px;height:52px;background-color:rgb(0, 40, 69);padding-left:20px;font-size:17px;font-weight:500;display:flex;align-items:center;",t._defineEventPage.appendChild(s),(a=document.createElement("div")).style="top:15px;position:absolute;width:20px;height:20px;float:right;right:10px;cursor:pointer;",a.innerHTML='<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-x" width="20" height="20" viewBox="0 0 24 24" stroke-width="1.5" stroke="#ffffff" fill="#ffffff" stroke-linecap="round" stroke-linejoin="round">\n <path stroke="none" d="M0 0h24v24H0z" fill="none"/>\n <path d="M18 6l-12 12" />\n <path d="M6 6l12 12" />',t._defineEventPage.appendChild(a),a.onclick=function(){var e,n;t._sideBar.style.display="none",t._newwysiswg.style.display="block",t.startTrackingButton.style.display="block",null===(e=t._targetElement)||void 0===e||e.classList.remove("apx-highlight"),null===(n=t._show_hide_toggleElement)||void 0===n||n.remove();var i=document.getElementById("apx-show-hide-icon");i&&i.remove()},(r=document.createElement("div")).classList.add("apx-icclass"),r.style="top:280px;position:absolute;width:80px;height:80px;padding-left:145px;",r.innerHTML='<svg width="63" height="63" viewBox="0 0 63 63" fill="none" xmlns="http://www.w3.org/2000/svg">\n<circle cx="31.5" cy="31.5" r="31.5" fill="#F5F5F5"/>\n<mask id="mask0_486_3281" style="mask-type:alpha" maskUnits="userSpaceOnUse" x="0" y="0" width="63" height="63">\n<circle cx="31.5" cy="31.5" r="31.5" fill="#F4FBFF"/>\n</mask>\n<g mask="url(#mask0_486_3281)">\n<path d="M105.511 10.3516H17.0739C14.7282 10.3516 12.8267 12.2532 12.8267 14.5988V48.3711C12.8267 50.7167 14.7282 52.6183 17.0739 52.6183H105.511C107.857 52.6183 109.758 50.7167 109.758 48.3711V14.5988C109.758 12.2532 107.857 10.3516 105.511 10.3516Z" fill="white"/>\n<path d="M108.245 10.3516H14.3397C13.5041 10.3516 12.8267 11.029 12.8267 11.8647C12.8267 12.7003 13.5041 13.3777 14.3397 13.3777H108.245C109.081 13.3777 109.758 12.7003 109.758 11.8647C109.758 11.029 109.081 10.3516 108.245 10.3516Z" fill="#263238"/>\n<path d="M15.7465 11.8629C15.7465 12.1992 15.4739 12.4717 15.1377 12.4717C14.8015 12.4717 14.5254 12.1992 14.5254 11.8629C14.5254 11.5267 14.7979 11.2542 15.1342 11.2542C15.4704 11.2542 15.7465 11.5267 15.7465 11.8629Z" fill="#FFC727"/>\n<path d="M18.2346 11.8629C18.2346 12.1992 17.9621 12.4717 17.6259 12.4717C17.2896 12.4717 17.0171 12.1992 17.0171 11.8629C17.0171 11.5267 17.2896 11.2542 17.6259 11.2542C17.9621 11.2542 18.2346 11.5267 18.2346 11.8629Z" fill="white"/>\n<path d="M20.7263 11.8629C20.7263 12.1992 20.4538 12.4717 20.1176 12.4717C19.7813 12.4717 19.5088 12.1992 19.5088 11.8629C19.5088 11.5267 19.7813 11.2542 20.1176 11.2542C20.4538 11.2542 20.7263 11.5267 20.7263 11.8629Z" fill="#455A64"/>\n<path d="M98.7756 27.9244H23.7631C21.5465 27.9244 19.7495 29.7213 19.7495 31.938C19.7495 34.1546 21.5465 35.9516 23.7631 35.9516H98.7756C100.992 35.9516 102.789 34.1546 102.789 31.938C102.789 29.7213 100.992 27.9244 98.7756 27.9244Z" fill="#EBEBEB"/>\n<path d="M39.3503 39.3599H23.4092C21.388 39.3599 19.7495 40.9984 19.7495 43.0196C19.7495 45.0408 21.388 46.6793 23.4092 46.6793H39.3503C41.3715 46.6793 43.01 45.0408 43.01 43.0196C43.01 40.9984 41.3715 39.3599 39.3503 39.3599Z" fill="#FFC727"/>\n<path d="M52.4673 42.7374L53.8229 46.0112L52.4673 46.574L51.1047 43.2753L48.8643 45.0132V35.7861L55.3271 42.3091L52.4673 42.7374Z" fill="#263238"/>\n<path d="M49.3384 33.7333V31.5" stroke="#263238" stroke-width="0.353933" stroke-miterlimit="10"/>\n<path d="M46.7939 34.827L45.2153 33.2484" stroke="#263238" stroke-width="0.353933" stroke-miterlimit="10"/>\n<path d="M45.767 37.4001H43.5337" stroke="#263238" stroke-width="0.353933" stroke-miterlimit="10"/>\n<path d="M46.8608 39.9448L45.2822 41.5269" stroke="#263238" stroke-width="0.353933" stroke-miterlimit="10"/>\n<path d="M49.4341 40.9713V43.2046" stroke="#263238" stroke-width="0.353933" stroke-miterlimit="10"/>\n<path d="M51.9785 39.8776L53.5606 41.4596" stroke="#263238" stroke-width="0.353933" stroke-miterlimit="10"/>\n<path d="M53.0049 37.3045H55.2382" stroke="#263238" stroke-width="0.353933" stroke-miterlimit="10"/>\n<path d="M51.9116 34.7598L53.4937 33.1812" stroke="#263238" stroke-width="0.353933" stroke-miterlimit="10"/>\n</g>\n</svg>',t._defineEventPage.appendChild(r);var c=document.createElement("span");c.innerText="Click the button below to define \n a new event by clicking on any \n element on the page.",c.style="color:#989cab;top:360px;font-size:14px;padding-left:80px;position:absolute;text-align:center;",t._defineEventPage.appendChild(c);var l=document.createElement("button");l.innerText="Define Event",l.style="background-color:#F97316;color:#fff;font-size:13px;align-items:center;font-weight:500;font-family:inherit;height:40px;width:120px;border-radius:11px;border:#F97316;justify-content:center;display:flex;position:absolute;top:430px;left:33%;cursor:pointer;",e||(t._defineEventPage.style.display="block"),e&&t._defineEventPage&&(t._defineEventPage.style.display="none"),l.addEventListener("click",(function(){t._newwysiswg.style.display="none",document.body.appendChild(o);var e=document.getElementById("apx-show-hide-icon");e&&e.remove(),dragElement(o),document.addEventListener("keydown",t.escListenerforevents),t._defineEventPage&&(t._defineEventPage.style.display="none"),t._sideBar.style.display="none",t._eventPage&&(t._eventPage.style.display="none"),t._defineEventPage&&(t._defineEventPage.style.display="none"),t._selectAnElement();var n=document.querySelectorAll("#apxor_sidebar");if(n.length>0){var i,a=_createForOfIteratorHelper(n);try{for(a.s();!(i=a.n()).done;){i.value.style.display="none"}}catch(e){a.e(e)}finally{a.f()}}})),t._defineEventPage.appendChild(l),t._sideBar.appendChild(t._defineEventPage),!0===e&&(t._eventPageCreation(n),t._sideBar.appendChild(t._eventPage)),document.body.appendChild(t._sideBar),"0px"===t._sideBar.style.right?t._sideBar.style.right="-300px":t._sideBar.style.right="0px"})),_defineProperty$1(this,"hideSidebar",(function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];e?e&&(t._view_sideBar.style.right="-370px",setTimeout((function(){t._view_sideBar&&(t._view_sideBar.style.display="none")}),500)):(t._sideBar.style.right="-370px",setTimeout((function(){t._sideBar&&(t._sideBar.style.display="none")}),500))})),_defineProperty$1(this,"showSidebar",(function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];e?e&&(t._view_sideBar.style.display="flex",t._view_sideBar.style.transition="right 0.5s ease-in-out",t._view_sideBar.style.right="0"):(t._sideBar.style.display="block",t._sideBar.style.transition="right 0.5s ease-in-out",t._sideBar.style.right="0")})),_defineProperty$1(this,"_clickHandlingForShowHideIcon",(function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];t._show_hide_toggleElement.onclick=function(){if(e){if(e){var n,i,o;"flex"===(null===(n=t._view_sideBar)||void 0===n?void 0:n.style.display)||""===(null===(i=t._view_sideBar)||void 0===i?void 0:i.style.display)?(t.hideSidebar(!0),t._show_hide_toggleElement.style="width:20px;height:70px;background-color:rgb(0,40,69,0.9);position:fixed;right:0px;top:0px;color:rgb(255,255,255,0.7);transform:rotate(180deg);writing-mode:vertical-lr;text-align:center;border-top-right-radius:5px;border-bottom-right-radius:5px;cursor:pointer;z-index:99999997;display:flex;align-items:center;justify-content:center;gap:4px;",t._show_hide_toggle_text.innerText="show",t._show_hide_toggleElement.class="apx-show-hide-button-class",t._toggle_icon.style.transform="rotate(0deg)",t._show_hide_toggleElement.addEventListener("click",t._clickHandlingForShowHideIcon)):"none"===(null===(o=t._view_sideBar)||void 0===o?void 0:o.style.display)&&(t.showSidebar(!0),t._show_hide_toggleElement.style="width:20px;height:70px;background-color:rgb(0,40,69,0.9);position:fixed;right:369px;top:0px;color:rgb(255,255,255,0.7);transform:rotate(180deg);writing-mode:vertical-lr;text-align:center;border-top-right-radius:5px;border-bottom-right-radius:5px;cursor:pointer;z-index:99999997;display:flex;align-items:center;justify-content:center;gap:4px;",t._show_hide_toggle_text.innerText="hide",t._toggle_icon.style.transform="rotate(180deg)",t._show_hide_toggleElement.class="apx-show-hide-button-class",t._show_hide_toggleElement.addEventListener("click",(function(){t._clickHandlingForShowHideIcon(!0)})),document.body.appendChild(t._show_hide_toggleElement))}}else if("block"===t._sideBar.style.display){t.hideSidebar(),t._show_hide_toggleElement.style="width:20px;height:70px;background-color:rgb(0,40,69,0.9);position:fixed;right:0px;top:0px;color:rgb(255,255,255,0.7);transform:rotate(180deg);writing-mode:vertical-lr;text-align:center;border-top-right-radius:5px;border-bottom-right-radius:5px;cursor:pointer;z-index:99999997;display:flex;align-items:center;justify-content:center;gap:4px;",t._show_hide_toggle_text.innerText="show",t._show_hide_toggleElement.class="apx-show-hide-button-class",t._toggle_icon.style.transform="rotate(0deg)",t._show_hide_toggleElement.addEventListener("click",(function(){t._clickHandlingForShowHideIcon(!1)}));var a=document.getElementById("apx-view-sidebar-root");a&&"flex"==a.style.display&&t.hideSidebar(!0)}else if("none"===t._sideBar.style.display){t.showSidebar(),t._show_hide_toggleElement.style="width:20px;height:70px;background-color:rgb(0,40,69,0.9);position:fixed;right:369px;top:0px;color:rgb(255,255,255,0.7);transform:rotate(180deg);writing-mode:vertical-lr;text-align:center;border-top-right-radius:5px;border-bottom-right-radius:5px;cursor:pointer;z-index:99999997;display:flex;align-items:center;justify-content:center;gap:4px;",t._show_hide_toggle_text.innerText="hide",t._toggle_icon.style.transform="rotate(180deg)",t._show_hide_toggleElement.class="apx-show-hide-button-class",t._show_hide_toggleElement.addEventListener("click",(function(){t._clickHandlingForShowHideIcon(!1)}));var r=document.getElementById("apx-view-sidebar-root");r&&"none"==r.style.display&&t.showSidebar(!0),document.body.appendChild(t._show_hide_toggleElement)}}})),_defineProperty$1(this,"_eventPageCreation",(function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];t._eventPage=document.createElement("div"),t._eventPage.style="display:flex;z-index:99999999;flex-direction:column;gap:10px;height:100%",t._eventPage.id="apx-track-events-event-page";var n,i=document.createElement("div");i.innerText="Define Event",i.style="color:#ffffff;width:370px;height:52px;background-color:rgb(0, 40, 69);padding-left:20px;font-size:17px;font-weight:500;display:flex;align-items:center;flex-basis:8%",(n=document.createElement("div")).style="top:15px;position:absolute;width:20px;height:20px;float:right;right:10px;cursor:pointer;",n.innerHTML='<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-x" width="20" height="20" viewBox="0 0 24 24" stroke-width="1.5" stroke="#ffffff" fill="#ffffff" stroke-linecap="round" stroke-linejoin="round">\n <path stroke="none" d="M0 0h24v24H0z" fill="none"/>\n <path d="M18 6l-12 12" />\n <path d="M6 6l12 12" />',i.appendChild(n),t._eventPage.appendChild(i),n.onclick=function(){var e,n;t._sideBar.style.display="none",t._newwysiswg.style.display="block",t.startTrackingButton.style.display="block",null===(e=t._targetElement)||void 0===e||e.classList.remove("apx-highlight"),null===(n=t._show_hide_toggleElement)||void 0===n||n.remove();var i=document.querySelector(".apx-show-hide-button-class");i&&i.remove(),t._targetElement=null;var o=document.getElementById("apxor_sidebar");o&&o.remove();var a=document.getElementById("apx-view-sidebar-root");a&&a.remove()};var o=document.createElement("div");o.style="display:flex;flex-direction:column;flex-basis:84%;gap:10px;overflow-y:auto;";var a=document.createElement("label");a.innerText="Name ";var r=document.createElement("span");r.innerText="*",r.style="color:red;font-size:smaller",a.appendChild(r),a.htmlFor="labelInput";var s=document.createElement("input");a.style="font-size:13px;color:#000;padding-left:20px;font-weight:500;font-family:inherit;",s.style="height:42px;background-color:#EDEEF3;color:#313957;padding-left:20px;border:none;border-radius:12px;margin-left:20px;cursor:pointer;font-size:14px;flex-shrink:0;margin-right:15px;",s.placeholder="Enter event name ",s.setAttribute("required",""),s.id="labelInput",s.addEventListener("input",(function(e){t._eventName=e.target.value,t._urlInEventObj&&(X.style.cursor="pointer",X.style.backgroundColor="#F97316",X.disabled=!1),""==t._eventName&&(X.style.cursor="not-allowed",X.style.backgroundColor="rgba(0,40,69, 0.38)")})),o.appendChild(a),o.appendChild(s);var c=document.createElement("div");c.style="border-top:1px solid rgb(160,154,155,0.5);width:100%;height:1px;background-color:rgb(237,238,243)",o.appendChild(c);var l=document.createElement("label");l.innerText="Description",l.htmlFor="labelInput2";var d=document.createElement("input");l.style="font-size:13px;color:#000;padding-left:20px;font-weight:500;font-family:inherit;",d.style="height:42px;background-color:#EDEEF3;color:#313957;padding-left:20px;border:none;border-radius:12px;margin-left:20px;cursor:pointer;font-size:14px;flex-shrink:0;margin-right:15px;",d.placeholder="Enter description for Event",d.setAttribute("required",""),d.id="labelInput2",d.addEventListener("input",(function(e){t._eventDescription=e.target.value,t._urlInEventObj&&t._eventName&&(X.style.cursor="pointer",X.style.backgroundColor="#F97316",X.disabled=!1)})),o.appendChild(l),o.appendChild(d);var p=document.createElement("div");p.style="border-top:1px solid rgb(160,154,155,0.5);width:100%;height:1px;background-color:rgb(237,238,243)",o.appendChild(p);var u=document.createElement("span");u.innerText="Type",u.style="font-size:13px;color:#000;padding-left:20px;font-weight:500;font-family:inherit",o.appendChild(u);var h=document.createElement("div");h.style="display:flex;gap:70px;justify-content:left;";var g=["Click","Double Click","Right Click"],f=document.createElement("div");f.setAttribute("id","dropdownContainer"),f.style.display="inline-block";var m=document.createElement("select");m.style="height:39px;background-color:#EDEEF3;padding-left:20px;margin-left:20px;border-radius:12px;",m.setAttribute("id","myDropdown"),g.forEach((function(e){var t=document.createElement("option");t.setAttribute("value",e),t.textContent=e,t.style="font-size:14px;font-weight:500;font-style:Roboto",m.appendChild(t)})),m.selectedIndex=0,t._selectedType="click",f.appendChild(m),h.appendChild(f),m.addEventListener("change",(function(){var e=m.value;"Click"===e?t._selectedType="click":"Double Click"===e?t._selectedType="double_click":"Right Click"===e&&(t._selectedType="right_click")}));var _=["App Event","Client Event"],v=document.createElement("div");v.setAttribute("id","dropdownContainer"),v.style.display="inline-block";var b=document.createElement("select");b.style="height:39px;background-color:#EDEEF3;padding-left:20px;border-radius:12px;",b.setAttribute("id","myDropdown"),_.forEach((function(e){var t=document.createElement("option");t.setAttribute("value",e),t.textContent=e,t.style="font-size:14px;font-weight:500;font-style:Roboto",b.appendChild(t)})),b.selectedIndex=0,v.appendChild(b),h.appendChild(v),o.appendChild(h),t._selectedEventType="app_event",b.addEventListener("change",(function(){var e=b.value;"App Event"===e?t._selectedEventType="app_event":"Client Event"===e&&(t._selectedEventType="client_event")}));var y=document.createElement("div");y.style="border-top:1px solid rgb(160,154,155,0.5);width:100%;height:1px;background-color:rgb(237,238,243)",o.appendChild(y);var x=document.createElement("div");x.innerText="Selected Element's Identifier",x.style="color:#fffff;height:25px;padding-left:20px;font-size:13px;font-weight:500;display:flex;align-items:center;",o.appendChild(x);var w,C=document.createElement("span");if(w=t._selector_created,t._selectorForEvent=w,C.innerText=w,e&&(C.innerText=t._selectorToBeSent),C.id="apx-final-selector",C.style="overflow-y: auto;color:rgb(49, 57, 87);height:52px;padding-left:20px;font-size:14px;font-weight:500;display:flex;align-items:center;background-color:#EDEEF3;margin-left:20px;border-radius:12px;padding-top:5px;padding-bottom:5px;flex-shrink:0;margin-right:15px",o.appendChild(C),t._is_text_based){var E=document.createElement("div");E.innerText="Selected Element's Content",E.style="color:#fffff;height:25px;padding-left:20px;font-size:13px;font-weight:500;display:flex;align-items:center;",o.appendChild(E);var k=document.createElement("span");k.id="apx-final-text",k.style="overflow-y: auto;color:rgb(49, 57, 87);height:52px;padding-left:20px;font-size:14px;font-weight:500;display:flex;align-items:center;background-color:#EDEEF3;margin-left:20px;border-radius:12px;padding-top:5px;padding-bottom:5px;flex-shrink:0;margin-right:15px;",k.innerText=t._dynamic_content_updated,o.appendChild(k)}var S=document.createElement("input");S.type="checkbox",S.id="myCheckbox";var T=document.createElement("label");T.htmlFor="myCheckbox",T.textContent="Mark as Feature",T.style="padding-left:10px;font-size:14px;font-weight:500;";var A=document.createElement("div");A.classList.add("checkbox-container"),A.appendChild(S),A.appendChild(T),A.style="display:flex;gap:5px;padding-left:21px",o.appendChild(A),S.addEventListener("change",(function(){S.checked?t._feature_field=!0:t._feature_field=!1}));var I=document.createElement("div");I.style="border-top:1px solid rgb(160,154,155,0.5);width:100%;height:1px;background-color:rgb(237,238,243)",o.appendChild(I);var P=document.createElement("span");P.innerText="Pages",P.style="color:#fffff;padding-top:5px;padding-left:20px;font-size:13px;font-weight:500;display:flex;align-items:center;",o.appendChild(P);var O=document.createElement("span");O.innerText="Create an event when the element is \n interacted with...",O.style="color:#313957;padding-left:20px;font-size:11px;font-weight:500;display:flex;align-items:center;",o.appendChild(O);var L=document.createElement("input");L.type="radio",L.name="myRadioGroup",L.id="event_type_id",L.value="current_url",L.style.accentColor="orangered",L.checked=!0,t._is_dynamic=!1,t._urlInEventObj="url";var N=document.createElement("label");N.textContent="Only on this Page ",N.style="font-size:15px;padding-left:7px;",N.setAttribute("for",L.id);var B=document.createElement("div");B.appendChild(L),B.appendChild(N),B.classList.add("radio-item"),B.style="padding-left:20px;",B.addEventListener("click",(function(){t._is_dynamic=!1,U.style.display="none",j.style.display="none",t._urlInEventObj="url",t._eventName&&(X.style.cursor="pointer",X.style.backgroundColor="#F97316",X.disabled=!1)})),o.appendChild(B);var D=document.createElement("span"),M=window.location.href;D.innerText=M,D.style="color:#007AFF;padding-left:50px;font-size:12px;font-family:monospace;box-sizing:border-box;word-break:break-all;margin-right:5px;",o.appendChild(D);var F=document.createElement("input");F.type="radio",F.name="myRadioGroup",F.id="event_type_id2",F.value="current_url",F.style.accentColor="orangered";var $=document.createElement("label");$.textContent="For all Pages",$.style="font-size:15px;padding-left:7px;",$.setAttribute("for",F.id);var R=document.createElement("div");R.appendChild(F),R.appendChild($),R.classList.add("radio-item"),R.style="padding-left:20px;",R.addEventListener("click",(function(){t._is_dynamic=!0,U.style.display="none",j.style.display="none",t._dynamicUrl="*",t._urlInEventObj="*",t._eventName&&(X.style.cursor="pointer",X.style.backgroundColor="#F97316",X.disabled=!1)})),o.appendChild(R);var V=document.createElement("input");V.type="radio",V.id="second_label",V.name="myRadioGroup",V.value="current_url",V.style.accentColor="orangered";var H=document.createElement("label");H.textContent="On Pages that match ",H.style="font-size:15px;padding-left:7px;",H.setAttribute("for",V.id);var q=document.createElement("div");q.appendChild(V),q.appendChild(H),q.classList.add("radio-item"),q.style="padding-left:20px;",q.addEventListener("click",(function(){X.style.cursor="not-allowed",X.style.backgroundColor="rgba(0,40,69, 0.38)",t._is_dynamic=!0,U.style.display="block",j.style.display="block"})),o.appendChild(q);var U=document.createElement("input");U.style="height:42px;background-color:#EDEEF3;color:#313957;padding-left:20px;border:none;border-radius:12px;margin-left:20px;display:none;font-size:14px;flex-shrink:0;margin-right:15px;",U.placeholder="Enter the Dynamic URL",U.addEventListener("input",(function(e){var n=e.target.value;t._dynamicUrl=e.target.value,t._urlInEventObj="dynamic_url",t._eventName&&n&&""!=n&&(X.style.cursor="pointer",X.style.backgroundColor="#F97316",X.disabled=!1),""==n&&(X.style.cursor="not-allowed",X.style.backgroundColor="rgba(0,40,69, 0.38)")})),o.appendChild(U);var j=document.createElement("span");j.innerText="NOTE: Replace all the dynamic parts with *",j.style="color:rgb(0, 40, 69,0.9);padding-left:25px;font-size:13px;font-weight:600;display:flex;align-items:center;display:none;",o.appendChild(j),t._eventPage.appendChild(o);var z=document.createElement("div");z.style="display:flex;justify-content:space-between;flex-basis:8%";var W=document.createElement("button");if(W.textContent="Cancel",W.style="background-color:#fff;color:#F97316;cursor:pointer;font-size:13px;font-weight:500;font-family:inherit;height:40px;border-radius:11px;border:2px solid #F97316;margin-left:20px;padding-inline:22px;",W.onclick=function(){t._targetElement.classList.remove("apx-highlight"),t._eventPage.style.display="none",t._defineEventPage.style.display="block"},z.appendChild(W),e){W.style.display="none";var Y=document.createElement("button");Y.textContent="Back",Y.style="background-color:#fff;color:#F97316;cursor:pointer;font-size:13px;font-weight:500;font-family:inherit;height:40px;border-radius:11px;border:2px solid #F97316;margin-left:20px;padding-inline:22px;",Y.onclick=function(){var e;null===(e=t._targetElement)||void 0===e||e.classList.remove("apx-highlight"),t._eventPage.style.display="none";var n=document.querySelectorAll(".apx-sidebar-class");if(n.length>0){var i,o=_createForOfIteratorHelper(n);try{for(o.s();!(i=o.n()).done;){i.value.remove()}}catch(e){o.e(e)}finally{o.f()}}t._targetElement.classList.add("apx-highlight"),t._view_sideBar.style.display="flex"},z.appendChild(Y)}var X=document.createElement("button");X.textContent="Save",X.style="background-color:rgb(249, 115, 22,0.2);color:#fff;cursor:not-allowed;font-size:13px;font-weight:500;border:none;font-family:inherit;height:40px;border-radius:11px;margin-right:20px;padding-inline:30px;",X.disabled=!0,X.onclick=function(){t._targetElement.classList.remove("apx-highlight"),feedBackMessagePopUp("saved event <br><b>".concat(t._eventName,"</b>"));var n=document.getElementById("close-button"),i=function(){var e=document.getElementById("apx-container");null==e||e.remove()};window.setTimeout(i,2e4),n.addEventListener("click",i),t._createEventList(e),t.startTrackingButton.style.display="block",document.querySelector(".apx-ddisvg").style.animation="bounce 2s infinite",document.body.removeChild(t._sideBar),t._sideBar=null;var o=document.getElementById("apx-show-hide-icon");o&&o.remove(),t._targetElement=null;var a=document.getElementById("apxor_sidebar");a&&a.remove();var r=document.getElementById("apx-view-sidebar-root");r&&r.remove()},z.appendChild(X),t._eventPage.appendChild(z)})),_defineProperty$1(this,"_selectAnElement",(function(){var e;window.addEventListener("mouseover",onMouseOver,!0),window.addEventListener("mouseout",onMouseOut,!0),"block"===(null===(e=t._sideBar)||void 0===e||null===(e=e.style)||void 0===e?void 0:e.display)&&(t._sideBar.style.display="none"),t.clickListener=function(e){return handleDocumentOnClick(e,(function(e){t._targetElement=e,t._selector_created=t.cssPath(t._targetElement,!0),t._newwysiswg.style.display="block",window.removeEventListener("mouseover",onMouseOver,!0),window.removeEventListener("mouseout",onMouseOut,!0),window.removeEventListener("click",t.clickListener,!0),t._selectors_list=t.generateSelectorslist(t._targetElement);var n=t.cssPath(t._targetElement,!0);t._viewSelectorFound=n,t._viewText=t._targetElement.innerText.toLowerCase(),t._viewSelectionTarget=t._targetElement,t._targetElement.classList.add("apx-highlight"),"v2"===t._selection_mode&&t._createViewSideBar(!0),t._selected_element_details=[],"v1"===t._selection_mode&&t.createEventsSideBar(!0),document.removeEventListener("keydown",t.escListenerforevents);var i=document.querySelector(".apx-esc");i&&document.body.removeChild(i)}))},window.addEventListener("click",t.clickListener,!0)})),_defineProperty$1(this,"_viewSelectionHandler",(function(){var e=parseInt(localStorage.getItem("apx_modal_count"))||0;0===e?(t.modalForElementSelection(),e++,localStorage.setItem("apx_modal_count",e)):t.createEventsSideBar(),t.dropDownBox.style.display=t.dropDownExpanded?"none":"block",t.dropDownExpanded=!t.dropDownExpanded,t.startTrackingButton.style.display="none"})),_defineProperty$1(this,"_createEventList",(function(){var e,n=arguments.length>0&&void 0!==arguments[0]&&arguments[0],i=t._selectorForEvent,o=null===(e=t._selectedType)||void 0===e?void 0:e.toLowerCase(),a=t._eventName,r=t._feature_field;(isNull$1(r)||isUndefined$2(r))&&(r=!1);var s,c,l,d,p=t._eventDescription;if(n){if(n){var u,h,g=t._is_text_based,f=document.getElementById("apx-final-selector");f&&f.innerText&&(i=f.innerText),console.log(i),s=[{selector:i,is_content_based:g,content:t._avf_updated_content,events:{}}],h=t._is_dynamic?t._dynamicUrl:location.href,c=null===(u=t._selectedEventType)||void 0===u?void 0:u.toLowerCase(),s[0].events[o]={type:c,action:a,description:p,is_dynamic:t._is_dynamic,url:h,apx_feature_field:r},t._makeSSERequest("view","","",(function(){}),(function(){}),null,s),console.log("avf"),console.log(s)}}else s=[{selector:i,events:{}}],d=t._is_dynamic?t._dynamicUrl:location.href,c=null===(l=t._selectedEventType)||void 0===l?void 0:l.toLowerCase(),s[0].events[o]={type:c,action:a,description:p,is_dynamic:t._is_dynamic,url:d,apx_feature_field:r},t._makeSSERequest("view","","",(function(){}),(function(){}),null,s)})),_defineProperty$1(this,"_disableViewSelectionHandler",(function(){t._enableViewSelectionButton.style.display="block"})),_defineProperty$1(this,"tearDown",(function(){var e,n;null===(e=t._viewPickerNode)||void 0===e||e.parentNode.removeChild(t._viewPickerNode),null===(n=t._styleNode)||void 0===n||n.parentNode.removeChild(t._styleNode)})),_defineProperty$1(this,"_handleSSEResponse",(function(e,n){try{t._wysiwygRoot.dispatchEvent(new CustomEvent("preview"));var i=JSON.parse(n),o=i.cmd,a=void 0===o?"prev":o;if("prev"===a){if(null!=i&&i.ui){var r=uuid$1(36),s={configs:[{_id:r,enabled:!0,terminate_info:{auto_dismiss:!1,duration:1e3},meta:{name:APX_PREVIEW_CAMPAIGN_NAME,type:i.type},ui:i.ui}]};e._storeConfigs("SURVEY"!==i.type?0:1,s),Apxor.getController().dispatchEvent(i.type,{name:i.type,additional_info:{uuid:r,name:APX_PREVIEW_CAMPAIGN_NAME}})}else if(null!=i&&i.messages){var c=[],l=[];i.messages.forEach((function(e){"SURVEY"!==e.meta.type?l.push(e):c.push(e)})),l.length>0&&e.handleResponse(0,{configs:l}),c.length>0&&e.handleResponse(1,{configs:c})}}else"relaunch"===a&&(t.showToastMessagePopUp(APX_RELAUNCH_CONFIG),t._isShowingToastPopup=!1)}catch(e){console.error(e)}})),_defineProperty$1(this,"_hideSelectionMode",(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:OFF_HTML;if(t.isSelectionMode){window.removeEventListener("mouseover",onMouseOver,!0),window.removeEventListener("mouseout",onMouseOut,!0),window.removeEventListener("click",t.clickListener,!0);for(var n=document.querySelectorAll(".apx-highlight"),i=0;i<n.length;i++){var o=n[i];o.classList.remove("apx-highlight")}t._hideToast(!0,e),t.isSelectionMode=!1}})),_defineProperty$1(this,"_hideToast",(function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:OFF_HTML;t._viewPickerNode.style.visibility="visible",e?(t._viewPickerNode.innerHTML=n,t._viewPickerNode.style.opacity=1):(t._viewPickerNode.innerHTML=ON_HTML,t._viewPickerNode.style.opacity=1),setTimeout((function(){t._viewPickerNode.style.opacity=0,t._viewPickerNode.style.visibility="hidden"}),1e3)})),_defineProperty$1(this,"_showAddTestDeviceDialog",(function(e){var n=createDialog$1(500,20,{}),i=n.children[0];i.style.flex="0 1 auto",i.style.maxHeight="calc(100% - 96px)",i.style.display="flex",i.style.flexDirection="column";var o=Apxor.getController().getDevInfo(),a=Apxor.getController().getUserAttributes().apx_browser,r=o.hardware_model,s=o.os_version,c=o.id,l="\n ".concat('<style>\n .apx-loading{\n background:#333 url(\'https://code.jquery.com/mobile/1.3.1/images/ajax-loader.gif\') no-repeat 50% 50%;\n -webkit-transition:background-color 0;transition:background-color 0;opacity: 1;\n -webkit-transition:opacity 1;transition:opacity 1\n }\n .apx-t{\n flex:0 0 auto;\n margin:0;\n padding:24px 24px 20px\n }\n .apx-tt{\n text-align: center;\n color:rgba(0,72,114,0.87);\n font-size:1.3125rem;\n font-weight:500;\n font-family: inherit, \'Helvetica\', \'Arial\', sans-serif;\n line-height: 1.16667em;\n margin:0\n }\n .apx-c{\n flex:1 1 auto;padding:0 24px 24px;overflow-y: auto\n }\n .apx-de{\n line-height:1.5;color:rgba(0,72,114,0.54);font-size:1rem;font-weight:400;\n font-family:inherit, "Helvetica", "Arial", sans-serif;margin:0;display:block\n }\n .apx-id{\n width:100%;margin-top:8px;margin-bottom:4px;margin:0;border:0;flex-direction:column;\n display:inline-flex;padding:0;position:relative;min-width:0;vertical-align:top\n }\n .apx-il{\n transition:color 200ms cubic-bezier(0.0, 0, 0.2, 1) 0ms,transform 200ms cubic-bezier(0.0, 0, 0.2, 1) 0ms;\n transform:translate(0, 21px) scale(1);top:0;left:0;position:absolute;\n color:rgba(0,72,114, 0.54);padding: 0;font-size: 1rem;transform-origin:top left;\n font-family: inherit, "Helvetica", "Arial", sans-serif;line-height: 1\n }\n .apx-il-f{\n transform:translate(0, 1.5px) scale(0.75)\n }\n label + .apx-iid {\n margin-top:16px;position:relative;width: 100%;color: rgba(0,72,114, 0.87);\n cursor: text;display: inline-flex;font-size: 1rem;\n font-family:inherit, "Helvetica", "Arial", sans-serif;\n line-height: 1.1875em;align-items: center\n }\n .apx-iid.apx-iid-f:after{\n transform:scaleX(1)\n }\n .apx-iid:hover:before{\n border-bottom: 2px solid rgba(0,72,114, 0.87)\n }\n .apx-iid:before{\n left: 0;right: 0;bottom: 0;content: \'\\00a0\';position: absolute;\n transition: border-bottom-color 200ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;\n border-bottom: 1px solid rgba(0, 0, 0, 0.42);pointer-events: none\n }\n .apx-iid:after{\n left: 0;right: 0;bottom: 0;content: "";position: absolute;transform: scaleX(0);\n transition: transform 200ms cubic-bezier(0.0, 0, 0.2, 1) 0ms;\n border-bottom: 2px solid rgb(44, 56, 126);pointer-events: none\n }\n .apx-ii{\n padding-top:3px;font: inherit;color: currentColor;width: 100%;border: 0;margin: 0;\n display: block;min-width: 0;box-sizing: content-box;background: none;padding: 6px 0 7px;outline:0\n }\n .apx-ul{\n padding-top:8px;padding-bottom:8px;margin:0;padding:0;position:relative;list-style:none\n }\n .apx-li{\n padding-left:16px;padding-right:16px;width:100%;display:flex;list-style:none;\n position:relative;box-sizing:border-box;text-align:left;align-items:center;\n padding-top:11px;padding-bottom:11px;justify-content:flex-start;text-decoration:none\n }\n .apx-lid:first-child{\n padding-left:0\n }\n .apx-lid{\n flex:1 1 auto;padding:0 16px;min-width:0\n }\n .apx-lids{\n color:rgba(0,72,114, 0.87);font-weight:400;line-height:1.5em;\n font-family:inherit, "Helvetica", "Arial", sans-seriffont-size:1rem\n }\n .apx-a{\n flex:0 0 auto;margin:8px 4px;display:flex;align-items:center;justify-content:flex-end\n }\n .apx-b{\n font-size:0.875rem;min-width:64px;box-sizing:border-box;min-height:36px;border:0;\n transition:background-color 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms,box-shadow 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms,border 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;\n line-height:1.3125;font-weight:500;font-family:inherit, "Helvetica", "Arial", sans-serif;\n border-radius:4px;cursor:pointer;display:inline-flex;outline:none;\n position:relative;align-items:center;user-select:none;vertical-align:middle;\n justify-content:center;text-decoration:none;background-color:transparent\n }\n .apx-bl{\n width: 100%;display:inherit;align-items:inherit;justify-content:inherit\n }\n .apx-btr{\n top:0;left:0;width:100%;height:100%;display:block;z-index:0;position:absolute;\n overflow:hidden;border-radius:inherit;pointer-events:none\n }\n </style>\n ','\n <div>\n <div class="apx-t"><h2 class="apx-tt">Set device name</h2></div>\n <div class="apx-c">\n <div class="apx-id">\n <label class="apx-il">Device name</label>\n <div class="apx-iid">\n <input class="apx-ii" type="text" id="apx-ii" value="">\n </div>\n </div>\n <ul class="apx-ul">\n <li class="apx-li">\n <div class="apx-lid">\n <span class="apx-lids">\n <span>Model <strong style="float:right">').concat(r," - ").concat(s,'</strong></span>\n </span>\n </div>\n </li>\n <li class="apx-li">\n <div class="apx-lid">\n <span class="apx-lids">\n <span>Browser <strong style="float:right">').concat(a,'</strong></span>\n </span>\n </div>\n </li>\n <li class="apx-li">\n <div class="apx-lid">\n <span class="apx-lids">\n <span>Device ID <strong style="float:right">').concat(c,'</strong></span>\n </span>\n </div>\n </li>\n </ul>\n </div>\n <div class="apx-a">\n <button id="apx-bc" class="apx-b"><span class="apx-bl" style="color:#295e8c6b">Cancel</span><span class="apx-btr"/></button>\n <button id="apx-bd" class="apx-b"><span class="apx-bl" style="color:#295e8c">Done</span><span class="apx-btr"/></button>\n </div>\n </div>\n ');n.style.visibility="hidden",i.style.visibility="hidden",i.innerHTML=l;var d,p,u=document.getElementById("apx-ii");t.testDeviceData&&(u.value=null!==(d=null===(p=t.testDeviceData)||void 0===p?void 0:p.name)&&void 0!==d?d:"");u.onfocus=function(){u.parentNode.classList.add("apx-iid-f"),u.parentNode.parentNode.children[0].classList.add("apx-il-f")},u.onblur=function(){u.parentNode.classList.remove("apx-iid-f"),u.parentNode.parentNode.children[0].classList.remove("apx-il-f")},u.oninput=function(){""!==u.value.trim()?g.removeAttribute("disabled"):g.setAttribute("disabled","")},setTimeout((function(){n.style.visibility="visible",i.style.visibility="visible",i.classList.toggle("open"),u.parentNode.parentNode.children[0].classList.add("apx-il-f")}),100);var h=function(){i.classList.toggle("open"),setTimeout((function(){n.parentNode.removeChild(n)}),400)};document.getElementById("apx-bc").onclick=function(){h()};var g=document.getElementById("apx-bd");g.onclick=function(){i.children[1].classList.add("apx-loading"),Apxor.getController().makePostRequest(ADD_TEST_DEVICE_API.replace("<aid>",Apxor.getSiteId()),{model:r,id:c,nick_name:u.value},{apx_web_key:"WTCKFAIVAJKYJA3HCV80WIKZU98R9NJG"},(function(){var n={id:c,name:u.value};Apxor.getController().persistToStorage("_apx_td",n,!0),t.testDeviceData=n,t._makeSSERequest("select","".concat(u.value," - ").concat(c),c,(function(){i.children[1].classList.remove("apx-loading"),t._wysiwygRoot.dispatchEvent(new CustomEvent("added"))})),t.previewEventSource=new EventSource(PREVIEW_API.replace("<aid>",Apxor.getSiteId()).replace("<uid>",c)),t.artConfigEventSource=new EventSource(CONFIG_API.replace("<aid>",Apxor.getSiteId()).replace("<uid>",c)),t.previewEventSource.onmessage=t.artConfigEventSource.onmessage=function(n){n&&n.data&&"{}"!==n.data&&t._handleSSEResponse(e,n.data)},h()}),(function(){})),document.getElementById("apx-ddtd").style.display="block",document.getElementById("apx-ddtdname").innerHTML=u.value,document.getElementById("apx-ddtdid").innerHTML=c,t.dropDownBox.style.paddingTop="0px"}})),_defineProperty$1(this,"_makeSSERequest",(function(e,n,i){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:function(){},a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:function(){},r=arguments.length>5?arguments[5]:void 0,s=arguments.length>6?arguments[6]:void 0,c=arguments.length>7?arguments[7]:void 0,l=Apxor.getController().getDevInfo(),d={device_info:{id:l.id,hardware_model:l.hardware_model,os_version:l.os_version,width:l.dimensions.width,height:l.dimensions.height},screen:{image:e,navigation:n,orientation:i},layout:[]};r&&(d.find_config=r),s&&(d.events_to_register=s),c&&(d.pages_to_register=c),Apxor.getController().makePostRequest(LAYOUT_URL.replace("<aid>",Apxor.getSiteId()).replace("<uid>",t._vid),d,{},o,a)})),_defineProperty$1(this,"cssPath",(function(e,n){if(e.nodeType!==Node.ELEMENT_NODE)return"";for(var i=[],o=e;o;){var a=t._cssPathStep(o,!!n,o===e);if(!a)break;if(i.push(a),a.optimized)break;o=o.parentNode}return i.reverse(),i.join(" > ")})),_defineProperty$1(this,"_cssPathStep",(function(e,t,n){if(e.nodeType!==Node.ELEMENT_NODE)return null;var i=e.getAttribute("id");if(t){if(i)return new DOMNodePathStep$1(c(i),!0);var o=e.nodeName.toLowerCase();if("body"===o||"head"===o||"html"===o)return new DOMNodePathStep$1(e.nodeName.toLowerCase(),!0)}var a=e.nodeName.toLowerCase();if(i)return new DOMNodePathStep$1(a.toLowerCase()+c(i),!0);var r=e.parentNode;if(!r||r.nodeType===Node.DOCUMENT_NODE)return new DOMNodePathStep$1(a.toLowerCase(),!0);function s(e){var t=e.getAttribute("class");return t?t.split(/\s+/g).filter(Boolean).map((function(e){return"$"+e})):[]}function c(e){return"#"+l(e)}function l(e){if(/^-?[a-zA-Z_][a-zA-Z0-9_-]*$/.test(e))return e;var t=/^(?:[0-9]|-[0-9-]?)/.test(e),n=e.length-1;return e.replace(/./g,(function(e,i){return t&&0===i||!function(e){return!!/[a-zA-Z0-9_-]/.test(e)||e.charCodeAt(0)>=160}(e)?function(e,t){return"\\"+function(e){var t=e.charCodeAt(0).toString(16);1===t.length&&(t="0"+t);return t}(e)+(t?"":" ")}(e,i===n):e}))}for(var d=s(e),p=!1,u=!1,h=-1,g=-1,f=r.children,m=0;(-1===h||!u)&&m<f.length;++m){var _=f[m];if(_.nodeType===Node.ELEMENT_NODE)if(g+=1,_!==e){if(!u&&_.nodeName.toLowerCase()===a.toLowerCase()){p=!0;var v=new Set(d);if(v.size)for(var b=s(_),y=0;y<b.length;++y){var x=b[y];if(v.has(x)&&(v.delete(x),!v.size)){u=!0;break}}else u=!0}}else h=g}var w=a.toLowerCase();if(n&&"input"===a.toLowerCase()&&e.getAttribute("type")&&!e.getAttribute("id")&&!e.getAttribute("class")&&(w+='[type="'+e.getAttribute("type")+'"]'),u)w+=":nth-child("+(h+1)+")";else if(p)for(var C in d)w+="."+l(d[C].substr(1));return new DOMNodePathStep$1(w,!1)})),_defineProperty$1(this,"xPath",(function(e,n){if(e.nodeType===Node.DOCUMENT_NODE)return"/";for(var i=[],o=e;o;){var a=t._xPathValue(o,n);if(!a)break;if(i.push(a),a.optimized)break;o=o.parentNode}return i.reverse(),(i.length&&i[0].optimized?"":"/")+i.join("/")})),_defineProperty$1(this,"_xPathValue",(function(e,n){var i,o=t._xPathIndex(e);if(-1===o)return null;switch(e.nodeType){case Node.ELEMENT_NODE:if(n&&e.getAttribute("id"))return new DOMNodePathStep$1('//*[@id="'+e.getAttribute("id")+'"]',!0);i=e.localName;break;case Node.ATTRIBUTE_NODE:i="@"+e.nodeName;break;case Node.TEXT_NODE:case Node.CDATA_SECTION_NODE:i="text()";break;case Node.PROCESSING_INSTRUCTION_NODE:i="processing-instruction()";break;case Node.COMMENT_NODE:i="comment()";break;case Node.DOCUMENT_NODE:default:i=""}return o>0&&(i+="["+o+"]"),new DOMNodePathStep$1(i,e.nodeType===Node.DOCUMENT_NODE)})),_defineProperty$1(this,"_xPathIndex",(function(e){function t(e,t){return e===t||(e.nodeType===Node.ELEMENT_NODE&&t.nodeType===Node.ELEMENT_NODE?e.localName===t.localName:e.nodeType===t.nodeType||(e.nodeType===Node.CDATA_SECTION_NODE?Node.TEXT_NODE:e.nodeType)===(t.nodeType===Node.CDATA_SECTION_NODE?Node.TEXT_NODE:t.nodeType))}var n,i=e.parentNode?e.parentNode.children:null;if(!i)return 0;for(var o=0;o<i.length;++o)if(t(e,i[o])&&i[o]!==e){n=!0;break}if(!n)return 0;for(var a=1,r=0;r<i.length;++r)if(t(e,i[r])){if(i[r]===e)return a;++a}return-1})),_defineProperty$1(this,"modalForElementSelection",(function(){var e=document.createElement("div");e.className="modal-container";var n=document.createElement("div");n.className="modal-content";var i=document.createElement("div");i.innerHTML='<svg xmlns="http://www.w3.org/2000/svg" width="25" height="25" viewBox="0 0 32 32" fill="none">\n<path d="M14.586 16L6.29204 7.70798C6.19907 7.61501 6.12531 7.50463 6.075 7.38315C6.02468 7.26167 5.99878 7.13147 5.99878 6.99998C5.99878 6.86849 6.02468 6.73829 6.075 6.61681C6.12531 6.49534 6.19907 6.38496 6.29204 6.29198C6.38502 6.19901 6.4954 6.12525 6.61688 6.07493C6.73835 6.02462 6.86855 5.99872 7.00004 5.99872C7.13153 5.99872 7.26173 6.02462 7.38321 6.07493C7.50469 6.12525 7.61507 6.19901 7.70804 6.29198L16 14.586L24.292 6.29198C24.4798 6.10421 24.7345 5.99872 25 5.99872C25.2656 5.99872 25.5203 6.10421 25.708 6.29198C25.8958 6.47975 26.0013 6.73443 26.0013 6.99998C26.0013 7.26553 25.8958 7.52021 25.708 7.70798L17.414 16L25.708 24.292C25.8958 24.4798 26.0013 24.7344 26.0013 25C26.0013 25.2655 25.8958 25.5202 25.708 25.708C25.5203 25.8958 25.2656 26.0012 25 26.0012C24.7345 26.0012 24.4798 25.8958 24.292 25.708L16 17.414L7.70804 25.708C7.52027 25.8958 7.26559 26.0012 7.00004 26.0012C6.73449 26.0012 6.47982 25.8958 6.29204 25.708C6.10427 25.5202 5.99878 25.2655 5.99878 25C5.99878 24.7344 6.10427 24.4798 6.29204 24.292L14.586 16Z" fill="black"/></svg>',i.className="close-button";var o=document.createElement("div");o.innerHTML='<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 200 200" fill="none">\n<circle cx="100" cy="100" r="100" fill="#F5F5F5"/>\n<mask id="mask0_486_2035" style="mask-type:alpha" maskUnits="userSpaceOnUse" x="0" y="0" width="200" height="200">\n<circle cx="100" cy="100" r="100" fill="#F4FBFF"/>\n</mask>\n<g mask="url(#mask0_486_2035)">\n<path d="M334.955 32.8623H54.2021C46.7556 32.8623 40.719 38.8989 40.719 46.3455V153.559C40.719 161.005 46.7556 167.042 54.2022 167.042H334.955C342.401 167.042 348.438 161.005 348.438 153.559V46.3455C348.438 38.8989 342.401 32.8623 334.955 32.8623Z" fill="white"/>\n<path d="M343.635 32.8623H45.5224C42.8695 32.8623 40.719 35.0128 40.719 37.6657C40.719 40.3185 42.8695 42.469 45.5224 42.469H343.635C346.288 42.469 348.438 40.3185 348.438 37.6657C348.438 35.0128 346.288 32.8623 343.635 32.8623Z" fill="#263238"/>\n<path d="M49.9887 37.66C49.9887 38.7274 49.1235 39.5926 48.0561 39.5926C46.9887 39.5926 46.1123 38.7274 46.1123 37.66C46.1123 36.5926 46.9775 35.7274 48.0449 35.7274C49.1123 35.7274 49.9887 36.5926 49.9887 37.66Z" fill="#FFC727"/>\n<path d="M57.8876 37.66C57.8876 38.7274 57.0225 39.5926 55.955 39.5926C54.8876 39.5926 54.0225 38.7274 54.0225 37.66C54.0225 36.5926 54.8876 35.7274 55.955 35.7274C57.0225 35.7274 57.8876 36.5926 57.8876 37.66Z" fill="white"/>\n<path d="M65.7978 37.66C65.7978 38.7274 64.9326 39.5926 63.8652 39.5926C62.7978 39.5926 61.9326 38.7274 61.9326 37.66C61.9326 36.5926 62.7978 35.7274 63.8652 35.7274C64.9326 35.7274 65.7978 36.5926 65.7978 37.66Z" fill="#455A64"/>\n<path d="M313.573 88.6488H75.4384C68.4014 88.6488 62.6968 94.3534 62.6968 101.39C62.6968 108.427 68.4014 114.132 75.4383 114.132H313.573C320.61 114.132 326.315 108.427 326.315 101.39C326.315 94.3534 320.61 88.6488 313.573 88.6488Z" fill="#EBEBEB"/>\n<path d="M124.922 124.952H74.3148C67.8983 124.952 62.6968 130.154 62.6968 136.57C62.6968 142.987 67.8983 148.188 74.3148 148.188H124.921C131.338 148.188 136.539 142.987 136.539 136.57C136.539 130.154 131.338 124.952 124.922 124.952Z" fill="#FFC727"/>\n<path d="M166.562 135.674L170.865 146.067L166.562 147.854L162.236 137.382L155.124 142.899V113.607L175.641 134.315L166.562 135.674Z" fill="#263238"/>\n<path d="M156.629 107.09V100" stroke="#263238" stroke-width="1.1236" stroke-miterlimit="10"/>\n<path d="M148.551 110.562L143.539 105.551" stroke="#263238" stroke-width="1.1236" stroke-miterlimit="10"/>\n<path d="M145.292 118.73H138.202" stroke="#263238" stroke-width="1.1236" stroke-miterlimit="10"/>\n<path d="M148.764 126.809L143.753 131.831" stroke="#263238" stroke-width="1.1236" stroke-miterlimit="10"/>\n<path d="M156.933 130.067V137.157" stroke="#263238" stroke-width="1.1236" stroke-miterlimit="10"/>\n<path d="M165.011 126.595L170.034 131.618" stroke="#263238" stroke-width="1.1236" stroke-miterlimit="10"/>\n<path d="M168.27 118.427H175.36" stroke="#263238" stroke-width="1.1236" stroke-miterlimit="10"/>\n<path d="M164.798 110.348L169.82 105.337" stroke="#263238" stroke-width="1.1236" stroke-miterlimit="10"/>\n</g>\n</svg>',o.className="modal-image";var a=document.createElement("p");a.textContent="To track an event start by \n clicking any element on \n your site.\n",a.className="modal-text",a.style="user-select: none;color:#474747;font-size:20px;font-weight:500;font-family:inherit";var r=document.createElement("button");r.textContent="Select Element",r.className="modal-button",r.style="background-color:#F97316;color:#fff;font-size:13px;font-weight:500;font-family:inherit;height:40px;width:120px;border-radius:11px;border:#F97316",r.addEventListener("click",(function(){t.closeModal(),t._selectAnElement()})),n.appendChild(i),n.appendChild(o),n.appendChild(a),n.appendChild(r),e.appendChild(n),document.body.appendChild(e),i.addEventListener("click",(function(){t.closeModal()})),e.style="display:flex;align-items:center;justify-content:center;position:fixed;top:0%;left:0%;width:100%;height:100%;background-color:rgba(0,0,0,0.5);z-index:9999;",n.style="background-color:#fff;height:358px;width:310px;padding:20px;border-radius:10px;text-align:center;",o.style="border-radius:50%;display:flex;margin-top:20px;justify-content:center;",i.style="height:25px;width:25px;float:right;position:static;top:10px;right:10px;width:30px;height:30px;cursor:pointer"})),_defineProperty$1(this,"traverseLayouts",(function(e,n,i,o){for(var a=0;a<e.length;a++){var r=e[a];console.log("current view",r.view);var s=r.bounds;s&&n>=s.left&&n<=s.right&&i>=s.top&&i<=s.bottom&&((null==t.result||t.result.depth<=o)&&(t.result={depth:o,layout:r}),console.log(r)),t.traverseLayouts(r.views,n,i,o+1)}})),_defineProperty$1(this,"removeWidgetDetails",(function(){Apxor.getController().persistToStorage("_apx_ew",{},!0)})),this.result=null}return _createClass$1(e,[{key:"hasTagName",value:function(e){var t,n=_createForOfIteratorHelper(e);try{for(n.s();!(t=n.n()).done;){var i=t.value;if(this.isTagName(i))return i}}catch(e){n.e(e)}finally{n.f()}return""}},{key:"closeModal",value:function(){document.querySelector(".modal-container").style.display="none"}},{key:"showToastMessagePopUp",value:function(e){this._isShowingToastPopup||(this._toastInApp=new ModalInApp(e,{},"",{},(function(){}),(function(){}),(function(){}),!1,[],0),this._toastInApp.createInAppModal())}},{key:"dismissToastPopup",value:function(){document.querySelector('[class^="apx-inapp-overlay"]').remove(),this._isShowingToastPopup=!1}},{key:"resetHeartbeatTimeout",value:function(){var e=this;clearTimeout(this._heartbeatTimeout),this._heartbeatTimeout=setTimeout((function(){Logger$4.error("Missed heartbeat. Connection might be lost."),e.showToastMessagePopUp(APX_SSE_TIMEOUT_CONFIG)}),3e4)}}]),e}(),DOMNodePathStep$1=function(e,t){this.value=e,this.optimized=t||!1};DOMNodePathStep$1.prototype={toString:function(){return this.value}};var Animation=function(){function e(){var t,n,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};switch(_classCallCheck$1(this,e),this.type=getStringOrDefault(i.type,"cycle"),this.duration=getNumberOrDefault(i.duration,1),this.delay_millis=getNumberOrDefault(i.delay_millis,1e3)/1e3,this.duration_millis=getNumberOrDefault(i.duration_millis,1e3)/1e3,this.inter_count=getNumberOrDefault(i.inter_count,0),this.intra_count=getNumberOrDefault(i.intra_count,0),this.type){case"fade":this.fade_opacity=getNumberOrDefault(i.fade.opacity,50);break;case"ripple":this.rippleArea=getNumberOrDefault(i.ripple.area,8),this.rippleColor=getColorOrDefault(i.ripple.color,"#FFFFFF"),this.rippleCornerRadius=getNumberOrDefault(i.ripple.corner_radius,8),this.rippleShape=getStringOrDefault(i.ripple.shape,"rectangle");break;case"shake":this.shakeDirection=getStringOrDefault(i.shake.direction,"horizontal");break;case"shine":this.shineDirection=getStringOrDefault(i.shine.direction,"to_bottom_right"),this.shineColor=getColorOrDefault(i.shine.color,"#FFFFFF"),this.lines_gap=null==i||null===(t=i.shine)||void 0===t?void 0:t.lines_gap,this.lines=null==i||null===(n=i.shine)||void 0===n?void 0:n.lines}this.anim_function=getStringOrDefault(i.anim_function,"ease-in-out"),this.iteration_count=getNumberOrDefault(i.iteration_count,"infinite")}return _createClass$1(e,null,[{key:"isEnabled",value:function(e){return!(isUndefined$2(e)||isNull$1(e)||isEmptyObject(e))}}]),e}(),Arrow=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"#FFFFFF";_classCallCheck$1(this,e),this.arrowPosition=getNumberOrDefault(null==t?void 0:t.arrowPosition,0),this.type=getStringOrDefault(t.type,"normal"),this.color=getColorOrDefault(t.color,n),this.enable_border=t.enable_border,this.border=new Border(t.border)}return _createClass$1(e,null,[{key:"isEnabled",value:function(e){return!(isUndefined$2(e)||isNull$1(e)||isEmptyObject(e))}}]),e}(),EleHighlighterOffset=_createClass$1((function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};_classCallCheck$1(this,e),this.top=getNumberOrDefault(null==t?void 0:t.top,0),this.bottom=getNumberOrDefault(null==t?void 0:t.bottom,0),this.left=getNumberOrDefault(null==t?void 0:t.left,0),this.right=getNumberOrDefault(null==t?void 0:t.right,0)})),ElementHighlighter=_createClass$1((function e(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};_classCallCheck$1(this,e),this.shape=getStringOrDefault(n.shape,"rectangle"),this.border=new Border(n.border),this.border.opacity=getStringOrDefault(null===(t=n.border)||void 0===t?void 0:t.opacity,"1"),this.cornerRadius=getStringOrDefault(n.corner_radius,"0"),this.offsetRadius=getNumberOrDefault(n.offset_radius,0),this.offset=new EleHighlighterOffset(n.offset)})),Target$1=_createClass$1((function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};_classCallCheck$1(this,e),this.interval=getNumberOrDefault(t.interval,0),this.max_retries=getNumberOrDefault(t.max_retries,0)})),AvfText=_createClass$1((function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};_classCallCheck$1(this,e),this.type=getStringOrDefault(null==t?void 0:t.type),this.op=getStringOrDefault(null==t?void 0:t.op),this.content=null==t?void 0:t.content})),Target=_createClass$1((function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};_classCallCheck$1(this,e),this.id=getStringOrDefault(t.id,""),this.frame_id=getStringOrDefault(null==t?void 0:t.frame_id,""),this.is_text_based=null==t?void 0:t.is_content_based,this.avf_text_config=new AvfText(null==t?void 0:t.content),this.enable_retry=Boolean(null==t?void 0:t.enable_retry),this.retry=new Target$1(null==t?void 0:t.retry)})),top="top",bottom="bottom",right="right",left="left",auto="auto",basePlacements=[top,bottom,right,left],start="start",end="end",clippingParents="clippingParents",viewport="viewport",popper="popper",reference="reference",variationPlacements=basePlacements.reduce((function(e,t){return e.concat([t+"-"+start,t+"-"+end])}),[]),placements=[].concat(basePlacements,[auto]).reduce((function(e,t){return e.concat([t,t+"-"+start,t+"-"+end])}),[]),beforeRead="beforeRead",read="read",afterRead="afterRead",beforeMain="beforeMain",main="main",afterMain="afterMain",beforeWrite="beforeWrite",write="write",afterWrite="afterWrite",modifierPhases=[beforeRead,read,afterRead,beforeMain,main,afterMain,beforeWrite,write,afterWrite];function getNodeName(e){return e?(e.nodeName||"").toLowerCase():null}function getWindow(e){if(null==e)return window;if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function isElement$1(e){return e instanceof getWindow(e).Element||e instanceof Element}function isHTMLElement(e){return e instanceof getWindow(e).HTMLElement||e instanceof HTMLElement}function isShadowRoot(e){return"undefined"!=typeof ShadowRoot&&(e instanceof getWindow(e).ShadowRoot||e instanceof ShadowRoot)}function applyStyles(e){var t=e.state;Object.keys(t.elements).forEach((function(e){var n=t.styles[e]||{},i=t.attributes[e]||{},o=t.elements[e];isHTMLElement(o)&&getNodeName(o)&&(Object.assign(o.style,n),Object.keys(i).forEach((function(e){var t=i[e];!1===t?o.removeAttribute(e):o.setAttribute(e,!0===t?"":t)})))}))}function effect$2(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach((function(e){var i=t.elements[e],o=t.attributes[e]||{},a=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:n[e]).reduce((function(e,t){return e[t]="",e}),{});isHTMLElement(i)&&getNodeName(i)&&(Object.assign(i.style,a),Object.keys(o).forEach((function(e){i.removeAttribute(e)})))}))}}var applyStyles$1={name:"applyStyles",enabled:!0,phase:"write",fn:applyStyles,effect:effect$2,requires:["computeStyles"]};function getBasePlacement$1(e){return e.split("-")[0]}var max=Math.max,min=Math.min,round=Math.round;function getUAString(){var e=navigator.userAgentData;return null!=e&&e.brands&&Array.isArray(e.brands)?e.brands.map((function(e){return e.brand+"/"+e.version})).join(" "):navigator.userAgent}function isLayoutViewport(){return!/^((?!chrome|android).)*safari/i.test(getUAString())}function getBoundingClientRect(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=!1);var i=e.getBoundingClientRect(),o=1,a=1;t&&isHTMLElement(e)&&(o=e.offsetWidth>0&&round(i.width)/e.offsetWidth||1,a=e.offsetHeight>0&&round(i.height)/e.offsetHeight||1);var r=(isElement$1(e)?getWindow(e):window).visualViewport,s=!isLayoutViewport()&&n,c=(i.left+(s&&r?r.offsetLeft:0))/o,l=(i.top+(s&&r?r.offsetTop:0))/a,d=i.width/o,p=i.height/a;return{width:d,height:p,top:l,right:c+d,bottom:l+p,left:c,x:c,y:l}}function getLayoutRect(e){var t=getBoundingClientRect(e),n=e.offsetWidth,i=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-i)<=1&&(i=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:i}}function contains(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&isShadowRoot(n)){var i=t;do{if(i&&e.isSameNode(i))return!0;i=i.parentNode||i.host}while(i)}return!1}function getComputedStyle$1(e){return getWindow(e).getComputedStyle(e)}function isTableElement(e){return["table","td","th"].indexOf(getNodeName(e))>=0}function getDocumentElement(e){return((isElement$1(e)?e.ownerDocument:e.document)||window.document).documentElement}function getParentNode(e){return"html"===getNodeName(e)?e:e.assignedSlot||e.parentNode||(isShadowRoot(e)?e.host:null)||getDocumentElement(e)}function getTrueOffsetParent(e){return isHTMLElement(e)&&"fixed"!==getComputedStyle$1(e).position?e.offsetParent:null}function getContainingBlock(e){var t=/firefox/i.test(getUAString());if(/Trident/i.test(getUAString())&&isHTMLElement(e)&&"fixed"===getComputedStyle$1(e).position)return null;var n=getParentNode(e);for(isShadowRoot(n)&&(n=n.host);isHTMLElement(n)&&["html","body"].indexOf(getNodeName(n))<0;){var i=getComputedStyle$1(n);if("none"!==i.transform||"none"!==i.perspective||"paint"===i.contain||-1!==["transform","perspective"].indexOf(i.willChange)||t&&"filter"===i.willChange||t&&i.filter&&"none"!==i.filter)return n;n=n.parentNode}return null}function getOffsetParent(e){for(var t=getWindow(e),n=getTrueOffsetParent(e);n&&isTableElement(n)&&"static"===getComputedStyle$1(n).position;)n=getTrueOffsetParent(n);return n&&("html"===getNodeName(n)||"body"===getNodeName(n)&&"static"===getComputedStyle$1(n).position)?t:n||getContainingBlock(e)||t}function getMainAxisFromPlacement(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function within(e,t,n){return max(e,min(t,n))}function withinMaxClamp(e,t,n){var i=within(e,t,n);return i>n?n:i}function getFreshSideObject(){return{top:0,right:0,bottom:0,left:0}}function mergePaddingObject(e){return Object.assign({},getFreshSideObject(),e)}function expandToHashMap(e,t){return t.reduce((function(t,n){return t[n]=e,t}),{})}var toPaddingObject=function(e,t){return mergePaddingObject("number"!=typeof(e="function"==typeof e?e(Object.assign({},t.rects,{placement:t.placement})):e)?e:expandToHashMap(e,basePlacements))};function arrow(e){var t,n=e.state,i=e.name,o=e.options,a=n.elements.arrow,r=n.modifiersData.popperOffsets,s=getBasePlacement$1(n.placement),c=getMainAxisFromPlacement(s),l=[left,right].indexOf(s)>=0?"height":"width";if(a&&r){var d=toPaddingObject(o.padding,n),p=getLayoutRect(a),u="y"===c?top:left,h="y"===c?bottom:right,g=n.rects.reference[l]+n.rects.reference[c]-r[c]-n.rects.popper[l],f=r[c]-n.rects.reference[c],m=getOffsetParent(a),_=m?"y"===c?m.clientHeight||0:m.clientWidth||0:0,v=g/2-f/2,b=d[u],y=_-p[l]-d[h],x=_/2-p[l]/2+v,w=within(b,x,y),C=c;n.modifiersData[i]=((t={})[C]=w,t.centerOffset=w-x,t)}}function effect$1(e){var t=e.state,n=e.options.element,i=void 0===n?"[data-popper-arrow]":n;null!=i&&("string"!=typeof i||(i=t.elements.popper.querySelector(i)))&&contains(t.elements.popper,i)&&(t.elements.arrow=i)}var arrow$1={name:"arrow",enabled:!0,phase:"main",fn:arrow,effect:effect$1,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function getVariation(e){return e.split("-")[1]}var unsetSides={top:"auto",right:"auto",bottom:"auto",left:"auto"};function roundOffsetsByDPR(e,t){var n=e.x,i=e.y,o=t.devicePixelRatio||1;return{x:round(n*o)/o||0,y:round(i*o)/o||0}}function mapToStyles(e){var t,n=e.popper,i=e.popperRect,o=e.placement,a=e.variation,r=e.offsets,s=e.position,c=e.gpuAcceleration,l=e.adaptive,d=e.roundOffsets,p=e.isFixed,u=r.x,h=void 0===u?0:u,g=r.y,f=void 0===g?0:g,m="function"==typeof d?d({x:h,y:f}):{x:h,y:f};h=m.x,f=m.y;var _=r.hasOwnProperty("x"),v=r.hasOwnProperty("y"),b=left,y=top,x=window;if(l){var w=getOffsetParent(n),C="clientHeight",E="clientWidth";if(w===getWindow(n)&&"static"!==getComputedStyle$1(w=getDocumentElement(n)).position&&"absolute"===s&&(C="scrollHeight",E="scrollWidth"),w=w,o===top||(o===left||o===right)&&a===end)y=bottom,f-=(p&&w===x&&x.visualViewport?x.visualViewport.height:w[C])-i.height,f*=c?1:-1;if(o===left||(o===top||o===bottom)&&a===end)b=right,h-=(p&&w===x&&x.visualViewport?x.visualViewport.width:w[E])-i.width,h*=c?1:-1}var k,S=Object.assign({position:s},l&&unsetSides),T=!0===d?roundOffsetsByDPR({x:h,y:f},getWindow(n)):{x:h,y:f};return h=T.x,f=T.y,c?Object.assign({},S,((k={})[y]=v?"0":"",k[b]=_?"0":"",k.transform=(x.devicePixelRatio||1)<=1?"translate("+h+"px, "+f+"px)":"translate3d("+h+"px, "+f+"px, 0)",k)):Object.assign({},S,((t={})[y]=v?f+"px":"",t[b]=_?h+"px":"",t.transform="",t))}function computeStyles(e){var t=e.state,n=e.options,i=n.gpuAcceleration,o=void 0===i||i,a=n.adaptive,r=void 0===a||a,s=n.roundOffsets,c=void 0===s||s,l={placement:getBasePlacement$1(t.placement),variation:getVariation(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:o,isFixed:"fixed"===t.options.strategy};null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign({},t.styles.popper,mapToStyles(Object.assign({},l,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:r,roundOffsets:c})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,mapToStyles(Object.assign({},l,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:c})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}var computeStyles$1={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:computeStyles,data:{}},passive={passive:!0};function effect(e){var t=e.state,n=e.instance,i=e.options,o=i.scroll,a=void 0===o||o,r=i.resize,s=void 0===r||r,c=getWindow(t.elements.popper),l=[].concat(t.scrollParents.reference,t.scrollParents.popper);return a&&l.forEach((function(e){e.addEventListener("scroll",n.update,passive)})),s&&c.addEventListener("resize",n.update,passive),function(){a&&l.forEach((function(e){e.removeEventListener("scroll",n.update,passive)})),s&&c.removeEventListener("resize",n.update,passive)}}var eventListeners={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:effect,data:{}},hash$1={left:"right",right:"left",bottom:"top",top:"bottom"};function getOppositePlacement(e){return e.replace(/left|right|bottom|top/g,(function(e){return hash$1[e]}))}var hash={start:"end",end:"start"};function getOppositeVariationPlacement(e){return e.replace(/start|end/g,(function(e){return hash[e]}))}function getWindowScroll(e){var t=getWindow(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function getWindowScrollBarX(e){return getBoundingClientRect(getDocumentElement(e)).left+getWindowScroll(e).scrollLeft}function getViewportRect(e,t){var n=getWindow(e),i=getDocumentElement(e),o=n.visualViewport,a=i.clientWidth,r=i.clientHeight,s=0,c=0;if(o){a=o.width,r=o.height;var l=isLayoutViewport();(l||!l&&"fixed"===t)&&(s=o.offsetLeft,c=o.offsetTop)}return{width:a,height:r,x:s+getWindowScrollBarX(e),y:c}}function getDocumentRect(e){var t,n=getDocumentElement(e),i=getWindowScroll(e),o=null==(t=e.ownerDocument)?void 0:t.body,a=max(n.scrollWidth,n.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),r=max(n.scrollHeight,n.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),s=-i.scrollLeft+getWindowScrollBarX(e),c=-i.scrollTop;return"rtl"===getComputedStyle$1(o||n).direction&&(s+=max(n.clientWidth,o?o.clientWidth:0)-a),{width:a,height:r,x:s,y:c}}function isScrollParent(e){var t=getComputedStyle$1(e),n=t.overflow,i=t.overflowX,o=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+o+i)}function getScrollParent(e){return["html","body","#document"].indexOf(getNodeName(e))>=0?e.ownerDocument.body:isHTMLElement(e)&&isScrollParent(e)?e:getScrollParent(getParentNode(e))}function listScrollParents(e,t){var n;void 0===t&&(t=[]);var i=getScrollParent(e),o=i===(null==(n=e.ownerDocument)?void 0:n.body),a=getWindow(i),r=o?[a].concat(a.visualViewport||[],isScrollParent(i)?i:[]):i,s=t.concat(r);return o?s:s.concat(listScrollParents(getParentNode(r)))}function rectToClientRect(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function getInnerBoundingClientRect(e,t){var n=getBoundingClientRect(e,!1,"fixed"===t);return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}function getClientRectFromMixedType(e,t,n){return t===viewport?rectToClientRect(getViewportRect(e,n)):isElement$1(t)?getInnerBoundingClientRect(t,n):rectToClientRect(getDocumentRect(getDocumentElement(e)))}function getClippingParents(e){var t=listScrollParents(getParentNode(e)),n=["absolute","fixed"].indexOf(getComputedStyle$1(e).position)>=0&&isHTMLElement(e)?getOffsetParent(e):e;return isElement$1(n)?t.filter((function(e){return isElement$1(e)&&contains(e,n)&&"body"!==getNodeName(e)})):[]}function getClippingRect(e,t,n,i){var o="clippingParents"===t?getClippingParents(e):[].concat(t),a=[].concat(o,[n]),r=a[0],s=a.reduce((function(t,n){var o=getClientRectFromMixedType(e,n,i);return t.top=max(o.top,t.top),t.right=min(o.right,t.right),t.bottom=min(o.bottom,t.bottom),t.left=max(o.left,t.left),t}),getClientRectFromMixedType(e,r,i));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function computeOffsets(e){var t,n=e.reference,i=e.element,o=e.placement,a=o?getBasePlacement$1(o):null,r=o?getVariation(o):null,s=n.x+n.width/2-i.width/2,c=n.y+n.height/2-i.height/2;switch(a){case top:t={x:s,y:n.y-i.height};break;case bottom:t={x:s,y:n.y+n.height};break;case right:t={x:n.x+n.width,y:c};break;case left:t={x:n.x-i.width,y:c};break;default:t={x:n.x,y:n.y}}var l=a?getMainAxisFromPlacement(a):null;if(null!=l){var d="y"===l?"height":"width";switch(r){case start:t[l]=t[l]-(n[d]/2-i[d]/2);break;case end:t[l]=t[l]+(n[d]/2-i[d]/2)}}return t}function detectOverflow(e,t){void 0===t&&(t={});var n=t,i=n.placement,o=void 0===i?e.placement:i,a=n.strategy,r=void 0===a?e.strategy:a,s=n.boundary,c=void 0===s?clippingParents:s,l=n.rootBoundary,d=void 0===l?viewport:l,p=n.elementContext,u=void 0===p?popper:p,h=n.altBoundary,g=void 0!==h&&h,f=n.padding,m=void 0===f?0:f,_=mergePaddingObject("number"!=typeof m?m:expandToHashMap(m,basePlacements)),v=u===popper?reference:popper,b=e.rects.popper,y=e.elements[g?v:u],x=getClippingRect(isElement$1(y)?y:y.contextElement||getDocumentElement(e.elements.popper),c,d,r),w=getBoundingClientRect(e.elements.reference),C=computeOffsets({reference:w,element:b,strategy:"absolute",placement:o}),E=rectToClientRect(Object.assign({},b,C)),k=u===popper?E:w,S={top:x.top-k.top+_.top,bottom:k.bottom-x.bottom+_.bottom,left:x.left-k.left+_.left,right:k.right-x.right+_.right},T=e.modifiersData.offset;if(u===popper&&T){var A=T[o];Object.keys(S).forEach((function(e){var t=[right,bottom].indexOf(e)>=0?1:-1,n=[top,bottom].indexOf(e)>=0?"y":"x";S[e]+=A[n]*t}))}return S}function computeAutoPlacement(e,t){void 0===t&&(t={});var n=t,i=n.placement,o=n.boundary,a=n.rootBoundary,r=n.padding,s=n.flipVariations,c=n.allowedAutoPlacements,l=void 0===c?placements:c,d=getVariation(i),p=d?s?variationPlacements:variationPlacements.filter((function(e){return getVariation(e)===d})):basePlacements,u=p.filter((function(e){return l.indexOf(e)>=0}));0===u.length&&(u=p);var h=u.reduce((function(t,n){return t[n]=detectOverflow(e,{placement:n,boundary:o,rootBoundary:a,padding:r})[getBasePlacement$1(n)],t}),{});return Object.keys(h).sort((function(e,t){return h[e]-h[t]}))}function getExpandedFallbackPlacements(e){if(getBasePlacement$1(e)===auto)return[];var t=getOppositePlacement(e);return[getOppositeVariationPlacement(e),t,getOppositeVariationPlacement(t)]}function flip(e){var t=e.state,n=e.options,i=e.name;if(!t.modifiersData[i]._skip){for(var o=n.mainAxis,a=void 0===o||o,r=n.altAxis,s=void 0===r||r,c=n.fallbackPlacements,l=n.padding,d=n.boundary,p=n.rootBoundary,u=n.altBoundary,h=n.flipVariations,g=void 0===h||h,f=n.allowedAutoPlacements,m=t.options.placement,_=getBasePlacement$1(m),v=c||(_===m||!g?[getOppositePlacement(m)]:getExpandedFallbackPlacements(m)),b=[m].concat(v).reduce((function(e,n){return e.concat(getBasePlacement$1(n)===auto?computeAutoPlacement(t,{placement:n,boundary:d,rootBoundary:p,padding:l,flipVariations:g,allowedAutoPlacements:f}):n)}),[]),y=t.rects.reference,x=t.rects.popper,w=new Map,C=!0,E=b[0],k=0;k<b.length;k++){var S=b[k],T=getBasePlacement$1(S),A=getVariation(S)===start,I=[top,bottom].indexOf(T)>=0,P=I?"width":"height",O=detectOverflow(t,{placement:S,boundary:d,rootBoundary:p,altBoundary:u,padding:l}),L=I?A?right:left:A?bottom:top;y[P]>x[P]&&(L=getOppositePlacement(L));var N=getOppositePlacement(L),B=[];if(a&&B.push(O[T]<=0),s&&B.push(O[L]<=0,O[N]<=0),B.every((function(e){return e}))){E=S,C=!1;break}w.set(S,B)}if(C)for(var D=function(e){var t=b.find((function(t){var n=w.get(t);if(n)return n.slice(0,e).every((function(e){return e}))}));if(t)return E=t,"break"},M=g?3:1;M>0;M--){if("break"===D(M))break}t.placement!==E&&(t.modifiersData[i]._skip=!0,t.placement=E,t.reset=!0)}}var flip$1={name:"flip",enabled:!0,phase:"main",fn:flip,requiresIfExists:["offset"],data:{_skip:!1}};function getSideOffsets(e,t,n){return void 0===n&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function isAnySideFullyClipped(e){return[top,right,bottom,left].some((function(t){return e[t]>=0}))}function hide(e){var t=e.state,n=e.name,i=t.rects.reference,o=t.rects.popper,a=t.modifiersData.preventOverflow,r=detectOverflow(t,{elementContext:"reference"}),s=detectOverflow(t,{altBoundary:!0}),c=getSideOffsets(r,i),l=getSideOffsets(s,o,a),d=isAnySideFullyClipped(c),p=isAnySideFullyClipped(l);t.modifiersData[n]={referenceClippingOffsets:c,popperEscapeOffsets:l,isReferenceHidden:d,hasPopperEscaped:p},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":d,"data-popper-escaped":p})}var hide$1={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:hide};function distanceAndSkiddingToXY(e,t,n){var i=getBasePlacement$1(e),o=[left,top].indexOf(i)>=0?-1:1,a="function"==typeof n?n(Object.assign({},t,{placement:e})):n,r=a[0],s=a[1];return r=r||0,s=(s||0)*o,[left,right].indexOf(i)>=0?{x:s,y:r}:{x:r,y:s}}function offset(e){var t=e.state,n=e.options,i=e.name,o=n.offset,a=void 0===o?[0,0]:o,r=placements.reduce((function(e,n){return e[n]=distanceAndSkiddingToXY(n,t.rects,a),e}),{}),s=r[t.placement],c=s.x,l=s.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=c,t.modifiersData.popperOffsets.y+=l),t.modifiersData[i]=r}var offset$1={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:offset};function popperOffsets(e){var t=e.state,n=e.name;t.modifiersData[n]=computeOffsets({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}var popperOffsets$1={name:"popperOffsets",enabled:!0,phase:"read",fn:popperOffsets,data:{}};function getAltAxis(e){return"x"===e?"y":"x"}function preventOverflow(e){var t=e.state,n=e.options,i=e.name,o=n.mainAxis,a=void 0===o||o,r=n.altAxis,s=void 0!==r&&r,c=n.boundary,l=n.rootBoundary,d=n.altBoundary,p=n.padding,u=n.tether,h=void 0===u||u,g=n.tetherOffset,f=void 0===g?0:g,m=detectOverflow(t,{boundary:c,rootBoundary:l,padding:p,altBoundary:d}),_=getBasePlacement$1(t.placement),v=getVariation(t.placement),b=!v,y=getMainAxisFromPlacement(_),x=getAltAxis(y),w=t.modifiersData.popperOffsets,C=t.rects.reference,E=t.rects.popper,k="function"==typeof f?f(Object.assign({},t.rects,{placement:t.placement})):f,S="number"==typeof k?{mainAxis:k,altAxis:k}:Object.assign({mainAxis:0,altAxis:0},k),T=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,A={x:0,y:0};if(w){if(a){var I,P="y"===y?top:left,O="y"===y?bottom:right,L="y"===y?"height":"width",N=w[y],B=N+m[P],D=N-m[O],M=h?-E[L]/2:0,F=v===start?C[L]:E[L],$=v===start?-E[L]:-C[L],R=t.elements.arrow,V=h&&R?getLayoutRect(R):{width:0,height:0},H=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:getFreshSideObject(),q=H[P],U=H[O],j=within(0,C[L],V[L]),z=b?C[L]/2-M-j-q-S.mainAxis:F-j-q-S.mainAxis,W=b?-C[L]/2+M+j+U+S.mainAxis:$+j+U+S.mainAxis,Y=t.elements.arrow&&getOffsetParent(t.elements.arrow),X=Y?"y"===y?Y.clientTop||0:Y.clientLeft||0:0,G=null!=(I=null==T?void 0:T[y])?I:0,Q=N+W-G,Z=within(h?min(B,N+z-G-X):B,N,h?max(D,Q):D);w[y]=Z,A[y]=Z-N}if(s){var K,J="x"===y?top:left,ee="x"===y?bottom:right,te=w[x],ne="y"===x?"height":"width",ie=te+m[J],oe=te-m[ee],ae=-1!==[top,left].indexOf(_),re=null!=(K=null==T?void 0:T[x])?K:0,se=ae?ie:te-C[ne]-E[ne]-re+S.altAxis,ce=ae?te+C[ne]+E[ne]-re-S.altAxis:oe,le=h&&ae?withinMaxClamp(se,te,ce):within(h?se:ie,te,h?ce:oe);w[x]=le,A[x]=le-te}t.modifiersData[i]=A}}var preventOverflow$1={name:"preventOverflow",enabled:!0,phase:"main",fn:preventOverflow,requiresIfExists:["offset"]};function getHTMLElementScroll(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function getNodeScroll(e){return e!==getWindow(e)&&isHTMLElement(e)?getHTMLElementScroll(e):getWindowScroll(e)}function isElementScaled(e){var t=e.getBoundingClientRect(),n=round(t.width)/e.offsetWidth||1,i=round(t.height)/e.offsetHeight||1;return 1!==n||1!==i}function getCompositeRect(e,t,n){void 0===n&&(n=!1);var i=isHTMLElement(t),o=isHTMLElement(t)&&isElementScaled(t),a=getDocumentElement(t),r=getBoundingClientRect(e,o,n),s={scrollLeft:0,scrollTop:0},c={x:0,y:0};return(i||!i&&!n)&&(("body"!==getNodeName(t)||isScrollParent(a))&&(s=getNodeScroll(t)),isHTMLElement(t)?((c=getBoundingClientRect(t,!0)).x+=t.clientLeft,c.y+=t.clientTop):a&&(c.x=getWindowScrollBarX(a))),{x:r.left+s.scrollLeft-c.x,y:r.top+s.scrollTop-c.y,width:r.width,height:r.height}}function order(e){var t=new Map,n=new Set,i=[];return e.forEach((function(e){t.set(e.name,e)})),e.forEach((function(e){n.has(e.name)||function e(o){n.add(o.name),[].concat(o.requires||[],o.requiresIfExists||[]).forEach((function(i){if(!n.has(i)){var o=t.get(i);o&&e(o)}})),i.push(o)}(e)})),i}function orderModifiers(e){var t=order(e);return modifierPhases.reduce((function(e,n){return e.concat(t.filter((function(e){return e.phase===n})))}),[])}function debounce$1(e){var t;return function(){return t||(t=new Promise((function(n){Promise.resolve().then((function(){t=void 0,n(e())}))}))),t}}function mergeByName(e){var t=e.reduce((function(e,t){var n=e[t.name];return e[t.name]=n?Object.assign({},n,t,{options:Object.assign({},n.options,t.options),data:Object.assign({},n.data,t.data)}):t,e}),{});return Object.keys(t).map((function(e){return t[e]}))}var DEFAULT_OPTIONS={placement:"bottom",modifiers:[],strategy:"absolute"};function areValidElements(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return!t.some((function(e){return!(e&&"function"==typeof e.getBoundingClientRect)}))}function popperGenerator(e){void 0===e&&(e={});var t=e,n=t.defaultModifiers,i=void 0===n?[]:n,o=t.defaultOptions,a=void 0===o?DEFAULT_OPTIONS:o;return function(e,t,n){void 0===n&&(n=a);var o={placement:"bottom",orderedModifiers:[],options:Object.assign({},DEFAULT_OPTIONS,a),modifiersData:{},elements:{reference:e,popper:t},attributes:{},styles:{}},r=[],s=!1,c={state:o,setOptions:function(n){var s="function"==typeof n?n(o.options):n;l(),o.options=Object.assign({},a,o.options,s),o.scrollParents={reference:isElement$1(e)?listScrollParents(e):e.contextElement?listScrollParents(e.contextElement):[],popper:listScrollParents(t)};var d=orderModifiers(mergeByName([].concat(i,o.options.modifiers)));return o.orderedModifiers=d.filter((function(e){return e.enabled})),o.orderedModifiers.forEach((function(e){var t=e.name,n=e.options,i=void 0===n?{}:n,a=e.effect;if("function"==typeof a){var s=a({state:o,name:t,instance:c,options:i});r.push(s||function(){})}})),c.update()},forceUpdate:function(){if(!s){var e=o.elements,t=e.reference,n=e.popper;if(areValidElements(t,n)){o.rects={reference:getCompositeRect(t,getOffsetParent(n),"fixed"===o.options.strategy),popper:getLayoutRect(n)},o.reset=!1,o.placement=o.options.placement,o.orderedModifiers.forEach((function(e){return o.modifiersData[e.name]=Object.assign({},e.data)}));for(var i=0;i<o.orderedModifiers.length;i++)if(!0!==o.reset){var a=o.orderedModifiers[i],r=a.fn,l=a.options,d=void 0===l?{}:l,p=a.name;"function"==typeof r&&(o=r({state:o,options:d,name:p,instance:c})||o)}else o.reset=!1,i=-1}}},update:debounce$1((function(){return new Promise((function(e){c.forceUpdate(),e(o)}))})),destroy:function(){l(),s=!0}};if(!areValidElements(e,t))return c;function l(){r.forEach((function(e){return e()})),r=[]}return c.setOptions(n).then((function(e){!s&&n.onFirstUpdate&&n.onFirstUpdate(e)})),c}}var defaultModifiers=[eventListeners,popperOffsets$1,computeStyles$1,applyStyles$1,offset$1,flip$1,preventOverflow$1,arrow$1,hide$1],createPopper=popperGenerator({defaultModifiers:defaultModifiers}),BOX_CLASS="tippy-box",CONTENT_CLASS="tippy-content",BACKDROP_CLASS="tippy-backdrop",ARROW_CLASS="tippy-arrow",SVG_ARROW_CLASS="tippy-svg-arrow",TOUCH_OPTIONS={passive:!0,capture:!0},TIPPY_DEFAULT_APPEND_TO=function(){return document.body};function getValueAtIndexOrReturn(e,t,n){if(Array.isArray(e)){var i=e[t];return null==i?Array.isArray(n)?n[t]:n:i}return e}function isType(e,t){var n={}.toString.call(e);return 0===n.indexOf("[object")&&n.indexOf(t+"]")>-1}function invokeWithArgsOrReturn(e,t){return"function"==typeof e?e.apply(void 0,t):e}function debounce(e,t){return 0===t?e:function(i){clearTimeout(n),n=setTimeout((function(){e(i)}),t)};var n}function splitBySpaces(e){return e.split(/\s+/).filter(Boolean)}function normalizeToArray(e){return[].concat(e)}function pushIfUnique(e,t){-1===e.indexOf(t)&&e.push(t)}function unique(e){return e.filter((function(t,n){return e.indexOf(t)===n}))}function getBasePlacement(e){return e.split("-")[0]}function arrayFrom(e){return[].slice.call(e)}function removeUndefinedProps(e){return Object.keys(e).reduce((function(t,n){return void 0!==e[n]&&(t[n]=e[n]),t}),{})}function div(){return document.createElement("div")}function isElement(e){return["Element","Fragment"].some((function(t){return isType(e,t)}))}function isNodeList(e){return isType(e,"NodeList")}function isMouseEvent(e){return isType(e,"MouseEvent")}function isReferenceElement(e){return!(!e||!e._tippy||e._tippy.reference!==e)}function getArrayOfElements(e){return isElement(e)?[e]:isNodeList(e)?arrayFrom(e):Array.isArray(e)?e:arrayFrom(document.querySelectorAll(e))}function setTransitionDuration(e,t){e.forEach((function(e){e&&(e.style.transitionDuration=t+"ms")}))}function setVisibilityState(e,t){e.forEach((function(e){e&&e.setAttribute("data-state",t)}))}function getOwnerDocument(e){var t,n=normalizeToArray(e)[0];return null!=n&&null!=(t=n.ownerDocument)&&t.body?n.ownerDocument:document}function isCursorOutsideInteractiveBorder(e,t){var n=t.clientX,i=t.clientY;return e.every((function(e){var t=e.popperRect,o=e.popperState,a=e.props.interactiveBorder,r=getBasePlacement(o.placement),s=o.modifiersData.offset;if(!s)return!0;var c="bottom"===r?s.top.y:0,l="top"===r?s.bottom.y:0,d="right"===r?s.left.x:0,p="left"===r?s.right.x:0,u=t.top-i+c>a,h=i-t.bottom-l>a,g=t.left-n+d>a,f=n-t.right-p>a;return u||h||g||f}))}function updateTransitionEndListener(e,t,n){var i=t+"EventListener";["transitionend","webkitTransitionEnd"].forEach((function(t){e[i](t,n)}))}function actualContains(e,t){for(var n=t;n;){var i;if(e.contains(n))return!0;n=null==n.getRootNode||null==(i=n.getRootNode())?void 0:i.host}return!1}var currentInput={isTouch:!1},lastMouseMoveTime=0;function onDocumentTouchStart(){currentInput.isTouch||(currentInput.isTouch=!0,window.performance&&document.addEventListener("mousemove",onDocumentMouseMove))}function onDocumentMouseMove(){var e=performance.now();e-lastMouseMoveTime<20&&(currentInput.isTouch=!1,document.removeEventListener("mousemove",onDocumentMouseMove)),lastMouseMoveTime=e}function onWindowBlur(){var e=document.activeElement;if(isReferenceElement(e)){var t=e._tippy;e.blur&&!t.state.isVisible&&e.blur()}}function bindGlobalEventListeners(){document.addEventListener("touchstart",onDocumentTouchStart,TOUCH_OPTIONS),window.addEventListener("blur",onWindowBlur)}var isBrowser="undefined"!=typeof window&&"undefined"!=typeof document,isIE11=!!isBrowser&&!!window.msCrypto,pluginProps={animateFill:!1,followCursor:!1,inlinePositioning:!1,sticky:!1},renderProps={allowHTML:!1,animation:"fade",arrow:!0,content:"",inertia:!1,maxWidth:350,role:"tooltip",theme:"",zIndex:9999},defaultProps=Object.assign({appendTo:TIPPY_DEFAULT_APPEND_TO,aria:{content:"auto",expanded:"auto"},delay:0,duration:[300,250],getReferenceClientRect:null,hideOnClick:!0,ignoreAttributes:!1,interactive:!1,interactiveBorder:2,interactiveDebounce:0,moveTransition:"",offset:[0,10],onAfterUpdate:function(){},onBeforeUpdate:function(){},onCreate:function(){},onDestroy:function(){},onHidden:function(){},onHide:function(){},onMount:function(){},onShow:function(){},onShown:function(){},onTrigger:function(){},onUntrigger:function(){},onClickOutside:function(){},placement:"top",plugins:[],popperOptions:{},render:null,showOnCreate:!1,touch:!0,trigger:"mouseenter focus",triggerTarget:null},pluginProps,renderProps),defaultKeys=Object.keys(defaultProps),setDefaultProps=function(e){Object.keys(e).forEach((function(t){defaultProps[t]=e[t]}))};function getExtendedPassedProps(e){var t=(e.plugins||[]).reduce((function(t,n){var i,o=n.name,a=n.defaultValue;o&&(t[o]=void 0!==e[o]?e[o]:null!=(i=defaultProps[o])?i:a);return t}),{});return Object.assign({},e,t)}function getDataAttributeProps(e,t){return(t?Object.keys(getExtendedPassedProps(Object.assign({},defaultProps,{plugins:t}))):defaultKeys).reduce((function(t,n){var i=(e.getAttribute("data-tippy-"+n)||"").trim();if(!i)return t;if("content"===n)t[n]=i;else try{t[n]=JSON.parse(i)}catch(e){t[n]=i}return t}),{})}function evaluateProps(e,t){var n=Object.assign({},t,{content:invokeWithArgsOrReturn(t.content,[e])},t.ignoreAttributes?{}:getDataAttributeProps(e,t.plugins));return n.aria=Object.assign({},defaultProps.aria,n.aria),n.aria={expanded:"auto"===n.aria.expanded?t.interactive:n.aria.expanded,content:"auto"===n.aria.content?t.interactive?null:"describedby":n.aria.content},n}var innerHTML=function(){return"innerHTML"};function dangerouslySetInnerHTML(e,t){e[innerHTML()]=t}function createArrowElement(e){var t=div();return!0===e?t.className=ARROW_CLASS:(t.className=SVG_ARROW_CLASS,isElement(e)?t.appendChild(e):dangerouslySetInnerHTML(t,e)),t}function setContent(e,t){isElement(t.content)?(dangerouslySetInnerHTML(e,""),e.appendChild(t.content)):"function"!=typeof t.content&&(t.allowHTML?dangerouslySetInnerHTML(e,t.content):e.textContent=t.content)}function getChildren(e){var t=e.firstElementChild,n=arrayFrom(t.children);return{box:t,content:n.find((function(e){return e.classList.contains(CONTENT_CLASS)})),arrow:n.find((function(e){return e.classList.contains(ARROW_CLASS)||e.classList.contains(SVG_ARROW_CLASS)})),backdrop:n.find((function(e){return e.classList.contains(BACKDROP_CLASS)}))}}function render(e){var t=div(),n=div();n.className=BOX_CLASS,n.setAttribute("data-state","hidden"),n.setAttribute("tabindex","-1");var i=div();function o(n,i){var o=getChildren(t),a=o.box,r=o.content,s=o.arrow;i.theme?a.setAttribute("data-theme",i.theme):a.removeAttribute("data-theme"),"string"==typeof i.animation?a.setAttribute("data-animation",i.animation):a.removeAttribute("data-animation"),i.inertia?a.setAttribute("data-inertia",""):a.removeAttribute("data-inertia"),a.style.maxWidth="number"==typeof i.maxWidth?i.maxWidth+"px":i.maxWidth,i.role?a.setAttribute("role",i.role):a.removeAttribute("role"),n.content===i.content&&n.allowHTML===i.allowHTML||setContent(r,e.props),i.arrow?s?n.arrow!==i.arrow&&(a.removeChild(s),a.appendChild(createArrowElement(i.arrow))):a.appendChild(createArrowElement(i.arrow)):s&&a.removeChild(s)}return i.className=CONTENT_CLASS,i.setAttribute("data-state","hidden"),setContent(i,e.props),t.appendChild(n),n.appendChild(i),o(e.props,e.props),{popper:t,onUpdate:o}}render.$$tippy=!0;var idCounter=1,mouseMoveListeners=[],mountedInstances=[];function createTippy(e,t){var n,i,o,a,r,s,c,l=evaluateProps(e,Object.assign({},defaultProps,getExtendedPassedProps(removeUndefinedProps(t)))),d=!1,p=!1,u=!1,h=!1,g=[],f=debounce(W,l.interactiveDebounce),m=idCounter++,_=unique(l.plugins),v={id:m,reference:e,popper:div(),popperInstance:null,props:l,state:{isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},plugins:_,clearDelayTimeouts:function(){clearTimeout(n),clearTimeout(i),cancelAnimationFrame(o)},setProps:function(t){if(v.state.isDestroyed)return;L("onBeforeUpdate",[v,t]),j();var n=v.props,i=evaluateProps(e,Object.assign({},n,removeUndefinedProps(t),{ignoreAttributes:!0}));v.props=i,U(),n.interactiveDebounce!==i.interactiveDebounce&&(D(),f=debounce(W,i.interactiveDebounce));n.triggerTarget&&!i.triggerTarget?normalizeToArray(n.triggerTarget).forEach((function(e){e.removeAttribute("aria-expanded")})):i.triggerTarget&&e.removeAttribute("aria-expanded");B(),O(),x&&x(n,i);v.popperInstance&&(Q(),K().forEach((function(e){requestAnimationFrame(e._tippy.popperInstance.forceUpdate)})));L("onAfterUpdate",[v,t])},setContent:function(e){v.setProps({content:e})},show:function(){var e=v.state.isVisible,t=v.state.isDestroyed,n=!v.state.isEnabled,i=currentInput.isTouch&&!v.props.touch,o=getValueAtIndexOrReturn(v.props.duration,0,defaultProps.duration);if(e||t||n||i)return;if(T().hasAttribute("disabled"))return;if(L("onShow",[v],!1),!1===v.props.onShow(v))return;v.state.isVisible=!0,S()&&(y.style.visibility="visible");O(),R(),v.state.isMounted||(y.style.transition="none");if(S()){var a=I(),r=a.box,c=a.content;setTransitionDuration([r,c],0)}s=function(){var e;if(v.state.isVisible&&!h){if(h=!0,y.offsetHeight,y.style.transition=v.props.moveTransition,S()&&v.props.animation){var t=I(),n=t.box,i=t.content;setTransitionDuration([n,i],o),setVisibilityState([n,i],"visible")}N(),B(),pushIfUnique(mountedInstances,v),null==(e=v.popperInstance)||e.forceUpdate(),L("onMount",[v]),v.props.animation&&S()&&function(e,t){H(e,t)}(o,(function(){v.state.isShown=!0,L("onShown",[v])}))}},function(){var e,t=v.props.appendTo,n=T();e=v.props.interactive&&t===TIPPY_DEFAULT_APPEND_TO||"parent"===t?n.parentNode:invokeWithArgsOrReturn(t,[n]);e.contains(y)||e.appendChild(y);v.state.isMounted=!0,Q()}()},hide:function(){var e=!v.state.isVisible,t=v.state.isDestroyed,n=!v.state.isEnabled,i=getValueAtIndexOrReturn(v.props.duration,1,defaultProps.duration);if(e||t||n)return;if(L("onHide",[v],!1),!1===v.props.onHide(v))return;v.state.isVisible=!1,v.state.isShown=!1,h=!1,d=!1,S()&&(y.style.visibility="hidden");if(D(),V(),O(!0),S()){var o=I(),a=o.box,r=o.content;v.props.animation&&(setTransitionDuration([a,r],i),setVisibilityState([a,r],"hidden"))}N(),B(),v.props.animation?S()&&function(e,t){H(e,(function(){!v.state.isVisible&&y.parentNode&&y.parentNode.contains(y)&&t()}))}(i,v.unmount):v.unmount()},hideWithInteractivity:function(e){A().addEventListener("mousemove",f),pushIfUnique(mouseMoveListeners,f),f(e)},enable:function(){v.state.isEnabled=!0},disable:function(){v.hide(),v.state.isEnabled=!1},unmount:function(){v.state.isVisible&&v.hide();if(!v.state.isMounted)return;Z(),K().forEach((function(e){e._tippy.unmount()})),y.parentNode&&y.parentNode.removeChild(y);mountedInstances=mountedInstances.filter((function(e){return e!==v})),v.state.isMounted=!1,L("onHidden",[v])},destroy:function(){if(v.state.isDestroyed)return;v.clearDelayTimeouts(),v.unmount(),j(),delete e._tippy,v.state.isDestroyed=!0,L("onDestroy",[v])}};if(!l.render)return v;var b=l.render(v),y=b.popper,x=b.onUpdate;y.setAttribute("data-tippy-root",""),y.id="tippy-"+v.id,v.popper=y,e._tippy=v,y._tippy=v;var w=_.map((function(e){return e.fn(v)})),C=e.hasAttribute("aria-expanded");return U(),B(),O(),L("onCreate",[v]),l.showOnCreate&&J(),y.addEventListener("mouseenter",(function(){v.props.interactive&&v.state.isVisible&&v.clearDelayTimeouts()})),y.addEventListener("mouseleave",(function(){v.props.interactive&&v.props.trigger.indexOf("mouseenter")>=0&&A().addEventListener("mousemove",f)})),v;function E(){var e=v.props.touch;return Array.isArray(e)?e:[e,0]}function k(){return"hold"===E()[0]}function S(){var e;return!(null==(e=v.props.render)||!e.$$tippy)}function T(){return c||e}function A(){var e=T().parentNode;return e?getOwnerDocument(e):document}function I(){return getChildren(y)}function P(e){return v.state.isMounted&&!v.state.isVisible||currentInput.isTouch||a&&"focus"===a.type?0:getValueAtIndexOrReturn(v.props.delay,e?0:1,defaultProps.delay)}function O(e){void 0===e&&(e=!1),y.style.pointerEvents=v.props.interactive&&!e?"":"none",y.style.zIndex=""+v.props.zIndex}function L(e,t,n){var i;(void 0===n&&(n=!0),w.forEach((function(n){n[e]&&n[e].apply(n,t)})),n)&&(i=v.props)[e].apply(i,t)}function N(){var t=v.props.aria;if(t.content){var n="aria-"+t.content,i=y.id;normalizeToArray(v.props.triggerTarget||e).forEach((function(e){var t=e.getAttribute(n);if(v.state.isVisible)e.setAttribute(n,t?t+" "+i:i);else{var o=t&&t.replace(i,"").trim();o?e.setAttribute(n,o):e.removeAttribute(n)}}))}}function B(){!C&&v.props.aria.expanded&&normalizeToArray(v.props.triggerTarget||e).forEach((function(e){v.props.interactive?e.setAttribute("aria-expanded",v.state.isVisible&&e===T()?"true":"false"):e.removeAttribute("aria-expanded")}))}function D(){A().removeEventListener("mousemove",f),mouseMoveListeners=mouseMoveListeners.filter((function(e){return e!==f}))}function M(t){if(!currentInput.isTouch||!u&&"mousedown"!==t.type){var n=t.composedPath&&t.composedPath()[0]||t.target;if(!v.props.interactive||!actualContains(y,n)){if(normalizeToArray(v.props.triggerTarget||e).some((function(e){return actualContains(e,n)}))){if(currentInput.isTouch)return;if(v.state.isVisible&&v.props.trigger.indexOf("click")>=0)return}else L("onClickOutside",[v,t]);!0===v.props.hideOnClick&&(v.clearDelayTimeouts(),v.hide(),p=!0,setTimeout((function(){p=!1})),v.state.isMounted||V())}}}function F(){u=!0}function $(){u=!1}function R(){var e=A();e.addEventListener("mousedown",M,!0),e.addEventListener("touchend",M,TOUCH_OPTIONS),e.addEventListener("touchstart",$,TOUCH_OPTIONS),e.addEventListener("touchmove",F,TOUCH_OPTIONS)}function V(){var e=A();e.removeEventListener("mousedown",M,!0),e.removeEventListener("touchend",M,TOUCH_OPTIONS),e.removeEventListener("touchstart",$,TOUCH_OPTIONS),e.removeEventListener("touchmove",F,TOUCH_OPTIONS)}function H(e,t){var n=I().box;function i(e){e.target===n&&(updateTransitionEndListener(n,"remove",i),t())}if(0===e)return t();updateTransitionEndListener(n,"remove",r),updateTransitionEndListener(n,"add",i),r=i}function q(t,n,i){void 0===i&&(i=!1),normalizeToArray(v.props.triggerTarget||e).forEach((function(e){e.addEventListener(t,n,i),g.push({node:e,eventType:t,handler:n,options:i})}))}function U(){k()&&(q("touchstart",z,{passive:!0}),q("touchend",Y,{passive:!0})),splitBySpaces(v.props.trigger).forEach((function(e){if("manual"!==e)switch(q(e,z),e){case"mouseenter":q("mouseleave",Y);break;case"focus":q(isIE11?"focusout":"blur",X);break;case"focusin":q("focusout",X)}}))}function j(){g.forEach((function(e){var t=e.node,n=e.eventType,i=e.handler,o=e.options;t.removeEventListener(n,i,o)})),g=[]}function z(e){var t,n=!1;if(v.state.isEnabled&&!G(e)&&!p){var i="focus"===(null==(t=a)?void 0:t.type);a=e,c=e.currentTarget,B(),!v.state.isVisible&&isMouseEvent(e)&&mouseMoveListeners.forEach((function(t){return t(e)})),"click"===e.type&&(v.props.trigger.indexOf("mouseenter")<0||d)&&!1!==v.props.hideOnClick&&v.state.isVisible?n=!0:J(e),"click"===e.type&&(d=!n),n&&!i&&ee(e)}}function W(e){var t=e.target,n=T().contains(t)||y.contains(t);"mousemove"===e.type&&n||isCursorOutsideInteractiveBorder(K().concat(y).map((function(e){var t,n=null==(t=e._tippy.popperInstance)?void 0:t.state;return n?{popperRect:e.getBoundingClientRect(),popperState:n,props:l}:null})).filter(Boolean),e)&&(D(),ee(e))}function Y(e){G(e)||v.props.trigger.indexOf("click")>=0&&d||(v.props.interactive?v.hideWithInteractivity(e):ee(e))}function X(e){v.props.trigger.indexOf("focusin")<0&&e.target!==T()||v.props.interactive&&e.relatedTarget&&y.contains(e.relatedTarget)||ee(e)}function G(e){return!!currentInput.isTouch&&k()!==e.type.indexOf("touch")>=0}function Q(){Z();var t=v.props,n=t.popperOptions,i=t.placement,o=t.offset,a=t.getReferenceClientRect,r=t.moveTransition,c=S()?getChildren(y).arrow:null,l=a?{getBoundingClientRect:a,contextElement:a.contextElement||T()}:e,d=[{name:"offset",options:{offset:o}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5}},{name:"computeStyles",options:{adaptive:!r}},{name:"$$tippy",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(e){var t=e.state;if(S()){var n=I().box;["placement","reference-hidden","escaped"].forEach((function(e){"placement"===e?n.setAttribute("data-placement",t.placement):t.attributes.popper["data-popper-"+e]?n.setAttribute("data-"+e,""):n.removeAttribute("data-"+e)})),t.attributes.popper={}}}}];S()&&c&&d.push({name:"arrow",options:{element:c,padding:3}}),d.push.apply(d,(null==n?void 0:n.modifiers)||[]),v.popperInstance=createPopper(l,y,Object.assign({},n,{placement:i,onFirstUpdate:s,modifiers:d}))}function Z(){v.popperInstance&&(v.popperInstance.destroy(),v.popperInstance=null)}function K(){return arrayFrom(y.querySelectorAll("[data-tippy-root]"))}function J(e){v.clearDelayTimeouts(),e&&L("onTrigger",[v,e]),R();var t=P(!0),i=E(),o=i[0],a=i[1];currentInput.isTouch&&"hold"===o&&a&&(t=a),t?n=setTimeout((function(){v.show()}),t):v.show()}function ee(e){if(v.clearDelayTimeouts(),L("onUntrigger",[v,e]),v.state.isVisible){if(!(v.props.trigger.indexOf("mouseenter")>=0&&v.props.trigger.indexOf("click")>=0&&["mouseleave","mousemove"].indexOf(e.type)>=0&&d)){var t=P(!1);t?i=setTimeout((function(){v.state.isVisible&&v.hide()}),t):o=requestAnimationFrame((function(){v.hide()}))}}else V()}}function tippy(e,t){void 0===t&&(t={});var n=defaultProps.plugins.concat(t.plugins||[]);bindGlobalEventListeners();var i=Object.assign({},t,{plugins:n}),o=getArrayOfElements(e).reduce((function(e,t){var n=t&&createTippy(t,i);return n&&e.push(n),e}),[]);return isElement(e)?o[0]:o}tippy.defaultProps=defaultProps,tippy.setDefaultProps=setDefaultProps,tippy.currentInput=currentInput,Object.assign({},applyStyles$1,{effect:function(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow)}}),tippy.setDefaultProps({render:render});var Logger$3=window.ApxorLogger,InLineTooltip=function(){function e(t,n,i,o,a,r,s,c,l){var d=this,p=arguments.length>9&&void 0!==arguments[9]&&arguments[9],u=arguments.length>10&&void 0!==arguments[10]?arguments[10]:0;_classCallCheck$1(this,e),_defineProperty$1(this,"_getMarketingStyles",(function(){if(!d.enable_marketing)return"";var e=d.marketing.message,t=e.alignment;return"left"===e.alignment?t="flex-start":"right"===e.alignment&&(t="flex-end"),"\n .apx-inline-marketing".concat(d.cssPostFix," {\n align-self:").concat(t,";\n text-align:").concat(e.alignment,";\n }\n ")})),_defineProperty$1(this,"_setMarketingMessage",(function(){if(d.enable_marketing){var e=document.createElement("div");e.classList.add("apx-inline-marketing".concat(d.cssPostFix));var t=createNewTextElement(d.marketing.message,d.currentId,"marketing");e.appendChild(t),d.inLineContainer.appendChild(e)}})),this.uiConfig=t,this.uis=n,this.isWalkthrough=p,this.index=u,this.walkthroughConfigs=i,this.messageConfig=a,this.rtmInstance=r,this.currentId=makeid(10),this.configId=a.configId,this.name=a.configName,this.cssPostFix="-".concat(this.configId,"-").concat(this.name).replaceAll(" ","").replace(/[^\w\s]/gi,""),this.showCallback=s,this.closeCallback=c,this.stepperCallBack=l,this.targetDeletionObserver=null,this.viewPortObservor=null,this.tooltipShown=!1,this.terminationConfig=o,this.terminationTimeoutId=null,this.delay=t.delay,this.scrollToView=t.scrollToView||!0,this.background_color=t.bg_color||COLORS.WHITE,this.width=t.width||50,this.height=t.height||50,this.append_to=t.append_to||"parent",this.follow_cursor=t.followCursor||!1,this.interactive_border=t.interactive_border||10,this.target=new Target(t.target),this.elementHighlighter=new ElementHighlighter(t.highlighter),this.direction=new Direction(t.direction),this.position=new Position(t.position),this.enable_dismiss_actions=t.enable_dismiss_actions,this.enable_dismiss_actions&&(this.dismiss_actions=new DismissActions(t.dismiss_actions)),this.enable_dimbackground=t.enable_dimbackground,this.enable_dimbackground&&(this.dimbackground=new DimBackground(t.dimbackground)),this.enable_padding=t.enable_padding,this.enable_padding&&(this.padding=new Padding(t.padding)),this.enable_margin=t.enable_margin,this.enable_margin&&(this.margin=new Margin(t.margin)),this.enable_border=t.enable_border,this.enable_border&&(this.border=new Border(t.border)),this.enable_close_button=t.enable_close_button,this.enable_close_button&&(this.close_button=new CloseButton(t.close_button)),this.enable_scroll=t.enable_scroll,this.enable_scroll&&(this.scroll=new Scroll(t.scroll)),this.enable_icon=t.enable_icon,this.enable_icon&&(this.icon=new Icon(t.icon)),this.enable_image=t.enable_image,this.enable_image&&(this.image=new Image(t.image)),this.enable_video=t.enable_video,this.enable_video&&(this.video=new Video(t.video)),this.enable_title=t.enable_title,this.enable_title&&(this.title=new Title(t.title)),this.enable_description=t.enable_description,this.enable_description&&(this.description=new Description(t.description)),this.enable_stepper=t.enable_stepper,this.enable_stepper&&(this.stepper=new Stepper(t.stepper)),this.enable_buttons=t.enable_buttons,this.enable_buttons&&(this.buttons=new Buttons(t.buttons)),this.enable_shadow=t.enable_shadow,this.enable_shadow&&(this.shadow=new Shadow(t.shadow)),this.enable_animation=t.enable_animation,this.enable_animation&&(this.animation=new Animation(t.animation)),this.enable_gradient=t.enable_gradient,this.enable_gradient&&(this.gradient=new Gradient(t.gradient)),this.enable_arrow=t.enable_arrow,this.enable_arrow&&(this.arrow=new Arrow(t.arrow,this.background_color)),this.enable_marketing=t.enable_marketing,this.enable_marketing&&(this.marketing=new Marketing(t.marketing)),this.min_width="",this.inline_width="auto",this.inline_height="auto",this.media_width="auto",this.media_height="auto",this.media_container_height=0,this.targetElement=null,this.targetOverlayElement=null,this.inLineContainer=null,this.textContainer=null,this.tooltip=null,this.dimBackgroundElement=null,this.maskingElement=null,this.max_width=350,this.updateSkid=null,this.initial_data_placement=this.position.position,this.flag=!0,this.flutterClickCallbackWrapper=null,this.ceInstance=ceWrapper.getInstance()}return _createClass$1(e,[{key:"createNewTooltip",value:function(){var e=this;try{if(this._canCreateTooltip()){var t=function(){e._canCreateTooltip()&&(e.rtmInstance.currentAction=e._destroyTooltip,e._setInLineDimensions(),e._setInlineStyles(),e._setInLineContent(),e._setObservors(),e._createTippyInstance())};this._setTheTarget((function(){e._scrollIntoTargetIfNeeded(t)}))}}catch(e){this._resetRTMAction()}}},{key:"_canCreateTooltip",value:function(){return null!==this.rtmInstance.currentAction&&void 0!==this.rtmInstance.currentAction||this.rtmInstance.isShowingAction?(null==Apxor||Apxor.logEvent("apx_nudge_not_shown",{apx_nudge_type:"campaign",apx_nudge_id:this.configId,apx_nudge_name:this.name,apx_variant_code:this.ceInstance.getVariantCode(this.configId),apx_failure_type:"error",apx_reason:"An action is already being shown"}),Logger$3.info("An nudge is being shown. Can not show a tooltip now"),!1):checkForNeverShow$1(this.configId)}},{key:"_setTheTarget",value:function(e){var t=this;this._findTargetElement((function n(){t._isElementVisible()?(t._targetClickCallback=t._targetClickCallback.bind(t),t.targetElement.addEventListener("click",t._targetClickCallback),e()):t._retryFindingTargetElement(n,!0)}))}},{key:"_isElementVisible",value:function(){try{var e=this.targetElement.getBoundingClientRect();if(0===e.width||0===e.height)return!1}catch(e){return!1}return!0}},{key:"_findTargetElement",value:function(e){var t=this;if(Apxor.isFlutter()){var n=this.messageConfig;n.configId,n.configName,this.uiConfig.dismiss_target_touch,this.targetElement=createTargetView(getElementPositionFromFlutter(this.target.id)),this.targetElement&&(this.flutterClickCallbackWrapper=addClickListenerForFlutterElement(this.targetElement,(function(){t._targetClickCallback()})))}else this.targetElement=getElementFromSelector(this.target.id,this.target.frame_id,this.target.is_text_based,this.target.avf_text_config);this.targetElement?e():this.target.enable_retry?(Logger$3.info("Not found yet. Rechecking the DOM."),this._retryFindingTargetElement(e)):(null==Apxor||Apxor.logEvent("apx_nudge_not_shown",{apx_nudge_type:"campaign",apx_nudge_id:this.configId,apx_nudge_name:this.name,apx_variant_code:this.ceInstance.getVariantCode(this.configId),apx_failure_type:"error",apx_reason:"View not found"}),Logger$3.info("Element with selector:".concat(this.target.id," not found.")),this._resetRTMAction())}},{key:"_retryFindingTargetElement",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=window.ApxorRTM,o=setInterval((function(){if(null===i.currentAction||void 0===i.currentAction){if(Apxor.isFlutter()){var a=t.messageConfig;a.configId,a.configName,t.uiConfig.dismiss_target_touch,t.targetElement=createTargetView(getElementPositionFromFlutter(t.target.id)),t.targetElement&&(t.flutterClickCallbackWrapper=addClickListenerForFlutterElement(t.targetElement,(function(){t._targetClickCallback()})))}else t.targetElement=getElementFromSelector(t.target.id,t.target.frame_id,t.target.is_text_based,t.target.avf_text_config);if(n)t._isElementVisible()?(clearInterval(o),e(t.targetElement)):(t.target.retry.max_retries=t.target.retry.max_retries-1,t.target.retry.max_retries<=0&&(clearInterval(o),Logger$3.info("Invalid target element. Width and height are 0 for element: ".concat(t.target.id,". Can't show tooltip")),t._resetRTMAction()));else t.targetElement?(clearInterval(o),e(t.targetElement)):(t.target.retry.max_retries=t.target.retry.max_retries-1,t.target.retry.max_retries<=0&&(clearInterval(o),null==Apxor||Apxor.logEvent("apx_nudge_not_shown",{apx_nudge_type:"campaign",apx_nudge_id:t.configId,apx_nudge_name:t.name,apx_variant_code:t.ceInstance.getVariantCode(t.configId),apx_failure_type:"error",apx_reason:"View not found"}),console.warn("Element with selector:".concat(t.target.id," not found.")),t._resetRTMAction()))}else clearInterval(o)}),this.target.retry.interval)}},{key:"_resetRTMAction",value:function(){this.rtmInstance.currentAction=null,this.rtmInstance.isShowingAction=!1,Logger$3.info("RTM tooltip action stopped.")}},{key:"_scrollIntoTargetIfNeeded",value:function(e){var t=this,n=!1,i=!1;if(isElementInViewport(this.targetElement))n=!0;else if(this.scrollToView){var o={behavior:SCROLL_BEHAVIOUR.SMOOTH,block:CENTER,inline:CENTER};this._canCreateTooltip()&&this.targetElement.scrollIntoView(o),window.setTimeout((function(){isElementCovered(t.targetElement)?window.setTimeout((function(){isElementCovered(t.targetElement)?Apxor.isFlutter()?e():(console.info("The tooltip is not visible because another element is overlapping the target element."),t._resetRTMAction()):e()}),1e3):e()}),1e3),i=!0,n=!0}else Logger$3.info("If needed change the config to scroll to the target element."),this._resetRTMAction();n&&!i&&(isElementCovered(this.targetElement)?Apxor.isFlutter()?e():(console.info("The tooltip is not visible because another element is overlapping the target element."),this._resetRTMAction()):e())}},{key:"_setInLineDimensions",value:function(){var e=this.direction.nudge===DIRECTION.VERTICAL?this.width/100:this.height/100,t=this.direction.nudge!==DIRECTION.VERTICAL;this.enable_image?this._setDimenstionFromResolution(this.image.width,this.image.height,e,t):this.enable_video?this.video.enable_embed?this.direction.nudge===DIRECTION.VERTICAL?(this.inline_width="".concat(this.video.width+(this.enable_border?2*this.border.width:0),"px"),this.media_width="".concat(this.video.width,"px"),this.media_height="".concat(this.video.height,"px")):(this.inline_height="".concat(this.video.height,"px"),this.media_height="".concat(this.video.height,"px"),this.media_container_height=this.video.height,this.min_width="".concat(this.getPixelsFromPercentage(this.width,!1),"px")):this._setDimenstionFromResolution(this.video.width,this.video.height,e,t):this.enable_icon?this.direction.nudge===DIRECTION.VERTICAL?this.inline_width="".concat(this.getPixelsFromPercentage(this.width,!1),"px"):this.min_width="".concat(this.getPixelsFromPercentage(this.width,!1),"px"):this.direction.nudge===DIRECTION.VERTICAL&&(this.inline_width="".concat(this.getPixelsFromPercentage(this.width,!1),"px"))}},{key:"_setDimenstionFromResolution",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:.5,i=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=getHeightWidthFromResolution({width:e,height:t},n,i);this.media_width="".concat(o.width,"px"),this.media_height="".concat(o.height,"px"),this.media_container_height=o.height,this.direction.nudge===DIRECTION.VERTICAL?this.inline_width="".concat(o.width+(this.enable_border?2*this.border.width:0)+(this.enable_padding?this.padding.left+this.padding.right:0),"px"):(this.inline_height="".concat(o.height+(this.enable_border?2*this.border.width:0)+(this.enable_padding?this.padding.top+this.padding.bottom:0),"px"),this.min_width="".concat(this.getPixelsFromPercentage(this.width,!1),"px"))}},{key:"_highlightInlineTarget",value:function(){var e=this;this.enable_dimbackground?(this.dimBackgroundElement=createMask(this.targetElement,this.elementHighlighter),Apxor.isFlutter()&&(this.maskingElement=createSVGDivMask(this.targetElement),document.body.appendChild(this.maskingElement)),document.body.appendChild(this.dimBackgroundElement),this.targetOverlayElement=document.createElement("div"),this.targetOverlayElement.id="targetOverlayElement",this.setPositionofOverlayTargetElement=function(){var t=e.targetElement.getBoundingClientRect(),n=t.x,i=t.y,o=t.width,a=t.height,r=t.left,s=t.top;setAttributes(e.targetOverlayElement,{style:"position: fixed; z-index: 999999; top: ".concat(i||s-e.elementHighlighter.offset.top,"px; left: ").concat(n||r-e.elementHighlighter.offset.left,"px; height: ").concat(a+e.elementHighlighter.offset.top+e.elementHighlighter.offset.bottom,"px; width: ").concat(o+e.elementHighlighter.offset.left+e.elementHighlighter.offset.right,"px;\n ").concat(Apxor.isFlutter()?"pointer-events:none;":"")})},window.addEventListener("scroll",this.setPositionofOverlayTargetElement),this.targetElement.getBoundingClientRect&&(this.setPositionofOverlayTargetElement(),document.body.appendChild(this.targetOverlayElement)),this.dimBackgroundElement.querySelector("#tippyModalMaskOpening").addEventListener("click",this._targetClickCallback),this.enable_dismiss_actions&&this.dismiss_actions.outside_touch&&(this.dimBackgroundElement.addEventListener("click",(function(){e._destroyTooltip()})),Apxor.isFlutter()&&this.maskingElement.addEventListener("click",(function(){e._destroyTooltip()}))),this.targetOverlayElement.addEventListener("click",(function(){e.targetElement.click()}))):this.tooltip.setProps({onClickOutside:function(){e.enable_dismiss_actions&&e.dismiss_actions.outside_touch&&e._destroyTooltip()}})}},{key:"_setInlineStyles",value:function(){if(!document.querySelector("style[apx-tooltip-styles]")){var e=" \n ".concat(this._getBackgroundContainerStyles()," \n ").concat(this._getInLineContainerStyles()," \n ").concat(this._getScrollStyles()," \n ").concat(this._getControlsStyles()," \n ").concat(this._getInLineMediaContainerStyles(),"\n ").concat(this._getInLineNonMediaContainerStyles(),"\n ").concat(this._getTextConatinerStyles(),"\n ").concat(this._getTitleStyles()," \n ").concat(this._getDescriptionStyles()," \n ").concat(this._getInLineButtonContainerStyles()," \n ").concat(this._getIconStyles()," \n ").concat(this._getImageStyles()," \n ").concat(this._getVideoStyles()," \n ").concat(this._getMarketingStyles(),"\n ").concat(this._getTippyStyles(),"\n ").concat(this._getFooterStyles(),"\n ").concat(this._getProgressBarStyles(),"\n ").concat(this._getBootstrapiconsStyles()," \n ").replaceAll("\n","").replace(/[\s]{2,999}/g,""),t=document.createElement("style");t.setAttribute("apx-tooltip-styles",""),t.innerHTML=e,document.head.appendChild(t)}}},{key:"_getFooterStyles",value:function(){return"\n .apx-inline-footer-wrap".concat(this.cssPostFix,"{\n flex-wrap:wrap;\n gap:4px;\n }\n ")}},{key:"_getBackgroundContainerStyles",value:function(){var e,t,n="";this.enable_dimbackground&&(n='\n #tippyModalOverlayContainer {\n -ms-filter: "progid:dximagetransform.microsoft.gradient.alpha(Opacity=50)";\n filter: alpha(opacity=50);height: 100vh;left: 0;opacity: '.concat(null!==(e=this.dimbackground.opacity)&&void 0!==e?e:.5,";position: fixed;\n top: 0;transition: all .3s ease-out;width: 100vw;z-index: 9999;fill: ").concat(null!==(t=this.dimbackground.color)&&void 0!==t?t:"transparent","\n }\n #tippyModalOverlayContainer #tippyModalMask, #tippyModalOverlayContainer #tippyModalMaskRect {\n height: 100vh;width: 100vw\n }\n \n "));return n}},{key:"_getInLineContainerStyles",value:function(){var e="";this.min_width&&(e="min-width:".concat(this.min_width,";"));var t="";this.enable_border&&(t="\n border-radius: ".concat(this.border.radius,"px;\n border: ").concat(this.border.width,"px ").concat(this.border.style," ").concat(this.border.color,";\n "));var n="";this.enable_gradient&&(n="\n background-image:linear-gradient(".concat(this.gradient.direction,", ").concat(this.gradient.colors[0],", ").concat(this.gradient.colors[1],");\n "));var i="";this.enable_shadow&&(i="\n box-shadow: ".concat(this.shadow.offset_x,"px ").concat(this.shadow.offset_y,"px ").concat(this.shadow.blur_radius,"px ").concat(this.shadow.spread_radius,"px ").concat(this.shadow.color,";\n "));var o="";this.enable_padding&&(o="\n padding:".concat(this.padding.top,"px ").concat(this.padding.right,"px ").concat(this.padding.bottom,"px ").concat(this.padding.left,"px;\n "));var a=this.direction.nudge!==DIRECTION.VERTICAL?"flex-direction:row;":"flex-direction:column;";a=" ".concat(a,"\n justify-content:space-evenly;\n align-items:center;\n display:flex;\n ");var r="",s="";return this.enable_video&&this.video.enable_embed&&(r="max-width:100%;",s="max-height:100vh;"),"\n .apx-inline-container".concat(this.cssPostFix," {\n height:").concat(this.inline_height,";\n width:").concat(this.inline_width,";\n margin: auto;\n background-color:").concat(this.background_color,";\n z-index:9997;\n opacity:0;\n transition:all .5s cubic-bezier(.96,.23,.07,.8);\n position:fixed;\n visibility:hidden;\n\n ").concat(e,"\n ").concat(a,"\n ").concat(o,"\n ").concat(t,"\n ").concat(n,"\n ").concat(i,"\n ").concat(r,"\n ").concat(s,"\n }\n\n .apx-inline-container").concat(this.cssPostFix,".open{\n opacity:1;\n visibility:visible;\n }\n ")}},{key:"_getScrollStyles",value:function(){var e=this.enable_scroll&&this.scroll.enable_border?"\n border-top: ".concat(this.scroll.border.width,"px ").concat(this.scroll.border.style," ").concat(this.scroll.border.color,";\n border-bottom : ").concat(this.scroll.border.width,"px ").concat(this.scroll.border.style," ").concat(this.scroll.border.color,";\n"):"";return this.enable_scroll?"\n .apx-inline-scroll".concat(this.cssPostFix," {\n overflow:scroll; \n overflow-x: hidden;\n height:").concat(this.scroll.height,"px;\n ").concat(e,"\n }\n "):"\n .apx-inline-scroll".concat(this.cssPostFix," {\n overflow : hidden;\n }\n ")}},{key:"_getControlsStyles",value:function(){if(!this.enable_close_button)return"";return this.direction.non_media===DIRECTION.VERTICAL||this.direction.nudge===DIRECTION.VERTICAL?"\n .apx-inline-close".concat(this.cssPostFix," {\n position: absolute;\n z-index:9999;\n top: ").concat(this.close_button.offset_top,"px;\n right: ").concat(this.close_button.offset_right,"px;\n width: ").concat(this.close_button.width,"px;\n height: ").concat(this.close_button.height,"px;\n cursor: pointer;\n }\n "):"\n .apx-inline-close".concat(this.cssPostFix," {\n display:flex;\n flex-direction:row;\n justify-content:center;\n align-items:center;\n width: ").concat(this.close_button.width,"px;\n height: ").concat(this.close_button.height,"px;\n cursor: pointer;\n z-index:9999;\n }\n ")}},{key:"_getInLineMediaContainerStyles",value:function(){return"\n .apx-inline-media-container".concat(this.cssPostFix,"{\n ").concat(this.enable_icon?"align-self:".concat(this.icon.alignment,";"):"","\n ").concat(this.enable_image||this.enable_video?"display:flex;":"","\n }")}},{key:"_getInLineNonMediaContainerStyles",value:function(){var e="";this.direction.nudge===DIRECTION.VERTICAL?e="max-height:".concat(window.innerHeight-this.media_container_height,"px;"):this.enable_icon||(e="max-height:".concat(this.media_container_height,"px;"));return this.direction.non_media===DIRECTION.VERTICAL?"\n .apx-inline-nonmedia-container".concat(this.cssPostFix,"{\n width:100%;\n max-width:").concat(this.inline_width,";\n display:flex;\n flex-direction:column;\n justify-content:center;\n align-items:stretch;\n ").concat(e,"\n }\n "):"\n .apx-inline-nonmedia-container".concat(this.cssPostFix,"{\n width:100%;\n flex-grow:2;\n display:flex;\n flex-direction:row;\n justify-content:space-between;\n align-items:center;\n ").concat(e,"\n }\n ")}},{key:"_getTextConatinerStyles",value:function(){return"\n .apx-inline-text-container".concat(this.cssPostFix,"{\n width:100%;\n display:flex;\n flex-direction:column;\n justify-content: center;\n overflow: hidden;\n align-items:center;\n cursor:text;\n }\n ")}},{key:"_getTitleStyles",value:function(){if(!this.enable_title)return"";var e="";if(this.title.enable_icon){var t="";this.title.icon.enable_border&&(t="border-radius:".concat(this.title.icon.border.radius,"%;\n border:").concat(this.title.icon.border.width,"px ").concat(this.title.icon.border.style," ").concat(this.title.icon.border.color,";")),e="\n height: ".concat(this.title.icon.height,"px;\n width: ").concat(this.title.icon.width,"px;\n margin: auto 15px auto 0px;\n ").concat(t,"\n ")}var n="";this.title.enable_margin&&(n=" \n margin-top:".concat(this.title.margin.top,"px;\n margin-bottom:").concat(this.title.margin.bottom,"px;\n margin-left:").concat(this.title.margin.left,"px;\n margin-right:").concat(this.title.margin.right,"px;\n "));var i="";return this.title.enable_padding&&(i=" \n padding-top:".concat(this.title.padding.top,"px;\n padding-bottom:").concat(this.title.padding.bottom,"px;\n padding-left:").concat(this.title.padding.left,"px;\n padding-right:").concat(this.title.padding.right,"px;\n ")),"\n .apx-inline-title-div".concat(this.cssPostFix," {\n width:100%;\n display:flex;\n justify-content:").concat(this.title.alignment,";\n text-align:").concat(this.title.alignment,";\n pointer-events:none;\n ").concat(n,"\n ").concat(i,"\n }\n .apx-inline-title-icon").concat(this.cssPostFix," {\n ").concat(e,"\n }\n ")}},{key:"_getDescriptionStyles",value:function(){if(!this.enable_description)return"";var e="";this.description.enable_margin&&(e=" \n margin-top:".concat(this.description.margin.top,"px;\n margin-bottom:").concat(this.description.margin.bottom,"px;\n margin-left:").concat(this.description.margin.left,"px;\n margin-right:").concat(this.description.margin.right,"px;\n "));var t="";return this.description.enable_padding&&(t=" \n padding-top:".concat(this.description.padding.top,"px;\n padding-bottom:").concat(this.description.padding.bottom,"px;\n padding-left:").concat(this.description.padding.left,"px;\n padding-right:").concat(this.description.padding.right,"px;\n ")),"\n .apx-inline-description".concat(this.cssPostFix," {\n width:100%;\n justify-content:").concat(this.description.alignment,";\n text-align:").concat(this.description.alignment,";\n ").concat(e,"\n ").concat(t,"\n }\n ")}},{key:"_getInLineButtonContainerStyles",value:function(){return"\n .apx-inline-button-container".concat(this.cssPostFix,"{\n display:flex;\n flex-direction:row;\n align-items:center;\n justify-content:center;\n margin:0 10px 0 10px;\n }\n .apx-inline-top-button-container").concat(this.cssPostFix,"{\n width:100%;\n height:auto;\n }\n .apx-inline-center-button-container").concat(this.cssPostFix,"{\n width:100%;\n height:auto;\n }\n .apx-inline-bottom-button-container").concat(this.cssPostFix,"{\n width:100%;\n height:auto;\n }")}},{key:"_getIconStyles",value:function(){var e="";if(this.enable_icon){var t="";this.icon.enable_border&&(t="\n border-radius:".concat(this.icon.border.radius,"%;\n border:").concat(this.icon.border.width,"px ").concat(this.icon.border.style," ").concat(this.icon.border.color,";\n "));var n="";this.icon.enable_margin&&(n="\n margin-top:".concat(this.icon.margin.top,"px;\n margin-bottom:").concat(this.icon.margin.bottom,"px;\n margin-left:").concat(this.icon.margin.left,"px;\n margin-right:").concat(this.icon.margin.right,"px;\n "));var i="";this.icon.enable_padding&&(i="\n padding-top:".concat(this.icon.padding.top,"px;\n padding-bottom:").concat(this.icon.padding.bottom,"px;\n padding-left:").concat(this.icon.padding.left,"px;\n padding-right:").concat(this.icon.padding.right,"px;\n ")),e="\n .apx-inline-icon-container".concat(this.cssPostFix," {\n text-align:").concat(this.icon.alignment,";\n }\n .apx-inline-icon-content").concat(this.cssPostFix," {\n height: ").concat(this.icon.height,"px;\n width: ").concat(this.icon.width,"px;\n ").concat(t,"\n ").concat(n,"\n ").concat(i,"\n }\n ")}return e}},{key:"_getImageStyles",value:function(){var e="";if(this.enable_image)if(this.image.enable_background_image)e="\n .apx-inline-image".concat(this.cssPostFix,"{\n background-image: url('").concat(this.image.path,"');\n background-repeat: no-repeat;\n background-attachment: fixed; \n background-size: 100% 100%;\n height: ").concat(this.media_height,";\n width: ").concat(this.media_width,";\n box-shadow: inset ").concat(this.media_width," ").concat(this.media_height," 0px 0px ").concat(hexToRGB(this.image.background_image.mask_color,this.image.background_image.mask_opacity),",inset -").concat(this.media_width," -").concat(this.media_height," 0px 0px ").concat(hexToRGB(this.image.background_image.mask_color,this.image.background_image.mask_opacity),"\n }\n ");else{var t="";this.image.enable_border&&(t="\n border-radius:".concat(this.image.border.radius,"%;\n border:").concat(this.image.border.width,"px ").concat(this.image.border.style," ").concat(this.image.border.color,";\n ")),e="\n .apx-inline-image".concat(this.cssPostFix,"{\n height: ").concat(this.media_height,";\n width: ").concat(this.media_width,";\n ").concat(t,"\n }\n ")}return e}},{key:"_getVideoStyles",value:function(){var e="";if(this.enable_video){var t="";this.video.enable_border&&(t="\n border-radius:".concat(this.video.border.radius,"%;\n border:").concat(this.video.border.width,"px ").concat(this.video.border.style," ").concat(this.video.border.color,";\n ")),e="\n .apx-inline-video".concat(this.cssPostFix," {\n width:").concat(this.media_width,";\n height:").concat(this.media_height,";\n ").concat(t,"\n }\n ")}return e}},{key:"_getProgressBarStyles",value:function(){var e="";return this.has_progress_bar&&(e="\n .apx-inline-progress-bar".concat(this.cssPostFix,"{\n position: absolute;\n width:100%;\n height:").concat(this.progressbar.width,";\n ").concat("top"===this.progressbar.position?"top:0px;":"bottom:0px;","\n left:0px;\n z-index:9998;\n overflow:hidden;\n cursor: pointer;\n background:").concat(this.progressbar.reamining_color,";\n }\n .apx-inline-bar").concat(this.cssPostFix,"{\n width:100%;\n height:100%;\n background:").concat(this.progressbar.progress_color,";\n }")),e}},{key:"_getTippyStyles",value:function(){var e="",t="",n="",i="",o="",a="",r="",s="";if(this.enable_arrow)switch(this.arrow.type){case"round":e="\n bottom:".concat(this.enable_border?"".concat(-12+this.border.width,"px"):"-12px",";\n "),o="\n width:18px;\n height:18px;\n border-radius:5px;\n transform: rotate(45deg);\n background-color:".concat(this.arrow.color,";\n "),t="\n left:".concat(this.enable_border?"".concat(-5+this.border.width,"px"):"-5px",";\n "),a="\n bottom:-10px;\n width:18px;\n height:18px;\n border-radius:5px;\n transform: rotate(45deg);\n background-color:".concat(this.arrow.color,";\n "),n="\n top:".concat(this.enable_border?"".concat(-8+this.border.width,"px"):"-8px",";\n "),r="\n width:18px;\n height:18px;\n border-radius:5px;\n transform: rotate(45deg);\n background-color:".concat(this.arrow.color,";\n "),i="\n right:".concat(this.enable_border?"".concat(-15+this.border.width,"px"):"-15px",";\n "),s="\n top:-50%;\n width:18px;\n height:18px;\n border-radius:5px;\n transform: rotate(45deg);\n background-color:".concat(this.arrow.color,";\n ");break;case"narrow":e="\n bottom:".concat(this.enable_border?"".concat(-22+this.border.width,"px"):"-22px",";\n "),o="\n border-width:18px 5px 0;\n ",t="\n left:".concat(this.enable_border?"".concat(-7+this.border.width,"px"):"-7px",";\n "),a="\n border-width:5px 18px 5px 0;\n ",n="\n top:".concat(this.enable_border?"".concat(-11+this.border.width,"px"):"-11px",";\n "),r="\n border-width:0 5px 18px;\n ",i="\n right:".concat(this.enable_border?"".concat(-26+this.border.width,"px"):"-26px",";\n "),s="\n border-width:5px 0 5px 18px;\n ";break;case"wide":e="\n bottom:".concat(this.enable_border?"".concat(-22+this.border.width,"px"):"-22px",";\n "),o="\n left:-50%;\n border-width:9px 18px 0;\n ",t="\n left:".concat(this.enable_border?"".concat(2+this.border.width,"px"):"2px",";\n "),a="\n top:-50%;\n border-width:18px 9px 18px 0;\n ",n="\n top:".concat(this.enable_border?"".concat(2+this.border.width,"px"):"2px",";\n "),r="\n left:-50%;\n top:-8px;\n border-width:0 18px 9px;\n bottom:13px;\n ",i="\n right:".concat(this.enable_border?"".concat(-26+this.border.width,"px"):"-26px",";\n "),s="\n top:-50%;\n border-width:18px 0 18px 8px;\n ";break;case"large":e="\n bottom:".concat(this.enable_border?"".concat(-19+this.border.width,"px"):"-19px",";\n "),o="\n left:-50%;\n border-width:16px 16px 0;\n ",t="\n left:".concat(this.enable_border?"".concat(-5+this.border.width,"px"):"-5px",";\n "),a="\n top:-50%;\n border-width:16px 16px 16px 0;\n ",n="\n top:".concat(this.enable_border?"".concat(-9+this.border.width,"px"):"-9px",";\n "),r="\n left:-50%;\n border-width:0 16px 16px;\n ",i="\n right:".concat(this.enable_border?"".concat(-23+this.border.width,"px"):"-23px",";\n "),s="\n top:-50%;\n border-width:16px 0 16px 16px;\n ";break;case"small":e="\n bottom:-12px;\n ",o="\n left:-50%;\n border-width:16px 16px 0;\n ",t="\n left: 3px;\n ",a="\n top:-50%;\n border-width:16px 16px 16px 0;\n ",n="\n top: -1px;\n ",r="\n left:-50%;\n border-width:0 16px 16px;\n ",i="\n right: -16px;\n ",s="\n top:-50%;\n border-width:16px 0 16px 16px;\n ";break;default:e="\n bottom:".concat(this.enable_border&&this.border.width>5?"".concat(-15+this.border.width-5,"px"):"-15px",";\n "),o="\n left:-50%;\n border-width:16px 16px 0;\n ",t="\n left:".concat(this.enable_border&&this.border.width>5?"".concat(-1+this.border.width-5,"px"):"-1px",";\n "),a="\n top:-50%;\n border-width:16px 16px 16px 0;\n ",n="\n top:".concat(this.enable_border&&this.border.width>5?"".concat(-5+this.border.width-5,"px"):"-5px",";\n "),r="\n left:-50%;\n border-width:0 16px 16px;\n ",i="\n right:".concat(this.enable_border&&this.border.width>4?"".concat(-20+this.border.width-4,"px"):"-20px",";\n "),s="\n top:-50%;\n border-width:16px 0 16px 16px;\n "}var c=document.querySelector("style[data-tippy-stylesheet]");c&&c.remove();var l="";this.enable_animation&&(l="\n @-webkit-keyframes ".concat(this.animation.type," {\n 0% { transform: ").concat(translateDir(this.position.position,0),"; }\n 50% { transform: ").concat(translateDir(this.position.position,50),"; }\n 100% { transform: ").concat(translateDir(this.position.position,100),"; }\n }\n \n @keyframes ").concat(this.animation.type," {\n 0% { transform: ").concat(translateDir(this.position.position,0),"; }\n 50% { transform: ").concat(translateDir(this.position.position,50),"; }\n 100% { transform: ").concat(translateDir(this.position.position,100),"; }\n }\n \n .tippy-box {\n animation-name: ").concat(this.animation.type,";\n animation-duration: ").concat(this.animation.duration,"ms;\n animation-timing-function: ").concat(this.animation.anim_function,";\n animation-iteration-count: ").concat(this.animation.iteration_count,";\n }\n "));var d='\n .tippy-box[data-animation="fade"][data-state=hidden]{\n opacity:0;\n } \n [data-tippy-root] {\n width:'.concat(this.inline_width,";\n max-width:calc(100vw - ").concat(this.enable_arrow&&this.arrow.enable_border?this.arrow.border.width:0,"px);\n } \n .tippy-box { \n width:").concat(this.inline_width,";\n position:relative;\n line-height:1.4;\n white-space:normal;\n outline:0;\n transition-property:transform,visibility,opacity;\n } \n .tippy-box[data-placement^=top] > .tippy-arrow {\n ").concat(e,"\n } \n .tippy-box[data-placement^=top] > .tippy-arrow:before {\n ").concat(o,"\n border-top-color:initial;\n transform-origin:center top;\n } \n .tippy-box[data-placement^=bottom] > .tippy-arrow {\n ").concat(n,"\n } \n .tippy-box[data-placement^=bottom] > .tippy-arrow:before {\n ").concat(r,"\n border-bottom-color:initial;\n transform-origin:center bottom;\n } \n .tippy-box[data-placement^=left] > .tippy-arrow {\n ").concat(i,"\n } \n .tippy-box[data-placement^=left] > .tippy-arrow:before {\n ").concat(s,"\n border-left-color:initial;\n transform-origin:center left;\n } \n .tippy-box[data-placement^=right] > .tippy-arrow {\n ").concat(t,"\n } \n .tippy-box[data-placement^=right] > .tippy-arrow:before {\n ").concat(a,"\n border-right-color:initial;\n transform-origin:center right;\n } \n .tippy-box[data-inertia][data-state=visible] {\n transition-timing-function:cubic-bezier(.54,1.5,.38,1.11)\n } \n .tippy-arrow {\n z-index:9999;\n width:18px;\n height:18px;\n color:").concat(this.enable_arrow?this.arrow.color:"transparent",';\n opacity:0;\n visibility:hidden;\n transition:all .5s cubic-bezier(.96,.23,.07,.8);\n } \n .tippy-arrow.open {\n opacity:1;\n visibility:visible;\n }\n .tippy-arrow:before{ \n content:"";\n position:absolute;\n border-color:transparent;\n border-style:').concat(this.enable_arrow&&this.arrow.enable_border?this.arrow.border.style:"solid",";\n } \n .tippy-content {\n width:").concat(this.inline_width,";\n padding: 0.3125rem 0.5625rem;\n position:relative;\n z-index:9998;\n } \n ").concat(l,"\n ");return"\n ".concat(d,"\n ")}},{key:"_getBootstrapiconsStyles",value:function(){return'\n .bi::before, [class^="bi-"]::before, [class*=" bi-"]::before {\n display: inline-block;\n font-style: normal;\n font-weight: normal !important;\n font-variant: normal;\n text-transform: none;\n line-height: 1;\n vertical-align: -.125em;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n }\n .bi-x::before { \n content: "62a"; \n }\n .bi-x-circle-fill::before { \n content: "622"; \n }\n '}},{key:"_removeStyles",value:function(){try{var e=document.querySelector("style[apx-tooltip-styles]");e&&e.remove();var t=document.querySelector("style[data-tippy-stylesheet]");t&&t.remove()}catch(e){Logger$3.error("Could not remove the tooltip styles:"+e)}}},{key:"_setInLineContent",value:function(){this._createInLineContainer(),this.direction.nudge===DIRECTION.VERTICAL&&(this._createTopButtonContainer(),this._setButtons(BUTTON_CONTAINER_POSITION.TOP)),this._createMediaContainer(),this.direction.nudge===DIRECTION.VERTICAL&&(this._createCenterButtonContainer(),this._setButtons(BUTTON_CONTAINER_POSITION.CENTER)),this._setImageOptions(),this._setVideoOptions(),this._setIconOptions(),this._createNonMediaContainer(),this._setTextContainer(),this._setTitleContent(),this._setDescriptionContent(),this._createButtonContainer(),this._createBottomButtonContainer(),this._setButtons(BUTTON_CONTAINER_POSITION.BOTTOM),this._setProgressBar(),this._setCloseButton(),this._setMarketingMessage()}},{key:"_createInLineContainer",value:function(){this.inLineContainer=document.createElement("div"),this.inLineContainer.classList.add("apx-inline-container".concat(this.cssPostFix))}},{key:"_createMediaContainer",value:function(){this.mediaContainer=document.createElement("div"),this.mediaContainer.classList.add("apx-inline-media-container".concat(this.cssPostFix)),this.inLineContainer.appendChild(this.mediaContainer)}},{key:"_setImageOptions",value:function(){if(this.enable_image)if(this.image.enable_background_image)this.inLineContainer.classList.add("apx-inline-image".concat(this.cssPostFix));else{var e=document.createElement("img");e.src=this.image.path,e.classList.add("apx-inline-image".concat(this.cssPostFix)),this.mediaContainer.appendChild(e)}}},{key:"_setVideoOptions",value:function(){if(this.enable_video)if(this.video.enable_embed){var e=document.createElement("div");e.classList.add("apx-inline-video".concat(this.cssPostFix)),e.innerHTML="".concat(this.video.embed.html),this.mediaContainer.appendChild(e)}else{var t=document.createElement("video");t.classList.add("apx-inline-video".concat(this.cssPostFix)),t.controlsList="noplaybackrate nodownload",t.disablePictureInPicture=!0,t.controls=!0,t.muted=!this.video.enable_audio;var n=document.createElement("source");n.setAttribute("src",this.video.path),n.setAttribute("type","video/mp4"),t.appendChild(n),this.mediaContainer.appendChild(t)}}},{key:"_setIconOptions",value:function(){if(this.enable_icon){var e=document.createElement("div");e.classList.add("apx-inline-icon-container".concat(this.cssPostFix));var t=document.createElement("img");t.src=this.icon.path,t.classList.add("apx-inline-icon-content".concat(this.cssPostFix)),e.appendChild(t),this.mediaContainer.appendChild(e)}}},{key:"_createNonMediaContainer",value:function(){this.nonMediaContainer=document.createElement("div"),this.nonMediaContainer.classList.add("apx-inline-nonmedia-container".concat(this.cssPostFix)),this.inLineContainer.appendChild(this.nonMediaContainer)}},{key:"_setTextContainer",value:function(){this.textContainer=document.createElement("div"),this.textContainer.classList.add("apx-inline-text-container".concat(this.cssPostFix)),this.nonMediaContainer.appendChild(this.textContainer)}},{key:"_setTitleContent",value:function(){if(this.enable_title){resolveDynamicText(this.title);var e=document.createElement("div");if(e.classList.add("apx-inline-title-div".concat(this.cssPostFix)),""!=this.title.enable_icon){var t=document.createElement("img");t.src=this.title.icon.path,t.classList.add("apx-inline-title-icon".concat(this.cssPostFix)),e.appendChild(t)}e.appendChild(createNewTextElement(this.title,this.currentId,"title")),this.textContainer.appendChild(e)}}},{key:"_setDescriptionContent",value:function(){if(this.enable_description){resolveDynamicText(this.description);var e=document.createElement("div");e.classList.add("apx-inline-description".concat(this.cssPostFix)),e.appendChild(createNewTextElement(this.description,this.currentId,"description")),e.classList.add("apx-inline-scroll".concat(this.cssPostFix)),this.textContainer.appendChild(e)}}},{key:"_setProgressBar",value:function(){if(this.enable_stepper&&this.stepper.enable_progressbar){this.progressbar=this.stepper.progressbar;var e=document.createElement("div");e.classList.add("apx-inline-progress-bar".concat(this.cssPostFix));var t=document.createElement("div");t.classList.add("apx-inline-bar".concat(this.cssPostFix)),this.stepper.index<=this.stepper.length?t.style.transform="translateX(".concat(-(100-100/this.stepper.length*this.stepper.index),"%)"):e.style.visibility="hidden",e.appendChild(t),this.inLineContainer.appendChild(e)}}},{key:"_createButtonContainer",value:function(){this.direction.non_media!==DIRECTION.VERTICAL&&(this.buttonContainer=document.createElement("div"),this.buttonContainer.classList.add("apx-inline-button-container".concat(this.cssPostFix)),this.nonMediaContainer.appendChild(this.buttonContainer))}},{key:"_createTopButtonContainer",value:function(){var e;this.enable_buttons&&null!==(e=this.buttons)&&void 0!==e&&e.enable_top&&(this.topButtonContainer=document.createElement("div"),this.topButtonContainer.classList.add("apx-inline-top-button-container".concat(this.cssPostFix)),this.inLineContainer.appendChild(this.topButtonContainer))}},{key:"_createCenterButtonContainer",value:function(){var e;this.enable_buttons&&null!==(e=this.buttons)&&void 0!==e&&e.enable_center&&(this.centerButtonContainer=document.createElement("div"),this.centerButtonContainer.classList.add("apx-inline-center-button-container".concat(this.cssPostFix)),this.inLineContainer.appendChild(this.centerButtonContainer))}},{key:"_createBottomButtonContainer",value:function(){var e;this.enable_buttons&&null!==(e=this.buttons)&&void 0!==e&&e.enable_bottom&&(this.bottomButtonContainer=document.createElement("div"),this.bottomButtonContainer.classList.add("apx-inline-bottom-button-container".concat(this.cssPostFix)),this.nonMediaContainer.appendChild(this.bottomButtonContainer))}},{key:"_setButtons",value:function(e){var t=this;if(this.enable_buttons&&(e===BUTTON_CONTAINER_POSITION.TOP&&this.buttons.enable_top||e===BUTTON_CONTAINER_POSITION.CENTER&&this.buttons.enable_center||e===BUTTON_CONTAINER_POSITION.BOTTOM&&this.buttons.enable_bottom)){var n=function(e){t._destroyTooltip(e)},i={next:function(e,i){n(!1),t.stepperCallBack(e,i)},prev:function(e,i){n(!1),t.stepperCallBack(e,i)},complete:n,cancel:n,_isCancelled:!1,action:""},o={};o=e===BUTTON_CONTAINER_POSITION.TOP?this.buttons.top:e===BUTTON_CONTAINER_POSITION.CENTER?this.buttons.center:this.buttons.bottom;var a=generateButtonsBlock(this.configId,this.name,this.stepper,EVENT_PREFIX.INLINE,o,this.direction.buttons,"",e,i,this.isWalkthrough,this.uis,this.index,"tooltip");e===BUTTON_CONTAINER_POSITION.TOP?this.topButtonContainer.appendChild(a):e===BUTTON_CONTAINER_POSITION.CENTER?this.centerButtonContainer.appendChild(a):this.bottomButtonContainer.appendChild(a)}}},{key:"_setCloseButton",value:function(){var e=this;if(this.enable_close_button){var t=document.createElement("span");this.close_button.type===CLOSE_BUTTON_STYLE.NORMAL?t.innerHTML=getCloseSVG(this.close_button.width,this.close_button.height,this.close_button.color):this.close_button.type===CLOSE_BUTTON_STYLE.FILL?"circle"===this.close_button.shape?t.innerHTML=getCloseWithCircleSVG(this.close_button.width,this.close_button.height,this.close_button.fill_color,this.close_button.color):t.innerHTML=getCloseWithRectangleSVG(this.close_button.width,this.close_button.height,this.close_button.fill_color,this.close_button.color):t.innerHTML='<img src="'.concat(this.close_button.path,'" width="').concat(this.close_button.width,'px" height="').concat(this.close_button.height,'px"></img>'),t.classList.add("apx-inline-close".concat(this.cssPostFix)),t.addEventListener("click",(function(){var t="cancel"===e.close_button.action;e.rtmInstance.logActionEvent("InlineXIconClicked",e.configId,e.name,"tooltip"),e._destroyTooltip(t)})),this.direction.non_media===DIRECTION.VERTICAL||this.direction.nudge===DIRECTION.VERTICAL?this.inLineContainer.appendChild(t):this.buttonContainer.appendChild(t)}}},{key:"_setObservors",value:function(){var e=this;this.targetDeletionObserver=new MutationObserver((function(){e.tooltipShown&&(document.body.contains(e.targetElement)||e._destroyTooltip())})),this.viewPortObservor=new IntersectionObserver((function(){e.tooltipShown&&(isElementInViewport(e.targetElement)||e._destroyTooltip())}))}},{key:"_createTippyInstance",value:function(){var e=this;this.tooltip=tippy(this.targetElement,{allowHTML:!1,aria:{content:"describedby"},arrow:this.enable_arrow,appendTo:function(){return document.body},content:this.inLineContainer,duration:100,followCursor:this.follow_cursor,flip:!0,flipOnUpdate:!0,inlinePositioning:!0,hideOnClick:!1,interactive:!0,interactiveBorder:this.interactive_border,interactiveDebounce:999999,moveTransition:"transform 0s linear",maxWidth:"100%",maxHeight:"100%",offset:[this.arrow.arrowPosition,this.position.offset.distance],onShow:function(){var t,n;null===(t=e.targetDeletionObserver)||void 0===t||t.observe(document.body,{childList:!0,subtree:!0}),null===(n=e.viewPortObservor)||void 0===n||n.observe(e.targetElement),setTimeout((function(){e._highlightInlineTarget(),e._setAutoTerminate(),e.tooltipShown=!0}),10)},onMount:function(t){e.recalculateTheTippyHeight(),t.popperInstance.update()},onShown:function(){e.updateSkid=function(){var t=document.querySelector("[data-tippy-root]"),n=document.querySelector(".tippy-box").getAttribute("data-placement"),i=parseFloat(window.getComputedStyle(document.documentElement).fontSize);"left"===n||"right"===n?(t.style.top="".concat(e.position.offset.skid,"px"),e.initial_data_placement!==n&&(t.style.left="".concat("left"===n?-.625*i-(e.enable_animation?16:0):.625*i+(e.enable_animation?10:0),"px"))):"top"!==n&&"bottom"!==n||(t.style.left="".concat(e.position.offset.skid,"px"),e.initial_data_placement!==n&&(t.style.top="".concat("top"===n?-1.125*i-(e.enable_animation?16:0):1.125*i+(e.enable_animation?10:0),"px")))},e.updateSkid(),e._showTippy(),window.addEventListener("scroll",e.updateSkid)},placement:this.position.position,popperOptions:{modifiers:[{name:"flip",options:{fallbackPlacements:["bottom","right","top","left"],allowedAutoPlacements:["top","bottom","right","left"]}}]},role:"tooltip",showOnCreate:!0,sticky:!1,touch:!0,zIndex:99999999})}},{key:"_showTippy",value:function(){var e=this;this.inLineContainer.classList.add("open"),setTimeout((function(){var t,n=document.querySelector(".tippy-arrow");null==n||null===(t=n.classList)||void 0===t||t.add("open"),e.showCallback()}),200)}},{key:"_setAutoTerminate",value:function(){var e=this;!0===this.terminationConfig.auto_dismiss&&(this.terminationTimeoutId=setTimeout((function(){e._destroyTooltip()}),this.terminationConfig.duration))}},{key:"_targetClickCallback",value:function(){this.enable_dismiss_actions&&this.dismiss_actions.target_touch&&(this.rtmInstance.logActionEvent("InlineTargetViewClicked",this.configId,this.name,"tooltip"),this._destroyTooltip())}},{key:"_destroyTooltip",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];try{var t,n,i,o,a,r,s;if(document.body.removeEventListener("click",this.flutterClickCallbackWrapper),Apxor.isFlutter())null===(s=this.targetElement)||void 0===s||s.remove();null===(t=this.targetDeletionObserver)||void 0===t||t.disconnect(),this.targetDeletionObserver=null,null===(n=this.viewPortObservor)||void 0===n||n.disconnect(),this.viewPortObservor=null,null===(i=this.tooltip)||void 0===i||i.destroy(),Apxor.isFlutter()&&(null===(o=this.maskingElement)||void 0===o||o.remove()),null===(a=this.dimBackgroundElement)||void 0===a||a.remove(),null===(r=this.targetOverlayElement)||void 0===r||r.remove(),this._removeStyles(),this.targetElement.removeAttribute("apx-inline-dimbackground"),clearTimeout(this.terminationTimeoutId),this.targetElement.removeEventListener("click",this._targetClickCallback),window.removeEventListener("scroll",this.updateSkid),this.setPositionofOverlayTargetElement&&window.removeEventListener("scroll",this.setPositionofOverlayTargetElement)}catch(e){Logger$3.info("Destroying the tooltip:"+e)}this.closeCallback(e)}},{key:"_isWalkthroughCampaign",value:function(){return Array.isArray(this.walkthroughConfigs)&&this.walkthroughConfigs.length>0}},{key:"getPixelsFromPercentage",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=window.innerWidth,i=window.innerHeight;return t?i*e/100:n*e/100}},{key:"recalculateTheTippyHeight",value:function(){try{var e=this.inLineContainer.offsetHeight,t=this.inLineContainer.offsetWidth,n=document.querySelector("[data-tippy-root]");n.style.height="".concat(e,"px"),n.style.width="".concat(t,"px");var i=document.querySelector(".tippy-box");i.style.height="".concat(e,"px"),i.style.width="".concat(t,"px");var o=document.querySelector(".tippy-content");o.style.height="".concat(e,"px"),o.style.width="".concat(t,"px")}catch(e){this._destroyTooltip(),Logger$3.error("Can't update the tippy dimensions")}}}]),e}(),Badgeborder=_createClass$1((function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};_classCallCheck$1(this,e),this.color=t.color,this.corners=t.corners,this.width=t.width})),Shape=_createClass$1((function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};_classCallCheck$1(this,e),this.type=t.type,this.color=getColorOrDefault(t.color,"transparent"),this.enable_gradient=t.enable_gradient,this.enable_gradient&&(this.gradient=new Gradient(t.gradient)),this.enable_border=t.enable_border,this.enable_border&&(this.border=new Badgeborder(t.border))})),Badgebackground=_createClass$1((function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};_classCallCheck$1(this,e),this.width=t.width,this.height=t.height,this.enable_image=t.enable_image,this.enable_image&&(this.image=new Image(t.image)),this.shape=new Shape(t.shape)})),Badgecontent=_createClass$1((function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};_classCallCheck$1(this,e),this.enable_label=t.enable_label,this.enable_label&&(this.label=new Text(t.label)),this.enable_icon=t.enable_icon,this.enable_icon&&(this.icon=new Icon(t.icon))})),Autoscroll=_createClass$1((function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};_classCallCheck$1(this,e),this.duration_millis=getNumberOrDefault(t.duration_millis,2)/1e3,this.direction=getStringOrDefault(t.direction,"to_top"),this.horizontal_gap=null==t?void 0:t.horizontal_gap})),Badge=_createClass$1((function e(t){var n,i=this;_classCallCheck$1(this,e),this.position=new Position(t.position),this.enable_background=t.enable_background,this.enable_background&&(this.background=new Badgebackground(t.background)),this.content=[],null!=t&&t.content&&0!==t.content.length&&(null!=t&&t.enable_auto_scroll&&"to_bottom"===(null==t||null===(n=t.auto_scroll)||void 0===n?void 0:n.direction)?t.content.forEach((function(e){i.content.unshift(new Badgecontent(e))})):t.content.forEach((function(e){i.content.push(new Badgecontent(e))}))),this.enable_shadow=t.enable_shadow,this.enable_shadow&&(this.shadow=new Shadow(t.shadow)),this.enable_animation=t.enable_animation,this.animation=new Animation(t.animation),this.enable_auto_scroll=t.enable_auto_scroll,this.enable_auto_scroll&&(this.auto_scroll=new Autoscroll(t.auto_scroll)),this.tooltipShown=t.tooltipShown})),Logger$2=window.ApxorLogger,ApxorBadge=function(){function e(t,n,i,o,a){var r,s,c,l,d,p=this;_classCallCheck$1(this,e),_defineProperty$1(this,"_controller",Apxor.getController()),_defineProperty$1(this,"shakeAnimationRepeatFunction",(function(){var e=1e3*p.delayMillis;p.shakeAnimationRepeat(p.interCount,e)})),_defineProperty$1(this,"fadeAnimationRepeatFunction",(function(){var e=1e3*p.delayMillis;p.fadeAnimationRepeat(p.interCount,e)})),_defineProperty$1(this,"rippleAnimationRepeatFunction",(function(){var e,t=1e3*p.delayMillis,n=".apxor-badge-container-stylesdummy-".concat(p.cssPostFix," {\n opacity:0;\n }").replaceAll("\n","").replace(/[\s]{2,999}/g,""),i=document.createElement("style");i.innerHTML=n,null===(e=p.targetElement)||void 0===e||e.appendChild(i),p.rippleAnimationRepeat(p.interCount,t)})),_defineProperty$1(this,"shineAnimationRepeatFunction",(function(){var e=1e3*p.delayMillis;p.shineAnimationRepeat(p.interCount,e)})),_defineProperty$1(this,"_setIntervalForTerminatingBadge",(function(){var e,t,n=p.rtmInstance.getCampaignMeta(p.configId),i=(null==n?void 0:n._attr)||{},o=setInterval((function(){var e,t=!1;null!==(e=p.terminationConfig)&&void 0!==e&&e.enable_attributes&&p.rtmInstance.validateForTerminationAttributes(p.configId)&&(t=!0,p._controller.persistTerminationInfoLocally(p.configId));var n=JSON.parse(p._controller.getFromStorage(APX_TERMINATION_ID$1));if(null!==n&&void 0!==n[p.configId]&&n[p.configId].goalAcheived){for(var a=document.getElementsByClassName("apxor-badge-container-styles-".concat(p.cssPostFix));a.length>0;)a[0].remove();t?Apxor.logEvent("inline_dismissed",_objectSpread2$1({id:p.configId,message_name:p.name,apx_reason:"UserOrSessionAttributesUpdated"},i)):p.targetClicked||Apxor.logEvent("inline_dismissed",_objectSpread2$1({id:p.configId,message_name:p.name,apx_reason:"GoalEventAchieved"},i)),clearTimeout(o)}}),1e3);null!==(e=p.terminationConfig)&&void 0!==e&&e.enable_goal_events||null!==(t=p.terminationConfig)&&void 0!==t&&t.enable_attributes})),_defineProperty$1(this,"cssPath",(function(e,t){if(e.nodeType!==Node.ELEMENT_NODE)return"";for(var n=[],i=e;i;){var o=p._cssPathStep(i,!!t,i===e);if(!o)break;if(n.push(o),o.optimized)break;i=i.parentNode}return n.reverse(),n.join(" > ")})),_defineProperty$1(this,"_cssPathStep",(function(e,t,n){if(e.nodeType!==Node.ELEMENT_NODE)return null;var i=e.getAttribute("id");if(t){if(i)return new DOMNodePathStep(c(i),!0);var o=e.nodeName.toLowerCase();if("body"===o||"head"===o||"html"===o)return new DOMNodePathStep(e.nodeName.toLowerCase(),!0)}var a=e.nodeName.toLowerCase();if(i)return new DOMNodePathStep(a.toLowerCase()+c(i),!0);var r=e.parentNode;if(!r||r.nodeType===Node.DOCUMENT_NODE)return new DOMNodePathStep(a.toLowerCase(),!0);function s(e){var t=e.getAttribute("class");return t?t.split(/\s+/g).filter(Boolean).map((function(e){return"$"+e})):[]}function c(e){return"#"+l(e)}function l(e){if(/^-?[a-zA-Z_][a-zA-Z0-9_-]*$/.test(e))return e;var t=/^(?:[0-9]|-[0-9-]?)/.test(e),n=e.length-1;return e.replace(/./g,(function(e,i){return t&&0===i||!function(e){return!!/[a-zA-Z0-9_-]/.test(e)||e.charCodeAt(0)>=160}(e)?function(e,t){return"\\"+function(e){var t=e.charCodeAt(0).toString(16);1===t.length&&(t="0"+t);return t}(e)+(t?"":" ")}(e,i===n):e}))}for(var d=s(e),p=!1,u=!1,h=-1,g=-1,f=r.children,m=0;(-1===h||!u)&&m<f.length;++m){var _=f[m];if(_.nodeType===Node.ELEMENT_NODE)if(g+=1,_!==e){if(!u&&_.nodeName.toLowerCase()===a.toLowerCase()){p=!0;var v=new Set(d);if(v.size)for(var b=s(_),y=0;y<b.length;++y){var x=b[y];if(v.has(x)&&(v.delete(x),!v.size)){u=!0;break}}else u=!0}}else h=g}var w=a.toLowerCase();if(n&&"input"===a.toLowerCase()&&e.getAttribute("type")&&!e.getAttribute("id")&&!e.getAttribute("class")&&(w+='[type="'+e.getAttribute("type")+'"]'),u)w+=":nth-child("+(h+1)+")";else if(p)for(var C in d)w+="."+l(d[C].substr(1));return new DOMNodePathStep(w,!1)})),this.uiConfig=t,this.rtmInstance=o,this.configId=i.configId,this.name=i.configName,this.terminationConfig=n,this.showCallback=a,this.cssPostFix="-".concat(this.configId,"-").concat(this.name).replaceAll(" ","").replace(/[^\w\s]/gi,""),this.target=new Target(t.target),this.elementVisibilityRetries=null!==(r=null===(s=this.target)||void 0===s||null===(s=s.retry)||void 0===s?void 0:s.max_retries)&&void 0!==r?r:0,this.badge=new Badge(t.badge),this.enable_marketing=t.enable_marketing,this.enable_marketing&&(this.marketing=new Marketing(t.marketing)),this.delay=t.delay||0,this.intraCount=null===(c=this.badge.animation)||void 0===c?void 0:c.intra_count,this.interCount=null===(l=this.badge.animation)||void 0===l?void 0:l.inter_count,this.delayMillis=null===(d=this.badge.animation)||void 0===d?void 0:d.delay_millis,this.count=1,this.shineWidth=0,this.c=1,this.badgeDummyContainer=null,this.contentLabelWidth=0,this.contentIconWidth=0,this.contentWidth=0,this.labelElementDummy=null,this.iconElementdummy=null,this.targetClicked=!1,this.zIndexValue=1,this.zIndexValueminusOne=1,this.contentZindexValue=1,this.ceInstance=ceWrapper.getInstance()}return _createClass$1(e,[{key:"createBadge",value:function(){var e=this;setTimeout((function(){var t=function(){var t,n=window.getComputedStyle(e.targetElement).getPropertyValue("z-index"),i=parseInt(n,10);null===(t=e.targetElement)||void 0===t||t.classList.add("apx-badge-target-style".concat(e.cssPostFix)),e.zIndexValue=i+3,e.zIndexValueminusOne=i+1,e.contentZindexValue=i+5,isNaN(e.zIndex)&&(e.zIndexValue=999,e.zIndexValueminusOne=998,e.contentZindexValue=1e3),e._setBadgeStyles(),e._setBadgeContent(),e._setIntervalForTerminatingBadge(),e._setAutoTerminateForBadges(),e._setOnClickTerminationForBadges(),e.showCallback()};e._setTargetElement((function(){e._isElementVisible()?t():(e.target.retry.max_retries=e.elementVisibilityRetries,e._retryFindingTargetElement(!0,t))}))}),this.delay)}},{key:"_setTargetElement",value:function(e){this.targetElement=getElementFromSelector(this.target.id,this.target.frame_id,this.target.is_text_based,this.target.avf_text_config),this.targetElement?e():this.target.enable_retry?(Logger$2.info("Not found yet. Rechecking the DOM."),this._retryFindingTargetElement(!1,e)):(Logger$2.info("Element with selector:".concat(this.target.id," not found.")),null==Apxor||Apxor.logEvent("apx_nudge_not_shown",{apx_nudge_type:"campaign",apx_nudge_id:this.configId,apx_nudge_name:this.name,apx_variant_code:this.ceInstance.getVariantCode(this.configId),apx_failure_type:"error",apx_reason:"View not found"}))}},{key:"_isElementVisible",value:function(){try{var e=this.targetElement.getBoundingClientRect();if(0===e.width||0===e.height)return!1}catch(e){return!1}return!0}},{key:"_retryFindingTargetElement",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],n=arguments.length>1?arguments[1]:void 0,i=setInterval((function(){(e.targetElement=getElementFromSelector(e.target.id,e.target.frame_id,e.target.is_text_based,e.target.avf_text_config),t)?e._isElementVisible()?(clearInterval(i),n()):(e.target.retry.max_retries=e.target.retry.max_retries-1,e.target.retry.max_retries<=0&&(clearInterval(i),Logger$2.info("Invalid target element. Width and height are 0 for element: ".concat(e.target.id,". Can't show tooltip")),null==Apxor||Apxor.logEvent("apx_nudge_not_shown",{apx_nudge_type:"campaign",apx_nudge_id:e.configId,apx_nudge_name:e.name,apx_variant_code:e.ceInstance.getVariantCode(e.configId),apx_failure_type:"error",apx_reason:"View not visible, as it's width or height are 0"}))):e.targetElement?(clearInterval(i),n()):(e.target.retry.max_retries=e.target.retry.max_retries-1,e.target.retry.max_retries<=0&&(clearInterval(i),console.warn("Element with selector:".concat(e.target.id," not found.")),null==Apxor||Apxor.logEvent("apx_nudge_not_shown",{apx_nudge_type:"campaign",apx_nudge_id:e.configId,apx_nudge_name:e.name,apx_variant_code:e.ceInstance.getVariantCode(e.configId),apx_failure_type:"error",apx_reason:"View not found"})))}),this.target.retry.interval)}},{key:"_setBadgeStyles",value:function(){var e,t="\n ".concat(this._gettargetStyles(),"\n ").concat(this._getBadgeContainerStyles(),"\n ").concat(this._getBadgeContentStyles(),"\n ").concat(this._getBadgeContentElementStyles(),"\n ").concat(this._getBadgeAnimationStyles(),"\n ").concat(this._getBadgeScrollStyles(),"\n ").replaceAll("\n","").replace(/[\s]{2,999}/g,""),n=document.createElement("style");n.innerHTML=t,null===(e=this.targetElement)||void 0===e||e.appendChild(n)}},{key:"_gettargetStyles",value:function(){return"\n .apx-badge-target-style".concat(this.cssPostFix,"{\n position:relative;\n overflow:initial;\n }")}},{key:"_getBadgeContainerStyles",value:function(){var e,t,n,i,o,a=this.badge.enable_background&&this.badge.background.shape.enable_border?this.badge.background.width+this.badge.background.shape.border.width.left+this.badge.background.shape.border.width.right:0,r=this.badge.enable_background&&this.badge.background.shape.enable_border?this.badge.background.height+this.badge.background.shape.border.width.top+this.badge.background.shape.border.width.bottom:0;o=this.badge.enable_background?"\n width:".concat(a,"px;\n height:").concat(r,"px;"):"\n width:auto;\n height:auto;";var s="";switch(this.badge.position.position){case"top-left":s="\n top:-".concat(r/2,"px;\n left:-").concat(a/2,"px;\n -webkit-transform:translate(").concat(this.badge.position.offset.x,"px,").concat(this.badge.position.offset.y,"px);\n ");break;case"top-center":case"top":s="\n top:-".concat(r/2,"px;\n left:calc(50% - ").concat(a/2,"px);\n -webkit-transform:translate(").concat(this.badge.position.offset.x,"px,").concat(this.badge.position.offset.y,"px);\n ");break;case"top-right":s="\n top:-".concat(r/2,"px;\n right:-").concat(a/2,"px;\n -webkit-transform:translate(").concat(this.badge.position.offset.x,"px,").concat(this.badge.position.offset.y,"px);\n ");break;case"bottom-left":s="\n bottom:-".concat(r/2,"px;\n left:-").concat(a/2,"px;\n -webkit-transform:translate(").concat(this.badge.position.offset.x,"px,").concat(this.badge.position.offset.y,"px);\n ");break;case"bottom-center":case"bottom":s="\n left:calc(50% - ".concat(a/2,"px);\n bottom:-").concat(r/2,"px;\n -webkit-transform:translate(").concat(this.badge.position.offset.x,"px,").concat(this.badge.position.offset.y,"px);\n ");break;case"bottom-right":s="\n bottom:-".concat(r/2,"px;\n right:-").concat(a/2,"px;\n -webkit-transform:translate(").concat(this.badge.position.offset.x,"px,").concat(this.badge.position.offset.y,"px);\n ");break;case"center-left":case"left":s="\n top:calc(50% - ".concat(r/2,"px);\n left:-").concat(a/2,"px;\n -webkit-transform:translate(").concat(this.badge.position.offset.x,"px,").concat(this.badge.position.offset.y,"px);\n ");break;case"center-right":case"right":s="\n top:calc(50% - ".concat(r/2,"px);\n right:-").concat(a/2,"px;\n -webkit-transform:translate(").concat(this.badge.position.offset.x,"px,").concat(this.badge.position.offset.y,"px);\n ");break;default:s="\n top:calc(50% - ".concat(r/2,"px);\n left:calc(50% - ").concat(a/2,"px);\n -webkit-transform:translate(").concat(this.badge.position.offset.x,"px,").concat(this.badge.position.offset.y,"px);\n ")}var c="";this.badge.enable_background&&this.badge.background.enable_image&&(c="\n .apxor-badge-container-background-image".concat(this.cssPostFix,"{\n background-image: url('").concat(this.badge.background.image.path,"');\n background-repeat: no-repeat;\n background-attachment: fixed; \n background-size: 100% 100%;\n height: ").concat(this.badge.background.height,"px;\n width: ").concat(this.badge.background.width,"px;\n }"));var l="";this.badge.enable_background&&0!==Object.keys(this.badge.background.shape).length&&this.badge.background.shape.enable_gradient&&(l="\n background-image:linear-gradient(".concat(this.badge.background.shape.gradient.direction,", ").concat(this.badge.background.shape.gradient.colors[0],", ").concat(this.badge.background.shape.gradient.colors[1],");\n "));var d="";if(this.badge.enable_background&&null!==(e=this.badge.background)&&void 0!==e&&e.shape){var p="";this.badge.background.enable_image||("circle"===this.badge.background.shape.type?p="\n border:".concat(this.badge.background.shape.border.width.top,"px solid ").concat(this.badge.background.shape.border.color,";\n border-radius:50%;\n background:").concat(this.badge.background.shape.color,";"):"rectangle"===this.badge.background.shape.type&&(p="\n background:".concat(this.badge.background.shape.color,";\n border-top:").concat(this.badge.background.shape.border.width.top,"px solid ").concat(this.badge.background.shape.border.color,";\n border-right:").concat(this.badge.background.shape.border.width.right,"px solid ").concat(this.badge.background.shape.border.color,";\n border-bottom:").concat(this.badge.background.shape.border.width.bottom,"px solid ").concat(this.badge.background.shape.border.color,";\n border-left:").concat(this.badge.background.shape.border.width.left,"px solid ").concat(this.badge.background.shape.border.color,";\n border-top-left-radius:").concat(this.badge.background.shape.border.corners.top_left,"px;\n border-top-right-radius:").concat(this.badge.background.shape.border.corners.top_right,"px;\n border-bottom-left-radius:").concat(this.badge.background.shape.border.corners.bottom_left,"px;\n border-bottom-right-radius:").concat(this.badge.background.shape.border.corners.bottom_right,"px;\n "))),d="\n ".concat(p,"\n ")}var u="",h="circle"===(null===(t=this.badge)||void 0===t||null===(t=t.animation)||void 0===t?void 0:t.rippleShape)?"50%":"".concat(null===(n=this.badge)||void 0===n||null===(n=n.animation)||void 0===n?void 0:n.rippleCornerRadius,"px");return this.badge.enable_shadow&&(u="\n box-shadow: ".concat(this.badge.shadow.offset_x,"px ").concat(this.badge.shadow.offset_y,"px ").concat(this.badge.shadow.blur_radius,"px ").concat(this.badge.shadow.spread_radius,"px ").concat(this.badge.shadow.color,";\n ")),"\n .apxor-badge-container-styles-".concat(this.cssPostFix,"{\n position:absolute;\n display:flex;\n align-items:center;\n overflow:hidden;\n ").concat(l,"\n ").concat(o,"\n ").concat(s,"\n ").concat(d,"\n ").concat(u,"\n z-index:").concat(this.zIndexValue,";\n text-transform:none;\n }\n .apxor-badge-container-stylesdummy-").concat(this.cssPostFix,"{\n position:absolute;\n display:flex;\n z-index:").concat(this.zIndexValueminusOne,";\n align-items:center;\n overflow:hidden;\n width:").concat(this.badge.background.width,"px;\n height:").concat(this.badge.background.height,"px;\n ").concat(s,"\n ").concat(u,"\n text-transform:none;\n background:").concat(null===(i=this.badge)||void 0===i||null===(i=i.animation)||void 0===i?void 0:i.rippleColor,";\n border-radius:").concat(h,";\n }\n ").concat(c)}},{key:"_getBadgeContentStyles",value:function(){var e="";return this.badge.enable_auto_scroll&&(e="to_right"===this.badge.auto_scroll.direction||"to_left"===this.badge.auto_scroll.direction?"display:flex;\n flex-direction:row;\n ":""),"\n .apxor-badge-content-container-".concat(this.cssPostFix,"{\n position:relative;\n width:100%;\n height:100%;\n overflow:hidden;\n ").concat(e,"\n }")}},{key:"_getBadgeContentElementStyles",value:function(){var e,t=this,n="",i="";return i=(null===(e=this.badge.background)||void 0===e?void 0:e.width)>this.contentWidth?"center":"left",0!==this.badge.content.length&&this.badge.content.forEach((function(e,o){if(n+="\n .apxor-badge-contentelement-".concat(o,"-").concat(t.cssPostFix,"{\n width:100%;\n height:100%;\n display: flex;\n justify-content:").concat(i,";\n align-items:center;\n }"),e.enable_icon){var a="";e.icon.enable_margin&&(a="margin:".concat(e.icon.margin.top,"px ").concat(e.icon.margin.right,"px ").concat(e.icon.margin.bottom,"px ").concat(e.icon.margin.left,"px;"));var r="";e.icon.enable_border&&(r="\n border-radius:".concat(e.icon.border.radius,"%;\n border:").concat(e.icon.border.width,"px ").concat(e.icon.border.style," ").concat(e.icon.border.color,";\n ")),n+="\n .apxor-badge-".concat(o,"-icon-container").concat(t.cssPostFix,"{\n width:auto;\n height:auto;\n display: flex;\n justify-content:center;\n align-items:center;\n }\n .apxor-badge-").concat(o,"-icon-content").concat(t.cssPostFix," {\n position:relative;\n background:url('").concat(e.icon.path,"') no-repeat center;\n background-size:cover;\n display:inline-block;\n height: ").concat(e.icon.height,"px;\n width: ").concat(e.icon.width,"px;\n ").concat(a,"\n ").concat(r,"\n }")}if(e.enable_label){var s="";e.label.enable_margin&&(s="margin:".concat(e.label.margin.top,"px ").concat(e.label.margin.right,"px ").concat(e.label.margin.bottom,"px ").concat(e.label.margin.left,"px;")),n+="\n .apxor-badge-".concat(o,"-label-content-").concat(t.cssPostFix,"{\n text-align:").concat(e.label.alignment,";\n display: flex;\n white-space: nowrap;\n text-overflow: ellipsis;\n align-items:center;\n ").concat(s,"\n }\n ")}})),n}},{key:"_getBadgeAnimationStyles",value:function(){var e="",t="";if(this.badge.enable_animation){var n,i,o,a,r,s;if("shake"===(null===(n=this.badge.animation)||void 0===n?void 0:n.type))if(0==this.badge.animation.intra_count)e="\n .apxor-badge-container-styles-".concat(this.cssPostFix,"{\n animation: badgeAnimation ").concat(this.badge.animation.duration_millis,"s infinite;\n }"),t="horizontal"===this.badge.animation.shakeDirection?"@keyframes badgeAnimation {\n 0% { transform: translateX(0) }\n 25% { transform: translateX(5px) }\n 50% { transform: translateX(0) }\n 75% { transform: translateX(-5px) }\n 100% {transform:translateX(0)}\n }":"@keyframes badgeAnimation {\n 0% { transform: translateY(0) }\n 25% { transform: translateY(5px) }\n 50% { transform: translateY(0) }\n 75% { transform: translateY(-5px) }\n 100% { transform: translateY(0) }\n }";else e="\n .apxor-badge-container-styles-".concat(this.cssPostFix,"{\n animation: badgeAnimation ").concat(this.badge.animation.duration_millis,"s ").concat(null===(r=this.badge.animation)||void 0===r?void 0:r.intra_count,";\n }"),t="horizontal"===this.badge.animation.shakeDirection?"@keyframes badgeAnimation {\n 0% { transform: translateX(0) }\n 25% { transform: translateX(5px) }\n 50% { transform: translateX(0) }\n 75% { transform: translateX(-5px) }\n 100% {transform:translateX(0)}\n }":"@keyframes badgeAnimation {\n 0% { transform: translateY(0) }\n 25% { transform: translateY(5px) }\n 50% { transform: translateY(0) }\n 75% { transform: translateY(-5px) }\n 100% { transform: translateY(0) }\n }";if("fade"===(null===(i=this.badge.animation)||void 0===i?void 0:i.type))if(0==this.badge.animation.intra_count)e="\n .apxor-badge-container-styles-".concat(this.cssPostFix,"{\n animation: badgeAnimation ").concat(this.badge.animation.duration_millis,"s infinite;\n }"),t="\n @keyframes badgeAnimation {\n 0% { opacity:1;}\n 50% { opacity:".concat(this.badge.animation.fade_opacity/100,";}\n 100% { opacity:1}\n }");else e="\n .apxor-badge-container-styles-".concat(this.cssPostFix,"{\n animation: badgeAnimation ").concat(this.badge.animation.duration_millis,"s ").concat(null===(s=this.badge.animation)||void 0===s?void 0:s.intra_count,";\n }"),t="\n @keyframes badgeAnimation {\n 0% { opacity:1;}\n 50% { opacity:".concat(this.badge.animation.fade_opacity/100,";}\n 100% { opacity:1}\n }");if("ripple"===(null===(o=this.badge.animation)||void 0===o?void 0:o.type)){var c,l=this.badge.animation.rippleArea/2;if(0==this.badge.animation.intra_count)e="\n .apxor-badge-container-stylesdummy-".concat(this.cssPostFix,"{\n animation: badgeAnimation ").concat(this.badge.animation.duration_millis,"s ease-in-out;\n animation-iteration-count: infinite;\n \n }"),t="\n @keyframes badgeAnimation {\n 0% {\n box-shadow: 0 0 0 0 ".concat(this.badge.animation.rippleColor,", 0 0 0 0 ").concat(this.badge.animation.rippleColor,";\n }\n \n 80% {\n box-shadow: 0 0 0 ").concat(l,"px ").concat(this.badge.animation.rippleColor,", 0 0 0 ").concat(this.badge.animation.rippleArea,"px ").concat(this.badge.animation.rippleColor,";\n }\n\n 100% {\n box-shadow: 0 0 0 0 ").concat(this.badge.animation.rippleColor,", 0 0 0 0 ").concat(this.badge.animation.rippleColor,";\n } \n }");else e="\n .apxor-badge-container-stylesdummy-".concat(this.cssPostFix,"{\n animation: badgeAnimation ").concat(this.badge.animation.duration_millis,"s ease-in-out;\n animation-iteration-count: ").concat(null===(c=this.badge.animation)||void 0===c?void 0:c.intra_count,";\n }"),t="\n @keyframes badgeAnimation {\n 0% {\n box-shadow: 0 0 0 0 ".concat(this.badge.animation.rippleColor,", 0 0 0 0 ").concat(this.badge.animation.rippleColor,";\n }\n \n 80% {\n box-shadow: 0 0 0 ").concat(l,"px ").concat(this.badge.animation.rippleColor,", 0 0 0 ").concat(this.badge.animation.rippleArea,"px ").concat(this.badge.animation.rippleColor,";\n }\n\n 100% {\n box-shadow: 0 0 0 0 ").concat(this.badge.animation.rippleColor,", 0 0 0 0 ").concat(this.badge.animation.rippleColor,";\n } \n }")}if("shine"===(null===(a=this.badge.animation)||void 0===a?void 0:a.type)){var d,p,u,h="",g=null===(d=this.badge.animation)||void 0===d||null===(d=d.lines[0])||void 0===d?void 0:d.width,f=null===(p=this.badge.animation)||void 0===p||null===(p=p.lines[1])||void 0===p?void 0:p.width,m=Math.max(g,f),_=this.badge.background.width+m,v=this.badge.animation.lines.length,b=0,y=this.badge.animation.shineColor;switch(b=1===v?this.badge.animation.lines[0].width:this.badge.animation.lines_gap+g+f,this.badge.animation.shineDirection){case"to_bottom_right":h="\n left:-".concat(_,"px;\n transform: skewx(-30deg)\n ");break;case"to_top_right":h="\n left:-".concat(_,"px;\n transform: skewx(30deg)\n ");break;case"to_top_left":h="\n right:-".concat(_,"px;\n transform: skewx(-30deg)\n ");break;case"to_bottom_left":h="\n right:-".concat(_,"px;\n transform: skewx(30deg)\n ")}if(0==this.badge.animation.intra_count)e="\n .apxor-badge-content-container-".concat(this.cssPostFix,"::before{\n content:'';\n position:absolute;\n background:transparent;\n width:").concat(b,"px;\n ").concat(1===v?"border-left: ".concat(g,"px solid ").concat(y,";"):"border-left: ".concat(g,"px solid ").concat(y,"; border-right: ").concat(f,"px solid ").concat(y,";"),"\n height:100%;\n z-index:").concat(this.contentZindexValue,";\n animation: badgeAnimation ").concat(this.badge.animation.duration_millis,"s infinite;\n ").concat(h,";\n }");else e="\n .apxor-badge-content-container-".concat(this.cssPostFix,"::before{\n content:'';\n position:absolute;\n background:transparent;\n width:").concat(b,"px;\n ").concat(1===v?"border-left: ".concat(g,"px solid ").concat(y,";"):"border-left: ".concat(g,"px solid ").concat(y,"; border-right: ").concat(f,"px solid ").concat(y,";"),"\n height:100%;\n animation: badgeAnimation ").concat(this.badge.animation.duration_millis,"s ").concat(null===(u=this.badge.animation)||void 0===u?void 0:u.intra_count,";\n ").concat(h,";\n }");t="to_bottom_right"===this.badge.animation.shineDirection||"to_top_right"===this.badge.animation.shineDirection?"@keyframes badgeAnimation {\n 0% {\n left:-30%;\n }\n 100% {\n left:130%;\n }\n }":"@keyframes badgeAnimation {\n 0% {\n right:-30%;\n }\n 100% {\n right:130%;\n }\n }"}}return"\n ".concat(e,"\n ").concat(t,"\n ")}},{key:"_getBadgeScrollStyles",value:function(){var e="";return this.badge.enable_auto_scroll&&("to_top"!==this.badge.auto_scroll.direction&&"to_bottom"!==this.badge.auto_scroll.direction||(e="\n #apxor-scroll-option".concat(this.cssPostFix,"{\n width: inherit;\n height: inherit;\n animation: scrollAnimation ").concat(this.badge.auto_scroll.duration_millis,"s linear infinite;\n }")),"to_left"!==this.badge.auto_scroll.direction&&"to_right"!==this.badge.auto_scroll.direction||(e="\n #apxor-scroll-option".concat(this.cssPostFix,"{\n width: inherit;\n height: inherit;\n animation: scrollText ").concat(this.badge.auto_scroll.duration_millis,"s linear infinite;\n }"))),e}},{key:"_getBadgeScrollKeyFrameStyles",value:function(e){var t,n,i,o,a,r,s,c="";(r=1,(null===(t=this.badge)||void 0===t?void 0:t.background.width)>this.contentWidth)?a="100%":(r=this.contentWidth/(null===(s=this.badge)||void 0===s||null===(s=s.background)||void 0===s?void 0:s.width),a="".concat(100*r,"%"));if(null!==(n=!this.badge.enable_auto_scroll)&&void 0!==n?!n:null!==(i=this.badge)&&void 0!==i&&i.enable_animation){switch(this.badge.auto_scroll.direction){case"to_bottom":c="\n @keyframes scrollAnimation {\n 0% {\n transform: translateY(-".concat(100*e,"%);\n }\n 100% {\n transform: translateY(100%);\n }\n }\n ");break;case"to_top":c="\n @keyframes scrollAnimation {\n 0% {\n transform: translateY(100%);\n }\n 100% {\n transform: translateY(-".concat(100*e,"%);\n }\n }\n ");break;case"to_left":c="\n @keyframes scrollText {\n from {\n transform: translate3d(100%, 0, 0);\n }\n to {\n transform: translate3d(-".concat(a,", 0, 0);\n }\n }\n ");break;case"to_right":c="\n @keyframes scrollText {\n from {\n transform: translate3d(-".concat(a,", 0, 0);\n }\n to {\n transform: translate3d(100%, 0, 0);\n }\n }\n ")}var l="\n ".concat(c,"\n ").replaceAll("\n","").replace(/[\s]{2,999}/g,""),d=document.createElement("style");d.innerHTML=l,null===(o=this.targetElement)||void 0===o||o.appendChild(d)}}},{key:"_setBadgeContent",value:function(){this.createBadgeContainer(),this.createBadgeContent(),this.animationStop()}},{key:"animationStop",value:function(){var e,t,n,i,o=".apxor-badge-container-styles-".concat(this.cssPostFix),a=document.querySelector(o),r=".apxor-badge-container-stylesdummy-".concat(this.cssPostFix),s=document.querySelector(r);"shake"===(null===(e=this.badge.animation)||void 0===e?void 0:e.type)&&0!=this.badge.animation.intra_count?a.addEventListener("animationend",this.shakeAnimationRepeatFunction):"fade"===(null===(t=this.badge.animation)||void 0===t?void 0:t.type)&&0!=this.badge.animation.intra_count?a.addEventListener("animationend",this.fadeAnimationRepeatFunction):"ripple"===(null===(n=this.badge.animation)||void 0===n?void 0:n.type)&&0!=this.badge.animation.intra_count?s.addEventListener("animationend",this.rippleAnimationRepeatFunction):"shine"===(null===(i=this.badge.animation)||void 0===i?void 0:i.type)&&0!=this.badge.animation.intra_count&&a.addEventListener("animationend",this.shineAnimationRepeatFunction)}},{key:"shakeAnimationRepeat",value:function(e,t){var n=this,i=".apxor-badge-container-styles-".concat(this.cssPostFix),o=document.querySelector(i);0!=e&&this.count===e&&o.removeEventListener("animationend",this.shakeAnimationRepeatFunction);setTimeout((function(){if(n.count<e){var t,i,o,a;o="\n .apxor-badge-container-styles-".concat(n.cssPostFix,"{\n animation: badgeAnimation").concat(n.count," ").concat(n.badge.animation.duration_millis,"s ").concat(null===(t=n.badge.animation)||void 0===t?void 0:t.intra_count,";\n }"),a="horizontal"===n.badge.animation.shakeDirection?"@keyframes badgeAnimation".concat(n.count," {\n 0% { transform: translateX(0) }\n 25% { transform: translateX(5px) }\n 50% { transform: translateX(0) }\n 75% { transform: translateX(-5px) }\n 100% {transform:translateX(0)}\n }"):"@keyframes badgeAnimation".concat(n.count," {\n 0% { transform: translateY(0) }\n 25% { transform: translateY(5px) }\n 50% { transform: translateY(0) }\n 75% { transform: translateY(-5px) }\n 100% { transform: translateY(0) }\n }");var r="\n ".concat(o,"\n ").concat(a,"\n ").replaceAll("\n","").replace(/[\s]{2,999}/g,""),s=document.createElement("style");s.innerHTML=r,null===(i=n.targetElement)||void 0===i||i.appendChild(s),0!=n.badge.animation.inter_count&&(n.count=n.count+1),n.animationStop()}else if(0==e){var c,l,d,p;d="\n .apxor-badge-container-styles-".concat(n.cssPostFix,"{\n animation: badgeAnimation").concat(n.c," ").concat(n.badge.animation.duration_millis,"s ").concat(null===(c=n.badge.animation)||void 0===c?void 0:c.intra_count,";\n }"),p="horizontal"===n.badge.animation.shakeDirection?"@keyframes badgeAnimation".concat(n.c," {\n 0% { transform: translateX(0) }\n 25% { transform: translateX(5px) }\n 50% { transform: translateX(0) }\n 75% { transform: translateX(-5px) }\n 100% {transform:translateX(0)}\n }"):"@keyframes badgeAnimation".concat(n.c," {\n 0% { transform: translateY(0) }\n 25% { transform: translateY(5px) }\n 50% { transform: translateY(0) }\n 75% { transform: translateY(-5px) }\n 100% { transform: translateY(0) }\n }");var u="\n ".concat(d,"\n ").concat(p,"\n ").replaceAll("\n","").replace(/[\s]{2,999}/g,""),h=document.createElement("style");h.innerHTML=u,null===(l=n.targetElement)||void 0===l||l.appendChild(h),n.animationStop(),n.c=n.c+1}}),t)}},{key:"fadeAnimationRepeat",value:function(e,t){var n=this,i=".apxor-badge-container-styles-".concat(this.cssPostFix),o=document.querySelector(i);0!=e&&this.count===e&&o.removeEventListener("animationend",this.fadeAnimationRepeatFunction);setTimeout((function(){if(n.count<e){var t,i,o,a;o="\n .apxor-badge-container-styles-".concat(n.cssPostFix,"{\n animation: badgeAnimation").concat(n.count," ").concat(n.badge.animation.duration_millis,"s ").concat(null===(t=n.badge.animation)||void 0===t?void 0:t.intra_count,";\n }"),a="\n @keyframes badgeAnimation".concat(n.count," {\n 0% { opacity:1;}\n 50% { opacity:").concat(n.badge.animation.fade_opacity/100,";}\n 100% { opacity:1}\n }");var r="\n ".concat(o,"\n ").concat(a,"\n ").replaceAll("\n","").replace(/[\s]{2,999}/g,""),s=document.createElement("style");s.innerHTML=r,null===(i=n.targetElement)||void 0===i||i.appendChild(s),0!=n.badge.animation.inter_count&&(n.count=n.count+1),n.animationStop()}else if(0==e){var c,l,d,p;d="\n .apxor-badge-container-styles-".concat(n.cssPostFix,"{\n animation: badgeAnimation").concat(n.c," ").concat(n.badge.animation.duration_millis,"s ").concat(null===(c=n.badge.animation)||void 0===c?void 0:c.intra_count,";\n }"),p="\n @keyframes badgeAnimation".concat(n.c," {\n 0% { opacity:1;}\n 50% { opacity:").concat(n.badge.animation.fade_opacity/100,";}\n 100% { opacity:1}\n }");var u="\n ".concat(d,"\n ").concat(p,"\n ").replaceAll("\n","").replace(/[\s]{2,999}/g,""),h=document.createElement("style");h.innerHTML=u,null===(l=n.targetElement)||void 0===l||l.appendChild(h),n.c=n.c+1,n.animationStop()}}),t)}},{key:"rippleAnimationRepeat",value:function(e,t){var n=this,i=".apxor-badge-container-stylesdummy-".concat(this.cssPostFix),o=document.querySelector(i);0!=e&&this.count===e&&o.removeEventListener("animationend",this.rippleAnimationRepeatFunction);setTimeout((function(){var t=n.badge.animation.rippleArea/2;if(n.count<e){var i,o,a,r;a="\n .apxor-badge-container-stylesdummy-".concat(n.cssPostFix,"{\n animation: badgeAnimation").concat(n.count," ").concat(n.badge.animation.duration_millis,"s ease-in-out;\n animation-iteration-count: ").concat(null===(i=n.badge.animation)||void 0===i?void 0:i.intra_count,";\n opacity:1;\n }"),r="\n @keyframes badgeAnimation".concat(n.count," {\n 0% {\n box-shadow: 0 0 0 0 ").concat(n.badge.animation.rippleColor,", 0 0 0 0 ").concat(n.badge.animation.rippleColor,";\n }\n \n 80% {\n box-shadow: 0 0 0 ").concat(t,"px ").concat(n.badge.animation.rippleColor,", 0 0 0 ").concat(n.badge.animation.rippleArea,"px ").concat(n.badge.animation.rippleColor,";\n }\n\n 100% {\n box-shadow: 0 0 0 0 ").concat(n.badge.animation.rippleColor,", 0 0 0 0 ").concat(n.badge.animation.rippleColor,";\n } \n }");var s="\n ".concat(a,"\n ").concat(r,"\n ").replaceAll("\n","").replace(/[\s]{2,999}/g,""),c=document.createElement("style");c.innerHTML=s,null===(o=n.targetElement)||void 0===o||o.appendChild(c),0!=n.badge.animation.inter_count&&(n.count=n.count+1),n.animationStop()}else if(0==e){var l,d,p,u;p="\n .apxor-badge-container-stylesdummy-".concat(n.cssPostFix,"{\n animation: badgeAnimation").concat(n.c," ").concat(n.badge.animation.duration_millis,"s ease-in-out;\n animation-iteration-count: ").concat(null===(l=n.badge.animation)||void 0===l?void 0:l.intra_count,";\n }"),u="\n @keyframes badgeAnimation".concat(n.c," {\n 0% {\n box-shadow: 0 0 0 0 ").concat(n.badge.animation.rippleColor,", 0 0 0 0 ").concat(n.badge.animation.rippleColor,";\n }\n \n 80% {\n box-shadow: 0 0 0 ").concat(t,"px ").concat(n.badge.animation.rippleColor,", 0 0 0 ").concat(n.badge.animation.rippleArea,"px ").concat(n.badge.animation.rippleColor,";\n }\n\n 100% {\n box-shadow: 0 0 0 0 ").concat(n.badge.animation.rippleColor,", 0 0 0 0 ").concat(n.badge.animation.rippleColor,";\n } \n }");var h="\n ".concat(p,"\n ").concat(u,"\n ").replaceAll("\n","").replace(/[\s]{2,999}/g,""),g=document.createElement("style");g.innerHTML=h,null===(d=n.targetElement)||void 0===d||d.appendChild(g),n.c=n.c+1,n.animationStop()}}),t)}},{key:"shineAnimationRepeat",value:function(e,t){var n,i,o=this,a=null===(n=this.badge.animation)||void 0===n||null===(n=n.lines[0])||void 0===n?void 0:n.width,r=null===(i=this.badge.animation)||void 0===i||null===(i=i.lines[1])||void 0===i?void 0:i.width,s=Math.max(a,r),c=this.badge.background.width+s,l=".apxor-badge-container-styles-".concat(this.cssPostFix),d=document.querySelector(l);0!=e&&this.count===e&&d.removeEventListener("animationend",this.shineAnimationRepeatFunction);setTimeout((function(){var t,n,i=o.badge.animation.lines.length,a=0,r=o.badge.animation.shineColor,s=null===(t=o.badge.animation)||void 0===t||null===(t=t.lines[0])||void 0===t?void 0:t.width,l=null===(n=o.badge.animation)||void 0===n||null===(n=n.lines[1])||void 0===n?void 0:n.width;if(a=1===i?o.badge.animation.lines[0].width:o.badge.animation.lines_gap+s+l,o.count<e){var d,p,u,h,g="";switch(o.badge.animation.shineDirection){case"to_bottom_right":g="\n left:-".concat(c,"px;\n transform: skewx(-30deg)\n ");break;case"to_top_right":g="\n left:-".concat(c,"pxx;\n transform: skewx(30deg)\n ");break;case"to_top_left":g="\n right:-".concat(c,"px;\n transform: skewx(-30deg)\n ");break;case"to_bottom_left":g="\n right:-".concat(c,"px;\n transform: skewx(30deg)\n ")}u="\n .apxor-badge-content-container-".concat(o.cssPostFix,"::before{\n content:'';\n position:absolute;\n background:transparent;\n background:transparent;\n z-index:").concat(o.contentZindexValue,";\n width:").concat(a,"px;\n ").concat(1===i?"border-left: ".concat(s,"px solid ").concat(r,";"):"border-left: ".concat(s,"px solid ").concat(r,"; border-right: ").concat(l,"px solid ").concat(r,";"),"\n height:100%;\n animation: badgeAnimation").concat(o.count," ").concat(o.badge.animation.duration_millis,"s ").concat(null===(d=o.badge.animation)||void 0===d?void 0:d.intra_count,";\n ").concat(g,";\n }"),h="to_bottom_right"===o.badge.animation.shineDirection||"to_top_right"===o.badge.animation.shineDirection?"@keyframes badgeAnimation".concat(o.count," {\n 0% {\n left:-30%;\n }\n 100% {\n left:130%;\n }\n }"):"@keyframes badgeAnimation".concat(o.count," {\n 0% {\n right:-30%;\n }\n 100% {\n right:130%;\n }\n }");var f="\n ".concat(u,"\n ").concat(h,"\n ").replaceAll("\n","").replace(/[\s]{2,999}/g,""),m=document.createElement("style");m.innerHTML=f,null===(p=o.targetElement)||void 0===p||p.appendChild(m),0!=o.badge.animation.inter_count&&(o.count=o.count+1),o.animationStop()}else if(0==e){var _,v,b,y,x="";switch(o.badge.animation.shineDirection){case"to_bottom_right":x="\n left:-".concat(c,"px;;\n transform: skewx(-30deg)\n ");break;case"to_top_right":x="\n left:-".concat(c,"px;;\n transform: skewx(30deg)\n ");break;case"to_top_left":x="\n right:-".concat(c,"px;;\n transform: skewx(-30deg)\n ");break;case"to_bottom_left":x="\n right:-".concat(c,"px;;\n transform: skewx(30deg)\n ")}b="\n .apxor-badge-content-container-".concat(o.cssPostFix,"::before{\n content:'';\n position:absolute;\n background:transparent;\n background:transparent;\n width:").concat(a,"px;\n ").concat(1===i?"border-left: ".concat(s,"px solid ").concat(r,";"):"border-left: ".concat(s,"px solid ").concat(r,"; border-right: ").concat(l,"px solid ").concat(r,";"),"\n height:100%;\n animation: badgeAnimation").concat(o.c," ").concat(o.badge.animation.duration_millis,"s ").concat(null===(_=o.badge.animation)||void 0===_?void 0:_.intra_count,";\n ").concat(x,";\n }"),y="to_bottom_right"===o.badge.animation.shineDirection||"to_top_right"===o.badge.animation.shineDirection?"@keyframes badgeAnimation".concat(o.c," {\n 0% {\n left:-30%;\n }\n 100% {\n left:130%;\n }\n }"):"@keyframes badgeAnimation".concat(o.c," {\n 0% {\n right:-30%;\n }\n 100% {\n right:130%;\n }\n }");var w="\n ".concat(b,"\n ").concat(y,"\n ").replaceAll("\n","").replace(/[\s]{2,999}/g,""),C=document.createElement("style");C.innerHTML=w,null===(v=o.targetElement)||void 0===v||v.appendChild(C),o.c=o.c+1,o.animationStop()}}),t)}},{key:"createBadgeContainer",value:function(){this.badgeContainer=document.createElement("div"),this.badgeDummyContainer=document.createElement("div"),this.badgeContainer.id="apxor-badge-container-".concat("-".concat(this.configId).replaceAll(" ","").replace(/[^\w\s]/gi,"")),this.badgeContainer.classList.add("apxor-badge-container"),this.badgeContainer.classList.add("apxor-badge-container-styles-".concat(this.cssPostFix)),this.badgeDummyContainer.classList.add("apxor-badge-container"),this.badgeDummyContainer.classList.add("apxor-badge-container-stylesdummy-".concat(this.cssPostFix)),this.badge.enable_background&&this.badge.background.enable_image&&this.badgeContainer.classList.add("apxor-badge-container-background-image".concat(this.cssPostFix)),this.targetElement.appendChild(this.badgeContainer),this.targetElement.appendChild(this.badgeDummyContainer)}},{key:"createBadgeContent",value:function(){var e,t=this;this.badgeContent=document.createElement("div"),this.badgeContent.classList.add("apxor-badge-content-container-".concat(this.cssPostFix)),null!==(e=this.badge)&&void 0!==e&&e.content&&0!==this.badge.content.length&&(this.badge.content.forEach((function(e,n){var i,o;if(t.badgeContentElement=document.createElement("div"),t.badgeContentElement.classList.add("apxor-badge-contentelement-".concat(n,"-").concat(t.cssPostFix)),t.badgeContentElement.setAttribute("id","apxor-scroll-option".concat(t.cssPostFix)),e.enable_icon&&null!==(i=e.icon)&&void 0!==i&&i.position&&"left"===e.icon.position){var a=document.createElement("div");a.classList.add("apxor-badge-".concat(n,"-icon-container").concat(t.cssPostFix));var r=document.createElement("div");r.classList.add("apxor-badge-".concat(n,"-icon-content").concat(t.cssPostFix)),a.appendChild(r),t.iconElementdummy=a,t.badgeContentElement.appendChild(a)}if(e.enable_label){resolveDynamicText(e.label);var s=document.createElement("div");s.classList.add("apxor-badge-".concat(n,"-label-content-").concat(t.cssPostFix)),s.appendChild(createNewTextElement(e.label,t.configId,"label-content-".concat(n))),t.labelElementDummy=s,t.badgeContentElement.appendChild(s)}if(e.enable_icon&&null!==(o=e.icon)&&void 0!==o&&o.position&&"right"===e.icon.position){var c=document.createElement("div");c.classList.add("apxor-badge-".concat(n,"-icon-container").concat(t.cssPostFix));var l=document.createElement("div");l.classList.add("apxor-badge-".concat(n,"-icon-content").concat(t.cssPostFix)),c.appendChild(l),t.iconElementdummy=c,t.badgeContentElement.appendChild(c)}!0!==t.badge.enable_auto_scroll||0!=n||"to_left"!==t.badge.auto_scroll.direction&&"to_right"!==t.badge.auto_scroll.direction?!0===t.badge.enable_auto_scroll&&0===n?t.badgeContent.appendChild(t.badgeContentElement):!0!==t.badge.enable_auto_scroll||"to_top"!==t.badge.auto_scroll.direction&&"to_bottom"!==t.badge.auto_scroll.direction?!1===t.badge.enable_auto_scroll&&t.badgeContent.appendChild(t.badgeContentElement):t.badgeContent.appendChild(t.badgeContentElement):t.badgeContent.appendChild(t.badgeContentElement)})),this.badgeContainer.appendChild(this.badgeContent),this.badge.content[0].enable_label&&(this.contentLabelWidth=this.labelElementDummy.getBoundingClientRect().width),this.badge.content[0].enable_icon&&(this.contentIconWidth=this.iconElementdummy.getBoundingClientRect().width),this.contentWidth=this.contentLabelWidth+this.contentIconWidth,this._getBadgeScrollKeyFrameStyles(this.badge.content.length));var n=document.querySelector(".apxor-badge-contentelement-0-".concat(this.cssPostFix));this.badge.background.width>this.contentWidth?n.style.justifyContent="center":n.style.justifyContent="left"}},{key:"_setOnClickTerminationForBadges",value:function(){var e,t,n=this,i=this.rtmInstance.getCampaignMeta(this.configId),o=(null==i?void 0:i._attr)||{};if(null!==(e=this.terminationConfig)&&void 0!==e&&e.enable_touch&&0!==Object(this.terminationConfig.touch).length&&null!==(t=this.terminationConfig.touch)&&void 0!==t&&t.target_view){this.targetElement.addEventListener("click",(function e(){for(var t=document.getElementsByClassName("apxor-badge-container-styles-".concat(n.cssPostFix));t.length>0;)t[0].remove();n.targetClicked=!0,Apxor.logEvent("inline_dismissed",_objectSpread2$1({id:n.configId,message_name:n.name,apx_reason:"InlineTargetViewClicked"},o)),n._controller.persistTerminationInfoLocally(n.configId),n.targetElement.removeEventListener("click",e)}))}}},{key:"_setAutoTerminateForBadges",value:function(){var e,t=this,n=this.rtmInstance.getCampaignMeta(this.configId),i=(null==n?void 0:n._attr)||{};null!==(e=this.terminationConfig)&&void 0!==e&&e.enable_time_based&&"duration"===this.terminationConfig.time_based.type&&window.setTimeout((function(){for(var e=document.getElementsByClassName("apxor-badge-container-styles-".concat(t.cssPostFix));e.length>0;)e[0].remove();Apxor.logEvent("inline_dismissed",_objectSpread2$1({id:t.configId,message_name:t.name,apx_reason:"DurationFinished"},i)),t._controller.persistTerminationInfoLocally(t.configId)}),this.terminationConfig.time_based.duration_seconds)}}]),e}(),DOMNodePathStep=function(e,t){this.value=e,this.optimized=t||!1};DOMNodePathStep.prototype={toString:function(){return this.value}};var BackgroundOffset=_createClass$1((function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};_classCallCheck$1(this,e),this.top=null==t?void 0:t.top,this.bottom=null==t?void 0:t.bottom,this.left=null==t?void 0:t.left,this.right=null==t?void 0:t.right})),OffsetXY=_createClass$1((function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};_classCallCheck$1(this,e),this.x=getNumberOrDefault(null==t?void 0:t.x,0),this.y=getNumberOrDefault(null==t?void 0:t.y,0)})),Background=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};_classCallCheck$1(this,e),this.background_color=getColorOrDefault(null==t?void 0:t.color,"#FFF").toLowerCase(),this.opacity=t.opacity,this.shape=getStringOrDefault(null==t?void 0:t.shape,"rectangle").toLowerCase(),this.offset=new OffsetXY(t.offset),this.delta_circle=null==t?void 0:t.delta_circle,this.delta_rect=new BackgroundOffset(null==t?void 0:t.delta_rect)}return _createClass$1(e,null,[{key:"isEnabled",value:function(e){return!(isUndefined$2(e)||isNull$1(e)||isEmptyObject(e))}}]),e}(),CoachmarkButtons=_createClass$1((function e(){var t=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};_classCallCheck$1(this,e),this.direction=convertTheDirectionCode(n.direction),this.alignment=convertThePositionCode(n.alignment),this.buttonArray=[];var i=getArrayOrDefault(n.list,[]);i.forEach((function(e){t.buttonArray.push(new Button(e))}))})),Content=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};_classCallCheck$1(this,e),this.height=t.height,this.width=t.width,this.position=t.position,this.enable_title=t.enable_title,this.enable_title&&(this.title=new Title(t.title)),this.enable_description=t.enable_description,this.enable_description&&(this.description=new Description(t.description)),this.enable_buttons=t.enable_buttons,this.enable_buttons&&(this.buttons=new CoachmarkButtons(null==t?void 0:t.buttons)),this.enable_margin=t.enable_margin,this.enable_margin&&(this.margin=new Margin(t.margin)),this.enable_offset=t.enable_offset,this.enable_offset&&(this.offset=t.offset)}return _createClass$1(e,null,[{key:"isEnabled",value:function(e){return!(isUndefined$2(e)||isNull$1(e)||isEmptyObject(e))}}]),e}(),Highlighter=_createClass$1((function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};_classCallCheck$1(this,e),this.enable_border=null==t?void 0:t.enable_border,this.border=new Border(null==t?void 0:t.border),this.shape=null==t?void 0:t.shape,this.delta_circle=null==t?void 0:t.delta_circle,this.delta_rect=new BackgroundOffset(null==t?void 0:t.delta_rect),this.opacity=null==t?void 0:t.opacity})),Ripple=_createClass$1((function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};_classCallCheck$1(this,e),this.ripple_type=t.ripple_type,this.duration=null==t?void 0:t.duration,this.width=null==t?void 0:t.width,this.opacity=null==t?void 0:t.opacity,this.color=null==t?void 0:t.color})),DEFAULT_PADDING=5,Logger$1=window.ApxorLogger,InLineCoachMark=function(){function e(t,n,i,o,a,r,s,c,l){var d,p,u=arguments.length>9&&void 0!==arguments[9]&&arguments[9],h=arguments.length>10&&void 0!==arguments[10]?arguments[10]:0;_classCallCheck$1(this,e),this.uiConfig=t,this.uis=n,this.isWalkthrough=u,this.index=h,this.walkthroughConfigs=i,this.messageConfig=a,this.rtmInstance=r,this.currentId=makeid(10),this.terminationTimeoutId=null,this.configId=a.configId,this.name=a.configName,this.cssPostFix="-".concat(this.configId,"-").concat(this.name).replaceAll(" ","").replace(/[^\w\s]/gi,""),this.showCallback=s,this.closeCallback=c,this.stepperCallBack=l,this.targetDeletionObserver=null,this.viewPortObservor=null,this.coachmarkShown=!1,this.terminationConfig=o,this.delay=t.delay,this.scrollToView=t.scrollToView||!1,this.dismiss_outside_touch=t.dismiss_outside_touch,this.content=new Content(t.content),this.target=new Target(t.target),this.enable_dimbackground=t.enable_dimbackground,this.background=new Background(t.outer_highlighter),this.dimbackground=new DimBackground(t.dimbackground),this.enable_ripple=t.enable_ripple,this.ripple=new Ripple(t.ripple),this.highlighter=new Highlighter(t.inner_highlighter),this.enable_image=null==t?void 0:t.enable_image,this.enable_image&&(this.image=null==t?void 0:t.image),this.enable_arrow=null==t?void 0:t.enable_arrow,this.enable_arrow&&(this.arrow=null==t?void 0:t.arrow),this.content_enable_buttons=null===(d=t.content)||void 0===d?void 0:d.enable_buttons,this.content_enable_buttons&&(this.buttons=new CoachmarkButtons(null===(p=t.content)||void 0===p?void 0:p.coachmark_buttons)),this.targetElement=null,this.inline_width="auto",this.inline_height="auto",this.media_width="auto",this.media_height="auto",this.media_container_height=0,this.targetElement=null,this.inLineContainer=null,this.imageAndContentContainerLeft=null,this.imageAndContentContainerRight=null,this.textContainer=null,this.dimBackgroundElement=null,this.max_width=350,this.currentId=makeid(10),this.coachmark=null,this.svgElement=null,this.transparentCircleElement=null,this.textElement=null,this.arrowMediaContainer=null,this.imgElement=null,this.arrowElement=null,this.rippleElement=null,this.imageoffsetX=0,this.imageoffsetY=0}return _createClass$1(e,[{key:"createNewCoachMark",value:function(){var e=this;try{if(this._canCreateCoachMark()){var t=function(){e._canCreateCoachMark()&&(e.rtmInstance.currentAction=e,e._setInlineStyles(),e._setObservors(),setTimeout((function(){e._createOuterCircle(e.targetElement)}),e.delay))};this._setTheTarget((function(){e._scrollIntoTargetIfNeeded(t)}))}}catch(e){this._resetRTMAction(),console.log(e)}}},{key:"_canCreateCoachMark",value:function(){return null!==this.rtmInstance.currentAction&&void 0!==this.rtmInstance.currentAction||this.rtmInstance.isShowingAction?(Logger$1.info("An nudge is being shown. Can not show a coachmark now"),!1):checkForNeverShow$1(this.configId)}},{key:"_setTheTarget",value:function(e){var t=this;this._findTargetElement((function(){if(t._isElementVisible()){var n=t._targetClickCallback.bind(t);t.targetElement.addEventListener("click",n),e()}else{var i;Logger$1.info("Invalid target element. Width and height are 0 for element: ".concat(null===(i=t.target)||void 0===i?void 0:i.id,". Can't show coachmark")),t._resetRTMAction()}}))}},{key:"_isElementVisible",value:function(){try{var e=this.targetElement.getBoundingClientRect();if(0===e.width||0===e.height)return!1}catch(e){return!1}return!0}},{key:"_findTargetElement",value:function(e){var t,n,i,o;(this.targetElement=getElementFromSelector(null===(t=this.target)||void 0===t?void 0:t.id,null===(n=this.target)||void 0===n?void 0:n.frame_id,this.target.is_text_based,this.target.avf_text_config),this.targetElement)?e():null!==(i=this.target)&&void 0!==i&&i.enable_retry?(Logger$1.info("Not found yet. Rechecking the DOM."),this._retryFindingTargetElement(e)):(Logger$1.info("Element with selector:".concat(null===(o=this.target)||void 0===o?void 0:o.id," not found.")),this._resetRTMAction())}},{key:"_retryFindingTargetElement",value:function(e){var t,n=this,i=setInterval((function(){var t,o,a,r,s;(n.targetElement=getElementFromSelector(null===(t=n.target)||void 0===t?void 0:t.id,null===(o=n.target)||void 0===o?void 0:o.frame_id,n.target.is_text_based,n.target.avf_text_config),n.targetElement)?(clearInterval(i),e(n.targetElement)):(n.target.retry.max_retries=(null===(a=n.target)||void 0===a?void 0:a.retry.max_retries)-1,(null===(r=n.target)||void 0===r?void 0:r.retry.max_retries)<=0&&(clearInterval(i),console.warn("Element with selector:".concat(null===(s=n.target)||void 0===s?void 0:s.id," not found.")),n._resetRTMAction()))}),null===(t=this.target)||void 0===t?void 0:t.retry.interval)}},{key:"_targetClickCallback",value:function(){this.rtmInstance.logActionEvent("InlineTargetViewClicked",this.configId,this.name),this.enable_dismiss_actions&&this.dismiss_actions.target_touch&&(this.rtmInstance.logActionEvent("InlineTargetViewClicked",this.configId,this.name),this._destroyCoachMark())}},{key:"_scrollIntoTargetIfNeeded",value:function(e){var t=this,n=!1,i=!1;if(isElementInViewport(this.targetElement))n=!0;else if(this.scrollToView){var o={behavior:SCROLL_BEHAVIOUR.SMOOTH,block:CENTER,inline:CENTER};this._canCreateCoachMark()&&this.targetElement.scrollIntoView(o),n=!0,window.setTimeout((function(){isElementCovered(t.targetElement)&&window.setTimeout((function(){isElementCovered(t.targetElement)?(console.info("The tooltip is not visible because another element is overlapping the target element."),t._resetRTMAction()):e()}),1e3)}),1e3),i=!0}else Logger$1.info("If needed change the config to scroll to the target element.");n&&!i&&(isElementCovered(this.targetElement)?(console.info("The tooltip is not visible because another element is overlapping the target element."),this._resetRTMAction()):e())}},{key:"_resetRTMAction",value:function(){this.rtmInstance.currentAction=null,this.rtmInstance.isShowingAction=!1,Logger$1.info("RTM coachmark action stopped.")}},{key:"_destroyCoachMark",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];try{var t,n,i,o,a,r;null===(t=this.targetDeletionObserver)||void 0===t||t.disconnect(),this.targetDeletionObserver=null,null===(n=this.viewPortObservor)||void 0===n||n.disconnect(),this.viewPortObservor=null,null===(i=this.coachmark)||void 0===i||i.destroy(),this.svgElement.parentNode.removeChild(this.svgElement),this.textElement.parentNode.removeChild(this.textElement),this.rippleElement.parentNode.removeChild(this.rippleElement),null===(o=this.imgElement)||void 0===o||o.remove(),null===(a=this.arrowElement)||void 0===a||a.remove(),null===(r=this.dimBackgroundElement)||void 0===r||r.remove(),this._removeStyles(),this.targetElement.removeAttribute("apx-inline-dimbackground"),clearTimeout(this.terminationTimeoutId),this.targetElement.removeEventListener("click",this._targetClickCallback)}catch(e){Logger$1.info("Destroying the coachmark:"+e)}this.closeCallback(e)}},{key:"_removeStyles",value:function(){try{var e=document.querySelector("style[apx-coachmark-styles]");e&&e.remove()}catch(e){Logger$1.error("Could not remove the coachmark styles:"+e)}}},{key:"_highlightInlineTarget",value:function(){if(this.coachmarkShown=!0,this.enable_dimbackground&&("circle"===this.highlighter.shape?this.dimBackgroundElement=createMask(this.rippleElement,{},!0,!0):"rectangle"===this.highlighter.shape&&(this.dimBackgroundElement=createMask(this.rippleElement,{},!1,!0)),document.body.appendChild(this.dimBackgroundElement),this.enable_dismiss_actions&&this.dismiss_actions.target_touch)){var e=this.dimBackgroundElement.querySelector("#tippyModalMaskOpening"),t=this._targetClickCallback.bind(this);e.addEventListener("click",t)}}},{key:"_createInnerCircle",value:function(e,t,n,i,o,a,r,s,c,l,d,p,u,h,g,f){var m,_,v=Math.sqrt(Math.pow(e,2)+Math.pow(t,2)),b=v+l,y=v,x=n-(v-e)/2,w=i-(v-t)/2;if("circle"!=(o=this.highlighter.shape)&&(m=v=e+u+h,_=y=t+d+p,x=n-u,w=i-d),this.rippleElement=document.createElement("div"),this.rippleElement.setAttribute("id",this.configId+"-ripple-div"),this.enable_ripple&&("outward"===this.ripple.ripple_type?this.rippleElement.innerHTML="circle"===o?this._addRippleStylesOutward(o,b,b,g,f,this.ripple.color,this.ripple.opacity):this._addRippleStylesOutward(o,m,_,g,f,this.ripple.color,this.ripple.opacity):"inward"===this.ripple.ripple_type&&(this.rippleElement.innerHTML="circle"===o?this._addRippleStylesInward(o,b,b,g,f,this.ripple.color,this.ripple.opacity):this._addRippleStylesInward(o,m,_,g,f,this.ripple.color,this.ripple.opacity))),this.rippleElement.style.position="absolute","circle"===o){b+=2*r;var C=l/2;x=x-C-r,w=w-C-r,this.rippleElement.style.width="".concat(b,"px"),this.rippleElement.style.height="".concat(b,"px"),this.rippleElement.style.left="".concat(x,"px"),this.rippleElement.style.top="".concat(w,"px")}else{x-=r,w-=r;var E=v+2*r,k=y+2*r;this.rippleElement.style.width="".concat(E,"px"),this.rippleElement.style.height="".concat(k,"px"),this.rippleElement.style.left="".concat(x,"px"),this.rippleElement.style.top="".concat(w,"px")}return this.rippleElement.classList.add("ripple-animator"),this.rippleElement.style.borderRadius="".concat("circle"===this.highlighter.shape?"50%":"".concat(c,"px")),this.rippleElement.style.visibility="visible",this.rippleElement.style.zIndex=99999,this.rippleElement.style.color="".concat(this.ripple.color),this.highlighter.enable_border&&(this.rippleElement.style.borderColor="".concat(a),this.rippleElement.style.borderWidth="".concat(r,"px"),this.rippleElement.style.borderStyle="".concat(s)),document.body.appendChild(this.rippleElement),this.rippleElement}},{key:"_getDocumentOffsetPosition",value:function(e){var t=e.getBoundingClientRect(),n=t.left+window.scrollX,i=t.top+window.scrollY;return{left:n,top:i,right:t.right+window.scrollX,bottom:t.bottom+window.scrollY,x:isDefined$1(t.x)?t.x+window.scrollX:n,y:isDefined$1(t.y)?t.y+window.scrollY:i,width:t.width,height:t.height}}},{key:"_addRippleStylesInward",value:function(e,t,n,i,o,a,r){var s=i/2;return o/=1e3,"\n<style>\n.ripple-animator {\n border: none;\n outline: none;\n width: 150px;\n height: 150px;\n display: block;\n color: ".concat(a,";\n opacity:").concat(r,";\n display: grid;\n place-items: center;\n font-size: 18px;\n cursor: pointer;\n overflow:hidden;\n\n animation-name: rippleinward;\n animation-duration: ").concat(o,"s;\n animation-iteration-count: infinite;\n}\n\n@keyframes rippleinward {\n 0% {\n \n box-shadow: 0 0 0 ").concat(s,"px #fff0;\n}\n\n100% {\n box-shadow: 0 0 0 0 ").concat(a,";\n opacity:").concat(r,";\n}\n}\n\n</style>")}},{key:"_addRippleStylesOutward",value:function(e,t,n,i,o,a,r){var s=i/2;return o/=1e3,"\n<style>\n.ripple-animator {\n border: none;\n outline: none;\n width: 150px;\n height: 150px;\n display: block;\n color: ".concat(a,";\n opacity:").concat(r,";\n display: grid;\n place-items: center;\n font-size: 18px;\n cursor: pointer;\n overflow:auto;\n\n animation-name: ripple;\n animation-duration: ").concat(o,"s;\n animation-iteration-count: infinite;\n}\n\n\n@keyframes ripple {\n 0% {\n box-shadow: 0 0 0 0 ").concat(a,";\n opacity:").concat(r,";\n }\n\n 100% {\n box-shadow: 0 0 0 ").concat(s,"px #fff0;\n }\n}\n</style>")}},{key:"_setInlineStyles",value:function(){if(!document.querySelector("style[apx-coachmark-styles]")){var e=" \n ".concat(this._getBackgroundContainerStyles()," \n ").concat(this._getInLineContainerStyles()," \n ").concat(this._getInLineMediaContainerStyles(),"\n ").concat(this._getInLineArrowContainerStyles(),"\n ").concat(this._getInLineNonMediaContainerStyles(),"\n ").concat(this._getTextConatinerStyles(),"\n ").concat(this._getTitleStyles()," \n ").concat(this._getDescriptionStyles()," \n ").concat(this._getImageStyles()," \n ").concat(this._getArrowStyles(),"\n ").replaceAll("\n","").replace(/[\s]{2,999}/g,""),t=document.createElement("style");t.setAttribute("apx-coachmark-styles",""),t.innerHTML=e,document.head.appendChild(t)}}},{key:"_getBackgroundContainerStyles",value:function(){var e,t,n="";this.enable_dimbackground&&(n='\n #tippyModalOverlayContainer {\n -ms-filter: "progid:dximagetransform.microsoft.gradient.alpha(Opacity=50)";\n filter: alpha(opacity=50);height: 100vh;left: 0;opacity: '.concat(null!==(e=this.dimbackground.opacity)&&void 0!==e?e:.5,";position: fixed;\n top: 0;transition: all .3s ease-out;width: 100vw;z-index: 9999;fill: ").concat(null!==(t=this.dimbackground.color)&&void 0!==t?t:"transparent","\n }\n #tippyModalOverlayContainer #tippyModalMask, #tippyModalOverlayContainer #tippyModalMaskRect {\n height: 100vh;width: 100vw\n }\n \n "));return n}},{key:"_getInLineContainerStyles",value:function(){return"\n .apx-inline-container".concat(this.cssPostFix," {\n height:auto;\n width:auto;\n\n z-index:999999;\n opacity:1;\n transition:all .5s cubic-bezier(.96,.23,.07,.8);\n position:absolute;\n visibility:visible;\n }\n\n .apx-inline-container").concat(this.cssPostFix,".open{\n opacity:1;\n visibility:visible;\n }\n ")}},{key:"_getInLineNonMediaContainerStyles",value:function(){return"\n .apx-inline-nonmedia-container".concat(this.cssPostFix,"{\n width:100%;\n max-width:").concat(this.max_width,";\n display:flex;\n flex-direction:column;\n justify-content:center;\n align-items:stretch;\n ").concat("","\n }\n ")}},{key:"_getInLineMediaContainerStyles",value:function(){return"\n .apx-inline-imagemedia-container".concat(this.cssPostFix,"{\n position:absolute;\n ").concat(this.enable_image||this.enable_video?"display:flex;":"","\n }")}},{key:"_getInLineArrowContainerStyles",value:function(){return"\n .apx-inline-arrowmedia-container".concat(this.cssPostFix,"{\n position:absolute;\n ").concat(this.enable_arrow?"display:flex;":"","\n }")}},{key:"_getTextConatinerStyles",value:function(){return"\n .apx-inline-text-container".concat(this.cssPostFix,"{\n width:100%;\n display:flex;\n flex-direction:column;\n justify-content: center;\n overflow: hidden;\n }\n ")}},{key:"_getTitleStyles",value:function(){if(!this.content.enable_title)return"";var e="";this.content.title.enable_margin&&(e=" \n margin-top:".concat(this.content.title.margin.top,"px;\n margin-bottom:").concat(this.content.title.margin.bottom,"px;\n margin-left:").concat(this.content.title.margin.left,"px;\n margin-right:").concat(this.content.title.margin.right,"px;\n "));var t="";this.content.title.enable_padding&&(t=" \n padding-top:".concat(this.content.title.padding.top,"px;\n padding-bottom:").concat(this.content.title.padding.bottom,"px;\n padding-left:").concat(this.content.title.padding.left,"px;\n padding-right:").concat(this.content.title.padding.right,"px;\n "));var n;return n=" \n font-family:".concat(this.content.title.font.family,";\n font-size:").concat(this.content.title.font.size,"px;\n font-style:").concat(this.content.title.font.style,";\n font-weight:").concat(this.content.title.font.weight,";\n "),"\n .apx-inline-title-div".concat(this.cssPostFix," {\n width:100%;\n display:flex;\n background-color:").concat(this.content.title.background_color,"\n justify-content:").concat(this.content.title.alignment,";\n text-align:").concat(this.content.title.alignment,";\n ").concat(n,"\n ").concat(e,"\n ").concat(t,"\n }\n ")}},{key:"_getDescriptionStyles",value:function(){if(!this.content.enable_description)return"";var e="";this.content.description.enable_margin&&(e=" \n margin-top:".concat(this.content.description.margin.top,"px;\n margin-bottom:").concat(this.content.description.margin.bottom,"px;\n margin-left:").concat(this.content.description.margin.left,"px;\n margin-right:").concat(this.content.description.margin.right,"px;\n "));var t="";this.content.description.enable_padding&&(t=" \n padding-top:".concat(this.content.description.padding.top,"px;\n padding-bottom:").concat(this.content.description.padding.bottom,"px;\n padding-left:").concat(this.content.description.padding.left,"px;\n padding-right:").concat(this.content.description.padding.right,"px;\n "));var n;return n=" \n font-family:".concat(this.content.description.font.family,";\n font-size:").concat(this.content.description.font.size,"px;\n font-style:").concat(this.content.description.font.style,";\n font-weight:").concat(this.content.description.font.weight,";\n "),"\n .apx-inline-description".concat(this.cssPostFix," {\n width:100%;\n justify-content:").concat(this.content.description.alignment,";\n text-align:").concat(this.content.description.alignment,";\n ").concat(n,"\n ").concat(e,"\n ").concat(t,"\n }\n ")}},{key:"_getImageStyles",value:function(){var e="";if(this.enable_image){var t,n,i,o,a,r,s,c,l,d,p,u,h="";if(null!==(t=this.image)&&void 0!==t&&t.enable_border)h="\n border-radius:".concat(null===(o=this.image)||void 0===o?void 0:o.border.radius,"%;\n border:").concat(null===(a=this.image)||void 0===a?void 0:a.border.width,"px ").concat(null===(r=this.image)||void 0===r?void 0:r.border.style," ").concat(null===(s=this.image)||void 0===s?void 0:s.border.color,";\n ");if(null!==(n=this.image)&&void 0!==n&&n.aspect_ratio)c=(null===(l=this.image)||void 0===l?void 0:l.width)*((null===(d=this.image)||void 0===d||null===(d=d.aspect_ratio)||void 0===d?void 0:d.height)/(null===(p=this.image)||void 0===p?void 0:p.aspect_ratio.width));else c=null===(u=this.image)||void 0===u?void 0:u.height;e="\n .apx-inline-image".concat(this.cssPostFix,"{\n height: ").concat(c,"px;\n width: ").concat(null===(i=this.image)||void 0===i?void 0:i.width,"px;\n ").concat(h,"\n }\n ")}return e}},{key:"_getArrowStyles",value:function(){var e="";if(this.enable_arrow){var t,n,i,o,a,r,s,c,l,d,p,u,h,g="";if(null!==(t=this.arrow)&&void 0!==t&&t.enable_border)g="\n border-radius:".concat(null===(a=this.arrow)||void 0===a?void 0:a.border.radius,"%;\n border:").concat(null===(r=this.arrow)||void 0===r?void 0:r.border.width,"px ").concat(null===(s=this.arrow)||void 0===s?void 0:s.border.style," ").concat(null===(c=this.arrow)||void 0===c?void 0:c.border.color,";\n ");if(null!==(n=this.arrow)&&void 0!==n&&n.aspect_ratio)l=(null===(d=this.arrow)||void 0===d?void 0:d.width)*((null===(p=this.arrow)||void 0===p||null===(p=p.aspect_ratio)||void 0===p?void 0:p.height)/(null===(u=this.arrow)||void 0===u?void 0:u.aspect_ratio.width));else l=null===(h=this.arrow)||void 0===h?void 0:h.height;e="\n .apx-inline-arrow".concat(this.cssPostFix,"{\n height: ").concat(l,"px;\n width: ").concat(null===(i=this.arrow)||void 0===i?void 0:i.width,"px;\n transform:rotate(").concat(null===(o=this.arrow)||void 0===o?void 0:o.angle,"deg);\n ").concat(g,"\n }\n ")}return e}},{key:"_setInLineContent",value:function(){return this._createInLineContainer(),this._createNonMediaContainer(),this._setTextContainer(),this._setTitleContent(),this._setDescriptionContent(),this._createButtonContainer(),this._setButtons(),this.enable_image&&this._createImageMediaContainer(),this.enable_arrow&&this._createArrowMediaContainer(),this.inLineContainer}},{key:"_createInLineContainer",value:function(){this.inLineContainer=document.createElement("div"),this.inLineContainer.classList.add("apx-inline-container".concat(this.cssPostFix)),this.inLineContainer.style.position="absolute",document.body.appendChild(this.inLineContainer)}},{key:"_createNonMediaContainer",value:function(){this.nonMediaContainer=document.createElement("div"),this.nonMediaContainer.classList.add("apx-inline-nonmedia-container".concat(this.cssPostFix)),this.inLineContainer.appendChild(this.nonMediaContainer)}},{key:"_setTextContainer",value:function(){this.textContainer=document.createElement("div"),this.textContainer.classList.add("apx-inline-text-container".concat(this.cssPostFix)),this.nonMediaContainer.appendChild(this.textContainer)}},{key:"_setTitleContent",value:function(){if(this.content.enable_title){resolveDynamicText(this.content.title);var e=document.createElement("div");e.classList.add("apx-inline-title-div".concat(this.cssPostFix)),e.appendChild(createNewTextElement(this.content.title,this.currentId,"title")),this.textContainer.appendChild(e)}}},{key:"_setDescriptionContent",value:function(){this.content.enable_description&&(resolveDynamicText(this.content.description),this.textElement=document.createElement("div"),this.textElement.classList.add("apx-inline-description".concat(this.cssPostFix)),this.textElement.appendChild(createNewTextElement(this.content.description,this.currentId,"description")),this.textContainer.appendChild(this.textElement))}},{key:"_createButtonContainer",value:function(){this.buttonContainer=document.createElement("div"),this.buttonContainer.classList.add("apx-inline-button-container".concat(this.cssPostFix)),this.nonMediaContainer.appendChild(this.buttonContainer)}},{key:"_setButtons",value:function(){var e=this;if(this.content_enable_buttons){var t=function(t){e._destroyCoachMark(t)},n={next:function(n,i){t(!1),e.stepperCallBack(n,i)},prev:function(n,i){t(!1),e.stepperCallBack(n,i)},complete:t,cancel:t,_isCancelled:!1,action:""},i={};i=this.buttons.buttonArray;for(var o=this.buttons.alignment,a=0;a<i.length;a++)"L"===o||"left"===o?(i[0].slot="1",2===i.length&&(i[1].slot="2")):"C"===o||"center"===o?(i[0].slot="2",2===i.length&&(i[1].slot="3")):"R"!==o&&"right"!==o||(i[0].slot="4",2===i.length&&(i[1].slot="5"));var r=generateButtonsBlock(this.configId,this.name,{},EVENT_PREFIX.INLINE,i,this.buttons.direction,this.buttons.alignment,"bottom",n,this.isWalkthrough,this.uis,this.index,"coachmark");this.buttonContainer.appendChild(r)}}},{key:"_createImageMediaContainer",value:function(){this.mediaContainer=document.createElement("div"),this.mediaContainer.classList.add("apx-inline-imagemedia-container".concat(this.cssPostFix)),this.mediaContainer.style.position="relative",document.body.appendChild(this.mediaContainer)}},{key:"_createArrowMediaContainer",value:function(){this.arrowMediaContainer=document.createElement("div"),this.arrowMediaContainer.classList.add("apx-inline-arrowmedia-container".concat(this.cssPostFix)),this.arrowMediaContainer.style.position="relative",document.body.appendChild(this.arrowMediaContainer)}},{key:"_setImageOptions",value:function(){if(this.enable_image){var e,t=document.createElement("img");return t.src=null===(e=this.image)||void 0===e?void 0:e.path,t.classList.add("apx-inline-image".concat(this.cssPostFix)),this.mediaContainer.appendChild(t),this.mediaContainer}}},{key:"_setArrowOptions",value:function(){if(this.enable_arrow){var e,t=document.createElement("img");return t.src=null===(e=this.arrow)||void 0===e?void 0:e.path,t.classList.add("apx-inline-arrow".concat(this.cssPostFix)),this.arrowMediaContainer.appendChild(t),this.arrowMediaContainer}}},{key:"_getSVG",value:function(e,t){return'\n <svg\n height="'.concat(document.scrollingElement.scrollHeight,'" \n width="').concat(document.scrollingElement.scrollWidth,'"\n class="apx-fade-in">\n <defs>\n <mask\n id="apx-mask"\n x="0"\n y="0"\n height="').concat(document.scrollingElement.scrollHeight,'" \n width="').concat(document.scrollingElement.scrollWidth,'">\n ').concat(e,"\n </mask>\n </defs>\n ").concat(t,"\n </svg>\n ")}},{key:"_getCircleSVG",value:function(e){var t=e.backgroundd_color,n=e.opacityy,i=e.innerRadius,o=e.innerCenterX,a=e.innerCenterY,r=e.outerRadius,s=e.outerCircleCenterX,c=e.outerCircleCenterY;e.delta_circle,e.background_delta_circle;var l=e.outer_x,d=e.outer_y,p=e.targetElementLeft,u=e.targetElementTop,h=e.targetElementWidth,g=e.targetElementHeight,f=e.innerrect_left,m=e.innerrect_right,_=e.innerrect_x,v=e.innerrect_y;s+=l,c+=d;var b=2*r;"rectangle"===this.highlighter.shape?(h=h+f+m,g=g+_+v,p-=f,u-=_,this.maskChild='\n <rect\n x="0" y="0"\n height="'.concat(document.scrollingElement.scrollHeight,'" \n width="').concat(document.scrollingElement.scrollWidth,'" \n fill="#fff" />\n <rect\n x="').concat(p,'" \n y="').concat(u,'" \n width="').concat(h,'" \n height="').concat(g,'" />\n ')):this.maskChild='\n <rect\n x="'.concat(s-r,'"\n y="').concat(c-r<0?0:c-r,'"\n height="').concat(b,'"\n width="').concat(b,'"\n fill="#fff" />\n <circle\n cx="').concat(o,'"\n cy="').concat(a,'"\n r="').concat(i,'" />\n ');var y='\n <circle\n cx="'.concat(s,'" \n cy="').concat(c,'" \n r="').concat(r,'" \n fill="').concat(t,'" \n fill-opacity="').concat(n,'" \n mask="url(#apx-mask)" />\n ');return this._getSVG(this.maskChild,y)}},{key:"_getRectangleSVG",value:function(e){var t=e.backgroundd_color,n=e.opacityy,i=e.targetElementLeft,o=e.targetElementTop,a=e.targetElementWidth,r=e.targetElementHeight,s=e.innerrect_x,c=e.innerrect_y,l=e.innerrect_left,d=e.innerrect_right,p=e.outerrect_decrease_left,u=e.outerrect_decrease_right,h=e.outerrect_decrease_top,g=e.outerrect_decrease_bottom,f=e.innerCenterX,m=e.innerCenterY,_=e.innerRadius,v=e.outer_x,b=e.outer_y;a=a+l+d,r=r+s+c,i-=l,o-=s;var y=document.scrollingElement.scrollHeight+h+g,x=document.scrollingElement.scrollWidth+p+u;if("circle"===this.highlighter.shape){var w=-p+v,C=-h+b;this.maskChild='\n <rect\n x="'.concat(w,'" y="').concat(C,'"\n height="').concat(y,'" \n width="').concat(x,'" \n fill="#fff" />\n <circle\n cx="').concat(f,'"\n cy="').concat(m,'"\n r="').concat(_,'" />\n ')}else this.maskChild='\n <rect\n x="0" y="0"\n height="'.concat(document.scrollingElement.scrollHeight,'" \n width="').concat(document.scrollingElement.scrollWidth,'" \n fill="#fff" />\n <rect\n x="').concat(i,'" \n y="').concat(o,'" \n width="').concat(a,'" \n height="').concat(r,'" />\n ');var E=-h+b,k='\n <rect\n x="'.concat(-p+v,'" y="').concat(E,'"\n height="').concat(y,'" \n width="').concat(x,'" \n mask="url(#apx-mask)"\n fill="').concat(t,'" \n fill-opacity="').concat(n,'" />\n ');return this._getSVG(this.maskChild,k)}},{key:"_createSVGDiv",value:function(e){var t=e.opacity;this.svgElement=document.createElement("div"),this.svgElement.setAttribute("id",this.currentId+"-svg"),this.svgElement.style.position="absolute",this.svgElement.style.left=0,this.svgElement.style.top=0,this.svgElement.style.zIndex=99998,this.svgElement.style.pointerEvents="none",this.svgElement.style.width="100%",this.svgElement.style.height="99%";var n="";return n="circle"===this.background.shape?this._getCircleSVG(e):this._getRectangleSVG(e),this.svgElement.innerHTML="\n <style>\n @keyframes apx-anim {\n from {\n opacity: 0;\n }\n\n to {\n opacity: ".concat(t,";\n }\n }\n .apx-fade-in {\n animation: apx-anim 0.4s linear;\n }\n </style>\n ").concat(n),document.body.appendChild(this.svgElement),this.svgElement}},{key:"_setObservors",value:function(){var e=this;this.targetDeletionObserver=new MutationObserver((function(){e.coachmarkShown&&(document.body.contains(e.targetElement)||e._destroyCoachMark())})),this.viewPortObservor=new IntersectionObserver((function(){e.coachmarkShown&&(isElementInViewport(e.targetElement)||e._destroyCoachMark())}))}},{key:"_createOuterCircle",value:function(e){var t,n=this;this.showCallback(),this.coachmarkShown=!0;var i=this._getDocumentOffsetPosition(e),o=i.left,a=void 0===o?0:o,r=i.top,s=void 0===r?0:r,c=i.width,l=void 0===c?0:c,d=i.height,p=void 0===d?0:d,u=i.left<window.innerWidth/2;if(0!==p&&0!==l){this.textElement=this._setInLineContent();var h=this.textElement.offsetWidth,g=this.textElement.offsetHeight,f=this.textElement.getBoundingClientRect();this.textElement.left=f.left+this.content.offset.x,this.textElement.top=f.top+this.content.offset.y;var m=this.ripple.width,_=this.ripple.duration;this.transparentCircleElement=this._createInnerCircle(l,p,a,s,this.highlighter.shape,this.highlighter.border.color,this.highlighter.border.width,this.highlighter.border.style,this.highlighter.border.radius,this.highlighter.delta_circle,this.highlighter.delta_rect.top,this.highlighter.delta_rect.bottom,this.highlighter.delta_rect.left,this.highlighter.delta_rect.right,m,_),this.imgElement=this._setImageOptions();var v,b,y,x,w,C,E,k,S=this.rippleElement.getBoundingClientRect();if(this.enable_image){var T,A,I,P,O,L,N,B,D;if(this.imgElement.style.position="absolute",this.imgElement.style.zIndex="999999",null!==(T=this.image)&&void 0!==T&&T.aspect_ratio)P=(null===(O=this.image)||void 0===O?void 0:O.width)*((null===(L=this.image)||void 0===L||null===(L=L.aspect_ratio)||void 0===L?void 0:L.height)/(null===(N=this.image)||void 0===N?void 0:N.aspect_ratio.width));else P=null===(B=this.image)||void 0===B?void 0:B.height;if("T"===this.image.position)A=S.top+window.scrollY-P+this.image.offset.y,I=S.left+this.image.offset.x+S.width/2-(null===(D=this.image)||void 0===D?void 0:D.width)/2,this.imgElement.style.top="".concat(A,"px"),this.imgElement.style.left="".concat(I,"px");else if("B"===this.image.position){var M;A=S.bottom+window.scrollY+this.image.offset.y,I=S.left+this.image.offset.x+S.width/2-(null===(M=this.image)||void 0===M?void 0:M.width)/2,this.imgElement.style.top="".concat(A,"px"),this.imgElement.style.left="".concat(I,"px")}else"L"===this.image.position?(A=S.top+window.scrollY+this.image.offset.y+S.height/2-P/2,I=S.left-this.image.width+this.image.offset.x,this.imgElement.style.top="".concat(A,"px"),this.imgElement.style.left="".concat(I,"px")):"R"===this.image.position&&(A=S.top+window.scrollY+this.image.offset.y+S.height/2-P/2,I=S.right+this.image.offset.x,this.imgElement.style.top="".concat(A,"px"),this.imgElement.style.left="".concat(I,"px"))}if(this.arrowElement=this._setArrowOptions(),null!==(t=this.arrow)&&void 0!==t&&t.aspect_ratio)v=(null===(b=this.arrow)||void 0===b?void 0:b.width)*((null===(y=this.arrow)||void 0===y||null===(y=y.aspect_ratio)||void 0===y?void 0:y.height)/(null===(x=this.arrow)||void 0===x?void 0:x.aspect_ratio.width));else v=null===(w=this.arrow)||void 0===w?void 0:w.height;if(this.enable_arrow)if(this.arrowElement.style.position="absolute",this.arrowElement.style.zIndex="9999999","T"===this.arrow.position)C=S.top+window.scrollY-v+this.arrow.offset.y,E=S.left+this.arrow.offset.x+S.width/2-(null===(k=this.arrow)||void 0===k?void 0:k.width)/2,this.arrowElement.style.top="".concat(C,"px"),this.arrowElement.style.left="".concat(E,"px");else if("B"===this.arrow.position){var F;C=S.bottom+window.scrollY+this.arrow.offset.y,E=S.left+this.arrow.offset.x+S.width/2-(null===(F=this.arrow)||void 0===F?void 0:F.width)/2,this.arrowElement.style.top="".concat(C,"px"),this.arrowElement.style.left="".concat(E,"px")}else"L"===this.arrow.position?(C=S.top+window.scrollY+this.arrow.offset.y+S.height/2-v/2,E=S.left-this.arrow.width+this.arrow.offset.x,this.arrowElement.style.top="".concat(C,"px"),this.arrowElement.style.left="".concat(E,"px")):"R"===this.arrow.position&&(C=S.top+window.scrollY+this.arrow.offset.y+S.height/2-v/2,E=S.right+this.arrow.offset.x,this.arrowElement.style.top="".concat(C,"px"),this.arrowElement.style.left="".concat(E,"px"));var $=a+l/2,R=s+p/2,V=Math.sqrt(Math.pow(l,2)+Math.pow(p,2))/2;V+=this.highlighter.delta_circle/2;var H=Math.sqrt(Math.pow(h,2)+Math.pow(g,2)),q=V+this.highlighter.delta_circle+H+this.highlighter.border.width;q+=this.background.delta_circle;var U=this.content.offset.x,j=this.content.offset.y,z=-1,W=-1,Y=-1,X=-1,G=-1;switch(G=R,this.content.position){case"T":W=(Y=$-h/2)<0?DEFAULT_PADDING:Y,z="circle"===this.highlighter.shape?R-V-g-this.highlighter.border.width-this.content.margin.bottom:s-g-this.highlighter.delta_rect.top-this.highlighter.border.width-this.content.margin.bottom;break;case"L":z=(X=R-g/2)<0?DEFAULT_PADDING:X,W="circle"===this.highlighter.shape?$-V-h-this.highlighter.border.width-this.content.margin.right:a-h-this.highlighter.delta_rect.left-this.highlighter.border.width-this.content.margin.right;break;case"R":z=(X=R-g/2)<0?DEFAULT_PADDING:X,W="circle"===this.highlighter.shape?$+V+this.highlighter.border.width+this.content.margin.left:l+this.highlighter.border.width+this.content.margin.left+this.highlighter.delta_rect.right;break;case"B":W=(Y=$-h/2)<0?DEFAULT_PADDING:Y,z="circle"===this.highlighter.shape?R+V+this.highlighter.border.width+this.content.margin.top:s+p+this.highlighter.delta_rect.bottom+this.highlighter.border.width+this.content.margin.top}if(-1!==W&&-1!==z&&-1!==G){!u&&W+h>window.innerWidth&&(W=window.innerWidth-h-0-0-10);var Q=W+U,Z=z+j;this.textElement.style.left="".concat(Q,"px"),this.textElement.style.top="".concat(Z,"px");var K=$;(K=Math.min(K+this.background.offset.x,document.scrollingElement.scrollWidth))<0&&(K=0),(G=Math.min(G+this.background.offset.y,document.scrollingElement.scrollHeight))<0&&(G=0);var J=this.background.background_color,ee=this.background.opacity,te=this.background.shape,ne=this.highlighter.delta_circle,ie=this.background.delta_circle,oe=this.highlighter.delta_rect.top,ae=this.highlighter.delta_rect.bottom,re=this.highlighter.delta_rect.left,se=this.highlighter.delta_rect.right,ce=this.background.delta_rect.left,le=this.background.delta_rect.right,de=this.background.delta_rect.top,pe=this.background.delta_rect.bottom,ue=this.background.offset.x,he=this.background.offset.y;this.svgElement=this._createSVGDiv({backgroundd_color:J,opacityy:ee,innerRadius:V,innerCenterX:$,innerCenterY:R,outerRadius:q,outerCircleCenterX:K,outerCircleCenterY:G,targetElementLeft:a,targetElementTop:s,targetElementWidth:l,targetElementHeight:p,outer_shape:te,delta_circle:ne,background_delta_circle:ie,innerrect_x:oe,innerrect_y:ae,innerrect_left:re,innerrect_right:se,outerrect_decrease_left:ce,outerrect_decrease_right:le,outerrect_decrease_top:de,outerrect_decrease_bottom:pe,outer_x:ue,outer_y:he}),this.svgElement.style.visibility="hidden",this.transparentCircleElement.style.visibility="hidden",this.textElement.style.visibility="hidden";var ge=function(t){var i=!1,o=!1;void 0===t&&(o=!0);var a=e.getBoundingClientRect();void 0!==t&&t.clientX>=a.left&&t.clientX<=a.left+a.width&&t.clientY>=a.top&&t.clientY<=a.top+a.height&&(i=!0),(n.dismiss_outside_touch||i||o)&&(n._destroyCoachMark(),i&&e.click&&e.click())};this.terminationConfig&&!0===this.terminationConfig.autoDismiss&&setTimeout((function(){return ge()}),this.delay+this.terminationConfig.duration),this.svgElement.style.visibility="visible",this.transparentCircleElement.style.visibility="visible",this.textElement.style.visibility="visible",this.textElement.childElementCount>0&&(this.textElement.children[0].style.visibility="visible"),this.dismiss_outside_touch&&document.body.addEventListener("click",ge),this.transparentCircleElement.addEventListener("click",ge),this.scrollToView&&("T"===this.content.position?window.scrollTo({top:G+this.background.offset.y-(q+this.background.delta_circle),behavior:"smooth"}):"B"===this.content.position&&window.scrollTo({top:Math.min(document.scrollingElement.scrollHeight,G+this.background.offset.y+q+this.background.delta_circle),behavior:"smooth"})),this.targetDeletionObserver.observe(document.body,{childList:!0,subtree:!0}),this.viewPortObservor.observe(e),setTimeout((function(){n._highlightInlineTarget(),n._setAutoTerminate(),n.coachmarkShown=!0}),10)}else console.warn("Failed to identify the right place for text")}else{var fe;console.warn("Can't show on an invisible element: ",null===(fe=this.target)||void 0===fe?void 0:fe.id)}}},{key:"_setAutoTerminate",value:function(){var e=this;!0===this.terminationConfig.auto_dismiss&&(this.terminationTimeoutId=setTimeout((function(){e._destroyCoachMark()}),this.terminationConfig.duration))}}]),e}(),Logger=window.ApxorLogger,RTA=0,SURVEYS=1,getURLs=function(e,t){var n=function(n){return n.replace("<app_id>",e).replace("<u_id>",t)};return{rtaValidateUrl:n(RTA_VALIDATE_URL),rtaSyncUrl:n(RTA_SYNC_URL),surveysValidateUrl:n(SURVEY_VALIDATE_URL),surveysSyncUrl:n(SURVEY_SYNC_URL),configSSEUrl:n(CONFIG_API_URL),testDevicesValidateUrl:n(TEST_DEVICES_API_URL)}},RTM=function(){function e(){var t=this;_classCallCheck$1(this,e),_defineProperty$1(this,"version",1120),_defineProperty$1(this,"_configs",{}),_defineProperty$1(this,"isShowingAction",!1),_defineProperty$1(this,"currentAction",null),_defineProperty$1(this,"_currentTooltip",null),_defineProperty$1(this,"_currentBadge",null),_defineProperty$1(this,"_currentInApp",null),_defineProperty$1(this,"_currentVideoPIP",null),_defineProperty$1(this,"_currentCoachmark",null),_defineProperty$1(this,"_surveys",new ApxorSurveys),_defineProperty$1(this,"_newsurveys",new NewSurveys),_defineProperty$1(this,"_inApp",new ApxorInApp),_defineProperty$1(this,"_wysiwyg",new WYSIWYG),_defineProperty$1(this,"_afterPluginInit",null),_defineProperty$1(this,"_eventsInDynamicText",{}),_defineProperty$1(this,"_configSSEUrl",""),_defineProperty$1(this,"isWalkthrough",!1),_defineProperty$1(this,"_handledOneSync",!1),_defineProperty$1(this,"_calledPluginInitCallback",!1),_defineProperty$1(this,"uis",[]),_defineProperty$1(this,"isBadgePresent",!1),_defineProperty$1(this,"badgesMutationObserver",null),_defineProperty$1(this,"badgesLists",[]),_defineProperty$1(this,"badgesTriggerCheckList",[]),_defineProperty$1(this,"init",(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(){};t._afterPluginInit=e;var n=Apxor.getController();t.ceInstance=ceWrapper.getInstance();var i=Apxor.getSiteId(),o=Apxor.getClientId(),a=getURLs(i,o),r=a.rtaValidateUrl,s=a.rtaSyncUrl,c=a.surveysValidateUrl,l=a.surveysSyncUrl,d=a.configSSEUrl,p=a.testDevicesValidateUrl;t._configSSEUrl=d,t.track_pages_events_api_url=TRACK_PAGES_EVENTS_API.replace("<app_id>",i);var u=n.getFromStorage(APX_AUTO_EVENT_VERSION);t.track_pages_events_api_url=t.track_pages_events_api_url.replace("<events_version>",null!=u?u:0);var h=n.getFromStorage(APX_AUTO_PAGE_EVENT_VERSION);t.track_pages_events_api_url=t.track_pages_events_api_url.replace("<pages_version>",null!=h?h:0),t.ceInstance.initialize(),t.ceInstance.fetch(RTA,r,s,t.handleResponse),t.ceInstance.fetch(SURVEYS,c,l,t.handleResponse),n.isTestDevice()&&n.makeGetRequest(p,t.initiateTestSSE),n.makeGetRequest(t.track_pages_events_api_url,(function(e){var n,i,o=Apxor.getController(),a=null!==(n=JSON.parse(o.getFromStorage(APX_AUTO_PAGE_EVENTS)))&&void 0!==n?n:[];if(e&&e.is_pages_updated&&e.pages_data){var r,s,c,l,d;if(null!==(r=e.pages_data)&&void 0!==r&&r.pages_to_register)a=null===(c=e.pages_data)||void 0===c?void 0:c.pages_to_register,o.persistToStorage(APX_AUTO_PAGE_EVENTS,JSON.stringify(null===(l=e.pages_data)||void 0===l?void 0:l.pages_to_register));if(null!==(s=e.pages_data)&&void 0!==s&&s.version)o.persistToStorage(APX_AUTO_PAGE_EVENT_VERSION,null===(d=e.pages_data)||void 0===d?void 0:d.version)}var p=null!==(i=JSON.parse(o.getFromStorage(APX_AUTO_EVENTS)))&&void 0!==i?i:[];if(e&&e.is_events_updated&&e.events_data){var u,h,g,f,m;if(null!==(u=e.events_data)&&void 0!==u&&u.events_to_register)p=null===(g=e.events_data)||void 0===g?void 0:g.events_to_register,o.persistToStorage(APX_AUTO_EVENTS,JSON.stringify(null===(f=e.events_data)||void 0===f?void 0:f.events_to_register));if(null!==(h=e.events_data)&&void 0!==h&&h.version)o.persistToStorage(APX_AUTO_EVENT_VERSION,null===(m=e.events_data)||void 0===m?void 0:m.version)}t.setHandlersForPageEvents(a),t.setHandlersForEvents(p)}),(function(){var e,n,i=Apxor.getController(),o=null!==(e=JSON.parse(i.getFromStorage(APX_AUTO_PAGE_EVENTS)))&&void 0!==e?e:[],a=null!==(n=JSON.parse(i.getFromStorage(APX_AUTO_EVENTS)))&&void 0!==n?n:[];t.setHandlersForPageEvents(o),t.setHandlersForEvents(a)})),n.registerForEvent("IN_LINE",t.handleInLine),n.registerForEvent("IN_APP",t.handleInApp),n.registerForEvent("SURVEY",t.handleSurvey),n.registerForEvent("ONBOARDING",t.handleOnboarding),t._wysiwyg.init(i,t),Logger.debug("Registered for events")})),_defineProperty$1(this,"setHandlersForPageEvents",(function(e){var n={all_url:[],url:[],dynamic_url:[]};e.forEach((function(e){e.all_url&&n.all_url.push({action:e.action,type:e.type}),e.url&&n.url.push({action:e.action,type:e.type,url:e.url}),e.dynamicURL&&n.dynamic_url.push({action:e.action,type:e.type,dynamicURL:e.dynamicURL})}));window.setInterval((function(){t.latest_url!==window.location.href&&(t.latest_url=window.location.href,n.all_url.forEach((function(e){"app_event"===e.type?null==Apxor||Apxor.logEvent(e.action):null==Apxor||Apxor.logClientEvent(e.action)})),n.url.forEach((function(e){e.url===t.latest_url&&("app_event"===e.type?null==Apxor||Apxor.logEvent(e.action,{url:e.url}):null==Apxor||Apxor.logClientEvent(e.action,{url:e.url}))})),n.dynamic_url.forEach((function(e){doesUrlMatchSkeleton(t.latest_url,e.dynamicURL,"*")&&("app_event"===e.type?null==Apxor||Apxor.logEvent(e.action,{url:t.latest_url,apx_page:!0}):null==Apxor||Apxor.logClientEvent(e.action,{url:t.latest_url,apx_page:!0}))})))}),500)})),_defineProperty$1(this,"setHandlersForEvents",(function(e){var t={click:[],double_click:[],hover:[],right_click:[]};e.forEach((function(e){var n=e.events;for(var i in n){var o,a=n[i],r={selector:e.selector,text_based:e.is_content_based,text:e.content,action:a.action,type:a.type,url:a.url,is_dynamic:a.is_dynamic};null===(o=t[i])||void 0===o||o.push(r)}}));var n=function(e,n){var i=e.target;t[n].forEach((function(e){if(!(!e.is_dynamic||!doesUrlMatchSkeleton(location.href,e.url,"*")&&"*"!==e.url)||location.href===e.url){var t=getElementFromSelector(e.selector,"",e.text_based,e.text);t&&t===i&&("app_event"===e.type?null==Apxor||Apxor.logEvent(e.action):null==Apxor||Apxor.logClientEvent(e.action))}}))};document.addEventListener("click",(function(e){n(e,"click")})),document.addEventListener("dblclick",(function(e){n(e,"double_click")})),document.addEventListener("contextmenu",(function(e){n(e,"right_click")})),document.addEventListener("hover",(function(e){n(e,"hover")}))})),_defineProperty$1(this,"previewTemplate",(function(e,n,i){if("new-inline"===i)t._currentTooltip=new InLineTooltip(e,[],[],{},{},t,(function(){}),(function(){t.isShowingAction=!1,t.currentAction=null,t._currentTooltip=null}),(function(){}),!1,0),t._currentTooltip.createNewTooltip(),t.currentAction=function(){var e;null===(e=t._currentTooltip)||void 0===e||e._destroyTooltip()};else if("coach_mark_v2"===i)t._currentCoachmark=new InLineCoachMark(e,[],[],{},{},t,(function(){}),(function(){t.isShowingAction=!1,t.currentAction=null,t._currentCoachmark=null}),(function(){}),!1,0),t._currentCoachmark.createNewCoachMark();else if(i===IN_APP_TYPE)t._currentInApp=new ModalInApp(e,{},n,APX_PREVIEW_CAMPAIGN_NAME,(function(){}),(function(e,n){var i,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:".apx-dlg-c",a=arguments.length>3?arguments[3]:void 0,r=arguments.length>4?arguments[4]:void 0;document.body.removeEventListener("click",a),document.body.removeEventListener("click",r);var s=document.querySelector(o);null==s||null===(i=s.classList)||void 0===i||i.toggle("open"),null==e||e.remove(),t.isShowingAction=!1,t.currentAction=null,t._currentInApp=null}),(function(){}),!1,[],0),t._currentInApp.createInAppModal();else if("pip"===i){if(VideoInApp.isAVideoBeingPlayed())return;if(!VideoInApp.canShowVideoInApp(e))return;t._currentVideoPIP=new VideoInApp(e,n,APX_PREVIEW_CAMPAIGN_NAME,(function(){}),(function(){t.isShowingAction=!1,t.currentAction=null,t._currentVideoPIP=null})),t._currentVideoPIP.showVideoInApp()}})),_defineProperty$1(this,"show",(function(e,n,i,o,a){var r=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0,s=arguments.length>6&&void 0!==arguments[6]&&arguments[6];try{if(a!==APX_PREVIEW_CAMPAIGN_NAME&&t.getFrequencyCount(o)<=0){feedBackMessagePopUp("Campaign limit reached");var c=document.getElementById("close-button"),l=function(){var e=document.getElementById("apx-container");null==e||e.remove()};return null==c||c.addEventListener("click",l),window.setTimeout(l,2e4),void Logger.error("Campaign limit reached")}if(null!==t.currentAction&&void 0!==t.currentAction)return null==Apxor||Apxor.logEvent("apx_nudge_not_shown",{apx_nudge_type:"campaign",apx_nudge_id:o,apx_nudge_name:a,apx_variant_code:t.ceInstance.getVariantCode(o),apx_failure_type:"error",apx_reason:"An action is already being shown"}),void Logger.error("An action already being shown");var d=JSON.parse(e),p={};p.auto_dismiss=i>0,p.duration=i;var u=d.display_type,h=function(){if("new-inline"===u||"inline"===u?t.logActionEvent("inline_shown",o,a,"tooltip"):("coachmark"===u||"coach_mark_v2"===u)&&t.logActionEvent("inline_shown",o,a,"coachmark"),a!==APX_PREVIEW_CAMPAIGN_NAME)t.updateCount(o);else if("inline"!==u&&"coachmark"!==u&&"passive_nudge"!==u){feedBackMessagePopUp("previewing...");var e=document.getElementById("close-button");null==e||e.addEventListener("click",(function(){var e=document.getElementById("apx-container");null==e||e.remove()}))}t.isShowingAction=!0,s&&(t.currentAction=null)},g=function(){t.badgesTriggerCheckList.includes(o)||(t.logActionEvent("inline_shown",o,a,"badge"),Apxor.getController().persistStartDateInfoLocally(o));if(a===APX_PREVIEW_CAMPAIGN_NAME){feedBackMessagePopUp("previewing...");var e=document.getElementById("close-button");null==e||e.addEventListener("click",(function(){var e=document.getElementById("apx-container");null==e||e.remove()}))}},f=function(){var e,n=arguments.length>0&&void 0!==arguments[0]&&arguments[0];(t.isShowingAction=!1,t.currentAction=null,t._currentTooltip=null,t._currentBadge=null,t._currentCoachmark=null,n)?("new-inline"===u||"inline"===u?e="tooltip":"coach_mark"===u?e="coachmark":"passive_nudge"!==u&&"badge"!==u||(e="badge"),t.logActionEvent("walkthrough_cancelled",o,a,e)):"new-inline"===u||"inline"===u?t.logActionEvent("inline_dismissed",o,a,"tooltip"):("coach_mark"===u||"coach_mark_v2"===u)&&t.logActionEvent("inline_dismissed",o,a,"coachmark");var i=document.getElementById("apx-container");null==i||i.remove()},m={configId:o,configName:a};if("new-inline"===u)t._currentTooltip=new InLineTooltip(d,n,[],p,m,t,h,f,t.stepperCallback,s,r),setTimeout((function(){t._currentTooltip.createNewTooltip()}),d.delay);else if("inline"===u)showTooltip(d,[],p,m,t,h,f);else if("passive_nudge"===u||"badge"===u){if(a===APX_PREVIEW_CAMPAIGN_NAME)for(var _=document.getElementsByClassName("apxor-badge-container");_.length>0;){var v;null===(v=_[0])||void 0===v||v.remove()}t._currentBadge=new ApxorBadge(d,t._configs[o].terminationConfig,m,t,g),t._currentBadge.createBadge()}else"coach_mark"===u?showCoachmarkWithDelay(d,m,p,h,f,(function(e){t.currentAction=e})):"coach_mark_v2"===u?(t._currentCoachmark=new InLineCoachMark(d,n,[],p,m,t,h,f,t.stepperCallback,s,r),t._currentCoachmark.createNewCoachMark()):Logger.error("Unknown type",u)}catch(e){t.currentAction=null,t._currentTooltip=null,t._currentBadge=null,t._currentCoachmark=null,t.isShowingAction=!1,window.ApxorLogger.error(e)}})),_defineProperty$1(this,"logActionEvent",(function(e,n,i,o){var a=t.getCampaignMeta(n),r=(null==a?void 0:a._attr)||{};Apxor.logEvent(e,_objectSpread2$1({id:n,message_name:i,campaign_type:o},r))})),_defineProperty$1(this,"logClientEvent",(function(e,t){Apxor.logClientEvent(e,t)})),_defineProperty$1(this,"updateCount",(function(e){t.ceInstance.updateCount(e)})),_defineProperty$1(this,"getFrequencyCount",(function(e){t.ceInstance.getFrequencyCount(e)})),_defineProperty$1(this,"resetFrequencyCounts",(function(){t.ceInstance.resetFrequencyCounts()})),_defineProperty$1(this,"removeAll",(function(){if(null!==t.currentAction&&void 0!==t.currentAction){t.isShowingAction=!1;try{t.currentAction()}catch(e){Logger.error("RTM : Failed to remove all RTM actions")}finally{t.currentAction=null}}})),_defineProperty$1(this,"handleResponse",(function(e,n){""===e?(Logger.debug("RTM : No configs available"),t._afterPluginInit()):(Logger.debug("RTM : Fetched configs ".concat(n," for type-").concat(e===SURVEYS?"Surveys":"RTA")),t._storeConfigs(e,n),t.ceInstance.parse(n),t._handledOneSync&&(t._calledPluginInitCallback=!0,t._afterPluginInit()),t._handledOneSync=!0,setTimeout((function(){t._calledPluginInitCallback||t._afterPluginInit()}),1500))})),_defineProperty$1(this,"handleSSEResponse",(function(e,n){Logger.debug("RTM : Fetched config from SSE"),n&&n.length>0&&(t._storeConfigs(e,{configs:n}),t.ceInstance.parse({configs:n}))})),_defineProperty$1(this,"initiateTestSSE",(function(e){var n;!0===(null==e||null===(n=e.data)||void 0===n?void 0:n.is_test_device)?new EventSource(t._configSSEUrl).onmessage=function(e){try{if(e&&e.data&&"{}"!==e.data&&null!=e&&e.data){var n=JSON.parse(null==e?void 0:e.data);t.handleSSEResponse(RTA,n.messages)}}catch(e){Logger.error("SSE art-config parsing error:",e)}}:Apxor.getController().persistToStorage("_apx_td",{},!0)})),_defineProperty$1(this,"_storeConfigs",(function(e,n){var i=Apxor.getController();if(isDefined$1(n)&&isDefined$1(n.configs)){var o=n.configs;if(!Array.isArray(o))return;for(var a=function(){var n,a=o[r],s=a._id,c=a.meta,l=c.name,d=c.type,p=JSON.parse(i.getFromStorage(APX_TERMINATION_ID$1));if(null!==p&&null!=p&&p[s]&&p[s].goalAcheived)return 0;var u,h=a.ui;if(e===SURVEYS?null!=a&&a.surveyType&&"latest"===a.surveyType.toLowerCase()?a.ui.version="v2":h=t._surveys.parse(s,l,h):d===IN_APP_TYPE?h=t._inApp.parse(s,l,h):"ONBOARDING"===d&&(t.isWalkthrough=!0,t.uis=a.uis,h="IN_LINE"===a.uis[0].type?a.uis[0]:t._inApp.parse(s,l,t.uis[0],t.uis,0,t.stepperCallback,t.isWalkthrough)),null===h)return console.warn("Failed to parse the config",s),0;(t._configs[s]={ui:h,uis:a.uis,terminationConfig:a.terminate_info,name:l,isWalkthrough:t.isWalkthrough},"badge"===(null===(n=a.ui)||void 0===n?void 0:n.display_type))&&(t.badgesLists.push(s),i.isBadgeTriggerSatisfied(s)&&(t.badgesTriggerCheckList.push(s),t._configs[s].ui.delay=0),t.isBadgePresent=!0,null===t.badgesMutationObserver&&(t.badgesMutationObserver=new MutationObserver((function(){t.badgesLists.forEach((function(e){var n,o;i.isBadgeTriggerSatisfied(s)&&t.badgesTriggerCheckList.push(s);var a=getElementFromSelector(null===(n=t._configs[e])||void 0===n||null===(n=n.ui)||void 0===n?void 0:n.target.id,null===(o=t._configs[e])||void 0===o||null===(o=o.ui)||void 0===o?void 0:o.target.iframe_id);i.isBadgeTriggerSatisfied(e)&&!document.getElementById("apxor-badge-container-".concat("-".concat(e).replaceAll(" ","").replace(/[^\w\s]/gi,"")))&&isDefined$1(a)&&isElementInViewport(a)&&t.ceInstance.notifyEventListener({name:"apxor-badge-container-".concat("-".concat(e).replaceAll(" ","").replace(/[^\w\s]/gi,"")),additional_info:{},category:void 0,time:i.getTimeElapsedInSession()})}))})),null===(u=t.badgesMutationObserver)||void 0===u||u.observe(document.body,{childList:!0,subtree:!0,attributes:!0})))},r=0;r<o.length;r++)a();Logger.debug("Configs: ",t._configs)}})),_defineProperty$1(this,"handleInLine",(function(e){if(isDefined$1(e.additional_info)){var n,i=e.additional_info.uuid;if(null!==(n=t._configs[i])&&void 0!==n&&n.terminationConfig){var o,a=Apxor.getController(),r=JSON.parse(a.getFromStorage(APX_TERMINATION_ID$1));if(null!==r&&void 0!==r[i]&&null!==(o=r[i])&&void 0!==o&&o.goalAcheived)return}if(t._configs[i]){var s=t._configs[i],c=s.ui,l=s.terminationConfig,d=s.name;t.show(JSON.stringify(c),t.uis,l.auto_dismiss?l.duration:-1,i,d)}}})),_defineProperty$1(this,"handleInApp",(function(e){if(isDefined$1(e.additional_info)){var n=e.additional_info.uuid;if(t._configs[n]){var i=t._configs[n].terminationConfig,o=t._configs[n].ui;setTimeout((function(){o.showInApp(n,i)}),0)}}})),_defineProperty$1(this,"handleSurvey",(function(e){if(isDefined$1(e.additional_info)){var n,i=e.additional_info.uuid;if(null!==(n=t._configs[i])&&void 0!==n&&n.terminationConfig&&t._configs[i].terminationConfig.enable_goal_events){var o=Apxor.getController();o.persistStartDateInfoLocally(i);var a=JSON.parse(o.getFromStorage(APX_TERMINATION_ID$1));if(null!==a&&void 0!==a[i]&&a[i].goalAcheived)return}if(t._configs[i]){var r,s=t._configs[i].ui,c=function(e){t.updateCount(i),t.isShowingAction=!0,t.currentAction=e},l=function(){t.isShowingAction=!1,t.currentAction=null};if("v2"===(null===(r=s.version)||void 0===r?void 0:r.toLowerCase())){var d=new NewSurveys(i,t._configs[i].name,s,t.uis,t,c,l);setTimeout((function(){d.showNewSurvey()}),s.delay||0)}else s.showSurvey(c,l)}}})),_defineProperty$1(this,"handleOnboarding",(function(e){if(isDefined$1(e.additional_info)){var n=e.additional_info.uuid;if(t._configs[n])if(t.ui=t._configs[n].ui,t.uis=t._configs[n].uis,t.terminationConfig=t._configs[n].terminationConfig,t.name=t._configs[n].name,t.isWalkthrough=t._configs[n].isWalkthrough,"IN_LINE"===t.ui.type)t.show(JSON.stringify(t.ui),t.uis,t.terminationConfig.auto_dismiss?t.terminationConfig.duration:-1,n,t.name,0,t.isWalkthrough);else{var i=t.ui;setTimeout((function(){i.showInApp(n,t.terminationConfig)}),0)}}})),_defineProperty$1(this,"stepperCallback",(function(e,n){var i;if(t._configs[e])if(t.uis=t._configs[e].uis,t.terminationConfig=t._configs[e].terminationConfig,t.name=t._configs[e].name,t.isWalkthrough=t._configs[e].isWalkthrough,t.ui="IN_LINE"===(null===(i=t.uis[n])||void 0===i?void 0:i.type)?t.uis[n]:t._inApp.parse(e,t.name,t.uis[n],t.uis,n,t.stepperCallback,t.isWalkthrough),"IN_LINE"===t.ui.type)t.show(JSON.stringify(t.ui),t.uis,t.terminationConfig.auto_dismiss?t.terminationConfig.duration:-1,e,t.name,n,t.isWalkthrough);else{var o=t.ui;setTimeout((function(){o.showInApp(e,t.terminationConfig)}),0)}})),_defineProperty$1(this,"getCampaignMeta",(function(e){var n;return null===(n=t.ceInstance)||void 0===n?void 0:n.getCampaignMetaFromQueryEngine(e)})),_defineProperty$1(this,"validateForTerminationAttributes",(function(e){var n;return null===(n=t.ceInstance)||void 0===n?void 0:n.validateForTerminationAttributes(e)}))}return _createClass$1(e,[{key:"notifyScroll",value:function(){this.isShowingAction&&this.removeAll()}}]),e}(),rtm=new RTM;window.ApxorRTM=rtm;var CEWrapper=function(){function e(){_classCallCheck$1(this,e)}return _createClass$1(e,[{key:"getInstance",value:function(){return(CE||window["apxor-qe"]).getInstance()}}]),e}(),ceWrapper=new CEWrapper;try{void 0===exports&&null===exports||(exports.default=rtm,module.exports=exports.default)}catch(e){}exports.ceWrapper=ceWrapper,exports.default=rtm,Object.defineProperty(exports,"__esModule",{value:!0})}));
42
+ */;var css=".tippy-tooltip[data-animation=fade][data-state=hidden]{opacity:0}.tippy-iOS{cursor:pointer!important;-webkit-tap-highlight-color:transparent}.tippy-popper{pointer-events:none;max-width:calc(100% - 8px);transition-timing-function:cubic-bezier(.165,.84,.44,1)}.tippy-tooltip{position:relative;color:#fff;border-radius:.25rem;font-size:.875rem;line-height:1.4;background-color:#333;overflow:hidden;transition-property:visibility,opacity,transform;outline:0}.tippy-tooltip[data-placement^=top] .tippy-arrow{border-width:8px 8px 0;border-top-color:#333;margin:0 3px;transform-origin:50% 0;bottom:-8px}.tippy-tooltip[data-placement^=bottom] .tippy-arrow{border-width:0 8px 8px;border-bottom-color:#333;margin:0 3px;transform-origin:50% 7px;top:-8px}.tippy-tooltip[data-placement^=left] .tippy-arrow{border-width:8px 0 8px 8px;border-left-color:#333;margin:3px 0;transform-origin:0 50%;right:-8px}.tippy-tooltip[data-placement^=right] .tippy-arrow{border-width:8px 8px 8px 0;border-right-color:#333;margin:3px 0;transform-origin:7px 50%;left:-8px}.tippy-tooltip[data-arrow]{overflow:visible}.tippy-tooltip[data-animatefill]{background-color:transparent!important}.tippy-tooltip[data-interactive]{pointer-events:auto}.tippy-tooltip[data-inertia][data-state=visible]{transition-timing-function:cubic-bezier(.54,1.5,.38,1.11)}.tippy-tooltip[data-inertia][data-state=hidden]{transition-timing-function:ease}.tippy-arrow{border-color:transparent;border-style:solid;position:absolute}.tippy-arrow[data-state=hidden]{opacity:0}.tippy-content{padding:.3125rem .5625rem}";function injectCSS(e){if(isBrowser$1){var t=document.createElement("style");t.textContent=e,t.setAttribute("data-tippy-stylesheet","");var n=document.head,i=n.querySelector("style,link");i?n.insertBefore(t,i):n.appendChild(t)}}injectCSS(css);var missingTippy="Using the attachment feature of Shepherd requires the Tippy.js library",addShepherdClass=_createClassModifier("shepherd"),addHasTitleClass=_createClassModifier("shepherd-has-title"),centeredStylePopperModifier={computeStyle:{enabled:!0,fn:function(e){return e.styles=_extends({},e.styles,{left:"50%",top:"50%",transform:"translate(-50%, -50%)"}),e}},addShepherdClass:addShepherdClass},defaultPopperOptions={positionFixed:!0,modifiers:{addShepherdClass:addShepherdClass}};function createFromHTML(e){var t=document.createElement("div");return t.innerHTML=e,t.children[0]}function debounce$2$1(e,t,n){var i;return function(){var o=this,a=arguments,r=function(){i=null,n||e.apply(o,a)},s=n&&!i;clearTimeout(i),i=setTimeout(r,t),s&&e.apply(o,a)}}function drop(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return Array.isArray(e)?e.slice(t):[]}function setupTooltip(){if(isUndefined$1(tippy$1))throw new Error(missingTippy);this.tooltip&&this.tooltip.destroy();var e=this.parseAttachTo();this.tooltip=_makeTippyInstance.call(this,e),this.target=e.element||document.body,this.el.classList.add("shepherd-element")}function parseAttachTo(){var e=this.options.attachTo||{},t=_extends({},e);if(isString$1(e.element)){try{t.element=document.querySelector(e.element)}catch(e){}t.element||console.error("The element for this Shepherd step was not found ".concat(e.element))}return t}function _createClassModifier(e){return{enabled:!0,fn:function(t){return t.instance.popper.classList.add(e),t}}}function _makeTippyInstance(e){if(!e.element)return _makeCenteredTippy.call(this);var t=_makeAttachedTippyOptions.call(this,e);return tippy$1(e.element,t)}function _makeAttachedTippyOptions(e){var t={content:this.el,flipOnUpdate:!0,placement:e.on||"right"};return _extends(t,this.options.tippyOptions),this.options.title&&_extends(defaultPopperOptions.modifiers,{addHasTitleClass:addHasTitleClass}),this.options.tippyOptions&&this.options.tippyOptions.popperOptions&&_extends(defaultPopperOptions,this.options.tippyOptions.popperOptions),t.popperOptions=defaultPopperOptions,t}function _makeCenteredTippy(){var e=_objectSpread2({content:this.el,placement:"top"},this.options.tippyOptions);e.arrow=!1,e.popperOptions=e.popperOptions||{},this.options.title&&_extends(defaultPopperOptions.modifiers,{addHasTitleClass:addHasTitleClass});var t=_extends({},defaultPopperOptions,e.popperOptions,{modifiers:_extends(centeredStylePopperModifier,e.popperOptions.modifiers)});return e.popperOptions=t,tippy$1(document.body,e)}var Evented=function(){function e(){_classCallCheck(this,e)}return _createClass(e,[{key:"on",value:function(e,t,n){var i=!(arguments.length<=3||void 0===arguments[3])&&arguments[3];isUndefined$1(this.bindings)&&(this.bindings={}),isUndefined$1(this.bindings[e])&&(this.bindings[e]=[]),this.bindings[e].push({handler:t,ctx:n,once:i})}},{key:"once",value:function(e,t,n){this.on(e,t,n,!0)}},{key:"off",value:function(e,t){var n=this;if(isUndefined$1(this.bindings)||isUndefined$1(this.bindings[e]))return!1;isUndefined$1(t)?delete this.bindings[e]:this.bindings[e].forEach((function(i,o){i.handler===t&&n.bindings[e].splice(o,1)}))}},{key:"trigger",value:function(e){var t=this;if(!isUndefined$1(this.bindings)&&this.bindings[e]){var n=drop(Array.prototype.slice.call(arguments));this.bindings[e].forEach((function(i,o){var a=i.ctx,r=i.handler,s=i.once,l=a||t;r.apply(l,n),s&&t.bindings[e].splice(o,1)}))}}}]),e}();function _setupAdvanceOnHandler(e){var t=this;return function(n){if(t.isOpen()){var i=t.el&&n.target===t.el;(!isUndefined$1(e)&&n.target.matches(e)||i)&&t.tour.next()}}}function bindAdvance(){var e=this.options.advanceOn||{},t=e.event,n=e.selector;if(!t)return console.error("advanceOn was defined, but no event name was passed.");var i,o=_setupAdvanceOnHandler.call(this,n);try{i=document.querySelector(n)}catch(e){}if(!isUndefined$1(n)&&!i)return console.error("No element was found for the selector supplied to advanceOn: ".concat(n));i?(i.addEventListener(t,o),this.on("destroy",(function(){return i.removeEventListener(t,o)}))):(document.body.addEventListener(t,o,!0),this.on("destroy",(function(){return document.body.removeEventListener(t,o,!0)})))}function bindButtonEvents(e,t){var n=this;e.events=e.events||{},isUndefined$1(e.action)||(e.events.click=e.action),e.events&&Object.entries(e.events).forEach((function(e){var i=_slicedToArray(e,2),o=i[0],a=i[1];if(isString$1(a)){var r=a;a=function(){return n.tour.show(r)}}t.dataset.buttonEvent=!0,t.addEventListener(o,a),n.on("destroy",(function(){t.removeAttribute("data-button-event"),t.removeEventListener(o,a)}))}))}function bindCancelLink(e){var t=this;e.addEventListener("click",(function(e){e.preventDefault(),t.cancel()}))}function bindMethods(e){var t=this;e.map((function(e){t[e]=t[e].bind(t)}))}function createCommonjsModule(e,t){return e(t={exports:{}},t.exports),t.exports}Element.prototype.matches||(Element.prototype.matches=Element.prototype.matchesSelector||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector);var smoothscroll=createCommonjsModule((function(e,t){e.exports={polyfill:function(){var e=window,t=document;if(!("scrollBehavior"in t.documentElement.style)||!0===e.__forceSmoothScrollPolyfill__){var n,i=e.HTMLElement||e.Element,o={scroll:e.scroll||e.scrollTo,scrollBy:e.scrollBy,elementScroll:i.prototype.scroll||s,scrollIntoView:i.prototype.scrollIntoView},a=e.performance&&e.performance.now?e.performance.now.bind(e.performance):Date.now,r=(n=e.navigator.userAgent,new RegExp(["MSIE ","Trident/","Edge/"].join("|")).test(n)?1:0);e.scroll=e.scrollTo=function(){void 0!==arguments[0]&&(!0!==l(arguments[0])?g.call(e,t.body,void 0!==arguments[0].left?~~arguments[0].left:e.scrollX||e.pageXOffset,void 0!==arguments[0].top?~~arguments[0].top:e.scrollY||e.pageYOffset):o.scroll.call(e,void 0!==arguments[0].left?arguments[0].left:"object"!==_typeof$1(arguments[0])?arguments[0]:e.scrollX||e.pageXOffset,void 0!==arguments[0].top?arguments[0].top:void 0!==arguments[1]?arguments[1]:e.scrollY||e.pageYOffset))},e.scrollBy=function(){void 0!==arguments[0]&&(l(arguments[0])?o.scrollBy.call(e,void 0!==arguments[0].left?arguments[0].left:"object"!==_typeof$1(arguments[0])?arguments[0]:0,void 0!==arguments[0].top?arguments[0].top:void 0!==arguments[1]?arguments[1]:0):g.call(e,t.body,~~arguments[0].left+(e.scrollX||e.pageXOffset),~~arguments[0].top+(e.scrollY||e.pageYOffset)))},i.prototype.scroll=i.prototype.scrollTo=function(){if(void 0!==arguments[0])if(!0!==l(arguments[0])){var e=arguments[0].left,t=arguments[0].top;g.call(this,this,void 0===e?this.scrollLeft:~~e,void 0===t?this.scrollTop:~~t)}else{if("number"==typeof arguments[0]&&void 0===arguments[1])throw new SyntaxError("Value could not be converted");o.elementScroll.call(this,void 0!==arguments[0].left?~~arguments[0].left:"object"!==_typeof$1(arguments[0])?~~arguments[0]:this.scrollLeft,void 0!==arguments[0].top?~~arguments[0].top:void 0!==arguments[1]?~~arguments[1]:this.scrollTop)}},i.prototype.scrollBy=function(){void 0!==arguments[0]&&(!0!==l(arguments[0])?this.scroll({left:~~arguments[0].left+this.scrollLeft,top:~~arguments[0].top+this.scrollTop,behavior:arguments[0].behavior}):o.elementScroll.call(this,void 0!==arguments[0].left?~~arguments[0].left+this.scrollLeft:~~arguments[0]+this.scrollLeft,void 0!==arguments[0].top?~~arguments[0].top+this.scrollTop:~~arguments[1]+this.scrollTop))},i.prototype.scrollIntoView=function(){if(!0!==l(arguments[0])){var n=u(this),i=n.getBoundingClientRect(),a=this.getBoundingClientRect();n!==t.body?(g.call(this,n,n.scrollLeft+a.left-i.left,n.scrollTop+a.top-i.top),"fixed"!==e.getComputedStyle(n).position&&e.scrollBy({left:i.left,top:i.top,behavior:"smooth"})):e.scrollBy({left:a.left,top:a.top,behavior:"smooth"})}else o.scrollIntoView.call(this,void 0===arguments[0]||arguments[0])}}function s(e,t){this.scrollLeft=e,this.scrollTop=t}function l(e){if(null===e||"object"!==_typeof$1(e)||void 0===e.behavior||"auto"===e.behavior||"instant"===e.behavior)return!0;if("object"===_typeof$1(e)&&"smooth"===e.behavior)return!1;throw new TypeError("behavior member of ScrollOptions "+e.behavior+" is not a valid value for enumeration ScrollBehavior.")}function c(e,t){return"Y"===t?e.clientHeight+r<e.scrollHeight:"X"===t?e.clientWidth+r<e.scrollWidth:void 0}function d(t,n){var i=e.getComputedStyle(t,null)["overflow"+n];return"auto"===i||"scroll"===i}function p(e){var t=c(e,"Y")&&d(e,"Y"),n=c(e,"X")&&d(e,"X");return t||n}function u(e){for(;e!==t.body&&!1===p(e);)e=e.parentNode||e.host;return e}function h(t){var n,i,o,r,s=(a()-t.startTime)/468;r=s=s>1?1:s,n=.5*(1-Math.cos(Math.PI*r)),i=t.startX+(t.x-t.startX)*n,o=t.startY+(t.y-t.startY)*n,t.method.call(t.scrollable,i,o),i===t.x&&o===t.y||e.requestAnimationFrame(h.bind(e,t))}function g(n,i,r){var l,c,d,p,u=a();n===t.body?(l=e,c=e.scrollX||e.pageXOffset,d=e.scrollY||e.pageYOffset,p=o.scroll):(l=n,c=n.scrollLeft,d=n.scrollTop,p=s),h({scrollable:l,method:p,startTime:u,startX:c,startY:d,x:i,y:r})}}}}));smoothscroll.polyfill,smoothscroll.polyfill();var uniqueId=(id=0,function(){return++id}),id,Step=function(e){function t(e,n){var i;return _classCallCheck(this,t),(i=_possibleConstructorReturn(this,_getPrototypeOf(t).call(this,e,n))).tour=e,bindMethods.call(_assertThisInitialized(i),["_show","cancel","complete","destroy","hide","isOpen","scrollTo","setupElements","show"]),i.setOptions(n),i.bindAdvance=bindAdvance.bind(_assertThisInitialized(i)),i.bindButtonEvents=bindButtonEvents.bind(_assertThisInitialized(i)),i.bindCancelLink=bindCancelLink.bind(_assertThisInitialized(i)),i.setupTooltip=setupTooltip.bind(_assertThisInitialized(i)),i.parseAttachTo=parseAttachTo.bind(_assertThisInitialized(i)),_possibleConstructorReturn(i,_assertThisInitialized(i))}return _inherits(t,e),_createClass(t,[{key:"_addButtons",value:function(e){var t=this;if(Array.isArray(this.options.buttons)&&this.options.buttons.length){var n=document.createElement("footer");n.classList.add("shepherd-footer"),this.options.buttons.map((function(e){var i=createFromHTML('<button class="shepherd-button '.concat(e.classes||"",'" tabindex="0">').concat(e.text,"</button>"));n.appendChild(i),t.bindButtonEvents(e,i)})),e.appendChild(n)}}},{key:"_addCancelLink",value:function(e,t){if(this.options.showCancelLink){var n=createFromHTML('<a href class="shepherd-cancel-link"></a>');t.appendChild(n),e.classList.add("shepherd-has-cancel-link"),this.bindCancelLink(n)}}},{key:"_addContent",value:function(e,t){var n=createFromHTML('<div class="shepherd-text"\n id="'.concat(t,'"\n ></div>')),i=this.options.text;isFunction$1(i)&&(i=i.call(this,n)),i instanceof HTMLElement?n.appendChild(i):(isString$1(i)&&(i=[i]),i.map((function(e){n.innerHTML+="<p>".concat(e,"</p>")}))),e.appendChild(n)}},{key:"_addKeyDownHandler",value:function(e){var t=this,n=e.querySelectorAll('a[href], area[href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), button:not([disabled]), [tabindex="0"]'),i=_slicedToArray(n,1)[0],o=n[n.length-1];e.addEventListener("keydown",(function(e){switch(e.keyCode){case 9:if(1===n.length){e.preventDefault();break}e.shiftKey?document.activeElement===i&&(e.preventDefault(),o.focus()):document.activeElement===o&&(e.preventDefault(),i.focus());break;case 27:t.cancel();break;case 37:t.tour.back();break;case 39:t.tour.next()}}))}},{key:"_createTooltipContent",value:function(){var e=document.createElement("div"),t=this.options.classes||"",n="".concat(this.id,"-description"),i="".concat(this.id,"-label"),o=createFromHTML('<div class="'.concat(t,'"\n data-shepherd-step-id="').concat(this.id,'"\n role="dialog"\n tabindex="0">')),a=document.createElement("header");if(this.options.title){var r=document.createElement("h3");r.classList.add("shepherd-title"),r.innerHTML="".concat(this.options.title),r.id=i,o.setAttribute("aria-labeledby",i),a.appendChild(r)}return e.classList.add("shepherd-content"),a.classList.add("shepherd-header"),o.appendChild(e),e.appendChild(a),isUndefined$1(this.options.text)||(this._addContent(e,n),o.setAttribute("aria-describedby",n)),this._addButtons(e),this._addCancelLink(o,a),o}},{key:"getTour",value:function(){return this.tour}},{key:"cancel",value:function(){this.tour.cancel(),this.trigger("cancel")}},{key:"complete",value:function(){this.tour.complete(),this.trigger("complete")}},{key:"destroy",value:function(){try{this.tooltip&&(this.tooltip.destroy(),this.tooltip=null),isElement$2(this.el)&&this.el.parentNode&&(this.el.parentNode.removeChild(this.el),this.el=null),this.target&&this._updateStepTargetOnHide(),this.trigger("destroy")}catch(e){}}},{key:"hide",value:function(){this.tour.modal.hide(),this.trigger("before-hide"),document.body.removeAttribute("data-shepherd-step"),this.target&&this._updateStepTargetOnHide(),this.tooltip&&this.tooltip.hide(),this.trigger("hide")}},{key:"isOpen",value:function(){return Boolean(this.tooltip&&this.tooltip.state&&this.tooltip.state.isVisible)}},{key:"setupElements",value:function(){isUndefined$1(this.el)||this.destroy(),this.el=this._createTooltipContent(),this._addKeyDownHandler(this.el),this.options.advanceOn&&this.bindAdvance(),this.setupTooltip()}},{key:"scrollTo",value:function(e){var t=this.parseAttachTo().element;isFunction$1(this.options.scrollToHandler)?this.options.scrollToHandler(t):isElement$2(t)&&t.scrollIntoView(e)}},{key:"setOptions",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.options=t;var n=this.options.when;this.destroy(),this.id=this.options.id||"step-".concat(uniqueId()),n&&Object.entries(n).forEach((function(t){var n=_slicedToArray(t,2),i=n[0],o=n[1];e.on(i,o,e)}))}},{key:"show",value:function(){var e=this;if(isFunction$1(this.options.beforeShowPromise)){var t=this.options.beforeShowPromise();if(!isUndefined$1(t))return t.then((function(){return e._show()}))}this._show()}},{key:"_show",value:function(){var e=this;this.tour.beforeShowStep(this),this.trigger("before-show"),this.el||this.setupElements(),this.target.classList.add("shepherd-enabled","shepherd-target"),document.body.setAttribute("data-shepherd-step",this.id),this.options.scrollTo&&setTimeout((function(){e.scrollTo(e.options.scrollTo)})),this.tooltip.show(),this.trigger("show"),this.el.focus()}},{key:"_updateStepTargetOnHide",value:function(){this.options.highlightClass&&this.target.classList.remove(this.options.highlightClass),this.target.classList.remove("shepherd-enabled","shepherd-target")}}]),t}(Evented),svgNS$1="http://www.w3.org/2000/svg",elementIds$1={modalOverlay:"shepherdModalOverlayContainer",modalOverlayMask:"shepherdModalMask",modalOverlayMaskRect:"shepherdModalMaskRect",modalOverlayMaskOpening:"shepherdModalMaskOpening"},classNames={isVisible:"shepherd-modal-is-visible",modalTarget:"shepherd-modal-target"};function _createModalContainer$1(){var e=document.createElementNS(svgNS$1,"svg");return e.setAttributeNS(null,"id",elementIds$1.modalOverlay),e}function _createMaskContainer$1(){var e=document.createElementNS(svgNS$1,"mask");return _setAttributes(e,{height:"100%",id:elementIds$1.modalOverlayMask,width:"100%",x:"0",y:"0"}),e}function _createMaskRect$1(){var e=document.createElementNS(svgNS$1,"rect");return _setAttributes(e,{fill:"#FFFFFF",height:"100%",id:elementIds$1.modalOverlayMaskRect,width:"100%",x:"0",y:"0"}),e}function _createMaskOpening$1(){var e=document.createElementNS(svgNS$1,"rect");return _setAttributes(e,{fill:"#000000",id:elementIds$1.modalOverlayMaskOpening}),e}function _createMaskConsumer$1(){var e=document.createElementNS(svgNS$1,"rect");return _setAttributes(e,{height:"100%",width:"100%",x:"0",y:"0"}),e.setAttribute("mask","url(#".concat(elementIds$1.modalOverlayMask,")")),e}function createModalOverlay(){var e=_createModalContainer$1(),t=document.createElementNS(svgNS$1,"defs"),n=_createMaskContainer$1(),i=_createMaskRect$1(),o=_createMaskOpening$1(),a=_createMaskConsumer$1();return n.appendChild(i),n.appendChild(o),t.appendChild(n),e.appendChild(t),e.appendChild(a),e}function positionModalOpening$1(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;if(e.getBoundingClientRect&&t instanceof SVGElement){var i=e.getBoundingClientRect(),o=i.x,a=i.y,r=i.width,s=i.height,l=i.left,c=i.top;_setAttributes(t,{x:(o||l)-n,y:(a||c)-n,width:r+2*n,height:s+2*n})}}function closeModalOpening(e){e&&e instanceof SVGElement&&_setAttributes(e,{height:"0",x:"0",y:"0",width:"0"})}function getModalMaskOpening(e){return e.querySelector("#".concat(elementIds$1.modalOverlayMaskOpening))}function preventModalBodyTouch(e){e.preventDefault()}function preventModalOverlayTouch(e){e.stopPropagation()}function toggleShepherdModalClass(e){var t=document.querySelector("".concat(classNames.modalTarget));t&&t.classList.remove(classNames.modalTarget),e.classList.add(classNames.modalTarget)}function _setAttributes(e,t){Object.keys(t).forEach((function(n){e.setAttribute(n,t[n])}))}function getElementFromObject(e){var t=e.element;if(t instanceof HTMLElement)return t;if(t instanceof SVGElement)return t;try{return document.querySelector(t)}catch(e){}return null}function getElementForStep(e){var t=e.options.attachTo;if(!t)return null;var n=_typeof(t);return"string"===n?getElementFromString(t):"object"===n?getElementFromObject(t):null}function getElementFromString(e){var t=_slicedToArray(e.split(" "),1)[0];return document.querySelector(t)}function addStepEventListeners(){"function"==typeof this._onScreenChange&&(window.removeEventListener("resize",this._onScreenChange,!1),window.removeEventListener("scroll",this._onScreenChange,!0)),window.addEventListener("resize",this._onScreenChange,!1),window.addEventListener("scroll",this._onScreenChange,!0);var e=document.querySelector("#".concat(elementIds$1.modalOverlay));window.addEventListener("touchmove",preventModalBodyTouch,{passive:!1}),e&&e.addEventListener("touchmove",preventModalOverlayTouch,!1)}var Modal=function(){function e(t){return _classCallCheck(this,e),this.createModalOverlay(),this.options=t,this}return _createClass(e,[{key:"cleanup",value:function(){try{var e=this._modalOverlayElem;e&&e instanceof SVGElement&&e.parentNode.removeChild(e),this._modalOverlayElem=null,document.body.classList.remove(classNames.isVisible)}catch(e){}}},{key:"createModalOverlay",value:function(){if(!this._modalOverlayElem){var e=document.getElementById("shepherdModalOverlayContainer");this._modalOverlayElem=e||createModalOverlay(),this._modalOverlayOpening=getModalMaskOpening(this._modalOverlayElem),this.hide(),e||document.body.appendChild(this._modalOverlayElem)}}},{key:"hide",value:function(){document.body.classList.remove(classNames.isVisible),this._modalOverlayElem&&(this._modalOverlayElem.style.display="none")}},{key:"setupForStep",value:function(e){this.options.useModalOverlay?(this._styleForStep(e),this.show()):this.hide()}},{key:"show",value:function(){document.body.classList.add(classNames.isVisible),this._modalOverlayElem&&(this._modalOverlayElem.style.display="block")}},{key:"_styleForStep",value:function(e){var t=this._modalOverlayOpening,n=getElementForStep(e),i=e.options.modalOverlayOpeningPadding;n?(positionModalOpening$1(n,t,i),this._onScreenChange=debounce$2$1(positionModalOpening$1.bind(this,n,t,i),0),addStepEventListeners.call(this)):closeModalOpening(this._modalOverlayOpening)}}]),e}(),hasPassiveEvents=!1;if("undefined"!=typeof window){var passiveTestOptions={get passive(){hasPassiveEvents=!0}};window.addEventListener("testPassive",null,passiveTestOptions),window.removeEventListener("testPassive",null,passiveTestOptions)}var isIosDevice="undefined"!=typeof window&&window.navigator&&window.navigator.platform&&/iP(ad|hone|od)/.test(window.navigator.platform),locks=[],documentListenerAdded=!1,initialClientY=-1,previousBodyOverflowSetting,previousBodyPaddingRight,allowTouchMove=function(e){return locks.some((function(t){return!(!t.options.allowTouchMove||!t.options.allowTouchMove(e))}))},preventDefault=function(e){var t=e||window.event;return!!allowTouchMove(t.target)||(t.touches.length>1||(t.preventDefault&&t.preventDefault(),!1))},setOverflowHidden=function(e){setTimeout((function(){if(void 0===previousBodyPaddingRight){var t=!!e&&!0===e.reserveScrollBarGap,n=window.innerWidth-document.documentElement.clientWidth;t&&n>0&&(previousBodyPaddingRight=document.body.style.paddingRight,document.body.style.paddingRight="".concat(n,"px"))}void 0===previousBodyOverflowSetting&&(previousBodyOverflowSetting=document.body.style.overflow,document.body.style.overflow="hidden")}))},restoreOverflowSetting=function(){setTimeout((function(){void 0!==previousBodyPaddingRight&&(document.body.style.paddingRight=previousBodyPaddingRight,previousBodyPaddingRight=void 0),void 0!==previousBodyOverflowSetting&&(document.body.style.overflow=previousBodyOverflowSetting,previousBodyOverflowSetting=void 0)}))},isTargetElementTotallyScrolled=function(e){return!!e&&e.scrollHeight-e.scrollTop<=e.clientHeight},handleScroll=function(e,t){var n=e.targetTouches[0].clientY-initialClientY;return!allowTouchMove(e.target)&&(t&&0===t.scrollTop&&n>0||isTargetElementTotallyScrolled(t)&&n<0?preventDefault(e):(e.stopPropagation(),!0))},disableBodyScroll=function(e,t){if(isIosDevice){if(!e)return void console.error("disableBodyScroll unsuccessful - targetElement must be provided when calling disableBodyScroll on IOS devices.");if(e&&!locks.some((function(t){return t.targetElement===e}))){var n={targetElement:e,options:t||{}};locks=[].concat(_toConsumableArray(locks),[n]),e.ontouchstart=function(e){1===e.targetTouches.length&&(initialClientY=e.targetTouches[0].clientY)},e.ontouchmove=function(t){1===t.targetTouches.length&&handleScroll(t,e)},documentListenerAdded||(document.addEventListener("touchmove",preventDefault,hasPassiveEvents?{passive:!1}:void 0),documentListenerAdded=!0)}}else{setOverflowHidden(t);var i={targetElement:e,options:t||{}};locks=[].concat(_toConsumableArray(locks),[i])}},clearAllBodyScrollLocks=function(){isIosDevice?(locks.forEach((function(e){e.targetElement.ontouchstart=null,e.targetElement.ontouchmove=null})),documentListenerAdded&&(document.removeEventListener("touchmove",preventDefault,hasPassiveEvents?{passive:!1}:void 0),documentListenerAdded=!1),locks=[],initialClientY=-1):(restoreOverflowSetting(),locks=[])},defaults={trigger:"manual",arrow:!0,animation:"fade",duration:420,flip:!0,animateFill:!1,interactive:!0,hideOnClick:"toggle",multiple:!0};function cleanupSteps(e){e&&e.steps.forEach((function(e){if(e.options&&!1===e.options.canClickTarget&&e.options.attachTo){var t=getElementForStep(e);t instanceof HTMLElement&&(t.style.pointerEvents="auto")}}))}function cleanupStepEventListeners(){"function"==typeof this._onScreenChange&&(window.removeEventListener("resize",this._onScreenChange,!1),window.removeEventListener("scroll",this._onScreenChange,!1),this._onScreenChange=null),window.removeEventListener("touchmove",preventModalBodyTouch,{passive:!1})}var uniqueId$1=function(){var e=0;return function(){return++e}}(),Shepherd=new Evented,Tour=function(e){function t(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};_classCallCheck(this,t),e=_possibleConstructorReturn(this,_getPrototypeOf(t).call(this,n)),bindMethods.call(_assertThisInitialized(e),["back","cancel","complete","hide","next"]),e.options=n,e.steps=e.options.steps||[];var i=["active","cancel","complete","inactive","show","start"];return i.map((function(t){var n;n=t,e.on(n,(function(t){(t=t||{}).tour=_assertThisInitialized(e),Shepherd.trigger(n,t)}))})),e.modal=new Modal(n),e._setTooltipDefaults(),e._setTourID(),_possibleConstructorReturn(e,_assertThisInitialized(e))}return _inherits(t,e),_createClass(t,[{key:"addStep",value:function(e,t){var n,i;return isUndefined$1(t)?i=e:(n=e,i=t),i instanceof Step?i.tour=this:i=this.setupStep(i,n),this.steps.push(i),i}},{key:"back",value:function(){var e=this.steps.indexOf(this.currentStep);this.show(e-1,!1)}},{key:"cancel",value:function(){if(this.options.confirmCancel){var e=this.options.confirmCancelMessage||"Are you sure you want to stop the tour?";window.confirm(e)&&this.done("cancel")}else this.done("cancel")}},{key:"complete",value:function(){this.done("complete")}},{key:"done",value:function(e){Array.isArray(this.steps)&&this.steps.forEach((function(e){return e.destroy()})),cleanupStepEventListeners.call(this),cleanupSteps(this.tourObject),this.trigger(e),Shepherd.activeTour=null,this._removeBodyAttrs(),this.trigger("inactive",{tour:this}),this.options.disableScroll&&clearAllBodyScrollLocks(),this.modal.cleanup()}},{key:"getById",value:function(e){return this.steps.find((function(t){return t.id===e}))}},{key:"getCurrentStep",value:function(){return this.currentStep}},{key:"hide",value:function(){var e=this.getCurrentStep();if(e)return e.hide()}},{key:"isActive",value:function(){return Shepherd.activeTour===this}},{key:"next",value:function(){var e=this.steps.indexOf(this.currentStep);e===this.steps.length-1?this.complete():this.show(e+1,!0)}},{key:"removeStep",value:function(e){var t=this,n=this.getCurrentStep();this.steps.some((function(n,i){if(n.id===e)return n.isOpen()&&n.hide(),n.destroy(),t.steps.splice(i,1),!0})),n&&n.id===e&&(this.currentStep=void 0,this.steps.length?this.show(0):this.cancel())}},{key:"setupStep",value:function(e,t){return(isString$1(t)||isNumber$1(t))&&(e.id=t.toString()),e=_extends({},this.options.defaultStepOptions,e),new Step(this,e)}},{key:"beforeShowStep",value:function(e){this.modal.setupForStep(e),this._styleTargetElementForStep(e)}},{key:"show",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=isString$1(e)?this.getById(e):this.steps[e];if(n){this._updateStateBeforeShow();var i=isFunction$1(n.options.showOn)&&!n.options.showOn();i?this._skipStep(n,t):(this.trigger("show",{step:n,previous:this.currentStep}),this.currentStep=n,n.show())}}},{key:"start",value:function(){this.trigger("start"),this.options.disableScroll&&disableBodyScroll(),this.currentStep=null,this._setupActiveTour(),this.next()}},{key:"_setupActiveTour",value:function(){this.modal.createModalOverlay(),this._addBodyAttrs(),this.trigger("active",{tour:this}),Shepherd.activeTour=this}},{key:"_styleTargetElementForStep",value:function(e){var t=getElementForStep(e);t&&(toggleShepherdModalClass(t),e.options.highlightClass&&t.classList.add(e.options.highlightClass),!1===e.options.canClickTarget&&(t.style.pointerEvents="none"))}},{key:"_skipStep",value:function(e,t){var n=this.steps.indexOf(e),i=t?n+1:n-1;this.show(i,t)}},{key:"_setTooltipDefaults",value:function(){tippy$1.setDefaultProps(defaults)}},{key:"_updateStateBeforeShow",value:function(){this.currentStep&&this.currentStep.hide(),this.isActive()||this._setupActiveTour()}},{key:"_setTourID",value:function(){var e=this.options.tourName||"tour",t=uniqueId$1();this.id="".concat(e,"--").concat(t)}},{key:"_addBodyAttrs",value:function(){document.body.setAttribute("data-shepherd-active-tour",this.id),document.body.classList.add("shepherd-active")}},{key:"_removeBodyAttrs",value:function(){document.body.removeAttribute("data-shepherd-active-tour"),document.body.classList.remove("shepherd-active")}}]),t}(Evented),ApxorWalkthroughTour;_extends(Shepherd,{Tour:Tour,Step:Step,Evented:Evented});var onClickCallback=function(e,t,n){var i=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=arguments.length>4?arguments[4]:void 0;if(o)try{i&&e.logActionEvent("InlineTargetViewClicked",t,n,"tooltip"),ApxorWalkthroughTour.complete()}catch(t){e.isShowingAction=!1,e.currentAction=null}},flutterClickCallbackWrapper=null,getPropertyFrom=function(e){switch(e.toUpperCase()){case"TOP":return"top: -8px !important";case"LEFT":return"left: 0px !important";case"RIGHT":return"left: -0px !important";case"BOTTOM":return"top: 0px !important"}},addTourStep=function(e,t,n,i,o){var a,r=e.animation,s=void 0===r?{}:r,l=e.bg_color,c=void 0===l?"black":l,d=e.border,p=void 0===d?{}:d,u=e.buttons_config,h=void 0===u?[]:u,g=e.button_position,f=void 0===g?"right":g,m=e.button_direction,_=void 0===m?DIRECTION.HORIZONTAL:m,v=e.corners,b=void 0===v?{}:v,y=e.shadow,x=void 0===y?"0 8px 16px rgba(0,0,0,0.19), 0 6px 6px rgba(0,0,0,0.23)":y,w=e.opacity,C=void 0===w?1:w,E=e.dismiss_outside_touch,k=void 0!==E&&E,S=e.escapeWithReference,T=void 0!==S&&S,A=e.dismiss_target_touch,I=void 0===A||A,P=e.position,O=void 0===P?"TOP":P,L=e.text_config,N=void 0===L?{}:L,D=e.title_config,B=void 0===D?{}:D,M=e.view_id,F=e.show_shadow,$=void 0!==F&&F,R=e.show_close_icon,H=void 0!==R&&R,V=e.dim_background_color,q=void 0===V?"#0a0a0a":V,U=e.dim_background_opacity,j=void 0===U?.5:U,z=e.layout_type,W=void 0===z?"default":z,Y=e.pb_color,X=void 0===Y?"orange":Y,G=e.index,Q=void 0===G?0:G,Z=e.total,K=void 0===Z?1:Z,J=e.iframe_id,ee=void 0===J?"":J;n.currentAction=ApxorWalkthroughTour.complete;var te=(null==N?void 0:N.alignment)||"center",ne=(null==B?void 0:B.alignment)||"center",ie=t.configId,oe=t.configName,ae=generateButtons(h,ApxorWalkthroughTour,ie,oe),re=ae.buttons_array,se=ae.buttons_css,le={color:N.color,fontSize:N.size,fontFamily:N.font_family,fontStyle:N.style};if(N.margin_config&&Object.keys(N.margin_config).length>0){var ce=N.margin_config;le.margin="".concat(ce.top,"px ").concat(ce.right,"px ").concat(ce.bottom,"px ").concat(ce.left,"px")}var de=N.style;"bold"===de&&(le.fontWeight=de);var pe,ue={color:B.color,fontSize:B.size,fontFamily:B.font_family,fontStyle:B.style};if(B.margin_config&&Object.keys(B.margin_config).length>0){var he=B.margin_config;ue.margin="".concat(he.top,"px ").concat(he.right,"px ").concat(he.bottom,"px ").concat(he.left,"px")}switch("bold"===(de=B.style)&&(le.fontWeight=de),W){case"with_progress":pe='\n<div>\n <div style="height: 6px;background: '.concat(X,";width: ").concat((Q+1)/K*100,"%;border-radius: ").concat(b.enabled?b.width:0,'px;"></div>\n <header class="shepherd-header" style="').concat(B?"padding: 10px 10px 0 10px":"",'">\n ').concat(B?'<h3 class="shepherd-title" id="apxor-step-'.concat(Q,'-label" style="padding: 0 !important;padding-right: 0.7em;text-align:').concat(ne,';">').concat(getStylisedText(null==B?void 0:B.text,null==B?void 0:B.segments,null==B?void 0:B.quote,null==B?void 0:B.link_config),"</h3>"):"",'\n </header>\n <p style="padding: 8px 10px;text-align:').concat(te,';">').concat(getStylisedText(null==N?void 0:N.text,null==N?void 0:N.segments,null==N?void 0:N.quote,null==N?void 0:N.link_config),"</p>\n</div>\n "),pe=(new DOMParser).parseFromString(pe,"text/html").body.children[0];break;default:pe=(null==N||null===(a=N.segments)||void 0===a?void 0:a.length)>0?getStylisedText(null==N?void 0:N.text,null==N?void 0:N.segments,null==N?void 0:N.quote,null==N?void 0:N.link_config):[N&&N.text?N.text:"Tap here"]}var ge,fe={"border-radius":b.enabled?b.width:0,background:c,"border-color":p.color,"border-width":p.width};if(Apxor.isFlutter()){var me=t.configId,_e=t.configName,ve=e.dismiss_target_touch,be=void 0===ve||ve;(ge=createTargetView(getElementPositionFromFlutter(M)))&&(flutterClickCallbackWrapper=addClickListenerForFlutterElement(ge,(function(){onClickCallback(n,me,_e,!0,be)})))}else ge=getElementFromSelector(M,ee);if(!ge)return null==Apxor||Apxor.logEvent("apx_nudge_not_shown",{apx_nudge_type:"campaign",apx_nudge_id:ie,apx_nudge_name:oe,apx_variant_code:ceWrapper.getInstance().getVariantCode(ie),apx_failure_type:"error",apx_reason:"View not found"},!1,"apxor","campaign"),void console.warn("Element not found with id or path");var ye=document.createElement("span");ye.setAttribute("id","apxor-style-"+ie+"-step-"+Q),ye.setAttribute("style","display: none");var xe=document.createElement("style");xe.innerHTML='\n#shepherdModalOverlayContainer {\n -ms-filter: "progid:dximagetransform.microsoft.gradient.alpha(Opacity=50)";\n filter: alpha(opacity=50);height: 100vh;left: 0;opacity: '.concat(null!=j?j:.5,";position: fixed;\n top: 0;transition: all .3s ease-out;width: 100vw;z-index: 9997;fill: ").concat(null!=q?q:"transparent","\n}\n#shepherdModalOverlayContainer #shepherdModalMask, #shepherdModalOverlayContainer #shepherdModalMaskRect {\n height: 100vh;width: 100vw\n}\n.shepherd-modal.shepherd-enabled {\n position: relative;z-index: 9998\n}\n.shepherd-active.shepherd-modal-is-visible :not(.shepherd-target) {\n pointer-events: none\n}\n.shepherd-active.shepherd-modal-is-visible .shepherd-button, .shepherd-active.shepherd-modal-is-visible .shepherd-button *, .shepherd-active.shepherd-modal-is-visible .shepherd-cancel-link, .shepherd-active.shepherd-modal-is-visible .shepherd-cancel-link *, .shepherd-active.shepherd-modal-is-visible .shepherd-element, .shepherd-active.shepherd-modal-is-visible .shepherd-element *, .shepherd-active.shepherd-modal-is-visible .shepherd-target, .shepherd-active.shepherd-modal-is-visible .shepherd-target * {\n pointer-events: auto\n}\n.tippy-popper.shepherd {\n z-index: 999999\n}\n.tippy-popper.shepherd[x-placement^=top] {\n margin-top: 0px\n}\n.tippy-popper.shepherd[x-placement^=bottom] {\n margin-top: 8px\n}\n.tippy-popper.shepherd[x-placement^=left] {\n margin-right: 0px\n}\n.tippy-popper.shepherd[x-placement^=right] {\n margin-left: 0px\n}\n.tippy-popper.shepherd .tippy-tooltip .tippy-content {\n max-height: 100%;padding-top:0px;padding-bottom:0px;text-align: left;max-width: 400px;\n}\n.shepherd-element, .shepherd-element *, .shepherd-element:after, .shepherd-element :after, .shepherd-element:before, .shepherd-element :before {\n box-sizing: border-box\n}\n.shepherd-element {\n outline: none;\n}\n.shepherd-element .shepherd-content header {\n *zoom: 1;align-items: left;border-top-left-radius: 5px;border-top-right-radius: 5px;\n display: flex;justify-content: left;line-height: 2em;").concat(H?"padding: .75em;":"",'\n}\n.shepherd-element .shepherd-content header:after {\n clear: both;content: "";display: table\n}\n.shepherd-element .shepherd-content header .shepherd-cancel-link, .shepherd-element .shepherd-content header .shepherd-title {\n margin: 0;padding: 0;position: relative;vertical-align: middle\n}\n.shepherd-element .shepherd-content header .shepherd-title {\n text-align:').concat(ne,";\n color: ").concat(ue.color,";display: flex;flex: 1 0 auto;\n font-size: ").concat(ue.fontSize,"px;font-family: ").concat(ue.fontFamily,";\n font-weight: ").concat("bold"!==ue.fontStyle?"normal":ue.fontStyle,";font-style: ").concat("italic"===ue.fontStyle?"italic":"unset",";\n line-height: ").concat("default"===W?"26":"20",'px;letter-spacing:0.01em;padding: .7em;padding-bottom: 0px;max-width: 400px;\n}\n.shepherd-element .shepherd-content header .shepherd-cancel-link {\n color: hsla(0, 0%, 70.2%, .75);font-size: 2em;margin-left: auto;\n text-decoration: none;transition: color .5s ease\n}\n.shepherd-element .shepherd-content header .shepherd-cancel-link:before {\n mix-blend-mode: screen;content: "×"\n}\n.shepherd-element .shepherd-content header .shepherd-cancel-link:hover {\n mix-blend-mode: difference;\n}\n.shepherd-element .shepherd-content .shepherd-text {\n text-align:').concat(te,";\n line-height: 1em;").concat("default"===W?"padding:14px;padding-top:4px":"","\n}\n.shepherd-element .shepherd-content .shepherd-text a,\n.shepherd-element .shepherd-content .shepherd-text a:active,\n.shepherd-element .shepherd-content .shepherd-text a:visited {\n border-bottom: 1px dotted rgba(0, 0, 0, .75);color: ").concat(le.color,";\n opacity: 0.75;text-decoration: none\n}\n.shepherd-element .shepherd-content .shepherd-text a:active:hover, \n.shepherd-element .shepherd-content .shepherd-text a:hover,\n.shepherd-element .shepherd-content .shepherd-text a:visited:hover {\n border-bottom-style: solid\n}\n.shepherd-element .shepherd-content .shepherd-text p {\n margin-top: 0\n}\n.shepherd-element .shepherd-content .shepherd-text p:last-child {\n margin-bottom: 0\n}\n.shepherd-content > .shepherd-text p {\n font-size: ").concat(le.fontSize,"px;font-family: ").concat(le.fontFamily,"; \n font-weight: ").concat("bold"!==le.fontStyle?"normal":le.fontStyle,";\n font-style: ").concat("italic"===le.fontStyle?"italic":"unset",";\n color: ").concat(le.color,";line-height: ").concat("default"===W?"26":"20","px;letter-spacing:0.01em;\n}\n").concat(getButtonsCSS(se,f,_,".shepherd-element .shepherd-content "),"\n@-webkit-keyframes cycle {\n 0% { transform: ").concat(translateDir(O,0),"; }\n 50% { transform: ").concat(translateDir(O,50),"; }\n 100% { transform: ").concat(translateDir(O,100),"; }\n}\n@keyframes cycle {\n 0% { transform: ").concat(translateDir(O,0),"; }\n 50% { transform: ").concat(translateDir(O,50),"; }\n 100% { transform: ").concat(translateDir(O,100),"; }\n}\n.tippy-tooltip.apxor-").concat(ie,"-step-").concat(Q,"-theme {\n animation :").concat(s.enabled?s.type+" "+s.duration+"ms":"none",";\n animation-timing-function: ease-in-out;animation-iteration-count: infinite;\n box-shadow: ").concat($?x:"none",";color: ").concat(le.color,";\n opacity: ").concat(C,";border-radius: ").concat(fe["border-radius"]+"px",";\n background-color: ").concat(fe.background,";").concat(getPropertyFrom(O),";\n}\n.apxor-").concat(ie,"-step-").concat(Q,"-theme .tippy-roundarrow {\n fill: ").concat(fe.background,";\n}\n.tippy-tooltip[data-placement^='top'] .tippy-arrow {\n border-top-color: ").concat(fe.background,";\n}\n.tippy-tooltip[data-placement^='bottom'] .tippy-arrow {\n border-bottom-color: ").concat(fe.background,";\n}\n.tippy-tooltip[data-placement^='left'] .tippy-arrow {\n border-left-color: ").concat(fe.background,";\n}\n.tippy-tooltip[data-placement^='right'] .tippy-arrow {\n border-right-color: ").concat(fe.background,";\n}\n "),ye.appendChild(xe),Apxor.isFlutter()?document.body.appendChild(ye):ge.parentNode.insertBefore(ye,ge);var we=function(){return onClickCallback(n,ie,oe,!0,I)},Ce=function(){var e;try{var t;null===(t=ApxorWalkthroughTour)||void 0===t||t.complete()}catch(e){console.error(e)}ke.disconnect(),Se.disconnect();try{var n,i=document.getElementById("apxor-style-"+ie+"-step-"+Q);null==i||null===(n=i.parentNode)||void 0===n||n.removeChild(i)}catch(e){window.ApxorLogger.error("Error removing the tooltip styles:"+e)}try{var a,r=document.getElementById("shepherdModalOverlayContainer");null==r||null===(a=r.parentNode)||void 0===a||a.removeChild(r)}catch(e){window.ApxorLogger.error("Error removing the tooltip overlay:"+e)}o&&o(null===(e=ApxorWalkthroughTour)||void 0===e?void 0:e._isCancelled),ge.removeEventListener("click",we),document.body.removeEventListener("click",flutterClickCallbackWrapper),Apxor.isFlutter()&&ge.remove()},Ee=!1,ke=new MutationObserver((function(){if(!document.body.contains(ge)){document.getElementById("shepherdModalOverlayContainer").remove();var e=document.getElementsByClassName("apxor-".concat(ie,"-step-").concat(Q,"-theme"));e.length>0&&e[0]&&e[0].parentNode&&e[0].parentNode.remove(),Ce()}})),Se=new IntersectionObserver((function(){var e=isElementInViewport(ge);if(!e&&Ee){document.getElementById("shepherdModalOverlayContainer").remove();var t=document.getElementsByClassName("apxor-".concat(ie,"-step-").concat(Q,"-theme"));t.length>0&&t[0]&&t[0].parentNode&&t[0].parentNode.remove(),Ce()}e&&(Ee=!0)})),Te=getStylisedText(null==B?void 0:B.text,null==B?void 0:B.segments,null==B?void 0:B.quote,null==B?void 0:B.link_config);ApxorWalkthroughTour.addStep("apxor-step-"+Q,{title:"default"===W?""===Te?null:Te.outerHTML:null,text:pe,classes:"apxor-".concat(ie,"-step-").concat(Q,"-theme"),attachTo:{element:ge,on:O.toLowerCase()},showCancelLink:H,buttons:re,tippyOptions:{allowHTML:!0,arrow:!0,flipOnUpdate:!0,interactive:!0,maxWidth:"100%",hideOnClick:k,escapeWithReference:T,theme:"apxor-".concat(ie,"-step-").concat(Q),onShow:function(){i&&i(),ge.addEventListener("click",we),ke.observe(document.body,{childList:!0,subtree:!0}),Se.observe(ge)},onHidden:Ce}})},showTooltip=function(e,t,n,i,o,a,r){var s,l,c,d,p=Array.isArray(t)&&t.length>0,u=e.delay,h=e.dim_background,g=e.view_id,f=e.iframe_id,m=e.find_interval,_=void 0===m?0:m,v=e.max_find_interval,b=void 0===v?1e4:v,y=e.scrollToView,x=void 0!==y&&y;(null===(s=e.title_config)||void 0===s?void 0:s.text)===DYNAMIC_TEXT&&(0===(null===(c=e.title_config.script)||void 0===c?void 0:c.t)?evaluateDynamicText(e.title_config):evaluateDynamicScript(e.title_config));(null===(l=e.text_config)||void 0===l?void 0:l.text)===DYNAMIC_TEXT&&(0===(null===(d=e.text_config.script)||void 0===d?void 0:d.t)?evaluateDynamicText(e.text_config):evaluateDynamicScript(e.text_config));var w=!1;x&&(w={behavior:"smooth",block:"center"}),ApxorWalkthroughTour=new Shepherd.Tour({defaultStepOptions:{scrollTo:w},useModalOverlay:p||h});var C=function(n){try{var s=n.getBoundingClientRect();if(0===s.width||0===s.height)return console.warn("Width and height are 0 for: ",g,". Can't show"),void(o.currentAction=null)}catch(e){return o.isShowingAction=!1,void(o.currentAction=null)}if(p?t.forEach((function(e){var t=e.ui;addTourStep(t,i,o,a,r)})):addTourStep(e,i,o,a,r),o.isShowingAction){var l=i.configId,c=i.configName;return null==Apxor||Apxor.logEvent("apx_nudge_not_shown",{apx_nudge_type:"campaign",apx_nudge_id:l,apx_nudge_name:c,apx_variant_code:ceWrapper.getInstance().getVariantCode(l),apx_failure_type:"error",apx_reason:"An action is already being shown"},!1,"apxor","campaign"),void window.ApxorLogger.error("An action already being shown")}try{ApxorWalkthroughTour.start(),o.isShowingAction=!0}catch(e){o.isShowingAction=!1,o.currentAction=null,console.error(e)}};return setTimeout((function(){var t=getElementFromSelector(g,f);if(t)C(t);else if(console.warn("Element with id:".concat(g," not found.")),_)console.warn("Rechecking"),function(t){var n=new Date,a=setInterval((function(){if(null===o.currentAction||void 0===o.currentAction){var r;if(Apxor.isFlutter()){var s=i.configId,l=i.configName,c=e.dismiss_target_touch,d=void 0===c||c;(r=createTargetView(getElementPositionFromFlutter(t)))&&(flutterClickCallbackWrapper=addClickListenerForFlutterElement(r,(function(){onClickCallback(o,s,l,!0,d)})))}else r=getElementFromSelector(t,f);if(r)clearInterval(a),C(r);else if(new Date-n>b){clearInterval(a);var p=i.configId,u=i.configName;null==Apxor||Apxor.logEvent("apx_nudge_not_shown",{apx_nudge_type:"campaign",apx_nudge_id:p,apx_nudge_name:u,apx_variant_code:ceWrapper.getInstance().getVariantCode(p),apx_failure_type:"error",apx_reason:"View not found"},!1,"apxor","campaign"),console.warn("Element with id:".concat(t," not found.")),o.currentAction=null}}else clearInterval(a)}),_)}(g);else{var n=i.configId,a=i.configName;null==Apxor||Apxor.logEvent("apx_nudge_not_shown",{apx_nudge_type:"campaign",apx_nudge_id:n,apx_nudge_name:a,apx_variant_code:ceWrapper.getInstance().getVariantCode(n),apx_failure_type:"error",apx_reason:"View not found"},!1,"apxor","campaign"),o.currentAction=null}}),u),!0===n.auto_dismiss&&setTimeout((function(){try{ApxorWalkthroughTour.complete()}catch(e){o.isShowingAction=!1,o.currentAction=null,console.error(e)}}),u+n.duration),ApxorWalkthroughTour.complete},svgNS="http://www.w3.org/2000/svg",elementIds={modalOverlay:"tippyModalOverlayContainer",modalOverlayMask:"tippyModalMask",modalOverlayMaskRect:"tippyModalMaskRect",modalOverlayMaskOpening:"tippyModalMaskOpening"},createMask=function(e,t){var n,i,o=arguments.length>2&&void 0!==arguments[2]&&arguments[2],a=arguments.length>3&&void 0!==arguments[3]&&arguments[3],r=_createModalContainer(),s=document.createElementNS(svgNS,"defs"),l=_createMaskContainer(),c=_createMaskRect();if(n=a?_createMaskOpeningCoachmark(o):_createMaskOpening(t),!a)var d=_createMaskOpeningBorder(t);return a?(i=_createMaskConsumer(),positionModalOpeningCoachmark(e,n),window.addEventListener("scroll",(function(){positionModalOpeningCoachmark(e,n),setAttributes(n,{"scroll-behavior":"smooth"})}))):(i=_createMaskConsumer(),positionModalOpening(e,n,d,t),window.addEventListener("scroll",(function(){positionModalOpening(e,n,d,t),setAttributes(n,{"scroll-behavior":"smooth"})}))),l.appendChild(c),l.appendChild(n),s.appendChild(l),r.appendChild(s),a||r.appendChild(d),r.appendChild(i),r};function setAttributes(e,t){Object.keys(t).forEach((function(n){e.setAttribute(n,t[n])}))}function _createModalContainer(){var e=document.createElementNS(svgNS,"svg");return e.setAttributeNS(null,"id",elementIds.modalOverlay),Apxor.isFlutter()&&(e.style.pointerEvents="none",e.style.position="absolute"),e}function _createMaskContainer(){var e=document.createElementNS(svgNS,"mask");return setAttributes(e,{height:"100%",id:elementIds.modalOverlayMask,width:"100%",x:"0",y:"0"}),e}function _createMaskRect(){var e=document.createElementNS(svgNS,"rect");return setAttributes(e,{fill:"#FFFFFF",height:"100%",id:elementIds.modalOverlayMaskRect,width:"100%",x:"0",y:"0"}),e}function _createMaskOpening(e){var t;return"rectangle"===e.shape?setAttributes(t=document.createElementNS(svgNS,"rect"),{fill:"#000000",id:elementIds.modalOverlayMaskOpening,rx:e.cornerRadius,ry:e.cornerRadius}):"circle"===e.shape&&setAttributes(t=document.createElementNS(svgNS,"circle"),{fill:"#000000",id:elementIds.modalOverlayMaskOpening}),t}function _createMaskOpeningCoachmark(e){var t=document.createElementNS(svgNS,"rect");return setAttributes(t,!0===e?{fill:"#000000",id:elementIds.modalOverlayMaskOpening,rx:"50%",ry:"50%"}:{fill:"#000000",id:elementIds.modalOverlayMaskOpening}),t}function _createMaskOpeningBorder(e){var t;return"rectangle"===e.shape?setAttributes(t=document.createElementNS(svgNS,"rect"),{fill:"none",stroke:e.border.color,"stroke-width":"".concat(e.border.width),"stroke-opacity":e.border.opacity,rx:e.cornerRadius,ry:e.cornerRadius}):"circle"===e.shape&&setAttributes(t=document.createElementNS(svgNS,"circle"),{fill:"none",stroke:e.border.color,"stroke-width":"".concat(e.border.width),"stroke-opacity":e.border.opacity}),t}function _createMaskConsumer(){var e=document.createElementNS(svgNS,"rect");return setAttributes(e,{height:"100%",width:"100%",x:"0",y:"0"}),e.setAttribute("mask","url(#".concat(elementIds.modalOverlayMask,")")),e}function createSVGDivMask(e){var t=e.getBoundingClientRect(),n=t.width,i=t.height,o=t.left,a=t.top,r=document.createElementNS("http://www.w3.org/2000/svg","svg");r.setAttribute("width",document.scrollingElement.scrollWidth),r.setAttribute("height",document.scrollingElement.scrollHeight),r.setAttribute("id","maskforflutter"),r.style.position="absolute",r.style.opacity="0",r.setAttribute("pointer-events","none");var s=document.createElementNS("http://www.w3.org/2000/svg","path");return s.setAttribute("d","m0 0 l".concat(document.scrollingElement.scrollWidth," 0 l0 ").concat(document.scrollingElement.scrollHeight," l-").concat(document.scrollingElement.scrollWidth," 0 l0 -").concat(document.scrollingElement.scrollHeight," l").concat(o," ").concat(a," l0 ").concat(i," l").concat(n," 0 l0 ").concat(-i," l").concat(-n," 0Z")),s.setAttribute("pointer-events","fill"),r.appendChild(s),r}function positionModalOpening(e,t,n,i){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0;if(e.getBoundingClientRect&&t instanceof SVGElement&&n instanceof SVGElement)if("rectangle"===i.shape){var a=e.getBoundingClientRect(),r=a.x,s=a.y,l=a.width,c=a.height,d=a.left,p=a.top;setAttributes(t,{x:(r||d)-o-i.offset.left,y:(s||p)-o-i.offset.top,width:l+o+i.offset.left+i.offset.right,height:c+o+i.offset.top+i.offset.bottom}),setAttributes(n,{x:(r||d)-o-i.offset.left,y:(s||p)-o-i.offset.top,width:l+o+i.offset.left+i.offset.right,height:c+o+i.offset.top+i.offset.bottom})}else if("circle"===i.shape){var u=e.getBoundingClientRect(),h=u.x,g=u.y,f=u.width,m=u.height,_=u.left,v=u.top;setAttributes(t,{cx:(h||_)+f/2,cy:(g||v)+m/2,r:Math.max(f,m)/2+i.offsetRadius}),setAttributes(n,{cx:(h||_)+f/2,cy:(g||v)+m/2,r:Math.max(f,m)/2+i.offsetRadius})}}function positionModalOpeningCoachmark(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;if(e.getBoundingClientRect&&t instanceof SVGElement){var i=e.getBoundingClientRect(),o=i.x,a=i.y,r=i.width,s=i.height,l=i.left,c=i.top;setAttributes(t,{x:(o||l)-n,y:(a||c)-n,width:r+2*n,height:s+2*n})}}var DEFAULT_PADDING$1=5,currentId=makeid(10);function getDocumentOffsetPosition(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=e.getBoundingClientRect(),i=0,o=0;t||(i=window.scrollX,o=window.scrollY);var a=n.left+i,r=n.top+o,s=n.right+i,l=n.bottom+o,c=isDefined$1(n.x)?n.x+i:a,d=isDefined$1(n.y)?n.y+o:r,p=n.width,u=n.height;return{left:a,top:r,right:s,bottom:l,x:c,y:d,width:p,height:u}}function createTitleDescriptionButtons(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],i=arguments.length>3?arguments[3]:void 0,o=arguments.length>4?arguments[4]:void 0,a=arguments.length>5?arguments[5]:void 0,r=arguments.length>6?arguments[6]:void 0,s=arguments.length>7?arguments[7]:void 0,l=arguments.length>8?arguments[8]:void 0,c=null;if(!t&&e?(c=createTextElement(e,currentId)).style.textAlign=(null==e?void 0:e.alignment)||"center":t&&e&&((c=document.createElement("div")).style.display="inline-flex",c.style.flexDirection="column",c.style.visibility="hidden",c.style.textAlign=(null==e?void 0:e.alignment)||"center",c.style.lineHeight="26px",c.style.letterSpacing="0.01em",c.appendChild(createTextElement(t,currentId)),c.appendChild(createTextElement(e,currentId))),n&&n.length>0){var d=document.createElement("footer");d.className="shepherd-footer",d.style.zIndex=99999,d.style.margin="8px",d.style.padding="0";var p=function(){s&&s()},u=generateButtons(n,{next:p,complete:p,cancel:p},a,r),h=u.buttons_array,g=u.buttons_css,f=document.createElement("style");f.innerHTML=getButtonsCSS(g,i,o),d.appendChild(f),h.forEach((function(e){var t=e.classes,n=e.text,i=e.action,o=document.createElement("button");o.className="shepherd-button "+t,o.innerHTML=n,o.onclick=function(){return i()},d.appendChild(o)}));var m=document.createElement("div");m.style.display="inline-flex",m.style.flexDirection="column",m.style.visibility="hidden",m.appendChild(c),m.appendChild(d),c=m}return c.style.position=l?"fixed":"absolute",document.body.appendChild(c),c}function addRippleStyles(e,t,n){return"\n<style>\n.ripple-animator {\n ".concat(Apxor.isFlutter()?"pointer-events:none;":"","\n position: relative;\n display: -webkit-box;\n display: flex;\n -webkit-box-orient: horizontal;\n -webkit-box-direction: normal;\n flex-direction: row;\n -webkit-box-pack: center;\n justify-content: center;\n -webkit-box-align: center;\n align-items: center;\n height: ").concat(n,"px !important;\n width: ").concat(t,"px !important;\n border-radius: ").concat("circle"===e?"100%":"0",";\n}\n.ripple-animator span {\n position: relative;\n font-size: 72px;\n top: 5px;left: -5px;\n}\n\n.ripple-animator:before,\n.ripple-animator:after {\n content: '';\n display: block;\n position: absolute;\n top: 0; \n right: 0; \n bottom: 0; \n left: 0;\n opacity:1;\n z-index:10;\n border: 0px solid white;\n border-radius: ").concat("circle"===e?"100%":"0%",";\n z-index: 99999;\n}\n\n.ripple-animator:before {\n animation: ripple 1s infinite ease-out;\n}\n\n@keyframes ripple{\n 0% { \n border: 0px solid white;\n transform: scale(0.8); \n }\n 100% { \n border: 20px solid white;\n transform: scale(1.5); \n opacity:0; \n }\n}\n</style>")}function createInnerCircle(e,t,n,i,o,a,r){var s=Math.sqrt(Math.pow(e,2)+Math.pow(t,2)),l=s,c=n-(s-e)/2,d=i-(s-t)/2;"circle"!=o&&(s=e,l=t,c=n,d=i);var p=document.createElement("div");return p.setAttribute("id",currentId+"-ripple-div"),a&&(p.innerHTML=addRippleStyles(o,s,l)),p.style.position=r?"fixed":"absolute",p.style.width="".concat(s,"px"),p.style.height="".concat(l,"px"),p.style.left="".concat(c,"px"),p.style.top="".concat(d,"px"),p.classList.add("ripple-animator"),p.style.borderRadius="".concat("circle"===o?"50%":"0"),p.style.visibility="hidden",Apxor.isFlutter()&&(p.style.pointerEvents="none"),document.body.appendChild(p),p}function getSVG(e,t){return'\n <svg\n style="position:absolute;"\n height="'.concat(document.scrollingElement.scrollHeight,'" \n width="').concat(document.scrollingElement.scrollWidth,'"\n class="apx-fade-in">\n <defs>\n <mask\n id="apx-mask"\n x="0"\n y="0"\n height="').concat(document.scrollingElement.scrollHeight,'" \n width="').concat(document.scrollingElement.scrollWidth,'">\n ').concat(e,"\n </mask>\n </defs>\n ").concat(t,"\n </svg>\n ")}function getCircleSVG(e){var t=e.bg_color,n=e.opacity,i=e.innerRadius,o=e.innerCenterX,a=e.innerCenterY,r=e.outerRadius,s=e.outerCircleCenterX,l=e.outerCircleCenterY;return getSVG('\n <rect\n x="'.concat(s-r,'"\n y="').concat(l-r<0?0:l-r,'"\n height="').concat(2*r,'"\n width="').concat(2*r,'"\n fill="#fff" />\n <circle\n cx="').concat(o,'"\n cy="').concat(a,'"\n r="').concat(i,'" />\n '),'\n <circle\n cx="'.concat(s,'" \n cy="').concat(l,'" \n r="').concat(r,'" \n fill="').concat(t,'" \n fill-opacity="').concat(n,'"\n mask="url(#apx-mask)" />\n '))}function getRectangleSVG(e){var t=e.bg_color,n=e.opacity,i=e.targetElementLeft,o=e.targetElementTop,a=e.targetElementWidth,r=e.targetElementHeight;return getSVG('\n <rect\n x="0" y="0"\n height="'.concat(document.scrollingElement.scrollHeight,'" \n width="').concat(document.scrollingElement.scrollWidth,'" \n fill="#fff"\n ').concat(Apxor.isFlutter()?'style="pointer-events:none"':"",'\n />\n <rect\n x="').concat(i,'" \n y="').concat(o,'" \n width="').concat(a,'" \n height="').concat(r,'"\n ').concat(Apxor.isFlutter()?'style="pointer-events:none"':""," />\n "),'\n <rect\n x="0" y="0"\n height="'.concat(document.scrollingElement.scrollHeight,'" \n width="').concat(document.scrollingElement.scrollWidth,'" \n mask="url(#apx-mask)"\n fill="').concat(t,'" \n fill-opacity="').concat(n,'" />\n '))}function createSVGDiv(e){var t=e.opacity,n=e.type,i=e.scroll_coachMark,o=e.element,a=document.createElement("div");a.setAttribute("id",currentId+"-svg"),a.style.position=i?"fixed":"absolute",a.style.left=0,a.style.top=0,a.style.zIndex=99998,a.style.width="100%",a.style.height="99%",Apxor.isFlutter()&&(a.style.pointerEvents="none");var r="";if(r="circle"===n?getCircleSVG(e):getRectangleSVG(e),a.innerHTML="\n <style>\n @keyframes apx-anim {\n from {\n opacity: 0;\n }\n \n to {\n opacity: ".concat(t,";\n }\n }\n .apx-fade-in {\n ").concat(Apxor.isFlutter()?"pointer-events:none;":"","\n animation: apx-anim 0.4s linear;\n }\n </style>\n ").concat(r),Apxor.isFlutter()){var s=createSVGDivMask(o);a.appendChild(s)}return document.body.appendChild(a),a}function showCoachmark(e,t,n,i,o){var a,r,s,l,c,d=e.target;(null===(a=e.title_config)||void 0===a?void 0:a.text)===DYNAMIC_TEXT&&(0===(null===(s=e.title_config.script)||void 0===s?void 0:s.t)?evaluateDynamicText(e.title_config):evaluateDynamicScript(e.title_config));(null===(r=e.text_config)||void 0===r?void 0:r.text)===DYNAMIC_TEXT&&(0===(null===(l=e.text_config.script)||void 0===l?void 0:l.t)?evaluateDynamicText(e.text_config):evaluateDynamicScript(e.text_config));if(c=Apxor.isFlutter()?createTargetView(getElementPositionFromFlutter(d.id)):getElementFromSelector(d.id,"",null==d?void 0:d.is_content_based,null==d?void 0:d.content)){if(isElementCovered(c))return void window.ApxorLogger.info("The tooltip is not visible because another element is overlapping the target element.");addStep(c,e,t,n,i,o)}else var p=e.find_interval,u=void 0===p?0:p,h=e.timeout,g=void 0===h?1e4:h,f=new Date,m=window.ApxorRTM,_=setInterval((function(){if(c=Apxor.isFlutter()?createTargetView(getElementPositionFromFlutter(d.id)):getElementFromSelector(d.id,"",null==d?void 0:d.is_content_based,null==d?void 0:d.content)){if(clearInterval(_),null!==m.currentAction&&void 0!==m.currentAction)return void window.ApxorLogger.error("An action is already being shown. Try after it gets dismissed");if(isElementCovered(c))return void window.ApxorLogger.info("The tooltip is not visible because another element is overlapping the target element.");addStep(c,e,t,n,i,o)}else{new Date-f>g&&(clearInterval(_),console.warn("Element with id:".concat(d.id," not found.")),m.currentAction=null)}}),u)}function addStep(e,t,n,i,o,a){var r=t.bg_color,s=t.scroll_coachMark,l=void 0!==s&&s,c=t.buttons_config,d=void 0===c?[]:c,p=t.button_position,u=t.button_direction,h=void 0===u?DIRECTION.HORIZONTAL:u,g=t.coach_mark_details,f=g.has_ripple,m=void 0!==f&&f,_=g.type,v=void 0===_?"circle":_,b=t.delay,y=t.dismiss_outside_touch,x=void 0!==y&&y,w=t.opacity,C=void 0===w?.8:w,E=t.position,k=void 0===E?"TOP":E,S=t.text_config,T=t.title_config,A=void 0===T?null:T,I=t.view_id,P=t.scroll_to_view,O=void 0===P||P,L=n.configId,N=n.configName,D=window.ApxorRTM,B=null;if(Apxor.isFlutter()&&e&&(B=addClickListenerForFlutterElement(e,(function(){fe()}))),!e)return null==Apxor||Apxor.logEvent("apx_nudge_not_shown",{apx_nudge_type:"campaign",apx_nudge_id:L,apx_nudge_name:N,apx_variant_code:ceWrapper.getInstance().getVariantCode(L),apx_failure_type:"error",apx_reason:"View not found"},!1,"apxor","campaign"),void console.warn("Element not found with id or path: ",I);if(currentId=makeid(10),O||isElementInViewport(e)){var M=!1,F=new MutationObserver((function(){document.body.contains(e)||G()})),$=new IntersectionObserver((function(){var t=isElementInViewport(e);!t&&M&&G(),t&&(M=!0)})),R=getDocumentOffsetPosition(e,l),H=R.left,V=void 0===H?0:H,q=R.top,U=void 0===q?0:q,j=R.width,z=void 0===j?0:j,W=R.height,Y=void 0===W?0:W,X=R.left<window.innerWidth/2;if(0!==Y&&0!==z){var G=function(){F.disconnect(),$.disconnect(),he.remove(),Q.parentNode.removeChild(Q),te.parentNode.removeChild(te),a&&a(),ge&&clearTimeout(ge),document.body.removeEventListener("click",B),Apxor.isFlutter()&&e.remove()};D.currentAction=G;var Q=createTitleDescriptionButtons(S,A,d,p,h,L,N,G,l),Z=Q.offsetWidth,K=Q.offsetHeight,J=0,ee=0;S&&S.margin_config&&(J=Number(S.margin_config.left)||0,ee=Number(S.margin_config.right)||0);var te=createInnerCircle(z,Y,V,U,v,m,l),ne=V+z/2,ie=U+Y/2,oe=Math.sqrt(Math.pow(z,2)+Math.pow(Y,2))/2,ae=oe+Math.max(Z,z)/2+2*DEFAULT_PADDING$1,re=-1,se=-1,le=-1,ce=-1,de=ie-oe,pe=ie+oe;switch(k){case"TOP":se=(le=ne-Z/2)<0?DEFAULT_PADDING$1:le,re="circle"===v?ie-oe-K-25:U-K-25,ce=pe-Math.abs(pe-re)/2;break;case"BOTTOM":case"RIGHT":case"LEFT":se=(le=ne-Z/2)<0?DEFAULT_PADDING$1:le,ce=de+((re="circle"===v?ie+oe+25:U+Y+25)+K-de)/2}if(-1!==se&&-1!==re&&-1!==ce){!X&&se+Z>window.innerWidth&&(se=window.innerWidth-Z-J-ee-10),Q.style.left="".concat(se,"px"),Q.style.top="".concat(re,"px");var ue=((le=Math.min(V,se))+Math.max(V+z,se+Z))/2;(ue=Math.min(ue,document.scrollingElement.scrollWidth))<0&&(ue=0),(ce=Math.min(ce,document.scrollingElement.scrollHeight))<0&&(ce=0);var he=createSVGDiv({bg_color:r,opacity:C,innerRadius:oe,innerCenterX:ne,innerCenterY:ie,outerRadius:ae,outerCircleCenterX:ue,outerCircleCenterY:ce,targetElementLeft:V,targetElementTop:U,targetElementWidth:z,targetElementHeight:Y,type:v,scroll_coachMark:l,element:e,dismiss_outside_touch:x,dismissCallback:fe});he.style.visibility="hidden",te.style.visibility="hidden",Q.style.visibility="hidden";var ge=null,fe=function(t){var i=!1,o=!1;void 0===t&&(o=!0);var a=e.getBoundingClientRect();void 0!==t&&t.clientX>=a.left&&t.clientX<=a.left+a.width&&t.clientY>=a.top&&t.clientY<=a.top+a.height&&(i=!0,D.logActionEvent("InlineTargetViewClicked",n.configId,n.configName,"coachmark")),(x||i||o)&&(i&&e.click&&e.click(),G())};i&&!0===i.auto_dismiss&&(ge=setTimeout((function(){return fe()}),b+i.duration)),he.style.visibility="visible",te.style.visibility="visible",Q.style.visibility="visible",Q.childElementCount>0&&(Q.children[0].style.visibility="visible"),x&&he.addEventListener("click",(function(){fe()})),te.addEventListener("click",fe),O&&("TOP"===k?window.scrollTo({top:ce-ae,behavior:"smooth"}):"BOTTOM"===k&&window.scrollTo({top:Math.min(document.scrollingElement.scrollHeight,ce+ae),behavior:"smooth"})),F.observe(document.body,{childList:!0,subtree:!0}),$.observe(e),o&&o()}else console.warn("Failed to identify the right place for text")}else console.warn("Can't show on an invisible element: ",I)}else console.warn("Element ",I," not in viewport. Can't show")}function showCoachmarkWithDelay(e,t,n,i,o){var a=window.ApxorRTM;if(null!==a.currentAction&&void 0!==a.currentAction){var r=t.configId,s=t.configName;return null==Apxor||Apxor.logEvent("apx_nudge_not_shown",{apx_nudge_type:"campaign",apx_nudge_id:r,apx_nudge_name:s,apx_variant_code:ceWrapper.getInstance().getVariantCode(r),apx_failure_type:"error",apx_reason:"An action is already being shown"},!1,"apxor","campaign"),void window.ApxorLogger.error("An action is already being shown. Try after it gets dismissed")}var l=t.configId;checkForNeverShow$1(l)&&(e&&e.delay<=0?showCoachmark(e,t,n,i,o):setTimeout((function(){if(null!==a.currentAction&&void 0!==a.currentAction){var r=t.configId,s=t.configName;return null==Apxor||Apxor.logEvent("apx_nudge_not_shown",{apx_nudge_type:"campaign",apx_nudge_id:r,apx_nudge_name:s,apx_variant_code:ceWrapper.getInstance().getVariantCode(r),apx_failure_type:"error",apx_reason:"An action is already being shown"},!1,"apxor","campaign"),void window.ApxorLogger.error("An action is already being shown. Try after it gets dismissed")}showCoachmark(e,t,n,i,o)}),e.delay))}var Border=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};_classCallCheck$1(this,e),this.radius=getNumberOrDefault(t.radius,0),this.color=getColorOrDefault(t.color,"#FFFFFF"),this.inactive_color=getColorOrDefault(t.inactive_color,"#FFFFFF"),this.width=getNumberOrDefault(t.width,0),this.style=getStringOrDefault(t.style,"solid")}return _createClass$1(e,null,[{key:"isEnabled",value:function(e){return!(isUndefined$2(e)||isNull$1(e)||isEmptyObject(e))}}]),e}(),DimBackground=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};_classCallCheck$1(this,e),this.opacity=getNumberOrDefault(t.opacity,.5),this.color=getColorOrDefault(t.color,"#FFF")}return _createClass$1(e,null,[{key:"isEnabled",value:function(e){return!(isUndefined$2(e)||isNull$1(e)||isEmptyObject(e))}}]),e}(),Direction=_createClass$1((function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};_classCallCheck$1(this,e),this.nudge=getStringOrDefault(convertTheDirectionCode(t.nudge),DIRECTION.VERTICAL),this.non_media=getStringOrDefault(convertTheDirectionCode(t.non_media),DIRECTION.VERTICAL),this.buttons=getStringOrDefault(convertTheDirectionCode(t.buttons),DIRECTION.HORIZONTAL)})),DismissActions=_createClass$1((function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};_classCallCheck$1(this,e),this.outside_touch=Boolean(t.outside_touch),this.target_touch=Boolean(t.target_touch)})),Padding=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};_classCallCheck$1(this,e),this.top=getNumberOrDefault(null==t?void 0:t.top,0),this.bottom=getNumberOrDefault(null==t?void 0:t.bottom,0),this.left=getNumberOrDefault(null==t?void 0:t.left,0),this.right=getNumberOrDefault(null==t?void 0:t.right,0)}return _createClass$1(e,null,[{key:"isEnabled",value:function(e){return!(isUndefined$2(e)||isNull$1(e)||isEmptyObject(e))}}]),e}(),Margin=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};_classCallCheck$1(this,e),this.top=getNumberOrDefault(null==t?void 0:t.top,0),this.bottom=getNumberOrDefault(null==t?void 0:t.bottom,0),this.left=getNumberOrDefault(null==t?void 0:t.left,0),this.right=getNumberOrDefault(null==t?void 0:t.right,0)}return _createClass$1(e,null,[{key:"isEnabled",value:function(e){return!(isUndefined$2(e)||isNull$1(e)||isEmptyObject(e))}}]),e}(),Font=_createClass$1((function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};_classCallCheck$1(this,e),"unknown format"===getFontFormatFromCustomFontURL(t.family)?this.family=getStringOrDefault(t.family,"sans-serif").toLowerCase():this.family=getStringOrDefault(t.family,"sans-serif"),this.size=getNumberOrDefault(t.size,"14"),this.style=getStringOrDefault(t.style,"bold").toLowerCase(),this.weight=t.weight})),Icon=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};_classCallCheck$1(this,e),this.position=getStringOrDefault(convertThePositionCode(null==t?void 0:t.position),"left"),this.path=getStringOrDefault(t.path,""),this.width=getNumberOrDefault(t.width,48),this.height=getNumberOrDefault(t.height,48),this.enable_margin=null==t?void 0:t.enable_margin,this.margin=new Margin(t.margin),this.enable_padding=null==t?void 0:t.enable_padding,this.padding=new Padding(t.padding),this.enable_border=null==t?void 0:t.enable_border,this.border=new Border(t.border),this.alignment=getStringOrDefault(t.alignment,CENTER)}return _createClass$1(e,null,[{key:"isEnabled",value:function(e){return!(isUndefined$2(e)||isNull$1(e)||isEmptyObject(e))}}]),e}(),Text=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};_classCallCheck$1(this,e),this.background_color=getColorOrDefault(null==t?void 0:t.background_color,"#FFF"),this.alignment=getStringOrDefault(t.alignment,"center").toLowerCase(),this.color=getColorOrDefault(t.color,"#FFF").toLowerCase(),this.font=new Font(t.font),this.text=getStringOrDefault(t.text,""),this.localized_messages=t.localized_messages,this.enable_margin=t.enable_margin,this.margin=new Margin(t.margin),this.enable_padding=t.enable_padding,this.padding=new Padding(t.padding),this.enable_icon=t.enable_icon,this.icon=new Icon(t.icon),this.link_config=t.link_config,this.is_dyn=null==t?void 0:t.is_dyn,this.is_dynamic_text=t.is_dynamic_text,this.is_dynamic_script=t.is_dynamic_script,this.script=t.script,this.segments=t.segments,this.quote=t.quote}return _createClass$1(e,null,[{key:"isEnabled",value:function(e){return!(isUndefined$2(e)||isNull$1(e)||isEmptyObject(e))}}]),e}(),Description=function(e){_inherits$1(n,e);var t=_createSuper(n);function n(){var e,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return _classCallCheck$1(this,n),(e=t.call(this,i)).is_title=!1,e.is_description=!0,e}return _createClass$1(n)}(Text),Title=function(e){_inherits$1(n,e);var t=_createSuper(n);function n(){var e,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return _classCallCheck$1(this,n),(e=t.call(this,i)).is_title=!0,e.is_description=!1,e}return _createClass$1(n)}(Text),BackgroundImage=_createClass$1((function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};_classCallCheck$1(this,e),this.mask_opacity=getNumberOrDefault(t.mask_opacity,.25),this.mask_color=getColorOrDefault(t.mask_color,"#000000")})),Image=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};_classCallCheck$1(this,e),this.path=getStringOrDefault(t.path,""),this.width=getNumberOrDefault(t.width,360),this.height=getNumberOrDefault(t.height,360),this.enable_background_image=t.enable_background_image,this.background_image&&(this.background_image=new BackgroundImage(t.background_image)),this.enable_border=t.enable_border,this.enable_border&&(this.border=new Border(t.border))}return _createClass$1(e,null,[{key:"isEnabled",value:function(e){return!(isUndefined$2(e)||isNull$1(e)||isEmptyObject(e))}}]),e}(),Gradient=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};_classCallCheck$1(this,e),this.direction=getStringOrDefault(t.direction,"to right"),this.colors=getArrayOrDefault(t.colors,["#FFF","000"])}return _createClass$1(e,null,[{key:"isEnabled",value:function(e){return!(isUndefined$2(e)||isNull$1(e)||isEmptyObject(e))}}]),e}(),NumberedStepper=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};_classCallCheck$1(this,e),this.style=getStringOrDefault(t.style,"number"),this.position=getStringOrDefault(t.position,"bottom-left"),this.font=new Font(t.font),this.color=getColorOrDefault(t.color,"#FFF")}return _createClass$1(e,null,[{key:"isEnabled",value:function(e){return!(isUndefined$2(e)||isNull$1(e)||isEmptyObject(e))}}]),e}(),Pagination=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};_classCallCheck$1(this,e),this.style=getStringOrDefault(t.style,"number"),this.position=getStringOrDefault(t.position,"bottom-left"),this.font=new Font(t.font),this.color=getColorOrDefault(t.color,"#FFF")}return _createClass$1(e,null,[{key:"isEnabled",value:function(e){return!(isUndefined$2(e)||isNull$1(e)||isEmptyObject(e))}}]),e}(),ProgressBar=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};_classCallCheck$1(this,e),this.position=getStringOrDefault(t.position,"top"),this.width=getNumberOrDefault(t.position,4),this.progress_color=getColorOrDefault(t.progress_color,"#000"),this.remaining_color=getColorOrDefault(t.remaining_color,"#FFFF")}return _createClass$1(e,null,[{key:"isEnabled",value:function(e){return!(isUndefined$2(e)||isNull$1(e)||isEmptyObject(e))}}]),e}(),Carousel=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};_classCallCheck$1(this,e),this.style=getStringOrDefault(t.style,"default"),this.spacebetween=this.position=getNumberOrDefault(t.space_between,4),this.active_radius=getNumberOrDefault(t.active_radius,4),this.inactive_radius=getNumberOrDefault(t.inactive_radius,2),this.active_color=getColorOrDefault(t.active_color,"#000000"),this.inactive_color=getColorOrDefault(t.inactive_color,"#FFF")}return _createClass$1(e,null,[{key:"isEnabled",value:function(e){return!(isUndefined$2(e)||isNull$1(e)||isEmptyObject(e))}}]),e}(),Stepper=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};_classCallCheck$1(this,e),this.index=getNumberOrDefault(t.index,1),this.length=getNumberOrDefault(t.length,1),this.enable_numbered=t.enable_numbered,this.enable_numbered&&(this.numbered=new NumberedStepper(t.numbered)),this.enable_pagination=t.enable_pagination,this.enable_pagination&&(this.pagination=new Pagination(t.pagination)),this.enable_carousel=t.enable_carousel,this.enable_carousel&&(this.carousel=new Carousel(t.carousel)),this.enable_progressbar=t.enable_progressbar,this.enable_progressbar&&(this.progressbar=new ProgressBar(t.progressbar)),this.type=null==t?void 0:t.type,this.pagination_text=new Text(null==t?void 0:t.pagination_text),this.enable_padding=null==t?void 0:t.enable_padding,this.enable_padding&&(this.padding=new Padding(t.padding)),this.enable_margin=null==t?void 0:t.enable_margin,this.enable_margin&&(this.margin=new Margin(t.margin))}return _createClass$1(e,null,[{key:"isEnabled",value:function(e){return!(isUndefined$2(e)||isNull$1(e)||isEmptyObject(e))}}]),e}(),Offset=_createClass$1((function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};_classCallCheck$1(this,e),this.skid=getNumberOrDefault(null==t?void 0:t.skid,0),this.distance=getNumberOrDefault(null==t?void 0:t.distance,0),this.x=getNumberOrDefault(null==t?void 0:t.x,0),this.y=getNumberOrDefault(null==t?void 0:t.y,0)})),Position=_createClass$1((function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};_classCallCheck$1(this,e),this.position=getStringOrDefault(convertThePositionCode(null==t?void 0:t.position),"top-left"),this.enable_offset=t.enable_offset,this.offset=new Offset(t.offset)})),CloseButton=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};_classCallCheck$1(this,e),this.color=getColorOrDefault(t.color,"#FFFFFF"),this.fill_color=getColorOrDefault(t.fill_color,"#FFFFFF"),this.type=getStringOrDefault(t.type,"normal"),this.path=t.path,this.height=getNumberOrDefault(t.height,24),this.width=getNumberOrDefault(t.width,24),this.offset_top=getNumberOrDefault(t.offset_top,8),this.offset_right=getNumberOrDefault(t.offset_right,8),this.action=getStringOrDefault(t.action,"dismiss"),this.shape=getStringOrDefault(t.shape,"circle"),null!=t&&t.position&&(this.position=new Position(t.position)),this.enable_margin=t.enable_margin,this.enable_margin&&(this.margin=new Margin(t.margin)),this.enable_padding=t.enable_padding,this.enable_padding&&(this.padding=new Padding(t.padding)),this.enable_border=t.enable_border,this.enable_border&&(this.border=new Border(t.border))}return _createClass$1(e,null,[{key:"isEnabled",value:function(e){return!(isUndefined$2(e)||isNull$1(e)||isEmptyObject(e))}}]),e}(),BackButton=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};_classCallCheck$1(this,e),this.path=t.path,this.type=getStringOrDefault(t.type,"normal"),this.color=getColorOrDefault(t.color,"#FFFFFF"),this.shape=getStringOrDefault(t.shape,"circle"),this.height=getNumberOrDefault(t.height,24),this.width=getNumberOrDefault(t.width,24),this.offset_top=getNumberOrDefault(t.offset_top,8),this.offset_left=getNumberOrDefault(t.offset_left,8),this.action=getStringOrDefault(null==t?void 0:t.action,"dismiss"),null!=t&&t.position&&(this.position=new Position(t.position)),this.enable_margin=t.enable_margin,this.enable_margin&&(this.margin=new Margin(t.margin)),this.enable_padding=t.enable_padding,this.enable_padding&&(this.padding=new Padding(t.padding)),this.enable_border=t.enable_border,this.enable_border&&(this.border=new Border(t.border))}return _createClass$1(e,null,[{key:"isEnabled",value:function(e){return!(isUndefined$2(e)||isNull$1(e)||isEmptyObject(e))}}]),e}(),Header=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};_classCallCheck$1(this,e),this.background_color=null==t?void 0:t.background_color,this.enable_stepper=t.enable_stepper,this.enable_stepper&&(this.stepper=new Stepper(t.stepper)),this.enable_close_button=t.enable_close_button,this.enable_close_button&&(this.closebutton=new CloseButton(t.close_button)),this.enable_back_button=t.enable_back_button,this.enable_back_button&&(this.backbutton=new BackButton(t.back_button)),this.enable_title=t.enable_title,this.enable_title&&(this.title=new Title(t.title)),this.enable_description=t.enable_description,this.enable_description&&(this.description=new Description(t.description)),this.enable_image=t.enable_image,this.enable_image&&(this.image=new Image(t.image)),this.enable_margin=t.enable_margin,this.enable_margin&&(this.margin=new Margin(t.margin)),this.enable_padding=t.enable_padding,this.enable_padding&&(this.padding=new Padding(t.padding)),this.enable_border=t.enable_border,this.enable_border&&(this.border=new Border(t.border)),this.enable_gradient=t.enable_gradient,this.enable_gradient&&(this.gradient=new Gradient(t.gradient))}return _createClass$1(e,null,[{key:"isEnabled",value:function(e){return!(isUndefined$2(e)||isNull$1(e)||isEmptyObject(e))}}]),e}(),SuccessMessage=_createClass$1((function e(t){_classCallCheck$1(this,e),this.background_color=getColorOrDefault(t.background_color,"#FFFFFF"),this.duration=1e3*getNumberOrDefault(t.duration,3),this.width=getNumberOrDefault(t.width,50),this.enable_icon=t.enable_icon,this.enable_icon&&(this.icon=new Icon(t.icon)),this.enable_title=t.enable_title,this.enable_title&&(this.title=new Title(t.title)),this.enable_description=t.enable_description,this.enable_description&&(this.description=new Description(t.description)),this.enable_gradient=t.enable_gradient,this.enable_gradient&&(this.gradient=new Gradient(t.gradient)),this.enable_border=t.enable_border,this.enable_border&&(this.border=new Border(t.border)),this.enable_margin=t.enable_margin,this.enable_margin&&(this.margin=new Margin(t.margin)),this.position=new Position(t.position)})),Labelelement=_createClass$1((function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};_classCallCheck$1(this,e),this.position=t.position,this.text=new Text(t.text)})),Labels=_createClass$1((function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};_classCallCheck$1(this,e),this.first_rating=new Labelelement(t.first_rating),this.last_rating=new Labelelement(t.last_rating)})),Question$1=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};_classCallCheck$1(this,e),this.id=null==t?void 0:t.id,this.paths=null==t?void 0:t.paths,this.paths_v2=null==t?void 0:t.paths_v2,this.enable_title=t.enable_title,this.enable_title&&(this.title=new Title(t.title)),this.enable_description=t.enable_description,this.enable_description&&(this.description=new Description(t.description)),this.enable_choice_prompt=t.enable_choice_prompt,this.enable_choice_prompt&&(this.choice_prompt=new Description(t.choice_prompt)),this.enable_icon=null==t?void 0:t.enable_icon,this.enable_icon&&(this.icon=new Icon(t.icon)),this.enable_margin=null==t?void 0:t.enable_margin,this.enable_margin&&(this.margin=new Margin(t.margin)),this.enable_padding=null==t?void 0:t.enable_padding,this.enable_padding&&(this.padding=new Padding(t.padding))}return _createClass$1(e,null,[{key:"isEnabled",value:function(e){return!(isUndefined$2(e)||isNull$1(e)||isEmptyObject(e))}}]),e}(),Suggestion=_createClass$1((function e(t){_classCallCheck$1(this,e),this.bg_color_active=t.bg_color_active,this.bg_color_inactive=t.bg_color_inactive,this.color_active=t.color_active,this.color_inactive=t.color_inactive,this.font=new Font(t.font),this.text=t.text,this.enable_padding=t.enable_padding,this.enable_padding&&(this.padding=new Padding(t.padding)),this.enable_margin=t.enable_margin,this.enable_margin&&(this.margin=new Margin(t.margin)),this.enable_border=t.enable_border,this.enable_border&&(this.border=new Border(t.border))})),QandS=function(){function e(t){_classCallCheck$1(this,e),this.start=t.start,this.end=t.end,this.enable_question=t.enable_question,this.enable_question&&(this.question=new Question$1(t.question)),this.enable_suggestion=t.enable_suggestion,this.enable_suggestion&&(this.suggestion=new Suggestion(t.suggestion)),this.enable_input_text=t.enable_input_text,this.enable_input_text&&(this.qandsInputAnswer="")}return _createClass$1(e,null,[{key:"isEnabled",value:function(e){return!(isUndefined$2(e)||isNull$1(e)||isEmptyObject(e))}}]),e}(),Shadow=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};_classCallCheck$1(this,e),this.color=getColorOrDefault(t.color,"#FFF"),this.offset_x=getNumberOrDefault(t.offset_x,0),this.offset_y=getNumberOrDefault(t.offset_y,0),this.blur_radius=getNumberOrDefault(t.blur_radius,0),this.spread_radius=getNumberOrDefault(t.spread_radius,0)}return _createClass$1(e,null,[{key:"isEnabled",value:function(e){return!(isUndefined$2(e)||isNull$1(e)||isEmptyObject(e))}}]),e}(),RatingButtons=_createClass$1((function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(_classCallCheck$1(this,e),this.type=t.type,this.start=t.start,this.end=t.end,this.start_from_index=0,0!==this.start&&(this.start_from_index=1),this.prev_selected_button=-1,this.selected_rating=[],this.start<this.end)for(var n=this.start;n<=this.end;n++)this.selected_rating.push(-1);else for(var i=this.end;i>=this.start;i--)this.selected_rating.push(-1);if(this.width=t.width,this.height=t.height,this.split_line=t.split_line,this.enable_fade=t.enable_fade||!1,this.enable_shadow=t.enable_shadow||!1,this.enable_shadow&&(this.shadow=new Shadow(t.shadow)),this.bg_color_active=getColorOrDefault(t.bg_color_active,"#FFF"),this.bg_color_inactive=getColorOrDefault(t.bg_color_inactive,"#FFF"),this.color_active=getColorOrDefault(t.color_active,"#FFF"),this.color_inactive=getColorOrDefault(t.color_inactive,"#FFF"),this.font=new Font(t.font),this.enable_box_model=t.enable_box_model||!1,this.enable_box_model&&(this.box_model=t.box_model),this.enable_colors=t.enable_colors,this.buttons=[],null!=t&&t.buttons&&0!==t.buttons.length)this.length=t.buttons.length,this.buttons=t.buttons;else{if(this.start>this.end){var o=[this.end,this.start];this.start=o[0],this.end=o[1]}for(var a=this.start;a<=this.end;a++){var r={};r.value=a,this.buttons.push(r)}}this.enable_border=t.enable_border,this.enable_border&&(this.border=t.border),this.enable_padding=t.enable_padding,this.enable_padding&&(this.padding=t.padding),this.enable_margin=t.enable_margin,this.enable_margin&&(this.margin=t.margin),this.prevSelectedRadioButton=-1,this.SelectedRadioButton=-1})),Reaction=_createClass$1((function e(t){_classCallCheck$1(this,e),this.start=t.start,this.end=t.end,this.enable_text=t.enable_text,this.enable_text&&(this.text=new Text(t.text)),this.text_position=t.text_position,this.enable_image=t.enable_image,this.enable_image&&(this.image=t.image)})),Rating=_createClass$1((function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(_classCallCheck$1(this,e),this.reactions=[],this.reaction_paths={},this.enable_reaction=!1,this.prevReactionIndex=-1,this.currReactionIndex=-1,null!=t&&t.reactions&&0!==t.reactions.length)for(var n=0;n<t.reactions.length;n++){this.enable_reaction=!0;for(var i=[],o=new Reaction(t.reactions[n]),a=o.start;a<=o.end;a++)i.push(parseInt(a));this.reaction_paths[n]=i,this.reactions.push(o)}this.ratingbuttons=new RatingButtons(t.buttons),this.enable_labels=t.enable_labels,this.enable_labels&&(this.ratingLabels=new Labels(t.labels)),this.QandSArray=[],this.qandsPaths={},this.enable_qands=!1,this.prevQandSArrayIndex=-1,this.stateOfQandS=[];for(var r=0;r<this.ratingbuttons.length;r++)this.stateOfQandS.push({suggestion:[],input_field:""});if(null!=t&&t.q_and_s&&0!==t.q_and_s.length)for(var s=0;s<t.q_and_s.length;s++){var l=new QandS(t.q_and_s[s]);this.enable_qands=!0;for(var c=[],d=l.start;d<=l.end;d++)c.push(parseInt(d));this.qandsPaths[s]=c,this.QandSArray.push(l)}})),List=function(){function e(t){_classCallCheck$1(this,e),this.id=t.id,this.value=t.value,this.is_other=t.is_other,this.next_question_id=t.next_question_id,this.is_selected=!1,this.other_answer="",this.d_type=getStringOrDefault(t.d_type,""),this.is_dyn=getStringOrDefault(t.is_dyn,!1),this.script=t.script||{},this.text=this.value}return _createClass$1(e,null,[{key:"isEnabled",value:function(e){return!(isUndefined$2(e)||isNull$1(e)||isEmptyObject(e))}}]),e}(),Choices=function(){function e(t){_classCallCheck$1(this,e),this.randomize_choices=null==t?void 0:t.randomize_choices,this.min_choices_enabled=null==t?void 0:t.min_choices_enabled,this.max_choices_enabled=null==t?void 0:t.max_choices_enabled,this.max_choices=null==t?void 0:t.max_choices,this.min_choices=null==t?void 0:t.min_choices,this.color_active=null==t?void 0:t.color_active,this.color_inactive=null==t?void 0:t.color_inactive,this.color_disable=null==t?void 0:t.color_disable,this.radio_color_active=null==t?void 0:t.radio_color_active,this.radio_color_inactive=null==t?void 0:t.radio_color_inactive,null!=t&&t.bg_type&&"normal"===t.bg_type?(this.choice_border_active=null==t?void 0:t.bg_color_active,this.choice_border_inactive=null==t?void 0:t.bg_color_inactive,this.bg_color_active="transparent",this.bg_color_inactive="transparent",this.bg_color_disable="transparent"):(this.bg_color_active=null==t?void 0:t.bg_color_active,this.bg_color_inactive=null==t?void 0:t.bg_color_inactive,this.bg_color_disable=null==t?void 0:t.bg_color_disable),this.before_parse_choices=t.list,this.list=[];for(var n=0;n<this.before_parse_choices.length;n++){var i=new List(this.before_parse_choices[n]);this.list.push(i)}this.enable_border=t.enable_border,this.enable_border&&(this.border=new Border(t.border)),this.randomize_choices&&(this.list=getShuffledArr(this.list))}return _createClass$1(e,null,[{key:"isEnabled",value:function(e){return!(isUndefined$2(e)||isNull$1(e)||isEmptyObject(e))}}]),e}(),InputText=_createClass$1((function e(t){_classCallCheck$1(this,e),this.id=null==t?void 0:t.id,this.background_color=getColorOrDefault(t.background_color,"#FFFFFF"),this.max_characters=t.max_characters||"150",this.enable_placeholder=t.enable_placeholder,this.enable_placeholder&&(this.placeholder=t.placeholder||{}),this.enable_border=t.enable_border,this.enable_border&&(this.border=t.border),this.text_color=t.text_color})),Scroll=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};_classCallCheck$1(this,e),this.height=getNumberOrDefault(t.height,400),this.enable_border=t.enable_border,this.border=new Border(t.border)}return _createClass$1(e,null,[{key:"isEnabled",value:function(e){return!(isUndefined$2(e)||isNull$1(e)||isEmptyObject(e))}}]),e}(),Answer=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};_classCallCheck$1(this,e),this.answer_mode=null==t?void 0:t.answer_mode,this.is_text_mandatory=null==t?void 0:t.is_text_mandatory,this.enable_scroll=t.enable_scroll||!1,this.enable_scroll&&(this.scroll=new Scroll(t.scroll)),this.background_color=getColorOrDefault(t.background_color),null!=t&&t.choices&&0!==Object.keys(t.choices).length&&(this.choices=new Choices(t.choices)),this.input_text={},null!=t&&t.input_text&&0!==Object.keys(t.input_text).length&&(this.input_text=new InputText(t.input_text),this.text_answer="",this.is_answered=!1),null!=t&&t.rating&&0!==Object.keys(t.rating).length&&(this.rating=new Rating(t.rating)),null!=t&&t.font&&(this.font=new Font(t.font)),this.enable_border=t.enable_border,this.enable_border&&(this.border=new Border(t.border)),this.enable_margin=t.enable_margin,this.enable_margin&&(this.margin=new Margin(t.margin)),this.enable_padding=t.enable_padding,this.enable_padding&&(this.padding=new Padding(t.padding))}return _createClass$1(e,null,[{key:"isEnabled",value:function(e){return!(isUndefined$2(e)||isNull$1(e)||isEmptyObject(e))}}]),e}(),Action=_createClass$1((function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};_classCallCheck$1(this,e),this.type=getStringOrDefault(t.type,"dismiss").toLowerCase(),this.url=getStringOrDefault(t.url,""),this.is_external=Boolean(t.is_external),this.is_ir=Boolean(t.is_ir),this.callback=t.callback||function(){},this.is_within=Boolean(t.is_within)})),Button=_createClass$1((function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};_classCallCheck$1(this,e),null!=t&&t.position&&(this.position=convertThePositionCode(new Position(t.position))),void 0===(null==t?void 0:t.slot)?this.slot=getSlotNumberByPosition(this.position.position):this.slot=getNumberOrDefault(t.slot,0),"wide"===(null==t?void 0:t.type)&&(this.slot=getSlotNumberByPosition("center")),this.type=getStringOrDefault(t.type,"button"),this.sub_type=getStringOrDefault(t.sub_type,""),this.fill_color=getColorOrDefault(t.fill_color,"#FFF"),this.color=getColorOrDefault(t.color||t.active_color,"#FFF"),this.active_color=getColorOrDefault(t.active_color,"#FFF"),this.inactive_color=getColorOrDefault(t.inactive_color,"#FFF"),this.enable_action=t.enable_action,this.action=new Action(t.action),this.enable_margin=t.enable_margin,this.margin=new Margin(t.margin),this.enable_padding=t.enable_padding,this.padding=new Padding(t.padding),this.enable_border=t.enable_border,this.border=new Border(t.border),this.enable_text=t.enable_text,this.text=new Text(t.text),this.enable_gradient=t.enable_gradient,this.gradient={},this.enable_gradient&&(this.gradient=new Gradient(t.gradient))})),BottomButton=function(e){_inherits$1(n,e);var t=_createSuper(n);function n(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return _classCallCheck$1(this,n),t.call(this,e)}return _createClass$1(n)}(Button),CenterButton=function(e){_inherits$1(n,e);var t=_createSuper(n);function n(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return _classCallCheck$1(this,n),t.call(this,e)}return _createClass$1(n)}(Button),FooterButton=function(e){_inherits$1(n,e);var t=_createSuper(n);function n(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return _classCallCheck$1(this,n),t.call(this,e)}return _createClass$1(n)}(Button),TopButton=function(e){_inherits$1(n,e);var t=_createSuper(n);function n(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return _classCallCheck$1(this,n),t.call(this,e)}return _createClass$1(n)}(Button),Buttons=_createClass$1((function e(){var t=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};_classCallCheck$1(this,e),this.background_color=n.background_color,this.enable_top=n.enable_top,this.enable_center=n.enable_center,this.enable_bottom=n.enable_bottom,this.bottom=[],this.center=[],this.top=[],this.buttons=[];var i=getArrayOrDefault(n.bottom,[]);i.forEach((function(e){t.bottom.push(new BottomButton(e))}));var o=getArrayOrDefault(n.center,[]);o.forEach((function(e){t.center.push(new CenterButton(e))}));var a=getArrayOrDefault(n.top,[]);a.forEach((function(e){t.top.push(new TopButton(e))}));var r=getArrayOrDefault(n.buttons,[]);r.forEach((function(e){t.buttons.push(new FooterButton(e))})),this.enable_margin=n.enable_margin,this.enable_margin&&(this.margin=new Margin(n.margin)),this.enable_padding=n.enable_padding,this.enable_padding&&(this.padding=new Padding(n.padding)),this.enable_border=n.enable_border,this.enable_border&&(this.border=new Border(n.border)),this.enable_gradient=n.enable_gradient,this.enable_gradient&&(this.gradient=new Gradient(n.gradient))})),QandA=_createClass$1((function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};_classCallCheck$1(this,e),this.q_and_a=[],this.questionIDs=[];for(var n=0;n<t.length;n++){var i=new Question$1(t[n].question);null!=i&&i.id&&this.questionIDs.push(i.id);var o=new Answer(t[n].answer),a=t[n].enable_footer,r=new Buttons(t[n].footer),s=getBooleanOrDefault(t[n].is_required,!1);this.q_and_a.push({question:i,answer:o,footer:r,is_required:s,enable_footer:a})}})),Survey=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};_classCallCheck$1(this,e),this.background_color=null==t?void 0:t.background_color,this.is_response_based_survey=null==t?void 0:t.is_response_based_survey,this.q_and_a=new QandA(null==t?void 0:t.q_and_a),this.enable_margin=t.enable_margin,this.enable_margin&&(this.margin=new Margin(t.margin)),this.enable_padding=t.enable_padding,this.enable_padding&&(this.padding=new Padding(t.padding)),this.enable_border=t.enable_border,this.enable_border&&(this.border=new Border(t.border)),this.enable_gradient=t.enable_gradient,this.enable_gradient&&(this.gradient=new Gradient(t.gradient))}return _createClass$1(e,null,[{key:"isEnabled",value:function(e){return!(isUndefined$2(e)||isNull$1(e)||isEmptyObject(e))}}]),e}(),SurveyRequestButton=function(e){_inherits$1(n,e);var t=_createSuper(n);function n(){var e,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return _classCallCheck$1(this,n),(e=t.call(this,i)).slot=void 0,e.enable_icon=i.enable_icon,e.enable_icon&&(e.icon=new Icon(i.icon)),e}return _createClass$1(n)}(BottomButton),Surveyrequest=_createClass$1((function e(t){var n=this;_classCallCheck$1(this,e),this.background_color=getColorOrDefault(t.background_color,"#FFFFFF"),this.width=getNumberOrDefault(t.width,50),this.position=new Position(t.position),this.enable_border=t.enable_border,this.border=new Border(t.border),this.enable_margin=t.enable_margin,this.enable_margin&&(this.margin=new Margin(t.margin)),this.enable_close_button=t.enable_close_button||!1,this.enable_close_button&&(this.closebutton=new CloseButton(t.close_button)),this.enable_icon=t.enable_icon,this.enable_icon&&(this.icon=new Icon(t.icon)),this.enable_title=t.enable_title,this.enable_title&&(this.title=new Title(t.title)),this.enable_description=t.enable_description,this.enable_description&&(this.description=new Description(t.description)),this.buttons=[],this.buttons_position=getStringOrDefault(convertThePositionCodeToFLexBoxPosition(t.buttons_container.buttons_position),"flex-end"),this.buttons_direction=getStringOrDefault(convertTheDirectionCode(t.buttons_container.buttons_direction),DIRECTION.HORIZONTAL),this.enable_buttons_container_margin=t.buttons_container.enable_margin,this.enable_buttons_container_margin&&(this.buttons_container_margin=new Margin(t.buttons_container.margin)),getArrayOrDefault(t.buttons_container.buttons,[]).forEach((function(e){n.buttons.push(new SurveyRequestButton(e))}))})),Logger$8=window.ApxorLogger,NewSurveys=function(){function e(t,n,i,o,a,r,s){var l=this;if(_classCallCheck$1(this,e),_defineProperty$1(this,"_getAnswerForQuestion",(function(e){var t;if(e>=l.QandAArray.length)return null;var n=l.QandAArray[e].question,i=l.QandAArray[e].answer;if(!n)return null;n.id;var o=i.answer_mode,a=void 0===o?"":o,r=i.choices,s=void 0===r?{}:r,c=i.input_text,d=void 0===c?{}:c,p=i.text_answer,u=void 0===p?{}:p,h=i.is_answered,g=void 0!==h&&h,f=null==s?void 0:s.list,m={answers:[],answerTexts:[],others:[]};switch(a){case"single_choice":case"multi_choice":f.forEach((function(e){e.is_selected&&(m.answers.push(e.id),m.answerTexts.push(e.value),e.is_other&&(m.isOtherChoiceSelected=!0),e.is_other&&null!==e.other_answer&&""!==e.other_answer.trim()&&m.others.push(e.other_answer))}));break;case"text":g&&""!==u&&""!==u.trim()&&null!==d&&m.answerTexts.push(u);break;case"rating":if(null!=l&&null!==(t=l.ratingButtons)&&void 0!==t&&t.selected_rating.includes(1)){var _,v,b,y,x;m.answers.push(parseInt(null===(_=l.ratingButtons)||void 0===_?void 0:_.buttons[l.ratingButtons.selected_rating.indexOf(1)].value)),m.answerTexts.push(parseInt(null===(v=l.ratingButtons)||void 0===v?void 0:v.buttons[l.ratingButtons.selected_rating.indexOf(1)].value));var w,C,E,k,S=l.ratingButtons.selected_rating.indexOf(1),T=l.getcurrentQandSArrayIndexFromQandSPaths(l.rating,parseInt(l.ratingButtons.start_from_index+S));if(null!==(b=l.QandSArray[T])&&void 0!==b&&b.enable_question)m.apx_nps_advanced_question=null!==(w=null===(C=l.QandSArray[T])||void 0===C||null===(C=C.question)||void 0===C||null===(C=C.title)||void 0===C?void 0:C.text)&&void 0!==w?w:"";if(null!==(y=l.QandSArray[T])&&void 0!==y&&y.enable_input_text)m.apx_nps_advanced_free_text=null!==(E=null===(k=l.rating.stateOfQandS[S])||void 0===k?void 0:k.input_field)&&void 0!==E?E:"";null!==(x=l.QandSArray[T])&&void 0!==x&&x.enable_suggestion&&(m.apx_nps_advanced_choice=l.rating.stateOfQandS[S].suggestion.map((function(e){return l.QandSArray[T].suggestion.text[e]})))}}return m})),_defineProperty$1(this,"_submitSurveyResponses",(function(e){e&&l.enable_success_message&&l._enableSuccessMessageContainer();var t={survey_id:l.configId,name:l.name,responses:[]};if(l.QandAArray.forEach((function(e,n){var i=l._getAnswerForQuestion(n),o=e.question;if(i){var a={question_id:o.id,answers_id:i.answers,answer_text:i.answerTexts};i.others.length>0&&(a.others=i.others),t.responses.push(a)}})),t.responses.length>0){var n=Math.pow(10,3);t.time_taken=Math.round((Date.now()-l.startTime)/1e3*n)/n;var i=Apxor.getController(),o=i.getFromStorage("_apx_cd",!0).session_info.launch_time;t.session_id=Apxor.getSessionId(),t.is_completed=e,t.app_version=i.getFromStorage("apx_ver",!1),t.device_uuid=Apxor.getClientId(),t.launch_time=o,t.user_attributes=i.getUserAttributes(),t.session_attributes=i.getSessionAttributes()}e&&setTimeout((function(){l._logSurveyAppEvent("apx_survey_completed",{apx_survey_id:l.configId,apx_survey_name:l.name,apx_survey_type:!0,apx_time_to_complete:Math.round((Date.now()-l.startTime)/1e3),campaign_type:"survey"})}),200)})),_defineProperty$1(this,"_sendReponseToServer",(function(e){var t=SURVEY_RESPONSE_URL.replace("<app_id>",Apxor.getSiteId());fetch(t,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})})),_defineProperty$1(this,"_logSurveyAppEvent",(function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=null===(t=window.ApxorRTM)||void 0===t?void 0:t.getCampaignMeta(l.configId),o=i._attr;Apxor.logEvent(e,_objectSpread2$1(_objectSpread2$1({apx_survey_id:l.configId,apx_survey_name:l.name},n),o),!1,"apxor","survey")})),_defineProperty$1(this,"_logSurveyQuestionEvent",(function(e){var t,n=l._getAnswerForQuestion(e),i=[];n.answerTexts.length>0&&n.answerTexts.forEach((function(e){i.push(e)}));var o={},a=l.QandAArray[e].question,r=l.QandAArray[e].answer;a.id;var s=r.answer_mode;r.choices,r.input_text,r.text_answer,r.is_answered,"single_choice"===s||"multi_choice"===s?(o.apx_choice=n.answerTexts,o.apx_free_text=n.others):"text"===s?(o.apx_choice="",o.apx_free_text=i):"rating"===s&&(o.apx_choice=n.answerTexts,o.apx_nps_advanced_question=n.apx_nps_advanced_question,o.apx_nps_advanced_choice=n.apx_nps_advanced_choice,o.apx_nps_advanced_free_text=n.apx_nps_advanced_free_text),l._logSurveyAppEvent("apx_survey_question_answered",_objectSpread2$1(_objectSpread2$1({apx_question_id:l.QandAArray[l.index].question.id,apx_question_name:null!==(t=l.QandAArray[l.index].question.title.text)&&void 0!==t?t:"",apx_question_type:l.QandAArray[l.index].answer.answer_mode,apx_question_position:l.index+1,apx_survey_id:l.configId,apx_survey_name:l.name,apx_survey_type:!0},o),{},{campaign_type:"survey"})),l.freeTextValue=""})),this.configId=t,this.name=n,this.uis=o,this.rtmInstance=a,this.showCallback=r,this.closeCallback=s,i){var c,d,p,u;if(this.delay=i.delay,this.width=i.width,this.height=i.height,this.background_color=i.background_color,this.cssPostFix="-".concat(t,"-").concat(n).replaceAll(" ","").replace(/[^\w\s]/gi,""),this.is_response_based_survey=i.is_response_based_survey,this.direction=new Direction(i.direction),this.position=new Position(i.position),this.enable_survey_request=i.enable_survey_request_latest,this.enable_survey_request&&(this.surveyrequest=new Surveyrequest(i.survey_request)),this.enable_dismiss_actions=i.enable_dismiss_actions,this.enable_dismiss_actions&&(this.dismiss_actions=new DismissActions(i.dismiss_actions)),this.enable_dimbackground=i.enable_dimbackground,this.enable_dimbackground&&(this.dimbackground=new DimBackground(i.dimbackground)),this.enable_padding=i.enable_padding,this.enable_padding&&(this.padding=new Padding(i.padding)),this.enable_margin=i.enable_margin,this.enable_margin&&(this.margin=new Margin(i.margin)),this.enable_border=i.enable_border,this.enable_border&&(this.border=new Border(i.border)),this.enable_success_message=i.enable_success_message_latest,this.enable_success_message&&(this.success_message=new SuccessMessage(i.success_message)),this.enable_progressbar=i.enable_progressbar,this.enable_progressbar&&(this.progressbar=new ProgressBar(i.progressbar)),this.enable_header=i.enable_header,this.enable_header&&(this.header=new Header(i.header)),this.header_close_icon=!1,this.enable_header&&(this.header_close_icon=i.header.enable_close_button),this.enable_close_icon=null==i||null===(c=i.survey)||void 0===c?void 0:c.enable_close_button,this.enable_close_icon)this.closeButton=null==i||null===(u=i.survey)||void 0===u?void 0:u.close_button;this.survey=new Survey(i.survey),this.QandAArray=null===(d=this.survey)||void 0===d||null===(d=d.q_and_a)||void 0===d?void 0:d.q_and_a,this.QandArrayLength=this.QandAArray.length,this.index=0,this.questionids=null===(p=this.survey)||void 0===p||null===(p=p.q_and_a)||void 0===p?void 0:p.questionIDs,this.visitedQuestion=[-1],this.overlayElement=null,this.surveylaunched=!1,this.freeTextValue="",this.bottomRatingDiv=null,this.ratingDiv=null,this.ceInstance=ceWrapper.getInstance(),this._setSurveyDimensions()}}return _createClass$1(e,[{key:"showNewSurvey",value:function(){try{(this.name===APX_PREVIEW_CAMPAIGN_NAME||this._canCreateSurvey())&&(this.createSurvey(),this.showCallback(),this.startTime=Date.now())}catch(e){this._resetRTMAction()}}},{key:"_canCreateSurvey",value:function(){return!(null!==this.rtmInstance.currentAction&&void 0!==this.rtmInstance.currentAction||this.rtmInstance.isShowingAction)||(null==Apxor||Apxor.logEvent("apx_nudge_not_shown",{apx_nudge_type:"survey",apx_nudge_id:this.configId,apx_nudge_name:this.name,apx_variant_code:this.ceInstance.getVariantCode(this.configId),apx_failure_type:"error",apx_reason:"An action is already being shown"},!1,"apxor","survey"),Logger$8.info("A survey is being shown,can not show another survey"),!1)}},{key:"_resetRTMAction",value:function(){this.closeCallback()}},{key:"createSurvey",value:function(){this.enable_survey_request?(this.overlayElement=document.createElement("div"),this.overlayElement.classList.add("apxor-survey-overlay".concat(this.cssPostFix)),this.enable_dimbackground&&(this.dimBackgroundElement=document.createElement("div"),this.dimBackgroundElement.classList.add("apxor-survey-dimbackground-overlay".concat(this.cssPostFix)),this.overlayElement.appendChild(this.dimBackgroundElement)),document.body.appendChild(this.overlayElement),this._setSurveyRequestStyles(),this._createSurveyRequestContent()):(this._setBackgroundOverlay(),this._setStyles(),this._setSurveyContent())}},{key:"_setSurveyDimensions",value:function(){var e=this.width/100;this.enable_header&&this.header.enable_image?this._setDimenstionFromResolution(this.header.image.width,this.header.image.height,e,!1):this.width="".concat(this.width,"%")}},{key:"_setDimenstionFromResolution",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:.5,i=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=getHeightWidthFromResolution({width:e,height:t},n,i);this.media_width="".concat(o.width,"px"),this.media_height="".concat(o.height,"px"),this.width="".concat(o.width,"px")}},{key:"_setBackgroundOverlay",value:function(){this.overlayElement=document.createElement("div"),this.overlayElement.classList.add("apxor-survey-overlay".concat(this.cssPostFix)),this.enable_dimbackground&&(this.dimBackgroundElement=document.createElement("div"),this.dimBackgroundElement.classList.add("apxor-survey-dimbackground-overlay".concat(this.cssPostFix)),this.overlayElement.appendChild(this.dimBackgroundElement)),document.body.appendChild(this.overlayElement)}},{key:"_setStyles",value:function(){var e=" \n ".concat(this._setBackgroundOverlaystyles(),"\n ").concat(this._getSurveyContainerStyles(),"\n ").concat(this._getHeaderContainerStyles(),"\n ").concat(this._getHeaderTopContainerStyles(),"\n ").concat(this._getHeaderTopPaginationContainerStyles(),"\n ").concat(this._getHeaderImageContainerStyles(),"\n ").concat(this._getProgressBarStyles(),"\n ").concat(this._getNumberedStepperStyles(),"\n ").concat(this._getBackButtonStyles(),"\n ").concat(this._getQandAcontainerStyles(),"\n ").concat(this._getSuccessIconStyles(),"\n ").concat(this._getNpsTopContainerStyles(),"\n ").concat(this._getRatingBlockStyles(),"\n ").concat(this.getNpsQandSContainerStyles(),"\n ").replaceAll("\n","").replace(/[\s]{2,999}/g,""),t=document.createElement("style");t.innerHTML=e,this.overlayElement.appendChild(t)}},{key:"_setBackgroundOverlaystyles",value:function(){var e="";return this.enable_dimbackground&&(e="\n background:".concat(this.dimbackground.color,";\n opacity:").concat(this.dimbackground.opacity,";\n ")),"\n .apxor-survey-overlay".concat(this.cssPostFix," {\n width:100%;\n height:100%;\n }\n .apxor-survey-dimbackground-overlay").concat(this.cssPostFix," {\n width:100%;\n height:100%;\n position:fixed;\n top:0;\n left:0;\n z-index:999;\n ").concat(e,"\n overflow: auto;\n }")}},{key:"_getSurveyContainerStyles",value:function(){var e=this.enable_border?this.border.width:0,t=e,n=e,i=e,o=e;this.enable_padding&&(t+=this.padding.top,n+=this.padding.left,i+=this.padding.right,o+=this.padding.bottom),this.enable_margin&&(t+=this.margin.top,n+=this.margin.left,i+=this.margin.right,o+=this.margin.bottom);var a="";switch(this.position.position){case"top-left":a="\n top:".concat(t,"px;\n left:").concat(n,"px;\n ");break;case"top-center":a="\n left:50%;\n top:".concat(t,"px;\n -webkit-transform: translate(-50%, ").concat(.1*t,"px);\n -moz-transform: translate(-50%, ").concat(t,"px);\n ");break;case"top-right":a="\n top:".concat(t,"px;\n right:").concat(i,"px;\n ");break;case"bottom-left":a="\n bottom:".concat(o,"px;\n left:").concat(n,"px;\n ");break;case"bottom-center":a="\n left:50%;\n bottom:".concat(o,"px;\n -webkit-transform: translate(-50%, ").concat(.1*o,"px);\n -moz-transform: translate(-50%, ").concat(o,"px);\n ");break;case"bottom-right":a="\n bottom:".concat(o,"px;\n right:").concat(i,"px;\n ");break;case"left":a="\n left:".concat(n,"px;\n top:50%;\n -webkit-transform: translate(").concat(.1*n,"px, -50%);\n -moz-transform: translate(").concat(n,"px, -50%);\n ");break;case"right":a="\n right:".concat(i,"px;\n top:50%;\n -webkit-transform: translate(").concat(.1*i,"px, -50%);\n -moz-transform: translate(").concat(i,"px, -50%);\n ");break;default:a="\n left:50%;\n top:50%;\n -webkit-transform: translate(-50%, -50%);\n -moz-transform: translate(-50%, -50%);\n "}var r="";this.enable_margin&&(r="\n margin:".concat(this.margin.top,"px ").concat(this.margin.right,"px ").concat(this.margin.bottom,"px ").concat(this.margin.left,"px;\n "));var s="";this.enable_padding&&(s="\n padding:".concat(this.padding.top,"px ").concat(this.padding.right,"px ").concat(this.padding.bottom,"px ").concat(this.padding.left,"px;\n "));var l="";return this.enable_border&&(l="\n border-radius: ".concat(this.border.radius,"px;\n border: ").concat(this.border.width,"px ").concat(this.border.style," ").concat(this.border.color,";\n ")),"\n .apxor-survey-container".concat(this.cssPostFix,"{\n width:").concat(this.width,";\n height:auto;\n max-height:").concat(this.height,"%;\n overflow:auto;\n display:flex;\n flex-direction:column;\n background:").concat(this.background_color,";\n position:fixed;\n z-index:999999;\n transition:all .5s cubic-bezier(.96,.23,.07,.8);\n ").concat(a,";\n ").concat(r,";\n ").concat(s,";\n ").concat(l,";\n }")}},{key:"_getHeaderContainerStyles",value:function(){var e,t="";if(this.header_close_icon&&(e=this.header.closebutton.height+this.header.closebutton.margin.bottom+this.header.closebutton.margin.top+2*this.header.border.width),this.enable_header){var n="";this.header.enable_margin&&(n="\n margin:".concat(this.header.margin.top,"px ").concat(this.header.margin.right,"px ").concat(this.header.margin.bottom,"px ").concat(this.header.margin.left,"px;\n "));var i="";this.header.enable_padding&&(i="\n padding:".concat(this.header.padding.top,"px ").concat(this.header.padding.right,"px ").concat(this.header.padding.bottom,"px ").concat(this.header.padding.left,"px;\n "));var o="";this.header.enable_border&&(o="\n border-radius: ".concat(this.header.border.radius,"px;\n border: ").concat(this.header.border.width,"px ").concat(this.header.border.style," ").concat(this.header.border.color,";\n "));var a="";this.header.enable_gradient&&this.header.enable_gradient&&(a="\n background-image:linear-gradient(".concat(this.header.gradient.direction,", ").concat(this.header.gradient.colors[0],", ").concat(this.header.gradient.colors[1],");\n "));var r="";if(this.header.enable_image){var s=this.header.image.path;this.header.image.enable_background_image&&(r="background-image:url('".concat(s,"');background-repeat:no-repeat;width:auto;background-size:cover;height:auto;"))}t="\n .apxor-header-container".concat(this.cssPostFix,"{\n display:flex;\n flex-direction: column;\n ").concat(this.header_close_icon?"min-height: ".concat(e,"px;"):"",";\n background:").concat(this.header.background_color,";\n ").concat(n,";\n ").concat(i,";\n ").concat(o,";\n ").concat(a,";\n ").concat(r,";\n }")}return t}},{key:"_getHeaderTopContainerStyles",value:function(){var e="";return this.enable_header&&(e="\n .apxor-survey-header-top-container".concat(this.cssPostFix,"{\n width:100%;\n height:auto;\n }")),e}},{key:"_getHeaderTopPaginationContainerStyles",value:function(){var e="";if(this.enable_header){var t,n=this.header.enable_title||this.header.enable_description||!this.header.enable_image||null!==(t=this.header)&&void 0!==t&&null!==(t=t.image)&&void 0!==t&&t.enable_background_image?"position:relative;":"position:absolute;";e="\n .apxor-survey-pagination-button".concat(this.cssPostFix,"{\n ").concat(n,"\n display:flex;\n justify-content:center;\n width:100%;\n height:auto;\n }")}return e}},{key:"_getHeaderImageContainerStyles",value:function(){var e="";return this.enable_header&&this.header.enable_image&&(e=this.header.image.enable_background_image?"\n .apxor-survey-header-image".concat(this.cssPostFix,"{\n background:url('").concat(this.header.image.path,"') no-repeat 50% 50%;\n box-shadow: inset ").concat(this.header.image.width,"px ").concat(this.header.image.height,"px 0px 0px ").concat(hexToRGB(this.header.image.background_image.mask_color,this.header.image.background_image.mask_opacity),",inset -").concat(this.header.image.width,"px -").concat(this.header.image.height,"px 0px 0px ").concat(hexToRGB(this.header.image.background_image.mask_color,this.header.image.background_image.mask_opacity),";\n background-size:").concat(this.media_width," ").concat(this.media_height,";\n }\n "):"\n .apxor-survey-header-image-div".concat(this.cssPostFix,"{\n display:flex;\n }\n .apxor-survey-header-image").concat(this.cssPostFix,"{\n height: ").concat(this.media_height,";\n width: ").concat(this.media_width,";\n }\n ")),e}},{key:"_getProgressBarStyles",value:function(){var e="";return this.enable_progressbar&&(e="\n .apxor-survey-progress-bar".concat(this.cssPostFix,"{\n position:relative;\n width:100%;\n height:").concat(this.progressbar.width,"px;\n ").concat("top"===this.progressbar.position?"top:0px;":"bottom:0px;","\n left:0px;\n z-index:999999;\n overflow:hidden;\n cursor: pointer;\n background:").concat(this.progressbar.remaining_color||"transparent",";\n }\n .apxor-survey-bar").concat(this.cssPostFix,"{\n width:100%;\n height:100%;\n background:").concat(this.progressbar.progress_color,";\n }")),e}},{key:"_getNumberedStepperStyles",value:function(){var e="",t="";if(this.enable_header&&this.header.enable_stepper){var n=_setFontFaceAtRule(this.header.stepper.pagination_text.font);t="\n font-family:".concat(n[0],";\n font-size: ").concat(this.header.stepper.pagination_text.font.size,"px;\n font-style:").concat(this.header.stepper.pagination_text.font.style,";\n font-weight:").concat(this.header.stepper.pagination_text.font.weight,";\n color:").concat(this.header.stepper.pagination_text.color,";\n ");var i="";this.header.stepper.pagination_text.enable_padding&&(i="\n padding:".concat(this.header.stepper.pagination_text.padding.top,"px ").concat(this.header.stepper.pagination_text.padding.right,"px ").concat(this.header.stepper.pagination_text.padding.bottom,"px ").concat(this.header.stepper.pagination_text.padding.left,"px"));var o="";this.header.stepper.pagination_text.enable_margin&&(o="\n margin:".concat(this.header.stepper.pagination_text.margin.top||12,"px ").concat(this.header.stepper.pagination_text.margin.right,"px ").concat(this.header.stepper.pagination_text.margin.bottom,"px ").concat(this.header.stepper.pagination_text.margin.left,"px")),e="\n ".concat(n[1],"\n .stepper-").concat(this.header.stepper.type,"{\n ").concat(t,";\n ").concat(i,";\n ").concat(o,";\n }")}return e}},{key:"_getCloseButtonStyles",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n="",i="";e.enable_padding&&(i="\n padding:".concat(e.padding.top,"px ").concat(e.padding.right,"px ").concat(e.padding.bottom,"px ").concat(e.padding.left,"px"));var o="";e.enable_margin&&(o="\n margin:".concat(e.margin.top,"px ").concat(e.margin.right,"px ").concat(e.margin.bottom,"px ").concat(e.margin.left,"px"));var a="";e.enable_border&&(a="\n border:".concat(e.border.width,"px ").concat(e.border.style," ").concat(e.border.color,";\n border-radius:").concat(e.border.radius,"px"));var r,s,l,c,d="";null!=e&&e.position&&(d="top-right"===e.position.position||"TR"===e.position.position?"\n right:0px;\n -webkit-transform:translate(".concat(-(null===(r=e.position)||void 0===r||null===(r=r.offset)||void 0===r?void 0:r.x),"px,").concat(null===(s=e.position)||void 0===s||null===(s=s.offset)||void 0===s?void 0:s.y,"px);\n "):"\n left:0px;\n -webkit-transform:translate(-".concat(null===(l=e.position)||void 0===l||null===(l=l.offset)||void 0===l?void 0:l.x,"px,").concat(null===(c=e.position)||void 0===c?void 0:c.offset.y,"px);\n "));n="\n .apxor-".concat(t,"close-button").concat(this.cssPostFix,"{\n position:absolute;\n display:flex;\n text-align:center;\n top:0px;\n cursor:pointer;\n ").concat(d,";\n ").concat(i,";\n ").concat(o,";\n ").concat(a,";\n }").replaceAll("\n","").replace(/[\s]{2,999}/g,"");var p=document.createElement("style");return p.innerHTML=n,this.overlayElement.appendChild(p),n}},{key:"_getBackButtonStyles",value:function(){var e="";if(this.enable_header&&this.header.enable_back_button){var t,n="";this.header.backbutton.enable_padding&&(n="\n padding:".concat(this.header.backbutton.padding.top,"px ").concat(this.header.backbutton.padding.right,"px ").concat(this.header.backbutton.padding.bottom,"px ").concat(this.header.backbutton.padding.left,"px"));var i="";this.header.backbutton.enable_margin&&(i="\n margin:".concat(this.header.backbutton.margin.top,"px ").concat(this.header.backbutton.margin.right,"px ").concat(this.header.backbutton.margin.bottom,"px ").concat(this.header.backbutton.margin.left,"px"));var o="";this.header.backbutton.enable_border&&(o="\n border:".concat(this.header.backbutton.border.width,"px ").concat(this.header.backbutton.border.style," ").concat(this.header.backbutton.border.color,";\n border-radius:").concat(this.header.backbutton.border.radius,"px"));var a="";null!==(t=this.header.backbutton)&&void 0!==t&&t.position&&(a="top-left"===this.header.backbutton.position.position?"\n left:0px;\n -webkit-transform:translate(".concat(this.header.backbutton.position.offset.skid,"px,").concat(this.header.backbutton.position.offset.distance,"px)\n "):"\n right:0px;"),e="\n .apxor-back-button".concat(this.cssPostFix,"{\n position:absolute;\n display:flex;\n cursor:pointer;\n text-align:center;\n top:0px;\n ").concat(a,";\n ").concat(n,";\n ").concat(i,";\n ").concat(o,";\n }")}return e}},{key:"_getQandAcontainerStyles",value:function(){var e="";this.survey.enable_margin&&(e="\n margin:".concat(this.survey.margin.top,"px ").concat(this.survey.margin.right,"px ").concat(this.survey.margin.bottom,"px ").concat(this.survey.margin.left,"px\n "));var t="";this.survey.enable_padding&&(t="\n padding:".concat(this.survey.padding.top,"px ").concat(this.survey.padding.right,"px ").concat(this.survey.padding.bottom,"px ").concat(this.survey.padding.left,"px\n "));var n="";this.survey.enable_border&&(n="\n border-radius: ".concat(this.survey.border.radius,"px;\n border: ").concat(this.survey.border.width,"px ").concat(this.survey.border.style," ").concat(this.survey.border.color,";\n "));var i="";return this.survey.enable_gradient&&(i="\n background-image:linear-gradient(".concat(this.survey.gradient.direction,", ").concat(this.survey.gradient.colors[0],", ").concat(this.survey.gradient.colors[1],");\n ")),"\n .apxor-survey-QandA-container".concat(this.cssPostFix,"{\n background-color:").concat(this.survey.background_color,";\n ").concat(e,";\n ").concat(t,";\n ").concat(n,";\n ").concat(i,";\n overflow:auto;\n }")}},{key:"_getAnswerContainerStyles",value:function(){var e,t="\n .apxor-survey-answer-container".concat(this.cssPostFix,"{\n display:flex;\n flex-direction:column;\n background:").concat(null===(e=this.answer)||void 0===e?void 0:e.background_color,"\n }").replaceAll("\n","").replace(/[\s]{2,999}/g,""),n=document.createElement("style");n.innerHTML=t,this.overlayElement.appendChild(n)}},{key:"_getSuccessIconStyles",value:function(){var e="";if(this.enable_success_message&&this.success_message.enable_icon){var t="",n=this.success_message.icon;n.enable_margin&&(t="\n margin:".concat(n.margin.top,"px ").concat(n.margin.right,"px ").concat(n.margin.bottom,"px ").concat(n.margin.left,"px\n "));var i="";n.enable_padding&&(i="\n padding:".concat(n.padding.top,"px ").concat(n.padding.right,"px ").concat(n.padding.bottom,"px ").concat(n.padding.left,"px\n "));var o="";n.enable_border&&(o="\n border-radius: ".concat(n.border.radius,"px;\n border: ").concat(n.border.width,"px ").concat(n.border.style," ").concat(n.border.color,";\n ")),e="\n .apxor-success-icon-container".concat(this.cssPostFix,"{\n text-align:center;\n }\n .apxor-success-icon-content").concat(this.cssPostFix,"{\n height:").concat(n.height,"px;\n width:").concat(n.width,"px;\n ").concat(t,";\n ").concat(i,";\n ").concat(o,";\n }")}return e}},{key:"_setBottomButtonStyles",value:function(){var e="";this.footer.enable_margin&&(e="\n margin:".concat(this.footer.margin.top,"px ").concat(this.footer.margin.right,"px ").concat(this.footer.margin.bottom,"px ").concat(this.footer.margin.left,"px\n "));var t="";this.footer.enable_padding&&(t="\n padding:".concat(this.footer.padding.top,"px ").concat(this.footer.padding.right,"px ").concat(this.footer.padding.bottom,"px ").concat(this.footer.padding.left,"px\n "));var n="";this.footer.enable_border&&(n="\n border-radius: ".concat(this.footer.border.radius,"px;\n border: ").concat(this.footer.border.width,"px ").concat(this.footer.border.style," ").concat(this.footer.border.color,";\n "));var i="";this.footer.enable_gradient&&(i="\n background-image:linear-gradient(".concat(this.footer.gradient.direction,", ").concat(this.footer.gradient.colors[0],", ").concat(this.footer.gradient.colors[1],");\n "));var o="\n .apxor-survey-button-container".concat(this.cssPostFix,"{\n display:flex;\n justify-content:center;\n background:").concat(this.footer.background_color,";\n ").concat(e,";\n ").concat(t,";\n ").concat(n,";\n ").concat(i,";\n }\n ").replaceAll("\n","").replace(/[\s]{2,999}/g,""),a=document.createElement("style");a.innerHTML=o,this.overlayElement.appendChild(a)}},{key:"_getQuestionContainerStyles",value:function(e){var t="";e.enable_margin&&(t="\n margin:".concat(e.margin.top,"px ").concat(e.margin.right,"px ").concat(e.margin.bottom,"px ").concat(e.margin.left,"px\n "));var n="";e.enable_padding&&(n="\n padding:".concat(e.padding.top,"px ").concat(e.padding.right,"px ").concat(e.padding.bottom,"px ").concat(e.padding.left,"px\n "));var i="\n .apxor-survey-question-container-".concat(e.id).concat(this.cssPostFix,"{\n background:").concat(e.background_color,";\n ").concat(t,";\n ").concat(n,";\n }").replaceAll("\n","").replace(/[\s]{2,999}/g,""),o=document.createElement("style");o.innerHTML=i,this.overlayElement.appendChild(o)}},{key:"_getTitleStyles",value:function(e,t){var n="";e.enable_margin&&(n="\n margin:".concat(e.margin.top,"px ").concat(e.margin.right,"px ").concat(e.margin.bottom,"px ").concat(e.margin.left,"px\n "));var i="";e.enable_padding&&(i="\n padding:".concat(e.padding.top,"px ").concat(e.padding.right,"px ").concat(e.padding.bottom,"px ").concat(e.padding.left,"px\n "));var o="\n .apxor-survey-".concat(t,"-div").concat(this.cssPostFix,"{\n width:auto;\n position:relative;\n text-align:").concat(e.alignment,";\n background-color:").concat(e.background_color,";\n ").concat(n,";\n ").concat(i,";\n }").replaceAll("\n","").replace(/[\s]{2,999}/g,""),a=document.createElement("style");a.innerHTML=o,this.overlayElement.appendChild(a)}},{key:"_getTitleAndCloseIconStyles",value:function(){var e="\n .apxor-survey-question-closeicon-container-".concat(this.question.id).concat(this.cssPostFix,"{\n display:flex;\n flex-direction:row;\n position:relative;\n }").replaceAll("\n","").replace(/[\s]{2,999}/g,""),t=document.createElement("style");return t.innerHTML=e,this.overlayElement.appendChild(t),e}},{key:"_getDescriptionStyles",value:function(e,t){var n="";e.enable_margin&&(n="\n margin:".concat(e.margin.top,"px ").concat(e.margin.right,"px ").concat(e.margin.bottom,"px ").concat(e.margin.left,"px\n "));var i="";e.enable_padding&&(i="\n padding:".concat(e.padding.top,"px ").concat(e.padding.right,"px ").concat(e.padding.bottom,"px ").concat(e.padding.left,"px\n "));var o="\n .apxor-survey-".concat(t,"-div").concat(this.cssPostFix,"{\n text-align:").concat(e.alignment,";\n background-color:").concat(e.background_color,";\n ").concat(n,";\n ").concat(i,";\n }").replaceAll("\n","").replace(/[\s]{2,999}/g,""),a=document.createElement("style");return a.innerHTML=o,this.overlayElement.appendChild(a),o}},{key:"_getChoiceStyles",value:function(e,t,n){var i="";e.enable_margin&&(i="\n margin:".concat(e.margin.top,"px ").concat(e.margin.right,"px ").concat(e.margin.bottom,"px ").concat(e.margin.left,"px\n "));var o="";e.enable_padding&&(o="\n padding:".concat(e.padding.top,"px ").concat(e.padding.right,"px ").concat(e.padding.bottom,"px ").concat(e.padding.left+40,"px\n "));var a="";t.enable_border&&(a="\n border-radius:".concat(t.border.radius,"px;\n border:").concat(t.border.width,"px ").concat(t.border.style," ").concat(t.border.inactive_color));var r=_setFontFaceAtRule(e.font),s="\n font-size:".concat(e.font.size,"px;\n font-family:").concat(r[0],";\n font-style:").concat(e.font.style,";\n font-weight:").concat(e.font.weight,";\n ");t.color_active;var l=t.color_inactive,c=t.radio_color_active,d=t.radio_color_inactive,p=t.bg_color_active,u=t.bg_color_inactive,h="\n ".concat(r[1],"\n .apx-lc").concat(this.cssPostFix," {\n display: flex;\n align-items:center;\n position: relative;\n background: ").concat(u,";\n cursor: pointer;\n color: ").concat(l,";\n ").concat(s,";\n ").concat(a,";\n ").concat(i,";\n ").concat(o,";\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n }\n \n .apx-lc").concat(this.cssPostFix," input {\n position: absolute;\n opacity: 0;\n cursor: pointer;\n width: 0;\n height: 0;\n }\n \n .apx-i").concat(this.cssPostFix," {\n position: absolute;\n left: 12px;\n height: 16px;\n width: 16px;\n display:flex;\n justify-content:center;\n align-items:center;\n border: 1px solid ").concat(d,";\n background-color: white;\n border-radius:").concat("single_choice"===n?"50%":0,";\n }\n \n .apx-lc").concat(this.cssPostFix,":hover input ~ .apx-i").concat(this.cssPostFix," {\n border: 1px solid ").concat(c,";\n }\n\n .apx-lc").concat(this.cssPostFix," input:checked ~ .apx-i").concat(this.cssPostFix," {\n background: ").concat("single_choice"!==n?c:p,";\n border: 1px solid ").concat(c,";\n }\n \n .apx-i").concat(this.cssPostFix,':after {\n content: "";\n position: absolute;\n display: none;\n }\n \n .apx-lc').concat(this.cssPostFix," input:checked ~ .apx-i").concat(this.cssPostFix,":after {\n display: block;\n }\n\n .apx-lc").concat(this.cssPostFix," .apx-i").concat(this.cssPostFix,":after {\n width: ").concat("single_choice"===n?10:5,"px;\n height: ").concat(10,"px;\n border-radius: ").concat("single_choice"===n?"50%":"0",";\n background: ").concat("single_choice"===n?c:"transparent",";\n border: ").concat("single_choice"===n?"none":"solid ".concat(p),";\n border-width: ").concat("single_choice"===n?"unset":"0 3px 3px 0",";\n -webkit-transform: ").concat("single_choice"===n?"unset":"rotate(45deg)",";\n -ms-transform: ").concat("single_choice"===n?"unset":"rotate(45deg)",";\n transform: ").concat("single_choice"===n?"unset":"rotate(45deg)",";\n }\n ").replaceAll("\n","").replace(/[\s]{2,999}/g,""),g=document.createElement("style");g.innerHTML=h,this.overlayElement.appendChild(g)}},{key:"_getScrollStyles",value:function(e,t){var n="";e.enable_border&&(n="\n border-top: ".concat(e.border.width,"px ").concat(e.border.style," ").concat(e.border.color,";\n border-bottom : ").concat(e.border.width,"px ").concat(e.border.style," ").concat(e.border.color,";\n "));var i="\n .apxor-survey-".concat(t,"-scroll").concat(this.cssPostFix," {\n overflow:scroll; \n overflow-x: hidden;\n height:").concat(e.height,"px;\n ").concat(n,";\n }").replaceAll("\n","").replace(/[\s]{2,999}/g,""),o=document.createElement("style");return o.innerHTML=i,this.overlayElement.appendChild(o),i}},{key:"_getBottomButtonsStyles",value:function(){var e="";return 0===this.index&&(e="\n visibility:hidden;\n "),"\n #apxor-survey_bottom-prev-button{\n ".concat(e,"\n }\n #apxor-survey_bottom-next-button{\n pointer-events:none;\n opacity:0.5;\n }\n #apxor-survey_bottom-submit-button{\n pointer-events:none;\n opacity:0.5;\n }\n ")}},{key:"_setSurveyContent",value:function(){var e,t,n=this;this._createSurveyContainer(),this._createProgressBar(),this._createHeaderContainer(),this._createQuestionAndAnswerContainer(),this._createQuestionContainer(),this._createAnswerContainer(),this.enableFooter&&this._createButtonContainer(),this.surveylaunched||(this._logSurveyAppEvent("apx_survey_launched",{apx_survey_id:this.configId,apx_survey_name:this.name,apx_survey_type:!0,campaign_type:"survey"}),this.surveylaunched=!0),setTimeout((function(){var e;n._logSurveyAppEvent("apx_survey_question_asked",{apx_question_id:n.QandAArray[n.index].question.id,apx_question_name:null!==(e=n.QandAArray[n.index].question.title.text)&&void 0!==e?e:"",apx_question_type:n.QandAArray[n.index].answer.answer_mode,apx_question_position:n.index+1,apx_survey_id:n.configId,apx_survey_name:n.name,apx_survey_type:!0,campaign_type:"survey"})}),100),(null===(e=this.bottomRatingDiv)||void 0===e?void 0:e.offsetWidth)>(null===(t=this.questionContainer)||void 0===t?void 0:t.offsetWidth)&&(this.ratingDiv.style.alignItems="flex-start")}},{key:"_createSurveyContainer",value:function(){this.surveyContainer=document.createElement("div"),this.surveyContainer.classList.add("apxor-survey-container".concat(this.cssPostFix)),this.overlayElement.appendChild(this.surveyContainer)}},{key:"_setSurveyRequestStyles",value:function(){var e=" \n ".concat(this._setBackgroundOverlaystyles(),"\n ").concat(this._getSurveyRequestContainerStyles(),"\n ").concat(this._getSurveyRequestIconStyles()," \n ").concat(this._getSurveyRequestButtonsStyles(),"\n ").replaceAll("\n","").replace(/[\s]{2,999}/g,""),t=document.createElement("style");t.innerHTML=e,this.overlayElement.appendChild(t)}},{key:"_getSurveyRequestContainerStyles",value:function(){var e,t="";null!==(e=this.surveyrequest)&&void 0!==e&&e.enable_margin&&(t="\n margin-top:".concat(this.surveyrequest.margin.top,"px;\n margin-left:").concat(-this.surveyrequest.margin.right,"px;\n "));var n="";switch(this.surveyrequest.position.position){case"top-left":n="\n top:".concat(0,"px;\n left:").concat(0,"px;\n ");break;case"top-center":n="\n left:50%;\n top:".concat(0,"px;\n -webkit-transform: translate(-50%, ").concat(0,"px);\n -moz-transform: translate(-50%, ").concat(0,"px);\n ");break;case"top-right":n="\n top:".concat(0,"px;\n right:").concat(0,"px;\n ");break;case"bottom-left":n="\n bottom:".concat(0,"px;\n left:").concat(0,"px;\n ");break;case"bottom-center":n="\n left:50%;\n bottom:".concat(0,"px;\n -webkit-transform: translate(-50%, ").concat(0,"px);\n -moz-transform: translate(-50%, ").concat(0,"px);\n ");break;case"bottom-right":n="\n bottom:".concat(0,"px;\n right:").concat(0,"px;\n ");break;case"left":n="\n left:".concat(0,"px;\n top:50%;\n -webkit-transform: translate(").concat(0,"px, -50%);\n -moz-transform: translate(").concat(0,"px, -50%);\n ");break;case"right":n="\n right:".concat(0,"px;\n top:50%;\n -webkit-transform: translate(").concat(0,"px, -50%);\n -moz-transform: translate(").concat(0,"px, -50%);\n ");break;default:n="\n left:50%;\n top:50%;\n -webkit-transform: translate(-50%, -50%);\n -moz-transform: translate(-50%, -50%);\n "}var i="";return this.surveyrequest.enable_border&&(i="\n border-radius:".concat(this.surveyrequest.border.radius,"px;\n border:").concat(this.surveyrequest.border.width,"px ").concat(this.surveyrequest.border.style," ").concat(this.surveyrequest.border.color,";\n ")),"\n .apxor-survey-request-styles".concat(this.cssPostFix,"{\n width: ").concat(this.surveyrequest.width,"%;\n position: fixed;\n display:flex;\n flex-direction:column;\n align-items:center;\n z-index:999999;\n background: ").concat(this.surveyrequest.background_color,";\n ").concat(t,";\n ").concat(n,";\n ").concat(i,"\n }")}},{key:"_getSurveyRequestIconStyles",value:function(){var e="";if(this.surveyrequest.enable_icon){var t="";this.surveyrequest.icon.enable_border&&(t="\n border-radius:".concat(this.surveyrequest.icon.border.radius,"%;\n border:").concat(this.surveyrequest.icon.border.width,"px ").concat(this.surveyrequest.icon.border.style," ").concat(this.surveyrequest.icon.border.color,";\n "));var n="";this.surveyrequest.icon.enable_margin&&(n="\n margin-top:".concat(this.surveyrequest.icon.margin.top,"px;\n margin-bottom:").concat(this.surveyrequest.icon.margin.bottom,"px;\n margin-left:").concat(this.surveyrequest.icon.margin.left,"px;\n margin-right:").concat(this.surveyrequest.icon.margin.right,"px;\n "));var i="";this.surveyrequest.icon.enable_padding&&(i="\n padding-top:".concat(this.surveyrequest.icon.padding.top,"px;\n padding-bottom:").concat(this.surveyrequest.icon.padding.bottom,"px;\n padding-left:").concat(this.surveyrequest.icon.padding.left,"px;\n padding-right:").concat(this.surveyrequest.icon.padding.right,"px;\n ")),e="\n .apxor-survey-request-icon-container".concat(this.cssPostFix,' {\n align-self:"center";\n }\n .apxor-survey-request-icon-content').concat(this.cssPostFix," {\n height: ").concat(this.surveyrequest.icon.height,"px;\n width: ").concat(this.surveyrequest.icon.width,"px;\n ").concat(t,"\n ").concat(n,"\n ").concat(i,"\n }\n ")}return e}},{key:"_getSurveyRequestButtonsStyles",value:function(){var e="";return this.surveyrequest.enable_buttons_container_margin&&(e="\n padding-top:".concat(this.surveyrequest.buttons_container_margin.top,"px;\n padding-bottom:").concat(this.surveyrequest.buttons_container_margin.bottom,"px;\n padding-left:").concat(this.surveyrequest.buttons_container_margin.left,"px;\n padding-right:").concat(this.surveyrequest.buttons_container_margin.right,"px;\n ")),"\n .apxor-survey-request-buttons".concat(this.cssPostFix,"{\n width: 100%;\n box-sizing: border-box;\n display:flex;\n flex-direction:column;\n align-items:center;\n ").concat(e,"\n }")}},{key:"_createSurveyRequestContent",value:function(){this._createSurveyRequestContainer(),this._setSurveyRequestContent()}},{key:"_createSurveyRequestContainer",value:function(){this.surveyRequestContainer=document.createElement("div"),this.surveyRequestContainer.classList.add("apxor-survey-request-styles".concat(this.cssPostFix)),this.overlayElement.appendChild(this.surveyRequestContainer)}},{key:"_setSurveyRequestContent",value:function(){var e,t,n;if(this.surveyrequest.enable_close_button&&(this._getCloseButtonStyles(this.surveyrequest.closebutton,"dialog"),this.surveyRequestContainer.appendChild(this._setCloseButton(this.surveyrequest.closebutton,"dialog"))),this.surveyrequest.enable_icon){var i=document.createElement("div");i.classList.add("apxor-survey-request-icon-container".concat(this.cssPostFix));var o=document.createElement("img");o.src=this.surveyrequest.icon.path,o.classList.add("apxor-survey-request-icon-content".concat(this.cssPostFix)),i.appendChild(o),this.surveyRequestContainer.appendChild(i)}var a=document.createElement("div");this.surveyrequest.enable_title&&(this._getTitleStyles(this.surveyrequest.title,"survey-request-title"),a.appendChild(this._setTitleContent(this.surveyrequest.title,"survey-request-title",""))),this.surveyrequest.enable_description&&(this._getDescriptionStyles(this.surveyrequest.description,"survey-request-description"),a.appendChild(this._setDescriptionContent(this.surveyrequest.description,"survey-request-description",""))),(this.surveyrequest.enable_title||this.surveyrequest.enable_description)&&(a.style.width="100%",this.surveyRequestContainer.appendChild(a)),null!==(e=this.surveyrequest)&&void 0!==e&&e.buttons&&0!==this.surveyrequest.buttons.length&&(this.surveyRequestButtons=document.createElement("div"),this.surveyRequestButtons.classList.add("apxor-survey-request-buttons".concat(this.cssPostFix)),this.surveyRequestButtons.appendChild(this._setButtons(this.surveyrequest.buttons,!0)),this.surveyRequestContainer.appendChild(this.surveyRequestButtons)),this._logSurveyAppEvent("apx_survey_dialog_launched",{apx_survey_id:this.configId,apx_survey_name:this.name,apx_survey_type:(null!==(t=null==this?void 0:this.is_response_based_survey)&&void 0!==t?t:null==this||null===(n=this.survey)||void 0===n?void 0:n.is_response_based_survey)?"response_based":"default",campaign_type:"survey"})}},{key:"_createProgressBar",value:function(){this.enable_progressbar&&1!=this.QandArrayLength&&this.surveyContainer.appendChild(this._setProgressBar())}},{key:"_createHeaderContainer",value:function(){if(this.enable_header){var e=document.createElement("div");if(e.classList.add("apxor-header-container".concat(this.cssPostFix)),e.appendChild(this.createTopContainer()),this.header.enable_title&&(this._getTitleStyles(this.header.title,"header-title"),e.appendChild(this._setTitleContent(this.header.title,"header-title",this.index))),this.header.enable_description&&(this._getDescriptionStyles(this.header.description,"header-description"),e.appendChild(this._setDescriptionContent(this.header.description,"header-description",this.index))),this.header.enable_image)if(this.header.image.enable_background_image)e.classList.add("apxor-survey-header-image".concat(this.cssPostFix));else{var t=document.createElement("div");t.classList.add("apxor-survey-header-image-div".concat(this.cssPostFix));var n=document.createElement("img");n.src=this.header.image.path,n.classList.add("apxor-survey-header-image".concat(this.cssPostFix)),t.appendChild(n),e.appendChild(t)}if(!(this.header.enable_title||this.header.enable_description||this.header.enable_image||this.header.enable_stepper)&&this.header.enable_close_button){var i=this.header.closebutton.height+this.header.closebutton.margin.bottom+this.header.closebutton.margin.top;e.style.height="".concat(i,"px")}this.surveyContainer.appendChild(e)}}},{key:"createTopContainer",value:function(){var e=document.createElement("div");e.classList.add("apxor-survey-header-top-container".concat(this.cssPostFix));var t=document.createElement("div");if(t.classList.add("apxor-survey-pagination-button".concat(this.cssPostFix)),this.enable_header&&this.header.enable_stepper){this.header.stepper.index=this.index+1,this.header.stepper.length=this.QandAArray.length;var n=document.createElement("div");n.className="stepper-"+this.header.stepper.type,this.header.stepper.pagination_text.is_dyn&&resolveDynamicText(this.header.stepper.pagination_text),n.innerHTML=setCarousel(this.header.stepper.type,this.header.stepper),t.appendChild(n)}if(this.header.enable_close_button){this._getCloseButtonStyles(this.header.closebutton);var i=this._setCloseButton(this.header.closebutton);t.appendChild(i)}if(this.header.enable_back_button&&0!==this.index){var o=this._setBackButton();t.appendChild(o)}return e.appendChild(t),e}},{key:"_createQuestionAndAnswerContainer",value:function(){this.index<this.QandAArray.length&&this.index>=0&&(this.QandAContainer=document.createElement("div"),this.QandAContainer.classList.add("apxor-survey-QandA-container".concat(this.cssPostFix)),this.surveyContainer.appendChild(this.QandAContainer))}},{key:"_createQuestionContainer",value:function(){this.question=this.QandAArray[this.index].question,this.questionContainer=document.createElement("div"),this._getQuestionContainerStyles(this.question),this.questionContainer.classList.add("apxor-survey-question-container-".concat(this.question.id).concat(this.cssPostFix));var e=document.createElement("div");if(e.classList.add("apxor-survey-question-closeicon-container-".concat(this.question.id).concat(this.cssPostFix)),this._getTitleAndCloseIconStyles(),this.question.enable_title&&(this._getTitleStyles(this.question.title,"question-title"),e.appendChild(this._setTitleContent(this.question.title,"question-title",this.question.id))),this.enable_close_icon){this._getCloseButtonStyles(this.closeButton);var t=this._setCloseButton(this.closeButton);t.style.position="relative",e.appendChild(t)}this.questionContainer.appendChild(e),this.question.enable_description&&(this._getDescriptionStyles(this.question.description,"question-description"),this.questionContainer.appendChild(this._setDescriptionContent(this.question.description,"question-description",this.question.id))),this.question.enable_choice_prompt&&(this._getDescriptionStyles(this.question.choice_prompt,"question-choice-prompt"),this.questionContainer.appendChild(this._setDescriptionContent(this.question.choice_prompt,"question-choice-prompt",this.question.id))),this.QandAContainer.appendChild(this.questionContainer)}},{key:"_createAnswerContainer",value:function(){var e,t,n=this;this.answer_mode=null===(e=this.QandAArray[this.index])||void 0===e?void 0:e.answer.answer_mode,this.answer=null===(t=this.QandAArray[this.index])||void 0===t?void 0:t.answer,this.enableFooter=this.QandAArray[this.index].enable_footer,this.footer=this.QandAArray[this.index].footer,this.anyActiveChoices=!1,this.answerContainer=document.createElement("div"),this._getAnswerContainerStyles(),this.answerContainer.classList.add("apxor-survey-answer-container".concat(this.cssPostFix));var i=!1;if("single_choice"===this.answer_mode||"multi_choice"===this.answer_mode){var o;this.choices=null===(o=this.QandAArray[this.index])||void 0===o||null===(o=o.answer)||void 0===o?void 0:o.choices;var a="",r=this.choices,s=r.min_choices_enabled,l=r.max_choices_enabled,c=r.max_choices,d=r.min_choices;r.randomize_choices;var p=r.color_active,u=r.color_inactive,h=r.color_disable;r.radio_color_active,r.radio_color_inactive;var g=r.bg_color_active,f=r.bg_color_inactive,m=r.bg_color_disable,_=r.choice_border_active,v=void 0===_?"":_,b=r.choice_border_inactive,y=void 0===b?"":b,x=r.list;this._getChoiceStyles(this.answer,this.choices,this.answer_mode);var w=function(e,t){e.style.color=t?p:u},C=function(e,t){var n=t?g:f;e.style.background=n},E=function(e,t){n.choices.enable_border&&(e.style.border=t?"".concat(n.choices.border.width,"px ").concat(n.choices.border.style," ").concat(v||n.choices.border.color):"".concat(n.choices.border.width,"px ").concat(n.choices.border.style," ").concat(y||n.choices.border.inactive_color))};if(x.forEach((function(e,t){var o=document.createElement("label");o.className="apx-lc".concat(n.cssPostFix),e.is_dyn?(resolveDynamicText(e),o.innerText=e.text):o.innerText=e.value;var r=document.createElement("input");r.name=r.type="single_choice"===n.answer_mode?"radio":"checkbox",r.checked=e.is_selected;var p=document.createElement("span");p.className="apx-i".concat(n.cssPostFix),o.appendChild(r),o.appendChild(p),n.anyActiveChoices=n.anyActiveChoices||e.is_selected,C(o,e.is_selected),w(o,e.is_selected),E(o,e.is_selected),e.is_other&&(n.getTextAreaNodeStyles(n.answer,"other"),a=n.getTextAreaNode(n.answer.input_text,e.other_answer,"other"),i=!0,a.style.visibility="hidden",a.addEventListener("input",(function(t){var i;null!==(i=n.QandAArray[n.index])&&void 0!==i&&null!==(i=i.answer)&&void 0!==i&&i.is_text_mandatory&&n.changeButtonColor(!0),e.other_answer=t.target.value}))),e.is_selected&&e.is_other&&(a.style.visibility="visible"),"multi_choice"===n.answer_mode?(r.setAttribute("apx-key","checked"),r.setAttribute("apx-ci",t+""),r.onchange=function(e){var t=0;document.querySelectorAll('input[apx-key="checked"]').forEach((function(e){e.checked&&(t+=1)})),document.querySelectorAll('input[apx-key="checked"]').forEach((function(i,o){var r,s=i.checked;(x[o].is_selected=s,w(i.parentNode,s),C(i.parentNode,s),E(i.parentNode,s),x[o].is_other)&&(null!==(r=n.QandAArray[n.index])&&void 0!==r&&null!==(r=r.answer)&&void 0!==r&&r.is_text_mandatory,a.style.visibility=s?"visible":"hidden");if(e.target.checked&&l&&t===c)i.checked||(i.disabled=!0,i.parentNode.style.color=h,i.parentNode.style.background=m,i.parentNode.style.cursor="default");else if(!e.target.checked&&l&&t===c-1){var d=i.checked;d||(i.disabled=!1,w(i.parentNode,d),C(i.parentNode,d),i.parentNode.style.cursor="pointer")}})),s&&t>=d?n.changeButtonColor(!0):n.changeButtonColor(!1)}):(r.setAttribute("apx-key","radio"),r.setAttribute("apx-ci",t+""),r.onchange=function(){var e=!1;if(document.querySelectorAll('input[apx-key="radio"]').forEach((function(t,i){var o,r=t.checked;(x[i].is_selected=r,r&&(e=!0),w(t.parentNode,r),C(t.parentNode,r),E(t.parentNode,r),x[i].is_other)&&(null!==(o=n.QandAArray[n.index])&&void 0!==o&&null!==(o=o.answer)&&void 0!==o&&o.is_text_mandatory&&(e=!1),a.style.visibility=r?"visible":"hidden")})),n.changeButtonColor(e),!n.enableFooter){n.visitedQuestion.push(n.index),document.body.removeChild(n.overlayElement),n.survey.is_response_based_survey?(n._logSurveyQuestionEvent(n.index),n.index=n._getNextQuestionByResponseBasedSurvey()?n.index:n.index+1,n.index===n.QandAArray.length?(n.enable_success_message||n.closeCallback(),n._submitSurveyResponses(!0)):n.createSurvey()):(n._logSurveyQuestionEvent(n.index),n.index===n.QandAArray.length-1?(n.enable_success_message||n.closeCallback(),n._submitSurveyResponses(!0)):(n.index+=1,n.createSurvey()))}}),n.answerContainer.appendChild(o),i&&n.answerContainer.appendChild(a)})),this.answer.enable_scroll){this.answerContainer.classList.add("apxor-survey-".concat("choices","-scroll").concat(this.cssPostFix))}this.QandAContainer.appendChild(this.answerContainer)}else if("text"===this.answer_mode){this.getTextAreaNodeStyles(this.answer,"text");var k=this.getTextAreaNode(this.answer.input_text,this.answer.text_answer,"text");""!==this.answer.text_answer&&(this.anyActiveChoices=!0),k.addEventListener("input",(function(e){n.answer.text_answer=e.target.value,e.target.value&&e.target.value.length>0?(n.answer.is_answered=!0,n.anyActiveChoices=!0):(n.answer.is_answered=!1,n.anyActiveChoices=!1),n.changeButtonColor(n.anyActiveChoices)})),this.answerContainer.appendChild(k),this.QandAContainer.appendChild(this.answerContainer)}else if("rating"===this.answer_mode){var S,T,A,I;if(this.rating=null===(S=this.QandAArray[this.index])||void 0===S||null===(S=S.answer)||void 0===S?void 0:S.rating,this.reactions=null===(T=this.rating)||void 0===T?void 0:T.reactions,this.ratingButtons=this.rating.ratingbuttons,this.QandSArray=null===(A=this.rating)||void 0===A?void 0:A.QandSArray,this.ratingLabels=null===(I=this.rating)||void 0===I?void 0:I.ratingLabels,this.npsContainer=document.createElement("div"),this._getNpscontainerStyles(this.QandAArray[this.index].answer),this.npsContainer.classList.add("apxor-survey-nps-container".concat(this.cssPostFix)),this._getNpsTopContainerElementStyles(),this.npsTopContainer=document.createElement("div"),this.npsTopContainer.classList.add("apxor-survey-nps-topcontainer".concat(this.cssPostFix)),this.npsContainer.appendChild(this.npsTopContainer),this.ratingDiv=document.createElement("div"),this.ratingDiv.classList.add("apxor-survey-ratingdiv".concat(this.cssPostFix)),"slider"!==this.ratingButtons.type){var P=document.createElement("div");P.classList.add("apxor-survey-topratingdiv".concat(this.cssPostFix)),this.bottomRatingDiv=document.createElement("div"),this.bottomRatingDiv.classList.add("apxor-survey-bottomratingdiv".concat(this.cssPostFix)),"numbered"===this.ratingButtons.type?this._getRatingNumberButtonStyles(this.ratingButtons):"radio"===this.ratingButtons.type?this._getRatingRadioButtonStyles(this.ratingButtons):"star"===this.ratingButtons.type?this.getStarButtonStyling(this.ratingButtons):"emoji"===this.ratingButtons.type&&this.getEmojiButtonStyling(this.ratingButtons),this.rating.enable_labels&&this.getRatingLabelsStyling(this.ratingButtons,this.ratingLabels);var O=0;this.ratingButtons.buttons.forEach((function(e,t){O++,n.anyActiveChoices=n.anyActiveChoices||-1!==n.ratingButtons.selected_rating[t];var i=document.createElement("div");if(i.setAttribute("apx-survey-key","rating"),"radio"===n.ratingButtons.type&&(n.radioButtonContainer=document.createElement("div"),n.radioButtonContainer.classList.add("apxor-survey-radio-button-container-".concat(t,"-styling").concat(n.cssPostFix)),n.radioButtonContainer.appendChild(i)),"numbered"===n.ratingButtons.type)i.classList.add("apxor-survey-buttondiv-".concat(t,"-").concat(n.cssPostFix)),i.innerText=e.value;else if("radio"===n.ratingButtons.type)i.classList.add("apxor-survey-radiobutton-".concat(t,"-").concat(n.cssPostFix)),n.radioInnerDiv=document.createElement("div"),n.radioInnerDiv.classList.add("apxor-survey-radiobutton-inner-".concat(t,"-").concat(n.cssPostFix)),n.radioInnerDiv.classList.add("apxor-survey-radiobutton-inner-".concat(t,"-hidden-").concat(n.cssPostFix)),i.appendChild(n.radioInnerDiv),n.textForRadioButton=document.createElement("div"),n.textForRadioButton.setAttribute("apx-survey-radio-test","rating-text"),n.textForRadioButton.classList.add("apxor-survey-radiobutton-text-".concat(t,"-").concat(n.cssPostFix)),n.textForRadioButton.innerText=e.value,n.radioButtonContainer.appendChild(n.textForRadioButton);else if("star"===n.ratingButtons.type){i.classList.add("apxor-survey-starbutton-".concat(t).concat(n.cssPostFix));var o="",a="";n.ratingButtons.enable_colors?(o="white",a=n.ratingButtons.buttons[t].color):n.ratingButtons.enable_box_model?(o=n.ratingButtons.color_inactive,a=n.ratingButtons.box_model.inactive_color):(o=n.ratingButtons.color_inactive,a=n.ratingButtons.border.inactive_color),i.innerHTML=n.getStarSvg(36,36,o,a)}else"emoji"===n.ratingButtons.type&&(i.classList.add("apxor-survey-emoji-buttondiv-".concat(t,"-").concat(n.cssPostFix)),i.innerText=e.emoji);n.ratingButtons.split_line&&O<=6?"radio"===n.ratingButtons.type?P.appendChild(n.radioButtonContainer):P.appendChild(i):"radio"===n.ratingButtons.type?n.bottomRatingDiv.appendChild(n.radioButtonContainer):n.bottomRatingDiv.appendChild(i),i.onclick=function(e){var i=!1,o=!1;1===n.ratingButtons.selected_rating[t]&&(i=!1,o=!0,n.rating.enable_reaction&&(n.npsTopContainer.innerHTML="",n.npsTopContainerMessage.innerHTML=""),n.rating.enable_qands&&(n.QandSContainer.innerHTML="",n.resetQandSState(n.ratingButtons.prev_selected_button)),n.ratingButtons.prev_selected_button=-1);var a=document.querySelectorAll('div[apx-survey-key="rating"]'),r=[];if("radio"===n.ratingButtons.type&&(r=document.querySelectorAll('div[apx-survey-radio-test="rating-text"]')),document.querySelectorAll('div[apx-survey-key="rating"]').forEach((function(e,s){if(s===t&&1!==n.ratingButtons.selected_rating[s]){if(i=!0,"numbered"===n.ratingButtons.type&&(n.ratingButtons.enable_colors?e.classList.remove("apxor-survey-buttondiv-unselected"):e.classList.add("apxor-survey-buttondiv-selected-".concat(s,"-").concat(n.cssPostFix))),"radio"===n.ratingButtons.type&&(e.classList.add("apxor-survey-radiobutton-selected-".concat(s,"-").concat(n.cssPostFix)),e.firstChild.classList.remove("apxor-survey-radiobutton-inner-".concat(s,"-hidden-").concat(n.cssPostFix)),r[s].classList.add("apxor-survey-radiobutton-text-".concat(s,"-selected-").concat(n.cssPostFix)),n.ratingButtons.SelectedRadioButton=s),"star"===n.ratingButtons.type)for(var l=s;l>=0;l--){a[l].firstChild.remove();var c="",d="";n.ratingButtons.enable_colors?(c=n.ratingButtons.buttons[l].color,d=n.ratingButtons.buttons[l].color):n.ratingButtons.enable_box_model?(c=n.ratingButtons.color_active,d=n.ratingButtons.box_model.active_color):(c=n.ratingButtons.color_active,d=n.ratingButtons.border.color),a[l].innerHTML=n.getStarSvg(36,36,c,d),a[l].classList.add("apxor-survey-starbutton-active-".concat(l).concat(n.cssPostFix))}"emoji"===n.ratingButtons.type&&(e.classList.add("apxor-survey-emoji-buttondiv-active-".concat(s,"-").concat(n.cssPostFix)),e.classList.remove("apxor-survey-emoji-buttondiv-inactive-".concat(s,"-").concat(n.cssPostFix))),n.rating.enable_reaction&&n.createReactionAndMessageContainer(s),n.rating.enable_qands&&(n.resetQandSState(n.ratingButtons.prev_selected_button),n.createQansSContainer(s)),n.ratingButtons.selected_rating[s]=1,n.ratingButtons.prev_selected_button=s}else{if(n.ratingButtons.enable_colors&&"numbered"===n.ratingButtons.type)o?e.classList.remove("apxor-survey-buttondiv-unselected"):e.classList.add("apxor-survey-buttondiv-unselected");else if("numbered"===n.ratingButtons.type)e.classList.remove("apxor-survey-buttondiv-selected-".concat(s,"-").concat(n.cssPostFix));else if("radio"===n.ratingButtons.type)e.classList.remove("apxor-survey-radiobutton-selected-".concat(s,"-").concat(n.cssPostFix)),r[s].classList.remove("apxor-survey-radiobutton-text-".concat(s,"-selected-").concat(n.cssPostFix)),n.ratingButtons.prevSelectedRadioButton===s&&e.firstChild.classList.add("apxor-survey-radiobutton-inner-".concat(s,"-hidden-").concat(n.cssPostFix));else if("star"===n.ratingButtons.type){e.firstChild.remove();var p="",u="";n.ratingButtons.enable_colors?(p="white",u=n.ratingButtons.buttons[s].color):n.ratingButtons.enable_box_model?(p=n.ratingButtons.color_inactive,u=n.ratingButtons.box_model.inactive_color):(p=n.ratingButtons.color_inactive,u=n.ratingButtons.border.inactive_color),e.innerHTML=n.getStarSvg(36,36,p,u),e.classList.remove("apxor-survey-starbutton-active-".concat(s).concat(n.cssPostFix))}else"emoji"===n.ratingButtons.type&&(o?(e.classList.remove("apxor-survey-emoji-buttondiv-active-".concat(s,"-").concat(n.cssPostFix)),e.classList.remove("apxor-survey-emoji-buttondiv-inactive-".concat(s,"-").concat(n.cssPostFix))):(e.classList.remove("apxor-survey-emoji-buttondiv-active-".concat(s,"-").concat(n.cssPostFix)),n.ratingButtons.enable_fade||n.ratingButtons.enable_shadow?e.classList.add("apxor-survey-emoji-buttondiv-inactive-".concat(s,"-").concat(n.cssPostFix)):e.classList.remove("apxor-survey-emoji-buttondiv-inactive-".concat(s,"-").concat(n.cssPostFix))));n.ratingButtons.selected_rating[s]=-1}})),n.ratingButtons.prevSelectedRadioButton=n.ratingButtons.SelectedRadioButton,n.ratingButtons.SelectedRadioButton=-1,n.changeButtonColor(i),!n.enableFooter){n.visitedQuestion.push(n.index),document.body.removeChild(n.overlayElement),n.survey.is_response_based_survey?(n._logSurveyQuestionEvent(n.index),n.index=n._getNextQuestionByResponseBasedSurvey()?n.index:n.index+1,n.index===n.QandAArray.length?(n.enable_success_message||n.closeCallback(),n._submitSurveyResponses(!0)):n.createSurvey()):(n._logSurveyQuestionEvent(n.index),n.index===n.QandAArray.length-1?(n.enable_success_message||n.closeCallback(),n._submitSurveyResponses(!0)):(n.index+=1,n.createSurvey()))}}})),this.rating.enable_labels&&(this.firstlabelelement=document.createElement("div"),this.firstlabelelement.classList.add("apxor-survey-rating-first-label-styles-".concat(this.cssPostFix)),this._getTitleStyles(this.ratingLabels.first_rating.text,"first-label-text"),this.firstlabelelement.appendChild(this._setTitleContent(this.ratingLabels.first_rating.text,"first-label-text","")),this.lastlabelelement=document.createElement("div"),this.lastlabelelement.classList.add("apxor-survey-rating-last-label-styles-".concat(this.cssPostFix)),this._getTitleStyles(this.ratingLabels.last_rating.text,"last-label-text"),this.lastlabelelement.appendChild(this._setTitleContent(this.ratingLabels.last_rating.text,"last-label-text",""))),O>6&&this.ratingButtons.split_line?(this.rating.enable_labels&&(P.appendChild(this.firstlabelelement),this.bottomRatingDiv.appendChild(this.lastlabelelement)),this.ratingDiv.appendChild(P),this.ratingDiv.appendChild(this.bottomRatingDiv)):(this.rating.enable_labels&&(this.bottomRatingDiv.appendChild(this.firstlabelelement),this.bottomRatingDiv.appendChild(this.lastlabelelement)),this.ratingDiv.appendChild(this.bottomRatingDiv)),this.npsContainer.appendChild(this.ratingDiv)}else{this.getSliderStyles();var L=document.createElement("div");L.className="range";var N=document.createElement("div");N.className="sliderValue";var D=document.createElement("span");D.innerText=10,D.className="ValueOfSlider",N.appendChild(D),L.appendChild(N);var B=document.createElement("div");B.className="field";var M=document.createElement("input");M.name=M.type="range",M.min=this.ratingButtons.start,M.max=this.ratingButtons.end,M.value=-1===this.ratingButtons.prev_selected_button?this.ratingButtons.start:this.ratingButtons.prev_selected_button,M.step=1,B.appendChild(M),L.appendChild(B),this.ratingDiv.appendChild(L),M.oninput=function(){var e=M.value;D.textContent=e,D.style.left=100/n.ratingButtons.length*(e-n.ratingButtons.start)+"%",D.classList.add("show"),n.rating.enable_qands&&(n.resetQandSState(n.ratingButtons.prev_selected_button),n.createQansSContainer(e)),n.ratingButtons.selected_rating[e]=1,-1!==n.ratingButtons.prev_selected_button&&(n.ratingButtons.selected_rating[n.ratingButtons.prev_selected_button]=-1),n.ratingButtons.prev_selected_button=e,n.changeButtonColor(!0)},M.onblur=function(){D.classList.remove("show")},this.npsContainer.appendChild(this.ratingDiv)}if(this.npsTopContainerMessage=document.createElement("div"),this.npsTopContainerMessage.classList.add("apxor-survey-nps-topcontainer-message".concat(this.cssPostFix)),this.npsContainer.appendChild(this.npsTopContainerMessage),this._getNpsQandSContainerElementStyles(),this.QandSContainer=document.createElement("div"),this.QandSContainer.classList.add("apxor-survey-nps-qands-container".concat(this.cssPostFix)),this.npsContainer.appendChild(this.QandSContainer),this.answerContainer.appendChild(this.npsContainer),this.QandAContainer.appendChild(this.answerContainer),this.ratingButtons.selected_rating.includes(1)){if("slider"!==this.ratingButtons.type){var F=document.querySelectorAll('div[apx-survey-key="rating"]'),$=[];"radio"===this.ratingButtons.type&&($=document.querySelectorAll('div[apx-survey-radio-test="rating-text"]'));var R=this.ratingButtons.selected_rating.indexOf(1);F.forEach((function(e,t){if(t===R){if("numbered"===n.ratingButtons.type&&(n.ratingButtons.enable_colors?e.classList.remove("apxor-survey-buttondiv-unselected"):e.classList.add("apxor-survey-buttondiv-selected-".concat(t,"-").concat(n.cssPostFix))),"radio"===n.ratingButtons.type&&(e.classList.add("apxor-survey-radiobutton-selected-".concat(t,"-").concat(n.cssPostFix)),e.firstChild.classList.remove("apxor-survey-radiobutton-inner-".concat(t,"-hidden-").concat(n.cssPostFix)),$[t].classList.add("apxor-survey-radiobutton-text-".concat(t,"-selected-").concat(n.cssPostFix)),n.ratingButtons.SelectedRadioButton=t),"star"===n.ratingButtons.type)for(var i=t;i>=0;i--){F[i].firstChild.remove();var o="",a="";n.ratingButtons.enable_colors?(o=n.ratingButtons.buttons[i].color,a=n.ratingButtons.buttons[i].color):n.ratingButtons.enable_box_model?(o=n.ratingButtons.color_active,a=n.ratingButtons.box_model.active_color):(o=n.ratingButtons.color_active,a="transparent"),F[i].innerHTML=n.getStarSvg(36,36,o,a),F[i].classList.add("apxor-survey-starbutton-active-".concat(i).concat(n.cssPostFix))}"emoji"===n.ratingButtons.type&&(e.classList.add("apxor-survey-emoji-buttondiv-active-".concat(t,"-").concat(n.cssPostFix)),e.classList.remove("apxor-survey-emoji-buttondiv-inactive-".concat(t,"-").concat(n.cssPostFix))),n.rating.enable_reaction&&n.createReactionAndMessageContainer(t),n.rating.enable_qands&&n.createQansSContainer(t),n.ratingButtons.prev_selected_button=t}else if(n.ratingButtons.enable_colors&&"numbered"===n.ratingButtons.type)e.classList.add("apxor-survey-buttondiv-unselected");else if("numbered"===n.ratingButtons.type)e.classList.remove("apxor-survey-buttondiv-selected-".concat(t,"-").concat(n.cssPostFix));else if("radio"===n.ratingButtons.type)e.classList.remove("apxor-survey-radiobutton-selected-".concat(t,"-").concat(n.cssPostFix)),n.ratingButtons.prevSelectedRadioButton===t&&e.firstChild.classList.add("apxor-survey-radiobutton-inner-".concat(t,"-hidden-").concat(n.cssPostFix));else if("star"===n.ratingButtons.type){e.firstChild.remove();var r="",s="";n.ratingButtons.enable_colors?(r="white",s=n.ratingButtons.buttons[t].color):n.ratingButtons.enable_box_model?(r=n.ratingButtons.color_inactive,s=n.ratingButtons.box_model.inactive_color):(r=n.ratingButtons.color_inactive,s="transparent"),e.innerHTML=n.getStarSvg(36,36,r,s),e.classList.remove("apxor-survey-starbutton-active-".concat(t).concat(n.cssPostFix))}else"emoji"===n.ratingButtons.type&&(e.classList.remove("apxor-survey-emoji-buttondiv-active-".concat(t,"-").concat(n.cssPostFix)),n.ratingButtons.enable_fade||n.ratingButtons.enable_shadow?e.classList.add("apxor-survey-emoji-buttondiv-inactive-".concat(t,"-").concat(n.cssPostFix)):e.classList.remove("apxor-survey-emoji-buttondiv-inactive-".concat(t,"-").concat(n.cssPostFix)))}))}"slider"===this.ratingButtons.type&&this.rating.enable_qands&&(this.createQansSContainer(this.ratingButtons.prev_selected_button),this.anyActiveChoices=!0)}}}},{key:"getSliderStyles",value:function(){var e="\n .range{\n height: 80px;\n width: 380px;\n background: #fff;\n border-radius: 10px;\n padding: 0 65px 0 45px;\n background:transparent;\n }\n .sliderValue{\n position: relative;\n width: 100%;\n }\n .sliderValue span{\n position: absolute;\n text-align:center;\n height: 45px;\n width: 45px;\n transform: translateX(-50%) scale(0);\n font-weight: 500;\n top: -40px;\n line-height: 55px;\n z-index: 2;\n color: #fff;\n transform-origin: bottom;\n transition: transform 0.3s ease-in-out;\n }\n .sliderValue span.show{\n transform: translateX(-50%) scale(1);\n }\n .sliderValue span:after{\n position: absolute;\n content: '';\n height: 100%;\n width: 100%;\n background: #664AFF;\n border: 3px solid #fff;\n z-index: -1;\n left: 50%;\n transform: translateX(-50%) rotate(45deg);\n border-bottom-left-radius: 50%;\n box-shadow: 0px 0px 8px rgba(0,0,0,0.1);\n border-top-left-radius: 50%;\n border-top-right-radius: 50%;\n }\n .field{\n display: flex;\n align-items: center;\n justify-content: center;\n height: 100%;\n position: relative;\n }\n \n .range input{\n -webkit-appearance: none;\n width: 100%;\n height: 8px;\n background: #ddd;\n border-radius: 5px;\n outline: none;\n border: none;\n z-index: 2222;\n }\n .range input::-webkit-slider-thumb{\n -webkit-appearance: none;\n width: 20px;\n height: 20px;\n background: red;\n border-radius: 50%;\n background: #664AFF;\n border: 1px solid #664AFF;\n cursor: pointer;\n }\n .range input::-moz-range-thumb{\n -webkit-appearance: none;\n width: 20px;\n height: 20px;\n background: red;\n border-radius: 50%;\n background: #664AFF;\n border: 1px solid #664AFF;\n cursor: pointer;\n }\n .range input::-moz-range-progress{\n background: #664AFF; //this progress background is only shown on Firefox\n }".replaceAll("\n","").replace(/[\s]{2,999}/g,""),t=document.createElement("style");return t.innerHTML=e,this.overlayElement.appendChild(t),e}},{key:"resetQandSState",value:function(e){-1!==e&&(this.rating.stateOfQandS[e].suggestion=[],this.rating.stateOfQandS[e].input_field="")}},{key:"createQansSContainer",value:function(e){var t,n=this;this.QandSContainer.innerHTML="";var i=this.getcurrentQandSArrayIndexFromQandSPaths(this.rating,parseInt(this.ratingButtons.start_from_index+e));if(-1!==i){var o=document.createElement("div");o.setAttribute("apx-survey-key","qands-element"),o.classList.add("apxor-survey-nps-qands-container-element-".concat(i,"-").concat(e,"-").concat(this.cssPostFix));var a=document.createElement("div");a.classList.add("apxor-survey-nps-qands-question-container".concat(this.cssPostFix)),null!==(t=this.QandSArray[i])&&void 0!==t&&t.enable_question&&(this.QandSArray[i].question.enable_title&&(this._getTitleStyles(this.QandSArray[i].question.title,"nps-question-title-".concat(i,"-").concat(e)),a.appendChild(this._setTitleContent(this.QandSArray[i].question.title,"nps-question-title-".concat(i,"-").concat(e),this.configId))),this.QandSArray[i].question.enable_description&&(this._getDescriptionStyles(this.QandSArray[i].question.description,"nps-question-description-".concat(i,"-").concat(e)),a.appendChild(this._setDescriptionContent(this.QandSArray[i].question.description,"nps-question-description-".concat(i,"-").concat(e),this.configId))));var r=document.createElement("div");r.classList.add("apxor-survey-nps-qands-suggestion-container".concat(this.cssPostFix)),this.QandSArray[i].enable_suggestion&&(this._getNpsSuggestionElementStyles(this.QandSArray[i].suggestion,i,e),this.QandSArray[i].suggestion.text.forEach((function(t,o){var a=document.createElement("div");a.classList.add("apxor-survey-nps-qands-".concat(i,"-").concat(e,"-suggestion-").concat(o,"-").concat(n.cssPostFix)),n.rating.stateOfQandS[e].suggestion.includes(o)&&a.classList.add("apxor-survey-nps-qands-".concat(i,"-").concat(e,"-suggestion-").concat(o,"-selected-").concat(n.cssPostFix)),a.setAttribute("apx-nps-survey-key","suggestion"),a.innerText=t,a.onclick=function(){document.querySelectorAll('div[apx-nps-survey-key="suggestion"]').forEach((function(t,a){if(o===a)if(n.rating.stateOfQandS[e].suggestion.includes(o)){t.classList.remove("apxor-survey-nps-qands-".concat(i,"-").concat(e,"-suggestion-").concat(a,"-selected-").concat(n.cssPostFix));var r=n.rating.stateOfQandS[e].suggestion.indexOf(o);n.rating.stateOfQandS[e].suggestion.splice(r,1)}else t.classList.add("apxor-survey-nps-qands-".concat(i,"-").concat(e,"-suggestion-").concat(a,"-selected-").concat(n.cssPostFix)),n.rating.stateOfQandS[e].suggestion.push(o)}))},r.appendChild(a)})));var s=document.createElement("div");if(s.classList.add("apxor-survey-nps-qands-inputtextfield-container".concat(this.cssPostFix)),this.QandSArray[i].enable_input_text&&0!==Object.keys(this.answer.input_text).length){this.getTextAreaNodeStyles(this.answer,"qands");var l=this.getTextAreaNode(this.answer.input_text,this.rating.stateOfQandS[e].input_field,"qands");l.addEventListener("input",(function(t){n.rating.stateOfQandS[e].input_field=t.target.value})),s.appendChild(l)}o.appendChild(a),o.appendChild(r),o.appendChild(s),this.QandSContainer.appendChild(o)}}},{key:"createReactionAndMessageContainer",value:function(e){this.npsTopContainer.innerHTML="",this.npsTopContainerMessage.innerHTML="";var t=this.getReactionIndexFromReactionPath(this.rating,parseInt(this.ratingButtons.start_from_index+e));if(-1!==t){var n=document.createElement("div");n.setAttribute("apx-survey-key","rating-message"),n.classList.add("apxor-survey-nps-topcontainer-element-".concat(t,"-").concat(this.ratingButtons.start_from_index+e,"-").concat(this.cssPostFix));var i=document.createElement("div");i.classList.add("apxor-survey-nps-topcontainer-text-element-".concat(t,"-").concat(this.ratingButtons.start_from_index+e,"-").concat(this.cssPostFix)),this.reactions[t].enable_text&&"above_image"===this.reactions[t].text_position&&(this._getTitleStyles(this.reactions[t].text,"reaction-text-".concat(t)),i.appendChild(this._setTitleContent(this.reactions[t].text,"reaction-text-".concat(t),"")),n.appendChild(i));var o=document.createElement("div");if(o.classList.add("apxor-survey-nps-topcontainer-image-element-".concat(t,"-").concat(this.cssPostFix)),this.reactions[t].enable_image){this._getNpsTopImageStyles(this.reactions[t].image,t);var a=document.createElement("img");a.src=this.reactions[t].image.path,a.classList.add("apxor-survey-npstopcontainer-image-".concat(t)),o.appendChild(a)}n.appendChild(o),this.reactions[t].enable_text&&"below_image"===this.reactions[t].text_position&&(this._getTitleStyles(this.reactions[t].text,"reaction-text-".concat(t)),i.appendChild(this._setTitleContent(this.reactions[t].text,"reaction-text-".concat(t),"")),n.appendChild(i)),this.reactions[t].enable_text&&"below_buttons"===this.reactions[t].text_position&&(this._getTitleStyles(this.reactions[t].text,"reaction-text-".concat(t)),i.appendChild(this._setTitleContent(this.reactions[t].text,"reaction-text-".concat(t),"")),this.npsTopContainerMessage.appendChild(i)),this.npsTopContainer.appendChild(n)}}},{key:"changeButtonColor",value:function(e){if(this.QandAArray[this.index].is_required)if(e){if(document.getElementById("apxor-survey_bottom-next-button")){var t=document.getElementById("apxor-survey_bottom-next-button");t.style.pointerEvents="visible",t.style.background="".concat(this.buttonColorObject.next.active_color)}if(document.getElementById("apxor-survey_bottom-submit-button")){var n=document.getElementById("apxor-survey_bottom-submit-button");n.style.pointerEvents="visible",n.style.background="".concat(this.buttonColorObject.submit.active_color)}}else{if(document.getElementById("apxor-survey_bottom-next-button")){var i=document.getElementById("apxor-survey_bottom-next-button");i.style.pointerEvents="none",i.style.background="".concat(this.buttonColorObject.next.inactive_color)}if(document.getElementById("apxor-survey_bottom-submit-button")){var o=document.getElementById("apxor-survey_bottom-submit-button");o.style.pointerEvents="none",o.style.background="".concat(this.buttonColorObject.submit.inactive_color)}}}},{key:"getReactionIndexFromReactionPath",value:function(e,t){if(!e.enable_reaction)return-1;var n=e.reaction_paths,i=-1;return Object.keys(n).forEach((function(e){n[e].includes(t)&&(i=e)})),i}},{key:"getcurrentQandSArrayIndexFromQandSPaths",value:function(e,t){if(!e.enable_qands)return-1;var n=e.qandsPaths,i=-1;return Object.keys(n).forEach((function(e){n[e].includes(t)&&(i=e)})),parseInt(i)}},{key:"_getNpscontainerStyles",value:function(e){var t="";e.enable_margin&&(t="\n margin:".concat(e.margin.top,"px ").concat(e.margin.right,"px ").concat(e.margin.bottom,"px ").concat(e.margin.left,"px\n "));var n="";e.enable_padding&&(n="\n padding:".concat(e.padding.top,"px ").concat(e.padding.right,"px ").concat(e.padding.bottom,"px ").concat(e.padding.left,"px\n "));var i="";e.enable_border&&(i="\n border:".concat(e.border.width,"px ").concat(e.border.style," ").concat(e.border.color));var o="\n .apxor-survey-nps-container".concat(this.cssPostFix,"{\n width:auto;\n height:auto;\n display:flex;\n flex-direction:column;\n align-items:center;\n ").concat(t,";\n ").concat(n,";\n ").concat(i,";\n }").replaceAll("\n","").replace(/[\s]{2,999}/g,""),a=document.createElement("style");return a.innerHTML=o,this.overlayElement.appendChild(a),o}},{key:"_getNpsTopContainerStyles",value:function(){return"\n .apxor-survey-nps-topcontainer".concat(this.cssPostFix,"{\n width:100%;\n height:auto;\n display:flex;\n flex-direction:column;\n align-items:center;\n position:relative;\n margin:8px 0px 8px 0px;\n }\n .apxor-survey-nps-topcontainer-message").concat(this.cssPostFix,"{\n width:100%;\n height:auto;\n display:flex;\n flex-direction:column;\n align-items:center;\n position:relative;\n margin:8px 0px 8px 0px;\n }")}},{key:"_getNpsTopImageStyles",value:function(e,t){var n,i="";e.enable_border&&(i="\n border-radius:".concat(e.border.radius,"%;\n border:").concat(e.border.width,"px ").concat(e.border.style," ").concat(e.border.color,";\n "));var o="";e.enable_margin&&(o="\n margin:".concat(e.margin.top,"px ").concat(e.margin.right,"px ").concat(e.margin.bottom,"px ").concat(e.margin.left,"px;\n ")),n="\n .apxor-survey-nps-topcontainer-image-element-".concat(t,"-").concat(this.cssPostFix,"{\n width:100%;\n height:100%;\n text-align:").concat(e.position,";\n margin:4px 0px 4px 0px;\n }\n .apxor-survey-npstopcontainer-image-").concat(t,"{\n height: ").concat(e.height,"px;\n width: ").concat(e.width,"px;\n ").concat(i,";\n ").concat(o,";\n }").replaceAll("\n","").replace(/[\s]{2,999}/g,"");var a=document.createElement("style");return a.innerHTML=n,this.overlayElement.appendChild(a),n}},{key:"_getRatingBlockStyles",value:function(){return"\n .apxor-survey-ratingdiv".concat(this.cssPostFix,"{\n display:flex;\n flex-direction:column;\n align-items:center;\n width:100%;\n height:auto;\n margin:24px 0px 24px 0px;\n }\n .apxor-survey-topratingdiv").concat(this.cssPostFix,"{\n position:relative;\n display:flex;\n align-items:center;\n justify-content:center;\n width:auto;\n height:auto;\n }\n .apxor-survey-bottomratingdiv").concat(this.cssPostFix,"{\n position:relative;\n display:flex;\n align-items:center;\n justify-content:center;\n width:auto;\n height:auto;\n }")}},{key:"_getRatingNumberButtonStyles",value:function(e){var t=_setFontFaceAtRule(e.font),n="";null!=e&&e.font&&(n="\n font-size:".concat(e.font.size,"px;\n font-family:").concat(t[0],";\n font-style:").concat(e.font.style,";\n font-weight:").concat(e.font.weight,";\n "));var i="";e.enable_margin&&(i="\n margin:".concat(e.margin.top,"px ").concat(e.margin.right,"px ").concat(e.margin.bottom,"px ").concat(e.margin.left,"px;\n "));var o="";e.enable_padding&&(o="\n padding:".concat(e.padding.top,"px ").concat(e.padding.right,"px ").concat(e.padding.bottom,"px ").concat(e.padding.left,"px;\n "));var a="";e.enable_border&&(a="\n border:".concat(e.border.width,"px ").concat(e.border.style," ").concat(e.border.inactive_color,";\n border-radius:").concat(e.border.radius,"px;\n "));var r="";e.enable_border&&(r="\n border:".concat(e.border.width,"px ").concat(e.border.style," ").concat(e.border.color,";\n border-radius:").concat(e.border.radius,"px;\n "));for(var s="",l=0;l<e.buttons.length;l++)s+="\n ".concat(t[1],"\n .apxor-survey-buttondiv-").concat(l,"-").concat(this.cssPostFix,"{\n cursor:pointer;\n position:relative;\n display: flex;\n justify-content: space-evenly;\n align-items: center;\n width: ").concat(e.width,"px;\n height: ").concat(e.height,"px;\n ").concat(n,";\n ").concat(i,";\n ").concat(o,";\n ").concat(a,";\n color:").concat(e.color_inactive,";\n background-color: ").concat(e.enable_colors?e.buttons[l].color:e.bg_color_inactive,";\n }\n .apxor-survey-buttondiv-selected-").concat(l,"-").concat(this.cssPostFix,"{\n background:").concat(e.bg_color_active,"!important;\n color:").concat(e.color_active," !important;\n ").concat(r,";\n }");var c="\n .apxor-survey-buttondiv-unselected{\n opacity:0.3!important;\n }\n ".concat(s,";\n ").replaceAll("\n","").replace(/[\s]{2,999}/g,""),d=document.createElement("style");return d.innerHTML=c,this.overlayElement.appendChild(d),c}},{key:"_getRatingRadioButtonStyles",value:function(e){var t=this,n="";e.font&&(n="\n font-size:".concat(e.font.size,"px;\n font-family:").concat(e.font.family,";\n font-style:").concat(e.font.style,";\n font-weight:").concat(e.font.weight,";\n "));var i="";e.enable_margin&&(i="\n margin:".concat(e.margin.top,"px ").concat(e.margin.right,"px ").concat(e.margin.bottom,"px ").concat(e.margin.left,"px;\n "));var o="";e.enable_padding&&(o="\n padding:".concat(e.padding.top,"px ").concat(e.padding.right,"px ").concat(e.padding.bottom,"px ").concat(e.padding.left,"px;\n "));var a="";e.buttons.forEach((function(r,s){a+="\n .apxor-survey-radio-button-container-".concat(s,"-styling").concat(t.cssPostFix,"{\n width:auto;\n height:auto;\n display:flex;\n flex-direction:column;\n justify-content:center;\n align-items:center;\n gap:4px;\n ").concat(i,";\n ").concat(o,";\n }\n .apxor-survey-radiobutton-").concat(s,"-").concat(t.cssPostFix,"{\n cursor:pointer;\n position:relative;\n display: flex;\n justify-content: center;\n align-items: center;\n width: ").concat(e.width,"px;\n height: ").concat(e.height,"px;\n margin:0px 2px 0px 2px;\n border-radius:50px;\n border:2px solid ").concat(e.bg_color_inactive,";\n }\n .apxor-survey-radiobutton-selected-").concat(s,"-").concat(t.cssPostFix,"{\n border:2px solid ").concat(e.bg_color_active,";\n }\n .apxor-survey-radiobutton-inner-").concat(s,"-").concat(t.cssPostFix,"{\n width:").concat(e.width-10,"px;\n height:").concat(e.height-10,"px;\n border-radius:50px;\n background-color:").concat(e.bg_color_active,";\n }\n .apxor-survey-radiobutton-inner-").concat(s,"-hidden-").concat(t.cssPostFix,"{\n display:none;\n }\n .apxor-survey-radiobutton-text-").concat(s,"-").concat(t.cssPostFix,"{\n ").concat(n,";\n color:").concat(e.color_inactive,"\n }\n .apxor-survey-radiobutton-text-").concat(s,"-selected-").concat(t.cssPostFix,"{\n color:").concat(e.color_active,"\n }\n ")}));var r="\n ".concat(a).replaceAll("\n","").replace(/[\s]{2,999}/g,""),s=document.createElement("style");return s.innerHTML=r,this.overlayElement.appendChild(s),r}},{key:"getStarButtonStyling",value:function(e){var t=this,n="";e.enable_margin&&(n="\n margin:".concat(e.margin.top,"px ").concat(e.margin.right,"px ").concat(e.margin.bottom,"px ").concat(e.margin.left,"px\n ")),e.enable_box_model&&(e.border.color=e.box_model.active_color,e.border.inactive_color=e.box_model.inactive_color);var i="",o="";e.enable_border&&(i="\n border-radius:".concat(e.border.radius,"px;\n border:").concat(e.border.width,"px ").concat(e.border.style," ").concat(e.border.inactive_color,";\n "),o="\n border-radius:".concat(e.border.radius,"px;\n border:").concat(e.border.width,"px ").concat(e.border.style," ").concat(e.border.color,";\n "));var a="";e.buttons.forEach((function(r,s){a+="\n .apxor-survey-starbutton-".concat(s).concat(t.cssPostFix,"{\n position:relative;\n width:auto;\n display:flex;\n justify-content:center;\n align-items:center;\n background:").concat(e.bg_color_inactive,";\n ").concat(i,";\n ").concat(n,";\n }\n .apxor-survey-starbutton-active-").concat(s).concat(t.cssPostFix,"{\n background:").concat(e.bg_color_active,";\n ").concat(o,";\n }")}));var r="".concat(a,"\n ").replaceAll("\n","").replace(/[\s]{2,999}/g,""),s=document.createElement("style");return s.innerHTML=r,this.overlayElement.appendChild(s),r}},{key:"getEmojiButtonStyling",value:function(e){var t=this,n="";e.enable_margin&&(n="\n margin:".concat(e.margin.top,"px ").concat(e.margin.right,"px ").concat(e.margin.bottom,"px ").concat(e.margin.left,"px;\n "));var i="";e.enable_padding&&(i="\n padding:".concat(e.padding.top,"px ").concat(e.padding.right,"px ").concat(e.padding.bottom,"px ").concat(e.padding.left,"px;\n "));var o="",a="";e.enable_border&&(o="\n border: ".concat(e.border.width,"px ").concat(e.border.style," transparent;\n "),a="\n border: ".concat(e.border.width,"px ").concat(e.border.style," ").concat(e.border.color,";\n "));var r="";e.enable_shadow&&(r="\n text-shadow: ".concat(e.shadow.offset_x,"px ").concat(e.shadow.offset_y,"px 12px ").concat(e.shadow.color,";\n "));var s="",l="";e.enable_fade?(s="\n opacity:1;\n ",l="\n opacity:0.5;\n "):e.enable_shadow?(s="\n font-size:".concat(e.width+4,"px;\n ").concat(r,";\n "),l="\n font-size:".concat(e.width-4,"px;\n ")):(s="\n ".concat(a,";\n background:").concat(e.bg_color_active,";\n "),l="\n ");var c="";e.buttons.forEach((function(a,r){c+="\n .apxor-survey-emoji-buttondiv-".concat(r,"-").concat(t.cssPostFix,"{\n position:relative;\n display:flex;\n justify-content:center;\n align-items:center;\n overflow:hidden;\n font-size:").concat(e.width,"px;\n ").concat(n,";\n ").concat(i,";\n ").concat(o,";\n }\n .apxor-survey-emoji-buttondiv-active-").concat(r,"-").concat(t.cssPostFix,"{\n ").concat(s,";\n }\n .apxor-survey-emoji-buttondiv-inactive-").concat(r,"-").concat(t.cssPostFix,"{\n ").concat(l,";\n }\n ")}));var d;d="\n ".concat(c,"\n ").replaceAll("\n","").replace(/[\s]{2,999}/g,"");var p=document.createElement("style");return p.innerHTML=d,this.overlayElement.appendChild(p),d}},{key:"getRatingLabelsStyling",value:function(e,t){var n=0,i=0;e.enable_margin&&(n=e.margin.left,i=e.margin.right);var o="\n .apxor-survey-rating-first-label-styles-".concat(this.cssPostFix,"{\n position:absolute;\n pointer-events:none;\n ").concat("top"===t.first_rating.position?"bottom:100%;":"top:100%;","\n left:").concat(n,"px;\n }\n .apxor-survey-rating-last-label-styles-").concat(this.cssPostFix,"{\n position:absolute;\n pointer-events:none;\n ").concat("top"===t.last_rating.position?"bottom:100%;":"top:100%;","\n right:").concat(i,"px;\n }\n ").replaceAll("\n","").replace(/[\s]{2,999}/g,""),a=document.createElement("style");return a.innerHTML=o,this.overlayElement.appendChild(a),o}},{key:"getStarSvg",value:function(e,t,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"transparent",o='<svg xmlns="http://www.w3.org/2000/svg" width="'.concat(e,'" height="').concat(t,'" viewBox="0 0 36 33" fill="none">\n <path d="M18 0L22.0413 12.4377H35.119L24.5389 20.1246L28.5801 32.5623L18 24.8754L7.41987 32.5623L11.4611 20.1246L0.880983 12.4377H13.9587L18 0Z" fill="').concat(n,'" stroke="').concat(i,'"/>\n </svg>\n ');return o}},{key:"getNpsQandSContainerStyles",value:function(){return"\n .apxor-survey-nps-reactionandmessage-container".concat(this.cssPostFix,"{\n width:100%;\n\n }\n .apxor-survey-nps-qands-container").concat(this.cssPostFix,"{\n width:100%;\n height:auto;\n display:flex;\n flex-direction:column;\n }\n .apxor-survey-nps-qands-question-container").concat(this.cssPostFix,"{\n width:100%;\n height:auto;\n display:flex;\n flex-direction:column;\n margin:4px 0px 4px 0px;\n }\n .apxor-survey-nps-qands-suggestion-container").concat(this.cssPostFix,"{\n display:flex;\n flex-direction:row;\n flex-wrap:wrap;\n width:100%;\n margin:4px 0px 4px 0px;\n }\n .apxor-survey-nps-qands-inputtextfield-container").concat(this.cssPostFix,"{\n width:100%;\n height:auto;\n margin:4px 0px 4px 0px;\n }")}},{key:"_getNpsTopContainerElementStyles",value:function(){var e=this;if(this.rating.enable_reaction||0!==Object.keys(this.reactions).length){var t="";this.reactions.forEach((function(n,i){for(var o=n.start;o<=n.end;o++)t+="\n .apxor-survey-nps-topcontainer-element-".concat(i,"-").concat(o,"-").concat(e.cssPostFix,"{\n width:100%;\n height:100%;\n display:flex;\n flex-direction:column;\n align-items:center;\n }\n .apxor-survey-nps-topcontainer-text-element-").concat(i,"-").concat(o,"-").concat(e.cssPostFix,"{\n width:100%;\n height:100%;\n margin:4px 0px 4px 0px;\n }")}));var n="\n ".concat(t,"\n ;\n ").replaceAll("\n","").replace(/[\s]{2,999}/g,""),i=document.createElement("style");return i.innerHTML=n,this.overlayElement.appendChild(i),n}}},{key:"_getNpsQandSContainerElementStyles",value:function(){var e=this;if(this.rating.enable_qands||0!==Object.keys(this.QandSArray).length){var t="";this.QandSArray.forEach((function(n,i){for(var o=n.start;o<=n.end;o++)t+="\n .apxor-survey-nps-qands-container-element-".concat(i,"-").concat(o,"-").concat(e.cssPostFix,"{\n width:100%;\n height:auto;\n display:flex;\n flex-direction:column;\n align-items:center;\n }\n .apxor-survey-nps-qands-container-element-").concat(i,"-").concat(o,"-hidden-").concat(e.cssPostFix,"{\n display:none;\n }")}));var n="\n ".concat(t,"\n ;\n ").replaceAll("\n","").replace(/[\s]{2,999}/g,""),i=document.createElement("style");return i.innerHTML=n,this.overlayElement.appendChild(i),n}}},{key:"_getNpsSuggestionElementStyles",value:function(e,t,n){var i=this,o="";o=e.enable_margin?"\n margin:".concat(e.margin.top||4,"px ").concat(e.margin.right||4,"px ").concat(e.margin.bottom||4,"px ").concat(e.margin.left||4,"px;\n "):"\n margin:0px 4px 0px 4px;\n ";var a="";a=e.enable_padding?"\n padding:".concat(e.padding.top||8,"px ").concat(e.padding.right||16,"px ").concat(e.padding.bottom||8,"px ").concat(e.padding.left||16,"px;\n "):"\n padding:8px 16px 8px 16px;\n ";var r="";r=e.enable_border?"\n border-radius: ".concat(e.border.radius||16,"px;\n border: ").concat(e.border.width||2,"px ").concat(e.border.style," ").concat(e.border.color,";\n "):"\n border-radius: 16px;\n border:2px solid black;\n ";var s,l=_setFontFaceAtRule(e.font);s="\n font-size:".concat(e.font.size,"px;\n font-family:").concat(l[0],";\n font-style:").concat(e.font.style,";\n font-weight:").concat(e.font.weight,";\n ");var c="";e.text.forEach((function(d,p){c+="\n ".concat(l[1],"\n .apxor-survey-nps-qands-").concat(t,"-").concat(n,"-suggestion-").concat(p,"-").concat(i.cssPostFix,"{\n color:").concat(e.color_inactive,";\n background:").concat(e.bg_color_inactive,";\n ").concat(a,";\n ").concat(o,";\n ").concat(r,";\n ").concat(s,";\n }\n .apxor-survey-nps-qands-").concat(t,"-").concat(n,"-suggestion-").concat(p,"-selected-").concat(i.cssPostFix,"{\n background:").concat(e.bg_color_active,"!important;\n color:").concat(e.color_active," !important;\n }")}));var d="\n ".concat(c,";\n ").replaceAll("\n","").replace(/[\s]{2,999}/g,""),p=document.createElement("style");return p.innerHTML=d,this.overlayElement.appendChild(p),d}},{key:"getTextAreaNodeStyles",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n="";e.enable_margin&&"qands"!==t&&(n="\n margin:".concat(e.margin.top,"px ").concat(e.margin.right,"px ").concat(e.margin.bottom,"px ").concat(e.margin.left,"px\n "));var i,o,a="";i=0===e.padding.left?10:e.padding.left,o=0===e.padding.top?2:e.padding.top,e.enable_padding&&(a="\n padding:".concat(o,"px ").concat(e.padding.right,"px ").concat(e.padding.bottom,"px ").concat(i,"px\n "));var r="";e.input_text.enable_border&&(r="\n border:".concat(e.input_text.border.width,"px ").concat(e.input_text.border.style," ").concat(e.input_text.border.color,";\n border-radius:").concat(e.input_text.border.radius,"px;\n "));var s="";null!=e&&e.font&&(s="\n font-size:".concat(e.font.size,"px;\n font-family:").concat(e.font.family,";\n font-style:").concat(e.font.style,";\n font-weight:").concat(e.font.weight,";\n "));var l="";e.input_text.enable_placeholder&&(l="\n color:".concat(e.input_text.placeholder.color,";"));var c="\n .apxor-survey-".concat(t,"-textarea-container").concat(this.cssPostFix,"{\n display:flex;\n align-items:center;\n position:relative;\n ").concat(n,";\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n }\n .apxor-survey-").concat(t,"-textarea-content").concat(this.cssPostFix,"{\n width:100%;\n background-color:").concat(e.input_text.background_color,";\n color:").concat(e.input_text.text_color,";\n ").concat(s,";\n ").concat(a,";\n ").concat(r,";\n }\n .apxor-survey-").concat(t,"-textarea-content").concat(this.cssPostFix,"::placeholder{\n ").concat(l,";\n }\n ").replaceAll("\n","").replace(/[\s]{2,999}/g,""),d=document.createElement("style");return d.innerHTML=c,this.overlayElement.appendChild(d),c}},{key:"getTextAreaNode",value:function(e,t){var n=this,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";if(0!==Object.keys(e).length){var o=e.max_characters,a=e.placeholder,r=a.text;a.color;var s=document.createElement("div");s.classList.add("apxor-survey-".concat(i,"-textarea-container").concat(this.cssPostFix));var l=document.createElement("textarea");return l.classList.add("apxor-survey-".concat(i,"-textarea-content").concat(this.cssPostFix)),l.setAttribute("placeholder",r),l.setAttribute("maxlength",o),l.classList.add("apxor-survey-".concat(i,"-textarea-content").concat(this.cssPostFix,"::placeholder")),""!==t&&""!==t.trim()&&(l.innerText=t),addEventListener("change",(function(e){n.freeTextValue=l.value})),s.appendChild(l),s}}},{key:"_setCloseButton",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",i=document.createElement("div");return e.type===CLOSE_BUTTON_STYLE.NORMAL?i.innerHTML=getCloseSVG(e.width,e.height,e.color):e.type===CLOSE_BUTTON_STYLE.FILL?"circle"===e.shape?i.innerHTML=getCloseWithCircleSVG(e.width,e.height,e.fill_color,e.color):i.innerHTML=getCloseWithRectangleSVG(e.width,e.height,e.fill_color,e.color):i.innerHTML='<img src="'.concat(e.path,'" width="').concat(e.width,'px" height="').concat(e.height,'px"></img>'),i.classList.add("apxor-".concat(n,"close-button").concat(this.cssPostFix)),i.addEventListener("click",(function(){document.body.removeChild(t.overlayElement),t.closeCallback(),t.enable_survey_request?t._logSurveyAppEvent("apx_survey_dialog_close_icon_clicked",{apx_survey_id:t.configId,apx_survey_name:t.name,apx_survey_type:!0,apx_time_to_complete:Math.round((Date.now()-t.startTime)/1e3),campaign_type:"survey"}):t._logSurveyAppEvent("apx_survey_close_button_clicked",{apx_survey_id:t.configId,apx_survey_name:t.name,apx_survey_question_id:t.QandAArray[t.index].question.id,apx_survey_type:!0,apx_time_to_complete:Math.round((Date.now()-t.startTime)/1e3),campaign_type:"survey"}),t._logSurveyQuestionEvent(t.index),t._submitSurveyResponses(!1)})),i}},{key:"_setBackButton",value:function(){var e=this;if(this.enable_header&&this.header.enable_back_button){var t=document.createElement("div");return this.header.backbutton.type===BACK_BUTTON_STYLE.NORMAL?t.innerHTML=getBackSVG(this.header.backbutton.width,this.header.backbutton.height,this.header.backbutton.color):this.header.backbutton.type===BACK_BUTTON_STYLE.FILL?t.innerHTML=getFilledBackArrowSvg(this.header.backbutton.width,this.header.backbutton.height,this.header.backbutton.fill_color):t.innerHTML='<img src="'.concat(this.header.backbutton.path,'" width="').concat(this.header.backbutton.width,'px" height="').concat(this.header.backbutton.height,'px"></img>'),t.classList.add("apxor-back-button".concat(this.cssPostFix)),t.addEventListener("click",(function(){var t;document.body.removeChild(e.overlayElement),e._logSurveyAppEvent("apx_survey_back_button_clicked",{apx_question_id:e.QandAArray[e.index].question.id,apx_question_name:null!==(t=e.QandAArray[e.index].question.title.text)&&void 0!==t?t:"",apx_question_type:e.QandAArray[e.index].answer.answer_mode,apx_question_position:e.index+1,apx_survey_id:e.configId,apx_survey_name:e.name,apx_survey_type:!0,campaign_type:"survey"}),e.index=e.visitedQuestion.pop(),e.index<0?e.closeCallback():e.createSurvey()})),t}}},{key:"_setProgressBar",value:function(){if(this.enable_progressbar&&1!=this.QandArrayLength){var e=document.createElement("div");e.classList.add("apxor-survey-progress-bar".concat(this.cssPostFix));var t=document.createElement("div");return t.classList.add("apxor-survey-bar".concat(this.cssPostFix)),this.index<=this.QandAArray.length?t.style.transform="translateX(".concat(-(100-100/this.QandAArray.length*(this.index+1)),"%)"):e.style.visibility="hidden",e.appendChild(t),e}}},{key:"_setTitleContent",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";resolveDynamicText(e);var i=document.createElement("div");return i.classList.add("apxor-survey-".concat(t,"-div").concat(this.cssPostFix)),i.appendChild(createNewTextElement(e,n,t)),i}},{key:"_setDescriptionContent",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";resolveDynamicText(e);var i=document.createElement("div");return i.classList.add("apxor-survey-".concat(t,"-div").concat(this.cssPostFix)),i.appendChild(createNewTextElement(e,n,t)),i}},{key:"_createButtonContainer",value:function(){this.bottomButtonContainer=document.createElement("div"),this.bottomButtonContainer.classList.add("apxor-survey-button-container".concat(this.cssPostFix)),this._setBottomButtonStyles(),this.bottomButtonContainer.appendChild(this._setButtons(this.footer.buttons)),this.surveyContainer.appendChild(this.bottomButtonContainer),this.changeButtonColor(this.anyActiveChoices)}},{key:"_setButtons",value:function(e){var t,n,i=this,o=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.buttonColorObject={},e.forEach((function(e,t){i.buttonColorObject[e.action.type]={active_color:e.active_color,inactive_color:e.inactive_color},o&&"vertical"===i.surveyrequest.buttons_direction&&(e.type="wide",e.slot=3)}));var a=function(e,t){var n;if(i.visitedQuestion.push(i.index),document.body.removeChild(i.overlayElement),i._logSurveyAppEvent("apx_survey_skip_button_clicked",{apx_question_id:i.QandAArray[i.index].question.id,apx_question_name:null!==(n=i.QandAArray[i.index].question.title.text)&&void 0!==n?n:"",apx_question_type:i.QandAArray[i.index].answer.answer_mode,apx_question_position:i.index+1,apx_survey_id:i.configId,apx_survey_name:i.name,apx_survey_type:!0,campaign_type:"survey"}),i._logSurveyQuestionEvent(i.index),i.index+1>=i.QandAArray.length){if(i.enable_success_message)return;i.closeCallback()}else i.index+=1,i.createSurvey()},r=function(e,t){var n,o,a=!1,r=i.QandAArray[i.index].answer,s=r.answer_mode,l=void 0===s?"":s,c=r.choices,d=void 0===c?{}:c,p=r.input_text,u=void 0===p?{}:p,h=r.text_answer,g=void 0===h?{}:h,f=r.is_answered,m=void 0!==f&&f,_=null==d?void 0:d.list;switch(l){case"single_choice":case"multi_choice":_.forEach((function(e){(e.is_selected||e.is_other&&null!==e.other_answer&&""!==e.other_answer.trim())&&(a=!0)}));break;case"text":m&&""!==g&&""!==g.trim()&&null!==u&&(a=!0);break;case"rating":null!=i&&null!==(n=i.ratingButtons)&&void 0!==n&&n.selected_rating.includes(1)&&(a=!0)}a||i._logSurveyAppEvent("apx_survey_skip_button_clicked",{apx_question_id:i.QandAArray[i.index].question.id,apx_question_name:null!==(o=i.QandAArray[i.index].question.title.text)&&void 0!==o?o:"",apx_question_type:i.QandAArray[i.index].answer.answer_mode,apx_question_position:i.index+1,apx_survey_id:i.configId,apx_survey_name:i.name,apx_survey_type:!0});i.visitedQuestion.push(i.index),document.body.removeChild(i.overlayElement),i.survey.is_response_based_survey?(a&&i._logSurveyQuestionEvent(i.index),i.index=i._getNextQuestionByResponseBasedSurvey()?i.index:i.index+1,i.index===i.QandAArray.length?(i.enable_success_message||i.closeCallback(),i._submitSurveyResponses(!0)):i.createSurvey()):(a&&i._logSurveyQuestionEvent(i.index),i.index===i.QandAArray.length-1?(i.enable_success_message||i.closeCallback(),i._submitSurveyResponses(!0)):(i.index+=1,i.createSurvey()))},s=function(e,t){var n;document.body.removeChild(i.overlayElement),i._logSurveyAppEvent("apx_survey_prev_button_clicked",{apx_question_id:i.QandAArray[i.index].question.id,apx_question_name:null!==(n=i.QandAArray[i.index].question.title.text)&&void 0!==n?n:"",apx_question_type:i.QandAArray[i.index].answer.answer_mode,apx_question_position:i.index+1,apx_survey_id:i.configId,apx_survey_name:i.name,apx_survey_type:!0}),i.index=i.visitedQuestion.pop(),i.index<0?i.closeCallback():i.createSurvey()},l=function(e,t){if(i.enable_survey_request)i._logSurveyAppEvent("apx_survey_dialog_yes_clicked",{apx_survey_id:i.configId,apx_survey_name:i.name,apx_survey_type:!0,campaign_type:"survey"}),document.body.removeChild(i.overlayElement),i.enable_survey_request=!1,i.createSurvey();else{if(i.visitedQuestion.push(i.index),document.body.removeChild(i.overlayElement),i.index+1>=i.QandAArray.length)return void i.closeCallback();i.index+=1,i.createSurvey()}},c=function(e,t){i.enable_survey_request?(i._logSurveyAppEvent("apx_survey_dialog_no_clicked",{apx_survey_id:i.configId,apx_survey_name:i.name,apx_survey_type:!0,campaign_type:"survey"}),document.body.removeChild(i.overlayElement),i.closeCallback(),i.enable_survey_request=!1):(document.body.removeChild(i.overlayElement),i.closeCallback())},d=function(e,t){document.body.removeChild(i.overlayElement),i.closeCallback()},p=function(e,t){"next"===t?r():"prev"===t?s():"submit"===t?r():"skip"===t?a():"yes"===t?l():"no"===t?c():d()},u={complete:p,_isCancelled:!1,action:""},h=this.enable_survey_request?"row":this.direction.buttons,g=generateButtonsBlock(this.configId,this.name,{},EVENT_PREFIX.SURVEY,e,h,"","survey_bottom",u,!1,this.uis,0,"survey",o?null!==(t=null===(n=this.surveyrequest)||void 0===n?void 0:n.buttons_position)&&void 0!==t?t:"flex-end":"space-between");return g}},{key:"_getNextQuestionByResponseBasedSurvey",value:function(){var e,t,n,i,o=this,a=this._getAnswerForQuestion(this.index),r=null===(e=this.QandAArray[this.index])||void 0===e||null===(e=e.answer)||void 0===e?void 0:e.answer_mode,s=a.answers.sort(),l=(null==a||null===(t=a.answerTexts)||void 0===t?void 0:t[0])||"",c=null===(n=this.QandAArray[this.index].question)||void 0===n?void 0:n.paths,d=null===(i=this.QandAArray[this.index].question)||void 0===i?void 0:i.paths_v2,p=!1;switch(r){case"single_choice":case"multi_choice":case"rating":d?d.forEach((function(e){var t,n,i;p||(e.choices.forEach((function(e){if(e.length!==s.length||JSON.stringify(e.sort())!==JSON.stringify(s));else{var t;if(null!==(t=o.QandAArray[o.index])&&void 0!==t&&null!==(t=t.answer)&&void 0!==t&&t.is_text_mandatory&&a.isOtherChoiceSelected&&0===a.others.length)return;p=!0}})),null!=e&&e.is_wild_card&&(p=!0),p&&((null==e?void 0:e.action_type)===ACTION_TYPE.REDIRECT?(o._logSurveyAppEvent("apx_survey_redirected",{apx_question_id:o.QandAArray[o.index].question.id,apx_question_name:null!==(t=o.QandAArray[o.index].question.title.text)&&void 0!==t?t:"",apx_question_type:o.QandAArray[o.index].answer.answer_mode,apx_question_position:o.index+1,apx_survey_id:o.configId,apx_survey_name:o.name}),o.index=o.QandAArray.length,window.open(null==e||null===(n=e.action)||void 0===n?void 0:n.url,(null==e||null===(i=e.action)||void 0===i?void 0:i.type)===REDIRECT_TYPE.INTERNAL?"_self":"_blank")):(null==e?void 0:e.action_type)===ACTION_TYPE.SKIP&&("-1"===e.question_id?o.index=o.QandAArray.length:o.index=o.questionids.indexOf(parseInt(e.question_id)))))})):c&&Object.keys(c).forEach((function(e){p||c[e].forEach((function(t){if(t.length===s.length&&JSON.stringify(t.sort())===JSON.stringify(s)){var n;if(null!==(n=o.QandAArray[o.index])&&void 0!==n&&null!==(n=n.answer)&&void 0!==n&&n.is_text_mandatory&&a.isOtherChoiceSelected&&0===a.others.length)return;return p=!0,void(o.index="-1"===e?o.QandAArray.length:o.questionids.indexOf(parseInt(e)))}}))}));break;case"text":d?d.forEach((function(e){var t,n,i;p||(0===l.length||(p=!0,(null==e?void 0:e.action_type)===ACTION_TYPE.REDIRECT?(o._logSurveyAppEvent("apx_survey_redirected",{apx_question_id:o.QandAArray[o.index].question.id,apx_question_name:null!==(t=o.QandAArray[o.index].question.title.text)&&void 0!==t?t:"",apx_question_type:o.QandAArray[o.index].answer.answer_mode,apx_question_position:o.index+1,apx_survey_id:o.configId,apx_survey_name:o.name}),o.index=o.QandAArray.length,window.open(null==e||null===(n=e.action)||void 0===n?void 0:n.url,(null==e||null===(i=e.action)||void 0===i?void 0:i.type)===REDIRECT_TYPE.INTERNAL?"_self":"_blank")):(null==e?void 0:e.action_type)===ACTION_TYPE.SKIP&&("-1"===e.question_id?o.index=o.QandAArray.length:o.index=o.questionids.indexOf(parseInt(e.question_id)))))})):c&&Object.keys(c).forEach((function(e){if(!p)return 0!==l.length?(p=!0,void(o.index="-1"===e?o.QandAArray.length:o.questionids.indexOf(parseInt(e)))):void 0}))}return p}},{key:"_setSurveySuccessContainerStyles",value:function(){var e="\n ".concat(this._setBackgroundOverlaystyles()," \n ").concat(this._getSurveySuccessContainerStyles(),"\n ").concat(this._getSurveySuccessContainerIconStyles()," \n ").replaceAll("\n","").replace(/[\s]{2,999}/g,""),t=document.createElement("style");t.innerHTML=e,this.overlayElement.appendChild(t)}},{key:"_getSurveySuccessContainerStyles",value:function(){var e,t="";null!==(e=this.success_message)&&void 0!==e&&e.enable_margin&&(t="\n margin-top:".concat(this.success_message.margin.top,"px;\n margin-left:").concat(-this.success_message.margin.right,"px;\n "));var n="";switch(this.success_message.position.position){case"top-left":n="\n top:".concat(0,"px;\n left:").concat(0,"px;\n ");break;case"top-center":n="\n left:50%;\n top:".concat(0,"px;\n -webkit-transform: translate(-50%, ").concat(0,"px);\n -moz-transform: translate(-50%, ").concat(0,"px);\n ");break;case"top-right":n="\n top:".concat(0,"px;\n right:").concat(0,"px;\n ");break;case"bottom-left":n="\n bottom:".concat(0,"px;\n left:").concat(0,"px;\n ");break;case"bottom-center":n="\n left:50%;\n bottom:".concat(0,"px;\n -webkit-transform: translate(-50%, ").concat(0,"px);\n -moz-transform: translate(-50%, ").concat(0,"px);\n ");break;case"bottom-right":n="\n bottom:".concat(0,"px;\n right:").concat(0,"px;\n ");break;case"left":n="\n left:".concat(0,"px;\n top:50%;\n -webkit-transform: translate(").concat(0,"px, -50%);\n -moz-transform: translate(").concat(0,"px, -50%);\n ");break;case"right":n="\n right:".concat(0,"px;\n top:50%;\n -webkit-transform: translate(").concat(0,"px, -50%);\n -moz-transform: translate(").concat(0,"px, -50%);\n ");break;default:n="\n left:50%;\n top:50%;\n -webkit-transform: translate(-50%, -50%);\n -moz-transform: translate(-50%, -50%);\n "}var i="";return this.success_message.enable_border&&(i="\n border-radius:".concat(this.success_message.border.radius,"px;\n border:").concat(this.success_message.border.width,"px ").concat(this.success_message.border.style," ").concat(this.success_message.border.color,";\n ")),"\n .apxor-survey-Successcontainer".concat(this.cssPostFix,"{\n width: ").concat(this.success_message.width,"%;\n position: fixed;\n display:flex;\n flex-direction:column;\n align-items:center;\n z-index:999999;\n background: ").concat(this.success_message.background_color,";\n ").concat(t,";\n ").concat(n,";\n ").concat(i,"\n ").concat(this.success_message.enable_gradient?"background-image:linear-gradient(".concat(this.success_message.gradient.direction,", ").concat(this.success_message.gradient.colors[0],", ").concat(this.success_message.gradient.colors[1],");"):"","\n }")}},{key:"_getSurveySuccessContainerIconStyles",value:function(){var e="";if(this.success_message.enable_icon){var t="";this.success_message.icon.enable_border&&(t="\n border-radius:".concat(this.success_message.icon.border.radius,"%;\n border:").concat(this.success_message.icon.border.width,"px ").concat(this.success_message.icon.border.style," ").concat(this.success_message.icon.border.color,";\n "));var n="";this.success_message.icon.enable_margin&&(n="\n margin-top:".concat(this.success_message.icon.margin.top,"px;\n margin-bottom:").concat(this.success_message.icon.margin.bottom,"px;\n margin-left:").concat(this.success_message.icon.margin.left,"px;\n margin-right:").concat(this.success_message.icon.margin.right,"px;\n "));var i="";this.success_message.icon.enable_padding&&(i="\n padding-top:".concat(this.success_message.icon.padding.top,"px;\n padding-bottom:").concat(this.success_message.icon.padding.bottom,"px;\n padding-left:").concat(this.success_message.icon.padding.left,"px;\n padding-right:").concat(this.success_message.icon.padding.right,"px;\n ")),e="\n .apxor-success-icon-container".concat(this.cssPostFix,' {\n align-self:"center";\n }\n .apxor-success-icon-content').concat(this.cssPostFix," {\n height: ").concat(this.success_message.icon.height,"px;\n width: ").concat(this.success_message.icon.width,"px;\n ").concat(t,"\n ").concat(n,"\n ").concat(i,"\n }\n ")}return e}},{key:"_enableSuccessMessageContainer",value:function(){var e=this;if(this.enable_success_message){this._setBackgroundOverlay(),this._setSurveySuccessContainerStyles();var t=document.createElement("div");if(t.classList.add("apxor-survey-Successcontainer".concat(this.cssPostFix)),this.success_message.enable_icon){var n=document.createElement("div");n.classList.add("apxor-success-icon-container".concat(this.cssPostFix));var i=document.createElement("img");i.src=this.success_message.icon.path,i.classList.add("apxor-success-icon-content".concat(this.cssPostFix)),n.appendChild(i),t.appendChild(n)}var o=document.createElement("div");this.success_message.enable_title&&(this._getTitleStyles(this.success_message.title,"success-message-title"),o.appendChild(this._setTitleContent(this.success_message.title,"success-message-title",this.index))),this.success_message.enable_description&&(this._getDescriptionStyles(this.success_message.description,"success-message-description"),o.appendChild(this._setDescriptionContent(this.success_message.description,"success-message-description",this.index))),(this.success_message.enable_title||this.success_message.enable_description)&&(o.style.width="100%",t.appendChild(o)),this.overlayElement.appendChild(t),setTimeout((function(){document.body.removeChild(e.overlayElement),e.closeCallback()}),this.success_message.duration)}}}]),e}(),STYLISED_EMOJI_5=['<svg width="35" height="35" viewBox="0 0 23 22" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path d="M0 10.9046C0 4.88216 4.88188 3.24249e-05 10.9049 3.24249e-05C16.9267 3.24249e-05 21.8085 4.88216 21.8085 10.9046C21.8085 16.9269 16.9267 21.809 10.9049 21.809C4.88188 21.809 0 16.9269 0 10.9046Z" fill="#E5510A"/>\n <path d="M7.6916 8.87557C7.6916 9.62346 7.33083 10.2299 6.88691 10.2299C6.44426 10.2299 6.0835 9.62346 6.0835 8.87557C6.0835 8.12768 6.44426 7.52116 6.88691 7.52116C7.33083 7.52116 7.6916 8.12768 7.6916 8.87557Z" fill="black"/>\n <path d="M15.7255 8.87557C15.7255 9.62346 15.366 10.2299 14.9221 10.2299C14.4782 10.2299 14.1187 9.62346 14.1187 8.87557C14.1187 8.12768 14.4782 7.52116 14.9221 7.52116C15.366 7.52116 15.7255 8.12768 15.7255 8.87557Z" fill="black"/>\n <path d="M9.15239 6.99092L8.42062 7.72205L5.98096 5.28226L6.71273 4.55126L9.15239 6.99092Z" fill="black"/>\n <path d="M13.3882 7.72205L12.6577 6.99092L15.0974 4.55126L15.8279 5.28226L13.3882 7.72205Z" fill="black"/>\n <path d="M7 16.4995C8 12.4995 13 10.4995 15 16.4998" stroke="black" stroke-linecap="round"/>\n </svg>','<svg width="35" height="35" viewBox="0 0 23 22" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path d="M0.808594 10.9046C0.808594 4.88216 5.69048 3.24249e-05 11.7135 3.24249e-05C17.7353 3.24249e-05 22.6171 4.88216 22.6171 10.9046C22.6171 16.9269 17.7353 21.809 11.7135 21.809C5.69048 21.809 0.808594 16.9269 0.808594 10.9046Z" fill="#EA731D"/>\n <path d="M8.5002 8.87557C8.5002 9.62346 8.13942 10.2299 7.6955 10.2299C7.25286 10.2299 6.89209 9.62346 6.89209 8.87557C6.89209 8.12768 7.25286 7.52116 7.6955 7.52116C8.13942 7.52116 8.5002 8.12768 8.5002 8.87557Z" fill="black"/>\n <path d="M16.5341 8.87557C16.5341 9.62346 16.1746 10.2299 15.7307 10.2299C15.2867 10.2299 14.9272 9.62346 14.9272 8.87557C14.9272 8.12768 15.2867 7.52116 15.7307 7.52116C16.1746 7.52116 16.5341 8.12768 16.5341 8.87557Z" fill="black"/>\n <path d="M7.80859 16.4998C8.80859 12.4998 13.8086 10.4997 15.8086 16.5" stroke="black" stroke-linecap="round"/>\n </svg>','<svg width="35" height="35" viewBox="0 0 23 22" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path d="M0.234375 10.9046C0.234375 4.88216 5.11626 3.24249e-05 11.1393 3.24249e-05C17.161 3.24249e-05 22.0429 4.88216 22.0429 10.9046C22.0429 16.9269 17.161 21.809 11.1393 21.809C5.11626 21.809 0.234375 16.9269 0.234375 10.9046Z" fill="#F8C94F"/>\n <path d="M7.92598 8.87557C7.92598 9.62346 7.5652 10.2299 7.12128 10.2299C6.67864 10.2299 6.31787 9.62346 6.31787 8.87557C6.31787 8.12768 6.67864 7.52116 7.12128 7.52116C7.5652 7.52116 7.92598 8.12768 7.92598 8.87557Z" fill="black"/>\n <path d="M15.9599 8.87557C15.9599 9.62346 15.6004 10.2299 15.1564 10.2299C14.7125 10.2299 14.353 9.62346 14.353 8.87557C14.353 8.12768 14.7125 7.52116 15.1564 7.52116C15.6004 7.52116 15.9599 8.12768 15.9599 8.87557Z" fill="black"/>\n <path d="M7.73438 15.5002C9.73438 15.4999 11.7344 15.4997 14.7344 15.5" stroke="black" stroke-linecap="round"/>\n </svg>','<svg width="35" height="35" viewBox="0 0 23 22" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path d="M0.46875 10.9046C0.46875 4.88216 5.35063 3.24249e-05 11.3737 3.24249e-05C17.3954 3.24249e-05 22.2773 4.88216 22.2773 10.9046C22.2773 16.9269 17.3954 21.809 11.3737 21.809C5.35063 21.809 0.46875 16.9269 0.46875 10.9046Z" fill="#A3CF6A"/>\n <path d="M8.16035 8.87557C8.16035 9.62346 7.79958 10.2299 7.35566 10.2299C6.91301 10.2299 6.55225 9.62346 6.55225 8.87557C6.55225 8.12768 6.91301 7.52116 7.35566 7.52116C7.79958 7.52116 8.16035 8.12768 8.16035 8.87557Z" fill="black"/>\n <path d="M16.1942 8.87557C16.1942 9.62346 15.8347 10.2299 15.3908 10.2299C14.9469 10.2299 14.5874 9.62346 14.5874 8.87557C14.5874 8.12768 14.9469 7.52116 15.3908 7.52116C15.8347 7.52116 16.1942 8.12768 16.1942 8.87557Z" fill="black"/>\n <path d="M14.9688 13.375C14.4688 17.5002 7.96875 17.5003 7.46875 13.3751L14.9688 13.375Z" fill="black" stroke="black" stroke-linecap="round"/>\n </svg>\n ','<svg width="35" height="35" viewBox="0 0 23 22" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path d="M0.234375 10.9042C0.234375 4.8818 5.11626 -0.000333786 11.1393 -0.000333786C17.161 -0.000333786 22.0429 4.8818 22.0429 10.9042C22.0429 16.9266 17.161 21.8086 11.1393 21.8086C5.11626 21.8086 0.234375 16.9266 0.234375 10.9042Z" fill="#7BB65C"/>\n <path d="M14.7344 13.3748C14.2344 17.5 7.73438 17.5 7.23438 13.3749L14.7344 13.3748Z" fill="#646A6E" stroke="#646A6E" stroke-linecap="round"/>\n <path d="M9.63644 8.10736L9.63732 8.09652C9.63732 7.41374 9.14286 6.78855 8.40031 6.78855C7.81043 6.78855 7.46866 7.21257 7.35155 7.60952C7.23531 7.21257 6.89266 6.78855 6.30278 6.78855C5.56023 6.78855 5.06665 7.41374 5.06665 8.09652V8.10736C5.06318 8.25596 5.06665 9.76759 7.35068 10.9997V11L7.35155 10.9998V11L7.35241 10.9998V11V10.9997C9.63731 9.76759 9.64078 8.25596 9.63644 8.10736Z" fill="#646A6E"/>\n <path d="M17.3357 8.10736V8.09652C17.3357 7.41374 16.8421 6.78855 16.0995 6.78855C15.5097 6.78855 15.1679 7.21257 15.0508 7.60952C14.9345 7.21257 14.5919 6.78855 14.002 6.78855C13.2595 6.78855 12.7659 7.41374 12.7659 8.09652V8.10736C12.7624 8.25596 12.7659 9.76759 15.0499 10.9997V11L15.0508 10.9998V11L15.0516 10.9998V11V10.9997C17.3365 9.76759 17.34 8.25596 17.3357 8.10736Z" fill="#646A6E"/>\n </svg>'],STYLISED_EMOJI_10=['<svg width="35" height="35" viewBox="0 0 23 22" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path d="M0 10.9046C0 4.88216 4.88188 3.24249e-05 10.9049 3.24249e-05C16.9267 3.24249e-05 21.8085 4.88216 21.8085 10.9046C21.8085 16.9269 16.9267 21.809 10.9049 21.809C4.88188 21.809 0 16.9269 0 10.9046Z" fill="#E5510A"/>\n <path d="M7.6916 8.87557C7.6916 9.62346 7.33083 10.2299 6.88691 10.2299C6.44426 10.2299 6.0835 9.62346 6.0835 8.87557C6.0835 8.12768 6.44426 7.52116 6.88691 7.52116C7.33083 7.52116 7.6916 8.12768 7.6916 8.87557Z" fill="black"/>\n <path d="M15.7255 8.87557C15.7255 9.62346 15.366 10.2299 14.9221 10.2299C14.4782 10.2299 14.1187 9.62346 14.1187 8.87557C14.1187 8.12768 14.4782 7.52116 14.9221 7.52116C15.366 7.52116 15.7255 8.12768 15.7255 8.87557Z" fill="black"/>\n <path d="M9.15239 6.99092L8.42062 7.72205L5.98096 5.28226L6.71273 4.55126L9.15239 6.99092Z" fill="black"/>\n <path d="M13.3882 7.72205L12.6577 6.99092L15.0974 4.55126L15.8279 5.28226L13.3882 7.72205Z" fill="black"/>\n <path d="M7 16.4995C8 12.4995 13 10.4995 15 16.4998" stroke="black" stroke-linecap="round"/>\n </svg>','<svg width="35" height="35" viewBox="0 0 23 22" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path d="M0.808594 10.9046C0.808594 4.88216 5.69048 3.24249e-05 11.7135 3.24249e-05C17.7353 3.24249e-05 22.6171 4.88216 22.6171 10.9046C22.6171 16.9269 17.7353 21.809 11.7135 21.809C5.69048 21.809 0.808594 16.9269 0.808594 10.9046Z" fill="#EA731D"/>\n <path d="M8.5002 8.87557C8.5002 9.62346 8.13942 10.2299 7.6955 10.2299C7.25286 10.2299 6.89209 9.62346 6.89209 8.87557C6.89209 8.12768 7.25286 7.52116 7.6955 7.52116C8.13942 7.52116 8.5002 8.12768 8.5002 8.87557Z" fill="black"/>\n <path d="M16.5341 8.87557C16.5341 9.62346 16.1746 10.2299 15.7307 10.2299C15.2867 10.2299 14.9272 9.62346 14.9272 8.87557C14.9272 8.12768 15.2867 7.52116 15.7307 7.52116C16.1746 7.52116 16.5341 8.12768 16.5341 8.87557Z" fill="black"/>\n <path d="M7.80859 16.4998C8.80859 12.4998 13.8086 10.4997 15.8086 16.5" stroke="black" stroke-linecap="round"/>\n </svg>','<svg width="35" height="35" viewBox="0 0 23 22" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path d="M0.617188 10.9046C0.617188 4.88216 5.49907 3.24249e-05 11.5221 3.24249e-05C17.5439 3.24249e-05 22.4257 4.88216 22.4257 10.9046C22.4257 16.9269 17.5439 21.809 11.5221 21.809C5.49907 21.809 0.617188 16.9269 0.617188 10.9046Z" fill="#EA8F4D"/>\n <path d="M8.30879 8.87557C8.30879 9.62346 7.94802 10.2299 7.50409 10.2299C7.06145 10.2299 6.70068 9.62346 6.70068 8.87557C6.70068 8.12768 7.06145 7.52116 7.50409 7.52116C7.94802 7.52116 8.30879 8.12768 8.30879 8.87557Z" fill="black"/>\n <path d="M16.3427 8.87557C16.3427 9.62346 15.9832 10.2299 15.5393 10.2299C15.0953 10.2299 14.7358 9.62346 14.7358 8.87557C14.7358 8.12768 15.0953 7.52116 15.5393 7.52116C15.9832 7.52116 16.3427 8.12768 16.3427 8.87557Z" fill="black"/>\n <path d="M7.61719 15.4999C8.95052 13.0405 13.1172 11.9999 15.6172 15.5" stroke="black" stroke-linecap="round"/>\n </svg>','<svg width="35" height="35" viewBox="0 0 23 22" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path d="M0.425781 10.9046C0.425781 4.88216 5.30767 3.24249e-05 11.3307 3.24249e-05C17.3524 3.24249e-05 22.2343 4.88216 22.2343 10.9046C22.2343 16.9269 17.3524 21.809 11.3307 21.809C5.30767 21.809 0.425781 16.9269 0.425781 10.9046Z" fill="#F1B052"/>\n <path d="M8.11738 8.87557C8.11738 9.62346 7.75661 10.2299 7.31269 10.2299C6.87004 10.2299 6.50928 9.62346 6.50928 8.87557C6.50928 8.12768 6.87004 7.52116 7.31269 7.52116C7.75661 7.52116 8.11738 8.12768 8.11738 8.87557Z" fill="black"/>\n <path d="M16.1513 8.87557C16.1513 9.62346 15.7918 10.2299 15.3479 10.2299C14.9039 10.2299 14.5444 9.62346 14.5444 8.87557C14.5444 8.12768 14.9039 7.52116 15.3479 7.52116C15.7918 7.52116 16.1513 8.12768 16.1513 8.87557Z" fill="black"/>\n <path d="M8.42578 15.5002C9.92578 14.0001 12.4258 14.0001 13.9258 15.5001" stroke="black" stroke-linecap="round"/>\n </svg>','<svg width="35" height="35" viewBox="0 0 23 22" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path d="M0.234375 10.9046C0.234375 4.88216 5.11626 3.24249e-05 11.1393 3.24249e-05C17.161 3.24249e-05 22.0429 4.88216 22.0429 10.9046C22.0429 16.9269 17.161 21.809 11.1393 21.809C5.11626 21.809 0.234375 16.9269 0.234375 10.9046Z" fill="#F8C94F"/>\n <path d="M7.92598 8.87557C7.92598 9.62346 7.5652 10.2299 7.12128 10.2299C6.67864 10.2299 6.31787 9.62346 6.31787 8.87557C6.31787 8.12768 6.67864 7.52116 7.12128 7.52116C7.5652 7.52116 7.92598 8.12768 7.92598 8.87557Z" fill="black"/>\n <path d="M15.9599 8.87557C15.9599 9.62346 15.6004 10.2299 15.1564 10.2299C14.7125 10.2299 14.353 9.62346 14.353 8.87557C14.353 8.12768 14.7125 7.52116 15.1564 7.52116C15.6004 7.52116 15.9599 8.12768 15.9599 8.87557Z" fill="black"/>\n <path d="M7.73438 15.5002C9.73438 15.4999 11.7344 15.4997 14.7344 15.5" stroke="black" stroke-linecap="round"/>\n </svg>','<svg width="35" height="35" viewBox="0 0 23 22" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path d="M0 10.9046C0 4.88216 4.88188 3.20353e-05 10.9049 3.20353e-05C16.9267 3.20353e-05 21.8085 4.88216 21.8085 10.9046C21.8085 16.9269 16.9267 21.809 10.9049 21.809C4.88188 21.809 0 16.9269 0 10.9046Z" fill="#F8C94F"/>\n <path d="M7.6916 8.87557C7.6916 9.62346 7.33083 10.2299 6.88691 10.2299C6.44426 10.2299 6.0835 9.62346 6.0835 8.87557C6.0835 8.12768 6.44426 7.52116 6.88691 7.52116C7.33083 7.52116 7.6916 8.12768 7.6916 8.87557Z" fill="black"/>\n <path d="M15.7255 8.87557C15.7255 9.62346 15.366 10.2299 14.9221 10.2299C14.4782 10.2299 14.1187 9.62346 14.1187 8.87557C14.1187 8.12768 14.4782 7.52116 14.9221 7.52116C15.366 7.52116 15.7255 8.12768 15.7255 8.87557Z" fill="black"/>\n </svg>','<svg width="35" height="35" viewBox="0 0 23 22" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path d="M0.0429688 10.9046C0.0429688 4.88216 4.92485 3.24249e-05 10.9479 3.24249e-05C16.9696 3.24249e-05 21.8515 4.88216 21.8515 10.9046C21.8515 16.9269 16.9696 21.809 10.9479 21.809C4.92485 21.809 0.0429688 16.9269 0.0429688 10.9046Z" fill="#F6DE4F"/>\n <path d="M7.73457 8.87557C7.73457 9.62346 7.3738 10.2299 6.92987 10.2299C6.48723 10.2299 6.12646 9.62346 6.12646 8.87557C6.12646 8.12768 6.48723 7.52116 6.92987 7.52116C7.3738 7.52116 7.73457 8.12768 7.73457 8.87557Z" fill="black"/>\n <path d="M15.7685 8.87557C15.7685 9.62346 15.409 10.2299 14.965 10.2299C14.5211 10.2299 14.1616 9.62346 14.1616 8.87557C14.1616 8.12768 14.5211 7.52116 14.965 7.52116C15.409 7.52116 15.7685 8.12768 15.7685 8.87557Z" fill="black"/>\n <path d="M13.543 14.3751C12.043 15.8751 9.54297 15.8751 8.04297 14.3751" stroke="black" stroke-linecap="round"/>\n </svg>','<svg width="35" height="35" viewBox="0 0 23 22" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path d="M0.851562 10.9046C0.851562 4.88216 5.73345 3.24249e-05 11.7565 3.24249e-05C17.7782 3.24249e-05 22.6601 4.88216 22.6601 10.9046C22.6601 16.9269 17.7782 21.809 11.7565 21.809C5.73345 21.809 0.851562 16.9269 0.851562 10.9046Z" fill="#D7D55A"/>\n <path d="M8.54316 8.87557C8.54316 9.62346 8.18239 10.2299 7.73847 10.2299C7.29582 10.2299 6.93506 9.62346 6.93506 8.87557C6.93506 8.12768 7.29582 7.52116 7.73847 7.52116C8.18239 7.52116 8.54316 8.12768 8.54316 8.87557Z" fill="black"/>\n <path d="M16.577 8.87557C16.577 9.62346 16.2176 10.2299 15.7736 10.2299C15.3297 10.2299 14.9702 9.62346 14.9702 8.87557C14.9702 8.12768 15.3297 7.52116 15.7736 7.52116C16.2176 7.52116 16.577 8.12768 16.577 8.87557Z" fill="black"/>\n <path d="M15.3516 14.3749C13.8516 17.0001 9.85156 17.0002 7.85156 14.375" stroke="black" stroke-linecap="round"/>\n </svg>','<svg width="35" height="35" viewBox="0 0 23 22" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path d="M0.660156 10.9046C0.660156 4.88216 5.54204 3.24249e-05 11.5651 3.24249e-05C17.5868 3.24249e-05 22.4687 4.88216 22.4687 10.9046C22.4687 16.9269 17.5868 21.809 11.5651 21.809C5.54204 21.809 0.660156 16.9269 0.660156 10.9046Z" fill="#B7CF6A"/>\n <path d="M8.35176 8.87557C8.35176 9.62346 7.99099 10.2299 7.54706 10.2299C7.10442 10.2299 6.74365 9.62346 6.74365 8.87557C6.74365 8.12768 7.10442 7.52116 7.54706 7.52116C7.99099 7.52116 8.35176 8.12768 8.35176 8.87557Z" fill="black"/>\n <path d="M16.3856 8.87557C16.3856 9.62346 16.0262 10.2299 15.5822 10.2299C15.1383 10.2299 14.7788 9.62346 14.7788 8.87557C14.7788 8.12768 15.1383 7.52116 15.5822 7.52116C16.0262 7.52116 16.3856 8.12768 16.3856 8.87557Z" fill="black"/>\n <path d="M15.1602 13.375C14.6602 17.5002 8.16016 17.5003 7.66016 13.3751" stroke="black" stroke-linecap="round"/>\n </svg>','<svg width="35" height="35" viewBox="0 0 23 22" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path d="M0.46875 10.9046C0.46875 4.88216 5.35063 3.24249e-05 11.3737 3.24249e-05C17.3954 3.24249e-05 22.2773 4.88216 22.2773 10.9046C22.2773 16.9269 17.3954 21.809 11.3737 21.809C5.35063 21.809 0.46875 16.9269 0.46875 10.9046Z" fill="#A3CF6A"/>\n <path d="M8.16035 8.87557C8.16035 9.62346 7.79958 10.2299 7.35566 10.2299C6.91301 10.2299 6.55225 9.62346 6.55225 8.87557C6.55225 8.12768 6.91301 7.52116 7.35566 7.52116C7.79958 7.52116 8.16035 8.12768 8.16035 8.87557Z" fill="black"/>\n <path d="M16.1942 8.87557C16.1942 9.62346 15.8347 10.2299 15.3908 10.2299C14.9469 10.2299 14.5874 9.62346 14.5874 8.87557C14.5874 8.12768 14.9469 7.52116 15.3908 7.52116C15.8347 7.52116 16.1942 8.12768 16.1942 8.87557Z" fill="black"/>\n <path d="M14.9688 13.375C14.4688 17.5002 7.96875 17.5003 7.46875 13.3751L14.9688 13.375Z" fill="black" stroke="black" stroke-linecap="round"/>\n </svg>','<svg width="35" height="35" viewBox="0 0 23 22" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path d="M0 10.9042C0 4.8818 4.88188 -0.000333786 10.9049 -0.000333786C16.9267 -0.000333786 21.8085 4.8818 21.8085 10.9042C21.8085 16.9266 16.9267 21.8086 10.9049 21.8086C4.88188 21.8086 0 16.9266 0 10.9042Z" fill="#7BB65C"/>\n <path d="M14.5 13.3748C14 17.5 7.5 17.5 7 13.3749L14.5 13.3748Z" fill="#646A6E" stroke="#646A6E" stroke-linecap="round"/>\n <path d="M9.40207 8.10736L9.40294 8.09652C9.40294 7.41374 8.90848 6.78855 8.16593 6.78855C7.57606 6.78855 7.23428 7.21257 7.11718 7.60952C7.00094 7.21257 6.65828 6.78855 6.06841 6.78855C5.32586 6.78855 4.83227 7.41374 4.83227 8.09652V8.10736C4.8288 8.25596 4.83227 9.76759 7.1163 10.9997V11L7.11718 10.9998V11L7.11804 10.9998V11V10.9997C9.40294 9.76759 9.40641 8.25596 9.40207 8.10736Z" fill="#646A6E"/>\n <path d="M17.1013 8.10736V8.09652C17.1013 7.41374 16.6077 6.78855 15.8652 6.78855C15.2753 6.78855 14.9335 7.21257 14.8164 7.60952C14.7001 7.21257 14.3575 6.78855 13.7676 6.78855C13.0251 6.78855 12.5315 7.41374 12.5315 8.09652V8.10736C12.528 8.25596 12.5315 9.76759 14.8155 10.9997V11L14.8164 10.9998V11L14.8173 10.9998V11V10.9997C17.1022 9.76759 17.1056 8.25596 17.1013 8.10736Z" fill="#646A6E"/>\n </svg>'],STYLISED_EMOJI_GREY_10=['<svg width="35" height="35" viewBox="0 0 23 22" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path d="M0 10.9042C0 4.8818 4.88188 -0.000334176 10.9049 -0.000334176C16.9267 -0.000334176 21.8085 4.8818 21.8085 10.9042C21.8085 16.9266 16.9267 21.8086 10.9049 21.8086C4.88188 21.8086 0 16.9266 0 10.9042Z" fill="#D9DCDE"/>\n <path d="M7.69209 8.87521C7.69209 9.6231 7.33132 10.2295 6.88739 10.2295C6.44475 10.2295 6.08398 9.6231 6.08398 8.87521C6.08398 8.12732 6.44475 7.52079 6.88739 7.52079C7.33132 7.52079 7.69209 8.12732 7.69209 8.87521Z" fill="#646A6F"/>\n <path d="M15.726 8.87521C15.726 9.6231 15.3665 10.2295 14.9226 10.2295C14.4786 10.2295 14.1191 9.6231 14.1191 8.87521C14.1191 8.12732 14.4786 7.52079 14.9226 7.52079C15.3665 7.52079 15.726 8.12732 15.726 8.87521Z" fill="#646A6F"/>\n <path d="M9.1519 6.99055L8.42013 7.72168L5.98047 5.28189L6.71224 4.55089L9.1519 6.99055Z" fill="#646A6F"/>\n <path d="M13.3887 7.72168L12.6582 6.99055L15.0979 4.55089L15.8284 5.28189L13.3887 7.72168Z" fill="#646A6F"/>\n <path d="M7 16.4997C8 12.4996 13 10.4996 15 16.4999" stroke="#646A6E" stroke-linecap="round"/>\n </svg>','<svg width="35" height="35" viewBox="0 0 23 22" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path d="M0.808594 10.9042C0.808594 4.8818 5.69048 -0.000334176 11.7135 -0.000334176C17.7353 -0.000334176 22.6171 4.8818 22.6171 10.9042C22.6171 16.9266 17.7353 21.8086 11.7135 21.8086C5.69048 21.8086 0.808594 16.9266 0.808594 10.9042Z" fill="#D9DCDE"/>\n <path d="M8.50068 8.87521C8.50068 9.6231 8.13991 10.2295 7.69599 10.2295C7.25334 10.2295 6.89258 9.6231 6.89258 8.87521C6.89258 8.12732 7.25334 7.52079 7.69599 7.52079C8.13991 7.52079 8.50068 8.12732 8.50068 8.87521Z" fill="#646A6F"/>\n <path d="M16.5346 8.87521C16.5346 9.6231 16.1751 10.2295 15.7312 10.2295C15.2872 10.2295 14.9277 9.6231 14.9277 8.87521C14.9277 8.12732 15.2872 7.52079 15.7312 7.52079C16.1751 7.52079 16.5346 8.12732 16.5346 8.87521Z" fill="#646A6F"/>\n <path d="M7.80859 16.4997C8.80859 12.4996 13.8086 10.4996 15.8086 16.4999" stroke="#646A6E" stroke-linecap="round"/>\n </svg>','<svg width="35" height="35" viewBox="0 0 23 22" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path d="M0.617188 10.9042C0.617188 4.8818 5.49907 -0.000334176 11.5221 -0.000334176C17.5439 -0.000334176 22.4257 4.8818 22.4257 10.9042C22.4257 16.9266 17.5439 21.8086 11.5221 21.8086C5.49907 21.8086 0.617188 16.9266 0.617188 10.9042Z" fill="#D9DCDE"/>\n <path d="M8.30928 8.87521C8.30928 9.6231 7.9485 10.2295 7.50458 10.2295C7.06194 10.2295 6.70117 9.6231 6.70117 8.87521C6.70117 8.12732 7.06194 7.52079 7.50458 7.52079C7.9485 7.52079 8.30928 8.12732 8.30928 8.87521Z" fill="#646A6F"/>\n <path d="M16.3432 8.87521C16.3432 9.6231 15.9837 10.2295 15.5398 10.2295C15.0958 10.2295 14.7363 9.6231 14.7363 8.87521C14.7363 8.12732 15.0958 7.52079 15.5398 7.52079C15.9837 7.52079 16.3432 8.12732 16.3432 8.87521Z" fill="#646A6F"/>\n <path d="M7.61719 15.4995C8.95052 13.0401 13.1172 11.9996 15.6172 15.4996" stroke="#646A6E" stroke-linecap="round"/>\n </svg>','<svg width="35" height="35" viewBox="0 0 23 22" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path d="M0.425781 10.9042C0.425781 4.8818 5.30767 -0.000333786 11.3307 -0.000333786C17.3524 -0.000333786 22.2343 4.8818 22.2343 10.9042C22.2343 16.9266 17.3524 21.8086 11.3307 21.8086C5.30767 21.8086 0.425781 16.9266 0.425781 10.9042Z" fill="#D9DCDE"/>\n <path d="M8.11787 8.87521C8.11787 9.6231 7.7571 10.2295 7.31318 10.2295C6.87053 10.2295 6.50977 9.6231 6.50977 8.87521C6.50977 8.12732 6.87053 7.52079 7.31318 7.52079C7.7571 7.52079 8.11787 8.12732 8.11787 8.87521Z" fill="#646A6F"/>\n <path d="M16.1518 8.87521C16.1518 9.6231 15.7923 10.2295 15.3483 10.2295C14.9044 10.2295 14.5449 9.6231 14.5449 8.87521C14.5449 8.12732 14.9044 7.52079 15.3483 7.52079C15.7923 7.52079 16.1518 8.12732 16.1518 8.87521Z" fill="#646A6F"/>\n <path d="M8.42578 15.5001C9.92578 14 12.4258 14 13.9258 15.5" stroke="#646A6E" stroke-linecap="round"/>\n </svg>','<svg width="35" height="35" viewBox="0 0 23 22" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path d="M0.234375 10.9042C0.234375 4.8818 5.11626 -0.000333786 11.1393 -0.000333786C17.161 -0.000333786 22.0429 4.8818 22.0429 10.9042C22.0429 16.9266 17.161 21.8086 11.1393 21.8086C5.11626 21.8086 0.234375 16.9266 0.234375 10.9042Z" fill="#D9DCDE"/>\n <path d="M7.92647 8.87521C7.92647 9.6231 7.56569 10.2295 7.12177 10.2295C6.67912 10.2295 6.31836 9.6231 6.31836 8.87521C6.31836 8.12732 6.67912 7.52079 7.12177 7.52079C7.56569 7.52079 7.92647 8.12732 7.92647 8.87521Z" fill="#646A6F"/>\n <path d="M15.9603 8.87521C15.9603 9.6231 15.6009 10.2295 15.1569 10.2295C14.713 10.2295 14.3535 9.6231 14.3535 8.87521C14.3535 8.12732 14.713 7.52079 15.1569 7.52079C15.6009 7.52079 15.9603 8.12732 15.9603 8.87521Z" fill="#646A6F"/>\n <path d="M7.73438 15.5003C9.73438 15.5 11.7344 15.4998 14.7344 15.5001" stroke="#646A6E" stroke-linecap="round"/>\n </svg>','<svg width="35" height="35" viewBox="0 0 23 22" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path d="M0.234375 10.9042C0.234375 4.8818 5.11626 -0.000333786 11.1393 -0.000333786C17.161 -0.000333786 22.0429 4.8818 22.0429 10.9042C22.0429 16.9266 17.161 21.8086 11.1393 21.8086C5.11626 21.8086 0.234375 16.9266 0.234375 10.9042Z" fill="#D9DCDE"/>\n <path d="M7.92647 8.87521C7.92647 9.6231 7.56569 10.2295 7.12177 10.2295C6.67912 10.2295 6.31836 9.6231 6.31836 8.87521C6.31836 8.12732 6.67912 7.52079 7.12177 7.52079C7.56569 7.52079 7.92647 8.12732 7.92647 8.87521Z" fill="#646A6F"/>\n <path d="M15.9603 8.87521C15.9603 9.6231 15.6009 10.2295 15.1569 10.2295C14.713 10.2295 14.3535 9.6231 14.3535 8.87521C14.3535 8.12732 14.713 7.52079 15.1569 7.52079C15.6009 7.52079 15.9603 8.12732 15.9603 8.87521Z" fill="#646A6F"/>\n </svg>','<svg width="35" height="35" viewBox="0 0 23 22" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path d="M0.0429688 10.9042C0.0429688 4.8818 4.92485 -0.000333786 10.9479 -0.000333786C16.9696 -0.000333786 21.8515 4.8818 21.8515 10.9042C21.8515 16.9266 16.9696 21.8086 10.9479 21.8086C4.92485 21.8086 0.0429688 16.9266 0.0429688 10.9042Z" fill="#D9DCDE"/>\n <path d="M7.73506 8.87521C7.73506 9.6231 7.37429 10.2295 6.93036 10.2295C6.48772 10.2295 6.12695 9.6231 6.12695 8.87521C6.12695 8.12732 6.48772 7.52079 6.93036 7.52079C7.37429 7.52079 7.73506 8.12732 7.73506 8.87521Z" fill="#646A6F"/>\n <path d="M15.7689 8.87521C15.7689 9.6231 15.4095 10.2295 14.9655 10.2295C14.5216 10.2295 14.1621 9.6231 14.1621 8.87521C14.1621 8.12732 14.5216 7.52079 14.9655 7.52079C15.4095 7.52079 15.7689 8.12732 15.7689 8.87521Z" fill="#646A6F"/>\n <path d="M13.543 14.3749C12.043 15.875 9.54297 15.875 8.04297 14.375" stroke="#646A6E" stroke-linecap="round"/>\n </svg>','<svg width="35" height="35" viewBox="0 0 23 22" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path d="M0.851562 10.9042C0.851562 4.8818 5.73345 -0.000333786 11.7565 -0.000333786C17.7782 -0.000333786 22.6601 4.8818 22.6601 10.9042C22.6601 16.9266 17.7782 21.8086 11.7565 21.8086C5.73345 21.8086 0.851562 16.9266 0.851562 10.9042Z" fill="#D9DCDE"/>\n <path d="M8.54365 8.87521C8.54365 9.6231 8.18288 10.2295 7.73896 10.2295C7.29631 10.2295 6.93555 9.6231 6.93555 8.87521C6.93555 8.12732 7.29631 7.52079 7.73896 7.52079C8.18288 7.52079 8.54365 8.12732 8.54365 8.87521Z" fill="#646A6F"/>\n <path d="M16.5775 8.87521C16.5775 9.6231 16.218 10.2295 15.7741 10.2295C15.3302 10.2295 14.9707 9.6231 14.9707 8.87521C14.9707 8.12732 15.3302 7.52079 15.7741 7.52079C16.218 7.52079 16.5775 8.12732 16.5775 8.87521Z" fill="#646A6F"/>\n <path d="M15.3516 14.3748C13.8516 17 9.85156 17 7.85156 14.3749" stroke="#646A6E" stroke-linecap="round"/>\n </svg>','<svg width="35" height="35" viewBox="0 0 23 22" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path d="M0.660156 10.9042C0.660156 4.8818 5.54204 -0.000333786 11.5651 -0.000333786C17.5868 -0.000333786 22.4687 4.8818 22.4687 10.9042C22.4687 16.9266 17.5868 21.8086 11.5651 21.8086C5.54204 21.8086 0.660156 16.9266 0.660156 10.9042Z" fill="#D9DCDE"/>\n <path d="M8.35225 8.87521C8.35225 9.6231 7.99147 10.2295 7.54755 10.2295C7.10491 10.2295 6.74414 9.6231 6.74414 8.87521C6.74414 8.12732 7.10491 7.52079 7.54755 7.52079C7.99147 7.52079 8.35225 8.12732 8.35225 8.87521Z" fill="#646A6F"/>\n <path d="M16.3861 8.87521C16.3861 9.6231 16.0266 10.2295 15.5827 10.2295C15.1388 10.2295 14.7793 9.6231 14.7793 8.87521C14.7793 8.12732 15.1388 7.52079 15.5827 7.52079C16.0266 7.52079 16.3861 8.12732 16.3861 8.87521Z" fill="#646A6F"/>\n <path d="M15.1602 13.3748C14.6602 17.5 8.16016 17.5 7.66016 13.3749" stroke="#646A6E" stroke-linecap="round"/>\n </svg>','<svg width="35" height="35" viewBox="0 0 23 22" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path d="M0.46875 10.9042C0.46875 4.8818 5.35063 -0.000333786 11.3737 -0.000333786C17.3954 -0.000333786 22.2773 4.8818 22.2773 10.9042C22.2773 16.9266 17.3954 21.8086 11.3737 21.8086C5.35063 21.8086 0.46875 16.9266 0.46875 10.9042Z" fill="#D9DCDE"/>\n <path d="M8.16084 8.87521C8.16084 9.6231 7.80007 10.2295 7.35614 10.2295C6.9135 10.2295 6.55273 9.6231 6.55273 8.87521C6.55273 8.12732 6.9135 7.52079 7.35614 7.52079C7.80007 7.52079 8.16084 8.12732 8.16084 8.87521Z" fill="#646A6F"/>\n <path d="M16.1947 8.87521C16.1947 9.6231 15.8352 10.2295 15.3913 10.2295C14.9474 10.2295 14.5879 9.6231 14.5879 8.87521C14.5879 8.12732 14.9474 7.52079 15.3913 7.52079C15.8352 7.52079 16.1947 8.12732 16.1947 8.87521Z" fill="#646A6F"/>\n <path d="M14.9688 13.3748C14.4688 17.5 7.96875 17.5 7.46875 13.3749L14.9688 13.3748Z" fill="#646A6E" stroke="#646A6E" stroke-linecap="round"/>\n </svg>','<svg width="35" height="35" viewBox="0 0 23 22" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path d="M0 10.9042C0 4.8818 4.88188 -0.000333786 10.9049 -0.000333786C16.9267 -0.000333786 21.8085 4.8818 21.8085 10.9042C21.8085 16.9266 16.9267 21.8086 10.9049 21.8086C4.88188 21.8086 0 16.9266 0 10.9042Z" fill="#D9DCDE"/>\n <path d="M14.5 13.3748C14 17.5 7.5 17.5 7 13.3749L14.5 13.3748Z" fill="#646A6E" stroke="#646A6E" stroke-linecap="round"/>\n <path d="M9.40207 8.10736L9.40294 8.09652C9.40294 7.41374 8.90848 6.78855 8.16593 6.78855C7.57606 6.78855 7.23428 7.21257 7.11718 7.60952C7.00094 7.21257 6.65828 6.78855 6.06841 6.78855C5.32586 6.78855 4.83227 7.41374 4.83227 8.09652V8.10736C4.8288 8.25596 4.83227 9.76759 7.1163 10.9997V11L7.11718 10.9998V11L7.11804 10.9998V11V10.9997C9.40294 9.76759 9.40641 8.25596 9.40207 8.10736Z" fill="#646A6E"/>\n <path d="M17.1013 8.10736V8.09652C17.1013 7.41374 16.6077 6.78855 15.8652 6.78855C15.2753 6.78855 14.9335 7.21257 14.8164 7.60952C14.7001 7.21257 14.3575 6.78855 13.7676 6.78855C13.0251 6.78855 12.5315 7.41374 12.5315 8.09652V8.10736C12.528 8.25596 12.5315 9.76759 14.8155 10.9997V11L14.8164 10.9998V11L14.8173 10.9998V11V10.9997C17.1022 9.76759 17.1056 8.25596 17.1013 8.10736Z" fill="#646A6E"/>\n </svg>'],STYLISED_EMOJI_GREY_5=['<svg width="35" height="35" viewBox="0 0 23 22" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M0 10.9042C0 4.8818 4.88188 -0.000334176 10.9049 -0.000334176C16.9267 -0.000334176 21.8085 4.8818 21.8085 10.9042C21.8085 16.9266 16.9267 21.8086 10.9049 21.8086C4.88188 21.8086 0 16.9266 0 10.9042Z" fill="#D9DCDE"/>\n<path d="M7.69209 8.87521C7.69209 9.6231 7.33132 10.2295 6.88739 10.2295C6.44475 10.2295 6.08398 9.6231 6.08398 8.87521C6.08398 8.12732 6.44475 7.52079 6.88739 7.52079C7.33132 7.52079 7.69209 8.12732 7.69209 8.87521Z" fill="#646A6F"/>\n<path d="M15.726 8.87521C15.726 9.6231 15.3665 10.2295 14.9226 10.2295C14.4786 10.2295 14.1191 9.6231 14.1191 8.87521C14.1191 8.12732 14.4786 7.52079 14.9226 7.52079C15.3665 7.52079 15.726 8.12732 15.726 8.87521Z" fill="#646A6F"/>\n<path d="M9.1519 6.99055L8.42013 7.72168L5.98047 5.28189L6.71224 4.55089L9.1519 6.99055" fill="#646A6F"/>\n<path d="M13.3887 7.72168L12.6582 6.99055L15.0979 4.55089L15.8284 5.28189L13.3887 7.72168" fill="#646A6F"/>\n<path d="M7 16.4997C8 12.4996 13 10.4996 15 16.4999" stroke="#646A6E" stroke-linecap="round"/>\n</svg>','<svg width="35" height="35" viewBox="0 0 23 22" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M0.808594 10.9042C0.808594 4.8818 5.69048 -0.000333786 11.7135 -0.000333786C17.7353 -0.000333786 22.6171 4.8818 22.6171 10.9042C22.6171 16.9266 17.7353 21.8086 11.7135 21.8086C5.69048 21.8086 0.808594 16.9266 0.808594 10.9042Z" fill="#D9DCDE"/>\n<path d="M8.50068 8.87521C8.50068 9.6231 8.13991 10.2295 7.69599 10.2295C7.25334 10.2295 6.89258 9.6231 6.89258 8.87521C6.89258 8.12732 7.25334 7.52079 7.69599 7.52079C8.13991 7.52079 8.50068 8.12732 8.50068 8.87521Z" fill="#646A6F"/>\n<path d="M16.5346 8.87521C16.5346 9.6231 16.1751 10.2295 15.7312 10.2295C15.2872 10.2295 14.9277 9.6231 14.9277 8.87521C14.9277 8.12732 15.2872 7.52079 15.7312 7.52079C16.1751 7.52079 16.5346 8.12732 16.5346 8.87521Z" fill="#646A6F"/>\n<path d="M7.80859 15.4995C9.14193 13.0401 13.3086 11.9996 15.8086 15.4996" stroke="#646A6E" stroke-linecap="round"/>\n</svg>','<svg width="35" height="35" viewBox="0 0 23 22" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M0.617188 10.9042C0.617188 4.8818 5.49907 -0.000333786 11.5221 -0.000333786C17.5439 -0.000333786 22.4257 4.8818 22.4257 10.9042C22.4257 16.9266 17.5439 21.8086 11.5221 21.8086C5.49907 21.8086 0.617188 16.9266 0.617188 10.9042Z" fill="#D9DCDE"/>\n<path d="M8.30928 8.87521C8.30928 9.6231 7.9485 10.2295 7.50458 10.2295C7.06194 10.2295 6.70117 9.6231 6.70117 8.87521C6.70117 8.12732 7.06194 7.52079 7.50458 7.52079C7.9485 7.52079 8.30928 8.12732 8.30928 8.87521Z" fill="#646A6F"/>\n<path d="M16.3432 8.87521C16.3432 9.6231 15.9837 10.2295 15.5398 10.2295C15.0958 10.2295 14.7363 9.6231 14.7363 8.87521C14.7363 8.12732 15.0958 7.52079 15.5398 7.52079C15.9837 7.52079 16.3432 8.12732 16.3432 8.87521Z" fill="#646A6F"/>\n<path d="M8.11719 15.5003C10.1172 15.5 12.1172 15.4998 15.1172 15.5001" stroke="#646A6E" stroke-linecap="round"/>\n</svg>','<svg width="35" height="35" viewBox="0 0 23 22" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M0.425781 10.9042C0.425781 4.8818 5.30767 -0.000333786 11.3307 -0.000333786C17.3524 -0.000333786 22.2343 4.8818 22.2343 10.9042C22.2343 16.9266 17.3524 21.8086 11.3307 21.8086C5.30767 21.8086 0.425781 16.9266 0.425781 10.9042Z" fill="#D9DCDE"/>\n<path d="M8.11787 8.87521C8.11787 9.6231 7.7571 10.2295 7.31318 10.2295C6.87053 10.2295 6.50977 9.6231 6.50977 8.87521C6.50977 8.12732 6.87053 7.52079 7.31318 7.52079C7.7571 7.52079 8.11787 8.12732 8.11787 8.87521Z" fill="#646A6F"/>\n<path d="M16.1518 8.87521C16.1518 9.6231 15.7923 10.2295 15.3483 10.2295C14.9044 10.2295 14.5449 9.6231 14.5449 8.87521C14.5449 8.12732 14.9044 7.52079 15.3483 7.52079C15.7923 7.52079 16.1518 8.12732 16.1518 8.87521Z" fill="#646A6F"/>\n<path d="M14.9258 13.3748C14.4258 17.5 7.92578 17.5 7.42578 13.3749L14.9258 13.3748Z" fill="#646A6E" stroke="#646A6E" stroke-linecap="round"/>\n</svg>','<svg width="35" height="35" viewBox="0 0 23 22" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M0.234375 10.9042C0.234375 4.8818 5.11626 -0.000333786 11.1393 -0.000333786C17.161 -0.000333786 22.0429 4.8818 22.0429 10.9042C22.0429 16.9266 17.161 21.8086 11.1393 21.8086C5.11626 21.8086 0.234375 16.9266 0.234375 10.9042Z" fill="#D9DCDE"/>\n<path d="M14.7344 13.3748C14.2344 17.5 7.73438 17.5 7.23438 13.3749L14.7344 13.3748Z" fill="#646A6E" stroke="#646A6E" stroke-linecap="round"/>\n<path d="M9.63644 8.10736L9.63732 8.09652C9.63732 7.41374 9.14286 6.78855 8.40031 6.78855C7.81043 6.78855 7.46866 7.21257 7.35155 7.60952C7.23531 7.21257 6.89266 6.78855 6.30278 6.78855C5.56023 6.78855 5.06665 7.41374 5.06665 8.09652V8.10736C5.06318 8.25596 5.06665 9.76759 7.35068 10.9997V11L7.35155 10.9998V11L7.35241 10.9998V11V10.9997C9.63731 9.76759 9.64078 8.25596 9.63644 8.10736Z" fill="#646A6E"/>\n<path d="M17.3357 8.10736V8.09652C17.3357 7.41374 16.8421 6.78855 16.0995 6.78855C15.5097 6.78855 15.1679 7.21257 15.0508 7.60952C14.9345 7.21257 14.5919 6.78855 14.002 6.78855C13.2595 6.78855 12.7659 7.41374 12.7659 8.09652V8.10736C12.7624 8.25596 12.7659 9.76759 15.0499 10.9997V11L15.0508 10.9998V11L15.0516 10.9998V11V10.9997C17.3365 9.76759 17.34 8.25596 17.3357 8.10736Z" fill="#646A6E"/>\n</svg>'];function hexToRgb(e){e=e.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i,(function(e,t,n,i){return t+t+n+n+i+i}));var t=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);return t?{r:parseInt(t[1],16),g:parseInt(t[2],16),b:parseInt(t[3],16)}:null}var createDialog=function(e,t,n,i,o){var a=i.dim_background,r=i.dim_bg_color,s=i.dim_bg_opacity,l=i.position,c=o.question_background_color,d=document.createElement("div");d.setAttribute("id",APX_OVERLAY);var p=document.createElement("style"),u="center",h="center";switch(l){case"bottom-left":u="flex-start",h="flex-end";break;case"bottom-right":u="flex-end",h="flex-end";break;case"top-left":u="flex-start",h="flex-start";break;case"top-right":u="flex-end",h="flex-start"}var g="none";if(a){var f=hexToRgb(r);g="rgb(".concat(f.r,", ").concat(f.g,", ").concat(f.b,", ").concat(s,")")}p.innerHTML="\n#apx-oly {\n width:100%;height:100%;position:fixed;top:0;left:0;background-color:".concat(g,";\n display:flex;justify-content:").concat(u,";align-items:").concat(h,";border-radius:3px;z-index:99999999\n}\n#apx-oly > * {font-family: inherit;box-sizing:unset}\n.apx-dlg-c {\n width:").concat(e,"px;max-height:").concat(window.innerHeight,"px;overflow: auto;min-height:").concat(t,"%;background:").concat(c,";z-index:99999999;opacity:0;position:relative;visibility:hidden;\n transition:all 500ms cubic-bezier(0, -0.37, 0, 2.06);top:-15px;border-radius:3px;margin:20px\n}\n.apx-dlg-c.open {opacity:1;visibility:visible;top:0}\n ").replaceAll("\n","").replace(/[\s]{2,999}/g,"");var m=document.createElement("div");return m.setAttribute("id",APX_DIALOG_CONTENT),m.classList.add(APX_DIALOG_CONTENT),d.appendChild(m),d.appendChild(p),d[SURVEY_ON_DISMISS]=n,document.body.appendChild(d),d},getImage=function(e,t,n){return e&&""!==e&&0!==t&&0!==n?'<img id="apx_icon" src="'.concat(e,'" style="width:').concat(t,"px;height:").concat(n,'px;">'):""},generateRequestSurvey=function(e){var t=e.icon_name,n=void 0===t?"":t,i=e.title,o=void 0===i?"Some dummy title":i,a=e.yes_text,r=void 0===a?"Yes":a,s=e.icon_width,l=void 0===s?180:s,c=e.icon_height,d=void 0===c?100:c,p=e.no_text,u=void 0===p?"No, thanks":p,h=e.dialog_background_color,g=void 0===h?"#FFF":h,f=e.title_color,m=void 0===f?"#3C3C3C":f,_=e.yes_button_bg_color,v=void 0===_?"#017DFD":_,b=e.yes_button_text_color,y=void 0===b?"#FFF":b,x=e.no_button_text_color,w=void 0===x?"#017DFD":x,C=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:12,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:500;return"line-height:20px;letter-spacing:0.005em;font-size:".concat(e,"px;font-weight:").concat(t,";")};return'\n <div style="display:flex;flex-direction:column;height:100%;width:100%;background-color:'.concat(g,';align-items:center;padding-top:20px;border-radius:3px">\n ').concat(getImage(n,l,d),'<span style="').concat(C(16,600),"text-align:center;color:").concat(m,';margin:12px 0px;">').concat(o,'</span>\n <button id="').concat(APX_DIALOG_YES,'" style="').concat(C(14,500),"color:").concat(y,";background-color:").concat(v,';border-radius:2px;border:none;padding:8px 20px;margin-bottom:10px;cursor:pointer">').concat(r,'</button>\n <button id="').concat(APX_DIALOG_NO,'" style="').concat(C(14,500),"color:").concat(w,';background:none;border:none;cursor:pointer;margin-bottom:20px">').concat(u,"</button>\n </div>\n ")},getTextAreaCSS=function(e){return"\n .apx-ta:focus {\n border: none;\n outline: none;\n }\n .apx-ta::placeholder {\n color: ".concat(e,";\n opacity: 0.5;\n }\n ")},getSurveyOptionCSS=function(e,t,n,i,o,a){return"\n .apx-lc {\n display: flex;\n align-items:center;\n position: relative;\n background: ".concat("outline"===a?"unset":"filled"===a?n:"unset",";\n border: ").concat("outline"===a?"1px solid "+n:"filled"===a?n:"unset",";\n padding: ").concat("none"!==a?"10px 10px 10px 35px":"0px 0px 0px 35px",";\n margin-bottom: 12px;\n font-family: inherit;\n top: 10px;\n cursor: pointer;\n font-size: 18px;\n color: ").concat(o,";\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n }\n\n .apx-lc input {\n position: absolute;\n opacity: 0;\n cursor: pointer;\n width: 0;\n height: 0;\n }\n\n .apx-i {\n position: absolute;\n display:flex;\n align-items:center;\n justify-content:center;\n left: 6px;\n height: 14px;\n width: 14px;\n border: 1px solid ").concat(o,";\n background-color: white;\n border-radius: ").concat(e===ANSWER_TYPES.SINGLE_CHOICE?"50%":0,";\n }\n\n .apx-lc:hover input ~ .apx-i {\n border: 1px solid ").concat(i,";\n }\n\n .apx-lc input:checked ~ .apx-i {\n background-color: ").concat(t,";\n border: 1px solid ").concat(i,';\n }\n\n .apx-i:after {\n content: "";\n position: absolute;\n display: none;\n }\n\n .apx-lc input:checked ~ .apx-i:after {\n display: block;\n }\n\n .apx-lc .apx-i:after {\n top: ').concat(e===ANSWER_TYPES.SINGLE_CHOICE?2:1,"px;\n left: ").concat(e===ANSWER_TYPES.SINGLE_CHOICE?2:4,"px;\n width: ").concat(e===ANSWER_TYPES.SINGLE_CHOICE?10:4,"px;\n height: ").concat(e===ANSWER_TYPES.SINGLE_CHOICE?10:8,"px;\n border-radius: ").concat(e===ANSWER_TYPES.SINGLE_CHOICE?"50%":"0",";\n background: ").concat(e===ANSWER_TYPES.SINGLE_CHOICE?i:"transparent",";\n border: ").concat(e===ANSWER_TYPES.SINGLE_CHOICE?"none":"solid white",";\n border-width: ").concat(e===ANSWER_TYPES.SINGLE_CHOICE?"unset":"0 3px 3px 0",";\n -webkit-transform: ").concat(e===ANSWER_TYPES.SINGLE_CHOICE?"unset":"rotate(45deg)",";\n -ms-transform: ").concat(e===ANSWER_TYPES.SINGLE_CHOICE?"unset":"rotate(45deg)",";\n transform: ").concat(e===ANSWER_TYPES.SINGLE_CHOICE?"unset":"rotate(45deg)",";\n }\n ")},createSurveyHeaderNode=function(e,t,n,i){var o=e.cancel_button_color,a=e.previous_button_color,r=document.createElement("button"),s=document.createElement("button");r.disabled=0===t,r.setAttribute("type","button"),r.className="apx-b apx-pr",r.innerHTML="<style>.apx-pr::before{content:'\\2190';font-size:22px;color:".concat(a).concat(0===t?"54":"",";}.apx-pr{cursor:").concat(0===t?"no-drop":"pointer",";visibility:").concat(0===t?"hidden":"visible",";margin-top:-6px}</style>"),s.className="apx-b apx-cb",s.setAttribute("type","button"),s.innerHTML="<style>.apx-cb::before{content:'\\0000d7';font-size:26px;color:".concat(o,";}</style>");var l=document.createElement("div");l.style="display:flex;justify-content:space-between;align-items:center;padding:8px;padding-bottom:0";var c=document.createElement("span");return c.style="font-size:14px;color:#000;opacity:0.3;letter-spacing:0.005em;line-height:12px",c.innerText=i?"":"".concat(t+1,"/").concat(n),l.appendChild(r),l.appendChild(c),l.appendChild(s),{prevButton:r,closeButton:s,headerNode:l}},changeSubmitButtonBgColor=function(e,t){var n=e.answerMode,i=e.choices,o=void 0===i?[]:i,a=e.text_answer,r=void 0===a?"":a,s=e.selected_rating,l=void 0===s?-1:s,c=!0;n===ANSWER_TYPES.MULTI_CHOICE||n===ANSWER_TYPES.SINGLE_CHOICE?c=-1!==o.findIndex((function(e){return!0===e.is_selected})):n===ANSWER_TYPES.SHORT_ANSWER?c=r.length>0:n===ANSWER_TYPES.RATING&&(c=l>0);c?(t.className="apx-ba",t.disabled=!1):(t.className="apx-bi",t.disabled=!0)},createSurveyFooterNode=function(e,t,n,i,o){var a=e.skip_text_color,r=e.submit_text_color,s=e.submit_active_color,l=e.submit_inactive_color,c=n===i-1||o?null:document.createElement("button");c&&(c.innerText="Skip",c.className="apx-b",c.style="font-size:14px;font-weight:600;opacity:1;font-style:inherit;color:".concat(a,";background-color:transparent;margin:0px 12px"));var d=document.createElement("button");d.innerHTML="".concat(n===i-1&&"Next >"===t.submit_text?"Submit":t.submit_text,"<style>.apx-ba{background-color:").concat(s,";cursor:pointer}.apx-bi{background-color:").concat(l,";cursor:no-drop}</style>"),d.style="border:none;border-radius:2px;color:".concat(r,";padding:8px 15px;font-family:inherit"),changeSubmitButtonBgColor(t,d);var p=document.createElement("div");return p.style="padding:14px;display:flex;justify-content:flex-end",c&&p.appendChild(c),p.appendChild(d),{footerNode:p,skipButton:c,submitButton:d}},getTextAreaNode=function(e){var t,n=e.maximum_characters,i=e.background_color,o=e.placeholder,a=e.text_color,r=document.createElement("textarea"),s=null!==(t=null==e?void 0:e.textinput_border_color)&&void 0!==t?t:"black";return r.style="padding-top:4px;padding-left:4px;font-zie:14px;width:98%;height:100px;margin-top:8px;border: 1px solid ".concat(s,";resize:none;background:").concat(i,";color:").concat(a),r.className="apx-ta",r.setAttribute("placeholder",o),r.setAttribute("maxlength",n),r},createQuestionNode=function(e,t,n){var i=t.question_text_color,o=t.question_background_color,a=t.option_bg_color_active,r=t.option_bg_color_inactive,s=t.option_text_color_active,l=t.option_text_color_inactive,c=t.option_bg_type,d=e.rating_style,p=e.answerMode,u=e.choices,h=void 0===u?[]:u,g=e.rating,f=void 0===g?{rating_style:d,bg_color:"#D9DCDE",selected_bg_color:"#109B15"}:g,m=e.rating_scale,_=void 0===m?5:m,v=e.selected_rating,b=void 0===v?-1:v,y=e.text_answer,x=void 0===y?"":y,w=e.text_config?e.text_config:{maximum_characters:150,background_color:"#ccc",placeholder:"",text_color:"#000",placeholder_text_color:"#00000087"},C=!1,E=[];if(p===ANSWER_TYPES.SINGLE_CHOICE||p===ANSWER_TYPES.MULTI_CHOICE){var k=getTextAreaNode(w);k.style.visibility="hidden";var S=function(e,t){e.style.color=t?s:l},T=function(e,t){var n=t?a:r;"filled"===c?e.style.background=n:"outline"===c&&(e.style.borderColor=n)};h.forEach((function(t,i){var o=document.createElement("label");o.className="apx-lc",o.innerText=t.value;var a=document.createElement("input");a.name=a.type=p===ANSWER_TYPES.SINGLE_CHOICE?"radio":"checkbox",a.checked=t.is_selected;var r=document.createElement("span");r.className="apx-i",o.appendChild(a),o.appendChild(r),T(o,t.is_selected),S(o,t.is_selected),t.is_other&&(C=!0,k.addEventListener("input",(function(e){t.other_answer=e.target.value}))),t.is_selected&&t.is_other&&(k.style.visibility="visible",t.other_answer&&(k.value=t.other_answer)),p===ANSWER_TYPES.MULTI_CHOICE?a.onchange=function(i){var a=i.target.checked;t.is_selected=a,S(o,a),T(o,a),t.is_other&&(k.style.visibility=a?"visible":"hidden"),changeSubmitButtonBgColor(e,n)}:(a.setAttribute("apx-key","radio"),a.setAttribute("apx-ci",i+""),a.onchange=function(){document.querySelectorAll('input[apx-key="radio"]').forEach((function(e,n){var i=e.checked;h[n].is_selected=i,S(e.parentNode,i),T(e.parentNode,i),t.is_other?k.style.visibility=i?"visible":"hidden":k.style.visibility="hidden"})),changeSubmitButtonBgColor(e,n)}),E.push(o)})),C&&E.push(k)}else if(p===ANSWER_TYPES.SHORT_ANSWER&&null!==w){var A=w.example,I=w.example_text_color;if(""!==A&&""!==A.trim()){var P=document.createElement("span");P.innerHTML="Example: "+A,P.style.color=I,P.style.marginTop="12px",P.style.fontFamily="inherit",P.style.fontSize="15px",E.push(P)}var O=getTextAreaNode(w);O.addEventListener("input",(function(t){e.text_answer=t.target.value,t.target.value&&t.target.value.length>0&&(e.is_answered=!0),changeSubmitButtonBgColor(e,n)})),""!==x&&""!==x.trim()&&(O.innerText=x),E.push(O)}else if(p===ANSWER_TYPES.RATING){var L=f.rating_style,N=f.bg_color,D=f.selected_bg_color,B=document.createElement("div"),M="",F=[],$="",R="cursor:pointer;font-size:30px;width:auto;height:auto;";if("stylized"===L)F=5===_?STYLISED_EMOJI_GREY_5:STYLISED_EMOJI_GREY_10,B.style="display:flex;flex-wrap:wrap;justify-content:".concat(5===_?"space-evenly":"center",";gap:5px;padding-top:8px;padding-bottom:8px;overflow:hidden"),M="opacity:1 !important;",$="".concat(R,"padding-right:7px;padding-top:4px;padding-bottom:2px;border-radius:50%;background:transparent;opacity:1;filter:drop-shadow(0px 0.586957px 1.76087px rgba(0, 0, 0, 0.11))");else if("classic"===L)F=5===_?EMOJI_ICONS_5:EMOJI_ICONS_10,B.style="display:flex;flex-wrap:wrap;justify-content:".concat(5===_?"space-evenly":"center",";gap:5px;padding-top:8px;padding-bottom:8px;overflow:hidden"),M="opacity:1 !important;border:1.06px solid #017DFD; background-color:rgba(1, 125, 253, 0.1);\n ",$="".concat(R,"padding-right:7px;padding-top:4px;padding-bottom:2px;opacity:1;filter:drop-shadow(0px 0.586957px 1.76087px rgba(0, 0, 0, 0.11))");else if("star"===L){B.style="display:flex;flex-wrap:wrap;justify-content:".concat(5===_?"space-evenly":"center",";gap:5px;padding-top:8px;padding-bottom:8px;overflow:hidden");for(var H=0;H<_;H++)F.push("&#11088;");M="filter:grayscale(0%) !important",$="".concat(R,"filter:grayscale(100%)")}else"numbers"===L&&(F=5==_?["1","2","3","4","5"]:["0","1","2","3","4","5","6","7","8","9","10"],M="background:".concat(D," !important;color:white !important;"),$="display:flex;justify-content:space-evenly;align-items:center;color:#646A6E;margin-bottom:".concat(5===_?"0px":"10px",";font-size:15px;width:40px;height:40px;background-color:").concat(N,";box-shadow:0px 0.54801px 1.64403px 0.54801px rgba(0, 0, 0, 0.11);border-radius:50%"),B.style.marginTop="12px",B.style="display:flex;align-text:center;flex-wrap:wrap;justify-content:".concat(5===_?"space-evenly":"center",";gap:15px;padding-top:8px;padding-bottom:8px;overflow:hidden"));var V=document.createElement("style"),q="";(5==_?RATING_COLORS_5:RATING_COLORS_10).forEach((function(e,t){q+=".apx-rsel-".concat(t,"{\n background:").concat(e,"!important;\n color:white !important;\n }")})),V.innerHTML=".apx-rsel{".concat(M,"}")+q+".apx-r{".concat($,"}\n"),B.appendChild(V);for(var U=function(e){return"star"!==L?e+1===b:e+1<=b},j=[],z=0;z<F.length;z++){var W=document.createElement("div");W.innerHTML="".concat("").concat(F[z]);var Y=document.createElement("div");"classic"===L?(11==F.length?"".concat(Y.innerHTML=z):"".concat(Y.innerHTML=z+1),Y.style.fontSize="12.83px",Y.style.display="flex",Y.style.fontWeight="500",Y.style.justifyContent="center",Y.style.alignItems="center",W.appendChild(Y),W.style.display="flex",W.style.justifyContent="space-evenly",W.style.alignItems="center",W.style.flexDirection="column",W.style.width="40px",W.style.height="70px"):"stylized"===L&&(11==F.length?"".concat(Y.innerHTML=z):"".concat(Y.innerHTML=z+1),Y.style.fontSize="12.83px",Y.style.display="flex",Y.style.justifyContent="center",Y.style.alignItems="center",W.appendChild(Y),W.style.display="flex",W.style.justifyContent="space-evenly",W.style.alignItems="center",W.style.marginBottom="15px",W.style.marginRight="5px",W.style.gap="4px",W.style.flexDirection="column"),U(z)&&W.classList.add("apx-rsel"),W.classList.add("apx-r"),j.push(W)}var X=function(e,t,n,i,o){n.forEach((function(n,a){var r=document.createElement("div");r.innerHTML=5===_?a+1:a,r.style.fontSize="12.83px",r.style.display="flex",r.style.justifyContent="center",r.style.alignItems="center",e.appendChild(r),n.innerHTML=a===t?i[t]:o[a],n.appendChild(r)}))};j.forEach((function(t,i){e.selected_rating=i+1,t.addEventListener("click",(function(){if("stylized"===L&&(5===F.length?X(t,i,j,STYLISED_EMOJI_5,STYLISED_EMOJI_GREY_5):X(t,i,j,STYLISED_EMOJI_10,STYLISED_EMOJI_GREY_10)),"numbers"===L?t.classList.add("apx-rsel-".concat(i)):t.classList.add("apx-rsel"),e.is_answered=!0,changeSubmitButtonBgColor(e,n),e.selected_rating=i+1,"numbers"===L){for(var o=0;o<i;o++)j[o].classList.remove("apx-rsel-".concat(o));for(var a=i+1;a<F.length;a++)j[a].classList.remove("apx-rsel-".concat(a))}else if("star"===L){for(var r=0;r<i+1;r++)j[r].classList.add("apx-rsel");for(var s=i+1;s<F.length;s++)j[s].classList.remove("apx-rsel")}else{for(var l=0;l<i;l++)j[l].classList.remove("apx-rsel");for(var c=i+1;c<F.length;c++)j[c].classList.remove("apx-rsel")}e.rulesArray.forEach((function(t){if(e.selected_rating>=t.min&&e.selected_rating<=t.max){var i,o=document.createElement("span");o.setAttribute("id","nps_advanced"),o.innerHTML=null===(i=t.question)||void 0===i?void 0:i.question;var a=getTextAreaNode(w);a.addEventListener("input",(function(t){e.text_answer=t.target.value,t.target.value&&t.target.value.length>0&&(e.is_answered=!0),changeSubmitButtonBgColor(e,n)})),o.appendChild(a),B.appendChild(o);var r=document.getElementById("nps_advanced");r&&B.removeChild(r),o.appendChild(a),B.appendChild(o)}}))})),B.appendChild(t)})),E.push(B)}var G=document.createElement("div");G.style.padding="14px",G.style.display="flex",G.style.flexDirection="column",G.style.minHeight="340px";var Q=document.createElement("style"),Z="";p===ANSWER_TYPES.SHORT_ANSWER?Z=getTextAreaCSS(w.placeholder_text_color):p!==ANSWER_TYPES.SINGLE_CHOICE&&p!==ANSWER_TYPES.MULTI_CHOICE||(Z=getSurveyOptionCSS(p,a,r,s,l,c),C&&(Z+=getTextAreaCSS(w.placeholder_text_color))),Q.innerHTML=Z.replaceAll("\n","").replace(/[\s]{2,999}/g,""),G.appendChild(Q);var K=document.createElement("span");return K.innerText=e.title,K.style="margin-bottom:12px;color:".concat(i,";background-color:").concat(o,";font-size:16px;font-weight:600"),G.appendChild(K),E.forEach((function(e){return G.appendChild(e)})),G},getSurveyDialogContent=function(e,t,n,i,o,a){var r=createSurveyHeaderNode(e,i,o,a),s=r.headerNode,l=r.prevButton,c=r.closeButton,d=createSurveyFooterNode(e,n,i,o,n.is_required),p=d.skipButton,u=d.submitButton,h=d.footerNode,g=createQuestionNode(n,t,u),f=document.createElement("div");f.className="apx-sq";var m=document.createElement("style");return m.innerHTML=".apx-sq > * {font-family:inherit;}.apx-sq {height:100%;width:100%;display:flex;flex-direction:column}.apx-b{border:none;background:none;opacity:1;cursor:pointer;font-family:inherit}",f.appendChild(m),f.appendChild(s),f.appendChild(g),{questionRoot:f,footerNode:h,prevButton:l,closeButton:c,skipButton:p,submitButton:u}},createSuccessMessage=function(e,t){var n=t.success_message_bg_color,i=t.success_message_icon_color,o=t.success_message_text_color,a=document.createElement("div");return a.style="display:flex;justify-content:center;align-items:center;flex-direction:column;width:100%;height:100%;background: ".concat(n,"; min-height:480px"),a.innerHTML="\n <div>\n ".concat(getCheckMarkSVG(64,64,i),'\n </div>\n <div style="font-size: 17px;margin-top:15px;color:').concat(o,'">').concat(e,"</div>\n "),a},Logger$7=window.ApxorLogger,Choice=_createClass$1((function e(t){var n=this;_classCallCheck$1(this,e),_defineProperty$1(this,"resetState",(function(){n.is_selected=!1,n.other_answer=null}));var i=t.id,o=t.value,a=t.is_other,r=t.next_question_id;if(!i||!o)throw new Error("Invalid Choice");this.id=i,this.value=o,this.is_other=a,this.next_question_id=r,this.is_selected=!1,this.other_answer=null})),Question=_createClass$1((function e(t){var n=this;_classCallCheck$1(this,e),_defineProperty$1(this,"resetState",(function(){n.is_answered=!1,n.text_answer="",n.selected_rating=-1,n.choices.forEach((function(e){return e.resetState()}))}));var i=t.id,o=t.answer_mode,a=t.title,r=t.is_required,s=t.submit_text,l=t.rating_style,c=t.rating_scale,d=t.choices,p=void 0===d?[]:d,u=t.text_config,h=void 0===u?null:u,g=t.randomize_choices,f=void 0!==g&&g,m=t.response_cfg,_=void 0===m?{}:m,v=t.advanced_options,b=t.rules,y=void 0===b?[]:b;if(!i||!o)throw new Error("Invalid question");var x=-1;switch(o){case"single_choice":x=ANSWER_TYPES.SINGLE_CHOICE;break;case"multi_choice":x=ANSWER_TYPES.MULTI_CHOICE;break;case"text":x=ANSWER_TYPES.SHORT_ANSWER;break;case"rating":x=ANSWER_TYPES.RATING;break;default:x=-1}if(this.answerMode=x,this.id=i,this.is_required=r,this.submit_text=s,this.randomize_choices=f,this.response_cfg=_,this.text_config=h,this.title=a,this.rating_style=l,this.rating_scale=c,this.is_answered=!1,this.selected_rating=-1,this.rules=y,this.rulesArray=[],v&&this.rules.forEach((function(e){if(t[e.qid]){var i={max:e.max,min:e.min,question:t[e.qid]};n.rulesArray.push(i)}})),this.choices=[],this.answerMode===ANSWER_TYPES.SINGLE_CHOICE||this.answerMode===ANSWER_TYPES.MULTI_CHOICE){for(var w,C=[],E=0;E<p.length;E++){var k=new Choice(p[E]);k.is_other?C.push(k):this.choices.push(k)}f&&(this.choices=getShuffledArr(this.choices)),(w=this.choices).push.apply(w,C)}})),SurveyConfigItem=_createClass$1((function e(){var t=this;_classCallCheck$1(this,e),_defineProperty$1(this,"initialize",(function(e,n,i){var o=i.delay,a=i.dialog_config,r=void 0===a?null:a,s=i.show_progress_bar,l=void 0===s||s,c=i.is_response_based_survey,d=void 0!==c&&c,p=i.questions,u=void 0===p?[]:p,h=i.show_success_message,g=void 0===h||h,f=i.auto_hide_message,m=void 0===f?2e3:f,_=i.success_message,v=void 0===_?"":_,b=i.question_text_color,y=void 0===b?"#002845":b,x=i.submit_active_color,w=void 0===x?"#017DFD":x,C=i.submit_inactive_color,E=void 0===C?"#017DFD65":C,k=i.option_bg_type,S=void 0===k?"filled":k,T=i.option_text_color_active,A=void 0===T?"#002845":T,I=i.option_text_color_inactive,P=void 0===I?"#002845":I,O=i.option_bg_color_active,L=void 0===O?"#FFF":O,N=i.option_bg_color_inactive,D=void 0===N?"#FFF":N,B=i.question_background_color,M=void 0===B?"#FFF":B,F=i.success_message_bg_color,$=void 0===F?"#109B15":F,R=i.success_message_icon_color,H=void 0===R?"#109B15":R,V=i.success_message_text_color,q=void 0===V?"#002845":V,U=i.skip_text_color,j=void 0===U?"#017DFD":U,z=i.cancel_button_color,W=void 0===z?"#000":z,Y=i.previous_button_color,X=void 0===Y?"#000":Y,G=i.progress_bar_color,Q=void 0===G?"#017DFD":G,Z=i.submit_text_color,K=void 0===Z?"#FFF":Z,J=i.width,ee=void 0===J?350:J,te=i.min_height,ne=void 0===te?40:te,ie=i.position,oe=void 0===ie?"center":ie,ae=i.dim_background,re=void 0===ae||ae,se=i.dim_bg_color,le=void 0===se?"#313131":se,ce=i.dim_bg_opacity,de=void 0===ce?.54:ce;t.configId=e,t.name=n,t.delay=o,t.is_response_based_survey=d,t.show_success_message=g,t.success_message=v,t.auto_hide_message=m,t.questions=[],t.displayedQuestionIndeces=[],t.answered_questions=[],t.width=ee,t.min_height=ne,t.layoutConfig={show_progress_bar:l,skip_text_color:j,cancel_button_color:W,previous_button_color:X,progress_bar_color:Q,submit_text_color:K,submit_active_color:w,submit_inactive_color:E,success_message_bg_color:$,success_message_icon_color:H,success_message_text_color:q,position:oe,dim_background:re,dim_bg_color:le,dim_bg_opacity:de},t.questionConfig={question_text_color:y,question_background_color:M,option_bg_color_active:L,option_bg_color_inactive:D,option_text_color_active:A,option_text_color_inactive:P,option_bg_type:S},r&&(t.dialog_config=r);for(var pe=0;pe<u.length;pe++)try{if("request_survey"===u[pe].answer_mode||"success_message"===u[pe].answer_mode)continue;t.questions.push(new Question(u[pe])),t.answered_questions.push(-1)}catch(e){return Logger$7.error("Failed to parse Q",pe,e),!1}return!(t.questions.length<1)||(t.isValid=!1,!1)})),_defineProperty$1(this,"showSurvey",(function(e,n){t.isValid&&setTimeout((function(){try{var i=window.ApxorRTM;if(null!==i.currentAction&&void 0!==i.currentAction)return null==Apxor||Apxor.logEvent("apx_nudge_not_shown",{apx_nudge_type:"survey",apx_nudge_id:t.configId,apx_nudge_name:t.name,apx_variant_code:t.ceInstance.getVariantCode(t.configId),apx_failure_type:"error",apx_reason:"An action is already being shown"},!1,"apxor","survey"),void Logger$7.error("An action is already being shown.");t.startTime=Date.now();var o=createDialog(t.width,t.min_height,n,t.layoutConfig,t.questionConfig);if(t.bodyOverflow=document.body.style.overflow,document.body.style.overflow="hidden",t._logSurveyAppEvent("apx_survey_launched",{apx_survey_type:!0,campaign_type:"survey"}),t.dialog_config){var a=t.dialog_config,r=a.icon_name,s=void 0===r?"":r,l=a.icon_width,c=a.icon_height,d=o.children[0];o.style.visibility="hidden",d.style.visibility="hidden",setTimeout((function(){var e;null!=t&&null!==(e=t.dialog_config)&&void 0!==e&&e.dialog_background_color&&(d.style.backgroundColor=t.dialog_config.dialog_background_color),d.innerHTML=generateRequestSurvey(t.dialog_config),document.getElementById(APX_DIALOG_YES).onclick=function(){t._logSurveyAppEvent("apx_survey_dialog_yes_clicked",{apx_survey_type:!0,campaign_type:"survey"}),d.style.minHeight=t.min_height+"%",t._showQuestions(o,!0)},document.getElementById(APX_DIALOG_NO).onclick=function(){t._logSurveyAppEvent("apx_survey_dialog_no_clicked",{apx_survey_type:!0,campaign_type:"survey"}),t._closeDialog(o)};var n=function(){o.style.visibility="visible",d.style.visibility="visible",d.style.minHeight=""===s||0===l||0===c?"13%":"25%",d.classList.toggle("open"),t._logSurveyAppEvent("apx_survey_dialog_launched",{apx_survey_type:t.is_response_based_survey?"response_based":"default",campaign_type:"survey"})};if(""!==s&&l>0&&c>0){var i=document.getElementById("apx_icon");i.onload=function(){n()},i.onerror=function(){t._logSurveyAppEvent("apx_survey_dialog_icon_failed"),t._closeDialog(o)}}else n()}),100)}else t._showQuestions(o);e&&e((function(){return t._closeDialog(o)}))}catch(e){Logger$7.error(e)}}),t.delay)})),_defineProperty$1(this,"_showQuestions",(function(e){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=t.layoutConfig,o=i.show_progress_bar,a=i.progress_bar_color,r=document.createElement("div");r.className="apx-progress-bar",r.style="height:4px;overflow:hidden;position:relative;background:white;";var s=document.createElement("div");s.setAttribute("id","apx-pb"),s.style="border-radius:10px;top:0;left:0;width:100%;bottom:0;position:absolute;transition:transform 0.4s linear;transform-origin:left;background-color:".concat(a),r.appendChild(s),o||(r.style.visibility="hidden");var l=e.children[0];(n||l&&l.childElementCount>1)&&l.removeChild(l.children[l.childElementCount-1]),l.appendChild(r),t._displayQuestion(e,0),n||setTimeout((function(){e.children[0].classList.toggle("open")}),100)})),_defineProperty$1(this,"_getQuestionIndexFromId",(function(e){if(-1==e||!e)return-1;var n=t.questions.length;if(n>0)for(var i=0;i<n;i++)if(t.questions[i].id==e)return i;return-1})),_defineProperty$1(this,"_getNextQuestionIndex",(function(e,n){var i=e.answerMode,o=e.choices,a=void 0===o?[]:o;switch(i){case ANSWER_TYPES.RATING:var r=null==e?void 0:e.response_cfg[(null==e?void 0:e.selected_rating)||11];r?n=t._getQuestionIndexFromId(r):n+=1;break;case ANSWER_TYPES.SINGLE_CHOICE:var s;if(a.forEach((function(e){e.is_selected&&(s=e)})),s){var l=s.next_question_id;n=t._getQuestionIndexFromId(l)}else n+=1;break;case ANSWER_TYPES.MULTI_CHOICE:case ANSWER_TYPES.SHORT_ANSWER:default:n+=1}return n})),_defineProperty$1(this,"_displayQuestion",(function(e,n){var i;if(!(n>=t.questions.length)){var o=t.questions[n],a=getSurveyDialogContent(t.layoutConfig,t.questionConfig,o,n,t.questions.length,t.is_response_based_survey),r=a.prevButton,s=void 0===r?null:r,l=a.closeButton,c=void 0===l?null:l,d=a.submitButton,p=void 0===d?null:d,u=a.skipButton,h=void 0===u?null:u,g=a.questionRoot,f=a.footerNode,m=e.children[0];m&&m.childElementCount>2&&(m.removeChild(m.children[m.childElementCount-1]),m.removeChild(m.children[m.childElementCount-1])),null!=t&&null!==(i=t.questionConfig)&&void 0!==i&&i.question_background_color&&(m.style.backgroundColor=t.questionConfig.question_background_color),document.getElementById("apx-pb").style.transform="translateX(".concat(-(100-100/t.questions.length*(n+1)),"%)"),m.appendChild(g),m.appendChild(f),s&&(s.onclick=function(){t._logSurveyAppEvent("apx_survey_back_button_clicked",{apx_question_id:"",apx_question_name:"",apx_question_type:"",apx_question_position:2,apx_survey_type:"",campaign_type:"survey"}),t._logSurveyQuestionEvent(n);var i=t.displayedQuestionIndeces.pop();void 0!==i&&t._displayQuestion(e,i)}),c&&c.addEventListener("click",(function(){t._logSurveyAppEvent("apx_survey_close_clicked",{where:"question "+(n+1)}),t._logSurveyAppEvent("apx_survey_close_button_clicked",{apx_survey_type:!0,apx_time_to_complete:200,where:"question "+(n+1),campaign_type:"survey"}),t._logSurveyQuestionEvent(n),t._submitSurveyResponses(e,!1)})),p&&(p.onclick=function(){if(t.displayedQuestionIndeces.push(n),t.is_response_based_survey){t._logSurveyQuestionEvent(n);var i=t._getNextQuestionIndex(o,n);i===t.questions.length||-1===i?t._submitSurveyResponses(e,!0):t._displayQuestion(e,i)}else t._logSurveyQuestionEvent(n),n===t.questions.length-1?t._submitSurveyResponses(e,!0):t._displayQuestion(e,n+1)}),h&&(h.onclick=function(){t.displayedQuestionIndeces.push(n),n+1>=t.questions.length||(t._logSurveyAppEvent("apx_survey_skip_clicked",{where:"question "+(n+1)}),t._logSurveyAppEvent("apx_survey_skip_button_clicked",{apx_question_id:"",apx_question_name:"",apx_question_type:"",apx_question_position:2,apx_survey_type:"",where:"question "+(n+1),campaign_type:"survey"}),t._logSurveyQuestionEvent(n),t._displayQuestion(e,n+1))}),t._logSurveyAppEvent("apx_survey_question_asked",{apx_question_id:"",apx_question_name:"",apx_question_type:"",apx_question_position:2,apx_survey_type:"",campaign_type:"survey"})}})),_defineProperty$1(this,"_attributeForApxSurveyQuestionAnswered",(function(e){var n,i,o,a,r,s={};3===t.questions[e].answerMode&&(s.apx_nps_advanced_question=null!==(n=null===(i=t.questions[e].rulesArray)||void 0===i||null===(i=i[0])||void 0===i?void 0:i.question.question)&&void 0!==n?n:"",s.apx_nps_advanced_choice=[],s.apx_nps_advanced_free_text=[],null!==(o=t.questions[e])&&void 0!==o&&o.text_answer&&s.apx_nps_advanced_free_text.push(t.questions[e].text_answer),s.apx_nps_advanced_question_id=null!==(a=null===(r=t.questions[e].rules)||void 0===r||null===(r=r[0])||void 0===r?void 0:r.qid)&&void 0!==a?a:"");return s})),_defineProperty$1(this,"_logSurveyQuestionEvent",(function(e){if(-1===t.answered_questions[e]){var n=t._getAnswerForQuestion(e),i=[];n.textBasedQuestionAnswers.length>0&&n.textBasedQuestionAnswers.forEach((function(e){i.push(e.answer)})),n.answers.length>0&&(t._logSurveyAppEvent("apx_survey_question_answered",_objectSpread2$1(_objectSpread2$1({apx_question_id:"",apx_question_name:"",apx_question_type:"",apx_question_position:2,apx_survey_type:"",apx_choice:n.answerTexts,apx_choice_position:2,apx_free_text:n.textBasedQuestionAnswers},t._attributeForApxSurveyQuestionAnswered(e)),{},{apx_time_spent_to_answer:20,campaign_type:"survey"})),t._logSurveyAppEvent("apx_survey_".concat(t.questions[e].title),{answers:n.answerTexts,text_answers:i,campaign_type:"survey"}),t.answered_questions[e]=1)}})),_defineProperty$1(this,"_logSurveyAppEvent",(function(e){var n,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=null===(n=window.ApxorRTM)||void 0===n?void 0:n.getCampaignMeta(t.configId),a=o._attr;Apxor.logEvent(e,_objectSpread2$1(_objectSpread2$1({apx_survey_id:t.configId,apx_survey_name:t.name},i),a),!1,"apxor","survey")})),_defineProperty$1(this,"_getAnswerForQuestion",(function(e){var n=t.questions[e];if(!n)return null;var i={answers:[],answerTexts:[],others:[],textBasedQuestionAnswers:[]},o=n.answerMode,a=n.choices,r=void 0===a?[]:a,s=n.selected_rating,l=void 0===s?-1:s,c=n.text_answer,d=void 0===c?"":c,p=n.is_answered,u=void 0!==p&&p,h=n.text_config,g=void 0===h?null:h;switch(o){case ANSWER_TYPES.SINGLE_CHOICE:case ANSWER_TYPES.MULTI_CHOICE:r.forEach((function(e){e.is_selected&&(i.answers.push(e.id),i.answerTexts.push(e.value),e.is_other&&null!==e.other_answer&&""!==e.other_answer.trim()&&i.others.push({id:e.id,answer:e.other_answer}))}));break;case ANSWER_TYPES.SHORT_ANSWER:u&&""!==d&&""!==d.trim()&&null!==g&&(i.answers.push(g.id),i.answerTexts.push(d),i.textBasedQuestionAnswers.push({id:g.id,answer:d}));break;case ANSWER_TYPES.RATING:-1!==l&&(i.answers.push(l),i.answerTexts.push(l))}return i})),_defineProperty$1(this,"_closeDialog",(function(e){e[SURVEY_ON_DISMISS]&&e[SURVEY_ON_DISMISS](),e.children[0].classList.toggle("open"),setTimeout((function(){e.parentNode.removeChild(e),document.body.style.overflow=t.bodyOverflow,t.bodyOverflow=""}),400)})),_defineProperty$1(this,"_showSuccessMessage",(function(e){var n=e.children[0];for(n.style.minHeight="unset";null!=n&&n.childElementCount;)n.removeChild(n.children[n.childElementCount-1]);var i=createSuccessMessage(t.success_message,t.layoutConfig);n.appendChild(i),setTimeout((function(){t._closeDialog(e)}),t.auto_hide_message)})),_defineProperty$1(this,"_submitSurveyResponses",(function(e,n){n&&t.show_success_message?t._showSuccessMessage(e):t._closeDialog(e);var i={survey_id:t.configId,name:t.name,responses:[]};if(t.questions.forEach((function(e,n){var o=t._getAnswerForQuestion(n);if(o.answers.length>0){var a={question_id:e.id,answers:o.answers};e.rules.length>0&&e.rulesArray.forEach((function(t){if(e.selected_rating>=t.min&&e.selected_rating<=t.max){var n=t.question.text_config,i=e.text_answer;a.answers=[].concat(_toConsumableArray(a.answers),[n.id]);var o={id:n.id,answer:i};a.others||(a.others=[]),a.others.push(o)}})),o.others.length>0?a.others=o.others:o.textBasedQuestionAnswers.length>0&&(a.others=o.textBasedQuestionAnswers),i.responses.push(a)}})),i.responses.length>0){var o=Math.pow(10,3);i.time_taken=Math.round((Date.now()-t.startTime)/1e3*o)/o;var a=Apxor.getController(),r=a.getFromStorage("_apx_cd",!0).session_info.launch_time;i.session_id=Apxor.getSessionId(),i.is_completed=n,i.app_version=a.getFromStorage("apx_ver",!1),i.device_uuid=Apxor.getClientId(),i.launch_time=r,i.user_attributes=a.getUserAttributes(),i.session_attributes=a.getSessionAttributes(),t._sendReponseToServer(i)}n&&t._logSurveyAppEvent("apx_survey_completed",{apx_survey_type:!0,apx_time_to_complete:200,campaign_type:"survey"}),t.questions.forEach((function(e,n){e.resetState(),t.answered_questions[n]=-1})),t.startTime=-1,t.bodyOverflow=""})),_defineProperty$1(this,"_sendReponseToServer",(function(e){var t=SURVEY_RESPONSE_URL.replace("<app_id>",Apxor.getSiteId());fetch(t,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})})),this.isValid=!0,this.dialog_config=null,this.ceInstance=ceWrapper.getInstance()})),ApxorSurveys=_createClass$1((function e(){_classCallCheck$1(this,e),_defineProperty$1(this,"parse",(function(e,t,n){var i=new SurveyConfigItem;return i.initialize(e,t,n)?i:null}))})),PIPButton=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};_classCallCheck$1(this,e),this.color=getColorOrDefault(t.color,"#FFFFFF"),this.fill_color=getColorOrDefault(t.fill_color,"#FFFFFF"),this.type=getStringOrDefault(t.type,"normal"),this.path=t.path,this.offset_top=getNumberOrDefault(t.offset_top,8),this.offset_right=getNumberOrDefault(t.offset_right,8),this.height=getNumberOrDefault(t.height,24),this.width=getNumberOrDefault(t.width,24),this.action=getStringOrDefault(t.action,"dismiss")}return _createClass$1(e,null,[{key:"isEnabled",value:function(e){return!(isUndefined$2(e)||isNull$1(e)||isEmptyObject(e))}}]),e}(),PIP=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};_classCallCheck$1(this,e),this.enable_toggles=t.enable_toggles}return _createClass$1(e,null,[{key:"isEnabled",value:function(e){return!(isUndefined$2(e)||isNull$1(e)||isEmptyObject(e))}}]),e}(),EmbeddedVideo=_createClass$1((function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};_classCallCheck$1(this,e),this.html=t.html})),Video=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};_classCallCheck$1(this,e),this.path=getStringOrDefault(t.path,""),this.width=getNumberOrDefault(t.width,360),this.height=getNumberOrDefault(t.height,360),this.enable_embed=t.enable_embed,this.embed=new EmbeddedVideo(t.embed),this.enable_border=t.enable_border,this.border=new Border(t.border),this.enable_audio=t.enable_audio,this.format=getStringOrDefault(t.format,"video/mp4")}return _createClass$1(e,null,[{key:"isEnabled",value:function(e){return!(isUndefined$2(e)||isNull$1(e)||isEmptyObject(e))}}]),e}(),Logger$6=window.ApxorLogger,VideoInApp=function(){function e(t,n,i,o,a,r){var s=this;_classCallCheck$1(this,e),_defineProperty$1(this,"showVideoInApp",(function(){s.createPlayer();try{if(s.mode==VIDEOS_MODES.PIP){var e=s.videoElement,t=s.hideCallback;e.onloadedmetadata=function(){var n=this;e.disablePictureInPicture=!1,e.requestPictureInPicture().then((function(){e.play()})).catch((function(e){Logger$6.error("Can't show PIP:".concat(e)),Apxor.logEvent("apx_video_inapp_failed",{campaignName:n.name,id:n.configId,failureReason:e,campaign_type:"modal"},!1,"apxor","campaign"),t()}))},e.onabort=function(){Logger$6.error("Can't show video: resource is not fully loaded"),Apxor.logEvent("apx_video_inapp_failed",{campaignName:this.name,id:this.configId,failureReason:"Can't show video, meta data not loaded",campaign_type:"modal"},!1,"apxor","campaign"),this.hideCallback()},e.onstalled=function(){Logger$6.error("Can't show video: data is unexpectedly not forthcoming"),Apxor.logEvent("apx_video_inapp_failed",{campaignName:this.name,id:this.configId,failureReason:"Can't show video, data is unexpectedly not forthcoming",campaign_type:"modal"},!1,"apxor","campaign"),this.hideCallback()}}else s.unhideVideoPlayer();s.showCallback()}catch(e){Logger$6.error("Can't show video:".concat(e)),Apxor.logEvent("apx_video_inapp_failed",{campaignName:s.name,id:s.configId,failureReason:e,campaign_type:"modal"},!1,"apxor","campaign"),s.hideCallback()}})),_defineProperty$1(this,"_getHeightWidthFromResolution",(function(){var e=getHeightWidthFromResolution(s.video),t=e.width,n=e.height;s.height=n,s.width=t})),_defineProperty$1(this,"_removeVideoPlayerStyles",(function(){var e=document.getElementById("apx-mpl-styles");e&&e.remove()})),_defineProperty$1(this,"_setVideoControlListeners",(function(){s.videoElement.addEventListener("ended",(function(){var e=document.getElementById("apx-cta-btn");e&&e.classList.remove("apx-video-hide-elmt".concat(s.cssPostFix)),document.fullscreenElement?(s.totalDurationMaximised+=Math.round(s.videoElement.duration)-Math.round(s.slotStartTime),s.durationMaximisedSlots.push("".concat(Math.round(s.slotStartTime),"-").concat(Math.round(s.videoElement.duration)))):(s.totalDurationMinimised+=Math.round(s.videoElement.duration)-Math.round(s.slotStartTime),s.durationMinimisedSlots.push("".concat(Math.round(s.slotStartTime),"-").concat(Math.round(s.videoElement.duration))))})),s.videoElement.addEventListener("play",(function(){s.inAppShown||(s.minimisedCount=0,s.maximisedCount=0,s.totalDurationMinimised=0,s.totalDurationMaximised=0,s.durationMinimisedSlots=[],s.durationMaximisedSlots=[],s.volumeClickedCount=0,s.slotStartTime=0,s.slotStartTimeVolumeChange=0,Apxor.logEvent("inapp_shown",{message_name:s.name,visibleScreen:location.pathname,inappType:"PIP Inapp",autoReplay:s.videoElement.loop?"On":"Off",defaultSound:s.videoElement.muted?"Mute":"Unmute",id:s.configId,videoDuration:Math.round(s.videoElement.duration),videoResolution:"".concat(s.videoElement.videoWidth,"x").concat(s.videoElement.videoHeight),videoConfiguration:"Streaming",campaign_type:"modal"},!1,"apxor","campaign"),s.inAppShown=!0),0!==s.videoElement.currentTime&&s.videoElement.currentTime!==s.videoElement.duration||(s.replayCount++,s.slotStartTime=0,s.slotStartTimeVolumeChange=0);var e=document.getElementById("apx-cta-btn");e&&e.classList.add("apx-video-hide-elmt".concat(s.cssPostFix))})),s.videoElement.addEventListener("fullscreenchange",(function(){s.slotEndTime=s.videoElement.currentTime,document.fullscreenElement?(s.maximisedCount++,s.durationMinimised=Math.round(s.slotEndTime)-Math.round(s.slotStartTime),s.videoElement.currentTime!==s.videoElement.duration&&(s.totalDurationMinimised+=s.durationMinimised,s.durationMinimisedSlots.push("".concat(Math.round(s.slotStartTime),"-").concat(Math.round(s.slotEndTime)))),Apxor.logEvent("apx_video_inapp_maximised",{message_name:s.name,durationMinimised:s.durationMinimised,durationSlotMinimised:"".concat(Math.round(s.slotStartTime),"-").concat(Math.round(s.slotEndTime)),id:s.configId,totalDurationWatched:Math.round(s.totalDurationMinimised),totalDurationWatchedSlot:s.durationMinimisedSlots,maximisedCount:s.maximisedCount,campaign_type:"modal"},!1,"apxor","campaign")):(s.durationMaximised=Math.round(s.slotEndTime)-Math.round(s.slotStartTime),s.minimisedCount++,s.videoElement.currentTime!==s.videoElement.duration&&(s.totalDurationMaximised+=s.durationMaximised,s.durationMaximisedSlots.push("".concat(Math.round(s.slotStartTime),"-").concat(Math.round(s.slotEndTime)))),Apxor.logEvent("apx_video_inapp_minimised",{message_name:s.name,durationMaximised:s.durationMaximised,durationSlotMaximised:"".concat(Math.round(s.slotStartTime),"-").concat(Math.round(s.slotEndTime)),id:s.configId,totalDurationWatched:Math.round(s.totalDurationMaximised),totalDurationWatchedSlot:s.durationMaximisedSlots,minimisedCount:s.minimisedCount,campaign_type:"modal"},!1,"apxor","campaign")),s.slotStartTime=s.videoElement.currentTime})),s.videoElement.addEventListener("volumechange",(function(){isNaN(s.slotStartTimeVolumeChange)||(s.volumeClickedCount++,Apxor.logEvent("apx_video_inapp_volume_button_clicked",{message_name:s.name,id:s.configId,actionPerformed:s.videoElement.muted?"mute":"unmute",totalDurationWatchedSlot:"".concat(Math.round(s.slotStartTimeVolumeChange),"-").concat(Math.round(s.videoElement.currentTime)),totalDurationWatched:Math.round(s.videoElement.currentTime)-Math.round(s.slotStartTimeVolumeChange),campaign_type:"modal"},!1,"apxor","campaign"),s.slotStartTimeVolumeChange=s.videoElement.currentTime)}))})),_defineProperty$1(this,"_setPIPtoggleListeners",(function(){var e;if("PIP"!==s.mode||null!==(e=s.terminationConfig)&&void 0!==e&&e.auto_dismiss){if("mini"===s.mode&&(s.enable_pip_button||isIOSDevice())){if(s.videoElement.addEventListener("enterpictureinpicture",(function(){s.videoPlayer.classList.add("apx-video-hide-elmt".concat(s.cssPostFix))}),!1),s.pip.enable_toggles){s.videoElement.addEventListener("leavepictureinpicture",(function(){s.videoElement.disablePictureInPicture=!0,s.videoPlayer.classList.remove("apx-video-hide-elmt".concat(s.cssPostFix))}),!1)}else s.videoElement.addEventListener("leavepictureinpicture",(function(){s._onClose("web_pip_x_icon_clicked")}),!1)}}else s.videoElement.addEventListener("leavepictureinpicture",(function(){s._onClose("web_pip_x_icon_clicked")}),!1)})),_defineProperty$1(this,"_setCustomControls",(function(){if(s.enable_close_button,s.enable_close_button&&!isIOSDevice()){var e=document.createElement("span");s.close_button.type===CLOSE_BUTTON_STYLE.NORMAL?e.innerHTML=getCloseSVG(s.close_button.width,s.close_button.height,s.close_button.color):s.close_button.type===CLOSE_BUTTON_STYLE.FILL?"circle"===s.close_button.shape?e.innerHTML=getCloseWithCircleSVG(s.close_button.width,s.close_button.height,s.close_button.fill_color,s.close_button.color):e.innerHTML=getCloseWithRectangleSVG(s.close_button.width,s.close_button.height,s.close_button.fill_color,s.close_button.color):e.innerHTML='<img src="'.concat(s.close_button.path,'" width="').concat(s.close_button.width,'px" height="').concat(s.close_button.height,'px"></img>'),e.classList.add("apx-video-close-btn".concat(s.cssPostFix)),e.addEventListener("click",(function(){s._onClose()})),s.videoPlayer.appendChild(e)}if(s.enable_pip_button&&!isIOSDevice()){var t=document.createElement("span");t.innerHTML=getPIPSVG(s.pip_button.width,s.pip_button.height,s.pip_button.color),s.pip_button.path&&(t.innerHTML='<img src="'.concat(s.pip_button.path,'" width="').concat(s.pip_button.width,'px" height="').concat(s.pip_button.height,'px"></img>')),t.classList.add("apx-video-pip-btn".concat(s.cssPostFix)),t.addEventListener("click",(function(){try{s.videoElement.disablePictureInPicture=!1,s.videoElement.requestPictureInPicture()}catch(e){console.log("Error \n ".concat(e," \n while starting the PIP"))}})),s.videoPlayer.appendChild(t)}})),_defineProperty$1(this,"hideVideoPlayer",(function(){s.videoPlayer.classList.add("apx-video-hide-elmt".concat(s.cssPostFix))})),_defineProperty$1(this,"unhideVideoPlayer",(function(){s.videoPlayer.classList.remove("apx-video-hide-elmt".concat(s.cssPostFix))})),_defineProperty$1(this,"getVideoElement",(function(){return s.videoElement})),this.videoPlayer=null,this.videoElement=null,this.showCallback=a,this.terminationConfig=n,this.hideCallback=r,this.height=320,this.width=320,this.configId=i,this.name=o||"VideoPlayer",this.cssPostFix="-".concat(this.configId,"-").concat(this.name).replaceAll(" ","").replace(/[^\w\s]/gi,""),this.replayCount=0,this.inAppShown=!1,this.videoConfig=t,this.bg_color=t.bg_color,this.mode=getStringOrDefault(t.mode,"PIP"),this.position=new Position(t.position),this.enable_buttons=t.enable_buttons,this.enable_buttons&&(this.buttons=new Buttons(t.buttons)),this.direction=new Direction(t.direction),this.enable_close_button=t.enable_close_button,this.enable_close_button&&(this.close_button=new CloseButton(t.close_button)),this.enable_pip_button=t.enable_pip_button,this.enable_pip_button&&(this.pip_button=new PIPButton(t.pip_button)),this.video=new Video(t.video),this.pip=new PIP(t.pip)}return _createClass$1(e,[{key:"createPlayer",value:function(){this.videoPlayer=document.createElement("div"),this.videoPlayer.setAttribute("id","apx-video-player"),this.videoPlayer.style.backgroundColor=this.bg_color,this._getHeightWidthFromResolution(),this._setVideoPlayerStyles(),this._setVideoPlayerPosition(),this._setPlayerContent(),this._setVideoControlListeners(),this._setPIPtoggleListeners(),this._setCustomControls(),this._setButtons(BUTTON_CONTAINER_POSITION.CENTER),this.hideVideoPlayer(),this._setAutoTerminate(),document.body.appendChild(this.videoPlayer)}},{key:"_setVideoPlayerStyles",value:function(){if(!document.getElementById("apx-mpl-styles")){var e=document.createElement("style");e.setAttribute("id","apx-mpl-styles");var t=this.enable_pip_button?"\n width: ".concat(this.pip_button.width,"px;\n height: ").concat(this.pip_button.height,"px;\n "):"",n=this.enable_close_button?"\n top: ".concat(this.close_button.offset_top,"px;\n right: ").concat(this.close_button.offset_right,"px;\n "):"";e.innerHTML="\n #apx-video-player {\n width: ".concat(this.width,"px;\n height: ").concat(this.height,"px;\n }\n\n div.apx-video-player").concat(this.cssPostFix,"--topLeft {\n position: fixed;\n top: 0;\n left: 0;\n background-color: ").concat(COLORS.BLACK,";\n z-index:99999999;\n }\n \n div.apx-video-player").concat(this.cssPostFix,"--topRight {\n position: fixed;\n top: 0;\n right: 0;\n background-color: ").concat(COLORS.BLACK,";\n z-index:99999999;\n }\n \n div.apx-video-player").concat(this.cssPostFix,"--bottomLeft {\n position: fixed;\n bottom: 0;\n left: 0;\n background-color: ").concat(COLORS.BLACK,";\n z-index:99999999;\n }\n \n div.apx-video-player").concat(this.cssPostFix,"--bottomRight {\n position: fixed;\n bottom: 0;\n right: 0;\n background-color: ").concat(COLORS.BLACK,";\n z-index:99999999;\n }\n\n div.apx-video-player").concat(this.cssPostFix,"--center {\n position: fixed;\n left: 50%;\n top: 50%;\n background-color: ").concat(COLORS.BLACK,";\n transform: translate(-50%, -50%);\n z-index:99999999;\n }\n .apx-video-hide-elmt").concat(this.cssPostFix," {\n display : none;\n }\n\n #apx-cta-btn.apx-video-hide-elmt").concat(this.cssPostFix," {\n display : none;\n }\n\n .apx-video-pip-btn").concat(this.cssPostFix," {\n position: absolute;\n top: 10px;\n left: 10px;\n opacity: 0.3;\n transition: opacity .3s ease;\n cursor: pointer;\n ").concat(t,"\n }\n\n video:hover~.apx-video-pip-btn").concat(this.cssPostFix," {\n opacity: 1;\n }\n \n .apx-video-close-btn").concat(this.cssPostFix," {\n position: absolute;\n opacity: 0.3;\n transition: opacity .3s ease;\n cursor: pointer;\n ").concat(n,"\n }\n\n video:hover~.apx-video-close-btn").concat(this.cssPostFix," {\n opacity: 1;\n }\n\n .apx-video-cta").concat(this.cssPostFix,' {\n position: absolute;\n top: 50%;\n left: 50%;\n -webkit-transform: translate(-50%, -50%);\n -moz-transform: translate(-50%, -50%);\n width: auto;\n height: auto;\n transition: opacity .3s ease;\n cursor: pointer;\n }\n \n .bi::before,\n [class^="bi-"]::before,\n [class*=" bi-"]::before {\n display: inline-block;\n font-style: normal;\n font-weight: normal !important;\n font-variant: normal;\n text-transform: none;\n line-height: 1;\n vertical-align: -.125em;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n }\n \n .bi-pip::before { \n content: "\f4ef"; \n }\n\n .bi-x-circle::before { \n content: "\f623"; \n }\n\n '),document.head.appendChild(e)}}},{key:"_setVideoPlayerPosition",value:function(){switch(this.position.position){case INAPP_POSITION.TOP_LEFT:this.videoPlayer.classList.add("apx-video-player".concat(this.cssPostFix,"--topLeft"));break;case INAPP_POSITION.TOP_RIGHT:this.videoPlayer.classList.add("apx-video-player".concat(this.cssPostFix,"--topRight"));break;case INAPP_POSITION.BOTTOM_LEFT:this.videoPlayer.classList.add("apx-video-player".concat(this.cssPostFix,"--bottomLeft"));break;case INAPP_POSITION.BOTTOM_RIGHT:this.videoPlayer.classList.add("apx-video-player".concat(this.cssPostFix,"--bottomRight"));break;case INAPP_POSITION.CENTER:this.videoPlayer.classList.add("apx-video-player".concat(this.cssPostFix,"--center"));break;default:this.videoPlayer.classList.add("apx-video-player".concat(this.cssPostFix,"--bottomRight"))}}},{key:"_setPlayerContent",value:function(){this.videoElement=document.createElement("video"),this.videoElement.width=this.width,this.videoElement.height=this.height,this.videoElement.style.objectFit="fill",this.videoElement.controlsList="nodownload",this.videoElement.controls=!0,isIOSDevice()&&(this.videoElement.playsInline=!0,this.videoElement.muted=!0),this.videoElement.disablePictureInPicture=!0,this.videoElement.autoplay=!0,this.video.enable_audio||(this.videoElement.muted=!0);var e=document.createElement("source");e.setAttribute("src",this.video.path),e.setAttribute("type",this.video.format),this.videoElement.appendChild(e),this.videoPlayer.appendChild(this.videoElement)}},{key:"_onClose",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"web_minimise_x_clicked";try{this.inAppShown&&(document.fullscreenElement?(this.totalDurationMaximised+=Math.round(this.videoElement.currentTime)-Math.round(this.slotStartTime),this.durationMaximisedSlots.push("".concat(Math.round(this.videoElement.currentTime),"-").concat(Math.round(this.slotStartTime)))):(this.totalDurationMinimised+=Math.round(this.videoElement.currentTime)-Math.round(this.slotStartTime),this.durationMinimisedSlots.push("".concat(Math.round(this.videoElement.currentTime),"-").concat(Math.round(this.slotStartTime))))),this.videoPlayer.remove(),this._removeVideoPlayerStyles(),"auto_dismiss"!==e&&Apxor.logEvent("apx_video_inapp_close_button_clicked",{message_name:this.name,id:this.configId,totalDurationWatchedSlot:"0-".concat(Math.round(this.videoElement.currentTime)),totalDurationWatched:Math.round(this.videoElement.currentTime),closeButtonName:e,campaign_type:"modal"},!1,"apxor","campaign"),Apxor.logEvent("apx_inapp_dismissed",{campaignName:this.name,id:this.configId,totalDurationWatched:Math.round(this.videoElement.currentTime),totalDurationWatchedSlot:"0-".concat(Math.round(this.videoElement.currentTime)),totalReplayCount:this.replayCount,totalMinimiseCount:this.minimisedCount,totalMaximiseCount:this.maximisedCount,totalDurationMinimised:Math.round(this.totalDurationMinimised),totalDurationMaximised:Math.round(this.totalDurationMaximised),dismissType:e,volumeClickedCount:this.volumeClickedCount,inappType:"PIP Inapp",apx_completed:this.videoElement.currentTime===this.videoElement.duration,apx_completion_percentage:this.videoElement.currentTime/this.videoElement.duration},!1,"apxor","campaign"),this.hideCallback("cancel")}catch(e){console.log("Error \n ".concat(e," \n occured while closing the video"))}}},{key:"_setButtons",value:function(e){var t=this;if(this.enable_buttons&&(this.buttons.enable_top||this.buttons.enable_center||this.buttons.enable_bottom)){var n=function(e,n,i){try{var o;t.buttons.enable_top&&t.buttons.top.length>0&&(o=t.buttons.top),t.buttons.enable_center&&t.buttons.center.length&&(o=t.buttons.center),t.buttons.enable_bottom&&t.buttons.bottom.length&&(o=t.buttons.bottom),Apxor.logEvent("apx_video_inapp_button_clicked",{buttonName:o.at(i).text.text,redirection:o.at(i).action.type,totalDurationWatched:Math.round(t.videoElement.currentTime),message_name:t.name,id:t.configId,totalDurationWatchedSlot:"0-".concat(Math.round(t.videoElement.currentTime)),replayCount:t.replayCount,campaign_type:"modal"},!1,"apxor","campaign"),t.videoPlayer.remove(),t._removeVideoPlayerStyles(),t.hideCallback()}catch(e){console.log("Can't close the video player\n".concat(e))}},i={next:n,prev:n,complete:n,cancel:n,_isCancelled:!1,action:""},o={};o=this.buttons.top.length>0?this.buttons.top:this.buttons.center.length>0?this.buttons.center:this.buttons.bottom;var a=generateButtonsBlock(this.configId,this.name,this.stepper,EVENT_PREFIX.INAPP,o,this.direction.buttons,"",e,i,this.isWalkthrough,this.uis,this.index,"modal");a.setAttribute("id","apx-cta-btn"),a.classList.add("apx-video-cta".concat(this.cssPostFix)),a.classList.add("apx-video-hide-elmt".concat(this.cssPostFix)),this.videoPlayer.appendChild(a)}}},{key:"_setAutoTerminate",value:function(){var e,t=this;!0===(null===(e=this.terminationConfig)||void 0===e?void 0:e.auto_dismiss)&&window.setTimeout((function(){document.pictureInPictureEnabled&&document.pictureInPictureElement&&(t.videoElement.pause(),document.exitPictureInPicture()),t._onClose("auto_dismiss")}),this.terminationConfig.duration)}}],[{key:"isAVideoBeingPlayed",value:function(){return!!document.getElementById("apx-video-player")}},{key:"canShowVideoInApp",value:function(e){var t=e.binding,n=e.activity,i=!0;return t&&""!=n&&window.location.pathname!==n&&(i=!1),i}}]),e}(),Form=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};_classCallCheck$1(this,e),this.font=new Font(t.font),this.padding=new Padding(t.padding),this.elements=t.elements}return _createClass$1(e,null,[{key:"isEnabled",value:function(e){return!(isUndefined$2(e)||isNull$1(e)||isEmptyObject(e))}}]),e}(),Marketing=_createClass$1((function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};_classCallCheck$1(this,e),this.message=new Text(t.message)})),ModalInApp=function(){function ModalInApp(e,t,n,i,o,a,r,s){var l=this,c=arguments.length>8&&void 0!==arguments[8]?arguments[8]:{},d=arguments.length>9?arguments[9]:void 0;_classCallCheck$1(this,ModalInApp),_defineProperty$1(this,"closeListener",(function(){clearTimeout(l.terminationTimeoutId),l.closeCallback(l.overlayElement,"dismiss",".apx-inapp-container".concat(l.cssPostFix),l.closeListener,l.redirectionListener)})),_defineProperty$1(this,"redirectionListener",(function(){window.location.href!==l.launchPageUrl&&l.closeCallback(l.overlayElement,"dismiss",".apx-inapp-container".concat(l.cssPostFix),l.closeListener,l.redirectionListener)})),_defineProperty$1(this,"_getMarketingStyles",(function(){if(!l.enable_marketing)return"";var e=l.marketing.message,t=e.alignment;return"left"===e.alignment?t="flex-start":"right"===e.alignment&&(t="flex-end"),"\n .apx-inapp-marketing".concat(l.cssPostFix," {\n align-self:").concat(t,";\n text-align:").concat(e.alignment,";\n }\n ")})),_defineProperty$1(this,"generateResponse",(function(e){var t={},n="";return e.forEach((function(e){var i,o,a,r,s,l,c,d,p,u;switch(e.type){case"fullname":document.getElementById("fname")&&(t["".concat(null!==(i=null==e||null===(o=e.name)||void 0===o?void 0:o[0])&&void 0!==i?i:"firstname")]=document.getElementById("fname").value),document.getElementById("lname")&&(t["".concat(null!==(a=null==e||null===(r=e.name)||void 0===r?void 0:r[1])&&void 0!==a?a:"lastname")]=document.getElementById("lname").value);break;case"name":document.getElementById("name")&&(t["".concat(null!==(s=null==e?void 0:e.name)&&void 0!==s?s:"name")]=document.getElementById("name").value);break;case"email":document.getElementById("email")&&(t["".concat(null!==(l=null==e?void 0:e.name)&&void 0!==l?l:"email")]=document.getElementById("email").value);break;case"phone":document.getElementById("phoneNumber")&&(t["".concat(null!==(c=null==e?void 0:e.name)&&void 0!==c?c:"phonenumber")]=document.getElementById("phoneNumber").value);break;case"date":document.getElementById("date")&&(t["".concat(null!==(d=null==e?void 0:e.name)&&void 0!==d?d:"date")]=document.getElementById("date").value);break;case"message":document.getElementById("textField")&&(t["".concat(null!==(p=null==e?void 0:e.name)&&void 0!==p?p:"feedback")]=document.getElementById("textField").value);break;case"button":n=null!==(u=null==e?void 0:e.callback)&&void 0!==u?u:""}})),{obj:t,callback:n}})),_defineProperty$1(this,"_setMarketingMessage",(function(){if(l.enable_marketing){var e=document.createElement("div");e.classList.add("apx-inapp-marketing".concat(l.cssPostFix));var t=createNewTextElement(l.marketing.message,l.currentId,"marketing");e.appendChild(t),l.inAppContainer.appendChild(e)}})),this.rtmInstance=window.ApxorRTM,this.index=d,this.uis=c,this.terminationConfig=t,this.terminationTimeoutId=null,this.isWalkthrough=s,this.cssPostFix="-".concat(n,"-").concat(i).replaceAll(" ","").replace(/[^\w\s]/gi,""),this.delay=e.delay||0,this.background_color=e.bg_color||COLORS.WHITE,this.width=e.width||50,this.height=e.height||50,this.direction=new Direction(e.direction),this.position=new Position(e.position),this.enable_dismiss_actions=e.enable_dismiss_actions,this.enable_dismiss_actions&&(this.dismiss_actions=new DismissActions(e.dismiss_actions)),this.enable_dimbackground=e.enable_dimbackground,this.enable_dimbackground&&(this.dimbackground=new DimBackground(e.dimbackground)),this.enable_padding=e.enable_padding,this.enable_padding&&(this.padding=new Padding(e.padding)),this.enable_margin=e.enable_margin,this.enable_margin&&(this.margin=new Margin(e.margin)),this.enable_border=e.enable_border,this.enable_border&&(this.border=new Border(e.border)),this.enable_close_button=e.enable_close_button,this.enable_close_button&&(this.close_button=new CloseButton(e.close_button)),this.enable_scroll=e.enable_scroll,this.enable_scroll&&(this.scroll=new Scroll(e.scroll)),this.enable_icon=e.enable_icon,this.enable_icon&&(this.icon=new Icon(e.icon)),this.enable_image=e.enable_image,this.enable_image&&(this.image=new Image(e.image)),this.enable_video=e.enable_video,this.enable_video&&(this.video=new Video(e.video)),this.enable_title=e.enable_title,this.enable_title&&(this.title=new Title(e.title)),this.enable_description=e.enable_description,this.enable_description&&(this.description=new Description(e.description)),this.enable_form=e.enable_form,this.enable_form&&(this.form=new Form(e.form)),this.enable_buttons=e.enable_buttons,this.enable_buttons&&(this.buttons=new Buttons(e.buttons)),this.enable_stepper=e.enable_stepper,this.enable_stepper&&(this.stepper=new Stepper(e.stepper)),this.enable_shadow=e.enable_shadow,this.enable_shadow&&(this.shadow=new Shadow(e.shadow)),this.enable_gradient=e.enable_gradient,this.enable_gradient&&(this.gradient=new Gradient(e.gradient)),this.enable_marketing=e.enable_marketing,this.enable_marketing&&(this.marketing=new Marketing(e.marketing)),this.min_width="",this.max_width="",this.inapp_width="auto",this.inapp_height="auto",this.media_container_height=0,this.media_width="auto",this.media_height="auto",this.configId=n,this.name=i,this.showCallback=o,this.closeCallback=a,this.stepperCallBack=r,this.currentId=makeid(10),this.dimBackgroundElement=null,this.overlayElement=null,this.inAppContainer=null,this.launchPageUrl=""}return _createClass$1(ModalInApp,[{key:"createInAppModal",value:function(){if(!checkForNeverShow$1(this.configId))return!1;this._setInAppDimensions(),this._setBackgroundOverlays(),this._setStyles(),this._setInAppModalContent(),this._setAutoTerminate(),this._showInApp()}},{key:"_setInAppDimensions",value:function(){var e=this.direction.nudge===DIRECTION.VERTICAL?this.width/100:this.height/100,t=this.direction.nudge!==DIRECTION.VERTICAL;this.enable_image?this._setDimenstionFromResolution(this.image.width,this.image.height,e,t):this.enable_video?this.video.enable_embed?this.direction.nudge===DIRECTION.VERTICAL?(this.inapp_width="".concat(this.video.width+(this.enable_border?2*this.border.width:0)+(this.enable_padding?this.padding.left+this.padding.right:0),"px"),this.media_width="".concat(this.video.width,"px")):(this.inapp_height="".concat(this.video.height+(this.enable_border?2*this.border.width:0)+(this.enable_padding?this.padding.left+this.padding.right:0),"px"),this.media_container_height=this.video.height,this.media_height="".concat(this.video.height,"px"),this.min_width="".concat(this.width,"%")):this._setDimenstionFromResolution(this.video.width,this.video.height,e,t):this.enable_icon?this.direction.nudge===DIRECTION.VERTICAL?this.inapp_width="".concat(this.width,"%"):this.min_width="".concat(this.width,"%"):this.direction.nudge===DIRECTION.VERTICAL?this.inapp_width="".concat(this.width,"%"):this.max_width="".concat(this.width,"%")}},{key:"_setDimenstionFromResolution",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:.5,i=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=getHeightWidthFromResolution({width:e,height:t},n,i);this.media_width="".concat(o.width,"px"),this.media_height="".concat(o.height,"px"),this.media_container_height=o.height,this.direction.nudge===DIRECTION.VERTICAL?this.inapp_width="".concat(o.width+(this.enable_border?2*this.border.width:0)+(this.enable_padding?this.padding.left+this.padding.right:0),"px"):(this.inapp_height="".concat(o.height+(this.enable_border?2*this.border.width:0)+(this.enable_padding?this.padding.top+this.padding.bottom:0),"px"),this.min_width="".concat(this.width,"%"))}},{key:"_setBackgroundOverlays",value:function(){var e=this;this.launchPageUrl=window.location.href,this.overlayElement=document.createElement("div"),this.overlayElement.classList.add("apx-inapp-overlay".concat(this.cssPostFix));var t=this.overlayElement;this.enable_dimbackground?(this.dimBackgroundElement=document.createElement("div"),this.dimBackgroundElement.classList.add("apx-inapp-dimbackground-overlay".concat(this.cssPostFix)),t=this.dimBackgroundElement,this.overlayElement.appendChild(this.dimBackgroundElement),this.enable_dismiss_actions&&this.dismiss_actions.outside_touch&&(t.onclick=function(){clearTimeout(e.terminationTimeoutId),t.onclick=null,e.closeCallback(e.overlayElement,"dismiss",".apx-inapp-container".concat(e.cssPostFix),e.closeListener,e.redirectionListener)})):this.enable_dismiss_actions&&this.dismiss_actions.outside_touch&&document.body.addEventListener("click",this.closeListener),this.enable_dimbackground||document.body.addEventListener("click",this.redirectionListener),document.body.appendChild(this.overlayElement)}},{key:"_setStyles",value:function(){var e="\n ".concat(this._getBackgroundContainerStyles()," \n ").concat(this._getInAppContainerStyles()," \n ").concat(this._getScrollStyles()," \n ").concat(this._getControlsStyles()," \n ").concat(this._getInAppMediaContainerStyles(),"\n ").concat(this._getInAppNonMediaContainerStyles(),"\n ").concat(this._getTextConatinerStyles(),"\n ").concat(this._getTitleStyles()," \n ").concat(this._getDescriptionStyles()," \n ").concat(this._getFormStyles(),"\n ").concat(this._getInAppButtonContainerStyles(),"\n ").concat(this._getIconStyles()," \n ").concat(this._getImageStyles()," \n ").concat(this._getVideoStyles()," \n ").concat(this._getMarketingStyles()," \n ").concat(this._getProgressBarStyles(),"\n ").concat(this._getBootstrapiconsStyles()," \n ").replaceAll("\n","").replace(/[\s]{2,999}/g,""),t=document.createElement("style");t.innerHTML=e,this.overlayElement.appendChild(t)}},{key:"_getBackgroundContainerStyles",value:function(){return"\n .apx-inapp-overlay".concat(this.cssPostFix," {\n width:100%;\n height:100%;\n }\n .apx-inapp-dimbackground-overlay").concat(this.cssPostFix," {\n width:100%;\n height:100%;\n position:fixed;\n top:0;\n left:0;\n z-index:999;\n background-color:").concat(this.enable_dimbackground?this.dimbackground.color:"transparent",";\n ").concat(this.enable_dimbackground?"opacity: ".concat(this.dimbackground.opacity,";"):"","\n overflow: auto;\n }\n ")}},{key:"_getInAppContainerStyles",value:function(){var e=this.enable_border?this.border.width:0,t=e,n=e,i=e,o=e;this.enable_padding&&(t+=this.padding.top,n+=this.padding.left,i+=this.padding.right,o+=this.padding.bottom),this.enable_margin&&(t+=this.margin.top,n+=this.margin.left,i+=this.margin.right,o+=this.margin.bottom);var a="";switch(this.position.position){case INAPP_POSITION.TOP_LEFT:a="\n top:".concat(t,"px;\n left:").concat(n,"px;\n ");break;case INAPP_POSITION.TOP_CENTER:a="\n left:50%;\n top:".concat(t,"px;\n -webkit-transform: translate(-50%, ").concat(.1*t,"px);\n -moz-transform: translate(-50%, ").concat(t,"px);\n ");break;case INAPP_POSITION.TOP_RIGHT:a="\n top:".concat(t,"px;\n right:").concat(i,"px;\n ");break;case INAPP_POSITION.BOTTOM_LEFT:a="\n bottom:".concat(o,"px;\n left:").concat(n,"px;\n ");break;case INAPP_POSITION.BOTTOM_CENTER:a="\n left:50%;\n bottom:".concat(o,"px;\n -webkit-transform: translate(-50%, ").concat(.1*o,"px);\n -moz-transform: translate(-50%, ").concat(o,"px);\n ");break;case INAPP_POSITION.BOTTOM_RIGHT:a="\n bottom:".concat(o,"px;\n right:").concat(i,"px;\n ");break;case INAPP_POSITION.CENTER:default:a="\n left:50%;\n top:50%;\n -webkit-transform: translate(-50%, -50%);\n -moz-transform: translate(-50%, -50%);\n "}var r="";this.min_width&&(r="min-width:".concat(this.min_width,";"));var s="";this.enable_border&&(s="\n border-radius: ".concat(this.border.radius,"px;\n border: ").concat(this.border.width,"px ").concat(this.border.style," ").concat(this.border.color,";\n "));var l="";this.enable_gradient&&(l="\n background-image:linear-gradient(".concat(this.gradient.direction,", ").concat(this.gradient.colors[0],", ").concat(this.gradient.colors[1],");\n "));var c="";this.enable_shadow&&(c="\n box-shadow: ".concat(this.shadow.offset_x,"px ").concat(this.shadow.offset_y,"px ").concat(this.shadow.blur_radius,"px ").concat(this.shadow.spread_radius,"px ").concat(this.shadow.color,";\n "));var d="";this.enable_padding&&(d="\n padding:".concat(this.padding.top,"px ").concat(this.padding.right,"px ").concat(this.padding.bottom,"px ").concat(this.padding.left,"px;\n "));var p=this.direction.nudge!==DIRECTION.VERTICAL?"flex-direction:row;":"flex-direction:column;";p=" ".concat(p,"\n justify-content:space-evenly;\n align-items:center;\n display:flex;\n ");var u="",h="",g="margin: auto";return this.direction.nudge===DIRECTION.HORIZONTAL&&(this.enable_image||this.enable_video||this.enable_icon?this.position.position===INAPP_POSITION.TOP_LEFT||this.position.position===INAPP_POSITION.BOTTOM_LEFT?g="margin-right: 20%; margin-block:auto":this.position.position!==INAPP_POSITION.TOP_RIGHT&&this.position.position!==INAPP_POSITION.BOTTOM_RIGHT||(g="margin-left: 20%; margin-block:auto"):u="max-width: ".concat(this.max_width)),this.enable_video&&this.video.enable_embed&&(u="max-width:100%;",h="max-height:100%;"),"\n .apx-inapp-container".concat(this.cssPostFix," {\n height:").concat(this.inapp_height,";\n width:").concat(this.inapp_width,";\n background-color:").concat(this.background_color,";\n z-index:9999;\n opacity:0;\n transition:all .5s cubic-bezier(.96,.23,.07,.8);\n position:fixed;\n visibility:hidden;\n\n ").concat(r,"\n ").concat(p,"\n ").concat(d,"\n ").concat(s,"\n ").concat(l,"\n ").concat(c,"\n ").concat(a,"\n ").concat(u,"\n ").concat(h,"\n ").concat(g,"\n }\n \n .apx-inapp-container").concat(this.cssPostFix,".open{\n opacity:1;\n visibility:visible;\n }\n ")}},{key:"_getScrollStyles",value:function(){var e=this.enable_scroll&&this.scroll.enable_border?"\n border-top: ".concat(this.scroll.border.width,"px ").concat(this.scroll.border.style," ").concat(this.scroll.border.color,";\n border-bottom : ").concat(this.scroll.border.width,"px ").concat(this.scroll.border.style," ").concat(this.scroll.border.color,";\n "):"";return this.enable_scroll?"\n .apx-inapp-scroll".concat(this.cssPostFix," {\n overflow:scroll; \n overflow-x: hidden;\n height:").concat(this.scroll.height,"px;\n ").concat(e,"\n }\n "):"\n .apx-inapp-scroll".concat(this.cssPostFix," {\n overflow : hidden;\n }\n ")}},{key:"_getControlsStyles",value:function(){if(!this.enable_close_button)return"";return this.direction.non_media===DIRECTION.VERTICAL||this.direction.nudge===DIRECTION.VERTICAL?"\n .apx-inapp-close".concat(this.cssPostFix," {\n position: absolute;\n z-index:99999;\n top: ").concat(this.close_button.offset_top,"px;\n right: ").concat(this.close_button.offset_right,"px;\n width: ").concat(this.close_button.width,"px;\n height: ").concat(this.close_button.height,"px;\n cursor: pointer;\n }\n "):"\n .apx-inapp-close".concat(this.cssPostFix," {\n display:flex;\n flex-direction:row;\n justify-content:center;\n align-items:center;\n width: ").concat(this.close_button.width,"px;\n height: ").concat(this.close_button.height,"px;\n cursor: pointer;\n z-index:99999;\n }\n ")}},{key:"_getInAppMediaContainerStyles",value:function(){return"\n .apx-inapp-media-container".concat(this.cssPostFix,"{\n ").concat(this.enable_icon?"align-self:".concat(this.icon.alignment,";"):"","\n ").concat(this.enable_image||this.enable_video?"display:flex;":"","\n }")}},{key:"_getInAppNonMediaContainerStyles",value:function(){var e="";this.direction.nudge===DIRECTION.VERTICAL?e="max-height:".concat(window.innerHeight-this.media_container_height,"px;"):(this.enable_image||this.enable_video)&&(e="max-height:".concat(this.media_container_height,"px;"));return this.direction.non_media===DIRECTION.VERTICAL?"\n .apx-inapp-nonmedia-container".concat(this.cssPostFix,"{\n width:100%;\n display:flex;\n flex-direction:column;\n justify-content:center;\n align-items:stretch;\n ").concat(e,"\n }\n "):"\n .apx-inapp-nonmedia-container".concat(this.cssPostFix,"{\n width:100%;\n flex-grow:2;\n display:flex;\n flex-direction:row;\n justify-content:space-between;\n align-items:center;\n ").concat(e,"\n }\n ")}},{key:"_getTextConatinerStyles",value:function(){return"\n .apx-inapp-text-container".concat(this.cssPostFix,"{\n width:auto;\n display:flex;\n flex-direction:column;\n justify-content: center;\n overflow: hidden;\n align-items:center;\n cursor:text;\n }\n ")}},{key:"_getTitleStyles",value:function(){if(!this.enable_title)return"";var e="";if(this.title.enable_icon){var t="";this.title.icon.enable_border&&(t="border-radius:".concat(this.title.icon.border.radius,"%;\n border:").concat(this.title.icon.border.width,"px ").concat(this.title.icon.border.style," ").concat(this.title.icon.border.color,";")),e="\n height: ".concat(this.title.icon.height,"px;\n width: ").concat(this.title.icon.width,"px;\n margin-right: 10px;\n ").concat(t,"\n ")}var n="";this.title.enable_margin&&(n=" \n margin-top:".concat(this.title.margin.top,"px;\n margin-bottom:").concat(this.title.margin.bottom,"px;\n margin-left:").concat(this.title.margin.left,"px;\n margin-right:").concat(this.title.margin.right,"px;\n "));var i="";return this.title.enable_padding&&(i=" \n padding-top:".concat(this.title.padding.top,"px;\n padding-bottom:").concat(this.title.padding.bottom,"px;\n padding-left:").concat(this.title.padding.left,"px;\n padding-right:").concat(this.title.padding.right,"px;\n ")),"\n .apx-inapp-title-div".concat(this.cssPostFix," {\n width:100%;\n display:flex;\n justify-content:").concat(this.title.alignment,";\n align-items: center;\n text-align:").concat(this.title.alignment,";\n pointer-events:none;\n ").concat(n,"\n ").concat(i,"\n }\n .apx-inapp-title-icon").concat(this.cssPostFix," {\n ").concat(e,"\n }\n ")}},{key:"_getDescriptionStyles",value:function(){if(!this.enable_description)return"";var e="";this.description.enable_margin&&(e=" \n margin-top:".concat(this.description.margin.top,"px;\n margin-bottom:").concat(this.description.margin.bottom,"px;\n margin-left:").concat(this.description.margin.left,"px;\n margin-right:").concat(this.description.margin.right,"px;\n "));var t="";return this.description.enable_padding&&(t=" \n padding-top:".concat(this.description.padding.top,"px;\n padding-bottom:").concat(this.description.padding.bottom,"px;\n padding-left:").concat(this.description.padding.left,"px;\n padding-right:").concat(this.description.padding.right,"px;\n ")),"\n .apx-inapp-description".concat(this.cssPostFix," {\n width:100%;\n justify-content:").concat(this.description.alignment,";\n text-align:").concat(this.description.alignment,";\n ").concat(e,"\n ").concat(t,"\n }\n ")}},{key:"_getFormStyles",value:function(){if(this.enable_form){var e="";return this.form.enable_padding&&(e="padding:".concat(this.form.padding.top,"px ").concat(this.form.padding.right,"px ").concat(this.form.padding.bottom,"px ").concat(this.form.padding.left,"px;")),"\n .apx-inapp-form-container".concat(this.cssPostFix,"{\n ").concat(e,"\n font-size:").concat(this.form.font.size,"px;\n font-family:").concat(this.form.font.family,";\n display:flex;\n flex-direction:column;\n }")}}},{key:"_getInAppButtonContainerStyles",value:function(){return"\n .apx-inapp-button-container".concat(this.cssPostFix,"{\n display:flex;\n flex-direction:row;\n align-items:center;\n justify-content:center;\n margin:0 10px 0 10px;\n }\n .apx-inapp-top-button-container").concat(this.cssPostFix,"{\n width:100%;\n height:auto;\n }\n .apx-inapp-center-button-container").concat(this.cssPostFix,"{\n width:100%;\n height:auto;\n }\n .apx-inapp-bottom-button-container").concat(this.cssPostFix,"{\n width:100%;\n height:auto;\n }")}},{key:"_getIconStyles",value:function(){var e="";if(this.enable_icon){var t="";this.icon.enable_border&&(t="\n border-radius:".concat(this.icon.border.radius,"%;\n border:").concat(this.icon.border.width,"px ").concat(this.icon.border.style," ").concat(this.icon.border.color,";\n "));var n="";this.icon.enable_margin&&(n="\n margin-top:".concat(this.icon.margin.top,"px;\n margin-bottom:").concat(this.icon.margin.bottom,"px;\n margin-left:").concat(this.icon.margin.left,"px;\n margin-right:").concat(this.icon.margin.right,"px;\n "));var i="";this.icon.enable_padding&&(i="\n padding-top:".concat(this.icon.padding.top,"px;\n padding-bottom:").concat(this.icon.padding.bottom,"px;\n padding-left:").concat(this.icon.padding.left,"px;\n padding-right:").concat(this.icon.padding.right,"px;\n ")),e="\n .apx-inapp-icon-container".concat(this.cssPostFix," {\n text-align:").concat(this.icon.alignment,";\n }\n .apx-inapp-icon-content").concat(this.cssPostFix," {\n height: ").concat(this.icon.height,"px;\n width: ").concat(this.icon.width,"px;\n ").concat(t,"\n ").concat(n,"\n ").concat(i,"\n }\n ")}return e}},{key:"_getImageStyles",value:function(){var e="";if(this.enable_image)if(this.image.enable_background_image)e="\n .apx-inapp-image".concat(this.cssPostFix,"{\n background-image: url('").concat(this.image.path,"');\n background-repeat: no-repeat;\n background-attachment: fixed; \n background-size: 100% 100%;\n height: ").concat(this.media_height,";\n width: ").concat(this.media_width,";\n box-shadow: inset ").concat(this.media_width," ").concat(this.media_height," 0px 0px ").concat(hexToRGB(this.image.background_image.mask_color,this.image.background_image.mask_opacity),",inset -").concat(this.media_width," -").concat(this.media_height," 0px 0px ").concat(hexToRGB(this.image.background_image.mask_color,this.image.background_image.mask_opacity),"\n }\n ");else{var t="";this.image.enable_border&&(t="\n border-radius:".concat(this.image.border.radius,"%;\n border:").concat(this.image.border.width,"px ").concat(this.image.border.style," ").concat(this.image.border.color,";\n ")),e="\n .apx-inapp-image".concat(this.cssPostFix,"{\n height: ").concat(this.media_height,";\n width: ").concat(this.media_width,";\n ").concat(t,"\n }\n ")}return e}},{key:"_getVideoStyles",value:function(){var e="";if(this.enable_video){var t="";this.video.enable_border&&(t="\n border-radius:".concat(this.video.border.radius,"%;\n border:").concat(this.video.border.width,"px ").concat(this.video.border.style," ").concat(this.video.border.color,";\n ")),e="\n .apx-inapp-video".concat(this.cssPostFix," {\n width:").concat(this.media_width,";\n height:").concat(this.media_height,";\n ").concat(t,"\n }\n ")}return e}},{key:"_getProgressBarStyles",value:function(){var e="";return this.has_progress_bar&&(e="\n .apx-inapp-progress-bar".concat(this.cssPostFix,"{\n position: absolute;\n width:100%;\n height:").concat(this.progressbar.width,"px;\n ").concat("top"===this.progressbar.position?"top:0px;":"bottom:0px;","\n left:0px;\n z-index:999999;\n overflow:hidden;\n cursor: pointer;\n background:").concat(this.progressbar.reamining_color,";\n }\n .apx-inapp-bar").concat(this.cssPostFix,"{\n width:100%;\n height:100%;\n background:").concat(this.progressbar.progress_color,";\n }")),e}},{key:"_getBootstrapiconsStyles",value:function(){return'\n .bi::before, [class^="bi-"]::before, [class*=" bi-"]::before {\n display: inline-block;\n font-style: normal;\n font-weight: normal !important;\n font-variant: normal;\n text-transform: none;\n line-height: 1;\n vertical-align: -.125em;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n }\n .bi-x::before { \n content: "62a"; \n }\n .bi-x-circle-fill::before { \n content: "622"; \n }\n '}},{key:"_setInAppModalContent",value:function(){this._createInAppContainer(),this.direction.nudge===DIRECTION.VERTICAL&&(this._createTopButtonContainer(),this._setButtons(BUTTON_CONTAINER_POSITION.TOP)),this._createMediaContainer(),this.direction.nudge===DIRECTION.VERTICAL&&(this._createCenterButtonContainer(),this._setButtons(BUTTON_CONTAINER_POSITION.CENTER)),this._setImageOptions(),this._setVideoOptions(),this._setIconOptions(),this._createNonMediaContainer(),this._setTextContainer(),this._setTitleContent(),this._setDescriptionContent(),this._setFormContent(),this._createButtonContainer(),this._createBottomButtonContainer(),this._setButtons(BUTTON_CONTAINER_POSITION.BOTTOM),this._setProgressBar(),this._setCloseButton(),this._setMarketingMessage()}},{key:"_createInAppContainer",value:function(){this.inAppContainer=document.createElement("div"),this.inAppContainer.classList.add("apx-inapp-container".concat(this.cssPostFix)),this.overlayElement.appendChild(this.inAppContainer),this.enable_dismiss_actions&&this.dismiss_actions.outside_touch&&(this.inAppContainer.onclick=function(e){e.stopPropagation()})}},{key:"_createMediaContainer",value:function(){this.mediaContainer=document.createElement("div"),this.mediaContainer.classList.add("apx-inapp-media-container".concat(this.cssPostFix)),this.inAppContainer.appendChild(this.mediaContainer)}},{key:"_setImageOptions",value:function(){if(this.enable_image)if(this.image.enable_background_image)this.inAppContainer.classList.add("apx-inapp-image".concat(this.cssPostFix));else{var e=document.createElement("img");e.src=this.image.path,e.classList.add("apx-inapp-image".concat(this.cssPostFix)),this.mediaContainer.appendChild(e)}}},{key:"_setVideoOptions",value:function(){if(this.enable_video)if(this.video.enable_embed){var e=document.createElement("div");e.classList.add("apx-inapp-video".concat(this.cssPostFix)),e.innerHTML="".concat(this.video.embed.html),this.mediaContainer.appendChild(e)}else{var t=document.createElement("video");t.classList.add("apx-inapp-video".concat(this.cssPostFix)),t.controlsList="noplaybackrate nodownload",t.disablePictureInPicture=!0,t.controls=!0,t.muted=!this.video.enable_audio;var n=document.createElement("source");n.setAttribute("src",this.video.path),n.setAttribute("type","video/mp4"),t.appendChild(n),this.mediaContainer.appendChild(t)}}},{key:"_setIconOptions",value:function(){if(this.enable_icon){var e=document.createElement("div");e.classList.add("apx-inapp-icon-container".concat(this.cssPostFix));var t=document.createElement("img");t.src=this.icon.path,t.classList.add("apx-inapp-icon-content".concat(this.cssPostFix)),e.appendChild(t),this.mediaContainer.appendChild(e)}}},{key:"_createNonMediaContainer",value:function(){this.nonMediaContainer=document.createElement("div"),this.nonMediaContainer.classList.add("apx-inapp-nonmedia-container".concat(this.cssPostFix)),this.inAppContainer.appendChild(this.nonMediaContainer)}},{key:"_setTextContainer",value:function(){this.textContainer=document.createElement("div"),this.textContainer.classList.add("apx-inapp-text-container".concat(this.cssPostFix)),this.nonMediaContainer.appendChild(this.textContainer)}},{key:"_setTitleContent",value:function(){if(this.enable_title){resolveDynamicText(this.title);var e=document.createElement("div");if(e.classList.add("apx-inapp-title-div".concat(this.cssPostFix)),this.title.enable_icon){var t=document.createElement("img");t.src=this.title.icon.path,t.classList.add("apx-inapp-title-icon".concat(this.cssPostFix)),e.appendChild(t)}e.appendChild(createNewTextElement(this.title,this.currentId,"title")),this.textContainer.appendChild(e)}}},{key:"_setDescriptionContent",value:function(){if(this.enable_description){resolveDynamicText(this.description);var e=document.createElement("div");e.classList.add("apx-inapp-description".concat(this.cssPostFix)),e.appendChild(createNewTextElement(this.description,this.currentId,"description")),e.classList.add("apx-inapp-scroll".concat(this.cssPostFix)),this.textContainer.appendChild(e)}}},{key:"_setFormContent",value:function _setFormContent(){var _this3=this;if(this.enable_form){var _this$form$elements,formContainer=document.createElement("form");formContainer.classList.add("apx-inapp-form-container".concat(this.cssPostFix));var dummy="";null===(_this$form$elements=this.form.elements)||void 0===_this$form$elements||_this$form$elements.forEach((function(e){dummy+=generateFormField(e)})),formContainer.innerHTML=dummy,this.nonMediaContainer.appendChild(formContainer);var form=document.querySelector(".apx-inapp-form-container".concat(this.cssPostFix));form.addEventListener("submit",(function(e){e.preventDefault();var _this3$generateRespon=_this3.generateResponse(_this3.form.elements),obj=_this3$generateRespon.obj,callback=_this3$generateRespon.callback,evalString="(obj)=>"+callback+"(obj)",evalFunction=eval(evalString);evalFunction(obj),clearTimeout(_this3.terminationTimeoutId),_this3.closeCallback(_this3.overlayElement,"dismiss",".apx-inapp-container".concat(_this3.cssPostFix),_this3.closeListener,_this3.redirectionListener)}))}}},{key:"_createButtonContainer",value:function(){this.direction.non_media!==DIRECTION.VERTICAL&&(this.buttonContainer=document.createElement("div"),this.buttonContainer.classList.add("apx-inapp-button-container".concat(this.cssPostFix)),this.nonMediaContainer.appendChild(this.buttonContainer))}},{key:"_setProgressBar",value:function(){if(this.enable_stepper&&this.stepper.enable_progressbar){this.progressbar=this.stepper.progressbar;var e=document.createElement("div");e.classList.add("apx-inapp-progress-bar".concat(this.cssPostFix));var t=document.createElement("div");t.classList.add("apx-inapp-bar".concat(this.cssPostFix)),this.stepper.index<=this.stepper.length?t.style.transform="translateX(".concat(-(100-100/this.stepper.length*this.stepper.index),"%)"):e.style.visibility="hidden",e.appendChild(t),this.inAppContainer.appendChild(e)}}},{key:"_createTopButtonContainer",value:function(){var e;this.enable_buttons&&null!==(e=this.buttons)&&void 0!==e&&e.enable_top&&(this.topButtonContainer=document.createElement("div"),this.topButtonContainer.classList.add("apx-inapp-top-button-container".concat(this.cssPostFix)),this.inAppContainer.appendChild(this.topButtonContainer))}},{key:"_createCenterButtonContainer",value:function(){var e;this.enable_buttons&&null!==(e=this.buttons)&&void 0!==e&&e.enable_center&&(this.centerButtonContainer=document.createElement("div"),this.centerButtonContainer.classList.add("apx-inapp-center-button-container".concat(this.cssPostFix)),this.inAppContainer.appendChild(this.centerButtonContainer))}},{key:"_createBottomButtonContainer",value:function(){var e;this.enable_buttons&&null!==(e=this.buttons)&&void 0!==e&&e.enable_bottom&&(this.bottomButtonContainer=document.createElement("div"),this.bottomButtonContainer.classList.add("apx-inapp-bottom-button-container".concat(this.cssPostFix)),this.direction.non_media===DIRECTION.VERTICAL?this.nonMediaContainer.appendChild(this.bottomButtonContainer):this.buttonContainer.appendChild(this.bottomButtonContainer))}},{key:"_setButtons",value:function(e){var t=this;if(this.enable_buttons&&(e===BUTTON_CONTAINER_POSITION.TOP&&this.buttons.enable_top||e===BUTTON_CONTAINER_POSITION.CENTER&&this.buttons.enable_center||e===BUTTON_CONTAINER_POSITION.BOTTOM&&this.buttons.enable_bottom)){var n=this.overlayElement,i=function(e,i){clearTimeout(t.terminationTimeoutId),t.closeCallback(n,i,"new-inline".concat(t.cssPostFix),t.closeListener,t.redirectionListener)},o={next:function(e,n){i(0,"next"),t.stepperCallBack(e,n)},prev:function(e,n){i(0,"prev"),t.stepperCallBack(e,n)},complete:i,cancel:i,_isCancelled:!1,action:""},a={};a=e===BUTTON_CONTAINER_POSITION.TOP?this.buttons.top:e===BUTTON_CONTAINER_POSITION.CENTER?this.buttons.center:this.buttons.bottom;var r=generateButtonsBlock(this.configId,this.name,this.stepper,EVENT_PREFIX.INAPP,a,this.direction.buttons,"",e,o,this.isWalkthrough,this.uis,this.index,"modal");e===BUTTON_CONTAINER_POSITION.TOP?this.topButtonContainer.appendChild(r):e===BUTTON_CONTAINER_POSITION.CENTER?this.centerButtonContainer.appendChild(r):this.bottomButtonContainer.appendChild(r)}}},{key:"_setCloseButton",value:function(){var e=this;if(this.enable_close_button){var t=document.createElement("span");this.close_button.type===CLOSE_BUTTON_STYLE.NORMAL?t.innerHTML=getCloseSVG(this.close_button.width,this.close_button.height,this.close_button.color):this.close_button.type===CLOSE_BUTTON_STYLE.FILL?"circle"===this.close_button.shape?t.innerHTML=getCloseWithCircleSVG(this.close_button.width,this.close_button.height,this.close_button.fill_color,this.close_button.color):t.innerHTML=getCloseWithRectangleSVG(this.close_button.width,this.close_button.height,this.close_button.fill_color,this.close_button.color):t.innerHTML='<img src="'.concat(this.close_button.path,'" width="').concat(this.close_button.width,'px" height="').concat(this.close_button.height,'px"></img>'),t.classList.add("apx-inapp-close".concat(this.cssPostFix)),t.addEventListener("click",(function(){clearTimeout(e.terminationTimeoutId),e.rtmInstance.logActionEvent("InAppXIconClicked",e.configId,e.name,"modal"),e.closeCallback(e.overlayElement,e.close_button.action,".apx-inapp-container".concat(e.cssPostFix),e.closeListener,e.redirectionListener)})),this.direction.non_media===DIRECTION.VERTICAL||this.direction.nudge===DIRECTION.VERTICAL?this.inAppContainer.appendChild(t):this.buttonContainer.appendChild(t)}}},{key:"_setAutoTerminate",value:function(){var e=this;!0===this.terminationConfig.auto_dismiss&&(this.terminationTimeoutId=window.setTimeout((function(){e.closeCallback(e.overlayElement,"dismiss",".apx-inapp-container".concat(e.cssPostFix),e.closeListener,e.redirectionListener)}),this.terminationConfig.duration))}},{key:"_showInApp",value:function(){this.inAppContainer.classList.toggle("open"),this.showCallback()}}]),ModalInApp}(),Logger$5=window.ApxorLogger;function createInApp(e,t,n){var i=n.dimmed_background,o=document.createElement("div");o.setAttribute("id",APX_OVERLAY);var a=document.createElement("style");a.innerHTML="#apx-oly {\n width:auto;height:auto;position:fixed;top:0;right:0;bottom:0;left:0;\n display:flex;justify-content:center;align-items:center;border-radius:3px;z-index:99999999;background-color:".concat(i?"#31313185":"transparent",";\n\n }\n #apx-oly > * {font-family:inherit;box-sizing:unset}\n .apx-dlg-c {\n height:auto;width:auto;z-index:99999999;opacity:0;transition:all .5s cubic-bezier(.96,.23,.07,.8);position:fixed;visibility:hidden;\n border-radius:3px;overflow:hidden\n }\n .apx-dlg-c.open{opacity:1;visibility:visible;width:100%;height:100%;}\n ").replaceAll("\n","").replace(/[\s]{2,999}/g,"");var r=document.createElement("div");return r.setAttribute("id",APX_DIALOG_CONTENT),r.classList.add(APX_DIALOG_CONTENT),o.appendChild(r),o.appendChild(a),document.body.appendChild(o),o}function createInAppVideo(e,t,n,i,o,a){VideoInApp.isAVideoBeingPlayed()||checkForNeverShow$1(n)&&VideoInApp.canShowVideoInApp(e)&&new VideoInApp(e,t,n,i,o,a).showVideoInApp()}function createInAppModal(e,t,n,i,o,a,r,s,l,c){new ModalInApp(e,t,n,i,o,a,r,s,l,c).createInAppModal()}var InAppConfigItem=_createClass$1((function e(){var t=this;_classCallCheck$1(this,e),_defineProperty$1(this,"_inApp",new ApxorInApp),_defineProperty$1(this,"initialize",(function(e,n,i){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,r=arguments.length>5?arguments[5]:void 0,s=arguments.length>6&&void 0!==arguments[6]&&arguments[6],l=i.delay,c=i.layout_type,d=void 0===c?"":c,p=i.html_config.data,u=void 0===p?"":p,h=i.window_attributes,g=h.width,f=void 0===g?"auto":g,m=h.height,_=void 0===m?"auto":m,v=h.dimmed_background,b=void 0===v||v,y=h.dismiss_outside_touch,x=void 0!==y&&y,w=h.position,C=void 0===w?CENTER:w;return t.configId=e,t.name=n,t.delay=l||0,t.width=f,t.height=_,t.layoutConfig={layout_type:d,dimmed_background:b,dismiss_outside_touch:x,position:C},t.htmlConfig={data:u},t.uis=o,t.index=a,t.ui=i,t.rtmInstance=window.ApxorRTM,t.on_show=function(){if(t.rtmInstance.logActionEvent("inapp_shown",t.configId,t.name,"modal"),storeLastShownTime(t.configId),t.rtmInstance.isShowingAction=!0,t.rtmInstance.currentAction=function(){},n===APX_PREVIEW_CAMPAIGN_NAME){feedBackMessagePopUp("previewing...");var e=document.getElementById("close-button");null==e||e.addEventListener("click",(function(){var e=document.getElementById("apx-container");null==e||e.remove()}))}},t.on_hide=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";t.rtmInstance.isShowingAction=!1,t.rtmInstance.currentAction=null,"cancel"!==e.toLowerCase()?t.rtmInstance.logActionEvent("inapp_dismissed",t.configId,t.name,"modal"):t.rtmInstance.logActionEvent("walkthrough_cancelled",t.configId,t.name,"modal");var n=document.getElementById("apx-container");null==n||n.remove()},t.stepperCallBack=r,t.isWalkthrough=s,!0})),_defineProperty$1(this,"showInApp",(function(e,n){if(!t.isValid)return!1;setTimeout((function(){if(null!==t.rtmInstance.currentAction&&void 0!==t.rtmInstance.currentAction)return null==Apxor||Apxor.logEvent("apx_nudge_not_shown",{apx_nudge_type:"campaign",apx_nudge_id:t.configId,apx_nudge_name:t.name,apx_variant_code:ceWrapper.getInstance().getVariantCode(t.configId),apx_failure_type:"error",apx_reason:"An action is already being shown"},!1,"apxor","campaign"),void Logger$5.error("An action is already being shown.");try{if(ceWrapper.getInstance().updateCount(t.configId),t.layoutConfig.layout_type===INAPP_TYPE.VIDEO)createInAppVideo(t.ui,n,t.configId,t.name,t.on_show,t.on_hide);else if(t.layoutConfig.layout_type===INAPP_TYPE.MODAL)createInAppModal(t.ui,n,t.configId,t.name,t.on_show,t._closeInApp,t.stepperCallBack,t.isWalkthrough,t.uis,t.index);else{var e=createInApp(t.width,t.height,t.layoutConfig);t.layoutConfig.dismiss_outside_touch&&(document.getElementById(APX_OVERLAY).onclick=function(){t._closeInApp(e)}),setTimeout((function(){e.children[0].classList.toggle("open"),e.children[0].innerHTML=t.htmlConfig.data,t._logInAppEvent(INAPP_SHOWN),t.on_show(),e.querySelectorAll("a").forEach((function(n){n.onclick=function(){return t._takeAction(e,n)}}))}),100)}}catch(e){Logger$5.error(e)}}),t.delay)})),_defineProperty$1(this,"_takeAction",(function(e,n){var i=n.getAttribute("href");if(null!=i&&i.includes("apxor")){var o,a=i.replace(/^apxor:\/\/([^?]*).*?$/,"$1");switch(a){case"cancel":t._logInAppEvent(WALK_THROUGH_CANCELLED);break;case"xclose":t._logInAppEvent(INAPP_XICON_CLICKED);break;case"close":o=i.replace(/(.*?)buttonName=([^&]*).*?$/,"$2"),t._logInAppEvent(INAPP_BUTTON_CLICKED(""===o?"Button":o));break;case"dl_url":var r=i.replace(/(.*?)uri=([^&]*).*?$/,"$2"),s=i.replace(/(.*?)external=([^&]*).*?$/,"$2");o=i.replace(/(.*?)buttonName=([^&]*).*?$/,"$2"),t._logInAppEvent(INAPP_BUTTON_CLICKED(""===o?"Button":o)),"true"==s?window.open(r,"_blank"):Apxor.logClientEvent("REDIRECT",{url:r})}return t._closeInApp(e,a),!1}return!0})),_defineProperty$1(this,"_closeInApp",(function(e,n){var i,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:".apx-dlg-c",a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null;document.body.removeEventListener("click",a),document.body.removeEventListener("click",r);var s=document.querySelector(o);null==s||null===(i=s.classList)||void 0===i||i.toggle("open"),e.remove(),t.on_hide(n)})),_defineProperty$1(this,"_logInAppEvent",(function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=t.rtmInstance.getCampaignMeta(t.configId),o=i._attr;Apxor.logEvent(e,_objectSpread2$1(_objectSpread2$1({id:t.configId,message_name:t.name},n),o),!1,"apxor","campaign")})),this.isValid=!0})),ApxorInApp=_createClass$1((function e(){_classCallCheck$1(this,e),_defineProperty$1(this,"parse",(function(e,t,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,a=arguments.length>5?arguments[5]:void 0,r=arguments.length>6&&void 0!==arguments[6]&&arguments[6],s=new InAppConfigItem;return s.initialize(e,t,n,i,o,a,r)?s:null}))})),SDK_VERSION=300,DEFAULT_COOKIE_EXPIRATION=730,DEFAULT_CONFIG={enable:!0,api_root:"https://server.apxor.com/v2/api",auto_track_events:["click","submit"],cookie_expiration:DEFAULT_COOKIE_EXPIRATION,name:"",domain:"",cookie_prefix:"_apx_",idle_time_out:1800,ed_t_time:-1,sct_time:108e5,events:{stop:[],action:[]}},APX_PREFIX="apx_",LOCAL_STORAGE="local_storage",SESSION_STORAGE="session_storage",showEventsList=["inline_shown","inapp_shown","apx_onboarding_screen_shown"],surveyShowEventsList=["apx_survey_dialog_launched","apx_survey_launched"],dismissEventsList=["inline_dismissed","walk_through_cancelled","inapp_dismissed","apx_onboarding_completed","apx_onboarding_screen_dismissed"],surveyDismissEventsList=["apx_survey_completed"],actionEventsList=["apx_app_opened","install","apx_context_evaluated","InlineTargetViewClicked","InAppBackButtonPressed","InAppRedirectionFailed","inapp_show_failed","InAppXIconClicked","apx_video_inapp_button_clicked","apx_video_inapp_close_button_clicked","apx_video_inapp_failed","apx_video_inapp_maximised","apx_video_inapp_minimised","apx_video_inapp_volume_button_clicked"],surveyActionEventsList=["apx_survey_dialog_yes_clicked","apx_survey_dialog_close_icon_clicked","apx_survey_close_button_clicked","apx_survey_back_button_pressed","apx_survey_dialog_no_clicked","apx_survey_question_asked","apx_survey_question_answered","apx_survey_skip_button_clicked","apx_survey_back_button_clicked","apx_survey_"],ON_KEY="on",BROWSERS={OperaMini:"Opera Mini",Opera:"Opera",BlackBerry:"BlackBerry",IEMobile:"Internet Explorer Mobile",Edge:"Microsoft Edge",FB:"Facebook Mobile",Chrome:"Chrome",ChromeIOS:"Chrome iOS",UC:"UC Browser",FirefoxIOS:"Firefox iOS",SafariMobile:"Mobile Safari",Safari:"Safari",AndroidMobile:"Android Mobile",Konqueror:"Konqueror",Firefox:"Firefox",IE:"Internet Explorer",Mozilla:"Mozilla",Brave:"Brave"},APXOR_USER_ID="apx_id",APX_CONFIG_KEY="_apx_config",APX_USER_ATTR_KEY="_apx_ua",APX_SYNC="_apx_sc",APX_EVENTS_LOGGED="_apx_evl",APX_LAST_ENABLE_DISABLE_TIME="_apx_ledt",APX_LAST_ENABLED_FLAG="_apx_lef",APX_CONFIG_HASH="_apx_ch",APX_LAST_CONFIG_TIME="_apx_lct",APX_USER_INFO_HASH="_apx_uih",APX_INSTALL_KEY="apx_in",APP_VERSION_KEY="apx_ver",APX_LAST_BG_TIME_KEY="apx_lbgt",DETAILS_KEY="details",APXOR_STATUS_KEY="apxor_status",APXOR_STATUS_SUCCESS="APXOR_STATUS_SUCCESS",VISIBLE="visible",FOREGROUND="FOREGROUND",BACKGROUND="BACKGROUND",APX_PAGE_OPENED="APX_PAGE_OPENED",APX_APP_OPENED="apx_app_opened",REFERRER_KEY="referrer",AUTOMATION_KEY="automation",PLATFORM_KEY="platform",DATA_SAVE_MODE_KEY="data_save_mode",NETWORK_KEY="network",SYSTEM_EVENT="SYSTEM_EVENT",NAVIGATION_EVENT="NAVIGATION_EVENT",APP_EVENT="APP_EVENT",CLIENT_EVENT="CLIENT_EVENT",REATINED_SESSIONS="apx_retained_session",QE_STATE="qe_state",DEVICE_TYPE="device_type",APX_LAST_EVENT_TIME="_apx_lEt",APX_SESSION_ID="_apx_sId",APX_CURRENT_CHUNK="_apx_cd",OLD_SESSIONS_DATA="_apx_od",APX_LT_COUNT="_apx_lt_count",APX_UNSENT_CHUNK_DETAILS="_apx_use",APX_SESSION_CHUNK_NUMBER_MAP="_apx_scnm",APX_RETAINED_DAYS="apx_retained_days",APX_SESSION_START_TIME="apx_sst",APX_TERMINATION_ID="apx_termination_ID",apxorKeys=["apx_debug_enable","apx_log_level","_apx_config","apx_id","apx_ver","apx_ver","apx_in","_apx_od","_apx_use","_apx_cd","qe_state","apx_retained_session","apx_retained_days","_apx_ua","_apx_sc","_apx_ledt","_apx_lef","_apx_ch","_apx_lct","_apx_uih","apx_lbgt","_apx_lEt","_apx_sId","_apx_lt_count","apx_sst","apx_termination_ID","_apx_ew","_apx_scnm","0__lcfht","1__lcfht","_apx_td","apx-last-shown-times","apx-last-shown-session"];function safeAdd(e,t){var n=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(n>>16)<<16|65535&n}function bitRotateLeft(e,t){return e<<t|e>>>32-t}function md5cmn(e,t,n,i,o,a){return safeAdd(bitRotateLeft(safeAdd(safeAdd(t,e),safeAdd(i,a)),o),n)}function md5ff(e,t,n,i,o,a,r){return md5cmn(t&n|~t&i,e,t,o,a,r)}function md5gg(e,t,n,i,o,a,r){return md5cmn(t&i|n&~i,e,t,o,a,r)}function md5hh(e,t,n,i,o,a,r){return md5cmn(t^n^i,e,t,o,a,r)}function md5ii(e,t,n,i,o,a,r){return md5cmn(n^(t|~i),e,t,o,a,r)}function binlMD5(e,t){var n,i,o,a,r;e[t>>5]|=128<<t%32,e[14+(t+64>>>9<<4)]=t;var s=1732584193,l=-271733879,c=-1732584194,d=271733878;for(n=0;n<e.length;n+=16)i=s,o=l,a=c,r=d,s=md5ff(s,l,c,d,e[n],7,-680876936),d=md5ff(d,s,l,c,e[n+1],12,-389564586),c=md5ff(c,d,s,l,e[n+2],17,606105819),l=md5ff(l,c,d,s,e[n+3],22,-1044525330),s=md5ff(s,l,c,d,e[n+4],7,-176418897),d=md5ff(d,s,l,c,e[n+5],12,1200080426),c=md5ff(c,d,s,l,e[n+6],17,-1473231341),l=md5ff(l,c,d,s,e[n+7],22,-45705983),s=md5ff(s,l,c,d,e[n+8],7,1770035416),d=md5ff(d,s,l,c,e[n+9],12,-1958414417),c=md5ff(c,d,s,l,e[n+10],17,-42063),l=md5ff(l,c,d,s,e[n+11],22,-1990404162),s=md5ff(s,l,c,d,e[n+12],7,1804603682),d=md5ff(d,s,l,c,e[n+13],12,-40341101),c=md5ff(c,d,s,l,e[n+14],17,-1502002290),s=md5gg(s,l=md5ff(l,c,d,s,e[n+15],22,1236535329),c,d,e[n+1],5,-165796510),d=md5gg(d,s,l,c,e[n+6],9,-1069501632),c=md5gg(c,d,s,l,e[n+11],14,643717713),l=md5gg(l,c,d,s,e[n],20,-373897302),s=md5gg(s,l,c,d,e[n+5],5,-701558691),d=md5gg(d,s,l,c,e[n+10],9,38016083),c=md5gg(c,d,s,l,e[n+15],14,-660478335),l=md5gg(l,c,d,s,e[n+4],20,-405537848),s=md5gg(s,l,c,d,e[n+9],5,568446438),d=md5gg(d,s,l,c,e[n+14],9,-1019803690),c=md5gg(c,d,s,l,e[n+3],14,-187363961),l=md5gg(l,c,d,s,e[n+8],20,1163531501),s=md5gg(s,l,c,d,e[n+13],5,-1444681467),d=md5gg(d,s,l,c,e[n+2],9,-51403784),c=md5gg(c,d,s,l,e[n+7],14,1735328473),s=md5hh(s,l=md5gg(l,c,d,s,e[n+12],20,-1926607734),c,d,e[n+5],4,-378558),d=md5hh(d,s,l,c,e[n+8],11,-2022574463),c=md5hh(c,d,s,l,e[n+11],16,1839030562),l=md5hh(l,c,d,s,e[n+14],23,-35309556),s=md5hh(s,l,c,d,e[n+1],4,-1530992060),d=md5hh(d,s,l,c,e[n+4],11,1272893353),c=md5hh(c,d,s,l,e[n+7],16,-155497632),l=md5hh(l,c,d,s,e[n+10],23,-1094730640),s=md5hh(s,l,c,d,e[n+13],4,681279174),d=md5hh(d,s,l,c,e[n],11,-358537222),c=md5hh(c,d,s,l,e[n+3],16,-722521979),l=md5hh(l,c,d,s,e[n+6],23,76029189),s=md5hh(s,l,c,d,e[n+9],4,-640364487),d=md5hh(d,s,l,c,e[n+12],11,-421815835),c=md5hh(c,d,s,l,e[n+15],16,530742520),s=md5ii(s,l=md5hh(l,c,d,s,e[n+2],23,-995338651),c,d,e[n],6,-198630844),d=md5ii(d,s,l,c,e[n+7],10,1126891415),c=md5ii(c,d,s,l,e[n+14],15,-1416354905),l=md5ii(l,c,d,s,e[n+5],21,-57434055),s=md5ii(s,l,c,d,e[n+12],6,1700485571),d=md5ii(d,s,l,c,e[n+3],10,-1894986606),c=md5ii(c,d,s,l,e[n+10],15,-1051523),l=md5ii(l,c,d,s,e[n+1],21,-2054922799),s=md5ii(s,l,c,d,e[n+8],6,1873313359),d=md5ii(d,s,l,c,e[n+15],10,-30611744),c=md5ii(c,d,s,l,e[n+6],15,-1560198380),l=md5ii(l,c,d,s,e[n+13],21,1309151649),s=md5ii(s,l,c,d,e[n+4],6,-145523070),d=md5ii(d,s,l,c,e[n+11],10,-1120210379),c=md5ii(c,d,s,l,e[n+2],15,718787259),l=md5ii(l,c,d,s,e[n+9],21,-343485551),s=safeAdd(s,i),l=safeAdd(l,o),c=safeAdd(c,a),d=safeAdd(d,r);return[s,l,c,d]}function binl2rstr(e){var t,n="",i=32*e.length;for(t=0;t<i;t+=8)n+=String.fromCharCode(e[t>>5]>>>t%32&255);return n}function rstr2binl(e){var t,n=[];for(n[(e.length>>2)-1]=void 0,t=0;t<n.length;t+=1)n[t]=0;var i=8*e.length;for(t=0;t<i;t+=8)n[t>>5]|=(255&e.charCodeAt(t/8))<<t%32;return n}function rstrMD5(e){return binl2rstr(binlMD5(rstr2binl(e),8*e.length))}function rstrHMACMD5(e,t){var n,i,o=rstr2binl(e),a=[],r=[];for(a[15]=r[15]=void 0,o.length>16&&(o=binlMD5(o,8*e.length)),n=0;n<16;n+=1)a[n]=909522486^o[n],r[n]=1549556828^o[n];return i=binlMD5(a.concat(rstr2binl(t)),512+8*t.length),binl2rstr(binlMD5(r.concat(i),640))}function rstr2hex(e){var t,n,i="";for(n=0;n<e.length;n+=1)t=e.charCodeAt(n),i+="0123456789abcdef".charAt(t>>>4&15)+"0123456789abcdef".charAt(15&t);return i}function str2rstrUTF8(e){return unescape(encodeURIComponent(e))}function rawMD5(e){return rstrMD5(str2rstrUTF8(e))}function hexMD5(e){return rstr2hex(rawMD5(e))}function rawHMACMD5(e,t){return rstrHMACMD5(str2rstrUTF8(e),str2rstrUTF8(t))}function hexHMACMD5(e,t){return rstr2hex(rawHMACMD5(e,t))}var md5=function(e,t,n){return t?n?rawHMACMD5(t,e):hexHMACMD5(t,e):n?rawMD5(e):hexMD5(e)},EventHandler=_createClass$1((function e(){var t=this;_classCallCheck$1(this,e),_defineProperty$1(this,"notifyListeners",(function(e,n){if(t._listeners[e])for(var i=t._listeners[e],o=0;o<i.length;o++){(0,i[o])(n)}})),_defineProperty$1(this,"registerForEvent",(function(e,n){var i;isFunction(n)&&((i=t._listeners[e]?t._listeners[e]:[]).push(n),t._listeners[e]=i)})),_defineProperty$1(this,"unregisterFromEvent",(function(e,n){if(t._listeners[e]){for(var i=t._listeners[e],o=[],a=0;a<i.length;a++){var r=i[a];r!==n&&o.push(r)}t._listeners[e]=o}})),_defineProperty$1(this,"tearDown",(function(){t._listeners={}})),this._listeners={}})),ALL="ALL",makeSystemEvent=function(e,t){return{name:e===VISIBLE?FOREGROUND:BACKGROUND,time:isNumber(t)?toDecimalPoints(t):0}},makeEvent=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0,i=arguments.length>3?arguments[3]:void 0;if(isString(e)&&isObject(t))return{name:e,additional_info:t,category:isDefined(n)&&isString(n)?n:void 0,time:isNumber(i)?toDecimalPoints(i):0}},makeAppInfo=function(e,t,n,i,o){return{app_name:e,app_version:o=isDefined(o)?o:ALL,bundle_id:t,installation_time:n,app_mode:i}},makeDeviceInfo=function(e,t,n,i,o,a,r,s){return{id:e,hardware_model:t,dimensions:n,os_version:i,platform:"web",dpi:o,dimensions_in_pixels:a,browser:r,browser_version:s}},makeNavigationEvent=function(e,t,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;return{navigation_id:e,name:t,duration:isNumber(n)?toDecimalPoints(n):0,transition_time:isNumber(i)?toDecimalPoints(i):0}},DEFAULT_CHUNK_DETAILS={navigation_events:[],app_events:[],system_events:[],user_events:[],chunk_attributes:{},user_attributes:{},session_attributes:{}},getSdkInfo=function(e){return{sdk_version:SDK_VERSION,config_id:"apx",tick_interval:1,chunk_retry_window:1800,sdk_start_time:e}},chunkInitialState=function(e,t,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1;return Logger$4.debug("Model : Building the initial state of the Chunk"),{sdk_info:getSdkInfo(e),session_info:{id:n,launch_time:t,launch_time_string:formatDatetime(new Date(t)),startup_time:0,is_background:!1,is_first_session:!1,duration:0,total_duration:0,process_name:"",is_fatal:!1,launch_type:"normal"},app_info:{app_name:"",app_version:ALL,bundle_id:"",installation_time:Controller.getInstance().getInstallationTime(getNow()),app_mode:"production"},device_info:getDeviceInfo(window),chunk_meta:{id:n+":"+i,number:i,reporting_times:[]},chunk_details:_objectSpread2$1(_objectSpread2$1({},DEFAULT_CHUNK_DETAILS),{},{user_attributes:{},session_attributes:{}})}},Request=_createClass$1((function e(){var t=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};_classCallCheck$1(this,e),_defineProperty$1(this,"post",(function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2?arguments[2]:void 0,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},a=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],r=t.window.XMLHttpRequest;Logger$4.debug("Request : POST request with data"),r?t._makeXmlHttpRequest(e,n,i,o,a):(Logger$4.error("Request : Unknown browser"),i(403,"Unknown")),Logger$4.debug("Request : Sent request to server")})),_defineProperty$1(this,"get",(function(e,n){var i=t.window,o=i.fetch,a=i.XMLHttpRequest;if(o)o(e).then((function(e){try{if(e.ok)return e.json()}catch(e){Logger$4.debug("Request : Error while parsing the response ".concat(e))}return null})).then((function(e){isDefined(e)?n(200,e):(Logger$4.error("Request : API request failed. ".concat(JSON.stringify(e))),n(500,{}))})).catch((function(e){Logger$4.error("Request : API request failed. ".concat(e)),n(500,e)}));else if(a){var r=new a;r.open("GET",e,!0),r.onreadystatechange=function(){4===r.readyState&&n(r.status,r.responseText)},r.send()}else Logger$4.error("Request : Unknown browser"),n(403,"Unknown");Logger$4.debug("Request : sent request to server")})),_defineProperty$1(this,"_makeXmlHttpRequest",(function(e,n,i,o,a){var r=new XMLHttpRequest;r.onerror=function(e){Logger$4.error("Request : API request failed. ".concat(e)),i(500,null)},r.open("POST",e,a),r.setRequestHeader("Content-Type","application/json; charset=UTF-8"),Object.keys(null!=o?o:{}).forEach((function(e){r.setRequestHeader(e,o[e])})),r.onreadystatechange=function(){if(4===r.readyState){var o=r.responseText,a=o.match(/Failed to execute 'send' on 'XMLHttpRequest'/);if(!(isNull(a)||isUndefined(a)||isNull(a[0])||isUndefined(a[0])||"Failed to execute 'send' on 'XMLHttpRequest'"!==a[0]))return void t._makeXmlHttpRequest(e,n,i,!0);try{o=JSON.parse(o)}catch(e){Logger$4.debug("Request : Error while parsing the response ".concat(e))}i(r.status,o)}};try{r.send(JSON.stringify(n))}catch(e){Logger$4.error("Request : API request failed. ".concat(e)),i(500,e)}})),this.window=n})),CHUNKS_API="/chunks?appId=<app-id>&isTestDevice=<test-device>",CONFIG_API$1="/config/<app-id>/web",SDK_ENABLED_API="/sdk/<app-id>/enabled-status?platform=web&version="+SDK_VERSION,POST_USER_INFO_API="/user?appId=<app-id>",API_ROOT=DEFAULT_CONFIG.api_root,_makeAPI=function(e,t){return API_ROOT+e.replace("<app-id>",t)},API=_createClass$1((function e(t){var n=this,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};_classCallCheck$1(this,e),_defineProperty$1(this,"_callback",(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(){return null},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){return null};return function(n,i){Logger$4.debug("XHR Response: [".concat(n,"]")),n<400?i&&i[APXOR_STATUS_KEY]===APXOR_STATUS_SUCCESS?i[DETAILS_KEY]?e(i[DETAILS_KEY]):e(i):200===n?e(i):t(n,i):t&&isFunction(t)&&t(n,i)}})),_defineProperty$1(this,"checkIfSDKEnabled",(function(e,t){n.makeGetRequest(n.sdkEnabledStatusAPI,e,t)})),_defineProperty$1(this,"getConfig",(function(e,t){n.makeGetRequest(n.configAPI,e,t)})),_defineProperty$1(this,"postUserInfo",(function(e,t,i){n.request.post(n.userInfoAPI,e,n._callback(t,i),{})})),_defineProperty$1(this,"postChunk",(function(e,t,i){var o=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];Logger$4.debug("Posting chunk"),n.request.post(n.chunksAPI,e,n._callback(t,i),{},o)})),_defineProperty$1(this,"makeGetRequest",(function(e,t,i){n.request.get(e,n._callback(t,i))})),_defineProperty$1(this,"makePostRequest",(function(e,t,i,o,a){n.request.post(e,t,n._callback(o,a),i)})),this.request=new Request(i),this.configAPI=_makeAPI(CONFIG_API$1,t),this.chunksAPI=_makeAPI(CHUNKS_API,t),this.chunksAPI=this.chunksAPI.replace("<test-device>",Controller.getInstance().isTestDevice()),this.sdkEnabledStatusAPI=_makeAPI(SDK_ENABLED_API,t),this.userInfoAPI=_makeAPI(POST_USER_INFO_API,t)})),SessionHandler=_createClass$1((function e(){var t=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;_classCallCheck$1(this,e),_defineProperty$1(this,"_lastBackgroundTime",-1),_defineProperty$1(this,"_totalBackgroundTime",0),_defineProperty$1(this,"getTotalBackgroundTime",(function(){return t._totalBackgroundTime})),_defineProperty$1(this,"getLastBackgroundTime",(function(){return t._lastBackgroundTime})),_defineProperty$1(this,"reset",(function(){t._lastBackgroundTime=-1,t._totalBackgroundTime=0})),_defineProperty$1(this,"_onSystemEvent",(function(e){if(e.name===FOREGROUND){if(-1!==t._lastBackgroundTime){var n=Math.round(millisToSeconds(Date.now()-t._lastBackgroundTime));t._totalBackgroundTime+=n;var i=Controller.getInstance().getFromStorage(APX_SESSION_ID);if(isDefined(i)&&Controller.getInstance().getSessionId()!==i){Controller.getInstance().createANewChunk();var o=Controller.getInstance().getSessionInfo(),a=o.total_duration,r=o.duration;t._totalBackgroundTime=a>r?a-r:0}}}else t._lastBackgroundTime=Date.now(),Controller.getInstance().persistToStorage(APX_LAST_BG_TIME_KEY,t._lastBackgroundTime)})),Controller.getInstance().registerForEvent(SYSTEM_EVENT,this._onSystemEvent),this._totalBackgroundTime=n,Controller.getInstance().persistToStorage(APX_LAST_BG_TIME_KEY,this._lastBackgroundTime)})),Storage=function(){function e(t){var n=this;_classCallCheck$1(this,e),_defineProperty$1(this,"_isStorageAvailable",!1),_defineProperty$1(this,"_isSupported",(function(e){var t=!0;try{window[e]?(window[e].setItem("_apx_","apx"),"apx"!==window[e].getItem("_apx_")&&(t=!1),window[e].removeItem("_apx_")):t=!1}catch(e){t=!1}return t||Logger$4.error("Storage : LocalStorage not supported"),t})),_defineProperty$1(this,"logError",(function(e){Logger$4.error("".concat(n.storageType," Error: "),e)})),_defineProperty$1(this,"get",(function(e){try{return n.storage.getItem(e)}catch(t){Logger$4.error("Storage : Error while getting the ".concat(e," from storage - ").concat(t))}return null})),_defineProperty$1(this,"getParsed",(function(e){try{return JSON.parse(n.storage.getItem(e))}catch(t){Logger$4.error("Storage : Error while parsing ".concat(e,"'s value from storage - ").concat(t))}return null})),_defineProperty$1(this,"set",(function(e,t){try{n.storage.setItem(e,t)}catch(t){Logger$4.error("Storage : Error while setting the ".concat(e,"'s value to storage - ").concat(t))}})),_defineProperty$1(this,"remove",(function(e){try{n.storage.removeItem(e)}catch(t){Logger$4.error("Storage : Error while removing the ".concat(e," from storage - ").concat(t))}})),_defineProperty$1(this,"clear",(function(){try{n.storage.removeItem(APX_CONFIG_KEY),n.storage.removeItem(APX_USER_ATTR_KEY),n.storage.removeItem(APX_LAST_EVENT_TIME),n.storage.removeItem(APX_SESSION_ID),n.storage.removeItem(APX_SYNC),n.storage.removeItem(APXOR_USER_ID),n.storage.removeItem(APX_INSTALL_KEY),n.storage.removeItem(APP_VERSION_KEY),n.storage.removeItem(APX_LAST_BG_TIME_KEY),n.storage.removeItem(APX_CURRENT_CHUNK),n.storage.removeItem(OLD_SESSIONS_DATA),n.storage.removeItem(APX_LT_COUNT),n.storage.removeItem(APX_UNSENT_CHUNK_DETAILS),n.storage.removeItem(APX_SESSION_CHUNK_NUMBER_MAP),n.storage.removeItem(APX_LAST_CONFIG_TIME),n.storage.removeItem(APX_CONFIG_HASH),n.storage.removeItem(APX_LAST_ENABLED_FLAG),n.storage.removeItem(APX_LAST_ENABLE_DISABLE_TIME)}catch(e){Logger$4.error("Storage : Error while clearing the storage - ".concat(e))}})),this._isStorageAvailable=this._isSupported(t),this._isStorageAvailable?(this.storage=window[t],this.storageType=t):(this.storageType=t,this.storage={length:0,getItem:function(){},setItem:function(){},removeItem:function(){},clear:function(){},get:function(){},set:function(){},remove:function(){},getParsed:function(){}})}return _createClass$1(e,[{key:"isStorageAvailable",value:function(){return this._isStorageAvailable}}],[{key:"waitForBrowserStorage",value:function(t){var n=15,i=setInterval((function(){n--,e.isLocalStorageEnabled()||n<=0?(Logger$4.debug("Storage : Local storage available"),clearInterval(i),t()):Logger$4.debug("Storage : Local storage not available yet")}),100)}},{key:"isLocalStorageEnabled",value:function(){try{var e="__apx_storage_test__";window.localStorage.setItem(e,"test");var t=window.localStorage.getItem(e);return window.localStorage.removeItem(e),"test"===t}catch(e){return Logger$4.debug("Browser storage is not enabled yet : ".concat(e)),!1}}}]),e}();function storage(){return new Storage("localStorage")}function sessionStorage(){return new Storage("sessionStorage")}var Cookie=_createClass$1((function e(){_classCallCheck$1(this,e)}));_defineProperty$1(Cookie,"isCookieAvailable",(function(){try{var e=(new Date).getTime()+864e5;document.cookie="cookie_set=cookie_value; expires="+e;for(var t=document.cookie.split(";"),n=0;n<t.length;n++){if(-1!==t[n].indexOf("cookie_set"))return document.cookie="cookie_set=cookie_value; expires=Thu, 01 Jan 1970 00:00:01 GMT;",!0}return!1}catch(e){return!1}})),_defineProperty$1(Cookie,"get",(function(e){if(window.document)for(var t=e+"=",n=window.document.cookie.split(";"),i=0;i<n.length;i++){for(var o=n[i];" "===o.charAt(0);)o=o.substring(1,o.length);if(0===o.indexOf(t))return decodeURIComponent(o.substring(t.length,o.length))}return null}));var DataManager=function(){function e(t){var n=this;_classCallCheck$1(this,e),_defineProperty$1(this,"_siteId",""),_defineProperty$1(this,"getExistingConfig",(function(){var e,t=n.storage.get(APX_CONFIG_KEY);if(isDefined(t))try{t=JSON.parse(decode(n._siteId,t))}catch(e){t=null}return null!==(e=t)&&void 0!==e?e:DEFAULT_CONFIG})),_defineProperty$1(this,"persistConfig",(function(e){n.storage.set(APX_CONFIG_KEY,encode(n._siteId,JSON.stringify(e)))})),_defineProperty$1(this,"persistUserId",(function(e){n.storage.set(APXOR_USER_ID,e)})),_defineProperty$1(this,"getUserId",(function(){var e=null;try{e=n.storage.get(APXOR_USER_ID)}catch(e){Logger$4.debug("Datamaager : Can not get user id from storage-"+e)}return e})),_defineProperty$1(this,"persistAppVersion",(function(e){return n.storage.set(APP_VERSION_KEY,e)})),_defineProperty$1(this,"getAppVersion",(function(){var e=n.storage.get(APP_VERSION_KEY);if(!isDefined(e)&&Cookie.isCookieAvailable()){var t=Cookie.get(APP_VERSION_KEY);if(isDefined(t))return n.storage.set(APP_VERSION_KEY,t),t}return e})),_defineProperty$1(this,"persist",(function(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:LOCAL_STORAGE;i===LOCAL_STORAGE?n.storage.set(e,t):i===SESSION_STORAGE&&n.sessionStorage.set(e,t)})),_defineProperty$1(this,"getItem",(function(e){var t,i=arguments.length>1&&void 0!==arguments[1]&&arguments[1],o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:LOCAL_STORAGE;if(o===LOCAL_STORAGE?t=n.storage.get(e):o===SESSION_STORAGE&&(t=n.sessionStorage.get(e)),i){var a=getJSONOrNull(t);if(null===a)try{t=JSON.parse(decode(n._siteId,t))}catch(n){Logger$4.debug("Datamanager : ".concat(e," - value not found in storage")),t=null}else t=a}return Logger$4.debug("Datamanager : ".concat(e,"'s value from storage is ").concat(JSON.stringify(t))),t})),_defineProperty$1(this,"getItemOrDefault",(function(e,t){var i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:LOCAL_STORAGE,a=n.getItem(e,i,o);return isDefined(a)?a:(Logger$4.debug("Datamanager : ".concat(e,"'s value is not defined. Returning default-").concat(JSON.stringify(t))),t)})),_defineProperty$1(this,"clearStorage",(function(){n.storage.clear(),n.sessionStorage.clear()})),_defineProperty$1(this,"resetUserProperties",(function(){Logger$4.debug("Datamanager : Removing the user attributes form the storage"),n.storage.remove(APX_USER_ATTR_KEY)})),_defineProperty$1(this,"persistInstallationTime",(function(e){Logger$4.debug("DataManager : Setting the installation time to ".concat(e)),n.storage.set(APX_INSTALL_KEY,e)})),_defineProperty$1(this,"getInstallationTime",(function(e){var t=n.storage.get(APX_INSTALL_KEY);return isDefined(t)?(Logger$4.debug("Datamanager : Stored installation time ".concat(t)),Number(t)):(Logger$4.debug("Datamanager : Stored installation time not found. Persisting and returning the default time ".concat(e)),n.persistInstallationTime(e),e)})),_defineProperty$1(this,"persistOldChunk",(function(e){Logger$4.debug("Datamanager : Persisting the old session chunk to the storage"),n.storage.set(OLD_SESSIONS_DATA,encode(n._siteId,JSON.stringify(e)))})),_defineProperty$1(this,"getOldChunk",(function(){var e;Logger$4.debug("Datamanager : Getting the old session chunk details form the storage");var t=n.storage.get(OLD_SESSIONS_DATA),i=getJSONOrNull(t);if(null===i)try{t=JSON.parse(decode(n._siteId,t))}catch(e){t=null}else t=i;return null!==(e=t)&&void 0!==e?e:[]})),_defineProperty$1(this,"removeOldChunk",(function(){Logger$4.debug("Datamanager : Removing the old session chunk details form the storage"),n.storage.remove(OLD_SESSIONS_DATA)})),_defineProperty$1(this,"getOldChunkDetails",(function(){return n.getItem(APX_UNSENT_CHUNK_DETAILS,!0)})),_defineProperty$1(this,"persistOldChunkDetails",(function(e){Logger$4.debug("Datamanager : Persisting the old session chunk details to the storage"),n.storage.set(APX_UNSENT_CHUNK_DETAILS,encode(n._siteId,JSON.stringify(e)))})),_defineProperty$1(this,"removeOldChunkDetails",(function(){Logger$4.debug("Datamanager : Removing the old session chunk details form the storage"),n.storage.remove(APX_UNSENT_CHUNK_DETAILS)})),_defineProperty$1(this,"getSessionsChunkNumberMap",(function(){Logger$4.debug("Datamanager : Getting the session chunknumber map");var e=n.getItem(APX_SESSION_CHUNK_NUMBER_MAP,!0);return isDefined(e)||(e={}),e})),_defineProperty$1(this,"persistSessionsChunkNumberMap",(function(e){Logger$4.debug("Datamanager : Persisting the new session chunknumber map");var t=encode(n._siteId,JSON.stringify(e));n.persist(APX_SESSION_CHUNK_NUMBER_MAP,t)})),_defineProperty$1(this,"getNewChunk",(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Date.now(),t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Date.now(),i=arguments.length>2?arguments[2]:void 0,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:3600;Logger$4.debug("Datamanager : Creating a new chunk");var a,r=!1,s=Number(n.storage.get(APX_LAST_EVENT_TIME))||0,l=Date.now(),c=Math.round(millisToSeconds(l-s)),d=n.getCurrentChunk();if((c>o||isNotDefined(d))&&(r=!0),r)Logger$4.debug("Datamanager : This is a new session. Creating a new chunk"),a=chunkInitialState(e,t,i);else{Logger$4.debug("Datamanager : This is an old session. Updating the existing chunk");var p=d.chunk_meta.number,u=d.session_info.id,h=p+1;(a=_objectSpread2$1({},d)).chunk_meta=_objectSpread2$1(_objectSpread2$1({},a.chunk_meta),{},{number:h,id:u+":"+h,reporting_times:[Date.now()]}),a.chunk_details=_objectSpread2$1({},DEFAULT_CHUNK_DETAILS)}return{is_new_session:r,chunk:a}})),_defineProperty$1(this,"clearCurrentChunk",(function(){Logger$4.debug("Datamanager : Current chunk removed from storage"),n.storage.remove(APX_CURRENT_CHUNK)})),_defineProperty$1(this,"persistCurrentChunk",(function(e){Logger$4.debug("Datamanager : Persisting the Current chunk to storage"),ensureSessionInfoKeys(e),n.storage.set(APX_CURRENT_CHUNK,encode(n._siteId,JSON.stringify(e)))})),_defineProperty$1(this,"getCurrentChunk",(function(){return n.getItem(APX_CURRENT_CHUNK,!0)})),this._siteId=t,this.storage=storage(),this.sessionStorage=sessionStorage(),Logger$4.debug("DataManager : Initialized")}return _createClass$1(e,[{key:"getltCount",value:function(e){try{var t=this.storage.get(APX_LT_COUNT);if(t){var n=decode(this._siteId,t);return JSON.parse(n)[e.replace("'","").replace("’","")]}}catch(t){Logger$4.error("Datamanager : Error gettting the LT Count for the event -"+e)}return 0}},{key:"updateRetainedDayCount",value:function(e){Logger$4.debug("Datamanager : Re-calculating and updating the retention day");var t=this.getItem(APX_INSTALL_KEY),n=Math.abs(t-e)/36e5,i=Math.floor(n/24);this.persist(APX_RETAINED_DAYS,i)}}]),e}(),VISIBILITY_CHANGE_EVENT="visibilitychange",SCROLL_EVENT_TYPES=["scroll","touchmove"],SystemEventMonitor=_createClass$1((function e(){var t=this,n=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];_classCallCheck$1(this,e),_defineProperty$1(this,"_isFirst",!0),_defineProperty$1(this,"listenSystemEvents",(function(){Logger$4.debug("Registering for System Event ",VISIBILITY_CHANGE_EVENT);var e=function(){var e=Controller.getInstance(),n=e.getSDKRunningTimeInSec(),i=window.document.visibilityState===VISIBLE,o=makeSystemEvent(window.document.visibilityState,n);if(i?(e.setBlockChunkReportingFlag(!1),t._lastBackgroundTime>-1&&(e.sendOldChunk((function(){e.dispatchEvent(SYSTEM_EVENT,o)})),o.background_time=toDecimalPoints(millisToSeconds(Date.now()-t._lastBackgroundTime)))):(e.setBlockChunkReportingFlag(!0),e.reportChunkOnVisibilityChange(),t._lastBackgroundTime=Date.now(),e.dispatchEvent(SYSTEM_EVENT,o)),i){var a=e.getUserAttributes().apx_browser;!t._isFirst||-1!==a.indexOf("Mobile Safari")&&-1!==a.indexOf("Safari")||(t._isFirst=!1)}else e.clearNavigation()};registerForEvent(document,VISIBILITY_CHANGE_EVENT,e),t._handlers.push(t._newHandler(VISIBILITY_CHANGE_EVENT,e))})),_defineProperty$1(this,"unregisterEvents",(function(){t._handlers.forEach((function(e){var t=e.type,n=e.handler;Logger$4.debug("Unregistering from event type ",t),SCROLL_EVENT_TYPES.includes(t)?deregisterFromEvent(window.document,t,n):deregisterFromEvent(document,t,n)})),t._handlers=[],t._scrollEvents=[],t._scrollData={}})),_defineProperty$1(this,"getScrollEvents",(function(){return[]})),_defineProperty$1(this,"_newHandler",(function(e,t){return{type:e,handler:t}})),this._lastBackgroundTime=-1,this._handlers=[],this._scrollEvents=[],this._scrollData={},this._isFirst=n,this.listenSystemEvents()})),Sync=_createClass$1((function e(){var t=this;_classCallCheck$1(this,e),_defineProperty$1(this,"_validateHash",!0),_defineProperty$1(this,"_siteId",""),_defineProperty$1(this,"_RTA",0),_defineProperty$1(this,"_SURVEYS",1),_defineProperty$1(this,"initialize",(function(e,n){t._siteId=n;var i=e.validate_hash,o=void 0===i||i,a=e.cs_ht_time,r=void 0===a?-1:a;t._validateHash=o,t.configsHashThrottleTime=r,Controller.getInstance().registerForEvent(APP_EVENT,(function(e){t._updateCountInStorage(e.name)}))})),_defineProperty$1(this,"fetchConfiguration",(function(e,n,i,o){if(isFunction(o))if(t._validateHash){var a=Controller.getInstance();if(t.configsHashThrottleTime>0){var r=a.getValueOrDefault(e+"_lcfht",-1);if(r>0)if(Math.abs(Date.now()-r)<t.configsHashThrottleTime)return void t._fetchFromStorageAndSend(e,o)}a.persistToStorage(e+"_lcfht",Date.now());var s=t._getSyncData(),l={pid_mid:[]},c=s[e];if(isDefined(c)){Array.isArray(c)||(c=[c]);var d=[];c.forEach((function(e){var t=e.pid+"_"+e.mid;d.includes(t)||d.push(t)})),d.length>0&&(l.pid_mid=d.join(","))}else c=[];var p=a.getUserAttributes().custom_user_id,u=void 0===p?null:p;u&&(n+="&customerId="+u),a.makePostRequest(n,l,{"Content-Type":"application/json"},(function(n){t._validateHashes(n,e,i,{configs:c,syncData:s},o)}),(function(){Logger$4.error("Failed to fetch"),o(e,{configs:c})}))}else t._fetchConfig(e,i,[],o)})),_defineProperty$1(this,"_getSyncData",(function(){var e=Controller.getInstance().getFromStorage(APX_SYNC);return isDefined(e)?JSON.parse((new TextDecoder).decode(stringToArrayBuffer(decode(Controller.getInstance().getSiteId(),e)))):{}})),_defineProperty$1(this,"_fetchFromStorageAndSend",(function(e,n){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,o=i;i||(o=t._getSyncData());var a=o[e];isDefined(a)&&(Array.isArray(a)||(a=[a]),Logger$4.debug("Reading from storage"),n(e,{configs:a}))})),_defineProperty$1(this,"_validateHashes",(function(e,n,i,o,a){var r=e.pull,s=void 0===r?[]:r,l=e.drop,c=void 0===l?[]:l,d=o.configs,p=o.syncData,u=JSON.parse(Controller.getInstance().getFromStorage(APX_TERMINATION_ID)),h=[];c.length>0||s.length>0?(c.forEach((function(e){var t=removeLastPartOfId(e);if(checkForNeverShow(t)){var n=JSON.parse(Controller.getInstance().getFromStorage("_apx_never_show_ids"));n=n.filter((function(e){return e!==t})),Controller.getInstance().persistToStorage("_apx_never_show_ids",JSON.stringify(n))}})),s.forEach((function(e){var n=removeLastPartOfId(e);if(resetQEStateonPull(e,t._siteId),checkForNeverShow(n)){var i=JSON.parse(Controller.getInstance().getFromStorage("_apx_never_show_ids"));i=i.filter((function(e){return e!==n})),Controller.getInstance().persistToStorage("_apx_never_show_ids",JSON.stringify(i))}})),d.forEach((function(e){c.includes(e.pid)||s.includes(e.pid)||h.push(e),c.includes(e.pid)&&null!==u&&null!=u&&u[e._id]&&(delete u[e._id],Controller.getInstance().persistToStorage(APX_TERMINATION_ID,JSON.stringify(u)))})),p[n]=h,Controller.getInstance().persistToStorage(APX_SYNC,encode(t._siteId,arrayBufferToString((new TextEncoder).encode(JSON.stringify(p)))))):(Logger$4.debug("Nothing to delete",n),h=d),s.length>0?(s.forEach((function(e){i+="&pids="+e})),t._fetchConfig(n,i,h,a)):(Logger$4.debug("Nothing to pull",n),a(n,{configs:h}))})),_defineProperty$1(this,"_fetchConfig",(function(e,n,i,o){Controller.getInstance().makeGetRequest(n,(function(n){if(isDefined(n.configs)&&Array.isArray(n.configs)&&0==n.configs.length)o("",{configs:[]});else if(isDefined(n.configs)&&Array.isArray(n.configs)){n.configs.forEach((function(n){var i,o,a,r,s,l=e===t._SURVEYS?"survey":"campaign";null===(i=Controller.getInstance())||void 0===i||i.logAppEvent("apx_config_received",{apx_nudge_type:e===t._SURVEYS?"survey":"campaign",apx_nudge_id:null==n?void 0:n._id,apx_nudge_name:null==n||null===(o=n.meta)||void 0===o?void 0:o.name,apx_variant_code:null!=n&&null!==(a=n.meta)&&void 0!==a&&a.isExperiment||null!=n&&null!==(r=n.meta)&&void 0!==r&&r.only_context?null==n||null===(s=n.meta)||void 0===s||null===(s=s.attr)||void 0===s?void 0:s.apx_variant_code:"TG"},void 0,!1,"apxor",l)}));var a=t._getSyncData(),r=[].concat(_toConsumableArray(i),_toConsumableArray(n.configs));a[e]=r,Controller.getInstance().persistToStorage(APX_SYNC,encode(t._siteId,arrayBufferToString((new TextEncoder).encode(JSON.stringify(a))))),o(e,{configs:r})}}),(function(){o(e,{configs:[]})}))})),_defineProperty$1(this,"handleNavigationEvent",(function(e){t._updateCountInStorage(e)})),_defineProperty$1(this,"_updateCountInStorage",(function(e){var n=t._getSyncData();if(isDefined(n.d)||(n.d={}),JSON.stringify(n.d).length>2097152)Logger$4.error("Sync : Reached maximum limit. Can't store further");else{var i=0;isDefined(n.d[e])&&(i=n.d[e]),i+=1,n.d[e]=i,Controller.getInstance().persistToStorage(APX_SYNC,encode(t._siteId,arrayBufferToString((new TextEncoder).encode(JSON.stringify(n)))))}})),_defineProperty$1(this,"getEventCount",(function(e){var n=t._getSyncData();return isDefined(n.d)&&isDefined(n.d[e])?n.d[e]:0}))})),errorFunction=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return function(){Logger$4.error("".concat(e,": Apxor SDK not initialised."))}},DefaultController={reportChunkOnVisibilityChange:errorFunction("reportChunkOnVisibilityChange"),logAppEvent:errorFunction("logAppEvent"),logClientEvent:errorFunction("logClientEvent"),logPageView:errorFunction("logPageView"),setUserId:errorFunction("setUserId"),setUserProperties:errorFunction("setUserProperties"),setSessionProperties:errorFunction("setSessionProperties"),setAppVersion:errorFunction("setAppVersion"),getClientId:errorFunction("getClientId"),getSessionId:errorFunction("getSessionId"),startSession:errorFunction("startSession"),endSession:errorFunction("endSession"),flattenJSON:errorFunction("flattenJSON"),setRedirectionHandler:errorFunction("setRedirectionHandler"),setInitFlag:errorFunction("setInitFlag"),dispatchValidationEvent:errorFunction("dispatchValidationEvent")},Controller=function(){function e(){var t=this;return _classCallCheck$1(this,e),_defineProperty$1(this,"_eventHandler",{}),_defineProperty$1(this,"_isInitialized",!1),_defineProperty$1(this,"_appInfo",{}),_defineProperty$1(this,"_deviceInfo",{}),_defineProperty$1(this,"_sdkInfo",{}),_defineProperty$1(this,"_sessionInfo",{}),_defineProperty$1(this,"_userAttributes",{}),_defineProperty$1(this,"_sessionAttributes",{}),_defineProperty$1(this,"_chunkDetails",{}),_defineProperty$1(this,"_chunkNumber",1),_defineProperty$1(this,"_currentNavigation",null),_defineProperty$1(this,"_isRunning",!1),_defineProperty$1(this,"_isEventMonitorRegistered",!1),_defineProperty$1(this,"_dataManager",{}),_defineProperty$1(this,"_customEventListener",null),_defineProperty$1(this,"_systemEventMonitor",{}),_defineProperty$1(this,"_sessionHandler",{}),_defineProperty$1(this,"_sync",{}),_defineProperty$1(this,"_idleTimeout",3600),_defineProperty$1(this,"_maxEventsSentCount",20),_defineProperty$1(this,"_chunkSendInterval",-1),_defineProperty$1(this,"_internalChunkSendInterval",2e4),_defineProperty$1(this,"_chunk502RetryTime",-1),_defineProperty$1(this,"_maxSessionsInStorage",10),_defineProperty$1(this,"_isSending",!1),_defineProperty$1(this,"_isFirstSession",!1),_defineProperty$1(this,"_last502Time",-1),_defineProperty$1(this,"_batchEvents",!1),_defineProperty$1(this,"_bulkUpload",!0),_defineProperty$1(this,"clientEvents",[]),_defineProperty$1(this,"_stopEventsFromConfig",[]),_defineProperty$1(this,"_clientEventsFromConfig",[]),_defineProperty$1(this,"_appEventsFromConfig",[]),_defineProperty$1(this,"_data",{}),_defineProperty$1(this,"_sessionCount",0),_defineProperty$1(this,"_redirectionHandler",null),_defineProperty$1(this,"_appEventsNoKpi",[]),_defineProperty$1(this,"_sendChunkOnEventsId",null),_defineProperty$1(this,"_sendChunkOnETAId",null),_defineProperty$1(this,"_blockChunkReporting",!1),_defineProperty$1(this,"_SDKStartedAfterPluginInit",!1),_defineProperty$1(this,"_eventsLogged",{}),_defineProperty$1(this,"initWaitTime",1500),_defineProperty$1(this,"version",""),_defineProperty$1(this,"_deviceId",""),_defineProperty$1(this,"_configHash",""),_defineProperty$1(this,"sessionStartTime",null),_defineProperty$1(this,"sessionId",""),_defineProperty$1(this,"_ltCountObj",{}),_defineProperty$1(this,"_pendingChunk",!1),_defineProperty$1(this,"_initializePlugins",(function(e){var n=t.config.plugins;if(isDefined(n)&&isDefined(n.length))for(var i=0;i<n.length;i++){var o=n[i];try{var a;null===(a=window[o])||void 0===a||a.init(e),Logger$4.debug("Controller : Initialized plugin ".concat(o))}catch(e){Logger$4.error("Controller : Failed to initialize plugin ".concat(o," with error ").concat(e))}}})),_defineProperty$1(this,"initialize",(function(e,n,i,o,a,r){if(!t._isInitialized){var s=function(){Logger$4.debug("Controller : On Site enabled in config"),t._getConfigHash(l,r)},l=function(e){t._configHash=e,Logger$4.debug("Controller : On config hash fetch"),t._waitForResourceLoad(e,c)},c=function(){Logger$4.info("Controller : Waiting for resources completed"),t._setWYSIWYGCookie(),t._initializeLTCount(),t._updateAppInfo(),t._deviceId=t._getDeviceId(),t._setDeviceInfo(),t._setDefaultUserProperties(),t._postUserInfo(),t._mergeStoredAndDefaultUserAttributes(),t._getStoredListOfEventsLogged(),t._setDefaultSessionProperties(),t._setInitialSessionState(),t._reinitialiseChunkDetails(),t._downloadConfig(t._configHash);var e=t._getTotalBackgroundTime();t._sessionHandler=new SessionHandler(e),t._registerSystemEventMonitor(),t.sendOldChunk(d)},d=function(){t._isRunning=!0,t._isInitialized=!0;var e=t.createANewChunk();t._dataManager.persistCurrentChunk(e),t._initializePlugins(p)},p=function(){var e,n;(t._dispatchSystemEvent(t.window.document.visibilityState),t.newSession&&(t.sessionStartTime=Date.now(),t.logAppEvent(APX_APP_OPENED,{time:formatDatetime(new Date)},void 0,!1,"apxor",""),t._resetCampaignSessionFrequency()),t.logPageView(t.window.location.pathname),t._sendChunkWithAtleastOneEvent(),t._registerIntervalBasedChunkReporting(),a(),t.setSessionProperties({apx_rtm_version:o.ApxorRTM._rtm_version}),null!==(e=o.ApxorRTM)&&void 0!==e&&e.isBadgePresent)&&(null===(n=o.ApxorRTM)||void 0===n||n.badgesLists.forEach((function(e){var n;t.isBadgeTriggerSatisfied(e)&&!document.getElementById("apxor-badge-container-".concat("-".concat(e).replaceAll(" ","").replace(/[^\w\s]/gi,"")))&&(null===(n=o.ApxorRTM)||void 0===n||null===(n=n.ceInstance)||void 0===n||n.notifyEventListener(makeEvent("apxor-badge-container-".concat("-".concat(e).replaceAll(" ","").replace(/[^\w\s]/gi,"")),{},void 0,t.getTimeElapsedInSession())))})))};t._waitForBrowserStorage((function(){Logger$4.debug("Controller : Wait for browser storage completed."),t._initializeStateVariables(e,n,i,o),t._setConfig(),t._initializeFieldsFromConfig(),t._sync.initialize(t.config,t.siteId),t._checkEnableStatusInConfig(s,r)}))}})),_defineProperty$1(this,"getSiteId",(function(){return t.siteId})),_defineProperty$1(this,"setRedirectionHandler",(function(e){t._isInitialized?t._redirectionHandler?t._redirectionHandler=e:(t._redirectionHandler=e,t.registerForEvent("CLIENT_EVENT",t._clientRedirectionHandler)):DefaultController.setRedirectionHandler()})),_defineProperty$1(this,"_clientRedirectionHandler",(function(e){e&&"REDIRECT"===e.name&&t._redirectionHandler(e.additional_info.url)})),_defineProperty$1(this,"makePostRequest",(function(e,n,i,o,a){t._api.makePostRequest(e,n,i,o,a)})),_defineProperty$1(this,"getDevInfo",(function(){return t._deviceInfo})),_defineProperty$1(this,"getListOfEventsLogged",(function(){return t._eventsLogged})),_defineProperty$1(this,"_updateListOfEventsLogged",(function(e,n){t._eventsLogged[e]=t._eventsLogged[e]||{first_logged_time:(new Date).toISOString()},t._eventsLogged[e]=_objectSpread2$1(_objectSpread2$1(_objectSpread2$1({},t._eventsLogged[e]),n),{},{latest_logged_time:(new Date).toISOString()}),t.persistToStorage(APX_EVENTS_LOGGED,encode(t.siteId,JSON.stringify(t._eventsLogged)))})),_defineProperty$1(this,"getInstallationTime",(function(){return t._dataManager.getInstallationTime(t.startTime)})),_defineProperty$1(this,"_waitForBrowserStorage",(function(e){Logger$4.debug("Controller : Checking if the browsers localstorage is available."),Storage.waitForBrowserStorage(e)})),_defineProperty$1(this,"_initializeStateVariables",(function(e,n,i,o){Logger$4.debug("Controller : Initializing the state variables"),t.window=o,t.startTime=n,t.siteId=e,t.clientConfig=i||{},t.initWaitTime=t.clientConfig.sdk_init_wait?1e3*t.clientConfig.sdk_init_wait:2e3,t._dataManager=new DataManager(t.siteId),t._api=new API(t.siteId,t.window),t._eventHandler=new EventHandler,t._sync=new Sync,t._sdkInfo=getSdkInfo(t.startTime),t.sessionStartTime=parseInt(t._dataManager.getItemOrDefault(APX_SESSION_START_TIME,n)),Logger$4.debug("Controller : session start time is ".concat(t.sessionStartTime)),Logger$4.debug("Controller : SDK start time is ".concat(t.startTime)),t.sessionId=t.getFromStorage(APX_SESSION_ID)})),_defineProperty$1(this,"_initializeLTCount",(function(){Logger$4.debug("Controller : Initializing the LT Count ");try{var e=t.getFromStorage(APX_LT_COUNT);if(e)t._ltCountObj=JSON.parse((new TextDecoder).decode(stringToArrayBuffer(decode(t.siteId,e))));else{t._ltCountObj={};var n=encode(t.siteId,arrayBufferToString((new TextEncoder).encode(JSON.stringify(t._ltCountObj))));t.persistToStorage(APX_LT_COUNT,n)}}catch(e){Logger$4.error("Controller : LT Count object parsing failed ".concat(e))}})),_defineProperty$1(this,"_setWYSIWYGCookie",(function(){var e=new URLSearchParams(location.search),n=e.get("_a")||e.get("_p")||e.get("_x")||e.get("_o")||e.get("_r");if(n||(n=t.getFromStorage("_apxor_url_param")),n)try{Logger$4.debug("Controller : Initialising in WYSIWYG mode");var i=decode(t.siteId,n),o=i=JSON.parse(i),a=o.app_id,r=o.expiry,s=Date.now();if(a===t.siteId&&s<=r){var l=new Date(r+6e4).toUTCString(),c=btoa("_apx_ew");document.cookie="_apx_ewc=".concat(c,"; expires=").concat(l),i.expiry=i.expiry+6e4,t.persistToStorage("_apx_ew",i,!0),Logger$4.debug("Controller : _apx_ewc cookie set")}e.delete("_a"),e.delete("_p"),e.delete("_x"),e.delete("_o"),e.delete("_r");var d=location.pathname,p=e.toString();""!==p&&(d+="?"+p),t.window.history.replaceState({},document.title,d),Logger$4.debug("Controller : Query params reset after removing dashboard embedded params")}catch(e){Logger$4.error("Controller : Error while setting the WYSIWYG cookie ".concat(e))}else Logger$4.debug("Controller : Not in WYSIWYG mode")})),_defineProperty$1(this,"_setConfig",(function(){Logger$4.debug("Controller : Setting the config");var e=t._dataManager.getExistingConfig();t._mergeConfigWithClientConfig(e)})),_defineProperty$1(this,"_mergeConfigWithClientConfig",(function(e){t.config=_objectSpread2$1(_objectSpread2$1({},e),t.clientConfig),Logger$4.debug("Controller : New config and client configs Configs merged")})),_defineProperty$1(this,"_initializeFieldsFromConfig",(function(){var e,n,i,o=t.config,a=o.version,r=void 0===a?"":a,s=o.bulk_upload,l=void 0===s||s,c=o.events_upload_time,d=o.idle_time_out,p=void 0===d?1800:d,u=o.events,h=void 0===u?{}:u,g=o.max_chunk_event_count,f=void 0===g?20:g,m=o.retry_time,_=o.max_sessions_in_storage,v=void 0===_?-1:_;t.version=t._validateAndGetAppVersion(r),t._bulkUpload=l,t._batchEvents=c>0,t._idleTimeout=isNumber(p)?p:1800,t._stopEventsFromConfig=null!==(e=h.stop)&&void 0!==e?e:[],t._clientEventsFromConfig=null!==(n=h.action)&&void 0!==n?n:[],t._appEventsFromConfig=null!==(i=h.app)&&void 0!==i?i:[],t._maxEventsSentCount=isDefined(f)&&isNumber(f)?f:20,t._chunkSendInterval=isDefined(c)&&isNumber(c)&&c>=1e3?c:-1,t._chunk502RetryTime=isDefined(m)&&isNumber(m)&&m>=1e3?m:-1,t._maxSessionsInStorage=isNumber(v)&&v>0?v:-1})),_defineProperty$1(this,"_validateAndGetAppVersion",(function(e){var n;if(isDefined(e))n=e,t._dataManager.persistAppVersion(n);else{var i=t._dataManager.getAppVersion();n=isDefined(i)?i:""}return n})),_defineProperty$1(this,"_checkEnableStatusInConfig",(function(e,n){if(Logger$4.debug("Controller : Checking if the Site is enabled existing config"),!t.config.enable)return Logger$4.debug("Controller : Site is disabled. Can't initialise"),t._downloadConfig(""),t._postUserInfo(),void n();e()})),_defineProperty$1(this,"_getConfigHash",(function(e,n){var i=t._dataManager.getExistingConfig(),o=t._dataManager.getItemOrDefault(APX_LAST_ENABLE_DISABLE_TIME,-1),a=i.ed_t_time;if(a>0&&o>0&&Math.abs(o-Date.now())<60*a*1e3)return Logger$4.debug("Controller : Reinitializing with in the throttling time."),t._dataManager.getItemOrDefault(APX_LAST_ENABLED_FLAG,!0)?void e(t._dataManager.getItemOrDefault(APX_CONFIG_HASH,"")):(Logger$4.debug("Controller : Site is not enabled from the last update. Can't initalise now. Recheck will happen after throttling time"),void n());t._checkEnableStatusFromServer(e,n)})),_defineProperty$1(this,"_checkEnableStatusFromServer",(function(e,n){Logger$4.debug("Controller : Getting the site enabled status from the server"),t.persistToStorage(APX_LAST_ENABLE_DISABLE_TIME,Date.now()),t._api.checkIfSDKEnabled((function(i){var o=i.enabled,a=i.hash;t.persistToStorage(APX_LAST_ENABLED_FLAG,o),o?(Logger$4.debug("Controller : Site is enabled"),e(a)):(Logger$4.debug("Controller : Site is disabled. Can't initialise the SDK"),t._isInitialized=!1,t._isRunning=!1,t._stopSDK(),n())}),(function(e){Logger$4.error("Controller : enabled-status API failed ".concat(e))}))})),_defineProperty$1(this,"_stopSDK",(function(){Logger$4.debug("Controller: Stopping the SDK");try{var e,n;t._isRunning=!1,t._isInitialized=!1,t._isSending=!1,null===(e=t._eventHandler)||void 0===e||e.tearDown(),null===(n=t._systemEventMonitor)||void 0===n||n.unregisterEvents()}catch(e){Logger$4.error("Controller : Failed to stop the SDK ".concat(e))}})),_defineProperty$1(this,"_waitForResourceLoad",(function(e,n){Logger$4.debug("Controller: Waiting ".concat(t.initWaitTime,"ms for all the resource loading to finish")),setTimeout((function(){n(e)}),t.initWaitTime)})),_defineProperty$1(this,"_getDeviceId",(function(){var e=t._dataManager.getUserId();if(!isDefined(e)){Logger$4.debug("Controller : Device id not found in localstorage");var n=t.config.client_id;isDefined(n)&&""!==n?(Logger$4.debug("Controller : client id from clientconfig is the deviceid"),e=n):(Logger$4.debug("Controller : Generated a new device id. This is a new device now"),e=uuid()),t._setNewUserFlags(e)}return Logger$4.debug("Controller : Device id is ".concat(e)),t._deviceId=e,e})),_defineProperty$1(this,"_setNewUserFlags",(function(e){t._dataManager.clearStorage(),t._dataManager.persistUserId(e),t._dataManager.persistInstallationTime(Date.now()),t._sessionInfo=_objectSpread2$1(_objectSpread2$1({},t._sessionInfo),{},{is_first_session:!0}),t._isFirstSession=!0})),_defineProperty$1(this,"_setInitialSessionState",(function(){Logger$4.debug("Controller : Setting the session state for session if ".concat(t.sessionId)),t.sessionId||(t.newSession=!0,t.sessionId=uuid(),t.persistToStorage(APX_SESSION_ID,t.sessionId),t.persistToStorage(APX_SESSION_START_TIME,t.sessionStartTime))})),_defineProperty$1(this,"_setDeviceInfo",(function(){var e=getDeviceInfo(t.window),n=e.device,i=e.os,o=e.browser_version,a=e.browser,r=e.dimensions,s=e.dpi,l=e.dimensions_in_pixels;t._deviceInfo=makeDeviceInfo(t._deviceId,n,r,i,s,l,a,o)})),_defineProperty$1(this,"_setDefaultUserProperties",(function(){Logger$4.debug("Controller : Setting the default User attributes");var e=_objectSpread2$1({},t._deviceInfo),n=getDefaultUserProperties(t.window,e);t._userAttributes=_objectSpread2$1(_objectSpread2$1({},t._userAttributes),n)})),_defineProperty$1(this,"_setDefaultSessionProperties",(function(){Logger$4.debug("Controller : Setting the default session attributes");var e=getDefaultSessionProperties(t.window);t._sessionAttributes=_objectSpread2$1(_objectSpread2$1({},t._sessionAttributes),e)})),_defineProperty$1(this,"_mergeStoredAndDefaultUserAttributes",(function(){Logger$4.debug("Controller : Merging the stored and default user attributes");var e=t.getFromStorage(APX_USER_ATTR_KEY,!0);if(isDefined(e)){var n,i=getJSONOrNull(e);if(null===i)try{i=JSON.parse(decode(t.siteId,e))}catch(e){i={}}t._userAttributes=_objectSpread2$1(_objectSpread2$1({},null!==(n=i)&&void 0!==n?n:{}),t._userAttributes)}})),_defineProperty$1(this,"_getStoredListOfEventsLogged",(function(){var e=t.getFromStorage(APX_EVENTS_LOGGED,!0);if(isDefined(e)){var n,i=getJSONOrNull(e);if(null===i)try{i=JSON.parse(decode(t.siteId,e))}catch(e){i={}}t._eventsLogged=_objectSpread2$1({},null!==(n=i)&&void 0!==n?n:{})}})),_defineProperty$1(this,"_reinitialiseChunkDetails",(function(){t._chunkDetails=_objectSpread2$1(_objectSpread2$1({},DEFAULT_CHUNK_DETAILS),{},{user_attributes:_objectSpread2$1({},t._userAttributes),session_attributes:_objectSpread2$1({},t._sessionAttributes)}),t._dataManager.persistOldChunkDetails(t._chunkDetails)})),_defineProperty$1(this,"sendOldChunk",(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(){};Logger$4.debug("Controller : Sending the old chunk to the server");var n=t._dataManager.getOldChunk();if(isDefined(n)){var i,o,a,r,s,l,c=_objectSpread2$1({},t._chunkDetails);if(t._chunkDetails=_objectSpread2$1({},n.chunk_details)||{},(null===(i=t._chunkDetails)||void 0===i||null===(i=i.app_events)||void 0===i?void 0:i.length)>0||t._addAndClearUnsentEvents(),!((null===(o=t._chunkDetails)||void 0===o||null===(o=o.app_events)||void 0===o?void 0:o.length)>0))return t._chunkDetails=_objectSpread2$1({},c),void e();var d=null!==(a=null===(r=n=_objectSpread2$1(_objectSpread2$1({},n),{},{chunk_details:_objectSpread2$1({},t._chunkDetails)}))||void 0===r||null===(r=r.session_info)||void 0===r?void 0:r.id)&&void 0!==a?a:"1",p=null!==(s=null===(l=n)||void 0===l||null===(l=l.chunk_meta)||void 0===l?void 0:l.number)&&void 0!==s?s:1;t._dataManager.persistCurrentChunk(n),t._api.postChunk(n,(function(){t._updateChunkNumberMap(d,p+1),Logger$4.debug("Controller : Old chunk reporting successful."),t._dataManager.removeOldChunk(),t._dataManager.removeOldChunkDetails(),t._reinitialiseChunkDetails(),t.createNewChunkAndPersist(),e()}),(function(){Logger$4.debug("Controller : Old chunk reporting failed."),e()}))}else e()})),_defineProperty$1(this,"_addAndClearUnsentEvents",(function(){var e=t._dataManager.getOldChunkDetails();if(isDefined(e)){var n=e.app_events,i=e.navigation_events,o=e.system_events,a=e.user_events;t._chunkDetails.app_events=[].concat(_toConsumableArray(t._chunkDetails.app_events||[]),_toConsumableArray(n)),t._chunkDetails.navigation_events=[].concat(_toConsumableArray(t._chunkDetails.navigation_events||[]),_toConsumableArray(i)),t._chunkDetails.system_events=[].concat(_toConsumableArray(t._chunkDetails.system_events||[]),_toConsumableArray(o)),t._chunkDetails.user_events=[].concat(_toConsumableArray(t._chunkDetails.user_events||[]),_toConsumableArray(a)),t._dataManager.removeOldChunkDetails()}})),_defineProperty$1(this,"_updateChunkNumberMap",(function(e,n){var i=t._dataManager.getSessionsChunkNumberMap();i[e]=n,t._dataManager.persistSessionsChunkNumberMap(i),t._chunkNumber=n})),_defineProperty$1(this,"createNewChunkAndPersist",(function(){var e=t.createANewChunk();return t._dataManager.persistCurrentChunk(e),e})),_defineProperty$1(this,"createANewChunk",(function(){var e=isDefined(t.config.name)?t.config.name:"",n=isDefined(t.config.domain)?t.config.domain:"",i=t._dataManager.getNewChunk(t.startTime,t.sessionStartTime,t.sessionId,t._idleTimeout),o=i.chunk,a=o.session_info,r=o.app_info,s=o.sdk_info,l=o.chunk_details,c=o.chunk_meta,d=l.session_attributes,p=l.user_attributes;return t._sessionInfo=_objectSpread2$1(_objectSpread2$1({},t._sessionInfo),a),t._sessionInfo.is_first_session=t._isFirstSession,t._sdkInfo=s,t._appInfo=_objectSpread2$1(_objectSpread2$1({},r),{},{app_name:e,bundle_id:n,app_version:""+t.version}),t._chunkNumber=c.number,t._userAttributes=_objectSpread2$1(_objectSpread2$1({},t._userAttributes),p),t._sessionAttributes=_objectSpread2$1(_objectSpread2$1({},t._sessionAttributes),d),t._chunkDetails=l,t._addAndClearUnsentEvents(),t.newSession=i.is_new_session,t.newSession||t._setSessionIdFromChunk(o),{sdk_info:t._sdkInfo,session_info:t._sessionInfo,app_info:t._appInfo,device_info:t._deviceInfo,chunk_details:l,chunk_meta:c}})),_defineProperty$1(this,"_setSessionIdFromChunk",(function(e){var n=e.session_info.id;n&&(t.sessionId=n,t.persistToStorage(APX_SESSION_ID,t.sessionId))})),_defineProperty$1(this,"_getTotalBackgroundTime",(function(){var e=t._sessionInfo,n=e.total_duration,i=e.duration;return n>i?n-i:0})),_defineProperty$1(this,"_downloadConfig",(function(e){if(Logger$4.debug("Controller : Fetch a new config"),t._canFetchConfig(e)){var n=t.config.sct_time,i=t._dataManager.getItemOrDefault(APX_LAST_CONFIG_TIME,-1);if(n>0&&i>0)if(Math.abs(Date.now()-i)<n)return void Logger$4.debug("Controller : No need to fetch config. Did not pass the throttle time");t.persistToStorage(APX_LAST_CONFIG_TIME,Date.now()),t._api.getConfig((function(e){var n;Logger$4.debug("Controller : New config fetched"),t._dataManager.persistConfig(e),t.persistToStorage(APX_CONFIG_HASH,null!==(n=e.hash)&&void 0!==n?n:md5(e)),t._mergeConfigWithClientConfig(e),t._updateAppInfo()}),(function(e){0!==e&&Logger$4.error("Controller : Failed to fetch config")}))}else Logger$4.debug("Controller : No need to fetch config. No change in hash")})),_defineProperty$1(this,"_postUserInfo",(function(){Logger$4.debug("Controller : Posting user info");var e=t._sdkInfo.sdk_version,n={sdk_version:JSON.stringify(e),app_info:t._appInfo,device_info:t._deviceInfo,user_attributes:t._userAttributes},i=md5(n),o=t._dataManager.getItemOrDefault(APX_USER_INFO_HASH,"");i!==o?t._api.postUserInfo(n,(function(){Logger$4.debug("Controller : Posted user info. Persisting the hash to localstorage"),t.persistToStorage(APX_USER_INFO_HASH,i)})):Logger$4.debug("Controller : No need to post user info. No change in it")})),_defineProperty$1(this,"_canFetchConfig",(function(e){return""===e||t._dataManager.getItemOrDefault(APX_CONFIG_HASH,"")!==e})),_defineProperty$1(this,"_dispatchSystemEvent",(function(e){Logger$4.debug("Controller : Dispatching SYSTEM_EVENT");var n=makeSystemEvent(e,t.getTimeElapsedInSession());t.dispatchEvent(SYSTEM_EVENT,n)})),_defineProperty$1(this,"_resetCampaignSessionFrequency",(function(){Logger$4.debug("Controller : Resetting the session frequncy of all the campaigns to 0");var e={};try{var n=t.getFromStorage(QE_STATE);isDefined(n)&&(e=JSON.parse(decode(t.siteId,n))),Object.entries(e).forEach((function(t){var n=_slicedToArray$1(t,1)[0];return e[n].SESSION=0}))}catch(t){e={},Logger$4.error("Controller : Can't reset campaign limits:".concat(t))}t.persistToStorage(QE_STATE,e,!0),t.window.ApxorRTM.resetFrequencyCounts()})),_defineProperty$1(this,"_registerSystemEventMonitor",(function(){Logger$4.debug("Registering a handler for the system events"),executeIfDOMReady(t.window,(function(){t._isEventMonitorRegistered||(t._executeBeforeUnload(),t._systemEventMonitor=new SystemEventMonitor(!1),t._isEventMonitorRegistered=!0)}))})),_defineProperty$1(this,"_executeBeforeUnload",(function(){var e=!1;executeBeforeUnload(window,(function(){(Logger$4.debug("Controller : Executing before unload"),e)||t._isRunning&&(e=!0,window.document.visibilityState===VISIBLE&&(t._endNavigation(!0),t._dispatchSystemEvent("hidden")),clearInterval(t._sendChunkOnEventsId),clearInterval(t._sendChunkOnETAId),t._bulkUpload&&t._dataManager.persistOldChunkDetails(t._chunkDetails),t._systemEventMonitor.unregisterEvents())}))})),_defineProperty$1(this,"_registerIntervalBasedChunkReporting",(function(){Logger$4.debug("Controller : Registering the handlers for chunk reporting"),clearInterval(t._sendChunkOnETAId),t._sendChunkOnETAId=setInterval((function(){t._sendChunkWithAtleastOneEvent()}),t._internalChunkSendInterval),t._batchEvents&&(clearInterval(t._sendChunkOnEventsId),t._sendChunkOnEventsId=setInterval((function(){t._sendChunkWithMaxedOutEvents()}),t._chunkSendInterval))})),_defineProperty$1(this,"_sendChunkWithAtleastOneEvent",(function(){var e=t._chunkDetails,n=e.app_events,i=e.navigation_events;n.length+i.length>0&&!t._blockChunkReporting&&t._prepareAndReportChunk()})),_defineProperty$1(this,"_sendChunkWithMaxedOutEvents",(function(){var e=t._chunkDetails,n=e.app_events,i=e.navigation_events,o=n.length+i.length;(!t._bulkUpload&&o>0||t._bulkUpload&&o>=t._maxEventsSentCount)&&t._prepareAndReportChunk()})),_defineProperty$1(this,"_prepareAndReportChunk",(function(){Logger$4.debug("Controller : Preparing and reporting chunk");var e=t._prepareChunk(t._chunkDetails);t._reportChunk(e,!1)})),_defineProperty$1(this,"_prepareChunk",(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Logger$4.debug("Controller : Preparing chunk"),t._updateDuration();var n={id:t.sessionId+":"+t._chunkNumber,number:t._chunkNumber,reporting_times:[Date.now()]};return e=_objectSpread2$1(_objectSpread2$1({},e),{},{user_attributes:t._userAttributes,session_attributes:t._sessionAttributes}),{sdk_info:t._sdkInfo,session_info:t._sessionInfo,app_info:t._appInfo,device_info:t._deviceInfo,chunk_meta:n,chunk_details:e}})),_defineProperty$1(this,"_updateDuration",(function(){Logger$4.debug("Controller : Updating the foreground time");var e=t.getSDKRunningTimeInSec(),n=e;e-=t._sessionHandler.getTotalBackgroundTime(),t._sessionInfo=_objectSpread2$1(_objectSpread2$1({},t._sessionInfo),{},{duration:toDecimalPoints(e),total_duration:toDecimalPoints(n)})})),_defineProperty$1(this,"_reportChunk",(function(e){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(){};if(Logger$4.debug("Controller : Reporting chunk"),t._isSending)t._pendingChunk=!0;else if(t._isSending||t._chunk502RetryTime>0&&-1!==t._last502Time&&Date.now()-t._last502Time<t._chunk502RetryTime)t._reinitialiseChunkDetails();else{var o=e.chunk_details,a=o.app_events,r=o.system_events,s=o.navigation_events,l=o.user_events;if(a.length<1&&r.length<1&&s.length<1&&l.length<1)return Logger$4.debug("Controller : Chunk not sent. No events in the chunk"),t._isSending=!1,void i();t._isSending=!0,t._updateChunkNumberMap(t._sessionInfo.id,t._chunkNumber+1),t._dataManager.removeOldChunkDetails(),t._dataManager.removeOldChunk(),t._reinitialiseChunkDetails(),n?(t._isSending=!1,t._dataManager.persistOldChunk(e),i()):(t._dataManager.persistCurrentChunk(e),t._api.postChunk(e,(function(){if(Logger$4.debug("Controller : Chunk successfully sent"),t._isSending=!1,t._last502Time=-1,i(),t._pendingChunk){t._pendingChunk=!1;var e=t._prepareChunk(t._chunkDetails);t._reportChunk(e)}}),(function(n){Logger$4.debug("Controller : Chunk sending failed"),0!==n&&(t._isSending=!1,n>=500&&(t._last502Time=Date.now()),413!==n&&417!==n&&t._dataManager.persistOldChunk(e),i())})))}})),_defineProperty$1(this,"setUserId",(function(e){t._isInitialized?t._isRunning?isUndefined(e)||(Logger$4.debug("Controller : User id set"),t.setUserProperties({custom_user_id:e})):Logger$4.warn("Apxor SDK is not running"):DefaultController.setUserId()})),_defineProperty$1(this,"setUserProperties",(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n={};if(t._isInitialized)if(t._isRunning){if(Object.keys(e).length>0){if(n=getFlatMapDiff(e,t._userAttributes),t.isTestDevice()&&Object.keys(n).length>0){var i=Object.keys(n);i.forEach((function(e){t.logAppEvent("apx_property_updated",{apx_property_type:"user",apx_property_name:e,apx_property_old_value:t._userAttributes[e]||"",apx_property_updated_value:n[e]},void 0,!1,"apxor","")}))}t._userAttributes=_objectSpread2$1(_objectSpread2$1({},t._userAttributes),e);try{Logger$4.debug("Controller : User properties set"),t.persistToStorage(APX_USER_ATTR_KEY,encode(t.siteId,JSON.stringify(t._userAttributes)))}catch(e){Logger$4.debug("Controller : Error while setting the use properties ".concat(e))}}}else Logger$4.warn("Apxor SDK is not running");else DefaultController.setUserProperties()})),_defineProperty$1(this,"setSessionProperties",(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n={};if(t._isInitialized)if(t._isRunning){if(Object.keys(e).length>0){if(Logger$4.debug("Controller : Session properties set"),n=getFlatMapDiff(e,t._sessionAttributes),t.isTestDevice()&&Object.keys(n).length>0){var i=Object.keys(n);i.forEach((function(e){t.logAppEvent("apx_property_updated",{apx_property_type:"session",apx_property_name:e,apx_property_old_value:t._sessionAttributes[e]||"",apx_property_updated_value:n[e]},void 0,!1,"apxor","")}))}t._sessionAttributes=_objectSpread2$1(_objectSpread2$1({},t._sessionAttributes),e)}}else Logger$4.warn("Apxor SDK is not running");else DefaultController.setSessionProperties()})),_defineProperty$1(this,"setAppVersion",(function(e){t._isInitialized?t._isRunning?t.version=e:Logger$4.warn("Apxor SDK is not running"):DefaultController.setAppVersion()})),_defineProperty$1(this,"_updateAppInfo",(function(){Logger$4.debug("Controller : Updating the App info");var e=t.config,n=e.name,i=void 0===n?"":n,o=e.domain,a=void 0===o?t.window.location.host:o,r=t._dataManager.getInstallationTime(t.startTime),s=getAppMode(t.window),l=isDefined(t.clientConfig.version)?""+t.clientConfig.version:t._dataManager.getAppVersion(),c=i;""===i&&"Unknown"===(c=getPageTitle(t.window))&&(c=""),t._appInfo=makeAppInfo(c,a,r,s,l)})),_defineProperty$1(this,"getEventCount",(function(e){var n=-1;return t.clientEvents.forEach((function(t){t.name===e&&(n+=1)})),-1===n?t._sync.getEventCount(e):n})),_defineProperty$1(this,"clearNavigation",(function(){t._endNavigation(),t._currentNavigation=null})),_defineProperty$1(this,"_endNavigation",(function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];Logger$4.debug("Controller : Ending the navigation"),isDefined(t._currentNavigation)&&(t._currentNavigation.duration=toDecimalPoints(t.getSDKRunningTimeInSec()-t._currentNavigation.transition_time),t.dispatchEvent(NAVIGATION_EVENT,_objectSpread2$1({},t._currentNavigation),e))})),_defineProperty$1(this,"getSessionId",(function(){return t.sessionId})),_defineProperty$1(this,"getDeviceId",(function(){return t._isInitialized?t._isRunning?t._deviceId:(Logger$4.warn("Controller : Apxor SDK is not running"),null):(DefaultController.getClientId(),null)})),_defineProperty$1(this,"reportChunkOnVisibilityChange",(function(){var e;if(t._isInitialized){var n=t._prepareChunk(t._chunkDetails),i=t.siteId,o=JSON.stringify(n);(null===(e=t._chunkDetails)||void 0===e?void 0:e.app_events.length)>0&&(Logger$4.debug("Reporting a chunk on visibility change with sendBeacon"),t._dataManager.removeOldChunkDetails(),t._dataManager.persistOldChunk(n),navigator.sendBeacon("https://server.apxor.com/v2/api/".concat(i,"/text-chunks?appId=").concat(i,"&isTestDevice=").concat(t.isTestDevice()),o))}})),_defineProperty$1(this,"_incrementLtCount",(function(e){if(isNotDefined(t._ltCountObj[e])&&0!==t._ltCountObj[e])t._ltCountObj[e]=0;else{var n=t._ltCountObj[e];n+=1,t._ltCountObj[e]=n}var i=encode(t.siteId,arrayBufferToString((new TextEncoder).encode(JSON.stringify(t._ltCountObj))));t.persistToStorage(APX_LT_COUNT,i)})),_defineProperty$1(this,"logAppEvent",(function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2?arguments[2]:void 0,o=arguments.length>3&&void 0!==arguments[3]&&arguments[3],a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"customer",r=arguments.length>5?arguments[5]:void 0;if(!t._isInitialized||!t._isRunning)return Logger$4.warn("Controller : Can't log App event. SDK not initialised"),void DefaultController.logAppEvent();try{if(isString(e)&&isObject(n)){var s=e.replace("'","").replace("’","");t._incrementLtCount(s),t._appEventsNoKpi=[].concat(_toConsumableArray(t._appEventsNoKpi),[e]);var l=t._ltCountObj[s]||0;n=_objectSpread2$1(_objectSpread2$1({},n),{},{apx_lt_count:l}),t._updateListOfEventsLogged(e,n),n=_objectSpread2$1(_objectSpread2$1({},n),{},{first_logged_time:t._eventsLogged[e].first_logged_time,latest_logged_time:t._eventsLogged[e].latest_logged_time});var c=makeEvent(e,getCleanedProperties(n),i,t.getTimeElapsedInSession()),d=APP_EVENT;if(t._stopEventsFromConfig.includes(e))return;t._clientEventsFromConfig.includes(e)&&(d=CLIENT_EVENT),Logger$4.debug("Controller : Logging event ".concat(e)),t._updateListOfEventsLogged(e,n),t.dispatchEvent(d,c,!1,o,a,r)}else Logger$4.debug("Controller : Invalid App Event ".concat(e))}catch(e){Logger$4.error("LT Count object parsing failed ".concat(e))}})),_defineProperty$1(this,"logClientEvent",(function(e,n){if(!t._isInitialized||!t._isRunning)return Logger$4.warn("Controller : Can't log client event. SDK not initialised"),void DefaultController.logClientEvent();var i=t._dataManager.getltCount(e);n=_objectSpread2$1(_objectSpread2$1({},n),{},{apx_lt_count:i});var o=makeEvent(e,getCleanedProperties(n),null,t.getTimeElapsedInSession()),a=CLIENT_EVENT;t._stopEventsFromConfig.includes(e)||(t._appEventsFromConfig.includes(e)&&(a=APP_EVENT),o?(Logger$4.debug("Controller : Logging client event ".concat(e)),t._updateListOfEventsLogged(e,n),t.dispatchEvent(a,o)):Logger$4.debug("Controller : Invalid client event ".concat(e)))})),_defineProperty$1(this,"logPageView",(function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t.getTimeElapsedInSession();if(!t._isInitialized||!t._isRunning)return Logger$4.warn("Controller : Can't log page event. SDK not initialised"),void DefaultController.logPageView();if("string"==typeof e&&e&&e.length>0){var i=toDecimalPoints(n),o=makeNavigationEvent(e,getPageTitle(t.window),0,i);t._sync.handleNavigationEvent(e),isDefined(t._currentNavigation)?(t._endNavigation(),t._currentNavigation=o):t._currentNavigation=o,t.logAppEvent(APX_PAGE_OPENED,{time:formatDatetime(new Date),navigation_id:e},void 0,!1,"apxor",""),Logger$4.debug("logPageView: page view is logged ",e)}else Logger$4.warn("Controller : Can't log page event as pathname is empty")})),_defineProperty$1(this,"dispatchValidationEvent",(function(e,n){if(!t._isInitialized||!t._isRunning)return Logger$4.warn("Controller : Can't log client event. SDK not initialised"),void DefaultController.dispatchValidationEvent();var i=new CustomEvent("apxValidationEvent",{detail:{name:e,additionalInfo:n}});window.dispatchEvent(i)})),_defineProperty$1(this,"setApxorEventListener",(function(e){t._customEventListener=e})),_defineProperty$1(this,"dispatchEvent",(function(e,n){var i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],o=arguments.length>3&&void 0!==arguments[3]&&arguments[3],a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"customer",r=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"";t.isTestDevice()&&(o=!0),Logger$4.debug("Controller : Dispatching Event ".concat(n.name)),t._dataManager.updateRetainedDayCount(Date.now());var s=!1,l=function(){var l=t._chunkDetails.app_events;switch(s&&(n.time=t.getTimeElapsedInSession()),e){case APP_EVENT:t._chunkDetails=_objectSpread2$1(_objectSpread2$1({},t._chunkDetails),{},{app_events:[].concat(l,n)});break;case CLIENT_EVENT:t.clientEvents.push(n),t.isTestDevice()&&(t._chunkDetails=_objectSpread2$1(_objectSpread2$1({},t._chunkDetails),{},{app_events:[].concat(l,n)}))}var c=_objectSpread2$1({},n);if(c.loggedBy=a,c.apx_nudge_type=r,t._eventHandler.notifyListeners(e,c),!s&&e!==CLIENT_EVENT){t._chunkDetails=_objectSpread2$1(_objectSpread2$1({},t._chunkDetails),{},{user_attributes:_objectSpread2$1({},t._userAttributes),session_attributes:_objectSpread2$1({},t._sessionAttributes)});var d=t._prepareChunk(t._chunkDetails,e);if(t._dataManager.persistOldChunkDetails(t._chunkDetails),t._dataManager.persistOldChunk(d),!0!==o)if(t._bulkUpload){if(l.length+1<t._maxEventsSentCount)return;t._reportChunk(d,i)}else i||e!==APP_EVENT||t._batchEvents||t._reportChunk(d,i);else t._reportChunk(d,i)}},c=function(){t.persistToStorage(APX_LAST_EVENT_TIME,Date.now()),l()},d=function(){s=!0,t.startNewSession(Date.now(),c)};if(e===APP_EVENT){var p=Date.now(),u=t.getFromStorage(APX_LAST_EVENT_TIME);if(u=Number(u),isNumber(u)&&u>0&&Math.round(millisToSeconds(p-u))>t._idleTimeout?t.endSession(!0,d):(t.persistToStorage(APX_LAST_EVENT_TIME,Date.now()),l()),t._customEventListener){var h=void 0!==n.additional_info.campaign_type?n.additional_info.campaign_type:"",g=void 0!==n.additional_info.id?n.additional_info.id:"",f=void 0!==n.additional_info.apx_survey_id?n.additional_info.apx_survey_id:"";if(showEventsList.includes(n.name))t._customEventListener.onEvent("apx_campaign_show",{nudge_type:"".concat(h),nudge_id:"".concat(g),timestamp:Date.now(),device_id:t.getDeviceId(),user_id:t._dataManager.getUserId(),attributes:n.additional_info});else if(dismissEventsList.includes(n.name))t._customEventListener.onEvent("apx_campaign_dismiss",{nudge_type:"".concat(h),nudge_id:"".concat(g),timestamp:Date.now(),device_id:t.getDeviceId(),user_id:t._dataManager.getUserId(),attributes:n.additional_info});else if(actionEventsList.includes(n.name))t._customEventListener.onEvent("apx_campaign_action",{nudge_type:"".concat(h),nudge_id:"".concat(g),timestamp:Date.now(),device_id:t.getDeviceId(),user_id:t._dataManager.getUserId(),attributes:n.additional_info});else if(surveyShowEventsList.includes(n.name))t._customEventListener.onEvent("apx_survey_show",{nudge_type:"".concat(h),nudge_id:"".concat(f),timestamp:Date.now(),device_id:t.getDeviceId(),user_id:t._dataManager.getUserId(),attributes:n.additional_info});else if(surveyDismissEventsList.includes(n.name))t._customEventListener.onEvent("apx_survey_dismiss",{nudge_type:"".concat(h),nudge_id:"".concat(f),timestamp:Date.now(),device_id:t.getDeviceId(),user_id:t._dataManager.getUserId(),attributes:n.additional_info});else if(surveyActionEventsList.includes(n.name))t._customEventListener.onEvent("apx_survey_action",{nudge_type:"".concat(h),nudge_id:"".concat(f),timestamp:Date.now(),device_id:t.getDeviceId(),user_id:t._dataManager.getUserId(),attributes:n.additional_info});else{var m=/^(InLine_|InApp_)[a-zA-Z0-9]+_Clicked$/,_=/^Survey_[a-zA-Z0-9]+_Clicked$/;m.test(n.name)?t._customEventListener.onEvent("apx_campaign_action",{nudge_type:"".concat(h),nudge_id:"".concat(n.additional_info.id),timestamp:Date.now(),device_id:t.getDeviceId(),user_id:t._dataManager.getUserId(),attributes:n.additional_info}):_.test(n.name)&&t._customEventListener.onEvent("apx_survey_action",{nudge_type:"".concat(h),nudge_id:"".concat(f),timestamp:Date.now(),device_id:t.getDeviceId(),user_id:t._dataManager.getUserId(),attributes:n.additional_info})}}}else l()})),_defineProperty$1(this,"startNewSession",(function(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Date.now(),i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){},o=arguments.length>2&&void 0!==arguments[2]&&arguments[2];t._isInitialized||o?(t._isRunning||(t.sessionId=uuid(),Logger$4.debug("Controller : New session started with id ".concat(t.sessionId)),t.persistToStorage(APX_SESSION_ID,t.sessionId),t._sessionCount=null!==(e=t.getFromStorage(REATINED_SESSIONS))&&void 0!==e?e:0,t._sessionCount=Number(t._sessionCount)+1,t.persistToStorage(REATINED_SESSIONS,t._sessionCount),t.sessionStartTime=n,t.persistToStorage(APX_SESSION_START_TIME,t.sessionStartTime),t._sessionHandler.reset(),t.createNewChunkAndPersist(),t._systemEventMonitor=new SystemEventMonitor(t.config),t._isRunning=!0,t._resetCampaignSessionFrequency()),i()):DefaultController.startSession()})),_defineProperty$1(this,"endSession",(function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){};if(t._isInitialized)if(t._isRunning){e||t._endNavigation();var i=_objectSpread2$1(_objectSpread2$1({},t._chunkDetails),{},{user_attributes:_objectSpread2$1({},t._userAttributes),session_attributes:_objectSpread2$1({},t._sessionAttributes)}),o=t._prepareChunk(i);t._dataManager.removeOldChunkDetails();var a=function(){t._dataManager.clearCurrentChunk(),t._sessionHandler.reset(),isDefined(t._systemEventMonitor)&&t._isEventMonitorRegistered&&t._systemEventMonitor.unregisterEvents(),unregisterBeforeUnloadCallback(document),t._isRunning=!1,n(),Logger$4.debug("Controller : Current session ended")};t._chunk502RetryTime>0&&t._last502Time>0?(t._dataManager.persistOldChunk(o),a()):t._reportChunk(o,!1,a)}else Logger$4.warn("Apxor SDK is not running. Please make sure to call 'startSession'");else DefaultController.endSession()})),_defineProperty$1(this,"resetUserProperties",(function(){t._dataManager.resetUserProperties();var e=getDefaultUserProperties(t.window,t.getDevInfo());t._userAttributes={},t.setUserProperties(e)})),_defineProperty$1(this,"resetSessionProperties",(function(){var e=getDefaultSessionProperties(t.window);t._sessionAttributes={},t.setSessionProperties(e)})),_defineProperty$1(this,"persistToStorage",(function(e,n){var i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:LOCAL_STORAGE,a=n;i&&isObject(a)&&(a=encode(t.siteId,JSON.stringify(a))),t._dataManager.persist(e,a,o)})),_defineProperty$1(this,"getFromStorage",(function(e){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:LOCAL_STORAGE;return t._dataManager.getItem(e,n,i)})),_defineProperty$1(this,"getValueOrDefault",(function(e,n){var i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:LOCAL_STORAGE;return t._dataManager.getItemOrDefault(e,n,i,o)})),_defineProperty$1(this,"getSessionInfo",(function(){return t._sessionInfo})),_defineProperty$1(this,"getUserAttributes",(function(){return t._userAttributes})),_defineProperty$1(this,"getSessionAttributes",(function(){return t._sessionAttributes})),_defineProperty$1(this,"makeGetRequest",(function(e,n,i){t._api.makeGetRequest(e,n,i)})),_defineProperty$1(this,"fetchConfiguration",(function(e,n,i,o){t._sync.fetchConfiguration(e,n,i,o)})),_defineProperty$1(this,"flattenJSON",(function(e){return getCleanedProperties(e,2)})),_defineProperty$1(this,"registerForEvent",(function(e,n){t._eventHandler.registerForEvent(e,n)})),_defineProperty$1(this,"unregisterFromEvent",(function(e,n){t._eventHandler.unregisterFromEvent(e,n)})),_defineProperty$1(this,"getSDKRunningTimeInSec",(function(){return millisToSeconds(Date.now()-t.startTime)})),_defineProperty$1(this,"getTimeElapsedInSession",(function(){var e=Date.now();return Logger$4.debug("Controller : Time elapsed in session is ".concat((e-t.sessionStartTime)/1e3,"sec")),millisToSeconds(e-t.sessionStartTime)})),_defineProperty$1(this,"setBlockChunkReportingFlag",(function(e){t._blockChunkReporting=e})),_defineProperty$1(this,"isTestDevice",(function(){try{var e=t.getFromStorage("_apx_td",!0);return!(!isDefined(e)||!isDefined(e.id))}catch(e){return!1}})),_defineProperty$1(this,"persistTerminationInfoLocally",(function(e){var n;null===t.getFromStorage(APX_TERMINATION_ID)&&t.persistToStorage(APX_TERMINATION_ID,JSON.stringify({}));var i=JSON.parse(t.getFromStorage(APX_TERMINATION_ID));i[e]||(i[e]={startDate:"",_startTime:"",goalAcheived:!1}),null!==(n=i[e])&&void 0!==n&&n.goalAcheived||(i[e].goalAcheived=!0),t.persistToStorage(APX_TERMINATION_ID,JSON.stringify(i))})),_defineProperty$1(this,"persistStartDateInfoLocally",(function(e){var n,i;null===t.getFromStorage(APX_TERMINATION_ID)&&t.persistToStorage(APX_TERMINATION_ID,JSON.stringify({}));var o=JSON.parse(t.getFromStorage(APX_TERMINATION_ID));o[e]||(o[e]={startDate:getDateInMMDDYYYY(),_startTime:_getTime(),goalAcheived:!1}),""===!(null!==(n=o[e])&&void 0!==n&&n.startDate)&&(o[e].startDate=getDateInMMDDYYYY()),""===!(null!==(i=o[e])&&void 0!==i&&i._startTime)&&(o[e]._startTime=_getTime()),t.persistToStorage(APX_TERMINATION_ID,JSON.stringify(o))})),_defineProperty$1(this,"isBadgeTriggerSatisfied",(function(e){var n,i;if(null===t.getFromStorage(APX_TERMINATION_ID))return!1;var o=JSON.parse(t.getFromStorage(APX_TERMINATION_ID));return!!o[e]&&(""!==!(null!==(n=o[e])&&void 0!==n&&n.startDate)||""!==!(null!==(i=o[e])&&void 0!==i&&i._startTime)||void 0)})),_defineProperty$1(this,"clearLocalStorage",(function(){for(var e=localStorage.length-1;e>=0;e--){var t=localStorage.key(e);apxorKeys.includes(t)||localStorage.removeItem(t)}})),e.instance||(e.instance=this),e.instance}return _createClass$1(e,null,[{key:"getInstance",value:function(){return e.instance||(e.instance=new e),e.instance}}]),e}();_defineProperty$1(Controller,"instance",void 0);var isUndefined=function(e){return void 0===e},isNull=function(e){return null===e},isDefined=function(e){return void 0!==e&&!isNull(e)},isNotDefined=function(e){return!isDefined(e)},isFunction=function(e){return"function"==typeof e},isString=function(e){return"string"==typeof e},isBoolean=function(e){return"boolean"==typeof e},isNumber=function(e){return isDefined(e)&&!isNull(e)&&!isNaN(e)},executeIfDOMReady=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;if(null!=t&&isFunction(t)){var n=e.document;"loading"!==n.readyState?t():isFunction(n.addEventListener)?n.addEventListener("DOMContentLoaded",t):isFunction(e.attachEvent)&&e.attachEvent("onreadystatechange",(function(e){"loading"!==n.readyState&&t(e)}))}},executeBeforeUnload=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){return null};isFunction(t)&&(e.addEventListener("pagehide",(function(e){return t(e),""})),e.addEventListener("beforeunload",(function(e){return t(e),""})),e.addEventListener("onunload",(function(e){return t(e),""})))},unregisterBeforeUnloadCallback=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){return null};isFunction(t)&&(e.removeEventListener("pagehide",t),e.removeEventListener("beforeunload",t),e.removeEventListener("onunload",t))},registerForEvent=function(e,t,n){var i=arguments.length>3&&void 0!==arguments[3]&&arguments[3];isFunction(e.addEventListener)?e.addEventListener(t,n,i):isFunction(e.attachEvent)?e.attachEvent(t,n):e[ON_KEY+t]=n},checkForNeverShow=function(e){var t=Controller.getInstance(),n=JSON.parse(t.getFromStorage("_apx_never_show_ids"));return!(isNull(n)||!Array.isArray(n))&&!!n.includes(e)},removeLastPartOfId=function(e){return e.includes("-testing")?e.substring(0,e.length-8)+"-1":e+"-1"},deregisterFromEvent=function(e,t,n){isFunction(e.removeEventListener)?e.removeEventListener(t,n):isFunction(e.detachEvent)?e.detachEvent(t,n):e[ON_KEY+t]=n},formatDatetime=function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=function(e){return e<10?"0"+e:e},i=e.getFullYear()+"-"+n(e.getMonth()+1)+"-"+n(e.getDate())+"T"+n(e.getHours())+":"+n(e.getMinutes())+":"+n(e.getSeconds());return t?i+e.toTimeString().split(" ")[1].replace(/GMT([+|-])(\d{2})(\d{2})/,"$1$2:$3"):i},getNow=function(){return Date.now()},uuid=function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return t?(t^16*Math.random()>>t/4).toString(16):([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,e)},getDevice=function(){var e=window.navigator,t=(void 0===e?{}:e).userAgent,n=void 0===t?"":t;switch(!0){case/Windows Phone/i.test(n)||/WPDesktop/.test(n):return"Windows Phone";case/iPad/.test(n):return"iPad";case/iPod/.test(n):return"iPod Touch";case/iPhone/.test(n):return"iPhone";case/(BlackBerry|PlayBook|BB10)/i.test(n):return"BlackBerry";case/Android/.test(n):return"Android";default:return"Desktop"}},getDeviceInfo=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.navigator,n=void 0===t?{}:t,i=n.userAgent,o=void 0===i?"":i,a=n.vendor,r=void 0===a?"":a,s=BROWSERS.OperaMini,l=BROWSERS.Opera,c=BROWSERS.BlackBerry,d=BROWSERS.IEMobile,p=BROWSERS.Edge,u=BROWSERS.FB,h=BROWSERS.Chrome,g=BROWSERS.ChromeIOS,f=BROWSERS.UC,m=BROWSERS.FirefoxIOS,_=BROWSERS.SafariMobile,v=BROWSERS.Safari,b=BROWSERS.AndroidMobile,y=BROWSERS.Konqueror,x=BROWSERS.Firefox,w=BROWSERS.IE,C=BROWSERS.Mozilla,E=BROWSERS.Brave,k=function(){var e;if(null!==(e=navigator)&&void 0!==e&&e.brave)return E;switch(!0){case o.includes(" OPR/"):return o.includes("Mini")?s:l;case/(BlackBerry|PlayBook|BB10)/i.test(o):return c;case o.includes("IEMobile")||o.includes("WPDesktop"):return d;case o.includes("FBIOS"):return u;case o.includes("Chrome"):return h;case o.includes("CriOS"):return g;case o.includes("Edge"):return p;case o.includes("UCWEB")||o.includes("UCBrowser"):return f;case o.includes("FxiOS"):return m;case r.includes("Apple"):return o.includes("Mobile")?_:v;case o.includes("Android"):return b;case o.includes("Konqueror"):return y;case o.includes("Firefox"):return x;case o.includes("MSIE")||o.includes("Trident/"):return w;case o.includes("Gecko"):return C;default:return""}},S=k(),T=function(){var e,t=(e={},_defineProperty$1(e,d,/rv:(\d+(\.\d+)?)/),_defineProperty$1(e,p,/Edge\/(\d+(\.\d+)?)/),_defineProperty$1(e,h,/Chrome\/(\d+(\.\d+)?)/),_defineProperty$1(e,g,/CriOS\/(\d+(\.\d+)?)/),_defineProperty$1(e,f,/(UCBrowser|UCWEB)\/(\d+(\.\d+)?)/),_defineProperty$1(e,v,/Version\/(\d+(\.\d+)?)/),_defineProperty$1(e,_,/Version\/(\d+(\.\d+)?)/),_defineProperty$1(e,l,/(Opera|OPR)\/(\d+(\.\d+)?)/),_defineProperty$1(e,x,/Firefox\/(\d+(\.\d+)?)/),_defineProperty$1(e,m,/FxiOS\/(\d+(\.\d+)?)/),_defineProperty$1(e,y,/Konqueror:(\d+(\.\d+)?)/),_defineProperty$1(e,c,/BlackBerry (\d+(\.\d+)?)/),_defineProperty$1(e,b,/android\s(\d+(\.\d+)?)/),_defineProperty$1(e,w,/(rv:|MSIE )(\d+(\.\d+)?)/),_defineProperty$1(e,C,/rv:(\d+(\.\d+)?)/),e)[S];if(void 0===t)return null;var n=o.match(t);return n?parseFloat(n[n.length-2]):null},A=function(){switch(!0){case/Windows/i.test(o):return/Phone/.test(o)||/WPDesktop/.test(o)?"Windows Phone":"Windows";case/(iPhone|iPad|iPod)/.test(o):return"iOS";case/Android/.test(o):return"Android";case/(BlackBerry|PlayBook|BB10)/i.test(o):return"BlackBerry";case/Mac/i.test(o):return"Mac OS X";case/Linux/.test(o):return"Linux";case/CrOS/.test(o):return"Chrome OS";default:return""}},I=function(){var t=e.screen,n=void 0===t?{width:0,height:0}:t,i=n.height,o=n.width,a=e.devicePixelRatio,r=void 0===a?1:a,s=function(e){var t=Math.round(e)*r,n=t%10;return t+(n>0?10:0)-n};return{dimensions:{width:o,height:i},dimensions_in_pixels:{width:s(o),height:s(i)},dpi:r.toString()}},P=T(),O=getDevice(),L=A();return _objectSpread2$1(_objectSpread2$1({},I()),{},{device:O,browser_version:P,browser:S,os:L})},getDefaultUserProperties=function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=t.navigator,o=void 0===i?{}:i,a=o.language,r=n.browser_version,s=n.browser,l=Cookie.isCookieAvailable();return _defineProperty$1(e={},APX_PREFIX+"browser",s),_defineProperty$1(e,APX_PREFIX+"browser_version",s+"_"+r),_defineProperty$1(e,APX_PREFIX+"language",a),_defineProperty$1(e,APX_PREFIX+"cookies_supported",l),e},getDefaultSessionProperties=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.navigator,n=void 0===t?{}:t,i=n.connection,o=void 0===i?{}:i,a=o.effectiveType,r=o.saveData,s=n.platform,l=n.webdriver,c=e.document.referrer,d={};a&&(d[APX_PREFIX+NETWORK_KEY]=a),r&&(d[APX_PREFIX+DATA_SAVE_MODE_KEY]=r),s&&(d[APX_PREFIX+PLATFORM_KEY]=s),isDefined(l)&&l&&(d[APX_PREFIX+AUTOMATION_KEY]=l),isDefined(c)&&c.length>0?d[APX_PREFIX+REFERRER_KEY]=c:d[APX_PREFIX+REFERRER_KEY]="direct";var p=getDevice();return d[APX_PREFIX+DEVICE_TYPE]=p,d},getPageTitle=function(e){var t=e.document.querySelector("title");return isDefined(t)&&isDefined(t.innerText)?t.innerText:"Unknown"},millisToSeconds=function(e){return isNumber(e)?toDecimalPoints(e/1e3):e},toDecimalPoints=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:3;if(!isNumber(e)||!isNumber(t))return e;if(t%1!=0)return e;var n=Math.pow(10,t);return Math.round(e*n)/n},FILE_PROTOCOL="file:",LOCALHOST="localhost",APP_MODE_PRODUCTION="production",APP_MODE_DEV="development",getAppMode=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.location,n=void 0===t?{}:t,i=n.protocol,o=n.host,a=n.hostName;return i===FILE_PROTOCOL||o===LOCALHOST||"0.0.0.0"===a||"127.0.0.1"===a?APP_MODE_DEV:APP_MODE_PRODUCTION},isObject=function(e){return e instanceof Object},getCleanedProperties=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;if(isObject(e)){var n={};return Object.keys(_objectSpread2$1({},e)).forEach((function(i){var o=e[i],a=i;isString(i)||(a=JSON.stringify(i)),isBoolean(o)||isNumber(o)?insertProperty(n,a,o):isString(o)?n[a]=trimText(o):Array.isArray(o)?handleJSONArray(n,a,o,t):isObject(o)&&handleJSONObject(n,i,o,t-1)})),n}return{}},handleJSONArray=function(e,t,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1;if(i<=0)insertProperty(e,t,JSON.stringify(n));else if(Array.isArray(n)){var o=n;if(o.length>0){var a="";isBoolean(o[0])?a="b":isString(o[0])?a="s":isNumber(o[0])?a="n":Array.isArray(o[0])?a="a":isObject(o[0])&&(a="o");var r=o.length;if(""===a)return void insertProperty(e,t,JSON.stringify(n));for(var s=1;s<r;s++)if("s"===a){if(!isString(o[s]))return void insertProperty(e,t,JSON.stringify(n))}else if("b"===a){if(!isBoolean(o[s]))return void insertProperty(e,t,JSON.stringify(n))}else if("n"===a){if(!isNumber(o[s]))return void insertProperty(e,t,JSON.stringify(n))}else if("a"===a){if(!Array.isArray(o[s]))return void insertProperty(e,t,JSON.stringify(n))}else if("o"===a&&!isObject(o[s]))return void insertProperty(e,t,JSON.stringify(n));if("o"===a)if(i-1<=0){for(var l=[],c=0;c<r;c++)l.push(JSON.stringify(o[c]));insertProperty(e,t,l)}else for(var d=0;d<r;d++)handleJSONObject(e,t,o[d],i-1);else if("a"===a)for(var p=0;p<r;p++)insertProperty(e,t,JSON.stringify(o[p]));else for(var u=0;u<r;u++)insertProperty(e,t,o[u])}else insertProperty(e,t,[])}},handleJSONObject=function e(t,n,i){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1;o<=0?insertProperty(t,n,JSON.stringify(i)):Object.keys(_objectSpread2$1({},i)).forEach((function(a){var r=n+"_"+a,s=i[a];isDefined(s)&&(Array.isArray(s)?handleJSONArray(t,r,s,o-1):isObject(s)?e(t,r,s,o-1):insertProperty(t,r,s))}))},insertProperty=function(e,t,n){if(isDefined(t)&&isDefined(n))if(e[t]){var i=e[t],o=i;Array.isArray(i)||((isNumber(i)&&!isNumber(n)||isBoolean(i)&&!isBoolean(n)||isString(i)&&!isString(n)||isObject(i)&&!isObject(n))&&(isString(i)||(i=JSON.stringify(i)),isString(n)||(n=JSON.stringify(n))),(o=[]).push(i)),o.push(n),e[t]=o}else e[t]=n},trimText=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:120;return isString(e)?e.length>t?e.slice(0,t)+"...":e:void 0},getJSONOrNull=function(e){if(!isDefined(e)&&!isString(e))return null;if("object"===_typeof$1(e)||isObject(e))return e;var t=e.replace(/(?:\r\n|\r|\n)/g,"").trim();try{return JSON.parse(t)}catch(e){}return null},encode=function(e,t){return isDefined(t)?b64_encode(t=xor_encrypt(e,t)):null},decode=function(e,t){return xor_decrypt(e,t=b64_decode(t))},b64_table="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",toStr,isCallable,maxSafeInteger,toLength;function b64_encode(e){var t,n,i,o,a,r,s=0,l="";if(!e)return e;do{t=(a=e[s++]<<16|e[s++]<<8|e[s++])>>18&63,n=a>>12&63,i=a>>6&63,o=63&a,l+=b64_table.charAt(t)+b64_table.charAt(n)+b64_table.charAt(i)+b64_table.charAt(o)}while(s<e.length);return((r=e.length%3)?l.slice(0,r-3):l)+"===".slice(r||3)}function b64_decode(e){var t,n,i,o,a,r,s=0,l=[];if(!e)return e;e+="";do{t=(r=b64_table.indexOf(e.charAt(s++))<<18|b64_table.indexOf(e.charAt(s++))<<12|(o=b64_table.indexOf(e.charAt(s++)))<<6|(a=b64_table.indexOf(e.charAt(s++))))>>16&255,n=r>>8&255,i=255&r,l.push(t),64!==o&&(l.push(n),64!==a&&l.push(i))}while(s<e.length);return l}function keyCharAt(e,t){return e.charCodeAt(Math.floor(t%e.length))}function xor_encrypt(e,t){return Array.from(t).map((function(t,n){return t.charCodeAt(0)^keyCharAt(e,n)}))}function xor_decrypt(e,t){return Array.from(t).map((function(t,n){return String.fromCharCode(t^keyCharAt(e,n))})).join("")}function stringToArrayBuffer(e){for(var t=new ArrayBuffer(e.length),n=new Uint8Array(t),i=0;i<e.length;i++)n[i]=e.charCodeAt(i);return t}function arrayBufferToString(e){for(var t="",n=new Uint8Array(e),i=0;i<n.length;i++)t+=String.fromCharCode(n[i]);return t}String.prototype.includes||(String.prototype.includes=function(){return-1!==String.prototype.indexOf.apply(this,arguments)}),Array.from||(Array.from=(toStr=Object.prototype.toString,isCallable=function(e){return"function"==typeof e||"[object Function]"===toStr.call(e)},maxSafeInteger=Math.pow(2,53)-1,toLength=function(e){var t=function(e){var t=Number(e);return isNaN(t)?0:0!==t&&isFinite(t)?(t>0?1:-1)*Math.floor(Math.abs(t)):t}(e);return Math.min(Math.max(t,0),maxSafeInteger)},function(e){var t=this,n=Object(e);if(null==e)throw new TypeError("Array.from requires an array-like object - not null or undefined");var i,o=arguments.length>1?arguments[1]:void 0;if(void 0!==o){if(!isCallable(o))throw new TypeError("Array.from: when provided, the second argument must be a function");arguments.length>2&&(i=arguments[2])}for(var a,r=toLength(n.length),s=isCallable(t)?Object(new t(r)):new Array(r),l=0;l<r;)a=n[l],s[l]=o?void 0===i?o(a,l):o.call(i,a,l):a,l+=1;return s.length=r,s})),Array.prototype.includes||Object.defineProperty(Array.prototype,"includes",{value:function(e,t){if(null==this)throw new TypeError('"this" is null or not defined');var n=Object(this),i=n.length>>>0;if(0===i)return!1;var o,a,r=0|t,s=Math.max(r>=0?r:i-Math.abs(r),0);for(;s<i;){if((o=n[s])===(a=e)||"number"==typeof o&&"number"==typeof a&&isNaN(o)&&isNaN(a))return!0;s++}return!1}});var getFlatMapDiff=function(e,t){var n=Object.keys(e),i={};return n.forEach((function(n){e[n]!==t[n]&&(i[n]=e[n])})),i},getDateInMMDDYYYY=function(){var e=new Date;return e.getMonth()+"/"+e.getDate()+"/"+e.getFullYear()},_getTime=function(){var e=new Date;return{hours:e.getHours(),mins:e.getMinutes()}},ensureSessionInfoKeys=function(e){var t={id:"",launch_time:0,launch_time_string:"",startup_time:0,is_background:!1,is_first_session:!1,duration:0,total_duration:0,process_name:"",is_fatal:!1,launch_type:"normal"};if(e.session_info)for(var n=0,i=Object.keys(t);n<i.length;n++){var o=i[n];o in e.session_info||(e.session_info[o]=t[o])}else e.session_info=t},resetQEStateonPull=function(e,t){var n,i=Controller.getInstance(),o=i.getFromStorage("qe_state"),a=i.getFromStorage("apx-last-shown-times"),r=i.getFromStorage("apx-last-shown-session");for(var s in o=JSON.parse(decode(t,o)),n=e.includes("-testing")?e.replace("-testing",""):e,o)s.includes(n)&&(o[s]={SESSION:0,OVERALL:0,DATES:{}});i.persistToStorage("qe_state",o,!0);var l=JSON.parse(a);(null==l?void 0:l.length)>0&&l.forEach((function(e,t){if(Object.keys(e)[0].includes(n)){var i=Object.keys(e)[0];l[t][i]=0}})),i.persistToStorage("apx-last-shown-times",JSON.stringify(l));var c=JSON.parse(r);(null==c?void 0:c.length)>0&&c.forEach((function(e,t){if(Object.keys(e)[0].includes(n)){var i=Object.keys(e)[0];c[t][i]=0}})),i.persistToStorage("apx-last-shown-session",JSON.stringify(c))},_class,LEVELS=["log","debug","info","warn","error"],LEVELS_ENUM=LEVELS.reduce((function(e,t){return e[t]=t,e}),{}),getConsole=function(e){if(isUndefined(e)){var t=function(){return null};e=LEVELS.reduce((function(e,n){return e[n]=t,e}),{})}return e},Logger$4=function(){function e(){_classCallCheck$1(this,e)}return _createClass$1(e,null,[{key:"enabled",set:function(t){e._enabled=t}},{key:"level",set:function(t){e._level=t}},{key:"console",set:function(t){e._console=getConsole(t)}}]),e}();_class=Logger$4,_defineProperty$1(Logger$4,"_console",getConsole()),_defineProperty$1(Logger$4,"_enabled",!1),_defineProperty$1(Logger$4,"_level","error"),_defineProperty$1(Logger$4,"_render",(function(e){return function(){var t=LEVELS.indexOf(e)>=LEVELS.indexOf(_class._level);if(_class._enabled&&t){for(var n=arguments.length,i=new Array(n),o=0;o<n;o++)i[o]=arguments[o];_class._console[e].apply(_class._console,i)}}})),_defineProperty$1(Logger$4,"log",_class._render(LEVELS_ENUM.log)),_defineProperty$1(Logger$4,"info",_class._render(LEVELS_ENUM.info)),_defineProperty$1(Logger$4,"debug",_class._render(LEVELS_ENUM.debug)),_defineProperty$1(Logger$4,"warn",_class._render(LEVELS_ENUM.warn)),_defineProperty$1(Logger$4,"error",_class._render(LEVELS_ENUM.error));var onMouseOver=function(e){if(e.target){var t=e.target.classList,n=t.contains("apx-highlight")||-1!==t.toString().indexOf("apx-");t&&!n&&(e.target.classList.add("apx-highlight"),e.target.oldOnClick=e.target.onclick,e.target.onclick=null)}},onMouseOut=function(e){e.target&&e.target.classList&&e.target.classList.contains("apx-highlight")&&(e.target.classList.remove("apx-highlight"),e.target.onclick=e.target.oldOnClick,e.target.oldOnClick=null)},handleDocumentOnClick=function(e,t){var n=e.target;n&&n.classList.contains("apx-highlight")&&(e.preventDefault(),e.stopPropagation(),n.classList.remove("apx-highlight"),n.onclick=n.oldOnClick,n.oldOnClick=null,t&&t(n))};function dragElement(e){var t,n=window.innerHeight-8,i=8,o=window.innerWidth-8,a=8,r=0,s=0,l=0,c=0,d=document.getElementById(e.id+"-h");function p(n){n.preventDefault(),n.stopPropagation(),"touchstart"===(n=n||window.event).type?(l=n.targetTouches[0].pageX,c=n.targetTouches[0].pageY):(l=n.clientX,c=n.clientY),t=e.getBoundingClientRect(),document.addEventListener("mouseup",h),document.addEventListener("touchend",h,{passive:!1}),document.addEventListener("mousemove",u),document.addEventListener("touchmove",u,{passive:!1})}function u(d){d.preventDefault(),d.stopPropagation(),"touchmove"===(d=d||window.event).type?(r=l-d.targetTouches[0].pageX,s=c-d.targetTouches[0].pageY,l=d.targetTouches[0].pageX,c=d.targetTouches[0].pageY):(r=l-d.clientX,s=c-d.clientY,l=d.clientX,c=d.clientY);var p=e.offsetLeft-r,u=e.offsetTop-s;p<i||u<a||p+t.width>o||u+t.height>n||(e.style.top=e.offsetTop-s+"px",e.style.left=e.offsetLeft-r+"px",e.style.right="")}function h(){document.removeEventListener("mouseup",h),document.removeEventListener("touchend",h),document.removeEventListener("mousemove",u),document.removeEventListener("touchmove",u)}d?(d.addEventListener("mousedown",p),d.addEventListener("touchstart",p,{passive:!1})):(e.addEventListener("mousedown",p),e.addEventListener("touchstart",p,{passive:!1}))}function enclosePartialAttributes(e){return e.replace(/\[id\*=(.*?)\]/g,'[id*="$1"]').replace(/\[class\*=(.*?)\]/g,'[class*="$1"]')}var ON_HTML="<b>View Selection Mode: ON",OFF_HTML="<b>View Selection Mode: OFF</b>",SSE_API="https://server.apxor.com/v1/sse/",LAYOUT_URL=SSE_API+"layout?appId=<aid>&deviceId=<uid>",PREVIEW_API=SSE_API+"ui-config?appId=<aid>&deviceId=<uid>",CONFIG_API=SSE_API+"art-config?appId=<aid>&deviceId=<uid>",FRONTEND_API="https://server.apxor.com/v4/frontendapi/web/test-devices",ADD_TEST_DEVICE_API=FRONTEND_API+"?appId=<aid>",REMOVE_TEST_DEVICE_API=FRONTEND_API+"/<uid>?appId=<aid>",WYSIWYG=function(){function e(){var t=this;_classCallCheck$1(this,e),_defineProperty$1(this,"_styleNode",null),_defineProperty$1(this,"_viewPickerNode",null),_defineProperty$1(this,"_addRemoveTestDeviceDialog",null),_defineProperty$1(this,"_wysiwygRoot",null),_defineProperty$1(this,"_vid",""),_defineProperty$1(this,"_type",getDevice$1()),_defineProperty$1(this,"_heartbeatTimeout",void 0),_defineProperty$1(this,"_isShowingToastPopup",!1),_defineProperty$1(this,"_toastInApp",null),_defineProperty$1(this,"_elementSelector",void 0),_defineProperty$1(this,"_enableViewSelectionButton",null),_defineProperty$1(this,"_disableViewSelectionButton",null),_defineProperty$1(this,"_targetElement",void 0),_defineProperty$1(this,"_eventName",void 0),_defineProperty$1(this,"_eventTypeSelected",void 0),_defineProperty$1(this,"_eventPage",void 0),_defineProperty$1(this,"_defineEventPage",void 0),_defineProperty$1(this,"_sideBar",void 0),_defineProperty$1(this,"_selectedType",void 0),_defineProperty$1(this,"_selectedEventType",void 0),_defineProperty$1(this,"_dynamicUrl",void 0),_defineProperty$1(this,"_urlInEventObj",void 0),_defineProperty$1(this,"_is_dynamic",void 0),_defineProperty$1(this,"_selectorForEvent",void 0),_defineProperty$1(this,"_event_Type",void 0),_defineProperty$1(this,"_eventTypeSelectionPage",void 0),_defineProperty$1(this,"_eventDescription",void 0),_defineProperty$1(this,"_feature_field",!1),_defineProperty$1(this,"_selector_created",void 0),_defineProperty$1(this,"_show_hide_toggleElement",null),_defineProperty$1(this,"_toggle_icon",void 0),_defineProperty$1(this,"_show_hide_toggle_text",null),_defineProperty$1(this,"_view_sideBar",null),_defineProperty$1(this,"_viewSelectorFound",void 0),_defineProperty$1(this,"_viewText",void 0),_defineProperty$1(this,"_viewSelectionTarget",void 0),_defineProperty$1(this,"_selectors_list",void 0),_defineProperty$1(this,"_selected_element_details",[]),_defineProperty$1(this,"_selector_generated",void 0),_defineProperty$1(this,"_selectorToBeSent",void 0),_defineProperty$1(this,"_is_text_based",!1),_defineProperty$1(this,"_text_type","s"),_defineProperty$1(this,"_text_op",void 0),_defineProperty$1(this,"_text_content",void 0),_defineProperty$1(this,"_selector_category",void 0),_defineProperty$1(this,"_number_op","EQ"),_defineProperty$1(this,"_content_op","contains"),_defineProperty$1(this,"_selection_mode","v1"),_defineProperty$1(this,"_dynamic_content_updated",void 0),_defineProperty$1(this,"_avf_updated_content",!1),_defineProperty$1(this,"_eventAttributes",[]),_defineProperty$1(this,"init",(function(e,n){var i=getCookie("_apx_ewc");if(i){var o=atob(i);try{var a=Apxor.getController().getFromStorage(o,!0);if(!a)return;var r=a.app_id,s=a.expiry,l=a.volatile_id,c=a.mode,d=void 0===c?VIEW_SELECTION:c,p=a.selection_mode,u=void 0===p?"v1":p;if(t._vid=l,t._selection_mode=u,r===e&&Date.now()<=s){var h=document.createElement("span");if(h.style="z-index:99999999;visibility:hidden;position:fixed;top:50%;left:50%;transform:translate(-50%,-50%);padding:16px 24px;background:#252f37;border-radius:3px;opacity:0;font-size:24px;color:white;transition:all .3s ease-out",h.innerHTML=ON_HTML,t._viewPickerNode=h,document.body.appendChild(h),t._styleNode=document.createElement("style"),t._styleNode.innerHTML=".apx-highlight{height:auto;z-index:9999999999;outline: 2px solid red;cursor:crosshair}",document.body.appendChild(t._styleNode),t.isSelectionMode=!1,d===REGISTER_EVENTS)t._selection_mode="v2",t.createNewWYSIWYG();else if(d===REGISTER_PAGES)t.createNewWYSIWYGForTrackingPages();else{if(t.testDeviceData=Apxor.getController().getFromStorage("_apx_td",!0),t.testDeviceData){var g=t.testDeviceData,f=g.name,m=void 0===f?"":f,_=g.id,v=void 0===_?"":_;""!==m&&""!==v&&(t._makeSSERequest("select","".concat(m," - ").concat(v),v),t.resetHeartbeatTimeout(),t.previewEventSource=new EventSource(PREVIEW_API.replace("<aid>",e).replace("<uid>",v)),t.artConfigEventSource=new EventSource(CONFIG_API.replace("<aid>",e).replace("<uid>",v)),t.previewEventSource.onmessage=t.artConfigEventSource.onmessage=function(e){e&&e.data&&"{}"===e.data?t.resetHeartbeatTimeout():e&&e.data&&"{}"!==e.data&&(clearTimeout(t._heartbeatTimeout),t._handleSSEResponse(n,e.data)),t._isShowingToastPopup&&t.dismissToastPopup()},t.previewEventSource.onerror=t.artConfigEventSource.onerror=function(){t.previewEventSource.readyState!==EventSource.CLOSED&&t.artConfigEventSource.readyState!==EventSource.CLOSED||(Logger$4.warn("SSE is disconnected"),t.showToastMessagePopUp(APX_SSE_TIMEOUT_CONFIG),t._isShowingToastPopup=!0)})}t.createNewWYSIWYGForSelection(n)}}}catch(e){window.ApxorLogger.error("WYSIWYG can not be initialised")}}})),_defineProperty$1(this,"createNewWYSIWYGForSelection",(function(e){var n,i,o,a;t.dropDownExpanded=!1;var r=null!==t.testDeviceData&&void 0!==t.testDeviceData&&t.testDeviceData.id&&t.testDeviceData.name;t._newwysiswg=document.createElement("div"),t._newwysiswg.id="apx-wr",t._newwysiswg.classList.add("apx-wrclass"),t._newwysiswg.style="z-index:99999999;visibility:visible;position:fixed;width:260px;height:50px;top:0%;left:50%;transform:translate(-50%, 0%);background:#F2F2F2;opacity:1;font-size:24px;color:white;border-radius:0%;border-bottom-left-radius:50cm;border-bottom-right-radius:50cm; user-select: none;box-shadow: rgb(0, 0, 0, 0.4) 0px 0px 6px 0px;",t.wysiwg_container=document.createElement("div"),t.wysiwg_container.classList.add("apx-wcclass"),t.wysiwg_container.style="position:relative;top:0%;left:0%;display:flex;flex-direction:row;height:50px;",t.imgContainer=document.createElement("div"),t.imgContainer.id="apx-wr-h",t.imgContainer.classList.add("apx-icclass"),t.imgContainer.style="background-color:#002845;border-bottom-left-radius:50cm;padding: 4px 25px 4px 30px;cursor:move;",t.imgContainer.innerHTML='<svg xmlns="http://www.w3.org/2000/svg" width="20" height="31" viewBox="0 0 20 31" fill="none">\n<path fill-rule="evenodd" clip-rule="evenodd" d="M18.6546 0.285222C19.1759 0.714811 19.2404 1.47412 18.7988 1.98119L7.59849 14.8419H4.48593L0.274291 9.76354C-0.154672 9.2463 -0.0713816 8.48872 0.460326 8.07143C0.992033 7.65414 1.77081 7.73516 2.19977 8.2524L5.66873 12.4352H6.45197L16.9112 0.425515C17.3528 -0.0815556 18.1333 -0.144367 18.6546 0.285222Z" fill="#FF7F33"/>\n<path fill-rule="evenodd" clip-rule="evenodd" d="M18.7534 30.7146C19.2746 30.285 19.3391 29.5257 18.8974 29.0187L8.08905 16.6122H5.04724L0.974613 21.5213C0.545563 22.0385 0.628726 22.7961 1.16036 23.2135C1.692 23.6308 2.47079 23.5499 2.89984 23.0328L6.22979 19.0189H6.94278L17.01 30.5746C17.4517 31.0816 18.2323 31.1443 18.7534 30.7146Z" fill="#00BDE1"/>\n</svg>',t.dropDownContainer=document.createElement("div"),t.dropDownContainer.classList.add("apx-ddcclass"),t.dropDownContainer.style="width:100%; display:flex; align-items: center;justify-content: center; cursor: pointer",t.dropDownText=document.createElement("div"),t.dropDownText.classList.add("apx-ddtclass"),t.dropDownText.style="color:black; font-size: 17px;",t.dropDownText.innerHTML="Select",t.dropDownImage=document.createElement("div"),t.dropDownImage.classList.add("apx-ddiclass"),t.dropDownImage.style="margin-left:12px; margin-top:2px;",t.dropDownImage.innerHTML='<style>@keyframes bounce {0%, 20%, 50%, 80%, 100% {transform: translateY(0);}40% {transform: translateY(-8px);}60% {transform: translateY(-4px);}}</style><svg class = "apx-ddisvg" width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg" style = "animation: bounce 2s infinite;"><path class = "apx-" d="M2.26544 5.21182C2.19383 5.14415 2.1096 5.09126 2.01756 5.05614C1.92551 5.02103 1.82745 5.00439 1.72897 5.00718C1.6305 5.00997 1.53353 5.03212 1.44362 5.07238C1.3537 5.11264 1.2726 5.17021 1.20494 5.24182C1.13727 5.31342 1.08438 5.39765 1.04926 5.4897C1.01415 5.58174 0.997514 5.6798 1.0003 5.77828C1.00309 5.87676 1.02524 5.97372 1.0655 6.06364C1.10576 6.15355 1.16333 6.23465 1.23494 6.30232L7.98494 12.6773C8.12419 12.809 8.30855 12.8823 8.50019 12.8823C8.69182 12.8823 8.87618 12.809 9.01544 12.6773L15.7662 6.30232C15.8394 6.2351 15.8984 6.15401 15.94 6.06377C15.9816 5.97352 16.0048 5.87592 16.0083 5.77662C16.0119 5.67733 15.9956 5.57832 15.9606 5.48535C15.9255 5.39239 15.8723 5.30731 15.8041 5.23507C15.7359 5.16283 15.654 5.10486 15.5632 5.06454C15.4724 5.02421 15.3745 5.00233 15.2751 5.00017C15.1758 4.99801 15.077 5.0156 14.9845 5.05194C14.8921 5.08827 14.8077 5.14262 14.7364 5.21182L8.50019 11.1008L2.26544 5.21182Z" fill="black"/></svg>',t.dropDownContainer.appendChild(t.dropDownText),t.dropDownContainer.appendChild(t.dropDownImage),t.dropDownContainer.onclick=function(e){e.stopImmediatePropagation(),t.dropDownBox.style.display=t.dropDownExpanded?"none":"block",t.dropDownExpanded=!t.dropDownExpanded,document.querySelector(".apx-ddisvg")&&(document.querySelector(".apx-ddisvg").style.animation="none"),t.dismissDropDownOutsideClick=function(){t.dropDownExpanded&&(t.dropDownBox.style.display="none",t.dropDownExpanded=!1,document.querySelector(".apx-ddisvg")&&(document.querySelector(".apx-ddisvg").style.animation="bounce 2s infinite"),document.body.removeEventListener("click",t.dismissDropDownOutsideClick))},document.body.addEventListener("click",t.dismissDropDownOutsideClick)},t.wysiwg_container.appendChild(t.imgContainer),t.wysiwg_container.appendChild(t.dropDownContainer),t.dropDownBox=document.createElement("div"),t.dropDownBox.classList.add("apx-ddbclass"),t.dropDownBox.style="position: absolute; background-color: #ffffff; margin-top: 4px; box-shadow: rgb(0, 0, 0, 0.4) 0px 0px 6px 0px;display: none;transform:border-radius: 12px; width: 260px",t.dropDownBoxButtons=document.createElement("div"),t.dropDownBoxButtons.innerHTML='\n <style>\n .apx-bh {\n padding:12px;\n }\n .apx-b {\n background: none;\n color: black;\n border-radius: 12px;\n border: 0px;\n padding-block: 8px;\n padding-inline: 16px;\n display: block;\n font-size: 16px;\n }\n .apx-b:hover {\n background-color: rgba(255, 199, 39, 0.10);\n color: #F97316;\n}\n </style>\n <div id="apx-bh" class="apx-cr apx-bh" style="display: flex; flex-direction: column; gap: 8px;">\n <button class="apx-b" id="apx-a" style="display:'.concat(r?"none":"block",'">\n Register Device\n </button>\n <button class="apx-b" id="apx-r" style="display:').concat(r?"block":"none",'">\n Remove as test device\n </button>\n <button class="apx-b" id="apx-ev" style="display:').concat(r&&t.isSelectionMode?"none":r?"block":"none",'">\n Enable view selection\n </button>\n <button class="apx-b" id="apx-dv" style="display:').concat(r&&t.isSelectionMode?"block":"none",'">\n Disable view selection\n </button>\n <button class="apx-b" id="apx-remove-widget" style="display:block">\n Stop Tracking\n </button>\n </div>');var s=document.createElement("div");s.id="apx-ddtd",s.style.display="none";var l=document.createElement("div");l.style="display: flex; justify-content: center; align-items: center; padding: 12px; gap: 4px; color: black; flex-direction: column; text-align: center;";var c=document.createElement("div");c.id="apx-ddtdname",c.innerHTML=null===(n=t.testDeviceData)||void 0===n?void 0:n.name;var d=document.createElement("div");d.id="apx-ddtdid",d.style="font-size: 10px; font-family: monospace; ",d.innerHTML=null===(i=t.testDeviceData)||void 0===i?void 0:i.id,l.appendChild(c),l.appendChild(d),s.appendChild(l),s.appendChild(document.createElement("hr")),t.dropDownBox.appendChild(s),t.dropDownBox.appendChild(t.dropDownBoxButtons),null!==(o=t.testDeviceData)&&void 0!==o&&o.name&&null!==(a=t.testDeviceData)&&void 0!==a&&a.id&&(s.style.display="block",t.dropDownBox.style.paddingTop="0px"),t._newwysiswg.appendChild(t.wysiwg_container),t._newwysiswg.appendChild(t.dropDownBox),document.body.appendChild(t._newwysiswg),t._wysiwygRoot=t._newwysiswg,t.handlingListenersForSelection(e)})),_defineProperty$1(this,"handlingListenersForSelection",(function(e){t.stopTrackingButton=document.getElementById("apx-remove-widget"),t.stopTrackingButton.addEventListener("click",(function(){document.body.removeChild(t._newwysiswg),t.removeWidgetDetails(),t.previewEventSource.close();var e=document.getElementById("apx-view-sidebar-root");e&&e.remove(),t.artConfigEventSource.close();var n=document.getElementById("apx-show-hide-icon");n&&n.remove(),t._viewSelectionTarget&&t._viewSelectionTarget.classList.remove("apx-highlight")}));var n=document.createElement("div");n.classList.add("apx-esc"),n.style="z-index:99999999;position:fixed;top:80%;left:50%;transform:translate(-50%,-50%);padding:16px 24px;background:black;border-radius:6px;font-size:16px;color:white; cursor:move;",n.innerHTML='press <strong style="font-size: 18px">Esc</strong> to go back to view selection page';var i=function(e){e.stopImmediatePropagation(),"Escape"===e.key&&(t._newwysiswg.style.display="block",s())},o=document.getElementById("apx-a");o.onclick=function(){t._showAddTestDeviceDialog(e)};var a=document.getElementById("apx-r");a.onclick=function(){document.getElementById("apx-ddtd").style.display="none",t.dropDownBox.style.paddingTop="12px",fetch(REMOVE_TEST_DEVICE_API.replace("<aid>",Apxor.getSiteId()).replace("<uid>",t.testDeviceData.id),{method:"DELETE",headers:{apx_web_key:"WTCKFAIVAJKYJA3HCV80WIKZU98R9NJG"}}).then((function(e){return e.ok&&200===e.status?e.json():null})).then((function(e){e&&(Apxor.getController().persistToStorage("_apx_td",{},!0),t.testDeviceData=null,o.style.display="block",a.style.display=r.style.display=l.style.display="none",t.isSelectionMode&&t._hideSelectionMode(),t.removeWidgetDetails(),t.previewEventSource.close(),t.artConfigEventSource.close())})).catch((function(e){return console.error(e)}))};var r=document.getElementById("apx-ev");r.onclick=function(){var e;if(e=document.querySelectorAll(".apx-view-sidebar-root-class"))for(var o=e.length-1;o>=0;o--){var a=e[o];a.parentNode.removeChild(a)}if(document.body.appendChild(n),dragElement(n),t._newwysiswg.style.display="none",document.addEventListener("keydown",i),t.isSelectionMode=!0,Apxor.isFlutter()){var p=Apxor.getApxorFlutterHelper();p.disableClick();var u=p.dump().r;t.clickListener=function(e){var n=e.clientX,i=e.clientY;console.log("x,y",n,i);var o=l.getBoundingClientRect();if(console.log("rect",o),!(n>=o.left&&n<=o.right&&i>=o.top&&i<=o.bottom)){t.traverseLayouts(u.views,n,i,0);var a=t.result.layout,r=a.id,c=a.path,p=a.bounds;t.result=null,r&&0!=r.length?navigator.clipboard.writeText(r):navigator.clipboard.writeText(c),d(p),s(),t._makeSSERequest("view",location.href,r+"___"+c),t._newwysiswg.style.display="block"}}}else window.addEventListener("mouseover",onMouseOver,!0),window.addEventListener("mouseout",onMouseOut,!0),t.clickListener=function(e){return handleDocumentOnClick(e,(function(e){var n=t.cssPath(e,!0);t._viewSelectorFound=n,t._viewText=e.innerText.toLowerCase(),t._viewSelectionTarget=e,t._selectors_list=t.generateSelectorslist(e);var i=t.xPath(e,!0);navigator.clipboard.writeText(n+"___"+i),c(),s(),"v2"===t._selection_mode&&t._viewSelectionTarget.classList.add("apx-highlight"),"v1"===t._selection_mode&&t._makeSSERequest("view",location.href,n+"___"+i),t._newwysiswg.style.display="block"}))};window.addEventListener("click",t.clickListener,!0),t._hideToast(!1),r.style.display="none",l.style.display="block"};var s=function(){t._hideSelectionMode(),document.removeEventListener("keydown",i);var e=document.querySelector(".apx-esc");e&&document.body.removeChild(e),l.style.display="none",r.style.display="block"},l=document.getElementById("apx-dv");l.onclick=s;var c=function(){var e=document.querySelector("#apx-ev");if(e.disabled=!0,"View selected. Go back to Apxor dashboard to proceed with campaign creation.","v1"===t._selection_mode)feedBackMessagePopUp("View selected. Go back to Apxor dashboard to proceed with campaign creation.");else{t._createViewSideBar(),t._selected_element_details=[];var n=document.getElementById("apx-generated-selector");n&&(n.innerText=t._viewSelectorFound)}var i=document.getElementById("close-button"),o=function(){var t=document.getElementById("apx-container");null==t||t.remove(),e.disabled=!1};window.setTimeout(o,5e3),null==i||i.addEventListener("click",o)},d=function(e){var n=document.createElement("div"),i=e.right-e.left,o=e.bottom-e.top;n.style="\n position:absolute;\n top:".concat(e.top,"px;\n left:").concat(e.left,"px;\n width:").concat(i,"px;\n height:").concat(o,"px;\n z-index:99999;outline: 2px solid red;cursor:default;\n "),document.body.appendChild(n);var a=document.querySelector("#apx-ev");a.disabled=!0;var r="View selected. Go back to Apxor dashboard to proceed with campaign creation.";"Desktop"!==t._type&&(r="View selected. Go back to Apxor dashboard to proceed with campaign creation.");var s='\n <style> \n .apx-container{\n padding:20px;\n }\n </style>\n <div id="apx-container" class="apx-container">\n <div id="close-button" style="position:fixed;top:20px;right:10px;"><svg width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path opacity="0.5" d="M11.0962 9.07071L17.8586 15.8331L15.8331 17.8586L9.0707 11.0962L8.99999 11.0255L8.92928 11.0962L2.16693 17.8586L0.141421 15.8331L6.90379 9.07071L6.9745 9L6.90379 8.92929L0.141421 2.16694L2.16693 0.141422L8.92928 6.9038L8.99999 6.97451L9.0707 6.9038L15.8331 0.141422L17.8586 2.16694L11.0962 8.92929L11.0255 9L11.0962 9.07071Z" fill="white" stroke="#002845" stroke-width="0.2"/>\n </svg>\n </div>\n <div style="font-family: inherit;font-style: normal;font-weight: 600;font-size: 16px;line-height: 22px;\n color: #FFFFFF;">'.concat(r,"</div>\n </div>\n "),l=document.createElement("div");l.style="\n z-index:99999999;\n background:#002845;\n position:fixed;\n top:50%;\n left:50%;\n transform:translate(-50%, -50%);\n ",l.innerHTML=s,document.body.appendChild(l),document.getElementById("close-button").addEventListener("click",(function(){document.getElementById("apx-container").remove(),n.remove(),a.disabled=!1,Apxor.getApxorFlutterHelper().enableClick()}))};t._wysiwygRoot.addEventListener("preview",s),t._wysiwygRoot.addEventListener("added",(function(){o.style.display="none",a.style.display="block",r.style.display="block"}))})),_defineProperty$1(this,"_createViewSideBar",(function(e){t._selector_category="default",t._view_sideBar=document.createElement("div"),t._view_sideBar.id="apx-view-sidebar-root",t._view_sideBar.classList.add("apx-view-sidebar-root-class"),t.viewsideBarStyles=document.createElement("style"),t.viewsideBarStyles.innerHTML="#apx-view-sidebar-root {\n z-index: 9999999999;\n position: fixed;\n top: 0;\n right: 0px;\n width: 370px;\n height: 100%;\n display:flex;\n background-color: #fff;\n box-shadow: -2px 0px 25.600000381469727px 0px #0000001A;\n transition: all .3s ease-out;\n}\n\n\n#apx-view-sidebar-container {\n display: flex;\n flex-direction: column;\n height: 100%;\n}\n\n#apx-view-sidebar-container-header {\n line-height: 21.78px;\n font-family: inherit;\n font-weight: 500;\n font-size: 18px;\n padding-left: 10%;\n display: flex;\n align-items: center;\n flex-basis: 8%;\n background-color: rgb(0, 40, 69);\n color: white;\n}\n#apx-view-sidebar-content {\n flex-basis: 84%;\n flex-direction:column;\n overflow:auto;\n}\noption{\n margin:10px;\n height:29px;\n}\n#apx-sidebar-container-footer {\n flex-basis: 8%;\n background-color: #F5F5F5;\n}",t._show_hide_toggleElement=document.createElement("div"),t._show_hide_toggleElement.id="apx-show-hide-icon",t._show_hide_toggleElement.style="width:20px;height:70px;background-color:rgb(0,40,69,0.9);position:fixed;right:369px;top:0px;color:rgb(255,255,255,0.7);transform:rotate(180deg);writing-mode:vertical-lr;text-align:center;border-top-right-radius:5px;border-bottom-right-radius:5px;cursor:pointer;z-index:99999997;display:flex;justify-content:center;align-items:center;gap:4px;",t._show_hide_toggle_text=document.createElement("div"),t._show_hide_toggle_text.innerText="hide",t._show_hide_toggleElement.appendChild(t._show_hide_toggle_text),t._toggle_icon=document.createElement("div"),t._toggle_icon.innerText="►",t._toggle_icon.style="transform:rotate(180deg);color:#ffffff;font-size:11px;",t._show_hide_toggleElement.appendChild(t._toggle_icon),t._clickHandlingForShowHideIcon(!0),document.body.appendChild(t._show_hide_toggleElement),t._view_sideBar.appendChild(t.viewsideBarStyles),t.viewSideBarContainer=document.createElement("div"),t.viewSideBarContainer.id="apx-view-sidebar-container",t.viewSideBarContainerHeader=document.createElement("div"),t.viewSideBarContainerHeader.id="apx-view-sidebar-container-header",t.viewSideBarContainerHeader.style="position: relative;";t.viewSideBarContainerHeader.innerHTML='<span>Define Element </span> <div id = "apx-view-closeSideBar" style = "position:absolute; top:50%; right:30px;transform: translate(0px, -50%); cursor:pointer;">'.concat('<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-x" width="24" height="24" viewBox="0 0 24 24" stroke-width="1.5" stroke="#ffffff" fill="none" stroke-linecap="round" stroke-linejoin="round">\n <path stroke="none" d="M0 0h24v24H0z" fill="none"/>\n <path d="M18 6l-12 12" />\n <path d="M6 6l12 12" />\n</svg>',"</div>"),t.viewSideBarContent=document.createElement("div"),t.viewSideBarContent.style="display:flex;gap:5px;",t.viewSideBarContent.id="apx-view-sidebar-content",t.viewsideBarContentHeading=document.createElement("div"),t.viewsideBarContentHeading.innerText="Feature Element Matching",t.viewsideBarContentHeading.style="font-size:14px;font-family:inherit;padding-top:20px;padding-inline:20px;font-weight:600;color:black;",t.viewSideBarData=document.createElement("div"),t.viewSideBarData.innerHTML='\n <style>\n .apx-radio-buttons {\n accent-color: indianred;\n padding-block: 8px;\n padding-left:15px;\n }\n </style>\n <form id="apx-Form">\n <div class = "apx-radio-buttons">\n <input type="radio" name="apx-url" id="apx-suggested-match" value="Suggested Match" checked> <label for="apx-suggested-match" style="color:black;">Suggested Match</label></div>\n <div id="apx-selector" style="padding-top: 2px;\n padding-left: 6%;\n margin-left:20px;\n margin-right:20px;\n background-color:#f4f4f7;\n border:1px solid #dadce5;\n display:flex;\n border-radius:5px;\n flex-direction:column;\n">\n <div style="color:#6a6c75;font-size:17px;padding-top:10px">\n Selection\n </div>\n <div style="font-size:15px;padding-top:5px;color:black;">\n '.concat(t._viewSelectorFound,'\n </div>\n <input type="text" id="apx-selector-input-editable" style="margin-right:20px;height:30px;margin-top:5px;margin-bottom:20px;color:black;background-color:white;">\n </div>\n <div class = "apx-radio-buttons">\n <input type="radio" name="apx-url" value="Rule Builder" style="color:black" id="apx-rule-builder"> <label for="apx-rule-builder" style ="color:black;">Rule Builder</label></div>\n\n\n <div id="apx-rule-builder-container" style="padding-top: 2px;\n padding-left: 6%;\n margin-left:20px;\n margin-right:13px;\n padding-bottom:20px;\n background-color:#f4f4f7;\n border:1px solid #dadce5;\n display:none;\n border-radius:5px;\n flex-direction:column;\n">\n <div style="color:#6a6c75;font-size:17px;padding-top:10px">\n Selection\n </div>\n <div id ="apx-generated-selector"style="font-size:15px;padding-top:5px;color:black;">\n ').concat(t._viewSelectorFound,'\n </div>\n <div style ="border-radius:5px;border:1px solid #000;width:290px;margin-top:7px;"\n >\n <div style ="background-color:#dadce5;margin:10px;border:2px solid #babcc5;border-radius:5px;padding-bottom:8px;"> \n <div style="style="display:flex;flex-direction:row;flex-wrap: wrap;">\n <div id ="apx-selectors-selected-list-inbox"></div>\n </div>\n <div style="font-weight:300;font-size:15px;padding-top:5px;color:rgb(0,0,0,0.5);padding-left:5px;"> Choose from below to add the rule </div>\n <div style ="font-weight:600;padding-top:5px;padding-left:5px;color:black;">Selectors</div>\n <div id ="apx-selectors-unselected-list-inbox"></div>\n </div>\n </div>\n </div>\n </div>\n <div style = "font-size:15px;font-family:inherit;padding-top:20px;padding-inline:20px;display:flex;justify-content: space-between;align-items: center;">\n <style>\n /* The switch - the box around the slider */\n .switch {\n position: relative;\n display: inline-block;\n width: 40px; /* Adjusted width */\n height: 20px; /* Adjusted height */\n }\n\n /* Hide default HTML checkbox */\n .switch input {\n opacity: 0;\n width: 0;\n height: 0;\n }\n\n /* The slider */\n .slider {\n position: absolute;\n cursor: pointer;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n background-color: #ccc;\n -webkit-transition: .4s;\n transition: .4s;\n }\n\n .slider:before {\n position: absolute;\n content: "";\n height: 16px; /* Adjusted height */\n width: 16px; /* Adjusted width */\n left: 2px; /* Adjusted left position */\n bottom: 2px; /* Adjusted bottom position */\n background-color: white;\n -webkit-transition: .4s;\n transition: .4s;\n }\n\n input:checked + .slider {\n background-color: #2196F3;\n }\n\n input:focus + .slider {\n box-shadow: 0 0 1px #2196F3;\n }\n\n input:checked + .slider:before {\n -webkit-transform: translateX(20px); /* Adjusted translation */\n -ms-transform: translateX(20px); /* Adjusted translation */\n transform: translateX(20px); /* Adjusted translation */\n }\n\n /* Rounded sliders */\n .slider.round {\n border-radius: 20px; /* Adjusted border radius */\n }\n\n .slider.round:before {\n border-radius: 50%;\n }\n .apx-labelnames {\n font-family: inherit;\n font-weight: 600;\n line-height: 1em;\n font-size: 14px;\n color:black;\n }\n .apx-inputfields {\n width: 48%;\n padding-left: 10px;\n box-sizing: border-box;\n margin-top: 10px;\n background-color: #F7F8F8;\n border: 1px solid #dadce5;\n height: 40px;\n border-radius: 12px;\n color:black;\n } \n option {\n font-size: 16px;\n }\n .apx-inputfields::placeholder{\n font-family:inherit;\n font-weight:400;\n font-size: 14px;\n line-height: 14px;\n color:black;\n }\n .apx-inputfields:focus{\n outline: 2px solid #007aff;\n }\n #apx-dynamicURL::placeholder{\n font-family:monospace;\n }\n .apx-radio-buttons {\n accent-color: indianred;\n padding-block: 12px;\n }\n</style>\n\n<div style = "color: #2a2c35;font-weight: 600;font-size: 14px;">Enable Text Based Selection</div>\n<label class="switch">\n <input type="checkbox" id="apx-contentSearchToggleSwitch">\n <span class="slider round"></span>\n</label>\n</div>\n<div style = "padding-top: 10px;padding-inline: 20px;margin-block: 10px;color:black;">Conditionally show a guide if an element\'s text or number content matches a given condition.</div>\n<div id = "apx-ContentSearchBox" style= "display:none;padding-inline: 20px;margin-block: 10px;">\n <div style = "display: inline-flex; flex-direction: column; gap: 10px; margin-block: 10px; width: 48%;">\n <label class="apx-labelnames">Content Type</label>\n <select id="apx-content-type" required class="apx-inputfields" style="padding-left: 10px; width: 100%;">\n <option value="Text" style="color:black;">Text</option>\n <option value="Number" style="color:black;">Number</option>\n </select>\n </div>\n <div style = "display: flex; flex-direction: column; gap: 10px; margin-block: 10px;">\n <label class="apx-labelnames">Only display guide when the value of this element...</label>\n <div style = "display: flex; gap: 5px;">\n <select id="apx-text-content-conditions" required class="apx-inputfields" style="padding-left: 10px; display: block;">\n <option value="contains" style ="color:black;">Contains</option>\n <option value="does_not_contain" style ="color:black;">Does Not Contain</option>\n <option value="exactly_matches" style ="color:black;">Exactly Matches</option>\n <option value="does_not_match" style ="color:black;">Does Not Match</option>\n </select>\n <select id="apx-number-content-conditions" required class="apx-inputfields" style="padding-left: 10px; display: none;">\n <option value="EQ" style ="color:black;">Equals</option>\n <option value="NEQ" style ="color:black;">Not Equal To</option>\n <option value="GT" style ="color:black;">Is Greater than</option>\n <option value="LT" style ="color:black;">Is Less Than</option>\n </select>\n <input type="text" name="apx-dynamicContent" id="apx-dynamicContent" class="apx-inputfields" placeholder="placeholder" value="').concat(t._viewText,'"></div>\n </div>\n \n <div id = "status" style ="color:black;">Your rule <span id = "apx-does-not-pass" style="color: red; display: inline">does not pass</span> <span id = "apx-passes" style="color: green; display: none">passes</span> based on the current content of your target element (case-insensitive):</div>\n <div id = "apx-currentText" style = "border-left: 3px solid #eaecf1; padding-left: 10px; margin-top: 10px;color:black;">').concat(t._viewText,"</div>\n</div>\n </form>"),t.dynamicViewDetailsPage=document.createElement("div"),t.dynamicViewDetailsPage.id="apx-dynamic-view-page",t.dynamicViewDetailsPage.style="display:none;gap:7px;flex-basis: 84%;flex-direction:column",t.dynamicViewDetailsPage.innerHTML='\n <div style ="font-size:14px;font-weight:400;width:fit-content;padding-left:15px;padding-top:20px;padding-right:15px;font-family:Inter;text-align:justify;">Selectors are used to find features on your page. Apxor uses an exact match of the selector by default, but sometimes a more general match is useful.</div>\n <select id="apx-view-type" required class="apx-inputfields" style="padding-left: 5px;font-size:16px;height:39px;margin-left:20px;margin-right:20px">\n <option value="default" >Default</option>\n <option value="contains" >Contains</option>\n </select>\n <div class ="apx-current-selector" style ="font-size:14px;padding-top:5px;font-weight:500;font-family:Inter;padding-left:22px;"></div>\n <input type="text" class ="apx-selector-input" placeholder="Enter the part of selector" style="display:none;padding-left:10px;margin-left:20px;margin-right:20px;margin-top:5px;height:30px;">\n</div>\n ';var n=document.createElement("div");n.id="apx-footerButtonContainer",n.style="display:flex;justify-content: space-between;align-items: center;height: 100%;padding-inline: 10%;";var i=document.createElement("button");i.id="apx-cancel-viewpage",i.innerHTML="Cancel",i.style="display: none;background-color:#fff;color:#F97316;cursor:pointer;font-size:13px;font-weight:500;font-family:inherit;border-radius:11px;border:2px solid #F97316;padding: 12px;";var o=document.createElement("button");o.id="apx-apply-viewpage",o.innerHTML="Apply",o.style="display: none;background-color:#F97316;color:#fff;font-size:13px;align-items:center;font-weight:500;font-family:inherit;border-radius:11px;border:#F97316;padding-inline: 24px;padding-block: 12px;cursor:pointer;opacity:1;";var a=document.createElement("button");a.id="apx-submitButton",a.innerHTML="Save",a.style="margin-left:auto;display:block;background-color:#F97316;color:#fff;font-size:13px;align-items:center;font-weight:500;font-family:inherit;border-radius:11px;border:#F97316;padding-inline: 24px;padding-block: 12px;opacity:1;cursor:pointer";var r=document.createElement("button");(r.id="apx-cancel-viewpage-for-track-events",r.innerHTML="Cancel",r.style="display: block;background-color:#fff;color:#F97316;cursor:pointer;font-size:13px;font-weight:500;font-family:inherit;border-radius:11px;border:2px solid #F97316;padding: 12px;",e&&n.appendChild(r),n.appendChild(i),n.appendChild(o),n.appendChild(a),t.viewSideBarContainerFooter=document.createElement("div"),t.viewSideBarContainerFooter.id="apx-sidebar-container-footer",t.viewSideBarContainerFooter.appendChild(n),t.viewSideBarContainer.appendChild(t.viewSideBarContainerHeader),t.viewSideBarContent.appendChild(t.viewsideBarContentHeading),t.viewSideBarContent.appendChild(t.viewSideBarData),t.viewSideBarContainer.appendChild(t.viewSideBarContent),t.viewSideBarContainer.appendChild(t.dynamicViewDetailsPage),t.viewSideBarContainer.appendChild(t.viewSideBarContainerFooter),t._view_sideBar.appendChild(t.viewSideBarContainer),document.body.appendChild(t._view_sideBar),e)&&document.getElementById("apx-cancel-viewpage-for-track-events").addEventListener("click",(function(){var e,n=document.getElementById("apx-view-sidebar-root");n&&n.remove(),t._is_text_based=!1;var i=document.getElementById("apxor_sidebar");i&&i.remove(),t._targetElement&&t._targetElement.classList.remove("apx-highlight"),null===(e=t._show_hide_toggleElement)||void 0===e||e.remove();var o=document.querySelector(".apx-show-hide-button-class");o&&o.remove(),t.createEventsSideBar()}));var s=document.getElementById("apx-selectors-unselected-list-inbox");s.style="display:flex;flex-wrap:wrap;align-items:flex-start",t._selectors_list.forEach((function(e,t){var n="#"+(Math.random().toString(16)+"000000").slice(2,8),i='\n <div class="apx-selector-name" id = "apx-unselected-'.concat(t,'" style="background-color:#fff;border:2px solid ').concat(n,';font-family:inherit;border-radius:3px;box-sizing:border-box;font-size:12px;display:inline-flex;margin:5px 5px;padding:4px 8px;max-width:300px;text-align:left;overflow-wrap:anywhere;cursor:pointer;gap:3px;color:black;">\n <span style ="pointer-events:none">\n <svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-plus pendo-icon__content" aria-label="plus" display="block">\n <line x1="12" y1="5" x2="12" y2="19"></line>\n <line x1="5" y1="12" x2="19" y2="12"></line>\n </svg>\n </span>\n ').concat(e,"\n </div>\n "),o=document.createElement("div");o.innerHTML=i,s.appendChild(o)}));var l=document.getElementById("apx-selectors-selected-list-inbox");l.style="display:flex;flex-wrap:wrap;align-items:flex-start",t._selectors_list.forEach((function(e,t){var n="#"+(Math.random().toString(16)+"000000").slice(2,8),i='\n <div class="apx-selector-name" id = "apx-selected-'.concat(t,'" style="background-color:').concat(n,";border:2px solid ").concat(n,';font-family:inherit;border-radius:3px;box-sizing:border-box;font-size:12px;display:none;margin:5px 5px;padding:4px 8px;max-width:300px;text-align:left;overflow-wrap:anywhere;cursor:pointer;gap:3px;color:#fff">\n ').concat(e,'\n <span id="apx-settings-icon-selctor').concat(t,'" style ="padding-left:2px;padding-top:1px;display:none">\n <svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round" class="feather feather-settings pendo-icon__content" aria-label="settings" aria-hidden="true" display="block"><circle cx="12" cy="12" r="3"></circle><path d="M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1 2-2h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 2-2 2 2 0 0 1 2 2v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09a1.65 1.65 0 0 0-1.51 1z"></path></svg>\n </span>\n <span style ="pointer-events:none">\n <svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-x pendo-icon__content" aria-label="x" display="block"><line x1="18" y1="6" x2="6" y2="18"></line><line x1="6" y1="6" x2="18" y2="18"></line></svg>\n </span>\n </div>\n '),o=document.createElement("div");o.innerHTML=i,l.appendChild(o)}));var c=[];t._selectors_list.forEach((function(e,t){c.push("apx-selected-"+t)}));var d=[];t._selectors_list.forEach((function(e,t){d.push("apx-unselected-"+t)}));var p=document.getElementById("apx-selectors-unselected-list-inbox");p&&p.addEventListener("click",(function(e){var n,i;if(i=null===(n=e.target)||void 0===n?void 0:n.id){t._selected_element_details.push(e.target.innerText),t._selector_generated=t.generateElementDetails(t._selected_element_details);var o=document.getElementById("apx-generated-selector");o&&(o.innerText=t._selector_generated);var a,r,s,l=d.indexOf(i);if(l>=0)if(document.getElementById(i).style.display="none",a=c[l],document.getElementById(a).style.display="inline-flex",r=(r=e.target.innerText).replace(/ /g,"").replace(/\n/g,""))if("."===r[0]||"#"===r[0])(s=document.getElementById("apx-settings-icon-selctor".concat(l)))&&(s.style.display="flex",s.addEventListener("click",(function(){var e;if(e=document.getElementById("apx-dynamic-view-page")){e.style.display="flex";var t,n=document.getElementById("apx-view-sidebar-content");n&&(n.style.display="none"),(t=document.querySelector(".apx-current-selector"))&&(t.innerText=r);var i=document.getElementById("apx-submitButton");i&&(i.style.display="none");var o=document.getElementById("apx-cancel-viewpage-for-track-events");o&&(o.style.display="none");var a=document.getElementById("apx-cancel-viewpage");a&&(a.style.display="flex");var s=document.getElementById("apx-apply-viewpage");s&&(s.style.display="flex")}})))}}));var u,h,g=document.getElementById("apx-selectors-selected-list-inbox");g&&g.addEventListener("click",(function(e){var n,i;if(i=null===(n=e.target)||void 0===n?void 0:n.id){var o=c.indexOf(i);if(o>=0){var a=e.target.innerText;t._selected_element_details=t._selected_element_details.filter((function(e){return e!==a})),t._selector_generated=t.generateElementDetails(t._selected_element_details);var r,s=document.getElementById("apx-generated-selector");s&&(s.innerText=t._selector_generated),document.getElementById(i).style.display="none",r=d[o],document.getElementById(r).style.display="inline-flex"}}})),(u=document.getElementById("apx-suggested-match"))&&u.addEventListener("input",(function(){t._selector_category="default";var e=document.getElementById("apx-selector");"none"===e.style.display&&(e.style.display="flex");var n=document.getElementById("apx-rule-builder-container");n&&"flex"==n.style.display&&(n.style.display="none")})),(h=document.getElementById("apx-rule-builder"))&&h.addEventListener("input",(function(){t._selector_category="custom";var e=document.getElementById("apx-rule-builder-container");e&&"none"==e.style.display&&(e.style.display="flex");var n=document.getElementById("apx-selector");"flex"===n.style.display&&(n.style.display="none")}));var f=document.getElementById("apx-selector-input-editable"),m="".concat(t._viewSelectorFound);f.value=m;var _=function(){var e,n;contentBasedSearch(t._viewSelectionTarget,{type:t._text_type,op:"s"===t._text_type?t._content_op:t._number_op,content:null!==(e=null===(n=document.getElementById("apx-dynamicContent"))||void 0===n?void 0:n.value)&&void 0!==e?e:""})?(document.getElementById("apx-does-not-pass").style.display="none",document.getElementById("apx-passes").style.display="inline"):(document.getElementById("apx-does-not-pass").style.display="inline",document.getElementById("apx-passes").style.display="none")},v=document.getElementById("apx-dynamicContent");v&&v.addEventListener("input",(function(){_()}));var b=document.getElementById("apx-content-type");b&&b.addEventListener("change",(function(){"Text"===b.value?(t._text_type="s",document.getElementById("apx-text-content-conditions").style.display="block",document.getElementById("apx-number-content-conditions").style.display="none",document.getElementById("apx-currentText").innerHTML=t._viewText,v.type="text",v.value=t._viewText):(t._text_type="n",document.getElementById("apx-text-content-conditions").style.display="none",document.getElementById("apx-number-content-conditions").style.display="block",v.type="number",isNumber$2(t._viewText)?(document.getElementById("apx-currentText").innerHTML=t._viewText,v.value=t._viewText):(document.getElementById("apx-currentText").innerHTML="No numbers detected",v.value="",v.placeholder="Value to match")),_()}));var y=document.getElementById("apx-contentSearchToggleSwitch");y&&y.addEventListener("change",(function(){y.checked?(t._is_text_based=!0,document.getElementById("apx-ContentSearchBox").style.display="block",_()):(t._is_text_based=!1,document.getElementById("apx-ContentSearchBox").style.display="none")}));var x=document.getElementById("apx-cancel-viewpage");x&&x.addEventListener("click",(function(){var e;(e=document.getElementById("apx-view-sidebar-content"))&&(e.style.display="flex");var t=document.getElementById("apx-dynamic-view-page");if(t){t.style.display="none",a.style.display="block",i.style.display=o.style.display="none";var n=document.getElementById("cancel_button_for_track_events");n&&(n.style.display="block")}}));var w=document.getElementById("apx-apply-viewpage");w&&w.addEventListener("click",(function(){t.applyViewPageHandling()}));var C,E,k=document.getElementById("apx-view-closeSideBar");k&&k.addEventListener("click",(function(){var n;document.getElementById("apx-view-sidebar-root").remove(),null===(n=t._show_hide_toggleElement)||void 0===n||n.remove();var i=document.querySelector(".apx-show-hide-button-class");i&&i.remove(),t._viewSelectionTarget&&t._viewSelectionTarget.classList.remove("apx-highlight"),e&&(t.startTrackingButton.style.display="block",t._targetElement&&t._targetElement.classList.remove("apx-highlight"))})),(C=document.getElementById("apx-text-content-conditions"))&&C.addEventListener("change",(function(e){t._content_op=e.target.value,_()})),(E=document.getElementById("apx-number-content-conditions"))&&E.addEventListener("change",(function(e){t._number_op=e.target.value,_()})),document.addEventListener("input",(function(){if(document.getElementById("apx-view-sidebar-root"))if("none"!==t.viewSideBarContent.style.display){var e,n=!1;y.checked?document.getElementById("apx-dynamicContent").required=!0:document.getElementById("apx-dynamicContent").required=!1,(u.checked&&""===f.value||h.checked&&0===l.childElementCount||y.checked&&""===(null===(e=document.getElementById("apx-dynamicContent"))||void 0===e?void 0:e.value))&&(n=!0),n?(a.disabled=!0,a.style.opacity=.2,a.style.cursor="not-allowed"):(a.disabled=!1,a.style.opacity=1,a.style.cursor="pointer")}else if("none"!==t.dynamicViewDetailsPage.style.display){var i=!1;"contains"===document.getElementById("apx-view-type").value&&""===document.querySelector(".apx-selector-input").value&&(i=!0),i?(o.disabled=!0,o.style.opacity=.2,o.style.cursor="not-allowed"):(o.disabled=!1,o.style.opacity=1,o.style.cursor="pointer")}})),a.addEventListener("click",(function(e){e.preventDefault(),document.getElementById("apx-Form").requestSubmit()})),document.getElementById("apx-Form").addEventListener("submit",(function(n){var i,o,a;n.preventDefault(),"default"==t._selector_category?(o=document.getElementById("apx-selector-input-editable"),t._selectorToBeSent=o.value):"custom"==t._selector_category&&(o=document.getElementById("apx-generated-selector"),t._selectorToBeSent=o.innerText),null===(a=null===(i=document.getElementById("apx-dynamicContent"))||void 0===i?void 0:i.value)&&(a=""),t._dynamic_content_updated=a,t._selectorToBeSent=enclosePartialAttributes(t._selectorToBeSent);var r={id:t._selectorToBeSent,is_content_based:t._is_text_based,content:{}};if(t._viewSelectionTarget&&t._viewSelectionTarget.classList.remove("apx-highlight"),r.is_content_based&&(r.content={type:t._text_type,op:"s"===t._text_type?t._content_op:t._number_op,content:a},t._avf_updated_content=r.content),e){var s;null===(s=t._show_hide_toggleElement)||void 0===s||s.remove();var l,c=document.querySelector(".apx-show-hide-button-class");c&&c.remove(),document.getElementById("apx-view-sidebar-root").style.display="none",l=getElementFromSelector(t._selectorToBeSent,"",t._is_text_based,r.content),t._targetElement&&t._targetElement.classList.remove("apx-highlight"),l&&(t._targetElement=l,t._targetElement.classList.add("apx-highlight")),t.createEventsSideBar(!0,!0)}else{var d;t._makeSSERequest("view",location.href,t._selectorToBeSent,(function(){}),(function(){}),r),(d=document.getElementById("apx-view-sidebar-root"))&&d.remove();var p=document.getElementById("apx-show-hide-icon");p&&p.remove()}document.querySelector(".apx-ddisvg").style.animation="bounce 2s infinite"})),document.getElementById("apx-view-type").addEventListener("change",(function(){var e=document.querySelector(".apx-selector-input"),t=this.value;e.style.display="contains"===t?"block":"none"}))})),_defineProperty$1(this,"applyViewPageHandling",(function(){var e,n;if("contains"===(n=document.getElementById("apx-view-type")).value){var i,o=document.querySelector(".apx-selector-input"),a=document.querySelector(".apx-current-selector");if("."===a.innerText[0]?i="[class*=".concat(o.value,"]"):"#"===a.innerText[0]&&(i="[id*=".concat(o.value,"]")),i){var r;t._selected_element_details=t._selected_element_details.map((function(e){return e.replace(a.innerText,i)})),a.innerText.startsWith("#")&&(r="[id*=".concat(a.innerText.substring(1),"]")),a.innerText.startsWith(".")&&(r="[class*=".concat(a.innerText.substring(1),"]")),t._selected_element_details=t._selected_element_details.map((function(e){return e.replace(r,i)})),t._selector_generated=t.generateElementDetails(t._selected_element_details);var s=document.getElementById("apx-generated-selector");s&&(s.innerText=t._selector_generated);var l=t.findIndexAfterNormalization(t._selectors_list,a.innerText);if(-1===l&&(l=t.findIndexAfterNormalization(t._selectors_list,r)),l>=0){var c,d;c=document.querySelector(".apx-current-selector");for(var p=0;p<t._selectors_list.length;p++){var u;t._selectors_list[p]===(null===(u=c)||void 0===u?void 0:u.innerText)&&(t._selectors_list[p]=i)}"."==c.innerText[0]&&(d="[class*=".concat(c.innerText.substring(1),"]")),"#"==c.innerText[0]&&(d="[id*=".concat(c.innerText.substring(1),"]"));for(var h=0;h<t._selectors_list.length;h++)t._selectors_list[h]===d&&(t._selectors_list[h]=i);var g=document.getElementById("apx-selected-".concat(l));g&&(g.innerHTML="\n ".concat(i,'\n <span id="apx-settings-icon-selctor').concat(l,'" style ="padding-left:2px;padding-top:1px;display:block">\n <svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round" class="feather feather-settings pendo-icon__content" aria-label="settings" aria-hidden="true" display="block"><circle cx="12" cy="12" r="3"></circle><path d="M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1 2-2h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 2-2 2 2 0 0 1 2 2v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09a1.65 1.65 0 0 0-1.51 1z"></path></svg>\n </span>\n <span style ="pointer-events:none">\n <svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-x pendo-icon__content" aria-label="x" display="block"><line x1="18" y1="6" x2="6" y2="18"></line><line x1="6" y1="6" x2="18" y2="18"></line></svg>\n </span>\n '));var f=document.getElementById("apx-unselected-".concat(l));f&&(f.innerHTML='<span style ="pointer-events:none">\n <svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-plus pendo-icon__content" aria-label="plus" display="block">\n <line x1="12" y1="5" x2="12" y2="19"></line>\n <line x1="5" y1="12" x2="19" y2="12"></line>\n </svg>\n </span>\n '.concat(i));var m=document.getElementById("apx-settings-icon-selctor".concat(l));m&&(m.style.display="flex",m.addEventListener("click",(function(){var e;if(e=document.getElementById("apx-dynamic-view-page")){e.style.display="flex";var t,n=document.getElementById("apx-view-sidebar-content");n&&(n.style.display="none"),(t=document.querySelector(".apx-current-selector"))&&((i.startsWith("[class")||"."==i[0])&&(t.innerText=".".concat(o.value)),(i.startsWith("[id")||"id"==i[0])&&(t.innerText="#".concat(o.value)));var a=document.getElementById("apx-submitButton");a&&(a.style.display="none");var r=document.getElementById("apx-cancel-viewpage");r&&(r.style.display="flex");var s=document.getElementById("apx-apply-viewpage");s&&(s.style.display="flex");var l=document.getElementById("apx-cancel-viewpage");l&&l.addEventListener("click",(function(){var e;(e=document.getElementById("apx-view-sidebar-content"))&&(e.style.display="flex");var t,n,i=document.getElementById("apx-dynamic-view-page");i&&(i.style.display="none",document.getElementById("apx-submitButton").style.display="block",t=document.getElementById("apx-cancel-viewpage"),n=document.getElementById("apx-apply-viewpage"),t.style.display=n.style.display="none")}))}})))}(e=document.getElementById("apx-view-sidebar-content"))&&(e.style.display="flex");var _,v,b,y=document.getElementById("apx-dynamic-view-page");if(y)y.style.display="none",document.getElementById("apx-submitButton").style.display="block",_=document.getElementById("apx-cancel-viewpage"),v=document.getElementById("apx-apply-viewpage"),_.style.display=v.style.display="none";if(null!=l)null===(b=document.getElementById("apx-settings-icon-selctor".concat(l)))||void 0===b||b.addEventListener("click",(function(){var e;if(e=document.getElementById("apx-dynamic-view-page")){e.style.display="flex";var t,n=document.getElementById("apx-view-sidebar-content");n&&(n.style.display="none"),(t=document.querySelector(".apx-current-selector"))&&((i.startsWith("[class")||"."==i[0])&&(t.innerText=".".concat(o.value)),(i.startsWith("[id")||"id"==i[0])&&(t.innerText="#".concat(o.value)));var a=document.getElementById("apx-submitButton");a&&(a.style.display="none");var r=document.getElementById("apx-cancel-viewpage");r&&(r.style.display="flex");var s=document.getElementById("apx-apply-viewpage");s&&(s.style.display="flex")}}))}}else if("default"===n.value){var x;(x=document.getElementById("apx-view-sidebar-content"))&&(x.style.display="flex");var w,C,E=document.getElementById("apx-dynamic-view-page");if(E)E.style.display="none",document.getElementById("apx-submitButton").style.display="block",w=document.getElementById("apx-cancel-viewpage"),C=document.getElementById("apx-apply-viewpage"),w.style.display=C.style.display="none"}})),_defineProperty$1(this,"findIndexAfterNormalization",(function(e,t){for(var n=t.replace(/\n/g,"").replace(/\s/g,""),i=0;i<e.length;i++){if(e[i].replace(/\n/g,"").replace(/\s/g,"")===n)return i}return-1})),_defineProperty$1(this,"generateSelectorslist",(function(e){var t=[];return t.push(e.tagName.toLowerCase()),e.id&&t.push("#".concat(e.id)),e.classList.length>0&&e.classList.forEach((function(e){t.push(".".concat(e))})),Array.from(e.attributes).forEach((function(e){"id"!==e.name&&"class"!==e.name&&t.push("[".concat(e.name,'="').concat(e.value,'"]'))})),t})),_defineProperty$1(this,"isTagName",(function(e){return!e.startsWith(".")&&!e.startsWith("#")&&!e.startsWith("[")})),_defineProperty$1(this,"generateElementDetails",(function(e){var n,i=t.hasTagName(e),o=e.filter((function(e){return e.startsWith(".")})).map((function(e){return e.slice(1)})),a=(null===(n=e.find((function(e){return e.startsWith("#")})))||void 0===n?void 0:n.slice(1))||"",r=e.filter((function(e){return e.startsWith("[")})).map((function(e){return e.slice(1,-1)}));return t.constructSelector(i,o,a,r)})),_defineProperty$1(this,"constructSelector",(function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],o=e;return n&&(n.startsWith("[")?o+="".concat(n):o+="#".concat(n)),t.length>0&&t.forEach((function(e){if(e.startsWith("["))o+="".concat(e);else{var t=e.match(/^\[.*\]$/);o+=t?t[0]:".".concat(e)}})),i.length>0&&i.forEach((function(e){o+="[".concat(e,"]")})),""===o?o:o.trim()})),_defineProperty$1(this,"createNewWYSIWYGForTrackingPages",(function(){var e;t._currentURL=null===(e=window)||void 0===e||null===(e=e.location)||void 0===e?void 0:e.href,t._newwysiswg=document.createElement("div"),t._newwysiswg.id="apx-wr",t._newwysiswg.classList.add("apx-wrclass"),t._newwysiswg.style="z-index:99999999;visibility:visible;position:fixed;width:260px;height:50px;top:0%;left:50%;transform:translate(-50%, 0%);background:#F2F2F2;opacity:1;font-size:24px;color:white;transition:all .3s ease-out;border-radius:0%;border-bottom-left-radius:50cm;border-bottom-right-radius:50cm; user-select: none;box-shadow: rgb(0, 0, 0, 0.4) 0px 0px 6px 0px;",t.wysiwg_container=document.createElement("div"),t.wysiwg_container.classList.add("apx-wcclass"),t.wysiwg_container.style="position:relative;top:0%;left:0%;display:flex;flex-direction:row;height:50px;",t.imgContainer=document.createElement("div"),t.imgContainer.classList.add("apx-icclass"),t.imgContainer.style="background-color:#002845;border-bottom-left-radius:50cm;padding: 4px 25px 4px 30px;",t.imgContainer.innerHTML='<svg xmlns="http://www.w3.org/2000/svg" width="20" height="31" viewBox="0 0 20 31" fill="none">\n<path fill-rule="evenodd" clip-rule="evenodd" d="M18.6546 0.285222C19.1759 0.714811 19.2404 1.47412 18.7988 1.98119L7.59849 14.8419H4.48593L0.274291 9.76354C-0.154672 9.2463 -0.0713816 8.48872 0.460326 8.07143C0.992033 7.65414 1.77081 7.73516 2.19977 8.2524L5.66873 12.4352H6.45197L16.9112 0.425515C17.3528 -0.0815556 18.1333 -0.144367 18.6546 0.285222Z" fill="#FF7F33"/>\n<path fill-rule="evenodd" clip-rule="evenodd" d="M18.7534 30.7146C19.2746 30.285 19.3391 29.5257 18.8974 29.0187L8.08905 16.6122H5.04724L0.974613 21.5213C0.545563 22.0385 0.628726 22.7961 1.16036 23.2135C1.692 23.6308 2.47079 23.5499 2.89984 23.0328L6.22979 19.0189H6.94278L17.01 30.5746C17.4517 31.0816 18.2323 31.1443 18.7534 30.7146Z" fill="#00BDE1"/>\n</svg>',t.dropDownContainer=document.createElement("div"),t.dropDownContainer.classList.add("apx-ddcclass"),t.dropDownContainer.style="width:100%; display:flex; align-items: center;justify-content: center; cursor: pointer",t.dropDownText=document.createElement("div"),t.dropDownText.classList.add("apx-ddtclass"),t.dropDownText.style="color:black; font-size: 17px;",t.dropDownText.innerHTML="Track Pages",t.dropDownImage=document.createElement("div"),t.dropDownImage.classList.add("apx-ddiclass"),t.dropDownImage.style="margin-left:12px; margin-top:2px;",t.dropDownImage.innerHTML='<style>@keyframes bounce {0%, 20%, 50%, 80%, 100% {transform: translateY(0);}40% {transform: translateY(-8px);}60% {transform: translateY(-4px);}}</style><svg class = "apx-ddisvg" width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg" style = "animation: bounce 2s infinite;"><path class = "apx-" d="M2.26544 5.21182C2.19383 5.14415 2.1096 5.09126 2.01756 5.05614C1.92551 5.02103 1.82745 5.00439 1.72897 5.00718C1.6305 5.00997 1.53353 5.03212 1.44362 5.07238C1.3537 5.11264 1.2726 5.17021 1.20494 5.24182C1.13727 5.31342 1.08438 5.39765 1.04926 5.4897C1.01415 5.58174 0.997514 5.6798 1.0003 5.77828C1.00309 5.87676 1.02524 5.97372 1.0655 6.06364C1.10576 6.15355 1.16333 6.23465 1.23494 6.30232L7.98494 12.6773C8.12419 12.809 8.30855 12.8823 8.50019 12.8823C8.69182 12.8823 8.87618 12.809 9.01544 12.6773L15.7662 6.30232C15.8394 6.2351 15.8984 6.15401 15.94 6.06377C15.9816 5.97352 16.0048 5.87592 16.0083 5.77662C16.0119 5.67733 15.9956 5.57832 15.9606 5.48535C15.9255 5.39239 15.8723 5.30731 15.8041 5.23507C15.7359 5.16283 15.654 5.10486 15.5632 5.06454C15.4724 5.02421 15.3745 5.00233 15.2751 5.00017C15.1758 4.99801 15.077 5.0156 14.9845 5.05194C14.8921 5.08827 14.8077 5.14262 14.7364 5.21182L8.50019 11.1008L2.26544 5.21182Z" fill="black"/></svg>',t.dropDownContainer.appendChild(t.dropDownText),t.dropDownContainer.appendChild(t.dropDownImage),t.dropDownContainer.onclick=function(e){e.stopImmediatePropagation(),t.dropDownBox.style.display=t.dropDownExpanded?"none":"block",t.dropDownExpanded=!t.dropDownExpanded,document.querySelector(".apx-ddisvg")&&(document.querySelector(".apx-ddisvg").style.animation="none"),t.dismissDropDownOutsideClick=function(){t.dropDownExpanded&&(t.dropDownBox.style.display="none",t.dropDownExpanded=!1,document.querySelector(".apx-ddisvg")&&(document.querySelector(".apx-ddisvg").style.animation="bounce 2s infinite"),document.body.removeEventListener("click",t.dismissDropDownOutsideClick))},document.body.addEventListener("click",t.dismissDropDownOutsideClick)},t.dropDownBox=document.createElement("div"),t.dropDownBox.classList.add("apx-ddbclass"),t.dropDownBox.style="position: absolute; background-color: #ffffff; margin-top: 4px; box-shadow: rgb(0, 0, 0, 0.4) 0px 0px 6px 0px;display: none;transform: translate(10%, 0px);border-radius: 12px; width: 220px",t.dropDownBox.innerHTML='\n <style>\n .apx-b {\n background: none;\n color: black;\n border-radius: 12px;\n border: 0px;\n padding-block: 8px;\n padding-inline: 16px;\n display: block;\n font-size: 16px;\n }\n .apx-b:hover {\n background-color: rgba(255, 199, 39, 0.10);\n color: #F97316;\n}\n </style>\n <div id="apx-bh" class="apx-cr apx-bh" style="padding:12px; display: flex; flex-direction: column; gap: 8px;">\n <button class="apx-b" id="apx-start" style="display: block">\n Start Tracking\n </button>\n <button class="apx-b" id="apx-stop" style="display:block">\n Stop Tracking\n </button>\n </div>',t.wysiwg_container.appendChild(t.imgContainer),t.wysiwg_container.appendChild(t.dropDownContainer),t._newwysiswg.appendChild(t.wysiwg_container),t._newwysiswg.appendChild(t.dropDownBox),document.body.appendChild(t._newwysiswg),t.createSideForPagesSelection(),t.startTrackingButton=document.getElementById("apx-start"),t.stopTrackingButton=document.getElementById("apx-stop"),t.startTrackingButton.addEventListener("click",t.showSideBarForPagesSelection),t.stopTrackingButton.addEventListener("click",(function(){document.body.removeChild(t._newwysiswg),document.body.removeChild(t.sideBarRoot),t.removeWidgetDetails();var e=document.getElementById("apx-show-hide-icon");e&&e.remove(),t._targetElement&&t._targetElement.classList.remove("apx-highlight")}))})),_defineProperty$1(this,"createSideForPagesSelection",(function(){var e;t.sideBarRoot=document.createElement("div"),t.sideBarRoot.id="apx-sidebar-root",t.sideBarStyles=document.createElement("style"),t.sideBarStyles.innerHTML="#apx-sidebar-root {\n z-index: 99999999;\n position: fixed;\n top: 0;\n right: -370px; /* initially hide sidebar */\n width: 370px;\n height: 100%;\n background-color: #fff;\n box-shadow: -2px 0px 25.600000381469727px 0px #0000001A;\n transition: left 0.3s ease; /* animate the left property */\n}\n\n#apx-sidebar-root.apx-sidebar-open {\n right: 0; /* display sidebar */\n}\n\n#apx-sidebar-container {\n display: flex;\n flex-direction: column;\n height: 100%;\n}\n\n#apx-sidebar-container-header {\n line-height: 21.78px;\n font-family: inherit;\n font-weight: 500;\n font-size: 18px;\n padding-left: 10%;\n display: flex;\n align-items: center;\n flex-basis: 8%;\n background-color: rgb(0, 40, 69);\n color: white;\n}\n#apx-sidebar-container-content {\n overflow-y: auto;\n flex-basis: 84%;\n}\n#apx-sidebar-container-footer {\n flex-basis: 8%;\n background-color: #F5F5F5;\n}",t.sideBarRoot.appendChild(t.sideBarStyles),t.sideBarContainer=document.createElement("div"),t.sideBarContainer.id="apx-sidebar-container",t.sideBarContainerHeader=document.createElement("div"),t.sideBarContainerHeader.id="apx-sidebar-container-header",t.sideBarContainerHeader.style="position: relative;";t.sideBarContainerHeader.innerHTML='<span>Track Page</span> <div id = "apx-closeSideBar" style = "position:absolute; top:50%; right:30px;transform: translate(0px, -50%); cursor:pointer;">'.concat('<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-x" width="24" height="24" viewBox="0 0 24 24" stroke-width="1.5" stroke="#ffffff" fill="none" stroke-linecap="round" stroke-linejoin="round">\n <path stroke="none" d="M0 0h24v24H0z" fill="none"/>\n <path d="M18 6l-12 12" />\n <path d="M6 6l12 12" />\n</svg>',"</div>"),t.sideBarContainerContent=document.createElement("div"),t.sideBarContainerContent.id="apx-sidebar-container-content",t.sideBarContentPage1=document.createElement("div"),t.sideBarContentPage1.id="apx-sidebar-content-page1",t.sideBarContentPage1.style="height: 100%;flex-direction: column; display: flex; gap: 15px;justify-content: center; align-items: center;";var n=document.createElement("div");n.classList.add("apx-sidebar-icclass"),n.style="text-align: center;",n.innerHTML='<svg width="63" height="63" viewBox="0 0 63 63" fill="none" xmlns="http://www.w3.org/2000/svg">\n<circle cx="31.5" cy="31.5" r="31.5" fill="#F5F5F5"/>\n<mask id="mask0_486_3281" style="mask-type:alpha" maskUnits="userSpaceOnUse" x="0" y="0" width="63" height="63">\n<circle cx="31.5" cy="31.5" r="31.5" fill="#F4FBFF"/>\n</mask>\n<g mask="url(#mask0_486_3281)">\n<path d="M105.511 10.3516H17.0739C14.7282 10.3516 12.8267 12.2532 12.8267 14.5988V48.3711C12.8267 50.7167 14.7282 52.6183 17.0739 52.6183H105.511C107.857 52.6183 109.758 50.7167 109.758 48.3711V14.5988C109.758 12.2532 107.857 10.3516 105.511 10.3516Z" fill="white"/>\n<path d="M108.245 10.3516H14.3397C13.5041 10.3516 12.8267 11.029 12.8267 11.8647C12.8267 12.7003 13.5041 13.3777 14.3397 13.3777H108.245C109.081 13.3777 109.758 12.7003 109.758 11.8647C109.758 11.029 109.081 10.3516 108.245 10.3516Z" fill="#263238"/>\n<path d="M15.7465 11.8629C15.7465 12.1992 15.4739 12.4717 15.1377 12.4717C14.8015 12.4717 14.5254 12.1992 14.5254 11.8629C14.5254 11.5267 14.7979 11.2542 15.1342 11.2542C15.4704 11.2542 15.7465 11.5267 15.7465 11.8629Z" fill="#FFC727"/>\n<path d="M18.2346 11.8629C18.2346 12.1992 17.9621 12.4717 17.6259 12.4717C17.2896 12.4717 17.0171 12.1992 17.0171 11.8629C17.0171 11.5267 17.2896 11.2542 17.6259 11.2542C17.9621 11.2542 18.2346 11.5267 18.2346 11.8629Z" fill="white"/>\n<path d="M20.7263 11.8629C20.7263 12.1992 20.4538 12.4717 20.1176 12.4717C19.7813 12.4717 19.5088 12.1992 19.5088 11.8629C19.5088 11.5267 19.7813 11.2542 20.1176 11.2542C20.4538 11.2542 20.7263 11.5267 20.7263 11.8629Z" fill="#455A64"/>\n<path d="M98.7756 27.9244H23.7631C21.5465 27.9244 19.7495 29.7213 19.7495 31.938C19.7495 34.1546 21.5465 35.9516 23.7631 35.9516H98.7756C100.992 35.9516 102.789 34.1546 102.789 31.938C102.789 29.7213 100.992 27.9244 98.7756 27.9244Z" fill="#EBEBEB"/>\n<path d="M39.3503 39.3599H23.4092C21.388 39.3599 19.7495 40.9984 19.7495 43.0196C19.7495 45.0408 21.388 46.6793 23.4092 46.6793H39.3503C41.3715 46.6793 43.01 45.0408 43.01 43.0196C43.01 40.9984 41.3715 39.3599 39.3503 39.3599Z" fill="#FFC727"/>\n<path d="M52.4673 42.7374L53.8229 46.0112L52.4673 46.574L51.1047 43.2753L48.8643 45.0132V35.7861L55.3271 42.3091L52.4673 42.7374Z" fill="#263238"/>\n<path d="M49.3384 33.7333V31.5" stroke="#263238" stroke-width="0.353933" stroke-miterlimit="10"/>\n<path d="M46.7939 34.827L45.2153 33.2484" stroke="#263238" stroke-width="0.353933" stroke-miterlimit="10"/>\n<path d="M45.767 37.4001H43.5337" stroke="#263238" stroke-width="0.353933" stroke-miterlimit="10"/>\n<path d="M46.8608 39.9448L45.2822 41.5269" stroke="#263238" stroke-width="0.353933" stroke-miterlimit="10"/>\n<path d="M49.4341 40.9713V43.2046" stroke="#263238" stroke-width="0.353933" stroke-miterlimit="10"/>\n<path d="M51.9785 39.8776L53.5606 41.4596" stroke="#263238" stroke-width="0.353933" stroke-miterlimit="10"/>\n<path d="M53.0049 37.3045H55.2382" stroke="#263238" stroke-width="0.353933" stroke-miterlimit="10"/>\n<path d="M51.9116 34.7598L53.4937 33.1812" stroke="#263238" stroke-width="0.353933" stroke-miterlimit="10"/>\n</g>\n</svg>';var i=document.createElement("div");i.innerHTML="<span>Click the button below to define a new page</span>",i.style="width:60%;color:#989cab;font-size:13px;text-align:center;";var o=document.createElement("div");o.style.textAlign="center";var a=document.createElement("button");a.innerHTML="Define Page",a.style="background-color:#F97316;color:#fff;font-size:13px;align-items:center;font-weight:500;font-family:inherit;height:40px;width:120px;border-radius:11px;border:#F97316;cursor:pointer;",o.appendChild(a),a.onclick=function(){t.showEventDefiningPage()},t.sideBarContentPage1.appendChild(n),t.sideBarContentPage1.appendChild(i),t.sideBarContentPage1.appendChild(o),t.sideBarContentPage2=document.createElement("div"),t.sideBarContentPage2.id="apx-sidebar-content-page2",t.sideBarContentPage2.style="height: 100%;padding-left: 10%;padding-top: 8%;display:none;",t.sideBarContentPage2.innerHTML='\n <style>\n .apx-labelnames {\n font-family: inherit;\n font-weight: 500;\n line-height: 14.52px;\n font-size: 12px;\n color:black;\n }\n .apx-inputfields {\n padding-left: 10%;\n box-sizing: border-box;\n margin-top: 10px;\n background-color: #F7F8F8;\n border: none;\n width: 90%;\n height: 56px;\n border-radius: 12px;\n color:black;\n }\n .apx-inputfields::placeholder{\n font-family:inherit;\n font-weight:400;\n font-size: 14px;\n line-height: 14px;\n color:black;\n }\n .apx-inputfields:focus{\n outline: 2px solid #007aff;\n }\n #apx-dynamicURL::placeholder{\n font-family:monospace;\n }\n .apx-radio-buttons {\n accent-color: indianred;\n padding-block: 12px;\n }\n </style>\n <form id="apx-Form">\n <label for="name" class="apx-labelnames">Name</label>\n <span style="color: red; font-size: smaller;">*</span><br>\n <input type="text" id="apx-evname" required class="apx-inputfields" placeholder="Enter page name"><br><br>\n <label for="description" class="apx-labelnames">Description</label><br>\n <input type="text" id="apx-evDescription" class="apx-inputfields" placeholder="Enter page description"><br><br>\n \n <label for="type" class="apx-labelnames">Type</label><br>\n <select id="apx-evtype" required class="apx-inputfields" style="padding-left: 10%">\n <option value="app_event">App Events</option>\n <option value="client_event">Client Events</option>\n </select><br><br>\n <div style = "display: flex; flex-direction: column; gap: 10px">\n <div class="apx-labelnames">Event Attributes</div>\n <div style="display: flex; flex-direction: column; gap: 10px">\n <input type="text" id="attr-addtInfo-name" placeholder="Name" class="apx-inputfields"/>\n <select id="attr-addtInfo-type" class="apx-inputfields">\n <option value="target" style="font-size:14px;font-weight:500;font-style:Roboto">Value</option>\n <option value="target_TEXTNODE" style="font-size:14px;font-weight:500;font-style:Roboto">Value in TextNode only</option>\n <option value="captured" style="font-size:14px;font-weight:500;font-style:Roboto">Captured Values</option>\n <option value="storage" style="font-size:14px;font-weight:500;font-style:Roboto">Storage</option>\n <option value="tabList" style="font-size:14px;font-weight:500;font-style:Roboto">Tab List</option>\n <option value="text_present" style="font-size:14px;font-weight:500;font-style:Roboto">Check if input entered</option>\n <option value="default" style="font-size:14px;font-weight:500;font-style:Roboto">Default</option>\n </select>\n <input type="text" id="attr-addtInfo-value" placeholder="Value" class="apx-inputfields"/>\n <button id="attr-addtInfo-addBtn" style="height:42px;background-color:#EDEEF3;color:#313957;border:none;border-radius:12px;cursor:pointer;font-size:14px;flex-shrink:0;margin-right:15px;">Add Attribute</button>\n <div>\n <h3 style="color:#fffff;height:25px;font-size:13px;font-weight:500;display:flex;align-items:center;">Selected Attributes:</h3>\n <ul class="attr-addtInfo-attribute-list"></ul>\n </div>\n </div>\n </div>\n <div class = "apx-radio-buttons">\n <input type="checkbox" name="apx-feature-flag" id="apx-feature-flag"> <label for="apx-feature-flag">Mark as Feature</label></div>\n <div class="apx-labelnames"><label>URL</label></div>\n <div class = "apx-radio-buttons">\n <input type="radio" name="apx-url" id="apx-this-page" value="Only on this page" checked> <label for="apx-this-page">Only on this page</label></div>\n <div id="apx-extraField-url" style="display: block;padding-top: 2px;\n padding-left: 6%;\n font-family: monospace;\n font-weight: 400;\n color: #007aff;">\n <span id ="apx_current_url">'.concat(t._currentURL,'</span><br>\n </div>\n <div class = "apx-radio-buttons">\n <input type="radio" name="apx-url" value="On urls that match" id="apx-selectDynamicUrl"> <label for="apx-selectDynamicUrl">On urls that match</label></div>\n <div id="apx-extraField" style="display: none;">\n <input type="url" name="apx-dynamicURL" id="apx-dynamicURL" class="apx-inputfields" required placeholder=').concat(t._currentURL,'><div style="padding-top: 4px;"><span style="font-size: 12px;"><strong>Note:</strong> Replace all the dynamic parts with *</div><br>\n </div>\n <div class = "apx-radio-buttons">\n <input type="radio" name="apx-url" id="apx-all-pages" value="All pages"> <label for="apx-all-pages">All pages</label></div><br>\n \n </form>');var r=document.createElement("div");r.id="apx-footerButtonContainerPage2",r.style="display:none;justify-content: space-between;align-items: center;height: 100%;padding-inline: 10%;";var s=document.createElement("button");s.id="apx-footerbutton1-page2",s.innerHTML="Cancel",s.style="background-color:#fff;color:#F97316;cursor:pointer;font-size:13px;font-weight:500;font-family:inherit;border-radius:11px;border:2px solid #F97316;padding: 12px;";var l=document.createElement("button");l.id="apx-submitButton",l.innerHTML="Save",l.disabled=!0,l.style="background-color:#F97316;color:#fff;font-size:13px;align-items:center;font-weight:500;font-family:inherit;border-radius:11px;border:#F97316;padding-inline: 24px;padding-block: 12px;opacity:0.2;cursor:not-allowed",r.appendChild(s),r.appendChild(l),t.sideBarContainerFooter=document.createElement("div"),t.sideBarContainerFooter.id="apx-sidebar-container-footer",t.sideBarContainerContent.appendChild(t.sideBarContentPage1),t.sideBarContainerContent.appendChild(t.sideBarContentPage2),t.sideBarContainerFooter.appendChild(r),t.sideBarContainer.appendChild(t.sideBarContainerHeader),t.sideBarContainer.appendChild(t.sideBarContainerContent),t.sideBarContainer.appendChild(t.sideBarContainerFooter),t.sideBarRoot.appendChild(t.sideBarContainer),document.body.appendChild(t.sideBarRoot),t._eventAttributeHandler();var c=document.getElementById("apx-feature-flag");c.addEventListener("change",(function(){c.checked?t._feature_field=!0:t._feature_field=!1})),s.addEventListener("click",(function(){document.getElementById("apx-Form").reset(),t.sideBarContentPage1.style.display="flex",t.sideBarContentPage2.style.display="none",document.getElementById("apx-footerButtonContainerPage2").style.display="none"})),l.addEventListener("click",(function(e){e.preventDefault(),document.getElementById("apx-Form").requestSubmit()})),null===(e=document.getElementById("apx-closeSideBar"))||void 0===e||e.addEventListener("click",(function(){t.sideBarRoot.classList.remove("apx-sidebar-open"),t.startTrackingButton.style.display="block",document.getElementById("apx-Form").reset()})),document.getElementById("apx-Form").addEventListener("submit",(function(e){var n;e.preventDefault();var i=document.getElementById("apx-evname").value,o=(null===(n=document.getElementById("apx-evDescription"))||void 0===n?void 0:n.value)||"",a=document.getElementById("apx-evtype").value,r=document.querySelector('input[name="apx-url"]:checked'),s=document.getElementById("apx-dynamicURL").value,l={action:i,description:o,type:a,all_url:"All pages"===r.value,url:"Only on this page"===r.value?window.location.href:null,dynamicURL:"On urls that match"===r.value?s:null,apx_feature_field:t._feature_field,additional_info:t._eventAttributes};t._makeSSERequest("view","","",(function(){}),(function(){}),null,null,[l]),feedBackMessagePopUp("Saved Page Event");var c=document.getElementById("close-button"),d=function(){var e=document.getElementById("apx-container");null==e||e.remove()};window.setTimeout(d,2e4),c.addEventListener("click",d),document.getElementById("apx-Form").reset(),t.sideBarRoot.classList.remove("apx-sidebar-open"),t.startTrackingButton.style.display="block";var p=document.querySelector(".attr-addtInfo-attribute-list");p&&(p.innerHTML=""),document.querySelector(".apx-ddisvg").style.animation="bounce 2s infinite"})),document.addEventListener("input",(function(){var e=document.getElementById("apx-evname").value,t=document.getElementById("apx-evtype").value,n=document.querySelector('input[name="apx-url"]:checked'),i=document.getElementById("apx-dynamicURL").value,o=document.getElementById("apx-this-page"),a=document.getElementById("apx-selectDynamicUrl"),r=document.getElementById("apx-submitButton");o.checked||(document.getElementById("apx-extraField-url").style.display="none"),a.checked||(document.getElementById("apx-extraField").style.display="none",document.getElementById("apx-dynamicURL").required=!1,document.getElementById("apx-dynamicURL").value=""),r.disabled=!(e&&t&&n)||"On urls that match"===n.value&&!i,r.disabled?(l.style.opacity=.2,l.style.cursor="not-allowed"):(l.style.opacity=1,l.style.cursor="pointer")})),document.getElementById("apx-selectDynamicUrl").addEventListener("change",(function(e){e.target.checked?(document.getElementById("apx-extraField").style.display="block",document.getElementById("apx-dynamicURL").required=!0):(document.getElementById("apx-extraField").style.display="none",document.getElementById("apx-dynamicURL").required=!1)})),document.getElementById("apx-this-page").addEventListener("change",(function(e){e.target.checked?document.getElementById("apx-extraField-url").style.display="block":document.getElementById("apx-extraField-url").style.display="none"}))})),_defineProperty$1(this,"showEventDefiningPage",(function(){t.sideBarContentPage1.style.display="none",t.sideBarContentPage2.style.display="block";var e=document.getElementById("apx_current_url");if(e){var n=window.location.href;e.innerHTML=n}document.getElementById("apx-footerButtonContainerPage2").style.display="flex"})),_defineProperty$1(this,"showSideBarForPagesSelection",(function(){t.sideBarRoot.classList.add("apx-sidebar-open"),t.startTrackingButton.style.display="none",t.sideBarContentPage1.style.display="flex",t.sideBarContentPage2.style.display="none";var e=document.querySelector("#apx-footerButtonContainerPage2");t._feature_field=!1,t._eventAttributes=[],console.log(t._eventAttributes),e&&(e.style.display="none")})),_defineProperty$1(this,"createNewWYSIWYG",(function(){t._newwysiswg=document.createElement("div"),t._newwysiswg.id="apx-wr",t._newwysiswg.classList.add("apx-wrclass"),t._newwysiswg.style="z-index:99999999;visibility:visible;position:fixed;width:260px;height:50px;top:0%;left:50%;transform:translate(-50%, 0%);background:#F2F2F2;opacity:1;font-size:24px;color:white;transition:all .3s ease-out;border-radius:0%;border-bottom-left-radius:50cm;border-bottom-right-radius:50cm; user-select: none;box-shadow: rgb(0, 0, 0, 0.4) 0px 0px 6px 0px;",t.wysiwg_container=document.createElement("div"),t.wysiwg_container.classList.add("apx-wcclass"),t.wysiwg_container.style="position:relative;top:0%;left:0%;display:flex;flex-direction:row;height:50px;",t.imgContainer=document.createElement("div"),t.imgContainer.classList.add("apx-icclass"),t.imgContainer.style="background-color:#002845;border-bottom-left-radius:50cm;padding: 4px 25px 4px 30px;",t.imgContainer.innerHTML='<svg xmlns="http://www.w3.org/2000/svg" width="20" height="31" viewBox="0 0 20 31" fill="none">\n<path fill-rule="evenodd" clip-rule="evenodd" d="M18.6546 0.285222C19.1759 0.714811 19.2404 1.47412 18.7988 1.98119L7.59849 14.8419H4.48593L0.274291 9.76354C-0.154672 9.2463 -0.0713816 8.48872 0.460326 8.07143C0.992033 7.65414 1.77081 7.73516 2.19977 8.2524L5.66873 12.4352H6.45197L16.9112 0.425515C17.3528 -0.0815556 18.1333 -0.144367 18.6546 0.285222Z" fill="#FF7F33"/>\n<path fill-rule="evenodd" clip-rule="evenodd" d="M18.7534 30.7146C19.2746 30.285 19.3391 29.5257 18.8974 29.0187L8.08905 16.6122H5.04724L0.974613 21.5213C0.545563 22.0385 0.628726 22.7961 1.16036 23.2135C1.692 23.6308 2.47079 23.5499 2.89984 23.0328L6.22979 19.0189H6.94278L17.01 30.5746C17.4517 31.0816 18.2323 31.1443 18.7534 30.7146Z" fill="#00BDE1"/>\n</svg>',t.dropDownContainer=document.createElement("div"),t.dropDownContainer.classList.add("apx-ddcclass"),t.dropDownContainer.style="width:100%; display:flex; align-items: center;justify-content: center; cursor: pointer",t.dropDownText=document.createElement("div"),t.dropDownText.classList.add("apx-ddtclass"),t.dropDownText.style="color:black; font-size: 17px;",t.dropDownText.innerHTML="Track Events",t.dropDownImage=document.createElement("div"),t.dropDownImage.classList.add("apx-ddiclass"),t.dropDownImage.style="margin-left:12px; margin-top:2px;",t.dropDownImage.innerHTML='<style>@keyframes bounce {0%, 20%, 50%, 80%, 100% {transform: translateY(0);}40% {transform: translateY(-8px);}60% {transform: translateY(-4px);}}</style><svg class = "apx-ddisvg" width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg" style = "animation: bounce 2s infinite;"><path class = "apx-" d="M2.26544 5.21182C2.19383 5.14415 2.1096 5.09126 2.01756 5.05614C1.92551 5.02103 1.82745 5.00439 1.72897 5.00718C1.6305 5.00997 1.53353 5.03212 1.44362 5.07238C1.3537 5.11264 1.2726 5.17021 1.20494 5.24182C1.13727 5.31342 1.08438 5.39765 1.04926 5.4897C1.01415 5.58174 0.997514 5.6798 1.0003 5.77828C1.00309 5.87676 1.02524 5.97372 1.0655 6.06364C1.10576 6.15355 1.16333 6.23465 1.23494 6.30232L7.98494 12.6773C8.12419 12.809 8.30855 12.8823 8.50019 12.8823C8.69182 12.8823 8.87618 12.809 9.01544 12.6773L15.7662 6.30232C15.8394 6.2351 15.8984 6.15401 15.94 6.06377C15.9816 5.97352 16.0048 5.87592 16.0083 5.77662C16.0119 5.67733 15.9956 5.57832 15.9606 5.48535C15.9255 5.39239 15.8723 5.30731 15.8041 5.23507C15.7359 5.16283 15.654 5.10486 15.5632 5.06454C15.4724 5.02421 15.3745 5.00233 15.2751 5.00017C15.1758 4.99801 15.077 5.0156 14.9845 5.05194C14.8921 5.08827 14.8077 5.14262 14.7364 5.21182L8.50019 11.1008L2.26544 5.21182Z" fill="black"/></svg>',t.dropDownContainer.appendChild(t.dropDownText),t.dropDownContainer.appendChild(t.dropDownImage),t.dropDownContainer.onclick=function(e){e.stopImmediatePropagation(),t.dropDownBox.style.display=t.dropDownExpanded?"none":"block",t.dropDownExpanded=!t.dropDownExpanded,document.querySelector(".apx-ddisvg")&&(document.querySelector(".apx-ddisvg").style.animation="none"),t.dismissDropDownOutsideClick=function(){t.dropDownExpanded&&(t.dropDownBox.style.display="none",t.dropDownExpanded=!1,document.querySelector(".apx-ddisvg")&&(document.querySelector(".apx-ddisvg").style.animation="bounce 2s infinite"),document.body.removeEventListener("click",t.dismissDropDownOutsideClick))},document.body.addEventListener("click",t.dismissDropDownOutsideClick)},t.dropDownBox=document.createElement("div"),t.dropDownBox.classList.add("apx-ddbclass"),t.dropDownBox.style="position: absolute; background-color: #ffffff; margin-top: 4px; box-shadow: rgb(0, 0, 0, 0.4) 0px 0px 6px 0px;display: none;transform: translate(10%, 0px);border-radius: 12px; width: 220px",t.dropDownBox.innerHTML='\n <style>\n .apx-b {\n background: none;\n color: black;\n border-radius: 12px;\n border: 0px;\n padding-block: 8px;\n padding-inline: 16px;\n display: block;\n font-size: 16px;\n }\n .apx-b:hover {\n background-color: rgba(255, 199, 39, 0.10);\n color: #F97316;\n}\n </style>\n <div id="apx-bh" class="apx-cr apx-bh" style="padding:12px; display: flex; flex-direction: column; gap: 8px;">\n <button class="apx-b" id="apx-start" style="display: block">\n Start Tracking\n </button>\n <button class="apx-b" id="apx-stop" style="display:block">\n Stop Tracking\n </button>\n </div>',t.wysiwg_container.appendChild(t.imgContainer),t.wysiwg_container.appendChild(t.dropDownContainer),t._newwysiswg.appendChild(t.wysiwg_container),t._newwysiswg.appendChild(t.dropDownBox),t._newwysiswg&&document.body.appendChild(t._newwysiswg),t.startTrackingButton=document.getElementById("apx-start"),t.stopTrackingButton=document.getElementById("apx-stop"),t.startTrackingButton.addEventListener("click",t._viewSelectionHandler),t.stopTrackingButton.addEventListener("click",(function(){document.body.removeChild(t._newwysiswg),t._sideBar&&document.body.removeChild(t._sideBar),t.removeWidgetDetails();var e=document.getElementById("apx-view-sidebar-root");e&&e.remove();var n=document.getElementById("apx-show-hide-icon");n&&n.remove(),t._targetElement&&t._targetElement.classList.remove("apx-highlight")}))})),_defineProperty$1(this,"createEventsSideBar",(function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=function(){t._newwysiswg.style.display="block",window.removeEventListener("mouseover",onMouseOver,!0),window.removeEventListener("mouseout",onMouseOut,!0),window.removeEventListener("click",t.clickListener,!0),t.createEventsSideBar(),document.removeEventListener("keydown",t.escListenerforevents);var e=document.querySelector(".apx-esc");e&&document.body.removeChild(e)},o=document.createElement("div");o.classList.add("apx-esc"),o.style="z-index:99999999;position:fixed;top:80%;left:50%;transform:translate(-50%,-50%);padding:16px 24px;background:black;border-radius:6px;font-size:16px;color:white; cursor:move;",o.innerHTML='press <strong style="font-size: 18px">Esc</strong> to go back to view selection page',t.escListenerforevents=function(e){e.stopImmediatePropagation(),"Escape"===e.key&&i()},t._sideBar=document.createElement("div"),t._sideBar.style.position="fixed",t._sideBar.style.top="0",t._sideBar.id="apxor_sidebar",t._sideBar.classList.add("apx-sidebar-class"),t._sideBar.style.display="block",t._sideBar.style.right="-300px",t._sideBar.style.width="370px",t._sideBar.style.height="100%",t._sideBar.style.backgroundColor="#ffffff",t._sideBar.style.boxShadow="0 0 20px rgba(0, 0, 0, 0.2)",t._sideBar.style.transition="right 0.3s ease",t._sideBar.style.zIndex="9999999999",t._show_hide_toggleElement=document.createElement("div"),t._show_hide_toggleElement.id="apx-show-hide-icon",t._show_hide_toggleElement.style="width:20px;height:70px;background-color:rgb(0,40,69,0.9);position:fixed;right:369px;top:0px;color:rgb(255,255,255,0.7);transform:rotate(180deg);writing-mode:vertical-lr;text-align:center;border-top-right-radius:5px;border-bottom-right-radius:5px;cursor:pointer;z-index:99999997;display:flex;justify-content:center;align-items:center;gap:4px;",t._show_hide_toggle_text=document.createElement("div"),t._show_hide_toggle_text.innerText="hide",t._show_hide_toggleElement.appendChild(t._show_hide_toggle_text),t._toggle_icon=document.createElement("div"),t._toggle_icon.innerText="►",t._toggle_icon.style="transform:rotate(180deg);color:#ffffff;font-size:11px;",t._show_hide_toggleElement.appendChild(t._toggle_icon),t._clickHandlingForShowHideIcon(),document.body.appendChild(t._show_hide_toggleElement),t._defineEventPage=document.createElement("div"),t._defineEventPage.style.display="block",t._defineEventPage.style.zIndex="99999999";var a,r,s=document.createElement("span");s.innerText="Define Event",s.style="color:#ffffff;width:370px;height:52px;background-color:rgb(0, 40, 69);padding-left:20px;font-size:17px;font-weight:500;display:flex;align-items:center;",t._defineEventPage.appendChild(s),(a=document.createElement("div")).style="top:15px;position:absolute;width:20px;height:20px;float:right;right:10px;cursor:pointer;",a.innerHTML='<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-x" width="20" height="20" viewBox="0 0 24 24" stroke-width="1.5" stroke="#ffffff" fill="#ffffff" stroke-linecap="round" stroke-linejoin="round">\n <path stroke="none" d="M0 0h24v24H0z" fill="none"/>\n <path d="M18 6l-12 12" />\n <path d="M6 6l12 12" />',t._defineEventPage.appendChild(a),a.onclick=function(){var e,n;t._sideBar.style.display="none",t._newwysiswg.style.display="block",t.startTrackingButton.style.display="block",null===(e=t._targetElement)||void 0===e||e.classList.remove("apx-highlight"),null===(n=t._show_hide_toggleElement)||void 0===n||n.remove();var i=document.getElementById("apx-show-hide-icon");i&&i.remove()},(r=document.createElement("div")).classList.add("apx-icclass"),r.style="top:280px;position:absolute;width:80px;height:80px;padding-left:145px;",r.innerHTML='<svg width="63" height="63" viewBox="0 0 63 63" fill="none" xmlns="http://www.w3.org/2000/svg">\n<circle cx="31.5" cy="31.5" r="31.5" fill="#F5F5F5"/>\n<mask id="mask0_486_3281" style="mask-type:alpha" maskUnits="userSpaceOnUse" x="0" y="0" width="63" height="63">\n<circle cx="31.5" cy="31.5" r="31.5" fill="#F4FBFF"/>\n</mask>\n<g mask="url(#mask0_486_3281)">\n<path d="M105.511 10.3516H17.0739C14.7282 10.3516 12.8267 12.2532 12.8267 14.5988V48.3711C12.8267 50.7167 14.7282 52.6183 17.0739 52.6183H105.511C107.857 52.6183 109.758 50.7167 109.758 48.3711V14.5988C109.758 12.2532 107.857 10.3516 105.511 10.3516Z" fill="white"/>\n<path d="M108.245 10.3516H14.3397C13.5041 10.3516 12.8267 11.029 12.8267 11.8647C12.8267 12.7003 13.5041 13.3777 14.3397 13.3777H108.245C109.081 13.3777 109.758 12.7003 109.758 11.8647C109.758 11.029 109.081 10.3516 108.245 10.3516Z" fill="#263238"/>\n<path d="M15.7465 11.8629C15.7465 12.1992 15.4739 12.4717 15.1377 12.4717C14.8015 12.4717 14.5254 12.1992 14.5254 11.8629C14.5254 11.5267 14.7979 11.2542 15.1342 11.2542C15.4704 11.2542 15.7465 11.5267 15.7465 11.8629Z" fill="#FFC727"/>\n<path d="M18.2346 11.8629C18.2346 12.1992 17.9621 12.4717 17.6259 12.4717C17.2896 12.4717 17.0171 12.1992 17.0171 11.8629C17.0171 11.5267 17.2896 11.2542 17.6259 11.2542C17.9621 11.2542 18.2346 11.5267 18.2346 11.8629Z" fill="white"/>\n<path d="M20.7263 11.8629C20.7263 12.1992 20.4538 12.4717 20.1176 12.4717C19.7813 12.4717 19.5088 12.1992 19.5088 11.8629C19.5088 11.5267 19.7813 11.2542 20.1176 11.2542C20.4538 11.2542 20.7263 11.5267 20.7263 11.8629Z" fill="#455A64"/>\n<path d="M98.7756 27.9244H23.7631C21.5465 27.9244 19.7495 29.7213 19.7495 31.938C19.7495 34.1546 21.5465 35.9516 23.7631 35.9516H98.7756C100.992 35.9516 102.789 34.1546 102.789 31.938C102.789 29.7213 100.992 27.9244 98.7756 27.9244Z" fill="#EBEBEB"/>\n<path d="M39.3503 39.3599H23.4092C21.388 39.3599 19.7495 40.9984 19.7495 43.0196C19.7495 45.0408 21.388 46.6793 23.4092 46.6793H39.3503C41.3715 46.6793 43.01 45.0408 43.01 43.0196C43.01 40.9984 41.3715 39.3599 39.3503 39.3599Z" fill="#FFC727"/>\n<path d="M52.4673 42.7374L53.8229 46.0112L52.4673 46.574L51.1047 43.2753L48.8643 45.0132V35.7861L55.3271 42.3091L52.4673 42.7374Z" fill="#263238"/>\n<path d="M49.3384 33.7333V31.5" stroke="#263238" stroke-width="0.353933" stroke-miterlimit="10"/>\n<path d="M46.7939 34.827L45.2153 33.2484" stroke="#263238" stroke-width="0.353933" stroke-miterlimit="10"/>\n<path d="M45.767 37.4001H43.5337" stroke="#263238" stroke-width="0.353933" stroke-miterlimit="10"/>\n<path d="M46.8608 39.9448L45.2822 41.5269" stroke="#263238" stroke-width="0.353933" stroke-miterlimit="10"/>\n<path d="M49.4341 40.9713V43.2046" stroke="#263238" stroke-width="0.353933" stroke-miterlimit="10"/>\n<path d="M51.9785 39.8776L53.5606 41.4596" stroke="#263238" stroke-width="0.353933" stroke-miterlimit="10"/>\n<path d="M53.0049 37.3045H55.2382" stroke="#263238" stroke-width="0.353933" stroke-miterlimit="10"/>\n<path d="M51.9116 34.7598L53.4937 33.1812" stroke="#263238" stroke-width="0.353933" stroke-miterlimit="10"/>\n</g>\n</svg>',t._defineEventPage.appendChild(r);var l=document.createElement("span");l.innerText="Click the button below to define \n a new event by clicking on any \n element on the page.",l.style="color:#989cab;top:360px;font-size:14px;padding-left:80px;position:absolute;text-align:center;",t._defineEventPage.appendChild(l);var c=document.createElement("button");c.innerText="Define Event",c.style="background-color:#F97316;color:#fff;font-size:13px;align-items:center;font-weight:500;font-family:inherit;height:40px;width:120px;border-radius:11px;border:#F97316;justify-content:center;display:flex;position:absolute;top:430px;left:33%;cursor:pointer;",e||(t._defineEventPage.style.display="block"),e&&t._defineEventPage&&(t._defineEventPage.style.display="none"),c.addEventListener("click",(function(){t._newwysiswg.style.display="none",document.body.appendChild(o);var e=document.getElementById("apx-show-hide-icon");e&&e.remove(),dragElement(o),document.addEventListener("keydown",t.escListenerforevents),t._defineEventPage&&(t._defineEventPage.style.display="none"),t._sideBar.style.display="none",t._eventPage&&(t._eventPage.style.display="none"),t._defineEventPage&&(t._defineEventPage.style.display="none"),t._selectAnElement();var n=document.querySelectorAll("#apxor_sidebar");if(n.length>0){var i,a=_createForOfIteratorHelper(n);try{for(a.s();!(i=a.n()).done;){i.value.style.display="none"}}catch(e){a.e(e)}finally{a.f()}}})),t._defineEventPage.appendChild(c),t._sideBar.appendChild(t._defineEventPage),!0===e&&(t._eventPageCreation(n),t._sideBar.appendChild(t._eventPage)),document.body.appendChild(t._sideBar),e&&t._eventAttributeHandler(),"0px"===t._sideBar.style.right?t._sideBar.style.right="-300px":t._sideBar.style.right="0px"})),_defineProperty$1(this,"_eventAttributeHandler",(function(){var e=document.getElementById("attr-addtInfo-name"),n=document.getElementById("attr-addtInfo-type"),i=document.getElementById("attr-addtInfo-value"),o=document.getElementById("attr-addtInfo-addBtn"),a=document.querySelector(".attr-addtInfo-attribute-list");o.addEventListener("click",(function(o){o.preventDefault();var a=e.value.trim(),s=n.value,l=i.value.trim();if("tabList"===s?l="tablist":"clicked_on"===s&&(l="clicked_on"),a&&l&&s){var c={name:a,type:s,value:l};t._eventAttributes.push(c),r(),e.value="",i.value=""}}));var r=function e(){console.log("render",t._eventAttributes),a.innerHTML="",t._eventAttributes.forEach((function(n,i){var o=document.createElement("li");o.className="attr-addtInfo-attribute-item";var r=document.createElement("span");r.style="font-size:13px;font-weight:500;",r.textContent="Name: ".concat(n.name,", Type: ").concat(n.type,", Value: ").concat(n.value);var s=document.createElement("button");s.textContent="Delete",s.style="margin-left: auto",s.addEventListener("click",(function(){t._eventAttributes.splice(i,1),e()})),o.appendChild(r),o.appendChild(s),a.appendChild(o)}))}})),_defineProperty$1(this,"hideSidebar",(function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];e?e&&(t._view_sideBar.style.right="-370px",setTimeout((function(){t._view_sideBar&&(t._view_sideBar.style.display="none")}),500)):(t._sideBar.style.right="-370px",setTimeout((function(){t._sideBar&&(t._sideBar.style.display="none")}),500))})),_defineProperty$1(this,"showSidebar",(function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];e?e&&(t._view_sideBar.style.display="flex",t._view_sideBar.style.transition="right 0.5s ease-in-out",t._view_sideBar.style.right="0"):(t._sideBar.style.display="block",t._sideBar.style.transition="right 0.5s ease-in-out",t._sideBar.style.right="0")})),_defineProperty$1(this,"_clickHandlingForShowHideIcon",(function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];t._show_hide_toggleElement.onclick=function(){if(e){if(e){var n,i,o;"flex"===(null===(n=t._view_sideBar)||void 0===n?void 0:n.style.display)||""===(null===(i=t._view_sideBar)||void 0===i?void 0:i.style.display)?(t.hideSidebar(!0),t._show_hide_toggleElement.style="width:20px;height:70px;background-color:rgb(0,40,69,0.9);position:fixed;right:0px;top:0px;color:rgb(255,255,255,0.7);transform:rotate(180deg);writing-mode:vertical-lr;text-align:center;border-top-right-radius:5px;border-bottom-right-radius:5px;cursor:pointer;z-index:99999997;display:flex;align-items:center;justify-content:center;gap:4px;",t._show_hide_toggle_text.innerText="show",t._show_hide_toggleElement.class="apx-show-hide-button-class",t._toggle_icon.style.transform="rotate(0deg)",t._show_hide_toggleElement.addEventListener("click",t._clickHandlingForShowHideIcon)):"none"===(null===(o=t._view_sideBar)||void 0===o?void 0:o.style.display)&&(t.showSidebar(!0),t._show_hide_toggleElement.style="width:20px;height:70px;background-color:rgb(0,40,69,0.9);position:fixed;right:369px;top:0px;color:rgb(255,255,255,0.7);transform:rotate(180deg);writing-mode:vertical-lr;text-align:center;border-top-right-radius:5px;border-bottom-right-radius:5px;cursor:pointer;z-index:99999997;display:flex;align-items:center;justify-content:center;gap:4px;",t._show_hide_toggle_text.innerText="hide",t._toggle_icon.style.transform="rotate(180deg)",t._show_hide_toggleElement.class="apx-show-hide-button-class",t._show_hide_toggleElement.addEventListener("click",(function(){t._clickHandlingForShowHideIcon(!0)})),document.body.appendChild(t._show_hide_toggleElement))}}else if("block"===t._sideBar.style.display){t.hideSidebar(),t._show_hide_toggleElement.style="width:20px;height:70px;background-color:rgb(0,40,69,0.9);position:fixed;right:0px;top:0px;color:rgb(255,255,255,0.7);transform:rotate(180deg);writing-mode:vertical-lr;text-align:center;border-top-right-radius:5px;border-bottom-right-radius:5px;cursor:pointer;z-index:99999997;display:flex;align-items:center;justify-content:center;gap:4px;",t._show_hide_toggle_text.innerText="show",t._show_hide_toggleElement.class="apx-show-hide-button-class",t._toggle_icon.style.transform="rotate(0deg)",t._show_hide_toggleElement.addEventListener("click",(function(){t._clickHandlingForShowHideIcon(!1)}));var a=document.getElementById("apx-view-sidebar-root");a&&"flex"==a.style.display&&t.hideSidebar(!0)}else if("none"===t._sideBar.style.display){t.showSidebar(),t._show_hide_toggleElement.style="width:20px;height:70px;background-color:rgb(0,40,69,0.9);position:fixed;right:369px;top:0px;color:rgb(255,255,255,0.7);transform:rotate(180deg);writing-mode:vertical-lr;text-align:center;border-top-right-radius:5px;border-bottom-right-radius:5px;cursor:pointer;z-index:99999997;display:flex;align-items:center;justify-content:center;gap:4px;",t._show_hide_toggle_text.innerText="hide",t._toggle_icon.style.transform="rotate(180deg)",t._show_hide_toggleElement.class="apx-show-hide-button-class",t._show_hide_toggleElement.addEventListener("click",(function(){t._clickHandlingForShowHideIcon(!1)}));var r=document.getElementById("apx-view-sidebar-root");r&&"none"==r.style.display&&t.showSidebar(!0),document.body.appendChild(t._show_hide_toggleElement)}}})),_defineProperty$1(this,"_eventPageCreation",(function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];t._eventPage=document.createElement("div"),t._eventPage.style="display:flex;z-index:99999999;flex-direction:column;gap:10px;height:100%",t._eventPage.id="apx-track-events-event-page";var n,i=document.createElement("div");i.innerText="Define Event",i.style="color:#ffffff;width:370px;height:52px;background-color:rgb(0, 40, 69);padding-left:20px;font-size:17px;font-weight:500;display:flex;align-items:center;flex-basis:8%",(n=document.createElement("div")).style="top:15px;position:absolute;width:20px;height:20px;float:right;right:10px;cursor:pointer;",n.innerHTML='<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-x" width="20" height="20" viewBox="0 0 24 24" stroke-width="1.5" stroke="#ffffff" fill="#ffffff" stroke-linecap="round" stroke-linejoin="round">\n <path stroke="none" d="M0 0h24v24H0z" fill="none"/>\n <path d="M18 6l-12 12" />\n <path d="M6 6l12 12" />',i.appendChild(n),t._eventPage.appendChild(i),n.onclick=function(){var e,n;t._sideBar.style.display="none",t._newwysiswg.style.display="block",t.startTrackingButton.style.display="block",null===(e=t._targetElement)||void 0===e||e.classList.remove("apx-highlight"),null===(n=t._show_hide_toggleElement)||void 0===n||n.remove();var i=document.querySelector(".apx-show-hide-button-class");i&&i.remove(),t._targetElement=null;var o=document.getElementById("apxor_sidebar");o&&o.remove();var a=document.getElementById("apx-view-sidebar-root");a&&a.remove()};var o=document.createElement("div");o.style="display:flex;flex-direction:column;flex-basis:84%;gap:10px;overflow-y:auto;";var a=document.createElement("label");a.innerText="Name ";var r=document.createElement("span");r.innerText="*",r.style="color:red;font-size:smaller",a.appendChild(r),a.htmlFor="labelInput";var s=document.createElement("input");a.style="font-size:13px;color:#000;padding-left:20px;font-weight:500;font-family:inherit;",s.style="height:42px;background-color:#EDEEF3;color:#313957;padding-left:20px;border:none;border-radius:12px;margin-left:20px;cursor:pointer;font-size:14px;flex-shrink:0;margin-right:15px;",s.placeholder="Enter event name ",s.setAttribute("required",""),s.id="labelInput",s.addEventListener("input",(function(e){t._eventName=e.target.value,t._urlInEventObj&&(K.style.cursor="pointer",K.style.backgroundColor="#F97316",K.disabled=!1),""==t._eventName&&(K.style.cursor="not-allowed",K.style.backgroundColor="rgba(0,40,69, 0.38)")})),o.appendChild(a),o.appendChild(s);var l=document.createElement("div");l.style="border-top:1px solid rgb(160,154,155,0.5);width:100%;height:1px;background-color:rgb(237,238,243)",o.appendChild(l);var c=document.createElement("label");c.innerText="Description",c.htmlFor="labelInput2";var d=document.createElement("input");c.style="font-size:13px;color:#000;padding-left:20px;font-weight:500;font-family:inherit;",d.style="height:42px;background-color:#EDEEF3;color:#313957;padding-left:20px;border:none;border-radius:12px;margin-left:20px;cursor:pointer;font-size:14px;flex-shrink:0;margin-right:15px;",d.placeholder="Enter description for Event",d.setAttribute("required",""),d.id="labelInput2",d.addEventListener("input",(function(e){t._eventDescription=e.target.value,t._urlInEventObj&&t._eventName&&(K.style.cursor="pointer",K.style.backgroundColor="#F97316",K.disabled=!1)})),o.appendChild(c),o.appendChild(d);var p=document.createElement("div");p.style="border-top:1px solid rgb(160,154,155,0.5);width:100%;height:1px;background-color:rgb(237,238,243)",o.appendChild(p);var u=document.createElement("span");u.innerText="Type",u.style="font-size:13px;color:#000;padding-left:20px;font-weight:500;font-family:inherit",o.appendChild(u);var h=document.createElement("div");h.style="display:flex;gap:70px;justify-content:left;";var g=["Click","Double Click","Right Click","Change"],f=document.createElement("div");f.setAttribute("id","dropdownContainer"),f.style.display="inline-block";var m=document.createElement("select");m.style="height:39px;background-color:#EDEEF3;padding-left:20px;margin-left:20px;border-radius:12px;",m.setAttribute("id","myDropdown"),g.forEach((function(e){var t=document.createElement("option");t.setAttribute("value",e),t.textContent=e,t.style="font-size:14px;font-weight:500;font-style:Roboto",m.appendChild(t)})),m.selectedIndex=0,t._selectedType="click",f.appendChild(m),h.appendChild(f),m.addEventListener("change",(function(){var e=m.value;"Click"===e?t._selectedType="click":"Double Click"===e?t._selectedType="double_click":"Right Click"===e?t._selectedType="right_click":"Change"===e&&(t._selectedType="change")}));var _=["App Event","Client Event","Capture","Generate Identifier"],v=document.createElement("div");v.setAttribute("id","dropdownContainer"),v.style.display="inline-block";var b=document.createElement("select");b.style="height:39px;background-color:#EDEEF3;padding-left:20px;border-radius:12px;",b.setAttribute("id","myDropdown"),_.forEach((function(e){var t=document.createElement("option");t.setAttribute("value",e),t.textContent=e,t.style="font-size:14px;font-weight:500;font-style:Roboto",b.appendChild(t)})),b.selectedIndex=0,v.appendChild(b),h.appendChild(v),o.appendChild(h),t._selectedEventType="app_event",b.addEventListener("change",(function(){var e=b.value;"App Event"===e?t._selectedEventType="app_event":"Client Event"===e?t._selectedEventType="client_event":"Capture"===e?t._selectedEventType="capture":"Generate Identifier"===e&&(t._selectedEventType="generate_identifier")}));var y=document.createElement("div");y.style="border-top:1px solid rgb(160,154,155,0.5);width:100%;height:1px;background-color:rgb(237,238,243)",o.appendChild(y);var x=document.createElement("div");x.style="display: flex; flex-direction: column; gap: 10px";var w=document.createElement("div");w.innerHTML="Event Attributes",w.style="color:#fffff;height:25px;padding-left:20px;font-size:13px;font-weight:500;display:flex;align-items:center;",x.appendChild(w);var C=document.createElement("div");C.style="display: flex; flex-direction: column; gap: 10px",C.innerHTML='\n <input type="text" id="attr-addtInfo-name" placeholder="Name" style="height:42px;background-color:#EDEEF3;color:#313957;padding-left:20px;border:none;border-radius:12px;margin-left:20px;cursor:pointer;font-size:14px;flex-shrink:0;margin-right:15px;"/>\n <select id="attr-addtInfo-type" style="height:42px;margin-left:20px;height:39px;background-color:#EDEEF3;padding-left:20px;border-radius:12px;cursor:pointer;font-size:14px;margin-right:15px;">\n <option value="target" style="font-size:14px;font-weight:500;font-style:Roboto">Value</option>\n <option value="target_TEXTNODE" style="font-size:14px;font-weight:500;font-style:Roboto">Value in TextNode only</option>\n <option value="target_relative_node" style="font-size:14px;font-weight:500;font-style:Roboto">Value in element relative to target</option>\n <option value="captured" style="font-size:14px;font-weight:500;font-style:Roboto">Captured Values</option>\n <option value="unique_identifier" style="font-size:14px;font-weight:500;font-style:Roboto">Unique Identifier</option>\n <option value="storage" style="font-size:14px;font-weight:500;font-style:Roboto">Storage</option>\n <option value="tabList" style="font-size:14px;font-weight:500;font-style:Roboto">Tab List</option>\n <option value="clicked_on" style="font-size:14px;font-weight:500;font-style:Roboto">Clicked On</option>\n <option value="text_present" style="font-size:14px;font-weight:500;font-style:Roboto">Check if input entered</option>\n <option value="default" style="font-size:14px;font-weight:500;font-style:Roboto">Default</option>\n\n </select>\n <input type="text" id="attr-addtInfo-value" placeholder="Value" style="height:42px;background-color:#EDEEF3;color:#313957;padding-left:20px;border:none;border-radius:12px;margin-left:20px;cursor:pointer;font-size:14px;flex-shrink:0;margin-right:15px;"/>\n <button id="attr-addtInfo-addBtn" style="height:42px;background-color:#EDEEF3;color:#313957;padding-left:20px;border:none;border-radius:12px;margin-left:20px;cursor:pointer;font-size:14px;flex-shrink:0;margin-right:15px;">Add Attribute</button>\n <div>\n <h3 style="color:#fffff;height:25px;padding-left:20px;font-size:13px;font-weight:500;display:flex;align-items:center;">Selected Attributes:</h3>\n <ul class="attr-addtInfo-attribute-list"></ul>\n </div>',x.appendChild(C),o.appendChild(x);var E=document.createElement("div");E.style="border-top:1px solid rgb(160,154,155,0.5);width:100%;height:1px;background-color:rgb(237,238,243)",o.appendChild(E),o.appendChild(E);var k=document.createElement("div");k.innerText="Selected Element's Identifier",k.style="color:#fffff;height:25px;padding-left:20px;font-size:13px;font-weight:500;display:flex;align-items:center;",o.appendChild(k);var S,T=document.createElement("span");if(S=t._selector_created,t._selectorForEvent=S,T.innerText=S,e&&(T.innerText=t._selectorToBeSent),T.id="apx-final-selector",T.style="overflow-y: auto;color:rgb(49, 57, 87);height:52px;padding-left:20px;font-size:14px;font-weight:500;display:flex;align-items:center;background-color:#EDEEF3;margin-left:20px;border-radius:12px;padding-top:5px;padding-bottom:5px;flex-shrink:0;margin-right:15px",o.appendChild(T),t._is_text_based){var A=document.createElement("div");A.innerText="Selected Element's Content",A.style="color:#fffff;height:25px;padding-left:20px;font-size:13px;font-weight:500;display:flex;align-items:center;",o.appendChild(A);var I=document.createElement("span");I.id="apx-final-text",I.style="overflow-y: auto;color:rgb(49, 57, 87);height:52px;padding-left:20px;font-size:14px;font-weight:500;display:flex;align-items:center;background-color:#EDEEF3;margin-left:20px;border-radius:12px;padding-top:5px;padding-bottom:5px;flex-shrink:0;margin-right:15px;",I.innerText=t._dynamic_content_updated,o.appendChild(I)}var P=document.createElement("input");P.type="checkbox",P.id="myCheckbox";var O=document.createElement("label");O.htmlFor="myCheckbox",O.textContent="Mark as Feature",O.style="padding-left:10px;font-size:14px;font-weight:500;";var L=document.createElement("div");L.classList.add("checkbox-container"),L.appendChild(P),L.appendChild(O),L.style="display:flex;gap:5px;padding-left:21px",o.appendChild(L),P.addEventListener("change",(function(){P.checked?t._feature_field=!0:t._feature_field=!1}));var N=document.createElement("div");N.style="border-top:1px solid rgb(160,154,155,0.5);width:100%;height:1px;background-color:rgb(237,238,243)",o.appendChild(N);var D=document.createElement("span");D.innerText="Pages",D.style="color:#fffff;padding-top:5px;padding-left:20px;font-size:13px;font-weight:500;display:flex;align-items:center;",o.appendChild(D);var B=document.createElement("span");B.innerText="Create an event when the element is \n interacted with...",B.style="color:#313957;padding-left:20px;font-size:11px;font-weight:500;display:flex;align-items:center;",o.appendChild(B);var M=document.createElement("input");M.type="radio",M.name="myRadioGroup",M.id="event_type_id",M.value="current_url",M.style.accentColor="orangered",M.checked=!0,t._is_dynamic=!1,t._urlInEventObj="url";var F=document.createElement("label");F.textContent="Only on this Page ",F.style="font-size:15px;padding-left:7px;",F.setAttribute("for",M.id);var $=document.createElement("div");$.appendChild(M),$.appendChild(F),$.classList.add("radio-item"),$.style="padding-left:20px;",$.addEventListener("click",(function(){t._is_dynamic=!1,Y.style.display="none",X.style.display="none",t._urlInEventObj="url",t._eventName&&(K.style.cursor="pointer",K.style.backgroundColor="#F97316",K.disabled=!1)})),o.appendChild($);var R=document.createElement("span"),H=window.location.href;R.innerText=H,R.style="color:#007AFF;padding-left:50px;font-size:12px;font-family:monospace;box-sizing:border-box;word-break:break-all;margin-right:5px;",o.appendChild(R);var V=document.createElement("input");V.type="radio",V.name="myRadioGroup",V.id="event_type_id2",V.value="current_url",V.style.accentColor="orangered";var q=document.createElement("label");q.textContent="For all Pages",q.style="font-size:15px;padding-left:7px;",q.setAttribute("for",V.id);var U=document.createElement("div");U.appendChild(V),U.appendChild(q),U.classList.add("radio-item"),U.style="padding-left:20px;",U.addEventListener("click",(function(){t._is_dynamic=!0,Y.style.display="none",X.style.display="none",t._dynamicUrl="*",t._urlInEventObj="*",t._eventName&&(K.style.cursor="pointer",K.style.backgroundColor="#F97316",K.disabled=!1)})),o.appendChild(U);var j=document.createElement("input");j.type="radio",j.id="second_label",j.name="myRadioGroup",j.value="current_url",j.style.accentColor="orangered";var z=document.createElement("label");z.textContent="On Pages that match ",z.style="font-size:15px;padding-left:7px;",z.setAttribute("for",j.id);var W=document.createElement("div");W.appendChild(j),W.appendChild(z),W.classList.add("radio-item"),W.style="padding-left:20px;",W.addEventListener("click",(function(){K.style.cursor="not-allowed",K.style.backgroundColor="rgba(0,40,69, 0.38)",t._is_dynamic=!0,Y.style.display="block",X.style.display="block"})),o.appendChild(W);var Y=document.createElement("input");Y.style="height:42px;background-color:#EDEEF3;color:#313957;padding-left:20px;border:none;border-radius:12px;margin-left:20px;display:none;font-size:14px;flex-shrink:0;margin-right:15px;",Y.placeholder="Enter the Dynamic URL",Y.addEventListener("input",(function(e){var n=e.target.value;t._dynamicUrl=e.target.value,t._urlInEventObj="dynamic_url",t._eventName&&n&&""!=n&&(K.style.cursor="pointer",K.style.backgroundColor="#F97316",K.disabled=!1),""==n&&(K.style.cursor="not-allowed",K.style.backgroundColor="rgba(0,40,69, 0.38)")})),o.appendChild(Y);var X=document.createElement("span");X.innerText="NOTE: Replace all the dynamic parts with *",X.style="color:rgb(0, 40, 69,0.9);padding-left:25px;font-size:13px;font-weight:600;display:flex;align-items:center;display:none;",o.appendChild(X),t._eventPage.appendChild(o);var G=document.createElement("div");G.style="display:flex;justify-content:space-between;flex-basis:8%";var Q=document.createElement("button");if(Q.textContent="Cancel",Q.style="background-color:#fff;color:#F97316;cursor:pointer;font-size:13px;font-weight:500;font-family:inherit;height:40px;border-radius:11px;border:2px solid #F97316;margin-left:20px;padding-inline:22px;",Q.onclick=function(){t._targetElement.classList.remove("apx-highlight"),t._eventPage.style.display="none",t._defineEventPage.style.display="block"},G.appendChild(Q),e){Q.style.display="none";var Z=document.createElement("button");Z.textContent="Back",Z.style="background-color:#fff;color:#F97316;cursor:pointer;font-size:13px;font-weight:500;font-family:inherit;height:40px;border-radius:11px;border:2px solid #F97316;margin-left:20px;padding-inline:22px;",Z.onclick=function(){var e;null===(e=t._targetElement)||void 0===e||e.classList.remove("apx-highlight"),t._eventPage.style.display="none";var n=document.querySelectorAll(".apx-sidebar-class");if(n.length>0){var i,o=_createForOfIteratorHelper(n);try{for(o.s();!(i=o.n()).done;){i.value.remove()}}catch(e){o.e(e)}finally{o.f()}}t._targetElement.classList.add("apx-highlight"),t._view_sideBar.style.display="flex"},G.appendChild(Z)}var K=document.createElement("button");K.textContent="Save",K.style="background-color:rgb(249, 115, 22,0.2);color:#fff;cursor:not-allowed;font-size:13px;font-weight:500;border:none;font-family:inherit;height:40px;border-radius:11px;margin-right:20px;padding-inline:30px;",K.disabled=!0,K.onclick=function(){t._targetElement.classList.remove("apx-highlight"),feedBackMessagePopUp("saved event <br><b>".concat(t._eventName,"</b>"));var n=document.getElementById("close-button"),i=function(){var e=document.getElementById("apx-container");null==e||e.remove()};window.setTimeout(i,2e4),n.addEventListener("click",i),t._createEventList(e),t.startTrackingButton.style.display="block",document.querySelector(".apx-ddisvg").style.animation="bounce 2s infinite",document.body.removeChild(t._sideBar),t._sideBar=null;var o=document.getElementById("apx-show-hide-icon");o&&o.remove(),t._targetElement=null;var a=document.getElementById("apxor_sidebar");a&&a.remove();var r=document.getElementById("apx-view-sidebar-root");r&&r.remove()},G.appendChild(K),t._eventPage.appendChild(G)})),_defineProperty$1(this,"_selectAnElement",(function(){var e;window.addEventListener("mouseover",onMouseOver,!0),window.addEventListener("mouseout",onMouseOut,!0),"block"===(null===(e=t._sideBar)||void 0===e||null===(e=e.style)||void 0===e?void 0:e.display)&&(t._sideBar.style.display="none"),t.clickListener=function(e){return handleDocumentOnClick(e,(function(e){var n,i;t._targetElement=e,t._selector_created=t.cssPath(t._targetElement,!0),t._newwysiswg.style.display="block",window.removeEventListener("mouseover",onMouseOver,!0),window.removeEventListener("mouseout",onMouseOut,!0),window.removeEventListener("click",t.clickListener,!0),t._selectors_list=t.generateSelectorslist(t._targetElement);var o=t.cssPath(t._targetElement,!0);t._viewSelectorFound=o,t._viewText=null!==(n=null===(i=t._targetElement)||void 0===i||null===(i=i.innerText)||void 0===i?void 0:i.toLowerCase())&&void 0!==n?n:"",t._viewSelectionTarget=t._targetElement,t._targetElement.classList.add("apx-highlight"),"v2"===t._selection_mode&&t._createViewSideBar(!0),t._selected_element_details=[],"v1"===t._selection_mode&&t.createEventsSideBar(!0),document.removeEventListener("keydown",t.escListenerforevents);var a=document.querySelector(".apx-esc");a&&document.body.removeChild(a)}))},window.addEventListener("click",t.clickListener,!0)})),_defineProperty$1(this,"_viewSelectionHandler",(function(){var e=parseInt(localStorage.getItem("apx_modal_count"))||0;0===e?(t.modalForElementSelection(),e++,localStorage.setItem("apx_modal_count",e)):t.createEventsSideBar(),t.dropDownBox.style.display=t.dropDownExpanded?"none":"block",t.dropDownExpanded=!t.dropDownExpanded,t.startTrackingButton.style.display="none",t._feature_field=!1,t._eventAttributes=[]})),_defineProperty$1(this,"_createEventList",(function(){var e,n=arguments.length>0&&void 0!==arguments[0]&&arguments[0],i=t._selectorForEvent,o=null===(e=t._selectedType)||void 0===e?void 0:e.toLowerCase(),a=t._eventName,r=t._feature_field;(isNull$1(r)||isUndefined$2(r))&&(r=!1);var s,l,c,d,p=t._eventDescription;if(n){if(n){var u,h,g=t._is_text_based,f=document.getElementById("apx-final-selector");f&&f.innerText&&(i=f.innerText),s=[{selector:i,is_content_based:g,content:t._avf_updated_content,events:{}}],h=t._is_dynamic?t._dynamicUrl:location.href,l=null===(u=t._selectedEventType)||void 0===u?void 0:u.toLowerCase(),s[0].events[o]={type:l,action:a,description:p,is_dynamic:t._is_dynamic,url:h,apx_feature_field:r,additional_info:t._eventAttributes},t._makeSSERequest("view","","",(function(){}),(function(){}),null,s)}}else s=[{selector:i,events:{}}],d=t._is_dynamic?t._dynamicUrl:location.href,l=null===(c=t._selectedEventType)||void 0===c?void 0:c.toLowerCase(),s[0].events[o]={type:l,action:a,description:p,is_dynamic:t._is_dynamic,url:d,apx_feature_field:r,additional_info:t._eventAttributes},t._makeSSERequest("view","","",(function(){}),(function(){}),null,s);t._eventAttributes=[]})),_defineProperty$1(this,"_disableViewSelectionHandler",(function(){t._enableViewSelectionButton.style.display="block"})),_defineProperty$1(this,"tearDown",(function(){var e,n;null===(e=t._viewPickerNode)||void 0===e||e.parentNode.removeChild(t._viewPickerNode),null===(n=t._styleNode)||void 0===n||n.parentNode.removeChild(t._styleNode)})),_defineProperty$1(this,"_handleSSEResponse",(function(e,n){try{t._wysiwygRoot.dispatchEvent(new CustomEvent("preview"));var i=JSON.parse(n),o=i.cmd,a=void 0===o?"prev":o;if("prev"===a){if(null!=i&&i.ui){var r=uuid$1(36),s={configs:[{_id:r,enabled:!0,terminate_info:{auto_dismiss:!1,duration:1e3},meta:{name:APX_PREVIEW_CAMPAIGN_NAME,type:i.type},ui:i.ui}]};e._storeConfigs("SURVEY"!==i.type?0:1,s),Apxor.getController().dispatchEvent(i.type,{name:i.type,additional_info:{uuid:r,name:APX_PREVIEW_CAMPAIGN_NAME}})}else if(null!=i&&i.messages){var l=[],c=[];i.messages.forEach((function(e){"SURVEY"!==e.meta.type?c.push(e):l.push(e)})),c.length>0&&e.handleResponse(0,{configs:c}),l.length>0&&e.handleResponse(1,{configs:l})}}else"relaunch"===a&&(t.showToastMessagePopUp(APX_RELAUNCH_CONFIG),t._isShowingToastPopup=!1)}catch(e){console.error(e)}})),_defineProperty$1(this,"_hideSelectionMode",(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:OFF_HTML;if(t.isSelectionMode){window.removeEventListener("mouseover",onMouseOver,!0),window.removeEventListener("mouseout",onMouseOut,!0),window.removeEventListener("click",t.clickListener,!0);for(var n=document.querySelectorAll(".apx-highlight"),i=0;i<n.length;i++){var o=n[i];o.classList.remove("apx-highlight")}t._hideToast(!0,e),t.isSelectionMode=!1}})),_defineProperty$1(this,"_hideToast",(function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:OFF_HTML;t._viewPickerNode.style.visibility="visible",e?(t._viewPickerNode.innerHTML=n,t._viewPickerNode.style.opacity=1):(t._viewPickerNode.innerHTML=ON_HTML,t._viewPickerNode.style.opacity=1),setTimeout((function(){t._viewPickerNode.style.opacity=0,t._viewPickerNode.style.visibility="hidden"}),1e3)})),_defineProperty$1(this,"_showAddTestDeviceDialog",(function(e){var n=createDialog$1(500,20,{}),i=n.children[0];i.style.flex="0 1 auto",i.style.maxHeight="calc(100% - 96px)",i.style.display="flex",i.style.flexDirection="column";var o=Apxor.getController().getDevInfo(),a=Apxor.getController().getUserAttributes().apx_browser,r=o.hardware_model,s=o.os_version,l=o.id,c="\n ".concat('<style>\n .apx-loading{\n background:#333 url(\'https://code.jquery.com/mobile/1.3.1/images/ajax-loader.gif\') no-repeat 50% 50%;\n -webkit-transition:background-color 0;transition:background-color 0;opacity: 1;\n -webkit-transition:opacity 1;transition:opacity 1\n }\n .apx-t{\n flex:0 0 auto;\n margin:0;\n padding:24px 24px 20px\n }\n .apx-tt{\n text-align: center;\n color:rgba(0,72,114,0.87);\n font-size:1.3125rem;\n font-weight:500;\n font-family: inherit, \'Helvetica\', \'Arial\', sans-serif;\n line-height: 1.16667em;\n margin:0\n }\n .apx-c{\n flex:1 1 auto;padding:0 24px 24px;overflow-y: auto\n }\n .apx-de{\n line-height:1.5;color:rgba(0,72,114,0.54);font-size:1rem;font-weight:400;\n font-family:inherit, "Helvetica", "Arial", sans-serif;margin:0;display:block\n }\n .apx-id{\n width:100%;margin-top:8px;margin-bottom:4px;margin:0;border:0;flex-direction:column;\n display:inline-flex;padding:0;position:relative;min-width:0;vertical-align:top\n }\n .apx-il{\n transition:color 200ms cubic-bezier(0.0, 0, 0.2, 1) 0ms,transform 200ms cubic-bezier(0.0, 0, 0.2, 1) 0ms;\n transform:translate(0, 21px) scale(1);top:0;left:0;position:absolute;\n color:rgba(0,72,114, 0.54);padding: 0;font-size: 1rem;transform-origin:top left;\n font-family: inherit, "Helvetica", "Arial", sans-serif;line-height: 1\n }\n .apx-il-f{\n transform:translate(0, 1.5px) scale(0.75)\n }\n label + .apx-iid {\n margin-top:16px;position:relative;width: 100%;color: rgba(0,72,114, 0.87);\n cursor: text;display: inline-flex;font-size: 1rem;\n font-family:inherit, "Helvetica", "Arial", sans-serif;\n line-height: 1.1875em;align-items: center\n }\n .apx-iid.apx-iid-f:after{\n transform:scaleX(1)\n }\n .apx-iid:hover:before{\n border-bottom: 2px solid rgba(0,72,114, 0.87)\n }\n .apx-iid:before{\n left: 0;right: 0;bottom: 0;content: \'\\00a0\';position: absolute;\n transition: border-bottom-color 200ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;\n border-bottom: 1px solid rgba(0, 0, 0, 0.42);pointer-events: none\n }\n .apx-iid:after{\n left: 0;right: 0;bottom: 0;content: "";position: absolute;transform: scaleX(0);\n transition: transform 200ms cubic-bezier(0.0, 0, 0.2, 1) 0ms;\n border-bottom: 2px solid rgb(44, 56, 126);pointer-events: none\n }\n .apx-ii{\n padding-top:3px;font: inherit;color: currentColor;width: 100%;border: 0;margin: 0;\n display: block;min-width: 0;box-sizing: content-box;background: none;padding: 6px 0 7px;outline:0\n }\n .apx-ul{\n padding-top:8px;padding-bottom:8px;margin:0;padding:0;position:relative;list-style:none\n }\n .apx-li{\n padding-left:16px;padding-right:16px;width:100%;display:flex;list-style:none;\n position:relative;box-sizing:border-box;text-align:left;align-items:center;\n padding-top:11px;padding-bottom:11px;justify-content:flex-start;text-decoration:none\n }\n .apx-lid:first-child{\n padding-left:0\n }\n .apx-lid{\n flex:1 1 auto;padding:0 16px;min-width:0\n }\n .apx-lids{\n color:rgba(0,72,114, 0.87);font-weight:400;line-height:1.5em;\n font-family:inherit, "Helvetica", "Arial", sans-seriffont-size:1rem\n }\n .apx-a{\n flex:0 0 auto;margin:8px 4px;display:flex;align-items:center;justify-content:flex-end\n }\n .apx-b{\n font-size:0.875rem;min-width:64px;box-sizing:border-box;min-height:36px;border:0;\n transition:background-color 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms,box-shadow 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms,border 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;\n line-height:1.3125;font-weight:500;font-family:inherit, "Helvetica", "Arial", sans-serif;\n border-radius:4px;cursor:pointer;display:inline-flex;outline:none;\n position:relative;align-items:center;user-select:none;vertical-align:middle;\n justify-content:center;text-decoration:none;background-color:transparent\n }\n .apx-bl{\n width: 100%;display:inherit;align-items:inherit;justify-content:inherit\n }\n .apx-btr{\n top:0;left:0;width:100%;height:100%;display:block;z-index:0;position:absolute;\n overflow:hidden;border-radius:inherit;pointer-events:none\n }\n </style>\n ','\n <div>\n <div class="apx-t"><h2 class="apx-tt">Set device name</h2></div>\n <div class="apx-c">\n <div class="apx-id">\n <label class="apx-il">Device name</label>\n <div class="apx-iid">\n <input class="apx-ii" type="text" id="apx-ii" value="">\n </div>\n </div>\n <ul class="apx-ul">\n <li class="apx-li">\n <div class="apx-lid">\n <span class="apx-lids">\n <span>Model <strong style="float:right">').concat(r," - ").concat(s,'</strong></span>\n </span>\n </div>\n </li>\n <li class="apx-li">\n <div class="apx-lid">\n <span class="apx-lids">\n <span>Browser <strong style="float:right">').concat(a,'</strong></span>\n </span>\n </div>\n </li>\n <li class="apx-li">\n <div class="apx-lid">\n <span class="apx-lids">\n <span>Device ID <strong style="float:right">').concat(l,'</strong></span>\n </span>\n </div>\n </li>\n </ul>\n </div>\n <div class="apx-a">\n <button id="apx-bc" class="apx-b"><span class="apx-bl" style="color:#295e8c6b">Cancel</span><span class="apx-btr"/></button>\n <button id="apx-bd" class="apx-b"><span class="apx-bl" style="color:#295e8c">Done</span><span class="apx-btr"/></button>\n </div>\n </div>\n ');n.style.visibility="hidden",i.style.visibility="hidden",i.innerHTML=c;var d,p,u=document.getElementById("apx-ii");t.testDeviceData&&(u.value=null!==(d=null===(p=t.testDeviceData)||void 0===p?void 0:p.name)&&void 0!==d?d:"");u.onfocus=function(){u.parentNode.classList.add("apx-iid-f"),u.parentNode.parentNode.children[0].classList.add("apx-il-f")},u.onblur=function(){u.parentNode.classList.remove("apx-iid-f"),u.parentNode.parentNode.children[0].classList.remove("apx-il-f")},u.oninput=function(){""!==u.value.trim()?g.removeAttribute("disabled"):g.setAttribute("disabled","")},setTimeout((function(){n.style.visibility="visible",i.style.visibility="visible",i.classList.toggle("open"),u.parentNode.parentNode.children[0].classList.add("apx-il-f")}),100);var h=function(){i.classList.toggle("open"),setTimeout((function(){n.parentNode.removeChild(n)}),400)};document.getElementById("apx-bc").onclick=function(){h()};var g=document.getElementById("apx-bd");g.onclick=function(){i.children[1].classList.add("apx-loading"),Apxor.getController().makePostRequest(ADD_TEST_DEVICE_API.replace("<aid>",Apxor.getSiteId()),{model:r,id:l,nick_name:u.value},{apx_web_key:"WTCKFAIVAJKYJA3HCV80WIKZU98R9NJG"},(function(){var n={id:l,name:u.value};Apxor.getController().persistToStorage("_apx_td",n,!0),t.testDeviceData=n,t._makeSSERequest("select","".concat(u.value," - ").concat(l),l,(function(){i.children[1].classList.remove("apx-loading"),t._wysiwygRoot.dispatchEvent(new CustomEvent("added"))})),t.previewEventSource=new EventSource(PREVIEW_API.replace("<aid>",Apxor.getSiteId()).replace("<uid>",l)),t.artConfigEventSource=new EventSource(CONFIG_API.replace("<aid>",Apxor.getSiteId()).replace("<uid>",l)),t.previewEventSource.onmessage=t.artConfigEventSource.onmessage=function(n){n&&n.data&&"{}"!==n.data&&t._handleSSEResponse(e,n.data)},h()}),(function(){})),document.getElementById("apx-ddtd").style.display="block",document.getElementById("apx-ddtdname").innerHTML=u.value,document.getElementById("apx-ddtdid").innerHTML=l,t.dropDownBox.style.paddingTop="0px"}})),_defineProperty$1(this,"_makeSSERequest",(function(e,n,i){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:function(){},a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:function(){},r=arguments.length>5?arguments[5]:void 0,s=arguments.length>6?arguments[6]:void 0,l=arguments.length>7?arguments[7]:void 0,c=Apxor.getController().getDevInfo(),d={device_info:{id:c.id,hardware_model:c.hardware_model,os_version:c.os_version,width:c.dimensions.width,height:c.dimensions.height},screen:{image:e,navigation:n,orientation:i},layout:[]};r&&(d.find_config=r),s&&(d.events_to_register=s),l&&(d.pages_to_register=l),Apxor.getController().makePostRequest(LAYOUT_URL.replace("<aid>",Apxor.getSiteId()).replace("<uid>",t._vid),d,{},o,a)})),_defineProperty$1(this,"cssPath",(function(e,n){if(e.nodeType!==Node.ELEMENT_NODE)return"";for(var i=[],o=e;o;){var a=t._cssPathStep(o,!!n,o===e);if(!a)break;if(i.push(a),a.optimized)break;o=o.parentNode}return i.reverse(),i.join(" > ")})),_defineProperty$1(this,"_cssPathStep",(function(e,t,n){if(e.nodeType!==Node.ELEMENT_NODE)return null;var i=e.getAttribute("id");if(t){if(i)return new DOMNodePathStep$1(l(i),!0);var o=e.nodeName.toLowerCase();if("body"===o||"head"===o||"html"===o)return new DOMNodePathStep$1(e.nodeName.toLowerCase(),!0)}var a=e.nodeName.toLowerCase();if(i)return new DOMNodePathStep$1(a.toLowerCase()+l(i),!0);var r=e.parentNode;if(!r||r.nodeType===Node.DOCUMENT_NODE)return new DOMNodePathStep$1(a.toLowerCase(),!0);function s(e){var t=e.getAttribute("class");return t?t.split(/\s+/g).filter(Boolean).map((function(e){return"$"+e})):[]}function l(e){return"#"+c(e)}function c(e){if(/^-?[a-zA-Z_][a-zA-Z0-9_-]*$/.test(e))return e;var t=/^(?:[0-9]|-[0-9-]?)/.test(e),n=e.length-1;return e.replace(/./g,(function(e,i){return t&&0===i||!function(e){return!!/[a-zA-Z0-9_-]/.test(e)||e.charCodeAt(0)>=160}(e)?function(e,t){return"\\"+function(e){var t=e.charCodeAt(0).toString(16);1===t.length&&(t="0"+t);return t}(e)+(t?"":" ")}(e,i===n):e}))}for(var d=s(e),p=!1,u=!1,h=-1,g=-1,f=r.children,m=0;(-1===h||!u)&&m<f.length;++m){var _=f[m];if(_.nodeType===Node.ELEMENT_NODE)if(g+=1,_!==e){if(!u&&_.nodeName.toLowerCase()===a.toLowerCase()){p=!0;var v=new Set(d);if(v.size)for(var b=s(_),y=0;y<b.length;++y){var x=b[y];if(v.has(x)&&(v.delete(x),!v.size)){u=!0;break}}else u=!0}}else h=g}var w=a.toLowerCase();if(n&&"input"===a.toLowerCase()&&e.getAttribute("type")&&!e.getAttribute("id")&&!e.getAttribute("class")&&(w+='[type="'+e.getAttribute("type")+'"]'),u)w+=":nth-child("+(h+1)+")";else if(p)for(var C in d)w+="."+c(d[C].substr(1));return new DOMNodePathStep$1(w,!1)})),_defineProperty$1(this,"xPath",(function(e,n){if(e.nodeType===Node.DOCUMENT_NODE)return"/";for(var i=[],o=e;o;){var a=t._xPathValue(o,n);if(!a)break;if(i.push(a),a.optimized)break;o=o.parentNode}return i.reverse(),(i.length&&i[0].optimized?"":"/")+i.join("/")})),_defineProperty$1(this,"_xPathValue",(function(e,n){var i,o=t._xPathIndex(e);if(-1===o)return null;switch(e.nodeType){case Node.ELEMENT_NODE:if(n&&e.getAttribute("id"))return new DOMNodePathStep$1('//*[@id="'+e.getAttribute("id")+'"]',!0);i=e.localName;break;case Node.ATTRIBUTE_NODE:i="@"+e.nodeName;break;case Node.TEXT_NODE:case Node.CDATA_SECTION_NODE:i="text()";break;case Node.PROCESSING_INSTRUCTION_NODE:i="processing-instruction()";break;case Node.COMMENT_NODE:i="comment()";break;case Node.DOCUMENT_NODE:default:i=""}return o>0&&(i+="["+o+"]"),new DOMNodePathStep$1(i,e.nodeType===Node.DOCUMENT_NODE)})),_defineProperty$1(this,"_xPathIndex",(function(e){function t(e,t){return e===t||(e.nodeType===Node.ELEMENT_NODE&&t.nodeType===Node.ELEMENT_NODE?e.localName===t.localName:e.nodeType===t.nodeType||(e.nodeType===Node.CDATA_SECTION_NODE?Node.TEXT_NODE:e.nodeType)===(t.nodeType===Node.CDATA_SECTION_NODE?Node.TEXT_NODE:t.nodeType))}var n,i=e.parentNode?e.parentNode.children:null;if(!i)return 0;for(var o=0;o<i.length;++o)if(t(e,i[o])&&i[o]!==e){n=!0;break}if(!n)return 0;for(var a=1,r=0;r<i.length;++r)if(t(e,i[r])){if(i[r]===e)return a;++a}return-1})),_defineProperty$1(this,"modalForElementSelection",(function(){var e=document.createElement("div");e.className="modal-container";var n=document.createElement("div");n.className="modal-content";var i=document.createElement("div");i.innerHTML='<svg xmlns="http://www.w3.org/2000/svg" width="25" height="25" viewBox="0 0 32 32" fill="none">\n<path d="M14.586 16L6.29204 7.70798C6.19907 7.61501 6.12531 7.50463 6.075 7.38315C6.02468 7.26167 5.99878 7.13147 5.99878 6.99998C5.99878 6.86849 6.02468 6.73829 6.075 6.61681C6.12531 6.49534 6.19907 6.38496 6.29204 6.29198C6.38502 6.19901 6.4954 6.12525 6.61688 6.07493C6.73835 6.02462 6.86855 5.99872 7.00004 5.99872C7.13153 5.99872 7.26173 6.02462 7.38321 6.07493C7.50469 6.12525 7.61507 6.19901 7.70804 6.29198L16 14.586L24.292 6.29198C24.4798 6.10421 24.7345 5.99872 25 5.99872C25.2656 5.99872 25.5203 6.10421 25.708 6.29198C25.8958 6.47975 26.0013 6.73443 26.0013 6.99998C26.0013 7.26553 25.8958 7.52021 25.708 7.70798L17.414 16L25.708 24.292C25.8958 24.4798 26.0013 24.7344 26.0013 25C26.0013 25.2655 25.8958 25.5202 25.708 25.708C25.5203 25.8958 25.2656 26.0012 25 26.0012C24.7345 26.0012 24.4798 25.8958 24.292 25.708L16 17.414L7.70804 25.708C7.52027 25.8958 7.26559 26.0012 7.00004 26.0012C6.73449 26.0012 6.47982 25.8958 6.29204 25.708C6.10427 25.5202 5.99878 25.2655 5.99878 25C5.99878 24.7344 6.10427 24.4798 6.29204 24.292L14.586 16Z" fill="black"/></svg>',i.className="close-button";var o=document.createElement("div");o.innerHTML='<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 200 200" fill="none">\n<circle cx="100" cy="100" r="100" fill="#F5F5F5"/>\n<mask id="mask0_486_2035" style="mask-type:alpha" maskUnits="userSpaceOnUse" x="0" y="0" width="200" height="200">\n<circle cx="100" cy="100" r="100" fill="#F4FBFF"/>\n</mask>\n<g mask="url(#mask0_486_2035)">\n<path d="M334.955 32.8623H54.2021C46.7556 32.8623 40.719 38.8989 40.719 46.3455V153.559C40.719 161.005 46.7556 167.042 54.2022 167.042H334.955C342.401 167.042 348.438 161.005 348.438 153.559V46.3455C348.438 38.8989 342.401 32.8623 334.955 32.8623Z" fill="white"/>\n<path d="M343.635 32.8623H45.5224C42.8695 32.8623 40.719 35.0128 40.719 37.6657C40.719 40.3185 42.8695 42.469 45.5224 42.469H343.635C346.288 42.469 348.438 40.3185 348.438 37.6657C348.438 35.0128 346.288 32.8623 343.635 32.8623Z" fill="#263238"/>\n<path d="M49.9887 37.66C49.9887 38.7274 49.1235 39.5926 48.0561 39.5926C46.9887 39.5926 46.1123 38.7274 46.1123 37.66C46.1123 36.5926 46.9775 35.7274 48.0449 35.7274C49.1123 35.7274 49.9887 36.5926 49.9887 37.66Z" fill="#FFC727"/>\n<path d="M57.8876 37.66C57.8876 38.7274 57.0225 39.5926 55.955 39.5926C54.8876 39.5926 54.0225 38.7274 54.0225 37.66C54.0225 36.5926 54.8876 35.7274 55.955 35.7274C57.0225 35.7274 57.8876 36.5926 57.8876 37.66Z" fill="white"/>\n<path d="M65.7978 37.66C65.7978 38.7274 64.9326 39.5926 63.8652 39.5926C62.7978 39.5926 61.9326 38.7274 61.9326 37.66C61.9326 36.5926 62.7978 35.7274 63.8652 35.7274C64.9326 35.7274 65.7978 36.5926 65.7978 37.66Z" fill="#455A64"/>\n<path d="M313.573 88.6488H75.4384C68.4014 88.6488 62.6968 94.3534 62.6968 101.39C62.6968 108.427 68.4014 114.132 75.4383 114.132H313.573C320.61 114.132 326.315 108.427 326.315 101.39C326.315 94.3534 320.61 88.6488 313.573 88.6488Z" fill="#EBEBEB"/>\n<path d="M124.922 124.952H74.3148C67.8983 124.952 62.6968 130.154 62.6968 136.57C62.6968 142.987 67.8983 148.188 74.3148 148.188H124.921C131.338 148.188 136.539 142.987 136.539 136.57C136.539 130.154 131.338 124.952 124.922 124.952Z" fill="#FFC727"/>\n<path d="M166.562 135.674L170.865 146.067L166.562 147.854L162.236 137.382L155.124 142.899V113.607L175.641 134.315L166.562 135.674Z" fill="#263238"/>\n<path d="M156.629 107.09V100" stroke="#263238" stroke-width="1.1236" stroke-miterlimit="10"/>\n<path d="M148.551 110.562L143.539 105.551" stroke="#263238" stroke-width="1.1236" stroke-miterlimit="10"/>\n<path d="M145.292 118.73H138.202" stroke="#263238" stroke-width="1.1236" stroke-miterlimit="10"/>\n<path d="M148.764 126.809L143.753 131.831" stroke="#263238" stroke-width="1.1236" stroke-miterlimit="10"/>\n<path d="M156.933 130.067V137.157" stroke="#263238" stroke-width="1.1236" stroke-miterlimit="10"/>\n<path d="M165.011 126.595L170.034 131.618" stroke="#263238" stroke-width="1.1236" stroke-miterlimit="10"/>\n<path d="M168.27 118.427H175.36" stroke="#263238" stroke-width="1.1236" stroke-miterlimit="10"/>\n<path d="M164.798 110.348L169.82 105.337" stroke="#263238" stroke-width="1.1236" stroke-miterlimit="10"/>\n</g>\n</svg>',o.className="modal-image";var a=document.createElement("p");a.textContent="To track an event start by \n clicking any element on \n your site.\n",a.className="modal-text",a.style="user-select: none;color:#474747;font-size:20px;font-weight:500;font-family:inherit";var r=document.createElement("button");r.textContent="Select Element",r.className="modal-button",r.style="background-color:#F97316;color:#fff;font-size:13px;font-weight:500;font-family:inherit;height:40px;width:120px;border-radius:11px;border:#F97316",r.addEventListener("click",(function(){t.closeModal(),t._selectAnElement()})),n.appendChild(i),n.appendChild(o),n.appendChild(a),n.appendChild(r),e.appendChild(n),document.body.appendChild(e),i.addEventListener("click",(function(){t.closeModal()})),e.style="display:flex;align-items:center;justify-content:center;position:fixed;top:0%;left:0%;width:100%;height:100%;background-color:rgba(0,0,0,0.5);z-index:9999;",n.style="background-color:#fff;height:358px;width:310px;padding:20px;border-radius:10px;text-align:center;",o.style="border-radius:50%;display:flex;margin-top:20px;justify-content:center;",i.style="height:25px;width:25px;float:right;position:static;top:10px;right:10px;width:30px;height:30px;cursor:pointer"})),_defineProperty$1(this,"traverseLayouts",(function(e,n,i,o){for(var a=0;a<e.length;a++){var r=e[a];console.log("current view",r.view);var s=r.bounds;s&&n>=s.left&&n<=s.right&&i>=s.top&&i<=s.bottom&&((null==t.result||t.result.depth<=o)&&(t.result={depth:o,layout:r}),console.log(r)),t.traverseLayouts(r.views,n,i,o+1)}})),_defineProperty$1(this,"removeWidgetDetails",(function(){Apxor.getController().persistToStorage("_apx_ew",{},!0)})),this.result=null}return _createClass$1(e,[{key:"hasTagName",value:function(e){var t,n=_createForOfIteratorHelper(e);try{for(n.s();!(t=n.n()).done;){var i=t.value;if(this.isTagName(i))return i}}catch(e){n.e(e)}finally{n.f()}return""}},{key:"closeModal",value:function(){document.querySelector(".modal-container").style.display="none"}},{key:"showToastMessagePopUp",value:function(e){this._isShowingToastPopup||(this._toastInApp=new ModalInApp(e,{},"",{},(function(){}),(function(){}),(function(){}),!1,[],0),this._toastInApp.createInAppModal())}},{key:"dismissToastPopup",value:function(){document.querySelector('[class^="apx-inapp-overlay"]').remove(),this._isShowingToastPopup=!1}},{key:"resetHeartbeatTimeout",value:function(){var e=this;clearTimeout(this._heartbeatTimeout),this._heartbeatTimeout=setTimeout((function(){Logger$4.error("Missed heartbeat. Connection might be lost."),e.showToastMessagePopUp(APX_SSE_TIMEOUT_CONFIG)}),3e4)}}]),e}(),DOMNodePathStep$1=function(e,t){this.value=e,this.optimized=t||!1};DOMNodePathStep$1.prototype={toString:function(){return this.value}};var Animation=function(){function e(){var t,n,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};switch(_classCallCheck$1(this,e),this.type=getStringOrDefault(i.type,"cycle"),this.duration=getNumberOrDefault(i.duration,1),this.delay_millis=getNumberOrDefault(i.delay_millis,1e3)/1e3,this.duration_millis=getNumberOrDefault(i.duration_millis,1e3)/1e3,this.inter_count=getNumberOrDefault(i.inter_count,0),this.intra_count=getNumberOrDefault(i.intra_count,0),this.type){case"fade":this.fade_opacity=getNumberOrDefault(i.fade.opacity,50);break;case"ripple":this.rippleArea=getNumberOrDefault(i.ripple.area,8),this.rippleColor=getColorOrDefault(i.ripple.color,"#FFFFFF"),this.rippleCornerRadius=getNumberOrDefault(i.ripple.corner_radius,8),this.rippleShape=getStringOrDefault(i.ripple.shape,"rectangle");break;case"shake":this.shakeDirection=getStringOrDefault(i.shake.direction,"horizontal");break;case"shine":this.shineDirection=getStringOrDefault(i.shine.direction,"to_bottom_right"),this.shineColor=getColorOrDefault(i.shine.color,"#FFFFFF"),this.lines_gap=null==i||null===(t=i.shine)||void 0===t?void 0:t.lines_gap,this.lines=null==i||null===(n=i.shine)||void 0===n?void 0:n.lines}this.anim_function=getStringOrDefault(i.anim_function,"ease-in-out"),this.iteration_count=getNumberOrDefault(i.iteration_count,"infinite")}return _createClass$1(e,null,[{key:"isEnabled",value:function(e){return!(isUndefined$2(e)||isNull$1(e)||isEmptyObject(e))}}]),e}(),Arrow=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"#FFFFFF";_classCallCheck$1(this,e),this.arrowPosition=getNumberOrDefault(null==t?void 0:t.arrowPosition,0),this.type=getStringOrDefault(t.type,"normal"),this.color=getColorOrDefault(t.color,n),this.enable_border=t.enable_border,this.border=new Border(t.border)}return _createClass$1(e,null,[{key:"isEnabled",value:function(e){return!(isUndefined$2(e)||isNull$1(e)||isEmptyObject(e))}}]),e}(),EleHighlighterOffset=_createClass$1((function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};_classCallCheck$1(this,e),this.top=getNumberOrDefault(null==t?void 0:t.top,0),this.bottom=getNumberOrDefault(null==t?void 0:t.bottom,0),this.left=getNumberOrDefault(null==t?void 0:t.left,0),this.right=getNumberOrDefault(null==t?void 0:t.right,0)})),ElementHighlighter=_createClass$1((function e(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};_classCallCheck$1(this,e),this.shape=getStringOrDefault(n.shape,"rectangle"),this.border=new Border(n.border),this.border.opacity=getStringOrDefault(null===(t=n.border)||void 0===t?void 0:t.opacity,"1"),this.cornerRadius=getStringOrDefault(n.corner_radius,"0"),this.offsetRadius=getNumberOrDefault(n.offset_radius,0),this.offset=new EleHighlighterOffset(n.offset)})),Target$1=_createClass$1((function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};_classCallCheck$1(this,e),this.interval=getNumberOrDefault(t.interval,0),this.max_retries=getNumberOrDefault(t.max_retries,0)})),AvfText=_createClass$1((function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};_classCallCheck$1(this,e),this.type=getStringOrDefault(null==t?void 0:t.type),this.op=getStringOrDefault(null==t?void 0:t.op),this.content=null==t?void 0:t.content})),Target=_createClass$1((function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};_classCallCheck$1(this,e),this.id=getStringOrDefault(t.id,""),this.frame_id=getStringOrDefault(null==t?void 0:t.frame_id,""),this.is_text_based=null==t?void 0:t.is_content_based,this.avf_text_config=new AvfText(null==t?void 0:t.content),this.enable_retry=Boolean(null==t?void 0:t.enable_retry),this.retry=new Target$1(null==t?void 0:t.retry)})),top="top",bottom="bottom",right="right",left="left",auto="auto",basePlacements=[top,bottom,right,left],start="start",end="end",clippingParents="clippingParents",viewport="viewport",popper="popper",reference="reference",variationPlacements=basePlacements.reduce((function(e,t){return e.concat([t+"-"+start,t+"-"+end])}),[]),placements=[].concat(basePlacements,[auto]).reduce((function(e,t){return e.concat([t,t+"-"+start,t+"-"+end])}),[]),beforeRead="beforeRead",read="read",afterRead="afterRead",beforeMain="beforeMain",main="main",afterMain="afterMain",beforeWrite="beforeWrite",write="write",afterWrite="afterWrite",modifierPhases=[beforeRead,read,afterRead,beforeMain,main,afterMain,beforeWrite,write,afterWrite];function getNodeName(e){return e?(e.nodeName||"").toLowerCase():null}function getWindow(e){if(null==e)return window;if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function isElement$1(e){return e instanceof getWindow(e).Element||e instanceof Element}function isHTMLElement(e){return e instanceof getWindow(e).HTMLElement||e instanceof HTMLElement}function isShadowRoot(e){return"undefined"!=typeof ShadowRoot&&(e instanceof getWindow(e).ShadowRoot||e instanceof ShadowRoot)}function applyStyles(e){var t=e.state;Object.keys(t.elements).forEach((function(e){var n=t.styles[e]||{},i=t.attributes[e]||{},o=t.elements[e];isHTMLElement(o)&&getNodeName(o)&&(Object.assign(o.style,n),Object.keys(i).forEach((function(e){var t=i[e];!1===t?o.removeAttribute(e):o.setAttribute(e,!0===t?"":t)})))}))}function effect$2(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach((function(e){var i=t.elements[e],o=t.attributes[e]||{},a=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:n[e]).reduce((function(e,t){return e[t]="",e}),{});isHTMLElement(i)&&getNodeName(i)&&(Object.assign(i.style,a),Object.keys(o).forEach((function(e){i.removeAttribute(e)})))}))}}var applyStyles$1={name:"applyStyles",enabled:!0,phase:"write",fn:applyStyles,effect:effect$2,requires:["computeStyles"]};function getBasePlacement$1(e){return e.split("-")[0]}var max=Math.max,min=Math.min,round=Math.round;function getUAString(){var e=navigator.userAgentData;return null!=e&&e.brands&&Array.isArray(e.brands)?e.brands.map((function(e){return e.brand+"/"+e.version})).join(" "):navigator.userAgent}function isLayoutViewport(){return!/^((?!chrome|android).)*safari/i.test(getUAString())}function getBoundingClientRect(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=!1);var i=e.getBoundingClientRect(),o=1,a=1;t&&isHTMLElement(e)&&(o=e.offsetWidth>0&&round(i.width)/e.offsetWidth||1,a=e.offsetHeight>0&&round(i.height)/e.offsetHeight||1);var r=(isElement$1(e)?getWindow(e):window).visualViewport,s=!isLayoutViewport()&&n,l=(i.left+(s&&r?r.offsetLeft:0))/o,c=(i.top+(s&&r?r.offsetTop:0))/a,d=i.width/o,p=i.height/a;return{width:d,height:p,top:c,right:l+d,bottom:c+p,left:l,x:l,y:c}}function getLayoutRect(e){var t=getBoundingClientRect(e),n=e.offsetWidth,i=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-i)<=1&&(i=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:i}}function contains(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&isShadowRoot(n)){var i=t;do{if(i&&e.isSameNode(i))return!0;i=i.parentNode||i.host}while(i)}return!1}function getComputedStyle$1(e){return getWindow(e).getComputedStyle(e)}function isTableElement(e){return["table","td","th"].indexOf(getNodeName(e))>=0}function getDocumentElement(e){return((isElement$1(e)?e.ownerDocument:e.document)||window.document).documentElement}function getParentNode(e){return"html"===getNodeName(e)?e:e.assignedSlot||e.parentNode||(isShadowRoot(e)?e.host:null)||getDocumentElement(e)}function getTrueOffsetParent(e){return isHTMLElement(e)&&"fixed"!==getComputedStyle$1(e).position?e.offsetParent:null}function getContainingBlock(e){var t=/firefox/i.test(getUAString());if(/Trident/i.test(getUAString())&&isHTMLElement(e)&&"fixed"===getComputedStyle$1(e).position)return null;var n=getParentNode(e);for(isShadowRoot(n)&&(n=n.host);isHTMLElement(n)&&["html","body"].indexOf(getNodeName(n))<0;){var i=getComputedStyle$1(n);if("none"!==i.transform||"none"!==i.perspective||"paint"===i.contain||-1!==["transform","perspective"].indexOf(i.willChange)||t&&"filter"===i.willChange||t&&i.filter&&"none"!==i.filter)return n;n=n.parentNode}return null}function getOffsetParent(e){for(var t=getWindow(e),n=getTrueOffsetParent(e);n&&isTableElement(n)&&"static"===getComputedStyle$1(n).position;)n=getTrueOffsetParent(n);return n&&("html"===getNodeName(n)||"body"===getNodeName(n)&&"static"===getComputedStyle$1(n).position)?t:n||getContainingBlock(e)||t}function getMainAxisFromPlacement(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function within(e,t,n){return max(e,min(t,n))}function withinMaxClamp(e,t,n){var i=within(e,t,n);return i>n?n:i}function getFreshSideObject(){return{top:0,right:0,bottom:0,left:0}}function mergePaddingObject(e){return Object.assign({},getFreshSideObject(),e)}function expandToHashMap(e,t){return t.reduce((function(t,n){return t[n]=e,t}),{})}var toPaddingObject=function(e,t){return mergePaddingObject("number"!=typeof(e="function"==typeof e?e(Object.assign({},t.rects,{placement:t.placement})):e)?e:expandToHashMap(e,basePlacements))};function arrow(e){var t,n=e.state,i=e.name,o=e.options,a=n.elements.arrow,r=n.modifiersData.popperOffsets,s=getBasePlacement$1(n.placement),l=getMainAxisFromPlacement(s),c=[left,right].indexOf(s)>=0?"height":"width";if(a&&r){var d=toPaddingObject(o.padding,n),p=getLayoutRect(a),u="y"===l?top:left,h="y"===l?bottom:right,g=n.rects.reference[c]+n.rects.reference[l]-r[l]-n.rects.popper[c],f=r[l]-n.rects.reference[l],m=getOffsetParent(a),_=m?"y"===l?m.clientHeight||0:m.clientWidth||0:0,v=g/2-f/2,b=d[u],y=_-p[c]-d[h],x=_/2-p[c]/2+v,w=within(b,x,y),C=l;n.modifiersData[i]=((t={})[C]=w,t.centerOffset=w-x,t)}}function effect$1(e){var t=e.state,n=e.options.element,i=void 0===n?"[data-popper-arrow]":n;null!=i&&("string"!=typeof i||(i=t.elements.popper.querySelector(i)))&&contains(t.elements.popper,i)&&(t.elements.arrow=i)}var arrow$1={name:"arrow",enabled:!0,phase:"main",fn:arrow,effect:effect$1,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function getVariation(e){return e.split("-")[1]}var unsetSides={top:"auto",right:"auto",bottom:"auto",left:"auto"};function roundOffsetsByDPR(e,t){var n=e.x,i=e.y,o=t.devicePixelRatio||1;return{x:round(n*o)/o||0,y:round(i*o)/o||0}}function mapToStyles(e){var t,n=e.popper,i=e.popperRect,o=e.placement,a=e.variation,r=e.offsets,s=e.position,l=e.gpuAcceleration,c=e.adaptive,d=e.roundOffsets,p=e.isFixed,u=r.x,h=void 0===u?0:u,g=r.y,f=void 0===g?0:g,m="function"==typeof d?d({x:h,y:f}):{x:h,y:f};h=m.x,f=m.y;var _=r.hasOwnProperty("x"),v=r.hasOwnProperty("y"),b=left,y=top,x=window;if(c){var w=getOffsetParent(n),C="clientHeight",E="clientWidth";if(w===getWindow(n)&&"static"!==getComputedStyle$1(w=getDocumentElement(n)).position&&"absolute"===s&&(C="scrollHeight",E="scrollWidth"),w=w,o===top||(o===left||o===right)&&a===end)y=bottom,f-=(p&&w===x&&x.visualViewport?x.visualViewport.height:w[C])-i.height,f*=l?1:-1;if(o===left||(o===top||o===bottom)&&a===end)b=right,h-=(p&&w===x&&x.visualViewport?x.visualViewport.width:w[E])-i.width,h*=l?1:-1}var k,S=Object.assign({position:s},c&&unsetSides),T=!0===d?roundOffsetsByDPR({x:h,y:f},getWindow(n)):{x:h,y:f};return h=T.x,f=T.y,l?Object.assign({},S,((k={})[y]=v?"0":"",k[b]=_?"0":"",k.transform=(x.devicePixelRatio||1)<=1?"translate("+h+"px, "+f+"px)":"translate3d("+h+"px, "+f+"px, 0)",k)):Object.assign({},S,((t={})[y]=v?f+"px":"",t[b]=_?h+"px":"",t.transform="",t))}function computeStyles(e){var t=e.state,n=e.options,i=n.gpuAcceleration,o=void 0===i||i,a=n.adaptive,r=void 0===a||a,s=n.roundOffsets,l=void 0===s||s,c={placement:getBasePlacement$1(t.placement),variation:getVariation(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:o,isFixed:"fixed"===t.options.strategy};null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign({},t.styles.popper,mapToStyles(Object.assign({},c,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:r,roundOffsets:l})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,mapToStyles(Object.assign({},c,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}var computeStyles$1={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:computeStyles,data:{}},passive={passive:!0};function effect(e){var t=e.state,n=e.instance,i=e.options,o=i.scroll,a=void 0===o||o,r=i.resize,s=void 0===r||r,l=getWindow(t.elements.popper),c=[].concat(t.scrollParents.reference,t.scrollParents.popper);return a&&c.forEach((function(e){e.addEventListener("scroll",n.update,passive)})),s&&l.addEventListener("resize",n.update,passive),function(){a&&c.forEach((function(e){e.removeEventListener("scroll",n.update,passive)})),s&&l.removeEventListener("resize",n.update,passive)}}var eventListeners={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:effect,data:{}},hash$1={left:"right",right:"left",bottom:"top",top:"bottom"};function getOppositePlacement(e){return e.replace(/left|right|bottom|top/g,(function(e){return hash$1[e]}))}var hash={start:"end",end:"start"};function getOppositeVariationPlacement(e){return e.replace(/start|end/g,(function(e){return hash[e]}))}function getWindowScroll(e){var t=getWindow(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function getWindowScrollBarX(e){return getBoundingClientRect(getDocumentElement(e)).left+getWindowScroll(e).scrollLeft}function getViewportRect(e,t){var n=getWindow(e),i=getDocumentElement(e),o=n.visualViewport,a=i.clientWidth,r=i.clientHeight,s=0,l=0;if(o){a=o.width,r=o.height;var c=isLayoutViewport();(c||!c&&"fixed"===t)&&(s=o.offsetLeft,l=o.offsetTop)}return{width:a,height:r,x:s+getWindowScrollBarX(e),y:l}}function getDocumentRect(e){var t,n=getDocumentElement(e),i=getWindowScroll(e),o=null==(t=e.ownerDocument)?void 0:t.body,a=max(n.scrollWidth,n.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),r=max(n.scrollHeight,n.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),s=-i.scrollLeft+getWindowScrollBarX(e),l=-i.scrollTop;return"rtl"===getComputedStyle$1(o||n).direction&&(s+=max(n.clientWidth,o?o.clientWidth:0)-a),{width:a,height:r,x:s,y:l}}function isScrollParent(e){var t=getComputedStyle$1(e),n=t.overflow,i=t.overflowX,o=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+o+i)}function getScrollParent(e){return["html","body","#document"].indexOf(getNodeName(e))>=0?e.ownerDocument.body:isHTMLElement(e)&&isScrollParent(e)?e:getScrollParent(getParentNode(e))}function listScrollParents(e,t){var n;void 0===t&&(t=[]);var i=getScrollParent(e),o=i===(null==(n=e.ownerDocument)?void 0:n.body),a=getWindow(i),r=o?[a].concat(a.visualViewport||[],isScrollParent(i)?i:[]):i,s=t.concat(r);return o?s:s.concat(listScrollParents(getParentNode(r)))}function rectToClientRect(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function getInnerBoundingClientRect(e,t){var n=getBoundingClientRect(e,!1,"fixed"===t);return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}function getClientRectFromMixedType(e,t,n){return t===viewport?rectToClientRect(getViewportRect(e,n)):isElement$1(t)?getInnerBoundingClientRect(t,n):rectToClientRect(getDocumentRect(getDocumentElement(e)))}function getClippingParents(e){var t=listScrollParents(getParentNode(e)),n=["absolute","fixed"].indexOf(getComputedStyle$1(e).position)>=0&&isHTMLElement(e)?getOffsetParent(e):e;return isElement$1(n)?t.filter((function(e){return isElement$1(e)&&contains(e,n)&&"body"!==getNodeName(e)})):[]}function getClippingRect(e,t,n,i){var o="clippingParents"===t?getClippingParents(e):[].concat(t),a=[].concat(o,[n]),r=a[0],s=a.reduce((function(t,n){var o=getClientRectFromMixedType(e,n,i);return t.top=max(o.top,t.top),t.right=min(o.right,t.right),t.bottom=min(o.bottom,t.bottom),t.left=max(o.left,t.left),t}),getClientRectFromMixedType(e,r,i));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function computeOffsets(e){var t,n=e.reference,i=e.element,o=e.placement,a=o?getBasePlacement$1(o):null,r=o?getVariation(o):null,s=n.x+n.width/2-i.width/2,l=n.y+n.height/2-i.height/2;switch(a){case top:t={x:s,y:n.y-i.height};break;case bottom:t={x:s,y:n.y+n.height};break;case right:t={x:n.x+n.width,y:l};break;case left:t={x:n.x-i.width,y:l};break;default:t={x:n.x,y:n.y}}var c=a?getMainAxisFromPlacement(a):null;if(null!=c){var d="y"===c?"height":"width";switch(r){case start:t[c]=t[c]-(n[d]/2-i[d]/2);break;case end:t[c]=t[c]+(n[d]/2-i[d]/2)}}return t}function detectOverflow(e,t){void 0===t&&(t={});var n=t,i=n.placement,o=void 0===i?e.placement:i,a=n.strategy,r=void 0===a?e.strategy:a,s=n.boundary,l=void 0===s?clippingParents:s,c=n.rootBoundary,d=void 0===c?viewport:c,p=n.elementContext,u=void 0===p?popper:p,h=n.altBoundary,g=void 0!==h&&h,f=n.padding,m=void 0===f?0:f,_=mergePaddingObject("number"!=typeof m?m:expandToHashMap(m,basePlacements)),v=u===popper?reference:popper,b=e.rects.popper,y=e.elements[g?v:u],x=getClippingRect(isElement$1(y)?y:y.contextElement||getDocumentElement(e.elements.popper),l,d,r),w=getBoundingClientRect(e.elements.reference),C=computeOffsets({reference:w,element:b,strategy:"absolute",placement:o}),E=rectToClientRect(Object.assign({},b,C)),k=u===popper?E:w,S={top:x.top-k.top+_.top,bottom:k.bottom-x.bottom+_.bottom,left:x.left-k.left+_.left,right:k.right-x.right+_.right},T=e.modifiersData.offset;if(u===popper&&T){var A=T[o];Object.keys(S).forEach((function(e){var t=[right,bottom].indexOf(e)>=0?1:-1,n=[top,bottom].indexOf(e)>=0?"y":"x";S[e]+=A[n]*t}))}return S}function computeAutoPlacement(e,t){void 0===t&&(t={});var n=t,i=n.placement,o=n.boundary,a=n.rootBoundary,r=n.padding,s=n.flipVariations,l=n.allowedAutoPlacements,c=void 0===l?placements:l,d=getVariation(i),p=d?s?variationPlacements:variationPlacements.filter((function(e){return getVariation(e)===d})):basePlacements,u=p.filter((function(e){return c.indexOf(e)>=0}));0===u.length&&(u=p);var h=u.reduce((function(t,n){return t[n]=detectOverflow(e,{placement:n,boundary:o,rootBoundary:a,padding:r})[getBasePlacement$1(n)],t}),{});return Object.keys(h).sort((function(e,t){return h[e]-h[t]}))}function getExpandedFallbackPlacements(e){if(getBasePlacement$1(e)===auto)return[];var t=getOppositePlacement(e);return[getOppositeVariationPlacement(e),t,getOppositeVariationPlacement(t)]}function flip(e){var t=e.state,n=e.options,i=e.name;if(!t.modifiersData[i]._skip){for(var o=n.mainAxis,a=void 0===o||o,r=n.altAxis,s=void 0===r||r,l=n.fallbackPlacements,c=n.padding,d=n.boundary,p=n.rootBoundary,u=n.altBoundary,h=n.flipVariations,g=void 0===h||h,f=n.allowedAutoPlacements,m=t.options.placement,_=getBasePlacement$1(m),v=l||(_===m||!g?[getOppositePlacement(m)]:getExpandedFallbackPlacements(m)),b=[m].concat(v).reduce((function(e,n){return e.concat(getBasePlacement$1(n)===auto?computeAutoPlacement(t,{placement:n,boundary:d,rootBoundary:p,padding:c,flipVariations:g,allowedAutoPlacements:f}):n)}),[]),y=t.rects.reference,x=t.rects.popper,w=new Map,C=!0,E=b[0],k=0;k<b.length;k++){var S=b[k],T=getBasePlacement$1(S),A=getVariation(S)===start,I=[top,bottom].indexOf(T)>=0,P=I?"width":"height",O=detectOverflow(t,{placement:S,boundary:d,rootBoundary:p,altBoundary:u,padding:c}),L=I?A?right:left:A?bottom:top;y[P]>x[P]&&(L=getOppositePlacement(L));var N=getOppositePlacement(L),D=[];if(a&&D.push(O[T]<=0),s&&D.push(O[L]<=0,O[N]<=0),D.every((function(e){return e}))){E=S,C=!1;break}w.set(S,D)}if(C)for(var B=function(e){var t=b.find((function(t){var n=w.get(t);if(n)return n.slice(0,e).every((function(e){return e}))}));if(t)return E=t,"break"},M=g?3:1;M>0;M--){if("break"===B(M))break}t.placement!==E&&(t.modifiersData[i]._skip=!0,t.placement=E,t.reset=!0)}}var flip$1={name:"flip",enabled:!0,phase:"main",fn:flip,requiresIfExists:["offset"],data:{_skip:!1}};function getSideOffsets(e,t,n){return void 0===n&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function isAnySideFullyClipped(e){return[top,right,bottom,left].some((function(t){return e[t]>=0}))}function hide(e){var t=e.state,n=e.name,i=t.rects.reference,o=t.rects.popper,a=t.modifiersData.preventOverflow,r=detectOverflow(t,{elementContext:"reference"}),s=detectOverflow(t,{altBoundary:!0}),l=getSideOffsets(r,i),c=getSideOffsets(s,o,a),d=isAnySideFullyClipped(l),p=isAnySideFullyClipped(c);t.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:d,hasPopperEscaped:p},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":d,"data-popper-escaped":p})}var hide$1={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:hide};function distanceAndSkiddingToXY(e,t,n){var i=getBasePlacement$1(e),o=[left,top].indexOf(i)>=0?-1:1,a="function"==typeof n?n(Object.assign({},t,{placement:e})):n,r=a[0],s=a[1];return r=r||0,s=(s||0)*o,[left,right].indexOf(i)>=0?{x:s,y:r}:{x:r,y:s}}function offset(e){var t=e.state,n=e.options,i=e.name,o=n.offset,a=void 0===o?[0,0]:o,r=placements.reduce((function(e,n){return e[n]=distanceAndSkiddingToXY(n,t.rects,a),e}),{}),s=r[t.placement],l=s.x,c=s.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=c),t.modifiersData[i]=r}var offset$1={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:offset};function popperOffsets(e){var t=e.state,n=e.name;t.modifiersData[n]=computeOffsets({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}var popperOffsets$1={name:"popperOffsets",enabled:!0,phase:"read",fn:popperOffsets,data:{}};function getAltAxis(e){return"x"===e?"y":"x"}function preventOverflow(e){var t=e.state,n=e.options,i=e.name,o=n.mainAxis,a=void 0===o||o,r=n.altAxis,s=void 0!==r&&r,l=n.boundary,c=n.rootBoundary,d=n.altBoundary,p=n.padding,u=n.tether,h=void 0===u||u,g=n.tetherOffset,f=void 0===g?0:g,m=detectOverflow(t,{boundary:l,rootBoundary:c,padding:p,altBoundary:d}),_=getBasePlacement$1(t.placement),v=getVariation(t.placement),b=!v,y=getMainAxisFromPlacement(_),x=getAltAxis(y),w=t.modifiersData.popperOffsets,C=t.rects.reference,E=t.rects.popper,k="function"==typeof f?f(Object.assign({},t.rects,{placement:t.placement})):f,S="number"==typeof k?{mainAxis:k,altAxis:k}:Object.assign({mainAxis:0,altAxis:0},k),T=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,A={x:0,y:0};if(w){if(a){var I,P="y"===y?top:left,O="y"===y?bottom:right,L="y"===y?"height":"width",N=w[y],D=N+m[P],B=N-m[O],M=h?-E[L]/2:0,F=v===start?C[L]:E[L],$=v===start?-E[L]:-C[L],R=t.elements.arrow,H=h&&R?getLayoutRect(R):{width:0,height:0},V=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:getFreshSideObject(),q=V[P],U=V[O],j=within(0,C[L],H[L]),z=b?C[L]/2-M-j-q-S.mainAxis:F-j-q-S.mainAxis,W=b?-C[L]/2+M+j+U+S.mainAxis:$+j+U+S.mainAxis,Y=t.elements.arrow&&getOffsetParent(t.elements.arrow),X=Y?"y"===y?Y.clientTop||0:Y.clientLeft||0:0,G=null!=(I=null==T?void 0:T[y])?I:0,Q=N+W-G,Z=within(h?min(D,N+z-G-X):D,N,h?max(B,Q):B);w[y]=Z,A[y]=Z-N}if(s){var K,J="x"===y?top:left,ee="x"===y?bottom:right,te=w[x],ne="y"===x?"height":"width",ie=te+m[J],oe=te-m[ee],ae=-1!==[top,left].indexOf(_),re=null!=(K=null==T?void 0:T[x])?K:0,se=ae?ie:te-C[ne]-E[ne]-re+S.altAxis,le=ae?te+C[ne]+E[ne]-re-S.altAxis:oe,ce=h&&ae?withinMaxClamp(se,te,le):within(h?se:ie,te,h?le:oe);w[x]=ce,A[x]=ce-te}t.modifiersData[i]=A}}var preventOverflow$1={name:"preventOverflow",enabled:!0,phase:"main",fn:preventOverflow,requiresIfExists:["offset"]};function getHTMLElementScroll(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function getNodeScroll(e){return e!==getWindow(e)&&isHTMLElement(e)?getHTMLElementScroll(e):getWindowScroll(e)}function isElementScaled(e){var t=e.getBoundingClientRect(),n=round(t.width)/e.offsetWidth||1,i=round(t.height)/e.offsetHeight||1;return 1!==n||1!==i}function getCompositeRect(e,t,n){void 0===n&&(n=!1);var i=isHTMLElement(t),o=isHTMLElement(t)&&isElementScaled(t),a=getDocumentElement(t),r=getBoundingClientRect(e,o,n),s={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(i||!i&&!n)&&(("body"!==getNodeName(t)||isScrollParent(a))&&(s=getNodeScroll(t)),isHTMLElement(t)?((l=getBoundingClientRect(t,!0)).x+=t.clientLeft,l.y+=t.clientTop):a&&(l.x=getWindowScrollBarX(a))),{x:r.left+s.scrollLeft-l.x,y:r.top+s.scrollTop-l.y,width:r.width,height:r.height}}function order(e){var t=new Map,n=new Set,i=[];return e.forEach((function(e){t.set(e.name,e)})),e.forEach((function(e){n.has(e.name)||function e(o){n.add(o.name),[].concat(o.requires||[],o.requiresIfExists||[]).forEach((function(i){if(!n.has(i)){var o=t.get(i);o&&e(o)}})),i.push(o)}(e)})),i}function orderModifiers(e){var t=order(e);return modifierPhases.reduce((function(e,n){return e.concat(t.filter((function(e){return e.phase===n})))}),[])}function debounce$1(e){var t;return function(){return t||(t=new Promise((function(n){Promise.resolve().then((function(){t=void 0,n(e())}))}))),t}}function mergeByName(e){var t=e.reduce((function(e,t){var n=e[t.name];return e[t.name]=n?Object.assign({},n,t,{options:Object.assign({},n.options,t.options),data:Object.assign({},n.data,t.data)}):t,e}),{});return Object.keys(t).map((function(e){return t[e]}))}var DEFAULT_OPTIONS={placement:"bottom",modifiers:[],strategy:"absolute"};function areValidElements(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return!t.some((function(e){return!(e&&"function"==typeof e.getBoundingClientRect)}))}function popperGenerator(e){void 0===e&&(e={});var t=e,n=t.defaultModifiers,i=void 0===n?[]:n,o=t.defaultOptions,a=void 0===o?DEFAULT_OPTIONS:o;return function(e,t,n){void 0===n&&(n=a);var o={placement:"bottom",orderedModifiers:[],options:Object.assign({},DEFAULT_OPTIONS,a),modifiersData:{},elements:{reference:e,popper:t},attributes:{},styles:{}},r=[],s=!1,l={state:o,setOptions:function(n){var s="function"==typeof n?n(o.options):n;c(),o.options=Object.assign({},a,o.options,s),o.scrollParents={reference:isElement$1(e)?listScrollParents(e):e.contextElement?listScrollParents(e.contextElement):[],popper:listScrollParents(t)};var d=orderModifiers(mergeByName([].concat(i,o.options.modifiers)));return o.orderedModifiers=d.filter((function(e){return e.enabled})),o.orderedModifiers.forEach((function(e){var t=e.name,n=e.options,i=void 0===n?{}:n,a=e.effect;if("function"==typeof a){var s=a({state:o,name:t,instance:l,options:i});r.push(s||function(){})}})),l.update()},forceUpdate:function(){if(!s){var e=o.elements,t=e.reference,n=e.popper;if(areValidElements(t,n)){o.rects={reference:getCompositeRect(t,getOffsetParent(n),"fixed"===o.options.strategy),popper:getLayoutRect(n)},o.reset=!1,o.placement=o.options.placement,o.orderedModifiers.forEach((function(e){return o.modifiersData[e.name]=Object.assign({},e.data)}));for(var i=0;i<o.orderedModifiers.length;i++)if(!0!==o.reset){var a=o.orderedModifiers[i],r=a.fn,c=a.options,d=void 0===c?{}:c,p=a.name;"function"==typeof r&&(o=r({state:o,options:d,name:p,instance:l})||o)}else o.reset=!1,i=-1}}},update:debounce$1((function(){return new Promise((function(e){l.forceUpdate(),e(o)}))})),destroy:function(){c(),s=!0}};if(!areValidElements(e,t))return l;function c(){r.forEach((function(e){return e()})),r=[]}return l.setOptions(n).then((function(e){!s&&n.onFirstUpdate&&n.onFirstUpdate(e)})),l}}var defaultModifiers=[eventListeners,popperOffsets$1,computeStyles$1,applyStyles$1,offset$1,flip$1,preventOverflow$1,arrow$1,hide$1],createPopper=popperGenerator({defaultModifiers:defaultModifiers}),BOX_CLASS="tippy-box",CONTENT_CLASS="tippy-content",BACKDROP_CLASS="tippy-backdrop",ARROW_CLASS="tippy-arrow",SVG_ARROW_CLASS="tippy-svg-arrow",TOUCH_OPTIONS={passive:!0,capture:!0},TIPPY_DEFAULT_APPEND_TO=function(){return document.body};function getValueAtIndexOrReturn(e,t,n){if(Array.isArray(e)){var i=e[t];return null==i?Array.isArray(n)?n[t]:n:i}return e}function isType(e,t){var n={}.toString.call(e);return 0===n.indexOf("[object")&&n.indexOf(t+"]")>-1}function invokeWithArgsOrReturn(e,t){return"function"==typeof e?e.apply(void 0,t):e}function debounce(e,t){return 0===t?e:function(i){clearTimeout(n),n=setTimeout((function(){e(i)}),t)};var n}function splitBySpaces(e){return e.split(/\s+/).filter(Boolean)}function normalizeToArray(e){return[].concat(e)}function pushIfUnique(e,t){-1===e.indexOf(t)&&e.push(t)}function unique(e){return e.filter((function(t,n){return e.indexOf(t)===n}))}function getBasePlacement(e){return e.split("-")[0]}function arrayFrom(e){return[].slice.call(e)}function removeUndefinedProps(e){return Object.keys(e).reduce((function(t,n){return void 0!==e[n]&&(t[n]=e[n]),t}),{})}function div(){return document.createElement("div")}function isElement(e){return["Element","Fragment"].some((function(t){return isType(e,t)}))}function isNodeList(e){return isType(e,"NodeList")}function isMouseEvent(e){return isType(e,"MouseEvent")}function isReferenceElement(e){return!(!e||!e._tippy||e._tippy.reference!==e)}function getArrayOfElements(e){return isElement(e)?[e]:isNodeList(e)?arrayFrom(e):Array.isArray(e)?e:arrayFrom(document.querySelectorAll(e))}function setTransitionDuration(e,t){e.forEach((function(e){e&&(e.style.transitionDuration=t+"ms")}))}function setVisibilityState(e,t){e.forEach((function(e){e&&e.setAttribute("data-state",t)}))}function getOwnerDocument(e){var t,n=normalizeToArray(e)[0];return null!=n&&null!=(t=n.ownerDocument)&&t.body?n.ownerDocument:document}function isCursorOutsideInteractiveBorder(e,t){var n=t.clientX,i=t.clientY;return e.every((function(e){var t=e.popperRect,o=e.popperState,a=e.props.interactiveBorder,r=getBasePlacement(o.placement),s=o.modifiersData.offset;if(!s)return!0;var l="bottom"===r?s.top.y:0,c="top"===r?s.bottom.y:0,d="right"===r?s.left.x:0,p="left"===r?s.right.x:0,u=t.top-i+l>a,h=i-t.bottom-c>a,g=t.left-n+d>a,f=n-t.right-p>a;return u||h||g||f}))}function updateTransitionEndListener(e,t,n){var i=t+"EventListener";["transitionend","webkitTransitionEnd"].forEach((function(t){e[i](t,n)}))}function actualContains(e,t){for(var n=t;n;){var i;if(e.contains(n))return!0;n=null==n.getRootNode||null==(i=n.getRootNode())?void 0:i.host}return!1}var currentInput={isTouch:!1},lastMouseMoveTime=0;function onDocumentTouchStart(){currentInput.isTouch||(currentInput.isTouch=!0,window.performance&&document.addEventListener("mousemove",onDocumentMouseMove))}function onDocumentMouseMove(){var e=performance.now();e-lastMouseMoveTime<20&&(currentInput.isTouch=!1,document.removeEventListener("mousemove",onDocumentMouseMove)),lastMouseMoveTime=e}function onWindowBlur(){var e=document.activeElement;if(isReferenceElement(e)){var t=e._tippy;e.blur&&!t.state.isVisible&&e.blur()}}function bindGlobalEventListeners(){document.addEventListener("touchstart",onDocumentTouchStart,TOUCH_OPTIONS),window.addEventListener("blur",onWindowBlur)}var isBrowser="undefined"!=typeof window&&"undefined"!=typeof document,isIE11=!!isBrowser&&!!window.msCrypto,pluginProps={animateFill:!1,followCursor:!1,inlinePositioning:!1,sticky:!1},renderProps={allowHTML:!1,animation:"fade",arrow:!0,content:"",inertia:!1,maxWidth:350,role:"tooltip",theme:"",zIndex:9999},defaultProps=Object.assign({appendTo:TIPPY_DEFAULT_APPEND_TO,aria:{content:"auto",expanded:"auto"},delay:0,duration:[300,250],getReferenceClientRect:null,hideOnClick:!0,ignoreAttributes:!1,interactive:!1,interactiveBorder:2,interactiveDebounce:0,moveTransition:"",offset:[0,10],onAfterUpdate:function(){},onBeforeUpdate:function(){},onCreate:function(){},onDestroy:function(){},onHidden:function(){},onHide:function(){},onMount:function(){},onShow:function(){},onShown:function(){},onTrigger:function(){},onUntrigger:function(){},onClickOutside:function(){},placement:"top",plugins:[],popperOptions:{},render:null,showOnCreate:!1,touch:!0,trigger:"mouseenter focus",triggerTarget:null},pluginProps,renderProps),defaultKeys=Object.keys(defaultProps),setDefaultProps=function(e){Object.keys(e).forEach((function(t){defaultProps[t]=e[t]}))};function getExtendedPassedProps(e){var t=(e.plugins||[]).reduce((function(t,n){var i,o=n.name,a=n.defaultValue;o&&(t[o]=void 0!==e[o]?e[o]:null!=(i=defaultProps[o])?i:a);return t}),{});return Object.assign({},e,t)}function getDataAttributeProps(e,t){return(t?Object.keys(getExtendedPassedProps(Object.assign({},defaultProps,{plugins:t}))):defaultKeys).reduce((function(t,n){var i=(e.getAttribute("data-tippy-"+n)||"").trim();if(!i)return t;if("content"===n)t[n]=i;else try{t[n]=JSON.parse(i)}catch(e){t[n]=i}return t}),{})}function evaluateProps(e,t){var n=Object.assign({},t,{content:invokeWithArgsOrReturn(t.content,[e])},t.ignoreAttributes?{}:getDataAttributeProps(e,t.plugins));return n.aria=Object.assign({},defaultProps.aria,n.aria),n.aria={expanded:"auto"===n.aria.expanded?t.interactive:n.aria.expanded,content:"auto"===n.aria.content?t.interactive?null:"describedby":n.aria.content},n}var innerHTML=function(){return"innerHTML"};function dangerouslySetInnerHTML(e,t){e[innerHTML()]=t}function createArrowElement(e){var t=div();return!0===e?t.className=ARROW_CLASS:(t.className=SVG_ARROW_CLASS,isElement(e)?t.appendChild(e):dangerouslySetInnerHTML(t,e)),t}function setContent(e,t){isElement(t.content)?(dangerouslySetInnerHTML(e,""),e.appendChild(t.content)):"function"!=typeof t.content&&(t.allowHTML?dangerouslySetInnerHTML(e,t.content):e.textContent=t.content)}function getChildren(e){var t=e.firstElementChild,n=arrayFrom(t.children);return{box:t,content:n.find((function(e){return e.classList.contains(CONTENT_CLASS)})),arrow:n.find((function(e){return e.classList.contains(ARROW_CLASS)||e.classList.contains(SVG_ARROW_CLASS)})),backdrop:n.find((function(e){return e.classList.contains(BACKDROP_CLASS)}))}}function render(e){var t=div(),n=div();n.className=BOX_CLASS,n.setAttribute("data-state","hidden"),n.setAttribute("tabindex","-1");var i=div();function o(n,i){var o=getChildren(t),a=o.box,r=o.content,s=o.arrow;i.theme?a.setAttribute("data-theme",i.theme):a.removeAttribute("data-theme"),"string"==typeof i.animation?a.setAttribute("data-animation",i.animation):a.removeAttribute("data-animation"),i.inertia?a.setAttribute("data-inertia",""):a.removeAttribute("data-inertia"),a.style.maxWidth="number"==typeof i.maxWidth?i.maxWidth+"px":i.maxWidth,i.role?a.setAttribute("role",i.role):a.removeAttribute("role"),n.content===i.content&&n.allowHTML===i.allowHTML||setContent(r,e.props),i.arrow?s?n.arrow!==i.arrow&&(a.removeChild(s),a.appendChild(createArrowElement(i.arrow))):a.appendChild(createArrowElement(i.arrow)):s&&a.removeChild(s)}return i.className=CONTENT_CLASS,i.setAttribute("data-state","hidden"),setContent(i,e.props),t.appendChild(n),n.appendChild(i),o(e.props,e.props),{popper:t,onUpdate:o}}render.$$tippy=!0;var idCounter=1,mouseMoveListeners=[],mountedInstances=[];function createTippy(e,t){var n,i,o,a,r,s,l,c=evaluateProps(e,Object.assign({},defaultProps,getExtendedPassedProps(removeUndefinedProps(t)))),d=!1,p=!1,u=!1,h=!1,g=[],f=debounce(W,c.interactiveDebounce),m=idCounter++,_=unique(c.plugins),v={id:m,reference:e,popper:div(),popperInstance:null,props:c,state:{isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},plugins:_,clearDelayTimeouts:function(){clearTimeout(n),clearTimeout(i),cancelAnimationFrame(o)},setProps:function(t){if(v.state.isDestroyed)return;L("onBeforeUpdate",[v,t]),j();var n=v.props,i=evaluateProps(e,Object.assign({},n,removeUndefinedProps(t),{ignoreAttributes:!0}));v.props=i,U(),n.interactiveDebounce!==i.interactiveDebounce&&(B(),f=debounce(W,i.interactiveDebounce));n.triggerTarget&&!i.triggerTarget?normalizeToArray(n.triggerTarget).forEach((function(e){e.removeAttribute("aria-expanded")})):i.triggerTarget&&e.removeAttribute("aria-expanded");D(),O(),x&&x(n,i);v.popperInstance&&(Q(),K().forEach((function(e){requestAnimationFrame(e._tippy.popperInstance.forceUpdate)})));L("onAfterUpdate",[v,t])},setContent:function(e){v.setProps({content:e})},show:function(){var e=v.state.isVisible,t=v.state.isDestroyed,n=!v.state.isEnabled,i=currentInput.isTouch&&!v.props.touch,o=getValueAtIndexOrReturn(v.props.duration,0,defaultProps.duration);if(e||t||n||i)return;if(T().hasAttribute("disabled"))return;if(L("onShow",[v],!1),!1===v.props.onShow(v))return;v.state.isVisible=!0,S()&&(y.style.visibility="visible");O(),R(),v.state.isMounted||(y.style.transition="none");if(S()){var a=I(),r=a.box,l=a.content;setTransitionDuration([r,l],0)}s=function(){var e;if(v.state.isVisible&&!h){if(h=!0,y.offsetHeight,y.style.transition=v.props.moveTransition,S()&&v.props.animation){var t=I(),n=t.box,i=t.content;setTransitionDuration([n,i],o),setVisibilityState([n,i],"visible")}N(),D(),pushIfUnique(mountedInstances,v),null==(e=v.popperInstance)||e.forceUpdate(),L("onMount",[v]),v.props.animation&&S()&&function(e,t){V(e,t)}(o,(function(){v.state.isShown=!0,L("onShown",[v])}))}},function(){var e,t=v.props.appendTo,n=T();e=v.props.interactive&&t===TIPPY_DEFAULT_APPEND_TO||"parent"===t?n.parentNode:invokeWithArgsOrReturn(t,[n]);e.contains(y)||e.appendChild(y);v.state.isMounted=!0,Q()}()},hide:function(){var e=!v.state.isVisible,t=v.state.isDestroyed,n=!v.state.isEnabled,i=getValueAtIndexOrReturn(v.props.duration,1,defaultProps.duration);if(e||t||n)return;if(L("onHide",[v],!1),!1===v.props.onHide(v))return;v.state.isVisible=!1,v.state.isShown=!1,h=!1,d=!1,S()&&(y.style.visibility="hidden");if(B(),H(),O(!0),S()){var o=I(),a=o.box,r=o.content;v.props.animation&&(setTransitionDuration([a,r],i),setVisibilityState([a,r],"hidden"))}N(),D(),v.props.animation?S()&&function(e,t){V(e,(function(){!v.state.isVisible&&y.parentNode&&y.parentNode.contains(y)&&t()}))}(i,v.unmount):v.unmount()},hideWithInteractivity:function(e){A().addEventListener("mousemove",f),pushIfUnique(mouseMoveListeners,f),f(e)},enable:function(){v.state.isEnabled=!0},disable:function(){v.hide(),v.state.isEnabled=!1},unmount:function(){v.state.isVisible&&v.hide();if(!v.state.isMounted)return;Z(),K().forEach((function(e){e._tippy.unmount()})),y.parentNode&&y.parentNode.removeChild(y);mountedInstances=mountedInstances.filter((function(e){return e!==v})),v.state.isMounted=!1,L("onHidden",[v])},destroy:function(){if(v.state.isDestroyed)return;v.clearDelayTimeouts(),v.unmount(),j(),delete e._tippy,v.state.isDestroyed=!0,L("onDestroy",[v])}};if(!c.render)return v;var b=c.render(v),y=b.popper,x=b.onUpdate;y.setAttribute("data-tippy-root",""),y.id="tippy-"+v.id,v.popper=y,e._tippy=v,y._tippy=v;var w=_.map((function(e){return e.fn(v)})),C=e.hasAttribute("aria-expanded");return U(),D(),O(),L("onCreate",[v]),c.showOnCreate&&J(),y.addEventListener("mouseenter",(function(){v.props.interactive&&v.state.isVisible&&v.clearDelayTimeouts()})),y.addEventListener("mouseleave",(function(){v.props.interactive&&v.props.trigger.indexOf("mouseenter")>=0&&A().addEventListener("mousemove",f)})),v;function E(){var e=v.props.touch;return Array.isArray(e)?e:[e,0]}function k(){return"hold"===E()[0]}function S(){var e;return!(null==(e=v.props.render)||!e.$$tippy)}function T(){return l||e}function A(){var e=T().parentNode;return e?getOwnerDocument(e):document}function I(){return getChildren(y)}function P(e){return v.state.isMounted&&!v.state.isVisible||currentInput.isTouch||a&&"focus"===a.type?0:getValueAtIndexOrReturn(v.props.delay,e?0:1,defaultProps.delay)}function O(e){void 0===e&&(e=!1),y.style.pointerEvents=v.props.interactive&&!e?"":"none",y.style.zIndex=""+v.props.zIndex}function L(e,t,n){var i;(void 0===n&&(n=!0),w.forEach((function(n){n[e]&&n[e].apply(n,t)})),n)&&(i=v.props)[e].apply(i,t)}function N(){var t=v.props.aria;if(t.content){var n="aria-"+t.content,i=y.id;normalizeToArray(v.props.triggerTarget||e).forEach((function(e){var t=e.getAttribute(n);if(v.state.isVisible)e.setAttribute(n,t?t+" "+i:i);else{var o=t&&t.replace(i,"").trim();o?e.setAttribute(n,o):e.removeAttribute(n)}}))}}function D(){!C&&v.props.aria.expanded&&normalizeToArray(v.props.triggerTarget||e).forEach((function(e){v.props.interactive?e.setAttribute("aria-expanded",v.state.isVisible&&e===T()?"true":"false"):e.removeAttribute("aria-expanded")}))}function B(){A().removeEventListener("mousemove",f),mouseMoveListeners=mouseMoveListeners.filter((function(e){return e!==f}))}function M(t){if(!currentInput.isTouch||!u&&"mousedown"!==t.type){var n=t.composedPath&&t.composedPath()[0]||t.target;if(!v.props.interactive||!actualContains(y,n)){if(normalizeToArray(v.props.triggerTarget||e).some((function(e){return actualContains(e,n)}))){if(currentInput.isTouch)return;if(v.state.isVisible&&v.props.trigger.indexOf("click")>=0)return}else L("onClickOutside",[v,t]);!0===v.props.hideOnClick&&(v.clearDelayTimeouts(),v.hide(),p=!0,setTimeout((function(){p=!1})),v.state.isMounted||H())}}}function F(){u=!0}function $(){u=!1}function R(){var e=A();e.addEventListener("mousedown",M,!0),e.addEventListener("touchend",M,TOUCH_OPTIONS),e.addEventListener("touchstart",$,TOUCH_OPTIONS),e.addEventListener("touchmove",F,TOUCH_OPTIONS)}function H(){var e=A();e.removeEventListener("mousedown",M,!0),e.removeEventListener("touchend",M,TOUCH_OPTIONS),e.removeEventListener("touchstart",$,TOUCH_OPTIONS),e.removeEventListener("touchmove",F,TOUCH_OPTIONS)}function V(e,t){var n=I().box;function i(e){e.target===n&&(updateTransitionEndListener(n,"remove",i),t())}if(0===e)return t();updateTransitionEndListener(n,"remove",r),updateTransitionEndListener(n,"add",i),r=i}function q(t,n,i){void 0===i&&(i=!1),normalizeToArray(v.props.triggerTarget||e).forEach((function(e){e.addEventListener(t,n,i),g.push({node:e,eventType:t,handler:n,options:i})}))}function U(){k()&&(q("touchstart",z,{passive:!0}),q("touchend",Y,{passive:!0})),splitBySpaces(v.props.trigger).forEach((function(e){if("manual"!==e)switch(q(e,z),e){case"mouseenter":q("mouseleave",Y);break;case"focus":q(isIE11?"focusout":"blur",X);break;case"focusin":q("focusout",X)}}))}function j(){g.forEach((function(e){var t=e.node,n=e.eventType,i=e.handler,o=e.options;t.removeEventListener(n,i,o)})),g=[]}function z(e){var t,n=!1;if(v.state.isEnabled&&!G(e)&&!p){var i="focus"===(null==(t=a)?void 0:t.type);a=e,l=e.currentTarget,D(),!v.state.isVisible&&isMouseEvent(e)&&mouseMoveListeners.forEach((function(t){return t(e)})),"click"===e.type&&(v.props.trigger.indexOf("mouseenter")<0||d)&&!1!==v.props.hideOnClick&&v.state.isVisible?n=!0:J(e),"click"===e.type&&(d=!n),n&&!i&&ee(e)}}function W(e){var t=e.target,n=T().contains(t)||y.contains(t);"mousemove"===e.type&&n||isCursorOutsideInteractiveBorder(K().concat(y).map((function(e){var t,n=null==(t=e._tippy.popperInstance)?void 0:t.state;return n?{popperRect:e.getBoundingClientRect(),popperState:n,props:c}:null})).filter(Boolean),e)&&(B(),ee(e))}function Y(e){G(e)||v.props.trigger.indexOf("click")>=0&&d||(v.props.interactive?v.hideWithInteractivity(e):ee(e))}function X(e){v.props.trigger.indexOf("focusin")<0&&e.target!==T()||v.props.interactive&&e.relatedTarget&&y.contains(e.relatedTarget)||ee(e)}function G(e){return!!currentInput.isTouch&&k()!==e.type.indexOf("touch")>=0}function Q(){Z();var t=v.props,n=t.popperOptions,i=t.placement,o=t.offset,a=t.getReferenceClientRect,r=t.moveTransition,l=S()?getChildren(y).arrow:null,c=a?{getBoundingClientRect:a,contextElement:a.contextElement||T()}:e,d=[{name:"offset",options:{offset:o}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5}},{name:"computeStyles",options:{adaptive:!r}},{name:"$$tippy",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(e){var t=e.state;if(S()){var n=I().box;["placement","reference-hidden","escaped"].forEach((function(e){"placement"===e?n.setAttribute("data-placement",t.placement):t.attributes.popper["data-popper-"+e]?n.setAttribute("data-"+e,""):n.removeAttribute("data-"+e)})),t.attributes.popper={}}}}];S()&&l&&d.push({name:"arrow",options:{element:l,padding:3}}),d.push.apply(d,(null==n?void 0:n.modifiers)||[]),v.popperInstance=createPopper(c,y,Object.assign({},n,{placement:i,onFirstUpdate:s,modifiers:d}))}function Z(){v.popperInstance&&(v.popperInstance.destroy(),v.popperInstance=null)}function K(){return arrayFrom(y.querySelectorAll("[data-tippy-root]"))}function J(e){v.clearDelayTimeouts(),e&&L("onTrigger",[v,e]),R();var t=P(!0),i=E(),o=i[0],a=i[1];currentInput.isTouch&&"hold"===o&&a&&(t=a),t?n=setTimeout((function(){v.show()}),t):v.show()}function ee(e){if(v.clearDelayTimeouts(),L("onUntrigger",[v,e]),v.state.isVisible){if(!(v.props.trigger.indexOf("mouseenter")>=0&&v.props.trigger.indexOf("click")>=0&&["mouseleave","mousemove"].indexOf(e.type)>=0&&d)){var t=P(!1);t?i=setTimeout((function(){v.state.isVisible&&v.hide()}),t):o=requestAnimationFrame((function(){v.hide()}))}}else H()}}function tippy(e,t){void 0===t&&(t={});var n=defaultProps.plugins.concat(t.plugins||[]);bindGlobalEventListeners();var i=Object.assign({},t,{plugins:n}),o=getArrayOfElements(e).reduce((function(e,t){var n=t&&createTippy(t,i);return n&&e.push(n),e}),[]);return isElement(e)?o[0]:o}tippy.defaultProps=defaultProps,tippy.setDefaultProps=setDefaultProps,tippy.currentInput=currentInput,Object.assign({},applyStyles$1,{effect:function(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow)}}),tippy.setDefaultProps({render:render});var Logger$3=window.ApxorLogger,InLineTooltip=function(){function e(t,n,i,o,a,r,s,l,c){var d=this,p=arguments.length>9&&void 0!==arguments[9]&&arguments[9],u=arguments.length>10&&void 0!==arguments[10]?arguments[10]:0;_classCallCheck$1(this,e),_defineProperty$1(this,"_getMarketingStyles",(function(){if(!d.enable_marketing)return"";var e=d.marketing.message,t=e.alignment;return"left"===e.alignment?t="flex-start":"right"===e.alignment&&(t="flex-end"),"\n .apx-inline-marketing".concat(d.cssPostFix," {\n align-self:").concat(t,";\n text-align:").concat(e.alignment,";\n }\n ")})),_defineProperty$1(this,"_setMarketingMessage",(function(){if(d.enable_marketing){var e=document.createElement("div");e.classList.add("apx-inline-marketing".concat(d.cssPostFix));var t=createNewTextElement(d.marketing.message,d.currentId,"marketing");e.appendChild(t),d.inLineContainer.appendChild(e)}})),this.uiConfig=t,this.uis=n,this.isWalkthrough=p,this.index=u,this.walkthroughConfigs=i,this.messageConfig=a,this.rtmInstance=r,this.currentId=makeid(10),this.configId=a.configId,this.name=a.configName,this.cssPostFix="-".concat(this.configId,"-").concat(this.name).replaceAll(" ","").replace(/[^\w\s]/gi,""),this.showCallback=s,this.closeCallback=l,this.stepperCallBack=c,this.targetDeletionObserver=null,this.viewPortObservor=null,this.tooltipShown=!1,this.terminationConfig=o,this.terminationTimeoutId=null,this.delay=t.delay,this.scrollToView=t.scrollToView||!0,this.background_color=t.bg_color||COLORS.WHITE,this.width=t.width||50,this.height=t.height||50,this.append_to=t.append_to||"parent",this.follow_cursor=t.followCursor||!1,this.interactive_border=t.interactive_border||10,this.target=new Target(t.target),this.elementHighlighter=new ElementHighlighter(t.highlighter),this.direction=new Direction(t.direction),this.position=new Position(t.position),this.enable_dismiss_actions=t.enable_dismiss_actions,this.enable_dismiss_actions&&(this.dismiss_actions=new DismissActions(t.dismiss_actions)),this.enable_dimbackground=t.enable_dimbackground,this.enable_dimbackground&&(this.dimbackground=new DimBackground(t.dimbackground)),this.enable_padding=t.enable_padding,this.enable_padding&&(this.padding=new Padding(t.padding)),this.enable_margin=t.enable_margin,this.enable_margin&&(this.margin=new Margin(t.margin)),this.enable_border=t.enable_border,this.enable_border&&(this.border=new Border(t.border)),this.enable_close_button=t.enable_close_button,this.enable_close_button&&(this.close_button=new CloseButton(t.close_button)),this.enable_scroll=t.enable_scroll,this.enable_scroll&&(this.scroll=new Scroll(t.scroll)),this.enable_icon=t.enable_icon,this.enable_icon&&(this.icon=new Icon(t.icon)),this.enable_image=t.enable_image,this.enable_image&&(this.image=new Image(t.image)),this.enable_video=t.enable_video,this.enable_video&&(this.video=new Video(t.video)),this.enable_title=t.enable_title,this.enable_title&&(this.title=new Title(t.title)),this.enable_description=t.enable_description,this.enable_description&&(this.description=new Description(t.description)),this.enable_stepper=t.enable_stepper,this.enable_stepper&&(this.stepper=new Stepper(t.stepper)),this.enable_buttons=t.enable_buttons,this.enable_buttons&&(this.buttons=new Buttons(t.buttons)),this.enable_shadow=t.enable_shadow,this.enable_shadow&&(this.shadow=new Shadow(t.shadow)),this.enable_animation=t.enable_animation,this.enable_animation&&(this.animation=new Animation(t.animation)),this.enable_gradient=t.enable_gradient,this.enable_gradient&&(this.gradient=new Gradient(t.gradient)),this.enable_arrow=t.enable_arrow,this.enable_arrow&&(this.arrow=new Arrow(t.arrow,this.background_color)),this.enable_marketing=t.enable_marketing,this.enable_marketing&&(this.marketing=new Marketing(t.marketing)),this.min_width="",this.inline_width="auto",this.inline_height="auto",this.media_width="auto",this.media_height="auto",this.media_container_height=0,this.targetElement=null,this.targetOverlayElement=null,this.inLineContainer=null,this.textContainer=null,this.tooltip=null,this.dimBackgroundElement=null,this.maskingElement=null,this.max_width=350,this.updateSkid=null,this.initial_data_placement=this.position.position,this.flag=!0,this.flutterClickCallbackWrapper=null,this.ceInstance=ceWrapper.getInstance()}return _createClass$1(e,[{key:"createNewTooltip",value:function(){var e=this;try{if(this._canCreateTooltip()){var t=function(){e._canCreateTooltip()&&(e.rtmInstance.currentAction=e._destroyTooltip,e._setInLineDimensions(),e._setInlineStyles(),e._setInLineContent(),e._setObservors(),e._createTippyInstance())};this._setTheTarget((function(){e._scrollIntoTargetIfNeeded(t)}))}}catch(e){console.log(e),this._resetRTMAction()}}},{key:"_canCreateTooltip",value:function(){return null!==this.rtmInstance.currentAction&&void 0!==this.rtmInstance.currentAction||this.rtmInstance.isShowingAction?(null==Apxor||Apxor.logEvent("apx_nudge_not_shown",{apx_nudge_type:"campaign",apx_nudge_id:this.configId,apx_nudge_name:this.name,apx_variant_code:this.ceInstance.getVariantCode(this.configId),apx_failure_type:"error",apx_reason:"An action is already being shown"},!1,"apxor","campaign"),Logger$3.info("An nudge is being shown. Can not show a tooltip now"),!1):checkForNeverShow$1(this.configId)}},{key:"_setTheTarget",value:function(e){var t=this;this._findTargetElement((function n(){t._isElementVisible()?(t._targetClickCallback=t._targetClickCallback.bind(t),t.targetElement.addEventListener("click",t._targetClickCallback),e()):t._retryFindingTargetElement(n,!0)}))}},{key:"_isElementVisible",value:function(){try{var e=this.targetElement.getBoundingClientRect();if(0===e.width||0===e.height)return!1}catch(e){return!1}return!0}},{key:"_findTargetElement",value:function(e){var t=this;if(Apxor.isFlutter()){var n=this.messageConfig;n.configId,n.configName,this.uiConfig.dismiss_target_touch,this.targetElement=createTargetView(getElementPositionFromFlutter(this.target.id)),this.targetElement&&(this.flutterClickCallbackWrapper=addClickListenerForFlutterElement(this.targetElement,(function(){t._targetClickCallback()})))}else this.targetElement=getElementFromSelector(this.target.id,this.target.frame_id,this.target.is_text_based,this.target.avf_text_config);this.targetElement?e():this.target.enable_retry?(Logger$3.info("Not found yet. Rechecking the DOM."),this._retryFindingTargetElement(e)):(null==Apxor||Apxor.logEvent("apx_nudge_not_shown",{apx_nudge_type:"campaign",apx_nudge_id:this.configId,apx_nudge_name:this.name,apx_variant_code:this.ceInstance.getVariantCode(this.configId),apx_failure_type:"error",apx_reason:"View not found"},!1,"apxor","campaign"),Logger$3.info("Element with selector:".concat(this.target.id," not found.")),this._resetRTMAction())}},{key:"_retryFindingTargetElement",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=window.ApxorRTM,o=setInterval((function(){if(null===i.currentAction||void 0===i.currentAction){if(Apxor.isFlutter()){var a=t.messageConfig;a.configId,a.configName,t.uiConfig.dismiss_target_touch,t.targetElement=createTargetView(getElementPositionFromFlutter(t.target.id)),t.targetElement&&(t.flutterClickCallbackWrapper=addClickListenerForFlutterElement(t.targetElement,(function(){t._targetClickCallback()})))}else t.targetElement=getElementFromSelector(t.target.id,t.target.frame_id,t.target.is_text_based,t.target.avf_text_config);if(n)t._isElementVisible()?(clearInterval(o),e(t.targetElement)):(t.target.retry.max_retries=t.target.retry.max_retries-1,t.target.retry.max_retries<=0&&(clearInterval(o),Logger$3.info("Invalid target element. Width and height are 0 for element: ".concat(t.target.id,". Can't show tooltip")),t._resetRTMAction()));else t.targetElement?(clearInterval(o),e(t.targetElement)):(t.target.retry.max_retries=t.target.retry.max_retries-1,t.target.retry.max_retries<=0&&(clearInterval(o),null==Apxor||Apxor.logEvent("apx_nudge_not_shown",{apx_nudge_type:"campaign",apx_nudge_id:t.configId,apx_nudge_name:t.name,apx_variant_code:t.ceInstance.getVariantCode(t.configId),apx_failure_type:"error",apx_reason:"View not found"},!1,"apxor","campaign"),console.warn("Element with selector:".concat(t.target.id," not found.")),t._resetRTMAction()))}else clearInterval(o)}),this.target.retry.interval)}},{key:"_resetRTMAction",value:function(){this.rtmInstance.currentAction=null,this.rtmInstance.isShowingAction=!1,Logger$3.info("RTM tooltip action stopped.")}},{key:"_scrollIntoTargetIfNeeded",value:function(e){var t=this,n=!1,i=!1;if(isElementInViewport(this.targetElement))this.scrollToView&&isElementCompletlyInView(this.targetElement),n=!0;else if(this.scrollToView){var o={behavior:SCROLL_BEHAVIOUR.SMOOTH,block:CENTER,inline:CENTER};this._canCreateTooltip()&&this.targetElement.scrollIntoView(o),window.setTimeout((function(){isElementCovered(t.targetElement)?window.setTimeout((function(){isElementCovered(t.targetElement)?Apxor.isFlutter()?e():(console.info("The tooltip is not visible because another element is overlapping the target element."),t._resetRTMAction()):e()}),1e3):e()}),1e3),i=!0,n=!0}else Logger$3.info("If needed change the config to scroll to the target element."),this._resetRTMAction();n&&!i&&(isElementCovered(this.targetElement)?Apxor.isFlutter()?e():(console.info("The tooltip is not visible because another element is overlapping the target element."),this._resetRTMAction()):e())}},{key:"_setInLineDimensions",value:function(){var e=this.direction.nudge===DIRECTION.VERTICAL?this.width/100:this.height/100,t=this.direction.nudge!==DIRECTION.VERTICAL;this.enable_image?this._setDimenstionFromResolution(this.image.width,this.image.height,e,t):this.enable_video?this.video.enable_embed?this.direction.nudge===DIRECTION.VERTICAL?(this.inline_width="".concat(this.video.width+(this.enable_border?2*this.border.width:0),"px"),this.media_width="".concat(this.video.width,"px"),this.media_height="".concat(this.video.height,"px")):(this.inline_height="".concat(this.video.height,"px"),this.media_height="".concat(this.video.height,"px"),this.media_container_height=this.video.height,this.min_width="".concat(this.getPixelsFromPercentage(this.width,!1),"px")):this._setDimenstionFromResolution(this.video.width,this.video.height,e,t):this.enable_icon?this.direction.nudge===DIRECTION.VERTICAL?this.inline_width="".concat(this.getPixelsFromPercentage(this.width,!1),"px"):this.min_width="".concat(this.getPixelsFromPercentage(this.width,!1),"px"):this.direction.nudge===DIRECTION.VERTICAL&&(this.inline_width="".concat(this.getPixelsFromPercentage(this.width,!1),"px"))}},{key:"_setDimenstionFromResolution",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:.5,i=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=getHeightWidthFromResolution({width:e,height:t},n,i);this.media_width="".concat(o.width,"px"),this.media_height="".concat(o.height,"px"),this.media_container_height=o.height,this.direction.nudge===DIRECTION.VERTICAL?this.inline_width="".concat(o.width+(this.enable_border?2*this.border.width:0)+(this.enable_padding?this.padding.left+this.padding.right:0),"px"):(this.inline_height="".concat(o.height+(this.enable_border?2*this.border.width:0)+(this.enable_padding?this.padding.top+this.padding.bottom:0),"px"),this.min_width="".concat(this.getPixelsFromPercentage(this.width,!1),"px"))}},{key:"_highlightInlineTarget",value:function(){var e=this;this.enable_dimbackground?(this.dimBackgroundElement=createMask(this.targetElement,this.elementHighlighter),Apxor.isFlutter()&&(this.maskingElement=createSVGDivMask(this.targetElement),document.body.appendChild(this.maskingElement)),document.body.appendChild(this.dimBackgroundElement),this.targetOverlayElement=document.createElement("div"),this.targetOverlayElement.id="targetOverlayElement",this.setPositionofOverlayTargetElement=function(){var t=e.targetElement.getBoundingClientRect(),n=t.x,i=t.y,o=t.width,a=t.height,r=t.left,s=t.top;setAttributes(e.targetOverlayElement,{style:"position: fixed; z-index: 999999; top: ".concat(i||s-e.elementHighlighter.offset.top,"px; left: ").concat(n||r-e.elementHighlighter.offset.left,"px; height: ").concat(a+e.elementHighlighter.offset.top+e.elementHighlighter.offset.bottom,"px; width: ").concat(o+e.elementHighlighter.offset.left+e.elementHighlighter.offset.right,"px;\n ").concat(Apxor.isFlutter()?"pointer-events:none;":"")})},window.addEventListener("scroll",this.setPositionofOverlayTargetElement),this.targetElement.getBoundingClientRect&&(this.setPositionofOverlayTargetElement(),document.body.appendChild(this.targetOverlayElement)),this.dimBackgroundElement.querySelector("#tippyModalMaskOpening").addEventListener("click",this._targetClickCallback),this.enable_dismiss_actions&&this.dismiss_actions.outside_touch&&(this.dimBackgroundElement.addEventListener("click",(function(){e._destroyTooltip()})),Apxor.isFlutter()&&this.maskingElement.addEventListener("click",(function(){e._destroyTooltip()}))),this.targetOverlayElement.addEventListener("click",(function(){e.targetElement.click()}))):this.tooltip.setProps({onClickOutside:function(){e.enable_dismiss_actions&&e.dismiss_actions.outside_touch&&e._destroyTooltip()}})}},{key:"_setInlineStyles",value:function(){if(!document.querySelector("style[apx-tooltip-styles]")){var e=" \n ".concat(this._getBackgroundContainerStyles()," \n ").concat(this._getInLineContainerStyles()," \n ").concat(this._getScrollStyles()," \n ").concat(this._getControlsStyles()," \n ").concat(this._getInLineMediaContainerStyles(),"\n ").concat(this._getInLineNonMediaContainerStyles(),"\n ").concat(this._getTextConatinerStyles(),"\n ").concat(this._getTitleStyles()," \n ").concat(this._getDescriptionStyles()," \n ").concat(this._getInLineButtonContainerStyles()," \n ").concat(this._getIconStyles()," \n ").concat(this._getImageStyles()," \n ").concat(this._getVideoStyles()," \n ").concat(this._getMarketingStyles(),"\n ").concat(this._getTippyStyles(),"\n ").concat(this._getFooterStyles(),"\n ").concat(this._getProgressBarStyles(),"\n ").concat(this._getBootstrapiconsStyles()," \n ").replaceAll("\n","").replace(/[\s]{2,999}/g,""),t=document.createElement("style");t.setAttribute("apx-tooltip-styles",""),t.innerHTML=e,document.head.appendChild(t)}}},{key:"_getFooterStyles",value:function(){return"\n .apx-inline-footer-wrap".concat(this.cssPostFix,"{\n flex-wrap:wrap;\n gap:4px;\n }\n ")}},{key:"_getBackgroundContainerStyles",value:function(){var e,t,n="";this.enable_dimbackground&&(n='\n #tippyModalOverlayContainer {\n -ms-filter: "progid:dximagetransform.microsoft.gradient.alpha(Opacity=50)";\n filter: alpha(opacity=50);height: 100vh;left: 0;opacity: '.concat(null!==(e=this.dimbackground.opacity)&&void 0!==e?e:.5,";position: fixed;\n top: 0;transition: all .3s ease-out;width: 100vw;z-index: 9999;fill: ").concat(null!==(t=this.dimbackground.color)&&void 0!==t?t:"transparent","\n }\n #tippyModalOverlayContainer #tippyModalMask, #tippyModalOverlayContainer #tippyModalMaskRect {\n height: 100vh;width: 100vw\n }\n \n "));return n}},{key:"_getInLineContainerStyles",value:function(){var e="";this.min_width&&(e="min-width:".concat(this.min_width,";"));var t="";this.enable_border&&(t="\n border-radius: ".concat(this.border.radius,"px;\n border: ").concat(this.border.width,"px ").concat(this.border.style," ").concat(this.border.color,";\n "));var n="";this.enable_gradient&&(n="\n background-image:linear-gradient(".concat(this.gradient.direction,", ").concat(this.gradient.colors[0],", ").concat(this.gradient.colors[1],");\n "));var i="";this.enable_shadow&&(i="\n box-shadow: ".concat(this.shadow.offset_x,"px ").concat(this.shadow.offset_y,"px ").concat(this.shadow.blur_radius,"px ").concat(this.shadow.spread_radius,"px ").concat(this.shadow.color,";\n "));var o="";this.enable_padding&&(o="\n padding:".concat(this.padding.top,"px ").concat(this.padding.right,"px ").concat(this.padding.bottom,"px ").concat(this.padding.left,"px;\n "));var a=this.direction.nudge!==DIRECTION.VERTICAL?"flex-direction:row;":"flex-direction:column;";a=" ".concat(a,"\n justify-content:space-evenly;\n align-items:center;\n display:flex;\n ");var r="",s="";return this.enable_video&&this.video.enable_embed&&(r="max-width:100%;",s="max-height:100vh;"),"\n .apx-inline-container".concat(this.cssPostFix," {\n height:").concat(this.inline_height,";\n width:").concat(this.inline_width,";\n margin: auto;\n background-color:").concat(this.background_color,";\n z-index:9997;\n opacity:0;\n transition:all .5s cubic-bezier(.96,.23,.07,.8);\n position:fixed;\n visibility:hidden;\n\n ").concat(e,"\n ").concat(a,"\n ").concat(o,"\n ").concat(t,"\n ").concat(n,"\n ").concat(i,"\n ").concat(r,"\n ").concat(s,"\n }\n\n .apx-inline-container").concat(this.cssPostFix,".open{\n opacity:1;\n visibility:visible;\n }\n ")}},{key:"_getScrollStyles",value:function(){var e=this.enable_scroll&&this.scroll.enable_border?"\n border-top: ".concat(this.scroll.border.width,"px ").concat(this.scroll.border.style," ").concat(this.scroll.border.color,";\n border-bottom : ").concat(this.scroll.border.width,"px ").concat(this.scroll.border.style," ").concat(this.scroll.border.color,";\n"):"";return this.enable_scroll?"\n .apx-inline-scroll".concat(this.cssPostFix," {\n overflow:scroll; \n overflow-x: hidden;\n height:").concat(this.scroll.height,"px;\n ").concat(e,"\n }\n "):"\n .apx-inline-scroll".concat(this.cssPostFix," {\n overflow : hidden;\n }\n ")}},{key:"_getControlsStyles",value:function(){if(!this.enable_close_button)return"";return this.direction.non_media===DIRECTION.VERTICAL||this.direction.nudge===DIRECTION.VERTICAL?"\n .apx-inline-close".concat(this.cssPostFix," {\n position: absolute;\n z-index:9999;\n top: ").concat(this.close_button.offset_top,"px;\n right: ").concat(this.close_button.offset_right,"px;\n width: ").concat(this.close_button.width,"px;\n height: ").concat(this.close_button.height,"px;\n cursor: pointer;\n }\n "):"\n .apx-inline-close".concat(this.cssPostFix," {\n display:flex;\n flex-direction:row;\n justify-content:center;\n align-items:center;\n width: ").concat(this.close_button.width,"px;\n height: ").concat(this.close_button.height,"px;\n cursor: pointer;\n z-index:9999;\n }\n ")}},{key:"_getInLineMediaContainerStyles",value:function(){return"\n .apx-inline-media-container".concat(this.cssPostFix,"{\n ").concat(this.enable_icon?"align-self:".concat(this.icon.alignment,";"):"","\n ").concat(this.enable_image||this.enable_video?"display:flex;":"","\n }")}},{key:"_getInLineNonMediaContainerStyles",value:function(){var e="";this.direction.nudge===DIRECTION.VERTICAL?e="max-height:".concat(window.innerHeight-this.media_container_height,"px;"):this.enable_icon||(e="max-height:".concat(this.media_container_height,"px;"));return this.direction.non_media===DIRECTION.VERTICAL?"\n .apx-inline-nonmedia-container".concat(this.cssPostFix,"{\n width:100%;\n max-width:").concat(this.inline_width,";\n display:flex;\n flex-direction:column;\n justify-content:center;\n align-items:stretch;\n ").concat(e,"\n }\n "):"\n .apx-inline-nonmedia-container".concat(this.cssPostFix,"{\n width:100%;\n flex-grow:2;\n display:flex;\n flex-direction:row;\n justify-content:space-between;\n align-items:center;\n ").concat(e,"\n }\n ")}},{key:"_getTextConatinerStyles",value:function(){return"\n .apx-inline-text-container".concat(this.cssPostFix,"{\n width:100%;\n display:flex;\n flex-direction:column;\n justify-content: center;\n overflow: hidden;\n align-items:center;\n cursor:text;\n }\n ")}},{key:"_getTitleStyles",value:function(){if(!this.enable_title)return"";var e="";if(this.title.enable_icon){var t="";this.title.icon.enable_border&&(t="border-radius:".concat(this.title.icon.border.radius,"%;\n border:").concat(this.title.icon.border.width,"px ").concat(this.title.icon.border.style," ").concat(this.title.icon.border.color,";")),e="\n height: ".concat(this.title.icon.height,"px;\n width: ").concat(this.title.icon.width,"px;\n margin: auto 15px auto 0px;\n ").concat(t,"\n ")}var n="";this.title.enable_margin&&(n=" \n margin-top:".concat(this.title.margin.top,"px;\n margin-bottom:").concat(this.title.margin.bottom,"px;\n margin-left:").concat(this.title.margin.left,"px;\n margin-right:").concat(this.title.margin.right,"px;\n "));var i="";return this.title.enable_padding&&(i=" \n padding-top:".concat(this.title.padding.top,"px;\n padding-bottom:").concat(this.title.padding.bottom,"px;\n padding-left:").concat(this.title.padding.left,"px;\n padding-right:").concat(this.title.padding.right,"px;\n ")),"\n .apx-inline-title-div".concat(this.cssPostFix," {\n width:100%;\n display:flex;\n justify-content:").concat(this.title.alignment,";\n text-align:").concat(this.title.alignment,";\n pointer-events:none;\n ").concat(n,"\n ").concat(i,"\n }\n .apx-inline-title-icon").concat(this.cssPostFix," {\n ").concat(e,"\n }\n ")}},{key:"_getDescriptionStyles",value:function(){if(!this.enable_description)return"";var e="";this.description.enable_margin&&(e=" \n margin-top:".concat(this.description.margin.top,"px;\n margin-bottom:").concat(this.description.margin.bottom,"px;\n margin-left:").concat(this.description.margin.left,"px;\n margin-right:").concat(this.description.margin.right,"px;\n "));var t="";return this.description.enable_padding&&(t=" \n padding-top:".concat(this.description.padding.top,"px;\n padding-bottom:").concat(this.description.padding.bottom,"px;\n padding-left:").concat(this.description.padding.left,"px;\n padding-right:").concat(this.description.padding.right,"px;\n ")),"\n .apx-inline-description".concat(this.cssPostFix," {\n width:100%;\n justify-content:").concat(this.description.alignment,";\n text-align:").concat(this.description.alignment,";\n ").concat(e,"\n ").concat(t,"\n }\n ")}},{key:"_getInLineButtonContainerStyles",value:function(){return"\n .apx-inline-button-container".concat(this.cssPostFix,"{\n display:flex;\n flex-direction:row;\n align-items:center;\n justify-content:center;\n margin:0 10px 0 10px;\n }\n .apx-inline-top-button-container").concat(this.cssPostFix,"{\n width:100%;\n height:auto;\n }\n .apx-inline-center-button-container").concat(this.cssPostFix,"{\n width:100%;\n height:auto;\n }\n .apx-inline-bottom-button-container").concat(this.cssPostFix,"{\n width:100%;\n height:auto;\n }")}},{key:"_getIconStyles",value:function(){var e="";if(this.enable_icon){var t="";this.icon.enable_border&&(t="\n border-radius:".concat(this.icon.border.radius,"%;\n border:").concat(this.icon.border.width,"px ").concat(this.icon.border.style," ").concat(this.icon.border.color,";\n "));var n="";this.icon.enable_margin&&(n="\n margin-top:".concat(this.icon.margin.top,"px;\n margin-bottom:").concat(this.icon.margin.bottom,"px;\n margin-left:").concat(this.icon.margin.left,"px;\n margin-right:").concat(this.icon.margin.right,"px;\n "));var i="";this.icon.enable_padding&&(i="\n padding-top:".concat(this.icon.padding.top,"px;\n padding-bottom:").concat(this.icon.padding.bottom,"px;\n padding-left:").concat(this.icon.padding.left,"px;\n padding-right:").concat(this.icon.padding.right,"px;\n ")),e="\n .apx-inline-icon-container".concat(this.cssPostFix," {\n text-align:").concat(this.icon.alignment,";\n }\n .apx-inline-icon-content").concat(this.cssPostFix," {\n height: ").concat(this.icon.height,"px;\n width: ").concat(this.icon.width,"px;\n ").concat(t,"\n ").concat(n,"\n ").concat(i,"\n }\n ")}return e}},{key:"_getImageStyles",value:function(){var e="";if(this.enable_image)if(this.image.enable_background_image)e="\n .apx-inline-image".concat(this.cssPostFix,"{\n background-image: url('").concat(this.image.path,"');\n background-repeat: no-repeat;\n background-attachment: fixed; \n background-size: 100% 100%;\n height: ").concat(this.media_height,";\n width: ").concat(this.media_width,";\n box-shadow: inset ").concat(this.media_width," ").concat(this.media_height," 0px 0px ").concat(hexToRGB(this.image.background_image.mask_color,this.image.background_image.mask_opacity),",inset -").concat(this.media_width," -").concat(this.media_height," 0px 0px ").concat(hexToRGB(this.image.background_image.mask_color,this.image.background_image.mask_opacity),"\n }\n ");else{var t="";this.image.enable_border&&(t="\n border-radius:".concat(this.image.border.radius,"%;\n border:").concat(this.image.border.width,"px ").concat(this.image.border.style," ").concat(this.image.border.color,";\n ")),e="\n .apx-inline-image".concat(this.cssPostFix,"{\n height: ").concat(this.media_height,";\n width: ").concat(this.media_width,";\n ").concat(t,"\n }\n ")}return e}},{key:"_getVideoStyles",value:function(){var e="";if(this.enable_video){var t="";this.video.enable_border&&(t="\n border-radius:".concat(this.video.border.radius,"%;\n border:").concat(this.video.border.width,"px ").concat(this.video.border.style," ").concat(this.video.border.color,";\n ")),e="\n .apx-inline-video".concat(this.cssPostFix," {\n width:").concat(this.media_width,";\n height:").concat(this.media_height,";\n ").concat(t,"\n }\n ")}return e}},{key:"_getProgressBarStyles",value:function(){var e="";return this.has_progress_bar&&(e="\n .apx-inline-progress-bar".concat(this.cssPostFix,"{\n position: absolute;\n width:100%;\n height:").concat(this.progressbar.width,";\n ").concat("top"===this.progressbar.position?"top:0px;":"bottom:0px;","\n left:0px;\n z-index:9998;\n overflow:hidden;\n cursor: pointer;\n background:").concat(this.progressbar.reamining_color,";\n }\n .apx-inline-bar").concat(this.cssPostFix,"{\n width:100%;\n height:100%;\n background:").concat(this.progressbar.progress_color,";\n }")),e}},{key:"_getTippyStyles",value:function(){var e="",t="",n="",i="",o="",a="",r="",s="";if(this.enable_arrow)switch(this.arrow.type){case"round":e="\n bottom:".concat(this.enable_border?"".concat(-12+this.border.width,"px"):"-12px",";\n "),o="\n width:18px;\n height:18px;\n border-radius:5px;\n transform: rotate(45deg);\n background-color:".concat(this.arrow.color,";\n "),t="\n left:".concat(this.enable_border?"".concat(-5+this.border.width,"px"):"-5px",";\n "),a="\n bottom:-10px;\n width:18px;\n height:18px;\n border-radius:5px;\n transform: rotate(45deg);\n background-color:".concat(this.arrow.color,";\n "),n="\n top:".concat(this.enable_border?"".concat(-8+this.border.width,"px"):"-8px",";\n "),r="\n width:18px;\n height:18px;\n border-radius:5px;\n transform: rotate(45deg);\n background-color:".concat(this.arrow.color,";\n "),i="\n right:".concat(this.enable_border?"".concat(-15+this.border.width,"px"):"-15px",";\n "),s="\n top:-50%;\n width:18px;\n height:18px;\n border-radius:5px;\n transform: rotate(45deg);\n background-color:".concat(this.arrow.color,";\n ");break;case"narrow":e="\n bottom:".concat(this.enable_border?"".concat(-22+this.border.width,"px"):"-22px",";\n "),o="\n border-width:18px 5px 0;\n ",t="\n left:".concat(this.enable_border?"".concat(-7+this.border.width,"px"):"-7px",";\n "),a="\n border-width:5px 18px 5px 0;\n ",n="\n top:".concat(this.enable_border?"".concat(-11+this.border.width,"px"):"-11px",";\n "),r="\n border-width:0 5px 18px;\n ",i="\n right:".concat(this.enable_border?"".concat(-26+this.border.width,"px"):"-26px",";\n "),s="\n border-width:5px 0 5px 18px;\n ";break;case"wide":e="\n bottom:".concat(this.enable_border?"".concat(-22+this.border.width,"px"):"-22px",";\n "),o="\n left:-50%;\n border-width:9px 18px 0;\n ",t="\n left:".concat(this.enable_border?"".concat(2+this.border.width,"px"):"2px",";\n "),a="\n top:-50%;\n border-width:18px 9px 18px 0;\n ",n="\n top:".concat(this.enable_border?"".concat(2+this.border.width,"px"):"2px",";\n "),r="\n left:-50%;\n top:-8px;\n border-width:0 18px 9px;\n bottom:13px;\n ",i="\n right:".concat(this.enable_border?"".concat(-26+this.border.width,"px"):"-26px",";\n "),s="\n top:-50%;\n border-width:18px 0 18px 8px;\n ";break;case"large":e="\n bottom:".concat(this.enable_border?"".concat(-19+this.border.width,"px"):"-19px",";\n "),o="\n left:-50%;\n border-width:16px 16px 0;\n ",t="\n left:".concat(this.enable_border?"".concat(-5+this.border.width,"px"):"-5px",";\n "),a="\n top:-50%;\n border-width:16px 16px 16px 0;\n ",n="\n top:".concat(this.enable_border?"".concat(-9+this.border.width,"px"):"-9px",";\n "),r="\n left:-50%;\n border-width:0 16px 16px;\n ",i="\n right:".concat(this.enable_border?"".concat(-23+this.border.width,"px"):"-23px",";\n "),s="\n top:-50%;\n border-width:16px 0 16px 16px;\n ";break;case"small":e="\n bottom:-12px;\n ",o="\n left:-50%;\n border-width:16px 16px 0;\n ",t="\n left: 3px;\n ",a="\n top:-50%;\n border-width:16px 16px 16px 0;\n ",n="\n top: -1px;\n ",r="\n left:-50%;\n border-width:0 16px 16px;\n ",i="\n right: -16px;\n ",s="\n top:-50%;\n border-width:16px 0 16px 16px;\n ";break;default:e="\n bottom:".concat(this.enable_border&&this.border.width>5?"".concat(-15+this.border.width-5,"px"):"-15px",";\n "),o="\n left:-50%;\n border-width:16px 16px 0;\n ",t="\n left:".concat(this.enable_border&&this.border.width>5?"".concat(-1+this.border.width-5,"px"):"-1px",";\n "),a="\n top:-50%;\n border-width:16px 16px 16px 0;\n ",n="\n top:".concat(this.enable_border&&this.border.width>5?"".concat(-5+this.border.width-5,"px"):"-5px",";\n "),r="\n left:-50%;\n border-width:0 16px 16px;\n ",i="\n right:".concat(this.enable_border&&this.border.width>4?"".concat(-20+this.border.width-4,"px"):"-20px",";\n "),s="\n top:-50%;\n border-width:16px 0 16px 16px;\n "}var l=document.querySelector("style[data-tippy-stylesheet]");l&&l.remove();var c="";this.enable_animation&&(c="\n @-webkit-keyframes ".concat(this.animation.type," {\n 0% { transform: ").concat(translateDir(this.position.position,0),"; }\n 50% { transform: ").concat(translateDir(this.position.position,50),"; }\n 100% { transform: ").concat(translateDir(this.position.position,100),"; }\n }\n \n @keyframes ").concat(this.animation.type," {\n 0% { transform: ").concat(translateDir(this.position.position,0),"; }\n 50% { transform: ").concat(translateDir(this.position.position,50),"; }\n 100% { transform: ").concat(translateDir(this.position.position,100),"; }\n }\n \n .tippy-box {\n animation-name: ").concat(this.animation.type,";\n animation-duration: ").concat(this.animation.duration,"ms;\n animation-timing-function: ").concat(this.animation.anim_function,";\n animation-iteration-count: ").concat(this.animation.iteration_count,";\n }\n "));var d='\n .tippy-box[data-animation="fade"][data-state=hidden]{\n opacity:0;\n } \n [data-tippy-root] {\n width:'.concat(this.inline_width,";\n max-width:calc(100vw - ").concat(this.enable_arrow&&this.arrow.enable_border?this.arrow.border.width:0,"px);\n } \n .tippy-box { \n width:").concat(this.inline_width,";\n position:relative;\n line-height:1.4;\n white-space:normal;\n outline:0;\n transition-property:transform,visibility,opacity;\n } \n .tippy-box[data-placement^=top] > .tippy-arrow {\n ").concat(e,"\n } \n .tippy-box[data-placement^=top] > .tippy-arrow:before {\n ").concat(o,"\n border-top-color:initial;\n transform-origin:center top;\n } \n .tippy-box[data-placement^=bottom] > .tippy-arrow {\n ").concat(n,"\n } \n .tippy-box[data-placement^=bottom] > .tippy-arrow:before {\n ").concat(r,"\n border-bottom-color:initial;\n transform-origin:center bottom;\n } \n .tippy-box[data-placement^=left] > .tippy-arrow {\n ").concat(i,"\n } \n .tippy-box[data-placement^=left] > .tippy-arrow:before {\n ").concat(s,"\n border-left-color:initial;\n transform-origin:center left;\n } \n .tippy-box[data-placement^=right] > .tippy-arrow {\n ").concat(t,"\n } \n .tippy-box[data-placement^=right] > .tippy-arrow:before {\n ").concat(a,"\n border-right-color:initial;\n transform-origin:center right;\n } \n .tippy-box[data-inertia][data-state=visible] {\n transition-timing-function:cubic-bezier(.54,1.5,.38,1.11)\n } \n .tippy-arrow {\n z-index:9999;\n width:18px;\n height:18px;\n color:").concat(this.enable_arrow?this.arrow.color:"transparent",';\n opacity:0;\n visibility:hidden;\n transition:all .5s cubic-bezier(.96,.23,.07,.8);\n } \n .tippy-arrow.open {\n opacity:1;\n visibility:visible;\n }\n .tippy-arrow:before{ \n content:"";\n position:absolute;\n border-color:transparent;\n border-style:').concat(this.enable_arrow&&this.arrow.enable_border?this.arrow.border.style:"solid",";\n } \n .tippy-content {\n width:").concat(this.inline_width,";\n padding: 0.3125rem 0.5625rem;\n position:relative;\n z-index:9998;\n } \n ").concat(c,"\n ");return"\n ".concat(d,"\n ")}},{key:"_getBootstrapiconsStyles",value:function(){return'\n .bi::before, [class^="bi-"]::before, [class*=" bi-"]::before {\n display: inline-block;\n font-style: normal;\n font-weight: normal !important;\n font-variant: normal;\n text-transform: none;\n line-height: 1;\n vertical-align: -.125em;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n }\n .bi-x::before { \n content: "62a"; \n }\n .bi-x-circle-fill::before { \n content: "622"; \n }\n '}},{key:"_removeStyles",value:function(){try{var e=document.querySelector("style[apx-tooltip-styles]");e&&e.remove();var t=document.querySelector("style[data-tippy-stylesheet]");t&&t.remove()}catch(e){Logger$3.error("Could not remove the tooltip styles:"+e)}}},{key:"_setInLineContent",value:function(){this._createInLineContainer(),this.direction.nudge===DIRECTION.VERTICAL&&(this._createTopButtonContainer(),this._setButtons(BUTTON_CONTAINER_POSITION.TOP)),this._createMediaContainer(),this.direction.nudge===DIRECTION.VERTICAL&&(this._createCenterButtonContainer(),this._setButtons(BUTTON_CONTAINER_POSITION.CENTER)),this._setImageOptions(),this._setVideoOptions(),this._setIconOptions(),this._createNonMediaContainer(),this._setTextContainer(),this._setTitleContent(),this._setDescriptionContent(),this._createButtonContainer(),this._createBottomButtonContainer(),this._setButtons(BUTTON_CONTAINER_POSITION.BOTTOM),this._setProgressBar(),this._setCloseButton(),this._setMarketingMessage()}},{key:"_createInLineContainer",value:function(){this.inLineContainer=document.createElement("div"),this.inLineContainer.classList.add("apx-inline-container".concat(this.cssPostFix))}},{key:"_createMediaContainer",value:function(){this.mediaContainer=document.createElement("div"),this.mediaContainer.classList.add("apx-inline-media-container".concat(this.cssPostFix)),this.inLineContainer.appendChild(this.mediaContainer)}},{key:"_setImageOptions",value:function(){if(this.enable_image)if(this.image.enable_background_image)this.inLineContainer.classList.add("apx-inline-image".concat(this.cssPostFix));else{var e=document.createElement("img");e.src=this.image.path,e.classList.add("apx-inline-image".concat(this.cssPostFix)),this.mediaContainer.appendChild(e)}}},{key:"_setVideoOptions",value:function(){if(this.enable_video)if(this.video.enable_embed){var e=document.createElement("div");e.classList.add("apx-inline-video".concat(this.cssPostFix)),e.innerHTML="".concat(this.video.embed.html),this.mediaContainer.appendChild(e)}else{var t=document.createElement("video");t.classList.add("apx-inline-video".concat(this.cssPostFix)),t.controlsList="noplaybackrate nodownload",t.disablePictureInPicture=!0,t.controls=!0,t.muted=!this.video.enable_audio;var n=document.createElement("source");n.setAttribute("src",this.video.path),n.setAttribute("type","video/mp4"),t.appendChild(n),this.mediaContainer.appendChild(t)}}},{key:"_setIconOptions",value:function(){if(this.enable_icon){var e=document.createElement("div");e.classList.add("apx-inline-icon-container".concat(this.cssPostFix));var t=document.createElement("img");t.src=this.icon.path,t.classList.add("apx-inline-icon-content".concat(this.cssPostFix)),e.appendChild(t),this.mediaContainer.appendChild(e)}}},{key:"_createNonMediaContainer",value:function(){this.nonMediaContainer=document.createElement("div"),this.nonMediaContainer.classList.add("apx-inline-nonmedia-container".concat(this.cssPostFix)),this.inLineContainer.appendChild(this.nonMediaContainer)}},{key:"_setTextContainer",value:function(){this.textContainer=document.createElement("div"),this.textContainer.classList.add("apx-inline-text-container".concat(this.cssPostFix)),this.nonMediaContainer.appendChild(this.textContainer)}},{key:"_setTitleContent",value:function(){if(this.enable_title){resolveDynamicText(this.title);var e=document.createElement("div");if(e.classList.add("apx-inline-title-div".concat(this.cssPostFix)),""!=this.title.enable_icon){var t=document.createElement("img");t.src=this.title.icon.path,t.classList.add("apx-inline-title-icon".concat(this.cssPostFix)),e.appendChild(t)}e.appendChild(createNewTextElement(this.title,this.currentId,"title")),this.textContainer.appendChild(e)}}},{key:"_setDescriptionContent",value:function(){if(this.enable_description){resolveDynamicText(this.description);var e=document.createElement("div");e.classList.add("apx-inline-description".concat(this.cssPostFix)),e.appendChild(createNewTextElement(this.description,this.currentId,"description")),e.classList.add("apx-inline-scroll".concat(this.cssPostFix)),this.textContainer.appendChild(e)}}},{key:"_setProgressBar",value:function(){if(this.enable_stepper&&this.stepper.enable_progressbar){this.progressbar=this.stepper.progressbar;var e=document.createElement("div");e.classList.add("apx-inline-progress-bar".concat(this.cssPostFix));var t=document.createElement("div");t.classList.add("apx-inline-bar".concat(this.cssPostFix)),this.stepper.index<=this.stepper.length?t.style.transform="translateX(".concat(-(100-100/this.stepper.length*this.stepper.index),"%)"):e.style.visibility="hidden",e.appendChild(t),this.inLineContainer.appendChild(e)}}},{key:"_createButtonContainer",value:function(){this.direction.non_media!==DIRECTION.VERTICAL&&(this.buttonContainer=document.createElement("div"),this.buttonContainer.classList.add("apx-inline-button-container".concat(this.cssPostFix)),this.nonMediaContainer.appendChild(this.buttonContainer))}},{key:"_createTopButtonContainer",value:function(){var e;this.enable_buttons&&null!==(e=this.buttons)&&void 0!==e&&e.enable_top&&(this.topButtonContainer=document.createElement("div"),this.topButtonContainer.classList.add("apx-inline-top-button-container".concat(this.cssPostFix)),this.inLineContainer.appendChild(this.topButtonContainer))}},{key:"_createCenterButtonContainer",value:function(){var e;this.enable_buttons&&null!==(e=this.buttons)&&void 0!==e&&e.enable_center&&(this.centerButtonContainer=document.createElement("div"),this.centerButtonContainer.classList.add("apx-inline-center-button-container".concat(this.cssPostFix)),this.inLineContainer.appendChild(this.centerButtonContainer))}},{key:"_createBottomButtonContainer",value:function(){var e;this.enable_buttons&&null!==(e=this.buttons)&&void 0!==e&&e.enable_bottom&&(this.bottomButtonContainer=document.createElement("div"),this.bottomButtonContainer.classList.add("apx-inline-bottom-button-container".concat(this.cssPostFix)),this.nonMediaContainer.appendChild(this.bottomButtonContainer))}},{key:"_setButtons",value:function(e){var t=this;if(this.enable_buttons&&(e===BUTTON_CONTAINER_POSITION.TOP&&this.buttons.enable_top||e===BUTTON_CONTAINER_POSITION.CENTER&&this.buttons.enable_center||e===BUTTON_CONTAINER_POSITION.BOTTOM&&this.buttons.enable_bottom)){var n=function(e){t._destroyTooltip(e)},i={next:function(e,i){n(!1),t.stepperCallBack(e,i)},prev:function(e,i){n(!1),t.stepperCallBack(e,i)},complete:n,cancel:n,_isCancelled:!1,action:""},o={};o=e===BUTTON_CONTAINER_POSITION.TOP?this.buttons.top:e===BUTTON_CONTAINER_POSITION.CENTER?this.buttons.center:this.buttons.bottom;var a=generateButtonsBlock(this.configId,this.name,this.stepper,EVENT_PREFIX.INLINE,o,this.direction.buttons,"",e,i,this.isWalkthrough,this.uis,this.index,"tooltip");e===BUTTON_CONTAINER_POSITION.TOP?this.topButtonContainer.appendChild(a):e===BUTTON_CONTAINER_POSITION.CENTER?this.centerButtonContainer.appendChild(a):this.bottomButtonContainer.appendChild(a)}}},{key:"_setCloseButton",value:function(){var e=this;if(this.enable_close_button){var t=document.createElement("span");this.close_button.type===CLOSE_BUTTON_STYLE.NORMAL?t.innerHTML=getCloseSVG(this.close_button.width,this.close_button.height,this.close_button.color):this.close_button.type===CLOSE_BUTTON_STYLE.FILL?"circle"===this.close_button.shape?t.innerHTML=getCloseWithCircleSVG(this.close_button.width,this.close_button.height,this.close_button.fill_color,this.close_button.color):t.innerHTML=getCloseWithRectangleSVG(this.close_button.width,this.close_button.height,this.close_button.fill_color,this.close_button.color):t.innerHTML='<img src="'.concat(this.close_button.path,'" width="').concat(this.close_button.width,'px" height="').concat(this.close_button.height,'px"></img>'),t.classList.add("apx-inline-close".concat(this.cssPostFix)),t.addEventListener("click",(function(){var t="cancel"===e.close_button.action;e.rtmInstance.logActionEvent("InlineXIconClicked",e.configId,e.name,"tooltip"),e._destroyTooltip(t)})),this.direction.non_media===DIRECTION.VERTICAL||this.direction.nudge===DIRECTION.VERTICAL?this.inLineContainer.appendChild(t):this.buttonContainer.appendChild(t)}}},{key:"_setObservors",value:function(){var e=this;this.targetDeletionObserver=new MutationObserver((function(){e.tooltipShown&&(document.body.contains(e.targetElement)||e._destroyTooltip())})),this.viewPortObservor=new IntersectionObserver((function(){e.tooltipShown&&(isElementInViewport(e.targetElement)||e._destroyTooltip())}))}},{key:"_createTippyInstance",value:function(){var e=this;if(this.targetElement.disabled){var t=document.createElement("span");t.setAttribute("id","apx_tooltip_span"),this.targetElement.parentNode.insertBefore(t,this.targetElement),t.appendChild(this.targetElement),this.targetElement=t}this.tooltip=tippy(this.targetElement,{allowHTML:!1,aria:{content:"describedby"},arrow:this.enable_arrow,appendTo:function(){return document.body},content:this.inLineContainer,duration:100,followCursor:this.follow_cursor,flip:!0,flipOnUpdate:!0,inlinePositioning:!0,hideOnClick:!1,interactive:!0,interactiveBorder:this.interactive_border,interactiveDebounce:999999,moveTransition:"transform 0s linear",maxWidth:"100%",maxHeight:"100%",offset:[this.arrow.arrowPosition,this.position.offset.distance],onShow:function(){var t,n;null===(t=e.targetDeletionObserver)||void 0===t||t.observe(document.body,{childList:!0,subtree:!0}),null===(n=e.viewPortObservor)||void 0===n||n.observe(e.targetElement),setTimeout((function(){e._highlightInlineTarget(),e._setAutoTerminate(),e.tooltipShown=!0}),10)},onMount:function(t){e.recalculateTheTippyHeight(),t.popperInstance.update()},onShown:function(){e.updateSkid=function(){var t=document.querySelector("[data-tippy-root]"),n=document.querySelector(".tippy-box").getAttribute("data-placement"),i=parseFloat(window.getComputedStyle(document.documentElement).fontSize);"left"===n||"right"===n?(t.style.top="".concat(e.position.offset.skid,"px"),e.initial_data_placement!==n&&(t.style.left="".concat("left"===n?-.625*i-(e.enable_animation?16:0):.625*i+(e.enable_animation?10:0),"px"))):"top"!==n&&"bottom"!==n||(t.style.left="".concat(e.position.offset.skid,"px"),e.initial_data_placement!==n&&(t.style.top="".concat("top"===n?-1.125*i-(e.enable_animation?16:0):1.125*i+(e.enable_animation?10:0),"px")))},e.updateSkid(),e._showTippy(),window.addEventListener("scroll",e.updateSkid)},placement:this.position.position,popperOptions:{modifiers:[{name:"flip",options:{fallbackPlacements:["bottom","right","top","left"],allowedAutoPlacements:["top","bottom","right","left"]}}]},role:"tooltip",showOnCreate:!0,sticky:!1,touch:!0,zIndex:99999999})}},{key:"_showTippy",value:function(){var e=this;this.inLineContainer.classList.add("open"),setTimeout((function(){var t,n=document.querySelector(".tippy-arrow");null==n||null===(t=n.classList)||void 0===t||t.add("open"),e.showCallback()}),200)}},{key:"_setAutoTerminate",value:function(){var e=this;!0===this.terminationConfig.auto_dismiss&&(this.terminationTimeoutId=setTimeout((function(){e._destroyTooltip()}),this.terminationConfig.duration))}},{key:"_targetClickCallback",value:function(){this.enable_dismiss_actions&&this.dismiss_actions.target_touch&&(this.rtmInstance.logActionEvent("InlineTargetViewClicked",this.configId,this.name,"tooltip"),this._destroyTooltip())}},{key:"_destroyTooltip",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];try{var t,n,i,o,a,r,s;if(document.body.removeEventListener("click",this.flutterClickCallbackWrapper),Apxor.isFlutter())null===(s=this.targetElement)||void 0===s||s.remove();null===(t=this.targetDeletionObserver)||void 0===t||t.disconnect(),this.targetDeletionObserver=null,null===(n=this.viewPortObservor)||void 0===n||n.disconnect(),this.viewPortObservor=null,null===(i=this.tooltip)||void 0===i||i.destroy(),Apxor.isFlutter()&&(null===(o=this.maskingElement)||void 0===o||o.remove()),null===(a=this.dimBackgroundElement)||void 0===a||a.remove(),null===(r=this.targetOverlayElement)||void 0===r||r.remove(),this._removeStyles(),this.targetElement.removeAttribute("apx-inline-dimbackground"),clearTimeout(this.terminationTimeoutId),this.targetElement.removeEventListener("click",this._targetClickCallback),window.removeEventListener("scroll",this.updateSkid),this.setPositionofOverlayTargetElement&&window.removeEventListener("scroll",this.setPositionofOverlayTargetElement)}catch(e){Logger$3.info("Destroying the tooltip:"+e)}this.closeCallback(e)}},{key:"_isWalkthroughCampaign",value:function(){return Array.isArray(this.walkthroughConfigs)&&this.walkthroughConfigs.length>0}},{key:"getPixelsFromPercentage",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=window.innerWidth,i=window.innerHeight;return t?i*e/100:n*e/100}},{key:"recalculateTheTippyHeight",value:function(){try{var e=this.inLineContainer.offsetHeight,t=this.inLineContainer.offsetWidth,n=document.querySelector("[data-tippy-root]");n.style.height="".concat(e,"px"),n.style.width="".concat(t,"px");var i=document.querySelector(".tippy-box");i.style.height="".concat(e,"px"),i.style.width="".concat(t,"px");var o=document.querySelector(".tippy-content");o.style.height="".concat(e,"px"),o.style.width="".concat(t,"px")}catch(e){this._destroyTooltip(),Logger$3.error("Can't update the tippy dimensions")}}}]),e}(),Badgeborder=_createClass$1((function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};_classCallCheck$1(this,e),this.color=t.color,this.corners=t.corners,this.width=t.width})),Shape=_createClass$1((function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};_classCallCheck$1(this,e),this.type=t.type,this.color=getColorOrDefault(t.color,"transparent"),this.enable_gradient=t.enable_gradient,this.enable_gradient&&(this.gradient=new Gradient(t.gradient)),this.enable_border=t.enable_border,this.enable_border&&(this.border=new Badgeborder(t.border))})),Badgebackground=_createClass$1((function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};_classCallCheck$1(this,e),this.width=t.width,this.height=t.height,this.enable_image=t.enable_image,this.enable_image&&(this.image=new Image(t.image)),this.shape=new Shape(t.shape)})),Badgecontent=_createClass$1((function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};_classCallCheck$1(this,e),this.enable_label=t.enable_label,this.enable_label&&(this.label=new Text(t.label)),this.enable_icon=t.enable_icon,this.enable_icon&&(this.icon=new Icon(t.icon))})),Autoscroll=_createClass$1((function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};_classCallCheck$1(this,e),this.duration_millis=getNumberOrDefault(t.duration_millis,2)/1e3,this.direction=getStringOrDefault(t.direction,"to_top"),this.horizontal_gap=null==t?void 0:t.horizontal_gap})),Badge=_createClass$1((function e(t){var n,i=this;_classCallCheck$1(this,e),this.position=new Position(t.position),this.enable_background=t.enable_background,this.enable_background&&(this.background=new Badgebackground(t.background)),this.content=[],null!=t&&t.content&&0!==t.content.length&&(null!=t&&t.enable_auto_scroll&&"to_bottom"===(null==t||null===(n=t.auto_scroll)||void 0===n?void 0:n.direction)?t.content.forEach((function(e){i.content.unshift(new Badgecontent(e))})):t.content.forEach((function(e){i.content.push(new Badgecontent(e))}))),this.enable_shadow=t.enable_shadow,this.enable_shadow&&(this.shadow=new Shadow(t.shadow)),this.enable_animation=t.enable_animation,this.animation=new Animation(t.animation),this.enable_auto_scroll=t.enable_auto_scroll,this.enable_auto_scroll&&(this.auto_scroll=new Autoscroll(t.auto_scroll)),this.tooltipShown=t.tooltipShown})),Logger$2=window.ApxorLogger,ApxorBadge=function(){function e(t,n,i,o,a){var r,s,l,c,d,p=this;_classCallCheck$1(this,e),_defineProperty$1(this,"_controller",Apxor.getController()),_defineProperty$1(this,"shakeAnimationRepeatFunction",(function(){var e=1e3*p.delayMillis;p.shakeAnimationRepeat(p.interCount,e)})),_defineProperty$1(this,"fadeAnimationRepeatFunction",(function(){var e=1e3*p.delayMillis;p.fadeAnimationRepeat(p.interCount,e)})),_defineProperty$1(this,"rippleAnimationRepeatFunction",(function(){var e,t=1e3*p.delayMillis,n=".apxor-badge-container-stylesdummy-".concat(p.cssPostFix," {\n opacity:0;\n }").replaceAll("\n","").replace(/[\s]{2,999}/g,""),i=document.createElement("style");i.innerHTML=n,null===(e=p.targetElement)||void 0===e||e.appendChild(i),p.rippleAnimationRepeat(p.interCount,t)})),_defineProperty$1(this,"shineAnimationRepeatFunction",(function(){var e=1e3*p.delayMillis;p.shineAnimationRepeat(p.interCount,e)})),_defineProperty$1(this,"_setIntervalForTerminatingBadge",(function(){var e,t,n=p.rtmInstance.getCampaignMeta(p.configId),i=(null==n?void 0:n._attr)||{},o=setInterval((function(){var e,t=!1;null!==(e=p.terminationConfig)&&void 0!==e&&e.enable_attributes&&p.rtmInstance.validateForTerminationAttributes(p.configId)&&(t=!0,p._controller.persistTerminationInfoLocally(p.configId));var n=JSON.parse(p._controller.getFromStorage(APX_TERMINATION_ID$1));if(null!==n&&void 0!==n[p.configId]&&n[p.configId].goalAcheived){for(var a=document.getElementsByClassName("apxor-badge-container-styles-".concat(p.cssPostFix));a.length>0;)a[0].remove();t?Apxor.logEvent("inline_dismissed",_objectSpread2$1({id:p.configId,message_name:p.name,apx_reason:"UserOrSessionAttributesUpdated"},i),!1,"apxor","campaign"):p.targetClicked||Apxor.logEvent("inline_dismissed",_objectSpread2$1({id:p.configId,message_name:p.name,apx_reason:"GoalEventAchieved"},i),!1,"apxor","campaign"),clearTimeout(o)}}),1e3);null!==(e=p.terminationConfig)&&void 0!==e&&e.enable_goal_events||null!==(t=p.terminationConfig)&&void 0!==t&&t.enable_attributes})),_defineProperty$1(this,"cssPath",(function(e,t){if(e.nodeType!==Node.ELEMENT_NODE)return"";for(var n=[],i=e;i;){var o=p._cssPathStep(i,!!t,i===e);if(!o)break;if(n.push(o),o.optimized)break;i=i.parentNode}return n.reverse(),n.join(" > ")})),_defineProperty$1(this,"_cssPathStep",(function(e,t,n){if(e.nodeType!==Node.ELEMENT_NODE)return null;var i=e.getAttribute("id");if(t){if(i)return new DOMNodePathStep(l(i),!0);var o=e.nodeName.toLowerCase();if("body"===o||"head"===o||"html"===o)return new DOMNodePathStep(e.nodeName.toLowerCase(),!0)}var a=e.nodeName.toLowerCase();if(i)return new DOMNodePathStep(a.toLowerCase()+l(i),!0);var r=e.parentNode;if(!r||r.nodeType===Node.DOCUMENT_NODE)return new DOMNodePathStep(a.toLowerCase(),!0);function s(e){var t=e.getAttribute("class");return t?t.split(/\s+/g).filter(Boolean).map((function(e){return"$"+e})):[]}function l(e){return"#"+c(e)}function c(e){if(/^-?[a-zA-Z_][a-zA-Z0-9_-]*$/.test(e))return e;var t=/^(?:[0-9]|-[0-9-]?)/.test(e),n=e.length-1;return e.replace(/./g,(function(e,i){return t&&0===i||!function(e){return!!/[a-zA-Z0-9_-]/.test(e)||e.charCodeAt(0)>=160}(e)?function(e,t){return"\\"+function(e){var t=e.charCodeAt(0).toString(16);1===t.length&&(t="0"+t);return t}(e)+(t?"":" ")}(e,i===n):e}))}for(var d=s(e),p=!1,u=!1,h=-1,g=-1,f=r.children,m=0;(-1===h||!u)&&m<f.length;++m){var _=f[m];if(_.nodeType===Node.ELEMENT_NODE)if(g+=1,_!==e){if(!u&&_.nodeName.toLowerCase()===a.toLowerCase()){p=!0;var v=new Set(d);if(v.size)for(var b=s(_),y=0;y<b.length;++y){var x=b[y];if(v.has(x)&&(v.delete(x),!v.size)){u=!0;break}}else u=!0}}else h=g}var w=a.toLowerCase();if(n&&"input"===a.toLowerCase()&&e.getAttribute("type")&&!e.getAttribute("id")&&!e.getAttribute("class")&&(w+='[type="'+e.getAttribute("type")+'"]'),u)w+=":nth-child("+(h+1)+")";else if(p)for(var C in d)w+="."+c(d[C].substr(1));return new DOMNodePathStep(w,!1)})),this.uiConfig=t,this.rtmInstance=o,this.configId=i.configId,this.name=i.configName,this.terminationConfig=n,this.showCallback=a,this.cssPostFix="-".concat(this.configId,"-").concat(this.name).replaceAll(" ","").replace(/[^\w\s]/gi,""),this.target=new Target(t.target),this.elementVisibilityRetries=null!==(r=null===(s=this.target)||void 0===s||null===(s=s.retry)||void 0===s?void 0:s.max_retries)&&void 0!==r?r:0,this.badge=new Badge(t.badge),this.enable_marketing=t.enable_marketing,this.enable_marketing&&(this.marketing=new Marketing(t.marketing)),this.delay=t.delay||0,this.intraCount=null===(l=this.badge.animation)||void 0===l?void 0:l.intra_count,this.interCount=null===(c=this.badge.animation)||void 0===c?void 0:c.inter_count,this.delayMillis=null===(d=this.badge.animation)||void 0===d?void 0:d.delay_millis,this.count=1,this.shineWidth=0,this.c=1,this.badgeDummyContainer=null,this.contentLabelWidth=0,this.contentIconWidth=0,this.contentWidth=0,this.labelElementDummy=null,this.iconElementdummy=null,this.targetClicked=!1,this.zIndexValue=1,this.zIndexValueminusOne=1,this.contentZindexValue=1,this.ceInstance=ceWrapper.getInstance()}return _createClass$1(e,[{key:"createBadge",value:function(){var e=this;setTimeout((function(){var t=function(){var t,n=window.getComputedStyle(e.targetElement).getPropertyValue("z-index"),i=parseInt(n,10);null===(t=e.targetElement)||void 0===t||t.classList.add("apx-badge-target-style".concat(e.cssPostFix)),e.zIndexValue=i+3,e.zIndexValueminusOne=i+1,e.contentZindexValue=i+5,isNaN(e.zIndex)&&(e.zIndexValue=999,e.zIndexValueminusOne=998,e.contentZindexValue=1e3),e._setBadgeStyles(),e._setBadgeContent(),e._setIntervalForTerminatingBadge(),e._setAutoTerminateForBadges(),e._setOnClickTerminationForBadges(),e.showCallback()};e._setTargetElement((function(){e._isElementVisible()?t():(e.target.retry.max_retries=e.elementVisibilityRetries,e._retryFindingTargetElement(!0,t))}))}),this.delay)}},{key:"_setTargetElement",value:function(e){this.targetElement=getElementFromSelector(this.target.id,this.target.frame_id,this.target.is_text_based,this.target.avf_text_config),this.targetElement?e():this.target.enable_retry?(Logger$2.info("Not found yet. Rechecking the DOM."),this._retryFindingTargetElement(!1,e)):(Logger$2.info("Element with selector:".concat(this.target.id," not found.")),null==Apxor||Apxor.logEvent("apx_nudge_not_shown",{apx_nudge_type:"campaign",apx_nudge_id:this.configId,apx_nudge_name:this.name,apx_variant_code:this.ceInstance.getVariantCode(this.configId),apx_failure_type:"error",apx_reason:"View not found"},!1,"apxor","campaign"))}},{key:"_isElementVisible",value:function(){try{var e=this.targetElement.getBoundingClientRect();if(0===e.width||0===e.height)return!1}catch(e){return!1}return!0}},{key:"_retryFindingTargetElement",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],n=arguments.length>1?arguments[1]:void 0,i=setInterval((function(){(e.targetElement=getElementFromSelector(e.target.id,e.target.frame_id,e.target.is_text_based,e.target.avf_text_config),t)?e._isElementVisible()?(clearInterval(i),n()):(e.target.retry.max_retries=e.target.retry.max_retries-1,e.target.retry.max_retries<=0&&(clearInterval(i),Logger$2.info("Invalid target element. Width and height are 0 for element: ".concat(e.target.id,". Can't show tooltip")),null==Apxor||Apxor.logEvent("apx_nudge_not_shown",{apx_nudge_type:"campaign",apx_nudge_id:e.configId,apx_nudge_name:e.name,apx_variant_code:e.ceInstance.getVariantCode(e.configId),apx_failure_type:"error",apx_reason:"View not visible, as it's width or height are 0"},!1,"apxor","campaign"))):e.targetElement?(clearInterval(i),n()):(e.target.retry.max_retries=e.target.retry.max_retries-1,e.target.retry.max_retries<=0&&(clearInterval(i),console.warn("Element with selector:".concat(e.target.id," not found.")),null==Apxor||Apxor.logEvent("apx_nudge_not_shown",{apx_nudge_type:"campaign",apx_nudge_id:e.configId,apx_nudge_name:e.name,apx_variant_code:e.ceInstance.getVariantCode(e.configId),apx_failure_type:"error",apx_reason:"View not found"},!1,"apxor","campaign")))}),this.target.retry.interval)}},{key:"_setBadgeStyles",value:function(){var e,t="\n ".concat(this._gettargetStyles(),"\n ").concat(this._getBadgeContainerStyles(),"\n ").concat(this._getBadgeContentStyles(),"\n ").concat(this._getBadgeContentElementStyles(),"\n ").concat(this._getBadgeAnimationStyles(),"\n ").concat(this._getBadgeScrollStyles(),"\n ").replaceAll("\n","").replace(/[\s]{2,999}/g,""),n=document.createElement("style");n.innerHTML=t,null===(e=this.targetElement)||void 0===e||e.appendChild(n)}},{key:"_gettargetStyles",value:function(){return"\n .apx-badge-target-style".concat(this.cssPostFix,"{\n position:relative;\n overflow:initial;\n }")}},{key:"_getBadgeContainerStyles",value:function(){var e,t,n,i,o,a=this.badge.enable_background&&this.badge.background.shape.enable_border?this.badge.background.width+this.badge.background.shape.border.width.left+this.badge.background.shape.border.width.right:0,r=this.badge.enable_background&&this.badge.background.shape.enable_border?this.badge.background.height+this.badge.background.shape.border.width.top+this.badge.background.shape.border.width.bottom:0;o=this.badge.enable_background?"\n width:".concat(a,"px;\n height:").concat(r,"px;"):"\n width:auto;\n height:auto;";var s="";switch(this.badge.position.position){case"top-left":s="\n top:-".concat(r/2,"px;\n left:-").concat(a/2,"px;\n -webkit-transform:translate(").concat(this.badge.position.offset.x,"px,").concat(this.badge.position.offset.y,"px);\n ");break;case"top-center":case"top":s="\n top:-".concat(r/2,"px;\n left:calc(50% - ").concat(a/2,"px);\n -webkit-transform:translate(").concat(this.badge.position.offset.x,"px,").concat(this.badge.position.offset.y,"px);\n ");break;case"top-right":s="\n top:-".concat(r/2,"px;\n right:-").concat(a/2,"px;\n -webkit-transform:translate(").concat(this.badge.position.offset.x,"px,").concat(this.badge.position.offset.y,"px);\n ");break;case"bottom-left":s="\n bottom:-".concat(r/2,"px;\n left:-").concat(a/2,"px;\n -webkit-transform:translate(").concat(this.badge.position.offset.x,"px,").concat(this.badge.position.offset.y,"px);\n ");break;case"bottom-center":case"bottom":s="\n left:calc(50% - ".concat(a/2,"px);\n bottom:-").concat(r/2,"px;\n -webkit-transform:translate(").concat(this.badge.position.offset.x,"px,").concat(this.badge.position.offset.y,"px);\n ");break;case"bottom-right":s="\n bottom:-".concat(r/2,"px;\n right:-").concat(a/2,"px;\n -webkit-transform:translate(").concat(this.badge.position.offset.x,"px,").concat(this.badge.position.offset.y,"px);\n ");break;case"center-left":case"left":s="\n top:calc(50% - ".concat(r/2,"px);\n left:-").concat(a/2,"px;\n -webkit-transform:translate(").concat(this.badge.position.offset.x,"px,").concat(this.badge.position.offset.y,"px);\n ");break;case"center-right":case"right":s="\n top:calc(50% - ".concat(r/2,"px);\n right:-").concat(a/2,"px;\n -webkit-transform:translate(").concat(this.badge.position.offset.x,"px,").concat(this.badge.position.offset.y,"px);\n ");break;default:s="\n top:calc(50% - ".concat(r/2,"px);\n left:calc(50% - ").concat(a/2,"px);\n -webkit-transform:translate(").concat(this.badge.position.offset.x,"px,").concat(this.badge.position.offset.y,"px);\n ")}var l="";this.badge.enable_background&&this.badge.background.enable_image&&(l="\n .apxor-badge-container-background-image".concat(this.cssPostFix,"{\n background-image: url('").concat(this.badge.background.image.path,"');\n background-repeat: no-repeat;\n background-attachment: fixed; \n background-size: 100% 100%;\n height: ").concat(this.badge.background.height,"px;\n width: ").concat(this.badge.background.width,"px;\n }"));var c="";this.badge.enable_background&&0!==Object.keys(this.badge.background.shape).length&&this.badge.background.shape.enable_gradient&&(c="\n background-image:linear-gradient(".concat(this.badge.background.shape.gradient.direction,", ").concat(this.badge.background.shape.gradient.colors[0],", ").concat(this.badge.background.shape.gradient.colors[1],");\n "));var d="";if(this.badge.enable_background&&null!==(e=this.badge.background)&&void 0!==e&&e.shape){var p="";this.badge.background.enable_image||("circle"===this.badge.background.shape.type?p="\n border:".concat(this.badge.background.shape.border.width.top,"px solid ").concat(this.badge.background.shape.border.color,";\n border-radius:50%;\n background:").concat(this.badge.background.shape.color,";"):"rectangle"===this.badge.background.shape.type&&(p="\n background:".concat(this.badge.background.shape.color,";\n border-top:").concat(this.badge.background.shape.border.width.top,"px solid ").concat(this.badge.background.shape.border.color,";\n border-right:").concat(this.badge.background.shape.border.width.right,"px solid ").concat(this.badge.background.shape.border.color,";\n border-bottom:").concat(this.badge.background.shape.border.width.bottom,"px solid ").concat(this.badge.background.shape.border.color,";\n border-left:").concat(this.badge.background.shape.border.width.left,"px solid ").concat(this.badge.background.shape.border.color,";\n border-top-left-radius:").concat(this.badge.background.shape.border.corners.top_left,"px;\n border-top-right-radius:").concat(this.badge.background.shape.border.corners.top_right,"px;\n border-bottom-left-radius:").concat(this.badge.background.shape.border.corners.bottom_left,"px;\n border-bottom-right-radius:").concat(this.badge.background.shape.border.corners.bottom_right,"px;\n "))),d="\n ".concat(p,"\n ")}var u="",h="circle"===(null===(t=this.badge)||void 0===t||null===(t=t.animation)||void 0===t?void 0:t.rippleShape)?"50%":"".concat(null===(n=this.badge)||void 0===n||null===(n=n.animation)||void 0===n?void 0:n.rippleCornerRadius,"px");return this.badge.enable_shadow&&(u="\n box-shadow: ".concat(this.badge.shadow.offset_x,"px ").concat(this.badge.shadow.offset_y,"px ").concat(this.badge.shadow.blur_radius,"px ").concat(this.badge.shadow.spread_radius,"px ").concat(this.badge.shadow.color,";\n ")),"\n .apxor-badge-container-styles-".concat(this.cssPostFix,"{\n position:absolute;\n display:flex;\n align-items:center;\n overflow:hidden;\n ").concat(c,"\n ").concat(o,"\n ").concat(s,"\n ").concat(d,"\n ").concat(u,"\n z-index:").concat(this.zIndexValue,";\n text-transform:none;\n }\n .apxor-badge-container-stylesdummy-").concat(this.cssPostFix,"{\n position:absolute;\n display:flex;\n z-index:").concat(this.zIndexValueminusOne,";\n align-items:center;\n overflow:hidden;\n width:").concat(this.badge.background.width,"px;\n height:").concat(this.badge.background.height,"px;\n ").concat(s,"\n ").concat(u,"\n text-transform:none;\n background:").concat(null===(i=this.badge)||void 0===i||null===(i=i.animation)||void 0===i?void 0:i.rippleColor,";\n border-radius:").concat(h,";\n }\n ").concat(l)}},{key:"_getBadgeContentStyles",value:function(){var e="";return this.badge.enable_auto_scroll&&(e="to_right"===this.badge.auto_scroll.direction||"to_left"===this.badge.auto_scroll.direction?"display:flex;\n flex-direction:row;\n ":""),"\n .apxor-badge-content-container-".concat(this.cssPostFix,"{\n position:relative;\n width:100%;\n height:100%;\n overflow:hidden;\n ").concat(e,"\n }")}},{key:"_getBadgeContentElementStyles",value:function(){var e,t=this,n="",i="";return i=(null===(e=this.badge.background)||void 0===e?void 0:e.width)>this.contentWidth?"center":"left",0!==this.badge.content.length&&this.badge.content.forEach((function(e,o){if(n+="\n .apxor-badge-contentelement-".concat(o,"-").concat(t.cssPostFix,"{\n width:100%;\n height:100%;\n display: flex;\n justify-content:").concat(i,";\n align-items:center;\n }"),e.enable_icon){var a="";e.icon.enable_margin&&(a="margin:".concat(e.icon.margin.top,"px ").concat(e.icon.margin.right,"px ").concat(e.icon.margin.bottom,"px ").concat(e.icon.margin.left,"px;"));var r="";e.icon.enable_border&&(r="\n border-radius:".concat(e.icon.border.radius,"%;\n border:").concat(e.icon.border.width,"px ").concat(e.icon.border.style," ").concat(e.icon.border.color,";\n ")),n+="\n .apxor-badge-".concat(o,"-icon-container").concat(t.cssPostFix,"{\n width:auto;\n height:auto;\n display: flex;\n justify-content:center;\n align-items:center;\n }\n .apxor-badge-").concat(o,"-icon-content").concat(t.cssPostFix," {\n position:relative;\n background:url('").concat(e.icon.path,"') no-repeat center;\n background-size:cover;\n display:inline-block;\n height: ").concat(e.icon.height,"px;\n width: ").concat(e.icon.width,"px;\n ").concat(a,"\n ").concat(r,"\n }")}if(e.enable_label){var s="";e.label.enable_margin&&(s="margin:".concat(e.label.margin.top,"px ").concat(e.label.margin.right,"px ").concat(e.label.margin.bottom,"px ").concat(e.label.margin.left,"px;")),n+="\n .apxor-badge-".concat(o,"-label-content-").concat(t.cssPostFix,"{\n text-align:").concat(e.label.alignment,";\n display: flex;\n white-space: nowrap;\n text-overflow: ellipsis;\n align-items:center;\n ").concat(s,"\n }\n ")}})),n}},{key:"_getBadgeAnimationStyles",value:function(){var e="",t="";if(this.badge.enable_animation){var n,i,o,a,r,s;if("shake"===(null===(n=this.badge.animation)||void 0===n?void 0:n.type))if(0==this.badge.animation.intra_count)e="\n .apxor-badge-container-styles-".concat(this.cssPostFix,"{\n animation: badgeAnimation ").concat(this.badge.animation.duration_millis,"s infinite;\n }"),t="horizontal"===this.badge.animation.shakeDirection?"@keyframes badgeAnimation {\n 0% { transform: translateX(0) }\n 25% { transform: translateX(5px) }\n 50% { transform: translateX(0) }\n 75% { transform: translateX(-5px) }\n 100% {transform:translateX(0)}\n }":"@keyframes badgeAnimation {\n 0% { transform: translateY(0) }\n 25% { transform: translateY(5px) }\n 50% { transform: translateY(0) }\n 75% { transform: translateY(-5px) }\n 100% { transform: translateY(0) }\n }";else e="\n .apxor-badge-container-styles-".concat(this.cssPostFix,"{\n animation: badgeAnimation ").concat(this.badge.animation.duration_millis,"s ").concat(null===(r=this.badge.animation)||void 0===r?void 0:r.intra_count,";\n }"),t="horizontal"===this.badge.animation.shakeDirection?"@keyframes badgeAnimation {\n 0% { transform: translateX(0) }\n 25% { transform: translateX(5px) }\n 50% { transform: translateX(0) }\n 75% { transform: translateX(-5px) }\n 100% {transform:translateX(0)}\n }":"@keyframes badgeAnimation {\n 0% { transform: translateY(0) }\n 25% { transform: translateY(5px) }\n 50% { transform: translateY(0) }\n 75% { transform: translateY(-5px) }\n 100% { transform: translateY(0) }\n }";if("fade"===(null===(i=this.badge.animation)||void 0===i?void 0:i.type))if(0==this.badge.animation.intra_count)e="\n .apxor-badge-container-styles-".concat(this.cssPostFix,"{\n animation: badgeAnimation ").concat(this.badge.animation.duration_millis,"s infinite;\n }"),t="\n @keyframes badgeAnimation {\n 0% { opacity:1;}\n 50% { opacity:".concat(this.badge.animation.fade_opacity/100,";}\n 100% { opacity:1}\n }");else e="\n .apxor-badge-container-styles-".concat(this.cssPostFix,"{\n animation: badgeAnimation ").concat(this.badge.animation.duration_millis,"s ").concat(null===(s=this.badge.animation)||void 0===s?void 0:s.intra_count,";\n }"),t="\n @keyframes badgeAnimation {\n 0% { opacity:1;}\n 50% { opacity:".concat(this.badge.animation.fade_opacity/100,";}\n 100% { opacity:1}\n }");if("ripple"===(null===(o=this.badge.animation)||void 0===o?void 0:o.type)){var l,c=this.badge.animation.rippleArea/2;if(0==this.badge.animation.intra_count)e="\n .apxor-badge-container-stylesdummy-".concat(this.cssPostFix,"{\n animation: badgeAnimation ").concat(this.badge.animation.duration_millis,"s ease-in-out;\n animation-iteration-count: infinite;\n \n }"),t="\n @keyframes badgeAnimation {\n 0% {\n box-shadow: 0 0 0 0 ".concat(this.badge.animation.rippleColor,", 0 0 0 0 ").concat(this.badge.animation.rippleColor,";\n }\n \n 80% {\n box-shadow: 0 0 0 ").concat(c,"px ").concat(this.badge.animation.rippleColor,", 0 0 0 ").concat(this.badge.animation.rippleArea,"px ").concat(this.badge.animation.rippleColor,";\n }\n\n 100% {\n box-shadow: 0 0 0 0 ").concat(this.badge.animation.rippleColor,", 0 0 0 0 ").concat(this.badge.animation.rippleColor,";\n } \n }");else e="\n .apxor-badge-container-stylesdummy-".concat(this.cssPostFix,"{\n animation: badgeAnimation ").concat(this.badge.animation.duration_millis,"s ease-in-out;\n animation-iteration-count: ").concat(null===(l=this.badge.animation)||void 0===l?void 0:l.intra_count,";\n }"),t="\n @keyframes badgeAnimation {\n 0% {\n box-shadow: 0 0 0 0 ".concat(this.badge.animation.rippleColor,", 0 0 0 0 ").concat(this.badge.animation.rippleColor,";\n }\n \n 80% {\n box-shadow: 0 0 0 ").concat(c,"px ").concat(this.badge.animation.rippleColor,", 0 0 0 ").concat(this.badge.animation.rippleArea,"px ").concat(this.badge.animation.rippleColor,";\n }\n\n 100% {\n box-shadow: 0 0 0 0 ").concat(this.badge.animation.rippleColor,", 0 0 0 0 ").concat(this.badge.animation.rippleColor,";\n } \n }")}if("shine"===(null===(a=this.badge.animation)||void 0===a?void 0:a.type)){var d,p,u,h="",g=null===(d=this.badge.animation)||void 0===d||null===(d=d.lines[0])||void 0===d?void 0:d.width,f=null===(p=this.badge.animation)||void 0===p||null===(p=p.lines[1])||void 0===p?void 0:p.width,m=Math.max(g,f),_=this.badge.background.width+m,v=this.badge.animation.lines.length,b=0,y=this.badge.animation.shineColor;switch(b=1===v?this.badge.animation.lines[0].width:this.badge.animation.lines_gap+g+f,this.badge.animation.shineDirection){case"to_bottom_right":h="\n left:-".concat(_,"px;\n transform: skewx(-30deg)\n ");break;case"to_top_right":h="\n left:-".concat(_,"px;\n transform: skewx(30deg)\n ");break;case"to_top_left":h="\n right:-".concat(_,"px;\n transform: skewx(-30deg)\n ");break;case"to_bottom_left":h="\n right:-".concat(_,"px;\n transform: skewx(30deg)\n ")}if(0==this.badge.animation.intra_count)e="\n .apxor-badge-content-container-".concat(this.cssPostFix,"::before{\n content:'';\n position:absolute;\n background:transparent;\n width:").concat(b,"px;\n ").concat(1===v?"border-left: ".concat(g,"px solid ").concat(y,";"):"border-left: ".concat(g,"px solid ").concat(y,"; border-right: ").concat(f,"px solid ").concat(y,";"),"\n height:100%;\n z-index:").concat(this.contentZindexValue,";\n animation: badgeAnimation ").concat(this.badge.animation.duration_millis,"s infinite;\n ").concat(h,";\n }");else e="\n .apxor-badge-content-container-".concat(this.cssPostFix,"::before{\n content:'';\n position:absolute;\n background:transparent;\n width:").concat(b,"px;\n ").concat(1===v?"border-left: ".concat(g,"px solid ").concat(y,";"):"border-left: ".concat(g,"px solid ").concat(y,"; border-right: ").concat(f,"px solid ").concat(y,";"),"\n height:100%;\n animation: badgeAnimation ").concat(this.badge.animation.duration_millis,"s ").concat(null===(u=this.badge.animation)||void 0===u?void 0:u.intra_count,";\n ").concat(h,";\n }");t="to_bottom_right"===this.badge.animation.shineDirection||"to_top_right"===this.badge.animation.shineDirection?"@keyframes badgeAnimation {\n 0% {\n left:-30%;\n }\n 100% {\n left:130%;\n }\n }":"@keyframes badgeAnimation {\n 0% {\n right:-30%;\n }\n 100% {\n right:130%;\n }\n }"}}return"\n ".concat(e,"\n ").concat(t,"\n ")}},{key:"_getBadgeScrollStyles",value:function(){var e="";return this.badge.enable_auto_scroll&&("to_top"!==this.badge.auto_scroll.direction&&"to_bottom"!==this.badge.auto_scroll.direction||(e="\n #apxor-scroll-option".concat(this.cssPostFix,"{\n width: inherit;\n height: inherit;\n animation: scrollAnimation ").concat(this.badge.auto_scroll.duration_millis,"s linear infinite;\n }")),"to_left"!==this.badge.auto_scroll.direction&&"to_right"!==this.badge.auto_scroll.direction||(e="\n #apxor-scroll-option".concat(this.cssPostFix,"{\n width: inherit;\n height: inherit;\n animation: scrollText ").concat(this.badge.auto_scroll.duration_millis,"s linear infinite;\n }"))),e}},{key:"_getBadgeScrollKeyFrameStyles",value:function(e){var t,n,i,o,a,r,s,l="";(r=1,(null===(t=this.badge)||void 0===t?void 0:t.background.width)>this.contentWidth)?a="100%":(r=this.contentWidth/(null===(s=this.badge)||void 0===s||null===(s=s.background)||void 0===s?void 0:s.width),a="".concat(100*r,"%"));if(null!==(n=!this.badge.enable_auto_scroll)&&void 0!==n?!n:null!==(i=this.badge)&&void 0!==i&&i.enable_animation){switch(this.badge.auto_scroll.direction){case"to_bottom":l="\n @keyframes scrollAnimation {\n 0% {\n transform: translateY(-".concat(100*e,"%);\n }\n 100% {\n transform: translateY(100%);\n }\n }\n ");break;case"to_top":l="\n @keyframes scrollAnimation {\n 0% {\n transform: translateY(100%);\n }\n 100% {\n transform: translateY(-".concat(100*e,"%);\n }\n }\n ");break;case"to_left":l="\n @keyframes scrollText {\n from {\n transform: translate3d(100%, 0, 0);\n }\n to {\n transform: translate3d(-".concat(a,", 0, 0);\n }\n }\n ");break;case"to_right":l="\n @keyframes scrollText {\n from {\n transform: translate3d(-".concat(a,", 0, 0);\n }\n to {\n transform: translate3d(100%, 0, 0);\n }\n }\n ")}var c="\n ".concat(l,"\n ").replaceAll("\n","").replace(/[\s]{2,999}/g,""),d=document.createElement("style");d.innerHTML=c,null===(o=this.targetElement)||void 0===o||o.appendChild(d)}}},{key:"_setBadgeContent",value:function(){this.createBadgeContainer(),this.createBadgeContent(),this.animationStop()}},{key:"animationStop",value:function(){var e,t,n,i,o=".apxor-badge-container-styles-".concat(this.cssPostFix),a=document.querySelector(o),r=".apxor-badge-container-stylesdummy-".concat(this.cssPostFix),s=document.querySelector(r);"shake"===(null===(e=this.badge.animation)||void 0===e?void 0:e.type)&&0!=this.badge.animation.intra_count?a.addEventListener("animationend",this.shakeAnimationRepeatFunction):"fade"===(null===(t=this.badge.animation)||void 0===t?void 0:t.type)&&0!=this.badge.animation.intra_count?a.addEventListener("animationend",this.fadeAnimationRepeatFunction):"ripple"===(null===(n=this.badge.animation)||void 0===n?void 0:n.type)&&0!=this.badge.animation.intra_count?s.addEventListener("animationend",this.rippleAnimationRepeatFunction):"shine"===(null===(i=this.badge.animation)||void 0===i?void 0:i.type)&&0!=this.badge.animation.intra_count&&a.addEventListener("animationend",this.shineAnimationRepeatFunction)}},{key:"shakeAnimationRepeat",value:function(e,t){var n=this,i=".apxor-badge-container-styles-".concat(this.cssPostFix),o=document.querySelector(i);0!=e&&this.count===e&&o.removeEventListener("animationend",this.shakeAnimationRepeatFunction);setTimeout((function(){if(n.count<e){var t,i,o,a;o="\n .apxor-badge-container-styles-".concat(n.cssPostFix,"{\n animation: badgeAnimation").concat(n.count," ").concat(n.badge.animation.duration_millis,"s ").concat(null===(t=n.badge.animation)||void 0===t?void 0:t.intra_count,";\n }"),a="horizontal"===n.badge.animation.shakeDirection?"@keyframes badgeAnimation".concat(n.count," {\n 0% { transform: translateX(0) }\n 25% { transform: translateX(5px) }\n 50% { transform: translateX(0) }\n 75% { transform: translateX(-5px) }\n 100% {transform:translateX(0)}\n }"):"@keyframes badgeAnimation".concat(n.count," {\n 0% { transform: translateY(0) }\n 25% { transform: translateY(5px) }\n 50% { transform: translateY(0) }\n 75% { transform: translateY(-5px) }\n 100% { transform: translateY(0) }\n }");var r="\n ".concat(o,"\n ").concat(a,"\n ").replaceAll("\n","").replace(/[\s]{2,999}/g,""),s=document.createElement("style");s.innerHTML=r,null===(i=n.targetElement)||void 0===i||i.appendChild(s),0!=n.badge.animation.inter_count&&(n.count=n.count+1),n.animationStop()}else if(0==e){var l,c,d,p;d="\n .apxor-badge-container-styles-".concat(n.cssPostFix,"{\n animation: badgeAnimation").concat(n.c," ").concat(n.badge.animation.duration_millis,"s ").concat(null===(l=n.badge.animation)||void 0===l?void 0:l.intra_count,";\n }"),p="horizontal"===n.badge.animation.shakeDirection?"@keyframes badgeAnimation".concat(n.c," {\n 0% { transform: translateX(0) }\n 25% { transform: translateX(5px) }\n 50% { transform: translateX(0) }\n 75% { transform: translateX(-5px) }\n 100% {transform:translateX(0)}\n }"):"@keyframes badgeAnimation".concat(n.c," {\n 0% { transform: translateY(0) }\n 25% { transform: translateY(5px) }\n 50% { transform: translateY(0) }\n 75% { transform: translateY(-5px) }\n 100% { transform: translateY(0) }\n }");var u="\n ".concat(d,"\n ").concat(p,"\n ").replaceAll("\n","").replace(/[\s]{2,999}/g,""),h=document.createElement("style");h.innerHTML=u,null===(c=n.targetElement)||void 0===c||c.appendChild(h),n.animationStop(),n.c=n.c+1}}),t)}},{key:"fadeAnimationRepeat",value:function(e,t){var n=this,i=".apxor-badge-container-styles-".concat(this.cssPostFix),o=document.querySelector(i);0!=e&&this.count===e&&o.removeEventListener("animationend",this.fadeAnimationRepeatFunction);setTimeout((function(){if(n.count<e){var t,i,o,a;o="\n .apxor-badge-container-styles-".concat(n.cssPostFix,"{\n animation: badgeAnimation").concat(n.count," ").concat(n.badge.animation.duration_millis,"s ").concat(null===(t=n.badge.animation)||void 0===t?void 0:t.intra_count,";\n }"),a="\n @keyframes badgeAnimation".concat(n.count," {\n 0% { opacity:1;}\n 50% { opacity:").concat(n.badge.animation.fade_opacity/100,";}\n 100% { opacity:1}\n }");var r="\n ".concat(o,"\n ").concat(a,"\n ").replaceAll("\n","").replace(/[\s]{2,999}/g,""),s=document.createElement("style");s.innerHTML=r,null===(i=n.targetElement)||void 0===i||i.appendChild(s),0!=n.badge.animation.inter_count&&(n.count=n.count+1),n.animationStop()}else if(0==e){var l,c,d,p;d="\n .apxor-badge-container-styles-".concat(n.cssPostFix,"{\n animation: badgeAnimation").concat(n.c," ").concat(n.badge.animation.duration_millis,"s ").concat(null===(l=n.badge.animation)||void 0===l?void 0:l.intra_count,";\n }"),p="\n @keyframes badgeAnimation".concat(n.c," {\n 0% { opacity:1;}\n 50% { opacity:").concat(n.badge.animation.fade_opacity/100,";}\n 100% { opacity:1}\n }");var u="\n ".concat(d,"\n ").concat(p,"\n ").replaceAll("\n","").replace(/[\s]{2,999}/g,""),h=document.createElement("style");h.innerHTML=u,null===(c=n.targetElement)||void 0===c||c.appendChild(h),n.c=n.c+1,n.animationStop()}}),t)}},{key:"rippleAnimationRepeat",value:function(e,t){var n=this,i=".apxor-badge-container-stylesdummy-".concat(this.cssPostFix),o=document.querySelector(i);0!=e&&this.count===e&&o.removeEventListener("animationend",this.rippleAnimationRepeatFunction);setTimeout((function(){var t=n.badge.animation.rippleArea/2;if(n.count<e){var i,o,a,r;a="\n .apxor-badge-container-stylesdummy-".concat(n.cssPostFix,"{\n animation: badgeAnimation").concat(n.count," ").concat(n.badge.animation.duration_millis,"s ease-in-out;\n animation-iteration-count: ").concat(null===(i=n.badge.animation)||void 0===i?void 0:i.intra_count,";\n opacity:1;\n }"),r="\n @keyframes badgeAnimation".concat(n.count," {\n 0% {\n box-shadow: 0 0 0 0 ").concat(n.badge.animation.rippleColor,", 0 0 0 0 ").concat(n.badge.animation.rippleColor,";\n }\n \n 80% {\n box-shadow: 0 0 0 ").concat(t,"px ").concat(n.badge.animation.rippleColor,", 0 0 0 ").concat(n.badge.animation.rippleArea,"px ").concat(n.badge.animation.rippleColor,";\n }\n\n 100% {\n box-shadow: 0 0 0 0 ").concat(n.badge.animation.rippleColor,", 0 0 0 0 ").concat(n.badge.animation.rippleColor,";\n } \n }");var s="\n ".concat(a,"\n ").concat(r,"\n ").replaceAll("\n","").replace(/[\s]{2,999}/g,""),l=document.createElement("style");l.innerHTML=s,null===(o=n.targetElement)||void 0===o||o.appendChild(l),0!=n.badge.animation.inter_count&&(n.count=n.count+1),n.animationStop()}else if(0==e){var c,d,p,u;p="\n .apxor-badge-container-stylesdummy-".concat(n.cssPostFix,"{\n animation: badgeAnimation").concat(n.c," ").concat(n.badge.animation.duration_millis,"s ease-in-out;\n animation-iteration-count: ").concat(null===(c=n.badge.animation)||void 0===c?void 0:c.intra_count,";\n }"),u="\n @keyframes badgeAnimation".concat(n.c," {\n 0% {\n box-shadow: 0 0 0 0 ").concat(n.badge.animation.rippleColor,", 0 0 0 0 ").concat(n.badge.animation.rippleColor,";\n }\n \n 80% {\n box-shadow: 0 0 0 ").concat(t,"px ").concat(n.badge.animation.rippleColor,", 0 0 0 ").concat(n.badge.animation.rippleArea,"px ").concat(n.badge.animation.rippleColor,";\n }\n\n 100% {\n box-shadow: 0 0 0 0 ").concat(n.badge.animation.rippleColor,", 0 0 0 0 ").concat(n.badge.animation.rippleColor,";\n } \n }");var h="\n ".concat(p,"\n ").concat(u,"\n ").replaceAll("\n","").replace(/[\s]{2,999}/g,""),g=document.createElement("style");g.innerHTML=h,null===(d=n.targetElement)||void 0===d||d.appendChild(g),n.c=n.c+1,n.animationStop()}}),t)}},{key:"shineAnimationRepeat",value:function(e,t){var n,i,o=this,a=null===(n=this.badge.animation)||void 0===n||null===(n=n.lines[0])||void 0===n?void 0:n.width,r=null===(i=this.badge.animation)||void 0===i||null===(i=i.lines[1])||void 0===i?void 0:i.width,s=Math.max(a,r),l=this.badge.background.width+s,c=".apxor-badge-container-styles-".concat(this.cssPostFix),d=document.querySelector(c);0!=e&&this.count===e&&d.removeEventListener("animationend",this.shineAnimationRepeatFunction);setTimeout((function(){var t,n,i=o.badge.animation.lines.length,a=0,r=o.badge.animation.shineColor,s=null===(t=o.badge.animation)||void 0===t||null===(t=t.lines[0])||void 0===t?void 0:t.width,c=null===(n=o.badge.animation)||void 0===n||null===(n=n.lines[1])||void 0===n?void 0:n.width;if(a=1===i?o.badge.animation.lines[0].width:o.badge.animation.lines_gap+s+c,o.count<e){var d,p,u,h,g="";switch(o.badge.animation.shineDirection){case"to_bottom_right":g="\n left:-".concat(l,"px;\n transform: skewx(-30deg)\n ");break;case"to_top_right":g="\n left:-".concat(l,"pxx;\n transform: skewx(30deg)\n ");break;case"to_top_left":g="\n right:-".concat(l,"px;\n transform: skewx(-30deg)\n ");break;case"to_bottom_left":g="\n right:-".concat(l,"px;\n transform: skewx(30deg)\n ")}u="\n .apxor-badge-content-container-".concat(o.cssPostFix,"::before{\n content:'';\n position:absolute;\n background:transparent;\n background:transparent;\n z-index:").concat(o.contentZindexValue,";\n width:").concat(a,"px;\n ").concat(1===i?"border-left: ".concat(s,"px solid ").concat(r,";"):"border-left: ".concat(s,"px solid ").concat(r,"; border-right: ").concat(c,"px solid ").concat(r,";"),"\n height:100%;\n animation: badgeAnimation").concat(o.count," ").concat(o.badge.animation.duration_millis,"s ").concat(null===(d=o.badge.animation)||void 0===d?void 0:d.intra_count,";\n ").concat(g,";\n }"),h="to_bottom_right"===o.badge.animation.shineDirection||"to_top_right"===o.badge.animation.shineDirection?"@keyframes badgeAnimation".concat(o.count," {\n 0% {\n left:-30%;\n }\n 100% {\n left:130%;\n }\n }"):"@keyframes badgeAnimation".concat(o.count," {\n 0% {\n right:-30%;\n }\n 100% {\n right:130%;\n }\n }");var f="\n ".concat(u,"\n ").concat(h,"\n ").replaceAll("\n","").replace(/[\s]{2,999}/g,""),m=document.createElement("style");m.innerHTML=f,null===(p=o.targetElement)||void 0===p||p.appendChild(m),0!=o.badge.animation.inter_count&&(o.count=o.count+1),o.animationStop()}else if(0==e){var _,v,b,y,x="";switch(o.badge.animation.shineDirection){case"to_bottom_right":x="\n left:-".concat(l,"px;;\n transform: skewx(-30deg)\n ");break;case"to_top_right":x="\n left:-".concat(l,"px;;\n transform: skewx(30deg)\n ");break;case"to_top_left":x="\n right:-".concat(l,"px;;\n transform: skewx(-30deg)\n ");break;case"to_bottom_left":x="\n right:-".concat(l,"px;;\n transform: skewx(30deg)\n ")}b="\n .apxor-badge-content-container-".concat(o.cssPostFix,"::before{\n content:'';\n position:absolute;\n background:transparent;\n background:transparent;\n width:").concat(a,"px;\n ").concat(1===i?"border-left: ".concat(s,"px solid ").concat(r,";"):"border-left: ".concat(s,"px solid ").concat(r,"; border-right: ").concat(c,"px solid ").concat(r,";"),"\n height:100%;\n animation: badgeAnimation").concat(o.c," ").concat(o.badge.animation.duration_millis,"s ").concat(null===(_=o.badge.animation)||void 0===_?void 0:_.intra_count,";\n ").concat(x,";\n }"),y="to_bottom_right"===o.badge.animation.shineDirection||"to_top_right"===o.badge.animation.shineDirection?"@keyframes badgeAnimation".concat(o.c," {\n 0% {\n left:-30%;\n }\n 100% {\n left:130%;\n }\n }"):"@keyframes badgeAnimation".concat(o.c," {\n 0% {\n right:-30%;\n }\n 100% {\n right:130%;\n }\n }");var w="\n ".concat(b,"\n ").concat(y,"\n ").replaceAll("\n","").replace(/[\s]{2,999}/g,""),C=document.createElement("style");C.innerHTML=w,null===(v=o.targetElement)||void 0===v||v.appendChild(C),o.c=o.c+1,o.animationStop()}}),t)}},{key:"createBadgeContainer",value:function(){this.badgeContainer=document.createElement("div"),this.badgeDummyContainer=document.createElement("div"),this.badgeContainer.id="apxor-badge-container-".concat("-".concat(this.configId).replaceAll(" ","").replace(/[^\w\s]/gi,"")),this.badgeContainer.classList.add("apxor-badge-container"),this.badgeContainer.classList.add("apxor-badge-container-styles-".concat(this.cssPostFix)),this.badgeDummyContainer.classList.add("apxor-badge-container"),this.badgeDummyContainer.classList.add("apxor-badge-container-stylesdummy-".concat(this.cssPostFix)),this.badge.enable_background&&this.badge.background.enable_image&&this.badgeContainer.classList.add("apxor-badge-container-background-image".concat(this.cssPostFix)),this.targetElement.appendChild(this.badgeContainer),this.targetElement.appendChild(this.badgeDummyContainer)}},{key:"createBadgeContent",value:function(){var e,t=this;this.badgeContent=document.createElement("div"),this.badgeContent.classList.add("apxor-badge-content-container-".concat(this.cssPostFix)),null!==(e=this.badge)&&void 0!==e&&e.content&&0!==this.badge.content.length&&(this.badge.content.forEach((function(e,n){var i,o;if(t.badgeContentElement=document.createElement("div"),t.badgeContentElement.classList.add("apxor-badge-contentelement-".concat(n,"-").concat(t.cssPostFix)),t.badgeContentElement.setAttribute("id","apxor-scroll-option".concat(t.cssPostFix)),e.enable_icon&&null!==(i=e.icon)&&void 0!==i&&i.position&&"left"===e.icon.position){var a=document.createElement("div");a.classList.add("apxor-badge-".concat(n,"-icon-container").concat(t.cssPostFix));var r=document.createElement("div");r.classList.add("apxor-badge-".concat(n,"-icon-content").concat(t.cssPostFix)),a.appendChild(r),t.iconElementdummy=a,t.badgeContentElement.appendChild(a)}if(e.enable_label){resolveDynamicText(e.label);var s=document.createElement("div");s.classList.add("apxor-badge-".concat(n,"-label-content-").concat(t.cssPostFix)),s.appendChild(createNewTextElement(e.label,t.configId,"label-content-".concat(n))),t.labelElementDummy=s,t.badgeContentElement.appendChild(s)}if(e.enable_icon&&null!==(o=e.icon)&&void 0!==o&&o.position&&"right"===e.icon.position){var l=document.createElement("div");l.classList.add("apxor-badge-".concat(n,"-icon-container").concat(t.cssPostFix));var c=document.createElement("div");c.classList.add("apxor-badge-".concat(n,"-icon-content").concat(t.cssPostFix)),l.appendChild(c),t.iconElementdummy=l,t.badgeContentElement.appendChild(l)}!0!==t.badge.enable_auto_scroll||0!=n||"to_left"!==t.badge.auto_scroll.direction&&"to_right"!==t.badge.auto_scroll.direction?!0===t.badge.enable_auto_scroll&&0===n?t.badgeContent.appendChild(t.badgeContentElement):!0!==t.badge.enable_auto_scroll||"to_top"!==t.badge.auto_scroll.direction&&"to_bottom"!==t.badge.auto_scroll.direction?!1===t.badge.enable_auto_scroll&&t.badgeContent.appendChild(t.badgeContentElement):t.badgeContent.appendChild(t.badgeContentElement):t.badgeContent.appendChild(t.badgeContentElement)})),this.badgeContainer.appendChild(this.badgeContent),this.badge.content[0].enable_label&&(this.contentLabelWidth=this.labelElementDummy.getBoundingClientRect().width),this.badge.content[0].enable_icon&&(this.contentIconWidth=this.iconElementdummy.getBoundingClientRect().width),this.contentWidth=this.contentLabelWidth+this.contentIconWidth,this._getBadgeScrollKeyFrameStyles(this.badge.content.length));var n=document.querySelector(".apxor-badge-contentelement-0-".concat(this.cssPostFix));this.badge.background.width>this.contentWidth?n.style.justifyContent="center":n.style.justifyContent="left"}},{key:"_setOnClickTerminationForBadges",value:function(){var e,t,n=this,i=this.rtmInstance.getCampaignMeta(this.configId),o=(null==i?void 0:i._attr)||{};if(null!==(e=this.terminationConfig)&&void 0!==e&&e.enable_touch&&0!==Object(this.terminationConfig.touch).length&&null!==(t=this.terminationConfig.touch)&&void 0!==t&&t.target_view){this.targetElement.addEventListener("click",(function e(){for(var t=document.getElementsByClassName("apxor-badge-container-styles-".concat(n.cssPostFix));t.length>0;)t[0].remove();n.targetClicked=!0,Apxor.logEvent("inline_dismissed",_objectSpread2$1({id:n.configId,message_name:n.name,apx_reason:"InlineTargetViewClicked"},o),!1,"apxor","campaign"),n._controller.persistTerminationInfoLocally(n.configId),n.targetElement.removeEventListener("click",e)}))}}},{key:"_setAutoTerminateForBadges",value:function(){var e,t=this,n=this.rtmInstance.getCampaignMeta(this.configId),i=(null==n?void 0:n._attr)||{};null!==(e=this.terminationConfig)&&void 0!==e&&e.enable_time_based&&"duration"===this.terminationConfig.time_based.type&&window.setTimeout((function(){for(var e=document.getElementsByClassName("apxor-badge-container-styles-".concat(t.cssPostFix));e.length>0;)e[0].remove();Apxor.logEvent("inline_dismissed",_objectSpread2$1({id:t.configId,message_name:t.name,apx_reason:"DurationFinished"},i),!1,"apxor","campaign"),t._controller.persistTerminationInfoLocally(t.configId)}),this.terminationConfig.time_based.duration_seconds)}}]),e}(),DOMNodePathStep=function(e,t){this.value=e,this.optimized=t||!1};DOMNodePathStep.prototype={toString:function(){return this.value}};var BackgroundOffset=_createClass$1((function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};_classCallCheck$1(this,e),this.top=null==t?void 0:t.top,this.bottom=null==t?void 0:t.bottom,this.left=null==t?void 0:t.left,this.right=null==t?void 0:t.right})),OffsetXY=_createClass$1((function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};_classCallCheck$1(this,e),this.x=getNumberOrDefault(null==t?void 0:t.x,0),this.y=getNumberOrDefault(null==t?void 0:t.y,0)})),Background=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};_classCallCheck$1(this,e),this.background_color=getColorOrDefault(null==t?void 0:t.color,"#FFF").toLowerCase(),this.opacity=t.opacity,this.shape=getStringOrDefault(null==t?void 0:t.shape,"rectangle").toLowerCase(),this.offset=new OffsetXY(t.offset),this.delta_circle=null==t?void 0:t.delta_circle,this.delta_rect=new BackgroundOffset(null==t?void 0:t.delta_rect)}return _createClass$1(e,null,[{key:"isEnabled",value:function(e){return!(isUndefined$2(e)||isNull$1(e)||isEmptyObject(e))}}]),e}(),CoachmarkButtons=_createClass$1((function e(){var t=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};_classCallCheck$1(this,e),this.direction=convertTheDirectionCode(n.direction),this.alignment=convertThePositionCode(n.alignment),this.buttonArray=[];var i=getArrayOrDefault(n.list,[]);i.forEach((function(e){t.buttonArray.push(new Button(e))}))})),Content=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};_classCallCheck$1(this,e),this.height=t.height,this.width=t.width,this.position=t.position,this.enable_title=t.enable_title,this.enable_title&&(this.title=new Title(t.title)),this.enable_description=t.enable_description,this.enable_description&&(this.description=new Description(t.description)),this.enable_buttons=t.enable_buttons,this.enable_buttons&&(this.buttons=new CoachmarkButtons(null==t?void 0:t.buttons)),this.enable_margin=t.enable_margin,this.enable_margin&&(this.margin=new Margin(t.margin)),this.enable_offset=t.enable_offset,this.enable_offset&&(this.offset=t.offset)}return _createClass$1(e,null,[{key:"isEnabled",value:function(e){return!(isUndefined$2(e)||isNull$1(e)||isEmptyObject(e))}}]),e}(),Highlighter=_createClass$1((function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};_classCallCheck$1(this,e),this.enable_border=null==t?void 0:t.enable_border,this.border=new Border(null==t?void 0:t.border),this.shape=null==t?void 0:t.shape,this.delta_circle=null==t?void 0:t.delta_circle,this.delta_rect=new BackgroundOffset(null==t?void 0:t.delta_rect),this.opacity=null==t?void 0:t.opacity})),Ripple=_createClass$1((function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};_classCallCheck$1(this,e),this.ripple_type=t.ripple_type,this.duration=null==t?void 0:t.duration,this.width=null==t?void 0:t.width,this.opacity=null==t?void 0:t.opacity,this.color=null==t?void 0:t.color})),DEFAULT_PADDING=5,Logger$1=window.ApxorLogger,InLineCoachMark=function(){function e(t,n,i,o,a,r,s,l,c){var d,p,u=arguments.length>9&&void 0!==arguments[9]&&arguments[9],h=arguments.length>10&&void 0!==arguments[10]?arguments[10]:0;_classCallCheck$1(this,e),this.uiConfig=t,this.uis=n,this.isWalkthrough=u,this.index=h,this.walkthroughConfigs=i,this.messageConfig=a,this.rtmInstance=r,this.currentId=makeid(10),this.terminationTimeoutId=null,this.configId=a.configId,this.name=a.configName,this.cssPostFix="-".concat(this.configId,"-").concat(this.name).replaceAll(" ","").replace(/[^\w\s]/gi,""),this.showCallback=s,this.closeCallback=l,this.stepperCallBack=c,this.targetDeletionObserver=null,this.viewPortObservor=null,this.coachmarkShown=!1,this.terminationConfig=o,this.delay=t.delay,this.scrollToView=t.scrollToView||!0,this.dismiss_outside_touch=t.dismiss_outside_touch,this.content=new Content(t.content),this.target=new Target(t.target),this.enable_dimbackground=t.enable_dimbackground,this.background=new Background(t.outer_highlighter),this.dimbackground=new DimBackground(t.dimbackground),this.enable_ripple=t.enable_ripple,this.ripple=new Ripple(t.ripple),this.highlighter=new Highlighter(t.inner_highlighter),this.enable_image=null==t?void 0:t.enable_image,this.enable_image&&(this.image=null==t?void 0:t.image),this.enable_arrow=null==t?void 0:t.enable_arrow,this.enable_arrow&&(this.arrow=null==t?void 0:t.arrow),this.content_enable_buttons=null===(d=t.content)||void 0===d?void 0:d.enable_buttons,this.content_enable_buttons&&(this.buttons=new CoachmarkButtons(null===(p=t.content)||void 0===p?void 0:p.coachmark_buttons)),this.targetElement=null,this.inline_width="auto",this.inline_height="auto",this.media_width="auto",this.media_height="auto",this.media_container_height=0,this.targetElement=null,this.inLineContainer=null,this.imageAndContentContainerLeft=null,this.imageAndContentContainerRight=null,this.textContainer=null,this.dimBackgroundElement=null,this.max_width=350,this.currentId=makeid(10),this.coachmark=null,this.svgElement=null,this.transparentCircleElement=null,this.textElement=null,this.arrowMediaContainer=null,this.imgElement=null,this.arrowElement=null,this.rippleElement=null,this.imageoffsetX=0,this.imageoffsetY=0,this.dismissCallback=null}return _createClass$1(e,[{key:"createNewCoachMark",value:function(){var e=this;try{if(this._canCreateCoachMark()){var t=function(){e._canCreateCoachMark()&&(e.rtmInstance.currentAction=e,e._setInlineStyles(),e._setObservors(),e._createOuterCircle(e.targetElement))};this._setTheTarget((function(){e._scrollIntoTargetIfNeeded(t)}))}}catch(e){this._resetRTMAction(),console.log(e)}}},{key:"_canCreateCoachMark",value:function(){return null!==this.rtmInstance.currentAction&&void 0!==this.rtmInstance.currentAction||this.rtmInstance.isShowingAction?(Logger$1.info("An nudge is being shown. Can not show a coachmark now"),!1):checkForNeverShow$1(this.configId)}},{key:"_setTheTarget",value:function(e){var t=this;this._findTargetElement((function(){var n;t._isElementVisible()?(t._targetClickCallback=t._targetClickCallback.bind(t),t.targetElement.addEventListener("click",t._targetClickCallback),e()):(Logger$1.info("Invalid target element. Width and height are 0 for element: ".concat(null===(n=t.target)||void 0===n?void 0:n.id,". Can't show coachmark")),t._resetRTMAction())}))}},{key:"_isElementVisible",value:function(){try{var e=this.targetElement.getBoundingClientRect();if(0===e.width||0===e.height)return!1}catch(e){return!1}return!0}},{key:"_findTargetElement",value:function(e){var t,n,i,o;(this.targetElement=getElementFromSelector(null===(t=this.target)||void 0===t?void 0:t.id,null===(n=this.target)||void 0===n?void 0:n.frame_id,this.target.is_text_based,this.target.avf_text_config),this.targetElement)?e():null!==(i=this.target)&&void 0!==i&&i.enable_retry?(Logger$1.info("Not found yet. Rechecking the DOM."),this._retryFindingTargetElement(e)):(Logger$1.info("Element with selector:".concat(null===(o=this.target)||void 0===o?void 0:o.id," not found.")),this._resetRTMAction())}},{key:"_retryFindingTargetElement",value:function(e){var t,n=this,i=setInterval((function(){var t,o,a,r,s;(n.targetElement=getElementFromSelector(null===(t=n.target)||void 0===t?void 0:t.id,null===(o=n.target)||void 0===o?void 0:o.frame_id,n.target.is_text_based,n.target.avf_text_config),n.targetElement)?(clearInterval(i),e(n.targetElement)):(n.target.retry.max_retries=(null===(a=n.target)||void 0===a?void 0:a.retry.max_retries)-1,(null===(r=n.target)||void 0===r?void 0:r.retry.max_retries)<=0&&(clearInterval(i),console.warn("Element with selector:".concat(null===(s=n.target)||void 0===s?void 0:s.id," not found.")),n._resetRTMAction()))}),null===(t=this.target)||void 0===t?void 0:t.retry.interval)}},{key:"_targetClickCallback",value:function(){this.rtmInstance.logActionEvent("InlineTargetViewClicked",this.configId,this.name),this.enable_dismiss_actions&&this.dismiss_actions.target_touch&&this._destroyCoachMark()}},{key:"_scrollIntoTargetIfNeeded",value:function(e){var t=this,n=!1,i=!1;if(isElementInViewport(this.targetElement))this.scrollToView&&isElementCompletlyInView(this.targetElement),n=!0;else if(this.scrollToView){var o={behavior:SCROLL_BEHAVIOUR.SMOOTH,block:CENTER,inline:CENTER};this._canCreateCoachMark()&&this.targetElement.scrollIntoView(o),window.setTimeout((function(){isElementCovered(t.targetElement)?window.setTimeout((function(){isElementCovered(t.targetElement)?(console.info("The coachmark is not visible because another element is overlapping the target element."),t._resetRTMAction()):e()}),1e3):e()}),1e3),i=!0,n=!0}else Logger$1.info("If needed change the config to scroll to the target element."),this._resetRTMAction();n&&!i&&(isElementCovered(this.targetElement)?(console.info("The coachmark is not visible because another element is overlapping the target element."),this._resetRTMAction()):e())}},{key:"_resetRTMAction",value:function(){this.rtmInstance.currentAction=null,this.rtmInstance.isShowingAction=!1,Logger$1.info("RTM coachmark action stopped.")}},{key:"_destroyCoachMark",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];try{var t,n,i,o,a,r;null===(t=this.targetDeletionObserver)||void 0===t||t.disconnect(),this.targetDeletionObserver=null,null===(n=this.viewPortObservor)||void 0===n||n.disconnect(),this.viewPortObservor=null,null===(i=this.coachmark)||void 0===i||i.destroy(),this.svgElement.parentNode.removeChild(this.svgElement),this.textElement.parentNode.removeChild(this.textElement),this.rippleElement.parentNode.removeChild(this.rippleElement),null===(o=this.imgElement)||void 0===o||o.remove(),null===(a=this.arrowElement)||void 0===a||a.remove(),null===(r=this.dimBackgroundElement)||void 0===r||r.remove(),this._removeStyles(),this.targetElement.removeAttribute("apx-inline-dimbackground"),clearTimeout(this.terminationTimeoutId),this.targetElement.removeEventListener("click",this._targetClickCallback),document.body.removeEventListener("click",this.dismissCallback),this.transparentCircleElement.removeEventListener("click",this.dismissCallback)}catch(e){Logger$1.info("Destroying the coachmark:"+e)}this.closeCallback(e)}},{key:"_removeStyles",value:function(){try{var e=document.querySelector("style[apx-coachmark-styles]");e&&e.remove()}catch(e){Logger$1.error("Could not remove the coachmark styles:"+e)}}},{key:"_highlightInlineTarget",value:function(){if(this.coachmarkShown=!0,this.enable_dimbackground&&("circle"===this.highlighter.shape?this.dimBackgroundElement=createMask(this.rippleElement,{},!0,!0):"rectangle"===this.highlighter.shape&&(this.dimBackgroundElement=createMask(this.rippleElement,{},!1,!0)),document.body.appendChild(this.dimBackgroundElement),this.enable_dismiss_actions&&this.dismiss_actions.target_touch)){var e=this.dimBackgroundElement.querySelector("#tippyModalMaskOpening");this._targetClickCallback=this._targetClickCallback.bind(this),e.addEventListener("click",this._targetClickCallback)}}},{key:"_createInnerCircle",value:function(e,t,n,i,o,a,r,s,l,c,d,p,u,h,g,f){var m,_,v=Math.sqrt(Math.pow(e,2)+Math.pow(t,2)),b=v+c,y=v,x=n-(v-e)/2,w=i-(v-t)/2;if("circle"!=(o=this.highlighter.shape)&&(m=v=e+u+h,_=y=t+d+p,x=n-u,w=i-d),this.rippleElement=document.createElement("div"),this.rippleElement.setAttribute("id",this.configId+"-ripple-div"),this.enable_ripple&&("outward"===this.ripple.ripple_type?this.rippleElement.innerHTML="circle"===o?this._addRippleStylesOutward(o,b,b,g,f,this.ripple.color,this.ripple.opacity):this._addRippleStylesOutward(o,m,_,g,f,this.ripple.color,this.ripple.opacity):"inward"===this.ripple.ripple_type&&(this.rippleElement.innerHTML="circle"===o?this._addRippleStylesInward(o,b,b,g,f,this.ripple.color,this.ripple.opacity):this._addRippleStylesInward(o,m,_,g,f,this.ripple.color,this.ripple.opacity))),this.rippleElement.style.position="absolute","circle"===o){b+=2*r;var C=c/2;x=x-C-r,w=w-C-r,this.rippleElement.style.width="".concat(b,"px"),this.rippleElement.style.height="".concat(b,"px"),this.rippleElement.style.left="".concat(x,"px"),this.rippleElement.style.top="".concat(w,"px")}else{x-=r,w-=r;var E=v+2*r,k=y+2*r;this.rippleElement.style.width="".concat(E,"px"),this.rippleElement.style.height="".concat(k,"px"),this.rippleElement.style.left="".concat(x,"px"),this.rippleElement.style.top="".concat(w,"px")}return this.rippleElement.classList.add("ripple-animator"),this.rippleElement.style.borderRadius="".concat("circle"===this.highlighter.shape?"50%":"".concat(l,"px")),this.rippleElement.style.visibility="visible",this.rippleElement.style.zIndex=99999,this.rippleElement.style.color="".concat(this.ripple.color),this.highlighter.enable_border&&(this.rippleElement.style.borderColor="".concat(a),this.rippleElement.style.borderWidth="".concat(r,"px"),this.rippleElement.style.borderStyle="".concat(s)),document.body.appendChild(this.rippleElement),this.rippleElement}},{key:"_getDocumentOffsetPosition",value:function(e){var t=e.getBoundingClientRect(),n=t.left+window.scrollX,i=t.top+window.scrollY;return{left:n,top:i,right:t.right+window.scrollX,bottom:t.bottom+window.scrollY,x:isDefined$1(t.x)?t.x+window.scrollX:n,y:isDefined$1(t.y)?t.y+window.scrollY:i,width:t.width,height:t.height}}},{key:"_addRippleStylesInward",value:function(e,t,n,i,o,a,r){var s=i/2;return o/=1e3,"\n<style>\n.ripple-animator {\n border: none;\n outline: none;\n width: 150px;\n height: 150px;\n display: block;\n color: ".concat(a,";\n opacity:").concat(r,";\n display: grid;\n place-items: center;\n font-size: 18px;\n cursor: pointer;\n overflow:hidden;\n\n animation-name: rippleinward;\n animation-duration: ").concat(o,"s;\n animation-iteration-count: infinite;\n}\n\n@keyframes rippleinward {\n 0% {\n \n box-shadow: 0 0 0 ").concat(s,"px #fff0;\n}\n\n100% {\n box-shadow: 0 0 0 0 ").concat(a,";\n opacity:").concat(r,";\n}\n}\n\n</style>")}},{key:"_addRippleStylesOutward",value:function(e,t,n,i,o,a,r){var s=i/2;return o/=1e3,"\n<style>\n.ripple-animator {\n border: none;\n outline: none;\n width: 150px;\n height: 150px;\n display: block;\n color: ".concat(a,";\n opacity:").concat(r,";\n display: grid;\n place-items: center;\n font-size: 18px;\n cursor: pointer;\n overflow:auto;\n\n animation-name: ripple;\n animation-duration: ").concat(o,"s;\n animation-iteration-count: infinite;\n}\n\n\n@keyframes ripple {\n 0% {\n box-shadow: 0 0 0 0 ").concat(a,";\n opacity:").concat(r,";\n }\n\n 100% {\n box-shadow: 0 0 0 ").concat(s,"px #fff0;\n }\n}\n</style>")}},{key:"_setInlineStyles",value:function(){if(!document.querySelector("style[apx-coachmark-styles]")){var e=" \n ".concat(this._getBackgroundContainerStyles()," \n ").concat(this._getInLineContainerStyles()," \n ").concat(this._getInLineMediaContainerStyles(),"\n ").concat(this._getInLineArrowContainerStyles(),"\n ").concat(this._getInLineNonMediaContainerStyles(),"\n ").concat(this._getTextConatinerStyles(),"\n ").concat(this._getTitleStyles()," \n ").concat(this._getDescriptionStyles()," \n ").concat(this._getImageStyles()," \n ").concat(this._getArrowStyles(),"\n ").replaceAll("\n","").replace(/[\s]{2,999}/g,""),t=document.createElement("style");t.setAttribute("apx-coachmark-styles",""),t.innerHTML=e,document.head.appendChild(t)}}},{key:"_getBackgroundContainerStyles",value:function(){var e,t,n="";this.enable_dimbackground&&(n='\n #tippyModalOverlayContainer {\n -ms-filter: "progid:dximagetransform.microsoft.gradient.alpha(Opacity=50)";\n filter: alpha(opacity=50);height: 100vh;left: 0;opacity: '.concat(null!==(e=this.dimbackground.opacity)&&void 0!==e?e:.5,";position: fixed;\n top: 0;transition: all .3s ease-out;width: 100vw;z-index: 9999;fill: ").concat(null!==(t=this.dimbackground.color)&&void 0!==t?t:"transparent","\n }\n #tippyModalOverlayContainer #tippyModalMask, #tippyModalOverlayContainer #tippyModalMaskRect {\n height: 100vh;width: 100vw\n }\n \n "));return n}},{key:"_getInLineContainerStyles",value:function(){return"\n .apx-inline-container".concat(this.cssPostFix," {\n height:auto;\n width:auto;\n\n z-index:999999;\n opacity:1;\n transition:all .5s cubic-bezier(.96,.23,.07,.8);\n position:absolute;\n visibility:visible;\n }\n\n .apx-inline-container").concat(this.cssPostFix,".open{\n opacity:1;\n visibility:visible;\n }\n ")}},{key:"_getInLineNonMediaContainerStyles",value:function(){return"\n .apx-inline-nonmedia-container".concat(this.cssPostFix,"{\n width:100%;\n max-width:").concat(this.max_width,";\n display:flex;\n flex-direction:column;\n justify-content:center;\n align-items:stretch;\n ").concat("","\n }\n ")}},{key:"_getInLineMediaContainerStyles",value:function(){return"\n .apx-inline-imagemedia-container".concat(this.cssPostFix,"{\n position:absolute;\n ").concat(this.enable_image||this.enable_video?"display:flex;":"","\n }")}},{key:"_getInLineArrowContainerStyles",value:function(){return"\n .apx-inline-arrowmedia-container".concat(this.cssPostFix,"{\n position:absolute;\n ").concat(this.enable_arrow?"display:flex;":"","\n }")}},{key:"_getTextConatinerStyles",value:function(){return"\n .apx-inline-text-container".concat(this.cssPostFix,"{\n width:100%;\n display:flex;\n flex-direction:column;\n justify-content: center;\n overflow: hidden;\n }\n ")}},{key:"_getTitleStyles",value:function(){if(!this.content.enable_title)return"";var e="";this.content.title.enable_margin&&(e=" \n margin-top:".concat(this.content.title.margin.top,"px;\n margin-bottom:").concat(this.content.title.margin.bottom,"px;\n margin-left:").concat(this.content.title.margin.left,"px;\n margin-right:").concat(this.content.title.margin.right,"px;\n "));var t="";this.content.title.enable_padding&&(t=" \n padding-top:".concat(this.content.title.padding.top,"px;\n padding-bottom:").concat(this.content.title.padding.bottom,"px;\n padding-left:").concat(this.content.title.padding.left,"px;\n padding-right:").concat(this.content.title.padding.right,"px;\n "));var n;return n=" \n font-family:".concat(this.content.title.font.family,";\n font-size:").concat(this.content.title.font.size,"px;\n font-style:").concat(this.content.title.font.style,";\n font-weight:").concat(this.content.title.font.weight,";\n "),"\n .apx-inline-title-div".concat(this.cssPostFix," {\n width:100%;\n display:flex;\n background-color:").concat(this.content.title.background_color,"\n justify-content:").concat(this.content.title.alignment,";\n text-align:").concat(this.content.title.alignment,";\n ").concat(n,"\n ").concat(e,"\n ").concat(t,"\n }\n ")}},{key:"_getDescriptionStyles",value:function(){if(!this.content.enable_description)return"";var e="";this.content.description.enable_margin&&(e=" \n margin-top:".concat(this.content.description.margin.top,"px;\n margin-bottom:").concat(this.content.description.margin.bottom,"px;\n margin-left:").concat(this.content.description.margin.left,"px;\n margin-right:").concat(this.content.description.margin.right,"px;\n "));var t="";this.content.description.enable_padding&&(t=" \n padding-top:".concat(this.content.description.padding.top,"px;\n padding-bottom:").concat(this.content.description.padding.bottom,"px;\n padding-left:").concat(this.content.description.padding.left,"px;\n padding-right:").concat(this.content.description.padding.right,"px;\n "));var n;return n=" \n font-family:".concat(this.content.description.font.family,";\n font-size:").concat(this.content.description.font.size,"px;\n font-style:").concat(this.content.description.font.style,";\n font-weight:").concat(this.content.description.font.weight,";\n "),"\n .apx-inline-description".concat(this.cssPostFix," {\n width:100%;\n justify-content:").concat(this.content.description.alignment,";\n text-align:").concat(this.content.description.alignment,";\n ").concat(n,"\n ").concat(e,"\n ").concat(t,"\n }\n ")}},{key:"_getImageStyles",value:function(){var e="";if(this.enable_image){var t,n,i,o,a,r,s,l,c,d,p,u,h="";if(null!==(t=this.image)&&void 0!==t&&t.enable_border)h="\n border-radius:".concat(null===(o=this.image)||void 0===o?void 0:o.border.radius,"%;\n border:").concat(null===(a=this.image)||void 0===a?void 0:a.border.width,"px ").concat(null===(r=this.image)||void 0===r?void 0:r.border.style," ").concat(null===(s=this.image)||void 0===s?void 0:s.border.color,";\n ");if(null!==(n=this.image)&&void 0!==n&&n.aspect_ratio)l=(null===(c=this.image)||void 0===c?void 0:c.width)*((null===(d=this.image)||void 0===d||null===(d=d.aspect_ratio)||void 0===d?void 0:d.height)/(null===(p=this.image)||void 0===p?void 0:p.aspect_ratio.width));else l=null===(u=this.image)||void 0===u?void 0:u.height;e="\n .apx-inline-image".concat(this.cssPostFix,"{\n height: ").concat(l,"px;\n width: ").concat(null===(i=this.image)||void 0===i?void 0:i.width,"px;\n ").concat(h,"\n }\n ")}return e}},{key:"_getArrowStyles",value:function(){var e="";if(this.enable_arrow){var t,n,i,o,a,r,s,l,c,d,p,u,h,g="";if(null!==(t=this.arrow)&&void 0!==t&&t.enable_border)g="\n border-radius:".concat(null===(a=this.arrow)||void 0===a?void 0:a.border.radius,"%;\n border:").concat(null===(r=this.arrow)||void 0===r?void 0:r.border.width,"px ").concat(null===(s=this.arrow)||void 0===s?void 0:s.border.style," ").concat(null===(l=this.arrow)||void 0===l?void 0:l.border.color,";\n ");if(null!==(n=this.arrow)&&void 0!==n&&n.aspect_ratio)c=(null===(d=this.arrow)||void 0===d?void 0:d.width)*((null===(p=this.arrow)||void 0===p||null===(p=p.aspect_ratio)||void 0===p?void 0:p.height)/(null===(u=this.arrow)||void 0===u?void 0:u.aspect_ratio.width));else c=null===(h=this.arrow)||void 0===h?void 0:h.height;e="\n .apx-inline-arrow".concat(this.cssPostFix,"{\n height: ").concat(c,"px;\n width: ").concat(null===(i=this.arrow)||void 0===i?void 0:i.width,"px;\n transform:rotate(").concat(null===(o=this.arrow)||void 0===o?void 0:o.angle,"deg);\n ").concat(g,"\n }\n ")}return e}},{key:"_setInLineContent",value:function(){return this._createInLineContainer(),this._createNonMediaContainer(),this._setTextContainer(),this._setTitleContent(),this._setDescriptionContent(),this._createButtonContainer(),this._setButtons(),this.enable_image&&this._createImageMediaContainer(),this.enable_arrow&&this._createArrowMediaContainer(),this.inLineContainer}},{key:"_createInLineContainer",value:function(){this.inLineContainer=document.createElement("div"),this.inLineContainer.classList.add("apx-inline-container".concat(this.cssPostFix)),this.inLineContainer.style.position="absolute",document.body.appendChild(this.inLineContainer)}},{key:"_createNonMediaContainer",value:function(){this.nonMediaContainer=document.createElement("div"),this.nonMediaContainer.classList.add("apx-inline-nonmedia-container".concat(this.cssPostFix)),this.inLineContainer.appendChild(this.nonMediaContainer)}},{key:"_setTextContainer",value:function(){this.textContainer=document.createElement("div"),this.textContainer.classList.add("apx-inline-text-container".concat(this.cssPostFix)),this.nonMediaContainer.appendChild(this.textContainer)}},{key:"_setTitleContent",value:function(){if(this.content.enable_title){resolveDynamicText(this.content.title);var e=document.createElement("div");e.classList.add("apx-inline-title-div".concat(this.cssPostFix)),e.appendChild(createNewTextElement(this.content.title,this.currentId,"title")),this.textContainer.appendChild(e)}}},{key:"_setDescriptionContent",value:function(){this.content.enable_description&&(resolveDynamicText(this.content.description),this.textElement=document.createElement("div"),this.textElement.classList.add("apx-inline-description".concat(this.cssPostFix)),this.textElement.appendChild(createNewTextElement(this.content.description,this.currentId,"description")),this.textContainer.appendChild(this.textElement))}},{key:"_createButtonContainer",value:function(){this.buttonContainer=document.createElement("div"),this.buttonContainer.classList.add("apx-inline-button-container".concat(this.cssPostFix)),this.nonMediaContainer.appendChild(this.buttonContainer)}},{key:"_setButtons",value:function(){var e=this;if(this.content_enable_buttons){var t=function(t){e._destroyCoachMark(t)},n={next:function(n,i){t(!1),e.stepperCallBack(n,i)},prev:function(n,i){t(!1),e.stepperCallBack(n,i)},complete:t,cancel:t,_isCancelled:!1,action:""},i={};i=this.buttons.buttonArray;for(var o=this.buttons.alignment,a=0;a<i.length;a++)"L"===o||"left"===o?(i[0].slot="1",2===i.length&&(i[1].slot="2")):"C"===o||"center"===o?(i[0].slot="2",2===i.length&&(i[1].slot="3")):"R"!==o&&"right"!==o||(i[0].slot="4",2===i.length&&(i[1].slot="5"));var r=generateButtonsBlock(this.configId,this.name,{},EVENT_PREFIX.INLINE,i,this.buttons.direction,this.buttons.alignment,"bottom",n,this.isWalkthrough,this.uis,this.index,"coachmark");this.buttonContainer.appendChild(r)}}},{key:"_createImageMediaContainer",value:function(){this.mediaContainer=document.createElement("div"),this.mediaContainer.classList.add("apx-inline-imagemedia-container".concat(this.cssPostFix)),this.mediaContainer.style.position="relative",document.body.appendChild(this.mediaContainer)}},{key:"_createArrowMediaContainer",value:function(){this.arrowMediaContainer=document.createElement("div"),this.arrowMediaContainer.classList.add("apx-inline-arrowmedia-container".concat(this.cssPostFix)),this.arrowMediaContainer.style.position="relative",document.body.appendChild(this.arrowMediaContainer)}},{key:"_setImageOptions",value:function(){if(this.enable_image){var e,t=document.createElement("img");return t.src=null===(e=this.image)||void 0===e?void 0:e.path,t.classList.add("apx-inline-image".concat(this.cssPostFix)),this.mediaContainer.appendChild(t),this.mediaContainer}}},{key:"_setArrowOptions",value:function(){if(this.enable_arrow){var e,t=document.createElement("img");return t.src=null===(e=this.arrow)||void 0===e?void 0:e.path,t.classList.add("apx-inline-arrow".concat(this.cssPostFix)),this.arrowMediaContainer.appendChild(t),this.arrowMediaContainer}}},{key:"_getSVG",value:function(e,t){return'\n <svg\n height="'.concat(document.scrollingElement.scrollHeight,'" \n width="').concat(document.scrollingElement.scrollWidth,'"\n class="apx-fade-in">\n <defs>\n <mask\n id="apx-mask"\n x="0"\n y="0"\n height="').concat(document.scrollingElement.scrollHeight,'" \n width="').concat(document.scrollingElement.scrollWidth,'">\n ').concat(e,"\n </mask>\n </defs>\n ").concat(t,"\n </svg>\n ")}},{key:"_getCircleSVG",value:function(e){var t=e.backgroundd_color,n=e.opacityy,i=e.innerRadius,o=e.innerCenterX,a=e.innerCenterY,r=e.outerRadius,s=e.outerCircleCenterX,l=e.outerCircleCenterY;e.delta_circle,e.background_delta_circle;var c=e.outer_x,d=e.outer_y,p=e.targetElementLeft,u=e.targetElementTop,h=e.targetElementWidth,g=e.targetElementHeight,f=e.innerrect_left,m=e.innerrect_right,_=e.innerrect_x,v=e.innerrect_y;s+=c,l+=d;var b=2*r;"rectangle"===this.highlighter.shape?(h=h+f+m,g=g+_+v,p-=f,u-=_,this.maskChild='\n <rect\n x="0" y="0"\n height="'.concat(document.scrollingElement.scrollHeight,'" \n width="').concat(document.scrollingElement.scrollWidth,'" \n fill="#fff" />\n <rect\n x="').concat(p,'" \n y="').concat(u,'" \n width="').concat(h,'" \n height="').concat(g,'" />\n ')):this.maskChild='\n <rect\n x="'.concat(s-r,'"\n y="').concat(l-r<0?0:l-r,'"\n height="').concat(b,'"\n width="').concat(b,'"\n fill="#fff" />\n <circle\n cx="').concat(o,'"\n cy="').concat(a,'"\n r="').concat(i,'" />\n ');var y='\n <circle\n cx="'.concat(s,'" \n cy="').concat(l,'" \n r="').concat(r,'" \n fill="').concat(t,'" \n fill-opacity="').concat(n,'" \n mask="url(#apx-mask)" />\n ');return this._getSVG(this.maskChild,y)}},{key:"_getRectangleSVG",value:function(e){var t=e.backgroundd_color,n=e.opacityy,i=e.targetElementLeft,o=e.targetElementTop,a=e.targetElementWidth,r=e.targetElementHeight,s=e.innerrect_x,l=e.innerrect_y,c=e.innerrect_left,d=e.innerrect_right,p=e.outerrect_decrease_left,u=e.outerrect_decrease_right,h=e.outerrect_decrease_top,g=e.outerrect_decrease_bottom,f=e.innerCenterX,m=e.innerCenterY,_=e.innerRadius,v=e.outer_x,b=e.outer_y;a=a+c+d,r=r+s+l,i-=c,o-=s;var y=document.scrollingElement.scrollHeight+h+g,x=document.scrollingElement.scrollWidth+p+u;if("circle"===this.highlighter.shape){var w=-p+v,C=-h+b;this.maskChild='\n <rect\n x="'.concat(w,'" y="').concat(C,'"\n height="').concat(y,'" \n width="').concat(x,'" \n fill="#fff" />\n <circle\n cx="').concat(f,'"\n cy="').concat(m,'"\n r="').concat(_,'" />\n ')}else this.maskChild='\n <rect\n x="0" y="0"\n height="'.concat(document.scrollingElement.scrollHeight,'" \n width="').concat(document.scrollingElement.scrollWidth,'" \n fill="#fff" />\n <rect\n x="').concat(i,'" \n y="').concat(o,'" \n width="').concat(a,'" \n height="').concat(r,'" />\n ');var E=-h+b,k='\n <rect\n x="'.concat(-p+v,'" y="').concat(E,'"\n height="').concat(y,'" \n width="').concat(x,'" \n mask="url(#apx-mask)"\n fill="').concat(t,'" \n fill-opacity="').concat(n,'" />\n ');return this._getSVG(this.maskChild,k)}},{key:"_createSVGDiv",value:function(e){var t=e.opacity;this.svgElement=document.createElement("div"),this.svgElement.setAttribute("id",this.currentId+"-svg"),this.svgElement.style.position="absolute",this.svgElement.style.left=0,this.svgElement.style.top=0,this.svgElement.style.zIndex=99998,this.svgElement.style.pointerEvents="none",this.svgElement.style.width="100%",this.svgElement.style.height="99%";var n="";return n="circle"===this.background.shape?this._getCircleSVG(e):this._getRectangleSVG(e),this.svgElement.innerHTML="\n <style>\n @keyframes apx-anim {\n from {\n opacity: 0;\n }\n\n to {\n opacity: ".concat(t,";\n }\n }\n .apx-fade-in {\n animation: apx-anim 0.4s linear;\n }\n </style>\n ").concat(n),document.body.appendChild(this.svgElement),this.svgElement}},{key:"_setObservors",value:function(){var e=this;this.targetDeletionObserver=new MutationObserver((function(){e.coachmarkShown&&(document.body.contains(e.targetElement)||e._destroyCoachMark())})),this.viewPortObservor=new IntersectionObserver((function(){e.coachmarkShown&&(isElementInViewport(e.targetElement)||e._destroyCoachMark())}))}},{key:"_createOuterCircle",value:function(e){var t,n=this;this.showCallback(),this.coachmarkShown=!0;var i=this._getDocumentOffsetPosition(e),o=i.left,a=void 0===o?0:o,r=i.top,s=void 0===r?0:r,l=i.width,c=void 0===l?0:l,d=i.height,p=void 0===d?0:d,u=i.left<window.innerWidth/2;if(0!==p&&0!==c){this.textElement=this._setInLineContent();var h=this.textElement.offsetWidth,g=this.textElement.offsetHeight,f=this.textElement.getBoundingClientRect();this.textElement.left=f.left+this.content.offset.x,this.textElement.top=f.top+this.content.offset.y;var m=this.ripple.width,_=this.ripple.duration;this.transparentCircleElement=this._createInnerCircle(c,p,a,s,this.highlighter.shape,this.highlighter.border.color,this.highlighter.border.width,this.highlighter.border.style,this.highlighter.border.radius,this.highlighter.delta_circle,this.highlighter.delta_rect.top,this.highlighter.delta_rect.bottom,this.highlighter.delta_rect.left,this.highlighter.delta_rect.right,m,_),this.imgElement=this._setImageOptions();var v,b,y,x,w,C,E,k,S=this.rippleElement.getBoundingClientRect();if(this.enable_image){var T,A,I,P,O,L,N,D,B;if(this.imgElement.style.position="absolute",this.imgElement.style.zIndex="999999",null!==(T=this.image)&&void 0!==T&&T.aspect_ratio)P=(null===(O=this.image)||void 0===O?void 0:O.width)*((null===(L=this.image)||void 0===L||null===(L=L.aspect_ratio)||void 0===L?void 0:L.height)/(null===(N=this.image)||void 0===N?void 0:N.aspect_ratio.width));else P=null===(D=this.image)||void 0===D?void 0:D.height;if("T"===this.image.position)A=S.top+window.scrollY-P+this.image.offset.y,I=S.left+this.image.offset.x+S.width/2-(null===(B=this.image)||void 0===B?void 0:B.width)/2,this.imgElement.style.top="".concat(A,"px"),this.imgElement.style.left="".concat(I,"px");else if("B"===this.image.position){var M;A=S.bottom+window.scrollY+this.image.offset.y,I=S.left+this.image.offset.x+S.width/2-(null===(M=this.image)||void 0===M?void 0:M.width)/2,this.imgElement.style.top="".concat(A,"px"),this.imgElement.style.left="".concat(I,"px")}else"L"===this.image.position?(A=S.top+window.scrollY+this.image.offset.y+S.height/2-P/2,I=S.left-this.image.width+this.image.offset.x,this.imgElement.style.top="".concat(A,"px"),this.imgElement.style.left="".concat(I,"px")):"R"===this.image.position&&(A=S.top+window.scrollY+this.image.offset.y+S.height/2-P/2,I=S.right+this.image.offset.x,this.imgElement.style.top="".concat(A,"px"),this.imgElement.style.left="".concat(I,"px"))}if(this.arrowElement=this._setArrowOptions(),null!==(t=this.arrow)&&void 0!==t&&t.aspect_ratio)v=(null===(b=this.arrow)||void 0===b?void 0:b.width)*((null===(y=this.arrow)||void 0===y||null===(y=y.aspect_ratio)||void 0===y?void 0:y.height)/(null===(x=this.arrow)||void 0===x?void 0:x.aspect_ratio.width));else v=null===(w=this.arrow)||void 0===w?void 0:w.height;if(this.enable_arrow)if(this.arrowElement.style.position="absolute",this.arrowElement.style.zIndex="9999999","T"===this.arrow.position)C=S.top+window.scrollY-v+this.arrow.offset.y,E=S.left+this.arrow.offset.x+S.width/2-(null===(k=this.arrow)||void 0===k?void 0:k.width)/2,this.arrowElement.style.top="".concat(C,"px"),this.arrowElement.style.left="".concat(E,"px");else if("B"===this.arrow.position){var F;C=S.bottom+window.scrollY+this.arrow.offset.y,E=S.left+this.arrow.offset.x+S.width/2-(null===(F=this.arrow)||void 0===F?void 0:F.width)/2,this.arrowElement.style.top="".concat(C,"px"),this.arrowElement.style.left="".concat(E,"px")}else"L"===this.arrow.position?(C=S.top+window.scrollY+this.arrow.offset.y+S.height/2-v/2,E=S.left-this.arrow.width+this.arrow.offset.x,this.arrowElement.style.top="".concat(C,"px"),this.arrowElement.style.left="".concat(E,"px")):"R"===this.arrow.position&&(C=S.top+window.scrollY+this.arrow.offset.y+S.height/2-v/2,E=S.right+this.arrow.offset.x,this.arrowElement.style.top="".concat(C,"px"),this.arrowElement.style.left="".concat(E,"px"));var $=a+c/2,R=s+p/2,H=Math.sqrt(Math.pow(c,2)+Math.pow(p,2))/2;H+=this.highlighter.delta_circle/2;var V=Math.sqrt(Math.pow(h,2)+Math.pow(g,2)),q=H+this.highlighter.delta_circle+V+this.highlighter.border.width;q+=this.background.delta_circle;var U=this.content.offset.x,j=this.content.offset.y,z=-1,W=-1,Y=-1,X=-1,G=-1;switch(G=R,this.content.position){case"T":W=(Y=$-h/2)<0?DEFAULT_PADDING:Y,z="circle"===this.highlighter.shape?R-H-g-this.highlighter.border.width-this.content.margin.bottom:s-g-this.highlighter.delta_rect.top-this.highlighter.border.width-this.content.margin.bottom;break;case"L":z=(X=R-g/2)<0?DEFAULT_PADDING:X,W="circle"===this.highlighter.shape?$-H-h-this.highlighter.border.width-this.content.margin.right:a-h-this.highlighter.delta_rect.left-this.highlighter.border.width-this.content.margin.right;break;case"R":z=(X=R-g/2)<0?DEFAULT_PADDING:X,W="circle"===this.highlighter.shape?$+H+this.highlighter.border.width+this.content.margin.left:c+this.highlighter.border.width+this.content.margin.left+this.highlighter.delta_rect.right;break;case"B":W=(Y=$-h/2)<0?DEFAULT_PADDING:Y,z="circle"===this.highlighter.shape?R+H+this.highlighter.border.width+this.content.margin.top:s+p+this.highlighter.delta_rect.bottom+this.highlighter.border.width+this.content.margin.top}if(-1!==W&&-1!==z&&-1!==G){!u&&W+h>window.innerWidth&&(W=window.innerWidth-h-0-0-10);var Q=W+U,Z=z+j;this.textElement.style.left="".concat(Q,"px"),this.textElement.style.top="".concat(Z,"px");var K=$;(K=Math.min(K+this.background.offset.x,document.scrollingElement.scrollWidth))<0&&(K=0),(G=Math.min(G+this.background.offset.y,document.scrollingElement.scrollHeight))<0&&(G=0);var J=this.background.background_color,ee=this.background.opacity,te=this.background.shape,ne=this.highlighter.delta_circle,ie=this.background.delta_circle,oe=this.highlighter.delta_rect.top,ae=this.highlighter.delta_rect.bottom,re=this.highlighter.delta_rect.left,se=this.highlighter.delta_rect.right,le=this.background.delta_rect.left,ce=this.background.delta_rect.right,de=this.background.delta_rect.top,pe=this.background.delta_rect.bottom,ue=this.background.offset.x,he=this.background.offset.y;this.svgElement=this._createSVGDiv({backgroundd_color:J,opacityy:ee,innerRadius:H,innerCenterX:$,innerCenterY:R,outerRadius:q,outerCircleCenterX:K,outerCircleCenterY:G,targetElementLeft:a,targetElementTop:s,targetElementWidth:c,targetElementHeight:p,outer_shape:te,delta_circle:ne,background_delta_circle:ie,innerrect_x:oe,innerrect_y:ae,innerrect_left:re,innerrect_right:se,outerrect_decrease_left:le,outerrect_decrease_right:ce,outerrect_decrease_top:de,outerrect_decrease_bottom:pe,outer_x:ue,outer_y:he}),this.svgElement.style.visibility="hidden",this.transparentCircleElement.style.visibility="hidden",this.textElement.style.visibility="hidden",this.dismissCallback=function(t){var i=!1,o=!1;void 0===t&&(o=!0);var a=e.getBoundingClientRect();void 0!==t&&t.clientX>=a.left&&t.clientX<=a.left+a.width&&t.clientY>=a.top&&t.clientY<=a.top+a.height&&(i=!0),(n.dismiss_outside_touch||i||o)&&(n._destroyCoachMark(),i&&e.click&&e.click())},this.terminationConfig&&!0===this.terminationConfig.autoDismiss&&setTimeout((function(){return n.dismissCallback()}),this.delay+this.terminationConfig.duration),this.svgElement.style.visibility="visible",this.transparentCircleElement.style.visibility="visible",this.textElement.style.visibility="visible",this.textElement.childElementCount>0&&(this.textElement.children[0].style.visibility="visible"),this.dismiss_outside_touch&&document.body.addEventListener("click",this.dismissCallback),this.transparentCircleElement.addEventListener("click",this.dismissCallback),this.scrollToView&&("T"===this.content.position?window.scrollTo({top:G+this.background.offset.y-(q+this.background.delta_circle),behavior:"smooth"}):"B"===this.content.position&&window.scrollTo({top:Math.min(document.scrollingElement.scrollHeight,G+this.background.offset.y+q+this.background.delta_circle),behavior:"smooth"})),this.targetDeletionObserver.observe(document.body,{childList:!0,subtree:!0}),this.viewPortObservor.observe(e),setTimeout((function(){n._highlightInlineTarget(),n._setAutoTerminate(),n.coachmarkShown=!0}),10)}else console.warn("Failed to identify the right place for text")}else{var ge;console.warn("Can't show on an invisible element: ",null===(ge=this.target)||void 0===ge?void 0:ge.id)}}},{key:"_setAutoTerminate",value:function(){var e=this;!0===this.terminationConfig.auto_dismiss&&(this.terminationTimeoutId=setTimeout((function(){e._destroyCoachMark()}),this.terminationConfig.duration))}}]),e}(),Logger=window.ApxorLogger,RTA=0,SURVEYS=1,getURLs=function(e,t){var n=function(n){return n.replace("<app_id>",e).replace("<u_id>",t)};return{rtaValidateUrl:n(RTA_VALIDATE_URL),rtaSyncUrl:n(RTA_SYNC_URL),surveysValidateUrl:n(SURVEY_VALIDATE_URL),surveysSyncUrl:n(SURVEY_SYNC_URL),configSSEUrl:n(CONFIG_API_URL),testDevicesValidateUrl:n(TEST_DEVICES_API_URL)}},RTM=function(){function e(){var t=this;_classCallCheck$1(this,e),_defineProperty$1(this,"version",200),_defineProperty$1(this,"_rtm_version","2.0.0"),_defineProperty$1(this,"_configs",{}),_defineProperty$1(this,"isShowingAction",!1),_defineProperty$1(this,"currentAction",null),_defineProperty$1(this,"_currentTooltip",null),_defineProperty$1(this,"_currentBadge",null),_defineProperty$1(this,"_currentInApp",null),_defineProperty$1(this,"_currentVideoPIP",null),_defineProperty$1(this,"_currentCoachmark",null),_defineProperty$1(this,"_surveys",new ApxorSurveys),_defineProperty$1(this,"_newsurveys",new NewSurveys),_defineProperty$1(this,"_inApp",new ApxorInApp),_defineProperty$1(this,"_wysiwyg",new WYSIWYG),_defineProperty$1(this,"_afterPluginInit",null),_defineProperty$1(this,"_eventsInDynamicText",{}),_defineProperty$1(this,"_configSSEUrl",""),_defineProperty$1(this,"isWalkthrough",!1),_defineProperty$1(this,"_handledOneSync",!1),_defineProperty$1(this,"_calledPluginInitCallback",!1),_defineProperty$1(this,"uis",[]),_defineProperty$1(this,"isBadgePresent",!1),_defineProperty$1(this,"badgesMutationObserver",null),_defineProperty$1(this,"badgesLists",[]),_defineProperty$1(this,"badgesTriggerCheckList",[]),_defineProperty$1(this,"init",(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(){};t._afterPluginInit=e;var n=Apxor.getController();t.ceInstance=ceWrapper.getInstance();var i=Apxor.getSiteId(),o=Apxor.getClientId(),a=getURLs(i,o),r=a.rtaValidateUrl,s=a.rtaSyncUrl,l=a.surveysValidateUrl,c=a.surveysSyncUrl,d=a.configSSEUrl,p=a.testDevicesValidateUrl;t._configSSEUrl=d,t.track_pages_events_api_url=TRACK_PAGES_EVENTS_API.replace("<app_id>",i);var u=n.getFromStorage(APX_AUTO_EVENT_VERSION);t.track_pages_events_api_url=t.track_pages_events_api_url.replace("<events_version>",null!=u?u:0);var h=n.getFromStorage(APX_AUTO_PAGE_EVENT_VERSION);t.track_pages_events_api_url=t.track_pages_events_api_url.replace("<pages_version>",null!=h?h:0),t.ceInstance.initialize(),t.ceInstance.fetch(RTA,r,s,t.handleResponse),t.ceInstance.fetch(SURVEYS,l,c,t.handleResponse),n.isTestDevice()&&n.makeGetRequest(p,t.initiateTestSSE),n.makeGetRequest(t.track_pages_events_api_url,(function(e){var n,i,o=Apxor.getController(),a=null!==(n=JSON.parse(o.getFromStorage(APX_AUTO_PAGE_EVENTS)))&&void 0!==n?n:[];if(e&&e.is_pages_updated&&e.pages_data){var r,s,l,c,d;if(null!==(r=e.pages_data)&&void 0!==r&&r.pages_to_register)a=null===(l=e.pages_data)||void 0===l?void 0:l.pages_to_register,o.persistToStorage(APX_AUTO_PAGE_EVENTS,JSON.stringify(null===(c=e.pages_data)||void 0===c?void 0:c.pages_to_register));if(null!==(s=e.pages_data)&&void 0!==s&&s.version)o.persistToStorage(APX_AUTO_PAGE_EVENT_VERSION,null===(d=e.pages_data)||void 0===d?void 0:d.version)}var p=null!==(i=JSON.parse(o.getFromStorage(APX_AUTO_EVENTS)))&&void 0!==i?i:[];if(e&&e.is_events_updated&&e.events_data){var u,h,g,f,m;if(null!==(u=e.events_data)&&void 0!==u&&u.events_to_register)p=null===(g=e.events_data)||void 0===g?void 0:g.events_to_register,o.persistToStorage(APX_AUTO_EVENTS,JSON.stringify(null===(f=e.events_data)||void 0===f?void 0:f.events_to_register));if(null!==(h=e.events_data)&&void 0!==h&&h.version)o.persistToStorage(APX_AUTO_EVENT_VERSION,null===(m=e.events_data)||void 0===m?void 0:m.version)}t.setHandlersForPageEvents(a),t.setHandlersForEvents(p)}),(function(){var e,n,i=Apxor.getController(),o=null!==(e=JSON.parse(i.getFromStorage(APX_AUTO_PAGE_EVENTS)))&&void 0!==e?e:[],a=null!==(n=JSON.parse(i.getFromStorage(APX_AUTO_EVENTS)))&&void 0!==n?n:[];t.setHandlersForPageEvents(o),t.setHandlersForEvents(a)})),n.registerForEvent("IN_LINE",t.handleInLine),n.registerForEvent("IN_APP",t.handleInApp),n.registerForEvent("SURVEY",t.handleSurvey),n.registerForEvent("ONBOARDING",t.handleOnboarding),t._wysiwyg.init(i,t),Logger.debug("Registered for events")})),_defineProperty$1(this,"setHandlersForPageEvents",(function(e){var n={all_url:[],url:[],dynamic_url:[]};e.forEach((function(e){e.all_url&&n.all_url.push({action:e.action,type:e.type,additional_info:null==e?void 0:e.additional_info}),e.url&&n.url.push({action:e.action,type:e.type,url:e.url,additional_info:null==e?void 0:e.additional_info}),e.dynamicURL&&n.dynamic_url.push({action:e.action,type:e.type,dynamicURL:e.dynamicURL,additional_info:null==e?void 0:e.additional_info})}));window.setInterval((function(){t.latest_url!==window.location.href&&(t.latest_url=window.location.href,n.all_url.forEach((function(e){var t=null!=e&&e.additional_info?getAdditionalInfo(null==e?void 0:e.additional_info):{};"app_event"===e.type?null==Apxor||Apxor.logEvent(e.action,t):null==Apxor||Apxor.logClientEvent(e.action,t)})),n.url.forEach((function(e){if(e.url===t.latest_url){var n=null!=e&&e.additional_info?getAdditionalInfo(null==e?void 0:e.additional_info):{};n.url=e.url,"app_event"===e.type?null==Apxor||Apxor.logEvent(e.action,n):null==Apxor||Apxor.logClientEvent(e.action,n)}})),n.dynamic_url.forEach((function(e){if(doesUrlMatchSkeleton(t.latest_url,e.dynamicURL,"*")){var n=null!=e&&e.additional_info?getAdditionalInfo(null==e?void 0:e.additional_info):{};n.url=t.latest_url,n.apx_page=!0,"app_event"===e.type?null==Apxor||Apxor.logEvent(e.action,n):null==Apxor||Apxor.logClientEvent(e.action,n)}})))}),500)})),_defineProperty$1(this,"setHandlersForEvents",(function(e){var t={click:[],double_click:[],hover:[],right_click:[],change:[],custom_event:[]};e.forEach((function(e){var n=e.events;for(var i in n){var o,a,r,s,l=n[i],c={selector:e.selector,text_based:e.is_content_based,text:e.content,action:l.action,additional_info:null===(o=l)||void 0===o?void 0:o.additional_info,type:l.type,url:l.url,is_dynamic:l.is_dynamic,check_validity:null!==(a=null==e?void 0:e.check_validity)&&void 0!==a&&a,validity:null!==(r=null==e?void 0:e.validity)&&void 0!==r?r:{}};null===(s=t[i])||void 0===s||s.push(c)}}));var n=function(e,n){var i=Apxor.getController(),o=e.target;t[n].forEach((function(t){if(!(!t.is_dynamic||!doesUrlMatchSkeleton(location.href,t.url,"*")&&"*"!==t.url)||location.href===t.url){if("custom_event"===n){var a;if(t.action===(null==e||null===(a=e.detail)||void 0===a?void 0:a.name)){var r,s,l=_objectSpread2$1(_objectSpread2$1({},null!=t&&t.additional_info?getAdditionalInfo(null==t?void 0:t.additional_info,e):{}),(null==e||null===(r=e.detail)||void 0===r?void 0:r.additionalInfo)instanceof Object?null==e||null===(s=e.detail)||void 0===s?void 0:s.additionalInfo:{});null==Apxor||Apxor.logEvent(t.action,l)}return}var c=getElementFromSelector(t.selector,"",t.text_based,t.text,!0),d=function(){var n=JSON.parse(i.getValueOrDefault("apx_unique_identifier_obj","{}")),a="";if(o&&(a=o instanceof HTMLInputElement||o instanceof HTMLTextAreaElement||o instanceof HTMLSelectElement?null==o?void 0:o.value:o.textContent||""),a&&!n[a]){var r=null!=t&&t.additional_info?getAdditionalInfo(null==t?void 0:t.additional_info,e):{};n[a]=n[r.unique_id]||fnv1aHash(a),i.persistToStorage("apx_unique_identifier_obj",JSON.stringify(n))}},p=function(){var i=null!=t&&t.additional_info?getAdditionalInfo(null==t?void 0:t.additional_info,e):{};if("click"!==n&&"double_click"!==n&&"right_click"!==n||(i.clicked_at=Date()),"change"===n){var o="",a=e.target;a&&(o=a instanceof HTMLInputElement||a instanceof HTMLTextAreaElement||a instanceof HTMLSelectElement?null==a?void 0:a.value:a.textContent||""),i.entered_input=o,i.changed_at=Date()}return i};if(c instanceof NodeList||Array.isArray(c))null==c||c.forEach((function(e){if(e&&(e==o||isDescendant(e,o))){var n=p();if(t.check_validity&&t.validity){var a=t.validity,r=a.condition_type,s=void 0===r?"":r,l=a.condition,c=void 0===l?"":l,u=a.condition_time_limit,h=void 0===u?1e3:u,g=a.failure_event,f=void 0===g?{}:g,m=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],i=h/100,o=window.setInterval((function(){if((i-=1)<=0){if(clearInterval(o),f){var a=f.action,r=f.type,s=f.additional_info,l=s?getAdditionalInfo(s):{};"app_event"===r?null==Apxor||Apxor.logEvent(a,l):"client_event"===r&&(null==Apxor||Apxor.logClientEvent(a,l))}}else{var d=getElementFromSelector(c);(e?!d:d)&&(clearInterval(o),null==Apxor||Apxor.logEvent(t.action,n))}}),100)};switch(s){case"search_element":m(!1);break;case"search_element_absent":m(!0)}}else"app_event"===t.type?null==Apxor||Apxor.logEvent(t.action,n):"client_event"===t.type?null==Apxor||Apxor.logClientEvent(t.action,n):"capture"===t.type?Object.keys(n).forEach((function(e){var t=i.getValueOrDefault("captured_data",{},!0,SESSION_STORAGE$1);t[e]=n[e],i.persistToStorage("captured_data",t,!0,SESSION_STORAGE$1)})):"generate_identifier"===t.type&&d()}}));else if(c&&(c==o||isDescendant(c,o))){var u=p();if(t.check_validity&&t.validity){var h=t.validity,g=h.condition_type,f=void 0===g?"":g,m=h.condition,_=void 0===m?"":m,v=h.condition_time_limit,b=void 0===v?1e3:v,y=h.failure_event,x=void 0===y?{}:y,w=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],n=b/100,i=window.setInterval((function(){if((n-=1)<=0){if(clearInterval(i),x){var o=x.action,a=x.type,r=x.additional_info,s=r?getAdditionalInfo(r):{};"app_event"===a?null==Apxor||Apxor.logEvent(o,s):"client_event"===a&&(null==Apxor||Apxor.logClientEvent(o,s))}}else{var l=getElementFromSelector(_);(e?!l:l)&&(clearInterval(i),null==Apxor||Apxor.logEvent(t.action,u))}}),100)};switch(f){case"search_element":w(!1);break;case"search_element_absent":w(!0)}}else"app_event"===t.type?null==Apxor||Apxor.logEvent(t.action,u):"client_event"===t.type?null==Apxor||Apxor.logClientEvent(t.action,u):"capture"===t.type?Object.keys(u).forEach((function(e){var t=i.getValueOrDefault("captured_data",{},!0,SESSION_STORAGE$1);t[e]=u[e],i.persistToStorage("captured_data",t,!0,SESSION_STORAGE$1)})):"generate_identifier"===t.type&&d()}}}))};document.addEventListener("click",(function(e){n(e,"click")}),!0),document.addEventListener("dblclick",(function(e){n(e,"double_click")}),!0),document.addEventListener("contextmenu",(function(e){n(e,"right_click")}),!0),document.addEventListener("hover",(function(e){n(e,"hover")}),!0),document.addEventListener("change",(function(e){n(e,"change")})),window.addEventListener("apxValidationEvent",(function(e){n(e,"custom_event")}))})),_defineProperty$1(this,"previewTemplate",(function(e,n,i){if("new-inline"===i)t._currentTooltip=new InLineTooltip(e,[],[],{},{},t,(function(){}),(function(){t.isShowingAction=!1,t.currentAction=null,t._currentTooltip=null}),(function(){}),!1,0),t._currentTooltip.createNewTooltip(),t.currentAction=function(){var e;null===(e=t._currentTooltip)||void 0===e||e._destroyTooltip()};else if("coach_mark_v2"===i)t._currentCoachmark=new InLineCoachMark(e,[],[],{},{},t,(function(){}),(function(){t.isShowingAction=!1,t.currentAction=null,t._currentCoachmark=null}),(function(){}),!1,0),t._currentCoachmark.createNewCoachMark();else if(i===IN_APP_TYPE)t._currentInApp=new ModalInApp(e,{},n,APX_PREVIEW_CAMPAIGN_NAME,(function(){}),(function(e,n){var i,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:".apx-dlg-c",a=arguments.length>3?arguments[3]:void 0,r=arguments.length>4?arguments[4]:void 0;document.body.removeEventListener("click",a),document.body.removeEventListener("click",r);var s=document.querySelector(o);null==s||null===(i=s.classList)||void 0===i||i.toggle("open"),null==e||e.remove(),t.isShowingAction=!1,t.currentAction=null,t._currentInApp=null}),(function(){}),!1,[],0),t._currentInApp.createInAppModal();else if("pip"===i){if(VideoInApp.isAVideoBeingPlayed())return;if(!VideoInApp.canShowVideoInApp(e))return;t._currentVideoPIP=new VideoInApp(e,n,APX_PREVIEW_CAMPAIGN_NAME,(function(){}),(function(){t.isShowingAction=!1,t.currentAction=null,t._currentVideoPIP=null})),t._currentVideoPIP.showVideoInApp()}})),_defineProperty$1(this,"show",(function(e,n,i,o,a){var r=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0,s=arguments.length>6&&void 0!==arguments[6]&&arguments[6];try{if(a!==APX_PREVIEW_CAMPAIGN_NAME&&t.getFrequencyCount(o)<=0){feedBackMessagePopUp("Campaign limit reached");var l=document.getElementById("close-button"),c=function(){var e=document.getElementById("apx-container");null==e||e.remove()};return null==l||l.addEventListener("click",c),window.setTimeout(c,2e4),void Logger.error("Campaign limit reached")}if(null!==t.currentAction&&void 0!==t.currentAction)return null==Apxor||Apxor.logEvent("apx_nudge_not_shown",{apx_nudge_type:"campaign",apx_nudge_id:o,apx_nudge_name:a,apx_variant_code:t.ceInstance.getVariantCode(o),apx_failure_type:"error",apx_reason:"An action is already being shown"},!1,"apxor","campaign"),void Logger.error("An action already being shown");var d=JSON.parse(e),p={};p.auto_dismiss=i>0,p.duration=i;var u=d.display_type,h=function(){if(storeLastShownTime(o),"new-inline"===u||"inline"===u?t.logActionEvent("inline_shown",o,a,"tooltip"):("coachmark"===u||"coach_mark_v2"===u)&&t.logActionEvent("inline_shown",o,a,"coachmark"),a!==APX_PREVIEW_CAMPAIGN_NAME)t.updateCount(o);else if("inline"!==u&&"coachmark"!==u&&"passive_nudge"!==u){feedBackMessagePopUp("previewing...");var e=document.getElementById("close-button");null==e||e.addEventListener("click",(function(){var e=document.getElementById("apx-container");null==e||e.remove()}))}t.isShowingAction=!0,s&&(t.currentAction=null)},g=function(){(storeLastShownTime(o),t.badgesTriggerCheckList.includes(o))||(t.logActionEvent("inline_shown",o,a,"badge"),Apxor.getController().persistStartDateInfoLocally(o));if(a===APX_PREVIEW_CAMPAIGN_NAME){feedBackMessagePopUp("previewing...");var e=document.getElementById("close-button");null==e||e.addEventListener("click",(function(){var e=document.getElementById("apx-container");null==e||e.remove()}))}},f=function(){var e,n=arguments.length>0&&void 0!==arguments[0]&&arguments[0];(t.isShowingAction=!1,t.currentAction=null,t._currentTooltip=null,t._currentBadge=null,t._currentCoachmark=null,n)?("new-inline"===u||"inline"===u?e="tooltip":"coach_mark"===u?e="coachmark":"passive_nudge"!==u&&"badge"!==u||(e="badge"),t.logActionEvent("walkthrough_cancelled",o,a,e)):"new-inline"===u||"inline"===u?t.logActionEvent("inline_dismissed",o,a,"tooltip"):("coach_mark"===u||"coach_mark_v2"===u)&&t.logActionEvent("inline_dismissed",o,a,"coachmark");var i=document.getElementById("apx-container");null==i||i.remove()},m={configId:o,configName:a};if("new-inline"===u)t._currentTooltip=new InLineTooltip(d,n,[],p,m,t,h,f,t.stepperCallback,s,r),setTimeout((function(){t._currentTooltip.createNewTooltip()}),d.delay);else if("inline"===u)showTooltip(d,[],p,m,t,h,f);else if("passive_nudge"===u||"badge"===u){if(a===APX_PREVIEW_CAMPAIGN_NAME)for(var _=document.getElementsByClassName("apxor-badge-container");_.length>0;){var v;null===(v=_[0])||void 0===v||v.remove()}t._currentBadge=new ApxorBadge(d,t._configs[o].terminationConfig,m,t,g),t._currentBadge.createBadge()}else"coach_mark"===u?showCoachmarkWithDelay(d,m,p,h,f,(function(e){t.currentAction=e})):"coach_mark_v2"===u?(t._currentCoachmark=new InLineCoachMark(d,n,[],p,m,t,h,f,t.stepperCallback,s,r),setTimeout((function(){t._currentCoachmark.createNewCoachMark()}),d.delay)):Logger.error("Unknown type",u)}catch(e){t.currentAction=null,t._currentTooltip=null,t._currentBadge=null,t._currentCoachmark=null,t.isShowingAction=!1,window.ApxorLogger.error(e)}})),_defineProperty$1(this,"logActionEvent",(function(e,n,i,o){var a=t.getCampaignMeta(n),r="SURVEY"===a.type?"survey":"campaign",s=(null==a?void 0:a._attr)||{};Apxor.logEvent(e,_objectSpread2$1({id:n,message_name:i,campaign_type:o},s),!1,"apxor",r)})),_defineProperty$1(this,"logClientEvent",(function(e,t){Apxor.logClientEvent(e,t)})),_defineProperty$1(this,"updateCount",(function(e){t.ceInstance.updateCount(e)})),_defineProperty$1(this,"getFrequencyCount",(function(e){t.ceInstance.getFrequencyCount(e)})),_defineProperty$1(this,"resetFrequencyCounts",(function(){t.ceInstance.resetFrequencyCounts()})),_defineProperty$1(this,"removeAll",(function(){if(null!==t.currentAction&&void 0!==t.currentAction){t.isShowingAction=!1;try{t.currentAction()}catch(e){Logger.error("RTM : Failed to remove all RTM actions")}finally{t.currentAction=null}}})),_defineProperty$1(this,"handleResponse",(function(e,n){""===e?(Logger.debug("RTM : No configs available"),t._afterPluginInit()):(Logger.debug("RTM : Fetched configs ".concat(n," for type-").concat(e===SURVEYS?"Surveys":"RTA")),t._storeConfigs(e,n),t.ceInstance.parse(n),t._handledOneSync&&(t._calledPluginInitCallback=!0,t._afterPluginInit()),t._handledOneSync=!0,setTimeout((function(){t._calledPluginInitCallback||t._afterPluginInit()}),1500))})),_defineProperty$1(this,"handleSSEResponse",(function(e,n){Logger.debug("RTM : Fetched config from SSE"),n&&n.length>0&&(t._storeConfigs(e,{configs:n}),t.ceInstance.parse({configs:n}))})),_defineProperty$1(this,"initiateTestSSE",(function(e){var n;!0===(null==e||null===(n=e.data)||void 0===n?void 0:n.is_test_device)?new EventSource(t._configSSEUrl).onmessage=function(e){try{if(e&&e.data&&"{}"!==e.data&&null!=e&&e.data){var n=JSON.parse(null==e?void 0:e.data);t.handleSSEResponse(RTA,n.messages)}}catch(e){Logger.error("SSE art-config parsing error:",e)}}:Apxor.getController().persistToStorage("_apx_td",{},!0)})),_defineProperty$1(this,"_storeConfigs",(function(e,n){var i=Apxor.getController();if(isDefined$1(n)&&isDefined$1(n.configs)){var o=n.configs;if(!Array.isArray(o))return;for(var a=function(){var n,a=o[r],s=a._id,l=a.meta,c=l.name,d=l.type,p=JSON.parse(i.getFromStorage(APX_TERMINATION_ID$1));if(null!==p&&null!=p&&p[s]&&p[s].goalAcheived)return 0;var u,h,g,f=a.ui;e===SURVEYS?(null==a||null===(u=a.meta)||void 0===u?void 0:u.name)===APX_PREVIEW_CAMPAIGN_NAME&&200===(null==a||null===(h=a.ui)||void 0===h?void 0:h.min_version)?(a.ui.version="v2",f=a.ui):null!=a&&a.surveyType&&"latest"===a.surveyType.toLowerCase()?a.ui.version="v2":f=t._surveys.parse(s,c,f):d===IN_APP_TYPE?f=t._inApp.parse(s,c,f):"ONBOARDING"===d&&(t.isWalkthrough=!0,t.uis=a.uis,f="IN_LINE"===a.uis[0].type?a.uis[0]:t._inApp.parse(s,c,t.uis[0],t.uis,0,t.stepperCallback,t.isWalkthrough));if(null===f)return console.warn("Failed to parse the config",s),0;(t._configs[s]={ui:f,uis:a.uis,terminationConfig:a.terminate_info,name:c,isWalkthrough:t.isWalkthrough},"badge"===(null===(n=a.ui)||void 0===n?void 0:n.display_type))&&(t.badgesLists.push(s),i.isBadgeTriggerSatisfied(s)&&(t.badgesTriggerCheckList.push(s),t._configs[s].ui.delay=0),t.isBadgePresent=!0,null===t.badgesMutationObserver&&(t.badgesMutationObserver=new MutationObserver((function(){t.badgesLists.forEach((function(e){var n,o;i.isBadgeTriggerSatisfied(s)&&t.badgesTriggerCheckList.push(s);var a=getElementFromSelector(null===(n=t._configs[e])||void 0===n||null===(n=n.ui)||void 0===n?void 0:n.target.id,null===(o=t._configs[e])||void 0===o||null===(o=o.ui)||void 0===o?void 0:o.target.iframe_id);i.isBadgeTriggerSatisfied(e)&&!document.getElementById("apxor-badge-container-".concat("-".concat(e).replaceAll(" ","").replace(/[^\w\s]/gi,"")))&&isDefined$1(a)&&isElementInViewport(a)&&t.ceInstance.notifyEventListener({name:"apxor-badge-container-".concat("-".concat(e).replaceAll(" ","").replace(/[^\w\s]/gi,"")),additional_info:{},category:void 0,time:i.getTimeElapsedInSession()})}))})),null===(g=t.badgesMutationObserver)||void 0===g||g.observe(document.body,{childList:!0,subtree:!0,attributes:!0})))},r=0;r<o.length;r++)a();Logger.debug("Configs: ",t._configs)}})),_defineProperty$1(this,"handleInLine",(function(e){if(isDefined$1(e.additional_info)){var n,i=e.additional_info.uuid;if(null!==(n=t._configs[i])&&void 0!==n&&n.terminationConfig){var o,a=Apxor.getController(),r=JSON.parse(a.getFromStorage(APX_TERMINATION_ID$1));if(null!==r&&void 0!==r[i]&&null!==(o=r[i])&&void 0!==o&&o.goalAcheived)return}if(t._configs[i]){var s=t._configs[i],l=s.ui,c=s.terminationConfig,d=s.name;t.show(JSON.stringify(l),t.uis,c.auto_dismiss?c.duration:-1,i,d)}}})),_defineProperty$1(this,"handleInApp",(function(e){if(isDefined$1(e.additional_info)){var n=e.additional_info.uuid;if(t._configs[n]){var i=t._configs[n].terminationConfig,o=t._configs[n].ui;setTimeout((function(){o.showInApp(n,i)}),0)}}})),_defineProperty$1(this,"handleSurvey",(function(e){if(isDefined$1(e.additional_info)){var n,i=e.additional_info.uuid;if(null!==(n=t._configs[i])&&void 0!==n&&n.terminationConfig&&t._configs[i].terminationConfig.enable_goal_events){var o=Apxor.getController();o.persistStartDateInfoLocally(i);var a=JSON.parse(o.getFromStorage(APX_TERMINATION_ID$1));if(null!==a&&void 0!==a[i]&&a[i].goalAcheived)return}if(t._configs[i]){var r,s=t._configs[i].ui,l=function(e){storeLastShownTime(i),t.updateCount(i),t.isShowingAction=!0,t.currentAction=e},c=function(){t.isShowingAction=!1,t.currentAction=null};if("v2"===(null===(r=s.version)||void 0===r?void 0:r.toLowerCase())){var d=new NewSurveys(i,t._configs[i].name,s,t.uis,t,l,c);setTimeout((function(){var e,t=document.querySelectorAll("[class*=apxor-survey-overlay]");t.length>0&&(null===(e=t[0])||void 0===e||e.remove());d.showNewSurvey()}),s.delay||0)}else s.showSurvey(l,c)}}})),_defineProperty$1(this,"handleOnboarding",(function(e){if(isDefined$1(e.additional_info)){var n=e.additional_info.uuid;if(t._configs[n])if(t.ui=t._configs[n].ui,t.uis=t._configs[n].uis,t.terminationConfig=t._configs[n].terminationConfig,t.name=t._configs[n].name,t.isWalkthrough=t._configs[n].isWalkthrough,"IN_LINE"===t.ui.type)t.show(JSON.stringify(t.ui),t.uis,t.terminationConfig.auto_dismiss?t.terminationConfig.duration:-1,n,t.name,0,t.isWalkthrough);else{var i=t.ui;setTimeout((function(){i.showInApp(n,t.terminationConfig)}),0)}}})),_defineProperty$1(this,"stepperCallback",(function(e,n){var i;if(t._configs[e])if(t.uis=t._configs[e].uis,t.terminationConfig=t._configs[e].terminationConfig,t.name=t._configs[e].name,t.isWalkthrough=t._configs[e].isWalkthrough,t.ui="IN_LINE"===(null===(i=t.uis[n])||void 0===i?void 0:i.type)?t.uis[n]:t._inApp.parse(e,t.name,t.uis[n],t.uis,n,t.stepperCallback,t.isWalkthrough),"IN_LINE"===t.ui.type)t.show(JSON.stringify(t.ui),t.uis,t.terminationConfig.auto_dismiss?t.terminationConfig.duration:-1,e,t.name,n,t.isWalkthrough);else{var o=t.ui;setTimeout((function(){o.showInApp(e,t.terminationConfig)}),0)}})),_defineProperty$1(this,"getCampaignMeta",(function(e){var n;return null===(n=t.ceInstance)||void 0===n?void 0:n.getCampaignMetaFromQueryEngine(e)})),_defineProperty$1(this,"validateForTerminationAttributes",(function(e){var n;return null===(n=t.ceInstance)||void 0===n?void 0:n.validateForTerminationAttributes(e)}))}return _createClass$1(e,[{key:"notifyScroll",value:function(){this.isShowingAction&&this.removeAll()}}]),e}(),rtm=new RTM;window.ApxorRTM=rtm;var CEWrapper=function(){function e(){_classCallCheck$1(this,e)}return _createClass$1(e,[{key:"getInstance",value:function(){return(CE||window["apxor-qe"]).getInstance()}}]),e}(),ceWrapper=new CEWrapper;try{void 0===exports&&null===exports||(exports.default=rtm,module.exports=exports.default)}catch(e){}exports.ceWrapper=ceWrapper,exports.default=rtm,Object.defineProperty(exports,"__esModule",{value:!0})}));