diff --git a/.circleci/config.yml b/.circleci/config.yml index fcda0ae365..bdeccee43a 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -149,3 +149,4 @@ workflows: ignore: /.*/ tags: only: /(v[1-9]+(\.[0-9]+)*(-[a-z0-9-]+)?)|(v[a-z0-9-]+)/ + diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml index e2fb97902f..cae8b4938a 100644 --- a/.github/FUNDING.yml +++ b/.github/FUNDING.yml @@ -1,2 +1,2 @@ # These are supported funding model platforms -custom: https://foundation.btcpayserver.org +custom: "https://btcpayserver.org/donate/" diff --git a/BTCPayServer.Abstractions/BTCPayServer.Abstractions.csproj b/BTCPayServer.Abstractions/BTCPayServer.Abstractions.csproj index 76d6666772..a979588481 100644 --- a/BTCPayServer.Abstractions/BTCPayServer.Abstractions.csproj +++ b/BTCPayServer.Abstractions/BTCPayServer.Abstractions.csproj @@ -31,7 +31,7 @@ - + diff --git a/BTCPayServer/Models/ServerViewModels/LNDGRPCServicesViewModel.cs b/BTCPayServer/Models/ServerViewModels/LNDGRPCServicesViewModel.cs new file mode 100644 index 0000000000..54f33dbd8d --- /dev/null +++ b/BTCPayServer/Models/ServerViewModels/LNDGRPCServicesViewModel.cs @@ -0,0 +1,26 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.Linq; +using System.Threading.Tasks; + +namespace BTCPayServer.Models.ServerViewModels +{ + public class LndGrpcServicesViewModel + { + public string Host { get; set; } + public bool SSL { get; set; } + public string Macaroon { get; set; } + public string AdminMacaroon { get; set; } + public string ReadonlyMacaroon { get; set; } + public string InvoiceMacaroon { get; set; } + public string CertificateThumbprint { get; set; } + [Display(Name = "GRPC SSL Cipher suite (GRPC_SSL_CIPHER_SUITES)")] + public string GRPCSSLCipherSuites { get; set; } + public string QRCode { get; set; } + public string QRCodeLink { get; set; } + [Display(Name = "REST Uri")] + public string Uri { get; set; } + public string ConnectionType { get; internal set; } + } +} diff --git a/BTCPayServer/Views/Shared/Confirm.cshtml b/BTCPayServer/Views/Shared/Confirm.cshtml old mode 100644 new mode 100755 diff --git a/BTCPayServer/Views/Shared/Error.cshtml b/BTCPayServer/Views/Shared/Error.cshtml old mode 100644 new mode 100755 diff --git a/BTCPayServer/Views/Shared/_Layout.cshtml b/BTCPayServer/Views/Shared/_Layout.cshtml old mode 100644 new mode 100755 diff --git a/BTCPayServer/Views/Shared/_NavLayout.cshtml b/BTCPayServer/Views/Shared/_NavLayout.cshtml old mode 100644 new mode 100755 diff --git a/BTCPayServer/Views/Shared/_StatusMessage.cshtml b/BTCPayServer/Views/Shared/_StatusMessage.cshtml old mode 100644 new mode 100755 diff --git a/BTCPayServer/Views/Shared/_ValidationScriptsPartial.cshtml b/BTCPayServer/Views/Shared/_ValidationScriptsPartial.cshtml old mode 100644 new mode 100755 diff --git a/BTCPayServer/Views/UIInvoice/Checkout-Body.cshtml b/BTCPayServer/Views/UIInvoice/Checkout-Body.cshtml old mode 100644 new mode 100755 diff --git a/BTCPayServer/Views/UIInvoice/Checkout-Spinner.cshtml b/BTCPayServer/Views/UIInvoice/Checkout-Spinner.cshtml old mode 100644 new mode 100755 diff --git a/BTCPayServer/Views/UIInvoice/Checkout.cshtml b/BTCPayServer/Views/UIInvoice/Checkout.cshtml old mode 100644 new mode 100755 index e3db43bd7f..89fc954caf --- a/BTCPayServer/Views/UIInvoice/Checkout.cshtml +++ b/BTCPayServer/Views/UIInvoice/Checkout.cshtml @@ -116,7 +116,7 @@
- Powered by BTCPay Server + Powered by BTCPay Jungle
@if (env.CheatMode) { diff --git a/BTCPayServer/Views/UIPaymentRequest/ViewPaymentRequest.cshtml b/BTCPayServer/Views/UIPaymentRequest/ViewPaymentRequest.cshtml index a851771af3..87b844a3a8 100644 --- a/BTCPayServer/Views/UIPaymentRequest/ViewPaymentRequest.cshtml +++ b/BTCPayServer/Views/UIPaymentRequest/ViewPaymentRequest.cshtml @@ -379,4 +379,4 @@ - + \ No newline at end of file diff --git a/BTCPayServer/Views/UIServer/LNDGRPCServices.cshtml b/BTCPayServer/Views/UIServer/LNDGRPCServices.cshtml new file mode 100644 index 0000000000..a23b68e5ab --- /dev/null +++ b/BTCPayServer/Views/UIServer/LNDGRPCServices.cshtml @@ -0,0 +1,106 @@ +@model LndGrpcServicesViewModel +@{ + ViewData.SetActivePageAndTitle(ServerNavPages.Services); +} + + +

LND GRPC

+ +
+
+
+
+
+ +
+ +
+
+

+ BTCPay exposes gRPC services for outside consumption, you will find connection information here.
+

+
+ +
+
QR Code connection
+

+ You can use this QR Code to connect your Zap wallet to your LND instance.
+ This QR Code is only valid for 10 minutes +

+
+
+ @if(Model.QRCode == null) + { +
+
+ +
+
+ } + else + { +
+
+
+
+

See QR Code information by clicking here

+
+
+ + +
+
+ Click here to open the configuration file. +
+
+ } + + +
+
More details...
+

Alternatively, you can see the settings by clicking here

+
+
+
+ + +
+
+ + +
+ @if(Model.Macaroon != null) + { +
+ + +
+ } + @if(Model.CertificateThumbprint != null) + { +
+ + +
+ } +
+
+
+
+ +@section Scripts { + @await Html.PartialAsync("_ValidationScriptsPartial") + + @if(Model.QRCode != null) + { + + + } +} diff --git a/BTCPayServer/Views/UIStores/StoreUsers.cshtml b/BTCPayServer/Views/UIStores/StoreUsers.cshtml index 06f9df928e..5a0765d3ea 100644 --- a/BTCPayServer/Views/UIStores/StoreUsers.cshtml +++ b/BTCPayServer/Views/UIStores/StoreUsers.cshtml @@ -9,7 +9,7 @@

@ViewData["Title"]

- Give other registered BTCPay Server users access to your store.
+ Give other registered Jungle Server users access to your store.
Guests will not be able to see or modify the store settings.

diff --git a/BTCPayServer/wwwroot/bundles/.gitignore b/BTCPayServer/wwwroot/bundles/.gitignore old mode 100644 new mode 100755 diff --git a/BTCPayServer/wwwroot/checkout/css/fonts.css b/BTCPayServer/wwwroot/checkout/css/fonts.css new file mode 100755 index 0000000000..ae9a75119f --- /dev/null +++ b/BTCPayServer/wwwroot/checkout/css/fonts.css @@ -0,0 +1,280 @@ +/* cyrillic-ext */ +@font-face { + font-family: 'Roboto'; + font-style: normal; + font-weight: 400; + src: local('Roboto'), local('Roboto-Regular'), url(https://fonts.gstatic.com/s/roboto/v16/ek4gzZ-GeXAPcSbHtCeQI_esZW2xOQ-xsNqO47m55DA.woff2) format('woff2'); + unicode-range: U+0460-052F, U+20B4, U+2DE0-2DFF, U+A640-A69F; +} +/* cyrillic */ +@font-face { + font-family: 'Roboto'; + font-style: normal; + font-weight: 400; + src: local('Roboto'), local('Roboto-Regular'), url(https://fonts.gstatic.com/s/roboto/v16/mErvLBYg_cXG3rLvUsKT_fesZW2xOQ-xsNqO47m55DA.woff2) format('woff2'); + unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; +} +/* greek-ext */ +@font-face { + font-family: 'Roboto'; + font-style: normal; + font-weight: 400; + src: local('Roboto'), local('Roboto-Regular'), url(https://fonts.gstatic.com/s/roboto/v16/-2n2p-_Y08sg57CNWQfKNvesZW2xOQ-xsNqO47m55DA.woff2) format('woff2'); + unicode-range: U+1F00-1FFF; +} +/* greek */ +@font-face { + font-family: 'Roboto'; + font-style: normal; + font-weight: 400; + src: local('Roboto'), local('Roboto-Regular'), url(https://fonts.gstatic.com/s/roboto/v16/u0TOpm082MNkS5K0Q4rhqvesZW2xOQ-xsNqO47m55DA.woff2) format('woff2'); + unicode-range: U+0370-03FF; +} +/* vietnamese */ +@font-face { + font-family: 'Roboto'; + font-style: normal; + font-weight: 400; + src: local('Roboto'), local('Roboto-Regular'), url(https://fonts.gstatic.com/s/roboto/v16/NdF9MtnOpLzo-noMoG0miPesZW2xOQ-xsNqO47m55DA.woff2) format('woff2'); + unicode-range: U+0102-0103, U+1EA0-1EF9, U+20AB; +} +/* latin-ext */ +@font-face { + font-family: 'Roboto'; + font-style: normal; + font-weight: 400; + src: local('Roboto'), local('Roboto-Regular'), url(https://fonts.gstatic.com/s/roboto/v16/Fcx7Wwv8OzT71A3E1XOAjvesZW2xOQ-xsNqO47m55DA.woff2) format('woff2'); + unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF; +} +/* latin */ +@font-face { + font-family: 'Roboto'; + font-style: normal; + font-weight: 400; + src: local('Roboto'), local('Roboto-Regular'), url(https://fonts.gstatic.com/s/roboto/v16/CWB0XYA8bzo0kSThX0UTuA.woff2) format('woff2'); + unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215; +} +/* cyrillic-ext */ +@font-face { + font-family: 'Roboto'; + font-style: normal; + font-weight: 500; + src: local('Roboto Medium'), local('Roboto-Medium'), url(https://fonts.gstatic.com/s/roboto/v16/ZLqKeelYbATG60EpZBSDyxJtnKITppOI_IvcXXDNrsc.woff2) format('woff2'); + unicode-range: U+0460-052F, U+20B4, U+2DE0-2DFF, U+A640-A69F; +} +/* cyrillic */ +@font-face { + font-family: 'Roboto'; + font-style: normal; + font-weight: 500; + src: local('Roboto Medium'), local('Roboto-Medium'), url(https://fonts.gstatic.com/s/roboto/v16/oHi30kwQWvpCWqAhzHcCSBJtnKITppOI_IvcXXDNrsc.woff2) format('woff2'); + unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; +} +/* greek-ext */ +@font-face { + font-family: 'Roboto'; + font-style: normal; + font-weight: 500; + src: local('Roboto Medium'), local('Roboto-Medium'), url(https://fonts.gstatic.com/s/roboto/v16/rGvHdJnr2l75qb0YND9NyBJtnKITppOI_IvcXXDNrsc.woff2) format('woff2'); + unicode-range: U+1F00-1FFF; +} +/* greek */ +@font-face { + font-family: 'Roboto'; + font-style: normal; + font-weight: 500; + src: local('Roboto Medium'), local('Roboto-Medium'), url(https://fonts.gstatic.com/s/roboto/v16/mx9Uck6uB63VIKFYnEMXrRJtnKITppOI_IvcXXDNrsc.woff2) format('woff2'); + unicode-range: U+0370-03FF; +} +/* vietnamese */ +@font-face { + font-family: 'Roboto'; + font-style: normal; + font-weight: 500; + src: local('Roboto Medium'), local('Roboto-Medium'), url(https://fonts.gstatic.com/s/roboto/v16/mbmhprMH69Zi6eEPBYVFhRJtnKITppOI_IvcXXDNrsc.woff2) format('woff2'); + unicode-range: U+0102-0103, U+1EA0-1EF9, U+20AB; +} +/* latin-ext */ +@font-face { + font-family: 'Roboto'; + font-style: normal; + font-weight: 500; + src: local('Roboto Medium'), local('Roboto-Medium'), url(https://fonts.gstatic.com/s/roboto/v16/oOeFwZNlrTefzLYmlVV1UBJtnKITppOI_IvcXXDNrsc.woff2) format('woff2'); + unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF; +} +/* latin */ +@font-face { + font-family: 'Roboto'; + font-style: normal; + font-weight: 500; + src: local('Roboto Medium'), local('Roboto-Medium'), url(https://fonts.gstatic.com/s/roboto/v16/RxZJdnzeo3R5zSexge8UUVtXRa8TVwTICgirnJhmVJw.woff2) format('woff2'); + unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215; +} +/* cyrillic-ext */ +@font-face { + font-family: 'Roboto'; + font-style: normal; + font-weight: 700; + src: local('Roboto Bold'), local('Roboto-Bold'), url(https://fonts.gstatic.com/s/roboto/v16/77FXFjRbGzN4aCrSFhlh3hJtnKITppOI_IvcXXDNrsc.woff2) format('woff2'); + unicode-range: U+0460-052F, U+20B4, U+2DE0-2DFF, U+A640-A69F; +} +/* cyrillic */ +@font-face { + font-family: 'Roboto'; + font-style: normal; + font-weight: 700; + src: local('Roboto Bold'), local('Roboto-Bold'), url(https://fonts.gstatic.com/s/roboto/v16/isZ-wbCXNKAbnjo6_TwHThJtnKITppOI_IvcXXDNrsc.woff2) format('woff2'); + unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; +} +/* greek-ext */ +@font-face { + font-family: 'Roboto'; + font-style: normal; + font-weight: 700; + src: local('Roboto Bold'), local('Roboto-Bold'), url(https://fonts.gstatic.com/s/roboto/v16/UX6i4JxQDm3fVTc1CPuwqhJtnKITppOI_IvcXXDNrsc.woff2) format('woff2'); + unicode-range: U+1F00-1FFF; +} +/* greek */ +@font-face { + font-family: 'Roboto'; + font-style: normal; + font-weight: 700; + src: local('Roboto Bold'), local('Roboto-Bold'), url(https://fonts.gstatic.com/s/roboto/v16/jSN2CGVDbcVyCnfJfjSdfBJtnKITppOI_IvcXXDNrsc.woff2) format('woff2'); + unicode-range: U+0370-03FF; +} +/* vietnamese */ +@font-face { + font-family: 'Roboto'; + font-style: normal; + font-weight: 700; + src: local('Roboto Bold'), local('Roboto-Bold'), url(https://fonts.gstatic.com/s/roboto/v16/PwZc-YbIL414wB9rB1IAPRJtnKITppOI_IvcXXDNrsc.woff2) format('woff2'); + unicode-range: U+0102-0103, U+1EA0-1EF9, U+20AB; +} +/* latin-ext */ +@font-face { + font-family: 'Roboto'; + font-style: normal; + font-weight: 700; + src: local('Roboto Bold'), local('Roboto-Bold'), url(https://fonts.gstatic.com/s/roboto/v16/97uahxiqZRoncBaCEI3aWxJtnKITppOI_IvcXXDNrsc.woff2) format('woff2'); + unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF; +} +/* latin */ +@font-face { + font-family: 'Roboto'; + font-style: normal; + font-weight: 700; + src: local('Roboto Bold'), local('Roboto-Bold'), url(https://fonts.gstatic.com/s/roboto/v16/d-6IYplOFocCacKzxwXSOFtXRa8TVwTICgirnJhmVJw.woff2) format('woff2'); + unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215; +} +/* cyrillic-ext */ +@font-face { + font-family: 'Roboto'; + font-style: italic; + font-weight: 400; + src: local('Roboto Italic'), local('Roboto-Italic'), url(https://fonts.gstatic.com/s/roboto/v16/WxrXJa0C3KdtC7lMafG4dRTbgVql8nDJpwnrE27mub0.woff2) format('woff2'); + unicode-range: U+0460-052F, U+20B4, U+2DE0-2DFF, U+A640-A69F; +} +/* cyrillic */ +@font-face { + font-family: 'Roboto'; + font-style: italic; + font-weight: 400; + src: local('Roboto Italic'), local('Roboto-Italic'), url(https://fonts.gstatic.com/s/roboto/v16/OpXUqTo0UgQQhGj_SFdLWBTbgVql8nDJpwnrE27mub0.woff2) format('woff2'); + unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; +} +/* greek-ext */ +@font-face { + font-family: 'Roboto'; + font-style: italic; + font-weight: 400; + src: local('Roboto Italic'), local('Roboto-Italic'), url(https://fonts.gstatic.com/s/roboto/v16/1hZf02POANh32k2VkgEoUBTbgVql8nDJpwnrE27mub0.woff2) format('woff2'); + unicode-range: U+1F00-1FFF; +} +/* greek */ +@font-face { + font-family: 'Roboto'; + font-style: italic; + font-weight: 400; + src: local('Roboto Italic'), local('Roboto-Italic'), url(https://fonts.gstatic.com/s/roboto/v16/cDKhRaXnQTOVbaoxwdOr9xTbgVql8nDJpwnrE27mub0.woff2) format('woff2'); + unicode-range: U+0370-03FF; +} +/* vietnamese */ +@font-face { + font-family: 'Roboto'; + font-style: italic; + font-weight: 400; + src: local('Roboto Italic'), local('Roboto-Italic'), url(https://fonts.gstatic.com/s/roboto/v16/K23cxWVTrIFD6DJsEVi07RTbgVql8nDJpwnrE27mub0.woff2) format('woff2'); + unicode-range: U+0102-0103, U+1EA0-1EF9, U+20AB; +} +/* latin-ext */ +@font-face { + font-family: 'Roboto'; + font-style: italic; + font-weight: 400; + src: local('Roboto Italic'), local('Roboto-Italic'), url(https://fonts.gstatic.com/s/roboto/v16/vSzulfKSK0LLjjfeaxcREhTbgVql8nDJpwnrE27mub0.woff2) format('woff2'); + unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF; +} +/* latin */ +@font-face { + font-family: 'Roboto'; + font-style: italic; + font-weight: 400; + src: local('Roboto Italic'), local('Roboto-Italic'), url(https://fonts.gstatic.com/s/roboto/v16/vPcynSL0qHq_6dX7lKVByfesZW2xOQ-xsNqO47m55DA.woff2) format('woff2'); + unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215; +} +/* cyrillic-ext */ +@font-face { + font-family: 'Roboto Mono'; + font-style: normal; + font-weight: 400; + src: local('Roboto Mono'), local('RobotoMono-Regular'), url(https://fonts.gstatic.com/s/robotomono/v4/hMqPNLsu_dywMa4C_DEpYzTOQ_MqJVwkKsUn0wKzc2I.woff2) format('woff2'); + unicode-range: U+0460-052F, U+20B4, U+2DE0-2DFF, U+A640-A69F; +} +/* cyrillic */ +@font-face { + font-family: 'Roboto Mono'; + font-style: normal; + font-weight: 400; + src: local('Roboto Mono'), local('RobotoMono-Regular'), url(https://fonts.gstatic.com/s/robotomono/v4/hMqPNLsu_dywMa4C_DEpYzUj_cnvWIuuBMVgbX098Mw.woff2) format('woff2'); + unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; +} +/* greek-ext */ +@font-face { + font-family: 'Roboto Mono'; + font-style: normal; + font-weight: 400; + src: local('Roboto Mono'), local('RobotoMono-Regular'), url(https://fonts.gstatic.com/s/robotomono/v4/hMqPNLsu_dywMa4C_DEpY0bcKLIaa1LC45dFaAfauRA.woff2) format('woff2'); + unicode-range: U+1F00-1FFF; +} +/* greek */ +@font-face { + font-family: 'Roboto Mono'; + font-style: normal; + font-weight: 400; + src: local('Roboto Mono'), local('RobotoMono-Regular'), url(https://fonts.gstatic.com/s/robotomono/v4/hMqPNLsu_dywMa4C_DEpY2o_sUJ8uO4YLWRInS22T3Y.woff2) format('woff2'); + unicode-range: U+0370-03FF; +} +/* vietnamese */ +@font-face { + font-family: 'Roboto Mono'; + font-style: normal; + font-weight: 400; + src: local('Roboto Mono'), local('RobotoMono-Regular'), url(https://fonts.gstatic.com/s/robotomono/v4/hMqPNLsu_dywMa4C_DEpY76up8jxqWt8HVA3mDhkV_0.woff2) format('woff2'); + unicode-range: U+0102-0103, U+1EA0-1EF9, U+20AB; +} +/* latin-ext */ +@font-face { + font-family: 'Roboto Mono'; + font-style: normal; + font-weight: 400; + src: local('Roboto Mono'), local('RobotoMono-Regular'), url(https://fonts.gstatic.com/s/robotomono/v4/hMqPNLsu_dywMa4C_DEpYyYE0-AqJ3nfInTTiDXDjU4.woff2) format('woff2'); + unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF; +} +/* latin */ +@font-face { + font-family: 'Roboto Mono'; + font-style: normal; + font-weight: 400; + src: local('Roboto Mono'), local('RobotoMono-Regular'), url(https://fonts.gstatic.com/s/robotomono/v4/hMqPNLsu_dywMa4C_DEpY44P5ICox8Kq3LLUNMylGO4.woff2) format('woff2'); + unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215; +} diff --git a/BTCPayServer/wwwroot/checkout/css/themes/legacy-logo.png b/BTCPayServer/wwwroot/checkout/css/themes/legacy-logo.png old mode 100644 new mode 100755 index a28157f017..c46506a0a0 Binary files a/BTCPayServer/wwwroot/checkout/css/themes/legacy-logo.png and b/BTCPayServer/wwwroot/checkout/css/themes/legacy-logo.png differ diff --git a/BTCPayServer/wwwroot/checkout/css/themes/legacy.css b/BTCPayServer/wwwroot/checkout/css/themes/legacy.css old mode 100644 new mode 100755 diff --git a/BTCPayServer/wwwroot/checkout/css/vex-extrastyles.css b/BTCPayServer/wwwroot/checkout/css/vex-extrastyles.css old mode 100644 new mode 100755 diff --git a/BTCPayServer/wwwroot/checkout/css/vex-theme-btcpay.css b/BTCPayServer/wwwroot/checkout/css/vex-theme-btcpay.css old mode 100644 new mode 100755 diff --git a/BTCPayServer/wwwroot/checkout/js/changellyComponent.js b/BTCPayServer/wwwroot/checkout/js/changellyComponent.js new file mode 100755 index 0000000000..2c61618ff9 --- /dev/null +++ b/BTCPayServer/wwwroot/checkout/js/changellyComponent.js @@ -0,0 +1,131 @@ +var ChangellyComponent = + { + props: ["storeId", "toCurrency", "toCurrencyDue", "toCurrencyAddress", "merchantId"], + data: function () { + return { + currencies: [], + isLoading: true, + calculatedAmount: 0, + selectedFromCurrency: "", + prettyDropdownInstance: null, + calculateError: false, + currenciesError: false + }; + }, + computed: { + url: function () { + if (this.calculatedAmount && this.selectedFromCurrency && !this.isLoading) { + return "https://changelly.com/widget/v1?auth=email" + + "&from=" + + this.selectedFromCurrency + + "&to=" + + this.toCurrency + + "&address=" + + this.toCurrencyAddress + + "&amount=" + + this.calculatedAmount + + (this.merchantId ? "&merchant_id=" + this.merchantId + "&ref_id=" + this.merchantId : ""); + } + return null; + } + }, + watch: { + selectedFromCurrency: function (val) { + if (val) { + this.calculateAmount(); + } else { + this.calculateAmount = 0; + } + } + }, + mounted: function () { + this.prettyDropdownInstance = initDropdown(this.$refs.changellyCurrenciesDropdown); + this.loadCurrencies(); + }, + methods: { + getUrl: function () { + return window.location.origin + "/changelly/" + this.storeId; + }, + loadCurrencies: function () { + this.isLoading = true; + this.currenciesError = false; + $.ajax( + { + context: this, + url: this.getUrl() + "/currencies", + dataType: "json", + success: function (result) { + + for (i = 0; i < result.length; i++) { + if (result[i].enabled && + result[i].name.toLowerCase() !== this.toCurrency.toLowerCase()) { + this.currencies.push(result[i]); + } + } + var self = this; + Vue.nextTick(function () { + self.prettyDropdownInstance + .refresh() + .on("change", + function (event) { + self.onCurrencyChange(self.$refs.changellyCurrenciesDropdown.value); + }); + }); + + }, + error: function(){ + this.currenciesError = true; + }, + complete: function () { + this.isLoading = false; + } + }); + }, + calculateAmount: function () { + this.isLoading = true; + this.calculateError = false; + $.ajax( + { + url: this.getUrl() + "/calculate", + dataType: "json", + data: { + fromCurrency: this.selectedFromCurrency, + toCurrency: this.toCurrency, + toCurrencyAmount: this.toCurrencyDue + }, + context: this, + success: function (result) { + this.calculatedAmount = result; + }, + error: function(){ + this.calculateError = true; + }, + complete: function () { + this.isLoading = false; + } + }); + }, + retry: function(type){ + if(type=="loadCurrencies"){ + this.loadCurrencies(); + }else if(type=="calculateAmount"){ + this.calculateAmount(); + } + }, + onCurrencyChange: function (value) { + this.selectedFromCurrency = value; + this.calculatedAmount = 0; + }, + openDialog: function (e) { + if (e && e.preventDefault) { + e.preventDefault(); + } + + var changellyWindow = window.open( + this.url, + 'Changelly', + 'width=600,height=470,toolbar=0,menubar=0,location=0,status=1,scrollbars=1,resizable=0,left=0,top=0'); + changellyWindow.focus(); + } + } + }; diff --git a/BTCPayServer/wwwroot/checkout/js/core.js b/BTCPayServer/wwwroot/checkout/js/core.js new file mode 100755 index 0000000000..01a725e020 --- /dev/null +++ b/BTCPayServer/wwwroot/checkout/js/core.js @@ -0,0 +1,425 @@ +// TODO: Refactor... switch from jQuery to Vue.js +// public methods +function resetTabsSlider() { + $("#tabsSlider").removeClass("slide-copy"); + $("#tabsSlider").removeClass("slide-altcoins"); + + $("#scan-tab").removeClass("active"); + $("#copy-tab").removeClass("active"); + $("#altcoins-tab").removeClass("active"); + + $("#copy").hide(); + $("#copy").removeClass("active"); + + $("#scan").hide(); + $("#scan").removeClass("active"); + + $("#altcoins").hide(); + $("#altcoins").removeClass("active"); + + closePaymentMethodDialog(null); +} + +function changeCurrency(currency) { + if (currency !== null && srvModel.paymentMethodId !== currency) { + $(".payment__currencies").hide(); + $(".payment__spinner").show(); + checkoutCtrl.scanDisplayQr = ""; + srvModel.paymentMethodId = currency; + fetchStatus(); + } + return false; +} + +function onDataCallback(jsonData) { + var newStatus = jsonData.status; + + if (newStatus === "complete" || + newStatus === "confirmed" || + newStatus === "paid") { + if ($(".modal-dialog").hasClass("expired")) { + $(".modal-dialog").removeClass("expired"); + $("#expired").removeClass("active"); + } + + $(".modal-dialog").addClass("paid"); + + resetTabsSlider(); + $("#paid").addClass("active"); + if (!jsonData.isModal && jsonData.redirectAutomatically && jsonData.merchantRefLink) { + $(".payment__spinner").show(); + setTimeout(function () { + window.location = jsonData.merchantRefLink; + }, 2000); + } + } + + if (newStatus === "expired" || newStatus === "invalid") { //TODO: different state if the invoice is invalid (failed to confirm after timeout) + if ($(".modal-dialog").hasClass("paid")) { + $(".modal-dialog").removeClass("paid"); + $("#paid").removeClass("active"); + } + + $(".timer-row").removeClass("expiring-soon"); + $(".timer-row__spinner").html(""); + $("#emailAddressView").removeClass("active"); + $(".modal-dialog").addClass("expired"); + $("#expired").addClass("active"); + + resetTabsSlider(); + } + + if (checkoutCtrl.srvModel.status !== newStatus) { + window.parent.postMessage({ "invoiceId": srvModel.invoiceId, "status": newStatus }, "*"); + } + + // restoring qr code view only when currency is switched + if (jsonData.paymentMethodId === srvModel.paymentMethodId && + checkoutCtrl.scanDisplayQr === "") { + checkoutCtrl.scanDisplayQr = jsonData.invoiceBitcoinUrlQR; + } + + if (jsonData.paymentMethodId === srvModel.paymentMethodId) { + $(".payment__currencies").show(); + $(".payment__spinner").hide(); + } + + if (jsonData.isLightning && checkoutCtrl.lndModel === null) { + var lndModel = { + toggle: 0 + }; + + checkoutCtrl.lndModel = lndModel; + } + + if (!jsonData.isLightning) { + checkoutCtrl.lndModel = null; + } + + // displaying satoshis for lightning payments + jsonData.cryptoCodeSrv = jsonData.cryptoCode; + if (jsonData.isLightning && checkoutCtrl.lightningAmountInSatoshi && jsonData.cryptoCode === "BTC") { + var SATOSHIME = 100000000; + jsonData.cryptoCode = "Sats"; + jsonData.btcDue = numberFormatted(jsonData.btcDue * SATOSHIME); + jsonData.btcPaid = numberFormatted(jsonData.btcPaid * SATOSHIME); + jsonData.networkFee = numberFormatted(jsonData.networkFee * SATOSHIME); + jsonData.orderAmount = numberFormatted(jsonData.orderAmount * SATOSHIME); + } + + // expand line items to show details on amount due for multi-transaction payment + if (checkoutCtrl.srvModel.txCount === 1 && jsonData.txCount > 1) { + onlyExpandLineItems(); + } + + // updating ui + checkoutCtrl.srvModel = jsonData; +} + +function numberFormatted(x) { + var rounded = Math.round(x); + var parts = rounded.toString().split("."); + parts[0] = parts[0].replace(/\B(?=(\d{3})+(?!\d))/g, " "); + return parts.join("."); +} + +function fetchStatus() { + $.ajax({ + url: window.location.pathname + "/status?invoiceId=" + srvModel.invoiceId + "&paymentMethodId=" + srvModel.paymentMethodId, + type: "GET", + cache: false + }).done(function (data) { + onDataCallback(data); + }).fail(function (jqXHR, textStatus, errorThrown) { + + }); +} + +function lndToggleBolt11() { + checkoutCtrl.lndModel.toggle = 0; + checkoutCtrl.scanDisplayQr = checkoutCtrl.srvModel.invoiceBitcoinUrlQR; +} + +function lndToggleNode() { + checkoutCtrl.lndModel.toggle = 1; + checkoutCtrl.scanDisplayQr = checkoutCtrl.srvModel.peerInfo; +} + +var lineItemsExpanded = false; +function toggleLineItems() { + $("line-items").toggleClass("expanded"); + lineItemsExpanded ? $("line-items").slideUp() : $("line-items").slideDown(); + lineItemsExpanded = !lineItemsExpanded; + + $(".buyerTotalLine").toggleClass("expanded"); + $(".single-item-order__right__btc-price__chevron").toggleClass("expanded"); +} + +function onlyExpandLineItems() { + if (!lineItemsExpanded) { + toggleLineItems(); + } +} + + +// private methods +$(document).ready(function () { + // initialize + onDataCallback(srvModel); + // initial expand of line items to show error message if multiple payments needed + if (srvModel.status === "new" && srvModel.txCount > 1) { + onlyExpandLineItems(); + } + + // check if the Document expired + if (srvModel.expirationSeconds > 0) { + progressStart(srvModel.maxTimeSeconds); // Progress bar + + if (srvModel.requiresRefundEmail && !validateEmail(srvModel.customerEmail)) + showEmailForm(); + else + hideEmailForm(); + } + + $(".close-action").on("click", function () { + $("invoice").fadeOut(300, function () { + window.parent.postMessage("close", "*"); + }); + }); + + window.parent.postMessage("loaded", "*"); + jQuery("invoice").fadeOut(0); + jQuery("invoice").fadeIn(300); + + // eof initialize + + // Expand Line-Items + $(".buyerTotalLine").click(function () { + toggleLineItems(); + }); + + // FUNCTIONS + function hideEmailForm() { + $("#emailAddressView").removeClass("active"); + $("placeholder-refundEmail").html(srvModel.customerEmail); + + // Remove Email mode + $(".modal-dialog").removeClass("enter-purchaser-email"); + $("#scan").addClass("active"); + } + // Email Form + // Setup Email mode + function showEmailForm() { + $(".modal-dialog").addClass("enter-purchaser-email"); + + $("#emailAddressForm .action-button").click(function () { + var emailAddress = $("#emailAddressFormInput").val(); + if (validateEmail(emailAddress)) { + $("#emailAddressForm .input-wrapper bp-loading-button .action-button").addClass("loading"); + // Push the email to a server, once the reception is confirmed move on + srvModel.customerEmail = emailAddress; + $.ajax({ + url: window.location.pathname + "/UpdateCustomer?invoiceId=" + srvModel.invoiceId, + type: "POST", + data: JSON.stringify({ Email: srvModel.customerEmail }), + contentType: "application/json; charset=utf-8" + }).done(function () { + hideEmailForm(); + }).fail(function (jqXHR, textStatus, errorThrown) { + + }) + .always(function () { + $("#emailAddressForm .input-wrapper bp-loading-button .action-button").removeClass("loading"); + }); + } else { + $("#emailAddressForm").addClass("ng-touched ng-dirty ng-submitted ng-invalid"); + } + + return false; + }); + } + + // Validate Email address + function validateEmail(email) { + var re = /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/; + return re.test(email); + } + + /* =============== Even listeners =============== */ + + // Email + $("#emailAddressFormInput").change(function () { + if ($("#emailAddressForm").hasClass("ng-submitted")) { + $("#emailAddressForm").removeClass("ng-submitted"); + } + }); + + + // Scan/Copy Transitions + // Scan Tab + $("#scan-tab").click(function () { + resetTabsSlider(); + activateTab("#scan"); + }); + + // Copy tab + $("#copy-tab").click(function () { + resetTabsSlider(); + activateTab("#copy"); + + $("#tabsSlider").addClass("slide-copy"); + }); + + // Altcoins tab + $("#altcoins-tab").click(function () { + resetTabsSlider(); + activateTab("#altcoins"); + + $("#tabsSlider").addClass("slide-altcoins"); + }); + + function activateTab(senderName) { + $(senderName + "-tab").addClass("active"); + + $(senderName).show(); + $(senderName).addClass("active"); + } + + // Payment received + // Should connect using webhook ? + // If notification received + + var socket = null; + var supportsWebSockets = 'WebSocket' in window && window.WebSocket.CLOSING === 2; + if (supportsWebSockets) { + var loc = window.location, ws_uri; + if (loc.protocol === "https:") { + ws_uri = "wss:"; + } else { + ws_uri = "ws:"; + } + ws_uri += "//" + loc.host; + ws_uri += loc.pathname + "/status/ws?invoiceId=" + srvModel.invoiceId; + try { + socket = new WebSocket(ws_uri); + socket.onmessage = function (e) { + fetchStatus(); + }; + socket.onerror = function (e) { + console.error("Error while connecting to websocket for invoice notifications (callback)"); + }; + } + catch (e) { + console.error("Error while connecting to websocket for invoice notifications"); + } + } + + var watcher = setInterval(function () { + if (socket === null || socket.readyState !== 1) { + fetchStatus(); + } + }, 2000); + + $(".menu__item").click(function () { + $(".menu__scroll .menu__item").removeClass("selected"); + $(this).addClass("selected"); + language(); + $(".selector span").text($(".selected").text()); + // function to load contents in different language should go there + }); + + // Timer Countdown && Progress bar + function progressStart(timerMax) { + var end = new Date(); // Setup Time Variable, should come from server + end.setSeconds(end.getSeconds() + srvModel.expirationSeconds); + timerMax *= 1000; // Usually 15 minutes = 9000 second= 900000 ms + animateUpdate(); //Launch it + + function animateUpdate() { + var now = new Date(); + var timeDiff = end.getTime() - now.getTime(); + var perc = 100 - Math.round(timeDiff / timerMax * 100); + var status = checkoutCtrl.srvModel.status; + + updateTimer(timeDiff / 1000); + + if (perc === 75 && (status === "paidPartial" || status === "new")) { + $(".timer-row").addClass("expiring-soon"); + checkoutCtrl.expiringSoon = true; + updateProgress(perc); + } + if (perc <= 100) { + updateProgress(perc); + + var timeoutVal = 300; // Timeout calc + setTimeout(animateUpdate, timeoutVal); + } + + //if (perc >= 100 && status === "expired") { + // onDataCallback(status); + //} + } + + function updateProgress(percentage) { + $('.timer-row__progress-bar').css("width", percentage + "%"); + } + + function updateTimer(timer) { + var display = $(".timer-row__time-left"); + if (timer >= 0) { + var minutes = parseInt(timer / 60, 10); + minutes = minutes < 10 ? "0" + minutes : minutes; + + var seconds = parseInt(timer % 60, 10); + seconds = seconds < 10 ? "0" + seconds : seconds; + + display.text(minutes + ":" + seconds); + } else { + display.text("00:00"); + } + } + } + + // Clipboard Copy + var copySpan = new Clipboard('._copySpan', { + target: function (trigger) { + return copyElement(trigger, 0, 65).firstChild; + } + }); + var copyInput = new Clipboard('._copyInput', { + target: function (trigger) { + return copyElement(trigger, 4, 65).firstChild; + } + }); + + function copyElement(trigger, popupLeftModifier, popupTopModifier) { + var elm = $(trigger); + var position = elm.offset(); + position.top -= popupLeftModifier; + position.left += (elm.width() / 2) - popupTopModifier; + $(".copyLabelPopup").css(position).addClass("copied"); + + elm.removeClass("copy-cursor").addClass("clipboardCopied"); + setTimeout(clearSelection, 100); + setTimeout(function () { + elm.removeClass("clipboardCopied").addClass("copy-cursor"); + $(".copyLabelPopup").removeClass("copied"); + }, 1000); + return trigger; + } + function clearSelection() { + if (window.getSelection) { window.getSelection().removeAllRanges(); } + else if (document.selection) { document.selection.empty(); } + } + // EOF Copy + + // Disable enter key + $(document).keypress( + function (event) { + if (event.which === '13') { + event.preventDefault(); + } + } + ); + +}); diff --git a/BTCPayServer/wwwroot/checkout/js/querystring.js b/BTCPayServer/wwwroot/checkout/js/querystring.js old mode 100644 new mode 100755 diff --git a/BTCPayServer/wwwroot/checkout/js/vexdialog.js b/BTCPayServer/wwwroot/checkout/js/vexdialog.js new file mode 100755 index 0000000000..f54ff04d8e --- /dev/null +++ b/BTCPayServer/wwwroot/checkout/js/vexdialog.js @@ -0,0 +1,11 @@ +function openPaymentMethodDialog() { + var content = $("#vexPopupDialog").html(); + vex.open({ + unsafeContent: content + }); +} + +function closePaymentMethodDialog(currencyId) { + vex.closeAll(); + return changeCurrency(currencyId); +} diff --git a/BTCPayServer/wwwroot/favicon.ico b/BTCPayServer/wwwroot/favicon.ico old mode 100644 new mode 100755 index b649905cd7..6746740727 Binary files a/BTCPayServer/wwwroot/favicon.ico and b/BTCPayServer/wwwroot/favicon.ico differ diff --git a/BTCPayServer/wwwroot/img/307px-Bitcoin_logo.png b/BTCPayServer/wwwroot/img/307px-Bitcoin_logo.png new file mode 100755 index 0000000000..b5f0861785 Binary files /dev/null and b/BTCPayServer/wwwroot/img/307px-Bitcoin_logo.png differ diff --git a/BTCPayServer/wwwroot/img/AZDfukB.png b/BTCPayServer/wwwroot/img/AZDfukB.png new file mode 100755 index 0000000000..bd414612fc Binary files /dev/null and b/BTCPayServer/wwwroot/img/AZDfukB.png differ diff --git a/BTCPayServer/wwwroot/img/Bitcoin.svg b/BTCPayServer/wwwroot/img/Bitcoin.svg new file mode 100644 index 0000000000..04079be30b --- /dev/null +++ b/BTCPayServer/wwwroot/img/Bitcoin.svg @@ -0,0 +1,7 @@ + + + + + + + diff --git a/BTCPayServer/wwwroot/img/bg.png b/BTCPayServer/wwwroot/img/bg.png old mode 100644 new mode 100755 index 83d424eafa..a2d1260514 Binary files a/BTCPayServer/wwwroot/img/bg.png and b/BTCPayServer/wwwroot/img/bg.png differ diff --git a/BTCPayServer/wwwroot/img/bitcoin.pdf b/BTCPayServer/wwwroot/img/bitcoin.pdf new file mode 100644 index 0000000000..1e19b739f6 Binary files /dev/null and b/BTCPayServer/wwwroot/img/bitcoin.pdf differ diff --git a/BTCPayServer/wwwroot/img/bitcoin.png b/BTCPayServer/wwwroot/img/bitcoin.png new file mode 100755 index 0000000000..a9197177f5 Binary files /dev/null and b/BTCPayServer/wwwroot/img/bitcoin.png differ diff --git a/BTCPayServer/wwwroot/img/blks_logo_black_on_transparent_rgb.svg b/BTCPayServer/wwwroot/img/blks_logo_black_on_transparent_rgb.svg new file mode 100644 index 0000000000..081b523172 --- /dev/null +++ b/BTCPayServer/wwwroot/img/blks_logo_black_on_transparent_rgb.svg @@ -0,0 +1,86 @@ + + + + +Blockstream_logo_rgb_blk + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/BTCPayServer/wwwroot/img/blockstream.png b/BTCPayServer/wwwroot/img/blockstream.png new file mode 100644 index 0000000000..980422186e Binary files /dev/null and b/BTCPayServer/wwwroot/img/blockstream.png differ diff --git a/BTCPayServer/wwwroot/img/btc_pay_BG_twitter.png b/BTCPayServer/wwwroot/img/btc_pay_BG_twitter.png old mode 100644 new mode 100755 index 974a09d331..178bda712e Binary files a/BTCPayServer/wwwroot/img/btc_pay_BG_twitter.png and b/BTCPayServer/wwwroot/img/btc_pay_BG_twitter.png differ diff --git a/BTCPayServer/wwwroot/img/btcpay-1.png b/BTCPayServer/wwwroot/img/btcpay-1.png new file mode 100755 index 0000000000..a5c35522ae Binary files /dev/null and b/BTCPayServer/wwwroot/img/btcpay-1.png differ diff --git a/BTCPayServer/wwwroot/img/btcpay-logo.svg b/BTCPayServer/wwwroot/img/btcpay-logo.svg index bb9f410e11..552fc78605 100644 --- a/BTCPayServer/wwwroot/img/btcpay-logo.svg +++ b/BTCPayServer/wwwroot/img/btcpay-logo.svg @@ -1 +1 @@ -btcpay \ No newline at end of file +GREEN LOGO - 1730x1070 \ No newline at end of file diff --git a/BTCPayServer/wwwroot/img/btcpayjungle_logo2_sticker.svg b/BTCPayServer/wwwroot/img/btcpayjungle_logo2_sticker.svg new file mode 100755 index 0000000000..cd717b4606 --- /dev/null +++ b/BTCPayServer/wwwroot/img/btcpayjungle_logo2_sticker.svg @@ -0,0 +1 @@ +LOGO 02 \ No newline at end of file diff --git a/BTCPayServer/wwwroot/img/btcpaylogo2junglelab.png b/BTCPayServer/wwwroot/img/btcpaylogo2junglelab.png new file mode 100755 index 0000000000..bddca55789 Binary files /dev/null and b/BTCPayServer/wwwroot/img/btcpaylogo2junglelab.png differ diff --git a/BTCPayServer/wwwroot/img/btcpayserver.png b/BTCPayServer/wwwroot/img/btcpayserver.png new file mode 100755 index 0000000000..6020464e83 Binary files /dev/null and b/BTCPayServer/wwwroot/img/btcpayserver.png differ diff --git a/BTCPayServer/wwwroot/img/btcpayserver1.png b/BTCPayServer/wwwroot/img/btcpayserver1.png new file mode 100755 index 0000000000..717659a992 Binary files /dev/null and b/BTCPayServer/wwwroot/img/btcpayserver1.png differ diff --git a/BTCPayServer/wwwroot/img/c-lightning.jpeg b/BTCPayServer/wwwroot/img/c-lightning.jpeg new file mode 100755 index 0000000000..b5305152bf Binary files /dev/null and b/BTCPayServer/wwwroot/img/c-lightning.jpeg differ diff --git a/BTCPayServer/wwwroot/img/cclogo.png b/BTCPayServer/wwwroot/img/cclogo.png new file mode 100644 index 0000000000..cf652e724c Binary files /dev/null and b/BTCPayServer/wwwroot/img/cclogo.png differ diff --git a/BTCPayServer/wwwroot/img/dglab.gif b/BTCPayServer/wwwroot/img/dglab.gif new file mode 100755 index 0000000000..7cba17e7e3 Binary files /dev/null and b/BTCPayServer/wwwroot/img/dglab.gif differ diff --git a/BTCPayServer/wwwroot/img/docs.png b/BTCPayServer/wwwroot/img/docs.png new file mode 100644 index 0000000000..f1a0ea975c Binary files /dev/null and b/BTCPayServer/wwwroot/img/docs.png differ diff --git a/BTCPayServer/wwwroot/img/donation.png b/BTCPayServer/wwwroot/img/donation.png new file mode 100755 index 0000000000..8f1183278a Binary files /dev/null and b/BTCPayServer/wwwroot/img/donation.png differ diff --git a/BTCPayServer/wwwroot/img/greenlogo.svg b/BTCPayServer/wwwroot/img/greenlogo.svg new file mode 100644 index 0000000000..552fc78605 --- /dev/null +++ b/BTCPayServer/wwwroot/img/greenlogo.svg @@ -0,0 +1 @@ +GREEN LOGO - 1730x1070 \ No newline at end of file diff --git a/BTCPayServer/wwwroot/img/ibuki.png b/BTCPayServer/wwwroot/img/ibuki.png new file mode 100755 index 0000000000..8c85da96d7 Binary files /dev/null and b/BTCPayServer/wwwroot/img/ibuki.png differ diff --git a/BTCPayServer/wwwroot/img/junglebkdrp.png b/BTCPayServer/wwwroot/img/junglebkdrp.png new file mode 100755 index 0000000000..40425f7b39 Binary files /dev/null and b/BTCPayServer/wwwroot/img/junglebkdrp.png differ diff --git a/BTCPayServer/wwwroot/img/lndlogo.png b/BTCPayServer/wwwroot/img/lndlogo.png new file mode 100755 index 0000000000..a571d3b509 Binary files /dev/null and b/BTCPayServer/wwwroot/img/lndlogo.png differ diff --git a/BTCPayServer/wwwroot/img/lock-logo.png b/BTCPayServer/wwwroot/img/lock-logo.png old mode 100644 new mode 100755 index 0c9f3457c1..041ab1377e Binary files a/BTCPayServer/wwwroot/img/lock-logo.png and b/BTCPayServer/wwwroot/img/lock-logo.png differ diff --git a/BTCPayServer/wwwroot/img/logo-white.svg b/BTCPayServer/wwwroot/img/logo-white.svg new file mode 100755 index 0000000000..ebf8c65d0b --- /dev/null +++ b/BTCPayServer/wwwroot/img/logo-white.svg @@ -0,0 +1 @@ +1730x1070 - Blanc \ No newline at end of file diff --git a/BTCPayServer/wwwroot/img/logo.png b/BTCPayServer/wwwroot/img/logo.png old mode 100644 new mode 100755 index 9b469c677b..a08ef684a6 Binary files a/BTCPayServer/wwwroot/img/logo.png and b/BTCPayServer/wwwroot/img/logo.png differ diff --git a/BTCPayServer/wwwroot/img/logo.svg b/BTCPayServer/wwwroot/img/logo.svg old mode 100644 new mode 100755 diff --git a/BTCPayServer/wwwroot/img/logosquare.png b/BTCPayServer/wwwroot/img/logosquare.png new file mode 100755 index 0000000000..b163f41986 Binary files /dev/null and b/BTCPayServer/wwwroot/img/logosquare.png differ diff --git a/BTCPayServer/wwwroot/img/metaco.jpg b/BTCPayServer/wwwroot/img/metaco.jpg new file mode 100755 index 0000000000..b0f450594c Binary files /dev/null and b/BTCPayServer/wwwroot/img/metaco.jpg differ diff --git a/BTCPayServer/wwwroot/img/money-logo.png b/BTCPayServer/wwwroot/img/money-logo.png old mode 100644 new mode 100755 index 2f93735cab..fd4d7a48ef Binary files a/BTCPayServer/wwwroot/img/money-logo.png and b/BTCPayServer/wwwroot/img/money-logo.png differ diff --git a/BTCPayServer/wwwroot/img/paybutton/donate.png b/BTCPayServer/wwwroot/img/paybutton/donate.png old mode 100644 new mode 100755 index 5f04d17aec..94e62f76b0 Binary files a/BTCPayServer/wwwroot/img/paybutton/donate.png and b/BTCPayServer/wwwroot/img/paybutton/donate.png differ diff --git a/BTCPayServer/wwwroot/img/qr-logo.png b/BTCPayServer/wwwroot/img/qr-logo.png old mode 100644 new mode 100755 index f2a039e534..882647ed1f Binary files a/BTCPayServer/wwwroot/img/qr-logo.png and b/BTCPayServer/wwwroot/img/qr-logo.png differ diff --git a/BTCPayServer/wwwroot/img/qrcode.png b/BTCPayServer/wwwroot/img/qrcode.png new file mode 100755 index 0000000000..a22bf77ebe Binary files /dev/null and b/BTCPayServer/wwwroot/img/qrcode.png differ diff --git a/BTCPayServer/wwwroot/img/youtube.png b/BTCPayServer/wwwroot/img/youtube.png old mode 100644 new mode 100755 diff --git a/BTCPayServer/wwwroot/imlegacy/archived.svg b/BTCPayServer/wwwroot/imlegacy/archived.svg old mode 100644 new mode 100755 diff --git a/BTCPayServer/wwwroot/imlegacy/bitcoin-lightning-proposal.svg b/BTCPayServer/wwwroot/imlegacy/bitcoin-lightning-proposal.svg old mode 100644 new mode 100755 diff --git a/BTCPayServer/wwwroot/imlegacy/bitcoin-lightning.svg b/BTCPayServer/wwwroot/imlegacy/bitcoin-lightning.svg old mode 100644 new mode 100755 diff --git a/BTCPayServer/wwwroot/imlegacy/bitcoin.svg b/BTCPayServer/wwwroot/imlegacy/bitcoin.svg old mode 100644 new mode 100755 diff --git a/BTCPayServer/wwwroot/imlegacy/btg-lightning.svg b/BTCPayServer/wwwroot/imlegacy/btg-lightning.svg old mode 100644 new mode 100755 diff --git a/BTCPayServer/wwwroot/imlegacy/btg.svg b/BTCPayServer/wwwroot/imlegacy/btg.svg old mode 100644 new mode 100755 diff --git a/BTCPayServer/wwwroot/imlegacy/checkmark-small.svg b/BTCPayServer/wwwroot/imlegacy/checkmark-small.svg old mode 100644 new mode 100755 diff --git a/BTCPayServer/wwwroot/imlegacy/checkmark.svg b/BTCPayServer/wwwroot/imlegacy/checkmark.svg old mode 100644 new mode 100755 diff --git a/BTCPayServer/wwwroot/imlegacy/circle-check.svg b/BTCPayServer/wwwroot/imlegacy/circle-check.svg old mode 100644 new mode 100755 diff --git a/BTCPayServer/wwwroot/imlegacy/dash.png b/BTCPayServer/wwwroot/imlegacy/dash.png old mode 100644 new mode 100755 diff --git a/BTCPayServer/wwwroot/imlegacy/dogecoin.png b/BTCPayServer/wwwroot/imlegacy/dogecoin.png old mode 100644 new mode 100755 diff --git a/BTCPayServer/wwwroot/imlegacy/feathercoin.png b/BTCPayServer/wwwroot/imlegacy/feathercoin.png old mode 100644 new mode 100755 diff --git a/BTCPayServer/wwwroot/imlegacy/groestlcoin-lightning.png b/BTCPayServer/wwwroot/imlegacy/groestlcoin-lightning.png new file mode 100755 index 0000000000..b15107a821 Binary files /dev/null and b/BTCPayServer/wwwroot/imlegacy/groestlcoin-lightning.png differ diff --git a/BTCPayServer/wwwroot/imlegacy/groestlcoin.png b/BTCPayServer/wwwroot/imlegacy/groestlcoin.png old mode 100644 new mode 100755 diff --git a/BTCPayServer/wwwroot/imlegacy/litecoin-lightning-proposal.svg b/BTCPayServer/wwwroot/imlegacy/litecoin-lightning-proposal.svg old mode 100644 new mode 100755 diff --git a/BTCPayServer/wwwroot/imlegacy/litecoin-lightning.svg b/BTCPayServer/wwwroot/imlegacy/litecoin-lightning.svg old mode 100644 new mode 100755 diff --git a/BTCPayServer/wwwroot/imlegacy/litecoin.svg b/BTCPayServer/wwwroot/imlegacy/litecoin.svg old mode 100644 new mode 100755 diff --git a/BTCPayServer/wwwroot/imlegacy/mail.svg b/BTCPayServer/wwwroot/imlegacy/mail.svg old mode 100644 new mode 100755 diff --git a/BTCPayServer/wwwroot/imlegacy/mona-lightning.svg b/BTCPayServer/wwwroot/imlegacy/mona-lightning.svg old mode 100644 new mode 100755 diff --git a/BTCPayServer/wwwroot/imlegacy/monacoin.png b/BTCPayServer/wwwroot/imlegacy/monacoin.png old mode 100644 new mode 100755 diff --git a/BTCPayServer/wwwroot/imlegacy/pending.svg b/BTCPayServer/wwwroot/imlegacy/pending.svg old mode 100644 new mode 100755 diff --git a/BTCPayServer/wwwroot/imlegacy/polis.png b/BTCPayServer/wwwroot/imlegacy/polis.png old mode 100644 new mode 100755 diff --git a/BTCPayServer/wwwroot/imlegacy/refund-pending.svg b/BTCPayServer/wwwroot/imlegacy/refund-pending.svg old mode 100644 new mode 100755 diff --git a/BTCPayServer/wwwroot/imlegacy/ufo.png b/BTCPayServer/wwwroot/imlegacy/ufo.png old mode 100644 new mode 100755 diff --git a/BTCPayServer/wwwroot/imlegacy/viacoin.png b/BTCPayServer/wwwroot/imlegacy/viacoin.png old mode 100644 new mode 100755 diff --git a/BTCPayServer/wwwroot/imlegacy/viacoin.svg b/BTCPayServer/wwwroot/imlegacy/viacoin.svg old mode 100644 new mode 100755 diff --git a/BTCPayServer/wwwroot/js/StoreAddDerivationScheme.js b/BTCPayServer/wwwroot/js/StoreAddDerivationScheme.js old mode 100644 new mode 100755 diff --git a/BTCPayServer/wwwroot/js/ledgerwebsocket.js b/BTCPayServer/wwwroot/js/ledgerwebsocket.js new file mode 100755 index 0000000000..118ca7a69e --- /dev/null +++ b/BTCPayServer/wwwroot/js/ledgerwebsocket.js @@ -0,0 +1,7 @@ +var ledgerwebsocket=function(t){function e(n){if(r[n])return r[n].exports;var o=r[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,e),o.l=!0,o.exports}var r={};return e.m=t,e.c=r,e.d=function(t,r,n){e.o(t,r)||Object.defineProperty(t,r,{configurable:!1,enumerable:!0,get:n})},e.n=function(t){var r=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(r,"a",r),r},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e(e.s=67)}([function(t,e){var r=t.exports={version:"2.5.3"};"number"==typeof __e&&(__e=r)},function(t,e){var r=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=r)},function(t,e,r){var n=r(33)("wks"),o=r(21),i=r(1).Symbol,u="function"==typeof i;(t.exports=function(t){return n[t]||(n[t]=u&&i[t]||(u?i:o)("Symbol."+t))}).store=n},function(t,e,r){var n=r(1),o=r(0),i=r(10),u=r(8),s=function(t,e,r){var a,f,c,l=t&s.F,h=t&s.G,p=t&s.S,d=t&s.P,v=t&s.B,y=t&s.W,g=h?o:o[e]||(o[e]={}),_=g.prototype,m=h?n:p?n[e]:(n[e]||{}).prototype;h&&(r=e);for(a in r)(f=!l&&m&&void 0!==m[a])&&a in g||(c=f?m[a]:r[a],g[a]=h&&"function"!=typeof m[a]?r[a]:v&&f?i(c,n):y&&m[a]==c?function(t){var e=function(e,r,n){if(this instanceof t){switch(arguments.length){case 0:return new t;case 1:return new t(e);case 2:return new t(e,r)}return new t(e,r,n)}return t.apply(this,arguments)};return e.prototype=t.prototype,e}(c):d&&"function"==typeof c?i(Function.call,c):c,d&&((g.virtual||(g.virtual={}))[a]=c,t&s.R&&_&&!_[a]&&u(_,a,c)))};s.F=1,s.G=2,s.S=4,s.P=8,s.B=16,s.W=32,s.U=64,s.R=128,t.exports=s},function(t,e,r){var n=r(6);t.exports=function(t){if(!n(t))throw TypeError(t+" is not an object!");return t}},function(t,e,r){var n=r(4),o=r(46),i=r(29),u=Object.defineProperty;e.f=r(7)?Object.defineProperty:function(t,e,r){if(n(t),e=i(e,!0),n(r),o)try{return u(t,e,r)}catch(t){}if("get"in r||"set"in r)throw TypeError("Accessors not supported!");return"value"in r&&(t[e]=r.value),t}},function(t,e){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},function(t,e,r){t.exports=!r(11)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(t,e,r){var n=r(5),o=r(13);t.exports=r(7)?function(t,e,r){return n.f(t,e,o(1,r))}:function(t,e,r){return t[e]=r,t}},function(t,e){var r={}.hasOwnProperty;t.exports=function(t,e){return r.call(t,e)}},function(t,e,r){var n=r(20);t.exports=function(t,e,r){if(n(t),void 0===e)return t;switch(r){case 1:return function(r){return t.call(e,r)};case 2:return function(r,n){return t.call(e,r,n)};case 3:return function(r,n,o){return t.call(e,r,n,o)}}return function(){return t.apply(e,arguments)}}},function(t,e){t.exports=function(t){try{return!!t()}catch(t){return!0}}},function(t,e,r){var n=r(49),o=r(27);t.exports=function(t){return n(o(t))}},function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},function(t,e){t.exports={}},function(t,e,r){var n=r(48),o=r(34);t.exports=Object.keys||function(t){return n(t,o)}},function(t,e){var r={}.toString;t.exports=function(t){return r.call(t).slice(8,-1)}},function(t,e,r){var n=r(27);t.exports=function(t){return Object(n(t))}},function(t,e,r){"use strict";var n=r(75)(!0);r(45)(String,"String",function(t){this._t=String(t),this._i=0},function(){var t,e=this._t,r=this._i;return r>=e.length?{value:void 0,done:!0}:(t=n(e,r),this._i+=t.length,{value:t,done:!1})})},function(t,e){t.exports=!0},function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},function(t,e){var r=0,n=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++r+n).toString(36))}},function(t,e,r){var n=r(5).f,o=r(9),i=r(2)("toStringTag");t.exports=function(t,e,r){t&&!o(t=r?t:t.prototype,i)&&n(t,i,{configurable:!0,value:e})}},function(t,e){e.f={}.propertyIsEnumerable},function(t,e,r){"use strict";(function(t){function n(){return i.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function o(t,e){if(n()=n())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+n().toString(16)+" bytes");return 0|t}function v(t){return+t!=t&&(t=0),i.alloc(+t)}function y(t,e){if(i.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 r=t.length;if(0===r)return 0;for(var n=!1;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return q(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return V(t).length;default:if(n)return q(t).length;e=(""+e).toLowerCase(),n=!0}}function g(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"";for(t||(t="utf8");;)switch(t){case"hex":return M(this,e,r);case"utf8":case"utf-8":return P(this,e,r);case"ascii":return I(this,e,r);case"latin1":case"binary":return L(this,e,r);case"base64":return A(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return N(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function _(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function m(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,isNaN(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=i.from(e,n)),i.isBuffer(e))return 0===e.length?-1:w(t,e,r,n,o);if("number"==typeof e)return e&=255,i.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):w(t,[e],r,n,o);throw new TypeError("val must be string, number or Buffer")}function w(t,e,r,n,o){function i(t,e){return 1===u?t[e]:t.readUInt16BE(e*u)}var u=1,s=t.length,a=e.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||e.length<2)return-1;u=2,s/=2,a/=2,r/=2}var f;if(o){var c=-1;for(f=r;fs&&(r=s-a),f=r;f>=0;f--){for(var l=!0,h=0;ho&&(n=o):n=o;var i=e.length;if(i%2!=0)throw new TypeError("Invalid hex string");n>i/2&&(n=i/2);for(var u=0;u239?4:i>223?3:i>191?2:1;if(o+s<=r){var a,f,c,l;switch(s){case 1:i<128&&(u=i);break;case 2:a=t[o+1],128==(192&a)&&(l=(31&i)<<6|63&a)>127&&(u=l);break;case 3:a=t[o+1],f=t[o+2],128==(192&a)&&128==(192&f)&&(l=(15&i)<<12|(63&a)<<6|63&f)>2047&&(l<55296||l>57343)&&(u=l);break;case 4:a=t[o+1],f=t[o+2],c=t[o+3],128==(192&a)&&128==(192&f)&&128==(192&c)&&(l=(15&i)<<18|(63&a)<<12|(63&f)<<6|63&c)>65535&&l<1114112&&(u=l)}}null===u?(u=65533,s=1):u>65535&&(u-=65536,n.push(u>>>10&1023|55296),u=56320|1023&u),n.push(u),o+=s}return R(n)}function R(t){var e=t.length;if(e<=$)return String.fromCharCode.apply(String,t);for(var r="",n=0;nn)&&(r=n);for(var o="",i=e;ir)throw new RangeError("Trying to access beyond buffer length")}function U(t,e,r,n,o,u){if(!i.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>o||et.length)throw new RangeError("Index out of range")}function k(t,e,r,n){e<0&&(e=65535+e+1);for(var o=0,i=Math.min(t.length-r,2);o>>8*(n?o:1-o)}function j(t,e,r,n){e<0&&(e=4294967295+e+1);for(var o=0,i=Math.min(t.length-r,4);o>>8*(n?o:3-o)&255}function D(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 B(t,e,r,n,o){return o||D(t,e,r,4,3.4028234663852886e38,-3.4028234663852886e38),J.write(t,e,r,n,23,4),r+4}function F(t,e,r,n,o){return o||D(t,e,r,8,1.7976931348623157e308,-1.7976931348623157e308),J.write(t,e,r,n,52,8),r+8}function Y(t){if(t=G(t).replace(tt,""),t.length<2)return"";for(;t.length%4!=0;)t+="=";return t}function G(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function K(t){return t<16?"0"+t.toString(16):t.toString(16)}function q(t,e){e=e||1/0;for(var r,n=t.length,o=null,i=[],u=0;u55295&&r<57344){if(!o){if(r>56319){(e-=3)>-1&&i.push(239,191,189);continue}if(u+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 H(t){for(var e=[],r=0;r>8,o=r%256,i.push(o),i.push(n);return i}function V(t){return Q.toByteArray(Y(t))}function X(t,e,r,n){for(var o=0;o=e.length||o>=t.length);++o)e[o+r]=t[o];return o}function z(t){return t!==t}/*! + * The buffer module from node.js, for the browser. + * + * @author Feross Aboukhadijeh + * @license MIT + */ +var Q=r(68),J=r(69),Z=r(70);e.Buffer=i,e.SlowBuffer=v,e.INSPECT_MAX_BYTES=50,i.TYPED_ARRAY_SUPPORT=void 0!==t.TYPED_ARRAY_SUPPORT?t.TYPED_ARRAY_SUPPORT:function(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===t.foo()&&"function"==typeof t.subarray&&0===t.subarray(1,1).byteLength}catch(t){return!1}}(),e.kMaxLength=n(),i.poolSize=8192,i._augment=function(t){return t.__proto__=i.prototype,t},i.from=function(t,e,r){return u(null,t,e,r)},i.TYPED_ARRAY_SUPPORT&&(i.prototype.__proto__=Uint8Array.prototype,i.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&i[Symbol.species]===i&&Object.defineProperty(i,Symbol.species,{value:null,configurable:!0})),i.alloc=function(t,e,r){return a(null,t,e,r)},i.allocUnsafe=function(t){return f(null,t)},i.allocUnsafeSlow=function(t){return f(null,t)},i.isBuffer=function(t){return!(null==t||!t._isBuffer)},i.compare=function(t,e){if(!i.isBuffer(t)||!i.isBuffer(e))throw new TypeError("Arguments must be Buffers");if(t===e)return 0;for(var r=t.length,n=e.length,o=0,u=Math.min(r,n);o0&&(t=this.toString("hex",0,r).match(/.{2}/g).join(" "),this.length>r&&(t+=" ... ")),""},i.prototype.compare=function(t,e,r,n,o){if(!i.isBuffer(t))throw new TypeError("Argument must be a Buffer");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 u=o-n,s=r-e,a=Math.min(u,s),f=this.slice(n,o),c=t.slice(e,r),l=0;lo)&&(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 E(this,t,e,r);case"utf8":case"utf-8":return b(this,t,e,r);case"ascii":return S(this,t,e,r);case"latin1":case"binary":return T(this,t,e,r);case"base64":return x(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return O(this,t,e,r);default:if(i)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),i=!0}},i.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var $=4096;i.prototype.slice=function(t,e){var r=this.length;t=~~t,e=void 0===e?r:~~e,t<0?(t+=r)<0&&(t=0):t>r&&(t=r),e<0?(e+=r)<0&&(e=0):e>r&&(e=r),e0&&(o*=256);)n+=this[t+--e]*o;return n},i.prototype.readUInt8=function(t,e){return e||C(t,1,this.length),this[t]},i.prototype.readUInt16LE=function(t,e){return e||C(t,2,this.length),this[t]|this[t+1]<<8},i.prototype.readUInt16BE=function(t,e){return e||C(t,2,this.length),this[t]<<8|this[t+1]},i.prototype.readUInt32LE=function(t,e){return e||C(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},i.prototype.readUInt32BE=function(t,e){return e||C(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},i.prototype.readIntLE=function(t,e,r){t|=0,e|=0,r||C(t,e,this.length);for(var n=this[t],o=1,i=0;++i=o&&(n-=Math.pow(2,8*e)),n},i.prototype.readIntBE=function(t,e,r){t|=0,e|=0,r||C(t,e,this.length);for(var n=e,o=1,i=this[t+--n];n>0&&(o*=256);)i+=this[t+--n]*o;return o*=128,i>=o&&(i-=Math.pow(2,8*e)),i},i.prototype.readInt8=function(t,e){return e||C(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},i.prototype.readInt16LE=function(t,e){e||C(t,2,this.length);var r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},i.prototype.readInt16BE=function(t,e){e||C(t,2,this.length);var r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},i.prototype.readInt32LE=function(t,e){return e||C(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},i.prototype.readInt32BE=function(t,e){return e||C(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},i.prototype.readFloatLE=function(t,e){return e||C(t,4,this.length),J.read(this,t,!0,23,4)},i.prototype.readFloatBE=function(t,e){return e||C(t,4,this.length),J.read(this,t,!1,23,4)},i.prototype.readDoubleLE=function(t,e){return e||C(t,8,this.length),J.read(this,t,!0,52,8)},i.prototype.readDoubleBE=function(t,e){return e||C(t,8,this.length),J.read(this,t,!1,52,8)},i.prototype.writeUIntLE=function(t,e,r,n){if(t=+t,e|=0,r|=0,!n){U(this,t,e,r,Math.pow(2,8*r)-1,0)}var o=1,i=0;for(this[e]=255&t;++i=0&&(i*=256);)this[e+o]=t/i&255;return e+r},i.prototype.writeUInt8=function(t,e,r){return t=+t,e|=0,r||U(this,t,e,1,255,0),i.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=255&t,e+1},i.prototype.writeUInt16LE=function(t,e,r){return t=+t,e|=0,r||U(this,t,e,2,65535,0),i.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):k(this,t,e,!0),e+2},i.prototype.writeUInt16BE=function(t,e,r){return t=+t,e|=0,r||U(this,t,e,2,65535,0),i.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):k(this,t,e,!1),e+2},i.prototype.writeUInt32LE=function(t,e,r){return t=+t,e|=0,r||U(this,t,e,4,4294967295,0),i.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t):j(this,t,e,!0),e+4},i.prototype.writeUInt32BE=function(t,e,r){return t=+t,e|=0,r||U(this,t,e,4,4294967295,0),i.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):j(this,t,e,!1),e+4},i.prototype.writeIntLE=function(t,e,r,n){if(t=+t,e|=0,!n){var o=Math.pow(2,8*r-1);U(this,t,e,r,o-1,-o)}var i=0,u=1,s=0;for(this[e]=255&t;++i>0)-s&255;return e+r},i.prototype.writeIntBE=function(t,e,r,n){if(t=+t,e|=0,!n){var o=Math.pow(2,8*r-1);U(this,t,e,r,o-1,-o)}var i=r-1,u=1,s=0;for(this[e+i]=255&t;--i>=0&&(u*=256);)t<0&&0===s&&0!==this[e+i+1]&&(s=1),this[e+i]=(t/u>>0)-s&255;return e+r},i.prototype.writeInt8=function(t,e,r){return t=+t,e|=0,r||U(this,t,e,1,127,-128),i.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[e]=255&t,e+1},i.prototype.writeInt16LE=function(t,e,r){return t=+t,e|=0,r||U(this,t,e,2,32767,-32768),i.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):k(this,t,e,!0),e+2},i.prototype.writeInt16BE=function(t,e,r){return t=+t,e|=0,r||U(this,t,e,2,32767,-32768),i.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):k(this,t,e,!1),e+2},i.prototype.writeInt32LE=function(t,e,r){return t=+t,e|=0,r||U(this,t,e,4,2147483647,-2147483648),i.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):j(this,t,e,!0),e+4},i.prototype.writeInt32BE=function(t,e,r){return t=+t,e|=0,r||U(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),i.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):j(this,t,e,!1),e+4},i.prototype.writeFloatLE=function(t,e,r){return B(this,t,e,!0,r)},i.prototype.writeFloatBE=function(t,e,r){return B(this,t,e,!1,r)},i.prototype.writeDoubleLE=function(t,e,r){return F(this,t,e,!0,r)},i.prototype.writeDoubleBE=function(t,e,r){return F(this,t,e,!1,r)},i.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=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=0;--o)t[o+e]=this[o+r];else if(u<1e3||!i.TYPED_ARRAY_SUPPORT)for(o=0;o>>=0,r=void 0===r?this.length:r>>>0,t||(t=0);var u;if("number"==typeof t)for(u=e;u0?n:r)(t)}},function(t,e){t.exports=function(t){if(void 0==t)throw TypeError("Can't call method on "+t);return t}},function(t,e,r){var n=r(6),o=r(1).document,i=n(o)&&n(o.createElement);t.exports=function(t){return i?o.createElement(t):{}}},function(t,e,r){var n=r(6);t.exports=function(t,e){if(!n(t))return t;var r,o;if(e&&"function"==typeof(r=t.toString)&&!n(o=r.call(t)))return o;if("function"==typeof(r=t.valueOf)&&!n(o=r.call(t)))return o;if(!e&&"function"==typeof(r=t.toString)&&!n(o=r.call(t)))return o;throw TypeError("Can't convert object to primitive value")}},function(t,e,r){var n=r(4),o=r(77),i=r(34),u=r(32)("IE_PROTO"),s=function(){},a=function(){var t,e=r(28)("iframe"),n=i.length;for(e.style.display="none",r(50).appendChild(e),e.src="javascript:",t=e.contentWindow.document,t.open(),t.write(" + // + /* generated by vue-loader */ + + /***/ +}, +/* 3 */ +/***/ function (module, exports, __webpack_require__) { + + var QRCode = __webpack_require__(4); + var ErrorCorrectLevel = __webpack_require__(8); + + var qrcode = function (data, opt) { + opt = opt || {}; + var qr = new QRCode(opt.typeNumber || -1, + opt.errorCorrectLevel || ErrorCorrectLevel.H); + qr.addData(data); + qr.make(); + + return qr; + }; + + qrcode.ErrorCorrectLevel = ErrorCorrectLevel; + + module.exports = qrcode; + + + + /***/ +}, +/* 4 */ +/***/ function (module, exports, __webpack_require__) { + + var BitByte = __webpack_require__(5); + var RSBlock = __webpack_require__(7); + var BitBuffer = __webpack_require__(9); + var util = __webpack_require__(10); + var Polynomial = __webpack_require__(11); + + function QRCode(typeNumber, errorCorrectLevel) { + this.typeNumber = typeNumber; + this.errorCorrectLevel = errorCorrectLevel; + this.modules = null; + this.moduleCount = 0; + this.dataCache = null; + this.dataList = []; + } + + // for client side minification + var proto = QRCode.prototype; + + proto.addData = function (data) { + var newData = new BitByte(data); + this.dataList.push(newData); + this.dataCache = null; + }; + + proto.isDark = function (row, col) { + if (row < 0 || this.moduleCount <= row || col < 0 || this.moduleCount <= col) { + throw new Error(row + "," + col); + } + return this.modules[row][col]; + }; + + proto.getModuleCount = function () { + return this.moduleCount; + }; + + proto.make = function () { + // Calculate automatically typeNumber if provided is < 1 + if (this.typeNumber < 1) { + var typeNumber = 1; + for (typeNumber = 1; typeNumber < 40; typeNumber++) { + var rsBlocks = RSBlock.getRSBlocks(typeNumber, this.errorCorrectLevel); + + var buffer = new BitBuffer(); + var totalDataCount = 0; + for (var i = 0; i < rsBlocks.length; i++) { + totalDataCount += rsBlocks[i].dataCount; + } + + for (var i = 0; i < this.dataList.length; i++) { + var data = this.dataList[i]; + buffer.put(data.mode, 4); + buffer.put(data.getLength(), util.getLengthInBits(data.mode, typeNumber)); + data.write(buffer); + } + if (buffer.getLengthInBits() <= totalDataCount * 8) + break; + } + this.typeNumber = typeNumber; + } + this.makeImpl(false, this.getBestMaskPattern()); + }; + + proto.makeImpl = function (test, maskPattern) { + + this.moduleCount = this.typeNumber * 4 + 17; + this.modules = new Array(this.moduleCount); + + for (var row = 0; row < this.moduleCount; row++) { + + this.modules[row] = new Array(this.moduleCount); + + for (var col = 0; col < this.moduleCount; col++) { + this.modules[row][col] = null;//(col + row) % 3; + } + } + + this.setupPositionProbePattern(0, 0); + this.setupPositionProbePattern(this.moduleCount - 7, 0); + this.setupPositionProbePattern(0, this.moduleCount - 7); + this.setupPositionAdjustPattern(); + this.setupTimingPattern(); + this.setupTypeInfo(test, maskPattern); + + if (this.typeNumber >= 7) { + this.setupTypeNumber(test); + } + + if (this.dataCache == null) { + this.dataCache = QRCode.createData(this.typeNumber, this.errorCorrectLevel, this.dataList); + } + + this.mapData(this.dataCache, maskPattern); + }; + + proto.setupPositionProbePattern = function (row, col) { + + for (var r = -1; r <= 7; r++) { + + if (row + r <= -1 || this.moduleCount <= row + r) continue; + + for (var c = -1; c <= 7; c++) { + + if (col + c <= -1 || this.moduleCount <= col + c) continue; + + if ((0 <= r && r <= 6 && (c == 0 || c == 6)) + || (0 <= c && c <= 6 && (r == 0 || r == 6)) + || (2 <= r && r <= 4 && 2 <= c && c <= 4)) { + this.modules[row + r][col + c] = true; + } else { + this.modules[row + r][col + c] = false; + } + } + } + }; + + proto.getBestMaskPattern = function () { + + var minLostPoint = 0; + var pattern = 0; + + for (var i = 0; i < 8; i++) { + + this.makeImpl(true, i); + + var lostPoint = util.getLostPoint(this); + + if (i == 0 || minLostPoint > lostPoint) { + minLostPoint = lostPoint; + pattern = i; + } + } + + return pattern; + }; + + proto.createMovieClip = function (target_mc, instance_name, depth) { + + var qr_mc = target_mc.createEmptyMovieClip(instance_name, depth); + var cs = 1; + + this.make(); + + for (var row = 0; row < this.modules.length; row++) { + + var y = row * cs; + + for (var col = 0; col < this.modules[row].length; col++) { + + var x = col * cs; + var dark = this.modules[row][col]; + + if (dark) { + qr_mc.beginFill(0, 100); + qr_mc.moveTo(x, y); + qr_mc.lineTo(x + cs, y); + qr_mc.lineTo(x + cs, y + cs); + qr_mc.lineTo(x, y + cs); + qr_mc.endFill(); + } + } + } + + return qr_mc; + }; + + proto.setupTimingPattern = function () { + + for (var r = 8; r < this.moduleCount - 8; r++) { + if (this.modules[r][6] != null) { + continue; + } + this.modules[r][6] = (r % 2 == 0); + } + + for (var c = 8; c < this.moduleCount - 8; c++) { + if (this.modules[6][c] != null) { + continue; + } + this.modules[6][c] = (c % 2 == 0); + } + }; + + proto.setupPositionAdjustPattern = function () { + + var pos = util.getPatternPosition(this.typeNumber); + + for (var i = 0; i < pos.length; i++) { + + for (var j = 0; j < pos.length; j++) { + + var row = pos[i]; + var col = pos[j]; + + if (this.modules[row][col] != null) { + continue; + } + + for (var r = -2; r <= 2; r++) { + + for (var c = -2; c <= 2; c++) { + + if (r == -2 || r == 2 || c == -2 || c == 2 + || (r == 0 && c == 0)) { + this.modules[row + r][col + c] = true; + } else { + this.modules[row + r][col + c] = false; + } + } + } + } + } + }; + + proto.setupTypeNumber = function (test) { + + var bits = util.getBCHTypeNumber(this.typeNumber); + + for (var i = 0; i < 18; i++) { + var mod = (!test && ((bits >> i) & 1) == 1); + this.modules[Math.floor(i / 3)][i % 3 + this.moduleCount - 8 - 3] = mod; + } + + for (var i = 0; i < 18; i++) { + var mod = (!test && ((bits >> i) & 1) == 1); + this.modules[i % 3 + this.moduleCount - 8 - 3][Math.floor(i / 3)] = mod; + } + }; + + proto.setupTypeInfo = function (test, maskPattern) { + + var data = (this.errorCorrectLevel << 3) | maskPattern; + var bits = util.getBCHTypeInfo(data); + + // vertical + for (var i = 0; i < 15; i++) { + + var mod = (!test && ((bits >> i) & 1) == 1); + + if (i < 6) { + this.modules[i][8] = mod; + } else if (i < 8) { + this.modules[i + 1][8] = mod; + } else { + this.modules[this.moduleCount - 15 + i][8] = mod; + } + } + + // horizontal + for (var i = 0; i < 15; i++) { + + var mod = (!test && ((bits >> i) & 1) == 1); + + if (i < 8) { + this.modules[8][this.moduleCount - i - 1] = mod; + } else if (i < 9) { + this.modules[8][15 - i - 1 + 1] = mod; + } else { + this.modules[8][15 - i - 1] = mod; + } + } + + // fixed module + this.modules[this.moduleCount - 8][8] = (!test); + }; + + proto.mapData = function (data, maskPattern) { + + var inc = -1; + var row = this.moduleCount - 1; + var bitIndex = 7; + var byteIndex = 0; + + for (var col = this.moduleCount - 1; col > 0; col -= 2) { + + if (col == 6) col--; + + while (true) { + + for (var c = 0; c < 2; c++) { + + if (this.modules[row][col - c] == null) { + + var dark = false; + + if (byteIndex < data.length) { + dark = (((data[byteIndex] >>> bitIndex) & 1) == 1); + } + + var mask = util.getMask(maskPattern, row, col - c); + + if (mask) { + dark = !dark; + } + + this.modules[row][col - c] = dark; + bitIndex--; + + if (bitIndex == -1) { + byteIndex++; + bitIndex = 7; + } + } + } + + row += inc; + + if (row < 0 || this.moduleCount <= row) { + row -= inc; + inc = -inc; + break; + } + } + } + }; + + QRCode.PAD0 = 0xEC; + QRCode.PAD1 = 0x11; + + QRCode.createData = function (typeNumber, errorCorrectLevel, dataList) { + + var rsBlocks = RSBlock.getRSBlocks(typeNumber, errorCorrectLevel); + + var buffer = new BitBuffer(); + + for (var i = 0; i < dataList.length; i++) { + var data = dataList[i]; + buffer.put(data.mode, 4); + buffer.put(data.getLength(), util.getLengthInBits(data.mode, typeNumber)); + data.write(buffer); + } + + // calc num max data. + var totalDataCount = 0; + for (var i = 0; i < rsBlocks.length; i++) { + totalDataCount += rsBlocks[i].dataCount; + } + + if (buffer.getLengthInBits() > totalDataCount * 8) { + throw new Error("code length overflow. (" + + buffer.getLengthInBits() + + ">" + + totalDataCount * 8 + + ")"); + } + + // end code + if (buffer.getLengthInBits() + 4 <= totalDataCount * 8) { + buffer.put(0, 4); + } + + // padding + while (buffer.getLengthInBits() % 8 != 0) { + buffer.putBit(false); + } + + // padding + while (true) { + + if (buffer.getLengthInBits() >= totalDataCount * 8) { + break; + } + buffer.put(QRCode.PAD0, 8); + + if (buffer.getLengthInBits() >= totalDataCount * 8) { + break; + } + buffer.put(QRCode.PAD1, 8); + } + + return QRCode.createBytes(buffer, rsBlocks); + }; + + QRCode.createBytes = function (buffer, rsBlocks) { + + var offset = 0; + + var maxDcCount = 0; + var maxEcCount = 0; + + var dcdata = new Array(rsBlocks.length); + var ecdata = new Array(rsBlocks.length); + + for (var r = 0; r < rsBlocks.length; r++) { + + var dcCount = rsBlocks[r].dataCount; + var ecCount = rsBlocks[r].totalCount - dcCount; + + maxDcCount = Math.max(maxDcCount, dcCount); + maxEcCount = Math.max(maxEcCount, ecCount); + + dcdata[r] = new Array(dcCount); + + for (var i = 0; i < dcdata[r].length; i++) { + dcdata[r][i] = 0xff & buffer.buffer[i + offset]; + } + offset += dcCount; + + var rsPoly = util.getErrorCorrectPolynomial(ecCount); + var rawPoly = new Polynomial(dcdata[r], rsPoly.getLength() - 1); + + var modPoly = rawPoly.mod(rsPoly); + ecdata[r] = new Array(rsPoly.getLength() - 1); + for (var i = 0; i < ecdata[r].length; i++) { + var modIndex = i + modPoly.getLength() - ecdata[r].length; + ecdata[r][i] = (modIndex >= 0) ? modPoly.get(modIndex) : 0; + } + + } + + var totalCodeCount = 0; + for (var i = 0; i < rsBlocks.length; i++) { + totalCodeCount += rsBlocks[i].totalCount; + } + + var data = new Array(totalCodeCount); + var index = 0; + + for (var i = 0; i < maxDcCount; i++) { + for (var r = 0; r < rsBlocks.length; r++) { + if (i < dcdata[r].length) { + data[index++] = dcdata[r][i]; + } + } + } + + for (var i = 0; i < maxEcCount; i++) { + for (var r = 0; r < rsBlocks.length; r++) { + if (i < ecdata[r].length) { + data[index++] = ecdata[r][i]; + } + } + } + + return data; + }; + + module.exports = QRCode; + + + + /***/ +}, +/* 5 */ +/***/ function (module, exports, __webpack_require__) { + + var mode = __webpack_require__(6); + + function QR8bitByte(data) { + this.mode = mode.MODE_8BIT_BYTE; + this.data = data; + } + + QR8bitByte.prototype = { + + getLength: function (buffer) { + return this.data.length; + }, + + write: function (buffer) { + for (var i = 0; i < this.data.length; i++) { + // not JIS ... + buffer.put(this.data.charCodeAt(i), 8); + } + } + }; + + module.exports = QR8bitByte; + + + + /***/ +}, +/* 6 */ +/***/ function (module, exports) { + + module.exports = { + MODE_NUMBER: 1 << 0, + MODE_ALPHA_NUM: 1 << 1, + MODE_8BIT_BYTE: 1 << 2, + MODE_KANJI: 1 << 3 + }; + + + /***/ +}, +/* 7 */ +/***/ function (module, exports, __webpack_require__) { + + // ErrorCorrectLevel + var ECL = __webpack_require__(8); + + function QRRSBlock(totalCount, dataCount) { + this.totalCount = totalCount; + this.dataCount = dataCount; + } + + QRRSBlock.RS_BLOCK_TABLE = [ + + // L + // M + // Q + // H + + // 1 + [1, 26, 19], + [1, 26, 16], + [1, 26, 13], + [1, 26, 9], + + // 2 + [1, 44, 34], + [1, 44, 28], + [1, 44, 22], + [1, 44, 16], + + // 3 + [1, 70, 55], + [1, 70, 44], + [2, 35, 17], + [2, 35, 13], + + // 4 + [1, 100, 80], + [2, 50, 32], + [2, 50, 24], + [4, 25, 9], + + // 5 + [1, 134, 108], + [2, 67, 43], + [2, 33, 15, 2, 34, 16], + [2, 33, 11, 2, 34, 12], + + // 6 + [2, 86, 68], + [4, 43, 27], + [4, 43, 19], + [4, 43, 15], + + // 7 + [2, 98, 78], + [4, 49, 31], + [2, 32, 14, 4, 33, 15], + [4, 39, 13, 1, 40, 14], + + // 8 + [2, 121, 97], + [2, 60, 38, 2, 61, 39], + [4, 40, 18, 2, 41, 19], + [4, 40, 14, 2, 41, 15], + + // 9 + [2, 146, 116], + [3, 58, 36, 2, 59, 37], + [4, 36, 16, 4, 37, 17], + [4, 36, 12, 4, 37, 13], + + // 10 + [2, 86, 68, 2, 87, 69], + [4, 69, 43, 1, 70, 44], + [6, 43, 19, 2, 44, 20], + [6, 43, 15, 2, 44, 16], + + // 11 + [4, 101, 81], + [1, 80, 50, 4, 81, 51], + [4, 50, 22, 4, 51, 23], + [3, 36, 12, 8, 37, 13], + + // 12 + [2, 116, 92, 2, 117, 93], + [6, 58, 36, 2, 59, 37], + [4, 46, 20, 6, 47, 21], + [7, 42, 14, 4, 43, 15], + + // 13 + [4, 133, 107], + [8, 59, 37, 1, 60, 38], + [8, 44, 20, 4, 45, 21], + [12, 33, 11, 4, 34, 12], + + // 14 + [3, 145, 115, 1, 146, 116], + [4, 64, 40, 5, 65, 41], + [11, 36, 16, 5, 37, 17], + [11, 36, 12, 5, 37, 13], + + // 15 + [5, 109, 87, 1, 110, 88], + [5, 65, 41, 5, 66, 42], + [5, 54, 24, 7, 55, 25], + [11, 36, 12], + + // 16 + [5, 122, 98, 1, 123, 99], + [7, 73, 45, 3, 74, 46], + [15, 43, 19, 2, 44, 20], + [3, 45, 15, 13, 46, 16], + + // 17 + [1, 135, 107, 5, 136, 108], + [10, 74, 46, 1, 75, 47], + [1, 50, 22, 15, 51, 23], + [2, 42, 14, 17, 43, 15], + + // 18 + [5, 150, 120, 1, 151, 121], + [9, 69, 43, 4, 70, 44], + [17, 50, 22, 1, 51, 23], + [2, 42, 14, 19, 43, 15], + + // 19 + [3, 141, 113, 4, 142, 114], + [3, 70, 44, 11, 71, 45], + [17, 47, 21, 4, 48, 22], + [9, 39, 13, 16, 40, 14], + + // 20 + [3, 135, 107, 5, 136, 108], + [3, 67, 41, 13, 68, 42], + [15, 54, 24, 5, 55, 25], + [15, 43, 15, 10, 44, 16], + + // 21 + [4, 144, 116, 4, 145, 117], + [17, 68, 42], + [17, 50, 22, 6, 51, 23], + [19, 46, 16, 6, 47, 17], + + // 22 + [2, 139, 111, 7, 140, 112], + [17, 74, 46], + [7, 54, 24, 16, 55, 25], + [34, 37, 13], + + // 23 + [4, 151, 121, 5, 152, 122], + [4, 75, 47, 14, 76, 48], + [11, 54, 24, 14, 55, 25], + [16, 45, 15, 14, 46, 16], + + // 24 + [6, 147, 117, 4, 148, 118], + [6, 73, 45, 14, 74, 46], + [11, 54, 24, 16, 55, 25], + [30, 46, 16, 2, 47, 17], + + // 25 + [8, 132, 106, 4, 133, 107], + [8, 75, 47, 13, 76, 48], + [7, 54, 24, 22, 55, 25], + [22, 45, 15, 13, 46, 16], + + // 26 + [10, 142, 114, 2, 143, 115], + [19, 74, 46, 4, 75, 47], + [28, 50, 22, 6, 51, 23], + [33, 46, 16, 4, 47, 17], + + // 27 + [8, 152, 122, 4, 153, 123], + [22, 73, 45, 3, 74, 46], + [8, 53, 23, 26, 54, 24], + [12, 45, 15, 28, 46, 16], + + // 28 + [3, 147, 117, 10, 148, 118], + [3, 73, 45, 23, 74, 46], + [4, 54, 24, 31, 55, 25], + [11, 45, 15, 31, 46, 16], + + // 29 + [7, 146, 116, 7, 147, 117], + [21, 73, 45, 7, 74, 46], + [1, 53, 23, 37, 54, 24], + [19, 45, 15, 26, 46, 16], + + // 30 + [5, 145, 115, 10, 146, 116], + [19, 75, 47, 10, 76, 48], + [15, 54, 24, 25, 55, 25], + [23, 45, 15, 25, 46, 16], + + // 31 + [13, 145, 115, 3, 146, 116], + [2, 74, 46, 29, 75, 47], + [42, 54, 24, 1, 55, 25], + [23, 45, 15, 28, 46, 16], + + // 32 + [17, 145, 115], + [10, 74, 46, 23, 75, 47], + [10, 54, 24, 35, 55, 25], + [19, 45, 15, 35, 46, 16], + + // 33 + [17, 145, 115, 1, 146, 116], + [14, 74, 46, 21, 75, 47], + [29, 54, 24, 19, 55, 25], + [11, 45, 15, 46, 46, 16], + + // 34 + [13, 145, 115, 6, 146, 116], + [14, 74, 46, 23, 75, 47], + [44, 54, 24, 7, 55, 25], + [59, 46, 16, 1, 47, 17], + + // 35 + [12, 151, 121, 7, 152, 122], + [12, 75, 47, 26, 76, 48], + [39, 54, 24, 14, 55, 25], + [22, 45, 15, 41, 46, 16], + + // 36 + [6, 151, 121, 14, 152, 122], + [6, 75, 47, 34, 76, 48], + [46, 54, 24, 10, 55, 25], + [2, 45, 15, 64, 46, 16], + + // 37 + [17, 152, 122, 4, 153, 123], + [29, 74, 46, 14, 75, 47], + [49, 54, 24, 10, 55, 25], + [24, 45, 15, 46, 46, 16], + + // 38 + [4, 152, 122, 18, 153, 123], + [13, 74, 46, 32, 75, 47], + [48, 54, 24, 14, 55, 25], + [42, 45, 15, 32, 46, 16], + + // 39 + [20, 147, 117, 4, 148, 118], + [40, 75, 47, 7, 76, 48], + [43, 54, 24, 22, 55, 25], + [10, 45, 15, 67, 46, 16], + + // 40 + [19, 148, 118, 6, 149, 119], + [18, 75, 47, 31, 76, 48], + [34, 54, 24, 34, 55, 25], + [20, 45, 15, 61, 46, 16] + ]; + + QRRSBlock.getRSBlocks = function (typeNumber, errorCorrectLevel) { + + var rsBlock = QRRSBlock.getRsBlockTable(typeNumber, errorCorrectLevel); + + if (rsBlock == undefined) { + throw new Error("bad rs block @ typeNumber:" + typeNumber + "/errorCorrectLevel:" + errorCorrectLevel); + } + + var length = rsBlock.length / 3; + + var list = new Array(); + + for (var i = 0; i < length; i++) { + + var count = rsBlock[i * 3 + 0]; + var totalCount = rsBlock[i * 3 + 1]; + var dataCount = rsBlock[i * 3 + 2]; + + for (var j = 0; j < count; j++) { + list.push(new QRRSBlock(totalCount, dataCount)); + } + } + + return list; + } + + QRRSBlock.getRsBlockTable = function (typeNumber, errorCorrectLevel) { + + switch (errorCorrectLevel) { + case ECL.L: + return QRRSBlock.RS_BLOCK_TABLE[(typeNumber - 1) * 4 + 0]; + case ECL.M: + return QRRSBlock.RS_BLOCK_TABLE[(typeNumber - 1) * 4 + 1]; + case ECL.Q: + return QRRSBlock.RS_BLOCK_TABLE[(typeNumber - 1) * 4 + 2]; + case ECL.H: + return QRRSBlock.RS_BLOCK_TABLE[(typeNumber - 1) * 4 + 3]; + default: + return undefined; + } + } + + module.exports = QRRSBlock; + + + /***/ +}, +/* 8 */ +/***/ function (module, exports) { + + module.exports = { + L: 1, + M: 0, + Q: 3, + H: 2 + }; + + + + /***/ +}, +/* 9 */ +/***/ function (module, exports) { + + function QRBitBuffer() { + this.buffer = new Array(); + this.length = 0; + } + + QRBitBuffer.prototype = { + + get: function (index) { + var bufIndex = Math.floor(index / 8); + return ((this.buffer[bufIndex] >>> (7 - index % 8)) & 1) == 1; + }, + + put: function (num, length) { + for (var i = 0; i < length; i++) { + this.putBit(((num >>> (length - i - 1)) & 1) == 1); + } + }, + + getLengthInBits: function () { + return this.length; + }, + + putBit: function (bit) { + + var bufIndex = Math.floor(this.length / 8); + if (this.buffer.length <= bufIndex) { + this.buffer.push(0); + } + + if (bit) { + this.buffer[bufIndex] |= (0x80 >>> (this.length % 8)); + } + + this.length++; + } + }; + + module.exports = QRBitBuffer; + + + /***/ +}, +/* 10 */ +/***/ function (module, exports, __webpack_require__) { + + var Mode = __webpack_require__(6); + var Polynomial = __webpack_require__(11); + var math = __webpack_require__(12); + + var QRMaskPattern = { + PATTERN000: 0, + PATTERN001: 1, + PATTERN010: 2, + PATTERN011: 3, + PATTERN100: 4, + PATTERN101: 5, + PATTERN110: 6, + PATTERN111: 7 + }; + + var QRUtil = { + + 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: (1 << 10) | (1 << 8) | (1 << 5) | (1 << 4) | (1 << 2) | (1 << 1) | (1 << 0), + G18: (1 << 12) | (1 << 11) | (1 << 10) | (1 << 9) | (1 << 8) | (1 << 5) | (1 << 2) | (1 << 0), + G15_MASK: (1 << 14) | (1 << 12) | (1 << 10) | (1 << 4) | (1 << 1), + + getBCHTypeInfo: function (data) { + var d = data << 10; + while (QRUtil.getBCHDigit(d) - QRUtil.getBCHDigit(QRUtil.G15) >= 0) { + d ^= (QRUtil.G15 << (QRUtil.getBCHDigit(d) - QRUtil.getBCHDigit(QRUtil.G15))); + } + return ((data << 10) | d) ^ QRUtil.G15_MASK; + }, + + getBCHTypeNumber: function (data) { + var d = data << 12; + while (QRUtil.getBCHDigit(d) - QRUtil.getBCHDigit(QRUtil.G18) >= 0) { + d ^= (QRUtil.G18 << (QRUtil.getBCHDigit(d) - QRUtil.getBCHDigit(QRUtil.G18))); + } + return (data << 12) | d; + }, + + getBCHDigit: function (data) { + + var digit = 0; + + while (data != 0) { + digit++; + data >>>= 1; + } + + return digit; + }, + + getPatternPosition: function (typeNumber) { + return QRUtil.PATTERN_POSITION_TABLE[typeNumber - 1]; + }, + + getMask: function (maskPattern, i, j) { + + switch (maskPattern) { + + case QRMaskPattern.PATTERN000: return (i + j) % 2 == 0; + case QRMaskPattern.PATTERN001: return i % 2 == 0; + case QRMaskPattern.PATTERN010: return j % 3 == 0; + case QRMaskPattern.PATTERN011: return (i + j) % 3 == 0; + case QRMaskPattern.PATTERN100: return (Math.floor(i / 2) + Math.floor(j / 3)) % 2 == 0; + case QRMaskPattern.PATTERN101: return (i * j) % 2 + (i * j) % 3 == 0; + case QRMaskPattern.PATTERN110: return ((i * j) % 2 + (i * j) % 3) % 2 == 0; + case QRMaskPattern.PATTERN111: return ((i * j) % 3 + (i + j) % 2) % 2 == 0; + + default: + throw new Error("bad maskPattern:" + maskPattern); + } + }, + + getErrorCorrectPolynomial: function (errorCorrectLength) { + + var a = new Polynomial([1], 0); + + for (var i = 0; i < errorCorrectLength; i++) { + a = a.multiply(new Polynomial([1, math.gexp(i)], 0)); + } + + return a; + }, + + getLengthInBits: function (mode, type) { + + if (1 <= type && type < 10) { + + // 1 - 9 + + switch (mode) { + case Mode.MODE_NUMBER: return 10; + case Mode.MODE_ALPHA_NUM: return 9; + case Mode.MODE_8BIT_BYTE: return 8; + case Mode.MODE_KANJI: return 8; + default: + throw new Error("mode:" + mode); + } + + } else if (type < 27) { + + // 10 - 26 + + switch (mode) { + case Mode.MODE_NUMBER: return 12; + case Mode.MODE_ALPHA_NUM: return 11; + case Mode.MODE_8BIT_BYTE: return 16; + case Mode.MODE_KANJI: return 10; + default: + throw new Error("mode:" + mode); + } + + } else if (type < 41) { + + // 27 - 40 + + switch (mode) { + case Mode.MODE_NUMBER: return 14; + case Mode.MODE_ALPHA_NUM: return 13; + case Mode.MODE_8BIT_BYTE: return 16; + case Mode.MODE_KANJI: return 12; + default: + throw new Error("mode:" + mode); + } + + } else { + throw new Error("type:" + type); + } + }, + + getLostPoint: function (qrCode) { + + var moduleCount = qrCode.getModuleCount(); + + var lostPoint = 0; + + // LEVEL1 + + for (var row = 0; row < moduleCount; row++) { + + for (var col = 0; col < moduleCount; col++) { + + var sameCount = 0; + var dark = qrCode.isDark(row, col); + + for (var r = -1; r <= 1; r++) { + + if (row + r < 0 || moduleCount <= row + r) { + continue; + } + + for (var c = -1; c <= 1; c++) { + + if (col + c < 0 || moduleCount <= col + c) { + continue; + } + + if (r == 0 && c == 0) { + continue; + } + + if (dark == qrCode.isDark(row + r, col + c)) { + sameCount++; + } + } + } + + if (sameCount > 5) { + lostPoint += (3 + sameCount - 5); + } + } + } + + // LEVEL2 + + for (var row = 0; row < moduleCount - 1; row++) { + for (var col = 0; col < moduleCount - 1; col++) { + var count = 0; + if (qrCode.isDark(row, col)) count++; + if (qrCode.isDark(row + 1, col)) count++; + if (qrCode.isDark(row, col + 1)) count++; + if (qrCode.isDark(row + 1, col + 1)) count++; + if (count == 0 || count == 4) { + lostPoint += 3; + } + } + } + + // LEVEL3 + + for (var row = 0; row < moduleCount; row++) { + for (var col = 0; col < moduleCount - 6; col++) { + if (qrCode.isDark(row, col) + && !qrCode.isDark(row, col + 1) + && qrCode.isDark(row, col + 2) + && qrCode.isDark(row, col + 3) + && qrCode.isDark(row, col + 4) + && !qrCode.isDark(row, col + 5) + && qrCode.isDark(row, col + 6)) { + lostPoint += 40; + } + } + } + + for (var col = 0; col < moduleCount; col++) { + for (var row = 0; row < moduleCount - 6; row++) { + if (qrCode.isDark(row, col) + && !qrCode.isDark(row + 1, col) + && qrCode.isDark(row + 2, col) + && qrCode.isDark(row + 3, col) + && qrCode.isDark(row + 4, col) + && !qrCode.isDark(row + 5, col) + && qrCode.isDark(row + 6, col)) { + lostPoint += 40; + } + } + } + + // LEVEL4 + + var darkCount = 0; + + for (var col = 0; col < moduleCount; col++) { + for (var row = 0; row < moduleCount; row++) { + if (qrCode.isDark(row, col)) { + darkCount++; + } + } + } + + var ratio = Math.abs(100 * darkCount / moduleCount / moduleCount - 50) / 5; + lostPoint += ratio * 10; + + return lostPoint; + } + }; + + module.exports = QRUtil; + + + /***/ +}, +/* 11 */ +/***/ function (module, exports, __webpack_require__) { + + var math = __webpack_require__(12); + + function QRPolynomial(num, shift) { + + if (num.length == undefined) { + throw new Error(num.length + "/" + shift); + } + + var offset = 0; + + while (offset < num.length && num[offset] == 0) { + offset++; + } + + this.num = new Array(num.length - offset + shift); + for (var i = 0; i < num.length - offset; i++) { + this.num[i] = num[i + offset]; + } + } + + QRPolynomial.prototype = { + + get: function (index) { + return this.num[index]; + }, + + getLength: function () { + return this.num.length; + }, + + multiply: function (e) { + + var num = new Array(this.getLength() + e.getLength() - 1); + + for (var i = 0; i < this.getLength(); i++) { + for (var j = 0; j < e.getLength(); j++) { + num[i + j] ^= math.gexp(math.glog(this.get(i)) + math.glog(e.get(j))); + } + } + + return new QRPolynomial(num, 0); + }, + + mod: function (e) { + + if (this.getLength() - e.getLength() < 0) { + return this; + } + + var ratio = math.glog(this.get(0)) - math.glog(e.get(0)); + + var num = new Array(this.getLength()); + + for (var i = 0; i < this.getLength(); i++) { + num[i] = this.get(i); + } + + for (var i = 0; i < e.getLength(); i++) { + num[i] ^= math.gexp(math.glog(e.get(i)) + ratio); + } + + // recursive call + return new QRPolynomial(num, 0).mod(e); + } + }; + + module.exports = QRPolynomial; + + + /***/ +}, +/* 12 */ +/***/ function (module, exports) { + + var QRMath = { + + glog: function (n) { + + if (n < 1) { + throw new Error("glog(" + n + ")"); + } + + return QRMath.LOG_TABLE[n]; + }, + + gexp: function (n) { + + while (n < 0) { + n += 255; + } + + while (n >= 256) { + n -= 255; + } + + return QRMath.EXP_TABLE[n]; + }, + + EXP_TABLE: new Array(256), + + LOG_TABLE: new Array(256) + + }; + + for (var i = 0; i < 8; i++) { + QRMath.EXP_TABLE[i] = 1 << i; + } + for (var i = 8; i < 256; i++) { + QRMath.EXP_TABLE[i] = QRMath.EXP_TABLE[i - 4] + ^ QRMath.EXP_TABLE[i - 5] + ^ QRMath.EXP_TABLE[i - 6] + ^ QRMath.EXP_TABLE[i - 8]; + } + for (var i = 0; i < 255; i++) { + QRMath.LOG_TABLE[QRMath.EXP_TABLE[i]] = i; + } + + module.exports = QRMath; + + + /***/ +}, +/* 13 */ +/***/ function (module, exports) { + + module.exports = "\n
\n \n \n
\n"; + + /***/ +} +/******/]) +}); +; +//# sourceMappingURL=vue-qrcode.js.map diff --git a/BTCPayServer/wwwroot/vendor/vuejs/vue-qrcode.js.map b/BTCPayServer/wwwroot/vendor/vuejs/vue-qrcode.js.map new file mode 100755 index 0000000000..f37f88c2f1 --- /dev/null +++ b/BTCPayServer/wwwroot/vendor/vuejs/vue-qrcode.js.map @@ -0,0 +1,9 @@ +{ + "version": 3, + "sources": [ "webpack:///webpack/universalModuleDefinition", "webpack:///webpack/bootstrap 4d0ca69ab3f3eb801054", "webpack:///./src/index.js", "webpack:///./src/Qrcode.vue", "webpack:///Qrcode.vue", "webpack:///./~/qr.js/index.js", "webpack:///./~/qr.js/lib/QRCode.js", "webpack:///./~/qr.js/lib/8BitByte.js", "webpack:///./~/qr.js/lib/mode.js", "webpack:///./~/qr.js/lib/RSBlock.js", "webpack:///./~/qr.js/lib/ErrorCorrectLevel.js", "webpack:///./~/qr.js/lib/BitBuffer.js", "webpack:///./~/qr.js/lib/util.js", "webpack:///./~/qr.js/lib/Polynomial.js", "webpack:///./~/qr.js/lib/math.js", "webpack:///./src/Qrcode.vue?ba49" ], + "names": [ "module", "exports" ], + "mappings": "AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,O;ACVA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,uBAAe;AACf;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;;;;;;;;ACtCA;;;;;;AAGAA,QAAOC,OAAP,oB;;;;;;ACHA;AACA;AACA;AACA;AACA;AACA,wBAAuB;AACvB,aAAiB,cAAc;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA,EAAC,I;;;;;;;;;;;;ACDD;;;;;;AAEA,gCACA;QACA;AAEA;;;;;;;;;;;;;;;;;;aAIA;iBAEA;AAHA;;aAKA;gBAEA;AAHA;AAIA;YACA;;aAEA;gBAEA;AAHA;;aAKA;gBAGA;AAJA;AAfA;iBAoBA;YACA;;+BAEA;uBACA;0BACA;0BACA;4BAEA;;2CAEA;;gCACA;0BACA;gCACA;gCACA;8EAEA;;uCACA;wBAEA;;yCACA;0CACA;4CACA;mEACA;mEACA;6EACA;AACA;AACA;AAEA;AA3BA;AAvBA;;;AAoDA,yCACA;AACA,cACA,oCACA,iCACA,gCACA,+BACA,0BAEA;;;;;;;;;;;ACnFA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;;;;;;;;ACfA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,uBAAsB,iBAAiB;AACvC;;AAEA;AACA;AACA,mBAAkB,qBAAqB;AACvC;AACA;;AAEA,mBAAkB,0BAA0B;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA,mBAAkB,wBAAwB;;AAE1C;;AAEA,oBAAmB,wBAAwB;AAC3C,kCAAiC;AACjC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA,kBAAiB,QAAQ;;AAEzB;;AAEA,mBAAkB,QAAQ;;AAE1B;;AAEA;AACA;AACA;AACA;AACA,KAAI;AACJ;AACA;AACA,I;AACA,G;AACA;;AAEA;;AAEA;AACA;;AAEA,iBAAgB,OAAO;;AAEvB;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;;AAEA,mBAAkB,2BAA2B;;AAE7C;;AAEA,oBAAmB,gCAAgC;;AAEnD;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA,iBAAgB,0BAA0B;AAC1C;AACA;AACA;AACA;AACA;;AAEA,iBAAgB,0BAA0B;AAC1C;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA,iBAAgB,gBAAgB;;AAEhC,kBAAiB,gBAAgB;;AAEjC;AACA;;AAEA;AACA;AACA;;AAEA,oBAAmB,QAAQ;;AAE3B,qBAAoB,QAAQ;;AAE5B;AACA;AACA;AACA,OAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA,iBAAgB,QAAQ;AACxB;AACA;AACA;;AAEA,iBAAgB,QAAQ;AACxB;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA,iBAAgB,QAAQ;;AAExB;;AAEA;AACA;AACA,IAAG;AACH;AACA,IAAG;AACH;AACA;AACA;;AAEA;AACA,iBAAgB,QAAQ;;AAExB;;AAEA;AACA;AACA,IAAG;AACH;AACA,IAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA,sCAAqC,SAAS;;AAE9C;;AAEA;;AAEA,mBAAkB,OAAO;;AAEzB;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;;AAEA,iBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,iBAAgB,qBAAqB;AACrC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA;;AAEA,iBAAgB,qBAAqB;;AAErC;AACA;;AAEA;AACA;;AAEA;;AAEA,kBAAiB,sBAAsB;AACvC;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,kBAAiB,sBAAsB;AACvC;AACA;AACA;;AAEA;;AAEA;AACA,iBAAgB,qBAAqB;AACrC;AACA;;AAEA;AACA;;AAEA,iBAAgB,gBAAgB;AAChC,kBAAiB,qBAAqB;AACtC;AACA;AACA;AACA;AACA;;AAEA,iBAAgB,gBAAgB;AAChC,kBAAiB,qBAAqB;AACtC;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;ACpbA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,GAAE;;AAEF;AACA,kBAAiB,sBAAsB;AACvC;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;ACrBA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACLA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;;AAEA,iBAAgB,YAAY;;AAE5B;AACA;AACA;;AAEA,kBAAiB,WAAW;AAC5B,qD;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;AC1SA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACLA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,GAAE;;AAEF;AACA,kBAAiB,YAAY;AAC7B;AACA;AACA,GAAE;;AAEF;AACA;AACA,GAAE;;AAEF;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;;;;;;ACrCA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,uF;AACA;AACA;AACA,MAAK;;AAEL;AACA;AACA;AACA,uF;AACA;AACA;AACA,MAAK;;AAEL;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,MAAK;;AAEL;AACA;AACA,MAAK;;AAEL;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAK;;AAEL;;AAEA;;AAEA,qBAAoB,wBAAwB;AAC5C;AACA;;AAEA;AACA,MAAK;;AAEL;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,OAAM;;AAEN;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,OAAM;;AAEN;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,OAAM;AACN;AACA;AACA,MAAK;;AAEL;;AAEA;;AAEA;;AAEA;;AAEA,uBAAsB,mBAAmB;;AAEzC,wBAAuB,mBAAmB;;AAE1C;AACA;;AAEA,qBAAoB,QAAQ;;AAE5B;AACA;AACA;;AAEA,yBAAwB,QAAQ;;AAEhC;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA,uBAAsB,uBAAuB;AAC7C,wBAAuB,uBAAuB;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA,uBAAsB,mBAAmB;AACzC,wBAAuB,uBAAuB;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,uBAAsB,mBAAmB;AACzC,wBAAuB,uBAAuB;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA,uBAAsB,mBAAmB;AACzC,wBAAuB,mBAAmB;AAC1C;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,uB;AACA;AACA;;AAEA;;;;;;;ACtRA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA,iBAAgB,yBAAyB;AACzC;AACA;AACA;;AAEA;;AAEA;AACA;AACA,GAAE;;AAEF;AACA;AACA,GAAE;;AAEF;;AAEA;;AAEA,kBAAiB,sBAAsB;AACvC,mBAAkB,mBAAmB;AACrC;AACA;AACA;;AAEA;AACA,GAAE;;AAEF;;AAEA;AACA;AACA;;AAEA;;AAEA;;AAEA,kBAAiB,sBAAsB;AACvC;AACA;;AAEA,kBAAiB,mBAAmB;AACpC;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;;;;;;AClEA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA,GAAE;;AAEF;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,GAAE;;AAEF;;AAEA;;AAEA;;AAEA,gBAAe,OAAO;AACtB;AACA;AACA,gBAAe,SAAS;AACxB;AACA;AACA;AACA;AACA;AACA,gBAAe,SAAS;AACxB;AACA;;AAEA;;;;;;;AC3CA,wJAAuJ,wCAAwC,qH", + "file": "./dist/vue-qrcode.js", + "sourcesContent": [ "(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"VueQr\"] = factory();\n\telse\n\t\troot[\"VueQr\"] = factory();\n})(this, function() {\nreturn \n\n\n// WEBPACK FOOTER //\n// webpack/universalModuleDefinition", " \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId])\n \t\t\treturn installedModules[moduleId].exports;\n\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\texports: {},\n \t\t\tid: moduleId,\n \t\t\tloaded: false\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.loaded = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(0);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 4d0ca69ab3f3eb801054", "import Qrcode from './Qrcode.vue'\n\n\nmodule.exports = Qrcode\n\n\n\n\n// WEBPACK FOOTER //\n// ./src/index.js", "var __vue_script__, __vue_template__\n__vue_script__ = require(\"-!babel-loader!./../node_modules/vue-loader/lib/selector.js?type=script&index=0!./Qrcode.vue\")\n__vue_template__ = require(\"-!vue-html-loader!./../node_modules/vue-loader/lib/selector.js?type=template&index=0!./Qrcode.vue\")\nmodule.exports = __vue_script__ || {}\nif (module.exports.__esModule) module.exports = module.exports.default\nif (__vue_template__) { (typeof module.exports === \"function\" ? module.exports.options : module.exports).template = __vue_template__ }\nif (module.hot) {(function () { module.hot.accept()\n var hotAPI = require(\"vue-hot-reload-api\")\n hotAPI.install(require(\"vue\"), true)\n if (!hotAPI.compatible) return\n var id = \"/home/vixi_n/Documents/Github/vue-qrcode/src/Qrcode.vue\"\n if (!module.hot.data) {\n hotAPI.createRecord(id, module.exports)\n } else {\n hotAPI.update(id, module.exports, __vue_template__)\n }\n})()}\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/Qrcode.vue\n// module id = 1\n// module chunks = 0", "\n\n\n\n\n\n\n// WEBPACK FOOTER //\n// Qrcode.vue?34bfdd1a", "var QRCode = require('./lib/QRCode');\r\nvar ErrorCorrectLevel = require('./lib/ErrorCorrectLevel');\r\n\r\nvar qrcode = function(data, opt) {\r\n\topt = opt || {};\r\n\tvar qr = new QRCode(opt.typeNumber || -1,\r\n\t\t\t\t\t\topt.errorCorrectLevel || ErrorCorrectLevel.H);\r\n\tqr.addData(data);\r\n\tqr.make();\r\n\r\n\treturn qr;\r\n};\r\n\r\nqrcode.ErrorCorrectLevel = ErrorCorrectLevel;\r\n\r\nmodule.exports = qrcode;\r\n\r\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/qr.js/index.js\n// module id = 3\n// module chunks = 0", "var BitByte = require('./8BitByte');\nvar RSBlock = require('./RSBlock');\nvar BitBuffer = require('./BitBuffer');\nvar util = require('./util');\nvar Polynomial = require('./Polynomial');\n\nfunction QRCode(typeNumber, errorCorrectLevel) {\n\tthis.typeNumber = typeNumber;\n\tthis.errorCorrectLevel = errorCorrectLevel;\n\tthis.modules = null;\n\tthis.moduleCount = 0;\n\tthis.dataCache = null;\n\tthis.dataList = [];\n}\n\n// for client side minification\nvar proto = QRCode.prototype;\n\nproto.addData = function(data) {\n\tvar newData = new BitByte(data);\n\tthis.dataList.push(newData);\n\tthis.dataCache = null;\n};\n\nproto.isDark = function(row, col) {\n\tif (row < 0 || this.moduleCount <= row || col < 0 || this.moduleCount <= col) {\n\t\tthrow new Error(row + \",\" + col);\n\t}\n\treturn this.modules[row][col];\n};\n\nproto.getModuleCount = function() {\n\treturn this.moduleCount;\n};\n\nproto.make = function() {\n\t// Calculate automatically typeNumber if provided is < 1\n\tif (this.typeNumber < 1 ){\n\t\tvar typeNumber = 1;\n\t\tfor (typeNumber = 1; typeNumber < 40; typeNumber++) {\n\t\t\tvar rsBlocks = RSBlock.getRSBlocks(typeNumber, this.errorCorrectLevel);\n\n\t\t\tvar buffer = new BitBuffer();\n\t\t\tvar totalDataCount = 0;\n\t\t\tfor (var i = 0; i < rsBlocks.length; i++) {\n\t\t\t\ttotalDataCount += rsBlocks[i].dataCount;\n\t\t\t}\n\n\t\t\tfor (var i = 0; i < this.dataList.length; i++) {\n\t\t\t\tvar data = this.dataList[i];\n\t\t\t\tbuffer.put(data.mode, 4);\n\t\t\t\tbuffer.put(data.getLength(), util.getLengthInBits(data.mode, typeNumber) );\n\t\t\t\tdata.write(buffer);\n\t\t\t}\n\t\t\tif (buffer.getLengthInBits() <= totalDataCount * 8)\n\t\t\t\tbreak;\n\t\t}\n\t\tthis.typeNumber = typeNumber;\n\t}\n\tthis.makeImpl(false, this.getBestMaskPattern() );\n};\n\nproto.makeImpl = function(test, maskPattern) {\n\t\n\tthis.moduleCount = this.typeNumber * 4 + 17;\n\tthis.modules = new Array(this.moduleCount);\n\t\n\tfor (var row = 0; row < this.moduleCount; row++) {\n\t\t\n\t\tthis.modules[row] = new Array(this.moduleCount);\n\t\t\n\t\tfor (var col = 0; col < this.moduleCount; col++) {\n\t\t\tthis.modules[row][col] = null;//(col + row) % 3;\n\t\t}\n\t}\n\n\tthis.setupPositionProbePattern(0, 0);\n\tthis.setupPositionProbePattern(this.moduleCount - 7, 0);\n\tthis.setupPositionProbePattern(0, this.moduleCount - 7);\n\tthis.setupPositionAdjustPattern();\n\tthis.setupTimingPattern();\n\tthis.setupTypeInfo(test, maskPattern);\n\t\n\tif (this.typeNumber >= 7) {\n\t\tthis.setupTypeNumber(test);\n\t}\n\n\tif (this.dataCache == null) {\n\t\tthis.dataCache = QRCode.createData(this.typeNumber, this.errorCorrectLevel, this.dataList);\n\t}\n\n\tthis.mapData(this.dataCache, maskPattern);\n};\n\nproto.setupPositionProbePattern = function(row, col) {\n\t\n\tfor (var r = -1; r <= 7; r++) {\n\t\t\n\t\tif (row + r <= -1 || this.moduleCount <= row + r) continue;\n\t\t\n\t\tfor (var c = -1; c <= 7; c++) {\n\t\t\t\n\t\t\tif (col + c <= -1 || this.moduleCount <= col + c) continue;\n\t\t\t\n\t\t\tif ( (0 <= r && r <= 6 && (c == 0 || c == 6) )\n\t\t\t\t\t|| (0 <= c && c <= 6 && (r == 0 || r == 6) )\n\t\t\t\t\t|| (2 <= r && r <= 4 && 2 <= c && c <= 4) ) {\n\t\t\t\tthis.modules[row + r][col + c] = true;\n\t\t\t} else {\n\t\t\t\tthis.modules[row + r][col + c] = false;\n\t\t\t}\n\t\t}\t\t\n\t}\t\t\n};\n\nproto.getBestMaskPattern = function() {\n\n\tvar minLostPoint = 0;\n\tvar pattern = 0;\n\n\tfor (var i = 0; i < 8; i++) {\n\t\t\n\t\tthis.makeImpl(true, i);\n\n\t\tvar lostPoint = util.getLostPoint(this);\n\n\t\tif (i == 0 || minLostPoint > lostPoint) {\n\t\t\tminLostPoint = lostPoint;\n\t\t\tpattern = i;\n\t\t}\n\t}\n\n\treturn pattern;\n};\n\nproto.createMovieClip = function(target_mc, instance_name, depth) {\n\n\tvar qr_mc = target_mc.createEmptyMovieClip(instance_name, depth);\n\tvar cs = 1;\n\n\tthis.make();\n\n\tfor (var row = 0; row < this.modules.length; row++) {\n\t\t\n\t\tvar y = row * cs;\n\t\t\n\t\tfor (var col = 0; col < this.modules[row].length; col++) {\n\n\t\t\tvar x = col * cs;\n\t\t\tvar dark = this.modules[row][col];\n\t\t\n\t\t\tif (dark) {\n\t\t\t\tqr_mc.beginFill(0, 100);\n\t\t\t\tqr_mc.moveTo(x, y);\n\t\t\t\tqr_mc.lineTo(x + cs, y);\n\t\t\t\tqr_mc.lineTo(x + cs, y + cs);\n\t\t\t\tqr_mc.lineTo(x, y + cs);\n\t\t\t\tqr_mc.endFill();\n\t\t\t}\n\t\t}\n\t}\n\t\n\treturn qr_mc;\n};\n\nproto.setupTimingPattern = function() {\n\t\n\tfor (var r = 8; r < this.moduleCount - 8; r++) {\n\t\tif (this.modules[r][6] != null) {\n\t\t\tcontinue;\n\t\t}\n\t\tthis.modules[r][6] = (r % 2 == 0);\n\t}\n\n\tfor (var c = 8; c < this.moduleCount - 8; c++) {\n\t\tif (this.modules[6][c] != null) {\n\t\t\tcontinue;\n\t\t}\n\t\tthis.modules[6][c] = (c % 2 == 0);\n\t}\n};\n\nproto.setupPositionAdjustPattern = function() {\n\n\tvar pos = util.getPatternPosition(this.typeNumber);\n\t\n\tfor (var i = 0; i < pos.length; i++) {\n\t\n\t\tfor (var j = 0; j < pos.length; j++) {\n\t\t\n\t\t\tvar row = pos[i];\n\t\t\tvar col = pos[j];\n\t\t\t\n\t\t\tif (this.modules[row][col] != null) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\n\t\t\tfor (var r = -2; r <= 2; r++) {\n\t\t\t\n\t\t\t\tfor (var c = -2; c <= 2; c++) {\n\t\t\t\t\n\t\t\t\t\tif (r == -2 || r == 2 || c == -2 || c == 2\n\t\t\t\t\t\t\t|| (r == 0 && c == 0) ) {\n\t\t\t\t\t\tthis.modules[row + r][col + c] = true;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthis.modules[row + r][col + c] = false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n};\n\nproto.setupTypeNumber = function(test) {\n\n\tvar bits = util.getBCHTypeNumber(this.typeNumber);\n\n\tfor (var i = 0; i < 18; i++) {\n\t\tvar mod = (!test && ( (bits >> i) & 1) == 1);\n\t\tthis.modules[Math.floor(i / 3)][i % 3 + this.moduleCount - 8 - 3] = mod;\n\t}\n\n\tfor (var i = 0; i < 18; i++) {\n\t\tvar mod = (!test && ( (bits >> i) & 1) == 1);\n\t\tthis.modules[i % 3 + this.moduleCount - 8 - 3][Math.floor(i / 3)] = mod;\n\t}\n};\n\nproto.setupTypeInfo = function(test, maskPattern) {\n\n\tvar data = (this.errorCorrectLevel << 3) | maskPattern;\n\tvar bits = util.getBCHTypeInfo(data);\n\n\t// vertical\t\t\n\tfor (var i = 0; i < 15; i++) {\n\n\t\tvar mod = (!test && ( (bits >> i) & 1) == 1);\n\n\t\tif (i < 6) {\n\t\t\tthis.modules[i][8] = mod;\n\t\t} else if (i < 8) {\n\t\t\tthis.modules[i + 1][8] = mod;\n\t\t} else {\n\t\t\tthis.modules[this.moduleCount - 15 + i][8] = mod;\n\t\t}\n\t}\n\n\t// horizontal\n\tfor (var i = 0; i < 15; i++) {\n\n\t\tvar mod = (!test && ( (bits >> i) & 1) == 1);\n\t\t\n\t\tif (i < 8) {\n\t\t\tthis.modules[8][this.moduleCount - i - 1] = mod;\n\t\t} else if (i < 9) {\n\t\t\tthis.modules[8][15 - i - 1 + 1] = mod;\n\t\t} else {\n\t\t\tthis.modules[8][15 - i - 1] = mod;\n\t\t}\n\t}\n\n\t// fixed module\n\tthis.modules[this.moduleCount - 8][8] = (!test);\n};\n\nproto.mapData = function(data, maskPattern) {\n\t\n\tvar inc = -1;\n\tvar row = this.moduleCount - 1;\n\tvar bitIndex = 7;\n\tvar byteIndex = 0;\n\t\n\tfor (var col = this.moduleCount - 1; col > 0; col -= 2) {\n\n\t\tif (col == 6) col--;\n\n\t\twhile (true) {\n\n\t\t\tfor (var c = 0; c < 2; c++) {\n\t\t\t\t\n\t\t\t\tif (this.modules[row][col - c] == null) {\n\t\t\t\t\t\n\t\t\t\t\tvar dark = false;\n\n\t\t\t\t\tif (byteIndex < data.length) {\n\t\t\t\t\t\tdark = ( ( (data[byteIndex] >>> bitIndex) & 1) == 1);\n\t\t\t\t\t}\n\n\t\t\t\t\tvar mask = util.getMask(maskPattern, row, col - c);\n\n\t\t\t\t\tif (mask) {\n\t\t\t\t\t\tdark = !dark;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tthis.modules[row][col - c] = dark;\n\t\t\t\t\tbitIndex--;\n\n\t\t\t\t\tif (bitIndex == -1) {\n\t\t\t\t\t\tbyteIndex++;\n\t\t\t\t\t\tbitIndex = 7;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\trow += inc;\n\n\t\t\tif (row < 0 || this.moduleCount <= row) {\n\t\t\t\trow -= inc;\n\t\t\t\tinc = -inc;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n};\n\nQRCode.PAD0 = 0xEC;\nQRCode.PAD1 = 0x11;\n\nQRCode.createData = function(typeNumber, errorCorrectLevel, dataList) {\n\t\n\tvar rsBlocks = RSBlock.getRSBlocks(typeNumber, errorCorrectLevel);\n\t\n\tvar buffer = new BitBuffer();\n\t\n\tfor (var i = 0; i < dataList.length; i++) {\n\t\tvar data = dataList[i];\n\t\tbuffer.put(data.mode, 4);\n\t\tbuffer.put(data.getLength(), util.getLengthInBits(data.mode, typeNumber) );\n\t\tdata.write(buffer);\n\t}\n\n\t// calc num max data.\n\tvar totalDataCount = 0;\n\tfor (var i = 0; i < rsBlocks.length; i++) {\n\t\ttotalDataCount += rsBlocks[i].dataCount;\n\t}\n\n\tif (buffer.getLengthInBits() > totalDataCount * 8) {\n\t\tthrow new Error(\"code length overflow. (\"\n\t\t\t+ buffer.getLengthInBits()\n\t\t\t+ \">\"\n\t\t\t+ totalDataCount * 8\n\t\t\t+ \")\");\n\t}\n\n\t// end code\n\tif (buffer.getLengthInBits() + 4 <= totalDataCount * 8) {\n\t\tbuffer.put(0, 4);\n\t}\n\n\t// padding\n\twhile (buffer.getLengthInBits() % 8 != 0) {\n\t\tbuffer.putBit(false);\n\t}\n\n\t// padding\n\twhile (true) {\n\t\t\n\t\tif (buffer.getLengthInBits() >= totalDataCount * 8) {\n\t\t\tbreak;\n\t\t}\n\t\tbuffer.put(QRCode.PAD0, 8);\n\t\t\n\t\tif (buffer.getLengthInBits() >= totalDataCount * 8) {\n\t\t\tbreak;\n\t\t}\n\t\tbuffer.put(QRCode.PAD1, 8);\n\t}\n\n\treturn QRCode.createBytes(buffer, rsBlocks);\n};\n\nQRCode.createBytes = function(buffer, rsBlocks) {\n\n\tvar offset = 0;\n\t\n\tvar maxDcCount = 0;\n\tvar maxEcCount = 0;\n\t\n\tvar dcdata = new Array(rsBlocks.length);\n\tvar ecdata = new Array(rsBlocks.length);\n\t\n\tfor (var r = 0; r < rsBlocks.length; r++) {\n\n\t\tvar dcCount = rsBlocks[r].dataCount;\n\t\tvar ecCount = rsBlocks[r].totalCount - dcCount;\n\n\t\tmaxDcCount = Math.max(maxDcCount, dcCount);\n\t\tmaxEcCount = Math.max(maxEcCount, ecCount);\n\t\t\n\t\tdcdata[r] = new Array(dcCount);\n\t\t\n\t\tfor (var i = 0; i < dcdata[r].length; i++) {\n\t\t\tdcdata[r][i] = 0xff & buffer.buffer[i + offset];\n\t\t}\n\t\toffset += dcCount;\n\t\t\n\t\tvar rsPoly = util.getErrorCorrectPolynomial(ecCount);\n\t\tvar rawPoly = new Polynomial(dcdata[r], rsPoly.getLength() - 1);\n\n\t\tvar modPoly = rawPoly.mod(rsPoly);\n\t\tecdata[r] = new Array(rsPoly.getLength() - 1);\n\t\tfor (var i = 0; i < ecdata[r].length; i++) {\n var modIndex = i + modPoly.getLength() - ecdata[r].length;\n\t\t\tecdata[r][i] = (modIndex >= 0)? modPoly.get(modIndex) : 0;\n\t\t}\n\n\t}\n\t\n\tvar totalCodeCount = 0;\n\tfor (var i = 0; i < rsBlocks.length; i++) {\n\t\ttotalCodeCount += rsBlocks[i].totalCount;\n\t}\n\n\tvar data = new Array(totalCodeCount);\n\tvar index = 0;\n\n\tfor (var i = 0; i < maxDcCount; i++) {\n\t\tfor (var r = 0; r < rsBlocks.length; r++) {\n\t\t\tif (i < dcdata[r].length) {\n\t\t\t\tdata[index++] = dcdata[r][i];\n\t\t\t}\n\t\t}\n\t}\n\n\tfor (var i = 0; i < maxEcCount; i++) {\n\t\tfor (var r = 0; r < rsBlocks.length; r++) {\n\t\t\tif (i < ecdata[r].length) {\n\t\t\t\tdata[index++] = ecdata[r][i];\n\t\t\t}\n\t\t}\n\t}\n\n\treturn data;\n};\n\nmodule.exports = QRCode;\n\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/qr.js/lib/QRCode.js\n// module id = 4\n// module chunks = 0", "var mode = require('./mode');\n\nfunction QR8bitByte(data) {\n\tthis.mode = mode.MODE_8BIT_BYTE;\n\tthis.data = data;\n}\n\nQR8bitByte.prototype = {\n\n\tgetLength : function(buffer) {\n\t\treturn this.data.length;\n\t},\n\t\n\twrite : function(buffer) {\n\t\tfor (var i = 0; i < this.data.length; i++) {\n\t\t\t// not JIS ...\n\t\t\tbuffer.put(this.data.charCodeAt(i), 8);\n\t\t}\n\t}\n};\n\nmodule.exports = QR8bitByte;\n\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/qr.js/lib/8BitByte.js\n// module id = 5\n// module chunks = 0", "module.exports = {\n\tMODE_NUMBER :\t\t1 << 0,\n\tMODE_ALPHA_NUM : \t1 << 1,\n\tMODE_8BIT_BYTE : \t1 << 2,\n\tMODE_KANJI :\t\t1 << 3\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/qr.js/lib/mode.js\n// module id = 6\n// module chunks = 0", "// ErrorCorrectLevel\nvar ECL = require('./ErrorCorrectLevel');\n\nfunction QRRSBlock(totalCount, dataCount) {\n\tthis.totalCount = totalCount;\n\tthis.dataCount = dataCount;\n}\n\nQRRSBlock.RS_BLOCK_TABLE = [\n\n\t// L\n\t// M\n\t// Q\n\t// H\n\n\t// 1\n\t[1, 26, 19],\n\t[1, 26, 16],\n\t[1, 26, 13],\n\t[1, 26, 9],\n\t\n\t// 2\n\t[1, 44, 34],\n\t[1, 44, 28],\n\t[1, 44, 22],\n\t[1, 44, 16],\n\n\t// 3\n\t[1, 70, 55],\n\t[1, 70, 44],\n\t[2, 35, 17],\n\t[2, 35, 13],\n\n\t// 4\t\t\n\t[1, 100, 80],\n\t[2, 50, 32],\n\t[2, 50, 24],\n\t[4, 25, 9],\n\t\n\t// 5\n\t[1, 134, 108],\n\t[2, 67, 43],\n\t[2, 33, 15, 2, 34, 16],\n\t[2, 33, 11, 2, 34, 12],\n\t\n\t// 6\n\t[2, 86, 68],\n\t[4, 43, 27],\n\t[4, 43, 19],\n\t[4, 43, 15],\n\t\n\t// 7\t\t\n\t[2, 98, 78],\n\t[4, 49, 31],\n\t[2, 32, 14, 4, 33, 15],\n\t[4, 39, 13, 1, 40, 14],\n\t\n\t// 8\n\t[2, 121, 97],\n\t[2, 60, 38, 2, 61, 39],\n\t[4, 40, 18, 2, 41, 19],\n\t[4, 40, 14, 2, 41, 15],\n\t\n\t// 9\n\t[2, 146, 116],\n\t[3, 58, 36, 2, 59, 37],\n\t[4, 36, 16, 4, 37, 17],\n\t[4, 36, 12, 4, 37, 13],\n\t\n\t// 10\t\t\n\t[2, 86, 68, 2, 87, 69],\n\t[4, 69, 43, 1, 70, 44],\n\t[6, 43, 19, 2, 44, 20],\n\t[6, 43, 15, 2, 44, 16],\n\n\t// 11\n\t[4, 101, 81],\n\t[1, 80, 50, 4, 81, 51],\n\t[4, 50, 22, 4, 51, 23],\n\t[3, 36, 12, 8, 37, 13],\n\n\t// 12\n\t[2, 116, 92, 2, 117, 93],\n\t[6, 58, 36, 2, 59, 37],\n\t[4, 46, 20, 6, 47, 21],\n\t[7, 42, 14, 4, 43, 15],\n\n\t// 13\n\t[4, 133, 107],\n\t[8, 59, 37, 1, 60, 38],\n\t[8, 44, 20, 4, 45, 21],\n\t[12, 33, 11, 4, 34, 12],\n\n\t// 14\n\t[3, 145, 115, 1, 146, 116],\n\t[4, 64, 40, 5, 65, 41],\n\t[11, 36, 16, 5, 37, 17],\n\t[11, 36, 12, 5, 37, 13],\n\n\t// 15\n\t[5, 109, 87, 1, 110, 88],\n\t[5, 65, 41, 5, 66, 42],\n\t[5, 54, 24, 7, 55, 25],\n\t[11, 36, 12],\n\n\t// 16\n\t[5, 122, 98, 1, 123, 99],\n\t[7, 73, 45, 3, 74, 46],\n\t[15, 43, 19, 2, 44, 20],\n\t[3, 45, 15, 13, 46, 16],\n\n\t// 17\n\t[1, 135, 107, 5, 136, 108],\n\t[10, 74, 46, 1, 75, 47],\n\t[1, 50, 22, 15, 51, 23],\n\t[2, 42, 14, 17, 43, 15],\n\n\t// 18\n\t[5, 150, 120, 1, 151, 121],\n\t[9, 69, 43, 4, 70, 44],\n\t[17, 50, 22, 1, 51, 23],\n\t[2, 42, 14, 19, 43, 15],\n\n\t// 19\n\t[3, 141, 113, 4, 142, 114],\n\t[3, 70, 44, 11, 71, 45],\n\t[17, 47, 21, 4, 48, 22],\n\t[9, 39, 13, 16, 40, 14],\n\n\t// 20\n\t[3, 135, 107, 5, 136, 108],\n\t[3, 67, 41, 13, 68, 42],\n\t[15, 54, 24, 5, 55, 25],\n\t[15, 43, 15, 10, 44, 16],\n\n\t// 21\n\t[4, 144, 116, 4, 145, 117],\n\t[17, 68, 42],\n\t[17, 50, 22, 6, 51, 23],\n\t[19, 46, 16, 6, 47, 17],\n\n\t// 22\n\t[2, 139, 111, 7, 140, 112],\n\t[17, 74, 46],\n\t[7, 54, 24, 16, 55, 25],\n\t[34, 37, 13],\n\n\t// 23\n\t[4, 151, 121, 5, 152, 122],\n\t[4, 75, 47, 14, 76, 48],\n\t[11, 54, 24, 14, 55, 25],\n\t[16, 45, 15, 14, 46, 16],\n\n\t// 24\n\t[6, 147, 117, 4, 148, 118],\n\t[6, 73, 45, 14, 74, 46],\n\t[11, 54, 24, 16, 55, 25],\n\t[30, 46, 16, 2, 47, 17],\n\n\t// 25\n\t[8, 132, 106, 4, 133, 107],\n\t[8, 75, 47, 13, 76, 48],\n\t[7, 54, 24, 22, 55, 25],\n\t[22, 45, 15, 13, 46, 16],\n\n\t// 26\n\t[10, 142, 114, 2, 143, 115],\n\t[19, 74, 46, 4, 75, 47],\n\t[28, 50, 22, 6, 51, 23],\n\t[33, 46, 16, 4, 47, 17],\n\n\t// 27\n\t[8, 152, 122, 4, 153, 123],\n\t[22, 73, 45, 3, 74, 46],\n\t[8, 53, 23, 26, 54, 24],\n\t[12, 45, 15, 28, 46, 16],\n\n\t// 28\n\t[3, 147, 117, 10, 148, 118],\n\t[3, 73, 45, 23, 74, 46],\n\t[4, 54, 24, 31, 55, 25],\n\t[11, 45, 15, 31, 46, 16],\n\n\t// 29\n\t[7, 146, 116, 7, 147, 117],\n\t[21, 73, 45, 7, 74, 46],\n\t[1, 53, 23, 37, 54, 24],\n\t[19, 45, 15, 26, 46, 16],\n\n\t// 30\n\t[5, 145, 115, 10, 146, 116],\n\t[19, 75, 47, 10, 76, 48],\n\t[15, 54, 24, 25, 55, 25],\n\t[23, 45, 15, 25, 46, 16],\n\n\t// 31\n\t[13, 145, 115, 3, 146, 116],\n\t[2, 74, 46, 29, 75, 47],\n\t[42, 54, 24, 1, 55, 25],\n\t[23, 45, 15, 28, 46, 16],\n\n\t// 32\n\t[17, 145, 115],\n\t[10, 74, 46, 23, 75, 47],\n\t[10, 54, 24, 35, 55, 25],\n\t[19, 45, 15, 35, 46, 16],\n\n\t// 33\n\t[17, 145, 115, 1, 146, 116],\n\t[14, 74, 46, 21, 75, 47],\n\t[29, 54, 24, 19, 55, 25],\n\t[11, 45, 15, 46, 46, 16],\n\n\t// 34\n\t[13, 145, 115, 6, 146, 116],\n\t[14, 74, 46, 23, 75, 47],\n\t[44, 54, 24, 7, 55, 25],\n\t[59, 46, 16, 1, 47, 17],\n\n\t// 35\n\t[12, 151, 121, 7, 152, 122],\n\t[12, 75, 47, 26, 76, 48],\n\t[39, 54, 24, 14, 55, 25],\n\t[22, 45, 15, 41, 46, 16],\n\n\t// 36\n\t[6, 151, 121, 14, 152, 122],\n\t[6, 75, 47, 34, 76, 48],\n\t[46, 54, 24, 10, 55, 25],\n\t[2, 45, 15, 64, 46, 16],\n\n\t// 37\n\t[17, 152, 122, 4, 153, 123],\n\t[29, 74, 46, 14, 75, 47],\n\t[49, 54, 24, 10, 55, 25],\n\t[24, 45, 15, 46, 46, 16],\n\n\t// 38\n\t[4, 152, 122, 18, 153, 123],\n\t[13, 74, 46, 32, 75, 47],\n\t[48, 54, 24, 14, 55, 25],\n\t[42, 45, 15, 32, 46, 16],\n\n\t// 39\n\t[20, 147, 117, 4, 148, 118],\n\t[40, 75, 47, 7, 76, 48],\n\t[43, 54, 24, 22, 55, 25],\n\t[10, 45, 15, 67, 46, 16],\n\n\t// 40\n\t[19, 148, 118, 6, 149, 119],\n\t[18, 75, 47, 31, 76, 48],\n\t[34, 54, 24, 34, 55, 25],\n\t[20, 45, 15, 61, 46, 16]\n];\n\nQRRSBlock.getRSBlocks = function(typeNumber, errorCorrectLevel) {\n\t\n\tvar rsBlock = QRRSBlock.getRsBlockTable(typeNumber, errorCorrectLevel);\n\t\n\tif (rsBlock == undefined) {\n\t\tthrow new Error(\"bad rs block @ typeNumber:\" + typeNumber + \"/errorCorrectLevel:\" + errorCorrectLevel);\n\t}\n\n\tvar length = rsBlock.length / 3;\n\t\n\tvar list = new Array();\n\t\n\tfor (var i = 0; i < length; i++) {\n\n\t\tvar count = rsBlock[i * 3 + 0];\n\t\tvar totalCount = rsBlock[i * 3 + 1];\n\t\tvar dataCount = rsBlock[i * 3 + 2];\n\n\t\tfor (var j = 0; j < count; j++) {\n\t\t\tlist.push(new QRRSBlock(totalCount, dataCount) );\t\n\t\t}\n\t}\n\t\n\treturn list;\n}\n\nQRRSBlock.getRsBlockTable = function(typeNumber, errorCorrectLevel) {\n\n\tswitch(errorCorrectLevel) {\n\tcase ECL.L :\n\t\treturn QRRSBlock.RS_BLOCK_TABLE[(typeNumber - 1) * 4 + 0];\n\tcase ECL.M :\n\t\treturn QRRSBlock.RS_BLOCK_TABLE[(typeNumber - 1) * 4 + 1];\n\tcase ECL.Q :\n\t\treturn QRRSBlock.RS_BLOCK_TABLE[(typeNumber - 1) * 4 + 2];\n\tcase ECL.H :\n\t\treturn QRRSBlock.RS_BLOCK_TABLE[(typeNumber - 1) * 4 + 3];\n\tdefault :\n\t\treturn undefined;\n\t}\n}\n\nmodule.exports = QRRSBlock;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/qr.js/lib/RSBlock.js\n// module id = 7\n// module chunks = 0", "module.exports = {\n\tL : 1,\n\tM : 0,\n\tQ : 3,\n\tH : 2\n};\n\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/qr.js/lib/ErrorCorrectLevel.js\n// module id = 8\n// module chunks = 0", "function QRBitBuffer() {\n\tthis.buffer = new Array();\n\tthis.length = 0;\n}\n\nQRBitBuffer.prototype = {\n\n\tget : function(index) {\n\t\tvar bufIndex = Math.floor(index / 8);\n\t\treturn ( (this.buffer[bufIndex] >>> (7 - index % 8) ) & 1) == 1;\n\t},\n\t\n\tput : function(num, length) {\n\t\tfor (var i = 0; i < length; i++) {\n\t\t\tthis.putBit( ( (num >>> (length - i - 1) ) & 1) == 1);\n\t\t}\n\t},\n\t\n\tgetLengthInBits : function() {\n\t\treturn this.length;\n\t},\n\t\n\tputBit : function(bit) {\n\t\n\t\tvar bufIndex = Math.floor(this.length / 8);\n\t\tif (this.buffer.length <= bufIndex) {\n\t\t\tthis.buffer.push(0);\n\t\t}\n\t\n\t\tif (bit) {\n\t\t\tthis.buffer[bufIndex] |= (0x80 >>> (this.length % 8) );\n\t\t}\n\t\n\t\tthis.length++;\n\t}\n};\n\nmodule.exports = QRBitBuffer;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/qr.js/lib/BitBuffer.js\n// module id = 9\n// module chunks = 0", "var Mode = require('./mode');\nvar Polynomial = require('./Polynomial');\nvar math = require('./math');\n\nvar QRMaskPattern = {\n\tPATTERN000 : 0,\n\tPATTERN001 : 1,\n\tPATTERN010 : 2,\n\tPATTERN011 : 3,\n\tPATTERN100 : 4,\n\tPATTERN101 : 5,\n\tPATTERN110 : 6,\n\tPATTERN111 : 7\n};\n\nvar QRUtil = {\n\n PATTERN_POSITION_TABLE : [\n\t [],\n\t [6, 18],\n\t [6, 22],\n\t [6, 26],\n\t [6, 30],\n\t [6, 34],\n\t [6, 22, 38],\n\t [6, 24, 42],\n\t [6, 26, 46],\n\t [6, 28, 50],\n\t [6, 30, 54],\t\t\n\t [6, 32, 58],\n\t [6, 34, 62],\n\t [6, 26, 46, 66],\n\t [6, 26, 48, 70],\n\t [6, 26, 50, 74],\n\t [6, 30, 54, 78],\n\t [6, 30, 56, 82],\n\t [6, 30, 58, 86],\n\t [6, 34, 62, 90],\n\t [6, 28, 50, 72, 94],\n\t [6, 26, 50, 74, 98],\n\t [6, 30, 54, 78, 102],\n\t [6, 28, 54, 80, 106],\n\t [6, 32, 58, 84, 110],\n\t [6, 30, 58, 86, 114],\n\t [6, 34, 62, 90, 118],\n\t [6, 26, 50, 74, 98, 122],\n\t [6, 30, 54, 78, 102, 126],\n\t [6, 26, 52, 78, 104, 130],\n\t [6, 30, 56, 82, 108, 134],\n\t [6, 34, 60, 86, 112, 138],\n\t [6, 30, 58, 86, 114, 142],\n\t [6, 34, 62, 90, 118, 146],\n\t [6, 30, 54, 78, 102, 126, 150],\n\t [6, 24, 50, 76, 102, 128, 154],\n\t [6, 28, 54, 80, 106, 132, 158],\n\t [6, 32, 58, 84, 110, 136, 162],\n\t [6, 26, 54, 82, 110, 138, 166],\n\t [6, 30, 58, 86, 114, 142, 170]\n ],\n\n G15 : (1 << 10) | (1 << 8) | (1 << 5) | (1 << 4) | (1 << 2) | (1 << 1) | (1 << 0),\n G18 : (1 << 12) | (1 << 11) | (1 << 10) | (1 << 9) | (1 << 8) | (1 << 5) | (1 << 2) | (1 << 0),\n G15_MASK : (1 << 14) | (1 << 12) | (1 << 10)\t| (1 << 4) | (1 << 1),\n\n getBCHTypeInfo : function(data) {\n\t var d = data << 10;\n\t while (QRUtil.getBCHDigit(d) - QRUtil.getBCHDigit(QRUtil.G15) >= 0) {\n\t\t d ^= (QRUtil.G15 << (QRUtil.getBCHDigit(d) - QRUtil.getBCHDigit(QRUtil.G15) ) ); \t\n\t }\n\t return ( (data << 10) | d) ^ QRUtil.G15_MASK;\n },\n\n getBCHTypeNumber : function(data) {\n\t var d = data << 12;\n\t while (QRUtil.getBCHDigit(d) - QRUtil.getBCHDigit(QRUtil.G18) >= 0) {\n\t\t d ^= (QRUtil.G18 << (QRUtil.getBCHDigit(d) - QRUtil.getBCHDigit(QRUtil.G18) ) ); \t\n\t }\n\t return (data << 12) | d;\n },\n\n getBCHDigit : function(data) {\n\n\t var digit = 0;\n\n\t while (data != 0) {\n\t\t digit++;\n\t\t data >>>= 1;\n\t }\n\n\t return digit;\n },\n\n getPatternPosition : function(typeNumber) {\n\t return QRUtil.PATTERN_POSITION_TABLE[typeNumber - 1];\n },\n\n getMask : function(maskPattern, i, j) {\n\t \n\t switch (maskPattern) {\n\t\t \n\t case QRMaskPattern.PATTERN000 : return (i + j) % 2 == 0;\n\t case QRMaskPattern.PATTERN001 : return i % 2 == 0;\n\t case QRMaskPattern.PATTERN010 : return j % 3 == 0;\n\t case QRMaskPattern.PATTERN011 : return (i + j) % 3 == 0;\n\t case QRMaskPattern.PATTERN100 : return (Math.floor(i / 2) + Math.floor(j / 3) ) % 2 == 0;\n\t case QRMaskPattern.PATTERN101 : return (i * j) % 2 + (i * j) % 3 == 0;\n\t case QRMaskPattern.PATTERN110 : return ( (i * j) % 2 + (i * j) % 3) % 2 == 0;\n\t case QRMaskPattern.PATTERN111 : return ( (i * j) % 3 + (i + j) % 2) % 2 == 0;\n\n\t default :\n\t\t throw new Error(\"bad maskPattern:\" + maskPattern);\n\t }\n },\n\n getErrorCorrectPolynomial : function(errorCorrectLength) {\n\n\t var a = new Polynomial([1], 0);\n\n\t for (var i = 0; i < errorCorrectLength; i++) {\n\t\t a = a.multiply(new Polynomial([1, math.gexp(i)], 0) );\n\t }\n\n\t return a;\n },\n\n getLengthInBits : function(mode, type) {\n\n\t if (1 <= type && type < 10) {\n\n\t\t // 1 - 9\n\n\t\t switch(mode) {\n\t\t case Mode.MODE_NUMBER \t: return 10;\n\t\t case Mode.MODE_ALPHA_NUM \t: return 9;\n\t\t case Mode.MODE_8BIT_BYTE\t: return 8;\n\t\t case Mode.MODE_KANJI \t: return 8;\n\t\t default :\n\t\t\t throw new Error(\"mode:\" + mode);\n\t\t }\n\n\t } else if (type < 27) {\n\n\t\t // 10 - 26\n\n\t\t switch(mode) {\n\t\t case Mode.MODE_NUMBER \t: return 12;\n\t\t case Mode.MODE_ALPHA_NUM \t: return 11;\n\t\t case Mode.MODE_8BIT_BYTE\t: return 16;\n\t\t case Mode.MODE_KANJI \t: return 10;\n\t\t default :\n\t\t\t throw new Error(\"mode:\" + mode);\n\t\t }\n\n\t } else if (type < 41) {\n\n\t\t // 27 - 40\n\n\t\t switch(mode) {\n\t\t case Mode.MODE_NUMBER \t: return 14;\n\t\t case Mode.MODE_ALPHA_NUM\t: return 13;\n\t\t case Mode.MODE_8BIT_BYTE\t: return 16;\n\t\t case Mode.MODE_KANJI \t: return 12;\n\t\t default :\n\t\t\t throw new Error(\"mode:\" + mode);\n\t\t }\n\n\t } else {\n\t\t throw new Error(\"type:\" + type);\n\t }\n },\n\n getLostPoint : function(qrCode) {\n\t \n\t var moduleCount = qrCode.getModuleCount();\n\t \n\t var lostPoint = 0;\n\t \n\t // LEVEL1\n\t \n\t for (var row = 0; row < moduleCount; row++) {\n\n\t\t for (var col = 0; col < moduleCount; col++) {\n\n\t\t\t var sameCount = 0;\n\t\t\t var dark = qrCode.isDark(row, col);\n\n\t\t\t\tfor (var r = -1; r <= 1; r++) {\n\n\t\t\t\t if (row + r < 0 || moduleCount <= row + r) {\n\t\t\t\t\t continue;\n\t\t\t\t }\n\n\t\t\t\t for (var c = -1; c <= 1; c++) {\n\n\t\t\t\t\t if (col + c < 0 || moduleCount <= col + c) {\n\t\t\t\t\t\t continue;\n\t\t\t\t\t }\n\n\t\t\t\t\t if (r == 0 && c == 0) {\n\t\t\t\t\t\t continue;\n\t\t\t\t\t }\n\n\t\t\t\t\t if (dark == qrCode.isDark(row + r, col + c) ) {\n\t\t\t\t\t\t sameCount++;\n\t\t\t\t\t }\n\t\t\t\t }\n\t\t\t }\n\n\t\t\t if (sameCount > 5) {\n\t\t\t\t lostPoint += (3 + sameCount - 5);\n\t\t\t }\n\t\t }\n\t }\n\n\t // LEVEL2\n\n\t for (var row = 0; row < moduleCount - 1; row++) {\n\t\t for (var col = 0; col < moduleCount - 1; col++) {\n\t\t\t var count = 0;\n\t\t\t if (qrCode.isDark(row, col ) ) count++;\n\t\t\t if (qrCode.isDark(row + 1, col ) ) count++;\n\t\t\t if (qrCode.isDark(row, col + 1) ) count++;\n\t\t\t if (qrCode.isDark(row + 1, col + 1) ) count++;\n\t\t\t if (count == 0 || count == 4) {\n\t\t\t\t lostPoint += 3;\n\t\t\t }\n\t\t }\n\t }\n\n\t // LEVEL3\n\n\t for (var row = 0; row < moduleCount; row++) {\n\t\t for (var col = 0; col < moduleCount - 6; col++) {\n\t\t\t if (qrCode.isDark(row, col)\n\t\t\t\t\t && !qrCode.isDark(row, col + 1)\n\t\t\t\t\t && qrCode.isDark(row, col + 2)\n\t\t\t\t\t && qrCode.isDark(row, col + 3)\n\t\t\t\t\t && qrCode.isDark(row, col + 4)\n\t\t\t\t\t && !qrCode.isDark(row, col + 5)\n\t\t\t\t\t && qrCode.isDark(row, col + 6) ) {\n\t\t\t\t lostPoint += 40;\n\t\t\t }\n\t\t }\n\t }\n\n\t for (var col = 0; col < moduleCount; col++) {\n\t\t for (var row = 0; row < moduleCount - 6; row++) {\n\t\t\t if (qrCode.isDark(row, col)\n\t\t\t\t\t && !qrCode.isDark(row + 1, col)\n\t\t\t\t\t && qrCode.isDark(row + 2, col)\n\t\t\t\t\t && qrCode.isDark(row + 3, col)\n\t\t\t\t\t && qrCode.isDark(row + 4, col)\n\t\t\t\t\t && !qrCode.isDark(row + 5, col)\n\t\t\t\t\t && qrCode.isDark(row + 6, col) ) {\n\t\t\t\t lostPoint += 40;\n\t\t\t }\n\t\t }\n\t }\n\n\t // LEVEL4\n\t \n\t var darkCount = 0;\n\n\t for (var col = 0; col < moduleCount; col++) {\n\t\t for (var row = 0; row < moduleCount; row++) {\n\t\t\t if (qrCode.isDark(row, col) ) {\n\t\t\t\t darkCount++;\n\t\t\t }\n\t\t }\n\t }\n\t \n\t var ratio = Math.abs(100 * darkCount / moduleCount / moduleCount - 50) / 5;\n\t lostPoint += ratio * 10;\n\n\t return lostPoint;\t\t\n }\n};\n\nmodule.exports = QRUtil;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/qr.js/lib/util.js\n// module id = 10\n// module chunks = 0", "var math = require('./math');\n\nfunction QRPolynomial(num, shift) {\n\n\tif (num.length == undefined) {\n\t\tthrow new Error(num.length + \"/\" + shift);\n\t}\n\n\tvar offset = 0;\n\n\twhile (offset < num.length && num[offset] == 0) {\n\t\toffset++;\n\t}\n\n\tthis.num = new Array(num.length - offset + shift);\n\tfor (var i = 0; i < num.length - offset; i++) {\n\t\tthis.num[i] = num[i + offset];\n\t}\n}\n\nQRPolynomial.prototype = {\n\n\tget : function(index) {\n\t\treturn this.num[index];\n\t},\n\t\n\tgetLength : function() {\n\t\treturn this.num.length;\n\t},\n\t\n\tmultiply : function(e) {\n\t\n\t\tvar num = new Array(this.getLength() + e.getLength() - 1);\n\t\n\t\tfor (var i = 0; i < this.getLength(); i++) {\n\t\t\tfor (var j = 0; j < e.getLength(); j++) {\n\t\t\t\tnum[i + j] ^= math.gexp(math.glog(this.get(i) ) + math.glog(e.get(j) ) );\n\t\t\t}\n\t\t}\n\t\n\t\treturn new QRPolynomial(num, 0);\n\t},\n\t\n\tmod : function(e) {\n\t\n\t\tif (this.getLength() - e.getLength() < 0) {\n\t\t\treturn this;\n\t\t}\n\t\n\t\tvar ratio = math.glog(this.get(0) ) - math.glog(e.get(0) );\n\t\n\t\tvar num = new Array(this.getLength() );\n\t\t\n\t\tfor (var i = 0; i < this.getLength(); i++) {\n\t\t\tnum[i] = this.get(i);\n\t\t}\n\t\t\n\t\tfor (var i = 0; i < e.getLength(); i++) {\n\t\t\tnum[i] ^= math.gexp(math.glog(e.get(i) ) + ratio);\n\t\t}\n\t\n\t\t// recursive call\n\t\treturn new QRPolynomial(num, 0).mod(e);\n\t}\n};\n\nmodule.exports = QRPolynomial;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/qr.js/lib/Polynomial.js\n// module id = 11\n// module chunks = 0", "var QRMath = {\n\n\tglog : function(n) {\n\t\n\t\tif (n < 1) {\n\t\t\tthrow new Error(\"glog(\" + n + \")\");\n\t\t}\n\t\t\n\t\treturn QRMath.LOG_TABLE[n];\n\t},\n\t\n\tgexp : function(n) {\n\t\n\t\twhile (n < 0) {\n\t\t\tn += 255;\n\t\t}\n\t\n\t\twhile (n >= 256) {\n\t\t\tn -= 255;\n\t\t}\n\t\n\t\treturn QRMath.EXP_TABLE[n];\n\t},\n\t\n\tEXP_TABLE : new Array(256),\n\t\n\tLOG_TABLE : new Array(256)\n\n};\n\t\nfor (var i = 0; i < 8; i++) {\n\tQRMath.EXP_TABLE[i] = 1 << i;\n}\nfor (var i = 8; i < 256; i++) {\n\tQRMath.EXP_TABLE[i] = QRMath.EXP_TABLE[i - 4]\n\t\t^ QRMath.EXP_TABLE[i - 5]\n\t\t^ QRMath.EXP_TABLE[i - 6]\n\t\t^ QRMath.EXP_TABLE[i - 8];\n}\nfor (var i = 0; i < 255; i++) {\n\tQRMath.LOG_TABLE[QRMath.EXP_TABLE[i] ] = i;\n}\n\nmodule.exports = QRMath;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/qr.js/lib/math.js\n// module id = 12\n// module chunks = 0", "module.exports = \"\\n
\\n \\n \\n
\\n\";\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/vue-html-loader!./~/vue-loader/lib/selector.js?type=template&index=0!./src/Qrcode.vue\n// module id = 13\n// module chunks = 0" ], + "sourceRoot": "" +} diff --git a/BTCPayServer/wwwroot/vendor/vuejs/vue-qrcode.min.js b/BTCPayServer/wwwroot/vendor/vuejs/vue-qrcode.min.js new file mode 100755 index 0000000000..0ffa0ef762 --- /dev/null +++ b/BTCPayServer/wwwroot/vendor/vuejs/vue-qrcode.min.js @@ -0,0 +1 @@ +!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.VueQr=e():t.VueQr=e()}(this,function(){return function(t){function e(o){if(r[o])return r[o].exports;var n=r[o]={exports:{},id:o,loaded:!1};return t[o].call(n.exports,n,n.exports,e),n.loaded=!0,n.exports}var r={};return e.m=t,e.c=r,e.p="",e(0)}([function(t,e,r){"use strict";function o(t){return t&&t.__esModule?t:{default:t}}var n=r(13),i=o(n);t.exports=i.default},function(t,e){t.exports={L:1,M:0,Q:3,H:2}},function(t,e,r){function o(t,e){if(void 0==t.length)throw new Error(t.length+"/"+e);for(var r=0;r=256;)t-=255;return r.EXP_TABLE[t]},EXP_TABLE:new Array(256),LOG_TABLE:new Array(256)},o=0;o<8;o++)r.EXP_TABLE[o]=1<>>7-t%8&1)},put:function(t,e){for(var r=0;r>>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++}},t.exports=r},function(t,e,r){function o(t,e){this.typeNumber=t,this.errorCorrectLevel=e,this.modules=null,this.moduleCount=0,this.dataCache=null,this.dataList=[]}var n=r(7),i=r(10),a=r(8),s=r(11),u=r(2),h=o.prototype;h.addData=function(t){var e=new n(t);this.dataList.push(e),this.dataCache=null},h.isDark=function(t,e){if(t<0||this.moduleCount<=t||e<0||this.moduleCount<=e)throw new Error(t+","+e);return this.modules[t][e]},h.getModuleCount=function(){return this.moduleCount},h.make=function(){if(this.typeNumber<1){var t=1;for(t=1;t<40;t++){for(var e=i.getRSBlocks(t,this.errorCorrectLevel),r=new a,o=0,n=0;n=7&&this.setupTypeNumber(t),null==this.dataCache&&(this.dataCache=o.createData(this.typeNumber,this.errorCorrectLevel,this.dataList)),this.mapData(this.dataCache,e)},h.setupPositionProbePattern=function(t,e){for(var r=-1;r<=7;r++)if(!(t+r<=-1||this.moduleCount<=t+r))for(var o=-1;o<=7;o++)e+o<=-1||this.moduleCount<=e+o||(0<=r&&r<=6&&(0==o||6==o)||0<=o&&o<=6&&(0==r||6==r)||2<=r&&r<=4&&2<=o&&o<=4?this.modules[t+r][e+o]=!0:this.modules[t+r][e+o]=!1)},h.getBestMaskPattern=function(){for(var t=0,e=0,r=0;r<8;r++){this.makeImpl(!0,r);var o=s.getLostPoint(this);(0==r||t>o)&&(t=o,e=r)}return e},h.createMovieClip=function(t,e,r){var o=t.createEmptyMovieClip(e,r),n=1;this.make();for(var i=0;i>r&1);this.modules[Math.floor(r/3)][r%3+this.moduleCount-8-3]=o}for(var r=0;r<18;r++){var o=!t&&1==(e>>r&1);this.modules[r%3+this.moduleCount-8-3][Math.floor(r/3)]=o}},h.setupTypeInfo=function(t,e){for(var r=this.errorCorrectLevel<<3|e,o=s.getBCHTypeInfo(r),n=0;n<15;n++){var i=!t&&1==(o>>n&1);n<6?this.modules[n][8]=i:n<8?this.modules[n+1][8]=i:this.modules[this.moduleCount-15+n][8]=i}for(var n=0;n<15;n++){var i=!t&&1==(o>>n&1);n<8?this.modules[8][this.moduleCount-n-1]=i:n<9?this.modules[8][15-n-1+1]=i:this.modules[8][15-n-1]=i}this.modules[this.moduleCount-8][8]=!t},h.mapData=function(t,e){for(var r=-1,o=this.moduleCount-1,n=7,i=0,a=this.moduleCount-1;a>0;a-=2)for(6==a&&a--;;){for(var u=0;u<2;u++)if(null==this.modules[o][a-u]){var h=!1;i>>n&1));var l=s.getMask(e,o,a-u);l&&(h=!h),this.modules[o][a-u]=h,n--,n==-1&&(i++,n=7)}if(o+=r,o<0||this.moduleCount<=o){o-=r,r=-r;break}}},o.PAD0=236,o.PAD1=17,o.createData=function(t,e,r){for(var n=i.getRSBlocks(t,e),u=new a,h=0;h8*f)throw new Error("code length overflow. ("+u.getLengthInBits()+">"+8*f+")");for(u.getLengthInBits()+4<=8*f&&u.put(0,4);u.getLengthInBits()%8!=0;)u.putBit(!1);for(;;){if(u.getLengthInBits()>=8*f)break;if(u.put(o.PAD0,8),u.getLengthInBits()>=8*f)break;u.put(o.PAD1,8)}return o.createBytes(u,n)},o.createBytes=function(t,e){for(var r=0,o=0,n=0,i=new Array(e.length),a=new Array(e.length),h=0;h=0?v.get(p):0}}for(var m=0,g=0;g=0;)e^=s.G15<=0;)e^=s.G18<>>=1;return e},getPatternPosition:function(t){return s.PATTERN_POSITION_TABLE[t-1]},getMask:function(t,e,r){switch(t){case a.PATTERN000:return(e+r)%2==0;case a.PATTERN001:return e%2==0;case a.PATTERN010:return r%3==0;case a.PATTERN011:return(e+r)%3==0;case a.PATTERN100:return(Math.floor(e/2)+Math.floor(r/3))%2==0;case a.PATTERN101:return e*r%2+e*r%3==0;case a.PATTERN110:return(e*r%2+e*r%3)%2==0;case a.PATTERN111:return(e*r%3+(e+r)%2)%2==0;default:throw new Error("bad maskPattern:"+t)}},getErrorCorrectPolynomial:function(t){for(var e=new n([1],0),r=0;r5&&(r+=3+i-5)}for(var o=0;o
"},function(t,e,r){var o,n;o=r(5),n=r(12),t.exports=o||{},t.exports.__esModule&&(t.exports=t.exports.default),n&&(("function"==typeof t.exports?t.exports.options:t.exports).template=n)}])}); \ No newline at end of file diff --git a/BTCPayServer/wwwroot/vendor/vuejs/vue.js b/BTCPayServer/wwwroot/vendor/vuejs/vue.js old mode 100644 new mode 100755 diff --git a/BTCPayServer/wwwroot/vendor/vuejs/vue.min.js b/BTCPayServer/wwwroot/vendor/vuejs/vue.min.js old mode 100644 new mode 100755 diff --git a/LICENSE b/LICENSE old mode 100644 new mode 100755 diff --git a/README.md b/README.md old mode 100644 new mode 100755 index d00898af77..7bcc5b8edb --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # BTCPay Server -![BTCPay Server](BTCPayServer/wwwroot/img/btc_pay_BG_twitter.png) +![BTCPay Jungle](BTCPayServer/wwwroot/img/btc_pay_BG_twitter.png)

Accept Bitcoin payments ₿ diff --git a/azure-pipelines.yml b/azure-pipelines.yml new file mode 100644 index 0000000000..52d23025a0 --- /dev/null +++ b/azure-pipelines.yml @@ -0,0 +1,31 @@ +# Build a Docker image +# https://docs.microsoft.com/azure/devops/pipelines/languages/docker + +trigger: +- master + +resources: +- repo: self + +variables: + tag: '$(Build.BuildId)' + +stages: +- stage: Build + displayName: Build image + jobs: + - job: Build + displayName: Build + pool: + vmImage: 'ubuntu-latest' + steps: + - task: KubectlInstaller@0 + inputs: + kubectlVersion: 'latest' + - task: Docker@2 + displayName: Build an image + inputs: + command: build + dockerfile: 'amd64.Dockerfile' + tags: | + $(1.0.5.3) diff --git a/publish-docker.ps1 b/publish-docker.ps1 old mode 100644 new mode 100755