@hotosm/ui 0.4.0 → 0.6.0

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.
Files changed (64) hide show
  1. package/README.md +27 -8
  2. package/dist/chunks/chunk.3LBUXCAP.js +1 -0
  3. package/dist/chunks/{chunk.EOTM323U.js → chunk.7BVHA4G6.js} +1 -1
  4. package/dist/chunks/chunk.7PROWJNJ.js +122 -0
  5. package/dist/chunks/chunk.AL4CJN73.js +1 -0
  6. package/dist/chunks/chunk.ARF626EG.js +59 -0
  7. package/dist/chunks/{chunk.YH5QYI7V.js → chunk.BD4Q32VT.js} +1 -1
  8. package/dist/chunks/chunk.BORCUX2M.js +1 -0
  9. package/dist/chunks/chunk.CQO3GWTI.js +32 -0
  10. package/dist/chunks/chunk.G6ZZSFVM.js +1 -0
  11. package/dist/chunks/{chunk.EYNFK5TH.js → chunk.GEAU3JJH.js} +1 -1
  12. package/dist/chunks/chunk.KO4EOD3I.js +1 -0
  13. package/dist/chunks/{chunk.6TJUNYFL.js → chunk.LHZ7Q2M3.js} +1 -1
  14. package/dist/chunks/{chunk.BB52VMVE.js → chunk.MZOQNTPX.js} +2 -2
  15. package/dist/chunks/chunk.OICCPCO3.js +1 -0
  16. package/dist/chunks/{chunk.VA2JNCZO.js → chunk.ORZ5STBX.js} +1 -1
  17. package/dist/chunks/{chunk.3DAASGWT.js → chunk.PBBH42B6.js} +1 -1
  18. package/dist/chunks/{chunk.LR75BDGN.js → chunk.PLECT4NZ.js} +1 -1
  19. package/dist/chunks/chunk.QABMDRWR.js +28 -0
  20. package/dist/chunks/chunk.SBUFNOMY.js +1 -0
  21. package/dist/chunks/{chunk.G3Z3BOX2.js → chunk.U4AAC5ID.js} +2 -2
  22. package/dist/chunks/chunk.WTTPHBL3.js +105 -0
  23. package/dist/chunks/chunk.XEZQ5ZRE.js +1 -0
  24. package/dist/chunks/chunk.ZETV7TDG.js +25 -0
  25. package/dist/components/consent/consent.component.js +1 -1
  26. package/dist/components/consent/consent.js +1 -1
  27. package/dist/components/consent/consent.styles.js +1 -1
  28. package/dist/components/file-input-dropzone/file-input-dropzone.component.js +1 -1
  29. package/dist/components/file-input-dropzone/file-input-dropzone.js +1 -1
  30. package/dist/components/file-input-dropzone/file-input-dropzone.styles.js +1 -1
  31. package/dist/components/header/header.component.js +1 -1
  32. package/dist/components/header/header.js +1 -1
  33. package/dist/components/header/header.styles.js +1 -1
  34. package/dist/components/icons.js +1 -1
  35. package/dist/components/list-card/list-card.component.js +1 -1
  36. package/dist/components/list-card/list-card.js +1 -1
  37. package/dist/components/list-card/list-card.styles.js +1 -1
  38. package/dist/components/logo/logo.component.js +1 -1
  39. package/dist/components/logo/logo.js +1 -1
  40. package/dist/components/logo/logo.styles.js +1 -1
  41. package/dist/components/tool-menu/tool-menu.component.d.ts +13 -0
  42. package/dist/components/tool-menu/tool-menu.component.js +1 -0
  43. package/dist/components/tool-menu/tool-menu.d.ts +7 -0
  44. package/dist/components/tool-menu/tool-menu.js +1 -0
  45. package/dist/components/tool-menu/tool-menu.styles.d.ts +1 -0
  46. package/dist/components/tool-menu/tool-menu.styles.js +1 -0
  47. package/dist/components/tracking/tracking.component.js +1 -1
  48. package/dist/components/tracking/tracking.js +1 -1
  49. package/dist/hotosm-ui.d.ts +9 -8
  50. package/dist/hotosm-ui.js +1 -1
  51. package/dist/style.css +5 -3
  52. package/dist/themes/hot-wa.css +3 -3
  53. package/package.json +10 -6
  54. package/dist/chunks/chunk.5AWU5BEU.js +0 -1
  55. package/dist/chunks/chunk.EAG35WPB.js +0 -122
  56. package/dist/chunks/chunk.FBYBLQYY.js +0 -25
  57. package/dist/chunks/chunk.JFO3Z4VS.js +0 -1
  58. package/dist/chunks/chunk.KNTMZWRV.js +0 -28
  59. package/dist/chunks/chunk.L3MJ3UC7.js +0 -1
  60. package/dist/chunks/chunk.M3ZIZPKF.js +0 -1
  61. package/dist/chunks/chunk.OFDFUT7C.js +0 -1
  62. package/dist/chunks/chunk.VNFZXHID.js +0 -1
  63. package/dist/chunks/chunk.XNPNEHIJ.js +0 -1
  64. package/dist/chunks/chunk.ZU62FSGZ.js +0 -105
