From c938f608c78451b924ef650e947236fac5302f0d Mon Sep 17 00:00:00 2001 From: Amirreza Nazemi Date: Sun, 16 Nov 2025 14:59:51 +0330 Subject: [PATCH 1/2] Add QR shortcode type with animation support --- assets/js/qr-animation.js | 51 ++++++ includes/modules/assets/assets.php | 14 ++ includes/modules/shortcodes/types/qr.php | 190 +++++++++++++++++++++++ 3 files changed, 255 insertions(+) create mode 100644 assets/js/qr-animation.js create mode 100644 includes/modules/shortcodes/types/qr.php diff --git a/assets/js/qr-animation.js b/assets/js/qr-animation.js new file mode 100644 index 0000000..d745145 --- /dev/null +++ b/assets/js/qr-animation.js @@ -0,0 +1,51 @@ +// Handles QR animations for elements rendered by AnyS. +(function () { + /** + * Applies animation to a QR element when requested. + * + * @param {HTMLElement} qrElement The element. + */ + function applyQrAnimation(qrElement) { + if (!qrElement) { + return; + } + + var animationAttributeValue = qrElement.getAttribute('data-anys-qr-animation'); + + if (!animationAttributeValue) { + return; + } + + // Executes animation after the QR code finishes rendering. + qrElement.addEventListener('codeRendered', function () { + if (typeof qrElement.animateQRCode === 'function') { + try { + qrElement.animateQRCode(animationAttributeValue); + } catch (error) { + // Prevents frontend interruptions. + } + } + }); + } + + /** + * Initializes animation handlers for all QR elements. + */ + function initializeQrAnimations() { + var qrElements = document.querySelectorAll('qr-code[data-anys-qr-animation]'); + + if (!qrElements.length) { + return; + } + + qrElements.forEach(function (qrElement) { + applyQrAnimation(qrElement); + }); + } + + if (document.readyState === 'loading') { + document.addEventListener('DOMContentLoaded', initializeQrAnimations); + } else { + initializeQrAnimations(); + } +})(); diff --git a/includes/modules/assets/assets.php b/includes/modules/assets/assets.php index c72cf25..b944222 100644 --- a/includes/modules/assets/assets.php +++ b/includes/modules/assets/assets.php @@ -58,6 +58,20 @@ protected function get_assets() { 'in_footer' => true, 'is_module' => true, ], + 'anys-qr-code' => [ + 'src' => 'https://unpkg.com/@bitjson/qr-code@1.0.2/dist/qr-code.js', + 'deps' => [], + 'version' => '1.0.2', + 'in_footer' => true, + 'is_module' => false, + ], + 'anys-qr-animation' => [ + 'src' => ANYS_JS_URL . 'qr-animation.js', + 'deps' => [ 'anys-qr-code' ], + 'version' => '1.0.0', + 'in_footer' => true, + 'is_module' => false, + ], ], ]; diff --git a/includes/modules/shortcodes/types/qr.php b/includes/modules/shortcodes/types/qr.php new file mode 100644 index 0000000..f37c0b4 --- /dev/null +++ b/includes/modules/shortcodes/types/qr.php @@ -0,0 +1,190 @@ + '', + 'before' => '', + 'after' => '', + 'fallback' => '', + 'format' => '', + 'size' => 200, + 'class' => 'anys-qr', + 'style' => '', + 'module_color' => '', + 'position_ring_color' => '', + 'position_center_color' => '', + 'animation' => '', + ]; + } + + /** + * Renders the shortcode output. + * + * @since NEXT + * + * @param array $attributes Parsed shortcode attributes. + * @param string $content Inner shortcode content. + * + * @return string + */ + public function render( array $attributes, string $content = '' ): string { + // Resolves merged attributes. + $attributes = $this->get_attributes( $attributes ); + $attributes = anys_parse_dynamic_attributes( $attributes ); + + // Enqueues frontend scripts. + if ( ! is_admin() ) { + wp_enqueue_script( 'anys-qr-animation' ); + } + + // Resolves QR contents. + $resolved_contents = ''; + + if ( ! empty( $attributes['text'] ) ) { + $resolved_contents = trim( (string) $attributes['text'] ); + } elseif ( '' !== $content ) { + $raw_contents = do_shortcode( $content ); + $raw_contents = wp_strip_all_tags( $raw_contents ); + $resolved_contents = trim( $raw_contents ); + } + + if ( '' === $resolved_contents ) { + return ''; + } + + // Resolves size attribute. + $qr_size_value = isset( $attributes['size'] ) + ? (int) $attributes['size'] + : 200; + + // Resolves class name. + $qr_class_value = isset( $attributes['class'] ) + ? trim( (string) $attributes['class'] ) + : ''; + + if ( '' !== $qr_class_value ) { + $qr_class_value = sanitize_html_class( $qr_class_value ); + } + + // Builds style attribute. + $style_input_value = isset( $attributes['style'] ) ? (string) $attributes['style'] : ''; + $style_attributes_list = [ + "width: {$qr_size_value}px", + "height: {$qr_size_value}px", + ]; + + if ( '' !== trim( $style_input_value ) ) { + $style_attributes_list[] = trim( $style_input_value ); + } + + $qr_style_attribute = implode( '; ', $style_attributes_list ); + + // Resolves optional color attributes. + $module_color_value = (string) ( $attributes['module_color'] ?? '' ); + $position_ring_color_value = (string) ( $attributes['position_ring_color'] ?? '' ); + $position_center_color_value = (string) ( $attributes['position_center_color'] ?? '' ); + + // Resolves animation attribute. + $animation_value = trim( (string) ( $attributes['animation'] ?? '' ) ); + + // Builds QR element attributes. + $qr_code_attributes = [ + 'contents' => $resolved_contents, + 'style' => $qr_style_attribute, + ]; + + if ( '' !== $qr_class_value ) { + $qr_code_attributes['class'] = $qr_class_value; + } + + if ( '' !== $module_color_value ) { + $qr_code_attributes['module-color'] = $module_color_value; + } + + if ( '' !== $position_ring_color_value ) { + $qr_code_attributes['position-ring-color'] = $position_ring_color_value; + } + + if ( '' !== $position_center_color_value ) { + $qr_code_attributes['position-center-color'] = $position_center_color_value; + } + + if ( '' !== $animation_value ) { + $qr_code_attributes['data-anys-qr-animation'] = $animation_value; + } + + // Builds attribute markup. + $attributes_html = ''; + + foreach ( $qr_code_attributes as $attribute_name => $attribute_value ) { + if ( '' === $attribute_value ) { + continue; + } + + $attributes_html .= sprintf( + ' %s="%s"', + esc_attr( $attribute_name ), + esc_attr( (string) $attribute_value ) + ); + } + + // Creates the QR element. + $qr_element = sprintf( + '', + $attributes_html + ); + + // Applies formatting wrappers. + $qr_element = anys_format_value( $qr_element, $attributes ); + $final_output = anys_wrap_output( $qr_element, $attributes ); + + // Extends allowed kses attributes. + $allowed_html = wp_kses_allowed_html( 'post' ); + + $allowed_html['qr-code'] = [ + 'class' => true, + 'style' => true, + 'contents' => true, + 'module-color' => true, + 'position-ring-color' => true, + 'position-center-color' => true, + 'data-anys-qr-animation' => true, + ]; + + return wp_kses( (string) $final_output, $allowed_html ); + } +} From 96c11b47bb4fab910160e1f44d1cc2b13dc1e64e Mon Sep 17 00:00:00 2001 From: Amirreza Nazemi Date: Mon, 17 Nov 2025 17:32:07 +0330 Subject: [PATCH 2/2] feat(qr): add class-based animation handler and vendor scripts - Added class-based QR animation module. - Included downloaded vendor QR code scripts. - Updated enqueue conditions to load animation script only when required. --- assets/js/qr-animation.js | 114 +++++++++++++----- assets/vendor/qr-code/LICENSE | 22 ++++ assets/vendor/qr-code/qr-code.js | 5 + assets/vendor/qr-code/qr-code/mu42bxql.es5.js | 2 + assets/vendor/qr-code/qr-code/mu42bxql.js | 2 + .../vendor/qr-code/qr-code/mu42bxql.sc.es5.js | 2 + assets/vendor/qr-code/qr-code/mu42bxql.sc.js | 2 + .../vendor/qr-code/qr-code/qr-code.global.js | 4 + .../qr-code/qr-code/qr-code.orxjfzvr.js | 5 + .../qr-code/qr-code/qr-code.y9wpr14h.js | 85 +++++++++++++ includes/modules/assets/assets.php | 5 +- includes/modules/shortcodes/types/qr.php | 10 +- 12 files changed, 223 insertions(+), 35 deletions(-) create mode 100644 assets/vendor/qr-code/LICENSE create mode 100644 assets/vendor/qr-code/qr-code.js create mode 100644 assets/vendor/qr-code/qr-code/mu42bxql.es5.js create mode 100644 assets/vendor/qr-code/qr-code/mu42bxql.js create mode 100644 assets/vendor/qr-code/qr-code/mu42bxql.sc.es5.js create mode 100644 assets/vendor/qr-code/qr-code/mu42bxql.sc.js create mode 100644 assets/vendor/qr-code/qr-code/qr-code.global.js create mode 100644 assets/vendor/qr-code/qr-code/qr-code.orxjfzvr.js create mode 100644 assets/vendor/qr-code/qr-code/qr-code.y9wpr14h.js diff --git a/assets/js/qr-animation.js b/assets/js/qr-animation.js index d745145..c4ae4e5 100644 --- a/assets/js/qr-animation.js +++ b/assets/js/qr-animation.js @@ -1,51 +1,105 @@ // Handles QR animations for elements rendered by AnyS. -(function () { +window.anys = window.anys || {}; +window.anys.shortcodes = window.anys.shortcodes || {}; + +/** + * Controls QR animations for elements. + * + * @since NEXT + */ +class QRAnimator { /** - * Applies animation to a QR element when requested. + * Constructor. * - * @param {HTMLElement} qrElement The element. + * @param {Object} options Optional configuration object. + * @param {string} [options.selector] CSS selector for QR elements. + * @param {string} [options.animationAttr] Data attribute that holds animation name. + * @param {string} [options.renderEvent] Event name fired when QR is rendered. + * @param {string} [options.animationMethod] Method name on element that triggers animation. */ - function applyQrAnimation(qrElement) { - if (!qrElement) { - return; + constructor(options) { + this.settings = Object.assign( + { + selector: 'qr-code[data-anys-qr-animation]', + animationAttr: 'data-anys-qr-animation', + renderEvent: 'codeRendered', + animationMethod: 'animateQRCode', + }, + options || {} + ); + + this.attachAll = this.attachAll.bind(this); + } + + /** + * Initializes the animator on DOM ready. + */ + init() { + if (document.readyState === 'loading') { + document.addEventListener('DOMContentLoaded', this.attachAll); + } else { + this.attachAll(); } + } - var animationAttributeValue = qrElement.getAttribute('data-anys-qr-animation'); + /** + * Attaches animation handlers to all matched elements. + */ + attachAll() { + var elements = document.querySelectorAll(this.settings.selector); - if (!animationAttributeValue) { + if (!elements.length) { return; } - // Executes animation after the QR code finishes rendering. - qrElement.addEventListener('codeRendered', function () { - if (typeof qrElement.animateQRCode === 'function') { - try { - qrElement.animateQRCode(animationAttributeValue); - } catch (error) { - // Prevents frontend interruptions. - } - } + elements.forEach((element) => { + this.attach(element); }); } /** - * Initializes animation handlers for all QR elements. + * Attaches animation handler to a single element. + * + * @param {HTMLElement} element The QR element. */ - function initializeQrAnimations() { - var qrElements = document.querySelectorAll('qr-code[data-anys-qr-animation]'); + attach(element) { + if (!element) { + return; + } - if (!qrElements.length) { + var attrName = this.settings.animationAttr; + var animation = element.getAttribute(attrName); + + if (!animation) { return; } - qrElements.forEach(function (qrElement) { - applyQrAnimation(qrElement); - }); - } + var eventName = this.settings.renderEvent; + var animationMethod = this.settings.animationMethod; + + element.addEventListener( + eventName, + function () { + var animateFn = element[animationMethod]; - if (document.readyState === 'loading') { - document.addEventListener('DOMContentLoaded', initializeQrAnimations); - } else { - initializeQrAnimations(); + if (typeof animateFn !== 'function') { + return; + } + + try { + animateFn.call(element, animation); + } catch (error) { + // Intentionally ignores animation errors. + } + }, + { once: true } + ); } -})(); +} + +// Exposes class for external usage. +window.anys.shortcodes.QRAnimator = QRAnimator; + +// Creates default singleton instance. +window.anys.shortcodes.qrAnimator = new window.anys.shortcodes.QRAnimator(); +window.anys.shortcodes.qrAnimator.init(); diff --git a/assets/vendor/qr-code/LICENSE b/assets/vendor/qr-code/LICENSE new file mode 100644 index 0000000..c2c0235 --- /dev/null +++ b/assets/vendor/qr-code/LICENSE @@ -0,0 +1,22 @@ +MIT License + +Copyright (c) 2019-2023 Jason Dreyzehner +Copyright (c) 2018 BitPay + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/assets/vendor/qr-code/qr-code.js b/assets/vendor/qr-code/qr-code.js new file mode 100644 index 0000000..2b67a09 --- /dev/null +++ b/assets/vendor/qr-code/qr-code.js @@ -0,0 +1,5 @@ +/*! + * Built with http://stenciljs.com + * 2025-10-17T13:48:38 + */ +!function(e,t,o,r,n,i,s,c,u,l,a,d,p,m){for((a=e.QrCode=e.QrCode||{}).components=u,(p=u.filter(function(e){return e[2]}).map(function(e){return e[0]})).length&&((d=t.createElement("style")).innerHTML=p.join()+"{visibility:hidden}.hydrated{visibility:inherit}",d.setAttribute("data-styles",""),t.head.insertBefore(d,t.head.firstChild)),function(e,t,o){(e["s-apps"]=e["s-apps"]||[]).push("QrCode"),o.componentOnReady||(o.componentOnReady=function(){var t=this;function o(o){if(t.nodeName.indexOf("-")>0){for(var r=e["s-apps"],n=0,i=0;i=0&&!(m=p[d]).src&&!m.hasAttribute("data-resources-url");d--);p=m.getAttribute("data-resources-url"),!n&&p&&(n=p),!n&&m.src&&(n=(p=m.src.split("/").slice(0,-1)).join("/")+(p.length?"/":"")+"qr-code/"),d=t.createElement("script"),function(e,t,o,r){return!(t.search.indexOf("core=esm")>0)&&(!(!(t.search.indexOf("core=es5")>0||"file:"===t.protocol)&&e.customElements&&e.customElements.define&&e.fetch&&e.CSS&&e.CSS.supports&&e.CSS.supports("color","var(--c)")&&"noModule"in o)||function(e){try{return new Function('import("")'),!1}catch(e){}return!0}())}(e,e.location,d)?d.src=n+"qr-code.y9wpr14h.js":(d.src=n+"qr-code.orxjfzvr.js",d.setAttribute("type","module"),d.setAttribute("crossorigin",!0)),d.setAttribute("data-resources-url",n),d.setAttribute("data-namespace","qr-code"),t.head.appendChild(d)}(window,document,0,0,0,0,0,0,[["qr-code","mu42bxql",1,[["animateQRCode",6],["contents",1,0,1,2],["data",5],["getModuleCount",6],["maskXToYRatio",1,0,"mask-x-to-y-ratio",4],["moduleColor",1,0,"module-color",2],["moduleCount",5],["positionCenterColor",1,0,"position-center-color",2],["positionRingColor",1,0,"position-ring-color",2],["protocol",1,0,1,2],["qrCodeElement",7],["squares",1,0,1,3]],1]],HTMLElement.prototype); diff --git a/assets/vendor/qr-code/qr-code/mu42bxql.es5.js b/assets/vendor/qr-code/qr-code/mu42bxql.es5.js new file mode 100644 index 0000000..97d2b2c --- /dev/null +++ b/assets/vendor/qr-code/qr-code/mu42bxql.es5.js @@ -0,0 +1,2 @@ +/*! Built with http://stenciljs.com */ +QrCode.loadBundle("mu42bxql",["exports"],function(t){var e,r=window.QrCode.h,n=function(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)},o=function(){return n()+n()+n()+n()+n()+n()+n()+n()};function i(t){return!!t||0===t||!1===t}function a(t){return"function"==typeof t}function u(t){return"number"==typeof t}function f(t){return"object"==typeof t&&!!t}function s(t){return"string"==typeof t}function c(t){return t&&isFinite(t.length)&&!s(t)&&!a(t)}function l(t){return t.nodeType||t instanceof SVGElement}function d(t,e){return t.hasOwnProperty(e)}var g=1,h=2,v=3,p=void 0,m=/^([+|-]*[0-9]*[.]*?[0-9]+)([a-z%]+)*$/i;function y(t,e){return-1!==function(t,e){return t.indexOf(e)}(t,e)}function w(t,e,r){var n=t&&t.length;if(!n)return p;if(e===p)return t[r?n-1:0];if(r){for(var o=n-1;o>-1;o--)if(e(t[o]))return t[o]}else for(o=0;oo?1:0}}function k(t){return i(t)?c(t)?t:[t]:[]}function B(t,e){return e!==p&&Array.prototype.push.call(t,e),e}function M(t,e){return y(t,e)||B(t,e),e}function A(t,e){var r=[];return R(t,function(t){var n=e(t);c(n)?R(n,function(t){return B(r,t)}):B(r,n)}),r}function R(t,e){for(var r=k(t),n=0,o=r.length;n-1;n--){var o=D[n];vt(x,o,r)}}else q()}function j(t){b(D,t),D.length||q()}var E=function(t,e,r){R(t.players,function(t){return t.cancel()}),t.state=g,t.time=p,t.round=p,t.players=p,j(t.id),r.trigger("cancel")},F=function(t,e,r){E(t,0,r),r.destroyed=!0},O=Math.abs,Q=Math.floor,Y=Math.max,X=Math.min;function W(t,e,r){return t!==p&&e<=t&&t<=r}var H={};function N(t){H[t.name]=t}var G=0,U=/\[object ([a-z]+)\]/i;function V(t,e){for(var r in t)if(t[r]===e)return r;var n=function(t){var e=t.id||t.name;if(!e){e=Object.prototype.toString.call(t);var r=U.exec(e);r&&(e=r[1])}return"@"+e+"_"+ ++G}(e);return t[n]=e,n}function Z(t){return s(t)?Array.prototype.slice.call(document.querySelectorAll(t)):a(t)?Z(t()):c(t)?A(t,Z):f(t)?[t]:[]}function $(){var t={};return R(arguments,function(e){for(var r in e)d(e,r)&&(t[r]=e[r])}),t}function _(t,e,r,n){return a(t)?_(t(e,r,n),e,r,n):t}var J=C("offset");function K(t){var e;R(t,function(t){t.value!==p?e=t.value:t.value=e})}function tt(t){for(var e,r=t.length-1;r>-1;r--){var n=t[r];n.interpolate!==p?e=n.interpolate:n.interpolate=e}}function et(t,e,r,n,o){var i=w(e,function(t){return 0===t.offset});if(i===p||i.value===p){var a=n.getValue(r,o);i===p?e.splice(0,0,{offset:0,value:a,easing:t.easing,interpolate:p}):(i.value=a,i.easing=t.easing,i.interpolate=p)}}function rt(t,e){var r=w(e,function(t){return 1===t.offset},!0);if(r===p||r.value===p){var n=e[e.length-1].value;r===p?B(e,{offset:1,value:n,easing:t.easing,interpolate:p}):(r.value=n,r.easing=r.easing||t.easing)}}var nt=function(t,e,r){t.players===p&&function(t){t.players=[],R(t.configs,function(e){return function(t,e){R(function(t){var e=t.keyframes,r=t.from,n=t.to,o=t.stagger||0,i=t.duration,a=[];return R(Z(t.target),function(u,f,s){var c={},l={};for(var d in R(e,function(t){var e=c[t.prop]||(c[t.prop]=[]),n=(t.time-r)/(i||1),o=t.easing,a=t.interpolate,f=_(t.value,u,t.index,s);l[t.prop]=t.plugin;var d=w(e,function(t){return t.offset===n})||B(e,{easing:o,offset:n,value:f,interpolate:a});d.easing=o,d.value=f,d.interpolate=a}),H){var g=H[d];if(g.onWillAnimate&&t.keyframes.some(function(t){return t.plugin===d})){var h=$(t,{target:u});g.onWillAnimate(h,c,l)}}for(var v in c){var p=c[v],m=l[v],y=H[m];p&&(p.sort(J),et(t,p,u,y,v),K(p),tt(p),rt(t,p),B(a,{plugin:l[v],target:u,prop:v,from:r+(o?o*f:0),to:n+(o?o*f:0),keyframes:p}))}}),a}(function t(e,r,n){if(!i(r)||u(r)||a(r))return r;if(s(r)){var o=r;return d(e,o)&&"@"===o.charAt(0)?e[o]:o}if(c(r)){var f=[];return R(r,function(r){return B(f,t(e,r,n))}),f}if(!n||l(r))return r;var g={};for(var h in r)if(d(r,h)){var v=r[h];g[h]=n?t(e,v,"targets"!==h):v}return g}(t.refs,e,!0)),function(e){var r=H[e.plugin].animate(e);r&&(r.from=e.from,r.to=e.to,B(t.players,r))})}(t,e)}),function(t){t.duration=Y.apply(p,t.players.filter(function(t){return isFinite(t.to)}).map(function(t){return t.to})),t.time=isFinite(t.time)?t.time:t.rate<0?t.duration:0}(t)}(t);var n=t.state===v,o=t.time;n||j(t.id),R(t.players,function(e){var r=e.from,i=e.to,a=n&&W(Q(o),r,i),u=(1,X(Y((o-r)/(i-r),0),1));e.update(u,t.rate,a)}),r.trigger("update")},ot=function(t,e,r){t.round=0,t.state=h,t.yoyo||(t.time=t.rate<0?0:t.duration),j(t.id),nt(t,0,r),r.trigger("finish"),t.destroy&&F(t,0,r)},it=function(t,e,r){t.state=h,j(t.id),nt(t,0,r),r.trigger("pause")},at=function(t,e,r){e&&(t.repeat=e.repeat,t.yoyo=!!e.alternate,t.destroy=!!e.destroy),t.repeat=t.repeat||1,t.yoyo=t.yoyo||!1,t.state=v;var n,o=t.rate>=0;o&&t.time===t.duration?t.time=0:o||0!==t.time||(t.time=t.duration),n=t.id,y(D,n)||B(D,n),I||(I=S(P)),nt(t,0,r),r.trigger("play")},ut=function(t){for(var e=0,r=0,n=t.configs,o=0,i=n.length;o1&&!i(r.offset)&&(r.offset=1);for(var n=1,o=t.length;n=1?1:n*r+t-(n*r+t)%r}}(+i[1],i[2]);if("cubic-bezier"===a)return e=+i[1],r=+i[2],n=+i[3],o=+i[4],e<0||e>1||n<0||n>1?function(t){return t}:function(t){if(0===t||1===t)return t;var i=0,a=1,u=19;do{var f=.5*(i+a),s=wt(e,n,f);if(Mt(t-s)<1e-4)return wt(r,o,f);se)return n;return r-1}(n,o),a=i?i-1:0,u=n[i],f=n[a],s=r[a],c=(o-f)/(u-f),l=s.easing?Rt(s.easing)(c):c;return s.simpleFn?s.interpolate(s.value,r[i].value,l):s.interpolate(s.value,r[i].value)(l)}),s=function(t,e){var r=Ot(t,e);return r===Pt?function(t,e){return function(r){return t.style.setProperty(e,r?r+"":"")}}(t,e):r===zt?function(t,e){return function(r){return t.setAttribute(e,r)}}(t,e):r===qt?function(t,r){var n=Tt(e);return function(e){return t.setAttribute(n,e)}}(t):function(t,e){return function(r){return t[e]=r}}(t,e)}(o,i),c=Qt(o,i),l=p;return{cancel:function(){l!==p&&s(l),l=p},update:function(t,e,r){l===p&&(l=c()),s(f(t))}}},getValue:function(t,e){return Qt(t,e)()}});var Xt=Dt("rotateX,rotateY,rotateZ,rotate"),Wt=Dt("scaleX,scaleY,scaleZ,scale"),Ht=Dt("perspective,x,y,z"),Nt=Xt.concat(Wt,Ht),Gt={x:"translateX",y:"translateY",z:"translateZ"},Ut=Dt("backgroundSize,border,borderBottom,borderBottomLeftRadius,borderBottomRightRadius,borderBottomWidth,borderLeft,borderLeftWidth,borderRadius,borderRight,borderRightWidth,borderTop,borderTopLeftRadius,borderTopRightRadius,borderTopWidth,borderWidth,bottom,columnGap,columnRuleWidth,columnWidth,columns,flexBasis,font,fontSize,gridColumnGap,gridGap,gridRowGap,height,left,letterSpacing,lineHeight,margin,marginBottom,marginLeft,marginRight,marginTop,maskSize,maxHeight,maxWidth,minHeight,minWidth,outline,outlineOffset,outlineWidth,padding,paddingBottom,paddingLeft,paddingRight,paddingTop,perspective,right,shapeMargin,tabSize,top,width,wordSpacing");function Vt(t){var e={unit:p,value:p};if(!i(t))return e;if(Number(t))return e.value=+t,e;var r=m.exec(t);return r&&(e.unit=r[2]||p,e.value=r[1]?parseFloat(r[1]):p),e}var Zt,$t,_t,Jt={name:"web",animate:function(t){var e=t.keyframes,r=t.prop,n=t.from,o=t.to,i=t.target,a=o-n,u=At(function(){var t=e.map(function(t){var e,n=t.offset,o=t.value,i=t.easing;return(e={offset:n})[r]=o,e.easing=i,e}),n=i.animate(t,{duration:a,fill:"both"});return n.pause(),n});return{cancel:function(){u().cancel()},update:function(t,e,r){var n=u(),o=a*t;if(O(n.currentTime-o)>1&&(n.currentTime=o),r&&n.playbackRate!==e){var i=n.currentTime;i<1?n.currentTime=1:i>=a-1&&(n.currentTime=a-1),n.playbackRate=e}r&&!("running"===n.playState||"finish"===n.playState)&&!(e<0&&o<17)&&!(e>=0&&o>a-17)&&n.play(),!r&&("running"===n.playState||"pending"===n.playState)&&n.pause()}}},getValue:function(t,e){return getComputedStyle(t)[e]},onWillAnimate:function(t,e,r){l(t.target)&&(function(t){for(var e in t)if(y(Ut,e)){var r=t[e];for(var n in r){var o=r[n];i(o)&&u(o.value)&&(o.value+="px")}}}(e),function(t,e,r){var n=t.propNames.filter(function(t){return y(Nt,t)});if(n.length){if(y(t.propNames,"transform"))throw new Error("transform + shorthand is not allowed");var o=[],a={};R(n,function(t){var r=e[t];r&&R(r,function(t){a[t.offset]=t.easing,M(o,t.offset)})}),o.sort();for(var u=o.map(function(t){var r={};return R(n,function(n){var o=w(e[n],function(e){return e.offset===t});r[n]=o?o.value:p}),{offset:t,easing:a[t],values:r}}),f=u.length,s=f-1;s>-1;--s){var c=u[s];for(var l in c.values)if(!i(c.values[l])){for(var d=p,g=s-1;g>-1;g--)if(i(u[g].values[l])){d=g;break}for(var h=p,v=s+1;v=7&&B(t),null==v&&(v=R(r,n,m)),A(v,e)},b=function(t,e){for(var r=-1;r<=7;r+=1)if(!(t+r<=-1||h<=t+r))for(var n=-1;n<=7;n+=1)e+n<=-1||h<=e+n||(a[t+r][e+n]=0<=r&&r<=6&&(0==n||6==n)||0<=n&&n<=6&&(0==r||6==r)||2<=r&&r<=4&&2<=n&&n<=4)},C=function(){for(var t=8;t>n&1);a[Math.floor(n/3)][n%3+h-8-3]=o}for(n=0;n<18;n+=1)o=!t&&1==(e>>n&1),a[n%3+h-8-3][Math.floor(n/3)]=o},M=function(t,e){for(var r=n<<3|e,o=i.getBCHTypeInfo(r),u=0;u<15;u+=1){var f=!t&&1==(o>>u&1);u<6?a[u][8]=f:u<8?a[u+1][8]=f:a[h-15+u][8]=f}for(u=0;u<15;u+=1)f=!t&&1==(o>>u&1),u<8?a[8][h-u-1]=f:u<9?a[8][15-u-1+1]=f:a[8][15-u-1]=f;a[h-8][8]=!t},A=function(t,e){for(var r=-1,n=h-1,o=7,u=0,f=i.getMaskFunction(e),s=h-1;s>0;s-=2)for(6==s&&(s-=1);;){for(var c=0;c<2;c+=1)if(null==a[n][s-c]){var l=!1;u>>o&1)),f(n,s-c)&&(l=!l),a[n][s-c]=l,-1==(o-=1)&&(u+=1,o=7)}if((n+=r)<0||h<=n){n-=r,r=-r;break}}},R=function(t,e,r){for(var n=f.getRSBlocks(t,e),o=s(),a=0;a8*l)throw"code length overflow. ("+o.getLengthInBits()+">"+8*l+")";for(o.getLengthInBits()+4<=8*l&&o.put(0,4);o.getLengthInBits()%8!=0;)o.putBit(!1);for(;!(o.getLengthInBits()>=8*l||(o.put(236,8),o.getLengthInBits()>=8*l));)o.put(17,8);return function(t,e){for(var r=0,n=0,o=0,a=new Array(e.length),f=new Array(e.length),s=0;s=0?h.getAt(v):0}}var p=0;for(d=0;dn)&&(t=n,e=r)}return e}())},y.createTableTag=function(t,e){t=t||2;var r="";r+='',r+="";for(var n=0;n";for(var o=0;o';r+=""}return(r+="")+"
"},y.createSvgTag=function(t,e){t=t||2,e=void 0===e?4*t:e;var r,n,o,i,a=y.getModuleCount()*t+2*e,u="";for(i="l"+t+",0 0,"+t+" -"+t+",0 0,-"+t+"z ",u+='')+""},y.createDataURL=function(t,e){t=t||2,e=void 0===e?4*t:e;var r=y.getModuleCount()*t+2*e,n=e,o=r-e;return p(r,r,function(e,r){if(n<=e&&e"},y.renderTo2dContext=function(t,e){e=e||2;for(var r=y.getModuleCount(),n=0;n>>8),e.push(255&a)):e.push(n)}}return e}};var e,r,n,o={L:1,M:0,Q:3,H:2},i=(e=[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]],n=function(t){for(var e=0;0!=t;)e+=1,t>>>=1;return e},(r={}).getBCHTypeInfo=function(t){for(var e=t<<10;n(e)-n(1335)>=0;)e^=1335<=0;)e^=7973<5&&(r+=3+i-5)}for(n=0;n=256;)e-=255;return t[e]}}}();function u(t,e){if(void 0===t.length)throw t.length+"/"+e;var r=function(){for(var r=0;r>>7-e%8&1)},put:function(t,e){for(var n=0;n>>e-n-1&1))},getLengthInBits:function(){return e},putBit:function(r){var n=Math.floor(e/8);t.length<=n&&t.push(0),r&&(t[n]|=128>>>e%8),e+=1}};return r},c=function(t){var e=t,r={getMode:function(){return 1},getLength:function(t){return e.length},write:function(t){for(var r=e,o=0;o+2>>8&255)+(255&o),t.put(o,13),r+=2}if(r>>8)},writeBytes:function(t,r,n){r=r||0,n=n||t.length;for(var o=0;o0&&(e+=","),e+=t[r];return e+"]"}};return e},v=function(t){var e=t,r=0,n=0,o=0,i={read:function(){for(;o<8;){if(r>=e.length){if(0==o)return-1;throw"unexpected end of file./"+o}var t=e.charAt(r);if(r+=1,"="==t)return o=0,-1;t.match(/^\s$/)||(n=n<<6|a(t.charCodeAt(0)),o+=6)}var i=n>>>o-8&255;return o-=8,i}},a=function(t){if(65<=t&&t<=90)return t-65;if(97<=t&&t<=122)return t-97+26;if(48<=t&&t<=57)return t-48+52;if(43==t)return 62;if(47==t)return 63;throw"c:"+t};return i},p=function(t,e,r){for(var n=function(t,e){var r=t,n=e,o=new Array(t*e),i={setPixel:function(t,e,n){o[e*r+t]=n},write:function(t){t.writeString("GIF87a"),t.writeShort(r),t.writeShort(n),t.writeByte(128),t.writeByte(0),t.writeByte(0),t.writeByte(0),t.writeByte(0),t.writeByte(0),t.writeByte(255),t.writeByte(255),t.writeByte(255),t.writeString(","),t.writeShort(0),t.writeShort(0),t.writeShort(r),t.writeShort(n),t.writeByte(0);var e=a(2);t.writeByte(2);for(var o=0;e.length-o>255;)t.writeByte(255),t.writeBytes(e,o,255),o+=255;t.writeByte(e.length-o),t.writeBytes(e,o,e.length-o),t.writeByte(0),t.writeString(";")}},a=function(t){for(var e=1<>>e!=0)throw"length over";for(;s+e>=8;)f.writeByte(255&(t<>>=8-s,c=0,s=0;c|=t<0&&f.writeByte(c)}});d.write(e,n);var g=0,v=String.fromCharCode(o[g]);for(g+=1;g=6;)d(u>>>f-6),f-=6},l.flush=function(){if(f>0&&(d(u<<6-f),u=0,f=0),s%3!=0)for(var t=3-s%3,e=0;e>6,128|63&n):n<55296||n>=57344?e.push(224|n>>12,128|n>>6&63,128|63&n):(r++,n=65536+((1023&n)<<10|1023&t.charCodeAt(r)),e.push(240|n>>18,128|n>>12&63,128|n>>6&63,128|63&n))}return e}(t)},r=function(){return n},t.exports=r()}(Zt={exports:{}}),Zt.exports),te=function(t,e,r,n){return Math.hypot(r-t,n-e)};!function(t){t[t.Left=0]="Left",t[t.Middle=1]="Middle",t[t.Right=2]="Right"}($t||($t={})),function(t){t[t.Top=0]="Top",t[t.Center=1]="Center",t[t.Bottom=2]="Bottom"}(_t||(_t={}));var ee=function(t){return function(e,r,n,o){return{adjustedX:n===$t.Left?e:n===$t.Right?e+t:e+t/2,adjustedY:o===_t.Top?r:o===_t.Bottom?r+t:r+t/2}}},re=ee(7),ne=ee(3);function oe(t,e,r,n,o){return te?o:n}var ie,ae,ue=function(t,e,r,n){var o=r/2,i=oe(t,o,$t.Right,$t.Middle,$t.Left),a=oe(e,o,_t.Bottom,_t.Center,_t.Top);return n===ie.PositionCenter?ne(t,e,i,a):n===ie.PositionRing?re(t,e,i,a):{adjustedX:t,adjustedY:e}},fe=function(t,e){return t.map(function(t){return{offset:t.offset,value:e(t.value)}})};!function(t){t.Module="module",t.PositionRing="position-ring",t.PositionCenter="position-center",t.Icon="icon"}(ie||(ie={})),function(t){t.FadeInTopDown="FadeInTopDown",t.FadeInCenterOut="FadeInCenterOut",t.RadialRipple="RadialRipple",t.RadialRippleIn="RadialRippleIn",t.MaterializeIn="MaterializeIn"}(ae||(ae={}));var se,ce,le=function(t,e,r,n,o){return{targets:t,from:20*r,duration:300,web:{opacity:[0,1]}}},de=function(t,e,r,n,o){var i=ue(e,r,n,o),a=i.adjustedX,u=i.adjustedY,f=n/2;return{targets:t,from:20*te(a,u,f,f),duration:200,web:{opacity:[0,1]}}},ge=function(t,e,r,n,o){return{targets:t,from:o===ie.Module?200*Math.random():200,duration:200,web:{opacity:[0,1]}}},he=function(t,e,r){var n=50-Math.pow(3,2);if(n<0)throw new Error("This method only supports underdamped oscillation.");var o=Math.sqrt(n),i=function(t){return function(t){return 5*Math.pow(Math.E,-3*t)}(t)*Math.cos(o*t+0)},a=function(t){return(Math.atan(-3/o)+t*Math.PI-0)/o},u=[];u.push({time:0,amplitude:i(0)});for(var f=0;Math.abs(u[u.length-1].amplitude)>.01;f++)a(f)>=0&&u.push({time:a(f),amplitude:i(a(f))});return u}(),ve=(ce=(1-.2)/(se=he)[se.length-1].time,se.map(function(t){var e=t.time,r=t.amplitude;return{offset:.2+e*ce,value:r}})),pe=function(t,e,r,n,o){var i=ue(e,r,n,o),a=i.adjustedX,u=i.adjustedY,f=n/2;return{targets:t,from:7*te(a,u,f,f),easing:"cubic-bezier(0.445, 0.050, 0.550, 0.950)",duration:1e3,web:{scale:(o===ie.Icon?[{offset:0,value:1},{offset:.1,value:.7},{offset:.2,value:1}]:[{offset:0,value:1}]).concat(fe(ve,function(t){return 1+t/5*.1}),[1])}}},me=function(t,e,r,n,o){var i=ue(e,r,n,o),a=i.adjustedX,u=i.adjustedY,f=n/2;return{targets:t,from:7*te(a,u,f,f),easing:"cubic-bezier(0.445, 0.050, 0.550, 0.950)",duration:1e3,web:{scale:(o===ie.Icon?[{offset:0,value:1},{offset:.1,value:.7},{offset:.2,value:1}]:[{offset:0,value:0}]).concat(fe(ve,function(t){return 1+t/5*.1}),[1]),opacity:[{offset:0,value:0},{offset:.05,value:1}]}}};N(Jt);var ye=function(){function t(){this.contents="",this.protocol="",this.moduleColor="#000",this.positionRingColor="#000",this.positionCenterColor="#000",this.maskXToYRatio=1,this.squares=!1}return t.prototype.componentDidLoad=function(){this.updateQR()},t.prototype.componentDidUpdate=function(){this.codeRendered.emit()},t.prototype.updateQR=function(){var t=this.qrCodeElement===this.qrCodeElement.shadowRoot,e=this.qrCodeElement.shadowRoot.querySelector("slot"),r=t?!!this.qrCodeElement.querySelector("[slot]"):!!e&&e.assignedNodes().length>0;this.data=this.generateQRCodeSVG(this.contents,r)},t.prototype.animateQRCode=function(t){this.executeAnimation("string"==typeof t?function(t){switch(t){case ae.FadeInTopDown:return le;case ae.FadeInCenterOut:return de;case ae.RadialRipple:return pe;case ae.RadialRippleIn:return me;case ae.MaterializeIn:return ge;default:throw new Error(t+" is not a valid AnimationPreset.")}}(t):t)},t.prototype.getModuleCount=function(){return this.moduleCount},t.prototype.executeAnimation=function(t){var e=this,r=Array.from(this.qrCodeElement.shadowRoot.querySelectorAll(".module")),n=Array.from(this.qrCodeElement.shadowRoot.querySelectorAll(".position-ring")),o=Array.from(this.qrCodeElement.shadowRoot.querySelectorAll(".position-center")),i=Array.from(this.qrCodeElement.shadowRoot.querySelectorAll("#icon-wrapper")),a=function(t,e){return t.map(function(t){return{element:t,entityType:e}})};Yt(a(r,ie.Module).concat(a(n,ie.PositionRing),a(o,ie.PositionCenter),a(i,ie.Icon)).map(function(t){var e=t.element,r=t.entityType;return{element:e,positionX:parseInt(e.dataset.column,10),positionY:parseInt(e.dataset.row,10),entityType:r}}).map(function(r){return t(r.element,r.positionX,r.positionY,e.moduleCount,r.entityType)})).play()},t.prototype.generateQRCodeSVG=function(t,e){var r=Kt(0,"H");r.addData(t),r.make(),this.moduleCount=r.getModuleCount();var n=this.moduleCount+8,o=n/2;return'\n \n \n '+(this.squares?void 0:function(t,e,r,n,o){return"\n "+i(4,4,4,r,n,o)+"\n "+i(t-7+4,4,4,r,n,o)+"\n "+i(4,t-7+4,4,r,n,o)+"\n "}(this.moduleCount,0,this.positionRingColor,this.positionCenterColor,o))+"\n "+function(t,e,r,n,o,i,f,s){for(var c="",l=0;l\n ':'\n '}return c}(r,this.moduleCount,0,e,this.maskXToYRatio,this.squares,this.moduleColor,o)+"\n ";function i(t,e,r,n,o,i){return'\n \n \n '}function a(t,e,r){return t<=7?e<=7||e>=r-7:e<=7&&t>=r-7}function u(t,e,r,n,o){if(!n)return!1;var i=r/2,a=Math.floor(r*Math.sqrt(.1)/2),u=a*o,f=a/o;return t>=i-f&&t<=i+f&&e>=i-u&&e<=i+u}},t.prototype.render=function(){return r("div",{id:"qr-container"},r("div",{id:"icon-container",style:this.squares?{display:"none",visibility:"hidden"}:{}},r("div",{id:"icon-wrapper",style:{width:18*this.maskXToYRatio+"%"},"data-column":this.moduleCount/2,"data-row":this.moduleCount/2},r("slot",{name:"icon"}))),r("div",{innerHTML:this.data}))},Object.defineProperty(t,"is",{get:function(){return"qr-code"},enumerable:!0,configurable:!0}),Object.defineProperty(t,"encapsulation",{get:function(){return"shadow"},enumerable:!0,configurable:!0}),Object.defineProperty(t,"properties",{get:function(){return{animateQRCode:{method:!0},contents:{type:String,attr:"contents",watchCallbacks:["updateQR"]},data:{state:!0},getModuleCount:{method:!0},maskXToYRatio:{type:Number,attr:"mask-x-to-y-ratio",watchCallbacks:["updateQR"]},moduleColor:{type:String,attr:"module-color",watchCallbacks:["updateQR"]},moduleCount:{state:!0},positionCenterColor:{type:String,attr:"position-center-color",watchCallbacks:["updateQR"]},positionRingColor:{type:String,attr:"position-ring-color",watchCallbacks:["updateQR"]},protocol:{type:String,attr:"protocol",watchCallbacks:["updateQR"]},qrCodeElement:{elementRef:!0},squares:{type:Boolean,attr:"squares",watchCallbacks:["updateQR"]}}},enumerable:!0,configurable:!0}),Object.defineProperty(t,"events",{get:function(){return[{name:"codeRendered",method:"codeRendered",bubbles:!0,cancelable:!0,composed:!0}]},enumerable:!0,configurable:!0}),Object.defineProperty(t,"style",{get:function(){return":host{display:block;contain:content}#qr-container{position:relative}#icon-container{position:absolute;width:100%;height:100%;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}"},enumerable:!0,configurable:!0}),t}();t.QrCode=ye,Object.defineProperty(t,"__esModule",{value:!0})}); \ No newline at end of file diff --git a/assets/vendor/qr-code/qr-code/mu42bxql.js b/assets/vendor/qr-code/qr-code/mu42bxql.js new file mode 100644 index 0000000..9ce1a76 --- /dev/null +++ b/assets/vendor/qr-code/qr-code/mu42bxql.js @@ -0,0 +1,2 @@ +/*! Built with http://stenciljs.com */ +const{h:t}=window.QrCode,e=()=>Math.floor(65536*(1+Math.random())).toString(16).substring(1),r=()=>e()+e()+e()+e()+e()+e()+e()+e();function n(t){return!!t||0===t||!1===t}function o(t){return"function"==typeof t}function i(t){return"number"==typeof t}function a(t){return"object"==typeof t&&!!t}function u(t){return"string"==typeof t}function s(t){return t&&isFinite(t.length)&&!u(t)&&!o(t)}function f(t){return t.nodeType||t instanceof SVGElement}function c(t,e){return t.hasOwnProperty(e)}const l=1,d=2,g=3,h=void 0,p=/^([+|-]*[0-9]*[.]*?[0-9]+)([a-z%]+)*$/i;function v(t,e){return-1!==function(t,e){return t.indexOf(e)}(t,e)}function m(t,e,r){const n=t&&t.length;if(!n)return h;if(e===h)return t[r?n-1:0];if(r){for(let r=n-1;r>-1;r--)if(e(t[r]))return t[r]}else for(let r=0;r{const n=e[t],o=r[t];return no?1:0}}function b(t){return n(t)?s(t)?t:[t]:[]}function C(t,e){return e!==h&&Array.prototype.push.call(t,e),e}function k(t,e){return v(t,e)||C(t,e),e}function B(t,e){var r=[];return A(t,t=>{var n=e(t);s(n)?A(n,t=>C(r,t)):C(r,n)}),r}function A(t,e){const r=b(t);for(let t=0,n=r.length;tperformance.now(),L=[];let T=h,D=h;function I(){x(T),T=D=h}function $(){const t=L.length;if(D=D||S(),!t)return void I();const e=S(),r=e-D;D=e,T=R($);for(let e=t-1;e>-1;e--){const t=L[e];pt(M,t,r)}}function z(t){y(L,t),L.length||I()}const q=(t,e,r)=>{A(t.players,t=>t.cancel()),t.state=l,t.time=h,t.round=h,t.players=h,z(t.id),r.trigger("cancel")},P=(t,e,r)=>{q(t,0,r),r.destroyed=!0},E=Math.abs,F=Math.floor,j=Math.max,Q=Math.min;function Y(t,e,r){return t!==h&&e<=t&&t<=r}const O={};function X(t){O[t.name]=t}let W=0;const H=/\[object ([a-z]+)\]/i;function N(t,e){for(var r in t)if(t[r]===e)return r;const n=function(t){let e=t.id||t.name;if(!e){e=Object.prototype.toString.call(t);const r=H.exec(e);r&&(e=r[1])}return"@"+e+"_"+ ++W}(e);return t[n]=e,n}function G(t){return u(t)?Array.prototype.slice.call(document.querySelectorAll(t)):o(t)?G(t()):s(t)?B(t,G):a(t)?[t]:[]}function U(){var t={};return A(arguments,e=>{for(var r in e)c(e,r)&&(t[r]=e[r])}),t}function V(t,e,r,n){return o(t)?V(t(e,r,n),e,r,n):t}const Z=w("offset");function _(t){var e;A(t,t=>{t.value!==h?e=t.value:t.value=e})}function J(t){for(var e,r=t.length-1;r>-1;r--){var n=t[r];n.interpolate!==h?e=n.interpolate:n.interpolate=e}}function K(t,e,r,n,o){var i=m(e,t=>0===t.offset);if(i===h||i.value===h){var a=n.getValue(r,o);i===h?e.splice(0,0,{offset:0,value:a,easing:t.easing,interpolate:h}):(i.value=a,i.easing=t.easing,i.interpolate=h)}}function tt(t,e){var r=m(e,t=>1===t.offset,!0);if(r===h||r.value===h){var n=e[e.length-1].value;r===h?C(e,{offset:1,value:n,easing:t.easing,interpolate:h}):(r.value=n,r.easing=r.easing||t.easing)}}const et=(t,e,r)=>{t.players===h&&((t=t).players=[],A(t.configs,e=>(function(t,e){A(function(t){const e=t.keyframes,r=t.from,n=t.to,o=t.stagger||0,i=t.duration,a=[];return A(G(t.target),(u,s,f)=>{var c={},l={};for(var d in A(e,t=>{const e=c[t.prop]||(c[t.prop]=[]),n=(t.time-r)/(i||1),o=t.easing,a=t.interpolate,s=V(t.value,u,t.index,f);l[t.prop]=t.plugin;const d=m(e,t=>t.offset===n)||C(e,{easing:o,offset:n,value:s,interpolate:a});d.easing=o,d.value=s,d.interpolate=a}),O){var g=O[d];if(g.onWillAnimate&&t.keyframes.some(t=>t.plugin===d)){var h=U(t,{target:u});g.onWillAnimate(h,c,l)}}for(var p in c){var v=c[p],y=l[p],w=O[y];v&&(v.sort(Z),K(t,v,u,w,p),_(v),J(v),tt(t,v),C(a,{plugin:l[p],target:u,prop:p,from:r+(o?o*s:0),to:n+(o?o*s:0),keyframes:v}))}}),a}(function t(e,r,a){if(!n(r)||i(r)||o(r))return r;if(u(r)){const t=r;return c(e,t)&&"@"===t.charAt(0)?e[t]:t}if(s(r)){const n=[];return A(r,r=>C(n,t(e,r,a))),n}if(!a||f(r))return r;var l={};for(var d in r)if(c(r,d)){const n=r[d];l[d]=a?t(e,n,"targets"!==d):n}return l}(t.refs,e,!0)),e=>{const r=O[e.plugin].animate(e);r&&(r.from=e.from,r.to=e.to,C(t.players,r))})})(t,e)),function(t){t.duration=j.apply(h,t.players.filter(t=>isFinite(t.to)).map(t=>t.to)),t.time=isFinite(t.time)?t.time:t.rate<0?t.duration:0}(t));const a=t.state===g,l=t.time;a||z(t.id),A(t.players,e=>{const r=e.from,n=e.to,o=a&&Y(F(l),r,n),i=(1,Q(j((l-r)/(n-r),0),1));e.update(i,t.rate,o)}),r.trigger("update")};var rt;const nt=(t,e,r)=>{t.round=0,t.state=d,t.yoyo||(t.time=t.rate<0?0:t.duration),z(t.id),et(t,0,r),r.trigger("finish"),t.destroy&&P(t,0,r)},ot=(t,e,r)=>{t.state=d,z(t.id),et(t,0,r),r.trigger("pause")},it=(t,e,r)=>{e&&(t.repeat=e.repeat,t.yoyo=!!e.alternate,t.destroy=!!e.destroy),t.repeat=t.repeat||1,t.yoyo=t.yoyo||!1,t.state=g;const n=t.rate>=0;n&&t.time===t.duration?t.time=0:n||0!==t.time||(t.time=t.duration),at=t.id,v(L,at)||C(L,at),T||(T=R($)),et(t,0,r),r.trigger("play")};var at;const ut=t=>{for(var e=0,r=0,n=t.configs,o=0,i=n.length;ot.time),s=j.apply(h,u),f=Q.apply(h,u);a.to=s,a.from=f,a.duration=s-f,e=j(s,e),r=j(s+a.endDelay,r)}t.cursor=r,t.duration=e},st=w("time"),ft=(t,e,r)=>{A(e,e=>{if(e.to===h)throw new Error("missing duration");A((e=function t(e,r,a){if(!n(r)||u(r)||i(r))return r;if(s(r))return B(r,r=>t(e,r,a));if(o(r))return N(e,r);if(a){for(var f in r)c(r,f)&&(r[f]=t(e,r[f],a&&"targets"!==f));return r}return N(e,r)}(t.refs,e,!0)).targets,(o,i,a)=>{const u=function(t,e,r,o,i){const a=V(i.delay,e,r,o)||0,u=m(t.configs,t=>t.target===e)||C(t.configs,{from:j(i.from+a,0),to:j(i.to+a,0),easing:i.easing||"ease",duration:i.to-i.from,endDelay:V(i.endDelay,e,r,o)||0,stagger:i.stagger||0,target:e,targetLength:o,propNames:[],keyframes:[]}),s=i.stagger&&i.stagger*(r+1)||0,f=V(i.delay,u,r,u.targetLength)||0,l=j(s+f+i.from,0),d=i.to-i.from,g=i.easing||"ease";for(var h in O)if(c(i,h)){const t=i[h];for(var p in t){var v=t[p];c(t,p)&&n(v)&&ct(u,h,r,p,v,d,l,g)}}return u.keyframes.sort(st),u}(t,o,i,a,e);r.dirty(u)})}),ut(t),r.trigger("config")};function ct(t,e,r,o,u,f,c,l){let d,g;if(!s(u)&&a(u)){const t=u;t.easing&&(l=t.easing),t.interpolate&&(d=t.interpolate),g=b(t.value)}else g=b(u);const p=g.map((e,n,o)=>{const u=V(e,t.target,r,t.targetLength),s=u,f=a(u),c=f?s.value:u,g=f&&i(s.offset)?s.offset:n===o.length-1?1:0===n?0:h,p=s&&s.interpolate||d;return{offset:g,value:c,easing:s&&s.easing||l,interpolate:p}});!function(t){if(!t.length)return;const e=m(t,t=>0===t.offset)||t[0];n(e.offset)||(e.offset=0);const r=m(t,t=>1===t.offset,!0)||t[t.length-1];t.length>1&&!n(r.offset)&&(r.offset=1);for(let e=1,r=t.length;e{const{offset:i,value:a}=n,u=F(f*i+c);(m(t.keyframes,t=>t.prop===o&&t.time===u)||C(t.keyframes,{plugin:e,easing:n.easing,index:r,prop:o,time:u,value:a,interpolate:n.interpolate})).value=a}),m(t.keyframes,t=>t.prop===o&&t.time===c)||C(t.keyframes,{plugin:e,easing:l,index:r,prop:o,time:c,value:h,interpolate:d});var v=c+f;m(t.keyframes,t=>t.prop===o&&t.time===v,!0)||C(t.keyframes,{plugin:e,easing:l,index:r,prop:o,time:v,value:h,interpolate:d}),k(t.propNames,o)}const lt=[],dt={},gt={append:(t,e,r)=>{const o=t.cursor,i=b(e).map(t=>{const{to:e,from:r,duration:i}=t,a=n(e),u=n(r),s=n(i),f=t;return f.to=a&&(u||s)?e:s&&u?r+i:a&&!s?o+e:s?o+i:h,f.from=u&&(a||s)?r:a&&s?e-i:a||s?o:h,f});ft(t,i,r)},cancel:q,destroy:P,finish:nt,insert:ft,pause:ot,play:it,reverse:(t,e,r)=>{t.rate*=-1,et(t,0,r),r.trigger("reverse")},set:(t,e,r)=>{const n=Object.keys(O),o=b(e).map(e=>{const r=e.at||t.cursor,o={};for(var i in e)if(v(n,i)){const t=e[i],r={};for(var a in t){var u=t[a];r[a]=[h,u]}o[i]=r}else o[i]=e[i];return o.from=r-1e-9,o.to=r,o});ft(t,o,r)},[M]:(t,e,r)=>{const n=t.duration,o=t.repeat,i=t.rate;let a=t.time===h?i<0?n:0:t.time,u=t.round||0;const s=i<0;let f=!1;Y(a+=e*i,0,n)||(t.round=++u,a=s?0:n,f=!0,t.yoyo&&(t.rate=-1*(t.rate||0)),a=t.rate<0?n:0),t.time=a,t.round=u,f&&o===u?nt(t,0,r):et(t,0,r)},update:et,rate:(t,e,r)=>{t.rate=e||1,et(t,0,r)},time:(t,e,r)=>{const n=+e;t.time=isFinite(n)?n:t.rate<0?t.duration:0,et(t,0,r)}};function ht(t){const e=dt[t];if(!e)throw new Error("not found");return e.state}function pt(t,e,r){const n=gt[t],o=dt[e];if(!n||!o)throw new Error("not found");const i={events:[],needUpdate:[],trigger:vt,dirty:mt},a=o.state;n(a,r,i),A(i.events,t=>{const e=o.subs[t];e&&A(e,t=>{t(a.time)})}),i.destroyed?delete dt[e]:i.needUpdate.length&&(a.state!==l?function(t,e){const r=t.state;switch(A(t.players,t=>t.cancel()),t.players=h,r){case d:ot(t,h,e);break;case g:it(t,h,e)}}(a,i):ut(a),A(lt,t=>{t(o)}))}function vt(t){k(this.events,t)}function mt(t){k(this.needUpdate,t)}"undefined"!=typeof window&&(window.just_devtools={dispatch:pt,subscribe(t){k(lt,t)},unsubscribe(t){y(lt,t)}});const yt={get state(){return ht(this.id).state},get duration(){return ht(this.id).duration},get currentTime(){return ht(this.id).time},set currentTime(t){pt("time",this.id,t)},get playbackRate(){return ht(this.id).rate},set playbackRate(t){pt("rate",this.id,t)},add(t){return pt("append",this.id,t),this},animate(t){return pt("append",this.id,t),this},fromTo(t,e,r){return A(r,r=>{r.to=e,r.from=t}),pt("insert",this.id,r),this},cancel(){return pt("cancel",this.id),this},destroy(){pt("destroy",this.id)},finish(){return pt("finish",this.id),this},on(t,e){return function(t,e,r){const n=dt[t];n&&k(n.subs[e]=n.subs[e]||[],r)}(this.id,t,e),this},once(t,e){const r=this;return r.on(t,function n(o){r.off(t,n),e(o)}),r},off(t,e){return function(t,e,r){const n=dt[t];n&&y(n.subs[e],r)}(this.id,t,e),this},pause(){return pt("pause",this.id),this},play(t){return pt("play",this.id,t),this},reverse(){return pt("reverse",this.id),this},seek(t){return pt("time",this.id,t),this},sequence(t){return A(t,t=>pt("append",this.id,t)),this},set(t){return pt("set",this.id,t),this}};Math.PI;var wt=function(t,e,r){return 3*t*(1-r)*(1-r)*r+3*e*(1-r)*r*r+r*r*r},bt=/([a-z])[- ]([a-z])/gi,Ct=/^([a-z-]+)\(([^\)]+)\)$/i,kt={ease:"cubic-bezier(.25,.1,.25,1)",easeIn:"cubic-bezier(.42,0,1,1)",easeOut:"cubic-bezier(0,0,.58,1)",easeInOut:"cubic-bezier(.42,0,.58,1)",stepStart:"steps(1,1)",stepEnd:"steps(1,0)",linear:"cubic-bezier(0,0,1,1)"},Bt=function(t,e,r){return e+r.toUpperCase()},At=Math.abs;function Mt(t){const e=[];return function(){const r=arguments;for(var n=0,o=e.length;n=1?1:n*r+t-(n*r+t)%r}}(+i[1],i[2]);if("cubic-bezier"===a)return e=+i[1],r=+i[2],n=+i[3],o=+i[4],e<0||e>1||n<0||n>1?function(t){return t}:function(t){if(0===t||1===t)return t;var i=0,a=1,u=19;do{var s=.5*(i+a),f=wt(e,n,s);if(At(t-f)<1e-4)return wt(r,o,s);fMt(t));function St(t,e,r){return t+(e-t)*r}function Lt(t,e,r){return r<.5?t:e}function Tt(t){return t.replace(/([A-Z])/g,t=>"-"+t[0].toLowerCase())}function Dt(t){return t.split(",")}const It=0,$t=1,zt=2,qt=3,Pt=/^\-\-[a-z0-9\-]+$/i,Et=["viewBox"],Ft=["viewBox"];function jt(t,e){return f(t)?Pt.test(e)?qt:void 0===t[e]||v(Et,e)?v(Ft,e)?$t:zt:It:It}function Qt(t,e){const r=jt(t,e);return r===qt?function(t,e){return()=>t.style.getPropertyValue(e)}(t,e):r===$t?function(t,e){return()=>t.getAttribute(e)}(t,e):r===zt?function(t,r){const n=Tt(e);return()=>t.getAttribute(n)}(t):function(t,e){return()=>t[e]}(t,e)}function Yt(t){return function(t){const e=Object.create(yt);return(t=t||{}).id=t.id||r(),e.id=t.id,function(t){dt[t.id]={state:function(t){const e={};if(t.references)for(var r in t.references)e["@"+r]=t.references[r];return{configs:[],cursor:0,duration:0,id:t.id,players:h,rate:1,refs:e,repeat:h,round:h,state:l,time:h,yoyo:!1}}(t),subs:{}}}(t),e}().add(t)}X({name:"props",animate(t){const{target:e,prop:r}=t,n=function(t,e){const r=e.map(e=>e.offset*t);return A(e,t=>{const e=!o(t.interpolate);t.simpleFn=e,t.interpolate=e?i(t.value)?St:Lt:xt(t.interpolate)}),function(n){const o=t*n,i=function(t,e){const r=t.length;for(let n=0;ne)return n;return r-1}(r,o),a=i?i-1:0,u=r[i],s=r[a],f=e[a],c=(o-s)/(u-s),l=f.easing?Rt(f.easing)(c):c;return f.simpleFn?f.interpolate(f.value,e[i].value,l):f.interpolate(f.value,e[i].value)(l)}}(t.to-t.from,t.keyframes),a=function(t,e){const r=jt(t,e);return r===qt?function(t,e){return r=>t.style.setProperty(e,r?r+"":"")}(t,e):r===$t?function(t,e){return r=>t.setAttribute(e,r)}(t,e):r===zt?function(t,r){const n=Tt(e);return e=>t.setAttribute(n,e)}(t):function(t,e){return r=>t[e]=r}(t,e)}(e,r),u=Qt(e,r);let s=h;return{cancel(){s!==h&&a(s),s=h},update(t,e,r){s===h&&(s=u()),a(n(t))}}},getValue:(t,e)=>Qt(t,e)()});const Ot=Dt("rotateX,rotateY,rotateZ,rotate"),Xt=Dt("scaleX,scaleY,scaleZ,scale"),Wt=Dt("perspective,x,y,z"),Ht=Ot.concat(Xt,Wt),Nt={x:"translateX",y:"translateY",z:"translateZ"},Gt=Dt("backgroundSize,border,borderBottom,borderBottomLeftRadius,borderBottomRightRadius,borderBottomWidth,borderLeft,borderLeftWidth,borderRadius,borderRight,borderRightWidth,borderTop,borderTopLeftRadius,borderTopRightRadius,borderTopWidth,borderWidth,bottom,columnGap,columnRuleWidth,columnWidth,columns,flexBasis,font,fontSize,gridColumnGap,gridGap,gridRowGap,height,left,letterSpacing,lineHeight,margin,marginBottom,marginLeft,marginRight,marginTop,maskSize,maxHeight,maxWidth,minHeight,minWidth,outline,outlineOffset,outlineWidth,padding,paddingBottom,paddingLeft,paddingRight,paddingTop,perspective,right,shapeMargin,tabSize,top,width,wordSpacing");function Ut(t){const e={unit:h,value:h};if(!n(t))return e;if(Number(t))return e.value=+t,e;const r=p.exec(t);return r&&(e.unit=r[2]||h,e.value=r[1]?parseFloat(r[1]):h),e}const Vt={name:"web",animate:function(t){const{keyframes:e,prop:r,from:n,to:o,target:i}=t,a=o-n,u=Mt(()=>{const t=e.map(({offset:t,value:e,easing:n})=>({offset:t,[r]:e,easing:n})),n=i.animate(t,{duration:a,fill:"both"});return n.pause(),n});return{cancel(){u().cancel()},update(t,e,r){const n=u(),o=a*t;if(E(n.currentTime-o)>1&&(n.currentTime=o),r&&n.playbackRate!==e){const t=n.currentTime;t<1?n.currentTime=1:t>=a-1&&(n.currentTime=a-1),n.playbackRate=e}r&&!("running"===n.playState||"finish"===n.playState)&&!(e<0&&o<17)&&!(e>=0&&o>a-17)&&n.play(),!r&&("running"===n.playState||"pending"===n.playState)&&n.pause()}}},getValue:(t,e)=>getComputedStyle(t)[e],onWillAnimate(t,e,r){f(t.target)&&(function(t){for(var e in t)if(v(Gt,e)){var r=t[e];for(var o in r){var a=r[o];n(a)&&i(a.value)&&(a.value+="px")}}}(e),function(t,e,r){const o=t.propNames.filter(t=>v(Ht,t));if(!o.length)return;if(v(t.propNames,"transform"))throw new Error("transform + shorthand is not allowed");const i=[],a={};A(o,t=>{const r=e[t];r&&A(r,t=>{a[t.offset]=t.easing,k(i,t.offset)})}),i.sort();const u=i.map(t=>{const r={};return A(o,n=>{const o=m(e[n],e=>e.offset===t);r[n]=o?o.value:h}),{offset:t,easing:a[t],values:r}}),s=u.length;for(let t=s-1;t>-1;--t){const e=u[t];for(const r in e.values){if(n(e.values[r]))continue;let o=h;for(var f=t-1;f>-1;f--)if(n(u[f].values[r])){o=f;break}let a=h;for(var c=t+1;c{e[t]=h});const t=[];A(u,e=>{let r=h;for(var n in e.values){const t=Ut(e.values[n]);t.value!==h&&(t.unit||(t.unit=v(Wt,n)?"px":v(Ot,n)?"deg":""),r=(r?r+" ":"")+(Nt[n]||n)+"("+t.value+t.unit+")")}t.push({offset:e.offset,value:r,easing:e.easing,interpolate:h})}),e.transform=t,r.transform="web"}}(t,e,r))}};var Zt,_t=(function(t,e){var r,n=function(){var t=function(t,e){var r=t,n=o[e],a=null,h=0,p=null,m=[],y={},w=function(t,e){a=function(t){for(var e=new Array(t),r=0;r=7&&B(t),null==p&&(p=R(r,n,m)),M(p,e)},b=function(t,e){for(var r=-1;r<=7;r+=1)if(!(t+r<=-1||h<=t+r))for(var n=-1;n<=7;n+=1)e+n<=-1||h<=e+n||(a[t+r][e+n]=0<=r&&r<=6&&(0==n||6==n)||0<=n&&n<=6&&(0==r||6==r)||2<=r&&r<=4&&2<=n&&n<=4)},C=function(){for(var t=8;t>n&1);a[Math.floor(n/3)][n%3+h-8-3]=o}for(n=0;n<18;n+=1)o=!t&&1==(e>>n&1),a[n%3+h-8-3][Math.floor(n/3)]=o},A=function(t,e){for(var r=n<<3|e,o=i.getBCHTypeInfo(r),u=0;u<15;u+=1){var s=!t&&1==(o>>u&1);u<6?a[u][8]=s:u<8?a[u+1][8]=s:a[h-15+u][8]=s}for(u=0;u<15;u+=1)s=!t&&1==(o>>u&1),u<8?a[8][h-u-1]=s:u<9?a[8][15-u-1+1]=s:a[8][15-u-1]=s;a[h-8][8]=!t},M=function(t,e){for(var r=-1,n=h-1,o=7,u=0,s=i.getMaskFunction(e),f=h-1;f>0;f-=2)for(6==f&&(f-=1);;){for(var c=0;c<2;c+=1)if(null==a[n][f-c]){var l=!1;u>>o&1)),s(n,f-c)&&(l=!l),a[n][f-c]=l,-1==(o-=1)&&(u+=1,o=7)}if((n+=r)<0||h<=n){n-=r,r=-r;break}}},R=function(t,e,r){for(var n=s.getRSBlocks(t,e),o=f(),a=0;a8*l)throw"code length overflow. ("+o.getLengthInBits()+">"+8*l+")";for(o.getLengthInBits()+4<=8*l&&o.put(0,4);o.getLengthInBits()%8!=0;)o.putBit(!1);for(;!(o.getLengthInBits()>=8*l||(o.put(236,8),o.getLengthInBits()>=8*l));)o.put(17,8);return function(t,e){for(var r=0,n=0,o=0,a=new Array(e.length),s=new Array(e.length),f=0;f=0?h.getAt(p):0}}var v=0;for(d=0;dn)&&(t=n,e=r)}return e}())},y.createTableTag=function(t,e){t=t||2;var r="";r+='',r+="";for(var n=0;n";for(var o=0;o';r+=""}return(r+="")+"
"},y.createSvgTag=function(t,e){t=t||2,e=void 0===e?4*t:e;var r,n,o,i,a=y.getModuleCount()*t+2*e,u="";for(i="l"+t+",0 0,"+t+" -"+t+",0 0,-"+t+"z ",u+='')+""},y.createDataURL=function(t,e){t=t||2,e=void 0===e?4*t:e;var r=y.getModuleCount()*t+2*e,n=e,o=r-e;return v(r,r,function(e,r){if(n<=e&&e"},y.renderTo2dContext=function(t,e){e=e||2;for(var r=y.getModuleCount(),n=0;n>>8),e.push(255&a)):e.push(n)}}return e}};var e,r,n,o={L:1,M:0,Q:3,H:2},i=(e=[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]],n=function(t){for(var e=0;0!=t;)e+=1,t>>>=1;return e},(r={}).getBCHTypeInfo=function(t){for(var e=t<<10;n(e)-n(1335)>=0;)e^=1335<=0;)e^=7973<5&&(r+=3+i-5)}for(n=0;n=256;)e-=255;return t[e]}}}();function u(t,e){if(void 0===t.length)throw t.length+"/"+e;var r=function(){for(var r=0;r>>7-e%8&1)},put:function(t,e){for(var n=0;n>>e-n-1&1))},getLengthInBits:function(){return e},putBit:function(r){var n=Math.floor(e/8);t.length<=n&&t.push(0),r&&(t[n]|=128>>>e%8),e+=1}};return r},c=function(t){var e=t,r={getMode:function(){return 1},getLength:function(t){return e.length},write:function(t){for(var r=e,o=0;o+2>>8&255)+(255&o),t.put(o,13),r+=2}if(r>>8)},writeBytes:function(t,r,n){r=r||0,n=n||t.length;for(var o=0;o0&&(e+=","),e+=t[r];return e+"]"}};return e},p=function(t){var e=t,r=0,n=0,o=0,i={read:function(){for(;o<8;){if(r>=e.length){if(0==o)return-1;throw"unexpected end of file./"+o}var t=e.charAt(r);if(r+=1,"="==t)return o=0,-1;t.match(/^\s$/)||(n=n<<6|a(t.charCodeAt(0)),o+=6)}var i=n>>>o-8&255;return o-=8,i}},a=function(t){if(65<=t&&t<=90)return t-65;if(97<=t&&t<=122)return t-97+26;if(48<=t&&t<=57)return t-48+52;if(43==t)return 62;if(47==t)return 63;throw"c:"+t};return i},v=function(t,e,r){for(var n=function(t,e){var r=t,n=e,o=new Array(t*e),i={setPixel:function(t,e,n){o[e*r+t]=n},write:function(t){t.writeString("GIF87a"),t.writeShort(r),t.writeShort(n),t.writeByte(128),t.writeByte(0),t.writeByte(0),t.writeByte(0),t.writeByte(0),t.writeByte(0),t.writeByte(255),t.writeByte(255),t.writeByte(255),t.writeString(","),t.writeShort(0),t.writeShort(0),t.writeShort(r),t.writeShort(n),t.writeByte(0);var e=a(2);t.writeByte(2);for(var o=0;e.length-o>255;)t.writeByte(255),t.writeBytes(e,o,255),o+=255;t.writeByte(e.length-o),t.writeBytes(e,o,e.length-o),t.writeByte(0),t.writeString(";")}},a=function(t){for(var e=1<>>e!=0)throw"length over";for(;f+e>=8;)s.writeByte(255&(t<>>=8-f,c=0,f=0;c|=t<0&&s.writeByte(c)}});d.write(e,n);var g=0,p=String.fromCharCode(o[g]);for(g+=1;g=6;)d(u>>>s-6),s-=6},l.flush=function(){if(s>0&&(d(u<<6-s),u=0,s=0),f%3!=0)for(var t=3-f%3,e=0;e>6,128|63&n):n<55296||n>=57344?e.push(224|n>>12,128|n>>6&63,128|63&n):(r++,n=65536+((1023&n)<<10|1023&t.charCodeAt(r)),e.push(240|n>>18,128|n>>12&63,128|n>>6&63,128|63&n))}return e}(t)},r=function(){return n},t.exports=r()}(Zt={exports:{}}),Zt.exports);const Jt=(t,e,r,n)=>Math.hypot(r-t,n-e);var Kt,te;!function(t){t[t.Left=0]="Left",t[t.Middle=1]="Middle",t[t.Right=2]="Right"}(Kt||(Kt={})),function(t){t[t.Top=0]="Top",t[t.Center=1]="Center",t[t.Bottom=2]="Bottom"}(te||(te={}));const ee=t=>(e,r,n,o)=>({adjustedX:n===Kt.Left?e:n===Kt.Right?e+t:e+t/2,adjustedY:o===te.Top?r:o===te.Bottom?r+t:r+t/2}),re=ee(7),ne=ee(3);function oe(t,e,r,n,o){return te?o:n}const ie=(t,e,r,n)=>{const o=r/2,i=oe(t,o,Kt.Right,Kt.Middle,Kt.Left),a=oe(e,o,te.Bottom,te.Center,te.Top);return n===ue.PositionCenter?ne(t,e,i,a):n===ue.PositionRing?re(t,e,i,a):{adjustedX:t,adjustedY:e}},ae=(t,e)=>t.map(t=>({offset:t.offset,value:e(t.value)}));var ue,se;!function(t){t.Module="module",t.PositionRing="position-ring",t.PositionCenter="position-center",t.Icon="icon"}(ue||(ue={})),function(t){t.FadeInTopDown="FadeInTopDown",t.FadeInCenterOut="FadeInCenterOut",t.RadialRipple="RadialRipple",t.RadialRippleIn="RadialRippleIn",t.MaterializeIn="MaterializeIn"}(se||(se={}));const fe=(t,e,r,n,o)=>({targets:t,from:20*r,duration:300,web:{opacity:[0,1]}}),ce=(t,e,r,n,o)=>{const{adjustedX:i,adjustedY:a}=ie(e,r,n,o),u=n/2;return{targets:t,from:20*Jt(i,a,u,u),duration:200,web:{opacity:[0,1]}}},le=(t,e,r,n,o)=>({targets:t,from:o===ue.Module?200*Math.random():200,duration:200,web:{opacity:[0,1]}}),de=((t,e,r)=>{const n=.8/r[r.length-1].time;return r.map(({time:t,amplitude:e})=>({offset:.2+t*n,value:e}))})(0,0,((t,e,r)=>{const n=50-Math.pow(3,2);if(n<0)throw new Error("This method only supports underdamped oscillation.");const o=Math.sqrt(n),i=t=>(t=>5*Math.pow(Math.E,-3*t))(t)*Math.cos(o*t+0),a=t=>(Math.atan(-3/o)+t*Math.PI-0)/o,u=[];u.push({time:0,amplitude:i(0)});for(var s=0;Math.abs(u[u.length-1].amplitude)>.01;s++)a(s)>=0&&u.push({time:a(s),amplitude:i(a(s))});return u})()),ge=(t,e,r,n,o)=>{const{adjustedX:i,adjustedY:a}=ie(e,r,n,o),u=n/2;return{targets:t,from:7*Jt(i,a,u,u),easing:"cubic-bezier(0.445, 0.050, 0.550, 0.950)",duration:1e3,web:{scale:[...o===ue.Icon?[{offset:0,value:1},{offset:.1,value:.7},{offset:.2,value:1}]:[{offset:0,value:1}],...ae(de,t=>1+t/5*.1),1]}}},he=(t,e,r,n,o)=>{const{adjustedX:i,adjustedY:a}=ie(e,r,n,o),u=n/2;return{targets:t,from:7*Jt(i,a,u,u),easing:"cubic-bezier(0.445, 0.050, 0.550, 0.950)",duration:1e3,web:{scale:[...o===ue.Icon?[{offset:0,value:1},{offset:.1,value:.7},{offset:.2,value:1}]:[{offset:0,value:0}],...ae(de,t=>1+t/5*.1),1],opacity:[{offset:0,value:0},{offset:.05,value:1}]}}},pe=t=>{switch(t){case se.FadeInTopDown:return fe;case se.FadeInCenterOut:return ce;case se.RadialRipple:return ge;case se.RadialRippleIn:return he;case se.MaterializeIn:return le;default:throw new Error(`${t} is not a valid AnimationPreset.`)}};X(Vt);class ve{constructor(){this.contents="",this.protocol="",this.moduleColor="#000",this.positionRingColor="#000",this.positionCenterColor="#000",this.maskXToYRatio=1,this.squares=!1}componentDidLoad(){this.updateQR()}componentDidUpdate(){this.codeRendered.emit()}updateQR(){const t=this.qrCodeElement===this.qrCodeElement.shadowRoot,e=this.qrCodeElement.shadowRoot.querySelector("slot"),r=t?!!this.qrCodeElement.querySelector("[slot]"):!!e&&e.assignedNodes().length>0;this.data=this.generateQRCodeSVG(this.contents,r)}animateQRCode(t){this.executeAnimation("string"==typeof t?pe(t):t)}getModuleCount(){return this.moduleCount}executeAnimation(t){const e=Array.from(this.qrCodeElement.shadowRoot.querySelectorAll(".module")),r=Array.from(this.qrCodeElement.shadowRoot.querySelectorAll(".position-ring")),n=Array.from(this.qrCodeElement.shadowRoot.querySelectorAll(".position-center")),o=Array.from(this.qrCodeElement.shadowRoot.querySelectorAll("#icon-wrapper")),i=(t,e)=>t.map(t=>({element:t,entityType:e}));Yt([...i(e,ue.Module),...i(r,ue.PositionRing),...i(n,ue.PositionCenter),...i(o,ue.Icon)].map(({element:t,entityType:e})=>({element:t,positionX:parseInt(t.dataset.column,10),positionY:parseInt(t.dataset.row,10),entityType:e})).map(e=>t(e.element,e.positionX,e.positionY,this.moduleCount,e.entityType))).play()}generateQRCodeSVG(t,e){const r=_t(0,"H");r.addData(t),r.make(),this.moduleCount=r.getModuleCount();const n=this.moduleCount+8,o=n/2;return`\n \n \n ${this.squares?void 0:function(t,e,r,n,o){return`\n ${i(4,4,4,r,n,o)}\n ${i(t-7+4,4,4,r,n,o)}\n ${i(4,t-7+4,4,r,n,o)}\n `}(this.moduleCount,0,this.positionRingColor,this.positionCenterColor,o)}\n ${function(t,e,r,n,o,i,s,f){let c="";for(let r=0;r\n `:`\n `}}return c}(r,this.moduleCount,0,e,this.maskXToYRatio,this.squares,this.moduleColor,o)}\n `;function i(t,e,r,n,o,i){return`\n \n \n `}function a(t,e,r){return t<=7?e<=7||e>=r-7:e<=7&&t>=r-7}function u(t,e,r,n,o){if(!n)return!1;const i=r/2,a=Math.floor(r*Math.sqrt(.1)/2),u=a*o,s=a/o;return t>=i-s&&t<=i+s&&e>=i-u&&e<=i+u}}render(){return t("div",{id:"qr-container"},t("div",{id:"icon-container",style:this.squares?{display:"none",visibility:"hidden"}:{}},t("div",{id:"icon-wrapper",style:{width:`${18*this.maskXToYRatio}%`},"data-column":this.moduleCount/2,"data-row":this.moduleCount/2},t("slot",{name:"icon"}))),t("div",{innerHTML:this.data}))}static get is(){return"qr-code"}static get encapsulation(){return"shadow"}static get properties(){return{animateQRCode:{method:!0},contents:{type:String,attr:"contents",watchCallbacks:["updateQR"]},data:{state:!0},getModuleCount:{method:!0},maskXToYRatio:{type:Number,attr:"mask-x-to-y-ratio",watchCallbacks:["updateQR"]},moduleColor:{type:String,attr:"module-color",watchCallbacks:["updateQR"]},moduleCount:{state:!0},positionCenterColor:{type:String,attr:"position-center-color",watchCallbacks:["updateQR"]},positionRingColor:{type:String,attr:"position-ring-color",watchCallbacks:["updateQR"]},protocol:{type:String,attr:"protocol",watchCallbacks:["updateQR"]},qrCodeElement:{elementRef:!0},squares:{type:Boolean,attr:"squares",watchCallbacks:["updateQR"]}}}static get events(){return[{name:"codeRendered",method:"codeRendered",bubbles:!0,cancelable:!0,composed:!0}]}static get style(){return":host{display:block;contain:content}#qr-container{position:relative}#icon-container{position:absolute;width:100%;height:100%;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}"}}export{ve as QrCode}; \ No newline at end of file diff --git a/assets/vendor/qr-code/qr-code/mu42bxql.sc.es5.js b/assets/vendor/qr-code/qr-code/mu42bxql.sc.es5.js new file mode 100644 index 0000000..e1dabe4 --- /dev/null +++ b/assets/vendor/qr-code/qr-code/mu42bxql.sc.es5.js @@ -0,0 +1,2 @@ +/*! Built with http://stenciljs.com */ +QrCode.loadBundle("mu42bxql",["exports"],function(t){var e,r=window.QrCode.h,n=function(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)},o=function(){return n()+n()+n()+n()+n()+n()+n()+n()};function i(t){return!!t||0===t||!1===t}function a(t){return"function"==typeof t}function u(t){return"number"==typeof t}function f(t){return"object"==typeof t&&!!t}function s(t){return"string"==typeof t}function c(t){return t&&isFinite(t.length)&&!s(t)&&!a(t)}function l(t){return t.nodeType||t instanceof SVGElement}function d(t,e){return t.hasOwnProperty(e)}var g=1,h=2,v=3,p=void 0,m=/^([+|-]*[0-9]*[.]*?[0-9]+)([a-z%]+)*$/i;function y(t,e){return-1!==function(t,e){return t.indexOf(e)}(t,e)}function w(t,e,r){var n=t&&t.length;if(!n)return p;if(e===p)return t[r?n-1:0];if(r){for(var o=n-1;o>-1;o--)if(e(t[o]))return t[o]}else for(o=0;oo?1:0}}function k(t){return i(t)?c(t)?t:[t]:[]}function B(t,e){return e!==p&&Array.prototype.push.call(t,e),e}function M(t,e){return y(t,e)||B(t,e),e}function A(t,e){var r=[];return R(t,function(t){var n=e(t);c(n)?R(n,function(t){return B(r,t)}):B(r,n)}),r}function R(t,e){for(var r=k(t),n=0,o=r.length;n-1;n--){var o=D[n];vt(x,o,r)}}else q()}function j(t){b(D,t),D.length||q()}var E=function(t,e,r){R(t.players,function(t){return t.cancel()}),t.state=g,t.time=p,t.round=p,t.players=p,j(t.id),r.trigger("cancel")},F=function(t,e,r){E(t,0,r),r.destroyed=!0},O=Math.abs,Q=Math.floor,Y=Math.max,X=Math.min;function W(t,e,r){return t!==p&&e<=t&&t<=r}var H={};function N(t){H[t.name]=t}var G=0,U=/\[object ([a-z]+)\]/i;function V(t,e){for(var r in t)if(t[r]===e)return r;var n=function(t){var e=t.id||t.name;if(!e){e=Object.prototype.toString.call(t);var r=U.exec(e);r&&(e=r[1])}return"@"+e+"_"+ ++G}(e);return t[n]=e,n}function Z(t){return s(t)?Array.prototype.slice.call(document.querySelectorAll(t)):a(t)?Z(t()):c(t)?A(t,Z):f(t)?[t]:[]}function $(){var t={};return R(arguments,function(e){for(var r in e)d(e,r)&&(t[r]=e[r])}),t}function _(t,e,r,n){return a(t)?_(t(e,r,n),e,r,n):t}var J=C("offset");function K(t){var e;R(t,function(t){t.value!==p?e=t.value:t.value=e})}function tt(t){for(var e,r=t.length-1;r>-1;r--){var n=t[r];n.interpolate!==p?e=n.interpolate:n.interpolate=e}}function et(t,e,r,n,o){var i=w(e,function(t){return 0===t.offset});if(i===p||i.value===p){var a=n.getValue(r,o);i===p?e.splice(0,0,{offset:0,value:a,easing:t.easing,interpolate:p}):(i.value=a,i.easing=t.easing,i.interpolate=p)}}function rt(t,e){var r=w(e,function(t){return 1===t.offset},!0);if(r===p||r.value===p){var n=e[e.length-1].value;r===p?B(e,{offset:1,value:n,easing:t.easing,interpolate:p}):(r.value=n,r.easing=r.easing||t.easing)}}var nt=function(t,e,r){t.players===p&&function(t){t.players=[],R(t.configs,function(e){return function(t,e){R(function(t){var e=t.keyframes,r=t.from,n=t.to,o=t.stagger||0,i=t.duration,a=[];return R(Z(t.target),function(u,f,s){var c={},l={};for(var d in R(e,function(t){var e=c[t.prop]||(c[t.prop]=[]),n=(t.time-r)/(i||1),o=t.easing,a=t.interpolate,f=_(t.value,u,t.index,s);l[t.prop]=t.plugin;var d=w(e,function(t){return t.offset===n})||B(e,{easing:o,offset:n,value:f,interpolate:a});d.easing=o,d.value=f,d.interpolate=a}),H){var g=H[d];if(g.onWillAnimate&&t.keyframes.some(function(t){return t.plugin===d})){var h=$(t,{target:u});g.onWillAnimate(h,c,l)}}for(var v in c){var p=c[v],m=l[v],y=H[m];p&&(p.sort(J),et(t,p,u,y,v),K(p),tt(p),rt(t,p),B(a,{plugin:l[v],target:u,prop:v,from:r+(o?o*f:0),to:n+(o?o*f:0),keyframes:p}))}}),a}(function t(e,r,n){if(!i(r)||u(r)||a(r))return r;if(s(r)){var o=r;return d(e,o)&&"@"===o.charAt(0)?e[o]:o}if(c(r)){var f=[];return R(r,function(r){return B(f,t(e,r,n))}),f}if(!n||l(r))return r;var g={};for(var h in r)if(d(r,h)){var v=r[h];g[h]=n?t(e,v,"targets"!==h):v}return g}(t.refs,e,!0)),function(e){var r=H[e.plugin].animate(e);r&&(r.from=e.from,r.to=e.to,B(t.players,r))})}(t,e)}),function(t){t.duration=Y.apply(p,t.players.filter(function(t){return isFinite(t.to)}).map(function(t){return t.to})),t.time=isFinite(t.time)?t.time:t.rate<0?t.duration:0}(t)}(t);var n=t.state===v,o=t.time;n||j(t.id),R(t.players,function(e){var r=e.from,i=e.to,a=n&&W(Q(o),r,i),u=(1,X(Y((o-r)/(i-r),0),1));e.update(u,t.rate,a)}),r.trigger("update")},ot=function(t,e,r){t.round=0,t.state=h,t.yoyo||(t.time=t.rate<0?0:t.duration),j(t.id),nt(t,0,r),r.trigger("finish"),t.destroy&&F(t,0,r)},it=function(t,e,r){t.state=h,j(t.id),nt(t,0,r),r.trigger("pause")},at=function(t,e,r){e&&(t.repeat=e.repeat,t.yoyo=!!e.alternate,t.destroy=!!e.destroy),t.repeat=t.repeat||1,t.yoyo=t.yoyo||!1,t.state=v;var n,o=t.rate>=0;o&&t.time===t.duration?t.time=0:o||0!==t.time||(t.time=t.duration),n=t.id,y(D,n)||B(D,n),I||(I=S(P)),nt(t,0,r),r.trigger("play")},ut=function(t){for(var e=0,r=0,n=t.configs,o=0,i=n.length;o1&&!i(r.offset)&&(r.offset=1);for(var n=1,o=t.length;n=1?1:n*r+t-(n*r+t)%r}}(+i[1],i[2]);if("cubic-bezier"===a)return e=+i[1],r=+i[2],n=+i[3],o=+i[4],e<0||e>1||n<0||n>1?function(t){return t}:function(t){if(0===t||1===t)return t;var i=0,a=1,u=19;do{var f=.5*(i+a),s=wt(e,n,f);if(Mt(t-s)<1e-4)return wt(r,o,f);se)return n;return r-1}(n,o),a=i?i-1:0,u=n[i],f=n[a],s=r[a],c=(o-f)/(u-f),l=s.easing?Rt(s.easing)(c):c;return s.simpleFn?s.interpolate(s.value,r[i].value,l):s.interpolate(s.value,r[i].value)(l)}),s=function(t,e){var r=Ot(t,e);return r===Pt?function(t,e){return function(r){return t.style.setProperty(e,r?r+"":"")}}(t,e):r===zt?function(t,e){return function(r){return t.setAttribute(e,r)}}(t,e):r===qt?function(t,r){var n=Tt(e);return function(e){return t.setAttribute(n,e)}}(t):function(t,e){return function(r){return t[e]=r}}(t,e)}(o,i),c=Qt(o,i),l=p;return{cancel:function(){l!==p&&s(l),l=p},update:function(t,e,r){l===p&&(l=c()),s(f(t))}}},getValue:function(t,e){return Qt(t,e)()}});var Xt=Dt("rotateX,rotateY,rotateZ,rotate"),Wt=Dt("scaleX,scaleY,scaleZ,scale"),Ht=Dt("perspective,x,y,z"),Nt=Xt.concat(Wt,Ht),Gt={x:"translateX",y:"translateY",z:"translateZ"},Ut=Dt("backgroundSize,border,borderBottom,borderBottomLeftRadius,borderBottomRightRadius,borderBottomWidth,borderLeft,borderLeftWidth,borderRadius,borderRight,borderRightWidth,borderTop,borderTopLeftRadius,borderTopRightRadius,borderTopWidth,borderWidth,bottom,columnGap,columnRuleWidth,columnWidth,columns,flexBasis,font,fontSize,gridColumnGap,gridGap,gridRowGap,height,left,letterSpacing,lineHeight,margin,marginBottom,marginLeft,marginRight,marginTop,maskSize,maxHeight,maxWidth,minHeight,minWidth,outline,outlineOffset,outlineWidth,padding,paddingBottom,paddingLeft,paddingRight,paddingTop,perspective,right,shapeMargin,tabSize,top,width,wordSpacing");function Vt(t){var e={unit:p,value:p};if(!i(t))return e;if(Number(t))return e.value=+t,e;var r=m.exec(t);return r&&(e.unit=r[2]||p,e.value=r[1]?parseFloat(r[1]):p),e}var Zt,$t,_t,Jt={name:"web",animate:function(t){var e=t.keyframes,r=t.prop,n=t.from,o=t.to,i=t.target,a=o-n,u=At(function(){var t=e.map(function(t){var e,n=t.offset,o=t.value,i=t.easing;return(e={offset:n})[r]=o,e.easing=i,e}),n=i.animate(t,{duration:a,fill:"both"});return n.pause(),n});return{cancel:function(){u().cancel()},update:function(t,e,r){var n=u(),o=a*t;if(O(n.currentTime-o)>1&&(n.currentTime=o),r&&n.playbackRate!==e){var i=n.currentTime;i<1?n.currentTime=1:i>=a-1&&(n.currentTime=a-1),n.playbackRate=e}r&&!("running"===n.playState||"finish"===n.playState)&&!(e<0&&o<17)&&!(e>=0&&o>a-17)&&n.play(),!r&&("running"===n.playState||"pending"===n.playState)&&n.pause()}}},getValue:function(t,e){return getComputedStyle(t)[e]},onWillAnimate:function(t,e,r){l(t.target)&&(function(t){for(var e in t)if(y(Ut,e)){var r=t[e];for(var n in r){var o=r[n];i(o)&&u(o.value)&&(o.value+="px")}}}(e),function(t,e,r){var n=t.propNames.filter(function(t){return y(Nt,t)});if(n.length){if(y(t.propNames,"transform"))throw new Error("transform + shorthand is not allowed");var o=[],a={};R(n,function(t){var r=e[t];r&&R(r,function(t){a[t.offset]=t.easing,M(o,t.offset)})}),o.sort();for(var u=o.map(function(t){var r={};return R(n,function(n){var o=w(e[n],function(e){return e.offset===t});r[n]=o?o.value:p}),{offset:t,easing:a[t],values:r}}),f=u.length,s=f-1;s>-1;--s){var c=u[s];for(var l in c.values)if(!i(c.values[l])){for(var d=p,g=s-1;g>-1;g--)if(i(u[g].values[l])){d=g;break}for(var h=p,v=s+1;v=7&&B(t),null==v&&(v=R(r,n,m)),A(v,e)},b=function(t,e){for(var r=-1;r<=7;r+=1)if(!(t+r<=-1||h<=t+r))for(var n=-1;n<=7;n+=1)e+n<=-1||h<=e+n||(a[t+r][e+n]=0<=r&&r<=6&&(0==n||6==n)||0<=n&&n<=6&&(0==r||6==r)||2<=r&&r<=4&&2<=n&&n<=4)},C=function(){for(var t=8;t>n&1);a[Math.floor(n/3)][n%3+h-8-3]=o}for(n=0;n<18;n+=1)o=!t&&1==(e>>n&1),a[n%3+h-8-3][Math.floor(n/3)]=o},M=function(t,e){for(var r=n<<3|e,o=i.getBCHTypeInfo(r),u=0;u<15;u+=1){var f=!t&&1==(o>>u&1);u<6?a[u][8]=f:u<8?a[u+1][8]=f:a[h-15+u][8]=f}for(u=0;u<15;u+=1)f=!t&&1==(o>>u&1),u<8?a[8][h-u-1]=f:u<9?a[8][15-u-1+1]=f:a[8][15-u-1]=f;a[h-8][8]=!t},A=function(t,e){for(var r=-1,n=h-1,o=7,u=0,f=i.getMaskFunction(e),s=h-1;s>0;s-=2)for(6==s&&(s-=1);;){for(var c=0;c<2;c+=1)if(null==a[n][s-c]){var l=!1;u>>o&1)),f(n,s-c)&&(l=!l),a[n][s-c]=l,-1==(o-=1)&&(u+=1,o=7)}if((n+=r)<0||h<=n){n-=r,r=-r;break}}},R=function(t,e,r){for(var n=f.getRSBlocks(t,e),o=s(),a=0;a8*l)throw"code length overflow. ("+o.getLengthInBits()+">"+8*l+")";for(o.getLengthInBits()+4<=8*l&&o.put(0,4);o.getLengthInBits()%8!=0;)o.putBit(!1);for(;!(o.getLengthInBits()>=8*l||(o.put(236,8),o.getLengthInBits()>=8*l));)o.put(17,8);return function(t,e){for(var r=0,n=0,o=0,a=new Array(e.length),f=new Array(e.length),s=0;s=0?h.getAt(v):0}}var p=0;for(d=0;dn)&&(t=n,e=r)}return e}())},y.createTableTag=function(t,e){t=t||2;var r="";r+='',r+="";for(var n=0;n";for(var o=0;o';r+=""}return(r+="")+"
"},y.createSvgTag=function(t,e){t=t||2,e=void 0===e?4*t:e;var r,n,o,i,a=y.getModuleCount()*t+2*e,u="";for(i="l"+t+",0 0,"+t+" -"+t+",0 0,-"+t+"z ",u+='')+""},y.createDataURL=function(t,e){t=t||2,e=void 0===e?4*t:e;var r=y.getModuleCount()*t+2*e,n=e,o=r-e;return p(r,r,function(e,r){if(n<=e&&e"},y.renderTo2dContext=function(t,e){e=e||2;for(var r=y.getModuleCount(),n=0;n>>8),e.push(255&a)):e.push(n)}}return e}};var e,r,n,o={L:1,M:0,Q:3,H:2},i=(e=[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]],n=function(t){for(var e=0;0!=t;)e+=1,t>>>=1;return e},(r={}).getBCHTypeInfo=function(t){for(var e=t<<10;n(e)-n(1335)>=0;)e^=1335<=0;)e^=7973<5&&(r+=3+i-5)}for(n=0;n=256;)e-=255;return t[e]}}}();function u(t,e){if(void 0===t.length)throw t.length+"/"+e;var r=function(){for(var r=0;r>>7-e%8&1)},put:function(t,e){for(var n=0;n>>e-n-1&1))},getLengthInBits:function(){return e},putBit:function(r){var n=Math.floor(e/8);t.length<=n&&t.push(0),r&&(t[n]|=128>>>e%8),e+=1}};return r},c=function(t){var e=t,r={getMode:function(){return 1},getLength:function(t){return e.length},write:function(t){for(var r=e,o=0;o+2>>8&255)+(255&o),t.put(o,13),r+=2}if(r>>8)},writeBytes:function(t,r,n){r=r||0,n=n||t.length;for(var o=0;o0&&(e+=","),e+=t[r];return e+"]"}};return e},v=function(t){var e=t,r=0,n=0,o=0,i={read:function(){for(;o<8;){if(r>=e.length){if(0==o)return-1;throw"unexpected end of file./"+o}var t=e.charAt(r);if(r+=1,"="==t)return o=0,-1;t.match(/^\s$/)||(n=n<<6|a(t.charCodeAt(0)),o+=6)}var i=n>>>o-8&255;return o-=8,i}},a=function(t){if(65<=t&&t<=90)return t-65;if(97<=t&&t<=122)return t-97+26;if(48<=t&&t<=57)return t-48+52;if(43==t)return 62;if(47==t)return 63;throw"c:"+t};return i},p=function(t,e,r){for(var n=function(t,e){var r=t,n=e,o=new Array(t*e),i={setPixel:function(t,e,n){o[e*r+t]=n},write:function(t){t.writeString("GIF87a"),t.writeShort(r),t.writeShort(n),t.writeByte(128),t.writeByte(0),t.writeByte(0),t.writeByte(0),t.writeByte(0),t.writeByte(0),t.writeByte(255),t.writeByte(255),t.writeByte(255),t.writeString(","),t.writeShort(0),t.writeShort(0),t.writeShort(r),t.writeShort(n),t.writeByte(0);var e=a(2);t.writeByte(2);for(var o=0;e.length-o>255;)t.writeByte(255),t.writeBytes(e,o,255),o+=255;t.writeByte(e.length-o),t.writeBytes(e,o,e.length-o),t.writeByte(0),t.writeString(";")}},a=function(t){for(var e=1<>>e!=0)throw"length over";for(;s+e>=8;)f.writeByte(255&(t<>>=8-s,c=0,s=0;c|=t<0&&f.writeByte(c)}});d.write(e,n);var g=0,v=String.fromCharCode(o[g]);for(g+=1;g=6;)d(u>>>f-6),f-=6},l.flush=function(){if(f>0&&(d(u<<6-f),u=0,f=0),s%3!=0)for(var t=3-s%3,e=0;e>6,128|63&n):n<55296||n>=57344?e.push(224|n>>12,128|n>>6&63,128|63&n):(r++,n=65536+((1023&n)<<10|1023&t.charCodeAt(r)),e.push(240|n>>18,128|n>>12&63,128|n>>6&63,128|63&n))}return e}(t)},r=function(){return n},t.exports=r()}(Zt={exports:{}}),Zt.exports),te=function(t,e,r,n){return Math.hypot(r-t,n-e)};!function(t){t[t.Left=0]="Left",t[t.Middle=1]="Middle",t[t.Right=2]="Right"}($t||($t={})),function(t){t[t.Top=0]="Top",t[t.Center=1]="Center",t[t.Bottom=2]="Bottom"}(_t||(_t={}));var ee=function(t){return function(e,r,n,o){return{adjustedX:n===$t.Left?e:n===$t.Right?e+t:e+t/2,adjustedY:o===_t.Top?r:o===_t.Bottom?r+t:r+t/2}}},re=ee(7),ne=ee(3);function oe(t,e,r,n,o){return te?o:n}var ie,ae,ue=function(t,e,r,n){var o=r/2,i=oe(t,o,$t.Right,$t.Middle,$t.Left),a=oe(e,o,_t.Bottom,_t.Center,_t.Top);return n===ie.PositionCenter?ne(t,e,i,a):n===ie.PositionRing?re(t,e,i,a):{adjustedX:t,adjustedY:e}},fe=function(t,e){return t.map(function(t){return{offset:t.offset,value:e(t.value)}})};!function(t){t.Module="module",t.PositionRing="position-ring",t.PositionCenter="position-center",t.Icon="icon"}(ie||(ie={})),function(t){t.FadeInTopDown="FadeInTopDown",t.FadeInCenterOut="FadeInCenterOut",t.RadialRipple="RadialRipple",t.RadialRippleIn="RadialRippleIn",t.MaterializeIn="MaterializeIn"}(ae||(ae={}));var se,ce,le=function(t,e,r,n,o){return{targets:t,from:20*r,duration:300,web:{opacity:[0,1]}}},de=function(t,e,r,n,o){var i=ue(e,r,n,o),a=i.adjustedX,u=i.adjustedY,f=n/2;return{targets:t,from:20*te(a,u,f,f),duration:200,web:{opacity:[0,1]}}},ge=function(t,e,r,n,o){return{targets:t,from:o===ie.Module?200*Math.random():200,duration:200,web:{opacity:[0,1]}}},he=function(t,e,r){var n=50-Math.pow(3,2);if(n<0)throw new Error("This method only supports underdamped oscillation.");var o=Math.sqrt(n),i=function(t){return function(t){return 5*Math.pow(Math.E,-3*t)}(t)*Math.cos(o*t+0)},a=function(t){return(Math.atan(-3/o)+t*Math.PI-0)/o},u=[];u.push({time:0,amplitude:i(0)});for(var f=0;Math.abs(u[u.length-1].amplitude)>.01;f++)a(f)>=0&&u.push({time:a(f),amplitude:i(a(f))});return u}(),ve=(ce=(1-.2)/(se=he)[se.length-1].time,se.map(function(t){var e=t.time,r=t.amplitude;return{offset:.2+e*ce,value:r}})),pe=function(t,e,r,n,o){var i=ue(e,r,n,o),a=i.adjustedX,u=i.adjustedY,f=n/2;return{targets:t,from:7*te(a,u,f,f),easing:"cubic-bezier(0.445, 0.050, 0.550, 0.950)",duration:1e3,web:{scale:(o===ie.Icon?[{offset:0,value:1},{offset:.1,value:.7},{offset:.2,value:1}]:[{offset:0,value:1}]).concat(fe(ve,function(t){return 1+t/5*.1}),[1])}}},me=function(t,e,r,n,o){var i=ue(e,r,n,o),a=i.adjustedX,u=i.adjustedY,f=n/2;return{targets:t,from:7*te(a,u,f,f),easing:"cubic-bezier(0.445, 0.050, 0.550, 0.950)",duration:1e3,web:{scale:(o===ie.Icon?[{offset:0,value:1},{offset:.1,value:.7},{offset:.2,value:1}]:[{offset:0,value:0}]).concat(fe(ve,function(t){return 1+t/5*.1}),[1]),opacity:[{offset:0,value:0},{offset:.05,value:1}]}}};N(Jt);var ye=function(){function t(){this.contents="",this.protocol="",this.moduleColor="#000",this.positionRingColor="#000",this.positionCenterColor="#000",this.maskXToYRatio=1,this.squares=!1}return t.prototype.componentDidLoad=function(){this.updateQR()},t.prototype.componentDidUpdate=function(){this.codeRendered.emit()},t.prototype.updateQR=function(){var t=this.qrCodeElement===this.qrCodeElement.shadowRoot,e=this.qrCodeElement.shadowRoot.querySelector("slot"),r=t?!!this.qrCodeElement.querySelector("[slot]"):!!e&&e.assignedNodes().length>0;this.data=this.generateQRCodeSVG(this.contents,r)},t.prototype.animateQRCode=function(t){this.executeAnimation("string"==typeof t?function(t){switch(t){case ae.FadeInTopDown:return le;case ae.FadeInCenterOut:return de;case ae.RadialRipple:return pe;case ae.RadialRippleIn:return me;case ae.MaterializeIn:return ge;default:throw new Error(t+" is not a valid AnimationPreset.")}}(t):t)},t.prototype.getModuleCount=function(){return this.moduleCount},t.prototype.executeAnimation=function(t){var e=this,r=Array.from(this.qrCodeElement.shadowRoot.querySelectorAll(".module")),n=Array.from(this.qrCodeElement.shadowRoot.querySelectorAll(".position-ring")),o=Array.from(this.qrCodeElement.shadowRoot.querySelectorAll(".position-center")),i=Array.from(this.qrCodeElement.shadowRoot.querySelectorAll("#icon-wrapper")),a=function(t,e){return t.map(function(t){return{element:t,entityType:e}})};Yt(a(r,ie.Module).concat(a(n,ie.PositionRing),a(o,ie.PositionCenter),a(i,ie.Icon)).map(function(t){var e=t.element,r=t.entityType;return{element:e,positionX:parseInt(e.dataset.column,10),positionY:parseInt(e.dataset.row,10),entityType:r}}).map(function(r){return t(r.element,r.positionX,r.positionY,e.moduleCount,r.entityType)})).play()},t.prototype.generateQRCodeSVG=function(t,e){var r=Kt(0,"H");r.addData(t),r.make(),this.moduleCount=r.getModuleCount();var n=this.moduleCount+8,o=n/2;return'\n \n \n '+(this.squares?void 0:function(t,e,r,n,o){return"\n "+i(4,4,4,r,n,o)+"\n "+i(t-7+4,4,4,r,n,o)+"\n "+i(4,t-7+4,4,r,n,o)+"\n "}(this.moduleCount,0,this.positionRingColor,this.positionCenterColor,o))+"\n "+function(t,e,r,n,o,i,f,s){for(var c="",l=0;l\n ':'\n '}return c}(r,this.moduleCount,0,e,this.maskXToYRatio,this.squares,this.moduleColor,o)+"\n ";function i(t,e,r,n,o,i){return'\n \n \n '}function a(t,e,r){return t<=7?e<=7||e>=r-7:e<=7&&t>=r-7}function u(t,e,r,n,o){if(!n)return!1;var i=r/2,a=Math.floor(r*Math.sqrt(.1)/2),u=a*o,f=a/o;return t>=i-f&&t<=i+f&&e>=i-u&&e<=i+u}},t.prototype.render=function(){return r("div",{id:"qr-container"},r("div",{id:"icon-container",style:this.squares?{display:"none",visibility:"hidden"}:{}},r("div",{id:"icon-wrapper",style:{width:18*this.maskXToYRatio+"%"},"data-column":this.moduleCount/2,"data-row":this.moduleCount/2},r("slot",{name:"icon"}))),r("div",{innerHTML:this.data}))},Object.defineProperty(t,"is",{get:function(){return"qr-code"},enumerable:!0,configurable:!0}),Object.defineProperty(t,"encapsulation",{get:function(){return"shadow"},enumerable:!0,configurable:!0}),Object.defineProperty(t,"properties",{get:function(){return{animateQRCode:{method:!0},contents:{type:String,attr:"contents",watchCallbacks:["updateQR"]},data:{state:!0},getModuleCount:{method:!0},maskXToYRatio:{type:Number,attr:"mask-x-to-y-ratio",watchCallbacks:["updateQR"]},moduleColor:{type:String,attr:"module-color",watchCallbacks:["updateQR"]},moduleCount:{state:!0},positionCenterColor:{type:String,attr:"position-center-color",watchCallbacks:["updateQR"]},positionRingColor:{type:String,attr:"position-ring-color",watchCallbacks:["updateQR"]},protocol:{type:String,attr:"protocol",watchCallbacks:["updateQR"]},qrCodeElement:{elementRef:!0},squares:{type:Boolean,attr:"squares",watchCallbacks:["updateQR"]}}},enumerable:!0,configurable:!0}),Object.defineProperty(t,"events",{get:function(){return[{name:"codeRendered",method:"codeRendered",bubbles:!0,cancelable:!0,composed:!0}]},enumerable:!0,configurable:!0}),Object.defineProperty(t,"style",{get:function(){return"[data-qr-code-host]{display:block;contain:content}#qr-container[data-qr-code]{position:relative}#icon-container[data-qr-code]{position:absolute;width:100%;height:100%;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}"},enumerable:!0,configurable:!0}),t}();t.QrCode=ye,Object.defineProperty(t,"__esModule",{value:!0})}); \ No newline at end of file diff --git a/assets/vendor/qr-code/qr-code/mu42bxql.sc.js b/assets/vendor/qr-code/qr-code/mu42bxql.sc.js new file mode 100644 index 0000000..3570a43 --- /dev/null +++ b/assets/vendor/qr-code/qr-code/mu42bxql.sc.js @@ -0,0 +1,2 @@ +/*! Built with http://stenciljs.com */ +const{h:t}=window.QrCode,e=()=>Math.floor(65536*(1+Math.random())).toString(16).substring(1),r=()=>e()+e()+e()+e()+e()+e()+e()+e();function n(t){return!!t||0===t||!1===t}function o(t){return"function"==typeof t}function i(t){return"number"==typeof t}function a(t){return"object"==typeof t&&!!t}function u(t){return"string"==typeof t}function s(t){return t&&isFinite(t.length)&&!u(t)&&!o(t)}function f(t){return t.nodeType||t instanceof SVGElement}function c(t,e){return t.hasOwnProperty(e)}const l=1,d=2,g=3,h=void 0,p=/^([+|-]*[0-9]*[.]*?[0-9]+)([a-z%]+)*$/i;function v(t,e){return-1!==function(t,e){return t.indexOf(e)}(t,e)}function m(t,e,r){const n=t&&t.length;if(!n)return h;if(e===h)return t[r?n-1:0];if(r){for(let r=n-1;r>-1;r--)if(e(t[r]))return t[r]}else for(let r=0;r{const n=e[t],o=r[t];return no?1:0}}function b(t){return n(t)?s(t)?t:[t]:[]}function C(t,e){return e!==h&&Array.prototype.push.call(t,e),e}function k(t,e){return v(t,e)||C(t,e),e}function B(t,e){var r=[];return A(t,t=>{var n=e(t);s(n)?A(n,t=>C(r,t)):C(r,n)}),r}function A(t,e){const r=b(t);for(let t=0,n=r.length;tperformance.now(),L=[];let T=h,D=h;function I(){x(T),T=D=h}function $(){const t=L.length;if(D=D||S(),!t)return void I();const e=S(),r=e-D;D=e,T=R($);for(let e=t-1;e>-1;e--){const t=L[e];pt(M,t,r)}}function z(t){y(L,t),L.length||I()}const q=(t,e,r)=>{A(t.players,t=>t.cancel()),t.state=l,t.time=h,t.round=h,t.players=h,z(t.id),r.trigger("cancel")},P=(t,e,r)=>{q(t,0,r),r.destroyed=!0},E=Math.abs,F=Math.floor,j=Math.max,Q=Math.min;function Y(t,e,r){return t!==h&&e<=t&&t<=r}const O={};function X(t){O[t.name]=t}let W=0;const H=/\[object ([a-z]+)\]/i;function N(t,e){for(var r in t)if(t[r]===e)return r;const n=function(t){let e=t.id||t.name;if(!e){e=Object.prototype.toString.call(t);const r=H.exec(e);r&&(e=r[1])}return"@"+e+"_"+ ++W}(e);return t[n]=e,n}function G(t){return u(t)?Array.prototype.slice.call(document.querySelectorAll(t)):o(t)?G(t()):s(t)?B(t,G):a(t)?[t]:[]}function U(){var t={};return A(arguments,e=>{for(var r in e)c(e,r)&&(t[r]=e[r])}),t}function V(t,e,r,n){return o(t)?V(t(e,r,n),e,r,n):t}const Z=w("offset");function _(t){var e;A(t,t=>{t.value!==h?e=t.value:t.value=e})}function J(t){for(var e,r=t.length-1;r>-1;r--){var n=t[r];n.interpolate!==h?e=n.interpolate:n.interpolate=e}}function K(t,e,r,n,o){var i=m(e,t=>0===t.offset);if(i===h||i.value===h){var a=n.getValue(r,o);i===h?e.splice(0,0,{offset:0,value:a,easing:t.easing,interpolate:h}):(i.value=a,i.easing=t.easing,i.interpolate=h)}}function tt(t,e){var r=m(e,t=>1===t.offset,!0);if(r===h||r.value===h){var n=e[e.length-1].value;r===h?C(e,{offset:1,value:n,easing:t.easing,interpolate:h}):(r.value=n,r.easing=r.easing||t.easing)}}const et=(t,e,r)=>{t.players===h&&((t=t).players=[],A(t.configs,e=>(function(t,e){A(function(t){const e=t.keyframes,r=t.from,n=t.to,o=t.stagger||0,i=t.duration,a=[];return A(G(t.target),(u,s,f)=>{var c={},l={};for(var d in A(e,t=>{const e=c[t.prop]||(c[t.prop]=[]),n=(t.time-r)/(i||1),o=t.easing,a=t.interpolate,s=V(t.value,u,t.index,f);l[t.prop]=t.plugin;const d=m(e,t=>t.offset===n)||C(e,{easing:o,offset:n,value:s,interpolate:a});d.easing=o,d.value=s,d.interpolate=a}),O){var g=O[d];if(g.onWillAnimate&&t.keyframes.some(t=>t.plugin===d)){var h=U(t,{target:u});g.onWillAnimate(h,c,l)}}for(var p in c){var v=c[p],y=l[p],w=O[y];v&&(v.sort(Z),K(t,v,u,w,p),_(v),J(v),tt(t,v),C(a,{plugin:l[p],target:u,prop:p,from:r+(o?o*s:0),to:n+(o?o*s:0),keyframes:v}))}}),a}(function t(e,r,a){if(!n(r)||i(r)||o(r))return r;if(u(r)){const t=r;return c(e,t)&&"@"===t.charAt(0)?e[t]:t}if(s(r)){const n=[];return A(r,r=>C(n,t(e,r,a))),n}if(!a||f(r))return r;var l={};for(var d in r)if(c(r,d)){const n=r[d];l[d]=a?t(e,n,"targets"!==d):n}return l}(t.refs,e,!0)),e=>{const r=O[e.plugin].animate(e);r&&(r.from=e.from,r.to=e.to,C(t.players,r))})})(t,e)),function(t){t.duration=j.apply(h,t.players.filter(t=>isFinite(t.to)).map(t=>t.to)),t.time=isFinite(t.time)?t.time:t.rate<0?t.duration:0}(t));const a=t.state===g,l=t.time;a||z(t.id),A(t.players,e=>{const r=e.from,n=e.to,o=a&&Y(F(l),r,n),i=(1,Q(j((l-r)/(n-r),0),1));e.update(i,t.rate,o)}),r.trigger("update")};var rt;const nt=(t,e,r)=>{t.round=0,t.state=d,t.yoyo||(t.time=t.rate<0?0:t.duration),z(t.id),et(t,0,r),r.trigger("finish"),t.destroy&&P(t,0,r)},ot=(t,e,r)=>{t.state=d,z(t.id),et(t,0,r),r.trigger("pause")},it=(t,e,r)=>{e&&(t.repeat=e.repeat,t.yoyo=!!e.alternate,t.destroy=!!e.destroy),t.repeat=t.repeat||1,t.yoyo=t.yoyo||!1,t.state=g;const n=t.rate>=0;n&&t.time===t.duration?t.time=0:n||0!==t.time||(t.time=t.duration),at=t.id,v(L,at)||C(L,at),T||(T=R($)),et(t,0,r),r.trigger("play")};var at;const ut=t=>{for(var e=0,r=0,n=t.configs,o=0,i=n.length;ot.time),s=j.apply(h,u),f=Q.apply(h,u);a.to=s,a.from=f,a.duration=s-f,e=j(s,e),r=j(s+a.endDelay,r)}t.cursor=r,t.duration=e},st=w("time"),ft=(t,e,r)=>{A(e,e=>{if(e.to===h)throw new Error("missing duration");A((e=function t(e,r,a){if(!n(r)||u(r)||i(r))return r;if(s(r))return B(r,r=>t(e,r,a));if(o(r))return N(e,r);if(a){for(var f in r)c(r,f)&&(r[f]=t(e,r[f],a&&"targets"!==f));return r}return N(e,r)}(t.refs,e,!0)).targets,(o,i,a)=>{const u=function(t,e,r,o,i){const a=V(i.delay,e,r,o)||0,u=m(t.configs,t=>t.target===e)||C(t.configs,{from:j(i.from+a,0),to:j(i.to+a,0),easing:i.easing||"ease",duration:i.to-i.from,endDelay:V(i.endDelay,e,r,o)||0,stagger:i.stagger||0,target:e,targetLength:o,propNames:[],keyframes:[]}),s=i.stagger&&i.stagger*(r+1)||0,f=V(i.delay,u,r,u.targetLength)||0,l=j(s+f+i.from,0),d=i.to-i.from,g=i.easing||"ease";for(var h in O)if(c(i,h)){const t=i[h];for(var p in t){var v=t[p];c(t,p)&&n(v)&&ct(u,h,r,p,v,d,l,g)}}return u.keyframes.sort(st),u}(t,o,i,a,e);r.dirty(u)})}),ut(t),r.trigger("config")};function ct(t,e,r,o,u,f,c,l){let d,g;if(!s(u)&&a(u)){const t=u;t.easing&&(l=t.easing),t.interpolate&&(d=t.interpolate),g=b(t.value)}else g=b(u);const p=g.map((e,n,o)=>{const u=V(e,t.target,r,t.targetLength),s=u,f=a(u),c=f?s.value:u,g=f&&i(s.offset)?s.offset:n===o.length-1?1:0===n?0:h,p=s&&s.interpolate||d;return{offset:g,value:c,easing:s&&s.easing||l,interpolate:p}});!function(t){if(!t.length)return;const e=m(t,t=>0===t.offset)||t[0];n(e.offset)||(e.offset=0);const r=m(t,t=>1===t.offset,!0)||t[t.length-1];t.length>1&&!n(r.offset)&&(r.offset=1);for(let e=1,r=t.length;e{const{offset:i,value:a}=n,u=F(f*i+c);(m(t.keyframes,t=>t.prop===o&&t.time===u)||C(t.keyframes,{plugin:e,easing:n.easing,index:r,prop:o,time:u,value:a,interpolate:n.interpolate})).value=a}),m(t.keyframes,t=>t.prop===o&&t.time===c)||C(t.keyframes,{plugin:e,easing:l,index:r,prop:o,time:c,value:h,interpolate:d});var v=c+f;m(t.keyframes,t=>t.prop===o&&t.time===v,!0)||C(t.keyframes,{plugin:e,easing:l,index:r,prop:o,time:v,value:h,interpolate:d}),k(t.propNames,o)}const lt=[],dt={},gt={append:(t,e,r)=>{const o=t.cursor,i=b(e).map(t=>{const{to:e,from:r,duration:i}=t,a=n(e),u=n(r),s=n(i),f=t;return f.to=a&&(u||s)?e:s&&u?r+i:a&&!s?o+e:s?o+i:h,f.from=u&&(a||s)?r:a&&s?e-i:a||s?o:h,f});ft(t,i,r)},cancel:q,destroy:P,finish:nt,insert:ft,pause:ot,play:it,reverse:(t,e,r)=>{t.rate*=-1,et(t,0,r),r.trigger("reverse")},set:(t,e,r)=>{const n=Object.keys(O),o=b(e).map(e=>{const r=e.at||t.cursor,o={};for(var i in e)if(v(n,i)){const t=e[i],r={};for(var a in t){var u=t[a];r[a]=[h,u]}o[i]=r}else o[i]=e[i];return o.from=r-1e-9,o.to=r,o});ft(t,o,r)},[M]:(t,e,r)=>{const n=t.duration,o=t.repeat,i=t.rate;let a=t.time===h?i<0?n:0:t.time,u=t.round||0;const s=i<0;let f=!1;Y(a+=e*i,0,n)||(t.round=++u,a=s?0:n,f=!0,t.yoyo&&(t.rate=-1*(t.rate||0)),a=t.rate<0?n:0),t.time=a,t.round=u,f&&o===u?nt(t,0,r):et(t,0,r)},update:et,rate:(t,e,r)=>{t.rate=e||1,et(t,0,r)},time:(t,e,r)=>{const n=+e;t.time=isFinite(n)?n:t.rate<0?t.duration:0,et(t,0,r)}};function ht(t){const e=dt[t];if(!e)throw new Error("not found");return e.state}function pt(t,e,r){const n=gt[t],o=dt[e];if(!n||!o)throw new Error("not found");const i={events:[],needUpdate:[],trigger:vt,dirty:mt},a=o.state;n(a,r,i),A(i.events,t=>{const e=o.subs[t];e&&A(e,t=>{t(a.time)})}),i.destroyed?delete dt[e]:i.needUpdate.length&&(a.state!==l?function(t,e){const r=t.state;switch(A(t.players,t=>t.cancel()),t.players=h,r){case d:ot(t,h,e);break;case g:it(t,h,e)}}(a,i):ut(a),A(lt,t=>{t(o)}))}function vt(t){k(this.events,t)}function mt(t){k(this.needUpdate,t)}"undefined"!=typeof window&&(window.just_devtools={dispatch:pt,subscribe(t){k(lt,t)},unsubscribe(t){y(lt,t)}});const yt={get state(){return ht(this.id).state},get duration(){return ht(this.id).duration},get currentTime(){return ht(this.id).time},set currentTime(t){pt("time",this.id,t)},get playbackRate(){return ht(this.id).rate},set playbackRate(t){pt("rate",this.id,t)},add(t){return pt("append",this.id,t),this},animate(t){return pt("append",this.id,t),this},fromTo(t,e,r){return A(r,r=>{r.to=e,r.from=t}),pt("insert",this.id,r),this},cancel(){return pt("cancel",this.id),this},destroy(){pt("destroy",this.id)},finish(){return pt("finish",this.id),this},on(t,e){return function(t,e,r){const n=dt[t];n&&k(n.subs[e]=n.subs[e]||[],r)}(this.id,t,e),this},once(t,e){const r=this;return r.on(t,function n(o){r.off(t,n),e(o)}),r},off(t,e){return function(t,e,r){const n=dt[t];n&&y(n.subs[e],r)}(this.id,t,e),this},pause(){return pt("pause",this.id),this},play(t){return pt("play",this.id,t),this},reverse(){return pt("reverse",this.id),this},seek(t){return pt("time",this.id,t),this},sequence(t){return A(t,t=>pt("append",this.id,t)),this},set(t){return pt("set",this.id,t),this}};Math.PI;var wt=function(t,e,r){return 3*t*(1-r)*(1-r)*r+3*e*(1-r)*r*r+r*r*r},bt=/([a-z])[- ]([a-z])/gi,Ct=/^([a-z-]+)\(([^\)]+)\)$/i,kt={ease:"cubic-bezier(.25,.1,.25,1)",easeIn:"cubic-bezier(.42,0,1,1)",easeOut:"cubic-bezier(0,0,.58,1)",easeInOut:"cubic-bezier(.42,0,.58,1)",stepStart:"steps(1,1)",stepEnd:"steps(1,0)",linear:"cubic-bezier(0,0,1,1)"},Bt=function(t,e,r){return e+r.toUpperCase()},At=Math.abs;function Mt(t){const e=[];return function(){const r=arguments;for(var n=0,o=e.length;n=1?1:n*r+t-(n*r+t)%r}}(+i[1],i[2]);if("cubic-bezier"===a)return e=+i[1],r=+i[2],n=+i[3],o=+i[4],e<0||e>1||n<0||n>1?function(t){return t}:function(t){if(0===t||1===t)return t;var i=0,a=1,u=19;do{var s=.5*(i+a),f=wt(e,n,s);if(At(t-f)<1e-4)return wt(r,o,s);fMt(t));function St(t,e,r){return t+(e-t)*r}function Lt(t,e,r){return r<.5?t:e}function Tt(t){return t.replace(/([A-Z])/g,t=>"-"+t[0].toLowerCase())}function Dt(t){return t.split(",")}const It=0,$t=1,zt=2,qt=3,Pt=/^\-\-[a-z0-9\-]+$/i,Et=["viewBox"],Ft=["viewBox"];function jt(t,e){return f(t)?Pt.test(e)?qt:void 0===t[e]||v(Et,e)?v(Ft,e)?$t:zt:It:It}function Qt(t,e){const r=jt(t,e);return r===qt?function(t,e){return()=>t.style.getPropertyValue(e)}(t,e):r===$t?function(t,e){return()=>t.getAttribute(e)}(t,e):r===zt?function(t,r){const n=Tt(e);return()=>t.getAttribute(n)}(t):function(t,e){return()=>t[e]}(t,e)}function Yt(t){return function(t){const e=Object.create(yt);return(t=t||{}).id=t.id||r(),e.id=t.id,function(t){dt[t.id]={state:function(t){const e={};if(t.references)for(var r in t.references)e["@"+r]=t.references[r];return{configs:[],cursor:0,duration:0,id:t.id,players:h,rate:1,refs:e,repeat:h,round:h,state:l,time:h,yoyo:!1}}(t),subs:{}}}(t),e}().add(t)}X({name:"props",animate(t){const{target:e,prop:r}=t,n=function(t,e){const r=e.map(e=>e.offset*t);return A(e,t=>{const e=!o(t.interpolate);t.simpleFn=e,t.interpolate=e?i(t.value)?St:Lt:xt(t.interpolate)}),function(n){const o=t*n,i=function(t,e){const r=t.length;for(let n=0;ne)return n;return r-1}(r,o),a=i?i-1:0,u=r[i],s=r[a],f=e[a],c=(o-s)/(u-s),l=f.easing?Rt(f.easing)(c):c;return f.simpleFn?f.interpolate(f.value,e[i].value,l):f.interpolate(f.value,e[i].value)(l)}}(t.to-t.from,t.keyframes),a=function(t,e){const r=jt(t,e);return r===qt?function(t,e){return r=>t.style.setProperty(e,r?r+"":"")}(t,e):r===$t?function(t,e){return r=>t.setAttribute(e,r)}(t,e):r===zt?function(t,r){const n=Tt(e);return e=>t.setAttribute(n,e)}(t):function(t,e){return r=>t[e]=r}(t,e)}(e,r),u=Qt(e,r);let s=h;return{cancel(){s!==h&&a(s),s=h},update(t,e,r){s===h&&(s=u()),a(n(t))}}},getValue:(t,e)=>Qt(t,e)()});const Ot=Dt("rotateX,rotateY,rotateZ,rotate"),Xt=Dt("scaleX,scaleY,scaleZ,scale"),Wt=Dt("perspective,x,y,z"),Ht=Ot.concat(Xt,Wt),Nt={x:"translateX",y:"translateY",z:"translateZ"},Gt=Dt("backgroundSize,border,borderBottom,borderBottomLeftRadius,borderBottomRightRadius,borderBottomWidth,borderLeft,borderLeftWidth,borderRadius,borderRight,borderRightWidth,borderTop,borderTopLeftRadius,borderTopRightRadius,borderTopWidth,borderWidth,bottom,columnGap,columnRuleWidth,columnWidth,columns,flexBasis,font,fontSize,gridColumnGap,gridGap,gridRowGap,height,left,letterSpacing,lineHeight,margin,marginBottom,marginLeft,marginRight,marginTop,maskSize,maxHeight,maxWidth,minHeight,minWidth,outline,outlineOffset,outlineWidth,padding,paddingBottom,paddingLeft,paddingRight,paddingTop,perspective,right,shapeMargin,tabSize,top,width,wordSpacing");function Ut(t){const e={unit:h,value:h};if(!n(t))return e;if(Number(t))return e.value=+t,e;const r=p.exec(t);return r&&(e.unit=r[2]||h,e.value=r[1]?parseFloat(r[1]):h),e}const Vt={name:"web",animate:function(t){const{keyframes:e,prop:r,from:n,to:o,target:i}=t,a=o-n,u=Mt(()=>{const t=e.map(({offset:t,value:e,easing:n})=>({offset:t,[r]:e,easing:n})),n=i.animate(t,{duration:a,fill:"both"});return n.pause(),n});return{cancel(){u().cancel()},update(t,e,r){const n=u(),o=a*t;if(E(n.currentTime-o)>1&&(n.currentTime=o),r&&n.playbackRate!==e){const t=n.currentTime;t<1?n.currentTime=1:t>=a-1&&(n.currentTime=a-1),n.playbackRate=e}r&&!("running"===n.playState||"finish"===n.playState)&&!(e<0&&o<17)&&!(e>=0&&o>a-17)&&n.play(),!r&&("running"===n.playState||"pending"===n.playState)&&n.pause()}}},getValue:(t,e)=>getComputedStyle(t)[e],onWillAnimate(t,e,r){f(t.target)&&(function(t){for(var e in t)if(v(Gt,e)){var r=t[e];for(var o in r){var a=r[o];n(a)&&i(a.value)&&(a.value+="px")}}}(e),function(t,e,r){const o=t.propNames.filter(t=>v(Ht,t));if(!o.length)return;if(v(t.propNames,"transform"))throw new Error("transform + shorthand is not allowed");const i=[],a={};A(o,t=>{const r=e[t];r&&A(r,t=>{a[t.offset]=t.easing,k(i,t.offset)})}),i.sort();const u=i.map(t=>{const r={};return A(o,n=>{const o=m(e[n],e=>e.offset===t);r[n]=o?o.value:h}),{offset:t,easing:a[t],values:r}}),s=u.length;for(let t=s-1;t>-1;--t){const e=u[t];for(const r in e.values){if(n(e.values[r]))continue;let o=h;for(var f=t-1;f>-1;f--)if(n(u[f].values[r])){o=f;break}let a=h;for(var c=t+1;c{e[t]=h});const t=[];A(u,e=>{let r=h;for(var n in e.values){const t=Ut(e.values[n]);t.value!==h&&(t.unit||(t.unit=v(Wt,n)?"px":v(Ot,n)?"deg":""),r=(r?r+" ":"")+(Nt[n]||n)+"("+t.value+t.unit+")")}t.push({offset:e.offset,value:r,easing:e.easing,interpolate:h})}),e.transform=t,r.transform="web"}}(t,e,r))}};var Zt,_t=(function(t,e){var r,n=function(){var t=function(t,e){var r=t,n=o[e],a=null,h=0,p=null,m=[],y={},w=function(t,e){a=function(t){for(var e=new Array(t),r=0;r=7&&B(t),null==p&&(p=R(r,n,m)),M(p,e)},b=function(t,e){for(var r=-1;r<=7;r+=1)if(!(t+r<=-1||h<=t+r))for(var n=-1;n<=7;n+=1)e+n<=-1||h<=e+n||(a[t+r][e+n]=0<=r&&r<=6&&(0==n||6==n)||0<=n&&n<=6&&(0==r||6==r)||2<=r&&r<=4&&2<=n&&n<=4)},C=function(){for(var t=8;t>n&1);a[Math.floor(n/3)][n%3+h-8-3]=o}for(n=0;n<18;n+=1)o=!t&&1==(e>>n&1),a[n%3+h-8-3][Math.floor(n/3)]=o},A=function(t,e){for(var r=n<<3|e,o=i.getBCHTypeInfo(r),u=0;u<15;u+=1){var s=!t&&1==(o>>u&1);u<6?a[u][8]=s:u<8?a[u+1][8]=s:a[h-15+u][8]=s}for(u=0;u<15;u+=1)s=!t&&1==(o>>u&1),u<8?a[8][h-u-1]=s:u<9?a[8][15-u-1+1]=s:a[8][15-u-1]=s;a[h-8][8]=!t},M=function(t,e){for(var r=-1,n=h-1,o=7,u=0,s=i.getMaskFunction(e),f=h-1;f>0;f-=2)for(6==f&&(f-=1);;){for(var c=0;c<2;c+=1)if(null==a[n][f-c]){var l=!1;u>>o&1)),s(n,f-c)&&(l=!l),a[n][f-c]=l,-1==(o-=1)&&(u+=1,o=7)}if((n+=r)<0||h<=n){n-=r,r=-r;break}}},R=function(t,e,r){for(var n=s.getRSBlocks(t,e),o=f(),a=0;a8*l)throw"code length overflow. ("+o.getLengthInBits()+">"+8*l+")";for(o.getLengthInBits()+4<=8*l&&o.put(0,4);o.getLengthInBits()%8!=0;)o.putBit(!1);for(;!(o.getLengthInBits()>=8*l||(o.put(236,8),o.getLengthInBits()>=8*l));)o.put(17,8);return function(t,e){for(var r=0,n=0,o=0,a=new Array(e.length),s=new Array(e.length),f=0;f=0?h.getAt(p):0}}var v=0;for(d=0;dn)&&(t=n,e=r)}return e}())},y.createTableTag=function(t,e){t=t||2;var r="";r+='',r+="";for(var n=0;n";for(var o=0;o';r+=""}return(r+="")+"
"},y.createSvgTag=function(t,e){t=t||2,e=void 0===e?4*t:e;var r,n,o,i,a=y.getModuleCount()*t+2*e,u="";for(i="l"+t+",0 0,"+t+" -"+t+",0 0,-"+t+"z ",u+='')+""},y.createDataURL=function(t,e){t=t||2,e=void 0===e?4*t:e;var r=y.getModuleCount()*t+2*e,n=e,o=r-e;return v(r,r,function(e,r){if(n<=e&&e"},y.renderTo2dContext=function(t,e){e=e||2;for(var r=y.getModuleCount(),n=0;n>>8),e.push(255&a)):e.push(n)}}return e}};var e,r,n,o={L:1,M:0,Q:3,H:2},i=(e=[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]],n=function(t){for(var e=0;0!=t;)e+=1,t>>>=1;return e},(r={}).getBCHTypeInfo=function(t){for(var e=t<<10;n(e)-n(1335)>=0;)e^=1335<=0;)e^=7973<5&&(r+=3+i-5)}for(n=0;n=256;)e-=255;return t[e]}}}();function u(t,e){if(void 0===t.length)throw t.length+"/"+e;var r=function(){for(var r=0;r>>7-e%8&1)},put:function(t,e){for(var n=0;n>>e-n-1&1))},getLengthInBits:function(){return e},putBit:function(r){var n=Math.floor(e/8);t.length<=n&&t.push(0),r&&(t[n]|=128>>>e%8),e+=1}};return r},c=function(t){var e=t,r={getMode:function(){return 1},getLength:function(t){return e.length},write:function(t){for(var r=e,o=0;o+2>>8&255)+(255&o),t.put(o,13),r+=2}if(r>>8)},writeBytes:function(t,r,n){r=r||0,n=n||t.length;for(var o=0;o0&&(e+=","),e+=t[r];return e+"]"}};return e},p=function(t){var e=t,r=0,n=0,o=0,i={read:function(){for(;o<8;){if(r>=e.length){if(0==o)return-1;throw"unexpected end of file./"+o}var t=e.charAt(r);if(r+=1,"="==t)return o=0,-1;t.match(/^\s$/)||(n=n<<6|a(t.charCodeAt(0)),o+=6)}var i=n>>>o-8&255;return o-=8,i}},a=function(t){if(65<=t&&t<=90)return t-65;if(97<=t&&t<=122)return t-97+26;if(48<=t&&t<=57)return t-48+52;if(43==t)return 62;if(47==t)return 63;throw"c:"+t};return i},v=function(t,e,r){for(var n=function(t,e){var r=t,n=e,o=new Array(t*e),i={setPixel:function(t,e,n){o[e*r+t]=n},write:function(t){t.writeString("GIF87a"),t.writeShort(r),t.writeShort(n),t.writeByte(128),t.writeByte(0),t.writeByte(0),t.writeByte(0),t.writeByte(0),t.writeByte(0),t.writeByte(255),t.writeByte(255),t.writeByte(255),t.writeString(","),t.writeShort(0),t.writeShort(0),t.writeShort(r),t.writeShort(n),t.writeByte(0);var e=a(2);t.writeByte(2);for(var o=0;e.length-o>255;)t.writeByte(255),t.writeBytes(e,o,255),o+=255;t.writeByte(e.length-o),t.writeBytes(e,o,e.length-o),t.writeByte(0),t.writeString(";")}},a=function(t){for(var e=1<>>e!=0)throw"length over";for(;f+e>=8;)s.writeByte(255&(t<>>=8-f,c=0,f=0;c|=t<0&&s.writeByte(c)}});d.write(e,n);var g=0,p=String.fromCharCode(o[g]);for(g+=1;g=6;)d(u>>>s-6),s-=6},l.flush=function(){if(s>0&&(d(u<<6-s),u=0,s=0),f%3!=0)for(var t=3-f%3,e=0;e>6,128|63&n):n<55296||n>=57344?e.push(224|n>>12,128|n>>6&63,128|63&n):(r++,n=65536+((1023&n)<<10|1023&t.charCodeAt(r)),e.push(240|n>>18,128|n>>12&63,128|n>>6&63,128|63&n))}return e}(t)},r=function(){return n},t.exports=r()}(Zt={exports:{}}),Zt.exports);const Jt=(t,e,r,n)=>Math.hypot(r-t,n-e);var Kt,te;!function(t){t[t.Left=0]="Left",t[t.Middle=1]="Middle",t[t.Right=2]="Right"}(Kt||(Kt={})),function(t){t[t.Top=0]="Top",t[t.Center=1]="Center",t[t.Bottom=2]="Bottom"}(te||(te={}));const ee=t=>(e,r,n,o)=>({adjustedX:n===Kt.Left?e:n===Kt.Right?e+t:e+t/2,adjustedY:o===te.Top?r:o===te.Bottom?r+t:r+t/2}),re=ee(7),ne=ee(3);function oe(t,e,r,n,o){return te?o:n}const ie=(t,e,r,n)=>{const o=r/2,i=oe(t,o,Kt.Right,Kt.Middle,Kt.Left),a=oe(e,o,te.Bottom,te.Center,te.Top);return n===ue.PositionCenter?ne(t,e,i,a):n===ue.PositionRing?re(t,e,i,a):{adjustedX:t,adjustedY:e}},ae=(t,e)=>t.map(t=>({offset:t.offset,value:e(t.value)}));var ue,se;!function(t){t.Module="module",t.PositionRing="position-ring",t.PositionCenter="position-center",t.Icon="icon"}(ue||(ue={})),function(t){t.FadeInTopDown="FadeInTopDown",t.FadeInCenterOut="FadeInCenterOut",t.RadialRipple="RadialRipple",t.RadialRippleIn="RadialRippleIn",t.MaterializeIn="MaterializeIn"}(se||(se={}));const fe=(t,e,r,n,o)=>({targets:t,from:20*r,duration:300,web:{opacity:[0,1]}}),ce=(t,e,r,n,o)=>{const{adjustedX:i,adjustedY:a}=ie(e,r,n,o),u=n/2;return{targets:t,from:20*Jt(i,a,u,u),duration:200,web:{opacity:[0,1]}}},le=(t,e,r,n,o)=>({targets:t,from:o===ue.Module?200*Math.random():200,duration:200,web:{opacity:[0,1]}}),de=((t,e,r)=>{const n=.8/r[r.length-1].time;return r.map(({time:t,amplitude:e})=>({offset:.2+t*n,value:e}))})(0,0,((t,e,r)=>{const n=50-Math.pow(3,2);if(n<0)throw new Error("This method only supports underdamped oscillation.");const o=Math.sqrt(n),i=t=>(t=>5*Math.pow(Math.E,-3*t))(t)*Math.cos(o*t+0),a=t=>(Math.atan(-3/o)+t*Math.PI-0)/o,u=[];u.push({time:0,amplitude:i(0)});for(var s=0;Math.abs(u[u.length-1].amplitude)>.01;s++)a(s)>=0&&u.push({time:a(s),amplitude:i(a(s))});return u})()),ge=(t,e,r,n,o)=>{const{adjustedX:i,adjustedY:a}=ie(e,r,n,o),u=n/2;return{targets:t,from:7*Jt(i,a,u,u),easing:"cubic-bezier(0.445, 0.050, 0.550, 0.950)",duration:1e3,web:{scale:[...o===ue.Icon?[{offset:0,value:1},{offset:.1,value:.7},{offset:.2,value:1}]:[{offset:0,value:1}],...ae(de,t=>1+t/5*.1),1]}}},he=(t,e,r,n,o)=>{const{adjustedX:i,adjustedY:a}=ie(e,r,n,o),u=n/2;return{targets:t,from:7*Jt(i,a,u,u),easing:"cubic-bezier(0.445, 0.050, 0.550, 0.950)",duration:1e3,web:{scale:[...o===ue.Icon?[{offset:0,value:1},{offset:.1,value:.7},{offset:.2,value:1}]:[{offset:0,value:0}],...ae(de,t=>1+t/5*.1),1],opacity:[{offset:0,value:0},{offset:.05,value:1}]}}},pe=t=>{switch(t){case se.FadeInTopDown:return fe;case se.FadeInCenterOut:return ce;case se.RadialRipple:return ge;case se.RadialRippleIn:return he;case se.MaterializeIn:return le;default:throw new Error(`${t} is not a valid AnimationPreset.`)}};X(Vt);class ve{constructor(){this.contents="",this.protocol="",this.moduleColor="#000",this.positionRingColor="#000",this.positionCenterColor="#000",this.maskXToYRatio=1,this.squares=!1}componentDidLoad(){this.updateQR()}componentDidUpdate(){this.codeRendered.emit()}updateQR(){const t=this.qrCodeElement===this.qrCodeElement.shadowRoot,e=this.qrCodeElement.shadowRoot.querySelector("slot"),r=t?!!this.qrCodeElement.querySelector("[slot]"):!!e&&e.assignedNodes().length>0;this.data=this.generateQRCodeSVG(this.contents,r)}animateQRCode(t){this.executeAnimation("string"==typeof t?pe(t):t)}getModuleCount(){return this.moduleCount}executeAnimation(t){const e=Array.from(this.qrCodeElement.shadowRoot.querySelectorAll(".module")),r=Array.from(this.qrCodeElement.shadowRoot.querySelectorAll(".position-ring")),n=Array.from(this.qrCodeElement.shadowRoot.querySelectorAll(".position-center")),o=Array.from(this.qrCodeElement.shadowRoot.querySelectorAll("#icon-wrapper")),i=(t,e)=>t.map(t=>({element:t,entityType:e}));Yt([...i(e,ue.Module),...i(r,ue.PositionRing),...i(n,ue.PositionCenter),...i(o,ue.Icon)].map(({element:t,entityType:e})=>({element:t,positionX:parseInt(t.dataset.column,10),positionY:parseInt(t.dataset.row,10),entityType:e})).map(e=>t(e.element,e.positionX,e.positionY,this.moduleCount,e.entityType))).play()}generateQRCodeSVG(t,e){const r=_t(0,"H");r.addData(t),r.make(),this.moduleCount=r.getModuleCount();const n=this.moduleCount+8,o=n/2;return`\n \n \n ${this.squares?void 0:function(t,e,r,n,o){return`\n ${i(4,4,4,r,n,o)}\n ${i(t-7+4,4,4,r,n,o)}\n ${i(4,t-7+4,4,r,n,o)}\n `}(this.moduleCount,0,this.positionRingColor,this.positionCenterColor,o)}\n ${function(t,e,r,n,o,i,s,f){let c="";for(let r=0;r\n `:`\n `}}return c}(r,this.moduleCount,0,e,this.maskXToYRatio,this.squares,this.moduleColor,o)}\n `;function i(t,e,r,n,o,i){return`\n \n \n `}function a(t,e,r){return t<=7?e<=7||e>=r-7:e<=7&&t>=r-7}function u(t,e,r,n,o){if(!n)return!1;const i=r/2,a=Math.floor(r*Math.sqrt(.1)/2),u=a*o,s=a/o;return t>=i-s&&t<=i+s&&e>=i-u&&e<=i+u}}render(){return t("div",{id:"qr-container"},t("div",{id:"icon-container",style:this.squares?{display:"none",visibility:"hidden"}:{}},t("div",{id:"icon-wrapper",style:{width:`${18*this.maskXToYRatio}%`},"data-column":this.moduleCount/2,"data-row":this.moduleCount/2},t("slot",{name:"icon"}))),t("div",{innerHTML:this.data}))}static get is(){return"qr-code"}static get encapsulation(){return"shadow"}static get properties(){return{animateQRCode:{method:!0},contents:{type:String,attr:"contents",watchCallbacks:["updateQR"]},data:{state:!0},getModuleCount:{method:!0},maskXToYRatio:{type:Number,attr:"mask-x-to-y-ratio",watchCallbacks:["updateQR"]},moduleColor:{type:String,attr:"module-color",watchCallbacks:["updateQR"]},moduleCount:{state:!0},positionCenterColor:{type:String,attr:"position-center-color",watchCallbacks:["updateQR"]},positionRingColor:{type:String,attr:"position-ring-color",watchCallbacks:["updateQR"]},protocol:{type:String,attr:"protocol",watchCallbacks:["updateQR"]},qrCodeElement:{elementRef:!0},squares:{type:Boolean,attr:"squares",watchCallbacks:["updateQR"]}}}static get events(){return[{name:"codeRendered",method:"codeRendered",bubbles:!0,cancelable:!0,composed:!0}]}static get style(){return"[data-qr-code-host]{display:block;contain:content}#qr-container[data-qr-code]{position:relative}#icon-container[data-qr-code]{position:absolute;width:100%;height:100%;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}"}}export{ve as QrCode}; \ No newline at end of file diff --git a/assets/vendor/qr-code/qr-code/qr-code.global.js b/assets/vendor/qr-code/qr-code/qr-code.global.js new file mode 100644 index 0000000..322d2e5 --- /dev/null +++ b/assets/vendor/qr-code/qr-code/qr-code.global.js @@ -0,0 +1,4 @@ +/*! Built with http://stenciljs.com */ +(function(namespace,resourcesUrl){"use strict"; + +})("QrCode"); \ No newline at end of file diff --git a/assets/vendor/qr-code/qr-code/qr-code.orxjfzvr.js b/assets/vendor/qr-code/qr-code/qr-code.orxjfzvr.js new file mode 100644 index 0000000..359759f --- /dev/null +++ b/assets/vendor/qr-code/qr-code/qr-code.orxjfzvr.js @@ -0,0 +1,5 @@ +/*! Built with http://stenciljs.com */ +(function(Context,namespace,hydratedCssClass,resourcesUrl,s){"use strict"; +s=document.querySelector("script[data-namespace='qr-code']");if(s){resourcesUrl=s.getAttribute('data-resources-url');} +(function(t,e,n,o){"use strict";function i(t,e){const n=`data-${t.t}`;return e&&e!==E?`${n}-${e}`:n}function r(t){return{e:t[0],n:t[1],o:!!t[2],i:!!t[3],r:!!t[4]}}function s(t,e){if(R(e)&&"object"!=typeof e&&"function"!=typeof e){if(t===Boolean||3===t)return"false"!==e&&(""===e||!!e);if(t===Number||4===t)return parseFloat(e);if(t===String||2===t)return e.toString()}return e}function c(t,e,n,o){const i=t.s.get(e);i&&((o=i["s-ld"]||i.$activeLoading)&&((n=o.indexOf(e))>-1&&o.splice(n,1),o.length||(i["s-init"]&&i["s-init"](),i.$initLoad&&i.$initLoad())),t.s.delete(e))}function l(t,e){let n,o,i=null,r=!1,s=!1;for(var c=arguments.length;c-- >2;)I.push(arguments[c]);for(;I.length>0;){let e=I.pop();if(e&&void 0!==e.pop)for(c=e.length;c--;)I.push(e[c]);else"boolean"==typeof e&&(e=null),(s="function"!=typeof t)&&(null==e?e="":"number"==typeof e?e=String(e):"string"!=typeof e&&(s=!1)),s&&r?i[i.length-1].c+=e:null===i?i=[s?{c:e}:e]:i.push(s?{c:e}:e),r=s}if(null!=e){if(e.className&&(e.class=e.className),"object"==typeof e.class){for(c in e.class)e.class[c]&&I.push(c);e.class=I.join(" "),I.length=0}null!=e.key&&(n=e.key),null!=e.name&&(o=e.name)}return"function"==typeof t?t(Object.assign({},e,{children:i}),B):{l:t,f:i,c:void 0,u:e,a:n,d:o,p:void 0,m:!1}}function f(t,e,n,o){e.split(" ").forEach(e=>{t[e]=!0,n&&(t[`${e}-${n}`]=!0,o&&(t[`${e}-${n}-${o}`]=t[`${e}-${o}`]=!0))})}function u(t,e){t.b.has(e)||(t.b.set(e,!0),t.v?t.queue.write(()=>a(t,e)):t.queue.tick(()=>a(t,e)))}function a(t,e,n,o,i,r){if(t.b.delete(e),!t.y.has(e)){if(o=t.g.get(e),n=!o){if((i=t.s.get(e))&&i.$rendered&&(i["s-rn"]=!0),i&&!i["s-rn"])return(i["s-rc"]=i["s-rc"]||[]).push(()=>{a(t,e)}),void(i.$onRender=i["s-rc"]);o=function s(t,e,n,o,i,r,c){try{(function l(t,e,n,o,i,r,s){for(s in t.w.set(o,n),t.M.has(n)||t.M.set(n,{}),(r=Object.assign({color:{type:String}},e.properties)).mode={type:String},r)p(t,r[s],n,o,s,i)})(t,i=t.j(e).k,e,o=new i,n),function f(t,e,n){if(e){const o=t.w.get(n);e.forEach(e=>{n[e.method]={emit:n=>{t.C(o,e.name,{bubbles:e.bubbles,composed:e.composed,cancelable:e.cancelable,detail:n})}}})}}(t,i.events,o);try{if(r=t.O.get(e)){for(c=0;cd(t,e,o,n)):d(t,e,o,n)}}function d(t,e,n,o){(function i(t,e,n,o){try{const i=e.k.host,r=e.k.encapsulation,s="shadow"===r&&t.P.W;let c,u;if(c=function i(t,e,n){return t&&Object.keys(t).forEach(o=>{t[o].reflectToAttr&&((n=n||{})[o]=e[o])}),n}(e.k.properties,o),u=s?n.shadowRoot:n,!n["s-rn"]){t.T(t,t.P,e,n);const i=n["s-sc"];i&&(t.P.A(n,function r(t){return`${t}-host`}(i),""),o.render||t.P.A(n,function s(t){return`${t}-slot`}(i),""))}if(o.render||o.hostData||i||c){t.S=!0;const a=o.render&&o.render();let d;if((d=o.hostData&&o.hostData())&&e.R){const t=Object.keys(d).reduce((t,n)=>{return e.R[n]?t.concat(n):e.R[D(n)]?t.concat(D(n)):t},[]);if(t.length>0)throw new Error("The following keys were attempted to be set with hostData() from the "+`${e.t} component: ${t.join(", ")}. `+"If you would like to modify these please set @Prop({ mutable: true, reflectToAttr: true}) on the @Prop() decorator.")}c&&(d=d?Object.assign(d,c):c),t.S=!1,i&&(d=function c(t,e,n){return t=t||{},Object.keys(e).forEach(o=>{"theme"===o?f(t.class=t.class||{},e[o],n.mode,n.color):"class"===o?f(t[o]=t[o]||{},e[o]):t[o]=e[o]}),t}(d,i,o));const p=t.L.get(n)||{};p.p=u;const m=l(null,d,a);m.m=!0,t.L.set(n,t.render(n,p,m,s,r))}t.D&&t.D.q(n),n["s-rn"]=!0,n.$onRender&&(n["s-rc"]=n.$onRender),n["s-rc"]&&(n["s-rc"].forEach(t=>t()),n["s-rc"]=null)}catch(e){t.S=!1,t.N(e,8,n,!0)}})(t,t.j(e),e,n);try{o?e["s-init"]():(n.componentDidUpdate&&n.componentDidUpdate(),k(t.L.get(e))),e["s-hmr-load"]&&e["s-hmr-load"]()}catch(n){t.N(n,6,e,!0)}}function p(t,e,n,o,i,r,c,l){if(e.type||e.state){const f=t.M.get(n);e.state||(!e.attr||void 0!==f[i]&&""!==f[i]||(c=r&&r.I)&&R(l=c[e.attr])&&(f[i]=s(e.type,l)),n.hasOwnProperty(i)&&(void 0===f[i]&&(f[i]=s(e.type,n[i])),"mode"!==i&&delete n[i])),o.hasOwnProperty(i)&&void 0===f[i]&&(f[i]=o[i]),e.watchCallbacks&&(f[H+i]=e.watchCallbacks.slice()),b(o,i,function f(e){return(e=t.M.get(t.w.get(this)))&&e[i]},function u(n,o){(o=t.w.get(this))&&(e.state||e.mutable)&&m(t,o,i,n)})}else if(e.elementRef)h(o,i,n);else if(e.method)h(n,i,o[i].bind(o));else if(e.context){const r=t.B(e.context);void 0!==r&&h(o,i,r.H&&r.H(n)||r)}else e.connect&&h(o,i,t.F(e.connect))}function m(t,e,n,o,i,r,s){(i=t.M.get(e))||t.M.set(e,i={});const c=i[n];if(o!==c&&(i[n]=o,r=t.g.get(e))){if(s=i[H+n])for(let t=0;t!n.includes(t)),s=$(e.className).filter(t=>!r.includes(t)),c=n.filter(e=>!t.includes(e)&&!s.includes(e));s.push(...c),e.className=s.join(" ")}}function $(t){return null==t||""===t?[]:t.trim().split(/\s+/)}function g(t,e,n){try{t[e]=n}catch(t){}}function w(t,e,n,o,i){const r=11===n.p.nodeType&&n.p.host?n.p.host:n.p,s=e&&e.u||A,c=n.u||A;for(i in s)c&&null!=c[i]||null==s[i]||y(t,r,i,s[i],void 0,o,n.m);for(i in c)i in s&&c[i]===("value"===i||"checked"===i?r[i]:s[i])||y(t,r,i,s[i],c[i],o,n.m)}function M(t,e){function n(i,r,s,c,l,f,p,v,y){if(v=r.f[s],u||(m=!0,"slot"===v.l&&(d&&e.A(c,d+"-slot",""),v.f?v.X=!0:v.Y=!0)),R(v.c))v.p=e._(v.c);else if(v.Y)v.p=e._("");else{if(f=v.p=z||"svg"===v.l?e.tt("http://www.w3.org/2000/svg",v.l):e.et(v.X?"slot-fb":v.l),z="svg"===v.l||"foreignObject"!==v.l&&z,w(t,null,v,z),R(d)&&f["s-si"]!==d&&e.A(f,f["s-si"]=d,""),R(a)&&e.A(f,T,a+"."+s+(function t(e){if(e)for(var n=0;n=0;r--)(s=f[r])["s-hn"]!==h&&s["s-ol"]&&(e.st(s),e.ct(l(s),s,c(s)),e.st(s["s-ol"]),s["s-ol"]=null,m=!0),i&&o(s,i);t.it=!1}function i(t,o,i,r,s,l,f,u){const a=t["s-cr"]||t.$defaultHolder;for((f=a&&e.lt(a)||t).shadowRoot&&e.ft(f)===h&&(f=f.shadowRoot);s<=l;++s)r[s]&&(u=R(r[s].c)?e._(r[s].c):n(null,i,s,t))&&(r[s].p=u,e.ct(f,u,c(o)))}function r(t,n,i,r){for(;n<=i;++n)R(t[n])&&(r=t[n].p,p=!0,r["s-ol"]?e.st(r["s-ol"]):o(r,!0),e.st(r))}function s(t,e){return t.l===e.l&&t.a===e.a&&("slot"!==t.l||t.d===e.d)}function c(t){return t&&t["s-ol"]?t["s-ol"]:t}function l(t){return e.lt(t["s-ol"]?t["s-ol"]:t)}const f=[];let u,a,d,p,m,h,b;return function v(y,$,g,M,k,j,C,O,N,x,W,T){if(h=e.ft(y),b=y["s-cr"],u=M,a="shadow"!==k?j:null,d=y["s-sc"],m=p=!1,function f(u,a,d){const p=a.p=u.p,m=u.f,h=a.f;z=a.p&&R(e.ut(a.p))&&void 0!==a.p.ownerSVGElement,z="svg"===a.l||"foreignObject"!==a.l&&z,R(a.c)?(d=p["s-cr"]||p.$defaultHolder)?e.dt(e.lt(d),a.c):u.c!==a.c&&e.dt(p,a.c):("slot"!==a.l&&w(t,u,a,z),R(m)&&R(h)?function b(t,u,a,d,p,m,h,v){let y=0,$=0,g=u.length-1,w=u[0],M=u[g],k=d.length-1,j=d[0],C=d[k];for(;y<=g&&$<=k;)if(null==w)w=u[++y];else if(null==M)M=u[--g];else if(null==j)j=d[++$];else if(null==C)C=d[--k];else if(s(w,j))f(w,j),w=u[++y],j=d[++$];else if(s(M,C))f(M,C),M=u[--g],C=d[--k];else if(s(w,C))"slot"!==w.l&&"slot"!==C.l||o(e.lt(w.p)),f(w,C),e.ct(t,w.p,e.pt(M.p)),w=u[++y],C=d[--k];else if(s(M,j))"slot"!==w.l&&"slot"!==C.l||o(e.lt(M.p)),f(M,j),e.ct(t,M.p,w.p),M=u[--g],j=d[++$];else{for(p=null,m=y;m<=g;++m)if(u[m]&&R(u[m].a)&&u[m].a===j.a){p=m;break}R(p)?((v=u[p]).l!==j.l?h=n(u&&u[$],a,p,t):(f(v,j),u[p]=void 0,h=v.p),j=d[++$]):(h=n(u&&u[$],a,$,t),j=d[++$]),h&&e.ct(l(w.p),h,c(w.p))}y>g?i(t,null==d[k+1]?null:d[k+1].p,a,d,$,k):$>k&&r(u,y,g)}(p,m,a,h):R(h)?(R(u.c)&&e.dt(p,""),i(p,null,a,h,0,h.length-1)):R(m)&&r(m,0,m.length-1)),z&&"svg"===a.l&&(z=!1)}($,g),R(a)&&e.A($.p,P,a),m){for(function t(n,o,i,r,s,c,l,u,a,d){for(s=0,c=(o=e.rt(n)).length;s=0;l--)(r=u[l])["s-cn"]||r["s-nr"]||r["s-hn"]===i["s-hn"]||((3===(d=e.mt(r))||8===d)&&""===a||1===d&&null===e.ht(r,"slot")&&""===a||1===d&&e.ht(r,"slot")===a)&&(f.some(t=>t.bt===r)||(p=!0,r["s-sn"]=a,f.push({vt:i,bt:r})));1===e.mt(i)&&t(i)}}(g.p),C=0;C{k(t,e)}))}function j(t,e,n,o,i){const r=t.mt(e);let s,c,l,f;if(i&&1===r){(c=t.ht(e,T))&&(l=c.split("."))[0]===o&&((f={}).l=t.ft(f.p=e),n.f||(n.f=[]),n.f[l[1]]=f,n=f,i=""!==l[2]);for(let r=0;r{n.o||t.P.K(e,n.e,function o(t,e,n,i){return o=>{(i=t.g.get(e))?i[n](o):((i=t.O.get(e)||[]).push(n,o),t.O.set(e,i))}}(t,e,n.n),n.r,n.i)})}function O(t,e){const n={nodeName:e},o=t.j(n);if(!o||!o.k)return Promise.resolve(null);const i=o.k,r=function s(t){return Object.keys(t).reduce((e,n)=>{const o=t[n];let i;const r={name:n};if(o.state)i="states",r.wt=o.watchCallbacks||[];else if(o.elementRef)i="elements";else if(o.method)i="methods";else{i="props";let t="any";o.type&&(t=o.type,"function"==typeof o.type&&(t=o.type.name)),r.type=t.toLowerCase(),r.mutable=o.mutable||!1,r.connect=o.connect||"-",r.context=o.connect||"-",r.wt=o.watchCallbacks||[]}return e[i].push(r),e},{Mt:[],kt:[],jt:[],Ct:[]})}(i.properties||{}),c=(o.gt||[]).map(t=>{return{Ot:t.e,capture:t.r,disabled:t.o,passive:t.i,method:t.n}}),l=i.events||[],f=Object.assign({Nt:i.is,xt:o.Wt||"unknown",encapsulation:i.encapsulation||"none"},r,{events:{Pt:l,listeners:c}});return Promise.resolve(f)}function N(t,e,n,o,i){return n.mode||(n.mode=t.Tt(n)),n["s-cr"]||t.ht(n,P)||t.W&&1===e.encapsulation||(n["s-cr"]=t._(""),n["s-cr"]["s-cn"]=!0,t.ct(n,n["s-cr"],t.rt(n)[0])),t.W||1!==e.encapsulation||"shadowRoot"in HTMLElement.prototype||(n.shadowRoot=n),1===e.encapsulation&&t.W&&!n.shadowRoot&&t.Et(n,{mode:"open"}),o={At:n["s-id"],I:{}},e.R&&Object.keys(e.R).forEach(r=>{(i=e.R[r].Q)&&(o.I[i]=t.ht(n,i))}),o}function x(t,e,n,o){n.connectedCallback=function(){(function n(t,e,o){t.St.has(o)||(t.St.set(o,!0),C(t,o)),t.y.delete(o),t.Rt.has(o)||(t.Rt.set(o,!0),o["s-id"]||(o["s-id"]=t.Lt()),function i(t,e,n){for(n=e;n=t.P.ut(n);)if(t.Dt(n)){t.qt.has(e)||(t.s.set(e,n),n.$activeLoading&&(n["s-ld"]=n.$activeLoading),(n["s-ld"]=n["s-ld"]||[]).push(e));break}}(t,o),t.queue.tick(()=>{t.x.set(o,N(t.P,e,o)),t.It(e,o)}))})(t,e,this)},n.attributeChangedCallback=function(t,n,o){(function i(t,e,n,o,r,c,l){if(t&&o!==r)for(c in t)if((l=t[c]).Q&&L(l.Q)===L(n)){e[c]=s(l.Z,r);break}})(e.R,this,t,n,o)},n.disconnectedCallback=function(){(function e(t,n){if(!t.it&&function o(t,e){for(;e;){if(!t.lt(e))return 9!==t.mt(e);e=t.lt(e)}}(t.P,n)){t.y.set(n,!0),c(t,n),k(t.L.get(n),!0),t.P.V(n),t.St.delete(n);{const e=t.g.get(n);e&&e.componentDidUnload&&e.componentDidUnload()}t.D&&t.D.Bt(n),[t.s,t.Ht,t.x].forEach(t=>t.delete(n))}})(t,this)},n["s-init"]=function(){(function e(t,n,o,i,r){if(!t.qt.has(n)&&(i=t.g.get(n))&&!t.y.has(n)&&(!n["s-ld"]||!n["s-ld"].length)){delete n["s-ld"],t.qt.set(n,!0);try{k(t.L.get(n)),(r=t.Ht.get(n))&&(r.forEach(t=>t(n)),t.Ht.delete(n)),i.componentDidLoad&&i.componentDidLoad()}catch(e){t.N(e,4,n)}n.classList.add(o),c(t,n)}})(t,this,o)},n["s-hmr"]=function(n){(function o(t,e,n,i){e.k=null;const r=t.g.get(n);r&&(t.w.delete(r),t.g.delete(n)),t.P.V(n),t.St.delete(n),e.gt=null,n["s-hmr-load"]=(()=>{delete n["s-hmr-load"],function o(t,e,n){t.St.has(n)||(t.St.set(n,!0),e.k&&e.k.listeners&&(e.gt=e.k.listeners.map(t=>{return{n:t.method,e:t.name,r:!!t.capture,i:!!t.passive,o:!!t.disabled}}),C(t,n)))}(t,e,n)}),t.x.set(n,N(t.P,e,n)),t.It(e,n,i)})(t,e,this,n)},n.forceUpdate=function(){u(t,this)},function i(t,e,n){e&&Object.keys(e).forEach(o=>{const i=e[o],r=i.Ft;1===r||2===r?b(n,o,function e(){return(t.M.get(this)||{})[o]},function e(n){m(t,this,o,s(i.Z,n))}):6===r&&h(n,o,q)})}(t,e.R,n)}function W(t,e,n,o){return function(){const i=arguments;return function r(t,e,n){let o=e[n];const i=t.Ut.body;return i?(o||(o=i.querySelector(n)),o||(o=e[n]=t.et(n),t.nt(i,o)),o.componentOnReady()):Promise.resolve()}(t,e,n).then(t=>t[o].apply(t,i))}}const P="data-ssrv",T="data-ssrc",E="$",A={},S={enter:13,escape:27,space:32,tab:9,left:37,up:38,right:39,down:40},R=t=>null!=t,L=t=>t.toLowerCase(),D=t=>L(t).split("-").map(t=>t.charAt(0).toUpperCase()+t.slice(1)).join(""),q=()=>{},I=[],B={getTag:t=>t.l,getChildren:t=>t.f,getText:t=>t.c,getAttributes:t=>t.u,replaceAttributes:(t,e)=>t.u=e},H="wc-",F={allowfullscreen:1,async:1,autofocus:1,autoplay:1,checked:1,controls:1,disabled:1,enabled:1,formnovalidate:1,hidden:1,multiple:1,noresize:1,readonly:1,required:1,selected:1,spellcheck:1},U="http://www.w3.org/1999/xlink";let z=!1;(function Q(t,e,n,o,s,c){function f(t,e){if(!n.customElements.get(t.t)){x(y,a[t.t]=t,e.prototype,c);{const n=e.observedAttributes=[];for(const e in t.R)t.R[e].Q&&n.push(t.R[e].Q)}n.customElements.define(t.t,e)}}const a={html:{}},d={},p=n[t]=n[t]||{},m=function h(t,e,n){t.zt||(t.zt=((t,e,n,o)=>t.addEventListener(e,n,o)),t.Qt=((t,e,n,o)=>t.removeEventListener(e,n,o)));const o=new WeakMap,i={Ut:n,Zt:!1,mt:t=>t.nodeType,et:t=>n.createElement(t),tt:(t,e)=>n.createElementNS(t,e),_:t=>n.createTextNode(t),ot:t=>n.createComment(t),ct:(t,e,n)=>t.insertBefore(e,n),st:t=>t.remove(),nt:(t,e)=>t.appendChild(e),rt:t=>t.childNodes,lt:t=>t.parentNode,pt:t=>t.nextSibling,yt:t=>t.previousSibling,ft:t=>L(t.nodeName),$t:t=>t.textContent,dt:(t,e)=>t.textContent=e,ht:(t,e)=>t.getAttribute(e),A:(t,e,n)=>t.setAttribute(e,n),Gt:(t,e,n,o)=>t.setAttributeNS(e,n,o),G:(t,e)=>t.removeAttribute(e),J:(t,e)=>t.hasAttribute(e),Tt:e=>e.getAttribute("mode")||(t.Context||{}).mode,Jt:(t,o)=>{return"child"===o?t.firstElementChild:"parent"===o?i.ut(t):"body"===o?n.body:"document"===o?n:"window"===o?e:t},K:(e,n,r,s,c,l,f,u)=>{const a=n;let d=e,p=o.get(e);if(p&&p[a]&&p[a](),"string"==typeof l?d=i.Jt(e,l):"object"==typeof l?d=l:(u=n.split(":")).length>1&&(d=i.Jt(e,u[0]),n=u[1]),!d)return;let m=r;(u=n.split(".")).length>1&&(n=u[0],m=(t=>{t.keyCode===S[u[1]]&&r(t)})),f=i.Zt?{capture:!!s,passive:!!c}:!!s,t.zt(d,n,m,f),p||o.set(e,p={}),p[a]=(()=>{d&&t.Qt(d,n,m,f),p[a]=null})},V:(t,e)=>{const n=o.get(t);n&&(e?n[e]&&n[e]():Object.keys(n).forEach(t=>{n[t]&&n[t]()}))},Et:(t,e)=>t.attachShadow(e)};i.W=!!i.Ut.documentElement.attachShadow,e.location.search.indexOf("shadow=false")>0&&(i.W=!1),i.Kt=((t,n,o)=>t&&t.dispatchEvent(new e.CustomEvent(n,o)));try{e.addEventListener("e",null,Object.defineProperty({},"passive",{get:()=>i.Zt=!0}))}catch(t){}return i.ut=((t,e)=>(e=i.lt(t))&&11===i.mt(e)?e.host:e),i}(p,n,o);e.isServer=e.isPrerender=!(e.isClient=!0),e.window=n,e.location=n.location,e.document=o,e.resourcesUrl=e.publicPath=s,e.enableListener=((t,e,n,o,i)=>(function r(t,e,n,o,i,s){if(e){const r=t.w.get(e),c=t.j(r);if(c&&c.gt)if(o){const o=c.gt.find(t=>t.e===n);o&&t.P.K(r,n,t=>e[o.n](t),o.r,void 0===s?o.i:!!s,i)}else t.P.V(r,n)}})(y,t,e,n,o,i)),e.emit=((t,n,o)=>m.Kt(t,e.eventNameFn?e.eventNameFn(n):n,o)),p.h=l,p.Context=e;const b=n["s-defined"]=n.$definedCmps=n["s-defined"]||n.$definedCmps||{};let v=0;const y={P:m,Vt:f,C:e.emit,j:t=>a[m.ft(t)],B:t=>e[t],isClient:!0,Dt:t=>!(!b[m.ft(t)]&&!y.j(t)),Lt:()=>t+v++,N:(t,e,n)=>void 0,F:t=>(function e(t,n,o){return{create:W(t,n,o,"create"),componentOnReady:W(t,n,o,"componentOnReady")}})(m,d,t),queue:e.queue=function $(t,e){function n(t){for(let e=0;e0&&(u.push(...f),f.length=0),(d=l.length+f.length+u.length>0)?t.raf(i):a=0}const r=()=>e.performance.now(),s=Promise.resolve(),c=[],l=[],f=[],u=[];let a=0,d=!1;return t.raf||(t.raf=e.requestAnimationFrame.bind(e)),{tick(t){c.push(t),1===c.length&&s.then(()=>n(c))},read(e){l.push(e),d||(d=!0,t.raf(i))},write(e){f.push(e),d||(d=!0,t.raf(i))}}}(p,n),It:function g(t,e,n){if(t.k)u(y,e);else{const o="string"==typeof t.Wt?t.Wt:t.Wt[e.mode],i=2===t.encapsulation||1===t.encapsulation&&!m.W;let r=s+o+(i?".sc":"")+".js";n&&(r+="?s-hmr="+n),import(r).then(n=>{try{t.k=n[D(t.t)],function o(t,e,n,i,r){if(i){const o=e.t+(r||E);if(!e[o]){const s=t.et("template");e[o]=s;{const o=[""),o.push(i),o.push(""),s.innerHTML=o.join("")}t.nt(t.Ut.head,s)}}}(m,t,t.encapsulation,t.k.style,t.k.styleMode)}catch(e){t.k=class{}}u(y,e)}).catch(t=>void 0)}},s:new WeakMap,Xt:new WeakMap,Rt:new WeakMap,St:new WeakMap,qt:new WeakMap,w:new WeakMap,x:new WeakMap,g:new WeakMap,y:new WeakMap,b:new WeakMap,Ht:new WeakMap,O:new WeakMap,L:new WeakMap,M:new WeakMap};y.render=M(y,m);const w=m.Ut.documentElement;w["s-ld"]=[],w["s-rn"]=!0,w["s-init"]=(()=>{y.qt.set(w,p.loaded=y.v=!0),m.Kt(n,"appload",{detail:{namespace:t}})}),function k(t,e,n){const o=n.querySelectorAll(`[${P}]`),i=o.length;let r,s,c,l,f,u;if(i>0)for(t.qt.set(n,!0),l=0;l{(function r(t,e,n,o){const r=n.encapsulation,s=2===r||1===r&&!t.P.W;let c=n.t+o.mode,l=n[c];if(s&&(o["s-sc"]=i(n,o.mode)),l||(l=n[c=n.t+E],s&&(o["s-sc"]=i(n))),l){let n=e.Ut.head;if(e.W)if(1===r)n=o.shadowRoot;else{let t=o;for(;t=e.lt(t);)if(t.host&&t.host.shadowRoot){n=t.host.shadowRoot;break}}let i=t.Xt.get(n);if(i||t.Xt.set(n,i={}),!i[c]){let t;{t=l.content.cloneNode(!0),i[c]=!0;const o=n.querySelectorAll("[data-styles]");e.ct(n,t,o.length&&o[o.length-1].nextSibling||n.firstChild)}}}})(t,e,n,o)}),function C(t,e,n,o){const i=n.Yt=n.Yt||{};return i._t=i._t||[],i._t.push(function r(t,e,n){return{namespace:e,te:t=>{return t&&t.tagName?Promise.all([O(n,t.tagName),function e(t,n){return Promise.resolve(t.g.get(n))}(n,t)]).then(t=>{return t[0]&&t[1]?{ee:t[0],ne:t[1]}:null}):Promise.resolve(null)},oe:t=>{return O(n,t)},ie:()=>{return Promise.all(t.components.map(t=>{return O(n,t[0])})).then(t=>{return t.filter(t=>t)})}}}(t,e,o)),i.te||(i.te=(t=>{return Promise.all(i._t.map(e=>{return e.te(t)})).then(t=>{return t.find(t=>!!t)})})),i.ie||(i.ie=(()=>{const t=[];return i._t.forEach(e=>{t.push(e.ie())}),Promise.all(t).then(t=>{const e=[];return t.forEach(t=>{t.forEach(t=>{e.push(t)})}),e})})),i}(p,t,n,y),(p.components||[]).map(t=>{const e=function n(t,e,o){const i={t:t[0],R:{color:{Q:"color"}}};i.Wt=t[1];const s=t[3];if(s)for(e=0;ef(t,class extends HTMLElement{})),function N(t,e,n,o,i,r){if(e.componentOnReady=((e,n)=>{if(!e.nodeName.includes("-"))return n(null),!1;const o=t.j(e);if(o)if(t.qt.has(e))n(e);else{const o=t.Ht.get(e)||[];o.push(n),t.Ht.set(e,o)}return!!o}),i){for(r=i.length-1;r>=0;r--)e.componentOnReady(i[r][0],i[r][1])&&i.splice(r,1);for(r=0;r1)&&Zt(this)}}}),ot(u,h,{value:function(e){-1<_.call(a,e)&&o[h].apply(this,arguments)}}),o[d]&&ot(u,p,{value:o[d]}),o[v]&&ot(u,g,{value:o[v]}),i&&(f[c]=i),e=e.toUpperCase(),G[e]={constructor:t,create:i?[i,et(e)]:[e]},Z.set(t,e),n[s](e.toLowerCase(),f),en(e),Y[e].r()}function Gt(e){var t=G[e.toUpperCase()];return t&&t.constructor}function Yt(e){return typeof e=="string"?e:e&&e.is||""}function Zt(e){var t=e[h],n=t?e.attributes:j,r=n.length,i;while(r--)i=n[r],t.call(e,i.name||i.nodeName,null,i.value||i.nodeValue)}function en(e){return e=e.toUpperCase(),e in Y||(Y[e]={},Y[e].p=new K(function(t){Y[e].r=t})),Y[e].p}function tn(){X&&delete e.customElements,B(e,"customElements",{configurable:!0,value:new Kt}),B(e,"CustomElementRegistry",{configurable:!0,value:Kt});for(var t=function(t){var r=e[t];if(r){e[t]=function(t){var i,s;return t||(t=this),t[W]||(Q=!0,i=G[Z.get(t.constructor)],s=V&&i.create.length===1,t=s?Reflect.construct(r,j,i.constructor):n.createElement.apply(n,i.create),t[W]=!0,Q=!1,s||Zt(t)),t},e[t].prototype=r.prototype;try{r.prototype.constructor=e[t]}catch(i){z=!0,B(r,W,{value:e[t]})}}},r=i.get(/^HTML[A-Z]*[a-z]/),o=r.length;o--;t(r[o]));n.createElement=function(e,t){var n=Yt(t);return n?gt.call(this,e,et(n)):gt.call(this,e)},St||(Tt=!0,n[s](""))}var n=e.document,r=e.Object,i=function(e){var t=/^[A-Z]+[a-z]/,n=function(e){var t=[],n;for(n in s)e.test(n)&&t.push(n);return t},i=function(e,t){t=t.toLowerCase(),t in s||(s[e]=(s[e]||[]).concat(t),s[t]=s[t.toUpperCase()]=e)},s=(r.create||r)(null),o={},u,a,f,l;for(a in e)for(l in e[a]){f=e[a][l],s[l]=f;for(u=0;u>0),u="addEventListener",a="attached",f="Callback",l="detached",c="extends",h="attributeChanged"+f,p=a+f,d="connected"+f,v="disconnected"+f,m="created"+f,g=l+f,y="ADDITION",b="MODIFICATION",w="REMOVAL",E="DOMAttrModified",S="DOMContentLoaded",x="DOMSubtreeModified",T="<",N="=",C=/^[A-Z][A-Z0-9]*(?:-[A-Z0-9]+)+$/,k=["ANNOTATION-XML","COLOR-PROFILE","FONT-FACE","FONT-FACE-SRC","FONT-FACE-URI","FONT-FACE-FORMAT","FONT-FACE-NAME","MISSING-GLYPH"],L=[],A=[],O="",M=n.documentElement,_=L.indexOf||function(e){for(var t=this.length;t--&&this[t]!==e;);return t},D=r.prototype,P=D.hasOwnProperty,H=D.isPrototypeOf,B=r.defineProperty,j=[],F=r.getOwnPropertyDescriptor,I=r.getOwnPropertyNames,q=r.getPrototypeOf,R=r.setPrototypeOf,U=!!r.__proto__,z=!1,W="__dreCEv1",X=e.customElements,V=!/^force/.test(t.type)&&!!(X&&X.define&&X.get&&X.whenDefined),$=r.create||r,J=e.Map||function(){var t=[],n=[],r;return{get:function(e){return n[_.call(t,e)]},set:function(e,i){r=_.call(t,e),r<0?n[t.push(e)-1]=i:n[r]=i}}},K=e.Promise||function(e){function i(e){n=!0;while(t.length)t.shift()(e)}var t=[],n=!1,r={"catch":function(){return r},then:function(e){return t.push(e),n&&setTimeout(i,1),r}};return e(i),r},Q=!1,G=$(null),Y=$(null),Z=new J,et=function(e){return e.toLowerCase()},tt=r.create||function sn(e){return e?(sn.prototype=e,new sn):this},nt=R||(U?function(e,t){return e.__proto__=t,e}:I&&F?function(){function e(e,t){for(var n,r=I(t),i=0,s=r.length;i>>0;if("function"!==typeof c)throw new TypeError("predicate must be a function");for(var a=0;a>>0;if(0===n)return!1;var i,o,a=0|e,u=Math.max(0<=a?a:n-Math.abs(a),0);for(;uthis.length)a=this.length;return this.substring(a-b.length,a)===b}}); +/*! +String.prototype.includes +*/ +String.prototype.includes||(String.prototype.includes=function(b,a){"number"!==typeof a&&(a=0);return a+b.length>this.length?!1:-1!==this.indexOf(b,a)}); +/*! +String.prototype.startsWith +*/ +String.prototype.startsWith||Object.defineProperty(String.prototype,"startsWith",{writable:!0,configurable:!0,value:function(b,a){return this.substr(!a||0>a?0:+a,b.length)===b}}); +/*! +es6-promise - a tiny implementation of Promises/A+. +Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald) +Licensed under MIT license +See https://raw.githubusercontent.com/stefanpenner/es6-promise/master/LICENSE +v4.2.4+314e4831 +*/ +(window.ES6Promise=function(){function t(){var t=setTimeout;return function(){return t(r,1)}}function r(){for(var t=0;tthis.status;this.statusText="statusText"in b?b.statusText:"OK";this.headers=new d(b.headers);this.url=b.url||"";this._initBody(a)}if(!e.fetch){var D="Symbol"in e&&"iterator"in Symbol,m;if(m="FileReader"in e&&"Blob"in e)try{new Blob,m=!0}catch(a){m=!1}var g={searchParams:"URLSearchParams"in e,iterable:D, +blob:m,formData:"FormData"in e,arrayBuffer:"ArrayBuffer"in e};if(g.arrayBuffer){var E="[object Int8Array];[object Uint8Array];[object Uint8ClampedArray];[object Int16Array];[object Uint16Array];[object Int32Array];[object Uint32Array];[object Float32Array];[object Float64Array]".split(";");var y=function(a){return a&&DataView.prototype.isPrototypeOf(a)};var z=ArrayBuffer.isView||function(a){return a&&-1-1&&r.splice(e,1),r.length||(i["s-init"]&&i["s-init"](),i.$initLoad&&i.$initLoad())),n.f.delete(t))}function v(n,t){for(var e,r,i=null,u=!1,o=!1,f=arguments.length;f-- >2;)en.push(arguments[f]);for(;en.length>0;){var c=en.pop();if(c&&void 0!==c.pop)for(f=c.length;f--;)en.push(c[f]);else"boolean"==typeof c&&(c=null),(o="function"!=typeof n)&&(null==c?c="":"number"==typeof c?c=String(c):"string"!=typeof c&&(o=!1)),o&&u?i[i.length-1].c+=c:null===i?i=[o?{c:c}:c]:i.push(o?{c:c}:c),u=o}if(null!=t){if(t.className&&(t.class=t.className),"object"==typeof t.class){for(f in t.class)t.class[f]&&en.push(f);t.class=en.join(" "),en.length=0}null!=t.key&&(e=t.key),null!=t.name&&(r=t.name)}return"function"==typeof n?n(Object.assign({},t,{children:i}),rn):{a:n,s:i,c:void 0,l:t,v:e,p:r,d:void 0,m:!1}}function p(n,t,e,r){t.split(" ").forEach(function(t){n[t]=!0,e&&(n[t+"-"+e]=!0,r&&(n[t+"-"+e+"-"+r]=n[t+"-"+r]=!0))})}function d(n,t){n.b.has(t)||(n.b.set(t,!0),n.y?n.queue.write(function(){return h(n,t)}):n.queue.tick(function(){return h(n,t)}))}function h(n,t,e,r,i,u){if(n.b.delete(t),!n.g.has(t)){if(r=n.w.get(t),e=!r){if((i=n.f.get(t))&&i.$rendered&&(i["s-rn"]=!0),i&&!i["s-rn"])return(i["s-rc"]=i["s-rc"]||[]).push(function(){h(n,t)}),void(i.$onRender=i["s-rc"]);r=function o(n,t,e,r,i,u,f){try{(function c(n,t,e,r,i,u,o){for(o in n.k.set(r,e),n.M.has(e)||n.M.set(e,{}),(u=Object.assign({color:{type:String}},t.properties)).mode={type:String},u)b(n,u[o],e,r,o,i)})(n,i=n.O(t).j,t,r=new i,e),function a(n,t,e){if(t){var r=n.k.get(e);t.forEach(function(t){e[t.method]={emit:function(e){n.C(r,t.name,{bubbles:t.bubbles,composed:t.composed,cancelable:t.cancelable,detail:e})}}})}}(n,i.events,r);try{if(u=n.x.get(t)){for(f=0;f0)throw new Error("The following keys were attempted to be set with hostData() from the "+t.t+" component: "+b.join(", ")+". If you would like to modify these please set @Prop({ mutable: true, reflectToAttr: true}) on the @Prop() decorator.")}i&&(m=m?Object.assign(m,i):i),n.R=!1,c&&(m=function y(n,t,e){return n=n||{},Object.keys(t).forEach(function(r){"theme"===r?p(n.class=n.class||{},t[r],e.mode,e.color):"class"===r?p(n[r]=n[r]||{},t[r]):n[r]=t[r]}),n}(m,c,r));var g=n.I.get(e)||{};g.d=u;var w=v(null,m,h);w.m=!0,n.I.set(e,n.render(e,g,w,s,a))}n._&&n._.D(e),e["s-rn"]=!0,e.$onRender&&(e["s-rc"]=e.$onRender),e["s-rc"]&&(e["s-rc"].forEach(function(n){return n()}),e["s-rc"]=null)}catch(t){n.R=!1,n.A(t,8,e,!0)}})(n,n.O(t),t,e);try{r?t["s-init"]():(e.componentDidUpdate&&e.componentDidUpdate(),C(n.I.get(t))),t["s-hmr-load"]&&t["s-hmr-load"]()}catch(e){n.A(e,6,t,!0)}}function b(n,t,e,r,i,u,o,f){if(t.type||t.state){var c=n.M.get(e);t.state||(!t.attr||void 0!==c[i]&&""!==c[i]||(o=u&&u.q)&&J(f=o[t.attr])&&(c[i]=s(t.type,f)),e.hasOwnProperty(i)&&(void 0===c[i]&&(c[i]=s(t.type,e[i])),"mode"!==i&&delete e[i])),r.hasOwnProperty(i)&&void 0===c[i]&&(c[i]=r[i]),t.watchCallbacks&&(c[un+i]=t.watchCallbacks.slice()),w(r,i,function a(t){return(t=n.M.get(n.k.get(this)))&&t[i]},function l(e,r){(r=n.k.get(this))&&(t.state||t.mutable)&&y(n,r,i,e)})}else if(t.elementRef)g(r,i,e);else if(t.method)g(e,i,r[i].bind(r));else if(t.context){var v=n.U(t.context);void 0!==v&&g(r,i,v.B&&v.B(e)||v)}else t.connect&&g(r,i,n.H(t.connect))}function y(n,t,e,r,i,u,o){(i=n.M.get(t))||n.M.set(t,i={});var f=i[e];if(r!==f&&(i[e]=r,u=n.w.get(t))){if(o=i[un+e])for(var c=0;c=0;u--)(o=a[u])["s-hn"]!==d&&o["s-ol"]&&(t.fn(o),t.cn(c(o),o,f(o)),t.fn(o["s-ol"]),o["s-ol"]=null,p=!0),i&&r(o,i);n.un=!1}function i(n,r,i,u,o,c,a,s){var l=n["s-cr"]||n.$defaultHolder;for((a=l&&t.an(l)||n).shadowRoot&&t.sn(a)===d&&(a=a.shadowRoot);o<=c;++o)u[o]&&(s=J(u[o].c)?t.nn(u[o].c):e(null,i,o,n))&&(u[o].d=s,t.cn(a,s,f(r)))}function u(n,e,i,u){for(;e<=i;++e)J(n[e])&&(u=n[e].d,v=!0,u["s-ol"]?t.fn(u["s-ol"]):r(u,!0),t.fn(u))}function o(n,t){return n.a===t.a&&n.v===t.v&&("slot"!==n.a||n.p===t.p)}function f(n){return n&&n["s-ol"]?n["s-ol"]:n}function c(n){return t.an(n["s-ol"]?n["s-ol"]:n)}var a,s,l,v,p,d,h,m=[];return function b(y,g,w,k,M,$,j,E,C,x,A,N){if(d=t.sn(y),h=y["s-cr"],a=k,s="shadow"!==M?$:null,l=y["s-sc"],p=v=!1,function a(s,l,v){var p=l.d=s.d,d=s.s,h=l.s;cn=l.d&&J(t.ln(l.d))&&void 0!==l.d.ownerSVGElement,cn="svg"===l.a||"foreignObject"!==l.a&&cn,J(l.c)?(v=p["s-cr"]||p.$defaultHolder)?t.vn(t.an(v),l.c):s.c!==l.c&&t.vn(p,l.c):("slot"!==l.a&&O(n,s,l,cn),J(d)&&J(h)?function m(n,s,l,v,p,d,h,b){for(var y=0,g=0,w=s.length-1,k=s[0],M=s[w],$=v.length-1,j=v[0],O=v[$];y<=w&&g<=$;)if(null==k)k=s[++y];else if(null==M)M=s[--w];else if(null==j)j=v[++g];else if(null==O)O=v[--$];else if(o(k,j))a(k,j),k=s[++y],j=v[++g];else if(o(M,O))a(M,O),M=s[--w],O=v[--$];else if(o(k,O))"slot"!==k.a&&"slot"!==O.a||r(t.an(k.d)),a(k,O),t.cn(n,k.d,t.pn(M.d)),k=s[++y],O=v[--$];else if(o(M,j))"slot"!==k.a&&"slot"!==O.a||r(t.an(M.d)),a(M,j),t.cn(n,M.d,k.d),M=s[--w],j=v[++g];else{for(p=null,d=y;d<=w;++d)if(s[d]&&J(s[d].v)&&s[d].v===j.v){p=d;break}J(p)?((b=s[p]).a!==j.a?h=e(s&&s[g],l,p,n):(a(b,j),s[p]=void 0,h=b.d),j=v[++g]):(h=e(s&&s[g],l,g,n),j=v[++g]),h&&t.cn(c(k.d),h,f(k.d))}y>w?i(n,null==v[$+1]?null:v[$+1].d,l,v,g,$):g>$&&u(s,y,w)}(p,d,l,h):J(h)?(J(s.c)&&t.vn(p,""),i(p,null,l,h,0,h.length-1)):J(d)&&u(d,0,d.length-1)),cn&&"svg"===l.a&&(cn=!1)}(g,w),J(s)&&t.W(g.d,Z,s),p){for(function n(e,r,i,u,o,f,c,a,s,l){for(o=0,f=(r=t.on(e)).length;o=0;c--)(u=a[c])["s-cn"]||u["s-nr"]||u["s-hn"]===i["s-hn"]||((3===(l=t.dn(u))||8===l)&&""===s||1===l&&null===t.hn(u,"slot")&&""===s||1===l&&t.hn(u,"slot")===s)&&(m.some(function(n){return n.mn===u})||(v=!0,u["s-sn"]=s,m.push({bn:i,mn:u})));1===t.dn(i)&&n(i)}}(w.d),j=0;j0?f.join(",").trim():void 0}}(n,e);if(!r)return t.push(n.substring(e,n.length)),n.length;var u=r.Fn,o=null!=r.zn?_(r.zn):void 0;return t.push(n.substring(e,r.start),function(n){return function t(n,e,r){return n[e]?n[e]:r?L(r,n):""}(n,u,o)}),r.end}function L(n,t){for(var e="",r=0;r0&&n.parsedSelector.split(",").forEach(function(n){n=n.trim(),e.push({selector:n,Yn:r,ot:1,ft:t})}),t++}),e}(t),ct:r.length>1}}function H(n,t){var e=B(t.innerHTML);e.st=t,n.push(e)}function F(n,t,e){return z(n=z(n=z(n,"\\["+o(t)+"\\]","["+o(e)+"]"),"\\["+u(t)+"\\]","["+u(e)+"]"),"\\["+f(t)+"\\]","["+f(e)+"]")}function z(n,t,e){return n.replace(new RegExp(t,"g"),e)}function Y(n,t,e){var r=e.href;return fetch(r).then(function(n){return n.text()}).then(function(i){if(function u(n){return n.indexOf("var(")>-1||jn.test(n)}(i)&&e.parentNode){(function o(n){return On.lastIndex=0,On.test(n)})(i)&&(i=function f(n,t){var e=t.replace(/[^/]*$/,"");return n.replace(On,function(n,t){var r=e+t;return n.replace(t,r)})}(i,r));var c=n.createElement("style");c.innerHTML=i,H(t,c),e.parentNode.insertBefore(c,e),e.remove()}}).catch(function(n){})}var Z="data-ssrv",K="data-ssrc",Q="$",X={},G={enter:13,escape:27,space:32,tab:9,left:37,up:38,right:39,down:40},J=function(n){return null!=n},V=function(n){return n.toLowerCase()},nn=function(n){return V(n).split("-").map(function(n){return n.charAt(0).toUpperCase()+n.slice(1)}).join("")},tn=function(){},en=[],rn={getTag:function(n){return n.a},getChildren:function(n){return n.s},getText:function(n){return n.c},getAttributes:function(n){return n.l},replaceAttributes:function(n,t){return n.l=t}},un="wc-",on={allowfullscreen:1,async:1,autofocus:1,autoplay:1,checked:1,controls:1,disabled:1,enabled:1,formnovalidate:1,hidden:1,multiple:1,noresize:1,readonly:1,required:1,selected:1,spellcheck:1},fn="http://www.w3.org/1999/xlink",cn=!1,an=function an(){this.start=0,this.end=0,this.previous=null,this.parent=null,this.rules=null,this.parsedCssText="",this.cssText="",this.atRule=!1,this.type=0,this.keyframesName="",this.selector="",this.parsedSelector=""},sn={tt:1,Vn:7,Gn:4,nt:1e3},ln="{",vn="}",pn={et:/\/\*[^*]*\*+([^/*][^*]*\*+)*\//gim,rt:/@import[^;]*;/gim,lt:/(?:^[^;\-\s}]+)?--[^;{}]*?:[^{};]*?(?:[;\n]|$)/gim,vt:/(?:^[^;\-\s}]+)?--[^;{}]*?:[^{};]*?{[^}]*?}(?:[;\n]|$)?/gim,pt:/@apply\s*\(?[^);]*\)?\s*(?:[;\n]|$)?/gim,dt:/[^;:]*?:[^;]*?var\([^;]*\)(?:[;\n]|$)?/gim,Jn:/^@[^\s]*keyframes/,Xn:/\s+/g},dn="--",hn="@media",mn="@",bn=/\bvar\(/,yn=/\B--[\w-]+\s*:/,gn=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//gim,wn=/^[\t ]+\n/gm,kn=/[^{}]*{\s*}/gm,Mn="!important",$n=/(?:^|[;\s{]\s*)(--[\w-]*?)\s*:\s*(?:((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};{])+)|\{([^}]*)\}(?:(?=[;\s}])|$))/gm,jn=/[\s;{]--[-a-zA-Z0-9]+\s*:/m,On=/url[\s]*\([\s]*['"]?(?![http|/])([^\'\"\)]*)[\s]*['"]?\)[\s]*/gim,En=function(){function n(n,t){this.ht=n,this.mt=t,this.bt=0,this.yt=new WeakMap,this.gt=new WeakMap,this.wt=[],this.kt=new Map}return n.prototype.Mt=function(){var n=this;return new Promise(function(t){n.ht.requestAnimationFrame(function(){(function e(n,t){return function e(n,t){for(var e=[],r=n.querySelectorAll('link[rel="stylesheet"][href]'),i=0;i0&&(xn=!0),xn&&(Cn=new En(n,t)),function Nn(n,t,e,r,u,o,f){function s(n,t){if(!e.customElements.get(n.t)){P[n.t]=!0,T(R,w[n.t]=n,t.prototype,o);var r=[];for(var i in n.L)n.L[i].Y&&r.push(n.L[i].Y);t.observedAttributes=r,e.customElements.define(n.t,t)}}function l(n,t){return t&&M.delete(n.replace(/^\.\//,"")),null==n?null:M.get(n.replace(/^\.\//,""))}function p(n){return"exports"===n||"require"===n||!!l(n)}function h(n,t,e){var r={};try{e.apply(null,t.map(function(n){return"exports"===n?r:"require"===n?m:l(n)}))}catch(n){}void 0!==n&&(M.set(n,r),n&&!n.endsWith(".js")&&Object.keys(r).forEach(function(n){for(var t=n.replace(/-/g,"").toLowerCase(),e=Object.keys(w),i=0;i=0;n--){var t=k[n],e=t[0],r=t[1],i=t[2];r.every(p)&&!p(e)&&(k.splice(n,1),h(e,r,i))}}()}function y(n,t,e){var r=2===n.encapsulation||1===n.encapsulation&&!C.P,i=u+t+(r?".sc":"")+".es5.js";e&&(i+="?s-hmr="+e),g(i)}function g(n){function t(){clearTimeout(e),r.onerror=r.onload=null,C.fn(r),$.delete(n)}var e,r;$.has(n)||($.add(n),(r=C.en("script")).charset="utf-8",r.async=!0,r.src=n,e=setTimeout(t,12e4),r.onerror=r.onload=t,C.rn(C.Hn.head,r))}var w={html:{}},k=[],M=new Map,$=new Set,j={},O=e[n]=e[n]||{},C=function A(n,t,e){n.At||(n.At=function(n,t,e,r){return n.addEventListener(t,e,r)},n.Nt=function(n,t,e,r){return n.removeEventListener(t,e,r)});var r=new WeakMap,i={Hn:e,Pt:!1,dn:function(n){return n.nodeType},en:function(n){return e.createElement(n)},tn:function(n,t){return e.createElementNS(n,t)},nn:function(n){return e.createTextNode(n)},in:function(n){return e.createComment(n)},cn:function(n,t,e){return n.insertBefore(t,e)},fn:function(n){return n.remove()},rn:function(n,t){return n.appendChild(t)},on:function(n){return n.childNodes},an:function(n){return n.parentNode},pn:function(n){return n.nextSibling},yn:function(n){return n.previousSibling},sn:function(n){return V(n.nodeName)},gn:function(n){return n.textContent},vn:function(n,t){return n.textContent=t},hn:function(n,t){return n.getAttribute(t)},W:function(n,t,e){return n.setAttribute(t,e)},Tt:function(n,t,e,r){return n.setAttributeNS(t,e,r)},K:function(n,t){return n.removeAttribute(t)},Q:function(n,t){return n.hasAttribute(t)},Pn:function(t){return t.getAttribute("mode")||(n.Context||{}).mode},St:function(n,r){return"child"===r?n.firstElementChild:"parent"===r?i.ln(n):"body"===r?e.body:"document"===r?e:"window"===r?t:n},X:function(t,e,u,o,f,c,a,s){var l=e,v=t,p=r.get(t);if(p&&p[l]&&p[l](),"string"==typeof c?v=i.St(t,c):"object"==typeof c?v=c:(s=e.split(":")).length>1&&(v=i.St(t,s[0]),e=s[1]),v){var d=u;(s=e.split(".")).length>1&&(e=s[0],d=function(n){n.keyCode===G[s[1]]&&u(n)}),a=i.Pt?{capture:!!o,passive:!!f}:!!o,n.At(v,e,d,a),p||r.set(t,p={}),p[l]=function(){v&&n.Nt(v,e,d,a),p[l]=null}}},G:function(n,t){var e=r.get(n);e&&(t?e[t]&&e[t]():Object.keys(e).forEach(function(n){e[n]&&e[n]()}))},Tn:function(n,t){return n.attachShadow(t)}};i.P=!!i.Hn.documentElement.attachShadow,t.location.search.indexOf("shadow=false")>0&&(i.P=!1),"function"!=typeof t.CustomEvent&&(t.CustomEvent=function(n,t,r){return(r=e.createEvent("CustomEvent")).initCustomEvent(n,t.bubbles,t.cancelable,t.detail),r},t.CustomEvent.prototype=t.Event.prototype),i.Wt=function(n,e,r){return n&&n.dispatchEvent(new t.CustomEvent(e,r))};try{t.addEventListener("e",null,Object.defineProperty({},"passive",{get:function(){return i.Pt=!0}}))}catch(n){}return i.ln=function(n,t){return(t=i.an(n))&&11===i.dn(t)?t.host:t},i}(O,e,r);C.P,t.isServer=t.isPrerender=!(t.isClient=!0),t.window=e,t.location=e.location,t.document=r,t.resourcesUrl=t.publicPath=u,t.enableListener=function(n,t,e,r,i){return function u(n,t,e,r,i,o){if(t){var f=n.k.get(t),c=n.O(f);if(c&&c.wn)if(r){var a=c.wn.find(function(n){return n.e===e});a&&n.T.X(f,e,function(n){return t[a.r](n)},a.o,void 0===o?a.u:!!o,i)}else n.T.G(f,e)}}(R,n,t,e,r,i)},t.emit=function(n,e,r){return C.Wt(n,t.eventNameFn?t.eventNameFn(e):e,r)},O.h=v,O.Context=t;var P=e["s-defined"]=e.$definedCmps=e["s-defined"]||e.$definedCmps||{},W=0,R={T:C,Rt:s,C:t.emit,_:f,O:function(n){return w[C.sn(n)]},U:function(n){return t[n]},isClient:!0,In:function(n){return!(!P[C.sn(n)]&&!R.O(n))},A:function(n,t,e){},Ln:function(){return n+W++},H:function(n){return function t(n,e,r){return{create:S(n,e,r,"create"),componentOnReady:S(n,e,r,"componentOnReady")}}(C,j,n)},queue:t.queue=function L(n,t){function e(n){for(var t=0;t0&&(s.push.apply(s,a),a.length=0),(v=c.length+a.length+s.length>0)?n.raf(i):l=0}var u=function(){return t.performance.now()},o=Promise.resolve(),f=[],c=[],a=[],s=[],l=0,v=!1;return n.raf||(n.raf=t.requestAnimationFrame.bind(t)),{tick:function(n){f.push(n),1===f.length&&o.then(function(){return e(f)})},read:function(t){c.push(t),v||(v=!0,n.raf(i))},write:function(t){a.push(t),v||(v=!0,n.raf(i))}}}(O,e),Dn:function I(n,t,e){var r="string"==typeof n.An?n.An:n.An[t.mode];l(r,e)?d(R,t):(k.push([void 0,[r],function(){d(R,t)}]),f&&q?q.push(function(){return y(n,r,e)}):y(n,r,e))},f:new WeakMap,Lt:new WeakMap,Rn:new WeakMap,Wn:new WeakMap,_n:new WeakMap,k:new WeakMap,N:new WeakMap,w:new WeakMap,g:new WeakMap,b:new WeakMap,Un:new WeakMap,x:new WeakMap,I:new WeakMap,M:new WeakMap};R.render=E(R,C);var _=C.Hn.documentElement;_["s-ld"]=[],_["s-rn"]=!0,_["s-init"]=function(){R._n.set(_,O.loaded=R.y=!0),C.Wt(e,"appload",{detail:{namespace:n}})},function D(n,t,e){var r,i,u,o,f,c,a=e.querySelectorAll("["+Z+"]"),s=a.length;if(s>0)for(n._n.set(e,!0),o=0;o=0;u--)t.componentOnReady(i[u][0],i[u][1])&&i.splice(u,1);for(u=0;u [], 'version' => ANYS_VERSION, 'in_footer' => true, - 'is_module' => false, ], 'anys-spoilerjs' => [ 'src' => ANYS_ASSETS_URL . 'vendor/spoilerjs/spoiler-span.js', @@ -59,18 +58,16 @@ protected function get_assets() { 'is_module' => true, ], 'anys-qr-code' => [ - 'src' => 'https://unpkg.com/@bitjson/qr-code@1.0.2/dist/qr-code.js', + 'src' => ANYS_ASSETS_URL . 'vendor/qr-code/qr-code.js', 'deps' => [], 'version' => '1.0.2', 'in_footer' => true, - 'is_module' => false, ], 'anys-qr-animation' => [ 'src' => ANYS_JS_URL . 'qr-animation.js', 'deps' => [ 'anys-qr-code' ], 'version' => '1.0.0', 'in_footer' => true, - 'is_module' => false, ], ], ]; diff --git a/includes/modules/shortcodes/types/qr.php b/includes/modules/shortcodes/types/qr.php index f37c0b4..41de9f7 100644 --- a/includes/modules/shortcodes/types/qr.php +++ b/includes/modules/shortcodes/types/qr.php @@ -68,9 +68,17 @@ public function render( array $attributes, string $content = '' ): string { // Enqueues frontend scripts. if ( ! is_admin() ) { - wp_enqueue_script( 'anys-qr-animation' ); + + // Base QR script. + wp_enqueue_script( 'anys-qr-code' ); + + // Animation script if needed. + if ( ! empty( $attributes['animation'] ) ) { + wp_enqueue_script( 'anys-qr-animation' ); + } } + // Resolves QR contents. $resolved_contents = '';