!function(e){var t={};function n(i){if(t[i])return t[i].exports;var d=t[i]={i:i,l:!1,exports:{}};return e[i].call(d.exports,d,d.exports,n),d.l=!0,d.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 d in e)n.d(i,d,function(t){return e[t]}.bind(null,d));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.h="df9aef8da3f69f167fa6",n.cn="button",n(n.s=553)}({553:function(e,t,n){"use strict";var i=function(){function e(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:window.location.origin;return e.replace(/\/$/,"")+"/"+n.h}(i),this.certificateId=s,this.buyerCode=u||null,this.action="CREATE",f&&(this.action=f),this.editToken=m,this.addClickListener()}return i(e,[{key:"addClickListener",value:function(){if(!this.domNode)return this;var e=this;e.domNode.addEventListener("click",(function(t){if(!document.getElementById("vertex-wizard-modal")){var n=document.createElement("div");if(n.id="vertex-wizard-modal",n.style.position="absolute",n.style.width="100%",n.style.top="0",n.style.left="0",n.style.background="rgba(0, 0, 0, 0.5)",n.style.height="100%",n.addEventListener("click",(function(t){i?i.contentWindow.postMessage("close-confirmation",e.wizardPath):n&&n.parentNode.removeChild(n)}),!1),e.clientCode&&e.accessToken){e.sellerCodes&&JSON.stringify(e.sellerCodes),e.overrides&&JSON.stringify(e.overrides);var i=document.createElement("iframe"),d=window.innerWidth>600?"600px":"100%",a=window.innerHeight>600?"600px":"100%";i.style.position="fixed",i.style.display="block",i.style.height=a,i.style.width=d,i.style.top="50%",i.style.left="50%",i.style.transform="translateX(-50%) translateY(-50%)",i.style.border="0",i.style.boxShadow="2px 2px 6px 0px rgba(0, 0, 0, 0.3)",i.style.background="#ffffff",i.src=e.wizardPath,n.appendChild(i)}document.body.appendChild(n),e.addLoadedListener()}}),!1)}},{key:"addLoadedListener",value:function(){var e=this;!function(e,t,n,i){e.addEventListener(t,(function d(a){a.data===n&&(e.removeEventListener(t,d),i(a))}))}(window,"message","sendData",(function(t){var n={sellerCode:e.sellerCodes,accessToken:e.accessToken,client:e.clientCode,origin:e.origin,buyer:e.buyerCode,overrides:e.overrides,certificate:e.certificateId,action:e.action,editToken:e.editToken};document.getElementById("vertex-wizard-modal").children[0].contentWindow.postMessage({type:"launch-data",payload:n},e.wizardPath)}))}}]),e}();vertex.Wizard=e,window.addEventListener("message",(function(e){if("close"==e.data){var t=document.getElementById("vertex-wizard-modal");t&&t.parentNode.removeChild(t)}else if(e.data&&"viewImage"===e.data.type)!function(e){var t=document.createElement("FORM"),n=document.createElement("INPUT"),i=document.createElement("INPUT"),d=document.createElement("INPUT");n.value=e.data.access,n.name="access_token",i.value=e.data.imageId,i.name="imageId",d.value=e.data.certificateId,d.name="certificateId",t.appendChild(n),t.appendChild(i),t.appendChild(d),t.action=e.origin+e.data.path,t.target="_blank",t.method="post",document.body.appendChild(t),t.submit(),document.body.removeChild(t)}(e);else if(e.data&&"previewForm"==e.data.type){var n=document.createElement("FORM"),i=document.createElement("INPUT"),d=document.createElement("INPUT"),a=document.createElement("INPUT");i.value=e.data.access,i.name="access_token",d.value=e.data.client,d.name="client-code",a.value=e.data.certificate,a.name="certificateId",n.appendChild(i),n.appendChild(d),n.appendChild(a),document.body.appendChild(n),n.action=e.origin+e.data.path,n.target="_blank",n.method="post",n.submit(),document.body.removeChild(n)}else if(e.data&&"createdCertificates"==e.data.type){var o=document.getElementById("vertex-wizard-links");o&&e.data.data.forEach((function(e){var t=document.createElement("a"),n=document.createElement("a"),i=document.createTextNode("Edit Cert"),d=document.createTextNode("Renew Cert");t.id=e.id,n.id=e.id,t.appendChild(i),n.appendChild(d);new vertex.Wizard({domNode:t,wizardPath:e.wizPath,accessToken:e.token,clientCode:e.clientId,sellerCodes:e.sellerCodes,overrides:e.overrides,certificateId:e.id,action:"EDIT",buyerCode:e.buyerCode}),new vertex.Wizard({domNode:n,wizardPath:e.wizPath,accessToken:e.token,clientCode:e.clientId,sellerCodes:e.sellerCodes,overrides:e.overrides,certificateId:e.id,action:"RENEW",buyerCode:e.buyerCode});o.appendChild(t),o.appendChild(document.createElement("BR")),o.appendChild(n),o.appendChild(document.createElement("BR"))}))}}))}()}});