chunk-92b66cce.817b4451.js 30 KB

12345678910111213141516171819202122
  1. (window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-92b66cce"],{"0653":function(e,t,r){"use strict";r("68ef"),r("5c56")},"2de2":function(e,t,r){"use strict";r.d(t,"d",(function(){return n})),r.d(t,"c",(function(){return o})),r.d(t,"b",(function(){return a})),r.d(t,"e",(function(){return i})),r.d(t,"a",(function(){return u}));var n="/duoduo-service/setup-service/",o="/duoduo-service/object-service/",a="/duoduo-service/duoduoenv-service/",i="/duoduo-service/",u="/duoduo-service/custom-service/"},"34e9":function(e,t,r){"use strict";r.d(t,"a",(function(){return c}));t=r("c199");var n=r("7a23"),o=r("fe7e"),a=r("f691"),i=r("b1d2");const[u,s]=Object(o.a)("cell-group");r={title:String,inset:Boolean,border:a.g},o=Object(n.defineComponent)({name:u,inheritAttrs:!1,props:r,setup(e,{slots:t,attrs:r}){const o=()=>{var o;return Object(n.createVNode)("div",Object(n.mergeProps)({class:[s({inset:e.inset}),{[i.d]:e.border&&!e.inset}]},r),[null==(o=t.default)?void 0:o.call(t)])};return()=>e.title||t.title?Object(n.createVNode)(n.Fragment,null,[Object(n.createVNode)("div",{class:s("title",{inset:e.inset})},[t.title?t.title():e.title]),o()]):o()}});var c=Object(t.a)(o)},"38d5":function(e,t,r){"use strict";r("68ef")},5118:function(e,t,r){(function(e){var n=void 0!==e&&e||"undefined"!=typeof self&&self||window,o=Function.prototype.apply;function a(e,t){this._id=e,this._clearFn=t}t.setTimeout=function(){return new a(o.call(setTimeout,n,arguments),clearTimeout)},t.setInterval=function(){return new a(o.call(setInterval,n,arguments),clearInterval)},t.clearTimeout=t.clearInterval=function(e){e&&e.close()},a.prototype.unref=a.prototype.ref=function(){},a.prototype.close=function(){this._clearFn.call(n,this._id)},t.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},t.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},t._unrefActive=t.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;0<=t&&(e._idleTimeoutId=setTimeout((function(){e._onTimeout&&e._onTimeout()}),t))},r("6017"),t.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==e&&e.setImmediate||this&&this.setImmediate,t.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==e&&e.clearImmediate||this&&this.clearImmediate}).call(this,r("c8ba"))},"5c56":function(e,t,r){},6017:function(e,t,r){(function(e,t){!function(e,r){"use strict";var n,o,a,i,u,s,c,l;function d(e){delete o[e]}function f(e){if(a)setTimeout(f,0,e);else{var t=o[e];if(t){a=!0;try{var n=t,i=n.callback,u=n.args;switch(u.length){case 0:i();break;case 1:i(u[0]);break;case 2:i(u[0],u[1]);break;case 3:i(u[0],u[1],u[2]);break;default:i.apply(r,u)}}finally{d(e),a=!1}}}}function h(){function t(t){t.source===e&&"string"==typeof t.data&&0===t.data.indexOf(r)&&f(+t.data.slice(r.length))}var r="setImmediate$"+Math.random()+"$";e.addEventListener?e.addEventListener("message",t,!1):e.attachEvent("onmessage",t),u=function(t){e.postMessage(r+t,"*")}}e.setImmediate||(n=1,a=!(o={}),i=e.document,l=(l=Object.getPrototypeOf&&Object.getPrototypeOf(e))&&l.setTimeout?l:e,"[object process]"==={}.toString.call(e.process)?u=function(e){t.nextTick((function(){f(e)}))}:function(){var t,r;if(e.postMessage&&!e.importScripts)return t=!0,r=e.onmessage,e.onmessage=function(){t=!1},e.postMessage("","*"),e.onmessage=r,t}()?h():u=e.MessageChannel?((c=new MessageChannel).port1.onmessage=function(e){f(e.data)},function(e){c.port2.postMessage(e)}):i&&"onreadystatechange"in i.createElement("script")?(s=i.documentElement,function(e){var t=i.createElement("script");t.onreadystatechange=function(){f(e),t.onreadystatechange=null,s.removeChild(t),t=null},s.appendChild(t)}):function(e){setTimeout(f,0,e)},l.setImmediate=function(e){"function"!=typeof e&&(e=new Function(""+e));for(var t=new Array(arguments.length-1),r=0;r<t.length;r++)t[r]=arguments[r+1];return o[n]={callback:e,args:t},u(n),n++},l.clearImmediate=d)}("undefined"==typeof self?void 0===e?this:e:self)}).call(this,r("c8ba"),r("4362"))},"66b9":function(e,t,r){"use strict";r("68ef"),r("cb51"),r("3743"),r("e3b3"),r("bc1b")},"753a":function(e,t,r){"use strict";r("a377")},"772a":function(e,t,r){"use strict";r.d(t,"a",(function(){return f}));t=r("c199");var n=r("7a23"),o=r("fe7e"),a=r("f691"),i=r("b1d2"),u=r("4a89"),s=r("f465"),c=r("4eda");const[l,d]=Object(o.a)("form");r={colon:Boolean,disabled:Boolean,readonly:Boolean,showError:Boolean,labelWidth:a.f,labelAlign:String,inputAlign:String,scrollToError:Boolean,validateFirst:Boolean,submitOnEnter:a.g,validateTrigger:Object(a.e)("onBlur"),showErrorMessage:a.g,errorMessageAlign:String},o=Object(n.defineComponent)({name:l,props:r,emits:["submit","failed"],setup(e,{emit:t,slots:r}){const{children:o,linkChildren:a}=Object(s.f)(i.f),l=e=>e?o.filter(t=>e.includes(t.name)):o,f=e=>new Promise((t,r)=>{const n=[],o=l(e);o.reduce((e,t)=>e.then(()=>{if(!n.length)return t.validate().then(e=>{e&&n.push(e)})}),Promise.resolve()).then(()=>{n.length?r(n):t()})}),h=e=>new Promise((t,r)=>{const n=l(e);Promise.all(n.map(e=>e.validate())).then(e=>{(e=e.filter(Boolean)).length?r(e):t()})}),m=e=>{const t=o.find(t=>t.name===e);return t?new Promise((e,r)=>{t.validate().then(t=>{t?r(t):e()})}):Promise.reject()},g=t=>("string"==typeof t?m:e.validateFirst?f:h)(t),p=(e,t)=>{o.some(r=>r.name===e&&(r.$el.scrollIntoView(t),!0))},v=()=>{const r=o.reduce((e,t)=>(e[t.name]=t.formValue.value,e),{});g().then(()=>t("submit",r)).catch(n=>{t("failed",{values:r,errors:n}),e.scrollToError&&n[0].name&&p(n[0].name)})},b=e=>{Object(u.e)(e),v()};return a({props:e}),Object(c.a)({submit:v,validate:g,scrollToField:p,resetValidation:e=>{"string"==typeof e&&(e=[e]);const t=l(e);t.forEach(e=>{e.resetValidation()})}}),()=>{var e;return Object(n.createVNode)("form",{class:d(),onSubmit:b},[null==(e=r.default)?void 0:e.call(r)])}}});var f=Object(t.a)(o)},"7abe":function(e,t,r){"use strict";function n(e){return Object(o.pushScopeId)("data-v-15f6ef1b"),e=e(),Object(o.popScopeId)(),e}r.r(t);var o=r("7a23"),a={key:0,class:"home"},i={key:0},u={key:1},s={class:"home-content"},c={class:"home-left"},l={class:"box"},d=["src"],f=n((function(){return Object(o.createElementVNode)("div",{class:"logo-text"},"SagaCare",-1)})),h={class:"home-right"},m={key:0,class:"box"},g={class:"qrcode-main"},p={key:0,class:"qrcode-model"},v={key:0},b=n((function(){return Object(o.createElementVNode)("div",{class:"qrcode-text"}," 请使用朵朵小程序,扫描上面二维码进行授权登录 ",-1)})),T={key:1,class:"box"},C=Object(o.createTextVNode)(" 提交 "),O=n((function(){return Object(o.createElementVNode)("div",{class:"fotter"},"欢迎使用智能办公",-1)}));r("99af");var E=r("5530"),y=r("d39c"),w=(y=r.n(y),r("6c02")),j=r("d257"),B=r("0613"),k=r("59b9"),P=r("ba72"),L=r("772a"),A=(r("38d5"),r("565f")),_=(r("be7f"),r("34e9")),I=(r("0653"),r("b650")),N=(r("66b9"),r("d399")),S=(r("e7e5"),r("5581")),D=r("459d"),M=r("a873"),R=r("5118");y=Object(o.defineComponent)({components:{QrcodeVue:y.a,vanForm:L.a,vanField:A.b,CellGroup:_.a,vanButton:I.b},beforeRouteEnter:function(e,t,r){var n=Object(S.a)();n&&"null"!=n?"logoOut"!==e.query.type?r((function(e){e.queryPageWorkSpace()})):r((function(e){e.showLogin=!0,Object(S.a)()})):r("/error")},setup:function(e){var t=Object(w.d)(),r=Object(j.t)(),n=Object(B.b)(),a=location.origin,i=Object(o.reactive)({parseImgUrl:j.y,codeValue:"".concat(a,"/tenantslink/home"),showLogin:!1,size:134,spaceTimer:null,type:1,userInfo:r,checkLoginType:function(){1===i.type?i.type=2:i.type=1,1===i.type?i.getPadQrCodeStatus():i.timer&&(Object(R.clearTimeout)(i.timer),i.timer=null)},username:"",password:"",onSubmit:function(e){e=e,Object(k.b)().request("/server/login",P.b.POST,e,P.a.json).then((function(e){"success"===e.result?(Object(S.j)(e.token),t.push({path:"/choice-project"})):Object(N.a)("登录失败!")}))},queryPageWorkSpace:function(){var e;i.userInfo.mac?(e={criteria:{macAddress:i.userInfo.mac,isMajorSpace:1},orders:[{column:"createTime",asc:!1}],page:1,size:1},Object(D.H)(e).then((function(e){var r;"success"===e.result?(e=null!=(e=null==e?void 0:e.content)?e:[])&&e.length?(i.showLogin=!1,r=e[0].projectId,n.commit(M.a.SET_PROJECT_ID,r),t.push({name:"envmonitor",query:{spaceId:e[0].spaceId}})):i.showLogin=!0:(i.showLogin=!0,i.spaceTimer=Object(R.setTimeout)((function(){i.queryPageWorkSpace(),Object(R.clearTimeout)(i.spaceTimer)}),5e3))})).catch((function(){i.showLogin=!0,i.spaceTimer=Object(R.setTimeout)((function(){i.queryPageWorkSpace(),Object(R.clearTimeout)(i.spaceTimer)}),5e3)}))):(i.showLogin=!0,t.push({name:"error"}))},getQrcode:function(){var e=i.userInfo.mac;return Object(j.x)(0,1e5,e)},qrCodeId:"",setCodeUrl:function(){var e=i.userInfo.mac,t=i.getQrcode();i.qrCodeId=t,i.codeValue="".concat(a,"/tenantslink/home?type=ipad&id=").concat(i.qrCodeId,"&mac=").concat(e)},clearTimer:function(){i.timer&&(Object(R.clearTimeout)(i.timer),i.timer=null)},refreshCode:function(){i.setCodeUrl(),i.clearTimer(),i.getPadQrCodeStatus()},codeStatus:{},timer:null,getPadQrCodeStatus:function(){var e=Object(j.B)({qrCodeId:i.qrCodeId});Object(D.p)(e).then((function(e){var r;i.codeStatus=null!=(e=null==e?void 0:e.data)?e:{},2===i.codeStatus.status?(e=i.codeStatus.projectId,r=i.codeStatus.spaceId,e&&r?(n.commit(M.a.SET_PROJECT_ID,e),t.push({name:"choiceSpace",query:{id:e,spaceId:r}})):e&&(n.commit(M.a.SET_PROJECT_ID,e),t.push({name:"choiceSpace",query:{id:e}}))):(i.timer&&(Object(R.clearTimeout)(i.timer),i.timer=null),i.timer=Object(R.setTimeout)((function(){i.getPadQrCodeStatus()}),1e3))}))}});return Object(o.onBeforeUnmount)((function(){i.timer&&(Object(R.clearTimeout)(i.timer),i.timer=null,Object(R.clearTimeout)(i.spaceTimer),i.spaceTimer=null)})),Object(o.onMounted)((function(){i.setCodeUrl(),i.getPadQrCodeStatus()})),Object(E.a)({},Object(o.toRefs)(i))}}),r("f3c1"),r("753a"),L=r("6b0d"),A=r.n(L);t.default=A()(y,[["render",function(e,t,r,n,E,y){var w=Object(o.resolveComponent)("qrcode-vue"),j=Object(o.resolveComponent)("van-icon"),B=Object(o.resolveComponent)("van-field"),k=Object(o.resolveComponent)("van-cell-group"),P=Object(o.resolveComponent)("van-button"),L=Object(o.resolveComponent)("van-form");return e.showLogin?(Object(o.openBlock)(),Object(o.createElementBlock)("div",a,[Object(o.createElementVNode)("div",{class:"home-btn",onClick:t[0]||(t[0]=function(){return e.checkLoginType&&e.checkLoginType.apply(e,arguments)})},[2===e.type?(Object(o.openBlock)(),Object(o.createElementBlock)("span",i,"二维码登录")):(Object(o.openBlock)(),Object(o.createElementBlock)("span",u,"账号登录"))]),Object(o.createElementVNode)("div",s,[Object(o.createElementVNode)("div",c,[Object(o.createElementVNode)("div",l,[Object(o.createElementVNode)("img",{src:e.parseImgUrl("ipdImages","logo.svg"),alt:""},null,8,d),f])]),Object(o.createElementVNode)("div",h,[1===e.type?(Object(o.openBlock)(),Object(o.createElementBlock)("div",m,[Object(o.createElementVNode)("div",g,[Object(o.createVNode)(w,{value:e.codeValue,class:"qrcode",foreground:"#CE9F27",level:"H"},null,8,["value"]),e.codeStatus.status?(Object(o.openBlock)(),Object(o.createElementBlock)("div",p,[1===e.codeStatus.status?(Object(o.openBlock)(),Object(o.createElementBlock)("span",v,"已扫描")):Object(o.createCommentVNode)("",!0),2===e.codeStatus.status||3===e.codeStatus.status?(Object(o.openBlock)(),Object(o.createBlock)(j,{key:1,class:"code-replay",onClick:e.refreshCode,name:"replay"},null,8,["onClick"])):Object(o.createCommentVNode)("",!0)])):Object(o.createCommentVNode)("",!0)]),b])):(Object(o.openBlock)(),Object(o.createElementBlock)("div",T,[Object(o.createVNode)(L,{onSubmit:e.onSubmit,class:"box-form"},{default:Object(o.withCtx)((function(){return[Object(o.createVNode)(k,{inset:""},{default:Object(o.withCtx)((function(){return[Object(o.createVNode)(B,{modelValue:e.username,"onUpdate:modelValue":t[1]||(t[1]=function(t){return e.username=t}),name:"username",placeholder:"用户名",rules:[{required:!0,message:"请填写用户名"}]},null,8,["modelValue"]),Object(o.createVNode)(B,{modelValue:e.password,"onUpdate:modelValue":t[2]||(t[2]=function(t){return e.password=t}),type:"password",name:"password",placeholder:"密码",rules:[{required:!0,message:"请填写密码"}]},null,8,["modelValue"])]})),_:1}),Object(o.createElementVNode)("div",null,[Object(o.createVNode)(P,{round:"",block:"","native-type":"submit"},{default:Object(o.withCtx)((function(){return[C]})),_:1})])]})),_:1},8,["onSubmit"])]))])]),O])):Object(o.createCommentVNode)("",!0)}],["__scopeId","data-v-15f6ef1b"]])},"88f2":function(e,t,r){},a377:function(e,t,r){e.exports={menuBg:"#fff",menuText:"#162b64",menuActiveText:"#435ebe"}},be7f:function(e,t,r){"use strict";r("68ef"),r("cb51"),r("3743"),r("1a04"),r("1146")},d39c:function(e,t,r){
  2. /*!
  3. * qrcode.vue v3.3.3
  4. * A Vue.js component to generate QRCode.
  5. * © 2017-2021 @scopewu(https://github.com/scopewu)
  6. * MIT License.
  7. */
  8. e.exports=function(e){"use strict";
  9. /*! *****************************************************************************
  10. Copyright (c) Microsoft Corporation.
  11. Permission to use, copy, modify, and/or distribute this software for any
  12. purpose with or without fee is hereby granted.
  13. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
  14. REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
  15. AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
  16. INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
  17. LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
  18. OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  19. PERFORMANCE OF THIS SOFTWARE.
  20. ***************************************************************************** */var t=function(){return t=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r],t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},t.apply(this,arguments)},r={MODE_NUMBER:1,MODE_ALPHA_NUM:2,MODE_8BIT_BYTE:4,MODE_KANJI:8},n=r;function o(e){this.mode=n.MODE_8BIT_BYTE,this.data=e}o.prototype={getLength:function(e){return this.data.length},write:function(e){for(var t=0;t<this.data.length;t++)e.put(this.data.charCodeAt(t),8)}};var a=o,i={L:1,M:0,Q:3,H:2},u=i;function s(e,t){this.totalCount=e,this.dataCount=t}s.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]],s.getRSBlocks=function(e,t){var r=s.getRsBlockTable(e,t);if(void 0==r)throw new Error("bad rs block @ typeNumber:"+e+"/errorCorrectLevel:"+t);for(var n=r.length/3,o=new Array,a=0;a<n;a++)for(var i=r[3*a+0],u=r[3*a+1],c=r[3*a+2],l=0;l<i;l++)o.push(new s(u,c));return o},s.getRsBlockTable=function(e,t){switch(t){case u.L:return s.RS_BLOCK_TABLE[4*(e-1)+0];case u.M:return s.RS_BLOCK_TABLE[4*(e-1)+1];case u.Q:return s.RS_BLOCK_TABLE[4*(e-1)+2];case u.H:return s.RS_BLOCK_TABLE[4*(e-1)+3];default:return}};var c=s;function l(){this.buffer=new Array,this.length=0}l.prototype={get:function(e){var t=Math.floor(e/8);return 1==(this.buffer[t]>>>7-e%8&1)},put:function(e,t){for(var r=0;r<t;r++)this.putBit(1==(e>>>t-r-1&1))},getLengthInBits:function(){return this.length},putBit:function(e){var t=Math.floor(this.length/8);this.buffer.length<=t&&this.buffer.push(0),e&&(this.buffer[t]|=128>>>this.length%8),this.length++}};for(var d=l,f={glog:function(e){if(e<1)throw new Error("glog("+e+")");return f.LOG_TABLE[e]},gexp:function(e){while(e<0)e+=255;while(e>=256)e-=255;return f.EXP_TABLE[e]},EXP_TABLE:new Array(256),LOG_TABLE:new Array(256)},h=0;h<8;h++)f.EXP_TABLE[h]=1<<h;for(h=8;h<256;h++)f.EXP_TABLE[h]=f.EXP_TABLE[h-4]^f.EXP_TABLE[h-5]^f.EXP_TABLE[h-6]^f.EXP_TABLE[h-8];for(h=0;h<255;h++)f.LOG_TABLE[f.EXP_TABLE[h]]=h;var m=f,g=m;function p(e,t){if(void 0==e.length)throw new Error(e.length+"/"+t);var r=0;while(r<e.length&&0==e[r])r++;this.num=new Array(e.length-r+t);for(var n=0;n<e.length-r;n++)this.num[n]=e[n+r]}p.prototype={get:function(e){return this.num[e]},getLength:function(){return this.num.length},multiply:function(e){for(var t=new Array(this.getLength()+e.getLength()-1),r=0;r<this.getLength();r++)for(var n=0;n<e.getLength();n++)t[r+n]^=g.gexp(g.glog(this.get(r))+g.glog(e.get(n)));return new p(t,0)},mod:function(e){if(this.getLength()-e.getLength()<0)return this;for(var t=g.glog(this.get(0))-g.glog(e.get(0)),r=new Array(this.getLength()),n=0;n<this.getLength();n++)r[n]=this.get(n);for(n=0;n<e.getLength();n++)r[n]^=g.gexp(g.glog(e.get(n))+t);return new p(r,0).mod(e)}};var v=r,b=p,T=m,C={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7},O={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(e){var t=e<<10;while(O.getBCHDigit(t)-O.getBCHDigit(O.G15)>=0)t^=O.G15<<O.getBCHDigit(t)-O.getBCHDigit(O.G15);return(e<<10|t)^O.G15_MASK},getBCHTypeNumber:function(e){var t=e<<12;while(O.getBCHDigit(t)-O.getBCHDigit(O.G18)>=0)t^=O.G18<<O.getBCHDigit(t)-O.getBCHDigit(O.G18);return e<<12|t},getBCHDigit:function(e){var t=0;while(0!=e)t++,e>>>=1;return t},getPatternPosition:function(e){return O.PATTERN_POSITION_TABLE[e-1]},getMask:function(e,t,r){switch(e){case C.PATTERN000:return(t+r)%2==0;case C.PATTERN001:return t%2==0;case C.PATTERN010:return r%3==0;case C.PATTERN011:return(t+r)%3==0;case C.PATTERN100:return(Math.floor(t/2)+Math.floor(r/3))%2==0;case C.PATTERN101:return t*r%2+t*r%3==0;case C.PATTERN110:return(t*r%2+t*r%3)%2==0;case C.PATTERN111:return(t*r%3+(t+r)%2)%2==0;default:throw new Error("bad maskPattern:"+e)}},getErrorCorrectPolynomial:function(e){for(var t=new b([1],0),r=0;r<e;r++)t=t.multiply(new b([1,T.gexp(r)],0));return t},getLengthInBits:function(e,t){if(1<=t&&t<10)switch(e){case v.MODE_NUMBER:return 10;case v.MODE_ALPHA_NUM:return 9;case v.MODE_8BIT_BYTE:return 8;case v.MODE_KANJI:return 8;default:throw new Error("mode:"+e)}else if(t<27)switch(e){case v.MODE_NUMBER:return 12;case v.MODE_ALPHA_NUM:return 11;case v.MODE_8BIT_BYTE:return 16;case v.MODE_KANJI:return 10;default:throw new Error("mode:"+e)}else{if(!(t<41))throw new Error("type:"+t);switch(e){case v.MODE_NUMBER:return 14;case v.MODE_ALPHA_NUM:return 13;case v.MODE_8BIT_BYTE:return 16;case v.MODE_KANJI:return 12;default:throw new Error("mode:"+e)}}},getLostPoint:function(e){for(var t=e.getModuleCount(),r=0,n=0;n<t;n++)for(var o=0;o<t;o++){for(var a=0,i=e.isDark(n,o),u=-1;u<=1;u++)if(!(n+u<0||t<=n+u))for(var s=-1;s<=1;s++)o+s<0||t<=o+s||0==u&&0==s||i==e.isDark(n+u,o+s)&&a++;a>5&&(r+=3+a-5)}for(n=0;n<t-1;n++)for(o=0;o<t-1;o++){var c=0;e.isDark(n,o)&&c++,e.isDark(n+1,o)&&c++,e.isDark(n,o+1)&&c++,e.isDark(n+1,o+1)&&c++,0!=c&&4!=c||(r+=3)}for(n=0;n<t;n++)for(o=0;o<t-6;o++)e.isDark(n,o)&&!e.isDark(n,o+1)&&e.isDark(n,o+2)&&e.isDark(n,o+3)&&e.isDark(n,o+4)&&!e.isDark(n,o+5)&&e.isDark(n,o+6)&&(r+=40);for(o=0;o<t;o++)for(n=0;n<t-6;n++)e.isDark(n,o)&&!e.isDark(n+1,o)&&e.isDark(n+2,o)&&e.isDark(n+3,o)&&e.isDark(n+4,o)&&!e.isDark(n+5,o)&&e.isDark(n+6,o)&&(r+=40);var l=0;for(o=0;o<t;o++)for(n=0;n<t;n++)e.isDark(n,o)&&l++;var d=Math.abs(100*l/t/t-50)/5;return r+=10*d,r}},E=a,y=c,w=d,j=O,B=p;function k(e,t){this.typeNumber=e,this.errorCorrectLevel=t,this.modules=null,this.moduleCount=0,this.dataCache=null,this.dataList=[]}var P=k.prototype,L=(P.addData=function(e){var t=new E(e);this.dataList.push(t),this.dataCache=null},P.isDark=function(e,t){if(e<0||this.moduleCount<=e||t<0||this.moduleCount<=t)throw new Error(e+","+t);return this.modules[e][t]},P.getModuleCount=function(){return this.moduleCount},P.make=function(){if(this.typeNumber<1){var e=1;for(e=1;e<40;e++){for(var t=y.getRSBlocks(e,this.errorCorrectLevel),r=new w,n=0,o=0;o<t.length;o++)n+=t[o].dataCount;for(o=0;o<this.dataList.length;o++){var a=this.dataList[o];r.put(a.mode,4),r.put(a.getLength(),j.getLengthInBits(a.mode,e)),a.write(r)}if(r.getLengthInBits()<=8*n)break}this.typeNumber=e}this.makeImpl(!1,this.getBestMaskPattern())},P.makeImpl=function(e,t){this.moduleCount=4*this.typeNumber+17,this.modules=new Array(this.moduleCount);for(var r=0;r<this.moduleCount;r++){this.modules[r]=new Array(this.moduleCount);for(var n=0;n<this.moduleCount;n++)this.modules[r][n]=null}this.setupPositionProbePattern(0,0),this.setupPositionProbePattern(this.moduleCount-7,0),this.setupPositionProbePattern(0,this.moduleCount-7),this.setupPositionAdjustPattern(),this.setupTimingPattern(),this.setupTypeInfo(e,t),this.typeNumber>=7&&this.setupTypeNumber(e),null==this.dataCache&&(this.dataCache=k.createData(this.typeNumber,this.errorCorrectLevel,this.dataList)),this.mapData(this.dataCache,t)},P.setupPositionProbePattern=function(e,t){for(var r=-1;r<=7;r++)if(!(e+r<=-1||this.moduleCount<=e+r))for(var n=-1;n<=7;n++)t+n<=-1||this.moduleCount<=t+n||(this.modules[e+r][t+n]=0<=r&&r<=6&&(0==n||6==n)||0<=n&&n<=6&&(0==r||6==r)||2<=r&&r<=4&&2<=n&&n<=4)},P.getBestMaskPattern=function(){for(var e=0,t=0,r=0;r<8;r++){this.makeImpl(!0,r);var n=j.getLostPoint(this);(0==r||e>n)&&(e=n,t=r)}return t},P.createMovieClip=function(e,t,r){var n=e.createEmptyMovieClip(t,r),o=1;this.make();for(var a=0;a<this.modules.length;a++)for(var i=a*o,u=0;u<this.modules[a].length;u++){var s=u*o,c=this.modules[a][u];c&&(n.beginFill(0,100),n.moveTo(s,i),n.lineTo(s+o,i),n.lineTo(s+o,i+o),n.lineTo(s,i+o),n.endFill())}return n},P.setupTimingPattern=function(){for(var e=8;e<this.moduleCount-8;e++)null==this.modules[e][6]&&(this.modules[e][6]=e%2==0);for(var t=8;t<this.moduleCount-8;t++)null==this.modules[6][t]&&(this.modules[6][t]=t%2==0)},P.setupPositionAdjustPattern=function(){for(var e=j.getPatternPosition(this.typeNumber),t=0;t<e.length;t++)for(var r=0;r<e.length;r++){var n=e[t],o=e[r];if(null==this.modules[n][o])for(var a=-2;a<=2;a++)for(var i=-2;i<=2;i++)this.modules[n+a][o+i]=-2==a||2==a||-2==i||2==i||0==a&&0==i}},P.setupTypeNumber=function(e){for(var t=j.getBCHTypeNumber(this.typeNumber),r=0;r<18;r++){var n=!e&&1==(t>>r&1);this.modules[Math.floor(r/3)][r%3+this.moduleCount-8-3]=n}for(r=0;r<18;r++){n=!e&&1==(t>>r&1);this.modules[r%3+this.moduleCount-8-3][Math.floor(r/3)]=n}},P.setupTypeInfo=function(e,t){for(var r=this.errorCorrectLevel<<3|t,n=j.getBCHTypeInfo(r),o=0;o<15;o++){var a=!e&&1==(n>>o&1);o<6?this.modules[o][8]=a:o<8?this.modules[o+1][8]=a:this.modules[this.moduleCount-15+o][8]=a}for(o=0;o<15;o++){a=!e&&1==(n>>o&1);o<8?this.modules[8][this.moduleCount-o-1]=a:o<9?this.modules[8][15-o-1+1]=a:this.modules[8][15-o-1]=a}this.modules[this.moduleCount-8][8]=!e},P.mapData=function(e,t){for(var r=-1,n=this.moduleCount-1,o=7,a=0,i=this.moduleCount-1;i>0;i-=2){6==i&&i--;while(1){for(var u=0;u<2;u++)if(null==this.modules[n][i-u]){var s=!1;a<e.length&&(s=1==(e[a]>>>o&1));var c=j.getMask(t,n,i-u);c&&(s=!s),this.modules[n][i-u]=s,o--,-1==o&&(a++,o=7)}if(n+=r,n<0||this.moduleCount<=n){n-=r,r=-r;break}}}},k.PAD0=236,k.PAD1=17,k.createData=function(e,t,r){for(var n=y.getRSBlocks(e,t),o=new w,a=0;a<r.length;a++){var i=r[a];o.put(i.mode,4),o.put(i.getLength(),j.getLengthInBits(i.mode,e)),i.write(o)}var u=0;for(a=0;a<n.length;a++)u+=n[a].dataCount;if(o.getLengthInBits()>8*u)throw new Error("code length overflow. ("+o.getLengthInBits()+">"+8*u+")");o.getLengthInBits()+4<=8*u&&o.put(0,4);while(o.getLengthInBits()%8!=0)o.putBit(!1);while(1){if(o.getLengthInBits()>=8*u)break;if(o.put(k.PAD0,8),o.getLengthInBits()>=8*u)break;o.put(k.PAD1,8)}return k.createBytes(o,n)},k.createBytes=function(e,t){for(var r=0,n=0,o=0,a=new Array(t.length),i=new Array(t.length),u=0;u<t.length;u++){var s=t[u].dataCount,c=t[u].totalCount-s;n=Math.max(n,s),o=Math.max(o,c),a[u]=new Array(s);for(var l=0;l<a[u].length;l++)a[u][l]=255&e.buffer[l+r];r+=s;var d=j.getErrorCorrectPolynomial(c),f=new B(a[u],d.getLength()-1),h=f.mod(d);i[u]=new Array(d.getLength()-1);for(l=0;l<i[u].length;l++){var m=l+h.getLength()-i[u].length;i[u][l]=m>=0?h.get(m):0}}var g=0;for(l=0;l<t.length;l++)g+=t[l].totalCount;var p=new Array(g),v=0;for(l=0;l<n;l++)for(u=0;u<t.length;u++)l<a[u].length&&(p[v++]=a[u][l]);for(l=0;l<o;l++)for(u=0;u<t.length;u++)l<i[u].length&&(p[v++]=i[u][l]);return p},k),A="H",_=function(){try{(new Path2D).addPath(new Path2D)}catch(t){return!1}return!0}();function I(e,t){var r=i[t],n=new L(-1,r);return n.addData(S(e)),n.make(),n}function N(e){return e in i}function S(e){for(var t="",r=0;r<e.length;r++){var n=e.charCodeAt(r);n<128?t+=String.fromCharCode(n):n<2048?(t+=String.fromCharCode(192|n>>6),t+=String.fromCharCode(128|63&n)):n<55296||n>=57344?(t+=String.fromCharCode(224|n>>12),t+=String.fromCharCode(128|n>>6&63),t+=String.fromCharCode(128|63&n)):(r++,n=65536+((1023&n)<<10|1023&e.charCodeAt(r)),t+=String.fromCharCode(240|n>>18),t+=String.fromCharCode(128|n>>12&63),t+=String.fromCharCode(128|n>>6&63),t+=String.fromCharCode(128|63&n))}return t}function D(e,t){void 0===t&&(t=0);var r=[];return e.forEach((function(e,n){var o=null;e.forEach((function(a,i){if(!a&&null!==o)return r.push("M"+(o+t)+" "+(n+t)+"h"+(i-o)+"v1H"+(o+t)+"z"),void(o=null);if(i!==e.length-1)a&&null===o&&(o=i);else{if(!a)return;null===o?r.push("M"+(i+t)+","+(n+t)+" h1v1H"+(i+t)+"z"):r.push("M"+(o+t)+","+(n+t)+" h"+(i+1-o)+"v1H"+(o+t)+"z")}}))})),r.join("")}var M={value:{type:String,required:!0,default:""},size:{type:Number,default:100},level:{type:String,default:A,validator:function(e){return N(e)}},background:{type:String,default:"#fff"},foreground:{type:String,default:"#000"},margin:{type:Number,required:!1,default:0}},R=t(t({},M),{renderAs:{type:String,required:!1,default:"canvas",validator:function(e){return["canvas","svg"].indexOf(e)>-1}}}),V=e.defineComponent({name:"QRCodeSvg",props:M,setup:function(t){var r=e.ref(0),n=e.ref(""),o=function(){var e=t.value,o=t.level,a=t.margin,i=I(e,o).modules;r.value=i.length+2*a,n.value=D(i,a)};return o(),e.onUpdated(o),function(){return e.h("svg",{width:t.size,height:t.size,"shape-rendering":"crispEdges",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 "+r.value+" "+r.value},[e.h("path",{fill:t.background,d:"M0,0 h"+r.value+"v"+r.value+"H0z"}),e.h("path",{fill:t.foreground,d:n.value})])}}}),x=e.defineComponent({name:"QRCodeCanvas",props:M,setup:function(t){var r=e.ref(null),n=function(){var e=t.value,n=t.level,o=t.size,a=t.margin,i=t.background,u=t.foreground,s=I(e,n).modules,c=s.length+2*a,l=r.value;if(l){var d=l.getContext("2d");if(d){var f=window.devicePixelRatio||1,h=o/c*f;l.height=l.width=o*f,d.scale(h,h),d.fillStyle=i,d.fillRect(0,0,c,c),d.fillStyle=u,_?d.fill(new Path2D(D(s,a))):s.forEach((function(e,t){e.forEach((function(e,r){e&&d.fillRect(r+a,t+a,1,1)}))}))}}};return e.onMounted(n),e.onUpdated(n),function(){return e.h("canvas",{ref:r,style:{width:t.size+"px",height:t.size+"px"}})}}});return e.defineComponent({name:"Qrcode",render:function(){var t=this.$props,r=t.renderAs,n=t.value,o=t.size,a=t.margin,i=t.level,u=t.background,s=t.foreground,c=o>>>0,l=a>>>0,d=N(i)?i:A;return e.h("svg"===r?V:x,{value:n,size:c,margin:l,level:d,background:u,foreground:s})},props:R})}(r("7a23"))},f3c1:function(e,t,r){"use strict";r("88f2")}}]);