@htmlbricks/hb-navbar 0.10.50 → 0.10.54

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/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@htmlbricks/hb-navbar",
3
3
  "displayName": "Svelte Navbar WebComponent",
4
4
  "description": "Svelte Navbar WebComponent",
5
- "version": "0.10.50",
5
+ "version": "0.10.54",
6
6
  "main": "release/release.js",
7
7
  "publishConfig": {
8
8
  "access": "public"
@@ -30,7 +30,7 @@
30
30
  "prepublish": "npm run build:release"
31
31
  },
32
32
  "devDependencies": {
33
- "@htmlbricks/hb-jsutils": "^0.10.50",
33
+ "@htmlbricks/hb-jsutils": "^0.10.54",
34
34
  "@htmlbricks/manifester": "^0.0.22",
35
35
  "@rollup/plugin-alias": "^3.1.2",
36
36
  "@rollup/plugin-commonjs": "^18.0.0",
@@ -70,7 +70,7 @@
70
70
  "typescript-transform-paths": "^2.2.3"
71
71
  },
72
72
  "dependencies": {
73
- "@htmlbricks/hb-dropdown-simple": "^0.10.50"
73
+ "@htmlbricks/hb-dropdown-simple": "^0.10.54"
74
74
  },
75
75
  "keywords": [
76
76
  "svelte",
@@ -78,5 +78,5 @@
78
78
  "webcomponents"
79
79
  ],
80
80
  "contributors": [],
81
- "gitHead": "da2bd6986c4d75e3c046fc5f2a0b1e7758ef69dd"
81
+ "gitHead": "b3e459a4207c4c05f677613d0938aba7168a7a2e"
82
82
  }
@@ -223,5 +223,5 @@
223
223
  "size": {},
224
224
  "iifePath": "release/release.js",
225
225
  "repoName": "@htmlbricks/hb-navbar",
226
- "version": "0.10.50"
226
+ "version": "0.10.54"
227
227
  }
