index of
/
home
/
thefkyzp
/
hulmvisaadvisor.com
/
wp-content
/
plugins
/
surecart
/
dist
/
File: /home/thefkyzp/hulmvisaadvisor.com/wp-content/plugins/surecart/dist/767.js
"use strict";(self.webpackChunk_surecart_surecart=self.webpackChunk_surecart_surecart||[]).push([[767],{448:function(e,t,n){n.d(t,{a:function(){return d},b:function(){return u},g:function(){return l}});var r=n(4942),i=n(885);function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function a(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?o(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function c(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return s(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)?s(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},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 o,a=!0,c=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){c=!0,o=e},f:function(){try{a||null==n.return||n.return()}finally{if(c)throw o}}}}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function u(e){for(var t,n="",r=Object.entries(e);t=r.shift();){var o=t,a=(0,i.Z)(o,2),s=a[0],u=a[1];if(Array.isArray(u)||u&&u.constructor===Object){var l,d=c(Object.entries(u).reverse());try{for(d.s();!(l=d.n()).done;){var p=(0,i.Z)(l.value,2),h=p[0],f=p[1];r.unshift(["".concat(s,"[").concat(h,"]"),f])}}catch(e){d.e(e)}finally{d.f()}}else void 0!==u&&(null===u&&(u=""),n+="&"+[s,u].map(encodeURIComponent).join("="))}return n.substr(1)}function l(e){return(function(e){var t;try{t=new URL(e,"http://example.com").search.substring(1)}catch(e){}if(t)return t}(e)||"").replace(/\+/g,"%20").split("&").reduce((function(e,t){var n=t.split("=").filter(Boolean).map(decodeURIComponent),r=(0,i.Z)(n,2),o=r[0],c=r[1],s=void 0===c?"":c;return o&&function(e,t,n){for(var r=t.length,i=r-1,o=0;o<r;o++){var c=t[o];!c&&Array.isArray(e)&&(c=e.length.toString());var s=!isNaN(Number(t[o+1]));e[c]=o===i?n:e[c]||(s?[]:{}),Array.isArray(e[c])&&!s&&(e[c]=a({},e[c])),e=e[c]}}(e,o.replace(/\]/g,"").split("["),s),e}),{})}function d(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1?arguments[1]:void 0;if(!t||!Object.keys(t).length)return e;var n=e,r=e.indexOf("?");return-1!==r&&(t=Object.assign(l(e),t),n=n.substr(0,r)),n+"?"+u(t)}},930:function(e,t,n){n.d(t,{a:function(){return G},h:function(){return q}});var r=n(5861),i=n(5987),o=n(885),a=n(4942),c=n(1284),s=n.n(c),u=n(448),l=["rest_route"],d=["path","url"],p=["url","path","data","parse"];function h(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return f(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)?f(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},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 o,a=!0,c=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){c=!0,o=e},f:function(){try{a||null==n.return||n.return()}finally{if(c)throw o}}}}function f(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function v(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function y(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?v(Object(n),!0).forEach((function(t){(0,a.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):v(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var w=function(e,t){var n,r,i=e.path;return"string"==typeof e.namespace&&"string"==typeof e.endpoint&&(n=e.namespace.replace(/^\/|\/$/g,""),i=(r=e.endpoint.replace(/^\//,""))?n+"/"+r:n),delete e.namespace,delete e.endpoint,t(y(y({},e),{},{path:i}))};function m(e){for(var t,n="",r=Object.entries(e);t=r.shift();){var i=t,a=(0,o.Z)(i,2),c=a[0],s=a[1];if(Array.isArray(s)||s&&s.constructor===Object){var u,l=h(Object.entries(s).reverse());try{for(l.s();!(u=l.n()).done;){var d=(0,o.Z)(u.value,2),p=d[0],f=d[1];r.unshift(["".concat(c,"[").concat(p,"]"),f])}}catch(e){l.e(e)}finally{l.f()}}else void 0!==s&&(null===s&&(s=""),n+="&"+[c,s].map(encodeURIComponent).join("="))}return n.substr(1)}function b(e){return(function(e){var t;try{t=new URL(e,"http://example.com").search.substring(1)}catch(e){}if(t)return t}(e)||"").replace(/\+/g,"%20").split("&").reduce((function(e,t){var n=t.split("=").filter(Boolean).map(decodeURIComponent),r=(0,o.Z)(n,2),i=r[0],a=r[1],c=void 0===a?"":a;return i&&function(e,t,n){for(var r=t.length,i=r-1,o=0;o<r;o++){var a=t[o];!a&&Array.isArray(e)&&(a=e.length.toString()),a=["__proto__","constructor","prototype"].includes(a)?a.toUpperCase():a;var c=!isNaN(Number(t[o+1]));e[a]=o===i?n:e[a]||(c?[]:{}),Array.isArray(e[a])&&!c&&(e[a]=y({},e[a])),e=e[a]}}(e,i.replace(/\]/g,"").split("["),c),e}),Object.create(null))}function g(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1?arguments[1]:void 0;if(!t||!Object.keys(t).length)return e;var n=e,r=e.indexOf("?");return-1!==r&&(t=Object.assign(b(e),t),n=n.substr(0,r)),n+"?"+m(t)}function _(e,t){return void 0!==function(e,t){return b(e)[t]}(e,t)}function O(e){var t=e.split("?"),n=t[1],r=t[0];return n?r+"?"+n.split("&").map((function(e){return e.split("=")})).map((function(e){return e.map(decodeURIComponent)})).sort((function(e,t){return e[0].localeCompare(t[0])})).map((function(e){return e.map(encodeURIComponent)})).map((function(e){return e.join("=")})).join("&"):r}function k(e,t){return Promise.resolve(t?e.body:new window.Response(JSON.stringify(e.body),{status:200,statusText:"OK",headers:e.headers}))}var j=function(e){return e.json?e.json():Promise.reject(e)},x=function(e){return function(e){if(!e)return{};var t=e.match(/<([^>]+)>; rel="next"/);return t?{next:t[1]}:{}}(e.headers.get("link")).next},A=function(e){var t=!!e.path&&-1!==e.path.indexOf("per_page=-1"),n=!!e.url&&-1!==e.url.indexOf("per_page=-1");return t||n},C=function(){var e=(0,r.Z)(s().mark((function e(t,n){var r,o,a,c,u,l;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!1!==t.parse){e.next=2;break}return e.abrupt("return",n(t));case 2:if(A(t)){e.next=4;break}return e.abrupt("return",n(t));case 4:return e.next=6,G(y(y({},(p={per_page:100},void 0,void 0,h=(s=t).path,f=s.url,y(y({},(0,i.Z)(s,d)),{},{url:f&&g(f,p),path:h&&g(h,p)}))),{},{parse:!1}));case 6:return r=e.sent,e.next=9,j(r);case 9:if(o=e.sent,Array.isArray(o)){e.next=12;break}return e.abrupt("return",o);case 12:if(a=x(r)){e.next=15;break}return e.abrupt("return",o);case 15:c=[].concat(o);case 16:if(!a){e.next=27;break}return e.next=19,G(y(y({},t),{},{path:void 0,url:a,parse:!1}));case 19:return u=e.sent,e.next=22,j(u);case 22:l=e.sent,c=c.concat(l),a=x(u),e.next=16;break;case 27:return e.abrupt("return",c);case 28:case"end":return e.stop()}var s,p,h,f}),e)})));return function(_x,t){return e.apply(this,arguments)}}(),P=new Set(["PATCH","PUT","DELETE"]),D=function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return t?204===e.status?null:e.json?e.json():Promise.reject(e):e},S=function(e){var t={code:"invalid_json",message:wp.i18n.__("The response is not a valid JSON response.")};if(!e||!e.json)throw t;return e.json().catch((function(){throw t}))},E=function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return Promise.resolve(D(e,t)).catch((function(e){return T(e,t)}))};function T(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(!t)throw e;return S(e).then((function(e){var t={code:"unknown_error",message:wp.i18n.__("An unknown error occurred.")};throw e||t}))}var Z,I,M,L,R,U,N,z={Accept:"application/json, */*;q=0.1"},F={credentials:"include"},H=[function(e,t){return"string"!=typeof e.url||_(e.url,"_locale")||(e.url=g(e.url,{_locale:"user"})),"string"!=typeof e.path||_(e.path,"_locale")||(e.path=g(e.path,{_locale:"user"})),t(e)},w,function(e,t){var n=e.method,r=void 0===n?"GET":n;return P.has(r.toUpperCase())&&(e=y(y({},e),{},{headers:y(y({},e.headers),{},{"X-HTTP-Method-Override":r,"Content-Type":"application/json"}),method:"POST"})),t(e)},C],J=function(e){if(e.status>=200&&e.status<300)return e;throw e},K=function(e){var t=e.url,n=e.path,r=e.data,o=e.parse,a=void 0===o||o,c=(0,i.Z)(e,p),s=e.body,u=e.headers;return u=y(y({},z),u),r&&(s=JSON.stringify(r),u["Content-Type"]="application/json"),window.fetch(t||n||window.location.href,y(y(y({},F),c),{},{body:s,headers:u})).then((function(e){return Promise.resolve(e).then(J).catch((function(e){return T(e,a)})).then((function(e){return E(e,a)}))}),(function(e){if(e&&"AbortError"===e.name)throw e;throw{code:"fetch_error",message:wp.i18n.__("You are probably offline.")}}))};function G(e){return H.reduceRight((function(e,t){return function(n){return t(n,e)}}),K)(e).catch((function(t){return"rest_cookie_invalid_nonce"!==t.code?Promise.reject(t):window.fetch(G.nonceEndpoint).then(J).then((function(e){return e.text()})).then((function(t){return G.nonceMiddleware.nonce=t,G(e)}))}))}G.use=function(e){H.unshift(e)},G.setFetchHandler=function(e){K=e},G.createNonceMiddleware=function(e){var t=function e(t,n){var r=t.headers,i=void 0===r?{}:r;for(var o in i)if("x-wp-nonce"===o.toLowerCase()&&i[o]===e.nonce)return n(t);return n(y(y({},t),{},{headers:y(y({},i),{},{"X-WP-Nonce":e.nonce})}))};return t.nonce=e,t},G.createPreloadingMiddleware=function(e){var t=Object.fromEntries(Object.entries(e).map((function(e){var t=(0,o.Z)(e,2),n=t[0],r=t[1];return[O(n),r]})));return function(e,n){var r=e.parse,o=void 0===r||r,a=e.path;if(!a&&e.url){var c=b(e.url),s=c.rest_route,u=(0,i.Z)(c,l);"string"==typeof s&&(a=g(s,u))}if("string"!=typeof a)return n(e);var d=e.method||"GET",p=O(a);if("GET"===d&&t[p]){var h=t[p];return delete t[p],k(h,!!o)}if("OPTIONS"===d&&t[d]&&t[d][p]){var f=t[d][p];return delete t[d][p],k(f,!!o)}return n(e)}},G.createRootURLMiddleware=function(e){return function(t,n){return w(t,(function(t){var r,i=t.url,o=t.path;return"string"==typeof o&&(r=e,-1!==e.indexOf("?")&&(o=o.replace("?","&")),o=o.replace(/^\//,""),"string"==typeof r&&-1!==r.indexOf("?")&&(o=o.replace("?","&")),i=r+o),n(y(y({},t),{},{url:i}))}))}},G.fetchAllMiddleware=C,G.mediaUploadMiddleware=function(e,t){if(!function(e){var t=!!e.method&&"POST"===e.method;return(!!e.path&&-1!==e.path.indexOf("/wp/v2/media")||!!e.url&&-1!==e.url.indexOf("/wp/v2/media"))&&t}(e))return t(e);var n=0,r=function e(r){return n++,t({path:"/wp/v2/media/".concat(r,"/post-process"),method:"POST",data:{action:"create-image-subsizes"},parse:!1}).catch((function(){return n<5?e(r):(t({path:"/wp/v2/media/".concat(r,"?force=true"),method:"DELETE"}),Promise.reject())}))};return t(y(y({},e),{},{parse:!1})).catch((function(t){var n=t.headers.get("x-wp-upload-attachment-id");return t.status>=500&&t.status<600&&n?r(n).catch((function(){return!1!==e.parse?Promise.reject({code:"post_process",message:wp.i18n.__("Media upload failed. If this is a photo or a large image, please scale it down and try again.")}):Promise.reject(t)})):T(t,e.parse)})).then((function(t){return E(t,e.parse)}))},G.fetchAllMiddleware=null,G.use(G.createRootURLMiddleware((null===(I=null===(Z=null===window||void 0===window?void 0:window.parent)||void 0===Z?void 0:Z.scData)||void 0===I?void 0:I.root_url)||(null===(M=null===window||void 0===window?void 0:window.scData)||void 0===M?void 0:M.root_url))),(null===(L=null===window||void 0===window?void 0:window.scData)||void 0===L?void 0:L.nonce)&&(G.nonceMiddleware=G.createNonceMiddleware(null===(R=null===window||void 0===window?void 0:window.scData)||void 0===R?void 0:R.nonce),G.use(G.nonceMiddleware)),(null===(U=null===window||void 0===window?void 0:window.scData)||void 0===U?void 0:U.nonce_endpoint)&&(G.nonceEndpoint=null===(N=null===window||void 0===window?void 0:window.scData)||void 0===N?void 0:N.nonce_endpoint),G.use((function(e,t){return e.path=(0,u.a)(e.path,{t:Date.now()}),t(e)}));var $=function(e){var t={code:"invalid_json",message:wp.i18n.__("The response is not a valid JSON response.","surecart")};if((null==e?void 0:e.code)&&(null==e?void 0:e.message))throw e;if(!e||!e.json)throw t;return e.json().catch((function(){throw t}))},q=function(){var e=(0,r.Z)(s().mark((function e(t){var n;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,$(t);case 2:if("rest_cookie_invalid_nonce"===(n=e.sent).code){e.next=5;break}throw n;case 5:return e.abrupt("return",window.fetch(G.nonceEndpoint).then((function(e){if(e.status>=200&&e.status<300)return e;throw e})).then((function(e){return e.text()})).then((function(e){G.nonceMiddleware.nonce=e})));case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()},6455:function(e,t,n){n.d(t,{o:function(){return r}});var r=function(e,t){new window.IntersectionObserver((function(e,n){e[0].intersectionRatio>0&&(t(),n.unobserve(e[0].target))})).observe(e)}},767:function(e,t,n){n.r(t),n.d(t,{sc_license:function(){return p}});var r=n(5861),i=n(5671),o=n(3144),a=n(1284),c=n.n(a),s=n(8860),u=n(6455),l=n(930),d=n(448),p=function(){function e(t){var n=this;(0,i.Z)(this,e),(0,s.r)(this,t),this.deleteActivation=(0,r.Z)(c().mark((function e(){return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,n.busy=!0,e.next=4,(0,l.a)({path:"surecart/v1/activations/".concat(n.selectedActivationId),method:"DELETE"});case 4:return n.onCloseDeleteModal(),e.next=7,n.initialFetch();case 7:e.next=13;break;case 9:e.prev=9,e.t0=e.catch(0),console.error(e.t0),n.deleteActivationError=(null===e.t0||void 0===e.t0?void 0:e.t0.message)||wp.i18n.__("Something went wrong","surecart");case 13:return e.prev=13,n.busy=!1,e.finish(13);case 16:case"end":return e.stop()}}),e,null,[[0,9,13,16]])}))),this.onCloseDeleteModal=function(){n.selectedActivationId="",n.showConfirmDelete=!1,n.busy=!1,n.deleteActivationError=""},this.licenseId=void 0,this.loading=!1,this.error="",this.license=void 0,this.copied=!1,this.showConfirmDelete=!1,this.selectedActivationId="",this.deleteActivationError="",this.busy=!1}var t,n,a;return(0,o.Z)(e,[{key:"componentWillLoad",value:function(){var e=this;(0,u.o)(this.el,(function(){e.initialFetch()}))}},{key:"initialFetch",value:(a=(0,r.Z)(c().mark((function e(){return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,this.loading=!0,e.next=4,this.getLicense();case 4:e.next=10;break;case 6:e.prev=6,e.t0=e.catch(0),console.error(e.t0),this.error=(null===e.t0||void 0===e.t0?void 0:e.t0.message)||wp.i18n.__("Something went wrong","surecart");case 10:return e.prev=10,this.loading=!1,e.finish(10);case 13:case"end":return e.stop()}}),e,this,[[0,6,10,13]])}))),function(){return a.apply(this,arguments)})},{key:"getLicense",value:(n=(0,r.Z)(c().mark((function e(){return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,l.a)({path:(0,d.a)("surecart/v1/licenses/".concat(this.licenseId),{expand:["activations","purchase","purchase.product"]})});case 2:this.license=e.sent;case 3:case"end":return e.stop()}}),e,this)}))),function(){return n.apply(this,arguments)})},{key:"copyKey",value:(t=(0,r.Z)(c().mark((function e(t){var n=this;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,navigator.clipboard.writeText(t);case 3:this.copied=!0,setTimeout((function(){n.copied=!1}),2e3),e.next=11;break;case 7:e.prev=7,e.t0=e.catch(0),console.error(e.t0),alert(wp.i18n.__("Error copying to clipboard","surecart"));case 11:case"end":return e.stop()}}),e,this,[[0,7]])}))),function(_x){return t.apply(this,arguments)})},{key:"renderStatus",value:function(){var e,t,n,r;return"active"===(null===(e=this.license)||void 0===e?void 0:e.status)?(0,s.h)("sc-tag",{type:"success"},wp.i18n.__("Active","surecart")):"revoked"===(null===(t=this.license)||void 0===t?void 0:t.status)?(0,s.h)("sc-tag",{type:"danger"},wp.i18n.__("Revoked","surecart")):"inactive"===(null===(n=this.license)||void 0===n?void 0:n.status)?(0,s.h)("sc-tag",{type:"info"},wp.i18n.__("Inactive","surecart")):(0,s.h)("sc-tag",{type:"info"},null===(r=this.license)||void 0===r?void 0:r.status)}},{key:"renderLoading",value:function(){return(0,s.h)("sc-dashboard-module",null,(0,s.h)("span",{slot:"heading"},(0,s.h)("sc-skeleton",{style:{width:"120px"}})),(0,s.h)("sc-card",null,(0,s.h)("sc-stacked-list",null,(0,s.h)("sc-flex",{flexDirection:"column",style:{gap:"1em"}},(0,s.h)("sc-skeleton",{style:{width:"20%",display:"inline-block"}}),(0,s.h)("sc-skeleton",{style:{width:"60%",display:"inline-block"}}),(0,s.h)("sc-skeleton",{style:{width:"40%",display:"inline-block"}})))))}},{key:"renderEmpty",value:function(){return(0,s.h)("sc-empty",{icon:"activity"},wp.i18n.__("License not found.","surecart"))}},{key:"renderLicenseHeader",value:function(){var e,t=null===(e=this.license)||void 0===e?void 0:e.purchase,n=null==t?void 0:t.product;return(0,s.h)(s.F,null,(0,s.h)("span",{slot:"heading"},(0,s.h)("div",{class:"license__heading"},null==n?void 0:n.name,!this.loading&&!t.live_mode&&(0,s.h)("sc-tag",{type:"warning",size:"small"},wp.i18n.__("Test Mode","surecart")))))}},{key:"renderContent",value:function(){var e,t,n,r,i,o,a,c,u,l,d=this;return this.loading&&!(null===(e=this.license)||void 0===e?void 0:e.id)?this.renderLoading():(null===(t=this.license)||void 0===t?void 0:t.id)?(0,s.h)(s.F,null,(0,s.h)("sc-dashboard-module",{error:this.error},this.renderLicenseHeader(),(0,s.h)("sc-card",{noPadding:!0},(0,s.h)("sc-stacked-list",null,(0,s.h)("sc-stacked-list-row",{style:{"--columns":"2","--sc-stacked-list-row-align-items":"center"}},(0,s.h)("div",null,wp.i18n.__("License Status","surecart")),this.renderStatus()),(0,s.h)("sc-stacked-list-row",{style:{"--columns":"2"}},(0,s.h)("div",null,wp.i18n.__("License Key","surecart")),(0,s.h)("div",{class:"license__key"},(0,s.h)("sc-input",{value:null===(n=this.license)||void 0===n?void 0:n.key,readonly:!0},(0,s.h)("sc-button",{class:"license__copy",type:"default",size:"small",slot:"suffix",onClick:function(){var e;return d.copyKey(null===(e=d.license)||void 0===e?void 0:e.key)}},this.copied?wp.i18n.__("Copied!","surecart"):wp.i18n.__("Copy","surecart"))))),(0,s.h)("sc-stacked-list-row",{style:{"--columns":"2"}},(0,s.h)("div",null,wp.i18n.__("Date","surecart")),(0,s.h)("sc-format-date",{date:null===(r=this.license)||void 0===r?void 0:r.created_at,type:"timestamp",month:"short",day:"numeric",year:"numeric"})),(0,s.h)("sc-stacked-list-row",{style:{"--columns":"2"}},(0,s.h)("div",null,wp.i18n.__("Activations Count","surecart")),(0,s.h)("span",null,null===(i=this.license)||void 0===i?void 0:i.activation_count," / ",(null===(o=this.license)||void 0===o?void 0:o.activation_limit)||(0,s.h)("span",null,"∞")))))),(0,s.h)("sc-dashboard-module",null,(0,s.h)("span",{slot:"heading"},(0,s.h)("slot",{name:"heading"},wp.i18n.__("Activations","surecart"))),(0,s.h)("sc-card",{noPadding:!0},(null===(u=null===(c=null===(a=this.license)||void 0===a?void 0:a.activations)||void 0===c?void 0:c.data)||void 0===u?void 0:u.length)?(0,s.h)("sc-stacked-list",null,null===(l=this.license)||void 0===l?void 0:l.activations.data.map((function(e){return(0,s.h)("sc-stacked-list-row",{style:{"--columns":"4"}},(0,s.h)("sc-format-date",{class:"license__date",date:e.created_at,type:"timestamp",month:"short",day:"numeric",year:"numeric"}),(0,s.h)("div",null,e.name),(0,s.h)("div",null,e.fingerprint),(0,s.h)("div",null,(0,s.h)("sc-button",{size:"small",onClick:function(){d.selectedActivationId=e.id,d.showConfirmDelete=!0}},"Delete")))}))):(0,s.h)("sc-empty",null,wp.i18n.__("No activations present.","surecart")),this.loading&&(0,s.h)("sc-block-ui",{style:{"--sc-block-ui-opacity":"0.75"},spinner:!0})))):this.renderEmpty()}},{key:"renderConfirmDelete",value:function(){return(0,s.h)("sc-dialog",{open:this.showConfirmDelete,style:{"--body-spacing":"var(--sc-spacing-x-large)"},noHeader:!0,onScRequestClose:this.onCloseDeleteModal},(0,s.h)("sc-button",{class:"close__button",type:"text",circle:!0,onClick:this.onCloseDeleteModal,disabled:this.loading},(0,s.h)("sc-icon",{name:"x"})),(0,s.h)("sc-dashboard-module",{heading:wp.i18n.__("Delete Activation","surecart"),class:"license-cancel",error:this.error,style:{"--sc-dashboard-module-spacing":"1em"}},(0,s.h)("span",{slot:"description"},wp.i18n.__("Are you sure you want to delete activation?","surecart")),(0,s.h)("sc-flex",{justifyContent:"flex-start"},(0,s.h)("sc-button",{type:"primary",disabled:this.loading||this.busy,onClick:this.deleteActivation},wp.i18n.__("Delete Activation","surecart")),(0,s.h)("sc-button",{style:{color:"var(--sc-color-gray-500"},type:"text",onClick:this.onCloseDeleteModal,disabled:this.loading||this.busy},wp.i18n.__("Cancel","surecart"))),this.busy&&(0,s.h)("sc-block-ui",{style:{"--sc-block-ui-opacity":"0.75"},spinner:!0})))}},{key:"render",value:function(){return(0,s.h)("sc-spacing",{style:{"--spacing":"var(--sc-spacing-large)"}},this.renderContent(),this.renderConfirmDelete())}},{key:"el",get:function(){return(0,s.a)(this)}}]),e}();p.style=":host{display:block}.license__date{font-weight:var(--sc-font-weight-semibold)}.license__heading{display:flex;align-items:center;gap:1rem}.license__key{display:block}.close__button{position:absolute;top:0;right:0;font-size:22px;z-index:1}.license-cancel{display:grid;gap:0.5em}"},4942:function(e,t,n){function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}n.d(t,{Z:function(){return r}})},5987:function(e,t,n){n.d(t,{Z:function(){return i}});var r=n(3366);function i(e,t){if(null==e)return{};var n,i,o=(0,r.Z)(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}},3366:function(e,t,n){function r(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}n.d(t,{Z:function(){return r}})}}]);