diff --git a/.htaccess b/.htaccess new file mode 100644 index 0000000..b6e5fd1 --- /dev/null +++ b/.htaccess @@ -0,0 +1,20 @@ +Options +FollowSymLinks +RewriteEngine On +RewriteRule ^guide/?$ guide.php +RewriteRule ^guide/installer-minetest/?$ guide/installer-minetest.php +RewriteRule ^guide/se-deplacer-dans-minetest/?$ guide/se-deplacer-dans-minetest.php +RewriteRule ^guide/constuire-inventaire-minetest/?$ guide/constuire-inventaire-minetest.php +RewriteRule ^guide/monnaie-argent-minetest/?$ guide/monnaie-argent-minetest.php +RewriteRule ^guide/discuter-minetest-mumble/?$ guide/discuter-minetest-mumble.php +RewriteRule ^guide/rejoindre-serveur-minetest/?$ guide/rejoindre-serveur-minetest.php +RewriteRule ^guide/panneaux-minetest/?$ guide/panneaux-minetest.php +RewriteRule ^guide/boite-aux-lettres-minetest/?$ guide/boite-aux-lettres-minetest.php +RewriteRule ^guide/boutique-g1-minetest/?$ guide/boutique-g1-minetest.php + +RewriteRule ^soutenir/?$ soutenir.php +RewriteRule ^developper/?$ developper.php + +RewriteCond %{REQUEST_FILENAME} !-f +RewriteRule ^thumbs/([0-9]+)w/(.*\.(jpg|jpeg|png))$ thumb.php?filename=$2&thumbWidth=$1 + + diff --git a/Minetest_logo-240px.png b/Minetest_logo-240px.png new file mode 100644 index 0000000..e80d222 Binary files /dev/null and b/Minetest_logo-240px.png differ diff --git a/Minetest_logo.png b/Minetest_logo.png new file mode 100644 index 0000000..79801ee Binary files /dev/null and b/Minetest_logo.png differ diff --git a/config.php b/config.php new file mode 100644 index 0000000..41cd25b --- /dev/null +++ b/config.php @@ -0,0 +1,136 @@ + [ + + 'w' => [400, 620], + + 'breakpoints' => ' + (max-width: 42.249rem) 400px, + (max-width: 55.999rem) 620px, + 400px + ' + ], + + 'col_3_2_1' => [ + + 'w' => [408, 628], + + 'breakpoints' => ' + (max-width: 42.249rem) 408px, + (max-width: 55.999rem) 628px, + 408px + ', + ], + + 'col_2_1_bordered' => [ + + 'w' => [400, 620, 840], + + 'breakpoints' => ' + (max-width: 42.249rem) 400px, + (max-width: 55.999rem) 620px, + (max-width: 83.490rem) 840px, + 620px + ', + ], + + 'col_2_1' => [ + + 'w' => [408, 628, 848], + + 'breakpoints' => ' + (max-width: 42.249rem) 408px, + (max-width: 55.999rem) 628px, + (max-width: 83.490rem) 848px, + 628px + ', + ], + + 'article_full_width' => [ + + 'w' => [392, 502, 612, 832, 942], + + 'breakpoints' => ' + (max-width: 35.374rem) 392px, + (max-width: 42.249rem) 502px, + (max-width: 55.999rem) 612px, + (max-width: 83.499rem) 832px, + 942px + ', + ], + + 'gallery_3_2_1' => [ + + 'w' => [502, 298, 267, 303], + + 'breakpoints' => ' + (max-width: 42.249rem) 502px, + (max-width: 55.999rem) 298px, + (max-width: 84.499rem) 267px, + 303px + ', + ], + + 'gallery_2_1' => [ + + 'w' => [612, 408, 463], + + 'breakpoints' => ' + (max-width: 55.999rem) 612px, + (max-width: 84.499rem) 408px, + 463px + ', + ], +]; + +$thumbExt = '.jpg'; + + +function image ($filename, $alt, $layout) { + + global $thumbExt; + + $imgName = substr($filename, 0, strrpos($filename, '.')); + + $out = ''; + + $out .= ' +image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/css/ciel-etoile-orig.png b/css/ciel-etoile-orig.png new file mode 100644 index 0000000..c54d7b5 Binary files /dev/null and b/css/ciel-etoile-orig.png differ diff --git a/css/ciel-etoile.png b/css/ciel-etoile.png new file mode 100644 index 0000000..30d36dd Binary files /dev/null and b/css/ciel-etoile.png differ diff --git a/css/cols.css b/css/cols.css new file mode 100644 index 0000000..d51945e --- /dev/null +++ b/css/cols.css @@ -0,0 +1,65 @@ +:root { + + font-size: 16px; + + --col-width: 4.875rem; + --col-gap: 2rem; + --box-border-width: 0.25rem; + +} + +@media screen and (min-width: 28.5rem) { + + :root { + + --page-col-nb: 4; + + --benefits-col-nb: 4; + --worlds-col-nb: 4; + --guides-col-nb: 4; + } + +} + + +@media screen and (min-width: 42.25rem) { + + :root { + + --page-col-nb: 6; + + --benefits-col-nb: 6; + --worlds-col-nb: 6; + --guides-col-nb: 6; + } + +} + + + +@media screen and (min-width: 56rem) { + + :root { + + --page-col-nb: 8; + + --benefits-col-nb: 4; + --worlds-col-nb: 8; + --guides-col-nb: 4; + } +} + + +@media screen and (min-width: 83.5rem) { + + :root { + + --page-col-nb: 12; + --benefits-col-nb: 4; + --worlds-col-nb: 6; + --guides-col-nb: 4; + } + +} + + diff --git a/css/decoration-donors.css b/css/decoration-donors.css new file mode 100644 index 0000000..ca1be95 --- /dev/null +++ b/css/decoration-donors.css @@ -0,0 +1,59 @@ +/* ------------------------------------------ DONORS ------------------------------------------ */ + + +.donorsList { + + list-style: none; + font-family: sans-serif; +} + + +.donorsList li { + + background-color: white; + box-shadow: -0.125rem 0.125rem 0.75rem hsla(0, 0%, 0%, 0.2); + border-style: solid; + border-color: transparent; + + position: relative; +} + +.donorsList li:before { + + position: absolute; + top: 0.125rem; + content: "."; + color: transparent; + background-image: url("sprites/heart.png"); + background-size: cover; + background-repeat: no-repeat; + right: 0.125rem; + + width: 1rem; + height: 1rem; + +} + + +.donorsList li a { + + color: hsl(0, 0%, 10%); + text-decoration: none; +} + + +.donorsList li a img { + + background: black; +} + + + +.donorsList li a .name { + + font-weight: bold; + background: white; + color: #1d1d1d; +} + + diff --git a/css/decoration-home.css b/css/decoration-home.css new file mode 100644 index 0000000..cf80094 --- /dev/null +++ b/css/decoration-home.css @@ -0,0 +1,208 @@ +:root { + + --navy: #15262b; +} + +#guides > li a dfn span, +body.home main h2 > span { + + display: inline-block; +} + +/* ------------------------------------------ BLOCK STYLE ------------------------------------------ */ + +#worlds a, +#worlds a:visited, +#guides a, +#guides a:visited { + + color: white; +} + + + +#worlds dt, +#worlds dd, +#benefits dt, +#benefits dd, +#guides > li a { + + position: relative; +} + +#worlds dt:before, +#worlds dd:before, +#benefits dt:before, +#benefits dd:before, +#guides > li a { + + box-shadow: + 0 0 1.00rem hsl(0, 100%, 100%, 0.5), + 0 0rem 0.75rem hsla(0, 0%, 0%, 0.5), + 0 0rem 0.5rem hsla(0, 0%, 0%, 0.75), + 0 0rem 0.25rem hsla(0, 0%, 0%, 1); +} + +/* +#worlds dt:before, +#worlds dd:before, +#benefits dt:before, +#benefits dd:before { + + content: " "; + width: 100%; + height: 100%; + z-index: 10; + display: block; + top: 0; + left: 0; + position: absolute; +} +*/ + +#worlds dt, +#benefits dt { + + z-index: 50; +} + +#worlds dd img, +#benefits dd img { + + position: relative; + z-index: 200; +} + +#benefits dt, +#benefits dd, +#worlds dt, +#worlds dd +{ + + border-style: solid; +} + +#benefits dd, +#worlds dd { + + font-weight: 600; +} + +#benefits dt, +#worlds dt { + + font-weight: bold; +} + + + + +/* --------------------------------------- RAISONS DE VENIR --------------------------------------- */ + + +#benefits dd, +#benefits dt { + + color: hsl(0, 0%, 20%); + border-color: var(--navy); + overflow: hidden; +} + +#benefits a, +#benefits a:visited { + + color: inherit; +} + +#benefits dd { + + background-color: var(--nuage-1); +} + +#benefits dt{ + + background-color: var(--nuage-1); +} + + + + +/* ------------------------------------------ MONDES ------------------------------------------ */ + + + +#worlds dt { + + font-weight: bold; +} + +#worlds dd address { + + font-style: normal; +} + +#worlds dt, +#worlds dd { + + border-color: #ffff81; + overflow: hidden; +} + +#worlds dt { + + background-color: green; + color: white; +} + +#worlds dd { + + background-color: var(--marron); + color: white; +} + + +/* ------------------------------------------ GUIDES ------------------------------------------ */ + + +#guides > li a { + + border-color: transparent; + background-image: + linear-gradient(hsla(0, 0%, 100%, 0.6) 0%, hsla(0, 0%, 100%, 0.61) 100%), + url("sprites/default_gravel.png"); + background-size: cover, 25.5rem; +} + +#guides > li a > span, +#guides > li a img { + + + background-color: transparent; + color: black; +} + +#guides > li a dfn, +#guides > li a:visited dfn { + + background-color: hsl(0, 0%, 15%); + color: hsl(0, 0%, 95%); + +} + +#guides > li a:hover { + + transform: scale(1.05); + border-color: black; +} + +#guides { + + counter-reset: num-tuto; +} + +#guides > li a, +#guides > li a:visited { + + text-decoration: none; +} + diff --git a/css/decoration.css b/css/decoration.css new file mode 100644 index 0000000..9cc3b6b --- /dev/null +++ b/css/decoration.css @@ -0,0 +1,259 @@ +:root { + + --marron: hsl(25.5, 67.8%, 40.2%); + --marron-fonce: hsl(25.5, 67.8%, 20.1%); + --nuage-1: hsl(60, 100%, 97.6%); + --nuage-2: hsl(48, 20%, 80.4%); + --bleu-ciel: hsl(215.3, 91.1%, 78%); + --orange: #ff4000; + --rouge: rgb(255, 110, 110); +} + +@font-face { + + font-family: Cantarell; + src: url("https://txmn.tk:8480/ipfs/QmdrTnJY7sW7DPJDwwoujoAAuKPwjDLbjzBKEVj8uuBoTF/Cantarell-Regular.otf") format("opentype"), + url("/fonts/Cantarell-Regular.otf") format("opentype"); +} + +@font-face { + + font-family: SourceCodePro; + src: url("https://txmn.tk:8480/ipfs/Qmf1N4o5DjrPRLaSiqCmBf9CUyksvgys2m2oj5WA2gAwDR/SourceCodePro-Regular.otf") format("opentype"), + url("/fonts/SourceCodePro-Regular.otf") format("opentype"); +} + +html, body { + + font-family: Cantarell, "Liberation Sans", Helvetica, Arial; +} + +.sr-only { + + display: none !important; +} + + +body > header nav button { + + background-color: transparent; + color: rgba(255, 255, 255, 0.5); + cursor: pointer; + +} + +body > header nav button:after { + + background-color: transparent; + background-image: url("data:image/svg+xml;charset=utf8,%3Csvg viewBox='0 0 30 30' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath stroke='rgba(255, 255, 255, 0.8)' stroke-width='2' stroke-linecap='round' stroke-miterlimit='10' d='M4 7h22M4 15h22M4 23h22'/%3E%3C/svg%3E"); + background-repeat: repeat; + background-position: center center; + background-size: cover; +} + +header nav ul li a { + + text-decoration: none; +} + +header .sitedesc { + + font-weight: bold; +} + +footer [role="contentinfo"] { + + opacity: 0.666; +} + + + +/* ------------------------------------------ CONTENTS ------------------------------------------ */ + + + +article { + + border-style: solid; + border-color: var(--marron-fonce); + background-image: + linear-gradient(hsla(0, 0%, 100%, 0.5) 0%, hsla(0, 0%, 100%, 0.5) 100%), + url("sprites/default_pine_wood.png"); + background-size: cover, 2rem; + background-position-y: 0, -0.75rem; + color: black; +} + +body.guide article { + + border-color: transparent; + background-image: + linear-gradient(hsla(0, 0%, 100%, 0.6) 0%, hsla(0, 0%, 100%, 0.61) 100%), + url("sprites/default_gravel.png"); + background-size: cover, 25.5rem; +} + + +article h1 { + + background: var(--marron-fonce); + color: white; +} + +body.guide article h1 { + + background: #222; + color: white; +} + + + +a, a:visited { + + color: blue; +} + + +#successMsg { + + opacity: 0; +} + +code { + + background-color: black; + color: white; + padding: 0.25rem 0.5rem; +} + +/* ------------------------------------------ TABLEAUX ------------------------------------------ */ + + +table { + + border-collapse: collapse; +} + +table thead { + + background: black; + color: white; +} + +tbody > tr:nth-of-type(odd) { + + background-color: #ededed; +} + +tbody > tr:nth-of-type(even) { + + background-color: white; +} + +table td, +table th { + + border-style: solid; + border-color: black; +} + +table td.nombre, +table th.nombre { + + text-align: right; +} + + + +/* ------------------------------------------ SERVEURS ------------------------------------------ */ + + + +address, dfn { + + font-style: normal; +} + +address.server > * { + + font-family: SourceCodePro, "DroidSans Mono", Cantarell, "Liberation Sans", Helvetica, Arial; + + border-style: solid; + background-color: var(--orange); + border-color: var(--orange); + + color: white; +} + +address.server dfn { + + background-color: white; + color: black; +} + +address.server span:last-of-type { + + border-left-color: white; +} + +address.server span:first-of-type { + + border-right-color: white; +} + + + + +/* ------------------------------------------ BOITES ------------------------------------------ */ + + + +.warn { + + background-color: var(--rouge); +} + +.warn:before { + + content: "⚠ "; + float: left; + font-size: 3em; +} + +kdb, .mono { + + font-family: SourceCodePro, "DroidSans Mono", Cantarell, "Liberation Sans", Helvetica, Arial; + + border-style: solid; + + border-color: rgba(200,200,200,0.5); + background-color: hsl(0, 0%, 98%); + color: black; +} + +.pubkey-and-copy-button input { + + border-color: var(--marron-fonce); +} + +.pubkey-and-copy-button button { + + background-color: var(--marron-fonce); + color: white; + font-weight: bold; +} + +q { + + font-style: italic; +} + +q:before { + + padding-right: 0.25em; +} + +q:after { + + padding-left: 0.25em; +} diff --git a/css/layout-donors.css b/css/layout-donors.css new file mode 100644 index 0000000..2f8f97f --- /dev/null +++ b/css/layout-donors.css @@ -0,0 +1,180 @@ +@import "cols.css"; + +/* ------------------------------------------ DONORS ------------------------------------------ */ + + +.donorsList { + + margin-left: 0; + margin-right: 0; + padding-left: 0; + padding-right: 0; + margin-top: 2rem; + margin-bottom: 2rem; + /* + display: flex; + flex-wrap: wrap; + */ + justify-content: center; + display: grid; + + grid-row-gap: 1rem; + grid-column-gap: 1rem; + + grid-auto-flow: row; +} + +.donorsList li { + /* + flex-basis: var(--base-width); + flex-grow: 0; + + display: flex; + align-items: center; + */ + overflow: hidden; + margin: 0; + text-align: center; + + border-width: 0.25rem; +} + + + +.donorsList li a { + + display: flex; + flex-direction: column; + height: 100%; + width: 100%; + font-size: 0.9em; +} + + +.donorsList li a img { + + width: 100%; + display: block; +} + + + +.donorsList li a img, +.donorsList li a .name { + + width: 100%; +} + + +.donorsList li a .name { + + flex-grow: 1; + padding: 1rem 0; + text-align: center; + + display: flex; + align-items: center; +} + + +.donorsList li a .name span { + + padding: 0 1em; + + flex-grow: 1; +} + + +@media screen and (min-width: 28.5rem) { + + + .donorsList li:nth-of-type(3n+1) { + + grid-column: 1; + } + + .donorsList li:nth-of-type(3n+2) { + + grid-column: 2; + } + + .donorsList li:nth-of-type(3n+3) { + + grid-column: 3; + } + +} + +@media screen and (min-width: 42.25rem) { + + .donorsList li:nth-of-type(5n+1) { + + grid-column: 1; + } + + .donorsList li:nth-of-type(5n+2) { + + grid-column: 2; + } + + .donorsList li:nth-of-type(5n+3) { + + grid-column: 3; + } + + .donorsList li:nth-of-type(5n+4) { + + grid-column: 4; + } + + .donorsList li:nth-of-type(5n+5) { + + grid-column: 5; + } +} + + +@media screen and (min-width: 83.5rem) { + + +@media screen and (min-width: 42.25rem) { + + .donorsList li:nth-of-type(7n+1) { + + grid-column: 1; + } + + .donorsList li:nth-of-type(7n+2) { + + grid-column: 2; + } + + .donorsList li:nth-of-type(7n+3) { + + grid-column: 3; + } + + .donorsList li:nth-of-type(7n+4) { + + grid-column: 4; + } + + .donorsList li:nth-of-type(7n+5) { + + grid-column: 5; + } + + .donorsList li:nth-of-type(7n+6) { + + grid-column: 6; + } + + .donorsList li:nth-of-type(7n+7) { + + grid-column: 7; + } +} +} + + + diff --git a/css/layout-home.css b/css/layout-home.css new file mode 100644 index 0000000..79507b1 --- /dev/null +++ b/css/layout-home.css @@ -0,0 +1,511 @@ +@import "cols.css"; + +body.home main h2 { + + text-align: center; + margin-top: 3rem; + margin-bottom: 2rem; + + font-size: 2rem; +} + + + + + +/* ------------------------------------------ INVITATION ------------------------------------------ */ + + + + + + + + + +details#invite { + + box-shadow: 0 0 1em hsla(0, 0%, 0%, 0.75); + overflow: auto; + margin-left: auto; + margin-right: auto; + margin-top: 3rem; + + height: 10rem; + width: calc(10rem/114*229); + + position: relative; + + display: flex; + justify-content: center; + align-items: center; + + background: hsl(60, 100%, 95.5%); +} + + +details#invite[open] em, +details#invite[open] time, +details#invite[open] strong, +details#invite[open] a { + + font-style: inherit; + font-weight: normal; + text-decoration: underline; + color: inherit; +} + + +details#invite[open] { + + width: calc(10rem/114*229); + height: auto; + + font-style: italic; +} + +details#invite[open] > * { + + max-height: calc(3*10rem); + height: auto; + position: relative; + overflow: hidden; + width: 100%; +} + +details#invite[open] > *:before, +details#invite[open] > *:after { + + content: ""; + width: 100%; + position: absolute; + top: 0; + border-bottom: 0.125rem solid hsla(60, 50%, 50%, 0.07); +} + +details#invite[open] > *:before { + + height: 33%; + +} + +details#invite[open] > *:after { + + height: 66%; +} + +details#invite[open] > * > * { + + margin-left: 1rem; + margin-right: 1rem; +} + +details#invite summary { + + list-style: none; + display: flex; + justify-content: center; + flex-direction: column; + text-align: right; + + padding-top: 1rem; + padding-right: 3rem; + height: 100%; + width: 100%; + box-sizing: border-box; + + cursor: pointer; +} + +details#invite summary time { + + position: absolute; + top: 0; + right: 0; + + padding-right: 1rem; + padding-top: 0.5rem; +} + +details#invite[open] summary { + + display: none; +} + + + + + + + +/* ------------------------------------------ BLOCKS ------------------------------------------ */ + + + + + +#guides img, +#worlds img, +#benefits img +{ + width: 100%; +} + + +#guides { + + padding-left: 0; +} + + +#benefits, +#guides { + + display: grid; + justify-content: center; + +} + + +#benefits { + + grid-row-gap: 0; +} + +#guides { + + list-style: none; + + grid-row-gap: 2rem; +} + +#benefits dd { + + margin-bottom: 1rem; +} + +#benefits dt { + + margin-top: 1rem; +} + +#benefits { + + margin-top: 0; +} + +#worlds, +#guides { + + padding-top: 1rem; +} + +#worlds { + + padding-bottom: 1rem; +} + +#worlds dd { + + margin-bottom: 2rem; + margin-left: 0; +} + +#worlds dd:last-of-type { + + margin-bottom: 0; +} + +#benefits dt, +#worlds dt, +#guides > li a dfn, +#guides > li a:visited dfn { + + padding: 1rem; + text-align: center; + font-size: 1.25rem; + border-top-width: 0.25rem; + border-bottom-width: 0; +} + +#benefits dd, +#worlds dd, +#guides > li a > span, +#guides > li a img { + + border-top-width: 0; + border-bottom-width: 0.25rem; + margin-left: 0; +} +#guides > li a img { + + border-top-width: 0; + border-bottom-width: 0; +} + +#benefits dd img, +#worlds dd img { + + display: block; +} + +#benefits dd p, +#worlds dd p, +#worlds dd address { + + margin: 1rem; +} + + + +/* ------------------------------------------ MONDES ------------------------------------------ */ + +#worlds { + + display: grid; + grid-row-gap: 0; + justify-content: center; +} + +#worlds dt { + + text-align: center; +} + +/* ------------------------------------------ GUIDES ------------------------------------------ */ + + +#guides > li { + + margin: 0; + padding: 0; +} + +#guides > li a, +#guides > li a:visited { + + display: flex; + flex-direction: column; + height: 100%; +} + +#guides > li a dfn { order: 1; } +#guides > li a img { order: 2; } +#guides > li a > span { order: 3; } + + + +#guides > li a > span { + + padding: 1rem; + width: calc(100% - 2 * 1rem); +} + + + + + + +/* ------------------------------------------ RESPONSIVE ------------------------------------------ */ + + +#benefits, +#guides, +#worlds { + + grid-column-gap: var(--col-gap); + grid-template-columns: calc(100% - 1rem); +} + + +#benefits dt, +#benefits dd, +#worlds dt, +#worlds dd +{ + border-left-width: var(--box-border-width); + border-right-width: var(--box-border-width); +} + +#guides > li a { + + border-width: var(--box-border-width); +} + + + + +@media screen and (min-width: 56rem) { + + /* BENEFITS */ + + #benefits > dt:nth-of-type(2n+1), + #benefits > dd:nth-of-type(2n+1) { + + grid-column: 1; + } + + #benefits > dt:nth-of-type(2n+2), + #benefits > dd:nth-of-type(2n+2) { + + grid-column: 2; + } + + #benefits dt:nth-of-type(n + 1) { + + grid-row: 1; + } + + #benefits dd:nth-of-type(n + 1) { + + grid-row: 2; + } + + + #benefits dt:nth-of-type(n + 3) { + + grid-row: 3; + } + + #benefits dd:nth-of-type(n + 3) { + + grid-row: 4; + } + + + #benefits dt:nth-of-type(n + 5) { + + grid-row: 5; + } + + #benefits dd:nth-of-type(n + 5) { + + grid-row: 6; + } + + + /* GUIDES */ + + #guides > li:nth-of-type(2n+1) { + + grid-column: 1; + } + #guides > li:nth-of-type(2n+2) { + + grid-column: 2; + } +} + +@media screen and (min-width: 83.5rem) { + + /* BENEFITS */ + + #benefits > dt:nth-of-type(3n+1), + #benefits > dd:nth-of-type(3n+1) { + + grid-column: 1; + } + + #benefits > dt:nth-of-type(3n+2), + #benefits > dd:nth-of-type(3n+2) { + + grid-column: 2; + } + + #benefits > dt:nth-of-type(3n+3), + #benefits > dd:nth-of-type(3n+3) { + + grid-column: 3; + } + + #benefits dt:nth-of-type(n + 1) { + + grid-row: 1; + } + + #benefits dd:nth-of-type(n + 1) { + + grid-row: 2; + } + + + #benefits dt:nth-of-type(n + 4) { + + grid-row: 3; + } + + #benefits dd:nth-of-type(n + 4) { + + grid-row: 4; + } + + /* WORLDS */ + + #worlds dd { + + grid-row: 2; + margin-bottom: 0rem; + } + + /* GUIDES */ + + #guides > li:nth-of-type(3n+1){ + + grid-column: 1; + } + #guides > li:nth-of-type(3n+2) { + + grid-column: 2; + } + #guides > li:nth-of-type(3n+3) { + + grid-column: 3; + } +} + + +@media screen and (min-width: 28.5rem) { + + #benefits { + + grid-template-columns: + repeat( + calc(var(--page-col-nb) / var(--benefits-col-nb)), + calc( + var(--benefits-col-nb) * var(--col-width) + (var(--benefits-col-nb) - 1) * var(--col-gap) + ) + ); + } + + + #guides { + + grid-template-columns: + repeat( + calc(var(--page-col-nb) / var(--guides-col-nb)), + calc( + var(--guides-col-nb) * var(--col-width) + (var(--guides-col-nb) - 1) * var(--col-gap) + ) + ); + } + + + #worlds { + + grid-template-columns: + repeat( + calc(var(--page-col-nb) / var(--worlds-col-nb)), + calc( + var(--worlds-col-nb) * var(--col-width) + (var(--worlds-col-nb) - 1) * var(--col-gap) + ) + ); + } +} + +#video-presentation { + display: block; + margin-left: auto; + margin-right: auto; + margin-top: 3rem; + max-width: 100%; +} diff --git a/css/layout.css b/css/layout.css new file mode 100644 index 0000000..972ca64 --- /dev/null +++ b/css/layout.css @@ -0,0 +1,632 @@ +@import "cols.css"; + + +body { + + margin: 0 !important; + padding: 0 !important; +} + +body > * { + + position: relative; + z-index: 100; +} + +/* ------------------------------------------ HEADER ------------------------------------------ */ + + +body > header { + + margin-top: 0; + padding-top: 0; + + overflow: hidden; +} + + +body > header { + + text-align: center; + + margin-left: auto; + margin-right: auto; +} + +body > header a .sitename { + + display: none; +} + + +body > header { + + z-index: 200; +} + +body > header > :first-child { + + z-index: 250; +} + +body > header > * { + + margin-left: auto; + margin-right: auto; +} + +body > header > :first-child a:before { + + display: block; +} + +body > header > :first-child { + + margin-top: 0; + margin-bottom: 0; + overflow: hidden; + line-height: 1rem; +} + +body > header > :first-child > * { + + display: block; +} + +body > header a { + + text-decoration: none; +} + +body > header .sitedesc { + + font-size: 1.5rem; + line-height: 2.5rem; + position: relative; + top: -0.5rem; +} + +body > header nav { + + margin-top: 1rem; + margin-bottom: 1rem; + + margin-left: auto; + margin-right: auto; + + overflow: hidden; +} + + +body > header nav button span { + + display: none; +} +body > header nav ul { + + list-style : none; + display: flex; + flex-flow: wrap; + justify-content: space-between; + + padding: 0; + margin: 0; +} + +body > header nav ul li { + + margin-left: 0; + margin-right: 0; +} + +body > header nav ul li a { + + display: flex; + flex-direction: column; + justify-content: center; + height: 2rem; +} + +body > header #banner { + + width: 100%; +} + +body > header > :first-child a:before { + + content: url("banner-330w.png"); +} + +body > header img, +body > header nav { + + width: 100%; +} + + + + + + +/* ------------------------------------------ FOOTER ------------------------------------------ */ + + + +footer { + + text-align: center; + overflow: hidden; + + padding-top: 10rem; + padding-bottom: 1rem; +} + +footer nav { + + display: none; +} + +#serverlist { + + margin-top: 4rem; + + display: flex; + justify-content: center; + flex-wrap: wrap; +} + +#serverlist > * { + + margin-left: 1rem; + margin-right: 1rem; +} + +/* ------------------------------------------ CONTENTS ------------------------------------------ */ + + +main { + + margin-top: 0; + margin-bottom: 2rem; +} + +main h1 { + + font-size: 2.5rem; + text-align: center; +} + +main h2 { + + font-size: 1.66rem; +} + +main h3 { + + font-size: 1.33rem; + margin-top: 0.75rem; + margin-bottom: 0.25rem; +} + +article { + + box-sizing: border-box; + + border-top-width: 0.5rem; + border-bottom-width: 0.5rem; + + margin-top: 3rem; + + padding-left: 0; + padding-right: 0; + padding-top: 0; + padding-bottom: 2rem; + + margin-left: auto; + margin-right: auto; + + overflow: hidden; +} + +article h1 { + + overflow: hidden; + padding-top: 0.5rem; + padding-bottom: 1rem; +} + +article > :first-child, +article > :first-child :first-child { + + margin-top: 0; +} + +article > :not(:first-child) { + + margin-left: 1rem; + margin-right: 1rem; +} + +body.install article section { + + margin-top: 3rem; + margin-bottom: 3rem; + min-height: 100vh; + display: flex; + flex-direction: column; + justify-content: center; +} + +article img { + + max-width: 100%; + height: auto; +} + +/* +article table.keymapping tr > td:first-of-type { + + text-align: right; +} +*/ + + +article table { + + margin-left: auto; + margin-right: auto; +} + +article table td, +article table th { + + border-width: 0.125rem; + padding: 0.5rem; +} + +.adresse, .politesse { + + text-align: center; +} + +.signature { + + text-align: right; +} + + + +/* ------------------------------------------ GALLERIES ------------------------------------------ */ + +.gallery { + + display: grid; + grid-column-gap: 1rem; + grid-row-gap: 1rem; + overflow: hidden; +} + +.gallery > * { + + margin: 0; +} + +.gallery figcaption { + + text-align: center; + font-style: italic; +} + +@media (min-width: 56rem) { + + .gallery_2_1 > :nth-child(2n + 1) { + + grid-column: 1; + } + + .gallery_2_1 > :nth-child(2n + 2) { + + grid-column: 2; + } +} + +@media (min-width: 42.25rem) { + + .gallery_3_2_1 > :nth-child(2n + 1) { + + grid-column: 1; + } + + .gallery_3_2_1 > :nth-child(2n + 2) { + + grid-column: 2; + } +} + +@media (min-width: 56rem) { + + .gallery_3_2_1 > :nth-child(3n + 1) { + + grid-column: 1; + } + + .gallery_3_2_1 > :nth-child(3n + 2) { + + grid-column: 2; + } + + .gallery_3_2_1 > :nth-child(3n + 3) { + + grid-column: 3; + } +} + +/* ------------------------------------------ SERVEURS ------------------------------------------ */ + + + +address.server { + + padding-bottom: 0.125rem; + display: flex; + justify-content: center; +} + +address.server > * { + + border-width: 0.125rem; + + padding-left: 0.25rem; + padding-right: 0.25rem; +} + +address.server dfn { + + border-width: 0.125rem; + + border-top-left-radius: 0.25rem; + border-bottom-left-radius: 0.25rem; +} + +address.server span:last-of-type { + + border-top-right-radius: 0.25rem; + border-bottom-right-radius: 0.25rem; + + border-left-width: 0.0627rem; + +} + +address.server span:last-of-type { + + border-top-right-radius: 0.25rem; + border-bottom-right-radius: 0.25rem; + + border-left-width: 0.0627rem; + +} + +address.server span:first-of-type { + + border-right-width: 0.0627rem; +} + +/* +address.server span:last-of-type:before { + + content: " : "; +} +*/ + + +/* ------------------------------------------ BOITES ------------------------------------------ */ + + +.warn { + + padding: 1rem; + border-radius: 0.25rem; +} + +kdb, .mono { + + border-width: 0.125rem; + border-radius: 0.25rem; + padding: 0.125rem 0.5rem; +} + + +.pubkey-and-copy-button { + + display: flex; +} + +.pubkey-and-copy-button input { + + flex-grow: 1; + + border-width: 0.125rem; + border-style: solid; + padding: 0.5rem; +} + +.pubkey-and-copy-button button { + + border: 0; + padding: 0.5rem; +} + +/* ------------------------------------------ RESPONSIVE ------------------------------------------ */ + +body > header nav button { + + display: none; +} + +@media screen and (max-width: 35.374rem) { + + body > header nav { + + position: fixed; + top: 0; + left: 0; + + z-index: 300; + margin: 0; + + background-color: transparent; + transition-duration: 0.5s; + transition-property: background-color; + transition-timing-function: ease-out; + } + + body > header nav button { + + position: fixed; + top: 0; + left: 0; + z-index: 300; + + width: 2rem; + height: 2rem; + + display: block; + border: 0; + + padding: 0; + margin: 1rem 0 0 1rem; + } + + body > header nav button:after { + + content: ""; + display: block; + width: 100%; + height: 100%; + + position: relative; + top: 0; + left: 0; + z-index: 300; + + margin: 0; + border: 0; + } + + body > header nav ul { + + position: fixed; + top: 4rem; + left: 0; + + z-index: 150; + + height: 0; + opacity: 0; + display: block; + + overflow: hidden; + + transition-duration: 1s; + transition-property: opacity; + transition-timing-function: ease-out; + } + + +} + + + +article { + + border-left-width: 0; + border-right-width: 0; +} + +@media screen and (min-width: 28.5rem) { + + body > header > *, + article { + + border-left-width: 0.5rem; + border-right-width: 0.5rem; + + max-width: calc(4 * (var(--col-width) + var(--col-gap))); + } +} + +@media screen and (min-width: 35.375rem) { + + body > header > *, + article { + + max-width: calc(5 * (var(--col-width) + var(--col-gap))); + } + + body > header > :first-child a:before { + + content: url("banner-550w.png"); + } + +} +@media screen and (min-width: 42.25rem) { + + body > header > *, + article { + + max-width: calc(6 * (var(--col-width) + var(--col-gap))); + } + +} + +@media screen and (min-width: 56rem) { + + body > header > *, + article { + + max-width: calc(8 * (var(--col-width) + var(--col-gap))); + } + + body > header > :first-child a:before { + + content: url("banner-660w.png"); + } + + body > header .sitedesc { + + font-size: 1.75rem; + } + + body > header nav { + + max-width: calc(6 * (var(--col-width) + var(--col-gap))); + } +} + +@media screen and (min-width: 83.5rem) { + + body > header > *, + article { + + max-width: calc(9 * (var(--col-width) + var(--col-gap))); + } + + body > header > :first-child a:before { + + content: url("banner-770w.png"); + } + + + body > header .sitedesc { + + font-size: 2rem; + } + + body > header nav { + + max-width: calc(7 * (var(--col-width) + var(--col-gap))); + } +} + + + diff --git a/css/slideshow.css b/css/slideshow.css new file mode 100644 index 0000000..c2b6ae4 --- /dev/null +++ b/css/slideshow.css @@ -0,0 +1,98 @@ +.slide-container { + box-sizing: border-box; + max-width: 100vw; + max-height: 100vh; + position: relative; + margin: auto; +} + +.slide { + box-sizing: border-box; + display: none; + max-width: 100vw; + max-height: 100vh; +} + +.slide img { + object-fit: cover; + display: block; + max-width: 100vw; + max-height: 100vh; + width: 100%; + height: auto; +} + +.slide-prev, .slide-next { + cursor: pointer; + position: absolute; + top: 50%; + width: auto; + margin-top: -22px; + padding: 16px; + color: white; + font-weight: bold; + font-size: 18px; + transition: 0.6s ease; + border-radius: 0 3px 3px 0; + user-select: none; +} + +.slide-next { + right: 0; + border-radius: 3px 0 0 3px; +} + +.slide-prev:hover, .slide-next:hover { + background-color: rgba(0,0,0,0.8); +} + +.slide-text { + box-sizing: border-box; + color: #f2f2f2; + font-size: 15px; + padding: 8px 12px; + position: absolute; + bottom: 8px; + width: 100%; + text-align: center; +} + +.slide-number { + color: #f2f2f2; + font-size: 12px; + padding: 8px 12px; + position: absolute; + top: 0; +} + +.slide-dot { + cursor: pointer; + height: 15px; + width: 15px; + margin: 0 2px; + background-color: #bbb; + border-radius: 50%; + display: inline-block; + transition: background-color 0.6s ease; +} + +.slide-active, .slide-dot:hover { + background-color: #717171; +} + +.slide-fade { + -webkit-animation-name: fade; + -webkit-animation-duration: 1.5s; + animation-name: fade; + animation-duration: 1.5s; +} + +@-webkit-keyframes fade { + from {opacity: .4} + to {opacity: 1} +} + +@keyframes fade { + from {opacity: .4} + to {opacity: 1} +} diff --git a/css/sprites/default_desert_cobble.png b/css/sprites/default_desert_cobble.png new file mode 100644 index 0000000..fa1af5d Binary files /dev/null and b/css/sprites/default_desert_cobble.png differ diff --git a/css/sprites/default_desert_sand.png b/css/sprites/default_desert_sand.png new file mode 100644 index 0000000..371b8c7 Binary files /dev/null and b/css/sprites/default_desert_sand.png differ diff --git a/css/sprites/default_desert_sandstone.png b/css/sprites/default_desert_sandstone.png new file mode 100644 index 0000000..52e445f Binary files /dev/null and b/css/sprites/default_desert_sandstone.png differ diff --git a/css/sprites/default_desert_sandstone_block.png b/css/sprites/default_desert_sandstone_block.png new file mode 100644 index 0000000..8fc54e7 Binary files /dev/null and b/css/sprites/default_desert_sandstone_block.png differ diff --git a/css/sprites/default_desert_sandstone_brick.png b/css/sprites/default_desert_sandstone_brick.png new file mode 100644 index 0000000..ab58db5 Binary files /dev/null and b/css/sprites/default_desert_sandstone_brick.png differ diff --git a/css/sprites/default_desert_stone.png b/css/sprites/default_desert_stone.png new file mode 100644 index 0000000..5d3aded Binary files /dev/null and b/css/sprites/default_desert_stone.png differ diff --git a/css/sprites/default_desert_stone_block.png b/css/sprites/default_desert_stone_block.png new file mode 100644 index 0000000..bedfe62 Binary files /dev/null and b/css/sprites/default_desert_stone_block.png differ diff --git a/css/sprites/default_desert_stone_brick.png b/css/sprites/default_desert_stone_brick.png new file mode 100644 index 0000000..a7234ea Binary files /dev/null and b/css/sprites/default_desert_stone_brick.png differ diff --git a/css/sprites/default_gravel.png b/css/sprites/default_gravel.png new file mode 100644 index 0000000..df61c60 Binary files /dev/null and b/css/sprites/default_gravel.png differ diff --git a/css/sprites/default_pine_wood.png b/css/sprites/default_pine_wood.png new file mode 100644 index 0000000..6844ceb Binary files /dev/null and b/css/sprites/default_pine_wood.png differ diff --git a/css/sprites/default_sign_steel.png b/css/sprites/default_sign_steel.png new file mode 100644 index 0000000..3ca0c59 Binary files /dev/null and b/css/sprites/default_sign_steel.png differ diff --git a/css/sprites/default_sign_wall_steel.png b/css/sprites/default_sign_wall_steel.png new file mode 100644 index 0000000..2227477 Binary files /dev/null and b/css/sprites/default_sign_wall_steel.png differ diff --git a/css/sprites/default_sign_wall_wood.png b/css/sprites/default_sign_wall_wood.png new file mode 100644 index 0000000..40552c7 Binary files /dev/null and b/css/sprites/default_sign_wall_wood.png differ diff --git a/css/sprites/default_sign_wood.png b/css/sprites/default_sign_wood.png new file mode 100644 index 0000000..d0559da Binary files /dev/null and b/css/sprites/default_sign_wood.png differ diff --git a/css/sprites/default_torch_on_floor.png b/css/sprites/default_torch_on_floor.png new file mode 100644 index 0000000..bc4bdd6 Binary files /dev/null and b/css/sprites/default_torch_on_floor.png differ diff --git a/css/sprites/default_water.png b/css/sprites/default_water.png new file mode 100644 index 0000000..00500e9 Binary files /dev/null and b/css/sprites/default_water.png differ diff --git a/css/sprites/default_wood.png b/css/sprites/default_wood.png new file mode 100644 index 0000000..af56d6c Binary files /dev/null and b/css/sprites/default_wood.png differ diff --git a/css/sprites/heart.png b/css/sprites/heart.png new file mode 100644 index 0000000..4412cab Binary files /dev/null and b/css/sprites/heart.png differ diff --git a/css/t-dawn-or-dusk.css b/css/t-dawn-or-dusk.css new file mode 100644 index 0000000..b12af29 --- /dev/null +++ b/css/t-dawn-or-dusk.css @@ -0,0 +1,174 @@ +:root { + + --soleil2: #fdff51; + --soleil3: #d77f0d; + --soleil4: #b93805; +} + +body { + + background-color: #d45a00; + background-image: + + linear-gradient(#7d492d 0%, #7d492d 8rem, + #c63300 8rem, #c63300 10rem, + #d14907 10rem, hsl(25, 100%, 41.6%) calc(100% - 20rem), + black calc(100% - 5rem), black 100%); + + color: #eee; +} + +body main > h1, +body main > h2 { + + text-shadow: 0 0 0.25em #333; +} + +body > header { + + background-image: + radial-gradient(circle closest-side, + #ffffff 0%, #ffffff 25%, + #fdff51 25%, #d77a0d 32%, + #b63908 50%, transparent 100%), + + radial-gradient(ellipse farthest-side, + #c63300 0px, #c63300 50%, + #c63300 50%, transparent 100%) + ; + +} + + +body > header a, +body > header a:visited { + + color: black; +} + +@media screen and (max-width: 35.374rem) { + + body > header nav { + + text-align: left; + } + + body > header nav ul li { + + margin-left: 1rem; + } + + body > header nav a, + body > header nav a:visited { + + color: white; + } +} + +@media screen and (min-width: 35.375rem) { + + body > header nav { + + position: relative; + z-index: 10000; + } + + body > header nav a { + + background-color: hsl(25, 100%, 41.6%, 1); + box-shadow: 0 0 2rem hsl(25, 100%, 41.6%); + z-index: 10000; + font-weight: bold; + border-bottom: 0.5rem solid black; + padding: 0.25rem 1rem; + transition-duration: 0.666s; + transition-property: color, background-color, border-bottom-color; + } + + body > header nav a:hover { + + border-bottom-color: white; + color: white; + background-color: #c63300; + } +} + + +body header:before, +body header:after, +body header > :first-child:before { + + content: "."; + color: transparent; + position: absolute; + display: block; + overflow: visible; +} + + +body header:before { + + z-index: 48; + + left: 50vw; + width: 12.5rem; + margin-left: -6.25rem; + + top: 10rem; + margin-top: -6.25rem; + height: 12.5rem; + + background: var(--soleil3); + box-shadow: 0 -25px 50px var(--soleil4); +} + + +body header:after { + + z-index: 49; + + left: 50vw; + width: 9rem; + margin-left: -4.5rem; + + top: 10rem; + margin-top: -4.5rem; + height: 9rem; + + background: var(--soleil2); +} + + +body header > :first-child:before { + + z-index: 50; + + left: 50vw; + width: 6.25rem; + margin-left: -3.125rem; + + top: 10rem; + margin-top: -3.125rem; + height: 6.25rem; + + background: white; +} + +body header > :first-child * { + + position: relative; + z-index: 100; +} + +footer { + + color: white; +} + +footer a, footer a:visited { + + border-bottom: 0.067rem dotted; + text-decoration: none; + color: inherit; + font-weight: bold; +} diff --git a/css/t-day.css b/css/t-day.css new file mode 100644 index 0000000..8f2ff6a --- /dev/null +++ b/css/t-day.css @@ -0,0 +1,62 @@ +:root { + + --nuage-1: hsl(60, 100%, 97.6%); + --nuage-2: hsl(48, 20%, 80.4%); + --bleu-ciel: hsl(215.3, 91.1%, 78%); +} + +body { + + background: var(--bleu-ciel); + background-image: url("sprites/default_water.png"); /* fallback */ + background-image: + linear-gradient(var(--bleu-ciel) 0%, var(--bleu-ciel) 10rem, transparent 25rem), + url("sprites/default_water.png"); + background-size: + auto, + 192px; +} + +body > header .sitedesc { + + color: #2e2c36; +} + +body > header nav a, +body > header nav a:visited { + + color: #333; + background: var(--nuage-1); + padding: 0.5rem 2rem; +} + +body > header nav li a { + + border-bottom: 0.125rem solid var(--nuage-2); +} + +@media (min-width: 34.375rem) { + + body > header nav li:first-of-type a { + + border-left: 0.125rem solid var(--nuage-2); + } + + body > header nav li:last-of-type a { + + border-right: 0.125rem solid var(--nuage-2); + } +} + + +main > h1, +main > h2 { + + color: white; + text-shadow: 0 0 0.5rem hsla(0, 0%, 0%, 0.75); +} + +body > footer { + + background: linear-gradient(transparent 0%, white calc(100% - 2rem)); +} diff --git a/css/t-night.css b/css/t-night.css new file mode 100644 index 0000000..5ee80df --- /dev/null +++ b/css/t-night.css @@ -0,0 +1,47 @@ + + +body { + + background-color: rgb(0, 4, 9); + background-image: url("ciel-etoile.png"); + background-repeat: repeat; + color: white; +} + +body > header a, +body > header a:visited { + + color: white; +} + + +@media screen and (max-width: 35.374rem) { + + body > header nav { + + text-align: left; + } + + body > header nav ul li { + + margin-left: 1rem; + } +} + +@media screen and (min-width: 35.375rem) { + + body > header nav a, + body > header nav a:visited { + + background-color: white; + color: rgb(0, 4, 9); + border-radius: 50%; + padding: 0.5rem 1rem; + box-shadow: 0 0 0.5rem white; + } + + body > header nav { + + overflow: visible; + } +} diff --git a/developper.php b/developper.php new file mode 100644 index 0000000..3a2174f --- /dev/null +++ b/developper.php @@ -0,0 +1,85 @@ +
+ +

Contribuer au développement de Juneland

+ +

Défis en cours

+ + + + + + + + + + + + + + + + + + + +
RécompenseDéfi
+ 50 DUĞ1 + + Construire un aérodrome
+ (quand un mod adéquat sera prêt) +
+ 100 DUĞ1 + + Importer un mini monde de 100×100 +
+ + +

Défis relevés

+ + + + + + + + + + + + + + + + + + + + + + +
RécompenseDéfiRéalisé
+ 50 DUĞ1 + + Construire un métro + + par tuxmain +
+ 100 DUĞ1 + + Exporter ses messages Scuttlebutt depuis Juneland + + par Be1 +
+ +
+ + + +

Guides Juneland / Minetest

+ + + + + +
+ +

Les boites aux lettres dans Juneland

+ +

À quoi servent les boites aux lettres ?

+ +

Comment laisser un message dans une boites aux lettres ?

+ +

+ Il vous faudra un livre. +

+

+ Pour obtenir un livre, cherchez book dans votre inventaire. +

+ +
+ +
+ + + +

Ouvrir une boutique G1 dans Juneland

+ +

Où construire sa boutique ?

+ +

Sécuriser sa boutique pour que personne ne puisse la détruire

+ +

Exemples de boutiques

+ + + +
+ +

Constuire, casser, et gérer l'inventaire

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ActionTouche par défaut
Détruire / MinerClic gauche
Afficher l'inventaireI
ConstruireClic droit
+ + +

Plan Local d'Urbanisme

+ +

Construisez où vous voulez, de préférence espacé des autres constructions.

+ + + +
+
+ +

Discuter avec d'autres joueurs grâce à Mumble

+ +

Pour discuter en audio pendant que vous jouez, vous pouvez utiliser notre instance Mumble par l'un des deux moyens suivants :

+ + +
+ +
+ + +

Installer Minetest

+ +

Minetest est disponible sur les plateformes suivantes :

+ +
    +
  1. GNU/Linux
  2. +
  3. Android
  4. +
  5. Windows
  6. +
  7. MacOS
  8. +
  9. FreeBSD, OpenBSD, DragonFly BSD
  10. +
+ +

+ Le serveur JuneLand requiert au moins la version 5.2. +

+ + + +
+

Installer Minetest sous GNU/Linux

+ +

+ Choisissez la version correspondant à votre système sur le site officiel. +

+ +

Le serveur JuneLand requiert au moins la version 5.2.

+ +

Sur certaines versions (ex: Debian/Ubuntu stable), la version du paquet Minetest peut être trop ancienne.

+ + +

Comment avoir la bonne version

+ +

Vérifiez la version dans votre gestionnaire de paquets :

+ + sudo apt list minetest + +
    +
  • Si la version proposée par votre distribution est supérieure à la 5.2, installez-la.
  • +
  • Sinon, deux choix s'offrent à vous : + + +
  • +
+
+ + +
+

Installer Minetest sous Android

+ +

+ Vous trouverez Minetest dans le Google Play Store + ainsi que sur F-Droid. +

+ +
+ +
+

Installer Minetest sous Windows

+ +
    +
  1. Téléchargez le fichier ZIP sur le site officiel
  2. +
  3. Décompressez le fichier ZIP
  4. +
  5. Allez dans le dossier "bin"
  6. +
  7. Lancez l'exécutable qui finit par .exe
  8. +
+
+ + +
+

Installer Minetest sous MacOS

+ +

Vous pouvez installer Minetest via Homebrew :

+ + brew install minetest +
+ + + +
+

Installer Minetest sous FreeBSD, OpenBSD, DragonFly BSD

+ +
+ + +
+ + + +

Comment utiliser la monnaie libre Ğ1 dans Juneland

+ + +

Pour échanger en Ğ1 dans JuneLand Survival, on utilise un jeton intermédiaire, le MineGeld (MG).

+ +

Vous pouvez voir les MG un peu comme les tickets boisson dans les festivals.

+ +

Les joueurs peuvent échanger dans Juneland en troquant des objets contre des MG. Il est aussi possible d'échanger directement les objets (troc).

+ + +

Utiliser ses Ğ1

+ +

Pour obtenir acheter des MG, envoyez une transaction à DFQ3eHm9GCRsvhtkZMup8sd4WcuQ3wsEr79JpqtyAfzy avec pour commentaire MG suivi de votre pseudo sur MineTest.

+ +

Allez ensuite à la ĞBanque dans JuneLand Survival, vos MG seront apparues dans le coffre où est inscrit votre pseudo. Nous faisons cette opération manuellement ; il faudra parfois attendre quelques jours.

+ + +

Gagner des Ğ1

+ +

Si vous avez beaucoup de MG, vous pouvez les échanger contre des Ğ1.

+ +

Vous trouver les instructions pour faire cette opération directement dans Juneland Survival.

+ + +

Taux de conversion

+ +

1 Ğ1 = 10 MG

+ + + +
+ +

Les panneaux dans Minetest

+ +

+ Les panneaux peuvent remplir plusieurs fonctions. +

+ +

+ Vous pouvez par exemple les utiliser pour + signaler des choses aux autres joueurs, + poser une question, y répondre, + ou même créer un livre d'or en accolant plusieurs panneaux les uns à côtés des autres. +

+ +

+ Sur Juneland Creative, vous trouverez des panneaux dans votre inventaire en tapant sign (ce qui veut dire panneau en anglais) +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ActionTouche par défaut
Afficher l'inventaireI
Poser un panneauClic droit sur une surface
Écrire sur un panneauClic droit sur le panneau
+ +

Formatter son texte

+ +

+ Vous pouvez changer la couleur du texte et la couleur du fond grâce à des codes à placer en début de ligne, de #0 jusqu'à #9. +

+ + +
+ + +

Rejoindre un serveur Juneland

+ +

+ Pour rejoindre un monde Juneland, vous devez d'abord connaître l'adresse et le port auxquels vous devez vous connecter, en fonction du monde que vous avez choisi. +

+ +

Liste des mondes disponibles pour l'instant

+ + + + + + + + + + + + + + + + + + + + + + + + + + +
NomDescriptionAdressePort
JuneLand Creativeun monde créatif où les ressources sont illimitées, on peut voler et se téléporter. On y construit ce qu'on veut sans limites.juneland.fr30000
JuneLand Survivalun monde survie où il faut récolter, chasser, miner et bricoler pour vivre et pouvoir construire des machines. On peut y échanger des ressources en monnaie libre Ğ1.juneland.fr30001
+ +

Rejoindre un monde

+ +
    +
  1. Démarrez MineTest
  2. +
  3. Allez dans rejoindre une partie
  4. +
  5. Choisissez un nom d’utilisateur
  6. +
  7. Choisissez un mot de passe ; il n'a pas besoin d'être aussi fort que votre mot de passe Ğ1
  8. +
  9. dans server, tapez l'adresse du monde choisi (ex : juneland.fr)
  10. +
  11. dans port indiquez le port du monde choisi (30000 ou 30001).
  12. +
+ +

+ Pour taper des chiffres, les touches du pavé numérique ne fonctionnent pas. + Utilisez plutôt les chiffres en haut du clavier. Le copier-coller fonctionne, mais parfois il faut essayer plusieurs fois. +

+ + + + +
+ + +

Se déplacer dans Juneland

+ + +

+ Lorsque vous apparaissez dans JuneLand, vous pouvez réassigner les touches du clavier à votre goût + en appuyant sur Échap puis changer touches. +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ActionTouche par défaut
AvancerZ
ReculerS
GaucheQ
DroiteD
SauterEspace
Accélérer
Se téléporter + /teleport x y z +
(le y est la hauteur) +
Afficher les coordonnées de la position actuelle (pour éventuellement s'y téléporter plus tard) + F5 +
Monter une échelleEspace
Se baisserMaj / Shift
DescendreMaj / Shift
Activer (ouvrir une porte, par exemple)Clic droit
VolerK ou double Espace
Afficher la minicarteF9
Chat / ConsoleT
Menu / QuitterÉchap
+ + + +
+ + + + + + +

Six raisons de venir sur Juneland

+ +
+
+ Faites les boutiques en 3D +
+
+ + +

+ Juneland Creative permet de faire les magasins à l'ancienne. Promenez-vous dans les quartiers commerçants et visitez la boutique de chaque juniste pour découvrir qui produit quoi, et voir ce que vous pouvez acheter avec vos Ğ1. Faire du shopping n'a jamais été aussi sympa. +

+
+ + +
Rencontrez d'autres junistes
+
+ + +

+ La licence Ğ1 stipule que, pour certifier quelqu'un afin qu'il rentre dans la toile de confiance Ğ1, + il faut bien le connaître, et l'avoir rencontré dans la vraie vie. +

+ +

+ Avant ça, pourquoi ne pas commencer à faire connaissance en ligne ? + Et quoi de plus convivial pour un premier contact qu'un jeu vidéo ? +

+

+ Au choix, vous pouvez chatter dans Minetest, ou parler de vive voix grâce à + notre serveur Mumble. +

+

+ Si on peut dire de nos parcs d'attractions qu'ils sont "virtuels", les rencontres qu'ils facilitent, + elles, sont bien réelles ! +

+
+ + +
Gagnez des Ğ1
+
+ + +

+ Dans Juneland Survival, vous pouvez échanger des objets en MG, des jetons de Ğ1. +

+

+ Vous pouvez ensuite convertir ces MG en Ğ1 pour acheter des objets dans la "vraie vie", par exemple sur gchange.fr. +

+
+ + +
Créez à plusieurs
+
+ + +

+ Juneland Creative, c'est aussi, et avant tout, un espace de création artistique dédié au monde du libre en général. +

+ +

+ Faites un tour sur L'île du libre pour y ajouter votre logiciel préféré. +

+
+ + +
+ Construisez votre boutique +
+
+ + +

+ Quel meilleur moyen pour faire la promo de ce que vous vendez que d'avoir votre propre boutique ? Dans Juneland Creative, vous aurez pignon sur rue ! +

+
+ + +
+ Jouez +
+
+ + +

+ MineTest est avant tout un jeu, et jouer est indispensable au bien-être d'un être humain. +

+

+ Juneland Survival est un jeu en lui même : il faut survivre aux attaques des monstres. +

+

+ Juneland Creative offre lui aussi son lot de jeux, comme la course de sièges. +

+
+
+ +

Deux mondes, deux ambiances

+ +
+
JuneLand Creative
+
+ + +

+ JuneLand Creative est un monde dédié à la promotion des vendeurs de la Ğ1. On y fait les boutiques ou on construit la sienne. + On admire les oeuvres d'art créées par les autres junistes ou on crée la sienne. + Les ressources y sont illimitées. On peut voler et se téléporter. On y construit ce qu'on veut sans limites. +

+ +
+ MineTest + juneland.fr + 30000 +
+
+ +
JuneLand Survival
+ +
+ + +

+ JuneLand Survival est un monde survie où il faut récolter, chasser, miner et bricoler pour vivre et pouvoir construire des machines. + On peut gagner des Ğ1 en vendant des ressources, ou au contraire utiliser ses Ğ1 pour obtenir des ressources. +

+ +
+ MineTest + juneland.fr + 30001 +
+
+
+ +

Comment venir visiter Juneland

+ + + + + slides.length) {slideIndex = 1} + if(n < 1) {slideIndex = slides.length} + for(i = 0; i < slides.length; i++) { + slides[i].style.display = "none"; + } + for(i = 0; i < dots.length; i++) { + dots[i].className = dots[i].className.replace(" slide-active", ""); + } + slides[slideIndex-1].style.display = "block"; + dots[slideIndex-1].className += " slide-active"; +} diff --git a/soutenir.php b/soutenir.php new file mode 100644 index 0000000..2e04486 --- /dev/null +++ b/soutenir.php @@ -0,0 +1,153 @@ +
+ +

Soutenir le développement de Juneland

+ + +

Merci aux donateurs !

+getDonors(); + +if (empty($donors)) { + + echo _('Pas encore de donateurs'); + +} else { + + echo ''; +} +?> + +

Que soutenez-vous ?

+

+ En donnant à Juneland, vous nous aidez à financer les défis développeurs : + on met les développeurs aux défi de coder une fonctionnalité pour enrichir Juneland. Celui qui l'accomplit remporte le prix. +

+ +

Comment donner

+ +
+

+ Copiez la clef de notre compte Ğ1 dans votre presse-papier : +

+ +

+ + +

+ +
+

Et maintenant collez-la dans votre client Ğ1 (Cesium par exemple) afin de faire votre don 😉

+

Merci pour votre générosité ❤️

+
+
+ + +

État actuel des finances

+ +

Le projet est actuellement en bonne santé financière.

+ +
+ +
+ + +setTarget(1000); +$chart = new Chart($CF); + +$amountCumulativeGraph = new Graph($chart->getAmountCollectedByDayCumulativePoints(), _('Montant total récolté')); +$amountCumulativeGraph->setStyle('type', 'line'); +$amountCumulativeGraph->setStyle('borderColor', '#662b00'); +$amountCumulativeGraph->setStyle('backgroundColor', 'green'); +$amountCumulativeGraph->setStyle('lineTension', 0); +$amountCumulativeGraph->setStyle('pointRadius', 1); +$amountCumulativeGraph->setStyle('borderWidth', 2); +$amountCumulativeGraph->setStyle('steppedLine', true); +$chart->addGraph($amountCumulativeGraph); + +$footerScripts = ''; + +$footerScripts .= $chart->getScripts('fr', '#chart', ROOT_URL . 'vendor/crowdfunding2/'); + +$footerScripts .= ' +'; + +include 'templates/footer.php'; + diff --git a/templates/footer.php b/templates/footer.php new file mode 100644 index 0000000..3d4d47e --- /dev/null +++ b/templates/footer.php @@ -0,0 +1,41 @@ + + + + + + + + + + diff --git a/templates/guides-nav.php b/templates/guides-nav.php new file mode 100644 index 0000000..d14e078 --- /dev/null +++ b/templates/guides-nav.php @@ -0,0 +1,95 @@ + +
    + +
  1. + + Installer Minetest +  : + Guides d'installation pour Windows, MacOS, GNU/Linux, Android, FreeBSD, OpenBSD, DragonFly BSD. + + + + + +
  2. + +
  3. + + Rejoindre un serveur Juneland +  : + Se connecter à Juneland Creative ou Juneland Survival, choisir son mot de passe, etc. + + + +
  4. + +
  5. + + Comment se déplacer efficacement +  : + Accélérer, voler, se téléporter, etc... + + + +
  6. + +
  7. + + Comment constuire, détruire, reconstuire +  : + Les matériaux, les angles, etc... + + + +
  8. + +
  9. + + Comment écrire sur un panneau ? Et pour quoi faire ? +  : + Petites annonces, mots doux... vous saurez tout. + + + +
  10. + +
  11. + + Comment poster un message dans une boîte aux lettres +  : + De l'art d'envoyer des missives aux autres joueurs. + + + +
  12. + +
  13. + + Comment configurer Mumble pour parler aux joueurs à proximité +  : + Parler de vive voix, c'est toujours plus sympa. + + + +
  14. + +
  15. + + Comment construire sa boutique ? Et où ? + Permis de construire et Plan Local d'Urbanisme : le maire vous dit tout. + + + +
  16. + +
  17. + + Utiliser la Ğ1 dans Juneland +  : + Gagner de la monnaie dans Minetest, et la dépenser dans la vraie vie, c'est possible ! + + + +
  18. +
+ diff --git a/templates/header.php b/templates/header.php new file mode 100644 index 0000000..b03b516 --- /dev/null +++ b/templates/header.php @@ -0,0 +1,95 @@ += 9 and $h < 17) { + + $sheet = 't-day'; + +} elseif($h < 6 or $h > 20) { + + $sheet = 't-night'; + +} else { + + $sheet = 't-dawn-or-dusk'; +} + +function changeEveryNSec ($n, $a) { + + $nbElts = count($a); + + $refresh = $n * $nbElts; + + return $a[floor((time() % $refresh) / ($refresh / $nbElts))]; +} + +$taglines = [ + 'terrains numériques constructibles pour junistes', + 'mondes 3D pour rencontrer d\'autres junistes', + 'pour empiler des cubes entre junistes', + 'parc d\'attractions numériques pour la monnaie libre Ğ1 !', + 'des lieux pour créer, jouer, gagner ou dépenser des Ğ1', + 'espaces de convivialité numériques pour junistes', +]; + +$siteDesc = changeEveryNSec(2, $taglines); + +?> + + + + + + + <?php echo $title; ?> + + + + + + + + + + + + + + + + + > + +
+ + + + <> + + Juneland + + : + + + + > + + + +
+ +
diff --git a/templates/menu.php b/templates/menu.php new file mode 100644 index 0000000..9af726b --- /dev/null +++ b/templates/menu.php @@ -0,0 +1,6 @@ + diff --git a/tests-design/save-the-date-1.png b/tests-design/save-the-date-1.png new file mode 100644 index 0000000..484a3dc Binary files /dev/null and b/tests-design/save-the-date-1.png differ diff --git a/tests-design/save-the-date-2-bis.png b/tests-design/save-the-date-2-bis.png new file mode 100644 index 0000000..2fe828f Binary files /dev/null and b/tests-design/save-the-date-2-bis.png differ diff --git a/tests-design/save-the-date-2.png b/tests-design/save-the-date-2.png new file mode 100644 index 0000000..bd3b720 Binary files /dev/null and b/tests-design/save-the-date-2.png differ diff --git a/thumb.php b/thumb.php new file mode 100644 index 0000000..212c25b --- /dev/null +++ b/thumb.php @@ -0,0 +1,96 @@ +content = $content; + + $this->contentType = $contentType; + } + + public function getContent () { + + return $this->content; + } + + public function getContentType () { + + return $this->contentType; + } +} + + diff --git a/vendor/crowdfunding2/Chart.class.php b/vendor/crowdfunding2/Chart.class.php new file mode 100644 index 0000000..df41454 --- /dev/null +++ b/vendor/crowdfunding2/Chart.class.php @@ -0,0 +1,332 @@ +crowdfunding = $crowdfunding; + } + + + private function addLastPointOfCumulativeGraph ($lastAmount) { + + $lastDay = NULL; + + if ($this->crowdfunding->isOver()) { + + $lastDay = $this->crowdfunding->getEndDate(); + + } elseif ($this->crowdfunding->hasStartedYet()) { + + $lastDay = $this->crowdfunding->today; + } + + + if (isset($lastDay)) { + + $followingDay = (clone $lastDay)->add(new DateInterval('P1D')); + + $this->points['amountCollectedByDayCumulative'][] = [ + + 't' => $lastDay->getTimestamp() * 1000, + 'y' => $this->crowdfunding->convertIntoChosenUnit($lastAmount) + ]; + + $this->points['amountCollectedByDayCumulative'][] = [ + + 't' => $followingDay->getTimestamp() * 1000, + 'y' => $this->crowdfunding->convertIntoChosenUnit($lastAmount) + ]; + } + } + + + private function addSecondPointOfTarget ($target) { + + $d = NULL; + + if ($this->crowdfunding->isOver()) { + + $d = $this->crowdfunding->getEndDate(); + + } else { + + if (!$this->crowdfunding->isEvergreen()) { + + $d = $this->crowdfunding->getEndDate(); + + } else { + + if ($this->crowdfunding->isEvergreen() == 'monthly') { + + // last point will be the last day of the month the campaign starts + $dateOfLastDayOfTheMonth = new DateTime($this->crowdfunding->getStartDate()->format("Y-m-t")); + + $d = $dateOfLastDayOfTheMonth; + + } else { //if ($this->crowdfunding->isEvergreen() == 'forever') { + + if ($this->crowdfunding->hasStartedYet()) { + + $d = $this->crowdfunding->now; + + } else { + + + $dateOfLastDayOfTheMonth = new DateTime($this->getStartDate()->format("Y-m-t")); + + $d = $dateOfLastDayOfTheMonth; + + } + } + + } + } + + $d->add(new DateInterval('P1D')); + + $this->points['targetLine'][] = [ + 't' => $d->getTimestamp() * 1000, + 'y' => $target + ]; + } + + public function displayTarget ($bool = NULL) { + + if (isset($bool)) { + + $this->displayTarget = $bool; + + } else { + + return $this->displayTarget; + } + } + + public function addGraph ($g) { + + $this->graphs[] = $g; + } + + private function setPoints () { + + $dailyAmount = 0; + $dailyAmountCumulative = 0; + + + $t_0 = (clone $this->crowdfunding->getStartDate()); + $mt_0 = $t_0->getTimestamp() * 1000; + + if ($this->crowdfunding->hasTarget()) { + + // On trace la droite de l'objectif + $this->points['targetLine'][] = [ + + 't' => $mt_0, + 'y' => $this->crowdfunding->getTarget() + ]; + + // For x axis scaling + $this->addSecondPointOfTarget($this->crowdfunding->getTarget()); + + } + + /* + $this->points['amountCollectedByDayCumulative'][] = [ + + 't' => $mt_0, + 'y' => 0 + ]; + */ + + $tx = $this->crowdfunding->getDonationsList(); + + if (empty($tx)) { + + // For y axis scaling + $this->points['amountCollectedByDay'][] = [ + + 't' => $mt_0, + 'y' => 0 + ]; + + } else { + + $currentDay = new DateTime(); + $dayBefore = clone $this->crowdfunding->getStartDate(); + + foreach ($tx as $t) { + + + $dailyAmountCumulative += $t->getAmount(); + $dailyAmount += $t->getAmount(); + + $currentDay->setTimestamp($t->getDate()->getTimestamp()); + $currentDay->setTime(0, 0, 0); + + if ($currentDay != $dayBefore) { + + $this->points['amountCollectedByDay'][] = [ + + 't' => $dayBefore->getTimestamp() * 1000, + 'y' => $this->crowdfunding->convertIntoChosenUnit($dailyAmount) + ]; + + $this->points['amountCollectedByDayCumulative'][] = [ + + 't' => $dayBefore->getTimestamp() * 1000, + 'y' => $this->crowdfunding->convertIntoChosenUnit($dailyAmountCumulative) + ]; + + $lastDailyAmount = $dailyAmount; + $dailyAmount = 0; + } + + $dayBefore = clone $currentDay; + } + + // Add latest day's tx + + $this->points['amountCollectedByDay'][] = [ + + 't' => $dayBefore->getTimestamp() * 1000, + 'y' => $this->crowdfunding->convertIntoChosenUnit($lastDailyAmount) + ]; + + $this->addLastPointOfCumulativeGraph($dailyAmountCumulative); + } + } + + + public function getAmountCollectedByDayPoints () { + + if (empty($this->points)) { + + $this->setPoints(); + + } + + return json_encode($this->points['amountCollectedByDay']); + + } + + + public function getAmountCollectedByDayCumulativePoints () { + + if (empty($this->points)) { + + $this->setPoints(); + + } + + $points = isset($this->points['amountCollectedByDayCumulative']) ? $this->points['amountCollectedByDayCumulative'] : []; + + return json_encode($points); + } + + + public function getTargetLinePoints () { + + if (empty($this->points)) { + + $this->setPoints(); + + } + + return json_encode($this->points['targetLine']); + } + + public function setTargetLineColor ($colorStr) { + + $this->targetLineColor = new Color($colorStr); + } + + + public function getScripts ($lang, $whereToInsertChart = 'main', $dir = '') { + + if (empty($this->points)) { + + $this->setPoints(); + } + + $out = ''; + + $out .= ''; + + $out .= ''; + + $out .= ''; + + return $out; + } +} + + diff --git a/vendor/crowdfunding2/Color.class.php b/vendor/crowdfunding2/Color.class.php new file mode 100755 index 0000000..746860f --- /dev/null +++ b/vendor/crowdfunding2/Color.class.php @@ -0,0 +1,204 @@ + 'ffffff', + 'silver' => 'C0C0C0', + 'gray' => '808080', + 'black' => '000000', + 'red' => 'FF0000', + 'maroon' => '800000', + 'yellow' => 'FFFF00', + 'olive' => '808000', + 'lime' => '00FF00', + 'green' => '008000', + 'acqua' => '00FFFF', + 'cyan' => '00FFFF', + 'teal' => '008080', + 'blue' => '0000FF', + 'navy' => '000080', + 'fuchsia' => 'FF00FF', + 'magenta' => 'FF00FF', + 'purple' => '800080' + ]; + + private $regexes = [ + + 'hex3' => '/^([a-fA-F0-9]{3}){1,2}$/', + 'hex6' => '/^#(([a-fA-F0-9]{3}){1,2})$/', + 'rgb' => '/^rgb\( *(0?[0-9]{1,2}|1[0-9]{1,2}|2[0-4][0-9]|25[0-5])\, *(0?[0-9]{1,2}|1[0-9]{1,2}|2[0-4][0-9]|25[0-5]), *(0?[0-9]{1,2}|1[0-9]{1,2}|2[0-4][0-9]|25[0-5]) *\)$/', + 'rgba' =>'/^hsla\( *(0?[0-9]{1,2}|1[0-9]{1,2}|2[0-4][0-9]|25[0-5])\, *(0?[0-9]{1,2}|1[0-9]{1,2}|2[0-4][0-9]|25[0-5]), (0?[0-9]{1,2}|1[0-9]{1,2}|2[0-4][0-9]|25[0-5])\, *((0\.[0-9]{1,2}|1))\)$/', + 'hsl' => '/^hsl\( *(0?[0-9]{1,2}|1[0-9]{1,2}|2[0-4][0-9]|25[0-5])\, *([0-9]{1,3}(\.[0-9]{0,2})?)%, *([0-9]{1,3}(\.[0-9]{0,2})?)% *\)$/', + 'hsla' => '/^hsla\( *(0?[0-9]{1,2}|1[0-9]{1,2}|2[0-4][0-9]|25[0-5])\, *([0-9]{1,3}(\.[0-9]{0,2})?)%, *([0-9]{1,3}(\.[0-9]{0,2})?)%\, *((0\.[0-9]{1,2}|1))\)$/', + ]; + + public function __construct ($colorStr) { + + + if ($colorStr == 'transparent') { + + + + } else if (array_key_exists($colorStr, $this->validColorsList)) { + + $this->hex = $this->validColorsList[$colorStr]; + + } else if (preg_match($this->regexes['hex3'], $colorStr)) { + + $this->hex = $colorStr; + + } else if (preg_match($this->regexes['hex6'], $colorStr, $matches)) { + + $this->hex = $matches[1]; + + } else if (preg_match($this->regexes['rgb'], $colorStr, $matches)) { + + $this->rgb = array( + 'r' => $matches[1], + 'g' => $matches[2], + 'b' => $matches[3], + ); + + } else if (preg_match($this->regexes['rgba'], $colorStr, $matches)) { + + $this->rgb = array( + 'r' => $matches[1], + 'g' => $matches[2], + 'b' => $matches[3], + 'a' =>$matches[5], + ); + + } else if (preg_match($this->regexes['hsl'], $colorStr, $matches)) { + + $this->hsl = array( + 'h' => $matches[1], + 's' => $matches[2], + 'l' => $matches[3], + ); + + } else if (preg_match($this->regexes['hsla'], $colorStr, $matches)) { + + $this->hsl = array( + 'h' => $matches[1], + 's' => $matches[2], + 'l' => $matches[3], + 'a' => $matches[5], + ); + + } else { + + $additionnalMsg = ''; + + if(empty($colorStr)) { + + $additionnalMsg = _('Les couleurs hexadécimales doivent être écrites sans le caractère #'); + + } else { + + $additionnalMsg = sprintf(_('Vous avez écrit : %s'), htmlspecialchars($colorStr)); + } + + throw new Exception(_('La couleur %s n\'est pas au bon format.') . "\n" . + $additionnalMsg . "\n" . + _('Vérifiez votre syntaxe.')); + } + } + + public function getRGB () { + + if (isset($this->rgb)) { + + return $this->rgb; + + } elseif (isset($this->hex)) { + + return $this->hex2RGB($this->hex); + + } + } + + public function getRGBa () { + + if (isset($this->rgba)) { + + return $this->rgba; + + } + } + + public function getHSLa () { + + if (isset($this->hsla)) { + + return $this->hsla; + + } + } + + public function getHex () { + + if (isset($this->hex)) { + + return $this->hex; + + } elseif (isset($this->rgb)) { + + return $this->RGB2hex($this->rgb); + + } + + } + + public function getColorAllocation ($imgRessource) { + + list($r, $g, $b) = $this->getRGB(); + + return imageColorAllocate($imgRessource, $r, $g, $b); + } + + public function RGB2hex () { + + } + + public function hex2RGB ($hexStr) { + + $strLen = strlen($hexStr); + + if ($strLen == 6) { //If a proper hex code, convert using bitwise operation. No overhead... faster + + $colorVal = hexdec($hexStr); + + $r = 0xFF & ($colorVal >> 0x10); + $g = 0xFF & ($colorVal >> 0x8); + $b = 0xFF & $colorVal; + + } elseif ($strLen == 3) { //if shorthand notation, need some string manipulations + + $r = hexdec(str_repeat(substr($hexStr, 0, 1), 2)); + $g = hexdec(str_repeat(substr($hexStr, 1, 1), 2)); + $b = hexdec(str_repeat(substr($hexStr, 2, 1), 2)); + + } else { + + throw new Exception(_('Le paramètre %s n\'est pas une couleur.') . "\n" . _('Vérifiez votre syntaxe.')); + + } + + $this->rgb = array($r, $g, $b); + + return $this->rgb; + } + + +} + diff --git a/vendor/crowdfunding2/Crowdfunding.class.php b/vendor/crowdfunding2/Crowdfunding.class.php new file mode 100755 index 0000000..3c05984 --- /dev/null +++ b/vendor/crowdfunding2/Crowdfunding.class.php @@ -0,0 +1,1645 @@ +setDisplayType($displayType); + + $this->setPubkey($pubkey); + + $this->setUnit($unit); + + $this->now = new DateTime(); + $this->today = new DateTime(); + $this->today->setTime(0, 0, 0); + + $this->handleDates($startDate, $endDate); + } + + public function setFilterMinDonation ($min) { + + $this->filterMinDonation = (float) $min; + } + + + public function getFilterMinDonation () { + + return $this->filterMinDonation; + } + + public function setFilterMinCommentLength ($length) { + + $this->filterMinCommentLength = (int) $length; + } + + + public function getFilterMinCommentLength () { + + return $this->filterMinCommentLength; + } + + public function getEndDate() { + + return (clone $this->endDate); + + } + + private function setUnit ($unit) { + + if (!empty($unit)) { + + if (!in_array($unit, $this->units)) { + + $out = []; + $out[] = _('L\'unité renseignée n\'existe pas.'); + $out[] = _('Vérifiez votre synthaxe.'); + + $this->decease($out); + + } else { + + $this->unit = $unit; + } + } + } + + private function setDisplayType ($displayType) { + + if (!empty($displayType)) { + + if (in_array($displayType, $this->validDisplayTypes)) { + + $this->displayType = $displayType; + + } else { + + $this->decease(_('Ce type d\'affichage n\'existe pas.')); + } + + } + } + + public function decease ($errorMsgs) { + + if (!is_array($errorMsgs)) { + + $errorMsgs = explode("\n", $errorMsgs); + } + + + if ($this->displayType == 'img') { + + $source = imagecreatetruecolor(500, 200); + + $bgColor = imagecolorallocate($source, + 255, 255, 255); + + imagefill($source, + 0, 0, + $bgColor); + + $txtColor = imagecolorallocate($source, + 0, 0, 0); + + $errorMsgFontSize = 3; + $x = 5; + $y = 5; + + foreach ($errorMsgs as $msg) { + + imagestring($source, $errorMsgFontSize, $x, $y, utf8_decode($msg), $txtColor); + + $y += $errorMsgFontSize + 20; + } + + + imagepng($source); + imagedestroy($source); + + } else if ($this->displayType == 'svg') { + + echo ' + + + '; + + $x = 25; + $y = 25; + + foreach ($errorMsgs as $msg) { + + echo ' + + '. $msg . ' + '; + + $y += 25; + } + + echo ' + + '; + + } else { + + ob_get_clean(); // to prevent error message to display inside an HTML container (case of error generated by get method calls) + + echo ' + + + + '. $this->getTitle() . ' + + + + + +
'; + + + foreach ($errorMsgs as $msg) { + + echo '

' . $msg . '

'; + } + + echo ' +
+ + '; + } + + exit; + } + + public function setTarget ($target) { + + if (empty($target)) { + + $out = []; + $out[] = _('Il manque le montant à atteindre. Vérifiez votre syntaxe.'); + $out[] = _('Vérifiez votre syntaxe.'); + $this->decease($out); + + } else { + + $target = (int)$target; + + if (!is_int($target)){ + + $out = []; + $out[] = _('Le montant n\'est pas un nombre entier.'); + $out[] = _('Vérifiez votre syntaxe.'); + $this->decease($out); + + } else if ($target == 0) { + + $out = []; + $out[] = _('Le montant cible est nul.'); + $out[] = _('Vérifiez votre syntaxe.'); + $this->decease($out); + + } else if ($target < 0) { + + $out = []; + $out[] = _('La montant cible inférieur à 0.'); + $out[] = _('Vérifiez votre syntaxe.'); + $this->decease($out); + + } else { + + $this->target = $target; + + } + } + } + + public function hasTarget() { + + return isset($this->target); + } + + public function getTarget () { + + if (!$this->hasTarget()) { + + $out = []; + $out[] = _('Il manque le montant à atteindre.'); + $out[] = _('Vérifiez votre syntaxe.'); + $this->decease($out); + + } else { + + return $this->target; + } + + } + + public function setMustDisplayGraph ($displayGraphOrNot) { + + if (in_array($displayGraphOrNot, $this->truePossibleValues)) { + + $this->mustDisplayGraph = true; + + } else { + + $this->mustDisplayGraph = false; + } + } + + public function getMustDisplayGraph () { + + return $this->mustDisplayGraph; + } + + public function setMustDisplayQRCode ($mustDisplayQRCode) { + + $this->mustDisplayQRCode = $mustDisplayQRCode; + + if ($mustDisplayQRCode) { + + $qrCodePath = $this->qrCodesFolder . '/' . $this->pubkey . '.png'; + + if (file_exists($qrCodePath)) { + + $this->qrCodePath = $qrCodePath; + + } else { + + QRcode::png($this->pubkey, $qrCodePath); + + $this->qrCodePath = $qrCodePath; + } + } + } + + public function getQRCodePath () { + + if (!file_exists($this->qrCodePath)) { + + return false; + + } else { + + return $this->qrCodePath; + } + } + + public function setMustHideTitle ($mustHideTitle) { + + if (in_array($mustHideTitle, $this->truePossibleValues)) { + + $this->mustHideTitle = true; + + } else { + + $this->mustHideTitle = false; + + } + } + + public function getMustHideTitle () { + + return $this->mustHideTitle; + } + + public function setTitle ($title) { + + if (!empty($title)) { + + $this->title = htmlspecialchars($title); + } + } + + public function hasLogo() { + + return !empty($this->logoPath); + } + + public function setLogo ($logoName) { + + if ($this->displayType == 'img') { + + $logoPath = $this->logosFolder . '/png/' . $logoName . '.png'; + + } else { + + $logoPath = $this->logosFolder . '/svg/' . $logoName . '.svg'; + } + + + if (!file_exists($logoPath)) { + + $this->decease(_('Ce logo n\'existe pas.')); + + } else { + + $this->logoPath = $logoPath; + } + } + + public function getLogoPath() { + + return $this->logoPath; + + } + + public function getTitle () { + + return $this->title; + } + + public function getMustDisplayQRCode () { + + return $this->mustDisplayQRCode; + } + + public function getMustDisplayButton () { + + return $this->mustDisplayButton; + } + + public function setMustDisplayPubkey ($mustDisplayPubkey) { + + if (in_array($mustDisplayPubkey, $this->truePossibleValues)) { + + $this->mustDisplayPubkey = true; + + } else { + + $this->mustDisplayPubkey = false; + } + } + + public function getMustDisplayPubkey () { + + return $this->mustDisplayPubkey; + } + + public function setMustDisplayButton ($mustDisplayButton) { + + $this->mustDisplayButton = (bool) $mustDisplayButton; + } + + + public function getContributionURL () { + + if (!isset($this->contributionURL)) { + + $this->contributionURL ='https://' . $this->apiNode . '/api/#/v1/payment/' . $this->pubkey + . '?' . + 'amount=10|20|50|100|1000' + . '&' . + 'comment=don' + . '&' . + 'redirect_url=https://%3A%252F%252F' . $this->apiNode + . '&' . + 'cancel_url=https%3A%252F%252F' . $this->apiNode; + } + + return $this->contributionURL; + + } + + public function setPubkey ($pubkey) { + + if (empty($pubkey)) { + + $out = []; + $out[] = _('Il manque la clé publique du compte à vérifier.'); + $out[] = _('Vérifiez votre syntaxe.'); + + $this->decease($out); + + } else if (!preg_match(self::PUBKEY_FORMAT, $pubkey)) { + + $out = []; + $out[] = _('La pubkey n\'a pas le format attendu.'); + $out[] = _('Vérifiez votre syntaxe.'); + $this->decease($out); + + } else { + + $this->pubkey = $pubkey; + + } + } + + public function printUnit () { + + if ($this->unit == 'relative') { + + if ($this->displayType == 'img') { + + return _('DUĞ1'); + + } else { + + return _('DUĞ1'); + } + + } else { + + return _('Ğ1'); + } + } + + protected function isDate ($date, $format){ + + $a = date_parse_from_format($format, $date); + + return checkdate($a["month"], $a["day"], $a["year"]); + } + + public function hasStartedYet () { + + if (empty($this->hasStartedYet)) { + + $this->hasStartedYet = ($this->startDate <= $this->now); + + } + + return $this->hasStartedYet; + } + + public function isEvergreen ($bool = NULL) { + + if (isset($bool)) { + + $this->isEvergreen = $bool; + + } else { + + return $this->isEvergreen; + } + } + + protected function handleDates ($startDate, $endDate) { + + /* Starting date handling */ + + if (empty($startDate)) { + + $this->startDate = new DateTime('first day of this month'); + + } else if (!$this->isDate($startDate, self::DATE_FORMAT)) { + + $out = []; + $out[] = _('La date de début n\'est pas correcte.'); + $out[] = _('Vérifiez votre syntaxe.'); + $this->decease($out); + + } else { + + $d = DateTime::createFromFormat(self::DATE_FORMAT, $startDate); + + if ($d === false) { + + $out = []; + $out[] = _('La date de début n\'est pas correcte.'); + $out[] = _('Vérifiez votre syntaxe.'); + $this->decease($out); + + } else { + + $this->startDate = $d; + } + } + + $this->startDate->setTime(0,0,0); + + /* Ending date handling */ + + if (empty($endDate)) { + + if (empty($startDate)) { + + // For everygreen campaigns (monthly crowdfunding) + + $this->isEvergreen('monthly'); + + } else { + + $this->isEvergreen('forever'); + } + + + $this->endDate = NULL; + + } else { + + if (!$this->isDate($endDate, self::DATE_FORMAT) ) { + + $out = []; + $out[] = _('La date de fin est incorrecte.'); + $out[] = _(' Vérifiez votre syntaxe.'); + $this->decease($out); + + } else { + + $d = DateTime::createFromFormat(self::DATE_FORMAT, $endDate); + + if ($d === false) { + + $out = []; + $out[] = _('La date de fin est incorrecte.'); + $out[] = _('Renseignez la au format '. self::DATE_FORMAT . '.'); + $this->decease($out); + + } else { + + $this->endDate = $d; + $this->endDate->setTime(0,0,0); + + if (empty($startDate)) { + + $out = []; + $out[] = _('Vous avez spécifié une date de fin, mais pas de date de début !'); + $out[] = _('Renseignez une date de début !'); + $out[] = _('Date de fin : ') . $this->endDate->format(self::DATE_FORMAT); + + $this->decease($out); + + } elseif ($this->startDate >= $this->endDate) { + + $out = []; + $out[] = _('La date de fin est antérieure ou égale à la date de début.'); + $out[] = _('Un crowdfunding ne peut pas se terminer avant d\'avoir commencé.'); + $out[] = _('Vérifiez vos dates :'); + $out[] = _('Date de début : ') . $this->startDate->format(self::DATE_FORMAT); + $out[] = _('Date de fin : ') . $this->endDate->format(self::DATE_FORMAT); + + $this->decease($out); + + } + } + } + + } + } + + public function isOver () { + + if (empty($this->isOver)) { + + $this->isOver = (!empty($this->endDate) and ($this->endDate < $this->now)); + } + + return $this->isOver; + } + + public function getDaysLeft () { + + if (!isset($this->daysLeft)) { + + if ($this->isEvergreen()) { + + $lastDayOfTheMonth = new DateTime($this->startDate->format('Y-m-t')); + $this->daysLeft = intval($this->today->diff($lastDayOfTheMonth)->format('%a')); + + } elseif (empty($this->endDate)) { + + $this->daysLeft = NULL; + + } else { + + $this->daysLeft = intval($this->today->diff($this->endDate)->format('%R%a')); + } + } + + return $this->daysLeft; + } + + public function getMeanDonation () { + + if (empty($this->meanDonation)) { + + $this->meanDonation = $this->amountCollected / $this->donorsNb; + } + + return $this->meanDonation; + } + + public function getMaxDonation () { + + if (empty($this->maxDonation)) { + + $max = 0; + + foreach ($this->donationsList as $d) { + + $max = max($max, $d->getAmount()); + } + + $this->maxDonation = $max; + } + + return $this->maxDonation; + } + + public function getPubkey () { + + return $this->pubkey; + } + + public function getMinDonation () { + + if (empty($this->minDonation)) { + + $min = 666666; + + foreach ($this->donationsList as $d) { + + $min = min($min, $d->getAmount()); + } + + $this->minDonation = $min; + } + + return $this->minDonation; + } + + protected function computePercentage () { + + $this->percentage = $this->getAmountCollected() / $this->getTarget() * 100; + + } + + public function getPercentage () { + + if (!isset($this->percentage)) { + + $this->computePercentage(); + + } + + return round($this->percentage); + } + + public function getAmountCollected () { + + if (!isset($this->amountCollected)) { + + $this->fetchDonationsList(); + + } + + return $this->convertIntoChosenUnit($this->amountCollected); + } + + public function getDonorsNb () { + + if (!isset($this->donorsNb)) { + + $this->fetchDonationsList(); + } + + return $this->donorsNb; + } + + public function fetchMonthlyMean ($monthsToConsider) { + + $nMonths = new DateInterval('P'. $monthsToConsider . 'M'); + $dateMonthsAgo = clone $this->today; + $dateMonthsAgo->sub($nMonths); + $dateMonthsAgo = DateTime::createFromFormat( + 'Y-m-d', + $dateMonthsAgo->format('Y') . '-' . + $dateMonthsAgo->format('m') . '-' . + '01' + ); + + $oneMonth = new DateInterval('P1M'); + $dateFirstDayTodaysMonth = DateTime::createFromFormat( + 'Y-m-d', + $this->today->format('Y') . '-' . + $this->today->format('m') . '-' . + '01' + ); + $dateLastDayOfPreviousMonth = clone $dateFirstDayTodaysMonth; + $aDay = new DateInterval('P1D'); + $dateLastDayOfPreviousMonth->sub($aDay); + + $periodTotalCollected = 0; + + $tx = $this->getTransactions( + $this->pubkey, + $dateMonthsAgo, + $dateLastDayOfPreviousMonth + ); + + $previousMonth = $dateMonthsAgo->format('Y-m'); + $monthlyDonors[$previousMonth] = []; + $monthlyDonorsNb[$previousMonth] = 0; + + foreach ($tx as $t) { + + if ($t->issuers[0] != $this->pubkey) { + + foreach ($t->outputs as $o) { + + if (strstr($o, $this->pubkey)) { + + $transactionDate = new DateTime(); + $transactionDate->setTimestamp($t->time); + + $currentMonth = $transactionDate->format('Y-m'); + + if ($currentMonth != $previousMonth) { + + $monthlyDonors[$currentMonth] = []; + $monthlyDonorsNb[$currentMonth] = 0; + } + + $donor = $t->issuers[0]; + + if (!in_array($donor, $monthlyDonors[$currentMonth])) { + + $monthlyDonors[$currentMonth][] = $donor; + ++$monthlyDonorsNb[$currentMonth]; + } + + $this->addPeriodDonor($donor); + + $o = explode(':', $o); + $transactionAmount = $o[0] / 100; + + $periodTotalCollected += $transactionAmount; + + $previousMonth = $currentMonth; + } + } + } + } + + $this->periodDonorsMean = ceil(array_sum($monthlyDonorsNb) / $monthsToConsider); + + $this->monthlyAmountCollectedMean = $this->convertIntoChosenUnit($periodTotalCollected / $monthsToConsider); + + return $this->monthlyAmountCollectedMean; + } + + public function setButtonType ($type) { + + if (in_array($type, $this->validButtonTypes)) { + + $this->buttonType = $type; + } + } + + public function getButtonType () { + + return $this->buttonType; + } + + public function getPeriodDonorsMean ($monthsToConsider) { + + return $this->periodDonorsMean; + } + + private function addPeriodDonor ($donor) { + + if (!in_array($donor, $this->periodDonorsList)) { + + $this->periodDonorsList[] = $donor; + ++$this->periodDonorsNb; + } + } + + public function getPeriodDonorsNb ($monthsToConsider) { + + if (!isset($this->periodDonorsNb)) { + + $this->fetchMonthlyMean($monthsToConsider); + } + + return $this->periodDonorsNb; + } + + public function getMonthlyAmountCollectedMean ($monthsToConsider) { + + if (!isset($this->monthlyAmountCollectedMean)) { + + $this->fetchMonthlyMean($monthsToConsider); + } + + return $this->monthlyAmountCollectedMean; + } + + private function getTransactions ($pubkey, $startDate, $endDate = NULL) { + + if ($startDate > $this->now) { + + return array(); + + } else { + + if (!isset($endDate)) { + + $endDate = $this->today; + } + + $json = NULL; + $jsonUri = '/tx/history/' . $pubkey . "/times/" . $startDate->getTimestamp() . "/" . $endDate->getTimestamp(); + $txCacheDir = $this->cacheDir . 'tx/'; + + if ($this->isOver()) { + + $txFullPath = $txCacheDir . $pubkey . '_' . $startDate->format('Y-m-d') . '_' . $endDate->format('Y-m-d') . '.json'; + + } else { + + $txFullPath = $txCacheDir . $pubkey . '_' . $startDate->format('Y-m-d') . '.json'; + + } + + if ($this->isActivatedCache) { + + if (file_exists($txFullPath) and ((time() - filemtime($txFullPath)) < $this->cacheLongevity)) { + + $json = file_get_contents($txFullPath); + } + + + if (empty($json)) { + + $json = $this->fetchJson($jsonUri); + + // Cache tx + + if ($this->isActivatedCache) { + + if (!file_exists($txCacheDir)) { + + mkdir($txCacheDir, 0777, true); + + } + + file_put_contents($txFullPath, $json); + } + + } + + } else { + + $json = $this->fetchJson($jsonUri); + } + + $transactions = json_decode($json); + + return $transactions->history->received; + } + } + + + public function keepOnlyHighestDonations () { + + + } + + public function getDonationsList () { + + if (empty($this->donationsList)) { + + $this->fetchDonationsList(); + + } + + return $this->donationsList; + + } + + public function getDonors () { + + if (empty($this->donorsList)) { + + $this->fetchDonationsList(); + } + + return $this->donorsList; + } + + public function getDonorCesiumPlusProfile ($pubkey) { + + if (!isset($this->donorsCesiumPlusProfiles)) { + + $this->fetchCesiumPlusProfiles(); + } + + if (isset($this->donorsCesiumPlusProfiles[$pubkey])) { + + return $this->donorsCesiumPlusProfiles[$pubkey]; + + } else { + + return new Donor($pubkey); + } + } + + public function fetchCesiumPlusProfiles () { + + $this->donorsCesiumPlusProfiles = array(); + + $queryParams = [ + 'size' => $this->donorsNb, + 'query' => [ + 'bool' => [ + 'should' => [] + ] + ], + '_source' => [ + 'city', + 'title', + 'issuer', + 'avatar', + 'geoPoint' + ] + ]; + + foreach ($this->donorsList as $pubkey) { + + $queryParams['query']['bool']['should'][] = [ + + 'match' => [ + + 'issuer' => $pubkey + ] + ]; + } + + $json = $this->fetchJson('/user/profile/_search', true, $queryParams); + $result = json_decode($json); + $cesiumPlusProfiles = $result->hits->hits; + + foreach ($cesiumPlusProfiles as $profile) { + + $profile = $profile->_source; + + $donor = new Donor($profile->issuer); + + if (isset($profile->title)) { + + $donor->setName($profile->title); + } + + if (isset($profile->city)) { + + $donor->setCity($profile->city); + } + + if (isset($profile->avatar)) { + + $donor->setAvatar($profile->avatar->_content, $profile->avatar->_content_type); + } + + if (isset($profile->geoPoint)) { + + $donor->setGeoPoint($profile->geoPoint->lon, $profile->geoPoint->lat); + } + + $this->donorsCesiumPlusProfiles[$profile->issuer] = $donor; + + } + } + + public function getFilteredDonationsList () { + + if (($this->getFilterMinDonation() <= 0) AND ($this->getFilterMinCommentLength() <= 0)) { + + return $this->getDonationsList(); + + } else { + + return array_filter($this->getDonationsList(), function ($v) { + + return ( + ($v->getAmount() >= $this->getFilterMinDonation()) + AND + (strlen($v->getComment()) >= $this->getFilterMinCommentLength()) + ); + }); + } + + } + + public function setMonthsToConsider ($m) { + + $this->monthsToConsider = (int) $m; + } + + public function getMonthsToConsider () { + + if (isset($this->monthsToConsider)) { + + return $this->monthsToConsider; + + } else { + + return $this->defaultMonthsToConsider; + } + } + + + private function fetchDonationsList () { + + $this->donationsList = array(); + $this->totalDonationPerDonor = array(); + $this->donorsList = array(); + $this->amountCollected = 0; + $this->donorsNb = 0; + + $tx = $this->getTransactions($this->pubkey, + $this->startDate, + $this->endDate + ); + + foreach ($tx as $t) { + + // Filter only incoming transactions + if ($t->issuers[0] != $this->pubkey) { + + $donorPubkey = $t->issuers[0]; + + foreach ($t->outputs as $o) { + + if (strstr($o, $this->pubkey)) { + + $o = explode(':', $o); + + $transactionAmount = $o[0] / 100; + + $this->donationsList[] = new Donation( + + $transactionAmount, + $donorPubkey, + intval($t->time), + $t->comment + ); + + $this->amountCollected += $transactionAmount; + + if (!in_array($donorPubkey, $this->donorsList)) { + + ++$this->donorsNb; + + $this->donorsList[] = $donorPubkey; + + $this->totalDonationPerDonor[$donorPubkey] = $transactionAmount; + + } else { + + $this->totalDonationPerDonor[$donorPubkey] += $transactionAmount; + } + } + } + } + } + } + + public function convertIntoChosenUnit ($amountInQuantitative) { + + if ($this->unit == 'quantitative') { + + return $amountInQuantitative; + + } else { + + if (!isset($this->startDateUdAmount)) { + + $this->startDateUdAmount = $this->getUdAmount($this->startDate); + } + + return round($amountInQuantitative / $this->startDateUdAmount, 2); + } + } + + + + public function addNode ($node) { + + $node = htmlspecialchars($node); + + $this->nodes = array_unique( + array_merge( + (array)$node, + $this->nodes + ) + ); + } + + + + public function addNodes ($nodes) { + + if (!is_array($nodes)) { + + $nodes = explode(' ', $nodes); + } + + foreach ($nodes as $node) { + + $this->addNode($node); + } + + } + + /** + * @return $nodes array + */ + public function getNodesList ($cesiumPlus = false) { + + $nodesFilename = $cesiumPlus ? 'nodes-cesiumplus' : 'nodes'; + $nodesFilename .= '.txt'; + $nodesFullpath = $this->cacheDir . $nodesFilename; + + $nodes = $cesiumPlus ? $this->cesiumPlusNodes : $this->nodes; + + if ($this->isActivatedCache) { + + if (!file_exists($nodesFullpath)) { + + shuffle($nodes); + + $this->cacheNodes($nodes, $cesiumPlus); + + + } else { + + $nodesStr = file_get_contents($nodesFullpath); + + $nodes = explode("\n", $nodesStr); + } + + } else { + + shuffle($nodes); + + } + + return $nodes; + } + + protected function cacheNodes ($nodes, $cesiumPlus = false) { + + $nodesFilename = $cesiumPlus ? 'nodes-cesiumplus' : 'nodes'; + $nodesFilename .= '.txt'; + + if (!file_exists($this->cacheDir)) { + + mkdir($this->cacheDir, 0777, true); + + } + + file_put_contents($this->cacheDir . $nodesFilename, implode("\n", $nodes)); + } + + protected function saveNodes ($nodes, $cesiumPlus = false) { + + if ($cesiumPlus) { + + $this->cesiumPlusNodes = $nodes; + + } else { + + $this->nodes = $nodes; + } + } + + protected function fetchJson_aux ($nodes, $uri, $cesiumPlus, $queryParams, $nodesNb, $nodeTimeout) { + + if ($cesiumPlus) { + + // $header = 'Content-Type: application/x-www-form-urlencoded'; + // $header = "Content-Type: text/xml\r\n"; + + $opts = [ + 'http' => [ + 'method' => 'POST', + 'content' => json_encode($queryParams), + // 'header' => $header, + 'timeout' => $nodeTimeout + ] + ]; + + } else { + + $opts = [ + 'http'=>[ + 'timeout' => $nodeTimeout, + ] + ]; + } + + $streamContext = stream_context_create($opts); + + $i = 0; + + do { + + + $json = @file_get_contents("https://" . current($nodes) . $uri, + false, + $streamContext); + + if (empty($json)) { + + $nodes[] = array_shift($nodes); + ++$i; + } + + } while (empty($json) and ($i < $nodesNb)); + + if (!empty($json)) { + + // Let's save node order for other queries : + $this->saveNodes($nodes, $cesiumPlus); + + if ($this->isActivatedCache) { + + $this->cacheNodes($nodes, $cesiumPlus); + } + } + + return $json; + } + + + public function fetchJson ($uri, $cesiumPlus = false, $queryParams = NULL) { + + $json = NULL; + + $nodes = $this->getNodesList($cesiumPlus); + + $nodesNb = count($nodes); + + $maxTries = 3; + + $nodeTimeout = $cesiumPlus ? $this->cesiumPlusNodeTimeout : $this->nodeTimeout; + $nodeTimeoutIncrement = $cesiumPlus ? $this->cesiumPlusNodeTimeoutIncrement : $this->nodeTimeoutIncrement; + + for ($i = 0; ($i < 3) and empty($json); ++$i) { + + $json = $this->fetchJson_aux($nodes, $uri, $cesiumPlus, $queryParams, $nodesNb, $nodeTimeout); + + $nodeTimeout += $nodeTimeoutIncrement; + } + + if (empty($json)) { + + $out = []; + $out[] = _('Aucun noeud Duniter n\'a été trouvé.'); + $out[] = _('Noeud interrogés : '); + + if ($cesiumPlus) { + + $out[] = _('Paramètres de la requête : '); + $out[] = print_r($queryParams, true); + } + + $out = array_merge($out, $nodes); + + $this->decease($out); + } + + return $json; + } + + protected function fetchUdAmount ($date) { + + // On récupère les numéros de chaque blocks de DU journalier + $json = $this->fetchJson('/blockchain/with/ud'); + $blocks = json_decode($json)->result->blocks; + + if ($date > $this->now) { + + // On récupère le dernier block + $blockNum = end($blocks); + + } else { + + // On récupère le bloc de la date qui nous intéresse + $blockNum = $blocks[count($blocks) - $this->today->diff($date)->format("%a") - 1]; + } + + // Puis on récupère le montant du DU + $json = $this->fetchJson('/blockchain/block/' . $blockNum); + $block = json_decode($json); + + + return ($block->dividend / 100); + } + + public function getStartDate () { + + return (clone $this->startDate); + } + + public function getUdAmount ($date) { + + $udFilename = $this->getUdFilename($date); + $udsCacheDir = $this->cacheDir . 'uds/'; + $udFullPath = $udsCacheDir . $udFilename; + + if ($this->isActivatedCache) { + + if (file_exists($udFullPath)) { + + $udCachedAmount = file_get_contents($udFullPath); + + if (is_numeric($udCachedAmount) and $udCachedAmount != 0) { + + $udAmount = floatval($udCachedAmount); + } + } + + + + if (!isset($udAmount)) { + + $udAmount = $this->fetchUdAmount($date); + + // Cache UD amount + + if (!file_exists($udsCacheDir)) { + + mkdir($udsCacheDir, 0777, true); + + } + + file_put_contents($udFullPath, $udAmount); + + } + + + } else { + + $udAmount = $this->fetchUdAmount($date); + + } + + return $udAmount; + } + + + protected function getUdFilename ($date) { + + $datePreviousAutumnEquinox = new DateTime($date->format('Y') . '-09-22'); + $datePreviousSpringEquinox = new DateTime($date->format('Y') . '-03-20'); + + if ($date > $datePreviousAutumnEquinox) { + + $udFilename = $date->format('Y') . '-autumn'; + + } elseif ($date > $datePreviousSpringEquinox) { + + $udFilename = $date->format('Y') . '-spring'; + + } else { + + $udFilename = ($date->sub(new DateInterval('P1Y'))->format('Y')). '-autumn'; + } + + return $udFilename . '.txt'; + + } + + +} diff --git a/vendor/crowdfunding2/Donation.class.php b/vendor/crowdfunding2/Donation.class.php new file mode 100644 index 0000000..66797b1 --- /dev/null +++ b/vendor/crowdfunding2/Donation.class.php @@ -0,0 +1,54 @@ +amount = $amount; + + $this->donorPubkey = $donorPubkey; + + $this->date = new DateTime(); + $this->date->setTimestamp($time); + + $this->comment = $comment; + } + + public function getAmount () { + + return $this->amount; + } + + public function setAmount ($amount) { + + $this->amount = $amount; + } + + public function getDate () { + + return $this->date; + } + + public function getComment () { + + return $this->comment; + } + + public function getDonorPubkey () { + + return $this->donorPubkey; + } +} + + + diff --git a/vendor/crowdfunding2/Donor.class.php b/vendor/crowdfunding2/Donor.class.php new file mode 100644 index 0000000..5f9e920 --- /dev/null +++ b/vendor/crowdfunding2/Donor.class.php @@ -0,0 +1,74 @@ +pubkey = $pubkey; + } + + public function setName ($name) { + + $this->name = $name; + } + + public function getName () { + + if (isset($this->name)) { + + return $this->name; + + } else { + + return substr($this->pubkey, 0, 8); + } + + } + + public function setAvatar ($content, $contentType) { + + $this->avatar = new Avatar($content, $contentType); + } + + public function getAvatar () { + + return $this->avatar; + } + + public function setCity ($city) { + + $this->city = $city; + } + + public function getCity () { + + return $this->city; + } + + public function setGeoPoint ($lon, $lat) { + + $this->geoPoint = new GeoPoint($lon, $lat); + } + + public function getGeoPoint () { + + return $this->geoPoint; + } + + +} + diff --git a/vendor/crowdfunding2/FIXED.md b/vendor/crowdfunding2/FIXED.md new file mode 100755 index 0000000..22a8dab --- /dev/null +++ b/vendor/crowdfunding2/FIXED.md @@ -0,0 +1,20 @@ +## Réparés + +- Encapsulation +- Suppression des failles XSS +- Vérification des couleurs + +- Suppression du nombre de jours restant quand la date de fin est dépassée +- Messages d'erreurs maintenant plus clairs et plus précis +- Ajout du support des thèmes +- Utilisation de GetText pour la traduction +- Possibilité de traduire "DUG1" en entier (donc d'inverser DU et G1, pour l'anglais par exemple) + +- SVG : titre maintenant centré +- Amélioration de l'UX formulaire de génération : + - Prévisualisation affichée avant le code d'intégration +- Le noeuds choisi n'est pas dispo, on regarde les autres +- & transformés en & +- Résolution du problème du SVG qui n'était pas généré par certains serveurs à cause du longitude = $lon; + + $this->latitude = $lat; + } + + public function getLongitude () { + + return $this->longitude; + } + + public function getLatitude () { + + return $this->latitude; + } +} + + + diff --git a/vendor/crowdfunding2/Graph.class.php b/vendor/crowdfunding2/Graph.class.php new file mode 100644 index 0000000..82f3ee5 --- /dev/null +++ b/vendor/crowdfunding2/Graph.class.php @@ -0,0 +1,75 @@ + NULL, + 'borderColor' => NULL, + 'backgroundColor' => NULL, + 'borderDash' => NULL, + 'radius' => NULL, + 'fill' => NULL, + 'borderWidth' => NULL, + 'lineTension' => NULL, + 'pointRadius' => NULL, + 'steppedLine' => NULL + ]; + + + public function __construct ($dataPoints, $label) { + + $this->dataPoints = $dataPoints; + + $this->label = $label; + } + + public function setStyle ($param, $value) { + + switch (gettype($value)) { + + case 'boolean': + $this->styles[$param] = $value ? 'true' : 'false'; + break; + case 'array': + $this->styles[$param] = json_encode($value); + break; + case 'string': + $this->styles[$param] = '\''. $value . '\''; + break; + default: + $this->styles[$param] = $value; + } + } + + public function getGraph () { + + $out = ''; + + $out .= ' + { + data: '. $this->dataPoints .', + label: "'. $this->label .'", '; + + foreach ($this->styles as $k => $v) { + + if ($v !== NULL) { + + $out .= $k . ': ' . $v . ', '; + } + } + + $out .= ' + }'; + + return $out; + } +} diff --git a/vendor/crowdfunding2/LICENCE b/vendor/crowdfunding2/LICENCE new file mode 100755 index 0000000..f4b3aac --- /dev/null +++ b/vendor/crowdfunding2/LICENCE @@ -0,0 +1,661 @@ + GNU AFFERO GENERAL PUBLIC LICENSE + Version 3, 19 November 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU Affero General Public License is a free, copyleft license for +software and other kinds of works, specifically designed to ensure +cooperation with the community in the case of network server software. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +our General Public Licenses are intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + Developers that use our General Public Licenses protect your rights +with two steps: (1) assert copyright on the software, and (2) offer +you this License which gives you legal permission to copy, distribute +and/or modify the software. + + A secondary benefit of defending all users' freedom is that +improvements made in alternate versions of the program, if they +receive widespread use, become available for other developers to +incorporate. Many developers of free software are heartened and +encouraged by the resulting cooperation. However, in the case of +software used on network servers, this result may fail to come about. +The GNU General Public License permits making a modified version and +letting the public access it on a server without ever releasing its +source code to the public. + + The GNU Affero General Public License is designed specifically to +ensure that, in such cases, the modified source code becomes available +to the community. It requires the operator of a network server to +provide the source code of the modified version running there to the +users of that server. Therefore, public use of a modified version, on +a publicly accessible server, gives the public access to the source +code of the modified version. + + An older license, called the Affero General Public License and +published by Affero, was designed to accomplish similar goals. This is +a different license, not a version of the Affero GPL, but Affero has +released a new version of the Affero GPL which permits relicensing under +this license. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU Affero General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Remote Network Interaction; Use with the GNU General Public License. + + Notwithstanding any other provision of this License, if you modify the +Program, your modified version must prominently offer all users +interacting with it remotely through a computer network (if your version +supports such interaction) an opportunity to receive the Corresponding +Source of your version by providing access to the Corresponding Source +from a network server at no charge, through some standard or customary +means of facilitating copying of software. This Corresponding Source +shall include the Corresponding Source for any work covered by version 3 +of the GNU General Public License that is incorporated pursuant to the +following paragraph. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the work with which it is combined will remain governed by version +3 of the GNU General Public License. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU Affero General Public License from time to time. Such new versions +will be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU Affero General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU Affero General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU Affero General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + Barre de financement intégrable + Copyright (C) 2019 Pierre-Jean CHANCELLIER + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published + by the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . + +Also add information on how to contact you by electronic and paper mail. + + If your software can interact with users remotely through a computer +network, you should also make sure that it provides a way for users to +get its source. For example, if your program is a web application, its +interface could display a "Source" link that leads users to an archive +of the code. There are many ways you could offer source, and different +solutions will be better for different programs; see section 13 for the +specific requirements. + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU AGPL, see +. diff --git a/vendor/crowdfunding2/MIGHTDO.md b/vendor/crowdfunding2/MIGHTDO.md new file mode 100755 index 0000000..6de7ced --- /dev/null +++ b/vendor/crowdfunding2/MIGHTDO.md @@ -0,0 +1,49 @@ +# Might do... + +## generate.js + +- Voir si je peux rendre la syntaxe modulaire (ajout facile de thèmes, etc.) + +## iframe.php + +- Ajouter la possibilité d'utiliser un bouton "copier la clef vers le presse-papier" plutôt qu'un bouton qui redirige vers Cesium API + +## Général + +- Merger les README + +- Gérer les langues +- Traduire en anglais +- Traduire en espagnol + +- Avoir une barre de progressions à 4 paramètres de couleurs, genre red|orange|yellow|green, choisi en fonction de l'état du financement (critical, ok, good), + état fonction du %age atteint rapporté au %age de jours restants + +- Un thème vertical pour insérer dans une colonne (genre Widget Wordpress) + +- Récupérer toutes les transactions avec un commentaire particulier pour faire un genre de Widget à ajouter dans Wordpress pour faire un true style Flattr + +- Créer une landing page sur laquelle les gens seront redirigés au clic sur l'image (intégration via BBCode etc.) + +## Classes + +- Refactorer en patron MVC ? +- Réduire le nombre de paramètres dans le constructeur ? + +## iframes.php + +- Chercher comment récupérer les données Cesium+ pour les afficher + +## image.php + +- Refactorer en utilisant la classe + +## svg.php + +- Le corriger + +## generate.php + +- Ajouter la possibilité d'ajouter du CSS personnel +- Mise à jour en temps réel avec AngularJS ? +- Des URLs partageables pour travailler à plusieurs sur un modèle (comme les maquettes Facebook Ads, ou Canva.com) diff --git a/vendor/crowdfunding2/README.md b/vendor/crowdfunding2/README.md new file mode 100755 index 0000000..37ae6c1 --- /dev/null +++ b/vendor/crowdfunding2/README.md @@ -0,0 +1,28 @@ +# Crowdfundinğ + +PHP scripts and iframes to display crowdfunding informations in a fully customizable way. + +## A word about \ and height + +For autoheight.js script to work, iframes.php file must be stored on the same domain as the HTML that calls the iframe. + +## QR codes + +img/qrcodes must be set with write permissions : + +``` +chmod +w o img/qrcodes +``` + +## Generation of images + +If you are using this script on your own server, you might want to install PHP-GD library : + +``` +sudo apt install php-gd +``` + +Restarting your server will be necessary. For Apache : +``` +/etc/init.d/apache2 restart +``` diff --git a/vendor/crowdfunding2/conf.php b/vendor/crowdfunding2/conf.php new file mode 100755 index 0000000..a91730a --- /dev/null +++ b/vendor/crowdfunding2/conf.php @@ -0,0 +1,13 @@ + + + + Cloud iframe + + + + + +

Merci à nos donateurs

+ +

+ Nous tenons à remercier tous nos généreux donateurs pour leurs dons du mois dernier (janvier 2020) : +

+ + + + + + \ No newline at end of file diff --git a/vendor/crowdfunding2/examples/index.html b/vendor/crowdfunding2/examples/index.html new file mode 100755 index 0000000..04f91c2 --- /dev/null +++ b/vendor/crowdfunding2/examples/index.html @@ -0,0 +1,29 @@ + + + + iframes + + + +

Exemples

+ +
+ +
kickstarter.html
+
Iframe utilisée pour afficher une barre de progression dans le style de Kickstarter.
+ +
paidge.html
+
La barre de financement originale.
+ +
table.html
+
Iframe utilisée pour afficher la liste des derniers dons, avec leur montant et le commentaire associé.
+ +
cloud.html
+
Iframe utilisée pour afficher un nuage de tags des clefs qui ont effectué un don.
+
La taille de chaque mot est proportionnelle au montant du don.
+ +
inline-iframe.html
+
Iframe utilisée avec la propriété CSS display: inline; pour afficher des informations dans le flux du contenu.
+
+ + \ No newline at end of file diff --git a/vendor/crowdfunding2/examples/inline-iframe.html b/vendor/crowdfunding2/examples/inline-iframe.html new file mode 100755 index 0000000..265ce58 --- /dev/null +++ b/vendor/crowdfunding2/examples/inline-iframe.html @@ -0,0 +1,40 @@ + + + + Table iframe + + + + + +

Envie de financer Duniter ?

+ +

+ Pour faire partie des + mécènes de Duniter qui ont déjà donné + c'est simple : +

+ +
    +
  1. Copiez la clef suivante :
    + 78ZwwgpgdH5uLZLbThUQH7LKwPgjMunYfLiCfUCySkM8 +
  2. + +
  3. Collez-la dans votre client Duniter préféré (Cesium, Silkaj, etc.) afin de faire votre don 😉
  4. +
+ +

+ Merci pour votre soutient ! +

+ + \ No newline at end of file diff --git a/vendor/crowdfunding2/examples/js/autoHeight.js b/vendor/crowdfunding2/examples/js/autoHeight.js new file mode 100755 index 0000000..d11cbc3 --- /dev/null +++ b/vendor/crowdfunding2/examples/js/autoHeight.js @@ -0,0 +1,34 @@ +function doIframe(){ + o = document.getElementsByTagName('iframe'); + for(i=0;i + + + Kickstarter + + + + + +
+

Encourageons les développeurs !

+ +
+

+ Si vous aussi vous pensez qu'encourager les personnes qui donnent de leur temps à la monnaie libre est absolument indispensable + au succès de celle-ci, nous vous proposons de soutenir les différentes initiatives qui s'y rapportent, et notamment les développeurs de Duniter. +

+

+ Merci pour eux, +

+

+ Axiom-Team +

+
+ + +
+ + + + \ No newline at end of file diff --git a/vendor/crowdfunding2/examples/paidge.html b/vendor/crowdfunding2/examples/paidge.html new file mode 100755 index 0000000..522d199 --- /dev/null +++ b/vendor/crowdfunding2/examples/paidge.html @@ -0,0 +1,29 @@ + + + + Kickstarter + + + + + + + + + + \ No newline at end of file diff --git a/vendor/crowdfunding2/examples/table.html b/vendor/crowdfunding2/examples/table.html new file mode 100755 index 0000000..79ce319 --- /dev/null +++ b/vendor/crowdfunding2/examples/table.html @@ -0,0 +1,27 @@ + + + + Inline iframe + + + + + +

Merci à nos donateurs

+ +

+ Nous tenons à remercier tous nos généreux donateurs pour leurs dons du mois dernier (janvier 2020) : +

+ + + + + + \ No newline at end of file diff --git a/vendor/crowdfunding2/functions.php b/vendor/crowdfunding2/functions.php new file mode 100755 index 0000000..e48e489 --- /dev/null +++ b/vendor/crowdfunding2/functions.php @@ -0,0 +1,19 @@ + + + + + + + + + + Génération de votre barre de financement + + +Fork me on Duniter's Gitlab +
+
+

Générez votre barre de financement

+

En monnaie libre Ğ1

+

Commencer

+
+
+
+
+
+
+ Paramètres du crowdfunding +

+ + +

+

+ + +

+

+ + +

+ +

+ + +

+

+ + +

+

+ + +

+
+ + + +
+ + Options d'affichage + + +

+ + +

+ +

+ + +

+ +

+ + +

+ +

+ + +

+ +

+ + +

+

+ + +

+ +

+ + +

+ +

+ + +

+ + + +

+ + +

+

+ + +

+

+ + +

+

+ + +

+ +

+ + +

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

+ Prévisualisation : +

+ +
+ +
+ +

Comment l'intégrer

+ + +

Option n°1 : Code HTML

+ +

Pour intégrer la barre sur un site web ou blog (type Wordpress).

+ + + +
+
+ + + Copié ! +
+
+ + + + +

Option n°2 : Code Markdown

+ +

Pour l'intégrer :

+ +
    +
  • sur un forum Discourse (forum.monnaie-libre.org, forum.duniter.org),
  • +
  • un pad CodiMD (FramaPad, P2Pad, etc.)
  • +
  • un générateur de site statique (type Pelican).
  • +
+ +

+ Note pour Discourse : votre image risque de ne pas être mise à jour car, par défaut, + les forums Discourse téléchargent une copie de toutes les images que vous insérez, + plutôt que de les afficher de façon dynamique. +

+ + + +
+
+ + + Copié ! +
+
+ + + +

Option n°3 : Wikitext

+ +

Pour l'intégrer sur un wiki type DokuWiki (FramaWiki)

+ + + +
+
+ + + Copié ! +
+
+ + + +

Option n°4 : BBCode

+ +

Pour l'intégrer sur un forum type phpBB

+ + + +
+
+ + + Copié ! +
+
+ +
+ +
+
+ + +
+ +
+ + + + + + + + + + + diff --git a/vendor/crowdfunding2/generator.css b/vendor/crowdfunding2/generator.css new file mode 100755 index 0000000..7e2dfa8 --- /dev/null +++ b/vendor/crowdfunding2/generator.css @@ -0,0 +1,127 @@ +body, html{height: 100%;} +.github-fork-ribbon{position:fixed;} +header{ + min-height:100%; + background: linear-gradient( + rgba(0, 0, 0, 0.45), + rgba(0, 0, 0, 0.45) + ),url('img/background.png'); + background-attachment: fixed; + background-position: center; + background-repeat: no-repeat; + background-size: cover; +} +header h1.w3-jumbo{margin:0;} +fieldset{margin-bottom:16px;} +fieldset fieldset{margin-left:32px;} +label{ + font-weight:bold; + width:275px; + display:inline-block; +} +p.field:focus-within{color:#008ae6;} +fieldset input:not([type='checkbox']):not([type='color']), select{width:300px;} +input:not([type='color']):valid {border-color:#28a745 !important;} +input:focus,input:active,select:focus,select:active{ + border-color:#008ae6 !important; + border-width:2px !important; +} +input:invalid {border-color:#fd3536 !important;} +input:optional{border-color:#ccc !important;} +select{ + display:block; + width:300px !important; +} +::placeholder {color: #59bdff;} +textarea{width:100%;} +#buttons{overflow:visible;} +.tooltip { + position: relative; + display: inline-block; + border-bottom: 1px dotted black; +} +.tooltip .tooltiptext { + width: 120px; + background-color: #555; + color: #fff; + text-align: center; + border-radius: 6px; + padding: 5px 0; + position: absolute; + z-index: 1; + bottom: 60px; + left: 50%; + margin-left: -60px; + opacity: 0; + transition: opacity 0.3s; +} +.tooltip .tooltiptext::after { + content: ""; + position: absolute; + top: 100%; + left: 50%; + margin-left: -5px; + border-width: 5px; + border-style: solid; + border-color: #555 transparent transparent transparent; +} +.tooltip_display .tooltiptext { + opacity: 1; +} +iframe{border:none;} +#back-to-top { + color:white; + width: 50px; + height: 50px; + bottom: 40px; + right: 40px; + -webkit-box-pack: center; + -ms-flex-pack: center; + justify-content: center; + -webkit-box-align: center; + -ms-flex-align: center; + align-items: center; + z-index: 1000; + display: none; + opacity: 0.5; + transition: all 0.4s; + position: fixed; + background-color: #343a40; +} +#back-to-top:hover { + opacity: 1; + cursor: pointer; + border:1px solid white; +} +@media screen and (max-width: 800px) { + header h1.w3-jumbo{font-size:25px !important;} + header h2{font-size:15px;} +} + +@media screen and (max-width: 1200px) { + header h1.w3-jumbo{font-size:32px !important;} + header h2{font-size:17px;} +} +/* Color theme */ +.w3-theme-l5 {color:#000 !important; background-color:#f7fcff !important} +.w3-theme-l4 {color:#000 !important; background-color:#e5f5ff !important} +.w3-theme-l3 {color:#000 !important; background-color:#ccebff !important} +.w3-theme-l2 {color:#000 !important; background-color:#b3e0ff !important} +.w3-theme-l1 {color:#000 !important; background-color:#99d6ff !important} +.w3-theme-d1 {color:#000 !important; background-color:#59bdff !important} +.w3-theme-d2 {color:#fff !important; background-color:#33adff !important} +.w3-theme-d3 {color:#fff !important; background-color:#0d9eff !important} +.w3-theme-d4 {color:#fff !important; background-color:#008ae6 !important} +.w3-theme-d5 {color:#fff !important; background-color:#0073bf !important} + +.w3-theme-light {color:#000 !important; background-color:#f7fcff !important} +.w3-theme-dark {color:#fff !important; background-color:#0073bf !important} +.w3-theme-action {color:#fff !important; background-color:#0073bf !important} + +.w3-theme {color:#000 !important; background-color:#80ccff !important} +.w3-text-theme {color:#80ccff !important} +.w3-border-theme {border-color:#80ccff !important} + +.w3-hover-theme:hover {color:#fff !important; background-color:#0073bf !important} +a:hover {color:#002135 !important} +.w3-hover-border-theme:hover {border-color:#80ccff !important} \ No newline at end of file diff --git a/vendor/crowdfunding2/iframe.php b/vendor/crowdfunding2/iframe.php new file mode 100755 index 0000000..7a68f71 --- /dev/null +++ b/vendor/crowdfunding2/iframe.php @@ -0,0 +1,126 @@ +setTarget($_GET['target']); +} + +if (isset($_GET['months_to_consider'])) { // for Tipeee-like themes + + $myCrowdfunding->setMonthsToConsider($_GET['months_to_consider']); +} + +if (isset($_GET['display_button'])) { + + $myCrowdfunding->setMustDisplayButton($_GET['display_button']); +} + +if (isset($_GET['title'])) { + + $myCrowdfunding->setTitle($_GET['title']); +} + +if (isset($_GET['hide_title'])) { + + $myCrowdfunding->setMustHideTitle($_GET['hide_title']); + +} + +if (isset($_GET['display_pubkey'])) { + + $myCrowdfunding->setMustDisplayPubkey($_GET['display_pubkey']); +} + +if (isset($_GET['display_qrcode'])) { + + $myCrowdfunding->setMustDisplayQRCode(true); +} + +/* +if (isset($_GET['node'])) { + + $myCrowdfunding->addNodes(explode(' ', $_GET['node'])); +} +*/ + +if (isset($_GET['display_graph'])) { + + $myCrowdfunding->setMustDisplayGraph($_GET['display_graph']); + + if ($myCrowdfunding->getMustDisplayGraph()) { + + require_once('Chart.class.php'); + + $chart = new Chart($myCrowdfunding); + } +} + + + + + +if (!isset($_GET['theme']) or !file_exists($tplPath = THEMES_PATH . '/' . $_GET['theme'] . '.html.php')) { + + $theme = DEFAULT_THEME; + +} else { + + $theme = $_GET['theme']; +} + +$tplPath = THEMES_PATH . '/' . $theme . '.html.php'; +$confPath = THEMES_PATH . '/' . $theme . '.conf.php'; + +if (file_exists($confPath)) { + + require_once($confPath); +} +?> + + + + + <?php echo $myCrowdfunding->getTitle(); ?> + + + + '. getComputedStyles() .' + '; + } + ?> + + + + + + + + + + + diff --git a/vendor/crowdfunding2/iframes.php b/vendor/crowdfunding2/iframes.php new file mode 100755 index 0000000..adf65eb --- /dev/null +++ b/vendor/crowdfunding2/iframes.php @@ -0,0 +1,210 @@ + + + + + test + + + + ' . $myCrowdfunding->getDonorsNb() . '

'; + + break; + + case 'amountCollected': + + echo ' +

+ ' . $myCrowdfunding->getAmountCollected() . ' ' . $myCrowdfunding->printUnit() . ' +

'; + + break; + + + case 'donorsList': + + $donationsList = $myCrowdfunding->getDonationsList(); + + $min = $myCrowdfunding->getMinDonation(); + $max = $myCrowdfunding->getMaxDonation(); + + if (empty($donationsList)) { + + echo _('Pas encore de donateurs'); + + } else { + + echo '
    '; + + foreach ($donationsList as $t) { + + echo ' + +
  • + + + '. substr($t['donor'], 0, 8) .' + + + : + + + ' . ceil($t['amount']/$myCrowdfunding->getLatestUDAmount()) . ' '. $myCrowdfunding->printUnit(); + echo ' + +
  • '; + } + + echo '
'; + } + + break; + + + case 'donationsTable': + + $donationsList = $myCrowdfunding->getDonationsList(); + + if (empty($donationsList)) { + + echo _('Pas encore de dons'); + + } else { + + echo ' + + + + + + '; + + foreach ($donationsList as $t) { + + echo ' + + + + + + '; + } + } + + echo '
ClefCommentaireMontant
'. substr($t['donor'], 0, 8) . ''; + if (!empty($t['comment'])) { + + echo ''. $t['comment'] .''; + } + echo ' + + ' . ceil($t['amount']) . ' '. $myCrowdfunding->printUnit() . ' +
'; + + break; + case 'daysLeft': + break; + } + ?> + + \ No newline at end of file diff --git a/vendor/crowdfunding2/image.php b/vendor/crowdfunding2/image.php new file mode 100755 index 0000000..6d571be --- /dev/null +++ b/vendor/crowdfunding2/image.php @@ -0,0 +1,82 @@ +setTarget($_GET['target']); +} + +if (isset($_GET['title'])) { + + $myCrowdfunding->setTitle($_GET['title']); +} + +if (isset($_GET['hide_title'])) { + + $myCrowdfunding->setMustHideTitle($_GET['hide_title']); + +} + +if (isset($_GET['display_pubkey'])) { + + $myCrowdfunding->setMustDisplayPubkey($_GET['display_pubkey']); +} + +if (isset($_GET['display_qrcode'])) { + + $myCrowdfunding->setMustDisplayQRCode($_GET['display_qrcode']); +} + +/* +if (isset($_GET['node'])) { + + $myCrowdfunding->addNodes(explode(' ', $_GET['node'])); +} +*/ + +if (isset($_GET['logo'])) { + + $myCrowdfunding->setLogo($_GET['logo']); +} + + + +$theme = isset($_GET['theme']) ? $_GET['theme'] : DEFAULT_THEME; + +if (!file_exists($tplPath = THEMES_PATH . '/' . $theme . '.image.php')) { + + $tplPath = THEMES_PATH . '/' . DEFAULT_THEME . '.image.php'; + +} + +if (file_exists($confPath = THEMES_PATH . '/' . $theme . '.conf.php')) { + + require_once($confPath); +} + +ob_clean(); // Without this line, encoding problems (UTF-8 php files instead of ANSI) can cause image to not generate) +header ("Content-type: image/png"); // Comment this line if you need to debug + +include($tplPath); diff --git a/vendor/crowdfunding2/img/background.png b/vendor/crowdfunding2/img/background.png new file mode 100755 index 0000000..359fa26 Binary files /dev/null and b/vendor/crowdfunding2/img/background.png differ diff --git a/vendor/crowdfunding2/img/capture.jpg b/vendor/crowdfunding2/img/capture.jpg new file mode 100755 index 0000000..9870402 Binary files /dev/null and b/vendor/crowdfunding2/img/capture.jpg differ diff --git a/vendor/crowdfunding2/img/logos/png/cesium.png b/vendor/crowdfunding2/img/logos/png/cesium.png new file mode 100755 index 0000000..25b493d Binary files /dev/null and b/vendor/crowdfunding2/img/logos/png/cesium.png differ diff --git a/vendor/crowdfunding2/img/logos/png/duniter.png b/vendor/crowdfunding2/img/logos/png/duniter.png new file mode 100755 index 0000000..e7f40b5 Binary files /dev/null and b/vendor/crowdfunding2/img/logos/png/duniter.png differ diff --git a/vendor/crowdfunding2/img/logos/png/dunitrust.png b/vendor/crowdfunding2/img/logos/png/dunitrust.png new file mode 100755 index 0000000..230506b Binary files /dev/null and b/vendor/crowdfunding2/img/logos/png/dunitrust.png differ diff --git a/vendor/crowdfunding2/img/logos/png/junes.png b/vendor/crowdfunding2/img/logos/png/junes.png new file mode 100755 index 0000000..c101be2 Binary files /dev/null and b/vendor/crowdfunding2/img/logos/png/junes.png differ diff --git a/vendor/crowdfunding2/img/logos/png/sakia.png b/vendor/crowdfunding2/img/logos/png/sakia.png new file mode 100755 index 0000000..595e190 Binary files /dev/null and b/vendor/crowdfunding2/img/logos/png/sakia.png differ diff --git a/vendor/crowdfunding2/img/logos/png/silkaj.png b/vendor/crowdfunding2/img/logos/png/silkaj.png new file mode 100755 index 0000000..95247cf Binary files /dev/null and b/vendor/crowdfunding2/img/logos/png/silkaj.png differ diff --git a/vendor/crowdfunding2/img/logos/svg/cesium.svg b/vendor/crowdfunding2/img/logos/svg/cesium.svg new file mode 100755 index 0000000..8d8f542 --- /dev/null +++ b/vendor/crowdfunding2/img/logos/svg/cesium.svg @@ -0,0 +1,57 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/vendor/crowdfunding2/img/logos/svg/duniter.svg b/vendor/crowdfunding2/img/logos/svg/duniter.svg new file mode 100755 index 0000000..96e9974 --- /dev/null +++ b/vendor/crowdfunding2/img/logos/svg/duniter.svg @@ -0,0 +1,279 @@ + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/vendor/crowdfunding2/img/logos/svg/dunitrust.svg b/vendor/crowdfunding2/img/logos/svg/dunitrust.svg new file mode 100755 index 0000000..48cd941 --- /dev/null +++ b/vendor/crowdfunding2/img/logos/svg/dunitrust.svg @@ -0,0 +1,164 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/vendor/crowdfunding2/img/logos/svg/junes.svg b/vendor/crowdfunding2/img/logos/svg/junes.svg new file mode 100755 index 0000000..d607b73 --- /dev/null +++ b/vendor/crowdfunding2/img/logos/svg/junes.svg @@ -0,0 +1,101 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/vendor/crowdfunding2/img/logos/svg/sakia.svg b/vendor/crowdfunding2/img/logos/svg/sakia.svg new file mode 100755 index 0000000..b1d0c1f --- /dev/null +++ b/vendor/crowdfunding2/img/logos/svg/sakia.svg @@ -0,0 +1,237 @@ + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/vendor/crowdfunding2/img/logos/svg/silkaj.svg b/vendor/crowdfunding2/img/logos/svg/silkaj.svg new file mode 100755 index 0000000..8548846 --- /dev/null +++ b/vendor/crowdfunding2/img/logos/svg/silkaj.svg @@ -0,0 +1,67 @@ + + + + + +Created by potrace 1.15, written by Peter Selinger 2001-2017 + + + image/svg+xml + + + + + + + + + diff --git a/vendor/crowdfunding2/index.html b/vendor/crowdfunding2/index.html new file mode 100755 index 0000000..145afa2 --- /dev/null +++ b/vendor/crowdfunding2/index.html @@ -0,0 +1,187 @@ + + + + + G1Crowdfunding - Outils pour réussir votre financement participatif en monnaie libre + + + + + +
+

G1Crowdfunding

+
+ +

+ Des outils pour réussir + votre financement participatif + en monnaie libre G1 +

+ +

+ G1Crowdfunding est un ensemble de widgets (images et iframes) à intégrer sur votre site web +

+ +

+ Cela vous permet de mieux mettre en avant votre financement participatif en monnaie libre, + et ainsi lever plus de G1. +

+ + + +
+

+ Fonctionnalités +

+ + +
+

+ Barre de progression (originale) +

+ + +

+ iframe : +

+ +

+ Très personnalisable : avec ou sans graphique, possibilité de chosir les couleurs, etc. +

+ + + + +

+ image PNG : +

+ + les développeurs de Duniter + + +

+ image SVG : +

+ + +
+ +
+

+ Barre de progression (style Kickstarter) +

+ + +
+ + +
+

+ Stats d'un soutien régulier (style Tipeee) +

+ +

+ Calcule la moyenne des dons mensuels sur les 3 derniers mois. +

+ + +
+ +
+

+ Nuage des noms des mécènes +

+ +

+ Affiche un nuage des noms des mécènes. +

+ + +
+ +
+

+ Citations des mécènes +

+ +

+ Affiche les commentaires associés aux plus gros dons de la période choisie. +

+ + +
+ +

Faites la vôtre !

+ +

+ Vous aussi vous pouvez générer votre image ou iframe pour l'insérer sur un forum, un blog, un site web, etc. +

+ +

+ Accéder au générateur +

+
+ + + + diff --git a/vendor/crowdfunding2/lib/css/font_awesome.min.css b/vendor/crowdfunding2/lib/css/font_awesome.min.css new file mode 100755 index 0000000..e28e4ba --- /dev/null +++ b/vendor/crowdfunding2/lib/css/font_awesome.min.css @@ -0,0 +1,5 @@ +/*! + * Font Awesome Free 5.8.2 by @fontawesome - https://fontawesome.com + * License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) + */ +.fa,.fab,.fal,.far,.fas{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;display:inline-block;font-style:normal;font-variant:normal;text-rendering:auto;line-height:1}.fa-lg{font-size:1.33333em;line-height:.75em;vertical-align:-.0667em}.fa-xs{font-size:.75em}.fa-sm{font-size:.875em}.fa-1x{font-size:1em}.fa-2x{font-size:2em}.fa-3x{font-size:3em}.fa-4x{font-size:4em}.fa-5x{font-size:5em}.fa-6x{font-size:6em}.fa-7x{font-size:7em}.fa-8x{font-size:8em}.fa-9x{font-size:9em}.fa-10x{font-size:10em}.fa-fw{text-align:center;width:1.25em}.fa-ul{list-style-type:none;margin-left:2.5em;padding-left:0}.fa-ul>li{position:relative}.fa-li{left:-2em;position:absolute;text-align:center;width:2em;line-height:inherit}.fa-border{border:.08em solid #eee;border-radius:.1em;padding:.2em .25em .15em}.fa-pull-left{float:left}.fa-pull-right{float:right}.fa.fa-pull-left,.fab.fa-pull-left,.fal.fa-pull-left,.far.fa-pull-left,.fas.fa-pull-left{margin-right:.3em}.fa.fa-pull-right,.fab.fa-pull-right,.fal.fa-pull-right,.far.fa-pull-right,.fas.fa-pull-right{margin-left:.3em}.fa-spin{animation:fa-spin 2s infinite linear}.fa-pulse{animation:fa-spin 1s infinite steps(8)}@keyframes fa-spin{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}.fa-rotate-90{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=1)";transform:rotate(90deg)}.fa-rotate-180{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=2)";transform:rotate(180deg)}.fa-rotate-270{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=3)";transform:rotate(270deg)}.fa-flip-horizontal{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1)";transform:scaleX(-1)}.fa-flip-vertical{transform:scaleY(-1)}.fa-flip-both,.fa-flip-horizontal.fa-flip-vertical,.fa-flip-vertical{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)"}.fa-flip-both,.fa-flip-horizontal.fa-flip-vertical{transform:scale(-1)}:root .fa-flip-both,:root .fa-flip-horizontal,:root .fa-flip-vertical,:root .fa-rotate-90,:root .fa-rotate-180,:root .fa-rotate-270{filter:none}.fa-stack{display:inline-block;height:2em;line-height:2em;position:relative;vertical-align:middle;width:2.5em}.fa-stack-1x,.fa-stack-2x{left:0;position:absolute;text-align:center;width:100%}.fa-stack-1x{line-height:inherit}.fa-stack-2x{font-size:2em}.fa-inverse{color:#fff}.fa-500px:before{content:"\f26e"}.fa-accessible-icon:before{content:"\f368"}.fa-accusoft:before{content:"\f369"}.fa-acquisitions-incorporated:before{content:"\f6af"}.fa-ad:before{content:"\f641"}.fa-address-book:before{content:"\f2b9"}.fa-address-card:before{content:"\f2bb"}.fa-adjust:before{content:"\f042"}.fa-adn:before{content:"\f170"}.fa-adobe:before{content:"\f778"}.fa-adversal:before{content:"\f36a"}.fa-affiliatetheme:before{content:"\f36b"}.fa-air-freshener:before{content:"\f5d0"}.fa-airbnb:before{content:"\f834"}.fa-algolia:before{content:"\f36c"}.fa-align-center:before{content:"\f037"}.fa-align-justify:before{content:"\f039"}.fa-align-left:before{content:"\f036"}.fa-align-right:before{content:"\f038"}.fa-alipay:before{content:"\f642"}.fa-allergies:before{content:"\f461"}.fa-amazon:before{content:"\f270"}.fa-amazon-pay:before{content:"\f42c"}.fa-ambulance:before{content:"\f0f9"}.fa-american-sign-language-interpreting:before{content:"\f2a3"}.fa-amilia:before{content:"\f36d"}.fa-anchor:before{content:"\f13d"}.fa-android:before{content:"\f17b"}.fa-angellist:before{content:"\f209"}.fa-angle-double-down:before{content:"\f103"}.fa-angle-double-left:before{content:"\f100"}.fa-angle-double-right:before{content:"\f101"}.fa-angle-double-up:before{content:"\f102"}.fa-angle-down:before{content:"\f107"}.fa-angle-left:before{content:"\f104"}.fa-angle-right:before{content:"\f105"}.fa-angle-up:before{content:"\f106"}.fa-angry:before{content:"\f556"}.fa-angrycreative:before{content:"\f36e"}.fa-angular:before{content:"\f420"}.fa-ankh:before{content:"\f644"}.fa-app-store:before{content:"\f36f"}.fa-app-store-ios:before{content:"\f370"}.fa-apper:before{content:"\f371"}.fa-apple:before{content:"\f179"}.fa-apple-alt:before{content:"\f5d1"}.fa-apple-pay:before{content:"\f415"}.fa-archive:before{content:"\f187"}.fa-archway:before{content:"\f557"}.fa-arrow-alt-circle-down:before{content:"\f358"}.fa-arrow-alt-circle-left:before{content:"\f359"}.fa-arrow-alt-circle-right:before{content:"\f35a"}.fa-arrow-alt-circle-up:before{content:"\f35b"}.fa-arrow-circle-down:before{content:"\f0ab"}.fa-arrow-circle-left:before{content:"\f0a8"}.fa-arrow-circle-right:before{content:"\f0a9"}.fa-arrow-circle-up:before{content:"\f0aa"}.fa-arrow-down:before{content:"\f063"}.fa-arrow-left:before{content:"\f060"}.fa-arrow-right:before{content:"\f061"}.fa-arrow-up:before{content:"\f062"}.fa-arrows-alt:before{content:"\f0b2"}.fa-arrows-alt-h:before{content:"\f337"}.fa-arrows-alt-v:before{content:"\f338"}.fa-artstation:before{content:"\f77a"}.fa-assistive-listening-systems:before{content:"\f2a2"}.fa-asterisk:before{content:"\f069"}.fa-asymmetrik:before{content:"\f372"}.fa-at:before{content:"\f1fa"}.fa-atlas:before{content:"\f558"}.fa-atlassian:before{content:"\f77b"}.fa-atom:before{content:"\f5d2"}.fa-audible:before{content:"\f373"}.fa-audio-description:before{content:"\f29e"}.fa-autoprefixer:before{content:"\f41c"}.fa-avianex:before{content:"\f374"}.fa-aviato:before{content:"\f421"}.fa-award:before{content:"\f559"}.fa-aws:before{content:"\f375"}.fa-baby:before{content:"\f77c"}.fa-baby-carriage:before{content:"\f77d"}.fa-backspace:before{content:"\f55a"}.fa-backward:before{content:"\f04a"}.fa-bacon:before{content:"\f7e5"}.fa-balance-scale:before{content:"\f24e"}.fa-ban:before{content:"\f05e"}.fa-band-aid:before{content:"\f462"}.fa-bandcamp:before{content:"\f2d5"}.fa-barcode:before{content:"\f02a"}.fa-bars:before{content:"\f0c9"}.fa-baseball-ball:before{content:"\f433"}.fa-basketball-ball:before{content:"\f434"}.fa-bath:before{content:"\f2cd"}.fa-battery-empty:before{content:"\f244"}.fa-battery-full:before{content:"\f240"}.fa-battery-half:before{content:"\f242"}.fa-battery-quarter:before{content:"\f243"}.fa-battery-three-quarters:before{content:"\f241"}.fa-battle-net:before{content:"\f835"}.fa-bed:before{content:"\f236"}.fa-beer:before{content:"\f0fc"}.fa-behance:before{content:"\f1b4"}.fa-behance-square:before{content:"\f1b5"}.fa-bell:before{content:"\f0f3"}.fa-bell-slash:before{content:"\f1f6"}.fa-bezier-curve:before{content:"\f55b"}.fa-bible:before{content:"\f647"}.fa-bicycle:before{content:"\f206"}.fa-bimobject:before{content:"\f378"}.fa-binoculars:before{content:"\f1e5"}.fa-biohazard:before{content:"\f780"}.fa-birthday-cake:before{content:"\f1fd"}.fa-bitbucket:before{content:"\f171"}.fa-bitcoin:before{content:"\f379"}.fa-bity:before{content:"\f37a"}.fa-black-tie:before{content:"\f27e"}.fa-blackberry:before{content:"\f37b"}.fa-blender:before{content:"\f517"}.fa-blender-phone:before{content:"\f6b6"}.fa-blind:before{content:"\f29d"}.fa-blog:before{content:"\f781"}.fa-blogger:before{content:"\f37c"}.fa-blogger-b:before{content:"\f37d"}.fa-bluetooth:before{content:"\f293"}.fa-bluetooth-b:before{content:"\f294"}.fa-bold:before{content:"\f032"}.fa-bolt:before{content:"\f0e7"}.fa-bomb:before{content:"\f1e2"}.fa-bone:before{content:"\f5d7"}.fa-bong:before{content:"\f55c"}.fa-book:before{content:"\f02d"}.fa-book-dead:before{content:"\f6b7"}.fa-book-medical:before{content:"\f7e6"}.fa-book-open:before{content:"\f518"}.fa-book-reader:before{content:"\f5da"}.fa-bookmark:before{content:"\f02e"}.fa-bootstrap:before{content:"\f836"}.fa-bowling-ball:before{content:"\f436"}.fa-box:before{content:"\f466"}.fa-box-open:before{content:"\f49e"}.fa-boxes:before{content:"\f468"}.fa-braille:before{content:"\f2a1"}.fa-brain:before{content:"\f5dc"}.fa-bread-slice:before{content:"\f7ec"}.fa-briefcase:before{content:"\f0b1"}.fa-briefcase-medical:before{content:"\f469"}.fa-broadcast-tower:before{content:"\f519"}.fa-broom:before{content:"\f51a"}.fa-brush:before{content:"\f55d"}.fa-btc:before{content:"\f15a"}.fa-buffer:before{content:"\f837"}.fa-bug:before{content:"\f188"}.fa-building:before{content:"\f1ad"}.fa-bullhorn:before{content:"\f0a1"}.fa-bullseye:before{content:"\f140"}.fa-burn:before{content:"\f46a"}.fa-buromobelexperte:before{content:"\f37f"}.fa-bus:before{content:"\f207"}.fa-bus-alt:before{content:"\f55e"}.fa-business-time:before{content:"\f64a"}.fa-buysellads:before{content:"\f20d"}.fa-calculator:before{content:"\f1ec"}.fa-calendar:before{content:"\f133"}.fa-calendar-alt:before{content:"\f073"}.fa-calendar-check:before{content:"\f274"}.fa-calendar-day:before{content:"\f783"}.fa-calendar-minus:before{content:"\f272"}.fa-calendar-plus:before{content:"\f271"}.fa-calendar-times:before{content:"\f273"}.fa-calendar-week:before{content:"\f784"}.fa-camera:before{content:"\f030"}.fa-camera-retro:before{content:"\f083"}.fa-campground:before{content:"\f6bb"}.fa-canadian-maple-leaf:before{content:"\f785"}.fa-candy-cane:before{content:"\f786"}.fa-cannabis:before{content:"\f55f"}.fa-capsules:before{content:"\f46b"}.fa-car:before{content:"\f1b9"}.fa-car-alt:before{content:"\f5de"}.fa-car-battery:before{content:"\f5df"}.fa-car-crash:before{content:"\f5e1"}.fa-car-side:before{content:"\f5e4"}.fa-caret-down:before{content:"\f0d7"}.fa-caret-left:before{content:"\f0d9"}.fa-caret-right:before{content:"\f0da"}.fa-caret-square-down:before{content:"\f150"}.fa-caret-square-left:before{content:"\f191"}.fa-caret-square-right:before{content:"\f152"}.fa-caret-square-up:before{content:"\f151"}.fa-caret-up:before{content:"\f0d8"}.fa-carrot:before{content:"\f787"}.fa-cart-arrow-down:before{content:"\f218"}.fa-cart-plus:before{content:"\f217"}.fa-cash-register:before{content:"\f788"}.fa-cat:before{content:"\f6be"}.fa-cc-amazon-pay:before{content:"\f42d"}.fa-cc-amex:before{content:"\f1f3"}.fa-cc-apple-pay:before{content:"\f416"}.fa-cc-diners-club:before{content:"\f24c"}.fa-cc-discover:before{content:"\f1f2"}.fa-cc-jcb:before{content:"\f24b"}.fa-cc-mastercard:before{content:"\f1f1"}.fa-cc-paypal:before{content:"\f1f4"}.fa-cc-stripe:before{content:"\f1f5"}.fa-cc-visa:before{content:"\f1f0"}.fa-centercode:before{content:"\f380"}.fa-centos:before{content:"\f789"}.fa-certificate:before{content:"\f0a3"}.fa-chair:before{content:"\f6c0"}.fa-chalkboard:before{content:"\f51b"}.fa-chalkboard-teacher:before{content:"\f51c"}.fa-charging-station:before{content:"\f5e7"}.fa-chart-area:before{content:"\f1fe"}.fa-chart-bar:before{content:"\f080"}.fa-chart-line:before{content:"\f201"}.fa-chart-pie:before{content:"\f200"}.fa-check:before{content:"\f00c"}.fa-check-circle:before{content:"\f058"}.fa-check-double:before{content:"\f560"}.fa-check-square:before{content:"\f14a"}.fa-cheese:before{content:"\f7ef"}.fa-chess:before{content:"\f439"}.fa-chess-bishop:before{content:"\f43a"}.fa-chess-board:before{content:"\f43c"}.fa-chess-king:before{content:"\f43f"}.fa-chess-knight:before{content:"\f441"}.fa-chess-pawn:before{content:"\f443"}.fa-chess-queen:before{content:"\f445"}.fa-chess-rook:before{content:"\f447"}.fa-chevron-circle-down:before{content:"\f13a"}.fa-chevron-circle-left:before{content:"\f137"}.fa-chevron-circle-right:before{content:"\f138"}.fa-chevron-circle-up:before{content:"\f139"}.fa-chevron-down:before{content:"\f078"}.fa-chevron-left:before{content:"\f053"}.fa-chevron-right:before{content:"\f054"}.fa-chevron-up:before{content:"\f077"}.fa-child:before{content:"\f1ae"}.fa-chrome:before{content:"\f268"}.fa-chromecast:before{content:"\f838"}.fa-church:before{content:"\f51d"}.fa-circle:before{content:"\f111"}.fa-circle-notch:before{content:"\f1ce"}.fa-city:before{content:"\f64f"}.fa-clinic-medical:before{content:"\f7f2"}.fa-clipboard:before{content:"\f328"}.fa-clipboard-check:before{content:"\f46c"}.fa-clipboard-list:before{content:"\f46d"}.fa-clock:before{content:"\f017"}.fa-clone:before{content:"\f24d"}.fa-closed-captioning:before{content:"\f20a"}.fa-cloud:before{content:"\f0c2"}.fa-cloud-download-alt:before{content:"\f381"}.fa-cloud-meatball:before{content:"\f73b"}.fa-cloud-moon:before{content:"\f6c3"}.fa-cloud-moon-rain:before{content:"\f73c"}.fa-cloud-rain:before{content:"\f73d"}.fa-cloud-showers-heavy:before{content:"\f740"}.fa-cloud-sun:before{content:"\f6c4"}.fa-cloud-sun-rain:before{content:"\f743"}.fa-cloud-upload-alt:before{content:"\f382"}.fa-cloudscale:before{content:"\f383"}.fa-cloudsmith:before{content:"\f384"}.fa-cloudversify:before{content:"\f385"}.fa-cocktail:before{content:"\f561"}.fa-code:before{content:"\f121"}.fa-code-branch:before{content:"\f126"}.fa-codepen:before{content:"\f1cb"}.fa-codiepie:before{content:"\f284"}.fa-coffee:before{content:"\f0f4"}.fa-cog:before{content:"\f013"}.fa-cogs:before{content:"\f085"}.fa-coins:before{content:"\f51e"}.fa-columns:before{content:"\f0db"}.fa-comment:before{content:"\f075"}.fa-comment-alt:before{content:"\f27a"}.fa-comment-dollar:before{content:"\f651"}.fa-comment-dots:before{content:"\f4ad"}.fa-comment-medical:before{content:"\f7f5"}.fa-comment-slash:before{content:"\f4b3"}.fa-comments:before{content:"\f086"}.fa-comments-dollar:before{content:"\f653"}.fa-compact-disc:before{content:"\f51f"}.fa-compass:before{content:"\f14e"}.fa-compress:before{content:"\f066"}.fa-compress-arrows-alt:before{content:"\f78c"}.fa-concierge-bell:before{content:"\f562"}.fa-confluence:before{content:"\f78d"}.fa-connectdevelop:before{content:"\f20e"}.fa-contao:before{content:"\f26d"}.fa-cookie:before{content:"\f563"}.fa-cookie-bite:before{content:"\f564"}.fa-copy:before{content:"\f0c5"}.fa-copyright:before{content:"\f1f9"}.fa-couch:before{content:"\f4b8"}.fa-cpanel:before{content:"\f388"}.fa-creative-commons:before{content:"\f25e"}.fa-creative-commons-by:before{content:"\f4e7"}.fa-creative-commons-nc:before{content:"\f4e8"}.fa-creative-commons-nc-eu:before{content:"\f4e9"}.fa-creative-commons-nc-jp:before{content:"\f4ea"}.fa-creative-commons-nd:before{content:"\f4eb"}.fa-creative-commons-pd:before{content:"\f4ec"}.fa-creative-commons-pd-alt:before{content:"\f4ed"}.fa-creative-commons-remix:before{content:"\f4ee"}.fa-creative-commons-sa:before{content:"\f4ef"}.fa-creative-commons-sampling:before{content:"\f4f0"}.fa-creative-commons-sampling-plus:before{content:"\f4f1"}.fa-creative-commons-share:before{content:"\f4f2"}.fa-creative-commons-zero:before{content:"\f4f3"}.fa-credit-card:before{content:"\f09d"}.fa-critical-role:before{content:"\f6c9"}.fa-crop:before{content:"\f125"}.fa-crop-alt:before{content:"\f565"}.fa-cross:before{content:"\f654"}.fa-crosshairs:before{content:"\f05b"}.fa-crow:before{content:"\f520"}.fa-crown:before{content:"\f521"}.fa-crutch:before{content:"\f7f7"}.fa-css3:before{content:"\f13c"}.fa-css3-alt:before{content:"\f38b"}.fa-cube:before{content:"\f1b2"}.fa-cubes:before{content:"\f1b3"}.fa-cut:before{content:"\f0c4"}.fa-cuttlefish:before{content:"\f38c"}.fa-d-and-d:before{content:"\f38d"}.fa-d-and-d-beyond:before{content:"\f6ca"}.fa-dashcube:before{content:"\f210"}.fa-database:before{content:"\f1c0"}.fa-deaf:before{content:"\f2a4"}.fa-delicious:before{content:"\f1a5"}.fa-democrat:before{content:"\f747"}.fa-deploydog:before{content:"\f38e"}.fa-deskpro:before{content:"\f38f"}.fa-desktop:before{content:"\f108"}.fa-dev:before{content:"\f6cc"}.fa-deviantart:before{content:"\f1bd"}.fa-dharmachakra:before{content:"\f655"}.fa-dhl:before{content:"\f790"}.fa-diagnoses:before{content:"\f470"}.fa-diaspora:before{content:"\f791"}.fa-dice:before{content:"\f522"}.fa-dice-d20:before{content:"\f6cf"}.fa-dice-d6:before{content:"\f6d1"}.fa-dice-five:before{content:"\f523"}.fa-dice-four:before{content:"\f524"}.fa-dice-one:before{content:"\f525"}.fa-dice-six:before{content:"\f526"}.fa-dice-three:before{content:"\f527"}.fa-dice-two:before{content:"\f528"}.fa-digg:before{content:"\f1a6"}.fa-digital-ocean:before{content:"\f391"}.fa-digital-tachograph:before{content:"\f566"}.fa-directions:before{content:"\f5eb"}.fa-discord:before{content:"\f392"}.fa-discourse:before{content:"\f393"}.fa-divide:before{content:"\f529"}.fa-dizzy:before{content:"\f567"}.fa-dna:before{content:"\f471"}.fa-dochub:before{content:"\f394"}.fa-docker:before{content:"\f395"}.fa-dog:before{content:"\f6d3"}.fa-dollar-sign:before{content:"\f155"}.fa-dolly:before{content:"\f472"}.fa-dolly-flatbed:before{content:"\f474"}.fa-donate:before{content:"\f4b9"}.fa-door-closed:before{content:"\f52a"}.fa-door-open:before{content:"\f52b"}.fa-dot-circle:before{content:"\f192"}.fa-dove:before{content:"\f4ba"}.fa-download:before{content:"\f019"}.fa-draft2digital:before{content:"\f396"}.fa-drafting-compass:before{content:"\f568"}.fa-dragon:before{content:"\f6d5"}.fa-draw-polygon:before{content:"\f5ee"}.fa-dribbble:before{content:"\f17d"}.fa-dribbble-square:before{content:"\f397"}.fa-dropbox:before{content:"\f16b"}.fa-drum:before{content:"\f569"}.fa-drum-steelpan:before{content:"\f56a"}.fa-drumstick-bite:before{content:"\f6d7"}.fa-drupal:before{content:"\f1a9"}.fa-dumbbell:before{content:"\f44b"}.fa-dumpster:before{content:"\f793"}.fa-dumpster-fire:before{content:"\f794"}.fa-dungeon:before{content:"\f6d9"}.fa-dyalog:before{content:"\f399"}.fa-earlybirds:before{content:"\f39a"}.fa-ebay:before{content:"\f4f4"}.fa-edge:before{content:"\f282"}.fa-edit:before{content:"\f044"}.fa-egg:before{content:"\f7fb"}.fa-eject:before{content:"\f052"}.fa-elementor:before{content:"\f430"}.fa-ellipsis-h:before{content:"\f141"}.fa-ellipsis-v:before{content:"\f142"}.fa-ello:before{content:"\f5f1"}.fa-ember:before{content:"\f423"}.fa-empire:before{content:"\f1d1"}.fa-envelope:before{content:"\f0e0"}.fa-envelope-open:before{content:"\f2b6"}.fa-envelope-open-text:before{content:"\f658"}.fa-envelope-square:before{content:"\f199"}.fa-envira:before{content:"\f299"}.fa-equals:before{content:"\f52c"}.fa-eraser:before{content:"\f12d"}.fa-erlang:before{content:"\f39d"}.fa-ethereum:before{content:"\f42e"}.fa-ethernet:before{content:"\f796"}.fa-etsy:before{content:"\f2d7"}.fa-euro-sign:before{content:"\f153"}.fa-evernote:before{content:"\f839"}.fa-exchange-alt:before{content:"\f362"}.fa-exclamation:before{content:"\f12a"}.fa-exclamation-circle:before{content:"\f06a"}.fa-exclamation-triangle:before{content:"\f071"}.fa-expand:before{content:"\f065"}.fa-expand-arrows-alt:before{content:"\f31e"}.fa-expeditedssl:before{content:"\f23e"}.fa-external-link-alt:before{content:"\f35d"}.fa-external-link-square-alt:before{content:"\f360"}.fa-eye:before{content:"\f06e"}.fa-eye-dropper:before{content:"\f1fb"}.fa-eye-slash:before{content:"\f070"}.fa-facebook:before{content:"\f09a"}.fa-facebook-f:before{content:"\f39e"}.fa-facebook-messenger:before{content:"\f39f"}.fa-facebook-square:before{content:"\f082"}.fa-fantasy-flight-games:before{content:"\f6dc"}.fa-fast-backward:before{content:"\f049"}.fa-fast-forward:before{content:"\f050"}.fa-fax:before{content:"\f1ac"}.fa-feather:before{content:"\f52d"}.fa-feather-alt:before{content:"\f56b"}.fa-fedex:before{content:"\f797"}.fa-fedora:before{content:"\f798"}.fa-female:before{content:"\f182"}.fa-fighter-jet:before{content:"\f0fb"}.fa-figma:before{content:"\f799"}.fa-file:before{content:"\f15b"}.fa-file-alt:before{content:"\f15c"}.fa-file-archive:before{content:"\f1c6"}.fa-file-audio:before{content:"\f1c7"}.fa-file-code:before{content:"\f1c9"}.fa-file-contract:before{content:"\f56c"}.fa-file-csv:before{content:"\f6dd"}.fa-file-download:before{content:"\f56d"}.fa-file-excel:before{content:"\f1c3"}.fa-file-export:before{content:"\f56e"}.fa-file-image:before{content:"\f1c5"}.fa-file-import:before{content:"\f56f"}.fa-file-invoice:before{content:"\f570"}.fa-file-invoice-dollar:before{content:"\f571"}.fa-file-medical:before{content:"\f477"}.fa-file-medical-alt:before{content:"\f478"}.fa-file-pdf:before{content:"\f1c1"}.fa-file-powerpoint:before{content:"\f1c4"}.fa-file-prescription:before{content:"\f572"}.fa-file-signature:before{content:"\f573"}.fa-file-upload:before{content:"\f574"}.fa-file-video:before{content:"\f1c8"}.fa-file-word:before{content:"\f1c2"}.fa-fill:before{content:"\f575"}.fa-fill-drip:before{content:"\f576"}.fa-film:before{content:"\f008"}.fa-filter:before{content:"\f0b0"}.fa-fingerprint:before{content:"\f577"}.fa-fire:before{content:"\f06d"}.fa-fire-alt:before{content:"\f7e4"}.fa-fire-extinguisher:before{content:"\f134"}.fa-firefox:before{content:"\f269"}.fa-first-aid:before{content:"\f479"}.fa-first-order:before{content:"\f2b0"}.fa-first-order-alt:before{content:"\f50a"}.fa-firstdraft:before{content:"\f3a1"}.fa-fish:before{content:"\f578"}.fa-fist-raised:before{content:"\f6de"}.fa-flag:before{content:"\f024"}.fa-flag-checkered:before{content:"\f11e"}.fa-flag-usa:before{content:"\f74d"}.fa-flask:before{content:"\f0c3"}.fa-flickr:before{content:"\f16e"}.fa-flipboard:before{content:"\f44d"}.fa-flushed:before{content:"\f579"}.fa-fly:before{content:"\f417"}.fa-folder:before{content:"\f07b"}.fa-folder-minus:before{content:"\f65d"}.fa-folder-open:before{content:"\f07c"}.fa-folder-plus:before{content:"\f65e"}.fa-font:before{content:"\f031"}.fa-font-awesome:before{content:"\f2b4"}.fa-font-awesome-alt:before{content:"\f35c"}.fa-font-awesome-flag:before{content:"\f425"}.fa-font-awesome-logo-full:before{content:"\f4e6"}.fa-fonticons:before{content:"\f280"}.fa-fonticons-fi:before{content:"\f3a2"}.fa-football-ball:before{content:"\f44e"}.fa-fort-awesome:before{content:"\f286"}.fa-fort-awesome-alt:before{content:"\f3a3"}.fa-forumbee:before{content:"\f211"}.fa-forward:before{content:"\f04e"}.fa-foursquare:before{content:"\f180"}.fa-free-code-camp:before{content:"\f2c5"}.fa-freebsd:before{content:"\f3a4"}.fa-frog:before{content:"\f52e"}.fa-frown:before{content:"\f119"}.fa-frown-open:before{content:"\f57a"}.fa-fulcrum:before{content:"\f50b"}.fa-funnel-dollar:before{content:"\f662"}.fa-futbol:before{content:"\f1e3"}.fa-galactic-republic:before{content:"\f50c"}.fa-galactic-senate:before{content:"\f50d"}.fa-gamepad:before{content:"\f11b"}.fa-gas-pump:before{content:"\f52f"}.fa-gavel:before{content:"\f0e3"}.fa-gem:before{content:"\f3a5"}.fa-genderless:before{content:"\f22d"}.fa-get-pocket:before{content:"\f265"}.fa-gg:before{content:"\f260"}.fa-gg-circle:before{content:"\f261"}.fa-ghost:before{content:"\f6e2"}.fa-gift:before{content:"\f06b"}.fa-gifts:before{content:"\f79c"}.fa-git:before{content:"\f1d3"}.fa-git-alt:before{content:"\f841"}.fa-git-square:before{content:"\f1d2"}.fa-github:before{content:"\f09b"}.fa-github-alt:before{content:"\f113"}.fa-github-square:before{content:"\f092"}.fa-gitkraken:before{content:"\f3a6"}.fa-gitlab:before{content:"\f296"}.fa-gitter:before{content:"\f426"}.fa-glass-cheers:before{content:"\f79f"}.fa-glass-martini:before{content:"\f000"}.fa-glass-martini-alt:before{content:"\f57b"}.fa-glass-whiskey:before{content:"\f7a0"}.fa-glasses:before{content:"\f530"}.fa-glide:before{content:"\f2a5"}.fa-glide-g:before{content:"\f2a6"}.fa-globe:before{content:"\f0ac"}.fa-globe-africa:before{content:"\f57c"}.fa-globe-americas:before{content:"\f57d"}.fa-globe-asia:before{content:"\f57e"}.fa-globe-europe:before{content:"\f7a2"}.fa-gofore:before{content:"\f3a7"}.fa-golf-ball:before{content:"\f450"}.fa-goodreads:before{content:"\f3a8"}.fa-goodreads-g:before{content:"\f3a9"}.fa-google:before{content:"\f1a0"}.fa-google-drive:before{content:"\f3aa"}.fa-google-play:before{content:"\f3ab"}.fa-google-plus:before{content:"\f2b3"}.fa-google-plus-g:before{content:"\f0d5"}.fa-google-plus-square:before{content:"\f0d4"}.fa-google-wallet:before{content:"\f1ee"}.fa-gopuram:before{content:"\f664"}.fa-graduation-cap:before{content:"\f19d"}.fa-gratipay:before{content:"\f184"}.fa-grav:before{content:"\f2d6"}.fa-greater-than:before{content:"\f531"}.fa-greater-than-equal:before{content:"\f532"}.fa-grimace:before{content:"\f57f"}.fa-grin:before{content:"\f580"}.fa-grin-alt:before{content:"\f581"}.fa-grin-beam:before{content:"\f582"}.fa-grin-beam-sweat:before{content:"\f583"}.fa-grin-hearts:before{content:"\f584"}.fa-grin-squint:before{content:"\f585"}.fa-grin-squint-tears:before{content:"\f586"}.fa-grin-stars:before{content:"\f587"}.fa-grin-tears:before{content:"\f588"}.fa-grin-tongue:before{content:"\f589"}.fa-grin-tongue-squint:before{content:"\f58a"}.fa-grin-tongue-wink:before{content:"\f58b"}.fa-grin-wink:before{content:"\f58c"}.fa-grip-horizontal:before{content:"\f58d"}.fa-grip-lines:before{content:"\f7a4"}.fa-grip-lines-vertical:before{content:"\f7a5"}.fa-grip-vertical:before{content:"\f58e"}.fa-gripfire:before{content:"\f3ac"}.fa-grunt:before{content:"\f3ad"}.fa-guitar:before{content:"\f7a6"}.fa-gulp:before{content:"\f3ae"}.fa-h-square:before{content:"\f0fd"}.fa-hacker-news:before{content:"\f1d4"}.fa-hacker-news-square:before{content:"\f3af"}.fa-hackerrank:before{content:"\f5f7"}.fa-hamburger:before{content:"\f805"}.fa-hammer:before{content:"\f6e3"}.fa-hamsa:before{content:"\f665"}.fa-hand-holding:before{content:"\f4bd"}.fa-hand-holding-heart:before{content:"\f4be"}.fa-hand-holding-usd:before{content:"\f4c0"}.fa-hand-lizard:before{content:"\f258"}.fa-hand-middle-finger:before{content:"\f806"}.fa-hand-paper:before{content:"\f256"}.fa-hand-peace:before{content:"\f25b"}.fa-hand-point-down:before{content:"\f0a7"}.fa-hand-point-left:before{content:"\f0a5"}.fa-hand-point-right:before{content:"\f0a4"}.fa-hand-point-up:before{content:"\f0a6"}.fa-hand-pointer:before{content:"\f25a"}.fa-hand-rock:before{content:"\f255"}.fa-hand-scissors:before{content:"\f257"}.fa-hand-spock:before{content:"\f259"}.fa-hands:before{content:"\f4c2"}.fa-hands-helping:before{content:"\f4c4"}.fa-handshake:before{content:"\f2b5"}.fa-hanukiah:before{content:"\f6e6"}.fa-hard-hat:before{content:"\f807"}.fa-hashtag:before{content:"\f292"}.fa-hat-wizard:before{content:"\f6e8"}.fa-haykal:before{content:"\f666"}.fa-hdd:before{content:"\f0a0"}.fa-heading:before{content:"\f1dc"}.fa-headphones:before{content:"\f025"}.fa-headphones-alt:before{content:"\f58f"}.fa-headset:before{content:"\f590"}.fa-heart:before{content:"\f004"}.fa-heart-broken:before{content:"\f7a9"}.fa-heartbeat:before{content:"\f21e"}.fa-helicopter:before{content:"\f533"}.fa-highlighter:before{content:"\f591"}.fa-hiking:before{content:"\f6ec"}.fa-hippo:before{content:"\f6ed"}.fa-hips:before{content:"\f452"}.fa-hire-a-helper:before{content:"\f3b0"}.fa-history:before{content:"\f1da"}.fa-hockey-puck:before{content:"\f453"}.fa-holly-berry:before{content:"\f7aa"}.fa-home:before{content:"\f015"}.fa-hooli:before{content:"\f427"}.fa-hornbill:before{content:"\f592"}.fa-horse:before{content:"\f6f0"}.fa-horse-head:before{content:"\f7ab"}.fa-hospital:before{content:"\f0f8"}.fa-hospital-alt:before{content:"\f47d"}.fa-hospital-symbol:before{content:"\f47e"}.fa-hot-tub:before{content:"\f593"}.fa-hotdog:before{content:"\f80f"}.fa-hotel:before{content:"\f594"}.fa-hotjar:before{content:"\f3b1"}.fa-hourglass:before{content:"\f254"}.fa-hourglass-end:before{content:"\f253"}.fa-hourglass-half:before{content:"\f252"}.fa-hourglass-start:before{content:"\f251"}.fa-house-damage:before{content:"\f6f1"}.fa-houzz:before{content:"\f27c"}.fa-hryvnia:before{content:"\f6f2"}.fa-html5:before{content:"\f13b"}.fa-hubspot:before{content:"\f3b2"}.fa-i-cursor:before{content:"\f246"}.fa-ice-cream:before{content:"\f810"}.fa-icicles:before{content:"\f7ad"}.fa-id-badge:before{content:"\f2c1"}.fa-id-card:before{content:"\f2c2"}.fa-id-card-alt:before{content:"\f47f"}.fa-igloo:before{content:"\f7ae"}.fa-image:before{content:"\f03e"}.fa-images:before{content:"\f302"}.fa-imdb:before{content:"\f2d8"}.fa-inbox:before{content:"\f01c"}.fa-indent:before{content:"\f03c"}.fa-industry:before{content:"\f275"}.fa-infinity:before{content:"\f534"}.fa-info:before{content:"\f129"}.fa-info-circle:before{content:"\f05a"}.fa-instagram:before{content:"\f16d"}.fa-intercom:before{content:"\f7af"}.fa-internet-explorer:before{content:"\f26b"}.fa-invision:before{content:"\f7b0"}.fa-ioxhost:before{content:"\f208"}.fa-italic:before{content:"\f033"}.fa-itch-io:before{content:"\f83a"}.fa-itunes:before{content:"\f3b4"}.fa-itunes-note:before{content:"\f3b5"}.fa-java:before{content:"\f4e4"}.fa-jedi:before{content:"\f669"}.fa-jedi-order:before{content:"\f50e"}.fa-jenkins:before{content:"\f3b6"}.fa-jira:before{content:"\f7b1"}.fa-joget:before{content:"\f3b7"}.fa-joint:before{content:"\f595"}.fa-joomla:before{content:"\f1aa"}.fa-journal-whills:before{content:"\f66a"}.fa-js:before{content:"\f3b8"}.fa-js-square:before{content:"\f3b9"}.fa-jsfiddle:before{content:"\f1cc"}.fa-kaaba:before{content:"\f66b"}.fa-kaggle:before{content:"\f5fa"}.fa-key:before{content:"\f084"}.fa-keybase:before{content:"\f4f5"}.fa-keyboard:before{content:"\f11c"}.fa-keycdn:before{content:"\f3ba"}.fa-khanda:before{content:"\f66d"}.fa-kickstarter:before{content:"\f3bb"}.fa-kickstarter-k:before{content:"\f3bc"}.fa-kiss:before{content:"\f596"}.fa-kiss-beam:before{content:"\f597"}.fa-kiss-wink-heart:before{content:"\f598"}.fa-kiwi-bird:before{content:"\f535"}.fa-korvue:before{content:"\f42f"}.fa-landmark:before{content:"\f66f"}.fa-language:before{content:"\f1ab"}.fa-laptop:before{content:"\f109"}.fa-laptop-code:before{content:"\f5fc"}.fa-laptop-medical:before{content:"\f812"}.fa-laravel:before{content:"\f3bd"}.fa-lastfm:before{content:"\f202"}.fa-lastfm-square:before{content:"\f203"}.fa-laugh:before{content:"\f599"}.fa-laugh-beam:before{content:"\f59a"}.fa-laugh-squint:before{content:"\f59b"}.fa-laugh-wink:before{content:"\f59c"}.fa-layer-group:before{content:"\f5fd"}.fa-leaf:before{content:"\f06c"}.fa-leanpub:before{content:"\f212"}.fa-lemon:before{content:"\f094"}.fa-less:before{content:"\f41d"}.fa-less-than:before{content:"\f536"}.fa-less-than-equal:before{content:"\f537"}.fa-level-down-alt:before{content:"\f3be"}.fa-level-up-alt:before{content:"\f3bf"}.fa-life-ring:before{content:"\f1cd"}.fa-lightbulb:before{content:"\f0eb"}.fa-line:before{content:"\f3c0"}.fa-link:before{content:"\f0c1"}.fa-linkedin:before{content:"\f08c"}.fa-linkedin-in:before{content:"\f0e1"}.fa-linode:before{content:"\f2b8"}.fa-linux:before{content:"\f17c"}.fa-lira-sign:before{content:"\f195"}.fa-list:before{content:"\f03a"}.fa-list-alt:before{content:"\f022"}.fa-list-ol:before{content:"\f0cb"}.fa-list-ul:before{content:"\f0ca"}.fa-location-arrow:before{content:"\f124"}.fa-lock:before{content:"\f023"}.fa-lock-open:before{content:"\f3c1"}.fa-long-arrow-alt-down:before{content:"\f309"}.fa-long-arrow-alt-left:before{content:"\f30a"}.fa-long-arrow-alt-right:before{content:"\f30b"}.fa-long-arrow-alt-up:before{content:"\f30c"}.fa-low-vision:before{content:"\f2a8"}.fa-luggage-cart:before{content:"\f59d"}.fa-lyft:before{content:"\f3c3"}.fa-magento:before{content:"\f3c4"}.fa-magic:before{content:"\f0d0"}.fa-magnet:before{content:"\f076"}.fa-mail-bulk:before{content:"\f674"}.fa-mailchimp:before{content:"\f59e"}.fa-male:before{content:"\f183"}.fa-mandalorian:before{content:"\f50f"}.fa-map:before{content:"\f279"}.fa-map-marked:before{content:"\f59f"}.fa-map-marked-alt:before{content:"\f5a0"}.fa-map-marker:before{content:"\f041"}.fa-map-marker-alt:before{content:"\f3c5"}.fa-map-pin:before{content:"\f276"}.fa-map-signs:before{content:"\f277"}.fa-markdown:before{content:"\f60f"}.fa-marker:before{content:"\f5a1"}.fa-mars:before{content:"\f222"}.fa-mars-double:before{content:"\f227"}.fa-mars-stroke:before{content:"\f229"}.fa-mars-stroke-h:before{content:"\f22b"}.fa-mars-stroke-v:before{content:"\f22a"}.fa-mask:before{content:"\f6fa"}.fa-mastodon:before{content:"\f4f6"}.fa-maxcdn:before{content:"\f136"}.fa-medal:before{content:"\f5a2"}.fa-medapps:before{content:"\f3c6"}.fa-medium:before{content:"\f23a"}.fa-medium-m:before{content:"\f3c7"}.fa-medkit:before{content:"\f0fa"}.fa-medrt:before{content:"\f3c8"}.fa-meetup:before{content:"\f2e0"}.fa-megaport:before{content:"\f5a3"}.fa-meh:before{content:"\f11a"}.fa-meh-blank:before{content:"\f5a4"}.fa-meh-rolling-eyes:before{content:"\f5a5"}.fa-memory:before{content:"\f538"}.fa-mendeley:before{content:"\f7b3"}.fa-menorah:before{content:"\f676"}.fa-mercury:before{content:"\f223"}.fa-meteor:before{content:"\f753"}.fa-microchip:before{content:"\f2db"}.fa-microphone:before{content:"\f130"}.fa-microphone-alt:before{content:"\f3c9"}.fa-microphone-alt-slash:before{content:"\f539"}.fa-microphone-slash:before{content:"\f131"}.fa-microscope:before{content:"\f610"}.fa-microsoft:before{content:"\f3ca"}.fa-minus:before{content:"\f068"}.fa-minus-circle:before{content:"\f056"}.fa-minus-square:before{content:"\f146"}.fa-mitten:before{content:"\f7b5"}.fa-mix:before{content:"\f3cb"}.fa-mixcloud:before{content:"\f289"}.fa-mizuni:before{content:"\f3cc"}.fa-mobile:before{content:"\f10b"}.fa-mobile-alt:before{content:"\f3cd"}.fa-modx:before{content:"\f285"}.fa-monero:before{content:"\f3d0"}.fa-money-bill:before{content:"\f0d6"}.fa-money-bill-alt:before{content:"\f3d1"}.fa-money-bill-wave:before{content:"\f53a"}.fa-money-bill-wave-alt:before{content:"\f53b"}.fa-money-check:before{content:"\f53c"}.fa-money-check-alt:before{content:"\f53d"}.fa-monument:before{content:"\f5a6"}.fa-moon:before{content:"\f186"}.fa-mortar-pestle:before{content:"\f5a7"}.fa-mosque:before{content:"\f678"}.fa-motorcycle:before{content:"\f21c"}.fa-mountain:before{content:"\f6fc"}.fa-mouse-pointer:before{content:"\f245"}.fa-mug-hot:before{content:"\f7b6"}.fa-music:before{content:"\f001"}.fa-napster:before{content:"\f3d2"}.fa-neos:before{content:"\f612"}.fa-network-wired:before{content:"\f6ff"}.fa-neuter:before{content:"\f22c"}.fa-newspaper:before{content:"\f1ea"}.fa-nimblr:before{content:"\f5a8"}.fa-nintendo-switch:before{content:"\f418"}.fa-node:before{content:"\f419"}.fa-node-js:before{content:"\f3d3"}.fa-not-equal:before{content:"\f53e"}.fa-notes-medical:before{content:"\f481"}.fa-npm:before{content:"\f3d4"}.fa-ns8:before{content:"\f3d5"}.fa-nutritionix:before{content:"\f3d6"}.fa-object-group:before{content:"\f247"}.fa-object-ungroup:before{content:"\f248"}.fa-odnoklassniki:before{content:"\f263"}.fa-odnoklassniki-square:before{content:"\f264"}.fa-oil-can:before{content:"\f613"}.fa-old-republic:before{content:"\f510"}.fa-om:before{content:"\f679"}.fa-opencart:before{content:"\f23d"}.fa-openid:before{content:"\f19b"}.fa-opera:before{content:"\f26a"}.fa-optin-monster:before{content:"\f23c"}.fa-osi:before{content:"\f41a"}.fa-otter:before{content:"\f700"}.fa-outdent:before{content:"\f03b"}.fa-page4:before{content:"\f3d7"}.fa-pagelines:before{content:"\f18c"}.fa-pager:before{content:"\f815"}.fa-paint-brush:before{content:"\f1fc"}.fa-paint-roller:before{content:"\f5aa"}.fa-palette:before{content:"\f53f"}.fa-palfed:before{content:"\f3d8"}.fa-pallet:before{content:"\f482"}.fa-paper-plane:before{content:"\f1d8"}.fa-paperclip:before{content:"\f0c6"}.fa-parachute-box:before{content:"\f4cd"}.fa-paragraph:before{content:"\f1dd"}.fa-parking:before{content:"\f540"}.fa-passport:before{content:"\f5ab"}.fa-pastafarianism:before{content:"\f67b"}.fa-paste:before{content:"\f0ea"}.fa-patreon:before{content:"\f3d9"}.fa-pause:before{content:"\f04c"}.fa-pause-circle:before{content:"\f28b"}.fa-paw:before{content:"\f1b0"}.fa-paypal:before{content:"\f1ed"}.fa-peace:before{content:"\f67c"}.fa-pen:before{content:"\f304"}.fa-pen-alt:before{content:"\f305"}.fa-pen-fancy:before{content:"\f5ac"}.fa-pen-nib:before{content:"\f5ad"}.fa-pen-square:before{content:"\f14b"}.fa-pencil-alt:before{content:"\f303"}.fa-pencil-ruler:before{content:"\f5ae"}.fa-penny-arcade:before{content:"\f704"}.fa-people-carry:before{content:"\f4ce"}.fa-pepper-hot:before{content:"\f816"}.fa-percent:before{content:"\f295"}.fa-percentage:before{content:"\f541"}.fa-periscope:before{content:"\f3da"}.fa-person-booth:before{content:"\f756"}.fa-phabricator:before{content:"\f3db"}.fa-phoenix-framework:before{content:"\f3dc"}.fa-phoenix-squadron:before{content:"\f511"}.fa-phone:before{content:"\f095"}.fa-phone-slash:before{content:"\f3dd"}.fa-phone-square:before{content:"\f098"}.fa-phone-volume:before{content:"\f2a0"}.fa-php:before{content:"\f457"}.fa-pied-piper:before{content:"\f2ae"}.fa-pied-piper-alt:before{content:"\f1a8"}.fa-pied-piper-hat:before{content:"\f4e5"}.fa-pied-piper-pp:before{content:"\f1a7"}.fa-piggy-bank:before{content:"\f4d3"}.fa-pills:before{content:"\f484"}.fa-pinterest:before{content:"\f0d2"}.fa-pinterest-p:before{content:"\f231"}.fa-pinterest-square:before{content:"\f0d3"}.fa-pizza-slice:before{content:"\f818"}.fa-place-of-worship:before{content:"\f67f"}.fa-plane:before{content:"\f072"}.fa-plane-arrival:before{content:"\f5af"}.fa-plane-departure:before{content:"\f5b0"}.fa-play:before{content:"\f04b"}.fa-play-circle:before{content:"\f144"}.fa-playstation:before{content:"\f3df"}.fa-plug:before{content:"\f1e6"}.fa-plus:before{content:"\f067"}.fa-plus-circle:before{content:"\f055"}.fa-plus-square:before{content:"\f0fe"}.fa-podcast:before{content:"\f2ce"}.fa-poll:before{content:"\f681"}.fa-poll-h:before{content:"\f682"}.fa-poo:before{content:"\f2fe"}.fa-poo-storm:before{content:"\f75a"}.fa-poop:before{content:"\f619"}.fa-portrait:before{content:"\f3e0"}.fa-pound-sign:before{content:"\f154"}.fa-power-off:before{content:"\f011"}.fa-pray:before{content:"\f683"}.fa-praying-hands:before{content:"\f684"}.fa-prescription:before{content:"\f5b1"}.fa-prescription-bottle:before{content:"\f485"}.fa-prescription-bottle-alt:before{content:"\f486"}.fa-print:before{content:"\f02f"}.fa-procedures:before{content:"\f487"}.fa-product-hunt:before{content:"\f288"}.fa-project-diagram:before{content:"\f542"}.fa-pushed:before{content:"\f3e1"}.fa-puzzle-piece:before{content:"\f12e"}.fa-python:before{content:"\f3e2"}.fa-qq:before{content:"\f1d6"}.fa-qrcode:before{content:"\f029"}.fa-question:before{content:"\f128"}.fa-question-circle:before{content:"\f059"}.fa-quidditch:before{content:"\f458"}.fa-quinscape:before{content:"\f459"}.fa-quora:before{content:"\f2c4"}.fa-quote-left:before{content:"\f10d"}.fa-quote-right:before{content:"\f10e"}.fa-quran:before{content:"\f687"}.fa-r-project:before{content:"\f4f7"}.fa-radiation:before{content:"\f7b9"}.fa-radiation-alt:before{content:"\f7ba"}.fa-rainbow:before{content:"\f75b"}.fa-random:before{content:"\f074"}.fa-raspberry-pi:before{content:"\f7bb"}.fa-ravelry:before{content:"\f2d9"}.fa-react:before{content:"\f41b"}.fa-reacteurope:before{content:"\f75d"}.fa-readme:before{content:"\f4d5"}.fa-rebel:before{content:"\f1d0"}.fa-receipt:before{content:"\f543"}.fa-recycle:before{content:"\f1b8"}.fa-red-river:before{content:"\f3e3"}.fa-reddit:before{content:"\f1a1"}.fa-reddit-alien:before{content:"\f281"}.fa-reddit-square:before{content:"\f1a2"}.fa-redhat:before{content:"\f7bc"}.fa-redo:before{content:"\f01e"}.fa-redo-alt:before{content:"\f2f9"}.fa-registered:before{content:"\f25d"}.fa-renren:before{content:"\f18b"}.fa-reply:before{content:"\f3e5"}.fa-reply-all:before{content:"\f122"}.fa-replyd:before{content:"\f3e6"}.fa-republican:before{content:"\f75e"}.fa-researchgate:before{content:"\f4f8"}.fa-resolving:before{content:"\f3e7"}.fa-restroom:before{content:"\f7bd"}.fa-retweet:before{content:"\f079"}.fa-rev:before{content:"\f5b2"}.fa-ribbon:before{content:"\f4d6"}.fa-ring:before{content:"\f70b"}.fa-road:before{content:"\f018"}.fa-robot:before{content:"\f544"}.fa-rocket:before{content:"\f135"}.fa-rocketchat:before{content:"\f3e8"}.fa-rockrms:before{content:"\f3e9"}.fa-route:before{content:"\f4d7"}.fa-rss:before{content:"\f09e"}.fa-rss-square:before{content:"\f143"}.fa-ruble-sign:before{content:"\f158"}.fa-ruler:before{content:"\f545"}.fa-ruler-combined:before{content:"\f546"}.fa-ruler-horizontal:before{content:"\f547"}.fa-ruler-vertical:before{content:"\f548"}.fa-running:before{content:"\f70c"}.fa-rupee-sign:before{content:"\f156"}.fa-sad-cry:before{content:"\f5b3"}.fa-sad-tear:before{content:"\f5b4"}.fa-safari:before{content:"\f267"}.fa-salesforce:before{content:"\f83b"}.fa-sass:before{content:"\f41e"}.fa-satellite:before{content:"\f7bf"}.fa-satellite-dish:before{content:"\f7c0"}.fa-save:before{content:"\f0c7"}.fa-schlix:before{content:"\f3ea"}.fa-school:before{content:"\f549"}.fa-screwdriver:before{content:"\f54a"}.fa-scribd:before{content:"\f28a"}.fa-scroll:before{content:"\f70e"}.fa-sd-card:before{content:"\f7c2"}.fa-search:before{content:"\f002"}.fa-search-dollar:before{content:"\f688"}.fa-search-location:before{content:"\f689"}.fa-search-minus:before{content:"\f010"}.fa-search-plus:before{content:"\f00e"}.fa-searchengin:before{content:"\f3eb"}.fa-seedling:before{content:"\f4d8"}.fa-sellcast:before{content:"\f2da"}.fa-sellsy:before{content:"\f213"}.fa-server:before{content:"\f233"}.fa-servicestack:before{content:"\f3ec"}.fa-shapes:before{content:"\f61f"}.fa-share:before{content:"\f064"}.fa-share-alt:before{content:"\f1e0"}.fa-share-alt-square:before{content:"\f1e1"}.fa-share-square:before{content:"\f14d"}.fa-shekel-sign:before{content:"\f20b"}.fa-shield-alt:before{content:"\f3ed"}.fa-ship:before{content:"\f21a"}.fa-shipping-fast:before{content:"\f48b"}.fa-shirtsinbulk:before{content:"\f214"}.fa-shoe-prints:before{content:"\f54b"}.fa-shopping-bag:before{content:"\f290"}.fa-shopping-basket:before{content:"\f291"}.fa-shopping-cart:before{content:"\f07a"}.fa-shopware:before{content:"\f5b5"}.fa-shower:before{content:"\f2cc"}.fa-shuttle-van:before{content:"\f5b6"}.fa-sign:before{content:"\f4d9"}.fa-sign-in-alt:before{content:"\f2f6"}.fa-sign-language:before{content:"\f2a7"}.fa-sign-out-alt:before{content:"\f2f5"}.fa-signal:before{content:"\f012"}.fa-signature:before{content:"\f5b7"}.fa-sim-card:before{content:"\f7c4"}.fa-simplybuilt:before{content:"\f215"}.fa-sistrix:before{content:"\f3ee"}.fa-sitemap:before{content:"\f0e8"}.fa-sith:before{content:"\f512"}.fa-skating:before{content:"\f7c5"}.fa-sketch:before{content:"\f7c6"}.fa-skiing:before{content:"\f7c9"}.fa-skiing-nordic:before{content:"\f7ca"}.fa-skull:before{content:"\f54c"}.fa-skull-crossbones:before{content:"\f714"}.fa-skyatlas:before{content:"\f216"}.fa-skype:before{content:"\f17e"}.fa-slack:before{content:"\f198"}.fa-slack-hash:before{content:"\f3ef"}.fa-slash:before{content:"\f715"}.fa-sleigh:before{content:"\f7cc"}.fa-sliders-h:before{content:"\f1de"}.fa-slideshare:before{content:"\f1e7"}.fa-smile:before{content:"\f118"}.fa-smile-beam:before{content:"\f5b8"}.fa-smile-wink:before{content:"\f4da"}.fa-smog:before{content:"\f75f"}.fa-smoking:before{content:"\f48d"}.fa-smoking-ban:before{content:"\f54d"}.fa-sms:before{content:"\f7cd"}.fa-snapchat:before{content:"\f2ab"}.fa-snapchat-ghost:before{content:"\f2ac"}.fa-snapchat-square:before{content:"\f2ad"}.fa-snowboarding:before{content:"\f7ce"}.fa-snowflake:before{content:"\f2dc"}.fa-snowman:before{content:"\f7d0"}.fa-snowplow:before{content:"\f7d2"}.fa-socks:before{content:"\f696"}.fa-solar-panel:before{content:"\f5ba"}.fa-sort:before{content:"\f0dc"}.fa-sort-alpha-down:before{content:"\f15d"}.fa-sort-alpha-up:before{content:"\f15e"}.fa-sort-amount-down:before{content:"\f160"}.fa-sort-amount-up:before{content:"\f161"}.fa-sort-down:before{content:"\f0dd"}.fa-sort-numeric-down:before{content:"\f162"}.fa-sort-numeric-up:before{content:"\f163"}.fa-sort-up:before{content:"\f0de"}.fa-soundcloud:before{content:"\f1be"}.fa-sourcetree:before{content:"\f7d3"}.fa-spa:before{content:"\f5bb"}.fa-space-shuttle:before{content:"\f197"}.fa-speakap:before{content:"\f3f3"}.fa-speaker-deck:before{content:"\f83c"}.fa-spider:before{content:"\f717"}.fa-spinner:before{content:"\f110"}.fa-splotch:before{content:"\f5bc"}.fa-spotify:before{content:"\f1bc"}.fa-spray-can:before{content:"\f5bd"}.fa-square:before{content:"\f0c8"}.fa-square-full:before{content:"\f45c"}.fa-square-root-alt:before{content:"\f698"}.fa-squarespace:before{content:"\f5be"}.fa-stack-exchange:before{content:"\f18d"}.fa-stack-overflow:before{content:"\f16c"}.fa-stackpath:before{content:"\f842"}.fa-stamp:before{content:"\f5bf"}.fa-star:before{content:"\f005"}.fa-star-and-crescent:before{content:"\f699"}.fa-star-half:before{content:"\f089"}.fa-star-half-alt:before{content:"\f5c0"}.fa-star-of-david:before{content:"\f69a"}.fa-star-of-life:before{content:"\f621"}.fa-staylinked:before{content:"\f3f5"}.fa-steam:before{content:"\f1b6"}.fa-steam-square:before{content:"\f1b7"}.fa-steam-symbol:before{content:"\f3f6"}.fa-step-backward:before{content:"\f048"}.fa-step-forward:before{content:"\f051"}.fa-stethoscope:before{content:"\f0f1"}.fa-sticker-mule:before{content:"\f3f7"}.fa-sticky-note:before{content:"\f249"}.fa-stop:before{content:"\f04d"}.fa-stop-circle:before{content:"\f28d"}.fa-stopwatch:before{content:"\f2f2"}.fa-store:before{content:"\f54e"}.fa-store-alt:before{content:"\f54f"}.fa-strava:before{content:"\f428"}.fa-stream:before{content:"\f550"}.fa-street-view:before{content:"\f21d"}.fa-strikethrough:before{content:"\f0cc"}.fa-stripe:before{content:"\f429"}.fa-stripe-s:before{content:"\f42a"}.fa-stroopwafel:before{content:"\f551"}.fa-studiovinari:before{content:"\f3f8"}.fa-stumbleupon:before{content:"\f1a4"}.fa-stumbleupon-circle:before{content:"\f1a3"}.fa-subscript:before{content:"\f12c"}.fa-subway:before{content:"\f239"}.fa-suitcase:before{content:"\f0f2"}.fa-suitcase-rolling:before{content:"\f5c1"}.fa-sun:before{content:"\f185"}.fa-superpowers:before{content:"\f2dd"}.fa-superscript:before{content:"\f12b"}.fa-supple:before{content:"\f3f9"}.fa-surprise:before{content:"\f5c2"}.fa-suse:before{content:"\f7d6"}.fa-swatchbook:before{content:"\f5c3"}.fa-swimmer:before{content:"\f5c4"}.fa-swimming-pool:before{content:"\f5c5"}.fa-symfony:before{content:"\f83d"}.fa-synagogue:before{content:"\f69b"}.fa-sync:before{content:"\f021"}.fa-sync-alt:before{content:"\f2f1"}.fa-syringe:before{content:"\f48e"}.fa-table:before{content:"\f0ce"}.fa-table-tennis:before{content:"\f45d"}.fa-tablet:before{content:"\f10a"}.fa-tablet-alt:before{content:"\f3fa"}.fa-tablets:before{content:"\f490"}.fa-tachometer-alt:before{content:"\f3fd"}.fa-tag:before{content:"\f02b"}.fa-tags:before{content:"\f02c"}.fa-tape:before{content:"\f4db"}.fa-tasks:before{content:"\f0ae"}.fa-taxi:before{content:"\f1ba"}.fa-teamspeak:before{content:"\f4f9"}.fa-teeth:before{content:"\f62e"}.fa-teeth-open:before{content:"\f62f"}.fa-telegram:before{content:"\f2c6"}.fa-telegram-plane:before{content:"\f3fe"}.fa-temperature-high:before{content:"\f769"}.fa-temperature-low:before{content:"\f76b"}.fa-tencent-weibo:before{content:"\f1d5"}.fa-tenge:before{content:"\f7d7"}.fa-terminal:before{content:"\f120"}.fa-text-height:before{content:"\f034"}.fa-text-width:before{content:"\f035"}.fa-th:before{content:"\f00a"}.fa-th-large:before{content:"\f009"}.fa-th-list:before{content:"\f00b"}.fa-the-red-yeti:before{content:"\f69d"}.fa-theater-masks:before{content:"\f630"}.fa-themeco:before{content:"\f5c6"}.fa-themeisle:before{content:"\f2b2"}.fa-thermometer:before{content:"\f491"}.fa-thermometer-empty:before{content:"\f2cb"}.fa-thermometer-full:before{content:"\f2c7"}.fa-thermometer-half:before{content:"\f2c9"}.fa-thermometer-quarter:before{content:"\f2ca"}.fa-thermometer-three-quarters:before{content:"\f2c8"}.fa-think-peaks:before{content:"\f731"}.fa-thumbs-down:before{content:"\f165"}.fa-thumbs-up:before{content:"\f164"}.fa-thumbtack:before{content:"\f08d"}.fa-ticket-alt:before{content:"\f3ff"}.fa-times:before{content:"\f00d"}.fa-times-circle:before{content:"\f057"}.fa-tint:before{content:"\f043"}.fa-tint-slash:before{content:"\f5c7"}.fa-tired:before{content:"\f5c8"}.fa-toggle-off:before{content:"\f204"}.fa-toggle-on:before{content:"\f205"}.fa-toilet:before{content:"\f7d8"}.fa-toilet-paper:before{content:"\f71e"}.fa-toolbox:before{content:"\f552"}.fa-tools:before{content:"\f7d9"}.fa-tooth:before{content:"\f5c9"}.fa-torah:before{content:"\f6a0"}.fa-torii-gate:before{content:"\f6a1"}.fa-tractor:before{content:"\f722"}.fa-trade-federation:before{content:"\f513"}.fa-trademark:before{content:"\f25c"}.fa-traffic-light:before{content:"\f637"}.fa-train:before{content:"\f238"}.fa-tram:before{content:"\f7da"}.fa-transgender:before{content:"\f224"}.fa-transgender-alt:before{content:"\f225"}.fa-trash:before{content:"\f1f8"}.fa-trash-alt:before{content:"\f2ed"}.fa-trash-restore:before{content:"\f829"}.fa-trash-restore-alt:before{content:"\f82a"}.fa-tree:before{content:"\f1bb"}.fa-trello:before{content:"\f181"}.fa-tripadvisor:before{content:"\f262"}.fa-trophy:before{content:"\f091"}.fa-truck:before{content:"\f0d1"}.fa-truck-loading:before{content:"\f4de"}.fa-truck-monster:before{content:"\f63b"}.fa-truck-moving:before{content:"\f4df"}.fa-truck-pickup:before{content:"\f63c"}.fa-tshirt:before{content:"\f553"}.fa-tty:before{content:"\f1e4"}.fa-tumblr:before{content:"\f173"}.fa-tumblr-square:before{content:"\f174"}.fa-tv:before{content:"\f26c"}.fa-twitch:before{content:"\f1e8"}.fa-twitter:before{content:"\f099"}.fa-twitter-square:before{content:"\f081"}.fa-typo3:before{content:"\f42b"}.fa-uber:before{content:"\f402"}.fa-ubuntu:before{content:"\f7df"}.fa-uikit:before{content:"\f403"}.fa-umbrella:before{content:"\f0e9"}.fa-umbrella-beach:before{content:"\f5ca"}.fa-underline:before{content:"\f0cd"}.fa-undo:before{content:"\f0e2"}.fa-undo-alt:before{content:"\f2ea"}.fa-uniregistry:before{content:"\f404"}.fa-universal-access:before{content:"\f29a"}.fa-university:before{content:"\f19c"}.fa-unlink:before{content:"\f127"}.fa-unlock:before{content:"\f09c"}.fa-unlock-alt:before{content:"\f13e"}.fa-untappd:before{content:"\f405"}.fa-upload:before{content:"\f093"}.fa-ups:before{content:"\f7e0"}.fa-usb:before{content:"\f287"}.fa-user:before{content:"\f007"}.fa-user-alt:before{content:"\f406"}.fa-user-alt-slash:before{content:"\f4fa"}.fa-user-astronaut:before{content:"\f4fb"}.fa-user-check:before{content:"\f4fc"}.fa-user-circle:before{content:"\f2bd"}.fa-user-clock:before{content:"\f4fd"}.fa-user-cog:before{content:"\f4fe"}.fa-user-edit:before{content:"\f4ff"}.fa-user-friends:before{content:"\f500"}.fa-user-graduate:before{content:"\f501"}.fa-user-injured:before{content:"\f728"}.fa-user-lock:before{content:"\f502"}.fa-user-md:before{content:"\f0f0"}.fa-user-minus:before{content:"\f503"}.fa-user-ninja:before{content:"\f504"}.fa-user-nurse:before{content:"\f82f"}.fa-user-plus:before{content:"\f234"}.fa-user-secret:before{content:"\f21b"}.fa-user-shield:before{content:"\f505"}.fa-user-slash:before{content:"\f506"}.fa-user-tag:before{content:"\f507"}.fa-user-tie:before{content:"\f508"}.fa-user-times:before{content:"\f235"}.fa-users:before{content:"\f0c0"}.fa-users-cog:before{content:"\f509"}.fa-usps:before{content:"\f7e1"}.fa-ussunnah:before{content:"\f407"}.fa-utensil-spoon:before{content:"\f2e5"}.fa-utensils:before{content:"\f2e7"}.fa-vaadin:before{content:"\f408"}.fa-vector-square:before{content:"\f5cb"}.fa-venus:before{content:"\f221"}.fa-venus-double:before{content:"\f226"}.fa-venus-mars:before{content:"\f228"}.fa-viacoin:before{content:"\f237"}.fa-viadeo:before{content:"\f2a9"}.fa-viadeo-square:before{content:"\f2aa"}.fa-vial:before{content:"\f492"}.fa-vials:before{content:"\f493"}.fa-viber:before{content:"\f409"}.fa-video:before{content:"\f03d"}.fa-video-slash:before{content:"\f4e2"}.fa-vihara:before{content:"\f6a7"}.fa-vimeo:before{content:"\f40a"}.fa-vimeo-square:before{content:"\f194"}.fa-vimeo-v:before{content:"\f27d"}.fa-vine:before{content:"\f1ca"}.fa-vk:before{content:"\f189"}.fa-vnv:before{content:"\f40b"}.fa-volleyball-ball:before{content:"\f45f"}.fa-volume-down:before{content:"\f027"}.fa-volume-mute:before{content:"\f6a9"}.fa-volume-off:before{content:"\f026"}.fa-volume-up:before{content:"\f028"}.fa-vote-yea:before{content:"\f772"}.fa-vr-cardboard:before{content:"\f729"}.fa-vuejs:before{content:"\f41f"}.fa-walking:before{content:"\f554"}.fa-wallet:before{content:"\f555"}.fa-warehouse:before{content:"\f494"}.fa-water:before{content:"\f773"}.fa-wave-square:before{content:"\f83e"}.fa-waze:before{content:"\f83f"}.fa-weebly:before{content:"\f5cc"}.fa-weibo:before{content:"\f18a"}.fa-weight:before{content:"\f496"}.fa-weight-hanging:before{content:"\f5cd"}.fa-weixin:before{content:"\f1d7"}.fa-whatsapp:before{content:"\f232"}.fa-whatsapp-square:before{content:"\f40c"}.fa-wheelchair:before{content:"\f193"}.fa-whmcs:before{content:"\f40d"}.fa-wifi:before{content:"\f1eb"}.fa-wikipedia-w:before{content:"\f266"}.fa-wind:before{content:"\f72e"}.fa-window-close:before{content:"\f410"}.fa-window-maximize:before{content:"\f2d0"}.fa-window-minimize:before{content:"\f2d1"}.fa-window-restore:before{content:"\f2d2"}.fa-windows:before{content:"\f17a"}.fa-wine-bottle:before{content:"\f72f"}.fa-wine-glass:before{content:"\f4e3"}.fa-wine-glass-alt:before{content:"\f5ce"}.fa-wix:before{content:"\f5cf"}.fa-wizards-of-the-coast:before{content:"\f730"}.fa-wolf-pack-battalion:before{content:"\f514"}.fa-won-sign:before{content:"\f159"}.fa-wordpress:before{content:"\f19a"}.fa-wordpress-simple:before{content:"\f411"}.fa-wpbeginner:before{content:"\f297"}.fa-wpexplorer:before{content:"\f2de"}.fa-wpforms:before{content:"\f298"}.fa-wpressr:before{content:"\f3e4"}.fa-wrench:before{content:"\f0ad"}.fa-x-ray:before{content:"\f497"}.fa-xbox:before{content:"\f412"}.fa-xing:before{content:"\f168"}.fa-xing-square:before{content:"\f169"}.fa-y-combinator:before{content:"\f23b"}.fa-yahoo:before{content:"\f19e"}.fa-yammer:before{content:"\f840"}.fa-yandex:before{content:"\f413"}.fa-yandex-international:before{content:"\f414"}.fa-yarn:before{content:"\f7e3"}.fa-yelp:before{content:"\f1e9"}.fa-yen-sign:before{content:"\f157"}.fa-yin-yang:before{content:"\f6ad"}.fa-yoast:before{content:"\f2b1"}.fa-youtube:before{content:"\f167"}.fa-youtube-square:before{content:"\f431"}.fa-zhihu:before{content:"\f63f"}.sr-only{border:0;clip:rect(0,0,0,0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.sr-only-focusable:active,.sr-only-focusable:focus{clip:auto;height:auto;margin:0;overflow:visible;position:static;width:auto}@font-face{font-family:"Font Awesome 5 Brands";font-style:normal;font-weight:normal;font-display:auto;src:url(../webfonts/fontawesome/400/fa-brands-400.eot);src:url(../webfonts/fontawesome/400/fa-brands-400.eot?#iefix) format("embedded-opentype"),url(../webfonts/fontawesome/400/fa-brands-400.woff2) format("woff2"),url(../webfonts/fontawesome/400/fa-brands-400.woff) format("woff"),url(../webfonts/fontawesome/400/fa-brands-400.ttf) format("truetype"),url(../webfonts/fontawesome/400/fa-brands-400.svg#fontawesome) format("svg")}.fab{font-family:"Font Awesome 5 Brands"}@font-face{font-family:"Font Awesome 5 Free";font-style:normal;font-weight:400;font-display:auto;src:url(../webfonts/fontawesome/400/fa-regular-400.eot);src:url(../webfonts/fontawesome/400/fa-regular-400.eot?#iefix) format("embedded-opentype"),url(../webfonts/fontawesome/400/fa-regular-400.woff2) format("woff2"),url(../webfonts/fontawesome/400/fa-regular-400.woff) format("woff"),url(../webfonts/fontawesome/400/fa-regular-400.ttf) format("truetype"),url(../webfonts/fontawesome/400/fa-regular-400.svg#fontawesome) format("svg")}.far{font-weight:400}@font-face{font-family:"Font Awesome 5 Free";font-style:normal;font-weight:900;font-display:auto;src:url(../webfonts/fontawesome/900/fa-solid-900.eot);src:url(../webfonts/fontawesome/900/fa-solid-900.eot?#iefix) format("embedded-opentype"),url(../webfonts/fontawesome/900/fa-solid-900.woff2) format("woff2"),url(../webfonts/fontawesome/900/fa-solid-900.woff) format("woff"),url(../webfonts/fontawesome/900/fa-solid-900.ttf) format("truetype"),url(../webfonts/fontawesome/900/fa-solid-900.svg#fontawesome) format("svg")}.fa,.far,.fas{font-family:"Font Awesome 5 Free"}.fa,.fas{font-weight:900} \ No newline at end of file diff --git a/vendor/crowdfunding2/lib/css/gh-fork-ribbon.min.css b/vendor/crowdfunding2/lib/css/gh-fork-ribbon.min.css new file mode 100755 index 0000000..72cd051 --- /dev/null +++ b/vendor/crowdfunding2/lib/css/gh-fork-ribbon.min.css @@ -0,0 +1,4 @@ +/*! + * "Fork me on GitHub" CSS ribbon v0.2.3 | MIT License + * https://github.com/simonwhitaker/github-fork-ribbon-css +*/.github-fork-ribbon{width:12.1em;height:12.1em;position:absolute;overflow:hidden;top:0;right:0;z-index:9999;pointer-events:none;font-size:13px;text-decoration:none;text-indent:-999999px}.github-fork-ribbon.fixed{position:fixed}.github-fork-ribbon:active,.github-fork-ribbon:hover{background-color:rgba(0,0,0,0)}.github-fork-ribbon:after,.github-fork-ribbon:before{position:absolute;display:block;width:15.38em;height:1.54em;top:3.23em;right:-3.23em;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;-webkit-transform:rotate(45deg);-moz-transform:rotate(45deg);-ms-transform:rotate(45deg);-o-transform:rotate(45deg);transform:rotate(45deg)}.github-fork-ribbon:before{content:"";padding:.38em 0;background-color:#a00;background-image:-webkit-gradient(linear,left top,left bottom,from(rgba(0,0,0,0)),to(rgba(0,0,0,.15)));background-image:-webkit-linear-gradient(top,rgba(0,0,0,0),rgba(0,0,0,.15));background-image:-moz-linear-gradient(top,rgba(0,0,0,0),rgba(0,0,0,.15));background-image:-ms-linear-gradient(top,rgba(0,0,0,0),rgba(0,0,0,.15));background-image:-o-linear-gradient(top,rgba(0,0,0,0),rgba(0,0,0,.15));background-image:linear-gradient(to bottom,rgba(0,0,0,0),rgba(0,0,0,.15));-webkit-box-shadow:0 .15em .23em 0 rgba(0,0,0,.5);-moz-box-shadow:0 .15em .23em 0 rgba(0,0,0,.5);box-shadow:0 .15em .23em 0 rgba(0,0,0,.5);pointer-events:auto}.github-fork-ribbon:after{content:attr(data-ribbon);color:#fff;font:700 1em "Helvetica Neue",Helvetica,Arial,sans-serif;line-height:1.54em;text-decoration:none;text-shadow:0 -.08em rgba(0,0,0,.5);text-align:center;text-indent:0;padding:.15em 0;margin:.15em 0;border-width:.08em 0;border-style:dotted;border-color:#fff;border-color:rgba(255,255,255,.7)}.github-fork-ribbon.left-bottom,.github-fork-ribbon.left-top{right:auto;left:0}.github-fork-ribbon.left-bottom,.github-fork-ribbon.right-bottom{top:auto;bottom:0}.github-fork-ribbon.left-bottom:after,.github-fork-ribbon.left-bottom:before,.github-fork-ribbon.left-top:after,.github-fork-ribbon.left-top:before{right:auto;left:-3.23em}.github-fork-ribbon.left-bottom:after,.github-fork-ribbon.left-bottom:before,.github-fork-ribbon.right-bottom:after,.github-fork-ribbon.right-bottom:before{top:auto;bottom:3.23em}.github-fork-ribbon.left-top:after,.github-fork-ribbon.left-top:before,.github-fork-ribbon.right-bottom:after,.github-fork-ribbon.right-bottom:before{-webkit-transform:rotate(-45deg);-moz-transform:rotate(-45deg);-ms-transform:rotate(-45deg);-o-transform:rotate(-45deg);transform:rotate(-45deg)} \ No newline at end of file diff --git a/vendor/crowdfunding2/lib/css/w3.css b/vendor/crowdfunding2/lib/css/w3.css new file mode 100755 index 0000000..26837ef --- /dev/null +++ b/vendor/crowdfunding2/lib/css/w3.css @@ -0,0 +1,232 @@ +/* W3.CSS 4.13 June 2019 by Jan Egil and Borge Refsnes */ +html{box-sizing:border-box}*,*:before,*:after{box-sizing:inherit} +/* Extract from normalize.css by Nicolas Gallagher and Jonathan Neal git.io/normalize */ +html{-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{margin:0} +article,aside,details,figcaption,figure,footer,header,main,menu,nav,section{display:block}summary{display:list-item} +audio,canvas,progress,video{display:inline-block}progress{vertical-align:baseline} +audio:not([controls]){display:none;height:0}[hidden],template{display:none} +a{background-color:transparent}a:active,a:hover{outline-width:0} +abbr[title]{border-bottom:none;text-decoration:underline;text-decoration:underline dotted} +b,strong{font-weight:bolder}dfn{font-style:italic}mark{background:#ff0;color:#000} +small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline} +sub{bottom:-0.25em}sup{top:-0.5em}figure{margin:1em 40px}img{border-style:none} +code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}hr{box-sizing:content-box;height:0;overflow:visible} +button,input,select,textarea,optgroup{font:inherit;margin:0}optgroup{font-weight:bold} +button,input{overflow:visible}button,select{text-transform:none} +button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button} +button::-moz-focus-inner,[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner{border-style:none;padding:0} +button:-moz-focusring,[type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring{outline:1px dotted ButtonText} +fieldset{border:1px solid #c0c0c0;margin:0 2px;padding:.35em .625em .75em} +legend{color:inherit;display:table;max-width:100%;padding:0;white-space:normal}textarea{overflow:auto} +[type=checkbox],[type=radio]{padding:0} +[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto} +[type=search]{-webkit-appearance:textfield;outline-offset:-2px} +[type=search]::-webkit-search-decoration{-webkit-appearance:none} +::-webkit-file-upload-button{-webkit-appearance:button;font:inherit} +/* End extract */ +html,body{font-family:Verdana,sans-serif;font-size:15px;line-height:1.5}html{overflow-x:hidden} +h1{font-size:36px}h2{font-size:30px}h3{font-size:24px}h4{font-size:20px}h5{font-size:18px}h6{font-size:16px}.w3-serif{font-family:serif} +h1,h2,h3,h4,h5,h6{font-family:"Segoe UI",Arial,sans-serif;font-weight:400;margin:10px 0}.w3-wide{letter-spacing:4px} +hr{border:0;border-top:1px solid #eee;margin:20px 0} +.w3-image{max-width:100%;height:auto}img{vertical-align:middle}a{color:inherit} +.w3-table,.w3-table-all{border-collapse:collapse;border-spacing:0;width:100%;display:table}.w3-table-all{border:1px solid #ccc} +.w3-bordered tr,.w3-table-all tr{border-bottom:1px solid #ddd}.w3-striped tbody tr:nth-child(even){background-color:#f1f1f1} +.w3-table-all tr:nth-child(odd){background-color:#fff}.w3-table-all tr:nth-child(even){background-color:#f1f1f1} +.w3-hoverable tbody tr:hover,.w3-ul.w3-hoverable li:hover{background-color:#ccc}.w3-centered tr th,.w3-centered tr td{text-align:center} +.w3-table td,.w3-table th,.w3-table-all td,.w3-table-all th{padding:8px 8px;display:table-cell;text-align:left;vertical-align:top} +.w3-table th:first-child,.w3-table td:first-child,.w3-table-all th:first-child,.w3-table-all td:first-child{padding-left:16px} +.w3-btn,.w3-button{border:none;display:inline-block;padding:8px 16px;vertical-align:middle;overflow:hidden;text-decoration:none;color:inherit;background-color:inherit;text-align:center;cursor:pointer;white-space:nowrap} +.w3-btn:hover{box-shadow:0 8px 16px 0 rgba(0,0,0,0.2),0 6px 20px 0 rgba(0,0,0,0.19)} +.w3-btn,.w3-button{-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none} +.w3-disabled,.w3-btn:disabled,.w3-button:disabled{cursor:not-allowed;opacity:0.3}.w3-disabled *,:disabled *{pointer-events:none} +.w3-btn.w3-disabled:hover,.w3-btn:disabled:hover{box-shadow:none} +.w3-badge,.w3-tag{background-color:#000;color:#fff;display:inline-block;padding-left:8px;padding-right:8px;text-align:center}.w3-badge{border-radius:50%} +.w3-ul{list-style-type:none;padding:0;margin:0}.w3-ul li{padding:8px 16px;border-bottom:1px solid #ddd}.w3-ul li:last-child{border-bottom:none} +.w3-tooltip,.w3-display-container{position:relative}.w3-tooltip .w3-text{display:none}.w3-tooltip:hover .w3-text{display:inline-block} +.w3-ripple:active{opacity:0.5}.w3-ripple{transition:opacity 0s} +.w3-input{padding:8px;display:block;border:none;border-bottom:1px solid #ccc;width:100%} +.w3-select{padding:9px 0;width:100%;border:none;border-bottom:1px solid #ccc} +.w3-dropdown-click,.w3-dropdown-hover{position:relative;display:inline-block;cursor:pointer} +.w3-dropdown-hover:hover .w3-dropdown-content{display:block} +.w3-dropdown-hover:first-child,.w3-dropdown-click:hover{background-color:#ccc;color:#000} +.w3-dropdown-hover:hover > .w3-button:first-child,.w3-dropdown-click:hover > .w3-button:first-child{background-color:#ccc;color:#000} +.w3-dropdown-content{cursor:auto;color:#000;background-color:#fff;display:none;position:absolute;min-width:160px;margin:0;padding:0;z-index:1} +.w3-check,.w3-radio{width:24px;height:24px;position:relative;top:6px} +.w3-sidebar{height:100%;width:200px;background-color:#fff;position:fixed!important;z-index:1;overflow:auto} +.w3-bar-block .w3-dropdown-hover,.w3-bar-block .w3-dropdown-click{width:100%} +.w3-bar-block .w3-dropdown-hover .w3-dropdown-content,.w3-bar-block .w3-dropdown-click .w3-dropdown-content{min-width:100%} +.w3-bar-block .w3-dropdown-hover .w3-button,.w3-bar-block .w3-dropdown-click .w3-button{width:100%;text-align:left;padding:8px 16px} +.w3-main,#main{transition:margin-left .4s} +.w3-modal{z-index:3;display:none;padding-top:100px;position:fixed;left:0;top:0;width:100%;height:100%;overflow:auto;background-color:rgb(0,0,0);background-color:rgba(0,0,0,0.4)} +.w3-modal-content{margin:auto;background-color:#fff;position:relative;padding:0;outline:0;width:600px} +.w3-bar{width:100%;overflow:hidden}.w3-center .w3-bar{display:inline-block;width:auto} +.w3-bar .w3-bar-item{padding:8px 16px;float:left;width:auto;border:none;display:block;outline:0} +.w3-bar .w3-dropdown-hover,.w3-bar .w3-dropdown-click{position:static;float:left} +.w3-bar .w3-button{white-space:normal} +.w3-bar-block .w3-bar-item{width:100%;display:block;padding:8px 16px;text-align:left;border:none;white-space:normal;float:none;outline:0} +.w3-bar-block.w3-center .w3-bar-item{text-align:center}.w3-block{display:block;width:100%} +.w3-responsive{display:block;overflow-x:auto} +.w3-container:after,.w3-container:before,.w3-panel:after,.w3-panel:before,.w3-row:after,.w3-row:before,.w3-row-padding:after,.w3-row-padding:before, +.w3-cell-row:before,.w3-cell-row:after,.w3-clear:after,.w3-clear:before,.w3-bar:before,.w3-bar:after{content:"";display:table;clear:both} +.w3-col,.w3-half,.w3-third,.w3-twothird,.w3-threequarter,.w3-quarter{float:left;width:100%} +.w3-col.s1{width:8.33333%}.w3-col.s2{width:16.66666%}.w3-col.s3{width:24.99999%}.w3-col.s4{width:33.33333%} +.w3-col.s5{width:41.66666%}.w3-col.s6{width:49.99999%}.w3-col.s7{width:58.33333%}.w3-col.s8{width:66.66666%} +.w3-col.s9{width:74.99999%}.w3-col.s10{width:83.33333%}.w3-col.s11{width:91.66666%}.w3-col.s12{width:99.99999%} +@media (min-width:601px){.w3-col.m1{width:8.33333%}.w3-col.m2{width:16.66666%}.w3-col.m3,.w3-quarter{width:24.99999%}.w3-col.m4,.w3-third{width:33.33333%} +.w3-col.m5{width:41.66666%}.w3-col.m6,.w3-half{width:49.99999%}.w3-col.m7{width:58.33333%}.w3-col.m8,.w3-twothird{width:66.66666%} +.w3-col.m9,.w3-threequarter{width:74.99999%}.w3-col.m10{width:83.33333%}.w3-col.m11{width:91.66666%}.w3-col.m12{width:99.99999%}} +@media (min-width:993px){.w3-col.l1{width:8.33333%}.w3-col.l2{width:16.66666%}.w3-col.l3{width:24.99999%}.w3-col.l4{width:33.33333%} +.w3-col.l5{width:41.66666%}.w3-col.l6{width:49.99999%}.w3-col.l7{width:58.33333%}.w3-col.l8{width:66.66666%} +.w3-col.l9{width:74.99999%}.w3-col.l10{width:83.33333%}.w3-col.l11{width:91.66666%}.w3-col.l12{width:99.99999%}} +.w3-rest{overflow:hidden}.w3-stretch{margin-left:-16px;margin-right:-16px} +.w3-content,.w3-auto{margin-left:auto;margin-right:auto}.w3-content{max-width:980px}.w3-auto{max-width:1140px} +.w3-cell-row{display:table;width:100%}.w3-cell{display:table-cell} +.w3-cell-top{vertical-align:top}.w3-cell-middle{vertical-align:middle}.w3-cell-bottom{vertical-align:bottom} +.w3-hide{display:none!important}.w3-show-block,.w3-show{display:block!important}.w3-show-inline-block{display:inline-block!important} +@media (max-width:1205px){.w3-auto{max-width:95%}} +@media (max-width:600px){.w3-modal-content{margin:0 10px;width:auto!important}.w3-modal{padding-top:30px} +.w3-dropdown-hover.w3-mobile .w3-dropdown-content,.w3-dropdown-click.w3-mobile .w3-dropdown-content{position:relative} +.w3-hide-small{display:none!important}.w3-mobile{display:block;width:100%!important}.w3-bar-item.w3-mobile,.w3-dropdown-hover.w3-mobile,.w3-dropdown-click.w3-mobile{text-align:center} +.w3-dropdown-hover.w3-mobile,.w3-dropdown-hover.w3-mobile .w3-btn,.w3-dropdown-hover.w3-mobile .w3-button,.w3-dropdown-click.w3-mobile,.w3-dropdown-click.w3-mobile .w3-btn,.w3-dropdown-click.w3-mobile .w3-button{width:100%}} +@media (max-width:768px){.w3-modal-content{width:500px}.w3-modal{padding-top:50px}} +@media (min-width:993px){.w3-modal-content{width:900px}.w3-hide-large{display:none!important}.w3-sidebar.w3-collapse{display:block!important}} +@media (max-width:992px) and (min-width:601px){.w3-hide-medium{display:none!important}} +@media (max-width:992px){.w3-sidebar.w3-collapse{display:none}.w3-main{margin-left:0!important;margin-right:0!important}.w3-auto{max-width:100%}} +.w3-top,.w3-bottom{position:fixed;width:100%;z-index:1}.w3-top{top:0}.w3-bottom{bottom:0} +.w3-overlay{position:fixed;display:none;width:100%;height:100%;top:0;left:0;right:0;bottom:0;background-color:rgba(0,0,0,0.5);z-index:2} +.w3-display-topleft{position:absolute;left:0;top:0}.w3-display-topright{position:absolute;right:0;top:0} +.w3-display-bottomleft{position:absolute;left:0;bottom:0}.w3-display-bottomright{position:absolute;right:0;bottom:0} +.w3-display-middle{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);-ms-transform:translate(-50%,-50%)} +.w3-display-left{position:absolute;top:50%;left:0%;transform:translate(0%,-50%);-ms-transform:translate(-0%,-50%)} +.w3-display-right{position:absolute;top:50%;right:0%;transform:translate(0%,-50%);-ms-transform:translate(0%,-50%)} +.w3-display-topmiddle{position:absolute;left:50%;top:0;transform:translate(-50%,0%);-ms-transform:translate(-50%,0%)} +.w3-display-bottommiddle{position:absolute;left:50%;bottom:0;transform:translate(-50%,0%);-ms-transform:translate(-50%,0%)} +.w3-display-container:hover .w3-display-hover{display:block}.w3-display-container:hover span.w3-display-hover{display:inline-block}.w3-display-hover{display:none} +.w3-display-position{position:absolute} +.w3-circle{border-radius:50%} +.w3-round-small{border-radius:2px}.w3-round,.w3-round-medium{border-radius:4px}.w3-round-large{border-radius:8px}.w3-round-xlarge{border-radius:16px}.w3-round-xxlarge{border-radius:32px} +.w3-row-padding,.w3-row-padding>.w3-half,.w3-row-padding>.w3-third,.w3-row-padding>.w3-twothird,.w3-row-padding>.w3-threequarter,.w3-row-padding>.w3-quarter,.w3-row-padding>.w3-col{padding:0 8px} +.w3-container,.w3-panel{padding:0.01em 16px}.w3-panel{margin-top:16px;margin-bottom:16px} +.w3-code,.w3-codespan{font-family:Consolas,"courier new";font-size:16px} +.w3-code{width:auto;background-color:#fff;padding:8px 12px;border-left:4px solid #4CAF50;word-wrap:break-word} +.w3-codespan{color:crimson;background-color:#f1f1f1;padding-left:4px;padding-right:4px;font-size:110%} +.w3-card,.w3-card-2{box-shadow:0 2px 5px 0 rgba(0,0,0,0.16),0 2px 10px 0 rgba(0,0,0,0.12)} +.w3-card-4,.w3-hover-shadow:hover{box-shadow:0 4px 10px 0 rgba(0,0,0,0.2),0 4px 20px 0 rgba(0,0,0,0.19)} +.w3-spin{animation:w3-spin 2s infinite linear}@keyframes w3-spin{0%{transform:rotate(0deg)}100%{transform:rotate(359deg)}} +.w3-animate-fading{animation:fading 10s infinite}@keyframes fading{0%{opacity:0}50%{opacity:1}100%{opacity:0}} +.w3-animate-opacity{animation:opac 0.8s}@keyframes opac{from{opacity:0} to{opacity:1}} +.w3-animate-top{position:relative;animation:animatetop 0.4s}@keyframes animatetop{from{top:-300px;opacity:0} to{top:0;opacity:1}} +.w3-animate-left{position:relative;animation:animateleft 0.4s}@keyframes animateleft{from{left:-300px;opacity:0} to{left:0;opacity:1}} +.w3-animate-right{position:relative;animation:animateright 0.4s}@keyframes animateright{from{right:-300px;opacity:0} to{right:0;opacity:1}} +.w3-animate-bottom{position:relative;animation:animatebottom 0.4s}@keyframes animatebottom{from{bottom:-300px;opacity:0} to{bottom:0;opacity:1}} +.w3-animate-zoom {animation:animatezoom 0.6s}@keyframes animatezoom{from{transform:scale(0)} to{transform:scale(1)}} +.w3-animate-input{transition:width 0.4s ease-in-out}.w3-animate-input:focus{width:100%!important} +.w3-opacity,.w3-hover-opacity:hover{opacity:0.60}.w3-opacity-off,.w3-hover-opacity-off:hover{opacity:1} +.w3-opacity-max{opacity:0.25}.w3-opacity-min{opacity:0.75} +.w3-greyscale-max,.w3-grayscale-max,.w3-hover-greyscale:hover,.w3-hover-grayscale:hover{filter:grayscale(100%)} +.w3-greyscale,.w3-grayscale{filter:grayscale(75%)}.w3-greyscale-min,.w3-grayscale-min{filter:grayscale(50%)} +.w3-sepia{filter:sepia(75%)}.w3-sepia-max,.w3-hover-sepia:hover{filter:sepia(100%)}.w3-sepia-min{filter:sepia(50%)} +.w3-tiny{font-size:10px!important}.w3-small{font-size:12px!important}.w3-medium{font-size:15px!important}.w3-large{font-size:18px!important} +.w3-xlarge{font-size:24px!important}.w3-xxlarge{font-size:36px!important}.w3-xxxlarge{font-size:48px!important}.w3-jumbo{font-size:64px!important} +.w3-left-align{text-align:left!important}.w3-right-align{text-align:right!important}.w3-justify{text-align:justify!important}.w3-center{text-align:center!important} +.w3-border-0{border:0!important}.w3-border{border:1px solid #ccc!important} +.w3-border-top{border-top:1px solid #ccc!important}.w3-border-bottom{border-bottom:1px solid #ccc!important} +.w3-border-left{border-left:1px solid #ccc!important}.w3-border-right{border-right:1px solid #ccc!important} +.w3-topbar{border-top:6px solid #ccc!important}.w3-bottombar{border-bottom:6px solid #ccc!important} +.w3-leftbar{border-left:6px solid #ccc!important}.w3-rightbar{border-right:6px solid #ccc!important} +.w3-section,.w3-code{margin-top:16px!important;margin-bottom:16px!important} +.w3-margin{margin:16px!important}.w3-margin-top{margin-top:16px!important}.w3-margin-bottom{margin-bottom:16px!important} +.w3-margin-left{margin-left:16px!important}.w3-margin-right{margin-right:16px!important} +.w3-padding-small{padding:4px 8px!important}.w3-padding{padding:8px 16px!important}.w3-padding-large{padding:12px 24px!important} +.w3-padding-16{padding-top:16px!important;padding-bottom:16px!important}.w3-padding-24{padding-top:24px!important;padding-bottom:24px!important} +.w3-padding-32{padding-top:32px!important;padding-bottom:32px!important}.w3-padding-48{padding-top:48px!important;padding-bottom:48px!important} +.w3-padding-64{padding-top:64px!important;padding-bottom:64px!important} +.w3-left{float:left!important}.w3-right{float:right!important} +.w3-button:hover{color:#000!important;background-color:#ccc!important} +.w3-transparent,.w3-hover-none:hover{background-color:transparent!important} +.w3-hover-none:hover{box-shadow:none!important} +/* Colors */ +.w3-amber,.w3-hover-amber:hover{color:#000!important;background-color:#ffc107!important} +.w3-aqua,.w3-hover-aqua:hover{color:#000!important;background-color:#00ffff!important} +.w3-blue,.w3-hover-blue:hover{color:#fff!important;background-color:#2196F3!important} +.w3-light-blue,.w3-hover-light-blue:hover{color:#000!important;background-color:#87CEEB!important} +.w3-brown,.w3-hover-brown:hover{color:#fff!important;background-color:#795548!important} +.w3-cyan,.w3-hover-cyan:hover{color:#000!important;background-color:#00bcd4!important} +.w3-blue-grey,.w3-hover-blue-grey:hover,.w3-blue-gray,.w3-hover-blue-gray:hover{color:#fff!important;background-color:#607d8b!important} +.w3-green,.w3-hover-green:hover{color:#fff!important;background-color:#4CAF50!important} +.w3-light-green,.w3-hover-light-green:hover{color:#000!important;background-color:#8bc34a!important} +.w3-indigo,.w3-hover-indigo:hover{color:#fff!important;background-color:#3f51b5!important} +.w3-khaki,.w3-hover-khaki:hover{color:#000!important;background-color:#f0e68c!important} +.w3-lime,.w3-hover-lime:hover{color:#000!important;background-color:#cddc39!important} +.w3-orange,.w3-hover-orange:hover{color:#000!important;background-color:#ff9800!important} +.w3-deep-orange,.w3-hover-deep-orange:hover{color:#fff!important;background-color:#ff5722!important} +.w3-pink,.w3-hover-pink:hover{color:#fff!important;background-color:#e91e63!important} +.w3-purple,.w3-hover-purple:hover{color:#fff!important;background-color:#9c27b0!important} +.w3-deep-purple,.w3-hover-deep-purple:hover{color:#fff!important;background-color:#673ab7!important} +.w3-red,.w3-hover-red:hover{color:#fff!important;background-color:#f44336!important} +.w3-sand,.w3-hover-sand:hover{color:#000!important;background-color:#fdf5e6!important} +.w3-teal,.w3-hover-teal:hover{color:#fff!important;background-color:#009688!important} +.w3-yellow,.w3-hover-yellow:hover{color:#000!important;background-color:#ffeb3b!important} +.w3-white,.w3-hover-white:hover{color:#000!important;background-color:#fff!important} +.w3-black,.w3-hover-black:hover{color:#fff!important;background-color:#000!important} +.w3-grey,.w3-hover-grey:hover,.w3-gray,.w3-hover-gray:hover{color:#000!important;background-color:#9e9e9e!important} +.w3-light-grey,.w3-hover-light-grey:hover,.w3-light-gray,.w3-hover-light-gray:hover{color:#000!important;background-color:#f1f1f1!important} +.w3-dark-grey,.w3-hover-dark-grey:hover,.w3-dark-gray,.w3-hover-dark-gray:hover{color:#fff!important;background-color:#616161!important} +.w3-pale-red,.w3-hover-pale-red:hover{color:#000!important;background-color:#ffdddd!important} +.w3-pale-green,.w3-hover-pale-green:hover{color:#000!important;background-color:#ddffdd!important} +.w3-pale-yellow,.w3-hover-pale-yellow:hover{color:#000!important;background-color:#ffffcc!important} +.w3-pale-blue,.w3-hover-pale-blue:hover{color:#000!important;background-color:#ddffff!important} +.w3-text-amber,.w3-hover-text-amber:hover{color:#ffc107!important} +.w3-text-aqua,.w3-hover-text-aqua:hover{color:#00ffff!important} +.w3-text-blue,.w3-hover-text-blue:hover{color:#2196F3!important} +.w3-text-light-blue,.w3-hover-text-light-blue:hover{color:#87CEEB!important} +.w3-text-brown,.w3-hover-text-brown:hover{color:#795548!important} +.w3-text-cyan,.w3-hover-text-cyan:hover{color:#00bcd4!important} +.w3-text-blue-grey,.w3-hover-text-blue-grey:hover,.w3-text-blue-gray,.w3-hover-text-blue-gray:hover{color:#607d8b!important} +.w3-text-green,.w3-hover-text-green:hover{color:#4CAF50!important} +.w3-text-light-green,.w3-hover-text-light-green:hover{color:#8bc34a!important} +.w3-text-indigo,.w3-hover-text-indigo:hover{color:#3f51b5!important} +.w3-text-khaki,.w3-hover-text-khaki:hover{color:#b4aa50!important} +.w3-text-lime,.w3-hover-text-lime:hover{color:#cddc39!important} +.w3-text-orange,.w3-hover-text-orange:hover{color:#ff9800!important} +.w3-text-deep-orange,.w3-hover-text-deep-orange:hover{color:#ff5722!important} +.w3-text-pink,.w3-hover-text-pink:hover{color:#e91e63!important} +.w3-text-purple,.w3-hover-text-purple:hover{color:#9c27b0!important} +.w3-text-deep-purple,.w3-hover-text-deep-purple:hover{color:#673ab7!important} +.w3-text-red,.w3-hover-text-red:hover{color:#f44336!important} +.w3-text-sand,.w3-hover-text-sand:hover{color:#fdf5e6!important} +.w3-text-teal,.w3-hover-text-teal:hover{color:#009688!important} +.w3-text-yellow,.w3-hover-text-yellow:hover{color:#d2be0e!important} +.w3-text-white,.w3-hover-text-white:hover{color:#fff!important} +.w3-text-black,.w3-hover-text-black:hover{color:#000!important} +.w3-text-grey,.w3-hover-text-grey:hover,.w3-text-gray,.w3-hover-text-gray:hover{color:#757575!important} +.w3-text-light-grey,.w3-hover-text-light-grey:hover,.w3-text-light-gray,.w3-hover-text-light-gray:hover{color:#f1f1f1!important} +.w3-text-dark-grey,.w3-hover-text-dark-grey:hover,.w3-text-dark-gray,.w3-hover-text-dark-gray:hover{color:#3a3a3a!important} +.w3-border-amber,.w3-hover-border-amber:hover{border-color:#ffc107!important} +.w3-border-aqua,.w3-hover-border-aqua:hover{border-color:#00ffff!important} +.w3-border-blue,.w3-hover-border-blue:hover{border-color:#2196F3!important} +.w3-border-light-blue,.w3-hover-border-light-blue:hover{border-color:#87CEEB!important} +.w3-border-brown,.w3-hover-border-brown:hover{border-color:#795548!important} +.w3-border-cyan,.w3-hover-border-cyan:hover{border-color:#00bcd4!important} +.w3-border-blue-grey,.w3-hover-border-blue-grey:hover,.w3-border-blue-gray,.w3-hover-border-blue-gray:hover{border-color:#607d8b!important} +.w3-border-green,.w3-hover-border-green:hover{border-color:#4CAF50!important} +.w3-border-light-green,.w3-hover-border-light-green:hover{border-color:#8bc34a!important} +.w3-border-indigo,.w3-hover-border-indigo:hover{border-color:#3f51b5!important} +.w3-border-khaki,.w3-hover-border-khaki:hover{border-color:#f0e68c!important} +.w3-border-lime,.w3-hover-border-lime:hover{border-color:#cddc39!important} +.w3-border-orange,.w3-hover-border-orange:hover{border-color:#ff9800!important} +.w3-border-deep-orange,.w3-hover-border-deep-orange:hover{border-color:#ff5722!important} +.w3-border-pink,.w3-hover-border-pink:hover{border-color:#e91e63!important} +.w3-border-purple,.w3-hover-border-purple:hover{border-color:#9c27b0!important} +.w3-border-deep-purple,.w3-hover-border-deep-purple:hover{border-color:#673ab7!important} +.w3-border-red,.w3-hover-border-red:hover{border-color:#f44336!important} +.w3-border-sand,.w3-hover-border-sand:hover{border-color:#fdf5e6!important} +.w3-border-teal,.w3-hover-border-teal:hover{border-color:#009688!important} +.w3-border-yellow,.w3-hover-border-yellow:hover{border-color:#ffeb3b!important} +.w3-border-white,.w3-hover-border-white:hover{border-color:#fff!important} +.w3-border-black,.w3-hover-border-black:hover{border-color:#000!important} +.w3-border-grey,.w3-hover-border-grey:hover,.w3-border-gray,.w3-hover-border-gray:hover{border-color:#9e9e9e!important} +.w3-border-light-grey,.w3-hover-border-light-grey:hover,.w3-border-light-gray,.w3-hover-border-light-gray:hover{border-color:#f1f1f1!important} +.w3-border-dark-grey,.w3-hover-border-dark-grey:hover,.w3-border-dark-gray,.w3-hover-border-dark-gray:hover{border-color:#616161!important} +.w3-border-pale-red,.w3-hover-border-pale-red:hover{border-color:#ffe7e7!important}.w3-border-pale-green,.w3-hover-border-pale-green:hover{border-color:#e7ffe7!important} +.w3-border-pale-yellow,.w3-hover-border-pale-yellow:hover{border-color:#ffffcc!important}.w3-border-pale-blue,.w3-hover-border-pale-blue:hover{border-color:#e7ffff!important} \ No newline at end of file diff --git a/vendor/crowdfunding2/lib/js/chart.min.js b/vendor/crowdfunding2/lib/js/chart.min.js new file mode 100755 index 0000000..c74a791 --- /dev/null +++ b/vendor/crowdfunding2/lib/js/chart.min.js @@ -0,0 +1,7 @@ +/*! + * Chart.js v2.8.0 + * https://www.chartjs.org + * (c) 2019 Chart.js Contributors + * Released under the MIT License + */ +!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(function(){try{return require("moment")}catch(t){}}()):"function"==typeof define&&define.amd?define(["require"],function(t){return e(function(){try{return t("moment")}catch(t){}}())}):t.Chart=e(t.moment)}(this,function(t){"use strict";t=t&&t.hasOwnProperty("default")?t.default:t;var e={rgb2hsl:i,rgb2hsv:n,rgb2hwb:a,rgb2cmyk:o,rgb2keyword:s,rgb2xyz:l,rgb2lab:d,rgb2lch:function(t){return x(d(t))},hsl2rgb:u,hsl2hsv:function(t){var e=t[0],i=t[1]/100,n=t[2]/100;if(0===n)return[0,0,0];return[e,100*(2*(i*=(n*=2)<=1?n:2-n)/(n+i)),100*((n+i)/2)]},hsl2hwb:function(t){return a(u(t))},hsl2cmyk:function(t){return o(u(t))},hsl2keyword:function(t){return s(u(t))},hsv2rgb:h,hsv2hsl:function(t){var e,i,n=t[0],a=t[1]/100,o=t[2]/100;return e=a*o,[n,100*(e=(e/=(i=(2-a)*o)<=1?i:2-i)||0),100*(i/=2)]},hsv2hwb:function(t){return a(h(t))},hsv2cmyk:function(t){return o(h(t))},hsv2keyword:function(t){return s(h(t))},hwb2rgb:c,hwb2hsl:function(t){return i(c(t))},hwb2hsv:function(t){return n(c(t))},hwb2cmyk:function(t){return o(c(t))},hwb2keyword:function(t){return s(c(t))},cmyk2rgb:f,cmyk2hsl:function(t){return i(f(t))},cmyk2hsv:function(t){return n(f(t))},cmyk2hwb:function(t){return a(f(t))},cmyk2keyword:function(t){return s(f(t))},keyword2rgb:w,keyword2hsl:function(t){return i(w(t))},keyword2hsv:function(t){return n(w(t))},keyword2hwb:function(t){return a(w(t))},keyword2cmyk:function(t){return o(w(t))},keyword2lab:function(t){return d(w(t))},keyword2xyz:function(t){return l(w(t))},xyz2rgb:p,xyz2lab:m,xyz2lch:function(t){return x(m(t))},lab2xyz:v,lab2rgb:y,lab2lch:x,lch2lab:k,lch2xyz:function(t){return v(k(t))},lch2rgb:function(t){return y(k(t))}};function i(t){var e,i,n=t[0]/255,a=t[1]/255,o=t[2]/255,r=Math.min(n,a,o),s=Math.max(n,a,o),l=s-r;return s==r?e=0:n==s?e=(a-o)/l:a==s?e=2+(o-n)/l:o==s&&(e=4+(n-a)/l),(e=Math.min(60*e,360))<0&&(e+=360),i=(r+s)/2,[e,100*(s==r?0:i<=.5?l/(s+r):l/(2-s-r)),100*i]}function n(t){var e,i,n=t[0],a=t[1],o=t[2],r=Math.min(n,a,o),s=Math.max(n,a,o),l=s-r;return i=0==s?0:l/s*1e3/10,s==r?e=0:n==s?e=(a-o)/l:a==s?e=2+(o-n)/l:o==s&&(e=4+(n-a)/l),(e=Math.min(60*e,360))<0&&(e+=360),[e,i,s/255*1e3/10]}function a(t){var e=t[0],n=t[1],a=t[2];return[i(t)[0],100*(1/255*Math.min(e,Math.min(n,a))),100*(a=1-1/255*Math.max(e,Math.max(n,a)))]}function o(t){var e,i=t[0]/255,n=t[1]/255,a=t[2]/255;return[100*((1-i-(e=Math.min(1-i,1-n,1-a)))/(1-e)||0),100*((1-n-e)/(1-e)||0),100*((1-a-e)/(1-e)||0),100*e]}function s(t){return _[JSON.stringify(t)]}function l(t){var e=t[0]/255,i=t[1]/255,n=t[2]/255;return[100*(.4124*(e=e>.04045?Math.pow((e+.055)/1.055,2.4):e/12.92)+.3576*(i=i>.04045?Math.pow((i+.055)/1.055,2.4):i/12.92)+.1805*(n=n>.04045?Math.pow((n+.055)/1.055,2.4):n/12.92)),100*(.2126*e+.7152*i+.0722*n),100*(.0193*e+.1192*i+.9505*n)]}function d(t){var e=l(t),i=e[0],n=e[1],a=e[2];return n/=100,a/=108.883,i=(i/=95.047)>.008856?Math.pow(i,1/3):7.787*i+16/116,[116*(n=n>.008856?Math.pow(n,1/3):7.787*n+16/116)-16,500*(i-n),200*(n-(a=a>.008856?Math.pow(a,1/3):7.787*a+16/116))]}function u(t){var e,i,n,a,o,r=t[0]/360,s=t[1]/100,l=t[2]/100;if(0==s)return[o=255*l,o,o];e=2*l-(i=l<.5?l*(1+s):l+s-l*s),a=[0,0,0];for(var d=0;d<3;d++)(n=r+1/3*-(d-1))<0&&n++,n>1&&n--,o=6*n<1?e+6*(i-e)*n:2*n<1?i:3*n<2?e+(i-e)*(2/3-n)*6:e,a[d]=255*o;return a}function h(t){var e=t[0]/60,i=t[1]/100,n=t[2]/100,a=Math.floor(e)%6,o=e-Math.floor(e),r=255*n*(1-i),s=255*n*(1-i*o),l=255*n*(1-i*(1-o));n*=255;switch(a){case 0:return[n,l,r];case 1:return[s,n,r];case 2:return[r,n,l];case 3:return[r,s,n];case 4:return[l,r,n];case 5:return[n,r,s]}}function c(t){var e,i,n,a,o=t[0]/360,s=t[1]/100,l=t[2]/100,d=s+l;switch(d>1&&(s/=d,l/=d),n=6*o-(e=Math.floor(6*o)),0!=(1&e)&&(n=1-n),a=s+n*((i=1-l)-s),e){default:case 6:case 0:r=i,g=a,b=s;break;case 1:r=a,g=i,b=s;break;case 2:r=s,g=i,b=a;break;case 3:r=s,g=a,b=i;break;case 4:r=a,g=s,b=i;break;case 5:r=i,g=s,b=a}return[255*r,255*g,255*b]}function f(t){var e=t[0]/100,i=t[1]/100,n=t[2]/100,a=t[3]/100;return[255*(1-Math.min(1,e*(1-a)+a)),255*(1-Math.min(1,i*(1-a)+a)),255*(1-Math.min(1,n*(1-a)+a))]}function p(t){var e,i,n,a=t[0]/100,o=t[1]/100,r=t[2]/100;return i=-.9689*a+1.8758*o+.0415*r,n=.0557*a+-.204*o+1.057*r,e=(e=3.2406*a+-1.5372*o+-.4986*r)>.0031308?1.055*Math.pow(e,1/2.4)-.055:e*=12.92,i=i>.0031308?1.055*Math.pow(i,1/2.4)-.055:i*=12.92,n=n>.0031308?1.055*Math.pow(n,1/2.4)-.055:n*=12.92,[255*(e=Math.min(Math.max(0,e),1)),255*(i=Math.min(Math.max(0,i),1)),255*(n=Math.min(Math.max(0,n),1))]}function m(t){var e=t[0],i=t[1],n=t[2];return i/=100,n/=108.883,e=(e/=95.047)>.008856?Math.pow(e,1/3):7.787*e+16/116,[116*(i=i>.008856?Math.pow(i,1/3):7.787*i+16/116)-16,500*(e-i),200*(i-(n=n>.008856?Math.pow(n,1/3):7.787*n+16/116))]}function v(t){var e,i,n,a,o=t[0],r=t[1],s=t[2];return o<=8?a=(i=100*o/903.3)/100*7.787+16/116:(i=100*Math.pow((o+16)/116,3),a=Math.pow(i/100,1/3)),[e=e/95.047<=.008856?e=95.047*(r/500+a-16/116)/7.787:95.047*Math.pow(r/500+a,3),i,n=n/108.883<=.008859?n=108.883*(a-s/200-16/116)/7.787:108.883*Math.pow(a-s/200,3)]}function x(t){var e,i=t[0],n=t[1],a=t[2];return(e=360*Math.atan2(a,n)/2/Math.PI)<0&&(e+=360),[i,Math.sqrt(n*n+a*a),e]}function y(t){return p(v(t))}function k(t){var e,i=t[0],n=t[1];return e=t[2]/360*2*Math.PI,[i,n*Math.cos(e),n*Math.sin(e)]}function w(t){return M[t]}var M={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},_={};for(var C in M)_[JSON.stringify(M[C])]=C;var S=function(){return new T};for(var P in e){S[P+"Raw"]=function(t){return function(i){return"number"==typeof i&&(i=Array.prototype.slice.call(arguments)),e[t](i)}}(P);var I=/(\w+)2(\w+)/.exec(P),A=I[1],D=I[2];(S[A]=S[A]||{})[D]=S[P]=function(t){return function(i){"number"==typeof i&&(i=Array.prototype.slice.call(arguments));var n=e[t](i);if("string"==typeof n||void 0===n)return n;for(var a=0;a=0&&e<1?H(Math.round(255*e)):"")},rgbString:function(t,e){if(e<1||t[3]&&t[3]<1)return N(t,e);return"rgb("+t[0]+", "+t[1]+", "+t[2]+")"},rgbaString:N,percentString:function(t,e){if(e<1||t[3]&&t[3]<1)return W(t,e);var i=Math.round(t[0]/255*100),n=Math.round(t[1]/255*100),a=Math.round(t[2]/255*100);return"rgb("+i+"%, "+n+"%, "+a+"%)"},percentaString:W,hslString:function(t,e){if(e<1||t[3]&&t[3]<1)return V(t,e);return"hsl("+t[0]+", "+t[1]+"%, "+t[2]+"%)"},hslaString:V,hwbString:function(t,e){void 0===e&&(e=void 0!==t[3]?t[3]:1);return"hwb("+t[0]+", "+t[1]+"%, "+t[2]+"%"+(void 0!==e&&1!==e?", "+e:"")+")"},keyword:function(t){return j[t.slice(0,3)]}};function O(t){if(t){var e=[0,0,0],i=1,n=t.match(/^#([a-fA-F0-9]{3,4})$/i),a="";if(n){a=(n=n[1])[3];for(var o=0;oi?(e+.05)/(i+.05):(i+.05)/(e+.05)},level:function(t){var e=this.contrast(t);return e>=7.1?"AAA":e>=4.5?"AA":""},dark:function(){var t=this.values.rgb;return(299*t[0]+587*t[1]+114*t[2])/1e3<128},light:function(){return!this.dark()},negate:function(){for(var t=[],e=0;e<3;e++)t[e]=255-this.values.rgb[e];return this.setValues("rgb",t),this},lighten:function(t){var e=this.values.hsl;return e[2]+=e[2]*t,this.setValues("hsl",e),this},darken:function(t){var e=this.values.hsl;return e[2]-=e[2]*t,this.setValues("hsl",e),this},saturate:function(t){var e=this.values.hsl;return e[1]+=e[1]*t,this.setValues("hsl",e),this},desaturate:function(t){var e=this.values.hsl;return e[1]-=e[1]*t,this.setValues("hsl",e),this},whiten:function(t){var e=this.values.hwb;return e[1]+=e[1]*t,this.setValues("hwb",e),this},blacken:function(t){var e=this.values.hwb;return e[2]+=e[2]*t,this.setValues("hwb",e),this},greyscale:function(){var t=this.values.rgb,e=.3*t[0]+.59*t[1]+.11*t[2];return this.setValues("rgb",[e,e,e]),this},clearer:function(t){var e=this.values.alpha;return this.setValues("alpha",e-e*t),this},opaquer:function(t){var e=this.values.alpha;return this.setValues("alpha",e+e*t),this},rotate:function(t){var e=this.values.hsl,i=(e[0]+t)%360;return e[0]=i<0?360+i:i,this.setValues("hsl",e),this},mix:function(t,e){var i=t,n=void 0===e?.5:e,a=2*n-1,o=this.alpha()-i.alpha(),r=((a*o==-1?a:(a+o)/(1+a*o))+1)/2,s=1-r;return this.rgb(r*this.red()+s*i.red(),r*this.green()+s*i.green(),r*this.blue()+s*i.blue()).alpha(this.alpha()*n+i.alpha()*(1-n))},toJSON:function(){return this.rgb()},clone:function(){var t,e,i=new Y,n=this.values,a=i.values;for(var o in n)n.hasOwnProperty(o)&&(t=n[o],"[object Array]"===(e={}.toString.call(t))?a[o]=t.slice(0):"[object Number]"===e?a[o]=t:console.error("unexpected color value:",t));return i}},Y.prototype.spaces={rgb:["red","green","blue"],hsl:["hue","saturation","lightness"],hsv:["hue","saturation","value"],hwb:["hue","whiteness","blackness"],cmyk:["cyan","magenta","yellow","black"]},Y.prototype.maxes={rgb:[255,255,255],hsl:[360,100,100],hsv:[360,100,100],hwb:[360,100,100],cmyk:[100,100,100,100]},Y.prototype.getValues=function(t){for(var e=this.values,i={},n=0;n=0;a--)e.call(i,t[a],a);else for(a=0;a=1?t:-(Math.sqrt(1-t*t)-1)},easeOutCirc:function(t){return Math.sqrt(1-(t-=1)*t)},easeInOutCirc:function(t){return(t/=.5)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)},easeInElastic:function(t){var e=1.70158,i=0,n=1;return 0===t?0:1===t?1:(i||(i=.3),n<1?(n=1,e=i/4):e=i/(2*Math.PI)*Math.asin(1/n),-n*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/i))},easeOutElastic:function(t){var e=1.70158,i=0,n=1;return 0===t?0:1===t?1:(i||(i=.3),n<1?(n=1,e=i/4):e=i/(2*Math.PI)*Math.asin(1/n),n*Math.pow(2,-10*t)*Math.sin((t-e)*(2*Math.PI)/i)+1)},easeInOutElastic:function(t){var e=1.70158,i=0,n=1;return 0===t?0:2==(t/=.5)?1:(i||(i=.45),n<1?(n=1,e=i/4):e=i/(2*Math.PI)*Math.asin(1/n),t<1?n*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/i)*-.5:n*Math.pow(2,-10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/i)*.5+1)},easeInBack:function(t){var e=1.70158;return t*t*((e+1)*t-e)},easeOutBack:function(t){var e=1.70158;return(t-=1)*t*((e+1)*t+e)+1},easeInOutBack:function(t){var e=1.70158;return(t/=.5)<1?t*t*((1+(e*=1.525))*t-e)*.5:.5*((t-=2)*t*((1+(e*=1.525))*t+e)+2)},easeInBounce:function(t){return 1-Z.easeOutBounce(1-t)},easeOutBounce:function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},easeInOutBounce:function(t){return t<.5?.5*Z.easeInBounce(2*t):.5*Z.easeOutBounce(2*t-1)+.5}},$={effects:Z};G.easingEffects=Z;var J=Math.PI,Q=J/180,tt=2*J,et=J/2,it=J/4,nt=2*J/3,at={clear:function(t){t.ctx.clearRect(0,0,t.width,t.height)},roundedRect:function(t,e,i,n,a,o){if(o){var r=Math.min(o,a/2,n/2),s=e+r,l=i+r,d=e+n-r,u=i+a-r;t.moveTo(e,l),se.left-1e-6&&t.xe.top-1e-6&&t.y0&&this.requestAnimationFrame()},advance:function(){for(var t,e,i,n,a=this.animations,o=0;o=i?(ut.callback(t.onAnimationComplete,[t],e),e.animating=!1,a.splice(o,1)):++o}},xt=ut.options.resolve,yt=["push","pop","shift","splice","unshift"];function kt(t,e){var i=t._chartjs;if(i){var n=i.listeners,a=n.indexOf(e);-1!==a&&n.splice(a,1),n.length>0||(yt.forEach(function(e){delete t[e]}),delete t._chartjs)}}var wt=function(t,e){this.initialize(t,e)};ut.extend(wt.prototype,{datasetElementType:null,dataElementType:null,initialize:function(t,e){this.chart=t,this.index=e,this.linkScales(),this.addElements()},updateIndex:function(t){this.index=t},linkScales:function(){var t=this,e=t.getMeta(),i=t.getDataset();null!==e.xAxisID&&e.xAxisID in t.chart.scales||(e.xAxisID=i.xAxisID||t.chart.options.scales.xAxes[0].id),null!==e.yAxisID&&e.yAxisID in t.chart.scales||(e.yAxisID=i.yAxisID||t.chart.options.scales.yAxes[0].id)},getDataset:function(){return this.chart.data.datasets[this.index]},getMeta:function(){return this.chart.getDatasetMeta(this.index)},getScaleForId:function(t){return this.chart.scales[t]},_getValueScaleId:function(){return this.getMeta().yAxisID},_getIndexScaleId:function(){return this.getMeta().xAxisID},_getValueScale:function(){return this.getScaleForId(this._getValueScaleId())},_getIndexScale:function(){return this.getScaleForId(this._getIndexScaleId())},reset:function(){this.update(!0)},destroy:function(){this._data&&kt(this._data,this)},createMetaDataset:function(){var t=this.datasetElementType;return t&&new t({_chart:this.chart,_datasetIndex:this.index})},createMetaData:function(t){var e=this.dataElementType;return e&&new e({_chart:this.chart,_datasetIndex:this.index,_index:t})},addElements:function(){var t,e,i=this.getMeta(),n=this.getDataset().data||[],a=i.data;for(t=0,e=n.length;ti&&this.insertElements(i,n-i)},insertElements:function(t,e){for(var i=0;is;)a-=2*Math.PI;for(;a=r&&a<=s,d=o>=i.innerRadius&&o<=i.outerRadius;return l&&d}return!1},getCenterPoint:function(){var t=this._view,e=(t.startAngle+t.endAngle)/2,i=(t.innerRadius+t.outerRadius)/2;return{x:t.x+Math.cos(e)*i,y:t.y+Math.sin(e)*i}},getArea:function(){var t=this._view;return Math.PI*((t.endAngle-t.startAngle)/(2*Math.PI))*(Math.pow(t.outerRadius,2)-Math.pow(t.innerRadius,2))},tooltipPosition:function(){var t=this._view,e=t.startAngle+(t.endAngle-t.startAngle)/2,i=(t.outerRadius-t.innerRadius)/2+t.innerRadius;return{x:t.x+Math.cos(e)*i,y:t.y+Math.sin(e)*i}},draw:function(){var t,e=this._chart.ctx,i=this._view,n=i.startAngle,a=i.endAngle,o="inner"===i.borderAlign?.33:0;e.save(),e.beginPath(),e.arc(i.x,i.y,Math.max(i.outerRadius-o,0),n,a),e.arc(i.x,i.y,i.innerRadius,a,n,!0),e.closePath(),e.fillStyle=i.backgroundColor,e.fill(),i.borderWidth&&("inner"===i.borderAlign?(e.beginPath(),t=o/i.outerRadius,e.arc(i.x,i.y,i.outerRadius,n-t,a+t),i.innerRadius>o?(t=o/i.innerRadius,e.arc(i.x,i.y,i.innerRadius-o,a+t,n-t,!0)):e.arc(i.x,i.y,o,a+Math.PI/2,n-Math.PI/2),e.closePath(),e.clip(),e.beginPath(),e.arc(i.x,i.y,i.outerRadius,n,a),e.arc(i.x,i.y,i.innerRadius,a,n,!0),e.closePath(),e.lineWidth=2*i.borderWidth,e.lineJoin="round"):(e.lineWidth=i.borderWidth,e.lineJoin="bevel"),e.strokeStyle=i.borderColor,e.stroke()),e.restore()}}),Ct=ut.valueOrDefault,St=st.global.defaultColor;st._set("global",{elements:{line:{tension:.4,backgroundColor:St,borderWidth:3,borderColor:St,borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",capBezierPoints:!0,fill:!0}}});var Pt=pt.extend({draw:function(){var t,e,i,n,a=this._view,o=this._chart.ctx,r=a.spanGaps,s=this._children.slice(),l=st.global,d=l.elements.line,u=-1;for(this._loop&&s.length&&s.push(s[0]),o.save(),o.lineCap=a.borderCapStyle||d.borderCapStyle,o.setLineDash&&o.setLineDash(a.borderDash||d.borderDash),o.lineDashOffset=Ct(a.borderDashOffset,d.borderDashOffset),o.lineJoin=a.borderJoinStyle||d.borderJoinStyle,o.lineWidth=Ct(a.borderWidth,d.borderWidth),o.strokeStyle=a.borderColor||l.defaultColor,o.beginPath(),u=-1,t=0;tt.x&&(e=Ot(e,"left","right")):t.basei?i:n,r:l.right||a<0?0:a>e?e:a,b:l.bottom||o<0?0:o>i?i:o,l:l.left||r<0?0:r>e?e:r}}function Bt(t,e,i){var n=null===e,a=null===i,o=!(!t||n&&a)&&Rt(t);return o&&(n||e>=o.left&&e<=o.right)&&(a||i>=o.top&&i<=o.bottom)}st._set("global",{elements:{rectangle:{backgroundColor:Ft,borderColor:Ft,borderSkipped:"bottom",borderWidth:0}}});var Nt=pt.extend({draw:function(){var t=this._chart.ctx,e=this._view,i=function(t){var e=Rt(t),i=e.right-e.left,n=e.bottom-e.top,a=zt(t,i/2,n/2);return{outer:{x:e.left,y:e.top,w:i,h:n},inner:{x:e.left+a.l,y:e.top+a.t,w:i-a.l-a.r,h:n-a.t-a.b}}}(e),n=i.outer,a=i.inner;t.fillStyle=e.backgroundColor,t.fillRect(n.x,n.y,n.w,n.h),n.w===a.w&&n.h===a.h||(t.save(),t.beginPath(),t.rect(n.x,n.y,n.w,n.h),t.clip(),t.fillStyle=e.borderColor,t.rect(a.x,a.y,a.w,a.h),t.fill("evenodd"),t.restore())},height:function(){var t=this._view;return t.base-t.y},inRange:function(t,e){return Bt(this._view,t,e)},inLabelRange:function(t,e){var i=this._view;return Lt(i)?Bt(i,t,null):Bt(i,null,e)},inXRange:function(t){return Bt(this._view,t,null)},inYRange:function(t){return Bt(this._view,null,t)},getCenterPoint:function(){var t,e,i=this._view;return Lt(i)?(t=i.x,e=(i.y+i.base)/2):(t=(i.x+i.base)/2,e=i.y),{x:t,y:e}},getArea:function(){var t=this._view;return Lt(t)?t.width*Math.abs(t.y-t.base):t.height*Math.abs(t.x-t.base)},tooltipPosition:function(){var t=this._view;return{x:t.x,y:t.y}}}),Wt={},Vt=_t,Et=Pt,Ht=Tt,jt=Nt;Wt.Arc=Vt,Wt.Line=Et,Wt.Point=Ht,Wt.Rectangle=jt;var qt=ut.options.resolve;st._set("bar",{hover:{mode:"label"},scales:{xAxes:[{type:"category",categoryPercentage:.8,barPercentage:.9,offset:!0,gridLines:{offsetGridLines:!0}}],yAxes:[{type:"linear"}]}});var Yt=Mt.extend({dataElementType:Wt.Rectangle,initialize:function(){var t;Mt.prototype.initialize.apply(this,arguments),(t=this.getMeta()).stack=this.getDataset().stack,t.bar=!0},update:function(t){var e,i,n=this.getMeta().data;for(this._ruler=this.getRuler(),e=0,i=n.length;e0?Math.min(r,n-i):r,i=n;return r}(i,l):-1,pixels:l,start:r,end:s,stackCount:n,scale:i}},calculateBarValuePixels:function(t,e){var i,n,a,o,r,s,l=this.chart,d=this.getMeta(),u=this._getValueScale(),h=u.isHorizontal(),c=l.data.datasets,f=+u.getRightValue(c[t].data[e]),g=u.options.minBarLength,p=u.options.stacked,m=d.stack,v=0;if(p||void 0===p&&void 0!==m)for(i=0;i=0&&a>0)&&(v+=a));return o=u.getPixelForValue(v),s=(r=u.getPixelForValue(v+f))-o,void 0!==g&&Math.abs(s)=0&&!h||f<0&&h?o-g:o+g),{size:s,base:o,head:r,center:r+s/2}},calculateBarIndexPixels:function(t,e,i){var n=i.scale.options,a="flex"===n.barThickness?function(t,e,i){var n,a=e.pixels,o=a[t],r=t>0?a[t-1]:null,s=t');var i=t.data,n=i.datasets,a=i.labels;if(n.length)for(var o=0;o'),a[o]&&e.push(a[o]),e.push("");return e.push(""),e.join("")},legend:{labels:{generateLabels:function(t){var e=t.data;return e.labels.length&&e.datasets.length?e.labels.map(function(i,n){var a=t.getDatasetMeta(0),o=e.datasets[0],r=a.data[n],s=r&&r.custom||{},l=t.options.elements.arc;return{text:i,fillStyle:Gt([s.backgroundColor,o.backgroundColor,l.backgroundColor],void 0,n),strokeStyle:Gt([s.borderColor,o.borderColor,l.borderColor],void 0,n),lineWidth:Gt([s.borderWidth,o.borderWidth,l.borderWidth],void 0,n),hidden:isNaN(o.data[n])||a.data[n].hidden,index:n}}):[]}},onClick:function(t,e){var i,n,a,o=e.index,r=this.chart;for(i=0,n=(r.data.datasets||[]).length;i=Math.PI?-1:m<-Math.PI?1:0))+g,b={x:Math.cos(m),y:Math.sin(m)},x={x:Math.cos(v),y:Math.sin(v)},y=m<=0&&v>=0||m<=2*Math.PI&&2*Math.PI<=v,k=m<=.5*Math.PI&&.5*Math.PI<=v||m<=2.5*Math.PI&&2.5*Math.PI<=v,w=m<=-Math.PI&&-Math.PI<=v||m<=Math.PI&&Math.PI<=v,M=m<=.5*-Math.PI&&.5*-Math.PI<=v||m<=1.5*Math.PI&&1.5*Math.PI<=v,_=f/100,C={x:w?-1:Math.min(b.x*(b.x<0?1:_),x.x*(x.x<0?1:_)),y:M?-1:Math.min(b.y*(b.y<0?1:_),x.y*(x.y<0?1:_))},S={x:y?1:Math.max(b.x*(b.x>0?1:_),x.x*(x.x>0?1:_)),y:k?1:Math.max(b.y*(b.y>0?1:_),x.y*(x.y>0?1:_))},P={width:.5*(S.x-C.x),height:.5*(S.y-C.y)};d=Math.min(s/P.width,l/P.height),u={x:-.5*(S.x+C.x),y:-.5*(S.y+C.y)}}for(e=0,i=c.length;e0&&!isNaN(t)?2*Math.PI*(Math.abs(t)/e):0},getMaxBorderWidth:function(t){var e,i,n,a,o,r,s,l,d=0,u=this.chart;if(!t)for(e=0,i=u.data.datasets.length;e(d=s>d?s:d)?l:d);return d},setHoverStyle:function(t){var e=t._model,i=t._options,n=ut.getHoverColor;t.$previousStyle={backgroundColor:e.backgroundColor,borderColor:e.borderColor,borderWidth:e.borderWidth},e.backgroundColor=Zt(i.hoverBackgroundColor,n(i.backgroundColor)),e.borderColor=Zt(i.hoverBorderColor,n(i.borderColor)),e.borderWidth=Zt(i.hoverBorderWidth,i.borderWidth)},_resolveElementOptions:function(t,e){var i,n,a,o=this.chart,r=this.getDataset(),s=t.custom||{},l=o.options.elements.arc,d={},u={chart:o,dataIndex:e,dataset:r,datasetIndex:this.index},h=["backgroundColor","borderColor","borderWidth","borderAlign","hoverBackgroundColor","hoverBorderColor","hoverBorderWidth"];for(i=0,n=h.length;i0&&ee(l[t-1]._model,s)&&(i.controlPointPreviousX=d(i.controlPointPreviousX,s.left,s.right),i.controlPointPreviousY=d(i.controlPointPreviousY,s.top,s.bottom)),t');var i=t.data,n=i.datasets,a=i.labels;if(n.length)for(var o=0;o'),a[o]&&e.push(a[o]),e.push("");return e.push(""),e.join("")},legend:{labels:{generateLabels:function(t){var e=t.data;return e.labels.length&&e.datasets.length?e.labels.map(function(i,n){var a=t.getDatasetMeta(0),o=e.datasets[0],r=a.data[n].custom||{},s=t.options.elements.arc;return{text:i,fillStyle:ae([r.backgroundColor,o.backgroundColor,s.backgroundColor],void 0,n),strokeStyle:ae([r.borderColor,o.borderColor,s.borderColor],void 0,n),lineWidth:ae([r.borderWidth,o.borderWidth,s.borderWidth],void 0,n),hidden:isNaN(o.data[n])||a.data[n].hidden,index:n}}):[]}},onClick:function(t,e){var i,n,a,o=e.index,r=this.chart;for(i=0,n=(r.data.datasets||[]).length;i0&&(o=t.getDatasetMeta(o[0]._datasetIndex).data),o},"x-axis":function(t,e){return me(t,e,{intersect:!1})},point:function(t,e){return fe(t,he(e,t))},nearest:function(t,e,i){var n=he(e,t);i.axis=i.axis||"xy";var a=pe(i.axis);return ge(t,n,i.intersect,a)},x:function(t,e,i){var n=he(e,t),a=[],o=!1;return ce(t,function(t){t.inXRange(n.x)&&a.push(t),t.inRange(n.x,n.y)&&(o=!0)}),i.intersect&&!o&&(a=[]),a},y:function(t,e,i){var n=he(e,t),a=[],o=!1;return ce(t,function(t){t.inYRange(n.y)&&a.push(t),t.inRange(n.x,n.y)&&(o=!0)}),i.intersect&&!o&&(a=[]),a}}};function be(t,e){return ut.where(t,function(t){return t.position===e})}function xe(t,e){t.forEach(function(t,e){return t._tmpIndex_=e,t}),t.sort(function(t,i){var n=e?i:t,a=e?t:i;return n.weight===a.weight?n._tmpIndex_-a._tmpIndex_:n.weight-a.weight}),t.forEach(function(t){delete t._tmpIndex_})}function ye(t,e){ut.each(t,function(t){e[t.position]+=t.isHorizontal()?t.height:t.width})}st._set("global",{layout:{padding:{top:0,right:0,bottom:0,left:0}}});var ke={defaults:{},addBox:function(t,e){t.boxes||(t.boxes=[]),e.fullWidth=e.fullWidth||!1,e.position=e.position||"top",e.weight=e.weight||0,t.boxes.push(e)},removeBox:function(t,e){var i=t.boxes?t.boxes.indexOf(e):-1;-1!==i&&t.boxes.splice(i,1)},configure:function(t,e,i){for(var n,a=["fullWidth","position","weight"],o=a.length,r=0;rdiv{position:absolute;width:1000000px;height:1000000px;left:0;top:0}.chartjs-size-monitor-shrink>div{position:absolute;width:200%;height:200%;left:0;top:0}"}))&&we.default||we,_e="$chartjs",Ce="chartjs-size-monitor",Se="chartjs-render-monitor",Pe="chartjs-render-animation",Ie=["animationstart","webkitAnimationStart"],Ae={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"};function De(t,e){var i=ut.getStyle(t,e),n=i&&i.match(/^(\d+)(\.\d+)?px$/);return n?Number(n[1]):void 0}var Te=!!function(){var t=!1;try{var e=Object.defineProperty({},"passive",{get:function(){t=!0}});window.addEventListener("e",null,e)}catch(t){}return t}()&&{passive:!0};function Fe(t,e,i){t.addEventListener(e,i,Te)}function Le(t,e,i){t.removeEventListener(e,i,Te)}function Re(t,e,i,n,a){return{type:t,chart:e,native:a||null,x:void 0!==i?i:null,y:void 0!==n?n:null}}function Oe(t){var e=document.createElement("div");return e.className=t||"",e}function ze(t,e,i){var n,a,o,r,s=t[_e]||(t[_e]={}),l=s.resizer=function(t){var e=Oe(Ce),i=Oe(Ce+"-expand"),n=Oe(Ce+"-shrink");i.appendChild(Oe()),n.appendChild(Oe()),e.appendChild(i),e.appendChild(n),e._reset=function(){i.scrollLeft=1e6,i.scrollTop=1e6,n.scrollLeft=1e6,n.scrollTop=1e6};var a=function(){e._reset(),t()};return Fe(i,"scroll",a.bind(i,"expand")),Fe(n,"scroll",a.bind(n,"shrink")),e}((n=function(){if(s.resizer){var n=i.options.maintainAspectRatio&&t.parentNode,a=n?n.clientWidth:0;e(Re("resize",i)),n&&n.clientWidth0){var o=t[0];o.label?i=o.label:o.xLabel?i=o.xLabel:a>0&&o.index-1?t.split("\n"):t}function Xe(t){var e=st.global;return{xPadding:t.xPadding,yPadding:t.yPadding,xAlign:t.xAlign,yAlign:t.yAlign,bodyFontColor:t.bodyFontColor,_bodyFontFamily:je(t.bodyFontFamily,e.defaultFontFamily),_bodyFontStyle:je(t.bodyFontStyle,e.defaultFontStyle),_bodyAlign:t.bodyAlign,bodyFontSize:je(t.bodyFontSize,e.defaultFontSize),bodySpacing:t.bodySpacing,titleFontColor:t.titleFontColor,_titleFontFamily:je(t.titleFontFamily,e.defaultFontFamily),_titleFontStyle:je(t.titleFontStyle,e.defaultFontStyle),titleFontSize:je(t.titleFontSize,e.defaultFontSize),_titleAlign:t.titleAlign,titleSpacing:t.titleSpacing,titleMarginBottom:t.titleMarginBottom,footerFontColor:t.footerFontColor,_footerFontFamily:je(t.footerFontFamily,e.defaultFontFamily),_footerFontStyle:je(t.footerFontStyle,e.defaultFontStyle),footerFontSize:je(t.footerFontSize,e.defaultFontSize),_footerAlign:t.footerAlign,footerSpacing:t.footerSpacing,footerMarginTop:t.footerMarginTop,caretSize:t.caretSize,cornerRadius:t.cornerRadius,backgroundColor:t.backgroundColor,opacity:0,legendColorBackground:t.multiKeyBackground,displayColors:t.displayColors,borderColor:t.borderColor,borderWidth:t.borderWidth}}function Ke(t,e){return"center"===e?t.x+t.width/2:"right"===e?t.x+t.width-t.xPadding:t.x+t.xPadding}function Ge(t){return Ye([],Ue(t))}var Ze=pt.extend({initialize:function(){this._model=Xe(this._options),this._lastActive=[]},getTitle:function(){var t=this._options.callbacks,e=t.beforeTitle.apply(this,arguments),i=t.title.apply(this,arguments),n=t.afterTitle.apply(this,arguments),a=[];return a=Ye(a,Ue(e)),a=Ye(a,Ue(i)),a=Ye(a,Ue(n))},getBeforeBody:function(){return Ge(this._options.callbacks.beforeBody.apply(this,arguments))},getBody:function(t,e){var i=this,n=i._options.callbacks,a=[];return ut.each(t,function(t){var o={before:[],lines:[],after:[]};Ye(o.before,Ue(n.beforeLabel.call(i,t,e))),Ye(o.lines,n.label.call(i,t,e)),Ye(o.after,Ue(n.afterLabel.call(i,t,e))),a.push(o)}),a},getAfterBody:function(){return Ge(this._options.callbacks.afterBody.apply(this,arguments))},getFooter:function(){var t=this._options.callbacks,e=t.beforeFooter.apply(this,arguments),i=t.footer.apply(this,arguments),n=t.afterFooter.apply(this,arguments),a=[];return a=Ye(a,Ue(e)),a=Ye(a,Ue(i)),a=Ye(a,Ue(n))},update:function(t){var e,i,n,a,o,r,s,l,d,u,h=this,c=h._options,f=h._model,g=h._model=Xe(c),p=h._active,m=h._data,v={xAlign:f.xAlign,yAlign:f.yAlign},b={x:f.x,y:f.y},x={width:f.width,height:f.height},y={x:f.caretX,y:f.caretY};if(p.length){g.opacity=1;var k=[],w=[];y=qe[c.position].call(h,p,h._eventPosition);var M=[];for(e=0,i=p.length;en.width&&(a=n.width-e.width),a<0&&(a=0)),"top"===u?o+=h:o-="bottom"===u?e.height+h:e.height/2,"center"===u?"left"===d?a+=h:"right"===d&&(a-=h):"left"===d?a-=c:"right"===d&&(a+=c),{x:a,y:o}}(g,x,v=function(t,e){var i,n,a,o,r,s=t._model,l=t._chart,d=t._chart.chartArea,u="center",h="center";s.yl.height-e.height&&(h="bottom");var c=(d.left+d.right)/2,f=(d.top+d.bottom)/2;"center"===h?(i=function(t){return t<=c},n=function(t){return t>c}):(i=function(t){return t<=e.width/2},n=function(t){return t>=l.width-e.width/2}),a=function(t){return t+e.width+s.caretSize+s.caretPadding>l.width},o=function(t){return t-e.width-s.caretSize-s.caretPadding<0},r=function(t){return t<=f?"top":"bottom"},i(s.x)?(u="left",a(s.x)&&(u="center",h=r(s.y))):n(s.x)&&(u="right",o(s.x)&&(u="center",h=r(s.y)));var g=t._options;return{xAlign:g.xAlign?g.xAlign:u,yAlign:g.yAlign?g.yAlign:h}}(this,x),h._chart)}else g.opacity=0;return g.xAlign=v.xAlign,g.yAlign=v.yAlign,g.x=b.x,g.y=b.y,g.width=x.width,g.height=x.height,g.caretX=y.x,g.caretY=y.y,h._model=g,t&&c.custom&&c.custom.call(h,g),h},drawCaret:function(t,e){var i=this._chart.ctx,n=this._view,a=this.getCaretPosition(t,e,n);i.lineTo(a.x1,a.y1),i.lineTo(a.x2,a.y2),i.lineTo(a.x3,a.y3)},getCaretPosition:function(t,e,i){var n,a,o,r,s,l,d=i.caretSize,u=i.cornerRadius,h=i.xAlign,c=i.yAlign,f=t.x,g=t.y,p=e.width,m=e.height;if("center"===c)s=g+m/2,"left"===h?(a=(n=f)-d,o=n,r=s+d,l=s-d):(a=(n=f+p)+d,o=n,r=s-d,l=s+d);else if("left"===h?(n=(a=f+u+d)-d,o=a+d):"right"===h?(n=(a=f+p-u-d)-d,o=a+d):(n=(a=i.caretX)-d,o=a+d),"top"===c)s=(r=g)-d,l=r;else{s=(r=g+m)+d,l=r;var v=o;o=n,n=v}return{x1:n,x2:a,x3:o,y1:r,y2:s,y3:l}},drawTitle:function(t,e,i){var n=e.title;if(n.length){t.x=Ke(e,e._titleAlign),i.textAlign=e._titleAlign,i.textBaseline="top";var a,o,r=e.titleFontSize,s=e.titleSpacing;for(i.fillStyle=e.titleFontColor,i.font=ut.fontString(r,e._titleFontStyle,e._titleFontFamily),a=0,o=n.length;a0&&i.stroke()},draw:function(){var t=this._chart.ctx,e=this._view;if(0!==e.opacity){var i={width:e.width,height:e.height},n={x:e.x,y:e.y},a=Math.abs(e.opacity<.001)?0:e.opacity,o=e.title.length||e.beforeBody.length||e.body.length||e.afterBody.length||e.footer.length;this._options.enabled&&o&&(t.save(),t.globalAlpha=a,this.drawBackground(n,e,t,i),n.y+=e.yPadding,this.drawTitle(n,e,t),this.drawBody(n,e,t),this.drawFooter(n,e,t),t.restore())}},handleEvent:function(t){var e,i=this,n=i._options;return i._lastActive=i._lastActive||[],"mouseout"===t.type?i._active=[]:i._active=i._chart.getElementsAtEventForMode(t,n.mode,n),(e=!ut.arrayEquals(i._active,i._lastActive))&&(i._lastActive=i._active,(n.enabled||n.custom)&&(i._eventPosition={x:t.x,y:t.y},i.update(!0),i.pivot())),e}}),$e=qe,Je=Ze;Je.positioners=$e;var Qe=ut.valueOrDefault;function ti(){return ut.merge({},[].slice.call(arguments),{merger:function(t,e,i,n){if("xAxes"===t||"yAxes"===t){var a,o,r,s=i[t].length;for(e[t]||(e[t]=[]),a=0;a=e[t].length&&e[t].push({}),!e[t][a].type||r.type&&r.type!==e[t][a].type?ut.merge(e[t][a],[He.getScaleDefaults(o),r]):ut.merge(e[t][a],r)}else ut._merger(t,e,i,n)}})}function ei(){return ut.merge({},[].slice.call(arguments),{merger:function(t,e,i,n){var a=e[t]||{},o=i[t];"scales"===t?e[t]=ti(a,o):"scale"===t?e[t]=ut.merge(a,[He.getScaleDefaults(o.type),o]):ut._merger(t,e,i,n)}})}function ii(t){return"top"===t||"bottom"===t}st._set("global",{elements:{},events:["mousemove","mouseout","click","touchstart","touchmove"],hover:{onHover:null,mode:"nearest",intersect:!0,animationDuration:400},onClick:null,maintainAspectRatio:!0,responsive:!0,responsiveAnimationDuration:0});var ni=function(t,e){return this.construct(t,e),this};ut.extend(ni.prototype,{construct:function(t,e){var i=this;e=function(t){var e=(t=t||{}).data=t.data||{};return e.datasets=e.datasets||[],e.labels=e.labels||[],t.options=ei(st.global,st[t.type],t.options||{}),t}(e);var n=Ve.acquireContext(t,e),a=n&&n.canvas,o=a&&a.height,r=a&&a.width;i.id=ut.uid(),i.ctx=n,i.canvas=a,i.config=e,i.width=r,i.height=o,i.aspectRatio=o?r/o:null,i.options=e.options,i._bufferedRender=!1,i.chart=i,i.controller=i,ni.instances[i.id]=i,Object.defineProperty(i,"data",{get:function(){return i.config.data},set:function(t){i.config.data=t}}),n&&a?(i.initialize(),i.update()):console.error("Failed to create chart: can't acquire context from the given item")},initialize:function(){var t=this;return Ee.notify(t,"beforeInit"),ut.retinaScale(t,t.options.devicePixelRatio),t.bindEvents(),t.options.responsive&&t.resize(!0),t.ensureScalesHaveIDs(),t.buildOrUpdateScales(),t.initToolTip(),Ee.notify(t,"afterInit"),t},clear:function(){return ut.canvas.clear(this),this},stop:function(){return bt.cancelAnimation(this),this},resize:function(t){var e=this,i=e.options,n=e.canvas,a=i.maintainAspectRatio&&e.aspectRatio||null,o=Math.max(0,Math.floor(ut.getMaximumWidth(n))),r=Math.max(0,Math.floor(a?o/a:ut.getMaximumHeight(n)));if((e.width!==o||e.height!==r)&&(n.width=e.width=o,n.height=e.height=r,n.style.width=o+"px",n.style.height=r+"px",ut.retinaScale(e,i.devicePixelRatio),!t)){var s={width:o,height:r};Ee.notify(e,"resize",[s]),i.onResize&&i.onResize(e,s),e.stop(),e.update({duration:i.responsiveAnimationDuration})}},ensureScalesHaveIDs:function(){var t=this.options,e=t.scales||{},i=t.scale;ut.each(e.xAxes,function(t,e){t.id=t.id||"x-axis-"+e}),ut.each(e.yAxes,function(t,e){t.id=t.id||"y-axis-"+e}),i&&(i.id=i.id||"scale")},buildOrUpdateScales:function(){var t=this,e=t.options,i=t.scales||{},n=[],a=Object.keys(i).reduce(function(t,e){return t[e]=!1,t},{});e.scales&&(n=n.concat((e.scales.xAxes||[]).map(function(t){return{options:t,dtype:"category",dposition:"bottom"}}),(e.scales.yAxes||[]).map(function(t){return{options:t,dtype:"linear",dposition:"left"}}))),e.scale&&n.push({options:e.scale,dtype:"radialLinear",isDefault:!0,dposition:"chartArea"}),ut.each(n,function(e){var n=e.options,o=n.id,r=Qe(n.type,e.dtype);ii(n.position)!==ii(e.dposition)&&(n.position=e.dposition),a[o]=!0;var s=null;if(o in i&&i[o].type===r)(s=i[o]).options=n,s.ctx=t.ctx,s.chart=t;else{var l=He.getScaleConstructor(r);if(!l)return;s=new l({id:o,type:r,options:n,ctx:t.ctx,chart:t}),i[s.id]=s}s.mergeTicksOptions(),e.isDefault&&(t.scale=s)}),ut.each(a,function(t,e){t||delete i[e]}),t.scales=i,He.addScalesToLayout(this)},buildOrUpdateControllers:function(){var t=this,e=[];return ut.each(t.data.datasets,function(i,n){var a=t.getDatasetMeta(n),o=i.type||t.config.type;if(a.type&&a.type!==o&&(t.destroyDatasetMeta(n),a=t.getDatasetMeta(n)),a.type=o,a.controller)a.controller.updateIndex(n),a.controller.linkScales();else{var r=ue[a.type];if(void 0===r)throw new Error('"'+a.type+'" is not a chart type.');a.controller=new r(t,n),e.push(a.controller)}},t),e},resetElements:function(){var t=this;ut.each(t.data.datasets,function(e,i){t.getDatasetMeta(i).controller.reset()},t)},reset:function(){this.resetElements(),this.tooltip.initialize()},update:function(t){var e,i,n=this;if(t&&"object"==typeof t||(t={duration:t,lazy:arguments[1]}),i=(e=n).options,ut.each(e.scales,function(t){ke.removeBox(e,t)}),i=ei(st.global,st[e.config.type],i),e.options=e.config.options=i,e.ensureScalesHaveIDs(),e.buildOrUpdateScales(),e.tooltip._options=i.tooltips,e.tooltip.initialize(),Ee._invalidate(n),!1!==Ee.notify(n,"beforeUpdate")){n.tooltip._data=n.data;var a=n.buildOrUpdateControllers();ut.each(n.data.datasets,function(t,e){n.getDatasetMeta(e).controller.buildOrUpdateElements()},n),n.updateLayout(),n.options.animation&&n.options.animation.duration&&ut.each(a,function(t){t.reset()}),n.updateDatasets(),n.tooltip.initialize(),n.lastActive=[],Ee.notify(n,"afterUpdate"),n._bufferedRender?n._bufferedRequest={duration:t.duration,easing:t.easing,lazy:t.lazy}:n.render(t)}},updateLayout:function(){!1!==Ee.notify(this,"beforeLayout")&&(ke.update(this,this.width,this.height),Ee.notify(this,"afterScaleUpdate"),Ee.notify(this,"afterLayout"))},updateDatasets:function(){if(!1!==Ee.notify(this,"beforeDatasetsUpdate")){for(var t=0,e=this.data.datasets.length;t=0;--i)e.isDatasetVisible(i)&&e.drawDataset(i,t);Ee.notify(e,"afterDatasetsDraw",[t])}},drawDataset:function(t,e){var i=this.getDatasetMeta(t),n={meta:i,index:t,easingValue:e};!1!==Ee.notify(this,"beforeDatasetDraw",[n])&&(i.controller.draw(e),Ee.notify(this,"afterDatasetDraw",[n]))},_drawTooltip:function(t){var e=this.tooltip,i={tooltip:e,easingValue:t};!1!==Ee.notify(this,"beforeTooltipDraw",[i])&&(e.draw(),Ee.notify(this,"afterTooltipDraw",[i]))},getElementAtEvent:function(t){return ve.modes.single(this,t)},getElementsAtEvent:function(t){return ve.modes.label(this,t,{intersect:!0})},getElementsAtXAxis:function(t){return ve.modes["x-axis"](this,t,{intersect:!0})},getElementsAtEventForMode:function(t,e,i){var n=ve.modes[e];return"function"==typeof n?n(this,t,i):[]},getDatasetAtEvent:function(t){return ve.modes.dataset(this,t,{intersect:!0})},getDatasetMeta:function(t){var e=this.data.datasets[t];e._meta||(e._meta={});var i=e._meta[this.id];return i||(i=e._meta[this.id]={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null}),i},getVisibleDatasetCount:function(){for(var t=0,e=0,i=this.data.datasets.length;e3?i[2]-i[1]:i[1]-i[0];Math.abs(n)>1&&t!==Math.floor(t)&&(n=t-Math.floor(t));var a=ut.log10(Math.abs(n)),o="";if(0!==t)if(Math.max(Math.abs(i[0]),Math.abs(i[i.length-1]))<1e-4){var r=ut.log10(Math.abs(t));o=t.toExponential(Math.floor(r)-Math.floor(a))}else{var s=-1*Math.floor(a);s=Math.max(Math.min(s,20),0),o=t.toFixed(s)}else o="0";return o},logarithmic:function(t,e,i){var n=t/Math.pow(10,Math.floor(ut.log10(t)));return 0===t?"0":1===n||2===n||5===n||0===e||e===i.length-1?t.toExponential():""}}},di=ut.valueOrDefault,ui=ut.valueAtIndexOrDefault;function hi(t){var e,i,n=[];for(e=0,i=t.length;ed&&ot.maxHeight){o--;break}o++,l=r*s}t.labelRotation=o},afterCalculateTickRotation:function(){ut.callback(this.options.afterCalculateTickRotation,[this])},beforeFit:function(){ut.callback(this.options.beforeFit,[this])},fit:function(){var t=this,e=t.minSize={width:0,height:0},i=hi(t._ticks),n=t.options,a=n.ticks,o=n.scaleLabel,r=n.gridLines,s=t._isVisible(),l=n.position,d=t.isHorizontal(),u=ut.options._parseFont,h=u(a),c=n.gridLines.tickMarkLength;if(e.width=d?t.isFullWidth()?t.maxWidth-t.margins.left-t.margins.right:t.maxWidth:s&&r.drawTicks?c:0,e.height=d?s&&r.drawTicks?c:0:t.maxHeight,o.display&&s){var f=u(o),g=ut.options.toPadding(o.padding),p=f.lineHeight+g.height;d?e.height+=p:e.width+=p}if(a.display&&s){var m=ut.longestText(t.ctx,h.string,i,t.longestTextCache),v=ut.numberOfLabelLines(i),b=.5*h.size,x=t.options.ticks.padding;if(t._maxLabelLines=v,t.longestLabelWidth=m,d){var y=ut.toRadians(t.labelRotation),k=Math.cos(y),w=Math.sin(y)*m+h.lineHeight*v+b;e.height=Math.min(t.maxHeight,e.height+w+x),t.ctx.font=h.string;var M,_,C=ci(t.ctx,i[0],h.string),S=ci(t.ctx,i[i.length-1],h.string),P=t.getPixelForTick(0)-t.left,I=t.right-t.getPixelForTick(i.length-1);0!==t.labelRotation?(M="bottom"===l?k*C:k*b,_="bottom"===l?k*b:k*S):(M=C/2,_=S/2),t.paddingLeft=Math.max(M-P,0)+3,t.paddingRight=Math.max(_-I,0)+3}else a.mirror?m=0:m+=x+b,e.width=Math.min(t.maxWidth,e.width+m),t.paddingTop=h.size/2,t.paddingBottom=h.size/2}t.handleMargins(),t.width=e.width,t.height=e.height},handleMargins:function(){var t=this;t.margins&&(t.paddingLeft=Math.max(t.paddingLeft-t.margins.left,0),t.paddingTop=Math.max(t.paddingTop-t.margins.top,0),t.paddingRight=Math.max(t.paddingRight-t.margins.right,0),t.paddingBottom=Math.max(t.paddingBottom-t.margins.bottom,0))},afterFit:function(){ut.callback(this.options.afterFit,[this])},isHorizontal:function(){return"top"===this.options.position||"bottom"===this.options.position},isFullWidth:function(){return this.options.fullWidth},getRightValue:function(t){if(ut.isNullOrUndef(t))return NaN;if(("number"==typeof t||t instanceof Number)&&!isFinite(t))return NaN;if(t)if(this.isHorizontal()){if(void 0!==t.x)return this.getRightValue(t.x)}else if(void 0!==t.y)return this.getRightValue(t.y);return t},getLabelForIndex:ut.noop,getPixelForValue:ut.noop,getValueForPixel:ut.noop,getPixelForTick:function(t){var e=this,i=e.options.offset;if(e.isHorizontal()){var n=(e.width-(e.paddingLeft+e.paddingRight))/Math.max(e._ticks.length-(i?0:1),1),a=n*t+e.paddingLeft;i&&(a+=n/2);var o=e.left+a;return o+=e.isFullWidth()?e.margins.left:0}var r=e.height-(e.paddingTop+e.paddingBottom);return e.top+t*(r/(e._ticks.length-1))},getPixelForDecimal:function(t){var e=this;if(e.isHorizontal()){var i=(e.width-(e.paddingLeft+e.paddingRight))*t+e.paddingLeft,n=e.left+i;return n+=e.isFullWidth()?e.margins.left:0}return e.top+t*e.height},getBasePixel:function(){return this.getPixelForValue(this.getBaseValue())},getBaseValue:function(){var t=this.min,e=this.max;return this.beginAtZero?0:t<0&&e<0?e:t>0&&e>0?t:0},_autoSkip:function(t){var e,i,n=this,a=n.isHorizontal(),o=n.options.ticks.minor,r=t.length,s=!1,l=o.maxTicksLimit,d=n._tickSize()*(r-1),u=a?n.width-(n.paddingLeft+n.paddingRight):n.height-(n.paddingTop+n.PaddingBottom),h=[];for(d>u&&(s=1+Math.floor(d/u)),r>l&&(s=Math.max(s,1+Math.floor(r/l))),e=0;e1&&e%s>0&&delete i.label,h.push(i);return h},_tickSize:function(){var t=this,e=t.isHorizontal(),i=t.options.ticks.minor,n=ut.toRadians(t.labelRotation),a=Math.abs(Math.cos(n)),o=Math.abs(Math.sin(n)),r=i.autoSkipPadding||0,s=t.longestLabelWidth+r||0,l=ut.options._parseFont(i),d=t._maxLabelLines*l.lineHeight+r||0;return e?d*a>s*o?s/a:d/o:d*o0&&n>0&&(t.min=0)}var a=void 0!==e.min||void 0!==e.suggestedMin,o=void 0!==e.max||void 0!==e.suggestedMax;void 0!==e.min?t.min=e.min:void 0!==e.suggestedMin&&(null===t.min?t.min=e.suggestedMin:t.min=Math.min(t.min,e.suggestedMin)),void 0!==e.max?t.max=e.max:void 0!==e.suggestedMax&&(null===t.max?t.max=e.suggestedMax:t.max=Math.max(t.max,e.suggestedMax)),a!==o&&t.min>=t.max&&(a?t.max=t.min+1:t.min=t.max-1),t.min===t.max&&(t.max++,e.beginAtZero||t.min--)},getTickLimit:function(){var t,e=this.options.ticks,i=e.stepSize,n=e.maxTicksLimit;return i?t=Math.ceil(this.max/i)-Math.floor(this.min/i)+1:(t=this._computeTickLimit(),n=n||11),n&&(t=Math.min(n,t)),t},_computeTickLimit:function(){return Number.POSITIVE_INFINITY},handleDirectionalChanges:mi,buildTicks:function(){var t=this,e=t.options.ticks,i=t.getTickLimit(),n={maxTicks:i=Math.max(2,i),min:e.min,max:e.max,precision:e.precision,stepSize:ut.valueOrDefault(e.fixedStepSize,e.stepSize)},a=t.ticks=function(t,e){var i,n,a,o,r=[],s=t.stepSize,l=s||1,d=t.maxTicks-1,u=t.min,h=t.max,c=t.precision,f=e.min,g=e.max,p=ut.niceNum((g-f)/d/l)*l;if(p<1e-14&&vi(u)&&vi(h))return[f,g];(o=Math.ceil(g/p)-Math.floor(f/p))>d&&(p=ut.niceNum(o*p/d/l)*l),s||vi(c)?i=Math.pow(10,ut._decimalPlaces(p)):(i=Math.pow(10,c),p=Math.ceil(p*i)/i),n=Math.floor(f/p)*p,a=Math.ceil(g/p)*p,s&&(!vi(u)&&ut.almostWhole(u/p,p/1e3)&&(n=u),!vi(h)&&ut.almostWhole(h/p,p/1e3)&&(a=h)),o=(a-n)/p,o=ut.almostEquals(o,Math.round(o),p/1e3)?Math.round(o):Math.ceil(o),n=Math.round(n*i)/i,a=Math.round(a*i)/i,r.push(vi(u)?n:u);for(var m=1;mt.max&&(t.max=n))})});t.min=isFinite(t.min)&&!isNaN(t.min)?t.min:0,t.max=isFinite(t.max)&&!isNaN(t.max)?t.max:1,this.handleTickRangeOptions()},_computeTickLimit:function(){var t;return this.isHorizontal()?Math.ceil(this.width/40):(t=ut.options._parseFont(this.options.ticks),Math.ceil(this.height/t.lineHeight))},handleDirectionalChanges:function(){this.isHorizontal()||this.ticks.reverse()},getLabelForIndex:function(t,e){return+this.getRightValue(this.chart.data.datasets[e].data[t])},getPixelForValue:function(t){var e=this,i=e.start,n=+e.getRightValue(t),a=e.end-i;return e.isHorizontal()?e.left+e.width/a*(n-i):e.bottom-e.height/a*(n-i)},getValueForPixel:function(t){var e=this,i=e.isHorizontal(),n=i?e.width:e.height,a=(i?t-e.left:e.bottom-t)/n;return e.start+(e.end-e.start)*a},getPixelForTick:function(t){return this.getPixelForValue(this.ticksAsNumbers[t])}}),ki=xi;yi._defaults=ki;var wi=ut.valueOrDefault;var Mi={position:"left",ticks:{callback:li.formatters.logarithmic}};function _i(t,e){return ut.isFinite(t)&&t>=0?t:e}var Ci=fi.extend({determineDataLimits:function(){var t=this,e=t.options,i=t.chart,n=i.data.datasets,a=t.isHorizontal();function o(e){return a?e.xAxisID===t.id:e.yAxisID===t.id}t.min=null,t.max=null,t.minNotZero=null;var r=e.stacked;if(void 0===r&&ut.each(n,function(t,e){if(!r){var n=i.getDatasetMeta(e);i.isDatasetVisible(e)&&o(n)&&void 0!==n.stack&&(r=!0)}}),e.stacked||r){var s={};ut.each(n,function(n,a){var r=i.getDatasetMeta(a),l=[r.type,void 0===e.stacked&&void 0===r.stack?a:"",r.stack].join(".");i.isDatasetVisible(a)&&o(r)&&(void 0===s[l]&&(s[l]=[]),ut.each(n.data,function(e,i){var n=s[l],a=+t.getRightValue(e);isNaN(a)||r.data[i].hidden||a<0||(n[i]=n[i]||0,n[i]+=a)}))}),ut.each(s,function(e){if(e.length>0){var i=ut.min(e),n=ut.max(e);t.min=null===t.min?i:Math.min(t.min,i),t.max=null===t.max?n:Math.max(t.max,n)}})}else ut.each(n,function(e,n){var a=i.getDatasetMeta(n);i.isDatasetVisible(n)&&o(a)&&ut.each(e.data,function(e,i){var n=+t.getRightValue(e);isNaN(n)||a.data[i].hidden||n<0||(null===t.min?t.min=n:nt.max&&(t.max=n),0!==n&&(null===t.minNotZero||n0?t.minNotZero=t.min:t.max<1?t.minNotZero=Math.pow(10,Math.floor(ut.log10(t.max))):t.minNotZero=1)},buildTicks:function(){var t=this,e=t.options.ticks,i=!t.isHorizontal(),n={min:_i(e.min),max:_i(e.max)},a=t.ticks=function(t,e){var i,n,a=[],o=wi(t.min,Math.pow(10,Math.floor(ut.log10(e.min)))),r=Math.floor(ut.log10(e.max)),s=Math.ceil(e.max/Math.pow(10,r));0===o?(i=Math.floor(ut.log10(e.minNotZero)),n=Math.floor(e.minNotZero/Math.pow(10,i)),a.push(o),o=n*Math.pow(10,i)):(i=Math.floor(ut.log10(o)),n=Math.floor(o/Math.pow(10,i)));var l=i<0?Math.pow(10,Math.abs(i)):1;do{a.push(o),10==++n&&(n=1,l=++i>=0?1:l),o=Math.round(n*Math.pow(10,i)*l)/l}while(ia?{start:e-i,end:e}:{start:e,end:e+i}}function Ri(t){return 0===t||180===t?"center":t<180?"left":"right"}function Oi(t,e,i,n){var a,o,r=i.y+n/2;if(ut.isArray(e))for(a=0,o=e.length;a270||t<90)&&(i.y-=e.h)}function Bi(t){return ut.isNumber(t)?t:0}var Ni=bi.extend({setDimensions:function(){var t=this;t.width=t.maxWidth,t.height=t.maxHeight,t.paddingTop=Fi(t.options)/2,t.xCenter=Math.floor(t.width/2),t.yCenter=Math.floor((t.height-t.paddingTop)/2),t.drawingArea=Math.min(t.height-t.paddingTop,t.width)/2},determineDataLimits:function(){var t=this,e=t.chart,i=Number.POSITIVE_INFINITY,n=Number.NEGATIVE_INFINITY;ut.each(e.data.datasets,function(a,o){if(e.isDatasetVisible(o)){var r=e.getDatasetMeta(o);ut.each(a.data,function(e,a){var o=+t.getRightValue(e);isNaN(o)||r.data[a].hidden||(i=Math.min(o,i),n=Math.max(o,n))})}}),t.min=i===Number.POSITIVE_INFINITY?0:i,t.max=n===Number.NEGATIVE_INFINITY?0:n,t.handleTickRangeOptions()},_computeTickLimit:function(){return Math.ceil(this.drawingArea/Fi(this.options))},convertTicksToLabels:function(){var t=this;bi.prototype.convertTicksToLabels.call(t),t.pointLabels=t.chart.data.labels.map(t.options.pointLabels.callback,t)},getLabelForIndex:function(t,e){return+this.getRightValue(this.chart.data.datasets[e].data[t])},fit:function(){var t=this.options;t.display&&t.pointLabels.display?function(t){var e,i,n,a=ut.options._parseFont(t.options.pointLabels),o={l:0,r:t.width,t:0,b:t.height-t.paddingTop},r={};t.ctx.font=a.string,t._pointLabelSizes=[];var s,l,d,u=Ti(t);for(e=0;eo.r&&(o.r=f.end,r.r=h),g.starto.b&&(o.b=g.end,r.b=h)}t.setReductions(t.drawingArea,o,r)}(this):this.setCenterPoint(0,0,0,0)},setReductions:function(t,e,i){var n=this,a=e.l/Math.sin(i.l),o=Math.max(e.r-n.width,0)/Math.sin(i.r),r=-e.t/Math.cos(i.t),s=-Math.max(e.b-(n.height-n.paddingTop),0)/Math.cos(i.b);a=Bi(a),o=Bi(o),r=Bi(r),s=Bi(s),n.drawingArea=Math.min(Math.floor(t-(a+o)/2),Math.floor(t-(r+s)/2)),n.setCenterPoint(a,o,r,s)},setCenterPoint:function(t,e,i,n){var a=this,o=a.width-e-a.drawingArea,r=t+a.drawingArea,s=i+a.drawingArea,l=a.height-a.paddingTop-n-a.drawingArea;a.xCenter=Math.floor((r+o)/2+a.left),a.yCenter=Math.floor((s+l)/2+a.top+a.paddingTop)},getIndexAngle:function(t){return t*(2*Math.PI/Ti(this))+(this.chart.options&&this.chart.options.startAngle?this.chart.options.startAngle:0)*Math.PI*2/360},getDistanceFromCenterForValue:function(t){var e=this;if(null===t)return 0;var i=e.drawingArea/(e.max-e.min);return e.options.ticks.reverse?(e.max-t)*i:(t-e.min)*i},getPointPosition:function(t,e){var i=this.getIndexAngle(t)-Math.PI/2;return{x:Math.cos(i)*e+this.xCenter,y:Math.sin(i)*e+this.yCenter}},getPointPositionForValue:function(t,e){return this.getPointPosition(t,this.getDistanceFromCenterForValue(e))},getBasePosition:function(){var t=this.min,e=this.max;return this.getPointPositionForValue(0,this.beginAtZero?0:t<0&&e<0?e:t>0&&e>0?t:0)},draw:function(){var t=this,e=t.options,i=e.gridLines,n=e.ticks;if(e.display){var a=t.ctx,o=this.getIndexAngle(0),r=ut.options._parseFont(n);(e.angleLines.display||e.pointLabels.display)&&function(t){var e=t.ctx,i=t.options,n=i.angleLines,a=i.gridLines,o=i.pointLabels,r=Pi(n.lineWidth,a.lineWidth),s=Pi(n.color,a.color),l=Fi(i);e.save(),e.lineWidth=r,e.strokeStyle=s,e.setLineDash&&(e.setLineDash(Ai([n.borderDash,a.borderDash,[]])),e.lineDashOffset=Ai([n.borderDashOffset,a.borderDashOffset,0]));var d=t.getDistanceFromCenterForValue(i.ticks.reverse?t.min:t.max),u=ut.options._parseFont(o);e.font=u.string,e.textBaseline="middle";for(var h=Ti(t)-1;h>=0;h--){if(n.display&&r&&s){var c=t.getPointPosition(h,d);e.beginPath(),e.moveTo(t.xCenter,t.yCenter),e.lineTo(c.x,c.y),e.stroke()}if(o.display){var f=0===h?l/2:0,g=t.getPointPosition(h,d+f+5),p=Ii(o.fontColor,h,st.global.defaultFontColor);e.fillStyle=p;var m=t.getIndexAngle(h),v=ut.toDegrees(m);e.textAlign=Ri(v),zi(v,t._pointLabelSizes[h],g),Oi(e,t.pointLabels[h]||"",g,u.lineHeight)}}e.restore()}(t),ut.each(t.ticks,function(e,s){if(s>0||n.reverse){var l=t.getDistanceFromCenterForValue(t.ticksAsNumbers[s]);if(i.display&&0!==s&&function(t,e,i,n){var a,o=t.ctx,r=e.circular,s=Ti(t),l=Ii(e.color,n-1),d=Ii(e.lineWidth,n-1);if((r||s)&&l&&d){if(o.save(),o.strokeStyle=l,o.lineWidth=d,o.setLineDash&&(o.setLineDash(e.borderDash||[]),o.lineDashOffset=e.borderDashOffset||0),o.beginPath(),r)o.arc(t.xCenter,t.yCenter,i,0,2*Math.PI);else{a=t.getPointPosition(0,i),o.moveTo(a.x,a.y);for(var u=1;u=0&&r<=s;){if(a=t[(n=r+s>>1)-1]||null,o=t[n],!a)return{lo:null,hi:o};if(o[e]i))return{lo:a,hi:o};s=n-1}}return{lo:o,hi:null}}(t,e,i),o=a.lo?a.hi?a.lo:t[t.length-2]:t[0],r=a.lo?a.hi?a.hi:t[t.length-1]:t[1],s=r[e]-o[e],l=s?(i-o[e])/s:0,d=(r[n]-o[n])*l;return o[n]+d}function Ki(t,e){var i=t._adapter,n=t.options.time,a=n.parser,o=a||n.format,r=e;return"function"==typeof a&&(r=a(r)),ut.isFinite(r)||(r="string"==typeof o?i.parse(r,o):i.parse(r)),null!==r?+r:(a||"function"!=typeof o||(r=o(e),ut.isFinite(r)||(r=i.parse(r))),r)}function Gi(t,e){if(ut.isNullOrUndef(e))return null;var i=t.options.time,n=Ki(t,t.getRightValue(e));return null===n?n:(i.round&&(n=+t._adapter.startOf(n,i.round)),n)}function Zi(t){for(var e=qi.indexOf(t)+1,i=qi.length;e=a&&i<=o&&d.push(i);return n.min=a,n.max=o,n._unit=s.unit||function(t,e,i,n,a){var o,r;for(o=qi.length-1;o>=qi.indexOf(i);o--)if(r=qi[o],ji[r].common&&t._adapter.diff(a,n,r)>=e.length)return r;return qi[i?qi.indexOf(i):0]}(n,d,s.minUnit,n.min,n.max),n._majorUnit=Zi(n._unit),n._table=function(t,e,i,n){if("linear"===n||!t.length)return[{time:e,pos:0},{time:i,pos:1}];var a,o,r,s,l,d=[],u=[e];for(a=0,o=t.length;ae&&s=0&&t0?r:1}}),Qi={position:"bottom",distribution:"linear",bounds:"data",adapters:{},time:{parser:!1,format:!1,unit:!1,round:!1,displayFormat:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{autoSkip:!1,source:"auto",major:{enabled:!1}}};Ji._defaults=Qi;var tn={category:gi,linear:yi,logarithmic:Ci,radialLinear:Ni,time:Ji},en={datetime:"MMM D, YYYY, h:mm:ss a",millisecond:"h:mm:ss.SSS a",second:"h:mm:ss a",minute:"h:mm a",hour:"hA",day:"MMM D",week:"ll",month:"MMM YYYY",quarter:"[Q]Q - YYYY",year:"YYYY"};si._date.override("function"==typeof t?{_id:"moment",formats:function(){return en},parse:function(e,i){return"string"==typeof e&&"string"==typeof i?e=t(e,i):e instanceof t||(e=t(e)),e.isValid()?e.valueOf():null},format:function(e,i){return t(e).format(i)},add:function(e,i,n){return t(e).add(i,n).valueOf()},diff:function(e,i,n){return t.duration(t(e).diff(t(i))).as(n)},startOf:function(e,i,n){return e=t(e),"isoWeek"===i?e.isoWeekday(n).valueOf():e.startOf(i).valueOf()},endOf:function(e,i){return t(e).endOf(i).valueOf()},_create:function(e){return t(e)}}:{}),st._set("global",{plugins:{filler:{propagate:!0}}});var nn={dataset:function(t){var e=t.fill,i=t.chart,n=i.getDatasetMeta(e),a=n&&i.isDatasetVisible(e)&&n.dataset._children||[],o=a.length||0;return o?function(t,e){return e=i)&&n;switch(o){case"bottom":return"start";case"top":return"end";case"zero":return"origin";case"origin":case"start":case"end":return o;default:return!1}}function on(t){var e,i=t.el._model||{},n=t.el._scale||{},a=t.fill,o=null;if(isFinite(a))return null;if("start"===a?o=void 0===i.scaleBottom?n.bottom:i.scaleBottom:"end"===a?o=void 0===i.scaleTop?n.top:i.scaleTop:void 0!==i.scaleZero?o=i.scaleZero:n.getBasePosition?o=n.getBasePosition():n.getBasePixel&&(o=n.getBasePixel()),null!=o){if(void 0!==o.x&&void 0!==o.y)return o;if(ut.isFinite(o))return{x:(e=n.isHorizontal())?o:null,y:e?null:o}}return null}function rn(t,e,i){var n,a=t[e].fill,o=[e];if(!i)return a;for(;!1!==a&&-1===o.indexOf(a);){if(!isFinite(a))return a;if(!(n=t[a]))return!1;if(n.visible)return a;o.push(a),a=n.fill}return!1}function sn(t){var e=t.fill,i="dataset";return!1===e?null:(isFinite(e)||(i="boundary"),nn[i](t))}function ln(t){return t&&!t.skip}function dn(t,e,i,n,a){var o;if(n&&a){for(t.moveTo(e[0].x,e[0].y),o=1;o0;--o)ut.canvas.lineTo(t,i[o],i[o-1],!0)}}var un={id:"filler",afterDatasetsUpdate:function(t,e){var i,n,a,o,r=(t.data.datasets||[]).length,s=e.propagate,l=[];for(n=0;ne?e:t.boxWidth}st._set("global",{legend:{display:!0,position:"top",fullWidth:!0,reverse:!1,weight:1e3,onClick:function(t,e){var i=e.datasetIndex,n=this.chart,a=n.getDatasetMeta(i);a.hidden=null===a.hidden?!n.data.datasets[i].hidden:null,n.update()},onHover:null,onLeave:null,labels:{boxWidth:40,padding:10,generateLabels:function(t){var e=t.data;return ut.isArray(e.datasets)?e.datasets.map(function(e,i){return{text:e.label,fillStyle:ut.isArray(e.backgroundColor)?e.backgroundColor[0]:e.backgroundColor,hidden:!t.isDatasetVisible(i),lineCap:e.borderCapStyle,lineDash:e.borderDash,lineDashOffset:e.borderDashOffset,lineJoin:e.borderJoinStyle,lineWidth:e.borderWidth,strokeStyle:e.borderColor,pointStyle:e.pointStyle,datasetIndex:i}},this):[]}}},legendCallback:function(t){var e=[];e.push('
    ');for(var i=0;i'),t.data.datasets[i].label&&e.push(t.data.datasets[i].label),e.push("");return e.push("
"),e.join("")}});var gn=pt.extend({initialize:function(t){ut.extend(this,t),this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1},beforeUpdate:hn,update:function(t,e,i){var n=this;return n.beforeUpdate(),n.maxWidth=t,n.maxHeight=e,n.margins=i,n.beforeSetDimensions(),n.setDimensions(),n.afterSetDimensions(),n.beforeBuildLabels(),n.buildLabels(),n.afterBuildLabels(),n.beforeFit(),n.fit(),n.afterFit(),n.afterUpdate(),n.minSize},afterUpdate:hn,beforeSetDimensions:hn,setDimensions:function(){var t=this;t.isHorizontal()?(t.width=t.maxWidth,t.left=0,t.right=t.width):(t.height=t.maxHeight,t.top=0,t.bottom=t.height),t.paddingLeft=0,t.paddingTop=0,t.paddingRight=0,t.paddingBottom=0,t.minSize={width:0,height:0}},afterSetDimensions:hn,beforeBuildLabels:hn,buildLabels:function(){var t=this,e=t.options.labels||{},i=ut.callback(e.generateLabels,[t.chart],t)||[];e.filter&&(i=i.filter(function(i){return e.filter(i,t.chart.data)})),t.options.reverse&&i.reverse(),t.legendItems=i},afterBuildLabels:hn,beforeFit:hn,fit:function(){var t=this,e=t.options,i=e.labels,n=e.display,a=t.ctx,o=ut.options._parseFont(i),r=o.size,s=t.legendHitBoxes=[],l=t.minSize,d=t.isHorizontal();if(d?(l.width=t.maxWidth,l.height=n?10:0):(l.width=n?10:0,l.height=t.maxHeight),n)if(a.font=o.string,d){var u=t.lineWidths=[0],h=0;a.textAlign="left",a.textBaseline="top",ut.each(t.legendItems,function(t,e){var n=fn(i,r)+r/2+a.measureText(t.text).width;(0===e||u[u.length-1]+n+i.padding>l.width)&&(h+=r+i.padding,u[u.length-(e>0?0:1)]=i.padding),s[e]={left:0,top:0,width:n,height:r},u[u.length-1]+=n+i.padding}),l.height+=h}else{var c=i.padding,f=t.columnWidths=[],g=i.padding,p=0,m=0,v=r+c;ut.each(t.legendItems,function(t,e){var n=fn(i,r)+r/2+a.measureText(t.text).width;e>0&&m+v>l.height-c&&(g+=p+i.padding,f.push(p),p=0,m=0),p=Math.max(p,n),m+=v,s[e]={left:0,top:0,width:n,height:r}}),g+=p,f.push(p),l.width+=g}t.width=l.width,t.height=l.height},afterFit:hn,isHorizontal:function(){return"top"===this.options.position||"bottom"===this.options.position},draw:function(){var t=this,e=t.options,i=e.labels,n=st.global,a=n.defaultColor,o=n.elements.line,r=t.width,s=t.lineWidths;if(e.display){var l,d=t.ctx,u=cn(i.fontColor,n.defaultFontColor),h=ut.options._parseFont(i),c=h.size;d.textAlign="left",d.textBaseline="middle",d.lineWidth=.5,d.strokeStyle=u,d.fillStyle=u,d.font=h.string;var f=fn(i,c),g=t.legendHitBoxes,p=t.isHorizontal();l=p?{x:t.left+(r-s[0])/2+i.padding,y:t.top+i.padding,line:0}:{x:t.left+i.padding,y:t.top+i.padding,line:0};var m=c+i.padding;ut.each(t.legendItems,function(n,u){var h=d.measureText(n.text).width,v=f+c/2+h,b=l.x,x=l.y;p?u>0&&b+v+i.padding>t.left+t.minSize.width&&(x=l.y+=m,l.line++,b=l.x=t.left+(r-s[l.line])/2+i.padding):u>0&&x+m>t.top+t.minSize.height&&(b=l.x=b+t.columnWidths[l.line]+i.padding,x=l.y=t.top+i.padding,l.line++),function(t,i,n){if(!(isNaN(f)||f<=0)){d.save();var r=cn(n.lineWidth,o.borderWidth);if(d.fillStyle=cn(n.fillStyle,a),d.lineCap=cn(n.lineCap,o.borderCapStyle),d.lineDashOffset=cn(n.lineDashOffset,o.borderDashOffset),d.lineJoin=cn(n.lineJoin,o.borderJoinStyle),d.lineWidth=r,d.strokeStyle=cn(n.strokeStyle,a),d.setLineDash&&d.setLineDash(cn(n.lineDash,o.borderDash)),e.labels&&e.labels.usePointStyle){var s=f*Math.SQRT2/2,l=t+f/2,u=i+c/2;ut.canvas.drawPoint(d,n.pointStyle,s,l,u)}else 0!==r&&d.strokeRect(t,i,f,c),d.fillRect(t,i,f,c);d.restore()}}(b,x,n),g[u].left=b,g[u].top=x,function(t,e,i,n){var a=c/2,o=f+a+t,r=e+a;d.fillText(i.text,o,r),i.hidden&&(d.beginPath(),d.lineWidth=2,d.moveTo(o,r),d.lineTo(o+n,r),d.stroke())}(b,x,n,h),p?l.x+=v+i.padding:l.y+=m})}},_getLegendItemAt:function(t,e){var i,n,a,o=this;if(t>=o.left&&t<=o.right&&e>=o.top&&e<=o.bottom)for(a=o.legendHitBoxes,i=0;i=(n=a[i]).left&&t<=n.left+n.width&&e>=n.top&&e<=n.top+n.height)return o.legendItems[i];return null},handleEvent:function(t){var e,i=this,n=i.options,a="mouseup"===t.type?"click":t.type;if("mousemove"===a){if(!n.onHover&&!n.onLeave)return}else{if("click"!==a)return;if(!n.onClick)return}e=i._getLegendItemAt(t.x,t.y),"click"===a?e&&n.onClick&&n.onClick.call(i,t.native,e):(n.onLeave&&e!==i._hoveredItem&&(i._hoveredItem&&n.onLeave.call(i,t.native,i._hoveredItem),i._hoveredItem=e),n.onHover&&e&&n.onHover.call(i,t.native,e))}});function pn(t,e){var i=new gn({ctx:t.ctx,options:e,chart:t});ke.configure(t,i,e),ke.addBox(t,i),t.legend=i}var mn={id:"legend",_element:gn,beforeInit:function(t){var e=t.options.legend;e&&pn(t,e)},beforeUpdate:function(t){var e=t.options.legend,i=t.legend;e?(ut.mergeIf(e,st.global.legend),i?(ke.configure(t,i,e),i.options=e):pn(t,e)):i&&(ke.removeBox(t,i),delete t.legend)},afterEvent:function(t,e){var i=t.legend;i&&i.handleEvent(e)}},vn=ut.noop;st._set("global",{title:{display:!1,fontStyle:"bold",fullWidth:!0,padding:10,position:"top",text:"",weight:2e3}});var bn=pt.extend({initialize:function(t){ut.extend(this,t),this.legendHitBoxes=[]},beforeUpdate:vn,update:function(t,e,i){var n=this;return n.beforeUpdate(),n.maxWidth=t,n.maxHeight=e,n.margins=i,n.beforeSetDimensions(),n.setDimensions(),n.afterSetDimensions(),n.beforeBuildLabels(),n.buildLabels(),n.afterBuildLabels(),n.beforeFit(),n.fit(),n.afterFit(),n.afterUpdate(),n.minSize},afterUpdate:vn,beforeSetDimensions:vn,setDimensions:function(){var t=this;t.isHorizontal()?(t.width=t.maxWidth,t.left=0,t.right=t.width):(t.height=t.maxHeight,t.top=0,t.bottom=t.height),t.paddingLeft=0,t.paddingTop=0,t.paddingRight=0,t.paddingBottom=0,t.minSize={width:0,height:0}},afterSetDimensions:vn,beforeBuildLabels:vn,buildLabels:vn,afterBuildLabels:vn,beforeFit:vn,fit:function(){var t=this,e=t.options,i=e.display,n=t.minSize,a=ut.isArray(e.text)?e.text.length:1,o=ut.options._parseFont(e),r=i?a*o.lineHeight+2*e.padding:0;t.isHorizontal()?(n.width=t.maxWidth,n.height=r):(n.width=r,n.height=t.maxHeight),t.width=n.width,t.height=n.height},afterFit:vn,isHorizontal:function(){var t=this.options.position;return"top"===t||"bottom"===t},draw:function(){var t=this,e=t.ctx,i=t.options;if(i.display){var n,a,o,r=ut.options._parseFont(i),s=r.lineHeight,l=s/2+i.padding,d=0,u=t.top,h=t.left,c=t.bottom,f=t.right;e.fillStyle=ut.valueOrDefault(i.fontColor,st.global.defaultFontColor),e.font=r.string,t.isHorizontal()?(a=h+(f-h)/2,o=u+l,n=f-h):(a="left"===i.position?h+l:f-l,o=u+(c-u)/2,n=c-u,d=Math.PI*("left"===i.position?-.5:.5)),e.save(),e.translate(a,o),e.rotate(d),e.textAlign="center",e.textBaseline="middle";var g=i.text;if(ut.isArray(g))for(var p=0,m=0;m=0;n--){var a=t[n];if(e(a))return a}},ut.isNumber=function(t){return!isNaN(parseFloat(t))&&isFinite(t)},ut.almostEquals=function(t,e,i){return Math.abs(t-e)t},ut.max=function(t){return t.reduce(function(t,e){return isNaN(e)?t:Math.max(t,e)},Number.NEGATIVE_INFINITY)},ut.min=function(t){return t.reduce(function(t,e){return isNaN(e)?t:Math.min(t,e)},Number.POSITIVE_INFINITY)},ut.sign=Math.sign?function(t){return Math.sign(t)}:function(t){return 0==(t=+t)||isNaN(t)?t:t>0?1:-1},ut.log10=Math.log10?function(t){return Math.log10(t)}:function(t){var e=Math.log(t)*Math.LOG10E,i=Math.round(e);return t===Math.pow(10,i)?i:e},ut.toRadians=function(t){return t*(Math.PI/180)},ut.toDegrees=function(t){return t*(180/Math.PI)},ut._decimalPlaces=function(t){if(ut.isFinite(t)){for(var e=1,i=0;Math.round(t*e)/e!==t;)e*=10,i++;return i}},ut.getAngleFromPoint=function(t,e){var i=e.x-t.x,n=e.y-t.y,a=Math.sqrt(i*i+n*n),o=Math.atan2(n,i);return o<-.5*Math.PI&&(o+=2*Math.PI),{angle:o,distance:a}},ut.distanceBetweenPoints=function(t,e){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))},ut.aliasPixel=function(t){return t%2==0?0:.5},ut._alignPixel=function(t,e,i){var n=t.currentDevicePixelRatio,a=i/2;return Math.round((e-a)*n)/n+a},ut.splineCurve=function(t,e,i,n){var a=t.skip?e:t,o=e,r=i.skip?e:i,s=Math.sqrt(Math.pow(o.x-a.x,2)+Math.pow(o.y-a.y,2)),l=Math.sqrt(Math.pow(r.x-o.x,2)+Math.pow(r.y-o.y,2)),d=s/(s+l),u=l/(s+l),h=n*(d=isNaN(d)?0:d),c=n*(u=isNaN(u)?0:u);return{previous:{x:o.x-h*(r.x-a.x),y:o.y-h*(r.y-a.y)},next:{x:o.x+c*(r.x-a.x),y:o.y+c*(r.y-a.y)}}},ut.EPSILON=Number.EPSILON||1e-14,ut.splineCurveMonotone=function(t){var e,i,n,a,o,r,s,l,d,u=(t||[]).map(function(t){return{model:t._model,deltaK:0,mK:0}}),h=u.length;for(e=0;e0?u[e-1]:null,(a=e0?u[e-1]:null,a=e=t.length-1?t[0]:t[e+1]:e>=t.length-1?t[t.length-1]:t[e+1]},ut.previousItem=function(t,e,i){return i?e<=0?t[t.length-1]:t[e-1]:e<=0?t[0]:t[e-1]},ut.niceNum=function(t,e){var i=Math.floor(ut.log10(t)),n=t/Math.pow(10,i);return(e?n<1.5?1:n<3?2:n<7?5:10:n<=1?1:n<=2?2:n<=5?5:10)*Math.pow(10,i)},ut.requestAnimFrame="undefined"==typeof window?function(t){t()}:window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(t){return window.setTimeout(t,1e3/60)},ut.getRelativePosition=function(t,e){var i,n,a=t.originalEvent||t,o=t.target||t.srcElement,r=o.getBoundingClientRect(),s=a.touches;s&&s.length>0?(i=s[0].clientX,n=s[0].clientY):(i=a.clientX,n=a.clientY);var l=parseFloat(ut.getStyle(o,"padding-left")),d=parseFloat(ut.getStyle(o,"padding-top")),u=parseFloat(ut.getStyle(o,"padding-right")),h=parseFloat(ut.getStyle(o,"padding-bottom")),c=r.right-r.left-l-u,f=r.bottom-r.top-d-h;return{x:i=Math.round((i-r.left-l)/c*o.width/e.currentDevicePixelRatio),y:n=Math.round((n-r.top-d)/f*o.height/e.currentDevicePixelRatio)}},ut.getConstraintWidth=function(t){return i(t,"max-width","clientWidth")},ut.getConstraintHeight=function(t){return i(t,"max-height","clientHeight")},ut._calculatePadding=function(t,e,i){return(e=ut.getStyle(t,e)).indexOf("%")>-1?i*parseInt(e,10)/100:parseInt(e,10)},ut._getParentNode=function(t){var e=t.parentNode;return e&&"[object ShadowRoot]"===e.toString()&&(e=e.host),e},ut.getMaximumWidth=function(t){var e=ut._getParentNode(t);if(!e)return t.clientWidth;var i=e.clientWidth,n=i-ut._calculatePadding(e,"padding-left",i)-ut._calculatePadding(e,"padding-right",i),a=ut.getConstraintWidth(t);return isNaN(a)?n:Math.min(n,a)},ut.getMaximumHeight=function(t){var e=ut._getParentNode(t);if(!e)return t.clientHeight;var i=e.clientHeight,n=i-ut._calculatePadding(e,"padding-top",i)-ut._calculatePadding(e,"padding-bottom",i),a=ut.getConstraintHeight(t);return isNaN(a)?n:Math.min(n,a)},ut.getStyle=function(t,e){return t.currentStyle?t.currentStyle[e]:document.defaultView.getComputedStyle(t,null).getPropertyValue(e)},ut.retinaScale=function(t,e){var i=t.currentDevicePixelRatio=e||"undefined"!=typeof window&&window.devicePixelRatio||1;if(1!==i){var n=t.canvas,a=t.height,o=t.width;n.height=a*i,n.width=o*i,t.ctx.scale(i,i),n.style.height||n.style.width||(n.style.height=a+"px",n.style.width=o+"px")}},ut.fontString=function(t,e,i){return e+" "+t+"px "+i},ut.longestText=function(t,e,i,n){var a=(n=n||{}).data=n.data||{},o=n.garbageCollect=n.garbageCollect||[];n.font!==e&&(a=n.data={},o=n.garbageCollect=[],n.font=e),t.font=e;var r=0;ut.each(i,function(e){null!=e&&!0!==ut.isArray(e)?r=ut.measureText(t,a,o,r,e):ut.isArray(e)&&ut.each(e,function(e){null==e||ut.isArray(e)||(r=ut.measureText(t,a,o,r,e))})});var s=o.length/2;if(s>i.length){for(var l=0;ln&&(n=o),n},ut.numberOfLabelLines=function(t){var e=1;return ut.each(t,function(t){ut.isArray(t)&&t.length>e&&(e=t.length)}),e},ut.color=X?function(t){return t instanceof CanvasGradient&&(t=st.global.defaultColor),X(t)}:function(t){return console.error("Color.js not found!"),t},ut.getHoverColor=function(t){return t instanceof CanvasPattern||t instanceof CanvasGradient?t:ut.color(t).saturate(.5).darken(.1).rgbString()}}(),ai._adapters=si,ai.Animation=vt,ai.animationService=bt,ai.controllers=ue,ai.DatasetController=Mt,ai.defaults=st,ai.Element=pt,ai.elements=Wt,ai.Interaction=ve,ai.layouts=ke,ai.platform=Ve,ai.plugins=Ee,ai.Scale=fi,ai.scaleService=He,ai.Ticks=li,ai.Tooltip=Je,ai.helpers.each(tn,function(t,e){ai.scaleService.registerScaleType(e,t,t._defaults)}),yn)yn.hasOwnProperty(_n)&&ai.plugins.register(yn[_n]);ai.platform.initialize();var Cn=ai;return"undefined"!=typeof window&&(window.Chart=ai),ai.Chart=ai,ai.Legend=yn.legend._element,ai.Title=yn.title._element,ai.pluginService=ai.plugins,ai.PluginBase=ai.Element.extend({}),ai.canvasHelpers=ai.helpers.canvas,ai.layoutService=ai.layouts,ai.LinearScaleBase=bi,ai.helpers.each(["Bar","Bubble","Doughnut","Line","PolarArea","Radar","Scatter"],function(t){ai[t]=function(e,i){return new ai(e,ai.helpers.merge(i||{},{type:t.charAt(0).toLowerCase()+t.slice(1)}))}}),Cn}); diff --git a/vendor/crowdfunding2/lib/js/counter.js b/vendor/crowdfunding2/lib/js/counter.js new file mode 100755 index 0000000..db39dea --- /dev/null +++ b/vendor/crowdfunding2/lib/js/counter.js @@ -0,0 +1,45 @@ +$(document).ready(function(){ + var selector = $('.count'); + var replay = 'replay' + + function isScrolledIntoView(el) { + var docViewTop = $(window).scrollTop(); + var docViewBottom = docViewTop + $(window).height(); + var elTop = el.offset().top; + var elBottom = elTop + el.height(); + return ((elBottom <= docViewBottom) && (elTop >= docViewTop)); + } + + function animate_numbers(element) { + if (isScrolledIntoView(element)) { + element.addClass('started').css('visibility','visible') + var startnum = element.text(); + if(element.text() % 1 === 0 && $.isNumeric(element.text())) { + var step = function () { element.text(Math.ceil(this.Counter)); } + } else if(element.text() % 1 !== 0 && $.isNumeric(element.text())) { + var step = function () { element.text(this.Counter.toFixed(2)); } + } + jQuery({ Counter: 0 }).animate({ Counter: element.text() }, { + duration : 2000, + complete: function() { element.text($.trim(startnum)).addClass('finished').removeClass('started'); }, + step: step + }); + } + } + + selector.each(function () { + /*$(this).css('visibility','hidden');*/ /* This sometimes causes numbers to not display at all.*/ + animate_numbers($(this)); + }); + + $(document).on("scroll", function () { + selector.not('.finished, .started').each(function () { + animate_numbers($(this)); + }); + selector.each(function () { + if(!isScrolledIntoView($(this)) && $(this).hasClass(replay)) { + $(this).removeClass('finished'); + } + }); + }); +}); \ No newline at end of file diff --git a/vendor/crowdfunding2/lib/js/generate.js b/vendor/crowdfunding2/lib/js/generate.js new file mode 100755 index 0000000..bb406cd --- /dev/null +++ b/vendor/crowdfunding2/lib/js/generate.js @@ -0,0 +1,403 @@ +(function ($) { + "use strict"; + + /*[ Smooth Scroll ] + ===========================================================*/ + $('#smooth-scroll').on('click', function() { + + var page = $(this).attr('href'); + + $('html, body').animate( { scrollTop: $(page).offset().top }, 750 ); + + return false; + }); + + /*[ Back to top ] + ===========================================================*/ + var windowH = $(window).height()*1.2; + + $(window).on('scroll',function(){ + + if ($(this).scrollTop() > windowH) { + + $("#back-to-top").css('display','flex'); + + } else { + + $("#back-to-top").css('display','none'); + + } + }); + + $('#back-to-top').on("click", function(){ + + $('html, body').animate({scrollTop: $('#content').offset().top}, 300); + }); + + /*[ onLoad/onChange : Update IHM & params ] + ===========================================================*/ + var type = 'iframe'; + + function resetForm(){ + + type= 'iframe'; + + url = base_url + 'iframe.php'; + + $('#type option[value="iframe"]').prop('selected', true); + $('#pubkey').val(''); + $('#target').val(''); + $('#title').val(''); + $('#theme').val('paidge'); + $('#unit option[value="quantitative"]').prop('selected', true); + $('#lang option[value="fr"]').prop('selected', true); + $('#node').val(''); + $('#period option[value="current-monh"]').prop('selected', true); + $('#start_date').val(''); + $('#end_date').val(''); + $('#p-start_date').addClass("w3-hide"); + $('#p-end_date').addClass("w3-hide"); + $('#hide_title').prop( "checked", false ); + $('#display_pubkey').prop( "checked", false ); + $('#display_qrcode').prop( "checked", false ); + $('#display_button').prop( "checked", false ); + $('#display_graph').prop( "checked", false ); + $('#logo option[value="no-logo"]').prop('selected', true); + $('#p-logo').addClass("w3-hide"); + $('#p-display_button').removeClass("w3-hide"); + $('#p-display_graph').removeClass("w3-hide"); + $('#background_color').val('#ffffff'); + $('#font_color').val('#212529'); + $('#progress_color').val('#ffc107'); + $('#border_color').val('#343a40'); + $('#preview_label').addClass("w3-hide"); + $('#result').val(''); + + for (var param in params) { + + params[param] = ''; + } + } + $(window).on('load',resetForm); + + $('#type').on('change', function() { + type = this.value; + + switch (type) { + case 'iframe': + $('#p-logo').addClass("w3-hide"); + params['logo'] = ''; + $('#p-display_button').removeClass("w3-hide"); + $('#p-display_graph').removeClass("w3-hide"); + url = base_url + 'iframe.php'; + break; + case 'png': + $('#p-logo').removeClass("w3-hide"); + $('#p-display_button').addClass("w3-hide"); + $('#p-display_graph').addClass("w3-hide"); + params['display_button'] = ''; + params['display_graph'] = ''; + url = base_url + 'image.php'; + break; + case 'svg': + $('#p-logo').removeClass("w3-hide"); + $('#p-display_button').addClass("w3-hide"); + $('#p-display_graph').addClass("w3-hide"); + params['display_button'] = ''; + params['display_graph'] = ''; + url = base_url + 'svg.php'; + break; + default: + break; + } + }); + + var theme = 'paidge'; + + $('#theme').on('change', function() { + + theme = this.value; + + switch (theme) { + + case 'kickstarter': + $('#p-progress_color').addClass("w3-hide"); + $('#p-logo').addClass("w3-hide"); + $('#p-display-graph').addClass("w3-hide"); + + $('#p-display_button').removeClass("w3-hide"); + $('#p-display_button').removeClass("w3-hide"); + $('#p-display_qrcode').addClass("w3-hide"); + $('#p-display_pubkey').addClass("w3-hide"); + $('#p-display_graph').addClass("w3-hide"); + $('#p-hide_title').addClass("w3-hide"); + $('#p-border_color').addClass("w3-hide"); + $('#p-type').addClass("w3-hide"); + break; + + case 'paidge': + $('#p-progress_color').removeClass("w3-hide"); + $('#p-logo').removeClass("w3-hide"); + $('#p-display_button').addClass("w3-hide"); + $('#p-display_graph').addClass("w3-hide"); + $('#p-display_qrcode').removeClass("w3-hide"); + $('#p-display_pubkey').removeClass("w3-hide"); + $('#p-hide_title').removeClass("w3-hide"); + $('#p-border_color').removeClass("w3-hide"); + $('#p-display_graph').removeClass("w3-hide"); + $('#p-type').removeClass("w3-hide"); + params['display_button'] = ''; + params['display_graph'] = ''; + break; + default: + break; + } + }); + + $('#period').on('change', function() { + var period = this.value; + + switch (period) { + case 'current-monh': + $('#p-start_date').addClass("w3-hide"); + $('#p-end_date').addClass("w3-hide"); + params['start_date'] = ''; + params['end_date'] = ''; + break; + case 'one-date': + $('#p-start_date').removeClass("w3-hide"); + $('#p-end_date').addClass("w3-hide"); + params['end_date'] = ''; + break; + case 'two-dates': + $('#p-start_date').removeClass("w3-hide"); + $('#p-end_date').removeClass("w3-hide"); + break; + } + }); + + $('#hide_title').on('change', function() { params['hide_title'] = $('#hide_title').prop('checked') ? true : ''; }); + + $('#title').on('change', function() {params['title'] = encodeURIComponent(this.value);}); + $('#theme').on('change', function() {params['theme'] = encodeURIComponent(this.value);}); + $('#unit').on('change', function() {params['unit'] = this.value;}); + $('#lang').on('change', function() {params['lang'] = this.value;}); + $('#node').on('change', function() {params['node'] = this.value;}); + $('#start_date').on('change', function() {params['start_date'] = this.value;}); + $('#end_date').on('change', function() {params['end_date'] = this.value;}); + + $('#display_pubkey').on('change', function() {params['display_pubkey'] = $('#display_pubkey').prop('checked') ? true : '';}); + $('#display_qrcode').on('change', function() {params['display_qrcode'] = $('#display_qrcode').prop('checked') ? true : '';}); + $('#display_button').on('change', function() {params['display_button'] = $('#display_button').prop('checked') ? true : '';}); + $('#display_graph').on('change', function() {params['display_graph'] = $('#display_graph').prop('checked') ? true : '';}); + $('#logo').on('change', function() {params['logo'] = $('#logo').val();}); + $('#background_color').on('change', function() {params['background_color'] = this.value.substr(1);}); + $('#font_color').on('change', function() {params['font_color'] = this.value.substr(1);}); + $('#progress_color').on('change', function() {params['progress_color'] = this.value.substr(1);}); + $('#border_color').on('change', function() {params['border_color'] = this.value.substr(1);}); + + /*[ Generate URL ] + ===========================================================*/ + var base_url = document.location.href; + base_url = base_url.substr(0,base_url.lastIndexOf('/')+1); + var url = base_url+'iframe.php'; + + var params = { + + 'title' : '', + 'theme' : '', + 'unit' : '', + 'lang' : '', + 'node' : '', + 'start_date' : '', + 'end_date' : '', + 'hide_title' : '', + 'display_pubkey' : '', + 'display_qrcode' : '', + 'display_button' : '', + 'display_graph' : '', + 'logo' : '', + 'background_color' : '', + 'font_color' : '', + 'progress_color' : '', + 'border_color' : '' + }; + + function generateFullUrl (pubkey, target) { + + var fullUrl = ''; + + fullUrl += url; + + fullUrl += '?pubkey=' + pubkey; + + fullUrl += '&target=' + target; + + for (var param in params) { + + if (params[param] !== '') { + + fullUrl += '&'+param+'='+params[param]; + } + } + + return fullUrl; + } + + function generateHTM (fullUrl, integrationType, title) { + + fullUrl = fullUrl.replace('&', '&'); + + switch (integrationType) { + + case 'iframe': + + return ''; + + case 'png': + + return '' + title + ''; + + case 'svg': + + return ''; + } + + } + + function generateBBCode (fullUrl, integrationType, title) { + + switch (integrationType) { + + case 'iframe': + + return '[url=' + fullUrl + ']'+ title + '[/url]'; + + case 'png': + + return '[img]' + fullUrl + '[/url]'; + + case 'svg': + + return '[img]' + fullUrl + '[/url]'; + } + + } + + function generateMarkdown (fullUrl, integrationType, title) { + + switch (integrationType) { + + case 'iframe': + + return '[' + title + '](' + fullUrl + ')'; + + case 'png': + + return '\![](' + fullUrl + ')'; + + case 'svg': + + return '\![](' + fullUrl + ')'; + } + + } + + function generateWikitext (fullUrl, integrationType, title) { + + switch (integrationType) { + + case 'iframe': + + return '[[' + fullUrl + '|' + title + ']]'; + + case 'png': + + return '[[' + fullUrl + '|{{' + fullUrl + '}}]]'; + + case 'svg': + + return '[[' + fullUrl + '|{{' + fullUrl + '}}]]'; + } + + } + + $('#submit').on("click", function() { + + if (document.getElementById("pubkey").checkValidity() + && document.getElementById("target").checkValidity()) { + + var pubkeyVal = $('#pubkey').val(); + var targetVal = $('#target').val(); + + var fullUrl = generateFullUrl(pubkeyVal, targetVal); + + var title = decodeURIComponent(params['title']); + + var htm = generateHTM(fullUrl, type, title); + var bbcode = generateBBCode(fullUrl, type, title); + var markdown = generateMarkdown(fullUrl, type, title); + var wikitext = generateWikitext(fullUrl, type, title); + + $('form').on("submit", function() { + + $('#preview_label').removeClass("w3-hide"); + $('#preview').css("visibility","hidden"); + $('#preview').children().remove(); + + $('#integration-instructions').removeClass("w3-hide"); + + $('#htm').val(htm); + $('#bbcode').val(bbcode); + $('#markdown').val(markdown); + $('#wikitext').val(wikitext); + + $('html, body').animate({scrollTop: $('#display_result').offset().top}, 750); + + + $('#preview').append(htm); + + if (type == 'iframe') { + + $('iframe').on('load', function() { + + var iframe_height = document.getElementsByTagName('iframe')[0].contentWindow.document.body.scrollHeight; + $('iframe').height(iframe_height); + + // Pour relancer l'animation + $('#preview').html($('#preview').html()); + }); + } + + $('#htm').focus(); + $('.buttons').removeClass("w3-hide"); + + setTimeout(function(){ + + $('#preview').css("visibility","visible"); + $('#integration-instructions').css("visibility","visible"); + + }, 1000); + + return false; + }); + } + }); + + /*[ Reset ] + ===========================================================*/ + + $('#reset').on("click", function(){ + + $('#result').val(''); + + resetForm(); + + $('html, body').animate({scrollTop: $('#content').offset().top}, 300); + + $('#buttons').addClass("w3-hide"); + + $('#preview').children().remove(); + }); + +})(jQuery); \ No newline at end of file diff --git a/vendor/crowdfunding2/lib/js/jquery-3.4.1.min.js b/vendor/crowdfunding2/lib/js/jquery-3.4.1.min.js new file mode 100755 index 0000000..a1c07fd --- /dev/null +++ b/vendor/crowdfunding2/lib/js/jquery-3.4.1.min.js @@ -0,0 +1,2 @@ +/*! jQuery v3.4.1 | (c) JS Foundation and other contributors | jquery.org/license */ +!function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(C,e){"use strict";var t=[],E=C.document,r=Object.getPrototypeOf,s=t.slice,g=t.concat,u=t.push,i=t.indexOf,n={},o=n.toString,v=n.hasOwnProperty,a=v.toString,l=a.call(Object),y={},m=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType},x=function(e){return null!=e&&e===e.window},c={type:!0,src:!0,nonce:!0,noModule:!0};function b(e,t,n){var r,i,o=(n=n||E).createElement("script");if(o.text=e,t)for(r in c)(i=t[r]||t.getAttribute&&t.getAttribute(r))&&o.setAttribute(r,i);n.head.appendChild(o).parentNode.removeChild(o)}function w(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?n[o.call(e)]||"object":typeof e}var f="3.4.1",k=function(e,t){return new k.fn.init(e,t)},p=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;function d(e){var t=!!e&&"length"in e&&e.length,n=w(e);return!m(e)&&!x(e)&&("array"===n||0===t||"number"==typeof t&&0+~]|"+M+")"+M+"*"),U=new RegExp(M+"|>"),X=new RegExp($),V=new RegExp("^"+I+"$"),G={ID:new RegExp("^#("+I+")"),CLASS:new RegExp("^\\.("+I+")"),TAG:new RegExp("^("+I+"|[*])"),ATTR:new RegExp("^"+W),PSEUDO:new RegExp("^"+$),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+M+"*(even|odd|(([+-]|)(\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\d+)|))"+M+"*\\)|)","i"),bool:new RegExp("^(?:"+R+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+M+"*((?:-\\d)?\\d*)"+M+"*\\)|)(?=[^-]|$)","i")},Y=/HTML$/i,Q=/^(?:input|select|textarea|button)$/i,J=/^h\d$/i,K=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ee=/[+~]/,te=new RegExp("\\\\([\\da-f]{1,6}"+M+"?|("+M+")|.)","ig"),ne=function(e,t,n){var r="0x"+t-65536;return r!=r||n?t:r<0?String.fromCharCode(r+65536):String.fromCharCode(r>>10|55296,1023&r|56320)},re=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ie=function(e,t){return t?"\0"===e?"\ufffd":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},oe=function(){T()},ae=be(function(e){return!0===e.disabled&&"fieldset"===e.nodeName.toLowerCase()},{dir:"parentNode",next:"legend"});try{H.apply(t=O.call(m.childNodes),m.childNodes),t[m.childNodes.length].nodeType}catch(e){H={apply:t.length?function(e,t){L.apply(e,O.call(t))}:function(e,t){var n=e.length,r=0;while(e[n++]=t[r++]);e.length=n-1}}}function se(t,e,n,r){var i,o,a,s,u,l,c,f=e&&e.ownerDocument,p=e?e.nodeType:9;if(n=n||[],"string"!=typeof t||!t||1!==p&&9!==p&&11!==p)return n;if(!r&&((e?e.ownerDocument||e:m)!==C&&T(e),e=e||C,E)){if(11!==p&&(u=Z.exec(t)))if(i=u[1]){if(9===p){if(!(a=e.getElementById(i)))return n;if(a.id===i)return n.push(a),n}else if(f&&(a=f.getElementById(i))&&y(e,a)&&a.id===i)return n.push(a),n}else{if(u[2])return H.apply(n,e.getElementsByTagName(t)),n;if((i=u[3])&&d.getElementsByClassName&&e.getElementsByClassName)return H.apply(n,e.getElementsByClassName(i)),n}if(d.qsa&&!A[t+" "]&&(!v||!v.test(t))&&(1!==p||"object"!==e.nodeName.toLowerCase())){if(c=t,f=e,1===p&&U.test(t)){(s=e.getAttribute("id"))?s=s.replace(re,ie):e.setAttribute("id",s=k),o=(l=h(t)).length;while(o--)l[o]="#"+s+" "+xe(l[o]);c=l.join(","),f=ee.test(t)&&ye(e.parentNode)||e}try{return H.apply(n,f.querySelectorAll(c)),n}catch(e){A(t,!0)}finally{s===k&&e.removeAttribute("id")}}}return g(t.replace(B,"$1"),e,n,r)}function ue(){var r=[];return function e(t,n){return r.push(t+" ")>b.cacheLength&&delete e[r.shift()],e[t+" "]=n}}function le(e){return e[k]=!0,e}function ce(e){var t=C.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function fe(e,t){var n=e.split("|"),r=n.length;while(r--)b.attrHandle[n[r]]=t}function pe(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function de(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function he(n){return function(e){var t=e.nodeName.toLowerCase();return("input"===t||"button"===t)&&e.type===n}}function ge(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&ae(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function ve(a){return le(function(o){return o=+o,le(function(e,t){var n,r=a([],e.length,o),i=r.length;while(i--)e[n=r[i]]&&(e[n]=!(t[n]=e[n]))})})}function ye(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}for(e in d=se.support={},i=se.isXML=function(e){var t=e.namespaceURI,n=(e.ownerDocument||e).documentElement;return!Y.test(t||n&&n.nodeName||"HTML")},T=se.setDocument=function(e){var t,n,r=e?e.ownerDocument||e:m;return r!==C&&9===r.nodeType&&r.documentElement&&(a=(C=r).documentElement,E=!i(C),m!==C&&(n=C.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",oe,!1):n.attachEvent&&n.attachEvent("onunload",oe)),d.attributes=ce(function(e){return e.className="i",!e.getAttribute("className")}),d.getElementsByTagName=ce(function(e){return e.appendChild(C.createComment("")),!e.getElementsByTagName("*").length}),d.getElementsByClassName=K.test(C.getElementsByClassName),d.getById=ce(function(e){return a.appendChild(e).id=k,!C.getElementsByName||!C.getElementsByName(k).length}),d.getById?(b.filter.ID=function(e){var t=e.replace(te,ne);return function(e){return e.getAttribute("id")===t}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n=t.getElementById(e);return n?[n]:[]}}):(b.filter.ID=function(e){var n=e.replace(te,ne);return function(e){var t="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return t&&t.value===n}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];i=t.getElementsByName(e),r=0;while(o=i[r++])if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),b.find.TAG=d.getElementsByTagName?function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):d.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},b.find.CLASS=d.getElementsByClassName&&function(e,t){if("undefined"!=typeof t.getElementsByClassName&&E)return t.getElementsByClassName(e)},s=[],v=[],(d.qsa=K.test(C.querySelectorAll))&&(ce(function(e){a.appendChild(e).innerHTML="",e.querySelectorAll("[msallowcapture^='']").length&&v.push("[*^$]="+M+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||v.push("\\["+M+"*(?:value|"+R+")"),e.querySelectorAll("[id~="+k+"-]").length||v.push("~="),e.querySelectorAll(":checked").length||v.push(":checked"),e.querySelectorAll("a#"+k+"+*").length||v.push(".#.+[+~]")}),ce(function(e){e.innerHTML="";var t=C.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&v.push("name"+M+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&v.push(":enabled",":disabled"),a.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&v.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),v.push(",.*:")})),(d.matchesSelector=K.test(c=a.matches||a.webkitMatchesSelector||a.mozMatchesSelector||a.oMatchesSelector||a.msMatchesSelector))&&ce(function(e){d.disconnectedMatch=c.call(e,"*"),c.call(e,"[s!='']:x"),s.push("!=",$)}),v=v.length&&new RegExp(v.join("|")),s=s.length&&new RegExp(s.join("|")),t=K.test(a.compareDocumentPosition),y=t||K.test(a.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},D=t?function(e,t){if(e===t)return l=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!d.sortDetached&&t.compareDocumentPosition(e)===n?e===C||e.ownerDocument===m&&y(m,e)?-1:t===C||t.ownerDocument===m&&y(m,t)?1:u?P(u,e)-P(u,t):0:4&n?-1:1)}:function(e,t){if(e===t)return l=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,a=[e],s=[t];if(!i||!o)return e===C?-1:t===C?1:i?-1:o?1:u?P(u,e)-P(u,t):0;if(i===o)return pe(e,t);n=e;while(n=n.parentNode)a.unshift(n);n=t;while(n=n.parentNode)s.unshift(n);while(a[r]===s[r])r++;return r?pe(a[r],s[r]):a[r]===m?-1:s[r]===m?1:0}),C},se.matches=function(e,t){return se(e,null,null,t)},se.matchesSelector=function(e,t){if((e.ownerDocument||e)!==C&&T(e),d.matchesSelector&&E&&!A[t+" "]&&(!s||!s.test(t))&&(!v||!v.test(t)))try{var n=c.call(e,t);if(n||d.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){A(t,!0)}return 0":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(te,ne),e[3]=(e[3]||e[4]||e[5]||"").replace(te,ne),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||se.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&se.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return G.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&X.test(n)&&(t=h(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(te,ne).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=p[e+" "];return t||(t=new RegExp("(^|"+M+")"+e+"("+M+"|$)"))&&p(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(n,r,i){return function(e){var t=se.attr(e,n);return null==t?"!="===r:!r||(t+="","="===r?t===i:"!="===r?t!==i:"^="===r?i&&0===t.indexOf(i):"*="===r?i&&-1:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function j(e,n,r){return m(n)?k.grep(e,function(e,t){return!!n.call(e,t,e)!==r}):n.nodeType?k.grep(e,function(e){return e===n!==r}):"string"!=typeof n?k.grep(e,function(e){return-1)[^>]*|#([\w-]+))$/;(k.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||q,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&3<=e.length?[null,e,null]:L.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof k?t[0]:t,k.merge(this,k.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:E,!0)),D.test(r[1])&&k.isPlainObject(t))for(r in t)m(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=E.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):m(e)?void 0!==n.ready?n.ready(e):e(k):k.makeArray(e,this)}).prototype=k.fn,q=k(E);var H=/^(?:parents|prev(?:Until|All))/,O={children:!0,contents:!0,next:!0,prev:!0};function P(e,t){while((e=e[t])&&1!==e.nodeType);return e}k.fn.extend({has:function(e){var t=k(e,this),n=t.length;return this.filter(function(){for(var e=0;e\x20\t\r\n\f]*)/i,he=/^$|^module$|\/(?:java|ecma)script/i,ge={option:[1,""],thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};function ve(e,t){var n;return n="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&A(e,t)?k.merge([e],n):n}function ye(e,t){for(var n=0,r=e.length;nx",y.noCloneChecked=!!me.cloneNode(!0).lastChild.defaultValue;var Te=/^key/,Ce=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Ee=/^([^.]*)(?:\.(.+)|)/;function ke(){return!0}function Se(){return!1}function Ne(e,t){return e===function(){try{return E.activeElement}catch(e){}}()==("focus"===t)}function Ae(e,t,n,r,i,o){var a,s;if("object"==typeof t){for(s in"string"!=typeof n&&(r=r||n,n=void 0),t)Ae(e,s,n,r,t[s],o);return e}if(null==r&&null==i?(i=n,r=n=void 0):null==i&&("string"==typeof n?(i=r,r=void 0):(i=r,r=n,n=void 0)),!1===i)i=Se;else if(!i)return e;return 1===o&&(a=i,(i=function(e){return k().off(e),a.apply(this,arguments)}).guid=a.guid||(a.guid=k.guid++)),e.each(function(){k.event.add(this,t,i,r,n)})}function De(e,i,o){o?(Q.set(e,i,!1),k.event.add(e,i,{namespace:!1,handler:function(e){var t,n,r=Q.get(this,i);if(1&e.isTrigger&&this[i]){if(r.length)(k.event.special[i]||{}).delegateType&&e.stopPropagation();else if(r=s.call(arguments),Q.set(this,i,r),t=o(this,i),this[i](),r!==(n=Q.get(this,i))||t?Q.set(this,i,!1):n={},r!==n)return e.stopImmediatePropagation(),e.preventDefault(),n.value}else r.length&&(Q.set(this,i,{value:k.event.trigger(k.extend(r[0],k.Event.prototype),r.slice(1),this)}),e.stopImmediatePropagation())}})):void 0===Q.get(e,i)&&k.event.add(e,i,ke)}k.event={global:{},add:function(t,e,n,r,i){var o,a,s,u,l,c,f,p,d,h,g,v=Q.get(t);if(v){n.handler&&(n=(o=n).handler,i=o.selector),i&&k.find.matchesSelector(ie,i),n.guid||(n.guid=k.guid++),(u=v.events)||(u=v.events={}),(a=v.handle)||(a=v.handle=function(e){return"undefined"!=typeof k&&k.event.triggered!==e.type?k.event.dispatch.apply(t,arguments):void 0}),l=(e=(e||"").match(R)||[""]).length;while(l--)d=g=(s=Ee.exec(e[l])||[])[1],h=(s[2]||"").split(".").sort(),d&&(f=k.event.special[d]||{},d=(i?f.delegateType:f.bindType)||d,f=k.event.special[d]||{},c=k.extend({type:d,origType:g,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&k.expr.match.needsContext.test(i),namespace:h.join(".")},o),(p=u[d])||((p=u[d]=[]).delegateCount=0,f.setup&&!1!==f.setup.call(t,r,h,a)||t.addEventListener&&t.addEventListener(d,a)),f.add&&(f.add.call(t,c),c.handler.guid||(c.handler.guid=n.guid)),i?p.splice(p.delegateCount++,0,c):p.push(c),k.event.global[d]=!0)}},remove:function(e,t,n,r,i){var o,a,s,u,l,c,f,p,d,h,g,v=Q.hasData(e)&&Q.get(e);if(v&&(u=v.events)){l=(t=(t||"").match(R)||[""]).length;while(l--)if(d=g=(s=Ee.exec(t[l])||[])[1],h=(s[2]||"").split(".").sort(),d){f=k.event.special[d]||{},p=u[d=(r?f.delegateType:f.bindType)||d]||[],s=s[2]&&new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),a=o=p.length;while(o--)c=p[o],!i&&g!==c.origType||n&&n.guid!==c.guid||s&&!s.test(c.namespace)||r&&r!==c.selector&&("**"!==r||!c.selector)||(p.splice(o,1),c.selector&&p.delegateCount--,f.remove&&f.remove.call(e,c));a&&!p.length&&(f.teardown&&!1!==f.teardown.call(e,h,v.handle)||k.removeEvent(e,d,v.handle),delete u[d])}else for(d in u)k.event.remove(e,d+t[l],n,r,!0);k.isEmptyObject(u)&&Q.remove(e,"handle events")}},dispatch:function(e){var t,n,r,i,o,a,s=k.event.fix(e),u=new Array(arguments.length),l=(Q.get(this,"events")||{})[s.type]||[],c=k.event.special[s.type]||{};for(u[0]=s,t=1;t\x20\t\r\n\f]*)[^>]*)\/>/gi,qe=/\s*$/g;function Oe(e,t){return A(e,"table")&&A(11!==t.nodeType?t:t.firstChild,"tr")&&k(e).children("tbody")[0]||e}function Pe(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function Re(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Me(e,t){var n,r,i,o,a,s,u,l;if(1===t.nodeType){if(Q.hasData(e)&&(o=Q.access(e),a=Q.set(t,o),l=o.events))for(i in delete a.handle,a.events={},l)for(n=0,r=l[i].length;n")},clone:function(e,t,n){var r,i,o,a,s,u,l,c=e.cloneNode(!0),f=oe(e);if(!(y.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||k.isXMLDoc(e)))for(a=ve(c),r=0,i=(o=ve(e)).length;r").attr(n.scriptAttrs||{}).prop({charset:n.scriptCharset,src:n.url}).on("load error",i=function(e){r.remove(),i=null,e&&t("error"===e.type?404:200,e.type)}),E.head.appendChild(r[0])},abort:function(){i&&i()}}});var Vt,Gt=[],Yt=/(=)\?(?=&|$)|\?\?/;k.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Gt.pop()||k.expando+"_"+kt++;return this[e]=!0,e}}),k.ajaxPrefilter("json jsonp",function(e,t,n){var r,i,o,a=!1!==e.jsonp&&(Yt.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Yt.test(e.data)&&"data");if(a||"jsonp"===e.dataTypes[0])return r=e.jsonpCallback=m(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(Yt,"$1"+r):!1!==e.jsonp&&(e.url+=(St.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return o||k.error(r+" was not called"),o[0]},e.dataTypes[0]="json",i=C[r],C[r]=function(){o=arguments},n.always(function(){void 0===i?k(C).removeProp(r):C[r]=i,e[r]&&(e.jsonpCallback=t.jsonpCallback,Gt.push(r)),o&&m(i)&&i(o[0]),o=i=void 0}),"script"}),y.createHTMLDocument=((Vt=E.implementation.createHTMLDocument("").body).innerHTML="
",2===Vt.childNodes.length),k.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(y.createHTMLDocument?((r=(t=E.implementation.createHTMLDocument("")).createElement("base")).href=E.location.href,t.head.appendChild(r)):t=E),o=!n&&[],(i=D.exec(e))?[t.createElement(i[1])]:(i=we([e],t,o),o&&o.length&&k(o).remove(),k.merge([],i.childNodes)));var r,i,o},k.fn.load=function(e,t,n){var r,i,o,a=this,s=e.indexOf(" ");return-1").append(k.parseHTML(e)).find(r):e)}).always(n&&function(e,t){a.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},k.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){k.fn[t]=function(e){return this.on(t,e)}}),k.expr.pseudos.animated=function(t){return k.grep(k.timers,function(e){return t===e.elem}).length},k.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l=k.css(e,"position"),c=k(e),f={};"static"===l&&(e.style.position="relative"),s=c.offset(),o=k.css(e,"top"),u=k.css(e,"left"),("absolute"===l||"fixed"===l)&&-1<(o+u).indexOf("auto")?(a=(r=c.position()).top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),m(t)&&(t=t.call(e,n,k.extend({},s))),null!=t.top&&(f.top=t.top-s.top+a),null!=t.left&&(f.left=t.left-s.left+i),"using"in t?t.using.call(e,f):c.css(f)}},k.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){k.offset.setOffset(this,t,e)});var e,n,r=this[0];return r?r.getClientRects().length?(e=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:e.top+n.pageYOffset,left:e.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if("fixed"===k.css(r,"position"))t=r.getBoundingClientRect();else{t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;while(e&&(e===n.body||e===n.documentElement)&&"static"===k.css(e,"position"))e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=k(e).offset()).top+=k.css(e,"borderTopWidth",!0),i.left+=k.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-k.css(r,"marginTop",!0),left:t.left-i.left-k.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent;while(e&&"static"===k.css(e,"position"))e=e.offsetParent;return e||ie})}}),k.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,i){var o="pageYOffset"===i;k.fn[t]=function(e){return _(this,function(e,t,n){var r;if(x(e)?r=e:9===e.nodeType&&(r=e.defaultView),void 0===n)return r?r[i]:e[t];r?r.scrollTo(o?r.pageXOffset:n,o?n:r.pageYOffset):e[t]=n},t,e,arguments.length)}}),k.each(["top","left"],function(e,n){k.cssHooks[n]=ze(y.pixelPosition,function(e,t){if(t)return t=_e(e,n),$e.test(t)?k(e).position()[n]+"px":t})}),k.each({Height:"height",Width:"width"},function(a,s){k.each({padding:"inner"+a,content:s,"":"outer"+a},function(r,o){k.fn[o]=function(e,t){var n=arguments.length&&(r||"boolean"!=typeof e),i=r||(!0===e||!0===t?"margin":"border");return _(this,function(e,t,n){var r;return x(e)?0===o.indexOf("outer")?e["inner"+a]:e.document.documentElement["client"+a]:9===e.nodeType?(r=e.documentElement,Math.max(e.body["scroll"+a],r["scroll"+a],e.body["offset"+a],r["offset"+a],r["client"+a])):void 0===n?k.css(e,t,i):k.style(e,t,n,i)},s,n?e:void 0,n)}})}),k.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,n){k.fn[n]=function(e,t){return 00)for(c=0;c0?"future":"past"];return z(c)?c(b):c.replace(/%s/i,b)}function J(a,b){var c=a.toLowerCase();Hd[c]=Hd[c+"s"]=Hd[b]=a}function K(a){return"string"==typeof a?Hd[a]||Hd[a.toLowerCase()]:void 0}function L(a){var b,c,d={};for(c in a)j(a,c)&&(b=K(c),b&&(d[b]=a[c]));return d}function M(a,b){Id[a]=b}function N(a){var b=[];for(var c in a)b.push({unit:c,priority:Id[c]});return b.sort(function(a,b){return a.priority-b.priority}),b}function O(b,c){return function(d){return null!=d?(Q(this,b,d),a.updateOffset(this,c),this):P(this,b)}}function P(a,b){return a.isValid()?a._d["get"+(a._isUTC?"UTC":"")+b]():NaN}function Q(a,b,c){a.isValid()&&a._d["set"+(a._isUTC?"UTC":"")+b](c)}function R(a){return a=K(a),z(this[a])?this[a]():this}function S(a,b){if("object"==typeof a){a=L(a);for(var c=N(a),d=0;d=0;return(f?c?"+":"":"-")+Math.pow(10,Math.max(0,e)).toString().substr(1)+d}function U(a,b,c,d){var e=d;"string"==typeof d&&(e=function(){return this[d]()}),a&&(Md[a]=e),b&&(Md[b[0]]=function(){return T(e.apply(this,arguments),b[1],b[2])}),c&&(Md[c]=function(){return this.localeData().ordinal(e.apply(this,arguments),a)})}function V(a){return a.match(/\[[\s\S]/)?a.replace(/^\[|\]$/g,""):a.replace(/\\/g,"")}function W(a){var b,c,d=a.match(Jd);for(b=0,c=d.length;b=0&&Kd.test(a);)a=a.replace(Kd,c),Kd.lastIndex=0,d-=1;return a}function Z(a,b,c){ce[a]=z(b)?b:function(a,d){return a&&c?c:b}}function $(a,b){return j(ce,a)?ce[a](b._strict,b._locale):new RegExp(_(a))}function _(a){return aa(a.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(a,b,c,d,e){return b||c||d||e}))}function aa(a){return a.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function ba(a,b){var c,d=b;for("string"==typeof a&&(a=[a]),g(b)&&(d=function(a,c){c[b]=u(a)}),c=0;c=0&&isFinite(h.getFullYear())&&h.setFullYear(a),h}function ta(a){var b=new Date(Date.UTC.apply(null,arguments));return a<100&&a>=0&&isFinite(b.getUTCFullYear())&&b.setUTCFullYear(a),b}function ua(a,b,c){var d=7+b-c,e=(7+ta(a,0,d).getUTCDay()-b)%7;return-e+d-1}function va(a,b,c,d,e){var f,g,h=(7+c-d)%7,i=ua(a,d,e),j=1+7*(b-1)+h+i;return j<=0?(f=a-1,g=pa(f)+j):j>pa(a)?(f=a+1,g=j-pa(a)):(f=a,g=j),{year:f,dayOfYear:g}}function wa(a,b,c){var d,e,f=ua(a.year(),b,c),g=Math.floor((a.dayOfYear()-f-1)/7)+1;return g<1?(e=a.year()-1,d=g+xa(e,b,c)):g>xa(a.year(),b,c)?(d=g-xa(a.year(),b,c),e=a.year()+1):(e=a.year(),d=g),{week:d,year:e}}function xa(a,b,c){var d=ua(a,b,c),e=ua(a+1,b,c);return(pa(a)-d+e)/7}function ya(a){return wa(a,this._week.dow,this._week.doy).week}function za(){return this._week.dow}function Aa(){return this._week.doy}function Ba(a){var b=this.localeData().week(this);return null==a?b:this.add(7*(a-b),"d")}function Ca(a){var b=wa(this,1,4).week;return null==a?b:this.add(7*(a-b),"d")}function Da(a,b){return"string"!=typeof a?a:isNaN(a)?(a=b.weekdaysParse(a),"number"==typeof a?a:null):parseInt(a,10)}function Ea(a,b){return"string"==typeof a?b.weekdaysParse(a)%7||7:isNaN(a)?null:a}function Fa(a,b){return a?c(this._weekdays)?this._weekdays[a.day()]:this._weekdays[this._weekdays.isFormat.test(b)?"format":"standalone"][a.day()]:c(this._weekdays)?this._weekdays:this._weekdays.standalone}function Ga(a){return a?this._weekdaysShort[a.day()]:this._weekdaysShort}function Ha(a){return a?this._weekdaysMin[a.day()]:this._weekdaysMin}function Ia(a,b,c){var d,e,f,g=a.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],d=0;d<7;++d)f=l([2e3,1]).day(d),this._minWeekdaysParse[d]=this.weekdaysMin(f,"").toLocaleLowerCase(),this._shortWeekdaysParse[d]=this.weekdaysShort(f,"").toLocaleLowerCase(),this._weekdaysParse[d]=this.weekdays(f,"").toLocaleLowerCase();return c?"dddd"===b?(e=ne.call(this._weekdaysParse,g),e!==-1?e:null):"ddd"===b?(e=ne.call(this._shortWeekdaysParse,g),e!==-1?e:null):(e=ne.call(this._minWeekdaysParse,g),e!==-1?e:null):"dddd"===b?(e=ne.call(this._weekdaysParse,g),e!==-1?e:(e=ne.call(this._shortWeekdaysParse,g),e!==-1?e:(e=ne.call(this._minWeekdaysParse,g),e!==-1?e:null))):"ddd"===b?(e=ne.call(this._shortWeekdaysParse,g),e!==-1?e:(e=ne.call(this._weekdaysParse,g),e!==-1?e:(e=ne.call(this._minWeekdaysParse,g),e!==-1?e:null))):(e=ne.call(this._minWeekdaysParse,g),e!==-1?e:(e=ne.call(this._weekdaysParse,g),e!==-1?e:(e=ne.call(this._shortWeekdaysParse,g),e!==-1?e:null)))}function Ja(a,b,c){var d,e,f;if(this._weekdaysParseExact)return Ia.call(this,a,b,c);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),d=0;d<7;d++){if(e=l([2e3,1]).day(d),c&&!this._fullWeekdaysParse[d]&&(this._fullWeekdaysParse[d]=new RegExp("^"+this.weekdays(e,"").replace(".",".?")+"$","i"),this._shortWeekdaysParse[d]=new RegExp("^"+this.weekdaysShort(e,"").replace(".",".?")+"$","i"),this._minWeekdaysParse[d]=new RegExp("^"+this.weekdaysMin(e,"").replace(".",".?")+"$","i")),this._weekdaysParse[d]||(f="^"+this.weekdays(e,"")+"|^"+this.weekdaysShort(e,"")+"|^"+this.weekdaysMin(e,""),this._weekdaysParse[d]=new RegExp(f.replace(".",""),"i")),c&&"dddd"===b&&this._fullWeekdaysParse[d].test(a))return d;if(c&&"ddd"===b&&this._shortWeekdaysParse[d].test(a))return d;if(c&&"dd"===b&&this._minWeekdaysParse[d].test(a))return d;if(!c&&this._weekdaysParse[d].test(a))return d}}function Ka(a){if(!this.isValid())return null!=a?this:NaN;var b=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=a?(a=Da(a,this.localeData()),this.add(a-b,"d")):b}function La(a){if(!this.isValid())return null!=a?this:NaN;var b=(this.day()+7-this.localeData()._week.dow)%7;return null==a?b:this.add(a-b,"d")}function Ma(a){if(!this.isValid())return null!=a?this:NaN;if(null!=a){var b=Ea(a,this.localeData());return this.day(this.day()%7?b:b-7)}return this.day()||7}function Na(a){return this._weekdaysParseExact?(j(this,"_weekdaysRegex")||Qa.call(this),a?this._weekdaysStrictRegex:this._weekdaysRegex):(j(this,"_weekdaysRegex")||(this._weekdaysRegex=ye),this._weekdaysStrictRegex&&a?this._weekdaysStrictRegex:this._weekdaysRegex)}function Oa(a){return this._weekdaysParseExact?(j(this,"_weekdaysRegex")||Qa.call(this),a?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(j(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=ze),this._weekdaysShortStrictRegex&&a?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function Pa(a){return this._weekdaysParseExact?(j(this,"_weekdaysRegex")||Qa.call(this),a?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(j(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=Ae),this._weekdaysMinStrictRegex&&a?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function Qa(){function a(a,b){return b.length-a.length}var b,c,d,e,f,g=[],h=[],i=[],j=[];for(b=0;b<7;b++)c=l([2e3,1]).day(b),d=this.weekdaysMin(c,""),e=this.weekdaysShort(c,""),f=this.weekdays(c,""),g.push(d),h.push(e),i.push(f),j.push(d),j.push(e),j.push(f);for(g.sort(a),h.sort(a),i.sort(a),j.sort(a),b=0;b<7;b++)h[b]=aa(h[b]),i[b]=aa(i[b]),j[b]=aa(j[b]);this._weekdaysRegex=new RegExp("^("+j.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+i.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+h.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+g.join("|")+")","i")}function Ra(){return this.hours()%12||12}function Sa(){return this.hours()||24}function Ta(a,b){U(a,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),b)})}function Ua(a,b){return b._meridiemParse}function Va(a){return"p"===(a+"").toLowerCase().charAt(0)}function Wa(a,b,c){return a>11?c?"pm":"PM":c?"am":"AM"}function Xa(a){return a?a.toLowerCase().replace("_","-"):a}function Ya(a){for(var b,c,d,e,f=0;f0;){if(d=Za(e.slice(0,b).join("-")))return d;if(c&&c.length>=b&&v(e,c,!0)>=b-1)break;b--}f++}return null}function Za(a){var b=null;if(!Fe[a]&&"undefined"!=typeof module&&module&&module.exports)try{b=Be._abbr,require("./locale/"+a),$a(b)}catch(a){}return Fe[a]}function $a(a,b){var c;return a&&(c=f(b)?bb(a):_a(a,b),c&&(Be=c)),Be._abbr}function _a(a,b){if(null!==b){var c=Ee;if(b.abbr=a,null!=Fe[a])y("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),c=Fe[a]._config;else if(null!=b.parentLocale){if(null==Fe[b.parentLocale])return Ge[b.parentLocale]||(Ge[b.parentLocale]=[]),Ge[b.parentLocale].push({name:a,config:b}),null;c=Fe[b.parentLocale]._config}return Fe[a]=new C(B(c,b)),Ge[a]&&Ge[a].forEach(function(a){_a(a.name,a.config)}),$a(a),Fe[a]}return delete Fe[a],null}function ab(a,b){if(null!=b){var c,d=Ee;null!=Fe[a]&&(d=Fe[a]._config),b=B(d,b),c=new C(b),c.parentLocale=Fe[a],Fe[a]=c,$a(a)}else null!=Fe[a]&&(null!=Fe[a].parentLocale?Fe[a]=Fe[a].parentLocale:null!=Fe[a]&&delete Fe[a]);return Fe[a]}function bb(a){var b;if(a&&a._locale&&a._locale._abbr&&(a=a._locale._abbr),!a)return Be;if(!c(a)){if(b=Za(a))return b;a=[a]}return Ya(a)}function cb(){return Ad(Fe)}function db(a){var b,c=a._a;return c&&n(a).overflow===-2&&(b=c[fe]<0||c[fe]>11?fe:c[ge]<1||c[ge]>ea(c[ee],c[fe])?ge:c[he]<0||c[he]>24||24===c[he]&&(0!==c[ie]||0!==c[je]||0!==c[ke])?he:c[ie]<0||c[ie]>59?ie:c[je]<0||c[je]>59?je:c[ke]<0||c[ke]>999?ke:-1,n(a)._overflowDayOfYear&&(bge)&&(b=ge),n(a)._overflowWeeks&&b===-1&&(b=le),n(a)._overflowWeekday&&b===-1&&(b=me),n(a).overflow=b),a}function eb(a){var b,c,d,e,f,g,h=a._i,i=He.exec(h)||Ie.exec(h);if(i){for(n(a).iso=!0,b=0,c=Ke.length;b10?"YYYY ":"YY "),f="HH:mm"+(c[4]?":ss":""),c[1]){var l=new Date(c[2]),m=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"][l.getDay()];if(c[1].substr(0,3)!==m)return n(a).weekdayMismatch=!0,void(a._isValid=!1)}switch(c[5].length){case 2:0===i?h=" +0000":(i=k.indexOf(c[5][1].toUpperCase())-12,h=(i<0?" -":" +")+(""+i).replace(/^-?/,"0").match(/..$/)[0]+"00");break;case 4:h=j[c[5]];break;default:h=j[" GMT"]}c[5]=h,a._i=c.splice(1).join(""),g=" ZZ",a._f=d+e+f+g,lb(a),n(a).rfc2822=!0}else a._isValid=!1}function gb(b){var c=Me.exec(b._i);return null!==c?void(b._d=new Date(+c[1])):(eb(b),void(b._isValid===!1&&(delete b._isValid,fb(b),b._isValid===!1&&(delete b._isValid,a.createFromInputFallback(b)))))}function hb(a,b,c){return null!=a?a:null!=b?b:c}function ib(b){var c=new Date(a.now());return b._useUTC?[c.getUTCFullYear(),c.getUTCMonth(),c.getUTCDate()]:[c.getFullYear(),c.getMonth(),c.getDate()]}function jb(a){var b,c,d,e,f=[];if(!a._d){for(d=ib(a),a._w&&null==a._a[ge]&&null==a._a[fe]&&kb(a),null!=a._dayOfYear&&(e=hb(a._a[ee],d[ee]),(a._dayOfYear>pa(e)||0===a._dayOfYear)&&(n(a)._overflowDayOfYear=!0),c=ta(e,0,a._dayOfYear),a._a[fe]=c.getUTCMonth(),a._a[ge]=c.getUTCDate()),b=0;b<3&&null==a._a[b];++b)a._a[b]=f[b]=d[b];for(;b<7;b++)a._a[b]=f[b]=null==a._a[b]?2===b?1:0:a._a[b];24===a._a[he]&&0===a._a[ie]&&0===a._a[je]&&0===a._a[ke]&&(a._nextDay=!0,a._a[he]=0),a._d=(a._useUTC?ta:sa).apply(null,f),null!=a._tzm&&a._d.setUTCMinutes(a._d.getUTCMinutes()-a._tzm),a._nextDay&&(a._a[he]=24)}}function kb(a){var b,c,d,e,f,g,h,i;if(b=a._w,null!=b.GG||null!=b.W||null!=b.E)f=1,g=4,c=hb(b.GG,a._a[ee],wa(tb(),1,4).year),d=hb(b.W,1),e=hb(b.E,1),(e<1||e>7)&&(i=!0);else{f=a._locale._week.dow,g=a._locale._week.doy;var j=wa(tb(),f,g);c=hb(b.gg,a._a[ee],j.year),d=hb(b.w,j.week),null!=b.d?(e=b.d,(e<0||e>6)&&(i=!0)):null!=b.e?(e=b.e+f,(b.e<0||b.e>6)&&(i=!0)):e=f}d<1||d>xa(c,f,g)?n(a)._overflowWeeks=!0:null!=i?n(a)._overflowWeekday=!0:(h=va(c,d,e,f,g),a._a[ee]=h.year,a._dayOfYear=h.dayOfYear)}function lb(b){if(b._f===a.ISO_8601)return void eb(b);if(b._f===a.RFC_2822)return void fb(b);b._a=[],n(b).empty=!0;var c,d,e,f,g,h=""+b._i,i=h.length,j=0;for(e=Y(b._f,b._locale).match(Jd)||[],c=0;c0&&n(b).unusedInput.push(g),h=h.slice(h.indexOf(d)+d.length),j+=d.length),Md[f]?(d?n(b).empty=!1:n(b).unusedTokens.push(f),da(f,d,b)):b._strict&&!d&&n(b).unusedTokens.push(f);n(b).charsLeftOver=i-j,h.length>0&&n(b).unusedInput.push(h),b._a[he]<=12&&n(b).bigHour===!0&&b._a[he]>0&&(n(b).bigHour=void 0),n(b).parsedDateParts=b._a.slice(0),n(b).meridiem=b._meridiem,b._a[he]=mb(b._locale,b._a[he],b._meridiem),jb(b),db(b)}function mb(a,b,c){var d;return null==c?b:null!=a.meridiemHour?a.meridiemHour(b,c):null!=a.isPM?(d=a.isPM(c),d&&b<12&&(b+=12),d||12!==b||(b=0),b):b}function nb(a){var b,c,d,e,f;if(0===a._f.length)return n(a).invalidFormat=!0,void(a._d=new Date(NaN));for(e=0;ethis.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function Ob(){if(!f(this._isDSTShifted))return this._isDSTShifted;var a={};if(q(a,this),a=qb(a),a._a){var b=a._isUTC?l(a._a):tb(a._a);this._isDSTShifted=this.isValid()&&v(a._a,b.toArray())>0}else this._isDSTShifted=!1;return this._isDSTShifted}function Pb(){return!!this.isValid()&&!this._isUTC}function Qb(){return!!this.isValid()&&this._isUTC}function Rb(){return!!this.isValid()&&(this._isUTC&&0===this._offset)}function Sb(a,b){var c,d,e,f=a,h=null;return Bb(a)?f={ms:a._milliseconds,d:a._days,M:a._months}:g(a)?(f={},b?f[b]=a:f.milliseconds=a):(h=Te.exec(a))?(c="-"===h[1]?-1:1,f={y:0,d:u(h[ge])*c,h:u(h[he])*c,m:u(h[ie])*c,s:u(h[je])*c,ms:u(Cb(1e3*h[ke]))*c}):(h=Ue.exec(a))?(c="-"===h[1]?-1:1,f={y:Tb(h[2],c),M:Tb(h[3],c),w:Tb(h[4],c),d:Tb(h[5],c),h:Tb(h[6],c),m:Tb(h[7],c),s:Tb(h[8],c)}):null==f?f={}:"object"==typeof f&&("from"in f||"to"in f)&&(e=Vb(tb(f.from),tb(f.to)),f={},f.ms=e.milliseconds,f.M=e.months),d=new Ab(f),Bb(a)&&j(a,"_locale")&&(d._locale=a._locale),d}function Tb(a,b){var c=a&&parseFloat(a.replace(",","."));return(isNaN(c)?0:c)*b}function Ub(a,b){var c={milliseconds:0,months:0};return c.months=b.month()-a.month()+12*(b.year()-a.year()),a.clone().add(c.months,"M").isAfter(b)&&--c.months,c.milliseconds=+b-+a.clone().add(c.months,"M"),c}function Vb(a,b){var c;return a.isValid()&&b.isValid()?(b=Fb(b,a),a.isBefore(b)?c=Ub(a,b):(c=Ub(b,a),c.milliseconds=-c.milliseconds,c.months=-c.months),c):{milliseconds:0,months:0}}function Wb(a,b){return function(c,d){var e,f;return null===d||isNaN(+d)||(y(b,"moment()."+b+"(period, number) is deprecated. Please use moment()."+b+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),f=c,c=d,d=f),c="string"==typeof c?+c:c,e=Sb(c,d),Xb(this,e,a),this}}function Xb(b,c,d,e){var f=c._milliseconds,g=Cb(c._days),h=Cb(c._months);b.isValid()&&(e=null==e||e,f&&b._d.setTime(b._d.valueOf()+f*d),g&&Q(b,"Date",P(b,"Date")+g*d),h&&ja(b,P(b,"Month")+h*d),e&&a.updateOffset(b,g||h))}function Yb(a,b){var c=a.diff(b,"days",!0);return c<-6?"sameElse":c<-1?"lastWeek":c<0?"lastDay":c<1?"sameDay":c<2?"nextDay":c<7?"nextWeek":"sameElse"}function Zb(b,c){var d=b||tb(),e=Fb(d,this).startOf("day"),f=a.calendarFormat(this,e)||"sameElse",g=c&&(z(c[f])?c[f].call(this,d):c[f]);return this.format(g||this.localeData().calendar(f,this,tb(d)))}function $b(){return new r(this)}function _b(a,b){var c=s(a)?a:tb(a);return!(!this.isValid()||!c.isValid())&&(b=K(f(b)?"millisecond":b),"millisecond"===b?this.valueOf()>c.valueOf():c.valueOf()9999?X(a,"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]"):z(Date.prototype.toISOString)?this.toDate().toISOString():X(a,"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]")}function jc(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var a="moment",b="";this.isLocal()||(a=0===this.utcOffset()?"moment.utc":"moment.parseZone",b="Z");var c="["+a+'("]',d=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",e="-MM-DD[T]HH:mm:ss.SSS",f=b+'[")]';return this.format(c+d+e+f)}function kc(b){b||(b=this.isUtc()?a.defaultFormatUtc:a.defaultFormat);var c=X(this,b);return this.localeData().postformat(c)}function lc(a,b){return this.isValid()&&(s(a)&&a.isValid()||tb(a).isValid())?Sb({to:this,from:a}).locale(this.locale()).humanize(!b):this.localeData().invalidDate()}function mc(a){return this.from(tb(),a)}function nc(a,b){return this.isValid()&&(s(a)&&a.isValid()||tb(a).isValid())?Sb({from:this,to:a}).locale(this.locale()).humanize(!b):this.localeData().invalidDate()}function oc(a){return this.to(tb(),a)}function pc(a){var b;return void 0===a?this._locale._abbr:(b=bb(a),null!=b&&(this._locale=b),this)}function qc(){return this._locale}function rc(a){switch(a=K(a)){case"year":this.month(0);case"quarter":case"month":this.date(1);case"week":case"isoWeek":case"day":case"date":this.hours(0);case"hour":this.minutes(0);case"minute":this.seconds(0);case"second":this.milliseconds(0)}return"week"===a&&this.weekday(0),"isoWeek"===a&&this.isoWeekday(1),"quarter"===a&&this.month(3*Math.floor(this.month()/3)),this}function sc(a){return a=K(a),void 0===a||"millisecond"===a?this:("date"===a&&(a="day"),this.startOf(a).add(1,"isoWeek"===a?"week":a).subtract(1,"ms"))}function tc(){return this._d.valueOf()-6e4*(this._offset||0)}function uc(){return Math.floor(this.valueOf()/1e3)}function vc(){return new Date(this.valueOf())}function wc(){var a=this;return[a.year(),a.month(),a.date(),a.hour(),a.minute(),a.second(),a.millisecond()]}function xc(){var a=this;return{years:a.year(),months:a.month(),date:a.date(),hours:a.hours(),minutes:a.minutes(),seconds:a.seconds(),milliseconds:a.milliseconds()}}function yc(){return this.isValid()?this.toISOString():null}function zc(){return o(this)}function Ac(){ +return k({},n(this))}function Bc(){return n(this).overflow}function Cc(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}function Dc(a,b){U(0,[a,a.length],0,b)}function Ec(a){return Ic.call(this,a,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)}function Fc(a){return Ic.call(this,a,this.isoWeek(),this.isoWeekday(),1,4)}function Gc(){return xa(this.year(),1,4)}function Hc(){var a=this.localeData()._week;return xa(this.year(),a.dow,a.doy)}function Ic(a,b,c,d,e){var f;return null==a?wa(this,d,e).year:(f=xa(a,d,e),b>f&&(b=f),Jc.call(this,a,b,c,d,e))}function Jc(a,b,c,d,e){var f=va(a,b,c,d,e),g=ta(f.year,0,f.dayOfYear);return this.year(g.getUTCFullYear()),this.month(g.getUTCMonth()),this.date(g.getUTCDate()),this}function Kc(a){return null==a?Math.ceil((this.month()+1)/3):this.month(3*(a-1)+this.month()%3)}function Lc(a){var b=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==a?b:this.add(a-b,"d")}function Mc(a,b){b[ke]=u(1e3*("0."+a))}function Nc(){return this._isUTC?"UTC":""}function Oc(){return this._isUTC?"Coordinated Universal Time":""}function Pc(a){return tb(1e3*a)}function Qc(){return tb.apply(null,arguments).parseZone()}function Rc(a){return a}function Sc(a,b,c,d){var e=bb(),f=l().set(d,b);return e[c](f,a)}function Tc(a,b,c){if(g(a)&&(b=a,a=void 0),a=a||"",null!=b)return Sc(a,b,c,"month");var d,e=[];for(d=0;d<12;d++)e[d]=Sc(a,d,c,"month");return e}function Uc(a,b,c,d){"boolean"==typeof a?(g(b)&&(c=b,b=void 0),b=b||""):(b=a,c=b,a=!1,g(b)&&(c=b,b=void 0),b=b||"");var e=bb(),f=a?e._week.dow:0;if(null!=c)return Sc(b,(c+f)%7,d,"day");var h,i=[];for(h=0;h<7;h++)i[h]=Sc(b,(h+f)%7,d,"day");return i}function Vc(a,b){return Tc(a,b,"months")}function Wc(a,b){return Tc(a,b,"monthsShort")}function Xc(a,b,c){return Uc(a,b,c,"weekdays")}function Yc(a,b,c){return Uc(a,b,c,"weekdaysShort")}function Zc(a,b,c){return Uc(a,b,c,"weekdaysMin")}function $c(){var a=this._data;return this._milliseconds=df(this._milliseconds),this._days=df(this._days),this._months=df(this._months),a.milliseconds=df(a.milliseconds),a.seconds=df(a.seconds),a.minutes=df(a.minutes),a.hours=df(a.hours),a.months=df(a.months),a.years=df(a.years),this}function _c(a,b,c,d){var e=Sb(b,c);return a._milliseconds+=d*e._milliseconds,a._days+=d*e._days,a._months+=d*e._months,a._bubble()}function ad(a,b){return _c(this,a,b,1)}function bd(a,b){return _c(this,a,b,-1)}function cd(a){return a<0?Math.floor(a):Math.ceil(a)}function dd(){var a,b,c,d,e,f=this._milliseconds,g=this._days,h=this._months,i=this._data;return f>=0&&g>=0&&h>=0||f<=0&&g<=0&&h<=0||(f+=864e5*cd(fd(h)+g),g=0,h=0),i.milliseconds=f%1e3,a=t(f/1e3),i.seconds=a%60,b=t(a/60),i.minutes=b%60,c=t(b/60),i.hours=c%24,g+=t(c/24),e=t(ed(g)),h+=e,g-=cd(fd(e)),d=t(h/12),h%=12,i.days=g,i.months=h,i.years=d,this}function ed(a){return 4800*a/146097}function fd(a){return 146097*a/4800}function gd(a){if(!this.isValid())return NaN;var b,c,d=this._milliseconds;if(a=K(a),"month"===a||"year"===a)return b=this._days+d/864e5,c=this._months+ed(b),"month"===a?c:c/12;switch(b=this._days+Math.round(fd(this._months)),a){case"week":return b/7+d/6048e5;case"day":return b+d/864e5;case"hour":return 24*b+d/36e5;case"minute":return 1440*b+d/6e4;case"second":return 86400*b+d/1e3;case"millisecond":return Math.floor(864e5*b)+d;default:throw new Error("Unknown unit "+a)}}function hd(){return this.isValid()?this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*u(this._months/12):NaN}function id(a){return function(){return this.as(a)}}function jd(a){return a=K(a),this.isValid()?this[a+"s"]():NaN}function kd(a){return function(){return this.isValid()?this._data[a]:NaN}}function ld(){return t(this.days()/7)}function md(a,b,c,d,e){return e.relativeTime(b||1,!!c,a,d)}function nd(a,b,c){var d=Sb(a).abs(),e=uf(d.as("s")),f=uf(d.as("m")),g=uf(d.as("h")),h=uf(d.as("d")),i=uf(d.as("M")),j=uf(d.as("y")),k=e<=vf.ss&&["s",e]||e0,k[4]=c,md.apply(null,k)}function od(a){return void 0===a?uf:"function"==typeof a&&(uf=a,!0)}function pd(a,b){return void 0!==vf[a]&&(void 0===b?vf[a]:(vf[a]=b,"s"===a&&(vf.ss=b-1),!0))}function qd(a){if(!this.isValid())return this.localeData().invalidDate();var b=this.localeData(),c=nd(this,!a,b);return a&&(c=b.pastFuture(+this,c)),b.postformat(c)}function rd(){if(!this.isValid())return this.localeData().invalidDate();var a,b,c,d=wf(this._milliseconds)/1e3,e=wf(this._days),f=wf(this._months);a=t(d/60),b=t(a/60),d%=60,a%=60,c=t(f/12),f%=12;var g=c,h=f,i=e,j=b,k=a,l=d,m=this.asSeconds();return m?(m<0?"-":"")+"P"+(g?g+"Y":"")+(h?h+"M":"")+(i?i+"D":"")+(j||k||l?"T":"")+(j?j+"H":"")+(k?k+"M":"")+(l?l+"S":""):"P0D"}var sd,td;td=Array.prototype.some?Array.prototype.some:function(a){for(var b=Object(this),c=b.length>>>0,d=0;d68?1900:2e3)};var te=O("FullYear",!0);U("w",["ww",2],"wo","week"),U("W",["WW",2],"Wo","isoWeek"),J("week","w"),J("isoWeek","W"),M("week",5),M("isoWeek",5),Z("w",Sd),Z("ww",Sd,Od),Z("W",Sd),Z("WW",Sd,Od),ca(["w","ww","W","WW"],function(a,b,c,d){b[d.substr(0,1)]=u(a)});var ue={dow:0,doy:6};U("d",0,"do","day"),U("dd",0,0,function(a){return this.localeData().weekdaysMin(this,a)}),U("ddd",0,0,function(a){return this.localeData().weekdaysShort(this,a)}),U("dddd",0,0,function(a){return this.localeData().weekdays(this,a)}),U("e",0,0,"weekday"),U("E",0,0,"isoWeekday"),J("day","d"),J("weekday","e"),J("isoWeekday","E"),M("day",11),M("weekday",11),M("isoWeekday",11),Z("d",Sd),Z("e",Sd),Z("E",Sd),Z("dd",function(a,b){return b.weekdaysMinRegex(a)}),Z("ddd",function(a,b){return b.weekdaysShortRegex(a)}),Z("dddd",function(a,b){return b.weekdaysRegex(a)}),ca(["dd","ddd","dddd"],function(a,b,c,d){var e=c._locale.weekdaysParse(a,d,c._strict);null!=e?b.d=e:n(c).invalidWeekday=a}),ca(["d","e","E"],function(a,b,c,d){b[d]=u(a)});var ve="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),we="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),xe="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),ye=be,ze=be,Ae=be;U("H",["HH",2],0,"hour"),U("h",["hh",2],0,Ra),U("k",["kk",2],0,Sa),U("hmm",0,0,function(){return""+Ra.apply(this)+T(this.minutes(),2)}),U("hmmss",0,0,function(){return""+Ra.apply(this)+T(this.minutes(),2)+T(this.seconds(),2)}),U("Hmm",0,0,function(){return""+this.hours()+T(this.minutes(),2)}),U("Hmmss",0,0,function(){return""+this.hours()+T(this.minutes(),2)+T(this.seconds(),2)}),Ta("a",!0),Ta("A",!1),J("hour","h"),M("hour",13),Z("a",Ua),Z("A",Ua),Z("H",Sd),Z("h",Sd),Z("k",Sd),Z("HH",Sd,Od),Z("hh",Sd,Od),Z("kk",Sd,Od),Z("hmm",Td),Z("hmmss",Ud),Z("Hmm",Td),Z("Hmmss",Ud),ba(["H","HH"],he),ba(["k","kk"],function(a,b,c){var d=u(a);b[he]=24===d?0:d}),ba(["a","A"],function(a,b,c){c._isPm=c._locale.isPM(a),c._meridiem=a}),ba(["h","hh"],function(a,b,c){b[he]=u(a),n(c).bigHour=!0}),ba("hmm",function(a,b,c){var d=a.length-2;b[he]=u(a.substr(0,d)),b[ie]=u(a.substr(d)),n(c).bigHour=!0}),ba("hmmss",function(a,b,c){var d=a.length-4,e=a.length-2;b[he]=u(a.substr(0,d)),b[ie]=u(a.substr(d,2)),b[je]=u(a.substr(e)),n(c).bigHour=!0}),ba("Hmm",function(a,b,c){var d=a.length-2;b[he]=u(a.substr(0,d)),b[ie]=u(a.substr(d))}),ba("Hmmss",function(a,b,c){var d=a.length-4,e=a.length-2;b[he]=u(a.substr(0,d)),b[ie]=u(a.substr(d,2)),b[je]=u(a.substr(e))});var Be,Ce=/[ap]\.?m?\.?/i,De=O("Hours",!0),Ee={calendar:Bd,longDateFormat:Cd,invalidDate:Dd,ordinal:Ed,dayOfMonthOrdinalParse:Fd,relativeTime:Gd,months:pe,monthsShort:qe,week:ue,weekdays:ve,weekdaysMin:xe,weekdaysShort:we,meridiemParse:Ce},Fe={},Ge={},He=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,Ie=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,Je=/Z|[+-]\d\d(?::?\d\d)?/,Ke=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/]],Le=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],Me=/^\/?Date\((\-?\d+)/i,Ne=/^((?:Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d?\d\s(?:Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(?:\d\d)?\d\d\s)(\d\d:\d\d)(\:\d\d)?(\s(?:UT|GMT|[ECMP][SD]T|[A-IK-Za-ik-z]|[+-]\d{4}))$/;a.createFromInputFallback=x("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged and will be removed in an upcoming major release. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",function(a){a._d=new Date(a._i+(a._useUTC?" UTC":""))}),a.ISO_8601=function(){},a.RFC_2822=function(){};var Oe=x("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var a=tb.apply(null,arguments);return this.isValid()&&a.isValid()?athis?this:a:p()}),Qe=function(){return Date.now?Date.now():+new Date},Re=["year","quarter","month","week","day","hour","minute","second","millisecond"];Db("Z",":"),Db("ZZ",""),Z("Z",_d),Z("ZZ",_d),ba(["Z","ZZ"],function(a,b,c){c._useUTC=!0,c._tzm=Eb(_d,a)});var Se=/([\+\-]|\d\d)/gi;a.updateOffset=function(){};var Te=/^(\-)?(?:(\d*)[. ])?(\d+)\:(\d+)(?:\:(\d+)(\.\d*)?)?$/,Ue=/^(-)?P(?:(-?[0-9,.]*)Y)?(?:(-?[0-9,.]*)M)?(?:(-?[0-9,.]*)W)?(?:(-?[0-9,.]*)D)?(?:T(?:(-?[0-9,.]*)H)?(?:(-?[0-9,.]*)M)?(?:(-?[0-9,.]*)S)?)?$/;Sb.fn=Ab.prototype,Sb.invalid=zb;var Ve=Wb(1,"add"),We=Wb(-1,"subtract");a.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",a.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var Xe=x("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(a){return void 0===a?this.localeData():this.locale(a)});U(0,["gg",2],0,function(){return this.weekYear()%100}),U(0,["GG",2],0,function(){return this.isoWeekYear()%100}),Dc("gggg","weekYear"),Dc("ggggg","weekYear"),Dc("GGGG","isoWeekYear"),Dc("GGGGG","isoWeekYear"),J("weekYear","gg"),J("isoWeekYear","GG"),M("weekYear",1),M("isoWeekYear",1),Z("G",Zd),Z("g",Zd),Z("GG",Sd,Od),Z("gg",Sd,Od),Z("GGGG",Wd,Qd),Z("gggg",Wd,Qd),Z("GGGGG",Xd,Rd),Z("ggggg",Xd,Rd),ca(["gggg","ggggg","GGGG","GGGGG"],function(a,b,c,d){b[d.substr(0,2)]=u(a)}),ca(["gg","GG"],function(b,c,d,e){c[e]=a.parseTwoDigitYear(b)}),U("Q",0,"Qo","quarter"),J("quarter","Q"),M("quarter",7),Z("Q",Nd),ba("Q",function(a,b){b[fe]=3*(u(a)-1)}),U("D",["DD",2],"Do","date"),J("date","D"),M("date",9),Z("D",Sd),Z("DD",Sd,Od),Z("Do",function(a,b){return a?b._dayOfMonthOrdinalParse||b._ordinalParse:b._dayOfMonthOrdinalParseLenient}),ba(["D","DD"],ge),ba("Do",function(a,b){b[ge]=u(a.match(Sd)[0],10)});var Ye=O("Date",!0);U("DDD",["DDDD",3],"DDDo","dayOfYear"),J("dayOfYear","DDD"),M("dayOfYear",4),Z("DDD",Vd),Z("DDDD",Pd),ba(["DDD","DDDD"],function(a,b,c){c._dayOfYear=u(a)}),U("m",["mm",2],0,"minute"),J("minute","m"),M("minute",14),Z("m",Sd),Z("mm",Sd,Od),ba(["m","mm"],ie);var Ze=O("Minutes",!1);U("s",["ss",2],0,"second"),J("second","s"),M("second",15),Z("s",Sd),Z("ss",Sd,Od),ba(["s","ss"],je);var $e=O("Seconds",!1);U("S",0,0,function(){return~~(this.millisecond()/100)}),U(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),U(0,["SSS",3],0,"millisecond"),U(0,["SSSS",4],0,function(){return 10*this.millisecond()}),U(0,["SSSSS",5],0,function(){return 100*this.millisecond()}),U(0,["SSSSSS",6],0,function(){return 1e3*this.millisecond()}),U(0,["SSSSSSS",7],0,function(){return 1e4*this.millisecond()}),U(0,["SSSSSSSS",8],0,function(){return 1e5*this.millisecond()}),U(0,["SSSSSSSSS",9],0,function(){return 1e6*this.millisecond()}),J("millisecond","ms"),M("millisecond",16),Z("S",Vd,Nd),Z("SS",Vd,Od),Z("SSS",Vd,Pd);var _e;for(_e="SSSS";_e.length<=9;_e+="S")Z(_e,Yd);for(_e="S";_e.length<=9;_e+="S")ba(_e,Mc);var af=O("Milliseconds",!1);U("z",0,0,"zoneAbbr"),U("zz",0,0,"zoneName");var bf=r.prototype;bf.add=Ve,bf.calendar=Zb,bf.clone=$b,bf.diff=fc,bf.endOf=sc,bf.format=kc,bf.from=lc,bf.fromNow=mc,bf.to=nc,bf.toNow=oc,bf.get=R,bf.invalidAt=Bc,bf.isAfter=_b,bf.isBefore=ac,bf.isBetween=bc,bf.isSame=cc,bf.isSameOrAfter=dc,bf.isSameOrBefore=ec,bf.isValid=zc,bf.lang=Xe,bf.locale=pc,bf.localeData=qc,bf.max=Pe,bf.min=Oe,bf.parsingFlags=Ac,bf.set=S,bf.startOf=rc,bf.subtract=We,bf.toArray=wc,bf.toObject=xc,bf.toDate=vc,bf.toISOString=ic,bf.inspect=jc,bf.toJSON=yc,bf.toString=hc,bf.unix=uc,bf.valueOf=tc,bf.creationData=Cc,bf.year=te,bf.isLeapYear=ra,bf.weekYear=Ec,bf.isoWeekYear=Fc,bf.quarter=bf.quarters=Kc,bf.month=ka,bf.daysInMonth=la,bf.week=bf.weeks=Ba,bf.isoWeek=bf.isoWeeks=Ca,bf.weeksInYear=Hc,bf.isoWeeksInYear=Gc,bf.date=Ye,bf.day=bf.days=Ka,bf.weekday=La,bf.isoWeekday=Ma,bf.dayOfYear=Lc,bf.hour=bf.hours=De,bf.minute=bf.minutes=Ze,bf.second=bf.seconds=$e,bf.millisecond=bf.milliseconds=af,bf.utcOffset=Hb,bf.utc=Jb,bf.local=Kb,bf.parseZone=Lb,bf.hasAlignedHourOffset=Mb,bf.isDST=Nb,bf.isLocal=Pb,bf.isUtcOffset=Qb,bf.isUtc=Rb,bf.isUTC=Rb,bf.zoneAbbr=Nc,bf.zoneName=Oc,bf.dates=x("dates accessor is deprecated. Use date instead.",Ye),bf.months=x("months accessor is deprecated. Use month instead",ka),bf.years=x("years accessor is deprecated. Use year instead",te),bf.zone=x("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",Ib),bf.isDSTShifted=x("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",Ob);var cf=C.prototype;cf.calendar=D,cf.longDateFormat=E,cf.invalidDate=F,cf.ordinal=G,cf.preparse=Rc,cf.postformat=Rc,cf.relativeTime=H,cf.pastFuture=I,cf.set=A,cf.months=fa,cf.monthsShort=ga,cf.monthsParse=ia,cf.monthsRegex=na,cf.monthsShortRegex=ma,cf.week=ya,cf.firstDayOfYear=Aa,cf.firstDayOfWeek=za,cf.weekdays=Fa,cf.weekdaysMin=Ha,cf.weekdaysShort=Ga,cf.weekdaysParse=Ja,cf.weekdaysRegex=Na,cf.weekdaysShortRegex=Oa,cf.weekdaysMinRegex=Pa,cf.isPM=Va,cf.meridiem=Wa,$a("en",{dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(a){var b=a%10,c=1===u(a%100/10)?"th":1===b?"st":2===b?"nd":3===b?"rd":"th";return a+c}}),a.lang=x("moment.lang is deprecated. Use moment.locale instead.",$a),a.langData=x("moment.langData is deprecated. Use moment.localeData instead.",bb);var df=Math.abs,ef=id("ms"),ff=id("s"),gf=id("m"),hf=id("h"),jf=id("d"),kf=id("w"),lf=id("M"),mf=id("y"),nf=kd("milliseconds"),of=kd("seconds"),pf=kd("minutes"),qf=kd("hours"),rf=kd("days"),sf=kd("months"),tf=kd("years"),uf=Math.round,vf={ss:44,s:45,m:45,h:22,d:26,M:11},wf=Math.abs,xf=Ab.prototype;return xf.isValid=yb,xf.abs=$c,xf.add=ad,xf.subtract=bd,xf.as=gd,xf.asMilliseconds=ef,xf.asSeconds=ff,xf.asMinutes=gf,xf.asHours=hf,xf.asDays=jf,xf.asWeeks=kf,xf.asMonths=lf,xf.asYears=mf,xf.valueOf=hd,xf._bubble=dd,xf.get=jd,xf.milliseconds=nf,xf.seconds=of,xf.minutes=pf,xf.hours=qf,xf.days=rf,xf.weeks=ld,xf.months=sf,xf.years=tf,xf.humanize=qd,xf.toISOString=rd,xf.toString=rd,xf.toJSON=rd,xf.locale=pc,xf.localeData=qc,xf.toIsoString=x("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",rd),xf.lang=Xe,U("X",0,0,"unix"),U("x",0,0,"valueOf"),Z("x",Zd),Z("X",ae),ba("X",function(a,b,c){c._d=new Date(1e3*parseFloat(a,10))}),ba("x",function(a,b,c){c._d=new Date(u(a))}),a.version="2.18.1",b(tb),a.fn=bf,a.min=vb,a.max=wb,a.now=Qe,a.utc=l,a.unix=Pc,a.months=Vc,a.isDate=h,a.locale=$a,a.invalid=p,a.duration=Sb,a.isMoment=s,a.weekdays=Xc,a.parseZone=Qc,a.localeData=bb,a.isDuration=Bb,a.monthsShort=Wc,a.weekdaysMin=Zc,a.defineLocale=_a,a.updateLocale=ab,a.locales=cb,a.weekdaysShort=Yc,a.normalizeUnits=K,a.relativeTimeRounding=od,a.relativeTimeThreshold=pd,a.calendarFormat=Yb,a.prototype=bf,a}); \ No newline at end of file diff --git a/vendor/crowdfunding2/lib/locales.php b/vendor/crowdfunding2/lib/locales.php new file mode 100755 index 0000000..95a7979 --- /dev/null +++ b/vendor/crowdfunding2/lib/locales.php @@ -0,0 +1,53 @@ + $var2) { + + $text = str_replace('{{'.$var1.'}}', $var2, $text); + } + + return $text; +} + +function tr($tkey, $vars=array()) { + + global $ttr; + + if (isset($ttr[$tkey])) { + + return bparse($ttr[$tkey], $vars); + } + + return ''; +} + + diff --git a/vendor/crowdfunding2/lib/phpqrcode/.png-errors.txt b/vendor/crowdfunding2/lib/phpqrcode/.png-errors.txt new file mode 100755 index 0000000..5a78b07 --- /dev/null +++ b/vendor/crowdfunding2/lib/phpqrcode/.png-errors.txt @@ -0,0 +1 @@ +2020-01-31 10:58:56: empty string!!!2020-01-31 10:59:36: empty string!!!2020-01-31 11:02:34: empty string!!!2020-01-31 11:03:40: empty string!!!2020-01-31 11:04:15: empty string!!!2020-01-31 11:04:22: empty string!!!2020-01-31 11:08:10: empty string!!!2020-01-31 11:08:56: empty string!!!2020-01-31 11:12:19: empty string!!!2020-01-31 11:14:03: empty string!!!2020-01-31 11:14:41: empty string!!!2020-01-31 11:14:46: empty string!!!2020-01-31 11:17:07: empty string!!!2020-01-31 11:17:32: empty string!!!2020-01-31 11:17:39: empty string!!!2020-01-31 11:17:50: empty string!!!2020-01-31 11:18:15: empty string!!!2020-01-31 11:18:30: empty string!!!2020-01-31 11:31:43: empty string!!!2020-01-31 11:33:07: empty string!!! \ No newline at end of file diff --git a/vendor/crowdfunding2/lib/phpqrcode/CHANGELOG b/vendor/crowdfunding2/lib/phpqrcode/CHANGELOG new file mode 100755 index 0000000..a6c53d2 --- /dev/null +++ b/vendor/crowdfunding2/lib/phpqrcode/CHANGELOG @@ -0,0 +1,38 @@ +* 1.0.0 build 2010031920 + + - first public release + - help in readme, install + - cleanup ans separation of QRtools and QRspec + - now TCPDF binding requires minimal changes in TCPDF, having most of job + done in QRtools tcpdfBarcodeArray + - nicer QRtools::timeBenchmark output + - license and copyright notices in files + - indent cleanup - from tab to 4spc, keep it that way please :) + - sf project, repository, wiki + - simple code generator in index.php + +* 1.1.0 build 2010032113 + + - added merge tool wich generate merged version of code + located in phpqrcode.php + - splited qrconst.php from qrlib.php + +* 1.1.1 build 2010032405 + + - patch by Rick Seymour allowing saving PNG and displaying it at the same time + - added version info in VERSION file + - modified merge tool to include version info into generated file + - fixed e-mail in almost all head comments + +* 1.1.2 build 2010032722 + + - full integration with TCPDF thanks to Nicola Asuni, it's author + - fixed bug with alphanumeric encoding detection + +* 1.1.3 build 2010081807 + + - short opening tags replaced with standard ones + +* 1.1.4 build 2010100721 + + - added missing static keyword QRinput::check (found by Luke Brookhart, Onjax LLC) diff --git a/vendor/crowdfunding2/lib/phpqrcode/INSTALL b/vendor/crowdfunding2/lib/phpqrcode/INSTALL new file mode 100755 index 0000000..0f8e6af --- /dev/null +++ b/vendor/crowdfunding2/lib/phpqrcode/INSTALL @@ -0,0 +1,67 @@ +== REQUIREMENTS == + + * PHP5 + * PHP GD2 extension with JPEG and PNG support + +== INSTALLATION == + +If you want to recreate cache by yourself make sure cache directory is +writable and you have permisions to write into it. Also make sure you are +able to read files in it if you have cache option enabled + +== CONFIGURATION == + +Feel free to modify config constants in qrconfig.php file. Read about it in +provided comments and project wiki page (links in README file) + +== QUICK START == + +Notice: probably you should'nt use all of this in same script :) + +encode('PHP QR Code :)'); +QRspec::debug($tab, true); + +== TCPDF INTEGRATION == + +Inside bindings/tcpdf you will find slightly modified 2dbarcodes.php. +Instal phpqrcode liblaty inside tcpdf folder, then overwrite (or merge) +2dbarcodes.php + +Then use similar as example #50 from TCPDF examples: + + true, + 'padding' => 4, + 'fgcolor' => array(0,0,0), + 'bgcolor' => false, //array(255,255,255) +); + +//code name: QR, specify error correction level after semicolon (L,M,Q,H) +$pdf->write2DBarcode('PHP QR Code :)', 'QR,L', '', '', 30, 30, $style, 'N'); diff --git a/vendor/crowdfunding2/lib/phpqrcode/LICENSE b/vendor/crowdfunding2/lib/phpqrcode/LICENSE new file mode 100755 index 0000000..31afd6d --- /dev/null +++ b/vendor/crowdfunding2/lib/phpqrcode/LICENSE @@ -0,0 +1,165 @@ + GNU LESSER GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + + This version of the GNU Lesser General Public License incorporates +the terms and conditions of version 3 of the GNU General Public +License, supplemented by the additional permissions listed below. + + 0. Additional Definitions. + + As used herein, "this License" refers to version 3 of the GNU Lesser +General Public License, and the "GNU GPL" refers to version 3 of the GNU +General Public License. + + "The Library" refers to a covered work governed by this License, +other than an Application or a Combined Work as defined below. + + An "Application" is any work that makes use of an interface provided +by the Library, but which is not otherwise based on the Library. +Defining a subclass of a class defined by the Library is deemed a mode +of using an interface provided by the Library. + + A "Combined Work" is a work produced by combining or linking an +Application with the Library. The particular version of the Library +with which the Combined Work was made is also called the "Linked +Version". + + The "Minimal Corresponding Source" for a Combined Work means the +Corresponding Source for the Combined Work, excluding any source code +for portions of the Combined Work that, considered in isolation, are +based on the Application, and not on the Linked Version. + + The "Corresponding Application Code" for a Combined Work means the +object code and/or source code for the Application, including any data +and utility programs needed for reproducing the Combined Work from the +Application, but excluding the System Libraries of the Combined Work. + + 1. Exception to Section 3 of the GNU GPL. + + You may convey a covered work under sections 3 and 4 of this License +without being bound by section 3 of the GNU GPL. + + 2. Conveying Modified Versions. + + If you modify a copy of the Library, and, in your modifications, a +facility refers to a function or data to be supplied by an Application +that uses the facility (other than as an argument passed when the +facility is invoked), then you may convey a copy of the modified +version: + + a) under this License, provided that you make a good faith effort to + ensure that, in the event an Application does not supply the + function or data, the facility still operates, and performs + whatever part of its purpose remains meaningful, or + + b) under the GNU GPL, with none of the additional permissions of + this License applicable to that copy. + + 3. Object Code Incorporating Material from Library Header Files. + + The object code form of an Application may incorporate material from +a header file that is part of the Library. You may convey such object +code under terms of your choice, provided that, if the incorporated +material is not limited to numerical parameters, data structure +layouts and accessors, or small macros, inline functions and templates +(ten or fewer lines in length), you do both of the following: + + a) Give prominent notice with each copy of the object code that the + Library is used in it and that the Library and its use are + covered by this License. + + b) Accompany the object code with a copy of the GNU GPL and this license + document. + + 4. Combined Works. + + You may convey a Combined Work under terms of your choice that, +taken together, effectively do not restrict modification of the +portions of the Library contained in the Combined Work and reverse +engineering for debugging such modifications, if you also do each of +the following: + + a) Give prominent notice with each copy of the Combined Work that + the Library is used in it and that the Library and its use are + covered by this License. + + b) Accompany the Combined Work with a copy of the GNU GPL and this license + document. + + c) For a Combined Work that displays copyright notices during + execution, include the copyright notice for the Library among + these notices, as well as a reference directing the user to the + copies of the GNU GPL and this license document. + + d) Do one of the following: + + 0) Convey the Minimal Corresponding Source under the terms of this + License, and the Corresponding Application Code in a form + suitable for, and under terms that permit, the user to + recombine or relink the Application with a modified version of + the Linked Version to produce a modified Combined Work, in the + manner specified by section 6 of the GNU GPL for conveying + Corresponding Source. + + 1) Use a suitable shared library mechanism for linking with the + Library. A suitable mechanism is one that (a) uses at run time + a copy of the Library already present on the user's computer + system, and (b) will operate properly with a modified version + of the Library that is interface-compatible with the Linked + Version. + + e) Provide Installation Information, but only if you would otherwise + be required to provide such information under section 6 of the + GNU GPL, and only to the extent that such information is + necessary to install and execute a modified version of the + Combined Work produced by recombining or relinking the + Application with a modified version of the Linked Version. (If + you use option 4d0, the Installation Information must accompany + the Minimal Corresponding Source and Corresponding Application + Code. If you use option 4d1, you must provide the Installation + Information in the manner specified by section 6 of the GNU GPL + for conveying Corresponding Source.) + + 5. Combined Libraries. + + You may place library facilities that are a work based on the +Library side by side in a single library together with other library +facilities that are not Applications and are not covered by this +License, and convey such a combined library under terms of your +choice, if you do both of the following: + + a) Accompany the combined library with a copy of the same work based + on the Library, uncombined with any other library facilities, + conveyed under the terms of this License. + + b) Give prominent notice with the combined library that part of it + is a work based on the Library, and explaining where to find the + accompanying uncombined form of the same work. + + 6. Revised Versions of the GNU Lesser General Public License. + + The Free Software Foundation may publish revised and/or new versions +of the GNU Lesser General Public License from time to time. Such new +versions will be similar in spirit to the present version, but may +differ in detail to address new problems or concerns. + + Each version is given a distinguishing version number. If the +Library as you received it specifies that a certain numbered version +of the GNU Lesser General Public License "or any later version" +applies to it, you have the option of following the terms and +conditions either of that published version or of any later version +published by the Free Software Foundation. If the Library as you +received it does not specify a version number of the GNU Lesser +General Public License, you may choose any version of the GNU Lesser +General Public License ever published by the Free Software Foundation. + + If the Library as you received it specifies that a proxy can decide +whether future versions of the GNU Lesser General Public License shall +apply, that proxy's public statement of acceptance of any version is +permanent authorization for you to choose that version for the +Library. diff --git a/vendor/crowdfunding2/lib/phpqrcode/README b/vendor/crowdfunding2/lib/phpqrcode/README new file mode 100755 index 0000000..e5cf608 --- /dev/null +++ b/vendor/crowdfunding2/lib/phpqrcode/README @@ -0,0 +1,61 @@ +This is PHP implementation of QR Code 2-D barcode generator. It is pure-php +LGPL-licensed implementation based on C libqrencode by Kentaro Fukuchi. + +== UPDATE == +Added support for eps export +Usage : QRcode::eps('arguments'); + +Added support for SVG export +Usage : QRcode::svg('arguments'); + +Added support for color export : +example : +$back_color = 0xFFFF00; +$fore_color = 0xFF00FF; +QRcode::png('some othertext 1234', false, 'h', 20, 1, false, $back_color, $fore_color); + + +Copyright (C) 2012 by Alexandre Assouad + +== LICENSING == + +Copyright (C) 2010 by Dominik Dzienia + +This library is free software; you can redistribute it and/or modify it under +the terms of the GNU Lesser General Public License as published by the Free +Software Foundation; either version 3 of the License, or any later version. + +This library is distributed in the hope that it will be useful, but WITHOUT ANY +WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A +PARTICULAR PURPOSE. See the GNU Lesser General Public License (LICENSE file) +for more details. + +You should have received a copy of the GNU Lesser General Public License along +with this library; if not, write to the Free Software Foundation, Inc., 51 +Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +== INSTALATION AND USAGE == + + * INSTALL file + * http://sourceforge.net/apps/mediawiki/phpqrcode/index.php?title=Main_Page + +== CONTACT == + +Fell free to contact me via e-mail (deltalab at poczta dot fm) or using +folowing project pages: + + * http://sourceforge.net/projects/phpqrcode/ + * http://phpqrcode.sourceforge.net/ + +== ACKNOWLEDGMENTS == + +Based on C libqrencode library (ver. 3.1.1) +Copyright (C) 2006-2010 by Kentaro Fukuchi +http://megaui.net/fukuchi/works/qrencode/index.en.html + +QR Code is registered trademarks of DENSO WAVE INCORPORATED in JAPAN and other +countries. + +Reed-Solomon code encoder is written by Phil Karn, KA9Q. +Copyright (C) 2002, 2003, 2004, 2006 Phil Karn, KA9Q + diff --git a/vendor/crowdfunding2/lib/phpqrcode/VERSION b/vendor/crowdfunding2/lib/phpqrcode/VERSION new file mode 100755 index 0000000..2677b36 --- /dev/null +++ b/vendor/crowdfunding2/lib/phpqrcode/VERSION @@ -0,0 +1,2 @@ +1.1.4 +2010100721 \ No newline at end of file diff --git a/vendor/crowdfunding2/lib/phpqrcode/bindings/tcpdf/qrcode.php b/vendor/crowdfunding2/lib/phpqrcode/bindings/tcpdf/qrcode.php new file mode 100755 index 0000000..7995460 --- /dev/null +++ b/vendor/crowdfunding2/lib/phpqrcode/bindings/tcpdf/qrcode.php @@ -0,0 +1,2875 @@ + +// http://phpqrcode.sourceforge.net/ +// https://sourceforge.net/projects/phpqrcode/ +// +// The "PHP QR Code encoder" is based on +// "C libqrencode library" (ver. 3.1.1) +// License: GNU-LGPL 2.1 +// Copyright (C) 2006-2010 by Kentaro Fukuchi +// http://megaui.net/fukuchi/works/qrencode/index.en.html +// +// Reed-Solomon code encoder is written by Phil Karn, KA9Q. +// Copyright (C) 2002-2006 Phil Karn, KA9Q +// +// QR Code is registered trademark of DENSO WAVE INCORPORATED +// http://www.denso-wave.com/qrcode/index-e.html +// --------------------------------------------------------- +// +// Author: Nicola Asuni +// +// (c) Copyright 2010: +// Nicola Asuni +// Tecnick.com S.r.l. +// Via della Pace, 11 +// 09044 Quartucciu (CA) +// ITALY +// www.tecnick.com +// info@tecnick.com +//============================================================+ + +/** + * Class to create QR-code arrays for TCPDF class. + * QR Code symbol is a 2D barcode that can be scanned by handy terminals such as a mobile phone with CCD. + * The capacity of QR Code is up to 7000 digits or 4000 characters, and has high robustness. + * This class supports QR Code model 2, described in JIS (Japanese Industrial Standards) X0510:2004 or ISO/IEC 18004. + * Currently the following features are not supported: ECI and FNC1 mode, Micro QR Code, QR Code model 1, Structured mode. + * + * This class is derived from "PHP QR Code encoder" by Dominik Dzienia (http://phpqrcode.sourceforge.net/) based on "libqrencode C library 3.1.1." by Kentaro Fukuchi (http://megaui.net/fukuchi/works/qrencode/index.en.html), contains Reed-Solomon code written by Phil Karn, KA9Q. QR Code is registered trademark of DENSO WAVE INCORPORATED (http://www.denso-wave.com/qrcode/index-e.html). + * Please read comments on this class source file for full copyright and license information. + * + * @package com.tecnick.tcpdf + * @abstract Class for generating QR-code array for TCPDF. + * @author Nicola Asuni + * @copyright 2010 Nicola Asuni - Tecnick.com S.r.l (www.tecnick.com) Via Della Pace, 11 - 09044 - Quartucciu (CA) - ITALY - www.tecnick.com - info@tecnick.com + * @link http://www.tcpdf.org + * @license http://www.gnu.org/copyleft/lesser.html LGPL + * @version 1.0.002 + */ + +// definitions +if (!defined('QRCODEDEFS')) { + + /** + * Indicate that definitions for this class are set + */ + define('QRCODEDEFS', true); + + // ----------------------------------------------------- + + // Encoding modes (characters which can be encoded in QRcode) + + /** + * Encoding mode + */ + define('QR_MODE_NL', -1); + + /** + * Encoding mode numeric (0-9). 3 characters are encoded to 10bit length. In theory, 7089 characters or less can be stored in a QRcode. + */ + define('QR_MODE_NM', 0); + + /** + * Encoding mode alphanumeric (0-9A-Z $%*+-./:) 45characters. 2 characters are encoded to 11bit length. In theory, 4296 characters or less can be stored in a QRcode. + */ + define('QR_MODE_AN', 1); + + /** + * Encoding mode 8bit byte data. In theory, 2953 characters or less can be stored in a QRcode. + */ + define('QR_MODE_8B', 2); + + /** + * Encoding mode KANJI. A KANJI character (multibyte character) is encoded to 13bit length. In theory, 1817 characters or less can be stored in a QRcode. + */ + define('QR_MODE_KJ', 3); + + /** + * Encoding mode STRUCTURED (currently unsupported) + */ + define('QR_MODE_ST', 4); + + // ----------------------------------------------------- + + // Levels of error correction. + // QRcode has a function of an error correcting for miss reading that white is black. + // Error correcting is defined in 4 level as below. + + /** + * Error correction level L : About 7% or less errors can be corrected. + */ + define('QR_ECLEVEL_L', 0); + + /** + * Error correction level M : About 15% or less errors can be corrected. + */ + define('QR_ECLEVEL_M', 1); + + /** + * Error correction level Q : About 25% or less errors can be corrected. + */ + define('QR_ECLEVEL_Q', 2); + + /** + * Error correction level H : About 30% or less errors can be corrected. + */ + define('QR_ECLEVEL_H', 3); + + // ----------------------------------------------------- + + // Version. Size of QRcode is defined as version. + // Version is from 1 to 40. + // Version 1 is 21*21 matrix. And 4 modules increases whenever 1 version increases. + // So version 40 is 177*177 matrix. + + /** + * Maximum QR Code version. + */ + define('QRSPEC_VERSION_MAX', 40); + + /** + * Maximum matrix size for maximum version (version 40 is 177*177 matrix). + */ + define('QRSPEC_WIDTH_MAX', 177); + + // ----------------------------------------------------- + + /** + * Matrix index to get width from $capacity array. + */ + define('QRCAP_WIDTH', 0); + + /** + * Matrix index to get number of words from $capacity array. + */ + define('QRCAP_WORDS', 1); + + /** + * Matrix index to get remainder from $capacity array. + */ + define('QRCAP_REMINDER', 2); + + /** + * Matrix index to get error correction level from $capacity array. + */ + define('QRCAP_EC', 3); + + // ----------------------------------------------------- + + // Structure (currently usupported) + + /** + * Number of header bits for structured mode + */ + define('STRUCTURE_HEADER_BITS', 20); + + /** + * Max number of symbols for structured mode + */ + define('MAX_STRUCTURED_SYMBOLS', 16); + + // ----------------------------------------------------- + + // Masks + + /** + * Down point base value for case 1 mask pattern (concatenation of same color in a line or a column) + */ + define('N1', 3); + + /** + * Down point base value for case 2 mask pattern (module block of same color) + */ + define('N2', 3); + + /** + * Down point base value for case 3 mask pattern (1:1:3:1:1(dark:bright:dark:bright:dark)pattern in a line or a column) + */ + define('N3', 40); + + /** + * Down point base value for case 4 mask pattern (ration of dark modules in whole) + */ + define('N4', 10); + + // ----------------------------------------------------- + + // Optimization settings + + /** + * if true, estimates best mask (spec. default, but extremally slow; set to false to significant performance boost but (propably) worst quality code + */ + define('QR_FIND_BEST_MASK', true); + + /** + * if false, checks all masks available, otherwise value tells count of masks need to be checked, mask id are got randomly + */ + define('QR_FIND_FROM_RANDOM', 2); + + /** + * when QR_FIND_BEST_MASK === false + */ + define('QR_DEFAULT_MASK', 2); + + // ----------------------------------------------------- + +} // end of definitions + +// #*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*# + +if (!class_exists('QRcode', false)) { + + // for compaibility with PHP4 + if (!function_exists('str_split')) { + /** + * Convert a string to an array (needed for PHP4 compatibility) + * @param string $string The input string. + * @param int $split_length Maximum length of the chunk. + * @return If the optional split_length parameter is specified, the returned array will be broken down into chunks with each being split_length in length, otherwise each chunk will be one character in length. FALSE is returned if split_length is less than 1. If the split_length length exceeds the length of string , the entire string is returned as the first (and only) array element. + */ + function str_split($string, $split_length=1) { + if ((strlen($string) > $split_length) OR (!$split_length)) { + do { + $c = strlen($string); + $parts[] = substr($string, 0, $split_length); + $string = substr($string, $split_length); + } while ($string !== false); + } else { + $parts = array($string); + } + return $parts; + } + } + + // ##################################################### + + /** + * Class to create QR-code arrays for TCPDF class. + * QR Code symbol is a 2D barcode that can be scanned by handy terminals such as a mobile phone with CCD. + * The capacity of QR Code is up to 7000 digits or 4000 characters, and has high robustness. + * This class supports QR Code model 2, described in JIS (Japanese Industrial Standards) X0510:2004 or ISO/IEC 18004. + * Currently the following features are not supported: ECI and FNC1 mode, Micro QR Code, QR Code model 1, Structured mode. + * + * This class is derived from "PHP QR Code encoder" by Dominik Dzienia (http://phpqrcode.sourceforge.net/) based on "libqrencode C library 3.1.1." by Kentaro Fukuchi (http://megaui.net/fukuchi/works/qrencode/index.en.html), contains Reed-Solomon code written by Phil Karn, KA9Q. QR Code is registered trademark of DENSO WAVE INCORPORATED (http://www.denso-wave.com/qrcode/index-e.html). + * Please read comments on this class source file for full copyright and license information. + * + * @name QRcode + * @package com.tecnick.tcpdf + * @abstract Class for generating QR-code array for TCPDF. + * @author Nicola Asuni + * @copyright 2010 Nicola Asuni - Tecnick.com S.r.l (www.tecnick.com) Via Della Pace, 11 - 09044 - Quartucciu (CA) - ITALY - www.tecnick.com - info@tecnick.com + * @link http://www.tcpdf.org + * @license http://www.gnu.org/copyleft/lesser.html LGPL + * @version 1.0.002 + */ + class QRcode { + + /** + * @var barcode array to be returned which is readable by TCPDF + * @access protected + */ + protected $barcode_array = array(); + + /** + * @var QR code version. Size of QRcode is defined as version. Version is from 1 to 40. Version 1 is 21*21 matrix. And 4 modules increases whenever 1 version increases. So version 40 is 177*177 matrix. + * @access protected + */ + protected $version = 0; + + /** + * @var Levels of error correction. See definitions for possible values. + * @access protected + */ + protected $level = QR_ECLEVEL_L; + + /** + * @var Encoding mode + * @access protected + */ + protected $hint = QR_MODE_8B; + + /** + * @var if true the input string will be converted to uppercase + * @access protected + */ + protected $casesensitive = true; + + /** + * @var structured QR code (not supported yet) + * @access protected + */ + protected $structured = 0; + + /** + * @var mask data + * @access protected + */ + protected $data; + + // FrameFiller + + /** + * @var width + * @access protected + */ + protected $width; + + /** + * @var frame + * @access protected + */ + protected $frame; + + /** + * @var X position of bit + * @access protected + */ + protected $x; + + /** + * @var Y position of bit + * @access protected + */ + protected $y; + + /** + * @var direction + * @access protected + */ + protected $dir; + + /** + * @var single bit + * @access protected + */ + protected $bit; + + // ---- QRrawcode ---- + + /** + * @var data code + * @access protected + */ + protected $datacode = array(); + + /** + * @var error correction code + * @access protected + */ + protected $ecccode = array(); + + /** + * @var blocks + * @access protected + */ + protected $blocks; + + /** + * @var Reed-Solomon blocks + * @access protected + */ + protected $rsblocks = array(); //of RSblock + + /** + * @var counter + * @access protected + */ + protected $count; + + /** + * @var data length + * @access protected + */ + protected $dataLength; + + /** + * @var error correction length + * @access protected + */ + protected $eccLength; + + /** + * @var b1 + * @access protected + */ + protected $b1; + + // ---- QRmask ---- + + /** + * @var run length + * @access protected + */ + protected $runLength = array(); + + // ---- QRsplit ---- + + /** + * @var input data string + * @access protected + */ + protected $dataStr = ''; + + /** + * @var input items + * @access protected + */ + protected $items; + + // Reed-Solomon items + + /** + * @var Reed-Solomon items + * @access protected + */ + protected $rsitems = array(); + + /** + * @var array of frames + * @access protected + */ + protected $frames = array(); + + /** + * @var alphabet-numeric convesion table + * @access protected + */ + protected $anTable = array( + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // + 36, -1, -1, -1, 37, 38, -1, -1, -1, -1, 39, 40, -1, 41, 42, 43, // + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 44, -1, -1, -1, -1, -1, // + -1, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, // + 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, -1, -1, -1, -1, -1, // + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 // + ); + + /** + * @var array Table of the capacity of symbols + * See Table 1 (pp.13) and Table 12-16 (pp.30-36), JIS X0510:2004. + * @access protected + */ + protected $capacity = array( + array( 0, 0, 0, array( 0, 0, 0, 0)), // + array( 21, 26, 0, array( 7, 10, 13, 17)), // 1 + array( 25, 44, 7, array( 10, 16, 22, 28)), // + array( 29, 70, 7, array( 15, 26, 36, 44)), // + array( 33, 100, 7, array( 20, 36, 52, 64)), // + array( 37, 134, 7, array( 26, 48, 72, 88)), // 5 + array( 41, 172, 7, array( 36, 64, 96, 112)), // + array( 45, 196, 0, array( 40, 72, 108, 130)), // + array( 49, 242, 0, array( 48, 88, 132, 156)), // + array( 53, 292, 0, array( 60, 110, 160, 192)), // + array( 57, 346, 0, array( 72, 130, 192, 224)), // 10 + array( 61, 404, 0, array( 80, 150, 224, 264)), // + array( 65, 466, 0, array( 96, 176, 260, 308)), // + array( 69, 532, 0, array( 104, 198, 288, 352)), // + array( 73, 581, 3, array( 120, 216, 320, 384)), // + array( 77, 655, 3, array( 132, 240, 360, 432)), // 15 + array( 81, 733, 3, array( 144, 280, 408, 480)), // + array( 85, 815, 3, array( 168, 308, 448, 532)), // + array( 89, 901, 3, array( 180, 338, 504, 588)), // + array( 93, 991, 3, array( 196, 364, 546, 650)), // + array( 97, 1085, 3, array( 224, 416, 600, 700)), // 20 + array(101, 1156, 4, array( 224, 442, 644, 750)), // + array(105, 1258, 4, array( 252, 476, 690, 816)), // + array(109, 1364, 4, array( 270, 504, 750, 900)), // + array(113, 1474, 4, array( 300, 560, 810, 960)), // + array(117, 1588, 4, array( 312, 588, 870, 1050)), // 25 + array(121, 1706, 4, array( 336, 644, 952, 1110)), // + array(125, 1828, 4, array( 360, 700, 1020, 1200)), // + array(129, 1921, 3, array( 390, 728, 1050, 1260)), // + array(133, 2051, 3, array( 420, 784, 1140, 1350)), // + array(137, 2185, 3, array( 450, 812, 1200, 1440)), // 30 + array(141, 2323, 3, array( 480, 868, 1290, 1530)), // + array(145, 2465, 3, array( 510, 924, 1350, 1620)), // + array(149, 2611, 3, array( 540, 980, 1440, 1710)), // + array(153, 2761, 3, array( 570, 1036, 1530, 1800)), // + array(157, 2876, 0, array( 570, 1064, 1590, 1890)), // 35 + array(161, 3034, 0, array( 600, 1120, 1680, 1980)), // + array(165, 3196, 0, array( 630, 1204, 1770, 2100)), // + array(169, 3362, 0, array( 660, 1260, 1860, 2220)), // + array(173, 3532, 0, array( 720, 1316, 1950, 2310)), // + array(177, 3706, 0, array( 750, 1372, 2040, 2430)) // 40 + ); + + /** + * @var array Length indicator + * @access protected + */ + protected $lengthTableBits = array( + array(10, 12, 14), + array( 9, 11, 13), + array( 8, 16, 16), + array( 8, 10, 12) + ); + + /** + * @var array Table of the error correction code (Reed-Solomon block) + * See Table 12-16 (pp.30-36), JIS X0510:2004. + * @access protected + */ + protected $eccTable = array( + array(array( 0, 0), array( 0, 0), array( 0, 0), array( 0, 0)), // + array(array( 1, 0), array( 1, 0), array( 1, 0), array( 1, 0)), // 1 + array(array( 1, 0), array( 1, 0), array( 1, 0), array( 1, 0)), // + array(array( 1, 0), array( 1, 0), array( 2, 0), array( 2, 0)), // + array(array( 1, 0), array( 2, 0), array( 2, 0), array( 4, 0)), // + array(array( 1, 0), array( 2, 0), array( 2, 2), array( 2, 2)), // 5 + array(array( 2, 0), array( 4, 0), array( 4, 0), array( 4, 0)), // + array(array( 2, 0), array( 4, 0), array( 2, 4), array( 4, 1)), // + array(array( 2, 0), array( 2, 2), array( 4, 2), array( 4, 2)), // + array(array( 2, 0), array( 3, 2), array( 4, 4), array( 4, 4)), // + array(array( 2, 2), array( 4, 1), array( 6, 2), array( 6, 2)), // 10 + array(array( 4, 0), array( 1, 4), array( 4, 4), array( 3, 8)), // + array(array( 2, 2), array( 6, 2), array( 4, 6), array( 7, 4)), // + array(array( 4, 0), array( 8, 1), array( 8, 4), array(12, 4)), // + array(array( 3, 1), array( 4, 5), array(11, 5), array(11, 5)), // + array(array( 5, 1), array( 5, 5), array( 5, 7), array(11, 7)), // 15 + array(array( 5, 1), array( 7, 3), array(15, 2), array( 3, 13)), // + array(array( 1, 5), array(10, 1), array( 1, 15), array( 2, 17)), // + array(array( 5, 1), array( 9, 4), array(17, 1), array( 2, 19)), // + array(array( 3, 4), array( 3, 11), array(17, 4), array( 9, 16)), // + array(array( 3, 5), array( 3, 13), array(15, 5), array(15, 10)), // 20 + array(array( 4, 4), array(17, 0), array(17, 6), array(19, 6)), // + array(array( 2, 7), array(17, 0), array( 7, 16), array(34, 0)), // + array(array( 4, 5), array( 4, 14), array(11, 14), array(16, 14)), // + array(array( 6, 4), array( 6, 14), array(11, 16), array(30, 2)), // + array(array( 8, 4), array( 8, 13), array( 7, 22), array(22, 13)), // 25 + array(array(10, 2), array(19, 4), array(28, 6), array(33, 4)), // + array(array( 8, 4), array(22, 3), array( 8, 26), array(12, 28)), // + array(array( 3, 10), array( 3, 23), array( 4, 31), array(11, 31)), // + array(array( 7, 7), array(21, 7), array( 1, 37), array(19, 26)), // + array(array( 5, 10), array(19, 10), array(15, 25), array(23, 25)), // 30 + array(array(13, 3), array( 2, 29), array(42, 1), array(23, 28)), // + array(array(17, 0), array(10, 23), array(10, 35), array(19, 35)), // + array(array(17, 1), array(14, 21), array(29, 19), array(11, 46)), // + array(array(13, 6), array(14, 23), array(44, 7), array(59, 1)), // + array(array(12, 7), array(12, 26), array(39, 14), array(22, 41)), // 35 + array(array( 6, 14), array( 6, 34), array(46, 10), array( 2, 64)), // + array(array(17, 4), array(29, 14), array(49, 10), array(24, 46)), // + array(array( 4, 18), array(13, 32), array(48, 14), array(42, 32)), // + array(array(20, 4), array(40, 7), array(43, 22), array(10, 67)), // + array(array(19, 6), array(18, 31), array(34, 34), array(20, 61)) // 40 + ); + + /** + * @var array Positions of alignment patterns. + * This array includes only the second and the third position of the alignment patterns. Rest of them can be calculated from the distance between them. + * See Table 1 in Appendix E (pp.71) of JIS X0510:2004. + * @access protected + */ + protected $alignmentPattern = array( + array( 0, 0), + array( 0, 0), array(18, 0), array(22, 0), array(26, 0), array(30, 0), // 1- 5 + array(34, 0), array(22, 38), array(24, 42), array(26, 46), array(28, 50), // 6-10 + array(30, 54), array(32, 58), array(34, 62), array(26, 46), array(26, 48), // 11-15 + array(26, 50), array(30, 54), array(30, 56), array(30, 58), array(34, 62), // 16-20 + array(28, 50), array(26, 50), array(30, 54), array(28, 54), array(32, 58), // 21-25 + array(30, 58), array(34, 62), array(26, 50), array(30, 54), array(26, 52), // 26-30 + array(30, 56), array(34, 60), array(30, 58), array(34, 62), array(30, 54), // 31-35 + array(24, 50), array(28, 54), array(32, 58), array(26, 54), array(30, 58) // 35-40 + ); + + /** + * @var array Version information pattern (BCH coded). + * See Table 1 in Appendix D (pp.68) of JIS X0510:2004. + * size: [QRSPEC_VERSION_MAX - 6] + * @access protected + */ + protected $versionPattern = array( + 0x07c94, 0x085bc, 0x09a99, 0x0a4d3, 0x0bbf6, 0x0c762, 0x0d847, 0x0e60d, // + 0x0f928, 0x10b78, 0x1145d, 0x12a17, 0x13532, 0x149a6, 0x15683, 0x168c9, // + 0x177ec, 0x18ec4, 0x191e1, 0x1afab, 0x1b08e, 0x1cc1a, 0x1d33f, 0x1ed75, // + 0x1f250, 0x209d5, 0x216f0, 0x228ba, 0x2379f, 0x24b0b, 0x2542e, 0x26a64, // + 0x27541, 0x28c69 + ); + + /** + * @var array Format information + * @access protected + */ + protected $formatInfo = array( + array(0x77c4, 0x72f3, 0x7daa, 0x789d, 0x662f, 0x6318, 0x6c41, 0x6976), // + array(0x5412, 0x5125, 0x5e7c, 0x5b4b, 0x45f9, 0x40ce, 0x4f97, 0x4aa0), // + array(0x355f, 0x3068, 0x3f31, 0x3a06, 0x24b4, 0x2183, 0x2eda, 0x2bed), // + array(0x1689, 0x13be, 0x1ce7, 0x19d0, 0x0762, 0x0255, 0x0d0c, 0x083b) // + ); + + + // ------------------------------------------------- + // ------------------------------------------------- + + + /** + * This is the class constructor. + * Creates a QRcode object + * @param string $code code to represent using QRcode + * @param string $eclevel error level:
  • L : About 7% or less errors can be corrected.
  • M : About 15% or less errors can be corrected.
  • Q : About 25% or less errors can be corrected.
  • H : About 30% or less errors can be corrected.
+ * @access public + * @since 1.0.000 + */ + public function __construct($code, $eclevel = 'L') { + $barcode_array = array(); + if ((is_null($code)) OR ($code == '\0') OR ($code == '')) { + return false; + } + // set error correction level + $this->level = array_search($eclevel, array('L', 'M', 'Q', 'H')); + if ($this->level === false) { + $this->level = QR_ECLEVEL_L; + } + if (($this->hint != QR_MODE_8B) AND ($this->hint != QR_MODE_KJ)) { + return false; + } + if (($this->version < 0) OR ($this->version > QRSPEC_VERSION_MAX)) { + return false; + } + $this->items = array(); + $this->encodeString($code); + $qrTab = $this->binarize($this->data); + $size = count($qrTab); + $barcode_array['num_rows'] = $size; + $barcode_array['num_cols'] = $size; + $barcode_array['bcode'] = array(); + foreach ($qrTab as $line) { + $arrAdd = array(); + foreach (str_split($line) as $char) { + $arrAdd[] = ($char=='1')?1:0; + } + $barcode_array['bcode'][] = $arrAdd; + } + $this->barcode_array = $barcode_array; + } + + /** + * Returns a barcode array which is readable by TCPDF + * @return array barcode array readable by TCPDF; + * @access public + */ + public function getBarcodeArray() { + return $this->barcode_array; + } + + /** + * Convert the frame in binary form + * @param array $frame array to binarize + * @return array frame in binary form + */ + protected function binarize($frame) { + $len = count($frame); + // the frame is square (width = height) + foreach ($frame as &$frameLine) { + for ($i=0; $i<$len; $i++) { + $frameLine[$i] = (ord($frameLine[$i])&1)?'1':'0'; + } + } + return $frame; + } + + /** + * Encode the input string to QR code + * @param string $string input string to encode + */ + protected function encodeString($string) { + $this->dataStr = $string; + if (!$this->casesensitive) { + $this->toUpper(); + } + $ret = $this->splitString(); + if ($ret < 0) { + return NULL; + } + $this->encodeMask(-1); + } + + /** + * Encode mask + * @param int $mask masking mode + */ + protected function encodeMask($mask) { + $spec = array(0, 0, 0, 0, 0); + $this->datacode = $this->getByteStream($this->items); + if (is_null($this->datacode)) { + return NULL; + } + $spec = $this->getEccSpec($this->version, $this->level, $spec); + $this->b1 = $this->rsBlockNum1($spec); + $this->dataLength = $this->rsDataLength($spec); + $this->eccLength = $this->rsEccLength($spec); + $this->ecccode = array_fill(0, $this->eccLength, 0); + $this->blocks = $this->rsBlockNum($spec); + $ret = $this->init($spec); + if ($ret < 0) { + return NULL; + } + $this->count = 0; + $this->width = $this->getWidth($this->version); + $this->frame = $this->newFrame($this->version); + $this->x = $this->width - 1; + $this->y = $this->width - 1; + $this->dir = -1; + $this->bit = -1; + // inteleaved data and ecc codes + for ($i=0; $i < ($this->dataLength + $this->eccLength); $i++) { + $code = $this->getCode(); + $bit = 0x80; + for ($j=0; $j<8; $j++) { + $addr = $this->getNextPosition(); + $this->setFrameAt($addr, 0x02 | (($bit & $code) != 0)); + $bit = $bit >> 1; + } + } + // remainder bits + $j = $this->getRemainder($this->version); + for ($i=0; $i<$j; $i++) { + $addr = $this->getNextPosition(); + $this->setFrameAt($addr, 0x02); + } + // masking + $this->runLength = array_fill(0, QRSPEC_WIDTH_MAX + 1, 0); + if ($mask < 0) { + if (QR_FIND_BEST_MASK) { + $masked = $this->mask($this->width, $this->frame, $this->level); + } else { + $masked = $this->makeMask($this->width, $this->frame, (intval(QR_DEFAULT_MASK) % 8), $this->level); + } + } else { + $masked = $this->makeMask($this->width, $this->frame, $mask, $this->level); + } + if ($masked == NULL) { + return NULL; + } + $this->data = $masked; + } + + // - - - - - - - - - - - - - - - - - - - - - - - - - + + // FrameFiller + + /** + * Set frame value at specified position + * @param array $at x,y position + * @param int $val value of the character to set + */ + protected function setFrameAt($at, $val) { + $this->frame[$at['y']][$at['x']] = chr($val); + } + + /** + * Get frame value at specified position + * @param array $at x,y position + * @return value at specified position + */ + protected function getFrameAt($at) { + return ord($this->frame[$at['y']][$at['x']]); + } + + /** + * Return the next frame position + * @return array of x,y coordinates + */ + protected function getNextPosition() { + do { + if ($this->bit == -1) { + $this->bit = 0; + return array('x'=>$this->x, 'y'=>$this->y); + } + $x = $this->x; + $y = $this->y; + $w = $this->width; + if ($this->bit == 0) { + $x--; + $this->bit++; + } else { + $x++; + $y += $this->dir; + $this->bit--; + } + if ($this->dir < 0) { + if ($y < 0) { + $y = 0; + $x -= 2; + $this->dir = 1; + if ($x == 6) { + $x--; + $y = 9; + } + } + } else { + if ($y == $w) { + $y = $w - 1; + $x -= 2; + $this->dir = -1; + if ($x == 6) { + $x--; + $y -= 8; + } + } + } + if (($x < 0) OR ($y < 0)) { + return NULL; + } + $this->x = $x; + $this->y = $y; + } while(ord($this->frame[$y][$x]) & 0x80); + return array('x'=>$x, 'y'=>$y); + } + + // - - - - - - - - - - - - - - - - - - - - - - - - - + + // QRrawcode + + /** + * Initialize code. + * @param array $spec array of ECC specification + * @return 0 in case of success, -1 in case of error + */ + protected function init($spec) { + $dl = $this->rsDataCodes1($spec); + $el = $this->rsEccCodes1($spec); + $rs = $this->init_rs(8, 0x11d, 0, 1, $el, 255 - $dl - $el); + $blockNo = 0; + $dataPos = 0; + $eccPos = 0; + $endfor = $this->rsBlockNum1($spec); + for ($i=0; $i < $endfor; ++$i) { + $ecc = array_slice($this->ecccode, $eccPos); + $this->rsblocks[$blockNo] = array(); + $this->rsblocks[$blockNo]['dataLength'] = $dl; + $this->rsblocks[$blockNo]['data'] = array_slice($this->datacode, $dataPos); + $this->rsblocks[$blockNo]['eccLength'] = $el; + $ecc = $this->encode_rs_char($rs, $this->rsblocks[$blockNo]['data'], $ecc); + $this->rsblocks[$blockNo]['ecc'] = $ecc; + $this->ecccode = array_merge(array_slice($this->ecccode,0, $eccPos), $ecc); + $dataPos += $dl; + $eccPos += $el; + $blockNo++; + } + if ($this->rsBlockNum2($spec) == 0) { + return 0; + } + $dl = $this->rsDataCodes2($spec); + $el = $this->rsEccCodes2($spec); + $rs = $this->init_rs(8, 0x11d, 0, 1, $el, 255 - $dl - $el); + if ($rs == NULL) { + return -1; + } + $endfor = $this->rsBlockNum2($spec); + for ($i=0; $i < $endfor; ++$i) { + $ecc = array_slice($this->ecccode, $eccPos); + $this->rsblocks[$blockNo] = array(); + $this->rsblocks[$blockNo]['dataLength'] = $dl; + $this->rsblocks[$blockNo]['data'] = array_slice($this->datacode, $dataPos); + $this->rsblocks[$blockNo]['eccLength'] = $el; + $ecc = $this->encode_rs_char($rs, $this->rsblocks[$blockNo]['data'], $ecc); + $this->rsblocks[$blockNo]['ecc'] = $ecc; + $this->ecccode = array_merge(array_slice($this->ecccode, 0, $eccPos), $ecc); + $dataPos += $dl; + $eccPos += $el; + $blockNo++; + } + return 0; + } + + /** + * Return Reed-Solomon block code. + * @return array rsblocks + */ + protected function getCode() { + if ($this->count < $this->dataLength) { + $row = $this->count % $this->blocks; + $col = $this->count / $this->blocks; + if ($col >= $this->rsblocks[0]['dataLength']) { + $row += $this->b1; + } + $ret = $this->rsblocks[$row]['data'][$col]; + } elseif ($this->count < $this->dataLength + $this->eccLength) { + $row = ($this->count - $this->dataLength) % $this->blocks; + $col = ($this->count - $this->dataLength) / $this->blocks; + $ret = $this->rsblocks[$row]['ecc'][$col]; + } else { + return 0; + } + $this->count++; + return $ret; + } + + // - - - - - - - - - - - - - - - - - - - - - - - - - + + // QRmask + + /** + * Write Format Information on frame and returns the number of black bits + * @param int $width frame width + * @param array $frame frame + * @param array $mask masking mode + * @param int $level error correction level + * @return int blacks + */ + protected function writeFormatInformation($width, &$frame, $mask, $level) { + $blacks = 0; + $format = $this->getFormatInfo($mask, $level); + for ($i=0; $i<8; ++$i) { + if ($format & 1) { + $blacks += 2; + $v = 0x85; + } else { + $v = 0x84; + } + $frame[8][$width - 1 - $i] = chr($v); + if ($i < 6) { + $frame[$i][8] = chr($v); + } else { + $frame[$i + 1][8] = chr($v); + } + $format = $format >> 1; + } + for ($i=0; $i<7; ++$i) { + if ($format & 1) { + $blacks += 2; + $v = 0x85; + } else { + $v = 0x84; + } + $frame[$width - 7 + $i][8] = chr($v); + if ($i == 0) { + $frame[8][7] = chr($v); + } else { + $frame[8][6 - $i] = chr($v); + } + $format = $format >> 1; + } + return $blacks; + } + + /** + * mask0 + * @param int $x X position + * @param int $y Y position + * @return int mask + */ + protected function mask0($x, $y) { + return ($x + $y) & 1; + } + + /** + * mask1 + * @param int $x X position + * @param int $y Y position + * @return int mask + */ + protected function mask1($x, $y) { + return ($y & 1); + } + + /** + * mask2 + * @param int $x X position + * @param int $y Y position + * @return int mask + */ + protected function mask2($x, $y) { + return ($x % 3); + } + + /** + * mask3 + * @param int $x X position + * @param int $y Y position + * @return int mask + */ + protected function mask3($x, $y) { + return ($x + $y) % 3; + } + + /** + * mask4 + * @param int $x X position + * @param int $y Y position + * @return int mask + */ + protected function mask4($x, $y) { + return (((int)($y / 2)) + ((int)($x / 3))) & 1; + } + + /** + * mask5 + * @param int $x X position + * @param int $y Y position + * @return int mask + */ + protected function mask5($x, $y) { + return (($x * $y) & 1) + ($x * $y) % 3; + } + + /** + * mask6 + * @param int $x X position + * @param int $y Y position + * @return int mask + */ + protected function mask6($x, $y) { + return ((($x * $y) & 1) + ($x * $y) % 3) & 1; + } + + /** + * mask7 + * @param int $x X position + * @param int $y Y position + * @return int mask + */ + protected function mask7($x, $y) { + return ((($x * $y) % 3) + (($x + $y) & 1)) & 1; + } + + /** + * Return bitmask + * @param int $maskNo mask number + * @param int $width width + * @param array $frame frame + * @return array bitmask + */ + protected function generateMaskNo($maskNo, $width, $frame) { + $bitMask = array_fill(0, $width, array_fill(0, $width, 0)); + for ($y=0; $y<$width; ++$y) { + for ($x=0; $x<$width; ++$x) { + if (ord($frame[$y][$x]) & 0x80) { + $bitMask[$y][$x] = 0; + } else { + $maskFunc = call_user_func(array($this, 'mask'.$maskNo), $x, $y); + $bitMask[$y][$x] = ($maskFunc == 0)?1:0; + } + } + } + return $bitMask; + } + + /** + * makeMaskNo + * @param int $maskNo + * @param int $width + * @param int $s + * @param int $d + * @param boolean $maskGenOnly + * @return int b + */ + protected function makeMaskNo($maskNo, $width, $s, &$d, $maskGenOnly=false) { + $b = 0; + $bitMask = array(); + $bitMask = $this->generateMaskNo($maskNo, $width, $s, $d); + if ($maskGenOnly) { + return; + } + $d = $s; + for ($y=0; $y<$width; ++$y) { + for ($x=0; $x<$width; ++$x) { + if ($bitMask[$y][$x] == 1) { + $d[$y][$x] = chr(ord($s[$y][$x]) ^ (int)$bitMask[$y][$x]); + } + $b += (int)(ord($d[$y][$x]) & 1); + } + } + return $b; + } + + /** + * makeMask + * @param int $width + * @param array $frame + * @param int $maskNo + * @param int $level + * @return array mask + */ + protected function makeMask($width, $frame, $maskNo, $level) { + $masked = array_fill(0, $width, str_repeat("\0", $width)); + $this->makeMaskNo($maskNo, $width, $frame, $masked); + $this->writeFormatInformation($width, $masked, $maskNo, $level); + return $masked; + } + + /** + * calcN1N3 + * @param int $length + * @return int demerit + */ + protected function calcN1N3($length) { + $demerit = 0; + for ($i=0; $i<$length; ++$i) { + if ($this->runLength[$i] >= 5) { + $demerit += (N1 + ($this->runLength[$i] - 5)); + } + if ($i & 1) { + if (($i >= 3) AND ($i < ($length-2)) AND ($this->runLength[$i] % 3 == 0)) { + $fact = (int)($this->runLength[$i] / 3); + if (($this->runLength[$i-2] == $fact) + AND ($this->runLength[$i-1] == $fact) + AND ($this->runLength[$i+1] == $fact) + AND ($this->runLength[$i+2] == $fact)) { + if (($this->runLength[$i-3] < 0) OR ($this->runLength[$i-3] >= (4 * $fact))) { + $demerit += N3; + } elseif ((($i+3) >= $length) OR ($this->runLength[$i+3] >= (4 * $fact))) { + $demerit += N3; + } + } + } + } + } + return $demerit; + } + + /** + * evaluateSymbol + * @param int $width + * @param array $frame + * @return int demerit + */ + protected function evaluateSymbol($width, $frame) { + $head = 0; + $demerit = 0; + for ($y=0; $y<$width; ++$y) { + $head = 0; + $this->runLength[0] = 1; + $frameY = $frame[$y]; + if ($y > 0) { + $frameYM = $frame[$y-1]; + } + for ($x=0; $x<$width; ++$x) { + if (($x > 0) AND ($y > 0)) { + $b22 = ord($frameY[$x]) & ord($frameY[$x-1]) & ord($frameYM[$x]) & ord($frameYM[$x-1]); + $w22 = ord($frameY[$x]) | ord($frameY[$x-1]) | ord($frameYM[$x]) | ord($frameYM[$x-1]); + if (($b22 | ($w22 ^ 1)) & 1) { + $demerit += N2; + } + } + if (($x == 0) AND (ord($frameY[$x]) & 1)) { + $this->runLength[0] = -1; + $head = 1; + $this->runLength[$head] = 1; + } elseif ($x > 0) { + if ((ord($frameY[$x]) ^ ord($frameY[$x-1])) & 1) { + $head++; + $this->runLength[$head] = 1; + } else { + $this->runLength[$head]++; + } + } + } + $demerit += $this->calcN1N3($head+1); + } + for ($x=0; $x<$width; ++$x) { + $head = 0; + $this->runLength[0] = 1; + for ($y=0; $y<$width; ++$y) { + if (($y == 0) AND (ord($frame[$y][$x]) & 1)) { + $this->runLength[0] = -1; + $head = 1; + $this->runLength[$head] = 1; + } elseif ($y > 0) { + if ((ord($frame[$y][$x]) ^ ord($frame[$y-1][$x])) & 1) { + $head++; + $this->runLength[$head] = 1; + } else { + $this->runLength[$head]++; + } + } + } + $demerit += $this->calcN1N3($head+1); + } + return $demerit; + } + + /** + * mask + * @param int $width + * @param array $frame + * @param int $level + * @return array best mask + */ + protected function mask($width, $frame, $level) { + $minDemerit = PHP_INT_MAX; + $bestMaskNum = 0; + $bestMask = array(); + $checked_masks = array(0, 1, 2, 3, 4, 5, 6, 7); + if (QR_FIND_FROM_RANDOM !== false) { + $howManuOut = 8 - (QR_FIND_FROM_RANDOM % 9); + for ($i = 0; $i < $howManuOut; ++$i) { + $remPos = rand (0, count($checked_masks)-1); + unset($checked_masks[$remPos]); + $checked_masks = array_values($checked_masks); + } + } + $bestMask = $frame; + foreach ($checked_masks as $i) { + $mask = array_fill(0, $width, str_repeat("\0", $width)); + $demerit = 0; + $blacks = 0; + $blacks = $this->makeMaskNo($i, $width, $frame, $mask); + $blacks += $this->writeFormatInformation($width, $mask, $i, $level); + $blacks = (int)(100 * $blacks / ($width * $width)); + $demerit = (int)((int)(abs($blacks - 50) / 5) * N4); + $demerit += $this->evaluateSymbol($width, $mask); + if ($demerit < $minDemerit) { + $minDemerit = $demerit; + $bestMask = $mask; + $bestMaskNum = $i; + } + } + return $bestMask; + } + + // - - - - - - - - - - - - - - - - - - - - - - - - - + + // QRsplit + + /** + * Return true if the character at specified position is a number + * @param string $str string + * @param int $pos characted position + * @return boolean true of false + */ + protected function isdigitat($str, $pos) { + if ($pos >= strlen($str)) { + return false; + } + return ((ord($str[$pos]) >= ord('0'))&&(ord($str[$pos]) <= ord('9'))); + } + + /** + * Return true if the character at specified position is an alphanumeric character + * @param string $str string + * @param int $pos characted position + * @return boolean true of false + */ + protected function isalnumat($str, $pos) { + if ($pos >= strlen($str)) { + return false; + } + return ($this->lookAnTable(ord($str[$pos])) >= 0); + } + + /** + * identifyMode + * @param int $pos + * @return int mode + */ + protected function identifyMode($pos) { + if ($pos >= strlen($this->dataStr)) { + return QR_MODE_NL; + } + $c = $this->dataStr[$pos]; + if ($this->isdigitat($this->dataStr, $pos)) { + return QR_MODE_NM; + } elseif ($this->isalnumat($this->dataStr, $pos)) { + return QR_MODE_AN; + } elseif ($this->hint == QR_MODE_KJ) { + if ($pos+1 < strlen($this->dataStr)) { + $d = $this->dataStr[$pos+1]; + $word = (ord($c) << 8) | ord($d); + if (($word >= 0x8140 && $word <= 0x9ffc) OR ($word >= 0xe040 && $word <= 0xebbf)) { + return QR_MODE_KJ; + } + } + } + return QR_MODE_8B; + } + + /** + * eatNum + * @return int run + */ + protected function eatNum() { + $ln = $this->lengthIndicator(QR_MODE_NM, $this->version); + $p = 0; + while($this->isdigitat($this->dataStr, $p)) { + $p++; + } + $run = $p; + $mode = $this->identifyMode($p); + if ($mode == QR_MODE_8B) { + $dif = $this->estimateBitsModeNum($run) + 4 + $ln + + $this->estimateBitsMode8(1) // + 4 + l8 + - $this->estimateBitsMode8($run + 1); // - 4 - l8 + if ($dif > 0) { + return $this->eat8(); + } + } + if ($mode == QR_MODE_AN) { + $dif = $this->estimateBitsModeNum($run) + 4 + $ln + + $this->estimateBitsModeAn(1) // + 4 + la + - $this->estimateBitsModeAn($run + 1);// - 4 - la + if ($dif > 0) { + return $this->eatAn(); + } + } + $this->items = $this->appendNewInputItem($this->items, QR_MODE_NM, $run, str_split($this->dataStr)); + return $run; + } + + /** + * eatAn + * @return int run + */ + protected function eatAn() { + $la = $this->lengthIndicator(QR_MODE_AN, $this->version); + $ln = $this->lengthIndicator(QR_MODE_NM, $this->version); + $p = 0; + while($this->isalnumat($this->dataStr, $p)) { + if ($this->isdigitat($this->dataStr, $p)) { + $q = $p; + while($this->isdigitat($this->dataStr, $q)) { + $q++; + } + $dif = $this->estimateBitsModeAn($p) // + 4 + la + + $this->estimateBitsModeNum($q - $p) + 4 + $ln + - $this->estimateBitsModeAn($q); // - 4 - la + if ($dif < 0) { + break; + } else { + $p = $q; + } + } else { + $p++; + } + } + $run = $p; + if (!$this->isalnumat($this->dataStr, $p)) { + $dif = $this->estimateBitsModeAn($run) + 4 + $la + + $this->estimateBitsMode8(1) // + 4 + l8 + - $this->estimateBitsMode8($run + 1); // - 4 - l8 + if ($dif > 0) { + return $this->eat8(); + } + } + $this->items = $this->appendNewInputItem($this->items, QR_MODE_AN, $run, str_split($this->dataStr)); + return $run; + } + + /** + * eatKanji + * @return int run + */ + protected function eatKanji() { + $p = 0; + while($this->identifyMode($p) == QR_MODE_KJ) { + $p += 2; + } + $this->items = $this->appendNewInputItem($this->items, QR_MODE_KJ, $p, str_split($this->dataStr)); + return $run; + } + + /** + * eat8 + * @return int run + */ + protected function eat8() { + $la = $this->lengthIndicator(QR_MODE_AN, $this->version); + $ln = $this->lengthIndicator(QR_MODE_NM, $this->version); + $p = 1; + $dataStrLen = strlen($this->dataStr); + while($p < $dataStrLen) { + $mode = $this->identifyMode($p); + if ($mode == QR_MODE_KJ) { + break; + } + if ($mode == QR_MODE_NM) { + $q = $p; + while($this->isdigitat($this->dataStr, $q)) { + $q++; + } + $dif = $this->estimateBitsMode8($p) // + 4 + l8 + + $this->estimateBitsModeNum($q - $p) + 4 + $ln + - $this->estimateBitsMode8($q); // - 4 - l8 + if ($dif < 0) { + break; + } else { + $p = $q; + } + } elseif ($mode == QR_MODE_AN) { + $q = $p; + while($this->isalnumat($this->dataStr, $q)) { + $q++; + } + $dif = $this->estimateBitsMode8($p) // + 4 + l8 + + $this->estimateBitsModeAn($q - $p) + 4 + $la + - $this->estimateBitsMode8($q); // - 4 - l8 + if ($dif < 0) { + break; + } else { + $p = $q; + } + } else { + $p++; + } + } + $run = $p; + $this->items = $this->appendNewInputItem($this->items, QR_MODE_8B, $run, str_split($this->dataStr)); + return $run; + } + + /** + * splitString + */ + protected function splitString() { + while (strlen($this->dataStr) > 0) { + if ($this->dataStr == '') { + return 0; + } + $mode = $this->identifyMode(0); + switch ($mode) { + case QR_MODE_NM: { + $length = $this->eatNum(); + break; + } + case QR_MODE_AN: { + $length = $this->eatAn(); + break; + } + case QR_MODE_KJ: { + if ($hint == QR_MODE_KJ) { + $length = $this->eatKanji(); + } else { + $length = $this->eat8(); + } + break; + } + default: { + $length = $this->eat8(); + break; + } + } + if ($length == 0) { + return 0; + } + if ($length < 0) { + return -1; + } + $this->dataStr = substr($this->dataStr, $length); + } + } + + /** + * toUpper + */ + protected function toUpper() { + $stringLen = strlen($this->dataStr); + $p = 0; + while ($p < $stringLen) { + $mode = $this->identifyMode(substr($this->dataStr, $p), $this->hint); + if ($mode == QR_MODE_KJ) { + $p += 2; + } else { + if ((ord($this->dataStr[$p]) >= ord('a')) AND (ord($this->dataStr[$p]) <= ord('z'))) { + $this->dataStr[$p] = chr(ord($this->dataStr[$p]) - 32); + } + $p++; + } + } + return $this->dataStr; + } + + // - - - - - - - - - - - - - - - - - - - - - - - - - + + // QRinputItem + + /** + * newInputItem + * @param int $mode + * @param int $size + * @param array $data + * @param array $bstream + * @return array input item + */ + protected function newInputItem($mode, $size, $data, $bstream=null) { + $setData = array_slice($data, 0, $size); + if (count($setData) < $size) { + $setData = array_merge($setData, array_fill(0, ($size - count($setData)), 0)); + } + if (!$this->check($mode, $size, $setData)) { + return NULL; + } + $inputitem = array(); + $inputitem['mode'] = $mode; + $inputitem['size'] = $size; + $inputitem['data'] = $setData; + $inputitem['bstream'] = $bstream; + return $inputitem; + } + + /** + * encodeModeNum + * @param array $inputitem + * @param int $version + * @return array input item + */ + protected function encodeModeNum($inputitem, $version) { + $words = (int)($inputitem['size'] / 3); + $inputitem['bstream'] = array(); + $val = 0x1; + $inputitem['bstream'] = $this->appendNum($inputitem['bstream'], 4, $val); + $inputitem['bstream'] = $this->appendNum($inputitem['bstream'], $this->lengthIndicator(QR_MODE_NM, $version), $inputitem['size']); + for ($i=0; $i < $words; ++$i) { + $val = (ord($inputitem['data'][$i*3 ]) - ord('0')) * 100; + $val += (ord($inputitem['data'][$i*3+1]) - ord('0')) * 10; + $val += (ord($inputitem['data'][$i*3+2]) - ord('0')); + $inputitem['bstream'] = $this->appendNum($inputitem['bstream'], 10, $val); + } + if ($inputitem['size'] - $words * 3 == 1) { + $val = ord($inputitem['data'][$words*3]) - ord('0'); + $inputitem['bstream'] = $this->appendNum($inputitem['bstream'], 4, $val); + } elseif (($inputitem['size'] - ($words * 3)) == 2) { + $val = (ord($inputitem['data'][$words*3 ]) - ord('0')) * 10; + $val += (ord($inputitem['data'][$words*3+1]) - ord('0')); + $inputitem['bstream'] = $this->appendNum($inputitem['bstream'], 7, $val); + } + return $inputitem; + } + + /** + * encodeModeAn + * @param array $inputitem + * @param int $version + * @return array input item + */ + protected function encodeModeAn($inputitem, $version) { + $words = (int)($inputitem['size'] / 2); + $inputitem['bstream'] = array(); + $inputitem['bstream'] = $this->appendNum($inputitem['bstream'], 4, 0x02); + $inputitem['bstream'] = $this->appendNum(v, $this->lengthIndicator(QR_MODE_AN, $version), $inputitem['size']); + for ($i=0; $i < $words; ++$i) { + $val = (int)$this->lookAnTable(ord($inputitem['data'][$i*2 ])) * 45; + $val += (int)$this->lookAnTable(ord($inputitem['data'][$i*2+1])); + $inputitem['bstream'] = $this->appendNum($inputitem['bstream'], 11, $val); + } + if ($inputitem['size'] & 1) { + $val = $this->lookAnTable(ord($inputitem['data'][($words * 2)])); + $inputitem['bstream'] = $this->appendNum($inputitem['bstream'], 6, $val); + } + return $inputitem; + } + + /** + * encodeMode8 + * @param array $inputitem + * @param int $version + * @return array input item + */ + protected function encodeMode8($inputitem, $version) { + $inputitem['bstream'] = array(); + $inputitem['bstream'] = $this->appendNum($inputitem['bstream'], 4, 0x4); + $inputitem['bstream'] = $this->appendNum($inputitem['bstream'], $this->lengthIndicator(QR_MODE_8B, $version), $inputitem['size']); + for ($i=0; $i < $inputitem['size']; ++$i) { + $inputitem['bstream'] = $this->appendNum($inputitem['bstream'], 8, ord($inputitem['data'][$i])); + } + return $inputitem; + } + + /** + * encodeModeKanji + * @param array $inputitem + * @param int $version + * @return array input item + */ + protected function encodeModeKanji($inputitem, $version) { + $inputitem['bstream'] = array(); + $inputitem['bstream'] = $this->appendNum($inputitem['bstream'], 4, 0x8); + $inputitem['bstream'] = $this->appendNum($inputitem['bstream'], $this->lengthIndicator(QR_MODE_KJ, $version), (int)($inputitem['size'] / 2)); + for ($i=0; $i<$inputitem['size']; $i+=2) { + $val = (ord($inputitem['data'][$i]) << 8) | ord($inputitem['data'][$i+1]); + if ($val <= 0x9ffc) { + $val -= 0x8140; + } else { + $val -= 0xc140; + } + $h = ($val >> 8) * 0xc0; + $val = ($val & 0xff) + $h; + $inputitem['bstream'] = $this->appendNum($inputitem['bstream'], 13, $val); + } + return $inputitem; + } + + /** + * encodeModeStructure + * @param array $inputitem + * @return array input item + */ + protected function encodeModeStructure($inputitem) { + $inputitem['bstream'] = array(); + $inputitem['bstream'] = $this->appendNum($inputitem['bstream'], 4, 0x03); + $inputitem['bstream'] = $this->appendNum($inputitem['bstream'], 4, ord($inputitem['data'][1]) - 1); + $inputitem['bstream'] = $this->appendNum($inputitem['bstream'], 4, ord($inputitem['data'][0]) - 1); + $inputitem['bstream'] = $this->appendNum($inputitem['bstream'], 8, ord($inputitem['data'][2])); + return $inputitem; + } + + /** + * encodeBitStream + * @param array $inputitem + * @param int $version + * @return array input item + */ + protected function encodeBitStream($inputitem, $version) { + $inputitem['bstream'] = array(); + $words = $this->maximumWords($inputitem['mode'], $version); + if ($inputitem['size'] > $words) { + $st1 = $this->newInputItem($inputitem['mode'], $words, $inputitem['data']); + $st2 = $this->newInputItem($inputitem['mode'], $inputitem['size'] - $words, array_slice($inputitem['data'], $words)); + $st1 = $this->encodeBitStream($st1, $version); + $st2 = $this->encodeBitStream($st2, $version); + $inputitem['bstream'] = array(); + $inputitem['bstream'] = $this->appendBitstream($inputitem['bstream'], $st1['bstream']); + $inputitem['bstream'] = $this->appendBitstream($inputitem['bstream'], $st2['bstream']); + } else { + switch($inputitem['mode']) { + case QR_MODE_NM: { + $inputitem = $this->encodeModeNum($inputitem, $version); + break; + } + case QR_MODE_AN: { + $inputitem = $this->encodeModeAn($inputitem, $version); + break; + } + case QR_MODE_8B: { + $inputitem = $this->encodeMode8($inputitem, $version); + break; + } + case QR_MODE_KJ: { + $inputitem = $this->encodeModeKanji($inputitem, $version); + break; + } + case QR_MODE_ST: { + $inputitem = $this->encodeModeStructure($inputitem); + break; + } + default: { + break; + } + } + } + return $inputitem; + } + + // - - - - - - - - - - - - - - - - - - - - - - - - - + + // QRinput + + /** + * Append data to an input object. + * The data is copied and appended to the input object. + * @param array items input items + * @param int $mode encoding mode. + * @param int $size size of data (byte). + * @param array $data array of input data. + * @return items + * + */ + protected function appendNewInputItem($items, $mode, $size, $data) { + $items[] = $this->newInputItem($mode, $size, $data); + return $items; + } + + /** + * insertStructuredAppendHeader + * @param array $items + * @param int $size + * @param int $index + * @param int $parity + * @return array items + */ + protected function insertStructuredAppendHeader($items, $size, $index, $parity) { + if ($size > MAX_STRUCTURED_SYMBOLS) { + return -1; + } + if (($index <= 0) OR ($index > MAX_STRUCTURED_SYMBOLS)) { + return -1; + } + $buf = array($size, $index, $parity); + $entry = $this->newInputItem(QR_MODE_ST, 3, buf); + array_unshift($items, $entry); + return $items; + } + + /** + * calcParity + * @param array $items + * @return int parity + */ + protected function calcParity($items) { + $parity = 0; + foreach ($items as $item) { + if ($item['mode'] != QR_MODE_ST) { + for ($i=$item['size']-1; $i>=0; --$i) { + $parity ^= $item['data'][$i]; + } + } + } + return $parity; + } + + /** + * checkModeNum + * @param int $size + * @param array $data + * @return boolean true or false + */ + protected function checkModeNum($size, $data) { + for ($i=0; $i<$size; ++$i) { + if ((ord($data[$i]) < ord('0')) OR (ord($data[$i]) > ord('9'))){ + return false; + } + } + return true; + } + + /** + * estimateBitsModeNum + * @param int $size + * @return int number of bits + */ + protected function estimateBitsModeNum($size) { + $w = (int)$size / 3; + $bits = $w * 10; + switch($size - $w * 3) { + case 1: { + $bits += 4; + break; + } + case 2: { + $bits += 7; + break; + } + default: { + break; + } + } + return $bits; + } + + /** + * Look up the alphabet-numeric convesion table (see JIS X0510:2004, pp.19). + * @param int $c character value + * @return value + */ + protected function lookAnTable($c) { + return (($c > 127)?-1:$this->anTable[$c]); + } + + /** + * checkModeAn + * @param int $size + * @param array $data + * @return boolean true or false + */ + protected function checkModeAn($size, $data) { + for ($i=0; $i<$size; ++$i) { + if ($this->lookAnTable(ord($data[$i])) == -1) { + return false; + } + } + return true; + } + + /** + * estimateBitsModeAn + * @param int $size + * @return int number of bits + */ + protected function estimateBitsModeAn($size) { + $w = (int)($size / 2); + $bits = $w * 11; + if ($size & 1) { + $bits += 6; + } + return $bits; + } + + /** + * estimateBitsMode8 + * @param int $size + * @return int number of bits + */ + protected function estimateBitsMode8($size) { + return $size * 8; + } + + /** + * estimateBitsModeKanji + * @param int $size + * @return int number of bits + */ + protected function estimateBitsModeKanji($size) { + return (int)(($size / 2) * 13); + } + + /** + * checkModeKanji + * @param int $size + * @param array $data + * @return boolean true or false + */ + protected function checkModeKanji($size, $data) { + if ($size & 1) { + return false; + } + for ($i=0; $i<$size; $i+=2) { + $val = (ord($data[$i]) << 8) | ord($data[$i+1]); + if (($val < 0x8140) OR (($val > 0x9ffc) AND ($val < 0xe040)) OR ($val > 0xebbf)) { + return false; + } + } + return true; + } + + /** + * Validate the input data. + * @param int $mode encoding mode. + * @param int $size size of data (byte). + * @param array data data to validate + * @return boolean true in case of valid data, false otherwise + */ + protected function check($mode, $size, $data) { + if ($size <= 0) { + return false; + } + switch($mode) { + case QR_MODE_NM: { + return $this->checkModeNum($size, $data); + } + case QR_MODE_AN: { + return $this->checkModeAn($size, $data); + } + case QR_MODE_KJ: { + return $this->checkModeKanji($size, $data); + } + case QR_MODE_8B: { + return true; + } + case QR_MODE_ST: { + return true; + } + default: { + break; + } + } + return false; + } + + /** + * estimateBitStreamSize + * @param array $items + * @param int $version + * @return int bits + */ + protected function estimateBitStreamSize($items, $version) { + $bits = 0; + if ($version == 0) { + $version = 1; + } + foreach ($items as $item) { + switch($item['mode']) { + case QR_MODE_NM: { + $bits = $this->estimateBitsModeNum($item['size']); + break; + } + case QR_MODE_AN: { + $bits = $this->estimateBitsModeAn($item['size']); + break; + } + case QR_MODE_8B: { + $bits = $this->estimateBitsMode8($item['size']); + break; + } + case QR_MODE_KJ: { + $bits = $this->estimateBitsModeKanji($item['size']); + break; + } + case QR_MODE_ST: { + return STRUCTURE_HEADER_BITS; + } + default: { + return 0; + } + } + $l = $this->lengthIndicator($item['mode'], $version); + $m = 1 << $l; + $num = (int)(($item['size'] + $m - 1) / $m); + $bits += $num * (4 + $l); + } + return $bits; + } + + /** + * estimateVersion + * @param array $items + * @return int version + */ + protected function estimateVersion($items) { + $version = 0; + $prev = 0; + do { + $prev = $version; + $bits = $this->estimateBitStreamSize($items, $prev); + $version = $this->getMinimumVersion((int)(($bits + 7) / 8), $this->level); + if ($version < 0) { + return -1; + } + } while ($version > $prev); + return $version; + } + + /** + * lengthOfCode + * @param int $mode + * @param int $version + * @param int $bits + * @return int size + */ + protected function lengthOfCode($mode, $version, $bits) { + $payload = $bits - 4 - $this->lengthIndicator($mode, $version); + switch($mode) { + case QR_MODE_NM: { + $chunks = (int)($payload / 10); + $remain = $payload - $chunks * 10; + $size = $chunks * 3; + if ($remain >= 7) { + $size += 2; + } elseif ($remain >= 4) { + $size += 1; + } + break; + } + case QR_MODE_AN: { + $chunks = (int)($payload / 11); + $remain = $payload - $chunks * 11; + $size = $chunks * 2; + if ($remain >= 6) { + ++$size; + } + break; + } + case QR_MODE_8B: { + $size = (int)($payload / 8); + break; + } + case QR_MODE_KJ: { + $size = (int)(($payload / 13) * 2); + break; + } + case QR_MODE_ST: { + $size = (int)($payload / 8); + break; + } + default: { + $size = 0; + break; + } + } + $maxsize = $this->maximumWords($mode, $version); + if ($size < 0) { + $size = 0; + } + if ($size > $maxsize) { + $size = $maxsize; + } + return $size; + } + + /** + * createBitStream + * @param array $items + * @return array of items and total bits + */ + protected function createBitStream($items) { + $total = 0; + foreach ($items as $key => $item) { + $items[$key] = $this->encodeBitStream($item, $this->version); + $bits = count($items[$key]['bstream']); + $total += $bits; + } + return array($items, $total); + } + + /** + * convertData + * @param array $items + * @return array items + */ + protected function convertData($items) { + $ver = $this->estimateVersion($items); + if ($ver > $this->version) { + $this->version = $ver; + } + for (;;) { + $cbs = $this->createBitStream($items); + $items = $cbs[0]; + $bits = $cbs[1]; + if ($bits < 0) { + return -1; + } + $ver = $this->getMinimumVersion((int)(($bits + 7) / 8), $this->level); + if ($ver < 0) { + return -1; + } elseif ($ver > $this->version) { + $this->version = $ver; + } else { + break; + } + } + return $items; + } + + /** + * Append Padding Bit to bitstream + * @param array $bstream + * @return array bitstream + */ + protected function appendPaddingBit($bstream) { + $bits = count($bstream); + $maxwords = $this->getDataLength($this->version, $this->level); + $maxbits = $maxwords * 8; + if ($maxbits == $bits) { + return 0; + } + if ($maxbits - $bits < 5) { + return $this->appendNum($bstream, $maxbits - $bits, 0); + } + $bits += 4; + $words = (int)(($bits + 7) / 8); + $padding = array(); + $padding = $this->appendNum($padding, $words * 8 - $bits + 4, 0); + $padlen = $maxwords - $words; + if ($padlen > 0) { + $padbuf = array(); + for ($i=0; $i<$padlen; ++$i) { + $padbuf[$i] = ($i&1)?0x11:0xec; + } + $padding = $this->appendBytes($padding, $padlen, $padbuf); + } + return $this->appendBitstream($bstream, $padding); + } + + /** + * mergeBitStream + * @param array $bstream + * @return array bitstream + */ + protected function mergeBitStream($items) { + $items = $this->convertData($items); + $bstream = array(); + foreach ($items as $item) { + $bstream = $this->appendBitstream($bstream, $item['bstream']); + } + return $bstream; + } + + /** + * Returns a stream of bits. + * @param int $items + * @return array padded merged byte stream + */ + protected function getBitStream($items) { + $bstream = $this->mergeBitStream($items); + return $this->appendPaddingBit($bstream); + } + + /** + * Pack all bit streams padding bits into a byte array. + * @param int $items + * @return array padded merged byte stream + */ + protected function getByteStream($items) { + $bstream = $this->getBitStream($items); + return $this->bitstreamToByte($bstream); + } + + // - - - - - - - - - - - - - - - - - - - - - - - - - + + // QRbitstream + + /** + * Return an array with zeros + * @param int $setLength array size + * @return array + */ + protected function allocate($setLength) { + return array_fill(0, $setLength, 0); + } + + /** + * Return new bitstream from number + * @param int $bits number of bits + * @param int $num number + * @return array bitstream + */ + protected function newFromNum($bits, $num) { + $bstream = $this->allocate($bits); + $mask = 1 << ($bits - 1); + for ($i=0; $i<$bits; ++$i) { + if ($num & $mask) { + $bstream[$i] = 1; + } else { + $bstream[$i] = 0; + } + $mask = $mask >> 1; + } + return $bstream; + } + + /** + * Return new bitstream from bytes + * @param int $size size + * @param array $data bytes + * @return array bitstream + */ + protected function newFromBytes($size, $data) { + $bstream = $this->allocate($size * 8); + $p=0; + for ($i=0; $i<$size; ++$i) { + $mask = 0x80; + for ($j=0; $j<8; ++$j) { + if ($data[$i] & $mask) { + $bstream[$p] = 1; + } else { + $bstream[$p] = 0; + } + $p++; + $mask = $mask >> 1; + } + } + return $bstream; + } + + /** + * Append one bitstream to another + * @param array $bitstream original bitstream + * @param array $append bitstream to append + * @return array bitstream + */ + protected function appendBitstream($bitstream, $append) { + if ((!is_array($append)) OR (count($append) == 0)) { + return $bitstream; + } + if (count($bitstream) == 0) { + return $append; + } + return array_values(array_merge($bitstream, $append)); + } + + /** + * Append one bitstream created from number to another + * @param array $bitstream original bitstream + * @param int $bits number of bits + * @param int $num number + * @return array bitstream + */ + protected function appendNum($bitstream, $bits, $num) { + if ($bits == 0) { + return 0; + } + $b = $this->newFromNum($bits, $num); + return $this->appendBitstream($bitstream, $b); + } + + /** + * Append one bitstream created from bytes to another + * @param array $bitstream original bitstream + * @param int $size size + * @param array $data bytes + * @return array bitstream + */ + protected function appendBytes($bitstream, $size, $data) { + if ($size == 0) { + return 0; + } + $b = $this->newFromBytes($size, $data); + return $this->appendBitstream($bitstream, $b); + } + + /** + * Convert bitstream to bytes + * @param array $bitstream original bitstream + * @return array of bytes + */ + protected function bitstreamToByte($bstream) { + $size = count($bstream); + if ($size == 0) { + return array(); + } + $data = array_fill(0, (int)(($size + 7) / 8), 0); + $bytes = (int)($size / 8); + $p = 0; + for ($i=0; $i<$bytes; $i++) { + $v = 0; + for ($j=0; $j<8; $j++) { + $v = $v << 1; + $v |= $bstream[$p]; + $p++; + } + $data[$i] = $v; + } + if ($size & 7) { + $v = 0; + for ($j=0; $j<($size & 7); $j++) { + $v = $v << 1; + $v |= $bstream[$p]; + $p++; + } + $data[$bytes] = $v; + } + return $data; + } + + // - - - - - - - - - - - - - - - - - - - - - - - - - + + // QRspec + + /** + * Replace a value on the array at the specified position + * @param array $srctab + * @param int $x X position + * @param int $y Y position + * @param string $repl value to replace + * @param int $replLen length of the repl string + * @return array srctab + */ + protected function qrstrset($srctab, $x, $y, $repl, $replLen=false) { + $srctab[$y] = substr_replace($srctab[$y], ($replLen !== false)?substr($repl,0,$replLen):$repl, $x, ($replLen !== false)?$replLen:strlen($repl)); + return $srctab; + } + + /** + * Return maximum data code length (bytes) for the version. + * @param int $version version + * @param int $level error correction level + * @return int maximum size (bytes) + */ + protected function getDataLength($version, $level) { + return $this->capacity[$version][QRCAP_WORDS] - $this->capacity[$version][QRCAP_EC][$level]; + } + + /** + * Return maximum error correction code length (bytes) for the version. + * @param int $version version + * @param int $level error correction level + * @return int ECC size (bytes) + */ + protected function getECCLength($version, $level){ + return $this->capacity[$version][QRCAP_EC][$level]; + } + + /** + * Return the width of the symbol for the version. + * @param int $version version + * @return int width + */ + protected function getWidth($version) { + return $this->capacity[$version][QRCAP_WIDTH]; + } + + /** + * Return the numer of remainder bits. + * @param int $version version + * @return int number of remainder bits + */ + protected function getRemainder($version) { + return $this->capacity[$version][QRCAP_REMINDER]; + } + + /** + * Return a version number that satisfies the input code length. + * @param int $size input code length (byte) + * @param int $level error correction level + * @return int version number + */ + protected function getMinimumVersion($size, $level) { + for ($i=1; $i <= QRSPEC_VERSION_MAX; ++$i) { + $words = $this->capacity[$i][QRCAP_WORDS] - $this->capacity[$i][QRCAP_EC][$level]; + if ($words >= $size) { + return $i; + } + } + return -1; + } + + /** + * Return the size of length indicator for the mode and version. + * @param int $mode encoding mode + * @param int $version version + * @return int the size of the appropriate length indicator (bits). + */ + protected function lengthIndicator($mode, $version) { + if ($mode == QR_MODE_ST) { + return 0; + } + if ($version <= 9) { + $l = 0; + } elseif ($version <= 26) { + $l = 1; + } else { + $l = 2; + } + return $this->lengthTableBits[$mode][$l]; + } + + /** + * Return the maximum length for the mode and version. + * @param int $mode encoding mode + * @param int $version version + * @return int the maximum length (bytes) + */ + protected function maximumWords($mode, $version) { + if ($mode == QR_MODE_ST) { + return 3; + } + if ($version <= 9) { + $l = 0; + } else if ($version <= 26) { + $l = 1; + } else { + $l = 2; + } + $bits = $this->lengthTableBits[$mode][$l]; + $words = (1 << $bits) - 1; + if ($mode == QR_MODE_KJ) { + $words *= 2; // the number of bytes is required + } + return $words; + } + + /** + * Return an array of ECC specification. + * @param int $version version + * @param int $level error correction level + * @param array $spec an array of ECC specification contains as following: {# of type1 blocks, # of data code, # of ecc code, # of type2 blocks, # of data code} + * @return array spec + */ + protected function getEccSpec($version, $level, $spec) { + if (count($spec) < 5) { + $spec = array(0, 0, 0, 0, 0); + } + $b1 = $this->eccTable[$version][$level][0]; + $b2 = $this->eccTable[$version][$level][1]; + $data = $this->getDataLength($version, $level); + $ecc = $this->getECCLength($version, $level); + if ($b2 == 0) { + $spec[0] = $b1; + $spec[1] = (int)($data / $b1); + $spec[2] = (int)($ecc / $b1); + $spec[3] = 0; + $spec[4] = 0; + } else { + $spec[0] = $b1; + $spec[1] = (int)($data / ($b1 + $b2)); + $spec[2] = (int)($ecc / ($b1 + $b2)); + $spec[3] = $b2; + $spec[4] = $spec[1] + 1; + } + return $spec; + } + + /** + * Put an alignment marker. + * @param array $frame frame + * @param int $width width + * @param int $ox X center coordinate of the pattern + * @param int $oy Y center coordinate of the pattern + * @return array frame + */ + protected function putAlignmentMarker($frame, $ox, $oy) { + $finder = array( + "\xa1\xa1\xa1\xa1\xa1", + "\xa1\xa0\xa0\xa0\xa1", + "\xa1\xa0\xa1\xa0\xa1", + "\xa1\xa0\xa0\xa0\xa1", + "\xa1\xa1\xa1\xa1\xa1" + ); + $yStart = $oy - 2; + $xStart = $ox - 2; + for ($y=0; $y < 5; $y++) { + $frame = $this->qrstrset($frame, $xStart, $yStart+$y, $finder[$y]); + } + return $frame; + } + + /** + * Put an alignment pattern. + * @param int $version version + * @param array $fram frame + * @param int $width width + * @return array frame + */ + protected function putAlignmentPattern($version, $frame, $width) { + if ($version < 2) { + return $frame; + } + $d = $this->alignmentPattern[$version][1] - $this->alignmentPattern[$version][0]; + if ($d < 0) { + $w = 2; + } else { + $w = (int)(($width - $this->alignmentPattern[$version][0]) / $d + 2); + } + if ($w * $w - 3 == 1) { + $x = $this->alignmentPattern[$version][0]; + $y = $this->alignmentPattern[$version][0]; + $frame = $this->putAlignmentMarker($frame, $x, $y); + return $frame; + } + $cx = $this->alignmentPattern[$version][0]; + $wo = $w - 1; + for ($x=1; $x < $wo; ++$x) { + $frame = $this->putAlignmentMarker($frame, 6, $cx); + $frame = $this->putAlignmentMarker($frame, $cx, 6); + $cx += $d; + } + $cy = $this->alignmentPattern[$version][0]; + for ($y=0; $y < $wo; ++$y) { + $cx = $this->alignmentPattern[$version][0]; + for ($x=0; $x < $wo; ++$x) { + $frame = $this->putAlignmentMarker($frame, $cx, $cy); + $cx += $d; + } + $cy += $d; + } + return $frame; + } + + /** + * Return BCH encoded version information pattern that is used for the symbol of version 7 or greater. Use lower 18 bits. + * @param int $version version + * @return BCH encoded version information pattern + */ + protected function getVersionPattern($version) { + if (($version < 7) OR ($version > QRSPEC_VERSION_MAX)) { + return 0; + } + return $this->versionPattern[($version - 7)]; + } + + /** + * Return BCH encoded format information pattern. + * @param array $mask + * @param int $level error correction level + * @return BCH encoded format information pattern + */ + protected function getFormatInfo($mask, $level) { + if (($mask < 0) OR ($mask > 7)) { + return 0; + } + if (($level < 0) OR ($level > 3)) { + return 0; + } + return $this->formatInfo[$level][$mask]; + } + + /** + * Put a finder pattern. + * @param array $frame frame + * @param int $width width + * @param int $ox X center coordinate of the pattern + * @param int $oy Y center coordinate of the pattern + * @return array frame + */ + protected function putFinderPattern($frame, $ox, $oy) { + $finder = array( + "\xc1\xc1\xc1\xc1\xc1\xc1\xc1", + "\xc1\xc0\xc0\xc0\xc0\xc0\xc1", + "\xc1\xc0\xc1\xc1\xc1\xc0\xc1", + "\xc1\xc0\xc1\xc1\xc1\xc0\xc1", + "\xc1\xc0\xc1\xc1\xc1\xc0\xc1", + "\xc1\xc0\xc0\xc0\xc0\xc0\xc1", + "\xc1\xc1\xc1\xc1\xc1\xc1\xc1" + ); + for ($y=0; $y < 7; $y++) { + $frame = $this->qrstrset($frame, $ox, ($oy + $y), $finder[$y]); + } + return $frame; + } + + /** + * Return a copy of initialized frame. + * @param int $version version + * @return Array of unsigned char. + */ + protected function createFrame($version) { + $width = $this->capacity[$version][QRCAP_WIDTH]; + $frameLine = str_repeat ("\0", $width); + $frame = array_fill(0, $width, $frameLine); + // Finder pattern + $frame = $this->putFinderPattern($frame, 0, 0); + $frame = $this->putFinderPattern($frame, $width - 7, 0); + $frame = $this->putFinderPattern($frame, 0, $width - 7); + // Separator + $yOffset = $width - 7; + for ($y=0; $y < 7; ++$y) { + $frame[$y][7] = "\xc0"; + $frame[$y][$width - 8] = "\xc0"; + $frame[$yOffset][7] = "\xc0"; + ++$yOffset; + } + $setPattern = str_repeat("\xc0", 8); + $frame = $this->qrstrset($frame, 0, 7, $setPattern); + $frame = $this->qrstrset($frame, $width-8, 7, $setPattern); + $frame = $this->qrstrset($frame, 0, $width - 8, $setPattern); + // Format info + $setPattern = str_repeat("\x84", 9); + $frame = $this->qrstrset($frame, 0, 8, $setPattern); + $frame = $this->qrstrset($frame, $width - 8, 8, $setPattern, 8); + $yOffset = $width - 8; + for ($y=0; $y < 8; ++$y,++$yOffset) { + $frame[$y][8] = "\x84"; + $frame[$yOffset][8] = "\x84"; + } + // Timing pattern + $wo = $width - 15; + for ($i=1; $i < $wo; ++$i) { + $frame[6][7+$i] = chr(0x90 | ($i & 1)); + $frame[7+$i][6] = chr(0x90 | ($i & 1)); + } + // Alignment pattern + $frame = $this->putAlignmentPattern($version, $frame, $width); + // Version information + if ($version >= 7) { + $vinf = $this->getVersionPattern($version); + $v = $vinf; + for ($x=0; $x<6; ++$x) { + for ($y=0; $y<3; ++$y) { + $frame[($width - 11)+$y][$x] = chr(0x88 | ($v & 1)); + $v = $v >> 1; + } + } + $v = $vinf; + for ($y=0; $y<6; ++$y) { + for ($x=0; $x<3; ++$x) { + $frame[$y][$x+($width - 11)] = chr(0x88 | ($v & 1)); + $v = $v >> 1; + } + } + } + // and a little bit... + $frame[$width - 8][8] = "\x81"; + return $frame; + } + + /** + * Set new frame for the specified version. + * @param int $version version + * @return Array of unsigned char. + */ + protected function newFrame($version) { + if (($version < 1) OR ($version > QRSPEC_VERSION_MAX)) { + return NULL; + } + if (!isset($this->frames[$version])) { + $this->frames[$version] = $this->createFrame($version); + } + if (is_null($this->frames[$version])) { + return NULL; + } + return $this->frames[$version]; + } + + /** + * Return block number 0 + * @param array $spec + * @return int value + */ + protected function rsBlockNum($spec) { + return ($spec[0] + $spec[3]); + } + + /** + * Return block number 1 + * @param array $spec + * @return int value + */ + protected function rsBlockNum1($spec) { + return $spec[0]; + } + + /** + * Return data codes 1 + * @param array $spec + * @return int value + */ + protected function rsDataCodes1($spec) { + return $spec[1]; + } + + /** + * Return ecc codes 1 + * @param array $spec + * @return int value + */ + protected function rsEccCodes1($spec) { + return $spec[2]; + } + + /** + * Return block number 2 + * @param array $spec + * @return int value + */ + protected function rsBlockNum2($spec) { + return $spec[3]; + } + + /** + * Return data codes 2 + * @param array $spec + * @return int value + */ + protected function rsDataCodes2($spec) { + return $spec[4]; + } + + /** + * Return ecc codes 2 + * @param array $spec + * @return int value + */ + protected function rsEccCodes2($spec) { + return $spec[2]; + } + + /** + * Return data length + * @param array $spec + * @return int value + */ + protected function rsDataLength($spec) { + return ($spec[0] * $spec[1]) + ($spec[3] * $spec[4]); + } + + /** + * Return ecc length + * @param array $spec + * @return int value + */ + protected function rsEccLength($spec) { + return ($spec[0] + $spec[3]) * $spec[2]; + } + + // - - - - - - - - - - - - - - - - - - - - - - - - - + + // QRrs + + /** + * Initialize a Reed-Solomon codec and add it to existing rsitems + * @param int $symsize symbol size, bits + * @param int $gfpoly Field generator polynomial coefficients + * @param int $fcr first root of RS code generator polynomial, index form + * @param int $prim primitive element to generate polynomial roots + * @param int $nroots RS code generator polynomial degree (number of roots) + * @param int $pad padding bytes at front of shortened block + * @return array Array of RS values:
  • mm = Bits per symbol;
  • nn = Symbols per block;
  • alpha_to = log lookup table array;
  • index_of = Antilog lookup table array;
  • genpoly = Generator polynomial array;
  • nroots = Number of generator;
  • roots = number of parity symbols;
  • fcr = First consecutive root, index form;
  • prim = Primitive element, index form;
  • iprim = prim-th root of 1, index form;
  • pad = Padding bytes in shortened block;
  • gfpoly
. + */ + protected function init_rs($symsize, $gfpoly, $fcr, $prim, $nroots, $pad) { + foreach ($this->rsitems as $rs) { + if (($rs['pad'] != $pad) OR ($rs['nroots'] != $nroots) OR ($rs['mm'] != $symsize) + OR ($rs['gfpoly'] != $gfpoly) OR ($rs['fcr'] != $fcr) OR ($rs['prim'] != $prim)) { + continue; + } + return $rs; + } + $rs = $this->init_rs_char($symsize, $gfpoly, $fcr, $prim, $nroots, $pad); + array_unshift($this->rsitems, $rs); + return $rs; + } + + // - - - - - - - - - - - - - - - - - - - - - - - - - + + // QRrsItem + + /** + * modnn + * @param array RS values + * @param int $x X position + * @return int X osition + */ + protected function modnn($rs, $x) { + while ($x >= $rs['nn']) { + $x -= $rs['nn']; + $x = ($x >> $rs['mm']) + ($x & $rs['nn']); + } + return $x; + } + + /** + * Initialize a Reed-Solomon codec and returns an array of values. + * @param int $symsize symbol size, bits + * @param int $gfpoly Field generator polynomial coefficients + * @param int $fcr first root of RS code generator polynomial, index form + * @param int $prim primitive element to generate polynomial roots + * @param int $nroots RS code generator polynomial degree (number of roots) + * @param int $pad padding bytes at front of shortened block + * @return array Array of RS values:
  • mm = Bits per symbol;
  • nn = Symbols per block;
  • alpha_to = log lookup table array;
  • index_of = Antilog lookup table array;
  • genpoly = Generator polynomial array;
  • nroots = Number of generator;
  • roots = number of parity symbols;
  • fcr = First consecutive root, index form;
  • prim = Primitive element, index form;
  • iprim = prim-th root of 1, index form;
  • pad = Padding bytes in shortened block;
  • gfpoly
. + */ + protected function init_rs_char($symsize, $gfpoly, $fcr, $prim, $nroots, $pad) { + // Based on Reed solomon encoder by Phil Karn, KA9Q (GNU-LGPLv2) + $rs = null; + // Check parameter ranges + if (($symsize < 0) OR ($symsize > 8)) { + return $rs; + } + if (($fcr < 0) OR ($fcr >= (1<<$symsize))) { + return $rs; + } + if (($prim <= 0) OR ($prim >= (1<<$symsize))) { + return $rs; + } + if (($nroots < 0) OR ($nroots >= (1<<$symsize))) { + return $rs; + } + if (($pad < 0) OR ($pad >= ((1<<$symsize) -1 - $nroots))) { + return $rs; + } + $rs = array(); + $rs['mm'] = $symsize; + $rs['nn'] = (1 << $symsize) - 1; + $rs['pad'] = $pad; + $rs['alpha_to'] = array_fill(0, ($rs['nn'] + 1), 0); + $rs['index_of'] = array_fill(0, ($rs['nn'] + 1), 0); + // PHP style macro replacement ;) + $NN =& $rs['nn']; + $A0 =& $NN; + // Generate Galois field lookup tables + $rs['index_of'][0] = $A0; // log(zero) = -inf + $rs['alpha_to'][$A0] = 0; // alpha**-inf = 0 + $sr = 1; + for ($i=0; $i<$rs['nn']; ++$i) { + $rs['index_of'][$sr] = $i; + $rs['alpha_to'][$i] = $sr; + $sr <<= 1; + if ($sr & (1 << $symsize)) { + $sr ^= $gfpoly; + } + $sr &= $rs['nn']; + } + if ($sr != 1) { + // field generator polynomial is not primitive! + return NULL; + } + // Form RS code generator polynomial from its roots + $rs['genpoly'] = array_fill(0, ($nroots + 1), 0); + $rs['fcr'] = $fcr; + $rs['prim'] = $prim; + $rs['nroots'] = $nroots; + $rs['gfpoly'] = $gfpoly; + // Find prim-th root of 1, used in decoding + for ($iprim=1; ($iprim % $prim) != 0; $iprim += $rs['nn']) { + ; // intentional empty-body loop! + } + $rs['iprim'] = (int)($iprim / $prim); + $rs['genpoly'][0] = 1; + + + for ($i = 0,$root=$fcr*$prim; $i < $nroots; $i++, $root += $prim) { + $rs['genpoly'][$i+1] = 1; + // Multiply rs->genpoly[] by @**(root + x) + for ($j = $i; $j > 0; --$j) { + if ($rs['genpoly'][$j] != 0) { + $rs['genpoly'][$j] = $rs['genpoly'][$j-1] ^ $rs['alpha_to'][$this->modnn($rs, $rs['index_of'][$rs['genpoly'][$j]] + $root)]; + } else { + $rs['genpoly'][$j] = $rs['genpoly'][$j-1]; + } + } + // rs->genpoly[0] can never be zero + $rs['genpoly'][0] = $rs['alpha_to'][$this->modnn($rs, $rs['index_of'][$rs['genpoly'][0]] + $root)]; + } + // convert rs->genpoly[] to index form for quicker encoding + for ($i = 0; $i <= $nroots; ++$i) { + $rs['genpoly'][$i] = $rs['index_of'][$rs['genpoly'][$i]]; + } + return $rs; + } + + /** + * Encode a Reed-Solomon codec and returns the parity array + * @param array $rs RS values + * @param array $data data + * @param array $parity parity + * @return parity array + */ + protected function encode_rs_char($rs, $data, $parity) { + $MM =& $rs['mm']; // bits per symbol + $NN =& $rs['nn']; // the total number of symbols in a RS block + $ALPHA_TO =& $rs['alpha_to']; // the address of an array of NN elements to convert Galois field elements in index (log) form to polynomial form + $INDEX_OF =& $rs['index_of']; // the address of an array of NN elements to convert Galois field elements in polynomial form to index (log) form + $GENPOLY =& $rs['genpoly']; // an array of NROOTS+1 elements containing the generator polynomial in index form + $NROOTS =& $rs['nroots']; // the number of roots in the RS code generator polynomial, which is the same as the number of parity symbols in a block + $FCR =& $rs['fcr']; // first consecutive root, index form + $PRIM =& $rs['prim']; // primitive element, index form + $IPRIM =& $rs['iprim']; // prim-th root of 1, index form + $PAD =& $rs['pad']; // the number of pad symbols in a block + $A0 =& $NN; + $parity = array_fill(0, $NROOTS, 0); + for ($i=0; $i < ($NN - $NROOTS - $PAD); $i++) { + $feedback = $INDEX_OF[$data[$i] ^ $parity[0]]; + if ($feedback != $A0) { + // feedback term is non-zero + // This line is unnecessary when GENPOLY[NROOTS] is unity, as it must + // always be for the polynomials constructed by init_rs() + $feedback = $this->modnn($rs, $NN - $GENPOLY[$NROOTS] + $feedback); + for ($j=1; $j < $NROOTS; ++$j) { + $parity[$j] ^= $ALPHA_TO[$this->modnn($rs, $feedback + $GENPOLY[($NROOTS - $j)])]; + } + } + // Shift + array_shift($parity); + if ($feedback != $A0) { + array_push($parity, $ALPHA_TO[$this->modnn($rs, $feedback + $GENPOLY[0])]); + } else { + array_push($parity, 0); + } + } + return $parity; + } + + } // end QRcode class + +} // END OF "class_exists QRcode" +?> diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/frame_1.dat b/vendor/crowdfunding2/lib/phpqrcode/cache/frame_1.dat new file mode 100755 index 0000000..be28fea --- /dev/null +++ b/vendor/crowdfunding2/lib/phpqrcode/cache/frame_1.dat @@ -0,0 +1,2 @@ +xڝ E9u`"PńC牗T!0$ +EɲQmh۾9{kI" 9Ln)Ap־>^zmnŖ;mn \ No newline at end of file diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/frame_1.png b/vendor/crowdfunding2/lib/phpqrcode/cache/frame_1.png new file mode 100755 index 0000000..86ce6e9 Binary files /dev/null and b/vendor/crowdfunding2/lib/phpqrcode/cache/frame_1.png differ diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/frame_10.dat b/vendor/crowdfunding2/lib/phpqrcode/cache/frame_10.dat new file mode 100755 index 0000000..aff163f Binary files /dev/null and b/vendor/crowdfunding2/lib/phpqrcode/cache/frame_10.dat differ diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/frame_10.png b/vendor/crowdfunding2/lib/phpqrcode/cache/frame_10.png new file mode 100755 index 0000000..dbfcd70 Binary files /dev/null and b/vendor/crowdfunding2/lib/phpqrcode/cache/frame_10.png differ diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/frame_11.dat b/vendor/crowdfunding2/lib/phpqrcode/cache/frame_11.dat new file mode 100755 index 0000000..95af68a Binary files /dev/null and b/vendor/crowdfunding2/lib/phpqrcode/cache/frame_11.dat differ diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/frame_11.png b/vendor/crowdfunding2/lib/phpqrcode/cache/frame_11.png new file mode 100755 index 0000000..c07c761 Binary files /dev/null and b/vendor/crowdfunding2/lib/phpqrcode/cache/frame_11.png differ diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/frame_12.dat b/vendor/crowdfunding2/lib/phpqrcode/cache/frame_12.dat new file mode 100755 index 0000000..73228b3 Binary files /dev/null and b/vendor/crowdfunding2/lib/phpqrcode/cache/frame_12.dat differ diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/frame_12.png b/vendor/crowdfunding2/lib/phpqrcode/cache/frame_12.png new file mode 100755 index 0000000..8ba6782 Binary files /dev/null and b/vendor/crowdfunding2/lib/phpqrcode/cache/frame_12.png differ diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/frame_13.dat b/vendor/crowdfunding2/lib/phpqrcode/cache/frame_13.dat new file mode 100755 index 0000000..2256f0e Binary files /dev/null and b/vendor/crowdfunding2/lib/phpqrcode/cache/frame_13.dat differ diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/frame_13.png b/vendor/crowdfunding2/lib/phpqrcode/cache/frame_13.png new file mode 100755 index 0000000..6e49d35 Binary files /dev/null and b/vendor/crowdfunding2/lib/phpqrcode/cache/frame_13.png differ diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/frame_14.dat b/vendor/crowdfunding2/lib/phpqrcode/cache/frame_14.dat new file mode 100755 index 0000000..e9ae093 Binary files /dev/null and b/vendor/crowdfunding2/lib/phpqrcode/cache/frame_14.dat differ diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/frame_14.png b/vendor/crowdfunding2/lib/phpqrcode/cache/frame_14.png new file mode 100755 index 0000000..efc36c0 Binary files /dev/null and b/vendor/crowdfunding2/lib/phpqrcode/cache/frame_14.png differ diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/frame_15.dat b/vendor/crowdfunding2/lib/phpqrcode/cache/frame_15.dat new file mode 100755 index 0000000..1872781 Binary files /dev/null and b/vendor/crowdfunding2/lib/phpqrcode/cache/frame_15.dat differ diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/frame_15.png b/vendor/crowdfunding2/lib/phpqrcode/cache/frame_15.png new file mode 100755 index 0000000..a9f416c Binary files /dev/null and b/vendor/crowdfunding2/lib/phpqrcode/cache/frame_15.png differ diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/frame_16.dat b/vendor/crowdfunding2/lib/phpqrcode/cache/frame_16.dat new file mode 100755 index 0000000..60af678 --- /dev/null +++ b/vendor/crowdfunding2/lib/phpqrcode/cache/frame_16.dat @@ -0,0 +1 @@ +xA E]sIX;n6`qW6`%A/3!!g̡1N) E|;>6⸏97$c]kkw1[mC͜cR>E,hʼnp#xFyWVWG3+˓S}Ğ#G8b^c^cpc&3YQ"vk9܇} ĿQL/ \ No newline at end of file diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/frame_16.png b/vendor/crowdfunding2/lib/phpqrcode/cache/frame_16.png new file mode 100755 index 0000000..6ac8fe8 Binary files /dev/null and b/vendor/crowdfunding2/lib/phpqrcode/cache/frame_16.png differ diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/frame_17.dat b/vendor/crowdfunding2/lib/phpqrcode/cache/frame_17.dat new file mode 100755 index 0000000..87f0cf5 Binary files /dev/null and b/vendor/crowdfunding2/lib/phpqrcode/cache/frame_17.dat differ diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/frame_17.png b/vendor/crowdfunding2/lib/phpqrcode/cache/frame_17.png new file mode 100755 index 0000000..5b929ac Binary files /dev/null and b/vendor/crowdfunding2/lib/phpqrcode/cache/frame_17.png differ diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/frame_18.dat b/vendor/crowdfunding2/lib/phpqrcode/cache/frame_18.dat new file mode 100755 index 0000000..bb7138c --- /dev/null +++ b/vendor/crowdfunding2/lib/phpqrcode/cache/frame_18.dat @@ -0,0 +1,2 @@ +xA +0E]օ,2;s&͚hO1&09OIv@DD &ىKXFv<dq9<%h Ys !(ds;~||b(Yůg#`KSĶsidߍLg:әt/gmkM3{4rTQes><әt3;H#љt3Y+oghٽlnF>i^#awm;g~pgNs{6zp' \ No newline at end of file diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/frame_18.png b/vendor/crowdfunding2/lib/phpqrcode/cache/frame_18.png new file mode 100755 index 0000000..ee0d6a3 Binary files /dev/null and b/vendor/crowdfunding2/lib/phpqrcode/cache/frame_18.png differ diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/frame_19.dat b/vendor/crowdfunding2/lib/phpqrcode/cache/frame_19.dat new file mode 100755 index 0000000..95e26ad --- /dev/null +++ b/vendor/crowdfunding2/lib/phpqrcode/cache/frame_19.dat @@ -0,0 +1,3 @@ +xA + E.No7ћiiRN2W%x@ڜ' +u6.*S;}àT zrt%,};)ZLP$qgLdJ;w.]z#[͝Og" B}};w#1Gb;w_C+w@Dfu2N9R7|pWkk \ No newline at end of file diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/frame_19.png b/vendor/crowdfunding2/lib/phpqrcode/cache/frame_19.png new file mode 100755 index 0000000..20fddd8 Binary files /dev/null and b/vendor/crowdfunding2/lib/phpqrcode/cache/frame_19.png differ diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/frame_2.dat b/vendor/crowdfunding2/lib/phpqrcode/cache/frame_2.dat new file mode 100755 index 0000000..7e42f31 --- /dev/null +++ b/vendor/crowdfunding2/lib/phpqrcode/cache/frame_2.dat @@ -0,0 +1 @@ +x͒ F{v& &Y+?Z1S'y!a815&۴HٞclF1#6 f6O7C֏8gIfB\DԻ( \ No newline at end of file diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/frame_2.png b/vendor/crowdfunding2/lib/phpqrcode/cache/frame_2.png new file mode 100755 index 0000000..9c150eb Binary files /dev/null and b/vendor/crowdfunding2/lib/phpqrcode/cache/frame_2.png differ diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/frame_20.dat b/vendor/crowdfunding2/lib/phpqrcode/cache/frame_20.dat new file mode 100755 index 0000000..d5ecc1d Binary files /dev/null and b/vendor/crowdfunding2/lib/phpqrcode/cache/frame_20.dat differ diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/frame_20.png b/vendor/crowdfunding2/lib/phpqrcode/cache/frame_20.png new file mode 100755 index 0000000..23a061d Binary files /dev/null and b/vendor/crowdfunding2/lib/phpqrcode/cache/frame_20.png differ diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/frame_21.dat b/vendor/crowdfunding2/lib/phpqrcode/cache/frame_21.dat new file mode 100755 index 0000000..1974dd9 --- /dev/null +++ b/vendor/crowdfunding2/lib/phpqrcode/cache/frame_21.dat @@ -0,0 +1 @@ +xA E]sIX;n6Upв]٘< i-eW)ŕ…H\jvqHL\6ЅrILܹ%@Vv(P4|Xngɝ~]Du1Us S\,2N?DKF-:eJ]p_,a0` X` w,` X]5 Y4{2vJs9)u۹,]^_7$_ \ No newline at end of file diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/frame_21.png b/vendor/crowdfunding2/lib/phpqrcode/cache/frame_21.png new file mode 100755 index 0000000..291598c Binary files /dev/null and b/vendor/crowdfunding2/lib/phpqrcode/cache/frame_21.png differ diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/frame_22.dat b/vendor/crowdfunding2/lib/phpqrcode/cache/frame_22.dat new file mode 100755 index 0000000..0f01802 --- /dev/null +++ b/vendor/crowdfunding2/lib/phpqrcode/cache/frame_22.dat @@ -0,0 +1,3 @@ +xA +0 E]{.]{{{ZBepwe@VERZ3"*2o4y)i#dbdF҅I"4WIu45x.ZS{8k={o.q[:帒qy +)t#N8dCj-OOG}:/:sz!)^IO- 7p 7$}>ɷ7p tssrs Vmҹ}R~7&?7ԦIbh{<Mi- \ No newline at end of file diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/frame_23.png b/vendor/crowdfunding2/lib/phpqrcode/cache/frame_23.png new file mode 100755 index 0000000..b8f16ae Binary files /dev/null and b/vendor/crowdfunding2/lib/phpqrcode/cache/frame_23.png differ diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/frame_24.dat b/vendor/crowdfunding2/lib/phpqrcode/cache/frame_24.dat new file mode 100755 index 0000000..7b92e29 --- /dev/null +++ b/vendor/crowdfunding2/lib/phpqrcode/cache/frame_24.dat @@ -0,0 +1 @@ +xA EMX0;nVP4HSSxU3/O LiJ4V JC%6VR&DBHjDJ??BlcDZ'UXUޏ0ywįj똳3ścj{:GqGNv;笓J <]#8#8H'GqGtr:9#8#8ؓhNt_>teS^\gQe?vuo;>*wlm \ No newline at end of file diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/frame_24.png b/vendor/crowdfunding2/lib/phpqrcode/cache/frame_24.png new file mode 100755 index 0000000..397c64f Binary files /dev/null and b/vendor/crowdfunding2/lib/phpqrcode/cache/frame_24.png differ diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/frame_25.dat b/vendor/crowdfunding2/lib/phpqrcode/cache/frame_25.dat new file mode 100755 index 0000000..ba12518 --- /dev/null +++ b/vendor/crowdfunding2/lib/phpqrcode/cache/frame_25.dat @@ -0,0 +1,3 @@ +xA + s낋]rxY51mMBG +*Sx|Ua5ƵZ-,1HPRjX5iG>WR/+uT廯 ӯ嗴u[Sa[kv5+5nJ%+VXbŊ߬u'SRtzZ++VXbŊٟٟٟ+VXb}Ŋ+VXVI+kq[toVZvoNVw}{r<ýR"R] Wr} \ No newline at end of file diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/frame_25.png b/vendor/crowdfunding2/lib/phpqrcode/cache/frame_25.png new file mode 100755 index 0000000..25bc445 Binary files /dev/null and b/vendor/crowdfunding2/lib/phpqrcode/cache/frame_25.png differ diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/frame_26.dat b/vendor/crowdfunding2/lib/phpqrcode/cache/frame_26.dat new file mode 100755 index 0000000..d34a73f --- /dev/null +++ b/vendor/crowdfunding2/lib/phpqrcode/cache/frame_26.dat @@ -0,0 +1,2 @@ +xA + Eօ,t77ћU E)i7*~cXEBFC6:&L,Mv.KgոYM>>mۚ?vmg?ұηdCUIkE\Msfafa>[sӈ9쬩ެ8b]LgEo w1 \ No newline at end of file diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/frame_26.png b/vendor/crowdfunding2/lib/phpqrcode/cache/frame_26.png new file mode 100755 index 0000000..f4a6b39 Binary files /dev/null and b/vendor/crowdfunding2/lib/phpqrcode/cache/frame_26.png differ diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/frame_27.dat b/vendor/crowdfunding2/lib/phpqrcode/cache/frame_27.dat new file mode 100755 index 0000000..b4d9ffd Binary files /dev/null and b/vendor/crowdfunding2/lib/phpqrcode/cache/frame_27.dat differ diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/frame_27.png b/vendor/crowdfunding2/lib/phpqrcode/cache/frame_27.png new file mode 100755 index 0000000..8419ec2 Binary files /dev/null and b/vendor/crowdfunding2/lib/phpqrcode/cache/frame_27.png differ diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/frame_28.dat b/vendor/crowdfunding2/lib/phpqrcode/cache/frame_28.dat new file mode 100755 index 0000000..8cbaa19 Binary files /dev/null and b/vendor/crowdfunding2/lib/phpqrcode/cache/frame_28.dat differ diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/frame_28.png b/vendor/crowdfunding2/lib/phpqrcode/cache/frame_28.png new file mode 100755 index 0000000..7609d8e Binary files /dev/null and b/vendor/crowdfunding2/lib/phpqrcode/cache/frame_28.png differ diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/frame_29.dat b/vendor/crowdfunding2/lib/phpqrcode/cache/frame_29.dat new file mode 100755 index 0000000..5e4a711 --- /dev/null +++ b/vendor/crowdfunding2/lib/phpqrcode/cache/frame_29.dat @@ -0,0 +1,2 @@ +xA a޺ @n7+*4!?J 抮]STf)sI"Ȕb0|"Luٸ,E1\6*uQ?>aυR-rn.ꯋ\T:*)|) , ,x_}:^RUoɢu~މX`XЏЏЏЏ_`X`XЏЏЏ_`X`XЏЏЏЏwbX`PU)D"c{z3<}^?bm잃a.] +{Q6uT,9 \ No newline at end of file diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/frame_29.png b/vendor/crowdfunding2/lib/phpqrcode/cache/frame_29.png new file mode 100755 index 0000000..ffe072c Binary files /dev/null and b/vendor/crowdfunding2/lib/phpqrcode/cache/frame_29.png differ diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/frame_3.dat b/vendor/crowdfunding2/lib/phpqrcode/cache/frame_3.dat new file mode 100755 index 0000000..188d531 --- /dev/null +++ b/vendor/crowdfunding2/lib/phpqrcode/cache/frame_3.dat @@ -0,0 +1 @@ +x E{v& &Y+bk'ya:TXl޶$W+ӏv9}gR@H0YPBEm?s"bt2cn:ﺭ;YzQ7 \ No newline at end of file diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/frame_3.png b/vendor/crowdfunding2/lib/phpqrcode/cache/frame_3.png new file mode 100755 index 0000000..945ee7c Binary files /dev/null and b/vendor/crowdfunding2/lib/phpqrcode/cache/frame_3.png differ diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/frame_30.dat b/vendor/crowdfunding2/lib/phpqrcode/cache/frame_30.dat new file mode 100755 index 0000000..44cf3d3 Binary files /dev/null and b/vendor/crowdfunding2/lib/phpqrcode/cache/frame_30.dat differ diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/frame_30.png b/vendor/crowdfunding2/lib/phpqrcode/cache/frame_30.png new file mode 100755 index 0000000..75dbddd Binary files /dev/null and b/vendor/crowdfunding2/lib/phpqrcode/cache/frame_30.png differ diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/frame_31.dat b/vendor/crowdfunding2/lib/phpqrcode/cache/frame_31.dat new file mode 100755 index 0000000..ce429d0 --- /dev/null +++ b/vendor/crowdfunding2/lib/phpqrcode/cache/frame_31.dat @@ -0,0 +1 @@ +xA a޺ &r4yķ!mV3Iv!Ҝ2i\NSS4EF2+65e/Ws]!?p=S~Đ?+x6r6y}ǴeR1-WllҌXz/>V櫷:ñA8-+mTbllltM&]ll&]Ill&]y 6` 6`iuyXWi\tz>.zk t77wJϔ4w҈85 \ No newline at end of file diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/frame_31.png b/vendor/crowdfunding2/lib/phpqrcode/cache/frame_31.png new file mode 100755 index 0000000..b14d1fa Binary files /dev/null and b/vendor/crowdfunding2/lib/phpqrcode/cache/frame_31.png differ diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/frame_32.dat b/vendor/crowdfunding2/lib/phpqrcode/cache/frame_32.dat new file mode 100755 index 0000000..aaa0808 --- /dev/null +++ b/vendor/crowdfunding2/lib/phpqrcode/cache/frame_32.dat @@ -0,0 +1,2 @@ +x + ־. Dl, Mz6Ç gcJD;'.AIqމI,IrYFk%DOy|EDD(L_Y>*ߚ?aOkL_<[c>c˘uLI%#0#0#otѢ}4fv_)Eph5R881#0#0itZ#0#0#0itZ#0#0#0itZl0#09q"HܜHQ"L5}-Y׾k`>z鸳4&p!!`:5 \ No newline at end of file diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/frame_32.png b/vendor/crowdfunding2/lib/phpqrcode/cache/frame_32.png new file mode 100755 index 0000000..58d42db Binary files /dev/null and b/vendor/crowdfunding2/lib/phpqrcode/cache/frame_32.png differ diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/frame_33.dat b/vendor/crowdfunding2/lib/phpqrcode/cache/frame_33.dat new file mode 100755 index 0000000..a261375 --- /dev/null +++ b/vendor/crowdfunding2/lib/phpqrcode/cache/frame_33.dat @@ -0,0 +1,14 @@ +xA a޺@n7+*L++柮bb*LCc kHrjJ5Yi~0_TT}e>5b_w͟?\Rai+7W\wLUNL ++ ++jOkc\˩|%o} 8 ++ ++ ++ 3g ++ ++ ++3g@ ++ ++ ++:RXB9I=ko/Swؘٯ`gr_ٙYVSYzIefnmQoz > \ No newline at end of file diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/frame_33.png b/vendor/crowdfunding2/lib/phpqrcode/cache/frame_33.png new file mode 100755 index 0000000..924c728 Binary files /dev/null and b/vendor/crowdfunding2/lib/phpqrcode/cache/frame_33.png differ diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/frame_34.dat b/vendor/crowdfunding2/lib/phpqrcode/cache/frame_34.dat new file mode 100755 index 0000000..7ceb025 Binary files /dev/null and b/vendor/crowdfunding2/lib/phpqrcode/cache/frame_34.dat differ diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/frame_34.png b/vendor/crowdfunding2/lib/phpqrcode/cache/frame_34.png new file mode 100755 index 0000000..a477042 Binary files /dev/null and b/vendor/crowdfunding2/lib/phpqrcode/cache/frame_34.png differ diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/frame_35.dat b/vendor/crowdfunding2/lib/phpqrcode/cache/frame_35.dat new file mode 100755 index 0000000..56bc3e2 Binary files /dev/null and b/vendor/crowdfunding2/lib/phpqrcode/cache/frame_35.dat differ diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/frame_35.png b/vendor/crowdfunding2/lib/phpqrcode/cache/frame_35.png new file mode 100755 index 0000000..d29806c Binary files /dev/null and b/vendor/crowdfunding2/lib/phpqrcode/cache/frame_35.png differ diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/frame_36.dat b/vendor/crowdfunding2/lib/phpqrcode/cache/frame_36.dat new file mode 100755 index 0000000..282c60d Binary files /dev/null and b/vendor/crowdfunding2/lib/phpqrcode/cache/frame_36.dat differ diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/frame_36.png b/vendor/crowdfunding2/lib/phpqrcode/cache/frame_36.png new file mode 100755 index 0000000..96ecb42 Binary files /dev/null and b/vendor/crowdfunding2/lib/phpqrcode/cache/frame_36.png differ diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/frame_37.dat b/vendor/crowdfunding2/lib/phpqrcode/cache/frame_37.dat new file mode 100755 index 0000000..015c0f2 Binary files /dev/null and b/vendor/crowdfunding2/lib/phpqrcode/cache/frame_37.dat differ diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/frame_37.png b/vendor/crowdfunding2/lib/phpqrcode/cache/frame_37.png new file mode 100755 index 0000000..fcc5162 Binary files /dev/null and b/vendor/crowdfunding2/lib/phpqrcode/cache/frame_37.png differ diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/frame_38.dat b/vendor/crowdfunding2/lib/phpqrcode/cache/frame_38.dat new file mode 100755 index 0000000..71cf53e --- /dev/null +++ b/vendor/crowdfunding2/lib/phpqrcode/cache/frame_38.dat @@ -0,0 +1 @@ +xA0ЎuA2;Нk(gytp9$D\e^'t-aIFMSkIŤ:7|LkN8N7i}i,[WgӴ?31iN}}=OM:4)SL2eʔ)SL#$ JJM:}]L٧SQL2eʔ)SL2աPt(:)SL2eʔ)S:ECq2eʔ)SL2eʔECѡ8O2eʔ)SL2eTCѡPL2eʔ)SL2ݓsJCIKԂi93n_ +Ri4\g;% }an \ No newline at end of file diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/frame_38.png b/vendor/crowdfunding2/lib/phpqrcode/cache/frame_38.png new file mode 100755 index 0000000..89238f3 Binary files /dev/null and b/vendor/crowdfunding2/lib/phpqrcode/cache/frame_38.png differ diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/frame_39.dat b/vendor/crowdfunding2/lib/phpqrcode/cache/frame_39.dat new file mode 100755 index 0000000..53511f7 Binary files /dev/null and b/vendor/crowdfunding2/lib/phpqrcode/cache/frame_39.dat differ diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/frame_39.png b/vendor/crowdfunding2/lib/phpqrcode/cache/frame_39.png new file mode 100755 index 0000000..1dc9cd1 Binary files /dev/null and b/vendor/crowdfunding2/lib/phpqrcode/cache/frame_39.png differ diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/frame_4.dat b/vendor/crowdfunding2/lib/phpqrcode/cache/frame_4.dat new file mode 100755 index 0000000..67b30e8 --- /dev/null +++ b/vendor/crowdfunding2/lib/phpqrcode/cache/frame_4.dat @@ -0,0 +1 @@ +x E=u pجQCOM'ˏ$ @3eF\FNXRyؾC{a8R Ńa2@qkH1(`cj~0ܨعnXGĀ \ No newline at end of file diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/frame_4.png b/vendor/crowdfunding2/lib/phpqrcode/cache/frame_4.png new file mode 100755 index 0000000..b72f9e7 Binary files /dev/null and b/vendor/crowdfunding2/lib/phpqrcode/cache/frame_4.png differ diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/frame_40.dat b/vendor/crowdfunding2/lib/phpqrcode/cache/frame_40.dat new file mode 100755 index 0000000..90d36dd --- /dev/null +++ b/vendor/crowdfunding2/lib/phpqrcode/cache/frame_40.dat @@ -0,0 +1,2 @@ +xA@Ь@o7`Qfe䕫PA><]߳bZn^AQ}[9^]ynajM܇K̘1cƌ3f̘1{W5}{7lMޚxI<Kαyl3f̘1cƌ3f̘1ۻٻ={αyl3f̘1cƌ3f̘1ۻٻ={αyl3f̘1cƌ3f̘1ۻٻ={αyl3f̘1cƌ3f̘1ۻٻ={αyl3f̘1cƌ3f̘SʑӒ7HK޼g\u_r'4[-]qL8ƝY1q!/(% \ No newline at end of file diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/frame_40.png b/vendor/crowdfunding2/lib/phpqrcode/cache/frame_40.png new file mode 100755 index 0000000..8034d86 Binary files /dev/null and b/vendor/crowdfunding2/lib/phpqrcode/cache/frame_40.png differ diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/frame_5.dat b/vendor/crowdfunding2/lib/phpqrcode/cache/frame_5.dat new file mode 100755 index 0000000..d5dafe1 --- /dev/null +++ b/vendor/crowdfunding2/lib/phpqrcode/cache/frame_5.dat @@ -0,0 +1 @@ +x1 Eu7ЛZ|ND B0@R$l,->VKZ[I9+Es=ϤL1̄[FZU4?i<;7;P#W-[ݯ6ddddddc",;"sk摑Q&erw######L.摑Иy1^˲\3 v \ No newline at end of file diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/mask_0/mask_117_0.dat b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_0/mask_117_0.dat new file mode 100755 index 0000000..781c7f8 --- /dev/null +++ b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_0/mask_117_0.dat @@ -0,0 +1,2 @@ +xA +0 }OrR,#3,o5Cq:;;wvNJZG=m} ѱ2iRkj_YYYYYYYYe_/WVVVVVVkd-Ϻ,#OZc]|{ž$ \ No newline at end of file diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/mask_0/mask_121_0.dat b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_0/mask_121_0.dat new file mode 100755 index 0000000..68810c3 --- /dev/null +++ b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_0/mask_121_0.dat @@ -0,0 +1 @@ +x1 О/w YMS8>2SFOEcW\ۼ{cpKGBКmxhfffffff/s22W|*d1*5̬RWas\xm~8߮r0wjsdm&y \ No newline at end of file diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/mask_0/mask_125_0.dat b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_0/mask_125_0.dat new file mode 100755 index 0000000..2c73ef1 --- /dev/null +++ b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_0/mask_125_0.dat @@ -0,0 +1,2 @@ +xA + н_TH`3AOL4 k(ewGW. #2} \Ygggggggggg_d>j^s;;;;;;;;;;'q;;;;;;;;;'˰qu_PYw{e=dG/ \ No newline at end of file diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/mask_0/mask_129_0.dat b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_0/mask_129_0.dat new file mode 100755 index 0000000..812ee8a --- /dev/null +++ b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_0/mask_129_0.dat @@ -0,0 +1,2 @@ +x1 + /*DE'hgt-}_pV \"b=s[J=8Dho۞' 0X ۴e0`  j" 0`Wf`^P0`2Ȁ  d07(Y/XLGby"pT \ No newline at end of file diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/mask_0/mask_137_0.dat b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_0/mask_137_0.dat new file mode 100755 index 0000000..f6d993b --- /dev/null +++ b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_0/mask_137_0.dat @@ -0,0 +1 @@ +x1 О/+FZ?J L7Ժ*Ba%L~˻ʓCJYIWJ .K]R0a„ $INTwlLaL0a„ &Ld@PO0a„ &L0e@P?a„ &L0aDe@ &L0aMIlL&)dlgacR<$v,ɺ?U2] \ No newline at end of file diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/mask_0/mask_141_0.dat b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_0/mask_141_0.dat new file mode 100755 index 0000000..8c685c8 --- /dev/null +++ b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_0/mask_141_0.dat @@ -0,0 +1,2 @@ +x= +0 нi9'EDx͘%I9+E{$m^&uS"D6ڟ]98UMbҾY[2拉Ĉ#F1bĈ%iRN潝ѳ#;#F1bĈN1i#F1bĈ#FtZ}Nk1bĈ#F1bktZ;#F1bFV-u"IoD-*7uj>bMV+ \ No newline at end of file diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/mask_0/mask_149_0.dat b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_0/mask_149_0.dat new file mode 100755 index 0000000..d258350 --- /dev/null +++ b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_0/mask_149_0.dat @@ -0,0 +1,3 @@ +xA + н_MEQXP৞.|94e{JLv#^n[ ?; +ZIV-*w˒1*+VXbŊXgwqX}JRYbŊ+VXbeΠwfeΠ^bŊ+VXbʜAʜAbŊ+VXbŊ9ٜAbŊ+VXbŊl0*0Tj`?Ϊ;X=zZr* \ No newline at end of file diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/mask_0/mask_153_0.dat b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_0/mask_153_0.dat new file mode 100755 index 0000000..fc79e9e --- /dev/null +++ b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_0/mask_153_0.dat @@ -0,0 +1 @@ +x1 Н/礑h&F`Ҽ@I;PZ^X͌mf.=5 [if-R+!wr˜g\j̘1cƌ3f̘1cfo.2?1z `ƌ3f̘1cƌzƌ3f̘1cƌ3fztf3f̘1cƌ3f̘kk030cƌ3f̘1c9;Ď`vf͚̆ZϘW9 \ No newline at end of file diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/mask_0/mask_157_0.dat b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_0/mask_157_0.dat new file mode 100755 index 0000000..ad749f3 --- /dev/null +++ b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_0/mask_157_0.dat @@ -0,0 +1,2 @@ +xA + н_QRY k*q͵=j7~nN.p%ڵsi.رcǎ;vر{.-W2={mgy+رcǎ;vɳ2;yּcǎ;vرcNɳ;vرcǎ;v2I9+DyI4ˠ5:Wvdqߜܴ<d2x%[U%2]&K,Ydɒ%ˡ,S՗r2yd=,k_{Xdɒ%K,Yd)0m,Ydɒ%K,Yd)0m,Ydɒ%K,Yme,e%K,Ydɒ%K,eq Ò%K,Ydɒe:I9EQ=Ls I{ZtR}Sn:|R[?_*SL2eʔ)SL&ϦI O2O2eʔ)SL2e*C1PPSL2eʔ)SLP22)SL2eʔ)SLe(}2)SL2eʔ)SLe(}2)SL2eʔ)Sic7;"ޙFͦސٙvL ^2}oO'r \ No newline at end of file diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/mask_0/mask_173_0.dat b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_0/mask_173_0.dat new file mode 100755 index 0000000..5ef85e7 --- /dev/null +++ b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_0/mask_173_0.dat @@ -0,0 +1 @@ +x10ޯT [4v2ƽok݇;Ӳ]f֞dljlG0n+߻mG˖-[lٲe"Y}oV[lٲe˖-[lٲeհՃ[2lٲe˖-[lٲeհՃ[2lٲe˖-[lٲeհՃ[lٲe˖-[lٲeValٲe˖-[lٲef[BmаE;N-ۜT/rl?* \ No newline at end of file diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/mask_0/mask_177_0.dat b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_0/mask_177_0.dat new file mode 100755 index 0000000..78a26a7 --- /dev/null +++ b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_0/mask_177_0.dat @@ -0,0 +1,2 @@ +x1 +0>I9+?߁iև d̹xֈxN/է|{ظ8d0h=cFf̘1cƌ3f̘qq=w6;l4cƕ<nj3f̘1cƌ3fXһ1ֻcƌ3f̘1cƌ3fXbwnj3f̘1cƌ3f̘M'X&1cƌ3f̘1cƌ3ֻnn1cƌ3f̘1cƌÍ3U< \7+(<OƌΊnj4@ \ No newline at end of file diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/mask_0/mask_21_0.dat b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_0/mask_21_0.dat new file mode 100755 index 0000000..368c994 Binary files /dev/null and b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_0/mask_21_0.dat differ diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/mask_0/mask_25_0.dat b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_0/mask_25_0.dat new file mode 100755 index 0000000..e4a5b6d Binary files /dev/null and b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_0/mask_25_0.dat differ diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/mask_0/mask_29_0.dat b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_0/mask_29_0.dat new file mode 100755 index 0000000..74a216b Binary files /dev/null and b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_0/mask_29_0.dat differ diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/mask_0/mask_33_0.dat b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_0/mask_33_0.dat new file mode 100755 index 0000000..2ec712a Binary files /dev/null and b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_0/mask_33_0.dat differ diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/mask_0/mask_37_0.dat b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_0/mask_37_0.dat new file mode 100755 index 0000000..1588cfc Binary files /dev/null and b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_0/mask_37_0.dat differ diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/mask_0/mask_41_0.dat b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_0/mask_41_0.dat new file mode 100755 index 0000000..e369027 Binary files /dev/null and b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_0/mask_41_0.dat differ diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/mask_0/mask_45_0.dat b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_0/mask_45_0.dat new file mode 100755 index 0000000..452f126 Binary files /dev/null and b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_0/mask_45_0.dat differ diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/mask_0/mask_49_0.dat b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_0/mask_49_0.dat new file mode 100755 index 0000000..fdd2aac --- /dev/null +++ b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_0/mask_49_0.dat @@ -0,0 +1,2 @@ +xK E9o#?H/6g$-,X] +xݘ; X԰9<Ѻq2AfH7/5We{#fި?4=N > \ No newline at end of file diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/mask_0/mask_53_0.dat b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_0/mask_53_0.dat new file mode 100755 index 0000000..572d279 --- /dev/null +++ b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_0/mask_53_0.dat @@ -0,0 +1,2 @@ +xK +@!йoQϺ:(m&s-6Z{m4YX.F٭XZij=:έ֋b忑VH 8 #[Y^Xe \ No newline at end of file diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/mask_0/mask_57_0.dat b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_0/mask_57_0.dat new file mode 100755 index 0000000..ea81e6d --- /dev/null +++ b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_0/mask_57_0.dat @@ -0,0 +1,4 @@ +xA + {^s=YL՚ ( +ouj)  +Z7yv,ԴwVQ iGiҤDfەwo4ѤoLLȼ}4 h \ No newline at end of file diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/mask_0/mask_61_0.dat b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_0/mask_61_0.dat new file mode 100755 index 0000000..93d2444 Binary files /dev/null and b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_0/mask_61_0.dat differ diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/mask_0/mask_65_0.dat b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_0/mask_65_0.dat new file mode 100755 index 0000000..df29d7b Binary files /dev/null and b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_0/mask_65_0.dat differ diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/mask_0/mask_69_0.dat b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_0/mask_69_0.dat new file mode 100755 index 0000000..8a2cfbd --- /dev/null +++ b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_0/mask_69_0.dat @@ -0,0 +1 @@ +xK =_+mBd|Q"s+1"),=Ea T"ŐnE-3 ,KYw=ZZT .,K1#֞!Ŋ+V嬪.2XbŊ+VX.kBzwձ̀gkYZ \ No newline at end of file diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/mask_0/mask_89_0.dat b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_0/mask_89_0.dat new file mode 100755 index 0000000..aaa4c52 --- /dev/null +++ b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_0/mask_89_0.dat @@ -0,0 +1 @@ +x1 ὧi9'Hl?L^"&M?bq?˸,9!z]VScƌ3_c!`n3f̘1č 3f̘1/f>.Uc˻; 2;Y+7 \ No newline at end of file diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/mask_0/mask_93_0.dat b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_0/mask_93_0.dat new file mode 100755 index 0000000..e218fa0 --- /dev/null +++ b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_0/mask_93_0.dat @@ -0,0 +1,3 @@ +xK + EyV,OmޠrPH0{2bc{tQ] +{Q{{弬֒ǎ;v_ڳ}L}l߱cǎ;v̑̑̑رcǎ.Legw3qeѾ@i \ No newline at end of file diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/mask_0/mask_97_0.dat b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_0/mask_97_0.dat new file mode 100755 index 0000000..74ac719 Binary files /dev/null and b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_0/mask_97_0.dat differ diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/mask_1/mask_101_1.dat b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_1/mask_101_1.dat new file mode 100755 index 0000000..ec939b5 --- /dev/null +++ b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_1/mask_101_1.dat @@ -0,0 +1,2 @@ +x1 + н\QEd  1N<#Ֆ-7u.lԦeiXXXXXRZVVeIo1,,,,,v%?gaaaaY K&K=/+ۍ˱ގ \ No newline at end of file diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/mask_1/mask_105_1.dat b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_1/mask_105_1.dat new file mode 100755 index 0000000..e1f5c99 --- /dev/null +++ b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_1/mask_105_1.dat @@ -0,0 +1 @@ +x1 Ӕ_Υb KB?"*#WʘtgӎJqUM9TLLvǤLLLLLLzgG01111yiߘ4m=՛n+2 \ No newline at end of file diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/mask_1/mask_109_1.dat b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_1/mask_109_1.dat new file mode 100755 index 0000000..7e0d6d1 --- /dev/null +++ b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_1/mask_109_1.dat @@ -0,0 +1 @@ +xֱ >ӘK}:!iY'*3]fsmb[JƶŖK9}cccccc'u.6Ʀs6666R[^g{/lٷ 7͂ \ No newline at end of file diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/mask_1/mask_113_1.dat b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_1/mask_113_1.dat new file mode 100755 index 0000000..1dd666d --- /dev/null +++ b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_1/mask_113_1.dat @@ -0,0 +1 @@ +x1  -8fL(pBlDM9";-;?1p{\%-3:@ad4*Nadddddd########c]751xYu \ No newline at end of file diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/mask_1/mask_117_1.dat b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_1/mask_117_1.dat new file mode 100755 index 0000000..8921f64 --- /dev/null +++ b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_1/mask_117_1.dat @@ -0,0 +1,2 @@ +xֻ >ӘK$^ 8YQSV'z8jzʇ^]סekXYYYYYYYjݵ# ++yeeeeeeee#WVVVVVVVV;"+yeeeeeeel'e;b&^9{/J$p \ No newline at end of file diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/mask_1/mask_121_1.dat b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_1/mask_121_1.dat new file mode 100755 index 0000000..64bd8ba --- /dev/null +++ b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_1/mask_121_1.dat @@ -0,0 +1,2 @@ +x1 + н\CPbїE$DdƩYtڅλ0$ήꝝga7yٯ痽Y??{{D \ No newline at end of file diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/mask_1/mask_129_1.dat b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_1/mask_129_1.dat new file mode 100755 index 0000000..62cd1c9 Binary files /dev/null and b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_1/mask_129_1.dat differ diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/mask_1/mask_133_1.dat b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_1/mask_133_1.dat new file mode 100755 index 0000000..18d68dc --- /dev/null +++ b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_1/mask_133_1.dat @@ -0,0 +1 @@ +x1 Ӕ_΅hh|"zۉ-*dNHQĢR ,X`c9Y(na_` ,X,X,X` #:8  ,X`Bd¾` ,X|ϢY\X; 7-; ` \ No newline at end of file diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/mask_1/mask_137_1.dat b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_1/mask_137_1.dat new file mode 100755 index 0000000..284d7be --- /dev/null +++ b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_1/mask_137_1.dat @@ -0,0 +1,3 @@ +x1 +0 ӤKh]D,-t #ڌQ[T Ks7_?9|B&X^L0a„&3„M&L0a„ &2D4c0a„ &LȀЌe„ &L0abwȀf,&L0a„7&y2anoL<01O + \ No newline at end of file diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/mask_1/mask_141_1.dat b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_1/mask_141_1.dat new file mode 100755 index 0000000..83220dd --- /dev/null +++ b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_1/mask_141_1.dat @@ -0,0 +1,2 @@ +x1 + >946)3$`s uʮ>Wd )g'M{3\d6ubذaÆ 6lؼn]Nذ9FްaÆ 6lذa3a#oذaÆ 6lذذ5e16lذaÆ ]Sbk6lذaÆ mͤ;CcfIdsG \ No newline at end of file diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/mask_1/mask_145_1.dat b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_1/mask_145_1.dat new file mode 100755 index 0000000..6a9950f --- /dev/null +++ b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_1/mask_145_1.dat @@ -0,0 +1 @@ +x!0@k 4a)q2i.YCUO{35UZFn]fN>bdwtzJF}F1bĈ#F(F6r1bĈ#F1E1ilF1bĈ#FtF#F1bĈ#FtZ}##F1bĈleHGܣ@ٝ \ No newline at end of file diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/mask_1/mask_149_1.dat b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_1/mask_149_1.dat new file mode 100755 index 0000000..02a3cdc --- /dev/null +++ b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_1/mask_149_1.dat @@ -0,0 +1 @@ +x1 Ӕ_΅qH_Xci#Gd̘Ք՛gLU^ݮVR>dKVXbŊ+VXeoXJ_bŊ+VXb;ݙ+}Ŋ+VXbŊ+VAVngŊ+VXbŊ}+ +VXbŊVj>hewf*`uTq \ No newline at end of file diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/mask_1/mask_153_1.dat b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_1/mask_153_1.dat new file mode 100755 index 0000000..2abfca2 --- /dev/null +++ b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_1/mask_153_1.dat @@ -0,0 +1,2 @@ +x1 +0\9btEc'HH9efߞmffM#.̘1cƌ3f̘1cf73f̘g̘1cƌ3f̘1co2c]?3f̘1cƌ3f5Mf3f̘1cƌ3f̘17utf3f̘1cƌ3f̘=lj3>V \ No newline at end of file diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/mask_1/mask_157_1.dat b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_1/mask_157_1.dat new file mode 100755 index 0000000..17344b8 --- /dev/null +++ b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_1/mask_157_1.dat @@ -0,0 +1,2 @@ +x1 + >94Sd/51V)SkJv7eGcǎ;vرc]Zٱc'رcǎ;vر+رg;vرcǎ;}V`N+رcǎ;v:;v;vرcǎ;;}Vޱcǎ;vص'vz#;]klwoA` \ No newline at end of file diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/mask_1/mask_161_1.dat b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_1/mask_161_1.dat new file mode 100755 index 0000000..669ade1 --- /dev/null +++ b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_1/mask_161_1.dat @@ -0,0 +1 @@ +x10_΅Xš yi~Qbkvp7'M u=]([ 2dȐ +\' 2 2dȐ!C 2s0/3d() 2dȐ!C 241dh 2dȐ!C 2dhcȐSL2eʔ)SL2M SLSL2eʔ)SL2M}LSSL2eʔ)SLeSy)SŔ)SL2eʔ)S;ٔ)S;)SL2eʔ)Sv()Sv()SL2eʔ)SLdT6}a*3mljmzC' \ No newline at end of file diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/mask_1/mask_173_1.dat b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_1/mask_173_1.dat new file mode 100755 index 0000000..436918c --- /dev/null +++ b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_1/mask_173_1.dat @@ -0,0 +1 @@ +x1 Ӕ_Υ''@y]X1?"g:1犝fn˶˻mm.?lٲe˖-F>glٲ2lٲe˖-[lٲeO`˖e˖-[lٲe˖-[l lٲlٲe˖-[lٲeVO`˖e˖-[lٲe˖-[z0}[z0y˖-[lٲe˖-[Ee[hOVWö=t*| \ No newline at end of file diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/mask_1/mask_177_1.dat b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_1/mask_177_1.dat new file mode 100755 index 0000000..12e2e52 --- /dev/null +++ b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_1/mask_177_1.dat @@ -0,0 +1 @@ +x1 Ep0X,a#r}6}nj~\8ƌ3f̘1cƌ7{3f,y3f̘1cƌ3fX_`X&3f̘1cƌ3f̘M_1cy̘1cƌ3f̘1cƌ+3f,y3f̘1cƌ3fX_bX&3f̘1cƌ3fx2dX'x[cy| 3 \ No newline at end of file diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/mask_1/mask_21_1.dat b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_1/mask_21_1.dat new file mode 100755 index 0000000..f87e0a1 Binary files /dev/null and b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_1/mask_21_1.dat differ diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/mask_1/mask_25_1.dat b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_1/mask_25_1.dat new file mode 100755 index 0000000..3a225e3 Binary files /dev/null and b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_1/mask_25_1.dat differ diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/mask_1/mask_29_1.dat b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_1/mask_29_1.dat new file mode 100755 index 0000000..0a1cb3b Binary files /dev/null and b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_1/mask_29_1.dat differ diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/mask_1/mask_33_1.dat b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_1/mask_33_1.dat new file mode 100755 index 0000000..318949d Binary files /dev/null and b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_1/mask_33_1.dat differ diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/mask_1/mask_37_1.dat b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_1/mask_37_1.dat new file mode 100755 index 0000000..5bd9e3a Binary files /dev/null and b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_1/mask_37_1.dat differ diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/mask_1/mask_41_1.dat b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_1/mask_41_1.dat new file mode 100755 index 0000000..52e9e58 Binary files /dev/null and b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_1/mask_41_1.dat differ diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/mask_1/mask_45_1.dat b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_1/mask_45_1.dat new file mode 100755 index 0000000..b35c567 Binary files /dev/null and b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_1/mask_45_1.dat differ diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/mask_1/mask_49_1.dat b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_1/mask_49_1.dat new file mode 100755 index 0000000..d20d717 Binary files /dev/null and b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_1/mask_49_1.dat differ diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/mask_1/mask_53_1.dat b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_1/mask_53_1.dat new file mode 100755 index 0000000..a676d7d Binary files /dev/null and b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_1/mask_53_1.dat differ diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/mask_1/mask_57_1.dat b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_1/mask_57_1.dat new file mode 100755 index 0000000..896ed43 Binary files /dev/null and b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_1/mask_57_1.dat differ diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/mask_1/mask_61_1.dat b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_1/mask_61_1.dat new file mode 100755 index 0000000..4165a4b --- /dev/null +++ b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_1/mask_61_1.dat @@ -0,0 +1 @@ +x30CbpPi`@&H^nadQG{n_.4Iy킎`)-5*(of[sm}6YM ;;;;;G{zطz1vw}=wuL%?"=~ei \ No newline at end of file diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/mask_1/mask_97_1.dat b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_1/mask_97_1.dat new file mode 100755 index 0000000..24fa60f --- /dev/null +++ b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_1/mask_97_1.dat @@ -0,0 +1,2 @@ +x1 +0н1\tncKD"H$DH$D"Q&WerH$D"*x[(?/'nd \ No newline at end of file diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/mask_2/mask_117_2.dat b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_2/mask_117_2.dat new file mode 100755 index 0000000..b4dcce4 --- /dev/null +++ b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_2/mask_117_2.dat @@ -0,0 +1,2 @@ +x1 + >94!m dOs\0X,la5#E>Z[ַRT*JR?Q-*T*JR?UW*JRTݟ+JRԤ~m5;S&+ \ No newline at end of file diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/mask_2/mask_121_2.dat b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_2/mask_121_2.dat new file mode 100755 index 0000000..a2a0097 Binary files /dev/null and b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_2/mask_121_2.dat differ diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/mask_2/mask_125_2.dat b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_2/mask_125_2.dat new file mode 100755 index 0000000..0ea40fd --- /dev/null +++ b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_2/mask_125_2.dat @@ -0,0 +1 @@ +x! PӔ_@ U(kp@^Mڮ5-:VF_\t:NtyNqt:NtG;Nt:.8:NtzA}yNq;+n& \ No newline at end of file diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/mask_2/mask_129_2.dat b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_2/mask_129_2.dat new file mode 100755 index 0000000..bf04839 --- /dev/null +++ b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_2/mask_129_2.dat @@ -0,0 +1,2 @@ +x1 +0н_KVڡ'.!w]A0X~  !࣠fK# xFy4 vey@^+  ~  L#veI \ No newline at end of file diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/mask_2/mask_133_2.dat b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_2/mask_133_2.dat new file mode 100755 index 0000000..9e78b6d --- /dev/null +++ b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_2/mask_133_2.dat @@ -0,0 +1,10 @@ +x1 + н&`LQ-g=Aqbʪl fƄȚ44& )OȚYF4444444444c4~9S:3ЌטpǮ> \ No newline at end of file diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/mask_2/mask_145_2.dat b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_2/mask_145_2.dat new file mode 100755 index 0000000..9ff2bbf --- /dev/null +++ b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_2/mask_145_2.dat @@ -0,0 +1,4 @@ +x1 + нr] +,tQ^&C~ +щj~mɾ.FgMDDDDDDDDDDDST׈DHdZL+ɴDDDDDDDDDDD2-'"""""""":BתEYDd \ No newline at end of file diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/mask_2/mask_149_2.dat b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_2/mask_149_2.dat new file mode 100755 index 0000000..d52e048 --- /dev/null +++ b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_2/mask_149_2.dat @@ -0,0 +1 @@ +x;@/gcaGBXB'-ˆouէUQdRVOmT*ǫ;;j廝Ee2PQQQQQQQQQQQ TTTTTTTTTTTTr33R &Tskz_e2P=d \ No newline at end of file diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/mask_2/mask_153_2.dat b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_2/mask_153_2.dat new file mode 100755 index 0000000..3b06041 --- /dev/null +++ b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_2/mask_153_2.dat @@ -0,0 +1,2 @@ +x1 +0 Ӥ8ZP!BZu賶"bu*)]MFFFFFFFFFFFF%= #ddddddddddddr ot2yFFFFFFFFFFFF& #k5L 2222222222(Y7"d@H \ No newline at end of file diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/mask_2/mask_157_2.dat b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_2/mask_157_2.dat new file mode 100755 index 0000000..2baf535 --- /dev/null +++ b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_2/mask_157_2.dat @@ -0,0 +1,3 @@ +x1 +0>s6MqUH1X&U̘f/u-'.[KGGGGGGGGGGH|NG(ttttttttttNF;::::::::::}Nz$ +>n A#^AG(t =3{ \ No newline at end of file diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/mask_2/mask_161_2.dat b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_2/mask_161_2.dat new file mode 100755 index 0000000..d2df759 Binary files /dev/null and b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_2/mask_161_2.dat differ diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/mask_2/mask_165_2.dat b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_2/mask_165_2.dat new file mode 100755 index 0000000..2e6cd7c --- /dev/null +++ b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_2/mask_165_2.dat @@ -0,0 +1,2 @@ +x1 +0 Ӥ?BVUG%*+_fs MIIIIIIIII2d;l4()))))))))))eqJنIDIIIIIIIIIII)۠mPRRRRRRRRRRR6l JJJJJJJJJJJJن}RaQRRRRRRRRRRNeK?R퐔͔&W3U \ No newline at end of file diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/mask_2/mask_169_2.dat b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_2/mask_169_2.dat new file mode 100755 index 0000000..4052062 Binary files /dev/null and b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_2/mask_169_2.dat differ diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/mask_2/mask_173_2.dat b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_2/mask_173_2.dat new file mode 100755 index 0000000..0a30ba5 --- /dev/null +++ b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_2/mask_173_2.dat @@ -0,0 +1 @@ +x+@ Pift:>y &d U߬S[]5Z;a5V۞A[Z˴VՃI0ZZZZZZZZZZZZZZ=-Lhi`VFK?ݧhioJ0}o \ No newline at end of file diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/mask_2/mask_177_2.dat b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_2/mask_177_2.dat new file mode 100755 index 0000000..d2c52f9 --- /dev/null +++ b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_2/mask_177_2.dat @@ -0,0 +1,2 @@ +x1 + E>Y4V$~ ,C&U;Ook5bϙGx9%&&&&&&&&&&&n$OL|v#&&&&&&&&&&&&&bbݍXw#&l7bbbbbbbbbbbbbbM"l7bbbbbbbbbbbbbbMa!&݈3)U*F> \ No newline at end of file diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/mask_2/mask_45_2.dat b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_2/mask_45_2.dat new file mode 100755 index 0000000..ad44ff1 Binary files /dev/null and b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_2/mask_45_2.dat differ diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/mask_2/mask_49_2.dat b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_2/mask_49_2.dat new file mode 100755 index 0000000..6e8edff Binary files /dev/null and b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_2/mask_49_2.dat differ diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/mask_2/mask_53_2.dat b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_2/mask_53_2.dat new file mode 100755 index 0000000..682cae2 Binary files /dev/null and b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_2/mask_53_2.dat differ diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/mask_2/mask_57_2.dat b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_2/mask_57_2.dat new file mode 100755 index 0000000..66a5c05 Binary files /dev/null and b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_2/mask_57_2.dat differ diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/mask_2/mask_61_2.dat b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_2/mask_61_2.dat new file mode 100755 index 0000000..77d3815 Binary files /dev/null and b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_2/mask_61_2.dat differ diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/mask_2/mask_65_2.dat b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_2/mask_65_2.dat new file mode 100755 index 0000000..caf184a Binary files /dev/null and b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_2/mask_65_2.dat differ diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/mask_2/mask_69_2.dat b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_2/mask_69_2.dat new file mode 100755 index 0000000..6a3801b Binary files /dev/null and b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_2/mask_69_2.dat differ diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/mask_2/mask_73_2.dat b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_2/mask_73_2.dat new file mode 100755 index 0000000..74945b7 Binary files /dev/null and b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_2/mask_73_2.dat differ diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/mask_2/mask_77_2.dat b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_2/mask_77_2.dat new file mode 100755 index 0000000..903cba4 --- /dev/null +++ b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_2/mask_77_2.dat @@ -0,0 +1 @@ +x1 н_CM>Gt ѫe+FWZEm&gއFѶhF+t/FYvFj[*7a \ No newline at end of file diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/mask_2/mask_81_2.dat b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_2/mask_81_2.dat new file mode 100755 index 0000000..17a9ac2 --- /dev/null +++ b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_2/mask_81_2.dat @@ -0,0 +1,2 @@ +x1 +0н_KҩVi!O\"A]:xbW1uȦ&_T ΋6H$U^D~bׯb=gX \ No newline at end of file diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/mask_2/mask_85_2.dat b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_2/mask_85_2.dat new file mode 100755 index 0000000..72c74ff --- /dev/null +++ b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_2/mask_85_2.dat @@ -0,0 +1,2 @@ +x1 +0=1\B7O$A0$8Wwjguu槊RT*uS֧JRTJRRޢN浘V \ No newline at end of file diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/mask_2/mask_89_2.dat b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_2/mask_89_2.dat new file mode 100755 index 0000000..06c9a4f --- /dev/null +++ b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_2/mask_89_2.dat @@ -0,0 +1 @@ +xٱ 0 >/&E*cQqŃ zf$rM)_%s_d3KO1^aL,$H"$KzRPt[I&X9$H"$I$ysI$DI$ɓI$I$Dɍ%es!=LAZ5'̓IVrn/2oƅ \ No newline at end of file diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/mask_3/mask_113_3.dat b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_3/mask_113_3.dat new file mode 100755 index 0000000..023b273 --- /dev/null +++ b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_3/mask_113_3.dat @@ -0,0 +1,2 @@ +xA +0 D}NrnDFj2KCt?WݲZi.qoP %Smj7ަ:*N:@:***fW9d2*j*}S@`*j৪6Jlѿ}}էTUa24hnt \ No newline at end of file diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/mask_3/mask_117_3.dat b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_3/mask_117_3.dat new file mode 100755 index 0000000..79cc04d --- /dev/null +++ b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_3/mask_117_3.dat @@ -0,0 +1,4 @@ +x1 +0 ]Q.xIB$?~!z#E)RHZ@bl-)ݿ<ߧ*OUR"5&5*ie J]+ \ No newline at end of file diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/mask_3/mask_145_3.dat b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_3/mask_145_3.dat new file mode 100755 index 0000000..338b7e7 --- /dev/null +++ b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_3/mask_145_3.dat @@ -0,0 +1,3 @@ +x +@|:^ Jy̡yMj-' +9VS֦K9e)PyUwe-m jԨQF5jԨRi٫F4_wk}0+jRBRF5jԨQeOMBJHjԨQF5jwP״˪IH I5jԨQFͳc w5jԨQF:zS*2UZ_C*e_OZ%dIȯb \ No newline at end of file diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/mask_3/mask_149_3.dat b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_3/mask_149_3.dat new file mode 100755 index 0000000..30bc5fa --- /dev/null +++ b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_3/mask_149_3.dat @@ -0,0 +1 @@ +xA0}Oܠ⦐H頯'Z2{oV|Ι%>yR{!8ÂI+JpI|#f5κ[P A $H Q})&X{ט+Wb`I)5%d \ No newline at end of file diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/mask_3/mask_153_3.dat b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_3/mask_153_3.dat new file mode 100755 index 0000000..89cdec0 --- /dev/null +++ b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_3/mask_153_3.dat @@ -0,0 +1,2 @@ +xA +0}Ns˹)7mJ,}8X=cW^GeN}o%uJV/{%O>}ӧO}K~O>}ӧO>Q=/ї>}ӧO>}u{ח>}ӧO>}u{蟪/%?}ӧO>}ׯ.N4჏VMmRt(1| \ No newline at end of file diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/mask_3/mask_177_3.dat b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_3/mask_177_3.dat new file mode 100755 index 0000000..9586979 Binary files /dev/null and b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_3/mask_177_3.dat differ diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/mask_3/mask_21_3.dat b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_3/mask_21_3.dat new file mode 100755 index 0000000..bcb4eec Binary files /dev/null and b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_3/mask_21_3.dat differ diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/mask_3/mask_25_3.dat b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_3/mask_25_3.dat new file mode 100755 index 0000000..0ffc375 Binary files /dev/null and b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_3/mask_25_3.dat differ diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/mask_3/mask_29_3.dat b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_3/mask_29_3.dat new file mode 100755 index 0000000..6150ac1 Binary files /dev/null and b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_3/mask_29_3.dat differ diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/mask_3/mask_33_3.dat b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_3/mask_33_3.dat new file mode 100755 index 0000000..6053b5e Binary files /dev/null and b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_3/mask_33_3.dat differ diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/mask_3/mask_37_3.dat b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_3/mask_37_3.dat new file mode 100755 index 0000000..5dea5b9 Binary files /dev/null and b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_3/mask_37_3.dat differ diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/mask_3/mask_41_3.dat b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_3/mask_41_3.dat new file mode 100755 index 0000000..ca9ddc2 Binary files /dev/null and b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_3/mask_41_3.dat differ diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/mask_3/mask_45_3.dat b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_3/mask_45_3.dat new file mode 100755 index 0000000..3daad97 --- /dev/null +++ b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_3/mask_45_3.dat @@ -0,0 +1,2 @@ +xK + DsFJ(&)0dЇFg![8=&iaD)d8&Aլa 1'II׳79 ex߾ I&֝CuJy \ No newline at end of file diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/mask_3/mask_49_3.dat b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_3/mask_49_3.dat new file mode 100755 index 0000000..7f6508d Binary files /dev/null and b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_3/mask_49_3.dat differ diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/mask_3/mask_53_3.dat b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_3/mask_53_3.dat new file mode 100755 index 0000000..8800bea --- /dev/null +++ b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_3/mask_53_3.dat @@ -0,0 +1,2 @@ +xK +0Ds ! -(.Bp&|"-t&`qQ-"9_+)Be/H8D%a~}spKFN=,;;a^t4\FSN \ No newline at end of file diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/mask_3/mask_57_3.dat b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_3/mask_57_3.dat new file mode 100755 index 0000000..4e1e5da Binary files /dev/null and b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_3/mask_57_3.dat differ diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/mask_3/mask_61_3.dat b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_3/mask_61_3.dat new file mode 100755 index 0000000..bf1a3cc --- /dev/null +++ b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_3/mask_61_3.dat @@ -0,0 +1,2 @@ +xA +0fz4-%*dp!yZܫu(~=&ۓ)R2"/"<9FΊ=rb"/rw"2B#3-0-KW \ No newline at end of file diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/mask_3/mask_65_3.dat b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_3/mask_65_3.dat new file mode 100755 index 0000000..8589208 --- /dev/null +++ b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_3/mask_65_3.dat @@ -0,0 +1,2 @@ +xQ + D4\?R ,!O-Nv1:cZu "UMÕF ~jK-la[^q^Q\=o-laZpUB @IKJzɢ|1Í  \ No newline at end of file diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/mask_3/mask_69_3.dat b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_3/mask_69_3.dat new file mode 100755 index 0000000..55318a8 --- /dev/null +++ b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_3/mask_69_3.dat @@ -0,0 +1,2 @@ +x +0 {&2'd l=,Fy;$쇤WE-R:%T,O2g"",Ȣ/DyĈɧ{O䮳",:NvEWN#(&,,]x؅ \ No newline at end of file diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/mask_3/mask_73_3.dat b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_3/mask_73_3.dat new file mode 100755 index 0000000..15be77f --- /dev/null +++ b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_3/mask_73_3.dat @@ -0,0 +1,2 @@ +xQ +0 C{g;JJ?dԬK=RasJhTJ6exka\$nIE,-/XB*х=wee4t̒tLщtt߫b gFf qoddn-? \ No newline at end of file diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/mask_3/mask_77_3.dat b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_3/mask_77_3.dat new file mode 100755 index 0000000..ec78280 --- /dev/null +++ b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_3/mask_77_3.dat @@ -0,0 +1,2 @@ +xA +0 &BiRaK"t`I@|fXyilE:Sza18GifK*?:YC1쌞졘(ቷJ*jl*TRIKR^ؙks)c)c)JZa \ No newline at end of file diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/mask_3/mask_81_3.dat b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_3/mask_81_3.dat new file mode 100755 index 0000000..47bc0f7 --- /dev/null +++ b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_3/mask_81_3.dat @@ -0,0 +1,2 @@ +x1 + F=\,JGAġhj>#3X:kԹ\FM Jhu3>TZ{PSgP'kVjժU_ۯUV=P oO:Wҝj[Wxm 5 \ No newline at end of file diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/mask_3/mask_85_3.dat b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_3/mask_85_3.dat new file mode 100755 index 0000000..02c4f8c Binary files /dev/null and b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_3/mask_85_3.dat differ diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/mask_3/mask_89_3.dat b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_3/mask_89_3.dat new file mode 100755 index 0000000..2b4cb59 --- /dev/null +++ b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_3/mask_89_3.dat @@ -0,0 +1,2 @@ +x1 ὧ) *.@U |eŵ6ۢw5*) oiK4nk>1}d>@ 4XYCo ۡ1<AhFt + 4@51Wr>7G}}x7|NgN \ No newline at end of file diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/mask_3/mask_93_3.dat b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_3/mask_93_3.dat new file mode 100755 index 0000000..b4cc8a9 --- /dev/null +++ b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_3/mask_93_3.dat @@ -0,0 +1,2 @@ +xA +0 D}NrnJɪQ~B06na<<ׇe6MRCP L̓i9M 2 LkŮdDv*"aXjBdAddZTdAdqY0exqeN&WVQvc \ No newline at end of file diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/mask_3/mask_97_3.dat b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_3/mask_97_3.dat new file mode 100755 index 0000000..7adc9eb Binary files /dev/null and b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_3/mask_97_3.dat differ diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/mask_4/mask_101_4.dat b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_4/mask_101_4.dat new file mode 100755 index 0000000..1c97dc0 --- /dev/null +++ b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_4/mask_101_4.dat @@ -0,0 +1,2 @@ +xA Fs^1bИ]4m+8+Ve^HR]\c +oWN#X+l HEcp \^.9qW9":.BB \0aPǨcp \ONqjpG}}$.˅ \ No newline at end of file diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/mask_4/mask_105_4.dat b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_4/mask_105_4.dat new file mode 100755 index 0000000..0211cdb --- /dev/null +++ b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_4/mask_105_4.dat @@ -0,0 +1,2 @@ +xK +0 D=Mr˹A TeEFL2 #鹢_I!딤Ѻ-իkmO]sS T6*'8 N$'NZ^}rU*G9r|c[cN[_=׫5^J 1*qv \ No newline at end of file diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/mask_4/mask_117_4.dat b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_4/mask_117_4.dat new file mode 100755 index 0000000..3867259 --- /dev/null +++ b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_4/mask_117_4.dat @@ -0,0 +1,2 @@ +x + н_s]4Dgn2Jj}ҾRsSWGRɧ)5Em#ܯk_"z3\rʕ+r Lk|/{;'/#\p\p># \p\p#>qp\p.$Iq dGR_4  \ No newline at end of file diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/mask_4/mask_137_4.dat b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_4/mask_137_4.dat new file mode 100755 index 0000000..0c09c48 Binary files /dev/null and b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_4/mask_137_4.dat differ diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/mask_4/mask_141_4.dat b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_4/mask_141_4.dat new file mode 100755 index 0000000..62b03f2 Binary files /dev/null and b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_4/mask_141_4.dat differ diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/mask_4/mask_145_4.dat b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_4/mask_145_4.dat new file mode 100755 index 0000000..33fb211 Binary files /dev/null and b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_4/mask_145_4.dat differ diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/mask_4/mask_149_4.dat b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_4/mask_149_4.dat new file mode 100755 index 0000000..de99310 --- /dev/null +++ b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_4/mask_149_4.dat @@ -0,0 +1,2 @@ +x +!н_sm +XӋ9=.=Zka]ޒ> Kjo |SSWKZm׌j\Ъ2 W\qW\q"~ jvtv_\qW\qW\q%g3 }+++ r9ArW\qW\qŕA g3WA W\qW\qW]V~v{D3Ȝ!\W^Tڍ[S7vۜgq? +{peo383838{YXz,_OYfe3s38383\C!Ms38383r \C?37938383\C!07M8383q,mMrskWv3~W WB \ No newline at end of file diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/mask_4/mask_157_4.dat b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_4/mask_157_4.dat new file mode 100755 index 0000000..ad5fcf6 --- /dev/null +++ b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_4/mask_157_4.dat @@ -0,0 +1 @@ +x10ޯs4"FP=iRX¢X0멪u 4ftl}m➭S|юS P5<]rwqwq^QN6ÏZsߙ,wqwqǝ>Μ5g;;Y}Vgw,wqwqw>9wqwq>3gY;[ww?P3Ƙggt퐮;].3w4A \ No newline at end of file diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/mask_4/mask_161_4.dat b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_4/mask_161_4.dat new file mode 100755 index 0000000..7604c45 --- /dev/null +++ b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_4/mask_161_4.dat @@ -0,0 +1 @@ +xA@ fs!AL_|,4l)iml׉0' +E ]N\x#2/_{7g9쏼ٷ}2r!?}-#Te9C9C9~6Sʇ겺!r!r!ۘse9C9C94_Ɯ|.r!r!s/s0 2r!r8}DwrDXΡ|x|!2 \ No newline at end of file diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/mask_4/mask_165_4.dat b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_4/mask_165_4.dat new file mode 100755 index 0000000..d83d631 --- /dev/null +++ b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_4/mask_165_4.dat @@ -0,0 +1,3 @@ +xA +1 }Or."*?fPLHIkΫZQ8 +Gyqk-n5+?|֎kKnEŹK.K.?2.|EJ{2<:.Ku\K.K.ǝmu)_8\r%\r%\Џ;'2!_8\r%\r%\Џ;'2!_\r%\r%\rinC?nn9 RK.K.;.HqY'ݽNF?K㕢,R| My*3 \ No newline at end of file diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/mask_4/mask_169_4.dat b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_4/mask_169_4.dat new file mode 100755 index 0000000..4aac95c Binary files /dev/null and b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_4/mask_169_4.dat differ diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/mask_4/mask_173_4.dat b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_4/mask_173_4.dat new file mode 100755 index 0000000..9df4d86 --- /dev/null +++ b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_4/mask_173_4.dat @@ -0,0 +1,2 @@ +xK +1}Nrna ~ZY!Jt^5(/jkz[pj_?~v:|jwՖ_mXzo6?naCe \ No newline at end of file diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/mask_4/mask_81_4.dat b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_4/mask_81_4.dat new file mode 100755 index 0000000..dd65216 --- /dev/null +++ b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_4/mask_81_4.dat @@ -0,0 +1,3 @@ +xA +0 yMyXE m7"892ѸQ1ݳ+xx;t35DIY1x\:u}e/ #Th< +UBz<5G<5{G<5<饫>]Urxu \ No newline at end of file diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/mask_4/mask_85_4.dat b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_4/mask_85_4.dat new file mode 100755 index 0000000..c8d5123 Binary files /dev/null and b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_4/mask_85_4.dat differ diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/mask_4/mask_89_4.dat b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_4/mask_89_4.dat new file mode 100755 index 0000000..5b9bd7e --- /dev/null +++ b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_4/mask_89_4.dat @@ -0,0 +1,2 @@ +x1 +0 ὧI9%  Vڀfr0}z=#9ҕ:~s1BՁg&4pgq.p.&gT05rgsgqrg捯u38k.Egmb*&7? : \ No newline at end of file diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/mask_4/mask_93_4.dat b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_4/mask_93_4.dat new file mode 100755 index 0000000..be7f5e5 --- /dev/null +++ b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_4/mask_93_4.dat @@ -0,0 +1,2 @@ +xK + ὧIn$}PŌB]N@%sfkҫ}CzoA}aʽ2|~D&l=Ywq}q\EYjK_ywqwz$==;_݋>+pH9Di \ No newline at end of file diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/mask_4/mask_97_4.dat b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_4/mask_97_4.dat new file mode 100755 index 0000000..5d848ca Binary files /dev/null and b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_4/mask_97_4.dat differ diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/mask_5/mask_101_5.dat b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_5/mask_101_5.dat new file mode 100755 index 0000000..c21869e --- /dev/null +++ b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_5/mask_101_5.dat @@ -0,0 +1,2 @@ +x + E+%=M3Cbv ѬNkûgqkqq{%Oo,iKee3[|iVh]` ` 0ʕz˴T0Gu/q8F13:W>#ȕ0c0Q8E=F#+a X͞+cV%9W>Q]TkY-gLqD艋 \ No newline at end of file diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/mask_5/mask_105_5.dat b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_5/mask_105_5.dat new file mode 100755 index 0000000..bc8798c Binary files /dev/null and b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_5/mask_105_5.dat differ diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/mask_5/mask_109_5.dat b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_5/mask_109_5.dat new file mode 100755 index 0000000..25a3944 Binary files /dev/null and b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_5/mask_109_5.dat differ diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/mask_5/mask_113_5.dat b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_5/mask_113_5.dat new file mode 100755 index 0000000..25f42b8 --- /dev/null +++ b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_5/mask_113_5.dat @@ -0,0 +1,9 @@ +x +0D^6I63[[EDqc+jy81\c +7c?u}DK4},kkg--3[UƂyUXUXSV:ϫ՝,|кS⫰ + + +Vɫ*X[* + + +zU*NV*JUXUXSXijTi4fZkU^_~Ux }ծZ/r \ No newline at end of file diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/mask_5/mask_117_5.dat b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_5/mask_117_5.dat new file mode 100755 index 0000000..f236940 --- /dev/null +++ b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_5/mask_117_5.dat @@ -0,0 +1 @@ +x D|Mn/*{M+pI_&m-ѾC32u?o-kgB7wc=U%yoRhӯșDo:ֶyRJkQ^aaaqOgiJ ;qOg)ӊ0 0 0 [vö>=>0 0 0 Ofz3=>0 0 0.3Z$׷8\pw4:Zp:qX 7 \ No newline at end of file diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/mask_5/mask_121_5.dat b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_5/mask_121_5.dat new file mode 100755 index 0000000..9bb5c41 Binary files /dev/null and b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_5/mask_121_5.dat differ diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/mask_5/mask_125_5.dat b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_5/mask_125_5.dat new file mode 100755 index 0000000..2161c50 --- /dev/null +++ b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_5/mask_125_5.dat @@ -0,0 +1,2 @@ +xA + E&fc;S$?؏Q4YahûyJ}9g==li.;nh_wz.qCWȧy uPk;<<<|*q, mkWqNl% yyyy^2䰅sX|aaaa3ϙ9lH<<<<̿웁[n`Tq8^vy \ No newline at end of file diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/mask_5/mask_129_5.dat b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_5/mask_129_5.dat new file mode 100755 index 0000000..f0c1d65 Binary files /dev/null and b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_5/mask_129_5.dat differ diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/mask_5/mask_133_5.dat b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_5/mask_133_5.dat new file mode 100755 index 0000000..46be8b0 --- /dev/null +++ b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_5/mask_133_5.dat @@ -0,0 +1,2 @@ +xA +0 DѽOcr]4%1mCTxΜ[Dv={FEϏq?ݿ9keѭ}'2^c4G:3=JK-F0`#Hw'#<{~Z4 :BG舻F0`G~:`#?#tw-`#?##t#F0r}Q}eR;M/k1mX=hsH"k M:3qOW}9ԖIH1G;- sڶ?[%M + v#;zg^3d}69Ψޙ@7҄#gv`;׳ީ\$wlv`v;ލ}7wߑa;vkA#gv`=N2wxgWӤ@n?c}SQ:Zd?+9vz)P \ No newline at end of file diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/mask_5/mask_141_5.dat b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_5/mask_141_5.dat new file mode 100755 index 0000000..60c1a8e Binary files /dev/null and b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_5/mask_141_5.dat differ diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/mask_5/mask_145_5.dat b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_5/mask_145_5.dat new file mode 100755 index 0000000..9303c07 Binary files /dev/null and b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_5/mask_145_5.dat differ diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/mask_5/mask_149_5.dat b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_5/mask_149_5.dat new file mode 100755 index 0000000..4256cef --- /dev/null +++ b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_5/mask_149_5.dat @@ -0,0 +1,3 @@ +x[ +0&c}-s+'^;Ax=Q_gUݏﵪxGTȺV¹UUE_IǴ;T1̠ +]W 2 2 |o5uꆬuI:(WKU躒rPAdAdA; vo_zNO{2rPA9 2 29}^O挞rwQdAdAnMA9(dAdA^W Z.+G^K`׵}`_Fk \ No newline at end of file diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/mask_5/mask_153_5.dat b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_5/mask_153_5.dat new file mode 100755 index 0000000..deea09d --- /dev/null +++ b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_5/mask_153_5.dat @@ -0,0 +1,2 @@ +x +@wfЬ`D"Ie<:au,7Of۳uP6~szs,jլcVZvߨm s^uHYu&l&l&_9 ;]^jsO;ܔrSn&l&l9yכzA rSnM6dM6dM6ރ@/$7ܔl&l&lzŽzACrSnM6dM6dOl7ᰚUuN֛FcPPS,l;HO \ No newline at end of file diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/mask_5/mask_157_5.dat b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_5/mask_157_5.dat new file mode 100755 index 0000000..176e2a6 --- /dev/null +++ b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_5/mask_157_5.dat @@ -0,0 +1 @@ +x10Dާri( r* \~>C*vs]Ŝ_{W!zﶬ/)˙v V6V޻,f1Yb n^o>\O],,b,f1YyVgYYYb,f1+ʳ<˳<˳1YbŬ<+ʳ,,b,f1YyVgYYYb,fukys77}vmb=wsw)tW: \ No newline at end of file diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/mask_5/mask_161_5.dat b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_5/mask_161_5.dat new file mode 100755 index 0000000..70d5fb0 --- /dev/null +++ b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_5/mask_161_5.dat @@ -0,0 +1,2 @@ +xI +@нDp@ o|m rHk㨤~co^Jzװ#5l¦S_92 [}ZÊ=T2ƀP2[cV衆CYf'-X9>v~usK5`e,2,2,2-///o_q}K\reYfeYf峖o+/,\feYfeYfٳexB.e2,2,̲g+l\r16,2,>ϰ=te&_4=tU}/>>>Or5/u>/g}g}gOsvO}/g}g}ٷGo-w{r_{g}g}g_n=n]4Nkβ_M8m?SF< \ No newline at end of file diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/mask_5/mask_173_5.dat b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_5/mask_173_5.dat new file mode 100755 index 0000000..f9a6741 --- /dev/null +++ b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_5/mask_173_5.dat @@ -0,0 +1,4 @@ +x[ +0&G1gD)[CzeDѷц=RN6FJm JqP}x s_}GFy; +[;]ek[QbTmy&0 L`̄Y?رw؛ fcVN9&0 L`ׄZ}0=F=F9ANL`&0 L`BzYfI=F9AN&0 L`&0 fIsr ' L`&0 L`<i͒"9AN&0 L`VaBX",Um> +=wZgBΜP !8 \ No newline at end of file diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/mask_5/mask_177_5.dat b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_5/mask_177_5.dat new file mode 100755 index 0000000..b07c636 --- /dev/null +++ b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_5/mask_177_5.dat @@ -0,0 +1,11 @@ +xъ0~ܾح uO,"% :$Xui=ѶՃgƸ?Ώq.So~z׉W:=h1cq]Ƕi!r8Ɓ`+X +V jj;8ƁX+ +oV`+X +V?[1^h-ֳ5Z;rmS+ +oV`+X +V;Z,YMB+ +V`+X +VZeڦ}r\!W`+X +V`+3Km>SB+ +V`+X +Vc㊛{g;^Qq5ZUݮQL0+*&YDq*6 \ No newline at end of file diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/mask_5/mask_21_5.dat b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_5/mask_21_5.dat new file mode 100755 index 0000000..04f97ea Binary files /dev/null and b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_5/mask_21_5.dat differ diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/mask_5/mask_25_5.dat b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_5/mask_25_5.dat new file mode 100755 index 0000000..c20b59b --- /dev/null +++ b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_5/mask_25_5.dat @@ -0,0 +1,2 @@ +xڝa +@!4 ޳ʢ ?,""j?n=GZy:DR \ No newline at end of file diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/mask_5/mask_33_5.dat b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_5/mask_33_5.dat new file mode 100755 index 0000000..726d7fd Binary files /dev/null and b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_5/mask_33_5.dat differ diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/mask_5/mask_37_5.dat b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_5/mask_37_5.dat new file mode 100755 index 0000000..6d32ca6 Binary files /dev/null and b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_5/mask_37_5.dat differ diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/mask_5/mask_41_5.dat b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_5/mask_41_5.dat new file mode 100755 index 0000000..e07c617 --- /dev/null +++ b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_5/mask_41_5.dat @@ -0,0 +1,2 @@ +xTA + 5?7XMtxҴx ?@7@~"N$Sɰ{+CA'r\Pp<ޏ- ͺ:S3sԉۻީz#qw > \ No newline at end of file diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/mask_5/mask_45_5.dat b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_5/mask_45_5.dat new file mode 100755 index 0000000..5168a17 --- /dev/null +++ b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_5/mask_45_5.dat @@ -0,0 +1 @@ +xUA 5?U:N&Z":;4P1=bNvSGM1˛n'(κ J{Eѵs] ,sq \ No newline at end of file diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/mask_5/mask_49_5.dat b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_5/mask_49_5.dat new file mode 100755 index 0000000..9f3f3cd Binary files /dev/null and b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_5/mask_49_5.dat differ diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/mask_5/mask_53_5.dat b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_5/mask_53_5.dat new file mode 100755 index 0000000..449807b --- /dev/null +++ b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_5/mask_53_5.dat @@ -0,0 +1 @@ +xVA " zYf5ƐJC A;l\,dR. \(e_ еaNi5\żaLP(;2שjN6O u+l{y6od^ C[%  \ No newline at end of file diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/mask_5/mask_57_5.dat b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_5/mask_57_5.dat new file mode 100755 index 0000000..c7dd81f --- /dev/null +++ b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_5/mask_57_5.dat @@ -0,0 +1,2 @@ +xVA + 5?NlZHAbBZ0a Md`1z'"<Ր19nvͨ. )bݻ~;9Z#tB~ \ No newline at end of file diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/mask_5/mask_65_5.dat b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_5/mask_65_5.dat new file mode 100755 index 0000000..ecd9380 Binary files /dev/null and b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_5/mask_65_5.dat differ diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/mask_5/mask_69_5.dat b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_5/mask_69_5.dat new file mode 100755 index 0000000..ead4edc Binary files /dev/null and b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_5/mask_69_5.dat differ diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/mask_5/mask_73_5.dat b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_5/mask_73_5.dat new file mode 100755 index 0000000..0000117 Binary files /dev/null and b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_5/mask_73_5.dat differ diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/mask_5/mask_77_5.dat b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_5/mask_77_5.dat new file mode 100755 index 0000000..1652cdc --- /dev/null +++ b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_5/mask_77_5.dat @@ -0,0 +1 @@ +xQ Cw#&C`T6ƹB(9 'ֆڢzk"hv.` cXB5[(F>71/34Ϊz^'[FyglgM>OTL4ϔ{&3Wy*ʧb*`<3;Vo0/s6n0ya[mcE \ No newline at end of file diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/mask_5/mask_81_5.dat b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_5/mask_81_5.dat new file mode 100755 index 0000000..71215e9 --- /dev/null +++ b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_5/mask_81_5.dat @@ -0,0 +1,3 @@ +x + C~M?tzU4" }tMX2|.ɋ˙F\~m4Xu +ٔ, w:EƄ>X̯=_]g>>zמ/)5ךkkkZsXXY{ܮ}~mt:S#&;U#) \ No newline at end of file diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/mask_5/mask_85_5.dat b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_5/mask_85_5.dat new file mode 100755 index 0000000..09cf0e2 Binary files /dev/null and b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_5/mask_85_5.dat differ diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/mask_5/mask_89_5.dat b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_5/mask_89_5.dat new file mode 100755 index 0000000..5fff530 --- /dev/null +++ b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_5/mask_89_5.dat @@ -0,0 +1,2 @@ +x + 45enpQ Gcfl^^;;b5;`kU͹߮j`NsO=\[a6~nLD? !6uF%w*Ȭkf77SĆbÆXodw_—mbClNۙ ck&YVoܡ׷BעبAl6 Jjx \ No newline at end of file diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/mask_5/mask_93_5.dat b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_5/mask_93_5.dat new file mode 100755 index 0000000..ec4240b --- /dev/null +++ b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_5/mask_93_5.dat @@ -0,0 +1,2 @@ +xK +0 D>&&  fP^8BY5s(imҮ=f3/wۧEyYQwf[} [90303ef̙3'3=,ͼwxDַ.,;s%g,,,=Rὓ7uKKTD<(n lYhV۹sޕyPEtyY]ns ;ss,!LkԅcbL12cX91Z#XEn#;svT~L~LR11vs.1111J1&؍Ń111J1&ƞg KLƪjlk{gڞ5K1/ǐ~,ac$ \ No newline at end of file diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/mask_6/mask_105_6.dat b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_6/mask_105_6.dat new file mode 100755 index 0000000..a58fec7 --- /dev/null +++ b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_6/mask_105_6.dat @@ -0,0 +1,3 @@ +xQ +@ DskBZ#o)Sd}Gܷl쯯^)G]S4S?#BZ:+{sHKNiI!me1 +RWe9!``Uyˀu:檞U=w-oԺwB}cMK蹰{{=y蹰{{=y蹰{wScaoi'fyO=CyO=Cy[{S޻=;|v4}ϯ20 \ No newline at end of file diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/mask_6/mask_109_6.dat b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_6/mask_109_6.dat new file mode 100755 index 0000000..be7b474 --- /dev/null +++ b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_6/mask_109_6.dat @@ -0,0 +1 @@ +xA0 ~ρDBHCHV20nuol쯯˻=ۢs9[l'?7R" &2:7QqX_n ]$՚EIY*Lq0 0 0{LJз(s\ɳwX-7^ItIII$~?N0 0 0O'Itg7L$L-Iuzrfr M^'}(O~R]1YLĞu9Qӕ \ No newline at end of file diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/mask_6/mask_113_6.dat b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_6/mask_113_6.dat new file mode 100755 index 0000000..397f527 --- /dev/null +++ b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_6/mask_113_6.dat @@ -0,0 +1,3 @@ +x E5NՉbF6on,m>gS9RWcǕ9&%1_cx= GR^w-z?dzv=,}ԥ?ǹژ:9m==@U䲉UXUXVe~by4Wi:e=ɼÆ$<>Ov'Cytaaaa~|'9liΣ<<<<Iæ<:<<<ٕWDzy:.z= ݓʯ sVöE=ll_k0_#vίmj \ No newline at end of file diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/mask_6/mask_129_6.dat b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_6/mask_129_6.dat new file mode 100755 index 0000000..b4695c3 Binary files /dev/null and b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_6/mask_129_6.dat differ diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/mask_6/mask_133_6.dat b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_6/mask_133_6.dat new file mode 100755 index 0000000..40911dc Binary files /dev/null and b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_6/mask_133_6.dat differ diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/mask_6/mask_137_6.dat b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_6/mask_137_6.dat new file mode 100755 index 0000000..43ccb68 --- /dev/null +++ b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_6/mask_137_6.dat @@ -0,0 +1,2 @@ +x E5?e^4fHp[1-e)UQV]UWN5o*8|۩W6bk?{f|>s֪r666rҟ=vڲWy -' +Ο;q tQE>U϶f곭xN]Tc(s❮7tAw`v`v`v`kvwfwt;];;;;;!ޙ;ao];l;;;÷| ʷ(3}l.?"މr};\}S-Aw<9;EV'ם \ No newline at end of file diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/mask_6/mask_141_6.dat b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_6/mask_141_6.dat new file mode 100755 index 0000000..0340409 --- /dev/null +++ b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_6/mask_141_6.dat @@ -0,0 +1,10 @@ +xa F4/c]زȐ[=[E럓sm,fn/|kj\j?g[q(NOZc5SGGP[oMVָfvL<WóCaz6U~һ{`nݻdvVy~rZ"qk{>g$XKU}m\bjaGx,f1Yb]z̞^.5[?嬜r,f1YY>grVb,f1Y>g,rVmYb,f,|VY9Yb,f,|VY9+g1Ybً ̦M7>2{9z϶hm3l|9xټ#f#x6 -v%N' \ No newline at end of file diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/mask_6/mask_161_6.dat b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_6/mask_161_6.dat new file mode 100755 index 0000000..ecec68b Binary files /dev/null and b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_6/mask_161_6.dat differ diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/mask_6/mask_165_6.dat b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_6/mask_165_6.dat new file mode 100755 index 0000000..d641dfa Binary files /dev/null and b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_6/mask_165_6.dat differ diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/mask_6/mask_169_6.dat b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_6/mask_169_6.dat new file mode 100755 index 0000000..ae68972 --- /dev/null +++ b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_6/mask_169_6.dat @@ -0,0 +1 @@ +xJ0i9[Jɘk{1b!gnhHkS뉭-V?KIׁ1큏1ƣݎ/`/z)*=3ڏg6^k65CY>㵾+'{է_Vˊx-J<ӛܗr_>>i;rO}/g}g}ٿ}}xO}/g}g}ٷGo/{{r_>>o/z^#}g}ٿd'ʳ|QRNS3YڳZ'msEǷj5 \ No newline at end of file diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/mask_6/mask_173_6.dat b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_6/mask_173_6.dat new file mode 100755 index 0000000..95fa97c --- /dev/null +++ b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_6/mask_173_6.dat @@ -0,0 +1 @@ +xa09MrM S*:a_-5hh_)uZ֭[loےsmKN{H?x`l#f9>ڟ[eЄώߓ ?^m*/Kmhy%v-nKlkKL`&& g5(gwxYܞa¬pVcZ[#O=SN9&0 L`DŽ 'tjj]QN9&0 L`sYRc@QN9 L`&0 L`"YRc\ ' r&0 L`EH9AN&0 L`& 7p6`|hms R5Ƙȉ k\X/ )g9 \ No newline at end of file diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/mask_6/mask_177_6.dat b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_6/mask_177_6.dat new file mode 100755 index 0000000..e9f0476 --- /dev/null +++ b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_6/mask_177_6.dat @@ -0,0 +1,14 @@ +xn {ڤ*4v۴u1{f{_,,K9o 4ǵ7lniJiggir<-MG + + + +xuV+zRCr9+Gq6QWb"Qe"WL+ + XXXXX/|~j,nmuMۤ+ + XXXXXYa,X;M+ + XXXXXe)oӘf|5H늚7/D \ No newline at end of file diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/mask_6/mask_21_6.dat b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_6/mask_21_6.dat new file mode 100755 index 0000000..6bd505b --- /dev/null +++ b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_6/mask_21_6.dat @@ -0,0 +1 @@ +xڝQ C9M{i]X1- C!D7 W ٜ&rD)~]<M 3(>{A aS \ No newline at end of file diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/mask_6/mask_25_6.dat b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_6/mask_25_6.dat new file mode 100755 index 0000000..d45083a --- /dev/null +++ b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_6/mask_25_6.dat @@ -0,0 +1 @@ +xڝQA 52)e+(XmZt*(ڹ;tJ<峂_ڤ3oڴ"̢azh}&qvSG֙,-J4}oS[}w \ No newline at end of file diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/mask_6/mask_29_6.dat b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_6/mask_29_6.dat new file mode 100755 index 0000000..0408e22 --- /dev/null +++ b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_6/mask_29_6.dat @@ -0,0 +1,3 @@ +xRA +0 XcL(4EԈB +8Cܾ޳nM+lǝՆO1]&ڍ4UD-6-$:6dZ?ylf? 8?߲_ݏ`8G1`B`;+}&s]<iK'l'9%.7 \ No newline at end of file diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/mask_6/mask_65_6.dat b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_6/mask_65_6.dat new file mode 100755 index 0000000..550fc8f --- /dev/null +++ b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_6/mask_65_6.dat @@ -0,0 +1 @@ +xWQ i{KNLk?e$Qik41{`+!ڮM ? 1b8 .^wsnFj5EaQX|=w@2v<ŋŞ|4w\UXBQz+TTcBz/48,5`ȱ OV$ \ No newline at end of file diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/mask_6/mask_69_6.dat b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_6/mask_69_6.dat new file mode 100755 index 0000000..a3e4fa0 --- /dev/null +++ b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_6/mask_69_6.dat @@ -0,0 +1 @@ +xK @dTh hLSSEq eY@<+*|窮 %>z*7e6QS`.>sE '%@[6@P0h aFxtpl2 Q-g1Nfeo^0FdT>N_OwG3ug {3<[Ժ b?'6^ \ No newline at end of file diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/mask_6/mask_73_6.dat b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_6/mask_73_6.dat new file mode 100755 index 0000000..ab71b70 Binary files /dev/null and b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_6/mask_73_6.dat differ diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/mask_6/mask_77_6.dat b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_6/mask_77_6.dat new file mode 100755 index 0000000..ad5a660 --- /dev/null +++ b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_6/mask_77_6.dat @@ -0,0 +1 @@ +x E۲iVa.FpSTY4q~z=:͒ 6m8:#0PضiDy:2Š'Zs&}滜\r0\ŚXw;iPȔL)Seԕ{hDu9LbJSS))gZ{e)qJdLw+#3-V0շljڠS-S 9=ݯ5PPq1M?g \ No newline at end of file diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/mask_6/mask_81_6.dat b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_6/mask_81_6.dat new file mode 100755 index 0000000..28a6d07 --- /dev/null +++ b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_6/mask_81_6.dat @@ -0,0 +1,3 @@ +xQ0D9 rRLvk`0 ;i6\|_cc1huio#2}x*.Yt& +ְq/K;3ve̢ȊAH?`]5Kw!}{Zû߲W +yⷾ^_ykk^Kתb-bYSڸ'֜Nu#MfHSQ?|]IAiMyyuW \ No newline at end of file diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/mask_6/mask_85_6.dat b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_6/mask_85_6.dat new file mode 100755 index 0000000..d5403e4 Binary files /dev/null and b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_6/mask_85_6.dat differ diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/mask_6/mask_89_6.dat b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_6/mask_89_6.dat new file mode 100755 index 0000000..eeeb5d1 Binary files /dev/null and b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_6/mask_89_6.dat differ diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/mask_6/mask_93_6.dat b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_6/mask_93_6.dat new file mode 100755 index 0000000..6ff38db Binary files /dev/null and b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_6/mask_93_6.dat differ diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/mask_6/mask_97_6.dat b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_6/mask_97_6.dat new file mode 100755 index 0000000..3a2072e --- /dev/null +++ b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_6/mask_97_6.dat @@ -0,0 +1,2 @@ +xa0sdFx[=4Hoj34&s}* a Vc&35arW^aLClzq,1x SQN]/Giu`&w%,%DY"Kt+HE'|R2(v1vqiqd,%D~%ػJj}ͺĺgY"Kd,+K +]Wt+sF/)].zN'`>1='#`+bl]Z \ No newline at end of file diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/mask_7/mask_101_7.dat b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_7/mask_101_7.dat new file mode 100755 index 0000000..1f6bc51 --- /dev/null +++ b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_7/mask_101_7.dat @@ -0,0 +1 @@ +xQ C}rm`fjT#54'tfaЇo$cmOJ23c<6Xn0F ) \ No newline at end of file diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/mask_7/mask_105_7.dat b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_7/mask_105_7.dat new file mode 100755 index 0000000..6b0cacf --- /dev/null +++ b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_7/mask_105_7.dat @@ -0,0 +1,2 @@ +xA +0EFaMҙNPx)pQ_~|ñ(bF$.aoWGNPUǖM%{oHQUlִL^>+m#{{eo&Y2soM)gncO9sZ3wo+{=f.zޣ{{=zGcskCQϞp^&{^NʷU e5}EwGn+o \ No newline at end of file diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/mask_7/mask_109_7.dat b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_7/mask_109_7.dat new file mode 100755 index 0000000..9875cbe --- /dev/null +++ b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_7/mask_109_7.dat @@ -0,0 +1,2 @@ +xA +0 D9Mr}* _x-d:"NJ-k"⨚d{ջגɬ|'rQ5+ s)c7-1nn햺qɔJtg^ʉw̘Ň-?*&Mm@ee5^ +c + +,b\13j4TZfŢo* + + +:Ut* + + +Xů0"%6ed 8rS NsUnk5XejުuVXg,l`u!hXZ\VlM|[ͬ0 0 0 #hF'c]i>Hataaa~<ÆzyqkO0 0 0 㪞Faaa)2˰fÒ%z8tO=3=3:cw +V$ \ No newline at end of file diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/mask_7/mask_121_7.dat b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_7/mask_121_7.dat new file mode 100755 index 0000000..d5d577f --- /dev/null +++ b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_7/mask_121_7.dat @@ -0,0 +1,2 @@ +x[ + Edi;^az,#6ƞ^rh&^amY9_غ5Cr6t^^WlEز~ɿ|MmmS}( ۰ ۰ ۰}mQ]ZVq]vѲ"M1fG, qBmtaaazeF3cxIDmtaaamný$n۰ ۰ ۰ ۏa[}`[yޖ޻)n<4K/Oslnlm/G \ No newline at end of file diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/mask_7/mask_125_7.dat b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_7/mask_125_7.dat new file mode 100755 index 0000000..f9ec088 Binary files /dev/null and b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_7/mask_125_7.dat differ diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/mask_7/mask_129_7.dat b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_7/mask_129_7.dat new file mode 100755 index 0000000..9bf51d5 Binary files /dev/null and b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_7/mask_129_7.dat differ diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/mask_7/mask_133_7.dat b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_7/mask_133_7.dat new file mode 100755 index 0000000..b643ffe Binary files /dev/null and b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_7/mask_133_7.dat differ diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/mask_7/mask_137_7.dat b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_7/mask_137_7.dat new file mode 100755 index 0000000..11d212b --- /dev/null +++ b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_7/mask_137_7.dat @@ -0,0 +1,5 @@ +x + F4/ c_ǂ+{SK<o[l +Ο +07։Vl;b7fMS;1LCvR|KMH +#Н(Sqd \ No newline at end of file diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/mask_7/mask_141_7.dat b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_7/mask_141_7.dat new file mode 100755 index 0000000..98dffab --- /dev/null +++ b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_7/mask_141_7.dat @@ -0,0 +1 @@ +xA E= rITY@Ä0!|1tbG0ԗѤs2Z/oa\qzOnҋMntX"KmeM}CpPL^S0S0S0SL )ǔژY߾%b,Sl?zC)tLLLLI2zRXh@)tLLLLI1zbϷB)~0S0S0S07)|B)))3ՖL% tfwM*:~hZsnc$1UTtJg8OYE \ No newline at end of file diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/mask_7/mask_145_7.dat b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_7/mask_145_7.dat new file mode 100755 index 0000000..4aa2bac --- /dev/null +++ b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_7/mask_145_7.dat @@ -0,0 +1,2 @@ +x + E5?W6Z-^2qbGX6(Ɖu"LbbGuμGk:HwA[jmHݞ3OkQ{l|TEm JfL?2"&)kRfc̉F,z=5X5X5X7F\pUs#5X5X5XFdYk!a ` ` `o8ct ]CC gM5[N%khZp?Iܣϲ^n$Y7AZP[ fȓ0 \ No newline at end of file diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/mask_7/mask_149_7.dat b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_7/mask_149_7.dat new file mode 100755 index 0000000..809f005 --- /dev/null +++ b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_7/mask_149_7.dat @@ -0,0 +1 @@ +xn {? uچ2G$ncFKb3֪tPc ̥7[?9:['9'*Ӗ Gah_/z+6XB>2qYJ0黏Bfa 1 9c7G Ol,^꽓3A:H  1A b0X4%٫#d>&C  1A b+g嬜,f1Yb|Y>+g嬜,f1Ylio.\Ɲo=gϙ-yk_TA \ No newline at end of file diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/mask_7/mask_161_7.dat b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_7/mask_161_7.dat new file mode 100755 index 0000000..35ba8ff --- /dev/null +++ b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_7/mask_161_7.dat @@ -0,0 +1 @@ +xю y/皨E)Ʈ1~493,˵+ZT=ZeC.~iߏ&>,6e~,lW] 2\;׵2j"e,rXݵV(c쵵ZӖ18ީ/,'t.ee,cX2߱,_|yt|]t.cX2e,cy/ɗys.eLe,cX2lo|Z{+2]bl,cX2e{+֊[A2]X2e,c9CX;QIQH8R҈G"z,&;'o97%P8%6oǽ;]NWn[f7v \ No newline at end of file diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/mask_7/mask_29_7.dat b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_7/mask_29_7.dat new file mode 100755 index 0000000..e3d7391 --- /dev/null +++ b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_7/mask_29_7.dat @@ -0,0 +1,2 @@ +xR9 QpX$lŲf!I2pgSMZj"te0#ԛ`_1-cha~/Eh4"~ \ No newline at end of file diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/mask_7/mask_37_7.dat b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_7/mask_37_7.dat new file mode 100755 index 0000000..87d9a1a Binary files /dev/null and b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_7/mask_37_7.dat differ diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/mask_7/mask_41_7.dat b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_7/mask_41_7.dat new file mode 100755 index 0000000..8acec04 --- /dev/null +++ b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_7/mask_41_7.dat @@ -0,0 +1 @@ +xTA 5[fDY(O^bR3/~t/L"7SQQ5j\Sib#Նȏ+ǣw#zx?㽧A-wu曑Y7$b.%A;wRoxG}? \ No newline at end of file diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/mask_7/mask_45_7.dat b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_7/mask_45_7.dat new file mode 100755 index 0000000..dbba31d Binary files /dev/null and b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_7/mask_45_7.dat differ diff --git a/vendor/crowdfunding2/lib/phpqrcode/cache/mask_7/mask_49_7.dat b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_7/mask_49_7.dat new file mode 100755 index 0000000..be5dce8 --- /dev/null +++ b/vendor/crowdfunding2/lib/phpqrcode/cache/mask_7/mask_49_7.dat @@ -0,0 +1 @@ +xV0khC-X.ukv o40T%96U5*sI{`_>S?}(:yTl{G&E\6}"AX XϬback'); + + // user data + $filename = $PNG_TEMP_DIR.'test'.md5($_REQUEST['data'].'|'.$errorCorrectionLevel.'|'.$matrixPointSize).'.png'; + QRcode::png($_REQUEST['data'], $filename, $errorCorrectionLevel, $matrixPointSize, 2); + + } else { + + //default data + echo 'You can provide data in GET parameter: like that
'; + QRcode::png('PHP QR Code :)', $filename, $errorCorrectionLevel, $matrixPointSize, 2); + + } + + //display generated file + echo '
'; + + //config form + echo '
+ Data:   + ECC:   + Size:   +

'; + + // benchmark + QRtools::timeBenchmark(); + + \ No newline at end of file diff --git a/vendor/crowdfunding2/lib/phpqrcode/phpqrcode.php b/vendor/crowdfunding2/lib/phpqrcode/phpqrcode.php new file mode 100755 index 0000000..7f53c48 --- /dev/null +++ b/vendor/crowdfunding2/lib/phpqrcode/phpqrcode.php @@ -0,0 +1,3625 @@ + + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ + + + +/* + * Version: 1.1.4 + * Build: 2010100721 + */ + + + +//---- qrconst.php ----------------------------- + + + + + +/* + * PHP QR Code encoder + * + * Common constants + * + * Based on libqrencode C library distributed under LGPL 2.1 + * Copyright (C) 2006, 2007, 2008, 2009 Kentaro Fukuchi + * + * PHP QR Code is distributed under LGPL 3 + * Copyright (C) 2010 Dominik Dzienia + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ + + // Encoding modes + + define('QR_MODE_NUL', -1); + define('QR_MODE_NUM', 0); + define('QR_MODE_AN', 1); + define('QR_MODE_8', 2); + define('QR_MODE_KANJI', 3); + define('QR_MODE_STRUCTURE', 4); + + // Levels of error correction. + + define('QR_ECLEVEL_L', 0); + define('QR_ECLEVEL_M', 1); + define('QR_ECLEVEL_Q', 2); + define('QR_ECLEVEL_H', 3); + + // Supported output formats + + define('QR_FORMAT_TEXT', 0); + define('QR_FORMAT_PNG', 1); + + class qrstr { + public static function set(&$srctab, $x, $y, $repl, $replLen = false) { + $srctab[$y] = substr_replace($srctab[$y], ($replLen !== false)?substr($repl,0,$replLen):$repl, $x, ($replLen !== false)?$replLen:strlen($repl)); + } + } + + + +//---- merged_config.php ----------------------------- + + + + +/* + * PHP QR Code encoder + * + * Config file, tuned-up for merged verion + */ + + define('QR_CACHEABLE', false); // use cache - more disk reads but less CPU power, masks and format templates are stored there + define('QR_CACHE_DIR', false); // used when QR_CACHEABLE === true + define('QR_LOG_DIR', false); // default error logs dir + + define('QR_FIND_BEST_MASK', true); // if true, estimates best mask (spec. default, but extremally slow; set to false to significant performance boost but (propably) worst quality code + define('QR_FIND_FROM_RANDOM', 2); // if false, checks all masks available, otherwise value tells count of masks need to be checked, mask id are got randomly + define('QR_DEFAULT_MASK', 2); // when QR_FIND_BEST_MASK === false + + define('QR_PNG_MAXIMUM_SIZE', 1024); // maximum allowed png image width (in pixels), tune to make sure GD and PHP can handle such big images + + + + +//---- qrtools.php ----------------------------- + + + + +/* + * PHP QR Code encoder + * + * Toolset, handy and debug utilites. + * + * PHP QR Code is distributed under LGPL 3 + * Copyright (C) 2010 Dominik Dzienia + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ + + class QRtools { + + //---------------------------------------------------------------------- + public static function binarize($frame) + { + $len = count($frame); + foreach ($frame as &$frameLine) { + + for($i=0; $i<$len; $i++) { + $frameLine[$i] = (ord($frameLine[$i])&1)?'1':'0'; + } + } + + return $frame; + } + + //---------------------------------------------------------------------- + public static function tcpdfBarcodeArray($code, $mode = 'QR,L', $tcPdfVersion = '4.5.037') + { + $barcode_array = array(); + + if (!is_array($mode)) + $mode = explode(',', $mode); + + $eccLevel = 'L'; + + if (count($mode) > 1) { + $eccLevel = $mode[1]; + } + + $qrTab = QRcode::text($code, false, $eccLevel); + $size = count($qrTab); + + $barcode_array['num_rows'] = $size; + $barcode_array['num_cols'] = $size; + $barcode_array['bcode'] = array(); + + foreach ($qrTab as $line) { + $arrAdd = array(); + foreach(str_split($line) as $char) + $arrAdd[] = ($char=='1')?1:0; + $barcode_array['bcode'][] = $arrAdd; + } + + return $barcode_array; + } + + //---------------------------------------------------------------------- + public static function clearCache() + { + self::$frames = array(); + } + + //---------------------------------------------------------------------- + public static function buildCache() + { + QRtools::markTime('before_build_cache'); + + $mask = new QRmask(); + for ($a=1; $a <= QRSPEC_VERSION_MAX; $a++) { + $frame = QRspec::newFrame($a); + if (QR_IMAGE) { + $fileName = QR_CACHE_DIR.'frame_'.$a.'.png'; + QRimage::png(self::binarize($frame), $fileName, 1, 0); + } + + $width = count($frame); + $bitMask = array_fill(0, $width, array_fill(0, $width, 0)); + for ($maskNo=0; $maskNo<8; $maskNo++) + $mask->makeMaskNo($maskNo, $width, $frame, $bitMask, true); + } + + QRtools::markTime('after_build_cache'); + } + + //---------------------------------------------------------------------- + public static function log($outfile, $err) + { + if (QR_LOG_DIR !== false) { + if ($err != '') { + if ($outfile !== false) { + file_put_contents(QR_LOG_DIR.basename($outfile).'-errors.txt', date('Y-m-d H:i:s').': '.$err, FILE_APPEND); + } else { + file_put_contents(QR_LOG_DIR.'errors.txt', date('Y-m-d H:i:s').': '.$err, FILE_APPEND); + } + } + } + } + + //---------------------------------------------------------------------- + public static function dumpMask($frame) + { + $width = count($frame); + for($y=0;$y<$width;$y++) { + for($x=0;$x<$width;$x++) { + echo ord($frame[$y][$x]).','; + } + } + } + + //---------------------------------------------------------------------- + public static function markTime($markerId) + { + list($usec, $sec) = explode(" ", microtime()); + $time = ((float)$usec + (float)$sec); + + if (!isset($GLOBALS['qr_time_bench'])) + $GLOBALS['qr_time_bench'] = array(); + + $GLOBALS['qr_time_bench'][$markerId] = $time; + } + + //---------------------------------------------------------------------- + public static function timeBenchmark() + { + self::markTime('finish'); + + $lastTime = 0; + $startTime = 0; + $p = 0; + + echo ' + + '; + + foreach($GLOBALS['qr_time_bench'] as $markerId=>$thisTime) { + if ($p > 0) { + echo ''; + } else { + $startTime = $thisTime; + } + + $p++; + $lastTime = $thisTime; + } + + echo ' + + +
BENCHMARK
till '.$markerId.': '.number_format($thisTime-$lastTime, 6).'s
TOTAL: '.number_format($lastTime-$startTime, 6).'s
'; + } + + public static function save($content, $filename_path) + { + try { + $handle = fopen($filename_path, "w"); + fwrite($handle, $content); + fclose($handle); + return true; + } catch (Exception $e) { + echo 'Exception reçue : ', $e->getMessage(), "\n"; + } + + } + + } + + //########################################################################## + + QRtools::markTime('start'); + + + + +//---- qrspec.php ----------------------------- + + + + +/* + * PHP QR Code encoder + * + * QR Code specifications + * + * Based on libqrencode C library distributed under LGPL 2.1 + * Copyright (C) 2006, 2007, 2008, 2009 Kentaro Fukuchi + * + * PHP QR Code is distributed under LGPL 3 + * Copyright (C) 2010 Dominik Dzienia + * + * The following data / specifications are taken from + * "Two dimensional symbol -- QR-code -- Basic Specification" (JIS X0510:2004) + * or + * "Automatic identification and data capture techniques -- + * QR Code 2005 bar code symbology specification" (ISO/IEC 18004:2006) + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ + + define('QRSPEC_VERSION_MAX', 40); + define('QRSPEC_WIDTH_MAX', 177); + + define('QRCAP_WIDTH', 0); + define('QRCAP_WORDS', 1); + define('QRCAP_REMINDER', 2); + define('QRCAP_EC', 3); + + class QRspec { + + public static $capacity = array( + array( 0, 0, 0, array( 0, 0, 0, 0)), + array( 21, 26, 0, array( 7, 10, 13, 17)), // 1 + array( 25, 44, 7, array( 10, 16, 22, 28)), + array( 29, 70, 7, array( 15, 26, 36, 44)), + array( 33, 100, 7, array( 20, 36, 52, 64)), + array( 37, 134, 7, array( 26, 48, 72, 88)), // 5 + array( 41, 172, 7, array( 36, 64, 96, 112)), + array( 45, 196, 0, array( 40, 72, 108, 130)), + array( 49, 242, 0, array( 48, 88, 132, 156)), + array( 53, 292, 0, array( 60, 110, 160, 192)), + array( 57, 346, 0, array( 72, 130, 192, 224)), //10 + array( 61, 404, 0, array( 80, 150, 224, 264)), + array( 65, 466, 0, array( 96, 176, 260, 308)), + array( 69, 532, 0, array( 104, 198, 288, 352)), + array( 73, 581, 3, array( 120, 216, 320, 384)), + array( 77, 655, 3, array( 132, 240, 360, 432)), //15 + array( 81, 733, 3, array( 144, 280, 408, 480)), + array( 85, 815, 3, array( 168, 308, 448, 532)), + array( 89, 901, 3, array( 180, 338, 504, 588)), + array( 93, 991, 3, array( 196, 364, 546, 650)), + array( 97, 1085, 3, array( 224, 416, 600, 700)), //20 + array(101, 1156, 4, array( 224, 442, 644, 750)), + array(105, 1258, 4, array( 252, 476, 690, 816)), + array(109, 1364, 4, array( 270, 504, 750, 900)), + array(113, 1474, 4, array( 300, 560, 810, 960)), + array(117, 1588, 4, array( 312, 588, 870, 1050)), //25 + array(121, 1706, 4, array( 336, 644, 952, 1110)), + array(125, 1828, 4, array( 360, 700, 1020, 1200)), + array(129, 1921, 3, array( 390, 728, 1050, 1260)), + array(133, 2051, 3, array( 420, 784, 1140, 1350)), + array(137, 2185, 3, array( 450, 812, 1200, 1440)), //30 + array(141, 2323, 3, array( 480, 868, 1290, 1530)), + array(145, 2465, 3, array( 510, 924, 1350, 1620)), + array(149, 2611, 3, array( 540, 980, 1440, 1710)), + array(153, 2761, 3, array( 570, 1036, 1530, 1800)), + array(157, 2876, 0, array( 570, 1064, 1590, 1890)), //35 + array(161, 3034, 0, array( 600, 1120, 1680, 1980)), + array(165, 3196, 0, array( 630, 1204, 1770, 2100)), + array(169, 3362, 0, array( 660, 1260, 1860, 2220)), + array(173, 3532, 0, array( 720, 1316, 1950, 2310)), + array(177, 3706, 0, array( 750, 1372, 2040, 2430)) //40 + ); + + //---------------------------------------------------------------------- + public static function getDataLength($version, $level) + { + return self::$capacity[$version][QRCAP_WORDS] - self::$capacity[$version][QRCAP_EC][$level]; + } + + //---------------------------------------------------------------------- + public static function getECCLength($version, $level) + { + return self::$capacity[$version][QRCAP_EC][$level]; + } + + //---------------------------------------------------------------------- + public static function getWidth($version) + { + return self::$capacity[$version][QRCAP_WIDTH]; + } + + //---------------------------------------------------------------------- + public static function getRemainder($version) + { + return self::$capacity[$version][QRCAP_REMINDER]; + } + + //---------------------------------------------------------------------- + public static function getMinimumVersion($size, $level) + { + + for($i=1; $i<= QRSPEC_VERSION_MAX; $i++) { + $words = self::$capacity[$i][QRCAP_WORDS] - self::$capacity[$i][QRCAP_EC][$level]; + if($words >= $size) + return $i; + } + + return -1; + } + + //###################################################################### + + public static $lengthTableBits = array( + array(10, 12, 14), + array( 9, 11, 13), + array( 8, 16, 16), + array( 8, 10, 12) + ); + + //---------------------------------------------------------------------- + public static function lengthIndicator($mode, $version) + { + if ($mode == QR_MODE_STRUCTURE) + return 0; + + if ($version <= 9) { + $l = 0; + } else if ($version <= 26) { + $l = 1; + } else { + $l = 2; + } + + return self::$lengthTableBits[$mode][$l]; + } + + //---------------------------------------------------------------------- + public static function maximumWords($mode, $version) + { + if($mode == QR_MODE_STRUCTURE) + return 3; + + if($version <= 9) { + $l = 0; + } else if($version <= 26) { + $l = 1; + } else { + $l = 2; + } + + $bits = self::$lengthTableBits[$mode][$l]; + $words = (1 << $bits) - 1; + + if($mode == QR_MODE_KANJI) { + $words *= 2; // the number of bytes is required + } + + return $words; + } + + // Error correction code ----------------------------------------------- + // Table of the error correction code (Reed-Solomon block) + // See Table 12-16 (pp.30-36), JIS X0510:2004. + + public static $eccTable = array( + array(array( 0, 0), array( 0, 0), array( 0, 0), array( 0, 0)), + array(array( 1, 0), array( 1, 0), array( 1, 0), array( 1, 0)), // 1 + array(array( 1, 0), array( 1, 0), array( 1, 0), array( 1, 0)), + array(array( 1, 0), array( 1, 0), array( 2, 0), array( 2, 0)), + array(array( 1, 0), array( 2, 0), array( 2, 0), array( 4, 0)), + array(array( 1, 0), array( 2, 0), array( 2, 2), array( 2, 2)), // 5 + array(array( 2, 0), array( 4, 0), array( 4, 0), array( 4, 0)), + array(array( 2, 0), array( 4, 0), array( 2, 4), array( 4, 1)), + array(array( 2, 0), array( 2, 2), array( 4, 2), array( 4, 2)), + array(array( 2, 0), array( 3, 2), array( 4, 4), array( 4, 4)), + array(array( 2, 2), array( 4, 1), array( 6, 2), array( 6, 2)), //10 + array(array( 4, 0), array( 1, 4), array( 4, 4), array( 3, 8)), + array(array( 2, 2), array( 6, 2), array( 4, 6), array( 7, 4)), + array(array( 4, 0), array( 8, 1), array( 8, 4), array(12, 4)), + array(array( 3, 1), array( 4, 5), array(11, 5), array(11, 5)), + array(array( 5, 1), array( 5, 5), array( 5, 7), array(11, 7)), //15 + array(array( 5, 1), array( 7, 3), array(15, 2), array( 3, 13)), + array(array( 1, 5), array(10, 1), array( 1, 15), array( 2, 17)), + array(array( 5, 1), array( 9, 4), array(17, 1), array( 2, 19)), + array(array( 3, 4), array( 3, 11), array(17, 4), array( 9, 16)), + array(array( 3, 5), array( 3, 13), array(15, 5), array(15, 10)), //20 + array(array( 4, 4), array(17, 0), array(17, 6), array(19, 6)), + array(array( 2, 7), array(17, 0), array( 7, 16), array(34, 0)), + array(array( 4, 5), array( 4, 14), array(11, 14), array(16, 14)), + array(array( 6, 4), array( 6, 14), array(11, 16), array(30, 2)), + array(array( 8, 4), array( 8, 13), array( 7, 22), array(22, 13)), //25 + array(array(10, 2), array(19, 4), array(28, 6), array(33, 4)), + array(array( 8, 4), array(22, 3), array( 8, 26), array(12, 28)), + array(array( 3, 10), array( 3, 23), array( 4, 31), array(11, 31)), + array(array( 7, 7), array(21, 7), array( 1, 37), array(19, 26)), + array(array( 5, 10), array(19, 10), array(15, 25), array(23, 25)), //30 + array(array(13, 3), array( 2, 29), array(42, 1), array(23, 28)), + array(array(17, 0), array(10, 23), array(10, 35), array(19, 35)), + array(array(17, 1), array(14, 21), array(29, 19), array(11, 46)), + array(array(13, 6), array(14, 23), array(44, 7), array(59, 1)), + array(array(12, 7), array(12, 26), array(39, 14), array(22, 41)), //35 + array(array( 6, 14), array( 6, 34), array(46, 10), array( 2, 64)), + array(array(17, 4), array(29, 14), array(49, 10), array(24, 46)), + array(array( 4, 18), array(13, 32), array(48, 14), array(42, 32)), + array(array(20, 4), array(40, 7), array(43, 22), array(10, 67)), + array(array(19, 6), array(18, 31), array(34, 34), array(20, 61)),//40 + ); + + //---------------------------------------------------------------------- + // CACHEABLE!!! + + public static function getEccSpec($version, $level, array &$spec) + { + if (count($spec) < 5) { + $spec = array(0,0,0,0,0); + } + + $b1 = self::$eccTable[$version][$level][0]; + $b2 = self::$eccTable[$version][$level][1]; + $data = self::getDataLength($version, $level); + $ecc = self::getECCLength($version, $level); + + if($b2 == 0) { + $spec[0] = $b1; + $spec[1] = (int)($data / $b1); + $spec[2] = (int)($ecc / $b1); + $spec[3] = 0; + $spec[4] = 0; + } else { + $spec[0] = $b1; + $spec[1] = (int)($data / ($b1 + $b2)); + $spec[2] = (int)($ecc / ($b1 + $b2)); + $spec[3] = $b2; + $spec[4] = $spec[1] + 1; + } + } + + // Alignment pattern --------------------------------------------------- + + // Positions of alignment patterns. + // This array includes only the second and the third position of the + // alignment patterns. Rest of them can be calculated from the distance + // between them. + + // See Table 1 in Appendix E (pp.71) of JIS X0510:2004. + + public static $alignmentPattern = array( + array( 0, 0), + array( 0, 0), array(18, 0), array(22, 0), array(26, 0), array(30, 0), // 1- 5 + array(34, 0), array(22, 38), array(24, 42), array(26, 46), array(28, 50), // 6-10 + array(30, 54), array(32, 58), array(34, 62), array(26, 46), array(26, 48), //11-15 + array(26, 50), array(30, 54), array(30, 56), array(30, 58), array(34, 62), //16-20 + array(28, 50), array(26, 50), array(30, 54), array(28, 54), array(32, 58), //21-25 + array(30, 58), array(34, 62), array(26, 50), array(30, 54), array(26, 52), //26-30 + array(30, 56), array(34, 60), array(30, 58), array(34, 62), array(30, 54), //31-35 + array(24, 50), array(28, 54), array(32, 58), array(26, 54), array(30, 58), //35-40 + ); + + + /** -------------------------------------------------------------------- + * Put an alignment marker. + * @param frame + * @param width + * @param ox,oy center coordinate of the pattern + */ + public static function putAlignmentMarker(array &$frame, $ox, $oy) + { + $finder = array( + "\xa1\xa1\xa1\xa1\xa1", + "\xa1\xa0\xa0\xa0\xa1", + "\xa1\xa0\xa1\xa0\xa1", + "\xa1\xa0\xa0\xa0\xa1", + "\xa1\xa1\xa1\xa1\xa1" + ); + + $yStart = $oy-2; + $xStart = $ox-2; + + for($y=0; $y<5; $y++) { + QRstr::set($frame, $xStart, $yStart+$y, $finder[$y]); + } + } + + //---------------------------------------------------------------------- + public static function putAlignmentPattern($version, &$frame, $width) + { + if($version < 2) + return; + + $d = self::$alignmentPattern[$version][1] - self::$alignmentPattern[$version][0]; + if($d < 0) { + $w = 2; + } else { + $w = (int)(($width - self::$alignmentPattern[$version][0]) / $d + 2); + } + + if($w * $w - 3 == 1) { + $x = self::$alignmentPattern[$version][0]; + $y = self::$alignmentPattern[$version][0]; + self::putAlignmentMarker($frame, $x, $y); + return; + } + + $cx = self::$alignmentPattern[$version][0]; + for($x=1; $x<$w - 1; $x++) { + self::putAlignmentMarker($frame, 6, $cx); + self::putAlignmentMarker($frame, $cx, 6); + $cx += $d; + } + + $cy = self::$alignmentPattern[$version][0]; + for($y=0; $y<$w-1; $y++) { + $cx = self::$alignmentPattern[$version][0]; + for($x=0; $x<$w-1; $x++) { + self::putAlignmentMarker($frame, $cx, $cy); + $cx += $d; + } + $cy += $d; + } + } + + // Version information pattern ----------------------------------------- + + // Version information pattern (BCH coded). + // See Table 1 in Appendix D (pp.68) of JIS X0510:2004. + + // size: [QRSPEC_VERSION_MAX - 6] + + public static $versionPattern = array( + 0x07c94, 0x085bc, 0x09a99, 0x0a4d3, 0x0bbf6, 0x0c762, 0x0d847, 0x0e60d, + 0x0f928, 0x10b78, 0x1145d, 0x12a17, 0x13532, 0x149a6, 0x15683, 0x168c9, + 0x177ec, 0x18ec4, 0x191e1, 0x1afab, 0x1b08e, 0x1cc1a, 0x1d33f, 0x1ed75, + 0x1f250, 0x209d5, 0x216f0, 0x228ba, 0x2379f, 0x24b0b, 0x2542e, 0x26a64, + 0x27541, 0x28c69 + ); + + //---------------------------------------------------------------------- + public static function getVersionPattern($version) + { + if($version < 7 || $version > QRSPEC_VERSION_MAX) + return 0; + + return self::$versionPattern[$version -7]; + } + + // Format information -------------------------------------------------- + // See calcFormatInfo in tests/test_qrspec.c (orginal qrencode c lib) + + public static $formatInfo = array( + array(0x77c4, 0x72f3, 0x7daa, 0x789d, 0x662f, 0x6318, 0x6c41, 0x6976), + array(0x5412, 0x5125, 0x5e7c, 0x5b4b, 0x45f9, 0x40ce, 0x4f97, 0x4aa0), + array(0x355f, 0x3068, 0x3f31, 0x3a06, 0x24b4, 0x2183, 0x2eda, 0x2bed), + array(0x1689, 0x13be, 0x1ce7, 0x19d0, 0x0762, 0x0255, 0x0d0c, 0x083b) + ); + + public static function getFormatInfo($mask, $level) + { + if($mask < 0 || $mask > 7) + return 0; + + if($level < 0 || $level > 3) + return 0; + + return self::$formatInfo[$level][$mask]; + } + + // Frame --------------------------------------------------------------- + // Cache of initial frames. + + public static $frames = array(); + + /** -------------------------------------------------------------------- + * Put a finder pattern. + * @param frame + * @param width + * @param ox,oy upper-left coordinate of the pattern + */ + public static function putFinderPattern(&$frame, $ox, $oy) + { + $finder = array( + "\xc1\xc1\xc1\xc1\xc1\xc1\xc1", + "\xc1\xc0\xc0\xc0\xc0\xc0\xc1", + "\xc1\xc0\xc1\xc1\xc1\xc0\xc1", + "\xc1\xc0\xc1\xc1\xc1\xc0\xc1", + "\xc1\xc0\xc1\xc1\xc1\xc0\xc1", + "\xc1\xc0\xc0\xc0\xc0\xc0\xc1", + "\xc1\xc1\xc1\xc1\xc1\xc1\xc1" + ); + + for($y=0; $y<7; $y++) { + QRstr::set($frame, $ox, $oy+$y, $finder[$y]); + } + } + + //---------------------------------------------------------------------- + public static function createFrame($version) + { + $width = self::$capacity[$version][QRCAP_WIDTH]; + $frameLine = str_repeat ("\0", $width); + $frame = array_fill(0, $width, $frameLine); + + // Finder pattern + self::putFinderPattern($frame, 0, 0); + self::putFinderPattern($frame, $width - 7, 0); + self::putFinderPattern($frame, 0, $width - 7); + + // Separator + $yOffset = $width - 7; + + for($y=0; $y<7; $y++) { + $frame[$y][7] = "\xc0"; + $frame[$y][$width - 8] = "\xc0"; + $frame[$yOffset][7] = "\xc0"; + $yOffset++; + } + + $setPattern = str_repeat("\xc0", 8); + + QRstr::set($frame, 0, 7, $setPattern); + QRstr::set($frame, $width-8, 7, $setPattern); + QRstr::set($frame, 0, $width - 8, $setPattern); + + // Format info + $setPattern = str_repeat("\x84", 9); + QRstr::set($frame, 0, 8, $setPattern); + QRstr::set($frame, $width - 8, 8, $setPattern, 8); + + $yOffset = $width - 8; + + for($y=0; $y<8; $y++,$yOffset++) { + $frame[$y][8] = "\x84"; + $frame[$yOffset][8] = "\x84"; + } + + // Timing pattern + + for($i=1; $i<$width-15; $i++) { + $frame[6][7+$i] = chr(0x90 | ($i & 1)); + $frame[7+$i][6] = chr(0x90 | ($i & 1)); + } + + // Alignment pattern + self::putAlignmentPattern($version, $frame, $width); + + // Version information + if($version >= 7) { + $vinf = self::getVersionPattern($version); + + $v = $vinf; + + for($x=0; $x<6; $x++) { + for($y=0; $y<3; $y++) { + $frame[($width - 11)+$y][$x] = chr(0x88 | ($v & 1)); + $v = $v >> 1; + } + } + + $v = $vinf; + for($y=0; $y<6; $y++) { + for($x=0; $x<3; $x++) { + $frame[$y][$x+($width - 11)] = chr(0x88 | ($v & 1)); + $v = $v >> 1; + } + } + } + + // and a little bit... + $frame[$width - 8][8] = "\x81"; + + return $frame; + } + + //---------------------------------------------------------------------- + public static function debug($frame, $binary_mode = false) + { + if ($binary_mode) { + + foreach ($frame as &$frameLine) { + $frameLine = join('  ', explode('0', $frameLine)); + $frameLine = join('██', explode('1', $frameLine)); + } + + ?> + +


        '; + echo join("
        ", $frame); + echo '






'; + + } else { + + foreach ($frame as &$frameLine) { + $frameLine = join(' ', explode("\xc0", $frameLine)); + $frameLine = join('', explode("\xc1", $frameLine)); + $frameLine = join(' ', explode("\xa0", $frameLine)); + $frameLine = join('', explode("\xa1", $frameLine)); + $frameLine = join('', explode("\x84", $frameLine)); //format 0 + $frameLine = join('', explode("\x85", $frameLine)); //format 1 + $frameLine = join('', explode("\x81", $frameLine)); //special bit + $frameLine = join(' ', explode("\x90", $frameLine)); //clock 0 + $frameLine = join('', explode("\x91", $frameLine)); //clock 1 + $frameLine = join(' ', explode("\x88", $frameLine)); //version + $frameLine = join('', explode("\x89", $frameLine)); //version + $frameLine = join('♦', explode("\x01", $frameLine)); + $frameLine = join('⋅', explode("\0", $frameLine)); + } + + ?> + + "; + echo join("
", $frame); + echo "
"; + + } + } + + //---------------------------------------------------------------------- + public static function serial($frame) + { + return gzcompress(join("\n", $frame), 9); + } + + //---------------------------------------------------------------------- + public static function unserial($code) + { + return explode("\n", gzuncompress($code)); + } + + //---------------------------------------------------------------------- + public static function newFrame($version) + { + if($version < 1 || $version > QRSPEC_VERSION_MAX) + return null; + + if(!isset(self::$frames[$version])) { + + $fileName = QR_CACHE_DIR.'frame_'.$version.'.dat'; + + if (QR_CACHEABLE) { + if (file_exists($fileName)) { + self::$frames[$version] = self::unserial(file_get_contents($fileName)); + } else { + self::$frames[$version] = self::createFrame($version); + file_put_contents($fileName, self::serial(self::$frames[$version])); + } + } else { + self::$frames[$version] = self::createFrame($version); + } + } + + if(is_null(self::$frames[$version])) + return null; + + return self::$frames[$version]; + } + + //---------------------------------------------------------------------- + public static function rsBlockNum($spec) { return $spec[0] + $spec[3]; } + public static function rsBlockNum1($spec) { return $spec[0]; } + public static function rsDataCodes1($spec) { return $spec[1]; } + public static function rsEccCodes1($spec) { return $spec[2]; } + public static function rsBlockNum2($spec) { return $spec[3]; } + public static function rsDataCodes2($spec) { return $spec[4]; } + public static function rsEccCodes2($spec) { return $spec[2]; } + public static function rsDataLength($spec) { return ($spec[0] * $spec[1]) + ($spec[3] * $spec[4]); } + public static function rsEccLength($spec) { return ($spec[0] + $spec[3]) * $spec[2]; } + + } + + + +//---- qrimage.php ----------------------------- + + + + +/* + * PHP QR Code encoder + * + * Image output of code using GD2 + * + * PHP QR Code is distributed under LGPL 3 + * Copyright (C) 2010 Dominik Dzienia + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ + + define('QR_IMAGE', true); + + class QRimage { + + //---------------------------------------------------------------------- + public static function png($frame, $filename = false, $pixelPerPoint = 4, $outerFrame = 4,$saveandprint=FALSE, $back_color, $fore_color) + { + $image = self::image($frame, $pixelPerPoint, $outerFrame, $back_color, $fore_color); + + if ($filename === false) { + Header("Content-type: image/png"); + ImagePng($image); + } else { + if($saveandprint===TRUE){ + ImagePng($image, $filename); + header("Content-type: image/png"); + ImagePng($image); + }else{ + ImagePng($image, $filename); + } + } + + ImageDestroy($image); + } + + //---------------------------------------------------------------------- + public static function jpg($frame, $filename = false, $pixelPerPoint = 8, $outerFrame = 4, $q = 85) + { + $image = self::image($frame, $pixelPerPoint, $outerFrame); + + if ($filename === false) { + Header("Content-type: image/jpeg"); + ImageJpeg($image, null, $q); + } else { + ImageJpeg($image, $filename, $q); + } + + ImageDestroy($image); + } + + //---------------------------------------------------------------------- + private static function image($frame, $pixelPerPoint = 4, $outerFrame = 4, $back_color = 0xFFFFFF, $fore_color = 0x000000) + { + $h = count($frame); + $w = strlen($frame[0]); + + $imgW = $w + 2*$outerFrame; + $imgH = $h + 2*$outerFrame; + + $base_image =ImageCreate($imgW, $imgH); + + // convert a hexadecimal color code into decimal format (red = 255 0 0, green = 0 255 0, blue = 0 0 255) + $r1 = round((($fore_color & 0xFF0000) >> 16), 5); + $g1 = round((($fore_color & 0x00FF00) >> 8), 5); + $b1 = round(($fore_color & 0x0000FF), 5); + + // convert a hexadecimal color code into decimal format (red = 255 0 0, green = 0 255 0, blue = 0 0 255) + $r2 = round((($back_color & 0xFF0000) >> 16), 5); + $g2 = round((($back_color & 0x00FF00) >> 8), 5); + $b2 = round(($back_color & 0x0000FF), 5); + + + + $col[0] = ImageColorAllocate($base_image, $r2, $g2, $b2); + $col[1] = ImageColorAllocate($base_image, $r1, $g1, $b1); + + imagefill($base_image, 0, 0, $col[0]); + + for($y=0; $y<$h; $y++) { + for($x=0; $x<$w; $x++) { + if ($frame[$y][$x] == '1') { + ImageSetPixel($base_image,$x+$outerFrame,$y+$outerFrame,$col[1]); + } + } + } + + $target_image =ImageCreate($imgW * $pixelPerPoint, $imgH * $pixelPerPoint); + ImageCopyResized($target_image, $base_image, 0, 0, 0, 0, $imgW * $pixelPerPoint, $imgH * $pixelPerPoint, $imgW, $imgH); + ImageDestroy($base_image); + + return $target_image; + } + } + + + + +//---- qrinput.php ----------------------------- + + + + +/* + * PHP QR Code encoder + * + * Input encoding class + * + * Based on libqrencode C library distributed under LGPL 2.1 + * Copyright (C) 2006, 2007, 2008, 2009 Kentaro Fukuchi + * + * PHP QR Code is distributed under LGPL 3 + * Copyright (C) 2010 Dominik Dzienia + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ + + define('STRUCTURE_HEADER_BITS', 20); + define('MAX_STRUCTURED_SYMBOLS', 16); + + class QRinputItem { + + public $mode; + public $size; + public $data; + public $bstream; + + public function __construct($mode, $size, $data, $bstream = null) + { + $setData = array_slice($data, 0, $size); + + if (count($setData) < $size) { + $setData = array_merge($setData, array_fill(0,$size-count($setData),0)); + } + + if(!QRinput::check($mode, $size, $setData)) { + throw new Exception('Error m:'.$mode.',s:'.$size.',d:'.join(',',$setData)); + } + + $this->mode = $mode; + $this->size = $size; + $this->data = $setData; + $this->bstream = $bstream; + } + + //---------------------------------------------------------------------- + public function encodeModeNum($version) + { + try { + + $words = (int)($this->size / 3); + $bs = new QRbitstream(); + + $val = 0x1; + $bs->appendNum(4, $val); + $bs->appendNum(QRspec::lengthIndicator(QR_MODE_NUM, $version), $this->size); + + for($i=0; $i<$words; $i++) { + $val = (ord($this->data[$i*3 ]) - ord('0')) * 100; + $val += (ord($this->data[$i*3+1]) - ord('0')) * 10; + $val += (ord($this->data[$i*3+2]) - ord('0')); + $bs->appendNum(10, $val); + } + + if($this->size - $words * 3 == 1) { + $val = ord($this->data[$words*3]) - ord('0'); + $bs->appendNum(4, $val); + } else if($this->size - $words * 3 == 2) { + $val = (ord($this->data[$words*3 ]) - ord('0')) * 10; + $val += (ord($this->data[$words*3+1]) - ord('0')); + $bs->appendNum(7, $val); + } + + $this->bstream = $bs; + return 0; + + } catch (Exception $e) { + return -1; + } + } + + //---------------------------------------------------------------------- + public function encodeModeAn($version) + { + try { + $words = (int)($this->size / 2); + $bs = new QRbitstream(); + + $bs->appendNum(4, 0x02); + $bs->appendNum(QRspec::lengthIndicator(QR_MODE_AN, $version), $this->size); + + for($i=0; $i<$words; $i++) { + $val = (int)QRinput::lookAnTable(ord($this->data[$i*2 ])) * 45; + $val += (int)QRinput::lookAnTable(ord($this->data[$i*2+1])); + + $bs->appendNum(11, $val); + } + + if($this->size & 1) { + $val = QRinput::lookAnTable(ord($this->data[$words * 2])); + $bs->appendNum(6, $val); + } + + $this->bstream = $bs; + return 0; + + } catch (Exception $e) { + return -1; + } + } + + //---------------------------------------------------------------------- + public function encodeMode8($version) + { + try { + $bs = new QRbitstream(); + + $bs->appendNum(4, 0x4); + $bs->appendNum(QRspec::lengthIndicator(QR_MODE_8, $version), $this->size); + + for($i=0; $i<$this->size; $i++) { + $bs->appendNum(8, ord($this->data[$i])); + } + + $this->bstream = $bs; + return 0; + + } catch (Exception $e) { + return -1; + } + } + + //---------------------------------------------------------------------- + public function encodeModeKanji($version) + { + try { + + $bs = new QRbitrtream(); + + $bs->appendNum(4, 0x8); + $bs->appendNum(QRspec::lengthIndicator(QR_MODE_KANJI, $version), (int)($this->size / 2)); + + for($i=0; $i<$this->size; $i+=2) { + $val = (ord($this->data[$i]) << 8) | ord($this->data[$i+1]); + if($val <= 0x9ffc) { + $val -= 0x8140; + } else { + $val -= 0xc140; + } + + $h = ($val >> 8) * 0xc0; + $val = ($val & 0xff) + $h; + + $bs->appendNum(13, $val); + } + + $this->bstream = $bs; + return 0; + + } catch (Exception $e) { + return -1; + } + } + + //---------------------------------------------------------------------- + public function encodeModeStructure() + { + try { + $bs = new QRbitstream(); + + $bs->appendNum(4, 0x03); + $bs->appendNum(4, ord($this->data[1]) - 1); + $bs->appendNum(4, ord($this->data[0]) - 1); + $bs->appendNum(8, ord($this->data[2])); + + $this->bstream = $bs; + return 0; + + } catch (Exception $e) { + return -1; + } + } + + //---------------------------------------------------------------------- + public function estimateBitStreamSizeOfEntry($version) + { + $bits = 0; + + if($version == 0) + $version = 1; + + switch($this->mode) { + case QR_MODE_NUM: $bits = QRinput::estimateBitsModeNum($this->size); break; + case QR_MODE_AN: $bits = QRinput::estimateBitsModeAn($this->size); break; + case QR_MODE_8: $bits = QRinput::estimateBitsMode8($this->size); break; + case QR_MODE_KANJI: $bits = QRinput::estimateBitsModeKanji($this->size);break; + case QR_MODE_STRUCTURE: return STRUCTURE_HEADER_BITS; + default: + return 0; + } + + $l = QRspec::lengthIndicator($this->mode, $version); + $m = 1 << $l; + $num = (int)(($this->size + $m - 1) / $m); + + $bits += $num * (4 + $l); + + return $bits; + } + + //---------------------------------------------------------------------- + public function encodeBitStream($version) + { + try { + + unset($this->bstream); + $words = QRspec::maximumWords($this->mode, $version); + + if($this->size > $words) { + + $st1 = new QRinputItem($this->mode, $words, $this->data); + $st2 = new QRinputItem($this->mode, $this->size - $words, array_slice($this->data, $words)); + + $st1->encodeBitStream($version); + $st2->encodeBitStream($version); + + $this->bstream = new QRbitstream(); + $this->bstream->append($st1->bstream); + $this->bstream->append($st2->bstream); + + unset($st1); + unset($st2); + + } else { + + $ret = 0; + + switch($this->mode) { + case QR_MODE_NUM: $ret = $this->encodeModeNum($version); break; + case QR_MODE_AN: $ret = $this->encodeModeAn($version); break; + case QR_MODE_8: $ret = $this->encodeMode8($version); break; + case QR_MODE_KANJI: $ret = $this->encodeModeKanji($version);break; + case QR_MODE_STRUCTURE: $ret = $this->encodeModeStructure(); break; + + default: + break; + } + + if($ret < 0) + return -1; + } + + return $this->bstream->size(); + + } catch (Exception $e) { + return -1; + } + } + }; + + //########################################################################## + + class QRinput { + + public $items; + + private $version; + private $level; + + //---------------------------------------------------------------------- + public function __construct($version = 0, $level = QR_ECLEVEL_L) + { + if ($version < 0 || $version > QRSPEC_VERSION_MAX || $level > QR_ECLEVEL_H) { + throw new Exception('Invalid version no'); + } + + $this->version = $version; + $this->level = $level; + } + + //---------------------------------------------------------------------- + public function getVersion() + { + return $this->version; + } + + //---------------------------------------------------------------------- + public function setVersion($version) + { + if($version < 0 || $version > QRSPEC_VERSION_MAX) { + throw new Exception('Invalid version no'); + return -1; + } + + $this->version = $version; + + return 0; + } + + //---------------------------------------------------------------------- + public function getErrorCorrectionLevel() + { + return $this->level; + } + + //---------------------------------------------------------------------- + public function setErrorCorrectionLevel($level) + { + if($level > QR_ECLEVEL_H) { + throw new Exception('Invalid ECLEVEL'); + return -1; + } + + $this->level = $level; + + return 0; + } + + //---------------------------------------------------------------------- + public function appendEntry(QRinputItem $entry) + { + $this->items[] = $entry; + } + + //---------------------------------------------------------------------- + public function append($mode, $size, $data) + { + try { + $entry = new QRinputItem($mode, $size, $data); + $this->items[] = $entry; + return 0; + } catch (Exception $e) { + return -1; + } + } + + //---------------------------------------------------------------------- + + public function insertStructuredAppendHeader($size, $index, $parity) + { + if( $size > MAX_STRUCTURED_SYMBOLS ) { + throw new Exception('insertStructuredAppendHeader wrong size'); + } + + if( $index <= 0 || $index > MAX_STRUCTURED_SYMBOLS ) { + throw new Exception('insertStructuredAppendHeader wrong index'); + } + + $buf = array($size, $index, $parity); + + try { + $entry = new QRinputItem(QR_MODE_STRUCTURE, 3, buf); + array_unshift($this->items, $entry); + return 0; + } catch (Exception $e) { + return -1; + } + } + + //---------------------------------------------------------------------- + public function calcParity() + { + $parity = 0; + + foreach($this->items as $item) { + if($item->mode != QR_MODE_STRUCTURE) { + for($i=$item->size-1; $i>=0; $i--) { + $parity ^= $item->data[$i]; + } + } + } + + return $parity; + } + + //---------------------------------------------------------------------- + public static function checkModeNum($size, $data) + { + for($i=0; $i<$size; $i++) { + if((ord($data[$i]) < ord('0')) || (ord($data[$i]) > ord('9'))){ + return false; + } + } + + return true; + } + + //---------------------------------------------------------------------- + public static function estimateBitsModeNum($size) + { + $w = (int)$size / 3; + $bits = $w * 10; + + switch($size - $w * 3) { + case 1: + $bits += 4; + break; + case 2: + $bits += 7; + break; + default: + break; + } + + return $bits; + } + + //---------------------------------------------------------------------- + public static $anTable = array( + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 36, -1, -1, -1, 37, 38, -1, -1, -1, -1, 39, 40, -1, 41, 42, 43, + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 44, -1, -1, -1, -1, -1, + -1, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, + 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 + ); + + //---------------------------------------------------------------------- + public static function lookAnTable($c) + { + return (($c > 127)?-1:self::$anTable[$c]); + } + + //---------------------------------------------------------------------- + public static function checkModeAn($size, $data) + { + for($i=0; $i<$size; $i++) { + if (self::lookAnTable(ord($data[$i])) == -1) { + return false; + } + } + + return true; + } + + //---------------------------------------------------------------------- + public static function estimateBitsModeAn($size) + { + $w = (int)($size / 2); + $bits = $w * 11; + + if($size & 1) { + $bits += 6; + } + + return $bits; + } + + //---------------------------------------------------------------------- + public static function estimateBitsMode8($size) + { + return $size * 8; + } + + //---------------------------------------------------------------------- + public function estimateBitsModeKanji($size) + { + return (int)(($size / 2) * 13); + } + + //---------------------------------------------------------------------- + public static function checkModeKanji($size, $data) + { + if($size & 1) + return false; + + for($i=0; $i<$size; $i+=2) { + $val = (ord($data[$i]) << 8) | ord($data[$i+1]); + if( $val < 0x8140 + || ($val > 0x9ffc && $val < 0xe040) + || $val > 0xebbf) { + return false; + } + } + + return true; + } + + /*********************************************************************** + * Validation + **********************************************************************/ + + public static function check($mode, $size, $data) + { + if($size <= 0) + return false; + + switch($mode) { + case QR_MODE_NUM: return self::checkModeNum($size, $data); break; + case QR_MODE_AN: return self::checkModeAn($size, $data); break; + case QR_MODE_KANJI: return self::checkModeKanji($size, $data); break; + case QR_MODE_8: return true; break; + case QR_MODE_STRUCTURE: return true; break; + + default: + break; + } + + return false; + } + + + //---------------------------------------------------------------------- + public function estimateBitStreamSize($version) + { + $bits = 0; + + foreach($this->items as $item) { + $bits += $item->estimateBitStreamSizeOfEntry($version); + } + + return $bits; + } + + //---------------------------------------------------------------------- + public function estimateVersion() + { + $version = 0; + $prev = 0; + do { + $prev = $version; + $bits = $this->estimateBitStreamSize($prev); + $version = QRspec::getMinimumVersion((int)(($bits + 7) / 8), $this->level); + if ($version < 0) { + return -1; + } + } while ($version > $prev); + + return $version; + } + + //---------------------------------------------------------------------- + public static function lengthOfCode($mode, $version, $bits) + { + $payload = $bits - 4 - QRspec::lengthIndicator($mode, $version); + switch($mode) { + case QR_MODE_NUM: + $chunks = (int)($payload / 10); + $remain = $payload - $chunks * 10; + $size = $chunks * 3; + if($remain >= 7) { + $size += 2; + } else if($remain >= 4) { + $size += 1; + } + break; + case QR_MODE_AN: + $chunks = (int)($payload / 11); + $remain = $payload - $chunks * 11; + $size = $chunks * 2; + if($remain >= 6) + $size++; + break; + case QR_MODE_8: + $size = (int)($payload / 8); + break; + case QR_MODE_KANJI: + $size = (int)(($payload / 13) * 2); + break; + case QR_MODE_STRUCTURE: + $size = (int)($payload / 8); + break; + default: + $size = 0; + break; + } + + $maxsize = QRspec::maximumWords($mode, $version); + if($size < 0) $size = 0; + if($size > $maxsize) $size = $maxsize; + + return $size; + } + + //---------------------------------------------------------------------- + public function createBitStream() + { + $total = 0; + + foreach($this->items as $item) { + $bits = $item->encodeBitStream($this->version); + + if($bits < 0) + return -1; + + $total += $bits; + } + + return $total; + } + + //---------------------------------------------------------------------- + public function convertData() + { + $ver = $this->estimateVersion(); + if($ver > $this->getVersion()) { + $this->setVersion($ver); + } + + for(;;) { + $bits = $this->createBitStream(); + + if($bits < 0) + return -1; + + $ver = QRspec::getMinimumVersion((int)(($bits + 7) / 8), $this->level); + if($ver < 0) { + throw new Exception('WRONG VERSION'); + } else if($ver > $this->getVersion()) { + $this->setVersion($ver); + } else { + break; + } + } + + return 0; + } + + //---------------------------------------------------------------------- + public function appendPaddingBit(&$bstream) + { + $bits = $bstream->size(); + $maxwords = QRspec::getDataLength($this->version, $this->level); + $maxbits = $maxwords * 8; + + if ($maxbits == $bits) { + return 0; + } + + if ($maxbits - $bits < 5) { + return $bstream->appendNum($maxbits - $bits, 0); + } + + $bits += 4; + $words = (int)(($bits + 7) / 8); + + $padding = new QRbitstream(); + $ret = $padding->appendNum($words * 8 - $bits + 4, 0); + + if($ret < 0) + return $ret; + + $padlen = $maxwords - $words; + + if($padlen > 0) { + + $padbuf = array(); + for($i=0; $i<$padlen; $i++) { + $padbuf[$i] = ($i&1)?0x11:0xec; + } + + $ret = $padding->appendBytes($padlen, $padbuf); + + if($ret < 0) + return $ret; + + } + + $ret = $bstream->append($padding); + + return $ret; + } + + //---------------------------------------------------------------------- + public function mergeBitStream() + { + if($this->convertData() < 0) { + return null; + } + + $bstream = new QRbitstream(); + + foreach($this->items as $item) { + $ret = $bstream->append($item->bstream); + if($ret < 0) { + return null; + } + } + + return $bstream; + } + + //---------------------------------------------------------------------- + public function getBitStream() + { + + $bstream = $this->mergeBitStream(); + + if($bstream == null) { + return null; + } + + $ret = $this->appendPaddingBit($bstream); + if($ret < 0) { + return null; + } + + return $bstream; + } + + //---------------------------------------------------------------------- + public function getByteStream() + { + $bstream = $this->getBitStream(); + if($bstream == null) { + return null; + } + + return $bstream->toByte(); + } + } + + + + + + +//---- qrbitstream.php ----------------------------- + + + + +/* + * PHP QR Code encoder + * + * Bitstream class + * + * Based on libqrencode C library distributed under LGPL 2.1 + * Copyright (C) 2006, 2007, 2008, 2009 Kentaro Fukuchi + * + * PHP QR Code is distributed under LGPL 3 + * Copyright (C) 2010 Dominik Dzienia + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ + + class QRbitstream { + + public $data = array(); + + //---------------------------------------------------------------------- + public function size() + { + return count($this->data); + } + + //---------------------------------------------------------------------- + public function allocate($setLength) + { + $this->data = array_fill(0, $setLength, 0); + return 0; + } + + //---------------------------------------------------------------------- + public static function newFromNum($bits, $num) + { + $bstream = new QRbitstream(); + $bstream->allocate($bits); + + $mask = 1 << ($bits - 1); + for($i=0; $i<$bits; $i++) { + if($num & $mask) { + $bstream->data[$i] = 1; + } else { + $bstream->data[$i] = 0; + } + $mask = $mask >> 1; + } + + return $bstream; + } + + //---------------------------------------------------------------------- + public static function newFromBytes($size, $data) + { + $bstream = new QRbitstream(); + $bstream->allocate($size * 8); + $p=0; + + for($i=0; $i<$size; $i++) { + $mask = 0x80; + for($j=0; $j<8; $j++) { + if($data[$i] & $mask) { + $bstream->data[$p] = 1; + } else { + $bstream->data[$p] = 0; + } + $p++; + $mask = $mask >> 1; + } + } + + return $bstream; + } + + //---------------------------------------------------------------------- + public function append(QRbitstream $arg) + { + if (is_null($arg)) { + return -1; + } + + if($arg->size() == 0) { + return 0; + } + + if($this->size() == 0) { + $this->data = $arg->data; + return 0; + } + + $this->data = array_values(array_merge($this->data, $arg->data)); + + return 0; + } + + //---------------------------------------------------------------------- + public function appendNum($bits, $num) + { + if ($bits == 0) + return 0; + + $b = QRbitstream::newFromNum($bits, $num); + + if(is_null($b)) + return -1; + + $ret = $this->append($b); + unset($b); + + return $ret; + } + + //---------------------------------------------------------------------- + public function appendBytes($size, $data) + { + if ($size == 0) + return 0; + + $b = QRbitstream::newFromBytes($size, $data); + + if(is_null($b)) + return -1; + + $ret = $this->append($b); + unset($b); + + return $ret; + } + + //---------------------------------------------------------------------- + public function toByte() + { + + $size = $this->size(); + + if($size == 0) { + return array(); + } + + $data = array_fill(0, (int)(($size + 7) / 8), 0); + $bytes = (int)($size / 8); + + $p = 0; + + for($i=0; $i<$bytes; $i++) { + $v = 0; + for($j=0; $j<8; $j++) { + $v = $v << 1; + $v |= $this->data[$p]; + $p++; + } + $data[$i] = $v; + } + + if($size & 7) { + $v = 0; + for($j=0; $j<($size & 7); $j++) { + $v = $v << 1; + $v |= $this->data[$p]; + $p++; + } + $data[$bytes] = $v; + } + + return $data; + } + + } + + + + +//---- qrsplit.php ----------------------------- + + + + +/* + * PHP QR Code encoder + * + * Input splitting classes + * + * Based on libqrencode C library distributed under LGPL 2.1 + * Copyright (C) 2006, 2007, 2008, 2009 Kentaro Fukuchi + * + * PHP QR Code is distributed under LGPL 3 + * Copyright (C) 2010 Dominik Dzienia + * + * The following data / specifications are taken from + * "Two dimensional symbol -- QR-code -- Basic Specification" (JIS X0510:2004) + * or + * "Automatic identification and data capture techniques -- + * QR Code 2005 bar code symbology specification" (ISO/IEC 18004:2006) + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ + class QRsplit { + + public $dataStr = ''; + public $input; + public $modeHint; + + //---------------------------------------------------------------------- + public function __construct($dataStr, $input, $modeHint) + { + $this->dataStr = $dataStr; + $this->input = $input; + $this->modeHint = $modeHint; + } + + //---------------------------------------------------------------------- + public static function isdigitat($str, $pos) + { + if ($pos >= strlen($str)) + return false; + + return ((ord($str[$pos]) >= ord('0'))&&(ord($str[$pos]) <= ord('9'))); + } + + //---------------------------------------------------------------------- + public static function isalnumat($str, $pos) + { + if ($pos >= strlen($str)) + return false; + + return (QRinput::lookAnTable(ord($str[$pos])) >= 0); + } + + //---------------------------------------------------------------------- + public function identifyMode($pos) + { + if ($pos >= strlen($this->dataStr)) + return QR_MODE_NUL; + + $c = $this->dataStr[$pos]; + + if(self::isdigitat($this->dataStr, $pos)) { + return QR_MODE_NUM; + } else if(self::isalnumat($this->dataStr, $pos)) { + return QR_MODE_AN; + } else if($this->modeHint == QR_MODE_KANJI) { + + if ($pos+1 < strlen($this->dataStr)) + { + $d = $this->dataStr[$pos+1]; + $word = (ord($c) << 8) | ord($d); + if(($word >= 0x8140 && $word <= 0x9ffc) || ($word >= 0xe040 && $word <= 0xebbf)) { + return QR_MODE_KANJI; + } + } + } + + return QR_MODE_8; + } + + //---------------------------------------------------------------------- + public function eatNum() + { + $ln = QRspec::lengthIndicator(QR_MODE_NUM, $this->input->getVersion()); + + $p = 0; + while(self::isdigitat($this->dataStr, $p)) { + $p++; + } + + $run = $p; + $mode = $this->identifyMode($p); + + if($mode == QR_MODE_8) { + $dif = QRinput::estimateBitsModeNum($run) + 4 + $ln + + QRinput::estimateBitsMode8(1) // + 4 + l8 + - QRinput::estimateBitsMode8($run + 1); // - 4 - l8 + if($dif > 0) { + return $this->eat8(); + } + } + if($mode == QR_MODE_AN) { + $dif = QRinput::estimateBitsModeNum($run) + 4 + $ln + + QRinput::estimateBitsModeAn(1) // + 4 + la + - QRinput::estimateBitsModeAn($run + 1);// - 4 - la + if($dif > 0) { + return $this->eatAn(); + } + } + + $ret = $this->input->append(QR_MODE_NUM, $run, str_split($this->dataStr)); + if($ret < 0) + return -1; + + return $run; + } + + //---------------------------------------------------------------------- + public function eatAn() + { + $la = QRspec::lengthIndicator(QR_MODE_AN, $this->input->getVersion()); + $ln = QRspec::lengthIndicator(QR_MODE_NUM, $this->input->getVersion()); + + $p = 0; + + while(self::isalnumat($this->dataStr, $p)) { + if(self::isdigitat($this->dataStr, $p)) { + $q = $p; + while(self::isdigitat($this->dataStr, $q)) { + $q++; + } + + $dif = QRinput::estimateBitsModeAn($p) // + 4 + la + + QRinput::estimateBitsModeNum($q - $p) + 4 + $ln + - QRinput::estimateBitsModeAn($q); // - 4 - la + + if($dif < 0) { + break; + } else { + $p = $q; + } + } else { + $p++; + } + } + + $run = $p; + + if(!self::isalnumat($this->dataStr, $p)) { + $dif = QRinput::estimateBitsModeAn($run) + 4 + $la + + QRinput::estimateBitsMode8(1) // + 4 + l8 + - QRinput::estimateBitsMode8($run + 1); // - 4 - l8 + if($dif > 0) { + return $this->eat8(); + } + } + + $ret = $this->input->append(QR_MODE_AN, $run, str_split($this->dataStr)); + if($ret < 0) + return -1; + + return $run; + } + + //---------------------------------------------------------------------- + public function eatKanji() + { + $p = 0; + + while($this->identifyMode($p) == QR_MODE_KANJI) { + $p += 2; + } + + $ret = $this->input->append(QR_MODE_KANJI, $p, str_split($this->dataStr)); + if($ret < 0) + return -1; + + return $ret; + } + + //---------------------------------------------------------------------- + public function eat8() + { + $la = QRspec::lengthIndicator(QR_MODE_AN, $this->input->getVersion()); + $ln = QRspec::lengthIndicator(QR_MODE_NUM, $this->input->getVersion()); + + $p = 1; + $dataStrLen = strlen($this->dataStr); + + while($p < $dataStrLen) { + + $mode = $this->identifyMode($p); + if($mode == QR_MODE_KANJI) { + break; + } + if($mode == QR_MODE_NUM) { + $q = $p; + while(self::isdigitat($this->dataStr, $q)) { + $q++; + } + $dif = QRinput::estimateBitsMode8($p) // + 4 + l8 + + QRinput::estimateBitsModeNum($q - $p) + 4 + $ln + - QRinput::estimateBitsMode8($q); // - 4 - l8 + if($dif < 0) { + break; + } else { + $p = $q; + } + } else if($mode == QR_MODE_AN) { + $q = $p; + while(self::isalnumat($this->dataStr, $q)) { + $q++; + } + $dif = QRinput::estimateBitsMode8($p) // + 4 + l8 + + QRinput::estimateBitsModeAn($q - $p) + 4 + $la + - QRinput::estimateBitsMode8($q); // - 4 - l8 + if($dif < 0) { + break; + } else { + $p = $q; + } + } else { + $p++; + } + } + + $run = $p; + $ret = $this->input->append(QR_MODE_8, $run, str_split($this->dataStr)); + + if($ret < 0) + return -1; + + return $run; + } + + //---------------------------------------------------------------------- + public function splitString() + { + while (strlen($this->dataStr) > 0) + { + if($this->dataStr == '') + return 0; + + $mode = $this->identifyMode(0); + + switch ($mode) { + case QR_MODE_NUM: $length = $this->eatNum(); break; + case QR_MODE_AN: $length = $this->eatAn(); break; + case QR_MODE_KANJI: + if ($mode == QR_MODE_KANJI) + $length = $this->eatKanji(); + else $length = $this->eat8(); + break; + default: $length = $this->eat8(); break; + + } + + if($length == 0) return 0; + if($length < 0) return -1; + + $this->dataStr = substr($this->dataStr, $length); + } + } + + //---------------------------------------------------------------------- + public function toUpper() + { + $stringLen = strlen($this->dataStr); + $p = 0; + + while ($p<$stringLen) { + $mode = self::identifyMode(substr($this->dataStr, $p)); + if($mode == QR_MODE_KANJI) { + $p += 2; + } else { + if (ord($this->dataStr[$p]) >= ord('a') && ord($this->dataStr[$p]) <= ord('z')) { + $this->dataStr[$p] = chr(ord($this->dataStr[$p]) - 32); + } + $p++; + } + } + + return $this->dataStr; + } + + //---------------------------------------------------------------------- + public static function splitStringToQRinput($string, QRinput $input, $modeHint, $casesensitive = true) + { + if(is_null($string) || $string == '\0' || $string == '') { + throw new Exception('empty string!!!'); + } + + $split = new QRsplit($string, $input, $modeHint); + + if(!$casesensitive) + $split->toUpper(); + + return $split->splitString(); + } + } + + + +//---- qrrscode.php ----------------------------- + + + + +/* + * PHP QR Code encoder + * + * Reed-Solomon error correction support + * + * Copyright (C) 2002, 2003, 2004, 2006 Phil Karn, KA9Q + * (libfec is released under the GNU Lesser General Public License.) + * + * Based on libqrencode C library distributed under LGPL 2.1 + * Copyright (C) 2006, 2007, 2008, 2009 Kentaro Fukuchi + * + * PHP QR Code is distributed under LGPL 3 + * Copyright (C) 2010 Dominik Dzienia + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ + + class QRrsItem { + + public $mm; // Bits per symbol + public $nn; // Symbols per block (= (1<= $this->nn) { + $x -= $this->nn; + $x = ($x >> $this->mm) + ($x & $this->nn); + } + + return $x; + } + + //---------------------------------------------------------------------- + public static function init_rs_char($symsize, $gfpoly, $fcr, $prim, $nroots, $pad) + { + // Common code for intializing a Reed-Solomon control block (char or int symbols) + // Copyright 2004 Phil Karn, KA9Q + // May be used under the terms of the GNU Lesser General Public License (LGPL) + + $rs = null; + + // Check parameter ranges + if($symsize < 0 || $symsize > 8) return $rs; + if($fcr < 0 || $fcr >= (1<<$symsize)) return $rs; + if($prim <= 0 || $prim >= (1<<$symsize)) return $rs; + if($nroots < 0 || $nroots >= (1<<$symsize)) return $rs; // Can't have more roots than symbol values! + if($pad < 0 || $pad >= ((1<<$symsize) -1 - $nroots)) return $rs; // Too much padding + + $rs = new QRrsItem(); + $rs->mm = $symsize; + $rs->nn = (1<<$symsize)-1; + $rs->pad = $pad; + + $rs->alpha_to = array_fill(0, $rs->nn+1, 0); + $rs->index_of = array_fill(0, $rs->nn+1, 0); + + // PHP style macro replacement ;) + $NN =& $rs->nn; + $A0 =& $NN; + + // Generate Galois field lookup tables + $rs->index_of[0] = $A0; // log(zero) = -inf + $rs->alpha_to[$A0] = 0; // alpha**-inf = 0 + $sr = 1; + + for($i=0; $i<$rs->nn; $i++) { + $rs->index_of[$sr] = $i; + $rs->alpha_to[$i] = $sr; + $sr <<= 1; + if($sr & (1<<$symsize)) { + $sr ^= $gfpoly; + } + $sr &= $rs->nn; + } + + if($sr != 1){ + // field generator polynomial is not primitive! + $rs = NULL; + return $rs; + } + + /* Form RS code generator polynomial from its roots */ + $rs->genpoly = array_fill(0, $nroots+1, 0); + + $rs->fcr = $fcr; + $rs->prim = $prim; + $rs->nroots = $nroots; + $rs->gfpoly = $gfpoly; + + /* Find prim-th root of 1, used in decoding */ + for($iprim=1;($iprim % $prim) != 0;$iprim += $rs->nn) + ; // intentional empty-body loop! + + $rs->iprim = (int)($iprim / $prim); + $rs->genpoly[0] = 1; + + for ($i = 0,$root=$fcr*$prim; $i < $nroots; $i++, $root += $prim) { + $rs->genpoly[$i+1] = 1; + + // Multiply rs->genpoly[] by @**(root + x) + for ($j = $i; $j > 0; $j--) { + if ($rs->genpoly[$j] != 0) { + $rs->genpoly[$j] = $rs->genpoly[$j-1] ^ $rs->alpha_to[$rs->modnn($rs->index_of[$rs->genpoly[$j]] + $root)]; + } else { + $rs->genpoly[$j] = $rs->genpoly[$j-1]; + } + } + // rs->genpoly[0] can never be zero + $rs->genpoly[0] = $rs->alpha_to[$rs->modnn($rs->index_of[$rs->genpoly[0]] + $root)]; + } + + // convert rs->genpoly[] to index form for quicker encoding + for ($i = 0; $i <= $nroots; $i++) + $rs->genpoly[$i] = $rs->index_of[$rs->genpoly[$i]]; + + return $rs; + } + + //---------------------------------------------------------------------- + public function encode_rs_char($data, &$parity) + { + $MM =& $this->mm; + $NN =& $this->nn; + $ALPHA_TO =& $this->alpha_to; + $INDEX_OF =& $this->index_of; + $GENPOLY =& $this->genpoly; + $NROOTS =& $this->nroots; + $FCR =& $this->fcr; + $PRIM =& $this->prim; + $IPRIM =& $this->iprim; + $PAD =& $this->pad; + $A0 =& $NN; + + $parity = array_fill(0, $NROOTS, 0); + + for($i=0; $i< ($NN-$NROOTS-$PAD); $i++) { + + $feedback = $INDEX_OF[$data[$i] ^ $parity[0]]; + if($feedback != $A0) { + // feedback term is non-zero + + // This line is unnecessary when GENPOLY[NROOTS] is unity, as it must + // always be for the polynomials constructed by init_rs() + $feedback = $this->modnn($NN - $GENPOLY[$NROOTS] + $feedback); + + for($j=1;$j<$NROOTS;$j++) { + $parity[$j] ^= $ALPHA_TO[$this->modnn($feedback + $GENPOLY[$NROOTS-$j])]; + } + } + + // Shift + array_shift($parity); + if($feedback != $A0) { + array_push($parity, $ALPHA_TO[$this->modnn($feedback + $GENPOLY[0])]); + } else { + array_push($parity, 0); + } + } + } + } + + //########################################################################## + + class QRrs { + + public static $items = array(); + + //---------------------------------------------------------------------- + public static function init_rs($symsize, $gfpoly, $fcr, $prim, $nroots, $pad) + { + foreach(self::$items as $rs) { + if($rs->pad != $pad) continue; + if($rs->nroots != $nroots) continue; + if($rs->mm != $symsize) continue; + if($rs->gfpoly != $gfpoly) continue; + if($rs->fcr != $fcr) continue; + if($rs->prim != $prim) continue; + + return $rs; + } + + $rs = QRrsItem::init_rs_char($symsize, $gfpoly, $fcr, $prim, $nroots, $pad); + array_unshift(self::$items, $rs); + + return $rs; + } + } + + + +//---- qrmask.php ----------------------------- + + + + +/* + * PHP QR Code encoder + * + * Masking + * + * Based on libqrencode C library distributed under LGPL 2.1 + * Copyright (C) 2006, 2007, 2008, 2009 Kentaro Fukuchi + * + * PHP QR Code is distributed under LGPL 3 + * Copyright (C) 2010 Dominik Dzienia + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ + + define('N1', 3); + define('N2', 3); + define('N3', 40); + define('N4', 10); + + class QRmask { + + public $runLength = array(); + + //---------------------------------------------------------------------- + public function __construct() + { + $this->runLength = array_fill(0, QRSPEC_WIDTH_MAX + 1, 0); + } + + //---------------------------------------------------------------------- + public function writeFormatInformation($width, &$frame, $mask, $level) + { + $blacks = 0; + $format = QRspec::getFormatInfo($mask, $level); + + for($i=0; $i<8; $i++) { + if($format & 1) { + $blacks += 2; + $v = 0x85; + } else { + $v = 0x84; + } + + $frame[8][$width - 1 - $i] = chr($v); + if($i < 6) { + $frame[$i][8] = chr($v); + } else { + $frame[$i + 1][8] = chr($v); + } + $format = $format >> 1; + } + + for($i=0; $i<7; $i++) { + if($format & 1) { + $blacks += 2; + $v = 0x85; + } else { + $v = 0x84; + } + + $frame[$width - 7 + $i][8] = chr($v); + if($i == 0) { + $frame[8][7] = chr($v); + } else { + $frame[8][6 - $i] = chr($v); + } + + $format = $format >> 1; + } + + return $blacks; + } + + //---------------------------------------------------------------------- + public function mask0($x, $y) { return ($x+$y)&1; } + public function mask1($x, $y) { return ($y&1); } + public function mask2($x, $y) { return ($x%3); } + public function mask3($x, $y) { return ($x+$y)%3; } + public function mask4($x, $y) { return (((int)($y/2))+((int)($x/3)))&1; } + public function mask5($x, $y) { return (($x*$y)&1)+($x*$y)%3; } + public function mask6($x, $y) { return ((($x*$y)&1)+($x*$y)%3)&1; } + public function mask7($x, $y) { return ((($x*$y)%3)+(($x+$y)&1))&1; } + + //---------------------------------------------------------------------- + private function generateMaskNo($maskNo, $width, $frame) + { + $bitMask = array_fill(0, $width, array_fill(0, $width, 0)); + + for($y=0; $y<$width; $y++) { + for($x=0; $x<$width; $x++) { + if(ord($frame[$y][$x]) & 0x80) { + $bitMask[$y][$x] = 0; + } else { + $maskFunc = call_user_func(array($this, 'mask'.$maskNo), $x, $y); + $bitMask[$y][$x] = ($maskFunc == 0)?1:0; + } + + } + } + + return $bitMask; + } + + //---------------------------------------------------------------------- + public static function serial($bitFrame) + { + $codeArr = array(); + + foreach ($bitFrame as $line) + $codeArr[] = join('', $line); + + return gzcompress(join("\n", $codeArr), 9); + } + + //---------------------------------------------------------------------- + public static function unserial($code) + { + $codeArr = array(); + + $codeLines = explode("\n", gzuncompress($code)); + foreach ($codeLines as $line) + $codeArr[] = str_split($line); + + return $codeArr; + } + + //---------------------------------------------------------------------- + public function makeMaskNo($maskNo, $width, $s, &$d, $maskGenOnly = false) + { + $b = 0; + $bitMask = array(); + + $fileName = QR_CACHE_DIR.'mask_'.$maskNo.DIRECTORY_SEPARATOR.'mask_'.$width.'_'.$maskNo.'.dat'; + + if (QR_CACHEABLE) { + if (file_exists($fileName)) { + $bitMask = self::unserial(file_get_contents($fileName)); + } else { + $bitMask = $this->generateMaskNo($maskNo, $width, $s, $d); + if (!file_exists(QR_CACHE_DIR.'mask_'.$maskNo)) + mkdir(QR_CACHE_DIR.'mask_'.$maskNo); + file_put_contents($fileName, self::serial($bitMask)); + } + } else { + $bitMask = $this->generateMaskNo($maskNo, $width, $s, $d); + } + + if ($maskGenOnly) + return; + + $d = $s; + + for($y=0; $y<$width; $y++) { + for($x=0; $x<$width; $x++) { + if($bitMask[$y][$x] == 1) { + $d[$y][$x] = chr(ord($s[$y][$x]) ^ (int)$bitMask[$y][$x]); + } + $b += (int)(ord($d[$y][$x]) & 1); + } + } + + return $b; + } + + //---------------------------------------------------------------------- + public function makeMask($width, $frame, $maskNo, $level) + { + $masked = array_fill(0, $width, str_repeat("\0", $width)); + $this->makeMaskNo($maskNo, $width, $frame, $masked); + $this->writeFormatInformation($width, $masked, $maskNo, $level); + + return $masked; + } + + //---------------------------------------------------------------------- + public function calcN1N3($length) + { + $demerit = 0; + + for($i=0; $i<$length; $i++) { + + if($this->runLength[$i] >= 5) { + $demerit += (N1 + ($this->runLength[$i] - 5)); + } + if($i & 1) { + if(($i >= 3) && ($i < ($length-2)) && ($this->runLength[$i] % 3 == 0)) { + $fact = (int)($this->runLength[$i] / 3); + if(($this->runLength[$i-2] == $fact) && + ($this->runLength[$i-1] == $fact) && + ($this->runLength[$i+1] == $fact) && + ($this->runLength[$i+2] == $fact)) { + if(($this->runLength[$i-3] < 0) || ($this->runLength[$i-3] >= (4 * $fact))) { + $demerit += N3; + } else if((($i+3) >= $length) || ($this->runLength[$i+3] >= (4 * $fact))) { + $demerit += N3; + } + } + } + } + } + return $demerit; + } + + //---------------------------------------------------------------------- + public function evaluateSymbol($width, $frame) + { + $head = 0; + $demerit = 0; + + for($y=0; $y<$width; $y++) { + $head = 0; + $this->runLength[0] = 1; + + $frameY = $frame[$y]; + + if ($y>0) + $frameYM = $frame[$y-1]; + + for($x=0; $x<$width; $x++) { + if(($x > 0) && ($y > 0)) { + $b22 = ord($frameY[$x]) & ord($frameY[$x-1]) & ord($frameYM[$x]) & ord($frameYM[$x-1]); + $w22 = ord($frameY[$x]) | ord($frameY[$x-1]) | ord($frameYM[$x]) | ord($frameYM[$x-1]); + + if(($b22 | ($w22 ^ 1))&1) { + $demerit += N2; + } + } + if(($x == 0) && (ord($frameY[$x]) & 1)) { + $this->runLength[0] = -1; + $head = 1; + $this->runLength[$head] = 1; + } else if($x > 0) { + if((ord($frameY[$x]) ^ ord($frameY[$x-1])) & 1) { + $head++; + $this->runLength[$head] = 1; + } else { + $this->runLength[$head]++; + } + } + } + + $demerit += $this->calcN1N3($head+1); + } + + for($x=0; $x<$width; $x++) { + $head = 0; + $this->runLength[0] = 1; + + for($y=0; $y<$width; $y++) { + if($y == 0 && (ord($frame[$y][$x]) & 1)) { + $this->runLength[0] = -1; + $head = 1; + $this->runLength[$head] = 1; + } else if($y > 0) { + if((ord($frame[$y][$x]) ^ ord($frame[$y-1][$x])) & 1) { + $head++; + $this->runLength[$head] = 1; + } else { + $this->runLength[$head]++; + } + } + } + + $demerit += $this->calcN1N3($head+1); + } + + return $demerit; + } + + + //---------------------------------------------------------------------- + public function mask($width, $frame, $level) + { + $minDemerit = PHP_INT_MAX; + $bestMaskNum = 0; + $bestMask = array(); + + $checked_masks = array(0,1,2,3,4,5,6,7); + + if (QR_FIND_FROM_RANDOM !== false) { + + $howManuOut = 8-(QR_FIND_FROM_RANDOM % 9); + for ($i = 0; $i < $howManuOut; $i++) { + $remPos = rand (0, count($checked_masks)-1); + unset($checked_masks[$remPos]); + $checked_masks = array_values($checked_masks); + } + + } + + $bestMask = $frame; + + foreach($checked_masks as $i) { + $mask = array_fill(0, $width, str_repeat("\0", $width)); + + $demerit = 0; + $blacks = 0; + $blacks = $this->makeMaskNo($i, $width, $frame, $mask); + $blacks += $this->writeFormatInformation($width, $mask, $i, $level); + $blacks = (int)(100 * $blacks / ($width * $width)); + $demerit = (int)((int)(abs($blacks - 50) / 5) * N4); + $demerit += $this->evaluateSymbol($width, $mask); + + if($demerit < $minDemerit) { + $minDemerit = $demerit; + $bestMask = $mask; + $bestMaskNum = $i; + } + } + + return $bestMask; + } + + //---------------------------------------------------------------------- + } + + + + +//---- qrencode.php ----------------------------- + + + + +/* + * PHP QR Code encoder + * + * Main encoder classes. + * + * Based on libqrencode C library distributed under LGPL 2.1 + * Copyright (C) 2006, 2007, 2008, 2009 Kentaro Fukuchi + * + * PHP QR Code is distributed under LGPL 3 + * Copyright (C) 2010 Dominik Dzienia + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ + + class QRrsblock { + public $dataLength; + public $data = array(); + public $eccLength; + public $ecc = array(); + + public function __construct($dl, $data, $el, &$ecc, QRrsItem $rs) + { + $rs->encode_rs_char($data, $ecc); + + $this->dataLength = $dl; + $this->data = $data; + $this->eccLength = $el; + $this->ecc = $ecc; + } + }; + + //########################################################################## + + class QRrawcode { + public $version; + public $datacode = array(); + public $ecccode = array(); + public $blocks; + public $rsblocks = array(); //of RSblock + public $count; + public $dataLength; + public $eccLength; + public $b1; + + //---------------------------------------------------------------------- + public function __construct(QRinput $input) + { + $spec = array(0,0,0,0,0); + + $this->datacode = $input->getByteStream(); + if(is_null($this->datacode)) { + throw new Exception('null imput string'); + } + + QRspec::getEccSpec($input->getVersion(), $input->getErrorCorrectionLevel(), $spec); + + $this->version = $input->getVersion(); + $this->b1 = QRspec::rsBlockNum1($spec); + $this->dataLength = QRspec::rsDataLength($spec); + $this->eccLength = QRspec::rsEccLength($spec); + $this->ecccode = array_fill(0, $this->eccLength, 0); + $this->blocks = QRspec::rsBlockNum($spec); + + $ret = $this->init($spec); + if($ret < 0) { + throw new Exception('block alloc error'); + return null; + } + + $this->count = 0; + } + + //---------------------------------------------------------------------- + public function init(array $spec) + { + $dl = QRspec::rsDataCodes1($spec); + $el = QRspec::rsEccCodes1($spec); + $rs = QRrs::init_rs(8, 0x11d, 0, 1, $el, 255 - $dl - $el); + + + $blockNo = 0; + $dataPos = 0; + $eccPos = 0; + for($i=0; $iecccode,$eccPos); + $this->rsblocks[$blockNo] = new QRrsblock($dl, array_slice($this->datacode, $dataPos), $el, $ecc, $rs); + $this->ecccode = array_merge(array_slice($this->ecccode,0, $eccPos), $ecc); + + $dataPos += $dl; + $eccPos += $el; + $blockNo++; + } + + if(QRspec::rsBlockNum2($spec) == 0) + return 0; + + $dl = QRspec::rsDataCodes2($spec); + $el = QRspec::rsEccCodes2($spec); + $rs = QRrs::init_rs(8, 0x11d, 0, 1, $el, 255 - $dl - $el); + + if($rs == NULL) return -1; + + for($i=0; $iecccode,$eccPos); + $this->rsblocks[$blockNo] = new QRrsblock($dl, array_slice($this->datacode, $dataPos), $el, $ecc, $rs); + $this->ecccode = array_merge(array_slice($this->ecccode,0, $eccPos), $ecc); + + $dataPos += $dl; + $eccPos += $el; + $blockNo++; + } + + return 0; + } + + //---------------------------------------------------------------------- + public function getCode() + { + $ret; + + if($this->count < $this->dataLength) { + $row = $this->count % $this->blocks; + $col = $this->count / $this->blocks; + if($col >= $this->rsblocks[0]->dataLength) { + $row += $this->b1; + } + $ret = $this->rsblocks[$row]->data[$col]; + } else if($this->count < $this->dataLength + $this->eccLength) { + $row = ($this->count - $this->dataLength) % $this->blocks; + $col = ($this->count - $this->dataLength) / $this->blocks; + $ret = $this->rsblocks[$row]->ecc[$col]; + } else { + return 0; + } + $this->count++; + + return $ret; + } + } + + //########################################################################## + + class QRcode { + + public $version; + public $width; + public $data; + + //---------------------------------------------------------------------- + public function encodeMask(QRinput $input, $mask) + { + if($input->getVersion() < 0 || $input->getVersion() > QRSPEC_VERSION_MAX) { + throw new Exception('wrong version'); + } + if($input->getErrorCorrectionLevel() > QR_ECLEVEL_H) { + throw new Exception('wrong level'); + } + + $raw = new QRrawcode($input); + + QRtools::markTime('after_raw'); + + $version = $raw->version; + $width = QRspec::getWidth($version); + $frame = QRspec::newFrame($version); + + $filler = new FrameFiller($width, $frame); + if(is_null($filler)) { + return NULL; + } + + // inteleaved data and ecc codes + for($i=0; $i<$raw->dataLength + $raw->eccLength; $i++) { + $code = $raw->getCode(); + $bit = 0x80; + for($j=0; $j<8; $j++) { + $addr = $filler->next(); + $filler->setFrameAt($addr, 0x02 | (($bit & $code) != 0)); + $bit = $bit >> 1; + } + } + + QRtools::markTime('after_filler'); + + unset($raw); + + // remainder bits + $j = QRspec::getRemainder($version); + for($i=0; $i<$j; $i++) { + $addr = $filler->next(); + $filler->setFrameAt($addr, 0x02); + } + + $frame = $filler->frame; + unset($filler); + + + // masking + $maskObj = new QRmask(); + if($mask < 0) { + + if (QR_FIND_BEST_MASK) { + $masked = $maskObj->mask($width, $frame, $input->getErrorCorrectionLevel()); + } else { + $masked = $maskObj->makeMask($width, $frame, (intval(QR_DEFAULT_MASK) % 8), $input->getErrorCorrectionLevel()); + } + } else { + $masked = $maskObj->makeMask($width, $frame, $mask, $input->getErrorCorrectionLevel()); + } + + if($masked == NULL) { + return NULL; + } + + QRtools::markTime('after_mask'); + + $this->version = $version; + $this->width = $width; + $this->data = $masked; + + return $this; + } + + //---------------------------------------------------------------------- + public function encodeInput(QRinput $input) + { + return $this->encodeMask($input, -1); + } + + //---------------------------------------------------------------------- + public function encodeString8bit($string, $version, $level) + { + if($string == NULL) { + throw new Exception('empty string!'); + return NULL; + } + + $input = new QRinput($version, $level); + if($input == NULL) return NULL; + + $ret = $input->append($input, QR_MODE_8, strlen($string), str_split($string)); + if($ret < 0) { + unset($input); + return NULL; + } + return $this->encodeInput($input); + } + + //---------------------------------------------------------------------- + public function encodeString($string, $version, $level, $hint, $casesensitive) + { + + if($hint != QR_MODE_8 && $hint != QR_MODE_KANJI) { + throw new Exception('bad hint'); + return NULL; + } + + $input = new QRinput($version, $level); + if($input == NULL) return NULL; + + $ret = QRsplit::splitStringToQRinput($string, $input, $hint, $casesensitive); + if($ret < 0) { + return NULL; + } + + return $this->encodeInput($input); + } + + //---------------------------------------------------------------------- + public static function png($text, $outfile = false, $level = QR_ECLEVEL_L, $size = 3, $margin = 4, $saveandprint=false, $back_color = 0xFFFFFF, $fore_color = 0x000000) + { + $enc = QRencode::factory($level, $size, $margin, $back_color, $fore_color); + return $enc->encodePNG($text, $outfile, $saveandprint=false); + } + + //---------------------------------------------------------------------- + public static function text($text, $outfile = false, $level = QR_ECLEVEL_L, $size = 3, $margin = 4) + { + $enc = QRencode::factory($level, $size, $margin); + return $enc->encode($text, $outfile); + } + + //---------------------------------------------------------------------- + public static function eps($text, $outfile = false, $level = QR_ECLEVEL_L, $size = 3, $margin = 4, $saveandprint=false, $back_color = 0xFFFFFF, $fore_color = 0x000000, $cmyk = false) + { + $enc = QRencode::factory($level, $size, $margin, $back_color, $fore_color, $cmyk); + return $enc->encodeEPS($text, $outfile, $saveandprint=false); + } + + //---------------------------------------------------------------------- + public static function svg($text, $outfile = false, $level = QR_ECLEVEL_L, $size = 3, $margin = 4, $saveandprint=false, $back_color = 0xFFFFFF, $fore_color = 0x000000) + { + $enc = QRencode::factory($level, $size, $margin, $back_color, $fore_color); + return $enc->encodeSVG($text, $outfile, $saveandprint=false); + } + + //---------------------------------------------------------------------- + public static function raw($text, $outfile = false, $level = QR_ECLEVEL_L, $size = 3, $margin = 4) + { + $enc = QRencode::factory($level, $size, $margin); + return $enc->encodeRAW($text, $outfile); + } + } + + //########################################################################## + + class FrameFiller { + + public $width; + public $frame; + public $x; + public $y; + public $dir; + public $bit; + + //---------------------------------------------------------------------- + public function __construct($width, &$frame) + { + $this->width = $width; + $this->frame = $frame; + $this->x = $width - 1; + $this->y = $width - 1; + $this->dir = -1; + $this->bit = -1; + } + + //---------------------------------------------------------------------- + public function setFrameAt($at, $val) + { + $this->frame[$at['y']][$at['x']] = chr($val); + } + + //---------------------------------------------------------------------- + public function getFrameAt($at) + { + return ord($this->frame[$at['y']][$at['x']]); + } + + //---------------------------------------------------------------------- + public function next() + { + do { + + if($this->bit == -1) { + $this->bit = 0; + return array('x'=>$this->x, 'y'=>$this->y); + } + + $x = $this->x; + $y = $this->y; + $w = $this->width; + + if($this->bit == 0) { + $x--; + $this->bit++; + } else { + $x++; + $y += $this->dir; + $this->bit--; + } + + if($this->dir < 0) { + if($y < 0) { + $y = 0; + $x -= 2; + $this->dir = 1; + if($x == 6) { + $x--; + $y = 9; + } + } + } else { + if($y == $w) { + $y = $w - 1; + $x -= 2; + $this->dir = -1; + if($x == 6) { + $x--; + $y -= 8; + } + } + } + if($x < 0 || $y < 0) return null; + + $this->x = $x; + $this->y = $y; + + } while(ord($this->frame[$y][$x]) & 0x80); + + return array('x'=>$x, 'y'=>$y); + } + + } ; + + //########################################################################## + + class QRencode { + + public $casesensitive = true; + public $eightbit = false; + + public $version = 0; + public $size = 3; + public $margin = 4; + public $back_color = 0xFFFFFF; + public $fore_color = 0x000000; + + public $structured = 0; // not supported yet + + public $level = QR_ECLEVEL_L; + public $hint = QR_MODE_8; + + //---------------------------------------------------------------------- + public static function factory($level = QR_ECLEVEL_L, $size = 3, $margin = 4, $back_color = 0xFFFFFF, $fore_color = 0x000000, $cmyk = false) + { + $enc = new QRencode(); + $enc->size = $size; + $enc->margin = $margin; + $enc->fore_color = $fore_color; + $enc->back_color = $back_color; + $enc->cmyk = $cmyk; + + switch ($level.'') { + case '0': + case '1': + case '2': + case '3': + $enc->level = $level; + break; + case 'l': + case 'L': + $enc->level = QR_ECLEVEL_L; + break; + case 'm': + case 'M': + $enc->level = QR_ECLEVEL_M; + break; + case 'q': + case 'Q': + $enc->level = QR_ECLEVEL_Q; + break; + case 'h': + case 'H': + $enc->level = QR_ECLEVEL_H; + break; + } + + return $enc; + } + + //---------------------------------------------------------------------- + public function encodeRAW($intext, $outfile = false) + { + $code = new QRcode(); + + if($this->eightbit) { + $code->encodeString8bit($intext, $this->version, $this->level); + } else { + $code->encodeString($intext, $this->version, $this->level, $this->hint, $this->casesensitive); + } + + return $code->data; + } + + //---------------------------------------------------------------------- + public function encode($intext, $outfile = false) + { + $code = new QRcode(); + + if($this->eightbit) { + $code->encodeString8bit($intext, $this->version, $this->level); + } else { + $code->encodeString($intext, $this->version, $this->level, $this->hint, $this->casesensitive); + } + + QRtools::markTime('after_encode'); + + if ($outfile!== false) { + file_put_contents($outfile, join("\n", QRtools::binarize($code->data))); + } else { + return QRtools::binarize($code->data); + } + } + + //---------------------------------------------------------------------- + public function encodePNG($intext, $outfile = false,$saveandprint=false) + { + try { + + ob_start(); + $tab = $this->encode($intext); + $err = ob_get_contents(); + ob_end_clean(); + + if ($err != '') + QRtools::log($outfile, $err); + + $maxSize = (int)(QR_PNG_MAXIMUM_SIZE / (count($tab)+2*$this->margin)); + + QRimage::png($tab, $outfile, min(max(1, $this->size), $maxSize), $this->margin,$saveandprint, $this->back_color, $this->fore_color); + + } catch (Exception $e) { + + QRtools::log($outfile, $e->getMessage()); + + } + } + + //---------------------------------------------------------------------- + public function encodeEPS($intext, $outfile = false,$saveandprint=false) + { + try { + + ob_start(); + $tab = $this->encode($intext); + $err = ob_get_contents(); + ob_end_clean(); + + if ($err != '') + QRtools::log($outfile, $err); + + $maxSize = (int)(QR_PNG_MAXIMUM_SIZE / (count($tab)+2*$this->margin)); + + QRvect::eps($tab, $outfile, min(max(1, $this->size), $maxSize), $this->margin,$saveandprint, $this->back_color, $this->fore_color, $this->cmyk); + + } catch (Exception $e) { + + QRtools::log($outfile, $e->getMessage()); + + } + } + + //---------------------------------------------------------------------- + public function encodeSVG($intext, $outfile = false,$saveandprint=false) + { + try { + + ob_start(); + $tab = $this->encode($intext); + $err = ob_get_contents(); + ob_end_clean(); + + if ($err != '') + QRtools::log($outfile, $err); + + $maxSize = (int)(QR_PNG_MAXIMUM_SIZE / (count($tab)+2*$this->margin)); + + QRvect::svg($tab, $outfile, min(max(1, $this->size), $maxSize), $this->margin,$saveandprint, $this->back_color, $this->fore_color); + + } catch (Exception $e) { + + QRtools::log($outfile, $e->getMessage()); + + } + } + } + + + + +//---- qrvect.php ----------------------------- + + + + +/* + * PHP QR Code encoder + * + * Image output of code using GD2 + * + * PHP QR Code is distributed under LGPL 3 + * Copyright (C) 2010 Dominik Dzienia + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ + + define('QR_VECT', true); + + class QRvect { + + //---------------------------------------------------------------------- + public static function eps($frame, $filename = false, $pixelPerPoint = 4, $outerFrame = 4,$saveandprint=FALSE, $back_color = 0xFFFFFF, $fore_color = 0x000000, $cmyk = false) + { + $vect = self::vectEPS($frame, $pixelPerPoint, $outerFrame, $back_color, $fore_color, $cmyk); + + if ($filename === false) { + header("Content-Type: application/postscript"); + header('Content-Disposition: filename="qrcode.eps"'); + echo $vect; + } else { + if($saveandprint===TRUE){ + QRtools::save($vect, $filename); + header("Content-Type: application/postscript"); + header('Content-Disposition: filename="qrcode.eps"'); + echo $vect; + }else{ + QRtools::save($vect, $filename); + } + } + } + + + //---------------------------------------------------------------------- + private static function vectEPS($frame, $pixelPerPoint = 4, $outerFrame = 4, $back_color = 0xFFFFFF, $fore_color = 0x000000, $cmyk = false) + { + $h = count($frame); + $w = strlen($frame[0]); + + $imgW = $w + 2*$outerFrame; + $imgH = $h + 2*$outerFrame; + + if ($cmyk) + { + // convert color value into decimal eps format + $c = round((($fore_color & 0xFF000000) >> 16) / 255, 5); + $m = round((($fore_color & 0x00FF0000) >> 16) / 255, 5); + $y = round((($fore_color & 0x0000FF00) >> 8) / 255, 5); + $k = round(($fore_color & 0x000000FF) / 255, 5); + $fore_color_string = $c.' '.$m.' '.$y.' '.$k.' setcmykcolor'."\n"; + + // convert color value into decimal eps format + $c = round((($back_color & 0xFF000000) >> 16) / 255, 5); + $m = round((($back_color & 0x00FF0000) >> 16) / 255, 5); + $y = round((($back_color & 0x0000FF00) >> 8) / 255, 5); + $k = round(($back_color & 0x000000FF) / 255, 5); + $back_color_string = $c.' '.$m.' '.$y.' '.$k.' setcmykcolor'."\n"; + } + else + { + // convert a hexadecimal color code into decimal eps format (green = 0 1 0, blue = 0 0 1, ...) + $r = round((($fore_color & 0xFF0000) >> 16) / 255, 5); + $b = round((($fore_color & 0x00FF00) >> 8) / 255, 5); + $g = round(($fore_color & 0x0000FF) / 255, 5); + $fore_color_string = $r.' '.$b.' '.$g.' setrgbcolor'."\n"; + + // convert a hexadecimal color code into decimal eps format (green = 0 1 0, blue = 0 0 1, ...) + $r = round((($back_color & 0xFF0000) >> 16) / 255, 5); + $b = round((($back_color & 0x00FF00) >> 8) / 255, 5); + $g = round(($back_color & 0x0000FF) / 255, 5); + $back_color_string = $r.' '.$b.' '.$g.' setrgbcolor'."\n"; + } + + $output = + '%!PS-Adobe EPSF-3.0'."\n". + '%%Creator: PHPQrcodeLib'."\n". + '%%Title: QRcode'."\n". + '%%CreationDate: '.date('Y-m-d')."\n". + '%%DocumentData: Clean7Bit'."\n". + '%%LanguageLevel: 2'."\n". + '%%Pages: 1'."\n". + '%%BoundingBox: 0 0 '.$imgW * $pixelPerPoint.' '.$imgH * $pixelPerPoint."\n"; + + // set the scale + $output .= $pixelPerPoint.' '.$pixelPerPoint.' scale'."\n"; + // position the center of the coordinate system + + $output .= $outerFrame.' '.$outerFrame.' translate'."\n"; + + + + + // redefine the 'rectfill' operator to shorten the syntax + $output .= '/F { rectfill } def'."\n"; + + // set the symbol color + $output .= $back_color_string; + $output .= '-'.$outerFrame.' -'.$outerFrame.' '.($w + 2*$outerFrame).' '.($h + 2*$outerFrame).' F'."\n"; + + + // set the symbol color + $output .= $fore_color_string; + + // Convert the matrix into pixels + + for($i=0; $i<$h; $i++) { + for($j=0; $j<$w; $j++) { + if( $frame[$i][$j] == '1') { + $y = $h - 1 - $i; + $x = $j; + $output .= $x.' '.$y.' 1 1 F'."\n"; + } + } + } + + + $output .='%%EOF'; + + return $output; + } + + //---------------------------------------------------------------------- + public static function svg($frame, $filename = false, $pixelPerPoint = 4, $outerFrame = 4,$saveandprint=FALSE, $back_color, $fore_color) + { + $vect = self::vectSVG($frame, $pixelPerPoint, $outerFrame, $back_color, $fore_color); + + if ($filename === false) { + header("Content-Type: image/svg+xml"); + //header('Content-Disposition: attachment, filename="qrcode.svg"'); + echo $vect; + } else { + if($saveandprint===TRUE){ + QRtools::save($vect, $filename); + header("Content-Type: image/svg+xml"); + //header('Content-Disposition: filename="'.$filename.'"'); + echo $vect; + }else{ + QRtools::save($vect, $filename); + } + } + } + + + //---------------------------------------------------------------------- + private static function vectSVG($frame, $pixelPerPoint = 4, $outerFrame = 4, $back_color = 0xFFFFFF, $fore_color = 0x000000) + { + $h = count($frame); + $w = strlen($frame[0]); + + $imgW = $w + 2*$outerFrame; + $imgH = $h + 2*$outerFrame; + + + $output = + ''."\n". + ''."\n". + ''."\n"; + + $output = + ''."\n". + ''."\n". + ''."\n". + ''."\n"; + + if(!empty($back_color)) { + $backgroundcolor = str_pad(dechex($back_color), 6, "0", STR_PAD_LEFT); + $output .= ''."\n"; + } + + $output .= + ''."\n". + ''."\n". + ''."\n". + ''."\n"; + + + // Convert the matrix into pixels + + for($i=0; $i<$h; $i++) { + for($j=0; $j<$w; $j++) { + if( $frame[$i][$j] == '1') { + $y = ($i + $outerFrame) * $pixelPerPoint; + $x = ($j + $outerFrame) * $pixelPerPoint; + $output .= ''."\n"; + } + } + } + $output .= + ''."\n". + ''; + + return $output; + } + } + + + + diff --git a/vendor/crowdfunding2/lib/phpqrcode/qrbitstream.php b/vendor/crowdfunding2/lib/phpqrcode/qrbitstream.php new file mode 100755 index 0000000..c8d1166 --- /dev/null +++ b/vendor/crowdfunding2/lib/phpqrcode/qrbitstream.php @@ -0,0 +1,180 @@ + + * + * PHP QR Code is distributed under LGPL 3 + * Copyright (C) 2010 Dominik Dzienia + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ + + class QRbitstream { + + public $data = array(); + + //---------------------------------------------------------------------- + public function size() + { + return count($this->data); + } + + //---------------------------------------------------------------------- + public function allocate($setLength) + { + $this->data = array_fill(0, $setLength, 0); + return 0; + } + + //---------------------------------------------------------------------- + public static function newFromNum($bits, $num) + { + $bstream = new QRbitstream(); + $bstream->allocate($bits); + + $mask = 1 << ($bits - 1); + for($i=0; $i<$bits; $i++) { + if($num & $mask) { + $bstream->data[$i] = 1; + } else { + $bstream->data[$i] = 0; + } + $mask = $mask >> 1; + } + + return $bstream; + } + + //---------------------------------------------------------------------- + public static function newFromBytes($size, $data) + { + $bstream = new QRbitstream(); + $bstream->allocate($size * 8); + $p=0; + + for($i=0; $i<$size; $i++) { + $mask = 0x80; + for($j=0; $j<8; $j++) { + if($data[$i] & $mask) { + $bstream->data[$p] = 1; + } else { + $bstream->data[$p] = 0; + } + $p++; + $mask = $mask >> 1; + } + } + + return $bstream; + } + + //---------------------------------------------------------------------- + public function append(QRbitstream $arg) + { + if (is_null($arg)) { + return -1; + } + + if($arg->size() == 0) { + return 0; + } + + if($this->size() == 0) { + $this->data = $arg->data; + return 0; + } + + $this->data = array_values(array_merge($this->data, $arg->data)); + + return 0; + } + + //---------------------------------------------------------------------- + public function appendNum($bits, $num) + { + if ($bits == 0) + return 0; + + $b = QRbitstream::newFromNum($bits, $num); + + if(is_null($b)) + return -1; + + $ret = $this->append($b); + unset($b); + + return $ret; + } + + //---------------------------------------------------------------------- + public function appendBytes($size, $data) + { + if ($size == 0) + return 0; + + $b = QRbitstream::newFromBytes($size, $data); + + if(is_null($b)) + return -1; + + $ret = $this->append($b); + unset($b); + + return $ret; + } + + //---------------------------------------------------------------------- + public function toByte() + { + + $size = $this->size(); + + if($size == 0) { + return array(); + } + + $data = array_fill(0, (int)(($size + 7) / 8), 0); + $bytes = (int)($size / 8); + + $p = 0; + + for($i=0; $i<$bytes; $i++) { + $v = 0; + for($j=0; $j<8; $j++) { + $v = $v << 1; + $v |= $this->data[$p]; + $p++; + } + $data[$i] = $v; + } + + if($size & 7) { + $v = 0; + for($j=0; $j<($size & 7); $j++) { + $v = $v << 1; + $v |= $this->data[$p]; + $p++; + } + $data[$bytes] = $v; + } + + return $data; + } + + } diff --git a/vendor/crowdfunding2/lib/phpqrcode/qrconfig.php b/vendor/crowdfunding2/lib/phpqrcode/qrconfig.php new file mode 100755 index 0000000..62e7f97 --- /dev/null +++ b/vendor/crowdfunding2/lib/phpqrcode/qrconfig.php @@ -0,0 +1,17 @@ + + * + * PHP QR Code is distributed under LGPL 3 + * Copyright (C) 2010 Dominik Dzienia + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ + + // Encoding modes + + define('QR_MODE_NUL', -1); + define('QR_MODE_NUM', 0); + define('QR_MODE_AN', 1); + define('QR_MODE_8', 2); + define('QR_MODE_KANJI', 3); + define('QR_MODE_STRUCTURE', 4); + + // Levels of error correction. + + define('QR_ECLEVEL_L', 0); + define('QR_ECLEVEL_M', 1); + define('QR_ECLEVEL_Q', 2); + define('QR_ECLEVEL_H', 3); + + // Supported output formats + + define('QR_FORMAT_TEXT', 0); + define('QR_FORMAT_PNG', 1); + + class qrstr { + public static function set(&$srctab, $x, $y, $repl, $replLen = false) { + $srctab[$y] = substr_replace($srctab[$y], ($replLen !== false)?substr($repl,0,$replLen):$repl, $x, ($replLen !== false)?$replLen:strlen($repl)); + } + } \ No newline at end of file diff --git a/vendor/crowdfunding2/lib/phpqrcode/qrencode.php b/vendor/crowdfunding2/lib/phpqrcode/qrencode.php new file mode 100755 index 0000000..6c210e8 --- /dev/null +++ b/vendor/crowdfunding2/lib/phpqrcode/qrencode.php @@ -0,0 +1,569 @@ + + * + * PHP QR Code is distributed under LGPL 3 + * Copyright (C) 2010 Dominik Dzienia + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ + + class QRrsblock { + public $dataLength; + public $data = array(); + public $eccLength; + public $ecc = array(); + + public function __construct($dl, $data, $el, &$ecc, QRrsItem $rs) + { + $rs->encode_rs_char($data, $ecc); + + $this->dataLength = $dl; + $this->data = $data; + $this->eccLength = $el; + $this->ecc = $ecc; + } + }; + + //########################################################################## + + class QRrawcode { + public $version; + public $datacode = array(); + public $ecccode = array(); + public $blocks; + public $rsblocks = array(); //of RSblock + public $count; + public $dataLength; + public $eccLength; + public $b1; + + //---------------------------------------------------------------------- + public function __construct(QRinput $input) + { + $spec = array(0,0,0,0,0); + + $this->datacode = $input->getByteStream(); + if(is_null($this->datacode)) { + throw new Exception('null imput string'); + } + + QRspec::getEccSpec($input->getVersion(), $input->getErrorCorrectionLevel(), $spec); + + $this->version = $input->getVersion(); + $this->b1 = QRspec::rsBlockNum1($spec); + $this->dataLength = QRspec::rsDataLength($spec); + $this->eccLength = QRspec::rsEccLength($spec); + $this->ecccode = array_fill(0, $this->eccLength, 0); + $this->blocks = QRspec::rsBlockNum($spec); + + $ret = $this->init($spec); + if($ret < 0) { + throw new Exception('block alloc error'); + return null; + } + + $this->count = 0; + } + + //---------------------------------------------------------------------- + public function init(array $spec) + { + $dl = QRspec::rsDataCodes1($spec); + $el = QRspec::rsEccCodes1($spec); + $rs = QRrs::init_rs(8, 0x11d, 0, 1, $el, 255 - $dl - $el); + + + $blockNo = 0; + $dataPos = 0; + $eccPos = 0; + for($i=0; $iecccode,$eccPos); + $this->rsblocks[$blockNo] = new QRrsblock($dl, array_slice($this->datacode, $dataPos), $el, $ecc, $rs); + $this->ecccode = array_merge(array_slice($this->ecccode,0, $eccPos), $ecc); + + $dataPos += $dl; + $eccPos += $el; + $blockNo++; + } + + if(QRspec::rsBlockNum2($spec) == 0) + return 0; + + $dl = QRspec::rsDataCodes2($spec); + $el = QRspec::rsEccCodes2($spec); + $rs = QRrs::init_rs(8, 0x11d, 0, 1, $el, 255 - $dl - $el); + + if($rs == NULL) return -1; + + for($i=0; $iecccode,$eccPos); + $this->rsblocks[$blockNo] = new QRrsblock($dl, array_slice($this->datacode, $dataPos), $el, $ecc, $rs); + $this->ecccode = array_merge(array_slice($this->ecccode,0, $eccPos), $ecc); + + $dataPos += $dl; + $eccPos += $el; + $blockNo++; + } + + return 0; + } + + //---------------------------------------------------------------------- + public function getCode() + { + $ret = NULL; + + if($this->count < $this->dataLength) { + $row = $this->count % $this->blocks; + $col = $this->count / $this->blocks; + if($col >= $this->rsblocks[0]->dataLength) { + $row += $this->b1; + } + $ret = $this->rsblocks[$row]->data[$col]; + } else if($this->count < $this->dataLength + $this->eccLength) { + $row = ($this->count - $this->dataLength) % $this->blocks; + $col = ($this->count - $this->dataLength) / $this->blocks; + $ret = $this->rsblocks[$row]->ecc[$col]; + } else { + return 0; + } + $this->count++; + + return $ret; + } + } + + //########################################################################## + + class QRcode { + + public $version; + public $width; + public $data; + + //---------------------------------------------------------------------- + public function encodeMask(QRinput $input, $mask) + { + if($input->getVersion() < 0 || $input->getVersion() > QRSPEC_VERSION_MAX) { + throw new Exception('wrong version'); + } + if($input->getErrorCorrectionLevel() > QR_ECLEVEL_H) { + throw new Exception('wrong level'); + } + + $raw = new QRrawcode($input); + + QRtools::markTime('after_raw'); + + $version = $raw->version; + $width = QRspec::getWidth($version); + $frame = QRspec::newFrame($version); + + $filler = new FrameFiller($width, $frame); + if(is_null($filler)) { + return NULL; + } + + // inteleaved data and ecc codes + for($i=0; $i<$raw->dataLength + $raw->eccLength; $i++) { + $code = $raw->getCode(); + $bit = 0x80; + for($j=0; $j<8; $j++) { + $addr = $filler->next(); + $filler->setFrameAt($addr, 0x02 | (($bit & $code) != 0)); + $bit = $bit >> 1; + } + } + + QRtools::markTime('after_filler'); + + unset($raw); + + // remainder bits + $j = QRspec::getRemainder($version); + for($i=0; $i<$j; $i++) { + $addr = $filler->next(); + $filler->setFrameAt($addr, 0x02); + } + + $frame = $filler->frame; + unset($filler); + + + // masking + $maskObj = new QRmask(); + if($mask < 0) { + + if (QR_FIND_BEST_MASK) { + $masked = $maskObj->mask($width, $frame, $input->getErrorCorrectionLevel()); + } else { + $masked = $maskObj->makeMask($width, $frame, (intval(QR_DEFAULT_MASK) % 8), $input->getErrorCorrectionLevel()); + } + } else { + $masked = $maskObj->makeMask($width, $frame, $mask, $input->getErrorCorrectionLevel()); + } + + if($masked == NULL) { + return NULL; + } + + QRtools::markTime('after_mask'); + + $this->version = $version; + $this->width = $width; + $this->data = $masked; + + return $this; + } + + //---------------------------------------------------------------------- + public function encodeInput(QRinput $input) + { + return $this->encodeMask($input, -1); + } + + //---------------------------------------------------------------------- + public function encodeString8bit($string, $version, $level) + { + if($string == NULL) { + throw new Exception('empty string!'); + return NULL; + } + + $input = new QRinput($version, $level); + if($input == NULL) return NULL; + + $ret = $input->append($input, QR_MODE_8, strlen($string), str_split($string)); + if($ret < 0) { + unset($input); + return NULL; + } + return $this->encodeInput($input); + } + + //---------------------------------------------------------------------- + public function encodeString($string, $version, $level, $hint, $casesensitive) + { + + if($hint != QR_MODE_8 && $hint != QR_MODE_KANJI) { + throw new Exception('bad hint'); + return NULL; + } + + $input = new QRinput($version, $level); + if($input == NULL) return NULL; + + $ret = QRsplit::splitStringToQRinput($string, $input, $hint, $casesensitive); + if($ret < 0) { + return NULL; + } + + return $this->encodeInput($input); + } + + //---------------------------------------------------------------------- + public static function png($text, $outfile = false, $level = QR_ECLEVEL_L, $size = 3, $margin = 4, $saveandprint=false, $back_color = 0xFFFFFF, $fore_color = 0x000000) + { + $enc = QRencode::factory($level, $size, $margin, $back_color, $fore_color); + return $enc->encodePNG($text, $outfile, $saveandprint=false); + } + + //---------------------------------------------------------------------- + public static function text($text, $outfile = false, $level = QR_ECLEVEL_L, $size = 3, $margin = 4) + { + $enc = QRencode::factory($level, $size, $margin); + return $enc->encode($text, $outfile); + } + + //---------------------------------------------------------------------- + public static function eps($text, $outfile = false, $level = QR_ECLEVEL_L, $size = 3, $margin = 4, $saveandprint=false, $back_color = 0xFFFFFF, $fore_color = 0x000000, $cmyk = false) + { + $enc = QRencode::factory($level, $size, $margin, $back_color, $fore_color, $cmyk); + return $enc->encodeEPS($text, $outfile, $saveandprint=false); + } + + //---------------------------------------------------------------------- + public static function svg($text, $outfile = false, $level = QR_ECLEVEL_L, $size = 3, $margin = 4, $saveandprint=false, $back_color = 0xFFFFFF, $fore_color = 0x000000) + { + $enc = QRencode::factory($level, $size, $margin, $back_color, $fore_color); + return $enc->encodeSVG($text, $outfile, $saveandprint=false); + } + + //---------------------------------------------------------------------- + public static function raw($text, $outfile = false, $level = QR_ECLEVEL_L, $size = 3, $margin = 4) + { + $enc = QRencode::factory($level, $size, $margin); + return $enc->encodeRAW($text, $outfile); + } + } + + //########################################################################## + + class FrameFiller { + + public $width; + public $frame; + public $x; + public $y; + public $dir; + public $bit; + + //---------------------------------------------------------------------- + public function __construct($width, &$frame) + { + $this->width = $width; + $this->frame = $frame; + $this->x = $width - 1; + $this->y = $width - 1; + $this->dir = -1; + $this->bit = -1; + } + + //---------------------------------------------------------------------- + public function setFrameAt($at, $val) + { + $this->frame[$at['y']][$at['x']] = chr($val); + } + + //---------------------------------------------------------------------- + public function getFrameAt($at) + { + return ord($this->frame[$at['y']][$at['x']]); + } + + //---------------------------------------------------------------------- + public function next() + { + do { + + if($this->bit == -1) { + $this->bit = 0; + return array('x'=>$this->x, 'y'=>$this->y); + } + + $x = $this->x; + $y = $this->y; + $w = $this->width; + + if($this->bit == 0) { + $x--; + $this->bit++; + } else { + $x++; + $y += $this->dir; + $this->bit--; + } + + if($this->dir < 0) { + if($y < 0) { + $y = 0; + $x -= 2; + $this->dir = 1; + if($x == 6) { + $x--; + $y = 9; + } + } + } else { + if($y == $w) { + $y = $w - 1; + $x -= 2; + $this->dir = -1; + if($x == 6) { + $x--; + $y -= 8; + } + } + } + if($x < 0 || $y < 0) return null; + + $this->x = $x; + $this->y = $y; + + } while(ord($this->frame[$y][$x]) & 0x80); + + return array('x'=>$x, 'y'=>$y); + } + + } ; + + //########################################################################## + + class QRencode { + + public $casesensitive = true; + public $eightbit = false; + + public $version = 0; + public $size = 3; + public $margin = 4; + public $back_color = 0xFFFFFF; + public $fore_color = 0x000000; + + public $structured = 0; // not supported yet + + public $level = QR_ECLEVEL_L; + public $hint = QR_MODE_8; + + //---------------------------------------------------------------------- + public static function factory($level = QR_ECLEVEL_L, $size = 3, $margin = 4, $back_color = 0xFFFFFF, $fore_color = 0x000000, $cmyk = false) + { + $enc = new QRencode(); + $enc->size = $size; + $enc->margin = $margin; + $enc->fore_color = $fore_color; + $enc->back_color = $back_color; + $enc->cmyk = $cmyk; + + switch ($level.'') { + case '0': + case '1': + case '2': + case '3': + $enc->level = $level; + break; + case 'l': + case 'L': + $enc->level = QR_ECLEVEL_L; + break; + case 'm': + case 'M': + $enc->level = QR_ECLEVEL_M; + break; + case 'q': + case 'Q': + $enc->level = QR_ECLEVEL_Q; + break; + case 'h': + case 'H': + $enc->level = QR_ECLEVEL_H; + break; + } + + return $enc; + } + + //---------------------------------------------------------------------- + public function encodeRAW($intext, $outfile = false) + { + $code = new QRcode(); + + if($this->eightbit) { + $code->encodeString8bit($intext, $this->version, $this->level); + } else { + $code->encodeString($intext, $this->version, $this->level, $this->hint, $this->casesensitive); + } + + return $code->data; + } + + //---------------------------------------------------------------------- + public function encode($intext, $outfile = false) + { + $code = new QRcode(); + + if($this->eightbit) { + $code->encodeString8bit($intext, $this->version, $this->level); + } else { + $code->encodeString($intext, $this->version, $this->level, $this->hint, $this->casesensitive); + } + + QRtools::markTime('after_encode'); + + if ($outfile!== false) { + file_put_contents($outfile, join("\n", QRtools::binarize($code->data))); + } else { + return QRtools::binarize($code->data); + } + } + + //---------------------------------------------------------------------- + public function encodePNG($intext, $outfile = false,$saveandprint=false) + { + try { + + ob_start(); + $tab = $this->encode($intext); + $err = ob_get_contents(); + ob_end_clean(); + + if ($err != '') + QRtools::log($outfile, $err); + + $maxSize = (int)(QR_PNG_MAXIMUM_SIZE / (count($tab)+2*$this->margin)); + + QRimage::png($tab, $outfile, min(max(1, $this->size), $maxSize), $this->margin,$saveandprint, $this->back_color, $this->fore_color); + + } catch (Exception $e) { + + QRtools::log($outfile, $e->getMessage()); + + } + } + + //---------------------------------------------------------------------- + public function encodeEPS($intext, $outfile = false,$saveandprint=false) + { + try { + + ob_start(); + $tab = $this->encode($intext); + $err = ob_get_contents(); + ob_end_clean(); + + if ($err != '') + QRtools::log($outfile, $err); + + $maxSize = (int)(QR_PNG_MAXIMUM_SIZE / (count($tab)+2*$this->margin)); + + QRvect::eps($tab, $outfile, min(max(1, $this->size), $maxSize), $this->margin,$saveandprint, $this->back_color, $this->fore_color, $this->cmyk); + + } catch (Exception $e) { + + QRtools::log($outfile, $e->getMessage()); + + } + } + + //---------------------------------------------------------------------- + public function encodeSVG($intext, $outfile = false,$saveandprint=false) + { + try { + + ob_start(); + $tab = $this->encode($intext); + $err = ob_get_contents(); + ob_end_clean(); + + if ($err != '') + QRtools::log($outfile, $err); + + $maxSize = (int)(QR_PNG_MAXIMUM_SIZE / (count($tab)+2*$this->margin)); + + QRvect::svg($tab, $outfile, min(max(1, $this->size), $maxSize), $this->margin,$saveandprint, $this->back_color, $this->fore_color); + + } catch (Exception $e) { + + QRtools::log($outfile, $e->getMessage()); + + } + } + } diff --git a/vendor/crowdfunding2/lib/phpqrcode/qrimage.php b/vendor/crowdfunding2/lib/phpqrcode/qrimage.php new file mode 100755 index 0000000..48048e8 --- /dev/null +++ b/vendor/crowdfunding2/lib/phpqrcode/qrimage.php @@ -0,0 +1,107 @@ + + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ + + define('QR_IMAGE', true); + + class QRimage { + + //---------------------------------------------------------------------- + public static function png($frame, $filename = false, $pixelPerPoint = 4, $outerFrame = 4,$saveandprint=FALSE, $back_color, $fore_color) + { + $image = self::image($frame, $pixelPerPoint, $outerFrame, $back_color, $fore_color); + + if ($filename === false) { + Header("Content-type: image/png"); + ImagePng($image); + } else { + if($saveandprint===TRUE){ + ImagePng($image, $filename); + header("Content-type: image/png"); + ImagePng($image); + }else{ + ImagePng($image, $filename); + } + } + + ImageDestroy($image); + } + + //---------------------------------------------------------------------- + public static function jpg($frame, $filename = false, $pixelPerPoint = 8, $outerFrame = 4, $q = 85) + { + $image = self::image($frame, $pixelPerPoint, $outerFrame); + + if ($filename === false) { + Header("Content-type: image/jpeg"); + ImageJpeg($image, null, $q); + } else { + ImageJpeg($image, $filename, $q); + } + + ImageDestroy($image); + } + + //---------------------------------------------------------------------- + private static function image($frame, $pixelPerPoint = 4, $outerFrame = 4, $back_color = 0xFFFFFF, $fore_color = 0x000000) + { + $h = count($frame); + $w = strlen($frame[0]); + + $imgW = $w + 2*$outerFrame; + $imgH = $h + 2*$outerFrame; + + $base_image =ImageCreate($imgW, $imgH); + + // convert a hexadecimal color code into decimal format (red = 255 0 0, green = 0 255 0, blue = 0 0 255) + $r1 = round((($fore_color & 0xFF0000) >> 16), 5); + $g1 = round((($fore_color & 0x00FF00) >> 8), 5); + $b1 = round(($fore_color & 0x0000FF), 5); + + // convert a hexadecimal color code into decimal format (red = 255 0 0, green = 0 255 0, blue = 0 0 255) + $r2 = round((($back_color & 0xFF0000) >> 16), 5); + $g2 = round((($back_color & 0x00FF00) >> 8), 5); + $b2 = round(($back_color & 0x0000FF), 5); + + + + $col[0] = ImageColorAllocate($base_image, $r2, $g2, $b2); + $col[1] = ImageColorAllocate($base_image, $r1, $g1, $b1); + + imagefill($base_image, 0, 0, $col[0]); + + for($y=0; $y<$h; $y++) { + for($x=0; $x<$w; $x++) { + if ($frame[$y][$x] == '1') { + ImageSetPixel($base_image,$x+$outerFrame,$y+$outerFrame,$col[1]); + } + } + } + + $target_image =ImageCreate($imgW * $pixelPerPoint, $imgH * $pixelPerPoint); + ImageCopyResized($target_image, $base_image, 0, 0, 0, 0, $imgW * $pixelPerPoint, $imgH * $pixelPerPoint, $imgW, $imgH); + ImageDestroy($base_image); + + return $target_image; + } + } diff --git a/vendor/crowdfunding2/lib/phpqrcode/qrinput.php b/vendor/crowdfunding2/lib/phpqrcode/qrinput.php new file mode 100755 index 0000000..11f8e1c --- /dev/null +++ b/vendor/crowdfunding2/lib/phpqrcode/qrinput.php @@ -0,0 +1,726 @@ + + * + * PHP QR Code is distributed under LGPL 3 + * Copyright (C) 2010 Dominik Dzienia + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ + + define('STRUCTURE_HEADER_BITS', 20); + define('MAX_STRUCTURED_SYMBOLS', 16); + + class QRinputItem { + + public $mode; + public $size; + public $data; + public $bstream; + + public function __construct($mode, $size, $data, $bstream = null) + { + $setData = array_slice($data, 0, $size); + + if (count($setData) < $size) { + $setData = array_merge($setData, array_fill(0,$size-count($setData),0)); + } + + if(!QRinput::check($mode, $size, $setData)) { + throw new Exception('Error m:'.$mode.',s:'.$size.',d:'.join(',',$setData)); + } + + $this->mode = $mode; + $this->size = $size; + $this->data = $setData; + $this->bstream = $bstream; + } + + //---------------------------------------------------------------------- + public function encodeModeNum($version) + { + try { + + $words = (int)($this->size / 3); + $bs = new QRbitstream(); + + $val = 0x1; + $bs->appendNum(4, $val); + $bs->appendNum(QRspec::lengthIndicator(QR_MODE_NUM, $version), $this->size); + + for($i=0; $i<$words; $i++) { + $val = (ord($this->data[$i*3 ]) - ord('0')) * 100; + $val += (ord($this->data[$i*3+1]) - ord('0')) * 10; + $val += (ord($this->data[$i*3+2]) - ord('0')); + $bs->appendNum(10, $val); + } + + if($this->size - $words * 3 == 1) { + $val = ord($this->data[$words*3]) - ord('0'); + $bs->appendNum(4, $val); + } else if($this->size - $words * 3 == 2) { + $val = (ord($this->data[$words*3 ]) - ord('0')) * 10; + $val += (ord($this->data[$words*3+1]) - ord('0')); + $bs->appendNum(7, $val); + } + + $this->bstream = $bs; + return 0; + + } catch (Exception $e) { + return -1; + } + } + + //---------------------------------------------------------------------- + public function encodeModeAn($version) + { + try { + $words = (int)($this->size / 2); + $bs = new QRbitstream(); + + $bs->appendNum(4, 0x02); + $bs->appendNum(QRspec::lengthIndicator(QR_MODE_AN, $version), $this->size); + + for($i=0; $i<$words; $i++) { + $val = (int)QRinput::lookAnTable(ord($this->data[$i*2 ])) * 45; + $val += (int)QRinput::lookAnTable(ord($this->data[$i*2+1])); + + $bs->appendNum(11, $val); + } + + if($this->size & 1) { + $val = QRinput::lookAnTable(ord($this->data[$words * 2])); + $bs->appendNum(6, $val); + } + + $this->bstream = $bs; + return 0; + + } catch (Exception $e) { + return -1; + } + } + + //---------------------------------------------------------------------- + public function encodeMode8($version) + { + try { + $bs = new QRbitstream(); + + $bs->appendNum(4, 0x4); + $bs->appendNum(QRspec::lengthIndicator(QR_MODE_8, $version), $this->size); + + for($i=0; $i<$this->size; $i++) { + $bs->appendNum(8, ord($this->data[$i])); + } + + $this->bstream = $bs; + return 0; + + } catch (Exception $e) { + return -1; + } + } + + //---------------------------------------------------------------------- + public function encodeModeKanji($version) + { + try { + + $bs = new QRbitrtream(); + + $bs->appendNum(4, 0x8); + $bs->appendNum(QRspec::lengthIndicator(QR_MODE_KANJI, $version), (int)($this->size / 2)); + + for($i=0; $i<$this->size; $i+=2) { + $val = (ord($this->data[$i]) << 8) | ord($this->data[$i+1]); + if($val <= 0x9ffc) { + $val -= 0x8140; + } else { + $val -= 0xc140; + } + + $h = ($val >> 8) * 0xc0; + $val = ($val & 0xff) + $h; + + $bs->appendNum(13, $val); + } + + $this->bstream = $bs; + return 0; + + } catch (Exception $e) { + return -1; + } + } + + //---------------------------------------------------------------------- + public function encodeModeStructure() + { + try { + $bs = new QRbitstream(); + + $bs->appendNum(4, 0x03); + $bs->appendNum(4, ord($this->data[1]) - 1); + $bs->appendNum(4, ord($this->data[0]) - 1); + $bs->appendNum(8, ord($this->data[2])); + + $this->bstream = $bs; + return 0; + + } catch (Exception $e) { + return -1; + } + } + + //---------------------------------------------------------------------- + public function estimateBitStreamSizeOfEntry($version) + { + $bits = 0; + + if($version == 0) + $version = 1; + + switch($this->mode) { + case QR_MODE_NUM: $bits = QRinput::estimateBitsModeNum($this->size); break; + case QR_MODE_AN: $bits = QRinput::estimateBitsModeAn($this->size); break; + case QR_MODE_8: $bits = QRinput::estimateBitsMode8($this->size); break; + case QR_MODE_KANJI: $bits = QRinput::estimateBitsModeKanji($this->size);break; + case QR_MODE_STRUCTURE: return STRUCTURE_HEADER_BITS; + default: + return 0; + } + + $l = QRspec::lengthIndicator($this->mode, $version); + $m = 1 << $l; + $num = (int)(($this->size + $m - 1) / $m); + + $bits += $num * (4 + $l); + + return $bits; + } + + //---------------------------------------------------------------------- + public function encodeBitStream($version) + { + try { + + unset($this->bstream); + $words = QRspec::maximumWords($this->mode, $version); + + if($this->size > $words) { + + $st1 = new QRinputItem($this->mode, $words, $this->data); + $st2 = new QRinputItem($this->mode, $this->size - $words, array_slice($this->data, $words)); + + $st1->encodeBitStream($version); + $st2->encodeBitStream($version); + + $this->bstream = new QRbitstream(); + $this->bstream->append($st1->bstream); + $this->bstream->append($st2->bstream); + + unset($st1); + unset($st2); + + } else { + + $ret = 0; + + switch($this->mode) { + case QR_MODE_NUM: $ret = $this->encodeModeNum($version); break; + case QR_MODE_AN: $ret = $this->encodeModeAn($version); break; + case QR_MODE_8: $ret = $this->encodeMode8($version); break; + case QR_MODE_KANJI: $ret = $this->encodeModeKanji($version);break; + case QR_MODE_STRUCTURE: $ret = $this->encodeModeStructure(); break; + + default: + break; + } + + if($ret < 0) + return -1; + } + + return $this->bstream->size(); + + } catch (Exception $e) { + return -1; + } + } + }; + + //########################################################################## + + class QRinput { + + public $items; + + private $version; + private $level; + + //---------------------------------------------------------------------- + public function __construct($version = 0, $level = QR_ECLEVEL_L) + { + if ($version < 0 || $version > QRSPEC_VERSION_MAX || $level > QR_ECLEVEL_H) { + throw new Exception('Invalid version no'); + } + + $this->version = $version; + $this->level = $level; + } + + //---------------------------------------------------------------------- + public function getVersion() + { + return $this->version; + } + + //---------------------------------------------------------------------- + public function setVersion($version) + { + if($version < 0 || $version > QRSPEC_VERSION_MAX) { + throw new Exception('Invalid version no'); + return -1; + } + + $this->version = $version; + + return 0; + } + + //---------------------------------------------------------------------- + public function getErrorCorrectionLevel() + { + return $this->level; + } + + //---------------------------------------------------------------------- + public function setErrorCorrectionLevel($level) + { + if($level > QR_ECLEVEL_H) { + throw new Exception('Invalid ECLEVEL'); + return -1; + } + + $this->level = $level; + + return 0; + } + + //---------------------------------------------------------------------- + public function appendEntry(QRinputItem $entry) + { + $this->items[] = $entry; + } + + //---------------------------------------------------------------------- + public function append($mode, $size, $data) + { + try { + $entry = new QRinputItem($mode, $size, $data); + $this->items[] = $entry; + return 0; + } catch (Exception $e) { + return -1; + } + } + + //---------------------------------------------------------------------- + + public function insertStructuredAppendHeader($size, $index, $parity) + { + if( $size > MAX_STRUCTURED_SYMBOLS ) { + throw new Exception('insertStructuredAppendHeader wrong size'); + } + + if( $index <= 0 || $index > MAX_STRUCTURED_SYMBOLS ) { + throw new Exception('insertStructuredAppendHeader wrong index'); + } + + $buf = array($size, $index, $parity); + + try { + $entry = new QRinputItem(QR_MODE_STRUCTURE, 3, buf); + array_unshift($this->items, $entry); + return 0; + } catch (Exception $e) { + return -1; + } + } + + //---------------------------------------------------------------------- + public function calcParity() + { + $parity = 0; + + foreach($this->items as $item) { + if($item->mode != QR_MODE_STRUCTURE) { + for($i=$item->size-1; $i>=0; $i--) { + $parity ^= $item->data[$i]; + } + } + } + + return $parity; + } + + //---------------------------------------------------------------------- + public static function checkModeNum($size, $data) + { + for($i=0; $i<$size; $i++) { + if((ord($data[$i]) < ord('0')) || (ord($data[$i]) > ord('9'))){ + return false; + } + } + + return true; + } + + //---------------------------------------------------------------------- + public static function estimateBitsModeNum($size) + { + $w = (int)$size / 3; + $bits = $w * 10; + + switch($size - $w * 3) { + case 1: + $bits += 4; + break; + case 2: + $bits += 7; + break; + default: + break; + } + + return $bits; + } + + //---------------------------------------------------------------------- + public static $anTable = array( + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 36, -1, -1, -1, 37, 38, -1, -1, -1, -1, 39, 40, -1, 41, 42, 43, + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 44, -1, -1, -1, -1, -1, + -1, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, + 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 + ); + + //---------------------------------------------------------------------- + public static function lookAnTable($c) + { + return (($c > 127)?-1:self::$anTable[$c]); + } + + //---------------------------------------------------------------------- + public static function checkModeAn($size, $data) + { + for($i=0; $i<$size; $i++) { + if (self::lookAnTable(ord($data[$i])) == -1) { + return false; + } + } + + return true; + } + + //---------------------------------------------------------------------- + public static function estimateBitsModeAn($size) + { + $w = (int)($size / 2); + $bits = $w * 11; + + if($size & 1) { + $bits += 6; + } + + return $bits; + } + + //---------------------------------------------------------------------- + public static function estimateBitsMode8($size) + { + return $size * 8; + } + + //---------------------------------------------------------------------- + public function estimateBitsModeKanji($size) + { + return (int)(($size / 2) * 13); + } + + //---------------------------------------------------------------------- + public static function checkModeKanji($size, $data) + { + if($size & 1) + return false; + + for($i=0; $i<$size; $i+=2) { + $val = (ord($data[$i]) << 8) | ord($data[$i+1]); + if( $val < 0x8140 + || ($val > 0x9ffc && $val < 0xe040) + || $val > 0xebbf) { + return false; + } + } + + return true; + } + + /*********************************************************************** + * Validation + **********************************************************************/ + + public static function check($mode, $size, $data) + { + if($size <= 0) + return false; + + switch($mode) { + case QR_MODE_NUM: return self::checkModeNum($size, $data); break; + case QR_MODE_AN: return self::checkModeAn($size, $data); break; + case QR_MODE_KANJI: return self::checkModeKanji($size, $data); break; + case QR_MODE_8: return true; break; + case QR_MODE_STRUCTURE: return true; break; + + default: + break; + } + + return false; + } + + + //---------------------------------------------------------------------- + public function estimateBitStreamSize($version) + { + $bits = 0; + + foreach($this->items as $item) { + $bits += $item->estimateBitStreamSizeOfEntry($version); + } + + return $bits; + } + + //---------------------------------------------------------------------- + public function estimateVersion() + { + $version = 0; + $prev = 0; + do { + $prev = $version; + $bits = $this->estimateBitStreamSize($prev); + $version = QRspec::getMinimumVersion((int)(($bits + 7) / 8), $this->level); + if ($version < 0) { + return -1; + } + } while ($version > $prev); + + return $version; + } + + //---------------------------------------------------------------------- + public static function lengthOfCode($mode, $version, $bits) + { + $payload = $bits - 4 - QRspec::lengthIndicator($mode, $version); + switch($mode) { + case QR_MODE_NUM: + $chunks = (int)($payload / 10); + $remain = $payload - $chunks * 10; + $size = $chunks * 3; + if($remain >= 7) { + $size += 2; + } else if($remain >= 4) { + $size += 1; + } + break; + case QR_MODE_AN: + $chunks = (int)($payload / 11); + $remain = $payload - $chunks * 11; + $size = $chunks * 2; + if($remain >= 6) + $size++; + break; + case QR_MODE_8: + $size = (int)($payload / 8); + break; + case QR_MODE_KANJI: + $size = (int)(($payload / 13) * 2); + break; + case QR_MODE_STRUCTURE: + $size = (int)($payload / 8); + break; + default: + $size = 0; + break; + } + + $maxsize = QRspec::maximumWords($mode, $version); + if($size < 0) $size = 0; + if($size > $maxsize) $size = $maxsize; + + return $size; + } + + //---------------------------------------------------------------------- + public function createBitStream() + { + $total = 0; + + foreach($this->items as $item) { + $bits = $item->encodeBitStream($this->version); + + if($bits < 0) + return -1; + + $total += $bits; + } + + return $total; + } + + //---------------------------------------------------------------------- + public function convertData() + { + $ver = $this->estimateVersion(); + if($ver > $this->getVersion()) { + $this->setVersion($ver); + } + + for(;;) { + $bits = $this->createBitStream(); + + if($bits < 0) + return -1; + + $ver = QRspec::getMinimumVersion((int)(($bits + 7) / 8), $this->level); + if($ver < 0) { + throw new Exception('WRONG VERSION'); + } else if($ver > $this->getVersion()) { + $this->setVersion($ver); + } else { + break; + } + } + + return 0; + } + + //---------------------------------------------------------------------- + public function appendPaddingBit(&$bstream) + { + $bits = $bstream->size(); + $maxwords = QRspec::getDataLength($this->version, $this->level); + $maxbits = $maxwords * 8; + + if ($maxbits == $bits) { + return 0; + } + + if ($maxbits - $bits < 5) { + return $bstream->appendNum($maxbits - $bits, 0); + } + + $bits += 4; + $words = (int)(($bits + 7) / 8); + + $padding = new QRbitstream(); + $ret = $padding->appendNum($words * 8 - $bits + 4, 0); + + if($ret < 0) + return $ret; + + $padlen = $maxwords - $words; + + if($padlen > 0) { + + $padbuf = array(); + for($i=0; $i<$padlen; $i++) { + $padbuf[$i] = ($i&1)?0x11:0xec; + } + + $ret = $padding->appendBytes($padlen, $padbuf); + + if($ret < 0) + return $ret; + + } + + $ret = $bstream->append($padding); + + return $ret; + } + + //---------------------------------------------------------------------- + public function mergeBitStream() + { + if($this->convertData() < 0) { + return null; + } + + $bstream = new QRbitstream(); + + foreach($this->items as $item) { + $ret = $bstream->append($item->bstream); + if($ret < 0) { + return null; + } + } + + return $bstream; + } + + //---------------------------------------------------------------------- + public function getBitStream() + { + + $bstream = $this->mergeBitStream(); + + if($bstream == null) { + return null; + } + + $ret = $this->appendPaddingBit($bstream); + if($ret < 0) { + return null; + } + + return $bstream; + } + + //---------------------------------------------------------------------- + public function getByteStream() + { + $bstream = $this->getBitStream(); + if($bstream == null) { + return null; + } + + return $bstream->toByte(); + } + } + + + \ No newline at end of file diff --git a/vendor/crowdfunding2/lib/phpqrcode/qrlib.php b/vendor/crowdfunding2/lib/phpqrcode/qrlib.php new file mode 100755 index 0000000..768d534 --- /dev/null +++ b/vendor/crowdfunding2/lib/phpqrcode/qrlib.php @@ -0,0 +1,44 @@ + + * + * PHP QR Code is distributed under LGPL 3 + * Copyright (C) 2010 Dominik Dzienia + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ + + $QR_BASEDIR = dirname(__FILE__).DIRECTORY_SEPARATOR; + + // Required libs + + include $QR_BASEDIR."qrconst.php"; + include $QR_BASEDIR."qrconfig.php"; + include $QR_BASEDIR."qrtools.php"; + include $QR_BASEDIR."qrspec.php"; + include $QR_BASEDIR."qrimage.php"; + include $QR_BASEDIR."qrvect.php"; + include $QR_BASEDIR."qrinput.php"; + include $QR_BASEDIR."qrbitstream.php"; + include $QR_BASEDIR."qrsplit.php"; + include $QR_BASEDIR."qrrscode.php"; + include $QR_BASEDIR."qrmask.php"; + include $QR_BASEDIR."qrencode.php"; + diff --git a/vendor/crowdfunding2/lib/phpqrcode/qrmask.php b/vendor/crowdfunding2/lib/phpqrcode/qrmask.php new file mode 100755 index 0000000..955aaf0 --- /dev/null +++ b/vendor/crowdfunding2/lib/phpqrcode/qrmask.php @@ -0,0 +1,328 @@ + + * + * PHP QR Code is distributed under LGPL 3 + * Copyright (C) 2010 Dominik Dzienia + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ + + define('N1', 3); + define('N2', 3); + define('N3', 40); + define('N4', 10); + + class QRmask { + + public $runLength = array(); + + //---------------------------------------------------------------------- + public function __construct() + { + $this->runLength = array_fill(0, QRSPEC_WIDTH_MAX + 1, 0); + } + + //---------------------------------------------------------------------- + public function writeFormatInformation($width, &$frame, $mask, $level) + { + $blacks = 0; + $format = QRspec::getFormatInfo($mask, $level); + + for($i=0; $i<8; $i++) { + if($format & 1) { + $blacks += 2; + $v = 0x85; + } else { + $v = 0x84; + } + + $frame[8][$width - 1 - $i] = chr($v); + if($i < 6) { + $frame[$i][8] = chr($v); + } else { + $frame[$i + 1][8] = chr($v); + } + $format = $format >> 1; + } + + for($i=0; $i<7; $i++) { + if($format & 1) { + $blacks += 2; + $v = 0x85; + } else { + $v = 0x84; + } + + $frame[$width - 7 + $i][8] = chr($v); + if($i == 0) { + $frame[8][7] = chr($v); + } else { + $frame[8][6 - $i] = chr($v); + } + + $format = $format >> 1; + } + + return $blacks; + } + + //---------------------------------------------------------------------- + public function mask0($x, $y) { return ($x+$y)&1; } + public function mask1($x, $y) { return ($y&1); } + public function mask2($x, $y) { return ($x%3); } + public function mask3($x, $y) { return ($x+$y)%3; } + public function mask4($x, $y) { return (((int)($y/2))+((int)($x/3)))&1; } + public function mask5($x, $y) { return (($x*$y)&1)+($x*$y)%3; } + public function mask6($x, $y) { return ((($x*$y)&1)+($x*$y)%3)&1; } + public function mask7($x, $y) { return ((($x*$y)%3)+(($x+$y)&1))&1; } + + //---------------------------------------------------------------------- + private function generateMaskNo($maskNo, $width, $frame) + { + $bitMask = array_fill(0, $width, array_fill(0, $width, 0)); + + for($y=0; $y<$width; $y++) { + for($x=0; $x<$width; $x++) { + if(ord($frame[$y][$x]) & 0x80) { + $bitMask[$y][$x] = 0; + } else { + $maskFunc = call_user_func(array($this, 'mask'.$maskNo), $x, $y); + $bitMask[$y][$x] = ($maskFunc == 0)?1:0; + } + + } + } + + return $bitMask; + } + + //---------------------------------------------------------------------- + public static function serial($bitFrame) + { + $codeArr = array(); + + foreach ($bitFrame as $line) + $codeArr[] = join('', $line); + + return gzcompress(join("\n", $codeArr), 9); + } + + //---------------------------------------------------------------------- + public static function unserial($code) + { + $codeArr = array(); + + $codeLines = explode("\n", gzuncompress($code)); + foreach ($codeLines as $line) + $codeArr[] = str_split($line); + + return $codeArr; + } + + //---------------------------------------------------------------------- + public function makeMaskNo($maskNo, $width, $s, &$d, $maskGenOnly = false) + { + $b = 0; + $bitMask = array(); + + $fileName = QR_CACHE_DIR.'mask_'.$maskNo.DIRECTORY_SEPARATOR.'mask_'.$width.'_'.$maskNo.'.dat'; + + if (QR_CACHEABLE) { + if (file_exists($fileName)) { + $bitMask = self::unserial(file_get_contents($fileName)); + } else { + $bitMask = $this->generateMaskNo($maskNo, $width, $s, $d); + if (!file_exists(QR_CACHE_DIR.'mask_'.$maskNo)) + mkdir(QR_CACHE_DIR.'mask_'.$maskNo); + file_put_contents($fileName, self::serial($bitMask)); + } + } else { + $bitMask = $this->generateMaskNo($maskNo, $width, $s, $d); + } + + if ($maskGenOnly) + return; + + $d = $s; + + for($y=0; $y<$width; $y++) { + for($x=0; $x<$width; $x++) { + if($bitMask[$y][$x] == 1) { + $d[$y][$x] = chr(ord($s[$y][$x]) ^ (int)$bitMask[$y][$x]); + } + $b += (int)(ord($d[$y][$x]) & 1); + } + } + + return $b; + } + + //---------------------------------------------------------------------- + public function makeMask($width, $frame, $maskNo, $level) + { + $masked = array_fill(0, $width, str_repeat("\0", $width)); + $this->makeMaskNo($maskNo, $width, $frame, $masked); + $this->writeFormatInformation($width, $masked, $maskNo, $level); + + return $masked; + } + + //---------------------------------------------------------------------- + public function calcN1N3($length) + { + $demerit = 0; + + for($i=0; $i<$length; $i++) { + + if($this->runLength[$i] >= 5) { + $demerit += (N1 + ($this->runLength[$i] - 5)); + } + if($i & 1) { + if(($i >= 3) && ($i < ($length-2)) && ($this->runLength[$i] % 3 == 0)) { + $fact = (int)($this->runLength[$i] / 3); + if(($this->runLength[$i-2] == $fact) && + ($this->runLength[$i-1] == $fact) && + ($this->runLength[$i+1] == $fact) && + ($this->runLength[$i+2] == $fact)) { + if(($this->runLength[$i-3] < 0) || ($this->runLength[$i-3] >= (4 * $fact))) { + $demerit += N3; + } else if((($i+3) >= $length) || ($this->runLength[$i+3] >= (4 * $fact))) { + $demerit += N3; + } + } + } + } + } + return $demerit; + } + + //---------------------------------------------------------------------- + public function evaluateSymbol($width, $frame) + { + $head = 0; + $demerit = 0; + + for($y=0; $y<$width; $y++) { + $head = 0; + $this->runLength[0] = 1; + + $frameY = $frame[$y]; + + if ($y>0) + $frameYM = $frame[$y-1]; + + for($x=0; $x<$width; $x++) { + if(($x > 0) && ($y > 0)) { + $b22 = ord($frameY[$x]) & ord($frameY[$x-1]) & ord($frameYM[$x]) & ord($frameYM[$x-1]); + $w22 = ord($frameY[$x]) | ord($frameY[$x-1]) | ord($frameYM[$x]) | ord($frameYM[$x-1]); + + if(($b22 | ($w22 ^ 1))&1) { + $demerit += N2; + } + } + if(($x == 0) && (ord($frameY[$x]) & 1)) { + $this->runLength[0] = -1; + $head = 1; + $this->runLength[$head] = 1; + } else if($x > 0) { + if((ord($frameY[$x]) ^ ord($frameY[$x-1])) & 1) { + $head++; + $this->runLength[$head] = 1; + } else { + $this->runLength[$head]++; + } + } + } + + $demerit += $this->calcN1N3($head+1); + } + + for($x=0; $x<$width; $x++) { + $head = 0; + $this->runLength[0] = 1; + + for($y=0; $y<$width; $y++) { + if($y == 0 && (ord($frame[$y][$x]) & 1)) { + $this->runLength[0] = -1; + $head = 1; + $this->runLength[$head] = 1; + } else if($y > 0) { + if((ord($frame[$y][$x]) ^ ord($frame[$y-1][$x])) & 1) { + $head++; + $this->runLength[$head] = 1; + } else { + $this->runLength[$head]++; + } + } + } + + $demerit += $this->calcN1N3($head+1); + } + + return $demerit; + } + + + //---------------------------------------------------------------------- + public function mask($width, $frame, $level) + { + $minDemerit = PHP_INT_MAX; + $bestMaskNum = 0; + $bestMask = array(); + + $checked_masks = array(0,1,2,3,4,5,6,7); + + if (QR_FIND_FROM_RANDOM !== false) { + + $howManuOut = 8-(QR_FIND_FROM_RANDOM % 9); + for ($i = 0; $i < $howManuOut; $i++) { + $remPos = rand (0, count($checked_masks)-1); + unset($checked_masks[$remPos]); + $checked_masks = array_values($checked_masks); + } + + } + + $bestMask = $frame; + + foreach($checked_masks as $i) { + $mask = array_fill(0, $width, str_repeat("\0", $width)); + + $demerit = 0; + $blacks = 0; + $blacks = $this->makeMaskNo($i, $width, $frame, $mask); + $blacks += $this->writeFormatInformation($width, $mask, $i, $level); + $blacks = (int)(100 * $blacks / ($width * $width)); + $demerit = (int)((int)(abs($blacks - 50) / 5) * N4); + $demerit += $this->evaluateSymbol($width, $mask); + + if($demerit < $minDemerit) { + $minDemerit = $demerit; + $bestMask = $mask; + $bestMaskNum = $i; + } + } + + return $bestMask; + } + + //---------------------------------------------------------------------- + } diff --git a/vendor/crowdfunding2/lib/phpqrcode/qrrscode.php b/vendor/crowdfunding2/lib/phpqrcode/qrrscode.php new file mode 100755 index 0000000..d7a97d9 --- /dev/null +++ b/vendor/crowdfunding2/lib/phpqrcode/qrrscode.php @@ -0,0 +1,210 @@ + + * + * PHP QR Code is distributed under LGPL 3 + * Copyright (C) 2010 Dominik Dzienia + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ + + class QRrsItem { + + public $mm; // Bits per symbol + public $nn; // Symbols per block (= (1<= $this->nn) { + $x -= $this->nn; + $x = ($x >> $this->mm) + ($x & $this->nn); + } + + return $x; + } + + //---------------------------------------------------------------------- + public static function init_rs_char($symsize, $gfpoly, $fcr, $prim, $nroots, $pad) + { + // Common code for intializing a Reed-Solomon control block (char or int symbols) + // Copyright 2004 Phil Karn, KA9Q + // May be used under the terms of the GNU Lesser General Public License (LGPL) + + $rs = null; + + // Check parameter ranges + if($symsize < 0 || $symsize > 8) return $rs; + if($fcr < 0 || $fcr >= (1<<$symsize)) return $rs; + if($prim <= 0 || $prim >= (1<<$symsize)) return $rs; + if($nroots < 0 || $nroots >= (1<<$symsize)) return $rs; // Can't have more roots than symbol values! + if($pad < 0 || $pad >= ((1<<$symsize) -1 - $nroots)) return $rs; // Too much padding + + $rs = new QRrsItem(); + $rs->mm = $symsize; + $rs->nn = (1<<$symsize)-1; + $rs->pad = $pad; + + $rs->alpha_to = array_fill(0, $rs->nn+1, 0); + $rs->index_of = array_fill(0, $rs->nn+1, 0); + + // PHP style macro replacement ;) + $NN =& $rs->nn; + $A0 =& $NN; + + // Generate Galois field lookup tables + $rs->index_of[0] = $A0; // log(zero) = -inf + $rs->alpha_to[$A0] = 0; // alpha**-inf = 0 + $sr = 1; + + for($i=0; $i<$rs->nn; $i++) { + $rs->index_of[$sr] = $i; + $rs->alpha_to[$i] = $sr; + $sr <<= 1; + if($sr & (1<<$symsize)) { + $sr ^= $gfpoly; + } + $sr &= $rs->nn; + } + + if($sr != 1){ + // field generator polynomial is not primitive! + $rs = NULL; + return $rs; + } + + /* Form RS code generator polynomial from its roots */ + $rs->genpoly = array_fill(0, $nroots+1, 0); + + $rs->fcr = $fcr; + $rs->prim = $prim; + $rs->nroots = $nroots; + $rs->gfpoly = $gfpoly; + + /* Find prim-th root of 1, used in decoding */ + for($iprim=1;($iprim % $prim) != 0;$iprim += $rs->nn) + ; // intentional empty-body loop! + + $rs->iprim = (int)($iprim / $prim); + $rs->genpoly[0] = 1; + + for ($i = 0,$root=$fcr*$prim; $i < $nroots; $i++, $root += $prim) { + $rs->genpoly[$i+1] = 1; + + // Multiply rs->genpoly[] by @**(root + x) + for ($j = $i; $j > 0; $j--) { + if ($rs->genpoly[$j] != 0) { + $rs->genpoly[$j] = $rs->genpoly[$j-1] ^ $rs->alpha_to[$rs->modnn($rs->index_of[$rs->genpoly[$j]] + $root)]; + } else { + $rs->genpoly[$j] = $rs->genpoly[$j-1]; + } + } + // rs->genpoly[0] can never be zero + $rs->genpoly[0] = $rs->alpha_to[$rs->modnn($rs->index_of[$rs->genpoly[0]] + $root)]; + } + + // convert rs->genpoly[] to index form for quicker encoding + for ($i = 0; $i <= $nroots; $i++) + $rs->genpoly[$i] = $rs->index_of[$rs->genpoly[$i]]; + + return $rs; + } + + //---------------------------------------------------------------------- + public function encode_rs_char($data, &$parity) + { + $MM =& $this->mm; + $NN =& $this->nn; + $ALPHA_TO =& $this->alpha_to; + $INDEX_OF =& $this->index_of; + $GENPOLY =& $this->genpoly; + $NROOTS =& $this->nroots; + $FCR =& $this->fcr; + $PRIM =& $this->prim; + $IPRIM =& $this->iprim; + $PAD =& $this->pad; + $A0 =& $NN; + + $parity = array_fill(0, $NROOTS, 0); + + for($i=0; $i< ($NN-$NROOTS-$PAD); $i++) { + + $feedback = $INDEX_OF[$data[$i] ^ $parity[0]]; + if($feedback != $A0) { + // feedback term is non-zero + + // This line is unnecessary when GENPOLY[NROOTS] is unity, as it must + // always be for the polynomials constructed by init_rs() + $feedback = $this->modnn($NN - $GENPOLY[$NROOTS] + $feedback); + + for($j=1;$j<$NROOTS;$j++) { + $parity[$j] ^= $ALPHA_TO[$this->modnn($feedback + $GENPOLY[$NROOTS-$j])]; + } + } + + // Shift + array_shift($parity); + if($feedback != $A0) { + array_push($parity, $ALPHA_TO[$this->modnn($feedback + $GENPOLY[0])]); + } else { + array_push($parity, 0); + } + } + } + } + + //########################################################################## + + class QRrs { + + public static $items = array(); + + //---------------------------------------------------------------------- + public static function init_rs($symsize, $gfpoly, $fcr, $prim, $nroots, $pad) + { + foreach(self::$items as $rs) { + if($rs->pad != $pad) continue; + if($rs->nroots != $nroots) continue; + if($rs->mm != $symsize) continue; + if($rs->gfpoly != $gfpoly) continue; + if($rs->fcr != $fcr) continue; + if($rs->prim != $prim) continue; + + return $rs; + } + + $rs = QRrsItem::init_rs_char($symsize, $gfpoly, $fcr, $prim, $nroots, $pad); + array_unshift(self::$items, $rs); + + return $rs; + } + } \ No newline at end of file diff --git a/vendor/crowdfunding2/lib/phpqrcode/qrspec.php b/vendor/crowdfunding2/lib/phpqrcode/qrspec.php new file mode 100755 index 0000000..5a0c4b3 --- /dev/null +++ b/vendor/crowdfunding2/lib/phpqrcode/qrspec.php @@ -0,0 +1,592 @@ + + * + * PHP QR Code is distributed under LGPL 3 + * Copyright (C) 2010 Dominik Dzienia + * + * The following data / specifications are taken from + * "Two dimensional symbol -- QR-code -- Basic Specification" (JIS X0510:2004) + * or + * "Automatic identification and data capture techniques -- + * QR Code 2005 bar code symbology specification" (ISO/IEC 18004:2006) + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ + + define('QRSPEC_VERSION_MAX', 40); + define('QRSPEC_WIDTH_MAX', 177); + + define('QRCAP_WIDTH', 0); + define('QRCAP_WORDS', 1); + define('QRCAP_REMINDER', 2); + define('QRCAP_EC', 3); + + class QRspec { + + public static $capacity = array( + array( 0, 0, 0, array( 0, 0, 0, 0)), + array( 21, 26, 0, array( 7, 10, 13, 17)), // 1 + array( 25, 44, 7, array( 10, 16, 22, 28)), + array( 29, 70, 7, array( 15, 26, 36, 44)), + array( 33, 100, 7, array( 20, 36, 52, 64)), + array( 37, 134, 7, array( 26, 48, 72, 88)), // 5 + array( 41, 172, 7, array( 36, 64, 96, 112)), + array( 45, 196, 0, array( 40, 72, 108, 130)), + array( 49, 242, 0, array( 48, 88, 132, 156)), + array( 53, 292, 0, array( 60, 110, 160, 192)), + array( 57, 346, 0, array( 72, 130, 192, 224)), //10 + array( 61, 404, 0, array( 80, 150, 224, 264)), + array( 65, 466, 0, array( 96, 176, 260, 308)), + array( 69, 532, 0, array( 104, 198, 288, 352)), + array( 73, 581, 3, array( 120, 216, 320, 384)), + array( 77, 655, 3, array( 132, 240, 360, 432)), //15 + array( 81, 733, 3, array( 144, 280, 408, 480)), + array( 85, 815, 3, array( 168, 308, 448, 532)), + array( 89, 901, 3, array( 180, 338, 504, 588)), + array( 93, 991, 3, array( 196, 364, 546, 650)), + array( 97, 1085, 3, array( 224, 416, 600, 700)), //20 + array(101, 1156, 4, array( 224, 442, 644, 750)), + array(105, 1258, 4, array( 252, 476, 690, 816)), + array(109, 1364, 4, array( 270, 504, 750, 900)), + array(113, 1474, 4, array( 300, 560, 810, 960)), + array(117, 1588, 4, array( 312, 588, 870, 1050)), //25 + array(121, 1706, 4, array( 336, 644, 952, 1110)), + array(125, 1828, 4, array( 360, 700, 1020, 1200)), + array(129, 1921, 3, array( 390, 728, 1050, 1260)), + array(133, 2051, 3, array( 420, 784, 1140, 1350)), + array(137, 2185, 3, array( 450, 812, 1200, 1440)), //30 + array(141, 2323, 3, array( 480, 868, 1290, 1530)), + array(145, 2465, 3, array( 510, 924, 1350, 1620)), + array(149, 2611, 3, array( 540, 980, 1440, 1710)), + array(153, 2761, 3, array( 570, 1036, 1530, 1800)), + array(157, 2876, 0, array( 570, 1064, 1590, 1890)), //35 + array(161, 3034, 0, array( 600, 1120, 1680, 1980)), + array(165, 3196, 0, array( 630, 1204, 1770, 2100)), + array(169, 3362, 0, array( 660, 1260, 1860, 2220)), + array(173, 3532, 0, array( 720, 1316, 1950, 2310)), + array(177, 3706, 0, array( 750, 1372, 2040, 2430)) //40 + ); + + //---------------------------------------------------------------------- + public static function getDataLength($version, $level) + { + return self::$capacity[$version][QRCAP_WORDS] - self::$capacity[$version][QRCAP_EC][$level]; + } + + //---------------------------------------------------------------------- + public static function getECCLength($version, $level) + { + return self::$capacity[$version][QRCAP_EC][$level]; + } + + //---------------------------------------------------------------------- + public static function getWidth($version) + { + return self::$capacity[$version][QRCAP_WIDTH]; + } + + //---------------------------------------------------------------------- + public static function getRemainder($version) + { + return self::$capacity[$version][QRCAP_REMINDER]; + } + + //---------------------------------------------------------------------- + public static function getMinimumVersion($size, $level) + { + + for($i=1; $i<= QRSPEC_VERSION_MAX; $i++) { + $words = self::$capacity[$i][QRCAP_WORDS] - self::$capacity[$i][QRCAP_EC][$level]; + if($words >= $size) + return $i; + } + + return -1; + } + + //###################################################################### + + public static $lengthTableBits = array( + array(10, 12, 14), + array( 9, 11, 13), + array( 8, 16, 16), + array( 8, 10, 12) + ); + + //---------------------------------------------------------------------- + public static function lengthIndicator($mode, $version) + { + if ($mode == QR_MODE_STRUCTURE) + return 0; + + if ($version <= 9) { + $l = 0; + } else if ($version <= 26) { + $l = 1; + } else { + $l = 2; + } + + return self::$lengthTableBits[$mode][$l]; + } + + //---------------------------------------------------------------------- + public static function maximumWords($mode, $version) + { + if($mode == QR_MODE_STRUCTURE) + return 3; + + if($version <= 9) { + $l = 0; + } else if($version <= 26) { + $l = 1; + } else { + $l = 2; + } + + $bits = self::$lengthTableBits[$mode][$l]; + $words = (1 << $bits) - 1; + + if($mode == QR_MODE_KANJI) { + $words *= 2; // the number of bytes is required + } + + return $words; + } + + // Error correction code ----------------------------------------------- + // Table of the error correction code (Reed-Solomon block) + // See Table 12-16 (pp.30-36), JIS X0510:2004. + + public static $eccTable = array( + array(array( 0, 0), array( 0, 0), array( 0, 0), array( 0, 0)), + array(array( 1, 0), array( 1, 0), array( 1, 0), array( 1, 0)), // 1 + array(array( 1, 0), array( 1, 0), array( 1, 0), array( 1, 0)), + array(array( 1, 0), array( 1, 0), array( 2, 0), array( 2, 0)), + array(array( 1, 0), array( 2, 0), array( 2, 0), array( 4, 0)), + array(array( 1, 0), array( 2, 0), array( 2, 2), array( 2, 2)), // 5 + array(array( 2, 0), array( 4, 0), array( 4, 0), array( 4, 0)), + array(array( 2, 0), array( 4, 0), array( 2, 4), array( 4, 1)), + array(array( 2, 0), array( 2, 2), array( 4, 2), array( 4, 2)), + array(array( 2, 0), array( 3, 2), array( 4, 4), array( 4, 4)), + array(array( 2, 2), array( 4, 1), array( 6, 2), array( 6, 2)), //10 + array(array( 4, 0), array( 1, 4), array( 4, 4), array( 3, 8)), + array(array( 2, 2), array( 6, 2), array( 4, 6), array( 7, 4)), + array(array( 4, 0), array( 8, 1), array( 8, 4), array(12, 4)), + array(array( 3, 1), array( 4, 5), array(11, 5), array(11, 5)), + array(array( 5, 1), array( 5, 5), array( 5, 7), array(11, 7)), //15 + array(array( 5, 1), array( 7, 3), array(15, 2), array( 3, 13)), + array(array( 1, 5), array(10, 1), array( 1, 15), array( 2, 17)), + array(array( 5, 1), array( 9, 4), array(17, 1), array( 2, 19)), + array(array( 3, 4), array( 3, 11), array(17, 4), array( 9, 16)), + array(array( 3, 5), array( 3, 13), array(15, 5), array(15, 10)), //20 + array(array( 4, 4), array(17, 0), array(17, 6), array(19, 6)), + array(array( 2, 7), array(17, 0), array( 7, 16), array(34, 0)), + array(array( 4, 5), array( 4, 14), array(11, 14), array(16, 14)), + array(array( 6, 4), array( 6, 14), array(11, 16), array(30, 2)), + array(array( 8, 4), array( 8, 13), array( 7, 22), array(22, 13)), //25 + array(array(10, 2), array(19, 4), array(28, 6), array(33, 4)), + array(array( 8, 4), array(22, 3), array( 8, 26), array(12, 28)), + array(array( 3, 10), array( 3, 23), array( 4, 31), array(11, 31)), + array(array( 7, 7), array(21, 7), array( 1, 37), array(19, 26)), + array(array( 5, 10), array(19, 10), array(15, 25), array(23, 25)), //30 + array(array(13, 3), array( 2, 29), array(42, 1), array(23, 28)), + array(array(17, 0), array(10, 23), array(10, 35), array(19, 35)), + array(array(17, 1), array(14, 21), array(29, 19), array(11, 46)), + array(array(13, 6), array(14, 23), array(44, 7), array(59, 1)), + array(array(12, 7), array(12, 26), array(39, 14), array(22, 41)), //35 + array(array( 6, 14), array( 6, 34), array(46, 10), array( 2, 64)), + array(array(17, 4), array(29, 14), array(49, 10), array(24, 46)), + array(array( 4, 18), array(13, 32), array(48, 14), array(42, 32)), + array(array(20, 4), array(40, 7), array(43, 22), array(10, 67)), + array(array(19, 6), array(18, 31), array(34, 34), array(20, 61)),//40 + ); + + //---------------------------------------------------------------------- + // CACHEABLE!!! + + public static function getEccSpec($version, $level, array &$spec) + { + if (count($spec) < 5) { + $spec = array(0,0,0,0,0); + } + + $b1 = self::$eccTable[$version][$level][0]; + $b2 = self::$eccTable[$version][$level][1]; + $data = self::getDataLength($version, $level); + $ecc = self::getECCLength($version, $level); + + if($b2 == 0) { + $spec[0] = $b1; + $spec[1] = (int)($data / $b1); + $spec[2] = (int)($ecc / $b1); + $spec[3] = 0; + $spec[4] = 0; + } else { + $spec[0] = $b1; + $spec[1] = (int)($data / ($b1 + $b2)); + $spec[2] = (int)($ecc / ($b1 + $b2)); + $spec[3] = $b2; + $spec[4] = $spec[1] + 1; + } + } + + // Alignment pattern --------------------------------------------------- + + // Positions of alignment patterns. + // This array includes only the second and the third position of the + // alignment patterns. Rest of them can be calculated from the distance + // between them. + + // See Table 1 in Appendix E (pp.71) of JIS X0510:2004. + + public static $alignmentPattern = array( + array( 0, 0), + array( 0, 0), array(18, 0), array(22, 0), array(26, 0), array(30, 0), // 1- 5 + array(34, 0), array(22, 38), array(24, 42), array(26, 46), array(28, 50), // 6-10 + array(30, 54), array(32, 58), array(34, 62), array(26, 46), array(26, 48), //11-15 + array(26, 50), array(30, 54), array(30, 56), array(30, 58), array(34, 62), //16-20 + array(28, 50), array(26, 50), array(30, 54), array(28, 54), array(32, 58), //21-25 + array(30, 58), array(34, 62), array(26, 50), array(30, 54), array(26, 52), //26-30 + array(30, 56), array(34, 60), array(30, 58), array(34, 62), array(30, 54), //31-35 + array(24, 50), array(28, 54), array(32, 58), array(26, 54), array(30, 58), //35-40 + ); + + + /** -------------------------------------------------------------------- + * Put an alignment marker. + * @param frame + * @param width + * @param ox,oy center coordinate of the pattern + */ + public static function putAlignmentMarker(array &$frame, $ox, $oy) + { + $finder = array( + "\xa1\xa1\xa1\xa1\xa1", + "\xa1\xa0\xa0\xa0\xa1", + "\xa1\xa0\xa1\xa0\xa1", + "\xa1\xa0\xa0\xa0\xa1", + "\xa1\xa1\xa1\xa1\xa1" + ); + + $yStart = $oy-2; + $xStart = $ox-2; + + for($y=0; $y<5; $y++) { + QRstr::set($frame, $xStart, $yStart+$y, $finder[$y]); + } + } + + //---------------------------------------------------------------------- + public static function putAlignmentPattern($version, &$frame, $width) + { + if($version < 2) + return; + + $d = self::$alignmentPattern[$version][1] - self::$alignmentPattern[$version][0]; + if($d < 0) { + $w = 2; + } else { + $w = (int)(($width - self::$alignmentPattern[$version][0]) / $d + 2); + } + + if($w * $w - 3 == 1) { + $x = self::$alignmentPattern[$version][0]; + $y = self::$alignmentPattern[$version][0]; + self::putAlignmentMarker($frame, $x, $y); + return; + } + + $cx = self::$alignmentPattern[$version][0]; + for($x=1; $x<$w - 1; $x++) { + self::putAlignmentMarker($frame, 6, $cx); + self::putAlignmentMarker($frame, $cx, 6); + $cx += $d; + } + + $cy = self::$alignmentPattern[$version][0]; + for($y=0; $y<$w-1; $y++) { + $cx = self::$alignmentPattern[$version][0]; + for($x=0; $x<$w-1; $x++) { + self::putAlignmentMarker($frame, $cx, $cy); + $cx += $d; + } + $cy += $d; + } + } + + // Version information pattern ----------------------------------------- + + // Version information pattern (BCH coded). + // See Table 1 in Appendix D (pp.68) of JIS X0510:2004. + + // size: [QRSPEC_VERSION_MAX - 6] + + public static $versionPattern = array( + 0x07c94, 0x085bc, 0x09a99, 0x0a4d3, 0x0bbf6, 0x0c762, 0x0d847, 0x0e60d, + 0x0f928, 0x10b78, 0x1145d, 0x12a17, 0x13532, 0x149a6, 0x15683, 0x168c9, + 0x177ec, 0x18ec4, 0x191e1, 0x1afab, 0x1b08e, 0x1cc1a, 0x1d33f, 0x1ed75, + 0x1f250, 0x209d5, 0x216f0, 0x228ba, 0x2379f, 0x24b0b, 0x2542e, 0x26a64, + 0x27541, 0x28c69 + ); + + //---------------------------------------------------------------------- + public static function getVersionPattern($version) + { + if($version < 7 || $version > QRSPEC_VERSION_MAX) + return 0; + + return self::$versionPattern[$version -7]; + } + + // Format information -------------------------------------------------- + // See calcFormatInfo in tests/test_qrspec.c (orginal qrencode c lib) + + public static $formatInfo = array( + array(0x77c4, 0x72f3, 0x7daa, 0x789d, 0x662f, 0x6318, 0x6c41, 0x6976), + array(0x5412, 0x5125, 0x5e7c, 0x5b4b, 0x45f9, 0x40ce, 0x4f97, 0x4aa0), + array(0x355f, 0x3068, 0x3f31, 0x3a06, 0x24b4, 0x2183, 0x2eda, 0x2bed), + array(0x1689, 0x13be, 0x1ce7, 0x19d0, 0x0762, 0x0255, 0x0d0c, 0x083b) + ); + + public static function getFormatInfo($mask, $level) + { + if($mask < 0 || $mask > 7) + return 0; + + if($level < 0 || $level > 3) + return 0; + + return self::$formatInfo[$level][$mask]; + } + + // Frame --------------------------------------------------------------- + // Cache of initial frames. + + public static $frames = array(); + + /** -------------------------------------------------------------------- + * Put a finder pattern. + * @param frame + * @param width + * @param ox,oy upper-left coordinate of the pattern + */ + public static function putFinderPattern(&$frame, $ox, $oy) + { + $finder = array( + "\xc1\xc1\xc1\xc1\xc1\xc1\xc1", + "\xc1\xc0\xc0\xc0\xc0\xc0\xc1", + "\xc1\xc0\xc1\xc1\xc1\xc0\xc1", + "\xc1\xc0\xc1\xc1\xc1\xc0\xc1", + "\xc1\xc0\xc1\xc1\xc1\xc0\xc1", + "\xc1\xc0\xc0\xc0\xc0\xc0\xc1", + "\xc1\xc1\xc1\xc1\xc1\xc1\xc1" + ); + + for($y=0; $y<7; $y++) { + QRstr::set($frame, $ox, $oy+$y, $finder[$y]); + } + } + + //---------------------------------------------------------------------- + public static function createFrame($version) + { + $width = self::$capacity[$version][QRCAP_WIDTH]; + $frameLine = str_repeat ("\0", $width); + $frame = array_fill(0, $width, $frameLine); + + // Finder pattern + self::putFinderPattern($frame, 0, 0); + self::putFinderPattern($frame, $width - 7, 0); + self::putFinderPattern($frame, 0, $width - 7); + + // Separator + $yOffset = $width - 7; + + for($y=0; $y<7; $y++) { + $frame[$y][7] = "\xc0"; + $frame[$y][$width - 8] = "\xc0"; + $frame[$yOffset][7] = "\xc0"; + $yOffset++; + } + + $setPattern = str_repeat("\xc0", 8); + + QRstr::set($frame, 0, 7, $setPattern); + QRstr::set($frame, $width-8, 7, $setPattern); + QRstr::set($frame, 0, $width - 8, $setPattern); + + // Format info + $setPattern = str_repeat("\x84", 9); + QRstr::set($frame, 0, 8, $setPattern); + QRstr::set($frame, $width - 8, 8, $setPattern, 8); + + $yOffset = $width - 8; + + for($y=0; $y<8; $y++,$yOffset++) { + $frame[$y][8] = "\x84"; + $frame[$yOffset][8] = "\x84"; + } + + // Timing pattern + + for($i=1; $i<$width-15; $i++) { + $frame[6][7+$i] = chr(0x90 | ($i & 1)); + $frame[7+$i][6] = chr(0x90 | ($i & 1)); + } + + // Alignment pattern + self::putAlignmentPattern($version, $frame, $width); + + // Version information + if($version >= 7) { + $vinf = self::getVersionPattern($version); + + $v = $vinf; + + for($x=0; $x<6; $x++) { + for($y=0; $y<3; $y++) { + $frame[($width - 11)+$y][$x] = chr(0x88 | ($v & 1)); + $v = $v >> 1; + } + } + + $v = $vinf; + for($y=0; $y<6; $y++) { + for($x=0; $x<3; $x++) { + $frame[$y][$x+($width - 11)] = chr(0x88 | ($v & 1)); + $v = $v >> 1; + } + } + } + + // and a little bit... + $frame[$width - 8][8] = "\x81"; + + return $frame; + } + + //---------------------------------------------------------------------- + public static function debug($frame, $binary_mode = false) + { + if ($binary_mode) { + + foreach ($frame as &$frameLine) { + $frameLine = join('  ', explode('0', $frameLine)); + $frameLine = join('██', explode('1', $frameLine)); + } + + ?> + +


        '; + echo join("
        ", $frame); + echo '






'; + + } else { + + foreach ($frame as &$frameLine) { + $frameLine = join(' ', explode("\xc0", $frameLine)); + $frameLine = join('', explode("\xc1", $frameLine)); + $frameLine = join(' ', explode("\xa0", $frameLine)); + $frameLine = join('', explode("\xa1", $frameLine)); + $frameLine = join('', explode("\x84", $frameLine)); //format 0 + $frameLine = join('', explode("\x85", $frameLine)); //format 1 + $frameLine = join('', explode("\x81", $frameLine)); //special bit + $frameLine = join(' ', explode("\x90", $frameLine)); //clock 0 + $frameLine = join('', explode("\x91", $frameLine)); //clock 1 + $frameLine = join(' ', explode("\x88", $frameLine)); //version + $frameLine = join('', explode("\x89", $frameLine)); //version + $frameLine = join('♦', explode("\x01", $frameLine)); + $frameLine = join('⋅', explode("\0", $frameLine)); + } + + ?> + + "; + echo join("
", $frame); + echo "
"; + + } + } + + //---------------------------------------------------------------------- + public static function serial($frame) + { + return gzcompress(join("\n", $frame), 9); + } + + //---------------------------------------------------------------------- + public static function unserial($code) + { + return explode("\n", gzuncompress($code)); + } + + //---------------------------------------------------------------------- + public static function newFrame($version) + { + if($version < 1 || $version > QRSPEC_VERSION_MAX) + return null; + + if(!isset(self::$frames[$version])) { + + $fileName = QR_CACHE_DIR.'frame_'.$version.'.dat'; + + if (QR_CACHEABLE) { + if (file_exists($fileName)) { + self::$frames[$version] = self::unserial(file_get_contents($fileName)); + } else { + self::$frames[$version] = self::createFrame($version); + file_put_contents($fileName, self::serial(self::$frames[$version])); + } + } else { + self::$frames[$version] = self::createFrame($version); + } + } + + if(is_null(self::$frames[$version])) + return null; + + return self::$frames[$version]; + } + + //---------------------------------------------------------------------- + public static function rsBlockNum($spec) { return $spec[0] + $spec[3]; } + public static function rsBlockNum1($spec) { return $spec[0]; } + public static function rsDataCodes1($spec) { return $spec[1]; } + public static function rsEccCodes1($spec) { return $spec[2]; } + public static function rsBlockNum2($spec) { return $spec[3]; } + public static function rsDataCodes2($spec) { return $spec[4]; } + public static function rsEccCodes2($spec) { return $spec[2]; } + public static function rsDataLength($spec) { return ($spec[0] * $spec[1]) + ($spec[3] * $spec[4]); } + public static function rsEccLength($spec) { return ($spec[0] + $spec[3]) * $spec[2]; } + + } \ No newline at end of file diff --git a/vendor/crowdfunding2/lib/phpqrcode/qrsplit.php b/vendor/crowdfunding2/lib/phpqrcode/qrsplit.php new file mode 100755 index 0000000..815f86e --- /dev/null +++ b/vendor/crowdfunding2/lib/phpqrcode/qrsplit.php @@ -0,0 +1,311 @@ + + * + * PHP QR Code is distributed under LGPL 3 + * Copyright (C) 2010 Dominik Dzienia + * + * The following data / specifications are taken from + * "Two dimensional symbol -- QR-code -- Basic Specification" (JIS X0510:2004) + * or + * "Automatic identification and data capture techniques -- + * QR Code 2005 bar code symbology specification" (ISO/IEC 18004:2006) + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ + class QRsplit { + + public $dataStr = ''; + public $input; + public $modeHint; + + //---------------------------------------------------------------------- + public function __construct($dataStr, $input, $modeHint) + { + $this->dataStr = $dataStr; + $this->input = $input; + $this->modeHint = $modeHint; + } + + //---------------------------------------------------------------------- + public static function isdigitat($str, $pos) + { + if ($pos >= strlen($str)) + return false; + + return ((ord($str[$pos]) >= ord('0'))&&(ord($str[$pos]) <= ord('9'))); + } + + //---------------------------------------------------------------------- + public static function isalnumat($str, $pos) + { + if ($pos >= strlen($str)) + return false; + + return (QRinput::lookAnTable(ord($str[$pos])) >= 0); + } + + //---------------------------------------------------------------------- + public function identifyMode($pos) + { + if ($pos >= strlen($this->dataStr)) + return QR_MODE_NUL; + + $c = $this->dataStr[$pos]; + + if(self::isdigitat($this->dataStr, $pos)) { + return QR_MODE_NUM; + } else if(self::isalnumat($this->dataStr, $pos)) { + return QR_MODE_AN; + } else if($this->modeHint == QR_MODE_KANJI) { + + if ($pos+1 < strlen($this->dataStr)) + { + $d = $this->dataStr[$pos+1]; + $word = (ord($c) << 8) | ord($d); + if(($word >= 0x8140 && $word <= 0x9ffc) || ($word >= 0xe040 && $word <= 0xebbf)) { + return QR_MODE_KANJI; + } + } + } + + return QR_MODE_8; + } + + //---------------------------------------------------------------------- + public function eatNum() + { + $ln = QRspec::lengthIndicator(QR_MODE_NUM, $this->input->getVersion()); + + $p = 0; + while(self::isdigitat($this->dataStr, $p)) { + $p++; + } + + $run = $p; + $mode = $this->identifyMode($p); + + if($mode == QR_MODE_8) { + $dif = QRinput::estimateBitsModeNum($run) + 4 + $ln + + QRinput::estimateBitsMode8(1) // + 4 + l8 + - QRinput::estimateBitsMode8($run + 1); // - 4 - l8 + if($dif > 0) { + return $this->eat8(); + } + } + if($mode == QR_MODE_AN) { + $dif = QRinput::estimateBitsModeNum($run) + 4 + $ln + + QRinput::estimateBitsModeAn(1) // + 4 + la + - QRinput::estimateBitsModeAn($run + 1);// - 4 - la + if($dif > 0) { + return $this->eatAn(); + } + } + + $ret = $this->input->append(QR_MODE_NUM, $run, str_split($this->dataStr)); + if($ret < 0) + return -1; + + return $run; + } + + //---------------------------------------------------------------------- + public function eatAn() + { + $la = QRspec::lengthIndicator(QR_MODE_AN, $this->input->getVersion()); + $ln = QRspec::lengthIndicator(QR_MODE_NUM, $this->input->getVersion()); + + $p = 0; + + while(self::isalnumat($this->dataStr, $p)) { + if(self::isdigitat($this->dataStr, $p)) { + $q = $p; + while(self::isdigitat($this->dataStr, $q)) { + $q++; + } + + $dif = QRinput::estimateBitsModeAn($p) // + 4 + la + + QRinput::estimateBitsModeNum($q - $p) + 4 + $ln + - QRinput::estimateBitsModeAn($q); // - 4 - la + + if($dif < 0) { + break; + } else { + $p = $q; + } + } else { + $p++; + } + } + + $run = $p; + + if(!self::isalnumat($this->dataStr, $p)) { + $dif = QRinput::estimateBitsModeAn($run) + 4 + $la + + QRinput::estimateBitsMode8(1) // + 4 + l8 + - QRinput::estimateBitsMode8($run + 1); // - 4 - l8 + if($dif > 0) { + return $this->eat8(); + } + } + + $ret = $this->input->append(QR_MODE_AN, $run, str_split($this->dataStr)); + if($ret < 0) + return -1; + + return $run; + } + + //---------------------------------------------------------------------- + public function eatKanji() + { + $p = 0; + + while($this->identifyMode($p) == QR_MODE_KANJI) { + $p += 2; + } + + $ret = $this->input->append(QR_MODE_KANJI, $p, str_split($this->dataStr)); + if($ret < 0) + return -1; + + return $ret; + } + + //---------------------------------------------------------------------- + public function eat8() + { + $la = QRspec::lengthIndicator(QR_MODE_AN, $this->input->getVersion()); + $ln = QRspec::lengthIndicator(QR_MODE_NUM, $this->input->getVersion()); + + $p = 1; + $dataStrLen = strlen($this->dataStr); + + while($p < $dataStrLen) { + + $mode = $this->identifyMode($p); + if($mode == QR_MODE_KANJI) { + break; + } + if($mode == QR_MODE_NUM) { + $q = $p; + while(self::isdigitat($this->dataStr, $q)) { + $q++; + } + $dif = QRinput::estimateBitsMode8($p) // + 4 + l8 + + QRinput::estimateBitsModeNum($q - $p) + 4 + $ln + - QRinput::estimateBitsMode8($q); // - 4 - l8 + if($dif < 0) { + break; + } else { + $p = $q; + } + } else if($mode == QR_MODE_AN) { + $q = $p; + while(self::isalnumat($this->dataStr, $q)) { + $q++; + } + $dif = QRinput::estimateBitsMode8($p) // + 4 + l8 + + QRinput::estimateBitsModeAn($q - $p) + 4 + $la + - QRinput::estimateBitsMode8($q); // - 4 - l8 + if($dif < 0) { + break; + } else { + $p = $q; + } + } else { + $p++; + } + } + + $run = $p; + $ret = $this->input->append(QR_MODE_8, $run, str_split($this->dataStr)); + + if($ret < 0) + return -1; + + return $run; + } + + //---------------------------------------------------------------------- + public function splitString() + { + while (strlen($this->dataStr) > 0) + { + if($this->dataStr == '') + return 0; + + $mode = $this->identifyMode(0); + + switch ($mode) { + case QR_MODE_NUM: $length = $this->eatNum(); break; + case QR_MODE_AN: $length = $this->eatAn(); break; + case QR_MODE_KANJI: + if ($mode == QR_MODE_KANJI) + $length = $this->eatKanji(); + else $length = $this->eat8(); + break; + default: $length = $this->eat8(); break; + + } + + if($length == 0) return 0; + if($length < 0) return -1; + + $this->dataStr = substr($this->dataStr, $length); + } + } + + //---------------------------------------------------------------------- + public function toUpper() + { + $stringLen = strlen($this->dataStr); + $p = 0; + + while ($p<$stringLen) { + $mode = self::identifyMode(substr($this->dataStr, $p)); + if($mode == QR_MODE_KANJI) { + $p += 2; + } else { + if (ord($this->dataStr[$p]) >= ord('a') && ord($this->dataStr[$p]) <= ord('z')) { + $this->dataStr[$p] = chr(ord($this->dataStr[$p]) - 32); + } + $p++; + } + } + + return $this->dataStr; + } + + //---------------------------------------------------------------------- + public static function splitStringToQRinput($string, QRinput $input, $modeHint, $casesensitive = true) + { + if(is_null($string) || $string == '\0' || $string == '') { + throw new Exception('empty string!!!'); + } + + $split = new QRsplit($string, $input, $modeHint); + + if(!$casesensitive) + $split->toUpper(); + + return $split->splitString(); + } + } \ No newline at end of file diff --git a/vendor/crowdfunding2/lib/phpqrcode/qrtools.php b/vendor/crowdfunding2/lib/phpqrcode/qrtools.php new file mode 100755 index 0000000..bb29528 --- /dev/null +++ b/vendor/crowdfunding2/lib/phpqrcode/qrtools.php @@ -0,0 +1,185 @@ + + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ + + class QRtools { + + //---------------------------------------------------------------------- + public static function binarize($frame) + { + $len = count($frame); + foreach ($frame as &$frameLine) { + + for($i=0; $i<$len; $i++) { + $frameLine[$i] = (ord($frameLine[$i])&1)?'1':'0'; + } + } + + return $frame; + } + + //---------------------------------------------------------------------- + public static function tcpdfBarcodeArray($code, $mode = 'QR,L', $tcPdfVersion = '4.5.037') + { + $barcode_array = array(); + + if (!is_array($mode)) + $mode = explode(',', $mode); + + $eccLevel = 'L'; + + if (count($mode) > 1) { + $eccLevel = $mode[1]; + } + + $qrTab = QRcode::text($code, false, $eccLevel); + $size = count($qrTab); + + $barcode_array['num_rows'] = $size; + $barcode_array['num_cols'] = $size; + $barcode_array['bcode'] = array(); + + foreach ($qrTab as $line) { + $arrAdd = array(); + foreach(str_split($line) as $char) + $arrAdd[] = ($char=='1')?1:0; + $barcode_array['bcode'][] = $arrAdd; + } + + return $barcode_array; + } + + //---------------------------------------------------------------------- + public static function clearCache() + { + self::$frames = array(); + } + + //---------------------------------------------------------------------- + public static function buildCache() + { + QRtools::markTime('before_build_cache'); + + $mask = new QRmask(); + for ($a=1; $a <= QRSPEC_VERSION_MAX; $a++) { + $frame = QRspec::newFrame($a); + if (QR_IMAGE) { + $fileName = QR_CACHE_DIR.'frame_'.$a.'.png'; + QRimage::png(self::binarize($frame), $fileName, 1, 0); + } + + $width = count($frame); + $bitMask = array_fill(0, $width, array_fill(0, $width, 0)); + for ($maskNo=0; $maskNo<8; $maskNo++) + $mask->makeMaskNo($maskNo, $width, $frame, $bitMask, true); + } + + QRtools::markTime('after_build_cache'); + } + + //---------------------------------------------------------------------- + public static function log($outfile, $err) + { + if (QR_LOG_DIR !== false) { + if ($err != '') { + if ($outfile !== false) { + file_put_contents(QR_LOG_DIR.basename($outfile).'-errors.txt', date('Y-m-d H:i:s').': '.$err, FILE_APPEND); + } else { + file_put_contents(QR_LOG_DIR.'errors.txt', date('Y-m-d H:i:s').': '.$err, FILE_APPEND); + } + } + } + } + + //---------------------------------------------------------------------- + public static function dumpMask($frame) + { + $width = count($frame); + for($y=0;$y<$width;$y++) { + for($x=0;$x<$width;$x++) { + echo ord($frame[$y][$x]).','; + } + } + } + + //---------------------------------------------------------------------- + public static function markTime($markerId) + { + list($usec, $sec) = explode(" ", microtime()); + $time = ((float)$usec + (float)$sec); + + if (!isset($GLOBALS['qr_time_bench'])) + $GLOBALS['qr_time_bench'] = array(); + + $GLOBALS['qr_time_bench'][$markerId] = $time; + } + + //---------------------------------------------------------------------- + public static function timeBenchmark() + { + self::markTime('finish'); + + $lastTime = 0; + $startTime = 0; + $p = 0; + + echo ' + + '; + + foreach($GLOBALS['qr_time_bench'] as $markerId=>$thisTime) { + if ($p > 0) { + echo ''; + } else { + $startTime = $thisTime; + } + + $p++; + $lastTime = $thisTime; + } + + echo ' + + +
BENCHMARK
till '.$markerId.': '.number_format($thisTime-$lastTime, 6).'s
TOTAL: '.number_format($lastTime-$startTime, 6).'s
'; + } + + public static function save($content, $filename_path) + { + try { + $handle = fopen($filename_path, "w"); + fwrite($handle, $content); + fclose($handle); + return true; + } catch (Exception $e) { + echo 'Exception reçue : ', $e->getMessage(), "\n"; + } + + } + + } + + //########################################################################## + + QRtools::markTime('start'); + \ No newline at end of file diff --git a/vendor/crowdfunding2/lib/phpqrcode/qrvect.php b/vendor/crowdfunding2/lib/phpqrcode/qrvect.php new file mode 100755 index 0000000..113fd12 --- /dev/null +++ b/vendor/crowdfunding2/lib/phpqrcode/qrvect.php @@ -0,0 +1,214 @@ + + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ + + define('QR_VECT', true); + + class QRvect { + + //---------------------------------------------------------------------- + public static function eps($frame, $filename = false, $pixelPerPoint = 4, $outerFrame = 4,$saveandprint=FALSE, $back_color = 0xFFFFFF, $fore_color = 0x000000, $cmyk = false) + { + $vect = self::vectEPS($frame, $pixelPerPoint, $outerFrame, $back_color, $fore_color, $cmyk); + + if ($filename === false) { + header("Content-Type: application/postscript"); + header('Content-Disposition: filename="qrcode.eps"'); + echo $vect; + } else { + if($saveandprint===TRUE){ + QRtools::save($vect, $filename); + header("Content-Type: application/postscript"); + header('Content-Disposition: filename="qrcode.eps"'); + echo $vect; + }else{ + QRtools::save($vect, $filename); + } + } + } + + + //---------------------------------------------------------------------- + private static function vectEPS($frame, $pixelPerPoint = 4, $outerFrame = 4, $back_color = 0xFFFFFF, $fore_color = 0x000000, $cmyk = false) + { + $h = count($frame); + $w = strlen($frame[0]); + + $imgW = $w + 2*$outerFrame; + $imgH = $h + 2*$outerFrame; + + if ($cmyk) + { + // convert color value into decimal eps format + $c = round((($fore_color & 0xFF000000) >> 16) / 255, 5); + $m = round((($fore_color & 0x00FF0000) >> 16) / 255, 5); + $y = round((($fore_color & 0x0000FF00) >> 8) / 255, 5); + $k = round(($fore_color & 0x000000FF) / 255, 5); + $fore_color_string = $c.' '.$m.' '.$y.' '.$k.' setcmykcolor'."\n"; + + // convert color value into decimal eps format + $c = round((($back_color & 0xFF000000) >> 16) / 255, 5); + $m = round((($back_color & 0x00FF0000) >> 16) / 255, 5); + $y = round((($back_color & 0x0000FF00) >> 8) / 255, 5); + $k = round(($back_color & 0x000000FF) / 255, 5); + $back_color_string = $c.' '.$m.' '.$y.' '.$k.' setcmykcolor'."\n"; + } + else + { + // convert a hexadecimal color code into decimal eps format (green = 0 1 0, blue = 0 0 1, ...) + $r = round((($fore_color & 0xFF0000) >> 16) / 255, 5); + $b = round((($fore_color & 0x00FF00) >> 8) / 255, 5); + $g = round(($fore_color & 0x0000FF) / 255, 5); + $fore_color_string = $r.' '.$b.' '.$g.' setrgbcolor'."\n"; + + // convert a hexadecimal color code into decimal eps format (green = 0 1 0, blue = 0 0 1, ...) + $r = round((($back_color & 0xFF0000) >> 16) / 255, 5); + $b = round((($back_color & 0x00FF00) >> 8) / 255, 5); + $g = round(($back_color & 0x0000FF) / 255, 5); + $back_color_string = $r.' '.$b.' '.$g.' setrgbcolor'."\n"; + } + + $output = + '%!PS-Adobe EPSF-3.0'."\n". + '%%Creator: PHPQrcodeLib'."\n". + '%%Title: QRcode'."\n". + '%%CreationDate: '.date('Y-m-d')."\n". + '%%DocumentData: Clean7Bit'."\n". + '%%LanguageLevel: 2'."\n". + '%%Pages: 1'."\n". + '%%BoundingBox: 0 0 '.$imgW * $pixelPerPoint.' '.$imgH * $pixelPerPoint."\n"; + + // set the scale + $output .= $pixelPerPoint.' '.$pixelPerPoint.' scale'."\n"; + // position the center of the coordinate system + + $output .= $outerFrame.' '.$outerFrame.' translate'."\n"; + + + + + // redefine the 'rectfill' operator to shorten the syntax + $output .= '/F { rectfill } def'."\n"; + + // set the symbol color + $output .= $back_color_string; + $output .= '-'.$outerFrame.' -'.$outerFrame.' '.($w + 2*$outerFrame).' '.($h + 2*$outerFrame).' F'."\n"; + + + // set the symbol color + $output .= $fore_color_string; + + // Convert the matrix into pixels + + for($i=0; $i<$h; $i++) { + for($j=0; $j<$w; $j++) { + if( $frame[$i][$j] == '1') { + $y = $h - 1 - $i; + $x = $j; + $output .= $x.' '.$y.' 1 1 F'."\n"; + } + } + } + + + $output .='%%EOF'; + + return $output; + } + + //---------------------------------------------------------------------- + public static function svg($frame, $filename = false, $pixelPerPoint = 4, $outerFrame = 4,$saveandprint=FALSE, $back_color, $fore_color) + { + $vect = self::vectSVG($frame, $pixelPerPoint, $outerFrame, $back_color, $fore_color); + + if ($filename === false) { + header("Content-Type: image/svg+xml"); + //header('Content-Disposition: attachment, filename="qrcode.svg"'); + echo $vect; + } else { + if($saveandprint===TRUE){ + QRtools::save($vect, $filename); + header("Content-Type: image/svg+xml"); + //header('Content-Disposition: filename="'.$filename.'"'); + echo $vect; + }else{ + QRtools::save($vect, $filename); + } + } + } + + + //---------------------------------------------------------------------- + private static function vectSVG($frame, $pixelPerPoint = 4, $outerFrame = 4, $back_color = 0xFFFFFF, $fore_color = 0x000000) + { + $h = count($frame); + $w = strlen($frame[0]); + + $imgW = $w + 2*$outerFrame; + $imgH = $h + 2*$outerFrame; + + + $output = + ''."\n". + ''."\n". + ''."\n"; + + $output = + ''."\n". + ''."\n". + ''."\n". + ''."\n"; + + if(!empty($back_color)) { + $backgroundcolor = str_pad(dechex($back_color), 6, "0", STR_PAD_LEFT); + $output .= ''."\n"; + } + + $output .= + ''."\n". + ''."\n". + ''."\n". + ''."\n"; + + + // Convert the matrix into pixels + + for($i=0; $i<$h; $i++) { + for($j=0; $j<$w; $j++) { + if( $frame[$i][$j] == '1') { + $y = ($i + $outerFrame) * $pixelPerPoint; + $x = ($j + $outerFrame) * $pixelPerPoint; + $output .= ''."\n"; + } + } + } + $output .= + ''."\n". + ''; + + return $output; + } + } + + diff --git a/vendor/crowdfunding2/lib/phpqrcode/tools/merge.bat b/vendor/crowdfunding2/lib/phpqrcode/tools/merge.bat new file mode 100755 index 0000000..2b5eebb --- /dev/null +++ b/vendor/crowdfunding2/lib/phpqrcode/tools/merge.bat @@ -0,0 +1,2 @@ +php ./merge.php +pause \ No newline at end of file diff --git a/vendor/crowdfunding2/lib/phpqrcode/tools/merge.php b/vendor/crowdfunding2/lib/phpqrcode/tools/merge.php new file mode 100755 index 0000000..2a5d7c1 --- /dev/null +++ b/vendor/crowdfunding2/lib/phpqrcode/tools/merge.php @@ -0,0 +1,71 @@ + + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ + + $QR_BASEDIR = dirname(__FILE__).DIRECTORY_SEPARATOR.'..'.DIRECTORY_SEPARATOR; + $QR_TOOLSDIR = dirname(__FILE__).DIRECTORY_SEPARATOR; + + $outputFile = $QR_BASEDIR.'phpqrcode.php'; + + // Required libs + + $fileList = array( + $QR_BASEDIR.'qrconst.php', + $QR_TOOLSDIR.'merged_config.php', + $QR_BASEDIR.'qrtools.php', + $QR_BASEDIR.'qrspec.php', + $QR_BASEDIR.'qrimage.php', + $QR_BASEDIR.'qrinput.php', + $QR_BASEDIR.'qrbitstream.php', + $QR_BASEDIR.'qrsplit.php', + $QR_BASEDIR.'qrrscode.php', + $QR_BASEDIR.'qrmask.php', + $QR_BASEDIR.'qrencode.php', + $QR_BASEDIR.'qrvect.php' + ); + + $headerFile = $QR_TOOLSDIR.'merged_header.php'; + $versionFile = $QR_BASEDIR.'VERSION'; + + $outputCode = ''; + + foreach($fileList as $fileName) { + $outputCode .= "\n\n".'//---- '.basename($fileName).' -----------------------------'."\n\n"; + $anotherCode = file_get_contents($fileName); + $anotherCode = preg_replace ('/^<\?php/', '', $anotherCode); + $anotherCode = preg_replace ('/\?>\*$/', '', $anotherCode); + $outputCode .= "\n\n".$anotherCode."\n\n"; + } + + $versionDataEx = explode("\n", file_get_contents($versionFile)); + + $outputContents = file_get_contents($headerFile); + $outputContents .= "\n\n/*\n * Version: ".trim($versionDataEx[0])."\n * Build: ".trim($versionDataEx[1])."\n */\n\n"; + $outputContents .= $outputCode; + + file_put_contents($outputFile, $outputContents); + + \ No newline at end of file diff --git a/vendor/crowdfunding2/lib/phpqrcode/tools/merge.sh b/vendor/crowdfunding2/lib/phpqrcode/tools/merge.sh new file mode 100755 index 0000000..f7d3168 --- /dev/null +++ b/vendor/crowdfunding2/lib/phpqrcode/tools/merge.sh @@ -0,0 +1,2 @@ +#!/bin/sh +php ./merge.php diff --git a/vendor/crowdfunding2/lib/phpqrcode/tools/merged_config.php b/vendor/crowdfunding2/lib/phpqrcode/tools/merged_config.php new file mode 100755 index 0000000..8cd917d --- /dev/null +++ b/vendor/crowdfunding2/lib/phpqrcode/tools/merged_config.php @@ -0,0 +1,17 @@ + + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ + + \ No newline at end of file diff --git a/vendor/crowdfunding2/lib/webfonts/LiberationSans-Regular.ttf b/vendor/crowdfunding2/lib/webfonts/LiberationSans-Regular.ttf new file mode 100755 index 0000000..626dd93 Binary files /dev/null and b/vendor/crowdfunding2/lib/webfonts/LiberationSans-Regular.ttf differ diff --git a/vendor/crowdfunding2/lib/webfonts/fontawesome/400/fa-brands-400.eot b/vendor/crowdfunding2/lib/webfonts/fontawesome/400/fa-brands-400.eot new file mode 100755 index 0000000..4f991ad Binary files /dev/null and b/vendor/crowdfunding2/lib/webfonts/fontawesome/400/fa-brands-400.eot differ diff --git a/vendor/crowdfunding2/lib/webfonts/fontawesome/400/fa-brands-400.svg b/vendor/crowdfunding2/lib/webfonts/fontawesome/400/fa-brands-400.svg new file mode 100755 index 0000000..c5f544c --- /dev/null +++ b/vendor/crowdfunding2/lib/webfonts/fontawesome/400/fa-brands-400.svg @@ -0,0 +1,3452 @@ + + + + + +Created by FontForge 20190112 at Tue May 7 11:33:44 2019 + By Robert Madole +Copyright (c) Font Awesome + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/vendor/crowdfunding2/lib/webfonts/fontawesome/400/fa-brands-400.ttf b/vendor/crowdfunding2/lib/webfonts/fontawesome/400/fa-brands-400.ttf new file mode 100755 index 0000000..8836d9f Binary files /dev/null and b/vendor/crowdfunding2/lib/webfonts/fontawesome/400/fa-brands-400.ttf differ diff --git a/vendor/crowdfunding2/lib/webfonts/fontawesome/400/fa-brands-400.woff b/vendor/crowdfunding2/lib/webfonts/fontawesome/400/fa-brands-400.woff new file mode 100755 index 0000000..d65148d Binary files /dev/null and b/vendor/crowdfunding2/lib/webfonts/fontawesome/400/fa-brands-400.woff differ diff --git a/vendor/crowdfunding2/lib/webfonts/fontawesome/400/fa-brands-400.woff2 b/vendor/crowdfunding2/lib/webfonts/fontawesome/400/fa-brands-400.woff2 new file mode 100755 index 0000000..e2bfe66 Binary files /dev/null and b/vendor/crowdfunding2/lib/webfonts/fontawesome/400/fa-brands-400.woff2 differ diff --git a/vendor/crowdfunding2/lib/webfonts/fontawesome/400/fa-regular-400.eot b/vendor/crowdfunding2/lib/webfonts/fontawesome/400/fa-regular-400.eot new file mode 100755 index 0000000..12be17b Binary files /dev/null and b/vendor/crowdfunding2/lib/webfonts/fontawesome/400/fa-regular-400.eot differ diff --git a/vendor/crowdfunding2/lib/webfonts/fontawesome/400/fa-regular-400.svg b/vendor/crowdfunding2/lib/webfonts/fontawesome/400/fa-regular-400.svg new file mode 100755 index 0000000..5c2d926 --- /dev/null +++ b/vendor/crowdfunding2/lib/webfonts/fontawesome/400/fa-regular-400.svg @@ -0,0 +1,169 @@ + + + + + +Created by FontForge 20190112 at Fri Feb 1 12:28:28 2019 + By Robert Madole +Copyright (c) Font Awesome + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/vendor/crowdfunding2/lib/webfonts/fontawesome/400/fa-regular-400.ttf b/vendor/crowdfunding2/lib/webfonts/fontawesome/400/fa-regular-400.ttf new file mode 100755 index 0000000..abf3f48 Binary files /dev/null and b/vendor/crowdfunding2/lib/webfonts/fontawesome/400/fa-regular-400.ttf differ diff --git a/vendor/crowdfunding2/lib/webfonts/fontawesome/400/fa-regular-400.woff b/vendor/crowdfunding2/lib/webfonts/fontawesome/400/fa-regular-400.woff new file mode 100755 index 0000000..257b315 Binary files /dev/null and b/vendor/crowdfunding2/lib/webfonts/fontawesome/400/fa-regular-400.woff differ diff --git a/vendor/crowdfunding2/lib/webfonts/fontawesome/400/fa-regular-400.woff2 b/vendor/crowdfunding2/lib/webfonts/fontawesome/400/fa-regular-400.woff2 new file mode 100755 index 0000000..0f55b06 Binary files /dev/null and b/vendor/crowdfunding2/lib/webfonts/fontawesome/400/fa-regular-400.woff2 differ diff --git a/vendor/crowdfunding2/lib/webfonts/fontawesome/900/fa-solid-900.eot b/vendor/crowdfunding2/lib/webfonts/fontawesome/900/fa-solid-900.eot new file mode 100755 index 0000000..89e407d Binary files /dev/null and b/vendor/crowdfunding2/lib/webfonts/fontawesome/900/fa-solid-900.eot differ diff --git a/vendor/crowdfunding2/lib/webfonts/fontawesome/900/fa-solid-900.svg b/vendor/crowdfunding2/lib/webfonts/fontawesome/900/fa-solid-900.svg new file mode 100755 index 0000000..df5f626 --- /dev/null +++ b/vendor/crowdfunding2/lib/webfonts/fontawesome/900/fa-solid-900.svg @@ -0,0 +1,953 @@ + + + + + +Created by FontForge 20190112 at Fri Feb 1 12:28:29 2019 + By Robert Madole +Copyright (c) Font Awesome + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/vendor/crowdfunding2/lib/webfonts/fontawesome/900/fa-solid-900.ttf b/vendor/crowdfunding2/lib/webfonts/fontawesome/900/fa-solid-900.ttf new file mode 100755 index 0000000..6c9fe78 Binary files /dev/null and b/vendor/crowdfunding2/lib/webfonts/fontawesome/900/fa-solid-900.ttf differ diff --git a/vendor/crowdfunding2/lib/webfonts/fontawesome/900/fa-solid-900.woff b/vendor/crowdfunding2/lib/webfonts/fontawesome/900/fa-solid-900.woff new file mode 100755 index 0000000..bf52883 Binary files /dev/null and b/vendor/crowdfunding2/lib/webfonts/fontawesome/900/fa-solid-900.woff differ diff --git a/vendor/crowdfunding2/lib/webfonts/fontawesome/900/fa-solid-900.woff2 b/vendor/crowdfunding2/lib/webfonts/fontawesome/900/fa-solid-900.woff2 new file mode 100755 index 0000000..318cd3d Binary files /dev/null and b/vendor/crowdfunding2/lib/webfonts/fontawesome/900/fa-solid-900.woff2 differ diff --git a/vendor/crowdfunding2/locales/en.tr.php b/vendor/crowdfunding2/locales/en.tr.php new file mode 100755 index 0000000..1f141bb --- /dev/null +++ b/vendor/crowdfunding2/locales/en.tr.php @@ -0,0 +1,30 @@ + 'Invalid bar color. Please check your syntax.', + 'error_border_color_invalid' => 'Invalid border color. Please check your syntax.', + 'error_connect_node' => 'The connection to the duniter node failed. Change the used node.', + 'error_date_start_invalid' => 'Invalid start date. Please check your syntax.', + 'error_date_start_missing' => 'Missing start date. Please check your syntax.', + 'error_date_end_invalid' => 'Invalid end date. Please check your syntax.', + 'error_date_end_anterior' => 'End date is anterior to start date. Please check your syntax.', + 'error_font_color_invalid' => 'Invalid font color. Please check your syntax.', + 'error_pubkey_invalid' => 'Invalid pubkey. Please check your syntax.', + 'error_pubkey_missing' => 'Missing pubkey. Please check your syntax.', + 'error_target_not_int' => 'Target is not integer. Please check your syntax.', + 'error_target_negative' => 'Target is negative or null. Please check your syntax.', + 'error_target_missing' => 'Missing target. Please check your syntax.', + 'title_default' => 'Crowdfunding in libre currency', + 'label_pubkey' => 'Account pubkey:', + 'label_qrcode' => 'QRcode', + 'label_reached' => 'reached', + 'label_donators' => 'Donators', + 'ud' => 'UD', + 'label_ontotal' => 'Over a total of {{total}} {{unit}}', + 'label_ontotal_short' => 'Over {{total}} {{unit}}', + 'label_remaining_d' => 'days remaining', + 'label_contribute' => 'Contribute now !', + 'graph_title' => 'Evolution of the funding', + 'graph_target' => 'Target', + 'graph_delta' => 'Daily income' +); +?> diff --git a/vendor/crowdfunding2/locales/eo.tr.php b/vendor/crowdfunding2/locales/eo.tr.php new file mode 100755 index 0000000..fc530de --- /dev/null +++ b/vendor/crowdfunding2/locales/eo.tr.php @@ -0,0 +1,30 @@ + 'Nevalida trinkeja koloro. Bonvolu kontroli vian sintakson.', + 'error_border_color_invalid' => 'Nevalida bordkoloro. Bonvolu kontroli vian sintakson.', + 'error_connect_node' => 'La rilato al la nodo Duniter malsukcesis. Modifu la uzatan nodon.', + 'error_date_start_invalid' => 'Erara dato de komenciĝo. Kontrolu vian sintakson.', + 'error_date_start_missing' => 'Mankanta dato de komenciĝo. Kontrolu vian sintakson.', + 'error_date_end_invalid' => 'Erara fin-dato. Kontrolu vian sintakson.', + 'error_date_end_anterior' => 'Fin-dato antaŭanta la daton de komenciĝon. Kontrolu vian sintakson.', + 'error_font_color_invalid' => 'Nevalida tiparo koloro. Bonvolu kontroli vian sintakson.', + 'error_pubkey_invalid' => 'Erara publik-ŝlosilo. Kontrolu vian sintakson.', + 'error_pubkey_missing' => 'Mankanta publik-ŝlosilo. Kontrolu vian sintakson.', + 'error_target_not_int' => 'Neentjera celo. Kontrolu vian sintakson.', + 'error_target_negative' => 'Negativa aŭ nula celo. Kontrolu vian sintakson.', + 'error_target_missing' => 'Mankanta celo. Kontrolu vian sintakson.', + 'title_default' => 'Liber-mona amasfinancado', + 'label_pubkey' => 'Publik-ŝlosilo de la konto:', + 'label_qrcode' => 'QRcode', + 'label_reached' => 'atingitaj', + 'label_donators' => 'Donantoj', + 'ud' => 'UD', + 'label_ontotal' => 'Celo: {{total}} {{unit}}', + 'label_ontotal_short' => 'Celo: {{total}} {{unit}}', + 'label_remaining_d' => 'tagoj restas', + 'label_contribute' => 'Kontribuu nun !', + 'graph_title' => 'Evoluo de la financado', + 'graph_target' => 'Celo', + 'graph_delta' => 'Taga enspezo' +); +?> diff --git a/vendor/crowdfunding2/locales/fr.tr.php b/vendor/crowdfunding2/locales/fr.tr.php new file mode 100755 index 0000000..f6d795b --- /dev/null +++ b/vendor/crowdfunding2/locales/fr.tr.php @@ -0,0 +1,30 @@ + 'Couleur de barre invalide. Vérifiez votre syntaxe.', + 'error_border_color_invalid' => 'Couleur de bordure invalide. Vérifiez votre syntaxe.', + 'error_connect_node' => 'La connexion au noeud duniter a échoué. Modifiez le noeud utilisé.', + 'error_date_start_invalid' => 'La date de début est incorrecte. Vérifiez votre syntaxe.', + 'error_date_start_missing' => 'Il manque la date de début. Vérifiez votre syntaxe.', + 'error_date_end_invalid' => 'La date de fin est incorrecte. Vérifiez votre syntaxe.', + 'error_date_end_anterior' => 'La date de fin est antérieure à la date de début. Vérifiez votre syntaxe.', + 'error_font_color_invalid' => 'Couleur de police invalide. Vérifiez votre syntaxe.', + 'error_pubkey_invalid' => 'La clé publique n\'a pas le format attendu. Vérifiez votre syntaxe.', + 'error_pubkey_missing' => 'Il manque la clé publique du compte à vérifier. Vérifiez votre syntaxe.', + 'error_target_not_int' => 'La cible n\'est pas un entier. Vérifiez votre syntaxe.', + 'error_target_negative' => 'La cible est un entier négatif ou nul. Vérifiez votre syntaxe.', + 'error_target_missing' => 'Il manque le montant à atteindre. Vérifiez votre syntaxe.', + 'title_default' => 'Financement participatif en monnaie libre', + 'label_pubkey' => 'Clé publique du compte :', + 'label_qrcode' => 'QRcode', + 'label_reached' => 'atteints', + 'label_donators' => 'Donateurs', + 'ud' => 'DU', + 'label_ontotal' => 'Sur un total de {{total}} {{unit}}', + 'label_ontotal_short' => 'Sur {{total}} {{unit}}', + 'label_remaining_d' => 'jours restants', + 'label_contribute' => 'Contribuez maintenant !', + 'graph_title' => 'Montant récolté', + 'graph_target' => 'Objectif', + 'graph_delta' => 'Contributions du jour' +); +?> diff --git a/vendor/crowdfunding2/locales/moment.js/eo.js b/vendor/crowdfunding2/locales/moment.js/eo.js new file mode 100755 index 0000000..403ecb1 --- /dev/null +++ b/vendor/crowdfunding2/locales/moment.js/eo.js @@ -0,0 +1,70 @@ +//! moment.js locale configuration + +;(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' + && typeof require === 'function' ? factory(require('../moment')) : + typeof define === 'function' && define.amd ? define(['../moment'], factory) : + factory(global.moment) +}(this, (function (moment) { 'use strict'; + + + var eo = moment.defineLocale('eo', { + months : 'januaro_februaro_marto_aprilo_majo_junio_julio_aŭgusto_septembro_oktobro_novembro_decembro'.split('_'), + monthsShort : 'jan_feb_mar_apr_maj_jun_jul_aŭg_sep_okt_nov_dec'.split('_'), + weekdays : 'dimanĉo_lundo_mardo_merkredo_ĵaŭdo_vendredo_sabato'.split('_'), + weekdaysShort : 'dim_lun_mard_merk_ĵaŭ_ven_sab'.split('_'), + weekdaysMin : 'di_lu_ma_me_ĵa_ve_sa'.split('_'), + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'YYYY-MM-DD', + LL : 'D[-a de] MMMM, YYYY', + LLL : 'D[-a de] MMMM, YYYY HH:mm', + LLLL : 'dddd, [la] D[-a de] MMMM, YYYY HH:mm' + }, + meridiemParse: /[ap]\.t\.m/i, + isPM: function (input) { + return input.charAt(0).toLowerCase() === 'p'; + }, + meridiem : function (hours, minutes, isLower) { + if (hours > 11) { + return isLower ? 'p.t.m.' : 'P.T.M.'; + } else { + return isLower ? 'a.t.m.' : 'A.T.M.'; + } + }, + calendar : { + sameDay : '[Hodiaŭ je] LT', + nextDay : '[Morgaŭ je] LT', + nextWeek : 'dddd [je] LT', + lastDay : '[Hieraŭ je] LT', + lastWeek : '[pasinta] dddd [je] LT', + sameElse : 'L' + }, + relativeTime : { + future : 'post %s', + past : 'antaŭ %s', + s : 'sekundoj', + ss : '%d sekundoj', + m : 'minuto', + mm : '%d minutoj', + h : 'horo', + hh : '%d horoj', + d : 'tago',//ne 'diurno', ĉar estas uzita por proksimumo + dd : '%d tagoj', + M : 'monato', + MM : '%d monatoj', + y : 'jaro', + yy : '%d jaroj' + }, + dayOfMonthOrdinalParse: /\d{1,2}a/, + ordinal : '%da', + week : { + dow : 1, // Monday is the first day of the week. + doy : 7 // The week that contains Jan 7th is the first week of the year. + } + }); + + return eo; + +}))); \ No newline at end of file diff --git a/vendor/crowdfunding2/locales/moment.js/fr.js b/vendor/crowdfunding2/locales/moment.js/fr.js new file mode 100755 index 0000000..df8b758 --- /dev/null +++ b/vendor/crowdfunding2/locales/moment.js/fr.js @@ -0,0 +1,82 @@ +//! moment.js locale configuration + +;(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' + && typeof require === 'function' ? factory(require('../moment')) : + typeof define === 'function' && define.amd ? define(['../moment'], factory) : + factory(global.moment) +}(this, (function (moment) { 'use strict'; + + + var fr = moment.defineLocale('fr', { + months : 'janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre'.split('_'), + monthsShort : 'janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.'.split('_'), + monthsParseExact : true, + weekdays : 'dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi'.split('_'), + weekdaysShort : 'dim._lun._mar._mer._jeu._ven._sam.'.split('_'), + weekdaysMin : 'di_lu_ma_me_je_ve_sa'.split('_'), + weekdaysParseExact : true, + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'DD/MM/YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY HH:mm', + LLLL : 'dddd D MMMM YYYY HH:mm' + }, + calendar : { + sameDay : '[Aujourd’hui à] LT', + nextDay : '[Demain à] LT', + nextWeek : 'dddd [à] LT', + lastDay : '[Hier à] LT', + lastWeek : 'dddd [dernier à] LT', + sameElse : 'L' + }, + relativeTime : { + future : 'dans %s', + past : 'il y a %s', + s : 'quelques secondes', + ss : '%d secondes', + m : 'une minute', + mm : '%d minutes', + h : 'une heure', + hh : '%d heures', + d : 'un jour', + dd : '%d jours', + M : 'un mois', + MM : '%d mois', + y : 'un an', + yy : '%d ans' + }, + dayOfMonthOrdinalParse: /\d{1,2}(er|)/, + ordinal : function (number, period) { + switch (period) { + // TODO: Return 'e' when day of month > 1. Move this case inside + // block for masculine words below. + // See https://github.com/moment/moment/issues/3375 + case 'D': + return number + (number === 1 ? 'er' : ''); + + // Words with masculine grammatical gender: mois, trimestre, jour + default: + case 'M': + case 'Q': + case 'DDD': + case 'd': + return number + (number === 1 ? 'er' : 'e'); + + // Words with feminine grammatical gender: semaine + case 'w': + case 'W': + return number + (number === 1 ? 're' : 'e'); + } + }, + week : { + dow : 1, // Monday is the first day of the week. + doy : 4 // The week that contains Jan 4th is the first week of the year. + } + }); + + return fr; + +}))); \ No newline at end of file diff --git a/vendor/crowdfunding2/svg.php b/vendor/crowdfunding2/svg.php new file mode 100755 index 0000000..9b6e230 --- /dev/null +++ b/vendor/crowdfunding2/svg.php @@ -0,0 +1,79 @@ +setTarget($_GET['target']); +} + +if (isset($_GET['title'])) { + + $myCrowdfunding->setTitle($_GET['title']); +} + +if (isset($_GET['hide_title'])) { + + $myCrowdfunding->setMustHideTitle($_GET['hide_title']); + +} + +if (isset($_GET['display_pubkey'])) { + + $myCrowdfunding->setMustDisplayPubkey($_GET['display_pubkey']); +} + +if (isset($_GET['display_qrcode'])) { + + $myCrowdfunding->setMustDisplayQRCode(true); +} + +/* +if (isset($_GET['node'])) { + + $myCrowdfunding->addNodes(explode(' ', $_GET['node'])); +} +*/ + +if (isset($_GET['logo'])) { + + $myCrowdfunding->setLogo($_GET['logo']); +} + + +$theme = isset($_GET['theme']) ? $_GET['theme'] : DEFAULT_THEME; + +if (!file_exists($tplPath = THEMES_PATH . '/' . $theme . '.svg.php')) { + + $tplPath = THEMES_PATH . '/' . DEFAULT_THEME . '.svg.php'; + +} + +if (file_exists($confPath = THEMES_PATH . '/' . $theme . '.conf.php')) { + + require_once($confPath); +} + +ob_clean();// Without this line, encoding problems (UTF-8 php files instead of ANSI) can cause image to not generate) + +header('Content-type: image/svg+xml'); + +include($tplPath); + diff --git a/vendor/crowdfunding2/themes/chart.html.php b/vendor/crowdfunding2/themes/chart.html.php new file mode 100755 index 0000000..019cf56 --- /dev/null +++ b/vendor/crowdfunding2/themes/chart.html.php @@ -0,0 +1,40 @@ +
+getTargetLinePoints(), _('Objectif')); + $targetGraph->setStyle('type', 'line'); + $targetGraph->setStyle('borderColor', 'green'); + $targetGraph->setStyle('borderDash', [5, 5]); + $targetGraph->setStyle('radius', 0); + $targetGraph->setStyle('fill', false); + $chart->addGraph($targetGraph); + + $amountCumulativeGraph = new Graph($chart->getAmountCollectedByDayCumulativePoints(), _('Montant total récolté')); + $amountCumulativeGraph->setStyle('type', 'line'); + $amountCumulativeGraph->setStyle('borderColor', '#301873'); + $amountCumulativeGraph->setStyle('backgroundColor', '#301873'); + $amountCumulativeGraph->setStyle('lineTension', 0); + $amountCumulativeGraph->setStyle('pointRadius', 1); + $amountCumulativeGraph->setStyle('borderWidth', 2); + $amountCumulativeGraph->setStyle('steppedLine', false); + $chart->addGraph($amountCumulativeGraph); + + + echo $chart->getScripts($lang, '#chart'); +} +?> + + + + + diff --git a/vendor/crowdfunding2/themes/cloud.css b/vendor/crowdfunding2/themes/cloud.css new file mode 100644 index 0000000..099eff9 --- /dev/null +++ b/vendor/crowdfunding2/themes/cloud.css @@ -0,0 +1,93 @@ + +body, p { + + margin: 0; + padding: 0; + /*overflow: hidden;*/ +} + +p { + + text-align: center; +} + +.donorsList { + + list-style-type: none; + margin: 0 auto; + padding: 0; + max-width: 500px; + text-align: center; + display: flex; + flex-wrap: wrap; + justify-content: center; + align-items: center; +} + +.donorsList > li { + + padding: 0.10rem 0.5rem; + flex-shrink: 1; + box-sizing: border-box; +} + +.donorsList > li span { + + border-radius: 1em; + padding: 0 0.25em; + color: white; +} + +.donorsList > li:nth-child(5n) span{ + + background: hsl(194, 100%, 70%); + color: black; +} + +.donorsList > li:nth-child(5n+1) span{ + + background: hsl(185, 62%, 53%); +} + +.donorsList > li:nth-child(5n+2) span{ + + background: hsl(210, 100%, 25%); +} + +.donorsList > li:nth-child(5n+3) span{ + + background: hsl(194, 100%, 80%); + color: hsl(233, 88%, 9%); +} + +.donorsList > li:nth-child(5n+4) span{ + + background: hsl(194, 100%, 60%); + color: hsl(233, 88%, 9%); +} + +.donorsList > :nth-child(1) { + + width: 100%; +} + +.donorsList > :nth-child(2), +.donorsList > :nth-child(3) { + + width: 50%; +} + +.donorsList > :nth-child(2) { + + text-align: right; +} + +.donorsList > :nth-child(3) { + + text-align: left; +} + +.donorsList > :last-child { + + width: 100%; +} diff --git a/vendor/crowdfunding2/themes/cloud.html.php b/vendor/crowdfunding2/themes/cloud.html.php new file mode 100755 index 0000000..bfcf903 --- /dev/null +++ b/vendor/crowdfunding2/themes/cloud.html.php @@ -0,0 +1,33 @@ +getDonationsList(true); + +$min = $myCrowdfunding->getMinDonation(); +$max = $myCrowdfunding->getMaxDonation(); + +if (empty($donationsList)) { + + echo _('Pas encore de donateurs'); + +} else { + + echo ''; +} + diff --git a/vendor/crowdfunding2/themes/kickstarter.css b/vendor/crowdfunding2/themes/kickstarter.css new file mode 100755 index 0000000..d9bc53a --- /dev/null +++ b/vendor/crowdfunding2/themes/kickstarter.css @@ -0,0 +1,165 @@ +/* ================ General ================ */ + +@font-face { + + font-family:"Font Awesome 5 Free"; + font-style:normal; + font-weight:400; + font-display:auto; + src:url(../lib/webfonts/fontawesome/400/fa-regular-400.eot); + src:url(../lib/webfonts/fontawesome/400/fa-regular-400.eot?#iefix) format("embedded-opentype"),url(../lib/webfonts/fontawesome/400/fa-regular-400.woff2) format("woff2"),url(../lib/webfonts/fontawesome/400/fa-regular-400.woff) format("woff"),url(../lib/webfonts/fontawesome/400/fa-regular-400.ttf) format("truetype"),url(../lib/webfonts/fontawesome/400/fa-regular-400.svg#fontawesome) format("svg") +} + + @font-face { + + font-family:"Font Awesome 5 Free"; + font-style:normal; + font-weight:900; + font-display:auto; + src:url(../lib/webfonts/fontawesome/900/fa-solid-900.eot); + src:url(../lib/webfonts/fontawesome/900/fa-solid-900.eot?#iefix) format("embedded-opentype"),url(../lib/webfonts/fontawesome/900/fa-solid-900.woff2) format("woff2"),url(../lib/webfonts/fontawesome/900/fa-solid-900.woff) format("woff"),url(../lib/webfonts/fontawesome/900/fa-solid-900.ttf) format("truetype"),url(../lib/webfonts/fontawesome/900/fa-solid-900.svg#fontawesome) format("svg") +} + +body { + + + margin: 0; + padding: 0; + overflow: hidden; + + color: hsl(0, 0.0%, 13.3%); + background: transparent; + + line-height: 1.5; + + font-weight: 400; + font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji"; +} + +p { + + margin-top: 0.5rem; + margin-bottom: 0.5rem; +} + +.sr-only{ + + border: 0; + clip: rect(0,0,0,0); + height: 1px; + margin: -1px; + overflow: hidden; + padding: 0; + position: absolute; + width: 1px; + white-space: nowrap; +} + +/* ================ Progress bar ================ */ + +.progress-container { + + background-color: hsl(210, 15.8%, 92.5%); + border: 0; + height: 0.5rem; + + display: -ms-flexbox; + display: flex; + overflow: hidden; + font-size: .75rem; +} + +@keyframes progress-bar-stripes { + + from { background-position: 1rem 0; } + to { background-position: 0 0; } +} + + .progress-bar { + + display: -ms-flexbox; + display: flex; + -ms-flex-direction: column; + flex-direction: column; + -ms-flex-pack: center; + justify-content: center; + color: #fff; + text-align: center; + white-space: nowrap; + background-color: hsl(153, 98.8%, 31.4%); + transition: width .6s ease; + + -webkit-animation: progress-bar-stripes 1s linear infinite; + animation: progress-bar-stripes 1s linear infinite; +} + +/* ================ Stats ================ */ + +section.stats { + + display: flex; + flex-wrap: wrap; + flex-direction: column; + justify-content: space-around; + + font-size: 2rem; +} + +section.stats .label { + + display: block; + font-size: 1rem; + font-weight: 400; +} + +/* ================ Button ================ */ + +.CTA-button a, +.CTA-button a:visited { + + background-color: hsl(153, 98.8%, 31.4%); + color: white; + text-decoration: none; + font-weight: 400; + + display: block; + border-radius: .25rem; + border: 1px solid transparent; + padding: .375rem .75rem; + width: calc(100% - 1.5rem - 2px); + font-size: 1rem; + line-height: 1.5; + + text-align: center; + vertical-align: middle; + + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; + + transition: + color .15s ease-in-out, + background-color .15s ease-in-out, + border-color .15s ease-in-out, + box-shadow .15s ease-in-out; + + margin-bottom: 0; + +} + +.CTA-button a:hover { + + background-color: hsl(153, 98.8%, 36.4%); + +} + +.CTA-button a:before { + + font-family: "Font Awesome 5 Free"; + font-weight: bold; + content: "\f1d8"; /* fa-paper-place */ + margin-right: 0.5rem; +} + + diff --git a/vendor/crowdfunding2/themes/kickstarter.html.php b/vendor/crowdfunding2/themes/kickstarter.html.php new file mode 100755 index 0000000..2ab9e45 --- /dev/null +++ b/vendor/crowdfunding2/themes/kickstarter.html.php @@ -0,0 +1,124 @@ +
+ +
+ + + getPercentage(); ?> + + +
+ +
+ + +
+ +
+

+ + getAmountCollected()); ?> + + + printUnit(); ?> + + + getTarget(), $myCrowdfunding->printUnit()); + ?> + +

+
+ +
+

+ + getDonorsNb(); ?> + + + + + +

+
+ + getDaysLeft()) !== NULL) { + ?> +
+

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

+
+ + +
+ +getMustDisplayButton()) { + ?> +

+ + + getTitle()); ?> + +

+ + + + + + diff --git a/vendor/crowdfunding2/themes/paidge.conf.php b/vendor/crowdfunding2/themes/paidge.conf.php new file mode 100755 index 0000000..dbc918c --- /dev/null +++ b/vendor/crowdfunding2/themes/paidge.conf.php @@ -0,0 +1,92 @@ + '#ffffff', + 'border_color' => '#343a40', + 'font_color' => '#212529', + 'progress_color' => '#ffc107' +]; + + +function computeStyle ($paramName, $value) { + + switch ($paramName) { + + case 'font_color': return ' + + body { + + color: '. $value .'; + } + '; + + case 'background_color': return ' + + body { + + background-color: '. $value .'; + } + '; + + case 'border_color': return ' + + .progress-container { + + border-color: '. $value .'; + } + '; + + case 'progress_color' : return ' + + .progress-bar { + + background-color: '. $value .'; + } + '; + } +} + + + +function getComputedStyles () { + + $CSS = ''; + + global $defaultColors; + + + foreach ($defaultColors as $paramName => $defaultColor) { + + if (!isset($_GET[$paramName])) { + + $c = new Color($defaultColor); + + } else { + + try { + + $c = new Color($_GET[$paramName]); + + } catch (Exception $e) { + + $myCrowdfunding->decease(sprintf($e->getMessage(), $paramName)); + } + + } + + $CSS .= computeStyle($paramName, '#' . $c->getHex()); + } + /* + if (!$myCrowdfunding->hasTarget()) { + + $out = []; + $out[] = _('Il manque le montant à atteindre. Vérifiez votre syntaxe.'); + $out[] = _('Vérifiez votre syntaxe.'); + $myCrowdfunding->decease($out); + }*/ + + return $CSS; +} + + diff --git a/vendor/crowdfunding2/themes/paidge.css b/vendor/crowdfunding2/themes/paidge.css new file mode 100755 index 0000000..fc1f6f4 --- /dev/null +++ b/vendor/crowdfunding2/themes/paidge.css @@ -0,0 +1,224 @@ +/* ================ General ================ */ + +@font-face { + + font-family:"Font Awesome 5 Free"; + font-style:normal; + font-weight:400; + font-display:auto; + src:url(../lib/webfonts/fontawesome/400/fa-regular-400.eot); + src:url(../lib/webfonts/fontawesome/400/fa-regular-400.eot?#iefix) format("embedded-opentype"),url(../lib/webfonts/fontawesome/400/fa-regular-400.woff2) format("woff2"),url(../lib/webfonts/fontawesome/400/fa-regular-400.woff) format("woff"),url(../lib/webfonts/fontawesome/400/fa-regular-400.ttf) format("truetype"),url(../lib/webfonts/fontawesome/400/fa-regular-400.svg#fontawesome) format("svg") +} + + @font-face { + + font-family:"Font Awesome 5 Free"; + font-style:normal; + font-weight:900; + font-display:auto; + src:url(../lib/webfonts/fontawesome/900/fa-solid-900.eot); + src:url(../lib/webfonts/fontawesome/900/fa-solid-900.eot?#iefix) format("embedded-opentype"),url(../lib/webfonts/fontawesome/900/fa-solid-900.woff2) format("woff2"),url(../lib/webfonts/fontawesome/900/fa-solid-900.woff) format("woff"),url(../lib/webfonts/fontawesome/900/fa-solid-900.ttf) format("truetype"),url(../lib/webfonts/fontawesome/900/fa-solid-900.svg#fontawesome) format("svg") +} + +body { + + margin: 0 auto; + padding: 0; + text-align: center; + color: hsl(210, 10.8%, 14.5%); + background-color: white; + line-height: 1.5; + font-weight:400; + font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji"; +} + +@media (min-width: 576px) { body { max-width: 540px; } } +@media (min-width: 768px) { body { max-width: 720px; } } +@media (min-width: 992px) { body { max-width: 960px; } } +@media (min-width: 1200px) { body { max-width: 1140px; } } + +.sr-only{ + + border: 0; + clip: rect(0,0,0,0); + height: 1px; + margin: -1px; + overflow: hidden; + padding: 0; + position: absolute; + width: 1px; + white-space: nowrap; +} + +/* ================ Header ================ */ + +h1 { + + margin-top: 0; + font-size: 2.5rem; +} + +.pubkey { + + font-weight: 500; +} + +/* ================ Progress bar ================ */ + +.progress-container { + + background-color: hsl(210, 15.8%, 92.5%); + border: 1px solid hsl(210, 10.3%, 32.7%); + height: 2rem; + border-radius: 0; + + display: -ms-flexbox; + display: flex; + overflow: hidden; + font-size: .75rem; +} +@keyframes progress-bar-stripes { + + from { background-position: 1rem 0; } + to { background-position: 0 0; } +} + + .progress-bar { + + display: -ms-flexbox; + display: flex; + -ms-flex-direction: column; + flex-direction: column; + -ms-flex-pack: center; + justify-content: center; + color: #fff; + text-align: center; + white-space: nowrap; + background-color: hsl(45, 100.0%, 51.4%); + transition: width .6s ease; + + -webkit-animation: progress-bar-stripes 1s linear infinite; + animation: progress-bar-stripes 1s linear infinite; +} + +/* ================ Stats ================ */ + +section.stats { + + display: flex; + flex-wrap: wrap; + flex-direction: row; + justify-content: space-around; + + margin-top: 2rem; + margin-bottom: 2rem; + font-size: 2rem; +} + +section.stats .label { + + display: block; + font-size: 1rem; + font-weight: 500; +} + +.reached > :first-child:before, +.donorsNb > :first-child:before, +.amountCollected > :first-child:before, +.daysLeft > :first-child:before { + + font-family: "Font Awesome 5 Free"; + display: block; + margin-bottom: 1rem; +} + + +.reached > :first-child:before { + + content: "\f200"; /* Chart pie */ + font-weight:900; +} + +.donorsNb > :first-child:before { + + content: "\f007"; /* user */ +} + +.amountCollected > :first-child:before { + + content: "\f3d1"; /* fa-money-bill-alt */ +} + +.daysLeft > :first-child:before { + + content: "\f073"; /* fa-calendar-alt */ +} + +/* ================ Button ================ */ + +.CTA-button { + + margin-bottom: 0; +} + +.CTA-button a { + + display: block; + width: calc(100% - 1.5rem - 2px); + text-decoration: none; + margin-bottom: 0; +} + +.CTA-button a:before { + + font-family: "Font Awesome 5 Free"; + font-weight: bold; + content: "\f1d8"; /* fa-paper-place */ + margin-right: 0.5rem; +} + +.btn { + + transition: + color .15s ease-in-out, + background-color .15s ease-in-out, + border-color .15s ease-in-out, + box-shadow .15s ease-in-out; + padding: .375rem .75rem; + font-size: 1rem; + line-height: 1.5; + border-radius: .25rem; + border: 1px solid transparent; + display: inline-block; + font-weight: 400; + color: #212529; + text-align: center; + vertical-align: middle; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; + background-color: transparent; +} + +.btn-success{ + + color: #fff; + background-color: #28a745; + border-color: #28a745; +} + +.btn:hover { + + color: #212529; + text-decoration: none; +} + +.btn-success:hover { + + color: #fff; + background-color: #218838; + border-color: #1e7e34; +} + + diff --git a/vendor/crowdfunding2/themes/paidge.html.php b/vendor/crowdfunding2/themes/paidge.html.php new file mode 100755 index 0000000..bb66067 --- /dev/null +++ b/vendor/crowdfunding2/themes/paidge.html.php @@ -0,0 +1,256 @@ +
+ getMustHideTitle()) { + + echo ' + +

+ ' . $myCrowdfunding->getTitle() . ' +

'; + } + ?> + + getMustDisplayPubkey()) { + + echo ' + +

+ ' . sprintf(_('Clef publique du compte : %s'), $myCrowdfunding->getPubkey()) . ' +

'; + + } + + if ($qrCodePath = $myCrowdfunding->getQRCodePath()) { + + echo '

'. _('QRcode du portefeuille') .'

'; + + } ?> +
+ +
+ +
+ +
+ + + getPercentage(); ?>% + + +
+ +
+ + +
+ +
+

+ + getPercentage();?> +  % + + + + +

+
+ +
+

+ + getDonorsNb(); ?> + + + + + +

+
+ +
+

+ + getAmountCollected()); ?> + + + printUnit(); ?> + + + hasTarget()) { + + echo sprintf(_('sur un total de %s %s'), $myCrowdfunding->getTarget(), $myCrowdfunding->printUnit()); + } + ?> + +

+
+ + hasStartedYet()) { + + ?> +
+

+ + ? + + + + getStartDate()->getTimestamp() + ) + ); + ?> + +

+
+ isEvergreen() != 'forever') { + + $daysLeft = $myCrowdfunding->getDaysLeft(); + + ?> +
+

+ isOver()) { + + $daysPassed = abs($daysLeft) + 1; + + ?> + + + + + + + + + + + + + + + + +

+
+ + +
+ +getMustDisplayButton()) { + ?> +

+ + + + +

+ + +
+ + +getTargetLinePoints(), _('Objectif')); + $targetGraph->setStyle('type', 'line'); + $targetGraph->setStyle('borderColor', '#FF3E3D'); + $targetGraph->setStyle('borderDash', [5, 5]); + $targetGraph->setStyle('radius', 0); + $targetGraph->setStyle('fill', false); + $chart->addGraph($targetGraph); + + $amountDailyGraph = new Graph($chart->getAmountCollectedByDayPoints(), _('Contributions du jour')); + $amountDailyGraph->setStyle('type', 'bar'); + $amountDailyGraph->setStyle('borderColor', 'rgba(0,200,100,0.7)'); + $amountDailyGraph->setStyle('backgroundColor', 'rgba(96,200,120,0.7)'); + $amountDailyGraph->setStyle('borderWidth', 2); + $chart->addGraph($amountDailyGraph); + + $amountCumulativeGraph = new Graph($chart->getAmountCollectedByDayCumulativePoints(), _('Montant total récolté')); + $amountCumulativeGraph->setStyle('type', 'line'); + $amountCumulativeGraph->setStyle('borderColor', '#0099FF'); + $amountCumulativeGraph->setStyle('backgroundColor', '#80CCFF'); + $amountCumulativeGraph->setStyle('lineTension', 0); + $amountCumulativeGraph->setStyle('pointRadius', 1); + $amountCumulativeGraph->setStyle('borderWidth', 2); + $amountCumulativeGraph->setStyle('steppedLine', true); + $chart->addGraph($amountCumulativeGraph); + + + echo $chart->getScripts($lang, '#main'); +} +?> + + + + + diff --git a/vendor/crowdfunding2/themes/paidge.image.php b/vendor/crowdfunding2/themes/paidge.image.php new file mode 100755 index 0000000..96f6b39 --- /dev/null +++ b/vendor/crowdfunding2/themes/paidge.image.php @@ -0,0 +1,410 @@ +hasLogo()) { + + $logoRessource = imageCreateFromPNG($myCrowdfunding->getLogoPath()); + + $logoSize = imagesX($logoRessource); + + $imgWidth += $logoSize + $gutter; + + $content_x += $logoSize + $gutter; +} + +if ($myCrowdfunding->getMustDisplayQrCode()) { + + $qrCodeRessource = imageCreateFromPNG($myCrowdfunding->getQrCodePath()); + + $qrCodeSize = imagesX($qrCodeRessource); + + $qrCodePosX = $imgWidth; + $qrCodePosY = 42; + + $imgWidth += $qrCodeSize + $gutter; +} + + + +/* ===== Create image ====================================== */ + +$imgRessource = imageCreateTrueColor($imgWidth, $imgHeight); +imageAlphaBlending($imgRessource, false); + + + +/* ===== Set colors ====================================== */ + +$transparent = imageColorAllocateAlpha($imgRessource, + 255, 255, 255, + 127); + +$colorsAllocs = []; +$colorsAllocs['progressbarContainerBg'] = imageColorAllocate($imgRessource, 233, 236, 239); // #e9ecef + +foreach ($defaultColors as $paramName => $defaultColor) { + + if (!isset($_GET[$paramName])) { + + $c = new Color($defaultColor); + + } else { + + try { + + $c = new Color($_GET[$paramName]); + + } catch (Exception $e) { + + $myCrowdfunding->decease(sprintf($e->getMessage(), $paramName)); + } + + } + + $colorsAllocs[$paramName] = $c->getColorAllocation($imgRessource); +} + + + + + +/* ===== Create background ====================================== */ + +imageFill( + $imgRessource, + 0, 0, + $colorsAllocs['background_color'] + ); + +imageFilledRectangle( + $imgRessource, + 0, 0, + $imgWidth, $imgHeight, + $transparent + ); + +imageAlphaBlending($imgRessource, true); + +imageSaveAlpha($imgRessource, true); + +imageFill( + $imgRessource, + 0, 0, + $colorsAllocs['background_color'] + ); + + + + + +/* ===== Create borders ====================================== */ + +ImageRectangle( + $imgRessource, + 0, 0, + ($imgWidth-1), ($imgHeight-1), + $colorsAllocs['border_color'] + ); + +ImageRectangle( + $imgRessource, + 2, 2, + ($imgWidth-3), ($imgHeight-3), + $colorsAllocs['border_color'] + ); + + + +/* ===== Create logo ====================================== */ + +if ($myCrowdfunding->hasLogo()) { + + imagecopy( + $imgRessource, + $logoRessource, + $gutter, $verticalSpacing, + 0, 0, 150, 150 + ); + + imagedestroy($logoRessource); +} + + + + + +/* ===== Create QR Code ====================================== */ + + +if ($myCrowdfunding->getMustDisplayQrCode()) { + + imagecopymerge( + $imgRessource, + $qrCodeRessource, + $qrCodePosX, + $qrCodePosY, + 0, 0, + $qrCodeSize, $qrCodeSize, + 100 + ); + + imagedestroy($qrCodeRessource); +} + + + +/* ===== Create title ====================================== */ + +if (!$myCrowdfunding->getMustHideTitle()) { + + $title_y = ($myCrowdfunding->getMustDisplayPubkey()) ? 23 : $content_y; + + $title = $myCrowdfunding->getTitle(); + + imagettftext( + $imgRessource, + $font_size, + 0, + ($imgWidth - computeTextWidth($font_size, $fonts['sans'], $title)) / 2, + $title_y, + $colorsAllocs['font_color'], + $fonts['sans'], + $title + ); +} + + +/* ==== Create pubkey ====================================== */ + +if ($myCrowdfunding->getMustDisplayPubkey()) { + + imagettftext( + $imgRessource, + $font_size - 5, + 0, + $content_x, + $content_y + 15, + $colorsAllocs['font_color'], + $fonts['sans'], + sprintf(_('Clef publique : %s'), $myCrowdfunding->getPubkey()) + ); +} + + + + +/* ===== Create progress bar ====================================== */ + +$progressbarWidth = $progressbarContainerWidth * min(100, $myCrowdfunding->getPercentage()) / 100; + +ImageFilledRectangle( + $imgRessource, + $content_x + 1, + $content_y + $verticalSpacing+1, + $content_x + $progressbarContainerWidth, + $content_y + $verticalSpacing + $progressbarContainerHeight, + $colorsAllocs['progressbarContainerBg'] + ); + +ImageFilledRectangle( + $imgRessource, + $content_x + 1, + $content_y + $verticalSpacing + 1 , + $content_x + $progressbarWidth, + $content_y + $verticalSpacing + $progressbarContainerHeight, + $colorsAllocs['progress_color'] + ); + +ImageRectangle( + $imgRessource, + $content_x, + $content_y + $verticalSpacing, + $content_x + $progressbarContainerWidth + 1, + $content_y + $verticalSpacing + $progressbarContainerHeight + 1, + $colorsAllocs['border_color']); + +imagettftext( + $imgRessource, + $font_size, + 0, + $content_x + $progressbarWidth/2, + $content_y + $verticalSpacing + $progressbarContainerHeight/2 + 9, + $colorsAllocs['font_color'], + $fonts['sans'], + $myCrowdfunding->getPercentage() . '%' + ); + + + +/* ===== Create stats ====================================== */ + +$iconFontSize = 20; +$statFontSize = 15; +$labelFontSize = 10; +$iconBottomMargin = 12; +$statBottomMargin = 3; + +$columns = []; + +$columns[0] = [ + + [ + 'text' => '""', + 'fontFile' => $fonts['faSolid'], + 'fontSize' => $iconFontSize, + 'bottomMargin' => $iconBottomMargin + + ], [ + + 'text' => $myCrowdfunding->getPercentage() . '%', + 'fontFile' => $fonts['sans'], + 'fontSize' => $statFontSize, + 'bottomMargin' => $statBottomMargin + + ], [ + + 'text' => utf8_decode(_('atteints')), + 'fontFile' => $fonts['sans'], + 'fontSize' => $labelFontSize, + 'bottomMargin' => 0 + ] +]; + +$columns[1] = [ + + [ + 'text' => '""', + 'fontFile' => $fonts['faRegular'], + 'fontSize' => $iconFontSize, + 'bottomMargin' => $iconBottomMargin + + ], [ + + 'text' => $myCrowdfunding->getDonorsNb(), + 'fontFile' => $fonts['sans'], + 'fontSize' => $statFontSize, + 'bottomMargin' => $statBottomMargin + + ], [ + + 'text' => utf8_decode(_('donateurs')), + 'fontFile' => $fonts['sans'], + 'fontSize' => $labelFontSize, + 'bottomMargin' => 0 + ] +]; + +$columns[2] = [ + + [ + 'text' => '""', + 'fontFile' => $fonts['faRegular'], + 'fontSize' => $iconFontSize, + 'bottomMargin' => $iconBottomMargin + + ], [ + + 'text' => round($myCrowdfunding->getAmountCollected()) . ' ' . $myCrowdfunding->printUnit(), + 'fontFile' => $fonts['sans'], + 'fontSize' => $statFontSize, + 'bottomMargin' => $statBottomMargin + + ], [ + + 'text' => sprintf(_('sur %s %s'), $myCrowdfunding->getTarget(), $myCrowdfunding->printUnit()), + 'fontFile' => $fonts['sans'], + 'fontSize' => $labelFontSize, + 'bottomMargin' => 0 + ] +]; + +if (($daysLeft = $myCrowdfunding->getDaysLeft()) > 0) { + + $columns[3] = [ + + [ + 'text' => '""', + 'fontFile' => $fonts['faRegular'], + 'fontSize' => $iconFontSize, + 'bottomMargin' => $iconBottomMargin + + ], [ + + 'text' => $daysLeft, + 'fontFile' => $fonts['sans'], + 'fontSize' => $statFontSize, + 'bottomMargin' => $statBottomMargin + + ], [ + + 'text' => _('jours restants'), + 'fontFile' => $fonts['sans'], + 'fontSize' => $labelFontSize, + 'bottomMargin' => 0 + ] + ]; + +} + +$columnWidth = $progressbarContainerWidth / count($columns); +$columnMid = $columnWidth / 2; +$icone_pos_y = $content_y + $verticalSpacing + $progressbarContainerHeight + $verticalSpacing + $iconFontSize; + +foreach ($columns as $colNum => $cells) { + + $x = $content_x + $colNum * $columnWidth + $columnMid; + $y = $icone_pos_y; + $angle = 0; + + foreach ($cells as $cell) { + + imageTTFtext( + $imgRessource, + $cell['fontSize'], + $angle, + $x - (computeTextWidth($cell['fontSize'], $cell['fontFile'], $cell['text']) / 2), + $y, + $colorsAllocs['font_color'], + $cell['fontFile'], + $cell['text'] + ); + + $y += $cell['fontSize'] + $cell['bottomMargin']; + } +} + +imagepng($imgRessource); +imagedestroy($imgRessource); + diff --git a/vendor/crowdfunding2/themes/paidge.svg.php b/vendor/crowdfunding2/themes/paidge.svg.php new file mode 100755 index 0000000..2b69ee5 --- /dev/null +++ b/vendor/crowdfunding2/themes/paidge.svg.php @@ -0,0 +1,414 @@ + $defaultColor) { + + if (!isset($_GET[$paramName])) { + + $c = new Color($defaultColor); + + } else { + + try { + + $c = new Color($_GET[$paramName]); + + } catch (Exception $e) { + + $myCrowdfunding->decease(sprintf($e->getMessage(), $paramName)); + } + + } + + $colorsHex[$paramName] = '#' . $c->getHex(); +} + + +/* ===== Set dimensions ================================================== */ + +$iconSize = 25; +$qrCodeSize = 111; +$qrCodeSpaceAround = 32; +$logoSize = 150; +$progressbarBorderSize = 1; +$svgBorderSize = 1; + + + +/* ===== Set dimensions : height and Y positionning ======================= */ + +$verticalSpacing = 20; +$progressbarHeight = 25; +$progressbarContainerHeight = $progressbarHeight + 2*$progressbarBorderSize; + +$originY = 4*$svgBorderSize + $verticalSpacing; + + $titlePosY = $originY; + + $pubkeyPosY = $titlePosY; + $pubkeyPosY += $myCrowdfunding->getMustHideTitle() ? 0 : (27 + $verticalSpacing); + +$progressbarContainerPosY = $pubkeyPosY; +$progressbarContainerPosY += $myCrowdfunding->getMustDisplayPubkey() ? (15 + $verticalSpacing) : 0; + + + $progressbarPosY = $progressbarContainerPosY + $progressbarBorderSize; + $statsPosY = $progressbarPosY + $progressbarHeight + $verticalSpacing; + + $statNumberPosY = 0 + $iconSize + $verticalSpacing; + $statLabelPosY = $statNumberPosY + 21; + +$qrCodePosY = $progressbarPosY + $progressbarBorderSize + $progressbarHeight/2- $qrCodeSpaceAround/2; + +$svgHeight = $statsPosY + $statLabelPosY + 21 + $verticalSpacing; + +$statsHeight = $svgHeight - $progressbarPosY - $progressbarHeight - $verticalSpacing; + + +if ($myCrowdfunding->getMustDisplayPubkey()){ + + $svgHeight += 10 + $verticalSpacing; +} + +if (($daysLeft = $myCrowdfunding->getDaysLeft()) AND isset($daysLeft) AND ($daysLeft > 0)) { + + $colNb = 4; + +} else { + + $colNb = 3; +} + + + +/* ===== Set dimensions : width and X positionning ======================= */ + +$guttersWidth = 40; +$originX = $guttersWidth; +$progressbarContainerWidth = 500; + +$svgWidth = $progressbarContainerWidth + (2 * $guttersWidth); + +$colWidth = $progressbarContainerWidth / $colNb; +$iconX = $colWidth/2 - $iconSize/2; + +$progressbarWidth = $progressbarContainerWidth * min(1, $myCrowdfunding->getPercentage()/100) - 2*$progressbarBorderSize; + +if ($myCrowdfunding->getMustDisplayQRCode()) { + + $svgWidth += $qrCodeSize + $guttersWidth; + $qrCodePosX = $originX + $logoSize + $guttersWidth + $progressbarContainerWidth + $guttersWidth; +} + +if ($myCrowdfunding->hasLogo()) { + + $svgWidth += $logoSize + $guttersWidth; + + $originX += $logoSize + $guttersWidth; +} + + + +/* ===== SVG ====================================================== */ + +echo ''; // We must display this that way because + + + + + + + hasLogo()) { + + ?> + + + + + + + + + getMustHideTitle()) { + ?> + + + + getTitle(); ?> + + + + + + getMustDisplayPubkey()) { + + ?> + + + Pubkey : getPubkey(); ?> + + + + + + + + + + + + + + getPercentage() > 7) { + + ?> + + + + getPercentage() . '%'; ?> + + + + + + + + + + + + + + + + + + + + + + getPercentage() . '%'; ?> + + + + + + + + + + + + + + + + + + + + + + + getDonorsNb(); ?> + + + + + + + + + + + + + + + + + + + + + + + getAmountCollected()) . ' ' . $myCrowdfunding->printUnit(); + + ?> + + + + + + getTarget(), $myCrowdfunding->printUnit()); + ?> + + + + + + + + + + + + + + + + + + getDaysLeft(); ?> + + + + + + + + + + + + + + + + getMustDisplayQRCode()) { + + ?> + + + + + + \ No newline at end of file diff --git a/vendor/crowdfunding2/themes/quotes.css b/vendor/crowdfunding2/themes/quotes.css new file mode 100644 index 0000000..7741817 --- /dev/null +++ b/vendor/crowdfunding2/themes/quotes.css @@ -0,0 +1,36 @@ +body, p { + + margin: 0; + padding: 0; + /*overflow: hidden;*/ +} + +blockquote { + + background: hsl(50, 91%, 85%); + padding: 1em; + margin: 2em auto; + max-width: 500px; +} + +cite { + + text-align: right; + display: block; + margin-top: 0.666em; +} + +cite:before { + + content: "― "; +} + +body > :first-child { + + margin-top: 0; +} + +body > :last-child { + + margin-bottom: 0; +} diff --git a/vendor/crowdfunding2/themes/quotes.html.php b/vendor/crowdfunding2/themes/quotes.html.php new file mode 100755 index 0000000..861c20e --- /dev/null +++ b/vendor/crowdfunding2/themes/quotes.html.php @@ -0,0 +1,57 @@ +getUdAmount($myCrowdfunding->getStartDate()))); + +if (isset($_GET['min_comment_length'])) { + + $myCrowdfunding->setFilterMinCommentLength($_GET['min_comment_length']); + +} else { + + $myCrowdfunding->setFilterMinCommentLength(DEFAULT_FILTER_MIN_COMMENT_LENGTH); +} + +if (isset($_GET['min_donation_amount'])) { + + $myCrowdfunding->setFilterMinDonation($_GET['min_donation_amount']); + +} else { + + $myCrowdfunding->setFilterMinDonation(DEFAULT_FILTER_MIN_DONATION); +} + + + + + +$donationsList = array_reverse($myCrowdfunding->getDonationsList()); + + +if (empty($donationsList)) { + + echo '

' . _('Pas encore de citation.') . '

'; + +} else { + + + foreach ($donationsList as $t) { + + echo ' + +
'; + + echo $t->getComment(); + + echo ' + + '. $myCrowdfunding->getDonorCesiumPlusProfile($t->getDonorPubkey())->getName() .' + + + +
'; + } + +} + + diff --git a/vendor/crowdfunding2/themes/tipeee.css b/vendor/crowdfunding2/themes/tipeee.css new file mode 100755 index 0000000..67bf1b2 --- /dev/null +++ b/vendor/crowdfunding2/themes/tipeee.css @@ -0,0 +1,216 @@ +@import url('https://fonts.googleapis.com/css?family=Bitter&display=swap'); + +@font-face { + + font-family:"Font Awesome 5 Free"; + font-style:normal; + font-weight:400; + font-display:auto; + src:url(../lib/webfonts/fontawesome/400/fa-regular-400.eot); + src:url(../lib/webfonts/fontawesome/400/fa-regular-400.eot?#iefix) format("embedded-opentype"),url(../lib/webfonts/fontawesome/400/fa-regular-400.woff2) format("woff2"),url(../lib/webfonts/fontawesome/400/fa-regular-400.woff) format("woff"),url(../lib/webfonts/fontawesome/400/fa-regular-400.ttf) format("truetype"),url(../lib/webfonts/fontawesome/400/fa-regular-400.svg#fontawesome) format("svg") +} + + @font-face { + + font-family:"Font Awesome 5 Free"; + font-style:normal; + font-weight:900; + font-display:auto; + src:url(../lib/webfonts/fontawesome/900/fa-solid-900.eot); + src:url(../lib/webfonts/fontawesome/900/fa-solid-900.eot?#iefix) format("embedded-opentype"),url(../lib/webfonts/fontawesome/900/fa-solid-900.woff2) format("woff2"),url(../lib/webfonts/fontawesome/900/fa-solid-900.woff) format("woff"),url(../lib/webfonts/fontawesome/900/fa-solid-900.ttf) format("truetype"),url(../lib/webfonts/fontawesome/900/fa-solid-900.svg#fontawesome) format("svg") +} + +/* ================ General ================ */ + +body { + + + margin: 0; + padding: 0; + overflow: hidden; + + color: hsl(0, 0.0%, 13.3%); + background: transparent; + + line-height: 1.5; + + font-weight: 400; + font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji"; + + display:flex; + flex-direction:column; + align-items:center; +} + +p { + + margin-top: 0.5rem; + margin-bottom: 0.5rem; +} + +/* ================ Stats ================ */ + + +.count, +.unit, +.CTA-button * { + + font-family: 'Bitter', sans; + font-weight: bold; + font-size: 2rem; +} + +.label { + + display: block; + font-size: 1rem; + font-weight: 400; +} + +/* ================ Button ================ */ + + +#copyButton +{ + margin-bottom: 0.5rem; +} + +.CTA-button button, +.CTA-button a, +.CTA-button a:visited { + + cursor: pointer; + background-color: hsl(355, 65%, 55%); + color: white; + text-decoration: none; + + display: inline-block; + border-radius: .25rem; + border: 1px solid transparent; + padding: .375rem .75rem; + width: auto; + font-size: 1.5rem; + line-height: 1.5; + + text-align: center; + vertical-align: middle; + + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; + + transition: + color .15s ease-in-out, + background-color .15s ease-in-out, + border-color .15s ease-in-out, + box-shadow .15s ease-in-out; + + margin-bottom: 0; + +} + +.CTA-button button:hover, +.CTA-button a:hover { + + background-color: hsl(355, 70%, 60%); + +} + +.CTA-button button:before, +.CTA-button a:before { + + font-family: "Font Awesome 5 Free"; + font-weight: bold; + margin-right: 0.5rem; +} + +.CTA-button button#supportButton:before { + + content: "\f004"; /* fa-heart */ + +} +.CTA-button button#copyButton:before { + + content: "\f328"; /* fa-clipboard */ +} + +.CTA-button a.api:before { + + content: "\f1d8"; /* fa-paper-place */ +} + +#supportButtonContainer, +.stat +{ + height: 100%; + overflow: hidden; + transition-property: opacity, height; + transition-delay: 0s, 0.50s; + transition-duration: 0.49s, 0s; +} + +#pubkey-and-copy-button +{ + opacity: 0; + height: 0; + transition-property: opacity, height; + transition-delay: 0.51s, 0.51s; + transition-duration: 0.50s, 0s; +} + +#pubkey +{ + border: transparent; + background: transparent; + font-family: inherit; + font-size: inherit; +} + +#pubkey:focus +{ + outline: 0; +} + +#pubkey::selection +{ + background: transparent; + border: 0; +} + + +.countup > * +{ + margin-bottom: 1rem; +} + + +.countup +{ + margin-bottom: 1.5rem; +} + +#successMsg +{ + opacity: 0; + /*height: 0;*/ + line-height: 1.5em; + transition-property: opacity, height; + transition-duration: 1.5s, 0.5s; +} + + +/* ================ iframe autoHeight handling ================ */ + +body > :first-child { + + margin-top: 0; +} + +body > :last-child { + + margin-bottom: 0; +} + + + diff --git a/vendor/crowdfunding2/themes/tipeee.html.php b/vendor/crowdfunding2/themes/tipeee.html.php new file mode 100755 index 0000000..059e8c4 --- /dev/null +++ b/vendor/crowdfunding2/themes/tipeee.html.php @@ -0,0 +1,145 @@ +
+ +
+

+ getMonthlyAmountCollectedMean($myCrowdfunding->getMonthsToConsider())); + + ?>printUnit(); + + ?> + + + getMonthsToConsider()); + ?> + +

+
+ +
+

+ + getPeriodDonorsMean($myCrowdfunding->getMonthsToConsider()); ?> + + + + getMonthsToConsider()); + ?> + +

+
+ +
+

+ + getPeriodDonorsNb($myCrowdfunding->getMonthsToConsider()); + ?> + + + + getMonthsToConsider()); + ?> + +

+
+
+ +getMustDisplayButton()) { + + if ($myCrowdfunding->getButtonType() == 'api') { + + ?> +

+ + + getTitle()); ?> + +

+ + getButtonType() == 'copy') { + + } else { + + ?> +

+ +

+ +
+

+ Pour faire un don copiez la clef suivante : + + ... +

+ +

+ +

+ +

+ Clef copiée dans le presse-papier ! Collez-la maintenant dans Cesium afin de faire votre don 😉
+

+
+ + + + + + + diff --git a/vendor/crowdfunding2/themes/tipeeers.css b/vendor/crowdfunding2/themes/tipeeers.css new file mode 100755 index 0000000..aa19ed4 --- /dev/null +++ b/vendor/crowdfunding2/themes/tipeeers.css @@ -0,0 +1,175 @@ +.donorsList { + list-style: none; + font-family: sans-serif; + margin: 0; + padding: 0; + /* + display: flex; + flex-wrap: wrap; + */ + justify-content: center; + display: grid; + grid-row-gap: 1rem; +} + +@media screen and (min-width: 448px) { + .donorsList { + grid-template-columns: repeat(2, 200px); + grid-column-gap: 20px; + } + + .donorsList > li:nth-of-type(2n+1) { + grid-column: 1; + } + + .donorsList > li:nth-of-type(2n+2) { + grid-column: 2; + } +} + +@media screen and (min-width: 672px) { + .donorsList { + grid-template-columns: repeat(3, 204px); + grid-column-gap: 20px; + } + + .donorsList > li:nth-of-type(3n+1) { + grid-column: 1; + } + + .donorsList > li:nth-of-type(3n+2) { + grid-column: 2; + } + + .donorsList > li:nth-of-type(3n+3) { + grid-column: 3; + } +} + +@media screen and (min-width: 896px) { + .donorsList { + grid-template-columns: repeat(4, 204px); + grid-column-gap: 20px; + } + + .donorsList > li:nth-of-type(4n+1) { + grid-column: 1; + } + + .donorsList > li:nth-of-type(4n+2) { + grid-column: 2; + } + + .donorsList > li:nth-of-type(4n+3) { + grid-column: 3; + } + + .donorsList > li:nth-of-type(4n+4) { + grid-column: 4; + } +} + +@media screen and (min-width: 1120px) { + .donorsList { + grid-template-columns: repeat(5, 204px); + grid-column-gap: 20px; + } + + .donorsList > li:nth-of-type(5n+1) { + grid-column: 1; + } + + .donorsList > li:nth-of-type(5n+2) { + grid-column: 2; + } + + .donorsList > li:nth-of-type(5n+3) { + grid-column: 3; + } + + .donorsList > li:nth-of-type(5n+4) { + grid-column: 4; + } + + .donorsList > li:nth-of-type(5n+5) { + grid-column: 5; + } +} + +@media screen and (min-width: 1344px) { + .donorsList { + grid-template-columns: repeat(6, 204px); + grid-column-gap: 20px; + } + + .donorsList > li:nth-of-type(6n+1) { + grid-column: 1; + } + + .donorsList > li:nth-of-type(6n+2) { + grid-column: 2; + } + + .donorsList > li:nth-of-type(6n+3) { + grid-column: 3; + } + + .donorsList > li:nth-of-type(6n+4) { + grid-column: 4; + } + + .donorsList > li:nth-of-type(6n+5) { + grid-column: 5; + } + + .donorsList > li:nth-of-type(6n) { + grid-column: 6; + } +} + +.donorsList li { + /* + flex-basis: var(--base-width); + flex-grow: 0; + + display: flex; + align-items: center; + */ + background-color: white; + overflow: hidden; + border: 2px solid hsl(0, 0%, 90%); + box-shadow: -1px 1px 10px hsla(0, 0%, 0%, 0.2); + margin: 0; + text-align: center; + border-radius: 1em; +} + +.donorsList li a { + width: 100%; + color: hsl(0, 0%, 10%); + text-decoration: none; + font-size: 0.9em; +} + +.donorsList li a img { + background-color: #1a237e; + width: 100%; +} + +.donorsList li a img, +.donorsList li a .name { + width: 100%; +} + +.donorsList li a .name { + display: block; + padding: 1rem 0; + font-weight: bold; + text-align: center; +} + +.donorsList li a .name span { + display: inline-block; + padding: 0 1em; + text-align: left; +} diff --git a/vendor/crowdfunding2/themes/tipeeers.html.php b/vendor/crowdfunding2/themes/tipeeers.html.php new file mode 100755 index 0000000..9c9bcd3 --- /dev/null +++ b/vendor/crowdfunding2/themes/tipeeers.html.php @@ -0,0 +1,48 @@ +getDonors(); + +if (empty($donors)) { + + echo _('Pas encore de donateurs'); + +} else { + + echo ''; +} +