{"version":3,"file":"iframeeditor.min.js","sources":["iframeeditor.ts"],"sourcesContent":["namespace eXpress.iframeeditor {\r\n\texport interface IIFrameEditorDependencies {\r\n\t\torderService: services.OrderService;\r\n\t}\r\n\r\n\texport interface IIframeEditorPageContext {\r\n\t\tproductCategoryUrl: string;\r\n\t}\r\n\r\n\texport class IFrameEditor {\r\n\r\n\t\tprivate orderService: services.OrderService;\r\n\t\tprivate context: core.IAppContext;\r\n\t\tprivate pvc: string;\r\n\t\tprivate pageContext: IIframeEditorPageContext;\r\n\t\tprivate header: JQuery;\r\n\r\n\t\tconstructor(deps: IIFrameEditorDependencies, context: core.IAppContext, pageContext: IIframeEditorPageContext) {\r\n\t\t\tthis.context = context;\r\n\t\t\tthis.pageContext = pageContext;\r\n\t\t\tthis.pvc = eXpress.utils.getQueryStringParameter(\"pvc\", undefined, true).toLowerCase();\r\n\t\t\tthis.orderService = deps.orderService;\r\n\t\t\tconst oldHeader = $('.editor-header');\r\n\t\t\tthis.header = oldHeader.length > 0 ? oldHeader : $('.o-small-header');\r\n\t\t}\r\n\r\n\t\tpublic start(): void {\r\n\t\t\tthis.orderService.getPriceAsync(this.pvc, 1, 0, undefined, undefined).then(res => {\r\n\t\t\t\tconst $price = this.header.find('.technical-price').show().find('.technical-amount');\r\n\t\t\t\t$price.html(utils.displayPrice(res.price.amount, true, false, this.context));\r\n\t\t\t});\r\n\t\t\tthis.header.find('.technical-back-to').attr('href', this.pageContext.productCategoryUrl).show().parent('.u-hide').removeClass(\"u-hide\");\r\n\t\t}\r\n\t}\r\n\r\n\tconst deps = {\r\n\t\torderService: new eXpress.services.OrderService(core.context)\r\n\t};\r\n\r\n\tconst app = new IFrameEditor(deps, eXpress.core.context, pageContext);\r\n\tapp.start();\r\n}\r\n"],"names":["eXpress","iframeeditor","IFrameEditor","deps","context","pageContext","this","pvc","utils","getQueryStringParameter","undefined","toLowerCase","orderService","oldHeader","$","header","length","prototype","start","_this","getPriceAsync","then","res","find","show","html","displayPrice","price","amount","attr","productCategoryUrl","parent","removeClass","services","OrderService","core"],"mappings":"AAAA,IAAUA,SAAV,SAAUA,SAAQ,IAAAC,aASjBC,aATiBD,aAAAD,QAAYC,eAAZD,qBAyCjB,CAAA,GAhCAE,aAAA,WAQC,SAAAA,aAAYC,KAAiCC,QAA2BC,aACvEC,KAAKF,QAAUA,QACfE,KAAKD,YAAcA,YACnBC,KAAKC,IAAMP,QAAQQ,MAAMC,wBAAwB,WAAOC,GAAW,GAAMC,cACzEL,KAAKM,aAAeT,KAAKS,aACzB,IAAMC,UAAYC,EAAE,kBACpBR,KAAKS,OAASF,UAAUG,OAAS,EAAIH,UAAYC,EAAE,kBACnD,CASF,OAPQZ,aAAAe,UAAAC,MAAP,WAAA,IAMCC,MAAAb,KALAA,KAAKM,aAAaQ,cAAcd,KAAKC,IAAK,EAAG,OAAGG,OAAWA,GAAWW,MAAK,SAAAC,KAC3DH,MAAKJ,OAAOQ,KAAK,oBAAoBC,OAAOD,KAAK,qBACzDE,KAAKzB,QAAAQ,MAAMkB,aAAaJ,IAAIK,MAAMC,QAAQ,GAAM,EAAOT,MAAKf,SACpE,IACAE,KAAKS,OAAOQ,KAAK,sBAAsBM,KAAK,OAAQvB,KAAKD,YAAYyB,oBAAoBN,OAAOO,OAAO,WAAWC,YAAY,WAE/H9B,YAAA,CAxBD,GAAaD,aAAAC,0BA8BD,IAAIA,aAJH,CACZU,aAAc,IAAIZ,QAAQiC,SAASC,aAAalC,QAAAmC,KAAK/B,UAGnBJ,QAAQmC,KAAK/B,QAASC,aACrDa,OACJ,CAzCD,CAAUlB,UAAAA,QAyCT,CAAA"}