(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-3b7fdd00"],{"0145c":function(t,e,o){"use strict";o.d(e,"e",(function(){return i})),o.d(e,"f",(function(){return n})),o.d(e,"h",(function(){return s})),o.d(e,"a",(function(){return r})),o.d(e,"d",(function(){return c})),o.d(e,"b",(function(){return l})),o.d(e,"c",(function(){return u})),o.d(e,"i",(function(){return d})),o.d(e,"g",(function(){return p}));var a=o("66a5");const i=t=>Object(a["a"])({url:"/shopapi/custom/product/fittings/page",method:"post",data:t}),n=t=>Object(a["a"])({url:"/shopapi/custom/product/fittings/detail",method:"post",data:t}),s=t=>Object(a["a"])({url:"/shopapi/custom/product/fittings/modify",method:"post",data:t}),r=t=>Object(a["a"])({url:"/shopapi/custom/product/fittings/inventory_order/create",method:"post",data:t}),c=t=>Object(a["a"])({url:"/shopapi/custom/product/fittings/remark/edit",method:"post",data:t}),l=t=>Object(a["a"])({url:"/shopapi/custom/product/fittings/remove",method:"post",data:t}),u=t=>Object(a["a"])({url:"/shopapi/custom/product/fittings/bindJewelery/edit",method:"post",data:t}),d=t=>Object(a["a"])({url:"/shopapi/custom/product/fittings/useForAllOrder/edit",method:"post",data:t}),p=t=>Object(a["a"])({url:"/shopapi/custom/product/fittings/bind_fittings_list",method:"post",data:t})},"1cf3":function(t,e,o){"use strict";var a=function(){var t=this,e=t.$createElement,o=t._self._c||e;return t.show?o("div",{ref:"fittingsImgDialog",staticClass:"fittings-img-dialog"},[o("el-card",{staticClass:"fittings-img-dialog-card",attrs:{shadow:"always"}},[o("i",{staticClass:"el-icon-close close cursor-pointer",on:{click:function(e){return e.target!==e.currentTarget?null:t.hiddenDialog.apply(null,arguments)}}}),o("el-row",[o("el-col",{attrs:{span:16}},[o("fittings-img",{attrs:{"bottom-image-url":t.currentCustomizeInfo.bottomImageUrl,height:600,width:600,"logo-url":t.logoUrl,"logo-h":t.currentCustomizeInfo.logoH,"logo-w":t.currentCustomizeInfo.logoW,"logo-x":t.currentCustomizeInfo.logoX,"logo-y":t.currentCustomizeInfo.logoY}})],1),o("el-col",{attrs:{span:8}},[o("el-row",[t._v(" View ")]),o("div",{staticClass:"fittings-imgs"},t._l(t.fittings.customizeInfos,(function(e,a){return o("div",{key:e.bottomImageUrl+t.currentCustomizeInfoIndex,staticClass:"fittings-img",on:{click:function(e){t.currentCustomizeInfoIndex=a}}},[o("fittings-img",{attrs:{"bottom-image-url":e.bottomImageUrl,"logo-url":t.logoUrl,"logo-h":e.logoH,"logo-w":e.logoW,"logo-x":e.logoX,"logo-y":e.logoY}})],1)})),0)],1)],1)],1)],1):t._e()},i=[],n=function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("div",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticClass:"fittingsImageContainer"},[o("canvas",{directives:[{name:"loading",rawName:"v-loading",value:t.paintLock,expression:"paintLock"}],attrs:{id:t.id}}),o("div",{staticClass:"downloadBtnDiv"},[o("el-button",{staticClass:"downloadBtn",attrs:{type:"primary"},on:{click:t.downloadImg}},[t._v("download")])],1)])},s=[],r=o("e1bd"),c=o("7a94"),l=o("21a6"),u=o("ed08"),d={name:"FittingsImg",props:{bottomImageUrl:{type:String,default:null},logoX:{type:Number,default:null},logoY:{type:Number,default:null},logoH:{type:Number,default:null},logoW:{type:Number,default:null},logoUrl:{type:String,default:null},width:{type:Number,default:150},height:{type:Number,default:150}},data(){return{canvas:null,id:"fittings_img_"+Object(r["a"])(),paintLock:!1,loading:!1,canvasWidth:200,canvasHeight:200}},watch:{logoUrl(){this.paint()},bottomImageUrl(){this.paint()}},mounted(){this.canvasWidth=document.body.clientWidth/1920*this.width,this.canvasHeight=document.body.clientHeight/1920*this.height,this.paint()},methods:{paint(){if(!this.paintLock){this.paintLock=!0;try{this.doPaint()}finally{this.paintLock=!1}}},doPaint(){this.canvas||(this.canvas=new c["fabric"].Canvas(this.id,{selectable:!1}));var t=this;if(t.canvas.setWidth(t.canvasWidth),t.canvas.setHeight(t.canvasWidth),this.canvas.clear(),this.bottomImageUrl){const e=new Image;e.setAttribute("crossOrigin","anonymous"),e.src=this.bottomImageUrl,e.onload=()=>(t.setBg(t.canvas,t.bottomImageUrl,e.width,e.height),!0)}if(this.logoUrl){const e=new Image;e.setAttribute("crossOrigin","anonymous"),e.src=this.logoUrl,e.onload=()=>{var o=t.logoX*t.canvas.width,a=t.logoY*t.canvas.height,i=0;return i=Math.min(t.canvas.height/e.height*t.logoH,t.canvas.width/e.width*t.logoW),t.logoHe.height&&(a+=t.logoH/2*t.canvas.height-e.height*i/2),e.width{this.$emit("update:show",!1)},500)}}},b=m,v=(o("a156"),Object(h["a"])(b,a,i,!1,null,"5181141c",null));e["a"]=v.exports},"1faf":function(t,e,o){"use strict";o.d(e,"a",(function(){return i})),o.d(e,"b",(function(){return n})),o.d(e,"c",(function(){return s})),o.d(e,"d",(function(){return r}));var a=o("66a5");const i=t=>Object(a["a"])({url:"/shopapi/pay/shopify/application_charge/status",method:"post",data:t}),n=t=>Object(a["a"])({url:"/shopapi/pay/shopify/subscription/change",method:"post",data:t}),s=t=>Object(a["a"])({url:"/shopapi/pay/shopify/subscription/status",method:"post",data:t}),r=t=>Object(a["a"])({url:"/shopapi/pay/subscription/cancel",method:"post",data:t})},"21a6":function(t,e,o){(function(o){var a,i,n;(function(o,s){i=[],a=s,n="function"===typeof a?a.apply(e,i):a,void 0===n||(t.exports=n)})(0,(function(){"use strict";function e(t,e){return"undefined"==typeof e?e={autoBom:!1}:"object"!=typeof e&&(console.warn("Deprecated: Expected third argument to be a object"),e={autoBom:!e}),e.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(t.type)?new Blob(["\ufeff",t],{type:t.type}):t}function a(t,e,o){var a=new XMLHttpRequest;a.open("GET",t),a.responseType="blob",a.onload=function(){c(a.response,e,o)},a.onerror=function(){console.error("could not download file")},a.send()}function i(t){var e=new XMLHttpRequest;e.open("HEAD",t,!1);try{e.send()}catch(t){}return 200<=e.status&&299>=e.status}function n(t){try{t.dispatchEvent(new MouseEvent("click"))}catch(a){var e=document.createEvent("MouseEvents");e.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),t.dispatchEvent(e)}}var s="object"==typeof window&&window.window===window?window:"object"==typeof self&&self.self===self?self:"object"==typeof o&&o.global===o?o:void 0,r=s.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),c=s.saveAs||("object"!=typeof window||window!==s?function(){}:"download"in HTMLAnchorElement.prototype&&!r?function(t,e,o){var r=s.URL||s.webkitURL,c=document.createElement("a");e=e||t.name||"download",c.download=e,c.rel="noopener","string"==typeof t?(c.href=t,c.origin===location.origin?n(c):i(c.href)?a(t,e,o):n(c,c.target="_blank")):(c.href=r.createObjectURL(t),setTimeout((function(){r.revokeObjectURL(c.href)}),4e4),setTimeout((function(){n(c)}),0))}:"msSaveOrOpenBlob"in navigator?function(t,o,s){if(o=o||t.name||"download","string"!=typeof t)navigator.msSaveOrOpenBlob(e(t,s),o);else if(i(t))a(t,o,s);else{var r=document.createElement("a");r.href=t,r.target="_blank",setTimeout((function(){n(r)}))}}:function(t,e,o,i){if(i=i||open("","_blank"),i&&(i.document.title=i.document.body.innerText="downloading..."),"string"==typeof t)return a(t,e,o);var n="application/octet-stream"===t.type,c=/constructor/i.test(s.HTMLElement)||s.safari,l=/CriOS\/[\d]+/.test(navigator.userAgent);if((l||n&&c||r)&&"undefined"!=typeof FileReader){var u=new FileReader;u.onloadend=function(){var t=u.result;t=l?t:t.replace(/^data:[^;]*;/,"data:attachment/file;"),i?i.location.href=t:location=t,i=null},u.readAsDataURL(t)}else{var d=s.URL||s.webkitURL,p=d.createObjectURL(t);i?i.location=p:location.href=p,i=null,setTimeout((function(){d.revokeObjectURL(p)}),4e4)}});s.saveAs=c.saveAs=c,t.exports=c}))}).call(this,o("c8ba"))},"2f07":function(t,e,o){"use strict";o("63ef")},"2f69":function(t,e,o){"use strict";o.d(e,"k",(function(){return i})),o.d(e,"c",(function(){return n})),o.d(e,"b",(function(){return s})),o.d(e,"h",(function(){return r})),o.d(e,"i",(function(){return c})),o.d(e,"n",(function(){return l})),o.d(e,"o",(function(){return u})),o.d(e,"l",(function(){return d})),o.d(e,"m",(function(){return p})),o.d(e,"q",(function(){return h})),o.d(e,"g",(function(){return f})),o.d(e,"r",(function(){return g})),o.d(e,"a",(function(){return m})),o.d(e,"j",(function(){return b})),o.d(e,"p",(function(){return v})),o.d(e,"e",(function(){return y})),o.d(e,"f",(function(){return w})),o.d(e,"d",(function(){return O}));var a=o("66a5");const i=t=>Object(a["a"])({url:"/shopapi/custom/product/page",method:"post",data:t}),n=(t,e={})=>Object(a["a"])({url:"/shopapi/custom/product/detail/"+t,method:"post",data:e}),s=()=>Object(a["a"])({url:"/shopapi/custom/product/customCollectionList",method:"post"}),r=t=>Object(a["a"])({url:"/shopapi/custom/product/modify",method:"post",data:t}),c=t=>Object(a["a"])({url:"/shopapi/custom/product/modifys",method:"post",data:t}),l=t=>Object(a["a"])({url:"/shopapi/custom/product/publishStatus",method:"post",data:t}),u=t=>Object(a["a"])({url:"/shopapi/custom/product/publishStatuses",method:"post",data:t}),d=t=>Object(a["a"])({url:"/shopapi/custom/product/publish",method:"post",data:t}),p=t=>Object(a["a"])({url:"/shopapi/custom/product/publishes",method:"post",data:t}),h=t=>Object(a["a"])({url:"/shopapi/custom/product/remove/"+t,method:"post"}),f=t=>Object(a["a"])({url:"/shopapi/custom/product/hideOnServer/"+t,method:"post"}),g=t=>Object(a["a"])({url:"/shopapi/custom/product/showOnServer/"+t,method:"post"}),m=t=>Object(a["a"])({url:"/shopapi/custom/product/cancel/"+t,method:"post"}),b=t=>Object(a["a"])({url:"/shopapi/custom/product/modifys",method:"post",data:t}),v=t=>Object(a["a"])({url:"/shopapi/custom/product/publishes",method:"post",data:t}),y=t=>Object(a["a"])({url:"/shopapi/custom/product/fittings/modifys",method:"post",data:t}),w=t=>Object(a["a"])({url:"/shopapi/custom/product/greeting_card/modifys",method:"post",data:t}),O=t=>Object(a["a"])({url:"/shopapi/custom/product/dropship",method:"post",data:t})},"3c20":function(t,e,o){},"4a47":function(t,e,o){"use strict";var a=function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("el-dialog",{attrs:{visible:t.dialogVisible,"close-on-click-modal":!1,top:"30vh"},on:{"update:visible":function(e){t.dialogVisible=e},close:t.close}},[o("PaypalSubscriptionButton",{ref:"PaypalButton"})],1)},i=[],n=function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("div",{staticStyle:{"text-align":"center"},attrs:{id:"paypal-button-container3"}})},s=[],r=o("7b32"),c=o("6b29"),l=o("ed08"),u={name:"PaypalSubscriptionButton",data(){return{paypal:null}},inject:["reload"],watch:{},created(){},mounted(){this.paypalReady()},methods:{close(){const t=document.querySelector("#paypal-button-container3");t.removeChild(t.lastElementChild)},async paypalReady(){var t=this;try{this.paypal=await Object(r["a"])({"client-id":"Ad_2nWfHg-jljIyJdtNKa_8Vt9CzTPSn99w5REF3BFBV13lrA1QUF7HV5uSN3dwfV1Gag-YUMKfQyl2B",intent:"subscription",vault:!0})}catch(e){console.error("failed to load the PayPal JS SDK script",e)}this.paypal&&await this.paypal.Buttons({env:"production",commit:!0,style:{size:"large",color:"blue",shape:"rect",label:"subscribe"},locale:"en_US",createSubscription:function(e,o){return t.ceatePayPals().then(t=>o.subscription.create({plan_id:t.planId,custom_id:t.customId,subscriber:{email:t.email}}))},onApprove:(e,o)=>{t.queryStatus(e.subscriptionID)},onError:t=>{console.log(t,"paypal err")}}).render("#paypal-button-container3")},async ceatePayPals(){const t=await Object(c["b"])({});return t.data},async queryStatus(t){var e={};e.subscriptionID=t;var o=this,a=await Object(c["d"])(e);if(200===a.code){if(2===a.data.status)return o.$message.success("Change subscription success!"),void setTimeout(()=>{o.reload()},500);if(3===a.data.status)return o.$message.error(a.data.failReason),void this.reload();1===a.data.status&&(await Object(l["e"])(2e3),o.queryStatus(t))}}}},d=u,p=o("2877"),h=Object(p["a"])(d,n,s,!1,null,"4c3d627c",null),f=h.exports,g={name:"PaypalSubscriptionDialog",components:{PaypalSubscriptionButton:f},props:{value:{type:Boolean,default:!1}},data(){return{dialogVisible:!1}},watch:{value:{handler(t){this.dialogVisible=t},immediate:!0},dialogVisible:{handler(t){this.$emit("input",t)},immediate:!0}},mounted(){},methods:{close(){this.dialogVisible=!1}}},m=g,b=Object(p["a"])(m,a,i,!1,null,"2cd31193",null);e["a"]=b.exports},"522c":function(t,e){t.exports="data:image/webp;base64,UklGRswBAABXRUJQVlA4WAoAAAAQAAAAGwAAJwAAQUxQSH4BAAABkGzbtmk7M9YzY9u2bdu2bZvllFm0bVsPsW3n3vtGcM65K38QERMgSfEzzr/23V/XQJIarLvve31+Rrych7zHeXvWrLtxfj/EYQVsb5szouSC99y+zfsFJSNytt0OKyT14HNXOeY8DsdzyrHrZ3oo4j095Rpx+XqMXDvyOmIMm2W8mTH7aWnVlP2PCbHKyGOQOXz/H59vE2MVw+3tNLVqyPY5LLBawIyKXLe6TkUl0MCmAQnSGA7bHGaElPE+XSy6cD+jpLa8zhtc3te01b/rOB8STMh51skx5DLHQ7yFHOdyiJOy3ud0Vi9ZT3M7q9zzJvC4hluNxyTkldesx/GtifgnYo2Pw1nlPe0SH6+nREdMeI5vSVoFXfE4jscrynQt+Ha3lHEC22VeEFraVYWSdiGfOV3GTEOA4wOijdT1OeDbVMRGGbvu9sHnBjaSYia85raZatzmsVWDzeBra5JjSgJwu66CT9tjP0BC37QyHAN839RQtk2/7+8boiABVlA4ICgAAADwAgCdASocACgAPm02l0ikIyIhJWgAgA2JaQAAKUNt8AD++5zAAAAA"},5657:function(t,e,o){"use strict";o.d(e,"a",(function(){return a}));const a={3:"Greeting Cards",4:"Jewelry Box",5:"Thank you letter",6:"Brand packaging bags",7:"Jewelry care cloth",8:"Logo sealing sticker",9:"Inventory"}},"629a":function(t,e,o){},"63ef":function(t,e,o){},"6d68":function(t,e,o){"use strict";o.d(e,"c",(function(){return i})),o.d(e,"d",(function(){return n})),o.d(e,"a",(function(){return s})),o.d(e,"b",(function(){return r}));var a=o("66a5");const i=t=>Object(a["a"])({url:"/shopapi/blankProduct/page",method:"post",data:t}),n=t=>Object(a["a"])({url:"/shopapi/blankProduct/type/list",method:"post",data:t}),s=t=>Object(a["a"])({url:"/shopapi/blankProduct/detail",method:"post",data:t}),r=t=>Object(a["a"])({url:"/shopapi/blankProduct/label/list",method:"post",data:t})},"7a6d":function(t,e,o){"use strict";var a=function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("div",[t.isMobile?t._e():o("el-dialog",{attrs:{visible:t.dialogVisible,top:"5vh",width:"40%","append-to-body":t.appendToBody},on:{"update:visible":function(e){t.dialogVisible=e},close:t.close}},[o("ListBox",{attrs:{"img-list":t.imgList}})],1),t.isMobile?o("dialog-h5",{attrs:{visible:t.dialogVisible},on:{"update:visible":function(e){t.dialogVisible=e},close:t.close}},[o("ListBox",{attrs:{"img-list":t.imgList}})],1):t._e()],1)},i=[],n=o("c3a1"),s=o("5b9c"),r={name:"ImgListDialog",components:{ListBox:n["a"],DialogH5:s["a"]},props:{value:{type:Boolean,default:!1},imgList:{type:Array,default:()=>[]},appendToBody:{type:Boolean,default:!0},isMobile:{type:Boolean,default:!1}},data(){return{currentIndex:0,dialogVisible:!1}},watch:{value(t){t&&(this.dialogVisible=!0)},dialogVisible(t){this.$emit("input",t)}},methods:{close(){this.dialogVisible=!1}}},c=r,l=o("2877"),u=Object(l["a"])(c,a,i,!1,null,"3475e908",null);e["a"]=u.exports},"7f5a":function(t,e,o){"use strict";var a=function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("div",[o("paypal-subscription-dialog",{model:{value:t.showPaypal,callback:function(e){t.showPaypal=e},expression:"showPaypal"}})],1)},i=[],n=o("1faf"),s=o("86b8"),r=o("2f62"),c=o("4a47"),l={name:"SubscriptionAction",components:{PaypalSubscriptionDialog:c["a"]},inject:["reload"],data(){return{showPaypal:!1}},computed:{...Object(r["b"])("user",{currentShop:"getCurrentShop",fittingsLevel:"getFittingsLevel"}),...Object(r["b"])("shopify",{app:"getApp",shop:"getShop"})},methods:{SelectSubscription(t){var e=this;1===this.currentShop.shopType?(this.loadingInstance=this.$loading(),Object(n["b"])({level:t,returnUrl:this.getReturnUrl()}).then(t=>{if(200===t.code){var o=t.data;if(1===o.status)return this.$message.success("Change subscription success!"),void setTimeout(()=>{e.reload()},500);2===o.status&&this.toShopifyConfirmationUrl(o.confirmationUrl)}else this.$message.error(t.msg)}).finally(()=>{this.loadingInstance.close()})):(console.log("show paypal"),this.showPaypal=!0)},getReturnUrl(){if(this.app){var t="e0080c246e19620838062418c3259ac2",e=this.shop;return`https://${e}/admin/apps/${t}/PaymentStatus`}return"https://"+location.host+"/PaymentStatus"},toShopifyConfirmationUrl(t){if(this.app){const e=s["Redirect"].create(this.app);e.dispatch(s["Redirect"].Action.REMOTE,{url:t,newContext:!1})}else location.href=t}}},u=l,d=o("2877"),p=Object(d["a"])(u,a,i,!1,null,"0db2ce20",null);e["a"]=p.exports},a156:function(t,e,o){"use strict";o("3c20")},c502:function(t,e,o){"use strict";o("629a")},db8a:function(t,e,o){"use strict";var a=function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("div",{staticClass:"shipping-rates-box"},[o("table",{staticClass:"shipping-rates-table"},[t._m(0),o("tbody",t._l(t.detailInfo.shippingRateInfos,(function(e,a){return o("tr",{key:a},[o("td",[t._v(t._s(e.enName))]),o("td",[t._v(t._s(e.standardTransportDay?e.standardTransportDay+" days":""))]),o("td",[t._v(t._s(t._f("priceFormat")(e.standardFirstPrice)))]),o("td",[t._v(t._s(t._f("priceFormat")(e.standardNextPrice)))]),o("td",[t._v(t._s(e.expressTransportDay?e.expressTransportDay+" days":""))]),o("td",[t._v(t._s(e.expressFirstPrice||"X"))]),o("td",[t._v(t._s(e.expressNextPrice||"X"))])])})),0)])])},i=[function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("thead",[o("tr",[o("th",[t._v("Shipping to")]),o("th",[t._v("Standard shipping days")]),o("th",[t._v("Standard shipping($)")]),o("th",[t._v("Standard Additional item($)")]),o("th",[t._v("Fast shipping days")]),o("th",[t._v("Fast shipping($)")]),o("th",[t._v("Fast Additional item($)")])])])}],n={name:"ShippingRates",props:{detailInfo:{type:Object,default:()=>({})}},computed:{priceComputed(){return t=>0===t||"0.00"===t?"Free":t}}},s=n,r=(o("2f07"),o("2877")),c=Object(r["a"])(s,a,i,!1,null,"2021abd1",null);e["a"]=c.exports}}]);