/*! For license information please see ../LICENSES */
(window.webpackJsonp=window.webpackJsonp||[]).push([[5],{321:function(e,t,r){"use strict";function n(e,data){return e({url:"/api/v1/draw-task/volc",method:"post",data:data,httpType:"drawApi",ContentType:"application/json"})}function o(e,data){return e({url:"/api/v1/tools/imageenhan",method:"post",data:data,httpType:"drawApi",ContentType:"application/json"})}function c(e,data){return e({url:"/api/v1/al/mergeImageFace",method:"post",data:data,httpType:"drawApi",ContentType:"application/json"})}r.d(t,"c",(function(){return n})),r.d(t,"a",(function(){return o})),r.d(t,"b",(function(){return c}))},398:function(e,t,r){"use strict";r.d(t,"c",(function(){return n})),r.d(t,"b",(function(){return o})),r.d(t,"a",(function(){return l}));var n=function(e,t,r){t.trim()||r(new Error("Please fill in the email address"));/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(t)||r(new Error("Please enter a valid email address")),r()},o=function(e,t,r){6!==t.length?r(new Error("Please ensure you have entered a valid verification code.")):r()},c={500:"Drawing Failed",10001:"Insufficient user points",10002:"Trial limit exceeded, please activate the membership feature!",10003:"The drawing server is currently very busy. To ensure VIP members' fast drawing experience, please purchase a membership to continue using!",10004:'Too many people in the queue for normal mode, you may have to wait a long time. Please try again later or switch to "Fast Mode"',10005:"Querying in the background, please try again later...",10006:"Duplicate task exists",10007:"Exceeded concurrent task limit",10008:"Uploaded image violates rules. Uploading sensitive images, including but not limited to pornography, political figures, national emblems, party emblems, drugs, etc., is prohibited",10009:"Not subscribed",10010:"Submission frequency is too fast",10011:"Invalid request parameters",10012:"Data query failed",10013:"Data does not exist",10014:"User does not exist",10015:"Invalid parameters",10016:"Please upload a cover image",10017:"Incorrect share link",10018:"This folder is already subscribed",10019:"This folder has not been published",10020:"Cannot subscribe to your own folder",10021:"Failed to process subscription",10022:"Subscription failed",10023:"Points transaction failed",10024:"Points transaction succeeded, but failed to submit subscription transaction",10025:"Failed to cancel subscription",10026:"Shared content does not match the specified content",10027:"This work is not public yet",10028:"No creations found",10029:"Deletion failed",10030:"Unable to delete as there are subscribers in the selected folder",10031:"The folder has not been published",10032:"Cancellation failed",10033:"No permission",10034:"Failed to retrieve the list",10035:"Application record does not exist",10036:"Invalid review status",10037:"Please provide a reason for rejection",10038:"Update failed",10039:"Folder not found",10040:"Failed to get share key",10041:"Failed to like",10042:"Style model does not exist",10043:"Failed to get upload token",10044:"File upload failed",10045:"Please upload a file",10046:"User permission check error",10047:"Points configuration error",10048:"Illegal parameters",10049:"Incorrect image size",10050:"Image generation limit reached",10051:"Tag does not exist",10052:"High-definition enlargement error",10053:"Please enter a prompt",10054:"Please upload a reference image",10055:"Please upload a mask image",10056:"Please upload the original image",10057:"Please upload a face image",10058:"Please upload a video",10059:"Face-swap option not selected in the processor",10060:"Parameter validation error",10061:"Template does not exist",10062:"Sensitive words detected",10063:"Task creation failed",10064:"Task does not exist",10065:"Task model does not exist",10066:"Template error",10067:"This feature is under maintenance and is temporarily unavailable",10068:"Illegal request",10069:"Face detection exception",10070:"Face detection failed",10071:"Incorrect file type",10072:"Face swap exception",10073:"Face swap failed",10074:"File save failed"},l=function(code){return c[code]}},441:function(e,t,r){var content=r(616);content.__esModule&&(content=content.default),"string"==typeof content&&(content=[[e.i,content,""]]),content.locals&&(e.exports=content.locals);(0,r(4).default)("354bc56d",content,!0,{sourceMap:!1})},442:function(e,t,r){var content=r(618);content.__esModule&&(content=content.default),"string"==typeof content&&(content=[[e.i,content,""]]),content.locals&&(e.exports=content.locals);(0,r(4).default)("1a97c374",content,!0,{sourceMap:!1})},507:function(e,t,r){"use strict";var n=r(11),o=r(36);function c(e){return c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},c(e)}function l(){l=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",f=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function d(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{d({},"")}catch(e){d=function(e,t,r){return e[t]=r}}function h(e,t,r,n){var i=t&&t.prototype instanceof _?t:_,a=Object.create(i.prototype),c=new F(n||[]);return o(a,"_invoke",{value:E(e,r,c)}),a}function v(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=h;var m="suspendedStart",y="suspendedYield",x="executing",s="completed",w={};function _(){}function k(){}function P(){}var p={};d(p,a,(function(){return this}));var T=Object.getPrototypeOf,L=T&&T(T(U([])));L&&L!==r&&n.call(L,a)&&(p=L);var g=P.prototype=_.prototype=Object.create(p);function j(e){["next","throw","return"].forEach((function(t){d(e,t,(function(e){return this._invoke(t,e)}))}))}function C(e,t){function r(o,l,i,a){var f=v(e[o],e,l);if("throw"!==f.type){var u=f.arg,d=u.value;return d&&"object"==c(d)&&n.call(d,"__await")?t.resolve(d.__await).then((function(e){r("next",e,i,a)}),(function(e){r("throw",e,i,a)})):t.resolve(d).then((function(e){u.value=e,i(u)}),(function(e){return r("throw",e,i,a)}))}a(f.arg)}var l;o(this,"_invoke",{value:function(e,n){function o(){return new t((function(t,o){r(e,n,t,o)}))}return l=l?l.then(o,o):o()}})}function E(t,r,n){var o=m;return function(i,a){if(o===x)throw Error("Generator is already running");if(o===s){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var c=n.delegate;if(c){var u=O(c,n);if(u){if(u===w)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===m)throw o=s,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=x;var p=v(t,r,n);if("normal"===p.type){if(o=n.done?s:y,p.arg===w)continue;return{value:p.arg,done:n.done}}"throw"===p.type&&(o=s,n.method="throw",n.arg=p.arg)}}}function O(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,O(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),w;var i=v(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,w;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,w):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,w)}function S(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function I(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function F(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function U(t){if(t||""===t){var r=t[a];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function r(){for(;++o<t.length;)if(n.call(t,o))return r.value=t[o],r.done=!1,r;return r.value=e,r.done=!0,r};return i.next=i}}throw new TypeError(c(t)+" is not iterable")}return k.prototype=P,o(g,"constructor",{value:P,configurable:!0}),o(P,"constructor",{value:k,configurable:!0}),k.displayName=d(P,u,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===k||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,P):(e.__proto__=P,d(e,u,"GeneratorFunction")),e.prototype=Object.create(g),e},t.awrap=function(e){return{__await:e}},j(C.prototype),d(C.prototype,f,(function(){return this})),t.AsyncIterator=C,t.async=function(e,r,n,o,i){void 0===i&&(i=Promise);var a=new C(h(e,r,n,o),i);return t.isGeneratorFunction(r)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},j(g),d(g,u,"Generator"),d(g,a,(function(){return this})),d(g,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=U,F.prototype={constructor:F,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(I),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function o(n,o){return a.type="throw",a.arg=t,r.next=n,o&&(r.method="next",r.arg=e),!!o}for(var c=this.tryEntries.length-1;c>=0;--c){var i=this.tryEntries[c],a=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),u=n.call(i,"finallyLoc");if(l&&u){if(this.prev<i.catchLoc)return o(i.catchLoc,!0);if(this.prev<i.finallyLoc)return o(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return o(i.catchLoc,!0)}else{if(!u)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return o(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,w):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),w},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),I(r),w}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;I(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:U(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),w}},t}function f(e,t,r,n,o,a,c){try{var i=e[a](c),u=i.value}catch(e){return void r(e)}i.done?t(u):Promise.resolve(u).then(n,o)}var d={name:"FaceUploader",props:{fileSrc:{type:Object,default:null},tips:{type:String,default:""},maxSize:{type:Number,default:50},uploaderCover:{type:String,default:""}},data:function(){return{fileObject:{}}},created:function(){},mounted:function(){},methods:{onSuccess:function(e,t,r){console.log("success:",e,t,r)},onError:function(e,t,r){console.log("error",e)},beforeUploader:function(e){var t,r=this;return(t=l().mark((function t(){var n,c;return l().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,r.$store.dispatch("userInfo/validPermissions",{vueInstance:r});case 2:if(t.sent){t.next=4;break}return t.abrupt("return",!1);case 4:if(e){t.next=7;break}return r.$message.error({content:"file does not exist",duration:4}),t.abrupt("return",!1);case 7:if(["image/jpg","image/png","image/jpeg"].includes(e.type.toLowerCase())){t.next=10;break}return t.abrupt("return",r.$message.error("Please confirm whether the uploaded image is in jpg/png format !"));case 10:if(!(e.size>1024*r.maxSize*1024)){t.next=13;break}return r.$message.error({message:"The file size cannot exceed ".concat(r.acceptSize," MB"),duration:4}),t.abrupt("return",!1);case 13:return n=URL.createObjectURL(e),t.next=16,Object(o.d)(n,{limit:1024});case 16:c=t.sent,console.log("res",c),r.$emit("update:fileSrc",c),r.$emit("update:uploaderCover",c.blobPath);case 20:case"end":return t.stop()}}),t)})),function(){var e=this,r=arguments;return new Promise((function(n,o){var a=t.apply(e,r);function c(e){f(a,n,o,c,l,"next",e)}function l(e){f(a,n,o,c,l,"throw",e)}c(void 0)}))})()},removeCover:function(){this.$emit("update:uploaderCover",""),this.$emit("update:fileSrc",null)}}},h=d,v=(r(615),r(9)),component=Object(v.a)(h,(function(){var e=this,t=e._self._c;return t("div",{staticClass:"faceUploader"},[t("div",{staticClass:"upload_box",class:[e.$store.state.isMobile?"size-156":"size-260"]},[e.fileObject.base64Img?e._e():t("div",{staticClass:"no_container flex-col-center"},[t("el-upload",{attrs:{multiple:"",accept:".jpg,.png,.jpeg",type:"drag","show-file-list":!1,"before-upload":e.beforeUploader,"on-success":e.onSuccess,"on-error":e.onError,action:""}},[e.uploaderCover?t("div",{staticClass:"cover"},[t("div",{staticClass:"close",on:{click:function(t){return t.stopPropagation(),e.removeCover.apply(null,arguments)}}},[t("div",{staticClass:"iconfont icon-close"})]),e._v(" "),t("img",{attrs:{src:e.uploaderCover,alt:""}})]):t("div",{staticClass:"uploader_container"},[t("img",{directives:[{name:"lazy",rawName:"v-lazy"}],staticClass:"add_img",attrs:{"data-src":r(396),alt:""}}),e._v(" "),t("div",{staticClass:"mb-10"},[e._v(e._s(e.tips))])])])],1)])])}),[],!1,null,"55629555",null),m=component.exports,y=r(417),x=r(359),w=r(360),_=r(419),k=r(358),P=r(321),T=r(398);function L(e){return L="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},L(e)}function j(){j=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,r){return e[t]=r}}function f(e,t,r,n){var i=t&&t.prototype instanceof x?t:x,a=Object.create(i.prototype),c=new F(n||[]);return o(a,"_invoke",{value:E(e,r,c)}),a}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=f;var h="suspendedStart",v="suspendedYield",m="executing",s="completed",y={};function x(){}function w(){}function _(){}var p={};l(p,a,(function(){return this}));var k=Object.getPrototypeOf,P=k&&k(k(U([])));P&&P!==r&&n.call(P,a)&&(p=P);var g=_.prototype=x.prototype=Object.create(p);function T(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function C(e,t){function r(o,c,i,a){var l=d(e[o],e,c);if("throw"!==l.type){var u=l.arg,f=u.value;return f&&"object"==L(f)&&n.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,i,a)}),(function(e){r("throw",e,i,a)})):t.resolve(f).then((function(e){u.value=e,i(u)}),(function(e){return r("throw",e,i,a)}))}a(l.arg)}var c;o(this,"_invoke",{value:function(e,n){function o(){return new t((function(t,o){r(e,n,t,o)}))}return c=c?c.then(o,o):o()}})}function E(t,r,n){var o=h;return function(i,a){if(o===m)throw Error("Generator is already running");if(o===s){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var c=n.delegate;if(c){var u=O(c,n);if(u){if(u===y)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=s,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=m;var p=d(t,r,n);if("normal"===p.type){if(o=n.done?s:v,p.arg===y)continue;return{value:p.arg,done:n.done}}"throw"===p.type&&(o=s,n.method="throw",n.arg=p.arg)}}}function O(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,O(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),y;var i=d(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,y;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,y):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,y)}function S(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function I(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function F(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function U(t){if(t||""===t){var r=t[a];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function r(){for(;++o<t.length;)if(n.call(t,o))return r.value=t[o],r.done=!1,r;return r.value=e,r.done=!0,r};return i.next=i}}throw new TypeError(L(t)+" is not iterable")}return w.prototype=_,o(g,"constructor",{value:_,configurable:!0}),o(_,"constructor",{value:w,configurable:!0}),w.displayName=l(_,u,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===w||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,_):(e.__proto__=_,l(e,u,"GeneratorFunction")),e.prototype=Object.create(g),e},t.awrap=function(e){return{__await:e}},T(C.prototype),l(C.prototype,c,(function(){return this})),t.AsyncIterator=C,t.async=function(e,r,n,o,i){void 0===i&&(i=Promise);var a=new C(f(e,r,n,o),i);return t.isGeneratorFunction(r)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},T(g),l(g,u,"Generator"),l(g,a,(function(){return this})),l(g,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=U,F.prototype={constructor:F,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(I),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function o(n,o){return a.type="throw",a.arg=t,r.next=n,o&&(r.method="next",r.arg=e),!!o}for(var c=this.tryEntries.length-1;c>=0;--c){var i=this.tryEntries[c],a=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),u=n.call(i,"finallyLoc");if(l&&u){if(this.prev<i.catchLoc)return o(i.catchLoc,!0);if(this.prev<i.finallyLoc)return o(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return o(i.catchLoc,!0)}else{if(!u)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return o(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,y):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),y},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),I(r),y}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;I(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:U(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),y}},t}function C(e,t,r,n,o,a,c){try{var i=e[a](c),u=i.value}catch(e){return void r(e)}i.done?t(u):Promise.resolve(u).then(n,o)}function E(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var a=e.apply(t,r);function c(e){C(a,n,o,c,l,"next",e)}function l(e){C(a,n,o,c,l,"throw",e)}c(void 0)}))}}function O(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function S(e,t,r){return(t=function(e){var i=function(e,t){if("object"!=L(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var i=r.call(e,t||"default");if("object"!=L(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==L(i)?i:i+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var I={props:{isTopTitle:{type:Boolean,default:!0}},components:{FaceUploader:m,ImageStatus:y.a,FileDownload:x.a,TemplateImage:w.a,SuccessImg:_.a},data:function(){return{leftPic:null,rightPic:null,leftCover:"",rightCover:"",taskLoading:!1,qualityList:[],qualityType:"",drawLayout:{},faceIndex:0,isCreateSuccess:!1,taskList:[],newTask:null,taskTimer:null,watermarkWM:{}}},computed:function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?O(Object(r),!0).forEach((function(t){S(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):O(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({},Object(n.d)({illegalPictureList:function(e){return e.userInfo.illegalPictureList},isMobile:function(e){return e.isMobile}})),methods:{handleLeft:function(e){this.chooseTemplate(e,"left")},handleRight:function(e){this.chooseTemplate(e,"right")},chooseTemplate:function(e,t){var r=this;return E(j().mark((function n(){return j().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(console.log(e,t),"left"!==t){n.next=9;break}return r.leftCover=e.url,r.leftPic={},n.next=6,Object(o.l)(e.url);case 6:r.leftPic.base64Path=n.sent,n.next=14;break;case 9:return r.rightCover=e.url,r.rightPic={},n.next=13,Object(o.l)(e.url);case 13:r.rightPic.base64Path=n.sent;case 14:case"end":return n.stop()}}),n)})))()},startCreate:function(){var e=this;return E(j().mark((function t(){var r,n,c,l,f,d,h,v,m;return j().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.$store.dispatch("userInfo/validPermissions",{vueInstance:e,notry:e.notry});case 2:if(t.sent){t.next=4;break}return t.abrupt("return");case 4:if(!e.taskLoading){t.next=6;break}return t.abrupt("return");case 6:if(e.leftPic&&e.rightPic){t.next=8;break}return t.abrupt("return");case 8:return e.isCreateSuccess=!0,e.taskLoading=!0,e.newTask={status:9},t.prev=11,t.next=14,Object(k.a)(e.$axios,e.leftPic.base64Path);case 14:return n=t.sent,t.next=17,Object(k.a)(e.$axios,e.rightPic.base64Path);case 17:return c=t.sent,l={image_key_type:3,mark_image_url:n[0],extra_image_url:c[0]},e.newTask={status:1},t.next=22,Object(P.b)(e.$axios,l);case 22:if(f=t.sent,console.log("res",f),!(d=Object(T.a)(f.code))){t.next=27;break}throw new Error(d);case 27:if(null!==(r=f.data)&&void 0!==r&&r.ImageUrl){t.next=29;break}throw new Error("Drawing Failed");case 29:if(!e.$store.getters["userInfo/isAddWM"]){t.next=36;break}return t.next=32,Object(o.b)(f.data.ImageUrl);case 32:h=t.sent,e.newTask={status:2,path:[h]},t.next=37;break;case 36:e.newTask={status:2,path:[f.data.ImageUrl]};case 37:(v=e.$store.state.userInfo.remain_credits)&&e.$store.commit("userInfo/setRemainCredits",v-1),t.next=50;break;case 41:t.prev=41,t.t0=t.catch(11),console.error(t.t0),m=t.t0||"Drawing Failed",e.$Modal.error({title:"error",content:m}),e.isCreateSuccess=!1,e.newTask=null,e.backToEdit(),console.error(t.t0);case 50:return t.prev=50,e.taskLoading=!1,t.finish(50);case 53:case"end":return t.stop()}}),t,null,[[11,41,50,53]])})))()},backToEdit:function(){this.newTask="",this.isCreateSuccess=!1}}},F=I,U=(r(617),Object(v.a)(F,(function(){var e,t,n,o,c,l,f,d,h=this,v=h._self._c;return v("div",{staticClass:"face-swap"},[v("div",{directives:[{name:"lazy",rawName:"v-lazy"}],staticClass:"big_bg",attrs:{"data-bg":r(357)}},[h.isTopTitle?v("h1",{staticClass:"title",class:[h.isMobile?"!text-32":"!text-64"]},[h._v("\n      AI Face Swap\n    ")]):v("h2",{staticClass:"title text-center text-34 sm:text-40 lg:text-48"},[h._v("\n      AI Face Swap\n    ")]),h._v(" "),h._m(0),h._v(" "),v("div",{staticClass:"content"},[v("div",{staticClass:"center_area"},[h.isMobile?h._e():v("div",{directives:[{name:"lazy",rawName:"v-lazy"}],staticClass:"before",attrs:{"data-bg":r(613)}}),h._v(" "),h.isMobile?h._e():v("div",{directives:[{name:"lazy",rawName:"v-lazy"}],staticClass:"after",attrs:{"data-bg":r(614)}})]),h._v(" "),h.isCreateSuccess?h._e():v("div",{staticClass:"edit_status"},[v("div",{staticClass:"uploader"},[v("FaceUploader",{ref:"leftUploader",attrs:{"file-src":h.leftPic,"uploader-cover":h.leftCover,tips:"Upload original image"},on:{"update:fileSrc":function(e){h.leftPic=e},"update:file-src":function(e){h.leftPic=e},"update:uploaderCover":function(e){h.leftCover=e},"update:uploader-cover":function(e){h.leftCover=e}}}),h._v(" "),h._m(1),h._v(" "),v("FaceUploader",{ref:"rightUploader",attrs:{"file-src":h.rightPic,"uploader-cover":h.rightCover,tips:"Upload facial image"},on:{"update:fileSrc":function(e){h.rightPic=e},"update:file-src":function(e){h.rightPic=e},"update:uploaderCover":function(e){h.rightCover=e},"update:uploader-cover":function(e){h.rightCover=e}}})],1)]),h._v(" "),h.isCreateSuccess?v("div",{staticClass:"success"},[v("div",{staticClass:"success_box"},[2===(null===(e=h.newTask)||void 0===e?void 0:e.status)?v("SuccessImg",{attrs:{successPic:null===(t=h.newTask)||void 0===t?void 0:t.path[0]},on:{backToEdit:h.backToEdit}}):h._e(),h._v(" "),h.newTask&&2!==(null===(n=h.newTask)||void 0===n?void 0:n.status)?v("ImageStatus",{attrs:{status:null===(o=h.newTask)||void 0===o?void 0:o.status,"border-radius":20}}):h._e()],1)]):h._e(),h._v(" "),2===(null===(c=h.newTask)||void 0===c?void 0:c.status)?v("div",{staticClass:"btn_list"},[v("div",{staticClass:"normal_btn w-232",on:{click:h.backToEdit}},[h._v("\n          Return To Editing\n        ")]),h._v(" "),v("FileDownload",{attrs:{newTaskPath:null===(l=h.newTask)||void 0===l?void 0:l.path}})],1):h._e(),h._v(" "),h.isCreateSuccess?h._e():v("div",{staticClass:"btn_list"},[v("div",{staticClass:"primary_btn mt-32",class:[h.leftPic&&h.rightPic?"":"disable",h.isMobile?"w-260":"w-376"],on:{click:h.startCreate,touchstart:h.startCreate}},[v("div",[h._v("Start processing")])])]),h._v(" "),h.leftCover||null!==(f=h.newTask)&&void 0!==f&&f.path?h._e():v("TemplateImage",{attrs:{type:"face-swap"},on:{chooseTemplate:h.handleLeft}}),h._v(" "),!h.leftCover||null!==(d=h.newTask)&&void 0!==d&&d.path?h._e():v("TemplateImage",{attrs:{type:"face-swap"},on:{chooseTemplate:h.handleRight}})],1)])])}),[function(){var e=this._self._c;return e("div",{staticClass:"tips"},[e("div",[this._v("\n        Transform your photos instantly with ImgEdit. Try it now and create\n        fun, stunning images effortlessly!\n      ")])])},function(){var e=this._self._c;return e("div",{staticClass:"mid"},[e("i",{staticClass:"el-icon-plus text-20 bold"})])}],!1,null,"3b04bfba",null));t.a=U.exports},613:function(e,t,r){e.exports=r.p+"assets/image/banner/left-face-swap.webp"},614:function(e,t,r){e.exports=r.p+"assets/image/banner/right-face-swap.webp"},615:function(e,t,r){"use strict";r(441)},616:function(e,t,r){var n=r(3)((function(i){return i[1]}));n.push([e.i,".faceUploader .upload_box[data-v-55629555]{background:hsla(0,0%,100%,.9);border:2px dashed rgba(172,78,255,.8);border-radius:20px 20px 20px 20px;-webkit-box-shadow:0 4px 20px 0 rgba(0,0,0,.06);box-shadow:0 4px 20px 0 rgba(0,0,0,.06);-webkit-box-sizing:content-box;box-sizing:content-box;overflow:hidden;position:relative}.faceUploader .upload_box .no_container[data-v-55629555]{height:100%;width:100%;-webkit-box-align:center;-ms-flex-align:center;align-items:center;cursor:pointer}.faceUploader .upload_box .no_container[data-v-55629555] :first-child{height:100%;width:100%}.faceUploader .upload_box .no_container[data-v-55629555] .el-upload{height:100%;width:100%}.faceUploader .upload_box .no_container[data-v-55629555] .el-upload .uploader_container{display:-webkit-box;display:-ms-flexbox;display:flex;height:100%;width:100%;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.faceUploader .upload_box .no_container[data-v-55629555] .el-upload .uploader_container img{width:60%}.faceUploader .upload_box .no_container[data-v-55629555] .el-upload .cover{height:100%;position:relative;width:100%}.faceUploader .upload_box .no_container[data-v-55629555] .el-upload .cover img{height:100%;object-fit:contain;width:100%}.faceUploader .upload_box .no_container[data-v-55629555] .el-upload .cover .close{background:rgba(0,0,0,.5);border-radius:4px;height:32px;position:absolute;right:10px;top:10px;width:34px}.faceUploader .upload_box .no_container[data-v-55629555] .el-upload .cover .close .icon-close{color:#fff;font-size:20px;margin-top:6px}.faceUploader .upload_box .no_container[data-v-55629555] .el-upload .cover .close:hover{opacity:.6}.faceUploader .upload_box .no_container[data-v-55629555] .el-upload .cover .close:active{opacity:.3}",""]),n.locals={},e.exports=n},617:function(e,t,r){"use strict";r(442)},618:function(e,t,r){var n=r(3)((function(i){return i[1]}));n.push([e.i,".face-swap[data-v-3b04bfba]{width:100%}.face-swap .big_bg[data-v-3b04bfba]{background-size:100% 100%;min-height:300px;padding:60px 20px 94px;width:100%}.face-swap .big_bg h1[data-v-3b04bfba]{color:#333;font-size:64px;text-align:center}.face-swap .big_bg .tips[data-v-3b04bfba]{color:#7c7c7c;text-align:center}.face-swap .big_bg .content[data-v-3b04bfba]{margin-top:52px;position:relative;width:100%}.face-swap .big_bg .content[data-v-3b04bfba],.face-swap .big_bg .content .edit_status[data-v-3b04bfba]{-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.face-swap .big_bg .content[data-v-3b04bfba],.face-swap .big_bg .content .edit_status[data-v-3b04bfba],.face-swap .big_bg .content .uploader[data-v-3b04bfba]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.face-swap .big_bg .content .uploader[data-v-3b04bfba]{margin:0 auto;width:800px;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.face-swap .big_bg .content .uploader .mid[data-v-3b04bfba]{margin:0 10px}.face-swap .big_bg .content .success[data-v-3b04bfba],.face-swap .big_bg .content .uploader .mid[data-v-3b04bfba]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.face-swap .big_bg .content .success[data-v-3b04bfba]{-webkit-box-orient:vertical;-webkit-box-direction:normal;background:hsla(0,0%,100%,.9);border:2px dashed rgba(172,78,255,.8);border-radius:20px 20px 20px 20px;-webkit-box-shadow:0 4px 20px 0 rgba(0,0,0,.06);box-shadow:0 4px 20px 0 rgba(0,0,0,.06);-webkit-box-sizing:content-box;box-sizing:content-box;-ms-flex-direction:column;flex-direction:column;height:390px;max-width:604px;min-width:320px;width:100%}.face-swap .big_bg .content .success .success_btn[data-v-3b04bfba]{display:-webkit-box;display:-ms-flexbox;display:flex;gap:20px}.face-swap .big_bg .content .success .success_box[data-v-3b04bfba]{background-image:linear-gradient(45deg,#f5f2f9 25%,transparent 0),linear-gradient(45deg,transparent 75%,#f5f2f9 0),linear-gradient(45deg,#f5f2f9 25%,transparent 0),linear-gradient(45deg,transparent 75%,#f5f2f9 0);background-position:0 0,25px 25px,25px 25px,50px 50px;background-size:50px 50px;border-radius:20px;overflow:hidden;position:relative}.face-swap .big_bg .content .success .success_box[data-v-3b04bfba],.face-swap .big_bg .content .success .success_box .common[data-v-3b04bfba]{display:-webkit-box;display:-ms-flexbox;display:flex;height:100%;width:100%;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.face-swap .big_bg .content .success .success_box .common[data-v-3b04bfba]{padding:40px}.face-swap .big_bg .content .success .success_box .common img[data-v-3b04bfba]{max-height:100%;max-width:100%}.face-swap .big_bg .content .center_area[data-v-3b04bfba]{position:absolute;width:600px}.face-swap .big_bg .content .before[data-v-3b04bfba]{bottom:-200px;left:-360px}.face-swap .big_bg .content .after[data-v-3b04bfba],.face-swap .big_bg .content .before[data-v-3b04bfba]{background:no-repeat;background-size:100% 100%;height:310px;position:absolute;width:339px}.face-swap .big_bg .content .after[data-v-3b04bfba]{right:-360px;top:40px}.primary_btn[data-v-3b04bfba]{height:50px;z-index:999}.btn_list[data-v-3b04bfba]{display:-webkit-box;display:-ms-flexbox;display:flex;margin-top:30px;-ms-flex-pack:distribute;justify-content:space-around;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-ms-flex-wrap:wrap;flex-wrap:wrap;gap:20px;margin-bottom:20px}.btn_list normal_btn[data-v-3b04bfba]{height:50px}.btn_list normal_btn[data-v-3b04bfba]:hover{opacity:.7}",""]),n.locals={},e.exports=n}}]);