@geotrekce/geotrek-rando-widget 0.0.13 → 0.0.15
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/dist/cjs/css-shim-1269258a.js +6 -0
- package/dist/cjs/{dom-d5e52c7e.js → dom-36862b77.js} +1 -1
- package/dist/cjs/geotrek-rando-widget.cjs.js +4 -4
- package/dist/cjs/grw-app.cjs.entry.js +5 -4
- package/dist/cjs/grw-filter_6.cjs.entry.js +489 -183
- package/dist/cjs/grw-information-desk-detail_3.cjs.entry.js +2 -2
- package/dist/cjs/grw-trek-card.cjs.entry.js +15 -7
- package/dist/cjs/{index-66d58516.js → index-e5425fef.js} +437 -266
- package/dist/cjs/loader.cjs.js +4 -4
- package/dist/cjs/{shadow-css-cf936b02.js → shadow-css-346c0795.js} +1 -1
- package/dist/cjs/{store-d301af22.js → store-a9172740.js} +4 -2
- package/dist/collection/collection-manifest.json +2 -2
- package/dist/collection/components/grw-app/grw-app.css +4 -0
- package/dist/collection/components/grw-app/grw-app.js +432 -450
- package/dist/collection/components/grw-filter/grw-filter.js +65 -61
- package/dist/collection/components/grw-information-desk-detail/grw-information-desk-detail.js +35 -44
- package/dist/collection/components/grw-map/grw-map.css +5 -4
- package/dist/collection/components/grw-map/grw-map.js +251 -217
- package/dist/collection/components/grw-poi-detail/grw-poi-detail.js +33 -32
- package/dist/collection/components/grw-sensitive-area-detail/grw-sensitive-area-detail.js +42 -47
- package/dist/collection/components/grw-trek-card/grw-trek-card.js +142 -129
- package/dist/collection/components/grw-trek-detail/grw-trek-detail.js +135 -208
- package/dist/collection/components/grw-treks-list/grw-treks-list.js +95 -65
- package/dist/collection/store/grw-trek-provider.js +61 -55
- package/dist/collection/store/grw-treks-provider.js +181 -177
- package/dist/collection/store/store.js +3 -2
- package/dist/components/grw-app.js +4 -3
- package/dist/components/grw-map2.js +467 -176
- package/dist/components/grw-trek-card2.js +17 -7
- package/dist/components/grw-trek-detail2.js +10 -3
- package/dist/components/grw-trek-provider2.js +6 -2
- package/dist/components/grw-treks-list2.js +7 -2
- package/dist/components/grw-treks-provider2.js +5 -3
- package/dist/components/store.js +3 -2
- package/dist/esm/css-shim-88cc621b.js +4 -0
- package/dist/esm/{dom-9794f747.js → dom-665d6011.js} +1 -1
- package/dist/esm/geotrek-rando-widget.js +4 -4
- package/dist/esm/grw-app.entry.js +5 -4
- package/dist/esm/grw-filter_6.entry.js +489 -183
- package/dist/esm/grw-information-desk-detail_3.entry.js +2 -2
- package/dist/esm/grw-trek-card.entry.js +15 -7
- package/dist/esm/{index-899307bb.js → index-185d186f.js} +437 -266
- package/dist/esm/loader.js +4 -4
- package/dist/esm/polyfills/css-shim.js +1 -1
- package/dist/esm/{shadow-css-4cd4480f.js → shadow-css-b18e99d7.js} +1 -1
- package/dist/esm/{store-70461a28.js → store-38e90440.js} +4 -3
- package/dist/esm-es5/css-shim-88cc621b.js +1 -0
- package/dist/esm-es5/{dom-9794f747.js → dom-665d6011.js} +0 -0
- package/dist/esm-es5/geotrek-rando-widget.js +1 -1
- package/dist/esm-es5/grw-app.entry.js +1 -1
- package/dist/esm-es5/grw-filter_6.entry.js +3 -3
- package/dist/esm-es5/grw-information-desk-detail_3.entry.js +1 -1
- package/dist/esm-es5/grw-trek-card.entry.js +1 -1
- package/dist/esm-es5/index-185d186f.js +2 -0
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/{shadow-css-4cd4480f.js → shadow-css-b18e99d7.js} +0 -0
- package/dist/esm-es5/{store-70461a28.js → store-38e90440.js} +1 -1
- package/dist/geotrek-rando-widget/geotrek-rando-widget.esm.js +1 -1
- package/dist/geotrek-rando-widget/geotrek-rando-widget.js +2 -2
- package/dist/geotrek-rando-widget/p-144c62f8.system.entry.js +1 -0
- package/dist/geotrek-rando-widget/p-23a696ea.system.entry.js +6 -0
- package/dist/geotrek-rando-widget/p-412fe797.system.js +1 -0
- package/dist/geotrek-rando-widget/p-4b12d113.js +1 -0
- package/dist/geotrek-rando-widget/p-54bf2ec8.js +2 -0
- package/dist/geotrek-rando-widget/{p-d1582cff.js → p-62b28500.js} +0 -0
- package/dist/geotrek-rando-widget/{p-2bd0278f.system.entry.js → p-6484dee6.system.entry.js} +1 -1
- package/dist/geotrek-rando-widget/{p-c8c96517.system.js → p-6a050b2c.system.js} +0 -0
- package/dist/geotrek-rando-widget/{p-b1530d9c.system.js → p-88092d06.system.js} +0 -0
- package/dist/geotrek-rando-widget/{p-533fc2bb.entry.js → p-911224bd.entry.js} +1 -1
- package/dist/geotrek-rando-widget/p-b44ba765.entry.js +1 -0
- package/dist/geotrek-rando-widget/p-bd5f732d.entry.js +1 -0
- package/dist/geotrek-rando-widget/p-d2dd6057.js +1 -0
- package/dist/geotrek-rando-widget/p-d6fffac2.entry.js +1 -0
- package/dist/geotrek-rando-widget/p-dd8d9020.system.js +2 -0
- package/dist/geotrek-rando-widget/p-e2652fee.system.js +1 -0
- package/dist/geotrek-rando-widget/p-e763374d.system.entry.js +1 -0
- package/dist/geotrek-rando-widget/{p-4eaf20b7.js → p-f26ed61d.js} +0 -0
- package/dist/geotrek-rando-widget/{p-82ca029f.system.js → p-f7cc8285.system.js} +1 -1
- package/dist/types/components/grw-map/grw-map.d.ts +3 -1
- package/dist/types/components/grw-trek-card/grw-trek-card.d.ts +4 -1
- package/dist/types/components/grw-trek-detail/grw-trek-detail.d.ts +3 -1
- package/dist/types/components/grw-treks-list/grw-treks-list.d.ts +1 -0
- package/dist/types/components.d.ts +8 -0
- package/dist/types/stencil-public-runtime.d.ts +15 -4
- package/dist/types/store/store.d.ts +5 -3
- package/dist/types/types/types.d.ts +6 -0
- package/loader/package.json +1 -0
- package/package.json +12 -12
- package/readme.md +4 -6
- package/dist/cjs/css-shim-6f592941.js +0 -6
- package/dist/esm/css-shim-2d0a698c.js +0 -4
- package/dist/esm-es5/css-shim-2d0a698c.js +0 -1
- package/dist/esm-es5/index-899307bb.js +0 -2
- package/dist/geotrek-rando-widget/p-067c02c4.system.js +0 -1
- package/dist/geotrek-rando-widget/p-0c5b047c.js +0 -1
- package/dist/geotrek-rando-widget/p-18038011.js +0 -1
- package/dist/geotrek-rando-widget/p-2712caa8.system.entry.js +0 -6
- package/dist/geotrek-rando-widget/p-32d97a4f.system.js +0 -1
- package/dist/geotrek-rando-widget/p-3ed52659.entry.js +0 -1
- package/dist/geotrek-rando-widget/p-4690907e.js +0 -2
- package/dist/geotrek-rando-widget/p-48d5dde7.entry.js +0 -1
- package/dist/geotrek-rando-widget/p-8f9914f4.system.js +0 -2
- package/dist/geotrek-rando-widget/p-e1431f36.system.entry.js +0 -1
- package/dist/geotrek-rando-widget/p-e38f4ff4.system.entry.js +0 -1
- package/dist/geotrek-rando-widget/p-f5d98aae.entry.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as i,h as e,H as t,g as r}from"./p-54bf2ec8.js";import{o,s as n,r as a}from"./p-d2dd6057.js";const s=class{constructor(e){i(this,e),this.showTrek=!1,this.showTreksMap=!1,this.showTrekMap=!1,this.showFilters=!1,this.isLargeView=!1,this.language="fr",this.colorPrimary="#6b0030",this.colorPrimaryShade="#4a0021",this.colorPrimaryTint="#974c6e",this.colorTrekLine="#6b0030",this.colorDepartureIcon="#006b3b",this.colorArrivalIcon="#85003b",this.colorSensitiveArea="#4974a5",this.colorPoiIcon="#974c6e",this.largeViewSize=1024,this.handlePopStateBind=this.handlePopState.bind(this)}onTrekCardPress(i){this.currentTrekId=i.detail,this.showTrek=!this.showTrek;const e=new URL(window.location.toString());e.searchParams.set("trek",this.currentTrekId.toString()),window.history.pushState({},"",e)}onWindowResize(){this.handleView()}watchPropHandler(){window.dispatchEvent(new window.Event("resize"))}componentWillLoad(){const i=new URL(window.location.toString()),e=i.searchParams.get("trek");e&&(window.history.replaceState({isInitialHistoryWithTrek:!0},"",i),this.currentTrekId=Number(e),this.showTrek=!this.showTrek)}componentDidLoad(){o("trekNetworkError",(()=>{if(n.trekNetworkError){const i=new URL(window.location.toString());i.searchParams.delete("trek"),window.history.replaceState({},"",i),this.onTrekDetailsClose()}})),window.addEventListener("popstate",this.handlePopStateBind,!1),this.handleView()}onTrekDetailsClose(){n.currentTrek=null,this.currentTrekId=null,this.showTrek=!this.showTrek}handleView(){this.isLargeView=this.element.getBoundingClientRect().width>=this.largeViewSize,this.showTreksMap=this.isLargeView,this.showTrekMap=this.isLargeView}handleFilters(){this.showFilters=!this.showFilters}handleBackButton(){if(window.history.state.isInitialHistoryWithTrek){this.onTrekDetailsClose();const i=new URL(window.location.toString());i.searchParams.delete("trek"),window.history.pushState({},"",i)}else window.history.back()}handlePopState(){const i=new URL(window.location.toString()).searchParams.get("trek");i?(this.currentTrekId=Number(i),this.showTrek=!this.showTrek):this.onTrekDetailsClose()}handleShowMap(){this.currentTrekId?this.showTrekMap=!this.showTrekMap:this.showTreksMap=!this.showTreksMap}disconnectedCallback(){a(),window.removeEventListener("popstate",this.handlePopStateBind)}render(){return e(t,{style:{"--color-primary":this.colorPrimary,"--color-primary-tint":this.colorPrimaryTint,"--color-primary-shade":this.colorPrimaryShade}},!n.currentTreks&&!n.currentTrek&&e("div",{class:"init-loader-container"},e("span",{class:"loader"})),!this.showTrek&&!n.treks&&e("grw-treks-provider",{api:this.api,language:this.language,"in-bbox":this.inBbox,cities:this.cities,districts:this.districts,structures:this.structures,themes:this.themes,portals:this.portals,routes:this.routes,practices:this.practices}),this.showTrek&&this.currentTrekId&&e("grw-trek-provider",{api:this.api,language:this.language,"trek-id":this.currentTrekId}),(n.currentTreks||n.currentTrek)&&e("div",{class:"app-container"},e("div",{class:this.isLargeView?"large-view-header-container":"header-container"},this.showTrek?e("div",{onClick:()=>this.handleBackButton(),class:"arrow-back-icon",innerHTML:'<svg xmlns="http://www.w3.org/2000/svg" width="512" height="512" viewBox="0 0 512 512"><polyline points="244 400 100 256 244 112" style="fill:none;stroke:#ffffff;stroke-linecap:round;stroke-linejoin:round;stroke-width:48px"/><line x1="120" y1="256" x2="412" y2="256" style="fill:none;stroke:#ffffff;stroke-linecap:round;stroke-linejoin:round;stroke-width:48px"/></svg>'}):e("div",{class:"handle-filters-container"},e("div",{onClick:()=>this.handleFilters(),class:"handle-filters-button"},"FILTRER"),n.treksWithinBounds&&e("div",{class:"current-treks-within-bounds-length"},`${n.treksWithinBounds.length} randonnée${n.treksWithinBounds.length>1?"s":""}`)),!this.showTrek&&this.showFilters&&e("div",{class:"options-container"},e("div",{class:"filters-container"},e("div",{onClick:()=>this.handleFilters(),class:"close-filters-button"},"X"),e("div",null,e("grw-filter",{filterName:"Pratique",filterType:"practices",filterNameProperty:"name"})),e("div",{class:"filter-margin-top"},e("grw-filter",{filterName:"Difficulté",filterType:"difficulties",filterNameProperty:"label"})),e("div",{class:"filter-margin-top"},e("grw-filter",{filterName:"Durée",filterType:"durations",filterNameProperty:"name"}))),e("div",{onClick:()=>this.handleFilters(),class:"back-filters-container"})),e("div",{class:"attribution-container"},e("a",{target:"_blank",href:"https://geotrek.fr"},"GEOTREK"))),e("div",{class:"content-container"},e("div",{class:this.isLargeView?"large-view-app-treks-list-container":"app-treks-list-container",style:{display:this.showTrek?"none":"flex",position:this.showTrek?"absolute":"relative"}},e("grw-treks-list",{"reset-store-on-disconnected":"false","is-large-view":this.isLargeView,"color-primary":this.colorPrimary,"color-primary-tint":this.colorPrimaryTint})),this.showTrek&&!n.currentTrek&&e("div",{class:this.isLargeView?"large-view-loader-container":"loader-container"},e("span",{class:"loader"})),n.currentTrek&&e("div",{class:this.isLargeView?"large-view-app-trek-detail-container":"app-trek-detail-container"},e("grw-trek-detail",{"reset-store-on-disconnected":"false","color-primary":this.colorPrimary,"color-primary-shade":this.colorPrimaryShade,"color-primary-tint":this.colorPrimaryTint})),e("grw-map",{"reset-store-on-disconnected":"false",class:this.isLargeView?"large-view-app-map-container":"app-map-container",style:{visibility:this.showTreksMap&&!this.showTrek||this.showTrekMap&&this.showTrek?"visible":"hidden"},"url-layer":this.urlLayer,center:this.center,zoom:this.zoom,attribution:this.attribution,"color-primary":this.colorPrimary,"color-primary-tint":this.colorPrimaryTint,"color-trek-line":this.colorTrekLine,"color-departure-icon":this.colorDepartureIcon,"color-arrival-icon":this.colorArrivalIcon,"color-sensitive-area":this.colorSensitiveArea,"color-poi-icon":this.colorPoiIcon})),e("div",{class:"map-visibility-button",style:{display:this.isLargeView?"none":"flex"}},e("div",{onClick:()=>this.handleShowMap()},this.showTrek?this.showTrekMap?"Voir la fiche":"Voir la carte":this.showTreksMap?"Voir la liste":"Voir la carte"))))}get element(){return r(this)}static get watchers(){return{isLargeView:["watchPropHandler"]}}};s.style=':host{line-height:initial}.app-container{position:relative;height:100%;max-height:100vh;font-family:"Roboto"}.header-container,.large-view-header-container{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;background-color:var(--color-primary);height:64px}.header-container .arrow-back-icon,.large-view-header-container .arrow-back-icon{width:48px;height:auto;margin-left:24px}.header-container .arrow-back-icon svg,.large-view-header-container .arrow-back-icon svg{cursor:pointer;width:48px;height:auto}.header-container .handle-filters-container,.large-view-header-container .handle-filters-container{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.header-container .handle-filters-container .handle-filters-button,.large-view-header-container .handle-filters-container .handle-filters-button{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:pointer;color:var(--color-primary);background-color:#ffffff;margin-left:12px;border-radius:8px;padding:8px}.header-container .handle-filters-container .current-treks-within-bounds-length,.large-view-header-container .handle-filters-container .current-treks-within-bounds-length{margin-left:12px;color:#ffffff}.header-container .attribution-container,.large-view-header-container .attribution-container{position:absolute;right:24px}.header-container .attribution-container a,.large-view-header-container .attribution-container a{color:#ffffff;text-decoration:none}.options-container{height:calc(100% - 64px);position:absolute;width:100%;z-index:1100;top:64px}.filters-container{position:absolute;width:100%;background-color:#ffffff;padding:36px 0px;z-index:1100}.filters-container .close-filters-button{cursor:pointer;font-weight:bold;position:absolute;top:12px;right:12px;padding:12px;border-radius:12px;color:var(--color-primary);border:1px var(--color-primary) solid}.filters-container .close-filters-button:hover{background-color:var(--color-primary);color:#ffffff}.filters-container .filter-margin-top{margin-top:24px}.back-filters-container{background-color:rgba(0, 0, 0, 0.5);width:100%;height:calc(100% - 64px);position:absolute;z-index:1099;top:64px}.init-loader-container,.loader-container,.large-view-loader-container{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;height:100%}.init-loader-container .loader,.loader-container .loader,.large-view-loader-container .loader{width:48px;height:48px;border:5px solid var(--color-primary-tint);border-bottom-color:var(--color-primary);border-radius:50%;display:inline-block;-webkit-box-sizing:border-box;box-sizing:border-box;-webkit-animation:rotation 1s linear infinite;animation:rotation 1s linear infinite}@-webkit-keyframes rotation{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes rotation{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}.content-container{position:relative;display:-ms-flexbox;display:flex;height:calc(100% - 64px)}.app-treks-list-container,.app-trek-detail-container,.large-view-app-treks-list-container,.large-view-app-trek-detail-container{height:100%}.app-map-container,.large-view-app-map-container{width:100%;height:100%}.map-visibility-button{cursor:pointer;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;position:absolute;bottom:24px;width:100%;z-index:400;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.map-visibility-button div{background-color:var(--color-primary);color:#ffffff;padding:12px;border-radius:24px;width:120px;text-align:center}.header-container .title{font-size:24px}.init-loader-container,.loader-container{width:100%}.app-treks-list-container,.app-trek-detail-container{width:100%}.app-map-container{position:relative;width:100%;position:absolute}.large-view-header-container .title{font-size:32px}.large-view-loader-container{width:50%}.large-view-app-treks-list-container,.large-view-app-trek-detail-container{width:50%}.large-view-app-map-container{position:relative;width:50%}';export{s as grw_app}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as e,f as t}from"./p-54bf2ec8.js";const s=e=>!("isConnected"in e)||e.isConnected,r=(()=>{let e;return(...t)=>{e&&clearTimeout(e),e=setTimeout((()=>{e=0,(e=>{for(let t of e.keys())e.set(t,e.get(t).filter(s))})(...t)}),2e3)}})(),n=e=>"function"==typeof e?e():e,{state:o,onChange:l,reset:u}=(()=>{const s=((e,t=((e,t)=>e!==t))=>{const s=n(e);let r=new Map(Object.entries(null!=s?s:{}));const o={dispose:[],get:[],set:[],reset:[]},l=()=>{var t;r=new Map(Object.entries(null!==(t=n(e))&&void 0!==t?t:{})),o.reset.forEach((e=>e()))},u=e=>(o.get.forEach((t=>t(e))),r.get(e)),i=(e,s)=>{const n=r.get(e);t(s,n,e)&&(r.set(e,s),o.set.forEach((t=>t(e,s,n))))},c="undefined"==typeof Proxy?{}:new Proxy(s,{get:(e,t)=>u(t),ownKeys:()=>Array.from(r.keys()),getOwnPropertyDescriptor:()=>({enumerable:!0,configurable:!0}),has:(e,t)=>r.has(t),set:(e,t,s)=>(i(t,s),!0)}),a=(e,t)=>(o[e].push(t),()=>{((e,t)=>{const s=e.indexOf(t);s>=0&&(e[s]=e[e.length-1],e.length--)})(o[e],t)});return{state:c,get:u,set:i,on:a,onChange:(t,s)=>{const r=a("set",((e,r)=>{e===t&&s(r)})),o=a("reset",(()=>s(n(e)[t])));return()=>{r(),o()}},use:(...e)=>{const t=e.reduce(((e,t)=>(t.set&&e.push(a("set",t.set)),t.get&&e.push(a("get",t.get)),t.reset&&e.push(a("reset",t.reset)),t.dispose&&e.push(a("dispose",t.dispose)),e)),[]);return()=>t.forEach((e=>e()))},dispose:()=>{o.dispose.forEach((e=>e())),l()},reset:l,forceUpdate:e=>{const t=r.get(e);o.set.forEach((s=>s(e,t,t)))}}})({api:"",treks:null,currentTreks:null,treksWithinBounds:null,currentMapTreksBounds:null,difficulties:[],routes:[],practices:[],themes:[],cities:[],durations:[],currentSensitiveAreas:null,labels:null,sources:null,accessibilities:null,accessibilitiesLevel:null,poiTypes:null,currentTrek:null,currentPois:null,currentInformationDesks:null,treksNetworkError:!1,trekNetworkError:!1},void 0);return s.use((()=>{if("function"!=typeof e)return{};const s=new Map;return{dispose:()=>s.clear(),get:t=>{const r=e();r&&((e,t,s)=>{const r=e.get(t);r?r.includes(s)||r.push(s):e.set(t,[s])})(s,t,r)},set:e=>{const n=s.get(e);n&&s.set(e,n.filter(t)),r(s)},reset:()=>{s.forEach((e=>e.forEach(t))),r(s)}}})()),s})();export{l as o,u as r,o as s}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as i,e,h as r,H as a}from"./p-54bf2ec8.js";import{s as t,o as n,r as s}from"./p-d2dd6057.js";import{d as c,f as o,l,a as d,b as h,c as b}from"./p-f3f7d6be.js";const p=class{constructor(r){i(this,r),this.trekCardPress=e(this,"trekCardPress",7),this.colorPrimary="#6b0030",this.colorPrimaryTint="#974c6e",this.isLargeView=!1,this.resetStoreOnDisconnected=!0}connectedCallback(){this.currentTrek=this.trek?this.trek:t.currentTrek,this.currentTrek&&(this.difficulty=t.difficulties.find((i=>i.id===this.currentTrek.difficulty)),this.route=t.routes.find((i=>i.id===this.currentTrek.route)),this.practice=t.practices.find((i=>i.id===this.currentTrek.practice)),this.themes=t.themes.filter((i=>this.currentTrek.themes.includes(i.id))),this.departureCity=t.cities.find((i=>i.id===this.currentTrek.departure_city))),n("currentTrek",(()=>{this.currentTrek=this.trek?this.trek:t.currentTrek,this.currentTrek&&(this.difficulty=t.difficulties.find((i=>i.id===this.currentTrek.difficulty)),this.route=t.routes.find((i=>i.id===this.currentTrek.route)),this.practice=t.practices.find((i=>i.id===this.currentTrek.practice)),this.themes=t.themes.filter((i=>this.currentTrek.themes.includes(i.id))),this.departureCity=t.cities.find((i=>i.id===this.currentTrek.departure_city)))}))}disconnectedCallback(){this.resetStoreOnDisconnected&&s()}render(){var i,e,t,n,s,p,m;return r(a,{onClick:()=>this.trekCardPress.emit(this.currentTrek.id),style:{width:this.isLargeView?"100%":"auto","--color-primary":this.colorPrimary,"--color-primary-tint":this.colorPrimaryTint}},this.currentTrek&&r("div",{class:this.isLargeView?"trek-card-large-view-container":"trek-card-container"},this.currentTrek.attachments&&this.currentTrek.attachments[0]&&this.currentTrek.attachments[0].thumbnail&&r("img",{class:"image",src:`${this.currentTrek.attachments[0].thumbnail}`,loading:"lazy"}),r("div",{class:"sub-container"},this.departureCity&&r("div",{class:"departure"},this.departureCity.name),r("div",{class:"name"},null===(i=this.currentTrek)||void 0===i?void 0:i.name),r("div",{class:"themes-container"},this.themes.map((i=>r("div",{class:"theme"},i.label)))),r("div",{class:"icons-labels-container"},r("div",{class:"row"},r("div",{class:"icon-label difficulty"},(null===(e=this.difficulty)||void 0===e?void 0:e.pictogram)&&r("img",{src:this.difficulty.pictogram}),null===(t=this.difficulty)||void 0===t?void 0:t.label),r("div",{class:"icon-label duration"},r("div",{class:"svg-icon",innerHTML:c}),o(this.currentTrek.duration))),r("div",{class:"row"},r("div",{class:"icon-label length"},r("div",{class:"svg-icon",innerHTML:l}),d(this.currentTrek.length_2d)),r("div",{class:"icon-label ascent"},r("div",{class:"svg-icon",innerHTML:h}),b(this.currentTrek.ascent))),r("div",{class:"row"},r("div",{class:"icon-label route"},(null===(n=this.route)||void 0===n?void 0:n.pictogram)&&r("img",{src:this.route.pictogram}),null===(s=this.route)||void 0===s?void 0:s.route),r("div",{class:"icon-label practice"},(null===(p=this.practice)||void 0===p?void 0:p.pictogram)&&r("img",{src:this.practice.pictogram}),null===(m=this.practice)||void 0===m?void 0:m.name))))))}};p.style='.trek-card-container,.trek-card-large-view-container{font-family:"Roboto";border-radius:8px;-webkit-box-shadow:4px 8px 24px rgba(0, 0, 0, 0.25);box-shadow:4px 8px 24px rgba(0, 0, 0, 0.25);cursor:pointer}.trek-card-container .image,.trek-card-large-view-container .image{-o-object-fit:cover;object-fit:cover}.trek-card-container .sub-container,.trek-card-large-view-container .sub-container{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center;padding:12px}.trek-card-container .sub-container .name,.trek-card-large-view-container .sub-container .name{color:var(--color-primary);font-size:24px;font-weight:bold;margin-bottom:8px}.trek-card-container .sub-container .departure,.trek-card-large-view-container .sub-container .departure{color:rgba(0, 0, 0, 0.7);font-size:16px;margin:4px 0px}.trek-card-container .sub-container .themes-container,.trek-card-large-view-container .sub-container .themes-container{display:-ms-flexbox;display:flex;-ms-flex-pack:start;justify-content:flex-start;-ms-flex-align:center;align-items:center;-ms-flex-wrap:wrap;flex-wrap:wrap}.trek-card-container .sub-container .themes-container .theme,.trek-card-large-view-container .sub-container .themes-container .theme{background-color:var(--color-primary-tint);color:#ffffff;border-radius:8px;padding:8px;margin:0px 8px 8px 0px}.trek-card-container .sub-container .icons-labels-container,.trek-card-large-view-container .sub-container .icons-labels-container{display:-ms-flexbox;display:flex;-ms-flex-pack:start;justify-content:flex-start;-ms-flex-align:center;align-items:center;-ms-flex-wrap:wrap;flex-wrap:wrap}.trek-card-container .sub-container .icons-labels-container .row,.trek-card-large-view-container .sub-container .icons-labels-container .row{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-align:center;align-items:center;width:100%}.trek-card-container .sub-container .icons-labels-container .row:not(:last-child),.trek-card-large-view-container .sub-container .icons-labels-container .row:not(:last-child){margin-bottom:12px}.trek-card-container .sub-container .icons-labels-container .row .icon-label,.trek-card-large-view-container .sub-container .icons-labels-container .row .icon-label{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;width:50%}.trek-card-container .sub-container .icons-labels-container .row .icon-label:nth-child(2),.trek-card-large-view-container .sub-container .icons-labels-container .row .icon-label:nth-child(2){margin:0px 4px}.trek-card-container .sub-container .icons-labels-container .row .icon-label img,.trek-card-container .sub-container .icons-labels-container .row .icon-label .svg-icon svg,.trek-card-large-view-container .sub-container .icons-labels-container .row .icon-label img,.trek-card-large-view-container .sub-container .icons-labels-container .row .icon-label .svg-icon svg{width:24px;height:auto;margin-right:8px}.trek-card-container .sub-container .icons-labels-container .row .practice img,.trek-card-large-view-container .sub-container .icons-labels-container .row .practice img{background-color:var(--color-primary)}.trek-card-container{width:350px;height:auto}.trek-card-container .image{width:100%}.trek-card-large-view-container{height:auto;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row}.trek-card-large-view-container .image{width:250px}';export{p as grw_trek_card}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)if(Object.prototype.hasOwnProperty.call(t,r))e[r]=t[r]};return e(t,r)};return function(t,r){if(typeof r!=="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}();var __awaiter=this&&this.__awaiter||function(e,t,r,n){function a(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,i){function l(e){try{o(n.next(e))}catch(t){i(t)}}function s(e){try{o(n["throw"](e))}catch(t){i(t)}}function o(e){e.done?r(e.value):a(e.value).then(l,s)}o((n=n.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var r={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,a,i,l;return l={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(l[Symbol.iterator]=function(){return this}),l;function s(e){return function(t){return o([e,t])}}function o(l){if(n)throw new TypeError("Generator is already executing.");while(r)try{if(n=1,a&&(i=l[0]&2?a["return"]:l[0]?a["throw"]||((i=a["return"])&&i.call(a),0):a.next)&&!(i=i.call(a,l[1])).done)return i;if(a=0,i)l=[l[0]&2,i.value];switch(l[0]){case 0:case 1:i=l;break;case 4:r.label++;return{value:l[1],done:false};case 5:r.label++;a=l[1];l=[0];continue;case 7:l=r.ops.pop();r.trys.pop();continue;default:if(!(i=r.trys,i=i.length>0&&i[i.length-1])&&(l[0]===6||l[0]===2)){r=0;continue}if(l[0]===3&&(!i||l[1]>i[0]&&l[1]<i[3])){r.label=l[1];break}if(l[0]===6&&r.label<i[1]){r.label=i[1];i=l;break}if(i&&r.label<i[2]){r.label=i[2];r.ops.push(l);break}if(i[2])r.ops.pop();r.trys.pop();continue}l=t.call(e,r)}catch(s){l=[6,s];a=0}finally{n=i=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:true}}};var __spreadArray=this&&this.__spreadArray||function(e,t,r){if(r||arguments.length===2)for(var n=0,a=t.length,i;n<a;n++){if(i||!(n in t)){if(!i)i=Array.prototype.slice.call(t,0,n);i[n]=t[n]}}return e.concat(i||Array.prototype.slice.call(t))};System.register([],(function(e,t){"use strict";return{execute:function(){var r=this;var n=e("N","geotrek-rando-widget");var a;var i;var l=false;var s=null;var o=false;var f=function(e,t){if(t===void 0){t=""}{return function(){return}}};var u=function(e,t){{return function(){return}}};var $="{visibility:hidden}.hydrated{visibility:inherit}";var c={};var v=function(e){return e!=null};var d=function(e){e=typeof e;return e==="object"||e==="function"};var h=e("h",(function(e,t){var r=[];for(var n=2;n<arguments.length;n++){r[n-2]=arguments[n]}var a=null;var i=null;var l=false;var s=false;var o=[];var f=function(t){for(var r=0;r<t.length;r++){a=t[r];if(Array.isArray(a)){f(a)}else if(a!=null&&typeof a!=="boolean"){if(l=typeof e!=="function"&&!d(a)){a=String(a)}if(l&&s){o[o.length-1].$text$+=a}else{o.push(l?p(null,a):a)}s=l}}};f(r);if(t){if(t.key){i=t.key}{var u=t.className||t.class;if(u){t.class=typeof u!=="object"?u:Object.keys(u).filter((function(e){return u[e]})).join(" ")}}}var $=p(e,null);$.$attrs$=t;if(o.length>0){$.$children$=o}{$.$key$=i}return $}));var p=function(e,t){var r={$flags$:0,$tag$:e,$text$:t,$elm$:null,$children$:null};{r.$attrs$=null}{r.$key$=null}return r};var m=e("H",{});var y=function(e){return e&&e.$tag$===m};var g=function(e,t){if(e!=null&&!d(e)){if(t&4){return e==="false"?false:e===""||!!e}if(t&2){return parseFloat(e)}if(t&1){return String(e)}return e}return e};var b=e("g",(function(e){return $e(e).$hostElement$}));var w=e("e",(function(e,t,r){var n=b(e);return{emit:function(e){return _(n,t,{bubbles:!!(r&4),composed:!!(r&2),cancelable:!!(r&1),detail:e})}}}));var _=function(e,t,r){var n=_e.ce(t,r);e.dispatchEvent(n);return n};var S=new WeakMap;var N=function(e,t,r){var n=ye.get(e);if(ke&&r){n=n||new CSSStyleSheet;if(typeof n==="string"){n=t}else{n.replaceSync(t)}}else{n=t}ye.set(e,n)};var k=function(e,t,r,n){var a=x(t);var i=ye.get(a);e=e.nodeType===11?e:we;if(i){if(typeof i==="string"){e=e.head||e;var l=S.get(e);var s=void 0;if(!l){S.set(e,l=new Set)}if(!l.has(a)){{if(_e.$cssShim$){s=_e.$cssShim$.createHostStyle(n,a,i,!!(t.$flags$&10));var o=s["s-sc"];if(o){a=o;l=null}}else{s=we.createElement("style");s.innerHTML=i}e.insertBefore(s,e.querySelector("link"))}if(l){l.add(a)}}}else if(!e.adoptedStyleSheets.includes(i)){e.adoptedStyleSheets=__spreadArray(__spreadArray([],e.adoptedStyleSheets,true),[i],false)}}return a};var R=function(e){var t=e.$cmpMeta$;var r=e.$hostElement$;var n=t.$flags$;var a=f("attachStyles",t.$tagName$);var i=k(Se&&r.shadowRoot?r.shadowRoot:r.getRootNode(),t,e.$modeName$,r);if(n&10){r["s-sc"]=i;r.classList.add(i+"-h")}a()};var x=function(e,t){return"sc-"+e.$tagName$};var C=function(e,t,r,n,a,i){if(r!==n){var l=de(e,t);var s=t.toLowerCase();if(t==="class"){var o=e.classList;var f=E(r);var u=E(n);o.remove.apply(o,f.filter((function(e){return e&&!u.includes(e)})));o.add.apply(o,u.filter((function(e){return e&&!f.includes(e)})))}else if(t==="style"){{for(var $ in r){if(!n||n[$]==null){if($.includes("-")){e.style.removeProperty($)}else{e.style[$]=""}}}}for(var $ in n){if(!r||n[$]!==r[$]){if($.includes("-")){e.style.setProperty($,n[$])}else{e.style[$]=n[$]}}}}else if(t==="key");else if(!l&&t[0]==="o"&&t[1]==="n"){if(t[2]==="-"){t=t.slice(3)}else if(de(ge,s)){t=s.slice(2)}else{t=s[2]+t.slice(3)}if(r){_e.rel(e,t,r,false)}if(n){_e.ael(e,t,n,false)}}else{var c=d(n);if((l||c&&n!==null)&&!a){try{if(!e.tagName.includes("-")){var v=n==null?"":n;if(t==="list"){l=false}else if(r==null||e[t]!=v){e[t]=v}}else{e[t]=n}}catch(h){}}if(n==null||n===false){if(n!==false||e.getAttribute(t)===""){{e.removeAttribute(t)}}}else if((!l||i&4||a)&&!c){n=n===true?"":n;{e.setAttribute(t,n)}}}}};var L=/\s/;var E=function(e){return!e?[]:e.split(L)};var j=function(e,t,r,n){var a=t.$elm$.nodeType===11&&t.$elm$.host?t.$elm$.host:t.$elm$;var i=e&&e.$attrs$||c;var l=t.$attrs$||c;{for(n in i){if(!(n in l)){C(a,n,i[n],undefined,r,t.$flags$)}}}for(n in l){C(a,n,i[n],l[n],r,t.$flags$)}};var P=function(e,t,r,n){var i=t.$children$[r];var s=0;var o;var f;if(i.$text$!==null){o=i.$elm$=we.createTextNode(i.$text$)}else{o=i.$elm$=we.createElement(i.$tag$);{j(null,i,l)}if(v(a)&&o["s-si"]!==a){o.classList.add(o["s-si"]=a)}if(i.$children$){for(s=0;s<i.$children$.length;++s){f=P(e,i,s);if(f){o.appendChild(f)}}}}return o};var O=function(e,t,r,n,a,l){var s=e;var o;if(s.shadowRoot&&s.tagName===i){s=s.shadowRoot}for(;a<=l;++a){if(n[a]){o=P(null,r,a);if(o){n[a].$elm$=o;s.insertBefore(o,t)}}}};var A=function(e,t,r,n,a){for(;t<=r;++t){if(n=e[t]){a=n.$elm$;a.remove()}}};var M=function(e,t,r,n){var a=0;var i=0;var l=0;var s=0;var o=t.length-1;var f=t[0];var u=t[o];var $=n.length-1;var c=n[0];var v=n[$];var d;var h;while(a<=o&&i<=$){if(f==null){f=t[++a]}else if(u==null){u=t[--o]}else if(c==null){c=n[++i]}else if(v==null){v=n[--$]}else if(I(f,c)){T(f,c);f=t[++a];c=n[++i]}else if(I(u,v)){T(u,v);u=t[--o];v=n[--$]}else if(I(f,v)){T(f,v);e.insertBefore(f.$elm$,u.$elm$.nextSibling);f=t[++a];v=n[--$]}else if(I(u,c)){T(u,c);e.insertBefore(u.$elm$,f.$elm$);u=t[--o];c=n[++i]}else{l=-1;{for(s=a;s<=o;++s){if(t[s]&&t[s].$key$!==null&&t[s].$key$===c.$key$){l=s;break}}}if(l>=0){h=t[l];if(h.$tag$!==c.$tag$){d=P(t&&t[i],r,l)}else{T(h,c);t[l]=undefined;d=h.$elm$}c=n[++i]}else{d=P(t&&t[i],r,i);c=n[++i]}if(d){{f.$elm$.parentNode.insertBefore(d,f.$elm$)}}}}if(a>o){O(e,n[$+1]==null?null:n[$+1].$elm$,r,n,i,$)}else if(i>$){A(t,a,o)}};var I=function(e,t){if(e.$tag$===t.$tag$){{return e.$key$===t.$key$}}return false};var T=function(e,t){var r=t.$elm$=e.$elm$;var n=e.$children$;var a=t.$children$;var i=t.$text$;if(i===null){{{j(e,t,l)}}if(n!==null&&a!==null){M(r,n,t,a)}else if(a!==null){if(e.$text$!==null){r.textContent=""}O(r,null,t,a,0,a.length-1)}else if(n!==null){A(n,0,n.length-1)}}else if(e.$text$!==i){r.data=i}};var z=function(e,t){var r=e.$hostElement$;var n=e.$vnode$||p(null,null);var l=y(t)?t:h(null,null,t);i=r.tagName;l.$tag$=null;l.$flags$|=4;e.$vnode$=l;l.$elm$=n.$elm$=r.shadowRoot||r;{a=r["s-sc"]}T(n,l)};var q=function(e,t){if(t&&!e.$onRenderResolve$&&t["s-p"]){t["s-p"].push(new Promise((function(t){return e.$onRenderResolve$=t})))}};var B=function(e,t){{e.$flags$|=16}if(e.$flags$&4){e.$flags$|=512;return}q(e,e.$ancestorComponent$);var r=function(){return H(e,t)};return Pe(r)};var H=function(e,t){var r=f("scheduleUpdate",e.$cmpMeta$.$tagName$);var n=e.$lazyInstance$;var a;if(t){{e.$flags$|=256;if(e.$queuedListeners$){e.$queuedListeners$.map((function(e){var t=e[0],r=e[1];return J(n,t,r)}));e.$queuedListeners$=null}}{a=J(n,"componentWillLoad")}}r();return K(a,(function(){return U(e,n,t)}))};var U=function(e,t,n){return __awaiter(r,void 0,void 0,(function(){var r,a,i,l,s,o;return __generator(this,(function(u){r=e.$hostElement$;a=f("update",e.$cmpMeta$.$tagName$);i=r["s-rc"];if(n){R(e)}l=f("render",e.$cmpMeta$.$tagName$);{V(e,t)}if(_e.$cssShim$){_e.$cssShim$.updateHost(r)}if(i){i.map((function(e){return e()}));r["s-rc"]=undefined}l();a();{s=r["s-p"];o=function(){return F(e)};if(s.length===0){o()}else{Promise.all(s).then(o);e.$flags$|=4;s.length=0}}return[2]}))}))};var V=function(e,t,r){try{s=t;t=t.render();{e.$flags$&=~16}{e.$flags$|=2}{{{z(e,t)}}}}catch(n){he(n,e.$hostElement$)}s=null;return null};var W=e("c",(function(){return s}));var F=function(e){var t=e.$cmpMeta$.$tagName$;var r=e.$hostElement$;var n=f("postUpdate",t);var a=e.$lazyInstance$;var i=e.$ancestorComponent$;if(!(e.$flags$&64)){e.$flags$|=64;{Q(r)}{J(a,"componentDidLoad")}n();{e.$onReadyResolve$(r);if(!i){D()}}}else{n()}{if(e.$onRenderResolve$){e.$onRenderResolve$();e.$onRenderResolve$=undefined}if(e.$flags$&512){je((function(){return B(e,false)}))}e.$flags$&=~(4|512)}};var G=e("f",(function(e){{var t=$e(e);var r=t.$hostElement$.isConnected;if(r&&(t.$flags$&(2|16))===2){B(t,false)}return r}}));var D=function(e){{Q(we.documentElement)}je((function(){return _(ge,"appload",{detail:{namespace:n}})}))};var J=function(e,t,r){if(e&&e[t]){try{return e[t](r)}catch(n){he(n)}}return undefined};var K=function(e,t){return e&&e.then?e.then(t):t()};var Q=function(e){return e.classList.add("hydrated")};var X=function(e,t){return $e(e).$instanceValues$.get(t)};var Y=function(e,t,r,n){var a=$e(e);var i=a.$hostElement$;var l=a.$instanceValues$.get(t);var s=a.$flags$;var o=a.$lazyInstance$;r=g(r,n.$members$[t][0]);var f=Number.isNaN(l)&&Number.isNaN(r);var u=r!==l&&!f;if((!(s&8)||l===undefined)&&u){a.$instanceValues$.set(t,r);if(o){if(n.$watchers$&&s&128){var $=n.$watchers$[t];if($){$.map((function(e){try{o[e](r,l,t)}catch(n){he(n,i)}}))}}if((s&(2|16))===2){B(a,false)}}}};var Z=function(e,t,r){if(t.$members$){if(e.watchers){t.$watchers$=e.watchers}var n=Object.entries(t.$members$);var a=e.prototype;n.map((function(e){var n=e[0],i=e[1][0];if(i&31||r&2&&i&32){Object.defineProperty(a,n,{get:function(){return X(this,n)},set:function(e){Y(this,n,e,t)},configurable:true,enumerable:true})}}));if(r&1){var i=new Map;a.attributeChangedCallback=function(e,t,r){var n=this;_e.jmp((function(){var t=i.get(e);if(n.hasOwnProperty(t)){r=n[t];delete n[t]}else if(a.hasOwnProperty(t)&&typeof n[t]==="number"&&n[t]==r){return}n[t]=r===null&&typeof n[t]==="boolean"?false:r}))};e.observedAttributes=n.filter((function(e){var t=e[0],r=e[1];return r[0]&15})).map((function(e){var t=e[0],r=e[1];var n=r[1]||t;i.set(n,t);return n}))}}return e};var ee=function(e,n,a,i,l){return __awaiter(r,void 0,void 0,(function(){var e,r,i,s,o,$,c;return __generator(this,(function(v){switch(v.label){case 0:if(!((n.$flags$&32)===0))return[3,5];n.$flags$|=32;l=me(a);if(!l.then)return[3,2];e=u();return[4,l];case 1:l=v.sent();e();v.label=2;case 2:if(!l.isProxied){{a.$watchers$=l.watchers}Z(l,a,2);l.isProxied=true}r=f("createInstance",a.$tagName$);{n.$flags$|=8}try{new l(n)}catch(d){he(d)}{n.$flags$&=~8}{n.$flags$|=128}r();te(n.$lazyInstance$);if(!l.style)return[3,5];i=l.style;s=x(a);if(!!ye.has(s))return[3,5];o=f("registerStyles",a.$tagName$);if(!(a.$flags$&8))return[3,4];return[4,t.import("./p-88092d06.system.js").then((function(e){return e.scopeCss(i,s,false)}))];case 3:i=v.sent();v.label=4;case 4:N(s,i,!!(a.$flags$&1));o();v.label=5;case 5:$=n.$ancestorComponent$;c=function(){return B(n,true)};if($&&$["s-rc"]){$["s-rc"].push(c)}else{c()}return[2]}}))}))};var te=function(e){{J(e,"connectedCallback")}};var re=function(e){if((_e.$flags$&1)===0){var t=$e(e);var r=t.$cmpMeta$;var n=f("connectedCallback",r.$tagName$);if(!(t.$flags$&1)){t.$flags$|=1;{var a=e;while(a=a.parentNode||a.host){if(a["s-p"]){q(t,t.$ancestorComponent$=a);break}}}if(r.$members$){Object.entries(r.$members$).map((function(t){var r=t[0],n=t[1][0];if(n&31&&e.hasOwnProperty(r)){var a=e[r];delete e[r];e[r]=a}}))}{ee(e,t,r)}}else{le(e,t,r.$listeners$);te(t.$lazyInstance$)}n()}};var ne=function(e){if((_e.$flags$&1)===0){var t=$e(e);var r=t.$lazyInstance$;{if(t.$rmListeners$){t.$rmListeners$.map((function(e){return e()}));t.$rmListeners$=undefined}}if(_e.$cssShim$){_e.$cssShim$.removeHost(e)}{J(r,"disconnectedCallback")}}};var ae=function(e,t){var r=function(e){__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}t.prototype.item=function(e){return this[e]};return t}(Array);if(t.$flags$&8){var n=e.__lookupGetter__("childNodes");Object.defineProperty(e,"children",{get:function(){return this.childNodes.map((function(e){return e.nodeType===1}))}});Object.defineProperty(e,"childElementCount",{get:function(){return e.children.length}});Object.defineProperty(e,"childNodes",{get:function(){var e=n.call(this);if((_e.$flags$&1)===0&&$e(this).$flags$&2){var t=new r;for(var a=0;a<e.length;a++){var i=e[a]["s-nr"];if(i){t.push(i)}}return t}return r.from(e)}})}};var ie=e("b",(function(e,t){if(t===void 0){t={}}var r=f();var n=[];var a=t.exclude||[];var i=ge.customElements;var l=we.head;var s=l.querySelector("meta[charset]");var o=we.createElement("style");var u=[];var c;var v=true;Object.assign(_e,t);_e.$resourcesUrl$=new URL(t.resourcesUrl||"./",we.baseURI).href;e.map((function(e){e[1].map((function(t){var r={$flags$:t[0],$tagName$:t[1],$members$:t[2],$listeners$:t[3]};{r.$members$=t[2]}{r.$listeners$=t[3]}{r.$watchers$={}}if(!Se&&r.$flags$&1){r.$flags$|=8}var l=r.$tagName$;var s=function(e){__extends(t,e);function t(t){var n=e.call(this,t)||this;t=n;ve(t,r);if(r.$flags$&1){if(Se){{t.attachShadow({mode:"open"})}}else if(!("shadowRoot"in t)){t.shadowRoot=t}}{ae(t,r)}return n}t.prototype.connectedCallback=function(){var e=this;if(c){clearTimeout(c);c=null}if(v){u.push(this)}else{_e.jmp((function(){return re(e)}))}};t.prototype.disconnectedCallback=function(){var e=this;_e.jmp((function(){return ne(e)}))};t.prototype.componentOnReady=function(){return $e(this).$onReadyPromise$};return t}(HTMLElement);r.$lazyBundleId$=e[0];if(!a.includes(l)&&!i.get(l)){n.push(l);i.define(l,Z(s,r,1))}}))}));{o.innerHTML=n+$;o.setAttribute("data-styles","");l.insertBefore(o,s?s.nextSibling:l.firstChild)}v=false;if(u.length){u.map((function(e){return e.connectedCallback()}))}else{{_e.jmp((function(){return c=setTimeout(D,30)}))}}r()}));var le=function(e,t,r,n){if(r){r.map((function(r){var n=r[0],a=r[1],i=r[2];var l=oe(e,n);var s=se(t,i);var o=fe(n);_e.ael(l,a,s,o);(t.$rmListeners$=t.$rmListeners$||[]).push((function(){return _e.rel(l,a,s,o)}))}))}};var se=function(e,t){return function(r){try{{if(e.$flags$&256){e.$lazyInstance$[t](r)}else{(e.$queuedListeners$=e.$queuedListeners$||[]).push([t,r])}}}catch(n){he(n)}}};var oe=function(e,t){if(t&8)return ge;return e};var fe=function(e){return(e&2)!==0};var ue=new WeakMap;var $e=function(e){return ue.get(e)};var ce=e("r",(function(e,t){return ue.set(t.$lazyInstance$=e,t)}));var ve=function(e,t){var r={$flags$:0,$hostElement$:e,$cmpMeta$:t,$instanceValues$:new Map};{r.$onReadyPromise$=new Promise((function(e){return r.$onReadyResolve$=e}));e["s-p"]=[];e["s-rc"]=[]}le(e,r,t.$listeners$);return ue.set(e,r)};var de=function(e,t){return t in e};var he=function(e,t){return(0,console.error)(e,t)};var pe=new Map;var me=function(e,r,n){var a=e.$tagName$.replace(/-/g,"_");var i=e.$lazyBundleId$;var l=pe.get(i);if(l){return l[a]}
|
|
2
|
+
/*!__STENCIL_STATIC_IMPORT_SWITCH__*/return t.import("./".concat(i,".entry.js").concat("")).then((function(e){{pe.set(i,e)}return e[a]}),he)};var ye=new Map;var ge=e("w",typeof window!=="undefined"?window:{});var be=e("C",ge.CSS);var we=e("d",ge.document||{head:{}});var _e=e("p",{$flags$:0,$resourcesUrl$:"",jmp:function(e){return e()},raf:function(e){return requestAnimationFrame(e)},ael:function(e,t,r,n){return e.addEventListener(t,r,n)},rel:function(e,t,r,n){return e.removeEventListener(t,r,n)},ce:function(e,t){return new CustomEvent(e,t)}});var Se=function(){return(we.head.attachShadow+"").indexOf("[native")>-1}();var Ne=e("a",(function(e){return Promise.resolve(e)}));var ke=function(){try{new CSSStyleSheet;return typeof(new CSSStyleSheet).replaceSync==="function"}catch(e){}return false}();var Re=[];var xe=[];var Ce=function(e,t){return function(r){e.push(r);if(!o){o=true;if(t&&_e.$flags$&4){je(Ee)}else{_e.raf(Ee)}}}};var Le=function(e){for(var t=0;t<e.length;t++){try{e[t](performance.now())}catch(r){he(r)}}e.length=0};var Ee=function(){Le(Re);{Le(xe);if(o=Re.length>0){_e.raf(Ee)}}};var je=function(e){return Ne().then(e)};var Pe=Ce(xe,true)}}}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
System.register([],(function(){"use strict";return{execute:function(){var t=function(){return(t=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var s in e=arguments[r])Object.prototype.hasOwnProperty.call(e,s)&&(t[s]=e[s]);return t}).apply(this,arguments)},e=function(){this.start=0,this.end=0,this.previous=null,this.parent=null,this.rules=null,this.parsedCssText="",this.cssText="",this.atRule=!1,this.type=0,this.keyframesName="",this.selector="",this.parsedSelector=""};function r(t){return o(s(t=n(t)),t)}function n(t){return t.replace(l.comments,"").replace(l.port,"")}function s(t){var r=new e;r.start=0,r.end=t.length;for(var n=r,s=0,o=t.length;s<o;s++)if(t[s]===u){n.rules||(n.rules=[]);var i=n,a=i.rules[i.rules.length-1]||null;(n=new e).start=s+1,n.parent=i,n.previous=a,i.rules.push(n)}else t[s]===c&&(n.end=s+1,n=n.parent||r);return r}function o(t,e){var r=e.substring(t.start,t.end-1);if(t.parsedCssText=t.cssText=r.trim(),t.parent){var n=t.previous?t.previous.end:t.parent.start;r=(r=(r=i(r=e.substring(n,t.start-1))).replace(l.multipleSpaces," ")).substring(r.lastIndexOf(";")+1);var s=t.parsedSelector=t.selector=r.trim();t.atRule=0===s.indexOf(h),t.atRule?0===s.indexOf(f)?t.type=a.MEDIA_RULE:s.match(l.keyframesRule)&&(t.type=a.KEYFRAMES_RULE,t.keyframesName=t.selector.split(l.multipleSpaces).pop()):0===s.indexOf(p)?t.type=a.MIXIN_RULE:t.type=a.STYLE_RULE}var u=t.rules;if(u)for(var c=0,v=u.length,m=void 0;c<v&&(m=u[c]);c++)o(m,e);return t}function i(t){return t.replace(/\\([0-9a-f]{1,6})\s/gi,(function(){for(var t=arguments[1],e=6-t.length;e--;)t="0"+t;return"\\"+t}))}var a={STYLE_RULE:1,KEYFRAMES_RULE:7,MEDIA_RULE:4,MIXIN_RULE:1e3},u="{",c="}",l={comments:/\/\*[^*]*\*+([^/*][^*]*\*+)*\//gim,port:/@import[^;]*;/gim,customProp:/(?:^[^;\-\s}]+)?--[^;{}]*?:[^{};]*?(?:[;\n]|$)/gim,mixinProp:/(?:^[^;\-\s}]+)?--[^;{}]*?:[^{};]*?{[^}]*?}(?:[;\n]|$)?/gim,mixinApply:/@apply\s*\(?[^);]*\)?\s*(?:[;\n]|$)?/gim,varApply:/[^;:]*?:[^;]*?var\([^;]*\)(?:[;\n]|$)?/gim,keyframesRule:/^@[^\s]*keyframes/,multipleSpaces:/\s+/g},p="--",f="@media",h="@",v=/\bvar\(/,m=/\B--[\w-]+\s*:/,d=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//gim,g=/^[\t ]+\n/gm;function y(t,e,r){t.lastIndex=0;var n=e.substring(r).match(t);if(n){var s=r+n.index;return{start:s,end:s+n[0].length}}return null}function S(t,e,r){return t[e]?t[e]:r?M(r,t):""}function b(t,e){for(var r=0,n=e;n<t.length;n++){var s=t[n];if("("===s)r++;else if(")"===s&&--r<=0)return n+1}return n}function E(t,e){var r=y(v,t,e);if(!r)return null;var n=b(t,r.start),s=t.substring(r.end,n-1).split(","),o=s[0],i=s.slice(1);return{start:r.start,end:n,propName:o.trim(),fallback:i.length>0?i.join(",").trim():void 0}}function x(t,e,r){var n=E(t,r);if(!n)return e.push(t.substring(r,t.length)),t.length;var s=n.propName,o=null!=n.fallback?I(n.fallback):void 0;return e.push(t.substring(r,n.start),(function(t){return S(t,s,o)})),n.end}function M(t,e){for(var r="",n=0;n<t.length;n++){var s=t[n];r+="string"==typeof s?s:s(e)}return r}function w(t,e){for(var r=!1,n=!1,s=e;s<t.length;s++){var o=t[s];if(r)n&&'"'===o&&(r=!1),n||"'"!==o||(r=!1);else if('"'===o)r=!0,n=!0;else if("'"===o)r=!0,n=!1;else{if(";"===o)return s+1;if("}"===o)return s}}return s}function C(t){for(var e="",r=0;;){var n=y(m,t,r),s=n?n.start:t.length;if(e+=t.substring(r,s),!n)break;r=w(t,s)}return e}function I(t){var e=0;t=C(t=t.replace(d,"")).replace(g,"");for(var r=[];e<t.length;)e=x(t,r,e);return r}function R(t){var e={};t.forEach((function(t){t.declarations.forEach((function(t){e[t.prop]=t.value}))}));for(var r={},n=Object.entries(e),s=function(t){var e=!1;if(n.forEach((function(t){var n=t[0],s=M(t[1],r);s!==r[n]&&(r[n]=s,e=!0)})),!e)return"break"},o=0;o<10;o++){if("break"===s())break}return r}function k(t,e){if(void 0===e&&(e=0),!t.rules)return[];var r=[];return t.rules.filter((function(t){return t.type===a.STYLE_RULE})).forEach((function(t){var n=O(t.cssText);n.length>0&&t.parsedSelector.split(",").forEach((function(t){t=t.trim(),r.push({selector:t,declarations:n,specificity:A(),nu:e})})),e++})),r}function A(t){return 1}var L="!important",_=/(?:^|[;\s{]\s*)(--[\w-]*?)\s*:\s*(?:((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};{])+)|\{([^}]*)\}(?:(?=[;\s}])|$))/gm;function O(t){for(var e,r=[];e=_.exec(t.trim());){var n=T(e[2]),s=n.value,o=n.important;r.push({prop:e[1].trim(),value:I(s),important:o})}return r}function T(t){var e=(t=t.replace(/\s+/gim," ").trim()).endsWith(L);return e&&(t=t.slice(0,t.length-L.length).trim()),{value:t,important:e}}function U(t,e,r){var n=[],s=N(e,t);return r.forEach((function(t){return n.push(t)})),s.forEach((function(t){return n.push(t)})),$(P(n).filter((function(e){return G(t,e.selector)})))}function N(t,e){for(var r=[];e;){var n=t.get(e);n&&r.push(n),e=e.parentElement}return r}function P(t){var e=[];return t.forEach((function(t){e.push.apply(e,t.selectors)})),e}function $(t){return t.sort((function(t,e){return t.specificity===e.specificity?t.nu-e.nu:t.specificity-e.specificity})),t}function G(t,e){return":root"===e||"html"===e||t.matches(e)}function H(t){var e=r(t),n=I(t);return{original:t,template:n,selectors:k(e),usesCssVars:n.length>1}}function V(t,e){if(t.some((function(t){return t.styleEl===e})))return!1;var r=H(e.textContent);return r.styleEl=e,t.push(r),!0}function Y(t){var e=R(P(t));t.forEach((function(t){t.usesCssVars&&(t.styleEl.textContent=M(t.template,e))}))}function j(e,r){var n=e.template.map((function(t){return"string"==typeof t?q(t,e.scopeId,r):t})),s=e.selectors.map((function(n){return t(t({},n),{selector:q(n.selector,e.scopeId,r)})}));return t(t({},e),{template:n,selectors:s,scopeId:r})}function q(t,e,r){return t=F(t,"\\.".concat(e),".".concat(r))}function F(t,e,r){return t.replace(new RegExp(e,"g"),r)}function B(t,e){return K(t,e),D(t,e).then((function(){Y(e)}))}function W(t,e){"undefined"!=typeof MutationObserver&&new MutationObserver((function(){K(t,e)&&Y(e)})).observe(document.head,{childList:!0})}function D(t,e){for(var r=[],n=t.querySelectorAll('link[rel="stylesheet"][href]:not([data-no-shim])'),s=0;s<n.length;s++)r.push(X(t,e,n[s]));return Promise.all(r)}function K(t,e){return Array.from(t.querySelectorAll("style:not([data-styles]):not([data-no-shim])")).map((function(t){return V(e,t)})).some(Boolean)}function X(t,e,r){var n=r.href;return fetch(n).then((function(t){return t.text()})).then((function(s){if(Z(s)&&r.parentNode){Q(s)&&(s=tt(s,n));var o=t.createElement("style");o.setAttribute("data-styles",""),o.textContent=s,V(e,o),r.parentNode.insertBefore(o,r),r.remove()}})).catch((function(t){console.error(t)}))}var z=/[\s;{]--[-a-zA-Z0-9]+\s*:/m;function Z(t){return t.indexOf("var(")>-1||z.test(t)}var J=/url[\s]*\([\s]*['"]?(?!(?:https?|data)\:|\/)([^\'\"\)]*)[\s]*['"]?\)[\s]*/gim;function Q(t){return J.lastIndex=0,J.test(t)}function tt(t,e){var r=e.replace(/[^/]*$/,"");return t.replace(J,(function(t,e){var n=r+e;return t.replace(e,n)}))}var et=function(){function t(t,e){this.win=t,this.doc=e,this.count=0,this.hostStyleMap=new WeakMap,this.hostScopeMap=new WeakMap,this.globalScopes=[],this.scopesMap=new Map,this.didInit=!1}return t.prototype.i=function(){var t=this;return this.didInit||!this.win.requestAnimationFrame?Promise.resolve():(this.didInit=!0,new Promise((function(e){t.win.requestAnimationFrame((function(){W(t.doc,t.globalScopes),B(t.doc,t.globalScopes).then((function(){return e()}))}))})))},t.prototype.addLink=function(t){var e=this;return X(this.doc,this.globalScopes,t).then((function(){e.updateGlobal()}))},t.prototype.addGlobalStyle=function(t){V(this.globalScopes,t)&&this.updateGlobal()},t.prototype.createHostStyle=function(t,e,r,n){if(this.hostScopeMap.has(t))throw new Error("host style already created");var s=this.registerHostTemplate(r,e,n),o=this.doc.createElement("style");return o.setAttribute("data-no-shim",""),s.usesCssVars?n?(o["s-sc"]=e="".concat(s.scopeId,"-").concat(this.count),o.textContent="/*needs update*/",this.hostStyleMap.set(t,o),this.hostScopeMap.set(t,j(s,e)),this.count++):(s.styleEl=o,s.usesCssVars||(o.textContent=M(s.template,{})),this.globalScopes.push(s),this.updateGlobal(),this.hostScopeMap.set(t,s)):o.textContent=r,o},t.prototype.removeHost=function(t){var e=this.hostStyleMap.get(t);e&&e.remove(),this.hostStyleMap.delete(t),this.hostScopeMap.delete(t)},t.prototype.updateHost=function(t){var e=this.hostScopeMap.get(t);if(e&&e.usesCssVars&&e.isScoped){var r=this.hostStyleMap.get(t);if(r){var n=R(U(t,this.hostScopeMap,this.globalScopes));r.textContent=M(e.template,n)}}},t.prototype.updateGlobal=function(){Y(this.globalScopes)},t.prototype.registerHostTemplate=function(t,e,r){var n=this.scopesMap.get(e);return n||((n=H(t)).scopeId=e,n.isScoped=r,this.scopesMap.set(e,n)),n},t}();!function(t){!t||t.__cssshim||t.CSS&&t.CSS.supports&&t.CSS.supports("color","var(--c)")||(t.__cssshim=new et(t,t.document))}("undefined"!=typeof window&&window)}}}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
System.register(["./p-dd8d9020.system.js","./p-f7cc8285.system.js","./p-a99db140.system.js"],(function(e){"use strict";var r,t,i,n,c,a,o,s,l,d,u,f,p;return{setters:[function(e){r=e.r;t=e.e;i=e.h;n=e.H},function(e){c=e.s;a=e.o;o=e.r},function(e){s=e.d;l=e.f;d=e.l;u=e.a;f=e.b;p=e.c}],execute:function(){var m='.trek-card-container,.trek-card-large-view-container{font-family:"Roboto";border-radius:8px;-webkit-box-shadow:4px 8px 24px rgba(0, 0, 0, 0.25);box-shadow:4px 8px 24px rgba(0, 0, 0, 0.25);cursor:pointer}.trek-card-container .image,.trek-card-large-view-container .image{-o-object-fit:cover;object-fit:cover}.trek-card-container .sub-container,.trek-card-large-view-container .sub-container{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center;padding:12px}.trek-card-container .sub-container .name,.trek-card-large-view-container .sub-container .name{color:var(--color-primary);font-size:24px;font-weight:bold;margin-bottom:8px}.trek-card-container .sub-container .departure,.trek-card-large-view-container .sub-container .departure{color:rgba(0, 0, 0, 0.7);font-size:16px;margin:4px 0px}.trek-card-container .sub-container .themes-container,.trek-card-large-view-container .sub-container .themes-container{display:-ms-flexbox;display:flex;-ms-flex-pack:start;justify-content:flex-start;-ms-flex-align:center;align-items:center;-ms-flex-wrap:wrap;flex-wrap:wrap}.trek-card-container .sub-container .themes-container .theme,.trek-card-large-view-container .sub-container .themes-container .theme{background-color:var(--color-primary-tint);color:#ffffff;border-radius:8px;padding:8px;margin:0px 8px 8px 0px}.trek-card-container .sub-container .icons-labels-container,.trek-card-large-view-container .sub-container .icons-labels-container{display:-ms-flexbox;display:flex;-ms-flex-pack:start;justify-content:flex-start;-ms-flex-align:center;align-items:center;-ms-flex-wrap:wrap;flex-wrap:wrap}.trek-card-container .sub-container .icons-labels-container .row,.trek-card-large-view-container .sub-container .icons-labels-container .row{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-align:center;align-items:center;width:100%}.trek-card-container .sub-container .icons-labels-container .row:not(:last-child),.trek-card-large-view-container .sub-container .icons-labels-container .row:not(:last-child){margin-bottom:12px}.trek-card-container .sub-container .icons-labels-container .row .icon-label,.trek-card-large-view-container .sub-container .icons-labels-container .row .icon-label{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;width:50%}.trek-card-container .sub-container .icons-labels-container .row .icon-label:nth-child(2),.trek-card-large-view-container .sub-container .icons-labels-container .row .icon-label:nth-child(2){margin:0px 4px}.trek-card-container .sub-container .icons-labels-container .row .icon-label img,.trek-card-container .sub-container .icons-labels-container .row .icon-label .svg-icon svg,.trek-card-large-view-container .sub-container .icons-labels-container .row .icon-label img,.trek-card-large-view-container .sub-container .icons-labels-container .row .icon-label .svg-icon svg{width:24px;height:auto;margin-right:8px}.trek-card-container .sub-container .icons-labels-container .row .practice img,.trek-card-large-view-container .sub-container .icons-labels-container .row .practice img{background-color:var(--color-primary)}.trek-card-container{width:350px;height:auto}.trek-card-container .image{width:100%}.trek-card-large-view-container{height:auto;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row}.trek-card-large-view-container .image{width:250px}';var h=e("grw_trek_card",function(){function e(e){r(this,e);this.trekCardPress=t(this,"trekCardPress",7);this.colorPrimary="#6b0030";this.colorPrimaryTint="#974c6e";this.isLargeView=false;this.resetStoreOnDisconnected=true}e.prototype.connectedCallback=function(){var e=this;this.currentTrek=this.trek?this.trek:c.currentTrek;if(this.currentTrek){this.difficulty=c.difficulties.find((function(r){return r.id===e.currentTrek.difficulty}));this.route=c.routes.find((function(r){return r.id===e.currentTrek.route}));this.practice=c.practices.find((function(r){return r.id===e.currentTrek.practice}));this.themes=c.themes.filter((function(r){return e.currentTrek.themes.includes(r.id)}));this.departureCity=c.cities.find((function(r){return r.id===e.currentTrek.departure_city}))}a("currentTrek",(function(){e.currentTrek=e.trek?e.trek:c.currentTrek;if(e.currentTrek){e.difficulty=c.difficulties.find((function(r){return r.id===e.currentTrek.difficulty}));e.route=c.routes.find((function(r){return r.id===e.currentTrek.route}));e.practice=c.practices.find((function(r){return r.id===e.currentTrek.practice}));e.themes=c.themes.filter((function(r){return e.currentTrek.themes.includes(r.id)}));e.departureCity=c.cities.find((function(r){return r.id===e.currentTrek.departure_city}))}}))};e.prototype.disconnectedCallback=function(){if(this.resetStoreOnDisconnected){o()}};e.prototype.render=function(){var e=this;var r,t,c,a,o,m,h;return i(n,{onClick:function(){return e.trekCardPress.emit(e.currentTrek.id)},style:{width:this.isLargeView?"100%":"auto","--color-primary":this.colorPrimary,"--color-primary-tint":this.colorPrimaryTint}},this.currentTrek&&i("div",{class:this.isLargeView?"trek-card-large-view-container":"trek-card-container"},this.currentTrek.attachments&&this.currentTrek.attachments[0]&&this.currentTrek.attachments[0].thumbnail&&i("img",{class:"image",src:"".concat(this.currentTrek.attachments[0].thumbnail),loading:"lazy"}),i("div",{class:"sub-container"},this.departureCity&&i("div",{class:"departure"},this.departureCity.name),i("div",{class:"name"},(r=this.currentTrek)===null||r===void 0?void 0:r.name),i("div",{class:"themes-container"},this.themes.map((function(e){return i("div",{class:"theme"},e.label)}))),i("div",{class:"icons-labels-container"},i("div",{class:"row"},i("div",{class:"icon-label difficulty"},((t=this.difficulty)===null||t===void 0?void 0:t.pictogram)&&i("img",{src:this.difficulty.pictogram}),(c=this.difficulty)===null||c===void 0?void 0:c.label),i("div",{class:"icon-label duration"},i("div",{class:"svg-icon",innerHTML:s}),l(this.currentTrek.duration))),i("div",{class:"row"},i("div",{class:"icon-label length"},i("div",{class:"svg-icon",innerHTML:d}),u(this.currentTrek.length_2d)),i("div",{class:"icon-label ascent"},i("div",{class:"svg-icon",innerHTML:f}),p(this.currentTrek.ascent))),i("div",{class:"row"},i("div",{class:"icon-label route"},((a=this.route)===null||a===void 0?void 0:a.pictogram)&&i("img",{src:this.route.pictogram}),(o=this.route)===null||o===void 0?void 0:o.route),i("div",{class:"icon-label practice"},((m=this.practice)===null||m===void 0?void 0:m.pictogram)&&i("img",{src:this.practice.pictogram}),(h=this.practice)===null||h===void 0?void 0:h.name))))))};return e}());h.style=m}}}));
|
|
File without changes
|
|
@@ -1 +1 @@
|
|
|
1
|
-
System.register(["./p-
|
|
1
|
+
System.register(["./p-dd8d9020.system.js"],(function(e){"use strict";var n,r;return{setters:[function(e){n=e.c;r=e.f}],execute:function(){var t=function(e,n,r){var t=e.get(n);if(!t){e.set(n,[r])}else if(!t.includes(r)){t.push(r)}};var u=function(e,n){var r;return function(){var t=[];for(var u=0;u<arguments.length;u++){t[u]=arguments[u]}if(r){clearTimeout(r)}r=setTimeout((function(){r=0;e.apply(void 0,t)}),n)}};var i=function(e){return!("isConnected"in e)||e.isConnected};var o=u((function(e){for(var n=0,r=e.keys();n<r.length;n++){var t=r[n];e.set(t,e.get(t).filter(i))}}),2e3);var s=function(){if(typeof n!=="function"){return{}}var e=new Map;return{dispose:function(){return e.clear()},get:function(r){var u=n();if(u){t(e,r,u)}},set:function(n){var t=e.get(n);if(t){e.set(n,t.filter(r))}o(e)},reset:function(){e.forEach((function(e){return e.forEach(r)}));o(e)}}};var f=function(e){return typeof e==="function"?e():e};var c=function(e,n){if(n===void 0){n=function(e,n){return e!==n}}var r=f(e);var t=new Map(Object.entries(r!==null&&r!==void 0?r:{}));var u={dispose:[],get:[],set:[],reset:[]};var i=function(){var n;t=new Map(Object.entries((n=f(e))!==null&&n!==void 0?n:{}));u.reset.forEach((function(e){return e()}))};var o=function(){u.dispose.forEach((function(e){return e()}));i()};var s=function(e){u.get.forEach((function(n){return n(e)}));return t.get(e)};var c=function(e,r){var i=t.get(e);if(n(r,i,e)){t.set(e,r);u.set.forEach((function(n){return n(e,r,i)}))}};var l=typeof Proxy==="undefined"?{}:new Proxy(r,{get:function(e,n){return s(n)},ownKeys:function(e){return Array.from(t.keys())},getOwnPropertyDescriptor:function(){return{enumerable:true,configurable:true}},has:function(e,n){return t.has(n)},set:function(e,n,r){c(n,r);return true}});var v=function(e,n){u[e].push(n);return function(){a(u[e],n)}};var p=function(n,r){var t=v("set",(function(e,t){if(e===n){r(t)}}));var u=v("reset",(function(){return r(f(e)[n])}));return function(){t();u()}};var d=function(){var e=[];for(var n=0;n<arguments.length;n++){e[n]=arguments[n]}var r=e.reduce((function(e,n){if(n.set){e.push(v("set",n.set))}if(n.get){e.push(v("get",n.get))}if(n.reset){e.push(v("reset",n.reset))}if(n.dispose){e.push(v("dispose",n.dispose))}return e}),[]);return function(){return r.forEach((function(e){return e()}))}};var h=function(e){var n=t.get(e);u.set.forEach((function(r){return r(e,n,n)}))};return{state:l,get:s,set:c,on:v,onChange:p,use:d,dispose:o,reset:i,forceUpdate:h}};var a=function(e,n){var r=e.indexOf(n);if(r>=0){e[r]=e[e.length-1];e.length--}};var l=function(e,n){var r=c(e,n);r.use(s());return r};var v=l({api:"",treks:null,currentTreks:null,treksWithinBounds:null,currentMapTreksBounds:null,difficulties:[],routes:[],practices:[],themes:[],cities:[],durations:[],currentSensitiveAreas:null,labels:null,sources:null,accessibilities:null,accessibilitiesLevel:null,poiTypes:null,currentTrek:null,currentPois:null,currentInformationDesks:null,treksNetworkError:false,trekNetworkError:false}),p=v.state,d=v.onChange,h=v.reset;e({s:p,o:d,r:h})}}}));
|
|
@@ -15,6 +15,7 @@ export declare class GrwMap {
|
|
|
15
15
|
colorArrivalIcon: string;
|
|
16
16
|
colorSensitiveArea: string;
|
|
17
17
|
colorPoiIcon: string;
|
|
18
|
+
resetStoreOnDisconnected: boolean;
|
|
18
19
|
map: L.Map;
|
|
19
20
|
sensitiveAreasControl: any;
|
|
20
21
|
treksLayer: L.GeoJSON<any>;
|
|
@@ -26,11 +27,12 @@ export declare class GrwMap {
|
|
|
26
27
|
currentInformationDesksLayer: L.GeoJSON<any>;
|
|
27
28
|
currentPointsReferenceLayer: L.GeoJSON<any>;
|
|
28
29
|
handleTreksWithinBoundsBind: (event: any) => void;
|
|
29
|
-
|
|
30
|
+
componentDidLoad(): void;
|
|
30
31
|
addTreks(): void;
|
|
31
32
|
removeTreks(): void;
|
|
32
33
|
handleTreksWithinBounds(): void;
|
|
33
34
|
addTrek(): void;
|
|
34
35
|
removeTrek(): void;
|
|
36
|
+
disconnectedCallback(): void;
|
|
35
37
|
render(): any;
|
|
36
38
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { EventEmitter } from '../../stencil-public-runtime';
|
|
2
|
-
import { Difficulty, Practice, Route, Themes, Trek } from 'types/types';
|
|
2
|
+
import { City, Difficulty, Practice, Route, Themes, Trek } from 'types/types';
|
|
3
3
|
export declare class GrwTrekCard {
|
|
4
4
|
trekCardPress: EventEmitter<number>;
|
|
5
5
|
currentTrek: Trek;
|
|
@@ -7,10 +7,13 @@ export declare class GrwTrekCard {
|
|
|
7
7
|
route: Route;
|
|
8
8
|
practice: Practice;
|
|
9
9
|
themes: Themes;
|
|
10
|
+
departureCity: City;
|
|
10
11
|
trek: Trek;
|
|
11
12
|
colorPrimary: string;
|
|
12
13
|
colorPrimaryTint: string;
|
|
13
14
|
isLargeView: boolean;
|
|
15
|
+
resetStoreOnDisconnected: boolean;
|
|
14
16
|
connectedCallback(): void;
|
|
17
|
+
disconnectedCallback(): void;
|
|
15
18
|
render(): any;
|
|
16
19
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Accessibilities, AccessibilityLevel, Difficulty, Labels, Practice, Route, Sources, Themes, Trek } from 'types/types';
|
|
2
2
|
export declare class GrwTrekDetail {
|
|
3
|
+
currentTrek: Trek;
|
|
3
4
|
difficulty: Difficulty;
|
|
4
5
|
route: Route;
|
|
5
6
|
practice: Practice;
|
|
@@ -12,7 +13,8 @@ export declare class GrwTrekDetail {
|
|
|
12
13
|
colorPrimary: string;
|
|
13
14
|
colorPrimaryShade: string;
|
|
14
15
|
colorPrimaryTint: string;
|
|
15
|
-
|
|
16
|
+
resetStoreOnDisconnected: boolean;
|
|
16
17
|
connectedCallback(): void;
|
|
18
|
+
disconnectedCallback(): void;
|
|
17
19
|
render(): any;
|
|
18
20
|
}
|
|
@@ -49,6 +49,7 @@ export namespace Components {
|
|
|
49
49
|
"colorPrimaryTint": string;
|
|
50
50
|
"colorSensitiveArea": string;
|
|
51
51
|
"colorTrekLine": string;
|
|
52
|
+
"resetStoreOnDisconnected": boolean;
|
|
52
53
|
"urlLayer": string;
|
|
53
54
|
"zoom": number;
|
|
54
55
|
}
|
|
@@ -62,12 +63,14 @@ export namespace Components {
|
|
|
62
63
|
"colorPrimary": string;
|
|
63
64
|
"colorPrimaryTint": string;
|
|
64
65
|
"isLargeView": boolean;
|
|
66
|
+
"resetStoreOnDisconnected": boolean;
|
|
65
67
|
"trek": Trek;
|
|
66
68
|
}
|
|
67
69
|
interface GrwTrekDetail {
|
|
68
70
|
"colorPrimary": string;
|
|
69
71
|
"colorPrimaryShade": string;
|
|
70
72
|
"colorPrimaryTint": string;
|
|
73
|
+
"resetStoreOnDisconnected": boolean;
|
|
71
74
|
"trek": Trek;
|
|
72
75
|
}
|
|
73
76
|
interface GrwTrekProvider {
|
|
@@ -79,6 +82,7 @@ export namespace Components {
|
|
|
79
82
|
"colorPrimary": string;
|
|
80
83
|
"colorPrimaryTint": string;
|
|
81
84
|
"isLargeView": boolean;
|
|
85
|
+
"resetStoreOnDisconnected": boolean;
|
|
82
86
|
}
|
|
83
87
|
interface GrwTreksProvider {
|
|
84
88
|
"api": string;
|
|
@@ -226,6 +230,7 @@ declare namespace LocalJSX {
|
|
|
226
230
|
"colorSensitiveArea"?: string;
|
|
227
231
|
"colorTrekLine"?: string;
|
|
228
232
|
"onTrekCardPress"?: (event: GrwMapCustomEvent<number>) => void;
|
|
233
|
+
"resetStoreOnDisconnected"?: boolean;
|
|
229
234
|
"urlLayer"?: string;
|
|
230
235
|
"zoom"?: number;
|
|
231
236
|
}
|
|
@@ -240,12 +245,14 @@ declare namespace LocalJSX {
|
|
|
240
245
|
"colorPrimaryTint"?: string;
|
|
241
246
|
"isLargeView"?: boolean;
|
|
242
247
|
"onTrekCardPress"?: (event: GrwTrekCardCustomEvent<number>) => void;
|
|
248
|
+
"resetStoreOnDisconnected"?: boolean;
|
|
243
249
|
"trek"?: Trek;
|
|
244
250
|
}
|
|
245
251
|
interface GrwTrekDetail {
|
|
246
252
|
"colorPrimary"?: string;
|
|
247
253
|
"colorPrimaryShade"?: string;
|
|
248
254
|
"colorPrimaryTint"?: string;
|
|
255
|
+
"resetStoreOnDisconnected"?: boolean;
|
|
249
256
|
"trek"?: Trek;
|
|
250
257
|
}
|
|
251
258
|
interface GrwTrekProvider {
|
|
@@ -257,6 +264,7 @@ declare namespace LocalJSX {
|
|
|
257
264
|
"colorPrimary"?: string;
|
|
258
265
|
"colorPrimaryTint"?: string;
|
|
259
266
|
"isLargeView"?: boolean;
|
|
267
|
+
"resetStoreOnDisconnected"?: boolean;
|
|
260
268
|
}
|
|
261
269
|
interface GrwTreksProvider {
|
|
262
270
|
"api"?: string;
|
|
@@ -221,7 +221,8 @@ export declare type ErrorHandler = (err: any, element?: HTMLElement) => void;
|
|
|
221
221
|
*/
|
|
222
222
|
export declare const setMode: (handler: ResolutionHandler) => void;
|
|
223
223
|
/**
|
|
224
|
-
* getMode
|
|
224
|
+
* `getMode()` is used for libraries which provide multiple "modes" for styles.
|
|
225
|
+
* @param ref a reference to the node to get styles for
|
|
225
226
|
*/
|
|
226
227
|
export declare function getMode<T = string | undefined>(ref: any): T;
|
|
227
228
|
export declare function setPlatformHelpers(helpers: {
|
|
@@ -234,6 +235,8 @@ export declare function setPlatformHelpers(helpers: {
|
|
|
234
235
|
/**
|
|
235
236
|
* Get the base path to where the assets can be found. Use `setAssetPath(path)`
|
|
236
237
|
* if the path needs to be customized.
|
|
238
|
+
* @param path the path to use in calculating the asset path. this value will be
|
|
239
|
+
* used in conjunction with the base asset path
|
|
237
240
|
*/
|
|
238
241
|
export declare function getAssetPath(path: string): string;
|
|
239
242
|
/**
|
|
@@ -246,18 +249,22 @@ export declare function getAssetPath(path: string): string;
|
|
|
246
249
|
* `setAssetPath(document.currentScript.src)`, or using a bundler's replace plugin to
|
|
247
250
|
* dynamically set the path at build time, such as `setAssetPath(process.env.ASSET_PATH)`.
|
|
248
251
|
* But do note that this configuration depends on how your script is bundled, or lack of
|
|
249
|
-
*
|
|
252
|
+
* bundling, and where your assets can be loaded from. Additionally custom bundling
|
|
250
253
|
* will have to ensure the static assets are copied to its build directory.
|
|
254
|
+
* @param path the asset path to set
|
|
251
255
|
*/
|
|
252
256
|
export declare function setAssetPath(path: string): string;
|
|
253
257
|
/**
|
|
254
|
-
*
|
|
258
|
+
* Retrieve a Stencil element for a given reference
|
|
259
|
+
* @param ref the ref to get the Stencil element for
|
|
255
260
|
*/
|
|
256
261
|
export declare function getElement(ref: any): HTMLStencilElement;
|
|
257
262
|
/**
|
|
258
263
|
* Schedules a new render of the given instance or element even if no state changed.
|
|
259
264
|
*
|
|
260
|
-
* Notice `forceUpdate()` is not
|
|
265
|
+
* Notice `forceUpdate()` is not synchronous and might perform the DOM render in the next frame.
|
|
266
|
+
*
|
|
267
|
+
* @param ref the node/element to force the re-render of
|
|
261
268
|
*/
|
|
262
269
|
export declare function forceUpdate(ref: any): void;
|
|
263
270
|
/**
|
|
@@ -272,6 +279,8 @@ export interface HTMLStencilElement extends HTMLElement {
|
|
|
272
279
|
* in the best moment to perform DOM mutation without causing layout thrashing.
|
|
273
280
|
*
|
|
274
281
|
* For further information: https://developers.google.com/web/fundamentals/performance/rendering/avoid-large-complex-layouts-and-layout-thrashing
|
|
282
|
+
*
|
|
283
|
+
* @param task the DOM-write to schedule
|
|
275
284
|
*/
|
|
276
285
|
export declare function writeTask(task: RafCallback): void;
|
|
277
286
|
/**
|
|
@@ -279,6 +288,8 @@ export declare function writeTask(task: RafCallback): void;
|
|
|
279
288
|
* in the best moment to perform DOM reads without causing layout thrashing.
|
|
280
289
|
*
|
|
281
290
|
* For further information: https://developers.google.com/web/fundamentals/performance/rendering/avoid-large-complex-layouts-and-layout-thrashing
|
|
291
|
+
*
|
|
292
|
+
* @param task the DOM-read to schedule
|
|
282
293
|
*/
|
|
283
294
|
export declare function readTask(task: RafCallback): void;
|
|
284
295
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { LatLngBounds } from 'leaflet';
|
|
2
|
-
import { Accessibilities, accessibilitiesLevel, Difficulties, Durations, InformationDesks, Labels, Pois, PoiTypes, Practices, Routes, SensitiveAreas, Sources, Themes, Trek, Treks } from 'types/types';
|
|
2
|
+
import { Accessibilities, accessibilitiesLevel, Difficulties, Durations, InformationDesks, Labels, Pois, PoiTypes, Practices, Routes, SensitiveAreas, Sources, Themes, Cities, Trek, Treks } from 'types/types';
|
|
3
3
|
declare const state: {
|
|
4
4
|
api: string;
|
|
5
5
|
treks: Treks;
|
|
@@ -10,6 +10,7 @@ declare const state: {
|
|
|
10
10
|
routes: Routes;
|
|
11
11
|
practices: Practices;
|
|
12
12
|
themes: Themes;
|
|
13
|
+
cities: Cities;
|
|
13
14
|
durations: Durations;
|
|
14
15
|
labels: Labels;
|
|
15
16
|
sources: Sources;
|
|
@@ -32,6 +33,7 @@ declare const state: {
|
|
|
32
33
|
routes: Routes;
|
|
33
34
|
practices: Practices;
|
|
34
35
|
themes: Themes;
|
|
36
|
+
cities: Cities;
|
|
35
37
|
durations: Durations;
|
|
36
38
|
labels: Labels;
|
|
37
39
|
sources: Sources;
|
|
@@ -44,6 +46,6 @@ declare const state: {
|
|
|
44
46
|
currentInformationDesks: InformationDesks;
|
|
45
47
|
treksNetworkError: boolean;
|
|
46
48
|
trekNetworkError: boolean;
|
|
47
|
-
}
|
|
48
|
-
export { onChange };
|
|
49
|
+
}>, reset: () => void;
|
|
50
|
+
export { onChange, reset };
|
|
49
51
|
export default state;
|
|
@@ -14,6 +14,7 @@ export declare type Trek = {
|
|
|
14
14
|
length_2d: number;
|
|
15
15
|
ascent: number;
|
|
16
16
|
departure: string;
|
|
17
|
+
departure_city: string;
|
|
17
18
|
arrival?: string;
|
|
18
19
|
altimetric_profile?: string;
|
|
19
20
|
geometry?: LineString;
|
|
@@ -78,6 +79,11 @@ export declare type Theme = {
|
|
|
78
79
|
label: string;
|
|
79
80
|
pictogram: string;
|
|
80
81
|
};
|
|
82
|
+
export declare type Cities = City[];
|
|
83
|
+
export declare type City = {
|
|
84
|
+
id: string;
|
|
85
|
+
name: string;
|
|
86
|
+
};
|
|
81
87
|
export declare type Labels = Label[];
|
|
82
88
|
export declare type Label = {
|
|
83
89
|
id: number;
|
package/loader/package.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@geotrekce/geotrek-rando-widget",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.15",
|
|
4
4
|
"description": "Geotrek Rando Widget",
|
|
5
5
|
"main": "dist/index.cjs.js",
|
|
6
6
|
"module": "dist/index.js",
|
|
@@ -27,23 +27,23 @@
|
|
|
27
27
|
"prepare": "npm run build"
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@stencil/core": "^2.
|
|
31
|
-
"leaflet": "^1.
|
|
30
|
+
"@stencil/core": "^2.18.1",
|
|
31
|
+
"leaflet": "^1.9.2"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
|
-
"@babel/core": "^7.
|
|
35
|
-
"@stencil/sass": "^
|
|
36
|
-
"@stencil/store": "^2.0.
|
|
37
|
-
"@storybook/addon-controls": "^6.5.
|
|
38
|
-
"@storybook/addon-docs": "^6.5.
|
|
39
|
-
"@storybook/builder-webpack4": "^6.5.
|
|
40
|
-
"@storybook/html": "^6.5.
|
|
41
|
-
"@storybook/manager-webpack4": "^6.5.
|
|
34
|
+
"@babel/core": "^7.19.3",
|
|
35
|
+
"@stencil/sass": "^2.0.0",
|
|
36
|
+
"@stencil/store": "^2.0.1",
|
|
37
|
+
"@storybook/addon-controls": "^6.5.12",
|
|
38
|
+
"@storybook/addon-docs": "^6.5.12",
|
|
39
|
+
"@storybook/builder-webpack4": "^6.5.12",
|
|
40
|
+
"@storybook/html": "^6.5.12",
|
|
41
|
+
"@storybook/manager-webpack4": "^6.5.12",
|
|
42
42
|
"@storybook/storybook-deployer": "^2.8.12",
|
|
43
43
|
"@storybook/testing-library": "^0.0.13",
|
|
44
44
|
"@types/geojson": "^7946.0.10",
|
|
45
45
|
"@types/jest": "^27.0.3",
|
|
46
|
-
"@types/leaflet": "^1.
|
|
46
|
+
"@types/leaflet": "^1.9.0",
|
|
47
47
|
"babel-loader": "^8.2.5",
|
|
48
48
|
"jest": "^27.4.5",
|
|
49
49
|
"jest-cli": "^27.4.5",
|
package/readme.md
CHANGED
|
@@ -7,16 +7,14 @@ You can use a complete app or each component independantly.
|
|
|
7
7
|
|
|
8
8
|
**The api you want to use had to authorize your domain.**
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
Copy-paste this inside `<head></head>`
|
|
11
11
|
|
|
12
12
|
```
|
|
13
|
-
<link rel="stylesheet" href="https://unpkg.com/@geotrekce/geotrek-rando-widget@
|
|
14
|
-
<script type="module" src="https://unpkg.com/@geotrekce/geotrek-rando-widget@
|
|
15
|
-
<script nomodule src="https://unpkg.com/@geotrekce/geotrek-rando-widget@
|
|
13
|
+
<link rel="stylesheet" href="https://unpkg.com/@geotrekce/geotrek-rando-widget@0.0.15/dist/geotrek-rando-widget/geotrek-rando-widget.css" />
|
|
14
|
+
<script type="module" src="https://unpkg.com/@geotrekce/geotrek-rando-widget@0.0.15/dist/geotrek-rando-widget/geotrek-rando-widget.esm.js"></script>
|
|
15
|
+
<script nomodule src="https://unpkg.com/@geotrekce/geotrek-rando-widget@0.0.15/dist/geotrek-rando-widget/geotrek-rando-widget.js"></script>
|
|
16
16
|
```
|
|
17
17
|
|
|
18
|
-
You can replace _latest_ with a specific version.
|
|
19
|
-
|
|
20
18
|
## Explore
|
|
21
19
|
|
|
22
20
|
**The api you want to use had to authorize geotrekce.github.io.**
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
/*
|
|
4
|
-
Stencil Client Patch Esm v2.17.4 | MIT Licensed | https://stenciljs.com
|
|
5
|
-
*/
|
|
6
|
-
var __assign=function(){return (__assign=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var s in t=arguments[r])Object.prototype.hasOwnProperty.call(t,s)&&(e[s]=t[s]);return e}).apply(this,arguments)},StyleNode=function(){this.start=0,this.end=0,this.previous=null,this.parent=null,this.rules=null,this.parsedCssText="",this.cssText="",this.atRule=!1,this.type=0,this.keyframesName="",this.selector="",this.parsedSelector="";};function parse(e){return parseCss(lex(e=clean(e)),e)}function clean(e){return e.replace(RX.comments,"").replace(RX.port,"")}function lex(e){var t=new StyleNode;t.start=0,t.end=e.length;for(var r=t,n=0,s=e.length;n<s;n++)if(e[n]===OPEN_BRACE){r.rules||(r.rules=[]);var o=r,a=o.rules[o.rules.length-1]||null;(r=new StyleNode).start=n+1,r.parent=o,r.previous=a,o.rules.push(r);}else e[n]===CLOSE_BRACE&&(r.end=n+1,r=r.parent||t);return t}function parseCss(e,t){var r=t.substring(e.start,e.end-1);if(e.parsedCssText=e.cssText=r.trim(),e.parent){var n=e.previous?e.previous.end:e.parent.start;r=(r=(r=_expandUnicodeEscapes(r=t.substring(n,e.start-1))).replace(RX.multipleSpaces," ")).substring(r.lastIndexOf(";")+1);var s=e.parsedSelector=e.selector=r.trim();e.atRule=0===s.indexOf(AT_START),e.atRule?0===s.indexOf(MEDIA_START)?e.type=types.MEDIA_RULE:s.match(RX.keyframesRule)&&(e.type=types.KEYFRAMES_RULE,e.keyframesName=e.selector.split(RX.multipleSpaces).pop()):0===s.indexOf(VAR_START)?e.type=types.MIXIN_RULE:e.type=types.STYLE_RULE;}var o=e.rules;if(o)for(var a=0,i=o.length,l=void 0;a<i&&(l=o[a]);a++)parseCss(l,t);return e}function _expandUnicodeEscapes(e){return e.replace(/\\([0-9a-f]{1,6})\s/gi,(function(){for(var e=arguments[1],t=6-e.length;t--;)e="0"+e;return "\\"+e}))}var types={STYLE_RULE:1,KEYFRAMES_RULE:7,MEDIA_RULE:4,MIXIN_RULE:1e3},OPEN_BRACE="{",CLOSE_BRACE="}",RX={comments:/\/\*[^*]*\*+([^/*][^*]*\*+)*\//gim,port:/@import[^;]*;/gim,customProp:/(?:^[^;\-\s}]+)?--[^;{}]*?:[^{};]*?(?:[;\n]|$)/gim,mixinProp:/(?:^[^;\-\s}]+)?--[^;{}]*?:[^{};]*?{[^}]*?}(?:[;\n]|$)?/gim,mixinApply:/@apply\s*\(?[^);]*\)?\s*(?:[;\n]|$)?/gim,varApply:/[^;:]*?:[^;]*?var\([^;]*\)(?:[;\n]|$)?/gim,keyframesRule:/^@[^\s]*keyframes/,multipleSpaces:/\s+/g},VAR_START="--",MEDIA_START="@media",AT_START="@";function findRegex(e,t,r){e.lastIndex=0;var n=t.substring(r).match(e);if(n){var s=r+n.index;return {start:s,end:s+n[0].length}}return null}var VAR_USAGE_START=/\bvar\(/,VAR_ASSIGN_START=/\B--[\w-]+\s*:/,COMMENTS=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//gim,TRAILING_LINES=/^[\t ]+\n/gm;function resolveVar(e,t,r){return e[t]?e[t]:r?executeTemplate(r,e):""}function findVarEndIndex(e,t){for(var r=0,n=t;n<e.length;n++){var s=e[n];if("("===s)r++;else if(")"===s&&--r<=0)return n+1}return n}function parseVar(e,t){var r=findRegex(VAR_USAGE_START,e,t);if(!r)return null;var n=findVarEndIndex(e,r.start),s=e.substring(r.end,n-1).split(","),o=s[0],a=s.slice(1);return {start:r.start,end:n,propName:o.trim(),fallback:a.length>0?a.join(",").trim():void 0}}function compileVar(e,t,r){var n=parseVar(e,r);if(!n)return t.push(e.substring(r,e.length)),e.length;var s=n.propName,o=null!=n.fallback?compileTemplate(n.fallback):void 0;return t.push(e.substring(r,n.start),(function(e){return resolveVar(e,s,o)})),n.end}function executeTemplate(e,t){for(var r="",n=0;n<e.length;n++){var s=e[n];r+="string"==typeof s?s:s(t);}return r}function findEndValue(e,t){for(var r=!1,n=!1,s=t;s<e.length;s++){var o=e[s];if(r)n&&'"'===o&&(r=!1),n||"'"!==o||(r=!1);else if('"'===o)r=!0,n=!0;else if("'"===o)r=!0,n=!1;else {if(";"===o)return s+1;if("}"===o)return s}}return s}function removeCustomAssigns(e){for(var t="",r=0;;){var n=findRegex(VAR_ASSIGN_START,e,r),s=n?n.start:e.length;if(t+=e.substring(r,s),!n)break;r=findEndValue(e,s);}return t}function compileTemplate(e){var t=0;e=removeCustomAssigns(e=e.replace(COMMENTS,"")).replace(TRAILING_LINES,"");for(var r=[];t<e.length;)t=compileVar(e,r,t);return r}function resolveValues(e){var t={};e.forEach((function(e){e.declarations.forEach((function(e){t[e.prop]=e.value;}));}));for(var r={},n=Object.entries(t),s=function(e){var t=!1;if(n.forEach((function(e){var n=e[0],s=executeTemplate(e[1],r);s!==r[n]&&(r[n]=s,t=!0);})),!t)return "break"},o=0;o<10;o++){if("break"===s())break}return r}function getSelectors(e,t){if(void 0===t&&(t=0),!e.rules)return [];var r=[];return e.rules.filter((function(e){return e.type===types.STYLE_RULE})).forEach((function(e){var n=getDeclarations(e.cssText);n.length>0&&e.parsedSelector.split(",").forEach((function(e){e=e.trim(),r.push({selector:e,declarations:n,specificity:computeSpecificity(),nu:t});})),t++;})),r}function computeSpecificity(e){return 1}var IMPORTANT="!important",FIND_DECLARATIONS=/(?:^|[;\s{]\s*)(--[\w-]*?)\s*:\s*(?:((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};{])+)|\{([^}]*)\}(?:(?=[;\s}])|$))/gm;function getDeclarations(e){for(var t,r=[];t=FIND_DECLARATIONS.exec(e.trim());){var n=normalizeValue(t[2]),s=n.value,o=n.important;r.push({prop:t[1].trim(),value:compileTemplate(s),important:o});}return r}function normalizeValue(e){var t=(e=e.replace(/\s+/gim," ").trim()).endsWith(IMPORTANT);return t&&(e=e.slice(0,e.length-IMPORTANT.length).trim()),{value:e,important:t}}function getActiveSelectors(e,t,r){var n=[],s=getScopesForElement(t,e);return r.forEach((function(e){return n.push(e)})),s.forEach((function(e){return n.push(e)})),sortSelectors(getSelectorsForScopes(n).filter((function(t){return matches(e,t.selector)})))}function getScopesForElement(e,t){for(var r=[];t;){var n=e.get(t);n&&r.push(n),t=t.parentElement;}return r}function getSelectorsForScopes(e){var t=[];return e.forEach((function(e){t.push.apply(t,e.selectors);})),t}function sortSelectors(e){return e.sort((function(e,t){return e.specificity===t.specificity?e.nu-t.nu:e.specificity-t.specificity})),e}function matches(e,t){return ":root"===t||"html"===t||e.matches(t)}function parseCSS(e){var t=parse(e),r=compileTemplate(e);return {original:e,template:r,selectors:getSelectors(t),usesCssVars:r.length>1}}function addGlobalStyle(e,t){if(e.some((function(e){return e.styleEl===t})))return !1;var r=parseCSS(t.textContent);return r.styleEl=t,e.push(r),!0}function updateGlobalScopes(e){var t=resolveValues(getSelectorsForScopes(e));e.forEach((function(e){e.usesCssVars&&(e.styleEl.textContent=executeTemplate(e.template,t));}));}function reScope(e,t){var r=e.template.map((function(r){return "string"==typeof r?replaceScope(r,e.scopeId,t):r})),n=e.selectors.map((function(r){return __assign(__assign({},r),{selector:replaceScope(r.selector,e.scopeId,t)})}));return __assign(__assign({},e),{template:r,selectors:n,scopeId:t})}function replaceScope(e,t,r){return e=replaceAll(e,"\\.".concat(t),".".concat(r))}function replaceAll(e,t,r){return e.replace(new RegExp(t,"g"),r)}function loadDocument(e,t){return loadDocumentStyles(e,t),loadDocumentLinks(e,t).then((function(){updateGlobalScopes(t);}))}function startWatcher(e,t){"undefined"!=typeof MutationObserver&&new MutationObserver((function(){loadDocumentStyles(e,t)&&updateGlobalScopes(t);})).observe(document.head,{childList:!0});}function loadDocumentLinks(e,t){for(var r=[],n=e.querySelectorAll('link[rel="stylesheet"][href]:not([data-no-shim])'),s=0;s<n.length;s++)r.push(addGlobalLink(e,t,n[s]));return Promise.all(r)}function loadDocumentStyles(e,t){return Array.from(e.querySelectorAll("style:not([data-styles]):not([data-no-shim])")).map((function(e){return addGlobalStyle(t,e)})).some(Boolean)}function addGlobalLink(e,t,r){var n=r.href;return fetch(n).then((function(e){return e.text()})).then((function(s){if(hasCssVariables(s)&&r.parentNode){hasRelativeUrls(s)&&(s=fixRelativeUrls(s,n));var o=e.createElement("style");o.setAttribute("data-styles",""),o.textContent=s,addGlobalStyle(t,o),r.parentNode.insertBefore(o,r),r.remove();}})).catch((function(e){console.error(e);}))}var CSS_VARIABLE_REGEXP=/[\s;{]--[-a-zA-Z0-9]+\s*:/m;function hasCssVariables(e){return e.indexOf("var(")>-1||CSS_VARIABLE_REGEXP.test(e)}var CSS_URL_REGEXP=/url[\s]*\([\s]*['"]?(?!(?:https?|data)\:|\/)([^\'\"\)]*)[\s]*['"]?\)[\s]*/gim;function hasRelativeUrls(e){return CSS_URL_REGEXP.lastIndex=0,CSS_URL_REGEXP.test(e)}function fixRelativeUrls(e,t){var r=t.replace(/[^/]*$/,"");return e.replace(CSS_URL_REGEXP,(function(e,t){var n=r+t;return e.replace(t,n)}))}var CustomStyle=function(){function e(e,t){this.win=e,this.doc=t,this.count=0,this.hostStyleMap=new WeakMap,this.hostScopeMap=new WeakMap,this.globalScopes=[],this.scopesMap=new Map,this.didInit=!1;}return e.prototype.i=function(){var e=this;return this.didInit||!this.win.requestAnimationFrame?Promise.resolve():(this.didInit=!0,new Promise((function(t){e.win.requestAnimationFrame((function(){startWatcher(e.doc,e.globalScopes),loadDocument(e.doc,e.globalScopes).then((function(){return t()}));}));})))},e.prototype.addLink=function(e){var t=this;return addGlobalLink(this.doc,this.globalScopes,e).then((function(){t.updateGlobal();}))},e.prototype.addGlobalStyle=function(e){addGlobalStyle(this.globalScopes,e)&&this.updateGlobal();},e.prototype.createHostStyle=function(e,t,r,n){if(this.hostScopeMap.has(e))throw new Error("host style already created");var s=this.registerHostTemplate(r,t,n),o=this.doc.createElement("style");return o.setAttribute("data-no-shim",""),s.usesCssVars?n?(o["s-sc"]=t="".concat(s.scopeId,"-").concat(this.count),o.textContent="/*needs update*/",this.hostStyleMap.set(e,o),this.hostScopeMap.set(e,reScope(s,t)),this.count++):(s.styleEl=o,s.usesCssVars||(o.textContent=executeTemplate(s.template,{})),this.globalScopes.push(s),this.updateGlobal(),this.hostScopeMap.set(e,s)):o.textContent=r,o},e.prototype.removeHost=function(e){var t=this.hostStyleMap.get(e);t&&t.remove(),this.hostStyleMap.delete(e),this.hostScopeMap.delete(e);},e.prototype.updateHost=function(e){var t=this.hostScopeMap.get(e);if(t&&t.usesCssVars&&t.isScoped){var r=this.hostStyleMap.get(e);if(r){var n=resolveValues(getActiveSelectors(e,this.hostScopeMap,this.globalScopes));r.textContent=executeTemplate(t.template,n);}}},e.prototype.updateGlobal=function(){updateGlobalScopes(this.globalScopes);},e.prototype.registerHostTemplate=function(e,t,r){var n=this.scopesMap.get(t);return n||((n=parseCSS(e)).scopeId=t,n.isScoped=r,this.scopesMap.set(t,n)),n},e}();!function(e){!e||e.__cssshim||e.CSS&&e.CSS.supports&&e.CSS.supports("color","var(--c)")||(e.__cssshim=new CustomStyle(e,e.document));}("undefined"!=typeof window&&window);
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
Stencil Client Patch Esm v2.17.4 | MIT Licensed | https://stenciljs.com
|
|
3
|
-
*/
|
|
4
|
-
var __assign=function(){return (__assign=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var s in t=arguments[r])Object.prototype.hasOwnProperty.call(t,s)&&(e[s]=t[s]);return e}).apply(this,arguments)},StyleNode=function(){this.start=0,this.end=0,this.previous=null,this.parent=null,this.rules=null,this.parsedCssText="",this.cssText="",this.atRule=!1,this.type=0,this.keyframesName="",this.selector="",this.parsedSelector="";};function parse(e){return parseCss(lex(e=clean(e)),e)}function clean(e){return e.replace(RX.comments,"").replace(RX.port,"")}function lex(e){var t=new StyleNode;t.start=0,t.end=e.length;for(var r=t,n=0,s=e.length;n<s;n++)if(e[n]===OPEN_BRACE){r.rules||(r.rules=[]);var o=r,a=o.rules[o.rules.length-1]||null;(r=new StyleNode).start=n+1,r.parent=o,r.previous=a,o.rules.push(r);}else e[n]===CLOSE_BRACE&&(r.end=n+1,r=r.parent||t);return t}function parseCss(e,t){var r=t.substring(e.start,e.end-1);if(e.parsedCssText=e.cssText=r.trim(),e.parent){var n=e.previous?e.previous.end:e.parent.start;r=(r=(r=_expandUnicodeEscapes(r=t.substring(n,e.start-1))).replace(RX.multipleSpaces," ")).substring(r.lastIndexOf(";")+1);var s=e.parsedSelector=e.selector=r.trim();e.atRule=0===s.indexOf(AT_START),e.atRule?0===s.indexOf(MEDIA_START)?e.type=types.MEDIA_RULE:s.match(RX.keyframesRule)&&(e.type=types.KEYFRAMES_RULE,e.keyframesName=e.selector.split(RX.multipleSpaces).pop()):0===s.indexOf(VAR_START)?e.type=types.MIXIN_RULE:e.type=types.STYLE_RULE;}var o=e.rules;if(o)for(var a=0,i=o.length,l=void 0;a<i&&(l=o[a]);a++)parseCss(l,t);return e}function _expandUnicodeEscapes(e){return e.replace(/\\([0-9a-f]{1,6})\s/gi,(function(){for(var e=arguments[1],t=6-e.length;t--;)e="0"+e;return "\\"+e}))}var types={STYLE_RULE:1,KEYFRAMES_RULE:7,MEDIA_RULE:4,MIXIN_RULE:1e3},OPEN_BRACE="{",CLOSE_BRACE="}",RX={comments:/\/\*[^*]*\*+([^/*][^*]*\*+)*\//gim,port:/@import[^;]*;/gim,customProp:/(?:^[^;\-\s}]+)?--[^;{}]*?:[^{};]*?(?:[;\n]|$)/gim,mixinProp:/(?:^[^;\-\s}]+)?--[^;{}]*?:[^{};]*?{[^}]*?}(?:[;\n]|$)?/gim,mixinApply:/@apply\s*\(?[^);]*\)?\s*(?:[;\n]|$)?/gim,varApply:/[^;:]*?:[^;]*?var\([^;]*\)(?:[;\n]|$)?/gim,keyframesRule:/^@[^\s]*keyframes/,multipleSpaces:/\s+/g},VAR_START="--",MEDIA_START="@media",AT_START="@";function findRegex(e,t,r){e.lastIndex=0;var n=t.substring(r).match(e);if(n){var s=r+n.index;return {start:s,end:s+n[0].length}}return null}var VAR_USAGE_START=/\bvar\(/,VAR_ASSIGN_START=/\B--[\w-]+\s*:/,COMMENTS=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//gim,TRAILING_LINES=/^[\t ]+\n/gm;function resolveVar(e,t,r){return e[t]?e[t]:r?executeTemplate(r,e):""}function findVarEndIndex(e,t){for(var r=0,n=t;n<e.length;n++){var s=e[n];if("("===s)r++;else if(")"===s&&--r<=0)return n+1}return n}function parseVar(e,t){var r=findRegex(VAR_USAGE_START,e,t);if(!r)return null;var n=findVarEndIndex(e,r.start),s=e.substring(r.end,n-1).split(","),o=s[0],a=s.slice(1);return {start:r.start,end:n,propName:o.trim(),fallback:a.length>0?a.join(",").trim():void 0}}function compileVar(e,t,r){var n=parseVar(e,r);if(!n)return t.push(e.substring(r,e.length)),e.length;var s=n.propName,o=null!=n.fallback?compileTemplate(n.fallback):void 0;return t.push(e.substring(r,n.start),(function(e){return resolveVar(e,s,o)})),n.end}function executeTemplate(e,t){for(var r="",n=0;n<e.length;n++){var s=e[n];r+="string"==typeof s?s:s(t);}return r}function findEndValue(e,t){for(var r=!1,n=!1,s=t;s<e.length;s++){var o=e[s];if(r)n&&'"'===o&&(r=!1),n||"'"!==o||(r=!1);else if('"'===o)r=!0,n=!0;else if("'"===o)r=!0,n=!1;else {if(";"===o)return s+1;if("}"===o)return s}}return s}function removeCustomAssigns(e){for(var t="",r=0;;){var n=findRegex(VAR_ASSIGN_START,e,r),s=n?n.start:e.length;if(t+=e.substring(r,s),!n)break;r=findEndValue(e,s);}return t}function compileTemplate(e){var t=0;e=removeCustomAssigns(e=e.replace(COMMENTS,"")).replace(TRAILING_LINES,"");for(var r=[];t<e.length;)t=compileVar(e,r,t);return r}function resolveValues(e){var t={};e.forEach((function(e){e.declarations.forEach((function(e){t[e.prop]=e.value;}));}));for(var r={},n=Object.entries(t),s=function(e){var t=!1;if(n.forEach((function(e){var n=e[0],s=executeTemplate(e[1],r);s!==r[n]&&(r[n]=s,t=!0);})),!t)return "break"},o=0;o<10;o++){if("break"===s())break}return r}function getSelectors(e,t){if(void 0===t&&(t=0),!e.rules)return [];var r=[];return e.rules.filter((function(e){return e.type===types.STYLE_RULE})).forEach((function(e){var n=getDeclarations(e.cssText);n.length>0&&e.parsedSelector.split(",").forEach((function(e){e=e.trim(),r.push({selector:e,declarations:n,specificity:computeSpecificity(),nu:t});})),t++;})),r}function computeSpecificity(e){return 1}var IMPORTANT="!important",FIND_DECLARATIONS=/(?:^|[;\s{]\s*)(--[\w-]*?)\s*:\s*(?:((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};{])+)|\{([^}]*)\}(?:(?=[;\s}])|$))/gm;function getDeclarations(e){for(var t,r=[];t=FIND_DECLARATIONS.exec(e.trim());){var n=normalizeValue(t[2]),s=n.value,o=n.important;r.push({prop:t[1].trim(),value:compileTemplate(s),important:o});}return r}function normalizeValue(e){var t=(e=e.replace(/\s+/gim," ").trim()).endsWith(IMPORTANT);return t&&(e=e.slice(0,e.length-IMPORTANT.length).trim()),{value:e,important:t}}function getActiveSelectors(e,t,r){var n=[],s=getScopesForElement(t,e);return r.forEach((function(e){return n.push(e)})),s.forEach((function(e){return n.push(e)})),sortSelectors(getSelectorsForScopes(n).filter((function(t){return matches(e,t.selector)})))}function getScopesForElement(e,t){for(var r=[];t;){var n=e.get(t);n&&r.push(n),t=t.parentElement;}return r}function getSelectorsForScopes(e){var t=[];return e.forEach((function(e){t.push.apply(t,e.selectors);})),t}function sortSelectors(e){return e.sort((function(e,t){return e.specificity===t.specificity?e.nu-t.nu:e.specificity-t.specificity})),e}function matches(e,t){return ":root"===t||"html"===t||e.matches(t)}function parseCSS(e){var t=parse(e),r=compileTemplate(e);return {original:e,template:r,selectors:getSelectors(t),usesCssVars:r.length>1}}function addGlobalStyle(e,t){if(e.some((function(e){return e.styleEl===t})))return !1;var r=parseCSS(t.textContent);return r.styleEl=t,e.push(r),!0}function updateGlobalScopes(e){var t=resolveValues(getSelectorsForScopes(e));e.forEach((function(e){e.usesCssVars&&(e.styleEl.textContent=executeTemplate(e.template,t));}));}function reScope(e,t){var r=e.template.map((function(r){return "string"==typeof r?replaceScope(r,e.scopeId,t):r})),n=e.selectors.map((function(r){return __assign(__assign({},r),{selector:replaceScope(r.selector,e.scopeId,t)})}));return __assign(__assign({},e),{template:r,selectors:n,scopeId:t})}function replaceScope(e,t,r){return e=replaceAll(e,"\\.".concat(t),".".concat(r))}function replaceAll(e,t,r){return e.replace(new RegExp(t,"g"),r)}function loadDocument(e,t){return loadDocumentStyles(e,t),loadDocumentLinks(e,t).then((function(){updateGlobalScopes(t);}))}function startWatcher(e,t){"undefined"!=typeof MutationObserver&&new MutationObserver((function(){loadDocumentStyles(e,t)&&updateGlobalScopes(t);})).observe(document.head,{childList:!0});}function loadDocumentLinks(e,t){for(var r=[],n=e.querySelectorAll('link[rel="stylesheet"][href]:not([data-no-shim])'),s=0;s<n.length;s++)r.push(addGlobalLink(e,t,n[s]));return Promise.all(r)}function loadDocumentStyles(e,t){return Array.from(e.querySelectorAll("style:not([data-styles]):not([data-no-shim])")).map((function(e){return addGlobalStyle(t,e)})).some(Boolean)}function addGlobalLink(e,t,r){var n=r.href;return fetch(n).then((function(e){return e.text()})).then((function(s){if(hasCssVariables(s)&&r.parentNode){hasRelativeUrls(s)&&(s=fixRelativeUrls(s,n));var o=e.createElement("style");o.setAttribute("data-styles",""),o.textContent=s,addGlobalStyle(t,o),r.parentNode.insertBefore(o,r),r.remove();}})).catch((function(e){console.error(e);}))}var CSS_VARIABLE_REGEXP=/[\s;{]--[-a-zA-Z0-9]+\s*:/m;function hasCssVariables(e){return e.indexOf("var(")>-1||CSS_VARIABLE_REGEXP.test(e)}var CSS_URL_REGEXP=/url[\s]*\([\s]*['"]?(?!(?:https?|data)\:|\/)([^\'\"\)]*)[\s]*['"]?\)[\s]*/gim;function hasRelativeUrls(e){return CSS_URL_REGEXP.lastIndex=0,CSS_URL_REGEXP.test(e)}function fixRelativeUrls(e,t){var r=t.replace(/[^/]*$/,"");return e.replace(CSS_URL_REGEXP,(function(e,t){var n=r+t;return e.replace(t,n)}))}var CustomStyle=function(){function e(e,t){this.win=e,this.doc=t,this.count=0,this.hostStyleMap=new WeakMap,this.hostScopeMap=new WeakMap,this.globalScopes=[],this.scopesMap=new Map,this.didInit=!1;}return e.prototype.i=function(){var e=this;return this.didInit||!this.win.requestAnimationFrame?Promise.resolve():(this.didInit=!0,new Promise((function(t){e.win.requestAnimationFrame((function(){startWatcher(e.doc,e.globalScopes),loadDocument(e.doc,e.globalScopes).then((function(){return t()}));}));})))},e.prototype.addLink=function(e){var t=this;return addGlobalLink(this.doc,this.globalScopes,e).then((function(){t.updateGlobal();}))},e.prototype.addGlobalStyle=function(e){addGlobalStyle(this.globalScopes,e)&&this.updateGlobal();},e.prototype.createHostStyle=function(e,t,r,n){if(this.hostScopeMap.has(e))throw new Error("host style already created");var s=this.registerHostTemplate(r,t,n),o=this.doc.createElement("style");return o.setAttribute("data-no-shim",""),s.usesCssVars?n?(o["s-sc"]=t="".concat(s.scopeId,"-").concat(this.count),o.textContent="/*needs update*/",this.hostStyleMap.set(e,o),this.hostScopeMap.set(e,reScope(s,t)),this.count++):(s.styleEl=o,s.usesCssVars||(o.textContent=executeTemplate(s.template,{})),this.globalScopes.push(s),this.updateGlobal(),this.hostScopeMap.set(e,s)):o.textContent=r,o},e.prototype.removeHost=function(e){var t=this.hostStyleMap.get(e);t&&t.remove(),this.hostStyleMap.delete(e),this.hostScopeMap.delete(e);},e.prototype.updateHost=function(e){var t=this.hostScopeMap.get(e);if(t&&t.usesCssVars&&t.isScoped){var r=this.hostStyleMap.get(e);if(r){var n=resolveValues(getActiveSelectors(e,this.hostScopeMap,this.globalScopes));r.textContent=executeTemplate(t.template,n);}}},e.prototype.updateGlobal=function(){updateGlobalScopes(this.globalScopes);},e.prototype.registerHostTemplate=function(e,t,r){var n=this.scopesMap.get(t);return n||((n=parseCSS(e)).scopeId=t,n.isScoped=r,this.scopesMap.set(t,n)),n},e}();!function(e){!e||e.__cssshim||e.CSS&&e.CSS.supports&&e.CSS.supports("color","var(--c)")||(e.__cssshim=new CustomStyle(e,e.document));}("undefined"!=typeof window&&window);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var __assign=function(){return(__assign=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var s in t=arguments[r])Object.prototype.hasOwnProperty.call(t,s)&&(e[s]=t[s]);return e}).apply(this,arguments)},StyleNode=function(){this.start=0,this.end=0,this.previous=null,this.parent=null,this.rules=null,this.parsedCssText="",this.cssText="",this.atRule=!1,this.type=0,this.keyframesName="",this.selector="",this.parsedSelector=""};function parse(e){return parseCss(lex(e=clean(e)),e)}function clean(e){return e.replace(RX.comments,"").replace(RX.port,"")}function lex(e){var t=new StyleNode;t.start=0,t.end=e.length;for(var r=t,n=0,s=e.length;n<s;n++)if(e[n]===OPEN_BRACE){r.rules||(r.rules=[]);var o=r,a=o.rules[o.rules.length-1]||null;(r=new StyleNode).start=n+1,r.parent=o,r.previous=a,o.rules.push(r)}else e[n]===CLOSE_BRACE&&(r.end=n+1,r=r.parent||t);return t}function parseCss(e,t){var r=t.substring(e.start,e.end-1);if(e.parsedCssText=e.cssText=r.trim(),e.parent){var n=e.previous?e.previous.end:e.parent.start;r=(r=(r=_expandUnicodeEscapes(r=t.substring(n,e.start-1))).replace(RX.multipleSpaces," ")).substring(r.lastIndexOf(";")+1);var s=e.parsedSelector=e.selector=r.trim();e.atRule=0===s.indexOf(AT_START),e.atRule?0===s.indexOf(MEDIA_START)?e.type=types.MEDIA_RULE:s.match(RX.keyframesRule)&&(e.type=types.KEYFRAMES_RULE,e.keyframesName=e.selector.split(RX.multipleSpaces).pop()):0===s.indexOf(VAR_START)?e.type=types.MIXIN_RULE:e.type=types.STYLE_RULE}var o=e.rules;if(o)for(var a=0,i=o.length,l=void 0;a<i&&(l=o[a]);a++)parseCss(l,t);return e}function _expandUnicodeEscapes(e){return e.replace(/\\([0-9a-f]{1,6})\s/gi,(function(){for(var e=arguments[1],t=6-e.length;t--;)e="0"+e;return"\\"+e}))}var types={STYLE_RULE:1,KEYFRAMES_RULE:7,MEDIA_RULE:4,MIXIN_RULE:1e3},OPEN_BRACE="{",CLOSE_BRACE="}",RX={comments:/\/\*[^*]*\*+([^/*][^*]*\*+)*\//gim,port:/@import[^;]*;/gim,customProp:/(?:^[^;\-\s}]+)?--[^;{}]*?:[^{};]*?(?:[;\n]|$)/gim,mixinProp:/(?:^[^;\-\s}]+)?--[^;{}]*?:[^{};]*?{[^}]*?}(?:[;\n]|$)?/gim,mixinApply:/@apply\s*\(?[^);]*\)?\s*(?:[;\n]|$)?/gim,varApply:/[^;:]*?:[^;]*?var\([^;]*\)(?:[;\n]|$)?/gim,keyframesRule:/^@[^\s]*keyframes/,multipleSpaces:/\s+/g},VAR_START="--",MEDIA_START="@media",AT_START="@";function findRegex(e,t,r){e.lastIndex=0;var n=t.substring(r).match(e);if(n){var s=r+n.index;return{start:s,end:s+n[0].length}}return null}var VAR_USAGE_START=/\bvar\(/,VAR_ASSIGN_START=/\B--[\w-]+\s*:/,COMMENTS=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//gim,TRAILING_LINES=/^[\t ]+\n/gm;function resolveVar(e,t,r){return e[t]?e[t]:r?executeTemplate(r,e):""}function findVarEndIndex(e,t){for(var r=0,n=t;n<e.length;n++){var s=e[n];if("("===s)r++;else if(")"===s&&--r<=0)return n+1}return n}function parseVar(e,t){var r=findRegex(VAR_USAGE_START,e,t);if(!r)return null;var n=findVarEndIndex(e,r.start),s=e.substring(r.end,n-1).split(","),o=s[0],a=s.slice(1);return{start:r.start,end:n,propName:o.trim(),fallback:a.length>0?a.join(",").trim():void 0}}function compileVar(e,t,r){var n=parseVar(e,r);if(!n)return t.push(e.substring(r,e.length)),e.length;var s=n.propName,o=null!=n.fallback?compileTemplate(n.fallback):void 0;return t.push(e.substring(r,n.start),(function(e){return resolveVar(e,s,o)})),n.end}function executeTemplate(e,t){for(var r="",n=0;n<e.length;n++){var s=e[n];r+="string"==typeof s?s:s(t)}return r}function findEndValue(e,t){for(var r=!1,n=!1,s=t;s<e.length;s++){var o=e[s];if(r)n&&'"'===o&&(r=!1),n||"'"!==o||(r=!1);else if('"'===o)r=!0,n=!0;else if("'"===o)r=!0,n=!1;else{if(";"===o)return s+1;if("}"===o)return s}}return s}function removeCustomAssigns(e){for(var t="",r=0;;){var n=findRegex(VAR_ASSIGN_START,e,r),s=n?n.start:e.length;if(t+=e.substring(r,s),!n)break;r=findEndValue(e,s)}return t}function compileTemplate(e){var t=0;e=removeCustomAssigns(e=e.replace(COMMENTS,"")).replace(TRAILING_LINES,"");for(var r=[];t<e.length;)t=compileVar(e,r,t);return r}function resolveValues(e){var t={};e.forEach((function(e){e.declarations.forEach((function(e){t[e.prop]=e.value}))}));for(var r={},n=Object.entries(t),s=function(e){var t=!1;if(n.forEach((function(e){var n=e[0],s=executeTemplate(e[1],r);s!==r[n]&&(r[n]=s,t=!0)})),!t)return"break"},o=0;o<10;o++){if("break"===s())break}return r}function getSelectors(e,t){if(void 0===t&&(t=0),!e.rules)return[];var r=[];return e.rules.filter((function(e){return e.type===types.STYLE_RULE})).forEach((function(e){var n=getDeclarations(e.cssText);n.length>0&&e.parsedSelector.split(",").forEach((function(e){e=e.trim(),r.push({selector:e,declarations:n,specificity:computeSpecificity(),nu:t})})),t++})),r}function computeSpecificity(e){return 1}var IMPORTANT="!important",FIND_DECLARATIONS=/(?:^|[;\s{]\s*)(--[\w-]*?)\s*:\s*(?:((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};{])+)|\{([^}]*)\}(?:(?=[;\s}])|$))/gm;function getDeclarations(e){for(var t,r=[];t=FIND_DECLARATIONS.exec(e.trim());){var n=normalizeValue(t[2]),s=n.value,o=n.important;r.push({prop:t[1].trim(),value:compileTemplate(s),important:o})}return r}function normalizeValue(e){var t=(e=e.replace(/\s+/gim," ").trim()).endsWith(IMPORTANT);return t&&(e=e.slice(0,e.length-IMPORTANT.length).trim()),{value:e,important:t}}function getActiveSelectors(e,t,r){var n=[],s=getScopesForElement(t,e);return r.forEach((function(e){return n.push(e)})),s.forEach((function(e){return n.push(e)})),sortSelectors(getSelectorsForScopes(n).filter((function(t){return matches(e,t.selector)})))}function getScopesForElement(e,t){for(var r=[];t;){var n=e.get(t);n&&r.push(n),t=t.parentElement}return r}function getSelectorsForScopes(e){var t=[];return e.forEach((function(e){t.push.apply(t,e.selectors)})),t}function sortSelectors(e){return e.sort((function(e,t){return e.specificity===t.specificity?e.nu-t.nu:e.specificity-t.specificity})),e}function matches(e,t){return":root"===t||"html"===t||e.matches(t)}function parseCSS(e){var t=parse(e),r=compileTemplate(e);return{original:e,template:r,selectors:getSelectors(t),usesCssVars:r.length>1}}function addGlobalStyle(e,t){if(e.some((function(e){return e.styleEl===t})))return!1;var r=parseCSS(t.textContent);return r.styleEl=t,e.push(r),!0}function updateGlobalScopes(e){var t=resolveValues(getSelectorsForScopes(e));e.forEach((function(e){e.usesCssVars&&(e.styleEl.textContent=executeTemplate(e.template,t))}))}function reScope(e,t){var r=e.template.map((function(r){return"string"==typeof r?replaceScope(r,e.scopeId,t):r})),n=e.selectors.map((function(r){return __assign(__assign({},r),{selector:replaceScope(r.selector,e.scopeId,t)})}));return __assign(__assign({},e),{template:r,selectors:n,scopeId:t})}function replaceScope(e,t,r){return e=replaceAll(e,"\\.".concat(t),".".concat(r))}function replaceAll(e,t,r){return e.replace(new RegExp(t,"g"),r)}function loadDocument(e,t){return loadDocumentStyles(e,t),loadDocumentLinks(e,t).then((function(){updateGlobalScopes(t)}))}function startWatcher(e,t){"undefined"!=typeof MutationObserver&&new MutationObserver((function(){loadDocumentStyles(e,t)&&updateGlobalScopes(t)})).observe(document.head,{childList:!0})}function loadDocumentLinks(e,t){for(var r=[],n=e.querySelectorAll('link[rel="stylesheet"][href]:not([data-no-shim])'),s=0;s<n.length;s++)r.push(addGlobalLink(e,t,n[s]));return Promise.all(r)}function loadDocumentStyles(e,t){return Array.from(e.querySelectorAll("style:not([data-styles]):not([data-no-shim])")).map((function(e){return addGlobalStyle(t,e)})).some(Boolean)}function addGlobalLink(e,t,r){var n=r.href;return fetch(n).then((function(e){return e.text()})).then((function(s){if(hasCssVariables(s)&&r.parentNode){hasRelativeUrls(s)&&(s=fixRelativeUrls(s,n));var o=e.createElement("style");o.setAttribute("data-styles",""),o.textContent=s,addGlobalStyle(t,o),r.parentNode.insertBefore(o,r),r.remove()}})).catch((function(e){console.error(e)}))}var CSS_VARIABLE_REGEXP=/[\s;{]--[-a-zA-Z0-9]+\s*:/m;function hasCssVariables(e){return e.indexOf("var(")>-1||CSS_VARIABLE_REGEXP.test(e)}var CSS_URL_REGEXP=/url[\s]*\([\s]*['"]?(?!(?:https?|data)\:|\/)([^\'\"\)]*)[\s]*['"]?\)[\s]*/gim;function hasRelativeUrls(e){return CSS_URL_REGEXP.lastIndex=0,CSS_URL_REGEXP.test(e)}function fixRelativeUrls(e,t){var r=t.replace(/[^/]*$/,"");return e.replace(CSS_URL_REGEXP,(function(e,t){var n=r+t;return e.replace(t,n)}))}var CustomStyle=function(){function e(e,t){this.win=e,this.doc=t,this.count=0,this.hostStyleMap=new WeakMap,this.hostScopeMap=new WeakMap,this.globalScopes=[],this.scopesMap=new Map,this.didInit=!1}return e.prototype.i=function(){var e=this;return this.didInit||!this.win.requestAnimationFrame?Promise.resolve():(this.didInit=!0,new Promise((function(t){e.win.requestAnimationFrame((function(){startWatcher(e.doc,e.globalScopes),loadDocument(e.doc,e.globalScopes).then((function(){return t()}))}))})))},e.prototype.addLink=function(e){var t=this;return addGlobalLink(this.doc,this.globalScopes,e).then((function(){t.updateGlobal()}))},e.prototype.addGlobalStyle=function(e){addGlobalStyle(this.globalScopes,e)&&this.updateGlobal()},e.prototype.createHostStyle=function(e,t,r,n){if(this.hostScopeMap.has(e))throw new Error("host style already created");var s=this.registerHostTemplate(r,t,n),o=this.doc.createElement("style");return o.setAttribute("data-no-shim",""),s.usesCssVars?n?(o["s-sc"]=t="".concat(s.scopeId,"-").concat(this.count),o.textContent="/*needs update*/",this.hostStyleMap.set(e,o),this.hostScopeMap.set(e,reScope(s,t)),this.count++):(s.styleEl=o,s.usesCssVars||(o.textContent=executeTemplate(s.template,{})),this.globalScopes.push(s),this.updateGlobal(),this.hostScopeMap.set(e,s)):o.textContent=r,o},e.prototype.removeHost=function(e){var t=this.hostStyleMap.get(e);t&&t.remove(),this.hostStyleMap.delete(e),this.hostScopeMap.delete(e)},e.prototype.updateHost=function(e){var t=this.hostScopeMap.get(e);if(t&&t.usesCssVars&&t.isScoped){var r=this.hostStyleMap.get(e);if(r){var n=resolveValues(getActiveSelectors(e,this.hostScopeMap,this.globalScopes));r.textContent=executeTemplate(t.template,n)}}},e.prototype.updateGlobal=function(){updateGlobalScopes(this.globalScopes)},e.prototype.registerHostTemplate=function(e,t,r){var n=this.scopesMap.get(t);return n||((n=parseCSS(e)).scopeId=t,n.isScoped=r,this.scopesMap.set(t,n)),n},e}();!function(e){!e||e.__cssshim||e.CSS&&e.CSS.supports&&e.CSS.supports("color","var(--c)")||(e.__cssshim=new CustomStyle(e,e.document))}("undefined"!=typeof window&&window);
|