@arcgis/map-components
Version:
ArcGIS Map Components
2 lines • 11.7 kB
JavaScript
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
import{O as l,U as b,a as o,b as i,x as g}from"./WUJCCZQC.js";import"./3TTFCHAA.js";export default $arcgis.t(([,{watch:d}])=>{var x=o`.captions-container{width:100%;height:100%;padding-inline-start:var(--arcgis-internal-presentation-padding-start);padding-inline-end:var(--arcgis-internal-presentation-padding-end)}.captions{height:auto;position:relative;box-sizing:border-box;transition:padding .05s ease-in 0s;min-height:48px;max-width:max(400px,40%);padding:12px 16px;&:before{content:"";position:absolute;inset-block:-16px -144px;inset-inline:calc(-64px - var(--arcgis-internal-presentation-padding-start)) calc(0px - max(360px,32vw));background:var(--caption-gradient);mask:var(--caption-gradient-mask-before);opacity:var(--calcite-opacity-half);z-index:-1}&:after{content:"";position:absolute;inset:-32px;z-index:-2;background-color:#fff0;mask:var(--caption-gradient-mask-after);mask-mode:luminance;mask-composite:intersect;background-size:cover;backdrop-filter:blur(2px);opacity:var(--calcite-opacity-dark)}}:dir(rtl) .captions{&:before{mask:var(--caption-gradient-mask-before-RTL)}}.title{text-wrap:pretty;text-align:start;overflow:hidden;text-overflow:ellipsis;overflow-wrap:break-word;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;line-clamp:2;text-shadow:var(--title-text-shadow);font-size:var(--caption-title-font-size);font-family:Avenir Next World,sans-serif;font-style:normal;font-weight:var(--calcite-font-weight-bold);line-height:var(--calcite-font-line-height-relative-snug);margin-bottom:2px;color:var(--calcite-color-text-1)}.captions-description{text-wrap:pretty;text-align:start;overflow:hidden;text-overflow:ellipsis;overflow-wrap:break-word;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:5;line-clamp:5;text-shadow:var(--description-text-shadow);font-size:var(--caption-description-font-size);font-style:normal;font-weight:var(--calcite-font-weight-medium);line-height:var(--calcite-font-line-height-relative-snug);color:var(--calcite-color-text-1)}.cover-container{width:100%;height:100%;display:flex;flex-direction:column;align-items:center;justify-content:space-evenly;padding-block-start:calc(var(--arcgis-internal-presentation-cover-padding-top) + var(--calcite-space-lg));padding-block-end:calc(var(--arcgis-internal-presentation-cover-padding-bottom) + var(--calcite-space-lg))}.cover{display:flex;flex-direction:column;align-items:center;justify-content:center;padding-inline:8px;min-height:88px;min-width:200px;position:relative;padding-inline-start:calc(var(--arcgis-internal-presentation-cover-padding-start) + 16px);padding-inline-end:calc(var(--arcgis-internal-presentation-cover-padding-end) + 16px);opacity:1;transition:opacity .25s,color .25s;&:before{content:"";position:absolute;inset:calc(0vw - max(320px,12vw,18vh)) calc(0vw - max(320px,24vw));border-radius:120px;background:var(--cover-gradient-before);mask:var(--cover-mask-before);opacity:var(--calcite-opacity-half);z-index:-1}&:after{content:"";position:absolute;inset:-32px;z-index:-2;background-color:#fff0;mask:var(--cover-mask-after);mask-mode:luminance;mask-composite:intersect;background-size:cover;backdrop-filter:blur(2px);opacity:var(--calcite-opacity-dark)}}.cover-description{text-wrap:pretty;text-align:center;text-shadow:var(--description-text-shadow);font-size:var(--cover-description-font-size);font-style:normal;font-weight:var(--calcite-font-weight-medium);line-height:var(--calcite-font-line-height-relative-snug);display:-webkit-box;max-width:75ch;overflow-wrap:break-word;overflow:hidden;text-overflow:ellipsis;-webkit-box-orient:vertical;-webkit-line-clamp:5;line-clamp:5;color:var(--calcite-color-text-1)}:host{width:100%;height:100%;position:absolute;top:0;left:0;display:flex;align-items:flex-start;box-sizing:border-box;--caption-gradient: linear-gradient( 180deg, rgb(255 255 255 / 100%) 0%, rgb(255 255 255 / 98.3%) 8.1%, rgb(255 255 255 / 95%) 15.5%, rgb(255 255 255 / 90%) 22.5%, rgb(255 255 255 / 83.3%) 29%, rgb(255 255 255 / 73.3%) 35%, rgb(255 255 255 / 65%) 41%, rgb(255 255 255 / 55%) 47%, rgb(255 255 255 / 45%) 53%, rgb(255 255 255 / 35%) 59%, rgb(255 255 255 / 26.7%) 65%, rgb(255 255 255 / 18.3%) 71%, rgb(255 255 255 / 10%) 77%, rgb(255 255 255 / 4%) 84.5%, rgb(255 255 255 / 1%) 91%, rgb(255 255 255 / 0%) 100% );--title-text-shadow: 0 1px 1px #fff3, 0 0 3px #fff2, 0 0 6px #fff2;--caption-gradient-mask-before: linear-gradient( 90deg, rgb(255 255 255 / 100%) 30%, rgb(255 255 255 / 98.3%) 35.6%, rgb(255 255 255 / 95%) 41%, rgb(255 255 255 / 90%) 46%, rgb(255 255 255 / 83.3%) 50.3%, rgb(255 255 255 / 73.3%) 54.5%, rgb(255 255 255 / 65%) 58.7%, rgb(255 255 255 / 55%) 62.9%, rgb(255 255 255 / 45%) 67%, rgb(255 255 255 / 35%) 71%, rgb(255 255 255 / 26.7%) 75.5%, rgb(255 255 255 / 18.3%) 80%, rgb(255 255 255 / 10%) 84%, rgb(255 255 255 / 4%) 89%, rgb(255 255 255 / 1%) 94%, rgb(255 255 255 / 0%) 100% );--caption-gradient-mask-before-RTL: linear-gradient( 270deg, rgb(255 255 255 / 100%) 30%, rgb(255 255 255 / 98.3%) 35.6%, rgb(255 255 255 / 95%) 41%, rgb(255 255 255 / 90%) 46%, rgb(255 255 255 / 83.3%) 50.3%, rgb(255 255 255 / 73.3%) 54.5%, rgb(255 255 255 / 65%) 58.7%, rgb(255 255 255 / 55%) 62.9%, rgb(255 255 255 / 45%) 67%, rgb(255 255 255 / 35%) 71%, rgb(255 255 255 / 26.7%) 75.5%, rgb(255 255 255 / 18.3%) 80%, rgb(255 255 255 / 10%) 84%, rgb(255 255 255 / 4%) 89%, rgb(255 255 255 / 1%) 94%, rgb(255 255 255 / 0%) 100% );--caption-gradient-mask-after: linear-gradient( 90deg, white calc(100% - 40px) , rgb(255 255 255 / 90%) calc(100% - 35px) , rgb(255 255 255 / 70%) calc(100% - 30px) , rgb(255 255 255 / 50%) calc(100% - 25px) , rgb(255 255 255 / 30%) calc(100% - 20px) , rgb(255 255 255 / 10%) calc(100% - 15px) , black 100% ), linear-gradient( 180deg, white calc(100% - 40px) , rgb(255 255 255 / 90%) calc(100% - 35px) , rgb(255 255 255 / 70%) calc(100% - 30px) , rgb(255 255 255 / 50%) calc(100% - 25px) , rgb(255 255 255 / 30%) calc(100% - 20px) , rgb(255 255 255 / 10%) calc(100% - 15px) , black 100% ), linear-gradient( 270deg, white calc(100% - 40px) , rgb(255 255 255 / 90%) calc(100% - 35px) , rgb(255 255 255 / 70%) calc(100% - 30px) , rgb(255 255 255 / 50%) calc(100% - 25px) , rgb(255 255 255 / 30%) calc(100% - 20px) , rgb(255 255 255 / 10%) calc(100% - 15px) , black 100% ), linear-gradient( 0deg, white calc(100% - 40px) , rgb(255 255 255 / 90%) calc(100% - 35px) , rgb(255 255 255 / 70%) calc(100% - 30px) , rgb(255 255 255 / 50%) calc(100% - 25px) , rgb(255 255 255 / 30%) calc(100% - 20px) , rgb(255 255 255 / 10%) calc(100% - 15px) , black 100% );--description-text-shadow: 0 .5px .5px #fff2, 0 1px 1px #fff2, 0 0 8px #fff2;--caption-title-font-size: max(var(--calcite-font-size-xxl), calc(18px + .64vw) );--caption-description-font-size: max(var(--calcite-font-size), calc(10px + .4vw) );--cover-description-font-size: max(var(--calcite-font-size-md), calc(10px + .5vw) );--cover-gradient-before: linear-gradient( 0deg, rgb(255 255 255 / 0%) 0, rgb(255 255 255 / 1%) 4%, rgb(255 255 255 / 4%) 7.7%, rgb(255 255 255 / 10%) 11.2%, rgb(255 255 255 / 18.3%) 14.5%, rgb(255 255 255 / 26.7%) 17.5%, rgb(255 255 255 / 35%) 20.5%, rgb(255 255 255 / 45%) 23.5%, rgb(255 255 255 / 55%) 26.5%, rgb(255 255 255 / 65%) 29.5%, rgb(255 255 255 / 73.3%) 32.5%, rgb(255 255 255 / 83.3%) 35.5%, rgb(255 255 255 / 90%) 38.5%, rgb(255 255 255 / 95%) 42.2%, rgb(255 255 255 / 98.3%) 46%, rgb(255 255 255 / 100%) 50%, rgb(255 255 255 / 98.3%) 54%, rgb(255 255 255 / 95%) 57.8%, rgb(255 255 255 / 90%) 61.5%, rgb(255 255 255 / 83.3%) 64.5%, rgb(255 255 255 / 73.3%) 67.5%, rgb(255 255 255 / 65%) 70.5%, rgb(255 255 255 / 55%) 73.5%, rgb(255 255 255 / 45%) 76.5%, rgb(255 255 255 / 35%) 79.5%, rgb(255 255 255 / 26.7%) 82.5%, rgb(255 255 255 / 18.3%) 85.5%, rgb(255 255 255 / 10%) 88.8%, rgb(255 255 255 / 4%) 92.3%, rgb(255 255 255 / 1%) 96%, rgb(255 255 255 / 0%) 100% );--cover-mask-before: linear-gradient( 90deg, rgb(255 255 255 / 0%) 0, rgb(255 255 255 / 1%) 3.2%, rgb(255 255 255 / 4%) 6.2%, rgb(255 255 255 / 10%) 9%, rgb(255 255 255 / 18.3%) 11.6%, rgb(255 255 255 / 26.7%) 14%, rgb(255 255 255 / 35%) 16.4%, rgb(255 255 255 / 45%) 18.8%, rgb(255 255 255 / 55%) 21.2%, rgb(255 255 255 / 65%) 23.6%, rgb(255 255 255 / 73.3%) 26%, rgb(255 255 255 / 83.3%) 28.4%, rgb(255 255 255 / 90%) 30.8%, rgb(255 255 255 / 95%) 33.8%, rgb(255 255 255 / 98.3%) 36.8%, rgb(255 255 255 / 100%) 40%, rgb(255 255 255 / 100%) 60%, rgb(255 255 255 / 98.3%) 63.2%, rgb(255 255 255 / 95%) 66.2%, rgb(255 255 255 / 90%) 69.2%, rgb(255 255 255 / 83.3%) 71.6%, rgb(255 255 255 / 73.3%) 74%, rgb(255 255 255 / 65%) 76.4%, rgb(255 255 255 / 55%) 78.8%, rgb(255 255 255 / 45%) 81.2%, rgb(255 255 255 / 35%) 83.6%, rgb(255 255 255 / 26.7%) 86%, rgb(255 255 255 / 18.3%) 88.4%, rgb(255 255 255 / 10%) 91%, rgb(255 255 255 / 4%) 93.9%, rgb(255 255 255 / 1%) 96.8%, rgb(255 255 255 / 0%) 100% );--cover-mask-after: linear-gradient( 90deg, white calc(100% - 40px) , rgb(255 255 255 / 90%) calc(100% - 35px) , rgb(255 255 255 / 70%) calc(100% - 30px) , rgb(255 255 255 / 50%) calc(100% - 25px) , rgb(255 255 255 / 30%) calc(100% - 20px) , rgb(255 255 255 / 10%) calc(100% - 15px) , black 100% ), linear-gradient( 180deg, white calc(100% - 40px) , rgb(255 255 255 / 90%) calc(100% - 35px) , rgb(255 255 255 / 70%) calc(100% - 30px) , rgb(255 255 255 / 50%) calc(100% - 25px) , rgb(255 255 255 / 30%) calc(100% - 20px) , rgb(255 255 255 / 10%) calc(100% - 15px) , black 100% ), linear-gradient( 270deg, white calc(100% - 40px) , rgb(255 255 255 / 90%) calc(100% - 35px) , rgb(255 255 255 / 70%) calc(100% - 30px) , rgb(255 255 255 / 50%) calc(100% - 25px) , rgb(255 255 255 / 30%) calc(100% - 20px) , rgb(255 255 255 / 10%) calc(100% - 15px) , black 100% ), linear-gradient( 0deg, white calc(100% - 40px) , rgb(255 255 255 / 90%) calc(100% - 35px) , rgb(255 255 255 / 70%) calc(100% - 30px) , rgb(255 255 255 / 50%) calc(100% - 25px) , rgb(255 255 255 / 30%) calc(100% - 20px) , rgb(255 255 255 / 10%) calc(100% - 15px) , black 100% );--cover-gradient-phone: linear-gradient( 0deg, rgb(255 255 255 / 0%) .59%, rgb(255 255 255 / 4%) 4.94%, rgb(255 255 255 / 50%) 25.87%, rgb(255 255 255 / 70%) 37.02%, rgb(255 255 255 / 80%) 48.43%, rgb(255 255 255 / 70%) 60.34%, rgb(255 255 255 / 30%) 80.55%, rgb(255 255 255 / 4%) 93.22%, rgb(255 255 255 / 0%) 99.74% );.fadeOut{opacity:1!important}}`,s=50,p=256,a=class extends l{constructor(){super(...arguments),this.transitionActive=!1,this.autoDestroyDisabled=!1,this.arcgisReady=g()}static{this.properties={_appliedSlide:16,slide:0,transitionActive:5,autoDestroyDisabled:5}}static{this.styles=x}async destroy(){await this.manager.destroy()}loaded(){this.manager.onLifecycle(()=>d(()=>({slide:this.slide,transitionActive:this.transitionActive}),({slide:e,transitionActive:r})=>{r?this._appliedSlide=void 0:this._appliedSlide=e},{initial:!0}))}render(){let e=this._appliedSlide?.layout;if(!this._appliedSlide||!e||e==="none")return null;let r=this._appliedSlide.title?.text,t=this._appliedSlide.description?.text,c=r?.length&&r.length>s?`${r?.substring(0,s)}...`:r,n=t?.length&&t.length>p?`${t?.substring(0,p)}...`:t;return e==="caption"?this._renderCaptions(c,n):this._renderCover(c,n)}_renderCover(e,r){return i`<div class="cover-container"><div class="cover"><div class="title">${e}</div><div class="cover-description">${r}</div></div></div>`}_renderCaptions(e,r){return i`<div class="captions-container"><div class="captions"><div class="title">${e}</div><div class="captions-description">${r}</div></div></div>`}};b("arcgis-presentation-captions",a);return a},"core/accessorSupport/decorators","core/reactiveUtils")