index of
/
home
/
thefkyzp
/
hulmvisaadvisor.com
/
wp-content
/
plugins
/
surecart
/
dist
/
File: /home/thefkyzp/hulmvisaadvisor.com/wp-content/plugins/surecart/dist/4527.js
"use strict";(self.webpackChunk_surecart_surecart=self.webpackChunk_surecart_surecart||[]).push([[4527],{4805:function(r,n,t){t.d(n,{a:function(){return l},b:function(){return s},g:function(){return f}});var e=t(4467),c=t(296);function i(r,n){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var e=Object.getOwnPropertySymbols(r);n&&(e=e.filter((function(n){return Object.getOwnPropertyDescriptor(r,n).enumerable}))),t.push.apply(t,e)}return t}function a(r){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?i(Object(t),!0).forEach((function(n){(0,e.A)(r,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):i(Object(t)).forEach((function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(t,n))}))}return r}function o(r,n){var t="undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(!t){if(Array.isArray(r)||(t=function(r,n){if(r){if("string"==typeof r)return u(r,n);var t={}.toString.call(r).slice(8,-1);return"Object"===t&&r.constructor&&(t=r.constructor.name),"Map"===t||"Set"===t?Array.from(r):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?u(r,n):void 0}}(r))||n&&r&&"number"==typeof r.length){t&&(r=t);var _n=0,e=function(){};return{s:e,n:function(){return _n>=r.length?{done:!0}:{done:!1,value:r[_n++]}},e:function(r){throw r},f:e}}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 c,i=!0,a=!1;return{s:function(){t=t.call(r)},n:function(){var r=t.next();return i=r.done,r},e:function(r){a=!0,c=r},f:function(){try{i||null==t.return||t.return()}finally{if(a)throw c}}}}function u(r,n){(null==n||n>r.length)&&(n=r.length);for(var t=0,e=Array(n);t<n;t++)e[t]=r[t];return e}function s(r){for(var n,t="",e=Object.entries(r);n=e.shift();){var i=n,a=(0,c.A)(i,2),u=a[0],s=a[1];if(Array.isArray(s)||s&&s.constructor===Object){var d,f=o(Object.entries(s).reverse());try{for(f.s();!(d=f.n()).done;){var l=(0,c.A)(d.value,2),p=l[0],_=l[1];e.unshift(["".concat(u,"[").concat(p,"]"),_])}}catch(r){f.e(r)}finally{f.f()}}else void 0!==s&&(null===s&&(s=""),t+="&"+[u,s].map(encodeURIComponent).join("="))}return t.substr(1)}function d(r){try{return decodeURIComponent(r)}catch(n){return r}}function f(r){return(function(r){var n;try{n=new URL(r,"http://example.com").search.substring(1)}catch(r){}if(n)return n}(r)||"").replace(/\+/g,"%20").split("&").reduce((function(r,n){var t=n.split("=").filter(Boolean).map(d),e=(0,c.A)(t,2),i=e[0],o=e[1],u=void 0===o?"":o;return i&&function(r,n,t){for(var e=n.length,c=e-1,i=0;i<e;i++){var o=n[i];!o&&Array.isArray(r)&&(o=r.length.toString()),o=["__proto__","constructor","prototype"].includes(o)?o.toUpperCase():o;var u=!isNaN(Number(n[i+1]));r[o]=i===c?t:r[o]||(u?[]:{}),Array.isArray(r[o])&&!u&&(r[o]=a({},r[o])),r=r[o]}}(r,i.replace(/\]/g,"").split("["),u),r}),Object.create(null))}function l(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",n=arguments.length>1?arguments[1]:void 0;if(!n||!Object.keys(n).length)return r;var t=r,e=r.indexOf("?");return-1!==e&&(n=Object.assign(f(r),n),t=t.substr(0,e)),t+"?"+s(n)}},488:function(r,n,t){t.d(n,{i:function(){return i},m:function(){return c},z:function(){return e}});var e=["bif","byr","clp","djf","gnf","isk","jpy","kmf","krw","pyg","rwf","ugx","vnd","vuv","xaf","xag","xau","xba","xbb","xbc","xbd","xdr","xof","xpd","xpf","xpt","xts"],c=function(r,n){return i(n)?r:r/100},i=function(r){var n;return e.includes(null===(n=null==r?void 0:r.toLowerCase)||void 0===n?void 0:n.call(r))}},1517:function(r,n,t){t.d(n,{a:function(){return c},b:function(){return f},c:function(){return p},d:function(){return a},g:function(){return i},i:function(){return u},p:function(){return l},t:function(){return o}});var e=t(488),c=function(r){return(null==r?void 0:r.amount_off)&&(null==r?void 0:r.currency)?i({amount:r.amount_off,currency:r.currency}):(null==r?void 0:r.percent_off)?wp.i18n.sprintf(wp.i18n.__("%1d%% off","surecart"),0|r.percent_off):""},i=function(r){var n=r.amount,t=r.currency,c=function(r,n){return e.z.includes(n)?r:r/100}(n,t);return"".concat(new Intl.NumberFormat(void 0,{style:"currency",currency:t}).format(parseFloat(c.toFixed(2))))},a=function(){var r,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"usd";return null===(r=new Intl.NumberFormat(void 0,{style:"currency",currency:n}).formatToParts().find((function(r){return"currency"===r.type})))||void 0===r?void 0:r.value},o=function(r,n){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:wp.i18n.__("every","surecart"),e=arguments.length>3&&void 0!==arguments[3]?arguments[3]:wp.i18n.__("once","surecart"),c=arguments.length>4&&void 0!==arguments[4]&&arguments[4];switch(n){case"day":return"".concat(t," ").concat(wp.i18n.sprintf(c?wp.i18n._n("%d day","%d days",r,"surecart"):wp.i18n._n("day","%d days",r,"surecart"),r));case"week":return"".concat(t," ").concat(wp.i18n.sprintf(c?wp.i18n._n("%d week","%d weeks",r,"surecart"):wp.i18n._n("week","%d weeks",r,"surecart"),r));case"month":return"".concat(t," ").concat(wp.i18n.sprintf(c?wp.i18n._n("%d month","%d months",r,"surecart"):wp.i18n._n("month","%d months",r,"surecart"),r));case"year":return"".concat(t," ").concat(wp.i18n.sprintf(c?wp.i18n._n("%d year","%d years",r,"surecart"):wp.i18n._n("year","%d years",r,"surecart"),r));default:return e}},u=function(r){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!r)return"";var t=n.showOnce,e=n.labels,c=n.abbreviate,i=(e||{}).interval,a=void 0===i?wp.i18n.__("every","surecart"):i;return"".concat(s(r,a,t?wp.i18n.__("once","surecart"):"",c)," ").concat(d(r,c))},s=function(r,n){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:wp.i18n.__("once","surecart"),e=arguments.length>3&&void 0!==arguments[3]&&arguments[3];return r.recurring_interval_count&&r.recurring_interval&&1!==(null==r?void 0:r.recurring_period_count)?e?function(r,n){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:wp.i18n.__("once","surecart"),e=arguments.length>3&&void 0!==arguments[3]&&arguments[3];switch(n){case"day":return" / ".concat(wp.i18n.sprintf(e?wp.i18n._n("%d day","%d days",r,"surecart"):wp.i18n._n("day","%d days",r,"surecart"),r));case"week":return" / ".concat(wp.i18n.sprintf(e?wp.i18n._n("%d wk","%d wks",r,"surecart"):wp.i18n._n("wk","%d wks",r,"surecart"),r));case"month":return" / ".concat(wp.i18n.sprintf(e?wp.i18n._n("%d mo","%d months",r,"surecart"):wp.i18n._n("mo","%d mos",r,"surecart"),r));case"year":return" / ".concat(wp.i18n.sprintf(e?wp.i18n._n("%d yr","%d yrs",r,"surecart"):wp.i18n._n("yr","%d yrs",r,"surecart"),r));default:return t}}(r.recurring_interval_count,r.recurring_interval,t):o(r.recurring_interval_count,r.recurring_interval," ".concat(n),t):""},d=function(r){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return(null==r?void 0:r.recurring_period_count)&&1!==(null==r?void 0:r.recurring_period_count)?n?"x ".concat(r.recurring_period_count):" (".concat(wp.i18n.sprintf(wp.i18n._n("%d payment","%d payments",r.recurring_period_count,"surecart"),r.recurring_period_count),")"):""},f=function(r){return wp.i18n.sprintf(wp.i18n._n("%d payment remaining","%d payments remaining",r,"surecart"),r)},l=function(r){var n;return r?"".concat(null===(n=null==r?void 0:r.product)||void 0===n?void 0:n.name," ").concat((null==r?void 0:r.name)?"— ".concat(r.name):""):""},p=function(r){switch(r){case"invalid":return wp.i18n.__("Not valid","surecart");case"expired":return wp.i18n.__("Expired","surecart");case"gone":return wp.i18n.__("Not available","surecart");case"less_than_min_subtotal_amount":return wp.i18n.__("Minimum not met","surecart");case"greater_than_max_subtotal_amount":return wp.i18n.__("Order too large","surecart");case"not_applicable":return wp.i18n.__("Product(s) not eligible","surecart");case"not_applicable_to_customer":return wp.i18n.__("Not eligible","surecart");case"":return"";default:return wp.i18n.__("Not redeemable","surecart")}}},4527:function(r,n,t){t.r(n),t.d(n,{sc_subscription_ad_hoc_confirm:function(){return f}});var e=t(467),c=t(3029),i=t(2901),a=t(9280),o=t.n(a),u=t(1346),s=t(1517),d=t(4805),f=function(){return(0,i.A)((function r(n){(0,c.A)(this,r),(0,u.r)(this,n),this.heading=void 0,this.price=void 0,this.busy=!1}),[{key:"handleSubmit",value:(r=(0,e.A)(o().mark((function r(n){var t,e;return o().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,n.target.getFormJson();case 2:return t=r.sent,e=t.ad_hoc_amount,this.busy=!0,r.abrupt("return",window.location.assign((0,d.a)(window.location.href,{action:"confirm",ad_hoc_amount:e})));case 6:case"end":return r.stop()}}),r,this)}))),function(_x){return r.apply(this,arguments)})},{key:"render",value:function(){var r=this;return(0,u.h)("sc-dashboard-module",{key:"3ade2f39d61b46b9336298aef49749a5c439b17c",heading:this.heading||wp.i18n.__("Enter An Amount","surecart"),class:"subscription-switch"},(0,u.h)("sc-card",{key:"b946e77f2709a72da2e9637d94a908213c41206d"},(0,u.h)("sc-form",{key:"1cc306fc2fe563831cd82d3bb8e364816081281d",onScSubmit:function(n){return r.handleSubmit(n)}},(0,u.h)("sc-price-input",{key:"841df4948826d276c6b9f11826731a36252959a1",label:"Amount",name:"ad_hoc_amount",autofocus:!0,required:!0},(0,u.h)("span",{key:"a4bc62244096e571999c3fd82986ee5387a61d8b",slot:"suffix",style:{opacity:"0.75"}},(0,s.i)(this.price))),(0,u.h)("sc-button",{key:"d7bd28e7cb83bd25e36f2ab7c2ca9c8eaaf6f6db",type:"primary",full:!0,submit:!0,loading:this.busy},wp.i18n.__("Next","surecart")," ",(0,u.h)("sc-icon",{key:"15fbca3071a34cc6ed315152b38ca99995945c46",name:"arrow-right",slot:"suffix"})))),this.busy&&(0,u.h)("sc-block-ui",{key:"4a48f772cf6904d832d935cd53b652e47cbf445d",style:{zIndex:"9"}}))}}]);var r}();f.style=":host{display:block}"}}]);