@htmlbricks/hb-sidebar-cards-navigator 0.20.10 → 0.20.11
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 +5 -5
- package/release/manifest.json +1 -1
- package/release/release.js +1 -1
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@htmlbricks/hb-sidebar-cards-navigator",
|
|
3
3
|
"displayName": "Svelte-Bootstrap sidebar-cards-navigator",
|
|
4
4
|
"description": "Svelte-Bootstrap sidebar-cards-navigator",
|
|
5
|
-
"version": "0.20.
|
|
5
|
+
"version": "0.20.11",
|
|
6
6
|
"main": "release/release.js",
|
|
7
7
|
"publishConfig": {
|
|
8
8
|
"access": "public"
|
|
@@ -75,11 +75,11 @@
|
|
|
75
75
|
"webcomponents"
|
|
76
76
|
],
|
|
77
77
|
"contributors": [],
|
|
78
|
-
"gitHead": "
|
|
78
|
+
"gitHead": "582dece01b12de8e5b9d5cd522a7a860982586cf",
|
|
79
79
|
"dependencies": {
|
|
80
|
-
"@htmlbricks/hb-navbar": "^0.20.
|
|
81
|
-
"@htmlbricks/hb-sidenav-button": "^0.20.
|
|
82
|
-
"@htmlbricks/hb-sidenav-link": "^0.20.
|
|
80
|
+
"@htmlbricks/hb-navbar": "^0.20.11",
|
|
81
|
+
"@htmlbricks/hb-sidenav-button": "^0.20.11",
|
|
82
|
+
"@htmlbricks/hb-sidenav-link": "^0.20.11",
|
|
83
83
|
"style-to-object": "^0.3.0"
|
|
84
84
|
}
|
|
85
85
|
}
|
package/release/manifest.json
CHANGED
package/release/release.js
CHANGED
|
@@ -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}function a(t,n){t.appendChild(n)}function s(t,n,e){t.insertBefore(n,e||null)}function l(t){t.parentNode&&t.parentNode.removeChild(t)}function c(t){return document.createElement(t)}function u(t){return document.createTextNode(t)}function d(){return u(" ")}function f(){return u("")}function p(t,n,e,o){return t.addEventListener(n,e,o),()=>t.removeEventListener(n,e,o)}function h(t,n,e){null==e?t.removeAttribute(n):t.getAttribute(n)!==e&&t.setAttribute(n,e)}function g(t,n,e){n in t?t[n]="boolean"==typeof t[n]&&""===e||e:h(t,n,e)}function m(t,n,e,o){null==e?t.style.removeProperty(n):t.style.setProperty(n,e,o?"important":"")}function v(t){const n={};for(const e of t)n[e.name]=e.value;return n}let y;function b(t){y=t}function $(){if(!y)throw new Error("Function called outside component initialization");return y}function w(){const t=$();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=[];let _=[];const x=[],C=Promise.resolve();let P=!1;function I(t){_.push(t)}const N=new Set;let T=0;function L(){if(0!==T)return;const t=y;do{try{for(;T<E.length;){const t=E[T];T++,b(t),O(t.$$)}}catch(t){throw E.length=0,T=0,t}for(b(null),E.length=0,T=0;k.length;)k.pop()();for(let t=0;t<_.length;t+=1){const n=_[t];N.has(n)||(N.add(n),n())}_.length=0}while(E.length);for(;x.length;)x.pop()();P=!1,N.clear(),b(t)}function O(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(I)}}const j=new Set;function S(t,n){t&&t.i&&(j.delete(t),t.i(n))}function A(t,n){t.d(1),n.delete(t.key)}function D(t,n,e,r,i,a,s,l,c,u,d,f){let p=t.length,h=a.length,g=p;const m={};for(;g--;)m[t[g].key]=g;const v=[],y=new Map,b=new Map,$=[];for(g=h;g--;){const t=f(i,a,g),o=e(t);let l=s.get(o);l?r&&$.push((()=>l.p(t,n))):(l=u(o,t),l.c()),y.set(o,v[g]=l),o in m&&b.set(o,Math.abs(g-m[o]))}const w=new Set,E=new Set;function k(t){S(t,1),t.m(l,d),s.set(t.key,t),d=t.first,h--}for(;p&&h;){const n=v[h-1],e=t[p-1],o=n.key,r=e.key;n===e?(d=n.first,p--,h--):y.has(r)?!s.has(o)||w.has(o)?k(n):E.has(r)?p--:b.get(o)>b.get(r)?(E.add(o),k(n)):(w.add(r),p--):(c(e,s),p--)}for(;p--;){const n=t[p];y.has(n.key)||c(n,s)}for(;h;)k(v[h-1]);return o($),v}function M(t,n){const e=t.$$;null!==e.fragment&&(!function(t){const n=[],e=[];_.forEach((o=>-1===t.indexOf(o)?n.push(o):e.push(o))),e.forEach((t=>t())),_=n}(e.after_update),o(e.on_destroy),e.fragment&&e.fragment.d(n),e.on_destroy=e.fragment=null,e.ctx=[])}function R(t,n){-1===t.$$.dirty[0]&&(E.push(t),P||(P=!0,C.then(L)),t.$$.dirty.fill(0)),t.$$.dirty[n/31|0]|=1<<n%31}function z(i,a,s,c,u,d,f,p=[-1]){const h=y;b(i);const g=i.$$={fragment:null,ctx:[],props:d,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:p,skip_bound:!1,root:a.target||h.$$.root};f&&f(g.root);let m=!1;if(g.ctx=s?s(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),m&&R(i,t)),n})):[],g.update(),m=!0,o(g.before_update),g.fragment=!!c&&c(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(l)}else g.fragment&&g.fragment.c();a.intro&&S(i.$$.fragment),function(t,e,i,a){const{fragment:s,after_update:l}=t.$$;s&&s.m(e,i),a||I((()=>{const e=t.$$.on_mount.map(n).filter(r);t.$$.on_destroy?t.$$.on_destroy.push(...e):o(e),t.$$.on_mount=[]})),l.forEach(I)}(i,a.target,a.anchor,a.customElement),L()}b(h)}let F;"function"==typeof HTMLElement&&(F=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(){M(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 J="0.20.10",W=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,B=/\n/g,H=/^\s*/,V=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,q=/^:\s*/,K=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,G=/^[;\s]*/,Q=/^\s+|\s+$/g,U="";function X(t){return t?t.replace(Q,U):U}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(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),c(),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 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(H)}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;U!=t.charAt(e)&&("*"!=t.charAt(e)||"/"!=t.charAt(e+1));)++e;if(e+=2,U===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=l(V);if(n){if(d(),!l(q))return s("property missing ':'");var e=l(K),o=t({type:"declaration",property:X(n[0].replace(W,U)),value:e?X(e[0].replace(W,U)):U});return l(G),o}}return a.prototype.content=t,c(),function(){var t,n=[];for(u(n);t=f();)!1!==t&&(n.push(t),u(n));return n}()}(t),s="function"==typeof n,l=0,c=a.length;l<c;l++)r=(e=a[l]).property,i=e.value,s?n(r,i,e):i&&(o||(o={}),o[r]=i);return o};var Z,tt=(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}(Z={exports:{}},Z.exports),Z.exports),nt={vars:[],parts:[{name:"left-slot",description:""},{name:"center-slot",description:""},{name:"right-slot",description:""}]},et={vars:[{name:"--bs-primary",defaultValue:"#07689f",valueType:"color",theme:"bootstrap"}],parts:[{name:"li",description:"list element"}]};function ot(t,n,e){const o=t.slice();return o[13]=n[e],o}function rt(t,n,e){const o=t.slice();return o[16]=n[e],o}function it(t){let n,e,o,r,i,u,v,y,b=[],$=new Map,w=t[1].cards;const E=t=>t[13].id+"_c_"+t[1].id;for(let n=0;n<w.length;n+=1){let e=ot(t,w,n),o=E(e);$.set(o,b[n]=lt(o,e))}return{c(){n=c("hb-navbar"),e=c("i"),i=d();for(let t=0;t<b.length;t+=1)b[t].c();u=f(),h(e,"slot","nav-switcher"),m(e,"font-weight","bold"),m(e,"cursor",t[1].parentPanelId?"pointer":""),h(e,"class",o="bi bi-"+(t[1].parentPanelId?"arrow-left":"list")),g(n,"companybrandname",r=t[1].title)},m(o,r){s(o,n,r),a(n,e),s(o,i,r);for(let t=0;t<b.length;t+=1)b[t]&&b[t].m(o,r);s(o,u,r),v||(y=p(n,"navmenuswitch",t[6]),v=!0)},p(t,i){2&i&&m(e,"cursor",t[1].parentPanelId?"pointer":""),2&i&&o!==(o="bi bi-"+(t[1].parentPanelId?"arrow-left":"list"))&&h(e,"class",o),2&i&&r!==(r=t[1].title)&&g(n,"companybrandname",r),6&i&&(w=t[1].cards,b=D(b,i,E,1,t,w,$,u.parentNode,A,lt,u,ot))},d(t){t&&l(n),t&&l(i);for(let n=0;n<b.length;n+=1)b[n].d(t);t&&l(u),v=!1,y()}}}function at(t){let n,e=[],o=new Map,r=t[13].rows;const i=t=>t[16].key+"_r_"+t[13].id;for(let n=0;n<r.length;n+=1){let a=rt(t,r,n),s=i(a);o.set(s,e[n]=st(s,a))}return{c(){n=c("div");for(let t=0;t<e.length;t+=1)e[t].c();h(n,"class","sidebar-card-rows-container")},m(t,o){s(t,n,o);for(let t=0;t<e.length;t+=1)e[t]&&e[t].m(n,null)},p(t,a){6&a&&(r=t[13].rows,e=D(e,a,i,1,t,r,o,n,A,st,null,rt))},d(t){t&&l(n);for(let t=0;t<e.length;t+=1)e[t].d()}}}function st(t,n){let e,o,r,i,u,f;function m(...t){return n[7](n[16],n[13],...t)}return{key:t,first:null,c(){e=c("div"),o=c("hb-sidenav-button"),i=d(),g(o,"navlink",r=JSON.stringify(ut(n[16]))),h(e,"class","sidebar-card-row"),this.first=e},m(t,n){s(t,e,n),a(e,o),a(e,i),u||(f=p(o,"pageChange",m),u=!0)},p(t,e){n=t,2&e&&r!==(r=JSON.stringify(ut(n[16])))&&g(o,"navlink",r)},d(t){t&&l(e),u=!1,f()}}}function lt(t,n){let e,o,r=n[13].rows&&n[13].rows.length>0&&at(n);return{key:t,first:null,c(){e=c("div"),r&&r.c(),o=d(),h(e,"class","sidebar-card-container"),this.first=e},m(t,n){s(t,e,n),r&&r.m(e,null),a(e,o)},p(t,i){(n=t)[13].rows&&n[13].rows.length>0?r?r.p(n,i):(r=at(n),r.c(),r.m(e,o)):r&&(r.d(1),r=null)},d(t){t&&l(e),r&&r.d()}}}function ct(n){let e,o,r,i,d,p=n[1]&&it(n);return{c(){e=c("link"),o=u("\nto be done, ref "),r=c("a"),r.textContent="https://web.telegram.com",i=u(" left panel\n\n"),p&&p.c(),d=f(),this.c=t,h(e,"rel","stylesheet"),h(e,"href","https://cdn.jsdelivr.net/npm/bootstrap-icons@latest/font/bootstrap-icons.css"),h(r,"href","https://web.telegram.org/z/")},m(t,n){a(document.head,e),s(t,o,n),s(t,r,n),s(t,i,n),p&&p.m(t,n),s(t,d,n)},p(t,[n]){t[1]?p?p.p(t,n):(p=it(t),p.c(),p.m(d.parentNode,d)):p&&(p.d(1),p=null)},i:t,o:t,d(t){l(e),t&&l(o),t&&l(r),t&&l(i),p&&p.d(t),t&&l(d)}}}function ut(t){const n={text:t.text,key:t.key};return t.bootstrapIcon&&(n.bootstrapIcon=t.bootstrapIcon),t.badge&&(n.badge=t.badge),n}function dt(t,n,e){const o=$(),r=w();let i,a,{id:s}=n,{style:l}=n,{panels:c}=n;function u(t,n){const i=a.cards.find((t=>t.id===n)),l=i.rows.find((n=>n.key===t)),u=Object.assign({},a);delete u.cards;const d=Object.assign({},i);delete d.rows;!function(t,n){r(t,n),o.dispatchEvent&&o.dispatchEvent(new CustomEvent(t,{detail:n}))}("itemClick",{id:s,row:l,panel:u,card:d}),l.switchToPanelId&&c.find((t=>t.id===l.switchToPanelId))&&e(1,a=c.find((t=>t.id===l.switchToPanelId)))}tt.addComponent({repoName:"@htmlbricks/hb-navbar",version:J}),tt.addComponent({repoName:"@htmlbricks/hb-sidenav-button",version:J});return t.$$set=t=>{"id"in t&&e(3,s=t.id),"style"in t&&e(4,l=t.style),"panels"in t&&e(0,c=t.panels)},t.$$.update=()=>{if(59&t.$$.dirty){if(s||e(3,s=""),l&&(e(5,i=Y(l)),tt.getChildStyleToPass(i,null==nt?void 0:nt.vars),tt.getChildStyleToPass(i,null==et?void 0:et.vars)),"string"==typeof c)try{e(0,c=JSON.parse(c))}catch(t){console.error("error parsing panels",t)}!a&&(null==c?void 0:c.length)&&(e(1,a=c.find((t=>t.main))),a||e(1,a=c.find((t=>!t.parentPanelId))))}},[c,a,u,s,l,i,t=>{a.parentPanelId&&e(1,a=c.find((t=>t.id===a.parentPanelId)))},(t,n,e)=>{u(t.key,n.id)}]}class ft extends F{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");@import url("https://cdn.jsdelivr.net/npm/bootstrap-icons@latest/font/bootstrap-icons.css");:host{font-family:"Roboto", sans-serif}',this.shadowRoot.appendChild(n),z(this,{target:this.shadowRoot,props:v(this.attributes),customElement:!0},dt,ct,i,{id:3,style:4,panels:0},null),t&&(t.target&&s(t.target,this,t.anchor),t.props&&(this.$set(t.props),L()))}static get observedAttributes(){return["id","style","panels"]}get id(){return this.$$.ctx[3]}set id(t){this.$$set({id:t}),L()}get style(){return this.$$.ctx[4]}set style(t){this.$$set({style:t}),L()}get panels(){return this.$$.ctx[0]}set panels(t){this.$$set({panels:t}),L()}}return customElements.define("hb-sidebar-cards-navigator",ft),ft}();
|
|
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}function a(t,n){t.appendChild(n)}function s(t,n,e){t.insertBefore(n,e||null)}function l(t){t.parentNode&&t.parentNode.removeChild(t)}function c(t){return document.createElement(t)}function u(t){return document.createTextNode(t)}function d(){return u(" ")}function f(){return u("")}function p(t,n,e,o){return t.addEventListener(n,e,o),()=>t.removeEventListener(n,e,o)}function h(t,n,e){null==e?t.removeAttribute(n):t.getAttribute(n)!==e&&t.setAttribute(n,e)}function g(t,n,e){n in t?t[n]="boolean"==typeof t[n]&&""===e||e:h(t,n,e)}function m(t,n,e,o){null==e?t.style.removeProperty(n):t.style.setProperty(n,e,o?"important":"")}function v(t){const n={};for(const e of t)n[e.name]=e.value;return n}let y;function b(t){y=t}function $(){if(!y)throw new Error("Function called outside component initialization");return y}function w(){const t=$();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=[];let _=[];const x=[],C=Promise.resolve();let P=!1;function I(t){_.push(t)}const N=new Set;let T=0;function L(){if(0!==T)return;const t=y;do{try{for(;T<E.length;){const t=E[T];T++,b(t),O(t.$$)}}catch(t){throw E.length=0,T=0,t}for(b(null),E.length=0,T=0;k.length;)k.pop()();for(let t=0;t<_.length;t+=1){const n=_[t];N.has(n)||(N.add(n),n())}_.length=0}while(E.length);for(;x.length;)x.pop()();P=!1,N.clear(),b(t)}function O(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(I)}}const j=new Set;function S(t,n){t&&t.i&&(j.delete(t),t.i(n))}function A(t,n){t.d(1),n.delete(t.key)}function D(t,n,e,r,i,a,s,l,c,u,d,f){let p=t.length,h=a.length,g=p;const m={};for(;g--;)m[t[g].key]=g;const v=[],y=new Map,b=new Map,$=[];for(g=h;g--;){const t=f(i,a,g),o=e(t);let l=s.get(o);l?r&&$.push((()=>l.p(t,n))):(l=u(o,t),l.c()),y.set(o,v[g]=l),o in m&&b.set(o,Math.abs(g-m[o]))}const w=new Set,E=new Set;function k(t){S(t,1),t.m(l,d),s.set(t.key,t),d=t.first,h--}for(;p&&h;){const n=v[h-1],e=t[p-1],o=n.key,r=e.key;n===e?(d=n.first,p--,h--):y.has(r)?!s.has(o)||w.has(o)?k(n):E.has(r)?p--:b.get(o)>b.get(r)?(E.add(o),k(n)):(w.add(r),p--):(c(e,s),p--)}for(;p--;){const n=t[p];y.has(n.key)||c(n,s)}for(;h;)k(v[h-1]);return o($),v}function M(t,n){const e=t.$$;null!==e.fragment&&(!function(t){const n=[],e=[];_.forEach((o=>-1===t.indexOf(o)?n.push(o):e.push(o))),e.forEach((t=>t())),_=n}(e.after_update),o(e.on_destroy),e.fragment&&e.fragment.d(n),e.on_destroy=e.fragment=null,e.ctx=[])}function R(t,n){-1===t.$$.dirty[0]&&(E.push(t),P||(P=!0,C.then(L)),t.$$.dirty.fill(0)),t.$$.dirty[n/31|0]|=1<<n%31}function z(i,a,s,c,u,d,f,p=[-1]){const h=y;b(i);const g=i.$$={fragment:null,ctx:[],props:d,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:p,skip_bound:!1,root:a.target||h.$$.root};f&&f(g.root);let m=!1;if(g.ctx=s?s(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),m&&R(i,t)),n})):[],g.update(),m=!0,o(g.before_update),g.fragment=!!c&&c(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(l)}else g.fragment&&g.fragment.c();a.intro&&S(i.$$.fragment),function(t,e,i,a){const{fragment:s,after_update:l}=t.$$;s&&s.m(e,i),a||I((()=>{const e=t.$$.on_mount.map(n).filter(r);t.$$.on_destroy?t.$$.on_destroy.push(...e):o(e),t.$$.on_mount=[]})),l.forEach(I)}(i,a.target,a.anchor,a.customElement),L()}b(h)}let F;"function"==typeof HTMLElement&&(F=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(){M(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 J="0.20.11",W=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,B=/\n/g,H=/^\s*/,V=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,q=/^:\s*/,K=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,G=/^[;\s]*/,Q=/^\s+|\s+$/g,U="";function X(t){return t?t.replace(Q,U):U}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(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),c(),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 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(H)}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;U!=t.charAt(e)&&("*"!=t.charAt(e)||"/"!=t.charAt(e+1));)++e;if(e+=2,U===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=l(V);if(n){if(d(),!l(q))return s("property missing ':'");var e=l(K),o=t({type:"declaration",property:X(n[0].replace(W,U)),value:e?X(e[0].replace(W,U)):U});return l(G),o}}return a.prototype.content=t,c(),function(){var t,n=[];for(u(n);t=f();)!1!==t&&(n.push(t),u(n));return n}()}(t),s="function"==typeof n,l=0,c=a.length;l<c;l++)r=(e=a[l]).property,i=e.value,s?n(r,i,e):i&&(o||(o={}),o[r]=i);return o};var Z,tt=(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}(Z={exports:{}},Z.exports),Z.exports),nt={vars:[],parts:[{name:"left-slot",description:""},{name:"center-slot",description:""},{name:"right-slot",description:""}]},et={vars:[{name:"--bs-primary",defaultValue:"#07689f",valueType:"color",theme:"bootstrap"}],parts:[{name:"li",description:"list element"}]};function ot(t,n,e){const o=t.slice();return o[13]=n[e],o}function rt(t,n,e){const o=t.slice();return o[16]=n[e],o}function it(t){let n,e,o,r,i,u,v,y,b=[],$=new Map,w=t[1].cards;const E=t=>t[13].id+"_c_"+t[1].id;for(let n=0;n<w.length;n+=1){let e=ot(t,w,n),o=E(e);$.set(o,b[n]=lt(o,e))}return{c(){n=c("hb-navbar"),e=c("i"),i=d();for(let t=0;t<b.length;t+=1)b[t].c();u=f(),h(e,"slot","nav-switcher"),m(e,"font-weight","bold"),m(e,"cursor",t[1].parentPanelId?"pointer":""),h(e,"class",o="bi bi-"+(t[1].parentPanelId?"arrow-left":"list")),g(n,"companybrandname",r=t[1].title)},m(o,r){s(o,n,r),a(n,e),s(o,i,r);for(let t=0;t<b.length;t+=1)b[t]&&b[t].m(o,r);s(o,u,r),v||(y=p(n,"navmenuswitch",t[6]),v=!0)},p(t,i){2&i&&m(e,"cursor",t[1].parentPanelId?"pointer":""),2&i&&o!==(o="bi bi-"+(t[1].parentPanelId?"arrow-left":"list"))&&h(e,"class",o),2&i&&r!==(r=t[1].title)&&g(n,"companybrandname",r),6&i&&(w=t[1].cards,b=D(b,i,E,1,t,w,$,u.parentNode,A,lt,u,ot))},d(t){t&&l(n),t&&l(i);for(let n=0;n<b.length;n+=1)b[n].d(t);t&&l(u),v=!1,y()}}}function at(t){let n,e=[],o=new Map,r=t[13].rows;const i=t=>t[16].key+"_r_"+t[13].id;for(let n=0;n<r.length;n+=1){let a=rt(t,r,n),s=i(a);o.set(s,e[n]=st(s,a))}return{c(){n=c("div");for(let t=0;t<e.length;t+=1)e[t].c();h(n,"class","sidebar-card-rows-container")},m(t,o){s(t,n,o);for(let t=0;t<e.length;t+=1)e[t]&&e[t].m(n,null)},p(t,a){6&a&&(r=t[13].rows,e=D(e,a,i,1,t,r,o,n,A,st,null,rt))},d(t){t&&l(n);for(let t=0;t<e.length;t+=1)e[t].d()}}}function st(t,n){let e,o,r,i,u,f;function m(...t){return n[7](n[16],n[13],...t)}return{key:t,first:null,c(){e=c("div"),o=c("hb-sidenav-button"),i=d(),g(o,"navlink",r=JSON.stringify(ut(n[16]))),h(e,"class","sidebar-card-row"),this.first=e},m(t,n){s(t,e,n),a(e,o),a(e,i),u||(f=p(o,"pageChange",m),u=!0)},p(t,e){n=t,2&e&&r!==(r=JSON.stringify(ut(n[16])))&&g(o,"navlink",r)},d(t){t&&l(e),u=!1,f()}}}function lt(t,n){let e,o,r=n[13].rows&&n[13].rows.length>0&&at(n);return{key:t,first:null,c(){e=c("div"),r&&r.c(),o=d(),h(e,"class","sidebar-card-container"),this.first=e},m(t,n){s(t,e,n),r&&r.m(e,null),a(e,o)},p(t,i){(n=t)[13].rows&&n[13].rows.length>0?r?r.p(n,i):(r=at(n),r.c(),r.m(e,o)):r&&(r.d(1),r=null)},d(t){t&&l(e),r&&r.d()}}}function ct(n){let e,o,r,i,d,p=n[1]&&it(n);return{c(){e=c("link"),o=u("\nto be done, ref "),r=c("a"),r.textContent="https://web.telegram.com",i=u(" left panel\n\n"),p&&p.c(),d=f(),this.c=t,h(e,"rel","stylesheet"),h(e,"href","https://cdn.jsdelivr.net/npm/bootstrap-icons@latest/font/bootstrap-icons.css"),h(r,"href","https://web.telegram.org/z/")},m(t,n){a(document.head,e),s(t,o,n),s(t,r,n),s(t,i,n),p&&p.m(t,n),s(t,d,n)},p(t,[n]){t[1]?p?p.p(t,n):(p=it(t),p.c(),p.m(d.parentNode,d)):p&&(p.d(1),p=null)},i:t,o:t,d(t){l(e),t&&l(o),t&&l(r),t&&l(i),p&&p.d(t),t&&l(d)}}}function ut(t){const n={text:t.text,key:t.key};return t.bootstrapIcon&&(n.bootstrapIcon=t.bootstrapIcon),t.badge&&(n.badge=t.badge),n}function dt(t,n,e){const o=$(),r=w();let i,a,{id:s}=n,{style:l}=n,{panels:c}=n;function u(t,n){const i=a.cards.find((t=>t.id===n)),l=i.rows.find((n=>n.key===t)),u=Object.assign({},a);delete u.cards;const d=Object.assign({},i);delete d.rows;!function(t,n){r(t,n),o.dispatchEvent&&o.dispatchEvent(new CustomEvent(t,{detail:n}))}("itemClick",{id:s,row:l,panel:u,card:d}),l.switchToPanelId&&c.find((t=>t.id===l.switchToPanelId))&&e(1,a=c.find((t=>t.id===l.switchToPanelId)))}tt.addComponent({repoName:"@htmlbricks/hb-navbar",version:J}),tt.addComponent({repoName:"@htmlbricks/hb-sidenav-button",version:J});return t.$$set=t=>{"id"in t&&e(3,s=t.id),"style"in t&&e(4,l=t.style),"panels"in t&&e(0,c=t.panels)},t.$$.update=()=>{if(59&t.$$.dirty){if(s||e(3,s=""),l&&(e(5,i=Y(l)),tt.getChildStyleToPass(i,null==nt?void 0:nt.vars),tt.getChildStyleToPass(i,null==et?void 0:et.vars)),"string"==typeof c)try{e(0,c=JSON.parse(c))}catch(t){console.error("error parsing panels",t)}!a&&(null==c?void 0:c.length)&&(e(1,a=c.find((t=>t.main))),a||e(1,a=c.find((t=>!t.parentPanelId))))}},[c,a,u,s,l,i,t=>{a.parentPanelId&&e(1,a=c.find((t=>t.id===a.parentPanelId)))},(t,n,e)=>{u(t.key,n.id)}]}class ft extends F{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");@import url("https://cdn.jsdelivr.net/npm/bootstrap-icons@latest/font/bootstrap-icons.css");:host{font-family:"Roboto", sans-serif}',this.shadowRoot.appendChild(n),z(this,{target:this.shadowRoot,props:v(this.attributes),customElement:!0},dt,ct,i,{id:3,style:4,panels:0},null),t&&(t.target&&s(t.target,this,t.anchor),t.props&&(this.$set(t.props),L()))}static get observedAttributes(){return["id","style","panels"]}get id(){return this.$$.ctx[3]}set id(t){this.$$set({id:t}),L()}get style(){return this.$$.ctx[4]}set style(t){this.$$set({style:t}),L()}get panels(){return this.$$.ctx[0]}set panels(t){this.$$set({panels:t}),L()}}return customElements.define("hb-sidebar-cards-navigator",ft),ft}();
|
|
2
2
|
//# sourceMappingURL=release.js.map
|