@@ -1,2 +1,2 @@
1
- var release=function(){"use strict";function t(){}function n(t){return t()}function e(){return Object.create(null)}function o(t){t.forEach(n)}function r(t){return"function"==typeof t}function i(t,n){return t!=t?n==n:t!==n||t&&"object"==typeof t||"function"==typeof t}let a,s;function c(t,n){return a||(a=document.createElement("a")),a.href=n,t===a.href}function l(t,n){t.appendChild(n)}function u(t,n,e){t.insertBefore(n,e||null)}function d(t){t.parentNode.removeChild(t)}function f(t){return document.createElement(t)}function p(t){return document.createTextNode(t)}function m(){return p(" ")}function h(t,n,e,o){return t.addEventListener(n,e,o),()=>t.removeEventListener(n,e,o)}function g(t,n,e){null==e?t.removeAttribute(n):t.getAttribute(n)!==e&&t.setAttribute(n,e)}function v(t,n,e){n in t?t[n]="boolean"==typeof t[n]&&""===e||e:g(t,n,e)}function y(t,n,e,o){null===e?t.style.removeProperty(n):t.style.setProperty(n,e,o?"important":"")}function $(t){const n={};for(const e of t)n[e.name]=e.value;return n}function b(t){s=t}function w(){if(!s)throw new Error("Function called outside component initialization");return s}function x(){const t=w();return(n,e)=>{const o=t.$$.callbacks[n];if(o){const r=function(t,n,e=!1){const o=document.createEvent("CustomEvent");return o.initCustomEvent(t,e,!1,n),o}(n,e);o.slice().forEach((n=>{n.call(t,r)}))}}}const E=[],_=[],k=[],C=[],L=Promise.resolve();let T=!1;function A(t){k.push(t)}const D=new Set;let N=0;function O(){const t=s;do{for(;N<E.length;){const t=E[N];N++,b(t),j(t.$$)}for(b(null),E.length=0,N=0;_.length;)_.pop()();for(let t=0;t<k.length;t+=1){const n=k[t];D.has(n)||(D.add(n),n())}k.length=0}while(E.length);for(;C.length;)C.pop()();T=!1,D.clear(),b(t)}function j(t){if(null!==t.fragment){t.update(),o(t.before_update);const n=t.dirty;t.dirty=[-1],t.fragment&&t.fragment.p(t.ctx,n),t.after_update.forEach(A)}}const S=new Set;function P(t,n){-1===t.$$.dirty[0]&&(E.push(t),T||(T=!0,L.then(O)),t.$$.dirty.fill(0)),t.$$.dirty[n/31|0]|=1<<n%31}function M(i,a,c,l,u,f,p,m=[-1]){const h=s;b(i);const g=i.$$={fragment:null,ctx:null,props:f,update:t,not_equal:u,bound:e(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(a.context||(h?h.$$.context:[])),callbacks:e(),dirty:m,skip_bound:!1,root:a.target||h.$$.root};p&&p(g.root);let v=!1;if(g.ctx=c?c(i,a.props||{},((t,n,...e)=>{const o=e.length?e[0]:n;return g.ctx&&u(g.ctx[t],g.ctx[t]=o)&&(!g.skip_bound&&g.bound[t]&&g.bound[t](o),v&&P(i,t)),n})):[],g.update(),v=!0,o(g.before_update),g.fragment=!!l&&l(g.ctx),a.target){if(a.hydrate){const t=function(t){return Array.from(t.childNodes)}(a.target);g.fragment&&g.fragment.l(t),t.forEach(d)}else g.fragment&&g.fragment.c();a.intro&&((y=i.$$.fragment)&&y.i&&(S.delete(y),y.i($))),function(t,e,i,a){const{fragment:s,on_mount:c,on_destroy:l,after_update:u}=t.$$;s&&s.m(e,i),a||A((()=>{const e=c.map(n).filter(r);l?l.push(...e):o(e),t.$$.on_mount=[]})),u.forEach(A)}(i,a.target,a.anchor,a.customElement),O()}var y,$;b(h)}let z;"function"==typeof HTMLElement&&(z=class extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"})}connectedCallback(){const{on_mount:t}=this.$$;this.$$.on_disconnect=t.map(n).filter(r);for(const t in this.$$.slotted)this.appendChild(this.$$.slotted[t])}attributeChangedCallback(t,n,e){this[t]=e}disconnectedCallback(){o(this.$$.on_disconnect)}$destroy(){!function(t,n){const e=t.$$;null!==e.fragment&&(o(e.on_destroy),e.fragment&&e.fragment.d(n),e.on_destroy=e.fragment=null,e.ctx=[])}(this,1),this.$destroy=t}$on(t,n){const e=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return e.push(n),()=>{const t=e.indexOf(n);-1!==t&&e.splice(t,1)}}$set(t){var n;this.$$set&&(n=t,0!==Object.keys(n).length)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}});var H="0.10.50";var R,F=(function(t,n){n.__esModule=!0,n.LanguageTranslator=n.addComponent=n.getChildStyleToPass=void 0,n.getChildStyleToPass=function(t,n){var e,o,r="";if(t&&(null==n?void 0:n.length)&&(null===(e=Object.keys(t))||void 0===e?void 0:e.length)&&(null===(o=null==n?void 0:n.filter((function(n){return Object.keys(t).includes(n.name)})))||void 0===o?void 0:o.length))for(var i=function(e){(null==n?void 0:n.filter((function(n){return n.name===e&&n.defaultValue!==t[e]})))&&(r+="".concat(e,":").concat(t[e],";"))},a=0,s=Object.keys(t);a<s.length;a++)i(s[a]);return r},n.addComponent=function(t){var n,e=(null===(n=null==t?void 0:t.repoName.split("/"))||void 0===n?void 0:n[1])||(null==t?void 0:t.repoName);if(!e)throw new Error("wrong componentPath "+(null==t?void 0:t.repoName));if(!(null==t?void 0:t.version))throw new Error("wrong version "+(null==t?void 0:t.version));var o=(null==t?void 0:t.iifePath)||"release/release.js";if(!document.getElementById(e+"-script")){var r=document.createElement("script");r.id=e+"-script",r.src="https://cdn.jsdelivr.net/npm/".concat(t.repoName,"@").concat(t.version,"/").concat(o),(null==t?void 0:t.local)&&location.href.includes("localhost")&&(r.src="".concat(t.local)),document.head.appendChild(r)}};var e=function(){function t(t){if(!(null==t?void 0:t.dictionary))throw new Error("no dictionary provided");this.dictionary=t.dictionary,this.setLang(null==t?void 0:t.lang)}return t.prototype.setLang=function(n){n||(n=t.getDefaultLang()),this.lang=n},t.prototype.translateWord=function(n,e){return t.getDictionaryWord(n,this.dictionary,e||this.lang)},t.prototype.translateDate=function(n,e,o){return t.formatDate(n,e,o||this.lang)},t.getDefaultLang=function(){var t,n,e,o,r,i="en";return(null===navigator||void 0===navigator?void 0:navigator.languages)&&(null===(e=null===(n=null===(t=navigator.languages[0])||void 0===t?void 0:t.split("-")[0])||void 0===n?void 0:n.toLowerCase())||void 0===e?void 0:e.length)&&(i=null===(r=null===(o=navigator.languages[0])||void 0===o?void 0:o.split("-")[0])||void 0===r?void 0:r.toLowerCase()),i},t.getDictionaryWord=function(n,e,o){var r;if(!n)throw new Error("no wordKey provided");if(!e)throw new Error("no dictionary provided");if(o&&(null===(r=e[o])||void 0===r?void 0:r[n]))return e[o][n];var i="",a=t.getDefaultLang();if(!o||a!==o){var s=null==e?void 0:e[a];(null==s?void 0:s[n])&&(i=s[n])}return i},t.formatDate=function(n,e,o){if(!n)throw new Error("no date provided");if("function"!=typeof n.getMonth)throw new Error("wrong date format");return new Intl.DateTimeFormat(o||t.getDefaultLang(),e).format(n)},t}();n.LanguageTranslator=e}(R={exports:{}},R.exports),R.exports),I={vars:[],parts:[{name:"dropdown",description:""},{name:"dropdownbutton",description:""},{name:"dropdowncontent",description:""}]},J=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,W=/\n/g,B=/^\s*/,U=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,q=/^:\s*/,K=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,V=/^[;\s]*/,G=/^\s+|\s+$/g,Q="";function X(t){return t?t.replace(G,Q):Q}var Y=function(t,n){var e,o=null;if(!t||"string"!=typeof t)return o;for(var r,i,a=function(t,n){if("string"!=typeof t)throw new TypeError("First argument must be a string");if(!t)return[];n=n||{};var e=1,o=1;function r(t){var n=t.match(W);n&&(e+=n.length);var r=t.lastIndexOf("\n");o=~r?t.length-r:o+t.length}function i(){var t={line:e,column:o};return function(n){return n.position=new a(t),l(),n}}function a(t){this.start=t,this.end={line:e,column:o},this.source=n.source}function s(r){var i=new Error(n.source+":"+e+":"+o+": "+r);if(i.reason=r,i.filename=n.source,i.line=e,i.column=o,i.source=t,!n.silent)throw i}function c(n){var e=n.exec(t);if(e){var o=e[0];return r(o),t=t.slice(o.length),e}}function l(){c(B)}function u(t){var n;for(t=t||[];n=d();)!1!==n&&t.push(n);return t}function d(){var n=i();if("/"==t.charAt(0)&&"*"==t.charAt(1)){for(var e=2;Q!=t.charAt(e)&&("*"!=t.charAt(e)||"/"!=t.charAt(e+1));)++e;if(e+=2,Q===t.charAt(e-1))return s("End of comment missing");var a=t.slice(2,e-2);return o+=2,r(a),t=t.slice(e),o+=2,n({type:"comment",comment:a})}}function f(){var t=i(),n=c(U);if(n){if(d(),!c(q))return s("property missing ':'");var e=c(K),o=t({type:"declaration",property:X(n[0].replace(J,Q)),value:e?X(e[0].replace(J,Q)):Q});return c(V),o}}return a.prototype.content=t,l(),function(){var t,n=[];for(u(n);t=f();)!1!==t&&(n.push(t),u(n));return n}()}(t),s="function"==typeof n,c=0,l=a.length;c<l;c++)r=(e=a[c]).property,i=e.value,s?n(r,i,e):i&&(o||(o={}),o[r]=i);return o};function Z(n){let e,o,r;return{c(){e=f("button"),e.textContent="☰",y(e,"font-size","20px"),y(e,"border","none")},m(t,i){u(t,e,i),o||(r=h(e,"click",n[11]),o=!0)},p:t,d(t){t&&d(e),o=!1,r()}}}function tt(t){let n,e;return{c(){n=f("img"),y(n,"height","30px"),y(n,"vertical-align","middle"),g(n,"alt",""),c(n.src,e=t[1])||g(n,"src",e)},m(t,e){u(t,n,e)},p(t,o){2&o&&!c(n.src,e=t[1])&&g(n,"src",e)},d(t){t&&d(n)}}}function nt(t){let n,e,o,r,i,a,s;return{c(){n=f("hb-dropdown-simple"),e=f("span"),o=f("img"),y(o,"height","30px"),y(o,"vertical-align","middle"),g(o,"alt",""),c(o.src,r=t[2].imgUri)||g(o,"src",r),g(e,"slot","dropdownbutton"),v(n,"style",t[4]),v(n,"list",i=JSON.stringify(t[2].list)),v(n,"position","right")},m(r,i){u(r,n,i),l(n,e),l(e,o),a||(s=h(n,"dropDownClick",t[12]),a=!0)},p(t,e){4&e&&!c(o.src,r=t[2].imgUri)&&g(o,"src",r),16&e&&v(n,"style",t[4]),4&e&&i!==(i=JSON.stringify(t[2].list))&&v(n,"list",i)},d(t){t&&d(n),a=!1,s()}}}function et(n){let e,o,r,i,a,s,c,h,v,$,b,w,x,E,_,k=!n[3]&&Z(n),C=n[1]&&tt(n),L=n[2]&&nt(n);return{c(){e=f("nav"),o=f("div"),k&&k.c(),r=m(),i=f("slot"),a=m(),s=f("div"),c=f("slot"),C&&C.c(),h=m(),v=p(n[0]),$=m(),b=f("slot"),w=m(),x=f("div"),E=f("div"),E.innerHTML='<slot name="right-slot"></slot>',_=m(),L&&L.c(),this.c=t,g(i,"name","left-slot"),y(o,"text-align","left"),g(o,"class","navitem"),g(o,"part","left-slot"),g(c,"name","brand"),g(b,"name","center-slot"),g(s,"part","center-slot"),g(s,"class","navitem"),y(E,"display","inline-block"),g(x,"part","right-slot"),g(x,"class","navitem"),g(e,"id","navbar")},m(t,n){u(t,e,n),l(e,o),k&&k.m(o,null),l(o,r),l(o,i),l(e,a),l(e,s),l(s,c),C&&C.m(c,null),l(c,h),l(c,v),l(s,$),l(s,b),l(e,w),l(e,x),l(x,E),l(x,_),L&&L.m(x,null)},p(t,[n]){t[3]?k&&(k.d(1),k=null):k?k.p(t,n):(k=Z(t),k.c(),k.m(o,r)),t[1]?C?C.p(t,n):(C=tt(t),C.c(),C.m(c,h)):C&&(C.d(1),C=null),1&n&&function(t,n){n=""+n,t.wholeText!==n&&(t.data=n)}(v,t[0]),t[2]?L?L.p(t,n):(L=nt(t),L.c(),L.m(x,null)):L&&(L.d(1),L=null)},i:t,o:t,d(t){t&&d(e),k&&k.d(),C&&C.d(),L&&L.d()}}}function ot(t,n,e){let o,r,{style:i}=n,a="",{id:s}=n,{companybrandname:c}=n,{companylogouri:l}=n,{switchopen:u}=n,{usermenu:d}=n,{noburger:f}=n;F.addComponent({repoName:"@htmlbricks/hb-dropdown-simple",version:H});const p=w(),m=x();function h(t,n){m(t,n),p.dispatchEvent&&p.dispatchEvent(new CustomEvent(t,{detail:n}))}function g(){r=!r,h("navmenuswitch",{isOpen:r})}return t.$$set=t=>{"style"in t&&e(9,i=t.style),"id"in t&&e(7,s=t.id),"companybrandname"in t&&e(0,c=t.companybrandname),"companylogouri"in t&&e(1,l=t.companylogouri),"switchopen"in t&&e(8,u=t.switchopen),"usermenu"in t&&e(2,d=t.usermenu),"noburger"in t&&e(3,f=t.noburger)},t.$$.update=()=>{1935&t.$$.dirty&&(i&&(e(10,o=Y(i)),e(4,a=F.getChildStyleToPass(o,null==I?void 0:I.vars))),c||e(0,c=""),l||e(1,l=""),s||e(7,s=""),u&&"no"!==u?r=!0:(e(8,u=""),r=!1),f||e(3,f=null),d?"string"==typeof d&&e(2,d=JSON.parse(d)):e(2,d=null))},[c,l,d,f,a,h,g,s,u,i,o,()=>g(),t=>h("userClick",t.detail.key)]}class rt extends z{constructor(t){super(),this.shadowRoot.innerHTML='<style>@import url("https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&display=swap");:host{font-family:"Roboto", sans-serif;width:100%;display:block}#navbar{display:flex;justify-content:space-between;align-items:stretch;background-color:#f1f1f1}.navitem{color:white;margin:10px;text-align:center;line-height:30px;font-size:22px;align-self:center;color:black}</style>',M(this,{target:this.shadowRoot,props:$(this.attributes),customElement:!0},ot,et,i,{style:9,id:7,companybrandname:0,companylogouri:1,switchopen:8,usermenu:2,noburger:3},null),t&&(t.target&&u(t.target,this,t.anchor),t.props&&(this.$set(t.props),O()))}static get observedAttributes(){return["style","id","companybrandname","companylogouri","switchopen","usermenu","noburger"]}get style(){return this.$$.ctx[9]}set style(t){this.$$set({style:t}),O()}get id(){return this.$$.ctx[7]}set id(t){this.$$set({id:t}),O()}get companybrandname(){return this.$$.ctx[0]}set companybrandname(t){this.$$set({companybrandname:t}),O()}get companylogouri(){return this.$$.ctx[1]}set companylogouri(t){this.$$set({companylogouri:t}),O()}get switchopen(){return this.$$.ctx[8]}set switchopen(t){this.$$set({switchopen:t}),O()}get usermenu(){return this.$$.ctx[2]}set usermenu(t){this.$$set({usermenu:t}),O()}get noburger(){return this.$$.ctx[3]}set noburger(t){this.$$set({noburger:t}),O()}}return customElements.define("hb-navbar",rt),rt}();
1
+ var release=function(){"use strict";function t(){}function n(t){return t()}function e(){return Object.create(null)}function o(t){t.forEach(n)}function r(t){return"function"==typeof t}function i(t,n){return t!=t?n==n:t!==n||t&&"object"==typeof t||"function"==typeof t}let a,s;function c(t,n){return a||(a=document.createElement("a")),a.href=n,t===a.href}function l(t,n){t.appendChild(n)}function u(t,n,e){t.insertBefore(n,e||null)}function d(t){t.parentNode.removeChild(t)}function f(t){return document.createElement(t)}function p(t){return document.createTextNode(t)}function m(){return p(" ")}function h(t,n,e,o){return t.addEventListener(n,e,o),()=>t.removeEventListener(n,e,o)}function g(t,n,e){null==e?t.removeAttribute(n):t.getAttribute(n)!==e&&t.setAttribute(n,e)}function v(t,n,e){n in t?t[n]="boolean"==typeof t[n]&&""===e||e:g(t,n,e)}function y(t,n,e,o){null===e?t.style.removeProperty(n):t.style.setProperty(n,e,o?"important":"")}function $(t){const n={};for(const e of t)n[e.name]=e.value;return n}function b(t){s=t}function w(){if(!s)throw new Error("Function called outside component initialization");return s}function x(){const t=w();return(n,e)=>{const o=t.$$.callbacks[n];if(o){const r=function(t,n,e=!1){const o=document.createEvent("CustomEvent");return o.initCustomEvent(t,e,!1,n),o}(n,e);o.slice().forEach((n=>{n.call(t,r)}))}}}const E=[],_=[],k=[],C=[],L=Promise.resolve();let T=!1;function A(t){k.push(t)}const D=new Set;let N=0;function O(){const t=s;do{for(;N<E.length;){const t=E[N];N++,b(t),j(t.$$)}for(b(null),E.length=0,N=0;_.length;)_.pop()();for(let t=0;t<k.length;t+=1){const n=k[t];D.has(n)||(D.add(n),n())}k.length=0}while(E.length);for(;C.length;)C.pop()();T=!1,D.clear(),b(t)}function j(t){if(null!==t.fragment){t.update(),o(t.before_update);const n=t.dirty;t.dirty=[-1],t.fragment&&t.fragment.p(t.ctx,n),t.after_update.forEach(A)}}const S=new Set;function P(t,n){-1===t.$$.dirty[0]&&(E.push(t),T||(T=!0,L.then(O)),t.$$.dirty.fill(0)),t.$$.dirty[n/31|0]|=1<<n%31}function M(i,a,c,l,u,f,p,m=[-1]){const h=s;b(i);const g=i.$$={fragment:null,ctx:null,props:f,update:t,not_equal:u,bound:e(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(a.context||(h?h.$$.context:[])),callbacks:e(),dirty:m,skip_bound:!1,root:a.target||h.$$.root};p&&p(g.root);let v=!1;if(g.ctx=c?c(i,a.props||{},((t,n,...e)=>{const o=e.length?e[0]:n;return g.ctx&&u(g.ctx[t],g.ctx[t]=o)&&(!g.skip_bound&&g.bound[t]&&g.bound[t](o),v&&P(i,t)),n})):[],g.update(),v=!0,o(g.before_update),g.fragment=!!l&&l(g.ctx),a.target){if(a.hydrate){const t=function(t){return Array.from(t.childNodes)}(a.target);g.fragment&&g.fragment.l(t),t.forEach(d)}else g.fragment&&g.fragment.c();a.intro&&((y=i.$$.fragment)&&y.i&&(S.delete(y),y.i($))),function(t,e,i,a){const{fragment:s,on_mount:c,on_destroy:l,after_update:u}=t.$$;s&&s.m(e,i),a||A((()=>{const e=c.map(n).filter(r);l?l.push(...e):o(e),t.$$.on_mount=[]})),u.forEach(A)}(i,a.target,a.anchor,a.customElement),O()}var y,$;b(h)}let z;"function"==typeof HTMLElement&&(z=class extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"})}connectedCallback(){const{on_mount:t}=this.$$;this.$$.on_disconnect=t.map(n).filter(r);for(const t in this.$$.slotted)this.appendChild(this.$$.slotted[t])}attributeChangedCallback(t,n,e){this[t]=e}disconnectedCallback(){o(this.$$.on_disconnect)}$destroy(){!function(t,n){const e=t.$$;null!==e.fragment&&(o(e.on_destroy),e.fragment&&e.fragment.d(n),e.on_destroy=e.fragment=null,e.ctx=[])}(this,1),this.$destroy=t}$on(t,n){const e=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return e.push(n),()=>{const t=e.indexOf(n);-1!==t&&e.splice(t,1)}}$set(t){var n;this.$$set&&(n=t,0!==Object.keys(n).length)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}});var H="0.10.54";var R,F=(function(t,n){n.__esModule=!0,n.LanguageTranslator=n.addComponent=n.getChildStyleToPass=void 0,n.getChildStyleToPass=function(t,n){var e,o,r="";if(t&&(null==n?void 0:n.length)&&(null===(e=Object.keys(t))||void 0===e?void 0:e.length)&&(null===(o=null==n?void 0:n.filter((function(n){return Object.keys(t).includes(n.name)})))||void 0===o?void 0:o.length))for(var i=function(e){(null==n?void 0:n.filter((function(n){return n.name===e&&n.defaultValue!==t[e]})))&&(r+="".concat(e,":").concat(t[e],";"))},a=0,s=Object.keys(t);a<s.length;a++)i(s[a]);return r},n.addComponent=function(t){var n,e=(null===(n=null==t?void 0:t.repoName.split("/"))||void 0===n?void 0:n[1])||(null==t?void 0:t.repoName);if(!e)throw new Error("wrong componentPath "+(null==t?void 0:t.repoName));if(!(null==t?void 0:t.version))throw new Error("wrong version "+(null==t?void 0:t.version));var o=(null==t?void 0:t.iifePath)||"release/release.js";if(!document.getElementById(e+"-script")){var r=document.createElement("script");r.id=e+"-script",r.src="https://cdn.jsdelivr.net/npm/".concat(t.repoName,"@").concat(t.version,"/").concat(o),(null==t?void 0:t.local)&&location.href.includes("localhost")&&(r.src="".concat(t.local)),document.head.appendChild(r)}};var e=function(){function t(t){if(!(null==t?void 0:t.dictionary))throw new Error("no dictionary provided");this.dictionary=t.dictionary,this.setLang(null==t?void 0:t.lang)}return t.prototype.setLang=function(n){n||(n=t.getDefaultLang()),this.lang=n},t.prototype.translateWord=function(n,e){return t.getDictionaryWord(n,this.dictionary,e||this.lang)},t.prototype.translateDate=function(n,e,o){return t.formatDate(n,e,o||this.lang)},t.getDefaultLang=function(){var t,n,e,o,r,i="en";return(null===navigator||void 0===navigator?void 0:navigator.languages)&&(null===(e=null===(n=null===(t=navigator.languages[0])||void 0===t?void 0:t.split("-")[0])||void 0===n?void 0:n.toLowerCase())||void 0===e?void 0:e.length)&&(i=null===(r=null===(o=navigator.languages[0])||void 0===o?void 0:o.split("-")[0])||void 0===r?void 0:r.toLowerCase()),i},t.getDictionaryWord=function(n,e,o){var r;if(!n)throw new Error("no wordKey provided");if(!e)throw new Error("no dictionary provided");if(o&&(null===(r=e[o])||void 0===r?void 0:r[n]))return e[o][n];var i="",a=t.getDefaultLang();if(!o||a!==o){var s=null==e?void 0:e[a];(null==s?void 0:s[n])&&(i=s[n])}return i},t.formatDate=function(n,e,o){if(!n)throw new Error("no date provided");if("function"!=typeof n.getMonth)throw new Error("wrong date format");return new Intl.DateTimeFormat(o||t.getDefaultLang(),e).format(n)},t}();n.LanguageTranslator=e}(R={exports:{}},R.exports),R.exports),I={vars:[],parts:[{name:"dropdown",description:""},{name:"dropdownbutton",description:""},{name:"dropdowncontent",description:""}]},J=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,W=/\n/g,B=/^\s*/,U=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,q=/^:\s*/,K=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,V=/^[;\s]*/,G=/^\s+|\s+$/g,Q="";function X(t){return t?t.replace(G,Q):Q}var Y=function(t,n){var e,o=null;if(!t||"string"!=typeof t)return o;for(var r,i,a=function(t,n){if("string"!=typeof t)throw new TypeError("First argument must be a string");if(!t)return[];n=n||{};var e=1,o=1;function r(t){var n=t.match(W);n&&(e+=n.length);var r=t.lastIndexOf("\n");o=~r?t.length-r:o+t.length}function i(){var t={line:e,column:o};return function(n){return n.position=new a(t),l(),n}}function a(t){this.start=t,this.end={line:e,column:o},this.source=n.source}function s(r){var i=new Error(n.source+":"+e+":"+o+": "+r);if(i.reason=r,i.filename=n.source,i.line=e,i.column=o,i.source=t,!n.silent)throw i}function c(n){var e=n.exec(t);if(e){var o=e[0];return r(o),t=t.slice(o.length),e}}function l(){c(B)}function u(t){var n;for(t=t||[];n=d();)!1!==n&&t.push(n);return t}function d(){var n=i();if("/"==t.charAt(0)&&"*"==t.charAt(1)){for(var e=2;Q!=t.charAt(e)&&("*"!=t.charAt(e)||"/"!=t.charAt(e+1));)++e;if(e+=2,Q===t.charAt(e-1))return s("End of comment missing");var a=t.slice(2,e-2);return o+=2,r(a),t=t.slice(e),o+=2,n({type:"comment",comment:a})}}function f(){var t=i(),n=c(U);if(n){if(d(),!c(q))return s("property missing ':'");var e=c(K),o=t({type:"declaration",property:X(n[0].replace(J,Q)),value:e?X(e[0].replace(J,Q)):Q});return c(V),o}}return a.prototype.content=t,l(),function(){var t,n=[];for(u(n);t=f();)!1!==t&&(n.push(t),u(n));return n}()}(t),s="function"==typeof n,c=0,l=a.length;c<l;c++)r=(e=a[c]).property,i=e.value,s?n(r,i,e):i&&(o||(o={}),o[r]=i);return o};function Z(n){let e,o,r;return{c(){e=f("button"),e.textContent="☰",y(e,"font-size","20px"),y(e,"border","none")},m(t,i){u(t,e,i),o||(r=h(e,"click",n[11]),o=!0)},p:t,d(t){t&&d(e),o=!1,r()}}}function tt(t){let n,e;return{c(){n=f("img"),y(n,"height","30px"),y(n,"vertical-align","middle"),g(n,"alt",""),c(n.src,e=t[1])||g(n,"src",e)},m(t,e){u(t,n,e)},p(t,o){2&o&&!c(n.src,e=t[1])&&g(n,"src",e)},d(t){t&&d(n)}}}function nt(t){let n,e,o,r,i,a,s;return{c(){n=f("hb-dropdown-simple"),e=f("span"),o=f("img"),y(o,"height","30px"),y(o,"vertical-align","middle"),g(o,"alt",""),c(o.src,r=t[2].imgUri)||g(o,"src",r),g(e,"slot","dropdownbutton"),v(n,"style",t[4]),v(n,"list",i=JSON.stringify(t[2].list)),v(n,"position","right")},m(r,i){u(r,n,i),l(n,e),l(e,o),a||(s=h(n,"dropDownClick",t[12]),a=!0)},p(t,e){4&e&&!c(o.src,r=t[2].imgUri)&&g(o,"src",r),16&e&&v(n,"style",t[4]),4&e&&i!==(i=JSON.stringify(t[2].list))&&v(n,"list",i)},d(t){t&&d(n),a=!1,s()}}}function et(n){let e,o,r,i,a,s,c,h,v,$,b,w,x,E,_,k=!n[3]&&Z(n),C=n[1]&&tt(n),L=n[2]&&nt(n);return{c(){e=f("nav"),o=f("div"),k&&k.c(),r=m(),i=f("slot"),a=m(),s=f("div"),c=f("slot"),C&&C.c(),h=m(),v=p(n[0]),$=m(),b=f("slot"),w=m(),x=f("div"),E=f("div"),E.innerHTML='<slot name="right-slot"></slot>',_=m(),L&&L.c(),this.c=t,g(i,"name","left-slot"),y(o,"text-align","left"),g(o,"class","navitem"),g(o,"part","left-slot"),g(c,"name","brand"),g(b,"name","center-slot"),g(s,"part","center-slot"),g(s,"class","navitem"),y(E,"display","inline-block"),g(x,"part","right-slot"),g(x,"class","navitem"),g(e,"id","navbar")},m(t,n){u(t,e,n),l(e,o),k&&k.m(o,null),l(o,r),l(o,i),l(e,a),l(e,s),l(s,c),C&&C.m(c,null),l(c,h),l(c,v),l(s,$),l(s,b),l(e,w),l(e,x),l(x,E),l(x,_),L&&L.m(x,null)},p(t,[n]){t[3]?k&&(k.d(1),k=null):k?k.p(t,n):(k=Z(t),k.c(),k.m(o,r)),t[1]?C?C.p(t,n):(C=tt(t),C.c(),C.m(c,h)):C&&(C.d(1),C=null),1&n&&function(t,n){n=""+n,t.wholeText!==n&&(t.data=n)}(v,t[0]),t[2]?L?L.p(t,n):(L=nt(t),L.c(),L.m(x,null)):L&&(L.d(1),L=null)},i:t,o:t,d(t){t&&d(e),k&&k.d(),C&&C.d(),L&&L.d()}}}function ot(t,n,e){let o,r,{style:i}=n,a="",{id:s}=n,{companybrandname:c}=n,{companylogouri:l}=n,{switchopen:u}=n,{usermenu:d}=n,{noburger:f}=n;F.addComponent({repoName:"@htmlbricks/hb-dropdown-simple",version:H});const p=w(),m=x();function h(t,n){m(t,n),p.dispatchEvent&&p.dispatchEvent(new CustomEvent(t,{detail:n}))}function g(){r=!r,h("navmenuswitch",{isOpen:r})}return t.$$set=t=>{"style"in t&&e(9,i=t.style),"id"in t&&e(7,s=t.id),"companybrandname"in t&&e(0,c=t.companybrandname),"companylogouri"in t&&e(1,l=t.companylogouri),"switchopen"in t&&e(8,u=t.switchopen),"usermenu"in t&&e(2,d=t.usermenu),"noburger"in t&&e(3,f=t.noburger)},t.$$.update=()=>{1935&t.$$.dirty&&(i&&(e(10,o=Y(i)),e(4,a=F.getChildStyleToPass(o,null==I?void 0:I.vars))),c||e(0,c=""),l||e(1,l=""),s||e(7,s=""),u&&"no"!==u?r=!0:(e(8,u=""),r=!1),f||e(3,f=null),d?"string"==typeof d&&e(2,d=JSON.parse(d)):e(2,d=null))},[c,l,d,f,a,h,g,s,u,i,o,()=>g(),t=>h("userClick",t.detail.key)]}class rt extends z{constructor(t){super(),this.shadowRoot.innerHTML='<style>@import url("https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&display=swap");:host{font-family:"Roboto", sans-serif;width:100%;display:block}#navbar{display:flex;justify-content:space-between;align-items:stretch;background-color:#f1f1f1}.navitem{color:white;margin:10px;text-align:center;line-height:30px;font-size:22px;align-self:center;color:black}</style>',M(this,{target:this.shadowRoot,props:$(this.attributes),customElement:!0},ot,et,i,{style:9,id:7,companybrandname:0,companylogouri:1,switchopen:8,usermenu:2,noburger:3},null),t&&(t.target&&u(t.target,this,t.anchor),t.props&&(this.$set(t.props),O()))}static get observedAttributes(){return["style","id","companybrandname","companylogouri","switchopen","usermenu","noburger"]}get style(){return this.$$.ctx[9]}set style(t){this.$$set({style:t}),O()}get id(){return this.$$.ctx[7]}set id(t){this.$$set({id:t}),O()}get companybrandname(){return this.$$.ctx[0]}set companybrandname(t){this.$$set({companybrandname:t}),O()}get companylogouri(){return this.$$.ctx[1]}set companylogouri(t){this.$$set({companylogouri:t}),O()}get switchopen(){return this.$$.ctx[8]}set switchopen(t){this.$$set({switchopen:t}),O()}get usermenu(){return this.$$.ctx[2]}set usermenu(t){this.$$set({usermenu:t}),O()}get noburger(){return this.$$.ctx[3]}set noburger(t){this.$$set({noburger:t}),O()}}return customElements.define("hb-navbar",rt),rt}();
2
2
  //# sourceMappingURL=release.js.map