/* COPYRIGHT Esri - https://js.arcgis.com/5.0/LICENSE.txt */
import a from"./R3ACKBE3.js";import"./7TXQADKX.js";import{N as c,O as s,U as l,a as n,b as o}from"./IWZQMWZ5.js";import"./ALDX5YZO.js";export default $arcgis.t(([{watch:g},{renderingSanitizer:m},{f:h,q:r}])=>{var f=n`.loader-container{display:flex;align-items:center;justify-content:center;padding:0;height:150px}.root{font-size:var(--calcite-font-size);line-height:var(--calcite-font-line-height-relative-normal)}.root h1,.root h2,.root h3,.root h4,.root h5,.root h6{margin:var(--calcite-spacing-sm) 0;line-height:var(--calcite-font-line-height-relative-tight);letter-spacing:0;color:var(--calcite-color-text-1);font-weight:var(--calcite-font-weight-semibold)}.root h1{font-size:var(--calcite-font-size-xxl)}.root h2{font-size:var(--calcite-font-size-xl)}.root h3{font-size:var(--calcite-font-size-lg)}.root h4,.root h5,.root h6{font-size:var(--calcite-font-size)}.description{margin-bottom:var(--calcite-spacing-xs)}.root p{margin:0 0 var(--calcite-spacing-xs);font-size:var(--calcite-font-size)}.root p:last-child{margin-block-end:0}.root img{max-width:100%;max-height:100%;image-orientation:from-image}.root video{max-width:100%;max-height:100%}.root figure{margin:0;padding:0}.root figcaption{display:block;margin:var(--calcite-spacing-xs) 0 0;padding:0;font-size:var(--calcite-font-size-sm);font-style:italic}.root ul,.root ol{margin-block:var(--calcite-spacing-sm)}.root ul:first-child,.root ol:first-child{margin-block-start:0}.root a,.root a:hover,.root a:focus{color:var(--calcite-color-text-link)}`,a=class extends s{static{this.properties={_loadingPromise:16,_created:16,creator:1,destroyer:0,graphic:0}}static{this.styles=f}loaded(){this.manager.onLifecycle(()=>g(()=>this.creator,t=>{this._destroyContent(),this._createContent(t)},{initial:!0}))}async _createContent(t){let{graphic:e}=this;if(!e||!t)return;let i=r({type:"content",value:t,event:{graphic:e}});this._loadingPromise=i;let d=await i;i===this._loadingPromise&&(this._loadingPromise=void 0,this._created=d)}_destroyContent(){let{_created:t,graphic:e,destroyer:i}=this;t&&e&&(r({type:"content",value:i,event:{graphic:e}}),this._created=null)}_addTargetToAnchors(t){t&&Array.from(t.querySelectorAll("a")).forEach(e=>{h(e.href)&&!e.hasAttribute("target")&&e.setAttribute("target","_blank")})}render(){return o`<div class="root">${this._loadingPromise?this._renderLoading():this._renderCreated()}</div>`}_renderLoading(){return o`<div class="loader-container"><calcite-loader inline label></calcite-loader></div>`}_renderCreated(){let{_created:t}=this;return t instanceof HTMLElement?t:typeof t=="string"?o`<div .innerHTML=${m.sanitize(t)??""} ${c(this._addTargetToAnchors)}></div>`:null}};l("arcgis-feature-content",a);return a},"core/reactiveUtils","applications/Components/sanitizerUtils",a)