@htmlbricks/hb-navbar 0.18.12 → 0.18.13

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.18.12",
5
+ "version": "0.18.13",
6
6
  "main": "release/release.js",
7
7
  "publishConfig": {
8
8
  "access": "public"
@@ -70,7 +70,7 @@
70
70
  "wc-js-utils": "^0.0.1"
71
71
  },
72
72
  "dependencies": {
73
- "@htmlbricks/hb-dropdown-simple": "^0.18.12"
73
+ "@htmlbricks/hb-dropdown-simple": "^0.18.13"
74
74
  },
75
75
  "keywords": [
76
76
  "svelte",
@@ -78,5 +78,5 @@
78
78
  "webcomponents"
79
79
  ],
80
80
  "contributors": [],
81
- "gitHead": "c249c2fd572b339073d359bcaed8f3889b33a846"
81
+ "gitHead": "8d1a7071816addf95cca27085e48af80a21fdd61"
82
82
  }
@@ -253,5 +253,5 @@
253
253
  },
254
254
  "iifePath": "release/release.js",
255
255
  "repoName": "@htmlbricks/hb-navbar",
256
- "version": "0.18.12"
256
+ "version": "0.18.13"
257
257
  }
@@ -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 s,a;function l(t,n){return s||(s=document.createElement("a")),s.href=n,t===s.href}function c(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 h(){return p(" ")}function m(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){a=t}function w(){if(!a)throw new Error("Function called outside component initialization");return a}function x(){const t=w();return(n,e,{cancelable:o=!1}={})=>{const r=t.$$.callbacks[n];if(r){const i=function(t,n,{bubbles:e=!1,cancelable:o=!1}={}){const r=document.createEvent("CustomEvent");return r.initCustomEvent(t,e,o,n),r}(n,e,{cancelable:o});return r.slice().forEach((n=>{n.call(t,i)})),!i.defaultPrevented}return!0}}const _=[],E=[],k=[],C=[],L=Promise.resolve();let T=!1;function D(t){k.push(t)}const A=new Set;let N=0;function O(){const t=a;do{for(;N<_.length;){const t=_[N];N++,b(t),S(t.$$)}for(b(null),_.length=0,N=0;E.length;)E.pop()();for(let t=0;t<k.length;t+=1){const n=k[t];A.has(n)||(A.add(n),n())}k.length=0}while(_.length);for(;C.length;)C.pop()();T=!1,A.clear(),b(t)}function S(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(D)}}const P=new Set;function j(t,n){-1===t.$$.dirty[0]&&(_.push(t),T||(T=!0,L.then(O)),t.$$.dirty.fill(0)),t.$$.dirty[n/31|0]|=1<<n%31}function M(i,s,l,c,u,f,p,h=[-1]){const m=a;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(s.context||(m?m.$$.context:[])),callbacks:e(),dirty:h,skip_bound:!1,root:s.target||m.$$.root};p&&p(g.root);let v=!1;if(g.ctx=l?l(i,s.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&&j(i,t)),n})):[],g.update(),v=!0,o(g.before_update),g.fragment=!!c&&c(g.ctx),s.target){if(s.hydrate){const t=function(t){return Array.from(t.childNodes)}(s.target);g.fragment&&g.fragment.l(t),t.forEach(d)}else g.fragment&&g.fragment.c();s.intro&&((y=i.$$.fragment)&&y.i&&(P.delete(y),y.i($))),function(t,e,i,s){const{fragment:a,on_mount:l,on_destroy:c,after_update:u}=t.$$;a&&a.m(e,i),s||D((()=>{const e=l.map(n).filter(r);c?c.push(...e):o(e),t.$$.on_mount=[]})),u.forEach(D)}(i,s.target,s.anchor,s.customElement),O()}var y,$;b(m)}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.18.12";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],";"))},s=0,a=Object.keys(t);s<a.length;s++)i(a[s]);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"))try{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)}catch(t){console.warn(t)}};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="",s=t.getDefaultLang();if(!o||s!==o){var a=null==e?void 0:e[s];(null==a?void 0:a[n])&&(i=a[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,s=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 s(t),c(),n}}function s(t){this.start=t,this.end={line:e,column:o},this.source=n.source}function a(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 l(n){var e=n.exec(t);if(e){var o=e[0];return r(o),t=t.slice(o.length),e}}function c(){l(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 a("End of comment missing");var s=t.slice(2,e-2);return o+=2,r(s),t=t.slice(e),o+=2,n({type:"comment",comment:s})}}function f(){var t=i(),n=l(U);if(n){if(d(),!l(q))return a("property missing ':'");var e=l(K),o=t({type:"declaration",property:X(n[0].replace(J,Q)),value:e?X(e[0].replace(J,Q)):Q});return l(V),o}}return s.prototype.content=t,c(),function(){var t,n=[];for(u(n);t=f();)!1!==t&&(n.push(t),u(n));return n}()}(t),a="function"==typeof n,l=0,c=s.length;l<c;l++)r=(e=s[l]).property,i=e.value,a?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.innerHTML='<slot name="nav-switcher">☰</slot>',y(e,"font-size","20px"),y(e,"border","none")},m(t,i){u(t,e,i),o||(r=m(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",""),l(n.src,e=t[1])||g(n,"src",e)},m(t,e){u(t,n,e)},p(t,o){2&o&&!l(n.src,e=t[1])&&g(n,"src",e)},d(t){t&&d(n)}}}function nt(t){let n,e,o,r,i,s,a;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",""),l(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),c(n,e),c(e,o),s||(a=m(n,"dropDownClick",t[14]),s=!0)},p(t,e){4&e&&!l(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),s=!1,a()}}}function et(n){let e,r,i,s,a,l,v,$,b,w,x,_,E,k,C,L,T,D,A,N,O,S,P=!n[3]&&Z(n),j=n[1]&&tt(n),M=n[2]&&nt(n);return{c(){e=f("div"),r=f("div"),i=f("div"),P&&P.c(),s=h(),a=f("span"),a.innerHTML='<slot name="left-slot"></slot>',l=h(),v=f("div"),$=f("div"),b=f("span"),w=f("slot"),j&&j.c(),x=h(),_=p(n[0]),E=h(),k=f("slot"),C=h(),L=f("div"),T=f("div"),D=f("div"),A=f("slot"),N=h(),M&&M.c(),this.c=t,y(a,"cursor","pointer"),g(i,"id","left_side_content"),g(i,"class","side"),y(r,"padding-left","10px"),g(e,"id","left_side"),g(e,"class","navitem"),g(e,"part","left-slot"),g(w,"name","brand"),y(b,"cursor","pointer"),g(k,"name","center-slot"),g($,"class","side"),y($,"margin","auto"),y($,"max-width","100%"),g(v,"id","center_side"),g(v,"part","center-slot"),g(v,"class","navitem"),g(A,"name","right-slot"),g(D,"class","side"),g(T,"id","rigth_side_content"),g(L,"id","rigth_side"),g(L,"part","right-slot"),g(L,"class","navitem")},m(t,o){u(t,e,o),c(e,r),c(r,i),P&&P.m(i,null),c(i,s),c(i,a),u(t,l,o),u(t,v,o),c(v,$),c($,b),c(b,w),j&&j.m(w,null),c(w,x),c(w,_),c($,E),c($,k),u(t,C,o),u(t,L,o),c(L,T),c(T,D),c(D,A),c(D,N),M&&M.m(D,null),O||(S=[m(a,"click",n[12]),m(b,"click",n[13])],O=!0)},p(t,[n]){t[3]?P&&(P.d(1),P=null):P?P.p(t,n):(P=Z(t),P.c(),P.m(i,s)),t[1]?j?j.p(t,n):(j=tt(t),j.c(),j.m(w,x)):j&&(j.d(1),j=null),1&n&&function(t,n){n=""+n,t.wholeText!==n&&(t.data=n)}(_,t[0]),t[2]?M?M.p(t,n):(M=nt(t),M.c(),M.m(D,null)):M&&(M.d(1),M=null)},i:t,o:t,d(t){t&&d(e),P&&P.d(),t&&d(l),t&&d(v),j&&j.d(),t&&d(C),t&&d(L),M&&M.d(),O=!1,o(S)}}}function ot(t,n,e){let o,r,{style:i}=n,s="",{id:a}=n,{companybrandname:l}=n,{companylogouri:c}=n,{switchopen:u}=n,{usermenu:d}=n,{noburger:f}=n;F.addComponent({repoName:"@htmlbricks/hb-dropdown-simple",version:H});const p=w(),h=x();function m(t,n){h(t,n),p.dispatchEvent&&p.dispatchEvent(new CustomEvent(t,{detail:n}))}function g(){r=!r,m("navmenuswitch",{isOpen:r})}return t.$$set=t=>{"style"in t&&e(9,i=t.style),"id"in t&&e(7,a=t.id),"companybrandname"in t&&e(0,l=t.companybrandname),"companylogouri"in t&&e(1,c=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,s=F.getChildStyleToPass(o,null==I?void 0:I.vars))),l||e(0,l=""),c||e(1,c=""),a||e(7,a=""),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))},[l,c,d,f,s,m,g,a,u,i,o,()=>g(),()=>m("navbarSlotClick",{side:"left"}),()=>m("navbarSlotClick",{side:"center"}),t=>m("navbarDropDownClick",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;background-color:#f1f1f1;width:100%;height:30px;display:block;padding:10px 0px 10px 0px}.side{position:relative;z-index:1;max-width:33%}#left_side{text-align:left}#center_side{text-align:center}#rigth_side{text-align:right}#rigth_side_content{display:inline-block;padding-right:10px;z-index:3}#left_side_content{z-index:3;position:relative}.navitem{position:absolute;width:100%;color:white;line-height:30px;font-size:22px;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 s,a;function l(t,n){return s||(s=document.createElement("a")),s.href=n,t===s.href}function c(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 h(){return p(" ")}function m(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){a=t}function w(){if(!a)throw new Error("Function called outside component initialization");return a}function x(){const t=w();return(n,e,{cancelable:o=!1}={})=>{const r=t.$$.callbacks[n];if(r){const i=function(t,n,{bubbles:e=!1,cancelable:o=!1}={}){const r=document.createEvent("CustomEvent");return r.initCustomEvent(t,e,o,n),r}(n,e,{cancelable:o});return r.slice().forEach((n=>{n.call(t,i)})),!i.defaultPrevented}return!0}}const _=[],E=[],k=[],C=[],L=Promise.resolve();let T=!1;function D(t){k.push(t)}const A=new Set;let N=0;function O(){const t=a;do{for(;N<_.length;){const t=_[N];N++,b(t),S(t.$$)}for(b(null),_.length=0,N=0;E.length;)E.pop()();for(let t=0;t<k.length;t+=1){const n=k[t];A.has(n)||(A.add(n),n())}k.length=0}while(_.length);for(;C.length;)C.pop()();T=!1,A.clear(),b(t)}function S(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(D)}}const P=new Set;function j(t,n){-1===t.$$.dirty[0]&&(_.push(t),T||(T=!0,L.then(O)),t.$$.dirty.fill(0)),t.$$.dirty[n/31|0]|=1<<n%31}function M(i,s,l,c,u,f,p,h=[-1]){const m=a;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(s.context||(m?m.$$.context:[])),callbacks:e(),dirty:h,skip_bound:!1,root:s.target||m.$$.root};p&&p(g.root);let v=!1;if(g.ctx=l?l(i,s.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&&j(i,t)),n})):[],g.update(),v=!0,o(g.before_update),g.fragment=!!c&&c(g.ctx),s.target){if(s.hydrate){const t=function(t){return Array.from(t.childNodes)}(s.target);g.fragment&&g.fragment.l(t),t.forEach(d)}else g.fragment&&g.fragment.c();s.intro&&((y=i.$$.fragment)&&y.i&&(P.delete(y),y.i($))),function(t,e,i,s){const{fragment:a,on_mount:l,on_destroy:c,after_update:u}=t.$$;a&&a.m(e,i),s||D((()=>{const e=l.map(n).filter(r);c?c.push(...e):o(e),t.$$.on_mount=[]})),u.forEach(D)}(i,s.target,s.anchor,s.customElement),O()}var y,$;b(m)}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.18.13";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],";"))},s=0,a=Object.keys(t);s<a.length;s++)i(a[s]);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"))try{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)}catch(t){console.warn(t)}};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="",s=t.getDefaultLang();if(!o||s!==o){var a=null==e?void 0:e[s];(null==a?void 0:a[n])&&(i=a[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,s=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 s(t),c(),n}}function s(t){this.start=t,this.end={line:e,column:o},this.source=n.source}function a(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 l(n){var e=n.exec(t);if(e){var o=e[0];return r(o),t=t.slice(o.length),e}}function c(){l(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 a("End of comment missing");var s=t.slice(2,e-2);return o+=2,r(s),t=t.slice(e),o+=2,n({type:"comment",comment:s})}}function f(){var t=i(),n=l(U);if(n){if(d(),!l(q))return a("property missing ':'");var e=l(K),o=t({type:"declaration",property:X(n[0].replace(J,Q)),value:e?X(e[0].replace(J,Q)):Q});return l(V),o}}return s.prototype.content=t,c(),function(){var t,n=[];for(u(n);t=f();)!1!==t&&(n.push(t),u(n));return n}()}(t),a="function"==typeof n,l=0,c=s.length;l<c;l++)r=(e=s[l]).property,i=e.value,a?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.innerHTML='<slot name="nav-switcher">☰</slot>',y(e,"font-size","20px"),y(e,"border","none")},m(t,i){u(t,e,i),o||(r=m(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",""),l(n.src,e=t[1])||g(n,"src",e)},m(t,e){u(t,n,e)},p(t,o){2&o&&!l(n.src,e=t[1])&&g(n,"src",e)},d(t){t&&d(n)}}}function nt(t){let n,e,o,r,i,s,a;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",""),l(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),c(n,e),c(e,o),s||(a=m(n,"dropDownClick",t[14]),s=!0)},p(t,e){4&e&&!l(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),s=!1,a()}}}function et(n){let e,r,i,s,a,l,v,$,b,w,x,_,E,k,C,L,T,D,A,N,O,S,P=!n[3]&&Z(n),j=n[1]&&tt(n),M=n[2]&&nt(n);return{c(){e=f("div"),r=f("div"),i=f("div"),P&&P.c(),s=h(),a=f("span"),a.innerHTML='<slot name="left-slot"></slot>',l=h(),v=f("div"),$=f("div"),b=f("span"),w=f("slot"),j&&j.c(),x=h(),_=p(n[0]),E=h(),k=f("slot"),C=h(),L=f("div"),T=f("div"),D=f("div"),A=f("slot"),N=h(),M&&M.c(),this.c=t,y(a,"cursor","pointer"),g(i,"id","left_side_content"),g(i,"class","side"),y(r,"padding-left","10px"),g(e,"id","left_side"),g(e,"class","navitem"),g(e,"part","left-slot"),g(w,"name","brand"),y(b,"cursor","pointer"),g(k,"name","center-slot"),g($,"class","side"),y($,"margin","auto"),y($,"max-width","100%"),g(v,"id","center_side"),g(v,"part","center-slot"),g(v,"class","navitem"),g(A,"name","right-slot"),g(D,"class","side"),g(T,"id","rigth_side_content"),g(L,"id","rigth_side"),g(L,"part","right-slot"),g(L,"class","navitem")},m(t,o){u(t,e,o),c(e,r),c(r,i),P&&P.m(i,null),c(i,s),c(i,a),u(t,l,o),u(t,v,o),c(v,$),c($,b),c(b,w),j&&j.m(w,null),c(w,x),c(w,_),c($,E),c($,k),u(t,C,o),u(t,L,o),c(L,T),c(T,D),c(D,A),c(D,N),M&&M.m(D,null),O||(S=[m(a,"click",n[12]),m(b,"click",n[13])],O=!0)},p(t,[n]){t[3]?P&&(P.d(1),P=null):P?P.p(t,n):(P=Z(t),P.c(),P.m(i,s)),t[1]?j?j.p(t,n):(j=tt(t),j.c(),j.m(w,x)):j&&(j.d(1),j=null),1&n&&function(t,n){n=""+n,t.wholeText!==n&&(t.data=n)}(_,t[0]),t[2]?M?M.p(t,n):(M=nt(t),M.c(),M.m(D,null)):M&&(M.d(1),M=null)},i:t,o:t,d(t){t&&d(e),P&&P.d(),t&&d(l),t&&d(v),j&&j.d(),t&&d(C),t&&d(L),M&&M.d(),O=!1,o(S)}}}function ot(t,n,e){let o,r,{style:i}=n,s="",{id:a}=n,{companybrandname:l}=n,{companylogouri:c}=n,{switchopen:u}=n,{usermenu:d}=n,{noburger:f}=n;F.addComponent({repoName:"@htmlbricks/hb-dropdown-simple",version:H});const p=w(),h=x();function m(t,n){h(t,n),p.dispatchEvent&&p.dispatchEvent(new CustomEvent(t,{detail:n}))}function g(){r=!r,m("navmenuswitch",{isOpen:r})}return t.$$set=t=>{"style"in t&&e(9,i=t.style),"id"in t&&e(7,a=t.id),"companybrandname"in t&&e(0,l=t.companybrandname),"companylogouri"in t&&e(1,c=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,s=F.getChildStyleToPass(o,null==I?void 0:I.vars))),l||e(0,l=""),c||e(1,c=""),a||e(7,a=""),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))},[l,c,d,f,s,m,g,a,u,i,o,()=>g(),()=>m("navbarSlotClick",{side:"left"}),()=>m("navbarSlotClick",{side:"center"}),t=>m("navbarDropDownClick",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;background-color:#f1f1f1;width:100%;height:30px;display:block;padding:10px 0px 10px 0px}.side{position:relative;z-index:1;max-width:33%}#left_side{text-align:left}#center_side{text-align:center}#rigth_side{text-align:right}#rigth_side_content{display:inline-block;padding-right:10px;z-index:3}#left_side_content{z-index:3;position:relative}.navitem{position:absolute;width:100%;color:white;line-height:30px;font-size:22px;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