@@ -1,25 +0,0 @@
1
- import{b as d,c as m}from"./chunk.KNTMZWRV.js";import{a as l,b as p}from"./chunk.N2W26RCT.js";var y={attribute:!0,type:String,converter:d,reflect:!1,hasChanged:m},g=(e=y,s,t)=>{let{kind:a,metadata:c}=t,i=globalThis.litPropertyMetadata.get(c);if(i===void 0&&globalThis.litPropertyMetadata.set(c,i=new Map),a==="setter"&&((e=Object.create(e)).wrapped=!0),i.set(t.name,e),a==="accessor"){let{name:n}=t;return{set(o){let r=s.get.call(this);s.set.call(this,o),this.requestUpdate(n,r,e)},init(o){return o!==void 0&&this.C(n,void 0,e,o),o}}}if(a==="setter"){let{name:n}=t;return function(o){let r=this[n];s.call(this,o),this.requestUpdate(n,r,e)}}throw Error("Unsupported decorator location: "+a)};function f(e){return(s,t)=>typeof t=="object"?g(e,s,t):((a,c,i)=>{let n=c.hasOwnProperty(i);return c.constructor.createProperty(i,a),n?Object.getOwnPropertyDescriptor(c,i):void 0})(e,s,t)}function v(e){return f(p(l({},e),{state:!0,attribute:!1}))}var u=(e,s,t)=>(t.configurable=!0,t.enumerable=!0,Reflect.decorate&&typeof s!="object"&&Object.defineProperty(e,s,t),t);function S(e,s){return(t,a,c)=>{let i=n=>{var o,r;return(r=(o=n.renderRoot)==null?void 0:o.querySelector(e))!=null?r:null};if(s){let{get:n,set:o}=typeof a=="object"?t:c!=null?c:(()=>{let r=Symbol();return{get(){return this[r]},set(h){this[r]=h}}})();return u(t,a,{get(){let r=n.call(this);return r===void 0&&(r=i(this),(r!==null||this.hasUpdated)&&o.call(this,r)),r}})}return u(t,a,{get(){return i(this)}})}}export{f as a,v as b,S as c};
2
- /*! Bundled license information:
3
-
4
- @lit/reactive-element/decorators/property.js:
5
- @lit/reactive-element/decorators/state.js:
6
- @lit/reactive-element/decorators/base.js:
7
- @lit/reactive-element/decorators/query.js:
8
- @lit/reactive-element/decorators/custom-element.js:
9
- @lit/reactive-element/decorators/event-options.js:
10
- @lit/reactive-element/decorators/query-all.js:
11
- @lit/reactive-element/decorators/query-async.js:
12
- @lit/reactive-element/decorators/query-assigned-nodes.js:
13
- (**
14
- * @license
15
- * Copyright 2017 Google LLC
16
- * SPDX-License-Identifier: BSD-3-Clause
17
- *)
18
-
19
- @lit/reactive-element/decorators/query-assigned-elements.js:
20
- (**
21
- * @license
22
- * Copyright 2021 Google LLC
23
- * SPDX-License-Identifier: BSD-3-Clause
24
- *)
25
- */
@@ -1 +0,0 @@
1
- import{b as e}from"./chunk.VA2JNCZO.js";var n=e;customElements.define("hot-consent",e);export{n as a};
@@ -1,28 +0,0 @@
1
- var N=globalThis,L=N.ShadowRoot&&(N.ShadyCSS===void 0||N.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,D=Symbol(),X=new WeakMap,w=class{constructor(t,e,s){if(this._$cssResult$=!0,s!==D)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o,e=this.t;if(L&&t===void 0){let s=e!==void 0&&e.length===1;s&&(t=X.get(e)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),s&&X.set(e,t))}return t}toString(){return this.cssText}},Y=o=>new w(typeof o=="string"?o:o+"",void 0,D),vt=(o,...t)=>{let e=o.length===1?o[0]:t.reduce(((s,i,r)=>s+(n=>{if(n._$cssResult$===!0)return n.cssText;if(typeof n=="number")return n;throw Error("Value passed to 'css' function must be a 'css' function result: "+n+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(i)+o[r+1]),o[0]);return new w(e,o,D)},tt=(o,t)=>{if(L)o.adoptedStyleSheets=t.map((e=>e instanceof CSSStyleSheet?e:e.styleSheet));else for(let e of t){let s=document.createElement("style"),i=N.litNonce;i!==void 0&&s.setAttribute("nonce",i),s.textContent=e.cssText,o.appendChild(s)}},B=L?o=>o:o=>o instanceof CSSStyleSheet?(t=>{let e="";for(let s of t.cssRules)e+=s.cssText;return Y(e)})(o):o;var{is:St,defineProperty:Et,getOwnPropertyDescriptor:bt,getOwnPropertyNames:Ct,getOwnPropertySymbols:wt,getPrototypeOf:xt}=Object,f=globalThis,et=f.trustedTypes,Pt=et?et.emptyScript:"",j=f.reactiveElementPolyfillSupport,x=(o,t)=>o,z={toAttribute(o,t){switch(t){case Boolean:o=o?Pt:null;break;case Object:case Array:o=o==null?o:JSON.stringify(o)}return o},fromAttribute(o,t){let e=o;switch(t){case Boolean:e=o!==null;break;case Number:e=o===null?null:Number(o);break;case Object:case Array:try{e=JSON.parse(o)}catch(s){e=null}}return e}},rt=(o,t)=>!St(o,t),st={attribute:!0,type:String,converter:z,reflect:!1,useDefault:!1,hasChanged:rt},it,ot;(it=Symbol.metadata)!=null||(Symbol.metadata=Symbol("metadata")),(ot=f.litPropertyMetadata)!=null||(f.litPropertyMetadata=new WeakMap);var $=class extends HTMLElement{static addInitializer(t){var e;this._$Ei(),((e=this.l)!=null?e:this.l=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=st){if(e.state&&(e.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(t)&&((e=Object.create(e)).wrapped=!0),this.elementProperties.set(t,e),!e.noAccessor){let s=Symbol(),i=this.getPropertyDescriptor(t,s,e);i!==void 0&&Et(this.prototype,t,i)}}static getPropertyDescriptor(t,e,s){var n;let{get:i,set:r}=(n=bt(this.prototype,t))!=null?n:{get(){return this[e]},set(a){this[e]=a}};return{get:i,set(a){let h=i==null?void 0:i.call(this);r==null||r.call(this,a),this.requestUpdate(t,h,s)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){var e;return(e=this.elementProperties.get(t))!=null?e:st}static _$Ei(){if(this.hasOwnProperty(x("elementProperties")))return;let t=xt(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(x("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(x("properties"))){let e=this.properties,s=[...Ct(e),...wt(e)];for(let i of s)this.createProperty(i,e[i])}let t=this[Symbol.metadata];if(t!==null){let e=litPropertyMetadata.get(t);if(e!==void 0)for(let[s,i]of e)this.elementProperties.set(s,i)}this._$Eh=new Map;for(let[e,s]of this.elementProperties){let i=this._$Eu(e,s);i!==void 0&&this._$Eh.set(i,e)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){let e=[];if(Array.isArray(t)){let s=new Set(t.flat(1/0).reverse());for(let i of s)e.unshift(B(i))}else t!==void 0&&e.push(B(t));return e}static _$Eu(t,e){let s=e.attribute;return s===!1?void 0:typeof s=="string"?s:typeof t=="string"?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){var t;this._$ES=new Promise((e=>this.enableUpdating=e)),this._$AL=new Map,this._$E_(),this.requestUpdate(),(t=this.constructor.l)==null||t.forEach((e=>e(this)))}addController(t){var e,s;((e=this._$EO)!=null?e:this._$EO=new Set).add(t),this.renderRoot!==void 0&&this.isConnected&&((s=t.hostConnected)==null||s.call(t))}removeController(t){var e;(e=this._$EO)==null||e.delete(t)}_$E_(){let t=new Map,e=this.constructor.elementProperties;for(let s of e.keys())this.hasOwnProperty(s)&&(t.set(s,this[s]),delete this[s]);t.size>0&&(this._$Ep=t)}createRenderRoot(){var e;let t=(e=this.shadowRoot)!=null?e:this.attachShadow(this.constructor.shadowRootOptions);return tt(t,this.constructor.elementStyles),t}connectedCallback(){var t,e;(t=this.renderRoot)!=null||(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(e=this._$EO)==null||e.forEach((s=>{var i;return(i=s.hostConnected)==null?void 0:i.call(s)}))}enableUpdating(t){}disconnectedCallback(){var t;(t=this._$EO)==null||t.forEach((e=>{var s;return(s=e.hostDisconnected)==null?void 0:s.call(e)}))}attributeChangedCallback(t,e,s){this._$AK(t,s)}_$ET(t,e){var r;let s=this.constructor.elementProperties.get(t),i=this.constructor._$Eu(t,s);if(i!==void 0&&s.reflect===!0){let n=(((r=s.converter)==null?void 0:r.toAttribute)!==void 0?s.converter:z).toAttribute(e,s.type);this._$Em=t,n==null?this.removeAttribute(i):this.setAttribute(i,n),this._$Em=null}}_$AK(t,e){var r,n,a;let s=this.constructor,i=s._$Eh.get(t);if(i!==void 0&&this._$Em!==i){let h=s.getPropertyOptions(i),l=typeof h.converter=="function"?{fromAttribute:h.converter}:((r=h.converter)==null?void 0:r.fromAttribute)!==void 0?h.converter:z;this._$Em=i;let c=l.fromAttribute(e,h.type);this[i]=(a=c!=null?c:(n=this._$Ej)==null?void 0:n.get(i))!=null?a:c,this._$Em=null}}requestUpdate(t,e,s){var i,r;if(t!==void 0){let n=this.constructor,a=this[t];if(s!=null||(s=n.getPropertyOptions(t)),!(((i=s.hasChanged)!=null?i:rt)(a,e)||s.useDefault&&s.reflect&&a===((r=this._$Ej)==null?void 0:r.get(t))&&!this.hasAttribute(n._$Eu(t,s))))return;this.C(t,e,s)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(t,e,{useDefault:s,reflect:i,wrapped:r},n){var a,h,l;s&&!((a=this._$Ej)!=null?a:this._$Ej=new Map).has(t)&&(this._$Ej.set(t,(h=n!=null?n:e)!=null?h:this[t]),r!==!0||n!==void 0)||(this._$AL.has(t)||(this.hasUpdated||s||(e=void 0),this._$AL.set(t,e)),i===!0&&this._$Em!==t&&((l=this._$Eq)!=null?l:this._$Eq=new Set).add(t))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(e){Promise.reject(e)}let t=this.scheduleUpdate();return t!=null&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var s,i;if(!this.isUpdatePending)return;if(!this.hasUpdated){if((s=this.renderRoot)!=null||(this.renderRoot=this.createRenderRoot()),this._$Ep){for(let[n,a]of this._$Ep)this[n]=a;this._$Ep=void 0}let r=this.constructor.elementProperties;if(r.size>0)for(let[n,a]of r){let{wrapped:h}=a,l=this[n];h!==!0||this._$AL.has(n)||l===void 0||this.C(n,void 0,a,l)}}let t=!1,e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),(i=this._$EO)==null||i.forEach((r=>{var n;return(n=r.hostUpdate)==null?void 0:n.call(r)})),this.update(e)):this._$EM()}catch(r){throw t=!1,this._$EM(),r}t&&this._$AE(e)}willUpdate(t){}_$AE(t){var e;(e=this._$EO)==null||e.forEach((s=>{var i;return(i=s.hostUpdated)==null?void 0:i.call(s)})),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Eq&&(this._$Eq=this._$Eq.forEach((e=>this._$ET(e,this[e])))),this._$EM()}updated(t){}firstUpdated(t){}},nt;$.elementStyles=[],$.shadowRootOptions={mode:"open"},$[x("elementProperties")]=new Map,$[x("finalized")]=new Map,j==null||j({ReactiveElement:$}),((nt=f.reactiveElementVersions)!=null?nt:f.reactiveElementVersions=[]).push("2.1.1");var U=globalThis,k=U.trustedTypes,ht=k?k.createPolicy("lit-html",{createHTML:o=>o}):void 0,$t="$lit$",A=`lit$${Math.random().toFixed(9).slice(2)}$`,_t="?"+A,Ut=`<${_t}>`,y=document,O=()=>y.createComment(""),H=o=>o===null||typeof o!="object"&&typeof o!="function",J=Array.isArray,Ot=o=>J(o)||typeof(o==null?void 0:o[Symbol.iterator])=="function",I=`[
2
- \f\r]`,P=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,at=/-->/g,lt=/>/g,m=RegExp(`>|${I}(?:([^\\s"'>=/]+)(${I}*=${I}*(?:[^
3
- \f\r"'\`<>=]|("|')|))|$)`,"g"),ct=/'/g,dt=/"/g,ft=/^(?:script|style|textarea|title)$/i,G=o=>(t,...e)=>({_$litType$:o,strings:t,values:e}),Lt=G(1),kt=G(2),Dt=G(3),v=Symbol.for("lit-noChange"),p=Symbol.for("lit-nothing"),pt=new WeakMap,g=y.createTreeWalker(y,129);function At(o,t){if(!J(o)||!o.hasOwnProperty("raw"))throw Error("invalid template strings array");return ht!==void 0?ht.createHTML(t):t}var Ht=(o,t)=>{let e=o.length-1,s=[],i,r=t===2?"<svg>":t===3?"<math>":"",n=P;for(let a=0;a<e;a++){let h=o[a],l,c,d=-1,u=0;for(;u<h.length&&(n.lastIndex=u,c=n.exec(h),c!==null);)u=n.lastIndex,n===P?c[1]==="!--"?n=at:c[1]!==void 0?n=lt:c[2]!==void 0?(ft.test(c[2])&&(i=RegExp("</"+c[2],"g")),n=m):c[3]!==void 0&&(n=m):n===m?c[0]===">"?(n=i!=null?i:P,d=-1):c[1]===void 0?d=-2:(d=n.lastIndex-c[2].length,l=c[1],n=c[3]===void 0?m:c[3]==='"'?dt:ct):n===dt||n===ct?n=m:n===at||n===lt?n=P:(n=m,i=void 0);let _=n===m&&o[a+1].startsWith("/>")?" ":"";r+=n===P?h+Ut:d>=0?(s.push(l),h.slice(0,d)+$t+h.slice(d)+A+_):h+A+(d===-2?a:_)}return[At(o,r+(o[e]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),s]},R=class o{constructor({strings:t,_$litType$:e},s){let i;this.parts=[];let r=0,n=0,a=t.length-1,h=this.parts,[l,c]=Ht(t,e);if(this.el=o.createElement(l,s),g.currentNode=this.el.content,e===2||e===3){let d=this.el.content.firstChild;d.replaceWith(...d.childNodes)}for(;(i=g.nextNode())!==null&&h.length<a;){if(i.nodeType===1){if(i.hasAttributes())for(let d of i.getAttributeNames())if(d.endsWith($t)){let u=c[n++],_=i.getAttribute(d).split(A),M=/([.?@])?(.*)/.exec(u);h.push({type:1,index:r,name:M[2],strings:_,ctor:M[1]==="."?q:M[1]==="?"?K:M[1]==="@"?Z:b}),i.removeAttribute(d)}else d.startsWith(A)&&(h.push({type:6,index:r}),i.removeAttribute(d));if(ft.test(i.tagName)){let d=i.textContent.split(A),u=d.length-1;if(u>0){i.textContent=k?k.emptyScript:"";for(let _=0;_<u;_++)i.append(d[_],O()),g.nextNode(),h.push({type:2,index:++r});i.append(d[u],O())}}}else if(i.nodeType===8)if(i.data===_t)h.push({type:2,index:r});else{let d=-1;for(;(d=i.data.indexOf(A,d+1))!==-1;)h.push({type:7,index:r}),d+=A.length-1}r++}}static createElement(t,e){let s=y.createElement("template");return s.innerHTML=t,s}};function E(o,t,e=o,s){var n,a,h;if(t===v)return t;let i=s!==void 0?(n=e._$Co)==null?void 0:n[s]:e._$Cl,r=H(t)?void 0:t._$litDirective$;return(i==null?void 0:i.constructor)!==r&&((a=i==null?void 0:i._$AO)==null||a.call(i,!1),r===void 0?i=void 0:(i=new r(o),i._$AT(o,e,s)),s!==void 0?((h=e._$Co)!=null?h:e._$Co=[])[s]=i:e._$Cl=i),i!==void 0&&(t=E(o,i._$AS(o,t.values),i,s)),t}var W=class{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){var l;let{el:{content:e},parts:s}=this._$AD,i=((l=t==null?void 0:t.creationScope)!=null?l:y).importNode(e,!0);g.currentNode=i;let r=g.nextNode(),n=0,a=0,h=s[0];for(;h!==void 0;){if(n===h.index){let c;h.type===2?c=new T(r,r.nextSibling,this,t):h.type===1?c=new h.ctor(r,h.name,h.strings,this,t):h.type===6&&(c=new F(r,this,t)),this._$AV.push(c),h=s[++a]}n!==(h==null?void 0:h.index)&&(r=g.nextNode(),n++)}return g.currentNode=y,i}p(t){let e=0;for(let s of this._$AV)s!==void 0&&(s.strings!==void 0?(s._$AI(t,s,e),e+=s.strings.length-2):s._$AI(t[e])),e++}},T=class o{get _$AU(){var t,e;return(e=(t=this._$AM)==null?void 0:t._$AU)!=null?e:this._$Cv}constructor(t,e,s,i){var r;this.type=2,this._$AH=p,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=s,this.options=i,this._$Cv=(r=i==null?void 0:i.isConnected)!=null?r:!0}get parentNode(){let t=this._$AA.parentNode,e=this._$AM;return e!==void 0&&(t==null?void 0:t.nodeType)===11&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=E(this,t,e),H(t)?t===p||t==null||t===""?(this._$AH!==p&&this._$AR(),this._$AH=p):t!==this._$AH&&t!==v&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):Ot(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==p&&H(this._$AH)?this._$AA.nextSibling.data=t:this.T(y.createTextNode(t)),this._$AH=t}$(t){var r;let{values:e,_$litType$:s}=t,i=typeof s=="number"?this._$AC(t):(s.el===void 0&&(s.el=R.createElement(At(s.h,s.h[0]),this.options)),s);if(((r=this._$AH)==null?void 0:r._$AD)===i)this._$AH.p(e);else{let n=new W(i,this),a=n.u(this.options);n.p(e),this.T(a),this._$AH=n}}_$AC(t){let e=pt.get(t.strings);return e===void 0&&pt.set(t.strings,e=new R(t)),e}k(t){J(this._$AH)||(this._$AH=[],this._$AR());let e=this._$AH,s,i=0;for(let r of t)i===e.length?e.push(s=new o(this.O(O()),this.O(O()),this,this.options)):s=e[i],s._$AI(r),i++;i<e.length&&(this._$AR(s&&s._$AB.nextSibling,i),e.length=i)}_$AR(t=this._$AA.nextSibling,e){var s;for((s=this._$AP)==null?void 0:s.call(this,!1,!0,e);t!==this._$AB;){let i=t.nextSibling;t.remove(),t=i}}setConnected(t){var e;this._$AM===void 0&&(this._$Cv=t,(e=this._$AP)==null||e.call(this,t))}},b=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,s,i,r){this.type=1,this._$AH=p,this._$AN=void 0,this.element=t,this.name=e,this._$AM=i,this.options=r,s.length>2||s[0]!==""||s[1]!==""?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=p}_$AI(t,e=this,s,i){let r=this.strings,n=!1;if(r===void 0)t=E(this,t,e,0),n=!H(t)||t!==this._$AH&&t!==v,n&&(this._$AH=t);else{let a=t,h,l;for(t=r[0],h=0;h<r.length-1;h++)l=E(this,a[s+h],e,h),l===v&&(l=this._$AH[h]),n||(n=!H(l)||l!==this._$AH[h]),l===p?t=p:t!==p&&(t+=(l!=null?l:"")+r[h+1]),this._$AH[h]=l}n&&!i&&this.j(t)}j(t){t===p?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t!=null?t:"")}},q=class extends b{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===p?void 0:t}},K=class extends b{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==p)}},Z=class extends b{constructor(t,e,s,i,r){super(t,e,s,i,r),this.type=5}_$AI(t,e=this){var n;if((t=(n=E(this,t,e,0))!=null?n:p)===v)return;let s=this._$AH,i=t===p&&s!==p||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,r=t!==p&&(s===p||i);i&&this.element.removeEventListener(this.name,this,s),r&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var e,s;typeof this._$AH=="function"?this._$AH.call((s=(e=this.options)==null?void 0:e.host)!=null?s:this.element,t):this._$AH.handleEvent(t)}},F=class{constructor(t,e,s){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=s}get _$AU(){return this._$AM._$AU}_$AI(t){E(this,t)}};var V=U.litHtmlPolyfillSupport,ut;V==null||V(R,T),((ut=U.litHtmlVersions)!=null?ut:U.litHtmlVersions=[]).push("3.3.1");var mt=(o,t,e)=>{var r,n;let s=(r=e==null?void 0:e.renderBefore)!=null?r:t,i=s._$litPart$;if(i===void 0){let a=(n=e==null?void 0:e.renderBefore)!=null?n:null;s._$litPart$=i=new T(t.insertBefore(O(),a),a,void 0,e!=null?e:{})}return i._$AI(o),i};var S=globalThis,C=class extends ${constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var e,s;let t=super.createRenderRoot();return(s=(e=this.renderOptions).renderBefore)!=null||(e.renderBefore=t.firstChild),t}update(t){let e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=mt(e,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),(t=this._$Do)==null||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this._$Do)==null||t.setConnected(!1)}render(){return v}},gt;C._$litElement$=!0,C.finalized=!0,(gt=S.litElementHydrateSupport)==null||gt.call(S,{LitElement:C});var Q=S.litElementPolyfillSupport;Q==null||Q({LitElement:C});var yt;((yt=S.litElementVersions)!=null?yt:S.litElementVersions=[]).push("4.2.1");export{vt as a,z as b,rt as c,Lt as d,v as e,C as f};
4
- /*! Bundled license information:
5
-
6
- @lit/reactive-element/css-tag.js:
7
- (**
8
- * @license
9
- * Copyright 2019 Google LLC
10
- * SPDX-License-Identifier: BSD-3-Clause
11
- *)
12
-
13
- @lit/reactive-element/reactive-element.js:
14
- lit-html/lit-html.js:
15
- lit-element/lit-element.js:
16
- (**
17
- * @license
18
- * Copyright 2017 Google LLC
19
- * SPDX-License-Identifier: BSD-3-Clause
20
- *)
21
-
22
- lit-html/is-server.js:
23
- (**
24
- * @license
25
- * Copyright 2022 Google LLC
26
- * SPDX-License-Identifier: BSD-3-Clause
27
- *)
28
- */
@@ -1 +0,0 @@
1
- import{b as e}from"./chunk.ZU62FSGZ.js";var t=e;customElements.define("hot-file-input-dropzone",e);export{t as a};
@@ -1 +0,0 @@
1
- function i(){let e=()=>{window.WebAwesome&&window.WebAwesome.iconRegistry||setTimeout(e,100)};e()}var n=i;export{n as a};
@@ -1 +0,0 @@
1
- import{b as a}from"./chunk.G3Z3BOX2.js";var t=a;customElements.define("hot-tracking",a);export{t as a};
@@ -1 +0,0 @@
1
- import{b as e}from"./chunk.LR75BDGN.js";var a=e;customElements.define("hot-list-card",e);export{a};
@@ -1 +0,0 @@
1
- import{b as e}from"./chunk.EAG35WPB.js";var r=e;customElements.define("hot-header",e);export{r as a};
@@ -1,105 +0,0 @@
1
- import{a as M}from"./chunk.EYNFK5TH.js";import{a as f,b as m,c as z}from"./chunk.FBYBLQYY.js";import{d as h,e as x,f as F}from"./chunk.KNTMZWRV.js";import{d as n,e as o,f as d,g as c}from"./chunk.N2W26RCT.js";var E={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},y=l=>(...a)=>({_$litDirective$:l,values:a}),$=class{constructor(a){}get _$AU(){return this._$AM._$AU}_$AT(a,e,i){this._$Ct=a,this._$AM=e,this._$Ci=i}_$AS(a,e){return this.update(a,e)}update(a,e){return this.render(...e)}};var _=y(class extends ${constructor(l){var a;if(super(l),l.type!==E.ATTRIBUTE||l.name!=="class"||((a=l.strings)==null?void 0:a.length)>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(l){return" "+Object.keys(l).filter((a=>l[a])).join(" ")+" "}update(l,[a]){var i,s;if(this.st===void 0){this.st=new Set,l.strings!==void 0&&(this.nt=new Set(l.strings.join(" ").split(/\s/).filter((t=>t!==""))));for(let t in a)a[t]&&!((i=this.nt)!=null&&i.has(t))&&this.st.add(t);return this.render(a)}let e=l.element.classList;for(let t of this.st)t in a||(e.remove(t),this.st.delete(t));for(let t in a){let p=!!a[t];p===this.st.has(t)||(s=this.nt)!=null&&s.has(t)||(p?(e.add(t),this.st.add(t)):(e.remove(t),this.st.delete(t)))}return x}});import"@awesome.me/webawesome/dist/components/icon/icon.js";import"@awesome.me/webawesome/dist/components/divider/divider.js";var S,T,C,D,A,B,L,P,k,W,I,O,r=class extends F{constructor(){super(...arguments);this.name="hot-file-input-dropzone";d(this,S,!1);d(this,T,"");d(this,C,0);d(this,D,!0);d(this,A,!1);d(this,B,"");d(this,L,"traditional");d(this,P,!1);d(this,k,[]);d(this,W,"");d(this,I,"");d(this,O)}get multiple(){return o(this,S)}set multiple(e){c(this,S,e)}get accept(){return o(this,T)}set accept(e){c(this,T,e)}get maxSize(){return o(this,C)}set maxSize(e){c(this,C,e)}get showPreview(){return o(this,D)}set showPreview(e){c(this,D,e)}get disabled(){return o(this,A)}set disabled(e){c(this,A,e)}get label(){return o(this,B)}set label(e){c(this,B,e)}get variant(){return o(this,L)}set variant(e){c(this,L,e)}get isDragging(){return o(this,P)}set isDragging(e){c(this,P,e)}get selectedFiles(){return o(this,k)}set selectedFiles(e){c(this,k,e)}get errorMessage(){return o(this,W)}set errorMessage(e){c(this,W,e)}get statusMessage(){return o(this,I)}set statusMessage(e){c(this,I,e)}get fileInput(){return o(this,O)}set fileInput(e){c(this,O,e)}_generateId(){return`file-${Date.now()}-${Math.random().toString(36).substring(2,11)}`}_handleDragOver(e){e.preventDefault(),e.stopPropagation(),this.disabled||(this.isDragging=!0)}_handleDragLeave(e){e.preventDefault(),e.stopPropagation(),this.isDragging=!1}_handleDrop(e){var s;if(e.preventDefault(),e.stopPropagation(),this.isDragging=!1,this.disabled)return;let i=Array.from(((s=e.dataTransfer)==null?void 0:s.files)||[]);this._processFiles(i)}_handleClick(){this.disabled||this.fileInput.click()}_handleKeyDown(e){!this.disabled&&(e.key==="Enter"||e.key===" ")&&(e.preventDefault(),this.fileInput.click())}_handleFileInputChange(e){let i=e.target,s=Array.from(i.files||[]);this._processFiles(s)}_processFiles(e){if(this.errorMessage="",!this.multiple&&e.length>1){this.errorMessage="Only one file can be selected";return}if(this.accept){let t=this.accept.split(",").map(u=>u.trim().toLowerCase()),p=e.filter(u=>{let b=u.name.toLowerCase(),g=u.type.toLowerCase();return!t.some(v=>{if(v.startsWith("."))return b.endsWith(v);if(v.endsWith("/*")){let w=v.split("/")[0];if(g)return g.startsWith(w+"/");let j=b.substring(b.lastIndexOf("."));return this._getFileIcon(j).includes(w)}return g?g===v:!1})});if(p.length>0){this.errorMessage=`Invalid file type(s): ${p.map(u=>u.name).join(", ")}`;return}}if(this.maxSize>0){let t=e.filter(p=>p.size>this.maxSize);if(t.length>0){this.errorMessage=`File(s) exceed maximum size of ${this._formatFileSize(this.maxSize)}: ${t.map(p=>p.name).join(", ")}`;return}}let i=e.map(t=>({file:t,id:this._generateId()}));this.multiple?this.selectedFiles=[...i,...this.selectedFiles]:this.selectedFiles=i,this.dispatchEvent(new CustomEvent("hot-file-change",{detail:{files:this.selectedFiles.map(t=>t.file)},bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent("hot-files-selected",{detail:{files:i.map(t=>t.file),allFiles:this.selectedFiles.map(t=>t.file)},bubbles:!0,composed:!0}));let s=i.length;this.statusMessage=`${s} ${s===1?"file":"files"} selected: ${i.map(t=>t.file.name).join(", ")}`}_removeFile(e){let i=this.selectedFiles.find(s=>s.id===e);this.selectedFiles=this.selectedFiles.filter(s=>s.id!==e),this.fileInput&&(this.fileInput.value=""),this.dispatchEvent(new CustomEvent("hot-file-change",{detail:{files:this.selectedFiles.map(s=>s.file)},bubbles:!0,composed:!0})),i&&(this.statusMessage=`File removed: ${i.file.name}. ${this.selectedFiles.length} ${this.selectedFiles.length===1?"file":"files"} remaining.`)}_formatFileSize(e){if(e===0)return"0 Bytes";let i=1e3,s=["Bytes","KB","MB","GB"],t=Math.floor(Math.log(e)/Math.log(i)),p=e/Math.pow(i,t);return`${Math.round(p*10)/10} ${s[t]}`}_getFileIcon(e){return e.startsWith("image/")?"file-image":e.startsWith("video/")?"file-video":e.startsWith("audio/")?"file-audio":e==="application/pdf"?"file-pdf":e.includes("word")?"file-word":e.includes("sheet")||e.includes("excel")?"file-excel":e.includes("zip")||e.includes("rar")||e.includes("7z")?"file-archive":e.includes("text")?"file-text":"file"}clearFiles(){this.selectedFiles=[],this.errorMessage="",this.fileInput&&(this.fileInput.value="")}getFiles(){return this.selectedFiles.map(e=>e.file)}render(){let e={dropzone:!0,"dropzone--dragging":this.isDragging,"dropzone--disabled":this.disabled,"dropzone--has-files":this.selectedFiles.length>0,"dropzone--compact":this.variant==="compact"},i=this.variant==="compact";return h`
2
- <div class="file-input-dropzone">
3
- ${this.label&&this.variant==="traditional"?h`<label class="label" id="dropzone-label">${this.label}</label>`:""}
4
- ${this.variant==="traditional"?h`<wa-divider></wa-divider>`:""}
5
-
6
- <div
7
- class=${_(e)}
8
- role="button"
9
- tabindex=${this.disabled?"-1":"0"}
10
- aria-disabled=${this.disabled}
11
- aria-label=${this.label||"File upload"}
12
- aria-describedby="dropzone-description${this.accept||this.maxSize?" dropzone-hints":""}"
13
- @dragover=${this._handleDragOver}
14
- @dragleave=${this._handleDragLeave}
15
- @drop=${this._handleDrop}
16
- @click=${this._handleClick}
17
- @keydown=${this._handleKeyDown}
18
- >
19
- <input
20
- type="file"
21
- class="file-uploader"
22
- ?multiple=${this.multiple}
23
- accept=${this.accept}
24
- ?disabled=${this.disabled}
25
- @change=${this._handleFileInputChange}
26
- aria-hidden="true"
27
- tabindex="-1"
28
- />
29
-
30
- <div class="dropzone-content">
31
- <wa-icon
32
- name="${i?"arrow-up-from-bracket":"cloud-arrow-up"}"
33
- class="dropzone-icon"
34
- aria-hidden="true"
35
- ></wa-icon>
36
- <div class="dropzone-text">
37
- ${i?h`<div class="compact-text" id="dropzone-description">
38
- ${this.label}
39
- </div>`:this.isDragging?h`<div id="dropzone-description">
40
- Drop ${this.multiple?"files":"file"} here
41
- </div>`:h`
42
- <div class="dropzone-cta" id="dropzone-description">
43
- <div>
44
- Drop ${this.multiple?"files":"file"} here or&nbsp;
45
- </div>
46
- <div class="browse">browse</div>
47
- </div>
48
- ${this.accept||this.maxSize?h`<div id="dropzone-hints">
49
- ${this.accept?h`<div class="dropzone-accept">
50
- ${this.accept.split(",").join(", ")} only
51
- </div>`:""}
52
- ${this.maxSize?h`<div class="dropzone-maxsize">
53
- Max size: ${this._formatFileSize(this.maxSize)}
54
- </div>`:""}
55
- </div>`:""}
56
- `}
57
- </div>
58
- </div>
59
- </div>
60
- ${this.errorMessage?h`
61
- <div class="error-message" role="alert">
62
- <wa-icon name="exclamation-circle"></wa-icon>
63
- ${this.errorMessage}
64
- </div>
65
- `:""}
66
- ${this.showPreview&&this.selectedFiles.length>0?h`
67
- <div class="file-preview-list">
68
- ${this.selectedFiles.map(({file:s,id:t})=>h`
69
- <hot-list-card
70
- title=${s.name}
71
- subtitle=${this._formatFileSize(s.size)}
72
- icon=${this._getFileIcon(s.type)}
73
- itemId=${t}
74
- @hot-remove=${()=>this._removeFile(t)}
75
- ></hot-list-card>
76
- `)}
77
- </div>
78
- `:""}
79
-
80
- <div
81
- class="sr-only"
82
- role="status"
83
- aria-live="polite"
84
- aria-atomic="true"
85
- >
86
- ${this.statusMessage}
87
- </div>
88
- </div>
89
- `}};S=new WeakMap,T=new WeakMap,C=new WeakMap,D=new WeakMap,A=new WeakMap,B=new WeakMap,L=new WeakMap,P=new WeakMap,k=new WeakMap,W=new WeakMap,I=new WeakMap,O=new WeakMap,r.styles=[M],n([f({type:Boolean})],r.prototype,"multiple",1),n([f({type:String})],r.prototype,"accept",1),n([f({type:Number})],r.prototype,"maxSize",1),n([f({type:Boolean})],r.prototype,"showPreview",1),n([f({type:Boolean})],r.prototype,"disabled",1),n([f({type:String})],r.prototype,"label",1),n([f({type:String})],r.prototype,"variant",1),n([m()],r.prototype,"isDragging",1),n([m()],r.prototype,"selectedFiles",1),n([m()],r.prototype,"errorMessage",1),n([m()],r.prototype,"statusMessage",1),n([z('input[type="file"]')],r.prototype,"fileInput",1);var te=r;export{r as a,te as b};
90
- /*! Bundled license information:
91
-
92
- lit-html/directive.js:
93
- (**
94
- * @license
95
- * Copyright 2017 Google LLC
96
- * SPDX-License-Identifier: BSD-3-Clause
97
- *)
98
-
99
- lit-html/directives/class-map.js:
100
- (**
101
- * @license
102
- * Copyright 2018 Google LLC
103
- * SPDX-License-Identifier: BSD-3-Clause
104
- *)
105
- */