UNPKG

@arcgis/core

Version:

ArcGIS Maps SDK for JavaScript: A complete 2D and 3D mapping and data visualization API

2 lines • 12.1 kB
/*! For license information please see 5b56b271afb0fadf48b4.js.LICENSE.txt */ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[224],{79e3:(e,t,n)=>{n.d(t,{D:()=>A,a:()=>T,b:()=>k,g:()=>E,h:()=>x,i:()=>O,k:()=>C,l:()=>F,m:()=>U,p:()=>y,q:()=>N,r:()=>R,s:()=>D,t:()=>L,u:()=>P,v:()=>I,w:()=>M}),n(34088);var o=["input:not([inert])","select:not([inert])","textarea:not([inert])","a[href]:not([inert])","button:not([inert])","[tabindex]:not(slot):not([inert])","audio[controls]:not([inert])","video[controls]:not([inert])",'[contenteditable]:not([contenteditable="false"]):not([inert])',"details>summary:first-of-type:not([inert])","details:not([inert])"].join(","),i=typeof Element>"u",r=i?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,a=!i&&Element.prototype.getRootNode?function(e){var t;return null==e||null===(t=e.getRootNode)||void 0===t?void 0:t.call(e)}:function(e){return e?.ownerDocument},l=function e(t,n){var o;void 0===n&&(n=!0);var i=null==t||null===(o=t.getAttribute)||void 0===o?void 0:o.call(t,"inert");return""===i||"true"===i||n&&t&&e(t.parentNode)},c=function e(t,n,i){for(var a=[],c=Array.from(t);c.length;){var s=c.shift();if(!l(s,!1))if("SLOT"===s.tagName){var u=s.assignedElements(),d=e(u.length?u:s.children,!0,i);i.flatten?a.push.apply(a,d):a.push({scopeParent:s,candidates:d})}else{r.call(s,o)&&i.filter(s)&&(n||!t.includes(s))&&a.push(s);var f=s.shadowRoot||"function"==typeof i.getShadowRoot&&i.getShadowRoot(s),h=!l(f,!1)&&(!i.shadowRootFilter||i.shadowRootFilter(s));if(f&&h){var p=e(!0===f?s.children:f.children,!0,i);i.flatten?a.push.apply(a,p):a.push({scopeParent:s,candidates:p})}else c.unshift.apply(c,s.children)}}return a},s=function(e){return!isNaN(parseInt(e.getAttribute("tabindex"),10))},u=function(e){if(!e)throw new Error("No node provided");return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||function(e){var t,n=null==e||null===(t=e.getAttribute)||void 0===t?void 0:t.call(e,"contenteditable");return""===n||"true"===n}(e))&&!s(e)?0:e.tabIndex},d=function(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex},f=function(e){return"INPUT"===e.tagName},h=function(e){var t=e.getBoundingClientRect(),n=t.width,o=t.height;return 0===n&&0===o},p=function(e,t){return!(t.disabled||l(t)||function(e){return f(e)&&"hidden"===e.type}(t)||function(e,t){var n=t.displayCheck,o=t.getShadowRoot;if("hidden"===getComputedStyle(e).visibility)return!0;var i=r.call(e,"details>summary:first-of-type")?e.parentElement:e;if(r.call(i,"details:not([open]) *"))return!0;if(n&&"full"!==n&&"legacy-full"!==n){if("non-zero-area"===n)return h(e)}else{if("function"==typeof o){for(var l=e;e;){var c=e.parentElement,s=a(e);if(c&&!c.shadowRoot&&!0===o(c))return h(e);e=e.assignedSlot?e.assignedSlot:c||s===e.ownerDocument?c:s.host}e=l}if(function(e){var t,n,o,i,r=e&&a(e),l=null===(t=r)||void 0===t?void 0:t.host,c=!1;if(r&&r!==e)for(c=!!(null!==(n=l)&&void 0!==n&&null!==(o=n.ownerDocument)&&void 0!==o&&o.contains(l)||null!=e&&null!==(i=e.ownerDocument)&&void 0!==i&&i.contains(e));!c&&l;){var s,u,d;c=!(null===(u=l=null===(s=r=a(l))||void 0===s?void 0:s.host)||void 0===u||null===(d=u.ownerDocument)||void 0===d||!d.contains(l))}return c}(e))return!e.getClientRects().length;if("legacy-full"!==n)return!0}return!1}(t,e)||function(e){return"DETAILS"===e.tagName&&Array.prototype.slice.apply(e.children).some((function(e){return"SUMMARY"===e.tagName}))}(t)||function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var t=e.parentElement;t;){if("FIELDSET"===t.tagName&&t.disabled){for(var n=0;n<t.children.length;n++){var o=t.children.item(n);if("LEGEND"===o.tagName)return!!r.call(t,"fieldset[disabled] *")||!o.contains(e)}return!0}t=t.parentElement}return!1}(t))},m=function(e,t){return!(function(e){return function(e){return f(e)&&"radio"===e.type}(e)&&!function(e){if(!e.name)return!0;var t,n=e.form||a(e),o=function(e){return n.querySelectorAll('input[type="radio"][name="'+e+'"]')};if(typeof window<"u"&&typeof window.CSS<"u"&&"function"==typeof window.CSS.escape)t=o(window.CSS.escape(e.name));else try{t=o(e.name)}catch(e){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",e.message),!1}var i=function(e,t){for(var n=0;n<e.length;n++)if(e[n].checked&&e[n].form===t)return e[n]}(t,e.form);return!i||i===e}(e)}(t)||u(t)<0||!p(e,t))},b=function(e){var t=parseInt(e.getAttribute("tabindex"),10);return!!(isNaN(t)||t>=0)},g=function e(t){var n=[],o=[];return t.forEach((function(t,i){var r=!!t.scopeParent,a=r?t.scopeParent:t,l=function(e,t){var n=u(e);return n<0&&t&&!s(e)?0:n}(a,r),c=r?e(t.candidates):a;0===l?r?n.push.apply(n,c):n.push(a):o.push({documentOrder:i,tabIndex:l,item:t,isScope:r,content:c})})),o.sort(d).reduce((function(e,t){return t.isScope?e.push.apply(e,t.content):e.push(t.content),e}),[]).concat(n)},v=function(e,t){var n;return n=(t=t||{}).getShadowRoot?c([e],t.includeContainer,{filter:m.bind(null,t),flatten:!1,getShadowRoot:t.getShadowRoot,shadowRootFilter:b}):function(e,t,n){if(l(e))return[];var i=Array.prototype.slice.apply(e.querySelectorAll(o));return t&&r.call(e,o)&&i.unshift(e),i.filter(n)}(e,t.includeContainer,m.bind(null,t)),g(n)};const y={getShadowRoot:!0};function E(e){const t=C(e,"[dir]");return t?t.getAttribute("dir"):"ltr"}function w(e){return e.getRootNode()}function S(e){return e.host||null}function N(e,{selector:t,id:n}){if(!e)return null;e.assignedSlot&&(e=e.assignedSlot);const o=w(e);return(n?"getElementById"in o?o.getElementById(n):null:t?o.querySelector(t):null)||N(S(o),{selector:t,id:n})}function C(e,t){return e?e.closest(t)||C(S(w(e)),t):null}async function k(e){if(e)return function(e){return"function"==typeof e?.setFocus}(e)?e.setFocus():e.focus()}function x(e){(function(e){if(e)return v(e,y)[0]??e})(e)?.focus()}function I(e,t,n){return"string"==typeof t&&""!==t?t:""===t||!0===t?e[n]:void 0}function L(e){return(!!e).toString()}function R(e){return T(e)||function(e){return!!function(e){return function(e){return e.currentTarget.assignedNodes({flatten:!0})}(e).filter((e=>e.nodeType===Node.TEXT_NODE)).map((e=>e.textContent)).join("").trim()}(e)}(e)}function A(e){for(const t of e.childNodes)if(t.nodeType===Node.TEXT_NODE&&""!==t.textContent?.trim()||t.nodeType===Node.ELEMENT_NODE)return!0;return!1}function T(e){return!!D(e).length}function D(e,t){return function(e,t){const n=e.assignedElements({flatten:!0});return t?function(e,t){return e.filter((e=>e.matches(t)))}(n,t):n}(e.target,t)}function O(e){return!(!e.isPrimary||0!==e.button)}function P(e){return 0===e.detail}function F(e,t){if(e.parentNode!==t.parentNode)return!1;const n=Array.from(e.parentNode.children);return n.indexOf(e)<n.indexOf(t)}async function M(e,t,n,o){return async function(e,t,n,o,i){let r=q(e,n,t);if(r||(await z(),r=q(e,n,t)),!r)return async function(e,t){await z(),e?.(),await z(),t?.()}(o,i);o?.();try{await r.finished}catch{}finally{i?.()}}(e,t,"transition",n,o)}function q(e,t,n){const o="transition"===t?"transitionProperty":"animationName";return e.getAnimations().find((e=>e[o]===n))}function z(){return new Promise((e=>requestAnimationFrame((()=>e()))))}function U(e){return e.endsWith("px")}},93174:(e,t,n)=>{n.d(t,{a:()=>w,b:()=>a,c:()=>p,d:()=>m,g:()=>g,l:()=>r});var o=n(79e3);const i="calciteInternalLabelClick",r="calciteInternalLabelConnected",a="calciteInternalLabelDisconnected",l="calcite-label",c=new WeakMap,s=new WeakMap,u=new WeakMap,d=new WeakMap,f=new Set,h=e=>{const{id:t}=e,n=t&&(0,o.q)(e,{selector:`${l}[for="${t}"]`});if(n)return n;const i=(0,o.k)(e,l);return!i||function(e,t){let n;const o="custom-element-ancestor-check",i=o=>{o.stopImmediatePropagation();const i=o.composedPath();n=i.slice(i.indexOf(t),i.indexOf(e))};return e.addEventListener(o,i,{once:!0}),t.dispatchEvent(new CustomEvent(o,{composed:!0,bubbles:!0})),e.removeEventListener(o,i),n.filter((n=>n!==t&&n!==e)).filter((e=>e.tagName?.includes("-"))).length>0}(i,e)?null:i};function p(e){if(!e)return;const t=h(e.el);if(s.has(t)&&t===e.labelEl||!t&&f.has(e))return;const n=E.bind(e);if(t){e.labelEl=t;const o=c.get(t)||[];o.push(e),c.set(t,o.sort(b)),s.has(e.labelEl)||(s.set(e.labelEl,v),e.labelEl.addEventListener(i,v)),f.delete(e),document.removeEventListener(r,u.get(e)),d.set(e,n),document.addEventListener(a,n)}else f.has(e)||(n(),document.removeEventListener(a,d.get(e)))}function m(e){if(!e||(f.delete(e),document.removeEventListener(r,u.get(e)),document.removeEventListener(a,d.get(e)),u.delete(e),d.delete(e),!e.labelEl))return;const t=c.get(e.labelEl);1===t.length&&(e.labelEl.removeEventListener(i,s.get(e.labelEl)),s.delete(e.labelEl)),c.set(e.labelEl,t.filter((t=>t!==e)).sort(b)),e.labelEl=null}function b(e,t){return(0,o.l)(e.el,t.el)?-1:1}function g(e){return e.label||e.labelEl?.textContent?.trim()||""}function v(e){const t=e.detail.sourceEvent.target,n=c.get(this),o=n.find((e=>e.el===t));if(n.includes(o))return;const i=n[0];i.disabled||i.onLabelClick(e)}function y(){f.has(this)&&p(this)}function E(){f.add(this);const e=u.get(this)||y.bind(this);u.set(this,e),document.addEventListener(r,e)}async function w(e){if(await e.componentOnReady(),c.has(e))return;const t=e.ownerDocument?.getElementById(e.for);t&&requestAnimationFrame((()=>{for(const e of f)if(e.el===t){p(e);break}}))}},87843:(e,t,n)=>{n.r(t),n.d(t,{Label:()=>s});var o=n(34088),i=n(12618),r=n(26031),a=n(93174),l=n(33826);const c=l.AH`:host([disabled]){cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled)}:host([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}:host{display:flex}:host([alignment=start]){text-align:start}:host([alignment=end]){text-align:end}:host([alignment=center]){text-align:center}:host([scale=s]) .container{gap:.25rem;font-size:var(--calcite-font-size--2);line-height:1rem;margin-block-end:var(--calcite-label-margin-bottom, .5rem)}:host([scale=m]) .container{gap:.5rem;font-size:var(--calcite-font-size--1);line-height:1rem;margin-block-end:var(--calcite-label-margin-bottom, .75rem)}:host([scale=l]) .container{gap:.5rem;font-size:var(--calcite-font-size-0);line-height:1.25rem;margin-block-end:var(--calcite-label-margin-bottom, 1rem)}:host .container{margin-inline:0px;margin-block-start:0px;inline-size:100%;line-height:1.375;color:var(--calcite-color-text-1);color:var(--calcite-label-text-color, var(--calcite-color-text-1))}:host([layout=default]) .container{display:flex;flex-direction:column}:host([layout=inline]) .container,:host([layout=inline-space-between]) .container{display:flex;flex-direction:row;align-items:center;gap:.5rem}:host([layout=inline][scale=l]) .container{gap:.75rem}:host([layout=inline-space-between]) .container{justify-content:space-between}:host([disabled])>.container{opacity:var(--calcite-opacity-disabled)}:host([disabled]) ::slotted(*[disabled]),:host([disabled]) ::slotted(*[disabled] *){--tw-bg-opacity: 1}:host([disabled]) ::slotted(calcite-input-message:not([active])){--tw-bg-opacity: 0}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}:host([hidden]){display:none}[hidden]{display:none}`;class s extends r.WF{constructor(){super(),this.alignment="start",this.layout="default",this.scale="m",this.calciteInternalLabelClick=(0,r.lh)({bubbles:!1,cancelable:!1}),this.listen("click",this.labelClickHandler)}static{this.properties={alignment:3,for:3,layout:3,scale:3}}static{this.styles=c}connectedCallback(){super.connectedCallback(),document.dispatchEvent(new CustomEvent(a.l))}willUpdate(e){e.has("for")&&(0,a.a)(this.el)}disconnectedCallback(){super.disconnectedCallback(),document.dispatchEvent(new CustomEvent(a.b))}labelClickHandler(e){"Range"!==window.getSelection()?.type&&this.calciteInternalLabelClick.emit({sourceEvent:e})}render(){return i.qy`<div class=${(0,r.CP)("container")}><slot></slot></div>`}}(0,o.c)("calcite-label",s)}}]);