index of
/
home
/
thefkyzp
/
hulmvisaadvisor.com
/
wp-content
/
plugins
/
surecart
/
dist
/
File: /home/thefkyzp/hulmvisaadvisor.com/wp-content/plugins/surecart/dist/7831.js
"use strict";(self.webpackChunk_surecart_surecart=self.webpackChunk_surecart_surecart||[]).push([[7831],{6201:function(n,t,r){r.d(t,{a:function(){return u},b:function(){return c},c:function(){return o},d:function(){return s},g:function(){return i},i:function(){return f}});var e=r(8537),o=function(){return["loading","busy","redirecting"].includes(e.s.loading)},i=function(){var n,t;return(null===(t=null===(n=null===e.s||void 0===e.s?void 0:e.s.checkout)||void 0===n?void 0:n.metadata)||void 0===t?void 0:t.success_url)||e.s.success_url||null},u=function(n){var t,r;return null!==(r=null===(t=null===e.s||void 0===e.s?void 0:e.s.line_item)||void 0===t?void 0:t.total_amount)&&void 0!==r?r:n},c=function(n){var t,r,o;return(null===(t=null===e.s||void 0===e.s?void 0:e.s.line_item)||void 0===t?void 0:t.total_savings_amount)?-(null===(r=null===e.s||void 0===e.s?void 0:e.s.line_item)||void 0===r?void 0:r.total_savings_amount)+(null===(o=null===e.s||void 0===e.s?void 0:e.s.line_item)||void 0===o?void 0:o.total_amount):n},a=function(){var n,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"seconds",r=null===(n=e.s.checkout)||void 0===n?void 0:n.upsells_expire_at;if(!r)return null;var o=Date.now(),i=Math.floor((1e3*r-o)/1e3);return i<0?0:"seconds"===t?i:"minutes"===t?Math.floor(i/60):"hours"===t?Math.floor(i/60/60):void 0},l=function(n){return n<10?"0".concat(n):"".concat(n)},s=function(){var n;if(!(null===(n=e.s.checkout)||void 0===n?void 0:n.upsells_expire_at))return"--:--";var t=a("seconds"),r=Math.floor(t/86400),o=Math.floor(t%86400/3600),i=Math.floor(t%3600/60),u=Math.floor(t%60);return r>0?"".concat(l(r),":").concat(l(o),":").concat(l(i),":").concat(l(u)):o>0?"".concat(l(o),":").concat(l(i),":").concat(l(u)):"".concat(l(i),":").concat(l(u))},f=function(){var n=a();return null!==a()&&n<=0}},6151:function(n,t,r){r.d(t,{c:function(){return f}});var e=r(8860);function o(n,t){(null==t||t>n.length)&&(t=n.length);for(var r=0,e=new Array(t);r<t;r++)e[r]=n[r];return e}var i,u,c=function(n){return!("isConnected"in n)||n.isConnected},a=(i=function(n){var t,r=function(n,t){var r="undefined"!=typeof Symbol&&n[Symbol.iterator]||n["@@iterator"];if(!r){if(Array.isArray(n)||(r=function(n,t){if(n){if("string"==typeof n)return o(n,t);var r=Object.prototype.toString.call(n).slice(8,-1);return"Object"===r&&n.constructor&&(r=n.constructor.name),"Map"===r||"Set"===r?Array.from(n):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?o(n,t):void 0}}(n))||t&&n&&"number"==typeof n.length){r&&(n=r);var e=0,i=function(){};return{s:i,n:function(){return e>=n.length?{done:!0}:{done:!1,value:n[e++]}},e:function(n){throw n},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var u,c=!0,a=!1;return{s:function(){r=r.call(n)},n:function(){var n=r.next();return c=n.done,n},e:function(n){a=!0,u=n},f:function(){try{c||null==r.return||r.return()}finally{if(a)throw u}}}}(n.keys());try{for(r.s();!(t=r.n()).done;){var e=t.value;n.set(e,n.get(e).filter(c))}}catch(n){r.e(n)}finally{r.f()}},2e3,function(){for(var n=arguments.length,t=new Array(n),r=0;r<n;r++)t[r]=arguments[r];u&&clearTimeout(u),u=setTimeout((function(){u=0,i.apply(void 0,t)}),2e3)}),l=function(n){return"function"==typeof n?n():n},s=function(n,t){var r=n.indexOf(t);r>=0&&(n[r]=n[n.length-1],n.length--)},f=function(n,t){var r=function(n){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(n,t){return n!==t},r=l(n),e=new Map(Object.entries(null!=r?r:{})),o={dispose:[],get:[],set:[],reset:[]},i=function(){var t;e=new Map(Object.entries(null!==(t=l(n))&&void 0!==t?t:{})),o.reset.forEach((function(n){return n()}))},u=function(){o.dispose.forEach((function(n){return n()})),i()},c=function(n){return o.get.forEach((function(t){return t(n)})),e.get(n)},a=function(n,r){var i=e.get(n);t(r,i,n)&&(e.set(n,r),o.set.forEach((function(t){return t(n,r,i)})))},f="undefined"==typeof Proxy?{}:new Proxy(r,{get:function(n,t){return c(t)},ownKeys:function(n){return Array.from(e.keys())},getOwnPropertyDescriptor:function(){return{enumerable:!0,configurable:!0}},has:function(n,t){return e.has(t)},set:function(n,t,r){return a(t,r),!0}}),d=function(n,t){return o[n].push(t),function(){s(o[n],t)}},v=function(t,r){var e=d("set",(function(n,e){n===t&&r(e)})),o=d("reset",(function(){return r(l(n)[t])}));return function(){e(),o()}},p=function(){for(var n=arguments.length,t=new Array(n),r=0;r<n;r++)t[r]=arguments[r];var e=t.reduce((function(n,t){return t.set&&n.push(d("set",t.set)),t.get&&n.push(d("get",t.get)),t.reset&&n.push(d("reset",t.reset)),t.dispose&&n.push(d("dispose",t.dispose)),n}),[]);return function(){return e.forEach((function(n){return n()}))}};return{state:f,get:c,set:a,on:d,onChange:v,use:p,dispose:u,reset:i,forceUpdate:function(n){var t=e.get(n);o.set.forEach((function(r){return r(n,t,t)}))}}}(n,t);return r.use(function(){if("function"!=typeof e.g)return{};var n=new Map;return{dispose:function(){return n.clear()},get:function(t){var r=(0,e.g)();r&&function(n,t,r){var e=n.get(t);e?e.includes(r)||e.push(r):n.set(t,[r])}(n,t,r)},set:function(t){var r=n.get(t);r&&n.set(t,r.filter(e.f)),a(n)},reset:function(){n.forEach((function(n){return n.forEach(e.f)})),a(n)}}}()),r}},7831:function(n,t,r){r.r(t),r.d(t,{sc_upsell_countdown_timer:function(){return c}});var e=r(5671),o=r(3144),i=r(8860),u=r(6201),c=(r(8537),r(6151),function(){function n(t){(0,e.Z)(this,n),(0,i.r)(this,t),this.timeRemaining=1/0,this.formattedTime=void 0,this.showIcon=!0}return(0,o.Z)(n,[{key:"componentDidLoad",value:function(){this.updateCountdown()}},{key:"updateCountdown",value:function(){var n=this;this.formattedTime=(0,u.d)(),setInterval((function(){n.formattedTime=(0,u.d)()}),1e3)}},{key:"render",value:function(){return(0,i.h)(i.H,{role:"timer",class:{"sc-upsell-countdown-timer":!0}},this.showIcon&&(0,i.h)("sc-icon",{name:"clock"}),(0,i.h)("span",null,(0,i.h)("slot",{name:"offer-expire-text"})," ",(0,i.h)("strong",null,this.formattedTime)))}}]),n}());c.style=":host{display:flex;justify-content:var(--sc-upsell-countdown-timer-justify-content, center);align-items:var(--sc-upsell-countdown-timer-align-items, center);text-align:var(--sc-upsell-countdown-timer-text-align, center);flex-wrap:wrap;gap:var(--sc-upsell-countdown-timer-gap, 0.5em);line-height:1;padding:var(--sc-upsell-countdown-timer-padding, var(--sc-spacing-medium));border-radius:var(--sc-upsell-countdown-timer-border-radius, var(--sc-border-radius-pill));background-color:var(--sc-upsell-countdown-timer-background-color, rgb(226, 249, 235));color:var(--sc-upsell-countdown-timer-color, rgb(71, 91, 80))}"},8537:function(n,t,r){r.d(t,{a:function(){return f},d:function(){return d},f:function(){return v},o:function(){return s},s:function(){return l}});var e=r(4942),o=r(8403),i=r(6151);function u(n,t){var r=Object.keys(n);if(Object.getOwnPropertySymbols){var e=Object.getOwnPropertySymbols(n);t&&(e=e.filter((function(t){return Object.getOwnPropertyDescriptor(n,t).enumerable}))),r.push.apply(r,e)}return r}var c=(0,o.g)().upsell,a=(0,i.c)(function(n){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?u(Object(r),!0).forEach((function(t){(0,e.Z)(n,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(r)):u(Object(r)).forEach((function(t){Object.defineProperty(n,t,Object.getOwnPropertyDescriptor(r,t))}))}return n}({upsell:null,product:null,line_item:null,checkout_id:null,checkout:null,form_id:null,busy:!1,disabled:!1,success_url:null,text:{success:{title:"",description:"",button:""}}},c),(function(n,t){return JSON.stringify(n)!==JSON.stringify(t)})),l=a.state,s=a.onChange,f=a.on,d=a.dispose,v=a.forceUpdate},8403:function(n,t,r){r.d(t,{a:function(){return c},g:function(){return i},i:function(){return u}});var e=r(9062),o=r(1002),i=function(){var n,t=document.querySelector('script[type="application/json"]#sc-store-data');if(!t)return{};try{var r=JSON.parse(t.textContent);if((n=r)&&"object"===(0,o.Z)(n)&&!Array.isArray(n))return r;throw Error("Parsed state is not an object")}catch(n){console.log(n)}return{}},u=function(n,t,r,o){var i,u,c,a,l;if(!(null==o?void 0:o.stock_enabled)||(null==o?void 0:o.allow_out_of_stock_purchases))return!1;if(1===n){var s=null===(c=(u=(null===(i=o.variants)||void 0===i?void 0:i.data)||[]).filter)||void 0===c?void 0:c.call(u,(function(n){return n.option_1===t}));return Math.max.apply(Math,(0,e.Z)(s.map((function(n){return n.available_stock}))))<=0}if(2===n){var f=((null===(a=o.variants)||void 0===a?void 0:a.data)||[]).filter((function(n){return(null==n?void 0:n.option_1)===r.option_1&&n.option_2===t}));return Math.max.apply(Math,(0,e.Z)(f.map((function(n){return n.available_stock}))))<=0}var d=((null===(l=o.variants)||void 0===l?void 0:l.data)||[]).filter((function(n){return(null==n?void 0:n.option_1)===r.option_1&&(null==n?void 0:n.option_2)===r.option_2&&n.option_3===t}));return Math.max.apply(Math,(0,e.Z)(d.map((function(n){return n.available_stock}))))<=0},c=function(n,t,r,e){var o,i,u;return 1===n?!((null===(o=null==e?void 0:e.variants)||void 0===o?void 0:o.data)||[]).some((function(n){return n.option_1===t})):2===n?!((null===(i=null==e?void 0:e.variants)||void 0===i?void 0:i.data)||[]).some((function(n){return(null==n?void 0:n.option_1)===r.option_1&&n.option_2===t})):!((null===(u=null==e?void 0:e.variants)||void 0===u?void 0:u.data)||[]).some((function(n){return(null==n?void 0:n.option_1)===r.option_1&&(null==n?void 0:n.option_2)===r.option_2&&n.option_3===t}))}},4942:function(n,t,r){function e(n,t,r){return t in n?Object.defineProperty(n,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):n[t]=r,n}r.d(t,{Z:function(){return e}})}}]);