text: (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2309c7d3"],{"2f88":function(t,e,n){"use strict";var i,r,a,s=function(){var t=this,e=t.$createElement,n=t._self._c||e;return t.pageData?n("div",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticClass:"page-thumbnail-panel"},[!t.pageData.isPublish&&t.showPublishState?n("span",{staticClass:"unpublish"},[t._v("未发布")]):t._e(),n("div",{staticClass:"thumbnail-panel-cover"},[n("div",{staticClass:"header-mask"},[n("div",{staticClass:"details-btn",on:{click:function(e){return t.preview(t.pageData._id)}}},[t._v("预览")])]),n("div",{staticClass:"image-wrapper"},[n("img",{attrs:{src:t.pageData.coverImage||t.defaultCoverImage,alt:""}})])]),n("div",{staticClass:"page-item-title border-T ellipsis"},[n("span",{staticClass:"item-title-i",attrs:{title:t.pageData.title}},[t._v(t._s(t.pageData.title||"未命名作品"))])]),t.btnList.length?n("div",{staticClass:"border-T thumbnail-panel-btn"},[t.btnList.includes("edit")?n("div",{staticClass:"btn-wrapper"},[n("el-button",{attrs:{type:"text",size:"mini"},on:{click:t.edit}},[t._v("编辑")])],1):t._e(),t.btnList.includes("useTemplate")?n("div",{staticClass:"btn-wrapper"},[n("el-button",{attrs:{type:"text",size:"mini"},on:{click:t.copyPage}},[t._v("使用模板")])],1):t._e(),t.btnList.includes("copyTemplate")?n("div",{staticClass:"btn-wrapper"},[n("el-button",{attrs:{type:"text",size:"mini"},on:{click:t.copyPage}},[t._v("复制")])],1):t._e(),t.showMoreBtn?n("div",{staticClass:"btn-wrapper"},[n("el-dropdown",{attrs:{placement:"top-start"},on:{command:t.command}},[n("el-button",{attrs:{type:"text",size:"mini"}},[t._v("更多 "),n("i",{staticClass:"el-icon-more-outline"})]),n("el-dropdown-menu",[t._l(t.operationDataList,(function(e,i){return[t.btnList.includes(e.eventType)?n("el-dropdown-item",{key:i,attrs:{command:e.eventType}},[n("div",{class:e.extraClassName},[t._v("\n                "+t._s(e.title)+"\n              ")])]):t._e()]}))],2)],1)],1):t._e()]):t._e()]):n("div",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticClass:"page-thumbnail-panel create"},[n("div",{staticClass:"temp-create",on:{click:t.newPage}},[n("i",{staticClass:"el-icon-plus"}),n("p",{staticClass:"paddingT10"},[t._v("新建页面")])])])},o=[],u=(n("8e6e"),n("ac6a"),n("456d"),n("bd86")),l=(n("7f7f"),n("5c96")),c=n("1336"),h=n("2b0e"),d=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("el-dialog",{attrs:{title:"协作人管理",visible:t.visible,width:"650px"},on:{"update:visible":function(e){t.visible=e}}},[n("div",[n("div",{staticClass:"new-folder-wrapper paddingL30 padingR30"},[n("div",{staticClass:"title"},[t._v("按人员搜索添加(多选):")]),n("div",{staticClass:"search-wrapper"},[n("div",{staticClass:"input-wrapper"},[n("el-select",{staticClass:"input-i",attrs:{multiple:"",filterable:"",remote:"","reserve-keyword":"",placeholder:"请输入用户名|邮箱|昵称搜索","remote-method":t.remoteMethod_user,loading:t.loading_user},model:{value:t.userInput,callback:function(e){t.userInput=e},expression:"userInput"}},t._l(t.userOptions,(function(t){return n("el-option",{key:t._id,attrs:{label:t.name,value:t._id}})})),1)],1),n("div",{staticClass:"tj-btn"},[n("el-button",{attrs:{type:"primary"},on:{click:t.addUser}},[t._v("添加")])],1)])]),n("div",{staticClass:"user-list-wrapper"},[n("div",{staticClass:"title"},[t._v("已加入成员:")]),n("div",{staticClass:"user-list"},t._l(t.cooperationUserList,(function(e,i){return n("el-tag",{key:i,staticClass:"user-item",attrs:{size:"mini",closable:""},on:{close:function(n){return t.delUser(e._id,i)}}},[n("img",{staticClass:"userHeadImage",attrs:{src:e.avatar||t.userHeadImage,alt:""}}),t._v("\n          "+t._s(e.name)+"\n        ")])})),1)])])])},g=[],p={components:(i={},Object(u["a"])(i,l["Tag"].name,l["Tag"]),Object(u["a"])(i,l["Select"].name,l["Select"]),Object(u["a"])(i,l["Option"].name,l["Option"]),Object(u["a"])(i,l["Form"].name,l["Form"]),Object(u["a"])(i,l["FormItem"].name,l["FormItem"]),Object(u["a"])(i,l["Dialog"].name,l["Dialog"]),Object(u["a"])(i,l["Button"].name,l["Button"]),i),data:function(){return{userHeadImage:n("685e"),pageId:"",visible:!1,callback:null,loading_user:!1,groupInput:"",groupOptions:[],userInput:[],userOptions:[],cooperationUserList:[]}},created:function(){this.getCooperationList()},methods:{getCooperationList:function(){var t=this;this.$API.getCooperationUserListByPageId({pageId:this.pageId}).then((function(e){t.cooperationUserList=e.body||[]}))},remoteMethod_user:function(t){var e=this;this.loading_user=!0,this.$API.getUserListByKeywords({keywords:t}).then((function(t){e.userOptions=t.body||[],e.loading_user=!1})).catch((function(){e.loading_user=!0}))},addUser:function(){var t=this;this.userInput.length&&this.$API.addCooperation({pageId:this.pageId,userIds:this.userInput}).then((function(e){t.cooperationUserList=e.body||[],t.userInput=[]}))},delUser:function(t,e){var n=this;this.$API.delCooperation({pageId:this.pageId,userId:t}).then((function(){n.cooperationUserList.splice(e,1)}))}}},f=p,m=(n("53eb"),n("2877")),v=Object(m["a"])(f,d,g,!1,null,"28efcbea",null),C=v.exports,b=h["default"].extend(C),w=function(t,e){return r=new b({data:{pageId:t}}),r.$mount(),r.callback=e,document.body.appendChild(r.$el),r.visible=!0,r},y=w;function T(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function P(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?T(Object(n),!0).forEach((function(e){Object(u["a"])(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):T(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var _={props:{showPublishState:{type:Boolean,default:!0},showMoreBtn:{type:Boolean,default:!0},pageType:{type:String,default:"h5"},pageData:Object,btnList:{type:Array,default:function(){return[]}}},components:(a={},Object(u["a"])(a,l["Dropdown"].name,l["Dropdown"]),Object(u["a"])(a,l["DropdownMenu"].name,l["DropdownMenu"]),Object(u["a"])(a,l["DropdownItem"].name,l["DropdownItem"]),a),data:function(){return{loading:!1,defaultCoverImage:n("5c58"),operationDataList:[{title:"发布",eventType:"publish",extraClassName:"",iconClass:""},{title:"发布模板市场",eventType:"publishTemplate",extraClassName:"",iconClass:""},{title:"复制链接",eventType:"copyUrl",iconClass:""},{title:"设为我的模板",eventType:"setTemplate",iconClass:""},{title:"页面数据",eventType:"viewPageData",iconClass:""},{title:"协作设置",eventType:"cooperation",iconClass:""},{title:"删除",eventType:"delete",extraClassName:"error",iconClass:""},{title:"退出协作",eventType:"unCooperation",extraClassName:"error",iconClass:""}]}},methods:{command:function(t){switch(t){case"publish":this.publish();break;case"copyUrl":this.copyUrl();break;case"setTemplate":this.setTemplate();break;case"viewPageData":this.viewPageData();break;case"cooperation":this.cooperation();break;case"delete":this.delete();break;case"unCooperation":this.unCooperation();break;case"publishTemplate":this.publishTemplate();break}},newPage:function(){var t=this,e=c["a"].getProjectConfig();this.loading=!0,this.$API.createPage(P(P({},e),{},{pageMode:this.pageType})).then((function(e){t.loading=!1,e.body&&t.$router.push({name:"Editor",query:{id:e.body._id}})})).catch((function(){t.loading=!1}))},edit:function(){this.$router.push({name:"Editor",query:{id:this.pageData._id}})},copyPage:function(){var t=this;this.loading=!0,this.$API.copyPage({id:this.pageData._id}).then((function(e){t.loading=!1,t.$router.push({name:"Editor",query:{id:e.body._id}})})).catch((function(){t.loading=!1}))},publish:function(){var t=this;this.loading=!0,this.$API.publishPage({id:this.pageData._id}).then((function(){t.loading=!1,t.$message.success("发布成功"),t.preview(t.pageData._id),t.$emit("refresh")})).catch((function(){t.loading=!1}))},preview:function(t){this.$emit("showPreview",t)},copyUrl:function(){},setTemplate:function(){var t=this;this.loading=!0,this.$API.setTemplatePage({id:this.pageData._id}).then((function(){t.loading=!1,t.$message.success("已添加到我的模板")})).catch((function(){t.loading=!1}))},viewPageData:function(){this.$router.push({name:"pageDataDetail",query:{id:this.pageData._id}})},cooperation:function(){y(this.pageData._id)},delete:function(){var t=this;this.$alert("确认删除页面？删除后，将无法访问此页面?","操作提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){t.$API.deletePage({id:t.pageData._id}).then((function(){t.$message.success("删除成功！"),t.$emit("refresh")}))}))},unCooperation:function(){var t=this;this.$alert("确认退出协作编辑？退出后，将无法编辑此页面?","操作提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){t.$API.delCooperation({pageId:t.pageData._id,userId:t.$store.state.user.userInfo._id}).then((function(){t.$message.success("已退出！"),t.$emit("refresh")}))}))},publishTemplate:function(){var t=this;this.loading=!0,this.$API.publishPage({id:this.pageData._id}).then((function(){t.loading=!1,t.$message.success("发布成功")})).catch((function(){t.loading=!1}))}}},E=_,D=(n("e246"),Object(m["a"])(E,s,o,!1,null,"59376931",null));e["a"]=D.exports},"53eb":function(t,e,n){"use strict";n("6331")},"5c58":function(t,e,n){t.exports=n.p+"static/img/quark--pagecover-image.5a0dbec0.png"},6331:function(t,e,n){},"685e":function(t,e,n){t.exports=n.p+"static/img/headerImage.baefd97f.png"},"7f7f":function(t,e,n){var i=n("86cc").f,r=Function.prototype,a=/^\s*function ([^ (]*)/,s="name";s in r||n("9e1e")&&i(r,s,{configurable:!0,get:function(){try{return(""+this).match(a)[1]}catch(t){return""}}})},"80ee":function(t,e,n){},"86b6":function(t,e,n){},a1a8:function(t,e,n){"use strict";var i=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"components-preview"},[n("div",{staticClass:"setting-bg"}),n("div",{staticClass:"left-panel"},[n("div",{staticClass:"iframe-wrapper",style:{width:t.$config.canvasH5Width+"px",height:t.$config.canvasH5Height+"px"}},[n("iframe",{staticStyle:{"background-color":"transparent",width:"100%",height:"100%"},attrs:{src:t.$config.baseURL+"/quark/view/"+t.pageId,frameborder:"0"}})])]),n("div",{staticClass:"right-panel"},[t._t("default")],2),n("span",{staticClass:"cloase-btn",on:{click:t.closePreview}},[n("i",{staticClass:"el-icon-close"})])])},r=[],a={name:"preview-page",props:{pageId:String},data:function(){return{}},created:function(){},methods:{closePreview:function(){this.$emit("closePreview",!1)}}},s=a,o=(n("d56d"),n("2877")),u=Object(o["a"])(s,i,r,!1,null,"f3b04704",null);e["a"]=u.exports},d56d:function(t,e,n){"use strict";n("80ee")},d7b0:function(t,e,n){"use strict";
  /*!
   * qrcode.vue v1.7.0
   * A Vue component to generate QRCode.
   * © 2017-2019 @scopewu(https://github.com/scopewu)
   * MIT License.
   */var i={MODE_NUMBER:1,MODE_ALPHA_NUM:2,MODE_8BIT_BYTE:4,MODE_KANJI:8};function r(t){this.mode=i.MODE_8BIT_BYTE,this.data=t}r.prototype={getLength:function(t){return this.data.length},write:function(t){for(var e=0;e<this.data.length;e++)t.put(this.data.charCodeAt(e),8)}};var a=r,s={L:1,M:0,Q:3,H:2};function o(t,e){this.totalCount=t,this.dataCount=e}o.RS_BLOCK_TABLE=[[1,26,19],[1,26,16],[1,26,13],[1,26,9],[1,44,34],[1,44,28],[1,44,22],[1,44,16],[1,70,55],[1,70,44],[2,35,17],[2,35,13],[1,100,80],[2,50,32],[2,50,24],[4,25,9],[1,134,108],[2,67,43],[2,33,15,2,34,16],[2,33,11,2,34,12],[2,86,68],[4,43,27],[4,43,19],[4,43,15],[2,98,78],[4,49,31],[2,32,14,4,33,15],[4,39,13,1,40,14],[2,121,97],[2,60,38,2,61,39],[4,40,18,2,41,19],[4,40,14,2,41,15],[2,146,116],[3,58,36,2,59,37],[4,36,16,4,37,17],[4,36,12,4,37,13],[2,86,68,2,87,69],[4,69,43,1,70,44],[6,43,19,2,44,20],[6,43,15,2,44,16],[4,101,81],[1,80,50,4,81,51],[4,50,22,4,51,23],[3,36,12,8,37,13],[2,116,92,2,117,93],[6,58,36,2,59,37],[4,46,20,6,47,21],[7,42,14,4,43,15],[4,133,107],[8,59,37,1,60,38],[8,44,20,4,45,21],[12,33,11,4,34,12],[3,145,115,1,146,116],[4,64,40,5,65,41],[11,36,16,5,37,17],[11,36,12,5,37,13],[5,109,87,1,110,88],[5,65,41,5,66,42],[5,54,24,7,55,25],[11,36,12],[5,122,98,1,123,99],[7,73,45,3,74,46],[15,43,19,2,44,20],[3,45,15,13,46,16],[1,135,107,5,136,108],[10,74,46,1,75,47],[1,50,22,15,51,23],[2,42,14,17,43,15],[5,150,120,1,151,121],[9,69,43,4,70,44],[17,50,22,1,51,23],[2,42,14,19,43,15],[3,141,113,4,142,114],[3,70,44,11,71,45],[17,47,21,4,48,22],[9,39,13,16,40,14],[3,135,107,5,136,108],[3,67,41,13,68,42],[15,54,24,5,55,25],[15,43,15,10,44,16],[4,144,116,4,145,117],[17,68,42],[17,50,22,6,51,23],[19,46,16,6,47,17],[2,139,111,7,140,112],[17,74,46],[7,54,24,16,55,25],[34,37,13],[4,151,121,5,152,122],[4,75,47,14,76,48],[11,54,24,14,55,25],[16,45,15,14,46,16],[6,147,117,4,148,118],[6,73,45,14,74,46],[11,54,24,16,55,25],[30,46,16,2,47,17],[8,132,106,4,133,107],[8,75,47,13,76,48],[7,54,24,22,55,25],[22,45,15,13,46,16],[10,142,114,2,143,115],[19,74,46,4,75,47],[28,50,22,6,51,23],[33,46,16,4,47,17],[8,152,122,4,153,123],[22,73,45,3,74,46],[8,53,23,26,54,24],[12,45,15,28,46,16],[3,147,117,10,148,118],[3,73,45,23,74,46],[4,54,24,31,55,25],[11,45,15,31,46,16],[7,146,116,7,147,117],[21,73,45,7,74,46],[1,53,23,37,54,24],[19,45,15,26,46,16],[5,145,115,10,146,116],[19,75,47,10,76,48],[15,54,24,25,55,25],[23,45,15,25,46,16],[13,145,115,3,146,116],[2,74,46,29,75,47],[42,54,24,1,55,25],[23,45,15,28,46,16],[17,145,115],[10,74,46,23,75,47],[10,54,24,35,55,25],[19,45,15,35,46,16],[17,145,115,1,146,116],[14,74,46,21,75,47],[29,54,24,19,55,25],[11,45,15,46,46,16],[13,145,115,6,146,116],[14,74,46,23,75,47],[44,54,24,7,55,25],[59,46,16,1,47,17],[12,151,121,7,152,122],[12,75,47,26,76,48],[39,54,24,14,55,25],[22,45,15,41,46,16],[6,151,121,14,152,122],[6,75,47,34,76,48],[46,54,24,10,55,25],[2,45,15,64,46,16],[17,152,122,4,153,123],[29,74,46,14,75,47],[49,54,24,10,55,25],[24,45,15,46,46,16],[4,152,122,18,153,123],[13,74,46,32,75,47],[48,54,24,14,55,25],[42,45,15,32,46,16],[20,147,117,4,148,118],[40,75,47,7,76,48],[43,54,24,22,55,25],[10,45,15,67,46,16],[19,148,118,6,149,119],[18,75,47,31,76,48],[34,54,24,34,55,25],[20,45,15,61,46,16]],o.getRSBlocks=function(t,e){var n=o.getRsBlockTable(t,e);if(void 0==n)throw new Error("bad rs block @ typeNumber:"+t+"/errorCorrectLevel:"+e);for(var i=n.length/3,r=new Array,a=0;a<i;a++)for(var s=n[3*a+0],u=n[3*a+1],l=n[3*a+2],c=0;c<s;c++)r.push(new o(u,l));return r},o.getRsBlockTable=function(t,e){switch(e){case s.L:return o.RS_BLOCK_TABLE[4*(t-1)+0];case s.M:return o.RS_BLOCK_TABLE[4*(t-1)+1];case s.Q:return o.RS_BLOCK_TABLE[4*(t-1)+2];case s.H:return o.RS_BLOCK_TABLE[4*(t-1)+3];default:return}};var u=o;function l(){this.buffer=new Array,this.length=0}l.prototype={get:function(t){var e=Math.floor(t/8);return 1==(this.buffer[e]>>>7-t%8&1)},put:function(t,e){for(var n=0;n<e;n++)this.putBit(1==(t>>>e-n-1&1))},getLengthInBits:function(){return this.length},putBit:function(t){var e=Math.floor(this.length/8);this.buffer.length<=e&&this.buffer.push(0),t&&(this.buffer[e]|=128>>>this.length%8),this.length++}};for(var c=l,h={glog:function(t){if(t<1)throw new Error("glog("+t+")");return h.LOG_TABLE[t]},gexp:function(t){while(t<0)t+=255;while(t>=256)t-=255;return h.EXP_TABLE[t]},EXP_TABLE:new Array(256),LOG_TABLE:new Array(256)},d=0;d<8;d++)h.EXP_TABLE[d]=1<<d;for(d=8;d<256;d++)h.EXP_TABLE[d]=h.EXP_TABLE[d-4]^h.EXP_TABLE[d-5]^h.EXP_TABLE[d-6]^h.EXP_TABLE[d-8];for(d=0;d<255;d++)h.LOG_TABLE[h.EXP_TABLE[d]]=d;var g=h;function p(t,e){if(void 0==t.length)throw new Error(t.length+"/"+e);var n=0;while(n<t.length&&0==t[n])n++;this.num=new Array(t.length-n+e);for(var i=0;i<t.length-n;i++)this.num[i]=t[i+n]}p.prototype={get:function(t){return this.num[t]},getLength:function(){return this.num.length},multiply:function(t){for(var e=new Array(this.getLength()+t.getLength()-1),n=0;n<this.getLength();n++)for(var i=0;i<t.getLength();i++)e[n+i]^=g.gexp(g.glog(this.get(n))+g.glog(t.get(i)));return new p(e,0)},mod:function(t){if(this.getLength()-t.getLength()<0)return this;for(var e=g.glog(this.get(0))-g.glog(t.get(0)),n=new Array(this.getLength()),i=0;i<this.getLength();i++)n[i]=this.get(i);for(i=0;i<t.getLength();i++)n[i]^=g.gexp(g.glog(t.get(i))+e);return new p(n,0).mod(t)}};var f=p,m={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7},v={PATTERN_POSITION_TABLE:[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]],G15:1335,G18:7973,G15_MASK:21522,getBCHTypeInfo:function(t){var e=t<<10;while(v.getBCHDigit(e)-v.getBCHDigit(v.G15)>=0)e^=v.G15<<v.getBCHDigit(e)-v.getBCHDigit(v.G15);return(t<<10|e)^v.G15_MASK},getBCHTypeNumber:function(t){var e=t<<12;while(v.getBCHDigit(e)-v.getBCHDigit(v.G18)>=0)e^=v.G18<<v.getBCHDigit(e)-v.getBCHDigit(v.G18);return t<<12|e},getBCHDigit:function(t){var e=0;while(0!=t)e++,t>>>=1;return e},getPatternPosition:function(t){return v.PATTERN_POSITION_TABLE[t-1]},getMask:function(t,e,n){switch(t){case m.PATTERN000:return(e+n)%2==0;case m.PATTERN001:return e%2==0;case m.PATTERN010:return n%3==0;case m.PATTERN011:return(e+n)%3==0;case m.PATTERN100:return(Math.floor(e/2)+Math.floor(n/3))%2==0;case m.PATTERN101:return e*n%2+e*n%3==0;case m.PATTERN110:return(e*n%2+e*n%3)%2==0;case m.PATTERN111:return(e*n%3+(e+n)%2)%2==0;default:throw new Error("bad maskPattern:"+t)}},getErrorCorrectPolynomial:function(t){for(var e=new f([1],0),n=0;n<t;n++)e=e.multiply(new f([1,g.gexp(n)],0));return e},getLengthInBits:function(t,e){if(1<=e&&e<10)switch(t){case i.MODE_NUMBER:return 10;case i.MODE_ALPHA_NUM:return 9;case i.MODE_8BIT_BYTE:return 8;case i.MODE_KANJI:return 8;default:throw new Error("mode:"+t)}else if(e<27)switch(t){case i.MODE_NUMBER:return 12;case i.MODE_ALPHA_NUM:return 11;case i.MODE_8BIT_BYTE:return 16;case i.MODE_KANJI:return 10;default:throw new Error("mode:"+t)}else{if(!(e<41))throw new Error("type:"+e);switch(t){case i.MODE_NUMBER:return 14;case i.MODE_ALPHA_NUM:return 13;case i.MODE_8BIT_BYTE:return 16;case i.MODE_KANJI:return 12;default:throw new Error("mode:"+t)}}},getLostPoint:function(t){for(var e=t.getModuleCount(),n=0,i=0;i<e;i++)for(var r=0;r<e;r++){for(var a=0,s=t.isDark(i,r),o=-1;o<=1;o++)if(!(i+o<0||e<=i+o))for(var u=-1;u<=1;u++)r+u<0||e<=r+u||0==o&&0==u||s==t.isDark(i+o,r+u)&&a++;a>5&&(n+=3+a-5)}for(i=0;i<e-1;i++)for(r=0;r<e-1;r++){var l=0;t.isDark(i,r)&&l++,t.isDark(i+1,r)&&l++,t.isDark(i,r+1)&&l++,t.isDark(i+1,r+1)&&l++,0!=l&&4!=l||(n+=3)}for(i=0;i<e;i++)for(r=0;r<e-6;r++)t.isDark(i,r)&&!t.isDark(i,r+1)&&t.isDark(i,r+2)&&t.isDark(i,r+3)&&t.isDark(i,r+4)&&!t.isDark(i,r+5)&&t.isDark(i,r+6)&&(n+=40);for(r=0;r<e;r++)for(i=0;i<e-6;i++)t.isDark(i,r)&&!t.isDark(i+1,r)&&t.isDark(i+2,r)&&t.isDark(i+3,r)&&t.isDark(i+4,r)&&!t.isDark(i+5,r)&&t.isDark(i+6,r)&&(n+=40);var c=0;for(r=0;r<e;r++)for(i=0;i<e;i++)t.isDark(i,r)&&c++;var h=Math.abs(100*c/e/e-50)/5;return n+=10*h,n}},C=v;function b(t,e){this.typeNumber=t,this.errorCorrectLevel=e,this.modules=null,this.moduleCount=0,this.dataCache=null,this.dataList=[]}var w=b.prototype;w.addData=function(t){var e=new a(t);this.dataList.push(e),this.dataCache=null},w.isDark=function(t,e){if(t<0||this.moduleCount<=t||e<0||this.moduleCount<=e)throw new Error(t+","+e);return this.modules[t][e]},w.getModuleCount=function(){return this.moduleCount},w.make=function(){if(this.typeNumber<1){var t=1;for(t=1;t<40;t++){for(var e=u.getRSBlocks(t,this.errorCorrectLevel),n=new c,i=0,r=0;r<e.length;r++)i+=e[r].dataCount;for(r=0;r<this.dataList.length;r++){var a=this.dataList[r];n.put(a.mode,4),n.put(a.getLength(),C.getLengthInBits(a.mode,t)),a.write(n)}if(n.getLengthInBits()<=8*i)break}this.typeNumber=t}this.makeImpl(!1,this.getBestMaskPattern())},w.makeImpl=function(t,e){this.moduleCount=4*this.typeNumber+17,this.modules=new Array(this.moduleCount);for(var n=0;n<this.moduleCount;n++){this.modules[n]=new Array(this.moduleCount);for(var i=0;i<this.moduleCount;i++)this.modules[n][i]=null}this.setupPositionProbePattern(0,0),this.setupPositionProbePattern(this.moduleCount-7,0),this.setupPositionProbePattern(0,this.moduleCount-7),this.setupPositionAdjustPattern(),this.setupTimingPattern(),this.setupTypeInfo(t,e),this.typeNumber>=7&&this.setupTypeNumber(t),null==this.dataCache&&(this.dataCache=b.createData(this.typeNumber,this.errorCorrectLevel,this.dataList)),this.mapData(this.dataCache,e)},w.setupPositionProbePattern=function(t,e){for(var n=-1;n<=7;n++)if(!(t+n<=-1||this.moduleCount<=t+n))for(var i=-1;i<=7;i++)e+i<=-1||this.moduleCount<=e+i||(this.modules[t+n][e+i]=0<=n&&n<=6&&(0==i||6==i)||0<=i&&i<=6&&(0==n||6==n)||2<=n&&n<=4&&2<=i&&i<=4)},w.getBestMaskPattern=function(){for(var t=0,e=0,n=0;n<8;n++){this.makeImpl(!0,n);var i=C.getLostPoint(this);(0==n||t>i)&&(t=i,e=n)}return e},w.createMovieClip=function(t,e,n){var i=t.createEmptyMovieClip(e,n),r=1;this.make();for(var a=0;a<this.modules.length;a++)for(var s=a*r,o=0;o<this.modules[a].length;o++){var u=o*r,l=this.modules[a][o];l&&(i.beginFill(0,100),i.moveTo(u,s),i.lineTo(u+r,s),i.lineTo(u+r,s+r),i.lineTo(u,s+r),i.endFill())}return i},w.setupTimingPattern=function(){for(var t=8;t<this.moduleCount-8;t++)null==this.modules[t][6]&&(this.modules[t][6]=t%2==0);for(var e=8;e<this.moduleCount-8;e++)null==this.modules[6][e]&&(this.modules[6][e]=e%2==0)},w.setupPositionAdjustPattern=function(){for(var t=C.getPatternPosition(this.typeNumber),e=0;e<t.length;e++)for(var n=0;n<t.length;n++){var i=t[e],r=t[n];if(null==this.modules[i][r])for(var a=-2;a<=2;a++)for(var s=-2;s<=2;s++)this.modules[i+a][r+s]=-2==a||2==a||-2==s||2==s||0==a&&0==s}},w.setupTypeNumber=function(t){for(var e=C.getBCHTypeNumber(this.typeNumber),n=0;n<18;n++){var i=!t&&1==(e>>n&1);this.modules[Math.floor(n/3)][n%3+this.moduleCount-8-3]=i}for(n=0;n<18;n++){i=!t&&1==(e>>n&1);this.modules[n%3+this.moduleCount-8-3][Math.floor(n/3)]=i}},w.setupTypeInfo=function(t,e){for(var n=this.errorCorrectLevel<<3|e,i=C.getBCHTypeInfo(n),r=0;r<15;r++){var a=!t&&1==(i>>r&1);r<6?this.modules[r][8]=a:r<8?this.modules[r+1][8]=a:this.modules[this.moduleCount-15+r][8]=a}for(r=0;r<15;r++){a=!t&&1==(i>>r&1);r<8?this.modules[8][this.moduleCount-r-1]=a:r<9?this.modules[8][15-r-1+1]=a:this.modules[8][15-r-1]=a}this.modules[this.moduleCount-8][8]=!t},w.mapData=function(t,e){for(var n=-1,i=this.moduleCount-1,r=7,a=0,s=this.moduleCount-1;s>0;s-=2){6==s&&s--;while(1){for(var o=0;o<2;o++)if(null==this.modules[i][s-o]){var u=!1;a<t.length&&(u=1==(t[a]>>>r&1));var l=C.getMask(e,i,s-o);l&&(u=!u),this.modules[i][s-o]=u,r--,-1==r&&(a++,r=7)}if(i+=n,i<0||this.moduleCount<=i){i-=n,n=-n;break}}}},b.PAD0=236,b.PAD1=17,b.createData=function(t,e,n){for(var i=u.getRSBlocks(t,e),r=new c,a=0;a<n.length;a++){var s=n[a];r.put(s.mode,4),r.put(s.getLength(),C.getLengthInBits(s.mode,t)),s.write(r)}var o=0;for(a=0;a<i.length;a++)o+=i[a].dataCount;if(r.getLengthInBits()>8*o)throw new Error("code length overflow. ("+r.getLengthInBits()+">"+8*o+")");r.getLengthInBits()+4<=8*o&&r.put(0,4);while(r.getLengthInBits()%8!=0)r.putBit(!1);while(1){if(r.getLengthInBits()>=8*o)break;if(r.put(b.PAD0,8),r.getLengthInBits()>=8*o)break;r.put(b.PAD1,8)}return b.createBytes(r,i)},b.createBytes=function(t,e){for(var n=0,i=0,r=0,a=new Array(e.length),s=new Array(e.length),o=0;o<e.length;o++){var u=e[o].dataCount,l=e[o].totalCount-u;i=Math.max(i,u),r=Math.max(r,l),a[o]=new Array(u);for(var c=0;c<a[o].length;c++)a[o][c]=255&t.buffer[c+n];n+=u;var h=C.getErrorCorrectPolynomial(l),d=new f(a[o],h.getLength()-1),g=d.mod(h);s[o]=new Array(h.getLength()-1);for(c=0;c<s[o].length;c++){var p=c+g.getLength()-s[o].length;s[o][c]=p>=0?g.get(p):0}}var m=0;for(c=0;c<e.length;c++)m+=e[c].totalCount;var v=new Array(m),b=0;for(c=0;c<i;c++)for(o=0;o<e.length;o++)c<a[o].length&&(v[b++]=a[o][c]);for(c=0;c<r;c++)for(o=0;o<e.length;o++)c<s[o].length&&(v[b++]=s[o][c]);return v};var y=b;function T(t){for(var e="",n=0;n<t.length;n++){var i=t.charCodeAt(n);i<128?e+=String.fromCharCode(i):i<2048?(e+=String.fromCharCode(192|i>>6),e+=String.fromCharCode(128|63&i)):i<55296||i>=57344?(e+=String.fromCharCode(224|i>>12),e+=String.fromCharCode(128|i>>6&63),e+=String.fromCharCode(128|63&i)):(n++,i=65536+((1023&i)<<10|1023&t.charCodeAt(n)),e+=String.fromCharCode(240|i>>18),e+=String.fromCharCode(128|i>>12&63),e+=String.fromCharCode(128|i>>6&63),e+=String.fromCharCode(128|63&i))}return e}function P(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=[];return t.forEach((function(t,i){var r=null;t.forEach((function(a,s){if(!a&&null!==r)return n.push("M".concat(r+e," ").concat(i+e,"h").concat(s-r,"v1H").concat(r+e,"z")),void(r=null);if(s!==t.length-1)a&&null===r&&(r=s);else{if(!a)return;null===r?n.push("M".concat(s+e,",").concat(i+e," h1v1H").concat(s+e,"z")):n.push("M".concat(r+e,",").concat(i+e," h").concat(s+1-r,"v1H").concat(r+e,"z"))}}))})),n.join("")}var _={props:{value:{type:String,required:!0,default:""},className:{type:String,default:""},size:{type:[Number,String],default:100,validator:function(t){return!0!==isNaN(Number(t))}},level:{type:String,default:"L",validator:function(t){return["L","Q","M","H"].indexOf(t)>-1}},background:{type:String,default:"#fff"},foreground:{type:String,default:"#000"},renderAs:{type:String,required:!1,default:"canvas",validator:function(t){return["canvas","svg"].indexOf(t)>-1}}},data:function(){return{numCells:0,fgPath:""}},updated:function(){this.render()},mounted:function(){this.render()},methods:{render:function(){var t=this.value,e=this.size,n=this.level,i=this.background,r=this.foreground,a=this.renderAs,o=e>>>0,u=new y(-1,s[n]);u.addData(T(t)),u.make();var l=u.modules,c=o/l.length,h=o/l.length,d=window.devicePixelRatio||1;if("svg"===a)this.numCells=l.length,this.fgPath=P(l);else{var g=this.$refs["qrcode-vue"],p=g.getContext("2d");g.height=g.width=o*d,p.scale(d,d),l.forEach((function(t,e){t.forEach((function(t,n){p.fillStyle=t?r:i;var a=Math.ceil((n+1)*c)-Math.floor(n*c),s=Math.ceil((e+1)*h)-Math.floor(e*h);p.fillRect(Math.round(n*c),Math.round(e*h),a,s)}))}))}}},render:function(t){var e=this.className,n=this.value,i=this.level,r=this.background,a=this.foreground,s=this.size,o=this.renderAs,u=this.numCells,l=this.fgPath;return t("div",{class:this.class||e,attrs:{value:n,level:i,background:r,foreground:a}},["svg"===o?t("svg",{attrs:{height:s,width:s,shapeRendering:"crispEdges",viewBox:"0 0 ".concat(u," ").concat(u)},style:{width:s+"px",height:s+"px"}},[t("path",{attrs:{fill:r,d:"M0,0 h".concat(u,"v").concat(u,"H0z")}}),t("path",{attrs:{fill:a,d:l}})]):t("canvas",{attrs:{height:s,width:s},style:{width:s+"px",height:s+"px"},ref:"qrcode-vue"},[])])}};e["a"]=_},e246:function(t,e,n){"use strict";n("86b6")}}]);
  //# sourceMappingURL=chunk-2309c7d3.0261b6e7.js.map