@flarehr/apollo-benefits 0.1.106 → 0.3.53396
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +19 -0
- package/dist/assets/@splitsoftware-7d799540.js +18 -0
- package/dist/assets/all_tab_color-548783b9.svg +21 -0
- package/dist/assets/all_tab_gray-a5051313.svg +6 -0
- package/dist/assets/check-57fe1dcb.svg +15 -0
- package/dist/assets/datadog-c7ede347.js +5 -0
- package/dist/assets/date-fns-c5d8fbc0.js +1 -0
- package/dist/assets/default_backdrop-fdd955b8.png +0 -0
- package/dist/assets/external_link-599a0aec.svg +3 -0
- package/dist/assets/external_link_white-55111b2e.svg +3 -0
- package/dist/assets/framer-motion-bb8d6b82.js +1 -0
- package/dist/assets/index-87923fdc.js +35 -0
- package/dist/assets/index-cfa25e28.css +1 -0
- package/dist/assets/index-ee9d2045.js +5 -0
- package/dist/assets/lodash-5d893f8c.js +1 -0
- package/dist/assets/logo-a34e9b4b.png +0 -0
- package/dist/assets/oidc-client-6f6e47c2.js +101 -0
- package/dist/assets/padlock-8c081120.svg +26 -0
- package/dist/assets/suitcase-6471ad05.svg +17 -0
- package/dist/assets/vendor-2d0139ca.js +788 -0
- package/dist/assets/warning-a7f1af23.svg +14 -0
- package/dist/assets/welcome_image_mobile-dbde6c80.png +0 -0
- package/dist/assets/welcome_image_v2-869c59e4.png +0 -0
- package/dist/assets/wellbeing_banner-6903d615.png +0 -0
- package/dist/assets/workplace_link_banner_mobile-6ebaa24b.png +0 -0
- package/dist/assets/workplace_link_banner_v2-c81ed849.png +0 -0
- package/dist/config.json +14 -0
- package/dist/favicon.ico +0 -0
- package/dist/icons/android-chrome-192x192.png +0 -0
- package/dist/icons/android-chrome-512x512.png +0 -0
- package/dist/icons/apple-touch-icon.png +0 -0
- package/dist/icons/favicon-16x16.png +0 -0
- package/dist/icons/favicon-32x32.png +0 -0
- package/dist/index.html +114 -0
- package/dist/manifest.json +21 -0
- package/dist/sw-esm.js +16 -0
- package/package.json +129 -60
- package/LICENSE +0 -21
- package/dist/lib/apollo-benefits/apollo-benefits.esm.js +0 -1
- package/dist/lib/apollo-benefits/assets/car-placeholder.svg +0 -5
- package/dist/lib/apollo-benefits/assets/check.svg +0 -13
- package/dist/lib/apollo-benefits/index.esm.js +0 -0
- package/dist/lib/apollo-benefits/p-06a1f65f.js +0 -1
- package/dist/lib/apollo-benefits/p-077d7f8d.entry.js +0 -1
- package/dist/lib/apollo-benefits/p-0a21a709.entry.js +0 -1
- package/dist/lib/apollo-benefits/p-14054f15.js +0 -1
- package/dist/lib/apollo-benefits/p-24a37d64.js +0 -1
- package/dist/lib/apollo-benefits/p-2b3f3b72.entry.js +0 -1
- package/dist/lib/apollo-benefits/p-3111d565.entry.js +0 -1
- package/dist/lib/apollo-benefits/p-327396fa.entry.js +0 -1
- package/dist/lib/apollo-benefits/p-3af26279.entry.js +0 -1
- package/dist/lib/apollo-benefits/p-3d4d2683.js +0 -1
- package/dist/lib/apollo-benefits/p-4474bcf8.entry.js +0 -1
- package/dist/lib/apollo-benefits/p-50fe790f.js +0 -1
- package/dist/lib/apollo-benefits/p-53bcbd1d.js +0 -1
- package/dist/lib/apollo-benefits/p-64a2b03a.entry.js +0 -1
- package/dist/lib/apollo-benefits/p-68c136da.js +0 -1
- package/dist/lib/apollo-benefits/p-6bd16f5b.js +0 -1
- package/dist/lib/apollo-benefits/p-71dbc8ff.entry.js +0 -1
- package/dist/lib/apollo-benefits/p-774d9bc5.entry.js +0 -1
- package/dist/lib/apollo-benefits/p-7a2ca86d.entry.js +0 -1
- package/dist/lib/apollo-benefits/p-7a572b50.js +0 -1
- package/dist/lib/apollo-benefits/p-7c2cd94a.entry.js +0 -1
- package/dist/lib/apollo-benefits/p-839493d7.entry.js +0 -1
- package/dist/lib/apollo-benefits/p-acf61bdc.js +0 -1
- package/dist/lib/apollo-benefits/p-b33fc683.js +0 -1
- package/dist/lib/apollo-benefits/p-beb8f728.entry.js +0 -1
- package/dist/lib/apollo-benefits/p-d7bea1d9.entry.js +0 -1
- package/dist/lib/apollo-benefits/p-ddb176cb.entry.js +0 -1
- package/dist/lib/apollo-benefits/p-e241f55b.entry.js +0 -1
- package/dist/lib/apollo-benefits/p-ef8ea713.entry.js +0 -1
- package/dist/lib/apollo-benefits/p-f603197d.js +0 -15
- package/dist/lib/cjs/active-router-0ecaf2b8.js +0 -75
- package/dist/lib/cjs/ap-ben-choose-vehicle-section_4.cjs.entry.js +0 -2684
- package/dist/lib/cjs/ap-ben-complete-section_4.cjs.entry.js +0 -108
- package/dist/lib/cjs/ap-ben-notifications-section.cjs.entry.js +0 -238
- package/dist/lib/cjs/apollo-benefits.cjs.js +0 -25
- package/dist/lib/cjs/app-globals-67583b8b.js +0 -12
- package/dist/lib/cjs/async-6a7926f0.js +0 -753
- package/dist/lib/cjs/cars-calculator-app.cjs.entry.js +0 -52
- package/dist/lib/cjs/cars-calculator.service-11b0cd88.js +0 -901
- package/dist/lib/cjs/context-consumer.cjs.entry.js +0 -29
- package/dist/lib/cjs/datorama-akita-31d23240.js +0 -2551
- package/dist/lib/cjs/delay-d31618c3.js +0 -206
- package/dist/lib/cjs/distinctUntilChanged-e8538790.js +0 -371
- package/dist/lib/cjs/dom-utils-b8befdd5.js +0 -63
- package/dist/lib/cjs/fl-button.cjs.entry.js +0 -30
- package/dist/lib/cjs/fl-dropdown-async_2.cjs.entry.js +0 -467
- package/dist/lib/cjs/fl-dropdown.cjs.entry.js +0 -232
- package/dist/lib/cjs/fl-loading-indicator.cjs.entry.js +0 -26
- package/dist/lib/cjs/fl-style-guide.cjs.entry.js +0 -91
- package/dist/lib/cjs/index-f1fadf90.js +0 -1735
- package/dist/lib/cjs/index.cjs.js +0 -2
- package/dist/lib/cjs/loader.cjs.js +0 -27
- package/dist/lib/cjs/location-utils-36fe7e5e.js +0 -237
- package/dist/lib/cjs/match-path-be4ea5f6.js +0 -279
- package/dist/lib/cjs/session.query-d61ba7ec.js +0 -1731
- package/dist/lib/cjs/stencil-async-content.cjs.entry.js +0 -32
- package/dist/lib/cjs/stencil-route-link.cjs.entry.js +0 -78
- package/dist/lib/cjs/stencil-route-switch.cjs.entry.js +0 -104
- package/dist/lib/cjs/stencil-route-title.cjs.entry.js +0 -32
- package/dist/lib/cjs/stencil-route.cjs.entry.js +0 -97
- package/dist/lib/cjs/stencil-router-prompt.cjs.entry.js +0 -59
- package/dist/lib/cjs/stencil-router-redirect.cjs.entry.js +0 -32
- package/dist/lib/cjs/stencil-router.cjs.entry.js +0 -640
- package/dist/lib/collection/assets/image/complete.svg +0 -122
- package/dist/lib/collection/collection-manifest.json +0 -53
- package/dist/lib/collection/components/cars-calculator-app/api/api-client.js +0 -5
- package/dist/lib/collection/components/cars-calculator-app/api/cars-calculator.api.js +0 -45
- package/dist/lib/collection/components/cars-calculator-app/cars-calculator-app.css +0 -22
- package/dist/lib/collection/components/cars-calculator-app/cars-calculator-app.js +0 -93
- package/dist/lib/collection/components/cars-calculator-app/modal-section/modal-section.css +0 -0
- package/dist/lib/collection/components/cars-calculator-app/modal-section/modal-section.js +0 -144
- package/dist/lib/collection/components/cars-calculator-app/notifications-section/notifications-section.js +0 -25
- package/dist/lib/collection/components/cars-calculator-app/pages/assets/car-placeholder.svg +0 -5
- package/dist/lib/collection/components/cars-calculator-app/pages/assets/check.svg +0 -13
- package/dist/lib/collection/components/cars-calculator-app/pages/choose-vehicle-section.component.js +0 -193
- package/dist/lib/collection/components/cars-calculator-app/pages/complete-section.component.js +0 -38
- package/dist/lib/collection/components/cars-calculator-app/pages/cost-breakdown-section.component.js +0 -47
- package/dist/lib/collection/components/cars-calculator-app/pages/model-variants-section.component.css +0 -34
- package/dist/lib/collection/components/cars-calculator-app/pages/model-variants-section.component.js +0 -64
- package/dist/lib/collection/components/cars-calculator-app/pages/personal-info-section.component.js +0 -66
- package/dist/lib/collection/components/cars-calculator-app/pages/quote-result-section.component.js +0 -86
- package/dist/lib/collection/components/cars-calculator-app/pages/submit-quote-section.component.js +0 -75
- package/dist/lib/collection/components/cars-calculator-app/services/app-configuration.service.js +0 -13
- package/dist/lib/collection/components/cars-calculator-app/services/cars-calculator.service.js +0 -103
- package/dist/lib/collection/components/cars-calculator-app/services/notifications.service.js +0 -37
- package/dist/lib/collection/components/cars-calculator-app/services/notifications.store.js +0 -3
- package/dist/lib/collection/components/cars-calculator-app/services/session.query.js +0 -35
- package/dist/lib/collection/components/cars-calculator-app/services/session.store.js +0 -78
- package/dist/lib/collection/global/config.js +0 -2
- package/dist/lib/collection/global/main.dev.js +0 -5
- package/dist/lib/collection/global/main.js +0 -5
- package/dist/lib/collection/index.js +0 -2
- package/dist/lib/collection/utils/config.js +0 -2
- package/dist/lib/collection/utils/index.js +0 -15
- package/dist/lib/collection/utils/lazy.js +0 -29
- package/dist/lib/esm/active-router-7c2ca849.js +0 -73
- package/dist/lib/esm/ap-ben-choose-vehicle-section_4.entry.js +0 -2677
- package/dist/lib/esm/ap-ben-complete-section_4.entry.js +0 -101
- package/dist/lib/esm/ap-ben-notifications-section.entry.js +0 -234
- package/dist/lib/esm/apollo-benefits.js +0 -23
- package/dist/lib/esm/app-globals-65714cca.js +0 -10
- package/dist/lib/esm/async-68e9cad7.js +0 -738
- package/dist/lib/esm/cars-calculator-app.entry.js +0 -48
- package/dist/lib/esm/cars-calculator.service-2cde6288.js +0 -894
- package/dist/lib/esm/context-consumer.entry.js +0 -25
- package/dist/lib/esm/datorama-akita-c87196a0.js +0 -2545
- package/dist/lib/esm/delay-115d4292.js +0 -200
- package/dist/lib/esm/distinctUntilChanged-bf69e0f8.js +0 -363
- package/dist/lib/esm/dom-utils-109a7d75.js +0 -55
- package/dist/lib/esm/fl-button.entry.js +0 -26
- package/dist/lib/esm/fl-dropdown-async_2.entry.js +0 -462
- package/dist/lib/esm/fl-dropdown.entry.js +0 -228
- package/dist/lib/esm/fl-loading-indicator.entry.js +0 -22
- package/dist/lib/esm/fl-style-guide.entry.js +0 -87
- package/dist/lib/esm/index-19c4d245.js +0 -1703
- package/dist/lib/esm/index.js +0 -1
- package/dist/lib/esm/loader.js +0 -23
- package/dist/lib/esm/location-utils-312665d3.js +0 -226
- package/dist/lib/esm/match-path-4b5c7d98.js +0 -276
- package/dist/lib/esm/polyfills/core-js.js +0 -11
- package/dist/lib/esm/polyfills/css-shim.js +0 -1
- package/dist/lib/esm/polyfills/dom.js +0 -79
- package/dist/lib/esm/polyfills/es5-html-element.js +0 -1
- package/dist/lib/esm/polyfills/index.js +0 -34
- package/dist/lib/esm/polyfills/system.js +0 -6
- package/dist/lib/esm/session.query-0f1c9503.js +0 -1719
- package/dist/lib/esm/stencil-async-content.entry.js +0 -28
- package/dist/lib/esm/stencil-route-link.entry.js +0 -74
- package/dist/lib/esm/stencil-route-switch.entry.js +0 -100
- package/dist/lib/esm/stencil-route-title.entry.js +0 -28
- package/dist/lib/esm/stencil-route.entry.js +0 -93
- package/dist/lib/esm/stencil-router-prompt.entry.js +0 -55
- package/dist/lib/esm/stencil-router-redirect.entry.js +0 -28
- package/dist/lib/esm/stencil-router.entry.js +0 -636
- package/dist/lib/index.cjs.js +0 -1
- package/dist/lib/index.js +0 -1
- package/dist/lib/loader/cdn.js +0 -3
- package/dist/lib/loader/index.cjs.js +0 -3
- package/dist/lib/loader/index.d.ts +0 -13
- package/dist/lib/loader/index.es2017.js +0 -3
- package/dist/lib/loader/index.js +0 -4
- package/dist/lib/loader/package.json +0 -10
- package/dist/lib/node_modules/@flarehr/beacon/dist/collection/components/button/button.css +0 -45
- package/dist/lib/node_modules/@flarehr/beacon/dist/collection/components/dropdown/dropdown.css +0 -9
- package/dist/lib/node_modules/@flarehr/beacon/dist/collection/components/dropdown-async/dropdown-async.css +0 -9
- package/dist/lib/node_modules/@flarehr/beacon/dist/collection/components/loading-indicator/loading-indicator.css +0 -141
- package/dist/lib/node_modules/@flarehr/beacon/dist/collection/components/promise-button/promise-button.css +0 -5
- package/dist/lib/node_modules/@flarehr/beacon/dist/collection/components/style-guide/style-guide.css +0 -0
- package/dist/lib/node_modules/@stencil/router/dist/collection/components/route/route.css +0 -3
- package/dist/lib/types/components/cars-calculator-app/api/api-client.d.ts +0 -2
- package/dist/lib/types/components/cars-calculator-app/api/cars-calculator.api.d.ts +0 -96
- package/dist/lib/types/components/cars-calculator-app/cars-calculator-app.d.ts +0 -15
- package/dist/lib/types/components/cars-calculator-app/modal-section/modal-section.d.ts +0 -16
- package/dist/lib/types/components/cars-calculator-app/notifications-section/notifications-section.d.ts +0 -5
- package/dist/lib/types/components/cars-calculator-app/pages/choose-vehicle-section.component.d.ts +0 -23
- package/dist/lib/types/components/cars-calculator-app/pages/complete-section.component.d.ts +0 -5
- package/dist/lib/types/components/cars-calculator-app/pages/cost-breakdown-section.component.d.ts +0 -6
- package/dist/lib/types/components/cars-calculator-app/pages/model-variants-section.component.d.ts +0 -12
- package/dist/lib/types/components/cars-calculator-app/pages/personal-info-section.component.d.ts +0 -10
- package/dist/lib/types/components/cars-calculator-app/pages/quote-result-section.component.d.ts +0 -13
- package/dist/lib/types/components/cars-calculator-app/pages/submit-quote-section.component.d.ts +0 -10
- package/dist/lib/types/components/cars-calculator-app/services/app-configuration.service.d.ts +0 -7
- package/dist/lib/types/components/cars-calculator-app/services/cars-calculator.service.d.ts +0 -11
- package/dist/lib/types/components/cars-calculator-app/services/notifications.service.d.ts +0 -15
- package/dist/lib/types/components/cars-calculator-app/services/notifications.store.d.ts +0 -14
- package/dist/lib/types/components/cars-calculator-app/services/session.query.d.ts +0 -25
- package/dist/lib/types/components/cars-calculator-app/services/session.store.d.ts +0 -74
- package/dist/lib/types/components.d.ts +0 -170
- package/dist/lib/types/global/config.d.ts +0 -2
- package/dist/lib/types/global/main.d.ts +0 -1
- package/dist/lib/types/global/main.dev.d.ts +0 -1
- package/dist/lib/types/index.d.ts +0 -2
- package/dist/lib/types/stencil-public-runtime.d.ts +0 -1555
- package/dist/lib/types/utils/config.d.ts +0 -2
- package/dist/lib/types/utils/index.d.ts +0 -7
- package/dist/lib/types/utils/lazy.d.ts +0 -12
- package/readme.md +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{v as r}from"./p-6bd16f5b.js";const e=new RegExp(["(\\\\.)","(?:\\:(\\w+)(?:\\(((?:\\\\.|[^\\\\()])+)\\))?|\\(((?:\\\\.|[^\\\\()])+)\\))([+*?])?"].join("|"),"g"),t=r=>r.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1"),n=r=>r.replace(/([=!:$/()])/g,"\\$1"),a=r=>r&&r.sensitive?"":"i",l=(r,e,n)=>{for(var l=(n=n||{}).strict,i=!1!==n.end,p=t(n.delimiter||"/"),o=n.delimiters||"./",s=[].concat(n.endsWith||[]).map(t).concat("$").join("|"),u="",f=!1,v=0;v<r.length;v++){var c=r[v];if("string"==typeof c)u+=t(c),f=v===r.length-1&&o.indexOf(c[c.length-1])>-1;else{var g=t(c.prefix||""),x=c.repeat?"(?:"+c.pattern+")(?:"+g+"(?:"+c.pattern+"))*":c.pattern;e&&e.push(c),u+=c.optional?c.partial?g+"("+x+")?":"(?:"+g+"("+x+"))?":g+"("+x+")"}}return i?(l||(u+="(?:"+p+")?"),u+="$"===s?"$":"(?="+s+")"):(l||(u+="(?:"+p+"(?="+s+"))?"),f||(u+="(?="+p+"|"+s+")")),new RegExp("^"+u,a(n))},i=(r,p,o)=>r instanceof RegExp?((r,e)=>{if(!e)return r;var t=r.source.match(/\((?!\?)/g);if(t)for(var n=0;n<t.length;n++)e.push({name:n,prefix:null,delimiter:null,optional:!1,repeat:!1,partial:!1,pattern:null});return r})(r,p):Array.isArray(r)?((r,e,t)=>{for(var n=[],l=0;l<r.length;l++)n.push(i(r[l],e,t).source);return new RegExp("(?:"+n.join("|")+")",a(t))})(r,p,o):((r,a,i)=>l(((r,a)=>{for(var l,i=[],p=0,o=0,s="",u=a&&a.delimiter||"/",f=a&&a.delimiters||"./",v=!1;null!==(l=e.exec(r));){var c=l[0],g=l[1],x=l.index;if(s+=r.slice(o,x),o=x+c.length,g)s+=g[1],v=!0;else{var $="",m=r[o],d=l[2],y=l[3],E=l[4],w=l[5];if(!v&&s.length){var R=s.length-1;f.indexOf(s[R])>-1&&($=s[R],s=s.slice(0,R))}s&&(i.push(s),s="",v=!1);var h=$||u,b=y||E;i.push({name:d||p++,prefix:$,delimiter:h,optional:"?"===w||"*"===w,repeat:"+"===w||"*"===w,partial:""!==$&&void 0!==m&&m!==$,pattern:b?n(b):"[^"+t(h)+"]+?"})}}return(s||o<r.length)&&i.push(s+r.substr(o)),i})(r,i),a,i))(r,p,o);let p=0;const o={},s=(r,e={})=>{"string"==typeof e&&(e={path:e});const{path:t="/",exact:n=!1,strict:a=!1}=e,{re:l,keys:s}=((r,e)=>{const t=`${e.end}${e.strict}`,n=o[t]||(o[t]={}),a=JSON.stringify(r);if(n[a])return n[a];const l=[],s={re:i(r,l,e),keys:l};return p<1e4&&(n[a]=s,p+=1),s})(t,{end:n,strict:a}),u=l.exec(r);if(!u)return null;const[f,...v]=u,c=r===f;return n&&!c?null:{path:t,url:"/"===t&&""===f?"/":f,isExact:c,params:s.reduce(((r,e,t)=>(r[e.name]=v[t],r)),{})}},u=(e,t)=>null==e&&null==t||null!=t&&e&&t&&e.path===t.path&&e.url===t.url&&r(e.params,t.params);export{u as a,s as m}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as t,h as n,o as r,s as e,i as o,O as s,S as i,c}from"./p-68c136da.js";function u(t,n){return function(r){if("function"!=typeof t)throw new TypeError("argument is not a function. Are you looking for `mapTo()`?");return r.lift(new f(t,n))}}class f{constructor(t,n){this.project=t,this.thisArg=n}call(t,n){return n.subscribe(new h(t,this.project,this.thisArg))}}class h extends t{constructor(t,n,r){super(t),this.project=n,this.count=0,this.thisArg=r||this}_next(t){let n;try{n=this.project.call(this.thisArg,t,this.count++)}catch(t){return void this.destination.error(t)}this.destination.next(n)}}const a="function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator",l=t=>t&&"number"==typeof t.length&&"function"!=typeof t;function p(t){return!!t&&"function"!=typeof t.subscribe&&"function"==typeof t.then}const y=t=>{if(t&&"function"==typeof t[r])return c=t,t=>{const n=c[r]();if("function"!=typeof n.subscribe)throw new TypeError("Provided object does not correctly implement Symbol.observable");return n.subscribe(t)};if(l(t))return e(t);if(p(t))return i=t,t=>(i.then((n=>{t.closed||(t.next(n),t.complete())}),(n=>t.error(n))).then(null,n),t);if(t&&"function"==typeof t[a])return s=t,t=>{const n=s[a]();for(;;){let r;try{r=n.next()}catch(n){return t.error(n),t}if(r.done){t.complete();break}if(t.next(r.value),t.closed)break}return"function"==typeof n.return&&t.add((()=>{n.return&&n.return()})),t};{const n=o(t)?"an invalid object":`'${t}'`;throw new TypeError(`You provided ${n} where a stream was expected. You can provide an Observable, Promise, Array, or Iterable.`)}var s,i,c};function w(t,n){return n?function(t,n){if(null!=t){if(function(t){return t&&"function"==typeof t[r]}(t))return function(t,n){return new s((e=>{const o=new i;return o.add(n.schedule((()=>{const s=t[r]();o.add(s.subscribe({next(t){o.add(n.schedule((()=>e.next(t))))},error(t){o.add(n.schedule((()=>e.error(t))))},complete(){o.add(n.schedule((()=>e.complete())))}}))}))),o}))}(t,n);if(p(t))return function(t,n){return new s((r=>{const e=new i;return e.add(n.schedule((()=>t.then((t=>{e.add(n.schedule((()=>{r.next(t),e.add(n.schedule((()=>r.complete())))})))}),(t=>{e.add(n.schedule((()=>r.error(t))))}))))),e}))}(t,n);if(l(t))return c(t,n);if(function(t){return t&&"function"==typeof t[a]}(t)||"string"==typeof t)return function(t,n){if(!t)throw new Error("Iterable cannot be null");return new s((r=>{const e=new i;let o;return e.add((()=>{o&&"function"==typeof o.return&&o.return()})),e.add(n.schedule((()=>{o=t[a](),e.add(n.schedule((function(){if(r.closed)return;let t,n;try{const r=o.next();t=r.value,n=r.done}catch(t){return void r.error(t)}n?r.complete():(r.next(t),this.schedule())})))}))),e}))}(t,n)}throw new TypeError((null!==t&&typeof t||t)+" is not observable")}(t,n):t instanceof s?t:new s(y(t))}class b extends t{constructor(t){super(),this.parent=t}_next(t){this.parent.notifyNext(t)}_error(t){this.parent.notifyError(t),this.unsubscribe()}_complete(){this.parent.notifyComplete(),this.unsubscribe()}}class m extends t{notifyNext(t){this.destination.next(t)}notifyError(t){this.destination.error(t)}notifyComplete(){this.destination.complete()}}function d(t,n){if(!n.closed)return t instanceof s?t.subscribe(n):y(t)(n)}function x(t,n){return function(r){return r.lift(new v(t,n))}}class v{constructor(t,n){this.predicate=t,this.thisArg=n}call(t,n){return n.subscribe(new S(t,this.predicate,this.thisArg))}}class S extends t{constructor(t,n,r){super(t),this.predicate=n,this.thisArg=r,this.count=0}_next(t){let n;try{n=this.predicate.call(this.thisArg,t,this.count++)}catch(t){return void this.destination.error(t)}n&&this.destination.next(t)}}function E(t,n){return r=>r.lift(new _(t,n))}class _{constructor(t,n){this.compare=t,this.keySelector=n}call(t,n){return n.subscribe(new T(t,this.compare,this.keySelector))}}class T extends t{constructor(t,n,r){super(t),this.keySelector=r,this.hasKey=!1,"function"==typeof n&&(this.compare=n)}compare(t,n){return t===n}_next(t){let n;try{const{keySelector:r}=this;n=r?r(t):t}catch(t){return this.destination.error(t)}let r=!1;if(this.hasKey)try{const{compare:t}=this;r=t(this.key,n)}catch(t){return this.destination.error(t)}else this.hasKey=!0;r||(this.key=n,this.destination.next(t))}}export{m as S,b as a,x as b,E as d,w as f,d as i,u as m}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as t,a as s}from"./p-50fe790f.js";const e=class{constructor(s){t(this,s),this.context={},this.renderer=()=>null}connectedCallback(){null!=this.subscribe&&(this.unsubscribe=this.subscribe(this.el,"context"))}disconnectedCallback(){null!=this.unsubscribe&&this.unsubscribe()}render(){return this.renderer(Object.assign({},this.context))}get el(){return s(this)}};export{e as context_consumer}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as t,a as s}from"./p-50fe790f.js";import{A as e}from"./p-06a1f65f.js";const i=class{constructor(s){t(this,s),this.titleSuffix="",this.pageTitle=""}updateDocumentTitle(){const t=this.el;t.ownerDocument&&(t.ownerDocument.title=`${this.pageTitle}${this.titleSuffix||""}`)}componentWillLoad(){this.updateDocumentTitle()}get el(){return s(this)}static get watchers(){return{pageTitle:["updateDocumentTitle"]}}};e.injectProps(i,["titleSuffix"]);export{i as stencil_route_title}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as t,h as s,a as i}from"./p-50fe790f.js";import{A as h}from"./p-06a1f65f.js";import{m as o,a as e}from"./p-14054f15.js";import"./p-6bd16f5b.js";const n=class{constructor(s){t(this,s),this.group=null,this.match=null,this.componentProps={},this.exact=!1,this.scrollOnNextRender=!1,this.previousMatch=null}computeMatch(t){const s=null!=this.group||null!=this.el.parentElement&&"stencil-route-switch"===this.el.parentElement.tagName.toLowerCase();if(t&&!s)return this.previousMatch=this.match,this.match=o(t.pathname,{path:this.url,exact:this.exact,strict:!0})}async loadCompleted(){let t={};this.history&&this.history.location.hash?t={scrollToId:this.history.location.hash.substr(1)}:this.scrollTopOffset&&(t={scrollTopOffset:this.scrollTopOffset}),"function"==typeof this.componentUpdated?this.componentUpdated(t):this.match&&!e(this.match,this.previousMatch)&&this.routeViewsUpdated&&this.routeViewsUpdated(t)}async componentDidUpdate(){await this.loadCompleted()}async componentDidLoad(){await this.loadCompleted()}render(){if(!this.match||!this.history)return null;const t=Object.assign({},this.componentProps,{history:this.history,match:this.match});return this.routeRender?this.routeRender(Object.assign({},t,{component:this.component})):this.component?s(this.component,Object.assign({},t)):void 0}get el(){return i(this)}static get watchers(){return{location:["computeMatch"]}}};h.injectProps(n,["location","history","historyType","routeViewsUpdated"]),n.style="stencil-route.inactive{display:none}";export{n as stencil_route}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as e,h as s,H as l}from"./p-50fe790f.js";import"./p-f603197d.js";import"./p-68c136da.js";import"./p-b33fc683.js";import"./p-24a37d64.js";import{a as t,s as o,i as c}from"./p-3d4d2683.js";const a=class{constructor(l){e(this,l),this.areStylesLoaded=!1,this.isVariantSelected=!1,this.isQuoteCalculated=!1,this.renderModelSelection=()=>s("div",{class:"row mt-4"},s("div",{class:"col"},s("ap-ben-choose-vehicle-section",null))),this.renderQuoteCalculation=()=>[s("div",{class:"row mt-4"},s("div",{class:"col-12 col-md-6 col-lg-7 d-flex flex-column justify-content-between"},s("ap-ben-personal-info-section",null),s("div",{class:"mt-4 d-none d-lg-block"},s(this.disclaimer,null))),s("div",{class:"col-12 col-md-6 col-lg-5 mt-4 mt-md-0"},this.isQuoteCalculated&&s("ap-ben-quote-result-section",null))),s("div",{class:"row my-4 d-lg-none"},s("div",{class:"col-12"},s(this.disclaimer,null)))],this.disclaimer=()=>s("div",{class:"bg-light p-4"},"Figures shown are estimates only and are based on an estimated driveaway price of the vehicle which includes dealer delivery, CTP, Rego and Stamp duty.")}componentDidLoad(){t.apiBaseUrl=this.apiBaseUrl}componentWillLoad(){o.selectedVariant$.subscribe((e=>{this.isVariantSelected=c(e)})),o.quote$.subscribe((e=>{this.isQuoteCalculated="Not calculated"!==e.quoteState}))}render(){return s(l,{class:"d-flex flex-column flex-fill justify-content-between"},this.fetchStyles(),this.areStylesLoaded&&this.renderAppContent())}fetchStyles(){return[s("link",{rel:"stylesheet",href:"https://npm-cdn.flarehr.com/@flarehr/beacon@dev/dist/beacon/beacon.css",media:"all",onLoad:()=>this.areStylesLoaded=!0})]}renderAppContent(){return s("div",{class:"abe-app-container d-flex flex-grow-1 justify-content-center"},s("div",{class:"container my-0 my-lg-4"},s("div",{class:{row:!0,"d-none d-lg-flex":this.isVariantSelected}},s("div",{class:"col text-center"},s("h2",null,"Novated Lease Calculator"),s("p",{class:"text-muted"},"Get an estimate in seconds and find out how much you could save"))),!this.isVariantSelected&&this.renderModelSelection(),s("div",{class:"row"},s("div",{class:"col"},s("ap-ben-model-variants-section",null))),this.isVariantSelected&&this.renderQuoteCalculation()))}};a.style=".abe-app-container{--fl-color-primary:#3a6cc8;--fl-color-primary-light:#517ccc;--fl-color-primary-dark:#3a6cc8;--fl-color-primary-disabled:#517ccc;--fl-color-primary-hover:#3a6cc8;--fl-color-primary-focus:#3a6cc8;--fl-color-primary-text:white;--fl-color-secondary:#e5e5e5;--fl-color-secondary-hover:#b3b3b3;--fl-color-secondary-focus:#b3b3b3;font-size:0.9rem;line-height:1.7}@media screen and (-webkit-min-device-pixel-ratio: 0){select,textarea,input{font-size:16px}}";export{a as cars_calculator_app}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{S as n,a as t,Q as r}from"./p-f603197d.js";var e=function(n){return"Some"===n._tag},u=function(n){return"None"===n._tag},i={_tag:"None"},c=function(n){return{_tag:"Some",value:n}};function o(n){return null==n?i:c(n)}function f(n,t){return function(r){return u(r)?n():t(r.value)}}var a=function(n){return function(t){return u(t)?n():t.value}},s=a;function l(n,t,r){return n(r={path:t,exports:{},require:function(){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}()}},r.exports),r.exports}var h=l((function(n,t){function r(n){return n}function e(n){return function(){return n}}function u(){throw new Error("Called `absurd` function which should be uncallable")}Object.defineProperty(t,"__esModule",{value:!0}),t.bindTo_=t.bind_=t.hole=t.pipe=t.untupled=t.tupled=t.absurd=t.decrement=t.increment=t.tuple=t.flow=t.flip=t.constVoid=t.constUndefined=t.constNull=t.constFalse=t.constTrue=t.constant=t.not=t.unsafeCoerce=t.identity=void 0,t.identity=r,t.unsafeCoerce=r,t.not=function(n){return function(t){return!n(t)}},t.constant=e,t.constTrue=e(!0),t.constFalse=e(!1),t.constNull=e(null),t.constUndefined=e(void 0),t.constVoid=t.constUndefined,t.flip=function(n){return function(t,r){return n(r,t)}},t.flow=function(n,t,r,e,u,i,c,o,f){switch(arguments.length){case 1:return n;case 2:return function(){return t(n.apply(this,arguments))};case 3:return function(){return r(t(n.apply(this,arguments)))};case 4:return function(){return e(r(t(n.apply(this,arguments))))};case 5:return function(){return u(e(r(t(n.apply(this,arguments)))))};case 6:return function(){return i(u(e(r(t(n.apply(this,arguments))))))};case 7:return function(){return c(i(u(e(r(t(n.apply(this,arguments)))))))};case 8:return function(){return o(c(i(u(e(r(t(n.apply(this,arguments))))))))};case 9:return function(){return f(o(c(i(u(e(r(t(n.apply(this,arguments)))))))))}}},t.tuple=function(){for(var n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];return n},t.increment=function(n){return n+1},t.decrement=function(n){return n-1},t.absurd=u,t.tupled=function(n){return function(t){return n.apply(void 0,t)}},t.untupled=function(n){return function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return n(t)}},t.pipe=function(n,t,r,e,u,i,c,o,f,a,s,l,h,p,d,m,v,b,g,y){switch(arguments.length){case 1:return n;case 2:return t(n);case 3:return r(t(n));case 4:return e(r(t(n)));case 5:return u(e(r(t(n))));case 6:return i(u(e(r(t(n)))));case 7:return c(i(u(e(r(t(n))))));case 8:return o(c(i(u(e(r(t(n)))))));case 9:return f(o(c(i(u(e(r(t(n))))))));case 10:return a(f(o(c(i(u(e(r(t(n)))))))));case 11:return s(a(f(o(c(i(u(e(r(t(n))))))))));case 12:return l(s(a(f(o(c(i(u(e(r(t(n)))))))))));case 13:return h(l(s(a(f(o(c(i(u(e(r(t(n))))))))))));case 14:return p(h(l(s(a(f(o(c(i(u(e(r(t(n)))))))))))));case 15:return d(p(h(l(s(a(f(o(c(i(u(e(r(t(n))))))))))))));case 16:return m(d(p(h(l(s(a(f(o(c(i(u(e(r(t(n)))))))))))))));case 17:return v(m(d(p(h(l(s(a(f(o(c(i(u(e(r(t(n))))))))))))))));case 18:return b(v(m(d(p(h(l(s(a(f(o(c(i(u(e(r(t(n)))))))))))))))));case 19:return g(b(v(m(d(p(h(l(s(a(f(o(c(i(u(e(r(t(n))))))))))))))))));case 20:return y(g(b(v(m(d(p(h(l(s(a(f(o(c(i(u(e(r(t(n)))))))))))))))))))}},t.hole=u,t.bind_=function(n,t,r){var e;return Object.assign({},n,((e={})[t]=r,e))},t.bindTo_=function(n){return function(t){var r;return(r={})[n]=t,r}}})),p=l((function(n,t){function r(n){return null==n?t.none:t.some(n)}function e(n){return"Right"===n._tag?t.none:t.some(n.left)}function u(n){return"Left"===n._tag?t.none:t.some(n.right)}function i(n){return function(e){return t.isNone(e)?t.none:r(n(e.value))}}Object.defineProperty(t,"__esModule",{value:!0}),t.getApplySemigroup=t.getOrd=t.getEq=t.getShow=t.URI=t.wilt=t.wither=t.sequence=t.traverse=t.partitionMap=t.partition=t.filterMap=t.filter=t.separate=t.compact=t.reduceRight=t.foldMap=t.reduce=t.duplicate=t.extend=t.throwError=t.zero=t.alt=t.altW=t.flatten=t.chainFirst=t.chain=t.of=t.apSecond=t.apFirst=t.ap=t.map=t.chainNullableK=t.mapNullable=t.fromNullableK=t.getOrElse=t.getOrElseW=t.toUndefined=t.toNullable=t.fold=t.fromEither=t.getRight=t.getLeft=t.tryCatch=t.fromPredicate=t.fromNullable=t.some=t.none=t.isNone=t.isSome=void 0,t.sequenceArray=t.traverseArray=t.traverseArrayWithIndex=t.apS=t.bind=t.bindTo=t.Do=t.getRefinement=t.exists=t.elem=t.option=t.MonadThrow=t.Witherable=t.Traversable=t.Filterable=t.Compactable=t.Extend=t.Alternative=t.Alt=t.Foldable=t.Monad=t.Applicative=t.Functor=t.getMonoid=t.getLastMonoid=t.getFirstMonoid=t.getApplyMonoid=void 0,t.isSome=function(n){return"Some"===n._tag},t.isNone=function(n){return"None"===n._tag},t.none={_tag:"None"},t.some=function(n){return{_tag:"Some",value:n}},t.fromNullable=r,t.fromPredicate=function(n){return function(r){return n(r)?t.some(r):t.none}},t.tryCatch=function(n){try{return t.some(n())}catch(n){return t.none}},t.getLeft=e,t.getRight=u,t.fromEither=u,t.fold=function(n,r){return function(e){return t.isNone(e)?n():r(e.value)}},t.toNullable=function(n){return t.isNone(n)?null:n.value},t.toUndefined=function(n){return t.isNone(n)?void 0:n.value},t.getOrElseW=function(n){return function(r){return t.isNone(r)?n():r.value}},t.getOrElse=t.getOrElseW,t.fromNullableK=function(n){return function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return r(n.apply(void 0,t))}},t.mapNullable=i,t.chainNullableK=i;var c=function(n,r){return h.pipe(n,t.map(r))},o=function(n,r){return h.pipe(n,t.ap(r))},f=function(n,r){return h.pipe(n,t.chain(r))},a=function(n,r,e){return h.pipe(n,t.reduce(r,e))},s=function(n){var r=t.foldMap(n);return function(n,t){return h.pipe(n,r(t))}},l=function(n,r,e){return h.pipe(n,t.reduceRight(r,e))},p=function(n){var r=t.traverse(n);return function(n,t){return h.pipe(n,r(t))}},d=function(n,r){return h.pipe(n,t.alt(r))},m=function(n,r){return h.pipe(n,t.filter(r))},v=function(n,r){return h.pipe(n,t.filterMap(r))},b=function(n,r){return h.pipe(n,t.extend(r))},g=function(n,r){return h.pipe(n,t.partition(r))},y=function(n,r){return h.pipe(n,t.partitionMap(r))},R=function(n){var r=t.wither(n);return function(n,t){return h.pipe(n,r(t))}},w=function(n){var r=t.wilt(n);return function(n,t){return h.pipe(n,r(t))}};t.map=function(n){return function(r){return t.isNone(r)?t.none:t.some(n(r.value))}},t.ap=function(n){return function(r){return t.isNone(r)||t.isNone(n)?t.none:t.some(r.value(n.value))}},t.apFirst=function(n){return h.flow(t.map((function(n){return function(){return n}})),t.ap(n))},t.apSecond=function(n){return h.flow(t.map((function(){return function(n){return n}})),t.ap(n))},t.of=t.some,t.chain=function(n){return function(r){return t.isNone(r)?t.none:n(r.value)}},t.chainFirst=function(n){return t.chain((function(r){return h.pipe(n(r),t.map((function(){return r})))}))},t.flatten=t.chain(h.identity),t.altW=function(n){return function(r){return t.isNone(r)?n():r}},t.alt=t.altW,t.zero=function(){return t.none},t.throwError=function(){return t.none},t.extend=function(n){return function(r){return t.isNone(r)?t.none:t.some(n(r))}},t.duplicate=t.extend(h.identity),t.reduce=function(n,r){return function(e){return t.isNone(e)?n:r(n,e.value)}},t.foldMap=function(n){return function(r){return function(e){return t.isNone(e)?n.empty:r(e.value)}}},t.reduceRight=function(n,r){return function(e){return t.isNone(e)?n:r(e.value,n)}},t.compact=t.flatten;var I={left:t.none,right:t.none};function U(n){return{equals:function(r,e){return r===e||(t.isNone(r)?t.isNone(e):!t.isNone(e)&&n.equals(r.value,e.value))}}}function j(n){return{concat:function(r,e){return t.isSome(r)&&t.isSome(e)?t.some(n.concat(r.value,e.value)):t.none}}}t.separate=function(n){var r=h.pipe(n,t.map((function(n){return{left:e(n),right:u(n)}})));return t.isNone(r)?I:r.value},t.filter=function(n){return function(r){return t.isNone(r)?t.none:n(r.value)?r:t.none}},t.filterMap=function(n){return function(r){return t.isNone(r)?t.none:n(r.value)}},t.partition=function(n){return function(t){return{left:m(t,(function(t){return!n(t)})),right:m(t,n)}}},t.partitionMap=function(n){return h.flow(t.map(n),t.separate)},t.traverse=function(n){return function(r){return function(e){return t.isNone(e)?n.of(t.none):n.map(r(e.value),t.some)}}},t.sequence=function(n){return function(r){return t.isNone(r)?n.of(t.none):n.map(r.value,t.some)}},t.wither=function(n){return function(r){return function(e){return t.isNone(e)?n.of(t.none):r(e.value)}}},t.wilt=function(n){return function(r){return function(i){return t.isNone(i)?n.of({left:t.none,right:t.none}):n.map(r(i.value),(function(n){return{left:e(n),right:u(n)}}))}}},t.URI="Option",t.getShow=function(n){return{show:function(r){return t.isNone(r)?"none":"some("+n.show(r.value)+")"}}},t.getEq=U,t.getOrd=function(n){return{equals:U(n).equals,compare:function(r,e){return r===e?0:t.isSome(r)?t.isSome(e)?n.compare(r.value,e.value):1:-1}}},t.getApplySemigroup=j,t.getApplyMonoid=function(n){return{concat:j(n).concat,empty:t.some(n.empty)}},t.getFirstMonoid=function(){return{concat:function(n,r){return t.isNone(n)?r:n},empty:t.none}},t.getLastMonoid=function(){return{concat:function(n,r){return t.isNone(r)?n:r},empty:t.none}},t.getMonoid=function(n){return{concat:function(r,e){return t.isNone(r)?e:t.isNone(e)?r:t.some(n.concat(r.value,e.value))},empty:t.none}},t.Functor={URI:t.URI,map:c},t.Applicative={URI:t.URI,map:c,ap:o,of:t.of},t.Monad={URI:t.URI,map:c,ap:o,of:t.of,chain:f},t.Foldable={URI:t.URI,reduce:a,foldMap:s,reduceRight:l},t.Alt={URI:t.URI,map:c,alt:d},t.Alternative={URI:t.URI,map:c,ap:o,of:t.of,alt:d,zero:t.zero},t.Extend={URI:t.URI,map:c,extend:b},t.Compactable={URI:t.URI,compact:t.compact,separate:t.separate},t.Filterable={URI:t.URI,map:c,compact:t.compact,separate:t.separate,filter:m,filterMap:v,partition:g,partitionMap:y},t.Traversable={URI:t.URI,map:c,reduce:a,foldMap:s,reduceRight:l,traverse:p,sequence:t.sequence},t.Witherable={URI:t.URI,map:c,reduce:a,foldMap:s,reduceRight:l,traverse:p,sequence:t.sequence,compact:t.compact,separate:t.separate,filter:m,filterMap:v,partition:g,partitionMap:y,wither:R,wilt:w},t.MonadThrow={URI:t.URI,map:c,ap:o,of:t.of,chain:f,throwError:t.throwError},t.option={URI:t.URI,map:c,of:t.of,ap:o,chain:f,reduce:a,foldMap:s,reduceRight:l,traverse:p,sequence:t.sequence,zero:t.zero,alt:d,extend:b,compact:t.compact,separate:t.separate,filter:m,filterMap:v,partition:g,partitionMap:y,wither:R,wilt:w,throwError:t.throwError},t.elem=function(n){return function(r,e){return!t.isNone(e)&&n.equals(r,e.value)}},t.exists=function(n){return function(r){return!t.isNone(r)&&n(r.value)}},t.getRefinement=function(n){return function(r){return t.isSome(n(r))}},t.Do=t.of({}),t.bindTo=function(n){return t.map(h.bindTo_(n))},t.bind=function(n,r){return t.chain((function(e){return h.pipe(r(e),t.map((function(t){return h.bind_(e,n,t)})))}))},t.apS=function(n,r){return h.flow(t.map((function(t){return function(r){return h.bind_(t,n,r)}})),t.ap(r))},t.traverseArrayWithIndex=function(n){return function(r){for(var e=[],u=0;u<r.length;u++){var i=n(u,r[u]);if(t.isNone(i))return t.none;e.push(i.value)}return t.some(e)}},t.traverseArray=function(n){return t.traverseArrayWithIndex((function(t,r){return n(r)}))},t.sequenceArray=t.traverseArray(h.identity)}));class d{set apiBaseUrl(n){d._apiBaseUrl=p.fromNullable(n)}get apiBaseUrl(){if(p.isNone(d._apiBaseUrl))throw Error("API base URL is not set");return d._apiBaseUrl.value}}const m=new d;let v=class extends t{constructor(){super({vehicle:{make:i,makeId:i,model:i,modelId:i,year:i,bodyType:i,bodyTypeId:i,selectedVariant:i,isUsedCarRequested:c(!1),approximatePrice:i},user:{annualSalary:i,annualKms:i,paymentPeriod:i,state:i,term:i},quote:{afterTaxEffectPerPayCycle:i,taxSaving:i,residualValue:i,financedAmount:i,fuel:i,serviceAndMaintenance:i,registrationAndCtp:i,comprehensiveInsurance:i,managementFee:i,quoteState:"Not calculated"},userDetails:{employerName:i,userFirstName:i,userLastName:i,contactNumber:i,emailAddress:i},refLists:{makeList:i,modelList:i,yearList:i,bodyTypeList:i,modelVariantsList:i}})}updateQuote(n){this.update({quote:n})}setVehicleState(n,t){this.update((r=>Object.assign(Object.assign({},r),{vehicle:Object.assign(Object.assign({},r.vehicle),{[n]:null===t?i:c(t)})})))}updateList(n,t){this.update((r=>Object.assign(Object.assign({},r),{refLists:Object.assign(Object.assign({},r.refLists),{[n]:c(t)})})))}};v=function(n,t,r,e){var u,i=arguments.length,c=i<3?t:null===e?e=Object.getOwnPropertyDescriptor(t,r):e;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)c=Reflect.decorate(n,t,r,e);else for(var o=n.length-1;o>=0;o--)(u=n[o])&&(c=(i<3?u(c):i>3?u(t,r,c):u(t,r))||c);return i>3&&c&&Object.defineProperty(t,r,c),c}([n({name:"cars-calc-session",resettable:!0})],v);const b=new v,g=new class extends r{constructor(n){super(n),this.store=n,this.vehicle$=this.select((n=>n.vehicle)),this.user$=this.select((n=>n.user)),this.result$=this.select((n=>n.quote)),this.userDetails$=this.select((n=>n.userDetails)),this.makeList$=this.select((n=>n.refLists.makeList)),this.modelList$=this.select((n=>n.refLists.modelList)),this.yearList$=this.select((n=>n.refLists.yearList)),this.bodyTypeList$=this.select((n=>n.refLists.bodyTypeList)),this.modelVariantsList$=this.select((n=>n.refLists.modelVariantsList)),this.selectedVariant$=this.select((n=>n.vehicle.selectedVariant)),this.quote$=this.select((n=>n.quote))}get selectedVariant(){return this.getValue().vehicle.selectedVariant}get vehicle(){return this.getValue().vehicle}get user(){return this.getValue().user}get result(){return this.getValue().quote}get userDetails(){return this.getValue().userDetails}}(b);export{m as a,u as b,b as c,f as d,c as e,o as f,s as g,a as h,e as i,i as n,g as s}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as l,h as s,H as t}from"./p-50fe790f.js";import{e,O as i,d as a}from"./p-68c136da.js";import{i as n,o as r,d as o}from"./p-b33fc683.js";function c(l){return!e(l)&&l-parseFloat(l)+1>=0}function u(l){const{index:s,period:t,subscriber:e}=l;if(e.next(s),!e.closed){if(-1===t)return e.complete();l.index=s+1,this.schedule(l,t)}}const d=l=>{const s=document.querySelector('script[data-fl-namespace="design-system"][data-fl-resources-url]'),t=s&&s.getAttribute("data-fl-resources-url")||"";try{return new URL(l,t).href}catch(s){return`${t}/${l}`}},m=class{constructor(s){l(this,s),this.data=["Apple","Application","Appetizer","Anna","Banana","Archery","Apogee"].map((l=>({label:l,value:l}))),this.searchFunction=l=>{const s=this.data.filter((s=>s.label.toLowerCase().includes(l.toLowerCase())));return r(s).pipe(o(1e3)).toPromise()}}render(){return s(t,null,s("link",{rel:"stylesheet",href:d("beacon.css"),media:"all"}),this.themeCssUrl&&s("link",{rel:"stylesheet",href:this.themeCssUrl,media:"all"}),s("div",{class:"container m-3 p-5 shadow"},s("h1",null,"Beacon"),s("h5",null,"Flare-Apollo Component Library 🚀"),s("div",{class:"row"},s("div",{class:"col"},s("ul",{class:"list-group"},s("li",{class:"list-group-item"},s("small",{class:"text-muted"},"Typography"),s("div",{class:"col"},s("h1",null,"h1 Heading"),s("h2",null,"h2 Sub-heading"),s("h3",null,"h3 Sub-heading"),s("h4",null,"h4 Sub-heading"),s("p",null,"Paragraph"),s("div",{class:"d-flex flex-column"},s("strong",null,"Strong"),s("small",null,"small"),s("a",{href:"https://www.flarehr.com",target:"_blank"},"Weblink")))),s("li",{class:"list-group-item"},s("small",{class:"text-muted"},"Buttons"),s("div",{class:"col-3 my-2"},this.renderButtonVariants())),s("li",{class:"list-group-item"},s("small",{class:"text-muted"},"Loading indicator"),s("div",{class:"col"},s("fl-loading-indicator",null),s("fl-loading-indicator",{theme:"dark"}))),s("li",{class:"list-group-item"},s("small",{class:"text-muted"},"Dropdown"),s("div",{class:"col-4"},s("fl-dropdown",{options:this.data}))),s("li",{class:"list-group-item"},s("small",{class:"text-muted"},"Async Dropdown"),s("div",{class:"col-4"},s("fl-dropdown-async",{"min-search-string-length":"2",searchFunction:this.searchFunction}))),s("li",{class:"list-group-item"},s("small",{class:"text-muted"},"Promise Button"),s("div",{class:"col-3 my-2"},s("fl-promise-button",{isBlockElement:!0,promiseFn:()=>this.takeTime()},"Promise Button block")),s("div",{class:"col-3 my-2"},s("fl-promise-button",{promiseFn:()=>this.takeTime()},"Promise Button")),s("div",{class:"col-3 my-2"},s("fl-promise-button",{variant:"secondary",promiseFn:()=>this.takeTime()},"Secondary Promise Button"))))))))}renderButtonVariants(){return s("ul",{class:"list-group"},s("li",{class:"list-group-item"},s("i",null,"Primary"),s("fl-button",{isBlockElement:!0},"Button")),s("li",{class:"list-group-item"},s("i",null,"Primary, disabled"),s("fl-button",{isBlockElement:!0,disabled:!0},"Button")),s("li",{class:"list-group-item"},s("i",null,"Secondary"),s("fl-button",{isBlockElement:!0,variant:"secondary"},"Button")),s("li",{class:"list-group-item"},s("i",null,"Secondary, disabled"),s("fl-button",{isBlockElement:!0,disabled:!0,variant:"secondary"},"Button")))}async takeTime(){return function(l=0,s,t){let e=-1;return c(s)?e=Number(s)<1?1:Number(s):n(s)&&(t=s),n(t)||(t=a),new i((s=>{const i=c(l)?l:+l-t.now();return t.schedule(u,i,{index:0,period:e,subscriber:s})}))}(2e3*Math.random()+2e3).toPromise()}};m.style="";export{m as fl_style_guide}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
let e,t,n,l=!1,o=!1,s=!1,i=null,r=!1;const c="undefined"!=typeof window?window:{},a=c.document||{head:{}},f={t:0,l:"",jmp:e=>e(),raf:e=>requestAnimationFrame(e),ael:(e,t,n,l)=>e.addEventListener(t,n,l),rel:(e,t,n,l)=>e.removeEventListener(t,n,l),ce:(e,t)=>new CustomEvent(e,t)},u=e=>Promise.resolve(e),d=(()=>{try{return new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replace}catch(e){}return!1})(),$={},p=(e,t,n)=>{n&&n.map((([n,l,o])=>{const s=e,i=y(t,o),r=m(n);f.ael(s,l,i,r),(t.o=t.o||[]).push((()=>f.rel(s,l,i,r)))}))},y=(e,t)=>n=>{try{256&e.t?e.i[t](n):(e.u=e.u||[]).push([t,n])}catch(e){me(e)}},m=e=>0!=(2&e),h="http://www.w3.org/1999/xlink",b=new WeakMap,w=e=>"sc-"+e.$,k={},v=e=>"object"==(e=typeof e)||"function"===e,S=(e,t,...n)=>{let l=null,o=null,s=null,i=!1,r=!1,c=[];const a=t=>{for(let n=0;n<t.length;n++)l=t[n],Array.isArray(l)?a(l):null!=l&&"boolean"!=typeof l&&((i="function"!=typeof e&&!v(l))&&(l+=""),i&&r?c[c.length-1].p+=l:c.push(i?g(null,l):l),r=i)};if(a(n),t){t.key&&(o=t.key),t.name&&(s=t.name);{const e=t.className||t.class;e&&(t.class="object"!=typeof e?e:Object.keys(e).filter((t=>e[t])).join(" "))}}if("function"==typeof e)return e(null===t?{}:t,c,C);const f=g(e,null);return f.m=t,c.length>0&&(f.h=c),f.k=o,f.v=s,f},g=(e,t)=>({t:0,S:e,p:t,g:null,h:null,m:null,k:null,v:null}),j={},C={forEach:(e,t)=>e.map(M).forEach(t),map:(e,t)=>e.map(M).map(t).map(O)},M=e=>({vattrs:e.m,vchildren:e.h,vkey:e.k,vname:e.v,vtag:e.S,vtext:e.p}),O=e=>{if("function"==typeof e.vtag){const t=Object.assign({},e.vattrs);return e.vkey&&(t.key=e.vkey),e.vname&&(t.name=e.vname),S(e.vtag,t,...e.vchildren||[])}const t=g(e.vtag,e.vtext);return t.m=e.vattrs,t.h=e.vchildren,t.k=e.vkey,t.v=e.vname,t},R=(e,t,n,l,o,s)=>{if(n!==l){let i=ye(e,t),r=t.toLowerCase();if("class"===t){const t=e.classList,o=P(n),s=P(l);t.remove(...o.filter((e=>e&&!s.includes(e)))),t.add(...s.filter((e=>e&&!o.includes(e))))}else if("style"===t){for(const t in n)l&&null!=l[t]||(t.includes("-")?e.style.removeProperty(t):e.style[t]="");for(const t in l)n&&l[t]===n[t]||(t.includes("-")?e.style.setProperty(t,l[t]):e.style[t]=l[t])}else if("key"===t);else if("ref"===t)l&&l(e);else if(i||"o"!==t[0]||"n"!==t[1]){const c=v(l);if((i||c&&null!==l)&&!o)try{if(e.tagName.includes("-"))e[t]=l;else{let o=null==l?"":l;"list"===t?i=!1:null!=n&&e[t]==o||(e[t]=o)}}catch(e){}let a=!1;r!==(r=r.replace(/^xlink\:?/,""))&&(t=r,a=!0),null==l||!1===l?!1===l&&""!==e.getAttribute(t)||(a?e.removeAttributeNS(h,t):e.removeAttribute(t)):(!i||4&s||o)&&!c&&(l=!0===l?"":l,a?e.setAttributeNS(h,t,l):e.setAttribute(t,l))}else t="-"===t[2]?t.slice(3):ye(c,r)?r.slice(2):r[2]+t.slice(3),n&&f.rel(e,t,n,!1),l&&f.ael(e,t,l,!1)}},x=/\s/,P=e=>e?e.split(x):[],U=(e,t,n,l)=>{const o=11===t.g.nodeType&&t.g.host?t.g.host:t.g,s=e&&e.m||k,i=t.m||k;for(l in s)l in i||R(o,l,s[l],void 0,n,t.t);for(l in i)R(o,l,s[l],i[l],n,t.t)},L=(o,i,r,c)=>{let f,u,d,$=i.h[r],p=0;if(l||(s=!0,"slot"===$.S&&(e&&c.classList.add(e+"-s"),$.t|=$.h?2:1)),null!==$.p)f=$.g=a.createTextNode($.p);else if(1&$.t)f=$.g=a.createTextNode("");else if(f=$.g=a.createElement(2&$.t?"slot-fb":$.S),U(null,$,!1),null!=e&&f["s-si"]!==e&&f.classList.add(f["s-si"]=e),$.h)for(p=0;p<$.h.length;++p)u=L(o,$,p,f),u&&f.appendChild(u);return f["s-hn"]=n,3&$.t&&(f["s-sr"]=!0,f["s-cr"]=t,f["s-sn"]=$.v||"",d=o&&o.h&&o.h[r],d&&d.S===$.S&&o.g&&T(o.g,!1)),f},T=(e,t)=>{f.t|=1;const l=e.childNodes;for(let e=l.length-1;e>=0;e--){const o=l[e];o["s-hn"]!==n&&o["s-ol"]&&(A(o).insertBefore(o,q(o)),o["s-ol"].remove(),o["s-ol"]=void 0,s=!0),t&&T(o,t)}f.t&=-2},D=(e,t,l,o,s,i)=>{let r,c=e["s-cr"]&&e["s-cr"].parentNode||e;for(c.shadowRoot&&c.tagName===n&&(c=c.shadowRoot);s<=i;++s)o[s]&&(r=L(null,l,s,e),r&&(o[s].g=r,c.insertBefore(r,q(t))))},E=(e,t,n,l,s)=>{for(;t<=n;++t)(l=e[t])&&(s=l.g,z(l),o=!0,s["s-ol"]?s["s-ol"].remove():T(s,!0),s.remove())},W=(e,t)=>e.S===t.S&&("slot"===e.S?e.v===t.v:e.k===t.k),q=e=>e&&e["s-ol"]||e,A=e=>(e["s-ol"]?e["s-ol"]:e).parentNode,F=(e,t)=>{const n=t.g=e.g,l=e.h,o=t.h,s=t.p;let i;null===s?("slot"===t.S||U(e,t,!1),null!==l&&null!==o?((e,t,n,l)=>{let o,s,i=0,r=0,c=0,a=0,f=t.length-1,u=t[0],d=t[f],$=l.length-1,p=l[0],y=l[$];for(;i<=f&&r<=$;)if(null==u)u=t[++i];else if(null==d)d=t[--f];else if(null==p)p=l[++r];else if(null==y)y=l[--$];else if(W(u,p))F(u,p),u=t[++i],p=l[++r];else if(W(d,y))F(d,y),d=t[--f],y=l[--$];else if(W(u,y))"slot"!==u.S&&"slot"!==y.S||T(u.g.parentNode,!1),F(u,y),e.insertBefore(u.g,d.g.nextSibling),u=t[++i],y=l[--$];else if(W(d,p))"slot"!==u.S&&"slot"!==y.S||T(d.g.parentNode,!1),F(d,p),e.insertBefore(d.g,u.g),d=t[--f],p=l[++r];else{for(c=-1,a=i;a<=f;++a)if(t[a]&&null!==t[a].k&&t[a].k===p.k){c=a;break}c>=0?(s=t[c],s.S!==p.S?o=L(t&&t[r],n,c,e):(F(s,p),t[c]=void 0,o=s.g),p=l[++r]):(o=L(t&&t[r],n,r,e),p=l[++r]),o&&A(u.g).insertBefore(o,q(u.g))}i>f?D(e,null==l[$+1]?null:l[$+1].g,n,l,r,$):r>$&&E(t,i,f)})(n,l,t,o):null!==o?(null!==e.p&&(n.textContent=""),D(n,null,t,o,0,o.length-1)):null!==l&&E(l,0,l.length-1)):(i=n["s-cr"])?i.parentNode.textContent=s:e.p!==s&&(n.data=s)},H=e=>{let t,n,l,o,s,i,r=e.childNodes;for(n=0,l=r.length;n<l;n++)if(t=r[n],1===t.nodeType){if(t["s-sr"])for(s=t["s-sn"],t.hidden=!1,o=0;o<l;o++)if(i=r[o].nodeType,r[o]["s-hn"]!==t["s-hn"]||""!==s){if(1===i&&s===r[o].getAttribute("slot")){t.hidden=!0;break}}else if(1===i||3===i&&""!==r[o].textContent.trim()){t.hidden=!0;break}H(t)}},N=[],V=e=>{let t,n,l,s,i,r,c=0,a=e.childNodes,f=a.length;for(;c<f;c++){if(t=a[c],t["s-sr"]&&(n=t["s-cr"])&&n.parentNode)for(l=n.parentNode.childNodes,s=t["s-sn"],r=l.length-1;r>=0;r--)n=l[r],n["s-cn"]||n["s-nr"]||n["s-hn"]===t["s-hn"]||(_(n,s)?(i=N.find((e=>e.j===n)),o=!0,n["s-sn"]=n["s-sn"]||s,i?i.C=t:N.push({C:t,j:n}),n["s-sr"]&&N.map((e=>{_(e.j,n["s-sn"])&&(i=N.find((e=>e.j===n)),i&&!e.C&&(e.C=i.C))}))):N.some((e=>e.j===n))||N.push({j:n}));1===t.nodeType&&V(t)}},_=(e,t)=>1===e.nodeType?null===e.getAttribute("slot")&&""===t||e.getAttribute("slot")===t:e["s-sn"]===t||""===t,z=e=>{e.m&&e.m.ref&&e.m.ref(null),e.h&&e.h.map(z)},B=e=>de(e).M,G=(e,t,n)=>{const l=B(e);return{emit:e=>I(l,t,{bubbles:!!(4&n),composed:!!(2&n),cancelable:!!(1&n),detail:e})}},I=(e,t,n)=>{const l=f.ce(t,n);return e.dispatchEvent(l),l},J=(e,t)=>{t&&!e.O&&t["s-p"]&&t["s-p"].push(new Promise((t=>e.O=t)))},K=(e,t)=>{if(e.t|=16,!(4&e.t))return J(e,e.R),Oe((()=>Q(e,t)));e.t|=512},Q=(e,t)=>{const n=e.i;let l;return t&&(e.t|=256,e.u&&(e.u.map((([e,t])=>le(n,e,t))),e.u=null),l=le(n,"componentWillLoad")),oe(l,(()=>X(e,n,t)))},X=async(e,t,n)=>{const l=e.M,o=l["s-rc"];n&&(e=>{const t=e.P,n=e.M,l=t.t,o=((e,t)=>{let n=w(t),l=we.get(n);if(e=11===e.nodeType?e:a,l)if("string"==typeof l){let t,o=b.get(e=e.head||e);o||b.set(e,o=new Set),o.has(n)||(t=a.createElement("style"),t.innerHTML=l,e.insertBefore(t,e.querySelector("link")),o&&o.add(n))}else e.adoptedStyleSheets.includes(l)||(e.adoptedStyleSheets=[...e.adoptedStyleSheets,l]);return n})(n.shadowRoot?n.shadowRoot:n.getRootNode(),t);10&l&&(n["s-sc"]=o,n.classList.add(o+"-h"))})(e);Y(e,t),o&&(o.map((e=>e())),l["s-rc"]=void 0);{const t=l["s-p"],n=()=>ee(e);0===t.length?n():(Promise.all(t).then(n),e.t|=4,t.length=0)}},Y=(r,c)=>{try{i=c,c=c.render&&c.render(),r.t&=-17,r.t|=2,((i,r)=>{const c=i.M,u=i.P,d=i.U||g(null,null),$=(e=>e&&e.S===j)(r)?r:S(null,null,r);if(n=c.tagName,u.L&&($.m=$.m||{},u.L.map((([e,t])=>$.m[t]=c[e]))),$.S=null,$.t|=4,i.U=$,$.g=d.g=c.shadowRoot||c,e=c["s-sc"],t=c["s-cr"],l=0!=(1&u.t),o=!1,F(d,$),f.t|=1,s){let e,t,n,l,o,s;V($.g);let i=0;for(;i<N.length;i++)e=N[i],t=e.j,t["s-ol"]||(n=a.createTextNode(""),n["s-nr"]=t,t.parentNode.insertBefore(t["s-ol"]=n,t));for(i=0;i<N.length;i++)if(e=N[i],t=e.j,e.C){for(l=e.C.parentNode,o=e.C.nextSibling,n=t["s-ol"];n=n.previousSibling;)if(s=n["s-nr"],s&&s["s-sn"]===t["s-sn"]&&l===s.parentNode&&(s=s.nextSibling,!s||!s["s-nr"])){o=s;break}(!o&&l!==t.parentNode||t.nextSibling!==o)&&t!==o&&(!t["s-hn"]&&t["s-ol"]&&(t["s-hn"]=t["s-ol"].parentNode.nodeName),l.insertBefore(t,o))}else 1===t.nodeType&&(t.hidden=!0)}o&&H($.g),f.t&=-2,N.length=0})(r,c)}catch(e){me(e,r.M)}return i=null,null},Z=()=>i,ee=e=>{const t=e.M,n=e.i,l=e.R;le(n,"componentDidRender"),64&e.t?le(n,"componentDidUpdate"):(e.t|=64,se(t),le(n,"componentDidLoad"),e.T(t),l||ne()),e.O&&(e.O(),e.O=void 0),512&e.t&&Ce((()=>K(e,!1))),e.t&=-517},te=e=>{{const t=de(e),n=t.M.isConnected;return n&&2==(18&t.t)&&K(t,!1),n}},ne=()=>{se(a.documentElement),Ce((()=>I(c,"appload",{detail:{namespace:"apollo-benefits"}})))},le=(e,t,n)=>{if(e&&e[t])try{return e[t](n)}catch(e){me(e)}},oe=(e,t)=>e&&e.then?e.then(t):t(),se=e=>e.classList.add("hydrated"),ie=(e,t,n)=>{if(t.D){e.watchers&&(t.W=e.watchers);const l=Object.entries(t.D),o=e.prototype;if(l.map((([e,[l]])=>{(31&l||2&n&&32&l)&&Object.defineProperty(o,e,{get(){return((e,t)=>de(this).q.get(t))(0,e)},set(n){((e,t,n,l)=>{const o=de(e),s=o.M,i=o.q.get(t),r=o.t,c=o.i;if(n=((e,t)=>null==e||v(e)?e:4&t?"false"!==e&&(""===e||!!e):2&t?parseFloat(e):1&t?e+"":e)(n,l.D[t][0]),!(8&r&&void 0!==i||n===i)&&(o.q.set(t,n),c)){if(l.W&&128&r){const e=l.W[t];e&&e.map((e=>{try{c[e](n,i,t)}catch(e){me(e,s)}}))}2==(18&r)&&K(o,!1)}})(this,e,n,t)},configurable:!0,enumerable:!0})})),1&n){const n=new Map;o.attributeChangedCallback=function(e,t,l){f.jmp((()=>{const t=n.get(e);this[t]=(null!==l||"boolean"!=typeof this[t])&&l}))},e.observedAttributes=l.filter((([e,t])=>15&t[0])).map((([e,l])=>{const o=l[1]||e;return n.set(o,e),512&l[0]&&t.L.push([e,o]),o}))}}return e},re=e=>{le(e,"connectedCallback")},ce=(e,t={})=>{const n=[],l=t.exclude||[],o=c.customElements,s=a.head,i=s.querySelector("meta[charset]"),r=a.createElement("style"),u=[];let $,y=!0;Object.assign(f,t),f.l=new URL(t.resourcesUrl||"./",a.baseURI).href,e.map((e=>e[1].map((t=>{const s={t:t[0],$:t[1],D:t[2],A:t[3]};s.D=t[2],s.A=t[3],s.L=[],s.W={};const i=s.$,r=class extends HTMLElement{constructor(e){super(e),pe(e=this,s),1&s.t&&e.attachShadow({mode:"open"})}connectedCallback(){$&&(clearTimeout($),$=null),y?u.push(this):f.jmp((()=>(e=>{if(0==(1&f.t)){const t=de(e),n=t.P,l=()=>{};if(1&t.t)p(e,t,n.A),re(t.i);else{t.t|=1,12&n.t&&(e=>{const t=e["s-cr"]=a.createComment("");t["s-cn"]=!0,e.insertBefore(t,e.firstChild)})(e);{let n=e;for(;n=n.parentNode||n.host;)if(n["s-p"]){J(t,t.R=n);break}}n.D&&Object.entries(n.D).map((([t,[n]])=>{if(31&n&&e.hasOwnProperty(t)){const n=e[t];delete e[t],e[t]=n}})),(async(e,t,n,l,o)=>{if(0==(32&t.t)){{if(t.t|=32,(o=be(n)).then){const e=()=>{};o=await o,e()}o.isProxied||(n.W=o.watchers,ie(o,n,2),o.isProxied=!0);const e=()=>{};t.t|=8;try{new o(t)}catch(e){me(e)}t.t&=-9,t.t|=128,e(),re(t.i)}if(o.style){let e=o.style;const t=w(n);if(!we.has(t)){const l=()=>{};((e,t,n)=>{let l=we.get(e);d&&n?(l=l||new CSSStyleSheet,l.replace(t)):l=t,we.set(e,l)})(t,e,!!(1&n.t)),l()}}}const s=t.R,i=()=>K(t,!0);s&&s["s-rc"]?s["s-rc"].push(i):i()})(0,t,n)}l()}})(this)))}disconnectedCallback(){f.jmp((()=>(()=>{if(0==(1&f.t)){const e=de(this),t=e.i;e.o&&(e.o.map((e=>e())),e.o=void 0),le(t,"disconnectedCallback"),le(t,"componentDidUnload")}})()))}componentOnReady(){return de(this).F}};s.H=e[0],l.includes(i)||o.get(i)||(n.push(i),o.define(i,ie(r,s,1)))})))),r.innerHTML=n+"{visibility:hidden}.hydrated{visibility:inherit}",r.setAttribute("data-styles",""),s.insertBefore(r,i?i.nextSibling:s.firstChild),y=!1,u.length?u.map((e=>e.connectedCallback())):f.jmp((()=>$=setTimeout(ne,30)))},ae=e=>{const t=new URL(e,f.l);return t.origin!==c.location.origin?t.href:t.pathname},fe=(e,t)=>t in $?$[t]:"window"===t?c:"document"===t?a:"isServer"!==t&&"isPrerender"!==t&&("isClient"===t||("resourcesUrl"===t||"publicPath"===t?ae("."):"queue"===t?{write:Oe,read:Me,tick:{then:e=>Ce(e)}}:void 0)),ue=new WeakMap,de=e=>ue.get(e),$e=(e,t)=>ue.set(t.i=e,t),pe=(e,t)=>{const n={t:0,M:e,P:t,q:new Map};return n.F=new Promise((e=>n.T=e)),e["s-p"]=[],e["s-rc"]=[],p(e,n,t.A),ue.set(e,n)},ye=(e,t)=>t in e,me=(e,t)=>(0,console.error)(e,t),he=new Map,be=e=>{const t=e.$.replace(/-/g,"_"),n=e.H,l=he.get(n);return l?l[t]:import(`./${n}.entry.js`).then((e=>(he.set(n,e),e[t])),me)},we=new Map,ke=[],ve=[],Se=(e,t)=>n=>{e.push(n),r||(r=!0,t&&4&f.t?Ce(je):f.raf(je))},ge=e=>{for(let t=0;t<e.length;t++)try{e[t](performance.now())}catch(e){me(e)}e.length=0},je=()=>{ge(ke),ge(ve),(r=ke.length>0)&&f.raf(je)},Ce=e=>u().then(e),Me=Se(ke,!1),Oe=Se(ve,!0);export{j as H,B as a,ce as b,fe as c,ae as d,G as e,te as f,Z as g,S as h,u as p,$e as r}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const r=(r,t,e)=>e(r.confirm(t)),t=r=>r.metaKey||r.altKey||r.ctrlKey||r.shiftKey,e=r=>{const t=r.navigator.userAgent;return(-1===t.indexOf("Android 2.")&&-1===t.indexOf("Android 4.0")||-1===t.indexOf("Mobile Safari")||-1!==t.indexOf("Chrome")||-1!==t.indexOf("Windows Phone"))&&r.history&&"pushState"in r.history},o=r=>-1===r.userAgent.indexOf("Trident"),s=r=>-1===r.userAgent.indexOf("Firefox"),a=(r,t)=>void 0===t.state&&-1===r.userAgent.indexOf("CriOS"),n=(r,t)=>{const e=r[t],o="__storage_test__";try{return e.setItem(o,o),e.removeItem(o),!0}catch(r){return r instanceof DOMException&&(22===r.code||1014===r.code||"QuotaExceededError"===r.name||"NS_ERROR_DOM_QUOTA_REACHED"===r.name)&&0!==e.length}};export{e as a,o as b,a as c,s as d,r as g,t as i,n as s}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as o,h as t}from"./p-50fe790f.js";const r=class{constructor(t){o(this,t),this.isBlockElement=!1,this.disabled=!1,this.variant="primary"}render(){return t("button",{class:{"btn position-relative px-3 py-2":!0,"is-primary":"primary"===this.variant,"is-secondary":"secondary"===this.variant,"btn-block":this.isBlockElement,disabled:this.disabled},style:{"pointer-events":this.disabled?"none":"auto"},disabled:this.disabled},t("span",{class:"label"},t("slot",null)))}};r.style=":host button,:host button:focus,:host button:active,:host button.focus,:host button.active{box-shadow:none;border-radius:var(--fl-rounding-button) !important}:host button.disabled,:host button:disabled{opacity:1 !important;cursor:not-allowed !important;color:var(--fl-color-disabled)}:host button .label{font-weight:600 !important}:host button.is-primary{color:var(--fl-color-primary-text);background-color:var(--fl-color-primary);border:none}:host button.is-primary.disabled,:host button.is-primary:disabled{background-color:var(--fl-color-primary-disabled)}:host button.is-primary:hover:not(.disabled),:host button.is-primary:hover:not(:disabled){background-color:var(--fl-color-primary-hover)}:host button.is-primary:active:not(.disabled),:host button.is-primary:active:not(:disabled){background-color:var(--fl-color-primary-focus)}:host button.is-secondary{color:var(--fl-color-secondary-text);background-color:var(--fl-color-secondary)}:host button.is-secondary.disabled,:host button.is-secondary:disabled{background-color:var(--fl-color-secondary-disabled)}:host button.is-secondary:hover:not(.disabled),:host button.is-secondary:hover:not(:disabled){background-color:var(--fl-color-secondary-hover)}:host button.is-secondary:active:not(.disabled),:host button.is-secondary:active:not(:disabled){background-color:var(--fl-color-secondary-focus)}:host button.is-block{display:block}:host button:disabled,:host button.disabled{pointer-events:none}";export{r as fl_button}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
function t(t){return"function"==typeof t}let s=!1;const i={Promise:void 0,set useDeprecatedSynchronousErrorHandling(t){if(t){const t=new Error;console.warn("DEPRECATED! RxJS was set to use deprecated synchronous error handling behavior by code at: \n"+t.stack)}else s&&console.log("RxJS: Back to a better error behavior. Thank you. <3");s=t},get useDeprecatedSynchronousErrorHandling(){return s}};function r(t){setTimeout((()=>{throw t}),0)}const e={closed:!0,next(t){},error(t){if(i.useDeprecatedSynchronousErrorHandling)throw t;r(t)},complete(){}},n=Array.isArray||(t=>t&&"number"==typeof t.length);function h(t){return null!==t&&"object"==typeof t}const o=(()=>{function t(t){return Error.call(this),this.message=t?`${t.length} errors occurred during unsubscription:\n${t.map(((t,s)=>`${s+1}) ${t.toString()}`)).join("\n ")}`:"",this.name="UnsubscriptionError",this.errors=t,this}return t.prototype=Object.create(Error.prototype),t})();class c{constructor(t){this.closed=!1,this._parentOrParents=null,this._subscriptions=null,t&&(this._ctorUnsubscribe=!0,this._unsubscribe=t)}unsubscribe(){let s;if(this.closed)return;let{_parentOrParents:i,_ctorUnsubscribe:r,_unsubscribe:e,_subscriptions:l}=this;if(this.closed=!0,this._parentOrParents=null,this._subscriptions=null,i instanceof c)i.remove(this);else if(null!==i)for(let t=0;t<i.length;++t)i[t].remove(this);if(t(e)){r&&(this._unsubscribe=void 0);try{e.call(this)}catch(t){s=t instanceof o?u(t.errors):[t]}}if(n(l)){let t=-1,i=l.length;for(;++t<i;){const i=l[t];if(h(i))try{i.unsubscribe()}catch(t){s=s||[],t instanceof o?s=s.concat(u(t.errors)):s.push(t)}}}if(s)throw new o(s)}add(t){let s=t;if(!t)return c.EMPTY;switch(typeof t){case"function":s=new c(t);case"object":if(s===this||s.closed||"function"!=typeof s.unsubscribe)return s;if(this.closed)return s.unsubscribe(),s;if(!(s instanceof c)){const t=s;s=new c,s._subscriptions=[t]}break;default:throw new Error("unrecognized teardown "+t+" added to Subscription.")}let{_parentOrParents:i}=s;if(null===i)s._parentOrParents=this;else if(i instanceof c){if(i===this)return s;s._parentOrParents=[i,this]}else{if(-1!==i.indexOf(this))return s;i.push(this)}const r=this._subscriptions;return null===r?this._subscriptions=[s]:r.push(s),s}remove(t){const s=this._subscriptions;if(s){const i=s.indexOf(t);-1!==i&&s.splice(i,1)}}}function u(t){return t.reduce(((t,s)=>t.concat(s instanceof o?s.errors:s)),[])}c.EMPTY=function(t){return t.closed=!0,t}(new c);const l="function"==typeof Symbol?Symbol("rxSubscriber"):"@@rxSubscriber_"+Math.random();class a extends c{constructor(t,s,i){switch(super(),this.syncErrorValue=null,this.syncErrorThrown=!1,this.syncErrorThrowable=!1,this.isStopped=!1,arguments.length){case 0:this.destination=e;break;case 1:if(!t){this.destination=e;break}if("object"==typeof t){t instanceof a?(this.syncErrorThrowable=t.syncErrorThrowable,this.destination=t,t.add(this)):(this.syncErrorThrowable=!0,this.destination=new f(this,t));break}default:this.syncErrorThrowable=!0,this.destination=new f(this,t,s,i)}}[l](){return this}static create(t,s,i){const r=new a(t,s,i);return r.syncErrorThrowable=!1,r}next(t){this.isStopped||this._next(t)}error(t){this.isStopped||(this.isStopped=!0,this._error(t))}complete(){this.isStopped||(this.isStopped=!0,this._complete())}unsubscribe(){this.closed||(this.isStopped=!0,super.unsubscribe())}_next(t){this.destination.next(t)}_error(t){this.destination.error(t),this.unsubscribe()}_complete(){this.destination.complete(),this.unsubscribe()}_unsubscribeAndRecycle(){const{_parentOrParents:t}=this;return this._parentOrParents=null,this.unsubscribe(),this.closed=!1,this.isStopped=!1,this._parentOrParents=t,this}}class f extends a{constructor(s,i,r,n){let h;super(),this._parentSubscriber=s;let o=this;t(i)?h=i:i&&(h=i.next,r=i.error,n=i.complete,i!==e&&(o=Object.create(i),t(o.unsubscribe)&&this.add(o.unsubscribe.bind(o)),o.unsubscribe=this.unsubscribe.bind(this))),this._context=o,this._next=h,this._error=r,this._complete=n}next(t){if(!this.isStopped&&this._next){const{_parentSubscriber:s}=this;i.useDeprecatedSynchronousErrorHandling&&s.syncErrorThrowable?this.__tryOrSetError(s,this._next,t)&&this.unsubscribe():this.__tryOrUnsub(this._next,t)}}error(t){if(!this.isStopped){const{_parentSubscriber:s}=this,{useDeprecatedSynchronousErrorHandling:e}=i;if(this._error)e&&s.syncErrorThrowable?(this.__tryOrSetError(s,this._error,t),this.unsubscribe()):(this.__tryOrUnsub(this._error,t),this.unsubscribe());else if(s.syncErrorThrowable)e?(s.syncErrorValue=t,s.syncErrorThrown=!0):r(t),this.unsubscribe();else{if(this.unsubscribe(),e)throw t;r(t)}}}complete(){if(!this.isStopped){const{_parentSubscriber:t}=this;if(this._complete){const s=()=>this._complete.call(this._context);i.useDeprecatedSynchronousErrorHandling&&t.syncErrorThrowable?(this.__tryOrSetError(t,s),this.unsubscribe()):(this.__tryOrUnsub(s),this.unsubscribe())}else this.unsubscribe()}}__tryOrUnsub(t,s){try{t.call(this._context,s)}catch(t){if(this.unsubscribe(),i.useDeprecatedSynchronousErrorHandling)throw t;r(t)}}__tryOrSetError(t,s,e){if(!i.useDeprecatedSynchronousErrorHandling)throw new Error("bad call");try{s.call(this._context,e)}catch(s){return i.useDeprecatedSynchronousErrorHandling?(t.syncErrorValue=s,t.syncErrorThrown=!0,!0):(r(s),!0)}return!1}_unsubscribe(){const{_parentSubscriber:t}=this;this._context=null,this._parentSubscriber=null,t.unsubscribe()}}const b="function"==typeof Symbol&&Symbol.observable||"@@observable";function d(t){return t}class p{constructor(t){this._isScalar=!1,t&&(this._subscribe=t)}lift(t){const s=new p;return s.source=this,s.operator=t,s}subscribe(t,s,r){const{operator:n}=this,h=function(t,s,i){if(t){if(t instanceof a)return t;if(t[l])return t[l]()}return t||s||i?new a(t,s,i):new a(e)}(t,s,r);if(h.add(n?n.call(h,this.source):this.source||i.useDeprecatedSynchronousErrorHandling&&!h.syncErrorThrowable?this._subscribe(h):this._trySubscribe(h)),i.useDeprecatedSynchronousErrorHandling&&h.syncErrorThrowable&&(h.syncErrorThrowable=!1,h.syncErrorThrown))throw h.syncErrorValue;return h}_trySubscribe(t){try{return this._subscribe(t)}catch(s){i.useDeprecatedSynchronousErrorHandling&&(t.syncErrorThrown=!0,t.syncErrorValue=s),function(t){for(;t;){const{closed:s,destination:i,isStopped:r}=t;if(s||r)return!1;t=i&&i instanceof a?i:null}return!0}(t)?t.error(s):console.warn(s)}}forEach(t,s){return new(s=w(s))(((s,i)=>{let r;r=this.subscribe((s=>{try{t(s)}catch(t){i(t),r&&r.unsubscribe()}}),i,s)}))}_subscribe(t){const{source:s}=this;return s&&s.subscribe(t)}[b](){return this}pipe(...t){return 0===t.length?this:(0===(s=t).length?d:1===s.length?s[0]:function(t){return s.reduce(((t,s)=>s(t)),t)})(this);var s}toPromise(t){return new(t=w(t))(((t,s)=>{let i;this.subscribe((t=>i=t),(t=>s(t)),(()=>t(i)))}))}}function w(t){if(t||(t=Promise),!t)throw new Error("no Promise impl found");return t}p.create=t=>new p(t);class y extends c{constructor(t,s){super()}schedule(t,s=0){return this}}class _ extends y{constructor(t,s){super(t,s),this.scheduler=t,this.work=s,this.pending=!1}schedule(t,s=0){if(this.closed)return this;this.state=t;const i=this.id,r=this.scheduler;return null!=i&&(this.id=this.recycleAsyncId(r,i,s)),this.pending=!0,this.delay=s,this.id=this.id||this.requestAsyncId(r,this.id,s),this}requestAsyncId(t,s,i=0){return setInterval(t.flush.bind(t,this),i)}recycleAsyncId(t,s,i=0){if(null!==i&&this.delay===i&&!1===this.pending)return s;clearInterval(s)}execute(t,s){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;const i=this._execute(t,s);if(i)return i;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))}_execute(t,s){let i,r=!1;try{this.work(t)}catch(t){r=!0,i=!!t&&t||new Error(t)}if(r)return this.unsubscribe(),i}_unsubscribe(){const t=this.id,s=this.scheduler,i=s.actions,r=i.indexOf(this);this.work=null,this.state=null,this.pending=!1,this.scheduler=null,-1!==r&&i.splice(r,1),null!=t&&(this.id=this.recycleAsyncId(s,t,null)),this.delay=null}}class S{constructor(t,s=S.now){this.SchedulerAction=t,this.now=s}schedule(t,s=0,i){return new this.SchedulerAction(this,t).schedule(i,s)}}S.now=()=>Date.now();class x extends S{constructor(t,s=S.now){super(t,(()=>x.delegate&&x.delegate!==this?x.delegate.now():s())),this.actions=[],this.active=!1,this.scheduled=void 0}schedule(t,s=0,i){return x.delegate&&x.delegate!==this?x.delegate.schedule(t,s,i):super.schedule(t,s,i)}flush(t){const{actions:s}=this;if(this.active)return void s.push(t);let i;this.active=!0;do{if(i=t.execute(t.state,t.delay))break}while(t=s.shift());if(this.active=!1,i){for(;t=s.shift();)t.unsubscribe();throw i}}}const E=t=>s=>{for(let i=0,r=t.length;i<r&&!s.closed;i++)s.next(t[i]);s.complete()};function m(t,s){return new p((i=>{const r=new c;let e=0;return r.add(s.schedule((function(){e!==t.length?(i.next(t[e++]),i.closed||r.add(this.schedule())):i.complete()}))),r}))}const v=new x(_);export{_ as A,p as O,c as S,a,x as b,m as c,v as d,n as e,t as f,r as h,h as i,b as o,l as r,E as s}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const e=(e,t)=>new RegExp("^"+t+"(\\/|\\?|#|$)","i").test(e),t=(t,r)=>e(t,r)?t.substr(r.length):t,r=e=>"/"===e.charAt(e.length-1)?e.slice(0,-1):e,n=e=>"/"===e.charAt(0)?e:"/"+e,o=e=>"/"===e.charAt(0)?e.substr(1):e,a=e=>{const{pathname:t,search:r,hash:n}=e;let o=t||"/";return r&&"?"!==r&&(o+="?"===r.charAt(0)?r:`?${r}`),n&&"#"!==n&&(o+="#"===n.charAt(0)?n:`#${n}`),o},s=e=>"/"===e.charAt(0),c=e=>Math.random().toString(36).substr(2,e),i=(e,t)=>{for(let r=t,n=r+1,o=e.length;n<o;r+=1,n+=1)e[r]=e[n];e.pop()},l=(e,t)=>{if(e===t)return!0;if(null==e||null==t)return!1;if(Array.isArray(e))return Array.isArray(t)&&e.length===t.length&&e.every(((e,r)=>l(e,t[r])));const r=typeof e;if(r!==typeof t)return!1;if("object"===r){const r=e.valueOf(),n=t.valueOf();if(r!==e||n!==t)return l(r,n);const o=Object.keys(e),a=Object.keys(t);return o.length===a.length&&o.every((r=>l(e[r],t[r])))}return!1},u=(e,t)=>e.pathname===t.pathname&&e.search===t.search&&e.hash===t.hash&&e.key===t.key&&l(e.state,t.state),f=(e,t,r,n)=>{let o;"string"==typeof e?(o=(e=>{let t=e||"/",r="",n="";const o=t.indexOf("#");-1!==o&&(n=t.substr(o),t=t.substr(0,o));const a=t.indexOf("?");return-1!==a&&(r=t.substr(a),t=t.substr(0,a)),{pathname:t,search:"?"===r?"":r,hash:"#"===n?"":n,query:{},key:""}})(e),void 0!==t&&(o.state=t)):(o=Object.assign({pathname:""},e),o.search&&"?"!==o.search.charAt(0)&&(o.search="?"+o.search),o.hash&&"#"!==o.hash.charAt(0)&&(o.hash="#"+o.hash),void 0!==t&&void 0===o.state&&(o.state=t));try{o.pathname=decodeURI(o.pathname)}catch(e){throw e instanceof URIError?new URIError('Pathname "'+o.pathname+'" could not be decoded. This is likely caused by an invalid percent-encoding.'):e}var a;return o.key=r,n?o.pathname?"/"!==o.pathname.charAt(0)&&(o.pathname=((e,t="")=>{let r,n=t&&t.split("/")||[],o=0;const a=e&&e.split("/")||[],c=e&&s(e),l=t&&s(t),u=c||l;if(e&&s(e)?n=a:a.length&&(n.pop(),n=n.concat(a)),!n.length)return"/";if(n.length){const e=n[n.length-1];r="."===e||".."===e||""===e}else r=!1;for(let e=n.length;e>=0;e--){const t=n[e];"."===t?i(n,e):".."===t?(i(n,e),o++):o&&(i(n,e),o--)}if(!u)for(;o--;o)n.unshift("..");!u||""===n[0]||n[0]&&s(n[0])||n.unshift("");let f=n.join("/");return r&&"/"!==f.substr(-1)&&(f+="/"),f})(o.pathname,n.pathname)):o.pathname=n.pathname:o.pathname||(o.pathname="/"),o.query=(a=o.search||"")?(/^[?#]/.test(a)?a.slice(1):a).split("&").reduce(((e,t)=>{let[r,n]=t.split("=");return e[r]=n?decodeURIComponent(n.replace(/\+/g," ")):"",e}),{}):{},o};export{n as a,c as b,f as c,t as d,a as e,o as f,e as h,u as l,r as s,l as v}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as t,h as e}from"./p-50fe790f.js";const n=class{constructor(e){t(this,e),this.content=""}componentWillLoad(){if(null!=this.documentLocation)return this.fetchNewContent(this.documentLocation)}fetchNewContent(t){return fetch(t).then((t=>t.text())).then((t=>{this.content=t}))}render(){return e("div",{innerHTML:this.content})}static get watchers(){return{documentLocation:["fetchNewContent"]}}};export{n as stencil_async_content}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as t,c as s,h as e,a as o}from"./p-50fe790f.js";import{A as n}from"./p-06a1f65f.js";import{s as a,a as i,c as r,b as h,h as c,d as l,e as u,f as p,l as d}from"./p-6bd16f5b.js";import{s as f,a as g,b as y,g as b,c as m,d as P}from"./p-53bcbd1d.js";const w=(t,...s)=>{t||console.warn(...s)},v=()=>{let t,s=[];return{setPrompt:s=>(w(null==t,"A history supports only one prompt at a time"),t=s,()=>{t===s&&(t=null)}),confirmTransitionTo:(s,e,o,n)=>{if(null!=t){const a="function"==typeof t?t(s,e):t;"string"==typeof a?"function"==typeof o?o(a,n):(w(!1,"A history needs a getUserConfirmation function in order to use a prompt message"),n(!0)):n(!1!==a)}else n(!0)},appendListener:t=>{let e=!0;const o=(...s)=>{e&&t(...s)};return s.push(o),()=>{e=!1,s=s.filter((t=>t!==o))}},notifyListeners:(...t)=>{s.forEach((s=>s(...t)))}}},k=(t,s="scrollPositions")=>{let e=new Map;const o=(s,o)=>{if(e.set(s,o),f(t,"sessionStorage")){const s=[];e.forEach(((t,e)=>{s.push([e,t])})),t.sessionStorage.setItem("scrollPositions",JSON.stringify(s))}};if(f(t,"sessionStorage")){const o=t.sessionStorage.getItem(s);e=o?new Map(JSON.parse(o)):e}return"scrollRestoration"in t.history&&(history.scrollRestoration="manual"),{set:o,get:t=>e.get(t),has:t=>e.has(t),capture:s=>{o(s,[t.scrollX,t.scrollY])}}},j={hashbang:{encodePath:t=>"!"===t.charAt(0)?t:"!/"+p(t),decodePath:t=>"!"===t.charAt(0)?t.substr(1):t},noslash:{encodePath:p,decodePath:i},slash:{encodePath:i,decodePath:i}},H=(t,s)=>{const e=0==t.pathname.indexOf(s)?"/"+t.pathname.slice(s.length):t.pathname;return Object.assign({},t,{pathname:e})},O={browser:(t,s={})=>{let e=!1;const o=t.history,n=t.location,p=t.navigator,d=g(t),f=!y(p),P=k(t),j=null!=s.forceRefresh&&s.forceRefresh,H=null!=s.getUserConfirmation?s.getUserConfirmation:b,O=null!=s.keyLength?s.keyLength:6,L=s.basename?a(i(s.basename)):"",S=()=>{try{return t.history.state||{}}catch(t){return{}}},U=t=>{t=t||{};const{key:s,state:e}=t,{pathname:o,search:a,hash:i}=n;let u=o+a+i;return w(!L||c(u,L),'You are attempting to use a basename on a page whose URL path does not begin with the basename. Expected path "'+u+'" to begin with "'+L+'".'),L&&(u=l(u,L)),r(u,e,s||h(O))},A=v(),T=t=>{P.capture(V.location.key),Object.assign(V,t),V.location.scrollPosition=P.get(V.location.key),V.length=o.length,A.notifyListeners(V.location,V.action)},E=t=>{m(p,t)||x(U(t.state))},R=()=>{x(U(S()))},x=t=>{if(e)e=!1,T();else{const s="POP";A.confirmTransitionTo(t,s,H,(e=>{e?T({action:s,location:t}):B(t)}))}},B=t=>{let s=M.indexOf(V.location.key),o=M.indexOf(t.key);-1===s&&(s=0),-1===o&&(o=0);const n=s-o;n&&(e=!0,N(n))},C=U(S());let M=[C.key],Y=0,F=!1;const J=t=>L+u(t),N=t=>{o.go(t)},q=s=>{Y+=s,1===Y?(t.addEventListener("popstate",E),f&&t.addEventListener("hashchange",R)):0===Y&&(t.removeEventListener("popstate",E),f&&t.removeEventListener("hashchange",R))},V={length:o.length,action:"POP",location:C,createHref:J,push:(t,s)=>{w(!("object"==typeof t&&void 0!==t.state&&void 0!==s),"You should avoid providing a 2nd state argument to push when the 1st argument is a location-like object that already has state; it is ignored");const e="PUSH",a=r(t,s,h(O),V.location);A.confirmTransitionTo(a,e,H,(t=>{if(!t)return;const s=J(a),{key:i,state:r}=a;if(d)if(o.pushState({key:i,state:r},"",s),j)n.href=s;else{const t=M.indexOf(V.location.key),s=M.slice(0,-1===t?0:t+1);s.push(a.key),M=s,T({action:e,location:a})}else w(void 0===r,"Browser history cannot push state in browsers that do not support HTML5 history"),n.href=s}))},replace:(t,s)=>{w(!("object"==typeof t&&void 0!==t.state&&void 0!==s),"You should avoid providing a 2nd state argument to replace when the 1st argument is a location-like object that already has state; it is ignored");const e="REPLACE",a=r(t,s,h(O),V.location);A.confirmTransitionTo(a,e,H,(t=>{if(!t)return;const s=J(a),{key:i,state:r}=a;if(d)if(o.replaceState({key:i,state:r},"",s),j)n.replace(s);else{const t=M.indexOf(V.location.key);-1!==t&&(M[t]=a.key),T({action:e,location:a})}else w(void 0===r,"Browser history cannot replace state in browsers that do not support HTML5 history"),n.replace(s)}))},go:N,goBack:()=>N(-1),goForward:()=>N(1),block:(t="")=>{const s=A.setPrompt(t);return F||(q(1),F=!0),()=>(F&&(F=!1,q(-1)),s())},listen:t=>{const s=A.appendListener(t);return q(1),()=>{q(-1),s()}},win:t};return V},hash:(t,s={})=>{let e=!1,o=null,n=0,p=!1;const f=t.location,g=t.history,y=P(t.navigator),m=null!=s.keyLength?s.keyLength:6,{getUserConfirmation:k=b,hashType:H="slash"}=s,O=s.basename?a(i(s.basename)):"",{encodePath:L,decodePath:S}=j[H],U=()=>{const t=f.href,s=t.indexOf("#");return-1===s?"":t.substring(s+1)},A=t=>{const s=f.href.indexOf("#");f.replace(f.href.slice(0,s>=0?s:0)+"#"+t)},T=()=>{let t=S(U());return w(!O||c(t,O),'You are attempting to use a basename on a page whose URL path does not begin with the basename. Expected path "'+t+'" to begin with "'+O+'".'),O&&(t=l(t,O)),r(t,void 0,h(m))},E=v(),R=t=>{Object.assign(V,t),V.length=g.length,E.notifyListeners(V.location,V.action)},x=()=>{const t=U(),s=L(t);if(t!==s)A(s);else{const t=T(),s=V.location;if(!e&&d(s,t))return;if(o===u(t))return;o=null,B(t)}},B=t=>{if(e)e=!1,R();else{const s="POP";E.confirmTransitionTo(t,s,k,(e=>{e?R({action:s,location:t}):C(t)}))}},C=t=>{let s=J.lastIndexOf(u(V.location)),o=J.lastIndexOf(u(t));-1===s&&(s=0),-1===o&&(o=0);const n=s-o;n&&(e=!0,N(n))},M=U(),Y=L(M);M!==Y&&A(Y);const F=T();let J=[u(F)];const N=t=>{w(y,"Hash history go(n) causes a full page reload in this browser"),g.go(t)},q=(t,s)=>{n+=s,1===n?t.addEventListener("hashchange",x):0===n&&t.removeEventListener("hashchange",x)},V={length:g.length,action:"POP",location:F,createHref:t=>"#"+L(O+u(t)),push:(t,s)=>{w(void 0===s,"Hash history cannot push state; it is ignored");const e="PUSH",n=r(t,void 0,h(m),V.location);E.confirmTransitionTo(n,e,k,(t=>{if(!t)return;const s=u(n),a=L(O+s);if(U()!==a){o=s,(t=>{f.hash=t})(a);const t=J.lastIndexOf(u(V.location)),i=J.slice(0,-1===t?0:t+1);i.push(s),J=i,R({action:e,location:n})}else w(!1,"Hash history cannot PUSH the same path; a new entry will not be added to the history stack"),R()}))},replace:(t,s)=>{w(void 0===s,"Hash history cannot replace state; it is ignored");const e="REPLACE",n=r(t,void 0,h(m),V.location);E.confirmTransitionTo(n,e,k,(t=>{if(!t)return;const s=u(n),a=L(O+s);U()!==a&&(o=s,A(a));const i=J.indexOf(u(V.location));-1!==i&&(J[i]=s),R({action:e,location:n})}))},go:N,goBack:()=>N(-1),goForward:()=>N(1),block:(s="")=>{const e=E.setPrompt(s);return p||(q(t,1),p=!0),()=>(p&&(p=!1,q(t,-1)),e())},listen:s=>{const e=E.appendListener(s);return q(t,1),()=>{q(t,-1),e()}},win:t};return V}},L=class{constructor(e){t(this,e),this.root="/",this.historyType="browser",this.titleSuffix="",this.routeViewsUpdated=(t={})=>{if(this.history&&t.scrollToId&&"browser"===this.historyType){const s=this.history.win.document.getElementById(t.scrollToId);if(s)return s.scrollIntoView()}this.scrollTo(t.scrollTopOffset||this.scrollTopOffset)},this.isServer=s(this,"isServer"),this.queue=s(this,"queue")}componentWillLoad(){this.history=O[this.historyType](this.el.ownerDocument.defaultView),this.history.listen((t=>{t=H(t,this.root),this.location=t})),this.location=H(this.history.location,this.root)}scrollTo(t){const s=this.history;if(null!=t&&!this.isServer&&s)return"POP"===s.action&&Array.isArray(s.location.scrollPosition)?this.queue.write((()=>{s&&s.location&&Array.isArray(s.location.scrollPosition)&&s.win.scrollTo(s.location.scrollPosition[0],s.location.scrollPosition[1])})):this.queue.write((()=>{s.win.scrollTo(0,t)}))}render(){if(this.location&&this.history)return e(n.Provider,{state:{historyType:this.historyType,location:this.location,titleSuffix:this.titleSuffix,root:this.root,history:this.history,routeViewsUpdated:this.routeViewsUpdated}},e("slot",null))}get el(){return o(this)}};export{L as stencil_router}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as s,a as t}from"./p-50fe790f.js";import{A as e}from"./p-06a1f65f.js";const i=class{constructor(t){s(this,t),this.when=!0,this.message=""}enable(s){this.unblock&&this.unblock(),this.history&&(this.unblock=this.history.block(s))}disable(){this.unblock&&(this.unblock(),this.unblock=void 0)}componentWillLoad(){this.when&&this.enable(this.message)}updateMessage(s,t){this.when?this.when&&t===s||this.enable(this.message):this.disable()}componentDidUnload(){this.disable()}render(){return null}get el(){return t(this)}static get watchers(){return{message:["updateMessage"],when:["updateMessage"]}}};e.injectProps(i,["history"]);export{i as stencil_router_prompt}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{p as o,e as s}from"./p-f603197d.js";const a=async function(){o({storage:window.sessionStorage}),s()};export{a as g}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as t,c as s,h as i,a as r}from"./p-50fe790f.js";import{A as e}from"./p-06a1f65f.js";import{m as h}from"./p-14054f15.js";import"./p-6bd16f5b.js";const o=t=>"STENCIL-ROUTE"===t.tagName,n=class{constructor(i){t(this,i),this.group=((1e17*Math.random()).toString().match(/.{4}/g)||[]).join("-"),this.subscribers=[],this.queue=s(this,"queue")}componentWillLoad(){null!=this.location&&this.regenerateSubscribers(this.location)}async regenerateSubscribers(t){if(null==t)return;let s=-1;if(this.subscribers=Array.prototype.slice.call(this.el.children).filter(o).map(((i,r)=>{const e=h(t.pathname,{path:i.url,exact:i.exact,strict:!0});return e&&-1===s&&(s=r),{el:i,match:e}})),-1===s)return;if(this.activeIndex===s)return void(this.subscribers[s].el.match=this.subscribers[s].match);this.activeIndex=s;const i=this.subscribers[this.activeIndex];this.scrollTopOffset&&(i.el.scrollTopOffset=this.scrollTopOffset),i.el.group=this.group,i.el.match=i.match,i.el.componentUpdated=t=>{this.queue.write((()=>{this.subscribers.forEach(((t,s)=>{if(t.el.componentUpdated=void 0,s===this.activeIndex)return t.el.style.display="";this.scrollTopOffset&&(t.el.scrollTopOffset=this.scrollTopOffset),t.el.group=this.group,t.el.match=null,t.el.style.display="none"}))})),this.routeViewsUpdated&&this.routeViewsUpdated(Object.assign({scrollTopOffset:this.scrollTopOffset},t))}}render(){return i("slot",null)}get el(){return r(this)}static get watchers(){return{location:["regenerateSubscribers"]}}};e.injectProps(n,["location","routeViewsUpdated"]);export{n as stencil_route_switch}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as t,e as s,h as i}from"./p-50fe790f.js";import{e as h,O as n,f as e,d as o,a as r}from"./p-68c136da.js";import{f as c,m as a,S as l,a as d,i as u,d as p,b as f}from"./p-24a37d64.js";function v(){}function m(t,s,i=Number.POSITIVE_INFINITY){return"function"==typeof s?h=>h.pipe(m(((i,h)=>c(t(i,h)).pipe(a(((t,n)=>s(i,t,h,n))))),i)):("number"==typeof s&&(i=s),s=>s.lift(new w(t,i)))}class w{constructor(t,s=Number.POSITIVE_INFINITY){this.project=t,this.concurrent=s}call(t,s){return s.subscribe(new y(t,this.project,this.concurrent))}}class y extends l{constructor(t,s,i=Number.POSITIVE_INFINITY){super(t),this.project=s,this.concurrent=i,this.hasCompleted=!1,this.buffer=[],this.active=0,this.index=0}_next(t){this.active<this.concurrent?this._tryNext(t):this.buffer.push(t)}_tryNext(t){let s;const i=this.index++;try{s=this.project(t,i)}catch(t){return void this.destination.error(t)}this.active++,this._innerSub(s)}_innerSub(t){const s=new d(this),i=this.destination;i.add(s);const h=u(t,s);h!==s&&i.add(h)}_complete(){this.hasCompleted=!0,0===this.active&&0===this.buffer.length&&this.destination.complete(),this.unsubscribe()}notifyNext(t){this.destination.next(t)}notifyComplete(){const t=this.buffer;this.active--,t.length>0?this._next(t.shift()):0===this.active&&this.hasCompleted&&this.destination.complete()}}function b(t,s,i,o){return e(i)&&(o=i,i=void 0),o?b(t,s,i).pipe(a((t=>h(t)?o(...t):o(t)))):new n((h=>{g(t,s,(function(t){h.next(arguments.length>1?Array.prototype.slice.call(arguments):t)}),h,i)}))}function g(t,s,i,h,n){let e;if(function(t){return t&&"function"==typeof t.addEventListener&&"function"==typeof t.removeEventListener}(t)){const h=t;t.addEventListener(s,i,n),e=()=>h.removeEventListener(s,i,n)}else if(function(t){return t&&"function"==typeof t.on&&"function"==typeof t.off}(t)){const h=t;t.on(s,i),e=()=>h.off(s,i)}else if(function(t){return t&&"function"==typeof t.addListener&&"function"==typeof t.removeListener}(t)){const h=t;t.addListener(s,i),e=()=>h.removeListener(s,i)}else{if(!t||!t.length)throw new TypeError("Invalid event target");for(let e=0,o=t.length;e<o;e++)g(t[e],s,i,h,n)}h.add(e)}class x{constructor(t,s){this.dueTime=t,this.scheduler=s}call(t,s){return s.subscribe(new _(t,this.dueTime,this.scheduler))}}class _ extends r{constructor(t,s,i){super(t),this.dueTime=s,this.scheduler=i,this.debouncedSubscription=null,this.lastValue=null,this.hasValue=!1}_next(t){this.clearDebounce(),this.lastValue=t,this.hasValue=!0,this.add(this.debouncedSubscription=this.scheduler.schedule(k,this.dueTime,this))}_complete(){this.debouncedNext(),this.destination.complete()}debouncedNext(){if(this.clearDebounce(),this.hasValue){const{lastValue:t}=this;this.lastValue=null,this.hasValue=!1,this.destination.next(t)}}clearDebounce(){const t=this.debouncedSubscription;null!==t&&(this.remove(t),t.unsubscribe(),this.debouncedSubscription=null)}}function k(t){t.debouncedNext()}function E(t,s,i){return function(h){return h.lift(new N(t,s,i))}}class N{constructor(t,s,i){this.nextOrObserver=t,this.error=s,this.complete=i}call(t,s){return s.subscribe(new C(t,this.nextOrObserver,this.error,this.complete))}}class C extends r{constructor(t,s,i,h){super(t),this._tapNext=v,this._tapError=v,this._tapComplete=v,this._tapError=i||v,this._tapComplete=h||v,e(s)?(this._context=this,this._tapNext=s):s&&(this._context=s,this._tapNext=s.next||v,this._tapError=s.error||v,this._tapComplete=s.complete||v)}_next(t){try{this._tapNext.call(this._context,t)}catch(t){return void this.destination.error(t)}this.destination.next(t)}_error(t){try{this._tapError.call(this._context,t)}catch(t){return void this.destination.error(t)}this.destination.error(t)}_complete(){try{this._tapComplete.call(this._context)}catch(t){return void this.destination.error(t)}return this.destination.complete()}}const A=class{constructor(h){t(this,h),this.valueChanged=s(this,"valueChanged",7),this.required=!1,this.disabled=!1,this.minSearchStringLength=3,this.isMouseOver=!1,this.searchState="pristine",this.inputValue="",this.isDropdownVisible=!1,this.filteredOptions=[],this.shouldExecuteSearch=t=>{var s;return this.isDropdownVisible&&(null==t?void 0:t.length)>=this.minSearchStringLength&&(null===(s=this.selectedOption)||void 0===s?void 0:s.label)!==t},this.onBeginSearch=t=>{this.inputValue=t,this.searchState="in progress"},this.onCompleteSearch=t=>{this.filteredOptions=t,this.highlightedOptionIndex=void 0,this.searchState="done"},this.renderFilteredResults=()=>"pristine"===this.searchState?i("span",{class:"dropdown-item disabled"},"Start typing to find the results"):"in progress"===this.searchState?i("div",{class:"d-flex justify-content-end align-items-center pr-4"},i("span",{class:"dropdown-item disabled"},"Searching..."),i("i",{class:"dot-falling"})):0===this.filteredOptions.length?i("span",{class:"dropdown-item disabled"},"No items match your search"):this.filteredOptions.map(((t,s)=>i("span",{class:{"dropdown-item text-wrap":!0,selected:this.isOptionSelected(t),active:this.highlightedOptionIndex===s},onClick:()=>{this.toggleDropdown(!1),this.selectOption(t)}},t.label))),this.resetInput=()=>{var t,s;this.inputValue=null!==(s=null===(t=this.selectedOption)||void 0===t?void 0:t.label)&&void 0!==s?s:""},this.toggleDropdown=t=>{this.isDropdownVisible=t},this.processKeyboardNavigation=t=>{switch(t.key){case"ArrowDown":return this.toggleDropdown(!0),this.highlightNextItem(),!0;case"ArrowUp":return this.highlightPreviousItem(),!0;case"Enter":return void 0!==this.highlightedOptionIndex&&(this.toggleDropdown(!1),this.selectOption(this.filteredOptions[this.highlightedOptionIndex])),!0;case"Escape":return this.inputElement.blur(),!0}return!1},this.highlightPreviousItem=()=>{0!==this.filteredOptions.length&&(this.highlightedOptionIndex=void 0===this.highlightedOptionIndex?0:Math.max(this.highlightedOptionIndex-1,0))},this.highlightNextItem=()=>{0!==this.filteredOptions.length&&(this.highlightedOptionIndex=void 0===this.highlightedOptionIndex?0:Math.min(this.highlightedOptionIndex+1,this.filteredOptions.length-1))},this.selectOption=t=>{this.selectedOption=t,this.inputValue=t.label,this.valueChanged.emit(t)},this.isOptionSelected=t=>{var s;return(null===(s=this.selectedOption)||void 0===s?void 0:s.label)===t.label}}componentWillLoad(){this.selectedOption=this.value}componentDidLoad(){this.searchResultsSubscription=b(this.inputElement,"keyup").pipe(function(t,s=o){return i=>i.lift(new x(t,s))}(500),a((()=>this.inputElement.value)),p(),f(this.shouldExecuteSearch),E(this.onBeginSearch),m(this._searchFunction),E(this.onCompleteSearch)).subscribe()}componentDidUnload(){this.searchResultsSubscription.unsubscribe()}handleFocus(){this.toggleDropdown(!0)}handleBlur(){this.isMouseOver||(this.toggleDropdown(!1),this.highlightedOptionIndex=void 0,this.resetInput())}handleKeyDown(t){this.processKeyboardNavigation(t)&&t.preventDefault()}render(){var t;return[i("div",{class:"dropdown"},i("input",{type:"text",class:"form-control",placeholder:this.placeholder,required:this.required,disabled:this.disabled,value:this.inputValue,ref:t=>this.inputElement=t}),i("div",{class:{"invalid-feedback":!0,"d-none":this.isDropdownVisible}},null!==(t=this.requiredValidationMessage)&&void 0!==t?t:"Required."),i("div",{class:{"dropdown-menu shadow mt-0 w-100 overflow-auto":!0,show:this.isDropdownVisible},onMouseEnter:()=>this.isMouseOver=!0,onMouseLeave:()=>this.isMouseOver=!1},this.renderFilteredResults()))]}get _searchFunction(){if(void 0===this.searchFunction)throw new Error("Can't render <fl-dropdown-async/> component with no searchFunction");return this.searchFunction}};var B;A.style="fl-dropdown .dropdown-menu{max-height:min(20rem, 50vh)}fl-dropdown .dropdown-menu .dropdown-item{cursor:pointer}fl-dropdown .dropdown-menu .dropdown-item.selected{background-color:rgba(253, 189, 0, 0.5)}",function(t){t[t.Available=0]="Available",t[t.Pending=1]="Pending",t[t.Error=2]="Error"}(B||(B={}));const D=class{constructor(s){t(this,s),this.isBlockElement=!1,this.isRounded=!1,this.disabled=!1,this.variant="primary",this.promiseFn=()=>Promise.resolve(),this.state=B.Available}render(){return this.state===B.Pending?this.renderLoadingButton():this.renderActiveButton()}renderActiveButton(){return i("fl-button",{disabled:this.disabled,onClick:()=>this.clicked(),isBlockElement:this.isBlockElement,variant:this.variant},i("div",null,i("slot",null)))}renderLoadingButton(){return i("fl-button",{disabled:!0,onClick:()=>this.clicked(),isBlockElement:this.isBlockElement,class:"position-relative",variant:this.variant},i("fl-loading-indicator",{class:"position-absolute",theme:"dark"}),i("div",{class:"invisible"},i("slot",null)))}async clicked(){this.state=B.Pending;try{await this.promiseFn(),this.state=B.Available}catch(t){throw this.state=B.Error,t}}};D.style="fl-promise-button fl-loading-indicator{left:50%;top:50%;transform:translate(-50%, -50%)}";export{A as fl_dropdown_async,D as fl_promise_button}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{g as n,a as r,s as t,c as e,n as o,i,e as a}from"./p-3d4d2683.js";function u(n,r,t,e,o,i,a,u,s,c,f,l,v,d,h,p,y,m,b,w){switch(arguments.length){case 1:return n;case 2:return r(n);case 3:return t(r(n));case 4:return e(t(r(n)));case 5:return o(e(t(r(n))));case 6:return i(o(e(t(r(n)))));case 7:return a(i(o(e(t(r(n))))));case 8:return u(a(i(o(e(t(r(n)))))));case 9:return s(u(a(i(o(e(t(r(n))))))));case 10:return c(s(u(a(i(o(e(t(r(n)))))))));case 11:return f(c(s(u(a(i(o(e(t(r(n))))))))));case 12:return l(f(c(s(u(a(i(o(e(t(r(n)))))))))));case 13:return v(l(f(c(s(u(a(i(o(e(t(r(n))))))))))));case 14:return d(v(l(f(c(s(u(a(i(o(e(t(r(n)))))))))))));case 15:return h(d(v(l(f(c(s(u(a(i(o(e(t(r(n))))))))))))));case 16:return p(h(d(v(l(f(c(s(u(a(i(o(e(t(r(n)))))))))))))));case 17:return y(p(h(d(v(l(f(c(s(u(a(i(o(e(t(r(n))))))))))))))));case 18:return m(y(p(h(d(v(l(f(c(s(u(a(i(o(e(t(r(n)))))))))))))))));case 19:return b(m(y(p(h(d(v(l(f(c(s(u(a(i(o(e(t(r(n))))))))))))))))));case 20:return w(b(m(y(p(h(d(v(l(f(c(s(u(a(i(o(e(t(r(n)))))))))))))))))))}}var s=u;function c(r,t){return s(r,n((()=>t)))}function f(r){return s(r,n((()=>{throw new Error("Option value is none.")})))}function l(n){return n.map((n=>({label:String(n),value:n})))}var v=function(){return(v=Object.assign||function(n){for(var r,t=1,e=arguments.length;t<e;t++)for(var o in r=arguments[t])Object.prototype.hasOwnProperty.call(r,o)&&(n[o]=r[o]);return n}).apply(this,arguments)},d=function(){for(var n=0,r=0,t=arguments.length;r<t;r++)n+=arguments[r].length;var e=Array(n),o=0;for(r=0;r<t;r++)for(var i=arguments[r],a=0,u=i.length;a<u;a++,o++)e[o]=i[a];return e},h=function(n,r,t){if(void 0===t&&(t=!1),!n||!r||"object"!=typeof n||"object"!=typeof r)return n;var e=v({},n);for(var o in r)r.hasOwnProperty(o)&&(e[o]=r[o]instanceof Array&&n[o]instanceof Array?t?d(n[o],r[o]):r[o]:"object"==typeof r[o]&&"object"==typeof n[o]?h(n[o],r[o],t):r[o]);return e},p=function(){for(var n=0,r=0,t=arguments.length;r<t;r++)n+=arguments[r].length;var e=Array(n),o=0;for(r=0;r<t;r++)for(var i=arguments[r],a=0,u=i.length;a<u;a++,o++)e[o]=i[a];return e},y={defaults:{},errorType:null,polyfills:{fetch:null,FormData:null,URLSearchParams:null,performance:null,PerformanceObserver:null,AbortController:null},polyfill:function(n,r){for(var t=void 0===r?{}:r,e=t.doThrow,o=void 0===e||e,i=t.instance,a=void 0!==i&&i,u=[],s=2;s<arguments.length;s++)u[s-2]=arguments[s];var c=this.polyfills[n]||("undefined"!=typeof self?self[n]:null)||("undefined"!=typeof global?global[n]:null);if(o&&!c)throw new Error(n+" is not defined");return a&&c?new(c.bind.apply(c,p([void 0],u))):c}},m=function(n,r,t,e){if(!n.getEntriesByName)return!1;var o=n.getEntriesByName(r);return!!(o&&o.length>0)&&(t(o.reverse()[0]),e.clearMeasures&&e.clearMeasures(r),b.callbacks.delete(r),b.callbacks.size<1&&(b.observer.disconnect(),e.clearResourceTimings&&e.clearResourceTimings()),!0)},b={callbacks:new Map,observer:null,observe:function(n,r){if(n&&r){var t=y.polyfill("performance",{doThrow:!1});(function(n,r){return!b.observer&&n&&r&&(b.observer=new r((function(r){b.callbacks.forEach((function(t,e){m(r,e,t,n)}))})),n.clearResourceTimings&&n.clearResourceTimings()),b.observer})(t,y.polyfill("PerformanceObserver",{doThrow:!1}))&&(m(t,n,r,t)||(b.callbacks.size<1&&b.observer.observe({entryTypes:["resource","measure"]}),b.callbacks.set(n,r)))}}},w=function(n){this.error=n},A=function(){return(A=Object.assign||function(n){for(var r,t=1,e=arguments.length;t<e;t++)for(var o in r=arguments[t])Object.prototype.hasOwnProperty.call(r,o)&&(n[o]=r[o]);return n}).apply(this,arguments)},g=function(){for(var n=0,r=0,t=arguments.length;r<t;r++)n+=arguments[r].length;var e=Array(n),o=0;for(r=0;r<t;r++)for(var i=arguments[r],a=0,u=i.length;a<u;a++,o++)e[o]=i[a];return e},C=function(){function n(n,r,t,e,o,i){void 0===t&&(t=new Map),void 0===e&&(e=[]),void 0===o&&(o=[]),void 0===i&&(i=[]),this._url=n,this._options=r,this._catchers=t,this._resolvers=e,this._middlewares=o,this._deferredChain=i}return n.factory=function(r,t){return void 0===r&&(r=""),void 0===t&&(t={}),new n(r,t)},n.prototype.selfFactory=function(r){var t=void 0===r?{}:r,e=t.url,o=t.options,i=t.catchers,a=void 0===i?this._catchers:i,u=t.resolvers,s=void 0===u?this._resolvers:u,c=t.middlewares,f=void 0===c?this._middlewares:c,l=t.deferredChain,v=void 0===l?this._deferredChain:l;return new n(void 0===e?this._url:e,A({},void 0===o?this._options:o),new Map(a),g(s),g(f),g(v))},n.prototype.defaults=function(n,r){return void 0===r&&(r=!1),y.defaults=r?h(y.defaults,n):n,this},n.prototype.errorType=function(n){return y.errorType=n,this},n.prototype.polyfills=function(n){return y.polyfills=A(A({},y.polyfills),n),this},n.prototype.url=function(n,r){if(void 0===r&&(r=!1),r)return this.selfFactory({url:n});var t=this._url.split("?");return this.selfFactory({url:t.length>1?t[0]+n+"?"+t[1]:this._url+n})},n.prototype.options=function(n,r){return void 0===r&&(r=!0),this.selfFactory({options:r?h(this._options,n):n})},n.prototype.query=function(n,r){return void 0===r&&(r=!1),this.selfFactory({url:j(this._url,n,r)})},n.prototype.headers=function(n){return this.selfFactory({options:h(this._options,{headers:n||{}})})},n.prototype.accept=function(n){return this.headers({Accept:n})},n.prototype.content=function(n){var r;return this.headers(((r={})["Content-Type"]=n,r))},n.prototype.auth=function(n){return this.headers({Authorization:n})},n.prototype.catcher=function(n,r){var t=new Map(this._catchers);return t.set(n,r),this.selfFactory({catchers:t})},n.prototype.signal=function(n){return this.selfFactory({options:A(A({},this._options),{signal:n.signal})})},n.prototype.resolve=function(n,r){return void 0===r&&(r=!1),this.selfFactory({resolvers:r?[n]:g(this._resolvers,[n])})},n.prototype.defer=function(n,r){return void 0===r&&(r=!1),this.selfFactory({deferredChain:r?[n]:g(this._deferredChain,[n])})},n.prototype.middlewares=function(n,r){return void 0===r&&(r=!1),this.selfFactory({middlewares:r?n:g(this._middlewares,n)})},n.prototype.method=function(n,r,t){void 0===r&&(r={}),void 0===t&&(t=null);var e=this._options.headers,o=t?"object"!=typeof t||e&&!Object.entries(e).every((function(n){var r=n[1];return n[0].toLowerCase()!=="Content-Type".toLowerCase()||r.startsWith("application/json")}))?this.body(t):this.json(t):this;return function(n){var r=n._url,t=n._resolvers,e=n._middlewares,o=n._options,i=new Map(n._catchers),a=h(y.defaults,o),u=y.polyfill("AbortController",{doThrow:!1,instance:!0});!a.signal&&u&&(a.signal=u.signal);var s={ref:null,clear:function(){s.ref&&(clearTimeout(s.ref),s.ref=null)}},c=function(n){return function(r){return 0===n.length?r:1===n.length?n[0](r):n.reduceRight((function(t,e,o){return e(o===n.length-2?t(r):t)}))}}(e)(y.polyfill("fetch"))(r,a),f=c.catch((function(n){throw new w(n)})).then((function(n){return s.clear(),n.ok?n:n[y.errorType||"text"]().then((function(r){var t=new Error(r);throw t[y.errorType||"text"]=r,t.status=n.status,t.response=n,t}))})),l=function(r){return function(t){return(r?f.then((function(n){return n&&n[r]()})).then((function(n){return t?t(n):n})):f.then((function(n){return t?t(n):n}))).catch((function(r){s.clear();var t=r instanceof w?r.error:r;if(r instanceof w&&i.has("__fromFetch"))return i.get("__fromFetch")(t,n);if(i.has(t.status))return i.get(t.status)(t,n);if(i.has(t.name))return i.get(t.name)(t,n);throw t}))}},v={res:l(null),json:l("json"),blob:l("blob"),formData:l("formData"),arrayBuffer:l("arrayBuffer"),text:l("text"),perfs:function(n){return c.then((function(r){return b.observe(r.url,n)})),v},setTimeout:function(n,r){return void 0===r&&(r=u),s.clear(),s.ref=setTimeout((function(){return r.abort()}),n),v},controller:function(){return[u,v]},error:function(n,r){return i.set(n,r),v},badRequest:function(n){return v.error(400,n)},unauthorized:function(n){return v.error(401,n)},forbidden:function(n){return v.error(403,n)},notFound:function(n){return v.error(404,n)},timeout:function(n){return v.error(408,n)},internalError:function(n){return v.error(500,n)},fetchError:function(n){return v.error("__fromFetch",n)},onAbort:function(n){return v.error("AbortError",n)}};return t.reduce((function(r,t){return t(r,n)}),v)}((o=o.options(A(A({},r),{method:n})))._deferredChain.reduce((function(n,r){return r(n,n._url,n._options)}),o))},n.prototype.get=function(n){return this.method("GET",n)},n.prototype.delete=function(n){return this.method("DELETE",n)},n.prototype.put=function(n,r){return this.method("PUT",r,n)},n.prototype.post=function(n,r){return this.method("POST",r,n)},n.prototype.patch=function(n,r){return this.method("PATCH",r,n)},n.prototype.head=function(n){return this.method("HEAD",n)},n.prototype.opts=function(n){return this.method("OPTIONS",n)},n.prototype.replay=function(n){return this.method(this._options.method,n)},n.prototype.body=function(n){return this.selfFactory({options:A(A({},this._options),{body:n})})},n.prototype.json=function(n){var r,t=null===(r=Object.entries(this._options.headers||{}).find((function(n){var r=n[1];return n[0].toLowerCase()==="Content-Type".toLowerCase()&&r.startsWith("application/json")})))||void 0===r?void 0:r[1];return this.content(t||"application/json").body(JSON.stringify(n))},n.prototype.formData=function(n,r){return void 0===r&&(r=!1),this.body(T(n,r))},n.prototype.formUrl=function(n){return this.body("string"==typeof n?n:(r=n,Object.keys(r).map((function(n){var t=r[n];return t instanceof Array?t.map((function(r){return O(n,r)})).join("&"):O(n,t)})).join("&"))).content("application/x-www-form-urlencoded");var r},n}(),j=function(n,r,t){var e;if("string"==typeof r)e=r;else{var o=y.polyfill("URLSearchParams",{instance:!0});for(var i in r)if(r[i]instanceof Array)for(var a=0,u=r[i];a<u.length;a++)o.append(i,u[a]);else o.append(i,r[i]);e=o.toString()}var s=n.split("?");return t||s.length<2?s[0]+"?"+e:n+"&"+e};function T(n,r,t,e){return void 0===r&&(r=!1),void 0===t&&(t=y.polyfill("FormData",{instance:!0})),void 0===e&&(e=[]),Object.entries(n).forEach((function(n){var o=n[0],i=n[1],a=e.reduce((function(n,r){return n?n+"["+r+"]":r}),null);if(a=a?a+"["+o+"]":o,i instanceof Array)for(var u=0,s=i;u<s.length;u++)t.append(a+"[]",s[u]);else!r||"object"!=typeof i||r instanceof Array&&r.includes(o)?t.append(a,i):null!==i&&T(i,r,t,g(e,[o]))})),t}function O(n,r){return encodeURIComponent(n)+"="+encodeURIComponent("object"==typeof r?JSON.stringify(r):""+r)}var P=C.factory;function E(){return P(r.apiBaseUrl)}P.default=C.factory;const x=new class{async getCarsMakes(){return(await E().url("/makes").get().json()).qt_makes}async getCarsModels(n){return(await E().url(`/makes/${n}/models`).get().json()).qt_models}async getCarsModelYears(n){return E().url(`/models/${n}/years`).get().json()}async getCarsModelBodyTypes(n,r){return(await E().url(`/models/${n}/years/${r}/body-types`).get().json()).qt_body_types}async getCarsModelVariant(n,r,t){return(await E().url(`/models/${n}/years/${r}/body-types/${t}/variants`).get().json()).qt_variants}async getCarsVariantPhotos(n){return(await E().url(`/variants/${n}/photos`).get().json()).qt_variant_photos}async postCarsQuoteResult(n){return await E().url("/quote").post(n).json()}async postQuoteInfoAsync(n){return E().url("/enquiry").post(n).text()}},M=new class{constructor(){t.select(["user","vehicle"]).subscribe((n=>this.attemptQuoteCalculationAsync(n.user,n.vehicle)))}selectVariant(n){e.update((r=>({vehicle:Object.assign(Object.assign({},r.vehicle),{selectedVariant:n})})))}generateCarsEnquiryRequest(){const n=f(t.vehicle.selectedVariant),r=t.result,e=t.userDetails;return{chosenVariant:{variant_id:n.variantId,short_description:n.description,build_year:n.buildYear,model_month:n.modelMonth,list_price_gross:n.listPriceGross},websiteQuote:{afterTaxEffectPerPayCycle:f(r.afterTaxEffectPerPayCycle),totalTaxSavings:f(r.taxSaving),residualValueGross:f(r.residualValue),financedAmount:f(r.financedAmount),fuel:f(r.fuel),serviceAndMaintenance:f(r.serviceAndMaintenance),registrationAndCtp:f(r.registrationAndCtp),comprehensiveInsurance:f(r.comprehensiveInsurance),managementFee:f(r.managementFee)},contactDetails:{firstName:f(e.userFirstName),lastName:f(e.userLastName),email:f(e.emailAddress),mobileNumber:f(e.contactNumber),employerName:f(e.employerName)}}}async attemptQuoteCalculationAsync(n,r){if(!(i(n.annualKms)&&i(n.annualSalary)&&i(n.paymentPeriod)&&i(n.state)&&i(n.term)&&i(r.selectedVariant)))return;e.updateQuote({afterTaxEffectPerPayCycle:o,taxSaving:o,residualValue:o,financedAmount:o,fuel:o,serviceAndMaintenance:o,registrationAndCtp:o,comprehensiveInsurance:o,managementFee:o,quoteState:"Calculation pending"});const t=f(r.selectedVariant),u=f(r.isUsedCarRequested)?f(r.approximatePrice):t.listPriceGross,s={variantId:t.variantId,isUsedCarRequested:f(r.isUsedCarRequested),approximatePrice:u,annualSalaryGross:f(n.annualSalary),payPeriod:f(n.paymentPeriod),annualKm:f(n.annualKms),state:f(n.state),leaseTermInYears:f(n.term)},c=await x.postCarsQuoteResult(s),l={afterTaxEffectPerPayCycle:a(c.afterTaxEffectPerPayCycle),taxSaving:a(c.totalTaxSavings),residualValue:a(c.residualValueGross),financedAmount:a(c.financedAmount),fuel:a(c.fuel),serviceAndMaintenance:a(c.serviceAndMaintenance),registrationAndCtp:a(c.registrationAndCtp),comprehensiveInsurance:a(c.comprehensiveInsurance),managementFee:a(c.managementFee),quoteState:"Calculated"};e.updateQuote(l)}};export{f as a,x as b,M as c,c as g,u as p,l as t}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{O as t,s,c as e,d as i,a as r}from"./p-68c136da.js";const n=new t((t=>t.complete()));function c(s){return s?function(s){return new t((t=>s.schedule((()=>t.complete()))))}(s):n}function h(t){return t&&"function"==typeof t.schedule}function a(...i){let r=i[i.length-1];return h(r)?(i.pop(),e(i,r)):new t(s(i))}var o;!function(t){t.NEXT="N",t.ERROR="E",t.COMPLETE="C"}(o||(o={}));class u{constructor(t,s,e){this.kind=t,this.value=s,this.error=e,this.hasValue="N"===t}observe(t){switch(this.kind){case"N":return t.next&&t.next(this.value);case"E":return t.error&&t.error(this.error);case"C":return t.complete&&t.complete()}}do(t,s,e){switch(this.kind){case"N":return t&&t(this.value);case"E":return s&&s(this.error);case"C":return e&&e()}}accept(t,s,e){return t&&"function"==typeof t.next?this.observe(t):this.do(t,s,e)}toObservable(){switch(this.kind){case"N":return a(this.value);case"E":return s=this.error,new t((t=>t.error(s)));case"C":return c()}var s;throw new Error("unexpected notification kind value")}static createNext(t){return void 0!==t?new u("N",t):u.undefinedValueNotification}static createError(t){return new u("E",void 0,t)}static createComplete(){return u.completeNotification}}function f(t,s=i){var e;const r=(e=t)instanceof Date&&!isNaN(+e)?+t-s.now():Math.abs(t);return t=>t.lift(new w(r,s))}u.completeNotification=new u("C"),u.undefinedValueNotification=new u("N",void 0);class w{constructor(t,s){this.delay=t,this.scheduler=s}call(t,s){return s.subscribe(new d(t,this.delay,this.scheduler))}}class d extends r{constructor(t,s,e){super(t),this.delay=s,this.scheduler=e,this.queue=[],this.active=!1,this.errored=!1}static dispatch(t){const s=t.source,e=s.queue,i=t.scheduler,r=t.destination;for(;e.length>0&&e[0].time-i.now()<=0;)e.shift().notification.observe(r);if(e.length>0){const s=Math.max(0,e[0].time-i.now());this.schedule(t,s)}else this.unsubscribe(),s.active=!1}_schedule(t){this.active=!0,this.destination.add(t.schedule(d.dispatch,this.delay,{source:this,destination:this.destination,scheduler:t}))}scheduleNotification(t){if(!0===this.errored)return;const s=this.scheduler,e=new l(s.now()+this.delay,t);this.queue.push(e),!1===this.active&&this._schedule(s)}_next(t){this.scheduleNotification(u.createNext(t))}_error(t){this.errored=!0,this.queue=[],this.destination.error(t),this.unsubscribe()}_complete(){this.scheduleNotification(u.createComplete()),this.unsubscribe()}}class l{constructor(t,s){this.time=t,this.notification=s}}export{u as N,f as d,c as e,h as i,a as o}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as t,e as s,h as i}from"./p-50fe790f.js";var e={compareTwoStrings:o,findBestMatch:function(t,s){if(!function(t,s){return"string"==typeof t&&!!Array.isArray(s)&&!!s.length&&!s.find((t=>"string"!=typeof t))}(t,s))throw new Error("Bad arguments: First argument should be a string, second should be an array of strings");const i=[];let e=0;for(let n=0;n<s.length;n++){const r=s[n],h=o(t,r);i.push({target:r,rating:h}),h>i[e].rating&&(e=n)}return{ratings:i,bestMatch:i[e],bestMatchIndex:e}}};function o(t,s){if(t=t.replace(/\s+/g,""),s=s.replace(/\s+/g,""),!t.length&&!s.length)return 1;if(!t.length||!s.length)return 0;if(t===s)return 1;if(1===t.length&&1===s.length)return 0;if(t.length<2||s.length<2)return 0;let i=new Map;for(let s=0;s<t.length-1;s++){const e=t.substring(s,s+2),o=i.has(e)?i.get(e)+1:1;i.set(e,o)}let e=0;for(let t=0;t<s.length-1;t++){const o=s.substring(t,t+2),n=i.has(o)?i.get(o):0;n>0&&(i.set(o,n-1),e++)}return 2*e/(t.length+s.length-2)}const n=class{constructor(e){t(this,e),this.valueChanged=s(this,"valueChanged",7),this.required=!1,this.disabled=!1,this.isMouseOver=!1,this.inputValue="",this.isDropdownVisible=!1,this.filteredOptions=[],this.renderFilteredResults=()=>0===this.filteredOptions.length?i("span",{class:"dropdown-item disabled"},"No items match your search"):this.filteredOptions.map(((t,s)=>i("span",{class:{"dropdown-item text-wrap":!0,selected:this.isOptionSelected(t),active:this.highlightedOptionIndex===s},onClick:()=>{this.toggleDropdown(!1),this.selectOption(t)}},i("span",null,t.label)))),this.filterResults=t=>{this.filteredOptions=this.sortOptionsByRelevancy(this._options.filter((s=>s.label.toLowerCase().includes(t.toLowerCase()))),t),this.highlightedOptionIndex=void 0},this.selectOption=t=>{this.selectedOption=t,this.inputValue=t.label,this.valueChanged.emit(t)},this.isOptionSelected=t=>{var s;return(null===(s=this.selectedOption)||void 0===s?void 0:s.label)===t.label},this.toggleDropdown=t=>{this.isDropdownVisible=t},this.resetInput=()=>{var t,s;this.inputValue=null!==(s=null===(t=this.selectedOption)||void 0===t?void 0:t.label)&&void 0!==s?s:"",this.filteredOptions=this._options},this.processKeyboardNavigation=t=>{switch(t.key){case"ArrowDown":return this.toggleDropdown(!0),this.highlightNextItem(),!0;case"ArrowUp":return this.highlightPreviousItem(),!0;case"Enter":return void 0!==this.highlightedOptionIndex&&(this.toggleDropdown(!1),this.selectOption(this.filteredOptions[this.highlightedOptionIndex])),!0;case"Escape":return this.inputElement.blur(),!0}return!1},this.highlightPreviousItem=()=>{0!==this.filteredOptions.length&&(this.highlightedOptionIndex=void 0===this.highlightedOptionIndex?0:Math.max(this.highlightedOptionIndex-1,0))},this.highlightNextItem=()=>{0!==this.filteredOptions.length&&(this.highlightedOptionIndex=void 0===this.highlightedOptionIndex?0:Math.min(this.highlightedOptionIndex+1,this.filteredOptions.length-1))}}get _options(){if(void 0===this.options)throw new Error("Can't render <fl-dropdown /> component with no options");return this.options}componentWillLoad(){var t,s;this.filteredOptions=this._options,this.selectedOption=this._options.find((t=>t.value===this.value)),this.inputValue=null!==(s=null===(t=this.selectedOption)||void 0===t?void 0:t.label)&&void 0!==s?s:""}handleFocus(){this.toggleDropdown(!0)}handleBlur(){this.isMouseOver||(this.toggleDropdown(!1),this.resetInput())}handleKeyDown(t){this.processKeyboardNavigation(t)&&t.preventDefault()}onOptionsChanged(){this.filteredOptions=this._options}onValueChanged(){var t,s;this.selectedOption=this._options.find((t=>t.value===this.value)),this.inputValue=null!==(s=null===(t=this.selectedOption)||void 0===t?void 0:t.label)&&void 0!==s?s:""}render(){var t;return[i("div",{class:"dropdown"},i("input",{type:"text",class:"form-control custom-select",placeholder:this.placeholder,required:this.required,disabled:this.disabled,value:this.inputValue,onInput:t=>{const s=t.target.value;this.inputValue=s,this.filterResults(s),this.toggleDropdown(!0)},ref:t=>this.inputElement=t}),i("div",{class:{"invalid-feedback":!0,"d-none":this.isDropdownVisible}},null!==(t=this.requiredValidationMessage)&&void 0!==t?t:"Required."),i("div",{class:{"dropdown-menu shadow mt-0 w-100 overflow-auto":!0,show:this.isDropdownVisible},onMouseEnter:()=>this.isMouseOver=!0,onMouseLeave:()=>this.isMouseOver=!1},this.renderFilteredResults()))]}sortOptionsByRelevancy(t,s){return t.map((t=>Object.assign(Object.assign({},t),{relevancyScore:e.compareTwoStrings(t.label.toLowerCase(),s.toLowerCase())}))).sort(((t,s)=>s.relevancyScore-t.relevancyScore)).map((t=>({label:t.label,value:t.value})))}static get watchers(){return{options:["onOptionsChanged"],value:["onValueChanged"]}}};n.style="fl-dropdown .dropdown-menu{max-height:min(20rem, 50vh)}fl-dropdown .dropdown-menu .dropdown-item{cursor:pointer}fl-dropdown .dropdown-menu .dropdown-item.selected{background-color:rgba(253, 189, 0, 0.5)}";export{n as fl_dropdown}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as t,h as e,H as n,d as a}from"./p-50fe790f.js";import"./p-f603197d.js";import"./p-68c136da.js";import"./p-b33fc683.js";import"./p-24a37d64.js";import{g as r,b as i,a as o,p as s,c,t as u}from"./p-acf61bdc.js";import{s as l,b as d,c as h,f,g as m,d as w,n as g,e as p,h as b}from"./p-3d4d2683.js";const v=class{constructor(e){t(this,e),this.toCapitalCase=t=>null==t?void 0:t.split(" ").map((t=>t.charAt(0).toUpperCase()+t.slice(1).toLowerCase())).join(" "),l.vehicle$.subscribe((t=>this.vehicleInfo=t)),l.makeList$.subscribe((t=>this.makeList=r(t,[]))),l.modelList$.subscribe((t=>this.modelList=r(t,[]))),l.yearList$.subscribe((t=>this.yearList=r(t,[]))),l.bodyTypeList$.subscribe((t=>this.bodyTypeList=r(t,[])))}render(){return e(n,null,e("div",{class:"d-flex flex-column flex-wrap flex-md-row align-items-center justify-content-center h4"},e("div",{class:"d-flex align-items-center"},"I'm looking to buy a"),e("div",{class:"d-flex mx-2 my-2 my-md-0"},e("div",{class:"btn-group",role:"group","aria-label":"New or used vehicle"},e("button",{type:"button",class:{"btn btn-outline-dark px-5":!0,active:!this.isUsedCarSelected()},onClick:()=>h.setVehicleState("isUsedCarRequested",!1)},"New"),e("button",{type:"button",class:{"btn btn-outline-dark px-5":!0,active:this.isUsedCarSelected()},onClick:()=>h.setVehicleState("isUsedCarRequested",!0)},"Used"))),this.isUsedCarSelected()?e("div",{class:"d-flex flex-column flex-md-row align-items-center justify-content-center my-0 my-md-2 my-xl-0"},e("span",{class:"pr-0 pr-sm-2 d-flex text-center"},"vehicle, with a purchase price of"),e("input",{placeholder:"25000",type:"text",class:"form-control d-flex w-auto mt-2 mt-md-0",value:"$"+this.getVehicleInfo("approximatePrice"),onInput:t=>{const e=t.target;e.value=e.value.replace(/\D/g,"")},onFocus:t=>{const e=t.target;e.value=e.value.replace("$","")},onBlur:t=>{const e=t.target;e.value="$"+e.value},onChange:t=>h.setVehicleState("approximatePrice",parseFloat(t.target.value))})):e("div",{class:"d-flex align-items-center"},"vehicle")),e("div",{class:"d-flex flex-wrap flex-column flex-md-row align-items-center justify-content-center mt-5 h4"},e("div",{class:"d-flex align-items-center"},"I'm interested in a"),e("div",{class:"d-flex mx-2 my-2 my-md-0"},e("fl-dropdown",{options:this.makeList,requiredValidationMessage:"Select an option",placeholder:"select make",value:this.getVehicleInfo("makeId"),onValueChanged:t=>this.chooseMake(t.detail.label,t.detail.value)})),e("div",{class:"d-flex mx-2 my-2 my-md-0"},e("fl-dropdown",{options:this.modelList,requiredValidationMessage:"Select an option",placeholder:"select model",value:this.getVehicleInfo("modelId"),disabled:d(this.vehicleInfo.makeId),onValueChanged:t=>this.chooseModel(t.detail.label,t.detail.value)})),e("div",{class:"d-flex align-items-center"},"built in"),e("div",{class:"d-flex mx-2 my-2 my-xl-0"},e("fl-dropdown",{options:this.yearList,requiredValidationMessage:"Select an option",placeholder:"select year",value:this.getVehicleInfo("year"),disabled:d(this.vehicleInfo.modelId),onValueChanged:t=>this.chooseYear(t.detail.value)}))),e("div",{class:"d-flex align-items-center justify-content-center justify-content-md-start mt-5"},e("div",{class:"btn-group",role:"group","aria-label":"Body types"},this.bodyTypeList.map((t=>e("button",{type:"button",class:{"btn btn-sm btn-outline-dark px-5":!0,active:this.isBodyTypeSelected(t.value)},onClick:()=>this.chooseBodyType(t.label,t.value)},t.label))))))}async componentDidLoad(){var t;if((null===(t=this.makeList)||void 0===t?void 0:t.length)>0)return;const e=await i.getCarsMakes();h.updateList("makeList",e.map((t=>({label:this.toCapitalCase(t.name),value:t.make_id}))))}async chooseMake(t,e){var n;this.clearModelStates(),this.clearYearStates(),this.clearBodyTypeStates(),this.clearVariantsList(),0===(null===(n=this.modelList)||void 0===n?void 0:n.length)&&h.updateList("modelList",(await i.getCarsModels(e)).map((t=>({label:this.toCapitalCase(t.model_code),value:t.model_id})))),h.setVehicleState("make",t),h.setVehicleState("makeId",e)}async chooseModel(t,e){var n;this.clearYearStates(),this.clearBodyTypeStates(),this.clearVariantsList(),0===(null===(n=this.yearList)||void 0===n?void 0:n.length)&&h.updateList("yearList",(await i.getCarsModelYears(e)).sort().reverse().map((t=>({label:t.toString(),value:t})))),h.setVehicleState("model",t),h.setVehicleState("modelId",e)}async chooseYear(t){var e;this.clearBodyTypeStates(),this.clearVariantsList();const n=o(this.vehicleInfo.modelId);0===(null===(e=this.bodyTypeList)||void 0===e?void 0:e.length)&&h.updateList("bodyTypeList",(await i.getCarsModelBodyTypes(n,t)).map((t=>({label:t.body_type,value:t.body_type_id})))),h.setVehicleState("year",t),await this.chooseBodyType(this.bodyTypeList[0].label,this.bodyTypeList[0].value)}async chooseBodyType(t,e){var n,a;this.clearVariantsList();const r=o(this.vehicleInfo.modelId),s=o(this.vehicleInfo.year),c=(await i.getCarsModelVariant(r,s,e)).map((async t=>{var e;const n=await i.getCarsVariantPhotos(t.variant_id);return{variantId:t.variant_id,description:t.short_description,buildYear:t.build_year,modelMonth:t.model_month,listPriceGross:t.list_price_gross,photoUri:f(null===(e=null==n?void 0:n[0])||void 0===e?void 0:e.photo_uri)}})),u=[];try{for(var l,d=function(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e,n=t[Symbol.asyncIterator];return n?n.call(t):(t="function"==typeof __values?__values(t):t[Symbol.iterator](),e={},a("next"),a("throw"),a("return"),e[Symbol.asyncIterator]=function(){return this},e);function a(n){e[n]=t[n]&&function(e){return new Promise((function(a,r){!function(t,e,n,a){Promise.resolve(a).then((function(e){t({value:e,done:n})}),e)}(a,r,(e=t[n](e)).done,e.value)}))}}}(c);!(l=await d.next()).done;)u.push(l.value)}catch(t){n={error:t}}finally{try{l&&!l.done&&(a=d.return)&&await a.call(d)}finally{if(n)throw n.error}}h.updateList("modelVariantsList",u),h.setVehicleState("bodyType",t),h.setVehicleState("bodyTypeId",e)}clearModelStates(){this.modelList=[],this.clearVehicleState("model"),this.clearVehicleState("modelId")}clearYearStates(){this.yearList=[],this.clearVehicleState("year")}clearBodyTypeStates(){this.bodyTypeList=[],this.clearVehicleState("bodyType"),this.clearVehicleState("bodyTypeId")}clearVariantsList(){h.updateList("modelVariantsList",[])}clearVehicleState(t){h.setVehicleState(t,null)}getVehicleInfo(t){return s(this.vehicleInfo[t],m((()=>"")))}isBodyTypeSelected(t){return s(this.vehicleInfo.bodyTypeId,w((()=>!1),(e=>e===t)))}isUsedCarSelected(){return s(this.vehicleInfo.isUsedCarRequested,m((()=>!1)))}};function y(t){if(null===t||!0===t||!1===t)return NaN;var e=Number(t);return isNaN(e)?e:e<0?Math.ceil(e):Math.floor(e)}function x(t,e){if(e.length<t)throw new TypeError(t+" argument"+(t>1?"s":"")+" required, but only "+e.length+" present")}function M(t){x(1,arguments);var e=Object.prototype.toString.call(t);return t instanceof Date||"object"==typeof t&&"[object Date]"===e?new Date(t.getTime()):"number"==typeof t||"[object Number]"===e?new Date(t):("string"!=typeof t&&"[object String]"!==e||"undefined"==typeof console||(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://git.io/fjule"),console.warn((new Error).stack)),new Date(NaN))}function k(t,e){x(2,arguments);var n=M(t).getTime(),a=y(e);return new Date(n+a)}function S(t){return t.getTime()%6e4}function P(t){var e=new Date(t.getTime()),n=Math.ceil(e.getTimezoneOffset());return e.setSeconds(0,0),6e4*n+(n>0?(6e4+S(e))%6e4:S(e))}function j(t){x(1,arguments);var e=M(t);return!isNaN(e)}var E={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};function D(t){return function(e){var n=e||{},a=n.width?String(n.width):t.defaultWidth;return t.formats[a]||t.formats[t.defaultWidth]}}var q={date:D({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:D({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:D({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},C={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function Y(t){return function(e,n){var a,r=n||{};if("formatting"===(r.context?String(r.context):"standalone")&&t.formattingValues){var i=t.defaultFormattingWidth||t.defaultWidth,o=r.width?String(r.width):i;a=t.formattingValues[o]||t.formattingValues[i]}else{var s=t.defaultWidth,c=r.width?String(r.width):t.defaultWidth;a=t.values[c]||t.values[s]}return a[t.argumentCallback?t.argumentCallback(e):e]}}function W(t){return function(e,n){var a=String(e),r=n||{},i=r.width,o=a.match(i&&t.matchPatterns[i]||t.matchPatterns[t.defaultMatchWidth]);if(!o)return null;var s,c=o[0],u=i&&t.parsePatterns[i]||t.parsePatterns[t.defaultParseWidth];return s="[object Array]"===Object.prototype.toString.call(u)?function(t){for(var e=0;e<t.length;e++)if(t[e].test(c))return e}(u):function(t){for(var e in t)if(t.hasOwnProperty(e)&&t[e].test(c))return e}(u),s=t.valueCallback?t.valueCallback(s):s,{value:s=r.valueCallback?r.valueCallback(s):s,rest:a.slice(c.length)}}}var T,I={code:"en-US",formatDistance:function(t,e,n){var a;return n=n||{},a="string"==typeof E[t]?E[t]:1===e?E[t].one:E[t].other.replace("{{count}}",e),n.addSuffix?n.comparison>0?"in "+a:a+" ago":a},formatLong:q,formatRelative:function(t){return C[t]},localize:{ordinalNumber:function(t){var e=Number(t),n=e%100;if(n>20||n<10)switch(n%10){case 1:return e+"st";case 2:return e+"nd";case 3:return e+"rd"}return e+"th"},era:Y({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:Y({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:function(t){return Number(t)-1}}),month:Y({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:Y({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:Y({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:(T={matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:function(t){return parseInt(t,10)}},function(t,e){var n=String(t),a=e||{},r=n.match(T.matchPattern);if(!r)return null;var i=r[0],o=n.match(T.parsePattern);if(!o)return null;var s=T.valueCallback?T.valueCallback(o[0]):o[0];return{value:s=a.valueCallback?a.valueCallback(s):s,rest:n.slice(i.length)}}),era:W({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:W({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:function(t){return t+1}}),month:W({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:W({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:W({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})},options:{weekStartsOn:0,firstWeekContainsDate:1}};function L(t,e){x(2,arguments);var n=y(e);return k(t,-n)}function B(t,e){for(var n=t<0?"-":"",a=Math.abs(t).toString();a.length<e;)a="0"+a;return n+a}function N(t){x(1,arguments);var e=1,n=M(t),a=n.getUTCDay(),r=(a<e?7:0)+a-e;return n.setUTCDate(n.getUTCDate()-r),n.setUTCHours(0,0,0,0),n}function O(t){x(1,arguments);var e=M(t),n=e.getUTCFullYear(),a=new Date(0);a.setUTCFullYear(n+1,0,4),a.setUTCHours(0,0,0,0);var r=N(a),i=new Date(0);i.setUTCFullYear(n,0,4),i.setUTCHours(0,0,0,0);var o=N(i);return e.getTime()>=r.getTime()?n+1:e.getTime()>=o.getTime()?n:n-1}function X(t){x(1,arguments);var e=O(t),n=new Date(0);n.setUTCFullYear(e,0,4),n.setUTCHours(0,0,0,0);var a=N(n);return a}function Q(t,e){x(1,arguments);var n=e||{},a=n.locale,r=a&&a.options&&a.options.weekStartsOn,i=null==r?0:y(r),o=null==n.weekStartsOn?i:y(n.weekStartsOn);if(!(o>=0&&o<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var s=M(t),c=s.getUTCDay(),u=(c<o?7:0)+c-o;return s.setUTCDate(s.getUTCDate()-u),s.setUTCHours(0,0,0,0),s}function z(t,e){x(1,arguments);var n=M(t,e),a=n.getUTCFullYear(),r=e||{},i=r.locale,o=i&&i.options&&i.options.firstWeekContainsDate,s=null==o?1:y(o),c=null==r.firstWeekContainsDate?s:y(r.firstWeekContainsDate);if(!(c>=1&&c<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var u=new Date(0);u.setUTCFullYear(a+1,0,c),u.setUTCHours(0,0,0,0);var l=Q(u,e),d=new Date(0);d.setUTCFullYear(a,0,c),d.setUTCHours(0,0,0,0);var h=Q(d,e);return n.getTime()>=l.getTime()?a+1:n.getTime()>=h.getTime()?a:a-1}function V(t,e){x(1,arguments);var n=e||{},a=n.locale,r=a&&a.options&&a.options.firstWeekContainsDate,i=null==r?1:y(r),o=null==n.firstWeekContainsDate?i:y(n.firstWeekContainsDate),s=z(t,e),c=new Date(0);c.setUTCFullYear(s,0,o),c.setUTCHours(0,0,0,0);var u=Q(c,e);return u}var G={G:function(t,e,n){var a=t.getUTCFullYear()>0?1:0;switch(e){case"G":case"GG":case"GGG":return n.era(a,{width:"abbreviated"});case"GGGGG":return n.era(a,{width:"narrow"});case"GGGG":default:return n.era(a,{width:"wide"})}},y:function(t,e,n){if("yo"===e){var a=t.getUTCFullYear();return n.ordinalNumber(a>0?a:1-a,{unit:"year"})}return function(t,e){var n=t.getUTCFullYear(),a=n>0?n:1-n;return B("yy"===e?a%100:a,e.length)}(t,e)},Y:function(t,e,n,a){var r=z(t,a),i=r>0?r:1-r;return"YY"===e?B(i%100,2):"Yo"===e?n.ordinalNumber(i,{unit:"year"}):B(i,e.length)},R:function(t,e){return B(O(t),e.length)},u:function(t,e){return B(t.getUTCFullYear(),e.length)},Q:function(t,e,n){var a=Math.ceil((t.getUTCMonth()+1)/3);switch(e){case"Q":return String(a);case"QQ":return B(a,2);case"Qo":return n.ordinalNumber(a,{unit:"quarter"});case"QQQ":return n.quarter(a,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(a,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(a,{width:"wide",context:"formatting"})}},q:function(t,e,n){var a=Math.ceil((t.getUTCMonth()+1)/3);switch(e){case"q":return String(a);case"qq":return B(a,2);case"qo":return n.ordinalNumber(a,{unit:"quarter"});case"qqq":return n.quarter(a,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(a,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(a,{width:"wide",context:"standalone"})}},M:function(t,e,n){var a=t.getUTCMonth();switch(e){case"M":case"MM":return function(t,e){var n=t.getUTCMonth();return"M"===e?String(n+1):B(n+1,2)}(t,e);case"Mo":return n.ordinalNumber(a+1,{unit:"month"});case"MMM":return n.month(a,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(a,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(a,{width:"wide",context:"formatting"})}},L:function(t,e,n){var a=t.getUTCMonth();switch(e){case"L":return String(a+1);case"LL":return B(a+1,2);case"Lo":return n.ordinalNumber(a+1,{unit:"month"});case"LLL":return n.month(a,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(a,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(a,{width:"wide",context:"standalone"})}},w:function(t,e,n,a){var r=function(t,e){x(1,arguments);var n=M(t),a=Q(n,e).getTime()-V(n,e).getTime();return Math.round(a/6048e5)+1}(t,a);return"wo"===e?n.ordinalNumber(r,{unit:"week"}):B(r,e.length)},I:function(t,e,n){var a=function(t){x(1,arguments);var e=M(t),n=N(e).getTime()-X(e).getTime();return Math.round(n/6048e5)+1}(t);return"Io"===e?n.ordinalNumber(a,{unit:"week"}):B(a,e.length)},d:function(t,e,n){return"do"===e?n.ordinalNumber(t.getUTCDate(),{unit:"date"}):function(t,e){return B(t.getUTCDate(),e.length)}(t,e)},D:function(t,e,n){var a=function(t){x(1,arguments);var e=M(t),n=e.getTime();e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0);var a=e.getTime();return Math.floor((n-a)/864e5)+1}(t);return"Do"===e?n.ordinalNumber(a,{unit:"dayOfYear"}):B(a,e.length)},E:function(t,e,n){var a=t.getUTCDay();switch(e){case"E":case"EE":case"EEE":return n.day(a,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(a,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(a,{width:"short",context:"formatting"});case"EEEE":default:return n.day(a,{width:"wide",context:"formatting"})}},e:function(t,e,n,a){var r=t.getUTCDay(),i=(r-a.weekStartsOn+8)%7||7;switch(e){case"e":return String(i);case"ee":return B(i,2);case"eo":return n.ordinalNumber(i,{unit:"day"});case"eee":return n.day(r,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(r,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(r,{width:"short",context:"formatting"});case"eeee":default:return n.day(r,{width:"wide",context:"formatting"})}},c:function(t,e,n,a){var r=t.getUTCDay(),i=(r-a.weekStartsOn+8)%7||7;switch(e){case"c":return String(i);case"cc":return B(i,e.length);case"co":return n.ordinalNumber(i,{unit:"day"});case"ccc":return n.day(r,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(r,{width:"narrow",context:"standalone"});case"cccccc":return n.day(r,{width:"short",context:"standalone"});case"cccc":default:return n.day(r,{width:"wide",context:"standalone"})}},i:function(t,e,n){var a=t.getUTCDay(),r=0===a?7:a;switch(e){case"i":return String(r);case"ii":return B(r,e.length);case"io":return n.ordinalNumber(r,{unit:"day"});case"iii":return n.day(a,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(a,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(a,{width:"short",context:"formatting"});case"iiii":default:return n.day(a,{width:"wide",context:"formatting"})}},a:function(t,e,n){var a=t.getUTCHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":case"aaa":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"aaaaa":return n.dayPeriod(a,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(a,{width:"wide",context:"formatting"})}},b:function(t,e,n){var a,r=t.getUTCHours();switch(a=12===r?"noon":0===r?"midnight":r/12>=1?"pm":"am",e){case"b":case"bb":case"bbb":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"bbbbb":return n.dayPeriod(a,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(a,{width:"wide",context:"formatting"})}},B:function(t,e,n){var a,r=t.getUTCHours();switch(a=r>=17?"evening":r>=12?"afternoon":r>=4?"morning":"night",e){case"B":case"BB":case"BBB":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(a,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(a,{width:"wide",context:"formatting"})}},h:function(t,e,n){if("ho"===e){var a=t.getUTCHours()%12;return 0===a&&(a=12),n.ordinalNumber(a,{unit:"hour"})}return function(t,e){return B(t.getUTCHours()%12||12,e.length)}(t,e)},H:function(t,e,n){return"Ho"===e?n.ordinalNumber(t.getUTCHours(),{unit:"hour"}):function(t,e){return B(t.getUTCHours(),e.length)}(t,e)},K:function(t,e,n){var a=t.getUTCHours()%12;return"Ko"===e?n.ordinalNumber(a,{unit:"hour"}):B(a,e.length)},k:function(t,e,n){var a=t.getUTCHours();return 0===a&&(a=24),"ko"===e?n.ordinalNumber(a,{unit:"hour"}):B(a,e.length)},m:function(t,e,n){return"mo"===e?n.ordinalNumber(t.getUTCMinutes(),{unit:"minute"}):function(t,e){return B(t.getUTCMinutes(),e.length)}(t,e)},s:function(t,e,n){return"so"===e?n.ordinalNumber(t.getUTCSeconds(),{unit:"second"}):function(t,e){return B(t.getUTCSeconds(),e.length)}(t,e)},S:function(t,e){return function(t,e){var n=e.length,a=t.getUTCMilliseconds();return B(Math.floor(a*Math.pow(10,n-3)),e.length)}(t,e)},X:function(t,e,n,a){var r=(a._originalDate||t).getTimezoneOffset();if(0===r)return"Z";switch(e){case"X":return R(r);case"XXXX":case"XX":return A(r);case"XXXXX":case"XXX":default:return A(r,":")}},x:function(t,e,n,a){var r=(a._originalDate||t).getTimezoneOffset();switch(e){case"x":return R(r);case"xxxx":case"xx":return A(r);case"xxxxx":case"xxx":default:return A(r,":")}},O:function(t,e,n,a){var r=(a._originalDate||t).getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+_(r,":");case"OOOO":default:return"GMT"+A(r,":")}},z:function(t,e,n,a){var r=(a._originalDate||t).getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+_(r,":");case"zzzz":default:return"GMT"+A(r,":")}},t:function(t,e,n,a){return B(Math.floor((a._originalDate||t).getTime()/1e3),e.length)},T:function(t,e,n,a){return B((a._originalDate||t).getTime(),e.length)}};function _(t,e){var n=t>0?"-":"+",a=Math.abs(t),r=Math.floor(a/60),i=a%60;if(0===i)return n+String(r);var o=e||"";return n+String(r)+o+B(i,2)}function R(t,e){return t%60==0?(t>0?"-":"+")+B(Math.abs(t)/60,2):A(t,e)}function A(t,e){var n=e||"",a=t>0?"-":"+",r=Math.abs(t);return a+B(Math.floor(r/60),2)+n+B(r%60,2)}function F(t,e){switch(t){case"P":return e.date({width:"short"});case"PP":return e.date({width:"medium"});case"PPP":return e.date({width:"long"});case"PPPP":default:return e.date({width:"full"})}}function $(t,e){switch(t){case"p":return e.time({width:"short"});case"pp":return e.time({width:"medium"});case"ppp":return e.time({width:"long"});case"pppp":default:return e.time({width:"full"})}}var U={p:$,P:function(t,e){var n,a=t.match(/(P+)(p+)?/),r=a[1],i=a[2];if(!i)return F(t,e);switch(r){case"P":n=e.dateTime({width:"short"});break;case"PP":n=e.dateTime({width:"medium"});break;case"PPP":n=e.dateTime({width:"long"});break;case"PPPP":default:n=e.dateTime({width:"full"})}return n.replace("{{date}}",F(r,e)).replace("{{time}}",$(i,e))}},J=["D","DD"],H=["YY","YYYY"];function K(t){return-1!==J.indexOf(t)}function Z(t){return-1!==H.indexOf(t)}function tt(t,e,n){if("YYYY"===t)throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(e,"`) for formatting years to the input `").concat(n,"`; see: https://git.io/fxCyr"));if("YY"===t)throw new RangeError("Use `yy` instead of `YY` (in `".concat(e,"`) for formatting years to the input `").concat(n,"`; see: https://git.io/fxCyr"));if("D"===t)throw new RangeError("Use `d` instead of `D` (in `".concat(e,"`) for formatting days of the month to the input `").concat(n,"`; see: https://git.io/fxCyr"));if("DD"===t)throw new RangeError("Use `dd` instead of `DD` (in `".concat(e,"`) for formatting days of the month to the input `").concat(n,"`; see: https://git.io/fxCyr"))}var et=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,nt=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,at=/^'([^]*?)'?$/,rt=/''/g,it=/[a-zA-Z]/;function ot(t){return t.match(at)[1].replace(rt,"'")}const st=class{constructor(e){t(this,e),this.selectedVariant=g,this.placeholderImage=a("./assets/car-placeholder.svg")}componentWillLoad(){l.selectedVariant$.subscribe((t=>{this.selectedVariant=t})),l.modelVariantsList$.subscribe((t=>{this.variantsList=r(t,[])}))}render(){return e(n,{class:"d-flex flex-column justify-content-start abe-fade-in-bottom"},d(this.selectedVariant)?this.variantsList.map((t=>this.variantCard(t,!1))):this.variantCard(this.selectedVariant.value,!0))}variantCard(t,n){const a=r(t.photoUri,this.placeholderImage);return e("div",{class:"card d-flex w-100 flex-row justify-content-between align-items-center mt-3"},e("img",{class:"abe-car-icon mx-4 d-none d-md-flex",src:a,alt:"",onError:t=>this.handleImgError(t)}),e("div",{class:"d-flex flex-column align-items-start flex-grow-1 px-3 py-2 p-md-0"},e("h5",{class:"card-title text-capitalize mb-0"},t.description.toLowerCase()),e("p",{class:"card-text text-muted"},"Built from ",this.toMonthName(t.modelMonth)," ",t.buildYear)),n?e("fl-button",{class:"ml-3 mr-4",variant:"secondary",onClick:()=>this.resetVariant()},e("span",{class:"px-3"},"Change")):e("fl-button",{class:"ml-3 mr-4",onClick:()=>this.chooseVariant(t)},e("span",{class:"px-3"},"Select")))}toMonthName(t){return function(t,e,n){x(2,arguments);var a=String(e),r=n||{},i=r.locale||I,o=i.options&&i.options.firstWeekContainsDate,s=null==o?1:y(o),c=null==r.firstWeekContainsDate?s:y(r.firstWeekContainsDate);if(!(c>=1&&c<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var u=i.options&&i.options.weekStartsOn,l=null==u?0:y(u),d=null==r.weekStartsOn?l:y(r.weekStartsOn);if(!(d>=0&&d<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!i.localize)throw new RangeError("locale must contain localize property");if(!i.formatLong)throw new RangeError("locale must contain formatLong property");var h=M(t);if(!j(h))throw new RangeError("Invalid time value");var f=P(h),m=L(h,f),w={firstWeekContainsDate:c,weekStartsOn:d,locale:i,_originalDate:h};return a.match(nt).map((function(t){var e=t[0];return"p"===e||"P"===e?(0,U[e])(t,i.formatLong,w):t})).join("").match(et).map((function(n){if("''"===n)return"'";var a=n[0];if("'"===a)return ot(n);var o=G[a];if(o)return!r.useAdditionalWeekYearTokens&&Z(n)&&tt(n,e,t),!r.useAdditionalDayOfYearTokens&&K(n)&&tt(n,e,t),o(m,n,i.localize,w);if(a.match(it))throw new RangeError("Format string contains an unescaped latin alphabet character `"+a+"`");return n})).join("")}((new Date).setMonth(t),"MMMM")}resetVariant(){c.selectVariant(g)}chooseVariant(t){c.selectVariant(p(t))}handleImgError(t){t.target.src=this.placeholderImage}static get assetsDirs(){return["assets"]}};st.style=".abe-car-icon{max-width:120px;height:80px;object-fit:contain}.abe-fade-in-bottom{-webkit-animation:fade-in-bottom 0.3s cubic-bezier(0.39, 0.575, 0.565, 1) both;animation:fade-in-bottom 0.3s cubic-bezier(0.39, 0.575, 0.565, 1) both}@-webkit-keyframes fade-in-bottom{0%{-webkit-transform:translateY(50px);transform:translateY(50px);opacity:0}100%{-webkit-transform:translateY(0);transform:translateY(0);opacity:1}}@keyframes fade-in-bottom{0%{-webkit-transform:translateY(50px);transform:translateY(50px);opacity:0}100%{-webkit-transform:translateY(0);transform:translateY(0);opacity:1}}";const ct=class{constructor(e){t(this,e),this.terms=[...Array(5).keys()].map((t=>t+1)).map((t=>({label:`${t} Year${t>1?"s":""}`,value:t}))),this.states=["ACT","NSW","NT","QLD","SA","TAS","VIC","WA"],this.paymentPeriods=["Monthly","Fortnightly","Weekly"],l.user$.subscribe((t=>this.userInfo=t))}render(){return e(n,{class:"d-flex flex-column align-items-start justify-content-between"},e("div",{class:"d-flex flex-column flex-lg-row align-items-start align-items-lg-center justify-content-center mt-2 h4"},e("span",{class:"pr-0 pr-sm-2 d-flex text-center"},"My annual salary before tax is"),e("input",{placeholder:"50000",type:"text",class:"form-control d-flex w-auto mt-2 mt-lg-0",value:"$"+this.getUserInfo("annualSalary"),onInput:t=>{const e=t.target;e.value=e.value.replace(/\D/g,"")},onFocus:t=>{const e=t.target;e.value=e.value.replace("$","")},onBlur:t=>{const e=t.target;e.value="$"+e.value},onChange:t=>this.updateUserInfo("annualSalary",parseFloat(t.target.value.trim()))})),e("div",{class:"d-flex flex-column flex-lg-row align-items-start align-items-lg-center justify-content-center mt-4 h4"},e("span",{class:"pr-0 pr-sm-2 d-flex text-center"},"I get paid"),e("fl-dropdown",{class:"d-flex my-2 my-lg-0",options:u(this.paymentPeriods),requiredValidationMessage:"Select an option",placeholder:"Select...",value:this.getUserInfo("paymentPeriod"),onValueChanged:t=>this.updateUserInfo("paymentPeriod",t.detail.value)})),e("div",{class:"d-flex flex-column flex-lg-row align-items-start align-items-lg-center justify-content-center mt-4 h4"},e("span",{class:"pr-0 pr-sm-2 d-flex text-center"},"Every year I expect to drive"),e("input",{placeholder:"10000",type:"text",class:"form-control d-flex w-auto mt-2 mt-lg-0",value:this.getUserInfo("annualKms")+" km",onInput:t=>{const e=t.target;e.value=e.value.replace(/\D/g,"")},onFocus:t=>{const e=t.target;e.value=e.value.replace(" km","")},onBlur:t=>{t.target.value+=" km"},onChange:t=>this.updateUserInfo("annualKms",parseInt(t.target.value.trim()))})),e("div",{class:"d-flex flex-column flex-lg-row align-items-start align-items-lg-center justify-content-center mt-4 h4"},e("span",{class:"pr-0 pr-sm-2 d-flex text-center"},"I live in"),e("fl-dropdown",{class:"d-flex my-2 my-lg-0",options:u(this.states),requiredValidationMessage:"Select an option",placeholder:"select state",value:this.getUserInfo("state"),onValueChanged:t=>this.updateUserInfo("state",t.detail.value)})),e("div",{class:"d-flex flex-column flex-lg-row align-items-start align-items-lg-center justify-content-center mt-4 h4"},e("span",{class:"pr-0 pr-sm-2 d-flex text-center"},"I want my lease term to be"),e("fl-dropdown",{class:"d-flex my-2 my-lg-0",options:this.terms,requiredValidationMessage:"Select an option",placeholder:"Select...",value:this.getUserInfo("term"),onValueChanged:t=>this.updateUserInfo("term",t.detail.value)})))}updateUserInfo(t,e){h.update({user:Object.assign(Object.assign({},this.userInfo),{[t]:p(e)})})}getUserInfo(t){return s(this.userInfo[t],b((()=>"")))}},ut=class{constructor(n){t(this,n),this.showRequestQuoteModal=!1,this.showBreakdownModal=!1,this.showCompletePage=!1,this.getRenderedPaymentPeriod=()=>{let t="month";switch(m((()=>"Monthly"))(l.user.paymentPeriod)){case"Monthly":t="month";break;case"Fortnightly":t="fortnight";break;case"Weekly":t="week"}return`Cost per ${t}`},this.renderQuoteField=t=>e("span",null,"$","Calculation pending"===this.quote.quoteState?e("fl-loading-indicator",{class:"ml-2"}):r(t,null)),this.leaseInclusion=t=>e("p",{class:"font-weight-light d-inline-flex align-items-center"},e("img",{class:"pr-1",src:a("./assets/check.svg")}),t.inclusionName)}componentWillLoad(){this.subscription=l.result$.subscribe((()=>{this.quote=l.result}))}disconnectedCallback(){this.subscription.unsubscribe()}render(){return e(n,{class:"card d-flex flex-column justify-content-between w-100 h-100"},e("div",{class:"d-flex flex-column flex-grow-1 justify-content-between p-4"},e("span",{class:"mb-3 text-left"},e("p",{class:"h1 text-muted font-weight-bold mb-0"},this.renderQuoteField(this.quote.afterTaxEffectPerPayCycle)),e("p",{class:"mb-0"},this.getRenderedPaymentPeriod())),e("span",{class:"mb-3 text-left"},e("p",{class:"h1 text-info font-weight-bold mb-0"},this.renderQuoteField(this.quote.taxSaving)),e("p",{class:"mb-0"},"Total tax savings")),e("span",{class:"mb-3 text-left"},e("p",{class:"h1 text-muted font-weight-bold mb-0"},this.renderQuoteField(this.quote.residualValue)),e("p",{class:"mb-0"},"Residual value")),e("fl-button",{class:"mt-2",isBlockElement:!0,onClick:()=>this.showRequestQuoteModal=!0},"Request a quote")),e("div",{class:"bg-light px-4 py-3"},e("p",{class:"font-weight-bold text-center"},"Your lease includes"),e("div",{class:"d-flex flex-row align-items-center justify-content-between"},e("span",{class:"d-flex flex-column"},e(this.leaseInclusion,{inclusionName:"Finance"}),e(this.leaseInclusion,{inclusionName:"Servicing"})),e("span",{class:"d-flex flex-column"},e(this.leaseInclusion,{inclusionName:"Insurance"}),e(this.leaseInclusion,{inclusionName:"Registration"})),e("span",{class:"d-flex flex-column"},e(this.leaseInclusion,{inclusionName:"Fuel"}),e(this.leaseInclusion,{inclusionName:"Tyres"}))),e("fl-button",{class:"mt-2",isBlockElement:!0,variant:"secondary",onClick:()=>this.showBreakdownModal=!0},"View running cost breakdown")),e("ap-ben-modal-section",{show:this.showRequestQuoteModal,showHeader:!0,onModalClosed:()=>{this.showRequestQuoteModal=!1,this.showCompletePage=!1}},this.showCompletePage?e("ap-ben-complete-section",{onClosed:()=>{this.showRequestQuoteModal=!1,this.showCompletePage=!1}}):e("ap-ben-submit-quote-section",{onEnquirySubmitted:()=>{this.showCompletePage=!0}})),e("ap-ben-modal-section",{show:this.showBreakdownModal,modalTitle:"Running cost breakdown",onModalClosed:()=>this.showBreakdownModal=!1,showHeader:!0,showFooter:!0},e("ap-ben-cost-breakdown-section",{quote:this.quote})))}static get assetsDirs(){return["assets"]}};export{v as ap_ben_choose_vehicle_section,st as ap_ben_model_variants_section,ct as ap_ben_personal_info_section,ut as ap_ben_quote_result_section}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as a,h as o}from"./p-50fe790f.js";const i=class{constructor(o){a(this,o),this.theme="default"}render(){return o("span",{class:{"dots-container d-inline-flex justify-content-center":!0}},o("span",{class:{"dot-flashing":!0,"theme-default":"default"===this.theme,"theme-dark":"dark"===this.theme}}))}};i.style='fl-loading-indicator .dots-container{width:36px}fl-loading-indicator .dot-flashing.theme-default{position:relative;width:8px;height:8px;border-radius:4px;background-color:#66efc5;color:#9880ff;animation:dot-flashing-default 2s infinite linear;animation-delay:0.5s}@keyframes dot-flashing-default{0%{background-color:#66efc5}25%{background-color:#12aa7c}50%,100%{background-color:#66efc5}}fl-loading-indicator .dot-flashing.theme-default::before,fl-loading-indicator .dot-flashing.theme-default::after{content:"";display:inline-block;position:absolute;top:0}fl-loading-indicator .dot-flashing.theme-default::before{left:-12px;width:8px;height:8px;border-radius:4px;background-color:#66efc5;color:#9880ff;animation:dot-flashing-default 2s infinite linear;animation-delay:0s}@keyframes dot-flashing-default{0%{background-color:#66efc5}25%{background-color:#12aa7c}50%,100%{background-color:#66efc5}}fl-loading-indicator .dot-flashing.theme-default::after{left:12px;width:8px;height:8px;border-radius:4px;background-color:#66efc5;color:#9880ff;animation:dot-flashing-default 2s infinite linear;animation-delay:1s}@keyframes dot-flashing-default{0%{background-color:#66efc5}25%{background-color:#12aa7c}50%,100%{background-color:#66efc5}}fl-loading-indicator .dot-flashing.theme-dark{position:relative;width:8px;height:8px;border-radius:4px;background-color:#a7a7a7;color:#9880ff;animation:dot-flashing-dark 2s infinite linear;animation-delay:0.5s}@keyframes dot-flashing-dark{0%{background-color:#a7a7a7}25%{background-color:#5b5a5a}50%,100%{background-color:#a7a7a7}}fl-loading-indicator .dot-flashing.theme-dark::before,fl-loading-indicator .dot-flashing.theme-dark::after{content:"";display:inline-block;position:absolute;top:0}fl-loading-indicator .dot-flashing.theme-dark::before{left:-12px;width:8px;height:8px;border-radius:4px;background-color:#a7a7a7;color:#9880ff;animation:dot-flashing-dark 2s infinite linear;animation-delay:0s}@keyframes dot-flashing-dark{0%{background-color:#a7a7a7}25%{background-color:#5b5a5a}50%,100%{background-color:#a7a7a7}}fl-loading-indicator .dot-flashing.theme-dark::after{left:12px;width:8px;height:8px;border-radius:4px;background-color:#a7a7a7;color:#9880ff;animation:dot-flashing-dark 2s infinite linear;animation-delay:1s}@keyframes dot-flashing-dark{0%{background-color:#a7a7a7}25%{background-color:#5b5a5a}50%,100%{background-color:#a7a7a7}}';export{i as fl_loading_indicator}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as t,a as s}from"./p-50fe790f.js";import{A as r}from"./p-06a1f65f.js";const i=class{constructor(s){t(this,s)}componentWillLoad(){if(this.history&&this.root&&this.url)return this.history.replace((s=this.root,"/"==(t=this.url).charAt(0)&&"/"==s.charAt(s.length-1)?s.slice(0,s.length-1)+t:s+t));var t,s}get el(){return s(this)}};r.injectProps(i,["history","root"]);export{i as stencil_router_redirect}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{g as t,f as s,r as e,h as n,H as o}from"./p-50fe790f.js";const i=t=>!("isConnected"in t)||t.isConnected,r=(()=>{let t;return(...s)=>{t&&clearTimeout(t),t=setTimeout((()=>{t=0,(t=>{for(let s of t.keys())t.set(s,t.get(s).filter(i))})(...s)}),2e3)}})(),c={items:[]},a=new class{constructor(){const{state:e}=((e,n)=>{const o=((t,s=((t,s)=>t!==s))=>{let e=new Map(Object.entries(null!=t?t:{}));const n={dispose:[],get:[],set:[],reset:[]},o=()=>{e=new Map(Object.entries(null!=t?t:{})),n.reset.forEach((t=>t()))},i=t=>(n.get.forEach((s=>s(t))),e.get(t)),r=(t,o)=>{const i=e.get(t);s(o,i,t)&&(e.set(t,o),n.set.forEach((s=>s(t,o,i))))},c="undefined"==typeof Proxy?{}:new Proxy(t,{get:(t,s)=>i(s),ownKeys:()=>Array.from(e.keys()),getOwnPropertyDescriptor:()=>({enumerable:!0,configurable:!0}),has:(t,s)=>e.has(s),set:(t,s,e)=>(r(s,e),!0)}),a=(t,s)=>(n[t].push(s),()=>{((t,s)=>{const e=t.indexOf(s);e>=0&&(t[e]=t[t.length-1],t.length--)})(n[t],s)});return{state:c,get:i,set:r,on:a,onChange:(s,e)=>{const n=a("set",((t,n)=>{t===s&&e(n)})),o=a("reset",(()=>e(t[s])));return()=>{n(),o()}},use:(...t)=>t.forEach((t=>{t.set&&a("set",t.set),t.get&&a("get",t.get),t.reset&&a("reset",t.reset)})),dispose:()=>{n.dispose.forEach((t=>t())),o()},reset:o}})(e,n);return(({on:e})=>{const n=new Map;"function"==typeof t&&(e("dispose",(()=>{n.clear()})),e("get",(s=>{const e=t();e&&((t,s,e)=>{const n=t.get(s);n?n.includes(e)||n.push(e):t.set(s,[e])})(n,s,e)})),e("set",(t=>{const e=n.get(t);e&&n.set(t,e.filter(s)),r(n)})),e("reset",(()=>{n.forEach((t=>t.forEach(s))),r(n)})))})(o),o})(c);this._state=e}get state(){return this._state}closeCurrent(){const t=[...this._state.items];t.shift(),this._state.items=t}clearNotifications(){this._state.items=[]}showErrorNotification(t,s){this.pushNotification(t,null!=s?s:0,"danger")}showInfoNotification(t,s){this.pushNotification(t,null!=s?s:0,"info")}showWarningNotification(t,s){this.pushNotification(t,null!=s?s:0,"warning")}showSuccessNotification(t,s){this.pushNotification(t,null!=s?s:0,"success")}pushNotification(t,s,e){const n=[...this._state.items];n.push({details:t,type:e,priority:s}),this._state.items=n.sort(((t,s)=>s.priority-t.priority))}},l=class{constructor(t){e(this,t)}disconnectedCallback(){a.clearNotifications()}render(){const{items:t}=a.state;return t.length<=0?n(o,null):n("div",{class:`alert alert-${t[0].type}`,role:"alert"},n("div",{class:"d-flex"},n("p",{class:"mb-0 flex-grow-1"},n("strong",null,t[0].details.title)),n("button",{onClick:this.handleClose,type:"button",class:"close pb-1","aria-label":"Close"},n("span",{"aria-hidden":"true"},"×"))),n("p",{class:"mb-0 mt-1"},t[0].details.description))}handleClose(){a.closeCurrent()}};export{l as ap_ben_notifications_section}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import{S as t,O as e,r as s,a as i,A as n,b as r}from"./p-68c136da.js";import{N as h,e as c,o,d as u}from"./p-b33fc683.js";import{S as a,a as l,i as f,f as d,m as p,d as b,b as g}from"./p-24a37d64.js";
|
|
2
|
-
/*! *****************************************************************************
|
|
3
|
-
Copyright (c) Microsoft Corporation.
|
|
4
|
-
|
|
5
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
|
6
|
-
purpose with or without fee is hereby granted.
|
|
7
|
-
|
|
8
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
9
|
-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
10
|
-
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
11
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
12
|
-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
13
|
-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
14
|
-
PERFORMANCE OF THIS SOFTWARE.
|
|
15
|
-
***************************************************************************** */function O(t,e,s,i){var n,r=arguments.length,h=r<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,s):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)h=Reflect.decorate(t,e,s,i);else for(var c=t.length-1;c>=0;c--)(n=t[c])&&(h=(r<3?n(h):r>3?n(e,s,h):n(e,s))||h);return r>3&&h&&Object.defineProperty(e,s,h),h}function j(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)}const y=(()=>{function t(){return Error.call(this),this.message="object unsubscribed",this.name="ObjectUnsubscribedError",this}return t.prototype=Object.create(Error.prototype),t})();class w extends t{constructor(t,e){super(),this.subject=t,this.subscriber=e,this.closed=!1}unsubscribe(){if(this.closed)return;this.closed=!0;const t=this.subject,e=t.observers;if(this.subject=null,!e||0===e.length||t.isStopped||t.closed)return;const s=e.indexOf(this.subscriber);-1!==s&&e.splice(s,1)}}class v extends i{constructor(t){super(t),this.destination=t}}class S extends e{constructor(){super(),this.observers=[],this.closed=!1,this.isStopped=!1,this.hasError=!1,this.thrownError=null}[s](){return new v(this)}lift(t){const e=new E(this,this);return e.operator=t,e}next(t){if(this.closed)throw new y;if(!this.isStopped){const{observers:e}=this,s=e.length,i=e.slice();for(let e=0;e<s;e++)i[e].next(t)}}error(t){if(this.closed)throw new y;this.hasError=!0,this.thrownError=t,this.isStopped=!0;const{observers:e}=this,s=e.length,i=e.slice();for(let e=0;e<s;e++)i[e].error(t);this.observers.length=0}complete(){if(this.closed)throw new y;this.isStopped=!0;const{observers:t}=this,e=t.length,s=t.slice();for(let t=0;t<e;t++)s[t].complete();this.observers.length=0}unsubscribe(){this.isStopped=!0,this.closed=!0,this.observers=null}_trySubscribe(t){if(this.closed)throw new y;return super._trySubscribe(t)}_subscribe(e){if(this.closed)throw new y;return this.hasError?(e.error(this.thrownError),t.EMPTY):this.isStopped?(e.complete(),t.EMPTY):(this.observers.push(e),new w(this,e))}asObservable(){const t=new e;return t.source=this,t}}S.create=(t,e)=>new E(t,e);class E extends S{constructor(t,e){super(),this.destination=t,this.source=e}next(t){const{destination:e}=this;e&&e.next&&e.next(t)}error(t){const{destination:e}=this;e&&e.error&&this.destination.error(t)}complete(){const{destination:t}=this;t&&t.complete&&this.destination.complete()}_subscribe(e){const{source:s}=this;return s?this.source.subscribe(e):t.EMPTY}}class m extends S{constructor(t){super(),this._value=t}get value(){return this.getValue()}_subscribe(t){const e=super._subscribe(t);return e&&!e.closed&&t.next(this._value),e}getValue(){if(this.hasError)throw this.thrownError;if(this.closed)throw new y;return this._value}next(t){super.next(this._value=t)}}const A=new class extends r{}(class extends n{constructor(t,e){super(t,e),this.scheduler=t,this.work=e}schedule(t,e=0){return e>0?super.schedule(t,e):(this.delay=e,this.state=t,this.scheduler.flush(this),this)}execute(t,e){return e>0||this.closed?super.execute(t,e):this._execute(t,e)}requestAsyncId(t,e,s=0){return null!==s&&s>0||null===s&&this.delay>0?super.requestAsyncId(t,e,s):t.flush(this)}});class P extends i{constructor(t,e,s=0){super(t),this.scheduler=e,this.delay=s}static dispatch(t){const{notification:e,destination:s}=t;e.observe(s),this.unsubscribe()}scheduleMessage(t){this.destination.add(this.scheduler.schedule(P.dispatch,this.delay,new I(t,this.destination)))}_next(t){this.scheduleMessage(h.createNext(t))}_error(t){this.scheduleMessage(h.createError(t)),this.unsubscribe()}_complete(){this.scheduleMessage(h.createComplete()),this.unsubscribe()}}class I{constructor(t,e){this.notification=t,this.destination=e}}class U extends S{constructor(t=Number.POSITIVE_INFINITY,e=Number.POSITIVE_INFINITY,s){super(),this.scheduler=s,this._events=[],this._infiniteTimeWindow=!1,this._bufferSize=t<1?1:t,this._windowTime=e<1?1:e,e===Number.POSITIVE_INFINITY?(this._infiniteTimeWindow=!0,this.next=this.nextInfiniteTimeWindow):this.next=this.nextTimeWindow}nextInfiniteTimeWindow(t){if(!this.isStopped){const e=this._events;e.push(t),e.length>this._bufferSize&&e.shift()}super.next(t)}nextTimeWindow(t){this.isStopped||(this._events.push(new N(this._getNow(),t)),this._trimBufferThenGetEvents()),super.next(t)}_subscribe(e){const s=this._infiniteTimeWindow,i=s?this._events:this._trimBufferThenGetEvents(),n=this.scheduler,r=i.length;let h;if(this.closed)throw new y;if(this.isStopped||this.hasError?h=t.EMPTY:(this.observers.push(e),h=new w(this,e)),n&&e.add(e=new P(e,n)),s)for(let t=0;t<r&&!e.closed;t++)e.next(i[t]);else for(let t=0;t<r&&!e.closed;t++)e.next(i[t].value);return this.hasError?e.error(this.thrownError):this.isStopped&&e.complete(),h}_getNow(){return(this.scheduler||A).now()}_trimBufferThenGetEvents(){const t=this._getNow(),e=this._bufferSize,s=this._windowTime,i=this._events,n=i.length;let r=0;for(;r<n&&!(t-i[r].time<s);)r++;return n>e&&(r=Math.max(r,n-e)),r>0&&i.splice(0,r),i}}class N{constructor(t,e){this.time=t,this.value=e}}function _(t){return!!t&&(t instanceof e||"function"==typeof t.lift&&"function"==typeof t.subscribe)}const x=(()=>{function t(){return Error.call(this),this.message="argument out of range",this.name="ArgumentOutOfRangeError",this}return t.prototype=Object.create(Error.prototype),t})();class C{constructor(t){if(this.total=t,this.total<0)throw new x}call(t,e){return e.subscribe(new R(t,this.total))}}class R extends i{constructor(t,e){super(t),this.total=e,this.count=0}_next(t){const e=this.total,s=++this.count;s<=e&&(this.destination.next(t),s===e&&(this.destination.complete(),this.unsubscribe()))}}class F{constructor(t){this.total=t}call(t,e){return e.subscribe(new M(t,this.total))}}class M extends i{constructor(t,e){super(t),this.total=e,this.count=0}_next(t){++this.count>this.total&&this.destination.next(t)}}function k(t,e){return"function"==typeof e?s=>s.pipe(k(((s,i)=>d(t(s,i)).pipe(p(((t,n)=>e(s,t,i,n))))))):e=>e.lift(new L(t))}class L{constructor(t){this.project=t}call(t,e){return e.subscribe(new K(t,this.project))}}class K extends a{constructor(t,e){super(t),this.project=e,this.index=0}_next(t){let e;const s=this.index++;try{e=this.project(t,s)}catch(t){return void this.destination.error(t)}this._innerSub(e)}_innerSub(t){const e=this.innerSubscription;e&&e.unsubscribe();const s=new l(this),i=this.destination;i.add(s),this.innerSubscription=f(t,s),this.innerSubscription!==s&&i.add(this.innerSubscription)}_complete(){const{innerSubscription:t}=this;t&&!t.closed||super._complete(),this.unsubscribe()}_unsubscribe(){this.innerSubscription=void 0}notifyComplete(){this.innerSubscription=void 0,this.isStopped&&super._complete()}notifyNext(t){this.destination.next(t)}}const D={type:null,entityIds:null,skip:!1,payload:null};let $=!1;function z(t,e,s){W(t,e,s),$=!0}function W(t,e,s){!1===$&&(D.type=t,D.entityIds=e,D.payload=s)}function B(t,e){return t.hasOwnProperty(e)}function V(t){return null==t}function H(t){return V(t)?[]:Array.isArray(t)?t:[t]}var Q;!function(t){t.Set="Set",t.Add="Add",t.Update="Update",t.Remove="Remove"}(Q||(Q={}));const J="undefined"!=typeof window,Y=!J,q=()=>{try{return"undefined"!=typeof localStorage}catch(t){return!1}};let G=!0;function X(){G=!1,J&&(delete window.$$stores,delete window.$$queries)}function Z(){return G}function tt(t){const e=typeof t;return null!=t&&("object"==e||"function"==e)}function et(t){return Array.isArray(t)}function st(t){return!1===V(t)}function it(t){return!!et(t)&&0===t.length}function nt(t){return"function"==typeof t}function rt(t){return void 0===t}function ht(t){return t.hasOwnProperty("active")}function ct(t){return et(t)}function ot({active:t,ids:e,entities:s}){return ct(t)?function(t,e){const s=t.filter((t=>e.indexOf(t)>-1));return s.length===t.length?t:s}(t,e):!1===B(s,t)?null:t}function ut(t,e){let s={};for(const i of Object.keys(t))s[i]=e(t[i]);return s}let at={resettable:!1,ttl:null,producerFn:void 0};function lt(){return at}function ft(t){Object.freeze(t);const e="function"==typeof t,s=Object.prototype.hasOwnProperty;return Object.getOwnPropertyNames(t).forEach((function(i){!s.call(t,i)||e&&("caller"===i||"callee"===i||"arguments"===i)||null===t[i]||"object"!=typeof t[i]&&"function"!=typeof t[i]||Object.isFrozen(t[i])||ft(t[i])})),t}const dt=new S,pt=new U(50,5e3),bt=new S;function gt(t){return null!=t&&"false"!=`${t}`}function Ot(t){return gt(t)&&"Object"===t.constructor.name}function jt(t){return function(e){e.akitaConfig={idKey:"id"};for(let s=0,i=Object.keys(t);s<i.length;s++){const n=i[s];"name"===n?e.akitaConfig.storeName=t[n]:e.akitaConfig[n]=t[n]}}}const yt={},wt={};J&&(window.$$stores=yt,window.$$queries=wt);const vt=new S,St=new m(!1),Et={activeTransactions:0,batchTransaction:null};function mt(){return Et.activeTransactions>0}function Tt(t,e){mt()||(Et.batchTransaction=new S),Et.activeTransactions++,St.next(!0);try{return t.apply(e)}finally{z("@Transaction"),0==--Et.activeTransactions&&(Et.batchTransaction.next(!0),Et.batchTransaction.complete(),St.next(!1),vt.next(!0))}}function At(){return function(t,e,s){const i=s.value;return s.value=function(...t){return Tt((()=>i.apply(this,t)),this)},s}}class Pt{constructor(t,e={}){this.options=e,this.inTransaction=!1,this.cache={active:new m(!1),ttl:null},this.onInit(t)}setLoading(t=!1){t!==this._value().loading&&(Z()&&W("Set Loading"),this._setState((e=>Object.assign(Object.assign({},e),{loading:t}))))}setHasCache(t,e={restartTTL:!1}){if(t!==this.cache.active.value&&this.cache.active.next(t),e.restartTTL){const t=this.getCacheTTL();t&&(null!==this.cache.ttl&&clearTimeout(this.cache.ttl),this.cache.ttl=setTimeout((()=>this.setHasCache(!1)),t))}}getValue(){return this.storeValue}setError(t){t!==this._value().error&&(Z()&&W("Set Error"),this._setState((e=>Object.assign(Object.assign({},e),{error:t}))))}_select(t){return this.store.asObservable().pipe(p((e=>t(e.state))),b())}_value(){return this.storeValue}_cache(){return this.cache.active}get config(){return this.constructor.akitaConfig||{}}get storeName(){return this.config.storeName||this.options.storeName||this.options.name}get deepFreeze(){return this.config.deepFreezeFn||this.options.deepFreezeFn||ft}get cacheConfig(){return this.config.cache||this.options.cache}get _producerFn(){return this.config.producerFn||this.options.producerFn||at.producerFn}get resettable(){return st(this.config.resettable)?this.config.resettable:this.options.resettable}_setState(t,e=!0){if(nt(t)){const e=t(this._value());this.storeValue=G?this.deepFreeze(e):e}else this.storeValue=t;if(!this.store)return this.store=new m({state:this.storeValue}),void(Z()&&this.store.subscribe((({action:t})=>{t&&function(t,e){bt.next({storeName:t,action:e})}(this.storeName,t)})));mt()?this.handleTransaction():this.dispatch(this.storeValue,e)}reset(){this.isResettable()?(Z()&&W("Reset"),this._setState((()=>Object.assign({},this._initialState))),this.setHasCache(!1)):Z()&&console.warn("You need to enable the reset functionality")}update(t){let e;Z()&&W("Update");const s=this._value();e=nt(t)?nt(this._producerFn)?this._producerFn(s,t):t(s):t;const i=this.akitaPreUpdate(s,Object.assign(Object.assign({},s),e)),n=Ot(s)?i:new s.constructor(i);this._setState(n)}updateStoreConfig(t){this.options=Object.assign(Object.assign({},this.options),t)}akitaPreUpdate(t,e){return e}ngOnDestroy(){this.destroy()}destroy(){J&&window.hmrEnabled||this!==yt[this.storeName]||(delete yt[this.storeName],dt.next(this.storeName),this.setHasCache(!1),this.cache.active.complete(),this.store.complete())}onInit(t){yt[this.storeName]=this,this._setState((()=>t)),pt.next(this.storeName),this.isResettable()&&(this._initialState=t),Z()&&(this.storeName||console.error(`@StoreConfig({ name }) is missing in ${this.constructor.name}`))}dispatch(t,e=!0){let s;e&&(s=D,$=!1),this.store.next({state:t,action:s})}watchTransaction(){(Et.batchTransaction?Et.batchTransaction.asObservable():o(!0)).subscribe((()=>{this.inTransaction=!1,this.dispatch(this._value())}))}isResettable(){return!1!==this.resettable&&(this.resettable||lt().resettable)}handleTransaction(){this.inTransaction||(this.watchTransaction(),this.inTransaction=!0)}getCacheTTL(){return this.cacheConfig&&this.cacheConfig.ttl||lt().ttl}}var It,Ut;class Nt extends Pt{constructor(t={},e={}){super(Object.assign(Object.assign({},{entities:{},ids:[],loading:!0,error:null}),t),e),this.options=e,this.entityActions=new S,this.entityIdChanges=new S}get selectEntityAction$(){return this.entityActions.asObservable()}get selectEntityIdChanges$(){return this.entityIdChanges.asObservable()}get idKey(){return this.config.idKey||this.options.idKey||"id"}set(t,e={}){if(V(t))return;Z()&&W("Set Entity");const s=this.akitaPreAddEntity===Nt.prototype.akitaPreAddEntity;this.setHasCache(!0,{restartTTL:!0}),this._setState((i=>{const n=function({state:t,entities:e,idKey:s,preAddEntity:i,isNativePreAdd:n}){let r,h;if(et(e)){const t=function(t,e,s){const i={entities:{},ids:[]};for(const n of t){const t=s(n);i.entities[t[e]]=t,i.ids.push(t[e])}return i}(e,s,i);r=t.entities,h=t.ids}else!function(t){return t.entities&&t.ids}(e)?(r=n?e:ut(e,i),h=Object.keys(r).map((t=>isNaN(t)?t:Number(t)))):(r=n?e.entities:ut(e.entities,i),h=e.ids);const c=Object.assign(Object.assign({},t),{entities:r,ids:h,loading:!1});return ht(t)&&(c.active=ot(c)),c}({state:i,entities:t,idKey:this.idKey,preAddEntity:this.akitaPreAddEntity,isNativePreAdd:s});return!1===rt(e.activeId)&&(n.active=e.activeId),n})),this.hasInitialUIState()&&this.handleUICreation(),this.entityActions.next({type:Q.Set,ids:this.ids})}add(t,e={loading:!1}){const s=H(t);if(it(s))return;const i=function({state:t,entities:e,idKey:s,options:i={},preAddEntity:n}){let r={},h=[],c=!1;for(const o of e)if(!1===B(t.entities,o[s])){const t=n(o),e=t[s];r[e]=t,i.prepend?h.unshift(e):h.push(e),c=!0}return c?{newState:Object.assign(Object.assign({},t),{entities:Object.assign(Object.assign({},t.entities),r),ids:i.prepend?[...h,...t.ids]:[...t.ids,...h]}),newIds:h}:null}({state:this._value(),preAddEntity:this.akitaPreAddEntity,entities:s,idKey:this.idKey,options:e});i&&(Z()&&W("Add Entity"),i.newState.loading=e.loading,this._setState((()=>i.newState)),this.hasInitialUIState()&&this.handleUICreation(!0),this.entityActions.next({type:Q.Add,ids:i.newIds}))}update(t,e){if(rt(e))return void super.update(t);let s,i=[];i=nt(t)?this.ids.filter((e=>t(this.entities[e]))):V(t)?this.ids:H(t),it(i)||(Z()&&W("Update Entity",i),this._setState((t=>function({state:t,ids:e,idKey:s,newStateOrFn:i,preUpdateEntity:n,producerFn:r,onEntityIdChanges:h}){const c={};let o,u=!1;for(const h of e){if(!1===B(t.entities,h))continue;const e=t.entities[h];let a;a=nt(i)?nt(r)?r(e,i):i(e):i;const l=a.hasOwnProperty(s)&&a[s]!==e[s];let f;o=h,l&&(u=!0,o=a[s]);const d=Object.assign(Object.assign({},e),a);f=Ot(e)?d:Ot(a)?new e.constructor(d):new a.constructor(d),c[o]=n(e,f)}let a=t.ids,l=t.entities;if(u){const[s]=e,i=s;l=function(t,e){var s={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(s[i]=t[i]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(i=Object.getOwnPropertySymbols(t);n<i.length;n++)e.indexOf(i[n])<0&&Object.prototype.propertyIsEnumerable.call(t,i[n])&&(s[i[n]]=t[i[n]])}return s}(t.entities,["symbol"==typeof i?i:i+""]),a=t.ids.map((t=>t===s?o:t)),h(s,o)}return Object.assign(Object.assign({},t),{entities:Object.assign(Object.assign({},l),c),ids:a})}({idKey:this.idKey,ids:i,preUpdateEntity:this.akitaPreUpdateEntity,state:t,newStateOrFn:e,producerFn:this._producerFn,onEntityIdChanges:(t,e)=>{s={oldId:t,newId:e},this.entityIdChanges.next(Object.assign(Object.assign({},s),{pending:!0}))}}))),s&&this.entityIdChanges.next(Object.assign(Object.assign({},s),{pending:!1})),this.entityActions.next({type:Q.Update,ids:i}))}upsert(t,e,s,i={}){const n=H(t),r=t=>e=>B(this.entities,e)===t,h=nt(s)?i.baseClass:s?s.baseClass:void 0,c=nt(h),o=n.filter(r(!0)),u=n.filter(r(!1)).map((t=>{const i="function"==typeof e?e({}):e,n=nt(s)?s(t,i):i,r=Object.assign(Object.assign({},n),{[this.idKey]:t});return c?new h(r):r}));this.update(o,e),this.add(u),Z()&&z("Upsert Entity")}upsertMany(t,e={}){const s=[],i=[],n={};for(const r of t){const t=this.akitaPreCheckEntity(r),h=t[this.idKey];if(B(this.entities,h)){const s=this._value().entities[h],r=Object.assign(Object.assign({},this._value().entities[h]),t),c=e.baseClass?new e.baseClass(r):r,o=this.akitaPreUpdateEntity(s,c),u=o[this.idKey];n[u]=o,i.push(u)}else{const i=e.baseClass?new e.baseClass(t):t,r=this.akitaPreAddEntity(i),h=r[this.idKey];s.push(h),n[h]=r}}Z()&&z("Upsert Many"),this._setState((t=>Object.assign(Object.assign({},t),{ids:s.length?[...t.ids,...s]:t.ids,entities:Object.assign(Object.assign({},t.entities),n),loading:!!e.loading}))),i.length&&this.entityActions.next({type:Q.Update,ids:i}),s.length&&this.entityActions.next({type:Q.Add,ids:s}),s.length&&this.hasUIStore()&&this.handleUICreation(!0)}replace(t,e){const s=H(t);if(it(s))return;let i={};for(const t of s)e[this.idKey]=t,i[t]=e;Z()&&W("Replace Entity",t),this._setState((t=>Object.assign(Object.assign({},t),{entities:Object.assign(Object.assign({},t.entities),i)})))}move(t,e){const s=this.ids.slice();s.splice(e<0?s.length+e:e,0,s.splice(t,1)[0]),Z()&&W("Move Entity"),this._setState((t=>Object.assign(Object.assign({},t),{entities:Object.assign({},t.entities),ids:s})))}remove(t){if(it(this.ids))return;const e=st(t);let s=[];s=nt(t)?this.ids.filter((e=>t(this.entities[e]))):e?H(t):this.ids,it(s)||(Z()&&W("Remove Entity",s),this._setState((t=>function({state:t,ids:e}){if(V(e))return function(t){return Object.assign(Object.assign({},t),{entities:{},ids:[],active:ct(t.active)?[]:null})}(t);const s=t.entities;let i={};for(const n of t.ids)!1===e.includes(n)&&(i[n]=s[n]);const n=Object.assign(Object.assign({},t),{entities:i,ids:t.ids.filter((t=>!1===e.includes(t)))});return ht(t)&&(n.active=ot(n)),n}({state:t,ids:s}))),e||this.setHasCache(!1),this.handleUIRemove(s),this.entityActions.next({type:Q.Remove,ids:s}))}updateActive(t){const e=H(this.active);Z()&&W("Update Active",e),this.update(e,t)}setActive(t){const e=function(t,e,s){let i;if(et(t))i=t;else if(tt(t)){if(V(s))return;t=Object.assign({wrap:!0},t);const n=e.indexOf(s);if(t.prev){const s=0===n;if(s&&!t.wrap)return;i=s?e[e.length-1]:e[n-1]}else if(t.next){const s=e.length===n+1;if(s&&!t.wrap)return;i=s?e[0]:e[n+1]}}else{if(t===s)return;i=t}return i}(t,this.ids,this.active);void 0!==e&&(Z()&&W("Set Active",e),this._setActive(e))}addActive(t){const e=H(t);it(e)||e.every((t=>this.active.indexOf(t)>-1))||(Z()&&W("Add Active",t),this._setState((t=>{const s=Array.from(new Set([...t.active,...e]));return Object.assign(Object.assign({},t),{active:s})})))}removeActive(t){const e=H(t);it(e)||e.some((t=>this.active.indexOf(t)>-1))&&(Z()&&W("Remove Active",t),this._setState((t=>Object.assign(Object.assign({},t),{active:Array.isArray(t.active)?t.active.filter((t=>-1===e.indexOf(t))):null}))))}toggleActive(t){const e=H(t),s=t=>e=>this.active.includes(e)===t,i=e.filter(s(!0)),n=e.filter(s(!1));this.removeActive(i),this.addActive(n),Z()&&z("Toggle Active")}createUIStore(t={},e={}){return this.ui=new _t(t,Object.assign(Object.assign({},{name:`UI/${this.storeName}`,idKey:this.idKey}),e)),this.ui}destroy(){super.destroy(),this.ui instanceof Nt&&this.ui.destroy(),this.entityActions.complete()}akitaPreUpdateEntity(t,e){return e}akitaPreAddEntity(t){return t}akitaPreCheckEntity(t){return t}get ids(){return this._value().ids}get entities(){return this._value().entities}get active(){return this._value().active}_setActive(t){this._setState((e=>Object.assign(Object.assign({},e),{active:t})))}handleUICreation(t=!1){const e=this.ids,s=nt(this.ui._akitaCreateEntityFn);let i;const n=t=>{const e=this.entities[t],i=s?this.ui._akitaCreateEntityFn(e):this.ui._akitaCreateEntityFn;return Object.assign({[this.idKey]:e[this.idKey]},i)};i=t?this.ids.filter((t=>rt(this.ui.entities[t]))).map(n):e.map(n),t?this.ui.add(i):this.ui.set(i)}hasInitialUIState(){return this.hasUIStore()&&!1===rt(this.ui._akitaCreateEntityFn)}handleUIRemove(t){this.hasUIStore()&&this.ui.remove(t)}hasUIStore(){return this.ui instanceof _t}}O([At(),j("design:type",Function),j("design:paramtypes",[Object,Object,Object,Object]),j("design:returntype",void 0)],Nt.prototype,"upsert",null),O([At(),j("design:type",Function),j("design:paramtypes",["function"==typeof(It="undefined"!=typeof T&&T)?It:Object]),j("design:returntype",void 0)],Nt.prototype,"toggleActive",null);class _t extends Nt{constructor(t={},e={}){super(t,e)}setInitialEntityState(t){this._akitaCreateEntityFn=t}}!function(t){t.ASC="asc",t.DESC="desc"}(Ut||(Ut={}));class xt{constructor(t){this.store=t,this.__store__=t,Z()&&(wt[t.storeName]=this)}select(t){let e;if(nt(t))e=t;else if("string"==typeof t)e=e=>e[t];else{if(Array.isArray(t))return this.store._select((t=>t)).pipe(b((s=t,function(t,e){const i=nt(s[0]);return!1===s.some((s=>i?s(t)!==s(e):t[s]!==e[s]))})),p((e=>nt(t[0])?t.map((t=>t(e))):t.reduce(((t,s)=>(t[s]=e[s],t)),{}))));e=t=>t}var s;return this.store._select(e)}selectLoading(){return this.select((t=>t.loading))}selectError(){return this.select((t=>t.error))}getValue(){return this.store._value()}selectHasCache(){return this.store._cache().asObservable()}getHasCache(){return this.store._cache().value}get config(){return this.constructor.akitaQueryConfig}}const Ct=t=>t.pipe(g((t=>null!=t)));function Rt(t,e){return 1===e.split(".").length?t:e.split(".").slice(1).join(".").split(".").reduce(((t,e)=>t&&t[e]),t)}function Ft(t,e,s){const i=e.split(".");if(1===i.length)return Object.assign(Object.assign({},t),s);t=Object.assign({},t);const n=i.length-2;return e.split(".").slice(1).reduce(((t,e,i)=>i!==n?(t[e]=Object.assign({},t[e]),t&&t[e]):(t[e]=Array.isArray(t[e])||!tt(t[e])?s:Object.assign(Object.assign({},t[e]),s),t&&t[e])),t),t}const Mt=new U(1);function kt(){return!1}function Lt(t){return(e=t)&&nt(e.then)||_(t)?d(t):o(t);var e}function Kt(t){const e={key:"AkitaStores",enableInNonBrowser:!1,storage:q()?localStorage:t.storage,deserialize:JSON.parse,serialize:JSON.stringify,include:[],select:[],persistOnDestroy:!1,preStorageUpdate:function(t,e){return e},preStoreUpdate:function(t,e){return e},skipStorageUpdate:kt,preStorageUpdateOperator:()=>t=>t},{storage:s,enableInNonBrowser:i,deserialize:n,serialize:r,include:h,select:c,key:o,preStorageUpdate:u,persistOnDestroy:a,preStorageUpdateOperator:l,preStoreUpdate:f,skipStorageUpdate:d}=Object.assign({},e,t);if(Y&&!i||!s)return;const b=h.length>0,O=c.length>0;let j,y;b&&(j=h.reduce(((t,e)=>(nt(e)?t.fns.push(e):t[e.split(".")[0]]=e,t)),{fns:[]})),O&&(y=c.reduce(((t,e)=>(t[e.storeName]=e,t)),{}));let w={},v={},S=[];const E=[];function m(t){Lt(t).subscribe((()=>{const t=E.shift();t&&m(t)}))}const T=q()&&s===localStorage||(()=>{try{return"undefined"!=typeof sessionStorage}catch(t){return!1}})()&&s===sessionStorage;return Lt(s.getItem(o)).subscribe((t=>{let e=tt(t)?t:n(t||"{}");function i(t){e.$cache=Object.assign(Object.assign({},e.$cache||{}),t),e=Object.assign({},e,v),E.push(s.setItem(o,T?r(e):e)),m(E.shift())}function h(t,e){w[t]=yt[t]._select((t=>Rt(t,e))).pipe((1,t=>t.lift(new F(1))),p((e=>O&&y[t]?y[t](e):e)),g((()=>!1===d())),l()).subscribe((e=>{v[t]=u(t,e),Promise.resolve().then((()=>i({[t]:yt[t]._cache().getValue()})))}))}function c(t,s,i){t in e&&(W("@PersistState"),s._setState((s=>Ft(s,i,f(t,e[t],s)))),yt[t].setHasCache(!!e.$cache&&e.$cache[t],{restartTTL:!0}))}S.push(dt.subscribe((t=>{w[t]&&(!1===a&&i({[t]:!1}),w[t].unsubscribe(),delete w[t])}))),S.push(pt.subscribe((t=>{if("router"===t)return;const e=yt[t];if(b){let s=j[t];if(!s){if(!j.fns.some((e=>e(t))))return;s=t}c(t,e,s),h(t,s)}else c(t,e,t),h(t,t)}))),Mt.next()})),{destroy(){S.forEach((t=>t.unsubscribe()));for(let t=0,e=Object.keys(w);t<e.length;t++)w[e[t]].unsubscribe();w={}},clear(){s.clear()},clearStore(t){V(t)?Lt(s.setItem(o,"{}")).subscribe():Lt(s.getItem(o)).subscribe((e=>{const i=n(e||"{}");i[t]&&(delete i[t],Lt(s.setItem(o,r(i))).subscribe())}))}}}const Dt={pagesControls:!1,range:!1,startWith:1,cacheTimeout:void 0,clearStoreWithCache:!0};var $t,zt;O([function(t,e,s){const i=s.value;return s.value=function(...t){return z("@Pagination - New Page",void 0),i.apply(this,t)},s},j("design:type",Function),j("design:paramtypes",[Object]),j("design:returntype",void 0)],class extends class{constructor(t,e){this.query=t,e&&e.resetFn&<().resettable&&this.onReset(e.resetFn)}getQuery(){return this.query}getStore(){return this.getQuery().__store__}isEntityBased(t){return gt(t)}selectSource(t,e){return this.isEntityBased(t)?this.getQuery().selectEntity(t).pipe(Ct):e?this.getQuery().select((t=>Rt(t,this.withStoreName(e)))):this.getQuery().select()}getSource(t,e){if(this.isEntityBased(t))return this.getQuery().getEntity(t);const s=this.getQuery().getValue();return e?Rt(s,this.withStoreName(e)):s}withStoreName(t){return`${this.storeName}.${t}`}get storeName(){return this.getStore().storeName}updateStore(t,e,s){if(this.isEntityBased(e))this.getStore().update(e,t);else{if(s)return void this.getStore()._setState((e=>Ft(e,this.withStoreName(s),t)));this.getStore()._setState((e=>Object.assign(Object.assign({},e),t)))}}onReset(t){const e=this.getStore().reset;this.getStore().reset=(...s)=>{setTimeout((()=>{e.apply(this.getStore(),s),t()}))}}}{constructor(t,e={}){super(t,{resetFn:()=>{this.initial=!1,this.destroy({clearCache:!0,currentPage:1})}}),this.query=t,this.config=e,this.metadata=new Map,this.pages=new Map,this.pagination={currentPage:1,perPage:0,total:0,lastPage:0,data:[]},this.initial=!0,this.isLoading$=this.query.selectLoading().pipe(u(0)),this.config=Object.assign(Dt,e);const{startWith:s,cacheTimeout:i}=this.config;this.page=new m(s),_(i)&&(this.clearCacheSubscription=i.subscribe((()=>this.clearCache())))}get pageChanges(){return this.page.asObservable()}get currentPage(){return this.pagination.currentPage}get isFirst(){return 1===this.currentPage}get isLast(){return this.currentPage===this.pagination.lastPage}withControls(){return this.config.pagesControls=!0,this}withRange(){return this.config.range=!0,this}setLoading(t=!0){this.getStore().setLoading(t)}update(t){this.pagination=t,this.addPage(t.data)}addPage(t){this.pages.set(this.currentPage,{ids:t.map((t=>t[this.getStore().idKey]))}),this.getStore().upsertMany(t)}clearCache(t={}){this.initial||(z("@Pagination - Clear Cache"),!1!==t.clearStore&&(this.config.clearStoreWithCache||t.clearStore)&&this.getStore().remove(),this.pages=new Map,this.metadata=new Map),this.initial=!1}clearPage(t){this.pages.delete(t)}destroy({clearCache:t,currentPage:e}={}){this.clearCacheSubscription&&this.clearCacheSubscription.unsubscribe(),t&&this.clearCache(),rt(e)||this.setPage(e),this.initial=!0}isPageActive(t){return this.currentPage===t}setPage(t){t===this.currentPage&&this.hasPage(t)||this.page.next(this.pagination.currentPage=t)}nextPage(){this.currentPage!==this.pagination.lastPage&&this.setPage(this.pagination.currentPage+1)}prevPage(){this.pagination.currentPage>1&&this.setPage(this.pagination.currentPage-1)}setLastPage(){this.setPage(this.pagination.lastPage)}setFirstPage(){this.setPage(1)}hasPage(t){return this.pages.has(t)}getPage(t){let e=this.pagination.currentPage;return this.hasPage(e)?this.selectPage(e):(this.setLoading(!0),d(t()).pipe(k((t=>(e=t.currentPage,Tt((()=>{this.setLoading(!1),this.update(t)})),this.selectPage(e))))))}getQuery(){return this.query}refreshCurrentPage(){!1===V(this.currentPage)&&(this.clearPage(this.currentPage),this.setPage(this.currentPage))}getFrom(){return this.isFirst?1:(this.currentPage-1)*this.pagination.perPage+1}getTo(){return this.isLast?this.pagination.total:this.currentPage*this.pagination.perPage}selectPage(t){return this.query.selectAll({asObject:!0}).pipe((1,t=>t.lift(new C(1))),p((e=>{let s=Object.assign(Object.assign({},this.pagination),{data:this.pages.get(t).ids.map((t=>e[t]))});const{range:i,pagesControls:n}=this.config;return isNaN(this.pagination.total)&&(s.total=1===s.lastPage?s.data?s.data.length:0:s.perPage*s.lastPage,this.pagination.total=s.total),i&&(s.from=this.getFrom(),s.to=this.getTo()),n&&(s.pageControls=function(t,e){const s=Math.ceil(t/e);let i=[];for(let t=0;t<s;t++)i.push(t+1);return i}(this.pagination.total,this.pagination.perPage)),s})))}}.prototype,"update",null),function(t){t.Update="UPDATE"}($t||($t={})),function(t){t.Update="UPDATE",t.AddEntities="ADD_ENTITIES",t.SetEntities="SET_ENTITIES",t.UpdateEntities="UPDATE_ENTITIES",t.RemoveEntities="REMOVE_ENTITIES",t.UpsertEntities="UPSERT_ENTITIES",t.UpsertManyEntities="UPSERT_MANY_ENTITIES"}(zt||(zt={}));export{xt as Q,jt as S,Pt as a,X as e,Kt as p}
|