PageSourceSearch

https://cdn.a1.rs/a1website/build/js/VirtualCart.js?rnd=2877669417

js a1.rs collected 2026-09-24 09:31:08 UTC 185,165 bytes, 15 lines download raw bytes

1!function(e){var t={};function n(i){if(t[i])return t[i].exports;var r=t[i]={i:i,l:!1,exports:{}};return e[i].call(r.exports,r,r.exports,n),r.l=!0,r.exports}n.m=e,n.c=t,n.d=function(e,t,i){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:i})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(i,r,function(t){return e[t]}.bind(null,r));return i},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=2)}([function(e,t,i){"use strict";
2/*! Cookie manipulation
3 ========================================================================== */
4var r;function o(e,t,n){var i;if(n){var r=new Date;r.setTime(r.getTime()+60*n*60*1e3),i="; expires="+r.toGMTString()}else i="";document.cookie=e+"="+t+i+";domain="+COOKIE_BASE_URL+";path=/"}i.r(t),i.d(t,"numberThousandSeparator",(function(){return c})),i.d(t,"isDiscount15kDeviceEligible",(function(){return s})),i.d(t,"createElementFromHTML",(function(){return l})),i.d(t,"qs",(function(){return f})),i.d(t,"cleanPrice",(function(){return d})),i.d(t,"simulateClick",(function(){return p})),i.d(t,"getParameterByName",(function(){return h})),i.d(t,"toggleButton",(function(){return _}));var c=function(e){return e||0===e||"0"===e?e.toString().replace(/\B(?=(\d{3})+(?!\d))/g,"."):null};window.AJAX_DEFAULT_TIMEOUT=1e4,window.LOADING_GIF='<p style="text-align:center" class="popup_loaded"><img src="//cdn.vipmobile.rs/popmenu/UI/Images/Content/loader.gif"></p>',window.WINDOW_ACTIVE=!0,window.anvilGetCookie=function(e){if(r)return r[e];var t,n=document.cookie.split("; ");r={};for(var i=n.length-1;i>=0;--i)t=n[i].split("="),r[t[0]]=t[1];return r[e]},window.setCookie=o,window.eraseCookie=function(e){o(e,"",-1)}
5/*! Random generator
6 ========================================================================== */,window.getRandomInt=function(e,t){return Math.floor(Math.random()*(t-e+1))+e}
7/*! Tooltip
8 ========================================================================== */,window.getUrlVars=
9/*! Get parameters of request uri
10 ========================================================================== */
11function(){for(var e,t=[],n=window.location.href.slice(window.location.href.indexOf("?")+1).split("&"),i=0;i<n.length;++i)e=n[i].split("="),t.push(e[0]),t[e[0]]=e[1];return t},window.tooltipActivation=function(e){e.hover((function(e){var t=$(this).data("tooltip");if(0==$("#tooltip").length){$(this).append('<div id="tooltip"></div>'),$("#tooltip").html(t);var n=$(this).data("tooltip-class");void 0!==n&&$("#tooltip").addClass(n)}e.stopPropagation()}),(function(e){$("#tooltip").remove(),e.stopPropagation()}))},window.tabSwitch=function(e){$("#"+e+" .tab_menu li").on("click",(function(){$("#"+e+" .tab_menu li").attr("class","");var t=$(this).addClass("active").data("href");$("#"+e+" .tab_content").hide(),$("#"+t).show()}))},window.showPopup=function(e,t,n,i){e||(e=""),t||(t=""),n||(n="OK");var r="";i||(r="popupCloser",i="#"),$("#default_popup.popup_content").html("<h2>"+e+"</h2><p>"+t+'</p><p class="text-center"><a href="'+i+'" class="orange_button '+r+'">'+n+'</a></p><span class="popupCloser xclose">X</span>')},window.numberThousandSeparator=c,window.vipsitevalidate=
12/*! Vip input validation
13========================================================================== */
14function(e,t){var n=e.val(),i=!0;switch(t){case"agree":e.parent().parent().find(".inputError").remove(),e.is(":checked")||(e.parent().parent().append('<p class="inputError">'+LC.AGREE_ERROR+"</p>"),i=!1);break;case"msisdn":var r=/^3816(\+|\d)[0-9]{6,7}$/;e.parent().parent().find(".inputError").remove(),/^3816(\+|\d)[0-9]*$/.test(n)&&n.length>12?(e.parent().parent().append('<p class="inputError">'+LC.MSISDN_LENGTH_ERROR+"</p>"),i=!1):r.test(n)||/^06(\+|\d)[0-9]{6,7}$/.test(n)||(e.parent().parent().append('<p class="inputError">'+LC.MSISDN_ERROR+"</p>"),i=!1);break;case"email":e.parent().parent().find(".inputError").remove(),(r=/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/).test(n)||(e.parent().parent().append('<p class="inputError">'+LC.EMAIL_ERROR+"</p>"),i=!1);break;case"empty":e.parent().parent().find(".inputError").remove(),""===n&&(e.parent().parent().append('<p class="inputError">'+LC.EMPTY_ERROR+"</p>"),i=!1);break;case"password":e.parent().parent().find(".inputError").remove(),(r=/^(?=.*[A-Za-z])(?=.*\d)[A-Za-z\d]{8,20}$/g).test(n)||(e.parent().parent().append('<p class="inputError">'+LC.PASSWORD_ERROR+"</p>"),i=!1)}
14return i||(e.addClass("faultyInput"),e.on("input",(function(){e.removeClass("faultyInput")}))),i},window.debugLog=function(){var e,t=window.location.search,n=new URLSearchParams(t),i=n.get("debug");"true"===i&&arguments.length>0&&(e=console).log.apply(e,arguments)};var a=["TCLMT40X","TCLMT46X","TCLT453D"],s=function(e){return!a.includes(e)};window.isDiscount15kDeviceEligible=s,window.cw=function(){var e;arguments.length>0?(e=console).warn.apply(e,arguments):console.warn("You forgot argument for console.warn")},window.ce=function(){var e;arguments.length>0&&(e=console).error.apply(e,arguments)},window.cl=function(){var e;arguments.length>0&&(e=console).log.apply(e,arguments)};var l=function(e){var t=document.createElement("div");return t.innerHTML=e.trim(),t.firstChild},f=function(e,t){var n=document.querySelectorAll(e);n.length>0&&n.forEach((function(e){t(e)}))},d=function(e){return e&&"string"==typeof e?parseInt(e.replace(".","")):"number"==typeof e?e:0},p=function(e){var t=new MouseEvent("click",{bubbles:!0,cancelable:!0,view:window});e.dispatchEvent(t)},h=function(e,t){t||(t=window.location.href),e=e.replace(/[\[\]]/g,"\\$&");var n=new RegExp("[?&]"+e+"(=([^&#]*)|&|#|$)").exec(t);return n?n[2]?decodeURIComponent(n[2].replace(/\+/g," ")):"":null},_=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"Dodaj",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"Ukloni";if(!e)return null;var i=e.className,r=e.querySelector("img"),o=e.querySelector(".a-02-button__label");-1!==i.indexOf("inverted")?(e.className=i.replace("inverted","flat"),r.src="https://cdn.a1.rs/a1website/img/a1/icons/icon-chevron-right-white.svg",o.innerHTML=t):(e.className=i.replace("flat","inverted"),r.src="https://cdn.a1.rs/a1website/img/a1/icons/icon-chevron-right-primary.svg",o.innerHTML=n)};function g(e,t){var n=C();return(g=function(t,i){var r=n[t-=458];if(void 0===g.JjvcwH){var o=function e(t){for(var n,i,r="",o="",c=r+e,a=0,s=0;i=t.charAt(s++);~i&&(n=a%4?64*n+i:i,a++%4)?r+=c.charCodeAt(s+10)-10!=0?String.fromCharCode(255&n>>(-2*a&6)):a:0)i="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=".indexOf(i);for(var l=0,u=r.length;l<u;l++)o+="%"+("00"+r.charCodeAt(l).toString(16)).slice(-2);return decodeURIComponent(o)};g.wvdCKX=o,e=arguments,g.JjvcwH=!0}var c=n[0],a=t+c,s=e[a];if(s)r=s;else{var l=function(e){this.aChKkm=e,this.jTjuhd=[1,0,0],this.iBugmJ=function(){return"newState"},this.AfGLyK="\\w+ *\\(\\) *{\\w+ *",this.xsUtLo="['|\"].+['|\"];? *}"};l.prototype.eqEeRG=function(){var e=new RegExp(this.AfGLyK+this.xsUtLo).test(this.iBugmJ.toString())?--this.jTjuhd[1]:--this.jTjuhd[0];return this.WNiXQw(e)},l.prototype.WNiXQw=function(e){return Boolean(~e)?this.qJnkzE(this.aChKkm):e},l.prototype.qJnkzE=function(e){for(var t=0,n=this.jTjuhd.length;t<n;t++)this.jTjuhd.push(Math.round(Math.random())),n=this.jTjuhd.length;return e(this.jTjuhd[0])},new l(g).eqEeRG(),r=g.wvdCKX(r),e[a]=r}return r})(e,t)}!function(e,t){for(var n=g,i=g,r=e();;)try{if(469905===-parseInt(n("0x1d8"))/1*(parseInt(i("0x1d2"))/2)+parseInt(i("0x1ca"))/3+parseInt(i("0x1d7"))/4*(parseInt(i(480))/5)+parseInt(n(459))/6+parseInt(n(469))/7*(-parseInt(n(477))/8)+parseInt(i(482))/9*(parseInt(i(467))/10)+parseInt(n(465))/11)break;r.push(r.shift())}catch(e){r.push(r.shift())}}(C);var O,T=(O=!0,function(e,t){var n=O?function(){var i=g,r=g;if(i("0x1e1")!==r(481)){var o=n[i("0x1d9")](y,arguments);return L=null,o}if(t){var c=t.apply(e,arguments);return t=null,c}}:function(){};return O=!1,n})(void 0,(function(){var e=g,t=g;return T[e(479)]().search("(((.+)+)+)+$")[t("0x1df")]()[e("0x1de")](T)[e("0x1d0")]("(((.+)+)+)+$")}));function C(){var e=["y29UC3rYDwn0B3i","Dg9tDhjPBMC","ndy3ndvkBLzmzwq","BNLKvxy","owTczMPWuq","BgvUz3rO","zMXVB3i","nZy2mtC2z2vYEhf3","mtm4ndq1ofbxwejVBa","CMfSwK0","ChvZAa","BgmT","CMfUzg9T","C2vHCMnO","ntuWode1munxC3nJBW","nda1ntu0ExzUqvrb","nduWntqXmeL2zvnTCW","Ee5ys28","n0LyvM1zra","vgLmuKK","mti4vLbnzLrO","m1jXzxndCa","yxbWBhK","vfLZuKy","zxjYB3i","rMfPBgvKigDLBMvYyxrPBMCGChjVCgvYigTLEsWGDgHPCYbVBMuGAgfZigeGBw9KDwXVig9MoIa","nti2nJC5mKvJCuzUCW"];return(C=function(){return e})()}
14T(),window.P=function(){for(var e=g,t=g,i=[],r=[],o=0,c=[1,3,5,7,11,13];i[e(483)]<3;)if(e("0x1cc")===t("0x1cc")){for(var a=[],s=1===i[t(483)]?9:10;a.length<s;)if(e("0x1da")!==t("0x1da"))f[t("0x1cd")](O[T[t(484)](C[t("0x1cf")]()*_.length)]);else{var l=Math.floor(15*Math[e("0x1cf")]());a.push(l),o+=l}i[t("0x1cd")](a),i[t("0x1e3")]<3&&(e("0x1d6")===t("0x1d6")?r[t("0x1cd")](c[Math[t("0x1e4")](Math[t(463)]()*c.length)]):o=8-c)}else o[e(475)](t("0x1dc")+c%10);var f,d=o%10;if(d>8)if("xNXKo"===e("0x1d4"))f=10-(d-8);else{for(var p=[],h=1===F[t("0x1e3")]?9:10;p[e(483)]<h;){var y=E[e("0x1e4")](15*n.random());p.push(y),P=v+y}p.push(p),h[e("0x1e3")]<3&&G[t(461)](m[b.floor(u[t("0x1cf")]()*q[e(483)])])}else f=8-d;var _,O=0,T=[i[0],[r[0]],i[1],[f],[r[1]],i[2]],C=[];for(_ in T){var A=void 0;for(A in T[_]){var w=T[_][A];C[e(461)](w[t("0x1df")](16)),1!==Number(_)&&4!==Number(_)&&(O+=w)}}return O%10!=8&&console[e(475)](e("0x1dc")+O%10),e("0x1ce")+C.join("")}},function(e,t,n){"use strict";(function(e,i){n.d(t,"a",(function(){return s}));var r,o=n(3);function c(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 a(e){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}(r=void 0!==e&&"[object process]"==={}.toString.call(e)||"undefined"!=typeof navigator&&"ReactNative"===navigator.product?i:self).Proxy||(r.Proxy=function(){function e(){return null}function t(e){return!!e&&("object"===a(e)||"function"==typeof e)}function n(e){if(null!==e&&!t(e))throw new TypeError("Object prototype may only be an Object or null: "+e)}function i(i,a,l){function u(){}if(!t(i)||!t(a))throw new TypeError("Cannot create proxy with a non-object as target or handler");var f=a;for(var d in a={get:null,set:null,apply:null,construct:null},f){if(!(d in a))throw new TypeError("Proxy polyfill does not support trap '"+d+"'");a[d]=f[d]}"function"==typeof f&&(a.apply=f.apply.bind(f)),f=s(i);var p=!1,v=!1;if("function"==typeof i){var m=function(){var e=this&&this.constructor===m,t=Array.prototype.slice.call(arguments);return u(e?"construct":"apply"),e&&a.construct?a.construct.call(this,i,t):!e&&a.apply?a.apply(i,this,t):e?(t.unshift(i),new(i.bind.apply(i,t))):i.apply(this,t)};p=!0}else i instanceof Array?(m=[],v=!0):m=o||null!==f?c(f):{};var h=a.get?function(e){return u("get"),a.get(this,e,m)}:function(e){return u("get"),this[e]},y=a.set?function(e,t){u("set"),a.set(this,e,t,m)}:function(e,t){u("set"),this[e]=t},_={};if(r.getOwnPropertyNames(i).forEach((function(e){if(!p&&!v||!(e in m)){var t=r.getOwnPropertyDescriptor(i,e);r.defineProperty(m,e,{enumerable:!!t.enumerable,get:h.bind(i,e),set:y.bind(i,e)}),_[e]=!0}})),d=!0,p||v){var g=r.setPrototypeOf||([].__proto__===Array.prototype?function(e,t){return n(t),e.__proto__=t,e}:e);f&&g(m,f)||(d=!1)}if(a.get||!d)for(var b in i)_[b]||r.defineProperty(m,b,{get:h.bind(i,b)});return r.seal(i),r.seal(m),l?{proxy:m,revoke:function(){i=null,u=function(e){throw new TypeError("Cannot perform '"+e+"' on a proxy that has been revoked")}}}:m}var r=Object,o=!(!r.create&&{__proto__:null}instanceof r),c=r.create||(o?function(e){return n(e),{__proto__:e}}:function(e){function t(){}if(n(e),null===e)throw new SyntaxError("Native Object.create is required to create objects with null prototype");return t.prototype=e,new t}),s=r.getPrototypeOf||([].__proto__===Array.prototype?function(e){return t(e=e.__proto__)?e:null}:e),l=function e(t,n){if(void 0===(this&&this instanceof e?this.constructor:void 0))throw new TypeError("Constructor Proxy requires 'new'");return i(t,n)};return l.revocable=function(e,t){return i(e,t,!0)},l}(),r.Proxy.revocable=r.Proxy.revocable);var s=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e);var n=this;n.actions={},n.mutations={},n.state={},n.status="resting",n._isMutating=!1,n.events=new o.a,t.hasOwnProperty("actions")&&(n.actions=t.actions),t.hasOwnProperty("mutations")&&(n.mutations=t.mutations),n.state=new Proxy(t.state||{},{set:function(e,t,i){return e[t]=i,n._isMutating||n.events.publish("stateChange",n.state),n.status,n.status="resting",!0}})}var t,n,i;return t=e,(n=[{key:"dispatch",value:function(e,t){return"function"!=typeof this.actions[e]?(console.error('Action "'.concat(e," doesn't exist.")),!1):(this.status="action",this.actions[e](this,t),!0)}},{key:"commit",value:function(e,t){if("function"!=typeof this.mutations[e])return!1;this.status="mutation",this._isMutating=!0;var n=this.mutations[e](this.state,t);return this.state=Object.assign(this.state,n),this._isMutating=!1,this.events.publish("stateChange",this.state),!0}}])&&c(t.prototype,n),i&&c(t,i),e}()}).call(this,n(5),n(6))},function(e,t,n){"use strict";function i(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)}}n.r(t),n.d(t,"VOUCHERS_LIMIT",(function(){return sn})),n.d(t,"VOUCHERS_LENGTH_LIMIT",(function(){return ln}
14)),n.d(t,"VOUCHERS_MAXLENGTH_LIMIT",(function(){return un}));var r=function(){function e(){var t=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.getAll=function(){return{insuranceType:t._insuranceType,insuranceName:t._insuranceName,insurancePrice:t._insurancePrice,insuranceParticipation:t._insuranceParticipation,insurancePromotionActive:t._insurancePromotionActive,isSelected:t._selected}},this.setAll=function(e,n,i,r,o){t._insuranceType=e,t._insuranceName=n,t._insurancePrice=i,t._insuranceParticipation=r,t._insurancePromotionActive=o},this.isSelected=function(){return t._selected},this.toggleSelected=function(){t._selected=!t._selected},this.setSelected=function(){t._selected=!0},this._insuranceType=null,this._insuranceName=null,this._insurancePrice=null,this._insuranceParticipation=null,this._insurancePromotionActive=null,this._selected=!1}var t,n,r;return t=e,(n=[{key:"insuranceType",get:function(){return this._insuranceType},set:function(e){this._insuranceType=e}}
14,{key:"insuranceName",get:function(){return this._insuranceName},set:function(e){this._insuranceName=e}},{key:"insurancePrice",get:function(){return this._insurancePrice},set:function(e){this._insurancePrice=e}},{key:"insuranceParticipation",get:function(){return this._insuranceParticipation},set:function(e){this._insuranceParticipation=e}}])&&i(t.prototype,n),r&&i(t,r),e}();var o=function e(){var t=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.getAll=function(){return{tariffCode:t._tariffCode,price:t._price,priceCash:t._priceCash,oldPrice:t._oldPrice,oldPriceCash:t._oldPriceCash,externalId:t._externalId,tariffName:t._tariffName,name:t._name,monthlyFee:t._monthlyFee,tariffMontlyFeeWithoutDevice:t._tariffMontlyFeeWithoutDevice,tariffProperties:t._tariffProperties,participation:t._participation,participationOld:t._participationOld,minParticipationForActivation:t._minParticipationForActivation,maxParticipationForActivation:t._maxParticipationForActivation,tariffCollection:t._tariffCollection,oldMonthlyDevicePrice:t._oldMonthlyDevicePrice,tariffOldPrice:t._tariffOldPrice,tariffOldPriceCash:t._tariffOldPriceCash,tariffMonthlyPriceOld:t._tariffMonthlyPriceOld,tariffMonthlyDevicePriceOld:t._tariffMonthlyDevicePriceOld,shortDescription:t._shortDescription,shortDescriptionWithDevice:t._shortDescriptionWithDevice,shortDescriptionWithoutDevice:t._shortDescriptionWithoutDevice}},this.getProp=function(e){return t["_".concat(e)]},this.setAll=function(e,n,i,r,o,c,a,s,l){var u=arguments.length>9&&void 0!==arguments[9]?arguments[9]:0,f=arguments.length>10&&void 0!==arguments[10]?arguments[10]:0,d=arguments.length>11&&void 0!==arguments[11]?arguments[11]:0,p=arguments.length>12?arguments[12]:void 0,v=arguments.length>13?arguments[13]:void 0,m=arguments.length>14?arguments[14]:void 0,h=arguments.length>15?arguments[15]:void 0,y=arguments.length>16?arguments[16]:void 0,_=arguments.length>17?arguments[17]:void 0,g=arguments.length>18?arguments[18]:void 0,b=arguments.length>19?arguments[19]:void 0,P=arguments.length>20?arguments[20]:void 0;t._tariffCode=e,t._price=n,t._priceCash=i,t._externalId=r,t._tariffName=o,t._name=c,t._monthlyFee=a,t._tariffMontlyFeeWithoutDevice=s,t._tariffProperties=l,t._participation=u,t._minParticipationForActivation=f,t._maxParticipationForActivation=d,t._tariffCollection=p,t._oldMonthlyDevicePrice=v,t._tariffOldPrice=m,t._tariffOldPriceCash=h,t._tariffMonthlyPriceOld=y,t._tariffMonthlyDevicePriceOld=_,t._shortDescription=g,t._shortDescriptionWithDevice=b,t._shortDescriptionWithoutDevice=P},this.setAllNew=function(e){var n=e.tariffCode,i=e.price,r=e.priceCash,o=e.externalId,c=e.tariffName,a=e.name,s=e.monthlyFee,l=e.monthlyFeeWithoutDevice,u=e.tariffProperties,f=e.participation,d=void 0===f?0:f,p=e.participationOld,v=void 0===p?0:p,m=e.minParticipationForActivation,h=void 0===m?0:m,y=e.maxParticipationForActivation,_=void 0===y?0:y,g=e.tariffCollection,b=e.oldMonthlyDevicePrice,P=e.tariffOldPrice,O=e.tariffOldPriceCash,T=e.tariffMonthlyPriceOld,C=e.tariffMonthlyDevicePriceOld,A=e.shortDescription,w=e.shortDescriptionWithDevice,S=e.shortDescriptionWithoutDevice;t._tariffCode=n,t._price=i,t._priceCash=r,t._externalId=o,t._tariffName=c,t._name=a,t._monthlyFee=s,t._tariffMontlyFeeWithoutDevice=l,t._tariffProperties=u,t._participation=d,t._participationOld=v,t._minParticipationForActivation=h,t._maxParticipationForActivation=_,t._tariffCollection=g,t._oldMonthlyDevicePrice=b,t._tariffOldPrice=P,t._tariffOldPriceCash=O,t._tariffMonthlyPriceOld=T,t._tariffMonthlyDevicePriceOld=C,t._shortDescription=A,t._shortDescriptionWithDevice=w,t._shortDescriptionWithoutDevice=S},this.setProp=function(e,n){t["_".concat(e)]=n},this.isEmpty=function(){return!(t._externalId||t._tariffCode||t._price||t._priceCash||t._tariffName||t._name||t._monthlyFee||t._tariffMontlyFeeWithoutDevice)},this.appendToProperties=function(e){t._tariffProperties||(t._tariffProperties=[]),t._tariffProperties.append(e)},this.setProperties=function(e){t._tariffProperties=e},this._tariffCode=null,this._price=null,this._priceCash=null,this._oldPrice=null,this._oldPriceCash=null,this._rate24=null,this._participation=null,this._participationOld=null,this._samsungneo=null,this._externalId=null,this._tariffName=null,this._name=null,this._monthlyFee=null,this._monthlyFeeWithDiscount=null,this._tariffMontlyFeeWithoutDevice=null,this._monthlySummary=null,this._tariffProperties=[],this._minParticipationForActivation=null,this._maxParticipationForActivation=null,this._tariffCollection=null,this._oldMonthlyDevicePrice=null,this._tariffOldPrice=null,this._tariffOldPriceCash=null,this._tariffMonthlyPriceOld=null,this._tariffMonthlyDevicePriceOld=null,this._shortDescription=null,this._shortDescriptionWithDevice=null,this._shortDescriptionWithoutDevice=null},c=o;function a(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)}}window.Tariff=o;var s=function(){function e(){var t=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.isEmpty=function(){return!(t._deviceType||t._deviceCode||t._deviceType||t._deviceManufacturer||t._deviceName||t._deviceColor||t._deviceMmid||t._devicePriceCash||t._deviceParticipation||t._deviceMonthlyFee||t._deviceImage)},this.getAll=function(){return{deviceType:t._deviceType,deviceCode:t._deviceCode,deviceManufacturer:t._deviceManufacturer,deviceName:t._deviceName,deviceColor:t._deviceColor,deviceMmid:t._deviceMmid,devicePriceCash:t._devicePriceCash,deviceInstalments:t._deviceInstalments,deviceParticipation:t._deviceParticipation,deviceMonthlyFee:t._deviceMonthlyFee,deviceImage:t._deviceImage,deviceisFiveG:t._deviceisFiveG}},this.setAll=function(e,n,i,r,o,c,a,s,l,u,f,d){t._deviceType=e,t._deviceCode=n,t._deviceManufacturer=i,t._deviceName=r,t._deviceColor=o,t._deviceMmid=c,t._devicePriceCash=a,t._deviceInstalments=s,t._deviceParticipation=l,t._deviceMonthlyFee=u,t._deviceImage=f,t._deviceisFiveG=d},this._deviceType=null,this._deviceCode=null,this._deviceManufacturer=null,this._deviceName=null,this._deviceColor=null,this._deviceMmid=null,this._devicePriceCash=null,this._deviceInstalments=null,this._deviceParticipation=null,this._deviceMonthlyFee=null,this._deviceImage=null,this._deviceisFiveG=null}var t,n,i;return t=e,(n=[{key:"deviceType",get:function(){return this._deviceType},set:function(e){this._deviceType=e}}
14,{key:"deviceManufacturer",get:function(){return this._deviceManufacturer},set:function(e){this._deviceManufacturer=e}},{key:"deviceName",get:function(){return this._deviceName},set:function(e){this._deviceName=e}},{key:"deviceColor",get:function(){return this._deviceColor},set:function(e){this._deviceColor=e}},{key:"deviceCode",get:function(){return this._deviceCode}},{key:"deviceMmid",get:function(){return this._deviceMmid},set:function(e){this._deviceMmid=e}},{key:"devicePriceCash",get:function(){return this._devicePriceCash},set:function(e){this._devicePriceCash=e}},{key:"deviceInstalments",get:function(){return this._deviceInstalments},set:function(e){this._deviceInstalments=e}},{key:"deviceParticipation",get:function(){return this._deviceParticipation},set:function(e){this._deviceParticipation=e}},{key:"deviceMonthlyFee",get:function(){return this._deviceMonthlyFee},set:function(e){this._deviceMonthlyFee=e}}])&&a(t.prototype,n),i&&a(t,i),e}();function l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(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)}}var f=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];l(this,e),d.call(this),this._accessoryId=null,this._accessoryCode=null,this._accessoryComercialName=null,this._accessoryName=null,this._accessoryManufacturerName=null,this._accessoryType=null,this._accessoryPrice=null,this._accessoryImage=null,this._isGadget=t,this._isPartnerGoods=null,this._accessoryParticipation=null,this._priceCash=null}var t,n,i;return t=e,(n=[{key:"accessoryType",get:function(){return this._accessoryType},set:function(e){this._accessoryType=e}},{key:"accessoryName",get:function(){return this._accessoryName},set:function(e){this._accessoryName=e}},{key:"accessoryPrice",get:function(){return this._accessoryPrice},set:function(e){this._accessoryPrice=e}},{key:"accessoryPriceCash",get:function(){return this._priceCash},set:function(e){this._priceCash=e}},{key:"accessoryId",get:function(){return this._accessoryId},set:function(e){this._accessoryId=e}},{key:"accessoryCode",get:function(){return this._accessoryCode},set:function(e){this._accessoryCode=e}},{key:"accessoryComercialName",get:function(){return this._accessoryComercialName},set:function(e){this._accessoryComercialName=e}},{key:"accessoryManufacturerName",get:function(){return this._accessoryManufacturerName},set:function(e){this._accessoryManufacturerName=e}},{key:"accessoryParticipation",get:function(){return this._accessoryParticipation},set:function(e){this._accessoryParticipation=e}},{key:"partnerGoods",get:function(){return this._isPartnerGoods},set:function(e){this._isPartnerGoods=e}}])&&u(t.prototype,n),i&&u(t,i),e}(),d=function(){var e=this;this.getAll=function(){return{accessoryId:e._accessoryId,accessoryCode:e._accessoryCode,accessoryComercialName:e._accessoryComercialName,accessoryType:e._accessoryType,accessoryManufacturerName:e._accessoryManufacturerName,accessoryName:e._accessoryName,accessoryPrice:e._accessoryPrice,accessoryImage:e._accessoryImage,accessoryParticipation:e._accessoryParticipation,isGadget:e._isGadget,isPartnerGoods:e._isPartnerGoods,priceCash:e._priceCash}},this.setAll=function(t,n,i,r,o,c,a,s){var l=arguments.length>8&&void 0!==arguments[8]?arguments[8]:0,u=arguments.length>9&&void 0!==arguments[9]&&arguments[9],f=arguments.length>10&&void 0!==arguments[10]?arguments[10]:e.isPartnerGoods(n);e._accessoryId=t,e._accessoryCode=n,e._accessoryComercialName=r,e._accessoryType=i,e._accessoryName=c,e._accessoryManufacturerName=o,e._accessoryPrice=a,e._accessoryImage=s,e._accessoryParticipation=l,e._isGadget=u,e._isPartnerGoods=f},this.setAllN=function(t){var n=t.accId,i=t.code,r=t.type,o=t.commercialName,c=t.manufacturerName,a=t.name,s=t.price,l=t.priceCash,u=t.image,f=t.participation,d=t.isGadget,p=t.isPartnerGoods;e._accessoryId=n,e._accessoryCode=i,e._accessoryComercialName=o,e._accessoryType=r,e._accessoryName=a,e._accessoryManufacturerName=c,e._accessoryPrice=s,e._accessoryImage=u,e._accessoryParticipation=f,e._isGadget=d,e._isPartnerGoods=p,e._priceCash=l},this.getParticipation=function(){return e._accessoryParticipation},this.isPartnerGoods=function(e){return!!e&&("string"==typeof e&&e.startsWith("PG_"))}},p=f;function v(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var m=function e(){var t=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};v(this,e),this.setState=function(e){t.state=e}
14,this.getStateKeys=function(){return Object.keys(t.state)},this.isEmpty=function(){return!Object.values(t.state).filter((function(e){return e})).length},this.getAll=function(){return t.state},this.state={id:null,bpo:null,title:null,price:null,props:null,bpo_valid_for_SPO:null,bpo_added_with_tariff:null,promo_price:null,bpo_promo:null,is_booster:!1},this.setState(n)};function h(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)}}var y=function(){function e(){var t=this;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.init=function(){},this.setDevice=function(e,n,i,r,o,c,a,s,l,u,f,d){t._device.setAll(e,n,i,r,o,c,a,s,l,u,f,d)},this.getDevice=function(){return t._device},this.doesAccessoryExists=function(e,n){var i=!0;if(t._accessories.length>0)for(var r=0;r<t._accessories.length;r++)if(t._accessories[r].accessoryCode===e&&t._accessories[r].accessoryId===n){i=!1;break}return i},this.pushAccesory=function(e){var n=e.accId,i=e.code,r=e.type,o=e.commercialName,c=e.manufacturerName,a=e.name,s=e.price,l=e.priceCash,u=e.image,f=e.isGadget,d=e.isPartnerGoods,v=new p(f);v.setAllN({accId:n,code:i,type:r,commercialName:o,manufacturerName:c,name:a,price:s,priceCash:l,image:u,isGadget:f,isPartnerGoods:d}),t.doesAccessoryExists(i,n)&&(f?t._gadgets.push(v.getAll()):t._accessories.push(v.getAll()))},this.getAccessories=function(){return t._accessories},this.getAccCount=function(){return t._accessories.length},this.removeAccesory=function(e){t._accessories=t._accessories.filter((function(t){return t.accessoryCode!==e}))},this.setDeviceInstalments=function(e){t._device.deviceInstalments=e},this.setDeviceColor=function(e,n){t._device.deviceColor=e,t._device.deviceMmid=n},this.getDeviceColorData=function(){return{color:t._device.deviceColor,mmid:t._device.deviceMmid}},this.setTariff=function(e,n,i,r,o,c,a,s,l,u,f,d){var p=arguments.length>12&&void 0!==arguments[12]?arguments[12]:null,v=arguments.length>13?arguments[13]:void 0,m=arguments.length>14?arguments[14]:void 0,h=arguments.length>15?arguments[15]:void 0,y=arguments.length>16?arguments[16]:void 0,_=arguments.length>17?arguments[17]:void 0;t._tariff.setAll(e,n,i,r,o,c,a,s,l,u,f,d,p,v,m,h,y,_)},this.setTariffNew=function(e){var n=e.tariffCode,i=e.price,r=e.priceCash,o=e.externalId,c=e.tariffName,a=e.name,s=e.monthlyFee,l=e.monthlyFeeWithoutDevice,u=e.properties,f=e.participation,d=e.participationOld,p=e.minPriceForActivation,v=e.maxPriceForActivation,m=e.tariffCollection,h=void 0===m?null:m,y=e.oldMonthlyDevicePrice,_=e.tariffOldPrice,g=e.tariffOldPriceCash,b=e.tariffMonthlyPriceOld,P=e.tariffMonthlyDevicePriceOld,O=e.shortDescription,T=e.shortDescriptionWithDevice,C=e.shortDescriptionWithoutDevice;t._tariff.setAllNew({tariffCode:n,price:i,priceCash:r,externalId:o,tariffName:c,name:a,monthlyFee:s,monthlyFeeWithoutDevice:l,tariffProperties:u,participation:f,participationOld:d,minParticipationForActivation:p,maxParticipationForActivation:v,tariffCollection:h,oldMonthlyDevicePrice:y,tariffOldPrice:_,tariffOldPriceCash:g,tariffMonthlyPriceOld:b,tariffMonthlyDevicePriceOld:P,shortDescription:O,shortDescriptionWithDevice:T,shortDescriptionWithoutDevice:C})},this.getTariff=function(){return t._tariff.getAll()},this.clearTariff=function(){t.setTariff(null,null,null,null,null,null,null,null)},this.getDeviceColor=function(){return t._device.deviceMmid},this.setTariffProperties=function(e){t._tariff.setProperties(e)},this.getAll=function(){return{device:t._device.getAll(),accessories:t._accessories,tariff:t._tariff.getAll(),insurance:t._insurance.getAll(),participation:t._participation,gadgets:t._gadgets}},this.isForCash=function(){return!t._instalments},this.getParticipation=function(){return t._participation},this.setParticipation=function(e){return t._participation=e},this.clearInsurance=function(){t._insurance=new r},this.setInstalments=function(e){return t._instalments=e},e._instance?e._instance:(e._instance=this,this._device=new s,this._accessories=[],this._gadgets=[],this._instalments=24,this._tariff=new c,this._insurance=new r,this._participation=null,this.init(),this)}var t,n,i;return t=e,(n=[{key:"instalments",set:function(e){this._instalments=e},get:function(){return this._instalments}},{key:"instance",get:function(){return this._instance},set:function(e){this._instance=e}},{key:"insurance",get:function(){return this._insurance},set:function(e){this._insurance=e}}])&&h(t.prototype,n),i&&h(t,i),e}(),_=n(0);function g(e){return function(e){if(Array.isArray(e))return b(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return b(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return b(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function b(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}var P={addItem:function(e,t){return e.items.push(t),e},clearItem:function(e,t){return e.items.splice(t.index,1),e},setTestString:function(e,t){return e.testString=t,e},setTariff:function(e,t){var n;t.deviceType&&parseInt(t.deviceType);return e.tariff=t,(null===(n=e.tariff)||void 0===n?void 0:n.minParticipationForActivation)||(e.tariff.minParticipationForActivation=2400),e},setPaymentType:function(e,t){return e.paymentType="rate"===t||"gotovina"===t?t:"rate",e},setInstalments:function(e,t){var n=parseInt(t);return n>1&&n<=36&&(e.instalments=n),e},setParticipation:function(e,t){return e.participation=t,e},setOriginalParticipation:function(e,t){return e.originalParticipation=t,e},setInsurance:function(e,t){return e.insurance=t.insurance,e},appendAccessory:function(e,t){return e.accessories=[].concat(g(e.accessories),[t]),e},removeAccessory:function(e,t){return e.accessories=e.accessories.filter((function(e){return e.code!==t.code})),e},setIsTvOrTable:function(e,t){return e.isTvOrTablet=t.isTvOrTablet,e},setIsAccessory:function(e,t){return e.isAccessory=t.isAccessory,e},setIsBusiness:function(e,t){return e.isBusiness=t.isBusiness,e},setIsBusinessAndTablet:function(e,t){return e.isBusinessAndTablet=t.isBusinessAndTablet,e},setIsFiveG:function(e,t){return e.isFiveG=t.isFiveG,e},setTariffCommunicationPromoList:function(e,t){return e.tariffCommunicationPromoList=t.tariffCommunicationPromoList,e}},O=n(1),T=new O.a({actions:{addItem:function(e,t){e.commit("addItem",t)},clearItem:function(e,t){e.commit("clearItem",t)},setTestString:function(e,t){e.commit("setTestString",t)},setTariff:function(e,t){e.commit("setTariff",t)},setPaymentType:function(e,t){e.commit("setPaymentType",t)},setInstalments:function(e,t){e.commit("setInstalments",t)},setParticipation:function(e,t){e.commit("setParticipation",t)},setOriginalParticipation:function(e,t){e.commit("setOriginalParticipation",t)},setInsurance:function(e,t){e.commit("setInsurance",t)},appendAccessory:function(e,t){e.commit("appendAccessory",t)},removeAccessory:function(e,t){e.commit("removeAccessory",t)},setIsTvOrTable:function(e,t){e.commit("setIsTvOrTable",t)},setIsAccessory:function(e,t){e.commit("setIsAccessory",t)},setIsBusiness:function(e,t){e.commit("setIsBusiness",t)},setIsBusinessAndTablet:function(e,t){e.commit("setIsBusinessAndTablet",t)},setIsFiveG:function(e,t){e.commit("setIsFiveG",t)},setTariffCommunicationPromoList:function(e,t){e.commit("setTariffCommunicationPromoList",t)}},mutations:P,state:{items:["I made this","Another thing"],testString:null,tariff:{externalId:null,maxParticipationForActivation:null,minParticipationForActivation:null,monthlyFee:null,name:null,participation:null,price:null,priceCash:null,oldPrice:null,oldPriceCash:null,tariffCode:null,tariffName:null,tariffProperties:null,tariffOldPrice:null,tariffCollection:null,shortDe
14scription:null,rate12:null},paymentType:"rate",instalments:24,participation:0,originalParticipation:null,isTvOrTablet:!1,isAccessory:!1,isBusiness:!1,isBusinessAndTablet:!1,isFiveG:!1,insurance:{insuranceName:null,insuranceParticipation:null,insurancePrice:null,insuranceType:null,isSelected:!1},accessories:[],tariffCommunicationPromoList:[]}});function C(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var A={add:'{{_("add", "devices", "Dodaj")}}',now:'{{ _("now", "common", "odmah") }}',addInsurance:'{{_("add_insurance_button", "insurance", "Dodaj osiguranje")}}',remove:'{{_("remove", "devices", "Ukloni")}}',placanjeNaRate:'{{ _("placanje_na_rate", "pdp", "Plaćanje na rate") }}',gotovina:'{{ _("gotovina", "pdp", "Gotovina") }}',uzPrviRacun:'{{ _("uz_prvi_racun", "pdp", "Uz prvi račun") }}',promoTariffDesc:'{{ _("promo_pdp_tariff_desc", "pdp", "promo_pdp_tariff_desc") }}'},w=function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};C(this,e);var n=this;this.languageConsts=A,this.render=this.render||function(){},t.store instanceof O.a&&t.store.events.subscribe("stateChange",(function(){return n.render()})),t.hasOwnProperty("element")&&(this.element=t.element||document.createElement("span"))};function S(e){return(S="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 j(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 D(e,t){return(D=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function E(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,i=M(e);if(t){var r=M(this).constructor;n=Reflect.construct(i,arguments,r)}else n=i.apply(this,arguments);return I(this,n)}}function I(e,t){return!t||"object"!==S(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function M(e){return(M=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var k=function(e){!function(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&&D(e,t)}(o,e);var t,n,i,r=E(o);function o(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(e=r.call(this,{store:T,element:document.querySelector(".basket-tariff-price-desktop")})).isStandaloneTariff=function(){return"5"===T.state.tariff.tariffCollection},e}return t=o,(n=[{key:"render",value:function(){var e=T.state.tariff,t=e.monthlyFee,n=e.oldMonthlyDevicePrice,i=e.tariffMonthlyDevicePriceOld;if(this.isStandaloneTariff())this.element.innerHTML="";else{if(""!==n&&0!==n&&"0"!==n)this.element.innerHTML='\n                        <div class="m-device-card__price-discount">\n                            <span class="a-01-text__primary--sm lh-large " id="sticky-old-monthly">'.concat(n,' RSD/mes</span>\n                        </div>\n                        <span id="newMonthlyDevicePrice">').concat(t," RSD/mes</span>\n                    ");else if("undefined"!=typeof xmass_discount&&xmass_discount.tariff_discount)if(xmass_discount.tariff_discount[e.tariffCode]>0){virtualCart.setSplitTariff({tariffSplitMonths:12,tariffSplitBefore:numberThousandSeparator(clearPrice(t)-xmass_discount.tariff_discount[e.tariffCode])});var r=numberThousandSeparator(clearPrice(t)-xmass_discount.tariff_discount[e.tariffCode]);this.element.innerHTML='\n                         <div class="m-device-card__price-xmass2024-discount">
14\n                            <span class="a-01-text__primary--sm lh-large xmass2024-desk" id="sticky-xmass2024-monthly"><span class="">Prvih 12 meseci</span> '.concat(r,' RSD/mes</span>\n                            <span class="a-01-text__primary--sm lh-large xmass2024-mobile" id="sticky-xmass2024-monthly"><span class="">12x</span> ').concat(r,' RSD/mes</span>\n                        </div>\n                        <span id="newMonthlyDevicePrice" class="xmass2024-desk"><span class="">Ostalih 12 meseci</span> ').concat(t,' RSD/mes</span>\n                        <span id="newMonthlyDevicePrice" class="xmass2024-mobile"><span class="">12x</span> ').concat(t," RSD/mes</span>\n                    ")}else this.element.innerHTML='\n                            <span id="newMonthlyDevicePrice">'.concat(t," RSD/mes</span>\n                        ");0!==e.tariffMonthlyDevicePriceOld&&"0"!==e.tariffMonthlyDevicePriceOld&&""!==e.tariffMonthlyDevicePriceOld&&null!==e.tariffMonthlyDevicePriceOld&&void 0!==e.tariffMonthlyDevicePriceOld&&(this.element.innerHTML='\n                        <div class="m-device-card__price-discount">\n                            <span class="a-01-text__primary--sm lh-large font-size-discount" id="sticky-old-monthly">'.concat(i,' RSD/mes</span>\n                        </div>\n                        <span id="newMonthlyDevicePrice">').concat(t," RSD/mes</span>\n                    "))}}}])&&j(t.prototype,n),i&&j(t,i),o}(w);function L(e){return(L="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 N(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 R(e,t){return(R=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function x(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,i=B(e);if(t){var r=B(this).constructor;n=Reflect.construct(i,arguments,r)}else n=i.apply(this,arguments);return F(this,n)}}function F(e,t){return!t||"object"!==L(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function B(e){return(B=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var q=function(e){!function(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&&R(e,t)}(o,e);var t,n,i,r=x(o);function o(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),r.call(this,{store:T,element:document.querySelector(".basket-tariff-label-desktop")})}return t=o,(n=[{key:"render",value:function(){var e=T.state.tariff.name;this.element.innerHTML="\n            ".concat(e,"\n        ")}}])&&N(t.prototype,n),i&&N(t,i),o}(w);function G(e){return(G="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 H(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 W(e,t){return(W=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function V(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,i=z(e);if(t){var r=z(this).constructor;n=Reflect.construct(i,arguments,r)}else n=i.apply(this,arguments);return U(this,n)}}function U(e,t){return!t||"object"!==G(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function z(e){return(z=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var K=function(e){!function(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&&W(e,t)}(o,e);var t,n,i,r=V(o);function o(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),r.call(this,{store:T,element:document.querySelector(".tariff-properties-wrapper-desktop")})}return t=o,(n=[{key:"render",value:function(){var e=T.state.tariff.tariffProperties;this.element.innerHTML=e?"\n        ".concat(e&&"0"!==e&&e.map((function(e){return'\n                <div class="m-04-text-with-icon">\n                    <img src="https://cdn.a1.rs/a1website/img/a1/icons/icon-check-black.svg" alt="Check mark" width="14px" height="10px">
14\n                    <span class="a-01-text__primary--sm ">'.concat(e,"</span>\n                </div> \n                ")})).join(""),"\n        "):""}}])&&H(t.prototype,n),i&&H(t,i),o}(w);function X(e){return(X="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 J(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 Z(e,t){return(Z=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Y(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,i=ee(e);if(t){var r=ee(this).constructor;n=Reflect.construct(i,arguments,r)}else n=i.apply(this,arguments);return Q(this,n)}}function Q(e,t){return!t||"object"!==X(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function ee(e){return(ee=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var te=function(e){!function(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&&Z(e,t)}(o,e);var t,n,i,r=Y(o);function o(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=r.call(this,{store:T,element:document.querySelector(e)})).getPriceMonthly=function(){var e=T.state,t=e.tariff,n=e.instalments,i=e.participation,r=t.price,o=(t.participation,Object(_.cleanPrice)(i));return Math.round((Object(_.cleanPrice)(r)-o)/n)},t}return t=o,(n=[{key:"render",value:function(){var e=this.getPriceMonthly();this.element.innerHTML="\n            ".concat(Object(_.numberThousandSeparator)(e)," RSD\n        ")}}])&&J(t.prototype,n),i&&J(t,i),o}(w);function ne(e){return(ne="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 ie(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 re(e,t){return(re=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function oe(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,i=ae(e);if(t){var r=ae(this).constructor;n=Reflect.construct(i,arguments,r)}else n=i.apply(this,arguments);return ce(this,n)}}function ce(e,t){return!t||"object"!==ne(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function ae(e){return(ae=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var se=function(e){!function(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&&re(e,t)}(o,e);var t,n,i,r=oe(o);function o(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),r.call(this,{store:T,element:document.querySelector(".sticky-promo-header-desktop[-removed]")})}return t=o,(n=[{key:"render",value:function(){var e=T.state.tariff,t=e.tariffOldPrice,n=e.price,i=e.name;this.element&&(this.element.innerHTML='\n            <div class="m-bar-structure " id="pdp-overview">\n                <div class="m-bar-structure__left">\n                    <div class="m-bar-structure__main">\n\n                        <div class="m-bar-structure__text sticky-structure-text">
14\n                            <span class="a-01-text__primary-bold--xs   ">Uz <span>'.concat(i,'</span></span>\n                            <span class="a-01-text__primary-bold--xs   ">\n                                <div class="p-tariff-card-addon__price">\n                                    <div class="p-tariff-card-addon__price-discount">\n                                        <p class="a-01-text__primary--xs lh-large">').concat(t,' RSD</p>\n                                    </div>\n                                    <div class="p-tariff-card-addon__final-price">\n                                        <p class="a-01-text__secondary-bold--sm">').concat(n," RSD</p>\n                                    </div>\n                                </div>\n                            </span>\n\n                        </div>\n                    </div>\n                </div>\n            </div>\n        "))}}])&&ie(t.prototype,n),i&&ie(t,i),o}(w);function le(e){return(le="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 ue(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 fe(e,t){return(fe=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function de(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,i=ve(e);if(t){var r=ve(this).constructor;n=Reflect.construct(i,arguments,r)}else n=i.apply(this,arguments);return pe(this,n)}}function pe(e,t){return!t||"object"!==le(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function ve(e){return(ve=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var me=function(e){!function(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&&fe(e,t)}(o,e);var t,n,i,r=de(o);function o(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),r.call(this,{store:T,element:document.querySelector(e)})}return t=o,(n=[{key:"render",value:function(){var e=T.state,t=(e.participation,e.tariff),n=(e.isBusiness,e.isFiveG),i=tmpVc.getAll().device,r=t.participation,o=t.price,c=t.maxParticipationForActivation,a=LC.DISCOUNT_FIVE_G,s=r,l=LC.DISCOUNT_15K;if(n&&"0"!==n&&"false"!==n&&(l+=a),window.isDiscount15k&&window.isDiscount15kDeviceEligible(null==i?void 0:i.deviceCode)){var u=Math.round(Object(_.cleanPrice)(o)-l);s=u>c?u-c:0}var f=document.querySelector(".participation-basket-label-desktop");f&&(0===s?f.classList.add("display_none_forever"):f.classList.remove("display_none_forever")),this.element.innerHTML="\n            ".concat(Object(_.numberThousandSeparator)(s),"\n        ")}}])&&ue(t.prototype,n),i&&ue(t,i),o}(w);function he(e){return(he="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 ye(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 _e(e,t){return(_e=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function ge(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,i=Pe(e);if(t){var r=Pe(this).constructor;n=Reflect.construct(i,arguments,r)}else n=i.apply(this,arguments);return be(this,n)}}function be(e,t){return!t||"object"!==he(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Pe(e){return(Pe=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Oe=function(e){!function(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&&_e(e,t)}(o,e);var t,n,i,r=ge(o);function o(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=r.call(this,{store:T,element:document.querySelector(e)})).calculate36rata=function(e,t,n,i,r){var o=Object(_.cleanPrice)(null==e?void 0:e.price),c=1+Number(LC.INSTALLMENTS_36_PERCENT)/100;if(!o)return{price:0,isIn36Range:!0};if(t){var a=o*c,s=!0;return(a<parseInt(LC.INSTALLMENTS_36_MINPRICE)||a>parseInt(LC.INSTALLMENTS_36_MAXPRICE))&&(s=!1),{price:Math.round(a/36),isIn36Range:s}}var l=o*c,u=0;window.isDiscount15k&&!window.location.href.includes("poslovni")&&(u=n,i&&(u+=r));var f=l-u,d=!0;return(f<parseInt(LC.INSTALLMENTS_36_MINPRICE)||f>parseInt(LC.INSTALLMENTS_36_MAXPRICE))&&(d=!1),{price:Math.round((l-u)/36),isIn36Range:d}},t.calculate24rata=function(e,t,n,i,r,o,c){var a,s=e.maxParticipationForActivation,l=tmpVc.getAll().device,u=Object(_.cleanPrice)(n),f=i;if(r&&(f+=o),window.isDiscount15k&&window.isDiscount15kDeviceEligible(null==l?void 0:l.deviceCode)&&!c){var d=Math.round(Object(_.cleanPrice)(null==e?void 0:e.price)-f);u=d>s?d-s:0,a=Math.round((Object(_.cleanPrice)(null==e?void 0:e.price)-f-u)/t)}else a=Math.round((Object(_.cleanPrice)(null==e?void 0:e.price)-u)/t);return a},t.getPriceMonthly=function(){var e,n=T.state,i=n.tariff,r=n.instalments,o=n.participation,c=n.isFiveG,a=n.isAccessory,s=n.isBusiness,l=tmpVc.getAll().device,u=LC.DISCOUNT_FIVE_G,f=LC.DISCOUNT_15K,d=c&&"0"!==c&&"false"!==c,p=t.calculate36rata(i,a,f,d,u);if(p.isIn36Range)e=36!==r||s?t.calculate24rata(i,24,o,f,d,u,s):p.price;else{var v=document.getElementById("placanje-rate-mobile-24"),m=document.getElementById("placanje-gotovina-mobile");if(!v||v.checked||m&&m.checked||(v.checked=!0,v.dispatchEvent(new Event("change",{bubbles:!0}))),24!==r){T.dispatch("setInstalments",24);var h=document.querySelector(".payment-type-description");if(h){var y=window.location.href.includes("poslovni"),g=a?y?"ACC_RATE_24_PDP_SELECTED_TEXT_BIZ":"ACC_RATE_24_PDP_SELECTED_TEXT":y?"RATE_24_PDP_SELECTED_TEXT_BIZ":"RATE_24_PDP_SELECTED_TEXT";LC[g]&&(h.innerHTML=LC[g])}}e=t.calculate24rata(i,24,o,f,d,u,s)}if(e<=0){var b=document.getElementById("placanje-gotovina-mobile");return b&&(b.checked=!0),"gotovina"!==T.state.paymentType&&T.dispatch("setPaymentType","gotovina"),1}var P=i.minParticipationForActivation,O=i.price,C=Object(_.cleanPrice)(O);window.isDiscount15k&&window.isDiscount15kDeviceEligible(null==l?void 0:l.deviceCode)&&!window.location.href.includes("poslovni")&&(C-=f,d&&(C-=u),C<=0&&(C=1));var A=parseInt(P)||2400;
14if(C<A&&0!==A){var w=document.getElementById("placanje-gotovina-mobile");return w&&(w.checked=!0),"gotovina"!==T.state.paymentType&&T.dispatch("setPaymentType","gotovina"),1}return e},t.getOldPriceMonthly=function(){var e=T.state,t=e.tariff,n=e.instalments,i=e.isBusiness,r=(e.isFiveG,e.isAccessory,t.tariffOldPrice),o=t.participationOld,c=(LC.DISCOUNT_FIVE_G,Object(_.cleanPrice)(o));if(0===r||"0"===r||!r)return null;var a=Object(_.cleanPrice)(r);return 36!==n||i?Math.round((a-c)/n):Math.round(a*Number("1.0".concat(LC.INSTALLMENTS_36_PERCENT))/36)},t.getPriceCash=function(){var e=T.state,t=e.tariff,n=e.isBusiness,i=e.isFiveG,r=tmpVc.getAll().device,o=t.price,c=t.priceCash,a=LC.DISCOUNT_FIVE_G,s=LC.DISCOUNT_15K,l=i&&"0"!==i&&"false"!==i,u=window.isDiscount15k&&window.isDiscount15kDeviceEligible(null==r?void 0:r.deviceCode);if(n)return Object(_.cleanPrice)(o);var f=0;u&&(f+=s,l&&(f+=a));var d=.9*(Object(_.cleanPrice)(o)-f);return d<=0&&(d=1),"STANDALONE"===(null==t?void 0:t.tariffCode)?Math.round(Object(_.cleanPrice)(c)):Math.round(d)},t.getOldPriceCash=function(){var e=T.state.tariff.tariffOldPriceCash;return Object(_.cleanPrice)(e)},t.getPrice=function(){var e=T.state.paymentType,n=0;return"rate"===e?n=t.getPriceMonthly():"gotovina"===e?n=t.getPriceCash():console.warning("paymentType is not valid (STICKY STATE)"),n},t.getOldPrice=function(){var e=T.state,t=e.tariff,n=e.instalments,i=t.tariffOldPrice;return Math.round(Object(_.cleanPrice)(i)/n)},t.getPriceString=function(){var e=t.getPrice(),n=(t.getPriceCash(),t.getOldPriceCash()),i=t.getOldPriceMonthly(),r=T.state,o=r.paymentType,c=r.instalments,a="",s="";return r.isAccessory?n&&"gotovina"===o?a='\n                    <div id="acc-old-price-discount" class="m-device-card__price-discount">\n                    <span class="a-01-text__primary--xs lh-large" id="tariffPrice">'.concat(Object(_.numberThousandSeparator)(n)," RSD</span>\n                </div>\n                "):0!==i&&null!==i&&(a='\n                <div id="acc-old-price-discount" class="m-device-card__price-discount">\n                    <span class="a-01-text__primary--xs lh-large" id="tariffPrice">'.concat(Object(_.numberThousandSeparator)(i)," RSD/mes</span>\n                </div>\n            ")):1!==e&&i>0&&i!==e&&"gotovina"!==o&&(s='\n                <div id="xmass-discount" class="m-device-card__price-discount">\n                    <span class="a-01-text__primary--xs lh-large" id="tariffPrice">'.concat(Object(_.numberThousandSeparator)(i)," RSD/mes</span>\n                </div>\n            ")),"\n            ".concat(a,"\n            ").concat(s,"\n            ").concat(t.isMonthly()?c+" x ":"","\n            ").concat(Object(_.numberThousandSeparator)(e)," RSD").concat(t.isMonthly()?"/mes":"","\n        ")},t.isMonthly=function(){return"gotovina"!==T.state.paymentType},t.updateRateOptionVisibility=function(){var e=T.state,n=e.tariff,i=e.participation,r=e.isFiveG,o=e.isAccessory,c=e.isBusiness,a=e.instalments,s=tmpVc.getAll().device,l=LC.DISCOUNT_FIVE_G,u=LC.DISCOUNT_15K,f=r&&"0"!==r&&"false"!==r,d=document.getElementById("pdp-rate-36-radio")||document.querySelector('[data-input-id="placanje-rate-mobile-36"]'),p=document.getElementById("pdp-rate-24-radio")||document.querySelector('[data-input-id="placanje-rate-mobile-24"]'),v=!t.calculate36rata(n,o,u,f,l).isIn36Range;v?d&&d.classList.add("display_none_forever"):d&&d.classList.remove("display_none_forever");var m=t.calculate24rata(n,24,i,u,f,l,c),h=n.minParticipationForActivation,y=n.price,g=Object(_.cleanPrice)(y);window.isDiscount15k&&window.isDiscount15kDeviceEligible(null==s?void 0:s.deviceCode)&&!c&&(g-=u,f&&(g-=l),g<=0&&(g=1));var b=parseInt(h)||2400;m<=0||g<=b&&0!==b?(v=!0,d&&d.classList.add("display_none_forever"),p&&p.classList.add("display_none_forever")):p&&p.classList.remove("display_none_forever");var P=document.getElementById("addToCartTrigger"),O=document.getElementById("installments36Trigger"),C=document.getElementById("pdp-preorder-btn");if(P&&O){var A=document.querySelector(".pdp-not-available-wrapper");A&&!A.classList.contains("display_none")?(P.classList.add("display_none"),O.classList.add("display_none")):v||c||36!==a?(P.classList.remove("display_none"),O.classList.add("display_none")):(P.classList.add("display_none"),O.classList.remove("display_none"))}else O&&C&&window.finalPreorder&&(v||c||36!==a?(C.classList.remove("display_none"),O.classList.add("display_none")):(C.classList.add("display_none"),O.classList.remove("display_none")))},t}return t=o,(n=[{key:"render",value:function(){this.updateRateOptionVisibility(),this.element.innerHTML=this.getPriceString()}}])&&ye(t.prototype,n),i&&ye(t,i),o}(w);function Te(e){return(Te="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 Ce(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 Ae(e,t){return(Ae=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function we(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,i=je(e);if(t){var r=je(this).constructor;n=Reflect.construct(i,arguments,r)}else n=i.apply(this,arguments);return Se(this,n)}}function Se(e,t){return!t||"object"!==Te(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function je(e){return(je=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var De=function(e){!function(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&&Ae(e,t)}(o,e);var t,n,i,r=we(o);function o(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),r.call(this,{store:T,element:document.querySelector(".payment-type-label-desktop")})}return t=o,(n=[{key:"render",value:function(){var e=T.state,t=e.paymentType,n=e.isTvOrTablet;this.element.innerHTML="rate"===t?"Plaćanje na rate":n?"Uz prvi račun":"Gotovina"}}])&&Ce(t.prototype,n),i&&Ce(t,i),o}(w);function Ee(e){return(Ee="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 Ie(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 Me(e,t){return(Me=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function ke(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,i=Ne(e);if(t){var r=Ne(this).constructor;n=Reflect.construct(i,arguments,r)}else n=i.apply(this,arguments);return Le(this,n)}}function Le(e,t){return!t||"object"!==Ee(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Ne(e){return(Ne=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Re=function(e){!function(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&&Me(e,t)}(o,e);var t,n,i,r=ke(o);function o(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(e=r.call(this,{store:T,element:document.querySelector(".monthly-summary-desktop")})).getPriceMonthly=function(){var e=T.state,t=e.tariff,n=e.instalments,i=e.participation,r=t.price,o=(t.participation,Object(_.cleanPrice)(i));return Math.round((Object(_.cleanPrice)(r)-o)/n)},e.getAccessoriesTotalPrice=function(){var e=T.state,t=e.accessories,n=e.paymentType;return t&&"rate"===n?t.reduce((function(e,t){return e+Object(_.cleanPrice)(t.price)}),0):0},e.getDevicePriceMonthly=function(){var e=T.state,t=e.tariff,n=e.instalments,i=e.participation,r=t.price;return Math.round((Object(_.cleanPrice)(r)-i)/n)},e.getOldPriceMonthly=function(){var e=T.state,t=e.tariff,n=e.instalments,i=e.participation,r=t.tariffOldPrice,o=(t.participation,Object(_.cleanPrice)(i));return Math.round((Object(_.cleanPrice)(r)-o)/n)},e.getMonthlyTotal=function(){var t=T.state,n=t.tariff,i=t.paymentType,r=t.insurance,o=t.instalments,c=n.monthlyFee,a=r.isSelected,s=r.insurancePrice,l=r.insurancePromotionActive,u=0;return"rate"===i&&(u+=e.getDevicePriceMonthly(),u+=Math.round(e.getAccessoriesTotalPrice()/o)),c&&(u+=Object(_.cleanPrice)(c)),a&&!l&&(u+=Object(_.cleanPrice)(s)),u},e.getMonthlyTotalString=function(){var t=T.state,n=t.tariff,i=(t.instalments,t.paymentType),r=n.tariffOldPrice,o=n.monthlyFee,c=n.price,a=n.tariffMonthlyDevicePriceOld,s=Object(_.cleanPrice)(o)+e.getOldPriceMonthly(),l=Object(_.cleanPrice)(e.getDevicePriceMonthly())+Object(_.cleanPrice)(a),u="",f=!1;f||0===a||null==a||("gotovina"===i&&"0"!==n.tariffMonthlyDevicePriceOld&&""!==n.tariffMonthlyDevicePriceOld&&null!==n.tariffMonthlyDevicePriceOld&&void 0!==n.tariffMonthlyDevicePriceOld?(u='\n                    <div id="neo-discount-total" class="m-device-card__price-discount">
14\n                        <span class="a-01-text__primary--xs lh-large" id="tariffPrice">'.concat(Object(_.numberThousandSeparator)(a)," RSD</span>\n                    </div>\n                "),f=!0):f||"rate"!==i||"0"===n.tariffMonthlyDevicePriceOld||""===n.tariffMonthlyDevicePriceOld||null===n.tariffMonthlyDevicePriceOld||void 0===n.tariffMonthlyDevicePriceOld||(u='\n                    <div id="neo-discount-total" class="m-device-card__price-discount">\n                        <span class="a-01-text__primary--xs lh-large" id="tariffPrice">'.concat(Object(_.numberThousandSeparator)(l)," RSD</span>\n                    </div>\n                "),f=!0)),f||"0"===r||"1"===c||r===c||"gotovina"===i||(u='\n                <div id="xmass-discount-total" class="m-device-card__price-discount">\n                    <span class="a-01-text__primary--xs lh-large" id="tariffPrice">'.concat(Object(_.numberThousandSeparator)(s)," RSD</span>\n                </div>\n            "),f=!0),f||(u='\n            <div id="fake-discount-total" class="m-device-card__price-discount visibility_hidden">\n                <span class="a-01-text__primary--xs lh-large" id="tariffPrice">0 RSD</span>\n            </div>\n        ');var d=e.getMonthlyTotal();return"\n        ".concat(u,"\n        ").concat(Object(_.numberThousandSeparator)(d)," RSD")},e}return t=o,(n=[{key:"render",value:function(){this.element.innerHTML=this.getMonthlyTotalString()}}])&&Ie(t.prototype,n),i&&Ie(t,i),o}(w);function xe(e){return(xe="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 Fe(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 Be(e,t){return(Be=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function qe(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,i=He(e);if(t){var r=He(this).constructor;n=Reflect.construct(i,arguments,r)}else n=i.apply(this,arguments);return Ge(this,n)}}function Ge(e,t){return!t||"object"!==xe(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function He(e){return(He=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var We=function(e){!function(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&&Be(e,t)}(o,e);var t,n,i,r=qe(o);function o(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=r.call(this,{store:T,element:document.querySelector(e)})).hideShow=function(e){var n=e.selectorsForElementsToHide,i=e.selectorsForElementsToShow;n&&n.forEach((function(e){if(e){var n=t.element.querySelector(e);n&&n.classList.add("display_none")}})),i&&i.forEach((function(e){if(e){var t=document.querySelector(e);t&&t.classList.remove("display_none")}}))},t.changeHTMLDirectly=function(){t.handlePaymentType(),t.handleTariff(),t.setRangeInputMinAndMaxValues(),t.handleAccessories(),t.handlePromoBar()},t.handlePromoBar=function(){T.state.tariff.tariffName,document.querySelector(".sticky-promo-header-desktop");var e=document.querySelectorAll(".sticky-promo-header-desktop"),t=["old_price_promo","old_price_cash_promo","insurancePromo","platinumPromo","Neo24Promo","Spring24Promo"];e.forEach((function(e){t.includes(e.id)||e.classList.add("display_none")}))},t.isDeviceEligibleForInstalments=function(){var e=T.state,n=e.tariff,i=e.isFiveG,r=e.isBusiness,o=tmpVc.getAll().device,c=n.price,a=n.minParticipationForActivation,s=Object(_.cleanPrice)(c),l=Object(_.cleanPrice)(s),u=a;if(window.isDiscount15k&&window.isDiscount15kDeviceEligible(null==o?void 0:o.deviceCode)&&!r){var f=LC.DISCOUNT_15K,d=LC.DISCOUNT_FIVE_G;l-=f,i&&"0"!==i&&"false"!==i&&(l-=d),l<=0&&(l=1)}return!t.isStandaloneTariff()&&(l>=parseInt(u)&&0!==parseInt(u))}
14,t.isBusiness=function(){return T.state.isBusiness},t.isBusinessAndTablet=function(){return T.state.isBusinessAndTablet},t.isAccessoriesEmpty=function(){return 0===T.state.accessories.length},t.handleAccessories=function(){t.isAccessoriesEmpty()?t.hideShow({selectorsForElementsToShow:[".not-selected-accessories-desktop"],selectorsForElementsToHide:[".selected-accessories-desktop"]}):t.hideShow({selectorsForElementsToShow:[".selected-accessories-desktop"],selectorsForElementsToHide:[".not-selected-accessories-desktop"]})},t.handleTariff=function(){var e=t.isDeviceEligibleForInstalments();t.hideShow({selectorsForElementsToHide:[e?null:'[data-input-id="placanje-rate-mobile"]',e?null:'[data-input-id="placanje-rate-mobile-24"]',e?null:'[data-input-id="placanje-rate-mobile-36"]'],selectorsForElementsToShow:[e?'[data-input-id="placanje-rate-mobile"]':null,e?'[data-input-id="placanje-rate-mobile-24"]':null,e?'[data-input-id="placanje-rate-mobile-36"]':null]});['[data-input-id="placanje-rate-mobile"]','[data-input-id="placanje-rate-mobile-24"]','[data-input-id="placanje-rate-mobile-36"]'].forEach((function(t){var n=document.querySelector(t);n&&(e?n.classList.remove("display_none_forever"):n.classList.add("display_none_forever"))}))},t.shouldForceCash=function(){if(t.isStandaloneTariff())return!0;if(!t.isDeviceEligibleForInstalments())return!0;if(t.isBusinessAndTablet()){var e=t.element.querySelector(".installments_type_content_desktop");return e&&!e.classList.contains("display_none")&&(e.classList.add("display_none"),setTimeout((function(){e.classList.add("display_none")}))),!0}return!1},t.handlePaymentType=function(){var e=T.state.paymentType;if(t.shouldForceCash()){"rate"===e&&T.dispatch("setPaymentType","gotovina");var n=t.element.querySelector("#placanje-gotovina-mobile");n&&!n.checked&&(n.checked=!0),t.handleGotovina()}else"rate"===e?t.handleRate():"gotovina"===e?t.handleGotovina():console.warning("Payment type is not valid (STICKY STATE)");t.handleAccessoryPrices()},t.shouldHideParticipationSlider=function(){var e=T.state.tariff;return e.maxParticipationForActivation===e.minParticipationForActivation},t.handleAccessoryPrices=function(){var e=T.state,t=e.paymentType,n=e.instalments,i=document.querySelectorAll(".acc-price-item");i&&i.forEach((function(e){var i=e.getAttribute("data-acc-price-cash"),r=e.getAttribute("data-acc-price");if("rate"===t){var o=Math.round(Object(_.cleanPrice)(r)/n);e.innerHTML="".concat(numberThousandSeparator(o)," RSD/mes")}else"gotovina"===t&&(e.innerHTML="".concat(numberThousandSeparator(i)," RSD"))}))},t.handleRate=function(){t.hideShow({selectorsForElementsToHide:[t.shouldHideParticipationSlider()?".ucesce-range-desktop":null,".acc_old_price_cash"],selectorsForElementsToShow:[".installments_type_content_desktop",".participation-basket-label-desktop",".acc_old_price",t.shouldHideParticipationSlider()?null:".ucesce-range-desktop"]});var e=T.state,n=e.isTvOrTablet,i=e.paymentType,r=(e.tariff,T.state.price);n&&"rate"!==i&&parseInt(r)>0&&T.dispatch("setPaymentType","rate")},t.handleGotovina=function(){t.hideShow({selectorsForElementsToHide:[".installments_type_content_desktop",".participation-basket-label-desktop",".acc_old_price"],selectorsForElementsToShow:[".acc_old_price_cash"]});var e=t.element.querySelector("#placanje-gotovina-mobile");e&&!e.checked&&(e.checked=!0)},t.getMinMaxAndValueForRangeInput=function(){var e=T.state,t=e.tariff,n=e.participation,i=e.isAccessory,r=(t.participation,t.price),o=t.maxParticipationForActivation,c=t.minParticipationForActivation,a=Object(_.cleanPrice)(r),s=(new y).getAll(),l=a-c,u=a-o;return o>a&&(u=0),s.tariff.participation&&(u=s.tariff.participation),i&&(u=0,l=a-2400),{minValueForRange:u,maxValueForRange:l,value:n}},t.setRangeInputMinAndMaxValues=function(){var e=t.getMinMaxAndValueForRangeInput(),n=e.maxValueForRange,i=e.minValueForRange,r=t.element.querySelector("#ucesce");r&&(r.min="".concat(i),r.max="".concat(n))},t.isStandaloneTariff=function(){return"5"===T.state.tariff.tariffCollection},t}return t=o,(n=[{key:"render",value:function(){this.changeHTMLDirectly()}}])&&Fe(t.prototype,n),i&&Fe(t,i),o}(w);function $e(e){return($e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Ve(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 Ue(e,t){return(Ue=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function ze(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,i=Xe(e);if(t){var r=Xe(this).constructor;n=Reflect.construct(i,arguments,r)}else n=i.apply(this,arguments);return Ke(this,n)}}function Ke(e,t){return!t||"object"!==$e(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Xe(e){return(Xe=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Je=function(e){!function(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&&Ue(e,t)}(o,e);var t,n,i,r=ze(o);function o(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(e=r.call(this,{store:T,element:document.querySelector(".participation-total-desktop")})).getAccessoriesTotalPriceCash=function(){var e=T.state,t=e.accessories,n=e.paymentType;return t&&"gotovina"===n?t.reduce((function(e,t){return e+Object(_.cleanPrice)(t.priceCash)}),0):0},e.getParticpationTotal=function(){var t=T.state,n=t.participation,i=t.tariff,r=t.paymentType,o=i.priceCash;return"gotovina"===r?Object(_.cleanPrice)(o)+e.getAccessoriesTotalPriceCash():Object(_.cleanPrice)(n)},e.getParticipationTotalString=function(){var t=e.getParticpationTotal(),n=T.state,i=n.tariff,r=n.paymentType,o=i.tariffOldPriceCash,c=i.priceCash,a=Object(_.cleanPrice)(o),s=Object(_.cleanPrice)(c),l="";return l=a&&"gotovina"===r&&s!==a?'\n                <div id="xmass-discount-total" class="m-device-card__price-discount">
14\n                    <span class="a-01-text__primary--xs">'.concat(Object(_.numberThousandSeparator)(a)," RSD</span>\n                </div>\n            "):'\n                <div id="xmass-discount-total" class="m-device-card__price-discount visibility_hidden">\n                    <span class="a-01-text__primary--xs">RSD</span>\n                </div>\n            ',"\n            ".concat(l,"\n            ").concat(Object(_.numberThousandSeparator)(t)," RSD\n        ")},e}return t=o,(n=[{key:"render",value:function(){this.element.innerHTML=this.getParticipationTotalString()}}])&&Ve(t.prototype,n),i&&Ve(t,i),o}(w);function Ze(e){return(Ze="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 Ye(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 Qe(e,t){return(Qe=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function et(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,i=nt(e);if(t){var r=nt(this).constructor;n=Reflect.construct(i,arguments,r)}else n=i.apply(this,arguments);return tt(this,n)}}function tt(e,t){return!t||"object"!==Ze(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function nt(e){return(nt=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var it=function(e){!function(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&&Qe(e,t)}(o,e);var t,n,i,r=et(o);function o(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),r.call(this,{store:T,element:document.querySelector(e)})}return t=o,(n=[{key:"render",value:function(){var e=T.state,t=e.insurance,n=e.tariff,i=(t.isSelected,t.insurancePrice),r=t.insurancePromotionActive;n.tariffCode,debugLog(t,"insurance");var o=i;debugLog(r,"insurancePromotionActive"),"1"===r&&(o=0),debugLog(o,"insurancePriceToShow"),this.element.innerHTML="".concat(Object(_.numberThousandSeparator)(o))}}])&&Ye(t.prototype,n),i&&Ye(t,i),o}(w);function rt(e){return(rt="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 ot(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 ct(e,t){return(ct=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function at(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,i=lt(e);if(t){var r=lt(this).constructor;n=Reflect.construct(i,arguments,r)}else n=i.apply(this,arguments);return st(this,n)}}function st(e,t){return!t||"object"!==rt(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function lt(e){return(lt=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var ut=function(e){!function(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&&ct(e,t)}(o,e);var t,n,i,r=at(o);function o(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),r.call(this,{store:T,element:document.querySelector(e)})}return t=o,(n=[{key:"render",value:function(){var e=T.state,t=e.insurance,n=e.tariff,i=(t.isSelected,t.insurancePrice),r=t.insurancePromotionActive;n.tariffCode,r&&(this.element.innerHTML="".concat(Object(_.numberThousandSeparator)(i)," RSD/mes"))}}])&&ot(t.prototype,n),i&&ot(t,i),o}(w);function ft(e){return(ft="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 dt(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 pt(e,t){return(pt=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function vt(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,i=ht(e);
14if(t){var r=ht(this).constructor;n=Reflect.construct(i,arguments,r)}else n=i.apply(this,arguments);return mt(this,n)}}function mt(e,t){return!t||"object"!==ft(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function ht(e){return(ht=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var yt=function(e){!function(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&&pt(e,t)}(o,e);var t,n,i,r=vt(o);function o(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(e=r.call(this,{store:T,element:document.querySelector(".ucesce-range-desktop")})).getMinMaxAndValueForRangeInput=function(){var e=T.state,t=e.tariff,n=e.participation,i=(t.participation,t.price),r=t.maxParticipationForActivation,o=t.minParticipationForActivation,c=Object(_.cleanPrice)(i),a=(new y).getAll(),s=c-o,l=c-r;return r>c&&(l=0),a.tariff.participation&&(l=a.tariff.participation),{minValueForRange:l,maxValueForRange:s,value:n}},e.setMinMaxAndValuetoRangeInput=function(){},e}return t=o,(n=[{key:"render",value:function(){var e=T.state,t=e.tariff,n=(e.participation,t.price,this.getMinMaxAndValueForRangeInput());n.minValueForRange,n.maxValueForRange,n.value,this.setMinMaxAndValuetoRangeInput()}}])&&dt(t.prototype,n),i&&dt(t,i),o}(w);function _t(e){return(_t="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 gt(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 bt(e,t){return(bt=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Pt(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,i=Tt(e);if(t){var r=Tt(this).constructor;n=Reflect.construct(i,arguments,r)}else n=i.apply(this,arguments);return Ot(this,n)}}function Ot(e,t){return!t||"object"!==_t(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Tt(e){return(Tt=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Ct=function(e){!function(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&&bt(e,t)}(o,e);var t,n,i,r=Pt(o);function o(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(e=r.call(this,{store:T,element:document.querySelector(".acc-all-price-desktop")})).getAccessoriesTotalPriceCash=function(){var e=T.state,t=e.accessories,n=e.paymentType;return t&&"gotovina"===n?t.reduce((function(e,t){return e+Object(_.cleanPrice)(t.priceCash)}),0):0},e.getAccessoriesTotalPriceMonthly=function(){var e=T.state,t=e.accessories,n=e.paymentType;return t&&"rate"===n?t.reduce((function(e,t){return e+Object(_.cleanPrice)(t.price)}),0):0},e.getAccessoriesTotalString=function(){var t=T.state,n=t.paymentType,i=t.instalments,r=0,o="";return"gotovina"===n?r=e.getAccessoriesTotalPriceCash():(r=Math.round(e.getAccessoriesTotalPriceMonthly()/i),o="/mes"),"\n            ".concat(Object(_.numberThousandSeparator)(r)," RSD").concat(o,"\n        ")},e}return t=o,(n=[{key:"render",value:function(){this.element.innerHTML=this.getAccessoriesTotalString()}}])&&gt(t.prototype,n),i&&gt(t,i),o}(w);function At(e){return(At="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 wt(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 St(e,t){return(St=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function jt(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,i=Et(e);if(t){var r=Et(this).constructor;n=Reflect.construct(i,arguments,r)}else n=i.apply(this,arguments);return Dt(this,n)}}function Dt(e,t){return!t||"object"!==At(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Et(e){return(Et=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var It=function(e){!function(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&&St(e,t)}(o,e);var t,n,i,r=jt(o);function o(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(e=r.call(this,{store:T,element:document.querySelector(".accessory-items-wrapper")})).getAccessoryElement=function(e){var t=e.code,n=e.price,i=e.priceCash,r=e.commercialName,o=T.state,c=o.paymentType,a=o.instalments,s=Math.round(Object(_.cleanPrice)(n)/a),l="".concat(a," x ");return"gotovina"===c&&(s=Object(_.cleanPrice)(i),l=""),'\n        <div class="m-bar-structure acc-item-'.concat(t,'" >\n                <div class="m-bar-structure__left">\n                    <div class="m-bar-structure__main">\n                        <div class="m-bar-structure__image">\n                            <a href="#" class="a-image remove-acc-item-from-sticky remove-acc-item-').concat(t,'" style="width:10px;height:10px;" data-acc-code="').concat(t,'" >\n                                <img src="https://cdn.a1.rs/a1website/img/a1/icons/icon-x-red.svg" alt="" />\n                            </a>\n                        </div>\n                        <div class="m-bar-structure__text">
14\n                            <span  class="a-01-text__primary-light--sm "  >').concat(r,'</span>\n            \n                        </div>\n                    </div>\n                </div>\n                <div class="m-bar-structure__right">\n                    <div class="m-bar-structure__main">\n                        <div class="m-bar-structure__text">\n                            <span  class="a-01-text__primary-bold--sm accessory-item-price-single" >').concat(l).concat(Object(_.numberThousandSeparator)(s)," RSD</span>\n                        </div>\n                    </div>\n                </div>\n            </div>\n        ")},e.toggleAccButtonsOutsideOfSticky=function(e){var t=document.querySelector('[data-acc-code="'.concat(e,'"]'));t&&-1!==t.className.indexOf("__inverted")&&Object(_.toggleButton)(t)},e}return t=o,(n=[{key:"render",value:function(){var e=this;0!==T.state.accessories.length?(this.element.innerHTML="\n            ".concat(T.state.accessories.map((function(t){return e.getAccessoryElement(t)})).join(""),"\n        "),this.element.querySelectorAll(".remove-acc-item-from-sticky").forEach((function(t,n){t.addEventListener("click",(function(t){var n=t.currentTarget.getAttribute("data-acc-code");T.dispatch("removeAccessory",{code:n}),e.toggleAccButtonsOutsideOfSticky(n),t.preventDefault()}))}))):this.element.innerHTML=""}}])&&wt(t.prototype,n),i&&wt(t,i),o}(w);function Mt(e){return(Mt="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 kt(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 Lt(e,t){return(Lt=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Nt(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,i=xt(e);if(t){var r=xt(this).constructor;n=Reflect.construct(i,arguments,r)}else n=i.apply(this,arguments);return Rt(this,n)}}function Rt(e,t){return!t||"object"!==Mt(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function xt(e){return(xt=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Ft=function(e){!function(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&&Lt(e,t)}(o,e);var t,n,i,r=Nt(o);function o(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(e=r.call(this,{store:T,element:document.querySelector(".acc-item-count-desktop")})).getAccessoriesCount=function(){var e=T.state.accessories;return e?e.length:0},e}return t=o,(n=[{key:"render",value:function(){this.element.innerHTML="(".concat(this.getAccessoriesCount(),")")}}])&&kt(t.prototype,n),i&&kt(t,i),o}(w);function Bt(e){return(Bt="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 qt(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 Gt(e,t){return(Gt=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Ht(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,i=$t(e);if(t){var r=$t(this).constructor;n=Reflect.construct(i,arguments,r)}else n=i.apply(this,arguments);return Wt(this,n)}}function Wt(e,t){return!t||"object"!==Bt(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function $t(e){return($t=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Vt=function(e){!function(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&&Gt(e,t)}(o,e);var t,n,i,r=Ht(o);function o(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=r.call(this,{store:T,element:document.querySelector(".tariff-communication-promo")})).shouldShowDescription=function(){var e=T.state,t=e.tariff,n=e.tariffCommunicationPromoList,i=t.tariffCode;return!(!n||!n.includes(i))},t.props=e,t}return t=o,(n=[{key:"render",value:function(){this.element&&(this.element.innerHTML="\n            ".concat(this.shouldShowDescription()?this.props.languageConsts.promoTariffDesc:"","\n        "))}}])&&qt(t.prototype,n),i&&qt(t,i),o}(w);function Ut(e){return function(e){if(Array.isArray(e))return Zt(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||Jt(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function zt(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 Kt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};
14t%2?zt(Object(n),!0).forEach((function(t){Xt(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):zt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Xt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Jt(e,t){if(e){if("string"==typeof e)return Zt(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)?Zt(e,t):void 0}}function Zt(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 Yt(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var Qt=function(){var e=this;this.setXmass2021=function(t){e._xmass2021=t},this.setTariffCommunicationPromoList=function(t){return e._tariffCommunicationPromoList=t},this.getTariffCommunicationPromoList=function(){return e._tariffCommunicationPromoList},this.isBusiness=function(){return e._isBusiness},this.setIsBusiness=function(t){return e._isBusiness=t},this.setIsBusinessAndTablet=function(t){return e._isBusinessAndTablet=t},this.setLangObj=function(t){return e._languageConsts=t},this.handleIsSelected=function(){},this.handleColor=function(e,t){var n=new y;document.querySelectorAll('input[name="'.concat(e,'"]')).forEach((function(e,i){var r=document.querySelector(".selected-device-color");0===i&&(e.checked=!0,r&&(r.style.background=e.getAttribute("data-hex-code"),n.setDeviceColor(e.getAttribute("data-hex-code"),e.value))),e.onclick=function(){r&&(r.style.background=this.getAttribute("data-hex-code"),n.setDeviceColor(this.getAttribute("data-hex-code"),this.value),t(this.value),setDLPDP())}}))},this.cashInstalmentsSwitch=function(t){if(t&&("rate36"===t?(e._selectedPayment="rate",e._instalments=36):(e._selectedPayment=t,"rate"===t&&(e._instalments=24))),document.querySelector(".installments_type_content")){if("gotovina"===e._selectedPayment)e.state.accessoryParticipation=e.getAccessoriesCashPriceFromAllItems(),Object(_.qs)(".accessory-item-price-single",(function(e){var t=e.getAttribute("data-price-cash");t&&(e.innerHTML="".concat(Object(_.numberThousandSeparator)(t)," RSD"))})),Object(_.qs)(".acc-price-item",(function(e){var t=e.getAttribute("data-acc-price-cash");e.innerHTML="".concat(Object(_.numberThousandSeparator)(t)," RSD")}));else{if("rate"!==e._selectedPayment)throw new Error("wrong payment type");var n=document.getElementById("select-rate");if(n&&(n.value=e._instalments,$(n).trigger("change")),e.reRenderAccMonthlyPrices(),e._isTvOrTablet)if(36===e._instalments){var i=document.querySelector("#placanje-rate-mobile-36");i&&(i.checked=!0)}else{var r=document.querySelector("#placanje-rate-mobile-24"),o=document.querySelector("#placanje-rate-mobile");r?r.checked=!0:o&&(o.checked=!0)}}e.setTotal()}},this.getAccessoriesCashPriceFromAllItems=function(){var e=(new y).getAccessories();return e?e.reduce((function(e,t){return parseInt(e)+parseInt(t.priceCash)}),0):0},this.reRenderAccMonthlyPrices=function(){var t=new y,n=1+Number(LC.INSTALLMENTS_36_PERCENT)/100;e.setAccessoriesAllPrice(t.getAccessories()),Object(_.qs)(".accessory-item-price-single",(function(t){var i,r=t.getAttribute("data-price");(i=36===e._instalments?Math.round(parseInt(r)*n/36):Math.round(parseInt(r)/e._instalments))&&(t.innerHTML="".concat(Object(_.numberThousandSeparator)(i)," RSD/mes"))})),Object(_.qs)(".acc-price-item",(function(t){var i,r=t.getAttribute("data-acc-price");i=36===e._instalments?Math.round(parseInt(r)*n/36):Math.round(parseInt(r)/e._instalments),t.innerHTML="".concat(Object(_.numberThousandSeparator)(i)," RSD/mes")}))},this.getDevicePriceMonthly=function(){var e=T.state,t=e.tariff,n=e.instalments,i=e.participation,r=e.isBusiness,o=e.isFiveG,c=t.price,a=LC.DISCOUNT_FIVE_G,s=LC.DISCOUNT_15K,l=window.isDiscount15k&&!window.location.href.includes("poslovni");if(36===n&&!r){var u=Object(_.cleanPrice)(c);if(!l)return Math.round(u*Number("1.0".concat(LC.INSTALLMENTS_36_PERCENT))/36);var f=u+s,d=s;return o&&(d+=a),Math.round((f*Number("1.0".concat(LC.INSTALLMENTS_36_PERCENT))-d)/36)}return Math.round((Object(_.cleanPrice)(c)-i)/n)},this._handlePaymentRadioClick=function(t){var n=t.target.value;if(console.log("selectedValue:",n,"isBusiness:",T.state.isBusiness,"_isAccessory:",e._isAccessory),"rate24"===n||"rate36"===n){var i="rate24"===n?24:36;T.dispatch("setPaymentType","rate"),e._selectedPayment="rate";var r=document.getElementById("select-rate");r&&(r.value=i,$(r).trigger("change"))}else T.dispatch("setPaymentType",n);if(e._xmass2021){var o=T.state.tariff;"0"!==o.tariffOldPrice&&("gotovina"===n?"BPO_NEO24_P"!==o.tariffCode&&Object(_.qs)("#old_price_cash_promo",(function(e){e.classList.remove("display_none")})):"rate"!==n&&"rate24"!==n&&"rate36"!==n||"BPO_NEO24_P"!==o.tariffCode&&(Object(_.qs)("#old_price_cash_promo",(function(e){e.classList.add("display_none")})),Object(_.qs)("#old_price_promo",(function(e){e.classList.remove("display_none")}))))}var c=document.querySelector(".payment-type-description");if(c){var a=window.location.href.includes("poslovni"),s=e._isAccessory;console.log("--- _handlePaymentRadioClick DEBUG ---"),console.log("selectedValue:",n),console.log("isBusiness:",a,"isAccessory:",s);var l=[];"gotovina"===n?l=[s&&a&&"ACC_GOTOVINA_PDP_SELECTED_TEXT_BIZ",s&&!a&&"ACC_GOTOVINA_PDP_SELECTED_TEXT",!s&&a&&"GOTOVINA_PDP_SELECTED_TEXT_BIZ",!s&&!a&&"GOTOVINA_PDP_SELECTED_TEXT"]:"rate24"===n?l=[s&&a&&"ACC_RATE_24_PDP_SELECTED_TEXT_BIZ",s&&!a&&"ACC_RATE_24_PDP_SELECTED_TEXT",!s&&a&&"RATE_24_PDP_SELECTED_TEXT_BIZ",!s&&!a&&"RATE_24_PDP_SELECTED_TEXT"]:"rate36"===n&&(l=[s&&a&&"ACC_RATE_36_PDP_SELECTED_TEXT_BIZ",s&&!a&&"ACC_RATE_36_PDP_SELECTED_TEXT",!s&&a&&"RATE_36_PDP_SELECTED_TEXT_BIZ",!s&&!a&&"RATE_36_PDP_SELECTED_TEXT"]),l=l.filter(Boolean),console.log("keysToTry:",l);var u=function(e){var t,n=function(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=Jt(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var i=0,r=function(){};return{s:r,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:r}}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 o,c=!0,a=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return c=e.done,e},e:function(e){a=!0,o=e},f:function(){try{c||null==n.return||n.return()}finally{if(a)throw o}}}}(e);try{for(n.s();!(t=n.n()).done;){var i=t.value;if(LC[i])return LC[i]}}catch(e){n.e(e)}finally{n.f()}return""}(l);c.innerHTML=u,console.log("LC text chosen:",u),console.log("-----------------------------------"),setDLPDP()}},this.handlePaymentType=function(t){var n=e._handlePaymentRadioClick;Object(_.qs)('input[name="'.concat(t,'"]'),(function(e){e.onclick=n})),Object(_.qs)('input[name="'.concat(t,'-mobile"]'),(function(e){e.onclick=n}))},this.createNewAccessoryNode=function(t,n,i,r){var o=Object(_.numberThousandSeparator)(i),c="";return"rate"===e._selectedPayment&&(o=Object(_.numberThousandSeparator)(parseInt(i/e._instalments)),c="/mes"),Object(_.createElementFromHTML)('\n            <div class="m-bar-structure acc-item-'.concat(t,'" >\n                <div class="m-bar-structure__left">\n                    <div class="m-bar-structure__main">\n                        <div class="m-bar-structure__image">\n                            <a href="#" class="a-image remove-acc-item-').concat(t,'" style="width:10px;height:10px;" data-acc-code="').concat(t,'" >\n                                <img src="https://cdn.a1.rs/a1website/img/a1/icons/icon-x-red.svg" alt="" />\n                            </a>\n                        </div>\n                        <div class="m-bar-structure__text">
14\n                            <span  class="a-01-text__primary-light--sm "  >').concat(n,'</span>\n\n                        </div>\n                    </div>\n                </div>\n                <div class="m-bar-structure__right">\n                    <div class="m-bar-structure__main">\n                        <div class="m-bar-structure__text">\n                            <span  class="a-01-text__primary-bold--sm accessory-item-price-single" data-price="').concat(i,'" data-price-cash="').concat(r,'"  >').concat(o," RSD").concat(c,"</span> \x3c!-- todo broj rata x iznos rate (24 x 290 RSD) --\x3e\n                        </div>\n                    </div>\n                </div>\n            </div>"))},this.removeAccessoryNode=function(e){(new y).removeAccesory(e),Object(_.qs)(".acc-item-".concat(e),(function(e){e.remove()}))},this.setAccessoriesAllPrice=function(e){if(!e)return null},this.accessoriesEmptyStateToggle=function(){},this.accessoriesEmptyStateSwitch=function(e){},this.accessoriesEmptyStateHandle=function(){var t=(new y).getAll().accessories;e.accessoriesEmptyStateSwitch(0===t.length)},this.toggleAccessoryBasketSectionIfEmpty=function(){},this.handleAccessoryAdd=function(t,n,i){var r=e.toggleAccessoryBasketSectionIfEmpty;document.querySelectorAll("#accessories-section").length&&(Object(_.qs)(".not-selected-accessories",(function(e){e.onclick=function(e){e.preventDefault(),e.stopPropagation()}})),Object(_.qs)(".scroll-to-accessories",(function(e){e.onclick=function(e){$("html, body").animate({scrollTop:parseInt($("#accessories-section").offset().top)},1e3),e.preventDefault()}})),Object(_.qs)(".".concat(t),(function(t){t.onclick=function(t){var o=t.currentTarget.getAttribute("data-acc-id"),c=t.currentTarget.getAttribute("data-acc-code"),a=t.currentTarget.getAttribute("data-acc-comerical-name"),s=t.currentTarget.getAttribute("data-acc-name"),l=t.currentTarget.getAttribute("data-acc-manufacturer-name"),u=t.currentTarget.getAttribute("data-acc-price"),f=t.currentTarget.getAttribute("data-acc-price-cash"),d=t.currentTarget.getAttribute("data-acc-image"),p=t.currentTarget.getAttribute("data-acc-device-type");Object(_.qs)(".accessory-items-wrapper",(function(v){if(!!document.querySelector(".acc-item-".concat(c)))T.dispatch("removeAccessory",{code:c});else{T.dispatch("appendAccessory",{accId:o,code:c,commercialName:a,manufacturerName:l,name:s,price:u,priceCash:f,image:d,deviceType:p});T.state.accessories}e.toggleButton(t.currentTarget,n,i),r()})),t.preventDefault()}})))},this.getCurrentAccessory=function(){var e=(new y).getAll(),t=e.accessories,n=e.device;if(t.length){var i=t.filter((function(e){return e.accessoryCode===n.deviceCode})),r=i.length?i[0]:null;if(r)return r}return null},this.getCurrentGadget=function(){var e=(new y).getAll(),t=e.gadgets,n=e.device;if(t.length){var i=t.filter((function(e){return e.accessoryCode===n.deviceCode})),r=i.length?i[0]:null;if(r)return r}return null},this.handleInstalments=function(t){var n=e.state,i=e.setTotal,r=e.reRenderAccMonthlyPrices,o=e.reRenderTariffModalPrices,c=e.reRenderAndSetValuesForRange,a=e._isAccessory,s=new y,l=s.getParticipation(),u=null;Object(_.qs)('select[name="'.concat(t,'"]'),(function(t){var f=virtualCart.getAll().device.deviceInstalments||24;if(f){t.querySelector('option[value="'.concat(f,'"]')).selected=!0;var d=t.parentElement;if(d){var p=d.querySelector(".a-input-box__value");p&&(p.innerHTML="".concat(f))}if(s.setDeviceInstalments=f,e._instalments=f,s.instalments=f,virtualCart.instalments=f,!a){var v=s.getTariff().price;u=Math.round((Object(_.cleanPrice)(v)-l)/f),n.deviceMonthlyFee=u,o(),r(),c()}}$(t).on("change",(function(t){var s=parseInt($(t.currentTarget).val());T.dispatch("setInstalments",s);var l,u=new y,f=T.state.isBusiness,d=e._instalments;if(36!==s||f)36===d&&null!==T.state.originalParticipation?(l=T.state.originalParticipation,u.setParticipation(l),T.dispatch("setParticipation",l),T.dispatch("setOriginalParticipation",null)):l=T.state.participation;else{var p=T.state.participation;null===T.state.originalParticipation&&T.dispatch("setOriginalParticipation",p),l=0,u.setParticipation(0),T.dispatch("setParticipation",0)}u.setDeviceInstalments=s,e._instalments=s,u.instalments=s,virtualCart.instalments=s;var v=null;if(a)r();else{var m=u.getTariff().price,h=u.getAll().device,g=null==h?void 0:h.deviceisFiveG,b=g&&"0"!==g&&"false"!==g,P=LC.DISCOUNT_FIVE_G,O=LC.DISCOUNT_15K,C=window.isDiscount15k&&window.isDiscount15kDeviceEligible(null==h?void 0:h.deviceCode)&&!window.location.href.includes("poslovni");if(36!==s||f)v=Math.round((Object(_.cleanPrice)(m)-l)/s);else{var A=Object(_.cleanPrice)(m),w=1+Number(LC.INSTALLMENTS_36_PERCENT)/100;if(C){var S=A+O,j=O;b&&(j+=P),v=Math.round(S*w-j/36)}else v=Math.round(A*w/36)}n.deviceMonthlyFee=v,o(),r(),c()}e.toggleInstallmentButtons(s),e.toggleParticipationSection(s),i()}))}))},this.reRenderTariffModalPrices=function(){var t=(new y).getAll().device,n=null==t?void 0:t.deviceisFiveG,i=n&&"0"!==n&&"false"!==n,r=LC.DISCOUNT_FIVE_G,o=LC.DISCOUNT_15K,c=window.isDiscount15k&&window.isDiscount15kDeviceEligible(null==t?void 0:t.deviceCode)&&!window.location.href.includes("poslovni");Object(_.qs)(".tariff-modal-card-tariff-price",(function(t){var n,a,s,l=Object(_.cleanPrice)(t.getAttribute("data-price")),u=Object(_.cleanPrice)(t.getAttribute("data-min-activation-for-installment")),f=Object(_.cleanPrice)(t.getAttribute("data-max-activation-for-installment")),d=Object(_.cleanPrice)(t.getAttribute("data-participation")),p=Object(_.cleanPrice)(t.getAttribute("data-old-price"));if(36!==e._instalments||e._isBusiness)p&&(n=Math.round((p-d)/e._instalments)),a=Math.round((l-d)/e._instalments),s=d;else{var v=1+Number(LC.INSTALLMENTS_36_PERCENT)/100;if(c){var m=l*v,h=o;i&&(h+=r),a=Math.round((m-h)/36)}else a=Math.round(l*v/36);p&&(n=Math.round(p*v/36)),s=0}if(36!==e._instalments||e._isBusiness){var y=f/e._instalments,g=u/e._instalments;if(a>y&&(a=y,s=l-f),a<g){var b=t.closest(".price-part-of-tariff-data-modal");if(b){b.classList.add("display_none");var P=t.closest(".m-tariff-card");if(P){var O=P.querySelector(".price-part-of-tariff-data-modal-upper-border");O&&O.classList.remove("display_none")}}}}var T="";if(n&&a!==n&&(T='\n                        <div class="m-device-card__price-discount old-price-for-rate">
14\n                            <span class="a-01-text__primary--xs lh-large">\n                              '.concat(e._instalments," x ").concat(Object(_.numberThousandSeparator)(n),"\n                              \n                            </span>\n                        </div>\n                    ")),e._isBusiness&&a){var C=String(a),A=C.match(/(\d+(\.\d+)?)/);if(!A)return C;a=parseFloat(A[1]).toFixed(0)}t.innerHTML="\n                ".concat(T,"\n                ").concat(e._instalments," x ").concat(Object(_.numberThousandSeparator)(a),' <span class="rsd-mes-rate">RSD/mes</span>');var w=t.closest(".m-tariff-card")||t.closest(".p-tariff-card-addon");(w?w.querySelectorAll(".tariff-modal-card-participation"):[t.parentElement.querySelector(".tariff-modal-card-participation")]).forEach((function(t){t&&(36!==e._instalments||e._isBusiness?(t.classList.remove("display_none"),t.innerHTML="+ ".concat(Object(_.numberThousandSeparator)(s)," RSD ").concat(e._languageConsts.now)):t.classList.add("display_none"))}))})),Object(_.qs)(".tariff-modal-card-total",(function(t){var n,a,s,l=Object(_.cleanPrice)(t.getAttribute("data-price")),u=Object(_.cleanPrice)(t.getAttribute("data-tariff-monthly")),f=Object(_.cleanPrice)(t.getAttribute("data-min-activation-for-installment")),d=Object(_.cleanPrice)(t.getAttribute("data-max-activation-for-installment")),p=Object(_.cleanPrice)(t.getAttribute("data-tariff-participation"))||Object(_.cleanPrice)(t.getAttribute("data-participation"));Object(_.cleanPrice)(t.getAttribute("data-tariff-old-price")),Object(_.cleanPrice)(t.getAttribute("data-tariff-old-monthly-all-for")),Object(_.cleanPrice)(t.getAttribute("data-tariff-old-with-device"));if(36!==e._instalments||e._isBusiness){n=Math.round((l-p)/e._instalments),s=(a=Math.round((l-parseInt(p))/e._instalments))+u;var v=f/e._instalments,m=d/e._instalments;v===m&&100===m&&(s=a<v?v+u:m+u)}else{var h=1+Number(LC.INSTALLMENTS_36_PERCENT)/100;if(c){console.log(l," okida se dbg");var y=l*h,g=o;i&&(g+=r),n=Math.round((y-g)/36)}else n=Math.round(l*h/36);s=(a=n)+u}t.innerHTML="\n            ".concat(Object(_.numberThousandSeparator)(s),'\n            <span class="rsd-mes-final">RSD/mes</span>\n            ')}))},this.toggleButton=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"Dodaj",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"Ukloni";if(!e)return null;var i=e.className,r=e.querySelector("img"),o=e.querySelector(".a-02-button__label");-1!==i.indexOf("inverted")?(e.className=i.replace("inverted","flat"),r.src="https://cdn.a1.rs/a1website/img/a1/icons/icon-chevron-right-white.svg",o.innerHTML=t):(e.className=i.replace("flat","inverted"),r.src="https://cdn.a1.rs/a1website/img/a1/icons/icon-chevron-right-primary.svg",o.innerHTML=n)},this.setTariff=function(){},this.handleTariffs=function(t,n,i){var r=new y,o=e.toggleButton,c=e.state;Object(_.qs)(".".concat(t),(function(t){t.onclick=function(t){var n=r.getTariff().tariffCode,i=r._device.deviceType,a=r._device.deviceCode,s=t.currentTarget.getAttribute("data-tariff-code"),l=t.currentTarget.getAttribute("data-price"),u=t.currentTarget.getAttribute("data-price-cash"),f=t.currentTarget.getAttribute("data-old-price"),d=t.currentTarget.getAttribute("data-old-price-cash"),p=t.currentTarget.getAttribute("data-xmass-discount"),v=t.currentTarget.getAttribute("data-xmass-discount-cash"),m=t.currentTarget.getAttribute("data-external-id"),h=t.currentTarget.getAttribute("data-tariff-name"),y=t.currentTarget.getAttribute("data-participation"),g=y,b=t.currentTarget.getAttribute("data-rate-12"),P=t.currentTarget.getAttribute("data-name"),O=t.currentTarget.getAttribute("data-monthly-device-price"),C=t.currentTarget.getAttribute("data-min-activation-for-installment"),A=t.currentTarget.getAttribute("data-max-activation-for-installment"),w=t.currentTarget.getAttribute("data-tariff-collection"),S=t.currentTarget.getAttribute("data-properties"),j=t.currentTarget.getAttribute("data-properties-with-device"),D=(t.currentTarget.getAttribute("data-properties-without-device"),t.currentTarget.getAttribute("data-old-monthly-device-price")),E=t.currentTarget.getAttribute("data-short-description"),I=t.currentTarget.getAttribute("data-tariff-short-description-with-device"),M=t.currentTarget.getAttribute("data-tariff-short-description-without-device"),k=t.currentTarget.getAttribute("data-tariff-monthly-price-old"),L=t.currentTarget.getAttribute("data-tariff-monthly-device-price-old"),N=LC.DISCOUNT_15K,R=LC.DISCOUNT_FIVE_G,x=[];(S&&(x=S.split(";").filter((function(e){return!!e}))),j)&&j.split(";").filter((function(e){return!!e}
14)).forEach((function(e){x.push(e)}));var F=T.state.paymentType,B=l=parseFloat(Object(_.cleanPrice)(l));"undefined"!=typeof xmass_discount&&xmass_discount.phone_discount&&void 0!==xmass_discount.phone_discount[s]&&xmass_discount.phone_discount[s]>0&&!window.location.href.includes("poslovni")&&"1"===i&&(l=parseFloat(Object(_.cleanPrice)(l))-xmass_discount.phone_discount[s],u=parseFloat(.9*Object(_.cleanPrice)(l)));var q=r.getAll().device.deviceisFiveG;if(q&&"0"!==q&&"false"!==q&&"1"===i&&window.isDiscount15k&&!window.location.href.includes("poslovni")&&(l=parseFloat(Object(_.cleanPrice)(l)),u=parseFloat(.9*Object(_.cleanPrice)(l))),window.isDiscount15k&&!window.location.href.includes("poslovni")&&window.isDiscount15kDeviceEligible(a)){var G=parseFloat(Object(_.cleanPrice)(u)),H=parseFloat(Object(_.cleanPrice)(l));if("STANDALONE"!=s){if(isNaN(G))u=1;else if(H-N<=0)u=1;else if("1"!==u){var W=G;u=Object(_.numberThousandSeparator)(.9*W)}l=H}}document.getElementById("xmassBanner");var V=document.querySelector(".five_g_icon"),U="",z=$("#tariffs-item-STANDALONE").data("price");void 0!==z&&(U=z.toString()),""!==U&&parseFloat(Object(_.cleanPrice)(U));var K,X=T.state.instalments,J=T.state.isBusiness;K=l<A?0:l-A,36!==X||J?y=K:(T.dispatch("setOriginalParticipation",K),y=0);var Z=document.getElementById("xmass-pdp-discount"),Y=0,Q=0;if("undefined"!=typeof xmass_discount&&xmass_discount.phone_discount&&void 0!==xmass_discount.phone_discount[s]&&parseFloat(Object(_.cleanPrice)(xmass_discount.phone_discount[s])),"undefined"!=typeof xmass_discount&&xmass_discount.tariff_discount&&(Q=parseFloat(Object(_.cleanPrice)(xmass_discount.tariff_discount[s]))),l<0&&(l=1,u=1),Y=B-l+12*Q,window.location.href.includes("poslovni")||"gotovina"===F&&(Y=1!==l?B-.9*l+12*Q:B-l+12*Q),Y=Math.round(Y),Z&&(V?(Z.textContent=Object(_.numberThousandSeparator)(Y+R),console.log("Usao sam u 5G")):(Z.textContent=Object(_.numberThousandSeparator)(Y),console.log("Nisam usao u 5G"))),f=parseFloat(Object(_.cleanPrice)(f)),window.location.href.includes("poslovni")){var ee;if(isNaN(f)||f<=R)ee=f>1?f-1:R;else{var te=f-1;ee=Math.min(R,te)}Z&&(Z.textContent=Object(_.numberThousandSeparator)(ee))}if(console.log(l,"price"),T.dispatch("setTariff",{externalId:m,maxParticipationForActivation:A,minParticipationForActivation:C,monthlyFee:O,name:P,participation:y,participationOld:g,price:l,priceCash:u,tariffCode:s,tariffName:h,tariffProperties:x,tariffOldPrice:f,tariffOldPriceCash:d,tariffCollection:w,oldMonthlyDevicePrice:D,tariffMonthlyPriceOld:k,tariffMonthlyDevicePriceOld:L,shortDescription:E,shortDescriptionWithDevice:I,shortDescriptionWithoutDevice:M,rate12:b}),e._xmass2021)if(f&&"0"!==f){var ne=T.state.paymentType;Object(_.qs)(".sticky-promo-header-desktop",(function(e){e.classList.add("display_none")})),"rate"===ne?Object(_.qs)("#old_price_promo",(function(e){e.classList.remove("display_none")})):"gotovina"===ne&&Object(_.qs)("#old_price_cash_promo",(function(e){e.classList.remove("display_none")})),Object(_.qs)("#bf_sticky_old_price",(function(e){e.innerHTML=p})),Object(_.qs)("#bf_sticky_old_price_cash",(function(e){e.innerHTML=v}))}else Object(_.qs)("#old_price_promo",(function(e){e.classList.add("display_none")})),Object(_.qs)("#old_price_cash_promo",(function(e){e.classList.add("display_none")})),Object(_.qs)("#insurancePromo",(function(e){e.classList.remove("xmass-display_none"),e.classList.remove("display_none")}));if(e._isBlackFriday)if("0"!==f){var ie=T.state.paymentType;Object(_.qs)(".sticky-promo-header-desktop",(function(e){e.classList.add("display_none")})),"rate"===ie?Object(_.qs)("#old_price_promo",(function(e){e.classList.remove("display_none")})):"gotovina"===ie&&Object(_.qs)("#old_price_cash_promo",(function(e){e.classList.remove("display_none")})),Object(_.qs)("#bf_sticky_old_price",(function(e){e.innerHTML=f})),Object(_.qs)("#bf_sticky_old_price_cash",(function(e){e.innerHTML=d}))}else Object(_.qs)("#old_price_promo",(function(e){e.classList.add("display_none")})),Object(_.qs)("#old_price_cash_promo",(function(e){e.classList.add("display_none")})),Object(_.qs)("#insurancePromo",(function(e){e.classList.remove("bf_promo_active"),e.classList.remove("display_none")})),Object(_.qs)("#platinumPromo",(function(e){e.classList.remove("display_none")}));if(T.dispatch("setParticipation",Object(_.cleanPrice)(y)),Object(_.qs)('[name="ucesce"]',(function(e){e.min=Object(_.cleanPrice)(y),e.value=Object(_.cleanPrice)(y)})),e.toggleParticipationSection(X),y=y?Object(_.cleanPrice)(y):0,c.tariffMonthlyFee=Object(_.cleanPrice)(O),n&&n!==s){var re=document.querySelector('a[data-tariff-code="'.concat(n,'"]')),oe=document.querySelector('a[data-tariff-code="'.concat(s,'"]'));o(re,"Izaberi","Izaberi"),o(oe,"Izaberi","Izaberi")}if("BPO_TV_XPLOR_M"===s?($("#xplore-pdp").css("display","unset"),$("#others-pdp").css("display","none")):($("#xplore-pdp").css("display","none"),$("#others-pdp").css("display","unset")),n===s||r.setTariff(s,l,u,m,h,P,O,null,x,y,C,A,w,D,null,
14null,E,I,M),"1"!==l&&"7"===i){var ce=$("#placanje-rate-mobile-24"),ae=$("#placanje-rate-mobile");ce.length?ce.click():ae.length&&ae.click()}Object(_.qs)(".m-full-modal.js-modal.is-on",(function(e){e.classList.remove("is-on")}));var se=(tariffs_that_should_not_have_insurance||"").split(",");if(Object(_.qs)(".insurance-close-button-clickable",(function(e){se.includes(s)?e.classList.add("display_none"):e.classList.remove("display_none")})),1===Object(_.cleanPrice)(l)||Object(_.cleanPrice)(l)<Object(_.cleanPrice)(C)){console.log("[Z]USAO SAM"),e.cashInstalmentsSwitch("gotovina"),T.dispatch("setPaymentType","gotovina");var le=document.querySelector('[data-input-id="placanje-rate-mobile-24"]'),ue=document.querySelector('[data-input-id="placanje-rate-mobile-36"]');le&&le.classList.add("display_none"),ue&&ue.classList.add("display_none");var fe=document.getElementById("placanje-gotovina-mobile");fe&&(fe.checked=!0)}else{var de=document.querySelector('[data-input-id="placanje-rate-mobile-24"]'),pe=document.querySelector('[data-input-id="placanje-rate-mobile-36"]');de&&de.classList.remove("display_none"),pe&&!e._isBusiness&&pe.classList.remove("display_none")}switch(s){case"BPO_NEOPLATINUM_P":$("#promo-code").removeClass("display_none"),$("#old_price_promo").addClass("display_none"),$("#platinumPromo").removeClass("display_none"),$("#insurancePromo").addClass("display_none"),$("#Spring24Promo").addClass("display_none"),$("#neo24PdpTooltip").addClass("display_none"),$(".platinum-tariff-promo-text-pdp-wrapper").removeClass("display_none"),$(".xmass-banner-container").removeClass("display_none");break;case"BPO_NEO24_P":$("#old_price_promo").addClass("display_none"),$("#promo-code").removeClass("display_none"),spring24Devices.includes(a)&&$("#Spring24Promo").removeClass("display_none"),$("#neo24PdpTooltip").removeClass("display_none"),$("#platinumPromo").addClass("display_none"),$("#insurancePromo").addClass("display_none"),$("#old_price_cash_promo").addClass("display_none"),$(".platinum-tariff-promo-text-pdp-wrapper").addClass("display_none"),$(".xmass-banner-container").removeClass("display_none");break;case"BPO_NEO5_R":case"BPO_NEO30_R":case"BPO_NEOSUPER_R":case"BPO_NEOSURF_R":case"BPO_NEOULTRA_R":$("#promo-code").removeClass("display_none"),$(".discount15-toggler").removeClass("display_none"),$(".xmass-banner-container").removeClass("display_none");break;case"STANDALONE":$("#promo-code").removeClass("display_none"),$(".discount15-toggler").addClass("display_none"),$(".xmass-banner-container").addClass("display_none"),window.isDiscount15k&&!window.location.href.includes("poslovni")&&$("#toggleDiscount").click();break;case"BPO_MINI_R":case"BPO_MINI_S":case"BPO_JUNIOR_R":case"BPO_SENIOR_R":case"BPO_START_R":case"BPO_SIGURICA_R":$("#promo-code").addClass("display_none"),$(".xmass-banner-container").removeClass("display_none");break;default:$(".discount15-toggler").removeClass("display_none"),$(".discount15-toggler").removeClass("display_none"),$("#platinumPromo").addClass("display_none"),$("#Spring24Promo").addClass("display_none"),$("#neo24PdpTooltip").addClass("display_none"),$(".old_price_cash_promo").hasClass("display_none")&&$("#insurancePromo").removeClass("display_none"),$(".platinum-tariff-promo-text-pdp-wrapper").addClass("display_none")}setDLPDP(),Object(_.qs)("body",(function(e){e.style.overflow=""})),"A"===t.currentTarget.tagName?t.preventDefault():document.querySelector(".o-slide-up-down__item-detail.tariffs-radio-button-view").classList.contains("expanded")&&Object(_.simulateClick)(document.querySelector(".tariff-section-close-button-clickable"))}}))},this.changeBTSValuesAboveSticky=function(e,t){var n=(new y).getAll().tariff.name;Object(_.qs)(".old-price-promo",(function(t){t.innerHTML="".concat(e," RSD")})),Object(_.qs)(".price-promo",(function(e){e.innerHTML="".concat(t," RSD")})),Object(_.qs)(".promo-tariff-name",(function(e){e.innerHTML=n}))},this.getSelectedPayment=function(){return e._selectedPayment},this._createTariffPropEl=function(e){return Object(_.createElementFromHTML)('\n        <div class="m-04-text-with-icon">\n            <img src="https://cdn.a1.rs/a1website/img/a1/icons/icon-check-black.svg" alt="Check mark" width="14px" height="10px">
14\n            <span class="a-01-text__primary--sm ">'.concat(e,"</span>\n        </div>\n    "))},this.addInsuranceEvent=function(t){var n=new y,i=(e.setTotal,e.handleCloseInsurance),r=t.currentTarget.getAttribute("data-promo-id"),o=t.currentTarget.getAttribute("data-participation"),c=t.currentTarget.getAttribute("data-monthly"),a=t.currentTarget.getAttribute("data-name"),s=t.currentTarget.getAttribute("data-is-promotion-active"),l=null,u=c;n.insurance.isSelected()?(l=Kt(Kt({},n.insurance.getAll()),{},{isSelected:!1}),n.clearInsurance(),u=0):(n.insurance.setAll(r,a,c,o,s),n.insurance.toggleSelected(),l={insuranceName:a,insuranceParticipation:o,insurancePrice:c,insuranceType:r,insurancePromotionActive:s,isSelected:!0}),T.dispatch("setInsurance",{insurance:l}),e.state.insuranceMonthlyFee=Object(_.cleanPrice)(u),Object(_.qs)(".insurance-add-button",(function(t){e.toggleButton(t,e._languageConsts.addInsurance,e._languageConsts.remove)})),Object(_.qs)(".selected-insurance",(function(e){e.classList.contains("display_none")&&i(),e.classList.toggle("display_none")})),Object(_.qs)(".not-selected-insurance",(function(e){e.classList.toggle("display_none")})),Object(_.qs)("#insurance-drawer",(function(e){e.classList.remove("is-on")})),t.preventDefault()},this.createLoaderSpinnerWithText=function(e){var t=e.text;return'<div class="cp_spinner_wrapper">\n            '.concat(t||"",'<span class="cp_spinner cp_round"></span>\n        </div>')},this.stripPG=function(e){return"string"==typeof e?e.replace("PG_",""):""},this.getMmidsForAllProductsPdp=function(){for(var t=tmpVc.getAll(),n=t.device,i=(t.gadgets,T.state.accessories),r=n.deviceMmid,o=n.deviceCode,c=n.deviceType,a=(i.accId,[]),s=0;s<i.length;s++)void 0!==i[s].code&&a.push(i[s].code);return"1"!==c&&"3"!==c&&"6"!==c||a.push("SPO_"+r),"7"===c&&a.push("TRDHW_"+r),"8"!==c&&"2"!==c||a.push(o),"5"===c?parseInt(e.stripPG(o)):a},this.checkAvailabilityPdp=function(e,t){console.log(e,"checkAvailabilityPdp mmids"),console.log(t,"isPartnerGoods mmids"),window.tmpMmids=e,window.tmpMmidsForModal=[];var n,i,r="";return"function"==typeof window.P&&(n=window.P()),IS_PP_SERVER||IS_LOCALHOST?(r="http://vlxa1website.topnet.rs/api/check-available-mmids",r+="?clientcaptcha=".concat(n),t&&(r="http://vlxa1website.topnet.rs/api/a1market-check-mmid-stock?mmid=".concat(e),r+="&clientcaptcha=".concat(n))):(r="/api/check-available-mmids",r+="?clientcaptcha=".concat(n),t&&(r="/api/a1market-check-mmid-stock?mmid=".concat(e),r+="&clientcaptcha=".concat(n))),t||(i=e.filter((function(e){return!!e}))),console.log(i,"mmidsPayload"),$.ajax({type:"POST",url:"".concat(r),data:JSON.stringify({mmids:i}),dataType:"json"}).done((function(e){console.log(e,"data");var n=window.tmpMmids,i=[];if(t){console.log(t,"isPartnerGoods");var r=e.remainingQnt;return console.log(r,"remainingQnt"),r>0?"MMID_IN_STOCK":"MMID_NOT_IN_STOCK"}for(var o=0;o<e.mmids_stock.length;o++){var c=e.mmids_stock[o].MMID;i.push(c)}window.tmpMmidsForModal=[];for(var a=0;a<n.length;a++){var s=n[a];i.includes(s)||window.tmpMmidsForModal.push(s)}return 0!==e.mmids_stock.length?"MMID_IN_STOCK":"MMID_NOT_IN_STOCK"})).fail((function(e){return"MMID_FAILED"}))},this.handleInsurance=function(t,n,i){Object(_.qs)(".not-selected-insurance",(function(e){e.onclick=function(e){e.preventDefault(),e.stopPropagation()}})),Object(_.qs)(".open-insurance-modal",(function(e){e.onclick=function(e){var t=document.querySelector("#insurance-drawer");t&&t.classList.add("is-on"),e.preventDefault()}})),Object(_.qs)(".".concat(t),(function(e){e.innerHTML=n})),Object(_.qs)(".".concat(i),(function(t){t.onclick=e.addInsuranceEvent}))},this.getNotAvailableGadgets=function(e){var t=[],n=T.state.accessories;return n.length>0&&n.forEach((function(n){8!==n.deviceType&&"8"!==n.deviceType||0===e.filter((function(e){return e.MMID===n.code})).length&&t.push(n.code)})),t},this.getNotAvailableAccessories=function(e){var t=T.state.accessories,n=[];return t.length>0&&t.forEach((function(t){2!==t.deviceType&&"2"!==t.deviceType||0===e.filter((function(e){return e.MMID===t.code})).length&&n.push(t.code)})),n},this.isDeviceAvailable=function(e){var t=tmpVc.getAll().device;if(t){var n="7"===t.deviceType?"MMID":"DevType";if(0===e.filter((function(e){return e[n]===t.deviceCode})).length)return!1}return!0},this.generateLangConstForNotAvailableModal=function(e,t,n,i){var r=e?"device":"";return t&&(r&&(r+="_"),r+="accessory"),n&&(r&&(r+="_"),r+="gadget"),i&&(r&&(r+="_"),r+="not_allowed"),"".concat(r,"_not_available_lang_const")},this.goToCart=function(){var t=new y,n=e._isActive;e._selectedPayment;if(window.hasOwnProperty("virtualCart")&&!n){var i=t.getAll(),r=i.device,o=i.gadgets,c=T.state,a=c.tariff,s=c.participation,l=c.insurance,u=c.accessories,f=c.paymentType;if(e._isAccessory&&u&&Array.isArray(u)&&a){var d,p;null===(d=virtualCart)||void 0===d||null===(p=d.tariff)||void 0===p||p.tariffCode;e._isGadget?o.forEach((function(e){virtualCart.appendToGadget(null==e?void 0:e.accessoryId,null==e?void 0:e.accessoryCode,null==e?void 0:e.accessoryType,null==e?void 0:e.accessoryComercialName,null==e?void 0:e.accessoryManufacturerName,null==e?void 0:e.accessoryName,null==e?void 0:e.accessoryPrice,null==e?void 0:e.accessoryImage,s)})):u.forEach((function(e){virtualCart.appendToAccessoriesN({accId:null==e?void 0:e.accId,code:null==e?void 0:e.code,type:null==e?void 0:e.accessoryType,commercialName:null==e?void 0:e.commercialName,manufacturerName:null==e?void 0:e.manufacturerName,name:null==e?void 0:e.name,price:null==e?void 0:e.price,image:null==e?void 0:e.image,priceCash:null==e?void 0:e.priceCash,participation:s})}))}else{if(r&&a){if("3"===r.deviceType){var v=(null==r?void 0:r.deviceName.split(" "))[0],m=null==r?void 0:r.deviceName.replace("".concat(v," "),"");virtualCart.clearCart(),virtualCart.setPreselectedHW({code:r.deviceCode,price:null==a?void 0:a.price,name:m,manufacturer:v,image:r.deviceImage})}else{var h;(null===(h=virtualCart._preselctedHW)||void 0===h?void 0:h.code)&&virtualCart.removePreselectedHW(),virtualCart.setDevice(null==r?void 0:r.deviceType,null==r?void 0:r.deviceCode,null==r?void 0:r.deviceManufacturer,null==r?void 0:r.deviceName,null==r?void 0:r.deviceColor,null==r?void 0:r.deviceMmid,null==r?void 0:r.devicePriceCash,e._instalments,null==r?void 0:r.deviceParticipation,null==r?void 0:r.deviceMonthlyFee,r.deviceImage,null==r?void 0:r.deviceisFiveG)}virtualCart.setTariffNew({tariffCode:null==a?void 0:a.tariffCode,price:null==a?void 0:a.price,priceCash:null==a?void 0:a.priceCash,externalId:null==a?void 0:a.externalId,tariffName:null==a?void 0:a.tariffName,name:null==a?void 0:a.name,monthlyFee:null==a?void 0:a.monthlyFee,monthlyFeeWithoutDevice:null==a?void 0:a.tariffMontlyFeeWithoutDevice,properties:null==a?void 0:a.tariffProperties,participation:null==a?void 0:a.participation,minParticipationForActivation:null==a?void 0:a.minParticipationForActivation,maxParticipationForActivation:null==a?void 0:a.maxParticipationForActivation,oldMonthlyDevicePrice:null==a?void 0:a.oldMonthlyDevicePrice,tariffCollection:null==a?void 0:a.tariffCollection,tariffOldPrice:null==a?void 0:a.tariffOldPrice,tariffOldPriceCash:null==a?void 0:a.tariffOldPriceCash,tariffMonthlyPriceOld:null==a?void 0:a.tariffMonthlyPriceOld,tariffMonthlyDevicePriceOld:null==a?void 0:a.tariffMonthlyDevicePriceOld,shortDescription:null==a?void 0:a.shortDescription,shortDescriptionWithDevice:null==a?void 0:a.shortDescriptionWithDevice,shortDe
14scriptionWithoutDevice:null==a?void 0:a.shortDescriptionWithoutDevice})}u&&Array.isArray(u)&&u.forEach((function(e){"8"===e.deviceType?virtualCart.appendToGadgetsN({accId:null==e?void 0:e.accId,code:null==e?void 0:e.code,type:null==e?void 0:e.accessoryType,commercialName:null==e?void 0:e.commercialName,manufacturerName:null==e?void 0:e.manufacturerName,name:null==e?void 0:e.name,price:null==e?void 0:e.price,image:null==e?void 0:e.image,priceCash:null==e?void 0:e.priceCash}):virtualCart.appendToAccessoriesN({accId:null==e?void 0:e.accId,code:null==e?void 0:e.code,type:null==e?void 0:e.accessoryType,commercialName:null==e?void 0:e.commercialName,manufacturerName:null==e?void 0:e.manufacturerName,name:null==e?void 0:e.name,price:null==e?void 0:e.price,image:null==e?void 0:e.image,priceCash:null==e?void 0:e.priceCash})})),l&&virtualCart.setInsurance1({type:null==l?void 0:l.insuranceType,name:null==l?void 0:l.insuranceName,price:null==l?void 0:l.insurancePrice,participation:null==l?void 0:l.insuranceParticipation,isSelected:t.insurance.isSelected(),insurancePromotionActive:null==l?void 0:l.insurancePromotionActive}),virtualCart.setParticipation(s)}virtualCart.setPaymentType(f),virtualCart.setBinding(24),virtualCart.getVouchers().forEach((function(e){e.startsWith("A1")&&virtualCart.removeVoucher(e)})),window.isDiscount15k&&!window.location.href.includes("poslovni")?(window.voucher15k&&virtualCart.addVoucher(window.voucher15k),virtualCart.setIsDiscount15k(!0)):virtualCart.setIsDiscount15k(!1),virtualCart.setAll();var _=virtualCart.getAll().device.deviceCode;document.location.href="/privatni/cart?device_code=".concat(_)}},this.handleAddToCart=function(t){if($("#tariffs-item-BPO_NEO24_P").attr("data-name","NEO24"),window.hasOwnProperty("virtualCart")){new y;Object(_.qs)(".".concat(t),(function(t){t.onclick=function(t){var n,i,r,o,c,a,s;if(window.isDiscount15k&&!window.location.href.includes("poslovni")&&(t.preventDefault(),!0!==window.voucher15kvalidated))return document.getElementById("modal-15k-discount-info").classList.add("is-on"),!1;$(t.currentTarget).attr("data-device-code").startsWith("AD_")||(virtualCart.process="");var l=new y,u=(null===(n=l.getAll().gadgets)||void 0===n?void 0:n.some((function(e){return!0===e.isPartnerGoods})))||!1,f=e.getMmidsForAllProductsPdp();window.loader=!1,$(".add-to-cart").addClass("loading"),$(".add-to-cart").attr("disabled",!0),$(".add-to-cart .a-02-button__label").html('<div class="cp_spinner_wrapper">\n                    '.concat(LC.PLEASE_WAIT_TEXT,'\n                    <span class="cp_spinner cp_round"></span>\n                </div>'));var d=function(e){return Array.isArray(e)?e:[]},p=function(e){return"string"==typeof e&&e.startsWith("PG_")},v=null!==(i=virtualCart.getAll())&&void 0!==i?i:{},m=null!==(r=null===(o=v.tariff)||void 0===o?void 0:o.tariffCode)&&void 0!==r?r:"",h=[].concat(Ut(d(v.accessories).map((function(e){return null==e?void 0:e.accessoryCode}))),Ut(d(v.gadgets).map((function(e){return null==e?void 0:e.accessoryCode}))),[null===(c=v.device)||void 0===c?void 0:c.deviceCode]).filter(Boolean),_=h.some(p),g=h.some((function(e){return!p(e)})),b=(h.length,null!==(a=l.getAll())&&void 0!==a?a:{}),P=[].concat(Ut(d(b.accessories).map((function(e){return null==e?void 0:e.accessoryCode}))),Ut(d(b.gadgets).map((function(e){return null==e?void 0:e.accessoryCode}))),[null===(s=b.device)||void 0===s?void 0:s.deviceCode]).filter(Boolean),O=P.some(p),C=P.some((function(e){return!p(e)}));if(_&&C||g&&O||""!==m&&O)return t.preventDefault(),$(".add-to-cart").removeClass("loading").attr("disabled",!1),$(".add-to-cart .a-02-button__label").html("Dodaj u korpu"),void $("#device-exists-warning-pg").addClass("is-on");var A,w,S=!1;u||no_acc_gadgets_tariffs.split(",").includes(null===(A=virtualCart)||void 0===A||null===(w=A.tariff)||void 0===w?void 0:w.tariffCode)&&$(t.currentTarget).attr("data-device-code").startsWith("AD_")&&(S=!0);SHOULD_CHECK_AVAILABILITY||S?e.checkAvailabilityPdp(f,u).then((function(t){var n=window.tmpMmidsForModal;if(0!==n.length||S){var i=function(e){!o||v?(c.forEach((function(e){T.dispatch("removeAccessory",{code:e})})),a.forEach((function(e){T.dispatch("removeAccessory",{code:e})})),location.href=LC["PLP_LINK_".concat(tmpVc._device.deviceType)]):(c.length>
140&&c.forEach((function(e){T.dispatch("removeAccessory",{code:e})})),a.length>0&&a.forEach((function(e){T.dispatch("removeAccessory",{code:e})})),e&&pdpHandler.goToCart())},r=(window.checkAvailabilityLc,!0),o=e.isDeviceAvailable(t.mmids_stock),c=e.getNotAvailableAccessories(t.mmids_stock),a=e.getNotAvailableGadgets(t.mmids_stock),s=T.state.accessories,l="";o||"2"===tmpVc._device._deviceType||(l='<p class="notAvailableAccessory">'.concat(tmpVc._device._deviceName,"</p>")),n=Ut(n=new Set(n));for(var u=0;u<n.length;u++)for(var f=n[u],d=0;d<s.length;d++){var p=s[d];f===p.code&&(l+='<p class="notAvailableAccessory">'.concat(p.commercialName,"</p>"))}var v=0===t.mmids_stock.length;(a.length>0||c.length>0||!o)&&(r=!1);var m=v?LC.NOT_IN_STOCK_CLEAR_CART:LC.NOT_IN_STOCK;S&&(m=LC.NOT_ALLOWED_ACC_GADGET,m='<p class="notAvailableAccessory">'.concat(m,"</p>"),v=!0,r=!1,l="");var h=e.generateLangConstForNotAvailableModal(!o,c.length>0,a.length>0,S);r||(v&&(h+="_all_products_not_available"),h=LC[h]||h);var y='\n                            <div id="pdp_availability_modal"  class="m-modal js-modal is-on">\n                                <div class="overlay "></div>\n                                <div class="m-modal__content-area">\n                                    <div class="m-modal__type-icon ">\n                                        <img src="https://cdn.a1.rs/a1website/img/a1/modals/icon-warning-red.svg" alt="Close modal" width="29" height="29">\n                                    </div>\n                                    <div class="m-modal__title">\n                                        <div class="a-01-text__secondary-bold--3xl  ">'.concat(h,'</div>\n                                    </div>\n                                    <div class="m-modal__content">\n                                        <div class="p-shopping-cart-warning">\n                                            <div class="p-shopping-cart-warning__desc">\n                                                <div class="notAvailableAccessories">\n                                                    <span class="a-01-text__primary--base lh-large">').concat(m,"</span>\n                                                    ").concat(l,'\n                                                </div>\n                                            </div>\n                                        </div>\n                                    </div>\n                                    <div class="m-modal__action-buttons">\n                \n                                            <button class="a-02-button__inverted--primary has-label modal-abort-handler-class ').concat(v?"display_none":"",'" type="button">\n                                                <span class="a-02-button__label ">Odustani</span>\n                                                <span class="a-02-button__icon ">\n                                                     <img inline-svg="" src="https://cdn.a1.rs/a1website/img/a1/icons/icon-chevron-right-white.svg">\n                                                 </span>\n                                            </button>\n                                    \n                                        \n                                            <button class="a-02-button__flat--primary has-label modal-continue-handler-class" type="button">\n                                                <span class="a-02-button__label ">Nastavi</span>\n                                                <span class="a-02-button__icon ">\n                                                     <img inline-svg="" src="https://cdn.a1.rs/a1website/img/a1/icons/icon-chevron-right-white.svg">\n                                                 </span>\n                                            </button>\n                                    \n                                    </div>\n                                </div>\n                            </div>\n                        ');$("body").append(y),$(".modal-continue-handler-class").on("click",(function(){i(!0)})),$(".modal-abort-handler-class").on("click",(function(){i(!1),location.reload()}))}else e.goToCart()})):pdpHandler.goToCart(),t.preventDefault()}}))}},this.setRangeMinAndMax=function(e){},this.reRenderSticky=function(e){e.monthlyDevice;var t=e.participationDevice;(t||0===t)&&Object(_.qs)(".ucesce-iznos",(function(e){e.innerHTML="".concat(t)}))},this.reRenderAndSetValuesForRange=function(t){if(e._isAccessory)if(e._isGadget){var n=e.getCurrentGadget();n&&(n.accessoryParticipation=t)}else{var i=e.getCurrentAccessory();i&&(i.accessoryParticipation=t)}},this.rangeInputChangeHandler=function(t){e.reRenderAndSetValuesForRange(t.currentTarget.value)},this.handleInitialRangeInput=function(t){var n=e.state,i=e.setRangeMinAndMax,r=new y,o=r.getAll().tariff,c=o.participation,a=o.price,s=o.maxParticipationForActivation,l=r.getParticipation(),u=Object(_.cleanPrice)(a),f=c;f||(f=0),l>Object(_.cleanPrice)(f)&&(f=l);var d=Object(_.cleanPrice)(f),p=Math.round((u-d)/r.instalments);n.deviceMonthlyFee=p,n.deviceParticipation=d,(!l||l<d)&&r.setParticipation(d),f>s&&r.setParticipation(s),i(t)},this.handleParticipation=function(){Object(_.qs)('[name="ucesce"]',(function(e){e.getAttribute("data-js-instance")||(e.setAttribute("data-js-instance","1"),e.addEventListener("input",(function(e){T.dispatch("setParticipation",parseInt(e.currentTarget.value))})))}))},this.setDeviceData=function(t,n,i,r,o,c,a,s,l){var u=new y,f=u.getDeviceColorData(),d=f.color,p=f.mmid;u.setDevice(t,n,i,r,d,p,o,e._instalments,c,a,s,l)},this.handleMobileScrollToBasket=function(){Object(_.qs)(".mobile-basket-scroll-to",(function(e){e.onclick=function(e){var t,n=document.querySelector(".t-pdp__mobile-basket"),i=(null==n||null===(t=n.getBoundingClientRect())||void 0===t?void 0:t.top)+window.scrollY;i&&window.scroll({top:i,behavior:"smooth"}),e.preventDefault()}}))},this.handlePreorder=function(){var t=new y;Object(_.qs)(".preorder-button",(function(n){n.onclick=function(n){var i=n.currentTarget.href,r=t.getAll(),o=r.device,c=r.tariff,a=(r.installments,o.deviceCode),s=o.deviceMmid,l=c.tariffCode,u=$("#select-rate option:selected").val(),f=$(".ucesce-iznos-desktop-section").text().trim().replace(".",""),d="";"8"===o.deviceType&&"2"===o.deviceType||"rate"!==$('[name="placanje"]:checked').val()||""===f||(d=f),"8"!==o.deviceType&&"2"!==o.deviceType||!u||"gotovina"===$('[name="placanje"]:checked').val()||(l="ACCINSTALL");var p="https://a1.rs/webshopfe/details?dev_type=".concat(a,"&mmid=").concat(s,"&tariff=").concat(l,"&process[]=preorder");IS_TEST_SERVER&&(p="".concat(i,"?dev_type=").concat(a,"&mmid=").concat(s,"&tariff=").concat(l,"&process[]=preorder"));var v=e.getPricesForEveryItemOnPDP();$.ajax({type:"POST",url:"/api/set-cart",data:{preset_json:JSON.stringify(v)},dataType:"json",timeout:5e3}).done((function(e){(null==e?void 0:e.cart_id)&&(p+="&cart_id="+e.cart_id);var t=$("#select-rate option:selected").val();t&&"gotovina"!==$('[name="placanje"]:checked').val()&&(p+="&installments_number="+t),""!==d&&"gotovina"!==$('[name="placanje"]:checked').val()&&(p+="&installments_upfront="+d),window.location.href=p})).fail((function(e){console.log("fail",e)})),n.preventDefault()}}))},this.getPricesForEveryItemOnPDP=function(){var t={device:null,accessoriesAndGadgets:null,insurance:null,tariff:null,tariffAddons:null};return t.device=e.getPriceForDevice(),t.accessoriesAndGadgets=e.getPricesForAccessoriesAndGadgets(),t.tariff=e.getTariffDataFromCart(),t},this.getTariffDataFromCart=function(){var e=tmpVc.getAll(),t=e.tariff,n=e.device;if((null==t?void 0:t.tariffCode)&&"STANDALONE"!==(null==t?void 0:t.tariffCode)){var i=t.monthlyFee,r=t.tariffCode,o=t.name,c=t.tariffMontlyFeeWithoutDevice,a=t.oldMonthlyDevicePrice;return{priceMonthly:(null==n?void 0:n.deviceCode)?Object(_.cleanPrice)(i):null,priceMonthlyWithoutDevice:(null==n?void 0:n.deviceCode)?null:Object(_.cleanPrice)(c),oldPriceMonthly:Object(_.cleanPrice)(a),code:r,name:o,properties:t.tariffProperties}}return null},this.getPricesForAccessoriesAndGadgets=function(){var t=e.getAccessoryPricesList(),n=e.getGadgetsPricesList();return t||n?!t&&n?n:t&&!n?t:Kt(Kt({},t),n):null},this.getGadgetsPricesList=function(){var e=tmpVc.getAll().gadgets;return e&&0!==(null==e?void 0:e.length)?e.reduce((function(e,t){return Kt(Kt({},e),{},Xt({},t.accessoryCode,{price:Object(_.cleanPrice)(t.accessoryPrice),oldPrice:null,participation:Object(_.cleanPrice)(t.accessoryParticipation)}))}),{}):null},this.getAccessoryPricesList=function(){var e=tmpVc.getAll().accessories;return e&&0!==(null==e?void 0:e.length)?e.reduce((function(e,t){return Kt(Kt({},e),{},Xt({},t.accessoryCode,{price:Object(_.cleanPrice)(t.accessoryPrice),oldPrice:null,participation:Object(_.cleanPrice)(t.accessoryParticipation)}))}),{}):null},this.getPriceForDevice=function(){var e;
14if(tmpVc.getTariff().tariffCode&&(null===(e=tmpVc.getDevice())||void 0===e?void 0:e.deviceCode)){var t=tmpVc.getTariff(),n=t.price,i=t.priceCash,r=t.oldPrice,o=t.oldPriceCash;return{price:Object(_.cleanPrice)(n),priceCash:Object(_.cleanPrice)(i),oldPrice:r?Object(_.cleanPrice)(r):null,oldPriceCash:o?Object(_.cleanPrice)(o):null}}return null},this.closeBasketSection=function(e,t){Object(_.qs)(".".concat(e),(function(e){e.onclick=function(){Object(_.qs)(".".concat(t),(function(e){Object(_.simulateClick)(e)}))}}))},this.closeAccessoriesBasket=function(){Object(_.qs)(".tariff-accessories-close-button-clickable",(function(e){Object(_.simulateClick)(e)}))},this.handleCloseBasketTariffSection=function(){return e.closeBasketSection("basket-tariff-section-close-button","tariff-section-close-button-clickable")},this.handleClosePaymentTypeSection=function(){return e.closeBasketSection("basket-payment-type-section-close-button","tariff-payment-type-close-button-clickable")},this.handleCloseAccessories=function(){return e.closeBasketSection("basket-accessories-section-close-button","tariff-accessories-close-button-clickable")},this.handleCloseInsurance=function(){return e.closeBasketSection("basket-insurance-section-close-button","insurance-close-button-clickable")},this.setInstallments=function(t){return e._instalments=t},this.setTotal=function(){var t=virtualCart.getTotal(e.state),n=t.totalMonthlyPrice,i=t.totalParticipation,r=virtualCart.getAll().tariff.price,o=i;0===i&&1===Object(_.cleanPrice)(r)&&(o=1),Object(_.qs)(".monthly-summary",(function(e){e.innerHTML="".concat(Object(_.numberThousandSeparator)(Math.round(n))," RSD")})),Object(_.qs)(".participation-total",(function(e){e.innerHTML="".concat(Object(_.numberThousandSeparator)(Math.round(o))," RSD")}))},this.toggleInstallmentButtons=function(e){var t=document.getElementById("addToCartTrigger"),n=document.getElementById("installments36Trigger"),i=T.state.isBusiness;if(t&&n){var r=document.querySelector(".pdp-not-available-wrapper");if(r&&!r.classList.contains("display_none"))return t.classList.add("display_none"),void n.classList.add("display_none");var o=document.getElementById("pdp-rate-36-radio")||document.querySelector('[data-input-id="placanje-rate-mobile-36"]'),c=o&&o.classList.contains("display_none_forever");36!==e||i||c?(t.classList.remove("display_none"),n.classList.add("display_none")):(t.classList.add("display_none"),n.classList.remove("display_none"))}},this.toggleParticipationSection=function(e){var t=T.state.isBusiness,n=document.getElementById("calc-price"),i=document.querySelector(".ucesce-range-desktop"),r=document.querySelector(".participation-basket-label-desktop"),o=document.querySelector('[name="ucesce"]');if(36!==e||t){if(n&&n.classList.remove("display_none"),i&&i.classList.remove("display_none"),r&&r.classList.remove("display_none_forever"),o){var c=T.state.participation;o.value=c}}else n&&n.classList.add("display_none"),i&&i.classList.add("display_none"),r&&r.classList.add("display_none_forever")},this.finalize=function(t){var n=t.tariffOldPrice,i=(new y).getAll(),r=i.tariff,o=i.insurance,c=i.device,a=r.participation;T.dispatch("setTariff",Kt(Kt({},r),{},{tariffOldPrice:n,deviceType:c.deviceType})),T.dispatch("setPaymentType",e._selectedPayment),T.dispatch("setInstalments",e._instalments),T.dispatch("setIsTvOrTable",{isTvOrTablet:e._isTvOrTablet}),T.dispatch("setInsurance",{insurance:o}),T.dispatch("setIsBusiness",{isBusiness:e._isBusiness}),T.dispatch("setParticipation",Object(_.cleanPrice)(a)),T.dispatch("setIsBusinessAndTablet",{isBusinessAndTablet:e._isBusinessAndTablet});var s=c.deviceisFiveG&&"0"!==c.deviceisFiveG&&"false"!==c.deviceisFiveG;if(T.dispatch("setIsFiveG",{isFiveG:s}),T.dispatch("setTariffCommunicationPromoList",{tariffCommunicationPromoList:e._tariffCommunicationPromoList}),e._isAccessory){var l=e.getCurrentAccessory();T.dispatch("appendAccessory",{accId:null==l?void 0:l.accessoryId,code:null==l?void 0:l.accessoryCode,commercialName:null==l?void 0:l.accessoryComercialName,manufacturerName:null==l?void 0:l.accessoryManufacturerName,name:null==l?void 0:l.accessoryName,price:null==l?void 0:l.accessoryPrice,priceCash:null==l?void 0:l.priceCash,image:null==l?void 0:l.accessoryImage,participation:null==l?void 0:l.accessoryParticipation}),T.dispatch("setIsAccessory",{isAccessory:e._isAccessory});var u=document.querySelector(".participation-basket-label-desktop");u&&u.classList.add("display_none")}var f=new We(".sticky-basket-desktop"),d=new k,p=new q,v=new K,m=new Oe(".device-price-tp-price-desktop"),h=new te(".rata-iznos-desktop"),g=new se,b=new me(".ucesce-iznos-desktop"),P=new me(".ucesce-iznos-desktop-section"),O=new De,C=new Re,A=new Je,w=new it(".device-insurance-montly-price-desktop"),S=new ut(".device-insurance-montly-price-desktop-no-discount"),j=new ut(".device-insurance-montly-price-desktop-no-discount-1"),D=new it(".device-insurance-montly-price-selected-desktop"),E=new it(".device-insurance-montly-price-modal"),I=new yt,M=new Ct,L=new It,N=new Ft,R=new Vt({languageConsts:e._languageConsts});f.render(),d.render(),p.render(),v.render(),m.render(),g.render(),h.render(),b.render(),P.render(),O.render(),C.render(),A.render(),w.render(),S.render(),j.render(),D.render(),E.render(),I.render(),M.render(),L.render(),N.render(),R.render(),Object(_.qs)(".not-selected-accessories-desktop",(function(e){e.onclick=function(e){e.preventDefault(),e.stopPropagation()}})),"gotovina"===virtualCart.getPaymentType()&&Object(_.qs)("#placanje-gotovina-mobile",(function(e){Object(_.simulateClick)(e)}))}},en=function e(t,n,i){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=arguments.length>4&&void 0!==arguments[4]&&arguments[4],c=arguments.length>5&&void 0!==arguments[5]&&arguments[5];Yt(this,e),Qt.call(this);var a,s=new URLSearchParams(window.location.search),l=s.get("selectedPayment"),u=24;"cash"===l?a="gotovina":"installments36"===l?(a="rate",u=36):a="rate",this._selectedPayment=a,this._instalments=u,this._isActive=!1,this._deviceCode=i,this._isSimulatedClickTariff=!1,this._isAccessory=r,this._isGadget=o,this._languageConsts={},this._isBusiness=!1,this._tariffCommunicationPromoList=[],this._isBusinessAndTablet=!1,this._xmass2021=!1,this._isTvOrTablet=c;var f=Object(_.cleanPrice)(t);this.state={deviceMonthlyFee:null,deviceParticipation:null,tariffMonthlyFee:f,accesoryMonthlyFee:null,accessoryParticipation:null,insuranceMonthlyFee:null,isPrice1RSD:n}};function tn(e){return function(e){if(Array.isArray(e))return nn(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return nn(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return nn(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function nn(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 rn(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 on(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};
14t%2?rn(Object(n),!0).forEach((function(t){cn(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):rn(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function cn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function an(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)}}var sn=VOUCHERS_LIMIT_CONST,ln=VOUCHERS_LENGTH_LIMIT_CONST,un=VOUCHERS_MAXLENGTH_LIMIT_CONST,fn=function(){function e(){var t=this;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.getPreselectedHW=function(){return t._preselctedHW},this.setPreselectedHW=function(e){t._preselctedHW=e},this.removePreselectedHW=function(){t._preselctedHW=null},this.getIsPreselectedHWRequired=function(){return t._isPreselctedHWRequired},this.setIsPreselectedHWRequired=function(){t._isPreselctedHWRequired=!0},this.disableIsPreselectedHWRequired=function(){t._isPreselctedHWRequired=!1},this.setMnpLink=function(e){t._mnpLink=e},this.getMnpLink=function(){return t._mnpLink},this.setIsEBill=function(e){t._isEBill=e,t._isPaperBill=!t._isEBill,t._isPaperBill?t._paperBillFee=50:t._paperBillFee=0,t.setAll()},this.getIsEBill=function(){return t._isEBill},this.getPaperBillFee=function(){return t._paperBillFee},this.getIsPaperBill=function(){return t._isPaperBill},this.setBinding=function(e){return t._binding=e},this.getBinding=function(){return t._binding},this.setBezUgovorneObaveze=function(e){t._bezUgovorneObaveze=e},this.setShouldIgnorePaperBillFee=function(e){t._shouldIgnorePaperBillFee=e},this.setWebshopLink=function(e){return t.webshopLink=e},this.resetAccessories=function(){t._accessories=[]},this.resetGadgets=function(){t._gadgets=[]},this.resetTariffAddons=function(){t._tariffAddons=[]},this.resetTariffAddonsExceptBoosters=function(){t._tariffAddons=t._tariffAddons.filter((function(e){return!(null==e?void 0:e.is_booster)}))},this.calculateTotal=function(){var e=t.getAll(),n=e.participation,i=e.accessories,r=e.gadgets,o=e.tariff.price,c=n,a=0;if(a+=Object(_.cleanPrice)(o)-n,i&&i.length){var s=i.reduce((function(e,t){return parseInt(e)+parseInt(t.accessoryParticipation)}),0);a+=i.reduce((function(e,t){return parseInt(e)+parseInt(Object(_.cleanPrice)(t.accessoryPrice)-Object(_.cleanPrice)(t.accessoryParticipation))}),0),c+=s}if(r&&r.length){var l=r.reduce((function(e,t){return parseInt(e)+parseInt(t.accessoryParticipation)}),0);a+=r.reduce((function(e,t){return parseInt(e)+parseInt(Object(_.cleanPrice)(t.accessoryPrice)-Object(_.cleanPrice)(t.accessoryParticipation))}),0),c+=l}return{totalParticipation:c,totalMonthly:a}},this.goToShop=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],n=virtualCart.getAll(),i=n.device,r=n.tariff,o=n.accessories,c=n.gadgets,a=n.tariffAddons,s=n.paymentType,l=n.insurance,u=i.deviceCode,f=i.deviceMmid,d=i.deviceInstalments,p=i.deviceType,v=r.tariffCode,m=r.name,h=l.isSelected,y="https://a1.rs/webshopfe/details?";console.log(y,"webshopLink");var _=virtualCart.getTariff().isEmpty(),g=virtualCart.getDevice().isEmpty(),b=0===virtualCart.accessories.length,P=0===virtualCart.gadgets.length;virtualCart.getMnpLink();if("STANDALONE"!==v&&"PREPAIDR"!==v||("STANDALONE"===v?virtualCart.process="STANDALONE":"PREPAIDR"===v&&(virtualCart.process="prpreg"),virtualCart.setAll()),"mnp"!==t.process||e){var O=_&&g&&(!b||!P);O&&("gotovina"===s?virtualCart.process="acc":"rate"===s&&"market"!==virtualCart.process&&(virtualCart.process="add_acc"));LC.webshop_url;var T=!_&&g,C=t.calculateTotal(),A=C.totalParticipation,w=C.totalMonthly,S=!1;if(u&&"3"!==p&&(y+="dev_type=".concat(u),S=!0,h&&(y+="&insurance=1")),f&&(y+="&mmid=".concat(f)),v){var j,D,E=!1;u||(E=!0),"market"!==virtualCart.process&&(y+="".concat(E?"":"&","tariff=").concat(v)),"STANDALONE"!==v&&"PREPAIDR"!==v&&(t._bezUgovorneObaveze&&g?y+="&binding=0":y+="&binding=".concat(t._binding));var I=virtualCart.process?virtualCart.process.split(";"):"";I&&I.includes("mnp")&&(y=y.replace("&binding=24","&binding=0")),T&&!(null==t||null===(j=t._preselctedHW)||void 0===j?void 0:j.isPreselctedHWRequired)&&("Online tarifa"===m?y+="&sim=DATA":"PonesiNet"===m||"KućniNet M"===m||"KućniNet L"===m||"KućniNet XL"===m||"KućniNet XXL"===m||(y+="&sim=VOICE")),("3"===p||(null==t||null===(D=t._preselctedHW)||void 0===D?void 0:D.isPreselctedHWRequired))&&(y+="&sim=DATA")}if(O&&"rate"===s){var M=S?"&":"";"market"!==virtualCart.process&&(y+="".concat(M,"tariff=ACCINSTALL"))}else O&&"gotovina"===s&&(y+="&tariff=STANDALONE");o&&o.forEach((function(e){var t=e.accessoryCode;"market"===virtualCart.process?y+="&market_items[]=".concat(t):y+="&accessories[]=".concat(t)}
14)),c&&c.forEach((function(e){var t=e.accessoryCode;"market"===virtualCart.process?y+="&market_items[]=".concat(t):y+="&accessories[]=".concat(t)}));var k="mnp"===virtualCart.process;if("rate"===s){if(!_&&g&&b&&P||d&&!k&&"market"!==virtualCart.process&&(y+="&installments_number=".concat(d)),A&&!k&&(y+="&installments_upfront=".concat(A)),w&&!k){var L=Math.round(w/d);1===parseFloat(t.tariff.price)&&"rate"===t.getPaymentType()&&(t.accessories.length>0||t.gadgets.length>0)&&(L+=1),"market"!==virtualCart.process&&(y+="&installments_amount=".concat(L))}k&&(y+="&installments=1")}else"gotovina"===s&&(y+="&installments=0",u?(y+="3"===p?splitByCommaAndGenerateUrlParams(LC.BPO_DISCOUNT_HARDWARE_MODEM_CASH,"additional_bpos"):splitByCommaAndGenerateUrlParams(LC.BPO_DISCOUNT_HARDWARE_CASH,"additional_bpos"),b&&P||(y+=splitByCommaAndGenerateUrlParams(LC.BPO_DISCOUNT_ACCESSORY_CASH,"additional_bpos"))):b&&P||(y+=splitByCommaAndGenerateUrlParams(LC.BPO_DISCOUNT_ACCESSORY_CASH,"additional_bpos")));if(a&&a.forEach((function(e){var t=!1;(null==e?void 0:e.is_booster)&&(null==e?void 0:e.bpo_added_with_tariff)&&(null==e?void 0:e.bpo_added_with_tariff)!==v&&(t=!0),"BPO_NEO24_P"===v&&(t=!1,(null==e?void 0:e.bpo)===LC.TRAVEL_ADDON_BPOS&&(y+="&trinsurance=1"));var n=!0;if((null==e?void 0:e.is_booster)&&(null==e?void 0:e.bpo_valid_for_SPO)!==v&&(n=!1),n){var i,r=null==e||null===(i=e.bpo)||void 0===i?void 0:i.split(";");r&&!t&&r.forEach((function(e){y+="&tariff_bpos[]=".concat(e)}))}})),"BPO_NEOPLATINUM_P"===v&&(y+="&insurance=1"),t._isEBill&&(b&&P||!g)&&(y+="&e-bill=1"),"7"===p&&(y+="&3rd_party=1"),t._isESim&&(y+="&e-sim=1"),t._vouchers.length>0&&t._vouchers.forEach((function(e){y+="&vouchers[]=".concat(e)})),t.tariffSplit&&t.tariffSplit.tariffSplitMonths&&t.tariffSplit.tariffSplitBefore&&(y+="&tariffSplitMonths=".concat(t.tariffSplit.tariffSplitMonths,"&tariffSplitBefore=").concat(t.tariffSplit.tariffSplitBefore)),virtualCart.process){if(O&&"gotovina"===s);else{var N=virtualCart.process.split(";");N.forEach((function(e){y+="&process[]=".concat(e)}))}if(t._mnpLink){var R=document.querySelector("#mnp-warning-modal");R&&R.classList.add("is-on")}else{var x,F;if(t._isPreselctedHWRequired&&(null===(x=t._preselctedHW)||void 0===x?void 0:x.code))y+="&preselected-hw=".concat(null===(F=t._preselctedHW)||void 0===F?void 0:F.code);setCheckoutStep1Datalayer();var B=t.getPricesForEveryItemInCart();console.log(y,"webshopLink"),y.includes("?&")&&(y=y.replace("?&","?"));var q=virtualCart.getAll(),G=q.device,H=G.deviceCode;$.ajax({type:"POST",url:"/api/save-cart",data:{cartEncoded:virtualCart.encodeCart(),deviceCode:H},dataType:"json"}).done((function(e){var t=virtualCart.getAll();t.originCart={hash:e.hash,link:e.link},$.ajax({type:"POST",url:"/api/set-cart",data:{preset_json:JSON.stringify(B),cart_json:JSON.stringify(t)},dataType:"json"}).done((function(e){(null==e?void 0:e.cart_id)&&(y+="&cart_id="+e.cart_id),console.log(y,"webshopLink"),window.location.href=y})).fail((function(e){console.log("fail",e)}))}))}}else{var W=document.querySelector("#drawer-guided-selling");W&&(gs.handleVirtualCartOptions(),W.classList.add("is-on"))}}else $("#mnp-modal").addClass("is-on")},this.getPricesForEveryItemInCart=function(){var e={device:null,accessoriesAndGadgets:null,insurance:null,tariff:null,tariffAddons:null,preselectedHw:null};return e.device=t.getPriceForDevice(),e.preselectedHw=t.getPriceForPreselectedHw(),e.accessoriesAndGadgets=t.getPricesForAccessoriesAndGadgets(),e.insurance=t.getInsuranceDataFromCart(),e.tariff=t.getTariffDataFromCart(),e.tariffAddons=t.getAddonsPrices(),e},this.getPriceForPreselectedHw=function(){var e=t._preselctedHW;if(null==e?void 0:e.code){var n=e.price,i=e.name,r=e.manufacturer;return{price:1===Object(_.cleanPrice)(n)?0:Object(_.cleanPrice)(n),priceCash:1===Object(_.cleanPrice)(n)?1:null,oldPrice:null,oldPriceCash:null,participation:null,name:"".concat(r," ").concat(i)}}return null},this.getPriceForDevice=function(){var e,n=t.tariff.tariffCode,i=LC.DISCOUNT_15K,r=LC.DISCOUNT_FIVE_G;if(n&&(null===(e=t.device)||void 0===e?void 0:e.deviceCode)){var o=t.tariff,c=o.price,a=o.priceCash,s=o.oldPrice,l=o.oldPriceCash,u=t.device.deviceisFiveG,f=Object(_.cleanPrice)(c),d=u&&"0"!==u&&"false"!==u;if(t._isDiscount15k)(f-=d?i+r:i)<0&&(f=0);return{price:f,priceCash:Object(_.cleanPrice)(a),oldPrice:s?Object(_.cleanPrice)(s):null,oldPriceCash:l?Object(_.cleanPrice)(l):null,participation:Object(_.cleanPrice)(t._participation)}}return null},this.getPricesForAccessoriesAndGadgets=function(){var e=t.getAccessoryPricesList(),n=t.getGadgetsPricesList();return e||n?!e&&n?n:e&&!n?e:on(on({},e),n):null},this.getGadgetsPricesList=function(){var e=t.gadgets;return e&&0!==(null==e?void 0:e.length)?e.reduce((function(e,t){return on(on({},e),{},cn({},t.accessoryCode,{price:Object(_.cleanPrice)(t.accessoryPrice),oldPrice:null,participation:Object(_.cleanPrice)(t.accessoryParticipation),priceCash:.9*Object(_.cleanPrice)(t.accessoryPrice)}))}),{}):null},this.getTariffDataFromCart=function(){var e=t.tariff,n=t.device;if((null==e?void 0:e.tariffCode)&&"STANDALONE"!==(null==e?void 0:e.tariffCode)){var i=e.monthlyFee,r=e.tariffCode,o=e.name,c=e.tariffMontlyFeeWithoutDevice,a=e.oldMonthlyDevicePrice;return{priceMonthly:Object(_.cleanPrice)(i),priceMonthlyWithoutDevice:(null==n?void 0:n.deviceCode)?null:Object(_.cleanPrice)(c),oldPriceMonthly:Object(_.cleanPrice)(a),code:r,name:o,properties:t.tariff.tariffProperties}}return null},this.getInsuranceDataFromCart=function(){var e=t.insurance;if(!e||!(null==e?void 0:e.isSelected))return null;var n=e.insuranceType,i=e.insurancePrice,r=e.insurancePromotionActive,o=e.insuranceParticipation;return{category:parseInt(n),price:Object(_.cleanPrice)(i),damageParticipation:Object(_.cleanPrice)(o),isPromoActive:!!r}},this.getAccessoryPricesList=function(){var e=t.accessories;return e&&0!==(null==e?void 0:e.length)?e.reduce((function(e,t){return on(on({},e),{},cn({},t.accessoryCode,{price:Object(_.cleanPrice)(t.accessoryPrice),oldPrice:null,participation:Object(_.cleanPrice)(t.accessoryParticipation),priceCash:.9*Object(_.cleanPrice)(t.accessoryPrice)}))}),{}):null},this.getAddonsPrices=function(){var e=t.tariffAddons,n=t.tariff;return e&&0!==(null==e?void 0:e.length)?e.filter((function(e){return(null==e?void 0:e.bpo_valid_for_SPO)===(null==n?void 0:n.tariffCode)})).map((function(e){var t=!!(null==e?void 0:e.bpo_promo);return{is_promo_active:t,promo_price:t?Object(_.cleanPrice)(null==e?void 0:e.promo_price):null,name:null==e?void 0:e.title,price:t?Object(_.cleanPrice)(null==e?void 0:e.promo_price):Object(_.cleanPrice)(null==e?void 0:e.price),bpo:null==e?void 0:e.bpo,bpo_promo:null==e?void 0:e.bpo_promo,old_price:t?Object(_.cleanPrice)(null==e?void 0:e.price):null}})):null},this.init=function(){},this.test=function(){t.setAllDummyValues(),t.setAll(),t.setAllFromStorage()},this.getAll=function(){return{process:t.process,tariff:t.tariff,device:t.device,device2:t.device2,tariffAddon:t.tariffAddon,tariffAddons:t.tariffAddons,accessories:t.accessories,gadgets:t.gadgets,tariffIncrease:t.tariffIncrease,insurance:t.insurance,paymentType:t._paymentType,participation:t._participation,instalments:t._instalments,webshopLink:t.webshopLink,bezUgovorneObaveze:t._bezUgovorneObaveze,binding:t._binding,mnpLink:t._mnpLink,eSim:t._isESim,vouchers:t._vouchers,paperBillFee:t._paperBillFee,isPaperBill:t._isPaperBill,preselctedHW:t._preselctedHW,isPreselctedHWRequired:t._isPreselctedHWRequired,isDiscount15k:t._isDiscount15k}},this.clearCart=function(){setDataLayerRemoveFromCart(virtualCart),t._process=null,t._tariff=new c,t._device=new s,t._device2=new s,t._tariffAddon=new m,t._tariffAddons=[],t._instalments=null,t._accessories=[],t._gadgets=[],t._tariffIncrease=null,t._insurance=new r,t._paymentType="rate",t._participation=0,t._webshopLink=LC.webshop_url+"/webshop/sr/configure-item/add-item",t._bezUgovorneObaveze=!1,t._mnpLink=null,t._isESim=!1,t._vouchers=[],t._preselctedHW=null,t._isPreselctedHWRequired=!1,t.setAll()},this.isCartEmpty=function(){return!t._process&&t._tariff.isEmpty()&&t._device.isEmpty()&&t._device2.isEmpty()&&0===t._tariffAddons.length&&0===t._accessories.length&&0===t._gadgets.length&&!t._tariffIncrease},this._setAllInStorage=function(){var e=t.encodeCart();"localStorage"===t._storageType?e&&"string"==typeof e&&localStorage.setItem("virtualCart",e):"cookie"===t._storageType&&setCo
14okie("virtualCart",e,30)},this.setAllFromStorage=function(){var e=null;if("localStorage"===t._storageType){var n;if(!(null===(n=window)||void 0===n?void 0:n.localStorage))return;e=localStorage.getItem("virtualCart")}else{if("cookie"!==t._storageType)throw new Error("Storage Type Not Set");e=anvilGetCookie("virtualCart")}if(e){var i=t.decodeCart(e);if(!i)return;var r=i.accessories,o=i.device,c=i.device2,a=i.insurance,s=i.process,l=i.tariff,u=i.tariffAddons,f=i.tariffIncrease,d=i.gadgets,p=i.paymentType,v=i.participation,m=i.instalments,h=i.webshopLink,y=i.bezUgovorneObaveze,_=i.binding,g=i.mnpLink,b=i.eSim,P=i.vouchers,O=i.paperBillFee,T=i.isPaperBill,C=i.preselctedHW,A=i.isPreselctedHWRequired,w=i.isDiscount15k;m&&(t._instalments=m),r&&Array.isArray(r)&&r.forEach((function(e){t.appendToAccessoriesN({accId:null==e?void 0:e.accessoryId,code:null==e?void 0:e.accessoryCode,type:null==e?void 0:e.accessoryType,commercialName:null==e?void 0:e.accessoryComercialName,manufacturerName:null==e?void 0:e.accessoryManufacturerName,name:null==e?void 0:e.accessoryName,price:null==e?void 0:e.accessoryPrice,image:null==e?void 0:e.accessoryImage,participation:null==e?void 0:e.accessoryParticipation,priceCash:null==e?void 0:e.priceCash})})),d&&Array.isArray(d)&&d.forEach((function(e){t.appendToGadget(null==e?void 0:e.accessoryId,null==e?void 0:e.accessoryCode,null==e?void 0:e.accessoryType,null==e?void 0:e.accessoryComercialName,null==e?void 0:e.accessoryManufacturerName,null==e?void 0:e.accessoryName,null==e?void 0:e.accessoryPrice,null==e?void 0:e.accessoryImage,null==e?void 0:e.accessoryParticipation)})),o&&t.setDevice(null==o?void 0:o.deviceType,null==o?void 0:o.deviceCode,null==o?void 0:o.deviceManufacturer,null==o?void 0:o.deviceName,null==o?void 0:o.deviceColor,null==o?void 0:o.deviceMmid,null==o?void 0:o.devicePriceCash,t._instalments,null==o?void 0:o.deviceParticipation,null==o?void 0:o.deviceMonthlyFee,null==o?void 0:o.deviceImage,null==o?void 0:o.deviceisFiveG),c&&t.setDevice2(null==c?void 0:c.deviceType,null==c?void 0:c.deviceCode,null==c?void 0:c.deviceManufacturer,null==c?void 0:c.deviceName,null==c?void 0:c.deviceColor,null==c?void 0:c.deviceMmid,null==c?void 0:c.devicePriceCash,null==c?void 0:c.deviceInstalments,null==c?void 0:c.deviceParticipation,null==c?void 0:c.deviceMonthlyFee,null==c?void 0:c.deviceImage,null==c?void 0:c.deviceisFiveG),a&&t.setInsurance1({type:null==a?void 0:a.insuranceType,name:null==a?void 0:a.insuranceName,price:null==a?void 0:a.insurancePrice,participation:null==a?void 0:a.insuranceParticipation,isSelected:null==a?void 0:a.isSelected,insurancePromotionActive:null==a?void 0:a.insurancePromotionActive}),s&&(t.process=s),l&&t.setTariffNew({tariffCode:null==l?void 0:l.tariffCode,price:null==l?void 0:l.price,priceCash:null==l?void 0:l.priceCash,externalId:null==l?void 0:l.externalId,tariffName:null==l?void 0:l.tariffName,name:null==l?void 0:l.name,monthlyFee:null==l?void 0:l.monthlyFee,monthlyFeeWithoutDevice:null==l?void 0:l.tariffMontlyFeeWithoutDevice,properties:null==l?void 0:l.tariffProperties,participation:null==l?void 0:l.participation,minParticipationForActivation:null==l?void 0:l.minParticipationForActivation,maxParticipationForActivation:null==l?void 0:l.maxParticipationForActivation,oldMonthlyDevicePrice:null==l?void 0:l.oldMonthlyDevicePrice,tariffCollection:null==l?void 0:l.tariffCollection,tariffOldPrice:null==l?void 0:l.tariffOldPrice,tariffOldPriceCash:null==l?void 0:l.tariffOldPriceCash,tariffMonthlyPriceOld:null==l?void 0:l.tariffMonthlyPriceOld,tariffMonthlyDevicePriceOld:null==l?void 0:l.tariffMonthlyDevicePriceOld,shortDescription:null==l?void 0:l.shortDescription,shortDescriptionWithDevice:null==l?void 0:l.shortDescriptionWithDevice,shortDescriptionWithoutDevice:null==l?void 0:l.shortDescriptionWithoutDevice}),p&&(t.setPaymentType(p),t._paymentType=p),f&&(t.tariffIncrease=f),v&&(t._participation=v),h&&(t.webshopLink=h),y&&(t._bezUgovorneObaveze=y),_&&(t._binding=_),g&&(t._mnpLink=g),b&&(t._isESim=b),P&&(t._vouchers=P),O&&(t._paperBillFee=O),T&&(t._isPaperBill=T),C&&(t._preselctedHW=C),A&&(t._isPreselctedHWRequired=A),w&&(t._isDiscount15k=w),u&&Array.isArray(u)&&u.forEach((function(e){t.addTariffAddon(e,!0)}))}},this.setAll=function(){t._setAllInStorage()},this.getTariff=function(){return t._tariff},this.setTariff=function(e,n,i,r,o,c,a,s,l,u,f,d,p){var v=arguments.length>13&&void 0!==arguments[13]?arguments[13]:null,m=arguments.length>14&&void 0!==arguments[14]?arguments[14]:null,h=arguments.length>15?arguments[15]:void 0;t._tariff.setAll(e,n,i,r,o,c,a,s,l,u,f,d,null,p,v,m,h)},this.setTariffNew=function(e){var n=e.tariffCode,i=e.price,r=e.priceCash,o=e.externalId,c=e.tariffName,a=e.name,s=e.monthlyFee,l=e.monthlyFeeWithoutDevice,u=e.properties,f=e.participation,d=e.minParticipationForActivation,p=e.maxParticipationForActivation,v=e.oldMonthlyDevicePrice,m=e.tariffCollection,h=e.tariffOldPrice,y=e.tariffOldPriceCash,_=e.tariffMonthlyPriceOld,g=e.tariffMonthlyDevicePriceOld,b=e.shortDe
14scription,P=e.shortDescriptionWithDevice,O=e.shortDescriptionWithoutDevice;t._tariff.setAllNew({tariffCode:n,price:i,priceCash:r,externalId:o,tariffName:c,name:a,monthlyFee:s,monthlyFeeWithoutDevice:l,tariffProperties:u,minParticipationForActivation:d,maxParticipationForActivation:p,oldMonthlyDevicePrice:v,tariffCollection:m,tariffOldPrice:h,tariffOldPriceCash:y,tariffMonthlyPriceOld:_,tariffMonthlyDevicePriceOld:g,participation:f,shortDescription:b,shortDescriptionWithDevice:P,shortDescriptionWithoutDevice:O})},this.getDevice=function(){return t._device},this.setDevice=function(e,n,i,r,o,c,a,s,l,u,f,d){t._device.setAll(e,n,i,r,o,c,a,s,l,u,f,d)},this.setDevice2=function(e,n,i,r,o,c,a,s,l,u,f,d){t._device2.setAll(e,n,i,r,o,c,a,s,l,u,f,d)},this.addTariffAddon=function(e){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(t._tariffAddons.length<10&&e){var i=new m(e),r=t.getTariffAddons().filter((function(t){return e.id===t.id}));i.isEmpty()||0!==r.length||(t._tariffAddons.push(i),n&&t.setAll())}},this.getTariffAddons=function(){return t._tariffAddons.map((function(e){return e.getAll()}))},this.appendToGadgetsN=function(e){var n=e.accId,i=e.code,r=e.type,o=e.commercialName,c=e.manufacturerName,a=e.name,s=e.price,l=e.image,u=e.participation,f=e.priceCash;if(t._gadgets.length<10){var d=t._gadgets.filter((function(e){return e.accessoryId===n}));if(d.length>0){if(d[0].accessoryParticipation===u)return;t._gadgets=t._gadgets.filter((function(e){return e.accessoryId!==n}))}var v=new p;v.setAllN({accId:n,code:i,type:r,commercialName:o,manufacturerName:c,name:a,price:s,priceCash:f,image:l,participation:u,isGadget:!0}),t._gadgets.push(v)}},this.appendToAccessoriesN=function(e){var n=e.accId,i=e.code,r=e.type,o=e.commercialName,c=e.manufacturerName,a=e.name,s=e.price,l=e.image,u=e.participation,f=e.priceCash;if(t._accessories.length<10){var d=t._accessories.filter((function(e){return e.accessoryId===n}));if(d.length>0){if(d[0].accessoryParticipation===u)return;t._accessories=t._accessories.filter((function(e){return e.accessoryId!==n}))}var v=new p;v.setAllN({accId:n,code:i,type:r,commercialName:o,manufacturerName:c,name:a,price:s,priceCash:f,image:l,participation:u}),t._accessories.push(v)}},this.appendToAccessories=function(e,n,i,r,o,c,a,s,l){if(t._accessories.length<10){var u=t._accessories.filter((function(t){return t.accessoryId===e}));if(u.length>0){if(u[0].accessoryParticipation===l)return;t._accessories=t._accessories.filter((function(t){return t.accessoryId!==e}))}var f=new p;f.setAll(e,n,i,r,o,c,a,s,l),t._accessories.push(f)}},this.appendToGadget=function(e,n,i,r,o,c,a,s,l){if(t._gadgets.length<10){if(t._gadgets.filter((function(t){return t.accessoryId===e})).length>0)return;var u=new p(!0);u.setAll(e,n,i,r,o,c,a,s,l,!0),t._gadgets.push(u)}else console.log("gadget can`t be added. array is full (10 items)")},this.toggleInsurance=function(){t._insurance.toggleSelected(),t.setAll()},this.isSelectedInsurance=function(){return t._insurance.isSelected()},this.setParticipation=function(e){t._participation=e},this.getParticipation=function(){return t._participation},this.setInsurance1=function(e){var n=e.type,i=e.name,r=e.price,o=e.participation,c=e.isSelected,a=void 0!==c&&c,s=e.insurancePromotionActive,l=void 0!==s&&s;t.device?(a&&t._insurance.setSelected(!0),t._insurance.setAll(n,i,r,o,l)):console.warn("Insurance can't be set because Device is not set")},this.setInsurance=function(e,n,i,r){var o=arguments.length>4&&void 0!==arguments[4]&&arguments[4];t.device?(o&&t._insurance.setSelected(!0),t._insurance.setAll(e,n,i,r)):console.warn("Insurance can't be set because Device is not set")},this.encodeCart=function(){return e=JSON.stringify(t.getAll()),btoa(encodeURIComponent(e).replace(/%([0-9A-F]{2})/g,(function(e,t){return String.fromCharCode("0x"+t)})));var e},this.decodeCart=function(e){return JSON.parse(decodeURIComponent(atob(e).split("").map((function(e){return"%"+("00"+e.charCodeAt(0).toString(16)).slice(-2)})).join("")))},this.setPaymentType=function(e){t._paymentType=e},this.getPaymentType=function(){return t._paymentType},this.removeAccessory=function(e){t._accessories=t._accessories.filter((function(t){return t.accessoryCode!==e})),t.setAll()},this.removeTariffAddon=function(e){t._tariffAddons=t._tariffAddons.filter((function(t){return t.getAll().bpo!==e})),t.setAll()},this.removeAllAddons=function(){t._tariffAddons=[],t.setAll()},this.removeAllBoosterAddons=function(){t._tariffAddons=t._tariffAddons.filter((function(e){return!e.state.is_booster})),t.setAll()},this.setSplitTariff=function(e){t.tariffSplit=e}
14,this.getSplitTariff=function(){return t.tariffSplit},this.removeGadget=function(e){t._gadgets=t._gadgets.filter((function(t){return t.accessoryCode!==e})),t.setAll()},this.recalculateAccAndTariffTotal=function(){var e=virtualCart.getAll(),t=e.accessories,n=e.gadgets;return t.reduce((function(e,t){return parseInt(e)+(parseInt(Object(_.cleanPrice)(t.accessoryPrice))-parseInt(Object(_.cleanPrice)(t.accessoryParticipation)))}),0)+n.reduce((function(e,t){return parseInt(e)+(parseInt(Object(_.cleanPrice)(t.accessoryPrice))-parseInt(Object(_.cleanPrice)(t.accessoryParticipation)))}),0)},this.getTotal=function(e){var n=e.deviceMonthlyFee,i=(e.accesoryMonthlyFee,e.deviceParticipation),r=e.tariffMonthlyFee,o=e.insuranceMonthlyFee,c=e.accessoryParticipation,a=0,s=0,l=t.insurance,u=l.isSelected,f=l.insurancePromotionActive,d=i;return"string"==typeof i&&(d=Object(_.cleanPrice)(i)),n&&(a+=Object(_.cleanPrice)(n)),t.recalculateAccAndTariffTotal()&&("rate"===t._paymentType?a+=Object(_.cleanPrice)(t.recalculateAccAndTariffTotal())/t.instalments:a+=0),c&&(s+=Object(_.cleanPrice)(c)),r&&(a+=Object(_.cleanPrice)(r)),o&&u&&!f&&(a+=Object(_.cleanPrice)(o)),i&&(s+=Object(_.cleanPrice)(d)),a+=t._paperBillFee,"mnp"!==t.process&&"postpaid"!==t.process||(s+=1),{totalParticipation:s,totalMonthlyPrice:a}},this.getTariffBoosters=function(){return t._tariffAddons.filter((function(e){return e.state.is_booster}))},this.getFirstBooster=function(){var e=t.getTariffBoosters();return e&&e.length>0?e[0]:null},this.setSimCardType=function(){["postpaid","mnp"].includes(t.process)?$(".sim-card-type-section-wrapper").removeClass("display_none"):$(".sim-card-type-section-wrapper").addClass("display_none"),virtualCart.getESim()&&$("#radio-e-sim").click()},this.setESim=function(e){t._isESim=!!e,t.setAll()},this.getESim=function(){return t._isESim},this.setIsDiscount15k=function(e){t._isDiscount15k=!!e},this.getIsDiscount15k=function(){return t._isDiscount15k},this.getVouchers=function(){return t._vouchers},this.removeVoucher=function(e){t._vouchers=t._vouchers.filter((function(t){return t!==e})),t.setAll()},this.addVoucher=function(e){return e?"string"!=typeof e?[!1,"voucher code must be string"]:e.length<ln?[!1,"voucher code must be at least ".concat(ln," characters long")]:t.doesVoucherExists(e)?[!1,"duplicate"]:t._vouchers.length>=sn?[!1,"vouchers_limit"]:(t._vouchers=[].concat(tn(t._vouchers),[e]),t.setAll(),[!0,"success"]):[!1,"missing argument (voucher code)"]},this.getDevicePrices=function(){console.log("$DBG1: Ne treba da se javi ako je dodat acc!");var e=t.getAll(),n=e.device,i=e.tariff,r=e.paymentType,o=e.participation,c=(e.accessories,n.deviceImage,n.deviceName,n.deviceInstalments,n.deviceMonthlyFee),a=n.deviceParticipation,s=n.deviceisFiveG,l=i.price;i.priceCash,LC.DISCOUNT_FIVE_G;console.log(o,"participation before upfront"),console.log(a,"deviceParticipation before upfront");var u=0,f=0,d=s&&"0"!==s&&"false"!==s,p=LC.DISCOUNT_15K,v=LC.DISCOUNT_FIVE_G,m=t._isDiscount15k?d?p+v:p:0,h=Object(_.cleanPrice)(l);if("gotovina"===r){u=0;var y=h;f=.9*h,t._isDiscount15k&&((y-=m)<0&&(y=0),f=Math.floor(.9*y)),f<=0&&(f=1),"STANDALONE"===(null==i?void 0:i.tariffCode)&&(f=h)}else if(c){var g=i.maxParticipationForActivation;if(f=Object(_.cleanPrice)(o),t._isDiscount15k){var b=Math.round(Object(_.cleanPrice)(null==i?void 0:i.price)-m);f=b>g?b-g:0,u=Math.round((Object(_.cleanPrice)(null==i?void 0:i.price)-m-f)/24)}else u=Math.round((Object(_.cleanPrice)(null==i?void 0:i.price)-f)/24)}return[u,f]},this.getAccessoryPrices=function(e){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!e)return null;var i=n?t.getGadget(e):t.getAccessory(e),r=virtualCart.getAll(),o=r.paymentType,c=r.device,a=c.deviceInstalments,s=a||24,l=i.accessoryPrice,u=i.priceCash,f=i.accessoryParticipation,d=void 0===f?0:f,p=0,v=d,m=u;if(m||(m=.9*Object(_.cleanPrice)(l)),"rate"===o){var h=Object(_.cleanPrice)(l);if(1===h)p=1;else{var y=h-d;p=Math.round(y/s)}}else"gotovina"===o&&(v=Math.round(m));return[p,v]},this.getAccessory=function(e){if(!e||!t._accessories||0===t._accessories.length)return null;var n=t._accessories.filter((function(t){return t.accessoryCode===e}));return n&&0!==n.length?n[0]:null},this.getGadget=function(e){if(!e||!t._gadgets||0===t._gadgets.length)return null;var n=t._gadgets.filter((function(t){return t.accessoryCode===e}));return n&&0!==n.length?n[0]:null},this.isAccOnly=function(){var e=t.getTariff().isEmpty(),n=t.getDevice().isEmpty(),i=0===t.accessories.length,r=0===t.gadgets.length;return e&&n&&(!i||!r)},this.doesVoucherExists=function(e){return!!t._vouchers.filter((function(t){return t===e})).length},this.getMmidsForAllProducts=function(){var e=t.getAll(),n=e.device,i=e.accessories,r=e.gadgets,o=n.deviceMmid,c=n.deviceCode,a=n.deviceType,s=i.map((function(e){return e.accessoryCode})),l=r.map((function(e){return e.accessoryCode})),u=o;return o&&!(null==o?void 0:o.startsWith("SPO_"))&&(u="7"===a?c:"SPO_".concat(o)),[u].concat(tn(s),tn(l))},e._instance)return e._instance;e._instance=this,this._process=null,this._tariff=new c,this._device=new s,this._device2=new s,this._tariffAddon=new m,this._tariffAddons=[],this._instalments=24,this._accessories=[],this._gadgets=[],this._tariffIncrease=null,this._insurance=new r,this._paymentType="rate",this._participation=0,this._bezUgovorneObaveze=!1,this._binding=24;return this._storageType="localStorage",this.webshopLink=LC.webshop_url+"/sr/configure-item/add-item",this._isEBill=!0,this._isESim=!1,this._isPaperBill=!this._isEBill,this._mnpLink=null,this._paperBillFee=0,this._shouldIgnorePaperBillFee=!1,this._preselctedHW=null,this._isPreselctedHWRequired=!1,this._isDiscount15k=!1,this._vouchers=[],this.tariffSplit={},this.init(),this}var t,n,i;return t=e,(n=[{key:"setAllDummyValues",value:function(){this.process="process1",this.setTariff("SPO1KDJASD",500,5e3,"12312","TARIFA","TARIFA 1 10",1500,1200),this.setDevice("ADWEA","Huawei","P20","#FAAFAA",16235,2e4,12,1e4,2e3,"https://www.vipmobile.rs/upload/devices_thumbs/APPA221825/APPA221825_image001_300_450.png?revision=20_06_12"),this.setDevice2("POISA","Huawei","P30","#FAAFAA",16235,25e3,12,12e3,1820,"https://www.vipmobile.rs/upload/devices_thumbs/APPA221825/APPA221825_image001_300_450.png?revision=20_06_12"),this.instalments=12,this.appendToAccessories(123,"dDASAD1","123","comercialName","tip","ime","price","https://www.vipmobile.rs/upload/devices_thumbs/AD_17294/AD_17294_image001_200_300.png"),this.appendToAccessories(1234,"dgASAD1","122","comercialName1","tip1","ime1","price1","https://www.vipmobile.rs/upload/devices_thumbs/AD_17294/AD_17294_image001_200_300.png"),this.tariffIncrease="ne znm sta ide ovde",this.setInsurance("BPO123","Osiguranje",500,5e3)}},{key:"instance",get:function(){return this._instance},set:function(e){this._instance=e}},{key:"process",get:function(){return this._process}
14,set:function(e){this._process=e}},{key:"tariff",get:function(){return this._tariff.getAll()}},{key:"device",get:function(){return this._device.getAll()}},{key:"device2",get:function(){return this._device2.getAll()}},{key:"tariffAddon",get:function(){return this._tariffAddon.getAll()}},{key:"tariffAddons",get:function(){return this._tariffAddons.map((function(e){return e.getAll()}))}},{key:"instalments",get:function(){return this._instalments},set:function(e){this._instalments=e}},{key:"accessories",get:function(){return this._accessories.map((function(e){return e.getAll()}))}},{key:"gadgets",get:function(){return this._gadgets.map((function(e){return e.getAll()}))}},{key:"tariffIncrease",get:function(){return this._tariffIncrease},set:function(e){this._tariffIncrease=e}},{key:"insurance",get:function(){return this._insurance.getAll()}}])&&an(t.prototype,n),i&&an(t,i),e}();window.VirtualCart=fn,window.PDPVirtualCart=y,window.PDPHandler=en;t.default=fn},function(e,t,n){"use strict";function i(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)}}n.d(t,"a",(function(){return r}));var r=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.events={}}var t,n,r;return t=e,(n=[{key:"subscribe",value:function(e,t){return this.events.hasOwnProperty(e)||(this.events[e]=[]),this.events[e].push(t)}},{key:"publish",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this;return n.events.hasOwnProperty(e)?n.events[e].map((function(e){return e(t)})):[]}}])&&i(t.prototype,n),r&&i(t,r),e}()},,function(e,t){var n,i,r=e.exports={};function o(){throw new Error("setTimeout has not been defined")}function c(){throw new Error("clearTimeout has not been defined")}function a(e){if(n===setTimeout)return setTimeout(e,0);if((n===o||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:o}catch(e){n=o}try{i="function"==typeof clearTimeout?clearTimeout:c}catch(e){i=c}}();var s,l=[],u=!1,f=-1;function d(){u&&s&&(u=!1,s.length?l=s.concat(l):f=-1,l.length&&p())}function p(){if(!u){var e=a(d);u=!0;for(var t=l.length;t;){for(s=l,l=[];++f<t;)s&&s[f].run();f=-1,t=l.length}s=null,u=!1,function(e){if(i===clearTimeout)return clearTimeout(e);if((i===c||!i)&&clearTimeout)return i=clearTimeout,clearTimeout(e);try{i(e)}catch(t){try{return i.call(null,e)}catch(t){return i.call(this,e)}}}(e)}}function v(e,t){this.fun=e,this.array=t}function m(){}r.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];l.push(new v(e,t)),1!==l.length||u||a(p)},v.prototype.run=function(){this.fun.apply(null,this.array)},r.title="browser",r.browser=!0,r.env={},r.argv=[],r.version="",r.versions={},r.on=m,r.addListener=m,r.once=m,r.off=m,r.removeListener=m,r.removeAllListeners=m,r.emit=m,r.prependListener=m,r.prependOnceListener=m,r.listeners=function(e){return[]},r.binding=function(e){throw new Error("process.binding is not supported")},r.cwd=function(){return"/"},r.chdir=function(e){throw new Error("process.chdir is not supported")},r.umask=function(){return 0}},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n}]);
15//# sourceMappingURL=VirtualCart.js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.