12 lines
69 KiB
JavaScript
12 lines
69 KiB
JavaScript
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-3fba1bf2"],{"1b09":function(t,e,r){"use strict";var n=r("a70e"),o=r.n(n);o.a},2532:function(t,e,r){"use strict";var n=r("23e7"),o=r("5a34"),i=r("1d80"),a=r("ab13");n({target:"String",proto:!0,forced:!a("includes")},{includes:function(t){return!!~String(i(this)).indexOf(o(t),arguments.length>1?arguments[1]:void 0)}})},"3ab1":function(t,e,r){"use strict";r.r(e);var n=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",{staticClass:"room container"},[r("div",{staticClass:"roomTitle"},[r("h1",{staticClass:"title is-1"},[t._v(t._s(t.roomStatus.roomName))]),r("h2",{staticClass:"subtitle"},[t._v(t._s(t.roomStatus.current.title))])]),r("b-tabs",{attrs:{type:"is-boxed",expanded:""}},[r("b-tab-item",{attrs:{label:"Playlist",icon:"playlist-play"}},[r("Playlist")],1),r("b-tab-item",{attrs:{label:"Player",icon:"youtube",visible:t.localSettings.playLink}},[r("Player")],1),r("b-tab-item",{attrs:{label:"Peers",icon:"lan",visible:t.isAdmin}},[r("Admin")],1),r("b-tab-item",{attrs:{label:"Invite",icon:"qrcode"}},[r("Invite",{attrs:{roomCode:t.roomStatus.roomCode}})],1),r("b-tab-item",{attrs:{label:"Settings",icon:"cog"}},[r("Settings")],1)],1),r("b-loading",{attrs:{"is-full-page":"",active:t.isRoomLoading},on:{"update:active":function(e){t.isRoomLoading=e}}})],1)},o=[],i=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",{staticClass:"invite"},[r("h1",{staticClass:"subtitle"},[t._v(t._s(t.roomCode))]),r("qrcode",{attrs:{value:t.roomCode,options:{width:200}}})],1)},a=[],s=r("b2e5"),u=r.n(s),f={name:"Invite",components:{qrcode:u.a},props:{roomCode:{type:String,default:"abc"}}},l=f,c=(r("1b09"),r("2877")),h=Object(c["a"])(l,i,a,!1,null,null,null),p=h.exports,d=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",[r("b-button",{attrs:{"icon-left":"sync"},on:{click:t.broadcastStatus}},[t._v("Force status update")]),r("hr"),r("b-table",{attrs:{data:t.usersList,striped:"",hoverable:""},scopedSlots:t._u([{key:"default",fn:function(e){return[r("b-table-column",{attrs:{field:"name",label:"Name"}},[t._v(" "+t._s(e.row.name)+" ")]),r("b-table-column",{attrs:{field:"connection",label:"Connection"}},[t._v(" "+t._s(e.row.connection.signalingState)+" ")]),r("b-table-column",{attrs:{field:"data",label:"DataChannel"}},[t._v(" "+t._s(e.row.dataChannel.readyState)+" ")]),r("b-table-column",[r("b-button",{attrs:{"icon-left":"karate",type:"is-dark"},on:{click:function(r){return t.kickUser(e.row.name)}}})],1)]}}])})],1)},g=[],m={name:"Admin",computed:{usersList:function(){return this.$store.state.rtc.peers}},methods:{broadcastStatus:function(){this.$store.dispatch("rtc/broadcast",{message:this.$store.state.room.roomStatus,type:"status"})},kickUser:function(t){this.$store.dispatch("rtc/kick",t)}}},y=m,v=Object(c["a"])(y,d,g,!1,null,null,null),b=v.exports,w=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",[t.roomSettings.userLink?r("b-button",{attrs:{"icon-left":"plus",size:"is-medium"},on:{click:t.addLinkPrompt}},[t._v("Add link")]):t._e(),r("hr"),r("b-table",{attrs:{data:t.roomStatus.playlist,striped:"",hoverable:"","default-sort":"vote"},scopedSlots:t._u([{key:"default",fn:function(e){return[r("b-table-column",{attrs:{field:"title",label:"Title"}},[t._v(" "+t._s(e.row.title)+" ")]),r("b-table-column",{attrs:{field:"link",label:"Link"}},[t._v(" "+t._s(e.row.link)+" ")]),r("b-table-column",{attrs:{field:"vote",label:"Votes"}},[t._v(" "+t._s(e.row.votes)+" ")]),r("b-table-column",{attrs:{field:"voters",label:"Voters",visible:t.isAdmin}},[t._v(" "+t._s(e.row.voters)+" ")]),r("b-table-column",[t.hasVoted(e.row)?r("b-button",{attrs:{"icon-left":"arrow-down-bold-outline",type:"is-primary",size:"is-medium"},on:{click:function(r){t.vote(e.row.title,e.row.link,e.row.linkID,!1)}}}):r("b-button",{attrs:{"icon-left":"arrow-up-bold-outline",type:"is-primary",size:"is-medium"},on:{click:function(r){t.vote(e.row.title,e.row.link,e.row.linkID,!0)}}}),t.isAdmin?r("b-button",{staticClass:"actionButton",attrs:{"icon-left":"delete-forever",type:"is-danger",size:"is-medium"},on:{click:function(r){t.removePlay(e.row.linkID)}}}):t._e()],1)]}}])})],1)},E=[],A=(r("caad"),r("b0c0"),r("d3b7"),r("2532"),r("96cf"),r("1da1")),S={name:"Playlist",computed:{isAdmin:function(){return this.$store.state.room.admin},roomStatus:function(){return this.$store.state.room.roomStatus},roomSettings:function(){return this.$store.state.room.roomSettings}},methods:{addLinkPrompt:function(){var t=this;this.$buefy.dialog.prompt({message:"Add a youtube link",trapFocus:!0,inputAttrs:{placeholder:"https://www.youtube.com/watch?v=YItIK09bpKk"},cancelText:"Nah",confirmText:"Add",onConfirm:function(e){return t.addLink(e)}})},addLink:function(t){var e=this;return Object(A["a"])(regeneratorRuntime.mark((function r(){var n,o;return regeneratorRuntime.wrap((function(r){while(1)switch(r.prev=r.next){case 0:if(n=e.$youtube.getIdFromUrl(t),null!==n){r.next=4;break}return e.$buefy.toast.open("Invalid youtube link"),r.abrupt("return");case 4:return r.next=6,e.getInfos(n);case 6:o=r.sent,console.log(o),console.log(o.title),e.vote(o.title,t,n,!0);case 10:case"end":return r.stop()}}),r)})))()},vote:function(t,e,r,n){this.isAdmin?this.$store.dispatch("room/vote",{title:t,link:e,linkID:r,isPositive:n,voterName:this.$store.state.rtc.name}):this.sendVote(e,r,n)},sendVote:function(t,e,r){var n={type:"vote",link:t,linkID:e,isPositive:r,voterName:this.$store.state.rtc.name};this.$store.dispatch("rtc/broadcast",{message:n,type:"vote"})},hasVoted:function(t){return t.voters.includes(this.$store.state.rtc.name)},removePlay:function(t){this.$store.dispatch("room/removePlay",t)},getInfos:function(t){return Object(A["a"])(regeneratorRuntime.mark((function e(){var r;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,fetch("https://noembed.com/embed?format=json&url=https://www.youtube.com/watch?v="+t);case 2:return r=e.sent,e.next=5,r.json();case 5:return e.abrupt("return",e.sent);case 6:case"end":return e.stop()}}),e)})))()}}},C=S,B=(r("3c2d"),Object(c["a"])(C,w,E,!1,null,null,null)),T=B.exports,k=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",{staticClass:"player"},[r("youtube",{ref:"youtube",attrs:{"video-id":t.roomStatus.current.linkID,"player-vars":t.playerVars},on:{playing:t.roomStatus.player.playing}}),r("hr"),r("b-field",{attrs:{position:"is-centered"}},[r("b-button",{staticClass:"playerButton",attrs:{size:"is-large","icon-right":t.roomStatus.player.playing?"pause":"play",disabled:!(t.isAdmin||t.roomSettings.userControl)},on:{click:t.play}}),r("b-button",{staticClass:"playerButton",attrs:{size:"is-large","icon-right":"volume-mute"},on:{click:t.mute}}),r("b-button",{staticClass:"playerButton",attrs:{size:"is-large","icon-right":"skip-next",disabled:!(t.isAdmin||t.roomSettings.userControl)},on:{click:t.skip}}),r("b-slider",{staticClass:"playerVolume",attrs:{size:"is-large",min:0,max:100,value:100},on:{change:t.volume}})],1),r("b-field",{attrs:{position:"is-centered"}},[r("b-slider",{attrs:{rounded:"",size:"is-medium",min:0,max:t.roomStatus.player.timeLength,value:t.roomStatus.player.timeCode,"custom-formatter":function(e){return t.convertTimeCode(e)},disabled:!(t.isAdmin||t.roomSettings.userControl)},on:{change:t.seek}})],1),r("h2",{staticClass:"subtitle is-6 time"},[t._v(t._s(t.convertTimeCode(t.roomStatus.player.timeCode))+" / "+t._s(t.convertTimeCode(t.roomStatus.player.timeLength)))])],1)},R=[],x={name:"Player",computed:{isAdmin:function(){return this.$store.state.room.admin},roomStatus:function(){return this.$store.state.room.roomStatus},roomSettings:function(){return this.$store.state.room.roomSettings},localSettings:function(){return this.$store.state.room.localSettings},player:function(){return this.$refs.youtube.player},playerVars:function(){var t={autoplay:1,controls:0,disablekb:0,modestbranding:1,rel:0},e={autoplay:1,controls:0,disablekb:1,modestbranding:1,rel:0};return this.isAdmin?t:e},lastUserCommand:function(){return this.$store.state.room.lastUserCommand}},mounted:function(){this.player.addEventListener("onStateChange",this.playerStateChange),setInterval(this.updateTimeCode,1e3)},watch:{roomStatus:function(t){this.localSettings.playLink?(this.player.seekTo(t.player.timeCode,!0),t.player.playing?this.player.playVideo():this.player.pauseVideo()):this.player.pauseVideo()},lastUserCommand:function(t){switch(t.type){case"play":this.play();break;case"seek":this.seek(t.argument);break;case"skip":this.skip();break}}},methods:{playerStateChange:function(t){var e=this;return Object(A["a"])(regeneratorRuntime.mark((function r(){return regeneratorRuntime.wrap((function(r){while(1)switch(r.prev=r.next){case 0:if(console.log("[PLAYER] Status change "+t.data),!e.isAdmin){r.next=17;break}return r.t0=e.$store,r.t1=t.data,r.next=6,e.player.getCurrentTime();case 6:return r.t2=r.sent,r.next=9,e.player.getDuration();case 9:return r.t3=r.sent,r.next=12,t.target.getVideoData().title;case 12:r.t4=r.sent,r.t5={playerStatus:r.t1,timeCode:r.t2,timeLength:r.t3,title:r.t4},r.t0.dispatch.call(r.t0,"room/setCurrent",r.t5),r.next=18;break;case 17:e.roomStatus.player.playing?e.player.playVideo():e.player.pauseVideo();case 18:case"end":return r.stop()}}),r)})))()},play:function(){this.isAdmin?this.roomStatus.player.playing?this.player.pauseVideo():this.player.playVideo():this.roomSettings.userControl&&this.$store.dispatch("rtc/broadcast",{message:{type:"play"},type:"userCommand"})},mute:function(){var t=this;return Object(A["a"])(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,t.player.isMuted();case 2:if(!e.sent){e.next=6;break}t.player.unMute(),e.next=7;break;case 6:t.player.mute();case 7:case"end":return e.stop()}}),e)})))()},volume:function(t){this.player.setVolume(t)},skip:function(){this.isAdmin?this.$store.commit("room/CURRENT_END"):this.roomSettings.userControl&&this.$store.dispatch("rtc/broadcast",{message:{type:"skip"},type:"userCommand"})},seek:function(t){this.isAdmin?this.player.seekTo(t,!0):this.roomSettings.userControl&&this.$store.dispatch("rtc/broadcast",{message:{type:"seek",argument:t},type:"userCommand"})},updateTimeCode:function(){var t=this;return Object(A["a"])(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(!t.localSettings.playLink){e.next=6;break}return e.t0=t.$store,e.next=4,t.player.getCurrentTime();case 4:e.t1=e.sent,e.t0.dispatch.call(e.t0,"room/setTimeCode",e.t1);case 6:case"end":return e.stop()}}),e)})))()},convertTimeCode:function(t){var e=Math.round(t/60),r=Math.round(t%60);return e<10&&(e="0"+e),r<10&&(r="0"+r),e+":"+r}}},P=x,I=(r("b8ac"),Object(c["a"])(P,k,R,!1,null,null,null)),_=I.exports,L=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",[r("b-field",{attrs:{label:"Player"}},[r("b-switch",{attrs:{size:"is-medium"},on:{input:t.setLocalSettings},model:{value:t.localSettings.playLink,callback:function(e){t.$set(t.localSettings,"playLink",e)},expression:"localSettings.playLink"}},[t._v("Play link")])],1),r("b-field",[r("b-switch",{attrs:{size:"is-medium"},on:{input:t.setLocalSettings},model:{value:t.localSettings.externalSearch,callback:function(e){t.$set(t.localSettings,"externalSearch",e)},expression:"localSettings.externalSearch"}},[t._v("Enable Youtube search")])],1),t.isAdmin?r("div",[r("hr"),r("b-field",{attrs:{label:"Admin"}},[r("b-switch",{attrs:{size:"is-medium"},on:{input:t.setRoomSettings},model:{value:t.roomSettings.userControl,callback:function(e){t.$set(t.roomSettings,"userControl",e)},expression:"roomSettings.userControl"}},[t._v("Users can control video")])],1),r("b-field",[r("b-switch",{attrs:{size:"is-medium"},on:{input:t.setRoomSettings},model:{value:t.roomSettings.userLink,callback:function(e){t.$set(t.roomSettings,"userLink",e)},expression:"roomSettings.userLink"}},[t._v("Users can add link")])],1)],1):t._e(),r("hr"),r("b-field",{attrs:{label:"User"}},[r("b-button",{attrs:{type:"is-danger","icon-right":"exit-to-app"},on:{click:t.leave}},[t._v("Leave")])],1)],1)},U=[],M={name:"Settings",data:function(){return{localSettings:this.$store.state.room.localSettings,roomSettings:this.$store.state.room.roomSettings}},computed:{isAdmin:function(){return this.$store.state.room.admin}},mounted:function(){this.isAdmin&&(this.localSettings.playLink=!0,this.setLocalSettings())},methods:{leave:function(){this.$store.dispatch("room/leave"),this.$router.push({name:"Home"})},setLocalSettings:function(){this.$store.dispatch("room/setLocalSettings",this.localSettings)},setRoomSettings:function(){this.$store.dispatch("room/setRoomSettings",this.roomSettings)}}},N=M,O=Object(c["a"])(N,L,U,!1,null,null,null),$=O.exports,j={name:"Room",components:{Invite:p,Admin:b,Playlist:T,Player:_,Settings:$},computed:{roomStatus:function(){return this.$store.state.room.roomStatus},isAdmin:function(){return this.$store.state.room.admin},isLoggedIn:function(){return this.$store.state.app.loginSuccess},isRoomLoading:function(){return""===this.roomStatus.roomName},localSettings:function(){return this.$store.state.room.localSettings}},mounted:function(){this.isLoggedIn||this.$router.push({name:"Home"})}},D=j,Y=(r("5ca1"),Object(c["a"])(D,n,o,!1,null,null,null));e["default"]=Y.exports},"3c2d":function(t,e,r){"use strict";var n=r("6bb4"),o=r.n(n);o.a},"44e7":function(t,e,r){var n=r("861d"),o=r("c6b6"),i=r("b622"),a=i("match");t.exports=function(t){var e;return n(t)&&(void 0!==(e=t[a])?!!e:"RegExp"==o(t))}},"5a34":function(t,e,r){var n=r("44e7");t.exports=function(t){if(n(t))throw TypeError("The method doesn't accept regular expressions");return t}},"5ca1":function(t,e,r){"use strict";var n=r("f255"),o=r.n(n);o.a},"6bb4":function(t,e,r){},"8db4":function(t,e,r){},a70e:function(t,e,r){},ab13:function(t,e,r){var n=r("b622"),o=n("match");t.exports=function(t){var e=/./;try{"/./"[t](e)}catch(r){try{return e[o]=!1,"/./"[t](e)}catch(n){}}return!1}},b2e5:function(t,e,r){
|
|
/*!
|
|
* vue-qrcode v1.0.2
|
|
* https://fengyuanchen.github.io/vue-qrcode
|
|
*
|
|
* Copyright 2018-present Chen Fengyuan
|
|
* Released under the MIT license
|
|
*
|
|
* Date: 2020-01-18T06:04:33.222Z
|
|
*/
|
|
(function(e,r){t.exports=r()})(0,(function(){"use strict";function t(){throw new Error("Dynamic requires are not currently supported by rollup-plugin-commonjs")}function e(t,e){return e={exports:{}},t(e,e.exports),e.exports}var r=e((function(e,r){(function(t){e.exports=t()})((function(){return function(){function e(r,n,o){function i(s,u){if(!n[s]){if(!r[s]){var f="function"==typeof t&&t;if(!u&&f)return f(s,!0);if(a)return a(s,!0);var l=new Error("Cannot find module '"+s+"'");throw l.code="MODULE_NOT_FOUND",l}var c=n[s]={exports:{}};r[s][0].call(c.exports,(function(t){var e=r[s][1][t];return i(e||t)}),c,c.exports,e,r,n,o)}return n[s].exports}for(var a="function"==typeof t&&t,s=0;s<o.length;s++)i(o[s]);return i}return e}()({1:[function(t,e,r){e.exports=function(){return"function"===typeof Promise&&Promise.prototype&&Promise.prototype.then}},{}],2:[function(t,e,r){var n=t("./utils").getSymbolSize;r.getRowColCoords=function(t){if(1===t)return[];for(var e=Math.floor(t/7)+2,r=n(t),o=145===r?26:2*Math.ceil((r-13)/(2*e-2)),i=[r-7],a=1;a<e-1;a++)i[a]=i[a-1]-o;return i.push(6),i.reverse()},r.getPositions=function(t){for(var e=[],n=r.getRowColCoords(t),o=n.length,i=0;i<o;i++)for(var a=0;a<o;a++)0===i&&0===a||0===i&&a===o-1||i===o-1&&0===a||e.push([n[i],n[a]]);return e}},{"./utils":21}],3:[function(t,e,r){var n=t("./mode"),o=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function i(t){this.mode=n.ALPHANUMERIC,this.data=t}i.getBitsLength=function(t){return 11*Math.floor(t/2)+t%2*6},i.prototype.getLength=function(){return this.data.length},i.prototype.getBitsLength=function(){return i.getBitsLength(this.data.length)},i.prototype.write=function(t){var e;for(e=0;e+2<=this.data.length;e+=2){var r=45*o.indexOf(this.data[e]);r+=o.indexOf(this.data[e+1]),t.put(r,11)}this.data.length%2&&t.put(o.indexOf(this.data[e]),6)},e.exports=i},{"./mode":14}],4:[function(t,e,r){function n(){this.buffer=[],this.length=0}n.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 r=0;r<e;r++)this.putBit(1===(t>>>e-r-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++}},e.exports=n},{}],5:[function(t,e,r){var n=t("../utils/buffer");function o(t){if(!t||t<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=t,this.data=n.alloc(t*t),this.reservedBit=n.alloc(t*t)}o.prototype.set=function(t,e,r,n){var o=t*this.size+e;this.data[o]=r,n&&(this.reservedBit[o]=!0)},o.prototype.get=function(t,e){return this.data[t*this.size+e]},o.prototype.xor=function(t,e,r){this.data[t*this.size+e]^=r},o.prototype.isReserved=function(t,e){return this.reservedBit[t*this.size+e]},e.exports=o},{"../utils/buffer":28}],6:[function(t,e,r){var n=t("../utils/buffer"),o=t("./mode");function i(t){this.mode=o.BYTE,this.data=n.from(t)}i.getBitsLength=function(t){return 8*t},i.prototype.getLength=function(){return this.data.length},i.prototype.getBitsLength=function(){return i.getBitsLength(this.data.length)},i.prototype.write=function(t){for(var e=0,r=this.data.length;e<r;e++)t.put(this.data[e],8)},e.exports=i},{"../utils/buffer":28,"./mode":14}],7:[function(t,e,r){var n=t("./error-correction-level"),o=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],i=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];r.getBlocksCount=function(t,e){switch(e){case n.L:return o[4*(t-1)+0];case n.M:return o[4*(t-1)+1];case n.Q:return o[4*(t-1)+2];case n.H:return o[4*(t-1)+3];default:return}},r.getTotalCodewordsCount=function(t,e){switch(e){case n.L:return i[4*(t-1)+0];case n.M:return i[4*(t-1)+1];case n.Q:return i[4*(t-1)+2];case n.H:return i[4*(t-1)+3];default:return}}},{"./error-correction-level":8}],8:[function(t,e,r){function n(t){if("string"!==typeof t)throw new Error("Param is not a string");var e=t.toLowerCase();switch(e){case"l":case"low":return r.L;case"m":case"medium":return r.M;case"q":case"quartile":return r.Q;case"h":case"high":return r.H;default:throw new Error("Unknown EC Level: "+t)}}r.L={bit:1},r.M={bit:0},r.Q={bit:3},r.H={bit:2},r.isValid=function(t){return t&&"undefined"!==typeof t.bit&&t.bit>=0&&t.bit<4},r.from=function(t,e){if(r.isValid(t))return t;try{return n(t)}catch(o){return e}}},{}],9:[function(t,e,r){var n=t("./utils").getSymbolSize,o=7;r.getPositions=function(t){var e=n(t);return[[0,0],[e-o,0],[0,e-o]]}},{"./utils":21}],10:[function(t,e,r){var n=t("./utils"),o=1335,i=21522,a=n.getBCHDigit(o);r.getEncodedBits=function(t,e){var r=t.bit<<3|e,s=r<<10;while(n.getBCHDigit(s)-a>=0)s^=o<<n.getBCHDigit(s)-a;return(r<<10|s)^i}},{"./utils":21}],11:[function(t,e,r){var n=t("../utils/buffer"),o=n.alloc(512),i=n.alloc(256);(function(){for(var t=1,e=0;e<255;e++)o[e]=t,i[t]=e,t<<=1,256&t&&(t^=285);for(e=255;e<512;e++)o[e]=o[e-255]})(),r.log=function(t){if(t<1)throw new Error("log("+t+")");return i[t]},r.exp=function(t){return o[t]},r.mul=function(t,e){return 0===t||0===e?0:o[i[t]+i[e]]}},{"../utils/buffer":28}],12:[function(t,e,r){var n=t("./mode"),o=t("./utils");function i(t){this.mode=n.KANJI,this.data=t}i.getBitsLength=function(t){return 13*t},i.prototype.getLength=function(){return this.data.length},i.prototype.getBitsLength=function(){return i.getBitsLength(this.data.length)},i.prototype.write=function(t){var e;for(e=0;e<this.data.length;e++){var r=o.toSJIS(this.data[e]);if(r>=33088&&r<=40956)r-=33088;else{if(!(r>=57408&&r<=60351))throw new Error("Invalid SJIS character: "+this.data[e]+"\nMake sure your charset is UTF-8");r-=49472}r=192*(r>>>8&255)+(255&r),t.put(r,13)}},e.exports=i},{"./mode":14,"./utils":21}],13:[function(t,e,r){r.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};var n={N1:3,N2:3,N3:40,N4:10};function o(t,e,n){switch(t){case r.Patterns.PATTERN000:return(e+n)%2===0;case r.Patterns.PATTERN001:return e%2===0;case r.Patterns.PATTERN010:return n%3===0;case r.Patterns.PATTERN011:return(e+n)%3===0;case r.Patterns.PATTERN100:return(Math.floor(e/2)+Math.floor(n/3))%2===0;case r.Patterns.PATTERN101:return e*n%2+e*n%3===0;case r.Patterns.PATTERN110:return(e*n%2+e*n%3)%2===0;case r.Patterns.PATTERN111:return(e*n%3+(e+n)%2)%2===0;default:throw new Error("bad maskPattern:"+t)}}r.isValid=function(t){return null!=t&&""!==t&&!isNaN(t)&&t>=0&&t<=7},r.from=function(t){return r.isValid(t)?parseInt(t,10):void 0},r.getPenaltyN1=function(t){for(var e=t.size,r=0,o=0,i=0,a=null,s=null,u=0;u<e;u++){o=i=0,a=s=null;for(var f=0;f<e;f++){var l=t.get(u,f);l===a?o++:(o>=5&&(r+=n.N1+(o-5)),a=l,o=1),l=t.get(f,u),l===s?i++:(i>=5&&(r+=n.N1+(i-5)),s=l,i=1)}o>=5&&(r+=n.N1+(o-5)),i>=5&&(r+=n.N1+(i-5))}return r},r.getPenaltyN2=function(t){for(var e=t.size,r=0,o=0;o<e-1;o++)for(var i=0;i<e-1;i++){var a=t.get(o,i)+t.get(o,i+1)+t.get(o+1,i)+t.get(o+1,i+1);4!==a&&0!==a||r++}return r*n.N2},r.getPenaltyN3=function(t){for(var e=t.size,r=0,o=0,i=0,a=0;a<e;a++){o=i=0;for(var s=0;s<e;s++)o=o<<1&2047|t.get(a,s),s>=10&&(1488===o||93===o)&&r++,i=i<<1&2047|t.get(s,a),s>=10&&(1488===i||93===i)&&r++}return r*n.N3},r.getPenaltyN4=function(t){for(var e=0,r=t.data.length,o=0;o<r;o++)e+=t.data[o];var i=Math.abs(Math.ceil(100*e/r/5)-10);return i*n.N4},r.applyMask=function(t,e){for(var r=e.size,n=0;n<r;n++)for(var i=0;i<r;i++)e.isReserved(i,n)||e.xor(i,n,o(t,i,n))},r.getBestMask=function(t,e){for(var n=Object.keys(r.Patterns).length,o=0,i=1/0,a=0;a<n;a++){e(a),r.applyMask(a,t);var s=r.getPenaltyN1(t)+r.getPenaltyN2(t)+r.getPenaltyN3(t)+r.getPenaltyN4(t);r.applyMask(a,t),s<i&&(i=s,o=a)}return o}},{}],14:[function(t,e,r){var n=t("./version-check"),o=t("./regex");function i(t){if("string"!==typeof t)throw new Error("Param is not a string");var e=t.toLowerCase();switch(e){case"numeric":return r.NUMERIC;case"alphanumeric":return r.ALPHANUMERIC;case"kanji":return r.KANJI;case"byte":return r.BYTE;default:throw new Error("Unknown mode: "+t)}}r.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},r.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},r.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},r.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},r.MIXED={bit:-1},r.getCharCountIndicator=function(t,e){if(!t.ccBits)throw new Error("Invalid mode: "+t);if(!n.isValid(e))throw new Error("Invalid version: "+e);return e>=1&&e<10?t.ccBits[0]:e<27?t.ccBits[1]:t.ccBits[2]},r.getBestModeForData=function(t){return o.testNumeric(t)?r.NUMERIC:o.testAlphanumeric(t)?r.ALPHANUMERIC:o.testKanji(t)?r.KANJI:r.BYTE},r.toString=function(t){if(t&&t.id)return t.id;throw new Error("Invalid mode")},r.isValid=function(t){return t&&t.bit&&t.ccBits},r.from=function(t,e){if(r.isValid(t))return t;try{return i(t)}catch(n){return e}}},{"./regex":19,"./version-check":22}],15:[function(t,e,r){var n=t("./mode");function o(t){this.mode=n.NUMERIC,this.data=t.toString()}o.getBitsLength=function(t){return 10*Math.floor(t/3)+(t%3?t%3*3+1:0)},o.prototype.getLength=function(){return this.data.length},o.prototype.getBitsLength=function(){return o.getBitsLength(this.data.length)},o.prototype.write=function(t){var e,r,n;for(e=0;e+3<=this.data.length;e+=3)r=this.data.substr(e,3),n=parseInt(r,10),t.put(n,10);var o=this.data.length-e;o>0&&(r=this.data.substr(e),n=parseInt(r,10),t.put(n,3*o+1))},e.exports=o},{"./mode":14}],16:[function(t,e,r){var n=t("../utils/buffer"),o=t("./galois-field");r.mul=function(t,e){for(var r=n.alloc(t.length+e.length-1),i=0;i<t.length;i++)for(var a=0;a<e.length;a++)r[i+a]^=o.mul(t[i],e[a]);return r},r.mod=function(t,e){var r=n.from(t);while(r.length-e.length>=0){for(var i=r[0],a=0;a<e.length;a++)r[a]^=o.mul(e[a],i);var s=0;while(s<r.length&&0===r[s])s++;r=r.slice(s)}return r},r.generateECPolynomial=function(t){for(var e=n.from([1]),i=0;i<t;i++)e=r.mul(e,[1,o.exp(i)]);return e}},{"../utils/buffer":28,"./galois-field":11}],17:[function(t,e,r){var n=t("../utils/buffer"),o=t("./utils"),i=t("./error-correction-level"),a=t("./bit-buffer"),s=t("./bit-matrix"),u=t("./alignment-pattern"),f=t("./finder-pattern"),l=t("./mask-pattern"),c=t("./error-correction-code"),h=t("./reed-solomon-encoder"),p=t("./version"),d=t("./format-info"),g=t("./mode"),m=t("./segments"),y=t("isarray");function v(t,e){for(var r=t.size,n=f.getPositions(e),o=0;o<n.length;o++)for(var i=n[o][0],a=n[o][1],s=-1;s<=7;s++)if(!(i+s<=-1||r<=i+s))for(var u=-1;u<=7;u++)a+u<=-1||r<=a+u||(s>=0&&s<=6&&(0===u||6===u)||u>=0&&u<=6&&(0===s||6===s)||s>=2&&s<=4&&u>=2&&u<=4?t.set(i+s,a+u,!0,!0):t.set(i+s,a+u,!1,!0))}function b(t){for(var e=t.size,r=8;r<e-8;r++){var n=r%2===0;t.set(r,6,n,!0),t.set(6,r,n,!0)}}function w(t,e){for(var r=u.getPositions(e),n=0;n<r.length;n++)for(var o=r[n][0],i=r[n][1],a=-2;a<=2;a++)for(var s=-2;s<=2;s++)-2===a||2===a||-2===s||2===s||0===a&&0===s?t.set(o+a,i+s,!0,!0):t.set(o+a,i+s,!1,!0)}function E(t,e){for(var r,n,o,i=t.size,a=p.getEncodedBits(e),s=0;s<18;s++)r=Math.floor(s/3),n=s%3+i-8-3,o=1===(a>>s&1),t.set(r,n,o,!0),t.set(n,r,o,!0)}function A(t,e,r){var n,o,i=t.size,a=d.getEncodedBits(e,r);for(n=0;n<15;n++)o=1===(a>>n&1),n<6?t.set(n,8,o,!0):n<8?t.set(n+1,8,o,!0):t.set(i-15+n,8,o,!0),n<8?t.set(8,i-n-1,o,!0):n<9?t.set(8,15-n-1+1,o,!0):t.set(8,15-n-1,o,!0);t.set(i-8,8,1,!0)}function S(t,e){for(var r=t.size,n=-1,o=r-1,i=7,a=0,s=r-1;s>0;s-=2){6===s&&s--;while(1){for(var u=0;u<2;u++)if(!t.isReserved(o,s-u)){var f=!1;a<e.length&&(f=1===(e[a]>>>i&1)),t.set(o,s-u,f),i--,-1===i&&(a++,i=7)}if(o+=n,o<0||r<=o){o-=n,n=-n;break}}}}function C(t,e,r){var n=new a;r.forEach((function(e){n.put(e.mode.bit,4),n.put(e.getLength(),g.getCharCountIndicator(e.mode,t)),e.write(n)}));var i=o.getSymbolTotalCodewords(t),s=c.getTotalCodewordsCount(t,e),u=8*(i-s);n.getLengthInBits()+4<=u&&n.put(0,4);while(n.getLengthInBits()%8!==0)n.putBit(0);for(var f=(u-n.getLengthInBits())/8,l=0;l<f;l++)n.put(l%2?17:236,8);return B(n,t,e)}function B(t,e,r){for(var i=o.getSymbolTotalCodewords(e),a=c.getTotalCodewordsCount(e,r),s=i-a,u=c.getBlocksCount(e,r),f=i%u,l=u-f,p=Math.floor(i/u),d=Math.floor(s/u),g=d+1,m=p-d,y=new h(m),v=0,b=new Array(u),w=new Array(u),E=0,A=n.from(t.buffer),S=0;S<u;S++){var C=S<l?d:g;b[S]=A.slice(v,v+C),w[S]=y.encode(b[S]),v+=C,E=Math.max(E,C)}var B,T,k=n.alloc(i),R=0;for(B=0;B<E;B++)for(T=0;T<u;T++)B<b[T].length&&(k[R++]=b[T][B]);for(B=0;B<m;B++)for(T=0;T<u;T++)k[R++]=w[T][B];return k}function T(t,e,r,n){var i;if(y(t))i=m.fromArray(t);else{if("string"!==typeof t)throw new Error("Invalid data");var a=e;if(!a){var u=m.rawSplit(t);a=p.getBestVersionForData(u,r)}i=m.fromString(t,a||40)}var f=p.getBestVersionForData(i,r);if(!f)throw new Error("The amount of data is too big to be stored in a QR Code");if(e){if(e<f)throw new Error("\nThe chosen QR Code version cannot contain this amount of data.\nMinimum version required to store current data is: "+f+".\n")}else e=f;var c=C(e,r,i),h=o.getSymbolSize(e),d=new s(h);return v(d,e),b(d),w(d,e),A(d,r,0),e>=7&&E(d,e),S(d,c),isNaN(n)&&(n=l.getBestMask(d,A.bind(null,d,r))),l.applyMask(n,d),A(d,r,n),{modules:d,version:e,errorCorrectionLevel:r,maskPattern:n,segments:i}}r.create=function(t,e){if("undefined"===typeof t||""===t)throw new Error("No input text");var r,n,a=i.M;return"undefined"!==typeof e&&(a=i.from(e.errorCorrectionLevel,i.M),r=p.from(e.version),n=l.from(e.maskPattern),e.toSJISFunc&&o.setToSJISFunction(e.toSJISFunc)),T(t,r,a,n)}},{"../utils/buffer":28,"./alignment-pattern":2,"./bit-buffer":4,"./bit-matrix":5,"./error-correction-code":7,"./error-correction-level":8,"./finder-pattern":9,"./format-info":10,"./mask-pattern":13,"./mode":14,"./reed-solomon-encoder":18,"./segments":20,"./utils":21,"./version":23,isarray:33}],18:[function(t,e,r){var n=t("../utils/buffer"),o=t("./polynomial"),i=t("buffer").Buffer;function a(t){this.genPoly=void 0,this.degree=t,this.degree&&this.initialize(this.degree)}a.prototype.initialize=function(t){this.degree=t,this.genPoly=o.generateECPolynomial(this.degree)},a.prototype.encode=function(t){if(!this.genPoly)throw new Error("Encoder not initialized");var e=n.alloc(this.degree),r=i.concat([t,e],t.length+this.degree),a=o.mod(r,this.genPoly),s=this.degree-a.length;if(s>0){var u=n.alloc(this.degree);return a.copy(u,s),u}return a},e.exports=a},{"../utils/buffer":28,"./polynomial":16,buffer:30}],19:[function(t,e,r){var n="[0-9]+",o="[A-Z $%*+\\-./:]+",i="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";i=i.replace(/u/g,"\\u");var a="(?:(?![A-Z0-9 $%*+\\-./:]|"+i+")(?:.|[\r\n]))+";r.KANJI=new RegExp(i,"g"),r.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g"),r.BYTE=new RegExp(a,"g"),r.NUMERIC=new RegExp(n,"g"),r.ALPHANUMERIC=new RegExp(o,"g");var s=new RegExp("^"+i+"$"),u=new RegExp("^"+n+"$"),f=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");r.testKanji=function(t){return s.test(t)},r.testNumeric=function(t){return u.test(t)},r.testAlphanumeric=function(t){return f.test(t)}},{}],20:[function(t,e,r){var n=t("./mode"),o=t("./numeric-data"),i=t("./alphanumeric-data"),a=t("./byte-data"),s=t("./kanji-data"),u=t("./regex"),f=t("./utils"),l=t("dijkstrajs");function c(t){return unescape(encodeURIComponent(t)).length}function h(t,e,r){var n,o=[];while(null!==(n=t.exec(r)))o.push({data:n[0],index:n.index,mode:e,length:n[0].length});return o}function p(t){var e,r,o=h(u.NUMERIC,n.NUMERIC,t),i=h(u.ALPHANUMERIC,n.ALPHANUMERIC,t);f.isKanjiModeEnabled()?(e=h(u.BYTE,n.BYTE,t),r=h(u.KANJI,n.KANJI,t)):(e=h(u.BYTE_KANJI,n.BYTE,t),r=[]);var a=o.concat(i,e,r);return a.sort((function(t,e){return t.index-e.index})).map((function(t){return{data:t.data,mode:t.mode,length:t.length}}))}function d(t,e){switch(e){case n.NUMERIC:return o.getBitsLength(t);case n.ALPHANUMERIC:return i.getBitsLength(t);case n.KANJI:return s.getBitsLength(t);case n.BYTE:return a.getBitsLength(t)}}function g(t){return t.reduce((function(t,e){var r=t.length-1>=0?t[t.length-1]:null;return r&&r.mode===e.mode?(t[t.length-1].data+=e.data,t):(t.push(e),t)}),[])}function m(t){for(var e=[],r=0;r<t.length;r++){var o=t[r];switch(o.mode){case n.NUMERIC:e.push([o,{data:o.data,mode:n.ALPHANUMERIC,length:o.length},{data:o.data,mode:n.BYTE,length:o.length}]);break;case n.ALPHANUMERIC:e.push([o,{data:o.data,mode:n.BYTE,length:o.length}]);break;case n.KANJI:e.push([o,{data:o.data,mode:n.BYTE,length:c(o.data)}]);break;case n.BYTE:e.push([{data:o.data,mode:n.BYTE,length:c(o.data)}])}}return e}function y(t,e){for(var r={},o={start:{}},i=["start"],a=0;a<t.length;a++){for(var s=t[a],u=[],f=0;f<s.length;f++){var l=s[f],c=""+a+f;u.push(c),r[c]={node:l,lastCount:0},o[c]={};for(var h=0;h<i.length;h++){var p=i[h];r[p]&&r[p].node.mode===l.mode?(o[p][c]=d(r[p].lastCount+l.length,l.mode)-d(r[p].lastCount,l.mode),r[p].lastCount+=l.length):(r[p]&&(r[p].lastCount=l.length),o[p][c]=d(l.length,l.mode)+4+n.getCharCountIndicator(l.mode,e))}}i=u}for(h=0;h<i.length;h++)o[i[h]]["end"]=0;return{map:o,table:r}}function v(t,e){var r,u=n.getBestModeForData(t);if(r=n.from(e,u),r!==n.BYTE&&r.bit<u.bit)throw new Error('"'+t+'" cannot be encoded with mode '+n.toString(r)+".\n Suggested mode is: "+n.toString(u));switch(r!==n.KANJI||f.isKanjiModeEnabled()||(r=n.BYTE),r){case n.NUMERIC:return new o(t);case n.ALPHANUMERIC:return new i(t);case n.KANJI:return new s(t);case n.BYTE:return new a(t)}}r.fromArray=function(t){return t.reduce((function(t,e){return"string"===typeof e?t.push(v(e,null)):e.data&&t.push(v(e.data,e.mode)),t}),[])},r.fromString=function(t,e){for(var n=p(t,f.isKanjiModeEnabled()),o=m(n),i=y(o,e),a=l.find_path(i.map,"start","end"),s=[],u=1;u<a.length-1;u++)s.push(i.table[a[u]].node);return r.fromArray(g(s))},r.rawSplit=function(t){return r.fromArray(p(t,f.isKanjiModeEnabled()))}},{"./alphanumeric-data":3,"./byte-data":6,"./kanji-data":12,"./mode":14,"./numeric-data":15,"./regex":19,"./utils":21,dijkstrajs:31}],21:[function(t,e,r){var n,o=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];r.getSymbolSize=function(t){if(!t)throw new Error('"version" cannot be null or undefined');if(t<1||t>40)throw new Error('"version" should be in range from 1 to 40');return 4*t+17},r.getSymbolTotalCodewords=function(t){return o[t]},r.getBCHDigit=function(t){var e=0;while(0!==t)e++,t>>>=1;return e},r.setToSJISFunction=function(t){if("function"!==typeof t)throw new Error('"toSJISFunc" is not a valid function.');n=t},r.isKanjiModeEnabled=function(){return"undefined"!==typeof n},r.toSJIS=function(t){return n(t)}},{}],22:[function(t,e,r){r.isValid=function(t){return!isNaN(t)&&t>=1&&t<=40}},{}],23:[function(t,e,r){var n=t("./utils"),o=t("./error-correction-code"),i=t("./error-correction-level"),a=t("./mode"),s=t("./version-check"),u=t("isarray"),f=7973,l=n.getBCHDigit(f);function c(t,e,n){for(var o=1;o<=40;o++)if(e<=r.getCapacity(o,n,t))return o}function h(t,e){return a.getCharCountIndicator(t,e)+4}function p(t,e){var r=0;return t.forEach((function(t){var n=h(t.mode,e);r+=n+t.getBitsLength()})),r}function d(t,e){for(var n=1;n<=40;n++){var o=p(t,n);if(o<=r.getCapacity(n,e,a.MIXED))return n}}r.from=function(t,e){return s.isValid(t)?parseInt(t,10):e},r.getCapacity=function(t,e,r){if(!s.isValid(t))throw new Error("Invalid QR Code version");"undefined"===typeof r&&(r=a.BYTE);var i=n.getSymbolTotalCodewords(t),u=o.getTotalCodewordsCount(t,e),f=8*(i-u);if(r===a.MIXED)return f;var l=f-h(r,t);switch(r){case a.NUMERIC:return Math.floor(l/10*3);case a.ALPHANUMERIC:return Math.floor(l/11*2);case a.KANJI:return Math.floor(l/13);case a.BYTE:default:return Math.floor(l/8)}},r.getBestVersionForData=function(t,e){var r,n=i.from(e,i.M);if(u(t)){if(t.length>1)return d(t,n);if(0===t.length)return 1;r=t[0]}else r=t;return c(r.mode,r.getLength(),n)},r.getEncodedBits=function(t){if(!s.isValid(t)||t<7)throw new Error("Invalid QR Code version");var e=t<<12;while(n.getBCHDigit(e)-l>=0)e^=f<<n.getBCHDigit(e)-l;return t<<12|e}},{"./error-correction-code":7,"./error-correction-level":8,"./mode":14,"./utils":21,"./version-check":22,isarray:33}],24:[function(t,e,r){var n=t("./can-promise"),o=t("./core/qrcode"),i=t("./renderer/canvas"),a=t("./renderer/svg-tag.js");function s(t,e,r,i,a){var s=[].slice.call(arguments,1),u=s.length,f="function"===typeof s[u-1];if(!f&&!n())throw new Error("Callback required as last argument");if(!f){if(u<1)throw new Error("Too few arguments provided");return 1===u?(r=e,e=i=void 0):2!==u||e.getContext||(i=r,r=e,e=void 0),new Promise((function(n,a){try{var s=o.create(r,i);n(t(s,e,i))}catch(u){a(u)}}))}if(u<2)throw new Error("Too few arguments provided");2===u?(a=r,r=e,e=i=void 0):3===u&&(e.getContext&&"undefined"===typeof a?(a=i,i=void 0):(a=i,i=r,r=e,e=void 0));try{var l=o.create(r,i);a(null,t(l,e,i))}catch(c){a(c)}}r.create=o.create,r.toCanvas=s.bind(null,i.render),r.toDataURL=s.bind(null,i.renderToDataURL),r.toString=s.bind(null,(function(t,e,r){return a.render(t,r)}))},{"./can-promise":1,"./core/qrcode":17,"./renderer/canvas":25,"./renderer/svg-tag.js":26}],25:[function(t,e,r){var n=t("./utils");function o(t,e,r){t.clearRect(0,0,e.width,e.height),e.style||(e.style={}),e.height=r,e.width=r,e.style.height=r+"px",e.style.width=r+"px"}function i(){try{return document.createElement("canvas")}catch(t){throw new Error("You need to specify a canvas element")}}r.render=function(t,e,r){var a=r,s=e;"undefined"!==typeof a||e&&e.getContext||(a=e,e=void 0),e||(s=i()),a=n.getOptions(a);var u=n.getImageWidth(t.modules.size,a),f=s.getContext("2d"),l=f.createImageData(u,u);return n.qrToImageData(l.data,t,a),o(f,s,u),f.putImageData(l,0,0),s},r.renderToDataURL=function(t,e,n){var o=n;"undefined"!==typeof o||e&&e.getContext||(o=e,e=void 0),o||(o={});var i=r.render(t,e,o),a=o.type||"image/png",s=o.rendererOpts||{};return i.toDataURL(a,s.quality)}},{"./utils":27}],26:[function(t,e,r){var n=t("./utils");function o(t,e){var r=t.a/255,n=e+'="'+t.hex+'"';return r<1?n+" "+e+'-opacity="'+r.toFixed(2).slice(1)+'"':n}function i(t,e,r){var n=t+e;return"undefined"!==typeof r&&(n+=" "+r),n}function a(t,e,r){for(var n="",o=0,a=!1,s=0,u=0;u<t.length;u++){var f=Math.floor(u%e),l=Math.floor(u/e);f||a||(a=!0),t[u]?(s++,u>0&&f>0&&t[u-1]||(n+=a?i("M",f+r,.5+l+r):i("m",o,0),o=0,a=!1),f+1<e&&t[u+1]||(n+=i("h",s),s=0)):o++}return n}r.render=function(t,e,r){var i=n.getOptions(e),s=t.modules.size,u=t.modules.data,f=s+2*i.margin,l=i.color.light.a?"<path "+o(i.color.light,"fill")+' d="M0 0h'+f+"v"+f+'H0z"/>':"",c="<path "+o(i.color.dark,"stroke")+' d="'+a(u,s,i.margin)+'"/>',h='viewBox="0 0 '+f+" "+f+'"',p=i.width?'width="'+i.width+'" height="'+i.width+'" ':"",d='<svg xmlns="http://www.w3.org/2000/svg" '+p+h+' shape-rendering="crispEdges">'+l+c+"</svg>\n";return"function"===typeof r&&r(null,d),d}},{"./utils":27}],27:[function(t,e,r){function n(t){if("number"===typeof t&&(t=t.toString()),"string"!==typeof t)throw new Error("Color should be defined as hex string");var e=t.slice().replace("#","").split("");if(e.length<3||5===e.length||e.length>8)throw new Error("Invalid hex color: "+t);3!==e.length&&4!==e.length||(e=Array.prototype.concat.apply([],e.map((function(t){return[t,t]})))),6===e.length&&e.push("F","F");var r=parseInt(e.join(""),16);return{r:r>>24&255,g:r>>16&255,b:r>>8&255,a:255&r,hex:"#"+e.slice(0,6).join("")}}r.getOptions=function(t){t||(t={}),t.color||(t.color={});var e="undefined"===typeof t.margin||null===t.margin||t.margin<0?4:t.margin,r=t.width&&t.width>=21?t.width:void 0,o=t.scale||4;return{width:r,scale:r?4:o,margin:e,color:{dark:n(t.color.dark||"#000000ff"),light:n(t.color.light||"#ffffffff")},type:t.type,rendererOpts:t.rendererOpts||{}}},r.getScale=function(t,e){return e.width&&e.width>=t+2*e.margin?e.width/(t+2*e.margin):e.scale},r.getImageWidth=function(t,e){var n=r.getScale(t,e);return Math.floor((t+2*e.margin)*n)},r.qrToImageData=function(t,e,n){for(var o=e.modules.size,i=e.modules.data,a=r.getScale(o,n),s=Math.floor((o+2*n.margin)*a),u=n.margin*a,f=[n.color.light,n.color.dark],l=0;l<s;l++)for(var c=0;c<s;c++){var h=4*(l*s+c),p=n.color.light;if(l>=u&&c>=u&&l<s-u&&c<s-u){var d=Math.floor((l-u)/a),g=Math.floor((c-u)/a);p=f[i[d*o+g]?1:0]}t[h++]=p.r,t[h++]=p.g,t[h++]=p.b,t[h]=p.a}}},{}],28:[function(t,e,r){var n=t("isarray");function o(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===t.foo()}catch(e){return!1}}a.TYPED_ARRAY_SUPPORT=o();var i=a.TYPED_ARRAY_SUPPORT?2147483647:1073741823;function a(t,e,r){return a.TYPED_ARRAY_SUPPORT||this instanceof a?"number"===typeof t?l(this,t):b(this,t,e,r):new a(t,e,r)}function s(t){if(t>=i)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+i.toString(16)+" bytes");return 0|t}function u(t){return t!==t}function f(t,e){var r;return a.TYPED_ARRAY_SUPPORT?(r=new Uint8Array(e),r.__proto__=a.prototype):(r=t,null===r&&(r=new a(e)),r.length=e),r}function l(t,e){var r=f(t,e<0?0:0|s(e));if(!a.TYPED_ARRAY_SUPPORT)for(var n=0;n<e;++n)r[n]=0;return r}function c(t,e){var r=0|m(e),n=f(t,r),o=n.write(e);return o!==r&&(n=n.slice(0,o)),n}function h(t,e){for(var r=e.length<0?0:0|s(e.length),n=f(t,r),o=0;o<r;o+=1)n[o]=255&e[o];return n}function p(t,e,r,n){if(r<0||e.byteLength<r)throw new RangeError("'offset' is out of bounds");if(e.byteLength<r+(n||0))throw new RangeError("'length' is out of bounds");var o;return o=void 0===r&&void 0===n?new Uint8Array(e):void 0===n?new Uint8Array(e,r):new Uint8Array(e,r,n),a.TYPED_ARRAY_SUPPORT?o.__proto__=a.prototype:o=h(t,o),o}function d(t,e){if(a.isBuffer(e)){var r=0|s(e.length),n=f(t,r);return 0===n.length||e.copy(n,0,0,r),n}if(e){if("undefined"!==typeof ArrayBuffer&&e.buffer instanceof ArrayBuffer||"length"in e)return"number"!==typeof e.length||u(e.length)?f(t,0):h(t,e);if("Buffer"===e.type&&Array.isArray(e.data))return h(t,e.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function g(t,e){var r;e=e||1/0;for(var n=t.length,o=null,i=[],a=0;a<n;++a){if(r=t.charCodeAt(a),r>55295&&r<57344){if(!o){if(r>56319){(e-=3)>-1&&i.push(239,191,189);continue}if(a+1===n){(e-=3)>-1&&i.push(239,191,189);continue}o=r;continue}if(r<56320){(e-=3)>-1&&i.push(239,191,189),o=r;continue}r=65536+(o-55296<<10|r-56320)}else o&&(e-=3)>-1&&i.push(239,191,189);if(o=null,r<128){if((e-=1)<0)break;i.push(r)}else if(r<2048){if((e-=2)<0)break;i.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;i.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;i.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return i}function m(t){if(a.isBuffer(t))return t.length;if("undefined"!==typeof ArrayBuffer&&"function"===typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;"string"!==typeof t&&(t=""+t);var e=t.length;return 0===e?0:g(t).length}function y(t,e,r,n){for(var o=0;o<n;++o){if(o+r>=e.length||o>=t.length)break;e[o+r]=t[o]}return o}function v(t,e,r,n){return y(g(e,t.length-r),t,r,n)}function b(t,e,r,n){if("number"===typeof e)throw new TypeError('"value" argument must not be a number');return"undefined"!==typeof ArrayBuffer&&e instanceof ArrayBuffer?p(t,e,r,n):"string"===typeof e?c(t,e):d(t,e)}a.TYPED_ARRAY_SUPPORT&&(a.prototype.__proto__=Uint8Array.prototype,a.__proto__=Uint8Array,"undefined"!==typeof Symbol&&Symbol.species&&a[Symbol.species]===a&&Object.defineProperty(a,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1})),a.prototype.write=function(t,e,r){void 0===e||void 0===r&&"string"===typeof e?(r=this.length,e=0):isFinite(e)&&(e|=0,isFinite(r)?r|=0:r=void 0);var n=this.length-e;if((void 0===r||r>n)&&(r=n),t.length>0&&(r<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");return v(this,t,e,r)},a.prototype.slice=function(t,e){var r,n=this.length;if(t=~~t,e=void 0===e?n:~~e,t<0?(t+=n,t<0&&(t=0)):t>n&&(t=n),e<0?(e+=n,e<0&&(e=0)):e>n&&(e=n),e<t&&(e=t),a.TYPED_ARRAY_SUPPORT)r=this.subarray(t,e),r.__proto__=a.prototype;else{var o=e-t;r=new a(o,void 0);for(var i=0;i<o;++i)r[i]=this[i+t]}return r},a.prototype.copy=function(t,e,r,n){if(r||(r=0),n||0===n||(n=this.length),e>=t.length&&(e=t.length),e||(e=0),n>0&&n<r&&(n=r),n===r)return 0;if(0===t.length||0===this.length)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-e<n-r&&(n=t.length-e+r);var o,i=n-r;if(this===t&&r<e&&e<n)for(o=i-1;o>=0;--o)t[o+e]=this[o+r];else if(i<1e3||!a.TYPED_ARRAY_SUPPORT)for(o=0;o<i;++o)t[o+e]=this[o+r];else Uint8Array.prototype.set.call(t,this.subarray(r,r+i),e);return i},a.prototype.fill=function(t,e,r){if("string"===typeof t){if("string"===typeof e?(e=0,r=this.length):"string"===typeof r&&(r=this.length),1===t.length){var n=t.charCodeAt(0);n<256&&(t=n)}}else"number"===typeof t&&(t&=255);if(e<0||this.length<e||this.length<r)throw new RangeError("Out of range index");if(r<=e)return this;var o;if(e>>>=0,r=void 0===r?this.length:r>>>0,t||(t=0),"number"===typeof t)for(o=e;o<r;++o)this[o]=t;else{var i=a.isBuffer(t)?t:new a(t),s=i.length;for(o=0;o<r-e;++o)this[o+e]=i[o%s]}return this},a.concat=function(t,e){if(!n(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return f(null,0);var r;if(void 0===e)for(e=0,r=0;r<t.length;++r)e+=t[r].length;var o=l(null,e),i=0;for(r=0;r<t.length;++r){var s=t[r];if(!a.isBuffer(s))throw new TypeError('"list" argument must be an Array of Buffers');s.copy(o,i),i+=s.length}return o},a.byteLength=m,a.prototype._isBuffer=!0,a.isBuffer=function(t){return!(null==t||!t._isBuffer)},e.exports.alloc=function(t){var e=new a(t);return e.fill(0),e},e.exports.from=function(t){return new a(t)}},{isarray:33}],29:[function(t,e,r){r.byteLength=l,r.toByteArray=h,r.fromByteArray=g;for(var n=[],o=[],i="undefined"!==typeof Uint8Array?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,u=a.length;s<u;++s)n[s]=a[s],o[a.charCodeAt(s)]=s;function f(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=t.indexOf("=");-1===r&&(r=e);var n=r===e?0:4-r%4;return[r,n]}function l(t){var e=f(t),r=e[0],n=e[1];return 3*(r+n)/4-n}function c(t,e,r){return 3*(e+r)/4-r}function h(t){var e,r,n=f(t),a=n[0],s=n[1],u=new i(c(t,a,s)),l=0,h=s>0?a-4:a;for(r=0;r<h;r+=4)e=o[t.charCodeAt(r)]<<18|o[t.charCodeAt(r+1)]<<12|o[t.charCodeAt(r+2)]<<6|o[t.charCodeAt(r+3)],u[l++]=e>>16&255,u[l++]=e>>8&255,u[l++]=255&e;return 2===s&&(e=o[t.charCodeAt(r)]<<2|o[t.charCodeAt(r+1)]>>4,u[l++]=255&e),1===s&&(e=o[t.charCodeAt(r)]<<10|o[t.charCodeAt(r+1)]<<4|o[t.charCodeAt(r+2)]>>2,u[l++]=e>>8&255,u[l++]=255&e),u}function p(t){return n[t>>18&63]+n[t>>12&63]+n[t>>6&63]+n[63&t]}function d(t,e,r){for(var n,o=[],i=e;i<r;i+=3)n=(t[i]<<16&16711680)+(t[i+1]<<8&65280)+(255&t[i+2]),o.push(p(n));return o.join("")}function g(t){for(var e,r=t.length,o=r%3,i=[],a=16383,s=0,u=r-o;s<u;s+=a)i.push(d(t,s,s+a>u?u:s+a));return 1===o?(e=t[r-1],i.push(n[e>>2]+n[e<<4&63]+"==")):2===o&&(e=(t[r-2]<<8)+t[r-1],i.push(n[e>>10]+n[e>>4&63]+n[e<<2&63]+"=")),i.join("")}o["-".charCodeAt(0)]=62,o["_".charCodeAt(0)]=63},{}],30:[function(t,e,r){var n=t("base64-js"),o=t("ieee754"),i="function"===typeof Symbol&&"function"===typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;r.Buffer=f,r.SlowBuffer=b,r.INSPECT_MAX_BYTES=50;var a=2147483647;function s(){try{var t=new Uint8Array(1),e={foo:function(){return 42}};return Object.setPrototypeOf(e,Uint8Array.prototype),Object.setPrototypeOf(t,e),42===t.foo()}catch(r){return!1}}function u(t){if(t>a)throw new RangeError('The value "'+t+'" is invalid for option "size"');var e=new Uint8Array(t);return Object.setPrototypeOf(e,f.prototype),e}function f(t,e,r){if("number"===typeof t){if("string"===typeof e)throw new TypeError('The "string" argument must be of type string. Received type number');return p(t)}return l(t,e,r)}function l(t,e,r){if("string"===typeof t)return d(t,e);if(ArrayBuffer.isView(t))return g(t);if(null==t)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t);if(Z(t,ArrayBuffer)||t&&Z(t.buffer,ArrayBuffer))return m(t,e,r);if("number"===typeof t)throw new TypeError('The "value" argument must not be of type number. Received type number');var n=t.valueOf&&t.valueOf();if(null!=n&&n!==t)return f.from(n,e,r);var o=y(t);if(o)return o;if("undefined"!==typeof Symbol&&null!=Symbol.toPrimitive&&"function"===typeof t[Symbol.toPrimitive])return f.from(t[Symbol.toPrimitive]("string"),e,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t)}function c(t){if("number"!==typeof t)throw new TypeError('"size" argument must be of type number');if(t<0)throw new RangeError('The value "'+t+'" is invalid for option "size"')}function h(t,e,r){return c(t),t<=0?u(t):void 0!==e?"string"===typeof r?u(t).fill(e,r):u(t).fill(e):u(t)}function p(t){return c(t),u(t<0?0:0|v(t))}function d(t,e){if("string"===typeof e&&""!==e||(e="utf8"),!f.isEncoding(e))throw new TypeError("Unknown encoding: "+e);var r=0|w(t,e),n=u(r),o=n.write(t,e);return o!==r&&(n=n.slice(0,o)),n}function g(t){for(var e=t.length<0?0:0|v(t.length),r=u(e),n=0;n<e;n+=1)r[n]=255&t[n];return r}function m(t,e,r){if(e<0||t.byteLength<e)throw new RangeError('"offset" is outside of buffer bounds');if(t.byteLength<e+(r||0))throw new RangeError('"length" is outside of buffer bounds');var n;return n=void 0===e&&void 0===r?new Uint8Array(t):void 0===r?new Uint8Array(t,e):new Uint8Array(t,e,r),Object.setPrototypeOf(n,f.prototype),n}function y(t){if(f.isBuffer(t)){var e=0|v(t.length),r=u(e);return 0===r.length||t.copy(r,0,0,e),r}return void 0!==t.length?"number"!==typeof t.length||W(t.length)?u(0):g(t):"Buffer"===t.type&&Array.isArray(t.data)?g(t.data):void 0}function v(t){if(t>=a)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a.toString(16)+" bytes");return 0|t}function b(t){return+t!=t&&(t=0),f.alloc(+t)}function w(t,e){if(f.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||Z(t,ArrayBuffer))return t.byteLength;if("string"!==typeof t)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof t);var r=t.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;for(var o=!1;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return J(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return Q(t).length;default:if(o)return n?-1:J(t).length;e=(""+e).toLowerCase(),o=!0}}function E(t,e,r){var n=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if(r>>>=0,e>>>=0,r<=e)return"";t||(t="utf8");while(1)switch(t){case"hex":return O(this,e,r);case"utf8":case"utf-8":return _(this,e,r);case"ascii":return M(this,e,r);case"latin1":case"binary":return N(this,e,r);case"base64":return I(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return $(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function A(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function S(t,e,r,n,o){if(0===t.length)return-1;if("string"===typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,W(r)&&(r=o?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(o)return-1;r=t.length-1}else if(r<0){if(!o)return-1;r=0}if("string"===typeof e&&(e=f.from(e,n)),f.isBuffer(e))return 0===e.length?-1:C(t,e,r,n,o);if("number"===typeof e)return e&=255,"function"===typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):C(t,[e],r,n,o);throw new TypeError("val must be string, number or Buffer")}function C(t,e,r,n,o){var i,a=1,s=t.length,u=e.length;if(void 0!==n&&(n=String(n).toLowerCase(),"ucs2"===n||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||e.length<2)return-1;a=2,s/=2,u/=2,r/=2}function f(t,e){return 1===a?t[e]:t.readUInt16BE(e*a)}if(o){var l=-1;for(i=r;i<s;i++)if(f(t,i)===f(e,-1===l?0:i-l)){if(-1===l&&(l=i),i-l+1===u)return l*a}else-1!==l&&(i-=i-l),l=-1}else for(r+u>s&&(r=s-u),i=r;i>=0;i--){for(var c=!0,h=0;h<u;h++)if(f(t,i+h)!==f(e,h)){c=!1;break}if(c)return i}return-1}function B(t,e,r,n){r=Number(r)||0;var o=t.length-r;n?(n=Number(n),n>o&&(n=o)):n=o;var i=e.length;n>i/2&&(n=i/2);for(var a=0;a<n;++a){var s=parseInt(e.substr(2*a,2),16);if(W(s))return a;t[r+a]=s}return a}function T(t,e,r,n){return X(J(e,t.length-r),t,r,n)}function k(t,e,r,n){return X(K(e),t,r,n)}function R(t,e,r,n){return k(t,e,r,n)}function x(t,e,r,n){return X(Q(e),t,r,n)}function P(t,e,r,n){return X(q(e,t.length-r),t,r,n)}function I(t,e,r){return 0===e&&r===t.length?n.fromByteArray(t):n.fromByteArray(t.slice(e,r))}function _(t,e,r){r=Math.min(t.length,r);var n=[],o=e;while(o<r){var i,a,s,u,f=t[o],l=null,c=f>239?4:f>223?3:f>191?2:1;if(o+c<=r)switch(c){case 1:f<128&&(l=f);break;case 2:i=t[o+1],128===(192&i)&&(u=(31&f)<<6|63&i,u>127&&(l=u));break;case 3:i=t[o+1],a=t[o+2],128===(192&i)&&128===(192&a)&&(u=(15&f)<<12|(63&i)<<6|63&a,u>2047&&(u<55296||u>57343)&&(l=u));break;case 4:i=t[o+1],a=t[o+2],s=t[o+3],128===(192&i)&&128===(192&a)&&128===(192&s)&&(u=(15&f)<<18|(63&i)<<12|(63&a)<<6|63&s,u>65535&&u<1114112&&(l=u))}null===l?(l=65533,c=1):l>65535&&(l-=65536,n.push(l>>>10&1023|55296),l=56320|1023&l),n.push(l),o+=c}return U(n)}r.kMaxLength=a,f.TYPED_ARRAY_SUPPORT=s(),f.TYPED_ARRAY_SUPPORT||"undefined"===typeof console||"function"!==typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(f.prototype,"parent",{enumerable:!0,get:function(){if(f.isBuffer(this))return this.buffer}}),Object.defineProperty(f.prototype,"offset",{enumerable:!0,get:function(){if(f.isBuffer(this))return this.byteOffset}}),"undefined"!==typeof Symbol&&null!=Symbol.species&&f[Symbol.species]===f&&Object.defineProperty(f,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1}),f.poolSize=8192,f.from=function(t,e,r){return l(t,e,r)},Object.setPrototypeOf(f.prototype,Uint8Array.prototype),Object.setPrototypeOf(f,Uint8Array),f.alloc=function(t,e,r){return h(t,e,r)},f.allocUnsafe=function(t){return p(t)},f.allocUnsafeSlow=function(t){return p(t)},f.isBuffer=function(t){return null!=t&&!0===t._isBuffer&&t!==f.prototype},f.compare=function(t,e){if(Z(t,Uint8Array)&&(t=f.from(t,t.offset,t.byteLength)),Z(e,Uint8Array)&&(e=f.from(e,e.offset,e.byteLength)),!f.isBuffer(t)||!f.isBuffer(e))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(t===e)return 0;for(var r=t.length,n=e.length,o=0,i=Math.min(r,n);o<i;++o)if(t[o]!==e[o]){r=t[o],n=e[o];break}return r<n?-1:n<r?1:0},f.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},f.concat=function(t,e){if(!Array.isArray(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return f.alloc(0);var r;if(void 0===e)for(e=0,r=0;r<t.length;++r)e+=t[r].length;var n=f.allocUnsafe(e),o=0;for(r=0;r<t.length;++r){var i=t[r];if(Z(i,Uint8Array)&&(i=f.from(i)),!f.isBuffer(i))throw new TypeError('"list" argument must be an Array of Buffers');i.copy(n,o),o+=i.length}return n},f.byteLength=w,f.prototype._isBuffer=!0,f.prototype.swap16=function(){var t=this.length;if(t%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;e<t;e+=2)A(this,e,e+1);return this},f.prototype.swap32=function(){var t=this.length;if(t%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var e=0;e<t;e+=4)A(this,e,e+3),A(this,e+1,e+2);return this},f.prototype.swap64=function(){var t=this.length;if(t%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var e=0;e<t;e+=8)A(this,e,e+7),A(this,e+1,e+6),A(this,e+2,e+5),A(this,e+3,e+4);return this},f.prototype.toString=function(){var t=this.length;return 0===t?"":0===arguments.length?_(this,0,t):E.apply(this,arguments)},f.prototype.toLocaleString=f.prototype.toString,f.prototype.equals=function(t){if(!f.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===f.compare(this,t)},f.prototype.inspect=function(){var t="",e=r.INSPECT_MAX_BYTES;return t=this.toString("hex",0,e).replace(/(.{2})/g,"$1 ").trim(),this.length>e&&(t+=" ... "),"<Buffer "+t+">"},i&&(f.prototype[i]=f.prototype.inspect),f.prototype.compare=function(t,e,r,n,o){if(Z(t,Uint8Array)&&(t=f.from(t,t.offset,t.byteLength)),!f.isBuffer(t))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof t);if(void 0===e&&(e=0),void 0===r&&(r=t?t.length:0),void 0===n&&(n=0),void 0===o&&(o=this.length),e<0||r>t.length||n<0||o>this.length)throw new RangeError("out of range index");if(n>=o&&e>=r)return 0;if(n>=o)return-1;if(e>=r)return 1;if(e>>>=0,r>>>=0,n>>>=0,o>>>=0,this===t)return 0;for(var i=o-n,a=r-e,s=Math.min(i,a),u=this.slice(n,o),l=t.slice(e,r),c=0;c<s;++c)if(u[c]!==l[c]){i=u[c],a=l[c];break}return i<a?-1:a<i?1:0},f.prototype.includes=function(t,e,r){return-1!==this.indexOf(t,e,r)},f.prototype.indexOf=function(t,e,r){return S(this,t,e,r,!0)},f.prototype.lastIndexOf=function(t,e,r){return S(this,t,e,r,!1)},f.prototype.write=function(t,e,r,n){if(void 0===e)n="utf8",r=this.length,e=0;else if(void 0===r&&"string"===typeof e)n=e,r=this.length,e=0;else{if(!isFinite(e))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");e>>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}var o=this.length-e;if((void 0===r||r>o)&&(r=o),t.length>0&&(r<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var i=!1;;)switch(n){case"hex":return B(this,t,e,r);case"utf8":case"utf-8":return T(this,t,e,r);case"ascii":return k(this,t,e,r);case"latin1":case"binary":return R(this,t,e,r);case"base64":return x(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return P(this,t,e,r);default:if(i)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),i=!0}},f.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var L=4096;function U(t){var e=t.length;if(e<=L)return String.fromCharCode.apply(String,t);var r="",n=0;while(n<e)r+=String.fromCharCode.apply(String,t.slice(n,n+=L));return r}function M(t,e,r){var n="";r=Math.min(t.length,r);for(var o=e;o<r;++o)n+=String.fromCharCode(127&t[o]);return n}function N(t,e,r){var n="";r=Math.min(t.length,r);for(var o=e;o<r;++o)n+=String.fromCharCode(t[o]);return n}function O(t,e,r){var n=t.length;(!e||e<0)&&(e=0),(!r||r<0||r>n)&&(r=n);for(var o="",i=e;i<r;++i)o+=G[t[i]];return o}function $(t,e,r){for(var n=t.slice(e,r),o="",i=0;i<n.length;i+=2)o+=String.fromCharCode(n[i]+256*n[i+1]);return o}function j(t,e,r){if(t%1!==0||t<0)throw new RangeError("offset is not uint");if(t+e>r)throw new RangeError("Trying to access beyond buffer length")}function D(t,e,r,n,o,i){if(!f.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>o||e<i)throw new RangeError('"value" argument is out of bounds');if(r+n>t.length)throw new RangeError("Index out of range")}function Y(t,e,r,n,o,i){if(r+n>t.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function z(t,e,r,n,i){return e=+e,r>>>=0,i||Y(t,e,r,4),o.write(t,e,r,n,23,4),r+4}function F(t,e,r,n,i){return e=+e,r>>>=0,i||Y(t,e,r,8),o.write(t,e,r,n,52,8),r+8}f.prototype.slice=function(t,e){var r=this.length;t=~~t,e=void 0===e?r:~~e,t<0?(t+=r,t<0&&(t=0)):t>r&&(t=r),e<0?(e+=r,e<0&&(e=0)):e>r&&(e=r),e<t&&(e=t);var n=this.subarray(t,e);return Object.setPrototypeOf(n,f.prototype),n},f.prototype.readUIntLE=function(t,e,r){t>>>=0,e>>>=0,r||j(t,e,this.length);var n=this[t],o=1,i=0;while(++i<e&&(o*=256))n+=this[t+i]*o;return n},f.prototype.readUIntBE=function(t,e,r){t>>>=0,e>>>=0,r||j(t,e,this.length);var n=this[t+--e],o=1;while(e>0&&(o*=256))n+=this[t+--e]*o;return n},f.prototype.readUInt8=function(t,e){return t>>>=0,e||j(t,1,this.length),this[t]},f.prototype.readUInt16LE=function(t,e){return t>>>=0,e||j(t,2,this.length),this[t]|this[t+1]<<8},f.prototype.readUInt16BE=function(t,e){return t>>>=0,e||j(t,2,this.length),this[t]<<8|this[t+1]},f.prototype.readUInt32LE=function(t,e){return t>>>=0,e||j(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},f.prototype.readUInt32BE=function(t,e){return t>>>=0,e||j(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},f.prototype.readIntLE=function(t,e,r){t>>>=0,e>>>=0,r||j(t,e,this.length);var n=this[t],o=1,i=0;while(++i<e&&(o*=256))n+=this[t+i]*o;return o*=128,n>=o&&(n-=Math.pow(2,8*e)),n},f.prototype.readIntBE=function(t,e,r){t>>>=0,e>>>=0,r||j(t,e,this.length);var n=e,o=1,i=this[t+--n];while(n>0&&(o*=256))i+=this[t+--n]*o;return o*=128,i>=o&&(i-=Math.pow(2,8*e)),i},f.prototype.readInt8=function(t,e){return t>>>=0,e||j(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},f.prototype.readInt16LE=function(t,e){t>>>=0,e||j(t,2,this.length);var r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},f.prototype.readInt16BE=function(t,e){t>>>=0,e||j(t,2,this.length);var r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},f.prototype.readInt32LE=function(t,e){return t>>>=0,e||j(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},f.prototype.readInt32BE=function(t,e){return t>>>=0,e||j(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},f.prototype.readFloatLE=function(t,e){return t>>>=0,e||j(t,4,this.length),o.read(this,t,!0,23,4)},f.prototype.readFloatBE=function(t,e){return t>>>=0,e||j(t,4,this.length),o.read(this,t,!1,23,4)},f.prototype.readDoubleLE=function(t,e){return t>>>=0,e||j(t,8,this.length),o.read(this,t,!0,52,8)},f.prototype.readDoubleBE=function(t,e){return t>>>=0,e||j(t,8,this.length),o.read(this,t,!1,52,8)},f.prototype.writeUIntLE=function(t,e,r,n){if(t=+t,e>>>=0,r>>>=0,!n){var o=Math.pow(2,8*r)-1;D(this,t,e,r,o,0)}var i=1,a=0;this[e]=255&t;while(++a<r&&(i*=256))this[e+a]=t/i&255;return e+r},f.prototype.writeUIntBE=function(t,e,r,n){if(t=+t,e>>>=0,r>>>=0,!n){var o=Math.pow(2,8*r)-1;D(this,t,e,r,o,0)}var i=r-1,a=1;this[e+i]=255&t;while(--i>=0&&(a*=256))this[e+i]=t/a&255;return e+r},f.prototype.writeUInt8=function(t,e,r){return t=+t,e>>>=0,r||D(this,t,e,1,255,0),this[e]=255&t,e+1},f.prototype.writeUInt16LE=function(t,e,r){return t=+t,e>>>=0,r||D(this,t,e,2,65535,0),this[e]=255&t,this[e+1]=t>>>8,e+2},f.prototype.writeUInt16BE=function(t,e,r){return t=+t,e>>>=0,r||D(this,t,e,2,65535,0),this[e]=t>>>8,this[e+1]=255&t,e+2},f.prototype.writeUInt32LE=function(t,e,r){return t=+t,e>>>=0,r||D(this,t,e,4,4294967295,0),this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t,e+4},f.prototype.writeUInt32BE=function(t,e,r){return t=+t,e>>>=0,r||D(this,t,e,4,4294967295,0),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},f.prototype.writeIntLE=function(t,e,r,n){if(t=+t,e>>>=0,!n){var o=Math.pow(2,8*r-1);D(this,t,e,r,o-1,-o)}var i=0,a=1,s=0;this[e]=255&t;while(++i<r&&(a*=256))t<0&&0===s&&0!==this[e+i-1]&&(s=1),this[e+i]=(t/a>>0)-s&255;return e+r},f.prototype.writeIntBE=function(t,e,r,n){if(t=+t,e>>>=0,!n){var o=Math.pow(2,8*r-1);D(this,t,e,r,o-1,-o)}var i=r-1,a=1,s=0;this[e+i]=255&t;while(--i>=0&&(a*=256))t<0&&0===s&&0!==this[e+i+1]&&(s=1),this[e+i]=(t/a>>0)-s&255;return e+r},f.prototype.writeInt8=function(t,e,r){return t=+t,e>>>=0,r||D(this,t,e,1,127,-128),t<0&&(t=255+t+1),this[e]=255&t,e+1},f.prototype.writeInt16LE=function(t,e,r){return t=+t,e>>>=0,r||D(this,t,e,2,32767,-32768),this[e]=255&t,this[e+1]=t>>>8,e+2},f.prototype.writeInt16BE=function(t,e,r){return t=+t,e>>>=0,r||D(this,t,e,2,32767,-32768),this[e]=t>>>8,this[e+1]=255&t,e+2},f.prototype.writeInt32LE=function(t,e,r){return t=+t,e>>>=0,r||D(this,t,e,4,2147483647,-2147483648),this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24,e+4},f.prototype.writeInt32BE=function(t,e,r){return t=+t,e>>>=0,r||D(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},f.prototype.writeFloatLE=function(t,e,r){return z(this,t,e,!0,r)},f.prototype.writeFloatBE=function(t,e,r){return z(this,t,e,!1,r)},f.prototype.writeDoubleLE=function(t,e,r){return F(this,t,e,!0,r)},f.prototype.writeDoubleBE=function(t,e,r){return F(this,t,e,!1,r)},f.prototype.copy=function(t,e,r,n){if(!f.isBuffer(t))throw new TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),e>=t.length&&(e=t.length),e||(e=0),n>0&&n<r&&(n=r),n===r)return 0;if(0===t.length||0===this.length)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-e<n-r&&(n=t.length-e+r);var o=n-r;if(this===t&&"function"===typeof Uint8Array.prototype.copyWithin)this.copyWithin(e,r,n);else if(this===t&&r<e&&e<n)for(var i=o-1;i>=0;--i)t[i+e]=this[i+r];else Uint8Array.prototype.set.call(t,this.subarray(r,n),e);return o},f.prototype.fill=function(t,e,r,n){if("string"===typeof t){if("string"===typeof e?(n=e,e=0,r=this.length):"string"===typeof r&&(n=r,r=this.length),void 0!==n&&"string"!==typeof n)throw new TypeError("encoding must be a string");if("string"===typeof n&&!f.isEncoding(n))throw new TypeError("Unknown encoding: "+n);if(1===t.length){var o=t.charCodeAt(0);("utf8"===n&&o<128||"latin1"===n)&&(t=o)}}else"number"===typeof t?t&=255:"boolean"===typeof t&&(t=Number(t));if(e<0||this.length<e||this.length<r)throw new RangeError("Out of range index");if(r<=e)return this;var i;if(e>>>=0,r=void 0===r?this.length:r>>>0,t||(t=0),"number"===typeof t)for(i=e;i<r;++i)this[i]=t;else{var a=f.isBuffer(t)?t:f.from(t,n),s=a.length;if(0===s)throw new TypeError('The value "'+t+'" is invalid for argument "value"');for(i=0;i<r-e;++i)this[i+e]=a[i%s]}return this};var V=/[^+/0-9A-Za-z-_]/g;function H(t){if(t=t.split("=")[0],t=t.trim().replace(V,""),t.length<2)return"";while(t.length%4!==0)t+="=";return t}function J(t,e){var r;e=e||1/0;for(var n=t.length,o=null,i=[],a=0;a<n;++a){if(r=t.charCodeAt(a),r>55295&&r<57344){if(!o){if(r>56319){(e-=3)>-1&&i.push(239,191,189);continue}if(a+1===n){(e-=3)>-1&&i.push(239,191,189);continue}o=r;continue}if(r<56320){(e-=3)>-1&&i.push(239,191,189),o=r;continue}r=65536+(o-55296<<10|r-56320)}else o&&(e-=3)>-1&&i.push(239,191,189);if(o=null,r<128){if((e-=1)<0)break;i.push(r)}else if(r<2048){if((e-=2)<0)break;i.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;i.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;i.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return i}function K(t){for(var e=[],r=0;r<t.length;++r)e.push(255&t.charCodeAt(r));return e}function q(t,e){for(var r,n,o,i=[],a=0;a<t.length;++a){if((e-=2)<0)break;r=t.charCodeAt(a),n=r>>8,o=r%256,i.push(o),i.push(n)}return i}function Q(t){return n.toByteArray(H(t))}function X(t,e,r,n){for(var o=0;o<n;++o){if(o+r>=e.length||o>=t.length)break;e[o+r]=t[o]}return o}function Z(t,e){return t instanceof e||null!=t&&null!=t.constructor&&null!=t.constructor.name&&t.constructor.name===e.name}function W(t){return t!==t}var G=function(){for(var t="0123456789abcdef",e=new Array(256),r=0;r<16;++r)for(var n=16*r,o=0;o<16;++o)e[n+o]=t[r]+t[o];return e}()},{"base64-js":29,ieee754:32}],31:[function(t,e,r){var n={single_source_shortest_paths:function(t,e,r){var o={},i={};i[e]=0;var a,s,u,f,l,c,h,p,d,g=n.PriorityQueue.make();g.push(e,0);while(!g.empty())for(u in a=g.pop(),s=a.value,f=a.cost,l=t[s]||{},l)l.hasOwnProperty(u)&&(c=l[u],h=f+c,p=i[u],d="undefined"===typeof i[u],(d||p>h)&&(i[u]=h,g.push(u,h),o[u]=s));if("undefined"!==typeof r&&"undefined"===typeof i[r]){var m=["Could not find a path from ",e," to ",r,"."].join("");throw new Error(m)}return o},extract_shortest_path_from_predecessor_list:function(t,e){var r=[],n=e;while(n)r.push(n),t[n],n=t[n];return r.reverse(),r},find_path:function(t,e,r){var o=n.single_source_shortest_paths(t,e,r);return n.extract_shortest_path_from_predecessor_list(o,r)},PriorityQueue:{make:function(t){var e,r=n.PriorityQueue,o={};for(e in t=t||{},r)r.hasOwnProperty(e)&&(o[e]=r[e]);return o.queue=[],o.sorter=t.sorter||r.default_sorter,o},default_sorter:function(t,e){return t.cost-e.cost},push:function(t,e){var r={value:t,cost:e};this.queue.push(r),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return 0===this.queue.length}}};"undefined"!==typeof e&&(e.exports=n)},{}],32:[function(t,e,r){r.read=function(t,e,r,n,o){var i,a,s=8*o-n-1,u=(1<<s)-1,f=u>>1,l=-7,c=r?o-1:0,h=r?-1:1,p=t[e+c];for(c+=h,i=p&(1<<-l)-1,p>>=-l,l+=s;l>0;i=256*i+t[e+c],c+=h,l-=8);for(a=i&(1<<-l)-1,i>>=-l,l+=n;l>0;a=256*a+t[e+c],c+=h,l-=8);if(0===i)i=1-f;else{if(i===u)return a?NaN:1/0*(p?-1:1);a+=Math.pow(2,n),i-=f}return(p?-1:1)*a*Math.pow(2,i-n)},r.write=function(t,e,r,n,o,i){var a,s,u,f=8*i-o-1,l=(1<<f)-1,c=l>>1,h=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:i-1,d=n?1:-1,g=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(s=isNaN(e)?1:0,a=l):(a=Math.floor(Math.log(e)/Math.LN2),e*(u=Math.pow(2,-a))<1&&(a--,u*=2),e+=a+c>=1?h/u:h*Math.pow(2,1-c),e*u>=2&&(a++,u/=2),a+c>=l?(s=0,a=l):a+c>=1?(s=(e*u-1)*Math.pow(2,o),a+=c):(s=e*Math.pow(2,c-1)*Math.pow(2,o),a=0));o>=8;t[r+p]=255&s,p+=d,s/=256,o-=8);for(a=a<<o|s,f+=o;f>0;t[r+p]=255&a,p+=d,a/=256,f-=8);t[r+p-d]|=128*g}},{}],33:[function(t,e,r){var n={}.toString;e.exports=Array.isArray||function(t){return"[object Array]"==n.call(t)}},{}]},{},[24])(24)}))})),n={name:"qrcode",props:{value:null,options:Object,tag:{type:String,default:"canvas"}},render:function(t){return t(this.tag,this.$slots.default)},watch:{$props:{deep:!0,immediate:!0,handler:function(){this.$el&&this.generate()}}},methods:{generate:function(){var t=this,e=this.options,n=this.tag,o=String(this.value);"canvas"===n?r.toCanvas(this.$el,o,e,(function(t){if(t)throw t})):"img"===n?r.toDataURL(o,e,(function(e,r){if(e)throw e;t.$el.src=r})):r.toString(o,e,(function(e,r){if(e)throw e;t.$el.innerHTML=r}))}},mounted:function(){this.generate()}};return n}))},b8ac:function(t,e,r){"use strict";var n=r("8db4"),o=r.n(n);o.a},caad:function(t,e,r){"use strict";var n=r("23e7"),o=r("4d64").includes,i=r("44d2"),a=r("ae40"),s=a("indexOf",{ACCESSORS:!0,1:0});n({target:"Array",proto:!0,forced:!s},{includes:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}}),i("includes")},f255:function(t,e,r){}}]);
|
|
//# sourceMappingURL=chunk-3fba1bf2.6996f5b8.js.map
|