@feedlog-ai/webcomponents 0.0.23 → 0.0.25
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/dist/cjs/feedlog-badge.cjs.entry.js +1 -1
- package/dist/cjs/feedlog-button_3.cjs.entry.js +1 -1
- package/dist/cjs/feedlog-card.cjs.entry.js +1 -1
- package/dist/cjs/feedlog-issues-client.cjs.entry.js +9 -2
- package/dist/cjs/feedlog-issues.cjs.entry.js +2 -2
- package/dist/cjs/feedlog-toolkit.cjs.js +1 -1
- package/dist/cjs/{index-DnsqTPII.js → index-SWDeFUqw.js} +1 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/components/feedlog-issues/feedlog-issues.css +5 -4
- package/dist/collection/components/feedlog-issues/feedlog-issues.stories.js +23 -0
- package/dist/collection/components/feedlog-issues-client/feedlog-issues-client.js +8 -1
- package/dist/components/feedlog-issues-client.js +1 -1
- package/dist/components/feedlog-issues.js +1 -1
- package/dist/components/p-DKGIKLzX.js +1 -0
- package/dist/esm/feedlog-badge.entry.js +1 -1
- package/dist/esm/feedlog-button_3.entry.js +1 -1
- package/dist/esm/feedlog-card.entry.js +1 -1
- package/dist/esm/feedlog-issues-client.entry.js +9 -2
- package/dist/esm/feedlog-issues.entry.js +2 -2
- package/dist/esm/feedlog-toolkit.js +2 -2
- package/dist/esm/{index-rs_66Oq4.js → index-B0OkcXfW.js} +1 -1
- package/dist/esm/loader.js +2 -2
- package/dist/feedlog-toolkit/feedlog-toolkit.esm.js +1 -1
- package/dist/feedlog-toolkit/{p-f8e5e975.entry.js → p-0733934f.entry.js} +2 -2
- package/dist/feedlog-toolkit/p-191fc966.entry.js +1 -0
- package/dist/feedlog-toolkit/{p-4e90285c.entry.js → p-1e3dd1c6.entry.js} +1 -1
- package/dist/feedlog-toolkit/p-25d89169.entry.js +1 -0
- package/dist/feedlog-toolkit/{p-da51c7fd.entry.js → p-6576aefa.entry.js} +1 -1
- package/dist/feedlog-toolkit/{p-rs_66Oq4.js → p-B0OkcXfW.js} +2 -2
- package/dist/types/components/feedlog-issues/feedlog-issues.stories.d.ts +1 -0
- package/dist/types/components/feedlog-issues-client/feedlog-issues-client.d.ts +1 -0
- package/package.json +2 -2
- package/dist/components/p-DJOCetIC.js +0 -1
- package/dist/feedlog-toolkit/p-4acededf.entry.js +0 -1
- package/dist/feedlog-toolkit/p-6737a3f4.entry.js +0 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const t=()=>{},e=":root{--feedlog-font-size:16px;--feedlog-background:#ffffff;--feedlog-foreground:oklch(0.145 0 0);--feedlog-card:#ffffff;--feedlog-card-foreground:oklch(0.145 0 0);--feedlog-popover:oklch(1 0 0);--feedlog-popover-foreground:oklch(0.145 0 0);--feedlog-primary:#030213;--feedlog-primary-foreground:oklch(1 0 0);--feedlog-secondary:oklch(0.95 0.0058 264.53);--feedlog-secondary-foreground:#030213;--feedlog-muted:#ececf0;--feedlog-muted-foreground:#717182;--feedlog-accent:#e9ebef;--feedlog-accent-foreground:#030213;--feedlog-destructive:#d4183d;--feedlog-destructive-foreground:#ffffff;--feedlog-border:rgba(0, 0, 0, 0.1);--feedlog-input:transparent;--feedlog-input-background:#f3f3f5;--feedlog-switch-background:#cbced4;--feedlog-ring:oklch(0.708 0 0);--feedlog-radius:0.625rem;--feedlog-blue-100:oklch(0.932 0.032 255.585);--feedlog-blue-400:oklch(0.707 0.165 254.624);--feedlog-blue-500:oklch(0.623 0.214 259.815);--feedlog-blue-600:oklch(0.546 0.245 262.881);--feedlog-blue-700:oklch(0.488 0.243 264.376);--feedlog-blue-900:oklch(0.379 0.146 265.522);--feedlog-font-family:ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, 'Liberation Mono', monospace}.dark{--feedlog-background:oklch(0.145 0 0);--feedlog-foreground:oklch(0.985 0 0);--feedlog-card:oklch(0.145 0 0);--feedlog-card-foreground:oklch(0.985 0 0);--feedlog-popover:oklch(0.145 0 0);--feedlog-popover-foreground:oklch(0.985 0 0);--feedlog-primary:oklch(0.985 0 0);--feedlog-primary-foreground:oklch(0.205 0 0);--feedlog-secondary:oklch(0.269 0 0);--feedlog-secondary-foreground:oklch(0.985 0 0);--feedlog-muted:oklch(0.269 0 0);--feedlog-muted-foreground:oklch(0.708 0 0);--feedlog-accent:oklch(0.269 0 0);--feedlog-accent-foreground:oklch(0.985 0 0);--feedlog-destructive:oklch(0.396 0.141 25.723);--feedlog-destructive-foreground:oklch(0.637 0.237 25.331);--feedlog-border:oklch(0.269 0 0);--feedlog-input:oklch(0.269 0 0);--feedlog-ring:oklch(0.439 0 0)}";var n,i,s,o,r,l,c,f,h,u,a,d,p,g,v,m,b,w=Object.create,y=Object.defineProperty,$=Object.getOwnPropertyDescriptor,k=Object.getOwnPropertyNames,S=Object.getPrototypeOf,O=Object.prototype.hasOwnProperty,j=t=>{throw TypeError(t)},M=(t,e)=>function(){return e||(0,t[k(t)[0]])((e={exports:{}}).exports,e),e.exports},E=(t,e,n)=>e.has(t)||j("Cannot "+n),x=(t,e,n)=>(E(t,e,"read from private field"),n?n.call(t):e.get(t)),P=(t,e,n)=>e.has(t)?j("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,n),C=(t,e,n)=>(E(t,e,"write to private field"),e.set(t,n),n),R=(t,e,n)=>(E(t,e,"access private method"),n),W=M({"node_modules/balanced-match/index.js"(t,e){function n(t,e,n){t instanceof RegExp&&(t=i(t,n)),e instanceof RegExp&&(e=i(e,n));var o=s(t,e,n);return o&&{start:o[0],end:o[1],pre:n.slice(0,o[0]),body:n.slice(o[0]+t.length,o[1]),post:n.slice(o[1]+e.length)}}function i(t,e){var n=e.match(t);return n?n[0]:null}function s(t,e,n){var i,s,o,r,l,c=n.indexOf(t),f=n.indexOf(e,c+1),h=c;if(c>=0&&f>0){if(t===e)return[c,f];for(i=[],o=n.length;h>=0&&!l;)h==c?(i.push(h),c=n.indexOf(t,h+1)):1==i.length?l=[i.pop(),f]:((s=i.pop())<o&&(o=s,r=f),f=n.indexOf(e,h+1)),h=c<f&&c>=0?c:f;i.length&&(l=[o,r])}return l}e.exports=n,n.range=s}}),N=M({"node_modules/brace-expansion/index.js"(t,e){var n=W();e.exports=function(t){return t?("{}"===t.substr(0,2)&&(t="\\{\\}"+t.substr(2)),g(function(t){return t.split("\\\\").join(i).split("\\{").join(s).split("\\}").join(o).split("\\,").join(r).split("\\.").join(l)}(t),!0).map(f)):[]};var i="\0SLASH"+Math.random()+"\0",s="\0OPEN"+Math.random()+"\0",o="\0CLOSE"+Math.random()+"\0",r="\0COMMA"+Math.random()+"\0",l="\0PERIOD"+Math.random()+"\0";function c(t){return parseInt(t,10)==t?parseInt(t,10):t.charCodeAt(0)}function f(t){return t.split(i).join("\\").split(s).join("{").split(o).join("}").split(r).join(",").split(l).join(".")}function h(t){if(!t)return[""];var e=[],i=n("{","}",t);if(!i)return t.split(",");var s=i.body,o=i.post,r=i.pre.split(",");r[r.length-1]+="{"+s+"}";var l=h(o);return o.length&&(r[r.length-1]+=l.shift(),r.push.apply(r,l)),e.push.apply(e,r),e}function u(t){return"{"+t+"}"}function a(t){return/^-?0\d/.test(t)}function d(t,e){return t<=e}function p(t,e){return t>=e}function g(t,e){var i=[],s=n("{","}",t);if(!s)return[t];var r=s.pre,l=s.post.length?g(s.post,!1):[""];if(/\$$/.test(s.pre))for(var f=0;f<l.length;f++)i.push(N=r+"{"+s.body+"}"+l[f]);else{var v,m,b=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(s.body),w=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(s.body),y=b||w,$=s.body.indexOf(",")>=0;if(!y&&!$)return s.post.match(/,(?!,).*\}/)?g(t=s.pre+"{"+s.body+o+s.post):[t];if(y)v=s.body.split(/\.\./);else if(1===(v=h(s.body)).length&&1===(v=g(v[0],!1).map(u)).length)return l.map((function(t){return s.pre+v[0]+t}));if(y){var k=c(v[0]),S=c(v[1]),O=Math.max(v[0].length,v[1].length),j=3==v.length?Math.abs(c(v[2])):1,M=d;S<k&&(j*=-1,M=p);var E=v.some(a);m=[];for(var x=k;M(x,S);x+=j){var P;if(w)"\\"===(P=String.fromCharCode(x))&&(P="");else if(P=x+"",E){var C=O-P.length;if(C>0){var R=Array(C+1).join("0");P=x<0?"-"+R+P.slice(1):R+P}}m.push(P)}}else{m=[];for(var W=0;W<v.length;W++)m.push.apply(m,g(v[W],!1))}for(W=0;W<m.length;W++)for(f=0;f<l.length;f++){var N=r+m[W]+l[f];(!e||y||N)&&i.push(N)}}return i}}}),z=(t,e)=>{var n;Object.entries(null!=(n=e.i.t)?n:{}).map((([n,[i]])=>{if(31&i||32&i){const i=t[n],s=function(t,e){for(;t;){const n=Object.getOwnPropertyDescriptor(t,e);if(null==n?void 0:n.get)return n;t=Object.getPrototypeOf(t)}}(Object.getPrototypeOf(t),n)||Object.getOwnPropertyDescriptor(t,n);s&&Object.defineProperty(t,n,{get(){return s.get.call(this)},set(t){s.set.call(this,t)},configurable:!0,enumerable:!0}),t[n]=e.o.has(n)?e.o.get(n):i}}))},A=t=>{if(t.__stencil__getHostRef)return t.__stencil__getHostRef()},L=(t,e)=>{e&&(t.__stencil__getHostRef=()=>e,e.l=t,512&e.i.h&&z(t,e))},T=(t,e)=>e in t,D=(t,e)=>(0,console.error)(t,e),F=new Map,G=new Map,U="slot-fb{display:contents}slot-fb[hidden]{display:none}",H="undefined"!=typeof window?window:{},I={h:0,u:"",jmp:t=>t(),raf:t=>requestAnimationFrame(t),ael:(t,e,n,i)=>t.addEventListener(e,n,i),rel:(t,e,n,i)=>t.removeEventListener(e,n,i),ce:(t,e)=>new CustomEvent(t,e)},Z=t=>Promise.resolve(t),_=(()=>{try{return!!H.document.adoptedStyleSheets&&(new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync)}catch(t){}return!1})(),V=!!_&&(()=>!!H.document&&Object.getOwnPropertyDescriptor(H.document.adoptedStyleSheets,"length").writable)(),q=!1,B=[],J=[],Y=(t,e)=>n=>{t.push(n),q||(q=!0,e&&4&I.h?X(Q):I.raf(Q))},K=t=>{for(let e=0;e<t.length;e++)try{t[e](performance.now())}catch(t){D(t)}t.length=0},Q=()=>{K(B),K(J),(q=B.length>0)&&I.raf(Q)},X=t=>Z().then(t),tt=Y(J,!0),et=t=>"object"==(t=typeof t)||"function"===t,nt=((t,e,n)=>(n=null!=t?w(S(t)):{},((t,e,n,i)=>{if(e&&"object"==typeof e||"function"==typeof e)for(let n of k(e))O.call(t,n)||undefined===n||y(t,n,{get:()=>e[n],enumerable:!(i=$(e,n))||i.enumerable});return t})(y(n,"default",{value:t,enumerable:!0}),t)))(N()),it=t=>{if("string"!=typeof t)throw new TypeError("invalid pattern");if(t.length>65536)throw new TypeError("pattern is too long")},st={"[:alnum:]":["\\p{L}\\p{Nl}\\p{Nd}",!0],"[:alpha:]":["\\p{L}\\p{Nl}",!0],"[:ascii:]":["\\x00-\\x7f",!1],"[:blank:]":["\\p{Zs}\\t",!0],"[:cntrl:]":["\\p{Cc}",!0],"[:digit:]":["\\p{Nd}",!0],"[:graph:]":["\\p{Z}\\p{C}",!0,!0],"[:lower:]":["\\p{Ll}",!0],"[:print:]":["\\p{C}",!0],"[:punct:]":["\\p{P}",!0],"[:space:]":["\\p{Z}\\t\\r\\n\\v\\f",!0],"[:upper:]":["\\p{Lu}",!0],"[:word:]":["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}",!0],"[:xdigit:]":["A-Fa-f0-9",!1]},ot=t=>t.replace(/[[\]\\-]/g,"\\$&"),rt=t=>t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),lt=t=>t.join(""),ct=(t,e)=>{const n=e;if("["!==t.charAt(n))throw Error("not in a brace expression");const i=[],s=[];let o=n+1,r=!1,l=!1,c=!1,f=!1,h=n,u="";t:for(;o<t.length;){const e=t.charAt(o);if("!"!==e&&"^"!==e||o!==n+1){if("]"===e&&r&&!c){h=o+1;break}if(r=!0,"\\"!==e||c){if("["===e&&!c)for(const[e,[r,c,f]]of Object.entries(st))if(t.startsWith(e,o)){if(u)return["$.",!1,t.length-n,!0];o+=e.length,f?s.push(r):i.push(r),l=l||c;continue t}c=!1,u?(e>u?i.push(ot(u)+"-"+ot(e)):e===u&&i.push(ot(e)),u="",o++):t.startsWith("-]",o+1)?(i.push(ot(e+"-")),o+=2):t.startsWith("-",o+1)?(u=e,o+=2):(i.push(ot(e)),o++)}else c=!0,o++}else f=!0,o++}if(h<o)return["",!1,0,!1];if(!i.length&&!s.length)return["$.",!1,t.length-n,!0];if(0===s.length&&1===i.length&&/^\\?.$/.test(i[0])&&!f){const t=2===i[0].length?i[0].slice(-1):i[0];return[rt(t),!1,h-n,!1]}const a="["+(f?"^":"")+lt(i)+"]",d="["+(f?"":"^")+lt(s)+"]";return[i.length&&s.length?"("+a+"|"+d+")":i.length?a:d,l,h-n,!0]},ft=(t,{windowsPathsNoEscape:e=!1}={})=>e?t.replace(/\[([^\/\\])\]/g,"$1"):t.replace(/((?!\\).|^)\[([^\/\\])\]/g,"$1$2").replace(/\\([^\/])/g,"$1"),ht=new Set(["!","?","+","*","@"]),ut=t=>ht.has(t),at="(?!\\.)",dt=new Set(["[","."]),pt=new Set(["..","."]),gt=new Set("().*{}+?[]^$\\!"),vt=t=>t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),mt="[^/]",bt=mt+"*?",wt=mt+"+?",yt=class t{constructor(t,e,p={}){P(this,d),((t,e,n)=>{((t,e,n)=>{e in t?y(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n})(t,e+"",n)})(this,"type"),P(this,n),P(this,i),P(this,s,!1),P(this,o,[]),P(this,r),P(this,l),P(this,c),P(this,f,!1),P(this,h),P(this,u),P(this,a,!1),this.type=t,t&&C(this,i,!0),C(this,r,e),C(this,n,x(this,r)?x(x(this,r),n):this),C(this,h,x(this,n)===this?p:x(x(this,n),h)),C(this,c,x(this,n)===this?[]:x(x(this,n),c)),"!"!==t||x(x(this,n),f)||x(this,c).push(this),C(this,l,x(this,r)?x(x(this,r),o).length:0)}get hasMagic(){if(void 0!==x(this,i))return x(this,i);for(const t of x(this,o))if("string"!=typeof t&&(t.type||t.hasMagic))return C(this,i,!0);return x(this,i)}toString(){return void 0!==x(this,u)?x(this,u):C(this,u,this.type?this.type+"("+x(this,o).map((t=>t+"")).join("|")+")":x(this,o).map((t=>t+"")).join(""))}push(...e){for(const n of e)if(""!==n){if("string"!=typeof n&&!(n instanceof t&&x(n,r)===this))throw Error("invalid part: "+n);x(this,o).push(n)}}toJSON(){var t;const e=null===this.type?x(this,o).slice().map((t=>"string"==typeof t?t:t.toJSON())):[this.type,...x(this,o).map((t=>t.toJSON()))];return this.isStart()&&!this.type&&e.unshift([]),this.isEnd()&&(this===x(this,n)||x(x(this,n),f)&&"!"===(null==(t=x(this,r))?void 0:t.type))&&e.push({}),e}isStart(){var e;if(x(this,n)===this)return!0;if(!(null==(e=x(this,r))?void 0:e.isStart()))return!1;if(0===x(this,l))return!0;const i=x(this,r);for(let e=0;e<x(this,l);e++){const n=x(i,o)[e];if(!(n instanceof t&&"!"===n.type))return!1}return!0}isEnd(){var t,e,i;if(x(this,n)===this)return!0;if("!"===(null==(t=x(this,r))?void 0:t.type))return!0;if(!(null==(e=x(this,r))?void 0:e.isEnd()))return!1;if(!this.type)return null==(i=x(this,r))?void 0:i.isEnd();const s=x(this,r)?x(x(this,r),o).length:0;return x(this,l)===s-1}copyIn(t){this.push("string"==typeof t?t:t.clone(this))}clone(e){const n=new t(this.type,e);for(const t of x(this,o))n.copyIn(t);return n}static fromGlob(e,n={}){var i;const s=new t(null,void 0,n);return R(i=t,g,v).call(i,e,s,0,n),s}toMMPattern(){if(this!==x(this,n))return x(this,n).toMMPattern();const t=""+this,[e,s,o,r]=this.toRegExpSource();if(!(o||x(this,i)||x(this,h).nocase&&!x(this,h).nocaseMagicOnly&&t.toUpperCase()!==t.toLowerCase()))return s;const l=(x(this,h).nocase?"i":"")+(r?"u":"");return Object.assign(RegExp(`^${e}$`,l),{_src:e,_glob:t})}get options(){return x(this,h)}toRegExpSource(e){var l;const c=null!=e?e:!!x(this,h).dot;if(x(this,n)===this&&R(this,d,p).call(this),!this.type){const h=this.isStart()&&this.isEnd(),u=x(this,o).map((n=>{var o;const[r,l,c,f]="string"==typeof n?R(o=t,g,b).call(o,n,x(this,i),h):n.toRegExpSource(e);return C(this,i,x(this,i)||c),C(this,s,x(this,s)||f),r})).join("");let a="";if(this.isStart()&&"string"==typeof x(this,o)[0]&&(1!==x(this,o).length||!pt.has(x(this,o)[0]))){const t=dt,n=c&&t.has(u.charAt(0))||u.startsWith("\\.")&&t.has(u.charAt(2))||u.startsWith("\\.\\.")&&t.has(u.charAt(4)),i=!c&&!e&&t.has(u.charAt(0));a=n?"(?!(?:^|/)\\.\\.?(?:$|/))":i?at:""}let d="";return this.isEnd()&&x(x(this,n),f)&&"!"===(null==(l=x(this,r))?void 0:l.type)&&(d="(?:$|\\/)"),[a+u+d,ft(u),C(this,i,!!x(this,i)),x(this,s)]}const u="*"===this.type||"+"===this.type,v="!"===this.type?"(?:(?!(?:":"(?:";let w=R(this,d,m).call(this,c);if(this.isStart()&&this.isEnd()&&!w&&"!"!==this.type){const t=""+this;return C(this,o,[t]),this.type=null,C(this,i,void 0),[t,ft(""+this),!1,!1]}let y=!u||e||c?"":R(this,d,m).call(this,!0);y===w&&(y=""),y&&(w=`(?:${w})(?:${y})*?`);let $="";return $="!"===this.type&&x(this,a)?(this.isStart()&&!c?at:"")+wt:v+w+("!"===this.type?"))"+(!this.isStart()||c||e?"":at)+bt+")":"@"===this.type?")":"?"===this.type?")?":"+"===this.type&&y?")":"*"===this.type&&y?")?":")"+this.type),[$,ft(w),C(this,i,!!x(this,i)),x(this,s)]}};n=new WeakMap,i=new WeakMap,s=new WeakMap,o=new WeakMap,r=new WeakMap,l=new WeakMap,c=new WeakMap,f=new WeakMap,h=new WeakMap,u=new WeakMap,a=new WeakMap,d=new WeakSet,p=function(){if(this!==x(this,n))throw Error("should only call on root");if(x(this,f))return this;let t;for(C(this,f,!0);t=x(this,c).pop();){if("!"!==t.type)continue;let e=t,n=x(e,r);for(;n;){for(let i=x(e,l)+1;!n.type&&i<x(n,o).length;i++)for(const e of x(t,o)){if("string"==typeof e)throw Error("string part in extglob AST??");e.copyIn(x(n,o)[i])}e=n,n=x(e,r)}}return this},g=new WeakSet,v=function(t,e,n,s){var r,l;let c=!1,f=!1,h=-1,u=!1;if(null===e.type){let i=n,o="";for(;i<t.length;){const n=t.charAt(i++);if(c||"\\"===n)c=!c,o+=n;else if(f)i===h+1?"^"!==n&&"!"!==n||(u=!0):"]"!==n||i===h+2&&u||(f=!1),o+=n;else if("["!==n)if(s.noext||!ut(n)||"("!==t.charAt(i))o+=n;else{e.push(o),o="";const l=new yt(n,e);i=R(r=yt,g,v).call(r,t,l,i,s),e.push(l)}else f=!0,h=i,u=!1,o+=n}return e.push(o),i}let d=n+1,p=new yt(null,e);const m=[];let b="";for(;d<t.length;){const n=t.charAt(d++);if(c||"\\"===n)c=!c,b+=n;else if(f)d===h+1?"^"!==n&&"!"!==n||(u=!0):"]"!==n||d===h+2&&u||(f=!1),b+=n;else if("["!==n)if(ut(n)&&"("===t.charAt(d)){p.push(b),b="";const e=new yt(n,p);p.push(e),d=R(l=yt,g,v).call(l,t,e,d,s)}else if("|"!==n){if(")"===n)return""===b&&0===x(e,o).length&&C(e,a,!0),p.push(b),b="",e.push(...m,p),d;b+=n}else p.push(b),b="",m.push(p),p=new yt(null,e);else f=!0,h=d,u=!1,b+=n}return e.type=null,C(e,i,void 0),C(e,o,[t.substring(n-1)]),d},m=function(t){return x(this,o).map((e=>{if("string"==typeof e)throw Error("string type in extglob ast??");const[n,i,o,r]=e.toRegExpSource(t);return C(this,s,x(this,s)||r),n})).filter((t=>!(this.isStart()&&this.isEnd()&&!t))).join("|")},b=function(t,e,n=!1){let i=!1,s="",o=!1;for(let r=0;r<t.length;r++){const l=t.charAt(r);if(i)i=!1,s+=(gt.has(l)?"\\":"")+l;else if("\\"!==l){if("["===l){const[n,i,l,c]=ct(t,r);if(l){s+=n,o=o||i,r+=l-1,e=e||c;continue}}"*"!==l?"?"!==l?s+=vt(l):(s+=mt,e=!0):(s+=n&&"*"===t?wt:bt,e=!0)}else r===t.length-1?s+="\\\\":i=!0}return[s,ft(t),!!e,o]},P(yt,g);var $t=yt,kt=(t,e,n={})=>(it(e),!(!n.nocomment&&"#"===e.charAt(0))&&new Bt(e,n).match(t)),St=/^\*+([^+@!?\*\[\(]*)$/,Ot=t=>e=>!e.startsWith(".")&&e.endsWith(t),jt=t=>e=>e.endsWith(t),Mt=t=>(t=t.toLowerCase(),e=>!e.startsWith(".")&&e.toLowerCase().endsWith(t)),Et=t=>(t=t.toLowerCase(),e=>e.toLowerCase().endsWith(t)),xt=/^\*+\.\*+$/,Pt=t=>!t.startsWith(".")&&t.includes("."),Ct=t=>"."!==t&&".."!==t&&t.includes("."),Rt=/^\.\*+$/,Wt=t=>"."!==t&&".."!==t&&t.startsWith("."),Nt=/^\*+$/,zt=t=>0!==t.length&&!t.startsWith("."),At=t=>0!==t.length&&"."!==t&&".."!==t,Lt=/^\?+([^+@!?\*\[\(]*)?$/,Tt=([t,e=""])=>{const n=Ut([t]);return e?(e=e.toLowerCase(),t=>n(t)&&t.toLowerCase().endsWith(e)):n},Dt=([t,e=""])=>{const n=Ht([t]);return e?(e=e.toLowerCase(),t=>n(t)&&t.toLowerCase().endsWith(e)):n},Ft=([t,e=""])=>{const n=Ht([t]);return e?t=>n(t)&&t.endsWith(e):n},Gt=([t,e=""])=>{const n=Ut([t]);return e?t=>n(t)&&t.endsWith(e):n},Ut=([t])=>{const e=t.length;return t=>t.length===e&&!t.startsWith(".")},Ht=([t])=>{const e=t.length;return t=>t.length===e&&"."!==t&&".."!==t},It="object"==typeof process&&process?"object"==typeof process.env&&process.env&&process.env.__MINIMATCH_TESTING_PLATFORM__||process.platform:"posix";kt.sep="win32"===It?"\\":"/";var Zt=Symbol("globstar **");kt.GLOBSTAR=Zt,kt.filter=(t,e={})=>n=>kt(n,t,e);var _t=(t,e={})=>Object.assign({},t,e);kt.defaults=t=>{if(!t||"object"!=typeof t||!Object.keys(t).length)return kt;const e=kt;return Object.assign(((n,i,s={})=>e(n,i,_t(t,s))),{Minimatch:class extends e.Minimatch{constructor(e,n={}){super(e,_t(t,n))}static defaults(n){return e.defaults(_t(t,n)).Minimatch}},AST:class extends e.AST{constructor(e,n,i={}){super(e,n,_t(t,i))}static fromGlob(n,i={}){return e.AST.fromGlob(n,_t(t,i))}},unescape:(n,i={})=>e.unescape(n,_t(t,i)),escape:(n,i={})=>e.escape(n,_t(t,i)),filter:(n,i={})=>e.filter(n,_t(t,i)),defaults:n=>e.defaults(_t(t,n)),makeRe:(n,i={})=>e.makeRe(n,_t(t,i)),braceExpand:(n,i={})=>e.braceExpand(n,_t(t,i)),match:(n,i,s={})=>e.match(n,i,_t(t,s)),sep:e.sep,GLOBSTAR:Zt})};var Vt=(t,e={})=>(it(t),e.nobrace||!/\{(?:(?!\{).)*\}/.test(t)?[t]:(0,nt.default)(t));kt.braceExpand=Vt,kt.makeRe=(t,e={})=>new Bt(t,e).makeRe(),kt.match=(t,e,n={})=>{const i=new Bt(e,n);return t=t.filter((t=>i.match(t))),i.options.nonull&&!t.length&&t.push(e),t};var qt=/[?*]|[+@!]\(.*?\)|\[|\]/,Bt=class{options;set;pattern;windowsPathsNoEscape;nonegate;negate;comment;empty;preserveMultipleSlashes;partial;globSet;globParts;nocase;isWindows;platform;windowsNoMagicRoot;regexp;constructor(t,e={}){it(t),this.options=e=e||{},this.pattern=t,this.platform=e.platform||It,this.isWindows="win32"===this.platform,this.windowsPathsNoEscape=!!e.windowsPathsNoEscape||!1===e.allowWindowsEscape,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,"/")),this.preserveMultipleSlashes=!!e.preserveMultipleSlashes,this.regexp=null,this.negate=!1,this.nonegate=!!e.nonegate,this.comment=!1,this.empty=!1,this.partial=!!e.partial,this.nocase=!!this.options.nocase,this.windowsNoMagicRoot=void 0!==e.windowsNoMagicRoot?e.windowsNoMagicRoot:!(!this.isWindows||!this.nocase),this.globSet=[],this.globParts=[],this.set=[],this.make()}hasMagic(){if(this.options.magicalBraces&&this.set.length>1)return!0;for(const t of this.set)for(const e of t)if("string"!=typeof e)return!0;return!1}debug(...t){}make(){const t=this.pattern,e=this.options;if(!e.nocomment&&"#"===t.charAt(0))return void(this.comment=!0);if(!t)return void(this.empty=!0);this.parseNegate(),this.globSet=[...new Set(this.braceExpand())],e.debug&&(this.debug=(...t)=>console.error(...t)),this.debug(this.pattern,this.globSet);const n=this.globSet.map((t=>this.slashSplit(t)));this.globParts=this.preprocess(n),this.debug(this.pattern,this.globParts);let i=this.globParts.map((t=>{if(this.isWindows&&this.windowsNoMagicRoot){const e=!(""!==t[0]||""!==t[1]||"?"!==t[2]&&qt.test(t[2])||qt.test(t[3])),n=/^[a-z]:/i.test(t[0]);if(e)return[...t.slice(0,4),...t.slice(4).map((t=>this.parse(t)))];if(n)return[t[0],...t.slice(1).map((t=>this.parse(t)))]}return t.map((t=>this.parse(t)))}));if(this.debug(this.pattern,i),this.set=i.filter((t=>-1===t.indexOf(!1))),this.isWindows)for(let t=0;t<this.set.length;t++){const e=this.set[t];""===e[0]&&""===e[1]&&"?"===this.globParts[t][2]&&"string"==typeof e[3]&&/^[a-z]:$/i.test(e[3])&&(e[2]="?")}this.debug(this.pattern,this.set)}preprocess(t){if(this.options.noglobstar)for(let e=0;e<t.length;e++)for(let n=0;n<t[e].length;n++)"**"===t[e][n]&&(t[e][n]="*");const{optimizationLevel:e=1}=this.options;return e>=2?(t=this.firstPhasePreProcess(t),t=this.secondPhasePreProcess(t)):t=e>=1?this.levelOneOptimize(t):this.adjascentGlobstarOptimize(t),t}adjascentGlobstarOptimize(t){return t.map((t=>{let e=-1;for(;-1!==(e=t.indexOf("**",e+1));){let n=e;for(;"**"===t[n+1];)n++;n!==e&&t.splice(e,n-e)}return t}))}levelOneOptimize(t){return t.map((t=>0===(t=t.reduce(((t,e)=>{const n=t[t.length-1];return"**"===e&&"**"===n?t:".."===e&&n&&".."!==n&&"."!==n&&"**"!==n?(t.pop(),t):(t.push(e),t)}),[])).length?[""]:t))}levelTwoFileOptimize(t){Array.isArray(t)||(t=this.slashSplit(t));let e=!1;do{if(e=!1,!this.preserveMultipleSlashes){for(let n=1;n<t.length-1;n++){const i=t[n];1===n&&""===i&&""===t[0]||"."!==i&&""!==i||(e=!0,t.splice(n,1),n--)}"."!==t[0]||2!==t.length||"."!==t[1]&&""!==t[1]||(e=!0,t.pop())}let n=0;for(;-1!==(n=t.indexOf("..",n+1));){const i=t[n-1];i&&"."!==i&&".."!==i&&"**"!==i&&(e=!0,t.splice(n-1,2),n-=2)}}while(e);return 0===t.length?[""]:t}firstPhasePreProcess(t){let e=!1;do{e=!1;for(let n of t){let i=-1;for(;-1!==(i=n.indexOf("**",i+1));){let s=i;for(;"**"===n[s+1];)s++;s>i&&n.splice(i+1,s-i);const o=n[i+2],r=n[i+3];if(".."!==n[i+1])continue;if(!o||"."===o||".."===o||!r||"."===r||".."===r)continue;e=!0,n.splice(i,1);const l=n.slice(0);l[i]="**",t.push(l),i--}if(!this.preserveMultipleSlashes){for(let t=1;t<n.length-1;t++){const i=n[t];1===t&&""===i&&""===n[0]||"."!==i&&""!==i||(e=!0,n.splice(t,1),t--)}"."!==n[0]||2!==n.length||"."!==n[1]&&""!==n[1]||(e=!0,n.pop())}let s=0;for(;-1!==(s=n.indexOf("..",s+1));){const t=n[s-1];t&&"."!==t&&".."!==t&&"**"!==t&&(e=!0,n.splice(s-1,2,...1===s&&"**"===n[s+1]?["."]:[]),0===n.length&&n.push(""),s-=2)}}}while(e);return t}secondPhasePreProcess(t){for(let e=0;e<t.length-1;e++)for(let n=e+1;n<t.length;n++){const i=this.partsMatch(t[e],t[n],!this.preserveMultipleSlashes);i&&(t[e]=i,t[n]=[])}return t.filter((t=>t.length))}partsMatch(t,e,n=!1){let i=0,s=0,o=[],r="";for(;i<t.length&&s<e.length;)if(t[i]===e[s])o.push("b"===r?e[s]:t[i]),i++,s++;else if(n&&"**"===t[i]&&e[s]===t[i+1])o.push(t[i]),i++;else if(n&&"**"===e[s]&&t[i]===e[s+1])o.push(e[s]),s++;else if("*"!==t[i]||!e[s]||!this.options.dot&&e[s].startsWith(".")||"**"===e[s]){if("*"!==e[s]||!t[i]||!this.options.dot&&t[i].startsWith(".")||"**"===t[i])return!1;if("a"===r)return!1;r="b",o.push(e[s]),i++,s++}else{if("b"===r)return!1;r="a",o.push(t[i]),i++,s++}return t.length===e.length&&o}parseNegate(){if(this.nonegate)return;const t=this.pattern;let e=!1,n=0;for(let i=0;i<t.length&&"!"===t.charAt(i);i++)e=!e,n++;n&&(this.pattern=t.slice(n)),this.negate=e}matchOne(t,e,n=!1){const i=this.options;if(this.isWindows){const n="string"==typeof t[0]&&/^[a-z]:$/i.test(t[0]),i=!n&&""===t[0]&&""===t[1]&&"?"===t[2]&&/^[a-z]:$/i.test(t[3]),s="string"==typeof e[0]&&/^[a-z]:$/i.test(e[0]),o=i?3:n?0:void 0,r=!s&&""===e[0]&&""===e[1]&&"?"===e[2]&&"string"==typeof e[3]&&/^[a-z]:$/i.test(e[3])?3:s?0:void 0;if("number"==typeof o&&"number"==typeof r){const[n,i]=[t[o],e[r]];n.toLowerCase()===i.toLowerCase()&&(e[r]=n,r>o?e=e.slice(r):o>r&&(t=t.slice(o)))}}const{optimizationLevel:s=1}=this.options;s>=2&&(t=this.levelTwoFileOptimize(t)),this.debug("matchOne",this,{file:t,pattern:e}),this.debug("matchOne",t.length,e.length);for(var o=0,r=0,l=t.length,c=e.length;o<l&&r<c;o++,r++){this.debug("matchOne loop");var f=e[r],h=t[o];if(this.debug(e,f,h),!1===f)return!1;if(f===Zt){this.debug("GLOBSTAR",[e,f,h]);var u=o,a=r+1;if(a===c){for(this.debug("** at the end");o<l;o++)if("."===t[o]||".."===t[o]||!i.dot&&"."===t[o].charAt(0))return!1;return!0}for(;u<l;){var d=t[u];if(this.debug("\nglobstar while",t,u,e,a,d),this.matchOne(t.slice(u),e.slice(a),n))return this.debug("globstar found match!",u,l,d),!0;if("."===d||".."===d||!i.dot&&"."===d.charAt(0)){this.debug("dot detected!",t,u,e,a);break}this.debug("globstar swallow a segment, and continue"),u++}return!(!n||(this.debug("\n>>> no match, partial?",t,u,e,a),u!==l))}let s;if("string"==typeof f?(s=h===f,this.debug("string match",f,h,s)):(s=f.test(h),this.debug("pattern match",f,h,s)),!s)return!1}if(o===l&&r===c)return!0;if(o===l)return n;if(r===c)return o===l-1&&""===t[o];throw Error("wtf?")}braceExpand(){return Vt(this.pattern,this.options)}parse(t){it(t);const e=this.options;if("**"===t)return Zt;if(""===t)return"";let n,i=null;(n=t.match(Nt))?i=e.dot?At:zt:(n=t.match(St))?i=(e.nocase?e.dot?Et:Mt:e.dot?jt:Ot)(n[1]):(n=t.match(Lt))?i=(e.nocase?e.dot?Dt:Tt:e.dot?Ft:Gt)(n):(n=t.match(xt))?i=e.dot?Ct:Pt:(n=t.match(Rt))&&(i=Wt);const s=$t.fromGlob(t,this.options).toMMPattern();return i&&"object"==typeof s&&Reflect.defineProperty(s,"test",{value:i}),s}makeRe(){if(this.regexp||!1===this.regexp)return this.regexp;const t=this.set;if(!t.length)return this.regexp=!1,this.regexp;const e=this.options,n=e.noglobstar?"[^/]*?":e.dot?"(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?":"(?:(?!(?:\\/|^)\\.).)*?",i=new Set(e.nocase?["i"]:[]);let s=t.map((t=>{const e=t.map((t=>{if(t instanceof RegExp)for(const e of t.flags.split(""))i.add(e);return"string"==typeof t?(t=>t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"))(t):t===Zt?Zt:t._src}));return e.forEach(((t,i)=>{const s=e[i+1],o=e[i-1];t===Zt&&o!==Zt&&(void 0===o?void 0!==s&&s!==Zt?e[i+1]="(?:\\/|"+n+"\\/)?"+s:e[i]=n:void 0===s?e[i-1]=o+"(?:\\/|"+n+")?":s!==Zt&&(e[i-1]=o+"(?:\\/|\\/"+n+"\\/)"+s,e[i+1]=Zt))})),e.filter((t=>t!==Zt)).join("/")})).join("|");const[o,r]=t.length>1?["(?:",")"]:["",""];s="^"+o+s+r+"$",this.negate&&(s="^(?!"+s+").+$");try{this.regexp=RegExp(s,[...i].join(""))}catch(t){this.regexp=!1}return this.regexp}slashSplit(t){return this.preserveMultipleSlashes?t.split("/"):this.isWindows&&/^\/\/[^\/]+/.test(t)?["",...t.split(/\/+/)]:t.split(/\/+/)}match(t,e=this.partial){if(this.debug("match",t,this.pattern),this.comment)return!1;if(this.empty)return""===t;if("/"===t&&e)return!0;const n=this.options;this.isWindows&&(t=t.split("\\").join("/"));const i=this.slashSplit(t);this.debug(this.pattern,"split",i);const s=this.set;this.debug(this.pattern,"set",s);let o=i[i.length-1];if(!o)for(let t=i.length-2;!o&&t>=0;t--)o=i[t];for(let t=0;t<s.length;t++){const r=s[t];let l=i;if(n.matchBase&&1===r.length&&(l=[o]),this.matchOne(l,r,e))return!!n.flipNegate||!this.negate}return!n.flipNegate&&this.negate}static defaults(t){return kt.defaults(t).Minimatch}};function Jt(t){var e,n,i;return null!=(i=null==(n=null==(e=t.head)?void 0:e.querySelector('meta[name="csp-nonce"]'))?void 0:n.getAttribute("content"))?i:void 0}kt.AST=$t,kt.Minimatch=Bt,kt.escape=(t,{windowsPathsNoEscape:e=!1}={})=>e?t.replace(/[?*()[\]]/g,"[$&]"):t.replace(/[?*()[\]\\]/g,"\\$&"),kt.unescape=ft,((t,e)=>{for(var n in e)y(t,n,{get:e[n],enumerable:!0})})({},{err:()=>Kt,map:()=>Qt,ok:()=>Yt,unwrap:()=>te,unwrapErr:()=>ee});var Yt=t=>({isOk:!0,isErr:!1,value:t}),Kt=t=>({isOk:!1,isErr:!0,value:t});function Qt(t,e){if(t.isOk){const n=e(t.value);return n instanceof Promise?n.then((t=>Yt(t))):Yt(n)}if(t.isErr)return Kt(t.value);throw"should never get here"}var Xt,te=t=>{if(t.isOk)return t.value;throw t.value},ee=t=>{if(t.isErr)return t.value;throw t.value};function ne(){var t;const n=this.attachShadow({mode:"open"});if(void 0===Xt&&(Xt=null!=(t=function(t){if(!_)return;const e=new CSSStyleSheet;return e.replaceSync(t),e}(e))?t:null),Xt)V?n.adoptedStyleSheets.push(Xt):n.adoptedStyleSheets=[...n.adoptedStyleSheets,Xt];else if(!_){const t=document.createElement("style");t.innerHTML=e,n.prepend(t)}}var ie=new WeakMap,se=t=>"sc-"+t.p,oe=(t,e,...n)=>{let i=null,s=null,o=!1,r=!1;const l=[],c=e=>{for(let n=0;n<e.length;n++)i=e[n],Array.isArray(i)?c(i):null!=i&&"boolean"!=typeof i&&((o="function"!=typeof t&&!et(i))&&(i+=""),o&&r?l[l.length-1].v+=i:l.push(o?re(null,i):i),r=o)};if(c(n),e){e.key&&(s=e.key);{const t=e.className||e.class;t&&(e.class="object"!=typeof t?t:Object.keys(t).filter((e=>t[e])).join(" "))}}const f=re(t,null);return f.m=e,l.length>0&&(f.$=l),f.k=s,f},re=(t,e)=>({h:0,S:t,v:e,O:null,$:null,m:null,k:null}),le={},ce=t=>{const e=(t=>t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"))(t);return RegExp(`(^|[^@]|@(?!supports\\s+selector\\s*\\([^{]*?${e}))(${e}\\b)`,"g")};ce("::slotted"),ce(":host"),ce(":host-context");var fe,he=(t,e)=>null==t||et(t)?t:4&e?"false"!==t&&(""===t||!!t):2&e?"string"==typeof t?parseFloat(t):"number"==typeof t?t:NaN:1&e?t+"":t,ue=(t,e)=>{const n=(t=>{var e;return null==(e=A(t))?void 0:e.$hostElement$})(t);return{emit:t=>ae(n,e,{bubbles:!0,composed:!0,cancelable:!0,detail:t})}},ae=(t,e,n)=>{const i=I.ce(e,n);return t.dispatchEvent(i),i},de=(t,e,n,i,s,o)=>{if(n===i)return;let r=T(t,e),l=e.toLowerCase();if("class"===e){const e=t.classList,s=ge(n);let o=ge(i);e.remove(...s.filter((t=>t&&!o.includes(t)))),e.add(...o.filter((t=>t&&!s.includes(t))))}else if("style"===e){for(const e in n)i&&null!=i[e]||(e.includes("-")?t.style.removeProperty(e):t.style[e]="");for(const e in i)n&&i[e]===n[e]||(e.includes("-")?t.style.setProperty(e,i[e]):t.style[e]=i[e])}else if("key"===e);else if(r||"o"!==e[0]||"n"!==e[1]){const l=et(i);if((r||l&&null!==i)&&!s)try{if(t.tagName.includes("-"))t[e]!==i&&(t[e]=i);else{const s=null==i?"":i;"list"===e?r=!1:null!=n&&t[e]==s||("function"==typeof t.__lookupSetter__(e)?t[e]=s:t.setAttribute(e,s))}}catch(t){}null==i||!1===i?!1===i&&""!==t.getAttribute(e)||t.removeAttribute(e):(!r||4&o||s)&&!l&&1===t.nodeType&&t.setAttribute(e,i=!0===i?"":i)}else if(e="-"===e[2]?e.slice(3):T(H,l)?l.slice(2):l[2]+e.slice(3),n||i){const s=e.endsWith(ve);e=e.replace(me,""),n&&I.rel(t,e,n,s),i&&I.ael(t,e,i,s)}},pe=/\s/,ge=t=>("object"==typeof t&&t&&"baseVal"in t&&(t=t.baseVal),t&&"string"==typeof t?t.split(pe):[]),ve="Capture",me=RegExp(ve+"$"),be=(t,e,n)=>{const i=11===e.O.nodeType&&e.O.host?e.O.host:e.O,s=t&&t.m||{},o=e.m||{};for(const t of we(Object.keys(s)))t in o||de(i,t,s[t],void 0,n,e.h);for(const t of we(Object.keys(o)))de(i,t,s[t],o[t],n,e.h)};function we(t){return t.includes("ref")?[...t.filter((t=>"ref"!==t)),"ref"]:t}var ye=!1,$e=(t,e,n)=>{const i=e.$[n];let s,o,r=0;if(null!==i.v)s=i.O=H.document.createTextNode(i.v);else{if(ye||(ye="svg"===i.S),!H.document)throw Error("You are trying to render a Stencil component in an environment that doesn't support the DOM. Make sure to populate the [`window`](https://developer.mozilla.org/en-US/docs/Web/API/Window/window) object before rendering a component.");if(s=i.O=H.document.createElementNS(ye?"http://www.w3.org/2000/svg":"http://www.w3.org/1999/xhtml",i.S),ye&&"foreignObject"===i.S&&(ye=!1),be(null,i,ye),i.$){const e="template"===i.S?s.content:s;for(r=0;r<i.$.length;++r)o=$e(t,i,r),o&&e.appendChild(o)}"svg"===i.S?ye=!1:"foreignObject"===s.tagName&&(ye=!0)}return s["s-hn"]=fe,s},ke=(t,e,n,i,s,o)=>{let r,l=t;for(l.shadowRoot&&l.tagName===fe&&(l=l.shadowRoot),"template"===n.S&&(l=l.content);s<=o;++s)i[s]&&(r=$e(null,n,s),r&&(i[s].O=r,Me(l,r,e)))},Se=(t,e,n)=>{for(let i=e;i<=n;++i){const e=t[i];if(e){const t=e.O;t&&t.remove()}}},Oe=(t,e,n=!1)=>t.S===e.S&&(n?(n&&!t.k&&e.k&&(t.k=e.k),!0):t.k===e.k),je=(t,e,n=!1)=>{const i=e.O=t.O,s=t.$,o=e.$,r=e.S,l=e.v;null===l?(be(t,e,ye="svg"===r||"foreignObject"!==r&&ye),null!==s&&null!==o?((t,e,n,i,s=!1)=>{let o,r,l=0,c=0,f=0,h=0,u=e.length-1,a=e[0],d=e[u],p=i.length-1,g=i[0],v=i[p];const m="template"===n.S?t.content:t;for(;l<=u&&c<=p;)if(null==a)a=e[++l];else if(null==d)d=e[--u];else if(null==g)g=i[++c];else if(null==v)v=i[--p];else if(Oe(a,g,s))je(a,g,s),a=e[++l],g=i[++c];else if(Oe(d,v,s))je(d,v,s),d=e[--u],v=i[--p];else if(Oe(a,v,s))je(a,v,s),Me(m,a.O,d.O.nextSibling),a=e[++l],v=i[--p];else if(Oe(d,g,s))je(d,g,s),Me(m,d.O,a.O),d=e[--u],g=i[++c];else{for(f=-1,h=l;h<=u;++h)if(e[h]&&null!==e[h].k&&e[h].k===g.k){f=h;break}f>=0?(r=e[f],r.S!==g.S?o=$e(e&&e[c],n,f):(je(r,g,s),e[f]=void 0,o=r.O),g=i[++c]):(o=$e(e&&e[c],n,c),g=i[++c]),o&&Me(a.O.parentNode,o,a.O)}l>u?ke(t,null==i[p+1]?null:i[p+1].O,n,i,c,p):c>p&&Se(e,l,u)})(i,s,e,o,n):null!==o?(null!==t.v&&(i.textContent=""),ke(i,null,e,o,0,o.length-1)):!n&&null!==s&&Se(s,0,s.length-1),ye&&"svg"===r&&(ye=!1)):t.v!==l&&(i.data=l)},Me=(t,e,n)=>null==t?void 0:t.insertBefore(e,n),Ee=(t,e)=>{if(e&&!t.j&&e["s-p"]){const n=e["s-p"].push(new Promise((i=>t.j=()=>{e["s-p"].splice(n-1,1),i()})))}},xe=(t,e)=>{if(t.h|=16,4&t.h)return void(t.h|=512);Ee(t,t.M);const n=()=>Pe(t,e);if(!e)return tt(n);queueMicrotask((()=>{n()}))},Pe=(t,e)=>{const n=t.$hostElement$,i=t.l;if(!i)throw Error(`Can't render component <${n.tagName.toLowerCase()} /> with invalid Stencil runtime! Make sure this imported component is compiled with a \`externalRuntime: true\` flag. For more information, please refer to https://stenciljs.com/docs/custom-elements#externalruntime`);let s;return e?(t.P.length&&t.P.forEach((t=>t(n))),s=Le(i,"componentWillLoad",void 0,n)):s=Le(i,"componentWillUpdate",void 0,n),s=Ce(s,(()=>Le(i,"componentWillRender",void 0,n))),Ce(s,(()=>We(t,i,e)))},Ce=(t,e)=>Re(t)?t.then(e).catch((t=>{console.error(t),e()})):e(),Re=t=>t instanceof Promise||t&&t.then&&"function"==typeof t.then,We=async(t,e,n)=>{var i;const s=t.$hostElement$,o=s["s-rc"];n&&(t=>{const e=t.i,n=t.$hostElement$,i=e.h,s=((t,e)=>{var n,i,s;const o=se(e),r=G.get(o);if(!H.document)return o;if(t=11===t.nodeType?t:H.document,r)if("string"==typeof r){let s,l=ie.get(t=t.head||t);if(l||ie.set(t,l=new Set),!l.has(o)){s=H.document.createElement("style"),s.innerHTML=r;const c=null!=(n=I.C)?n:Jt(H.document);if(null!=c&&s.setAttribute("nonce",c),!(1&e.h))if("HEAD"===t.nodeName){const e=t.querySelectorAll("link[rel=preconnect]"),n=e.length>0?e[e.length-1].nextSibling:t.querySelector("style");t.insertBefore(s,(null==n?void 0:n.parentNode)===t?n:null)}else if("host"in t)if(_){const e=new(null!=(i=t.defaultView)?i:t.ownerDocument.defaultView).CSSStyleSheet;e.replaceSync(r),V?t.adoptedStyleSheets.unshift(e):t.adoptedStyleSheets=[e,...t.adoptedStyleSheets]}else{const e=t.querySelector("style");e?e.innerHTML=r+e.innerHTML:t.prepend(s)}else t.append(s);1&e.h&&t.insertBefore(s,null),4&e.h&&(s.innerHTML+=U),l&&l.add(o)}}else{let e=ie.get(t);if(e||ie.set(t,e=new Set),!e.has(o)){const n=null!=(s=t.defaultView)?s:t.ownerDocument.defaultView;let i;if(r.constructor===n.CSSStyleSheet)i=r;else{i=new n.CSSStyleSheet;for(let t=0;t<r.cssRules.length;t++)i.insertRule(r.cssRules[t].cssText,t)}V?t.adoptedStyleSheets.push(i):t.adoptedStyleSheets=[...t.adoptedStyleSheets,i],e.add(o)}}return o})(n.shadowRoot?n.shadowRoot:n.getRootNode(),e);10&i&&(n["s-sc"]=s,n.classList.add(s+"-h"))})(t);Ne(t,e,s,n),o&&(o.map((t=>t())),s["s-rc"]=void 0);{const e=null!=(i=s["s-p"])?i:[],n=()=>ze(t);0===e.length?n():(Promise.all(e).then(n),t.h|=4,e.length=0)}},Ne=(t,e,n,i)=>{try{e=e.render(),t.h&=-17,t.h|=2,((t,e,n=!1)=>{const i=t.$hostElement$,s=t.R||re(null,null),o=(t=>t&&t.S===le)(e)?e:oe(null,null,e);if(fe=i.tagName,n&&o.m)for(const t of Object.keys(o.m))i.hasAttribute(t)&&!["key","ref","style","class"].includes(t)&&(o.m[t]=i[t]);o.S=null,o.h|=4,t.R=o,o.O=s.O=i.shadowRoot||i,je(s,o,n)})(t,e,i)}catch(e){D(e,t.$hostElement$)}return null},ze=t=>{const e=t.$hostElement$,n=t.l,i=t.M;Le(n,"componentDidRender",void 0,e),64&t.h?Le(n,"componentDidUpdate",void 0,e):(t.h|=64,Te(e),Le(n,"componentDidLoad",void 0,e),t.W(e),i||Ae()),t.j&&(t.j(),t.j=void 0),512&t.h&&X((()=>xe(t,!1))),t.h&=-517},Ae=()=>{X((()=>ae(H,"appload",{detail:{namespace:"feedlog-toolkit"}})))},Le=(t,e,n,i)=>{if(t&&t[e])try{return t[e](n)}catch(t){D(t,i)}},Te=t=>t.classList.add("hydrated"),De=(t,e,n,i)=>{const s=A(t);if(!s)return;if(!s)throw Error(`Couldn't find host element for "${i.p}" as it is unknown to this Stencil runtime. This usually happens when integrating a 3rd party Stencil component with another Stencil component or application. Please reach out to the maintainers of the 3rd party Stencil component or report this on the Stencil Discord server (https://chat.stenciljs.com) or comment on this similar [GitHub issue](https://github.com/stenciljs/core/issues/5457).`);const o=s.o.get(e),r=s.h,l=s.l;if(n=he(n,i.t[e][0]),!(8&r&&void 0!==o||n===o||Number.isNaN(o)&&Number.isNaN(n)||(s.o.set(e,n),2!=(18&r)))){if(l.componentShouldUpdate&&!1===l.componentShouldUpdate(n,o,e))return;xe(s,!1)}},Fe=(t,e,n)=>{var i,s;const o=t.prototype;if(e.t){const r=Object.entries(null!=(i=e.t)?i:{});if(r.map((([t,[i]])=>{if(31&i||2&n&&32&i){const{get:s,set:r}=Object.getOwnPropertyDescriptor(o,t)||{};s&&(e.t[t][0]|=2048),r&&(e.t[t][0]|=4096),(1&n||!s)&&Object.defineProperty(o,t,{get(){{if(!(2048&e.t[t][0]))return((t,e)=>A(this).o.get(e))(0,t);const n=A(this),i=n?n.l:o;if(!i)return;return i[t]}},configurable:!0,enumerable:!0}),Object.defineProperty(o,t,{set(s){const o=A(this);if(o){if(r)return void 0===(32&i?this[t]:o.$hostElement$[t])&&o.o.get(t)&&(s=o.o.get(t)),r.call(this,he(s,i)),void De(this,t,s=32&i?this[t]:o.$hostElement$[t],e);{if(!(1&n&&4096&e.t[t][0]))return De(this,t,s,e),void(1&n&&!o.l&&o.P.push((()=>{4096&e.t[t][0]&&o.l[t]!==o.o.get(t)&&(o.l[t]=s)})));const r=()=>{const n=o.l[t];!o.o.get(t)&&n&&o.o.set(t,n),o.l[t]=he(s,i),De(this,t,o.l[t],e)};o.l?r():o.P.push((()=>{r()}))}}}})}})),1&n){const n=new Map;o.attributeChangedCallback=function(t,i,s){I.jmp((()=>{var l;const c=n.get(t),f=A(this);if(this.hasOwnProperty(c)&&(s=this[c],delete this[c]),o.hasOwnProperty(c)&&"number"==typeof this[c]&&this[c]==s)return;if(null==c){const n=null==f?void 0:f.h;if(f&&n&&!(8&n)&&s!==i){const o=f.l,r=null==(l=e.N)?void 0:l[t];null==r||r.forEach((e=>{const[[r,l]]=Object.entries(e);null!=o[r]&&(128&n||1&l)&&o[r].call(o,s,i,t)}))}return}const h=r.find((([t])=>t===c));h&&4&h[1][0]&&(s=null!==s&&"false"!==s);const u=Object.getOwnPropertyDescriptor(o,c);s==this[c]||u.get&&!u.set||(this[c]=s)}))},t.observedAttributes=Array.from(new Set([...Object.keys(null!=(s=e.N)?s:{}),...r.filter((([t,e])=>31&e[0])).map((([t,e])=>{const i=e[1]||t;return n.set(i,t),i}))]))}}return t},Ge=(t,e)=>{Le(t,"connectedCallback",void 0,e)},Ue=(t,e)=>{Le(t,"disconnectedCallback",void 0,e||t)},He=(t,e={})=>{var n;if(!H.document)return void console.warn("Stencil: No document found. Skipping bootstrapping lazy components.");const i=[],s=e.exclude||[],o=H.customElements,r=H.document.head,l=r.querySelector("meta[charset]"),c=H.document.createElement("style"),f=[];let h,u=!0;Object.assign(I,e),I.u=new URL(e.resourcesUrl||"./",H.document.baseURI).href;let a=!1;if(t.map((t=>{t[1].map((e=>{const n={h:e[0],p:e[1],t:e[2],A:e[3]};4&n.h&&(a=!0),n.t=e[2];const r=n.p,l=class extends HTMLElement{constructor(t){if(super(t),this.hasRegisteredEventListeners=!1,((t,e)=>{const n={h:0,$hostElement$:t,i:e,o:new Map,L:new Map};n.T=new Promise((t=>n.W=t)),t["s-p"]=[],t["s-rc"]=[],n.P=[];const i=n;t.__stencil__getHostRef=()=>i})(t=this,n),1&n.h)if(t.shadowRoot){if("open"!==t.shadowRoot.mode)throw Error(`Unable to re-use existing shadow root for ${n.p}! Mode is set to ${t.shadowRoot.mode} but Stencil only supports open shadow roots.`)}else ne.call(t,n)}connectedCallback(){A(this)&&(this.hasRegisteredEventListeners||(this.hasRegisteredEventListeners=!0),h&&(clearTimeout(h),h=null),u?f.push(this):I.jmp((()=>(t=>{if(!(1&I.h)){const e=A(t);if(!e)return;const n=e.i,i=()=>{};if(1&e.h)(null==e?void 0:e.l)?Ge(e.l,t):(null==e?void 0:e.T)&&e.T.then((()=>Ge(e.l,t)));else{e.h|=1;{let n=t;for(;n=n.parentNode||n.host;)if(n["s-p"]){Ee(e,e.M=n);break}}n.t&&Object.entries(n.t).map((([e,[n]])=>{if(31&n&&e in t&&t[e]!==Object.prototype[e]){const n=t[e];delete t[e],t[e]=n}})),(async(t,e,n)=>{let i;if(!(32&e.h)){if(e.h|=32,n.D){const s=((t,e)=>{const n=t.p.replace(/-/g,"_"),i=t.D;if(!i)return;const s=F.get(i);return s?s[n]:import(`./${i}.entry.js`).then((t=>(F.set(i,t),t[n])),(t=>{D(t,e.$hostElement$)}))
|
|
2
|
-
/*!__STENCIL_STATIC_IMPORT_SWITCH__*/})(n,e);if(s&&"then"in s){const t=()=>{};i=await s,t()}else i=s;if(!i)throw Error(`Constructor for "${n.p}#${e.F}" was not found`);i.isProxied||(
|
|
1
|
+
const t=()=>{},e=":root{--feedlog-font-size:16px;--feedlog-background:#ffffff;--feedlog-foreground:oklch(0.145 0 0);--feedlog-card:#ffffff;--feedlog-card-foreground:oklch(0.145 0 0);--feedlog-popover:oklch(1 0 0);--feedlog-popover-foreground:oklch(0.145 0 0);--feedlog-primary:#030213;--feedlog-primary-foreground:oklch(1 0 0);--feedlog-secondary:oklch(0.95 0.0058 264.53);--feedlog-secondary-foreground:#030213;--feedlog-muted:#ececf0;--feedlog-muted-foreground:#717182;--feedlog-accent:#e9ebef;--feedlog-accent-foreground:#030213;--feedlog-destructive:#d4183d;--feedlog-destructive-foreground:#ffffff;--feedlog-border:rgba(0, 0, 0, 0.1);--feedlog-input:transparent;--feedlog-input-background:#f3f3f5;--feedlog-switch-background:#cbced4;--feedlog-ring:oklch(0.708 0 0);--feedlog-radius:0.625rem;--feedlog-blue-100:oklch(0.932 0.032 255.585);--feedlog-blue-400:oklch(0.707 0.165 254.624);--feedlog-blue-500:oklch(0.623 0.214 259.815);--feedlog-blue-600:oklch(0.546 0.245 262.881);--feedlog-blue-700:oklch(0.488 0.243 264.376);--feedlog-blue-900:oklch(0.379 0.146 265.522);--feedlog-font-family:ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, 'Liberation Mono', monospace}.dark{--feedlog-background:oklch(0.145 0 0);--feedlog-foreground:oklch(0.985 0 0);--feedlog-card:oklch(0.145 0 0);--feedlog-card-foreground:oklch(0.985 0 0);--feedlog-popover:oklch(0.145 0 0);--feedlog-popover-foreground:oklch(0.985 0 0);--feedlog-primary:oklch(0.985 0 0);--feedlog-primary-foreground:oklch(0.205 0 0);--feedlog-secondary:oklch(0.269 0 0);--feedlog-secondary-foreground:oklch(0.985 0 0);--feedlog-muted:oklch(0.269 0 0);--feedlog-muted-foreground:oklch(0.708 0 0);--feedlog-accent:oklch(0.269 0 0);--feedlog-accent-foreground:oklch(0.985 0 0);--feedlog-destructive:oklch(0.396 0.141 25.723);--feedlog-destructive-foreground:oklch(0.637 0.237 25.331);--feedlog-border:oklch(0.269 0 0);--feedlog-input:oklch(0.269 0 0);--feedlog-ring:oklch(0.439 0 0)}";var n,i,s,o,r,l,c,f,h,u,a,d,p,g,v,m,b,w=Object.create,y=Object.defineProperty,$=Object.getOwnPropertyDescriptor,k=Object.getOwnPropertyNames,S=Object.getPrototypeOf,O=Object.prototype.hasOwnProperty,j=t=>{throw TypeError(t)},M=(t,e)=>function(){return e||(0,t[k(t)[0]])((e={exports:{}}).exports,e),e.exports},E=(t,e,n)=>e.has(t)||j("Cannot "+n),x=(t,e,n)=>(E(t,e,"read from private field"),n?n.call(t):e.get(t)),P=(t,e,n)=>e.has(t)?j("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,n),C=(t,e,n)=>(E(t,e,"write to private field"),e.set(t,n),n),R=(t,e,n)=>(E(t,e,"access private method"),n),W=M({"node_modules/balanced-match/index.js"(t,e){function n(t,e,n){t instanceof RegExp&&(t=i(t,n)),e instanceof RegExp&&(e=i(e,n));var o=s(t,e,n);return o&&{start:o[0],end:o[1],pre:n.slice(0,o[0]),body:n.slice(o[0]+t.length,o[1]),post:n.slice(o[1]+e.length)}}function i(t,e){var n=e.match(t);return n?n[0]:null}function s(t,e,n){var i,s,o,r,l,c=n.indexOf(t),f=n.indexOf(e,c+1),h=c;if(c>=0&&f>0){if(t===e)return[c,f];for(i=[],o=n.length;h>=0&&!l;)h==c?(i.push(h),c=n.indexOf(t,h+1)):1==i.length?l=[i.pop(),f]:((s=i.pop())<o&&(o=s,r=f),f=n.indexOf(e,h+1)),h=c<f&&c>=0?c:f;i.length&&(l=[o,r])}return l}e.exports=n,n.range=s}}),N=M({"node_modules/brace-expansion/index.js"(t,e){var n=W();e.exports=function(t){return t?("{}"===t.substr(0,2)&&(t="\\{\\}"+t.substr(2)),g(function(t){return t.split("\\\\").join(i).split("\\{").join(s).split("\\}").join(o).split("\\,").join(r).split("\\.").join(l)}(t),!0).map(f)):[]};var i="\0SLASH"+Math.random()+"\0",s="\0OPEN"+Math.random()+"\0",o="\0CLOSE"+Math.random()+"\0",r="\0COMMA"+Math.random()+"\0",l="\0PERIOD"+Math.random()+"\0";function c(t){return parseInt(t,10)==t?parseInt(t,10):t.charCodeAt(0)}function f(t){return t.split(i).join("\\").split(s).join("{").split(o).join("}").split(r).join(",").split(l).join(".")}function h(t){if(!t)return[""];var e=[],i=n("{","}",t);if(!i)return t.split(",");var s=i.body,o=i.post,r=i.pre.split(",");r[r.length-1]+="{"+s+"}";var l=h(o);return o.length&&(r[r.length-1]+=l.shift(),r.push.apply(r,l)),e.push.apply(e,r),e}function u(t){return"{"+t+"}"}function a(t){return/^-?0\d/.test(t)}function d(t,e){return t<=e}function p(t,e){return t>=e}function g(t,e){var i=[],s=n("{","}",t);if(!s)return[t];var r=s.pre,l=s.post.length?g(s.post,!1):[""];if(/\$$/.test(s.pre))for(var f=0;f<l.length;f++)i.push(N=r+"{"+s.body+"}"+l[f]);else{var v,m,b=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(s.body),w=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(s.body),y=b||w,$=s.body.indexOf(",")>=0;if(!y&&!$)return s.post.match(/,(?!,).*\}/)?g(t=s.pre+"{"+s.body+o+s.post):[t];if(y)v=s.body.split(/\.\./);else if(1===(v=h(s.body)).length&&1===(v=g(v[0],!1).map(u)).length)return l.map((function(t){return s.pre+v[0]+t}));if(y){var k=c(v[0]),S=c(v[1]),O=Math.max(v[0].length,v[1].length),j=3==v.length?Math.abs(c(v[2])):1,M=d;S<k&&(j*=-1,M=p);var E=v.some(a);m=[];for(var x=k;M(x,S);x+=j){var P;if(w)"\\"===(P=String.fromCharCode(x))&&(P="");else if(P=x+"",E){var C=O-P.length;if(C>0){var R=Array(C+1).join("0");P=x<0?"-"+R+P.slice(1):R+P}}m.push(P)}}else{m=[];for(var W=0;W<v.length;W++)m.push.apply(m,g(v[W],!1))}for(W=0;W<m.length;W++)for(f=0;f<l.length;f++){var N=r+m[W]+l[f];(!e||y||N)&&i.push(N)}}return i}}}),z=(t,e)=>{var n;Object.entries(null!=(n=e.i.t)?n:{}).map((([n,[i]])=>{if(31&i||32&i){const i=t[n],s=function(t,e){for(;t;){const n=Object.getOwnPropertyDescriptor(t,e);if(null==n?void 0:n.get)return n;t=Object.getPrototypeOf(t)}}(Object.getPrototypeOf(t),n)||Object.getOwnPropertyDescriptor(t,n);s&&Object.defineProperty(t,n,{get(){return s.get.call(this)},set(t){s.set.call(this,t)},configurable:!0,enumerable:!0}),t[n]=e.o.has(n)?e.o.get(n):i}}))},A=t=>{if(t.__stencil__getHostRef)return t.__stencil__getHostRef()},L=(t,e)=>{e&&(t.__stencil__getHostRef=()=>e,e.l=t,512&e.i.h&&z(t,e))},T=(t,e)=>e in t,D=(t,e)=>(0,console.error)(t,e),F=new Map,G=new Map,U="slot-fb{display:contents}slot-fb[hidden]{display:none}",H="undefined"!=typeof window?window:{},I={h:0,u:"",jmp:t=>t(),raf:t=>requestAnimationFrame(t),ael:(t,e,n,i)=>t.addEventListener(e,n,i),rel:(t,e,n,i)=>t.removeEventListener(e,n,i),ce:(t,e)=>new CustomEvent(t,e)},Z=t=>Promise.resolve(t),_=(()=>{try{return!!H.document.adoptedStyleSheets&&(new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync)}catch(t){}return!1})(),V=!!_&&(()=>!!H.document&&Object.getOwnPropertyDescriptor(H.document.adoptedStyleSheets,"length").writable)(),q=!1,B=[],J=[],Y=(t,e)=>n=>{t.push(n),q||(q=!0,e&&4&I.h?X(Q):I.raf(Q))},K=t=>{for(let e=0;e<t.length;e++)try{t[e](performance.now())}catch(t){D(t)}t.length=0},Q=()=>{K(B),K(J),(q=B.length>0)&&I.raf(Q)},X=t=>Z().then(t),tt=Y(J,!0),et=t=>"object"==(t=typeof t)||"function"===t,nt=((t,e,n)=>(n=null!=t?w(S(t)):{},((t,e,n,i)=>{if(e&&"object"==typeof e||"function"==typeof e)for(let n of k(e))O.call(t,n)||undefined===n||y(t,n,{get:()=>e[n],enumerable:!(i=$(e,n))||i.enumerable});return t})(y(n,"default",{value:t,enumerable:!0}),t)))(N()),it=t=>{if("string"!=typeof t)throw new TypeError("invalid pattern");if(t.length>65536)throw new TypeError("pattern is too long")},st={"[:alnum:]":["\\p{L}\\p{Nl}\\p{Nd}",!0],"[:alpha:]":["\\p{L}\\p{Nl}",!0],"[:ascii:]":["\\x00-\\x7f",!1],"[:blank:]":["\\p{Zs}\\t",!0],"[:cntrl:]":["\\p{Cc}",!0],"[:digit:]":["\\p{Nd}",!0],"[:graph:]":["\\p{Z}\\p{C}",!0,!0],"[:lower:]":["\\p{Ll}",!0],"[:print:]":["\\p{C}",!0],"[:punct:]":["\\p{P}",!0],"[:space:]":["\\p{Z}\\t\\r\\n\\v\\f",!0],"[:upper:]":["\\p{Lu}",!0],"[:word:]":["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}",!0],"[:xdigit:]":["A-Fa-f0-9",!1]},ot=t=>t.replace(/[[\]\\-]/g,"\\$&"),rt=t=>t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),lt=t=>t.join(""),ct=(t,e)=>{const n=e;if("["!==t.charAt(n))throw Error("not in a brace expression");const i=[],s=[];let o=n+1,r=!1,l=!1,c=!1,f=!1,h=n,u="";t:for(;o<t.length;){const e=t.charAt(o);if("!"!==e&&"^"!==e||o!==n+1){if("]"===e&&r&&!c){h=o+1;break}if(r=!0,"\\"!==e||c){if("["===e&&!c)for(const[e,[r,c,f]]of Object.entries(st))if(t.startsWith(e,o)){if(u)return["$.",!1,t.length-n,!0];o+=e.length,f?s.push(r):i.push(r),l=l||c;continue t}c=!1,u?(e>u?i.push(ot(u)+"-"+ot(e)):e===u&&i.push(ot(e)),u="",o++):t.startsWith("-]",o+1)?(i.push(ot(e+"-")),o+=2):t.startsWith("-",o+1)?(u=e,o+=2):(i.push(ot(e)),o++)}else c=!0,o++}else f=!0,o++}if(h<o)return["",!1,0,!1];if(!i.length&&!s.length)return["$.",!1,t.length-n,!0];if(0===s.length&&1===i.length&&/^\\?.$/.test(i[0])&&!f){const t=2===i[0].length?i[0].slice(-1):i[0];return[rt(t),!1,h-n,!1]}const a="["+(f?"^":"")+lt(i)+"]",d="["+(f?"":"^")+lt(s)+"]";return[i.length&&s.length?"("+a+"|"+d+")":i.length?a:d,l,h-n,!0]},ft=(t,{windowsPathsNoEscape:e=!1}={})=>e?t.replace(/\[([^\/\\])\]/g,"$1"):t.replace(/((?!\\).|^)\[([^\/\\])\]/g,"$1$2").replace(/\\([^\/])/g,"$1"),ht=new Set(["!","?","+","*","@"]),ut=t=>ht.has(t),at="(?!\\.)",dt=new Set(["[","."]),pt=new Set(["..","."]),gt=new Set("().*{}+?[]^$\\!"),vt=t=>t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),mt="[^/]",bt=mt+"*?",wt=mt+"+?",yt=class t{constructor(t,e,p={}){P(this,d),((t,e,n)=>{((t,e,n)=>{e in t?y(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n})(t,e+"",n)})(this,"type"),P(this,n),P(this,i),P(this,s,!1),P(this,o,[]),P(this,r),P(this,l),P(this,c),P(this,f,!1),P(this,h),P(this,u),P(this,a,!1),this.type=t,t&&C(this,i,!0),C(this,r,e),C(this,n,x(this,r)?x(x(this,r),n):this),C(this,h,x(this,n)===this?p:x(x(this,n),h)),C(this,c,x(this,n)===this?[]:x(x(this,n),c)),"!"!==t||x(x(this,n),f)||x(this,c).push(this),C(this,l,x(this,r)?x(x(this,r),o).length:0)}get hasMagic(){if(void 0!==x(this,i))return x(this,i);for(const t of x(this,o))if("string"!=typeof t&&(t.type||t.hasMagic))return C(this,i,!0);return x(this,i)}toString(){return void 0!==x(this,u)?x(this,u):C(this,u,this.type?this.type+"("+x(this,o).map((t=>t+"")).join("|")+")":x(this,o).map((t=>t+"")).join(""))}push(...e){for(const n of e)if(""!==n){if("string"!=typeof n&&!(n instanceof t&&x(n,r)===this))throw Error("invalid part: "+n);x(this,o).push(n)}}toJSON(){var t;const e=null===this.type?x(this,o).slice().map((t=>"string"==typeof t?t:t.toJSON())):[this.type,...x(this,o).map((t=>t.toJSON()))];return this.isStart()&&!this.type&&e.unshift([]),this.isEnd()&&(this===x(this,n)||x(x(this,n),f)&&"!"===(null==(t=x(this,r))?void 0:t.type))&&e.push({}),e}isStart(){var e;if(x(this,n)===this)return!0;if(!(null==(e=x(this,r))?void 0:e.isStart()))return!1;if(0===x(this,l))return!0;const i=x(this,r);for(let e=0;e<x(this,l);e++){const n=x(i,o)[e];if(!(n instanceof t&&"!"===n.type))return!1}return!0}isEnd(){var t,e,i;if(x(this,n)===this)return!0;if("!"===(null==(t=x(this,r))?void 0:t.type))return!0;if(!(null==(e=x(this,r))?void 0:e.isEnd()))return!1;if(!this.type)return null==(i=x(this,r))?void 0:i.isEnd();const s=x(this,r)?x(x(this,r),o).length:0;return x(this,l)===s-1}copyIn(t){this.push("string"==typeof t?t:t.clone(this))}clone(e){const n=new t(this.type,e);for(const t of x(this,o))n.copyIn(t);return n}static fromGlob(e,n={}){var i;const s=new t(null,void 0,n);return R(i=t,g,v).call(i,e,s,0,n),s}toMMPattern(){if(this!==x(this,n))return x(this,n).toMMPattern();const t=""+this,[e,s,o,r]=this.toRegExpSource();if(!(o||x(this,i)||x(this,h).nocase&&!x(this,h).nocaseMagicOnly&&t.toUpperCase()!==t.toLowerCase()))return s;const l=(x(this,h).nocase?"i":"")+(r?"u":"");return Object.assign(RegExp(`^${e}$`,l),{_src:e,_glob:t})}get options(){return x(this,h)}toRegExpSource(e){var l;const c=null!=e?e:!!x(this,h).dot;if(x(this,n)===this&&R(this,d,p).call(this),!this.type){const h=this.isStart()&&this.isEnd(),u=x(this,o).map((n=>{var o;const[r,l,c,f]="string"==typeof n?R(o=t,g,b).call(o,n,x(this,i),h):n.toRegExpSource(e);return C(this,i,x(this,i)||c),C(this,s,x(this,s)||f),r})).join("");let a="";if(this.isStart()&&"string"==typeof x(this,o)[0]&&(1!==x(this,o).length||!pt.has(x(this,o)[0]))){const t=dt,n=c&&t.has(u.charAt(0))||u.startsWith("\\.")&&t.has(u.charAt(2))||u.startsWith("\\.\\.")&&t.has(u.charAt(4)),i=!c&&!e&&t.has(u.charAt(0));a=n?"(?!(?:^|/)\\.\\.?(?:$|/))":i?at:""}let d="";return this.isEnd()&&x(x(this,n),f)&&"!"===(null==(l=x(this,r))?void 0:l.type)&&(d="(?:$|\\/)"),[a+u+d,ft(u),C(this,i,!!x(this,i)),x(this,s)]}const u="*"===this.type||"+"===this.type,v="!"===this.type?"(?:(?!(?:":"(?:";let w=R(this,d,m).call(this,c);if(this.isStart()&&this.isEnd()&&!w&&"!"!==this.type){const t=""+this;return C(this,o,[t]),this.type=null,C(this,i,void 0),[t,ft(""+this),!1,!1]}let y=!u||e||c?"":R(this,d,m).call(this,!0);y===w&&(y=""),y&&(w=`(?:${w})(?:${y})*?`);let $="";return $="!"===this.type&&x(this,a)?(this.isStart()&&!c?at:"")+wt:v+w+("!"===this.type?"))"+(!this.isStart()||c||e?"":at)+bt+")":"@"===this.type?")":"?"===this.type?")?":"+"===this.type&&y?")":"*"===this.type&&y?")?":")"+this.type),[$,ft(w),C(this,i,!!x(this,i)),x(this,s)]}};n=new WeakMap,i=new WeakMap,s=new WeakMap,o=new WeakMap,r=new WeakMap,l=new WeakMap,c=new WeakMap,f=new WeakMap,h=new WeakMap,u=new WeakMap,a=new WeakMap,d=new WeakSet,p=function(){if(this!==x(this,n))throw Error("should only call on root");if(x(this,f))return this;let t;for(C(this,f,!0);t=x(this,c).pop();){if("!"!==t.type)continue;let e=t,n=x(e,r);for(;n;){for(let i=x(e,l)+1;!n.type&&i<x(n,o).length;i++)for(const e of x(t,o)){if("string"==typeof e)throw Error("string part in extglob AST??");e.copyIn(x(n,o)[i])}e=n,n=x(e,r)}}return this},g=new WeakSet,v=function(t,e,n,s){var r,l;let c=!1,f=!1,h=-1,u=!1;if(null===e.type){let i=n,o="";for(;i<t.length;){const n=t.charAt(i++);if(c||"\\"===n)c=!c,o+=n;else if(f)i===h+1?"^"!==n&&"!"!==n||(u=!0):"]"!==n||i===h+2&&u||(f=!1),o+=n;else if("["!==n)if(s.noext||!ut(n)||"("!==t.charAt(i))o+=n;else{e.push(o),o="";const l=new yt(n,e);i=R(r=yt,g,v).call(r,t,l,i,s),e.push(l)}else f=!0,h=i,u=!1,o+=n}return e.push(o),i}let d=n+1,p=new yt(null,e);const m=[];let b="";for(;d<t.length;){const n=t.charAt(d++);if(c||"\\"===n)c=!c,b+=n;else if(f)d===h+1?"^"!==n&&"!"!==n||(u=!0):"]"!==n||d===h+2&&u||(f=!1),b+=n;else if("["!==n)if(ut(n)&&"("===t.charAt(d)){p.push(b),b="";const e=new yt(n,p);p.push(e),d=R(l=yt,g,v).call(l,t,e,d,s)}else if("|"!==n){if(")"===n)return""===b&&0===x(e,o).length&&C(e,a,!0),p.push(b),b="",e.push(...m,p),d;b+=n}else p.push(b),b="",m.push(p),p=new yt(null,e);else f=!0,h=d,u=!1,b+=n}return e.type=null,C(e,i,void 0),C(e,o,[t.substring(n-1)]),d},m=function(t){return x(this,o).map((e=>{if("string"==typeof e)throw Error("string type in extglob ast??");const[n,i,o,r]=e.toRegExpSource(t);return C(this,s,x(this,s)||r),n})).filter((t=>!(this.isStart()&&this.isEnd()&&!t))).join("|")},b=function(t,e,n=!1){let i=!1,s="",o=!1;for(let r=0;r<t.length;r++){const l=t.charAt(r);if(i)i=!1,s+=(gt.has(l)?"\\":"")+l;else if("\\"!==l){if("["===l){const[n,i,l,c]=ct(t,r);if(l){s+=n,o=o||i,r+=l-1,e=e||c;continue}}"*"!==l?"?"!==l?s+=vt(l):(s+=mt,e=!0):(s+=n&&"*"===t?wt:bt,e=!0)}else r===t.length-1?s+="\\\\":i=!0}return[s,ft(t),!!e,o]},P(yt,g);var $t=yt,kt=(t,e,n={})=>(it(e),!(!n.nocomment&&"#"===e.charAt(0))&&new Bt(e,n).match(t)),St=/^\*+([^+@!?\*\[\(]*)$/,Ot=t=>e=>!e.startsWith(".")&&e.endsWith(t),jt=t=>e=>e.endsWith(t),Mt=t=>(t=t.toLowerCase(),e=>!e.startsWith(".")&&e.toLowerCase().endsWith(t)),Et=t=>(t=t.toLowerCase(),e=>e.toLowerCase().endsWith(t)),xt=/^\*+\.\*+$/,Pt=t=>!t.startsWith(".")&&t.includes("."),Ct=t=>"."!==t&&".."!==t&&t.includes("."),Rt=/^\.\*+$/,Wt=t=>"."!==t&&".."!==t&&t.startsWith("."),Nt=/^\*+$/,zt=t=>0!==t.length&&!t.startsWith("."),At=t=>0!==t.length&&"."!==t&&".."!==t,Lt=/^\?+([^+@!?\*\[\(]*)?$/,Tt=([t,e=""])=>{const n=Ut([t]);return e?(e=e.toLowerCase(),t=>n(t)&&t.toLowerCase().endsWith(e)):n},Dt=([t,e=""])=>{const n=Ht([t]);return e?(e=e.toLowerCase(),t=>n(t)&&t.toLowerCase().endsWith(e)):n},Ft=([t,e=""])=>{const n=Ht([t]);return e?t=>n(t)&&t.endsWith(e):n},Gt=([t,e=""])=>{const n=Ut([t]);return e?t=>n(t)&&t.endsWith(e):n},Ut=([t])=>{const e=t.length;return t=>t.length===e&&!t.startsWith(".")},Ht=([t])=>{const e=t.length;return t=>t.length===e&&"."!==t&&".."!==t},It="object"==typeof process&&process?"object"==typeof process.env&&process.env&&process.env.__MINIMATCH_TESTING_PLATFORM__||process.platform:"posix";kt.sep="win32"===It?"\\":"/";var Zt=Symbol("globstar **");kt.GLOBSTAR=Zt,kt.filter=(t,e={})=>n=>kt(n,t,e);var _t=(t,e={})=>Object.assign({},t,e);kt.defaults=t=>{if(!t||"object"!=typeof t||!Object.keys(t).length)return kt;const e=kt;return Object.assign(((n,i,s={})=>e(n,i,_t(t,s))),{Minimatch:class extends e.Minimatch{constructor(e,n={}){super(e,_t(t,n))}static defaults(n){return e.defaults(_t(t,n)).Minimatch}},AST:class extends e.AST{constructor(e,n,i={}){super(e,n,_t(t,i))}static fromGlob(n,i={}){return e.AST.fromGlob(n,_t(t,i))}},unescape:(n,i={})=>e.unescape(n,_t(t,i)),escape:(n,i={})=>e.escape(n,_t(t,i)),filter:(n,i={})=>e.filter(n,_t(t,i)),defaults:n=>e.defaults(_t(t,n)),makeRe:(n,i={})=>e.makeRe(n,_t(t,i)),braceExpand:(n,i={})=>e.braceExpand(n,_t(t,i)),match:(n,i,s={})=>e.match(n,i,_t(t,s)),sep:e.sep,GLOBSTAR:Zt})};var Vt=(t,e={})=>(it(t),e.nobrace||!/\{(?:(?!\{).)*\}/.test(t)?[t]:(0,nt.default)(t));kt.braceExpand=Vt,kt.makeRe=(t,e={})=>new Bt(t,e).makeRe(),kt.match=(t,e,n={})=>{const i=new Bt(e,n);return t=t.filter((t=>i.match(t))),i.options.nonull&&!t.length&&t.push(e),t};var qt=/[?*]|[+@!]\(.*?\)|\[|\]/,Bt=class{options;set;pattern;windowsPathsNoEscape;nonegate;negate;comment;empty;preserveMultipleSlashes;partial;globSet;globParts;nocase;isWindows;platform;windowsNoMagicRoot;regexp;constructor(t,e={}){it(t),this.options=e=e||{},this.pattern=t,this.platform=e.platform||It,this.isWindows="win32"===this.platform,this.windowsPathsNoEscape=!!e.windowsPathsNoEscape||!1===e.allowWindowsEscape,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,"/")),this.preserveMultipleSlashes=!!e.preserveMultipleSlashes,this.regexp=null,this.negate=!1,this.nonegate=!!e.nonegate,this.comment=!1,this.empty=!1,this.partial=!!e.partial,this.nocase=!!this.options.nocase,this.windowsNoMagicRoot=void 0!==e.windowsNoMagicRoot?e.windowsNoMagicRoot:!(!this.isWindows||!this.nocase),this.globSet=[],this.globParts=[],this.set=[],this.make()}hasMagic(){if(this.options.magicalBraces&&this.set.length>1)return!0;for(const t of this.set)for(const e of t)if("string"!=typeof e)return!0;return!1}debug(...t){}make(){const t=this.pattern,e=this.options;if(!e.nocomment&&"#"===t.charAt(0))return void(this.comment=!0);if(!t)return void(this.empty=!0);this.parseNegate(),this.globSet=[...new Set(this.braceExpand())],e.debug&&(this.debug=(...t)=>console.error(...t)),this.debug(this.pattern,this.globSet);const n=this.globSet.map((t=>this.slashSplit(t)));this.globParts=this.preprocess(n),this.debug(this.pattern,this.globParts);let i=this.globParts.map((t=>{if(this.isWindows&&this.windowsNoMagicRoot){const e=!(""!==t[0]||""!==t[1]||"?"!==t[2]&&qt.test(t[2])||qt.test(t[3])),n=/^[a-z]:/i.test(t[0]);if(e)return[...t.slice(0,4),...t.slice(4).map((t=>this.parse(t)))];if(n)return[t[0],...t.slice(1).map((t=>this.parse(t)))]}return t.map((t=>this.parse(t)))}));if(this.debug(this.pattern,i),this.set=i.filter((t=>-1===t.indexOf(!1))),this.isWindows)for(let t=0;t<this.set.length;t++){const e=this.set[t];""===e[0]&&""===e[1]&&"?"===this.globParts[t][2]&&"string"==typeof e[3]&&/^[a-z]:$/i.test(e[3])&&(e[2]="?")}this.debug(this.pattern,this.set)}preprocess(t){if(this.options.noglobstar)for(let e=0;e<t.length;e++)for(let n=0;n<t[e].length;n++)"**"===t[e][n]&&(t[e][n]="*");const{optimizationLevel:e=1}=this.options;return e>=2?(t=this.firstPhasePreProcess(t),t=this.secondPhasePreProcess(t)):t=e>=1?this.levelOneOptimize(t):this.adjascentGlobstarOptimize(t),t}adjascentGlobstarOptimize(t){return t.map((t=>{let e=-1;for(;-1!==(e=t.indexOf("**",e+1));){let n=e;for(;"**"===t[n+1];)n++;n!==e&&t.splice(e,n-e)}return t}))}levelOneOptimize(t){return t.map((t=>0===(t=t.reduce(((t,e)=>{const n=t[t.length-1];return"**"===e&&"**"===n?t:".."===e&&n&&".."!==n&&"."!==n&&"**"!==n?(t.pop(),t):(t.push(e),t)}),[])).length?[""]:t))}levelTwoFileOptimize(t){Array.isArray(t)||(t=this.slashSplit(t));let e=!1;do{if(e=!1,!this.preserveMultipleSlashes){for(let n=1;n<t.length-1;n++){const i=t[n];1===n&&""===i&&""===t[0]||"."!==i&&""!==i||(e=!0,t.splice(n,1),n--)}"."!==t[0]||2!==t.length||"."!==t[1]&&""!==t[1]||(e=!0,t.pop())}let n=0;for(;-1!==(n=t.indexOf("..",n+1));){const i=t[n-1];i&&"."!==i&&".."!==i&&"**"!==i&&(e=!0,t.splice(n-1,2),n-=2)}}while(e);return 0===t.length?[""]:t}firstPhasePreProcess(t){let e=!1;do{e=!1;for(let n of t){let i=-1;for(;-1!==(i=n.indexOf("**",i+1));){let s=i;for(;"**"===n[s+1];)s++;s>i&&n.splice(i+1,s-i);const o=n[i+2],r=n[i+3];if(".."!==n[i+1])continue;if(!o||"."===o||".."===o||!r||"."===r||".."===r)continue;e=!0,n.splice(i,1);const l=n.slice(0);l[i]="**",t.push(l),i--}if(!this.preserveMultipleSlashes){for(let t=1;t<n.length-1;t++){const i=n[t];1===t&&""===i&&""===n[0]||"."!==i&&""!==i||(e=!0,n.splice(t,1),t--)}"."!==n[0]||2!==n.length||"."!==n[1]&&""!==n[1]||(e=!0,n.pop())}let s=0;for(;-1!==(s=n.indexOf("..",s+1));){const t=n[s-1];t&&"."!==t&&".."!==t&&"**"!==t&&(e=!0,n.splice(s-1,2,...1===s&&"**"===n[s+1]?["."]:[]),0===n.length&&n.push(""),s-=2)}}}while(e);return t}secondPhasePreProcess(t){for(let e=0;e<t.length-1;e++)for(let n=e+1;n<t.length;n++){const i=this.partsMatch(t[e],t[n],!this.preserveMultipleSlashes);i&&(t[e]=i,t[n]=[])}return t.filter((t=>t.length))}partsMatch(t,e,n=!1){let i=0,s=0,o=[],r="";for(;i<t.length&&s<e.length;)if(t[i]===e[s])o.push("b"===r?e[s]:t[i]),i++,s++;else if(n&&"**"===t[i]&&e[s]===t[i+1])o.push(t[i]),i++;else if(n&&"**"===e[s]&&t[i]===e[s+1])o.push(e[s]),s++;else if("*"!==t[i]||!e[s]||!this.options.dot&&e[s].startsWith(".")||"**"===e[s]){if("*"!==e[s]||!t[i]||!this.options.dot&&t[i].startsWith(".")||"**"===t[i])return!1;if("a"===r)return!1;r="b",o.push(e[s]),i++,s++}else{if("b"===r)return!1;r="a",o.push(t[i]),i++,s++}return t.length===e.length&&o}parseNegate(){if(this.nonegate)return;const t=this.pattern;let e=!1,n=0;for(let i=0;i<t.length&&"!"===t.charAt(i);i++)e=!e,n++;n&&(this.pattern=t.slice(n)),this.negate=e}matchOne(t,e,n=!1){const i=this.options;if(this.isWindows){const n="string"==typeof t[0]&&/^[a-z]:$/i.test(t[0]),i=!n&&""===t[0]&&""===t[1]&&"?"===t[2]&&/^[a-z]:$/i.test(t[3]),s="string"==typeof e[0]&&/^[a-z]:$/i.test(e[0]),o=i?3:n?0:void 0,r=!s&&""===e[0]&&""===e[1]&&"?"===e[2]&&"string"==typeof e[3]&&/^[a-z]:$/i.test(e[3])?3:s?0:void 0;if("number"==typeof o&&"number"==typeof r){const[n,i]=[t[o],e[r]];n.toLowerCase()===i.toLowerCase()&&(e[r]=n,r>o?e=e.slice(r):o>r&&(t=t.slice(o)))}}const{optimizationLevel:s=1}=this.options;s>=2&&(t=this.levelTwoFileOptimize(t)),this.debug("matchOne",this,{file:t,pattern:e}),this.debug("matchOne",t.length,e.length);for(var o=0,r=0,l=t.length,c=e.length;o<l&&r<c;o++,r++){this.debug("matchOne loop");var f=e[r],h=t[o];if(this.debug(e,f,h),!1===f)return!1;if(f===Zt){this.debug("GLOBSTAR",[e,f,h]);var u=o,a=r+1;if(a===c){for(this.debug("** at the end");o<l;o++)if("."===t[o]||".."===t[o]||!i.dot&&"."===t[o].charAt(0))return!1;return!0}for(;u<l;){var d=t[u];if(this.debug("\nglobstar while",t,u,e,a,d),this.matchOne(t.slice(u),e.slice(a),n))return this.debug("globstar found match!",u,l,d),!0;if("."===d||".."===d||!i.dot&&"."===d.charAt(0)){this.debug("dot detected!",t,u,e,a);break}this.debug("globstar swallow a segment, and continue"),u++}return!(!n||(this.debug("\n>>> no match, partial?",t,u,e,a),u!==l))}let s;if("string"==typeof f?(s=h===f,this.debug("string match",f,h,s)):(s=f.test(h),this.debug("pattern match",f,h,s)),!s)return!1}if(o===l&&r===c)return!0;if(o===l)return n;if(r===c)return o===l-1&&""===t[o];throw Error("wtf?")}braceExpand(){return Vt(this.pattern,this.options)}parse(t){it(t);const e=this.options;if("**"===t)return Zt;if(""===t)return"";let n,i=null;(n=t.match(Nt))?i=e.dot?At:zt:(n=t.match(St))?i=(e.nocase?e.dot?Et:Mt:e.dot?jt:Ot)(n[1]):(n=t.match(Lt))?i=(e.nocase?e.dot?Dt:Tt:e.dot?Ft:Gt)(n):(n=t.match(xt))?i=e.dot?Ct:Pt:(n=t.match(Rt))&&(i=Wt);const s=$t.fromGlob(t,this.options).toMMPattern();return i&&"object"==typeof s&&Reflect.defineProperty(s,"test",{value:i}),s}makeRe(){if(this.regexp||!1===this.regexp)return this.regexp;const t=this.set;if(!t.length)return this.regexp=!1,this.regexp;const e=this.options,n=e.noglobstar?"[^/]*?":e.dot?"(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?":"(?:(?!(?:\\/|^)\\.).)*?",i=new Set(e.nocase?["i"]:[]);let s=t.map((t=>{const e=t.map((t=>{if(t instanceof RegExp)for(const e of t.flags.split(""))i.add(e);return"string"==typeof t?(t=>t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"))(t):t===Zt?Zt:t._src}));return e.forEach(((t,i)=>{const s=e[i+1],o=e[i-1];t===Zt&&o!==Zt&&(void 0===o?void 0!==s&&s!==Zt?e[i+1]="(?:\\/|"+n+"\\/)?"+s:e[i]=n:void 0===s?e[i-1]=o+"(?:\\/|"+n+")?":s!==Zt&&(e[i-1]=o+"(?:\\/|\\/"+n+"\\/)"+s,e[i+1]=Zt))})),e.filter((t=>t!==Zt)).join("/")})).join("|");const[o,r]=t.length>1?["(?:",")"]:["",""];s="^"+o+s+r+"$",this.negate&&(s="^(?!"+s+").+$");try{this.regexp=RegExp(s,[...i].join(""))}catch(t){this.regexp=!1}return this.regexp}slashSplit(t){return this.preserveMultipleSlashes?t.split("/"):this.isWindows&&/^\/\/[^\/]+/.test(t)?["",...t.split(/\/+/)]:t.split(/\/+/)}match(t,e=this.partial){if(this.debug("match",t,this.pattern),this.comment)return!1;if(this.empty)return""===t;if("/"===t&&e)return!0;const n=this.options;this.isWindows&&(t=t.split("\\").join("/"));const i=this.slashSplit(t);this.debug(this.pattern,"split",i);const s=this.set;this.debug(this.pattern,"set",s);let o=i[i.length-1];if(!o)for(let t=i.length-2;!o&&t>=0;t--)o=i[t];for(let t=0;t<s.length;t++){const r=s[t];let l=i;if(n.matchBase&&1===r.length&&(l=[o]),this.matchOne(l,r,e))return!!n.flipNegate||!this.negate}return!n.flipNegate&&this.negate}static defaults(t){return kt.defaults(t).Minimatch}};function Jt(t){var e,n,i;return null!=(i=null==(n=null==(e=t.head)?void 0:e.querySelector('meta[name="csp-nonce"]'))?void 0:n.getAttribute("content"))?i:void 0}kt.AST=$t,kt.Minimatch=Bt,kt.escape=(t,{windowsPathsNoEscape:e=!1}={})=>e?t.replace(/[?*()[\]]/g,"[$&]"):t.replace(/[?*()[\]\\]/g,"\\$&"),kt.unescape=ft,((t,e)=>{for(var n in e)y(t,n,{get:e[n],enumerable:!0})})({},{err:()=>Kt,map:()=>Qt,ok:()=>Yt,unwrap:()=>te,unwrapErr:()=>ee});var Yt=t=>({isOk:!0,isErr:!1,value:t}),Kt=t=>({isOk:!1,isErr:!0,value:t});function Qt(t,e){if(t.isOk){const n=e(t.value);return n instanceof Promise?n.then((t=>Yt(t))):Yt(n)}if(t.isErr)return Kt(t.value);throw"should never get here"}var Xt,te=t=>{if(t.isOk)return t.value;throw t.value},ee=t=>{if(t.isErr)return t.value;throw t.value};function ne(){var t;const n=this.attachShadow({mode:"open"});if(void 0===Xt&&(Xt=null!=(t=function(t){if(!_)return;const e=new CSSStyleSheet;return e.replaceSync(t),e}(e))?t:null),Xt)V?n.adoptedStyleSheets.push(Xt):n.adoptedStyleSheets=[...n.adoptedStyleSheets,Xt];else if(!_){const t=document.createElement("style");t.innerHTML=e,n.prepend(t)}}var ie=new WeakMap,se=t=>"sc-"+t.p,oe=(t,e,...n)=>{let i=null,s=null,o=!1,r=!1;const l=[],c=e=>{for(let n=0;n<e.length;n++)i=e[n],Array.isArray(i)?c(i):null!=i&&"boolean"!=typeof i&&((o="function"!=typeof t&&!et(i))&&(i+=""),o&&r?l[l.length-1].v+=i:l.push(o?re(null,i):i),r=o)};if(c(n),e){e.key&&(s=e.key);{const t=e.className||e.class;t&&(e.class="object"!=typeof t?t:Object.keys(t).filter((e=>t[e])).join(" "))}}const f=re(t,null);return f.m=e,l.length>0&&(f.$=l),f.k=s,f},re=(t,e)=>({h:0,S:t,v:e,O:null,$:null,m:null,k:null}),le={},ce=t=>{const e=(t=>t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"))(t);return RegExp(`(^|[^@]|@(?!supports\\s+selector\\s*\\([^{]*?${e}))(${e}\\b)`,"g")};ce("::slotted"),ce(":host"),ce(":host-context");var fe,he=(t,e)=>null==t||et(t)?t:4&e?"false"!==t&&(""===t||!!t):2&e?"string"==typeof t?parseFloat(t):"number"==typeof t?t:NaN:1&e?t+"":t,ue=t=>{var e;return null==(e=A(t))?void 0:e.$hostElement$},ae=(t,e)=>{const n=ue(t);return{emit:t=>de(n,e,{bubbles:!0,composed:!0,cancelable:!0,detail:t})}},de=(t,e,n)=>{const i=I.ce(e,n);return t.dispatchEvent(i),i},pe=(t,e,n,i,s,o)=>{if(n===i)return;let r=T(t,e),l=e.toLowerCase();if("class"===e){const e=t.classList,s=ve(n);let o=ve(i);e.remove(...s.filter((t=>t&&!o.includes(t)))),e.add(...o.filter((t=>t&&!s.includes(t))))}else if("style"===e){for(const e in n)i&&null!=i[e]||(e.includes("-")?t.style.removeProperty(e):t.style[e]="");for(const e in i)n&&i[e]===n[e]||(e.includes("-")?t.style.setProperty(e,i[e]):t.style[e]=i[e])}else if("key"===e);else if(r||"o"!==e[0]||"n"!==e[1]){const l=et(i);if((r||l&&null!==i)&&!s)try{if(t.tagName.includes("-"))t[e]!==i&&(t[e]=i);else{const s=null==i?"":i;"list"===e?r=!1:null!=n&&t[e]==s||("function"==typeof t.__lookupSetter__(e)?t[e]=s:t.setAttribute(e,s))}}catch(t){}null==i||!1===i?!1===i&&""!==t.getAttribute(e)||t.removeAttribute(e):(!r||4&o||s)&&!l&&1===t.nodeType&&t.setAttribute(e,i=!0===i?"":i)}else if(e="-"===e[2]?e.slice(3):T(H,l)?l.slice(2):l[2]+e.slice(3),n||i){const s=e.endsWith(me);e=e.replace(be,""),n&&I.rel(t,e,n,s),i&&I.ael(t,e,i,s)}},ge=/\s/,ve=t=>("object"==typeof t&&t&&"baseVal"in t&&(t=t.baseVal),t&&"string"==typeof t?t.split(ge):[]),me="Capture",be=RegExp(me+"$"),we=(t,e,n)=>{const i=11===e.O.nodeType&&e.O.host?e.O.host:e.O,s=t&&t.m||{},o=e.m||{};for(const t of ye(Object.keys(s)))t in o||pe(i,t,s[t],void 0,n,e.h);for(const t of ye(Object.keys(o)))pe(i,t,s[t],o[t],n,e.h)};function ye(t){return t.includes("ref")?[...t.filter((t=>"ref"!==t)),"ref"]:t}var $e=!1,ke=(t,e,n)=>{const i=e.$[n];let s,o,r=0;if(null!==i.v)s=i.O=H.document.createTextNode(i.v);else{if($e||($e="svg"===i.S),!H.document)throw Error("You are trying to render a Stencil component in an environment that doesn't support the DOM. Make sure to populate the [`window`](https://developer.mozilla.org/en-US/docs/Web/API/Window/window) object before rendering a component.");if(s=i.O=H.document.createElementNS($e?"http://www.w3.org/2000/svg":"http://www.w3.org/1999/xhtml",i.S),$e&&"foreignObject"===i.S&&($e=!1),we(null,i,$e),i.$){const e="template"===i.S?s.content:s;for(r=0;r<i.$.length;++r)o=ke(t,i,r),o&&e.appendChild(o)}"svg"===i.S?$e=!1:"foreignObject"===s.tagName&&($e=!0)}return s["s-hn"]=fe,s},Se=(t,e,n,i,s,o)=>{let r,l=t;for(l.shadowRoot&&l.tagName===fe&&(l=l.shadowRoot),"template"===n.S&&(l=l.content);s<=o;++s)i[s]&&(r=ke(null,n,s),r&&(i[s].O=r,Ee(l,r,e)))},Oe=(t,e,n)=>{for(let i=e;i<=n;++i){const e=t[i];if(e){const t=e.O;t&&t.remove()}}},je=(t,e,n=!1)=>t.S===e.S&&(n?(n&&!t.k&&e.k&&(t.k=e.k),!0):t.k===e.k),Me=(t,e,n=!1)=>{const i=e.O=t.O,s=t.$,o=e.$,r=e.S,l=e.v;null===l?(we(t,e,$e="svg"===r||"foreignObject"!==r&&$e),null!==s&&null!==o?((t,e,n,i,s=!1)=>{let o,r,l=0,c=0,f=0,h=0,u=e.length-1,a=e[0],d=e[u],p=i.length-1,g=i[0],v=i[p];const m="template"===n.S?t.content:t;for(;l<=u&&c<=p;)if(null==a)a=e[++l];else if(null==d)d=e[--u];else if(null==g)g=i[++c];else if(null==v)v=i[--p];else if(je(a,g,s))Me(a,g,s),a=e[++l],g=i[++c];else if(je(d,v,s))Me(d,v,s),d=e[--u],v=i[--p];else if(je(a,v,s))Me(a,v,s),Ee(m,a.O,d.O.nextSibling),a=e[++l],v=i[--p];else if(je(d,g,s))Me(d,g,s),Ee(m,d.O,a.O),d=e[--u],g=i[++c];else{for(f=-1,h=l;h<=u;++h)if(e[h]&&null!==e[h].k&&e[h].k===g.k){f=h;break}f>=0?(r=e[f],r.S!==g.S?o=ke(e&&e[c],n,f):(Me(r,g,s),e[f]=void 0,o=r.O),g=i[++c]):(o=ke(e&&e[c],n,c),g=i[++c]),o&&Ee(a.O.parentNode,o,a.O)}l>u?Se(t,null==i[p+1]?null:i[p+1].O,n,i,c,p):c>p&&Oe(e,l,u)})(i,s,e,o,n):null!==o?(null!==t.v&&(i.textContent=""),Se(i,null,e,o,0,o.length-1)):!n&&null!==s&&Oe(s,0,s.length-1),$e&&"svg"===r&&($e=!1)):t.v!==l&&(i.data=l)},Ee=(t,e,n)=>null==t?void 0:t.insertBefore(e,n),xe=(t,e)=>{if(e&&!t.j&&e["s-p"]){const n=e["s-p"].push(new Promise((i=>t.j=()=>{e["s-p"].splice(n-1,1),i()})))}},Pe=(t,e)=>{if(t.h|=16,4&t.h)return void(t.h|=512);xe(t,t.M);const n=()=>Ce(t,e);if(!e)return tt(n);queueMicrotask((()=>{n()}))},Ce=(t,e)=>{const n=t.$hostElement$,i=t.l;if(!i)throw Error(`Can't render component <${n.tagName.toLowerCase()} /> with invalid Stencil runtime! Make sure this imported component is compiled with a \`externalRuntime: true\` flag. For more information, please refer to https://stenciljs.com/docs/custom-elements#externalruntime`);let s;return e?(t.P.length&&t.P.forEach((t=>t(n))),s=Te(i,"componentWillLoad",void 0,n)):s=Te(i,"componentWillUpdate",void 0,n),s=Re(s,(()=>Te(i,"componentWillRender",void 0,n))),Re(s,(()=>Ne(t,i,e)))},Re=(t,e)=>We(t)?t.then(e).catch((t=>{console.error(t),e()})):e(),We=t=>t instanceof Promise||t&&t.then&&"function"==typeof t.then,Ne=async(t,e,n)=>{var i;const s=t.$hostElement$,o=s["s-rc"];n&&(t=>{const e=t.i,n=t.$hostElement$,i=e.h,s=((t,e)=>{var n,i,s;const o=se(e),r=G.get(o);if(!H.document)return o;if(t=11===t.nodeType?t:H.document,r)if("string"==typeof r){let s,l=ie.get(t=t.head||t);if(l||ie.set(t,l=new Set),!l.has(o)){s=H.document.createElement("style"),s.innerHTML=r;const c=null!=(n=I.C)?n:Jt(H.document);if(null!=c&&s.setAttribute("nonce",c),!(1&e.h))if("HEAD"===t.nodeName){const e=t.querySelectorAll("link[rel=preconnect]"),n=e.length>0?e[e.length-1].nextSibling:t.querySelector("style");t.insertBefore(s,(null==n?void 0:n.parentNode)===t?n:null)}else if("host"in t)if(_){const e=new(null!=(i=t.defaultView)?i:t.ownerDocument.defaultView).CSSStyleSheet;e.replaceSync(r),V?t.adoptedStyleSheets.unshift(e):t.adoptedStyleSheets=[e,...t.adoptedStyleSheets]}else{const e=t.querySelector("style");e?e.innerHTML=r+e.innerHTML:t.prepend(s)}else t.append(s);1&e.h&&t.insertBefore(s,null),4&e.h&&(s.innerHTML+=U),l&&l.add(o)}}else{let e=ie.get(t);if(e||ie.set(t,e=new Set),!e.has(o)){const n=null!=(s=t.defaultView)?s:t.ownerDocument.defaultView;let i;if(r.constructor===n.CSSStyleSheet)i=r;else{i=new n.CSSStyleSheet;for(let t=0;t<r.cssRules.length;t++)i.insertRule(r.cssRules[t].cssText,t)}V?t.adoptedStyleSheets.push(i):t.adoptedStyleSheets=[...t.adoptedStyleSheets,i],e.add(o)}}return o})(n.shadowRoot?n.shadowRoot:n.getRootNode(),e);10&i&&(n["s-sc"]=s,n.classList.add(s+"-h"))})(t);ze(t,e,s,n),o&&(o.map((t=>t())),s["s-rc"]=void 0);{const e=null!=(i=s["s-p"])?i:[],n=()=>Ae(t);0===e.length?n():(Promise.all(e).then(n),t.h|=4,e.length=0)}},ze=(t,e,n,i)=>{try{e=e.render(),t.h&=-17,t.h|=2,((t,e,n=!1)=>{const i=t.$hostElement$,s=t.R||re(null,null),o=(t=>t&&t.S===le)(e)?e:oe(null,null,e);if(fe=i.tagName,n&&o.m)for(const t of Object.keys(o.m))i.hasAttribute(t)&&!["key","ref","style","class"].includes(t)&&(o.m[t]=i[t]);o.S=null,o.h|=4,t.R=o,o.O=s.O=i.shadowRoot||i,Me(s,o,n)})(t,e,i)}catch(e){D(e,t.$hostElement$)}return null},Ae=t=>{const e=t.$hostElement$,n=t.l,i=t.M;Te(n,"componentDidRender",void 0,e),64&t.h?Te(n,"componentDidUpdate",void 0,e):(t.h|=64,De(e),Te(n,"componentDidLoad",void 0,e),t.W(e),i||Le()),t.j&&(t.j(),t.j=void 0),512&t.h&&X((()=>Pe(t,!1))),t.h&=-517},Le=()=>{X((()=>de(H,"appload",{detail:{namespace:"feedlog-toolkit"}})))},Te=(t,e,n,i)=>{if(t&&t[e])try{return t[e](n)}catch(t){D(t,i)}},De=t=>t.classList.add("hydrated"),Fe=(t,e,n,i)=>{const s=A(t);if(!s)return;if(!s)throw Error(`Couldn't find host element for "${i.p}" as it is unknown to this Stencil runtime. This usually happens when integrating a 3rd party Stencil component with another Stencil component or application. Please reach out to the maintainers of the 3rd party Stencil component or report this on the Stencil Discord server (https://chat.stenciljs.com) or comment on this similar [GitHub issue](https://github.com/stenciljs/core/issues/5457).`);const o=s.o.get(e),r=s.h,l=s.l;if(n=he(n,i.t[e][0]),!(8&r&&void 0!==o||n===o||Number.isNaN(o)&&Number.isNaN(n)||(s.o.set(e,n),2!=(18&r)))){if(l.componentShouldUpdate&&!1===l.componentShouldUpdate(n,o,e))return;Pe(s,!1)}},Ge=(t,e,n)=>{var i,s;const o=t.prototype;if(e.t){const r=Object.entries(null!=(i=e.t)?i:{});if(r.map((([t,[i]])=>{if(31&i||2&n&&32&i){const{get:s,set:r}=Object.getOwnPropertyDescriptor(o,t)||{};s&&(e.t[t][0]|=2048),r&&(e.t[t][0]|=4096),(1&n||!s)&&Object.defineProperty(o,t,{get(){{if(!(2048&e.t[t][0]))return((t,e)=>A(this).o.get(e))(0,t);const n=A(this),i=n?n.l:o;if(!i)return;return i[t]}},configurable:!0,enumerable:!0}),Object.defineProperty(o,t,{set(s){const o=A(this);if(o){if(r)return void 0===(32&i?this[t]:o.$hostElement$[t])&&o.o.get(t)&&(s=o.o.get(t)),r.call(this,he(s,i)),void Fe(this,t,s=32&i?this[t]:o.$hostElement$[t],e);{if(!(1&n&&4096&e.t[t][0]))return Fe(this,t,s,e),void(1&n&&!o.l&&o.P.push((()=>{4096&e.t[t][0]&&o.l[t]!==o.o.get(t)&&(o.l[t]=s)})));const r=()=>{const n=o.l[t];!o.o.get(t)&&n&&o.o.set(t,n),o.l[t]=he(s,i),Fe(this,t,o.l[t],e)};o.l?r():o.P.push((()=>{r()}))}}}})}})),1&n){const n=new Map;o.attributeChangedCallback=function(t,i,s){I.jmp((()=>{var l;const c=n.get(t),f=A(this);if(this.hasOwnProperty(c)&&(s=this[c],delete this[c]),o.hasOwnProperty(c)&&"number"==typeof this[c]&&this[c]==s)return;if(null==c){const n=null==f?void 0:f.h;if(f&&n&&!(8&n)&&s!==i){const o=f.l,r=null==(l=e.N)?void 0:l[t];null==r||r.forEach((e=>{const[[r,l]]=Object.entries(e);null!=o[r]&&(128&n||1&l)&&o[r].call(o,s,i,t)}))}return}const h=r.find((([t])=>t===c));h&&4&h[1][0]&&(s=null!==s&&"false"!==s);const u=Object.getOwnPropertyDescriptor(o,c);s==this[c]||u.get&&!u.set||(this[c]=s)}))},t.observedAttributes=Array.from(new Set([...Object.keys(null!=(s=e.N)?s:{}),...r.filter((([t,e])=>31&e[0])).map((([t,e])=>{const i=e[1]||t;return n.set(i,t),i}))]))}}return t},Ue=(t,e)=>{Te(t,"connectedCallback",void 0,e)},He=(t,e)=>{Te(t,"disconnectedCallback",void 0,e||t)},Ie=(t,e={})=>{var n;if(!H.document)return void console.warn("Stencil: No document found. Skipping bootstrapping lazy components.");const i=[],s=e.exclude||[],o=H.customElements,r=H.document.head,l=r.querySelector("meta[charset]"),c=H.document.createElement("style"),f=[];let h,u=!0;Object.assign(I,e),I.u=new URL(e.resourcesUrl||"./",H.document.baseURI).href;let a=!1;if(t.map((t=>{t[1].map((e=>{const n={h:e[0],p:e[1],t:e[2],A:e[3]};4&n.h&&(a=!0),n.t=e[2];const r=n.p,l=class extends HTMLElement{constructor(t){if(super(t),this.hasRegisteredEventListeners=!1,((t,e)=>{const n={h:0,$hostElement$:t,i:e,o:new Map,L:new Map};n.T=new Promise((t=>n.W=t)),t["s-p"]=[],t["s-rc"]=[],n.P=[];const i=n;t.__stencil__getHostRef=()=>i})(t=this,n),1&n.h)if(t.shadowRoot){if("open"!==t.shadowRoot.mode)throw Error(`Unable to re-use existing shadow root for ${n.p}! Mode is set to ${t.shadowRoot.mode} but Stencil only supports open shadow roots.`)}else ne.call(t,n)}connectedCallback(){A(this)&&(this.hasRegisteredEventListeners||(this.hasRegisteredEventListeners=!0),h&&(clearTimeout(h),h=null),u?f.push(this):I.jmp((()=>(t=>{if(!(1&I.h)){const e=A(t);if(!e)return;const n=e.i,i=()=>{};if(1&e.h)(null==e?void 0:e.l)?Ue(e.l,t):(null==e?void 0:e.T)&&e.T.then((()=>Ue(e.l,t)));else{e.h|=1;{let n=t;for(;n=n.parentNode||n.host;)if(n["s-p"]){xe(e,e.M=n);break}}n.t&&Object.entries(n.t).map((([e,[n]])=>{if(31&n&&e in t&&t[e]!==Object.prototype[e]){const n=t[e];delete t[e],t[e]=n}})),(async(t,e,n)=>{let i;if(!(32&e.h)){if(e.h|=32,n.D){const s=((t,e)=>{const n=t.p.replace(/-/g,"_"),i=t.D;if(!i)return;const s=F.get(i);return s?s[n]:import(`./${i}.entry.js`).then((t=>(F.set(i,t),t[n])),(t=>{D(t,e.$hostElement$)}))
|
|
2
|
+
/*!__STENCIL_STATIC_IMPORT_SWITCH__*/})(n,e);if(s&&"then"in s){const t=()=>{};i=await s,t()}else i=s;if(!i)throw Error(`Constructor for "${n.p}#${e.F}" was not found`);i.isProxied||(Ge(i,n,2),i.isProxied=!0);const o=()=>{};e.h|=8;try{new i(e)}catch(e){D(e,t)}e.h&=-9,o(),Ue(e.l,t)}else i=t.constructor,customElements.whenDefined(t.localName).then((()=>e.h|=128));if(i&&i.style){let t;"string"==typeof i.style&&(t=i.style);const e=se(n);if(!G.has(e)){const i=()=>{};((t,e,n)=>{let i=G.get(t);_&&n?(i=i||new CSSStyleSheet,"string"==typeof i?i=e:i.replaceSync(e)):i=e,G.set(t,i)})(e,t,!!(1&n.h)),i()}}}const s=e.M,o=()=>Pe(e,!0);s&&s["s-rc"]?s["s-rc"].push(o):o()})(t,e,n)}i()}})(this))))}disconnectedCallback(){I.jmp((()=>(async t=>{if(!(1&I.h)){const e=A(t);(null==e?void 0:e.l)?He(e.l,t):(null==e?void 0:e.T)&&e.T.then((()=>He(e.l,t)))}ie.has(t)&&ie.delete(t),t.shadowRoot&&ie.has(t.shadowRoot)&&ie.delete(t.shadowRoot)})(this))),I.raf((()=>{var t;const e=A(this);if(!e)return;const n=f.findIndex((t=>t===this));n>-1&&f.splice(n,1),(null==(t=null==e?void 0:e.R)?void 0:t.O)instanceof Node&&!e.R.O.isConnected&&delete e.R.O}))}componentOnReady(){var t;return null==(t=A(this))?void 0:t.T}};n.D=t[0],s.includes(r)||o.get(r)||(i.push(r),o.define(r,Ge(l,n,1)))}))})),i.length>0&&(a&&(c.textContent+=U),c.textContent+=i.sort()+"{visibility:hidden}.hydrated{visibility:inherit}",c.innerHTML.length)){c.setAttribute("data-styles","");const t=null!=(n=I.C)?n:Jt(H.document);null!=t&&c.setAttribute("nonce",t),r.insertBefore(c,l?l.nextSibling:r.firstChild)}u=!1,f.length?f.map((t=>t.connectedCallback())):I.jmp((()=>h=setTimeout(Le,30)))},Ze=t=>I.C=t;export{le as H,ue as a,Ie as b,ae as c,t as g,oe as h,Z as p,L as r,Ze as s}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@feedlog-ai/webcomponents",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.25",
|
|
4
4
|
"description": "Stencil web components for Feedlog Toolkit - Data visualization components",
|
|
5
5
|
"main": "./dist/index.cjs.js",
|
|
6
6
|
"module": "./dist/index.js",
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
"clean": "rm -rf dist loader"
|
|
60
60
|
},
|
|
61
61
|
"dependencies": {
|
|
62
|
-
"@feedlog-ai/core": "^0.0.
|
|
62
|
+
"@feedlog-ai/core": "^0.0.25",
|
|
63
63
|
"dompurify": "^3.3.1",
|
|
64
64
|
"marked": "^17.0.2"
|
|
65
65
|
},
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{t as e,p as o,H as t,c as s,h as d,a as r}from"./index.js";import{d as i}from"./p-Chc3XZ5Y.js";import{d as a}from"./p-DMdb-G26.js";import{d as l}from"./p-BBPFf6g7.js";import{d as n}from"./p-BR3ookRG.js";const c=o(class extends t{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.feedlogUpvote=s(this,"feedlogUpvote"),this.feedlogLoadMore=s(this,"feedlogLoadMore"),this.issues=[],this.maxWidth="42rem",this.theme="light",this.loading=!1,this.error=null,this.hasMore=!1,this.isLoadingMore=!1,this.currentTheme="light",this.handleUpvote=e=>{e.stopPropagation(),this.feedlogUpvote.emit(e.detail)},this.handleLoadMore=()=>{this.feedlogLoadMore.emit()}}componentWillLoad(){this.currentTheme=this.theme}renderErrorIcon(){return d("svg",{class:"error-icon",xmlns:"http://www.w3.org/2000/svg",width:"48",height:"48",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"},d("circle",{cx:"12",cy:"12",r:"10"}),d("line",{x1:"12",y1:"8",x2:"12",y2:"12"}),d("line",{x1:"12",y1:"16",x2:"12.01",y2:"16"}))}renderIssuesList(){var e,o;return d("feedlog-issues-list",{issues:this.issues,theme:this.currentTheme,getIssueUrl:this.getIssueUrl,emptyStateTitle:null!==(e=this.emptyStateTitle)&&void 0!==e?e:"No updates yet",emptyStateMessage:null!==(o=this.emptyStateMessage)&&void 0!==o?o:"Check back later for new updates.",onFeedlogUpvote:e=>this.handleUpvote(e)})}render(){return d(r,{key:"812719c5d6f25108834d1a422dee280c18033e36",class:"dark"===this.currentTheme?"dark":""},d("div",{key:"1e415969878bad8fb14ea9e648d2c2d2e0d492a1",class:"issues-container",style:{maxWidth:this.maxWidth}},(this.heading||this.subtitle)&&d("header",{key:"5bf1308396ff3bc04a57763317fa71a34d48cc95",class:"issues-header"},d("div",{key:"19494458a1bcd11c3d91c08e98887f9d6ed33314",class:"header-content"},this.heading&&d("h1",{key:"f89bd679a9dd9262c93573ef0bfbbb23bd892a87",class:"issues-title"},this.heading),this.subtitle&&d("p",{key:"2bcc73dfb95d7ae8971004522fe44cca5128701b",class:"issues-subtitle"},this.subtitle))),this.loading&&d("div",{key:"85c06c80b624cd16d532bea5f0ad6fb7cc06f692",class:"loading-state",role:"status","aria-label":"Loading issues"},d("div",{key:"766cd9e7c18586f937a1b864e7bcfce60fe79707",class:"loading-skeletons"},[1,2,3].map((e=>d("div",{key:e,class:"skeleton-card"},d("div",{class:"skeleton-content"},d("div",{class:"skeleton-header"},d("div",{class:"skeleton-badge"}),d("div",{class:"skeleton-timestamp"})),d("div",{class:"skeleton-main"},d("div",{class:"skeleton-title"}),d("div",{class:"skeleton-body"},d("div",{class:"skeleton-line"}),d("div",{class:"skeleton-line short"})),d("div",{class:"skeleton-repo"})),d("div",{class:"skeleton-footer"},d("div",{class:"skeleton-upvote"})))))))),this.error&&d("div",{key:"5ca08a9ddc95b4ef59d6c776a24e08b5ac65c0b3",class:"error-state",role:"alert"},d("div",{key:"93218f816564cff58f591b53d1aad6b6bc8a1c64",class:"error-state-content"},this.renderErrorIcon(),d("h2",{key:"f141f75b92164af3f4d139a17937b0533641bcc0",class:"error-state-title"},"Something went wrong"),d("p",{key:"61225c7f4f46944787d4a6448386c8209cdaf74c",class:"error-state-message"},this.error))),!this.loading&&!this.error&&d("div",{key:"5ac699f4c5d0e5b5d20f1546efe24f80cba70748"},this.renderIssuesList(),this.hasMore&&d("div",{key:"9ad22c48dac0d8874dfae9735c850b2ca52836e7",class:"load-more-container"},d("feedlog-button",{key:"de55c05ca8b80ec5df98051653ca135874edc98b",onFeedlogClick:this.handleLoadMore,disabled:this.isLoadingMore,variant:"outline"},this.isLoadingMore?"Loading...":"Load More Issues")))))}static get style(){return":host{display:block;font-family:ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, 'Liberation Mono', monospace;--feedlog-background:#ffffff;--feedlog-foreground:oklch(0.145 0 0);--feedlog-card:#ffffff;--feedlog-card-foreground:oklch(0.145 0 0);--feedlog-muted:#ececf0;--feedlog-muted-foreground:#717182;--feedlog-border:rgba(0, 0, 0, 0.1);--feedlog-accent-color:#2563eb;--feedlog-destructive:#d4183d;--feedlog-blue-400:oklch(0.707 0.165 254.624);--feedlog-blue-600:oklch(0.546 0.245 262.881);--feedlog-blue-100:oklch(0.932 0.032 255.585);--feedlog-red-100:#fce7f3;--feedlog-red-400:#f472b6;--feedlog-red-600:#db2777;--feedlog-radius:0.625rem;--feedlog-gap:0.5rem;--feedlog-padding:2rem;--feedlog-shadow:0 1px 3px 0 rgba(0, 0, 0, 0.08), 0 1px 2px -1px rgba(0, 0, 0, 0.08)}:host(.dark){--feedlog-background:oklch(0.18 0.01 260);--feedlog-foreground:oklch(0.985 0 0);--feedlog-card:oklch(0.24 0.01 260);--feedlog-card-foreground:oklch(0.985 0 0);--feedlog-muted:oklch(0.32 0.01 260);--feedlog-muted-foreground:oklch(0.72 0.02 260);--feedlog-border:oklch(0.34 0.01 260);--feedlog-accent-color:#3b82f6;--feedlog-destructive:oklch(0.396 0.141 25.723);--feedlog-blue-400:oklch(0.707 0.165 254.624);--feedlog-blue-600:oklch(0.546 0.245 262.881);--feedlog-blue-900-30:color-mix(in oklab, oklch(0.379 0.146 265.522) 30%, transparent);--feedlog-red-900-30:color-mix(in oklab, oklch(0.396 0.141 25.723) 30%, transparent);--feedlog-shadow:0 1px 3px 0 rgba(0, 0, 0, 0.3)}.issues-container{min-height:100vh;background-color:var(--feedlog-background);padding:var(--feedlog-padding);margin:0 auto}.issues-header{margin-bottom:1.5rem;display:flex;align-items:flex-start;justify-content:space-between}.header-content{flex:1}.issues-title{color:var(--feedlog-foreground);margin:0 0 0.25rem 0;font-size:1.5rem;font-weight:500;line-height:1.5}.issues-subtitle{color:var(--feedlog-muted-foreground);font-size:0.875rem;margin:0}.loading-state{padding:0}.loading-skeletons{display:flex;flex-direction:column;gap:var(--feedlog-gap)}.skeleton-card{background-color:var(--feedlog-card);border:1px solid var(--feedlog-border);border-radius:var(--feedlog-radius);box-shadow:var(--feedlog-shadow);position:relative;overflow:hidden}.skeleton-card::before{content:'';position:absolute;left:0;top:0;bottom:0;width:3px;background:var(--feedlog-muted)}.skeleton-content{padding:1.25rem;padding-left:calc(1.25rem + 3px);display:flex;flex-direction:column;gap:0.875rem}.skeleton-header{display:flex;align-items:center;justify-content:space-between;gap:0.75rem}.skeleton-badge{width:4.5rem;height:1.25rem;border-radius:0.375rem;background-color:var(--feedlog-muted);animation:skeleton-pulse 1.5s ease-in-out infinite}.skeleton-timestamp{width:3rem;height:0.75rem;border-radius:0.25rem;background-color:var(--feedlog-muted);animation:skeleton-pulse 1.5s ease-in-out infinite 0.2s}.skeleton-main{display:flex;flex-direction:column;gap:0.5rem}.skeleton-title{height:0.9375rem;border-radius:0.25rem;background-color:var(--feedlog-muted);animation:skeleton-pulse 1.5s ease-in-out infinite 0.1s;width:85%}.skeleton-body{display:flex;flex-direction:column;gap:0.375rem}.skeleton-line{height:0.8125rem;border-radius:0.25rem;background-color:var(--feedlog-muted);animation:skeleton-pulse 1.5s ease-in-out infinite 0.15s;width:100%}.skeleton-line.short{width:70%}.skeleton-repo{width:6rem;height:0.75rem;border-radius:0.25rem;background-color:var(--feedlog-muted);animation:skeleton-pulse 1.5s ease-in-out infinite 0.25s}.skeleton-footer{display:flex;justify-content:flex-end}.skeleton-upvote{width:2.5rem;height:2rem;border-radius:0.5rem;background-color:var(--feedlog-muted);animation:skeleton-pulse 1.5s ease-in-out infinite 0.3s}@keyframes skeleton-pulse{0%,100%{opacity:1}50%{opacity:0.5}}.error-state{display:flex;align-items:center;justify-content:center;padding:3rem 2rem;min-height:12rem}.error-state-content{display:flex;flex-direction:column;align-items:center;text-align:center;max-width:20rem;padding:2rem}.error-icon{color:var(--feedlog-muted-foreground);opacity:0.8;margin-bottom:1rem}.error-state-title{margin:0 0 0.5rem 0;font-size:1.125rem;font-weight:600;color:var(--feedlog-foreground);line-height:1.4}.error-state-message{margin:0 0 1.25rem 0;font-size:0.875rem;color:var(--feedlog-muted-foreground);line-height:1.5}.load-more-container{display:flex;justify-content:center;padding:2rem 0;gap:1rem}"}},[1,"feedlog-issues",{issues:[16],maxWidth:[1,"max-width"],theme:[1025],heading:[1],subtitle:[1],emptyStateTitle:[1,"empty-state-title"],emptyStateMessage:[1,"empty-state-message"],loading:[4],error:[1],hasMore:[4,"has-more"],isLoadingMore:[4,"is-loading-more"],getIssueUrl:[16],currentTheme:[32]}]);function f(){"undefined"!=typeof customElements&&["feedlog-issues","feedlog-badge","feedlog-button","feedlog-issue","feedlog-issues-list"].forEach((o=>{switch(o){case"feedlog-issues":customElements.get(e(o))||customElements.define(e(o),c);break;case"feedlog-badge":customElements.get(e(o))||i();break;case"feedlog-button":customElements.get(e(o))||a();break;case"feedlog-issue":customElements.get(e(o))||l();break;case"feedlog-issues-list":customElements.get(e(o))||n()}}))}f();export{c as F,f as d}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as e,c as o,h as t,H as s}from"./p-rs_66Oq4.js";const r=class{constructor(t){e(this,t),this.feedlogUpvote=o(this,"feedlogUpvote"),this.feedlogLoadMore=o(this,"feedlogLoadMore"),this.issues=[],this.maxWidth="42rem",this.theme="light",this.loading=!1,this.error=null,this.hasMore=!1,this.isLoadingMore=!1,this.currentTheme="light",this.handleUpvote=e=>{e.stopPropagation(),this.feedlogUpvote.emit(e.detail)},this.handleLoadMore=()=>{this.feedlogLoadMore.emit()}}componentWillLoad(){this.currentTheme=this.theme}renderErrorIcon(){return t("svg",{class:"error-icon",xmlns:"http://www.w3.org/2000/svg",width:"48",height:"48",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"},t("circle",{cx:"12",cy:"12",r:"10"}),t("line",{x1:"12",y1:"8",x2:"12",y2:"12"}),t("line",{x1:"12",y1:"16",x2:"12.01",y2:"16"}))}renderIssuesList(){var e,o;return t("feedlog-issues-list",{issues:this.issues,theme:this.currentTheme,getIssueUrl:this.getIssueUrl,emptyStateTitle:null!==(e=this.emptyStateTitle)&&void 0!==e?e:"No updates yet",emptyStateMessage:null!==(o=this.emptyStateMessage)&&void 0!==o?o:"Check back later for new updates.",onFeedlogUpvote:e=>this.handleUpvote(e)})}render(){return t(s,{key:"812719c5d6f25108834d1a422dee280c18033e36",class:"dark"===this.currentTheme?"dark":""},t("div",{key:"1e415969878bad8fb14ea9e648d2c2d2e0d492a1",class:"issues-container",style:{maxWidth:this.maxWidth}},(this.heading||this.subtitle)&&t("header",{key:"5bf1308396ff3bc04a57763317fa71a34d48cc95",class:"issues-header"},t("div",{key:"19494458a1bcd11c3d91c08e98887f9d6ed33314",class:"header-content"},this.heading&&t("h1",{key:"f89bd679a9dd9262c93573ef0bfbbb23bd892a87",class:"issues-title"},this.heading),this.subtitle&&t("p",{key:"2bcc73dfb95d7ae8971004522fe44cca5128701b",class:"issues-subtitle"},this.subtitle))),this.loading&&t("div",{key:"85c06c80b624cd16d532bea5f0ad6fb7cc06f692",class:"loading-state",role:"status","aria-label":"Loading issues"},t("div",{key:"766cd9e7c18586f937a1b864e7bcfce60fe79707",class:"loading-skeletons"},[1,2,3].map((e=>t("div",{key:e,class:"skeleton-card"},t("div",{class:"skeleton-content"},t("div",{class:"skeleton-header"},t("div",{class:"skeleton-badge"}),t("div",{class:"skeleton-timestamp"})),t("div",{class:"skeleton-main"},t("div",{class:"skeleton-title"}),t("div",{class:"skeleton-body"},t("div",{class:"skeleton-line"}),t("div",{class:"skeleton-line short"})),t("div",{class:"skeleton-repo"})),t("div",{class:"skeleton-footer"},t("div",{class:"skeleton-upvote"})))))))),this.error&&t("div",{key:"5ca08a9ddc95b4ef59d6c776a24e08b5ac65c0b3",class:"error-state",role:"alert"},t("div",{key:"93218f816564cff58f591b53d1aad6b6bc8a1c64",class:"error-state-content"},this.renderErrorIcon(),t("h2",{key:"f141f75b92164af3f4d139a17937b0533641bcc0",class:"error-state-title"},"Something went wrong"),t("p",{key:"61225c7f4f46944787d4a6448386c8209cdaf74c",class:"error-state-message"},this.error))),!this.loading&&!this.error&&t("div",{key:"5ac699f4c5d0e5b5d20f1546efe24f80cba70748"},this.renderIssuesList(),this.hasMore&&t("div",{key:"9ad22c48dac0d8874dfae9735c850b2ca52836e7",class:"load-more-container"},t("feedlog-button",{key:"de55c05ca8b80ec5df98051653ca135874edc98b",onFeedlogClick:this.handleLoadMore,disabled:this.isLoadingMore,variant:"outline"},this.isLoadingMore?"Loading...":"Load More Issues")))))}};r.style=":host{display:block;font-family:ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, 'Liberation Mono', monospace;--feedlog-background:#ffffff;--feedlog-foreground:oklch(0.145 0 0);--feedlog-card:#ffffff;--feedlog-card-foreground:oklch(0.145 0 0);--feedlog-muted:#ececf0;--feedlog-muted-foreground:#717182;--feedlog-border:rgba(0, 0, 0, 0.1);--feedlog-accent-color:#2563eb;--feedlog-destructive:#d4183d;--feedlog-blue-400:oklch(0.707 0.165 254.624);--feedlog-blue-600:oklch(0.546 0.245 262.881);--feedlog-blue-100:oklch(0.932 0.032 255.585);--feedlog-red-100:#fce7f3;--feedlog-red-400:#f472b6;--feedlog-red-600:#db2777;--feedlog-radius:0.625rem;--feedlog-gap:0.5rem;--feedlog-padding:2rem;--feedlog-shadow:0 1px 3px 0 rgba(0, 0, 0, 0.08), 0 1px 2px -1px rgba(0, 0, 0, 0.08)}:host(.dark){--feedlog-background:oklch(0.18 0.01 260);--feedlog-foreground:oklch(0.985 0 0);--feedlog-card:oklch(0.24 0.01 260);--feedlog-card-foreground:oklch(0.985 0 0);--feedlog-muted:oklch(0.32 0.01 260);--feedlog-muted-foreground:oklch(0.72 0.02 260);--feedlog-border:oklch(0.34 0.01 260);--feedlog-accent-color:#3b82f6;--feedlog-destructive:oklch(0.396 0.141 25.723);--feedlog-blue-400:oklch(0.707 0.165 254.624);--feedlog-blue-600:oklch(0.546 0.245 262.881);--feedlog-blue-900-30:color-mix(in oklab, oklch(0.379 0.146 265.522) 30%, transparent);--feedlog-red-900-30:color-mix(in oklab, oklch(0.396 0.141 25.723) 30%, transparent);--feedlog-shadow:0 1px 3px 0 rgba(0, 0, 0, 0.3)}.issues-container{min-height:100vh;background-color:var(--feedlog-background);padding:var(--feedlog-padding);margin:0 auto}.issues-header{margin-bottom:1.5rem;display:flex;align-items:flex-start;justify-content:space-between}.header-content{flex:1}.issues-title{color:var(--feedlog-foreground);margin:0 0 0.25rem 0;font-size:1.5rem;font-weight:500;line-height:1.5}.issues-subtitle{color:var(--feedlog-muted-foreground);font-size:0.875rem;margin:0}.loading-state{padding:0}.loading-skeletons{display:flex;flex-direction:column;gap:var(--feedlog-gap)}.skeleton-card{background-color:var(--feedlog-card);border:1px solid var(--feedlog-border);border-radius:var(--feedlog-radius);box-shadow:var(--feedlog-shadow);position:relative;overflow:hidden}.skeleton-card::before{content:'';position:absolute;left:0;top:0;bottom:0;width:3px;background:var(--feedlog-muted)}.skeleton-content{padding:1.25rem;padding-left:calc(1.25rem + 3px);display:flex;flex-direction:column;gap:0.875rem}.skeleton-header{display:flex;align-items:center;justify-content:space-between;gap:0.75rem}.skeleton-badge{width:4.5rem;height:1.25rem;border-radius:0.375rem;background-color:var(--feedlog-muted);animation:skeleton-pulse 1.5s ease-in-out infinite}.skeleton-timestamp{width:3rem;height:0.75rem;border-radius:0.25rem;background-color:var(--feedlog-muted);animation:skeleton-pulse 1.5s ease-in-out infinite 0.2s}.skeleton-main{display:flex;flex-direction:column;gap:0.5rem}.skeleton-title{height:0.9375rem;border-radius:0.25rem;background-color:var(--feedlog-muted);animation:skeleton-pulse 1.5s ease-in-out infinite 0.1s;width:85%}.skeleton-body{display:flex;flex-direction:column;gap:0.375rem}.skeleton-line{height:0.8125rem;border-radius:0.25rem;background-color:var(--feedlog-muted);animation:skeleton-pulse 1.5s ease-in-out infinite 0.15s;width:100%}.skeleton-line.short{width:70%}.skeleton-repo{width:6rem;height:0.75rem;border-radius:0.25rem;background-color:var(--feedlog-muted);animation:skeleton-pulse 1.5s ease-in-out infinite 0.25s}.skeleton-footer{display:flex;justify-content:flex-end}.skeleton-upvote{width:2.5rem;height:2rem;border-radius:0.5rem;background-color:var(--feedlog-muted);animation:skeleton-pulse 1.5s ease-in-out infinite 0.3s}@keyframes skeleton-pulse{0%,100%{opacity:1}50%{opacity:0.5}}.error-state{display:flex;align-items:center;justify-content:center;padding:3rem 2rem;min-height:12rem}.error-state-content{display:flex;flex-direction:column;align-items:center;text-align:center;max-width:20rem;padding:2rem}.error-icon{color:var(--feedlog-muted-foreground);opacity:0.8;margin-bottom:1rem}.error-state-title{margin:0 0 0.5rem 0;font-size:1.125rem;font-weight:600;color:var(--feedlog-foreground);line-height:1.4}.error-state-message{margin:0 0 1.25rem 0;font-size:0.875rem;color:var(--feedlog-muted-foreground);line-height:1.5}.load-more-container{display:flex;justify-content:center;padding:2rem 0;gap:1rem}";export{r as feedlog_issues}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as t,c as s,h as e}from"./p-rs_66Oq4.js";function i(t){if("string"!=typeof t)return"";let s=t.replace(/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,"");return s=s.replace(/\s*on\w+\s*=\s*["'][^"']*["']/gi,""),s=s.replace(/\s*on\w+\s*=\s*[^\s>]*/gi,""),s=s.replace(/<iframe\b[^<]*(?:(?!<\/iframe>)<[^<]*)*<\/iframe>/gi,""),s=s.replace(/<style\b[^<]*(?:(?!<\/style>)<[^<]*)*<\/style>/gi,""),s=s.replace(/<(embed|object)\b[^<]*>/gi,""),s=s.replace(/javascript:/gi,""),s=s.replace(/data:(?!image\/(?:png|jpg|jpeg|gif|webp);)/gi,""),s}class o extends Error{constructor(t,s,e){super(t),this.statusCode=s,this.originalError=e,this.name="FeedlogError",Object.setPrototypeOf(this,o.prototype)}}class r extends o{constructor(t){super(t),this.name="FeedlogValidationError",Object.setPrototypeOf(this,r.prototype)}}class n extends o{constructor(t,s,e){super(t,s,e),this.name="FeedlogNetworkError",Object.setPrototypeOf(this,n.prototype)}}class h extends o{constructor(t="Request timed out"){super(t),this.name="FeedlogTimeoutError",Object.setPrototypeOf(this,h.prototype)}}class a{constructor(t){if(this.config={credentials:"include",...t},this.apiKey=this.config.apiKey,!this.apiKey)throw new r("apiKey is required in FeedlogSDKConfig");this.endpoint=this.config.endpoint||"https://api.feedlog.app",this.timeout=this.config.timeout||3e4,this.endpoint=this.endpoint.replace(/\/$/,"")}async fetchIssues(t={}){try{const s=this.buildIssuesUrl(t),e=await this.fetchWithTimeout(s,{method:"GET",headers:this.getAuthHeaders(),credentials:this.config.credentials||"include"});if(!e.ok)throw new n(`Failed to fetch issues: ${e.statusText}`,e.status);const i=await e.json();return this.validateIssuesResponse(i)}catch(t){if(t instanceof o)throw t;if(t instanceof TypeError&&t.message.includes("fetch"))throw new n("Network error: Unable to reach API",void 0,t);throw new o(`Failed to fetch issues: ${t instanceof Error?t.message:"Unknown error"}`,void 0,t)}}async toggleUpvote(t){if(!t||"string"!=typeof t)throw new r("Issue ID is required");try{const s=`${this.endpoint}/api/issues/${encodeURIComponent(t)}/upvote`,e=await this.fetchWithTimeout(s,{method:"POST",headers:this.getAuthHeaders(),credentials:this.config.credentials||"include",body:JSON.stringify({})});if(404===e.status)throw new n("Issue not found",404);if(401===e.status)throw new n("Unauthorized",401);if(403===e.status)throw new n("Forbidden: Domain not allowed for this repository",403);if(!e.ok)throw new n(`Failed to toggle upvote: ${e.statusText}`,e.status);const i=await e.json();return this.validateUpvoteResponse(i)}catch(t){if(t instanceof o)throw t;if(t instanceof TypeError&&t.message.includes("fetch"))throw new n("Network error: Unable to reach API",void 0,t);throw new o(`Failed to toggle upvote: ${t instanceof Error?t.message:"Unknown error"}`,void 0,t)}}buildIssuesUrl(t){const s=new URL(`${this.endpoint}/api/issues`);if(t.repositoryIds){const e=Array.isArray(t.repositoryIds)?t.repositoryIds:[t.repositoryIds];for(const t of e)s.searchParams.append("repositoryIds",t)}return t.type&&s.searchParams.set("type",t.type),t.sortBy&&s.searchParams.set("sortBy",t.sortBy),t.cursor&&s.searchParams.set("cursor",t.cursor),void 0!==t.limit&&s.searchParams.set("limit",t.limit.toString()),s.toString()}getAuthHeaders(){const t={"Content-Type":"application/json"};return this.apiKey&&(t["x-api-key"]=this.apiKey),t}async fetchWithTimeout(t,s){const e=new AbortController,i=setTimeout((()=>e.abort()),this.timeout);try{const o=await fetch(t,{...s,signal:e.signal});return clearTimeout(i),o}catch(t){if(clearTimeout(i),t instanceof Error&&"AbortError"===t.name)throw new h(`Request timed out after ${this.timeout}ms`);throw t}}validateIssuesResponse(t){if(!t||"object"!=typeof t)throw new r("Invalid API response: expected object");const s=t;if(!Array.isArray(s.issues))throw new r("Invalid API response: issues must be an array");if(!s.pagination||"object"!=typeof s.pagination)throw new r("Invalid API response: pagination is required");return{issues:s.issues.map((t=>this.validateIssue(t))),pagination:{cursor:s.pagination.cursor,hasMore:Boolean(s.pagination.hasMore)}}}validateIssue(t){if(!t||"object"!=typeof t)throw new r("Invalid issue: expected object");const s=t;if("string"!=typeof s.id)throw new r("Invalid issue: id is required and must be a string");if(!["bug","enhancement"].includes(String(s.type)))throw new r('Invalid issue: type must be "bug" or "enhancement"');if(!["open","in_progress","closed"].includes(String(s.status)))throw new r('Invalid issue: status must be "open", "in_progress", or "closed"');if(!s.repository||"object"!=typeof s.repository)throw new r("Invalid issue: repository is required");const e=s.repository;if("string"!=typeof e.id)throw new r("Invalid issue: repository must have id");const o=null!==s.githubIssueLink&&"string"==typeof s.githubIssueLink?String(s.githubIssueLink):null,n=s.title,h=null!=n&&""!==n?i(String(n)):null,a=s.body,u=null!=a&&""!==a?i(String(a)):null,c=e.name,l=null!=c&&""!==c?String(c):null,d=e.description,p=null!=d&&""!==d?i(String(d)):null;return{id:String(s.id),githubIssueLink:o,type:s.type||"bug",status:s.status||"open",pinnedAt:s.pinnedAt?String(s.pinnedAt):null,revision:Number(s.revision)||1,title:h,body:u,repository:{id:String(e.id),name:l,description:p},updatedAt:String(s.updatedAt)||(new Date).toISOString(),createdAt:String(s.createdAt)||(new Date).toISOString(),upvoteCount:Number(s.upvoteCount)||0,hasUpvoted:Boolean(s.hasUpvoted)}}validateUpvoteResponse(t){if(!t||"object"!=typeof t)throw new r("Invalid upvote response: expected object");const s=t;if("boolean"!=typeof s.upvoted)throw new r("Invalid upvote response: upvoted must be a boolean");if("number"!=typeof s.upvoteCount)throw new r("Invalid upvote response: upvoteCount must be a number");if("string"!=typeof s.anonymousUserId)throw new r("Invalid upvote response: anonymousUserId must be a string");return{upvoted:s.upvoted,upvoteCount:s.upvoteCount,anonymousUserId:s.anonymousUserId}}getEndpoint(){return this.endpoint}getTimeout(){return this.timeout}}const u=class{constructor(e){t(this,e),this.feedlogUpvote=s(this,"feedlogUpvote"),this.feedlogError=s(this,"feedlogError"),this.maxWidth="42rem",this.theme="light",this.issues=[],this.loading=!0,this.error=null,this.cursor=null,this.hasMore=!1,this.isLoadingMore=!1,this.sdk=null,this.fetchRequestId=0,this.isDisconnected=!1,this.upvoteRequestIds=new Map,this.handleUpvote=async t=>{if(!this.sdk||this.isDisconnected)return;const{issueId:s,currentUpvoted:e,currentCount:i}=t.detail,o=(this.upvoteRequestIds.get(s)||0)+1;this.upvoteRequestIds.set(s,o),this.issues=this.issues.map((t=>t.id===s?Object.assign(Object.assign({},t),{hasUpvoted:!e,upvoteCount:e?i-1:i+1}):t));try{const t=await this.sdk.toggleUpvote(s);if(this.isDisconnected||this.upvoteRequestIds.get(s)!==o)return;this.issues=this.issues.map((e=>e.id===s?Object.assign(Object.assign({},e),{hasUpvoted:t.upvoted,upvoteCount:t.upvoteCount}):e)),this.feedlogUpvote.emit({issueId:s,upvoted:t.upvoted,upvoteCount:t.upvoteCount})}catch(t){if(this.isDisconnected||this.upvoteRequestIds.get(s)!==o)return;this.issues=this.issues.map((t=>t.id===s?Object.assign(Object.assign({},t),{hasUpvoted:e,upvoteCount:i}):t));const r=t instanceof Error?t.message:"Failed to toggle upvote";this.feedlogError.emit({error:r})}}}componentWillLoad(){this.previousType=this.type,this.previousLimit=this.limit,this.previousSortBy=this.sortBy,this.initializeSDK(),this.fetchIssues()}disconnectedCallback(){this.isDisconnected=!0,this.fetchRequestId++}componentDidUpdate(){(this.previousType!==this.type||this.previousLimit!==this.limit||this.previousSortBy!==this.sortBy)&&(this.fetchRequestId++,this.cursor=null,this.hasMore=!1,this.issues=[],this.fetchIssues(),this.previousType=this.type,this.previousLimit=this.limit,this.previousSortBy=this.sortBy)}initializeSDK(){try{if(!this.apiKey)throw new Error("API key is required for the Feedlog SDK");this.sdk=new a(Object.assign({apiKey:this.apiKey},this.endpoint&&{endpoint:this.endpoint})),this.error=null}catch(t){const s=t instanceof Error?t.message:"Failed to initialize SDK";this.error=s,this.feedlogError.emit({error:s})}}async fetchIssues(){if(!this.sdk)return;const t=this.fetchRequestId;try{this.loading=!0,this.error=null;const s={};this.type&&(s.type=this.type),this.sortBy&&(s.sortBy=this.sortBy),this.limit&&(s.limit=this.limit),this.cursor&&(s.cursor=this.cursor);const e=await this.sdk.fetchIssues(s);if(this.isDisconnected||t!==this.fetchRequestId)return;this.issues=e.issues,this.cursor=e.pagination.cursor,this.hasMore=e.pagination.hasMore}catch(s){if(this.isDisconnected||t!==this.fetchRequestId)return;const e=s instanceof Error?s.message:"Couldn't load updates";this.error=e,this.issues=[],this.feedlogError.emit({error:e,code:null==s?void 0:s.statusCode})}finally{this.isDisconnected||t!==this.fetchRequestId||(this.loading=!1,this.isLoadingMore=!1)}}async loadMore(){if(!this.sdk||!this.hasMore||this.isLoadingMore||this.loading)return;const t=this.fetchRequestId;this.isLoadingMore=!0;try{const s={};this.type&&(s.type=this.type),this.sortBy&&(s.sortBy=this.sortBy),this.limit&&(s.limit=this.limit),this.cursor&&(s.cursor=this.cursor);const e=await this.sdk.fetchIssues(s);if(this.isDisconnected||t!==this.fetchRequestId)return;this.issues=[...this.issues,...e.issues],this.cursor=e.pagination.cursor,this.hasMore=e.pagination.hasMore}catch(s){if(this.isDisconnected||t!==this.fetchRequestId)return;const e=s instanceof Error?s.message:"Failed to load more issues";this.feedlogError.emit({error:e,code:null==s?void 0:s.statusCode})}finally{this.isDisconnected||t!==this.fetchRequestId||(this.isLoadingMore=!1)}}render(){return e("feedlog-issues",{key:"8c8635788f390477f1e5217e423d79438c45858d",issues:this.issues,maxWidth:this.maxWidth,theme:this.theme,heading:this.heading,subtitle:this.subtitle,emptyStateTitle:this.emptyStateTitle,emptyStateMessage:this.emptyStateMessage,getIssueUrl:this.getIssueUrl,loading:this.loading,error:this.error,hasMore:this.hasMore,isLoadingMore:this.isLoadingMore,onFeedlogUpvote:this.handleUpvote,onFeedlogLoadMore:async()=>this.loadMore()})}};export{u as feedlog_issues_client}
|