@htmlbricks/hb-navbar 0.20.16 → 0.20.17

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.20.16",
5
+ "version": "0.20.17",
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.20.16"
73
+ "@htmlbricks/hb-dropdown-simple": "^0.20.17"
74
74
  },
75
75
  "keywords": [
76
76
  "svelte",
@@ -78,5 +78,5 @@
78
78
  "webcomponents"
79
79
  ],
80
80
  "contributors": [],
81
- "gitHead": "7e27392790fac42c153fa19ab40d828149d31d08"
81
+ "gitHead": "0670e46cc090b813b86b0bdec8587eb30a4d655a"
82
82
  }
@@ -253,5 +253,5 @@
253
253
  },
254
254
  "iifePath": "release/release.js",
255
255
  "repoName": "@htmlbricks/hb-navbar",
256
- "version": "0.20.16"
256
+ "version": "0.20.17"
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 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&&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){s=t}function w(){if(!s)throw new Error("Function called outside component initialization");return s}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=[];let k=[];const C=[],L=Promise.resolve();let D=!1;function N(t){k.push(t)}const O=new Set;let T=0;function A(){if(0!==T)return;const t=s;do{try{for(;T<_.length;){const t=_[T];T++,b(t),S(t.$$)}}catch(t){throw _.length=0,T=0,t}for(b(null),_.length=0,T=0;E.length;)E.pop()();for(let t=0;t<k.length;t+=1){const n=k[t];O.has(n)||(O.add(n),n())}k.length=0}while(_.length);for(;C.length;)C.pop()();D=!1,O.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(N)}}const P=new Set;function j(t,n){const e=t.$$;null!==e.fragment&&(!function(t){const n=[],e=[];k.forEach((o=>-1===t.indexOf(o)?n.push(o):e.push(o))),e.forEach((t=>t())),k=n}(e.after_update),o(e.on_destroy),e.fragment&&e.fragment.d(n),e.on_destroy=e.fragment=null,e.ctx=[])}function z(t,n){-1===t.$$.dirty[0]&&(_.push(t),D||(D=!0,L.then(A)),t.$$.dirty.fill(0)),t.$$.dirty[n/31|0]|=1<<n%31}function M(i,a,c,l,u,f,p,h=[-1]){const m=s;b(i);const g=i.$$={fragment:null,ctx:[],props:f,update:t,not_equal:u,bound:e(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(a.context||(m?m.$$.context:[])),callbacks:e(),dirty:h,skip_bound:!1,root:a.target||m.$$.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&&z(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&&(P.delete(y),y.i($))),function(t,e,i,a){const{fragment:s,after_update:c}=t.$$;s&&s.m(e,i),a||N((()=>{const e=t.$$.on_mount.map(n).filter(r);t.$$.on_destroy?t.$$.on_destroy.push(...e):o(e),t.$$.on_mount=[]})),c.forEach(N)}(i,a.target,a.anchor,a.customElement),A()}var y,$;b(m)}let H;"function"==typeof HTMLElement&&(H=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(){j(this,1),this.$destroy=t}$on(n,e){if(!r(e))return t;const o=this.$$.callbacks[n]||(this.$$.callbacks[n]=[]);return o.push(e),()=>{const t=o.indexOf(e);-1!==t&&o.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 R="0.20.16";var F,I=(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"))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="",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}(F={exports:{}},F.exports),F.exports),J={vars:[],parts:[{name:"dropdown",description:""},{name:"dropdownbutton",description:""},{name:"dropdowncontent",description:""}]},W=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,B=/\n/g,U=/^\s*/,q=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,K=/^:\s*/,V=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,G=/^[;\s]*/,Q=/^\s+|\s+$/g,X="";function Y(t){return t?t.replace(Q,X):X}var Z=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(B);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(U)}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;X!=t.charAt(e)&&("*"!=t.charAt(e)||"/"!=t.charAt(e+1));)++e;if(e+=2,X===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(q);if(n){if(d(),!c(K))return s("property missing ':'");var e=c(V),o=t({type:"declaration",property:Y(n[0].replace(W,X)),value:e?Y(e[0].replace(W,X)):X});return c(G),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 tt(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 nt(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 et(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=m(n,"dropDownClick",t[14]),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 ot(n){let e,r,i,a,s,c,v,$,b,w,x,_,E,k,C,L,D,N,O,T,A,S,P=!n[3]&&tt(n),j=n[1]&&nt(n),z=n[2]&&et(n);return{c(){e=f("div"),r=f("div"),i=f("div"),P&&P.c(),a=h(),s=f("span"),s.innerHTML='<slot name="left-slot"></slot>',c=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"),D=f("div"),N=f("div"),O=f("slot"),T=h(),z&&z.c(),this.c=t,y(s,"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(O,"name","right-slot"),g(N,"class","side"),g(D,"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),l(e,r),l(r,i),P&&P.m(i,null),l(i,a),l(i,s),u(t,c,o),u(t,v,o),l(v,$),l($,b),l(b,w),j&&j.m(w,null),l(w,x),l(w,_),l($,E),l($,k),u(t,C,o),u(t,L,o),l(L,D),l(D,N),l(N,O),l(N,T),z&&z.m(N,null),A||(S=[m(s,"click",n[12]),m(b,"click",n[13])],A=!0)},p(t,[n]){t[3]?P&&(P.d(1),P=null):P?P.p(t,n):(P=tt(t),P.c(),P.m(i,a)),t[1]?j?j.p(t,n):(j=nt(t),j.c(),j.m(w,x)):j&&(j.d(1),j=null),1&n&&function(t,n){n=""+n,t.data!==n&&(t.data=n)}(_,t[0]),t[2]?z?z.p(t,n):(z=et(t),z.c(),z.m(N,null)):z&&(z.d(1),z=null)},i:t,o:t,d(t){t&&d(e),P&&P.d(),t&&d(c),t&&d(v),j&&j.d(),t&&d(C),t&&d(L),z&&z.d(),A=!1,o(S)}}}function rt(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;I.addComponent({repoName:"@htmlbricks/hb-dropdown-simple",version:R});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,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=Z(i)),e(4,a=I.getChildStyleToPass(o,null==J?void 0:J.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,m,g,s,u,i,o,()=>g(),()=>m("navbarSlotClick",{side:"left"}),()=>m("navbarSlotClick",{side:"center"}),t=>m("navbarDropDownClick",t.detail.key)]}class it extends H{constructor(t){super();const n=document.createElement("style");n.textContent='@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}',this.shadowRoot.appendChild(n),M(this,{target:this.shadowRoot,props:$(this.attributes),customElement:!0},rt,ot,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),A()))}static get observedAttributes(){return["style","id","companybrandname","companylogouri","switchopen","usermenu","noburger"]}get style(){return this.$$.ctx[9]}set style(t){this.$$set({style:t}),A()}get id(){return this.$$.ctx[7]}set id(t){this.$$set({id:t}),A()}get companybrandname(){return this.$$.ctx[0]}set companybrandname(t){this.$$set({companybrandname:t}),A()}get companylogouri(){return this.$$.ctx[1]}set companylogouri(t){this.$$set({companylogouri:t}),A()}get switchopen(){return this.$$.ctx[8]}set switchopen(t){this.$$set({switchopen:t}),A()}get usermenu(){return this.$$.ctx[2]}set usermenu(t){this.$$set({usermenu:t}),A()}get noburger(){return this.$$.ctx[3]}set noburger(t){this.$$set({noburger:t}),A()}}return customElements.define("hb-navbar",it),it}();
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&&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){s=t}function w(){if(!s)throw new Error("Function called outside component initialization");return s}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=[];let k=[];const C=[],L=Promise.resolve();let D=!1;function N(t){k.push(t)}const O=new Set;let T=0;function A(){if(0!==T)return;const t=s;do{try{for(;T<_.length;){const t=_[T];T++,b(t),S(t.$$)}}catch(t){throw _.length=0,T=0,t}for(b(null),_.length=0,T=0;E.length;)E.pop()();for(let t=0;t<k.length;t+=1){const n=k[t];O.has(n)||(O.add(n),n())}k.length=0}while(_.length);for(;C.length;)C.pop()();D=!1,O.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(N)}}const P=new Set;function j(t,n){const e=t.$$;null!==e.fragment&&(!function(t){const n=[],e=[];k.forEach((o=>-1===t.indexOf(o)?n.push(o):e.push(o))),e.forEach((t=>t())),k=n}(e.after_update),o(e.on_destroy),e.fragment&&e.fragment.d(n),e.on_destroy=e.fragment=null,e.ctx=[])}function z(t,n){-1===t.$$.dirty[0]&&(_.push(t),D||(D=!0,L.then(A)),t.$$.dirty.fill(0)),t.$$.dirty[n/31|0]|=1<<n%31}function M(i,a,c,l,u,f,p,h=[-1]){const m=s;b(i);const g=i.$$={fragment:null,ctx:[],props:f,update:t,not_equal:u,bound:e(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(a.context||(m?m.$$.context:[])),callbacks:e(),dirty:h,skip_bound:!1,root:a.target||m.$$.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&&z(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&&(P.delete(y),y.i($))),function(t,e,i,a){const{fragment:s,after_update:c}=t.$$;s&&s.m(e,i),a||N((()=>{const e=t.$$.on_mount.map(n).filter(r);t.$$.on_destroy?t.$$.on_destroy.push(...e):o(e),t.$$.on_mount=[]})),c.forEach(N)}(i,a.target,a.anchor,a.customElement),A()}var y,$;b(m)}let H;"function"==typeof HTMLElement&&(H=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(){j(this,1),this.$destroy=t}$on(n,e){if(!r(e))return t;const o=this.$$.callbacks[n]||(this.$$.callbacks[n]=[]);return o.push(e),()=>{const t=o.indexOf(e);-1!==t&&o.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 R="0.20.17";var F,I=(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"))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="",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}(F={exports:{}},F.exports),F.exports),J={vars:[],parts:[{name:"dropdown",description:""},{name:"dropdownbutton",description:""},{name:"dropdowncontent",description:""}]},W=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,B=/\n/g,U=/^\s*/,q=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,K=/^:\s*/,V=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,G=/^[;\s]*/,Q=/^\s+|\s+$/g,X="";function Y(t){return t?t.replace(Q,X):X}var Z=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(B);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(U)}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;X!=t.charAt(e)&&("*"!=t.charAt(e)||"/"!=t.charAt(e+1));)++e;if(e+=2,X===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(q);if(n){if(d(),!c(K))return s("property missing ':'");var e=c(V),o=t({type:"declaration",property:Y(n[0].replace(W,X)),value:e?Y(e[0].replace(W,X)):X});return c(G),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 tt(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 nt(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 et(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=m(n,"dropDownClick",t[14]),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 ot(n){let e,r,i,a,s,c,v,$,b,w,x,_,E,k,C,L,D,N,O,T,A,S,P=!n[3]&&tt(n),j=n[1]&&nt(n),z=n[2]&&et(n);return{c(){e=f("div"),r=f("div"),i=f("div"),P&&P.c(),a=h(),s=f("span"),s.innerHTML='<slot name="left-slot"></slot>',c=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"),D=f("div"),N=f("div"),O=f("slot"),T=h(),z&&z.c(),this.c=t,y(s,"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(O,"name","right-slot"),g(N,"class","side"),g(D,"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),l(e,r),l(r,i),P&&P.m(i,null),l(i,a),l(i,s),u(t,c,o),u(t,v,o),l(v,$),l($,b),l(b,w),j&&j.m(w,null),l(w,x),l(w,_),l($,E),l($,k),u(t,C,o),u(t,L,o),l(L,D),l(D,N),l(N,O),l(N,T),z&&z.m(N,null),A||(S=[m(s,"click",n[12]),m(b,"click",n[13])],A=!0)},p(t,[n]){t[3]?P&&(P.d(1),P=null):P?P.p(t,n):(P=tt(t),P.c(),P.m(i,a)),t[1]?j?j.p(t,n):(j=nt(t),j.c(),j.m(w,x)):j&&(j.d(1),j=null),1&n&&function(t,n){n=""+n,t.data!==n&&(t.data=n)}(_,t[0]),t[2]?z?z.p(t,n):(z=et(t),z.c(),z.m(N,null)):z&&(z.d(1),z=null)},i:t,o:t,d(t){t&&d(e),P&&P.d(),t&&d(c),t&&d(v),j&&j.d(),t&&d(C),t&&d(L),z&&z.d(),A=!1,o(S)}}}function rt(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;I.addComponent({repoName:"@htmlbricks/hb-dropdown-simple",version:R});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,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=Z(i)),e(4,a=I.getChildStyleToPass(o,null==J?void 0:J.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,m,g,s,u,i,o,()=>g(),()=>m("navbarSlotClick",{side:"left"}),()=>m("navbarSlotClick",{side:"center"}),t=>m("navbarDropDownClick",t.detail.key)]}class it extends H{constructor(t){super();const n=document.createElement("style");n.textContent='@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}',this.shadowRoot.appendChild(n),M(this,{target:this.shadowRoot,props:$(this.attributes),customElement:!0},rt,ot,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),A()))}static get observedAttributes(){return["style","id","companybrandname","companylogouri","switchopen","usermenu","noburger"]}get style(){return this.$$.ctx[9]}set style(t){this.$$set({style:t}),A()}get id(){return this.$$.ctx[7]}set id(t){this.$$set({id:t}),A()}get companybrandname(){return this.$$.ctx[0]}set companybrandname(t){this.$$set({companybrandname:t}),A()}get companylogouri(){return this.$$.ctx[1]}set companylogouri(t){this.$$set({companylogouri:t}),A()}get switchopen(){return this.$$.ctx[8]}set switchopen(t){this.$$set({switchopen:t}),A()}get usermenu(){return this.$$.ctx[2]}set usermenu(t){this.$$set({usermenu:t}),A()}get noburger(){return this.$$.ctx[3]}set noburger(t){this.$$set({noburger:t}),A()}}return customElements.define("hb-navbar",it),it}();
2
2
  //# sourceMappingURL=release.js.map