hive-react-kit 0.2.3 → 0.2.6
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/build.css +9 -0
- package/dist/components/actionButtons/PostActionButton.d.ts +2 -2
- package/dist/components/index.d.ts +1 -0
- package/dist/index.cjs.js +74 -74
- package/dist/index.d.ts +3 -0
- package/dist/index.esm.js +2647 -2435
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const O=require("react"),z=require("lucide-react"),ss=require("date-fns"),oa=require("@hiveio/dhive"),Qr=require("hls.js"),jc=require("zustand"),Ec=require("react-router-dom");function Ac(e){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const i in e)if(i!=="default"){const s=Object.getOwnPropertyDescriptor(e,i);Object.defineProperty(r,i,s.get?s:{enumerable:!0,get:()=>e[i]})}}return r.default=e,Object.freeze(r)}const Qn=Ac(O),Id=Ac(oa);var gr=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Bi(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var r=e.default;if(typeof r=="function"){var i=function s(){var a=!1;try{a=this instanceof s}catch{}return a?Reflect.construct(r,arguments,this.constructor):r.apply(this,arguments)};i.prototype=r.prototype}else i={};return Object.defineProperty(i,"__esModule",{value:!0}),Object.keys(e).forEach(function(s){var a=Object.getOwnPropertyDescriptor(e,s);Object.defineProperty(i,s,a.get?a:{enumerable:!0,get:function(){return e[s]}})}),i}var pn={exports:{}},ma={};/**
|
|
2
2
|
* @license React
|
|
3
3
|
* react-jsx-runtime.production.js
|
|
4
4
|
*
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*
|
|
7
7
|
* This source code is licensed under the MIT license found in the
|
|
8
8
|
* LICENSE file in the root directory of this source tree.
|
|
9
|
-
*/var
|
|
9
|
+
*/var ho;function Fd(){if(ho)return ma;ho=1;var e=Symbol.for("react.transitional.element"),r=Symbol.for("react.fragment");function i(s,a,n){var u=null;if(n!==void 0&&(u=""+n),a.key!==void 0&&(u=""+a.key),"key"in a){n={};for(var c in a)c!=="key"&&(n[c]=a[c])}else n=a;return a=n.ref,{$$typeof:e,type:s,key:u,ref:a!==void 0?a:null,props:n}}return ma.Fragment=r,ma.jsx=i,ma.jsxs=i,ma}var ga={};/**
|
|
10
10
|
* @license React
|
|
11
11
|
* react-jsx-runtime.development.js
|
|
12
12
|
*
|
|
@@ -14,12 +14,12 @@
|
|
|
14
14
|
*
|
|
15
15
|
* This source code is licensed under the MIT license found in the
|
|
16
16
|
* LICENSE file in the root directory of this source tree.
|
|
17
|
-
*/var
|
|
17
|
+
*/var po;function qd(){return po||(po=1,process.env.NODE_ENV!=="production"&&(function(){function e(R){if(R==null)return null;if(typeof R=="function")return R.$$typeof===C?null:R.displayName||R.name||null;if(typeof R=="string")return R;switch(R){case b:return"Fragment";case v:return"Profiler";case g:return"StrictMode";case m:return"Suspense";case k:return"SuspenseList";case D:return"Activity"}if(typeof R=="object")switch(typeof R.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),R.$$typeof){case w:return"Portal";case N:return R.displayName||"Context";case _:return(R._context.displayName||"Context")+".Consumer";case y:var se=R.render;return R=R.displayName,R||(R=se.displayName||se.name||"",R=R!==""?"ForwardRef("+R+")":"ForwardRef"),R;case j:return se=R.displayName||null,se!==null?se:e(R.type)||"Memo";case E:se=R._payload,R=R._init;try{return e(R(se))}catch{}}return null}function r(R){return""+R}function i(R){try{r(R);var se=!1}catch{se=!0}if(se){se=console;var I=se.error,V=typeof Symbol=="function"&&Symbol.toStringTag&&R[Symbol.toStringTag]||R.constructor.name||"Object";return I.call(se,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",V),r(R)}}function s(R){if(R===b)return"<>";if(typeof R=="object"&&R!==null&&R.$$typeof===E)return"<...>";try{var se=e(R);return se?"<"+se+">":"<...>"}catch{return"<...>"}}function a(){var R=P.A;return R===null?null:R.getOwner()}function n(){return Error("react-stack-top-frame")}function u(R){if($.call(R,"key")){var se=Object.getOwnPropertyDescriptor(R,"key").get;if(se&&se.isReactWarning)return!1}return R.key!==void 0}function c(R,se){function I(){B||(B=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",se))}I.isReactWarning=!0,Object.defineProperty(R,"key",{get:I,configurable:!0})}function d(){var R=e(this.type);return L[R]||(L[R]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),R=this.props.ref,R!==void 0?R:null}function f(R,se,I,V,J,oe){var K=I.ref;return R={$$typeof:x,type:R,key:se,props:I,_owner:V},(K!==void 0?K:null)!==null?Object.defineProperty(R,"ref",{enumerable:!1,get:d}):Object.defineProperty(R,"ref",{enumerable:!1,value:null}),R._store={},Object.defineProperty(R._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(R,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(R,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:J}),Object.defineProperty(R,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:oe}),Object.freeze&&(Object.freeze(R.props),Object.freeze(R)),R}function o(R,se,I,V,J,oe){var K=se.children;if(K!==void 0)if(V)if(H(K)){for(V=0;V<K.length;V++)h(K[V]);Object.freeze&&Object.freeze(K)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else h(K);if($.call(se,"key")){K=e(R);var te=Object.keys(se).filter(function(Ee){return Ee!=="key"});V=0<te.length?"{key: someKey, "+te.join(": ..., ")+": ...}":"{key: someKey}",ee[K+V]||(te=0<te.length?"{"+te.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
|
|
18
18
|
let props = %s;
|
|
19
19
|
<%s {...props} />
|
|
20
20
|
React keys must be passed directly to JSX without using spread:
|
|
21
21
|
let props = %s;
|
|
22
|
-
<%s key={someKey} {...props} />`,V,K,te,K),ee[K+V]=!0)}if(K=null,I!==void 0&&(i(I),K=""+I),u(se)&&(i(se.key),K=""+se.key),"key"in se){I={};for(var pe in se)pe!=="key"&&(I[pe]=se[pe])}else I=se;return K&&c(I,typeof R=="function"?R.displayName||R.name||"Unknown":R),f(R,K,I,
|
|
22
|
+
<%s key={someKey} {...props} />`,V,K,te,K),ee[K+V]=!0)}if(K=null,I!==void 0&&(i(I),K=""+I),u(se)&&(i(se.key),K=""+se.key),"key"in se){I={};for(var pe in se)pe!=="key"&&(I[pe]=se[pe])}else I=se;return K&&c(I,typeof R=="function"?R.displayName||R.name||"Unknown":R),f(R,K,I,a(),J,oe)}function h(R){l(R)?R._store&&(R._store.validated=1):typeof R=="object"&&R!==null&&R.$$typeof===E&&(R._payload.status==="fulfilled"?l(R._payload.value)&&R._payload.value._store&&(R._payload.value._store.validated=1):R._store&&(R._store.validated=1))}function l(R){return typeof R=="object"&&R!==null&&R.$$typeof===x}var p=O,x=Symbol.for("react.transitional.element"),w=Symbol.for("react.portal"),b=Symbol.for("react.fragment"),g=Symbol.for("react.strict_mode"),v=Symbol.for("react.profiler"),_=Symbol.for("react.consumer"),N=Symbol.for("react.context"),y=Symbol.for("react.forward_ref"),m=Symbol.for("react.suspense"),k=Symbol.for("react.suspense_list"),j=Symbol.for("react.memo"),E=Symbol.for("react.lazy"),D=Symbol.for("react.activity"),C=Symbol.for("react.client.reference"),P=p.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,$=Object.prototype.hasOwnProperty,H=Array.isArray,F=console.createTask?console.createTask:function(){return null};p={react_stack_bottom_frame:function(R){return R()}};var B,L={},G=p.react_stack_bottom_frame.bind(p,n)(),X=F(s(n)),ee={};ga.Fragment=b,ga.jsx=function(R,se,I){var V=1e4>P.recentlyCreatedOwnerStacks++;return o(R,se,I,!1,V?Error("react-stack-top-frame"):G,V?F(s(R)):X)},ga.jsxs=function(R,se,I){var V=1e4>P.recentlyCreatedOwnerStacks++;return o(R,se,I,!0,V?Error("react-stack-top-frame"):G,V?F(s(R)):X)}})()),ga}var mo;function Bd(){return mo||(mo=1,process.env.NODE_ENV==="production"?pn.exports=Fd():pn.exports=qd()),pn.exports}var t=Bd();const sr={domain:"https://studio.3speak.tv",kThreeSpeakApiUrl:"https://studio.3speak.tv/mobile/api",userOwnerThumb:e=>`https://images.hive.blog/u/${e}/avatar`,graphQLServerUrl:"https://union.us-02.infra.3speak.tv"},ba=new oa.Client(["https://api.hive.blog","https://api.syncad.com","https://api.deathwing.me"]);class Vd{commonFields=`
|
|
23
23
|
items {
|
|
24
24
|
created_at
|
|
25
25
|
title
|
|
@@ -47,28 +47,28 @@ React keys must be passed directly to JSX without using spread:
|
|
|
47
47
|
spkvideo
|
|
48
48
|
}
|
|
49
49
|
}
|
|
50
|
-
`;async getGQLFeed(
|
|
51
|
-
query ${
|
|
50
|
+
`;async getGQLFeed(r,i){const s=`${sr.graphQLServerUrl}/api/v2/graphql`;try{const a=await fetch(s,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({query:i,operationName:r})});if(!a.ok)throw new Error(`GraphQL request failed: ${a.statusText}`);const n=await a.json();if(n.errors)throw new Error(`GraphQL error: ${n.errors.map(c=>c.message).join(", ")}`);const u=n.data;return u.socialFeed?.items?u.socialFeed.items:u.trendingFeed?.items?u.trendingFeed.items:u.searchFeed?.items?u.searchFeed.items:[]}catch(a){throw console.error(`Failed to fetch ${r}:`,a),a}}async handleLogin(r){const i=`${sr.domain}/mobile/login`,s=await fetch(i,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({challenge:r.challenge,proof:r.proof,publicKey:r.publicKey,username:r.username})});if(s.ok)return await s.json();throw new Error(`Login API error: ${await s.text()}`)}async handleUpvote({author:r,permlink:i,weight:s,authToken:a}){const n=`${sr.domain}/mobile/vote`,u=await fetch(n,{method:"POST",headers:{"Content-Type":"application/json",authorization:a},body:JSON.stringify({author:r,permlink:i,weight:s})});if(u.ok)return await u.json();{const c=await u.json();throw new Error(c.error||"Unknown API error")}}async handleComment({author:r,permlink:i,body:s,authToken:a}){const n=`${sr.domain}/mobile/comment`,u=await fetch(n,{method:"POST",headers:{"Content-Type":"application/json",authorization:a},body:JSON.stringify({author:r,permlink:i,comment:s})});if(u.ok)return await u.json();{const c=await u.json();throw new Error(c.error||"Unknown API error")}}async getVideoDetails(r,i){const s=`${sr.kThreeSpeakApiUrl}/video/@${r}/${i}`,a=await fetch(s);if(a.ok)return await a.json();console.error("Failed to fetch video details:",a.statusText)}async fetchFeed(r,i,s,a,n={limit:50,skip:0}){const{limit:u=50,skip:c=0}=n,d=`
|
|
51
|
+
query ${r} {
|
|
52
52
|
${i}(
|
|
53
53
|
spkvideo: { ${s} }
|
|
54
|
-
feedOptions: ${
|
|
54
|
+
feedOptions: ${a}
|
|
55
55
|
pagination: { limit: ${u}, skip: ${c} }
|
|
56
56
|
) {
|
|
57
57
|
${this.commonFields}
|
|
58
58
|
}
|
|
59
59
|
}
|
|
60
|
-
`,f=await this.getGQLFeed(
|
|
60
|
+
`,f=await this.getGQLFeed(r,d);return this.convertGQLItemsToThreeSpeakVideos(f)}async getUserVideos(r,i=0){return await this.fetchFeed("UserChannelFeed","socialFeed","only: true",`{ byCreator: { _in: ["${r}"] } }`,{skip:i})}async getHomeVideos(r=0){const i=`${sr.kThreeSpeakApiUrl}/feed/home?skip=${r}`,s=await fetch(i);if(s.ok){const a=await s.json();return Array.isArray(a)?a:[]}else return console.error("Failed to fetch home videos:",s.statusText),[]}async getTrendingVideos(r=0){return await this.fetchFeed("TrendingFeed","trendingFeed","only: true","{}",{skip:r})}async getNewVideos(r=0){return await this.fetchFeed("NewUploadsFeed","socialFeed","only: true","{}",{skip:r})}async getFirstUploadsVideos(r=0){return await this.fetchFeed("FirstUploadsFeed","trendingFeed","only: true, firstUpload: true","{}",{skip:r})}async getCommunityVideos(r,i=0){return await this.fetchFeed("CommunityFeed","socialFeed","only: true",`{ byCommunity: { _eq: "${r}" } }`,{skip:i})}async getRelatedVideos(r,i=0){return await this.fetchFeed("RelatedFeed","socialFeed","only: true",`{ byCreator: { _in: ["${r}"] } }`,{skip:i})}async getTaggedVideos(r,i=0){return await this.fetchFeed("TrendingTagFeed","trendingFeed","only: true",`{ byTag: { _eq: "${r}" } }`,{skip:i})}async getSearchFeed(r,i=0,s){const a=s?`{ byLang: { _eq: "${s}" } }`:"{}",n=`
|
|
61
61
|
query SearchFeed {
|
|
62
62
|
searchFeed(
|
|
63
|
-
searchTerm: "${
|
|
63
|
+
searchTerm: "${r}"
|
|
64
64
|
spkvideo: { only: true }
|
|
65
|
-
feedOptions: ${
|
|
65
|
+
feedOptions: ${a}
|
|
66
66
|
pagination: { limit: 50, skip: ${i} }
|
|
67
67
|
) {
|
|
68
68
|
${this.commonFields}
|
|
69
69
|
}
|
|
70
70
|
}
|
|
71
|
-
`,u=await this.getGQLFeed("SearchFeed",n);return this.convertGQLItemsToThreeSpeakVideos(u)}async getTrendingTags(){const
|
|
71
|
+
`,u=await this.getGQLFeed("SearchFeed",n);return this.convertGQLItemsToThreeSpeakVideos(u)}async getTrendingTags(){const r=`${sr.graphQLServerUrl}/api/v2/graphql`,i=`
|
|
72
72
|
query TrendingTags {
|
|
73
73
|
trendingTags(limit: 50) {
|
|
74
74
|
tags {
|
|
@@ -77,64 +77,64 @@ React keys must be passed directly to JSX without using spread:
|
|
|
77
77
|
}
|
|
78
78
|
}
|
|
79
79
|
}
|
|
80
|
-
`;try{const s=await fetch(a,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({query:i,operationName:"TrendingTags"})});if(!s.ok)throw new Error(`GraphQL request failed: ${s.statusText}`);const r=await s.json();if(r.errors)throw new Error(`GraphQL error: ${r.errors.map(n=>n.message).join(", ")}`);return r.data?.trendingTags?.tags||[]}catch(s){throw console.error("Failed to fetch trending tags:",s),s}}convertGQLItemsToThreeSpeakVideos(a){return a.map(i=>{let s=null;try{typeof i.spkvideo=="string"?s=JSON.parse(i.spkvideo):s=i.spkvideo}catch(r){console.error("Error parsing spkvideo JSON",r)}return{title:i.title||"Untitled",owner:i.author?.username||"",permlink:i.permlink||"",created:new Date(i.created_at),category:i.tags&&i.tags.length>0?i.tags[0]:"general",duration:s?.duration||i.json_metadata?.raw?.video?.info?.duration||0,thumbnail:s?.thumbnail_url||i.json_metadata?.raw?.video?.info?.thumbnail,numOfUpvotes:i.stats?.num_votes,numOfComments:i.stats?.num_comments,hiveValue:i.stats?.total_hive_reward,active_votes:i.stats?.active_voters?.map(r=>({voter:r.voter,percent:r.percent,rshares:r.rshares,weight:r.weight}))||[]}})}async getContentStats(a,i){try{const s=await ba.call("condenser_api","get_content",[a,i]);return{numOfUpvotes:s?.net_votes??0,numOfComments:s?.children??0,hiveValue:s?.pending_payout_value?parseFloat(s.pending_payout_value):0}}catch{return{numOfUpvotes:0,numOfComments:0,hiveValue:0}}}async getActiveVotes(a,i){try{return await ba.call("condenser_api","get_active_votes",[a,i])}catch(s){return console.error("Error calling get_active_votes:",s),[]}}async getCommentsList(a,i){try{const s=await ba.call("bridge","get_discussion",[a,i]);let r=Array.isArray(s)?s:s&&typeof s=="object"?Object.values(s):[];return r=r.filter(n=>!(n.author===a&&n.permlink===i)),r.map(n=>{const u=n.depth;if(typeof u=="string"){const d=parseInt(u,10);n.depth=Number.isFinite(d)?d:0}else(typeof u!="number"||!Number.isFinite(u))&&(n.depth=n.depth??0);const c=n.json_metadata;try{if(c&&typeof c=="string"){const d=c.trim();(d.startsWith("{")&&d.endsWith("}")||d.startsWith("[")&&d.endsWith("]"))&&(n.json_metadata_parsed=JSON.parse(d))}else c&&typeof c=="object"&&(n.json_metadata_parsed=c)}catch{console.warn(`Skipped invalid json_metadata for ${n.author}/${n.permlink}`)}return n})}catch(s){return console.error("Error fetching comments list:",s),[]}}async getMyVideos(a){const i=`${sr.domain}/mobile/api/my-videos`,s=await fetch(i,{method:"GET",headers:{"Content-Type":"application/json",Authorization:a}});if(s.ok){const r=await s.json();return Array.isArray(r)?r:[]}else throw console.error("Failed to fetch my videos:",s.statusText),new Error(`Failed to fetch my videos: ${s.status}`)}async getRankedPosts(a="trending",i="",s="hive.blog",r=20,n,u){try{const c={sort:a,tag:i,observer:s,limit:r};return n&&u&&(c.start_author=n,c.start_permlink=u),await ba.call("bridge","get_ranked_posts",c)}catch(c){return console.error("Error fetching ranked posts:",c),[]}}async getPostContent(a,i){try{return await ba.call("condenser_api","get_content",[a,i])}catch(s){return console.error("Error fetching post content:",s),null}}}const Re=new Vd,Br=e=>e?e.startsWith("Qm")||e.startsWith("baf")?`https://ipfs-3speak.b-cdn.net/ipfs/${e}`:e.startsWith("http")?e:e.startsWith("/")?`https://3speak.tv${e}`:e:"/placeholder.svg",jc=({video:e,onVideoClick:a,onAuthorClick:i,isGrid:s=!1})=>{const[r,n]=P.useState({numOfUpvotes:e.numOfUpvotes,numOfComments:e.numOfComments,hiveValue:e.hiveValue});P.useEffect(()=>{if(r.numOfUpvotes===void 0&&e.numOfUpvotes===void 0){let d=!0;return(async()=>{try{const f=await Re.getContentStats(e.author||"",e.permlink||"");d&&n(f)}catch(f){console.error("Error fetching content stats for VideoCard:",f)}})(),()=>{d=!1}}else e.numOfUpvotes!==void 0&&n({numOfUpvotes:e.numOfUpvotes,numOfComments:e.numOfComments||0,hiveValue:e.hiveValue||0})},[e.author,e.permlink,r.numOfUpvotes,e.numOfUpvotes,e.numOfComments,e.hiveValue]);const u=d=>{if(!d)return"00:00";const f=Math.floor(d),o=Math.floor(f/3600),h=Math.floor(f%3600/60),l=f%60,p=x=>x.toString().padStart(2,"0");return f<60?`00:${p(l)}`:o===0?`${p(h)}:${p(l)}`:`${p(o)}:${p(h)}:${p(l)}`},c=d=>d==null?"":d>=1e6?`${(d/1e6).toFixed(1)}M`:d>=1e3?`${(d/1e3).toFixed(1)}K`:d.toString();return t.jsxs("div",{className:"group bg-card border border-border rounded-xl overflow-hidden shadow-card hover:shadow-card-hover transition-all duration-200 hover:-translate-y-1 cursor-pointer",children:[t.jsxs("div",{className:"relative aspect-video bg-muted overflow-hidden",onClick:()=>a(e),children:[t.jsx("img",{src:Br(e.thumbnail),alt:e.title,onError:d=>{d.target.src=`https://images.hive.blog/u/${e.author}/avatar`},className:"w-full h-full object-cover group-hover:scale-105 transition-transform duration-300"}),e.duration&&t.jsxs("div",{className:"absolute bottom-3 right-3 bg-black/80 text-white text-xs px-2 py-1 rounded-md flex items-center gap-1 backdrop-blur-sm",children:[t.jsx(z.Clock,{className:"w-3 h-3"}),u(e.duration)]}),t.jsx("div",{className:"absolute inset-0 flex items-center justify-center opacity-0 group-hover:opacity-100 transition-all duration-300 bg-black/20",children:t.jsx("div",{className:"bg-primary hover:bg-primary-hover rounded-full p-4 transform scale-75 group-hover:scale-100 transition-all duration-300 shadow-lg",children:t.jsx(z.Play,{className:"w-6 h-6 text-primary-foreground ml-0.5",fill:"currentColor"})})}),t.jsx("div",{className:"absolute inset-0 bg-gradient-overlay opacity-0 group-hover:opacity-30 transition-opacity duration-300"})]}),t.jsxs("div",{className:"p-4 space-y-3",children:[t.jsx("h3",{className:"font-semibold text-card-foreground line-clamp-2 group-hover:text-primary transition-colors cursor-pointer leading-tight",onClick:()=>a(e),children:e.title}),t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsxs("div",{className:"flex items-center gap-2 cursor-pointer hover:text-primary transition-colors group/author",onClick:()=>i(e.author),children:[t.jsx("img",{src:`https://images.hive.blog/u/${e.author}/avatar`,alt:e.author,className:"w-8 h-8 rounded-full object-cover border-2 border-border group-hover/author:border-primary transition-colors",onError:d=>{d.target.src="https://images.hive.blog/u/null/avatar"}}),t.jsxs("span",{className:"font-medium text-sm text-muted-foreground group-hover/author:text-primary transition-colors",children:["@",e.author]})]}),t.jsx("span",{className:"text-xs text-muted-foreground",children:ns.formatDistanceToNow(e.created,{addSuffix:!0})})]}),t.jsxs("div",{className:"flex items-center justify-between text-sm",children:[t.jsxs("div",{className:"flex items-center gap-4",children:[r.numOfUpvotes!=null&&t.jsxs("div",{className:"flex items-center gap-1 text-muted-foreground hover:text-primary transition-colors cursor-pointer",children:[t.jsx(z.ThumbsUp,{className:"w-4 h-4"}),t.jsx("span",{children:c(r.numOfUpvotes)})]}),r.numOfComments!=null&&t.jsxs("div",{className:"flex items-center gap-1 text-muted-foreground hover:text-primary transition-colors cursor-pointer",children:[t.jsx(z.MessageCircle,{className:"w-4 h-4"}),t.jsx("span",{children:c(r.numOfComments)})]})]}),r.hiveValue!=null&&r.hiveValue>0&&t.jsxs("div",{className:"text-primary font-semibold",children:["$",r.hiveValue.toFixed(2)]})]}),e.category&&t.jsx("div",{className:"flex items-center gap-2",children:t.jsx("span",{className:"inline-block bg-primary/10 text-primary text-xs px-2 py-1 rounded-full font-medium",children:e.category})})]})]})};var Ge=(e=>(e.HOME="home",e.TRENDING="trending",e.NEW_VIDEOS="newVideos",e.FIRST_UPLOADS="firstUploads",e.USER="user",e.COMMUNITY="community",e.RELATED="related",e.TAG_FEED="tag_feed",e.SEARCH="search",e))(Ge||{});const ho=new Map,Ec=({title:e,author:a,permlink:i,createdAt:s,video:r,currentUser:n,isContentVoted:u=!1,description:c,onTapComment:d,onTapUpvote:f,onTapShare:o,onTapBookmark:h,onTapAuthor:l,onTapInfo:p})=>{const[x,w]=P.useState(r.numOfComments||0),[b,g]=P.useState(r.numOfUpvotes||0),[v,_]=P.useState(!1),[N,y]=P.useState(!1),[m,k]=P.useState(""),j=B=>{k(B),y(!0),setTimeout(()=>y(!1),3e3)},A=(B,$)=>`${B}:${$}`;P.useEffect(()=>{const B=A(a,i),$=ho.get(B);$?(w($.comments),g($.upvotes)):(async()=>{const X=await Re.getContentStats(a,i);g(X.numOfUpvotes),w(X.numOfComments),ho.set(A(a,i),{comments:X.numOfComments,upvotes:X.numOfUpvotes})})()},[a,i]);const D=()=>{d?d(a,i):j("Comments feature coming soon!")},C=()=>{f?f(a,i):j("Upvote feature requires authentication!")},O=()=>{if(o)o(a,i);else{const B=`https://3speak.tv/user/${a}/${i}`;navigator.share?navigator.share({title:e,url:B}):(navigator.clipboard.writeText(B),j("Link copied to clipboard!"))}},L=()=>{h?h(a,i):(_(!v),j(v?"Removed from bookmarks":"Added to bookmarks"))},H=()=>l?.(a,i),F=()=>{p?p(a,i):j("Video details coming soon!")};return t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"p-6 bg-card border-b border-border",children:[t.jsx("h1",{className:"text-xl font-bold text-card-foreground mb-4 line-clamp-2",children:e}),t.jsxs("div",{className:"flex items-start gap-4",children:[t.jsx("button",{onClick:H,className:"flex-shrink-0 group",children:t.jsx("img",{src:`https://images.hive.blog/u/${a}/avatar`,alt:a,className:"w-12 h-12 rounded-full object-cover border-2 border-border group-hover:border-primary transition-all duration-200",onError:B=>{B.target.src=`https://ui-avatars.com/api/?name=${a}&background=random`}})}),t.jsxs("div",{className:"flex-1",children:[t.jsx("div",{className:"flex items-center justify-between mb-4",children:t.jsxs("div",{children:[t.jsxs("button",{onClick:H,className:"font-semibold text-card-foreground hover:text-primary transition-colors text-base",children:["@",a]}),t.jsxs("div",{className:"flex items-center gap-4 mt-1 text-sm text-muted-foreground",children:[r.views&&t.jsxs("div",{className:"flex items-center gap-1",children:[t.jsx(z.Eye,{className:"w-4 h-4"}),t.jsxs("span",{children:[r.views.toLocaleString()," views"]})]}),s&&t.jsx("span",{children:ns.formatDistanceToNow(s,{addSuffix:!0})})]})]})}),t.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[t.jsxs("button",{type:"button",onClick:F,className:"inline-flex items-center gap-2 px-3 py-2 rounded-lg bg-muted text-muted-foreground hover:bg-primary/10 hover:text-primary transition-all duration-200","aria-label":"Show description",children:[t.jsx(z.Info,{className:"w-4 h-4"}),t.jsx("span",{className:"text-sm font-medium",children:"Info"})]}),t.jsxs("button",{type:"button",onClick:D,className:"inline-flex items-center gap-2 px-3 py-2 rounded-lg bg-muted text-muted-foreground hover:bg-primary/10 hover:text-primary transition-all duration-200","aria-label":"Show comments",children:[t.jsx(z.MessageCircle,{className:"w-4 h-4"}),t.jsx("span",{className:"text-sm font-medium",children:x})]}),t.jsxs("button",{type:"button",onClick:C,className:`inline-flex items-center gap-2 px-3 py-2 rounded-lg transition-all duration-200 ${u?"bg-primary/10 text-primary":"bg-muted text-muted-foreground hover:bg-primary/10 hover:text-primary"}`,"aria-label":"Show upvotes",children:[t.jsx(z.ThumbsUp,{className:`w-4 h-4 ${u?"fill-current":""}`}),t.jsx("span",{className:"text-sm font-medium",children:b})]}),t.jsxs("button",{type:"button",onClick:O,className:"inline-flex items-center gap-2 px-3 py-2 rounded-lg bg-muted text-muted-foreground hover:bg-secondary/10 hover:text-secondary transition-all duration-200","aria-label":"Share video",children:[t.jsx(z.Share2,{className:"w-4 h-4"}),t.jsx("span",{className:"text-sm font-medium",children:"Share"})]}),t.jsxs("button",{type:"button",onClick:L,className:`inline-flex items-center gap-2 px-3 py-2 rounded-lg transition-all duration-200 ${v?"bg-error/10 text-error":"bg-muted text-muted-foreground hover:bg-error/10 hover:text-error"}`,"aria-label":"Bookmark video",children:[t.jsx(z.Heart,{className:`w-4 h-4 ${v?"fill-current":""}`}),t.jsx("span",{className:"text-sm font-medium",children:v?"Saved":"Save"})]})]}),(r.hiveValue||r.category)&&t.jsxs("div",{className:"flex items-center gap-4 mt-4 pt-4 border-t border-border",children:[r.hiveValue&&r.hiveValue>0&&t.jsx("div",{className:"flex items-center gap-1 text-success font-semibold",children:t.jsxs("span",{children:["$",r.hiveValue.toFixed(2)," earned"]})}),r.category&&t.jsxs("div",{className:"flex items-center gap-1",children:[t.jsx(z.Users,{className:"w-4 h-4 text-muted-foreground"}),t.jsx("span",{className:"text-sm text-muted-foreground capitalize",children:r.category})]})]})]})]})]}),N&&t.jsx("div",{className:"fixed bottom-4 right-4 z-50 animate-slide-up",children:t.jsx("div",{className:"bg-card border border-border text-card-foreground rounded-lg px-4 py-3 shadow-lg max-w-sm",children:t.jsx("div",{className:"font-medium",children:m})})})]})},mn=new Map,ss=({feedType:e,username:a,communityId:i,tag:s,onVideoClick:r,onAuthorClick:n})=>{const[u,c]=P.useState([]),[d,f]=P.useState(!0),[o,h]=P.useState(!1),[l,p]=P.useState(null),[x,w]=P.useState(!0),[b,g]=P.useState(0),v=P.useMemo(()=>{switch(e){case Ge.USER:return`user:${a||""}`;case Ge.COMMUNITY:return`community:${i||""}`;case Ge.TAG_FEED:return`tag:${s||""}`;case Ge.SEARCH:return`search:${s||""}`;default:return e}},[e,a,i,s]),_=P.useCallback(async j=>{if(j.author?.username){if(!j.permlink)return null;let A=null;try{typeof j.spkvideo=="string"?A=JSON.parse(j.spkvideo):A=j.spkvideo}catch(O){console.error("Error parsing spkvideo JSON",O)}const D=Br(A?.thumbnail_url)||Br(j.json_metadata?.raw?.video?.info?.thumbnail),C=A?.duration||j.json_metadata?.raw?.video?.info?.duration||0;return{title:j.title||"Untitled",author:j.author.username,permlink:j.permlink,created:new Date(j.created_at),category:j.tags&&j.tags.length>0?j.tags[0]:"general",duration:C,thumbnail:D,numOfUpvotes:j.stats?.num_votes||j.numOfUpvotes,numOfComments:j.stats?.num_comments||j.numOfComments,hiveValue:j.stats?.total_hive_reward||j.hiveValue}}return j.owner?{title:j.title||"Untitled",author:j.owner,permlink:j.permlink||"",created:new Date(j.created||Date.now()),category:j.category||"general",duration:j.duration,thumbnail:Br(j.thumbnail),numOfUpvotes:j.numOfUpvotes,numOfComments:j.numOfComments,hiveValue:j.hiveValue}:null},[]),N=P.useCallback(async(j,A=!1)=>{try{let D=[];switch(e){case Ge.SEARCH:s&&(D=await Re.getSearchFeed(s,j));break;case Ge.TAG_FEED:s&&(D=await Re.getTaggedVideos(s,j));break;case Ge.HOME:D=await Re.getHomeVideos(j);break;case Ge.TRENDING:D=await Re.getTrendingVideos(j);break;case Ge.NEW_VIDEOS:D=await Re.getNewVideos(j);break;case Ge.FIRST_UPLOADS:D=await Re.getFirstUploadsVideos(j);break;case Ge.USER:a&&(D=await Re.getUserVideos(a,j));break;case Ge.COMMUNITY:i&&(D=await Re.getCommunityVideos(i,j));break;case Ge.RELATED:a&&(D=await Re.getRelatedVideos(a,j));break}const O=(await Promise.all(D.map(_))).filter(L=>L!==null);A?(c(O),mn.set(v,O)):c(L=>{const H=[...L,...O];return mn.set(v,H),H}),w(D.length>=20),g(j+D.length),p(null)}catch(D){p(D instanceof Error?D.message:"Failed to load videos")}},[e,a,i,s,v,_]);P.useEffect(()=>{(async()=>{f(!0),c([]),g(0);const A=mn.get(v);A?.length&&(c(A),f(!1)),await N(0,!0),f(!1)})()},[v,N]);const y=P.useCallback(async()=>{o||!x||(h(!0),await N(b),h(!1))},[o,x,b,N]),m=P.useCallback(async()=>{mn.delete(v),f(!0),g(0),await N(0,!0),f(!1)},[v,N]);P.useEffect(()=>{const j=()=>{window.innerHeight+document.documentElement.scrollTop>=document.documentElement.offsetHeight-1e3&&y()};return window.addEventListener("scroll",j),()=>window.removeEventListener("scroll",j)},[y]);const k=()=>t.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-6",children:Array.from({length:8}).map((j,A)=>t.jsxs("div",{className:"bg-card border border-border rounded-xl overflow-hidden animate-pulse",children:[t.jsx("div",{className:"aspect-video bg-muted"}),t.jsxs("div",{className:"p-4 space-y-3",children:[t.jsx("div",{className:"h-4 bg-muted rounded w-3/4"}),t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx("div",{className:"w-8 h-8 bg-muted rounded-full"}),t.jsx("div",{className:"h-3 bg-muted rounded w-20"})]}),t.jsxs("div",{className:"flex justify-between",children:[t.jsx("div",{className:"h-3 bg-muted rounded w-16"}),t.jsx("div",{className:"h-3 bg-muted rounded w-12"})]})]})]},A))});return d&&u.length===0?t.jsx(k,{}):l&&u.length===0?t.jsx("div",{className:"flex flex-col items-center justify-center min-h-[400px] space-y-4",children:t.jsxs("div",{className:"text-center",children:[t.jsx("h3",{className:"text-lg font-semibold text-card-foreground mb-2",children:"Failed to load videos"}),t.jsx("p",{className:"text-muted-foreground mb-4",children:l}),t.jsxs("button",{onClick:m,className:"inline-flex items-center justify-center rounded-md border border-border bg-card px-4 py-2 text-sm font-medium text-card-foreground shadow-sm transition-colors hover:bg-card-hover focus:outline-none focus:ring-2 focus:ring-primary",children:[t.jsx(z.RefreshCw,{className:"w-4 h-4 mr-2"}),"Try Again"]})]})}):u.length===0?t.jsx("div",{className:"flex flex-col items-center justify-center min-h-[400px] space-y-4",children:t.jsxs("div",{className:"text-center",children:[t.jsx("h3",{className:"text-lg font-semibold text-card-foreground mb-2",children:"No videos found"}),t.jsx("p",{className:"text-muted-foreground mb-4",children:"Check back later for new content"}),t.jsxs("button",{onClick:m,className:"inline-flex items-center justify-center rounded-md border border-border bg-card px-4 py-2 text-sm font-medium text-card-foreground shadow-sm transition-colors hover:bg-card-hover focus:outline-none focus:ring-2 focus:ring-primary",children:[t.jsx(z.RefreshCw,{className:"w-4 h-4 mr-2"}),"Refresh"]})]})}):t.jsxs("div",{className:"space-y-6",children:[t.jsxs("div",{className:"flex justify-between items-center",children:[t.jsxs("h2",{className:"text-2xl font-bold text-card-foreground capitalize",children:[e.replace(/([A-Z])/g," $1").toLowerCase()," Videos"]}),t.jsxs("button",{onClick:m,className:"inline-flex items-center justify-center rounded-md border border-border bg-card px-3 py-2 text-sm font-medium text-card-foreground shadow-sm transition-colors hover:bg-card-hover focus:outline-none focus:ring-2 focus:ring-primary",children:[t.jsx(z.RefreshCw,{className:"w-4 h-4 mr-2"}),"Refresh"]})]}),t.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-6",children:u.map((j,A)=>t.jsx(jc,{video:j,onVideoClick:r,onAuthorClick:n,isGrid:!0},`${j.author}-${j.permlink}-${A}`))}),x&&t.jsx("div",{className:"flex justify-center pt-8",children:o?t.jsxs("div",{className:"flex items-center gap-2 text-muted-foreground",children:[t.jsx(z.Loader2,{className:"w-4 h-4 animate-spin"}),"Loading more videos..."]}):t.jsx("button",{onClick:y,className:"inline-flex items-center justify-center rounded-md border border-border bg-card px-4 py-2 text-sm font-medium text-card-foreground shadow-sm transition-colors hover:bg-card-hover focus:outline-none focus:ring-2 focus:ring-primary",children:"Load More Videos"})})]})};var js={},Sr={},Cr={},gn={exports:{}},po;function Ud(){if(po)return gn.exports;po=1;const e=()=>{const a=Error.prepareStackTrace;Error.prepareStackTrace=(s,r)=>r;const i=new Error().stack.slice(1);return Error.prepareStackTrace=a,i};return gn.exports=e,gn.exports.default=e,gn.exports}var xa={},mo;function zd(){if(mo)return xa;mo=1,Object.defineProperty(xa,"__esModule",{value:!0}),xa.inferLabel=void 0;const e=()=>{};return xa.inferLabel=e,xa}var Es={},bn={exports:{}},go;function ua(){return go||(go=1,(function(e,a){Object.defineProperty(a,"__esModule",{value:!0});const i=["Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Uint16Array","Int32Array","Uint32Array","Float32Array","Float64Array","BigInt64Array","BigUint64Array"];function s(m){return i.includes(m)}const r=["Function","Generator","AsyncGenerator","GeneratorFunction","AsyncGeneratorFunction","AsyncFunction","Observable","Array","Buffer","Blob","Object","RegExp","Date","Error","Map","Set","WeakMap","WeakSet","ArrayBuffer","SharedArrayBuffer","DataView","Promise","URL","FormData","URLSearchParams","HTMLElement",...i];function n(m){return r.includes(m)}const u=["null","undefined","string","number","bigint","boolean","symbol"];function c(m){return u.includes(m)}function d(m){return k=>typeof k===m}const{toString:f}=Object.prototype,o=m=>{const k=f.call(m).slice(8,-1);if(/HTML\w+Element/.test(k)&&l.domElement(m))return"HTMLElement";if(n(k))return k},h=m=>k=>o(k)===m;function l(m){if(m===null)return"null";switch(typeof m){case"undefined":return"undefined";case"string":return"string";case"number":return"number";case"boolean":return"boolean";case"function":return"Function";case"bigint":return"bigint";case"symbol":return"symbol"}if(l.observable(m))return"Observable";if(l.array(m))return"Array";if(l.buffer(m))return"Buffer";const k=o(m);if(k)return k;if(m instanceof String||m instanceof Boolean||m instanceof Number)throw new TypeError("Please don't use object wrappers for primitive types");return"Object"}l.undefined=d("undefined"),l.string=d("string");const p=d("number");l.number=m=>p(m)&&!l.nan(m),l.bigint=d("bigint"),l.function_=d("function"),l.null_=m=>m===null,l.class_=m=>l.function_(m)&&m.toString().startsWith("class "),l.boolean=m=>m===!0||m===!1,l.symbol=d("symbol"),l.numericString=m=>l.string(m)&&!l.emptyStringOrWhitespace(m)&&!Number.isNaN(Number(m)),l.array=(m,k)=>Array.isArray(m)?l.function_(k)?m.every(k):!0:!1,l.buffer=m=>{var k,j,A,D;return(D=(A=(j=(k=m)===null||k===void 0?void 0:k.constructor)===null||j===void 0?void 0:j.isBuffer)===null||A===void 0?void 0:A.call(j,m))!==null&&D!==void 0?D:!1},l.blob=m=>h("Blob")(m),l.nullOrUndefined=m=>l.null_(m)||l.undefined(m),l.object=m=>!l.null_(m)&&(typeof m=="object"||l.function_(m)),l.iterable=m=>{var k;return l.function_((k=m)===null||k===void 0?void 0:k[Symbol.iterator])},l.asyncIterable=m=>{var k;return l.function_((k=m)===null||k===void 0?void 0:k[Symbol.asyncIterator])},l.generator=m=>{var k,j;return l.iterable(m)&&l.function_((k=m)===null||k===void 0?void 0:k.next)&&l.function_((j=m)===null||j===void 0?void 0:j.throw)},l.asyncGenerator=m=>l.asyncIterable(m)&&l.function_(m.next)&&l.function_(m.throw),l.nativePromise=m=>h("Promise")(m);const x=m=>{var k,j;return l.function_((k=m)===null||k===void 0?void 0:k.then)&&l.function_((j=m)===null||j===void 0?void 0:j.catch)};l.promise=m=>l.nativePromise(m)||x(m),l.generatorFunction=h("GeneratorFunction"),l.asyncGeneratorFunction=m=>o(m)==="AsyncGeneratorFunction",l.asyncFunction=m=>o(m)==="AsyncFunction",l.boundFunction=m=>l.function_(m)&&!m.hasOwnProperty("prototype"),l.regExp=h("RegExp"),l.date=h("Date"),l.error=h("Error"),l.map=m=>h("Map")(m),l.set=m=>h("Set")(m),l.weakMap=m=>h("WeakMap")(m),l.weakSet=m=>h("WeakSet")(m),l.int8Array=h("Int8Array"),l.uint8Array=h("Uint8Array"),l.uint8ClampedArray=h("Uint8ClampedArray"),l.int16Array=h("Int16Array"),l.uint16Array=h("Uint16Array"),l.int32Array=h("Int32Array"),l.uint32Array=h("Uint32Array"),l.float32Array=h("Float32Array"),l.float64Array=h("Float64Array"),l.bigInt64Array=h("BigInt64Array"),l.bigUint64Array=h("BigUint64Array"),l.arrayBuffer=h("ArrayBuffer"),l.sharedArrayBuffer=h("SharedArrayBuffer"),l.dataView=h("DataView"),l.enumCase=(m,k)=>Object.values(k).includes(m),l.directInstanceOf=(m,k)=>Object.getPrototypeOf(m)===k.prototype,l.urlInstance=m=>h("URL")(m),l.urlString=m=>{if(!l.string(m))return!1;try{return new URL(m),!0}catch{return!1}},l.truthy=m=>!!m,l.falsy=m=>!m,l.nan=m=>Number.isNaN(m),l.primitive=m=>l.null_(m)||c(typeof m),l.integer=m=>Number.isInteger(m),l.safeInteger=m=>Number.isSafeInteger(m),l.plainObject=m=>{if(f.call(m)!=="[object Object]")return!1;const k=Object.getPrototypeOf(m);return k===null||k===Object.getPrototypeOf({})},l.typedArray=m=>s(o(m));const w=m=>l.safeInteger(m)&&m>=0;l.arrayLike=m=>!l.nullOrUndefined(m)&&!l.function_(m)&&w(m.length),l.inRange=(m,k)=>{if(l.number(k))return m>=Math.min(0,k)&&m<=Math.max(k,0);if(l.array(k)&&k.length===2)return m>=Math.min(...k)&&m<=Math.max(...k);throw new TypeError(`Invalid range: ${JSON.stringify(k)}`)};const b=1,g=["innerHTML","ownerDocument","style","attributes","nodeValue"];l.domElement=m=>l.object(m)&&m.nodeType===b&&l.string(m.nodeName)&&!l.plainObject(m)&&g.every(k=>k in m),l.observable=m=>{var k,j,A,D;return m?m===((j=(k=m)[Symbol.observable])===null||j===void 0?void 0:j.call(k))||m===((D=(A=m)["@@observable"])===null||D===void 0?void 0:D.call(A)):!1},l.nodeStream=m=>l.object(m)&&l.function_(m.pipe)&&!l.observable(m),l.infinite=m=>m===1/0||m===-1/0;const v=m=>k=>l.integer(k)&&Math.abs(k%2)===m;l.evenInteger=v(0),l.oddInteger=v(1),l.emptyArray=m=>l.array(m)&&m.length===0,l.nonEmptyArray=m=>l.array(m)&&m.length>0,l.emptyString=m=>l.string(m)&&m.length===0;const _=m=>l.string(m)&&!/\S/.test(m);l.emptyStringOrWhitespace=m=>l.emptyString(m)||_(m),l.nonEmptyString=m=>l.string(m)&&m.length>0,l.nonEmptyStringAndNotWhitespace=m=>l.string(m)&&!l.emptyStringOrWhitespace(m),l.emptyObject=m=>l.object(m)&&!l.map(m)&&!l.set(m)&&Object.keys(m).length===0,l.nonEmptyObject=m=>l.object(m)&&!l.map(m)&&!l.set(m)&&Object.keys(m).length>0,l.emptySet=m=>l.set(m)&&m.size===0,l.nonEmptySet=m=>l.set(m)&&m.size>0,l.emptyMap=m=>l.map(m)&&m.size===0,l.nonEmptyMap=m=>l.map(m)&&m.size>0,l.propertyKey=m=>l.any([l.string,l.number,l.symbol],m),l.formData=m=>h("FormData")(m),l.urlSearchParams=m=>h("URLSearchParams")(m);const N=(m,k,j)=>{if(!l.function_(k))throw new TypeError(`Invalid predicate: ${JSON.stringify(k)}`);if(j.length===0)throw new TypeError("Invalid number of values");return m.call(j,k)};l.any=(m,...k)=>(l.array(m)?m:[m]).some(A=>N(Array.prototype.some,A,k)),l.all=(m,...k)=>N(Array.prototype.every,m,k);const y=(m,k,j,A={})=>{if(!m){const{multipleValues:D}=A,C=D?`received values of types ${[...new Set(j.map(O=>`\`${l(O)}\``))].join(", ")}`:`received value of type \`${l(j)}\``;throw new TypeError(`Expected value which is \`${k}\`, ${C}.`)}};a.assert={undefined:m=>y(l.undefined(m),"undefined",m),string:m=>y(l.string(m),"string",m),number:m=>y(l.number(m),"number",m),bigint:m=>y(l.bigint(m),"bigint",m),function_:m=>y(l.function_(m),"Function",m),null_:m=>y(l.null_(m),"null",m),class_:m=>y(l.class_(m),"Class",m),boolean:m=>y(l.boolean(m),"boolean",m),symbol:m=>y(l.symbol(m),"symbol",m),numericString:m=>y(l.numericString(m),"string with a number",m),array:(m,k)=>{y(l.array(m),"Array",m),k&&m.forEach(k)},buffer:m=>y(l.buffer(m),"Buffer",m),blob:m=>y(l.blob(m),"Blob",m),nullOrUndefined:m=>y(l.nullOrUndefined(m),"null or undefined",m),object:m=>y(l.object(m),"Object",m),iterable:m=>y(l.iterable(m),"Iterable",m),asyncIterable:m=>y(l.asyncIterable(m),"AsyncIterable",m),generator:m=>y(l.generator(m),"Generator",m),asyncGenerator:m=>y(l.asyncGenerator(m),"AsyncGenerator",m),nativePromise:m=>y(l.nativePromise(m),"native Promise",m),promise:m=>y(l.promise(m),"Promise",m),generatorFunction:m=>y(l.generatorFunction(m),"GeneratorFunction",m),asyncGeneratorFunction:m=>y(l.asyncGeneratorFunction(m),"AsyncGeneratorFunction",m),asyncFunction:m=>y(l.asyncFunction(m),"AsyncFunction",m),boundFunction:m=>y(l.boundFunction(m),"Function",m),regExp:m=>y(l.regExp(m),"RegExp",m),date:m=>y(l.date(m),"Date",m),error:m=>y(l.error(m),"Error",m),map:m=>y(l.map(m),"Map",m),set:m=>y(l.set(m),"Set",m),weakMap:m=>y(l.weakMap(m),"WeakMap",m),weakSet:m=>y(l.weakSet(m),"WeakSet",m),int8Array:m=>y(l.int8Array(m),"Int8Array",m),uint8Array:m=>y(l.uint8Array(m),"Uint8Array",m),uint8ClampedArray:m=>y(l.uint8ClampedArray(m),"Uint8ClampedArray",m),int16Array:m=>y(l.int16Array(m),"Int16Array",m),uint16Array:m=>y(l.uint16Array(m),"Uint16Array",m),int32Array:m=>y(l.int32Array(m),"Int32Array",m),uint32Array:m=>y(l.uint32Array(m),"Uint32Array",m),float32Array:m=>y(l.float32Array(m),"Float32Array",m),float64Array:m=>y(l.float64Array(m),"Float64Array",m),bigInt64Array:m=>y(l.bigInt64Array(m),"BigInt64Array",m),bigUint64Array:m=>y(l.bigUint64Array(m),"BigUint64Array",m),arrayBuffer:m=>y(l.arrayBuffer(m),"ArrayBuffer",m),sharedArrayBuffer:m=>y(l.sharedArrayBuffer(m),"SharedArrayBuffer",m),dataView:m=>y(l.dataView(m),"DataView",m),enumCase:(m,k)=>y(l.enumCase(m,k),"EnumCase",m),urlInstance:m=>y(l.urlInstance(m),"URL",m),urlString:m=>y(l.urlString(m),"string with a URL",m),truthy:m=>y(l.truthy(m),"truthy",m),falsy:m=>y(l.falsy(m),"falsy",m),nan:m=>y(l.nan(m),"NaN",m),primitive:m=>y(l.primitive(m),"primitive",m),integer:m=>y(l.integer(m),"integer",m),safeInteger:m=>y(l.safeInteger(m),"integer",m),plainObject:m=>y(l.plainObject(m),"plain object",m),typedArray:m=>y(l.typedArray(m),"TypedArray",m),arrayLike:m=>y(l.arrayLike(m),"array-like",m),domElement:m=>y(l.domElement(m),"HTMLElement",m),observable:m=>y(l.observable(m),"Observable",m),nodeStream:m=>y(l.nodeStream(m),"Node.js Stream",m),infinite:m=>y(l.infinite(m),"infinite number",m),emptyArray:m=>y(l.emptyArray(m),"empty array",m),nonEmptyArray:m=>y(l.nonEmptyArray(m),"non-empty array",m),emptyString:m=>y(l.emptyString(m),"empty string",m),emptyStringOrWhitespace:m=>y(l.emptyStringOrWhitespace(m),"empty string or whitespace",m),nonEmptyString:m=>y(l.nonEmptyString(m),"non-empty string",m),nonEmptyStringAndNotWhitespace:m=>y(l.nonEmptyStringAndNotWhitespace(m),"non-empty string and not whitespace",m),emptyObject:m=>y(l.emptyObject(m),"empty object",m),nonEmptyObject:m=>y(l.nonEmptyObject(m),"non-empty object",m),emptySet:m=>y(l.emptySet(m),"empty set",m),nonEmptySet:m=>y(l.nonEmptySet(m),"non-empty set",m),emptyMap:m=>y(l.emptyMap(m),"empty map",m),nonEmptyMap:m=>y(l.nonEmptyMap(m),"non-empty map",m),propertyKey:m=>y(l.propertyKey(m),"PropertyKey",m),formData:m=>y(l.formData(m),"FormData",m),urlSearchParams:m=>y(l.urlSearchParams(m),"URLSearchParams",m),evenInteger:m=>y(l.evenInteger(m),"even integer",m),oddInteger:m=>y(l.oddInteger(m),"odd integer",m),directInstanceOf:(m,k)=>y(l.directInstanceOf(m,k),"T",m),inRange:(m,k)=>y(l.inRange(m,k),"in range",m),any:(m,...k)=>y(l.any(m,...k),"predicate returns truthy for any value",k,{multipleValues:!0}),all:(m,...k)=>y(l.all(m,...k),"predicate returns truthy for all values",k,{multipleValues:!0})},Object.defineProperties(l,{class:{value:l.class_},function:{value:l.function_},null:{value:l.null_}}),Object.defineProperties(a.assert,{class:{value:a.assert.class_},function:{value:a.assert.function_},null:{value:a.assert.null_}}),a.default=l,e.exports=l,e.exports.default=l,e.exports.assert=a.assert})(bn,bn.exports)),bn.exports}var ya={},va={},bo;function Hd(){if(bo)return va;bo=1,Object.defineProperty(va,"__esModule",{value:!0}),va.generateStackTrace=void 0;const e=()=>new RangeError("INTERNAL_OW_ERROR").stack;return va.generateStackTrace=e,va}var xo;function Bi(){if(xo)return ya;xo=1,Object.defineProperty(ya,"__esModule",{value:!0}),ya.ArgumentError=void 0;const e=Hd(),a=(s,r)=>`${s.name}: ${s.message}
|
|
81
|
-
${
|
|
82
|
-
`)}if(!n)return
|
|
83
|
-
`);for(const[u,c]of
|
|
84
|
-
`)};return _a.generateArgumentErrorMessage=e,_a}var ko;function Je(){return ko||(ko=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Predicate=e.validatorSymbol=void 0;const a=ua(),i=Bi(),s=Gd(),r=en(),n=Ac();e.validatorSymbol=Symbol("validators");class u{constructor(d,f={}){Object.defineProperty(this,"type",{enumerable:!0,configurable:!0,writable:!0,value:d}),Object.defineProperty(this,"options",{enumerable:!0,configurable:!0,writable:!0,value:f}),Object.defineProperty(this,"context",{enumerable:!0,configurable:!0,writable:!0,value:{validators:[]}}),this.context={...this.context,...this.options};const o=this.type.charAt(0).toLowerCase()+this.type.slice(1);this.addValidator({message:(h,l)=>`Expected ${l?.slice(this.type.length+1)||"argument"} to be of type \`${this.type}\` but received type \`${(0,a.default)(h)}\``,validator:h=>a.default[o](h)})}[r.testSymbol](d,f,o,h){const l=new Map;for(const{validator:p,message:x}of this.context.validators){if(this.options.optional===!0&&d===void 0)continue;let w;try{w=p(d)}catch(m){w=m}if(w===!0)continue;const b=a.default.function_(o)?o():o,g=b&&h?`\`${b}\``:b,v=g?`${this.type} ${g}`:this.type,_=b||this.type,N=l.get(_),y=x(d,v,w);N?N.add(y):l.set(_,new Set([y]))}if(l.size>0){const p=(0,n.generateArgumentErrorMessage)(l);throw new i.ArgumentError(p,f,l)}}get[e.validatorSymbol](){return this.context.validators}get not(){return(0,s.not)(this)}validate(d){return this.addValidator({message:(f,o,h)=>typeof h=="string"?`(${o}) ${h}`:h(o),validator:f=>{const{message:o,validator:h}=d(f);return h?!0:o}})}is(d){return this.addValidator({message:(f,o,h)=>h?`(${o}) ${h}`:`Expected ${o} \`${f}\` to pass custom validation function`,validator:d})}message(d){const{validators:f}=this.context;return f[f.length-1].message=(o,h)=>typeof d=="function"?d(o,h):d,this}addValidator(d){return this.context.validators.push(d),this}}e.Predicate=u})(Es)),Es}var yn={},Ss={},ka={},Cs,No;function Jd(){return No||(No=1,Cs=function(e){return!isNaN(Date.parse(e))}),Cs}var jo;function Yd(){if(jo)return ka;jo=1,Object.defineProperty(ka,"__esModule",{value:!0}),ka.StringPredicate=void 0;const e=ua(),a=Jd(),i=Je();class s extends i.Predicate{constructor(n){super("string",n)}length(n){return this.addValidator({message:(u,c)=>`Expected ${c} to have length \`${n}\`, got \`${u}\``,validator:u=>u.length===n})}minLength(n){return this.addValidator({message:(u,c)=>`Expected ${c} to have a minimum length of \`${n}\`, got \`${u}\``,validator:u=>u.length>=n,negatedMessage:(u,c)=>`Expected ${c} to have a maximum length of \`${n-1}\`, got \`${u}\``})}maxLength(n){return this.addValidator({message:(u,c)=>`Expected ${c} to have a maximum length of \`${n}\`, got \`${u}\``,validator:u=>u.length<=n,negatedMessage:(u,c)=>`Expected ${c} to have a minimum length of \`${n+1}\`, got \`${u}\``})}matches(n){return this.addValidator({message:(u,c)=>`Expected ${c} to match \`${n}\`, got \`${u}\``,validator:u=>n.test(u)})}startsWith(n){return this.addValidator({message:(u,c)=>`Expected ${c} to start with \`${n}\`, got \`${u}\``,validator:u=>u.startsWith(n)})}endsWith(n){return this.addValidator({message:(u,c)=>`Expected ${c} to end with \`${n}\`, got \`${u}\``,validator:u=>u.endsWith(n)})}includes(n){return this.addValidator({message:(u,c)=>`Expected ${c} to include \`${n}\`, got \`${u}\``,validator:u=>u.includes(n)})}oneOf(n){return this.addValidator({message:(u,c)=>{let d=JSON.stringify(n);if(n.length>10){const f=n.length-10;d=JSON.stringify(n.slice(0,10)).replace(/]$/,`,…+${f} more]`)}return`Expected ${c} to be one of \`${d}\`, got \`${u}\``},validator:u=>n.includes(u)})}get empty(){return this.addValidator({message:(n,u)=>`Expected ${u} to be empty, got \`${n}\``,validator:n=>n===""})}get nonEmpty(){return this.addValidator({message:(n,u)=>`Expected ${u} to not be empty`,validator:n=>n!==""})}equals(n){return this.addValidator({message:(u,c)=>`Expected ${c} to be equal to \`${n}\`, got \`${u}\``,validator:u=>u===n})}get alphanumeric(){return this.addValidator({message:(n,u)=>`Expected ${u} to be alphanumeric, got \`${n}\``,validator:n=>/^[a-z\d]+$/i.test(n)})}get alphabetical(){return this.addValidator({message:(n,u)=>`Expected ${u} to be alphabetical, got \`${n}\``,validator:n=>/^[a-z]+$/gi.test(n)})}get numeric(){return this.addValidator({message:(n,u)=>`Expected ${u} to be numeric, got \`${n}\``,validator:n=>/^[+-]?\d+$/i.test(n)})}get date(){return this.addValidator({message:(n,u)=>`Expected ${u} to be a date, got \`${n}\``,validator:a})}get lowercase(){return this.addValidator({message:(n,u)=>`Expected ${u} to be lowercase, got \`${n}\``,validator:n=>n.trim()!==""&&n===n.toLowerCase()})}get uppercase(){return this.addValidator({message:(n,u)=>`Expected ${u} to be uppercase, got \`${n}\``,validator:n=>n.trim()!==""&&n===n.toUpperCase()})}get url(){return this.addValidator({message:(n,u)=>`Expected ${u} to be a URL, got \`${n}\``,validator:e.default.urlString})}}return ka.StringPredicate=s,ka}var Na={},Eo;function Zd(){if(Eo)return Na;Eo=1,Object.defineProperty(Na,"__esModule",{value:!0}),Na.NumberPredicate=void 0;const e=ua(),a=Je();class i extends a.Predicate{constructor(r){super("number",r)}inRange(r,n){return this.addValidator({message:(u,c)=>`Expected ${c} to be in range [${r}..${n}], got ${u}`,validator:u=>e.default.inRange(u,[r,n])})}greaterThan(r){return this.addValidator({message:(n,u)=>`Expected ${u} to be greater than ${r}, got ${n}`,validator:n=>n>r})}greaterThanOrEqual(r){return this.addValidator({message:(n,u)=>`Expected ${u} to be greater than or equal to ${r}, got ${n}`,validator:n=>n>=r})}lessThan(r){return this.addValidator({message:(n,u)=>`Expected ${u} to be less than ${r}, got ${n}`,validator:n=>n<r})}lessThanOrEqual(r){return this.addValidator({message:(n,u)=>`Expected ${u} to be less than or equal to ${r}, got ${n}`,validator:n=>n<=r})}equal(r){return this.addValidator({message:(n,u)=>`Expected ${u} to be equal to ${r}, got ${n}`,validator:n=>n===r})}oneOf(r){return this.addValidator({message:(n,u)=>{let c=JSON.stringify(r);if(r.length>10){const d=r.length-10;c=JSON.stringify(r.slice(0,10)).replace(/]$/,`,…+${d} more]`)}return`Expected ${u} to be one of \`${c}\`, got ${n}`},validator:n=>r.includes(n)})}get integer(){return this.addValidator({message:(r,n)=>`Expected ${n} to be an integer, got ${r}`,validator:r=>e.default.integer(r)})}get finite(){return this.addValidator({message:(r,n)=>`Expected ${n} to be finite, got ${r}`,validator:r=>!e.default.infinite(r)})}get infinite(){return this.addValidator({message:(r,n)=>`Expected ${n} to be infinite, got ${r}`,validator:r=>e.default.infinite(r)})}get positive(){return this.addValidator({message:(r,n)=>`Expected ${n} to be positive, got ${r}`,validator:r=>r>0})}get negative(){return this.addValidator({message:(r,n)=>`Expected ${n} to be negative, got ${r}`,validator:r=>r<0})}get integerOrInfinite(){return this.addValidator({message:(r,n)=>`Expected ${n} to be an integer or infinite, got ${r}`,validator:r=>e.default.integer(r)||e.default.infinite(r)})}get uint8(){return this.integer.inRange(0,255)}get uint16(){return this.integer.inRange(0,65535)}get uint32(){return this.integer.inRange(0,4294967295)}get int8(){return this.integer.inRange(-128,127)}get int16(){return this.integer.inRange(-32768,32767)}get int32(){return this.integer.inRange(-2147483648,2147483647)}}return Na.NumberPredicate=i,Na}var ja={},Ao;function Xd(){if(Ao)return ja;Ao=1,Object.defineProperty(ja,"__esModule",{value:!0}),ja.BigIntPredicate=void 0;const e=Je();class a extends e.Predicate{constructor(s){super("bigint",s)}}return ja.BigIntPredicate=a,ja}var Ea={},So;function Kd(){if(So)return Ea;So=1,Object.defineProperty(Ea,"__esModule",{value:!0}),Ea.BooleanPredicate=void 0;const e=Je();class a extends e.Predicate{constructor(s){super("boolean",s)}get true(){return this.addValidator({message:(s,r)=>`Expected ${r} to be true, got ${s}`,validator:s=>s})}get false(){return this.addValidator({message:(s,r)=>`Expected ${r} to be false, got ${s}`,validator:s=>!s})}}return Ea.BooleanPredicate=a,Ea}var Aa={},Xa={exports:{}};Xa.exports;var Co;function is(){return Co||(Co=1,(function(e,a){var i=200,s="__lodash_hash_undefined__",r=1,n=2,u=9007199254740991,c="[object Arguments]",d="[object Array]",f="[object AsyncFunction]",o="[object Boolean]",h="[object Date]",l="[object Error]",p="[object Function]",x="[object GeneratorFunction]",w="[object Map]",b="[object Number]",g="[object Null]",v="[object Object]",_="[object Promise]",N="[object Proxy]",y="[object RegExp]",m="[object Set]",k="[object String]",j="[object Symbol]",A="[object Undefined]",D="[object WeakMap]",C="[object ArrayBuffer]",O="[object DataView]",L="[object Float32Array]",H="[object Float64Array]",F="[object Int8Array]",B="[object Int16Array]",$="[object Int32Array]",G="[object Uint8Array]",X="[object Uint8ClampedArray]",ee="[object Uint16Array]",R="[object Uint32Array]",se=/[\\^$.*+?()[\]{}|]/g,I=/^\[object .+?Constructor\]$/,V=/^(?:0|[1-9]\d*)$/,J={};J[L]=J[H]=J[F]=J[B]=J[$]=J[G]=J[X]=J[ee]=J[R]=!0,J[c]=J[d]=J[C]=J[o]=J[O]=J[h]=J[l]=J[p]=J[w]=J[b]=J[v]=J[y]=J[m]=J[k]=J[D]=!1;var oe=typeof gr=="object"&&gr&&gr.Object===Object&&gr,K=typeof self=="object"&&self&&self.Object===Object&&self,te=oe||K||Function("return this")(),pe=a&&!a.nodeType&&a,Ee=pe&&!0&&e&&!e.nodeType&&e,Z=Ee&&Ee.exports===pe,ae=Z&&oe.process,re=(function(){try{return ae&&ae.binding&&ae.binding("util")}catch{}})(),ce=re&&re.isTypedArray;function xe(T,U){for(var Q=-1,le=T==null?0:T.length,Te=0,ye=[];++Q<le;){var Fe=T[Q];U(Fe,Q,T)&&(ye[Te++]=Fe)}return ye}function ge(T,U){for(var Q=-1,le=U.length,Te=T.length;++Q<le;)T[Te+Q]=U[Q];return T}function ke(T,U){for(var Q=-1,le=T==null?0:T.length;++Q<le;)if(U(T[Q],Q,T))return!0;return!1}function me(T,U){for(var Q=-1,le=Array(T);++Q<T;)le[Q]=U(Q);return le}function Ye(T){return function(U){return T(U)}}function we(T,U){return T.has(U)}function fe(T,U){return T?.[U]}function Ae(T){var U=-1,Q=Array(T.size);return T.forEach(function(le,Te){Q[++U]=[Te,le]}),Q}function Oe(T,U){return function(Q){return T(U(Q))}}function Ve(T){var U=-1,Q=Array(T.size);return T.forEach(function(le){Q[++U]=le}),Q}var St=Array.prototype,Jt=Function.prototype,Ze=Object.prototype,Yt=te["__core-js_shared__"],vr=Jt.toString,Qe=Ze.hasOwnProperty,Ct=(function(){var T=/[^.]+$/.exec(Yt&&Yt.keys&&Yt.keys.IE_PROTO||"");return T?"Symbol(src)_1."+T:""})(),xt=Ze.toString,or=RegExp("^"+vr.call(Qe).replace(se,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Zt=Z?te.Buffer:void 0,Dt=te.Symbol,yt=te.Uint8Array,Tt=Ze.propertyIsEnumerable,Gr=St.splice,ft=Dt?Dt.toStringTag:void 0,wr=Object.getOwnPropertySymbols,E=Zt?Zt.isBuffer:void 0,S=Oe(Object.keys,Object),M=$t(te,"DataView"),W=$t(te,"Map"),ne=$t(te,"Promise"),he=$t(te,"Set"),Ne=$t(te,"WeakMap"),Ce=$t(Object,"create"),ht=tt(M),at=tt(W),Xe=tt(ne),vt=tt(he),wt=tt(Ne),_t=Dt?Dt.prototype:void 0,et=_t?_t.valueOf:void 0;function ze(T){var U=-1,Q=T==null?0:T.length;for(this.clear();++U<Q;){var le=T[U];this.set(le[0],le[1])}}function Bt(){this.__data__=Ce?Ce(null):{},this.size=0}function Le(T){var U=this.has(T)&&delete this.__data__[T];return this.size-=U?1:0,U}function Ot(T){var U=this.__data__;if(Ce){var Q=U[T];return Q===s?void 0:Q}return Qe.call(U,T)?U[T]:void 0}function Vt(T){var U=this.__data__;return Ce?U[T]!==void 0:Qe.call(U,T)}function pt(T,U){var Q=this.__data__;return this.size+=this.has(T)?0:1,Q[T]=Ce&&U===void 0?s:U,this}ze.prototype.clear=Bt,ze.prototype.delete=Le,ze.prototype.get=Ot,ze.prototype.has=Vt,ze.prototype.set=pt;function Pt(T){var U=-1,Q=T==null?0:T.length;for(this.clear();++U<Q;){var le=T[U];this.set(le[0],le[1])}}function Xt(){this.__data__=[],this.size=0}function on(T){var U=this.__data__,Q=$e(U,T);if(Q<0)return!1;var le=U.length-1;return Q==le?U.pop():Gr.call(U,Q,1),--this.size,!0}function ws(T){var U=this.__data__,Q=$e(U,T);return Q<0?void 0:U[Q][1]}function Jr(T){return $e(this.__data__,T)>-1}function ca(T,U){var Q=this.__data__,le=$e(Q,T);return le<0?(++this.size,Q.push([T,U])):Q[le][1]=U,this}Pt.prototype.clear=Xt,Pt.prototype.delete=on,Pt.prototype.get=ws,Pt.prototype.has=Jr,Pt.prototype.set=ca;function Ut(T){var U=-1,Q=T==null?0:T.length;for(this.clear();++U<Q;){var le=T[U];this.set(le[0],le[1])}}function un(){this.size=0,this.__data__={hash:new ze,map:new(W||Pt),string:new ze}}function ln(T){var U=je(this,T).delete(T);return this.size-=U?1:0,U}function _r(T){return je(this,T).get(T)}function cn(T){return je(this,T).has(T)}function _s(T,U){var Q=je(this,T),le=Q.size;return Q.set(T,U),this.size+=Q.size==le?0:1,this}Ut.prototype.clear=un,Ut.prototype.delete=ln,Ut.prototype.get=_r,Ut.prototype.has=cn,Ut.prototype.set=_s;function q(T){var U=-1,Q=T==null?0:T.length;for(this.__data__=new Ut;++U<Q;)this.add(T[U])}function Y(T){return this.__data__.set(T,s),this}function ie(T){return this.__data__.has(T)}q.prototype.add=q.prototype.push=Y,q.prototype.has=ie;function ue(T){var U=this.__data__=new Pt(T);this.size=U.size}function De(){this.__data__=new Pt,this.size=0}function _e(T){var U=this.__data__,Q=U.delete(T);return this.size=U.size,Q}function Pe(T){return this.__data__.get(T)}function Ie(T){return this.__data__.has(T)}function mt(T,U){var Q=this.__data__;if(Q instanceof Pt){var le=Q.__data__;if(!W||le.length<i-1)return le.push([T,U]),this.size=++Q.size,this;Q=this.__data__=new Ut(le)}return Q.set(T,U),this.size=Q.size,this}ue.prototype.clear=De,ue.prototype.delete=_e,ue.prototype.get=Pe,ue.prototype.has=Ie,ue.prototype.set=mt;function qe(T,U){var Q=dr(T),le=!Q&&Xr(T),Te=!Q&&!le&&fr(T),ye=!Q&&!le&&!Te&&oo(T),Fe=Q||le||Te||ye,We=Fe?me(T.length,String):[],Ke=We.length;for(var Me in T)Qe.call(T,Me)&&!(Fe&&(Me=="length"||Te&&(Me=="offset"||Me=="parent")||ye&&(Me=="buffer"||Me=="byteLength"||Me=="byteOffset")||Lt(Me,Ke)))&&We.push(Me);return We}function $e(T,U){for(var Q=T.length;Q--;)if(ha(T[Q][0],U))return Q;return-1}function kt(T,U,Q){var le=U(T);return dr(T)?le:ge(le,Q(T))}function nt(T){return T==null?T===void 0?A:g:ft&&ft in Object(T)?zt(T):cr(T)}function He(T){return pa(T)&&nt(T)==c}function Nt(T,U,Q,le,Te){return T===U?!0:T==null||U==null||!pa(T)&&!pa(U)?T!==T&&U!==U:ur(T,U,Q,le,Nt,Te)}function ur(T,U,Q,le,Te,ye){var Fe=dr(T),We=dr(U),Ke=Fe?d:Be(T),Me=We?d:Be(U);Ke=Ke==c?v:Ke,Me=Me==c?v:Me;var gt=Ke==v,Mt=Me==v,rt=Ke==Me;if(rt&&fr(T)){if(!fr(U))return!1;Fe=!0,gt=!1}if(rt&&!gt)return ye||(ye=new ue),Fe||oo(T)?da(T,U,Q,le,Te,ye):ks(T,U,Ke,Q,le,Te,ye);if(!(Q&r)){var jt=gt&&Qe.call(T,"__wrapped__"),Et=Mt&&Qe.call(U,"__wrapped__");if(jt||Et){var hr=jt?T.value():T,Kt=Et?U.value():U;return ye||(ye=new ue),Te(hr,Kt,Q,le,ye)}}return rt?(ye||(ye=new ue),Ns(T,U,Q,le,Te,ye)):!1}function Yr(T){if(!io(T)||Nr(T))return!1;var U=jr(T)?or:I;return U.test(tt(T))}function lr(T){return pa(T)&&Er(T.length)&&!!J[nt(T)]}function kr(T){if(!Zr(T))return S(T);var U=[];for(var Q in Object(T))Qe.call(T,Q)&&Q!="constructor"&&U.push(Q);return U}function da(T,U,Q,le,Te,ye){var Fe=Q&r,We=T.length,Ke=U.length;if(We!=Ke&&!(Fe&&Ke>We))return!1;var Me=ye.get(T);if(Me&&ye.get(U))return Me==U;var gt=-1,Mt=!0,rt=Q&n?new q:void 0;for(ye.set(T,U),ye.set(U,T);++gt<We;){var jt=T[gt],Et=U[gt];if(le)var hr=Fe?le(Et,jt,gt,U,T,ye):le(jt,Et,gt,T,U,ye);if(hr!==void 0){if(hr)continue;Mt=!1;break}if(rt){if(!ke(U,function(Kt,Ar){if(!we(rt,Ar)&&(jt===Kt||Te(jt,Kt,Q,le,ye)))return rt.push(Ar)})){Mt=!1;break}}else if(!(jt===Et||Te(jt,Et,Q,le,ye))){Mt=!1;break}}return ye.delete(T),ye.delete(U),Mt}function ks(T,U,Q,le,Te,ye,Fe){switch(Q){case O:if(T.byteLength!=U.byteLength||T.byteOffset!=U.byteOffset)return!1;T=T.buffer,U=U.buffer;case C:return!(T.byteLength!=U.byteLength||!ye(new yt(T),new yt(U)));case o:case h:case b:return ha(+T,+U);case l:return T.name==U.name&&T.message==U.message;case y:case k:return T==U+"";case w:var We=Ae;case m:var Ke=le&r;if(We||(We=Ve),T.size!=U.size&&!Ke)return!1;var Me=Fe.get(T);if(Me)return Me==U;le|=n,Fe.set(T,U);var gt=da(We(T),We(U),le,Te,ye,Fe);return Fe.delete(T),gt;case j:if(et)return et.call(T)==et.call(U)}return!1}function Ns(T,U,Q,le,Te,ye){var Fe=Q&r,We=Se(T),Ke=We.length,Me=Se(U),gt=Me.length;if(Ke!=gt&&!Fe)return!1;for(var Mt=Ke;Mt--;){var rt=We[Mt];if(!(Fe?rt in U:Qe.call(U,rt)))return!1}var jt=ye.get(T);if(jt&&ye.get(U))return jt==U;var Et=!0;ye.set(T,U),ye.set(U,T);for(var hr=Fe;++Mt<Ke;){rt=We[Mt];var Kt=T[rt],Ar=U[rt];if(le)var uo=Fe?le(Ar,Kt,rt,U,T,ye):le(Kt,Ar,rt,T,U,ye);if(!(uo===void 0?Kt===Ar||Te(Kt,Ar,Q,le,ye):uo)){Et=!1;break}hr||(hr=rt=="constructor")}if(Et&&!hr){var fn=T.constructor,hn=U.constructor;fn!=hn&&"constructor"in T&&"constructor"in U&&!(typeof fn=="function"&&fn instanceof fn&&typeof hn=="function"&&hn instanceof hn)&&(Et=!1)}return ye.delete(T),ye.delete(U),Et}function Se(T){return kt(T,Ld,fa)}function je(T,U){var Q=T.__data__;return Ht(U)?Q[typeof U=="string"?"string":"hash"]:Q.map}function $t(T,U){var Q=fe(T,U);return Yr(Q)?Q:void 0}function zt(T){var U=Qe.call(T,ft),Q=T[ft];try{T[ft]=void 0;var le=!0}catch{}var Te=xt.call(T);return le&&(U?T[ft]=Q:delete T[ft]),Te}var fa=wr?function(T){return T==null?[]:(T=Object(T),xe(wr(T),function(U){return Tt.call(T,U)}))}:Md,Be=nt;(M&&Be(new M(new ArrayBuffer(1)))!=O||W&&Be(new W)!=w||ne&&Be(ne.resolve())!=_||he&&Be(new he)!=m||Ne&&Be(new Ne)!=D)&&(Be=function(T){var U=nt(T),Q=U==v?T.constructor:void 0,le=Q?tt(Q):"";if(le)switch(le){case ht:return O;case at:return w;case Xe:return _;case vt:return m;case wt:return D}return U});function Lt(T,U){return U=U??u,!!U&&(typeof T=="number"||V.test(T))&&T>-1&&T%1==0&&T<U}function Ht(T){var U=typeof T;return U=="string"||U=="number"||U=="symbol"||U=="boolean"?T!=="__proto__":T===null}function Nr(T){return!!Ct&&Ct in T}function Zr(T){var U=T&&T.constructor,Q=typeof U=="function"&&U.prototype||Ze;return T===Q}function cr(T){return xt.call(T)}function tt(T){if(T!=null){try{return vr.call(T)}catch{}try{return T+""}catch{}}return""}function ha(T,U){return T===U||T!==T&&U!==U}var Xr=He((function(){return arguments})())?He:function(T){return pa(T)&&Qe.call(T,"callee")&&!Tt.call(T,"callee")},dr=Array.isArray;function Kr(T){return T!=null&&Er(T.length)&&!jr(T)}var fr=E||Rd;function dn(T,U){return Nt(T,U)}function jr(T){if(!io(T))return!1;var U=nt(T);return U==p||U==x||U==f||U==N}function Er(T){return typeof T=="number"&&T>-1&&T%1==0&&T<=u}function io(T){var U=typeof T;return T!=null&&(U=="object"||U=="function")}function pa(T){return T!=null&&typeof T=="object"}var oo=ce?Ye(ce):lr;function Ld(T){return Kr(T)?qe(T):kr(T)}function Md(){return[]}function Rd(){return!1}e.exports=dn})(Xa,Xa.exports)),Xa.exports}var Dr={},vn={},Do;function os(){if(Do)return vn;Do=1,Object.defineProperty(vn,"__esModule",{value:!0});const e=en();function a(i,s,r,n=!0){r[e.testSymbol](i,a,s,n)}return vn.default=a,vn}var To;function Sc(){if(To)return Dr;To=1,Object.defineProperty(Dr,"__esModule",{value:!0}),Dr.exact=Dr.partial=void 0;const e=ua(),a=os(),i=en();function s(n,u,c){try{for(const d of Object.keys(u)){const f=c?`${c}.${d}`:d;if((0,i.isPredicate)(u[d]))(0,a.default)(n[d],f,u[d]);else if(e.default.plainObject(u[d])){const o=s(n[d],u[d],f);if(o!==!0)return o}}return!0}catch(d){return d.message}}Dr.partial=s;function r(n,u,c,d){try{const f=new Set(Object.keys(n));for(const o of Object.keys(u)){f.delete(o);const h=c?`${c}.${o}`:o;if((0,i.isPredicate)(u[o]))(0,a.default)(n[o],h,u[o]);else if(e.default.plainObject(u[o])){if(!Object.prototype.hasOwnProperty.call(n,o))return`Expected \`${h}\` to exist`;const l=r(n[o],u[o],h);if(l!==!0)return l}}if(f.size>0){const o=[...f.keys()][0],h=c?`${c}.${o}`:o;return`Did not expect ${d?"element":"property"} \`${h}\` to exist, got \`${n[o]}\``}return!0}catch(f){return f.message}}return Dr.exact=r,Dr}var wn={},Oo;function us(){if(Oo)return wn;Oo=1,Object.defineProperty(wn,"__esModule",{value:!0});const e=os();return wn.default=(a,i,s)=>{try{for(const r of a)(0,e.default)(r,i,s,!1);return!0}catch(r){return r.message}},wn}var Po;function Qd(){if(Po)return Aa;Po=1,Object.defineProperty(Aa,"__esModule",{value:!0}),Aa.ArrayPredicate=void 0;const e=is(),a=Je(),i=Sc(),s=us();class r extends a.Predicate{constructor(u){super("array",u)}length(u){return this.addValidator({message:(c,d)=>`Expected ${d} to have length \`${u}\`, got \`${c.length}\``,validator:c=>c.length===u})}minLength(u){return this.addValidator({message:(c,d)=>`Expected ${d} to have a minimum length of \`${u}\`, got \`${c.length}\``,validator:c=>c.length>=u,negatedMessage:(c,d)=>`Expected ${d} to have a maximum length of \`${u-1}\`, got \`${c.length}\``})}maxLength(u){return this.addValidator({message:(c,d)=>`Expected ${d} to have a maximum length of \`${u}\`, got \`${c.length}\``,validator:c=>c.length<=u,negatedMessage:(c,d)=>`Expected ${d} to have a minimum length of \`${u+1}\`, got \`${c.length}\``})}startsWith(u){return this.addValidator({message:(c,d)=>`Expected ${d} to start with \`${u}\`, got \`${c[0]}\``,validator:c=>c[0]===u})}endsWith(u){return this.addValidator({message:(c,d)=>`Expected ${d} to end with \`${u}\`, got \`${c[c.length-1]}\``,validator:c=>c[c.length-1]===u})}includes(...u){return this.addValidator({message:(c,d)=>`Expected ${d} to include all elements of \`${JSON.stringify(u)}\`, got \`${JSON.stringify(c)}\``,validator:c=>u.every(d=>c.includes(d))})}includesAny(...u){return this.addValidator({message:(c,d)=>`Expected ${d} to include any element of \`${JSON.stringify(u)}\`, got \`${JSON.stringify(c)}\``,validator:c=>u.some(d=>c.includes(d))})}get empty(){return this.addValidator({message:(u,c)=>`Expected ${c} to be empty, got \`${JSON.stringify(u)}\``,validator:u=>u.length===0})}get nonEmpty(){return this.addValidator({message:(u,c)=>`Expected ${c} to not be empty`,validator:u=>u.length>0})}deepEqual(u){return this.addValidator({message:(c,d)=>`Expected ${d} to be deeply equal to \`${JSON.stringify(u)}\`, got \`${JSON.stringify(c)}\``,validator:c=>e(c,u)})}ofType(u){return this.addValidator({message:(c,d,f)=>`(${d}) ${f}`,validator:c=>(0,s.default)(c,"values",u)})}exactShape(u){const c=u;return this.addValidator({message:(d,f,o)=>`${o.replace("Expected","Expected element")} in ${f}`,validator:d=>(0,i.exact)(d,c,void 0,!0)})}}return Aa.ArrayPredicate=r,Aa}var Sa={},Ds,$o;function e0(){return $o||($o=1,Ds=e=>{const a=typeof e;return e!==null&&(a==="object"||a==="function")}),Ds}var Ts,Lo;function t0(){if(Lo)return Ts;Lo=1;const e=e0(),a=new Set(["__proto__","prototype","constructor"]),i=r=>!r.some(n=>a.has(n));function s(r){const n=r.split("."),u=[];for(let c=0;c<n.length;c++){let d=n[c];for(;d[d.length-1]==="\\"&&n[c+1]!==void 0;)d=d.slice(0,-1)+".",d+=n[++c];u.push(d)}return i(u)?u:[]}return Ts={get(r,n,u){if(!e(r)||typeof n!="string")return u===void 0?r:u;const c=s(n);if(c.length!==0){for(let d=0;d<c.length;d++)if(r=r[c[d]],r==null){if(d!==c.length-1)return u;break}return r===void 0?u:r}},set(r,n,u){if(!e(r)||typeof n!="string")return r;const c=r,d=s(n);for(let f=0;f<d.length;f++){const o=d[f];e(r[o])||(r[o]={}),f===d.length-1&&(r[o]=u),r=r[o]}return c},delete(r,n){if(!e(r)||typeof n!="string")return!1;const u=s(n);for(let c=0;c<u.length;c++){const d=u[c];if(c===u.length-1)return delete r[d],!0;if(r=r[d],!e(r))return!1}},has(r,n){if(!e(r)||typeof n!="string")return!1;const u=s(n);if(u.length===0)return!1;for(let c=0;c<u.length;c++)if(e(r)){if(!(u[c]in r))return!1;r=r[u[c]]}else return!1;return!0}},Ts}var _n={},Mo;function tn(){return Mo||(Mo=1,Object.defineProperty(_n,"__esModule",{value:!0}),_n.default=(e,a,i=5)=>{const s=[];for(const r of a)if(!e.has(r)&&(s.push(r),s.length===i))return s;return s.length===0?!0:s}),_n}var kn={},Ro;function r0(){if(Ro)return kn;Ro=1,Object.defineProperty(kn,"__esModule",{value:!0});const e=ua(),a=os(),i=(s,r)=>e.default.plainObject(s)?Object.values(s).every(n=>i(n,r)):((0,a.default)(s,"deep values",r,!1),!0);return kn.default=(s,r)=>{try{return i(s,r)}catch(n){return n.message}},kn}var Io;function a0(){if(Io)return Sa;Io=1,Object.defineProperty(Sa,"__esModule",{value:!0}),Sa.ObjectPredicate=void 0;const e=ua(),a=t0(),i=is(),s=tn(),r=us(),n=r0(),u=Sc(),c=Je();class d extends c.Predicate{constructor(o){super("object",o)}get plain(){return this.addValidator({message:(o,h)=>`Expected ${h} to be a plain object`,validator:o=>e.default.plainObject(o)})}get empty(){return this.addValidator({message:(o,h)=>`Expected ${h} to be empty, got \`${JSON.stringify(o)}\``,validator:o=>Object.keys(o).length===0})}get nonEmpty(){return this.addValidator({message:(o,h)=>`Expected ${h} to not be empty`,validator:o=>Object.keys(o).length>0})}valuesOfType(o){return this.addValidator({message:(h,l,p)=>`(${l}) ${p}`,validator:h=>(0,r.default)(Object.values(h),"values",o)})}deepValuesOfType(o){return this.addValidator({message:(h,l,p)=>`(${l}) ${p}`,validator:h=>(0,n.default)(h,o)})}deepEqual(o){return this.addValidator({message:(h,l)=>`Expected ${l} to be deeply equal to \`${JSON.stringify(o)}\`, got \`${JSON.stringify(h)}\``,validator:h=>i(h,o)})}instanceOf(o){return this.addValidator({message:(h,l)=>{var p;let{name:x}=(p=h?.constructor)!==null&&p!==void 0?p:{};return(!x||x==="Object")&&(x=JSON.stringify(h)),`Expected ${l} \`${x}\` to be of type \`${o.name}\``},validator:h=>h instanceof o})}hasKeys(...o){return this.addValidator({message:(h,l,p)=>`Expected ${l} to have keys \`${JSON.stringify(p)}\``,validator:h=>(0,s.default)({has:l=>a.has(h,l)},o)})}hasAnyKeys(...o){return this.addValidator({message:(h,l)=>`Expected ${l} to have any key of \`${JSON.stringify(o)}\``,validator:h=>o.some(l=>a.has(h,l))})}partialShape(o){return this.addValidator({message:(h,l,p)=>`${p.replace("Expected","Expected property")} in ${l}`,validator:h=>(0,u.partial)(h,o)})}exactShape(o){return this.addValidator({message:(h,l,p)=>`${p.replace("Expected","Expected property")} in ${l}`,validator:h=>(0,u.exact)(h,o)})}}return Sa.ObjectPredicate=d,Sa}var Ca={},Fo;function n0(){if(Fo)return Ca;Fo=1,Object.defineProperty(Ca,"__esModule",{value:!0}),Ca.DatePredicate=void 0;const e=Je();class a extends e.Predicate{constructor(s){super("date",s)}before(s){return this.addValidator({message:(r,n)=>`Expected ${n} ${r.toISOString()} to be before ${s.toISOString()}`,validator:r=>r.getTime()<s.getTime()})}after(s){return this.addValidator({message:(r,n)=>`Expected ${n} ${r.toISOString()} to be after ${s.toISOString()}`,validator:r=>r.getTime()>s.getTime()})}}return Ca.DatePredicate=a,Ca}var Da={},qo;function s0(){if(qo)return Da;qo=1,Object.defineProperty(Da,"__esModule",{value:!0}),Da.ErrorPredicate=void 0;const e=Je();class a extends e.Predicate{constructor(s){super("error",s)}name(s){return this.addValidator({message:(r,n)=>`Expected ${n} to have name \`${s}\`, got \`${r.name}\``,validator:r=>r.name===s})}message(s){return this.addValidator({message:(r,n)=>`Expected ${n} message to be \`${s}\`, got \`${r.message}\``,validator:r=>r.message===s})}messageIncludes(s){return this.addValidator({message:(r,n)=>`Expected ${n} message to include \`${s}\`, got \`${r.message}\``,validator:r=>r.message.includes(s)})}hasKeys(...s){return this.addValidator({message:(r,n)=>`Expected ${n} message to have keys \`${s.join("`, `")}\``,validator:r=>s.every(n=>Object.prototype.hasOwnProperty.call(r,n))})}instanceOf(s){return this.addValidator({message:(r,n)=>`Expected ${n} \`${r.name}\` to be of type \`${s.name}\``,validator:r=>r instanceof s})}get typeError(){return this.instanceOf(TypeError)}get evalError(){return this.instanceOf(EvalError)}get rangeError(){return this.instanceOf(RangeError)}get referenceError(){return this.instanceOf(ReferenceError)}get syntaxError(){return this.instanceOf(SyntaxError)}get uriError(){return this.instanceOf(URIError)}}return Da.ErrorPredicate=a,Da}var Ta={},Bo;function i0(){if(Bo)return Ta;Bo=1,Object.defineProperty(Ta,"__esModule",{value:!0}),Ta.MapPredicate=void 0;const e=is(),a=tn(),i=us(),s=Je();class r extends s.Predicate{constructor(u){super("Map",u)}size(u){return this.addValidator({message:(c,d)=>`Expected ${d} to have size \`${u}\`, got \`${c.size}\``,validator:c=>c.size===u})}minSize(u){return this.addValidator({message:(c,d)=>`Expected ${d} to have a minimum size of \`${u}\`, got \`${c.size}\``,validator:c=>c.size>=u,negatedMessage:(c,d)=>`Expected ${d} to have a maximum size of \`${u-1}\`, got \`${c.size}\``})}maxSize(u){return this.addValidator({message:(c,d)=>`Expected ${d} to have a maximum size of \`${u}\`, got \`${c.size}\``,validator:c=>c.size<=u,negatedMessage:(c,d)=>`Expected ${d} to have a minimum size of \`${u+1}\`, got \`${c.size}\``})}hasKeys(...u){return this.addValidator({message:(c,d,f)=>`Expected ${d} to have keys \`${JSON.stringify(f)}\``,validator:c=>(0,a.default)(c,u)})}hasAnyKeys(...u){return this.addValidator({message:(c,d)=>`Expected ${d} to have any key of \`${JSON.stringify(u)}\``,validator:c=>u.some(d=>c.has(d))})}hasValues(...u){return this.addValidator({message:(c,d,f)=>`Expected ${d} to have values \`${JSON.stringify(f)}\``,validator:c=>(0,a.default)(new Set(c.values()),u)})}hasAnyValues(...u){return this.addValidator({message:(c,d)=>`Expected ${d} to have any value of \`${JSON.stringify(u)}\``,validator:c=>{const d=new Set(c.values());return u.some(f=>d.has(f))}})}keysOfType(u){return this.addValidator({message:(c,d,f)=>`(${d}) ${f}`,validator:c=>(0,i.default)(c.keys(),"keys",u)})}valuesOfType(u){return this.addValidator({message:(c,d,f)=>`(${d}) ${f}`,validator:c=>(0,i.default)(c.values(),"values",u)})}get empty(){return this.addValidator({message:(u,c)=>`Expected ${c} to be empty, got \`${JSON.stringify([...u])}\``,validator:u=>u.size===0})}get nonEmpty(){return this.addValidator({message:(u,c)=>`Expected ${c} to not be empty`,validator:u=>u.size>0})}deepEqual(u){return this.addValidator({message:(c,d)=>`Expected ${d} to be deeply equal to \`${JSON.stringify([...u])}\`, got \`${JSON.stringify([...c])}\``,validator:c=>e(c,u)})}}return Ta.MapPredicate=r,Ta}var Oa={},Vo;function o0(){if(Vo)return Oa;Vo=1,Object.defineProperty(Oa,"__esModule",{value:!0}),Oa.WeakMapPredicate=void 0;const e=tn(),a=Je();class i extends a.Predicate{constructor(r){super("WeakMap",r)}hasKeys(...r){return this.addValidator({message:(n,u,c)=>`Expected ${u} to have keys \`${JSON.stringify(c)}\``,validator:n=>(0,e.default)(n,r)})}hasAnyKeys(...r){return this.addValidator({message:(n,u)=>`Expected ${u} to have any key of \`${JSON.stringify(r)}\``,validator:n=>r.some(u=>n.has(u))})}}return Oa.WeakMapPredicate=i,Oa}var Pa={},Uo;function u0(){if(Uo)return Pa;Uo=1,Object.defineProperty(Pa,"__esModule",{value:!0}),Pa.SetPredicate=void 0;const e=is(),a=tn(),i=us(),s=Je();class r extends s.Predicate{constructor(u){super("Set",u)}size(u){return this.addValidator({message:(c,d)=>`Expected ${d} to have size \`${u}\`, got \`${c.size}\``,validator:c=>c.size===u})}minSize(u){return this.addValidator({message:(c,d)=>`Expected ${d} to have a minimum size of \`${u}\`, got \`${c.size}\``,validator:c=>c.size>=u,negatedMessage:(c,d)=>`Expected ${d} to have a maximum size of \`${u-1}\`, got \`${c.size}\``})}maxSize(u){return this.addValidator({message:(c,d)=>`Expected ${d} to have a maximum size of \`${u}\`, got \`${c.size}\``,validator:c=>c.size<=u,negatedMessage:(c,d)=>`Expected ${d} to have a minimum size of \`${u+1}\`, got \`${c.size}\``})}has(...u){return this.addValidator({message:(c,d,f)=>`Expected ${d} to have items \`${JSON.stringify(f)}\``,validator:c=>(0,a.default)(c,u)})}hasAny(...u){return this.addValidator({message:(c,d)=>`Expected ${d} to have any item of \`${JSON.stringify(u)}\``,validator:c=>u.some(d=>c.has(d))})}ofType(u){return this.addValidator({message:(c,d,f)=>`(${d}) ${f}`,validator:c=>(0,i.default)(c,"values",u)})}get empty(){return this.addValidator({message:(u,c)=>`Expected ${c} to be empty, got \`${JSON.stringify([...u])}\``,validator:u=>u.size===0})}get nonEmpty(){return this.addValidator({message:(u,c)=>`Expected ${c} to not be empty`,validator:u=>u.size>0})}deepEqual(u){return this.addValidator({message:(c,d)=>`Expected ${d} to be deeply equal to \`${JSON.stringify([...u])}\`, got \`${JSON.stringify([...c])}\``,validator:c=>e(c,u)})}}return Pa.SetPredicate=r,Pa}var $a={},zo;function l0(){if(zo)return $a;zo=1,Object.defineProperty($a,"__esModule",{value:!0}),$a.WeakSetPredicate=void 0;const e=tn(),a=Je();class i extends a.Predicate{constructor(r){super("WeakSet",r)}has(...r){return this.addValidator({message:(n,u,c)=>`Expected ${u} to have items \`${JSON.stringify(c)}\``,validator:n=>(0,e.default)(n,r)})}hasAny(...r){return this.addValidator({message:(n,u)=>`Expected ${u} to have any item of \`${JSON.stringify(r)}\``,validator:n=>r.some(u=>n.has(u))})}}return $a.WeakSetPredicate=i,$a}var La={},Ho;function c0(){if(Ho)return La;Ho=1,Object.defineProperty(La,"__esModule",{value:!0}),La.TypedArrayPredicate=void 0;const e=Je();class a extends e.Predicate{byteLength(s){return this.addValidator({message:(r,n)=>`Expected ${n} to have byte length of \`${s}\`, got \`${r.byteLength}\``,validator:r=>r.byteLength===s})}minByteLength(s){return this.addValidator({message:(r,n)=>`Expected ${n} to have a minimum byte length of \`${s}\`, got \`${r.byteLength}\``,validator:r=>r.byteLength>=s,negatedMessage:(r,n)=>`Expected ${n} to have a maximum byte length of \`${s-1}\`, got \`${r.byteLength}\``})}maxByteLength(s){return this.addValidator({message:(r,n)=>`Expected ${n} to have a maximum byte length of \`${s}\`, got \`${r.byteLength}\``,validator:r=>r.byteLength<=s,negatedMessage:(r,n)=>`Expected ${n} to have a minimum byte length of \`${s+1}\`, got \`${r.byteLength}\``})}length(s){return this.addValidator({message:(r,n)=>`Expected ${n} to have length \`${s}\`, got \`${r.length}\``,validator:r=>r.length===s})}minLength(s){return this.addValidator({message:(r,n)=>`Expected ${n} to have a minimum length of \`${s}\`, got \`${r.length}\``,validator:r=>r.length>=s,negatedMessage:(r,n)=>`Expected ${n} to have a maximum length of \`${s-1}\`, got \`${r.length}\``})}maxLength(s){return this.addValidator({message:(r,n)=>`Expected ${n} to have a maximum length of \`${s}\`, got \`${r.length}\``,validator:r=>r.length<=s,negatedMessage:(r,n)=>`Expected ${n} to have a minimum length of \`${s+1}\`, got \`${r.length}\``})}}return La.TypedArrayPredicate=a,La}var Ma={},Wo;function d0(){if(Wo)return Ma;Wo=1,Object.defineProperty(Ma,"__esModule",{value:!0}),Ma.ArrayBufferPredicate=void 0;const e=Je();class a extends e.Predicate{byteLength(s){return this.addValidator({message:(r,n)=>`Expected ${n} to have byte length of \`${s}\`, got \`${r.byteLength}\``,validator:r=>r.byteLength===s})}minByteLength(s){return this.addValidator({message:(r,n)=>`Expected ${n} to have a minimum byte length of \`${s}\`, got \`${r.byteLength}\``,validator:r=>r.byteLength>=s,negatedMessage:(r,n)=>`Expected ${n} to have a maximum byte length of \`${s-1}\`, got \`${r.byteLength}\``})}maxByteLength(s){return this.addValidator({message:(r,n)=>`Expected ${n} to have a maximum byte length of \`${s}\`, got \`${r.byteLength}\``,validator:r=>r.byteLength<=s,negatedMessage:(r,n)=>`Expected ${n} to have a minimum byte length of \`${s+1}\`, got \`${r.byteLength}\``})}}return Ma.ArrayBufferPredicate=a,Ma}var Ra={},Go;function f0(){if(Go)return Ra;Go=1,Object.defineProperty(Ra,"__esModule",{value:!0}),Ra.DataViewPredicate=void 0;const e=Je();class a extends e.Predicate{constructor(s){super("DataView",s)}byteLength(s){return this.addValidator({message:(r,n)=>`Expected ${n} to have byte length of \`${s}\`, got \`${r.byteLength}\``,validator:r=>r.byteLength===s})}minByteLength(s){return this.addValidator({message:(r,n)=>`Expected ${n} to have a minimum byte length of \`${s}\`, got \`${r.byteLength}\``,validator:r=>r.byteLength>=s,negatedMessage:(r,n)=>`Expected ${n} to have a maximum byte length of \`${s-1}\`, got \`${r.byteLength}\``})}maxByteLength(s){return this.addValidator({message:(r,n)=>`Expected ${n} to have a maximum byte length of \`${s}\`, got \`${r.byteLength}\``,validator:r=>r.byteLength<=s,negatedMessage:(r,n)=>`Expected ${n} to have a minimum byte length of \`${s+1}\`, got \`${r.byteLength}\``})}}return Ra.DataViewPredicate=a,Ra}var Ia={},Jo;function h0(){if(Jo)return Ia;Jo=1,Object.defineProperty(Ia,"__esModule",{value:!0}),Ia.AnyPredicate=void 0;const e=Bi(),a=en(),i=Ac();class s{constructor(n,u={}){Object.defineProperty(this,"predicates",{enumerable:!0,configurable:!0,writable:!0,value:n}),Object.defineProperty(this,"options",{enumerable:!0,configurable:!0,writable:!0,value:u})}[a.testSymbol](n,u,c,d){const f=new Map;for(const o of this.predicates)try{u(n,c,o,d);return}catch(h){if(n===void 0&&this.options.optional===!0)return;if(h instanceof e.ArgumentError)for(const[l,p]of h.validationErrors.entries()){const x=f.get(l);f.set(l,new Set([...x??[],...p]))}}if(f.size>0){const o=(0,i.generateArgumentErrorMessage)(f,!0);throw new e.ArgumentError(`Any predicate failed with the following errors:
|
|
85
|
-
${o}`,u,f)}}}return Ia.AnyPredicate=s,Ia}var
|
|
86
|
-
`};de.blockquote_close=function(e,
|
|
87
|
-
`};de.hr=function(e,
|
|
88
|
-
`};de.bullet_list_close=function(e,
|
|
89
|
-
`};de.ordered_list_open=function(e,
|
|
90
|
-
`};de.ordered_list_close=function(e,
|
|
80
|
+
`;try{const s=await fetch(r,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({query:i,operationName:"TrendingTags"})});if(!s.ok)throw new Error(`GraphQL request failed: ${s.statusText}`);const a=await s.json();if(a.errors)throw new Error(`GraphQL error: ${a.errors.map(n=>n.message).join(", ")}`);return a.data?.trendingTags?.tags||[]}catch(s){throw console.error("Failed to fetch trending tags:",s),s}}convertGQLItemsToThreeSpeakVideos(r){return r.map(i=>{let s=null;try{typeof i.spkvideo=="string"?s=JSON.parse(i.spkvideo):s=i.spkvideo}catch(a){console.error("Error parsing spkvideo JSON",a)}return{title:i.title||"Untitled",owner:i.author?.username||"",permlink:i.permlink||"",created:new Date(i.created_at),category:i.tags&&i.tags.length>0?i.tags[0]:"general",duration:s?.duration||i.json_metadata?.raw?.video?.info?.duration||0,thumbnail:s?.thumbnail_url||i.json_metadata?.raw?.video?.info?.thumbnail,numOfUpvotes:i.stats?.num_votes,numOfComments:i.stats?.num_comments,hiveValue:i.stats?.total_hive_reward,active_votes:i.stats?.active_voters?.map(a=>({voter:a.voter,percent:a.percent,rshares:a.rshares,weight:a.weight}))||[]}})}async getContentStats(r,i){try{const s=await ba.call("condenser_api","get_content",[r,i]);return{numOfUpvotes:s?.net_votes??0,numOfComments:s?.children??0,hiveValue:s?.pending_payout_value?parseFloat(s.pending_payout_value):0}}catch{return{numOfUpvotes:0,numOfComments:0,hiveValue:0}}}async getActiveVotes(r,i){try{return await ba.call("condenser_api","get_active_votes",[r,i])}catch(s){return console.error("Error calling get_active_votes:",s),[]}}async getCommentsList(r,i){try{const s=await ba.call("bridge","get_discussion",[r,i]);let a=Array.isArray(s)?s:s&&typeof s=="object"?Object.values(s):[];return a=a.filter(n=>!(n.author===r&&n.permlink===i)),a.map(n=>{const u=n.depth;if(typeof u=="string"){const d=parseInt(u,10);n.depth=Number.isFinite(d)?d:0}else(typeof u!="number"||!Number.isFinite(u))&&(n.depth=n.depth??0);const c=n.json_metadata;try{if(c&&typeof c=="string"){const d=c.trim();(d.startsWith("{")&&d.endsWith("}")||d.startsWith("[")&&d.endsWith("]"))&&(n.json_metadata_parsed=JSON.parse(d))}else c&&typeof c=="object"&&(n.json_metadata_parsed=c)}catch{console.warn(`Skipped invalid json_metadata for ${n.author}/${n.permlink}`)}return n})}catch(s){return console.error("Error fetching comments list:",s),[]}}async getMyVideos(r){const i=`${sr.domain}/mobile/api/my-videos`,s=await fetch(i,{method:"GET",headers:{"Content-Type":"application/json",Authorization:r}});if(s.ok){const a=await s.json();return Array.isArray(a)?a:[]}else throw console.error("Failed to fetch my videos:",s.statusText),new Error(`Failed to fetch my videos: ${s.status}`)}async getRankedPosts(r="trending",i="",s="hive.blog",a=20,n,u){try{const c={sort:r,tag:i,observer:s,limit:a};return n&&u&&(c.start_author=n,c.start_permlink=u),await ba.call("bridge","get_ranked_posts",c)}catch(c){return console.error("Error fetching ranked posts:",c),[]}}async getPostContent(r,i){try{return await ba.call("condenser_api","get_content",[r,i])}catch(s){return console.error("Error fetching post content:",s),null}}}const Te=new Vd,Br=e=>e?e.startsWith("Qm")||e.startsWith("baf")?`https://ipfs-3speak.b-cdn.net/ipfs/${e}`:e.startsWith("http")?e:e.startsWith("/")?`https://3speak.tv${e}`:e:"/placeholder.svg",Sc=({video:e,onVideoClick:r,onAuthorClick:i,isGrid:s=!1})=>{const[a,n]=O.useState({numOfUpvotes:e.numOfUpvotes,numOfComments:e.numOfComments,hiveValue:e.hiveValue});O.useEffect(()=>{if(a.numOfUpvotes===void 0&&e.numOfUpvotes===void 0){let d=!0;return(async()=>{try{const f=await Te.getContentStats(e.author||"",e.permlink||"");d&&n(f)}catch(f){console.error("Error fetching content stats for VideoCard:",f)}})(),()=>{d=!1}}else e.numOfUpvotes!==void 0&&n({numOfUpvotes:e.numOfUpvotes,numOfComments:e.numOfComments||0,hiveValue:e.hiveValue||0})},[e.author,e.permlink,a.numOfUpvotes,e.numOfUpvotes,e.numOfComments,e.hiveValue]);const u=d=>{if(!d)return"00:00";const f=Math.floor(d),o=Math.floor(f/3600),h=Math.floor(f%3600/60),l=f%60,p=x=>x.toString().padStart(2,"0");return f<60?`00:${p(l)}`:o===0?`${p(h)}:${p(l)}`:`${p(o)}:${p(h)}:${p(l)}`},c=d=>d==null?"":d>=1e6?`${(d/1e6).toFixed(1)}M`:d>=1e3?`${(d/1e3).toFixed(1)}K`:d.toString();return t.jsxs("div",{className:"group bg-card border border-border rounded-xl overflow-hidden shadow-card hover:shadow-card-hover transition-all duration-200 hover:-translate-y-1 cursor-pointer",children:[t.jsxs("div",{className:"relative aspect-video bg-muted overflow-hidden",onClick:()=>r(e),children:[t.jsx("img",{src:Br(e.thumbnail),alt:e.title,onError:d=>{d.target.src=`https://images.hive.blog/u/${e.author}/avatar`},className:"w-full h-full object-cover group-hover:scale-105 transition-transform duration-300"}),e.duration&&t.jsxs("div",{className:"absolute bottom-3 right-3 bg-black/80 text-white text-xs px-2 py-1 rounded-md flex items-center gap-1 backdrop-blur-sm",children:[t.jsx(z.Clock,{className:"w-3 h-3"}),u(e.duration)]}),t.jsx("div",{className:"absolute inset-0 flex items-center justify-center opacity-0 group-hover:opacity-100 transition-all duration-300 bg-black/20",children:t.jsx("div",{className:"bg-primary hover:bg-primary-hover rounded-full p-4 transform scale-75 group-hover:scale-100 transition-all duration-300 shadow-lg",children:t.jsx(z.Play,{className:"w-6 h-6 text-primary-foreground ml-0.5",fill:"currentColor"})})}),t.jsx("div",{className:"absolute inset-0 bg-gradient-overlay opacity-0 group-hover:opacity-30 transition-opacity duration-300"})]}),t.jsxs("div",{className:"p-4 space-y-3",children:[t.jsx("h3",{className:"font-semibold text-card-foreground line-clamp-2 group-hover:text-primary transition-colors cursor-pointer leading-tight",onClick:()=>r(e),children:e.title}),t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsxs("div",{className:"flex items-center gap-2 cursor-pointer hover:text-primary transition-colors group/author",onClick:()=>i(e.author),children:[t.jsx("img",{src:`https://images.hive.blog/u/${e.author}/avatar`,alt:e.author,className:"w-8 h-8 rounded-full object-cover border-2 border-border group-hover/author:border-primary transition-colors",onError:d=>{d.target.src="https://images.hive.blog/u/null/avatar"}}),t.jsxs("span",{className:"font-medium text-sm text-muted-foreground group-hover/author:text-primary transition-colors",children:["@",e.author]})]}),t.jsx("span",{className:"text-xs text-muted-foreground",children:ss.formatDistanceToNow(e.created,{addSuffix:!0})})]}),t.jsxs("div",{className:"flex items-center justify-between text-sm",children:[t.jsxs("div",{className:"flex items-center gap-4",children:[a.numOfUpvotes!=null&&t.jsxs("div",{className:"flex items-center gap-1 text-muted-foreground hover:text-primary transition-colors cursor-pointer",children:[t.jsx(z.ThumbsUp,{className:"w-4 h-4"}),t.jsx("span",{children:c(a.numOfUpvotes)})]}),a.numOfComments!=null&&t.jsxs("div",{className:"flex items-center gap-1 text-muted-foreground hover:text-primary transition-colors cursor-pointer",children:[t.jsx(z.MessageCircle,{className:"w-4 h-4"}),t.jsx("span",{children:c(a.numOfComments)})]})]}),a.hiveValue!=null&&a.hiveValue>0&&t.jsxs("div",{className:"text-primary font-semibold",children:["$",a.hiveValue.toFixed(2)]})]}),e.category&&t.jsx("div",{className:"flex items-center gap-2",children:t.jsx("span",{className:"inline-block bg-primary/10 text-primary text-xs px-2 py-1 rounded-full font-medium",children:e.category})})]})]})};var Ge=(e=>(e.HOME="home",e.TRENDING="trending",e.NEW_VIDEOS="newVideos",e.FIRST_UPLOADS="firstUploads",e.USER="user",e.COMMUNITY="community",e.RELATED="related",e.TAG_FEED="tag_feed",e.SEARCH="search",e))(Ge||{});const go=new Map,Cc=({title:e,author:r,permlink:i,createdAt:s,video:a,currentUser:n,isContentVoted:u=!1,description:c,onTapComment:d,onTapUpvote:f,onTapShare:o,onTapBookmark:h,onTapAuthor:l,onTapInfo:p})=>{const[x,w]=O.useState(a.numOfComments||0),[b,g]=O.useState(a.numOfUpvotes||0),[v,_]=O.useState(!1),[N,y]=O.useState(!1),[m,k]=O.useState(""),j=B=>{k(B),y(!0),setTimeout(()=>y(!1),3e3)},E=(B,L)=>`${B}:${L}`;O.useEffect(()=>{const B=E(r,i),L=go.get(B);L?(w(L.comments),g(L.upvotes)):(async()=>{const X=await Te.getContentStats(r,i);g(X.numOfUpvotes),w(X.numOfComments),go.set(E(r,i),{comments:X.numOfComments,upvotes:X.numOfUpvotes})})()},[r,i]);const D=()=>{d?d(r,i):j("Comments feature coming soon!")},C=()=>{f?f(r,i):j("Upvote feature requires authentication!")},P=()=>{if(o)o(r,i);else{const B=`https://3speak.tv/user/${r}/${i}`;navigator.share?navigator.share({title:e,url:B}):(navigator.clipboard.writeText(B),j("Link copied to clipboard!"))}},$=()=>{h?h(r,i):(_(!v),j(v?"Removed from bookmarks":"Added to bookmarks"))},H=()=>l?.(r,i),F=()=>{p?p(r,i):j("Video details coming soon!")};return t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"p-6 bg-card border-b border-border",children:[t.jsx("h1",{className:"text-xl font-bold text-card-foreground mb-4 line-clamp-2",children:e}),t.jsxs("div",{className:"flex items-start gap-4",children:[t.jsx("button",{onClick:H,className:"flex-shrink-0 group",children:t.jsx("img",{src:`https://images.hive.blog/u/${r}/avatar`,alt:r,className:"w-12 h-12 rounded-full object-cover border-2 border-border group-hover:border-primary transition-all duration-200",onError:B=>{B.target.src=`https://ui-avatars.com/api/?name=${r}&background=random`}})}),t.jsxs("div",{className:"flex-1",children:[t.jsx("div",{className:"flex items-center justify-between mb-4",children:t.jsxs("div",{children:[t.jsxs("button",{onClick:H,className:"font-semibold text-card-foreground hover:text-primary transition-colors text-base",children:["@",r]}),t.jsxs("div",{className:"flex items-center gap-4 mt-1 text-sm text-muted-foreground",children:[a.views&&t.jsxs("div",{className:"flex items-center gap-1",children:[t.jsx(z.Eye,{className:"w-4 h-4"}),t.jsxs("span",{children:[a.views.toLocaleString()," views"]})]}),s&&t.jsx("span",{children:ss.formatDistanceToNow(s,{addSuffix:!0})})]})]})}),t.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[t.jsxs("button",{type:"button",onClick:F,className:"inline-flex items-center gap-2 px-3 py-2 rounded-lg bg-muted text-muted-foreground hover:bg-primary/10 hover:text-primary transition-all duration-200","aria-label":"Show description",children:[t.jsx(z.Info,{className:"w-4 h-4"}),t.jsx("span",{className:"text-sm font-medium",children:"Info"})]}),t.jsxs("button",{type:"button",onClick:D,className:"inline-flex items-center gap-2 px-3 py-2 rounded-lg bg-muted text-muted-foreground hover:bg-primary/10 hover:text-primary transition-all duration-200","aria-label":"Show comments",children:[t.jsx(z.MessageCircle,{className:"w-4 h-4"}),t.jsx("span",{className:"text-sm font-medium",children:x})]}),t.jsxs("button",{type:"button",onClick:C,className:`inline-flex items-center gap-2 px-3 py-2 rounded-lg transition-all duration-200 ${u?"bg-primary/10 text-primary":"bg-muted text-muted-foreground hover:bg-primary/10 hover:text-primary"}`,"aria-label":"Show upvotes",children:[t.jsx(z.ThumbsUp,{className:`w-4 h-4 ${u?"fill-current":""}`}),t.jsx("span",{className:"text-sm font-medium",children:b})]}),t.jsxs("button",{type:"button",onClick:P,className:"inline-flex items-center gap-2 px-3 py-2 rounded-lg bg-muted text-muted-foreground hover:bg-secondary/10 hover:text-secondary transition-all duration-200","aria-label":"Share video",children:[t.jsx(z.Share2,{className:"w-4 h-4"}),t.jsx("span",{className:"text-sm font-medium",children:"Share"})]}),t.jsxs("button",{type:"button",onClick:$,className:`inline-flex items-center gap-2 px-3 py-2 rounded-lg transition-all duration-200 ${v?"bg-error/10 text-error":"bg-muted text-muted-foreground hover:bg-error/10 hover:text-error"}`,"aria-label":"Bookmark video",children:[t.jsx(z.Heart,{className:`w-4 h-4 ${v?"fill-current":""}`}),t.jsx("span",{className:"text-sm font-medium",children:v?"Saved":"Save"})]})]}),(a.hiveValue||a.category)&&t.jsxs("div",{className:"flex items-center gap-4 mt-4 pt-4 border-t border-border",children:[a.hiveValue&&a.hiveValue>0&&t.jsx("div",{className:"flex items-center gap-1 text-success font-semibold",children:t.jsxs("span",{children:["$",a.hiveValue.toFixed(2)," earned"]})}),a.category&&t.jsxs("div",{className:"flex items-center gap-1",children:[t.jsx(z.Users,{className:"w-4 h-4 text-muted-foreground"}),t.jsx("span",{className:"text-sm text-muted-foreground capitalize",children:a.category})]})]})]})]})]}),N&&t.jsx("div",{className:"fixed bottom-4 right-4 z-50 animate-slide-up",children:t.jsx("div",{className:"bg-card border border-border text-card-foreground rounded-lg px-4 py-3 shadow-lg max-w-sm",children:t.jsx("div",{className:"font-medium",children:m})})})]})},mn=new Map,is=({feedType:e,username:r,communityId:i,tag:s,onVideoClick:a,onAuthorClick:n})=>{const[u,c]=O.useState([]),[d,f]=O.useState(!0),[o,h]=O.useState(!1),[l,p]=O.useState(null),[x,w]=O.useState(!0),[b,g]=O.useState(0),v=O.useMemo(()=>{switch(e){case Ge.USER:return`user:${r||""}`;case Ge.COMMUNITY:return`community:${i||""}`;case Ge.TAG_FEED:return`tag:${s||""}`;case Ge.SEARCH:return`search:${s||""}`;default:return e}},[e,r,i,s]),_=O.useCallback(async j=>{if(j.author?.username){if(!j.permlink)return null;let E=null;try{typeof j.spkvideo=="string"?E=JSON.parse(j.spkvideo):E=j.spkvideo}catch(P){console.error("Error parsing spkvideo JSON",P)}const D=Br(E?.thumbnail_url)||Br(j.json_metadata?.raw?.video?.info?.thumbnail),C=E?.duration||j.json_metadata?.raw?.video?.info?.duration||0;return{title:j.title||"Untitled",author:j.author.username,permlink:j.permlink,created:new Date(j.created_at),category:j.tags&&j.tags.length>0?j.tags[0]:"general",duration:C,thumbnail:D,numOfUpvotes:j.stats?.num_votes||j.numOfUpvotes,numOfComments:j.stats?.num_comments||j.numOfComments,hiveValue:j.stats?.total_hive_reward||j.hiveValue}}return j.owner?{title:j.title||"Untitled",author:j.owner,permlink:j.permlink||"",created:new Date(j.created||Date.now()),category:j.category||"general",duration:j.duration,thumbnail:Br(j.thumbnail),numOfUpvotes:j.numOfUpvotes,numOfComments:j.numOfComments,hiveValue:j.hiveValue}:null},[]),N=O.useCallback(async(j,E=!1)=>{try{let D=[];switch(e){case Ge.SEARCH:s&&(D=await Te.getSearchFeed(s,j));break;case Ge.TAG_FEED:s&&(D=await Te.getTaggedVideos(s,j));break;case Ge.HOME:D=await Te.getHomeVideos(j);break;case Ge.TRENDING:D=await Te.getTrendingVideos(j);break;case Ge.NEW_VIDEOS:D=await Te.getNewVideos(j);break;case Ge.FIRST_UPLOADS:D=await Te.getFirstUploadsVideos(j);break;case Ge.USER:r&&(D=await Te.getUserVideos(r,j));break;case Ge.COMMUNITY:i&&(D=await Te.getCommunityVideos(i,j));break;case Ge.RELATED:r&&(D=await Te.getRelatedVideos(r,j));break}const P=(await Promise.all(D.map(_))).filter($=>$!==null);E?(c(P),mn.set(v,P)):c($=>{const H=[...$,...P];return mn.set(v,H),H}),w(D.length>=20),g(j+D.length),p(null)}catch(D){p(D instanceof Error?D.message:"Failed to load videos")}},[e,r,i,s,v,_]);O.useEffect(()=>{(async()=>{f(!0),c([]),g(0);const E=mn.get(v);E?.length&&(c(E),f(!1)),await N(0,!0),f(!1)})()},[v,N]);const y=O.useCallback(async()=>{o||!x||(h(!0),await N(b),h(!1))},[o,x,b,N]),m=O.useCallback(async()=>{mn.delete(v),f(!0),g(0),await N(0,!0),f(!1)},[v,N]);O.useEffect(()=>{const j=()=>{window.innerHeight+document.documentElement.scrollTop>=document.documentElement.offsetHeight-1e3&&y()};return window.addEventListener("scroll",j),()=>window.removeEventListener("scroll",j)},[y]);const k=()=>t.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-6",children:Array.from({length:8}).map((j,E)=>t.jsxs("div",{className:"bg-card border border-border rounded-xl overflow-hidden animate-pulse",children:[t.jsx("div",{className:"aspect-video bg-muted"}),t.jsxs("div",{className:"p-4 space-y-3",children:[t.jsx("div",{className:"h-4 bg-muted rounded w-3/4"}),t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx("div",{className:"w-8 h-8 bg-muted rounded-full"}),t.jsx("div",{className:"h-3 bg-muted rounded w-20"})]}),t.jsxs("div",{className:"flex justify-between",children:[t.jsx("div",{className:"h-3 bg-muted rounded w-16"}),t.jsx("div",{className:"h-3 bg-muted rounded w-12"})]})]})]},E))});return d&&u.length===0?t.jsx(k,{}):l&&u.length===0?t.jsx("div",{className:"flex flex-col items-center justify-center min-h-[400px] space-y-4",children:t.jsxs("div",{className:"text-center",children:[t.jsx("h3",{className:"text-lg font-semibold text-card-foreground mb-2",children:"Failed to load videos"}),t.jsx("p",{className:"text-muted-foreground mb-4",children:l}),t.jsxs("button",{onClick:m,className:"inline-flex items-center justify-center rounded-md border border-border bg-card px-4 py-2 text-sm font-medium text-card-foreground shadow-sm transition-colors hover:bg-card-hover focus:outline-none focus:ring-2 focus:ring-primary",children:[t.jsx(z.RefreshCw,{className:"w-4 h-4 mr-2"}),"Try Again"]})]})}):u.length===0?t.jsx("div",{className:"flex flex-col items-center justify-center min-h-[400px] space-y-4",children:t.jsxs("div",{className:"text-center",children:[t.jsx("h3",{className:"text-lg font-semibold text-card-foreground mb-2",children:"No videos found"}),t.jsx("p",{className:"text-muted-foreground mb-4",children:"Check back later for new content"}),t.jsxs("button",{onClick:m,className:"inline-flex items-center justify-center rounded-md border border-border bg-card px-4 py-2 text-sm font-medium text-card-foreground shadow-sm transition-colors hover:bg-card-hover focus:outline-none focus:ring-2 focus:ring-primary",children:[t.jsx(z.RefreshCw,{className:"w-4 h-4 mr-2"}),"Refresh"]})]})}):t.jsxs("div",{className:"space-y-6",children:[t.jsxs("div",{className:"flex justify-between items-center",children:[t.jsxs("h2",{className:"text-2xl font-bold text-card-foreground capitalize",children:[e.replace(/([A-Z])/g," $1").toLowerCase()," Videos"]}),t.jsxs("button",{onClick:m,className:"inline-flex items-center justify-center rounded-md border border-border bg-card px-3 py-2 text-sm font-medium text-card-foreground shadow-sm transition-colors hover:bg-card-hover focus:outline-none focus:ring-2 focus:ring-primary",children:[t.jsx(z.RefreshCw,{className:"w-4 h-4 mr-2"}),"Refresh"]})]}),t.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-6",children:u.map((j,E)=>t.jsx(Sc,{video:j,onVideoClick:a,onAuthorClick:n,isGrid:!0},`${j.author}-${j.permlink}-${E}`))}),x&&t.jsx("div",{className:"flex justify-center pt-8",children:o?t.jsxs("div",{className:"flex items-center gap-2 text-muted-foreground",children:[t.jsx(z.Loader2,{className:"w-4 h-4 animate-spin"}),"Loading more videos..."]}):t.jsx("button",{onClick:y,className:"inline-flex items-center justify-center rounded-md border border-border bg-card px-4 py-2 text-sm font-medium text-card-foreground shadow-sm transition-colors hover:bg-card-hover focus:outline-none focus:ring-2 focus:ring-primary",children:"Load More Videos"})})]})};var Es={},Sr={},Cr={},gn={exports:{}},bo;function Ud(){if(bo)return gn.exports;bo=1;const e=()=>{const r=Error.prepareStackTrace;Error.prepareStackTrace=(s,a)=>a;const i=new Error().stack.slice(1);return Error.prepareStackTrace=r,i};return gn.exports=e,gn.exports.default=e,gn.exports}var xa={},xo;function zd(){if(xo)return xa;xo=1,Object.defineProperty(xa,"__esModule",{value:!0}),xa.inferLabel=void 0;const e=()=>{};return xa.inferLabel=e,xa}var As={},bn={exports:{}},yo;function ua(){return yo||(yo=1,(function(e,r){Object.defineProperty(r,"__esModule",{value:!0});const i=["Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Uint16Array","Int32Array","Uint32Array","Float32Array","Float64Array","BigInt64Array","BigUint64Array"];function s(m){return i.includes(m)}const a=["Function","Generator","AsyncGenerator","GeneratorFunction","AsyncGeneratorFunction","AsyncFunction","Observable","Array","Buffer","Blob","Object","RegExp","Date","Error","Map","Set","WeakMap","WeakSet","ArrayBuffer","SharedArrayBuffer","DataView","Promise","URL","FormData","URLSearchParams","HTMLElement",...i];function n(m){return a.includes(m)}const u=["null","undefined","string","number","bigint","boolean","symbol"];function c(m){return u.includes(m)}function d(m){return k=>typeof k===m}const{toString:f}=Object.prototype,o=m=>{const k=f.call(m).slice(8,-1);if(/HTML\w+Element/.test(k)&&l.domElement(m))return"HTMLElement";if(n(k))return k},h=m=>k=>o(k)===m;function l(m){if(m===null)return"null";switch(typeof m){case"undefined":return"undefined";case"string":return"string";case"number":return"number";case"boolean":return"boolean";case"function":return"Function";case"bigint":return"bigint";case"symbol":return"symbol"}if(l.observable(m))return"Observable";if(l.array(m))return"Array";if(l.buffer(m))return"Buffer";const k=o(m);if(k)return k;if(m instanceof String||m instanceof Boolean||m instanceof Number)throw new TypeError("Please don't use object wrappers for primitive types");return"Object"}l.undefined=d("undefined"),l.string=d("string");const p=d("number");l.number=m=>p(m)&&!l.nan(m),l.bigint=d("bigint"),l.function_=d("function"),l.null_=m=>m===null,l.class_=m=>l.function_(m)&&m.toString().startsWith("class "),l.boolean=m=>m===!0||m===!1,l.symbol=d("symbol"),l.numericString=m=>l.string(m)&&!l.emptyStringOrWhitespace(m)&&!Number.isNaN(Number(m)),l.array=(m,k)=>Array.isArray(m)?l.function_(k)?m.every(k):!0:!1,l.buffer=m=>{var k,j,E,D;return(D=(E=(j=(k=m)===null||k===void 0?void 0:k.constructor)===null||j===void 0?void 0:j.isBuffer)===null||E===void 0?void 0:E.call(j,m))!==null&&D!==void 0?D:!1},l.blob=m=>h("Blob")(m),l.nullOrUndefined=m=>l.null_(m)||l.undefined(m),l.object=m=>!l.null_(m)&&(typeof m=="object"||l.function_(m)),l.iterable=m=>{var k;return l.function_((k=m)===null||k===void 0?void 0:k[Symbol.iterator])},l.asyncIterable=m=>{var k;return l.function_((k=m)===null||k===void 0?void 0:k[Symbol.asyncIterator])},l.generator=m=>{var k,j;return l.iterable(m)&&l.function_((k=m)===null||k===void 0?void 0:k.next)&&l.function_((j=m)===null||j===void 0?void 0:j.throw)},l.asyncGenerator=m=>l.asyncIterable(m)&&l.function_(m.next)&&l.function_(m.throw),l.nativePromise=m=>h("Promise")(m);const x=m=>{var k,j;return l.function_((k=m)===null||k===void 0?void 0:k.then)&&l.function_((j=m)===null||j===void 0?void 0:j.catch)};l.promise=m=>l.nativePromise(m)||x(m),l.generatorFunction=h("GeneratorFunction"),l.asyncGeneratorFunction=m=>o(m)==="AsyncGeneratorFunction",l.asyncFunction=m=>o(m)==="AsyncFunction",l.boundFunction=m=>l.function_(m)&&!m.hasOwnProperty("prototype"),l.regExp=h("RegExp"),l.date=h("Date"),l.error=h("Error"),l.map=m=>h("Map")(m),l.set=m=>h("Set")(m),l.weakMap=m=>h("WeakMap")(m),l.weakSet=m=>h("WeakSet")(m),l.int8Array=h("Int8Array"),l.uint8Array=h("Uint8Array"),l.uint8ClampedArray=h("Uint8ClampedArray"),l.int16Array=h("Int16Array"),l.uint16Array=h("Uint16Array"),l.int32Array=h("Int32Array"),l.uint32Array=h("Uint32Array"),l.float32Array=h("Float32Array"),l.float64Array=h("Float64Array"),l.bigInt64Array=h("BigInt64Array"),l.bigUint64Array=h("BigUint64Array"),l.arrayBuffer=h("ArrayBuffer"),l.sharedArrayBuffer=h("SharedArrayBuffer"),l.dataView=h("DataView"),l.enumCase=(m,k)=>Object.values(k).includes(m),l.directInstanceOf=(m,k)=>Object.getPrototypeOf(m)===k.prototype,l.urlInstance=m=>h("URL")(m),l.urlString=m=>{if(!l.string(m))return!1;try{return new URL(m),!0}catch{return!1}},l.truthy=m=>!!m,l.falsy=m=>!m,l.nan=m=>Number.isNaN(m),l.primitive=m=>l.null_(m)||c(typeof m),l.integer=m=>Number.isInteger(m),l.safeInteger=m=>Number.isSafeInteger(m),l.plainObject=m=>{if(f.call(m)!=="[object Object]")return!1;const k=Object.getPrototypeOf(m);return k===null||k===Object.getPrototypeOf({})},l.typedArray=m=>s(o(m));const w=m=>l.safeInteger(m)&&m>=0;l.arrayLike=m=>!l.nullOrUndefined(m)&&!l.function_(m)&&w(m.length),l.inRange=(m,k)=>{if(l.number(k))return m>=Math.min(0,k)&&m<=Math.max(k,0);if(l.array(k)&&k.length===2)return m>=Math.min(...k)&&m<=Math.max(...k);throw new TypeError(`Invalid range: ${JSON.stringify(k)}`)};const b=1,g=["innerHTML","ownerDocument","style","attributes","nodeValue"];l.domElement=m=>l.object(m)&&m.nodeType===b&&l.string(m.nodeName)&&!l.plainObject(m)&&g.every(k=>k in m),l.observable=m=>{var k,j,E,D;return m?m===((j=(k=m)[Symbol.observable])===null||j===void 0?void 0:j.call(k))||m===((D=(E=m)["@@observable"])===null||D===void 0?void 0:D.call(E)):!1},l.nodeStream=m=>l.object(m)&&l.function_(m.pipe)&&!l.observable(m),l.infinite=m=>m===1/0||m===-1/0;const v=m=>k=>l.integer(k)&&Math.abs(k%2)===m;l.evenInteger=v(0),l.oddInteger=v(1),l.emptyArray=m=>l.array(m)&&m.length===0,l.nonEmptyArray=m=>l.array(m)&&m.length>0,l.emptyString=m=>l.string(m)&&m.length===0;const _=m=>l.string(m)&&!/\S/.test(m);l.emptyStringOrWhitespace=m=>l.emptyString(m)||_(m),l.nonEmptyString=m=>l.string(m)&&m.length>0,l.nonEmptyStringAndNotWhitespace=m=>l.string(m)&&!l.emptyStringOrWhitespace(m),l.emptyObject=m=>l.object(m)&&!l.map(m)&&!l.set(m)&&Object.keys(m).length===0,l.nonEmptyObject=m=>l.object(m)&&!l.map(m)&&!l.set(m)&&Object.keys(m).length>0,l.emptySet=m=>l.set(m)&&m.size===0,l.nonEmptySet=m=>l.set(m)&&m.size>0,l.emptyMap=m=>l.map(m)&&m.size===0,l.nonEmptyMap=m=>l.map(m)&&m.size>0,l.propertyKey=m=>l.any([l.string,l.number,l.symbol],m),l.formData=m=>h("FormData")(m),l.urlSearchParams=m=>h("URLSearchParams")(m);const N=(m,k,j)=>{if(!l.function_(k))throw new TypeError(`Invalid predicate: ${JSON.stringify(k)}`);if(j.length===0)throw new TypeError("Invalid number of values");return m.call(j,k)};l.any=(m,...k)=>(l.array(m)?m:[m]).some(E=>N(Array.prototype.some,E,k)),l.all=(m,...k)=>N(Array.prototype.every,m,k);const y=(m,k,j,E={})=>{if(!m){const{multipleValues:D}=E,C=D?`received values of types ${[...new Set(j.map(P=>`\`${l(P)}\``))].join(", ")}`:`received value of type \`${l(j)}\``;throw new TypeError(`Expected value which is \`${k}\`, ${C}.`)}};r.assert={undefined:m=>y(l.undefined(m),"undefined",m),string:m=>y(l.string(m),"string",m),number:m=>y(l.number(m),"number",m),bigint:m=>y(l.bigint(m),"bigint",m),function_:m=>y(l.function_(m),"Function",m),null_:m=>y(l.null_(m),"null",m),class_:m=>y(l.class_(m),"Class",m),boolean:m=>y(l.boolean(m),"boolean",m),symbol:m=>y(l.symbol(m),"symbol",m),numericString:m=>y(l.numericString(m),"string with a number",m),array:(m,k)=>{y(l.array(m),"Array",m),k&&m.forEach(k)},buffer:m=>y(l.buffer(m),"Buffer",m),blob:m=>y(l.blob(m),"Blob",m),nullOrUndefined:m=>y(l.nullOrUndefined(m),"null or undefined",m),object:m=>y(l.object(m),"Object",m),iterable:m=>y(l.iterable(m),"Iterable",m),asyncIterable:m=>y(l.asyncIterable(m),"AsyncIterable",m),generator:m=>y(l.generator(m),"Generator",m),asyncGenerator:m=>y(l.asyncGenerator(m),"AsyncGenerator",m),nativePromise:m=>y(l.nativePromise(m),"native Promise",m),promise:m=>y(l.promise(m),"Promise",m),generatorFunction:m=>y(l.generatorFunction(m),"GeneratorFunction",m),asyncGeneratorFunction:m=>y(l.asyncGeneratorFunction(m),"AsyncGeneratorFunction",m),asyncFunction:m=>y(l.asyncFunction(m),"AsyncFunction",m),boundFunction:m=>y(l.boundFunction(m),"Function",m),regExp:m=>y(l.regExp(m),"RegExp",m),date:m=>y(l.date(m),"Date",m),error:m=>y(l.error(m),"Error",m),map:m=>y(l.map(m),"Map",m),set:m=>y(l.set(m),"Set",m),weakMap:m=>y(l.weakMap(m),"WeakMap",m),weakSet:m=>y(l.weakSet(m),"WeakSet",m),int8Array:m=>y(l.int8Array(m),"Int8Array",m),uint8Array:m=>y(l.uint8Array(m),"Uint8Array",m),uint8ClampedArray:m=>y(l.uint8ClampedArray(m),"Uint8ClampedArray",m),int16Array:m=>y(l.int16Array(m),"Int16Array",m),uint16Array:m=>y(l.uint16Array(m),"Uint16Array",m),int32Array:m=>y(l.int32Array(m),"Int32Array",m),uint32Array:m=>y(l.uint32Array(m),"Uint32Array",m),float32Array:m=>y(l.float32Array(m),"Float32Array",m),float64Array:m=>y(l.float64Array(m),"Float64Array",m),bigInt64Array:m=>y(l.bigInt64Array(m),"BigInt64Array",m),bigUint64Array:m=>y(l.bigUint64Array(m),"BigUint64Array",m),arrayBuffer:m=>y(l.arrayBuffer(m),"ArrayBuffer",m),sharedArrayBuffer:m=>y(l.sharedArrayBuffer(m),"SharedArrayBuffer",m),dataView:m=>y(l.dataView(m),"DataView",m),enumCase:(m,k)=>y(l.enumCase(m,k),"EnumCase",m),urlInstance:m=>y(l.urlInstance(m),"URL",m),urlString:m=>y(l.urlString(m),"string with a URL",m),truthy:m=>y(l.truthy(m),"truthy",m),falsy:m=>y(l.falsy(m),"falsy",m),nan:m=>y(l.nan(m),"NaN",m),primitive:m=>y(l.primitive(m),"primitive",m),integer:m=>y(l.integer(m),"integer",m),safeInteger:m=>y(l.safeInteger(m),"integer",m),plainObject:m=>y(l.plainObject(m),"plain object",m),typedArray:m=>y(l.typedArray(m),"TypedArray",m),arrayLike:m=>y(l.arrayLike(m),"array-like",m),domElement:m=>y(l.domElement(m),"HTMLElement",m),observable:m=>y(l.observable(m),"Observable",m),nodeStream:m=>y(l.nodeStream(m),"Node.js Stream",m),infinite:m=>y(l.infinite(m),"infinite number",m),emptyArray:m=>y(l.emptyArray(m),"empty array",m),nonEmptyArray:m=>y(l.nonEmptyArray(m),"non-empty array",m),emptyString:m=>y(l.emptyString(m),"empty string",m),emptyStringOrWhitespace:m=>y(l.emptyStringOrWhitespace(m),"empty string or whitespace",m),nonEmptyString:m=>y(l.nonEmptyString(m),"non-empty string",m),nonEmptyStringAndNotWhitespace:m=>y(l.nonEmptyStringAndNotWhitespace(m),"non-empty string and not whitespace",m),emptyObject:m=>y(l.emptyObject(m),"empty object",m),nonEmptyObject:m=>y(l.nonEmptyObject(m),"non-empty object",m),emptySet:m=>y(l.emptySet(m),"empty set",m),nonEmptySet:m=>y(l.nonEmptySet(m),"non-empty set",m),emptyMap:m=>y(l.emptyMap(m),"empty map",m),nonEmptyMap:m=>y(l.nonEmptyMap(m),"non-empty map",m),propertyKey:m=>y(l.propertyKey(m),"PropertyKey",m),formData:m=>y(l.formData(m),"FormData",m),urlSearchParams:m=>y(l.urlSearchParams(m),"URLSearchParams",m),evenInteger:m=>y(l.evenInteger(m),"even integer",m),oddInteger:m=>y(l.oddInteger(m),"odd integer",m),directInstanceOf:(m,k)=>y(l.directInstanceOf(m,k),"T",m),inRange:(m,k)=>y(l.inRange(m,k),"in range",m),any:(m,...k)=>y(l.any(m,...k),"predicate returns truthy for any value",k,{multipleValues:!0}),all:(m,...k)=>y(l.all(m,...k),"predicate returns truthy for all values",k,{multipleValues:!0})},Object.defineProperties(l,{class:{value:l.class_},function:{value:l.function_},null:{value:l.null_}}),Object.defineProperties(r.assert,{class:{value:r.assert.class_},function:{value:r.assert.function_},null:{value:r.assert.null_}}),r.default=l,e.exports=l,e.exports.default=l,e.exports.assert=r.assert})(bn,bn.exports)),bn.exports}var ya={},va={},vo;function Hd(){if(vo)return va;vo=1,Object.defineProperty(va,"__esModule",{value:!0}),va.generateStackTrace=void 0;const e=()=>new RangeError("INTERNAL_OW_ERROR").stack;return va.generateStackTrace=e,va}var wo;function Vi(){if(wo)return ya;wo=1,Object.defineProperty(ya,"__esModule",{value:!0}),ya.ArgumentError=void 0;const e=Hd(),r=(s,a)=>`${s.name}: ${s.message}
|
|
81
|
+
${a}`;class i extends Error{constructor(a,n,u=new Map){super(a),Object.defineProperty(this,"validationErrors",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.name="ArgumentError",Error.captureStackTrace?Error.captureStackTrace(this,n):this.stack=r(this,(0,e.generateStackTrace)()),this.validationErrors=u}}return ya.ArgumentError=i,ya}var wa={},xn={},_o;function Wd(){return _o||(_o=1,Object.defineProperty(xn,"__esModule",{value:!0}),xn.default=()=>Math.random().toString(16).slice(2)),xn}var ko;function Gd(){if(ko)return wa;ko=1,Object.defineProperty(wa,"__esModule",{value:!0}),wa.not=void 0;const e=Wd(),r=Je(),i=s=>{const a=s.addValidator;return s.addValidator=n=>{const{validator:u,message:c,negatedMessage:d}=n,f=(0,e.default)();return n.message=(o,h)=>d?d(o,h):c(o,f).replace(/ to /,"$¬ ").replace(f,h),n.validator=o=>!u(o),s[r.validatorSymbol].push(n),s.addValidator=a,s},s};return wa.not=i,wa}var Ss={},No;function en(){return No||(No=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.isPredicate=e.testSymbol=void 0,e.testSymbol=Symbol("test");const r=i=>!!i[e.testSymbol];e.isPredicate=r})(Ss)),Ss}var _a={},jo;function Dc(){if(jo)return _a;jo=1,Object.defineProperty(_a,"__esModule",{value:!0}),_a.generateArgumentErrorMessage=void 0;const e=(r,i=!1)=>{const s=[],a=[...r.entries()],n=a.some(([,u])=>u.size!==1);if(a.length===1){const[,u]=a[0];if(!i&&u.size===1){const[c]=u;return c}for(const c of u)s.push(`${i?" - ":""}${c}`);return s.join(`
|
|
82
|
+
`)}if(!n)return a.map(([,[u]])=>` - ${u}`).join(`
|
|
83
|
+
`);for(const[u,c]of a){s.push(`Errors from the "${u}" predicate:`);for(const d of c)s.push(` - ${d}`)}return s.join(`
|
|
84
|
+
`)};return _a.generateArgumentErrorMessage=e,_a}var Eo;function Je(){return Eo||(Eo=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Predicate=e.validatorSymbol=void 0;const r=ua(),i=Vi(),s=Gd(),a=en(),n=Dc();e.validatorSymbol=Symbol("validators");class u{constructor(d,f={}){Object.defineProperty(this,"type",{enumerable:!0,configurable:!0,writable:!0,value:d}),Object.defineProperty(this,"options",{enumerable:!0,configurable:!0,writable:!0,value:f}),Object.defineProperty(this,"context",{enumerable:!0,configurable:!0,writable:!0,value:{validators:[]}}),this.context={...this.context,...this.options};const o=this.type.charAt(0).toLowerCase()+this.type.slice(1);this.addValidator({message:(h,l)=>`Expected ${l?.slice(this.type.length+1)||"argument"} to be of type \`${this.type}\` but received type \`${(0,r.default)(h)}\``,validator:h=>r.default[o](h)})}[a.testSymbol](d,f,o,h){const l=new Map;for(const{validator:p,message:x}of this.context.validators){if(this.options.optional===!0&&d===void 0)continue;let w;try{w=p(d)}catch(m){w=m}if(w===!0)continue;const b=r.default.function_(o)?o():o,g=b&&h?`\`${b}\``:b,v=g?`${this.type} ${g}`:this.type,_=b||this.type,N=l.get(_),y=x(d,v,w);N?N.add(y):l.set(_,new Set([y]))}if(l.size>0){const p=(0,n.generateArgumentErrorMessage)(l);throw new i.ArgumentError(p,f,l)}}get[e.validatorSymbol](){return this.context.validators}get not(){return(0,s.not)(this)}validate(d){return this.addValidator({message:(f,o,h)=>typeof h=="string"?`(${o}) ${h}`:h(o),validator:f=>{const{message:o,validator:h}=d(f);return h?!0:o}})}is(d){return this.addValidator({message:(f,o,h)=>h?`(${o}) ${h}`:`Expected ${o} \`${f}\` to pass custom validation function`,validator:d})}message(d){const{validators:f}=this.context;return f[f.length-1].message=(o,h)=>typeof d=="function"?d(o,h):d,this}addValidator(d){return this.context.validators.push(d),this}}e.Predicate=u})(As)),As}var yn={},Cs={},ka={},Ds,Ao;function Jd(){return Ao||(Ao=1,Ds=function(e){return!isNaN(Date.parse(e))}),Ds}var So;function Yd(){if(So)return ka;So=1,Object.defineProperty(ka,"__esModule",{value:!0}),ka.StringPredicate=void 0;const e=ua(),r=Jd(),i=Je();class s extends i.Predicate{constructor(n){super("string",n)}length(n){return this.addValidator({message:(u,c)=>`Expected ${c} to have length \`${n}\`, got \`${u}\``,validator:u=>u.length===n})}minLength(n){return this.addValidator({message:(u,c)=>`Expected ${c} to have a minimum length of \`${n}\`, got \`${u}\``,validator:u=>u.length>=n,negatedMessage:(u,c)=>`Expected ${c} to have a maximum length of \`${n-1}\`, got \`${u}\``})}maxLength(n){return this.addValidator({message:(u,c)=>`Expected ${c} to have a maximum length of \`${n}\`, got \`${u}\``,validator:u=>u.length<=n,negatedMessage:(u,c)=>`Expected ${c} to have a minimum length of \`${n+1}\`, got \`${u}\``})}matches(n){return this.addValidator({message:(u,c)=>`Expected ${c} to match \`${n}\`, got \`${u}\``,validator:u=>n.test(u)})}startsWith(n){return this.addValidator({message:(u,c)=>`Expected ${c} to start with \`${n}\`, got \`${u}\``,validator:u=>u.startsWith(n)})}endsWith(n){return this.addValidator({message:(u,c)=>`Expected ${c} to end with \`${n}\`, got \`${u}\``,validator:u=>u.endsWith(n)})}includes(n){return this.addValidator({message:(u,c)=>`Expected ${c} to include \`${n}\`, got \`${u}\``,validator:u=>u.includes(n)})}oneOf(n){return this.addValidator({message:(u,c)=>{let d=JSON.stringify(n);if(n.length>10){const f=n.length-10;d=JSON.stringify(n.slice(0,10)).replace(/]$/,`,…+${f} more]`)}return`Expected ${c} to be one of \`${d}\`, got \`${u}\``},validator:u=>n.includes(u)})}get empty(){return this.addValidator({message:(n,u)=>`Expected ${u} to be empty, got \`${n}\``,validator:n=>n===""})}get nonEmpty(){return this.addValidator({message:(n,u)=>`Expected ${u} to not be empty`,validator:n=>n!==""})}equals(n){return this.addValidator({message:(u,c)=>`Expected ${c} to be equal to \`${n}\`, got \`${u}\``,validator:u=>u===n})}get alphanumeric(){return this.addValidator({message:(n,u)=>`Expected ${u} to be alphanumeric, got \`${n}\``,validator:n=>/^[a-z\d]+$/i.test(n)})}get alphabetical(){return this.addValidator({message:(n,u)=>`Expected ${u} to be alphabetical, got \`${n}\``,validator:n=>/^[a-z]+$/gi.test(n)})}get numeric(){return this.addValidator({message:(n,u)=>`Expected ${u} to be numeric, got \`${n}\``,validator:n=>/^[+-]?\d+$/i.test(n)})}get date(){return this.addValidator({message:(n,u)=>`Expected ${u} to be a date, got \`${n}\``,validator:r})}get lowercase(){return this.addValidator({message:(n,u)=>`Expected ${u} to be lowercase, got \`${n}\``,validator:n=>n.trim()!==""&&n===n.toLowerCase()})}get uppercase(){return this.addValidator({message:(n,u)=>`Expected ${u} to be uppercase, got \`${n}\``,validator:n=>n.trim()!==""&&n===n.toUpperCase()})}get url(){return this.addValidator({message:(n,u)=>`Expected ${u} to be a URL, got \`${n}\``,validator:e.default.urlString})}}return ka.StringPredicate=s,ka}var Na={},Co;function Zd(){if(Co)return Na;Co=1,Object.defineProperty(Na,"__esModule",{value:!0}),Na.NumberPredicate=void 0;const e=ua(),r=Je();class i extends r.Predicate{constructor(a){super("number",a)}inRange(a,n){return this.addValidator({message:(u,c)=>`Expected ${c} to be in range [${a}..${n}], got ${u}`,validator:u=>e.default.inRange(u,[a,n])})}greaterThan(a){return this.addValidator({message:(n,u)=>`Expected ${u} to be greater than ${a}, got ${n}`,validator:n=>n>a})}greaterThanOrEqual(a){return this.addValidator({message:(n,u)=>`Expected ${u} to be greater than or equal to ${a}, got ${n}`,validator:n=>n>=a})}lessThan(a){return this.addValidator({message:(n,u)=>`Expected ${u} to be less than ${a}, got ${n}`,validator:n=>n<a})}lessThanOrEqual(a){return this.addValidator({message:(n,u)=>`Expected ${u} to be less than or equal to ${a}, got ${n}`,validator:n=>n<=a})}equal(a){return this.addValidator({message:(n,u)=>`Expected ${u} to be equal to ${a}, got ${n}`,validator:n=>n===a})}oneOf(a){return this.addValidator({message:(n,u)=>{let c=JSON.stringify(a);if(a.length>10){const d=a.length-10;c=JSON.stringify(a.slice(0,10)).replace(/]$/,`,…+${d} more]`)}return`Expected ${u} to be one of \`${c}\`, got ${n}`},validator:n=>a.includes(n)})}get integer(){return this.addValidator({message:(a,n)=>`Expected ${n} to be an integer, got ${a}`,validator:a=>e.default.integer(a)})}get finite(){return this.addValidator({message:(a,n)=>`Expected ${n} to be finite, got ${a}`,validator:a=>!e.default.infinite(a)})}get infinite(){return this.addValidator({message:(a,n)=>`Expected ${n} to be infinite, got ${a}`,validator:a=>e.default.infinite(a)})}get positive(){return this.addValidator({message:(a,n)=>`Expected ${n} to be positive, got ${a}`,validator:a=>a>0})}get negative(){return this.addValidator({message:(a,n)=>`Expected ${n} to be negative, got ${a}`,validator:a=>a<0})}get integerOrInfinite(){return this.addValidator({message:(a,n)=>`Expected ${n} to be an integer or infinite, got ${a}`,validator:a=>e.default.integer(a)||e.default.infinite(a)})}get uint8(){return this.integer.inRange(0,255)}get uint16(){return this.integer.inRange(0,65535)}get uint32(){return this.integer.inRange(0,4294967295)}get int8(){return this.integer.inRange(-128,127)}get int16(){return this.integer.inRange(-32768,32767)}get int32(){return this.integer.inRange(-2147483648,2147483647)}}return Na.NumberPredicate=i,Na}var ja={},Do;function Xd(){if(Do)return ja;Do=1,Object.defineProperty(ja,"__esModule",{value:!0}),ja.BigIntPredicate=void 0;const e=Je();class r extends e.Predicate{constructor(s){super("bigint",s)}}return ja.BigIntPredicate=r,ja}var Ea={},To;function Kd(){if(To)return Ea;To=1,Object.defineProperty(Ea,"__esModule",{value:!0}),Ea.BooleanPredicate=void 0;const e=Je();class r extends e.Predicate{constructor(s){super("boolean",s)}get true(){return this.addValidator({message:(s,a)=>`Expected ${a} to be true, got ${s}`,validator:s=>s})}get false(){return this.addValidator({message:(s,a)=>`Expected ${a} to be false, got ${s}`,validator:s=>!s})}}return Ea.BooleanPredicate=r,Ea}var Aa={},Xa={exports:{}};Xa.exports;var Oo;function os(){return Oo||(Oo=1,(function(e,r){var i=200,s="__lodash_hash_undefined__",a=1,n=2,u=9007199254740991,c="[object Arguments]",d="[object Array]",f="[object AsyncFunction]",o="[object Boolean]",h="[object Date]",l="[object Error]",p="[object Function]",x="[object GeneratorFunction]",w="[object Map]",b="[object Number]",g="[object Null]",v="[object Object]",_="[object Promise]",N="[object Proxy]",y="[object RegExp]",m="[object Set]",k="[object String]",j="[object Symbol]",E="[object Undefined]",D="[object WeakMap]",C="[object ArrayBuffer]",P="[object DataView]",$="[object Float32Array]",H="[object Float64Array]",F="[object Int8Array]",B="[object Int16Array]",L="[object Int32Array]",G="[object Uint8Array]",X="[object Uint8ClampedArray]",ee="[object Uint16Array]",R="[object Uint32Array]",se=/[\\^$.*+?()[\]{}|]/g,I=/^\[object .+?Constructor\]$/,V=/^(?:0|[1-9]\d*)$/,J={};J[$]=J[H]=J[F]=J[B]=J[L]=J[G]=J[X]=J[ee]=J[R]=!0,J[c]=J[d]=J[C]=J[o]=J[P]=J[h]=J[l]=J[p]=J[w]=J[b]=J[v]=J[y]=J[m]=J[k]=J[D]=!1;var oe=typeof gr=="object"&&gr&&gr.Object===Object&&gr,K=typeof self=="object"&&self&&self.Object===Object&&self,te=oe||K||Function("return this")(),pe=r&&!r.nodeType&&r,Ee=pe&&!0&&e&&!e.nodeType&&e,Z=Ee&&Ee.exports===pe,ae=Z&&oe.process,re=(function(){try{return ae&&ae.binding&&ae.binding("util")}catch{}})(),ce=re&&re.isTypedArray;function xe(T,U){for(var Q=-1,le=T==null?0:T.length,Oe=0,ye=[];++Q<le;){var Fe=T[Q];U(Fe,Q,T)&&(ye[Oe++]=Fe)}return ye}function ge(T,U){for(var Q=-1,le=U.length,Oe=T.length;++Q<le;)T[Oe+Q]=U[Q];return T}function ke(T,U){for(var Q=-1,le=T==null?0:T.length;++Q<le;)if(U(T[Q],Q,T))return!0;return!1}function me(T,U){for(var Q=-1,le=Array(T);++Q<T;)le[Q]=U(Q);return le}function Ye(T){return function(U){return T(U)}}function we(T,U){return T.has(U)}function fe(T,U){return T?.[U]}function Ae(T){var U=-1,Q=Array(T.size);return T.forEach(function(le,Oe){Q[++U]=[Oe,le]}),Q}function Pe(T,U){return function(Q){return T(U(Q))}}function Ve(T){var U=-1,Q=Array(T.size);return T.forEach(function(le){Q[++U]=le}),Q}var St=Array.prototype,Jt=Function.prototype,Ze=Object.prototype,Yt=te["__core-js_shared__"],vr=Jt.toString,Qe=Ze.hasOwnProperty,Ct=(function(){var T=/[^.]+$/.exec(Yt&&Yt.keys&&Yt.keys.IE_PROTO||"");return T?"Symbol(src)_1."+T:""})(),xt=Ze.toString,or=RegExp("^"+vr.call(Qe).replace(se,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Zt=Z?te.Buffer:void 0,Dt=te.Symbol,yt=te.Uint8Array,Tt=Ze.propertyIsEnumerable,Gr=St.splice,ft=Dt?Dt.toStringTag:void 0,wr=Object.getOwnPropertySymbols,A=Zt?Zt.isBuffer:void 0,S=Pe(Object.keys,Object),M=$t(te,"DataView"),W=$t(te,"Map"),ne=$t(te,"Promise"),he=$t(te,"Set"),Ne=$t(te,"WeakMap"),Ce=$t(Object,"create"),ht=tt(M),at=tt(W),Xe=tt(ne),vt=tt(he),wt=tt(Ne),_t=Dt?Dt.prototype:void 0,et=_t?_t.valueOf:void 0;function ze(T){var U=-1,Q=T==null?0:T.length;for(this.clear();++U<Q;){var le=T[U];this.set(le[0],le[1])}}function Bt(){this.__data__=Ce?Ce(null):{},this.size=0}function Me(T){var U=this.has(T)&&delete this.__data__[T];return this.size-=U?1:0,U}function Ot(T){var U=this.__data__;if(Ce){var Q=U[T];return Q===s?void 0:Q}return Qe.call(U,T)?U[T]:void 0}function Vt(T){var U=this.__data__;return Ce?U[T]!==void 0:Qe.call(U,T)}function pt(T,U){var Q=this.__data__;return this.size+=this.has(T)?0:1,Q[T]=Ce&&U===void 0?s:U,this}ze.prototype.clear=Bt,ze.prototype.delete=Me,ze.prototype.get=Ot,ze.prototype.has=Vt,ze.prototype.set=pt;function Pt(T){var U=-1,Q=T==null?0:T.length;for(this.clear();++U<Q;){var le=T[U];this.set(le[0],le[1])}}function Xt(){this.__data__=[],this.size=0}function on(T){var U=this.__data__,Q=Le(U,T);if(Q<0)return!1;var le=U.length-1;return Q==le?U.pop():Gr.call(U,Q,1),--this.size,!0}function _s(T){var U=this.__data__,Q=Le(U,T);return Q<0?void 0:U[Q][1]}function Jr(T){return Le(this.__data__,T)>-1}function ca(T,U){var Q=this.__data__,le=Le(Q,T);return le<0?(++this.size,Q.push([T,U])):Q[le][1]=U,this}Pt.prototype.clear=Xt,Pt.prototype.delete=on,Pt.prototype.get=_s,Pt.prototype.has=Jr,Pt.prototype.set=ca;function Ut(T){var U=-1,Q=T==null?0:T.length;for(this.clear();++U<Q;){var le=T[U];this.set(le[0],le[1])}}function un(){this.size=0,this.__data__={hash:new ze,map:new(W||Pt),string:new ze}}function ln(T){var U=je(this,T).delete(T);return this.size-=U?1:0,U}function _r(T){return je(this,T).get(T)}function cn(T){return je(this,T).has(T)}function ks(T,U){var Q=je(this,T),le=Q.size;return Q.set(T,U),this.size+=Q.size==le?0:1,this}Ut.prototype.clear=un,Ut.prototype.delete=ln,Ut.prototype.get=_r,Ut.prototype.has=cn,Ut.prototype.set=ks;function q(T){var U=-1,Q=T==null?0:T.length;for(this.__data__=new Ut;++U<Q;)this.add(T[U])}function Y(T){return this.__data__.set(T,s),this}function ie(T){return this.__data__.has(T)}q.prototype.add=q.prototype.push=Y,q.prototype.has=ie;function ue(T){var U=this.__data__=new Pt(T);this.size=U.size}function De(){this.__data__=new Pt,this.size=0}function _e(T){var U=this.__data__,Q=U.delete(T);return this.size=U.size,Q}function $e(T){return this.__data__.get(T)}function Ie(T){return this.__data__.has(T)}function mt(T,U){var Q=this.__data__;if(Q instanceof Pt){var le=Q.__data__;if(!W||le.length<i-1)return le.push([T,U]),this.size=++Q.size,this;Q=this.__data__=new Ut(le)}return Q.set(T,U),this.size=Q.size,this}ue.prototype.clear=De,ue.prototype.delete=_e,ue.prototype.get=$e,ue.prototype.has=Ie,ue.prototype.set=mt;function qe(T,U){var Q=dr(T),le=!Q&&Xr(T),Oe=!Q&&!le&&fr(T),ye=!Q&&!le&&!Oe&&co(T),Fe=Q||le||Oe||ye,We=Fe?me(T.length,String):[],Ke=We.length;for(var Re in T)Qe.call(T,Re)&&!(Fe&&(Re=="length"||Oe&&(Re=="offset"||Re=="parent")||ye&&(Re=="buffer"||Re=="byteLength"||Re=="byteOffset")||Lt(Re,Ke)))&&We.push(Re);return We}function Le(T,U){for(var Q=T.length;Q--;)if(ha(T[Q][0],U))return Q;return-1}function kt(T,U,Q){var le=U(T);return dr(T)?le:ge(le,Q(T))}function nt(T){return T==null?T===void 0?E:g:ft&&ft in Object(T)?zt(T):cr(T)}function He(T){return pa(T)&&nt(T)==c}function Nt(T,U,Q,le,Oe){return T===U?!0:T==null||U==null||!pa(T)&&!pa(U)?T!==T&&U!==U:ur(T,U,Q,le,Nt,Oe)}function ur(T,U,Q,le,Oe,ye){var Fe=dr(T),We=dr(U),Ke=Fe?d:Be(T),Re=We?d:Be(U);Ke=Ke==c?v:Ke,Re=Re==c?v:Re;var gt=Ke==v,Mt=Re==v,rt=Ke==Re;if(rt&&fr(T)){if(!fr(U))return!1;Fe=!0,gt=!1}if(rt&&!gt)return ye||(ye=new ue),Fe||co(T)?da(T,U,Q,le,Oe,ye):Ns(T,U,Ke,Q,le,Oe,ye);if(!(Q&a)){var jt=gt&&Qe.call(T,"__wrapped__"),Et=Mt&&Qe.call(U,"__wrapped__");if(jt||Et){var hr=jt?T.value():T,Kt=Et?U.value():U;return ye||(ye=new ue),Oe(hr,Kt,Q,le,ye)}}return rt?(ye||(ye=new ue),js(T,U,Q,le,Oe,ye)):!1}function Yr(T){if(!lo(T)||Nr(T))return!1;var U=jr(T)?or:I;return U.test(tt(T))}function lr(T){return pa(T)&&Er(T.length)&&!!J[nt(T)]}function kr(T){if(!Zr(T))return S(T);var U=[];for(var Q in Object(T))Qe.call(T,Q)&&Q!="constructor"&&U.push(Q);return U}function da(T,U,Q,le,Oe,ye){var Fe=Q&a,We=T.length,Ke=U.length;if(We!=Ke&&!(Fe&&Ke>We))return!1;var Re=ye.get(T);if(Re&&ye.get(U))return Re==U;var gt=-1,Mt=!0,rt=Q&n?new q:void 0;for(ye.set(T,U),ye.set(U,T);++gt<We;){var jt=T[gt],Et=U[gt];if(le)var hr=Fe?le(Et,jt,gt,U,T,ye):le(jt,Et,gt,T,U,ye);if(hr!==void 0){if(hr)continue;Mt=!1;break}if(rt){if(!ke(U,function(Kt,Ar){if(!we(rt,Ar)&&(jt===Kt||Oe(jt,Kt,Q,le,ye)))return rt.push(Ar)})){Mt=!1;break}}else if(!(jt===Et||Oe(jt,Et,Q,le,ye))){Mt=!1;break}}return ye.delete(T),ye.delete(U),Mt}function Ns(T,U,Q,le,Oe,ye,Fe){switch(Q){case P:if(T.byteLength!=U.byteLength||T.byteOffset!=U.byteOffset)return!1;T=T.buffer,U=U.buffer;case C:return!(T.byteLength!=U.byteLength||!ye(new yt(T),new yt(U)));case o:case h:case b:return ha(+T,+U);case l:return T.name==U.name&&T.message==U.message;case y:case k:return T==U+"";case w:var We=Ae;case m:var Ke=le&a;if(We||(We=Ve),T.size!=U.size&&!Ke)return!1;var Re=Fe.get(T);if(Re)return Re==U;le|=n,Fe.set(T,U);var gt=da(We(T),We(U),le,Oe,ye,Fe);return Fe.delete(T),gt;case j:if(et)return et.call(T)==et.call(U)}return!1}function js(T,U,Q,le,Oe,ye){var Fe=Q&a,We=Se(T),Ke=We.length,Re=Se(U),gt=Re.length;if(Ke!=gt&&!Fe)return!1;for(var Mt=Ke;Mt--;){var rt=We[Mt];if(!(Fe?rt in U:Qe.call(U,rt)))return!1}var jt=ye.get(T);if(jt&&ye.get(U))return jt==U;var Et=!0;ye.set(T,U),ye.set(U,T);for(var hr=Fe;++Mt<Ke;){rt=We[Mt];var Kt=T[rt],Ar=U[rt];if(le)var fo=Fe?le(Ar,Kt,rt,U,T,ye):le(Kt,Ar,rt,T,U,ye);if(!(fo===void 0?Kt===Ar||Oe(Kt,Ar,Q,le,ye):fo)){Et=!1;break}hr||(hr=rt=="constructor")}if(Et&&!hr){var fn=T.constructor,hn=U.constructor;fn!=hn&&"constructor"in T&&"constructor"in U&&!(typeof fn=="function"&&fn instanceof fn&&typeof hn=="function"&&hn instanceof hn)&&(Et=!1)}return ye.delete(T),ye.delete(U),Et}function Se(T){return kt(T,Ld,fa)}function je(T,U){var Q=T.__data__;return Ht(U)?Q[typeof U=="string"?"string":"hash"]:Q.map}function $t(T,U){var Q=fe(T,U);return Yr(Q)?Q:void 0}function zt(T){var U=Qe.call(T,ft),Q=T[ft];try{T[ft]=void 0;var le=!0}catch{}var Oe=xt.call(T);return le&&(U?T[ft]=Q:delete T[ft]),Oe}var fa=wr?function(T){return T==null?[]:(T=Object(T),xe(wr(T),function(U){return Tt.call(T,U)}))}:Md,Be=nt;(M&&Be(new M(new ArrayBuffer(1)))!=P||W&&Be(new W)!=w||ne&&Be(ne.resolve())!=_||he&&Be(new he)!=m||Ne&&Be(new Ne)!=D)&&(Be=function(T){var U=nt(T),Q=U==v?T.constructor:void 0,le=Q?tt(Q):"";if(le)switch(le){case ht:return P;case at:return w;case Xe:return _;case vt:return m;case wt:return D}return U});function Lt(T,U){return U=U??u,!!U&&(typeof T=="number"||V.test(T))&&T>-1&&T%1==0&&T<U}function Ht(T){var U=typeof T;return U=="string"||U=="number"||U=="symbol"||U=="boolean"?T!=="__proto__":T===null}function Nr(T){return!!Ct&&Ct in T}function Zr(T){var U=T&&T.constructor,Q=typeof U=="function"&&U.prototype||Ze;return T===Q}function cr(T){return xt.call(T)}function tt(T){if(T!=null){try{return vr.call(T)}catch{}try{return T+""}catch{}}return""}function ha(T,U){return T===U||T!==T&&U!==U}var Xr=He((function(){return arguments})())?He:function(T){return pa(T)&&Qe.call(T,"callee")&&!Tt.call(T,"callee")},dr=Array.isArray;function Kr(T){return T!=null&&Er(T.length)&&!jr(T)}var fr=A||Rd;function dn(T,U){return Nt(T,U)}function jr(T){if(!lo(T))return!1;var U=nt(T);return U==p||U==x||U==f||U==N}function Er(T){return typeof T=="number"&&T>-1&&T%1==0&&T<=u}function lo(T){var U=typeof T;return T!=null&&(U=="object"||U=="function")}function pa(T){return T!=null&&typeof T=="object"}var co=ce?Ye(ce):lr;function Ld(T){return Kr(T)?qe(T):kr(T)}function Md(){return[]}function Rd(){return!1}e.exports=dn})(Xa,Xa.exports)),Xa.exports}var Dr={},vn={},Po;function us(){if(Po)return vn;Po=1,Object.defineProperty(vn,"__esModule",{value:!0});const e=en();function r(i,s,a,n=!0){a[e.testSymbol](i,r,s,n)}return vn.default=r,vn}var $o;function Tc(){if($o)return Dr;$o=1,Object.defineProperty(Dr,"__esModule",{value:!0}),Dr.exact=Dr.partial=void 0;const e=ua(),r=us(),i=en();function s(n,u,c){try{for(const d of Object.keys(u)){const f=c?`${c}.${d}`:d;if((0,i.isPredicate)(u[d]))(0,r.default)(n[d],f,u[d]);else if(e.default.plainObject(u[d])){const o=s(n[d],u[d],f);if(o!==!0)return o}}return!0}catch(d){return d.message}}Dr.partial=s;function a(n,u,c,d){try{const f=new Set(Object.keys(n));for(const o of Object.keys(u)){f.delete(o);const h=c?`${c}.${o}`:o;if((0,i.isPredicate)(u[o]))(0,r.default)(n[o],h,u[o]);else if(e.default.plainObject(u[o])){if(!Object.prototype.hasOwnProperty.call(n,o))return`Expected \`${h}\` to exist`;const l=a(n[o],u[o],h);if(l!==!0)return l}}if(f.size>0){const o=[...f.keys()][0],h=c?`${c}.${o}`:o;return`Did not expect ${d?"element":"property"} \`${h}\` to exist, got \`${n[o]}\``}return!0}catch(f){return f.message}}return Dr.exact=a,Dr}var wn={},Lo;function ls(){if(Lo)return wn;Lo=1,Object.defineProperty(wn,"__esModule",{value:!0});const e=us();return wn.default=(r,i,s)=>{try{for(const a of r)(0,e.default)(a,i,s,!1);return!0}catch(a){return a.message}},wn}var Mo;function Qd(){if(Mo)return Aa;Mo=1,Object.defineProperty(Aa,"__esModule",{value:!0}),Aa.ArrayPredicate=void 0;const e=os(),r=Je(),i=Tc(),s=ls();class a extends r.Predicate{constructor(u){super("array",u)}length(u){return this.addValidator({message:(c,d)=>`Expected ${d} to have length \`${u}\`, got \`${c.length}\``,validator:c=>c.length===u})}minLength(u){return this.addValidator({message:(c,d)=>`Expected ${d} to have a minimum length of \`${u}\`, got \`${c.length}\``,validator:c=>c.length>=u,negatedMessage:(c,d)=>`Expected ${d} to have a maximum length of \`${u-1}\`, got \`${c.length}\``})}maxLength(u){return this.addValidator({message:(c,d)=>`Expected ${d} to have a maximum length of \`${u}\`, got \`${c.length}\``,validator:c=>c.length<=u,negatedMessage:(c,d)=>`Expected ${d} to have a minimum length of \`${u+1}\`, got \`${c.length}\``})}startsWith(u){return this.addValidator({message:(c,d)=>`Expected ${d} to start with \`${u}\`, got \`${c[0]}\``,validator:c=>c[0]===u})}endsWith(u){return this.addValidator({message:(c,d)=>`Expected ${d} to end with \`${u}\`, got \`${c[c.length-1]}\``,validator:c=>c[c.length-1]===u})}includes(...u){return this.addValidator({message:(c,d)=>`Expected ${d} to include all elements of \`${JSON.stringify(u)}\`, got \`${JSON.stringify(c)}\``,validator:c=>u.every(d=>c.includes(d))})}includesAny(...u){return this.addValidator({message:(c,d)=>`Expected ${d} to include any element of \`${JSON.stringify(u)}\`, got \`${JSON.stringify(c)}\``,validator:c=>u.some(d=>c.includes(d))})}get empty(){return this.addValidator({message:(u,c)=>`Expected ${c} to be empty, got \`${JSON.stringify(u)}\``,validator:u=>u.length===0})}get nonEmpty(){return this.addValidator({message:(u,c)=>`Expected ${c} to not be empty`,validator:u=>u.length>0})}deepEqual(u){return this.addValidator({message:(c,d)=>`Expected ${d} to be deeply equal to \`${JSON.stringify(u)}\`, got \`${JSON.stringify(c)}\``,validator:c=>e(c,u)})}ofType(u){return this.addValidator({message:(c,d,f)=>`(${d}) ${f}`,validator:c=>(0,s.default)(c,"values",u)})}exactShape(u){const c=u;return this.addValidator({message:(d,f,o)=>`${o.replace("Expected","Expected element")} in ${f}`,validator:d=>(0,i.exact)(d,c,void 0,!0)})}}return Aa.ArrayPredicate=a,Aa}var Sa={},Ts,Ro;function e0(){return Ro||(Ro=1,Ts=e=>{const r=typeof e;return e!==null&&(r==="object"||r==="function")}),Ts}var Os,Io;function t0(){if(Io)return Os;Io=1;const e=e0(),r=new Set(["__proto__","prototype","constructor"]),i=a=>!a.some(n=>r.has(n));function s(a){const n=a.split("."),u=[];for(let c=0;c<n.length;c++){let d=n[c];for(;d[d.length-1]==="\\"&&n[c+1]!==void 0;)d=d.slice(0,-1)+".",d+=n[++c];u.push(d)}return i(u)?u:[]}return Os={get(a,n,u){if(!e(a)||typeof n!="string")return u===void 0?a:u;const c=s(n);if(c.length!==0){for(let d=0;d<c.length;d++)if(a=a[c[d]],a==null){if(d!==c.length-1)return u;break}return a===void 0?u:a}},set(a,n,u){if(!e(a)||typeof n!="string")return a;const c=a,d=s(n);for(let f=0;f<d.length;f++){const o=d[f];e(a[o])||(a[o]={}),f===d.length-1&&(a[o]=u),a=a[o]}return c},delete(a,n){if(!e(a)||typeof n!="string")return!1;const u=s(n);for(let c=0;c<u.length;c++){const d=u[c];if(c===u.length-1)return delete a[d],!0;if(a=a[d],!e(a))return!1}},has(a,n){if(!e(a)||typeof n!="string")return!1;const u=s(n);if(u.length===0)return!1;for(let c=0;c<u.length;c++)if(e(a)){if(!(u[c]in a))return!1;a=a[u[c]]}else return!1;return!0}},Os}var _n={},Fo;function tn(){return Fo||(Fo=1,Object.defineProperty(_n,"__esModule",{value:!0}),_n.default=(e,r,i=5)=>{const s=[];for(const a of r)if(!e.has(a)&&(s.push(a),s.length===i))return s;return s.length===0?!0:s}),_n}var kn={},qo;function r0(){if(qo)return kn;qo=1,Object.defineProperty(kn,"__esModule",{value:!0});const e=ua(),r=us(),i=(s,a)=>e.default.plainObject(s)?Object.values(s).every(n=>i(n,a)):((0,r.default)(s,"deep values",a,!1),!0);return kn.default=(s,a)=>{try{return i(s,a)}catch(n){return n.message}},kn}var Bo;function a0(){if(Bo)return Sa;Bo=1,Object.defineProperty(Sa,"__esModule",{value:!0}),Sa.ObjectPredicate=void 0;const e=ua(),r=t0(),i=os(),s=tn(),a=ls(),n=r0(),u=Tc(),c=Je();class d extends c.Predicate{constructor(o){super("object",o)}get plain(){return this.addValidator({message:(o,h)=>`Expected ${h} to be a plain object`,validator:o=>e.default.plainObject(o)})}get empty(){return this.addValidator({message:(o,h)=>`Expected ${h} to be empty, got \`${JSON.stringify(o)}\``,validator:o=>Object.keys(o).length===0})}get nonEmpty(){return this.addValidator({message:(o,h)=>`Expected ${h} to not be empty`,validator:o=>Object.keys(o).length>0})}valuesOfType(o){return this.addValidator({message:(h,l,p)=>`(${l}) ${p}`,validator:h=>(0,a.default)(Object.values(h),"values",o)})}deepValuesOfType(o){return this.addValidator({message:(h,l,p)=>`(${l}) ${p}`,validator:h=>(0,n.default)(h,o)})}deepEqual(o){return this.addValidator({message:(h,l)=>`Expected ${l} to be deeply equal to \`${JSON.stringify(o)}\`, got \`${JSON.stringify(h)}\``,validator:h=>i(h,o)})}instanceOf(o){return this.addValidator({message:(h,l)=>{var p;let{name:x}=(p=h?.constructor)!==null&&p!==void 0?p:{};return(!x||x==="Object")&&(x=JSON.stringify(h)),`Expected ${l} \`${x}\` to be of type \`${o.name}\``},validator:h=>h instanceof o})}hasKeys(...o){return this.addValidator({message:(h,l,p)=>`Expected ${l} to have keys \`${JSON.stringify(p)}\``,validator:h=>(0,s.default)({has:l=>r.has(h,l)},o)})}hasAnyKeys(...o){return this.addValidator({message:(h,l)=>`Expected ${l} to have any key of \`${JSON.stringify(o)}\``,validator:h=>o.some(l=>r.has(h,l))})}partialShape(o){return this.addValidator({message:(h,l,p)=>`${p.replace("Expected","Expected property")} in ${l}`,validator:h=>(0,u.partial)(h,o)})}exactShape(o){return this.addValidator({message:(h,l,p)=>`${p.replace("Expected","Expected property")} in ${l}`,validator:h=>(0,u.exact)(h,o)})}}return Sa.ObjectPredicate=d,Sa}var Ca={},Vo;function n0(){if(Vo)return Ca;Vo=1,Object.defineProperty(Ca,"__esModule",{value:!0}),Ca.DatePredicate=void 0;const e=Je();class r extends e.Predicate{constructor(s){super("date",s)}before(s){return this.addValidator({message:(a,n)=>`Expected ${n} ${a.toISOString()} to be before ${s.toISOString()}`,validator:a=>a.getTime()<s.getTime()})}after(s){return this.addValidator({message:(a,n)=>`Expected ${n} ${a.toISOString()} to be after ${s.toISOString()}`,validator:a=>a.getTime()>s.getTime()})}}return Ca.DatePredicate=r,Ca}var Da={},Uo;function s0(){if(Uo)return Da;Uo=1,Object.defineProperty(Da,"__esModule",{value:!0}),Da.ErrorPredicate=void 0;const e=Je();class r extends e.Predicate{constructor(s){super("error",s)}name(s){return this.addValidator({message:(a,n)=>`Expected ${n} to have name \`${s}\`, got \`${a.name}\``,validator:a=>a.name===s})}message(s){return this.addValidator({message:(a,n)=>`Expected ${n} message to be \`${s}\`, got \`${a.message}\``,validator:a=>a.message===s})}messageIncludes(s){return this.addValidator({message:(a,n)=>`Expected ${n} message to include \`${s}\`, got \`${a.message}\``,validator:a=>a.message.includes(s)})}hasKeys(...s){return this.addValidator({message:(a,n)=>`Expected ${n} message to have keys \`${s.join("`, `")}\``,validator:a=>s.every(n=>Object.prototype.hasOwnProperty.call(a,n))})}instanceOf(s){return this.addValidator({message:(a,n)=>`Expected ${n} \`${a.name}\` to be of type \`${s.name}\``,validator:a=>a instanceof s})}get typeError(){return this.instanceOf(TypeError)}get evalError(){return this.instanceOf(EvalError)}get rangeError(){return this.instanceOf(RangeError)}get referenceError(){return this.instanceOf(ReferenceError)}get syntaxError(){return this.instanceOf(SyntaxError)}get uriError(){return this.instanceOf(URIError)}}return Da.ErrorPredicate=r,Da}var Ta={},zo;function i0(){if(zo)return Ta;zo=1,Object.defineProperty(Ta,"__esModule",{value:!0}),Ta.MapPredicate=void 0;const e=os(),r=tn(),i=ls(),s=Je();class a extends s.Predicate{constructor(u){super("Map",u)}size(u){return this.addValidator({message:(c,d)=>`Expected ${d} to have size \`${u}\`, got \`${c.size}\``,validator:c=>c.size===u})}minSize(u){return this.addValidator({message:(c,d)=>`Expected ${d} to have a minimum size of \`${u}\`, got \`${c.size}\``,validator:c=>c.size>=u,negatedMessage:(c,d)=>`Expected ${d} to have a maximum size of \`${u-1}\`, got \`${c.size}\``})}maxSize(u){return this.addValidator({message:(c,d)=>`Expected ${d} to have a maximum size of \`${u}\`, got \`${c.size}\``,validator:c=>c.size<=u,negatedMessage:(c,d)=>`Expected ${d} to have a minimum size of \`${u+1}\`, got \`${c.size}\``})}hasKeys(...u){return this.addValidator({message:(c,d,f)=>`Expected ${d} to have keys \`${JSON.stringify(f)}\``,validator:c=>(0,r.default)(c,u)})}hasAnyKeys(...u){return this.addValidator({message:(c,d)=>`Expected ${d} to have any key of \`${JSON.stringify(u)}\``,validator:c=>u.some(d=>c.has(d))})}hasValues(...u){return this.addValidator({message:(c,d,f)=>`Expected ${d} to have values \`${JSON.stringify(f)}\``,validator:c=>(0,r.default)(new Set(c.values()),u)})}hasAnyValues(...u){return this.addValidator({message:(c,d)=>`Expected ${d} to have any value of \`${JSON.stringify(u)}\``,validator:c=>{const d=new Set(c.values());return u.some(f=>d.has(f))}})}keysOfType(u){return this.addValidator({message:(c,d,f)=>`(${d}) ${f}`,validator:c=>(0,i.default)(c.keys(),"keys",u)})}valuesOfType(u){return this.addValidator({message:(c,d,f)=>`(${d}) ${f}`,validator:c=>(0,i.default)(c.values(),"values",u)})}get empty(){return this.addValidator({message:(u,c)=>`Expected ${c} to be empty, got \`${JSON.stringify([...u])}\``,validator:u=>u.size===0})}get nonEmpty(){return this.addValidator({message:(u,c)=>`Expected ${c} to not be empty`,validator:u=>u.size>0})}deepEqual(u){return this.addValidator({message:(c,d)=>`Expected ${d} to be deeply equal to \`${JSON.stringify([...u])}\`, got \`${JSON.stringify([...c])}\``,validator:c=>e(c,u)})}}return Ta.MapPredicate=a,Ta}var Oa={},Ho;function o0(){if(Ho)return Oa;Ho=1,Object.defineProperty(Oa,"__esModule",{value:!0}),Oa.WeakMapPredicate=void 0;const e=tn(),r=Je();class i extends r.Predicate{constructor(a){super("WeakMap",a)}hasKeys(...a){return this.addValidator({message:(n,u,c)=>`Expected ${u} to have keys \`${JSON.stringify(c)}\``,validator:n=>(0,e.default)(n,a)})}hasAnyKeys(...a){return this.addValidator({message:(n,u)=>`Expected ${u} to have any key of \`${JSON.stringify(a)}\``,validator:n=>a.some(u=>n.has(u))})}}return Oa.WeakMapPredicate=i,Oa}var Pa={},Wo;function u0(){if(Wo)return Pa;Wo=1,Object.defineProperty(Pa,"__esModule",{value:!0}),Pa.SetPredicate=void 0;const e=os(),r=tn(),i=ls(),s=Je();class a extends s.Predicate{constructor(u){super("Set",u)}size(u){return this.addValidator({message:(c,d)=>`Expected ${d} to have size \`${u}\`, got \`${c.size}\``,validator:c=>c.size===u})}minSize(u){return this.addValidator({message:(c,d)=>`Expected ${d} to have a minimum size of \`${u}\`, got \`${c.size}\``,validator:c=>c.size>=u,negatedMessage:(c,d)=>`Expected ${d} to have a maximum size of \`${u-1}\`, got \`${c.size}\``})}maxSize(u){return this.addValidator({message:(c,d)=>`Expected ${d} to have a maximum size of \`${u}\`, got \`${c.size}\``,validator:c=>c.size<=u,negatedMessage:(c,d)=>`Expected ${d} to have a minimum size of \`${u+1}\`, got \`${c.size}\``})}has(...u){return this.addValidator({message:(c,d,f)=>`Expected ${d} to have items \`${JSON.stringify(f)}\``,validator:c=>(0,r.default)(c,u)})}hasAny(...u){return this.addValidator({message:(c,d)=>`Expected ${d} to have any item of \`${JSON.stringify(u)}\``,validator:c=>u.some(d=>c.has(d))})}ofType(u){return this.addValidator({message:(c,d,f)=>`(${d}) ${f}`,validator:c=>(0,i.default)(c,"values",u)})}get empty(){return this.addValidator({message:(u,c)=>`Expected ${c} to be empty, got \`${JSON.stringify([...u])}\``,validator:u=>u.size===0})}get nonEmpty(){return this.addValidator({message:(u,c)=>`Expected ${c} to not be empty`,validator:u=>u.size>0})}deepEqual(u){return this.addValidator({message:(c,d)=>`Expected ${d} to be deeply equal to \`${JSON.stringify([...u])}\`, got \`${JSON.stringify([...c])}\``,validator:c=>e(c,u)})}}return Pa.SetPredicate=a,Pa}var $a={},Go;function l0(){if(Go)return $a;Go=1,Object.defineProperty($a,"__esModule",{value:!0}),$a.WeakSetPredicate=void 0;const e=tn(),r=Je();class i extends r.Predicate{constructor(a){super("WeakSet",a)}has(...a){return this.addValidator({message:(n,u,c)=>`Expected ${u} to have items \`${JSON.stringify(c)}\``,validator:n=>(0,e.default)(n,a)})}hasAny(...a){return this.addValidator({message:(n,u)=>`Expected ${u} to have any item of \`${JSON.stringify(a)}\``,validator:n=>a.some(u=>n.has(u))})}}return $a.WeakSetPredicate=i,$a}var La={},Jo;function c0(){if(Jo)return La;Jo=1,Object.defineProperty(La,"__esModule",{value:!0}),La.TypedArrayPredicate=void 0;const e=Je();class r extends e.Predicate{byteLength(s){return this.addValidator({message:(a,n)=>`Expected ${n} to have byte length of \`${s}\`, got \`${a.byteLength}\``,validator:a=>a.byteLength===s})}minByteLength(s){return this.addValidator({message:(a,n)=>`Expected ${n} to have a minimum byte length of \`${s}\`, got \`${a.byteLength}\``,validator:a=>a.byteLength>=s,negatedMessage:(a,n)=>`Expected ${n} to have a maximum byte length of \`${s-1}\`, got \`${a.byteLength}\``})}maxByteLength(s){return this.addValidator({message:(a,n)=>`Expected ${n} to have a maximum byte length of \`${s}\`, got \`${a.byteLength}\``,validator:a=>a.byteLength<=s,negatedMessage:(a,n)=>`Expected ${n} to have a minimum byte length of \`${s+1}\`, got \`${a.byteLength}\``})}length(s){return this.addValidator({message:(a,n)=>`Expected ${n} to have length \`${s}\`, got \`${a.length}\``,validator:a=>a.length===s})}minLength(s){return this.addValidator({message:(a,n)=>`Expected ${n} to have a minimum length of \`${s}\`, got \`${a.length}\``,validator:a=>a.length>=s,negatedMessage:(a,n)=>`Expected ${n} to have a maximum length of \`${s-1}\`, got \`${a.length}\``})}maxLength(s){return this.addValidator({message:(a,n)=>`Expected ${n} to have a maximum length of \`${s}\`, got \`${a.length}\``,validator:a=>a.length<=s,negatedMessage:(a,n)=>`Expected ${n} to have a minimum length of \`${s+1}\`, got \`${a.length}\``})}}return La.TypedArrayPredicate=r,La}var Ma={},Yo;function d0(){if(Yo)return Ma;Yo=1,Object.defineProperty(Ma,"__esModule",{value:!0}),Ma.ArrayBufferPredicate=void 0;const e=Je();class r extends e.Predicate{byteLength(s){return this.addValidator({message:(a,n)=>`Expected ${n} to have byte length of \`${s}\`, got \`${a.byteLength}\``,validator:a=>a.byteLength===s})}minByteLength(s){return this.addValidator({message:(a,n)=>`Expected ${n} to have a minimum byte length of \`${s}\`, got \`${a.byteLength}\``,validator:a=>a.byteLength>=s,negatedMessage:(a,n)=>`Expected ${n} to have a maximum byte length of \`${s-1}\`, got \`${a.byteLength}\``})}maxByteLength(s){return this.addValidator({message:(a,n)=>`Expected ${n} to have a maximum byte length of \`${s}\`, got \`${a.byteLength}\``,validator:a=>a.byteLength<=s,negatedMessage:(a,n)=>`Expected ${n} to have a minimum byte length of \`${s+1}\`, got \`${a.byteLength}\``})}}return Ma.ArrayBufferPredicate=r,Ma}var Ra={},Zo;function f0(){if(Zo)return Ra;Zo=1,Object.defineProperty(Ra,"__esModule",{value:!0}),Ra.DataViewPredicate=void 0;const e=Je();class r extends e.Predicate{constructor(s){super("DataView",s)}byteLength(s){return this.addValidator({message:(a,n)=>`Expected ${n} to have byte length of \`${s}\`, got \`${a.byteLength}\``,validator:a=>a.byteLength===s})}minByteLength(s){return this.addValidator({message:(a,n)=>`Expected ${n} to have a minimum byte length of \`${s}\`, got \`${a.byteLength}\``,validator:a=>a.byteLength>=s,negatedMessage:(a,n)=>`Expected ${n} to have a maximum byte length of \`${s-1}\`, got \`${a.byteLength}\``})}maxByteLength(s){return this.addValidator({message:(a,n)=>`Expected ${n} to have a maximum byte length of \`${s}\`, got \`${a.byteLength}\``,validator:a=>a.byteLength<=s,negatedMessage:(a,n)=>`Expected ${n} to have a minimum byte length of \`${s+1}\`, got \`${a.byteLength}\``})}}return Ra.DataViewPredicate=r,Ra}var Ia={},Xo;function h0(){if(Xo)return Ia;Xo=1,Object.defineProperty(Ia,"__esModule",{value:!0}),Ia.AnyPredicate=void 0;const e=Vi(),r=en(),i=Dc();class s{constructor(n,u={}){Object.defineProperty(this,"predicates",{enumerable:!0,configurable:!0,writable:!0,value:n}),Object.defineProperty(this,"options",{enumerable:!0,configurable:!0,writable:!0,value:u})}[r.testSymbol](n,u,c,d){const f=new Map;for(const o of this.predicates)try{u(n,c,o,d);return}catch(h){if(n===void 0&&this.options.optional===!0)return;if(h instanceof e.ArgumentError)for(const[l,p]of h.validationErrors.entries()){const x=f.get(l);f.set(l,new Set([...x??[],...p]))}}if(f.size>0){const o=(0,i.generateArgumentErrorMessage)(f,!0);throw new e.ArgumentError(`Any predicate failed with the following errors:
|
|
85
|
+
${o}`,u,f)}}}return Ia.AnyPredicate=s,Ia}var Ko;function $i(){return Ko||(Ko=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.AnyPredicate=e.DataViewPredicate=e.ArrayBufferPredicate=e.TypedArrayPredicate=e.WeakSetPredicate=e.SetPredicate=e.WeakMapPredicate=e.MapPredicate=e.ErrorPredicate=e.DatePredicate=e.ObjectPredicate=e.ArrayPredicate=e.BooleanPredicate=e.BigIntPredicate=e.NumberPredicate=e.StringPredicate=void 0;const r=Yd();Object.defineProperty(e,"StringPredicate",{enumerable:!0,get:function(){return r.StringPredicate}});const i=Zd();Object.defineProperty(e,"NumberPredicate",{enumerable:!0,get:function(){return i.NumberPredicate}});const s=Xd();Object.defineProperty(e,"BigIntPredicate",{enumerable:!0,get:function(){return s.BigIntPredicate}});const a=Kd();Object.defineProperty(e,"BooleanPredicate",{enumerable:!0,get:function(){return a.BooleanPredicate}});const n=Je(),u=Qd();Object.defineProperty(e,"ArrayPredicate",{enumerable:!0,get:function(){return u.ArrayPredicate}});const c=a0();Object.defineProperty(e,"ObjectPredicate",{enumerable:!0,get:function(){return c.ObjectPredicate}});const d=n0();Object.defineProperty(e,"DatePredicate",{enumerable:!0,get:function(){return d.DatePredicate}});const f=s0();Object.defineProperty(e,"ErrorPredicate",{enumerable:!0,get:function(){return f.ErrorPredicate}});const o=i0();Object.defineProperty(e,"MapPredicate",{enumerable:!0,get:function(){return o.MapPredicate}});const h=o0();Object.defineProperty(e,"WeakMapPredicate",{enumerable:!0,get:function(){return h.WeakMapPredicate}});const l=u0();Object.defineProperty(e,"SetPredicate",{enumerable:!0,get:function(){return l.SetPredicate}});const p=l0();Object.defineProperty(e,"WeakSetPredicate",{enumerable:!0,get:function(){return p.WeakSetPredicate}});const x=c0();Object.defineProperty(e,"TypedArrayPredicate",{enumerable:!0,get:function(){return x.TypedArrayPredicate}});const w=d0();Object.defineProperty(e,"ArrayBufferPredicate",{enumerable:!0,get:function(){return w.ArrayBufferPredicate}});const b=f0();Object.defineProperty(e,"DataViewPredicate",{enumerable:!0,get:function(){return b.DataViewPredicate}});const g=h0();Object.defineProperty(e,"AnyPredicate",{enumerable:!0,get:function(){return g.AnyPredicate}}),e.default=(v,_)=>(Object.defineProperties(v,{string:{get:()=>new r.StringPredicate(_)},number:{get:()=>new i.NumberPredicate(_)},bigint:{get:()=>new s.BigIntPredicate(_)},boolean:{get:()=>new a.BooleanPredicate(_)},undefined:{get:()=>new n.Predicate("undefined",_)},null:{get:()=>new n.Predicate("null",_)},nullOrUndefined:{get:()=>new n.Predicate("nullOrUndefined",_)},nan:{get:()=>new n.Predicate("nan",_)},symbol:{get:()=>new n.Predicate("symbol",_)},array:{get:()=>new u.ArrayPredicate(_)},object:{get:()=>new c.ObjectPredicate(_)},date:{get:()=>new d.DatePredicate(_)},error:{get:()=>new f.ErrorPredicate(_)},map:{get:()=>new o.MapPredicate(_)},weakMap:{get:()=>new h.WeakMapPredicate(_)},set:{get:()=>new l.SetPredicate(_)},weakSet:{get:()=>new p.WeakSetPredicate(_)},function:{get:()=>new n.Predicate("Function",_)},buffer:{get:()=>new n.Predicate("Buffer",_)},regExp:{get:()=>new n.Predicate("RegExp",_)},promise:{get:()=>new n.Predicate("Promise",_)},typedArray:{get:()=>new x.TypedArrayPredicate("TypedArray",_)},int8Array:{get:()=>new x.TypedArrayPredicate("Int8Array",_)},uint8Array:{get:()=>new x.TypedArrayPredicate("Uint8Array",_)},uint8ClampedArray:{get:()=>new x.TypedArrayPredicate("Uint8ClampedArray",_)},int16Array:{get:()=>new x.TypedArrayPredicate("Int16Array",_)},uint16Array:{get:()=>new x.TypedArrayPredicate("Uint16Array",_)},int32Array:{get:()=>new x.TypedArrayPredicate("Int32Array",_)},uint32Array:{get:()=>new x.TypedArrayPredicate("Uint32Array",_)},float32Array:{get:()=>new x.TypedArrayPredicate("Float32Array",_)},float64Array:{get:()=>new x.TypedArrayPredicate("Float64Array",_)},arrayBuffer:{get:()=>new w.ArrayBufferPredicate("ArrayBuffer",_)},sharedArrayBuffer:{get:()=>new w.ArrayBufferPredicate("SharedArrayBuffer",_)},dataView:{get:()=>new b.DataViewPredicate(_)},iterable:{get:()=>new n.Predicate("Iterable",_)},any:{value:(...N)=>new g.AnyPredicate(N,_)}}),v)})(Cs)),Cs}var Qo;function p0(){if(Qo)return yn;Qo=1,Object.defineProperty(yn,"__esModule",{value:!0});const e=$i();return yn.default=r=>(Object.defineProperties(r,{optional:{get:()=>(0,e.default)({},{optional:!0})}}),r),yn}var eu;function rn(){return eu||(eu=1,(function(e){var r=Cr&&Cr.__createBinding||(Object.create?(function(p,x,w,b){b===void 0&&(b=w);var g=Object.getOwnPropertyDescriptor(x,w);(!g||("get"in g?!x.__esModule:g.writable||g.configurable))&&(g={enumerable:!0,get:function(){return x[w]}}),Object.defineProperty(p,b,g)}):(function(p,x,w,b){b===void 0&&(b=w),p[b]=x[w]})),i=Cr&&Cr.__exportStar||function(p,x){for(var w in p)w!=="default"&&!Object.prototype.hasOwnProperty.call(x,w)&&r(x,p,w)};Object.defineProperty(e,"__esModule",{value:!0}),e.ArgumentError=e.Predicate=void 0;const s=Ud(),a=zd(),n=Je();Object.defineProperty(e,"Predicate",{enumerable:!0,get:function(){return n.Predicate}});const u=en(),c=p0(),d=$i(),f=us(),o=(p,x,w)=>{if(!(0,u.isPredicate)(x)&&typeof x!="string")throw new TypeError(`Expected second argument to be a predicate or a string, got \`${typeof x}\``);if((0,u.isPredicate)(x)){const b=(0,s.default)();(0,f.default)(p,()=>(0,a.inferLabel)(b),x);return}(0,f.default)(p,x,w)};Object.defineProperties(o,{isValid:{value:(p,x)=>{try{return(0,f.default)(p,"",x),!0}catch{return!1}}},create:{value:(p,x)=>(w,b)=>{if((0,u.isPredicate)(p)){const g=(0,s.default)();(0,f.default)(w,b??(()=>(0,a.inferLabel)(g)),p);return}(0,f.default)(w,b??p,x)}}});const h=(0,d.default)((0,c.default)(o));e.default=h,i($i(),e);var l=Vi();Object.defineProperty(e,"ArgumentError",{enumerable:!0,get:function(){return l.ArgumentError}})})(Cr)),Cr}var Nn;function Oc(e){return Nn=Nn||document.createElement("textarea"),Nn.innerHTML="&"+e+";",Nn.value}function m0(e){return Object.prototype.toString.call(e)}function g0(e){return m0(e)==="[object String]"}var b0=Object.prototype.hasOwnProperty;function Pc(e,r){return e?b0.call(e,r):!1}function Ui(e){var r=[].slice.call(arguments,1);return r.forEach(function(i){if(i){if(typeof i!="object")throw new TypeError(i+"must be object");Object.keys(i).forEach(function(s){e[s]=i[s]})}}),e}var x0=/\\([\\!"#$%&'()*+,.\/:;<=>?@[\]^_`{|}~-])/g;function ia(e){return e.indexOf("\\")<0?e:e.replace(x0,"$1")}function zi(e){return!(e>=55296&&e<=57343||e>=64976&&e<=65007||(e&65535)===65535||(e&65535)===65534||e>=0&&e<=8||e===11||e>=14&&e<=31||e>=127&&e<=159||e>1114111)}function es(e){if(e>65535){e-=65536;var r=55296+(e>>10),i=56320+(e&1023);return String.fromCharCode(r,i)}return String.fromCharCode(e)}var y0=/&([a-z#][a-z0-9]{1,31});/gi,v0=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))/i;function w0(e,r){var i=0,s=Oc(r);return r!==s?s:r.charCodeAt(0)===35&&v0.test(r)&&(i=r[1].toLowerCase()==="x"?parseInt(r.slice(2),16):parseInt(r.slice(1),10),zi(i))?es(i):e}function br(e){return e.indexOf("&")<0?e:e.replace(y0,w0)}var _0=/[&<>"]/,k0=/[&<>"]/g,N0={"&":"&","<":"<",">":">",'"':"""};function j0(e){return N0[e]}function ut(e){return _0.test(e)?e.replace(k0,j0):e}var E0=Object.freeze({isString:g0,has:Pc,assign:Ui,unescapeMd:ia,isValidEntityCode:zi,fromCodePoint:es,replaceEntities:br,escapeHtml:ut}),de={};de.blockquote_open=function(){return`<blockquote>
|
|
86
|
+
`};de.blockquote_close=function(e,r){return"</blockquote>"+Vr(e,r)};de.code=function(e,r){return e[r].block?"<pre><code>"+ut(e[r].content)+"</code></pre>"+Vr(e,r):"<code>"+ut(e[r].content)+"</code>"};de.fence=function(e,r,i,s,a){var n=e[r],u="",c=i.langPrefix,d="",f,o,h;if(n.params){if(f=n.params.split(/\s+/g),o=f.join(" "),Pc(a.rules.fence_custom,f[0]))return a.rules.fence_custom[f[0]](e,r,i,s,a);d=ut(br(ia(o))),u=' class="'+c+d+'"'}return i.highlight?h=i.highlight.apply(i.highlight,[n.content].concat(f))||ut(n.content):h=ut(n.content),"<pre><code"+u+">"+h+"</code></pre>"+Vr(e,r)};de.fence_custom={};de.heading_open=function(e,r){return"<h"+e[r].hLevel+">"};de.heading_close=function(e,r){return"</h"+e[r].hLevel+`>
|
|
87
|
+
`};de.hr=function(e,r,i){return(i.xhtmlOut?"<hr />":"<hr>")+Vr(e,r)};de.bullet_list_open=function(){return`<ul>
|
|
88
|
+
`};de.bullet_list_close=function(e,r){return"</ul>"+Vr(e,r)};de.list_item_open=function(){return"<li>"};de.list_item_close=function(){return`</li>
|
|
89
|
+
`};de.ordered_list_open=function(e,r){var i=e[r],s=i.order>1?' start="'+i.order+'"':"";return"<ol"+s+`>
|
|
90
|
+
`};de.ordered_list_close=function(e,r){return"</ol>"+Vr(e,r)};de.paragraph_open=function(e,r){return e[r].tight?"":"<p>"};de.paragraph_close=function(e,r){var i=!(e[r].tight&&r&&e[r-1].type==="inline"&&!e[r-1].content);return(e[r].tight?"":"</p>")+(i?Vr(e,r):"")};de.link_open=function(e,r,i){var s=e[r].title?' title="'+ut(br(e[r].title))+'"':"",a=i.linkTarget?' target="'+i.linkTarget+'"':"";return'<a href="'+ut(e[r].href)+'"'+s+a+">"};de.link_close=function(){return"</a>"};de.image=function(e,r,i){var s=' src="'+ut(e[r].src)+'"',a=e[r].title?' title="'+ut(br(e[r].title))+'"':"",n=' alt="'+(e[r].alt?ut(br(ia(e[r].alt))):"")+'"',u=i.xhtmlOut?" /":"";return"<img"+s+n+a+u+">"};de.table_open=function(){return`<table>
|
|
91
91
|
`};de.table_close=function(){return`</table>
|
|
92
92
|
`};de.thead_open=function(){return`<thead>
|
|
93
93
|
`};de.thead_close=function(){return`</thead>
|
|
94
94
|
`};de.tbody_open=function(){return`<tbody>
|
|
95
95
|
`};de.tbody_close=function(){return`</tbody>
|
|
96
96
|
`};de.tr_open=function(){return"<tr>"};de.tr_close=function(){return`</tr>
|
|
97
|
-
`};de.th_open=function(e,
|
|
97
|
+
`};de.th_open=function(e,r){var i=e[r];return"<th"+(i.align?' style="text-align:'+i.align+'"':"")+">"};de.th_close=function(){return"</th>"};de.td_open=function(e,r){var i=e[r];return"<td"+(i.align?' style="text-align:'+i.align+'"':"")+">"};de.td_close=function(){return"</td>"};de.strong_open=function(){return"<strong>"};de.strong_close=function(){return"</strong>"};de.em_open=function(){return"<em>"};de.em_close=function(){return"</em>"};de.del_open=function(){return"<del>"};de.del_close=function(){return"</del>"};de.ins_open=function(){return"<ins>"};de.ins_close=function(){return"</ins>"};de.mark_open=function(){return"<mark>"};de.mark_close=function(){return"</mark>"};de.sub=function(e,r){return"<sub>"+ut(e[r].content)+"</sub>"};de.sup=function(e,r){return"<sup>"+ut(e[r].content)+"</sup>"};de.hardbreak=function(e,r,i){return i.xhtmlOut?`<br />
|
|
98
98
|
`:`<br>
|
|
99
|
-
`};de.softbreak=function(e,
|
|
99
|
+
`};de.softbreak=function(e,r,i){return i.breaks?i.xhtmlOut?`<br />
|
|
100
100
|
`:`<br>
|
|
101
101
|
`:`
|
|
102
|
-
`};de.text=function(e,
|
|
102
|
+
`};de.text=function(e,r){return ut(e[r].content)};de.htmlblock=function(e,r){return e[r].content};de.htmltag=function(e,r){return e[r].content};de.abbr_open=function(e,r){return'<abbr title="'+ut(br(e[r].title))+'">'};de.abbr_close=function(){return"</abbr>"};de.footnote_ref=function(e,r){var i=Number(e[r].id+1).toString(),s="fnref"+i;return e[r].subId>0&&(s+=":"+e[r].subId),'<sup class="footnote-ref"><a href="#fn'+i+'" id="'+s+'">['+i+"]</a></sup>"};de.footnote_block_open=function(e,r,i){var s=i.xhtmlOut?`<hr class="footnotes-sep" />
|
|
103
103
|
`:`<hr class="footnotes-sep">
|
|
104
104
|
`;return s+`<section class="footnotes">
|
|
105
105
|
<ol class="footnotes-list">
|
|
106
106
|
`};de.footnote_block_close=function(){return`</ol>
|
|
107
107
|
</section>
|
|
108
|
-
`};de.footnote_open=function(e,
|
|
109
|
-
`};de.footnote_anchor=function(e,
|
|
108
|
+
`};de.footnote_open=function(e,r){var i=Number(e[r].id+1).toString();return'<li id="fn'+i+'" class="footnote-item">'};de.footnote_close=function(){return`</li>
|
|
109
|
+
`};de.footnote_anchor=function(e,r){var i=Number(e[r].id+1).toString(),s="fnref"+i;return e[r].subId>0&&(s+=":"+e[r].subId),' <a href="#'+s+'" class="footnote-backref">↩</a>'};de.dl_open=function(){return`<dl>
|
|
110
110
|
`};de.dt_open=function(){return"<dt>"};de.dd_open=function(){return"<dd>"};de.dl_close=function(){return`</dl>
|
|
111
111
|
`};de.dt_close=function(){return`</dt>
|
|
112
112
|
`};de.dd_close=function(){return`</dd>
|
|
113
|
-
`};function
|
|
114
|
-
`};function
|
|
115
|
-
()[]'".,!?-`;function Os(e){return e.replace(/([-()\[\]{}+?*.$\^|,:#<!\\])/g,"\\$1")}function $0(e){var a,i,s,r,n,u,c,d,f,o,h,l,p=e.tokens;if(e.env.abbreviations){for(e.env.abbrRegExp||(l="(^|["+Ko.split("").map(Os).join("")+"])("+Object.keys(e.env.abbreviations).map(function(x){return x.substr(1)}).sort(function(x,w){return w.length-x.length}).map(Os).join("|")+")($|["+Ko.split("").map(Os).join("")+"])",e.env.abbrRegExp=new RegExp(l,"g")),o=e.env.abbrRegExp,i=0,s=p.length;i<s;i++)if(p[i].type==="inline"){for(r=p[i].children,a=r.length-1;a>=0;a--)if(n=r[a],n.type==="text"){for(d=0,u=n.content,o.lastIndex=0,f=n.level,c=[];h=o.exec(u);)o.lastIndex>d&&c.push({type:"text",content:u.slice(d,h.index+h[1].length),level:f}),c.push({type:"abbr_open",title:e.env.abbreviations[":"+h[2]],level:f++}),c.push({type:"text",content:h[2],level:f}),c.push({type:"abbr_close",level:--f}),d=o.lastIndex-h[3].length;c.length&&(d<u.length&&c.push({type:"text",content:u.slice(d),level:f}),p[i].children=r=[].concat(r.slice(0,a),c,r.slice(a+1)))}}}}var L0=/\+-|\.\.|\?\?\?\?|!!!!|,,|--/,M0=/\((c|tm|r|p)\)/ig,R0={c:"©",r:"®",p:"§",tm:"™"};function I0(e){return e.indexOf("(")<0?e:e.replace(M0,function(a,i){return R0[i.toLowerCase()]})}function F0(e){var a,i,s,r,n;if(e.options.typographer){for(n=e.tokens.length-1;n>=0;n--)if(e.tokens[n].type==="inline")for(r=e.tokens[n].children,a=r.length-1;a>=0;a--)i=r[a],i.type==="text"&&(s=i.content,s=I0(s),L0.test(s)&&(s=s.replace(/\+-/g,"±").replace(/\.{2,}/g,"…").replace(/([?!])…/g,"$1..").replace(/([?!]){4,}/g,"$1$1$1").replace(/,{2,}/g,",").replace(/(^|[^-])---([^-]|$)/mg,"$1—$2").replace(/(^|\s)--(\s|$)/mg,"$1–$2").replace(/(^|[^-\s])--([^-\s]|$)/mg,"$1–$2")),i.content=s)}}var q0=/['"]/,Qo=/['"]/g,B0=/[-\s()\[\]]/,eu="’";function tu(e,a){return a<0||a>=e.length?!1:!B0.test(e[a])}function ea(e,a,i){return e.substr(0,a)+i+e.substr(a+1)}function V0(e){var a,i,s,r,n,u,c,d,f,o,h,l,p,x,w,b,g;if(e.options.typographer){for(g=[],w=e.tokens.length-1;w>=0;w--)if(e.tokens[w].type==="inline"){for(b=e.tokens[w].children,g.length=0,a=0;a<b.length;a++)if(i=b[a],!(i.type!=="text"||q0.test(i.text))){for(c=b[a].level,p=g.length-1;p>=0&&!(g[p].level<=c);p--);g.length=p+1,s=i.content,n=0,u=s.length;e:for(;n<u&&(Qo.lastIndex=n,r=Qo.exec(s),!!r);){if(d=!tu(s,r.index-1),n=r.index+1,x=r[0]==="'",f=!tu(s,n),!f&&!d){x&&(i.content=ea(i.content,r.index,eu));continue}if(h=!f,l=!d,l){for(p=g.length-1;p>=0&&(o=g[p],!(g[p].level<c));p--)if(o.single===x&&g[p].level===c){o=g[p],x?(b[o.token].content=ea(b[o.token].content,o.pos,e.options.quotes[2]),i.content=ea(i.content,r.index,e.options.quotes[3])):(b[o.token].content=ea(b[o.token].content,o.pos,e.options.quotes[0]),i.content=ea(i.content,r.index,e.options.quotes[1])),g.length=p;continue e}}h?g.push({token:a,pos:r.index,single:x,level:c}):l&&x&&(i.content=ea(i.content,r.index,eu))}}}}}var Ps=[["block",A0],["abbr",C0],["references",T0],["inline",O0],["footnote_tail",P0],["abbr2",$0],["replacements",F0],["smartquotes",V0]];function Lc(){this.options={},this.ruler=new bt;for(var e=0;e<Ps.length;e++)this.ruler.push(Ps[e][0],Ps[e][1])}Lc.prototype.process=function(e){var a,i,s;for(s=this.ruler.getRules(""),a=0,i=s.length;a<i;a++)s[a](e)};function zr(e,a,i,s,r){var n,u,c,d,f,o,h;for(this.src=e,this.parser=a,this.options=i,this.env=s,this.tokens=r,this.bMarks=[],this.eMarks=[],this.tShift=[],this.blkIndent=0,this.line=0,this.lineMax=0,this.tight=!1,this.parentType="root",this.ddIndent=-1,this.level=0,this.result="",u=this.src,o=0,h=!1,c=d=o=0,f=u.length;d<f;d++){if(n=u.charCodeAt(d),!h)if(n===32){o++;continue}else h=!0;(n===10||d===f-1)&&(n!==10&&d++,this.bMarks.push(c),this.eMarks.push(d),this.tShift.push(o),h=!1,o=0,c=d+1)}this.bMarks.push(u.length),this.eMarks.push(u.length),this.tShift.push(0),this.lineMax=this.bMarks.length-1}zr.prototype.isEmpty=function(a){return this.bMarks[a]+this.tShift[a]>=this.eMarks[a]};zr.prototype.skipEmptyLines=function(a){for(var i=this.lineMax;a<i&&!(this.bMarks[a]+this.tShift[a]<this.eMarks[a]);a++);return a};zr.prototype.skipSpaces=function(a){for(var i=this.src.length;a<i&&this.src.charCodeAt(a)===32;a++);return a};zr.prototype.skipChars=function(a,i){for(var s=this.src.length;a<s&&this.src.charCodeAt(a)===i;a++);return a};zr.prototype.skipCharsBack=function(a,i,s){if(a<=s)return a;for(;a>s;)if(i!==this.src.charCodeAt(--a))return a+1;return a};zr.prototype.getLines=function(a,i,s,r){var n,u,c,d,f,o=a;if(a>=i)return"";if(o+1===i)return u=this.bMarks[o]+Math.min(this.tShift[o],s),c=r?this.eMarks[o]+1:this.eMarks[o],this.src.slice(u,c);for(d=new Array(i-a),n=0;o<i;o++,n++)f=this.tShift[o],f>s&&(f=s),f<0&&(f=0),u=this.bMarks[o]+f,o+1<i||r?c=this.eMarks[o]+1:c=this.eMarks[o],d[n]=this.src.slice(u,c);return d.join("")};function U0(e,a,i){var s,r;if(e.tShift[a]-e.blkIndent<4)return!1;for(r=s=a+1;s<i;){if(e.isEmpty(s)){s++;continue}if(e.tShift[s]-e.blkIndent>=4){s++,r=s;continue}break}return e.line=s,e.tokens.push({type:"code",content:e.getLines(a,r,4+e.blkIndent,!0),block:!0,lines:[a,e.line],level:e.level}),!0}function z0(e,a,i,s){var r,n,u,c,d,f=!1,o=e.bMarks[a]+e.tShift[a],h=e.eMarks[a];if(o+3>h||(r=e.src.charCodeAt(o),r!==126&&r!==96)||(d=o,o=e.skipChars(o,r),n=o-d,n<3)||(u=e.src.slice(o,h).trim(),u.indexOf("`")>=0))return!1;if(s)return!0;for(c=a;c++,!(c>=i||(o=d=e.bMarks[c]+e.tShift[c],h=e.eMarks[c],o<h&&e.tShift[c]<e.blkIndent));)if(e.src.charCodeAt(o)===r&&!(e.tShift[c]-e.blkIndent>=4)&&(o=e.skipChars(o,r),!(o-d<n)&&(o=e.skipSpaces(o),!(o<h)))){f=!0;break}return n=e.tShift[a],e.line=c+(f?1:0),e.tokens.push({type:"fence",params:u,content:e.getLines(a+1,c,n,!0),lines:[a,e.line],level:e.level}),!0}function H0(e,a,i,s){var r,n,u,c,d,f,o,h,l,p,x,w=e.bMarks[a]+e.tShift[a],b=e.eMarks[a];if(w>b||e.src.charCodeAt(w++)!==62||e.level>=e.options.maxNesting)return!1;if(s)return!0;for(e.src.charCodeAt(w)===32&&w++,d=e.blkIndent,e.blkIndent=0,c=[e.bMarks[a]],e.bMarks[a]=w,w=w<b?e.skipSpaces(w):w,n=w>=b,u=[e.tShift[a]],e.tShift[a]=w-e.bMarks[a],h=e.parser.ruler.getRules("blockquote"),r=a+1;r<i&&(w=e.bMarks[r]+e.tShift[r],b=e.eMarks[r],!(w>=b));r++){if(e.src.charCodeAt(w++)===62){e.src.charCodeAt(w)===32&&w++,c.push(e.bMarks[r]),e.bMarks[r]=w,w=w<b?e.skipSpaces(w):w,n=w>=b,u.push(e.tShift[r]),e.tShift[r]=w-e.bMarks[r];continue}if(n)break;for(x=!1,l=0,p=h.length;l<p;l++)if(h[l](e,r,i,!0)){x=!0;break}if(x)break;c.push(e.bMarks[r]),u.push(e.tShift[r]),e.tShift[r]=-1337}for(f=e.parentType,e.parentType="blockquote",e.tokens.push({type:"blockquote_open",lines:o=[a,0],level:e.level++}),e.parser.tokenize(e,a,r),e.tokens.push({type:"blockquote_close",level:--e.level}),e.parentType=f,o[1]=e.line,l=0;l<u.length;l++)e.bMarks[l+a]=c[l],e.tShift[l+a]=u[l];return e.blkIndent=d,!0}function W0(e,a,i,s){var r,n,u,c=e.bMarks[a],d=e.eMarks[a];if(c+=e.tShift[a],c>d||(r=e.src.charCodeAt(c++),r!==42&&r!==45&&r!==95))return!1;for(n=1;c<d;){if(u=e.src.charCodeAt(c++),u!==r&&u!==32)return!1;u===r&&n++}return n<3?!1:(s||(e.line=a+1,e.tokens.push({type:"hr",lines:[a,e.line],level:e.level})),!0)}function ru(e,a){var i,s,r;return s=e.bMarks[a]+e.tShift[a],r=e.eMarks[a],s>=r||(i=e.src.charCodeAt(s++),i!==42&&i!==45&&i!==43)||s<r&&e.src.charCodeAt(s)!==32?-1:s}function au(e,a){var i,s=e.bMarks[a]+e.tShift[a],r=e.eMarks[a];if(s+1>=r||(i=e.src.charCodeAt(s++),i<48||i>57))return-1;for(;;){if(s>=r)return-1;if(i=e.src.charCodeAt(s++),!(i>=48&&i<=57)){if(i===41||i===46)break;return-1}}return s<r&&e.src.charCodeAt(s)!==32?-1:s}function G0(e,a){var i,s,r=e.level+2;for(i=a+2,s=e.tokens.length-2;i<s;i++)e.tokens[i].level===r&&e.tokens[i].type==="paragraph_open"&&(e.tokens[i+2].tight=!0,e.tokens[i].tight=!0,i+=2)}function J0(e,a,i,s){var r,n,u,c,d,f,o,h,l,p,x,w,b,g,v,_,N,y,m=!0,k,j,A,D;if((h=au(e,a))>=0)b=!0;else if((h=ru(e,a))>=0)b=!1;else return!1;if(e.level>=e.options.maxNesting)return!1;if(w=e.src.charCodeAt(h-1),s)return!0;for(v=e.tokens.length,b?(o=e.bMarks[a]+e.tShift[a],x=Number(e.src.substr(o,h-o-1)),e.tokens.push({type:"ordered_list_open",order:x,lines:N=[a,0],level:e.level++})):e.tokens.push({type:"bullet_list_open",lines:N=[a,0],level:e.level++}),r=a,_=!1,k=e.parser.ruler.getRules("list");r<i&&(g=e.skipSpaces(h),l=e.eMarks[r],g>=l?p=1:p=g-h,p>4&&(p=1),p<1&&(p=1),n=h-e.bMarks[r]+p,e.tokens.push({type:"list_item_open",lines:y=[a,0],level:e.level++}),c=e.blkIndent,d=e.tight,u=e.tShift[a],f=e.parentType,e.tShift[a]=g-e.bMarks[a],e.blkIndent=n,e.tight=!0,e.parentType="list",e.parser.tokenize(e,a,i,!0),(!e.tight||_)&&(m=!1),_=e.line-a>1&&e.isEmpty(e.line-1),e.blkIndent=c,e.tShift[a]=u,e.tight=d,e.parentType=f,e.tokens.push({type:"list_item_close",level:--e.level}),r=a=e.line,y[1]=r,g=e.bMarks[a],!(r>=i||e.isEmpty(r)||e.tShift[r]<e.blkIndent));){for(D=!1,j=0,A=k.length;j<A;j++)if(k[j](e,r,i,!0)){D=!0;break}if(D)break;if(b){if(h=au(e,r),h<0)break}else if(h=ru(e,r),h<0)break;if(w!==e.src.charCodeAt(h-1))break}return e.tokens.push({type:b?"ordered_list_close":"bullet_list_close",level:--e.level}),N[1]=r,e.line=r,m&&G0(e,v),!0}function Y0(e,a,i,s){var r,n,u,c,d,f=e.bMarks[a]+e.tShift[a],o=e.eMarks[a];if(f+4>o||e.src.charCodeAt(f)!==91||e.src.charCodeAt(f+1)!==94||e.level>=e.options.maxNesting)return!1;for(c=f+2;c<o;c++){if(e.src.charCodeAt(c)===32)return!1;if(e.src.charCodeAt(c)===93)break}return c===f+2||c+1>=o||e.src.charCodeAt(++c)!==58?!1:(s||(c++,e.env.footnotes||(e.env.footnotes={}),e.env.footnotes.refs||(e.env.footnotes.refs={}),d=e.src.slice(f+2,c-2),e.env.footnotes.refs[":"+d]=-1,e.tokens.push({type:"footnote_reference_open",label:d,level:e.level++}),r=e.bMarks[a],n=e.tShift[a],u=e.parentType,e.tShift[a]=e.skipSpaces(c)-c,e.bMarks[a]=c,e.blkIndent+=4,e.parentType="footnote",e.tShift[a]<e.blkIndent&&(e.tShift[a]+=e.blkIndent,e.bMarks[a]-=e.blkIndent),e.parser.tokenize(e,a,i,!0),e.parentType=u,e.blkIndent-=4,e.tShift[a]=n,e.bMarks[a]=r,e.tokens.push({type:"footnote_reference_close",level:--e.level})),!0)}function Z0(e,a,i,s){var r,n,u,c=e.bMarks[a]+e.tShift[a],d=e.eMarks[a];if(c>=d||(r=e.src.charCodeAt(c),r!==35||c>=d))return!1;for(n=1,r=e.src.charCodeAt(++c);r===35&&c<d&&n<=6;)n++,r=e.src.charCodeAt(++c);return n>6||c<d&&r!==32?!1:(s||(d=e.skipCharsBack(d,32,c),u=e.skipCharsBack(d,35,c),u>c&&e.src.charCodeAt(u-1)===32&&(d=u),e.line=a+1,e.tokens.push({type:"heading_open",hLevel:n,lines:[a,e.line],level:e.level}),c<d&&e.tokens.push({type:"inline",content:e.src.slice(c,d).trim(),level:e.level+1,lines:[a,e.line],children:[]}),e.tokens.push({type:"heading_close",hLevel:n,level:e.level})),!0)}function X0(e,a,i){var s,r,n,u=a+1;return u>=i||e.tShift[u]<e.blkIndent||e.tShift[u]-e.blkIndent>3||(r=e.bMarks[u]+e.tShift[u],n=e.eMarks[u],r>=n)||(s=e.src.charCodeAt(r),s!==45&&s!==61)||(r=e.skipChars(r,s),r=e.skipSpaces(r),r<n)?!1:(r=e.bMarks[a]+e.tShift[a],e.line=u+1,e.tokens.push({type:"heading_open",hLevel:s===61?1:2,lines:[a,e.line],level:e.level}),e.tokens.push({type:"inline",content:e.src.slice(r,e.eMarks[a]).trim(),level:e.level+1,lines:[a,e.line-1],children:[]}),e.tokens.push({type:"heading_close",hLevel:s===61?1:2,level:e.level}),!0)}var Mc={};["article","aside","button","blockquote","body","canvas","caption","col","colgroup","dd","div","dl","dt","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","hr","iframe","li","map","object","ol","output","p","pre","progress","script","section","style","table","tbody","td","textarea","tfoot","th","tr","thead","ul","video"].forEach(function(e){Mc[e]=!0});var K0=/^<([a-zA-Z]{1,15})[\s\/>]/,Q0=/^<\/([a-zA-Z]{1,15})[\s>]/;function ef(e){var a=e|32;return a>=97&&a<=122}function tf(e,a,i,s){var r,n,u,c=e.bMarks[a],d=e.eMarks[a],f=e.tShift[a];if(c+=f,!e.options.html||f>3||c+2>=d||e.src.charCodeAt(c)!==60)return!1;if(r=e.src.charCodeAt(c+1),r===33||r===63){if(s)return!0}else if(r===47||ef(r)){if(r===47){if(n=e.src.slice(c,d).match(Q0),!n)return!1}else if(n=e.src.slice(c,d).match(K0),!n)return!1;if(Mc[n[1].toLowerCase()]!==!0)return!1;if(s)return!0}else return!1;for(u=a+1;u<e.lineMax&&!e.isEmpty(u);)u++;return e.line=u,e.tokens.push({type:"htmlblock",level:e.level,lines:[a,e.line],content:e.getLines(a,u,0,!0)}),!0}function $s(e,a){var i=e.bMarks[a]+e.blkIndent,s=e.eMarks[a];return e.src.substr(i,s-i)}function rf(e,a,i,s){var r,n,u,c,d,f,o,h,l,p,x;if(a+2>i||(d=a+1,e.tShift[d]<e.blkIndent)||(u=e.bMarks[d]+e.tShift[d],u>=e.eMarks[d])||(r=e.src.charCodeAt(u),r!==124&&r!==45&&r!==58)||(n=$s(e,a+1),!/^[-:| ]+$/.test(n))||(f=n.split("|"),f<=2))return!1;for(h=[],c=0;c<f.length;c++){if(l=f[c].trim(),!l){if(c===0||c===f.length-1)continue;return!1}if(!/^:?-+:?$/.test(l))return!1;l.charCodeAt(l.length-1)===58?h.push(l.charCodeAt(0)===58?"center":"right"):l.charCodeAt(0)===58?h.push("left"):h.push("")}if(n=$s(e,a).trim(),n.indexOf("|")===-1||(f=n.replace(/^\||\|$/g,"").split("|"),h.length!==f.length))return!1;if(s)return!0;for(e.tokens.push({type:"table_open",lines:p=[a,0],level:e.level++}),e.tokens.push({type:"thead_open",lines:[a,a+1],level:e.level++}),e.tokens.push({type:"tr_open",lines:[a,a+1],level:e.level++}),c=0;c<f.length;c++)e.tokens.push({type:"th_open",align:h[c],lines:[a,a+1],level:e.level++}),e.tokens.push({type:"inline",content:f[c].trim(),lines:[a,a+1],level:e.level,children:[]}),e.tokens.push({type:"th_close",level:--e.level});for(e.tokens.push({type:"tr_close",level:--e.level}),e.tokens.push({type:"thead_close",level:--e.level}),e.tokens.push({type:"tbody_open",lines:x=[a+2,0],level:e.level++}),d=a+2;d<i&&!(e.tShift[d]<e.blkIndent||(n=$s(e,d).trim(),n.indexOf("|")===-1));d++){for(f=n.replace(/^\||\|$/g,"").split("|"),e.tokens.push({type:"tr_open",level:e.level++}),c=0;c<f.length;c++)e.tokens.push({type:"td_open",align:h[c],level:e.level++}),o=f[c].substring(f[c].charCodeAt(0)===124?1:0,f[c].charCodeAt(f[c].length-1)===124?f[c].length-1:f[c].length).trim(),e.tokens.push({type:"inline",content:o,level:e.level,children:[]}),e.tokens.push({type:"td_close",level:--e.level});e.tokens.push({type:"tr_close",level:--e.level})}return e.tokens.push({type:"tbody_close",level:--e.level}),e.tokens.push({type:"table_close",level:--e.level}),p[1]=x[1]=d,e.line=d,!0}function jn(e,a){var i,s,r=e.bMarks[a]+e.tShift[a],n=e.eMarks[a];return r>=n||(s=e.src.charCodeAt(r++),s!==126&&s!==58)||(i=e.skipSpaces(r),r===i)||i>=n?-1:i}function af(e,a){var i,s,r=e.level+2;for(i=a+2,s=e.tokens.length-2;i<s;i++)e.tokens[i].level===r&&e.tokens[i].type==="paragraph_open"&&(e.tokens[i+2].tight=!0,e.tokens[i].tight=!0,i+=2)}function nf(e,a,i,s){var r,n,u,c,d,f,o,h,l,p,x,w,b,g;if(s)return e.ddIndent<0?!1:jn(e,a)>=0;if(o=a+1,e.isEmpty(o)&&++o>i||e.tShift[o]<e.blkIndent||(r=jn(e,o),r<0)||e.level>=e.options.maxNesting)return!1;f=e.tokens.length,e.tokens.push({type:"dl_open",lines:d=[a,0],level:e.level++}),u=a,n=o;e:for(;;){for(g=!0,b=!1,e.tokens.push({type:"dt_open",lines:[u,u],level:e.level++}),e.tokens.push({type:"inline",content:e.getLines(u,u+1,e.blkIndent,!1).trim(),level:e.level+1,lines:[u,u],children:[]}),e.tokens.push({type:"dt_close",level:--e.level});;){if(e.tokens.push({type:"dd_open",lines:c=[o,0],level:e.level++}),w=e.tight,l=e.ddIndent,h=e.blkIndent,x=e.tShift[n],p=e.parentType,e.blkIndent=e.ddIndent=e.tShift[n]+2,e.tShift[n]=r-e.bMarks[n],e.tight=!0,e.parentType="deflist",e.parser.tokenize(e,n,i,!0),(!e.tight||b)&&(g=!1),b=e.line-n>1&&e.isEmpty(e.line-1),e.tShift[n]=x,e.tight=w,e.parentType=p,e.blkIndent=h,e.ddIndent=l,e.tokens.push({type:"dd_close",level:--e.level}),c[1]=o=e.line,o>=i||e.tShift[o]<e.blkIndent)break e;if(r=jn(e,o),r<0)break;n=o}if(o>=i||(u=o,e.isEmpty(u))||e.tShift[u]<e.blkIndent||(n=u+1,n>=i)||(e.isEmpty(n)&&n++,n>=i)||e.tShift[n]<e.blkIndent||(r=jn(e,n),r<0))break}return e.tokens.push({type:"dl_close",level:--e.level}),d[1]=o,e.line=o,g&&af(e,f),!0}function sf(e,a){var i,s,r,n,u,c=a+1,d;if(i=e.lineMax,c<i&&!e.isEmpty(c)){for(d=e.parser.ruler.getRules("paragraph");c<i&&!e.isEmpty(c);c++)if(!(e.tShift[c]-e.blkIndent>3)){for(r=!1,n=0,u=d.length;n<u;n++)if(d[n](e,c,i,!0)){r=!0;break}if(r)break}}return s=e.getLines(a,c,e.blkIndent,!1).trim(),e.line=c,s.length&&(e.tokens.push({type:"paragraph_open",tight:!1,lines:[a,e.line],level:e.level}),e.tokens.push({type:"inline",content:s,level:e.level+1,lines:[a,e.line],children:[]}),e.tokens.push({type:"paragraph_close",tight:!1,level:e.level})),!0}var En=[["code",U0],["fences",z0,["paragraph","blockquote","list"]],["blockquote",H0,["paragraph","blockquote","list"]],["hr",W0,["paragraph","blockquote","list"]],["list",J0,["paragraph","blockquote"]],["footnote",Y0,["paragraph"]],["heading",Z0,["paragraph","blockquote"]],["lheading",X0],["htmlblock",tf,["paragraph","blockquote"]],["table",rf,["paragraph"]],["deflist",nf,["paragraph"]],["paragraph",sf]];function Hi(){this.ruler=new bt;for(var e=0;e<En.length;e++)this.ruler.push(En[e][0],En[e][1],{alt:(En[e][2]||[]).slice()})}Hi.prototype.tokenize=function(e,a,i){for(var s=this.ruler.getRules(""),r=s.length,n=a,u=!1,c,d;n<i&&(e.line=n=e.skipEmptyLines(n),!(n>=i||e.tShift[n]<e.blkIndent));){for(d=0;d<r&&(c=s[d](e,n,i,!1),!c);d++);if(e.tight=!u,e.isEmpty(e.line-1)&&(u=!0),n=e.line,n<i&&e.isEmpty(n)){if(u=!0,n++,n<i&&e.parentType==="list"&&e.isEmpty(n))break;e.line=n}}};var of=/[\n\t]/g,uf=/\r[\n\u0085]|[\u2424\u2028\u0085]/g,lf=/\u00a0/g;Hi.prototype.parse=function(e,a,i,s){var r,n=0,u=0;if(!e)return[];e=e.replace(lf," "),e=e.replace(uf,`
|
|
116
|
-
`),e.indexOf(" ")>=0&&(e=e.replace(of,function(c,d){var f;return e.charCodeAt(d)===10?(n=d+1,u=0,c):(f=" ".slice((d-n-u)%4),u=d-n+1,f)})),r=new zr(e,this,a,i,s),this.tokenize(r,r.line,r.lineMax)};function cf(e){switch(e){case 10:case 92:case 96:case 42:case 95:case 94:case 91:case 93:case 33:case 38:case 60:case 62:case 123:case 125:case 36:case 37:case 64:case 126:case 43:case 61:case 58:return!0;default:return!1}}function df(e,a){for(var i=e.pos;i<e.posMax&&!cf(e.src.charCodeAt(i));)i++;return i===e.pos?!1:(a||(e.pending+=e.src.slice(e.pos,i)),e.pos=i,!0)}function ff(e,a){var i,s,r=e.pos;if(e.src.charCodeAt(r)!==10)return!1;if(i=e.pending.length-1,s=e.posMax,!a)if(i>=0&&e.pending.charCodeAt(i)===32)if(i>=1&&e.pending.charCodeAt(i-1)===32){for(var n=i-2;n>=0;n--)if(e.pending.charCodeAt(n)!==32){e.pending=e.pending.substring(0,n+1);break}e.push({type:"hardbreak",level:e.level})}else e.pending=e.pending.slice(0,-1),e.push({type:"softbreak",level:e.level});else e.push({type:"softbreak",level:e.level});for(r++;r<s&&e.src.charCodeAt(r)===32;)r++;return e.pos=r,!0}var Wi=[];for(var nu=0;nu<256;nu++)Wi.push(0);"\\!\"#$%&'()*+,./:;<=>?@[]^_`{|}~-".split("").forEach(function(e){Wi[e.charCodeAt(0)]=1});function hf(e,a){var i,s=e.pos,r=e.posMax;if(e.src.charCodeAt(s)!==92)return!1;if(s++,s<r){if(i=e.src.charCodeAt(s),i<256&&Wi[i]!==0)return a||(e.pending+=e.src[s]),e.pos+=2,!0;if(i===10){for(a||e.push({type:"hardbreak",level:e.level}),s++;s<r&&e.src.charCodeAt(s)===32;)s++;return e.pos=s,!0}}return a||(e.pending+="\\"),e.pos++,!0}function pf(e,a){var i,s,r,n,u,c=e.pos,d=e.src.charCodeAt(c);if(d!==96)return!1;for(i=c,c++,s=e.posMax;c<s&&e.src.charCodeAt(c)===96;)c++;for(r=e.src.slice(i,c),n=u=c;(n=e.src.indexOf("`",u))!==-1;){for(u=n+1;u<s&&e.src.charCodeAt(u)===96;)u++;if(u-n===r.length)return a||e.push({type:"code",content:e.src.slice(c,n).replace(/[ \n]+/g," ").trim(),block:!1,level:e.level}),e.pos=u,!0}return a||(e.pending+=r),e.pos+=r.length,!0}function mf(e,a){var i,s,r,n=e.posMax,u=e.pos,c,d;if(e.src.charCodeAt(u)!==126||a||u+4>=n||e.src.charCodeAt(u+1)!==126||e.level>=e.options.maxNesting||(c=u>0?e.src.charCodeAt(u-1):-1,d=e.src.charCodeAt(u+2),c===126)||d===126||d===32||d===10)return!1;for(s=u+2;s<n&&e.src.charCodeAt(s)===126;)s++;if(s>u+3)return e.pos+=s-u,a||(e.pending+=e.src.slice(u,s)),!0;for(e.pos=u+2,r=1;e.pos+1<n;){if(e.src.charCodeAt(e.pos)===126&&e.src.charCodeAt(e.pos+1)===126&&(c=e.src.charCodeAt(e.pos-1),d=e.pos+2<n?e.src.charCodeAt(e.pos+2):-1,d!==126&&c!==126&&(c!==32&&c!==10?r--:d!==32&&d!==10&&r++,r<=0))){i=!0;break}e.parser.skipToken(e)}return i?(e.posMax=e.pos,e.pos=u+2,a||(e.push({type:"del_open",level:e.level++}),e.parser.tokenize(e),e.push({type:"del_close",level:--e.level})),e.pos=e.posMax+2,e.posMax=n,!0):(e.pos=u,!1)}function gf(e,a){var i,s,r,n=e.posMax,u=e.pos,c,d;if(e.src.charCodeAt(u)!==43||a||u+4>=n||e.src.charCodeAt(u+1)!==43||e.level>=e.options.maxNesting||(c=u>0?e.src.charCodeAt(u-1):-1,d=e.src.charCodeAt(u+2),c===43)||d===43||d===32||d===10)return!1;for(s=u+2;s<n&&e.src.charCodeAt(s)===43;)s++;if(s!==u+2)return e.pos+=s-u,a||(e.pending+=e.src.slice(u,s)),!0;for(e.pos=u+2,r=1;e.pos+1<n;){if(e.src.charCodeAt(e.pos)===43&&e.src.charCodeAt(e.pos+1)===43&&(c=e.src.charCodeAt(e.pos-1),d=e.pos+2<n?e.src.charCodeAt(e.pos+2):-1,d!==43&&c!==43&&(c!==32&&c!==10?r--:d!==32&&d!==10&&r++,r<=0))){i=!0;break}e.parser.skipToken(e)}return i?(e.posMax=e.pos,e.pos=u+2,a||(e.push({type:"ins_open",level:e.level++}),e.parser.tokenize(e),e.push({type:"ins_close",level:--e.level})),e.pos=e.posMax+2,e.posMax=n,!0):(e.pos=u,!1)}function bf(e,a){var i,s,r,n=e.posMax,u=e.pos,c,d;if(e.src.charCodeAt(u)!==61||a||u+4>=n||e.src.charCodeAt(u+1)!==61||e.level>=e.options.maxNesting||(c=u>0?e.src.charCodeAt(u-1):-1,d=e.src.charCodeAt(u+2),c===61)||d===61||d===32||d===10)return!1;for(s=u+2;s<n&&e.src.charCodeAt(s)===61;)s++;if(s!==u+2)return e.pos+=s-u,a||(e.pending+=e.src.slice(u,s)),!0;for(e.pos=u+2,r=1;e.pos+1<n;){if(e.src.charCodeAt(e.pos)===61&&e.src.charCodeAt(e.pos+1)===61&&(c=e.src.charCodeAt(e.pos-1),d=e.pos+2<n?e.src.charCodeAt(e.pos+2):-1,d!==61&&c!==61&&(c!==32&&c!==10?r--:d!==32&&d!==10&&r++,r<=0))){i=!0;break}e.parser.skipToken(e)}return i?(e.posMax=e.pos,e.pos=u+2,a||(e.push({type:"mark_open",level:e.level++}),e.parser.tokenize(e),e.push({type:"mark_close",level:--e.level})),e.pos=e.posMax+2,e.posMax=n,!0):(e.pos=u,!1)}function su(e){return e>=48&&e<=57||e>=65&&e<=90||e>=97&&e<=122}function iu(e,a){var i=a,s,r,n,u=!0,c=!0,d=e.posMax,f=e.src.charCodeAt(a);for(s=a>0?e.src.charCodeAt(a-1):-1;i<d&&e.src.charCodeAt(i)===f;)i++;return i>=d&&(u=!1),n=i-a,n>=4?u=c=!1:(r=i<d?e.src.charCodeAt(i):-1,(r===32||r===10)&&(u=!1),(s===32||s===10)&&(c=!1),f===95&&(su(s)&&(u=!1),su(r)&&(c=!1))),{can_open:u,can_close:c,delims:n}}function xf(e,a){var i,s,r,n,u,c,d,f=e.posMax,o=e.pos,h=e.src.charCodeAt(o);if(h!==95&&h!==42||a)return!1;if(d=iu(e,o),i=d.delims,!d.can_open)return e.pos+=i,a||(e.pending+=e.src.slice(o,e.pos)),!0;if(e.level>=e.options.maxNesting)return!1;for(e.pos=o+i,c=[i];e.pos<f;){if(e.src.charCodeAt(e.pos)===h){if(d=iu(e,e.pos),s=d.delims,d.can_close){for(n=c.pop(),u=s;n!==u;){if(u<n){c.push(n-u);break}if(u-=n,c.length===0)break;e.pos+=n,n=c.pop()}if(c.length===0){i=n,r=!0;break}e.pos+=s;continue}d.can_open&&c.push(s),e.pos+=s;continue}e.parser.skipToken(e)}return r?(e.posMax=e.pos,e.pos=o+i,a||((i===2||i===3)&&e.push({type:"strong_open",level:e.level++}),(i===1||i===3)&&e.push({type:"em_open",level:e.level++}),e.parser.tokenize(e),(i===1||i===3)&&e.push({type:"em_close",level:--e.level}),(i===2||i===3)&&e.push({type:"strong_close",level:--e.level})),e.pos=e.posMax+i,e.posMax=f,!0):(e.pos=o,!1)}var yf=/\\([ \\!"#$%&'()*+,.\/:;<=>?@[\]^_`{|}~-])/g;function vf(e,a){var i,s,r=e.posMax,n=e.pos;if(e.src.charCodeAt(n)!==126||a||n+2>=r||e.level>=e.options.maxNesting)return!1;for(e.pos=n+1;e.pos<r;){if(e.src.charCodeAt(e.pos)===126){i=!0;break}e.parser.skipToken(e)}return!i||n+1===e.pos||(s=e.src.slice(n+1,e.pos),s.match(/(^|[^\\])(\\\\)*\s/))?(e.pos=n,!1):(e.posMax=e.pos,e.pos=n+1,a||e.push({type:"sub",level:e.level,content:s.replace(yf,"$1")}),e.pos=e.posMax+1,e.posMax=r,!0)}var wf=/\\([ \\!"#$%&'()*+,.\/:;<=>?@[\]^_`{|}~-])/g;function _f(e,a){var i,s,r=e.posMax,n=e.pos;if(e.src.charCodeAt(n)!==94||a||n+2>=r||e.level>=e.options.maxNesting)return!1;for(e.pos=n+1;e.pos<r;){if(e.src.charCodeAt(e.pos)===94){i=!0;break}e.parser.skipToken(e)}return!i||n+1===e.pos||(s=e.src.slice(n+1,e.pos),s.match(/(^|[^\\])(\\\\)*\s/))?(e.pos=n,!1):(e.posMax=e.pos,e.pos=n+1,a||e.push({type:"sup",level:e.level,content:s.replace(wf,"$1")}),e.pos=e.posMax+1,e.posMax=r,!0)}function kf(e,a){var i,s,r,n,u,c,d,f,o=!1,h=e.pos,l=e.posMax,p=e.pos,x=e.src.charCodeAt(p);if(x===33&&(o=!0,x=e.src.charCodeAt(++p)),x!==91||e.level>=e.options.maxNesting||(i=p+1,s=Qa(e,p),s<0))return!1;if(c=s+1,c<l&&e.src.charCodeAt(c)===40){for(c++;c<l&&(f=e.src.charCodeAt(c),!(f!==32&&f!==10));c++);if(c>=l)return!1;for(p=c,Oc(e,c)?(n=e.linkContent,c=e.pos):n="",p=c;c<l&&(f=e.src.charCodeAt(c),!(f!==32&&f!==10));c++);if(c<l&&p!==c&&Pc(e,c))for(u=e.linkContent,c=e.pos;c<l&&(f=e.src.charCodeAt(c),!(f!==32&&f!==10));c++);else u="";if(c>=l||e.src.charCodeAt(c)!==41)return e.pos=h,!1;c++}else{if(e.linkLevel>0)return!1;for(;c<l&&(f=e.src.charCodeAt(c),!(f!==32&&f!==10));c++);if(c<l&&e.src.charCodeAt(c)===91&&(p=c+1,c=Qa(e,c),c>=0?r=e.src.slice(p,c++):c=p-1),r||(typeof r>"u"&&(c=s+1),r=e.src.slice(i,s)),d=e.env.references[$c(r)],!d)return e.pos=h,!1;n=d.href,u=d.title}return a||(e.pos=i,e.posMax=s,o?e.push({type:"image",src:n,title:u,alt:e.src.substr(i,s-i),level:e.level}):(e.push({type:"link_open",href:n,title:u,level:e.level++}),e.linkLevel++,e.parser.tokenize(e),e.linkLevel--,e.push({type:"link_close",level:--e.level}))),e.pos=c,e.posMax=l,!0}function Nf(e,a){var i,s,r,n,u=e.posMax,c=e.pos;return c+2>=u||e.src.charCodeAt(c)!==94||e.src.charCodeAt(c+1)!==91||e.level>=e.options.maxNesting||(i=c+2,s=Qa(e,c+1),s<0)?!1:(a||(e.env.footnotes||(e.env.footnotes={}),e.env.footnotes.list||(e.env.footnotes.list=[]),r=e.env.footnotes.list.length,e.pos=i,e.posMax=s,e.push({type:"footnote_ref",id:r,level:e.level}),e.linkLevel++,n=e.tokens.length,e.parser.tokenize(e),e.env.footnotes.list[r]={tokens:e.tokens.splice(n)},e.linkLevel--),e.pos=s+1,e.posMax=u,!0)}function jf(e,a){var i,s,r,n,u=e.posMax,c=e.pos;if(c+3>u||!e.env.footnotes||!e.env.footnotes.refs||e.src.charCodeAt(c)!==91||e.src.charCodeAt(c+1)!==94||e.level>=e.options.maxNesting)return!1;for(s=c+2;s<u;s++){if(e.src.charCodeAt(s)===32||e.src.charCodeAt(s)===10)return!1;if(e.src.charCodeAt(s)===93)break}return s===c+2||s>=u||(s++,i=e.src.slice(c+2,s-1),typeof e.env.footnotes.refs[":"+i]>"u")?!1:(a||(e.env.footnotes.list||(e.env.footnotes.list=[]),e.env.footnotes.refs[":"+i]<0?(r=e.env.footnotes.list.length,e.env.footnotes.list[r]={label:i,count:0},e.env.footnotes.refs[":"+i]=r):r=e.env.footnotes.refs[":"+i],n=e.env.footnotes.list[r].count,e.env.footnotes.list[r].count++,e.push({type:"footnote_ref",id:r,subId:n,level:e.level})),e.pos=s,e.posMax=u,!0)}var Ef=["coap","doi","javascript","aaa","aaas","about","acap","cap","cid","crid","data","dav","dict","dns","file","ftp","geo","go","gopher","h323","http","https","iax","icap","im","imap","info","ipp","iris","iris.beep","iris.xpc","iris.xpcs","iris.lwz","ldap","mailto","mid","msrp","msrps","mtqp","mupdate","news","nfs","ni","nih","nntp","opaquelocktoken","pop","pres","rtsp","service","session","shttp","sieve","sip","sips","sms","snmp","soap.beep","soap.beeps","tag","tel","telnet","tftp","thismessage","tn3270","tip","tv","urn","vemmi","ws","wss","xcon","xcon-userid","xmlrpc.beep","xmlrpc.beeps","xmpp","z39.50r","z39.50s","adiumxtra","afp","afs","aim","apt","attachment","aw","beshare","bitcoin","bolo","callto","chrome","chrome-extension","com-eventbrite-attendee","content","cvs","dlna-playsingle","dlna-playcontainer","dtn","dvb","ed2k","facetime","feed","finger","fish","gg","git","gizmoproject","gtalk","hcp","icon","ipn","irc","irc6","ircs","itms","jar","jms","keyparc","lastfm","ldaps","magnet","maps","market","message","mms","ms-help","msnim","mumble","mvn","notes","oid","palm","paparazzi","platform","proxy","psyc","query","res","resource","rmi","rsync","rtmp","secondlife","sftp","sgn","skype","smb","soldat","spotify","ssh","steam","svn","teamspeak","things","udp","unreal","ut2004","ventrilo","view-source","webcal","wtai","wyciwyg","xfire","xri","ymsgr"],Af=/^<([a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*)>/,Sf=/^<([a-zA-Z.\-]{1,25}):([^<>\x00-\x20]*)>/;function Cf(e,a){var i,s,r,n,u,c=e.pos;return e.src.charCodeAt(c)!==60||(i=e.src.slice(c),i.indexOf(">")<0)?!1:(s=i.match(Sf),s?Ef.indexOf(s[1].toLowerCase())<0||(n=s[0].slice(1,-1),u=$i(n),!e.parser.validateLink(n))?!1:(a||(e.push({type:"link_open",href:u,level:e.level}),e.push({type:"text",content:n,level:e.level+1}),e.push({type:"link_close",level:e.level})),e.pos+=s[0].length,!0):(r=i.match(Af),r?(n=r[0].slice(1,-1),u=$i("mailto:"+n),e.parser.validateLink(u)?(a||(e.push({type:"link_open",href:u,level:e.level}),e.push({type:"text",content:n,level:e.level+1}),e.push({type:"link_close",level:e.level})),e.pos+=r[0].length,!0):!1):!1))}function ls(e,a){return e=e.source,a=a||"",function i(s,r){return s?(r=r.source||r,e=e.replace(s,r),i):new RegExp(e,a)}}var Df=/[a-zA-Z_:][a-zA-Z0-9:._-]*/,Tf=/[^"'=<>`\x00-\x20]+/,Of=/'[^']*'/,Pf=/"[^"]*"/,$f=ls(/(?:unquoted|single_quoted|double_quoted)/)("unquoted",Tf)("single_quoted",Of)("double_quoted",Pf)(),Lf=ls(/(?:\s+attr_name(?:\s*=\s*attr_value)?)/)("attr_name",Df)("attr_value",$f)(),Mf=ls(/<[A-Za-z][A-Za-z0-9]*attribute*\s*\/?>/)("attribute",Lf)(),Rf=/<\/[A-Za-z][A-Za-z0-9]*\s*>/,If=/<!---->|<!--(?:-?[^>-])(?:-?[^-])*-->/,Ff=/<[?].*?[?]>/,qf=/<![A-Z]+\s+[^>]*>/,Bf=/<!\[CDATA\[[\s\S]*?\]\]>/,Vf=ls(/^(?:open_tag|close_tag|comment|processing|declaration|cdata)/)("open_tag",Mf)("close_tag",Rf)("comment",If)("processing",Ff)("declaration",qf)("cdata",Bf)();function Uf(e){var a=e|32;return a>=97&&a<=122}function zf(e,a){var i,s,r,n=e.pos;return!e.options.html||(r=e.posMax,e.src.charCodeAt(n)!==60||n+2>=r)||(i=e.src.charCodeAt(n+1),i!==33&&i!==63&&i!==47&&!Uf(i))||(s=e.src.slice(n).match(Vf),!s)?!1:(a||e.push({type:"htmltag",content:e.src.slice(n,n+s[0].length),level:e.level}),e.pos+=s[0].length,!0)}var Hf=/^&#((?:x[a-f0-9]{1,8}|[0-9]{1,8}));/i,Wf=/^&([a-z][a-z0-9]{1,31});/i;function Gf(e,a){var i,s,r,n=e.pos,u=e.posMax;if(e.src.charCodeAt(n)!==38)return!1;if(n+1<u){if(i=e.src.charCodeAt(n+1),i===35){if(r=e.src.slice(n).match(Hf),r)return a||(s=r[1][0].toLowerCase()==="x"?parseInt(r[1].slice(1),16):parseInt(r[1],10),e.pending+=Ui(s)?es(s):es(65533)),e.pos+=r[0].length,!0}else if(r=e.src.slice(n).match(Wf),r){var c=Cc(r[1]);if(r[1]!==c)return a||(e.pending+=c),e.pos+=r[0].length,!0}}return a||(e.pending+="&"),e.pos++,!0}var Ls=[["text",df],["newline",ff],["escape",hf],["backticks",pf],["del",mf],["ins",gf],["mark",bf],["emphasis",xf],["sub",vf],["sup",_f],["links",kf],["footnote_inline",Nf],["footnote_ref",jf],["autolink",Cf],["htmltag",zf],["entity",Gf]];function cs(){this.ruler=new bt;for(var e=0;e<Ls.length;e++)this.ruler.push(Ls[e][0],Ls[e][1]);this.validateLink=Jf}cs.prototype.skipToken=function(e){var a=this.ruler.getRules(""),i=a.length,s=e.pos,r,n;if((n=e.cacheGet(s))>0){e.pos=n;return}for(r=0;r<i;r++)if(a[r](e,!0)){e.cacheSet(s,e.pos);return}e.pos++,e.cacheSet(s,e.pos)};cs.prototype.tokenize=function(e){for(var a=this.ruler.getRules(""),i=a.length,s=e.posMax,r,n;e.pos<s;){for(n=0;n<i&&(r=a[n](e,!1),!r);n++);if(r){if(e.pos>=s)break;continue}e.pending+=e.src[e.pos++]}e.pending&&e.pushPending()};cs.prototype.parse=function(e,a,i,s){var r=new Ur(e,this,a,i,s);this.tokenize(r)};function Jf(e){var a=["vbscript","javascript","file","data"],i=e.trim().toLowerCase();return i=br(i),!(i.indexOf(":")!==-1&&a.indexOf(i.split(":")[0])!==-1)}var Yf={options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkTarget:"",typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{rules:["block","inline","references","replacements","smartquotes","references","abbr2","footnote_tail"]},block:{rules:["blockquote","code","fences","footnote","heading","hr","htmlblock","lheading","list","paragraph","table"]},inline:{rules:["autolink","backticks","del","emphasis","entity","escape","footnote_ref","htmltag","links","newline","text"]}}},Zf={options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkTarget:"",typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{},block:{},inline:{}}},Xf={options:{html:!0,xhtmlOut:!0,breaks:!1,langPrefix:"language-",linkTarget:"",typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{rules:["block","inline","references","abbr2"]},block:{rules:["blockquote","code","fences","heading","hr","htmlblock","lheading","list","paragraph"]},inline:{rules:["autolink","backticks","emphasis","entity","escape","htmltag","links","newline","text"]}}},Kf={default:Yf,full:Zf,commonmark:Xf};function Rc(e,a,i){this.src=a,this.env=i,this.options=e.options,this.tokens=[],this.inlineMode=!1,this.inline=e.inline,this.block=e.block,this.renderer=e.renderer,this.typographer=e.typographer}function yr(e,a){typeof e!="string"&&(a=e,e="default"),a&&a.linkify!=null&&console.warn(`linkify option is removed. Use linkify plugin instead:
|
|
113
|
+
`};function $c(e,r){return++r>=e.length-2?r:e[r].type==="paragraph_open"&&e[r].tight&&e[r+1].type==="inline"&&e[r+1].content.length===0&&e[r+2].type==="paragraph_close"&&e[r+2].tight?$c(e,r+2):r}var Vr=de.getBreak=function(r,i){return i=$c(r,i),i<r.length&&r[i].type==="list_item_close"?"":`
|
|
114
|
+
`};function Hi(){this.rules=Ui({},de),this.getBreak=de.getBreak}Hi.prototype.renderInline=function(e,r,i){for(var s=this.rules,a=e.length,n=0,u="";a--;)u+=s[e[n].type](e,n++,r,i,this);return u};Hi.prototype.render=function(e,r,i){for(var s=this.rules,a=e.length,n=-1,u="";++n<a;)e[n].type==="inline"?u+=this.renderInline(e[n].children,r,i):u+=s[e[n].type](e,n,r,i,this);return u};function bt(){this.__rules__=[],this.__cache__=null}bt.prototype.__find__=function(e){for(var r=this.__rules__.length,i=-1;r--;)if(this.__rules__[++i].name===e)return i;return-1};bt.prototype.__compile__=function(){var e=this,r=[""];e.__rules__.forEach(function(i){i.enabled&&i.alt.forEach(function(s){r.indexOf(s)<0&&r.push(s)})}),e.__cache__={},r.forEach(function(i){e.__cache__[i]=[],e.__rules__.forEach(function(s){s.enabled&&(i&&s.alt.indexOf(i)<0||e.__cache__[i].push(s.fn))})})};bt.prototype.at=function(e,r,i){var s=this.__find__(e),a=i||{};if(s===-1)throw new Error("Parser rule not found: "+e);this.__rules__[s].fn=r,this.__rules__[s].alt=a.alt||[],this.__cache__=null};bt.prototype.before=function(e,r,i,s){var a=this.__find__(e),n=s||{};if(a===-1)throw new Error("Parser rule not found: "+e);this.__rules__.splice(a,0,{name:r,enabled:!0,fn:i,alt:n.alt||[]}),this.__cache__=null};bt.prototype.after=function(e,r,i,s){var a=this.__find__(e),n=s||{};if(a===-1)throw new Error("Parser rule not found: "+e);this.__rules__.splice(a+1,0,{name:r,enabled:!0,fn:i,alt:n.alt||[]}),this.__cache__=null};bt.prototype.push=function(e,r,i){var s=i||{};this.__rules__.push({name:e,enabled:!0,fn:r,alt:s.alt||[]}),this.__cache__=null};bt.prototype.enable=function(e,r){e=Array.isArray(e)?e:[e],r&&this.__rules__.forEach(function(i){i.enabled=!1}),e.forEach(function(i){var s=this.__find__(i);if(s<0)throw new Error("Rules manager: invalid rule name "+i);this.__rules__[s].enabled=!0},this),this.__cache__=null};bt.prototype.disable=function(e){e=Array.isArray(e)?e:[e],e.forEach(function(r){var i=this.__find__(r);if(i<0)throw new Error("Rules manager: invalid rule name "+r);this.__rules__[i].enabled=!1},this),this.__cache__=null};bt.prototype.getRules=function(e){return this.__cache__===null&&this.__compile__(),this.__cache__[e]||[]};function A0(e){e.inlineMode?e.tokens.push({type:"inline",content:e.src.replace(/\n/g," ").trim(),level:0,lines:[0,1],children:[]}):e.block.parse(e.src,e.options,e.env,e.tokens)}function Ur(e,r,i,s,a){this.src=e,this.env=s,this.options=i,this.parser=r,this.tokens=a,this.pos=0,this.posMax=this.src.length,this.level=0,this.pending="",this.pendingLevel=0,this.cache=[],this.isInLabel=!1,this.linkLevel=0,this.linkContent="",this.labelUnmatchedScopes=0}Ur.prototype.pushPending=function(){this.tokens.push({type:"text",content:this.pending,level:this.pendingLevel}),this.pending=""};Ur.prototype.push=function(e){this.pending&&this.pushPending(),this.tokens.push(e),this.pendingLevel=this.level};Ur.prototype.cacheSet=function(e,r){for(var i=this.cache.length;i<=e;i++)this.cache.push(0);this.cache[e]=r};Ur.prototype.cacheGet=function(e){return e<this.cache.length?this.cache[e]:0};function Qa(e,r){var i,s,a,n=-1,u=e.posMax,c=e.pos,d=e.isInLabel;if(e.isInLabel)return-1;if(e.labelUnmatchedScopes)return e.labelUnmatchedScopes--,-1;for(e.pos=r+1,e.isInLabel=!0,i=1;e.pos<u;){if(a=e.src.charCodeAt(e.pos),a===91)i++;else if(a===93&&(i--,i===0)){s=!0;break}e.parser.skipToken(e)}return s?(n=e.pos,e.labelUnmatchedScopes=0):e.labelUnmatchedScopes=i-1,e.pos=c,e.isInLabel=d,n}function S0(e,r,i,s){var a,n,u,c,d,f;if(e.charCodeAt(0)!==42||e.charCodeAt(1)!==91||e.indexOf("]:")===-1||(a=new Ur(e,r,i,s,[]),n=Qa(a,1),n<0||e.charCodeAt(n+1)!==58))return-1;for(c=a.posMax,u=n+2;u<c&&a.src.charCodeAt(u)!==10;u++);return d=e.slice(2,n),f=e.slice(n+2,u).trim(),f.length===0?-1:(s.abbreviations||(s.abbreviations={}),typeof s.abbreviations[":"+d]>"u"&&(s.abbreviations[":"+d]=f),u)}function C0(e){var r=e.tokens,i,s,a,n;if(!e.inlineMode){for(i=1,s=r.length-1;i<s;i++)if(r[i-1].type==="paragraph_open"&&r[i].type==="inline"&&r[i+1].type==="paragraph_close"){for(a=r[i].content;a.length&&(n=S0(a,e.inline,e.options,e.env),!(n<0));)a=a.slice(n).trim();r[i].content=a,a.length||(r[i-1].tight=!0,r[i+1].tight=!0)}}}function Li(e){var r=br(e);try{r=decodeURI(r)}catch{}return encodeURI(r)}function Lc(e,r){var i,s,a,n=r,u=e.posMax;if(e.src.charCodeAt(r)===60){for(r++;r<u;){if(i=e.src.charCodeAt(r),i===10)return!1;if(i===62)return a=Li(ia(e.src.slice(n+1,r))),e.parser.validateLink(a)?(e.pos=r+1,e.linkContent=a,!0):!1;if(i===92&&r+1<u){r+=2;continue}r++}return!1}for(s=0;r<u&&(i=e.src.charCodeAt(r),!(i===32||i<32||i===127));){if(i===92&&r+1<u){r+=2;continue}if(i===40&&(s++,s>1)||i===41&&(s--,s<0))break;r++}return n===r||(a=ia(e.src.slice(n,r)),!e.parser.validateLink(a))?!1:(e.linkContent=a,e.pos=r,!0)}function Mc(e,r){var i,s=r,a=e.posMax,n=e.src.charCodeAt(r);if(n!==34&&n!==39&&n!==40)return!1;for(r++,n===40&&(n=41);r<a;){if(i=e.src.charCodeAt(r),i===n)return e.pos=r+1,e.linkContent=ia(e.src.slice(s+1,r)),!0;if(i===92&&r+1<a){r+=2;continue}r++}return!1}function Rc(e){return e.trim().replace(/\s+/g," ").toUpperCase()}function D0(e,r,i,s){var a,n,u,c,d,f,o,h,l;if(e.charCodeAt(0)!==91||e.indexOf("]:")===-1||(a=new Ur(e,r,i,s,[]),n=Qa(a,0),n<0||e.charCodeAt(n+1)!==58))return-1;for(c=a.posMax,u=n+2;u<c&&(d=a.src.charCodeAt(u),!(d!==32&&d!==10));u++);if(!Lc(a,u))return-1;for(o=a.linkContent,u=a.pos,f=u,u=u+1;u<c&&(d=a.src.charCodeAt(u),!(d!==32&&d!==10));u++);for(u<c&&f!==u&&Mc(a,u)?(h=a.linkContent,u=a.pos):(h="",u=f);u<c&&a.src.charCodeAt(u)===32;)u++;return u<c&&a.src.charCodeAt(u)!==10?-1:(l=Rc(e.slice(1,n)),typeof s.references[l]>"u"&&(s.references[l]={title:h,href:o}),u)}function T0(e){var r=e.tokens,i,s,a,n;if(e.env.references=e.env.references||{},!e.inlineMode){for(i=1,s=r.length-1;i<s;i++)if(r[i].type==="inline"&&r[i-1].type==="paragraph_open"&&r[i+1].type==="paragraph_close"){for(a=r[i].content;a.length&&(n=D0(a,e.inline,e.options,e.env),!(n<0));)a=a.slice(n).trim();r[i].content=a,a.length||(r[i-1].tight=!0,r[i+1].tight=!0)}}}function O0(e){var r=e.tokens,i,s,a;for(s=0,a=r.length;s<a;s++)i=r[s],i.type==="inline"&&e.inline.parse(i.content,e.options,e.env,i.children)}function P0(e){var r,i,s,a,n,u,c,d,f,o=0,h=!1,l={};if(e.env.footnotes&&(e.tokens=e.tokens.filter(function(p){return p.type==="footnote_reference_open"?(h=!0,d=[],f=p.label,!1):p.type==="footnote_reference_close"?(h=!1,l[":"+f]=d,!1):(h&&d.push(p),!h)}),!!e.env.footnotes.list)){for(u=e.env.footnotes.list,e.tokens.push({type:"footnote_block_open",level:o++}),r=0,i=u.length;r<i;r++){for(e.tokens.push({type:"footnote_open",id:r,level:o++}),u[r].tokens?(c=[],c.push({type:"paragraph_open",tight:!1,level:o++}),c.push({type:"inline",content:"",level:o,children:u[r].tokens}),c.push({type:"paragraph_close",tight:!1,level:--o})):u[r].label&&(c=l[":"+u[r].label]),e.tokens=e.tokens.concat(c),e.tokens[e.tokens.length-1].type==="paragraph_close"?n=e.tokens.pop():n=null,a=u[r].count>0?u[r].count:1,s=0;s<a;s++)e.tokens.push({type:"footnote_anchor",id:r,subId:s,level:o});n&&e.tokens.push(n),e.tokens.push({type:"footnote_close",level:--o})}e.tokens.push({type:"footnote_block_close",level:--o})}}var tu=`
|
|
115
|
+
()[]'".,!?-`;function Ps(e){return e.replace(/([-()\[\]{}+?*.$\^|,:#<!\\])/g,"\\$1")}function $0(e){var r,i,s,a,n,u,c,d,f,o,h,l,p=e.tokens;if(e.env.abbreviations){for(e.env.abbrRegExp||(l="(^|["+tu.split("").map(Ps).join("")+"])("+Object.keys(e.env.abbreviations).map(function(x){return x.substr(1)}).sort(function(x,w){return w.length-x.length}).map(Ps).join("|")+")($|["+tu.split("").map(Ps).join("")+"])",e.env.abbrRegExp=new RegExp(l,"g")),o=e.env.abbrRegExp,i=0,s=p.length;i<s;i++)if(p[i].type==="inline"){for(a=p[i].children,r=a.length-1;r>=0;r--)if(n=a[r],n.type==="text"){for(d=0,u=n.content,o.lastIndex=0,f=n.level,c=[];h=o.exec(u);)o.lastIndex>d&&c.push({type:"text",content:u.slice(d,h.index+h[1].length),level:f}),c.push({type:"abbr_open",title:e.env.abbreviations[":"+h[2]],level:f++}),c.push({type:"text",content:h[2],level:f}),c.push({type:"abbr_close",level:--f}),d=o.lastIndex-h[3].length;c.length&&(d<u.length&&c.push({type:"text",content:u.slice(d),level:f}),p[i].children=a=[].concat(a.slice(0,r),c,a.slice(r+1)))}}}}var L0=/\+-|\.\.|\?\?\?\?|!!!!|,,|--/,M0=/\((c|tm|r|p)\)/ig,R0={c:"©",r:"®",p:"§",tm:"™"};function I0(e){return e.indexOf("(")<0?e:e.replace(M0,function(r,i){return R0[i.toLowerCase()]})}function F0(e){var r,i,s,a,n;if(e.options.typographer){for(n=e.tokens.length-1;n>=0;n--)if(e.tokens[n].type==="inline")for(a=e.tokens[n].children,r=a.length-1;r>=0;r--)i=a[r],i.type==="text"&&(s=i.content,s=I0(s),L0.test(s)&&(s=s.replace(/\+-/g,"±").replace(/\.{2,}/g,"…").replace(/([?!])…/g,"$1..").replace(/([?!]){4,}/g,"$1$1$1").replace(/,{2,}/g,",").replace(/(^|[^-])---([^-]|$)/mg,"$1—$2").replace(/(^|\s)--(\s|$)/mg,"$1–$2").replace(/(^|[^-\s])--([^-\s]|$)/mg,"$1–$2")),i.content=s)}}var q0=/['"]/,ru=/['"]/g,B0=/[-\s()\[\]]/,au="’";function nu(e,r){return r<0||r>=e.length?!1:!B0.test(e[r])}function ea(e,r,i){return e.substr(0,r)+i+e.substr(r+1)}function V0(e){var r,i,s,a,n,u,c,d,f,o,h,l,p,x,w,b,g;if(e.options.typographer){for(g=[],w=e.tokens.length-1;w>=0;w--)if(e.tokens[w].type==="inline"){for(b=e.tokens[w].children,g.length=0,r=0;r<b.length;r++)if(i=b[r],!(i.type!=="text"||q0.test(i.text))){for(c=b[r].level,p=g.length-1;p>=0&&!(g[p].level<=c);p--);g.length=p+1,s=i.content,n=0,u=s.length;e:for(;n<u&&(ru.lastIndex=n,a=ru.exec(s),!!a);){if(d=!nu(s,a.index-1),n=a.index+1,x=a[0]==="'",f=!nu(s,n),!f&&!d){x&&(i.content=ea(i.content,a.index,au));continue}if(h=!f,l=!d,l){for(p=g.length-1;p>=0&&(o=g[p],!(g[p].level<c));p--)if(o.single===x&&g[p].level===c){o=g[p],x?(b[o.token].content=ea(b[o.token].content,o.pos,e.options.quotes[2]),i.content=ea(i.content,a.index,e.options.quotes[3])):(b[o.token].content=ea(b[o.token].content,o.pos,e.options.quotes[0]),i.content=ea(i.content,a.index,e.options.quotes[1])),g.length=p;continue e}}h?g.push({token:r,pos:a.index,single:x,level:c}):l&&x&&(i.content=ea(i.content,a.index,au))}}}}}var $s=[["block",A0],["abbr",C0],["references",T0],["inline",O0],["footnote_tail",P0],["abbr2",$0],["replacements",F0],["smartquotes",V0]];function Ic(){this.options={},this.ruler=new bt;for(var e=0;e<$s.length;e++)this.ruler.push($s[e][0],$s[e][1])}Ic.prototype.process=function(e){var r,i,s;for(s=this.ruler.getRules(""),r=0,i=s.length;r<i;r++)s[r](e)};function zr(e,r,i,s,a){var n,u,c,d,f,o,h;for(this.src=e,this.parser=r,this.options=i,this.env=s,this.tokens=a,this.bMarks=[],this.eMarks=[],this.tShift=[],this.blkIndent=0,this.line=0,this.lineMax=0,this.tight=!1,this.parentType="root",this.ddIndent=-1,this.level=0,this.result="",u=this.src,o=0,h=!1,c=d=o=0,f=u.length;d<f;d++){if(n=u.charCodeAt(d),!h)if(n===32){o++;continue}else h=!0;(n===10||d===f-1)&&(n!==10&&d++,this.bMarks.push(c),this.eMarks.push(d),this.tShift.push(o),h=!1,o=0,c=d+1)}this.bMarks.push(u.length),this.eMarks.push(u.length),this.tShift.push(0),this.lineMax=this.bMarks.length-1}zr.prototype.isEmpty=function(r){return this.bMarks[r]+this.tShift[r]>=this.eMarks[r]};zr.prototype.skipEmptyLines=function(r){for(var i=this.lineMax;r<i&&!(this.bMarks[r]+this.tShift[r]<this.eMarks[r]);r++);return r};zr.prototype.skipSpaces=function(r){for(var i=this.src.length;r<i&&this.src.charCodeAt(r)===32;r++);return r};zr.prototype.skipChars=function(r,i){for(var s=this.src.length;r<s&&this.src.charCodeAt(r)===i;r++);return r};zr.prototype.skipCharsBack=function(r,i,s){if(r<=s)return r;for(;r>s;)if(i!==this.src.charCodeAt(--r))return r+1;return r};zr.prototype.getLines=function(r,i,s,a){var n,u,c,d,f,o=r;if(r>=i)return"";if(o+1===i)return u=this.bMarks[o]+Math.min(this.tShift[o],s),c=a?this.eMarks[o]+1:this.eMarks[o],this.src.slice(u,c);for(d=new Array(i-r),n=0;o<i;o++,n++)f=this.tShift[o],f>s&&(f=s),f<0&&(f=0),u=this.bMarks[o]+f,o+1<i||a?c=this.eMarks[o]+1:c=this.eMarks[o],d[n]=this.src.slice(u,c);return d.join("")};function U0(e,r,i){var s,a;if(e.tShift[r]-e.blkIndent<4)return!1;for(a=s=r+1;s<i;){if(e.isEmpty(s)){s++;continue}if(e.tShift[s]-e.blkIndent>=4){s++,a=s;continue}break}return e.line=s,e.tokens.push({type:"code",content:e.getLines(r,a,4+e.blkIndent,!0),block:!0,lines:[r,e.line],level:e.level}),!0}function z0(e,r,i,s){var a,n,u,c,d,f=!1,o=e.bMarks[r]+e.tShift[r],h=e.eMarks[r];if(o+3>h||(a=e.src.charCodeAt(o),a!==126&&a!==96)||(d=o,o=e.skipChars(o,a),n=o-d,n<3)||(u=e.src.slice(o,h).trim(),u.indexOf("`")>=0))return!1;if(s)return!0;for(c=r;c++,!(c>=i||(o=d=e.bMarks[c]+e.tShift[c],h=e.eMarks[c],o<h&&e.tShift[c]<e.blkIndent));)if(e.src.charCodeAt(o)===a&&!(e.tShift[c]-e.blkIndent>=4)&&(o=e.skipChars(o,a),!(o-d<n)&&(o=e.skipSpaces(o),!(o<h)))){f=!0;break}return n=e.tShift[r],e.line=c+(f?1:0),e.tokens.push({type:"fence",params:u,content:e.getLines(r+1,c,n,!0),lines:[r,e.line],level:e.level}),!0}function H0(e,r,i,s){var a,n,u,c,d,f,o,h,l,p,x,w=e.bMarks[r]+e.tShift[r],b=e.eMarks[r];if(w>b||e.src.charCodeAt(w++)!==62||e.level>=e.options.maxNesting)return!1;if(s)return!0;for(e.src.charCodeAt(w)===32&&w++,d=e.blkIndent,e.blkIndent=0,c=[e.bMarks[r]],e.bMarks[r]=w,w=w<b?e.skipSpaces(w):w,n=w>=b,u=[e.tShift[r]],e.tShift[r]=w-e.bMarks[r],h=e.parser.ruler.getRules("blockquote"),a=r+1;a<i&&(w=e.bMarks[a]+e.tShift[a],b=e.eMarks[a],!(w>=b));a++){if(e.src.charCodeAt(w++)===62){e.src.charCodeAt(w)===32&&w++,c.push(e.bMarks[a]),e.bMarks[a]=w,w=w<b?e.skipSpaces(w):w,n=w>=b,u.push(e.tShift[a]),e.tShift[a]=w-e.bMarks[a];continue}if(n)break;for(x=!1,l=0,p=h.length;l<p;l++)if(h[l](e,a,i,!0)){x=!0;break}if(x)break;c.push(e.bMarks[a]),u.push(e.tShift[a]),e.tShift[a]=-1337}for(f=e.parentType,e.parentType="blockquote",e.tokens.push({type:"blockquote_open",lines:o=[r,0],level:e.level++}),e.parser.tokenize(e,r,a),e.tokens.push({type:"blockquote_close",level:--e.level}),e.parentType=f,o[1]=e.line,l=0;l<u.length;l++)e.bMarks[l+r]=c[l],e.tShift[l+r]=u[l];return e.blkIndent=d,!0}function W0(e,r,i,s){var a,n,u,c=e.bMarks[r],d=e.eMarks[r];if(c+=e.tShift[r],c>d||(a=e.src.charCodeAt(c++),a!==42&&a!==45&&a!==95))return!1;for(n=1;c<d;){if(u=e.src.charCodeAt(c++),u!==a&&u!==32)return!1;u===a&&n++}return n<3?!1:(s||(e.line=r+1,e.tokens.push({type:"hr",lines:[r,e.line],level:e.level})),!0)}function su(e,r){var i,s,a;return s=e.bMarks[r]+e.tShift[r],a=e.eMarks[r],s>=a||(i=e.src.charCodeAt(s++),i!==42&&i!==45&&i!==43)||s<a&&e.src.charCodeAt(s)!==32?-1:s}function iu(e,r){var i,s=e.bMarks[r]+e.tShift[r],a=e.eMarks[r];if(s+1>=a||(i=e.src.charCodeAt(s++),i<48||i>57))return-1;for(;;){if(s>=a)return-1;if(i=e.src.charCodeAt(s++),!(i>=48&&i<=57)){if(i===41||i===46)break;return-1}}return s<a&&e.src.charCodeAt(s)!==32?-1:s}function G0(e,r){var i,s,a=e.level+2;for(i=r+2,s=e.tokens.length-2;i<s;i++)e.tokens[i].level===a&&e.tokens[i].type==="paragraph_open"&&(e.tokens[i+2].tight=!0,e.tokens[i].tight=!0,i+=2)}function J0(e,r,i,s){var a,n,u,c,d,f,o,h,l,p,x,w,b,g,v,_,N,y,m=!0,k,j,E,D;if((h=iu(e,r))>=0)b=!0;else if((h=su(e,r))>=0)b=!1;else return!1;if(e.level>=e.options.maxNesting)return!1;if(w=e.src.charCodeAt(h-1),s)return!0;for(v=e.tokens.length,b?(o=e.bMarks[r]+e.tShift[r],x=Number(e.src.substr(o,h-o-1)),e.tokens.push({type:"ordered_list_open",order:x,lines:N=[r,0],level:e.level++})):e.tokens.push({type:"bullet_list_open",lines:N=[r,0],level:e.level++}),a=r,_=!1,k=e.parser.ruler.getRules("list");a<i&&(g=e.skipSpaces(h),l=e.eMarks[a],g>=l?p=1:p=g-h,p>4&&(p=1),p<1&&(p=1),n=h-e.bMarks[a]+p,e.tokens.push({type:"list_item_open",lines:y=[r,0],level:e.level++}),c=e.blkIndent,d=e.tight,u=e.tShift[r],f=e.parentType,e.tShift[r]=g-e.bMarks[r],e.blkIndent=n,e.tight=!0,e.parentType="list",e.parser.tokenize(e,r,i,!0),(!e.tight||_)&&(m=!1),_=e.line-r>1&&e.isEmpty(e.line-1),e.blkIndent=c,e.tShift[r]=u,e.tight=d,e.parentType=f,e.tokens.push({type:"list_item_close",level:--e.level}),a=r=e.line,y[1]=a,g=e.bMarks[r],!(a>=i||e.isEmpty(a)||e.tShift[a]<e.blkIndent));){for(D=!1,j=0,E=k.length;j<E;j++)if(k[j](e,a,i,!0)){D=!0;break}if(D)break;if(b){if(h=iu(e,a),h<0)break}else if(h=su(e,a),h<0)break;if(w!==e.src.charCodeAt(h-1))break}return e.tokens.push({type:b?"ordered_list_close":"bullet_list_close",level:--e.level}),N[1]=a,e.line=a,m&&G0(e,v),!0}function Y0(e,r,i,s){var a,n,u,c,d,f=e.bMarks[r]+e.tShift[r],o=e.eMarks[r];if(f+4>o||e.src.charCodeAt(f)!==91||e.src.charCodeAt(f+1)!==94||e.level>=e.options.maxNesting)return!1;for(c=f+2;c<o;c++){if(e.src.charCodeAt(c)===32)return!1;if(e.src.charCodeAt(c)===93)break}return c===f+2||c+1>=o||e.src.charCodeAt(++c)!==58?!1:(s||(c++,e.env.footnotes||(e.env.footnotes={}),e.env.footnotes.refs||(e.env.footnotes.refs={}),d=e.src.slice(f+2,c-2),e.env.footnotes.refs[":"+d]=-1,e.tokens.push({type:"footnote_reference_open",label:d,level:e.level++}),a=e.bMarks[r],n=e.tShift[r],u=e.parentType,e.tShift[r]=e.skipSpaces(c)-c,e.bMarks[r]=c,e.blkIndent+=4,e.parentType="footnote",e.tShift[r]<e.blkIndent&&(e.tShift[r]+=e.blkIndent,e.bMarks[r]-=e.blkIndent),e.parser.tokenize(e,r,i,!0),e.parentType=u,e.blkIndent-=4,e.tShift[r]=n,e.bMarks[r]=a,e.tokens.push({type:"footnote_reference_close",level:--e.level})),!0)}function Z0(e,r,i,s){var a,n,u,c=e.bMarks[r]+e.tShift[r],d=e.eMarks[r];if(c>=d||(a=e.src.charCodeAt(c),a!==35||c>=d))return!1;for(n=1,a=e.src.charCodeAt(++c);a===35&&c<d&&n<=6;)n++,a=e.src.charCodeAt(++c);return n>6||c<d&&a!==32?!1:(s||(d=e.skipCharsBack(d,32,c),u=e.skipCharsBack(d,35,c),u>c&&e.src.charCodeAt(u-1)===32&&(d=u),e.line=r+1,e.tokens.push({type:"heading_open",hLevel:n,lines:[r,e.line],level:e.level}),c<d&&e.tokens.push({type:"inline",content:e.src.slice(c,d).trim(),level:e.level+1,lines:[r,e.line],children:[]}),e.tokens.push({type:"heading_close",hLevel:n,level:e.level})),!0)}function X0(e,r,i){var s,a,n,u=r+1;return u>=i||e.tShift[u]<e.blkIndent||e.tShift[u]-e.blkIndent>3||(a=e.bMarks[u]+e.tShift[u],n=e.eMarks[u],a>=n)||(s=e.src.charCodeAt(a),s!==45&&s!==61)||(a=e.skipChars(a,s),a=e.skipSpaces(a),a<n)?!1:(a=e.bMarks[r]+e.tShift[r],e.line=u+1,e.tokens.push({type:"heading_open",hLevel:s===61?1:2,lines:[r,e.line],level:e.level}),e.tokens.push({type:"inline",content:e.src.slice(a,e.eMarks[r]).trim(),level:e.level+1,lines:[r,e.line-1],children:[]}),e.tokens.push({type:"heading_close",hLevel:s===61?1:2,level:e.level}),!0)}var Fc={};["article","aside","button","blockquote","body","canvas","caption","col","colgroup","dd","div","dl","dt","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","hr","iframe","li","map","object","ol","output","p","pre","progress","script","section","style","table","tbody","td","textarea","tfoot","th","tr","thead","ul","video"].forEach(function(e){Fc[e]=!0});var K0=/^<([a-zA-Z]{1,15})[\s\/>]/,Q0=/^<\/([a-zA-Z]{1,15})[\s>]/;function ef(e){var r=e|32;return r>=97&&r<=122}function tf(e,r,i,s){var a,n,u,c=e.bMarks[r],d=e.eMarks[r],f=e.tShift[r];if(c+=f,!e.options.html||f>3||c+2>=d||e.src.charCodeAt(c)!==60)return!1;if(a=e.src.charCodeAt(c+1),a===33||a===63){if(s)return!0}else if(a===47||ef(a)){if(a===47){if(n=e.src.slice(c,d).match(Q0),!n)return!1}else if(n=e.src.slice(c,d).match(K0),!n)return!1;if(Fc[n[1].toLowerCase()]!==!0)return!1;if(s)return!0}else return!1;for(u=r+1;u<e.lineMax&&!e.isEmpty(u);)u++;return e.line=u,e.tokens.push({type:"htmlblock",level:e.level,lines:[r,e.line],content:e.getLines(r,u,0,!0)}),!0}function Ls(e,r){var i=e.bMarks[r]+e.blkIndent,s=e.eMarks[r];return e.src.substr(i,s-i)}function rf(e,r,i,s){var a,n,u,c,d,f,o,h,l,p,x;if(r+2>i||(d=r+1,e.tShift[d]<e.blkIndent)||(u=e.bMarks[d]+e.tShift[d],u>=e.eMarks[d])||(a=e.src.charCodeAt(u),a!==124&&a!==45&&a!==58)||(n=Ls(e,r+1),!/^[-:| ]+$/.test(n))||(f=n.split("|"),f<=2))return!1;for(h=[],c=0;c<f.length;c++){if(l=f[c].trim(),!l){if(c===0||c===f.length-1)continue;return!1}if(!/^:?-+:?$/.test(l))return!1;l.charCodeAt(l.length-1)===58?h.push(l.charCodeAt(0)===58?"center":"right"):l.charCodeAt(0)===58?h.push("left"):h.push("")}if(n=Ls(e,r).trim(),n.indexOf("|")===-1||(f=n.replace(/^\||\|$/g,"").split("|"),h.length!==f.length))return!1;if(s)return!0;for(e.tokens.push({type:"table_open",lines:p=[r,0],level:e.level++}),e.tokens.push({type:"thead_open",lines:[r,r+1],level:e.level++}),e.tokens.push({type:"tr_open",lines:[r,r+1],level:e.level++}),c=0;c<f.length;c++)e.tokens.push({type:"th_open",align:h[c],lines:[r,r+1],level:e.level++}),e.tokens.push({type:"inline",content:f[c].trim(),lines:[r,r+1],level:e.level,children:[]}),e.tokens.push({type:"th_close",level:--e.level});for(e.tokens.push({type:"tr_close",level:--e.level}),e.tokens.push({type:"thead_close",level:--e.level}),e.tokens.push({type:"tbody_open",lines:x=[r+2,0],level:e.level++}),d=r+2;d<i&&!(e.tShift[d]<e.blkIndent||(n=Ls(e,d).trim(),n.indexOf("|")===-1));d++){for(f=n.replace(/^\||\|$/g,"").split("|"),e.tokens.push({type:"tr_open",level:e.level++}),c=0;c<f.length;c++)e.tokens.push({type:"td_open",align:h[c],level:e.level++}),o=f[c].substring(f[c].charCodeAt(0)===124?1:0,f[c].charCodeAt(f[c].length-1)===124?f[c].length-1:f[c].length).trim(),e.tokens.push({type:"inline",content:o,level:e.level,children:[]}),e.tokens.push({type:"td_close",level:--e.level});e.tokens.push({type:"tr_close",level:--e.level})}return e.tokens.push({type:"tbody_close",level:--e.level}),e.tokens.push({type:"table_close",level:--e.level}),p[1]=x[1]=d,e.line=d,!0}function jn(e,r){var i,s,a=e.bMarks[r]+e.tShift[r],n=e.eMarks[r];return a>=n||(s=e.src.charCodeAt(a++),s!==126&&s!==58)||(i=e.skipSpaces(a),a===i)||i>=n?-1:i}function af(e,r){var i,s,a=e.level+2;for(i=r+2,s=e.tokens.length-2;i<s;i++)e.tokens[i].level===a&&e.tokens[i].type==="paragraph_open"&&(e.tokens[i+2].tight=!0,e.tokens[i].tight=!0,i+=2)}function nf(e,r,i,s){var a,n,u,c,d,f,o,h,l,p,x,w,b,g;if(s)return e.ddIndent<0?!1:jn(e,r)>=0;if(o=r+1,e.isEmpty(o)&&++o>i||e.tShift[o]<e.blkIndent||(a=jn(e,o),a<0)||e.level>=e.options.maxNesting)return!1;f=e.tokens.length,e.tokens.push({type:"dl_open",lines:d=[r,0],level:e.level++}),u=r,n=o;e:for(;;){for(g=!0,b=!1,e.tokens.push({type:"dt_open",lines:[u,u],level:e.level++}),e.tokens.push({type:"inline",content:e.getLines(u,u+1,e.blkIndent,!1).trim(),level:e.level+1,lines:[u,u],children:[]}),e.tokens.push({type:"dt_close",level:--e.level});;){if(e.tokens.push({type:"dd_open",lines:c=[o,0],level:e.level++}),w=e.tight,l=e.ddIndent,h=e.blkIndent,x=e.tShift[n],p=e.parentType,e.blkIndent=e.ddIndent=e.tShift[n]+2,e.tShift[n]=a-e.bMarks[n],e.tight=!0,e.parentType="deflist",e.parser.tokenize(e,n,i,!0),(!e.tight||b)&&(g=!1),b=e.line-n>1&&e.isEmpty(e.line-1),e.tShift[n]=x,e.tight=w,e.parentType=p,e.blkIndent=h,e.ddIndent=l,e.tokens.push({type:"dd_close",level:--e.level}),c[1]=o=e.line,o>=i||e.tShift[o]<e.blkIndent)break e;if(a=jn(e,o),a<0)break;n=o}if(o>=i||(u=o,e.isEmpty(u))||e.tShift[u]<e.blkIndent||(n=u+1,n>=i)||(e.isEmpty(n)&&n++,n>=i)||e.tShift[n]<e.blkIndent||(a=jn(e,n),a<0))break}return e.tokens.push({type:"dl_close",level:--e.level}),d[1]=o,e.line=o,g&&af(e,f),!0}function sf(e,r){var i,s,a,n,u,c=r+1,d;if(i=e.lineMax,c<i&&!e.isEmpty(c)){for(d=e.parser.ruler.getRules("paragraph");c<i&&!e.isEmpty(c);c++)if(!(e.tShift[c]-e.blkIndent>3)){for(a=!1,n=0,u=d.length;n<u;n++)if(d[n](e,c,i,!0)){a=!0;break}if(a)break}}return s=e.getLines(r,c,e.blkIndent,!1).trim(),e.line=c,s.length&&(e.tokens.push({type:"paragraph_open",tight:!1,lines:[r,e.line],level:e.level}),e.tokens.push({type:"inline",content:s,level:e.level+1,lines:[r,e.line],children:[]}),e.tokens.push({type:"paragraph_close",tight:!1,level:e.level})),!0}var En=[["code",U0],["fences",z0,["paragraph","blockquote","list"]],["blockquote",H0,["paragraph","blockquote","list"]],["hr",W0,["paragraph","blockquote","list"]],["list",J0,["paragraph","blockquote"]],["footnote",Y0,["paragraph"]],["heading",Z0,["paragraph","blockquote"]],["lheading",X0],["htmlblock",tf,["paragraph","blockquote"]],["table",rf,["paragraph"]],["deflist",nf,["paragraph"]],["paragraph",sf]];function Wi(){this.ruler=new bt;for(var e=0;e<En.length;e++)this.ruler.push(En[e][0],En[e][1],{alt:(En[e][2]||[]).slice()})}Wi.prototype.tokenize=function(e,r,i){for(var s=this.ruler.getRules(""),a=s.length,n=r,u=!1,c,d;n<i&&(e.line=n=e.skipEmptyLines(n),!(n>=i||e.tShift[n]<e.blkIndent));){for(d=0;d<a&&(c=s[d](e,n,i,!1),!c);d++);if(e.tight=!u,e.isEmpty(e.line-1)&&(u=!0),n=e.line,n<i&&e.isEmpty(n)){if(u=!0,n++,n<i&&e.parentType==="list"&&e.isEmpty(n))break;e.line=n}}};var of=/[\n\t]/g,uf=/\r[\n\u0085]|[\u2424\u2028\u0085]/g,lf=/\u00a0/g;Wi.prototype.parse=function(e,r,i,s){var a,n=0,u=0;if(!e)return[];e=e.replace(lf," "),e=e.replace(uf,`
|
|
116
|
+
`),e.indexOf(" ")>=0&&(e=e.replace(of,function(c,d){var f;return e.charCodeAt(d)===10?(n=d+1,u=0,c):(f=" ".slice((d-n-u)%4),u=d-n+1,f)})),a=new zr(e,this,r,i,s),this.tokenize(a,a.line,a.lineMax)};function cf(e){switch(e){case 10:case 92:case 96:case 42:case 95:case 94:case 91:case 93:case 33:case 38:case 60:case 62:case 123:case 125:case 36:case 37:case 64:case 126:case 43:case 61:case 58:return!0;default:return!1}}function df(e,r){for(var i=e.pos;i<e.posMax&&!cf(e.src.charCodeAt(i));)i++;return i===e.pos?!1:(r||(e.pending+=e.src.slice(e.pos,i)),e.pos=i,!0)}function ff(e,r){var i,s,a=e.pos;if(e.src.charCodeAt(a)!==10)return!1;if(i=e.pending.length-1,s=e.posMax,!r)if(i>=0&&e.pending.charCodeAt(i)===32)if(i>=1&&e.pending.charCodeAt(i-1)===32){for(var n=i-2;n>=0;n--)if(e.pending.charCodeAt(n)!==32){e.pending=e.pending.substring(0,n+1);break}e.push({type:"hardbreak",level:e.level})}else e.pending=e.pending.slice(0,-1),e.push({type:"softbreak",level:e.level});else e.push({type:"softbreak",level:e.level});for(a++;a<s&&e.src.charCodeAt(a)===32;)a++;return e.pos=a,!0}var Gi=[];for(var ou=0;ou<256;ou++)Gi.push(0);"\\!\"#$%&'()*+,./:;<=>?@[]^_`{|}~-".split("").forEach(function(e){Gi[e.charCodeAt(0)]=1});function hf(e,r){var i,s=e.pos,a=e.posMax;if(e.src.charCodeAt(s)!==92)return!1;if(s++,s<a){if(i=e.src.charCodeAt(s),i<256&&Gi[i]!==0)return r||(e.pending+=e.src[s]),e.pos+=2,!0;if(i===10){for(r||e.push({type:"hardbreak",level:e.level}),s++;s<a&&e.src.charCodeAt(s)===32;)s++;return e.pos=s,!0}}return r||(e.pending+="\\"),e.pos++,!0}function pf(e,r){var i,s,a,n,u,c=e.pos,d=e.src.charCodeAt(c);if(d!==96)return!1;for(i=c,c++,s=e.posMax;c<s&&e.src.charCodeAt(c)===96;)c++;for(a=e.src.slice(i,c),n=u=c;(n=e.src.indexOf("`",u))!==-1;){for(u=n+1;u<s&&e.src.charCodeAt(u)===96;)u++;if(u-n===a.length)return r||e.push({type:"code",content:e.src.slice(c,n).replace(/[ \n]+/g," ").trim(),block:!1,level:e.level}),e.pos=u,!0}return r||(e.pending+=a),e.pos+=a.length,!0}function mf(e,r){var i,s,a,n=e.posMax,u=e.pos,c,d;if(e.src.charCodeAt(u)!==126||r||u+4>=n||e.src.charCodeAt(u+1)!==126||e.level>=e.options.maxNesting||(c=u>0?e.src.charCodeAt(u-1):-1,d=e.src.charCodeAt(u+2),c===126)||d===126||d===32||d===10)return!1;for(s=u+2;s<n&&e.src.charCodeAt(s)===126;)s++;if(s>u+3)return e.pos+=s-u,r||(e.pending+=e.src.slice(u,s)),!0;for(e.pos=u+2,a=1;e.pos+1<n;){if(e.src.charCodeAt(e.pos)===126&&e.src.charCodeAt(e.pos+1)===126&&(c=e.src.charCodeAt(e.pos-1),d=e.pos+2<n?e.src.charCodeAt(e.pos+2):-1,d!==126&&c!==126&&(c!==32&&c!==10?a--:d!==32&&d!==10&&a++,a<=0))){i=!0;break}e.parser.skipToken(e)}return i?(e.posMax=e.pos,e.pos=u+2,r||(e.push({type:"del_open",level:e.level++}),e.parser.tokenize(e),e.push({type:"del_close",level:--e.level})),e.pos=e.posMax+2,e.posMax=n,!0):(e.pos=u,!1)}function gf(e,r){var i,s,a,n=e.posMax,u=e.pos,c,d;if(e.src.charCodeAt(u)!==43||r||u+4>=n||e.src.charCodeAt(u+1)!==43||e.level>=e.options.maxNesting||(c=u>0?e.src.charCodeAt(u-1):-1,d=e.src.charCodeAt(u+2),c===43)||d===43||d===32||d===10)return!1;for(s=u+2;s<n&&e.src.charCodeAt(s)===43;)s++;if(s!==u+2)return e.pos+=s-u,r||(e.pending+=e.src.slice(u,s)),!0;for(e.pos=u+2,a=1;e.pos+1<n;){if(e.src.charCodeAt(e.pos)===43&&e.src.charCodeAt(e.pos+1)===43&&(c=e.src.charCodeAt(e.pos-1),d=e.pos+2<n?e.src.charCodeAt(e.pos+2):-1,d!==43&&c!==43&&(c!==32&&c!==10?a--:d!==32&&d!==10&&a++,a<=0))){i=!0;break}e.parser.skipToken(e)}return i?(e.posMax=e.pos,e.pos=u+2,r||(e.push({type:"ins_open",level:e.level++}),e.parser.tokenize(e),e.push({type:"ins_close",level:--e.level})),e.pos=e.posMax+2,e.posMax=n,!0):(e.pos=u,!1)}function bf(e,r){var i,s,a,n=e.posMax,u=e.pos,c,d;if(e.src.charCodeAt(u)!==61||r||u+4>=n||e.src.charCodeAt(u+1)!==61||e.level>=e.options.maxNesting||(c=u>0?e.src.charCodeAt(u-1):-1,d=e.src.charCodeAt(u+2),c===61)||d===61||d===32||d===10)return!1;for(s=u+2;s<n&&e.src.charCodeAt(s)===61;)s++;if(s!==u+2)return e.pos+=s-u,r||(e.pending+=e.src.slice(u,s)),!0;for(e.pos=u+2,a=1;e.pos+1<n;){if(e.src.charCodeAt(e.pos)===61&&e.src.charCodeAt(e.pos+1)===61&&(c=e.src.charCodeAt(e.pos-1),d=e.pos+2<n?e.src.charCodeAt(e.pos+2):-1,d!==61&&c!==61&&(c!==32&&c!==10?a--:d!==32&&d!==10&&a++,a<=0))){i=!0;break}e.parser.skipToken(e)}return i?(e.posMax=e.pos,e.pos=u+2,r||(e.push({type:"mark_open",level:e.level++}),e.parser.tokenize(e),e.push({type:"mark_close",level:--e.level})),e.pos=e.posMax+2,e.posMax=n,!0):(e.pos=u,!1)}function uu(e){return e>=48&&e<=57||e>=65&&e<=90||e>=97&&e<=122}function lu(e,r){var i=r,s,a,n,u=!0,c=!0,d=e.posMax,f=e.src.charCodeAt(r);for(s=r>0?e.src.charCodeAt(r-1):-1;i<d&&e.src.charCodeAt(i)===f;)i++;return i>=d&&(u=!1),n=i-r,n>=4?u=c=!1:(a=i<d?e.src.charCodeAt(i):-1,(a===32||a===10)&&(u=!1),(s===32||s===10)&&(c=!1),f===95&&(uu(s)&&(u=!1),uu(a)&&(c=!1))),{can_open:u,can_close:c,delims:n}}function xf(e,r){var i,s,a,n,u,c,d,f=e.posMax,o=e.pos,h=e.src.charCodeAt(o);if(h!==95&&h!==42||r)return!1;if(d=lu(e,o),i=d.delims,!d.can_open)return e.pos+=i,r||(e.pending+=e.src.slice(o,e.pos)),!0;if(e.level>=e.options.maxNesting)return!1;for(e.pos=o+i,c=[i];e.pos<f;){if(e.src.charCodeAt(e.pos)===h){if(d=lu(e,e.pos),s=d.delims,d.can_close){for(n=c.pop(),u=s;n!==u;){if(u<n){c.push(n-u);break}if(u-=n,c.length===0)break;e.pos+=n,n=c.pop()}if(c.length===0){i=n,a=!0;break}e.pos+=s;continue}d.can_open&&c.push(s),e.pos+=s;continue}e.parser.skipToken(e)}return a?(e.posMax=e.pos,e.pos=o+i,r||((i===2||i===3)&&e.push({type:"strong_open",level:e.level++}),(i===1||i===3)&&e.push({type:"em_open",level:e.level++}),e.parser.tokenize(e),(i===1||i===3)&&e.push({type:"em_close",level:--e.level}),(i===2||i===3)&&e.push({type:"strong_close",level:--e.level})),e.pos=e.posMax+i,e.posMax=f,!0):(e.pos=o,!1)}var yf=/\\([ \\!"#$%&'()*+,.\/:;<=>?@[\]^_`{|}~-])/g;function vf(e,r){var i,s,a=e.posMax,n=e.pos;if(e.src.charCodeAt(n)!==126||r||n+2>=a||e.level>=e.options.maxNesting)return!1;for(e.pos=n+1;e.pos<a;){if(e.src.charCodeAt(e.pos)===126){i=!0;break}e.parser.skipToken(e)}return!i||n+1===e.pos||(s=e.src.slice(n+1,e.pos),s.match(/(^|[^\\])(\\\\)*\s/))?(e.pos=n,!1):(e.posMax=e.pos,e.pos=n+1,r||e.push({type:"sub",level:e.level,content:s.replace(yf,"$1")}),e.pos=e.posMax+1,e.posMax=a,!0)}var wf=/\\([ \\!"#$%&'()*+,.\/:;<=>?@[\]^_`{|}~-])/g;function _f(e,r){var i,s,a=e.posMax,n=e.pos;if(e.src.charCodeAt(n)!==94||r||n+2>=a||e.level>=e.options.maxNesting)return!1;for(e.pos=n+1;e.pos<a;){if(e.src.charCodeAt(e.pos)===94){i=!0;break}e.parser.skipToken(e)}return!i||n+1===e.pos||(s=e.src.slice(n+1,e.pos),s.match(/(^|[^\\])(\\\\)*\s/))?(e.pos=n,!1):(e.posMax=e.pos,e.pos=n+1,r||e.push({type:"sup",level:e.level,content:s.replace(wf,"$1")}),e.pos=e.posMax+1,e.posMax=a,!0)}function kf(e,r){var i,s,a,n,u,c,d,f,o=!1,h=e.pos,l=e.posMax,p=e.pos,x=e.src.charCodeAt(p);if(x===33&&(o=!0,x=e.src.charCodeAt(++p)),x!==91||e.level>=e.options.maxNesting||(i=p+1,s=Qa(e,p),s<0))return!1;if(c=s+1,c<l&&e.src.charCodeAt(c)===40){for(c++;c<l&&(f=e.src.charCodeAt(c),!(f!==32&&f!==10));c++);if(c>=l)return!1;for(p=c,Lc(e,c)?(n=e.linkContent,c=e.pos):n="",p=c;c<l&&(f=e.src.charCodeAt(c),!(f!==32&&f!==10));c++);if(c<l&&p!==c&&Mc(e,c))for(u=e.linkContent,c=e.pos;c<l&&(f=e.src.charCodeAt(c),!(f!==32&&f!==10));c++);else u="";if(c>=l||e.src.charCodeAt(c)!==41)return e.pos=h,!1;c++}else{if(e.linkLevel>0)return!1;for(;c<l&&(f=e.src.charCodeAt(c),!(f!==32&&f!==10));c++);if(c<l&&e.src.charCodeAt(c)===91&&(p=c+1,c=Qa(e,c),c>=0?a=e.src.slice(p,c++):c=p-1),a||(typeof a>"u"&&(c=s+1),a=e.src.slice(i,s)),d=e.env.references[Rc(a)],!d)return e.pos=h,!1;n=d.href,u=d.title}return r||(e.pos=i,e.posMax=s,o?e.push({type:"image",src:n,title:u,alt:e.src.substr(i,s-i),level:e.level}):(e.push({type:"link_open",href:n,title:u,level:e.level++}),e.linkLevel++,e.parser.tokenize(e),e.linkLevel--,e.push({type:"link_close",level:--e.level}))),e.pos=c,e.posMax=l,!0}function Nf(e,r){var i,s,a,n,u=e.posMax,c=e.pos;return c+2>=u||e.src.charCodeAt(c)!==94||e.src.charCodeAt(c+1)!==91||e.level>=e.options.maxNesting||(i=c+2,s=Qa(e,c+1),s<0)?!1:(r||(e.env.footnotes||(e.env.footnotes={}),e.env.footnotes.list||(e.env.footnotes.list=[]),a=e.env.footnotes.list.length,e.pos=i,e.posMax=s,e.push({type:"footnote_ref",id:a,level:e.level}),e.linkLevel++,n=e.tokens.length,e.parser.tokenize(e),e.env.footnotes.list[a]={tokens:e.tokens.splice(n)},e.linkLevel--),e.pos=s+1,e.posMax=u,!0)}function jf(e,r){var i,s,a,n,u=e.posMax,c=e.pos;if(c+3>u||!e.env.footnotes||!e.env.footnotes.refs||e.src.charCodeAt(c)!==91||e.src.charCodeAt(c+1)!==94||e.level>=e.options.maxNesting)return!1;for(s=c+2;s<u;s++){if(e.src.charCodeAt(s)===32||e.src.charCodeAt(s)===10)return!1;if(e.src.charCodeAt(s)===93)break}return s===c+2||s>=u||(s++,i=e.src.slice(c+2,s-1),typeof e.env.footnotes.refs[":"+i]>"u")?!1:(r||(e.env.footnotes.list||(e.env.footnotes.list=[]),e.env.footnotes.refs[":"+i]<0?(a=e.env.footnotes.list.length,e.env.footnotes.list[a]={label:i,count:0},e.env.footnotes.refs[":"+i]=a):a=e.env.footnotes.refs[":"+i],n=e.env.footnotes.list[a].count,e.env.footnotes.list[a].count++,e.push({type:"footnote_ref",id:a,subId:n,level:e.level})),e.pos=s,e.posMax=u,!0)}var Ef=["coap","doi","javascript","aaa","aaas","about","acap","cap","cid","crid","data","dav","dict","dns","file","ftp","geo","go","gopher","h323","http","https","iax","icap","im","imap","info","ipp","iris","iris.beep","iris.xpc","iris.xpcs","iris.lwz","ldap","mailto","mid","msrp","msrps","mtqp","mupdate","news","nfs","ni","nih","nntp","opaquelocktoken","pop","pres","rtsp","service","session","shttp","sieve","sip","sips","sms","snmp","soap.beep","soap.beeps","tag","tel","telnet","tftp","thismessage","tn3270","tip","tv","urn","vemmi","ws","wss","xcon","xcon-userid","xmlrpc.beep","xmlrpc.beeps","xmpp","z39.50r","z39.50s","adiumxtra","afp","afs","aim","apt","attachment","aw","beshare","bitcoin","bolo","callto","chrome","chrome-extension","com-eventbrite-attendee","content","cvs","dlna-playsingle","dlna-playcontainer","dtn","dvb","ed2k","facetime","feed","finger","fish","gg","git","gizmoproject","gtalk","hcp","icon","ipn","irc","irc6","ircs","itms","jar","jms","keyparc","lastfm","ldaps","magnet","maps","market","message","mms","ms-help","msnim","mumble","mvn","notes","oid","palm","paparazzi","platform","proxy","psyc","query","res","resource","rmi","rsync","rtmp","secondlife","sftp","sgn","skype","smb","soldat","spotify","ssh","steam","svn","teamspeak","things","udp","unreal","ut2004","ventrilo","view-source","webcal","wtai","wyciwyg","xfire","xri","ymsgr"],Af=/^<([a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*)>/,Sf=/^<([a-zA-Z.\-]{1,25}):([^<>\x00-\x20]*)>/;function Cf(e,r){var i,s,a,n,u,c=e.pos;return e.src.charCodeAt(c)!==60||(i=e.src.slice(c),i.indexOf(">")<0)?!1:(s=i.match(Sf),s?Ef.indexOf(s[1].toLowerCase())<0||(n=s[0].slice(1,-1),u=Li(n),!e.parser.validateLink(n))?!1:(r||(e.push({type:"link_open",href:u,level:e.level}),e.push({type:"text",content:n,level:e.level+1}),e.push({type:"link_close",level:e.level})),e.pos+=s[0].length,!0):(a=i.match(Af),a?(n=a[0].slice(1,-1),u=Li("mailto:"+n),e.parser.validateLink(u)?(r||(e.push({type:"link_open",href:u,level:e.level}),e.push({type:"text",content:n,level:e.level+1}),e.push({type:"link_close",level:e.level})),e.pos+=a[0].length,!0):!1):!1))}function cs(e,r){return e=e.source,r=r||"",function i(s,a){return s?(a=a.source||a,e=e.replace(s,a),i):new RegExp(e,r)}}var Df=/[a-zA-Z_:][a-zA-Z0-9:._-]*/,Tf=/[^"'=<>`\x00-\x20]+/,Of=/'[^']*'/,Pf=/"[^"]*"/,$f=cs(/(?:unquoted|single_quoted|double_quoted)/)("unquoted",Tf)("single_quoted",Of)("double_quoted",Pf)(),Lf=cs(/(?:\s+attr_name(?:\s*=\s*attr_value)?)/)("attr_name",Df)("attr_value",$f)(),Mf=cs(/<[A-Za-z][A-Za-z0-9]*attribute*\s*\/?>/)("attribute",Lf)(),Rf=/<\/[A-Za-z][A-Za-z0-9]*\s*>/,If=/<!---->|<!--(?:-?[^>-])(?:-?[^-])*-->/,Ff=/<[?].*?[?]>/,qf=/<![A-Z]+\s+[^>]*>/,Bf=/<!\[CDATA\[[\s\S]*?\]\]>/,Vf=cs(/^(?:open_tag|close_tag|comment|processing|declaration|cdata)/)("open_tag",Mf)("close_tag",Rf)("comment",If)("processing",Ff)("declaration",qf)("cdata",Bf)();function Uf(e){var r=e|32;return r>=97&&r<=122}function zf(e,r){var i,s,a,n=e.pos;return!e.options.html||(a=e.posMax,e.src.charCodeAt(n)!==60||n+2>=a)||(i=e.src.charCodeAt(n+1),i!==33&&i!==63&&i!==47&&!Uf(i))||(s=e.src.slice(n).match(Vf),!s)?!1:(r||e.push({type:"htmltag",content:e.src.slice(n,n+s[0].length),level:e.level}),e.pos+=s[0].length,!0)}var Hf=/^&#((?:x[a-f0-9]{1,8}|[0-9]{1,8}));/i,Wf=/^&([a-z][a-z0-9]{1,31});/i;function Gf(e,r){var i,s,a,n=e.pos,u=e.posMax;if(e.src.charCodeAt(n)!==38)return!1;if(n+1<u){if(i=e.src.charCodeAt(n+1),i===35){if(a=e.src.slice(n).match(Hf),a)return r||(s=a[1][0].toLowerCase()==="x"?parseInt(a[1].slice(1),16):parseInt(a[1],10),e.pending+=zi(s)?es(s):es(65533)),e.pos+=a[0].length,!0}else if(a=e.src.slice(n).match(Wf),a){var c=Oc(a[1]);if(a[1]!==c)return r||(e.pending+=c),e.pos+=a[0].length,!0}}return r||(e.pending+="&"),e.pos++,!0}var Ms=[["text",df],["newline",ff],["escape",hf],["backticks",pf],["del",mf],["ins",gf],["mark",bf],["emphasis",xf],["sub",vf],["sup",_f],["links",kf],["footnote_inline",Nf],["footnote_ref",jf],["autolink",Cf],["htmltag",zf],["entity",Gf]];function ds(){this.ruler=new bt;for(var e=0;e<Ms.length;e++)this.ruler.push(Ms[e][0],Ms[e][1]);this.validateLink=Jf}ds.prototype.skipToken=function(e){var r=this.ruler.getRules(""),i=r.length,s=e.pos,a,n;if((n=e.cacheGet(s))>0){e.pos=n;return}for(a=0;a<i;a++)if(r[a](e,!0)){e.cacheSet(s,e.pos);return}e.pos++,e.cacheSet(s,e.pos)};ds.prototype.tokenize=function(e){for(var r=this.ruler.getRules(""),i=r.length,s=e.posMax,a,n;e.pos<s;){for(n=0;n<i&&(a=r[n](e,!1),!a);n++);if(a){if(e.pos>=s)break;continue}e.pending+=e.src[e.pos++]}e.pending&&e.pushPending()};ds.prototype.parse=function(e,r,i,s){var a=new Ur(e,this,r,i,s);this.tokenize(a)};function Jf(e){var r=["vbscript","javascript","file","data"],i=e.trim().toLowerCase();return i=br(i),!(i.indexOf(":")!==-1&&r.indexOf(i.split(":")[0])!==-1)}var Yf={options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkTarget:"",typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{rules:["block","inline","references","replacements","smartquotes","references","abbr2","footnote_tail"]},block:{rules:["blockquote","code","fences","footnote","heading","hr","htmlblock","lheading","list","paragraph","table"]},inline:{rules:["autolink","backticks","del","emphasis","entity","escape","footnote_ref","htmltag","links","newline","text"]}}},Zf={options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkTarget:"",typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{},block:{},inline:{}}},Xf={options:{html:!0,xhtmlOut:!0,breaks:!1,langPrefix:"language-",linkTarget:"",typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{rules:["block","inline","references","abbr2"]},block:{rules:["blockquote","code","fences","heading","hr","htmlblock","lheading","list","paragraph"]},inline:{rules:["autolink","backticks","emphasis","entity","escape","htmltag","links","newline","text"]}}},Kf={default:Yf,full:Zf,commonmark:Xf};function qc(e,r,i){this.src=r,this.env=i,this.options=e.options,this.tokens=[],this.inlineMode=!1,this.inline=e.inline,this.block=e.block,this.renderer=e.renderer,this.typographer=e.typographer}function yr(e,r){typeof e!="string"&&(r=e,e="default"),r&&r.linkify!=null&&console.warn(`linkify option is removed. Use linkify plugin instead:
|
|
117
117
|
|
|
118
118
|
import Remarkable from 'remarkable';
|
|
119
119
|
import linkify from 'remarkable/linkify';
|
|
120
120
|
new Remarkable().use(linkify)
|
|
121
|
-
`),this.inline=new
|
|
122
|
-
`).filter(u=>{const c=u.match(
|
|
123
|
-
`)),
|
|
124
|
-
Caused by: `+(f.stack||f));function l(p){return a(p,{pretty:!0})}return o&&o.cleanStack&&(h=l(h)),h}r.appendToStack=u;function c(d,f){for(var o in f)if(f.hasOwnProperty(o)){var h=d.hasOwnProperty(o)&&typeof d[o]=="object";d[o]=h?i(d[o],f[o]):f[o]}}})(e.ChainedErrorFactory||(e.ChainedErrorFactory={}))})(Ms)),Ms}var fu;function ds(){if(fu)return pr;fu=1;var e=pr&&pr.__extends||(function(){var c=function(d,f){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(o,h){o.__proto__=h}||function(o,h){for(var l in h)h.hasOwnProperty(l)&&(o[l]=h[l])},c(d,f)};return function(d,f){c(d,f);function o(){this.constructor=d}d.prototype=f===null?Object.create(f):(o.prototype=f.prototype,new o)}})();Object.defineProperty(pr,"__esModule",{value:!0});var a=oh,i=du(),s=Li(),r=(function(c){e(d,c);function d(f,o,h){h===void 0&&(h=s.Options.DEFAULT);var l=c.call(this,f)||this;return l.cause=o,l.stack=i.ChainedErrorFactory.appendToStack(l.stack,o,h),l}return d})(a.CustomError);pr.default=r;var n=du();pr.ChainedErrorFactory=n.ChainedErrorFactory;var u=Li();return pr.Options=u.Options,pr}var hu;function dh(){if(hu)return Qt;hu=1;var e=Qt&&Qt.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Qt,"__esModule",{value:!0}),Qt.SecurityError=Qt.SecurityChecker=void 0;const a=e(ds());let i=class{static checkSecurity(n,u){if(!u.allowScriptTag&&this.containsScriptTag(n))throw new s("Renderer rejected the input because of insecure content: text contains script tag")}static containsScriptTag(n){return/<\s*script/gi.test(n)}};Qt.SecurityChecker=i;class s extends a.default{constructor(n,u){super(n,u)}}return Qt.SecurityError=s,Qt}var st={},Fa={},er={},Tr={},pu;function fs(){if(pu)return Tr;pu=1;function e(n,u,c){if(c===void 0&&(c=Array.prototype),n&&typeof c.find=="function")return c.find.call(n,u);for(var d=0;d<n.length;d++)if(Object.prototype.hasOwnProperty.call(n,d)){var f=n[d];if(u.call(void 0,f,d,n))return f}}function a(n,u){return u===void 0&&(u=Object),u&&typeof u.freeze=="function"?u.freeze(n):n}function i(n,u){if(n===null||typeof n!="object")throw new TypeError("target is not an object");for(var c in u)Object.prototype.hasOwnProperty.call(u,c)&&(n[c]=u[c]);return n}var s=a({HTML:"text/html",isHTML:function(n){return n===s.HTML},XML_APPLICATION:"application/xml",XML_TEXT:"text/xml",XML_XHTML_APPLICATION:"application/xhtml+xml",XML_SVG_IMAGE:"image/svg+xml"}),r=a({HTML:"http://www.w3.org/1999/xhtml",isHTML:function(n){return n===r.HTML},SVG:"http://www.w3.org/2000/svg",XML:"http://www.w3.org/XML/1998/namespace",XMLNS:"http://www.w3.org/2000/xmlns/"});return Tr.assign=i,Tr.find=e,Tr.freeze=a,Tr.MIME_TYPE=s,Tr.NAMESPACE=r,Tr}var mu;function qc(){if(mu)return er;mu=1;var e=fs(),a=e.find,i=e.NAMESPACE;function s(E){return E!==""}function r(E){return E?E.split(/[\t\n\f\r ]+/).filter(s):[]}function n(E,S){return E.hasOwnProperty(S)||(E[S]=!0),E}function u(E){if(!E)return[];var S=r(E);return Object.keys(S.reduce(n,{}))}function c(E){return function(S){return E&&E.indexOf(S)!==-1}}function d(E,S){for(var M in E)Object.prototype.hasOwnProperty.call(E,M)&&(S[M]=E[M])}function f(E,S){var M=E.prototype;if(!(M instanceof S)){let W=function(){};W.prototype=S.prototype,W=new W,d(M,W),E.prototype=M=W}M.constructor!=E&&(typeof E!="function"&&console.error("unknown Class:"+E),M.constructor=E)}var o={},h=o.ELEMENT_NODE=1,l=o.ATTRIBUTE_NODE=2,p=o.TEXT_NODE=3,x=o.CDATA_SECTION_NODE=4,w=o.ENTITY_REFERENCE_NODE=5,b=o.ENTITY_NODE=6,g=o.PROCESSING_INSTRUCTION_NODE=7,v=o.COMMENT_NODE=8,_=o.DOCUMENT_NODE=9,N=o.DOCUMENT_TYPE_NODE=10,y=o.DOCUMENT_FRAGMENT_NODE=11,m=o.NOTATION_NODE=12,k={},j={};k.INDEX_SIZE_ERR=(j[1]="Index size error",1),k.DOMSTRING_SIZE_ERR=(j[2]="DOMString size error",2);var A=k.HIERARCHY_REQUEST_ERR=(j[3]="Hierarchy request error",3);k.WRONG_DOCUMENT_ERR=(j[4]="Wrong document",4),k.INVALID_CHARACTER_ERR=(j[5]="Invalid character",5),k.NO_DATA_ALLOWED_ERR=(j[6]="No data allowed",6),k.NO_MODIFICATION_ALLOWED_ERR=(j[7]="No modification allowed",7);var D=k.NOT_FOUND_ERR=(j[8]="Not found",8);k.NOT_SUPPORTED_ERR=(j[9]="Not supported",9);var C=k.INUSE_ATTRIBUTE_ERR=(j[10]="Attribute in use",10);k.INVALID_STATE_ERR=(j[11]="Invalid state",11),k.SYNTAX_ERR=(j[12]="Syntax error",12),k.INVALID_MODIFICATION_ERR=(j[13]="Invalid modification",13),k.NAMESPACE_ERR=(j[14]="Invalid namespace",14),k.INVALID_ACCESS_ERR=(j[15]="Invalid access",15);function O(E,S){if(S instanceof Error)var M=S;else M=this,Error.call(this,j[E]),this.message=j[E],Error.captureStackTrace&&Error.captureStackTrace(this,O);return M.code=E,S&&(this.message=this.message+": "+S),M}O.prototype=Error.prototype,d(k,O);function L(){}L.prototype={length:0,item:function(E){return E>=0&&E<this.length?this[E]:null},toString:function(E,S){for(var M=[],W=0;W<this.length;W++)Tt(this[W],M,E,S);return M.join("")},filter:function(E){return Array.prototype.filter.call(this,E)},indexOf:function(E){return Array.prototype.indexOf.call(this,E)}};function H(E,S){this._node=E,this._refresh=S,F(this)}function F(E){var S=E._node._inc||E._node.ownerDocument._inc;if(E._inc!==S){var M=E._refresh(E._node);if(wr(E,"length",M.length),!E.$$length||M.length<E.$$length)for(var W=M.length;W in E;W++)Object.prototype.hasOwnProperty.call(E,W)&&delete E[W];d(M,E),E._inc=S}}H.prototype.item=function(E){return F(this),this[E]||null},f(H,L);function B(){}function $(E,S){for(var M=E.length;M--;)if(E[M]===S)return M}function G(E,S,M,W){if(W?S[$(S,W)]=M:S[S.length++]=M,E){M.ownerElement=E;var ne=E.ownerDocument;ne&&(W&&oe(ne,E,W),J(ne,E,M))}}function X(E,S,M){var W=$(S,M);if(W>=0){for(var ne=S.length-1;W<ne;)S[W]=S[++W];if(S.length=ne,E){var he=E.ownerDocument;he&&(oe(he,E,M),M.ownerElement=null)}}else throw new O(D,new Error(E.tagName+"@"+M))}B.prototype={length:0,item:L.prototype.item,getNamedItem:function(E){for(var S=this.length;S--;){var M=this[S];if(M.nodeName==E)return M}},setNamedItem:function(E){var S=E.ownerElement;if(S&&S!=this._ownerElement)throw new O(C);var M=this.getNamedItem(E.nodeName);return G(this._ownerElement,this,E,M),M},setNamedItemNS:function(E){var S=E.ownerElement,M;if(S&&S!=this._ownerElement)throw new O(C);return M=this.getNamedItemNS(E.namespaceURI,E.localName),G(this._ownerElement,this,E,M),M},removeNamedItem:function(E){var S=this.getNamedItem(E);return X(this._ownerElement,this,S),S},removeNamedItemNS:function(E,S){var M=this.getNamedItemNS(E,S);return X(this._ownerElement,this,M),M},getNamedItemNS:function(E,S){for(var M=this.length;M--;){var W=this[M];if(W.localName==S&&W.namespaceURI==E)return W}return null}};function ee(){}ee.prototype={hasFeature:function(E,S){return!0},createDocument:function(E,S,M){var W=new V;if(W.implementation=this,W.childNodes=new L,W.doctype=M||null,M&&W.appendChild(M),S){var ne=W.createElementNS(E,S);W.appendChild(ne)}return W},createDocumentType:function(E,S,M){var W=new Ze;return W.name=E,W.nodeName=E,W.publicId=S||"",W.systemId=M||"",W}};function R(){}R.prototype={firstChild:null,lastChild:null,previousSibling:null,nextSibling:null,attributes:null,parentNode:null,childNodes:null,ownerDocument:null,nodeValue:null,namespaceURI:null,prefix:null,localName:null,insertBefore:function(E,S){return Ye(this,E,S)},replaceChild:function(E,S){Ye(this,E,S,me),S&&this.removeChild(S)},removeChild:function(E){return te(this,E)},appendChild:function(E){return this.insertBefore(E,null)},hasChildNodes:function(){return this.firstChild!=null},cloneNode:function(E){return ft(this.ownerDocument||this,this,E)},normalize:function(){for(var E=this.firstChild;E;){var S=E.nextSibling;S&&S.nodeType==p&&E.nodeType==p?(this.removeChild(S),E.appendData(S.data)):(E.normalize(),E=S)}},isSupported:function(E,S){return this.ownerDocument.implementation.hasFeature(E,S)},hasAttributes:function(){return this.attributes.length>0},lookupPrefix:function(E){for(var S=this;S;){var M=S._nsMap;if(M){for(var W in M)if(Object.prototype.hasOwnProperty.call(M,W)&&M[W]===E)return W}S=S.nodeType==l?S.ownerDocument:S.parentNode}return null},lookupNamespaceURI:function(E){for(var S=this;S;){var M=S._nsMap;if(M&&Object.prototype.hasOwnProperty.call(M,E))return M[E];S=S.nodeType==l?S.ownerDocument:S.parentNode}return null},isDefaultNamespace:function(E){var S=this.lookupPrefix(E);return S==null}};function se(E){return E=="<"&&"<"||E==">"&&">"||E=="&"&&"&"||E=='"'&&"""||"&#"+E.charCodeAt()+";"}d(o,R),d(o,R.prototype);function I(E,S){if(S(E))return!0;if(E=E.firstChild)do if(I(E,S))return!0;while(E=E.nextSibling)}function V(){this.ownerDocument=this}function J(E,S,M){E&&E._inc++;var W=M.namespaceURI;W===i.XMLNS&&(S._nsMap[M.prefix?M.localName:""]=M.value)}function oe(E,S,M,W){E&&E._inc++;var ne=M.namespaceURI;ne===i.XMLNS&&delete S._nsMap[M.prefix?M.localName:""]}function K(E,S,M){if(E&&E._inc){E._inc++;var W=S.childNodes;if(M)W[W.length++]=M;else{for(var ne=S.firstChild,he=0;ne;)W[he++]=ne,ne=ne.nextSibling;W.length=he,delete W[W.length]}}}function te(E,S){var M=S.previousSibling,W=S.nextSibling;return M?M.nextSibling=W:E.firstChild=W,W?W.previousSibling=M:E.lastChild=M,S.parentNode=null,S.previousSibling=null,S.nextSibling=null,K(E.ownerDocument,E),S}function pe(E){return E&&(E.nodeType===R.DOCUMENT_NODE||E.nodeType===R.DOCUMENT_FRAGMENT_NODE||E.nodeType===R.ELEMENT_NODE)}function Ee(E){return E&&(ae(E)||re(E)||Z(E)||E.nodeType===R.DOCUMENT_FRAGMENT_NODE||E.nodeType===R.COMMENT_NODE||E.nodeType===R.PROCESSING_INSTRUCTION_NODE)}function Z(E){return E&&E.nodeType===R.DOCUMENT_TYPE_NODE}function ae(E){return E&&E.nodeType===R.ELEMENT_NODE}function re(E){return E&&E.nodeType===R.TEXT_NODE}function ce(E,S){var M=E.childNodes||[];if(a(M,ae)||Z(S))return!1;var W=a(M,Z);return!(S&&W&&M.indexOf(W)>M.indexOf(S))}function xe(E,S){var M=E.childNodes||[];function W(he){return ae(he)&&he!==S}if(a(M,W))return!1;var ne=a(M,Z);return!(S&&ne&&M.indexOf(ne)>M.indexOf(S))}function ge(E,S,M){if(!pe(E))throw new O(A,"Unexpected parent node type "+E.nodeType);if(M&&M.parentNode!==E)throw new O(D,"child not in parent");if(!Ee(S)||Z(S)&&E.nodeType!==R.DOCUMENT_NODE)throw new O(A,"Unexpected node type "+S.nodeType+" for parent node type "+E.nodeType)}function ke(E,S,M){var W=E.childNodes||[],ne=S.childNodes||[];if(S.nodeType===R.DOCUMENT_FRAGMENT_NODE){var he=ne.filter(ae);if(he.length>1||a(ne,re))throw new O(A,"More than one element or text in fragment");if(he.length===1&&!ce(E,M))throw new O(A,"Element in fragment can not be inserted before doctype")}if(ae(S)&&!ce(E,M))throw new O(A,"Only one element can be added and only after doctype");if(Z(S)){if(a(W,Z))throw new O(A,"Only one doctype is allowed");var Ne=a(W,ae);if(M&&W.indexOf(Ne)<W.indexOf(M))throw new O(A,"Doctype can only be inserted before an element");if(!M&&Ne)throw new O(A,"Doctype can not be appended since element is present")}}function me(E,S,M){var W=E.childNodes||[],ne=S.childNodes||[];if(S.nodeType===R.DOCUMENT_FRAGMENT_NODE){var he=ne.filter(ae);if(he.length>1||a(ne,re))throw new O(A,"More than one element or text in fragment");if(he.length===1&&!xe(E,M))throw new O(A,"Element in fragment can not be inserted before doctype")}if(ae(S)&&!xe(E,M))throw new O(A,"Only one element can be added and only after doctype");if(Z(S)){if(a(W,function(ht){return Z(ht)&&ht!==M}))throw new O(A,"Only one doctype is allowed");var Ne=a(W,ae);if(M&&W.indexOf(Ne)<W.indexOf(M))throw new O(A,"Doctype can only be inserted before an element")}}function Ye(E,S,M,W){ge(E,S,M),E.nodeType===R.DOCUMENT_NODE&&(W||ke)(E,S,M);var ne=S.parentNode;if(ne&&ne.removeChild(S),S.nodeType===y){var he=S.firstChild;if(he==null)return S;var Ne=S.lastChild}else he=Ne=S;var Ce=M?M.previousSibling:E.lastChild;he.previousSibling=Ce,Ne.nextSibling=M,Ce?Ce.nextSibling=he:E.firstChild=he,M==null?E.lastChild=Ne:M.previousSibling=Ne;do he.parentNode=E;while(he!==Ne&&(he=he.nextSibling));return K(E.ownerDocument||E,E),S.nodeType==y&&(S.firstChild=S.lastChild=null),S}function we(E,S){return S.parentNode&&S.parentNode.removeChild(S),S.parentNode=E,S.previousSibling=E.lastChild,S.nextSibling=null,S.previousSibling?S.previousSibling.nextSibling=S:E.firstChild=S,E.lastChild=S,K(E.ownerDocument,E,S),S}V.prototype={nodeName:"#document",nodeType:_,doctype:null,documentElement:null,_inc:1,insertBefore:function(E,S){if(E.nodeType==y){for(var M=E.firstChild;M;){var W=M.nextSibling;this.insertBefore(M,S),M=W}return E}return Ye(this,E,S),E.ownerDocument=this,this.documentElement===null&&E.nodeType===h&&(this.documentElement=E),E},removeChild:function(E){return this.documentElement==E&&(this.documentElement=null),te(this,E)},replaceChild:function(E,S){Ye(this,E,S,me),E.ownerDocument=this,S&&this.removeChild(S),ae(E)&&(this.documentElement=E)},importNode:function(E,S){return Gr(this,E,S)},getElementById:function(E){var S=null;return I(this.documentElement,function(M){if(M.nodeType==h&&M.getAttribute("id")==E)return S=M,!0}),S},getElementsByClassName:function(E){var S=u(E);return new H(this,function(M){var W=[];return S.length>0&&I(M.documentElement,function(ne){if(ne!==M&&ne.nodeType===h){var he=ne.getAttribute("class");if(he){var Ne=E===he;if(!Ne){var Ce=u(he);Ne=S.every(c(Ce))}Ne&&W.push(ne)}}}),W})},createElement:function(E){var S=new fe;S.ownerDocument=this,S.nodeName=E,S.tagName=E,S.localName=E,S.childNodes=new L;var M=S.attributes=new B;return M._ownerElement=S,S},createDocumentFragment:function(){var E=new Ct;return E.ownerDocument=this,E.childNodes=new L,E},createTextNode:function(E){var S=new Ve;return S.ownerDocument=this,S.appendData(E),S},createComment:function(E){var S=new St;return S.ownerDocument=this,S.appendData(E),S},createCDATASection:function(E){var S=new Jt;return S.ownerDocument=this,S.appendData(E),S},createProcessingInstruction:function(E,S){var M=new xt;return M.ownerDocument=this,M.tagName=M.nodeName=M.target=E,M.nodeValue=M.data=S,M},createAttribute:function(E){var S=new Ae;return S.ownerDocument=this,S.name=E,S.nodeName=E,S.localName=E,S.specified=!0,S},createEntityReference:function(E){var S=new Qe;return S.ownerDocument=this,S.nodeName=E,S},createElementNS:function(E,S){var M=new fe,W=S.split(":"),ne=M.attributes=new B;return M.childNodes=new L,M.ownerDocument=this,M.nodeName=S,M.tagName=S,M.namespaceURI=E,W.length==2?(M.prefix=W[0],M.localName=W[1]):M.localName=S,ne._ownerElement=M,M},createAttributeNS:function(E,S){var M=new Ae,W=S.split(":");return M.ownerDocument=this,M.nodeName=S,M.name=S,M.namespaceURI=E,M.specified=!0,W.length==2?(M.prefix=W[0],M.localName=W[1]):M.localName=S,M}},f(V,R);function fe(){this._nsMap={}}fe.prototype={nodeType:h,hasAttribute:function(E){return this.getAttributeNode(E)!=null},getAttribute:function(E){var S=this.getAttributeNode(E);return S&&S.value||""},getAttributeNode:function(E){return this.attributes.getNamedItem(E)},setAttribute:function(E,S){var M=this.ownerDocument.createAttribute(E);M.value=M.nodeValue=""+S,this.setAttributeNode(M)},removeAttribute:function(E){var S=this.getAttributeNode(E);S&&this.removeAttributeNode(S)},appendChild:function(E){return E.nodeType===y?this.insertBefore(E,null):we(this,E)},setAttributeNode:function(E){return this.attributes.setNamedItem(E)},setAttributeNodeNS:function(E){return this.attributes.setNamedItemNS(E)},removeAttributeNode:function(E){return this.attributes.removeNamedItem(E.nodeName)},removeAttributeNS:function(E,S){var M=this.getAttributeNodeNS(E,S);M&&this.removeAttributeNode(M)},hasAttributeNS:function(E,S){return this.getAttributeNodeNS(E,S)!=null},getAttributeNS:function(E,S){var M=this.getAttributeNodeNS(E,S);return M&&M.value||""},setAttributeNS:function(E,S,M){var W=this.ownerDocument.createAttributeNS(E,S);W.value=W.nodeValue=""+M,this.setAttributeNode(W)},getAttributeNodeNS:function(E,S){return this.attributes.getNamedItemNS(E,S)},getElementsByTagName:function(E){return new H(this,function(S){var M=[];return I(S,function(W){W!==S&&W.nodeType==h&&(E==="*"||W.tagName==E)&&M.push(W)}),M})},getElementsByTagNameNS:function(E,S){return new H(this,function(M){var W=[];return I(M,function(ne){ne!==M&&ne.nodeType===h&&(E==="*"||ne.namespaceURI===E)&&(S==="*"||ne.localName==S)&&W.push(ne)}),W})}},V.prototype.getElementsByTagName=fe.prototype.getElementsByTagName,V.prototype.getElementsByTagNameNS=fe.prototype.getElementsByTagNameNS,f(fe,R);function Ae(){}Ae.prototype.nodeType=l,f(Ae,R);function Oe(){}Oe.prototype={data:"",substringData:function(E,S){return this.data.substring(E,E+S)},appendData:function(E){E=this.data+E,this.nodeValue=this.data=E,this.length=E.length},insertData:function(E,S){this.replaceData(E,0,S)},appendChild:function(E){throw new Error(j[A])},deleteData:function(E,S){this.replaceData(E,S,"")},replaceData:function(E,S,M){var W=this.data.substring(0,E),ne=this.data.substring(E+S);M=W+M+ne,this.nodeValue=this.data=M,this.length=M.length}},f(Oe,R);function Ve(){}Ve.prototype={nodeName:"#text",nodeType:p,splitText:function(E){var S=this.data,M=S.substring(E);S=S.substring(0,E),this.data=this.nodeValue=S,this.length=S.length;var W=this.ownerDocument.createTextNode(M);return this.parentNode&&this.parentNode.insertBefore(W,this.nextSibling),W}},f(Ve,Oe);function St(){}St.prototype={nodeName:"#comment",nodeType:v},f(St,Oe);function Jt(){}Jt.prototype={nodeName:"#cdata-section",nodeType:x},f(Jt,Oe);function Ze(){}Ze.prototype.nodeType=N,f(Ze,R);function Yt(){}Yt.prototype.nodeType=m,f(Yt,R);function vr(){}vr.prototype.nodeType=b,f(vr,R);function Qe(){}Qe.prototype.nodeType=w,f(Qe,R);function Ct(){}Ct.prototype.nodeName="#document-fragment",Ct.prototype.nodeType=y,f(Ct,R);function xt(){}xt.prototype.nodeType=g,f(xt,R);function or(){}or.prototype.serializeToString=function(E,S,M){return Zt.call(E,S,M)},R.prototype.toString=Zt;function Zt(E,S){var M=[],W=this.nodeType==9&&this.documentElement||this,ne=W.prefix,he=W.namespaceURI;if(he&&ne==null){var ne=W.lookupPrefix(he);if(ne==null)var Ne=[{namespace:he,prefix:null}]}return Tt(this,M,E,S,Ne),M.join("")}function Dt(E,S,M){var W=E.prefix||"",ne=E.namespaceURI;if(!ne||W==="xml"&&ne===i.XML||ne===i.XMLNS)return!1;for(var he=M.length;he--;){var Ne=M[he];if(Ne.prefix===W)return Ne.namespace!==ne}return!0}function yt(E,S,M){E.push(" ",S,'="',M.replace(/[<>&"\t\n\r]/g,se),'"')}function Tt(E,S,M,W,ne){if(ne||(ne=[]),W)if(E=W(E),E){if(typeof E=="string"){S.push(E);return}}else return;switch(E.nodeType){case h:var he=E.attributes,Ne=he.length,Le=E.firstChild,Ce=E.tagName;M=i.isHTML(E.namespaceURI)||M;var ht=Ce;if(!M&&!E.prefix&&E.namespaceURI){for(var at,Xe=0;Xe<he.length;Xe++)if(he.item(Xe).name==="xmlns"){at=he.item(Xe).value;break}if(!at)for(var vt=ne.length-1;vt>=0;vt--){var wt=ne[vt];if(wt.prefix===""&&wt.namespace===E.namespaceURI){at=wt.namespace;break}}if(at!==E.namespaceURI)for(var vt=ne.length-1;vt>=0;vt--){var wt=ne[vt];if(wt.namespace===E.namespaceURI){wt.prefix&&(ht=wt.prefix+":"+Ce);break}}}S.push("<",ht);for(var _t=0;_t<Ne;_t++){var et=he.item(_t);et.prefix=="xmlns"?ne.push({prefix:et.localName,namespace:et.value}):et.nodeName=="xmlns"&&ne.push({prefix:"",namespace:et.value})}for(var _t=0;_t<Ne;_t++){var et=he.item(_t);if(Dt(et,M,ne)){var ze=et.prefix||"",Bt=et.namespaceURI;yt(S,ze?"xmlns:"+ze:"xmlns",Bt),ne.push({prefix:ze,namespace:Bt})}Tt(et,S,M,W,ne)}if(Ce===ht&&Dt(E,M,ne)){var ze=E.prefix||"",Bt=E.namespaceURI;yt(S,ze?"xmlns:"+ze:"xmlns",Bt),ne.push({prefix:ze,namespace:Bt})}if(Le||M&&!/^(?:meta|link|img|br|hr|input)$/i.test(Ce)){if(S.push(">"),M&&/^script$/i.test(Ce))for(;Le;)Le.data?S.push(Le.data):Tt(Le,S,M,W,ne.slice()),Le=Le.nextSibling;else for(;Le;)Tt(Le,S,M,W,ne.slice()),Le=Le.nextSibling;S.push("</",ht,">")}else S.push("/>");return;case _:case y:for(var Le=E.firstChild;Le;)Tt(Le,S,M,W,ne.slice()),Le=Le.nextSibling;return;case l:return yt(S,E.name,E.value);case p:return S.push(E.data.replace(/[<&>]/g,se));case x:return S.push("<![CDATA[",E.data,"]]>");case v:return S.push("<!--",E.data,"-->");case N:var Ot=E.publicId,Vt=E.systemId;if(S.push("<!DOCTYPE ",E.name),Ot)S.push(" PUBLIC ",Ot),Vt&&Vt!="."&&S.push(" ",Vt),S.push(">");else if(Vt&&Vt!=".")S.push(" SYSTEM ",Vt,">");else{var pt=E.internalSubset;pt&&S.push(" [",pt,"]"),S.push(">")}return;case g:return S.push("<?",E.target," ",E.data,"?>");case w:return S.push("&",E.nodeName,";");default:S.push("??",E.nodeName)}}function Gr(E,S,M){var W;switch(S.nodeType){case h:W=S.cloneNode(!1),W.ownerDocument=E;case y:break;case l:M=!0;break}if(W||(W=S.cloneNode(!1)),W.ownerDocument=E,W.parentNode=null,M)for(var ne=S.firstChild;ne;)W.appendChild(Gr(E,ne,M)),ne=ne.nextSibling;return W}function ft(E,S,M){var W=new S.constructor;for(var ne in S)if(Object.prototype.hasOwnProperty.call(S,ne)){var he=S[ne];typeof he!="object"&&he!=W[ne]&&(W[ne]=he)}switch(S.childNodes&&(W.childNodes=new L),W.ownerDocument=E,W.nodeType){case h:var Ne=S.attributes,Ce=W.attributes=new B,ht=Ne.length;Ce._ownerElement=W;for(var at=0;at<ht;at++)W.setAttributeNode(ft(E,Ne.item(at),!0));break;case l:M=!0}if(M)for(var Xe=S.firstChild;Xe;)W.appendChild(ft(E,Xe,M)),Xe=Xe.nextSibling;return W}function wr(E,S,M){E[S]=M}try{if(Object.defineProperty){let E=function(S){switch(S.nodeType){case h:case y:var M=[];for(S=S.firstChild;S;)S.nodeType!==7&&S.nodeType!==8&&M.push(E(S)),S=S.nextSibling;return M.join("");default:return S.nodeValue}};Object.defineProperty(H.prototype,"length",{get:function(){return F(this),this.$$length}}),Object.defineProperty(R.prototype,"textContent",{get:function(){return E(this)},set:function(S){switch(this.nodeType){case h:case y:for(;this.firstChild;)this.removeChild(this.firstChild);(S||String(S))&&this.appendChild(this.ownerDocument.createTextNode(S));break;default:this.data=S,this.value=S,this.nodeValue=S}}}),wr=function(S,M,W){S["$$"+M]=W}}}catch{}return er.DocumentType=Ze,er.DOMException=O,er.DOMImplementation=ee,er.Element=fe,er.Node=R,er.NodeList=L,er.XMLSerializer=or,er}var qa={},qs={},gu;function fh(){return gu||(gu=1,(function(e){var a=fs().freeze;e.XML_ENTITIES=a({amp:"&",apos:"'",gt:">",lt:"<",quot:'"'}),e.HTML_ENTITIES=a({Aacute:"Á",aacute:"á",Abreve:"Ă",abreve:"ă",ac:"∾",acd:"∿",acE:"∾̳",Acirc:"Â",acirc:"â",acute:"´",Acy:"А",acy:"а",AElig:"Æ",aelig:"æ",af:"",Afr:"𝔄",afr:"𝔞",Agrave:"À",agrave:"à",alefsym:"ℵ",aleph:"ℵ",Alpha:"Α",alpha:"α",Amacr:"Ā",amacr:"ā",amalg:"⨿",AMP:"&",amp:"&",And:"⩓",and:"∧",andand:"⩕",andd:"⩜",andslope:"⩘",andv:"⩚",ang:"∠",ange:"⦤",angle:"∠",angmsd:"∡",angmsdaa:"⦨",angmsdab:"⦩",angmsdac:"⦪",angmsdad:"⦫",angmsdae:"⦬",angmsdaf:"⦭",angmsdag:"⦮",angmsdah:"⦯",angrt:"∟",angrtvb:"⊾",angrtvbd:"⦝",angsph:"∢",angst:"Å",angzarr:"⍼",Aogon:"Ą",aogon:"ą",Aopf:"𝔸",aopf:"𝕒",ap:"≈",apacir:"⩯",apE:"⩰",ape:"≊",apid:"≋",apos:"'",ApplyFunction:"",approx:"≈",approxeq:"≊",Aring:"Å",aring:"å",Ascr:"𝒜",ascr:"𝒶",Assign:"≔",ast:"*",asymp:"≈",asympeq:"≍",Atilde:"Ã",atilde:"ã",Auml:"Ä",auml:"ä",awconint:"∳",awint:"⨑",backcong:"≌",backepsilon:"϶",backprime:"‵",backsim:"∽",backsimeq:"⋍",Backslash:"∖",Barv:"⫧",barvee:"⊽",Barwed:"⌆",barwed:"⌅",barwedge:"⌅",bbrk:"⎵",bbrktbrk:"⎶",bcong:"≌",Bcy:"Б",bcy:"б",bdquo:"„",becaus:"∵",Because:"∵",because:"∵",bemptyv:"⦰",bepsi:"϶",bernou:"ℬ",Bernoullis:"ℬ",Beta:"Β",beta:"β",beth:"ℶ",between:"≬",Bfr:"𝔅",bfr:"𝔟",bigcap:"⋂",bigcirc:"◯",bigcup:"⋃",bigodot:"⨀",bigoplus:"⨁",bigotimes:"⨂",bigsqcup:"⨆",bigstar:"★",bigtriangledown:"▽",bigtriangleup:"△",biguplus:"⨄",bigvee:"⋁",bigwedge:"⋀",bkarow:"⤍",blacklozenge:"⧫",blacksquare:"▪",blacktriangle:"▴",blacktriangledown:"▾",blacktriangleleft:"◂",blacktriangleright:"▸",blank:"␣",blk12:"▒",blk14:"░",blk34:"▓",block:"█",bne:"=⃥",bnequiv:"≡⃥",bNot:"⫭",bnot:"⌐",Bopf:"𝔹",bopf:"𝕓",bot:"⊥",bottom:"⊥",bowtie:"⋈",boxbox:"⧉",boxDL:"╗",boxDl:"╖",boxdL:"╕",boxdl:"┐",boxDR:"╔",boxDr:"╓",boxdR:"╒",boxdr:"┌",boxH:"═",boxh:"─",boxHD:"╦",boxHd:"╤",boxhD:"╥",boxhd:"┬",boxHU:"╩",boxHu:"╧",boxhU:"╨",boxhu:"┴",boxminus:"⊟",boxplus:"⊞",boxtimes:"⊠",boxUL:"╝",boxUl:"╜",boxuL:"╛",boxul:"┘",boxUR:"╚",boxUr:"╙",boxuR:"╘",boxur:"└",boxV:"║",boxv:"│",boxVH:"╬",boxVh:"╫",boxvH:"╪",boxvh:"┼",boxVL:"╣",boxVl:"╢",boxvL:"╡",boxvl:"┤",boxVR:"╠",boxVr:"╟",boxvR:"╞",boxvr:"├",bprime:"‵",Breve:"˘",breve:"˘",brvbar:"¦",Bscr:"ℬ",bscr:"𝒷",bsemi:"⁏",bsim:"∽",bsime:"⋍",bsol:"\\",bsolb:"⧅",bsolhsub:"⟈",bull:"•",bullet:"•",bump:"≎",bumpE:"⪮",bumpe:"≏",Bumpeq:"≎",bumpeq:"≏",Cacute:"Ć",cacute:"ć",Cap:"⋒",cap:"∩",capand:"⩄",capbrcup:"⩉",capcap:"⩋",capcup:"⩇",capdot:"⩀",CapitalDifferentialD:"ⅅ",caps:"∩︀",caret:"⁁",caron:"ˇ",Cayleys:"ℭ",ccaps:"⩍",Ccaron:"Č",ccaron:"č",Ccedil:"Ç",ccedil:"ç",Ccirc:"Ĉ",ccirc:"ĉ",Cconint:"∰",ccups:"⩌",ccupssm:"⩐",Cdot:"Ċ",cdot:"ċ",cedil:"¸",Cedilla:"¸",cemptyv:"⦲",cent:"¢",CenterDot:"·",centerdot:"·",Cfr:"ℭ",cfr:"𝔠",CHcy:"Ч",chcy:"ч",check:"✓",checkmark:"✓",Chi:"Χ",chi:"χ",cir:"○",circ:"ˆ",circeq:"≗",circlearrowleft:"↺",circlearrowright:"↻",circledast:"⊛",circledcirc:"⊚",circleddash:"⊝",CircleDot:"⊙",circledR:"®",circledS:"Ⓢ",CircleMinus:"⊖",CirclePlus:"⊕",CircleTimes:"⊗",cirE:"⧃",cire:"≗",cirfnint:"⨐",cirmid:"⫯",cirscir:"⧂",ClockwiseContourIntegral:"∲",CloseCurlyDoubleQuote:"”",CloseCurlyQuote:"’",clubs:"♣",clubsuit:"♣",Colon:"∷",colon:":",Colone:"⩴",colone:"≔",coloneq:"≔",comma:",",commat:"@",comp:"∁",compfn:"∘",complement:"∁",complexes:"ℂ",cong:"≅",congdot:"⩭",Congruent:"≡",Conint:"∯",conint:"∮",ContourIntegral:"∮",Copf:"ℂ",copf:"𝕔",coprod:"∐",Coproduct:"∐",COPY:"©",copy:"©",copysr:"℗",CounterClockwiseContourIntegral:"∳",crarr:"↵",Cross:"⨯",cross:"✗",Cscr:"𝒞",cscr:"𝒸",csub:"⫏",csube:"⫑",csup:"⫐",csupe:"⫒",ctdot:"⋯",cudarrl:"⤸",cudarrr:"⤵",cuepr:"⋞",cuesc:"⋟",cularr:"↶",cularrp:"⤽",Cup:"⋓",cup:"∪",cupbrcap:"⩈",CupCap:"≍",cupcap:"⩆",cupcup:"⩊",cupdot:"⊍",cupor:"⩅",cups:"∪︀",curarr:"↷",curarrm:"⤼",curlyeqprec:"⋞",curlyeqsucc:"⋟",curlyvee:"⋎",curlywedge:"⋏",curren:"¤",curvearrowleft:"↶",curvearrowright:"↷",cuvee:"⋎",cuwed:"⋏",cwconint:"∲",cwint:"∱",cylcty:"⌭",Dagger:"‡",dagger:"†",daleth:"ℸ",Darr:"↡",dArr:"⇓",darr:"↓",dash:"‐",Dashv:"⫤",dashv:"⊣",dbkarow:"⤏",dblac:"˝",Dcaron:"Ď",dcaron:"ď",Dcy:"Д",dcy:"д",DD:"ⅅ",dd:"ⅆ",ddagger:"‡",ddarr:"⇊",DDotrahd:"⤑",ddotseq:"⩷",deg:"°",Del:"∇",Delta:"Δ",delta:"δ",demptyv:"⦱",dfisht:"⥿",Dfr:"𝔇",dfr:"𝔡",dHar:"⥥",dharl:"⇃",dharr:"⇂",DiacriticalAcute:"´",DiacriticalDot:"˙",DiacriticalDoubleAcute:"˝",DiacriticalGrave:"`",DiacriticalTilde:"˜",diam:"⋄",Diamond:"⋄",diamond:"⋄",diamondsuit:"♦",diams:"♦",die:"¨",DifferentialD:"ⅆ",digamma:"ϝ",disin:"⋲",div:"÷",divide:"÷",divideontimes:"⋇",divonx:"⋇",DJcy:"Ђ",djcy:"ђ",dlcorn:"⌞",dlcrop:"⌍",dollar:"$",Dopf:"𝔻",dopf:"𝕕",Dot:"¨",dot:"˙",DotDot:"⃜",doteq:"≐",doteqdot:"≑",DotEqual:"≐",dotminus:"∸",dotplus:"∔",dotsquare:"⊡",doublebarwedge:"⌆",DoubleContourIntegral:"∯",DoubleDot:"¨",DoubleDownArrow:"⇓",DoubleLeftArrow:"⇐",DoubleLeftRightArrow:"⇔",DoubleLeftTee:"⫤",DoubleLongLeftArrow:"⟸",DoubleLongLeftRightArrow:"⟺",DoubleLongRightArrow:"⟹",DoubleRightArrow:"⇒",DoubleRightTee:"⊨",DoubleUpArrow:"⇑",DoubleUpDownArrow:"⇕",DoubleVerticalBar:"∥",DownArrow:"↓",Downarrow:"⇓",downarrow:"↓",DownArrowBar:"⤓",DownArrowUpArrow:"⇵",DownBreve:"̑",downdownarrows:"⇊",downharpoonleft:"⇃",downharpoonright:"⇂",DownLeftRightVector:"⥐",DownLeftTeeVector:"⥞",DownLeftVector:"↽",DownLeftVectorBar:"⥖",DownRightTeeVector:"⥟",DownRightVector:"⇁",DownRightVectorBar:"⥗",DownTee:"⊤",DownTeeArrow:"↧",drbkarow:"⤐",drcorn:"⌟",drcrop:"⌌",Dscr:"𝒟",dscr:"𝒹",DScy:"Ѕ",dscy:"ѕ",dsol:"⧶",Dstrok:"Đ",dstrok:"đ",dtdot:"⋱",dtri:"▿",dtrif:"▾",duarr:"⇵",duhar:"⥯",dwangle:"⦦",DZcy:"Џ",dzcy:"џ",dzigrarr:"⟿",Eacute:"É",eacute:"é",easter:"⩮",Ecaron:"Ě",ecaron:"ě",ecir:"≖",Ecirc:"Ê",ecirc:"ê",ecolon:"≕",Ecy:"Э",ecy:"э",eDDot:"⩷",Edot:"Ė",eDot:"≑",edot:"ė",ee:"ⅇ",efDot:"≒",Efr:"𝔈",efr:"𝔢",eg:"⪚",Egrave:"È",egrave:"è",egs:"⪖",egsdot:"⪘",el:"⪙",Element:"∈",elinters:"⏧",ell:"ℓ",els:"⪕",elsdot:"⪗",Emacr:"Ē",emacr:"ē",empty:"∅",emptyset:"∅",EmptySmallSquare:"◻",emptyv:"∅",EmptyVerySmallSquare:"▫",emsp:" ",emsp13:" ",emsp14:" ",ENG:"Ŋ",eng:"ŋ",ensp:" ",Eogon:"Ę",eogon:"ę",Eopf:"𝔼",eopf:"𝕖",epar:"⋕",eparsl:"⧣",eplus:"⩱",epsi:"ε",Epsilon:"Ε",epsilon:"ε",epsiv:"ϵ",eqcirc:"≖",eqcolon:"≕",eqsim:"≂",eqslantgtr:"⪖",eqslantless:"⪕",Equal:"⩵",equals:"=",EqualTilde:"≂",equest:"≟",Equilibrium:"⇌",equiv:"≡",equivDD:"⩸",eqvparsl:"⧥",erarr:"⥱",erDot:"≓",Escr:"ℰ",escr:"ℯ",esdot:"≐",Esim:"⩳",esim:"≂",Eta:"Η",eta:"η",ETH:"Ð",eth:"ð",Euml:"Ë",euml:"ë",euro:"€",excl:"!",exist:"∃",Exists:"∃",expectation:"ℰ",ExponentialE:"ⅇ",exponentiale:"ⅇ",fallingdotseq:"≒",Fcy:"Ф",fcy:"ф",female:"♀",ffilig:"ffi",fflig:"ff",ffllig:"ffl",Ffr:"𝔉",ffr:"𝔣",filig:"fi",FilledSmallSquare:"◼",FilledVerySmallSquare:"▪",fjlig:"fj",flat:"♭",fllig:"fl",fltns:"▱",fnof:"ƒ",Fopf:"𝔽",fopf:"𝕗",ForAll:"∀",forall:"∀",fork:"⋔",forkv:"⫙",Fouriertrf:"ℱ",fpartint:"⨍",frac12:"½",frac13:"⅓",frac14:"¼",frac15:"⅕",frac16:"⅙",frac18:"⅛",frac23:"⅔",frac25:"⅖",frac34:"¾",frac35:"⅗",frac38:"⅜",frac45:"⅘",frac56:"⅚",frac58:"⅝",frac78:"⅞",frasl:"⁄",frown:"⌢",Fscr:"ℱ",fscr:"𝒻",gacute:"ǵ",Gamma:"Γ",gamma:"γ",Gammad:"Ϝ",gammad:"ϝ",gap:"⪆",Gbreve:"Ğ",gbreve:"ğ",Gcedil:"Ģ",Gcirc:"Ĝ",gcirc:"ĝ",Gcy:"Г",gcy:"г",Gdot:"Ġ",gdot:"ġ",gE:"≧",ge:"≥",gEl:"⪌",gel:"⋛",geq:"≥",geqq:"≧",geqslant:"⩾",ges:"⩾",gescc:"⪩",gesdot:"⪀",gesdoto:"⪂",gesdotol:"⪄",gesl:"⋛︀",gesles:"⪔",Gfr:"𝔊",gfr:"𝔤",Gg:"⋙",gg:"≫",ggg:"⋙",gimel:"ℷ",GJcy:"Ѓ",gjcy:"ѓ",gl:"≷",gla:"⪥",glE:"⪒",glj:"⪤",gnap:"⪊",gnapprox:"⪊",gnE:"≩",gne:"⪈",gneq:"⪈",gneqq:"≩",gnsim:"⋧",Gopf:"𝔾",gopf:"𝕘",grave:"`",GreaterEqual:"≥",GreaterEqualLess:"⋛",GreaterFullEqual:"≧",GreaterGreater:"⪢",GreaterLess:"≷",GreaterSlantEqual:"⩾",GreaterTilde:"≳",Gscr:"𝒢",gscr:"ℊ",gsim:"≳",gsime:"⪎",gsiml:"⪐",Gt:"≫",GT:">",gt:">",gtcc:"⪧",gtcir:"⩺",gtdot:"⋗",gtlPar:"⦕",gtquest:"⩼",gtrapprox:"⪆",gtrarr:"⥸",gtrdot:"⋗",gtreqless:"⋛",gtreqqless:"⪌",gtrless:"≷",gtrsim:"≳",gvertneqq:"≩︀",gvnE:"≩︀",Hacek:"ˇ",hairsp:" ",half:"½",hamilt:"ℋ",HARDcy:"Ъ",hardcy:"ъ",hArr:"⇔",harr:"↔",harrcir:"⥈",harrw:"↭",Hat:"^",hbar:"ℏ",Hcirc:"Ĥ",hcirc:"ĥ",hearts:"♥",heartsuit:"♥",hellip:"…",hercon:"⊹",Hfr:"ℌ",hfr:"𝔥",HilbertSpace:"ℋ",hksearow:"⤥",hkswarow:"⤦",hoarr:"⇿",homtht:"∻",hookleftarrow:"↩",hookrightarrow:"↪",Hopf:"ℍ",hopf:"𝕙",horbar:"―",HorizontalLine:"─",Hscr:"ℋ",hscr:"𝒽",hslash:"ℏ",Hstrok:"Ħ",hstrok:"ħ",HumpDownHump:"≎",HumpEqual:"≏",hybull:"⁃",hyphen:"‐",Iacute:"Í",iacute:"í",ic:"",Icirc:"Î",icirc:"î",Icy:"И",icy:"и",Idot:"İ",IEcy:"Е",iecy:"е",iexcl:"¡",iff:"⇔",Ifr:"ℑ",ifr:"𝔦",Igrave:"Ì",igrave:"ì",ii:"ⅈ",iiiint:"⨌",iiint:"∭",iinfin:"⧜",iiota:"℩",IJlig:"IJ",ijlig:"ij",Im:"ℑ",Imacr:"Ī",imacr:"ī",image:"ℑ",ImaginaryI:"ⅈ",imagline:"ℐ",imagpart:"ℑ",imath:"ı",imof:"⊷",imped:"Ƶ",Implies:"⇒",in:"∈",incare:"℅",infin:"∞",infintie:"⧝",inodot:"ı",Int:"∬",int:"∫",intcal:"⊺",integers:"ℤ",Integral:"∫",intercal:"⊺",Intersection:"⋂",intlarhk:"⨗",intprod:"⨼",InvisibleComma:"",InvisibleTimes:"",IOcy:"Ё",iocy:"ё",Iogon:"Į",iogon:"į",Iopf:"𝕀",iopf:"𝕚",Iota:"Ι",iota:"ι",iprod:"⨼",iquest:"¿",Iscr:"ℐ",iscr:"𝒾",isin:"∈",isindot:"⋵",isinE:"⋹",isins:"⋴",isinsv:"⋳",isinv:"∈",it:"",Itilde:"Ĩ",itilde:"ĩ",Iukcy:"І",iukcy:"і",Iuml:"Ï",iuml:"ï",Jcirc:"Ĵ",jcirc:"ĵ",Jcy:"Й",jcy:"й",Jfr:"𝔍",jfr:"𝔧",jmath:"ȷ",Jopf:"𝕁",jopf:"𝕛",Jscr:"𝒥",jscr:"𝒿",Jsercy:"Ј",jsercy:"ј",Jukcy:"Є",jukcy:"є",Kappa:"Κ",kappa:"κ",kappav:"ϰ",Kcedil:"Ķ",kcedil:"ķ",Kcy:"К",kcy:"к",Kfr:"𝔎",kfr:"𝔨",kgreen:"ĸ",KHcy:"Х",khcy:"х",KJcy:"Ќ",kjcy:"ќ",Kopf:"𝕂",kopf:"𝕜",Kscr:"𝒦",kscr:"𝓀",lAarr:"⇚",Lacute:"Ĺ",lacute:"ĺ",laemptyv:"⦴",lagran:"ℒ",Lambda:"Λ",lambda:"λ",Lang:"⟪",lang:"⟨",langd:"⦑",langle:"⟨",lap:"⪅",Laplacetrf:"ℒ",laquo:"«",Larr:"↞",lArr:"⇐",larr:"←",larrb:"⇤",larrbfs:"⤟",larrfs:"⤝",larrhk:"↩",larrlp:"↫",larrpl:"⤹",larrsim:"⥳",larrtl:"↢",lat:"⪫",lAtail:"⤛",latail:"⤙",late:"⪭",lates:"⪭︀",lBarr:"⤎",lbarr:"⤌",lbbrk:"❲",lbrace:"{",lbrack:"[",lbrke:"⦋",lbrksld:"⦏",lbrkslu:"⦍",Lcaron:"Ľ",lcaron:"ľ",Lcedil:"Ļ",lcedil:"ļ",lceil:"⌈",lcub:"{",Lcy:"Л",lcy:"л",ldca:"⤶",ldquo:"“",ldquor:"„",ldrdhar:"⥧",ldrushar:"⥋",ldsh:"↲",lE:"≦",le:"≤",LeftAngleBracket:"⟨",LeftArrow:"←",Leftarrow:"⇐",leftarrow:"←",LeftArrowBar:"⇤",LeftArrowRightArrow:"⇆",leftarrowtail:"↢",LeftCeiling:"⌈",LeftDoubleBracket:"⟦",LeftDownTeeVector:"⥡",LeftDownVector:"⇃",LeftDownVectorBar:"⥙",LeftFloor:"⌊",leftharpoondown:"↽",leftharpoonup:"↼",leftleftarrows:"⇇",LeftRightArrow:"↔",Leftrightarrow:"⇔",leftrightarrow:"↔",leftrightarrows:"⇆",leftrightharpoons:"⇋",leftrightsquigarrow:"↭",LeftRightVector:"⥎",LeftTee:"⊣",LeftTeeArrow:"↤",LeftTeeVector:"⥚",leftthreetimes:"⋋",LeftTriangle:"⊲",LeftTriangleBar:"⧏",LeftTriangleEqual:"⊴",LeftUpDownVector:"⥑",LeftUpTeeVector:"⥠",LeftUpVector:"↿",LeftUpVectorBar:"⥘",LeftVector:"↼",LeftVectorBar:"⥒",lEg:"⪋",leg:"⋚",leq:"≤",leqq:"≦",leqslant:"⩽",les:"⩽",lescc:"⪨",lesdot:"⩿",lesdoto:"⪁",lesdotor:"⪃",lesg:"⋚︀",lesges:"⪓",lessapprox:"⪅",lessdot:"⋖",lesseqgtr:"⋚",lesseqqgtr:"⪋",LessEqualGreater:"⋚",LessFullEqual:"≦",LessGreater:"≶",lessgtr:"≶",LessLess:"⪡",lesssim:"≲",LessSlantEqual:"⩽",LessTilde:"≲",lfisht:"⥼",lfloor:"⌊",Lfr:"𝔏",lfr:"𝔩",lg:"≶",lgE:"⪑",lHar:"⥢",lhard:"↽",lharu:"↼",lharul:"⥪",lhblk:"▄",LJcy:"Љ",ljcy:"љ",Ll:"⋘",ll:"≪",llarr:"⇇",llcorner:"⌞",Lleftarrow:"⇚",llhard:"⥫",lltri:"◺",Lmidot:"Ŀ",lmidot:"ŀ",lmoust:"⎰",lmoustache:"⎰",lnap:"⪉",lnapprox:"⪉",lnE:"≨",lne:"⪇",lneq:"⪇",lneqq:"≨",lnsim:"⋦",loang:"⟬",loarr:"⇽",lobrk:"⟦",LongLeftArrow:"⟵",Longleftarrow:"⟸",longleftarrow:"⟵",LongLeftRightArrow:"⟷",Longleftrightarrow:"⟺",longleftrightarrow:"⟷",longmapsto:"⟼",LongRightArrow:"⟶",Longrightarrow:"⟹",longrightarrow:"⟶",looparrowleft:"↫",looparrowright:"↬",lopar:"⦅",Lopf:"𝕃",lopf:"𝕝",loplus:"⨭",lotimes:"⨴",lowast:"∗",lowbar:"_",LowerLeftArrow:"↙",LowerRightArrow:"↘",loz:"◊",lozenge:"◊",lozf:"⧫",lpar:"(",lparlt:"⦓",lrarr:"⇆",lrcorner:"⌟",lrhar:"⇋",lrhard:"⥭",lrm:"",lrtri:"⊿",lsaquo:"‹",Lscr:"ℒ",lscr:"𝓁",Lsh:"↰",lsh:"↰",lsim:"≲",lsime:"⪍",lsimg:"⪏",lsqb:"[",lsquo:"‘",lsquor:"‚",Lstrok:"Ł",lstrok:"ł",Lt:"≪",LT:"<",lt:"<",ltcc:"⪦",ltcir:"⩹",ltdot:"⋖",lthree:"⋋",ltimes:"⋉",ltlarr:"⥶",ltquest:"⩻",ltri:"◃",ltrie:"⊴",ltrif:"◂",ltrPar:"⦖",lurdshar:"⥊",luruhar:"⥦",lvertneqq:"≨︀",lvnE:"≨︀",macr:"¯",male:"♂",malt:"✠",maltese:"✠",Map:"⤅",map:"↦",mapsto:"↦",mapstodown:"↧",mapstoleft:"↤",mapstoup:"↥",marker:"▮",mcomma:"⨩",Mcy:"М",mcy:"м",mdash:"—",mDDot:"∺",measuredangle:"∡",MediumSpace:" ",Mellintrf:"ℳ",Mfr:"𝔐",mfr:"𝔪",mho:"℧",micro:"µ",mid:"∣",midast:"*",midcir:"⫰",middot:"·",minus:"−",minusb:"⊟",minusd:"∸",minusdu:"⨪",MinusPlus:"∓",mlcp:"⫛",mldr:"…",mnplus:"∓",models:"⊧",Mopf:"𝕄",mopf:"𝕞",mp:"∓",Mscr:"ℳ",mscr:"𝓂",mstpos:"∾",Mu:"Μ",mu:"μ",multimap:"⊸",mumap:"⊸",nabla:"∇",Nacute:"Ń",nacute:"ń",nang:"∠⃒",nap:"≉",napE:"⩰̸",napid:"≋̸",napos:"ʼn",napprox:"≉",natur:"♮",natural:"♮",naturals:"ℕ",nbsp:" ",nbump:"≎̸",nbumpe:"≏̸",ncap:"⩃",Ncaron:"Ň",ncaron:"ň",Ncedil:"Ņ",ncedil:"ņ",ncong:"≇",ncongdot:"⩭̸",ncup:"⩂",Ncy:"Н",ncy:"н",ndash:"–",ne:"≠",nearhk:"⤤",neArr:"⇗",nearr:"↗",nearrow:"↗",nedot:"≐̸",NegativeMediumSpace:"",NegativeThickSpace:"",NegativeThinSpace:"",NegativeVeryThinSpace:"",nequiv:"≢",nesear:"⤨",nesim:"≂̸",NestedGreaterGreater:"≫",NestedLessLess:"≪",NewLine:`
|
|
125
|
-
`,nexist:"∄",nexists:"∄",Nfr:"𝔑",nfr:"𝔫",ngE:"≧̸",nge:"≱",ngeq:"≱",ngeqq:"≧̸",ngeqslant:"⩾̸",nges:"⩾̸",nGg:"⋙̸",ngsim:"≵",nGt:"≫⃒",ngt:"≯",ngtr:"≯",nGtv:"≫̸",nhArr:"⇎",nharr:"↮",nhpar:"⫲",ni:"∋",nis:"⋼",nisd:"⋺",niv:"∋",NJcy:"Њ",njcy:"њ",nlArr:"⇍",nlarr:"↚",nldr:"‥",nlE:"≦̸",nle:"≰",nLeftarrow:"⇍",nleftarrow:"↚",nLeftrightarrow:"⇎",nleftrightarrow:"↮",nleq:"≰",nleqq:"≦̸",nleqslant:"⩽̸",nles:"⩽̸",nless:"≮",nLl:"⋘̸",nlsim:"≴",nLt:"≪⃒",nlt:"≮",nltri:"⋪",nltrie:"⋬",nLtv:"≪̸",nmid:"∤",NoBreak:"",NonBreakingSpace:" ",Nopf:"ℕ",nopf:"𝕟",Not:"⫬",not:"¬",NotCongruent:"≢",NotCupCap:"≭",NotDoubleVerticalBar:"∦",NotElement:"∉",NotEqual:"≠",NotEqualTilde:"≂̸",NotExists:"∄",NotGreater:"≯",NotGreaterEqual:"≱",NotGreaterFullEqual:"≧̸",NotGreaterGreater:"≫̸",NotGreaterLess:"≹",NotGreaterSlantEqual:"⩾̸",NotGreaterTilde:"≵",NotHumpDownHump:"≎̸",NotHumpEqual:"≏̸",notin:"∉",notindot:"⋵̸",notinE:"⋹̸",notinva:"∉",notinvb:"⋷",notinvc:"⋶",NotLeftTriangle:"⋪",NotLeftTriangleBar:"⧏̸",NotLeftTriangleEqual:"⋬",NotLess:"≮",NotLessEqual:"≰",NotLessGreater:"≸",NotLessLess:"≪̸",NotLessSlantEqual:"⩽̸",NotLessTilde:"≴",NotNestedGreaterGreater:"⪢̸",NotNestedLessLess:"⪡̸",notni:"∌",notniva:"∌",notnivb:"⋾",notnivc:"⋽",NotPrecedes:"⊀",NotPrecedesEqual:"⪯̸",NotPrecedesSlantEqual:"⋠",NotReverseElement:"∌",NotRightTriangle:"⋫",NotRightTriangleBar:"⧐̸",NotRightTriangleEqual:"⋭",NotSquareSubset:"⊏̸",NotSquareSubsetEqual:"⋢",NotSquareSuperset:"⊐̸",NotSquareSupersetEqual:"⋣",NotSubset:"⊂⃒",NotSubsetEqual:"⊈",NotSucceeds:"⊁",NotSucceedsEqual:"⪰̸",NotSucceedsSlantEqual:"⋡",NotSucceedsTilde:"≿̸",NotSuperset:"⊃⃒",NotSupersetEqual:"⊉",NotTilde:"≁",NotTildeEqual:"≄",NotTildeFullEqual:"≇",NotTildeTilde:"≉",NotVerticalBar:"∤",npar:"∦",nparallel:"∦",nparsl:"⫽⃥",npart:"∂̸",npolint:"⨔",npr:"⊀",nprcue:"⋠",npre:"⪯̸",nprec:"⊀",npreceq:"⪯̸",nrArr:"⇏",nrarr:"↛",nrarrc:"⤳̸",nrarrw:"↝̸",nRightarrow:"⇏",nrightarrow:"↛",nrtri:"⋫",nrtrie:"⋭",nsc:"⊁",nsccue:"⋡",nsce:"⪰̸",Nscr:"𝒩",nscr:"𝓃",nshortmid:"∤",nshortparallel:"∦",nsim:"≁",nsime:"≄",nsimeq:"≄",nsmid:"∤",nspar:"∦",nsqsube:"⋢",nsqsupe:"⋣",nsub:"⊄",nsubE:"⫅̸",nsube:"⊈",nsubset:"⊂⃒",nsubseteq:"⊈",nsubseteqq:"⫅̸",nsucc:"⊁",nsucceq:"⪰̸",nsup:"⊅",nsupE:"⫆̸",nsupe:"⊉",nsupset:"⊃⃒",nsupseteq:"⊉",nsupseteqq:"⫆̸",ntgl:"≹",Ntilde:"Ñ",ntilde:"ñ",ntlg:"≸",ntriangleleft:"⋪",ntrianglelefteq:"⋬",ntriangleright:"⋫",ntrianglerighteq:"⋭",Nu:"Ν",nu:"ν",num:"#",numero:"№",numsp:" ",nvap:"≍⃒",nVDash:"⊯",nVdash:"⊮",nvDash:"⊭",nvdash:"⊬",nvge:"≥⃒",nvgt:">⃒",nvHarr:"⤄",nvinfin:"⧞",nvlArr:"⤂",nvle:"≤⃒",nvlt:"<⃒",nvltrie:"⊴⃒",nvrArr:"⤃",nvrtrie:"⊵⃒",nvsim:"∼⃒",nwarhk:"⤣",nwArr:"⇖",nwarr:"↖",nwarrow:"↖",nwnear:"⤧",Oacute:"Ó",oacute:"ó",oast:"⊛",ocir:"⊚",Ocirc:"Ô",ocirc:"ô",Ocy:"О",ocy:"о",odash:"⊝",Odblac:"Ő",odblac:"ő",odiv:"⨸",odot:"⊙",odsold:"⦼",OElig:"Œ",oelig:"œ",ofcir:"⦿",Ofr:"𝔒",ofr:"𝔬",ogon:"˛",Ograve:"Ò",ograve:"ò",ogt:"⧁",ohbar:"⦵",ohm:"Ω",oint:"∮",olarr:"↺",olcir:"⦾",olcross:"⦻",oline:"‾",olt:"⧀",Omacr:"Ō",omacr:"ō",Omega:"Ω",omega:"ω",Omicron:"Ο",omicron:"ο",omid:"⦶",ominus:"⊖",Oopf:"𝕆",oopf:"𝕠",opar:"⦷",OpenCurlyDoubleQuote:"“",OpenCurlyQuote:"‘",operp:"⦹",oplus:"⊕",Or:"⩔",or:"∨",orarr:"↻",ord:"⩝",order:"ℴ",orderof:"ℴ",ordf:"ª",ordm:"º",origof:"⊶",oror:"⩖",orslope:"⩗",orv:"⩛",oS:"Ⓢ",Oscr:"𝒪",oscr:"ℴ",Oslash:"Ø",oslash:"ø",osol:"⊘",Otilde:"Õ",otilde:"õ",Otimes:"⨷",otimes:"⊗",otimesas:"⨶",Ouml:"Ö",ouml:"ö",ovbar:"⌽",OverBar:"‾",OverBrace:"⏞",OverBracket:"⎴",OverParenthesis:"⏜",par:"∥",para:"¶",parallel:"∥",parsim:"⫳",parsl:"⫽",part:"∂",PartialD:"∂",Pcy:"П",pcy:"п",percnt:"%",period:".",permil:"‰",perp:"⊥",pertenk:"‱",Pfr:"𝔓",pfr:"𝔭",Phi:"Φ",phi:"φ",phiv:"ϕ",phmmat:"ℳ",phone:"☎",Pi:"Π",pi:"π",pitchfork:"⋔",piv:"ϖ",planck:"ℏ",planckh:"ℎ",plankv:"ℏ",plus:"+",plusacir:"⨣",plusb:"⊞",pluscir:"⨢",plusdo:"∔",plusdu:"⨥",pluse:"⩲",PlusMinus:"±",plusmn:"±",plussim:"⨦",plustwo:"⨧",pm:"±",Poincareplane:"ℌ",pointint:"⨕",Popf:"ℙ",popf:"𝕡",pound:"£",Pr:"⪻",pr:"≺",prap:"⪷",prcue:"≼",prE:"⪳",pre:"⪯",prec:"≺",precapprox:"⪷",preccurlyeq:"≼",Precedes:"≺",PrecedesEqual:"⪯",PrecedesSlantEqual:"≼",PrecedesTilde:"≾",preceq:"⪯",precnapprox:"⪹",precneqq:"⪵",precnsim:"⋨",precsim:"≾",Prime:"″",prime:"′",primes:"ℙ",prnap:"⪹",prnE:"⪵",prnsim:"⋨",prod:"∏",Product:"∏",profalar:"⌮",profline:"⌒",profsurf:"⌓",prop:"∝",Proportion:"∷",Proportional:"∝",propto:"∝",prsim:"≾",prurel:"⊰",Pscr:"𝒫",pscr:"𝓅",Psi:"Ψ",psi:"ψ",puncsp:" ",Qfr:"𝔔",qfr:"𝔮",qint:"⨌",Qopf:"ℚ",qopf:"𝕢",qprime:"⁗",Qscr:"𝒬",qscr:"𝓆",quaternions:"ℍ",quatint:"⨖",quest:"?",questeq:"≟",QUOT:'"',quot:'"',rAarr:"⇛",race:"∽̱",Racute:"Ŕ",racute:"ŕ",radic:"√",raemptyv:"⦳",Rang:"⟫",rang:"⟩",rangd:"⦒",range:"⦥",rangle:"⟩",raquo:"»",Rarr:"↠",rArr:"⇒",rarr:"→",rarrap:"⥵",rarrb:"⇥",rarrbfs:"⤠",rarrc:"⤳",rarrfs:"⤞",rarrhk:"↪",rarrlp:"↬",rarrpl:"⥅",rarrsim:"⥴",Rarrtl:"⤖",rarrtl:"↣",rarrw:"↝",rAtail:"⤜",ratail:"⤚",ratio:"∶",rationals:"ℚ",RBarr:"⤐",rBarr:"⤏",rbarr:"⤍",rbbrk:"❳",rbrace:"}",rbrack:"]",rbrke:"⦌",rbrksld:"⦎",rbrkslu:"⦐",Rcaron:"Ř",rcaron:"ř",Rcedil:"Ŗ",rcedil:"ŗ",rceil:"⌉",rcub:"}",Rcy:"Р",rcy:"р",rdca:"⤷",rdldhar:"⥩",rdquo:"”",rdquor:"”",rdsh:"↳",Re:"ℜ",real:"ℜ",realine:"ℛ",realpart:"ℜ",reals:"ℝ",rect:"▭",REG:"®",reg:"®",ReverseElement:"∋",ReverseEquilibrium:"⇋",ReverseUpEquilibrium:"⥯",rfisht:"⥽",rfloor:"⌋",Rfr:"ℜ",rfr:"𝔯",rHar:"⥤",rhard:"⇁",rharu:"⇀",rharul:"⥬",Rho:"Ρ",rho:"ρ",rhov:"ϱ",RightAngleBracket:"⟩",RightArrow:"→",Rightarrow:"⇒",rightarrow:"→",RightArrowBar:"⇥",RightArrowLeftArrow:"⇄",rightarrowtail:"↣",RightCeiling:"⌉",RightDoubleBracket:"⟧",RightDownTeeVector:"⥝",RightDownVector:"⇂",RightDownVectorBar:"⥕",RightFloor:"⌋",rightharpoondown:"⇁",rightharpoonup:"⇀",rightleftarrows:"⇄",rightleftharpoons:"⇌",rightrightarrows:"⇉",rightsquigarrow:"↝",RightTee:"⊢",RightTeeArrow:"↦",RightTeeVector:"⥛",rightthreetimes:"⋌",RightTriangle:"⊳",RightTriangleBar:"⧐",RightTriangleEqual:"⊵",RightUpDownVector:"⥏",RightUpTeeVector:"⥜",RightUpVector:"↾",RightUpVectorBar:"⥔",RightVector:"⇀",RightVectorBar:"⥓",ring:"˚",risingdotseq:"≓",rlarr:"⇄",rlhar:"⇌",rlm:"",rmoust:"⎱",rmoustache:"⎱",rnmid:"⫮",roang:"⟭",roarr:"⇾",robrk:"⟧",ropar:"⦆",Ropf:"ℝ",ropf:"𝕣",roplus:"⨮",rotimes:"⨵",RoundImplies:"⥰",rpar:")",rpargt:"⦔",rppolint:"⨒",rrarr:"⇉",Rrightarrow:"⇛",rsaquo:"›",Rscr:"ℛ",rscr:"𝓇",Rsh:"↱",rsh:"↱",rsqb:"]",rsquo:"’",rsquor:"’",rthree:"⋌",rtimes:"⋊",rtri:"▹",rtrie:"⊵",rtrif:"▸",rtriltri:"⧎",RuleDelayed:"⧴",ruluhar:"⥨",rx:"℞",Sacute:"Ś",sacute:"ś",sbquo:"‚",Sc:"⪼",sc:"≻",scap:"⪸",Scaron:"Š",scaron:"š",sccue:"≽",scE:"⪴",sce:"⪰",Scedil:"Ş",scedil:"ş",Scirc:"Ŝ",scirc:"ŝ",scnap:"⪺",scnE:"⪶",scnsim:"⋩",scpolint:"⨓",scsim:"≿",Scy:"С",scy:"с",sdot:"⋅",sdotb:"⊡",sdote:"⩦",searhk:"⤥",seArr:"⇘",searr:"↘",searrow:"↘",sect:"§",semi:";",seswar:"⤩",setminus:"∖",setmn:"∖",sext:"✶",Sfr:"𝔖",sfr:"𝔰",sfrown:"⌢",sharp:"♯",SHCHcy:"Щ",shchcy:"щ",SHcy:"Ш",shcy:"ш",ShortDownArrow:"↓",ShortLeftArrow:"←",shortmid:"∣",shortparallel:"∥",ShortRightArrow:"→",ShortUpArrow:"↑",shy:"",Sigma:"Σ",sigma:"σ",sigmaf:"ς",sigmav:"ς",sim:"∼",simdot:"⩪",sime:"≃",simeq:"≃",simg:"⪞",simgE:"⪠",siml:"⪝",simlE:"⪟",simne:"≆",simplus:"⨤",simrarr:"⥲",slarr:"←",SmallCircle:"∘",smallsetminus:"∖",smashp:"⨳",smeparsl:"⧤",smid:"∣",smile:"⌣",smt:"⪪",smte:"⪬",smtes:"⪬︀",SOFTcy:"Ь",softcy:"ь",sol:"/",solb:"⧄",solbar:"⌿",Sopf:"𝕊",sopf:"𝕤",spades:"♠",spadesuit:"♠",spar:"∥",sqcap:"⊓",sqcaps:"⊓︀",sqcup:"⊔",sqcups:"⊔︀",Sqrt:"√",sqsub:"⊏",sqsube:"⊑",sqsubset:"⊏",sqsubseteq:"⊑",sqsup:"⊐",sqsupe:"⊒",sqsupset:"⊐",sqsupseteq:"⊒",squ:"□",Square:"□",square:"□",SquareIntersection:"⊓",SquareSubset:"⊏",SquareSubsetEqual:"⊑",SquareSuperset:"⊐",SquareSupersetEqual:"⊒",SquareUnion:"⊔",squarf:"▪",squf:"▪",srarr:"→",Sscr:"𝒮",sscr:"𝓈",ssetmn:"∖",ssmile:"⌣",sstarf:"⋆",Star:"⋆",star:"☆",starf:"★",straightepsilon:"ϵ",straightphi:"ϕ",strns:"¯",Sub:"⋐",sub:"⊂",subdot:"⪽",subE:"⫅",sube:"⊆",subedot:"⫃",submult:"⫁",subnE:"⫋",subne:"⊊",subplus:"⪿",subrarr:"⥹",Subset:"⋐",subset:"⊂",subseteq:"⊆",subseteqq:"⫅",SubsetEqual:"⊆",subsetneq:"⊊",subsetneqq:"⫋",subsim:"⫇",subsub:"⫕",subsup:"⫓",succ:"≻",succapprox:"⪸",succcurlyeq:"≽",Succeeds:"≻",SucceedsEqual:"⪰",SucceedsSlantEqual:"≽",SucceedsTilde:"≿",succeq:"⪰",succnapprox:"⪺",succneqq:"⪶",succnsim:"⋩",succsim:"≿",SuchThat:"∋",Sum:"∑",sum:"∑",sung:"♪",Sup:"⋑",sup:"⊃",sup1:"¹",sup2:"²",sup3:"³",supdot:"⪾",supdsub:"⫘",supE:"⫆",supe:"⊇",supedot:"⫄",Superset:"⊃",SupersetEqual:"⊇",suphsol:"⟉",suphsub:"⫗",suplarr:"⥻",supmult:"⫂",supnE:"⫌",supne:"⊋",supplus:"⫀",Supset:"⋑",supset:"⊃",supseteq:"⊇",supseteqq:"⫆",supsetneq:"⊋",supsetneqq:"⫌",supsim:"⫈",supsub:"⫔",supsup:"⫖",swarhk:"⤦",swArr:"⇙",swarr:"↙",swarrow:"↙",swnwar:"⤪",szlig:"ß",Tab:" ",target:"⌖",Tau:"Τ",tau:"τ",tbrk:"⎴",Tcaron:"Ť",tcaron:"ť",Tcedil:"Ţ",tcedil:"ţ",Tcy:"Т",tcy:"т",tdot:"⃛",telrec:"⌕",Tfr:"𝔗",tfr:"𝔱",there4:"∴",Therefore:"∴",therefore:"∴",Theta:"Θ",theta:"θ",thetasym:"ϑ",thetav:"ϑ",thickapprox:"≈",thicksim:"∼",ThickSpace:" ",thinsp:" ",ThinSpace:" ",thkap:"≈",thksim:"∼",THORN:"Þ",thorn:"þ",Tilde:"∼",tilde:"˜",TildeEqual:"≃",TildeFullEqual:"≅",TildeTilde:"≈",times:"×",timesb:"⊠",timesbar:"⨱",timesd:"⨰",tint:"∭",toea:"⤨",top:"⊤",topbot:"⌶",topcir:"⫱",Topf:"𝕋",topf:"𝕥",topfork:"⫚",tosa:"⤩",tprime:"‴",TRADE:"™",trade:"™",triangle:"▵",triangledown:"▿",triangleleft:"◃",trianglelefteq:"⊴",triangleq:"≜",triangleright:"▹",trianglerighteq:"⊵",tridot:"◬",trie:"≜",triminus:"⨺",TripleDot:"⃛",triplus:"⨹",trisb:"⧍",tritime:"⨻",trpezium:"⏢",Tscr:"𝒯",tscr:"𝓉",TScy:"Ц",tscy:"ц",TSHcy:"Ћ",tshcy:"ћ",Tstrok:"Ŧ",tstrok:"ŧ",twixt:"≬",twoheadleftarrow:"↞",twoheadrightarrow:"↠",Uacute:"Ú",uacute:"ú",Uarr:"↟",uArr:"⇑",uarr:"↑",Uarrocir:"⥉",Ubrcy:"Ў",ubrcy:"ў",Ubreve:"Ŭ",ubreve:"ŭ",Ucirc:"Û",ucirc:"û",Ucy:"У",ucy:"у",udarr:"⇅",Udblac:"Ű",udblac:"ű",udhar:"⥮",ufisht:"⥾",Ufr:"𝔘",ufr:"𝔲",Ugrave:"Ù",ugrave:"ù",uHar:"⥣",uharl:"↿",uharr:"↾",uhblk:"▀",ulcorn:"⌜",ulcorner:"⌜",ulcrop:"⌏",ultri:"◸",Umacr:"Ū",umacr:"ū",uml:"¨",UnderBar:"_",UnderBrace:"⏟",UnderBracket:"⎵",UnderParenthesis:"⏝",Union:"⋃",UnionPlus:"⊎",Uogon:"Ų",uogon:"ų",Uopf:"𝕌",uopf:"𝕦",UpArrow:"↑",Uparrow:"⇑",uparrow:"↑",UpArrowBar:"⤒",UpArrowDownArrow:"⇅",UpDownArrow:"↕",Updownarrow:"⇕",updownarrow:"↕",UpEquilibrium:"⥮",upharpoonleft:"↿",upharpoonright:"↾",uplus:"⊎",UpperLeftArrow:"↖",UpperRightArrow:"↗",Upsi:"ϒ",upsi:"υ",upsih:"ϒ",Upsilon:"Υ",upsilon:"υ",UpTee:"⊥",UpTeeArrow:"↥",upuparrows:"⇈",urcorn:"⌝",urcorner:"⌝",urcrop:"⌎",Uring:"Ů",uring:"ů",urtri:"◹",Uscr:"𝒰",uscr:"𝓊",utdot:"⋰",Utilde:"Ũ",utilde:"ũ",utri:"▵",utrif:"▴",uuarr:"⇈",Uuml:"Ü",uuml:"ü",uwangle:"⦧",vangrt:"⦜",varepsilon:"ϵ",varkappa:"ϰ",varnothing:"∅",varphi:"ϕ",varpi:"ϖ",varpropto:"∝",vArr:"⇕",varr:"↕",varrho:"ϱ",varsigma:"ς",varsubsetneq:"⊊︀",varsubsetneqq:"⫋︀",varsupsetneq:"⊋︀",varsupsetneqq:"⫌︀",vartheta:"ϑ",vartriangleleft:"⊲",vartriangleright:"⊳",Vbar:"⫫",vBar:"⫨",vBarv:"⫩",Vcy:"В",vcy:"в",VDash:"⊫",Vdash:"⊩",vDash:"⊨",vdash:"⊢",Vdashl:"⫦",Vee:"⋁",vee:"∨",veebar:"⊻",veeeq:"≚",vellip:"⋮",Verbar:"‖",verbar:"|",Vert:"‖",vert:"|",VerticalBar:"∣",VerticalLine:"|",VerticalSeparator:"❘",VerticalTilde:"≀",VeryThinSpace:" ",Vfr:"𝔙",vfr:"𝔳",vltri:"⊲",vnsub:"⊂⃒",vnsup:"⊃⃒",Vopf:"𝕍",vopf:"𝕧",vprop:"∝",vrtri:"⊳",Vscr:"𝒱",vscr:"𝓋",vsubnE:"⫋︀",vsubne:"⊊︀",vsupnE:"⫌︀",vsupne:"⊋︀",Vvdash:"⊪",vzigzag:"⦚",Wcirc:"Ŵ",wcirc:"ŵ",wedbar:"⩟",Wedge:"⋀",wedge:"∧",wedgeq:"≙",weierp:"℘",Wfr:"𝔚",wfr:"𝔴",Wopf:"𝕎",wopf:"𝕨",wp:"℘",wr:"≀",wreath:"≀",Wscr:"𝒲",wscr:"𝓌",xcap:"⋂",xcirc:"◯",xcup:"⋃",xdtri:"▽",Xfr:"𝔛",xfr:"𝔵",xhArr:"⟺",xharr:"⟷",Xi:"Ξ",xi:"ξ",xlArr:"⟸",xlarr:"⟵",xmap:"⟼",xnis:"⋻",xodot:"⨀",Xopf:"𝕏",xopf:"𝕩",xoplus:"⨁",xotime:"⨂",xrArr:"⟹",xrarr:"⟶",Xscr:"𝒳",xscr:"𝓍",xsqcup:"⨆",xuplus:"⨄",xutri:"△",xvee:"⋁",xwedge:"⋀",Yacute:"Ý",yacute:"ý",YAcy:"Я",yacy:"я",Ycirc:"Ŷ",ycirc:"ŷ",Ycy:"Ы",ycy:"ы",yen:"¥",Yfr:"𝔜",yfr:"𝔶",YIcy:"Ї",yicy:"ї",Yopf:"𝕐",yopf:"𝕪",Yscr:"𝒴",yscr:"𝓎",YUcy:"Ю",yucy:"ю",Yuml:"Ÿ",yuml:"ÿ",Zacute:"Ź",zacute:"ź",Zcaron:"Ž",zcaron:"ž",Zcy:"З",zcy:"з",Zdot:"Ż",zdot:"ż",zeetrf:"ℨ",ZeroWidthSpace:"",Zeta:"Ζ",zeta:"ζ",Zfr:"ℨ",zfr:"𝔷",ZHcy:"Ж",zhcy:"ж",zigrarr:"⇝",Zopf:"ℤ",zopf:"𝕫",Zscr:"𝒵",zscr:"𝓏",zwj:"",zwnj:""}),e.entityMap=e.HTML_ENTITIES})(qs)),qs}var An={},bu;function hh(){if(bu)return An;bu=1;var e=fs().NAMESPACE,a=/[A-Z_a-z\xC0-\xD6\xD8-\xF6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,i=new RegExp("[\\-\\.0-9"+a.source.slice(1,-1)+"\\u00B7\\u0300-\\u036F\\u203F-\\u2040]"),s=new RegExp("^"+a.source+i.source+"*(?::"+a.source+i.source+"*)?$"),r=0,n=1,u=2,c=3,d=4,f=5,o=6,h=7;function l(A,D){this.message=A,this.locator=D,Error.captureStackTrace&&Error.captureStackTrace(this,l)}l.prototype=new Error,l.prototype.name=l.name;function p(){}p.prototype={parse:function(A,D,C){var O=this.domBuilder;O.startDocument(),N(D,D={}),x(A,D,C,O,this.errorHandler),O.endDocument()}};function x(A,D,C,O,L){function H(fe){if(fe>65535){fe-=65536;var Ae=55296+(fe>>10),Oe=56320+(fe&1023);return String.fromCharCode(Ae,Oe)}else return String.fromCharCode(fe)}function F(fe){var Ae=fe.slice(1,-1);return Object.hasOwnProperty.call(C,Ae)?C[Ae]:Ae.charAt(0)==="#"?H(parseInt(Ae.substr(1).replace("x","0x"))):(L.error("entity not found:"+fe),fe)}function B(fe){if(fe>V){var Ae=A.substring(V,fe).replace(/&#?\w+;/g,F);R&&$(V),O.characters(Ae,0,fe-V),V=fe}}function $(fe,Ae){for(;fe>=X&&(Ae=ee.exec(A));)G=Ae.index,X=G+Ae[0].length,R.lineNumber++;R.columnNumber=fe-G+1}for(var G=0,X=0,ee=/.*(?:\r\n?|\n)|.*$/g,R=O.locator,se=[{currentNSMap:D}],I={},V=0;;){try{var J=A.indexOf("<",V);if(J<0){if(!A.substr(V).match(/^\s*$/)){var oe=O.doc,K=oe.createTextNode(A.substr(V));oe.appendChild(K),O.currentElement=K}return}switch(J>V&&B(J),A.charAt(J+1)){case"/":var ge=A.indexOf(">",J+3),te=A.substring(J+2,ge).replace(/[ \t\n\r]+$/g,""),pe=se.pop();ge<0?(te=A.substring(J+2).replace(/[\s<].*/,""),L.error("end tag name: "+te+" is not complete:"+pe.tagName),ge=J+1+te.length):te.match(/\s</)&&(te=te.replace(/[\s<].*/,""),L.error("end tag name: "+te+" maybe not complete"),ge=J+1+te.length);var Ee=pe.localNSMap,Z=pe.tagName==te,ae=Z||pe.tagName&&pe.tagName.toLowerCase()==te.toLowerCase();if(ae){if(O.endElement(pe.uri,pe.localName,te),Ee)for(var re in Ee)Object.prototype.hasOwnProperty.call(Ee,re)&&O.endPrefixMapping(re);Z||L.fatalError("end tag name: "+te+" is not match the current start tagName:"+pe.tagName)}else se.push(pe);ge++;break;case"?":R&&$(J),ge=m(A,J,O);break;case"!":R&&$(J),ge=y(A,J,O,L);break;default:R&&$(J);var ce=new k,xe=se[se.length-1].currentNSMap,ge=b(A,J,ce,xe,F,L),ke=ce.length;if(!ce.closed&&_(A,ge,ce.tagName,I)&&(ce.closed=!0,C.nbsp||L.warning("unclosed xml attribute")),R&&ke){for(var me=w(R,{}),Ye=0;Ye<ke;Ye++){var we=ce[Ye];$(we.offset),we.locator=w(R,{})}O.locator=me,g(ce,O,xe)&&se.push(ce),O.locator=R}else g(ce,O,xe)&&se.push(ce);e.isHTML(ce.uri)&&!ce.closed?ge=v(A,ge,ce.tagName,F,O):ge++}}catch(fe){if(fe instanceof l)throw fe;L.error("element parse error: "+fe),ge=-1}ge>V?V=ge:B(Math.max(J,V)+1)}}function w(A,D){return D.lineNumber=A.lineNumber,D.columnNumber=A.columnNumber,D}function b(A,D,C,O,L,H){function F(R,se,I){C.attributeNames.hasOwnProperty(R)&&H.fatalError("Attribute "+R+" redefined"),C.addValue(R,se.replace(/[\t\n\r]/g," ").replace(/&#?\w+;/g,L),I)}for(var B,$,G=++D,X=r;;){var ee=A.charAt(G);switch(ee){case"=":if(X===n)B=A.slice(D,G),X=c;else if(X===u)X=c;else throw new Error("attribute equal must after attrName");break;case"'":case'"':if(X===c||X===n)if(X===n&&(H.warning('attribute value must after "="'),B=A.slice(D,G)),D=G+1,G=A.indexOf(ee,D),G>0)$=A.slice(D,G),F(B,$,D-1),X=f;else throw new Error("attribute value no end '"+ee+"' match");else if(X==d)$=A.slice(D,G),F(B,$,D),H.warning('attribute "'+B+'" missed start quot('+ee+")!!"),D=G+1,X=f;else throw new Error('attribute value must after "="');break;case"/":switch(X){case r:C.setTagName(A.slice(D,G));case f:case o:case h:X=h,C.closed=!0;case d:case n:break;case u:C.closed=!0;break;default:throw new Error("attribute invalid close char('/')")}break;case"":return H.error("unexpected end of input"),X==r&&C.setTagName(A.slice(D,G)),G;case">":switch(X){case r:C.setTagName(A.slice(D,G));case f:case o:case h:break;case d:case n:$=A.slice(D,G),$.slice(-1)==="/"&&(C.closed=!0,$=$.slice(0,-1));case u:X===u&&($=B),X==d?(H.warning('attribute "'+$+'" missed quot(")!'),F(B,$,D)):((!e.isHTML(O[""])||!$.match(/^(?:disabled|checked|selected)$/i))&&H.warning('attribute "'+$+'" missed value!! "'+$+'" instead!!'),F($,$,D));break;case c:throw new Error("attribute value missed!!")}return G;case"":ee=" ";default:if(ee<=" ")switch(X){case r:C.setTagName(A.slice(D,G)),X=o;break;case n:B=A.slice(D,G),X=u;break;case d:var $=A.slice(D,G);H.warning('attribute "'+$+'" missed quot(")!!'),F(B,$,D);case f:X=o;break}else switch(X){case u:C.tagName,(!e.isHTML(O[""])||!B.match(/^(?:disabled|checked|selected)$/i))&&H.warning('attribute "'+B+'" missed value!! "'+B+'" instead2!!'),F(B,B,D),D=G,X=n;break;case f:H.warning('attribute space is required"'+B+'"!!');case o:X=n,D=G;break;case c:X=d,D=G;break;case h:throw new Error("elements closed character '/' and '>' must be connected to")}}G++}}function g(A,D,C){for(var O=A.tagName,L=null,ee=A.length;ee--;){var H=A[ee],F=H.qName,B=H.value,R=F.indexOf(":");if(R>0)var $=H.prefix=F.slice(0,R),G=F.slice(R+1),X=$==="xmlns"&&G;else G=F,$=null,X=F==="xmlns"&&"";H.localName=G,X!==!1&&(L==null&&(L={},N(C,C={})),C[X]=L[X]=B,H.uri=e.XMLNS,D.startPrefixMapping(X,B))}for(var ee=A.length;ee--;){H=A[ee];var $=H.prefix;$&&($==="xml"&&(H.uri=e.XML),$!=="xmlns"&&(H.uri=C[$||""]))}var R=O.indexOf(":");R>0?($=A.prefix=O.slice(0,R),G=A.localName=O.slice(R+1)):($=null,G=A.localName=O);var se=A.uri=C[$||""];if(D.startElement(se,G,O,A),A.closed){if(D.endElement(se,G,O),L)for($ in L)Object.prototype.hasOwnProperty.call(L,$)&&D.endPrefixMapping($)}else return A.currentNSMap=C,A.localNSMap=L,!0}function v(A,D,C,O,L){if(/^(?:script|textarea)$/i.test(C)){var H=A.indexOf("</"+C+">",D),F=A.substring(D+1,H);if(/[&<]/.test(F))return/^script$/i.test(C)?(L.characters(F,0,F.length),H):(F=F.replace(/&#?\w+;/g,O),L.characters(F,0,F.length),H)}return D+1}function _(A,D,C,O){var L=O[C];return L==null&&(L=A.lastIndexOf("</"+C+">"),L<D&&(L=A.lastIndexOf("</"+C)),O[C]=L),L<D}function N(A,D){for(var C in A)Object.prototype.hasOwnProperty.call(A,C)&&(D[C]=A[C])}function y(A,D,C,O){var L=A.charAt(D+2);switch(L){case"-":if(A.charAt(D+3)==="-"){var H=A.indexOf("-->",D+4);return H>D?(C.comment(A,D+4,H-D-4),H+3):(O.error("Unclosed comment"),-1)}else return-1;default:if(A.substr(D+3,6)=="CDATA["){var H=A.indexOf("]]>",D+9);return C.startCDATA(),C.characters(A,D+9,H-D-9),C.endCDATA(),H+3}var F=j(A,D),B=F.length;if(B>1&&/!doctype/i.test(F[0][0])){var $=F[1][0],G=!1,X=!1;B>3&&(/^public$/i.test(F[2][0])?(G=F[3][0],X=B>4&&F[4][0]):/^system$/i.test(F[2][0])&&(X=F[3][0]));var ee=F[B-1];return C.startDTD($,G,X),C.endDTD(),ee.index+ee[0].length}}return-1}function m(A,D,C){var O=A.indexOf("?>",D);if(O){var L=A.substring(D,O).match(/^<\?(\S*)\s*([\s\S]*?)\s*$/);return L?(L[0].length,C.processingInstruction(L[1],L[2]),O+2):-1}return-1}function k(){this.attributeNames={}}k.prototype={setTagName:function(A){if(!s.test(A))throw new Error("invalid tagName:"+A);this.tagName=A},addValue:function(A,D,C){if(!s.test(A))throw new Error("invalid attribute:"+A);this.attributeNames[A]=this.length,this[this.length++]={qName:A,value:D,offset:C}},length:0,getLocalName:function(A){return this[A].localName},getLocator:function(A){return this[A].locator},getQName:function(A){return this[A].qName},getURI:function(A){return this[A].uri},getValue:function(A){return this[A].value}};function j(A,D){var C,O=[],L=/'[^']+'|"[^"]+"|[^\s<>\/=]+=?|(\/?\s*>|<)/g;for(L.lastIndex=D,L.exec(A);C=L.exec(A);)if(O.push(C),C[1])return O}return An.XMLReader=p,An.ParseError=l,An}var xu;function ph(){if(xu)return qa;xu=1;var e=fs(),a=qc(),i=fh(),s=hh(),r=a.DOMImplementation,n=e.NAMESPACE,u=s.ParseError,c=s.XMLReader;function d(b){return b.replace(/\r[\n\u0085]/g,`
|
|
121
|
+
`),this.inline=new ds,this.block=new Wi,this.core=new Ic,this.renderer=new Hi,this.ruler=new bt,this.options={},this.configure(Kf[e]),this.set(r||{})}yr.prototype.set=function(e){Ui(this.options,e)};yr.prototype.configure=function(e){var r=this;if(!e)throw new Error("Wrong `remarkable` preset, check name/content");e.options&&r.set(e.options),e.components&&Object.keys(e.components).forEach(function(i){e.components[i].rules&&r[i].ruler.enable(e.components[i].rules,!0)})};yr.prototype.use=function(e,r){return e(this,r),this};yr.prototype.parse=function(e,r){var i=new qc(this,e,r);return this.core.process(i),i.tokens};yr.prototype.render=function(e,r){return r=r||{},this.renderer.render(this.parse(e,r),this.options,r)};yr.prototype.parseInline=function(e,r){var i=new qc(this,e,r);return i.inlineMode=!0,this.core.process(i),i.tokens};yr.prototype.renderInline=function(e,r){return r=r||{},this.renderer.render(this.parseInline(e,r),this.options,r)};const Qf=Object.freeze(Object.defineProperty({__proto__:null,Remarkable:yr,utils:E0},Symbol.toStringTag,{value:"Module"})),eh=Bi(Qf);var Qt={},pr={};function th(e,r){var i=Object.setPrototypeOf;i?i(e,r):e.__proto__=r}function Bc(e,r){r===void 0&&(r=e.constructor);var i=Error.captureStackTrace;i&&i(e,r)}var rh=(function(){var e=function(i,s){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,n){a.__proto__=n}||function(a,n){for(var u in n)Object.prototype.hasOwnProperty.call(n,u)&&(a[u]=n[u])},e(i,s)};return function(r,i){if(typeof i!="function"&&i!==null)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");e(r,i);function s(){this.constructor=r}r.prototype=i===null?Object.create(i):(s.prototype=i.prototype,new s)}})(),ah=(function(e){rh(r,e);function r(i,s){var a=this.constructor,n=e.call(this,i,s)||this;return Object.defineProperty(n,"name",{value:a.name,enumerable:!1,configurable:!0}),th(n,a.prototype),Bc(n),n}return r})(Error),nh=function(e,r,i){if(i||arguments.length===2)for(var s=0,a=r.length,n;s<a;s++)(n||!(s in r))&&(n||(n=Array.prototype.slice.call(r,0,s)),n[s]=r[s]);return e.concat(n||Array.prototype.slice.call(r))};function sh(e,r){r===void 0&&(r=Error);function i(){for(var s=[],a=0;a<arguments.length;a++)s[a]=arguments[a];if(!(this instanceof i))return new(i.bind.apply(i,nh([void 0],s,!1)));r.apply(this,s),Object.defineProperty(this,"name",{value:e.name||r.name,enumerable:!1,configurable:!0}),e.apply(this,s),Bc(this,i)}return Object.defineProperties(i,{prototype:{value:Object.create(r.prototype,{constructor:{value:i,writable:!0,configurable:!0}})}})}const ih=Object.freeze(Object.defineProperty({__proto__:null,CustomError:ah,customErrorFactory:sh},Symbol.toStringTag,{value:"Module"})),oh=Bi(ih);var Rs={};const uh={},lh=Object.freeze(Object.defineProperty({__proto__:null,default:uh},Symbol.toStringTag,{value:"Module"})),dt=Bi(lh);var Is,cu;function ch(){if(cu)return Is;cu=1;const e=dt,r=/\s+at.*(?:\(|\s)(.*)\)?/,i=/^(?:(?:(?:node|(?:internal\/[\w/]*|.*node_modules\/(?:babel-polyfill|pirates)\/.*)?\w+)\.js:\d+:\d+)|native)/,s=typeof e.homedir>"u"?"":e.homedir();return Is=(a,n)=>(n=Object.assign({pretty:!1},n),a.replace(/\\/g,"/").split(`
|
|
122
|
+
`).filter(u=>{const c=u.match(r);if(c===null||!c[1])return!0;const d=c[1];return d.includes(".app/Contents/Resources/electron.asar")||d.includes(".app/Contents/Resources/default_app.asar")?!1:!i.test(d)}).filter(u=>u.trim()!=="").map(u=>n.pretty?u.replace(r,(c,d)=>c.replace(d,d.replace(s,"~"))):u).join(`
|
|
123
|
+
`)),Is}var Fs,du;function Vc(){if(du)return Fs;du=1;var e=function(v){return r(v)&&!i(v)};function r(g){return!!g&&typeof g=="object"}function i(g){var v=Object.prototype.toString.call(g);return v==="[object RegExp]"||v==="[object Date]"||n(g)}var s=typeof Symbol=="function"&&Symbol.for,a=s?Symbol.for("react.element"):60103;function n(g){return g.$$typeof===a}function u(g){return Array.isArray(g)?[]:{}}function c(g,v){return v.clone!==!1&&v.isMergeableObject(g)?w(u(g),g,v):g}function d(g,v,_){return g.concat(v).map(function(N){return c(N,_)})}function f(g,v){if(!v.customMerge)return w;var _=v.customMerge(g);return typeof _=="function"?_:w}function o(g){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(g).filter(function(v){return Object.propertyIsEnumerable.call(g,v)}):[]}function h(g){return Object.keys(g).concat(o(g))}function l(g,v){try{return v in g}catch{return!1}}function p(g,v){return l(g,v)&&!(Object.hasOwnProperty.call(g,v)&&Object.propertyIsEnumerable.call(g,v))}function x(g,v,_){var N={};return _.isMergeableObject(g)&&h(g).forEach(function(y){N[y]=c(g[y],_)}),h(v).forEach(function(y){p(g,y)||(l(g,y)&&_.isMergeableObject(v[y])?N[y]=f(y,_)(g[y],v[y],_):N[y]=c(v[y],_))}),N}function w(g,v,_){_=_||{},_.arrayMerge=_.arrayMerge||d,_.isMergeableObject=_.isMergeableObject||e,_.cloneUnlessOtherwiseSpecified=c;var N=Array.isArray(v),y=Array.isArray(g),m=N===y;return m?N?_.arrayMerge(g,v,_):x(g,v,_):c(v,_)}w.all=function(v,_){if(!Array.isArray(v))throw new Error("first argument should be an array");return v.reduce(function(N,y){return w(N,y,_)},{})};var b=w;return Fs=b,Fs}var qs={},fu;function Mi(){return fu||(fu=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),(function(r){r.DEFAULT={cleanStack:!0}})(e.Options||(e.Options={}))})(qs)),qs}var hu;function pu(){return hu||(hu=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0});var r=ch(),i=Vc(),s=Mi();(function(a){function n(d,f,o,h){h===void 0&&(h=s.Options.DEFAULT);var l=d;return f&&(l.cause=f),l.stack=u(l.stack,f,h),o&&c(l,o),l}a.make=n;function u(d,f,o){var h=d||"";f&&(h+=`
|
|
124
|
+
Caused by: `+(f.stack||f));function l(p){return r(p,{pretty:!0})}return o&&o.cleanStack&&(h=l(h)),h}a.appendToStack=u;function c(d,f){for(var o in f)if(f.hasOwnProperty(o)){var h=d.hasOwnProperty(o)&&typeof d[o]=="object";d[o]=h?i(d[o],f[o]):f[o]}}})(e.ChainedErrorFactory||(e.ChainedErrorFactory={}))})(Rs)),Rs}var mu;function fs(){if(mu)return pr;mu=1;var e=pr&&pr.__extends||(function(){var c=function(d,f){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(o,h){o.__proto__=h}||function(o,h){for(var l in h)h.hasOwnProperty(l)&&(o[l]=h[l])},c(d,f)};return function(d,f){c(d,f);function o(){this.constructor=d}d.prototype=f===null?Object.create(f):(o.prototype=f.prototype,new o)}})();Object.defineProperty(pr,"__esModule",{value:!0});var r=oh,i=pu(),s=Mi(),a=(function(c){e(d,c);function d(f,o,h){h===void 0&&(h=s.Options.DEFAULT);var l=c.call(this,f)||this;return l.cause=o,l.stack=i.ChainedErrorFactory.appendToStack(l.stack,o,h),l}return d})(r.CustomError);pr.default=a;var n=pu();pr.ChainedErrorFactory=n.ChainedErrorFactory;var u=Mi();return pr.Options=u.Options,pr}var gu;function dh(){if(gu)return Qt;gu=1;var e=Qt&&Qt.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(Qt,"__esModule",{value:!0}),Qt.SecurityError=Qt.SecurityChecker=void 0;const r=e(fs());let i=class{static checkSecurity(n,u){if(!u.allowScriptTag&&this.containsScriptTag(n))throw new s("Renderer rejected the input because of insecure content: text contains script tag")}static containsScriptTag(n){return/<\s*script/gi.test(n)}};Qt.SecurityChecker=i;class s extends r.default{constructor(n,u){super(n,u)}}return Qt.SecurityError=s,Qt}var st={},Fa={},er={},Tr={},bu;function hs(){if(bu)return Tr;bu=1;function e(n,u,c){if(c===void 0&&(c=Array.prototype),n&&typeof c.find=="function")return c.find.call(n,u);for(var d=0;d<n.length;d++)if(Object.prototype.hasOwnProperty.call(n,d)){var f=n[d];if(u.call(void 0,f,d,n))return f}}function r(n,u){return u===void 0&&(u=Object),u&&typeof u.freeze=="function"?u.freeze(n):n}function i(n,u){if(n===null||typeof n!="object")throw new TypeError("target is not an object");for(var c in u)Object.prototype.hasOwnProperty.call(u,c)&&(n[c]=u[c]);return n}var s=r({HTML:"text/html",isHTML:function(n){return n===s.HTML},XML_APPLICATION:"application/xml",XML_TEXT:"text/xml",XML_XHTML_APPLICATION:"application/xhtml+xml",XML_SVG_IMAGE:"image/svg+xml"}),a=r({HTML:"http://www.w3.org/1999/xhtml",isHTML:function(n){return n===a.HTML},SVG:"http://www.w3.org/2000/svg",XML:"http://www.w3.org/XML/1998/namespace",XMLNS:"http://www.w3.org/2000/xmlns/"});return Tr.assign=i,Tr.find=e,Tr.freeze=r,Tr.MIME_TYPE=s,Tr.NAMESPACE=a,Tr}var xu;function Uc(){if(xu)return er;xu=1;var e=hs(),r=e.find,i=e.NAMESPACE;function s(A){return A!==""}function a(A){return A?A.split(/[\t\n\f\r ]+/).filter(s):[]}function n(A,S){return A.hasOwnProperty(S)||(A[S]=!0),A}function u(A){if(!A)return[];var S=a(A);return Object.keys(S.reduce(n,{}))}function c(A){return function(S){return A&&A.indexOf(S)!==-1}}function d(A,S){for(var M in A)Object.prototype.hasOwnProperty.call(A,M)&&(S[M]=A[M])}function f(A,S){var M=A.prototype;if(!(M instanceof S)){let W=function(){};W.prototype=S.prototype,W=new W,d(M,W),A.prototype=M=W}M.constructor!=A&&(typeof A!="function"&&console.error("unknown Class:"+A),M.constructor=A)}var o={},h=o.ELEMENT_NODE=1,l=o.ATTRIBUTE_NODE=2,p=o.TEXT_NODE=3,x=o.CDATA_SECTION_NODE=4,w=o.ENTITY_REFERENCE_NODE=5,b=o.ENTITY_NODE=6,g=o.PROCESSING_INSTRUCTION_NODE=7,v=o.COMMENT_NODE=8,_=o.DOCUMENT_NODE=9,N=o.DOCUMENT_TYPE_NODE=10,y=o.DOCUMENT_FRAGMENT_NODE=11,m=o.NOTATION_NODE=12,k={},j={};k.INDEX_SIZE_ERR=(j[1]="Index size error",1),k.DOMSTRING_SIZE_ERR=(j[2]="DOMString size error",2);var E=k.HIERARCHY_REQUEST_ERR=(j[3]="Hierarchy request error",3);k.WRONG_DOCUMENT_ERR=(j[4]="Wrong document",4),k.INVALID_CHARACTER_ERR=(j[5]="Invalid character",5),k.NO_DATA_ALLOWED_ERR=(j[6]="No data allowed",6),k.NO_MODIFICATION_ALLOWED_ERR=(j[7]="No modification allowed",7);var D=k.NOT_FOUND_ERR=(j[8]="Not found",8);k.NOT_SUPPORTED_ERR=(j[9]="Not supported",9);var C=k.INUSE_ATTRIBUTE_ERR=(j[10]="Attribute in use",10);k.INVALID_STATE_ERR=(j[11]="Invalid state",11),k.SYNTAX_ERR=(j[12]="Syntax error",12),k.INVALID_MODIFICATION_ERR=(j[13]="Invalid modification",13),k.NAMESPACE_ERR=(j[14]="Invalid namespace",14),k.INVALID_ACCESS_ERR=(j[15]="Invalid access",15);function P(A,S){if(S instanceof Error)var M=S;else M=this,Error.call(this,j[A]),this.message=j[A],Error.captureStackTrace&&Error.captureStackTrace(this,P);return M.code=A,S&&(this.message=this.message+": "+S),M}P.prototype=Error.prototype,d(k,P);function $(){}$.prototype={length:0,item:function(A){return A>=0&&A<this.length?this[A]:null},toString:function(A,S){for(var M=[],W=0;W<this.length;W++)Tt(this[W],M,A,S);return M.join("")},filter:function(A){return Array.prototype.filter.call(this,A)},indexOf:function(A){return Array.prototype.indexOf.call(this,A)}};function H(A,S){this._node=A,this._refresh=S,F(this)}function F(A){var S=A._node._inc||A._node.ownerDocument._inc;if(A._inc!==S){var M=A._refresh(A._node);if(wr(A,"length",M.length),!A.$$length||M.length<A.$$length)for(var W=M.length;W in A;W++)Object.prototype.hasOwnProperty.call(A,W)&&delete A[W];d(M,A),A._inc=S}}H.prototype.item=function(A){return F(this),this[A]||null},f(H,$);function B(){}function L(A,S){for(var M=A.length;M--;)if(A[M]===S)return M}function G(A,S,M,W){if(W?S[L(S,W)]=M:S[S.length++]=M,A){M.ownerElement=A;var ne=A.ownerDocument;ne&&(W&&oe(ne,A,W),J(ne,A,M))}}function X(A,S,M){var W=L(S,M);if(W>=0){for(var ne=S.length-1;W<ne;)S[W]=S[++W];if(S.length=ne,A){var he=A.ownerDocument;he&&(oe(he,A,M),M.ownerElement=null)}}else throw new P(D,new Error(A.tagName+"@"+M))}B.prototype={length:0,item:$.prototype.item,getNamedItem:function(A){for(var S=this.length;S--;){var M=this[S];if(M.nodeName==A)return M}},setNamedItem:function(A){var S=A.ownerElement;if(S&&S!=this._ownerElement)throw new P(C);var M=this.getNamedItem(A.nodeName);return G(this._ownerElement,this,A,M),M},setNamedItemNS:function(A){var S=A.ownerElement,M;if(S&&S!=this._ownerElement)throw new P(C);return M=this.getNamedItemNS(A.namespaceURI,A.localName),G(this._ownerElement,this,A,M),M},removeNamedItem:function(A){var S=this.getNamedItem(A);return X(this._ownerElement,this,S),S},removeNamedItemNS:function(A,S){var M=this.getNamedItemNS(A,S);return X(this._ownerElement,this,M),M},getNamedItemNS:function(A,S){for(var M=this.length;M--;){var W=this[M];if(W.localName==S&&W.namespaceURI==A)return W}return null}};function ee(){}ee.prototype={hasFeature:function(A,S){return!0},createDocument:function(A,S,M){var W=new V;if(W.implementation=this,W.childNodes=new $,W.doctype=M||null,M&&W.appendChild(M),S){var ne=W.createElementNS(A,S);W.appendChild(ne)}return W},createDocumentType:function(A,S,M){var W=new Ze;return W.name=A,W.nodeName=A,W.publicId=S||"",W.systemId=M||"",W}};function R(){}R.prototype={firstChild:null,lastChild:null,previousSibling:null,nextSibling:null,attributes:null,parentNode:null,childNodes:null,ownerDocument:null,nodeValue:null,namespaceURI:null,prefix:null,localName:null,insertBefore:function(A,S){return Ye(this,A,S)},replaceChild:function(A,S){Ye(this,A,S,me),S&&this.removeChild(S)},removeChild:function(A){return te(this,A)},appendChild:function(A){return this.insertBefore(A,null)},hasChildNodes:function(){return this.firstChild!=null},cloneNode:function(A){return ft(this.ownerDocument||this,this,A)},normalize:function(){for(var A=this.firstChild;A;){var S=A.nextSibling;S&&S.nodeType==p&&A.nodeType==p?(this.removeChild(S),A.appendData(S.data)):(A.normalize(),A=S)}},isSupported:function(A,S){return this.ownerDocument.implementation.hasFeature(A,S)},hasAttributes:function(){return this.attributes.length>0},lookupPrefix:function(A){for(var S=this;S;){var M=S._nsMap;if(M){for(var W in M)if(Object.prototype.hasOwnProperty.call(M,W)&&M[W]===A)return W}S=S.nodeType==l?S.ownerDocument:S.parentNode}return null},lookupNamespaceURI:function(A){for(var S=this;S;){var M=S._nsMap;if(M&&Object.prototype.hasOwnProperty.call(M,A))return M[A];S=S.nodeType==l?S.ownerDocument:S.parentNode}return null},isDefaultNamespace:function(A){var S=this.lookupPrefix(A);return S==null}};function se(A){return A=="<"&&"<"||A==">"&&">"||A=="&"&&"&"||A=='"'&&"""||"&#"+A.charCodeAt()+";"}d(o,R),d(o,R.prototype);function I(A,S){if(S(A))return!0;if(A=A.firstChild)do if(I(A,S))return!0;while(A=A.nextSibling)}function V(){this.ownerDocument=this}function J(A,S,M){A&&A._inc++;var W=M.namespaceURI;W===i.XMLNS&&(S._nsMap[M.prefix?M.localName:""]=M.value)}function oe(A,S,M,W){A&&A._inc++;var ne=M.namespaceURI;ne===i.XMLNS&&delete S._nsMap[M.prefix?M.localName:""]}function K(A,S,M){if(A&&A._inc){A._inc++;var W=S.childNodes;if(M)W[W.length++]=M;else{for(var ne=S.firstChild,he=0;ne;)W[he++]=ne,ne=ne.nextSibling;W.length=he,delete W[W.length]}}}function te(A,S){var M=S.previousSibling,W=S.nextSibling;return M?M.nextSibling=W:A.firstChild=W,W?W.previousSibling=M:A.lastChild=M,S.parentNode=null,S.previousSibling=null,S.nextSibling=null,K(A.ownerDocument,A),S}function pe(A){return A&&(A.nodeType===R.DOCUMENT_NODE||A.nodeType===R.DOCUMENT_FRAGMENT_NODE||A.nodeType===R.ELEMENT_NODE)}function Ee(A){return A&&(ae(A)||re(A)||Z(A)||A.nodeType===R.DOCUMENT_FRAGMENT_NODE||A.nodeType===R.COMMENT_NODE||A.nodeType===R.PROCESSING_INSTRUCTION_NODE)}function Z(A){return A&&A.nodeType===R.DOCUMENT_TYPE_NODE}function ae(A){return A&&A.nodeType===R.ELEMENT_NODE}function re(A){return A&&A.nodeType===R.TEXT_NODE}function ce(A,S){var M=A.childNodes||[];if(r(M,ae)||Z(S))return!1;var W=r(M,Z);return!(S&&W&&M.indexOf(W)>M.indexOf(S))}function xe(A,S){var M=A.childNodes||[];function W(he){return ae(he)&&he!==S}if(r(M,W))return!1;var ne=r(M,Z);return!(S&&ne&&M.indexOf(ne)>M.indexOf(S))}function ge(A,S,M){if(!pe(A))throw new P(E,"Unexpected parent node type "+A.nodeType);if(M&&M.parentNode!==A)throw new P(D,"child not in parent");if(!Ee(S)||Z(S)&&A.nodeType!==R.DOCUMENT_NODE)throw new P(E,"Unexpected node type "+S.nodeType+" for parent node type "+A.nodeType)}function ke(A,S,M){var W=A.childNodes||[],ne=S.childNodes||[];if(S.nodeType===R.DOCUMENT_FRAGMENT_NODE){var he=ne.filter(ae);if(he.length>1||r(ne,re))throw new P(E,"More than one element or text in fragment");if(he.length===1&&!ce(A,M))throw new P(E,"Element in fragment can not be inserted before doctype")}if(ae(S)&&!ce(A,M))throw new P(E,"Only one element can be added and only after doctype");if(Z(S)){if(r(W,Z))throw new P(E,"Only one doctype is allowed");var Ne=r(W,ae);if(M&&W.indexOf(Ne)<W.indexOf(M))throw new P(E,"Doctype can only be inserted before an element");if(!M&&Ne)throw new P(E,"Doctype can not be appended since element is present")}}function me(A,S,M){var W=A.childNodes||[],ne=S.childNodes||[];if(S.nodeType===R.DOCUMENT_FRAGMENT_NODE){var he=ne.filter(ae);if(he.length>1||r(ne,re))throw new P(E,"More than one element or text in fragment");if(he.length===1&&!xe(A,M))throw new P(E,"Element in fragment can not be inserted before doctype")}if(ae(S)&&!xe(A,M))throw new P(E,"Only one element can be added and only after doctype");if(Z(S)){if(r(W,function(ht){return Z(ht)&&ht!==M}))throw new P(E,"Only one doctype is allowed");var Ne=r(W,ae);if(M&&W.indexOf(Ne)<W.indexOf(M))throw new P(E,"Doctype can only be inserted before an element")}}function Ye(A,S,M,W){ge(A,S,M),A.nodeType===R.DOCUMENT_NODE&&(W||ke)(A,S,M);var ne=S.parentNode;if(ne&&ne.removeChild(S),S.nodeType===y){var he=S.firstChild;if(he==null)return S;var Ne=S.lastChild}else he=Ne=S;var Ce=M?M.previousSibling:A.lastChild;he.previousSibling=Ce,Ne.nextSibling=M,Ce?Ce.nextSibling=he:A.firstChild=he,M==null?A.lastChild=Ne:M.previousSibling=Ne;do he.parentNode=A;while(he!==Ne&&(he=he.nextSibling));return K(A.ownerDocument||A,A),S.nodeType==y&&(S.firstChild=S.lastChild=null),S}function we(A,S){return S.parentNode&&S.parentNode.removeChild(S),S.parentNode=A,S.previousSibling=A.lastChild,S.nextSibling=null,S.previousSibling?S.previousSibling.nextSibling=S:A.firstChild=S,A.lastChild=S,K(A.ownerDocument,A,S),S}V.prototype={nodeName:"#document",nodeType:_,doctype:null,documentElement:null,_inc:1,insertBefore:function(A,S){if(A.nodeType==y){for(var M=A.firstChild;M;){var W=M.nextSibling;this.insertBefore(M,S),M=W}return A}return Ye(this,A,S),A.ownerDocument=this,this.documentElement===null&&A.nodeType===h&&(this.documentElement=A),A},removeChild:function(A){return this.documentElement==A&&(this.documentElement=null),te(this,A)},replaceChild:function(A,S){Ye(this,A,S,me),A.ownerDocument=this,S&&this.removeChild(S),ae(A)&&(this.documentElement=A)},importNode:function(A,S){return Gr(this,A,S)},getElementById:function(A){var S=null;return I(this.documentElement,function(M){if(M.nodeType==h&&M.getAttribute("id")==A)return S=M,!0}),S},getElementsByClassName:function(A){var S=u(A);return new H(this,function(M){var W=[];return S.length>0&&I(M.documentElement,function(ne){if(ne!==M&&ne.nodeType===h){var he=ne.getAttribute("class");if(he){var Ne=A===he;if(!Ne){var Ce=u(he);Ne=S.every(c(Ce))}Ne&&W.push(ne)}}}),W})},createElement:function(A){var S=new fe;S.ownerDocument=this,S.nodeName=A,S.tagName=A,S.localName=A,S.childNodes=new $;var M=S.attributes=new B;return M._ownerElement=S,S},createDocumentFragment:function(){var A=new Ct;return A.ownerDocument=this,A.childNodes=new $,A},createTextNode:function(A){var S=new Ve;return S.ownerDocument=this,S.appendData(A),S},createComment:function(A){var S=new St;return S.ownerDocument=this,S.appendData(A),S},createCDATASection:function(A){var S=new Jt;return S.ownerDocument=this,S.appendData(A),S},createProcessingInstruction:function(A,S){var M=new xt;return M.ownerDocument=this,M.tagName=M.nodeName=M.target=A,M.nodeValue=M.data=S,M},createAttribute:function(A){var S=new Ae;return S.ownerDocument=this,S.name=A,S.nodeName=A,S.localName=A,S.specified=!0,S},createEntityReference:function(A){var S=new Qe;return S.ownerDocument=this,S.nodeName=A,S},createElementNS:function(A,S){var M=new fe,W=S.split(":"),ne=M.attributes=new B;return M.childNodes=new $,M.ownerDocument=this,M.nodeName=S,M.tagName=S,M.namespaceURI=A,W.length==2?(M.prefix=W[0],M.localName=W[1]):M.localName=S,ne._ownerElement=M,M},createAttributeNS:function(A,S){var M=new Ae,W=S.split(":");return M.ownerDocument=this,M.nodeName=S,M.name=S,M.namespaceURI=A,M.specified=!0,W.length==2?(M.prefix=W[0],M.localName=W[1]):M.localName=S,M}},f(V,R);function fe(){this._nsMap={}}fe.prototype={nodeType:h,hasAttribute:function(A){return this.getAttributeNode(A)!=null},getAttribute:function(A){var S=this.getAttributeNode(A);return S&&S.value||""},getAttributeNode:function(A){return this.attributes.getNamedItem(A)},setAttribute:function(A,S){var M=this.ownerDocument.createAttribute(A);M.value=M.nodeValue=""+S,this.setAttributeNode(M)},removeAttribute:function(A){var S=this.getAttributeNode(A);S&&this.removeAttributeNode(S)},appendChild:function(A){return A.nodeType===y?this.insertBefore(A,null):we(this,A)},setAttributeNode:function(A){return this.attributes.setNamedItem(A)},setAttributeNodeNS:function(A){return this.attributes.setNamedItemNS(A)},removeAttributeNode:function(A){return this.attributes.removeNamedItem(A.nodeName)},removeAttributeNS:function(A,S){var M=this.getAttributeNodeNS(A,S);M&&this.removeAttributeNode(M)},hasAttributeNS:function(A,S){return this.getAttributeNodeNS(A,S)!=null},getAttributeNS:function(A,S){var M=this.getAttributeNodeNS(A,S);return M&&M.value||""},setAttributeNS:function(A,S,M){var W=this.ownerDocument.createAttributeNS(A,S);W.value=W.nodeValue=""+M,this.setAttributeNode(W)},getAttributeNodeNS:function(A,S){return this.attributes.getNamedItemNS(A,S)},getElementsByTagName:function(A){return new H(this,function(S){var M=[];return I(S,function(W){W!==S&&W.nodeType==h&&(A==="*"||W.tagName==A)&&M.push(W)}),M})},getElementsByTagNameNS:function(A,S){return new H(this,function(M){var W=[];return I(M,function(ne){ne!==M&&ne.nodeType===h&&(A==="*"||ne.namespaceURI===A)&&(S==="*"||ne.localName==S)&&W.push(ne)}),W})}},V.prototype.getElementsByTagName=fe.prototype.getElementsByTagName,V.prototype.getElementsByTagNameNS=fe.prototype.getElementsByTagNameNS,f(fe,R);function Ae(){}Ae.prototype.nodeType=l,f(Ae,R);function Pe(){}Pe.prototype={data:"",substringData:function(A,S){return this.data.substring(A,A+S)},appendData:function(A){A=this.data+A,this.nodeValue=this.data=A,this.length=A.length},insertData:function(A,S){this.replaceData(A,0,S)},appendChild:function(A){throw new Error(j[E])},deleteData:function(A,S){this.replaceData(A,S,"")},replaceData:function(A,S,M){var W=this.data.substring(0,A),ne=this.data.substring(A+S);M=W+M+ne,this.nodeValue=this.data=M,this.length=M.length}},f(Pe,R);function Ve(){}Ve.prototype={nodeName:"#text",nodeType:p,splitText:function(A){var S=this.data,M=S.substring(A);S=S.substring(0,A),this.data=this.nodeValue=S,this.length=S.length;var W=this.ownerDocument.createTextNode(M);return this.parentNode&&this.parentNode.insertBefore(W,this.nextSibling),W}},f(Ve,Pe);function St(){}St.prototype={nodeName:"#comment",nodeType:v},f(St,Pe);function Jt(){}Jt.prototype={nodeName:"#cdata-section",nodeType:x},f(Jt,Pe);function Ze(){}Ze.prototype.nodeType=N,f(Ze,R);function Yt(){}Yt.prototype.nodeType=m,f(Yt,R);function vr(){}vr.prototype.nodeType=b,f(vr,R);function Qe(){}Qe.prototype.nodeType=w,f(Qe,R);function Ct(){}Ct.prototype.nodeName="#document-fragment",Ct.prototype.nodeType=y,f(Ct,R);function xt(){}xt.prototype.nodeType=g,f(xt,R);function or(){}or.prototype.serializeToString=function(A,S,M){return Zt.call(A,S,M)},R.prototype.toString=Zt;function Zt(A,S){var M=[],W=this.nodeType==9&&this.documentElement||this,ne=W.prefix,he=W.namespaceURI;if(he&&ne==null){var ne=W.lookupPrefix(he);if(ne==null)var Ne=[{namespace:he,prefix:null}]}return Tt(this,M,A,S,Ne),M.join("")}function Dt(A,S,M){var W=A.prefix||"",ne=A.namespaceURI;if(!ne||W==="xml"&&ne===i.XML||ne===i.XMLNS)return!1;for(var he=M.length;he--;){var Ne=M[he];if(Ne.prefix===W)return Ne.namespace!==ne}return!0}function yt(A,S,M){A.push(" ",S,'="',M.replace(/[<>&"\t\n\r]/g,se),'"')}function Tt(A,S,M,W,ne){if(ne||(ne=[]),W)if(A=W(A),A){if(typeof A=="string"){S.push(A);return}}else return;switch(A.nodeType){case h:var he=A.attributes,Ne=he.length,Me=A.firstChild,Ce=A.tagName;M=i.isHTML(A.namespaceURI)||M;var ht=Ce;if(!M&&!A.prefix&&A.namespaceURI){for(var at,Xe=0;Xe<he.length;Xe++)if(he.item(Xe).name==="xmlns"){at=he.item(Xe).value;break}if(!at)for(var vt=ne.length-1;vt>=0;vt--){var wt=ne[vt];if(wt.prefix===""&&wt.namespace===A.namespaceURI){at=wt.namespace;break}}if(at!==A.namespaceURI)for(var vt=ne.length-1;vt>=0;vt--){var wt=ne[vt];if(wt.namespace===A.namespaceURI){wt.prefix&&(ht=wt.prefix+":"+Ce);break}}}S.push("<",ht);for(var _t=0;_t<Ne;_t++){var et=he.item(_t);et.prefix=="xmlns"?ne.push({prefix:et.localName,namespace:et.value}):et.nodeName=="xmlns"&&ne.push({prefix:"",namespace:et.value})}for(var _t=0;_t<Ne;_t++){var et=he.item(_t);if(Dt(et,M,ne)){var ze=et.prefix||"",Bt=et.namespaceURI;yt(S,ze?"xmlns:"+ze:"xmlns",Bt),ne.push({prefix:ze,namespace:Bt})}Tt(et,S,M,W,ne)}if(Ce===ht&&Dt(A,M,ne)){var ze=A.prefix||"",Bt=A.namespaceURI;yt(S,ze?"xmlns:"+ze:"xmlns",Bt),ne.push({prefix:ze,namespace:Bt})}if(Me||M&&!/^(?:meta|link|img|br|hr|input)$/i.test(Ce)){if(S.push(">"),M&&/^script$/i.test(Ce))for(;Me;)Me.data?S.push(Me.data):Tt(Me,S,M,W,ne.slice()),Me=Me.nextSibling;else for(;Me;)Tt(Me,S,M,W,ne.slice()),Me=Me.nextSibling;S.push("</",ht,">")}else S.push("/>");return;case _:case y:for(var Me=A.firstChild;Me;)Tt(Me,S,M,W,ne.slice()),Me=Me.nextSibling;return;case l:return yt(S,A.name,A.value);case p:return S.push(A.data.replace(/[<&>]/g,se));case x:return S.push("<![CDATA[",A.data,"]]>");case v:return S.push("<!--",A.data,"-->");case N:var Ot=A.publicId,Vt=A.systemId;if(S.push("<!DOCTYPE ",A.name),Ot)S.push(" PUBLIC ",Ot),Vt&&Vt!="."&&S.push(" ",Vt),S.push(">");else if(Vt&&Vt!=".")S.push(" SYSTEM ",Vt,">");else{var pt=A.internalSubset;pt&&S.push(" [",pt,"]"),S.push(">")}return;case g:return S.push("<?",A.target," ",A.data,"?>");case w:return S.push("&",A.nodeName,";");default:S.push("??",A.nodeName)}}function Gr(A,S,M){var W;switch(S.nodeType){case h:W=S.cloneNode(!1),W.ownerDocument=A;case y:break;case l:M=!0;break}if(W||(W=S.cloneNode(!1)),W.ownerDocument=A,W.parentNode=null,M)for(var ne=S.firstChild;ne;)W.appendChild(Gr(A,ne,M)),ne=ne.nextSibling;return W}function ft(A,S,M){var W=new S.constructor;for(var ne in S)if(Object.prototype.hasOwnProperty.call(S,ne)){var he=S[ne];typeof he!="object"&&he!=W[ne]&&(W[ne]=he)}switch(S.childNodes&&(W.childNodes=new $),W.ownerDocument=A,W.nodeType){case h:var Ne=S.attributes,Ce=W.attributes=new B,ht=Ne.length;Ce._ownerElement=W;for(var at=0;at<ht;at++)W.setAttributeNode(ft(A,Ne.item(at),!0));break;case l:M=!0}if(M)for(var Xe=S.firstChild;Xe;)W.appendChild(ft(A,Xe,M)),Xe=Xe.nextSibling;return W}function wr(A,S,M){A[S]=M}try{if(Object.defineProperty){let A=function(S){switch(S.nodeType){case h:case y:var M=[];for(S=S.firstChild;S;)S.nodeType!==7&&S.nodeType!==8&&M.push(A(S)),S=S.nextSibling;return M.join("");default:return S.nodeValue}};Object.defineProperty(H.prototype,"length",{get:function(){return F(this),this.$$length}}),Object.defineProperty(R.prototype,"textContent",{get:function(){return A(this)},set:function(S){switch(this.nodeType){case h:case y:for(;this.firstChild;)this.removeChild(this.firstChild);(S||String(S))&&this.appendChild(this.ownerDocument.createTextNode(S));break;default:this.data=S,this.value=S,this.nodeValue=S}}}),wr=function(S,M,W){S["$$"+M]=W}}}catch{}return er.DocumentType=Ze,er.DOMException=P,er.DOMImplementation=ee,er.Element=fe,er.Node=R,er.NodeList=$,er.XMLSerializer=or,er}var qa={},Bs={},yu;function fh(){return yu||(yu=1,(function(e){var r=hs().freeze;e.XML_ENTITIES=r({amp:"&",apos:"'",gt:">",lt:"<",quot:'"'}),e.HTML_ENTITIES=r({Aacute:"Á",aacute:"á",Abreve:"Ă",abreve:"ă",ac:"∾",acd:"∿",acE:"∾̳",Acirc:"Â",acirc:"â",acute:"´",Acy:"А",acy:"а",AElig:"Æ",aelig:"æ",af:"",Afr:"𝔄",afr:"𝔞",Agrave:"À",agrave:"à",alefsym:"ℵ",aleph:"ℵ",Alpha:"Α",alpha:"α",Amacr:"Ā",amacr:"ā",amalg:"⨿",AMP:"&",amp:"&",And:"⩓",and:"∧",andand:"⩕",andd:"⩜",andslope:"⩘",andv:"⩚",ang:"∠",ange:"⦤",angle:"∠",angmsd:"∡",angmsdaa:"⦨",angmsdab:"⦩",angmsdac:"⦪",angmsdad:"⦫",angmsdae:"⦬",angmsdaf:"⦭",angmsdag:"⦮",angmsdah:"⦯",angrt:"∟",angrtvb:"⊾",angrtvbd:"⦝",angsph:"∢",angst:"Å",angzarr:"⍼",Aogon:"Ą",aogon:"ą",Aopf:"𝔸",aopf:"𝕒",ap:"≈",apacir:"⩯",apE:"⩰",ape:"≊",apid:"≋",apos:"'",ApplyFunction:"",approx:"≈",approxeq:"≊",Aring:"Å",aring:"å",Ascr:"𝒜",ascr:"𝒶",Assign:"≔",ast:"*",asymp:"≈",asympeq:"≍",Atilde:"Ã",atilde:"ã",Auml:"Ä",auml:"ä",awconint:"∳",awint:"⨑",backcong:"≌",backepsilon:"϶",backprime:"‵",backsim:"∽",backsimeq:"⋍",Backslash:"∖",Barv:"⫧",barvee:"⊽",Barwed:"⌆",barwed:"⌅",barwedge:"⌅",bbrk:"⎵",bbrktbrk:"⎶",bcong:"≌",Bcy:"Б",bcy:"б",bdquo:"„",becaus:"∵",Because:"∵",because:"∵",bemptyv:"⦰",bepsi:"϶",bernou:"ℬ",Bernoullis:"ℬ",Beta:"Β",beta:"β",beth:"ℶ",between:"≬",Bfr:"𝔅",bfr:"𝔟",bigcap:"⋂",bigcirc:"◯",bigcup:"⋃",bigodot:"⨀",bigoplus:"⨁",bigotimes:"⨂",bigsqcup:"⨆",bigstar:"★",bigtriangledown:"▽",bigtriangleup:"△",biguplus:"⨄",bigvee:"⋁",bigwedge:"⋀",bkarow:"⤍",blacklozenge:"⧫",blacksquare:"▪",blacktriangle:"▴",blacktriangledown:"▾",blacktriangleleft:"◂",blacktriangleright:"▸",blank:"␣",blk12:"▒",blk14:"░",blk34:"▓",block:"█",bne:"=⃥",bnequiv:"≡⃥",bNot:"⫭",bnot:"⌐",Bopf:"𝔹",bopf:"𝕓",bot:"⊥",bottom:"⊥",bowtie:"⋈",boxbox:"⧉",boxDL:"╗",boxDl:"╖",boxdL:"╕",boxdl:"┐",boxDR:"╔",boxDr:"╓",boxdR:"╒",boxdr:"┌",boxH:"═",boxh:"─",boxHD:"╦",boxHd:"╤",boxhD:"╥",boxhd:"┬",boxHU:"╩",boxHu:"╧",boxhU:"╨",boxhu:"┴",boxminus:"⊟",boxplus:"⊞",boxtimes:"⊠",boxUL:"╝",boxUl:"╜",boxuL:"╛",boxul:"┘",boxUR:"╚",boxUr:"╙",boxuR:"╘",boxur:"└",boxV:"║",boxv:"│",boxVH:"╬",boxVh:"╫",boxvH:"╪",boxvh:"┼",boxVL:"╣",boxVl:"╢",boxvL:"╡",boxvl:"┤",boxVR:"╠",boxVr:"╟",boxvR:"╞",boxvr:"├",bprime:"‵",Breve:"˘",breve:"˘",brvbar:"¦",Bscr:"ℬ",bscr:"𝒷",bsemi:"⁏",bsim:"∽",bsime:"⋍",bsol:"\\",bsolb:"⧅",bsolhsub:"⟈",bull:"•",bullet:"•",bump:"≎",bumpE:"⪮",bumpe:"≏",Bumpeq:"≎",bumpeq:"≏",Cacute:"Ć",cacute:"ć",Cap:"⋒",cap:"∩",capand:"⩄",capbrcup:"⩉",capcap:"⩋",capcup:"⩇",capdot:"⩀",CapitalDifferentialD:"ⅅ",caps:"∩︀",caret:"⁁",caron:"ˇ",Cayleys:"ℭ",ccaps:"⩍",Ccaron:"Č",ccaron:"č",Ccedil:"Ç",ccedil:"ç",Ccirc:"Ĉ",ccirc:"ĉ",Cconint:"∰",ccups:"⩌",ccupssm:"⩐",Cdot:"Ċ",cdot:"ċ",cedil:"¸",Cedilla:"¸",cemptyv:"⦲",cent:"¢",CenterDot:"·",centerdot:"·",Cfr:"ℭ",cfr:"𝔠",CHcy:"Ч",chcy:"ч",check:"✓",checkmark:"✓",Chi:"Χ",chi:"χ",cir:"○",circ:"ˆ",circeq:"≗",circlearrowleft:"↺",circlearrowright:"↻",circledast:"⊛",circledcirc:"⊚",circleddash:"⊝",CircleDot:"⊙",circledR:"®",circledS:"Ⓢ",CircleMinus:"⊖",CirclePlus:"⊕",CircleTimes:"⊗",cirE:"⧃",cire:"≗",cirfnint:"⨐",cirmid:"⫯",cirscir:"⧂",ClockwiseContourIntegral:"∲",CloseCurlyDoubleQuote:"”",CloseCurlyQuote:"’",clubs:"♣",clubsuit:"♣",Colon:"∷",colon:":",Colone:"⩴",colone:"≔",coloneq:"≔",comma:",",commat:"@",comp:"∁",compfn:"∘",complement:"∁",complexes:"ℂ",cong:"≅",congdot:"⩭",Congruent:"≡",Conint:"∯",conint:"∮",ContourIntegral:"∮",Copf:"ℂ",copf:"𝕔",coprod:"∐",Coproduct:"∐",COPY:"©",copy:"©",copysr:"℗",CounterClockwiseContourIntegral:"∳",crarr:"↵",Cross:"⨯",cross:"✗",Cscr:"𝒞",cscr:"𝒸",csub:"⫏",csube:"⫑",csup:"⫐",csupe:"⫒",ctdot:"⋯",cudarrl:"⤸",cudarrr:"⤵",cuepr:"⋞",cuesc:"⋟",cularr:"↶",cularrp:"⤽",Cup:"⋓",cup:"∪",cupbrcap:"⩈",CupCap:"≍",cupcap:"⩆",cupcup:"⩊",cupdot:"⊍",cupor:"⩅",cups:"∪︀",curarr:"↷",curarrm:"⤼",curlyeqprec:"⋞",curlyeqsucc:"⋟",curlyvee:"⋎",curlywedge:"⋏",curren:"¤",curvearrowleft:"↶",curvearrowright:"↷",cuvee:"⋎",cuwed:"⋏",cwconint:"∲",cwint:"∱",cylcty:"⌭",Dagger:"‡",dagger:"†",daleth:"ℸ",Darr:"↡",dArr:"⇓",darr:"↓",dash:"‐",Dashv:"⫤",dashv:"⊣",dbkarow:"⤏",dblac:"˝",Dcaron:"Ď",dcaron:"ď",Dcy:"Д",dcy:"д",DD:"ⅅ",dd:"ⅆ",ddagger:"‡",ddarr:"⇊",DDotrahd:"⤑",ddotseq:"⩷",deg:"°",Del:"∇",Delta:"Δ",delta:"δ",demptyv:"⦱",dfisht:"⥿",Dfr:"𝔇",dfr:"𝔡",dHar:"⥥",dharl:"⇃",dharr:"⇂",DiacriticalAcute:"´",DiacriticalDot:"˙",DiacriticalDoubleAcute:"˝",DiacriticalGrave:"`",DiacriticalTilde:"˜",diam:"⋄",Diamond:"⋄",diamond:"⋄",diamondsuit:"♦",diams:"♦",die:"¨",DifferentialD:"ⅆ",digamma:"ϝ",disin:"⋲",div:"÷",divide:"÷",divideontimes:"⋇",divonx:"⋇",DJcy:"Ђ",djcy:"ђ",dlcorn:"⌞",dlcrop:"⌍",dollar:"$",Dopf:"𝔻",dopf:"𝕕",Dot:"¨",dot:"˙",DotDot:"⃜",doteq:"≐",doteqdot:"≑",DotEqual:"≐",dotminus:"∸",dotplus:"∔",dotsquare:"⊡",doublebarwedge:"⌆",DoubleContourIntegral:"∯",DoubleDot:"¨",DoubleDownArrow:"⇓",DoubleLeftArrow:"⇐",DoubleLeftRightArrow:"⇔",DoubleLeftTee:"⫤",DoubleLongLeftArrow:"⟸",DoubleLongLeftRightArrow:"⟺",DoubleLongRightArrow:"⟹",DoubleRightArrow:"⇒",DoubleRightTee:"⊨",DoubleUpArrow:"⇑",DoubleUpDownArrow:"⇕",DoubleVerticalBar:"∥",DownArrow:"↓",Downarrow:"⇓",downarrow:"↓",DownArrowBar:"⤓",DownArrowUpArrow:"⇵",DownBreve:"̑",downdownarrows:"⇊",downharpoonleft:"⇃",downharpoonright:"⇂",DownLeftRightVector:"⥐",DownLeftTeeVector:"⥞",DownLeftVector:"↽",DownLeftVectorBar:"⥖",DownRightTeeVector:"⥟",DownRightVector:"⇁",DownRightVectorBar:"⥗",DownTee:"⊤",DownTeeArrow:"↧",drbkarow:"⤐",drcorn:"⌟",drcrop:"⌌",Dscr:"𝒟",dscr:"𝒹",DScy:"Ѕ",dscy:"ѕ",dsol:"⧶",Dstrok:"Đ",dstrok:"đ",dtdot:"⋱",dtri:"▿",dtrif:"▾",duarr:"⇵",duhar:"⥯",dwangle:"⦦",DZcy:"Џ",dzcy:"џ",dzigrarr:"⟿",Eacute:"É",eacute:"é",easter:"⩮",Ecaron:"Ě",ecaron:"ě",ecir:"≖",Ecirc:"Ê",ecirc:"ê",ecolon:"≕",Ecy:"Э",ecy:"э",eDDot:"⩷",Edot:"Ė",eDot:"≑",edot:"ė",ee:"ⅇ",efDot:"≒",Efr:"𝔈",efr:"𝔢",eg:"⪚",Egrave:"È",egrave:"è",egs:"⪖",egsdot:"⪘",el:"⪙",Element:"∈",elinters:"⏧",ell:"ℓ",els:"⪕",elsdot:"⪗",Emacr:"Ē",emacr:"ē",empty:"∅",emptyset:"∅",EmptySmallSquare:"◻",emptyv:"∅",EmptyVerySmallSquare:"▫",emsp:" ",emsp13:" ",emsp14:" ",ENG:"Ŋ",eng:"ŋ",ensp:" ",Eogon:"Ę",eogon:"ę",Eopf:"𝔼",eopf:"𝕖",epar:"⋕",eparsl:"⧣",eplus:"⩱",epsi:"ε",Epsilon:"Ε",epsilon:"ε",epsiv:"ϵ",eqcirc:"≖",eqcolon:"≕",eqsim:"≂",eqslantgtr:"⪖",eqslantless:"⪕",Equal:"⩵",equals:"=",EqualTilde:"≂",equest:"≟",Equilibrium:"⇌",equiv:"≡",equivDD:"⩸",eqvparsl:"⧥",erarr:"⥱",erDot:"≓",Escr:"ℰ",escr:"ℯ",esdot:"≐",Esim:"⩳",esim:"≂",Eta:"Η",eta:"η",ETH:"Ð",eth:"ð",Euml:"Ë",euml:"ë",euro:"€",excl:"!",exist:"∃",Exists:"∃",expectation:"ℰ",ExponentialE:"ⅇ",exponentiale:"ⅇ",fallingdotseq:"≒",Fcy:"Ф",fcy:"ф",female:"♀",ffilig:"ffi",fflig:"ff",ffllig:"ffl",Ffr:"𝔉",ffr:"𝔣",filig:"fi",FilledSmallSquare:"◼",FilledVerySmallSquare:"▪",fjlig:"fj",flat:"♭",fllig:"fl",fltns:"▱",fnof:"ƒ",Fopf:"𝔽",fopf:"𝕗",ForAll:"∀",forall:"∀",fork:"⋔",forkv:"⫙",Fouriertrf:"ℱ",fpartint:"⨍",frac12:"½",frac13:"⅓",frac14:"¼",frac15:"⅕",frac16:"⅙",frac18:"⅛",frac23:"⅔",frac25:"⅖",frac34:"¾",frac35:"⅗",frac38:"⅜",frac45:"⅘",frac56:"⅚",frac58:"⅝",frac78:"⅞",frasl:"⁄",frown:"⌢",Fscr:"ℱ",fscr:"𝒻",gacute:"ǵ",Gamma:"Γ",gamma:"γ",Gammad:"Ϝ",gammad:"ϝ",gap:"⪆",Gbreve:"Ğ",gbreve:"ğ",Gcedil:"Ģ",Gcirc:"Ĝ",gcirc:"ĝ",Gcy:"Г",gcy:"г",Gdot:"Ġ",gdot:"ġ",gE:"≧",ge:"≥",gEl:"⪌",gel:"⋛",geq:"≥",geqq:"≧",geqslant:"⩾",ges:"⩾",gescc:"⪩",gesdot:"⪀",gesdoto:"⪂",gesdotol:"⪄",gesl:"⋛︀",gesles:"⪔",Gfr:"𝔊",gfr:"𝔤",Gg:"⋙",gg:"≫",ggg:"⋙",gimel:"ℷ",GJcy:"Ѓ",gjcy:"ѓ",gl:"≷",gla:"⪥",glE:"⪒",glj:"⪤",gnap:"⪊",gnapprox:"⪊",gnE:"≩",gne:"⪈",gneq:"⪈",gneqq:"≩",gnsim:"⋧",Gopf:"𝔾",gopf:"𝕘",grave:"`",GreaterEqual:"≥",GreaterEqualLess:"⋛",GreaterFullEqual:"≧",GreaterGreater:"⪢",GreaterLess:"≷",GreaterSlantEqual:"⩾",GreaterTilde:"≳",Gscr:"𝒢",gscr:"ℊ",gsim:"≳",gsime:"⪎",gsiml:"⪐",Gt:"≫",GT:">",gt:">",gtcc:"⪧",gtcir:"⩺",gtdot:"⋗",gtlPar:"⦕",gtquest:"⩼",gtrapprox:"⪆",gtrarr:"⥸",gtrdot:"⋗",gtreqless:"⋛",gtreqqless:"⪌",gtrless:"≷",gtrsim:"≳",gvertneqq:"≩︀",gvnE:"≩︀",Hacek:"ˇ",hairsp:" ",half:"½",hamilt:"ℋ",HARDcy:"Ъ",hardcy:"ъ",hArr:"⇔",harr:"↔",harrcir:"⥈",harrw:"↭",Hat:"^",hbar:"ℏ",Hcirc:"Ĥ",hcirc:"ĥ",hearts:"♥",heartsuit:"♥",hellip:"…",hercon:"⊹",Hfr:"ℌ",hfr:"𝔥",HilbertSpace:"ℋ",hksearow:"⤥",hkswarow:"⤦",hoarr:"⇿",homtht:"∻",hookleftarrow:"↩",hookrightarrow:"↪",Hopf:"ℍ",hopf:"𝕙",horbar:"―",HorizontalLine:"─",Hscr:"ℋ",hscr:"𝒽",hslash:"ℏ",Hstrok:"Ħ",hstrok:"ħ",HumpDownHump:"≎",HumpEqual:"≏",hybull:"⁃",hyphen:"‐",Iacute:"Í",iacute:"í",ic:"",Icirc:"Î",icirc:"î",Icy:"И",icy:"и",Idot:"İ",IEcy:"Е",iecy:"е",iexcl:"¡",iff:"⇔",Ifr:"ℑ",ifr:"𝔦",Igrave:"Ì",igrave:"ì",ii:"ⅈ",iiiint:"⨌",iiint:"∭",iinfin:"⧜",iiota:"℩",IJlig:"IJ",ijlig:"ij",Im:"ℑ",Imacr:"Ī",imacr:"ī",image:"ℑ",ImaginaryI:"ⅈ",imagline:"ℐ",imagpart:"ℑ",imath:"ı",imof:"⊷",imped:"Ƶ",Implies:"⇒",in:"∈",incare:"℅",infin:"∞",infintie:"⧝",inodot:"ı",Int:"∬",int:"∫",intcal:"⊺",integers:"ℤ",Integral:"∫",intercal:"⊺",Intersection:"⋂",intlarhk:"⨗",intprod:"⨼",InvisibleComma:"",InvisibleTimes:"",IOcy:"Ё",iocy:"ё",Iogon:"Į",iogon:"į",Iopf:"𝕀",iopf:"𝕚",Iota:"Ι",iota:"ι",iprod:"⨼",iquest:"¿",Iscr:"ℐ",iscr:"𝒾",isin:"∈",isindot:"⋵",isinE:"⋹",isins:"⋴",isinsv:"⋳",isinv:"∈",it:"",Itilde:"Ĩ",itilde:"ĩ",Iukcy:"І",iukcy:"і",Iuml:"Ï",iuml:"ï",Jcirc:"Ĵ",jcirc:"ĵ",Jcy:"Й",jcy:"й",Jfr:"𝔍",jfr:"𝔧",jmath:"ȷ",Jopf:"𝕁",jopf:"𝕛",Jscr:"𝒥",jscr:"𝒿",Jsercy:"Ј",jsercy:"ј",Jukcy:"Є",jukcy:"є",Kappa:"Κ",kappa:"κ",kappav:"ϰ",Kcedil:"Ķ",kcedil:"ķ",Kcy:"К",kcy:"к",Kfr:"𝔎",kfr:"𝔨",kgreen:"ĸ",KHcy:"Х",khcy:"х",KJcy:"Ќ",kjcy:"ќ",Kopf:"𝕂",kopf:"𝕜",Kscr:"𝒦",kscr:"𝓀",lAarr:"⇚",Lacute:"Ĺ",lacute:"ĺ",laemptyv:"⦴",lagran:"ℒ",Lambda:"Λ",lambda:"λ",Lang:"⟪",lang:"⟨",langd:"⦑",langle:"⟨",lap:"⪅",Laplacetrf:"ℒ",laquo:"«",Larr:"↞",lArr:"⇐",larr:"←",larrb:"⇤",larrbfs:"⤟",larrfs:"⤝",larrhk:"↩",larrlp:"↫",larrpl:"⤹",larrsim:"⥳",larrtl:"↢",lat:"⪫",lAtail:"⤛",latail:"⤙",late:"⪭",lates:"⪭︀",lBarr:"⤎",lbarr:"⤌",lbbrk:"❲",lbrace:"{",lbrack:"[",lbrke:"⦋",lbrksld:"⦏",lbrkslu:"⦍",Lcaron:"Ľ",lcaron:"ľ",Lcedil:"Ļ",lcedil:"ļ",lceil:"⌈",lcub:"{",Lcy:"Л",lcy:"л",ldca:"⤶",ldquo:"“",ldquor:"„",ldrdhar:"⥧",ldrushar:"⥋",ldsh:"↲",lE:"≦",le:"≤",LeftAngleBracket:"⟨",LeftArrow:"←",Leftarrow:"⇐",leftarrow:"←",LeftArrowBar:"⇤",LeftArrowRightArrow:"⇆",leftarrowtail:"↢",LeftCeiling:"⌈",LeftDoubleBracket:"⟦",LeftDownTeeVector:"⥡",LeftDownVector:"⇃",LeftDownVectorBar:"⥙",LeftFloor:"⌊",leftharpoondown:"↽",leftharpoonup:"↼",leftleftarrows:"⇇",LeftRightArrow:"↔",Leftrightarrow:"⇔",leftrightarrow:"↔",leftrightarrows:"⇆",leftrightharpoons:"⇋",leftrightsquigarrow:"↭",LeftRightVector:"⥎",LeftTee:"⊣",LeftTeeArrow:"↤",LeftTeeVector:"⥚",leftthreetimes:"⋋",LeftTriangle:"⊲",LeftTriangleBar:"⧏",LeftTriangleEqual:"⊴",LeftUpDownVector:"⥑",LeftUpTeeVector:"⥠",LeftUpVector:"↿",LeftUpVectorBar:"⥘",LeftVector:"↼",LeftVectorBar:"⥒",lEg:"⪋",leg:"⋚",leq:"≤",leqq:"≦",leqslant:"⩽",les:"⩽",lescc:"⪨",lesdot:"⩿",lesdoto:"⪁",lesdotor:"⪃",lesg:"⋚︀",lesges:"⪓",lessapprox:"⪅",lessdot:"⋖",lesseqgtr:"⋚",lesseqqgtr:"⪋",LessEqualGreater:"⋚",LessFullEqual:"≦",LessGreater:"≶",lessgtr:"≶",LessLess:"⪡",lesssim:"≲",LessSlantEqual:"⩽",LessTilde:"≲",lfisht:"⥼",lfloor:"⌊",Lfr:"𝔏",lfr:"𝔩",lg:"≶",lgE:"⪑",lHar:"⥢",lhard:"↽",lharu:"↼",lharul:"⥪",lhblk:"▄",LJcy:"Љ",ljcy:"љ",Ll:"⋘",ll:"≪",llarr:"⇇",llcorner:"⌞",Lleftarrow:"⇚",llhard:"⥫",lltri:"◺",Lmidot:"Ŀ",lmidot:"ŀ",lmoust:"⎰",lmoustache:"⎰",lnap:"⪉",lnapprox:"⪉",lnE:"≨",lne:"⪇",lneq:"⪇",lneqq:"≨",lnsim:"⋦",loang:"⟬",loarr:"⇽",lobrk:"⟦",LongLeftArrow:"⟵",Longleftarrow:"⟸",longleftarrow:"⟵",LongLeftRightArrow:"⟷",Longleftrightarrow:"⟺",longleftrightarrow:"⟷",longmapsto:"⟼",LongRightArrow:"⟶",Longrightarrow:"⟹",longrightarrow:"⟶",looparrowleft:"↫",looparrowright:"↬",lopar:"⦅",Lopf:"𝕃",lopf:"𝕝",loplus:"⨭",lotimes:"⨴",lowast:"∗",lowbar:"_",LowerLeftArrow:"↙",LowerRightArrow:"↘",loz:"◊",lozenge:"◊",lozf:"⧫",lpar:"(",lparlt:"⦓",lrarr:"⇆",lrcorner:"⌟",lrhar:"⇋",lrhard:"⥭",lrm:"",lrtri:"⊿",lsaquo:"‹",Lscr:"ℒ",lscr:"𝓁",Lsh:"↰",lsh:"↰",lsim:"≲",lsime:"⪍",lsimg:"⪏",lsqb:"[",lsquo:"‘",lsquor:"‚",Lstrok:"Ł",lstrok:"ł",Lt:"≪",LT:"<",lt:"<",ltcc:"⪦",ltcir:"⩹",ltdot:"⋖",lthree:"⋋",ltimes:"⋉",ltlarr:"⥶",ltquest:"⩻",ltri:"◃",ltrie:"⊴",ltrif:"◂",ltrPar:"⦖",lurdshar:"⥊",luruhar:"⥦",lvertneqq:"≨︀",lvnE:"≨︀",macr:"¯",male:"♂",malt:"✠",maltese:"✠",Map:"⤅",map:"↦",mapsto:"↦",mapstodown:"↧",mapstoleft:"↤",mapstoup:"↥",marker:"▮",mcomma:"⨩",Mcy:"М",mcy:"м",mdash:"—",mDDot:"∺",measuredangle:"∡",MediumSpace:" ",Mellintrf:"ℳ",Mfr:"𝔐",mfr:"𝔪",mho:"℧",micro:"µ",mid:"∣",midast:"*",midcir:"⫰",middot:"·",minus:"−",minusb:"⊟",minusd:"∸",minusdu:"⨪",MinusPlus:"∓",mlcp:"⫛",mldr:"…",mnplus:"∓",models:"⊧",Mopf:"𝕄",mopf:"𝕞",mp:"∓",Mscr:"ℳ",mscr:"𝓂",mstpos:"∾",Mu:"Μ",mu:"μ",multimap:"⊸",mumap:"⊸",nabla:"∇",Nacute:"Ń",nacute:"ń",nang:"∠⃒",nap:"≉",napE:"⩰̸",napid:"≋̸",napos:"ʼn",napprox:"≉",natur:"♮",natural:"♮",naturals:"ℕ",nbsp:" ",nbump:"≎̸",nbumpe:"≏̸",ncap:"⩃",Ncaron:"Ň",ncaron:"ň",Ncedil:"Ņ",ncedil:"ņ",ncong:"≇",ncongdot:"⩭̸",ncup:"⩂",Ncy:"Н",ncy:"н",ndash:"–",ne:"≠",nearhk:"⤤",neArr:"⇗",nearr:"↗",nearrow:"↗",nedot:"≐̸",NegativeMediumSpace:"",NegativeThickSpace:"",NegativeThinSpace:"",NegativeVeryThinSpace:"",nequiv:"≢",nesear:"⤨",nesim:"≂̸",NestedGreaterGreater:"≫",NestedLessLess:"≪",NewLine:`
|
|
125
|
+
`,nexist:"∄",nexists:"∄",Nfr:"𝔑",nfr:"𝔫",ngE:"≧̸",nge:"≱",ngeq:"≱",ngeqq:"≧̸",ngeqslant:"⩾̸",nges:"⩾̸",nGg:"⋙̸",ngsim:"≵",nGt:"≫⃒",ngt:"≯",ngtr:"≯",nGtv:"≫̸",nhArr:"⇎",nharr:"↮",nhpar:"⫲",ni:"∋",nis:"⋼",nisd:"⋺",niv:"∋",NJcy:"Њ",njcy:"њ",nlArr:"⇍",nlarr:"↚",nldr:"‥",nlE:"≦̸",nle:"≰",nLeftarrow:"⇍",nleftarrow:"↚",nLeftrightarrow:"⇎",nleftrightarrow:"↮",nleq:"≰",nleqq:"≦̸",nleqslant:"⩽̸",nles:"⩽̸",nless:"≮",nLl:"⋘̸",nlsim:"≴",nLt:"≪⃒",nlt:"≮",nltri:"⋪",nltrie:"⋬",nLtv:"≪̸",nmid:"∤",NoBreak:"",NonBreakingSpace:" ",Nopf:"ℕ",nopf:"𝕟",Not:"⫬",not:"¬",NotCongruent:"≢",NotCupCap:"≭",NotDoubleVerticalBar:"∦",NotElement:"∉",NotEqual:"≠",NotEqualTilde:"≂̸",NotExists:"∄",NotGreater:"≯",NotGreaterEqual:"≱",NotGreaterFullEqual:"≧̸",NotGreaterGreater:"≫̸",NotGreaterLess:"≹",NotGreaterSlantEqual:"⩾̸",NotGreaterTilde:"≵",NotHumpDownHump:"≎̸",NotHumpEqual:"≏̸",notin:"∉",notindot:"⋵̸",notinE:"⋹̸",notinva:"∉",notinvb:"⋷",notinvc:"⋶",NotLeftTriangle:"⋪",NotLeftTriangleBar:"⧏̸",NotLeftTriangleEqual:"⋬",NotLess:"≮",NotLessEqual:"≰",NotLessGreater:"≸",NotLessLess:"≪̸",NotLessSlantEqual:"⩽̸",NotLessTilde:"≴",NotNestedGreaterGreater:"⪢̸",NotNestedLessLess:"⪡̸",notni:"∌",notniva:"∌",notnivb:"⋾",notnivc:"⋽",NotPrecedes:"⊀",NotPrecedesEqual:"⪯̸",NotPrecedesSlantEqual:"⋠",NotReverseElement:"∌",NotRightTriangle:"⋫",NotRightTriangleBar:"⧐̸",NotRightTriangleEqual:"⋭",NotSquareSubset:"⊏̸",NotSquareSubsetEqual:"⋢",NotSquareSuperset:"⊐̸",NotSquareSupersetEqual:"⋣",NotSubset:"⊂⃒",NotSubsetEqual:"⊈",NotSucceeds:"⊁",NotSucceedsEqual:"⪰̸",NotSucceedsSlantEqual:"⋡",NotSucceedsTilde:"≿̸",NotSuperset:"⊃⃒",NotSupersetEqual:"⊉",NotTilde:"≁",NotTildeEqual:"≄",NotTildeFullEqual:"≇",NotTildeTilde:"≉",NotVerticalBar:"∤",npar:"∦",nparallel:"∦",nparsl:"⫽⃥",npart:"∂̸",npolint:"⨔",npr:"⊀",nprcue:"⋠",npre:"⪯̸",nprec:"⊀",npreceq:"⪯̸",nrArr:"⇏",nrarr:"↛",nrarrc:"⤳̸",nrarrw:"↝̸",nRightarrow:"⇏",nrightarrow:"↛",nrtri:"⋫",nrtrie:"⋭",nsc:"⊁",nsccue:"⋡",nsce:"⪰̸",Nscr:"𝒩",nscr:"𝓃",nshortmid:"∤",nshortparallel:"∦",nsim:"≁",nsime:"≄",nsimeq:"≄",nsmid:"∤",nspar:"∦",nsqsube:"⋢",nsqsupe:"⋣",nsub:"⊄",nsubE:"⫅̸",nsube:"⊈",nsubset:"⊂⃒",nsubseteq:"⊈",nsubseteqq:"⫅̸",nsucc:"⊁",nsucceq:"⪰̸",nsup:"⊅",nsupE:"⫆̸",nsupe:"⊉",nsupset:"⊃⃒",nsupseteq:"⊉",nsupseteqq:"⫆̸",ntgl:"≹",Ntilde:"Ñ",ntilde:"ñ",ntlg:"≸",ntriangleleft:"⋪",ntrianglelefteq:"⋬",ntriangleright:"⋫",ntrianglerighteq:"⋭",Nu:"Ν",nu:"ν",num:"#",numero:"№",numsp:" ",nvap:"≍⃒",nVDash:"⊯",nVdash:"⊮",nvDash:"⊭",nvdash:"⊬",nvge:"≥⃒",nvgt:">⃒",nvHarr:"⤄",nvinfin:"⧞",nvlArr:"⤂",nvle:"≤⃒",nvlt:"<⃒",nvltrie:"⊴⃒",nvrArr:"⤃",nvrtrie:"⊵⃒",nvsim:"∼⃒",nwarhk:"⤣",nwArr:"⇖",nwarr:"↖",nwarrow:"↖",nwnear:"⤧",Oacute:"Ó",oacute:"ó",oast:"⊛",ocir:"⊚",Ocirc:"Ô",ocirc:"ô",Ocy:"О",ocy:"о",odash:"⊝",Odblac:"Ő",odblac:"ő",odiv:"⨸",odot:"⊙",odsold:"⦼",OElig:"Œ",oelig:"œ",ofcir:"⦿",Ofr:"𝔒",ofr:"𝔬",ogon:"˛",Ograve:"Ò",ograve:"ò",ogt:"⧁",ohbar:"⦵",ohm:"Ω",oint:"∮",olarr:"↺",olcir:"⦾",olcross:"⦻",oline:"‾",olt:"⧀",Omacr:"Ō",omacr:"ō",Omega:"Ω",omega:"ω",Omicron:"Ο",omicron:"ο",omid:"⦶",ominus:"⊖",Oopf:"𝕆",oopf:"𝕠",opar:"⦷",OpenCurlyDoubleQuote:"“",OpenCurlyQuote:"‘",operp:"⦹",oplus:"⊕",Or:"⩔",or:"∨",orarr:"↻",ord:"⩝",order:"ℴ",orderof:"ℴ",ordf:"ª",ordm:"º",origof:"⊶",oror:"⩖",orslope:"⩗",orv:"⩛",oS:"Ⓢ",Oscr:"𝒪",oscr:"ℴ",Oslash:"Ø",oslash:"ø",osol:"⊘",Otilde:"Õ",otilde:"õ",Otimes:"⨷",otimes:"⊗",otimesas:"⨶",Ouml:"Ö",ouml:"ö",ovbar:"⌽",OverBar:"‾",OverBrace:"⏞",OverBracket:"⎴",OverParenthesis:"⏜",par:"∥",para:"¶",parallel:"∥",parsim:"⫳",parsl:"⫽",part:"∂",PartialD:"∂",Pcy:"П",pcy:"п",percnt:"%",period:".",permil:"‰",perp:"⊥",pertenk:"‱",Pfr:"𝔓",pfr:"𝔭",Phi:"Φ",phi:"φ",phiv:"ϕ",phmmat:"ℳ",phone:"☎",Pi:"Π",pi:"π",pitchfork:"⋔",piv:"ϖ",planck:"ℏ",planckh:"ℎ",plankv:"ℏ",plus:"+",plusacir:"⨣",plusb:"⊞",pluscir:"⨢",plusdo:"∔",plusdu:"⨥",pluse:"⩲",PlusMinus:"±",plusmn:"±",plussim:"⨦",plustwo:"⨧",pm:"±",Poincareplane:"ℌ",pointint:"⨕",Popf:"ℙ",popf:"𝕡",pound:"£",Pr:"⪻",pr:"≺",prap:"⪷",prcue:"≼",prE:"⪳",pre:"⪯",prec:"≺",precapprox:"⪷",preccurlyeq:"≼",Precedes:"≺",PrecedesEqual:"⪯",PrecedesSlantEqual:"≼",PrecedesTilde:"≾",preceq:"⪯",precnapprox:"⪹",precneqq:"⪵",precnsim:"⋨",precsim:"≾",Prime:"″",prime:"′",primes:"ℙ",prnap:"⪹",prnE:"⪵",prnsim:"⋨",prod:"∏",Product:"∏",profalar:"⌮",profline:"⌒",profsurf:"⌓",prop:"∝",Proportion:"∷",Proportional:"∝",propto:"∝",prsim:"≾",prurel:"⊰",Pscr:"𝒫",pscr:"𝓅",Psi:"Ψ",psi:"ψ",puncsp:" ",Qfr:"𝔔",qfr:"𝔮",qint:"⨌",Qopf:"ℚ",qopf:"𝕢",qprime:"⁗",Qscr:"𝒬",qscr:"𝓆",quaternions:"ℍ",quatint:"⨖",quest:"?",questeq:"≟",QUOT:'"',quot:'"',rAarr:"⇛",race:"∽̱",Racute:"Ŕ",racute:"ŕ",radic:"√",raemptyv:"⦳",Rang:"⟫",rang:"⟩",rangd:"⦒",range:"⦥",rangle:"⟩",raquo:"»",Rarr:"↠",rArr:"⇒",rarr:"→",rarrap:"⥵",rarrb:"⇥",rarrbfs:"⤠",rarrc:"⤳",rarrfs:"⤞",rarrhk:"↪",rarrlp:"↬",rarrpl:"⥅",rarrsim:"⥴",Rarrtl:"⤖",rarrtl:"↣",rarrw:"↝",rAtail:"⤜",ratail:"⤚",ratio:"∶",rationals:"ℚ",RBarr:"⤐",rBarr:"⤏",rbarr:"⤍",rbbrk:"❳",rbrace:"}",rbrack:"]",rbrke:"⦌",rbrksld:"⦎",rbrkslu:"⦐",Rcaron:"Ř",rcaron:"ř",Rcedil:"Ŗ",rcedil:"ŗ",rceil:"⌉",rcub:"}",Rcy:"Р",rcy:"р",rdca:"⤷",rdldhar:"⥩",rdquo:"”",rdquor:"”",rdsh:"↳",Re:"ℜ",real:"ℜ",realine:"ℛ",realpart:"ℜ",reals:"ℝ",rect:"▭",REG:"®",reg:"®",ReverseElement:"∋",ReverseEquilibrium:"⇋",ReverseUpEquilibrium:"⥯",rfisht:"⥽",rfloor:"⌋",Rfr:"ℜ",rfr:"𝔯",rHar:"⥤",rhard:"⇁",rharu:"⇀",rharul:"⥬",Rho:"Ρ",rho:"ρ",rhov:"ϱ",RightAngleBracket:"⟩",RightArrow:"→",Rightarrow:"⇒",rightarrow:"→",RightArrowBar:"⇥",RightArrowLeftArrow:"⇄",rightarrowtail:"↣",RightCeiling:"⌉",RightDoubleBracket:"⟧",RightDownTeeVector:"⥝",RightDownVector:"⇂",RightDownVectorBar:"⥕",RightFloor:"⌋",rightharpoondown:"⇁",rightharpoonup:"⇀",rightleftarrows:"⇄",rightleftharpoons:"⇌",rightrightarrows:"⇉",rightsquigarrow:"↝",RightTee:"⊢",RightTeeArrow:"↦",RightTeeVector:"⥛",rightthreetimes:"⋌",RightTriangle:"⊳",RightTriangleBar:"⧐",RightTriangleEqual:"⊵",RightUpDownVector:"⥏",RightUpTeeVector:"⥜",RightUpVector:"↾",RightUpVectorBar:"⥔",RightVector:"⇀",RightVectorBar:"⥓",ring:"˚",risingdotseq:"≓",rlarr:"⇄",rlhar:"⇌",rlm:"",rmoust:"⎱",rmoustache:"⎱",rnmid:"⫮",roang:"⟭",roarr:"⇾",robrk:"⟧",ropar:"⦆",Ropf:"ℝ",ropf:"𝕣",roplus:"⨮",rotimes:"⨵",RoundImplies:"⥰",rpar:")",rpargt:"⦔",rppolint:"⨒",rrarr:"⇉",Rrightarrow:"⇛",rsaquo:"›",Rscr:"ℛ",rscr:"𝓇",Rsh:"↱",rsh:"↱",rsqb:"]",rsquo:"’",rsquor:"’",rthree:"⋌",rtimes:"⋊",rtri:"▹",rtrie:"⊵",rtrif:"▸",rtriltri:"⧎",RuleDelayed:"⧴",ruluhar:"⥨",rx:"℞",Sacute:"Ś",sacute:"ś",sbquo:"‚",Sc:"⪼",sc:"≻",scap:"⪸",Scaron:"Š",scaron:"š",sccue:"≽",scE:"⪴",sce:"⪰",Scedil:"Ş",scedil:"ş",Scirc:"Ŝ",scirc:"ŝ",scnap:"⪺",scnE:"⪶",scnsim:"⋩",scpolint:"⨓",scsim:"≿",Scy:"С",scy:"с",sdot:"⋅",sdotb:"⊡",sdote:"⩦",searhk:"⤥",seArr:"⇘",searr:"↘",searrow:"↘",sect:"§",semi:";",seswar:"⤩",setminus:"∖",setmn:"∖",sext:"✶",Sfr:"𝔖",sfr:"𝔰",sfrown:"⌢",sharp:"♯",SHCHcy:"Щ",shchcy:"щ",SHcy:"Ш",shcy:"ш",ShortDownArrow:"↓",ShortLeftArrow:"←",shortmid:"∣",shortparallel:"∥",ShortRightArrow:"→",ShortUpArrow:"↑",shy:"",Sigma:"Σ",sigma:"σ",sigmaf:"ς",sigmav:"ς",sim:"∼",simdot:"⩪",sime:"≃",simeq:"≃",simg:"⪞",simgE:"⪠",siml:"⪝",simlE:"⪟",simne:"≆",simplus:"⨤",simrarr:"⥲",slarr:"←",SmallCircle:"∘",smallsetminus:"∖",smashp:"⨳",smeparsl:"⧤",smid:"∣",smile:"⌣",smt:"⪪",smte:"⪬",smtes:"⪬︀",SOFTcy:"Ь",softcy:"ь",sol:"/",solb:"⧄",solbar:"⌿",Sopf:"𝕊",sopf:"𝕤",spades:"♠",spadesuit:"♠",spar:"∥",sqcap:"⊓",sqcaps:"⊓︀",sqcup:"⊔",sqcups:"⊔︀",Sqrt:"√",sqsub:"⊏",sqsube:"⊑",sqsubset:"⊏",sqsubseteq:"⊑",sqsup:"⊐",sqsupe:"⊒",sqsupset:"⊐",sqsupseteq:"⊒",squ:"□",Square:"□",square:"□",SquareIntersection:"⊓",SquareSubset:"⊏",SquareSubsetEqual:"⊑",SquareSuperset:"⊐",SquareSupersetEqual:"⊒",SquareUnion:"⊔",squarf:"▪",squf:"▪",srarr:"→",Sscr:"𝒮",sscr:"𝓈",ssetmn:"∖",ssmile:"⌣",sstarf:"⋆",Star:"⋆",star:"☆",starf:"★",straightepsilon:"ϵ",straightphi:"ϕ",strns:"¯",Sub:"⋐",sub:"⊂",subdot:"⪽",subE:"⫅",sube:"⊆",subedot:"⫃",submult:"⫁",subnE:"⫋",subne:"⊊",subplus:"⪿",subrarr:"⥹",Subset:"⋐",subset:"⊂",subseteq:"⊆",subseteqq:"⫅",SubsetEqual:"⊆",subsetneq:"⊊",subsetneqq:"⫋",subsim:"⫇",subsub:"⫕",subsup:"⫓",succ:"≻",succapprox:"⪸",succcurlyeq:"≽",Succeeds:"≻",SucceedsEqual:"⪰",SucceedsSlantEqual:"≽",SucceedsTilde:"≿",succeq:"⪰",succnapprox:"⪺",succneqq:"⪶",succnsim:"⋩",succsim:"≿",SuchThat:"∋",Sum:"∑",sum:"∑",sung:"♪",Sup:"⋑",sup:"⊃",sup1:"¹",sup2:"²",sup3:"³",supdot:"⪾",supdsub:"⫘",supE:"⫆",supe:"⊇",supedot:"⫄",Superset:"⊃",SupersetEqual:"⊇",suphsol:"⟉",suphsub:"⫗",suplarr:"⥻",supmult:"⫂",supnE:"⫌",supne:"⊋",supplus:"⫀",Supset:"⋑",supset:"⊃",supseteq:"⊇",supseteqq:"⫆",supsetneq:"⊋",supsetneqq:"⫌",supsim:"⫈",supsub:"⫔",supsup:"⫖",swarhk:"⤦",swArr:"⇙",swarr:"↙",swarrow:"↙",swnwar:"⤪",szlig:"ß",Tab:" ",target:"⌖",Tau:"Τ",tau:"τ",tbrk:"⎴",Tcaron:"Ť",tcaron:"ť",Tcedil:"Ţ",tcedil:"ţ",Tcy:"Т",tcy:"т",tdot:"⃛",telrec:"⌕",Tfr:"𝔗",tfr:"𝔱",there4:"∴",Therefore:"∴",therefore:"∴",Theta:"Θ",theta:"θ",thetasym:"ϑ",thetav:"ϑ",thickapprox:"≈",thicksim:"∼",ThickSpace:" ",thinsp:" ",ThinSpace:" ",thkap:"≈",thksim:"∼",THORN:"Þ",thorn:"þ",Tilde:"∼",tilde:"˜",TildeEqual:"≃",TildeFullEqual:"≅",TildeTilde:"≈",times:"×",timesb:"⊠",timesbar:"⨱",timesd:"⨰",tint:"∭",toea:"⤨",top:"⊤",topbot:"⌶",topcir:"⫱",Topf:"𝕋",topf:"𝕥",topfork:"⫚",tosa:"⤩",tprime:"‴",TRADE:"™",trade:"™",triangle:"▵",triangledown:"▿",triangleleft:"◃",trianglelefteq:"⊴",triangleq:"≜",triangleright:"▹",trianglerighteq:"⊵",tridot:"◬",trie:"≜",triminus:"⨺",TripleDot:"⃛",triplus:"⨹",trisb:"⧍",tritime:"⨻",trpezium:"⏢",Tscr:"𝒯",tscr:"𝓉",TScy:"Ц",tscy:"ц",TSHcy:"Ћ",tshcy:"ћ",Tstrok:"Ŧ",tstrok:"ŧ",twixt:"≬",twoheadleftarrow:"↞",twoheadrightarrow:"↠",Uacute:"Ú",uacute:"ú",Uarr:"↟",uArr:"⇑",uarr:"↑",Uarrocir:"⥉",Ubrcy:"Ў",ubrcy:"ў",Ubreve:"Ŭ",ubreve:"ŭ",Ucirc:"Û",ucirc:"û",Ucy:"У",ucy:"у",udarr:"⇅",Udblac:"Ű",udblac:"ű",udhar:"⥮",ufisht:"⥾",Ufr:"𝔘",ufr:"𝔲",Ugrave:"Ù",ugrave:"ù",uHar:"⥣",uharl:"↿",uharr:"↾",uhblk:"▀",ulcorn:"⌜",ulcorner:"⌜",ulcrop:"⌏",ultri:"◸",Umacr:"Ū",umacr:"ū",uml:"¨",UnderBar:"_",UnderBrace:"⏟",UnderBracket:"⎵",UnderParenthesis:"⏝",Union:"⋃",UnionPlus:"⊎",Uogon:"Ų",uogon:"ų",Uopf:"𝕌",uopf:"𝕦",UpArrow:"↑",Uparrow:"⇑",uparrow:"↑",UpArrowBar:"⤒",UpArrowDownArrow:"⇅",UpDownArrow:"↕",Updownarrow:"⇕",updownarrow:"↕",UpEquilibrium:"⥮",upharpoonleft:"↿",upharpoonright:"↾",uplus:"⊎",UpperLeftArrow:"↖",UpperRightArrow:"↗",Upsi:"ϒ",upsi:"υ",upsih:"ϒ",Upsilon:"Υ",upsilon:"υ",UpTee:"⊥",UpTeeArrow:"↥",upuparrows:"⇈",urcorn:"⌝",urcorner:"⌝",urcrop:"⌎",Uring:"Ů",uring:"ů",urtri:"◹",Uscr:"𝒰",uscr:"𝓊",utdot:"⋰",Utilde:"Ũ",utilde:"ũ",utri:"▵",utrif:"▴",uuarr:"⇈",Uuml:"Ü",uuml:"ü",uwangle:"⦧",vangrt:"⦜",varepsilon:"ϵ",varkappa:"ϰ",varnothing:"∅",varphi:"ϕ",varpi:"ϖ",varpropto:"∝",vArr:"⇕",varr:"↕",varrho:"ϱ",varsigma:"ς",varsubsetneq:"⊊︀",varsubsetneqq:"⫋︀",varsupsetneq:"⊋︀",varsupsetneqq:"⫌︀",vartheta:"ϑ",vartriangleleft:"⊲",vartriangleright:"⊳",Vbar:"⫫",vBar:"⫨",vBarv:"⫩",Vcy:"В",vcy:"в",VDash:"⊫",Vdash:"⊩",vDash:"⊨",vdash:"⊢",Vdashl:"⫦",Vee:"⋁",vee:"∨",veebar:"⊻",veeeq:"≚",vellip:"⋮",Verbar:"‖",verbar:"|",Vert:"‖",vert:"|",VerticalBar:"∣",VerticalLine:"|",VerticalSeparator:"❘",VerticalTilde:"≀",VeryThinSpace:" ",Vfr:"𝔙",vfr:"𝔳",vltri:"⊲",vnsub:"⊂⃒",vnsup:"⊃⃒",Vopf:"𝕍",vopf:"𝕧",vprop:"∝",vrtri:"⊳",Vscr:"𝒱",vscr:"𝓋",vsubnE:"⫋︀",vsubne:"⊊︀",vsupnE:"⫌︀",vsupne:"⊋︀",Vvdash:"⊪",vzigzag:"⦚",Wcirc:"Ŵ",wcirc:"ŵ",wedbar:"⩟",Wedge:"⋀",wedge:"∧",wedgeq:"≙",weierp:"℘",Wfr:"𝔚",wfr:"𝔴",Wopf:"𝕎",wopf:"𝕨",wp:"℘",wr:"≀",wreath:"≀",Wscr:"𝒲",wscr:"𝓌",xcap:"⋂",xcirc:"◯",xcup:"⋃",xdtri:"▽",Xfr:"𝔛",xfr:"𝔵",xhArr:"⟺",xharr:"⟷",Xi:"Ξ",xi:"ξ",xlArr:"⟸",xlarr:"⟵",xmap:"⟼",xnis:"⋻",xodot:"⨀",Xopf:"𝕏",xopf:"𝕩",xoplus:"⨁",xotime:"⨂",xrArr:"⟹",xrarr:"⟶",Xscr:"𝒳",xscr:"𝓍",xsqcup:"⨆",xuplus:"⨄",xutri:"△",xvee:"⋁",xwedge:"⋀",Yacute:"Ý",yacute:"ý",YAcy:"Я",yacy:"я",Ycirc:"Ŷ",ycirc:"ŷ",Ycy:"Ы",ycy:"ы",yen:"¥",Yfr:"𝔜",yfr:"𝔶",YIcy:"Ї",yicy:"ї",Yopf:"𝕐",yopf:"𝕪",Yscr:"𝒴",yscr:"𝓎",YUcy:"Ю",yucy:"ю",Yuml:"Ÿ",yuml:"ÿ",Zacute:"Ź",zacute:"ź",Zcaron:"Ž",zcaron:"ž",Zcy:"З",zcy:"з",Zdot:"Ż",zdot:"ż",zeetrf:"ℨ",ZeroWidthSpace:"",Zeta:"Ζ",zeta:"ζ",Zfr:"ℨ",zfr:"𝔷",ZHcy:"Ж",zhcy:"ж",zigrarr:"⇝",Zopf:"ℤ",zopf:"𝕫",Zscr:"𝒵",zscr:"𝓏",zwj:"",zwnj:""}),e.entityMap=e.HTML_ENTITIES})(Bs)),Bs}var An={},vu;function hh(){if(vu)return An;vu=1;var e=hs().NAMESPACE,r=/[A-Z_a-z\xC0-\xD6\xD8-\xF6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,i=new RegExp("[\\-\\.0-9"+r.source.slice(1,-1)+"\\u00B7\\u0300-\\u036F\\u203F-\\u2040]"),s=new RegExp("^"+r.source+i.source+"*(?::"+r.source+i.source+"*)?$"),a=0,n=1,u=2,c=3,d=4,f=5,o=6,h=7;function l(E,D){this.message=E,this.locator=D,Error.captureStackTrace&&Error.captureStackTrace(this,l)}l.prototype=new Error,l.prototype.name=l.name;function p(){}p.prototype={parse:function(E,D,C){var P=this.domBuilder;P.startDocument(),N(D,D={}),x(E,D,C,P,this.errorHandler),P.endDocument()}};function x(E,D,C,P,$){function H(fe){if(fe>65535){fe-=65536;var Ae=55296+(fe>>10),Pe=56320+(fe&1023);return String.fromCharCode(Ae,Pe)}else return String.fromCharCode(fe)}function F(fe){var Ae=fe.slice(1,-1);return Object.hasOwnProperty.call(C,Ae)?C[Ae]:Ae.charAt(0)==="#"?H(parseInt(Ae.substr(1).replace("x","0x"))):($.error("entity not found:"+fe),fe)}function B(fe){if(fe>V){var Ae=E.substring(V,fe).replace(/&#?\w+;/g,F);R&&L(V),P.characters(Ae,0,fe-V),V=fe}}function L(fe,Ae){for(;fe>=X&&(Ae=ee.exec(E));)G=Ae.index,X=G+Ae[0].length,R.lineNumber++;R.columnNumber=fe-G+1}for(var G=0,X=0,ee=/.*(?:\r\n?|\n)|.*$/g,R=P.locator,se=[{currentNSMap:D}],I={},V=0;;){try{var J=E.indexOf("<",V);if(J<0){if(!E.substr(V).match(/^\s*$/)){var oe=P.doc,K=oe.createTextNode(E.substr(V));oe.appendChild(K),P.currentElement=K}return}switch(J>V&&B(J),E.charAt(J+1)){case"/":var ge=E.indexOf(">",J+3),te=E.substring(J+2,ge).replace(/[ \t\n\r]+$/g,""),pe=se.pop();ge<0?(te=E.substring(J+2).replace(/[\s<].*/,""),$.error("end tag name: "+te+" is not complete:"+pe.tagName),ge=J+1+te.length):te.match(/\s</)&&(te=te.replace(/[\s<].*/,""),$.error("end tag name: "+te+" maybe not complete"),ge=J+1+te.length);var Ee=pe.localNSMap,Z=pe.tagName==te,ae=Z||pe.tagName&&pe.tagName.toLowerCase()==te.toLowerCase();if(ae){if(P.endElement(pe.uri,pe.localName,te),Ee)for(var re in Ee)Object.prototype.hasOwnProperty.call(Ee,re)&&P.endPrefixMapping(re);Z||$.fatalError("end tag name: "+te+" is not match the current start tagName:"+pe.tagName)}else se.push(pe);ge++;break;case"?":R&&L(J),ge=m(E,J,P);break;case"!":R&&L(J),ge=y(E,J,P,$);break;default:R&&L(J);var ce=new k,xe=se[se.length-1].currentNSMap,ge=b(E,J,ce,xe,F,$),ke=ce.length;if(!ce.closed&&_(E,ge,ce.tagName,I)&&(ce.closed=!0,C.nbsp||$.warning("unclosed xml attribute")),R&&ke){for(var me=w(R,{}),Ye=0;Ye<ke;Ye++){var we=ce[Ye];L(we.offset),we.locator=w(R,{})}P.locator=me,g(ce,P,xe)&&se.push(ce),P.locator=R}else g(ce,P,xe)&&se.push(ce);e.isHTML(ce.uri)&&!ce.closed?ge=v(E,ge,ce.tagName,F,P):ge++}}catch(fe){if(fe instanceof l)throw fe;$.error("element parse error: "+fe),ge=-1}ge>V?V=ge:B(Math.max(J,V)+1)}}function w(E,D){return D.lineNumber=E.lineNumber,D.columnNumber=E.columnNumber,D}function b(E,D,C,P,$,H){function F(R,se,I){C.attributeNames.hasOwnProperty(R)&&H.fatalError("Attribute "+R+" redefined"),C.addValue(R,se.replace(/[\t\n\r]/g," ").replace(/&#?\w+;/g,$),I)}for(var B,L,G=++D,X=a;;){var ee=E.charAt(G);switch(ee){case"=":if(X===n)B=E.slice(D,G),X=c;else if(X===u)X=c;else throw new Error("attribute equal must after attrName");break;case"'":case'"':if(X===c||X===n)if(X===n&&(H.warning('attribute value must after "="'),B=E.slice(D,G)),D=G+1,G=E.indexOf(ee,D),G>0)L=E.slice(D,G),F(B,L,D-1),X=f;else throw new Error("attribute value no end '"+ee+"' match");else if(X==d)L=E.slice(D,G),F(B,L,D),H.warning('attribute "'+B+'" missed start quot('+ee+")!!"),D=G+1,X=f;else throw new Error('attribute value must after "="');break;case"/":switch(X){case a:C.setTagName(E.slice(D,G));case f:case o:case h:X=h,C.closed=!0;case d:case n:break;case u:C.closed=!0;break;default:throw new Error("attribute invalid close char('/')")}break;case"":return H.error("unexpected end of input"),X==a&&C.setTagName(E.slice(D,G)),G;case">":switch(X){case a:C.setTagName(E.slice(D,G));case f:case o:case h:break;case d:case n:L=E.slice(D,G),L.slice(-1)==="/"&&(C.closed=!0,L=L.slice(0,-1));case u:X===u&&(L=B),X==d?(H.warning('attribute "'+L+'" missed quot(")!'),F(B,L,D)):((!e.isHTML(P[""])||!L.match(/^(?:disabled|checked|selected)$/i))&&H.warning('attribute "'+L+'" missed value!! "'+L+'" instead!!'),F(L,L,D));break;case c:throw new Error("attribute value missed!!")}return G;case"":ee=" ";default:if(ee<=" ")switch(X){case a:C.setTagName(E.slice(D,G)),X=o;break;case n:B=E.slice(D,G),X=u;break;case d:var L=E.slice(D,G);H.warning('attribute "'+L+'" missed quot(")!!'),F(B,L,D);case f:X=o;break}else switch(X){case u:C.tagName,(!e.isHTML(P[""])||!B.match(/^(?:disabled|checked|selected)$/i))&&H.warning('attribute "'+B+'" missed value!! "'+B+'" instead2!!'),F(B,B,D),D=G,X=n;break;case f:H.warning('attribute space is required"'+B+'"!!');case o:X=n,D=G;break;case c:X=d,D=G;break;case h:throw new Error("elements closed character '/' and '>' must be connected to")}}G++}}function g(E,D,C){for(var P=E.tagName,$=null,ee=E.length;ee--;){var H=E[ee],F=H.qName,B=H.value,R=F.indexOf(":");if(R>0)var L=H.prefix=F.slice(0,R),G=F.slice(R+1),X=L==="xmlns"&&G;else G=F,L=null,X=F==="xmlns"&&"";H.localName=G,X!==!1&&($==null&&($={},N(C,C={})),C[X]=$[X]=B,H.uri=e.XMLNS,D.startPrefixMapping(X,B))}for(var ee=E.length;ee--;){H=E[ee];var L=H.prefix;L&&(L==="xml"&&(H.uri=e.XML),L!=="xmlns"&&(H.uri=C[L||""]))}var R=P.indexOf(":");R>0?(L=E.prefix=P.slice(0,R),G=E.localName=P.slice(R+1)):(L=null,G=E.localName=P);var se=E.uri=C[L||""];if(D.startElement(se,G,P,E),E.closed){if(D.endElement(se,G,P),$)for(L in $)Object.prototype.hasOwnProperty.call($,L)&&D.endPrefixMapping(L)}else return E.currentNSMap=C,E.localNSMap=$,!0}function v(E,D,C,P,$){if(/^(?:script|textarea)$/i.test(C)){var H=E.indexOf("</"+C+">",D),F=E.substring(D+1,H);if(/[&<]/.test(F))return/^script$/i.test(C)?($.characters(F,0,F.length),H):(F=F.replace(/&#?\w+;/g,P),$.characters(F,0,F.length),H)}return D+1}function _(E,D,C,P){var $=P[C];return $==null&&($=E.lastIndexOf("</"+C+">"),$<D&&($=E.lastIndexOf("</"+C)),P[C]=$),$<D}function N(E,D){for(var C in E)Object.prototype.hasOwnProperty.call(E,C)&&(D[C]=E[C])}function y(E,D,C,P){var $=E.charAt(D+2);switch($){case"-":if(E.charAt(D+3)==="-"){var H=E.indexOf("-->",D+4);return H>D?(C.comment(E,D+4,H-D-4),H+3):(P.error("Unclosed comment"),-1)}else return-1;default:if(E.substr(D+3,6)=="CDATA["){var H=E.indexOf("]]>",D+9);return C.startCDATA(),C.characters(E,D+9,H-D-9),C.endCDATA(),H+3}var F=j(E,D),B=F.length;if(B>1&&/!doctype/i.test(F[0][0])){var L=F[1][0],G=!1,X=!1;B>3&&(/^public$/i.test(F[2][0])?(G=F[3][0],X=B>4&&F[4][0]):/^system$/i.test(F[2][0])&&(X=F[3][0]));var ee=F[B-1];return C.startDTD(L,G,X),C.endDTD(),ee.index+ee[0].length}}return-1}function m(E,D,C){var P=E.indexOf("?>",D);if(P){var $=E.substring(D,P).match(/^<\?(\S*)\s*([\s\S]*?)\s*$/);return $?($[0].length,C.processingInstruction($[1],$[2]),P+2):-1}return-1}function k(){this.attributeNames={}}k.prototype={setTagName:function(E){if(!s.test(E))throw new Error("invalid tagName:"+E);this.tagName=E},addValue:function(E,D,C){if(!s.test(E))throw new Error("invalid attribute:"+E);this.attributeNames[E]=this.length,this[this.length++]={qName:E,value:D,offset:C}},length:0,getLocalName:function(E){return this[E].localName},getLocator:function(E){return this[E].locator},getQName:function(E){return this[E].qName},getURI:function(E){return this[E].uri},getValue:function(E){return this[E].value}};function j(E,D){var C,P=[],$=/'[^']+'|"[^"]+"|[^\s<>\/=]+=?|(\/?\s*>|<)/g;for($.lastIndex=D,$.exec(E);C=$.exec(E);)if(P.push(C),C[1])return P}return An.XMLReader=p,An.ParseError=l,An}var wu;function ph(){if(wu)return qa;wu=1;var e=hs(),r=Uc(),i=fh(),s=hh(),a=r.DOMImplementation,n=e.NAMESPACE,u=s.ParseError,c=s.XMLReader;function d(b){return b.replace(/\r[\n\u0085]/g,`
|
|
126
126
|
`).replace(/[\r\u0085\u2028]/g,`
|
|
127
|
-
`)}function f(b){this.options=b||{locator:{}}}f.prototype.parseFromString=function(b,g){var v=this.options,_=new c,N=v.domBuilder||new h,y=v.errorHandler,m=v.locator,k=v.xmlns||{},j=/\/x?html?$/.test(g),
|
|
128
|
-
@`+(b.systemId||"")+"#[line:"+b.lineNumber+",col:"+b.columnNumber+"]"}function x(b,g,v){return typeof b=="string"?b.substr(g,v):b.length>=g+v||g?new java.lang.String(b,g,v)+"":b}"endDTD,startEntity,endEntity,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,resolveEntity,getExternalSubset,notationDecl,unparsedEntityDecl".replace(/\w+/g,function(b){h.prototype[b]=function(){return null}});function w(b,g){b.currentElement?b.currentElement.appendChild(g):b.doc.appendChild(g)}return qa.__DOMHandler=h,qa.normalizeLineEndings=d,qa.DOMParser=f,qa}var yu;function mh(){if(yu)return Fa;yu=1;var e=qc();return Fa.DOMImplementation=e.DOMImplementation,Fa.XMLSerializer=e.XMLSerializer,Fa.DOMParser=ph().DOMParser,Fa}var Ba={},At={},Sn={},Bs={},Cn={},vu;function hs(){if(vu)return Cn;vu=1,Object.defineProperty(Cn,"__esModule",{value:!0});const e=ds();let a=class extends e.default{constructor(s,r){super(s,r)}};return Cn.UniverseLogError=a,Cn}var wu;function an(){return wu||(wu=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0});const a=hs();(function(i){i.error="error",i.warn="warn",i.info="info",i.http="http",i.verbose="verbose",i.debug="debug",i.silly="silly"})(e.LogLevel||(e.LogLevel={})),(function(i){i.LEVELS_VALUES={[i.error]:0,[i.warn]:1,[i.info]:2,[i.http]:3,[i.verbose]:4,[i.debug]:5,[i.silly]:6},i.LEVELS_BY_NAME={[i.error]:i.error,[i.warn]:i.warn,[i.info]:i.info,[i.http]:i.http,[i.verbose]:i.verbose,[i.debug]:i.debug,[i.silly]:i.silly},i.DEFAULT_LEVEL=i.info;function s(d){if(typeof i.LEVELS_BY_NAME[d]>"u"){const f=Object.keys(i.LEVELS_BY_NAME).join(", ");throw new a.UniverseLogError(`There is no such log level: '${d}'. Available levels: [ ${f} ]`)}return i.LEVELS_BY_NAME[d]}i.valueOf=s;function r(d){if(typeof i.LEVELS_VALUES[d]>"u"){const f=Object.keys(i.LEVELS_BY_NAME).join(", ");throw new a.UniverseLogError(`There is no such log level: '${d}'. Available levels: [ ${f} ]`)}return i.LEVELS_VALUES[d]}i.levelToValue=r;function n(d){return r(d.level)<=r(d.threshold)}i.isLessOrEquallyVerbose=n;function u(d,f){return i.LEVELS_VALUES[d]>i.LEVELS_VALUES[f]?d:f}i.moreVerbose=u;function c(d,f){return i.LEVELS_VALUES[d]<i.LEVELS_VALUES[f]?d:f}i.lessVerbose=c})(e.LogLevel||(e.LogLevel={}))})(Bs)),Bs}var Dn={},ta={},Vs={exports:{}},_u;function Bc(){return _u||(_u=1,(function(e){e.exports=(function(i){var s={};function r(n){if(s[n])return s[n].exports;var u=s[n]={i:n,l:!1,exports:{}};return i[n].call(u.exports,u,u.exports,r),u.l=!0,u.exports}return r.m=i,r.c=s,r.d=function(n,u,c){r.o(n,u)||Object.defineProperty(n,u,{enumerable:!0,get:c})},r.r=function(n){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(n,"__esModule",{value:!0})},r.t=function(n,u){if(1&u&&(n=r(n)),8&u||4&u&&typeof n=="object"&&n&&n.__esModule)return n;var c=Object.create(null);if(r.r(c),Object.defineProperty(c,"default",{enumerable:!0,value:n}),2&u&&typeof n!="string")for(var d in n)r.d(c,d,(function(f){return n[f]}).bind(null,d));return c},r.n=function(n){var u=n&&n.__esModule?function(){return n.default}:function(){return n};return r.d(u,"a",u),u},r.o=function(n,u){return Object.prototype.hasOwnProperty.call(n,u)},r.p="",r(r.s=4)})([function(i,s,r){var n=this&&this.__importDefault||function(o){return o&&o.__esModule?o:{default:o}};Object.defineProperty(s,"__esModule",{value:!0});const u=n(r(1)),c=r(8),d=r(2),f=r(16);s.validatorSymbol=Symbol("validators"),s.Predicate=class{constructor(o,h={}){this.type=o,this.options=h,this.context={validators:[]},this.context=Object.assign({},this.context,this.options);const l=this.type[0].toLowerCase()+this.type.slice(1);this.addValidator({message:(p,x)=>`Expected ${x&&x.substring(this.type.length+1)||"argument"} to be of type \`${this.type}\` but received type \`${u.default(p)}\``,validator:p=>u.default[l](p)})}[d.testSymbol](o,h,l){for(const{validator:p,message:x}of this.context.validators){if(this.options.optional===!0&&o===void 0)continue;const w=p(o);if(w===!0)continue;let b=l;throw typeof l=="function"&&(b=l()),b=b?`${this.type} \`${b}\``:this.type,new c.ArgumentError(x(o,b,w),h)}}get[s.validatorSymbol](){return this.context.validators}get not(){return f.not(this)}validate(o){return this.addValidator({message:(h,l,p)=>typeof p=="string"?`(${l}) ${p}`:p(l),validator:h=>{const{message:l,validator:p}=o(h);return!!p||l}})}is(o){return this.addValidator({message:(h,l,p)=>p?`(${l}) ${p}`:`Expected ${l} \`${h}\` to pass custom validation function`,validator:o})}addValidator(o){return this.context.validators.push(o),this}}},function(i,s,r){Object.defineProperty(s,"__esModule",{value:!0});const n=typeof URL>"u"?r(15).URL:URL,{toString:u}=Object.prototype,c=g=>v=>typeof v===g,d=g=>{const v=u.call(g).slice(8,-1);if(v)return v},f=g=>v=>d(v)===g;function o(g){switch(g){case null:return"null";case!0:case!1:return"boolean"}switch(typeof g){case"undefined":return"undefined";case"string":return"string";case"number":return"number";case"bigint":return"bigint";case"symbol":return"symbol"}if(o.function_(g))return"Function";if(o.observable(g))return"Observable";if(o.array(g))return"Array";if(o.buffer(g))return"Buffer";const v=d(g);if(v)return v;if(g instanceof String||g instanceof Boolean||g instanceof Number)throw new TypeError("Please don't use object wrappers for primitive types");return"Object"}const h=g=>typeof g=="object";o.undefined=c("undefined"),o.string=c("string"),o.number=c("number"),o.bigint=c("bigint"),o.function_=c("function"),o.null_=(g=>g===null),o.class_=(g=>o.function_(g)&&g.toString().startsWith("class ")),o.boolean=(g=>g===!0||g===!1),o.symbol=c("symbol"),o.numericString=(g=>o.string(g)&&g.length>0&&!Number.isNaN(Number(g))),o.array=Array.isArray,o.buffer=(g=>!o.nullOrUndefined(g)&&!o.nullOrUndefined(g.constructor)&&o.function_(g.constructor.isBuffer)&&g.constructor.isBuffer(g)),o.nullOrUndefined=(g=>o.null_(g)||o.undefined(g)),o.object=(g=>!o.nullOrUndefined(g)&&(o.function_(g)||h(g))),o.iterable=(g=>!o.nullOrUndefined(g)&&o.function_(g[Symbol.iterator])),o.asyncIterable=(g=>!o.nullOrUndefined(g)&&o.function_(g[Symbol.asyncIterator])),o.generator=(g=>o.iterable(g)&&o.function_(g.next)&&o.function_(g.throw)),o.nativePromise=(g=>f("Promise")(g)),o.promise=(g=>o.nativePromise(g)||(v=>!o.null_(v)&&h(v)&&o.function_(v.then)&&o.function_(v.catch))(g)),o.generatorFunction=f("GeneratorFunction"),o.asyncFunction=f("AsyncFunction"),o.boundFunction=(g=>o.function_(g)&&!g.hasOwnProperty("prototype")),o.regExp=f("RegExp"),o.date=f("Date"),o.error=f("Error"),o.map=(g=>f("Map")(g)),o.set=(g=>f("Set")(g)),o.weakMap=(g=>f("WeakMap")(g)),o.weakSet=(g=>f("WeakSet")(g)),o.int8Array=f("Int8Array"),o.uint8Array=f("Uint8Array"),o.uint8ClampedArray=f("Uint8ClampedArray"),o.int16Array=f("Int16Array"),o.uint16Array=f("Uint16Array"),o.int32Array=f("Int32Array"),o.uint32Array=f("Uint32Array"),o.float32Array=f("Float32Array"),o.float64Array=f("Float64Array"),o.bigint64Array=f("BigInt64Array"),o.biguint64Array=f("BigUint64Array"),o.arrayBuffer=f("ArrayBuffer"),o.sharedArrayBuffer=f("SharedArrayBuffer"),o.dataView=f("DataView"),o.directInstanceOf=((g,v)=>Object.getPrototypeOf(g)===v.prototype),o.urlInstance=(g=>f("URL")(g)),o.urlString=(g=>{if(!o.string(g))return!1;try{return new n(g),!0}catch{return!1}}),o.truthy=(g=>!!g),o.falsy=(g=>!g),o.nan=(g=>Number.isNaN(g));const l=new Set(["undefined","string","number","bigint","boolean","symbol"]);o.primitive=(g=>o.null_(g)||l.has(typeof g)),o.integer=(g=>Number.isInteger(g)),o.safeInteger=(g=>Number.isSafeInteger(g)),o.plainObject=(g=>{if(d(g)!=="Object")return!1;const v=Object.getPrototypeOf(g);return v===null||v===Object.getPrototypeOf({})});const p=new Set(["Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Uint16Array","Int32Array","Uint32Array","Float32Array","Float64Array","BigInt64Array","BigUint64Array"]);o.typedArray=(g=>{const v=d(g);return v!==void 0&&p.has(v)}),o.arrayLike=(g=>!o.nullOrUndefined(g)&&!o.function_(g)&&(v=>o.safeInteger(v)&&v>=0)(g.length)),o.inRange=((g,v)=>{if(o.number(v))return g>=Math.min(0,v)&&g<=Math.max(v,0);if(o.array(v)&&v.length===2)return g>=Math.min(...v)&&g<=Math.max(...v);throw new TypeError(`Invalid range: ${JSON.stringify(v)}`)});const x=["innerHTML","ownerDocument","style","attributes","nodeValue"];o.domElement=(g=>o.object(g)&&g.nodeType===1&&o.string(g.nodeName)&&!o.plainObject(g)&&x.every(v=>v in g)),o.observable=(g=>!!g&&(!(!g[Symbol.observable]||g!==g[Symbol.observable]())||!(!g["@@observable"]||g!==g["@@observable"]()))),o.nodeStream=(g=>!o.nullOrUndefined(g)&&h(g)&&o.function_(g.pipe)&&!o.observable(g)),o.infinite=(g=>g===1/0||g===-1/0);const w=g=>v=>o.integer(v)&&Math.abs(v%2)===g;o.evenInteger=w(0),o.oddInteger=w(1),o.emptyArray=(g=>o.array(g)&&g.length===0),o.nonEmptyArray=(g=>o.array(g)&&g.length>0),o.emptyString=(g=>o.string(g)&&g.length===0),o.nonEmptyString=(g=>o.string(g)&&g.length>0),o.emptyStringOrWhitespace=(g=>o.emptyString(g)||(v=>o.string(v)&&/\S/.test(v)===!1)(g)),o.emptyObject=(g=>o.object(g)&&!o.map(g)&&!o.set(g)&&Object.keys(g).length===0),o.nonEmptyObject=(g=>o.object(g)&&!o.map(g)&&!o.set(g)&&Object.keys(g).length>0),o.emptySet=(g=>o.set(g)&&g.size===0),o.nonEmptySet=(g=>o.set(g)&&g.size>0),o.emptyMap=(g=>o.map(g)&&g.size===0),o.nonEmptyMap=(g=>o.map(g)&&g.size>0);const b=(g,v,_)=>{if(o.function_(v)===!1)throw new TypeError(`Invalid predicate: ${JSON.stringify(v)}`);if(_.length===0)throw new TypeError("Invalid number of values");return g.call(_,v)};o.any=((g,...v)=>b(Array.prototype.some,g,v)),o.all=((g,...v)=>b(Array.prototype.every,g,v)),Object.defineProperties(o,{class:{value:o.class_},function:{value:o.function_},null:{value:o.null_}}),i.exports=o,s.default=o},function(i,s,r){Object.defineProperty(s,"__esModule",{value:!0}),s.testSymbol=Symbol("test"),s.isPredicate=(n=>!!(n&&n[s.testSymbol]))},function(i,s,r){Object.defineProperty(s,"__esModule",{value:!0}),s.default=((n,u,c=5)=>{const d=[];for(const f of u)if(!n.has(f)&&(d.push(f),d.length===c))return d;return d.length===0||d})},function(i,s,r){var n=this&&this.__importDefault||function(w){return w&&w.__esModule?w:{default:w}};Object.defineProperty(s,"__esModule",{value:!0});const u=n(r(10)),c=r(11),d=r(0);s.Predicate=d.Predicate;const f=r(2),o=n(r(17)),h=n(r(6)),l=n(r(9)),p=(w,b,g)=>{if(!f.isPredicate(b)&&typeof b!="string")throw new TypeError(`Expected second argument to be a predicate or a string, got \`${typeof b}\``);if(f.isPredicate(b)){const v=u.default();l.default(w,()=>c.inferLabel(v),b)}else l.default(w,b,g)};Object.defineProperties(p,{isValid:{value:(w,b)=>{try{return p(w,b),!0}catch{return!1}}},create:{value:(w,b)=>g=>{if(f.isPredicate(w)){const v=u.default();l.default(g,()=>c.inferLabel(v),w)}else l.default(g,w,b)}}}),s.default=h.default(o.default(p));var x=r(6);s.StringPredicate=x.StringPredicate,s.NumberPredicate=x.NumberPredicate,s.BooleanPredicate=x.BooleanPredicate,s.ArrayPredicate=x.ArrayPredicate,s.ObjectPredicate=x.ObjectPredicate,s.DatePredicate=x.DatePredicate,s.ErrorPredicate=x.ErrorPredicate,s.MapPredicate=x.MapPredicate,s.WeakMapPredicate=x.WeakMapPredicate,s.SetPredicate=x.SetPredicate,s.WeakSetPredicate=x.WeakSetPredicate,s.AnyPredicate=x.AnyPredicate},function(i,s,r){(function(n){var u=200,c="__lodash_hash_undefined__",d=1,f=2,o=9007199254740991,h="[object Arguments]",l="[object Array]",p="[object AsyncFunction]",x="[object Boolean]",w="[object Date]",b="[object Error]",g="[object Function]",v="[object GeneratorFunction]",_="[object Map]",N="[object Number]",y="[object Null]",m="[object Object]",k="[object Proxy]",j="[object RegExp]",A="[object Set]",D="[object String]",C="[object Symbol]",O="[object Undefined]",L="[object ArrayBuffer]",H="[object DataView]",F=/^\[object .+?Constructor\]$/,B=/^(?:0|[1-9]\d*)$/,$={};$["[object Float32Array]"]=$["[object Float64Array]"]=$["[object Int8Array]"]=$["[object Int16Array]"]=$["[object Int32Array]"]=$["[object Uint8Array]"]=$["[object Uint8ClampedArray]"]=$["[object Uint16Array]"]=$["[object Uint32Array]"]=!0,$[h]=$[l]=$[L]=$[x]=$[H]=$[w]=$[b]=$[g]=$[_]=$[N]=$[m]=$[j]=$[A]=$[D]=$["[object WeakMap]"]=!1;var G=typeof gr=="object"&&gr&&gr.Object===Object&&gr,X=typeof self=="object"&&self&&self.Object===Object&&self,ee=G||X||Function("return this")(),R=s&&!s.nodeType&&s,se=R&&typeof n=="object"&&n&&!n.nodeType&&n,I=se&&se.exports===R,V=I&&G.process,J=(function(){try{return V&&V.binding&&V.binding("util")}catch{}})(),oe=J&&J.isTypedArray;function K(q,Y){for(var ie=-1,ue=q==null?0:q.length;++ie<ue;)if(Y(q[ie],ie,q))return!0;return!1}function te(q){var Y=-1,ie=Array(q.size);return q.forEach(function(ue,De){ie[++Y]=[De,ue]}),ie}function pe(q){var Y=-1,ie=Array(q.size);return q.forEach(function(ue){ie[++Y]=ue}),ie}var Ee,Z,ae,re=Array.prototype,ce=Function.prototype,xe=Object.prototype,ge=ee["__core-js_shared__"],ke=ce.toString,me=xe.hasOwnProperty,Ye=(Ee=/[^.]+$/.exec(ge&&ge.keys&&ge.keys.IE_PROTO||""))?"Symbol(src)_1."+Ee:"",we=xe.toString,fe=RegExp("^"+ke.call(me).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ae=I?ee.Buffer:void 0,Oe=ee.Symbol,Ve=ee.Uint8Array,St=xe.propertyIsEnumerable,Jt=re.splice,Ze=Oe?Oe.toStringTag:void 0,Yt=Object.getOwnPropertySymbols,vr=Ae?Ae.isBuffer:void 0,Qe=(Z=Object.keys,ae=Object,function(q){return Z(ae(q))}),Ct=Ot(ee,"DataView"),xt=Ot(ee,"Map"),or=Ot(ee,"Promise"),Zt=Ot(ee,"Set"),Dt=Ot(ee,"WeakMap"),yt=Ot(Object,"create"),Tt=Xt(Ct),Gr=Xt(xt),ft=Xt(or),wr=Xt(Zt),E=Xt(Dt),S=Oe?Oe.prototype:void 0,M=S?S.valueOf:void 0;function W(q){var Y=-1,ie=q==null?0:q.length;for(this.clear();++Y<ie;){var ue=q[Y];this.set(ue[0],ue[1])}}function ne(q){var Y=-1,ie=q==null?0:q.length;for(this.clear();++Y<ie;){var ue=q[Y];this.set(ue[0],ue[1])}}function he(q){var Y=-1,ie=q==null?0:q.length;for(this.clear();++Y<ie;){var ue=q[Y];this.set(ue[0],ue[1])}}function Ne(q){var Y=-1,ie=q==null?0:q.length;for(this.__data__=new he;++Y<ie;)this.add(q[Y])}function Ce(q){var Y=this.__data__=new ne(q);this.size=Y.size}function ht(q,Y){var ie=Jr(q),ue=!ie&&ws(q),De=!ie&&!ue&&ca(q),_e=!ie&&!ue&&!De&&cn(q),Pe=ie||ue||De||_e,Ie=Pe?(function($e,kt){for(var nt=-1,He=Array($e);++nt<$e;)He[nt]=kt(nt);return He})(q.length,String):[],mt=Ie.length;for(var qe in q)!me.call(q,qe)||Pe&&(qe=="length"||De&&(qe=="offset"||qe=="parent")||_e&&(qe=="buffer"||qe=="byteLength"||qe=="byteOffset")||Pt(qe,mt))||Ie.push(qe);return Ie}function at(q,Y){for(var ie=q.length;ie--;)if(on(q[ie][0],Y))return ie;return-1}function Xe(q){return q==null?q===void 0?O:y:Ze&&Ze in Object(q)?(function(Y){var ie=me.call(Y,Ze),ue=Y[Ze];try{Y[Ze]=void 0;var De=!0}catch{}var _e=we.call(Y);return De&&(ie?Y[Ze]=ue:delete Y[Ze]),_e})(q):(function(Y){return we.call(Y)})(q)}function vt(q){return _r(q)&&Xe(q)==h}function wt(q,Y,ie,ue,De){return q===Y||(q==null||Y==null||!_r(q)&&!_r(Y)?q!=q&&Y!=Y:(function(_e,Pe,Ie,mt,qe,$e){var kt=Jr(_e),nt=Jr(Pe),He=kt?l:pt(_e),Nt=nt?l:pt(Pe),ur=(He=He==h?m:He)==m,Yr=(Nt=Nt==h?m:Nt)==m,lr=He==Nt;if(lr&&ca(_e)){if(!ca(Pe))return!1;kt=!0,ur=!1}if(lr&&!ur)return $e||($e=new Ce),kt||cn(_e)?ze(_e,Pe,Ie,mt,qe,$e):(function(Se,je,$t,zt,fa,Be,Lt){switch($t){case H:if(Se.byteLength!=je.byteLength||Se.byteOffset!=je.byteOffset)return!1;Se=Se.buffer,je=je.buffer;case L:return!(Se.byteLength!=je.byteLength||!Be(new Ve(Se),new Ve(je)));case x:case w:case N:return on(+Se,+je);case b:return Se.name==je.name&&Se.message==je.message;case j:case D:return Se==je+"";case _:var Ht=te;case A:var Nr=zt&d;if(Ht||(Ht=pe),Se.size!=je.size&&!Nr)return!1;var Zr=Lt.get(Se);if(Zr)return Zr==je;zt|=f,Lt.set(Se,je);var cr=ze(Ht(Se),Ht(je),zt,fa,Be,Lt);return Lt.delete(Se),cr;case C:if(M)return M.call(Se)==M.call(je)}return!1})(_e,Pe,He,Ie,mt,qe,$e);if(!(Ie&d)){var kr=ur&&me.call(_e,"__wrapped__"),da=Yr&&me.call(Pe,"__wrapped__");if(kr||da){var ks=kr?_e.value():_e,Ns=da?Pe.value():Pe;return $e||($e=new Ce),qe(ks,Ns,Ie,mt,$e)}}return lr?($e||($e=new Ce),(function(Se,je,$t,zt,fa,Be){var Lt=$t&d,Ht=Bt(Se),Nr=Ht.length,Zr=Bt(je).length;if(Nr!=Zr&&!Lt)return!1;for(var cr=Nr;cr--;){var tt=Ht[cr];if(!(Lt?tt in je:me.call(je,tt)))return!1}var ha=Be.get(Se);if(ha&&Be.get(je))return ha==je;var Xr=!0;Be.set(Se,je),Be.set(je,Se);for(var dr=Lt;++cr<Nr;){tt=Ht[cr];var Kr=Se[tt],fr=je[tt];if(zt)var dn=Lt?zt(fr,Kr,tt,je,Se,Be):zt(Kr,fr,tt,Se,je,Be);if(!(dn===void 0?Kr===fr||fa(Kr,fr,$t,zt,Be):dn)){Xr=!1;break}dr||(dr=tt=="constructor")}if(Xr&&!dr){var jr=Se.constructor,Er=je.constructor;jr!=Er&&"constructor"in Se&&"constructor"in je&&!(typeof jr=="function"&&jr instanceof jr&&typeof Er=="function"&&Er instanceof Er)&&(Xr=!1)}return Be.delete(Se),Be.delete(je),Xr})(_e,Pe,Ie,mt,qe,$e)):!1})(q,Y,ie,ue,wt,De))}function _t(q){return!(!ln(q)||(Y=q,Ye&&Ye in Y))&&(Ut(q)?fe:F).test(Xt(q));var Y}function et(q){if(ie=(Y=q)&&Y.constructor,ue=typeof ie=="function"&&ie.prototype||xe,Y!==ue)return Qe(q);var Y,ie,ue,De=[];for(var _e in Object(q))me.call(q,_e)&&_e!="constructor"&&De.push(_e);return De}function ze(q,Y,ie,ue,De,_e){var Pe=ie&d,Ie=q.length,mt=Y.length;if(Ie!=mt&&!(Pe&&mt>Ie))return!1;var qe=_e.get(q);if(qe&&_e.get(Y))return qe==Y;var $e=-1,kt=!0,nt=ie&f?new Ne:void 0;for(_e.set(q,Y),_e.set(Y,q);++$e<Ie;){var He=q[$e],Nt=Y[$e];if(ue)var ur=Pe?ue(Nt,He,$e,Y,q,_e):ue(He,Nt,$e,q,Y,_e);if(ur!==void 0){if(ur)continue;kt=!1;break}if(nt){if(!K(Y,function(Yr,lr){if(kr=lr,!nt.has(kr)&&(He===Yr||De(He,Yr,ie,ue,_e)))return nt.push(lr);var kr})){kt=!1;break}}else if(He!==Nt&&!De(He,Nt,ie,ue,_e)){kt=!1;break}}return _e.delete(q),_e.delete(Y),kt}function Bt(q){return(function(Y,ie,ue){var De=ie(Y);return Jr(Y)?De:(function(_e,Pe){for(var Ie=-1,mt=Pe.length,qe=_e.length;++Ie<mt;)_e[qe+Ie]=Pe[Ie];return _e})(De,ue(Y))})(q,_s,Vt)}function Le(q,Y){var ie,ue,De=q.__data__;return((ue=typeof(ie=Y))=="string"||ue=="number"||ue=="symbol"||ue=="boolean"?ie!=="__proto__":ie===null)?De[typeof Y=="string"?"string":"hash"]:De.map}function Ot(q,Y){var ie=(function(ue,De){return ue?.[De]})(q,Y);return _t(ie)?ie:void 0}W.prototype.clear=function(){this.__data__=yt?yt(null):{},this.size=0},W.prototype.delete=function(q){var Y=this.has(q)&&delete this.__data__[q];return this.size-=Y?1:0,Y},W.prototype.get=function(q){var Y=this.__data__;if(yt){var ie=Y[q];return ie===c?void 0:ie}return me.call(Y,q)?Y[q]:void 0},W.prototype.has=function(q){var Y=this.__data__;return yt?Y[q]!==void 0:me.call(Y,q)},W.prototype.set=function(q,Y){var ie=this.__data__;return this.size+=this.has(q)?0:1,ie[q]=yt&&Y===void 0?c:Y,this},ne.prototype.clear=function(){this.__data__=[],this.size=0},ne.prototype.delete=function(q){var Y=this.__data__,ie=at(Y,q);return!(ie<0||(ie==Y.length-1?Y.pop():Jt.call(Y,ie,1),--this.size,0))},ne.prototype.get=function(q){var Y=this.__data__,ie=at(Y,q);return ie<0?void 0:Y[ie][1]},ne.prototype.has=function(q){return at(this.__data__,q)>-1},ne.prototype.set=function(q,Y){var ie=this.__data__,ue=at(ie,q);return ue<0?(++this.size,ie.push([q,Y])):ie[ue][1]=Y,this},he.prototype.clear=function(){this.size=0,this.__data__={hash:new W,map:new(xt||ne),string:new W}},he.prototype.delete=function(q){var Y=Le(this,q).delete(q);return this.size-=Y?1:0,Y},he.prototype.get=function(q){return Le(this,q).get(q)},he.prototype.has=function(q){return Le(this,q).has(q)},he.prototype.set=function(q,Y){var ie=Le(this,q),ue=ie.size;return ie.set(q,Y),this.size+=ie.size==ue?0:1,this},Ne.prototype.add=Ne.prototype.push=function(q){return this.__data__.set(q,c),this},Ne.prototype.has=function(q){return this.__data__.has(q)},Ce.prototype.clear=function(){this.__data__=new ne,this.size=0},Ce.prototype.delete=function(q){var Y=this.__data__,ie=Y.delete(q);return this.size=Y.size,ie},Ce.prototype.get=function(q){return this.__data__.get(q)},Ce.prototype.has=function(q){return this.__data__.has(q)},Ce.prototype.set=function(q,Y){var ie=this.__data__;if(ie instanceof ne){var ue=ie.__data__;if(!xt||ue.length<u-1)return ue.push([q,Y]),this.size=++ie.size,this;ie=this.__data__=new he(ue)}return ie.set(q,Y),this.size=ie.size,this};var Vt=Yt?function(q){return q==null?[]:(q=Object(q),(function(Y,ie){for(var ue=-1,De=Y==null?0:Y.length,_e=0,Pe=[];++ue<De;){var Ie=Y[ue];ie(Ie,ue,Y)&&(Pe[_e++]=Ie)}return Pe})(Yt(q),function(Y){return St.call(q,Y)}))}:function(){return[]},pt=Xe;function Pt(q,Y){return!!(Y=Y??o)&&(typeof q=="number"||B.test(q))&&q>-1&&q%1==0&&q<Y}function Xt(q){if(q!=null){try{return ke.call(q)}catch{}try{return q+""}catch{}}return""}function on(q,Y){return q===Y||q!=q&&Y!=Y}(Ct&&pt(new Ct(new ArrayBuffer(1)))!=H||xt&&pt(new xt)!=_||or&&pt(or.resolve())!="[object Promise]"||Zt&&pt(new Zt)!=A||Dt&&pt(new Dt)!="[object WeakMap]")&&(pt=function(q){var Y=Xe(q),ie=Y==m?q.constructor:void 0,ue=ie?Xt(ie):"";if(ue)switch(ue){case Tt:return H;case Gr:return _;case ft:return"[object Promise]";case wr:return A;case E:return"[object WeakMap]"}return Y});var ws=vt((function(){return arguments})())?vt:function(q){return _r(q)&&me.call(q,"callee")&&!St.call(q,"callee")},Jr=Array.isArray,ca=vr||function(){return!1};function Ut(q){if(!ln(q))return!1;var Y=Xe(q);return Y==g||Y==v||Y==p||Y==k}function un(q){return typeof q=="number"&&q>-1&&q%1==0&&q<=o}function ln(q){var Y=typeof q;return q!=null&&(Y=="object"||Y=="function")}function _r(q){return q!=null&&typeof q=="object"}var cn=oe?(function(q){return function(Y){return q(Y)}})(oe):function(q){return _r(q)&&un(q.length)&&!!$[Xe(q)]};function _s(q){return(Y=q)!=null&&un(Y.length)&&!Ut(Y)?ht(q):et(q);var Y}n.exports=function(q,Y){return wt(q,Y)}}).call(this,r(23)(i))},function(i,s,r){Object.defineProperty(s,"__esModule",{value:!0});const n=r(18);s.StringPredicate=n.StringPredicate;const u=r(20);s.NumberPredicate=u.NumberPredicate;const c=r(21);s.BooleanPredicate=c.BooleanPredicate;const d=r(0),f=r(22);s.ArrayPredicate=f.ArrayPredicate;const o=r(24);s.ObjectPredicate=o.ObjectPredicate;const h=r(29);s.DatePredicate=h.DatePredicate;const l=r(30);s.ErrorPredicate=l.ErrorPredicate;const p=r(31);s.MapPredicate=p.MapPredicate;const x=r(32);s.WeakMapPredicate=x.WeakMapPredicate;const w=r(33);s.SetPredicate=w.SetPredicate;const b=r(34);s.WeakSetPredicate=b.WeakSetPredicate;const g=r(35);s.AnyPredicate=g.AnyPredicate,s.default=((v,_)=>(Object.defineProperties(v,{string:{get:()=>new n.StringPredicate(_)},number:{get:()=>new u.NumberPredicate(_)},boolean:{get:()=>new c.BooleanPredicate(_)},undefined:{get:()=>new d.Predicate("undefined",_)},null:{get:()=>new d.Predicate("null",_)},nullOrUndefined:{get:()=>new d.Predicate("nullOrUndefined",_)},nan:{get:()=>new d.Predicate("nan",_)},symbol:{get:()=>new d.Predicate("symbol",_)},array:{get:()=>new f.ArrayPredicate(_)},object:{get:()=>new o.ObjectPredicate(_)},date:{get:()=>new h.DatePredicate(_)},error:{get:()=>new l.ErrorPredicate(_)},map:{get:()=>new p.MapPredicate(_)},weakMap:{get:()=>new x.WeakMapPredicate(_)},set:{get:()=>new w.SetPredicate(_)},weakSet:{get:()=>new b.WeakSetPredicate(_)},function:{get:()=>new d.Predicate("Function",_)},buffer:{get:()=>new d.Predicate("Buffer",_)},regExp:{get:()=>new d.Predicate("RegExp",_)},promise:{get:()=>new d.Predicate("Promise",_)},typedArray:{get:()=>new d.Predicate("TypedArray",_)},int8Array:{get:()=>new d.Predicate("Int8Array",_)},uint8Array:{get:()=>new d.Predicate("Uint8Array",_)},uint8ClampedArray:{get:()=>new d.Predicate("Uint8ClampedArray",_)},int16Array:{get:()=>new d.Predicate("Int16Array",_)},uint16Array:{get:()=>new d.Predicate("Uint16Array",_)},int32Array:{get:()=>new d.Predicate("Int32Array",_)},uint32Array:{get:()=>new d.Predicate("Uint32Array",_)},float32Array:{get:()=>new d.Predicate("Float32Array",_)},float64Array:{get:()=>new d.Predicate("Float64Array",_)},arrayBuffer:{get:()=>new d.Predicate("ArrayBuffer",_)},dataView:{get:()=>new d.Predicate("DataView",_)},iterable:{get:()=>new d.Predicate("Iterable",_)},any:{value:(...N)=>new g.AnyPredicate(N,_)}}),v))},function(i,s,r){var n=this&&this.__importDefault||function(c){return c&&c.__esModule?c:{default:c}};Object.defineProperty(s,"__esModule",{value:!0});const u=n(r(4));s.default=((c,d)=>{try{for(const f of c)u.default(f,d);return!0}catch(f){return f.message}})},function(i,s,r){Object.defineProperty(s,"__esModule",{value:!0}),s.ArgumentError=class extends Error{constructor(n,u){super(n),"captureStackTrace"in Error&&Error.captureStackTrace(this,u),this.name="ArgumentError"}}},function(i,s,r){Object.defineProperty(s,"__esModule",{value:!0});const n=r(2);s.default=function u(c,d,f){f[n.testSymbol](c,u,d)}},function(i,s,r){const n=()=>{const u=Error.prepareStackTrace;Error.prepareStackTrace=((d,f)=>f);const c=new Error().stack.slice(1);return Error.prepareStackTrace=u,c};i.exports=n,i.exports.default=n},function(i,s,r){var n=this&&this.__importStar||function(h){if(h&&h.__esModule)return h;var l={};if(h!=null)for(var p in h)Object.hasOwnProperty.call(h,p)&&(l[p]=h[p]);return l.default=h,l},u=this&&this.__importDefault||function(h){return h&&h.__esModule?h:{default:h}};Object.defineProperty(s,"__esModule",{value:!0});const c=n(r(12)),d=u(r(13)),f=u(r(14)),o=/^.*?\((.*?)[,)]/;s.inferLabel=(h=>{if(!f.default)return;const l=h[1],p=l.getFileName(),x=l.getLineNumber(),w=l.getColumnNumber();if(!p||x===null||w===null)return;let b=[];try{b=c.readFileSync(p,"utf8").split(`
|
|
129
|
-
`)}catch{return}let g=b[x-1];if(!g)return;g=g.slice(w-1);const v=o.exec(g);if(!v||!v[1])return;const _=v[1];return d.default(_)||d.default(_.split(".").pop())?_:void 0})},function(i,s){i.exports=dt},function(i,s,r){Object.defineProperty(s,"__esModule",{value:!0});const n=/^[a-z$_][a-z$_0-9]*$/i,u=new Set(["undefined","null","true","false","super","this","Infinity","NaN"]);s.default=(c=>c&&!u.has(c)&&n.test(c))},function(i,s,r){Object.defineProperty(s,"__esModule",{value:!0}),s.default=!!(typeof process<"u"&&process.versions&&process.versions.node)},function(i,s){i.exports=dt},function(i,s,r){Object.defineProperty(s,"__esModule",{value:!0});const n=r(0);s.not=(u=>{const c=u.addValidator;return u.addValidator=(d=>{const f=d.validator,o=d.message;return d.message=((h,l)=>`[NOT] ${o(h,l)}`),d.validator=(h=>!f(h)),u[n.validatorSymbol].push(d),u.addValidator=c,u}),u})},function(i,s,r){var n=this&&this.__importDefault||function(c){return c&&c.__esModule?c:{default:c}};Object.defineProperty(s,"__esModule",{value:!0});const u=n(r(6));s.default=(c=>(Object.defineProperties(c,{optional:{get:()=>u.default({},{optional:!0})}}),c))},function(i,s,r){var n=this&&this.__importDefault||function(f){return f&&f.__esModule?f:{default:f}};Object.defineProperty(s,"__esModule",{value:!0});const u=n(r(1)),c=n(r(19)),d=r(0);s.StringPredicate=class extends d.Predicate{constructor(f){super("string",f)}length(f){return this.addValidator({message:(o,h)=>`Expected ${h} to have length \`${f}\`, got \`${o}\``,validator:o=>o.length===f})}minLength(f){return this.addValidator({message:(o,h)=>`Expected ${h} to have a minimum length of \`${f}\`, got \`${o}\``,validator:o=>o.length>=f})}maxLength(f){return this.addValidator({message:(o,h)=>`Expected ${h} to have a maximum length of \`${f}\`, got \`${o}\``,validator:o=>o.length<=f})}matches(f){return this.addValidator({message:(o,h)=>`Expected ${h} to match \`${f}\`, got \`${o}\``,validator:o=>f.test(o)})}startsWith(f){return this.addValidator({message:(o,h)=>`Expected ${h} to start with \`${f}\`, got \`${o}\``,validator:o=>o.startsWith(f)})}endsWith(f){return this.addValidator({message:(o,h)=>`Expected ${h} to end with \`${f}\`, got \`${o}\``,validator:o=>o.endsWith(f)})}includes(f){return this.addValidator({message:(o,h)=>`Expected ${h} to include \`${f}\`, got \`${o}\``,validator:o=>o.includes(f)})}oneOf(f){return this.addValidator({message:(o,h)=>{let l=JSON.stringify(f);if(f.length>10){const p=f.length-10;l=JSON.stringify(f.slice(0,10)).replace(/]$/,`,…+${p} more]`)}return`Expected ${h} to be one of \`${l}\`, got \`${o}\``},validator:o=>f.includes(o)})}get empty(){return this.addValidator({message:(f,o)=>`Expected ${o} to be empty, got \`${f}\``,validator:f=>f===""})}get nonEmpty(){return this.addValidator({message:(f,o)=>`Expected ${o} to not be empty`,validator:f=>f!==""})}equals(f){return this.addValidator({message:(o,h)=>`Expected ${h} to be equal to \`${f}\`, got \`${o}\``,validator:o=>o===f})}get alphanumeric(){return this.addValidator({message:(f,o)=>`Expected ${o} to be alphanumeric, got \`${f}\``,validator:f=>/^[a-z\d]+$/i.test(f)})}get alphabetical(){return this.addValidator({message:(f,o)=>`Expected ${o} to be alphabetical, got \`${f}\``,validator:f=>/^[a-z]+$/gi.test(f)})}get numeric(){return this.addValidator({message:(f,o)=>`Expected ${o} to be numeric, got \`${f}\``,validator:f=>/^(\+|-)?\d+$/i.test(f)})}get date(){return this.addValidator({message:(f,o)=>`Expected ${o} to be a date, got \`${f}\``,validator:c.default})}get lowercase(){return this.addValidator({message:(f,o)=>`Expected ${o} to be lowercase, got \`${f}\``,validator:f=>f.trim()!==""&&f===f.toLowerCase()})}get uppercase(){return this.addValidator({message:(f,o)=>`Expected ${o} to be uppercase, got \`${f}\``,validator:f=>f.trim()!==""&&f===f.toUpperCase()})}get url(){return this.addValidator({message:(f,o)=>`Expected ${o} to be a URL, got \`${f}\``,validator:u.default.urlString})}}},function(i,s,r){i.exports=function(n){return!isNaN(Date.parse(n))}},function(i,s,r){var n=this&&this.__importDefault||function(d){return d&&d.__esModule?d:{default:d}};Object.defineProperty(s,"__esModule",{value:!0});const u=n(r(1)),c=r(0);s.NumberPredicate=class extends c.Predicate{constructor(d){super("number",d)}inRange(d,f){return this.addValidator({message:(o,h)=>`Expected ${h} to be in range [${d}..${f}], got ${o}`,validator:o=>u.default.inRange(o,[d,f])})}greaterThan(d){return this.addValidator({message:(f,o)=>`Expected ${o} to be greater than ${d}, got ${f}`,validator:f=>f>d})}greaterThanOrEqual(d){return this.addValidator({message:(f,o)=>`Expected ${o} to be greater than or equal to ${d}, got ${f}`,validator:f=>f>=d})}lessThan(d){return this.addValidator({message:(f,o)=>`Expected ${o} to be less than ${d}, got ${f}`,validator:f=>f<d})}lessThanOrEqual(d){return this.addValidator({message:(f,o)=>`Expected ${o} to be less than or equal to ${d}, got ${f}`,validator:f=>f<=d})}equal(d){return this.addValidator({message:(f,o)=>`Expected ${o} to be equal to ${d}, got ${f}`,validator:f=>f===d})}oneOf(d){return this.addValidator({message:(f,o)=>{let h=JSON.stringify(d);if(d.length>10){const l=d.length-10;h=JSON.stringify(d.slice(0,10)).replace(/]$/,`,…+${l} more]`)}return`Expected ${o} to be one of \`${h}\`, got ${f}`},validator:f=>d.includes(f)})}get integer(){return this.addValidator({message:(d,f)=>`Expected ${f} to be an integer, got ${d}`,validator:d=>u.default.integer(d)})}get finite(){return this.addValidator({message:(d,f)=>`Expected ${f} to be finite, got ${d}`,validator:d=>!u.default.infinite(d)})}get infinite(){return this.addValidator({message:(d,f)=>`Expected ${f} to be infinite, got ${d}`,validator:d=>u.default.infinite(d)})}get positive(){return this.addValidator({message:(d,f)=>`Expected ${f} to be positive, got ${d}`,validator:d=>d>0})}get negative(){return this.addValidator({message:(d,f)=>`Expected ${f} to be negative, got ${d}`,validator:d=>d<0})}get integerOrInfinite(){return this.addValidator({message:(d,f)=>`Expected ${f} to be an integer or infinite, got ${d}`,validator:d=>u.default.integer(d)||u.default.infinite(d)})}get uint8(){return this.integer.inRange(0,255)}get uint16(){return this.integer.inRange(0,65535)}get uint32(){return this.integer.inRange(0,4294967295)}get int8(){return this.integer.inRange(-128,127)}get int16(){return this.integer.inRange(-32768,32767)}get int32(){return this.integer.inRange(-2147483648,2147483647)}}},function(i,s,r){Object.defineProperty(s,"__esModule",{value:!0});const n=r(0);s.BooleanPredicate=class extends n.Predicate{constructor(u){super("boolean",u)}get true(){return this.addValidator({message:(u,c)=>`Expected ${c} to be true, got ${u}`,validator:u=>u===!0})}get false(){return this.addValidator({message:(u,c)=>`Expected ${c} to be false, got ${u}`,validator:u=>u===!1})}}},function(i,s,r){var n=this&&this.__importDefault||function(f){return f&&f.__esModule?f:{default:f}};Object.defineProperty(s,"__esModule",{value:!0});const u=n(r(5)),c=n(r(4)),d=r(0);s.ArrayPredicate=class extends d.Predicate{constructor(f){super("array",f)}length(f){return this.addValidator({message:(o,h)=>`Expected ${h} to have length \`${f}\`, got \`${o.length}\``,validator:o=>o.length===f})}minLength(f){return this.addValidator({message:(o,h)=>`Expected ${h} to have a minimum length of \`${f}\`, got \`${o.length}\``,validator:o=>o.length>=f})}maxLength(f){return this.addValidator({message:(o,h)=>`Expected ${h} to have a maximum length of \`${f}\`, got \`${o.length}\``,validator:o=>o.length<=f})}startsWith(f){return this.addValidator({message:(o,h)=>`Expected ${h} to start with \`${f}\`, got \`${o[0]}\``,validator:o=>o[0]===f})}endsWith(f){return this.addValidator({message:(o,h)=>`Expected ${h} to end with \`${f}\`, got \`${o[o.length-1]}\``,validator:o=>o[o.length-1]===f})}includes(...f){return this.addValidator({message:(o,h)=>`Expected ${h} to include all elements of \`${JSON.stringify(f)}\`, got \`${JSON.stringify(o)}\``,validator:o=>f.every(h=>o.indexOf(h)!==-1)})}includesAny(...f){return this.addValidator({message:(o,h)=>`Expected ${h} to include any element of \`${JSON.stringify(f)}\`, got \`${JSON.stringify(o)}\``,validator:o=>f.some(h=>o.indexOf(h)!==-1)})}get empty(){return this.addValidator({message:(f,o)=>`Expected ${o} to be empty, got \`${JSON.stringify(f)}\``,validator:f=>f.length===0})}get nonEmpty(){return this.addValidator({message:(f,o)=>`Expected ${o} to not be empty`,validator:f=>f.length>0})}deepEqual(f){return this.addValidator({message:(o,h)=>`Expected ${h} to be deeply equal to \`${JSON.stringify(f)}\`, got \`${JSON.stringify(o)}\``,validator:o=>u.default(o,f)})}ofType(f){let o;return this.addValidator({message:(h,l)=>`(${l}) ${o}`,validator:h=>{try{for(const l of h)c.default(l,f);return!0}catch(l){return o=l.message,!1}}})}}},function(i,s){i.exports=function(r){return r.webpackPolyfill||(r.deprecate=function(){},r.paths=[],r.children||(r.children=[]),Object.defineProperty(r,"loaded",{enumerable:!0,get:function(){return r.l}}),Object.defineProperty(r,"id",{enumerable:!0,get:function(){return r.i}}),r.webpackPolyfill=1),r}},function(i,s,r){var n=this&&this.__importDefault||function(x){return x&&x.__esModule?x:{default:x}};Object.defineProperty(s,"__esModule",{value:!0});const u=n(r(1)),c=n(r(25)),d=n(r(5)),f=r(0),o=n(r(3)),h=n(r(7)),l=n(r(27)),p=r(28);s.ObjectPredicate=class extends f.Predicate{constructor(x){super("object",x)}get plain(){return this.addValidator({message:(x,w)=>`Expected ${w} to be a plain object`,validator:x=>u.default.plainObject(x)})}get empty(){return this.addValidator({message:(x,w)=>`Expected ${w} to be empty, got \`${JSON.stringify(x)}\``,validator:x=>Object.keys(x).length===0})}get nonEmpty(){return this.addValidator({message:(x,w)=>`Expected ${w} to not be empty`,validator:x=>Object.keys(x).length>0})}valuesOfType(x){return this.addValidator({message:(w,b,g)=>`(${b}) ${g}`,validator:w=>{const b=Object.keys(w).map(g=>w[g]);return h.default(b,x)}})}deepValuesOfType(x){return this.addValidator({message:(w,b,g)=>`(${b}) ${g}`,validator:w=>l.default(w,x)})}deepEqual(x){return this.addValidator({message:(w,b)=>`Expected ${b} to be deeply equal to \`${JSON.stringify(x)}\`, got \`${JSON.stringify(w)}\``,validator:w=>d.default(w,x)})}instanceOf(x){return this.addValidator({message:(w,b)=>{let g=w.constructor.name;return g&&g!=="Object"||(g=JSON.stringify(w)),`Expected ${b} \`${g}\` to be of type \`${x.name}\``},validator:w=>w instanceof x})}hasKeys(...x){return this.addValidator({message:(w,b,g)=>`Expected ${b} to have keys \`${JSON.stringify(g)}\``,validator:w=>o.default({has:b=>c.default.has(w,b)},x)})}hasAnyKeys(...x){return this.addValidator({message:(w,b)=>`Expected ${b} to have any key of \`${JSON.stringify(x)}\``,validator:w=>x.some(b=>c.default.has(w,b))})}partialShape(x){return this.addValidator({message:(w,b,g)=>`${g.replace("Expected","Expected property")} in ${b}`,validator:w=>p.partial(w,x)})}exactShape(x){return this.addValidator({message:(w,b,g)=>`${g.replace("Expected","Expected property")} in ${b}`,validator:w=>p.exact(w,x)})}}},function(i,s,r){const n=r(26);function u(c){const d=c.split("."),f=[];for(let o=0;o<d.length;o++){let h=d[o];for(;h[h.length-1]==="\\"&&d[o+1]!==void 0;)h=h.slice(0,-1)+".",h+=d[++o];f.push(h)}return f}i.exports={get(c,d,f){if(!n(c)||typeof d!="string")return f===void 0?c:f;const o=u(d);for(let h=0;h<o.length;h++){if(!Object.prototype.propertyIsEnumerable.call(c,o[h]))return f;if((c=c[o[h]])==null){if(h!==o.length-1)return f;break}}return c},set(c,d,f){if(!n(c)||typeof d!="string")return c;const o=c,h=u(d);for(let l=0;l<h.length;l++){const p=h[l];n(c[p])||(c[p]={}),l===h.length-1&&(c[p]=f),c=c[p]}return o},delete(c,d){if(!n(c)||typeof d!="string")return;const f=u(d);for(let o=0;o<f.length;o++){const h=f[o];if(o===f.length-1)return void delete c[h];if(c=c[h],!n(c))return}},has(c,d){if(!n(c)||typeof d!="string")return!1;const f=u(d);for(let o=0;o<f.length;o++){if(!n(c)||!(f[o]in c))return!1;c=c[f[o]]}return!0}}},function(i,s,r){i.exports=function(n){var u=typeof n;return n!==null&&(u==="object"||u==="function")}},function(i,s,r){var n=this&&this.__importDefault||function(f){return f&&f.__esModule?f:{default:f}};Object.defineProperty(s,"__esModule",{value:!0});const u=n(r(1)),c=n(r(4)),d=(f,o)=>u.default.plainObject(f)?Object.keys(f).every(h=>d(f[h],o)):(c.default(f,o),!0);s.default=((f,o)=>{try{return d(f,o)}catch(h){return h.message}})},function(i,s,r){var n=this&&this.__importDefault||function(f){return f&&f.__esModule?f:{default:f}};Object.defineProperty(s,"__esModule",{value:!0});const u=n(r(1)),c=n(r(9)),d=r(2);s.partial=function f(o,h,l){try{for(const p of Object.keys(h)){const x=l?`${l}.${p}`:p;if(d.isPredicate(h[p]))c.default(o[p],x,h[p]);else if(u.default.plainObject(h[p])){const w=f(o[p],h[p],x);if(w!==!0)return w}}return!0}catch(p){return p.message}},s.exact=function f(o,h,l){try{const p=new Set(Object.keys(o));for(const x of Object.keys(h)){p.delete(x);const w=l?`${l}.${x}`:x;if(d.isPredicate(h[x]))c.default(o[x],w,h[x]);else if(u.default.plainObject(h[x])){if(!Object.prototype.hasOwnProperty.call(o,x))return`Expected \`${w}\` to exist`;const b=f(o[x],h[x],w);if(b!==!0)return b}}if(p.size>0){const x=Array.from(p.keys())[0];return`Did not expect property \`${l?`${l}.${x}`:x}\` to exist, got \`${o[x]}\``}return!0}catch(p){return p.message}}},function(i,s,r){Object.defineProperty(s,"__esModule",{value:!0});const n=r(0);s.DatePredicate=class extends n.Predicate{constructor(u){super("date",u)}before(u){return this.addValidator({message:(c,d)=>`Expected ${d} ${c.toISOString()} to be before ${u.toISOString()}`,validator:c=>c.getTime()<u.getTime()})}after(u){return this.addValidator({message:(c,d)=>`Expected ${d} ${c.toISOString()} to be after ${u.toISOString()}`,validator:c=>c.getTime()>u.getTime()})}}},function(i,s,r){Object.defineProperty(s,"__esModule",{value:!0});const n=r(0);s.ErrorPredicate=class extends n.Predicate{constructor(u){super("error",u)}name(u){return this.addValidator({message:(c,d)=>`Expected ${d} to have name \`${u}\`, got \`${c.name}\``,validator:c=>c.name===u})}message(u){return this.addValidator({message:(c,d)=>`Expected ${d} message to be \`${u}\`, got \`${c.message}\``,validator:c=>c.message===u})}messageIncludes(u){return this.addValidator({message:(c,d)=>`Expected ${d} message to include \`${u}\`, got \`${c.message}\``,validator:c=>c.message.includes(u)})}hasKeys(...u){return this.addValidator({message:(c,d)=>`Expected ${d} message to have keys \`${u.join("`, `")}\``,validator:c=>u.every(d=>c.hasOwnProperty(d))})}instanceOf(u){return this.addValidator({message:(c,d)=>`Expected ${d} \`${c.name}\` to be of type \`${u.name}\``,validator:c=>c instanceof u})}get typeError(){return this.instanceOf(TypeError)}get evalError(){return this.instanceOf(EvalError)}get rangeError(){return this.instanceOf(RangeError)}get referenceError(){return this.instanceOf(ReferenceError)}get syntaxError(){return this.instanceOf(SyntaxError)}get uriError(){return this.instanceOf(URIError)}}},function(i,s,r){var n=this&&this.__importDefault||function(o){return o&&o.__esModule?o:{default:o}};Object.defineProperty(s,"__esModule",{value:!0});const u=n(r(5)),c=r(0),d=n(r(3)),f=n(r(7));s.MapPredicate=class extends c.Predicate{constructor(o){super("Map",o)}size(o){return this.addValidator({message:(h,l)=>`Expected ${l} to have size \`${o}\`, got \`${h.size}\``,validator:h=>h.size===o})}minSize(o){return this.addValidator({message:(h,l)=>`Expected ${l} to have a minimum size of \`${o}\`, got \`${h.size}\``,validator:h=>h.size>=o})}maxSize(o){return this.addValidator({message:(h,l)=>`Expected ${l} to have a maximum size of \`${o}\`, got \`${h.size}\``,validator:h=>h.size<=o})}hasKeys(...o){return this.addValidator({message:(h,l,p)=>`Expected ${l} to have keys \`${JSON.stringify(p)}\``,validator:h=>d.default(h,o)})}hasAnyKeys(...o){return this.addValidator({message:(h,l)=>`Expected ${l} to have any key of \`${JSON.stringify(o)}\``,validator:h=>o.some(l=>h.has(l))})}hasValues(...o){return this.addValidator({message:(h,l,p)=>`Expected ${l} to have values \`${JSON.stringify(p)}\``,validator:h=>d.default(new Set(h.values()),o)})}hasAnyValues(...o){return this.addValidator({message:(h,l)=>`Expected ${l} to have any value of \`${JSON.stringify(o)}\``,validator:h=>{const l=new Set(h.values());return o.some(p=>l.has(p))}})}keysOfType(o){return this.addValidator({message:(h,l,p)=>`(${l}) ${p}`,validator:h=>f.default(h.keys(),o)})}valuesOfType(o){return this.addValidator({message:(h,l,p)=>`(${l}) ${p}`,validator:h=>f.default(h.values(),o)})}get empty(){return this.addValidator({message:(o,h)=>`Expected ${h} to be empty, got \`${JSON.stringify(Array.from(o))}\``,validator:o=>o.size===0})}get nonEmpty(){return this.addValidator({message:(o,h)=>`Expected ${h} to not be empty`,validator:o=>o.size>0})}deepEqual(o){return this.addValidator({message:(h,l)=>`Expected ${l} to be deeply equal to \`${JSON.stringify(Array.from(o))}\`, got \`${JSON.stringify(Array.from(h))}\``,validator:h=>u.default(h,o)})}}},function(i,s,r){var n=this&&this.__importDefault||function(d){return d&&d.__esModule?d:{default:d}};Object.defineProperty(s,"__esModule",{value:!0});const u=r(0),c=n(r(3));s.WeakMapPredicate=class extends u.Predicate{constructor(d){super("WeakMap",d)}hasKeys(...d){return this.addValidator({message:(f,o,h)=>`Expected ${o} to have keys \`${JSON.stringify(h)}\``,validator:f=>c.default(f,d)})}hasAnyKeys(...d){return this.addValidator({message:(f,o)=>`Expected ${o} to have any key of \`${JSON.stringify(d)}\``,validator:f=>d.some(o=>f.has(o))})}}},function(i,s,r){var n=this&&this.__importDefault||function(o){return o&&o.__esModule?o:{default:o}};Object.defineProperty(s,"__esModule",{value:!0});const u=n(r(5)),c=r(0),d=n(r(3)),f=n(r(7));s.SetPredicate=class extends c.Predicate{constructor(o){super("Set",o)}size(o){return this.addValidator({message:(h,l)=>`Expected ${l} to have size \`${o}\`, got \`${h.size}\``,validator:h=>h.size===o})}minSize(o){return this.addValidator({message:(h,l)=>`Expected ${l} to have a minimum size of \`${o}\`, got \`${h.size}\``,validator:h=>h.size>=o})}maxSize(o){return this.addValidator({message:(h,l)=>`Expected ${l} to have a maximum size of \`${o}\`, got \`${h.size}\``,validator:h=>h.size<=o})}has(...o){return this.addValidator({message:(h,l,p)=>`Expected ${l} to have items \`${JSON.stringify(p)}\``,validator:h=>d.default(h,o)})}hasAny(...o){return this.addValidator({message:(h,l)=>`Expected ${l} to have any item of \`${JSON.stringify(o)}\``,validator:h=>o.some(l=>h.has(l))})}ofType(o){return this.addValidator({message:(h,l,p)=>`(${l}) ${p}`,validator:h=>f.default(h,o)})}get empty(){return this.addValidator({message:(o,h)=>`Expected ${h} to be empty, got \`${JSON.stringify(Array.from(o))}\``,validator:o=>o.size===0})}get nonEmpty(){return this.addValidator({message:(o,h)=>`Expected ${h} to not be empty`,validator:o=>o.size>0})}deepEqual(o){return this.addValidator({message:(h,l)=>`Expected ${l} to be deeply equal to \`${JSON.stringify(Array.from(o))}\`, got \`${JSON.stringify(Array.from(h))}\``,validator:h=>u.default(h,o)})}}},function(i,s,r){var n=this&&this.__importDefault||function(d){return d&&d.__esModule?d:{default:d}};Object.defineProperty(s,"__esModule",{value:!0});const u=r(0),c=n(r(3));s.WeakSetPredicate=class extends u.Predicate{constructor(d){super("WeakSet",d)}has(...d){return this.addValidator({message:(f,o,h)=>`Expected ${o} to have items \`${JSON.stringify(h)}\``,validator:f=>c.default(f,d)})}hasAny(...d){return this.addValidator({message:(f,o)=>`Expected ${o} to have any item of \`${JSON.stringify(d)}\``,validator:f=>d.some(o=>f.has(o))})}}},function(i,s,r){Object.defineProperty(s,"__esModule",{value:!0});const n=r(8),u=r(2);s.AnyPredicate=class{constructor(c,d={}){this.predicates=c,this.options=d}[u.testSymbol](c,d,f){const o=["Any predicate failed with the following errors:"];for(const h of this.predicates)try{return void d(c,f,h)}catch(l){if(c===void 0&&this.options.optional===!0)return;o.push(`- ${l.message}`)}throw new n.ArgumentError(o.join(`
|
|
130
|
-
`),d)}}}]);const
|
|
131
|
-
`:JSON.stringify(
|
|
132
|
-
${r.error.stack}`:""}};return i.FORMAT_NAME="oneline",On.OnelineLogFormat=i,On}var Au;function ms(){return Au||(Au=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0});const a=hs(),i=gh(),s=bh();(function(r){r.FORMATS={json:new i.JsonLogFormat(!1),json_pretty:new i.JsonLogFormat(!0),oneline:new s.OnelineLogFormat},r.KEYS=Object.freeze({json:"json",json_pretty:"json_pretty",oneline:"oneline"}),r.DEFAULT_FORMAT=r.FORMATS.oneline;function n(u){if(typeof r.FORMATS[u]>"u"){const c=Object.keys(r.FORMATS).join(",");throw new a.UniverseLogError(`There is no such log format: '${u}'. Available formats: [ ${c} ]`)}return r.FORMATS[u]}r.valueOf=n})(e.LogFormats||(e.LogFormats={}))})(Us)),Us}var $n={},Su;function xh(){if(Su)return $n;Su=1,Object.defineProperty($n,"__esModule",{value:!0});let e=class{static log(i){console.error(`UniverseLog.FallbackLog: ${i}`)}};return $n.FallbackLog=e,$n}var Ln={},Cu;function zc(){if(Cu)return Ln;Cu=1,Object.defineProperty(Ln,"__esModule",{value:!0});const e=hs(),a=new Function("try {return this===window;}catch(e){ return false;}"),i=new Function("try {return this===global;}catch(e){return false;}"),s=new Function("try {return this;}catch(e){return undefined}");function r(c){const d=s();if(!d)throw new e.UniverseLogError("PortableEnv: environment is browser, but could not get window object");return d[c]}function n(c){if(!process)throw new e.UniverseLogError("PortableEnv: environment is node, but process object does not exist");if(!process.env)throw new e.UniverseLogError("PortableEnv: environment is node, but process.env object does not exist");if(process.env[c])return process.env[c]}function u(c){if(a())return r(c);if(i())return n(c);throw new e.UniverseLogError("PortableEnv: unknown environment (not browser, not node)")}return Ln.PortableEnv=u,Ln}var Mn={},Du;function Hc(){if(Du)return Mn;Du=1,Object.defineProperty(Mn,"__esModule",{value:!0});class e{}return e.LEAST_LEVEL_ENV="LOG_LEVEL",e.LOG_FORMAT_ENV="LOG_FORMAT",e.LOG_METADATA_ENV="LOG_METADATA",e.REEVALUATE_CONFIG_AFTER_MS=150,e.DEFAULT_LOG_FN=a=>console.error(a),Mn.StaticConfig=e,Mn}var Tu;function yh(){if(Tu)return ta;Tu=1;var e=ta&&ta.__rest||function(f,o){var h={};for(var l in f)Object.prototype.hasOwnProperty.call(f,l)&&o.indexOf(l)<0&&(h[l]=f[l]);if(f!=null&&typeof Object.getOwnPropertySymbols=="function")for(var p=0,l=Object.getOwnPropertySymbols(f);p<l.length;p++)o.indexOf(l[p])<0&&Object.prototype.propertyIsEnumerable.call(f,l[p])&&(h[l[p]]=f[l[p]]);return h};Object.defineProperty(ta,"__esModule",{value:!0});const a=Bc(),i=ms(),s=xh(),r=an(),n=ps(),u=zc(),c=Hc();let d=class{constructor(o){this.levelEvaluationEnvNames=[],this.level=r.LogLevel.DEFAULT_LEVEL,this.metadata=n.LogMetadata.EMPTY_METADATA,this.nextReevaluateTimestampMs=0,this.levelEvaluationEnvNames=o.levelEvaluationEnvNames,a.default(this.levelEvaluationEnvNames,"levelEvaluationEnvNames",a.default.array.ofType(a.default.string)),this.fallbackLog=o.fallbackLog,a.default(this.fallbackLog,"fallbackLog",a.default.function),this.defaultFormat=o.defaultFormat,a.default(this.defaultFormat,"defaultFormat",a.default.object),this.format=this.defaultFormat,this.evaluateIfRequired()}setLevelEvaluationEnvNames(o){this.levelEvaluationEnvNames=o,this.evaluateIfRequired()}getLevel(){return this.level}getFormat(){return this.format}getMetadata(){return this.metadata}evaluateIfRequired(){if(!(Date.now()<this.nextReevaluateTimestampMs))try{this.nextReevaluateTimestampMs=Date.now()+c.StaticConfig.REEVALUATE_CONFIG_AFTER_MS,this.evaluate()}catch(o){this.fallbackLog(`Could not evaluate live log config: ${o}: ${o.stack}`)}}evaluate(){this.format=this.evaluateFormat(),this.level=this.evaluateLogLevel(),this.metadata=this.evaluateMetadata()}evaluateFormat(){const o=u.PortableEnv(c.StaticConfig.LOG_FORMAT_ENV);return o?i.LogFormats.valueOf(o):this.defaultFormat}evaluateLogLevel(){const o=this.chooseMostVerboseLevel(this.getEnvValues(this.levelEvaluationEnvNames));if(o)return o;const h=this.chooseMostVerboseLevel(this.getEnvValues([c.StaticConfig.LEAST_LEVEL_ENV]));return h||r.LogLevel.DEFAULT_LEVEL}getEnvValues(o){return o.map(l=>u.PortableEnv(l)).filter(l=>!!l).map(l=>l||"unreachable")}chooseMostVerboseLevel(o){const h=o.map(p=>r.LogLevel.valueOf(p));return h.length===0?void 0:h.reduce((p,x)=>r.LogLevel.moreVerbose(p,x))}evaluateMetadata(){try{const o=u.PortableEnv(c.StaticConfig.LOG_METADATA_ENV);if(o){const h=JSON.parse(o);return this.removeTagFromMetadata(h)}}catch(o){s.FallbackLog.log(`Could not parse value of ${c.StaticConfig.LOG_METADATA_ENV} env: ${o}`)}return n.LogMetadata.EMPTY_METADATA}removeTagFromMetadata(o){const{tag:h}=o;return e(o,["tag"])}};return ta.LiveLogConfig=d,ta}var Rn={},Ou;function vh(){if(Ou)return Rn;Ou=1,Object.defineProperty(Rn,"__esModule",{value:!0});const e=ds(),a=an(),i=Vc();let s=class Gt{static parse(n,u){let c=Gt.basicLogMsg(n);for(const d of u)c=Object.assign({},c,Gt.parseElem(d,c));return c}static basicLogMsg(n){return{time_iso:i.TimeUtils.getUTCISOTime(),timestamp:i.TimeUtils.getTimestamp(),level:n,level_value:a.LogLevel.LEVELS_VALUES[n]}}static parseElem(n,u){return typeof n=="string"?Gt.parseString(n,u):n instanceof Error?Gt.parseError(n,u):typeof n=="object"?Gt.parseObject(n,u):Gt.parseOther(n,u)}static parseString(n,u){return{message:(u.message?u.message+"; ":"")+n}}static parseError(n,u){const c={};return c.message=(u.message?u.message+"; ":"")+(n+"").trim(),u.error?(c.other_errors=[...u.other_errors||[]],c.other_errors.push(Gt.errorToObj(n))):c.error=Gt.errorToObj(n),c}static errorToObj(n){return n instanceof e.default?Object.assign({name:n.name,message:n.message,stack:n.stack},n.cause?{cause:Gt.errorToObj(n.cause)}:{}):{name:n.name,message:n.message,stack:n.stack}}static parseObject(n,u){return Object.assign({},n)}static parseOther(n,u){return{others:[...u.others||[],n]}}};return Rn.ParseLogMsg=s,Rn}var Hs={},Pu;function Wc(){return Pu||(Pu=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0});const a=Bc(),i=ms();(function(s){function r(n){a.default(n.levelEnvs,"Properties.levelEnvs",a.default.any(a.default.undefined,a.default.array.ofType(a.default.string))),a.default(n.metadata,"Properties.metadata",a.default.optional.object),a.default(n.logFn,"Properties.logFn",a.default.any(a.default.undefined,a.default.function)),a.default(n.defaultFormat,"Properties.defaultFormat",a.default.optional.string.oneOf(Object.keys(i.LogFormats.KEYS)))}s.validate=r})(e.Properties||(e.Properties={}))})(Hs)),Hs}var $u;function Jc(){if($u)return Dn;$u=1,Object.defineProperty(Dn,"__esModule",{value:!0});const e=yh(),a=an(),i=ps(),s=Hc(),r=ms(),n=vh(),u=Wc();let c=class Gc{constructor(f){if(this.instanceMetadata=i.LogMetadata.EMPTY_METADATA,"clone"in f){this.instanceMetadata=Object.assign({},f.clone.instanceMetadata,f.newMetadata),this.liveConfig=f.clone.liveConfig,this.logFn=f.clone.logFn;return}u.Properties.validate(f),f.metadata&&(this.instanceMetadata=f.metadata),f.logFn?this.logFn=f.logFn:this.logFn=s.StaticConfig.DEFAULT_LOG_FN;const o=f.defaultFormat?r.LogFormats.valueOf(f.defaultFormat):r.LogFormats.DEFAULT_FORMAT;this.liveConfig=new e.LiveLogConfig({levelEvaluationEnvNames:f.levelEnvs||[],fallbackLog:this.logFn,defaultFormat:o})}cloneWithMetadata(f){return new Gc({clone:this,newMetadata:f})}getLevel(){return this.liveConfig.getLevel()}getFormatName(){return this.liveConfig.getFormat().getName()}getMetadata(){return Object.assign({},this.instanceMetadata,this.liveConfig.getMetadata())}doEfficientLog(f,o){this.reevaluateConfigIfRequired();const h=a.LogLevel.LEVELS_VALUES[this.getLevel()];a.LogLevel.LEVELS_VALUES[f]<=h&&this.doLog(f,o())}doLog(f,...o){if(this.reevaluateConfigIfRequired(),o.length!==0&&(o.length===1&&Array.isArray(o[0])&&(o=o[0]),a.LogLevel.isLessOrEquallyVerbose({level:f,threshold:this.getLevel()}))){const h=n.ParseLogMsg.parse(f,o),l=this.liveConfig.getFormat().format(h,this.getMetadata());this.rawWriteToLog(l)}}rawWriteToLog(f){this.logFn(f)}reevaluateConfigIfRequired(){this.liveConfig.evaluateIfRequired()}};return Dn.LogEngine=c,Dn}var Lu;function Yc(){if(Lu)return Sn;Lu=1,Object.defineProperty(Sn,"__esModule",{value:!0});const e=an(),a=Jc();let i=class{constructor(r){r instanceof a.LogEngine?this.logEngine=r:this.logEngine=new a.LogEngine(r)}getLevel(){return this.logEngine.getLevel()}getFormatName(){return this.logEngine.getFormatName()}getMetadata(){return this.logEngine.getMetadata()}isDebug(){return e.LogLevel.LEVELS_VALUES[this.getLevel()]>=e.LogLevel.LEVELS_VALUES.debug}error(...r){this.doLog(e.LogLevel.error,r)}errorGen(r){this.doEfficientLog(e.LogLevel.error,r)}warn(...r){this.doLog(e.LogLevel.warn,r)}warnGen(r){this.doEfficientLog(e.LogLevel.warn,r)}info(...r){this.doLog(e.LogLevel.info,r)}infoGen(r){this.doEfficientLog(e.LogLevel.info,r)}http(...r){this.doLog(e.LogLevel.http,r)}httpGen(r){this.doEfficientLog(e.LogLevel.http,r)}verbose(...r){this.doLog(e.LogLevel.verbose,r)}verboseGen(r){this.doEfficientLog(e.LogLevel.verbose,r)}debug(...r){this.doLog(e.LogLevel.debug,r)}debugGen(r){this.doEfficientLog(e.LogLevel.debug,r)}silly(...r){this.doLog(e.LogLevel.silly,r)}sillyGen(r){this.doEfficientLog(e.LogLevel.silly,r)}doEfficientLog(r,n){this.logEngine.doEfficientLog(r,n)}doLog(r,...n){this.logEngine.doLog(r,...n)}getEngine(){return this.logEngine}};return Sn.AbstractUniverseLog=i,Sn}var In={},Mu;function wh(){if(Mu)return In;Mu=1,Object.defineProperty(In,"__esModule",{value:!0});const e=Yc();let a=class Zc extends e.AbstractUniverseLog{constructor(s){super(s)}tag(s){return new Zc(super.getEngine().cloneWithMetadata({tag:s}))}};return In.BasicTaggedUniverseLog=a,In}var Ru;function _h(){if(Ru)return At;Ru=1,Object.defineProperty(At,"__esModule",{value:!0});var e=Yc();At.AbstractUniverseLog=e.AbstractUniverseLog;var a=Jc();At.LogEngine=a.LogEngine;var i=Wc();At.UniverseLogProperties=i.Properties;var s=wh();At.BasicTaggedUniverseLog=s.BasicTaggedUniverseLog;var r=ps();At.LogMetadata=r.LogMetadata;var n=an();At.LogLevel=n.LogLevel;var u=zc();At.PortableEnv=u.PortableEnv;var c=hs();At.UniverseLogError=c.UniverseLogError;var d=ms();return At.LogFormats=d.LogFormats,At}var Iu;function ir(){if(Iu)return Ba;Iu=1,Object.defineProperty(Ba,"__esModule",{value:!0}),Ba.Log=void 0;const e=_h();let a=class Xc extends e.AbstractUniverseLog{static log(){return Xc.INSTANCE}constructor(){super({levelEnvs:["HIVE_CONTENT_RENDERER_LOG_LEVEL","ENGRAVE_LOG_LEVEL"],metadata:{library:"@hiveio/content-renderer"}})}};return Ba.Log=a,a.INSTANCE=new a,Ba}var Or={},Va={},Fu;function kh(){if(Fu)return Va;Fu=1,Object.defineProperty(Va,"__esModule",{value:!0}),Va.Phishing=void 0;const e=["steewit.com","śteemit.com","ŝteemit.com","şteemit.com","šteemit.com","sţeemit.com","sťeemit.com","șteemit.com","sleemit.com","aba.ae","autobidbot.cf","autobidbot.ga","autobidbot.gq","autobotsteem.cf","autobotsteem.ga","autobotsteem.gq","autobotsteem.ml","autosteem.info","autosteembot.cf","autosteembot.ga","autosteembot.gq","autosteembot.ml","autosteemit.wapka.mobi","boostbot.ga","boostbot.gq","boostwhaleup.cf","cutt.us","dereferer.me","eb2a.com","lordlinkers.tk","nullrefer.com","steeemit.ml","steeemitt.aba.ae","steemart.ga","steemautobot.bid","steemautobot.cf","steemautobot.trade","steemers.aba.ae","steemiit.cf","steemiit.ga","steemij.tk","steemik.ga","steemik.tk","steemil.com","steemil.ml","steemir.tk","steemitou.co.nf","steemitservices.ga","steemitservices.gq","steemiz.tk","steemnow.cf","steemnow.ga","steemnow.gq","steemnow.ml","steempostupper.win","steemrewards.ml","steemrobot.ga","steemrobot.ml","steemupgot.cf","steemupgot.ga","steemupgot.gq","steemupper.cf","steemupper.ga","steemupper.gq","steemupper.ml","steenit.cf","stemit.com","stssmater.aba.ae","uppervotes.ga","uppervotes.gq","upperwhaleplus.cf","upperwhaleplus.ga","upperwhaleplus.gq","upvoteme.cf","upvoteme.ga","upvoteme.gq","upvoteme.ml","url.rw","us.aba.ae","whaleboostup.ga","whaleboostup.ml"];let a=class{};return Va.Phishing=a,a.looksPhishy=i=>{for(const s of e)if(i.toLocaleLowerCase().indexOf(s)>-1)return!0;return!1},Va}var qu;function Nh(){if(qu)return Or;qu=1;var e=Or&&Or.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(Or,"__esModule",{value:!0}),Or.LinkSanitizer=void 0;const a=e(rn()),i=ir(),s=kh();let r=class Kc{constructor(u){this.validate(u),this.options=u,this.baseUrl=new URL(this.options.baseUrl),this.topLevelsBaseDomain=Kc.getTopLevelBaseDomainFromBaseUrl(this.baseUrl)}sanitizeLink(u,c){return u=this.prependUnknownProtocolLink(u),i.Log.log().debug("LinkSanitizer#sanitizeLink",{url:u,urlTitle:c}),s.Phishing.looksPhishy(u)?(i.Log.log().debug("LinkSanitizer#sanitizeLink","phishing link detected","phishing list",u,{url:u,urlTitle:c}),!1):this.isPseudoLocalUrl(u,c)?(i.Log.log().debug("LinkSanitizer#sanitizeLink","phishing link detected","pseudo local url",u,{url:u,urlTitle:c}),!1):u}static getTopLevelBaseDomainFromBaseUrl(u){const d=/([^\s/$.?#]+\.[^\s/$.?#]+)$/g.exec(u.hostname);if(d&&d[0])return d[0];throw new Error(`LinkSanitizer: could not determine top level base domain from baseUrl hostname: ${u.hostname}`)}prependUnknownProtocolLink(u){return/^((#)|(\/(?!\/))|(((hive|https?):)?\/\/))/.test(u)||(u="https://"+u),u}isPseudoLocalUrl(u,c){if(u.indexOf("#")===0)return!1;u=u.toLowerCase(),c=c.toLowerCase();try{const d=c.indexOf(this.topLevelsBaseDomain)!==-1,f=u.indexOf(this.topLevelsBaseDomain)!==-1;if(d&&!f)return!0}catch(d){if(d instanceof TypeError)return!1;throw d}return!1}validate(u){(0,a.default)(u,"LinkSanitizerOptions",a.default.object),(0,a.default)(u.baseUrl,"LinkSanitizerOptions.baseUrl",a.default.string.nonEmpty)}};return Or.LinkSanitizer=r,Or}var Pr={},Bu;function Gi(){if(Bu)return Pr;Bu=1;var e=Pr&&Pr.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(Pr,"__esModule",{value:!0}),Pr.Localization=void 0;const a=e(rn());let i=class{static validate(r){(0,a.default)(r,"LocalizationOptions",a.default.object),(0,a.default)(r.phishingWarning,"LocalizationOptions.phishingWarning",a.default.string.nonEmpty),(0,a.default)(r.externalLink,"LocalizationOptions.externalLink",a.default.string.nonEmpty),(0,a.default)(r.noImage,"LocalizationOptions.noImage",a.default.string.nonEmpty),(0,a.default)(r.accountNameWrongLength,"LocalizationOptions.accountNameWrongLength",a.default.string.nonEmpty),(0,a.default)(r.accountNameBadActor,"LocalizationOptions.accountNameBadActor",a.default.string.nonEmpty),(0,a.default)(r.accountNameWrongSegment,"LocalizationOptions.accountNameWrongSegment",a.default.string.nonEmpty)}};return Pr.Localization=i,i.DEFAULT={phishingWarning:"Link expanded to plain text; beware of a potential phishing attempt",externalLink:"This link will take you away from example.com",noImage:"Images not allowed",accountNameWrongLength:"Account name should be between 3 and 16 characters long",accountNameBadActor:"This account is on a bad actor list",accountNameWrongSegment:"This account name contains a bad segment"},Pr}var $r={},Ua={},Vu;function Hr(){if(Vu)return Ua;Vu=1,Object.defineProperty(Ua,"__esModule",{value:!0}),Ua.AbstractEmbedder=void 0;let e=class{static getEmbedMarker(i,s){return`~~~ embed:${i} ${s} ~~~`}static insertAllEmbeds(i,s,r){const n=[];for(let u of s.split("~~~ embed:")){const c=u.match(/^([A-Za-z0-9?/=_-]+) ([^ ]*) ~~~/);if(c&&c.length>=3){const d=c[1],f=c[2];for(const o of i)if(o.type==f){n.push(o.processEmbed(d,r));break}if(u=u.substring(`${d} ${f} ~~~`.length),u==="")continue}n.push(u)}return n.join("")}};return Ua.AbstractEmbedder=e,Ua}var za={},Uu;function jh(){if(Uu)return za;Uu=1,Object.defineProperty(za,"__esModule",{value:!0}),za.SpotifyEmbedder=void 0;const e=ir(),a=Hr();let i=class Ri extends a.AbstractEmbedder{constructor(){super(...arguments),this.type="spotify"}static extractMetadata(r){if(!r)return;const n=r.match(Ri.regex.main);return!n||n.length<2?void 0:{id:`${n[1]==="show"||n[1]==="episode"?"embed-podcast":"embed"}/${n[1]}/${n[2]}`,url:n[0],canonical:`https://open.spotify.com/${n[1]}/${n[2]}`}}getEmbedMetadata(r){try{const n=Ri.extractMetadata(r.data);return n?{id:n.id,url:n.url,image:n.canonical}:void 0}catch(n){e.Log.log().error(n)}}processEmbed(r,n){return`<div class="videoWrapper"><iframe src="${`https://open.spotify.com/${r}`}" width="${n.width}" height="${n.height}" frameBorder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen ></iframe></div>`}};return za.SpotifyEmbedder=i,i.regex={main:/https?:\/\/open.spotify.com\/(playlist|show|episode|album|track|artist)\/(.*)/i,sanitize:/^https:\/\/open\.spotify\.com\/(embed|embed-podcast)\/(playlist|show|episode|album|track|artist)\/(.*)/i},za}var Ha={},zu;function Eh(){if(zu)return Ha;zu=1,Object.defineProperty(Ha,"__esModule",{value:!0}),Ha.ThreeSpeakEmbedder=void 0;const e=ir(),a=Hr();let i=class Qc extends a.AbstractEmbedder{constructor(){super(...arguments),this.type="3speak"}getEmbedMetadata(r){const n=typeof r=="string"?r:r.data;try{const u=n.match(Qc.linkRegex);if(u&&u[1])return{id:u[1],url:n}}catch(u){e.Log.log().error(u)}}processEmbed(r,n){const u=`https://3speak.tv/embed?v=${r}`;return`<div class="threeSpeakWrapper"><iframe width="${n.width}" height="${n.height}" src="${u}" frameborder="0" allowfullscreen></iframe></div>`}};return Ha.ThreeSpeakEmbedder=i,i.linkRegex=/^(?:https?:\/\/)?(?:(?:3speak\.(?:tv|online|co)\/watch\?v=)|(?:3speak\.tv\/embed\?v=))([a-zA-Z0-9_.-]+\/[a-zA-Z0-9_-]+)(?:&.*)?$/,Ha}var Lr={},Ws={},Hu;function ed(){return Hu||(Hu=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.imageFile=e.image=e.remote=e.local=e.any=void 0;const a='[^\\s"<>\\]\\[\\(\\)]',i=a.replace(/\]$/,".,']"),s="(?:(?:\\.(?:tiff?|jpe?g|gif|png|svg|ico)|ipfs/[a-z\\d]{40,}))",r="(?:[-a-zA-Z0-9\\._]*[-a-zA-Z0-9])",n="(?:"+a+"*"+i+")?",u=({domain:l=r,path:p=""}={})=>`https?://${l}(?::\\d{2,5})?(?:[/\\?#]${n}${p||""})${p?"":"?"}`,c=(l="i")=>new RegExp(u(),l);e.any=c;const d=(l="i")=>new RegExp(u({domain:"(?:localhost|(?:.*\\.)?hive.blog)"}),l);e.local=d;const f=(l="i")=>new RegExp(u({domain:`(?!localhost|(?:.*\\.)?hive.blog)${r}`}),l);e.remote=f;const o=(l="i")=>new RegExp(u({path:s}),l);e.image=o;const h=(l="i")=>new RegExp(s,l);e.imageFile=h,e.default={any:(0,e.any)(),local:(0,e.local)(),remote:(0,e.remote)(),image:(0,e.image)(),imageFile:(0,e.imageFile)(),vimeo:/https?:\/\/(?:vimeo.com\/|player.vimeo.com\/video\/)([0-9]+)\/*/,vimeoId:/(?:vimeo.com\/|player.vimeo.com\/video\/)([0-9]+)/,twitch:/https?:\/\/(?:www.)?twitch.tv\/(?:(videos)\/)?([a-zA-Z0-9][\w]{3,24})/i,ipfsProtocol:/^((\/\/?ipfs\/)|(ipfs:\/\/))/}})(Ws)),Ws}var Wu;function Ah(){if(Wu)return Lr;Wu=1;var e=Lr&&Lr.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(Lr,"__esModule",{value:!0}),Lr.TwitchEmbedder=void 0;const a=ir(),i=e(ed()),s=Hr();let r=class extends s.AbstractEmbedder{constructor(u){super(),this.type="twitch",this.domain=new URL(u.baseUrl).hostname}getEmbedMetadata(u){try{const c=u.data,d=this.twitchId(c);return d?Object.assign({},d):void 0}catch(c){a.Log.log().error(c)}}processEmbed(u,c){return`<div class="videoWrapper"><iframe src=${`https://player.twitch.tv/${u}&parent=${this.domain}`} width=${c.width} height=${c.height} frameBorder="0" allowFullScreen></iframe></div>`}twitchId(u){if(!u)return null;const c=u.match(i.default.twitch);return!c||c.length<3?null:{id:c[1]==="videos"?`?video=${c[2]}`:`?channel=${c[2]}`,url:c[0],canonical:c[1]==="videos"?`https://player.twitch.tv/?video=${c[2]}`:`https://player.twitch.tv/?channel=${c[2]}`}}};return Lr.TwitchEmbedder=r,Lr}var Wa={},Ga={},Gu;function td(){if(Gu)return Ga;Gu=1,Object.defineProperty(Ga,"__esModule",{value:!0}),Ga.StaticConfig=void 0;let e=class{};return Ga.StaticConfig=e,e.sanitization={iframeWhitelist:[{re:/^(?:@?(?:https?:)?\/\/)?(?:www\.)?(twitter|x)\.com\/(?:\w+\/status|status)\/(\d{1,20})/i,fn:a=>{if(!a)return null;const s=a.replace(/^(@|https?:\/\/)/,"").match(/(?:twitter|x)\.com\/(?:\w+\/status|status)\/(\d{1,20})/i);return!s||s.length!==2?null:`https://platform.twitter.com/embed/Tweet.html?id=${s[1]}`}},{re:/^(https?:)?\/\/player.vimeo.com\/video\/.*/i,fn:a=>{if(!a)return null;const i=a.match(/https:\/\/player\.vimeo\.com\/video\/([0-9]+)/);return!i||i.length!==2?null:"https://player.vimeo.com/video/"+i[1]}},{re:/^(https?:)?\/\/www.youtube.com\/embed\/.*/i,fn:a=>a.replace(/\?.+$/,"")},{re:/^https:\/\/w.soundcloud.com\/player\/.*/i,fn:a=>{if(!a)return null;const i=a.match(/url=(.+?)&/);return!i||i.length!==2?null:`https://w.soundcloud.com/player/?url=${i[1]}&auto_play=false&hide_related=false&show_comments=true&show_user=true&show_reposts=false&visual=true`}},{re:/^(https?:)?\/\/player.twitch.tv\/.*/i,fn:a=>a},{re:/^https:\/\/open\.spotify\.com\/(embed|embed-podcast)\/(playlist|show|episode|album|track|artist)\/(.*)/i,fn:a=>a},{re:/^(?:https?:)?\/\/(?:3speak\.(?:tv|online|co))\/embed\?v=([^&\s]+)/i,fn:a=>{if(!a)return null;const i=a.match(/3speak\.(?:tv|online|co)\/embed\?v=([^&\s]+)/i);return!i||i.length!==2?null:`https://3speak.tv/embed?v=${i[1]}`}},{re:/^(?:https?:)?\/\/(?:3speak\.(?:tv|online|co))\/watch\?v=([^&\s]+)/i,fn:a=>{if(!a)return null;const i=a.match(/3speak\.(?:tv|online|co)\/watch\?v=([^&\s]+)/i);return!i||i.length!==2?null:`https://3speak.tv/embed?v=${i[1]}`}},{re:/^(?:https:)\/\/(?:www\.)?(twitter|x)\.com\/(?:\w+\/status|status)\/(\d{1,20})/i,fn:a=>{if(!a)return null;const i=a.match(/(?:twitter|x)\.com\/(?:\w+\/status|status)\/(\d{1,20})/i);return!i||i.length!==2?null:`https://platform.twitter.com/embed/Tweet.html?id=${i[1]}`}}],noImageText:"(Image not shown due to low ratings)",allowedTags:`
|
|
127
|
+
`)}function f(b){this.options=b||{locator:{}}}f.prototype.parseFromString=function(b,g){var v=this.options,_=new c,N=v.domBuilder||new h,y=v.errorHandler,m=v.locator,k=v.xmlns||{},j=/\/x?html?$/.test(g),E=j?i.HTML_ENTITIES:i.XML_ENTITIES;m&&N.setDocumentLocator(m),_.errorHandler=o(y,N,m),_.domBuilder=v.domBuilder||N,j&&(k[""]=n.HTML),k.xml=k.xml||n.XML;var D=v.normalizeLineEndings||d;return b&&typeof b=="string"?_.parse(D(b),k,E):_.errorHandler.error("invalid doc source"),N.doc};function o(b,g,v){if(!b){if(g instanceof h)return g;b=g}var _={},N=b instanceof Function;v=v||{};function y(m){var k=b[m];!k&&N&&(k=b.length==2?function(j){b(m,j)}:b),_[m]=k&&function(j){k("[xmldom "+m+"] "+j+p(v))}||function(){}}return y("warning"),y("error"),y("fatalError"),_}function h(){this.cdata=!1}function l(b,g){g.lineNumber=b.lineNumber,g.columnNumber=b.columnNumber}h.prototype={startDocument:function(){this.doc=new a().createDocument(null,null,null),this.locator&&(this.doc.documentURI=this.locator.systemId)},startElement:function(b,g,v,_){var N=this.doc,y=N.createElementNS(b,v||g),m=_.length;w(this,y),this.currentElement=y,this.locator&&l(this.locator,y);for(var k=0;k<m;k++){var b=_.getURI(k),j=_.getValue(k),v=_.getQName(k),E=N.createAttributeNS(b,v);this.locator&&l(_.getLocator(k),E),E.value=E.nodeValue=j,y.setAttributeNode(E)}},endElement:function(b,g,v){var _=this.currentElement;_.tagName,this.currentElement=_.parentNode},startPrefixMapping:function(b,g){},endPrefixMapping:function(b){},processingInstruction:function(b,g){var v=this.doc.createProcessingInstruction(b,g);this.locator&&l(this.locator,v),w(this,v)},ignorableWhitespace:function(b,g,v){},characters:function(b,g,v){if(b=x.apply(this,arguments),b){if(this.cdata)var _=this.doc.createCDATASection(b);else var _=this.doc.createTextNode(b);this.currentElement?this.currentElement.appendChild(_):/^\s*$/.test(b)&&this.doc.appendChild(_),this.locator&&l(this.locator,_)}},skippedEntity:function(b){},endDocument:function(){this.doc.normalize()},setDocumentLocator:function(b){(this.locator=b)&&(b.lineNumber=0)},comment:function(b,g,v){b=x.apply(this,arguments);var _=this.doc.createComment(b);this.locator&&l(this.locator,_),w(this,_)},startCDATA:function(){this.cdata=!0},endCDATA:function(){this.cdata=!1},startDTD:function(b,g,v){var _=this.doc.implementation;if(_&&_.createDocumentType){var N=_.createDocumentType(b,g,v);this.locator&&l(this.locator,N),w(this,N),this.doc.doctype=N}},warning:function(b){console.warn("[xmldom warning] "+b,p(this.locator))},error:function(b){console.error("[xmldom error] "+b,p(this.locator))},fatalError:function(b){throw new u(b,this.locator)}};function p(b){if(b)return`
|
|
128
|
+
@`+(b.systemId||"")+"#[line:"+b.lineNumber+",col:"+b.columnNumber+"]"}function x(b,g,v){return typeof b=="string"?b.substr(g,v):b.length>=g+v||g?new java.lang.String(b,g,v)+"":b}"endDTD,startEntity,endEntity,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,resolveEntity,getExternalSubset,notationDecl,unparsedEntityDecl".replace(/\w+/g,function(b){h.prototype[b]=function(){return null}});function w(b,g){b.currentElement?b.currentElement.appendChild(g):b.doc.appendChild(g)}return qa.__DOMHandler=h,qa.normalizeLineEndings=d,qa.DOMParser=f,qa}var _u;function mh(){if(_u)return Fa;_u=1;var e=Uc();return Fa.DOMImplementation=e.DOMImplementation,Fa.XMLSerializer=e.XMLSerializer,Fa.DOMParser=ph().DOMParser,Fa}var Ba={},At={},Sn={},Vs={},Cn={},ku;function ps(){if(ku)return Cn;ku=1,Object.defineProperty(Cn,"__esModule",{value:!0});const e=fs();let r=class extends e.default{constructor(s,a){super(s,a)}};return Cn.UniverseLogError=r,Cn}var Nu;function an(){return Nu||(Nu=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0});const r=ps();(function(i){i.error="error",i.warn="warn",i.info="info",i.http="http",i.verbose="verbose",i.debug="debug",i.silly="silly"})(e.LogLevel||(e.LogLevel={})),(function(i){i.LEVELS_VALUES={[i.error]:0,[i.warn]:1,[i.info]:2,[i.http]:3,[i.verbose]:4,[i.debug]:5,[i.silly]:6},i.LEVELS_BY_NAME={[i.error]:i.error,[i.warn]:i.warn,[i.info]:i.info,[i.http]:i.http,[i.verbose]:i.verbose,[i.debug]:i.debug,[i.silly]:i.silly},i.DEFAULT_LEVEL=i.info;function s(d){if(typeof i.LEVELS_BY_NAME[d]>"u"){const f=Object.keys(i.LEVELS_BY_NAME).join(", ");throw new r.UniverseLogError(`There is no such log level: '${d}'. Available levels: [ ${f} ]`)}return i.LEVELS_BY_NAME[d]}i.valueOf=s;function a(d){if(typeof i.LEVELS_VALUES[d]>"u"){const f=Object.keys(i.LEVELS_BY_NAME).join(", ");throw new r.UniverseLogError(`There is no such log level: '${d}'. Available levels: [ ${f} ]`)}return i.LEVELS_VALUES[d]}i.levelToValue=a;function n(d){return a(d.level)<=a(d.threshold)}i.isLessOrEquallyVerbose=n;function u(d,f){return i.LEVELS_VALUES[d]>i.LEVELS_VALUES[f]?d:f}i.moreVerbose=u;function c(d,f){return i.LEVELS_VALUES[d]<i.LEVELS_VALUES[f]?d:f}i.lessVerbose=c})(e.LogLevel||(e.LogLevel={}))})(Vs)),Vs}var Dn={},ta={},Us={exports:{}},ju;function zc(){return ju||(ju=1,(function(e){e.exports=(function(i){var s={};function a(n){if(s[n])return s[n].exports;var u=s[n]={i:n,l:!1,exports:{}};return i[n].call(u.exports,u,u.exports,a),u.l=!0,u.exports}return a.m=i,a.c=s,a.d=function(n,u,c){a.o(n,u)||Object.defineProperty(n,u,{enumerable:!0,get:c})},a.r=function(n){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(n,"__esModule",{value:!0})},a.t=function(n,u){if(1&u&&(n=a(n)),8&u||4&u&&typeof n=="object"&&n&&n.__esModule)return n;var c=Object.create(null);if(a.r(c),Object.defineProperty(c,"default",{enumerable:!0,value:n}),2&u&&typeof n!="string")for(var d in n)a.d(c,d,(function(f){return n[f]}).bind(null,d));return c},a.n=function(n){var u=n&&n.__esModule?function(){return n.default}:function(){return n};return a.d(u,"a",u),u},a.o=function(n,u){return Object.prototype.hasOwnProperty.call(n,u)},a.p="",a(a.s=4)})([function(i,s,a){var n=this&&this.__importDefault||function(o){return o&&o.__esModule?o:{default:o}};Object.defineProperty(s,"__esModule",{value:!0});const u=n(a(1)),c=a(8),d=a(2),f=a(16);s.validatorSymbol=Symbol("validators"),s.Predicate=class{constructor(o,h={}){this.type=o,this.options=h,this.context={validators:[]},this.context=Object.assign({},this.context,this.options);const l=this.type[0].toLowerCase()+this.type.slice(1);this.addValidator({message:(p,x)=>`Expected ${x&&x.substring(this.type.length+1)||"argument"} to be of type \`${this.type}\` but received type \`${u.default(p)}\``,validator:p=>u.default[l](p)})}[d.testSymbol](o,h,l){for(const{validator:p,message:x}of this.context.validators){if(this.options.optional===!0&&o===void 0)continue;const w=p(o);if(w===!0)continue;let b=l;throw typeof l=="function"&&(b=l()),b=b?`${this.type} \`${b}\``:this.type,new c.ArgumentError(x(o,b,w),h)}}get[s.validatorSymbol](){return this.context.validators}get not(){return f.not(this)}validate(o){return this.addValidator({message:(h,l,p)=>typeof p=="string"?`(${l}) ${p}`:p(l),validator:h=>{const{message:l,validator:p}=o(h);return!!p||l}})}is(o){return this.addValidator({message:(h,l,p)=>p?`(${l}) ${p}`:`Expected ${l} \`${h}\` to pass custom validation function`,validator:o})}addValidator(o){return this.context.validators.push(o),this}}},function(i,s,a){Object.defineProperty(s,"__esModule",{value:!0});const n=typeof URL>"u"?a(15).URL:URL,{toString:u}=Object.prototype,c=g=>v=>typeof v===g,d=g=>{const v=u.call(g).slice(8,-1);if(v)return v},f=g=>v=>d(v)===g;function o(g){switch(g){case null:return"null";case!0:case!1:return"boolean"}switch(typeof g){case"undefined":return"undefined";case"string":return"string";case"number":return"number";case"bigint":return"bigint";case"symbol":return"symbol"}if(o.function_(g))return"Function";if(o.observable(g))return"Observable";if(o.array(g))return"Array";if(o.buffer(g))return"Buffer";const v=d(g);if(v)return v;if(g instanceof String||g instanceof Boolean||g instanceof Number)throw new TypeError("Please don't use object wrappers for primitive types");return"Object"}const h=g=>typeof g=="object";o.undefined=c("undefined"),o.string=c("string"),o.number=c("number"),o.bigint=c("bigint"),o.function_=c("function"),o.null_=(g=>g===null),o.class_=(g=>o.function_(g)&&g.toString().startsWith("class ")),o.boolean=(g=>g===!0||g===!1),o.symbol=c("symbol"),o.numericString=(g=>o.string(g)&&g.length>0&&!Number.isNaN(Number(g))),o.array=Array.isArray,o.buffer=(g=>!o.nullOrUndefined(g)&&!o.nullOrUndefined(g.constructor)&&o.function_(g.constructor.isBuffer)&&g.constructor.isBuffer(g)),o.nullOrUndefined=(g=>o.null_(g)||o.undefined(g)),o.object=(g=>!o.nullOrUndefined(g)&&(o.function_(g)||h(g))),o.iterable=(g=>!o.nullOrUndefined(g)&&o.function_(g[Symbol.iterator])),o.asyncIterable=(g=>!o.nullOrUndefined(g)&&o.function_(g[Symbol.asyncIterator])),o.generator=(g=>o.iterable(g)&&o.function_(g.next)&&o.function_(g.throw)),o.nativePromise=(g=>f("Promise")(g)),o.promise=(g=>o.nativePromise(g)||(v=>!o.null_(v)&&h(v)&&o.function_(v.then)&&o.function_(v.catch))(g)),o.generatorFunction=f("GeneratorFunction"),o.asyncFunction=f("AsyncFunction"),o.boundFunction=(g=>o.function_(g)&&!g.hasOwnProperty("prototype")),o.regExp=f("RegExp"),o.date=f("Date"),o.error=f("Error"),o.map=(g=>f("Map")(g)),o.set=(g=>f("Set")(g)),o.weakMap=(g=>f("WeakMap")(g)),o.weakSet=(g=>f("WeakSet")(g)),o.int8Array=f("Int8Array"),o.uint8Array=f("Uint8Array"),o.uint8ClampedArray=f("Uint8ClampedArray"),o.int16Array=f("Int16Array"),o.uint16Array=f("Uint16Array"),o.int32Array=f("Int32Array"),o.uint32Array=f("Uint32Array"),o.float32Array=f("Float32Array"),o.float64Array=f("Float64Array"),o.bigint64Array=f("BigInt64Array"),o.biguint64Array=f("BigUint64Array"),o.arrayBuffer=f("ArrayBuffer"),o.sharedArrayBuffer=f("SharedArrayBuffer"),o.dataView=f("DataView"),o.directInstanceOf=((g,v)=>Object.getPrototypeOf(g)===v.prototype),o.urlInstance=(g=>f("URL")(g)),o.urlString=(g=>{if(!o.string(g))return!1;try{return new n(g),!0}catch{return!1}}),o.truthy=(g=>!!g),o.falsy=(g=>!g),o.nan=(g=>Number.isNaN(g));const l=new Set(["undefined","string","number","bigint","boolean","symbol"]);o.primitive=(g=>o.null_(g)||l.has(typeof g)),o.integer=(g=>Number.isInteger(g)),o.safeInteger=(g=>Number.isSafeInteger(g)),o.plainObject=(g=>{if(d(g)!=="Object")return!1;const v=Object.getPrototypeOf(g);return v===null||v===Object.getPrototypeOf({})});const p=new Set(["Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Uint16Array","Int32Array","Uint32Array","Float32Array","Float64Array","BigInt64Array","BigUint64Array"]);o.typedArray=(g=>{const v=d(g);return v!==void 0&&p.has(v)}),o.arrayLike=(g=>!o.nullOrUndefined(g)&&!o.function_(g)&&(v=>o.safeInteger(v)&&v>=0)(g.length)),o.inRange=((g,v)=>{if(o.number(v))return g>=Math.min(0,v)&&g<=Math.max(v,0);if(o.array(v)&&v.length===2)return g>=Math.min(...v)&&g<=Math.max(...v);throw new TypeError(`Invalid range: ${JSON.stringify(v)}`)});const x=["innerHTML","ownerDocument","style","attributes","nodeValue"];o.domElement=(g=>o.object(g)&&g.nodeType===1&&o.string(g.nodeName)&&!o.plainObject(g)&&x.every(v=>v in g)),o.observable=(g=>!!g&&(!(!g[Symbol.observable]||g!==g[Symbol.observable]())||!(!g["@@observable"]||g!==g["@@observable"]()))),o.nodeStream=(g=>!o.nullOrUndefined(g)&&h(g)&&o.function_(g.pipe)&&!o.observable(g)),o.infinite=(g=>g===1/0||g===-1/0);const w=g=>v=>o.integer(v)&&Math.abs(v%2)===g;o.evenInteger=w(0),o.oddInteger=w(1),o.emptyArray=(g=>o.array(g)&&g.length===0),o.nonEmptyArray=(g=>o.array(g)&&g.length>0),o.emptyString=(g=>o.string(g)&&g.length===0),o.nonEmptyString=(g=>o.string(g)&&g.length>0),o.emptyStringOrWhitespace=(g=>o.emptyString(g)||(v=>o.string(v)&&/\S/.test(v)===!1)(g)),o.emptyObject=(g=>o.object(g)&&!o.map(g)&&!o.set(g)&&Object.keys(g).length===0),o.nonEmptyObject=(g=>o.object(g)&&!o.map(g)&&!o.set(g)&&Object.keys(g).length>0),o.emptySet=(g=>o.set(g)&&g.size===0),o.nonEmptySet=(g=>o.set(g)&&g.size>0),o.emptyMap=(g=>o.map(g)&&g.size===0),o.nonEmptyMap=(g=>o.map(g)&&g.size>0);const b=(g,v,_)=>{if(o.function_(v)===!1)throw new TypeError(`Invalid predicate: ${JSON.stringify(v)}`);if(_.length===0)throw new TypeError("Invalid number of values");return g.call(_,v)};o.any=((g,...v)=>b(Array.prototype.some,g,v)),o.all=((g,...v)=>b(Array.prototype.every,g,v)),Object.defineProperties(o,{class:{value:o.class_},function:{value:o.function_},null:{value:o.null_}}),i.exports=o,s.default=o},function(i,s,a){Object.defineProperty(s,"__esModule",{value:!0}),s.testSymbol=Symbol("test"),s.isPredicate=(n=>!!(n&&n[s.testSymbol]))},function(i,s,a){Object.defineProperty(s,"__esModule",{value:!0}),s.default=((n,u,c=5)=>{const d=[];for(const f of u)if(!n.has(f)&&(d.push(f),d.length===c))return d;return d.length===0||d})},function(i,s,a){var n=this&&this.__importDefault||function(w){return w&&w.__esModule?w:{default:w}};Object.defineProperty(s,"__esModule",{value:!0});const u=n(a(10)),c=a(11),d=a(0);s.Predicate=d.Predicate;const f=a(2),o=n(a(17)),h=n(a(6)),l=n(a(9)),p=(w,b,g)=>{if(!f.isPredicate(b)&&typeof b!="string")throw new TypeError(`Expected second argument to be a predicate or a string, got \`${typeof b}\``);if(f.isPredicate(b)){const v=u.default();l.default(w,()=>c.inferLabel(v),b)}else l.default(w,b,g)};Object.defineProperties(p,{isValid:{value:(w,b)=>{try{return p(w,b),!0}catch{return!1}}},create:{value:(w,b)=>g=>{if(f.isPredicate(w)){const v=u.default();l.default(g,()=>c.inferLabel(v),w)}else l.default(g,w,b)}}}),s.default=h.default(o.default(p));var x=a(6);s.StringPredicate=x.StringPredicate,s.NumberPredicate=x.NumberPredicate,s.BooleanPredicate=x.BooleanPredicate,s.ArrayPredicate=x.ArrayPredicate,s.ObjectPredicate=x.ObjectPredicate,s.DatePredicate=x.DatePredicate,s.ErrorPredicate=x.ErrorPredicate,s.MapPredicate=x.MapPredicate,s.WeakMapPredicate=x.WeakMapPredicate,s.SetPredicate=x.SetPredicate,s.WeakSetPredicate=x.WeakSetPredicate,s.AnyPredicate=x.AnyPredicate},function(i,s,a){(function(n){var u=200,c="__lodash_hash_undefined__",d=1,f=2,o=9007199254740991,h="[object Arguments]",l="[object Array]",p="[object AsyncFunction]",x="[object Boolean]",w="[object Date]",b="[object Error]",g="[object Function]",v="[object GeneratorFunction]",_="[object Map]",N="[object Number]",y="[object Null]",m="[object Object]",k="[object Proxy]",j="[object RegExp]",E="[object Set]",D="[object String]",C="[object Symbol]",P="[object Undefined]",$="[object ArrayBuffer]",H="[object DataView]",F=/^\[object .+?Constructor\]$/,B=/^(?:0|[1-9]\d*)$/,L={};L["[object Float32Array]"]=L["[object Float64Array]"]=L["[object Int8Array]"]=L["[object Int16Array]"]=L["[object Int32Array]"]=L["[object Uint8Array]"]=L["[object Uint8ClampedArray]"]=L["[object Uint16Array]"]=L["[object Uint32Array]"]=!0,L[h]=L[l]=L[$]=L[x]=L[H]=L[w]=L[b]=L[g]=L[_]=L[N]=L[m]=L[j]=L[E]=L[D]=L["[object WeakMap]"]=!1;var G=typeof gr=="object"&&gr&&gr.Object===Object&&gr,X=typeof self=="object"&&self&&self.Object===Object&&self,ee=G||X||Function("return this")(),R=s&&!s.nodeType&&s,se=R&&typeof n=="object"&&n&&!n.nodeType&&n,I=se&&se.exports===R,V=I&&G.process,J=(function(){try{return V&&V.binding&&V.binding("util")}catch{}})(),oe=J&&J.isTypedArray;function K(q,Y){for(var ie=-1,ue=q==null?0:q.length;++ie<ue;)if(Y(q[ie],ie,q))return!0;return!1}function te(q){var Y=-1,ie=Array(q.size);return q.forEach(function(ue,De){ie[++Y]=[De,ue]}),ie}function pe(q){var Y=-1,ie=Array(q.size);return q.forEach(function(ue){ie[++Y]=ue}),ie}var Ee,Z,ae,re=Array.prototype,ce=Function.prototype,xe=Object.prototype,ge=ee["__core-js_shared__"],ke=ce.toString,me=xe.hasOwnProperty,Ye=(Ee=/[^.]+$/.exec(ge&&ge.keys&&ge.keys.IE_PROTO||""))?"Symbol(src)_1."+Ee:"",we=xe.toString,fe=RegExp("^"+ke.call(me).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ae=I?ee.Buffer:void 0,Pe=ee.Symbol,Ve=ee.Uint8Array,St=xe.propertyIsEnumerable,Jt=re.splice,Ze=Pe?Pe.toStringTag:void 0,Yt=Object.getOwnPropertySymbols,vr=Ae?Ae.isBuffer:void 0,Qe=(Z=Object.keys,ae=Object,function(q){return Z(ae(q))}),Ct=Ot(ee,"DataView"),xt=Ot(ee,"Map"),or=Ot(ee,"Promise"),Zt=Ot(ee,"Set"),Dt=Ot(ee,"WeakMap"),yt=Ot(Object,"create"),Tt=Xt(Ct),Gr=Xt(xt),ft=Xt(or),wr=Xt(Zt),A=Xt(Dt),S=Pe?Pe.prototype:void 0,M=S?S.valueOf:void 0;function W(q){var Y=-1,ie=q==null?0:q.length;for(this.clear();++Y<ie;){var ue=q[Y];this.set(ue[0],ue[1])}}function ne(q){var Y=-1,ie=q==null?0:q.length;for(this.clear();++Y<ie;){var ue=q[Y];this.set(ue[0],ue[1])}}function he(q){var Y=-1,ie=q==null?0:q.length;for(this.clear();++Y<ie;){var ue=q[Y];this.set(ue[0],ue[1])}}function Ne(q){var Y=-1,ie=q==null?0:q.length;for(this.__data__=new he;++Y<ie;)this.add(q[Y])}function Ce(q){var Y=this.__data__=new ne(q);this.size=Y.size}function ht(q,Y){var ie=Jr(q),ue=!ie&&_s(q),De=!ie&&!ue&&ca(q),_e=!ie&&!ue&&!De&&cn(q),$e=ie||ue||De||_e,Ie=$e?(function(Le,kt){for(var nt=-1,He=Array(Le);++nt<Le;)He[nt]=kt(nt);return He})(q.length,String):[],mt=Ie.length;for(var qe in q)!me.call(q,qe)||$e&&(qe=="length"||De&&(qe=="offset"||qe=="parent")||_e&&(qe=="buffer"||qe=="byteLength"||qe=="byteOffset")||Pt(qe,mt))||Ie.push(qe);return Ie}function at(q,Y){for(var ie=q.length;ie--;)if(on(q[ie][0],Y))return ie;return-1}function Xe(q){return q==null?q===void 0?P:y:Ze&&Ze in Object(q)?(function(Y){var ie=me.call(Y,Ze),ue=Y[Ze];try{Y[Ze]=void 0;var De=!0}catch{}var _e=we.call(Y);return De&&(ie?Y[Ze]=ue:delete Y[Ze]),_e})(q):(function(Y){return we.call(Y)})(q)}function vt(q){return _r(q)&&Xe(q)==h}function wt(q,Y,ie,ue,De){return q===Y||(q==null||Y==null||!_r(q)&&!_r(Y)?q!=q&&Y!=Y:(function(_e,$e,Ie,mt,qe,Le){var kt=Jr(_e),nt=Jr($e),He=kt?l:pt(_e),Nt=nt?l:pt($e),ur=(He=He==h?m:He)==m,Yr=(Nt=Nt==h?m:Nt)==m,lr=He==Nt;if(lr&&ca(_e)){if(!ca($e))return!1;kt=!0,ur=!1}if(lr&&!ur)return Le||(Le=new Ce),kt||cn(_e)?ze(_e,$e,Ie,mt,qe,Le):(function(Se,je,$t,zt,fa,Be,Lt){switch($t){case H:if(Se.byteLength!=je.byteLength||Se.byteOffset!=je.byteOffset)return!1;Se=Se.buffer,je=je.buffer;case $:return!(Se.byteLength!=je.byteLength||!Be(new Ve(Se),new Ve(je)));case x:case w:case N:return on(+Se,+je);case b:return Se.name==je.name&&Se.message==je.message;case j:case D:return Se==je+"";case _:var Ht=te;case E:var Nr=zt&d;if(Ht||(Ht=pe),Se.size!=je.size&&!Nr)return!1;var Zr=Lt.get(Se);if(Zr)return Zr==je;zt|=f,Lt.set(Se,je);var cr=ze(Ht(Se),Ht(je),zt,fa,Be,Lt);return Lt.delete(Se),cr;case C:if(M)return M.call(Se)==M.call(je)}return!1})(_e,$e,He,Ie,mt,qe,Le);if(!(Ie&d)){var kr=ur&&me.call(_e,"__wrapped__"),da=Yr&&me.call($e,"__wrapped__");if(kr||da){var Ns=kr?_e.value():_e,js=da?$e.value():$e;return Le||(Le=new Ce),qe(Ns,js,Ie,mt,Le)}}return lr?(Le||(Le=new Ce),(function(Se,je,$t,zt,fa,Be){var Lt=$t&d,Ht=Bt(Se),Nr=Ht.length,Zr=Bt(je).length;if(Nr!=Zr&&!Lt)return!1;for(var cr=Nr;cr--;){var tt=Ht[cr];if(!(Lt?tt in je:me.call(je,tt)))return!1}var ha=Be.get(Se);if(ha&&Be.get(je))return ha==je;var Xr=!0;Be.set(Se,je),Be.set(je,Se);for(var dr=Lt;++cr<Nr;){tt=Ht[cr];var Kr=Se[tt],fr=je[tt];if(zt)var dn=Lt?zt(fr,Kr,tt,je,Se,Be):zt(Kr,fr,tt,Se,je,Be);if(!(dn===void 0?Kr===fr||fa(Kr,fr,$t,zt,Be):dn)){Xr=!1;break}dr||(dr=tt=="constructor")}if(Xr&&!dr){var jr=Se.constructor,Er=je.constructor;jr!=Er&&"constructor"in Se&&"constructor"in je&&!(typeof jr=="function"&&jr instanceof jr&&typeof Er=="function"&&Er instanceof Er)&&(Xr=!1)}return Be.delete(Se),Be.delete(je),Xr})(_e,$e,Ie,mt,qe,Le)):!1})(q,Y,ie,ue,wt,De))}function _t(q){return!(!ln(q)||(Y=q,Ye&&Ye in Y))&&(Ut(q)?fe:F).test(Xt(q));var Y}function et(q){if(ie=(Y=q)&&Y.constructor,ue=typeof ie=="function"&&ie.prototype||xe,Y!==ue)return Qe(q);var Y,ie,ue,De=[];for(var _e in Object(q))me.call(q,_e)&&_e!="constructor"&&De.push(_e);return De}function ze(q,Y,ie,ue,De,_e){var $e=ie&d,Ie=q.length,mt=Y.length;if(Ie!=mt&&!($e&&mt>Ie))return!1;var qe=_e.get(q);if(qe&&_e.get(Y))return qe==Y;var Le=-1,kt=!0,nt=ie&f?new Ne:void 0;for(_e.set(q,Y),_e.set(Y,q);++Le<Ie;){var He=q[Le],Nt=Y[Le];if(ue)var ur=$e?ue(Nt,He,Le,Y,q,_e):ue(He,Nt,Le,q,Y,_e);if(ur!==void 0){if(ur)continue;kt=!1;break}if(nt){if(!K(Y,function(Yr,lr){if(kr=lr,!nt.has(kr)&&(He===Yr||De(He,Yr,ie,ue,_e)))return nt.push(lr);var kr})){kt=!1;break}}else if(He!==Nt&&!De(He,Nt,ie,ue,_e)){kt=!1;break}}return _e.delete(q),_e.delete(Y),kt}function Bt(q){return(function(Y,ie,ue){var De=ie(Y);return Jr(Y)?De:(function(_e,$e){for(var Ie=-1,mt=$e.length,qe=_e.length;++Ie<mt;)_e[qe+Ie]=$e[Ie];return _e})(De,ue(Y))})(q,ks,Vt)}function Me(q,Y){var ie,ue,De=q.__data__;return((ue=typeof(ie=Y))=="string"||ue=="number"||ue=="symbol"||ue=="boolean"?ie!=="__proto__":ie===null)?De[typeof Y=="string"?"string":"hash"]:De.map}function Ot(q,Y){var ie=(function(ue,De){return ue?.[De]})(q,Y);return _t(ie)?ie:void 0}W.prototype.clear=function(){this.__data__=yt?yt(null):{},this.size=0},W.prototype.delete=function(q){var Y=this.has(q)&&delete this.__data__[q];return this.size-=Y?1:0,Y},W.prototype.get=function(q){var Y=this.__data__;if(yt){var ie=Y[q];return ie===c?void 0:ie}return me.call(Y,q)?Y[q]:void 0},W.prototype.has=function(q){var Y=this.__data__;return yt?Y[q]!==void 0:me.call(Y,q)},W.prototype.set=function(q,Y){var ie=this.__data__;return this.size+=this.has(q)?0:1,ie[q]=yt&&Y===void 0?c:Y,this},ne.prototype.clear=function(){this.__data__=[],this.size=0},ne.prototype.delete=function(q){var Y=this.__data__,ie=at(Y,q);return!(ie<0||(ie==Y.length-1?Y.pop():Jt.call(Y,ie,1),--this.size,0))},ne.prototype.get=function(q){var Y=this.__data__,ie=at(Y,q);return ie<0?void 0:Y[ie][1]},ne.prototype.has=function(q){return at(this.__data__,q)>-1},ne.prototype.set=function(q,Y){var ie=this.__data__,ue=at(ie,q);return ue<0?(++this.size,ie.push([q,Y])):ie[ue][1]=Y,this},he.prototype.clear=function(){this.size=0,this.__data__={hash:new W,map:new(xt||ne),string:new W}},he.prototype.delete=function(q){var Y=Me(this,q).delete(q);return this.size-=Y?1:0,Y},he.prototype.get=function(q){return Me(this,q).get(q)},he.prototype.has=function(q){return Me(this,q).has(q)},he.prototype.set=function(q,Y){var ie=Me(this,q),ue=ie.size;return ie.set(q,Y),this.size+=ie.size==ue?0:1,this},Ne.prototype.add=Ne.prototype.push=function(q){return this.__data__.set(q,c),this},Ne.prototype.has=function(q){return this.__data__.has(q)},Ce.prototype.clear=function(){this.__data__=new ne,this.size=0},Ce.prototype.delete=function(q){var Y=this.__data__,ie=Y.delete(q);return this.size=Y.size,ie},Ce.prototype.get=function(q){return this.__data__.get(q)},Ce.prototype.has=function(q){return this.__data__.has(q)},Ce.prototype.set=function(q,Y){var ie=this.__data__;if(ie instanceof ne){var ue=ie.__data__;if(!xt||ue.length<u-1)return ue.push([q,Y]),this.size=++ie.size,this;ie=this.__data__=new he(ue)}return ie.set(q,Y),this.size=ie.size,this};var Vt=Yt?function(q){return q==null?[]:(q=Object(q),(function(Y,ie){for(var ue=-1,De=Y==null?0:Y.length,_e=0,$e=[];++ue<De;){var Ie=Y[ue];ie(Ie,ue,Y)&&($e[_e++]=Ie)}return $e})(Yt(q),function(Y){return St.call(q,Y)}))}:function(){return[]},pt=Xe;function Pt(q,Y){return!!(Y=Y??o)&&(typeof q=="number"||B.test(q))&&q>-1&&q%1==0&&q<Y}function Xt(q){if(q!=null){try{return ke.call(q)}catch{}try{return q+""}catch{}}return""}function on(q,Y){return q===Y||q!=q&&Y!=Y}(Ct&&pt(new Ct(new ArrayBuffer(1)))!=H||xt&&pt(new xt)!=_||or&&pt(or.resolve())!="[object Promise]"||Zt&&pt(new Zt)!=E||Dt&&pt(new Dt)!="[object WeakMap]")&&(pt=function(q){var Y=Xe(q),ie=Y==m?q.constructor:void 0,ue=ie?Xt(ie):"";if(ue)switch(ue){case Tt:return H;case Gr:return _;case ft:return"[object Promise]";case wr:return E;case A:return"[object WeakMap]"}return Y});var _s=vt((function(){return arguments})())?vt:function(q){return _r(q)&&me.call(q,"callee")&&!St.call(q,"callee")},Jr=Array.isArray,ca=vr||function(){return!1};function Ut(q){if(!ln(q))return!1;var Y=Xe(q);return Y==g||Y==v||Y==p||Y==k}function un(q){return typeof q=="number"&&q>-1&&q%1==0&&q<=o}function ln(q){var Y=typeof q;return q!=null&&(Y=="object"||Y=="function")}function _r(q){return q!=null&&typeof q=="object"}var cn=oe?(function(q){return function(Y){return q(Y)}})(oe):function(q){return _r(q)&&un(q.length)&&!!L[Xe(q)]};function ks(q){return(Y=q)!=null&&un(Y.length)&&!Ut(Y)?ht(q):et(q);var Y}n.exports=function(q,Y){return wt(q,Y)}}).call(this,a(23)(i))},function(i,s,a){Object.defineProperty(s,"__esModule",{value:!0});const n=a(18);s.StringPredicate=n.StringPredicate;const u=a(20);s.NumberPredicate=u.NumberPredicate;const c=a(21);s.BooleanPredicate=c.BooleanPredicate;const d=a(0),f=a(22);s.ArrayPredicate=f.ArrayPredicate;const o=a(24);s.ObjectPredicate=o.ObjectPredicate;const h=a(29);s.DatePredicate=h.DatePredicate;const l=a(30);s.ErrorPredicate=l.ErrorPredicate;const p=a(31);s.MapPredicate=p.MapPredicate;const x=a(32);s.WeakMapPredicate=x.WeakMapPredicate;const w=a(33);s.SetPredicate=w.SetPredicate;const b=a(34);s.WeakSetPredicate=b.WeakSetPredicate;const g=a(35);s.AnyPredicate=g.AnyPredicate,s.default=((v,_)=>(Object.defineProperties(v,{string:{get:()=>new n.StringPredicate(_)},number:{get:()=>new u.NumberPredicate(_)},boolean:{get:()=>new c.BooleanPredicate(_)},undefined:{get:()=>new d.Predicate("undefined",_)},null:{get:()=>new d.Predicate("null",_)},nullOrUndefined:{get:()=>new d.Predicate("nullOrUndefined",_)},nan:{get:()=>new d.Predicate("nan",_)},symbol:{get:()=>new d.Predicate("symbol",_)},array:{get:()=>new f.ArrayPredicate(_)},object:{get:()=>new o.ObjectPredicate(_)},date:{get:()=>new h.DatePredicate(_)},error:{get:()=>new l.ErrorPredicate(_)},map:{get:()=>new p.MapPredicate(_)},weakMap:{get:()=>new x.WeakMapPredicate(_)},set:{get:()=>new w.SetPredicate(_)},weakSet:{get:()=>new b.WeakSetPredicate(_)},function:{get:()=>new d.Predicate("Function",_)},buffer:{get:()=>new d.Predicate("Buffer",_)},regExp:{get:()=>new d.Predicate("RegExp",_)},promise:{get:()=>new d.Predicate("Promise",_)},typedArray:{get:()=>new d.Predicate("TypedArray",_)},int8Array:{get:()=>new d.Predicate("Int8Array",_)},uint8Array:{get:()=>new d.Predicate("Uint8Array",_)},uint8ClampedArray:{get:()=>new d.Predicate("Uint8ClampedArray",_)},int16Array:{get:()=>new d.Predicate("Int16Array",_)},uint16Array:{get:()=>new d.Predicate("Uint16Array",_)},int32Array:{get:()=>new d.Predicate("Int32Array",_)},uint32Array:{get:()=>new d.Predicate("Uint32Array",_)},float32Array:{get:()=>new d.Predicate("Float32Array",_)},float64Array:{get:()=>new d.Predicate("Float64Array",_)},arrayBuffer:{get:()=>new d.Predicate("ArrayBuffer",_)},dataView:{get:()=>new d.Predicate("DataView",_)},iterable:{get:()=>new d.Predicate("Iterable",_)},any:{value:(...N)=>new g.AnyPredicate(N,_)}}),v))},function(i,s,a){var n=this&&this.__importDefault||function(c){return c&&c.__esModule?c:{default:c}};Object.defineProperty(s,"__esModule",{value:!0});const u=n(a(4));s.default=((c,d)=>{try{for(const f of c)u.default(f,d);return!0}catch(f){return f.message}})},function(i,s,a){Object.defineProperty(s,"__esModule",{value:!0}),s.ArgumentError=class extends Error{constructor(n,u){super(n),"captureStackTrace"in Error&&Error.captureStackTrace(this,u),this.name="ArgumentError"}}},function(i,s,a){Object.defineProperty(s,"__esModule",{value:!0});const n=a(2);s.default=function u(c,d,f){f[n.testSymbol](c,u,d)}},function(i,s,a){const n=()=>{const u=Error.prepareStackTrace;Error.prepareStackTrace=((d,f)=>f);const c=new Error().stack.slice(1);return Error.prepareStackTrace=u,c};i.exports=n,i.exports.default=n},function(i,s,a){var n=this&&this.__importStar||function(h){if(h&&h.__esModule)return h;var l={};if(h!=null)for(var p in h)Object.hasOwnProperty.call(h,p)&&(l[p]=h[p]);return l.default=h,l},u=this&&this.__importDefault||function(h){return h&&h.__esModule?h:{default:h}};Object.defineProperty(s,"__esModule",{value:!0});const c=n(a(12)),d=u(a(13)),f=u(a(14)),o=/^.*?\((.*?)[,)]/;s.inferLabel=(h=>{if(!f.default)return;const l=h[1],p=l.getFileName(),x=l.getLineNumber(),w=l.getColumnNumber();if(!p||x===null||w===null)return;let b=[];try{b=c.readFileSync(p,"utf8").split(`
|
|
129
|
+
`)}catch{return}let g=b[x-1];if(!g)return;g=g.slice(w-1);const v=o.exec(g);if(!v||!v[1])return;const _=v[1];return d.default(_)||d.default(_.split(".").pop())?_:void 0})},function(i,s){i.exports=dt},function(i,s,a){Object.defineProperty(s,"__esModule",{value:!0});const n=/^[a-z$_][a-z$_0-9]*$/i,u=new Set(["undefined","null","true","false","super","this","Infinity","NaN"]);s.default=(c=>c&&!u.has(c)&&n.test(c))},function(i,s,a){Object.defineProperty(s,"__esModule",{value:!0}),s.default=!!(typeof process<"u"&&process.versions&&process.versions.node)},function(i,s){i.exports=dt},function(i,s,a){Object.defineProperty(s,"__esModule",{value:!0});const n=a(0);s.not=(u=>{const c=u.addValidator;return u.addValidator=(d=>{const f=d.validator,o=d.message;return d.message=((h,l)=>`[NOT] ${o(h,l)}`),d.validator=(h=>!f(h)),u[n.validatorSymbol].push(d),u.addValidator=c,u}),u})},function(i,s,a){var n=this&&this.__importDefault||function(c){return c&&c.__esModule?c:{default:c}};Object.defineProperty(s,"__esModule",{value:!0});const u=n(a(6));s.default=(c=>(Object.defineProperties(c,{optional:{get:()=>u.default({},{optional:!0})}}),c))},function(i,s,a){var n=this&&this.__importDefault||function(f){return f&&f.__esModule?f:{default:f}};Object.defineProperty(s,"__esModule",{value:!0});const u=n(a(1)),c=n(a(19)),d=a(0);s.StringPredicate=class extends d.Predicate{constructor(f){super("string",f)}length(f){return this.addValidator({message:(o,h)=>`Expected ${h} to have length \`${f}\`, got \`${o}\``,validator:o=>o.length===f})}minLength(f){return this.addValidator({message:(o,h)=>`Expected ${h} to have a minimum length of \`${f}\`, got \`${o}\``,validator:o=>o.length>=f})}maxLength(f){return this.addValidator({message:(o,h)=>`Expected ${h} to have a maximum length of \`${f}\`, got \`${o}\``,validator:o=>o.length<=f})}matches(f){return this.addValidator({message:(o,h)=>`Expected ${h} to match \`${f}\`, got \`${o}\``,validator:o=>f.test(o)})}startsWith(f){return this.addValidator({message:(o,h)=>`Expected ${h} to start with \`${f}\`, got \`${o}\``,validator:o=>o.startsWith(f)})}endsWith(f){return this.addValidator({message:(o,h)=>`Expected ${h} to end with \`${f}\`, got \`${o}\``,validator:o=>o.endsWith(f)})}includes(f){return this.addValidator({message:(o,h)=>`Expected ${h} to include \`${f}\`, got \`${o}\``,validator:o=>o.includes(f)})}oneOf(f){return this.addValidator({message:(o,h)=>{let l=JSON.stringify(f);if(f.length>10){const p=f.length-10;l=JSON.stringify(f.slice(0,10)).replace(/]$/,`,…+${p} more]`)}return`Expected ${h} to be one of \`${l}\`, got \`${o}\``},validator:o=>f.includes(o)})}get empty(){return this.addValidator({message:(f,o)=>`Expected ${o} to be empty, got \`${f}\``,validator:f=>f===""})}get nonEmpty(){return this.addValidator({message:(f,o)=>`Expected ${o} to not be empty`,validator:f=>f!==""})}equals(f){return this.addValidator({message:(o,h)=>`Expected ${h} to be equal to \`${f}\`, got \`${o}\``,validator:o=>o===f})}get alphanumeric(){return this.addValidator({message:(f,o)=>`Expected ${o} to be alphanumeric, got \`${f}\``,validator:f=>/^[a-z\d]+$/i.test(f)})}get alphabetical(){return this.addValidator({message:(f,o)=>`Expected ${o} to be alphabetical, got \`${f}\``,validator:f=>/^[a-z]+$/gi.test(f)})}get numeric(){return this.addValidator({message:(f,o)=>`Expected ${o} to be numeric, got \`${f}\``,validator:f=>/^(\+|-)?\d+$/i.test(f)})}get date(){return this.addValidator({message:(f,o)=>`Expected ${o} to be a date, got \`${f}\``,validator:c.default})}get lowercase(){return this.addValidator({message:(f,o)=>`Expected ${o} to be lowercase, got \`${f}\``,validator:f=>f.trim()!==""&&f===f.toLowerCase()})}get uppercase(){return this.addValidator({message:(f,o)=>`Expected ${o} to be uppercase, got \`${f}\``,validator:f=>f.trim()!==""&&f===f.toUpperCase()})}get url(){return this.addValidator({message:(f,o)=>`Expected ${o} to be a URL, got \`${f}\``,validator:u.default.urlString})}}},function(i,s,a){i.exports=function(n){return!isNaN(Date.parse(n))}},function(i,s,a){var n=this&&this.__importDefault||function(d){return d&&d.__esModule?d:{default:d}};Object.defineProperty(s,"__esModule",{value:!0});const u=n(a(1)),c=a(0);s.NumberPredicate=class extends c.Predicate{constructor(d){super("number",d)}inRange(d,f){return this.addValidator({message:(o,h)=>`Expected ${h} to be in range [${d}..${f}], got ${o}`,validator:o=>u.default.inRange(o,[d,f])})}greaterThan(d){return this.addValidator({message:(f,o)=>`Expected ${o} to be greater than ${d}, got ${f}`,validator:f=>f>d})}greaterThanOrEqual(d){return this.addValidator({message:(f,o)=>`Expected ${o} to be greater than or equal to ${d}, got ${f}`,validator:f=>f>=d})}lessThan(d){return this.addValidator({message:(f,o)=>`Expected ${o} to be less than ${d}, got ${f}`,validator:f=>f<d})}lessThanOrEqual(d){return this.addValidator({message:(f,o)=>`Expected ${o} to be less than or equal to ${d}, got ${f}`,validator:f=>f<=d})}equal(d){return this.addValidator({message:(f,o)=>`Expected ${o} to be equal to ${d}, got ${f}`,validator:f=>f===d})}oneOf(d){return this.addValidator({message:(f,o)=>{let h=JSON.stringify(d);if(d.length>10){const l=d.length-10;h=JSON.stringify(d.slice(0,10)).replace(/]$/,`,…+${l} more]`)}return`Expected ${o} to be one of \`${h}\`, got ${f}`},validator:f=>d.includes(f)})}get integer(){return this.addValidator({message:(d,f)=>`Expected ${f} to be an integer, got ${d}`,validator:d=>u.default.integer(d)})}get finite(){return this.addValidator({message:(d,f)=>`Expected ${f} to be finite, got ${d}`,validator:d=>!u.default.infinite(d)})}get infinite(){return this.addValidator({message:(d,f)=>`Expected ${f} to be infinite, got ${d}`,validator:d=>u.default.infinite(d)})}get positive(){return this.addValidator({message:(d,f)=>`Expected ${f} to be positive, got ${d}`,validator:d=>d>0})}get negative(){return this.addValidator({message:(d,f)=>`Expected ${f} to be negative, got ${d}`,validator:d=>d<0})}get integerOrInfinite(){return this.addValidator({message:(d,f)=>`Expected ${f} to be an integer or infinite, got ${d}`,validator:d=>u.default.integer(d)||u.default.infinite(d)})}get uint8(){return this.integer.inRange(0,255)}get uint16(){return this.integer.inRange(0,65535)}get uint32(){return this.integer.inRange(0,4294967295)}get int8(){return this.integer.inRange(-128,127)}get int16(){return this.integer.inRange(-32768,32767)}get int32(){return this.integer.inRange(-2147483648,2147483647)}}},function(i,s,a){Object.defineProperty(s,"__esModule",{value:!0});const n=a(0);s.BooleanPredicate=class extends n.Predicate{constructor(u){super("boolean",u)}get true(){return this.addValidator({message:(u,c)=>`Expected ${c} to be true, got ${u}`,validator:u=>u===!0})}get false(){return this.addValidator({message:(u,c)=>`Expected ${c} to be false, got ${u}`,validator:u=>u===!1})}}},function(i,s,a){var n=this&&this.__importDefault||function(f){return f&&f.__esModule?f:{default:f}};Object.defineProperty(s,"__esModule",{value:!0});const u=n(a(5)),c=n(a(4)),d=a(0);s.ArrayPredicate=class extends d.Predicate{constructor(f){super("array",f)}length(f){return this.addValidator({message:(o,h)=>`Expected ${h} to have length \`${f}\`, got \`${o.length}\``,validator:o=>o.length===f})}minLength(f){return this.addValidator({message:(o,h)=>`Expected ${h} to have a minimum length of \`${f}\`, got \`${o.length}\``,validator:o=>o.length>=f})}maxLength(f){return this.addValidator({message:(o,h)=>`Expected ${h} to have a maximum length of \`${f}\`, got \`${o.length}\``,validator:o=>o.length<=f})}startsWith(f){return this.addValidator({message:(o,h)=>`Expected ${h} to start with \`${f}\`, got \`${o[0]}\``,validator:o=>o[0]===f})}endsWith(f){return this.addValidator({message:(o,h)=>`Expected ${h} to end with \`${f}\`, got \`${o[o.length-1]}\``,validator:o=>o[o.length-1]===f})}includes(...f){return this.addValidator({message:(o,h)=>`Expected ${h} to include all elements of \`${JSON.stringify(f)}\`, got \`${JSON.stringify(o)}\``,validator:o=>f.every(h=>o.indexOf(h)!==-1)})}includesAny(...f){return this.addValidator({message:(o,h)=>`Expected ${h} to include any element of \`${JSON.stringify(f)}\`, got \`${JSON.stringify(o)}\``,validator:o=>f.some(h=>o.indexOf(h)!==-1)})}get empty(){return this.addValidator({message:(f,o)=>`Expected ${o} to be empty, got \`${JSON.stringify(f)}\``,validator:f=>f.length===0})}get nonEmpty(){return this.addValidator({message:(f,o)=>`Expected ${o} to not be empty`,validator:f=>f.length>0})}deepEqual(f){return this.addValidator({message:(o,h)=>`Expected ${h} to be deeply equal to \`${JSON.stringify(f)}\`, got \`${JSON.stringify(o)}\``,validator:o=>u.default(o,f)})}ofType(f){let o;return this.addValidator({message:(h,l)=>`(${l}) ${o}`,validator:h=>{try{for(const l of h)c.default(l,f);return!0}catch(l){return o=l.message,!1}}})}}},function(i,s){i.exports=function(a){return a.webpackPolyfill||(a.deprecate=function(){},a.paths=[],a.children||(a.children=[]),Object.defineProperty(a,"loaded",{enumerable:!0,get:function(){return a.l}}),Object.defineProperty(a,"id",{enumerable:!0,get:function(){return a.i}}),a.webpackPolyfill=1),a}},function(i,s,a){var n=this&&this.__importDefault||function(x){return x&&x.__esModule?x:{default:x}};Object.defineProperty(s,"__esModule",{value:!0});const u=n(a(1)),c=n(a(25)),d=n(a(5)),f=a(0),o=n(a(3)),h=n(a(7)),l=n(a(27)),p=a(28);s.ObjectPredicate=class extends f.Predicate{constructor(x){super("object",x)}get plain(){return this.addValidator({message:(x,w)=>`Expected ${w} to be a plain object`,validator:x=>u.default.plainObject(x)})}get empty(){return this.addValidator({message:(x,w)=>`Expected ${w} to be empty, got \`${JSON.stringify(x)}\``,validator:x=>Object.keys(x).length===0})}get nonEmpty(){return this.addValidator({message:(x,w)=>`Expected ${w} to not be empty`,validator:x=>Object.keys(x).length>0})}valuesOfType(x){return this.addValidator({message:(w,b,g)=>`(${b}) ${g}`,validator:w=>{const b=Object.keys(w).map(g=>w[g]);return h.default(b,x)}})}deepValuesOfType(x){return this.addValidator({message:(w,b,g)=>`(${b}) ${g}`,validator:w=>l.default(w,x)})}deepEqual(x){return this.addValidator({message:(w,b)=>`Expected ${b} to be deeply equal to \`${JSON.stringify(x)}\`, got \`${JSON.stringify(w)}\``,validator:w=>d.default(w,x)})}instanceOf(x){return this.addValidator({message:(w,b)=>{let g=w.constructor.name;return g&&g!=="Object"||(g=JSON.stringify(w)),`Expected ${b} \`${g}\` to be of type \`${x.name}\``},validator:w=>w instanceof x})}hasKeys(...x){return this.addValidator({message:(w,b,g)=>`Expected ${b} to have keys \`${JSON.stringify(g)}\``,validator:w=>o.default({has:b=>c.default.has(w,b)},x)})}hasAnyKeys(...x){return this.addValidator({message:(w,b)=>`Expected ${b} to have any key of \`${JSON.stringify(x)}\``,validator:w=>x.some(b=>c.default.has(w,b))})}partialShape(x){return this.addValidator({message:(w,b,g)=>`${g.replace("Expected","Expected property")} in ${b}`,validator:w=>p.partial(w,x)})}exactShape(x){return this.addValidator({message:(w,b,g)=>`${g.replace("Expected","Expected property")} in ${b}`,validator:w=>p.exact(w,x)})}}},function(i,s,a){const n=a(26);function u(c){const d=c.split("."),f=[];for(let o=0;o<d.length;o++){let h=d[o];for(;h[h.length-1]==="\\"&&d[o+1]!==void 0;)h=h.slice(0,-1)+".",h+=d[++o];f.push(h)}return f}i.exports={get(c,d,f){if(!n(c)||typeof d!="string")return f===void 0?c:f;const o=u(d);for(let h=0;h<o.length;h++){if(!Object.prototype.propertyIsEnumerable.call(c,o[h]))return f;if((c=c[o[h]])==null){if(h!==o.length-1)return f;break}}return c},set(c,d,f){if(!n(c)||typeof d!="string")return c;const o=c,h=u(d);for(let l=0;l<h.length;l++){const p=h[l];n(c[p])||(c[p]={}),l===h.length-1&&(c[p]=f),c=c[p]}return o},delete(c,d){if(!n(c)||typeof d!="string")return;const f=u(d);for(let o=0;o<f.length;o++){const h=f[o];if(o===f.length-1)return void delete c[h];if(c=c[h],!n(c))return}},has(c,d){if(!n(c)||typeof d!="string")return!1;const f=u(d);for(let o=0;o<f.length;o++){if(!n(c)||!(f[o]in c))return!1;c=c[f[o]]}return!0}}},function(i,s,a){i.exports=function(n){var u=typeof n;return n!==null&&(u==="object"||u==="function")}},function(i,s,a){var n=this&&this.__importDefault||function(f){return f&&f.__esModule?f:{default:f}};Object.defineProperty(s,"__esModule",{value:!0});const u=n(a(1)),c=n(a(4)),d=(f,o)=>u.default.plainObject(f)?Object.keys(f).every(h=>d(f[h],o)):(c.default(f,o),!0);s.default=((f,o)=>{try{return d(f,o)}catch(h){return h.message}})},function(i,s,a){var n=this&&this.__importDefault||function(f){return f&&f.__esModule?f:{default:f}};Object.defineProperty(s,"__esModule",{value:!0});const u=n(a(1)),c=n(a(9)),d=a(2);s.partial=function f(o,h,l){try{for(const p of Object.keys(h)){const x=l?`${l}.${p}`:p;if(d.isPredicate(h[p]))c.default(o[p],x,h[p]);else if(u.default.plainObject(h[p])){const w=f(o[p],h[p],x);if(w!==!0)return w}}return!0}catch(p){return p.message}},s.exact=function f(o,h,l){try{const p=new Set(Object.keys(o));for(const x of Object.keys(h)){p.delete(x);const w=l?`${l}.${x}`:x;if(d.isPredicate(h[x]))c.default(o[x],w,h[x]);else if(u.default.plainObject(h[x])){if(!Object.prototype.hasOwnProperty.call(o,x))return`Expected \`${w}\` to exist`;const b=f(o[x],h[x],w);if(b!==!0)return b}}if(p.size>0){const x=Array.from(p.keys())[0];return`Did not expect property \`${l?`${l}.${x}`:x}\` to exist, got \`${o[x]}\``}return!0}catch(p){return p.message}}},function(i,s,a){Object.defineProperty(s,"__esModule",{value:!0});const n=a(0);s.DatePredicate=class extends n.Predicate{constructor(u){super("date",u)}before(u){return this.addValidator({message:(c,d)=>`Expected ${d} ${c.toISOString()} to be before ${u.toISOString()}`,validator:c=>c.getTime()<u.getTime()})}after(u){return this.addValidator({message:(c,d)=>`Expected ${d} ${c.toISOString()} to be after ${u.toISOString()}`,validator:c=>c.getTime()>u.getTime()})}}},function(i,s,a){Object.defineProperty(s,"__esModule",{value:!0});const n=a(0);s.ErrorPredicate=class extends n.Predicate{constructor(u){super("error",u)}name(u){return this.addValidator({message:(c,d)=>`Expected ${d} to have name \`${u}\`, got \`${c.name}\``,validator:c=>c.name===u})}message(u){return this.addValidator({message:(c,d)=>`Expected ${d} message to be \`${u}\`, got \`${c.message}\``,validator:c=>c.message===u})}messageIncludes(u){return this.addValidator({message:(c,d)=>`Expected ${d} message to include \`${u}\`, got \`${c.message}\``,validator:c=>c.message.includes(u)})}hasKeys(...u){return this.addValidator({message:(c,d)=>`Expected ${d} message to have keys \`${u.join("`, `")}\``,validator:c=>u.every(d=>c.hasOwnProperty(d))})}instanceOf(u){return this.addValidator({message:(c,d)=>`Expected ${d} \`${c.name}\` to be of type \`${u.name}\``,validator:c=>c instanceof u})}get typeError(){return this.instanceOf(TypeError)}get evalError(){return this.instanceOf(EvalError)}get rangeError(){return this.instanceOf(RangeError)}get referenceError(){return this.instanceOf(ReferenceError)}get syntaxError(){return this.instanceOf(SyntaxError)}get uriError(){return this.instanceOf(URIError)}}},function(i,s,a){var n=this&&this.__importDefault||function(o){return o&&o.__esModule?o:{default:o}};Object.defineProperty(s,"__esModule",{value:!0});const u=n(a(5)),c=a(0),d=n(a(3)),f=n(a(7));s.MapPredicate=class extends c.Predicate{constructor(o){super("Map",o)}size(o){return this.addValidator({message:(h,l)=>`Expected ${l} to have size \`${o}\`, got \`${h.size}\``,validator:h=>h.size===o})}minSize(o){return this.addValidator({message:(h,l)=>`Expected ${l} to have a minimum size of \`${o}\`, got \`${h.size}\``,validator:h=>h.size>=o})}maxSize(o){return this.addValidator({message:(h,l)=>`Expected ${l} to have a maximum size of \`${o}\`, got \`${h.size}\``,validator:h=>h.size<=o})}hasKeys(...o){return this.addValidator({message:(h,l,p)=>`Expected ${l} to have keys \`${JSON.stringify(p)}\``,validator:h=>d.default(h,o)})}hasAnyKeys(...o){return this.addValidator({message:(h,l)=>`Expected ${l} to have any key of \`${JSON.stringify(o)}\``,validator:h=>o.some(l=>h.has(l))})}hasValues(...o){return this.addValidator({message:(h,l,p)=>`Expected ${l} to have values \`${JSON.stringify(p)}\``,validator:h=>d.default(new Set(h.values()),o)})}hasAnyValues(...o){return this.addValidator({message:(h,l)=>`Expected ${l} to have any value of \`${JSON.stringify(o)}\``,validator:h=>{const l=new Set(h.values());return o.some(p=>l.has(p))}})}keysOfType(o){return this.addValidator({message:(h,l,p)=>`(${l}) ${p}`,validator:h=>f.default(h.keys(),o)})}valuesOfType(o){return this.addValidator({message:(h,l,p)=>`(${l}) ${p}`,validator:h=>f.default(h.values(),o)})}get empty(){return this.addValidator({message:(o,h)=>`Expected ${h} to be empty, got \`${JSON.stringify(Array.from(o))}\``,validator:o=>o.size===0})}get nonEmpty(){return this.addValidator({message:(o,h)=>`Expected ${h} to not be empty`,validator:o=>o.size>0})}deepEqual(o){return this.addValidator({message:(h,l)=>`Expected ${l} to be deeply equal to \`${JSON.stringify(Array.from(o))}\`, got \`${JSON.stringify(Array.from(h))}\``,validator:h=>u.default(h,o)})}}},function(i,s,a){var n=this&&this.__importDefault||function(d){return d&&d.__esModule?d:{default:d}};Object.defineProperty(s,"__esModule",{value:!0});const u=a(0),c=n(a(3));s.WeakMapPredicate=class extends u.Predicate{constructor(d){super("WeakMap",d)}hasKeys(...d){return this.addValidator({message:(f,o,h)=>`Expected ${o} to have keys \`${JSON.stringify(h)}\``,validator:f=>c.default(f,d)})}hasAnyKeys(...d){return this.addValidator({message:(f,o)=>`Expected ${o} to have any key of \`${JSON.stringify(d)}\``,validator:f=>d.some(o=>f.has(o))})}}},function(i,s,a){var n=this&&this.__importDefault||function(o){return o&&o.__esModule?o:{default:o}};Object.defineProperty(s,"__esModule",{value:!0});const u=n(a(5)),c=a(0),d=n(a(3)),f=n(a(7));s.SetPredicate=class extends c.Predicate{constructor(o){super("Set",o)}size(o){return this.addValidator({message:(h,l)=>`Expected ${l} to have size \`${o}\`, got \`${h.size}\``,validator:h=>h.size===o})}minSize(o){return this.addValidator({message:(h,l)=>`Expected ${l} to have a minimum size of \`${o}\`, got \`${h.size}\``,validator:h=>h.size>=o})}maxSize(o){return this.addValidator({message:(h,l)=>`Expected ${l} to have a maximum size of \`${o}\`, got \`${h.size}\``,validator:h=>h.size<=o})}has(...o){return this.addValidator({message:(h,l,p)=>`Expected ${l} to have items \`${JSON.stringify(p)}\``,validator:h=>d.default(h,o)})}hasAny(...o){return this.addValidator({message:(h,l)=>`Expected ${l} to have any item of \`${JSON.stringify(o)}\``,validator:h=>o.some(l=>h.has(l))})}ofType(o){return this.addValidator({message:(h,l,p)=>`(${l}) ${p}`,validator:h=>f.default(h,o)})}get empty(){return this.addValidator({message:(o,h)=>`Expected ${h} to be empty, got \`${JSON.stringify(Array.from(o))}\``,validator:o=>o.size===0})}get nonEmpty(){return this.addValidator({message:(o,h)=>`Expected ${h} to not be empty`,validator:o=>o.size>0})}deepEqual(o){return this.addValidator({message:(h,l)=>`Expected ${l} to be deeply equal to \`${JSON.stringify(Array.from(o))}\`, got \`${JSON.stringify(Array.from(h))}\``,validator:h=>u.default(h,o)})}}},function(i,s,a){var n=this&&this.__importDefault||function(d){return d&&d.__esModule?d:{default:d}};Object.defineProperty(s,"__esModule",{value:!0});const u=a(0),c=n(a(3));s.WeakSetPredicate=class extends u.Predicate{constructor(d){super("WeakSet",d)}has(...d){return this.addValidator({message:(f,o,h)=>`Expected ${o} to have items \`${JSON.stringify(h)}\``,validator:f=>c.default(f,d)})}hasAny(...d){return this.addValidator({message:(f,o)=>`Expected ${o} to have any item of \`${JSON.stringify(d)}\``,validator:f=>d.some(o=>f.has(o))})}}},function(i,s,a){Object.defineProperty(s,"__esModule",{value:!0});const n=a(8),u=a(2);s.AnyPredicate=class{constructor(c,d={}){this.predicates=c,this.options=d}[u.testSymbol](c,d,f){const o=["Any predicate failed with the following errors:"];for(const h of this.predicates)try{return void d(c,f,h)}catch(l){if(c===void 0&&this.options.optional===!0)return;o.push(`- ${l.message}`)}throw new n.ArgumentError(o.join(`
|
|
130
|
+
`),d)}}}]);const r=e.exports;e.exports=r.default,Object.assign(e.exports,r)})(Us)),Us.exports}var zs={},Tn={},Eu;function gh(){if(Eu)return Tn;Eu=1,Object.defineProperty(Tn,"__esModule",{value:!0});let e=class Ri{constructor(i){this.pretty=!1,this.pretty=i}format(i,s){const a=Object.assign({},s,i);return this.pretty?JSON.stringify(a,void 0,2)+`
|
|
131
|
+
`:JSON.stringify(a)}getName(){return this.pretty?Ri.FORMAT_NAME_PRETTY:Ri.FORMAT_NAME}};return e.FORMAT_NAME="json",e.FORMAT_NAME_PRETTY="json_pretty",Tn.JsonLogFormat=e,Tn}var On={},Hs={},Au;function ms(){return Au||(Au=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),(function(r){r.EMPTY_METADATA={};function i(s){let a=s.service?`${s.service}.`:s.project?`${s.project}.`:"";return a+=s.module?`${s.module}.`:"",a+=s.library?`[${s.library}].`:"",a+=s.tag||"",a||(a="universe-log-empty-id"),a}r.getBestIdentifier=i})(e.LogMetadata||(e.LogMetadata={}))})(Hs)),Hs}var Pn={},Su;function Hc(){if(Su)return Pn;Su=1,Object.defineProperty(Pn,"__esModule",{value:!0});let e=class{static getTimestamp(){return Date.now()}static getUTCISOTime(){return new Date().toISOString()}};return Pn.TimeUtils=e,Pn}var Cu;function bh(){if(Cu)return On;Cu=1,Object.defineProperty(On,"__esModule",{value:!0});const e=ms(),r=Hc();let i=class Wc{format(a,n){const u=a.time_iso||new Date(a.timestamp).toISOString()||r.TimeUtils.getUTCISOTime();return`${e.LogMetadata.getBestIdentifier(n)} | ${u} [${a.level}]: ${a.message}`+this.includeStackIfPresent(a)}getName(){return Wc.FORMAT_NAME}includeStackIfPresent(a){return a.error&&a.error.stack?`
|
|
132
|
+
${a.error.stack}`:""}};return i.FORMAT_NAME="oneline",On.OnelineLogFormat=i,On}var Du;function gs(){return Du||(Du=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0});const r=ps(),i=gh(),s=bh();(function(a){a.FORMATS={json:new i.JsonLogFormat(!1),json_pretty:new i.JsonLogFormat(!0),oneline:new s.OnelineLogFormat},a.KEYS=Object.freeze({json:"json",json_pretty:"json_pretty",oneline:"oneline"}),a.DEFAULT_FORMAT=a.FORMATS.oneline;function n(u){if(typeof a.FORMATS[u]>"u"){const c=Object.keys(a.FORMATS).join(",");throw new r.UniverseLogError(`There is no such log format: '${u}'. Available formats: [ ${c} ]`)}return a.FORMATS[u]}a.valueOf=n})(e.LogFormats||(e.LogFormats={}))})(zs)),zs}var $n={},Tu;function xh(){if(Tu)return $n;Tu=1,Object.defineProperty($n,"__esModule",{value:!0});let e=class{static log(i){console.error(`UniverseLog.FallbackLog: ${i}`)}};return $n.FallbackLog=e,$n}var Ln={},Ou;function Gc(){if(Ou)return Ln;Ou=1,Object.defineProperty(Ln,"__esModule",{value:!0});const e=ps(),r=new Function("try {return this===window;}catch(e){ return false;}"),i=new Function("try {return this===global;}catch(e){return false;}"),s=new Function("try {return this;}catch(e){return undefined}");function a(c){const d=s();if(!d)throw new e.UniverseLogError("PortableEnv: environment is browser, but could not get window object");return d[c]}function n(c){if(!process)throw new e.UniverseLogError("PortableEnv: environment is node, but process object does not exist");if(!process.env)throw new e.UniverseLogError("PortableEnv: environment is node, but process.env object does not exist");if(process.env[c])return process.env[c]}function u(c){if(r())return a(c);if(i())return n(c);throw new e.UniverseLogError("PortableEnv: unknown environment (not browser, not node)")}return Ln.PortableEnv=u,Ln}var Mn={},Pu;function Jc(){if(Pu)return Mn;Pu=1,Object.defineProperty(Mn,"__esModule",{value:!0});class e{}return e.LEAST_LEVEL_ENV="LOG_LEVEL",e.LOG_FORMAT_ENV="LOG_FORMAT",e.LOG_METADATA_ENV="LOG_METADATA",e.REEVALUATE_CONFIG_AFTER_MS=150,e.DEFAULT_LOG_FN=r=>console.error(r),Mn.StaticConfig=e,Mn}var $u;function yh(){if($u)return ta;$u=1;var e=ta&&ta.__rest||function(f,o){var h={};for(var l in f)Object.prototype.hasOwnProperty.call(f,l)&&o.indexOf(l)<0&&(h[l]=f[l]);if(f!=null&&typeof Object.getOwnPropertySymbols=="function")for(var p=0,l=Object.getOwnPropertySymbols(f);p<l.length;p++)o.indexOf(l[p])<0&&Object.prototype.propertyIsEnumerable.call(f,l[p])&&(h[l[p]]=f[l[p]]);return h};Object.defineProperty(ta,"__esModule",{value:!0});const r=zc(),i=gs(),s=xh(),a=an(),n=ms(),u=Gc(),c=Jc();let d=class{constructor(o){this.levelEvaluationEnvNames=[],this.level=a.LogLevel.DEFAULT_LEVEL,this.metadata=n.LogMetadata.EMPTY_METADATA,this.nextReevaluateTimestampMs=0,this.levelEvaluationEnvNames=o.levelEvaluationEnvNames,r.default(this.levelEvaluationEnvNames,"levelEvaluationEnvNames",r.default.array.ofType(r.default.string)),this.fallbackLog=o.fallbackLog,r.default(this.fallbackLog,"fallbackLog",r.default.function),this.defaultFormat=o.defaultFormat,r.default(this.defaultFormat,"defaultFormat",r.default.object),this.format=this.defaultFormat,this.evaluateIfRequired()}setLevelEvaluationEnvNames(o){this.levelEvaluationEnvNames=o,this.evaluateIfRequired()}getLevel(){return this.level}getFormat(){return this.format}getMetadata(){return this.metadata}evaluateIfRequired(){if(!(Date.now()<this.nextReevaluateTimestampMs))try{this.nextReevaluateTimestampMs=Date.now()+c.StaticConfig.REEVALUATE_CONFIG_AFTER_MS,this.evaluate()}catch(o){this.fallbackLog(`Could not evaluate live log config: ${o}: ${o.stack}`)}}evaluate(){this.format=this.evaluateFormat(),this.level=this.evaluateLogLevel(),this.metadata=this.evaluateMetadata()}evaluateFormat(){const o=u.PortableEnv(c.StaticConfig.LOG_FORMAT_ENV);return o?i.LogFormats.valueOf(o):this.defaultFormat}evaluateLogLevel(){const o=this.chooseMostVerboseLevel(this.getEnvValues(this.levelEvaluationEnvNames));if(o)return o;const h=this.chooseMostVerboseLevel(this.getEnvValues([c.StaticConfig.LEAST_LEVEL_ENV]));return h||a.LogLevel.DEFAULT_LEVEL}getEnvValues(o){return o.map(l=>u.PortableEnv(l)).filter(l=>!!l).map(l=>l||"unreachable")}chooseMostVerboseLevel(o){const h=o.map(p=>a.LogLevel.valueOf(p));return h.length===0?void 0:h.reduce((p,x)=>a.LogLevel.moreVerbose(p,x))}evaluateMetadata(){try{const o=u.PortableEnv(c.StaticConfig.LOG_METADATA_ENV);if(o){const h=JSON.parse(o);return this.removeTagFromMetadata(h)}}catch(o){s.FallbackLog.log(`Could not parse value of ${c.StaticConfig.LOG_METADATA_ENV} env: ${o}`)}return n.LogMetadata.EMPTY_METADATA}removeTagFromMetadata(o){const{tag:h}=o;return e(o,["tag"])}};return ta.LiveLogConfig=d,ta}var Rn={},Lu;function vh(){if(Lu)return Rn;Lu=1,Object.defineProperty(Rn,"__esModule",{value:!0});const e=fs(),r=an(),i=Hc();let s=class Gt{static parse(n,u){let c=Gt.basicLogMsg(n);for(const d of u)c=Object.assign({},c,Gt.parseElem(d,c));return c}static basicLogMsg(n){return{time_iso:i.TimeUtils.getUTCISOTime(),timestamp:i.TimeUtils.getTimestamp(),level:n,level_value:r.LogLevel.LEVELS_VALUES[n]}}static parseElem(n,u){return typeof n=="string"?Gt.parseString(n,u):n instanceof Error?Gt.parseError(n,u):typeof n=="object"?Gt.parseObject(n,u):Gt.parseOther(n,u)}static parseString(n,u){return{message:(u.message?u.message+"; ":"")+n}}static parseError(n,u){const c={};return c.message=(u.message?u.message+"; ":"")+(n+"").trim(),u.error?(c.other_errors=[...u.other_errors||[]],c.other_errors.push(Gt.errorToObj(n))):c.error=Gt.errorToObj(n),c}static errorToObj(n){return n instanceof e.default?Object.assign({name:n.name,message:n.message,stack:n.stack},n.cause?{cause:Gt.errorToObj(n.cause)}:{}):{name:n.name,message:n.message,stack:n.stack}}static parseObject(n,u){return Object.assign({},n)}static parseOther(n,u){return{others:[...u.others||[],n]}}};return Rn.ParseLogMsg=s,Rn}var Ws={},Mu;function Yc(){return Mu||(Mu=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0});const r=zc(),i=gs();(function(s){function a(n){r.default(n.levelEnvs,"Properties.levelEnvs",r.default.any(r.default.undefined,r.default.array.ofType(r.default.string))),r.default(n.metadata,"Properties.metadata",r.default.optional.object),r.default(n.logFn,"Properties.logFn",r.default.any(r.default.undefined,r.default.function)),r.default(n.defaultFormat,"Properties.defaultFormat",r.default.optional.string.oneOf(Object.keys(i.LogFormats.KEYS)))}s.validate=a})(e.Properties||(e.Properties={}))})(Ws)),Ws}var Ru;function Xc(){if(Ru)return Dn;Ru=1,Object.defineProperty(Dn,"__esModule",{value:!0});const e=yh(),r=an(),i=ms(),s=Jc(),a=gs(),n=vh(),u=Yc();let c=class Zc{constructor(f){if(this.instanceMetadata=i.LogMetadata.EMPTY_METADATA,"clone"in f){this.instanceMetadata=Object.assign({},f.clone.instanceMetadata,f.newMetadata),this.liveConfig=f.clone.liveConfig,this.logFn=f.clone.logFn;return}u.Properties.validate(f),f.metadata&&(this.instanceMetadata=f.metadata),f.logFn?this.logFn=f.logFn:this.logFn=s.StaticConfig.DEFAULT_LOG_FN;const o=f.defaultFormat?a.LogFormats.valueOf(f.defaultFormat):a.LogFormats.DEFAULT_FORMAT;this.liveConfig=new e.LiveLogConfig({levelEvaluationEnvNames:f.levelEnvs||[],fallbackLog:this.logFn,defaultFormat:o})}cloneWithMetadata(f){return new Zc({clone:this,newMetadata:f})}getLevel(){return this.liveConfig.getLevel()}getFormatName(){return this.liveConfig.getFormat().getName()}getMetadata(){return Object.assign({},this.instanceMetadata,this.liveConfig.getMetadata())}doEfficientLog(f,o){this.reevaluateConfigIfRequired();const h=r.LogLevel.LEVELS_VALUES[this.getLevel()];r.LogLevel.LEVELS_VALUES[f]<=h&&this.doLog(f,o())}doLog(f,...o){if(this.reevaluateConfigIfRequired(),o.length!==0&&(o.length===1&&Array.isArray(o[0])&&(o=o[0]),r.LogLevel.isLessOrEquallyVerbose({level:f,threshold:this.getLevel()}))){const h=n.ParseLogMsg.parse(f,o),l=this.liveConfig.getFormat().format(h,this.getMetadata());this.rawWriteToLog(l)}}rawWriteToLog(f){this.logFn(f)}reevaluateConfigIfRequired(){this.liveConfig.evaluateIfRequired()}};return Dn.LogEngine=c,Dn}var Iu;function Kc(){if(Iu)return Sn;Iu=1,Object.defineProperty(Sn,"__esModule",{value:!0});const e=an(),r=Xc();let i=class{constructor(a){a instanceof r.LogEngine?this.logEngine=a:this.logEngine=new r.LogEngine(a)}getLevel(){return this.logEngine.getLevel()}getFormatName(){return this.logEngine.getFormatName()}getMetadata(){return this.logEngine.getMetadata()}isDebug(){return e.LogLevel.LEVELS_VALUES[this.getLevel()]>=e.LogLevel.LEVELS_VALUES.debug}error(...a){this.doLog(e.LogLevel.error,a)}errorGen(a){this.doEfficientLog(e.LogLevel.error,a)}warn(...a){this.doLog(e.LogLevel.warn,a)}warnGen(a){this.doEfficientLog(e.LogLevel.warn,a)}info(...a){this.doLog(e.LogLevel.info,a)}infoGen(a){this.doEfficientLog(e.LogLevel.info,a)}http(...a){this.doLog(e.LogLevel.http,a)}httpGen(a){this.doEfficientLog(e.LogLevel.http,a)}verbose(...a){this.doLog(e.LogLevel.verbose,a)}verboseGen(a){this.doEfficientLog(e.LogLevel.verbose,a)}debug(...a){this.doLog(e.LogLevel.debug,a)}debugGen(a){this.doEfficientLog(e.LogLevel.debug,a)}silly(...a){this.doLog(e.LogLevel.silly,a)}sillyGen(a){this.doEfficientLog(e.LogLevel.silly,a)}doEfficientLog(a,n){this.logEngine.doEfficientLog(a,n)}doLog(a,...n){this.logEngine.doLog(a,...n)}getEngine(){return this.logEngine}};return Sn.AbstractUniverseLog=i,Sn}var In={},Fu;function wh(){if(Fu)return In;Fu=1,Object.defineProperty(In,"__esModule",{value:!0});const e=Kc();let r=class Qc extends e.AbstractUniverseLog{constructor(s){super(s)}tag(s){return new Qc(super.getEngine().cloneWithMetadata({tag:s}))}};return In.BasicTaggedUniverseLog=r,In}var qu;function _h(){if(qu)return At;qu=1,Object.defineProperty(At,"__esModule",{value:!0});var e=Kc();At.AbstractUniverseLog=e.AbstractUniverseLog;var r=Xc();At.LogEngine=r.LogEngine;var i=Yc();At.UniverseLogProperties=i.Properties;var s=wh();At.BasicTaggedUniverseLog=s.BasicTaggedUniverseLog;var a=ms();At.LogMetadata=a.LogMetadata;var n=an();At.LogLevel=n.LogLevel;var u=Gc();At.PortableEnv=u.PortableEnv;var c=ps();At.UniverseLogError=c.UniverseLogError;var d=gs();return At.LogFormats=d.LogFormats,At}var Bu;function ir(){if(Bu)return Ba;Bu=1,Object.defineProperty(Ba,"__esModule",{value:!0}),Ba.Log=void 0;const e=_h();let r=class ed extends e.AbstractUniverseLog{static log(){return ed.INSTANCE}constructor(){super({levelEnvs:["HIVE_CONTENT_RENDERER_LOG_LEVEL","ENGRAVE_LOG_LEVEL"],metadata:{library:"@hiveio/content-renderer"}})}};return Ba.Log=r,r.INSTANCE=new r,Ba}var Or={},Va={},Vu;function kh(){if(Vu)return Va;Vu=1,Object.defineProperty(Va,"__esModule",{value:!0}),Va.Phishing=void 0;const e=["steewit.com","śteemit.com","ŝteemit.com","şteemit.com","šteemit.com","sţeemit.com","sťeemit.com","șteemit.com","sleemit.com","aba.ae","autobidbot.cf","autobidbot.ga","autobidbot.gq","autobotsteem.cf","autobotsteem.ga","autobotsteem.gq","autobotsteem.ml","autosteem.info","autosteembot.cf","autosteembot.ga","autosteembot.gq","autosteembot.ml","autosteemit.wapka.mobi","boostbot.ga","boostbot.gq","boostwhaleup.cf","cutt.us","dereferer.me","eb2a.com","lordlinkers.tk","nullrefer.com","steeemit.ml","steeemitt.aba.ae","steemart.ga","steemautobot.bid","steemautobot.cf","steemautobot.trade","steemers.aba.ae","steemiit.cf","steemiit.ga","steemij.tk","steemik.ga","steemik.tk","steemil.com","steemil.ml","steemir.tk","steemitou.co.nf","steemitservices.ga","steemitservices.gq","steemiz.tk","steemnow.cf","steemnow.ga","steemnow.gq","steemnow.ml","steempostupper.win","steemrewards.ml","steemrobot.ga","steemrobot.ml","steemupgot.cf","steemupgot.ga","steemupgot.gq","steemupper.cf","steemupper.ga","steemupper.gq","steemupper.ml","steenit.cf","stemit.com","stssmater.aba.ae","uppervotes.ga","uppervotes.gq","upperwhaleplus.cf","upperwhaleplus.ga","upperwhaleplus.gq","upvoteme.cf","upvoteme.ga","upvoteme.gq","upvoteme.ml","url.rw","us.aba.ae","whaleboostup.ga","whaleboostup.ml"];let r=class{};return Va.Phishing=r,r.looksPhishy=i=>{for(const s of e)if(i.toLocaleLowerCase().indexOf(s)>-1)return!0;return!1},Va}var Uu;function Nh(){if(Uu)return Or;Uu=1;var e=Or&&Or.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(Or,"__esModule",{value:!0}),Or.LinkSanitizer=void 0;const r=e(rn()),i=ir(),s=kh();let a=class td{constructor(u){this.validate(u),this.options=u,this.baseUrl=new URL(this.options.baseUrl),this.topLevelsBaseDomain=td.getTopLevelBaseDomainFromBaseUrl(this.baseUrl)}sanitizeLink(u,c){return u=this.prependUnknownProtocolLink(u),i.Log.log().debug("LinkSanitizer#sanitizeLink",{url:u,urlTitle:c}),s.Phishing.looksPhishy(u)?(i.Log.log().debug("LinkSanitizer#sanitizeLink","phishing link detected","phishing list",u,{url:u,urlTitle:c}),!1):this.isPseudoLocalUrl(u,c)?(i.Log.log().debug("LinkSanitizer#sanitizeLink","phishing link detected","pseudo local url",u,{url:u,urlTitle:c}),!1):u}static getTopLevelBaseDomainFromBaseUrl(u){const d=/([^\s/$.?#]+\.[^\s/$.?#]+)$/g.exec(u.hostname);if(d&&d[0])return d[0];throw new Error(`LinkSanitizer: could not determine top level base domain from baseUrl hostname: ${u.hostname}`)}prependUnknownProtocolLink(u){return/^((#)|(\/(?!\/))|(((hive|https?):)?\/\/))/.test(u)||(u="https://"+u),u}isPseudoLocalUrl(u,c){if(u.indexOf("#")===0)return!1;u=u.toLowerCase(),c=c.toLowerCase();try{const d=c.indexOf(this.topLevelsBaseDomain)!==-1,f=u.indexOf(this.topLevelsBaseDomain)!==-1;if(d&&!f)return!0}catch(d){if(d instanceof TypeError)return!1;throw d}return!1}validate(u){(0,r.default)(u,"LinkSanitizerOptions",r.default.object),(0,r.default)(u.baseUrl,"LinkSanitizerOptions.baseUrl",r.default.string.nonEmpty)}};return Or.LinkSanitizer=a,Or}var Pr={},zu;function Ji(){if(zu)return Pr;zu=1;var e=Pr&&Pr.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(Pr,"__esModule",{value:!0}),Pr.Localization=void 0;const r=e(rn());let i=class{static validate(a){(0,r.default)(a,"LocalizationOptions",r.default.object),(0,r.default)(a.phishingWarning,"LocalizationOptions.phishingWarning",r.default.string.nonEmpty),(0,r.default)(a.externalLink,"LocalizationOptions.externalLink",r.default.string.nonEmpty),(0,r.default)(a.noImage,"LocalizationOptions.noImage",r.default.string.nonEmpty),(0,r.default)(a.accountNameWrongLength,"LocalizationOptions.accountNameWrongLength",r.default.string.nonEmpty),(0,r.default)(a.accountNameBadActor,"LocalizationOptions.accountNameBadActor",r.default.string.nonEmpty),(0,r.default)(a.accountNameWrongSegment,"LocalizationOptions.accountNameWrongSegment",r.default.string.nonEmpty)}};return Pr.Localization=i,i.DEFAULT={phishingWarning:"Link expanded to plain text; beware of a potential phishing attempt",externalLink:"This link will take you away from example.com",noImage:"Images not allowed",accountNameWrongLength:"Account name should be between 3 and 16 characters long",accountNameBadActor:"This account is on a bad actor list",accountNameWrongSegment:"This account name contains a bad segment"},Pr}var $r={},Ua={},Hu;function Hr(){if(Hu)return Ua;Hu=1,Object.defineProperty(Ua,"__esModule",{value:!0}),Ua.AbstractEmbedder=void 0;let e=class{static getEmbedMarker(i,s){return`~~~ embed:${i} ${s} ~~~`}static insertAllEmbeds(i,s,a){const n=[];for(let u of s.split("~~~ embed:")){const c=u.match(/^([A-Za-z0-9?/=_-]+) ([^ ]*) ~~~/);if(c&&c.length>=3){const d=c[1],f=c[2];for(const o of i)if(o.type==f){n.push(o.processEmbed(d,a));break}if(u=u.substring(`${d} ${f} ~~~`.length),u==="")continue}n.push(u)}return n.join("")}};return Ua.AbstractEmbedder=e,Ua}var za={},Wu;function jh(){if(Wu)return za;Wu=1,Object.defineProperty(za,"__esModule",{value:!0}),za.SpotifyEmbedder=void 0;const e=ir(),r=Hr();let i=class Ii extends r.AbstractEmbedder{constructor(){super(...arguments),this.type="spotify"}static extractMetadata(a){if(!a)return;const n=a.match(Ii.regex.main);return!n||n.length<2?void 0:{id:`${n[1]==="show"||n[1]==="episode"?"embed-podcast":"embed"}/${n[1]}/${n[2]}`,url:n[0],canonical:`https://open.spotify.com/${n[1]}/${n[2]}`}}getEmbedMetadata(a){try{const n=Ii.extractMetadata(a.data);return n?{id:n.id,url:n.url,image:n.canonical}:void 0}catch(n){e.Log.log().error(n)}}processEmbed(a,n){return`<div class="videoWrapper"><iframe src="${`https://open.spotify.com/${a}`}" width="${n.width}" height="${n.height}" frameBorder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen ></iframe></div>`}};return za.SpotifyEmbedder=i,i.regex={main:/https?:\/\/open.spotify.com\/(playlist|show|episode|album|track|artist)\/(.*)/i,sanitize:/^https:\/\/open\.spotify\.com\/(embed|embed-podcast)\/(playlist|show|episode|album|track|artist)\/(.*)/i},za}var Ha={},Gu;function Eh(){if(Gu)return Ha;Gu=1,Object.defineProperty(Ha,"__esModule",{value:!0}),Ha.ThreeSpeakEmbedder=void 0;const e=ir(),r=Hr();let i=class rd extends r.AbstractEmbedder{constructor(){super(...arguments),this.type="3speak"}getEmbedMetadata(a){const n=typeof a=="string"?a:a.data;try{const u=n.match(rd.linkRegex);if(u&&u[1])return{id:u[1],url:n}}catch(u){e.Log.log().error(u)}}processEmbed(a,n){const u=`https://3speak.tv/embed?v=${a}`;return`<div class="threeSpeakWrapper"><iframe width="${n.width}" height="${n.height}" src="${u}" frameborder="0" allowfullscreen></iframe></div>`}};return Ha.ThreeSpeakEmbedder=i,i.linkRegex=/^(?:https?:\/\/)?(?:(?:3speak\.(?:tv|online|co)\/watch\?v=)|(?:3speak\.tv\/embed\?v=))([a-zA-Z0-9_.-]+\/[a-zA-Z0-9_-]+)(?:&.*)?$/,Ha}var Lr={},Gs={},Ju;function ad(){return Ju||(Ju=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.imageFile=e.image=e.remote=e.local=e.any=void 0;const r='[^\\s"<>\\]\\[\\(\\)]',i=r.replace(/\]$/,".,']"),s="(?:(?:\\.(?:tiff?|jpe?g|gif|png|svg|ico)|ipfs/[a-z\\d]{40,}))",a="(?:[-a-zA-Z0-9\\._]*[-a-zA-Z0-9])",n="(?:"+r+"*"+i+")?",u=({domain:l=a,path:p=""}={})=>`https?://${l}(?::\\d{2,5})?(?:[/\\?#]${n}${p||""})${p?"":"?"}`,c=(l="i")=>new RegExp(u(),l);e.any=c;const d=(l="i")=>new RegExp(u({domain:"(?:localhost|(?:.*\\.)?hive.blog)"}),l);e.local=d;const f=(l="i")=>new RegExp(u({domain:`(?!localhost|(?:.*\\.)?hive.blog)${a}`}),l);e.remote=f;const o=(l="i")=>new RegExp(u({path:s}),l);e.image=o;const h=(l="i")=>new RegExp(s,l);e.imageFile=h,e.default={any:(0,e.any)(),local:(0,e.local)(),remote:(0,e.remote)(),image:(0,e.image)(),imageFile:(0,e.imageFile)(),vimeo:/https?:\/\/(?:vimeo.com\/|player.vimeo.com\/video\/)([0-9]+)\/*/,vimeoId:/(?:vimeo.com\/|player.vimeo.com\/video\/)([0-9]+)/,twitch:/https?:\/\/(?:www.)?twitch.tv\/(?:(videos)\/)?([a-zA-Z0-9][\w]{3,24})/i,ipfsProtocol:/^((\/\/?ipfs\/)|(ipfs:\/\/))/}})(Gs)),Gs}var Yu;function Ah(){if(Yu)return Lr;Yu=1;var e=Lr&&Lr.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(Lr,"__esModule",{value:!0}),Lr.TwitchEmbedder=void 0;const r=ir(),i=e(ad()),s=Hr();let a=class extends s.AbstractEmbedder{constructor(u){super(),this.type="twitch",this.domain=new URL(u.baseUrl).hostname}getEmbedMetadata(u){try{const c=u.data,d=this.twitchId(c);return d?Object.assign({},d):void 0}catch(c){r.Log.log().error(c)}}processEmbed(u,c){return`<div class="videoWrapper"><iframe src=${`https://player.twitch.tv/${u}&parent=${this.domain}`} width=${c.width} height=${c.height} frameBorder="0" allowFullScreen></iframe></div>`}twitchId(u){if(!u)return null;const c=u.match(i.default.twitch);return!c||c.length<3?null:{id:c[1]==="videos"?`?video=${c[2]}`:`?channel=${c[2]}`,url:c[0],canonical:c[1]==="videos"?`https://player.twitch.tv/?video=${c[2]}`:`https://player.twitch.tv/?channel=${c[2]}`}}};return Lr.TwitchEmbedder=a,Lr}var Wa={},Ga={},Zu;function nd(){if(Zu)return Ga;Zu=1,Object.defineProperty(Ga,"__esModule",{value:!0}),Ga.StaticConfig=void 0;let e=class{};return Ga.StaticConfig=e,e.sanitization={iframeWhitelist:[{re:/^(?:@?(?:https?:)?\/\/)?(?:www\.)?(twitter|x)\.com\/(?:\w+\/status|status)\/(\d{1,20})/i,fn:r=>{if(!r)return null;const s=r.replace(/^(@|https?:\/\/)/,"").match(/(?:twitter|x)\.com\/(?:\w+\/status|status)\/(\d{1,20})/i);return!s||s.length!==2?null:`https://platform.twitter.com/embed/Tweet.html?id=${s[1]}`}},{re:/^(https?:)?\/\/player.vimeo.com\/video\/.*/i,fn:r=>{if(!r)return null;const i=r.match(/https:\/\/player\.vimeo\.com\/video\/([0-9]+)/);return!i||i.length!==2?null:"https://player.vimeo.com/video/"+i[1]}},{re:/^(https?:)?\/\/www.youtube.com\/embed\/.*/i,fn:r=>r.replace(/\?.+$/,"")},{re:/^https:\/\/w.soundcloud.com\/player\/.*/i,fn:r=>{if(!r)return null;const i=r.match(/url=(.+?)&/);return!i||i.length!==2?null:`https://w.soundcloud.com/player/?url=${i[1]}&auto_play=false&hide_related=false&show_comments=true&show_user=true&show_reposts=false&visual=true`}},{re:/^(https?:)?\/\/player.twitch.tv\/.*/i,fn:r=>r},{re:/^https:\/\/open\.spotify\.com\/(embed|embed-podcast)\/(playlist|show|episode|album|track|artist)\/(.*)/i,fn:r=>r},{re:/^(?:https?:)?\/\/(?:3speak\.(?:tv|online|co))\/embed\?v=([^&\s]+)/i,fn:r=>{if(!r)return null;const i=r.match(/3speak\.(?:tv|online|co)\/embed\?v=([^&\s]+)/i);return!i||i.length!==2?null:`https://3speak.tv/embed?v=${i[1]}`}},{re:/^(?:https?:)?\/\/(?:3speak\.(?:tv|online|co))\/watch\?v=([^&\s]+)/i,fn:r=>{if(!r)return null;const i=r.match(/3speak\.(?:tv|online|co)\/watch\?v=([^&\s]+)/i);return!i||i.length!==2?null:`https://3speak.tv/embed?v=${i[1]}`}},{re:/^(?:https:)\/\/(?:www\.)?(twitter|x)\.com\/(?:\w+\/status|status)\/(\d{1,20})/i,fn:r=>{if(!r)return null;const i=r.match(/(?:twitter|x)\.com\/(?:\w+\/status|status)\/(\d{1,20})/i);return!i||i.length!==2?null:`https://platform.twitter.com/embed/Tweet.html?id=${i[1]}`}}],noImageText:"(Image not shown due to low ratings)",allowedTags:`
|
|
133
133
|
div, iframe, del,
|
|
134
134
|
a, p, b, i, q, br, ul, li, ol, img, h1, h2, h3, h4, h5, h6, hr,
|
|
135
135
|
blockquote, pre, code, em, strong, center, table, thead, tbody, tr, th, td,
|
|
136
136
|
strike, sup, sub
|
|
137
|
-
`.trim().split(/,\s*/)},Ga}var
|
|
137
|
+
`.trim().split(/,\s*/)},Ga}var Xu;function Sh(){if(Xu)return Wa;Xu=1;var e;Object.defineProperty(Wa,"__esModule",{value:!0}),Wa.TwitterEmbedder=void 0;const r=ir(),i=nd(),s=Hr();let a=class Fi extends s.AbstractEmbedder{constructor(){super(...arguments),this.type="twitter"}getEmbedMetadata(u){const c=typeof u=="string"?u:u.data;try{const d=Fi.getTwitterMetadataFromLink(c);return d?{id:d.id,url:d.url}:void 0}catch(d){r.Log.log().error(d)}}processEmbed(u,c){const d=i.StaticConfig.sanitization.iframeWhitelist.find(o=>o.re.toString().includes("twitter")),f=d?.fn(`https://twitter.com/status/${u}`);return f?`<div class="twitterWrapper"><iframe width="${c.width}" height="${c.height}" src="${f}" frameborder="0" scrolling="no" allowtransparency="true" allowfullscreen="true"></iframe></div>`:""}static getTwitterMetadataFromLink(u){if(!u)return;const c=u.replace(/^(@|https:\/\/)/,""),d=c.match(Fi.linkRegex);if(!d)return;const f=d[2],o=`https://${c}`;return{id:f,url:o}}};return Wa.TwitterEmbedder=a,a.linkRegex=(e=i.StaticConfig.sanitization.iframeWhitelist.find(n=>n.re.toString().includes("twitter")))===null||e===void 0?void 0:e.re,Wa}var Ja={},Ku;function Ch(){if(Ku)return Ja;Ku=1,Object.defineProperty(Ja,"__esModule",{value:!0}),Ja.VimeoEmbedder=void 0;const e=ir(),r=Hr();let i=class sd extends r.AbstractEmbedder{constructor(){super(...arguments),this.type="vimeo"}getEmbedMetadata(a){try{const n=a.data,u=this.extractMetadata(n);return u?{id:u.id,url:u.url}:void 0}catch(n){e.Log.log().error(n)}}processEmbed(a,n){return`<div class="videoWrapper"><iframe src=${this.generateCanonicalUrl(a)} width=${n.width} height=${n.height} frameBorder="0" webkitallowfullscreen mozallowfullscreen allowFullScreen></iframe></div>`}generateCanonicalUrl(a){return`https://player.vimeo.com/video/${a}`}extractMetadata(a){if(!a)return null;const n=a.match(sd.regex);return!n||n.length<2?null:{id:n[1],url:n[0],canonical:this.generateCanonicalUrl(n[1])}}};return Ja.VimeoEmbedder=i,i.regex=/https?:\/\/(?:vimeo.com\/|player.vimeo.com\/video\/)([0-9]+)\/*/,Ja}var Ya={},Qu;function id(){if(Qu)return Ya;Qu=1,Object.defineProperty(Ya,"__esModule",{value:!0}),Ya.YoutubeEmbedder=void 0;const e=ir(),r=Hr();let i=class Jn extends r.AbstractEmbedder{constructor(){super(...arguments),this.type="youtube"}static getYoutubeMetadataFromLink(a){if(!a)return;const n=a.match(Jn.linkRegex),u=n?n[0]:void 0;if(!u)return;const c=u.match(Jn.idRegex),d=c&&c.length>=2?c[2]:void 0;if(d)return{id:d,url:u,thumbnail:"https://img.youtube.com/vi/"+d+"/0.jpg"}}getEmbedMetadata(a){try{const n=Jn.getYoutubeMetadataFromLink(a.data);return n?{id:n.id,url:n.url,image:n.thumbnail}:void 0}catch(n){e.Log.log().error(n)}}processEmbed(a,n){const u=`https://www.youtube.com/embed/${a}`;return`<div class="videoWrapper"><iframe width="${n.width}" height="${n.height}" src="${u}" allowfullscreen="allowfullscreen" webkitallowfullscreen="webkitallowfullscreen" mozallowfullscreen="mozallowfullscreen" frameborder="0"></iframe></div>`}};return Ya.YoutubeEmbedder=i,i.linkRegex=/https?:\/\/(?:www\.)?(?:youtube\.com\/watch\?v=|youtu\.be\/watch\?v=|youtu.be\/[^watch]|youtube\.com\/(embed|shorts)\/)([A-Za-z0-9_-]+)[^ ]*/i,i.idRegex=/(?:youtube\.com\/watch\?v=|youtu\.be\/watch\?v=|youtu.be\/|youtube\.com\/(embed|shorts)\/)([A-Za-z0-9_-]+)/i,Ya}var el;function Dh(){if(el)return $r;el=1;var e=$r&&$r.__importDefault||function(o){return o&&o.__esModule?o:{default:o}};Object.defineProperty($r,"__esModule",{value:!0}),$r.AssetEmbedder=void 0;const r=e(rn()),i=Hr(),s=jh(),a=Eh(),n=Ah(),u=Sh(),c=Ch(),d=id();let f=class od{constructor(h,l){od.validate(h),this.options=h,this.localization=l,this.embedders=[new d.YoutubeEmbedder,new c.VimeoEmbedder,new n.TwitchEmbedder(h),new s.SpotifyEmbedder,new a.ThreeSpeakEmbedder,new u.TwitterEmbedder]}static validate(h){(0,r.default)(h,"AssetEmbedderOptions",r.default.object),(0,r.default)(h.ipfsPrefix,"AssetEmbedderOptions.ipfsPrefix",r.default.optional.string),(0,r.default)(h.width,"AssetEmbedderOptions.width",r.default.number.integer.positive),(0,r.default)(h.height,"AssetEmbedderOptions.height",r.default.number.integer.positive),(0,r.default)(h.hideImages,"AssetEmbedderOptions.hideImages",r.default.boolean),(0,r.default)(h.baseUrl,"AssetEmbedderOptions.baseUrl",r.default.string.nonEmpty),(0,r.default)(h.imageProxyFn,"AssetEmbedderOptions.imageProxyFn",r.default.function),(0,r.default)(h.hashtagUrlFn,"AssetEmbedderOptions.hashtagUrlFn",r.default.function),(0,r.default)(h.usertagUrlFn,"AssetEmbedderOptions.usertagUrlFn",r.default.function)}insertAssets(h){const l={width:this.options.width,height:this.options.height};return this.insertMarkedEmbedsToRenderedOutput(h,l)}insertMarkedEmbedsToRenderedOutput(h,l){return i.AbstractEmbedder.insertAllEmbeds(this.embedders,h,l)}processTextNodeAndInsertEmbeds(h){const l={links:[],images:[]};for(const p of this.embedders){const x=p.getEmbedMetadata(h);x&&(h.data=h.data.replace(x.url,i.AbstractEmbedder.getEmbedMarker(x.id,p.type)),x.image&&l.images.push(x.image),x.link&&l.links.push(x.link))}return l}};return $r.AssetEmbedder=f,$r}var Mr={},Fn={},tl;function Th(){if(tl)return Fn;tl=1,Object.defineProperty(Fn,"__esModule",{value:!0});const e=`
|
|
138
138
|
aalpha
|
|
139
139
|
aappreciator
|
|
140
140
|
abits
|
|
@@ -1044,62 +1044,62 @@ youbit
|
|
|
1044
1044
|
yunbi
|
|
1045
1045
|
zenieix
|
|
1046
1046
|
`.trim().split(`
|
|
1047
|
-
`);return Fn.default=e,Fn}var Qu;function Oh(){if(Qu)return Mr;Qu=1;var e=Mr&&Mr.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(Mr,"__esModule",{value:!0}),Mr.AccountNameValidator=void 0;const a=e(Th());let i=class{static validateAccountName(r,n){let u,c,d;if(!r)return n.accountNameWrongLength;const f=r.length;if(f<3||f>16)return n.accountNameWrongLength;if(a.default.includes(r))return n.accountNameBadActor;const o=r.split(".");for(u=0,d=o.length;u<d;u++)if(c=o[u],!/^[a-z]/.test(c)||!/^[a-z0-9-]*$/.test(c)||!/[a-z0-9]$/.test(c)||!(c.length>=3))return n.accountNameWrongSegment;return null}};return Mr.AccountNameValidator=i,Mr}var el;function Ph(){if(el)return st;el=1;var e=st&&st.__createBinding||(Object.create?(function(w,b,g,v){v===void 0&&(v=g);var _=Object.getOwnPropertyDescriptor(b,g);(!_||("get"in _?!b.__esModule:_.writable||_.configurable))&&(_={enumerable:!0,get:function(){return b[g]}}),Object.defineProperty(w,v,_)}):(function(w,b,g,v){v===void 0&&(v=g),w[v]=b[g]})),a=st&&st.__setModuleDefault||(Object.create?(function(w,b){Object.defineProperty(w,"default",{enumerable:!0,value:b})}):function(w,b){w.default=b}),i=st&&st.__importStar||function(w){if(w&&w.__esModule)return w;var b={};if(w!=null)for(var g in w)g!=="default"&&Object.prototype.hasOwnProperty.call(w,g)&&e(b,w,g);return a(b,w),b},s=st&&st.__importDefault||function(w){return w&&w.__esModule?w:{default:w}};Object.defineProperty(st,"__esModule",{value:!0}),st.HtmlDOMParserError=st.HtmlDOMParser=void 0;const r=i(mh()),n=s(ds()),u=ir(),c=Nh(),d=Gi(),f=Dh(),o=ad(),h=Oh(),l=i(ed());let p=class{constructor(b,g=d.Localization.DEFAULT){this.domParser=new r.DOMParser({errorHandler:{warning:()=>{},error:()=>{}}}),this.xmlSerializer=new r.XMLSerializer,this.mutate=!0,this.parsedDocument=void 0,f.AssetEmbedder.validate(b),d.Localization.validate(g),this.options=b,this.localization=g,this.linkSanitizer=new c.LinkSanitizer({baseUrl:this.options.baseUrl}),this.embedder=new f.AssetEmbedder({ipfsPrefix:this.options.ipfsPrefix,width:this.options.width,height:this.options.height,hideImages:this.options.hideImages,imageProxyFn:this.options.imageProxyFn,hashtagUrlFn:this.options.hashtagUrlFn,usertagUrlFn:this.options.usertagUrlFn,baseUrl:this.options.baseUrl},g),this.state={hashtags:new Set,usertags:new Set,htmltags:new Set,images:new Set,links:new Set}}setMutateEnabled(b){return this.mutate=b,this}parse(b){try{const g=this.domParser.parseFromString(b,"text/html");this.traverseDOMNode(g),this.mutate&&this.postprocessDOM(g),this.parsedDocument=g}catch(g){throw new x("Parsing error",g)}return this}getState(){if(!this.parsedDocument)throw new x("Html has not been parsed yet");return this.state}getParsedDocument(){if(!this.parsedDocument)throw new x("Html has not been parsed yet");return this.parsedDocument}getParsedDocumentAsString(){return this.xmlSerializer.serializeToString(this.getParsedDocument())}traverseDOMNode(b,g=0){!b||!b.childNodes||Array.from(b.childNodes).forEach(v=>{const _=v.tagName?v.tagName.toLowerCase():null;_&&this.state.htmltags.add(_),_==="img"?this.processImgTag(v):_==="iframe"?this.processIframeTag(v):_==="a"?this.processLinkTag(v):v.nodeName==="#text"&&this.processTextNode(v),this.traverseDOMNode(v,g+1)})}processLinkTag(b){const g=b.getAttribute("href");if(g&&(this.state.links.add(g),this.mutate)){const v=b.textContent+"",_=this.linkSanitizer.sanitizeLink(g,v);if(_===!1){const N=b.ownerDocument.createElement("div");N.textContent=`${b.textContent} / ${g}`,N.setAttribute("title",this.localization.phishingWarning),N.setAttribute("class","phishy");const y=b.parentNode;y&&(y.appendChild(N),y.removeChild(b))}else b.setAttribute("href",_)}}processIframeTag(b){const g=b.getAttribute("src");if(g&&this.reportIframeLink(g),!this.mutate||(b.parentNode.tagName?b.parentNode.tagName.toLowerCase():b.parentNode.tagName)==="div"&&b.parentNode.getAttribute("class")==="videoWrapper")return;const _=this.xmlSerializer.serializeToString(b),N=this.domParser.parseFromString(`<div class="videoWrapper">${_}</div>`),y=b.parentNode;y&&(y.appendChild(N),y.removeChild(b))}reportIframeLink(b){const g=o.YoutubeEmbedder.getYoutubeMetadataFromLink(b);g&&(this.state.links.add(g.url),this.state.images.add("https://img.youtube.com/vi/"+g.id+"/0.jpg"))}processImgTag(b){const g=b.getAttribute("src");if(g&&(this.state.images.add(g),this.mutate)){let v=this.normalizeUrl(g);/^\/\//.test(v)&&(v="https:"+v),v!==g&&b.setAttribute("src",v)}}processTextNode(b){try{const g=b.parentNode.tagName?b.parentNode.tagName.toLowerCase():b.parentNode.tagName;if(g==="code"||g==="a"||!b.data)return;const v=this.embedder.processTextNodeAndInsertEmbeds(b);v.images.forEach(y=>this.state.images.add(y)),v.links.forEach(y=>this.state.links.add(y));const _=this.xmlSerializer.serializeToString(b),N=this.linkify(_);if(this.mutate&&N!==_){const y=this.domParser.parseFromString(`<span>${N}</span>`),m=b.parentNode;return m&&(m.appendChild(y),m.removeChild(b)),y}}catch(g){u.Log.log().error(g)}}linkify(b){return b=b.replace((0,l.any)("gi"),g=>{if(l.default.image.test(g))return this.state.images.add(g),`<img src="${this.normalizeUrl(g)}" />`;if(/\.(zip|exe)$/i.test(g))return g;const v=this.linkSanitizer.sanitizeLink(g,g);return v===!1?`<div title='${this.localization.phishingWarning}' class='phishy'>${g}</div>`:(this.state.links.add(v),`<a href="${this.normalizeUrl(g)}">${v}</a>`)}),b=b.replace(/(^|\s)(#[-a-z\d]+)/gi,g=>{if(/#[\d]+$/.test(g))return g;const v=/^\s/.test(g)?g[0]:"",N=g.trim().substring(1).toLowerCase();if(this.state.hashtags.add(N),!this.mutate)return g;const y=this.options.hashtagUrlFn(N);return v+`<a href="${y}">${g.trim()}</a>`}),b=b.replace(/(^|[^a-zA-Z0-9_!#$%&*@@/]|(^|[^a-zA-Z0-9_+~.-/#]))[@@]([a-z][-.a-z\d]+[a-z\d])/gi,(g,v,_,N)=>{const y=N.toLowerCase(),m=h.AccountNameValidator.validateAccountName(y,this.localization)==null;m&&this.state.usertags&&this.state.usertags.add(y);const k=(v||"")+(_||"");if(!this.mutate)return`${k}${N}`;const j=this.options.usertagUrlFn(y);return m?`${k}<a href="${j}">@${N}</a>`:`${k}@${N}`}),b}postprocessDOM(b){this.hideImagesIfNeeded(b),this.proxifyImagesIfNeeded(b)}hideImagesIfNeeded(b){if(this.mutate&&this.options.hideImages)for(const g of Array.from(b.getElementsByTagName("img"))){const v=b.createElement("pre");v.setAttribute("class","image-url-only"),v.appendChild(b.createTextNode(g.getAttribute("src")||""));const _=g.parentNode;_&&(_.appendChild(v),_.removeChild(g))}}proxifyImagesIfNeeded(b){this.mutate&&!this.options.hideImages&&this.proxifyImages(b)}proxifyImages(b){b&&Array.from(b.getElementsByTagName("img")).forEach(g=>{const v=g.getAttribute("src")||"";l.default.local.test(v)||g.setAttribute("src",this.options.imageProxyFn(v))})}normalizeUrl(b){if(this.options.ipfsPrefix&&l.default.ipfsProtocol.test(b)){const[g]=b.match(l.default.ipfsProtocol),v=b.replace(g,"");return`${this.options.ipfsPrefix.replace(/\/+$/,"")}/${v}`}return b}};st.HtmlDOMParser=p;class x extends n.default{constructor(b,g){super(b,g)}}return st.HtmlDOMParserError=x,st}var Za={},tl;function $h(){if(tl)return Za;tl=1,Object.defineProperty(Za,"__esModule",{value:!0}),Za.PreliminarySanitizer=void 0;let e=class sd{static preliminarySanitize(i){return sd.stripHtmlComments(i)}static stripHtmlComments(i){return i.replace(/<!--([\s\S]+?)(-->|$)/g,"(html comment removed: $1)")}};return Za.PreliminarySanitizer=e,Za}var Rr={},Rt={},It={},Gs={},Ft={},qn={},rl;function Lh(){return rl||(rl=1,Object.defineProperty(qn,"__esModule",{value:!0}),qn.default=new Uint16Array('ᵁ<Õıʊҝջאٵ۞ޢߖࠏઑඡ༉༦ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲϏϢϸontourIntegraìȹoɴ\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲy;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱còJTabcdfgorstרׯؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ߂ߐĀiyޱrc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣসে্ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४ĀnrࢃgleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpwਖਛgȀLRlr৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼અઋp;椅y;䐜Ādl੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑඞcy;䐊cute;䅃ƀaeyહાron;䅇dil;䅅;䐝ƀgswે૰ativeƀMTV૨ediumSpace;怋hiĀcn૦ëeryThiîtedĀGLଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷreak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪௫ఄ಄ದൡඅ櫬Āoungruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater;EFGLSTஶஷ扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨setĀ;Eೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂෛ෧ขภยา฿ไlig;䅒cute耻Ó䃓Āiyීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲcr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬืde耻Õ䃕es;樷ml耻Ö䃖erĀBP๋Āar๐๓r;怾acĀek๚;揞et;掴arenthesis;揜ҀacfhilorsງຊຏຒດຝະrtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ檻cedesȀ;EST່້扺qual;檯lantEqual;扼ilde;找me;怳Ādpuct;戏ortionĀ;aȥl;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL憒ar;懥eftArrow;懄eiling;按oǵ\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄቕቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHcቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗ĀeiቻDzኀ\0ኇefore;戴a;䎘ĀcnኘkSpace;쀀 Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtèa;䎖r;愨pf;愤cr;쀀𝒵ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒;Eaeiopᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;eᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;eᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰᝃᝈ០៦ᠹᡐᜍ᥈ᥰot;櫭ĀcrᛶkȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;tbrk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯᝳ;䎲;愶een;扬r;쀀𝔟gcostuvwឍឝឳេ៕៛ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀakoᠦᠵĀcn៲ᠣkƀlst֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ;敛;敘;攘;攔;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģbar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;elƀ;bhᥨᥩᥫ䁜;槅sub;柈ŬᥴlĀ;e怢t»pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭒\0᯽\0ᰌƀcprᦲute;䄇̀;abcdsᦿᧀᧄ᧕᧙戩nd;橄rcup;橉Āau᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r;Ecefms᩠ᩢᩫ᪤᪪旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ\0\0aĀ;t䀬;䁀ƀ;fl戁îᅠeĀmxent»eóɍǧ\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯delprvw᭠᭬᭷ᮂᮬᯔarrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;pᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰻᰿ᱝᱩᱵᲞᲬᲷᴍᵻᶑᶫᶻ᷆᷍ròar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂᳖᳜᳠mƀ;oș᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄĀDoḆᴴoôĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»ṺƀaeiἒἚls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧\0耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₥₰₴⃰℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽ƀ;qsؾٌlanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqrⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0proør;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼ròòΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonóquigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roøurĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻 ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨íistĀ;sடr;쀀𝔫ȀEest⩦⩹⩼ƀ;qs⩭ƀ;qs⩴lanôií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast⭕⭚⭟lleìl;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖchimpqu⮽⯍⯙⬄⯤⯯Ȁ;cerല⯆ഷ⯉uå;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭ååഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñĀ;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;cⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācrir;榿;쀀𝔬ͯ\0\0\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕⶥⶨrò᪀Āirⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔǒr;榷rp;榹;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ\0\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ脀¶;l䂶leìЃɩ\0\0m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳ᤈ⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t⾴ïrel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⋢⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔ABHabcdefhilmnoprstuxけさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstwガクシスゼゾダッデナp;極Ā;fゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ìâヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘rrowĀ;tㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowóarpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓ròaòՑ;怏oustĀ;a㈞掱che»mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì耻䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;qኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫwar;椪lig耻ß䃟㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rëƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproøim»ኬsðኞĀas㚺㚮ðrn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈadempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xôheadĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roðtré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜtré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌'.split("").map(function(e){return e.charCodeAt(0)}))),qn}var Bn={},al;function Mh(){return al||(al=1,Object.defineProperty(Bn,"__esModule",{value:!0}),Bn.default=new Uint16Array("Ȁaglq \x1Bɭ\0\0p;䀦os;䀧t;䀾t;䀼uot;䀢".split("").map(function(e){return e.charCodeAt(0)}))),Bn}var Js={},nl;function sl(){return nl||(nl=1,(function(e){var a;Object.defineProperty(e,"__esModule",{value:!0}),e.replaceCodePoint=e.fromCodePoint=void 0;var i=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]);e.fromCodePoint=(a=String.fromCodePoint)!==null&&a!==void 0?a:function(n){var u="";return n>65535&&(n-=65536,u+=String.fromCharCode(n>>>10&1023|55296),n=56320|n&1023),u+=String.fromCharCode(n),u};function s(n){var u;return n>=55296&&n<=57343||n>1114111?65533:(u=i.get(n))!==null&&u!==void 0?u:n}e.replaceCodePoint=s;function r(n){return(0,e.fromCodePoint)(s(n))}e.default=r})(Js)),Js}var il;function ts(){return il||(il=1,(function(e){var a=Ft&&Ft.__createBinding||(Object.create?(function(C,O,L,H){H===void 0&&(H=L);var F=Object.getOwnPropertyDescriptor(O,L);(!F||("get"in F?!O.__esModule:F.writable||F.configurable))&&(F={enumerable:!0,get:function(){return O[L]}}),Object.defineProperty(C,H,F)}):(function(C,O,L,H){H===void 0&&(H=L),C[H]=O[L]})),i=Ft&&Ft.__setModuleDefault||(Object.create?(function(C,O){Object.defineProperty(C,"default",{enumerable:!0,value:O})}):function(C,O){C.default=O}),s=Ft&&Ft.__importStar||function(C){if(C&&C.__esModule)return C;var O={};if(C!=null)for(var L in C)L!=="default"&&Object.prototype.hasOwnProperty.call(C,L)&&a(O,C,L);return i(O,C),O},r=Ft&&Ft.__importDefault||function(C){return C&&C.__esModule?C:{default:C}};Object.defineProperty(e,"__esModule",{value:!0}),e.decodeXML=e.decodeHTMLStrict=e.decodeHTMLAttribute=e.decodeHTML=e.determineBranch=e.EntityDecoder=e.DecodingMode=e.BinTrieFlags=e.fromCodePoint=e.replaceCodePoint=e.decodeCodePoint=e.xmlDecodeTree=e.htmlDecodeTree=void 0;var n=r(Lh());e.htmlDecodeTree=n.default;var u=r(Mh());e.xmlDecodeTree=u.default;var c=s(sl());e.decodeCodePoint=c.default;var d=sl();Object.defineProperty(e,"replaceCodePoint",{enumerable:!0,get:function(){return d.replaceCodePoint}}),Object.defineProperty(e,"fromCodePoint",{enumerable:!0,get:function(){return d.fromCodePoint}});var f;(function(C){C[C.NUM=35]="NUM",C[C.SEMI=59]="SEMI",C[C.EQUALS=61]="EQUALS",C[C.ZERO=48]="ZERO",C[C.NINE=57]="NINE",C[C.LOWER_A=97]="LOWER_A",C[C.LOWER_F=102]="LOWER_F",C[C.LOWER_X=120]="LOWER_X",C[C.LOWER_Z=122]="LOWER_Z",C[C.UPPER_A=65]="UPPER_A",C[C.UPPER_F=70]="UPPER_F",C[C.UPPER_Z=90]="UPPER_Z"})(f||(f={}));var o=32,h;(function(C){C[C.VALUE_LENGTH=49152]="VALUE_LENGTH",C[C.BRANCH_LENGTH=16256]="BRANCH_LENGTH",C[C.JUMP_TABLE=127]="JUMP_TABLE"})(h=e.BinTrieFlags||(e.BinTrieFlags={}));function l(C){return C>=f.ZERO&&C<=f.NINE}function p(C){return C>=f.UPPER_A&&C<=f.UPPER_F||C>=f.LOWER_A&&C<=f.LOWER_F}function x(C){return C>=f.UPPER_A&&C<=f.UPPER_Z||C>=f.LOWER_A&&C<=f.LOWER_Z||l(C)}function w(C){return C===f.EQUALS||x(C)}var b;(function(C){C[C.EntityStart=0]="EntityStart",C[C.NumericStart=1]="NumericStart",C[C.NumericDecimal=2]="NumericDecimal",C[C.NumericHex=3]="NumericHex",C[C.NamedEntity=4]="NamedEntity"})(b||(b={}));var g;(function(C){C[C.Legacy=0]="Legacy",C[C.Strict=1]="Strict",C[C.Attribute=2]="Attribute"})(g=e.DecodingMode||(e.DecodingMode={}));var v=(function(){function C(O,L,H){this.decodeTree=O,this.emitCodePoint=L,this.errors=H,this.state=b.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=g.Strict}return C.prototype.startEntity=function(O){this.decodeMode=O,this.state=b.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1},C.prototype.write=function(O,L){switch(this.state){case b.EntityStart:return O.charCodeAt(L)===f.NUM?(this.state=b.NumericStart,this.consumed+=1,this.stateNumericStart(O,L+1)):(this.state=b.NamedEntity,this.stateNamedEntity(O,L));case b.NumericStart:return this.stateNumericStart(O,L);case b.NumericDecimal:return this.stateNumericDecimal(O,L);case b.NumericHex:return this.stateNumericHex(O,L);case b.NamedEntity:return this.stateNamedEntity(O,L)}},C.prototype.stateNumericStart=function(O,L){return L>=O.length?-1:(O.charCodeAt(L)|o)===f.LOWER_X?(this.state=b.NumericHex,this.consumed+=1,this.stateNumericHex(O,L+1)):(this.state=b.NumericDecimal,this.stateNumericDecimal(O,L))},C.prototype.addToNumericResult=function(O,L,H,F){if(L!==H){var B=H-L;this.result=this.result*Math.pow(F,B)+parseInt(O.substr(L,B),F),this.consumed+=B}},C.prototype.stateNumericHex=function(O,L){for(var H=L;L<O.length;){var F=O.charCodeAt(L);if(l(F)||p(F))L+=1;else return this.addToNumericResult(O,H,L,16),this.emitNumericEntity(F,3)}return this.addToNumericResult(O,H,L,16),-1},C.prototype.stateNumericDecimal=function(O,L){for(var H=L;L<O.length;){var F=O.charCodeAt(L);if(l(F))L+=1;else return this.addToNumericResult(O,H,L,10),this.emitNumericEntity(F,2)}return this.addToNumericResult(O,H,L,10),-1},C.prototype.emitNumericEntity=function(O,L){var H;if(this.consumed<=L)return(H=this.errors)===null||H===void 0||H.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(O===f.SEMI)this.consumed+=1;else if(this.decodeMode===g.Strict)return 0;return this.emitCodePoint((0,c.replaceCodePoint)(this.result),this.consumed),this.errors&&(O!==f.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed},C.prototype.stateNamedEntity=function(O,L){for(var H=this.decodeTree,F=H[this.treeIndex],B=(F&h.VALUE_LENGTH)>>14;L<O.length;L++,this.excess++){var $=O.charCodeAt(L);if(this.treeIndex=N(H,F,this.treeIndex+Math.max(1,B),$),this.treeIndex<0)return this.result===0||this.decodeMode===g.Attribute&&(B===0||w($))?0:this.emitNotTerminatedNamedEntity();if(F=H[this.treeIndex],B=(F&h.VALUE_LENGTH)>>14,B!==0){if($===f.SEMI)return this.emitNamedEntityData(this.treeIndex,B,this.consumed+this.excess);this.decodeMode!==g.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1},C.prototype.emitNotTerminatedNamedEntity=function(){var O,L=this,H=L.result,F=L.decodeTree,B=(F[H]&h.VALUE_LENGTH)>>14;return this.emitNamedEntityData(H,B,this.consumed),(O=this.errors)===null||O===void 0||O.missingSemicolonAfterCharacterReference(),this.consumed},C.prototype.emitNamedEntityData=function(O,L,H){var F=this.decodeTree;return this.emitCodePoint(L===1?F[O]&~h.VALUE_LENGTH:F[O+1],H),L===3&&this.emitCodePoint(F[O+2],H),H},C.prototype.end=function(){var O;switch(this.state){case b.NamedEntity:return this.result!==0&&(this.decodeMode!==g.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case b.NumericDecimal:return this.emitNumericEntity(0,2);case b.NumericHex:return this.emitNumericEntity(0,3);case b.NumericStart:return(O=this.errors)===null||O===void 0||O.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case b.EntityStart:return 0}},C})();e.EntityDecoder=v;function _(C){var O="",L=new v(C,function(H){return O+=(0,c.fromCodePoint)(H)});return function(F,B){for(var $=0,G=0;(G=F.indexOf("&",G))>=0;){O+=F.slice($,G),L.startEntity(B);var X=L.write(F,G+1);if(X<0){$=G+L.end();break}$=G+X,G=X===0?$+1:$}var ee=O+F.slice($);return O="",ee}}function N(C,O,L,H){var F=(O&h.BRANCH_LENGTH)>>7,B=O&h.JUMP_TABLE;if(F===0)return B!==0&&H===B?L:-1;if(B){var $=H-B;return $<0||$>=F?-1:C[L+$]-1}for(var G=L,X=G+F-1;G<=X;){var ee=G+X>>>1,R=C[ee];if(R<H)G=ee+1;else if(R>H)X=ee-1;else return C[ee+F]}return-1}e.determineBranch=N;var y=_(n.default),m=_(u.default);function k(C,O){return O===void 0&&(O=g.Legacy),y(C,O)}e.decodeHTML=k;function j(C){return y(C,g.Attribute)}e.decodeHTMLAttribute=j;function A(C){return y(C,g.Strict)}e.decodeHTMLStrict=A;function D(C){return m(C,g.Strict)}e.decodeXML=D})(Ft)),Ft}var ol;function id(){return ol||(ol=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.QuoteType=void 0;var a=ts(),i;(function(l){l[l.Tab=9]="Tab",l[l.NewLine=10]="NewLine",l[l.FormFeed=12]="FormFeed",l[l.CarriageReturn=13]="CarriageReturn",l[l.Space=32]="Space",l[l.ExclamationMark=33]="ExclamationMark",l[l.Number=35]="Number",l[l.Amp=38]="Amp",l[l.SingleQuote=39]="SingleQuote",l[l.DoubleQuote=34]="DoubleQuote",l[l.Dash=45]="Dash",l[l.Slash=47]="Slash",l[l.Zero=48]="Zero",l[l.Nine=57]="Nine",l[l.Semi=59]="Semi",l[l.Lt=60]="Lt",l[l.Eq=61]="Eq",l[l.Gt=62]="Gt",l[l.Questionmark=63]="Questionmark",l[l.UpperA=65]="UpperA",l[l.LowerA=97]="LowerA",l[l.UpperF=70]="UpperF",l[l.LowerF=102]="LowerF",l[l.UpperZ=90]="UpperZ",l[l.LowerZ=122]="LowerZ",l[l.LowerX=120]="LowerX",l[l.OpeningSquareBracket=91]="OpeningSquareBracket"})(i||(i={}));var s;(function(l){l[l.Text=1]="Text",l[l.BeforeTagName=2]="BeforeTagName",l[l.InTagName=3]="InTagName",l[l.InSelfClosingTag=4]="InSelfClosingTag",l[l.BeforeClosingTagName=5]="BeforeClosingTagName",l[l.InClosingTagName=6]="InClosingTagName",l[l.AfterClosingTagName=7]="AfterClosingTagName",l[l.BeforeAttributeName=8]="BeforeAttributeName",l[l.InAttributeName=9]="InAttributeName",l[l.AfterAttributeName=10]="AfterAttributeName",l[l.BeforeAttributeValue=11]="BeforeAttributeValue",l[l.InAttributeValueDq=12]="InAttributeValueDq",l[l.InAttributeValueSq=13]="InAttributeValueSq",l[l.InAttributeValueNq=14]="InAttributeValueNq",l[l.BeforeDeclaration=15]="BeforeDeclaration",l[l.InDeclaration=16]="InDeclaration",l[l.InProcessingInstruction=17]="InProcessingInstruction",l[l.BeforeComment=18]="BeforeComment",l[l.CDATASequence=19]="CDATASequence",l[l.InSpecialComment=20]="InSpecialComment",l[l.InCommentLike=21]="InCommentLike",l[l.BeforeSpecialS=22]="BeforeSpecialS",l[l.SpecialStartSequence=23]="SpecialStartSequence",l[l.InSpecialTag=24]="InSpecialTag",l[l.BeforeEntity=25]="BeforeEntity",l[l.BeforeNumericEntity=26]="BeforeNumericEntity",l[l.InNamedEntity=27]="InNamedEntity",l[l.InNumericEntity=28]="InNumericEntity",l[l.InHexEntity=29]="InHexEntity"})(s||(s={}));function r(l){return l===i.Space||l===i.NewLine||l===i.Tab||l===i.FormFeed||l===i.CarriageReturn}function n(l){return l===i.Slash||l===i.Gt||r(l)}function u(l){return l>=i.Zero&&l<=i.Nine}function c(l){return l>=i.LowerA&&l<=i.LowerZ||l>=i.UpperA&&l<=i.UpperZ}function d(l){return l>=i.UpperA&&l<=i.UpperF||l>=i.LowerA&&l<=i.LowerF}var f;(function(l){l[l.NoValue=0]="NoValue",l[l.Unquoted=1]="Unquoted",l[l.Single=2]="Single",l[l.Double=3]="Double"})(f=e.QuoteType||(e.QuoteType={}));var o={Cdata:new Uint8Array([67,68,65,84,65,91]),CdataEnd:new Uint8Array([93,93,62]),CommentEnd:new Uint8Array([45,45,62]),ScriptEnd:new Uint8Array([60,47,115,99,114,105,112,116]),StyleEnd:new Uint8Array([60,47,115,116,121,108,101]),TitleEnd:new Uint8Array([60,47,116,105,116,108,101])},h=(function(){function l(p,x){var w=p.xmlMode,b=w===void 0?!1:w,g=p.decodeEntities,v=g===void 0?!0:g;this.cbs=x,this.state=s.Text,this.buffer="",this.sectionStart=0,this.index=0,this.baseState=s.Text,this.isSpecial=!1,this.running=!0,this.offset=0,this.currentSequence=void 0,this.sequenceIndex=0,this.trieIndex=0,this.trieCurrent=0,this.entityResult=0,this.entityExcess=0,this.xmlMode=b,this.decodeEntities=v,this.entityTrie=b?a.xmlDecodeTree:a.htmlDecodeTree}return l.prototype.reset=function(){this.state=s.Text,this.buffer="",this.sectionStart=0,this.index=0,this.baseState=s.Text,this.currentSequence=void 0,this.running=!0,this.offset=0},l.prototype.write=function(p){this.offset+=this.buffer.length,this.buffer=p,this.parse()},l.prototype.end=function(){this.running&&this.finish()},l.prototype.pause=function(){this.running=!1},l.prototype.resume=function(){this.running=!0,this.index<this.buffer.length+this.offset&&this.parse()},l.prototype.getIndex=function(){return this.index},l.prototype.getSectionStart=function(){return this.sectionStart},l.prototype.stateText=function(p){p===i.Lt||!this.decodeEntities&&this.fastForwardTo(i.Lt)?(this.index>this.sectionStart&&this.cbs.ontext(this.sectionStart,this.index),this.state=s.BeforeTagName,this.sectionStart=this.index):this.decodeEntities&&p===i.Amp&&(this.state=s.BeforeEntity)},l.prototype.stateSpecialStartSequence=function(p){var x=this.sequenceIndex===this.currentSequence.length,w=x?n(p):(p|32)===this.currentSequence[this.sequenceIndex];if(!w)this.isSpecial=!1;else if(!x){this.sequenceIndex++;return}this.sequenceIndex=0,this.state=s.InTagName,this.stateInTagName(p)},l.prototype.stateInSpecialTag=function(p){if(this.sequenceIndex===this.currentSequence.length){if(p===i.Gt||r(p)){var x=this.index-this.currentSequence.length;if(this.sectionStart<x){var w=this.index;this.index=x,this.cbs.ontext(this.sectionStart,x),this.index=w}this.isSpecial=!1,this.sectionStart=x+2,this.stateInClosingTagName(p);return}this.sequenceIndex=0}(p|32)===this.currentSequence[this.sequenceIndex]?this.sequenceIndex+=1:this.sequenceIndex===0?this.currentSequence===o.TitleEnd?this.decodeEntities&&p===i.Amp&&(this.state=s.BeforeEntity):this.fastForwardTo(i.Lt)&&(this.sequenceIndex=1):this.sequenceIndex=+(p===i.Lt)},l.prototype.stateCDATASequence=function(p){p===o.Cdata[this.sequenceIndex]?++this.sequenceIndex===o.Cdata.length&&(this.state=s.InCommentLike,this.currentSequence=o.CdataEnd,this.sequenceIndex=0,this.sectionStart=this.index+1):(this.sequenceIndex=0,this.state=s.InDeclaration,this.stateInDeclaration(p))},l.prototype.fastForwardTo=function(p){for(;++this.index<this.buffer.length+this.offset;)if(this.buffer.charCodeAt(this.index-this.offset)===p)return!0;return this.index=this.buffer.length+this.offset-1,!1},l.prototype.stateInCommentLike=function(p){p===this.currentSequence[this.sequenceIndex]?++this.sequenceIndex===this.currentSequence.length&&(this.currentSequence===o.CdataEnd?this.cbs.oncdata(this.sectionStart,this.index,2):this.cbs.oncomment(this.sectionStart,this.index,2),this.sequenceIndex=0,this.sectionStart=this.index+1,this.state=s.Text):this.sequenceIndex===0?this.fastForwardTo(this.currentSequence[0])&&(this.sequenceIndex=1):p!==this.currentSequence[this.sequenceIndex-1]&&(this.sequenceIndex=0)},l.prototype.isTagStartChar=function(p){return this.xmlMode?!n(p):c(p)},l.prototype.startSpecial=function(p,x){this.isSpecial=!0,this.currentSequence=p,this.sequenceIndex=x,this.state=s.SpecialStartSequence},l.prototype.stateBeforeTagName=function(p){if(p===i.ExclamationMark)this.state=s.BeforeDeclaration,this.sectionStart=this.index+1;else if(p===i.Questionmark)this.state=s.InProcessingInstruction,this.sectionStart=this.index+1;else if(this.isTagStartChar(p)){var x=p|32;this.sectionStart=this.index,!this.xmlMode&&x===o.TitleEnd[2]?this.startSpecial(o.TitleEnd,3):this.state=!this.xmlMode&&x===o.ScriptEnd[2]?s.BeforeSpecialS:s.InTagName}else p===i.Slash?this.state=s.BeforeClosingTagName:(this.state=s.Text,this.stateText(p))},l.prototype.stateInTagName=function(p){n(p)&&(this.cbs.onopentagname(this.sectionStart,this.index),this.sectionStart=-1,this.state=s.BeforeAttributeName,this.stateBeforeAttributeName(p))},l.prototype.stateBeforeClosingTagName=function(p){r(p)||(p===i.Gt?this.state=s.Text:(this.state=this.isTagStartChar(p)?s.InClosingTagName:s.InSpecialComment,this.sectionStart=this.index))},l.prototype.stateInClosingTagName=function(p){(p===i.Gt||r(p))&&(this.cbs.onclosetag(this.sectionStart,this.index),this.sectionStart=-1,this.state=s.AfterClosingTagName,this.stateAfterClosingTagName(p))},l.prototype.stateAfterClosingTagName=function(p){(p===i.Gt||this.fastForwardTo(i.Gt))&&(this.state=s.Text,this.baseState=s.Text,this.sectionStart=this.index+1)},l.prototype.stateBeforeAttributeName=function(p){p===i.Gt?(this.cbs.onopentagend(this.index),this.isSpecial?(this.state=s.InSpecialTag,this.sequenceIndex=0):this.state=s.Text,this.baseState=this.state,this.sectionStart=this.index+1):p===i.Slash?this.state=s.InSelfClosingTag:r(p)||(this.state=s.InAttributeName,this.sectionStart=this.index)},l.prototype.stateInSelfClosingTag=function(p){p===i.Gt?(this.cbs.onselfclosingtag(this.index),this.state=s.Text,this.baseState=s.Text,this.sectionStart=this.index+1,this.isSpecial=!1):r(p)||(this.state=s.BeforeAttributeName,this.stateBeforeAttributeName(p))},l.prototype.stateInAttributeName=function(p){(p===i.Eq||n(p))&&(this.cbs.onattribname(this.sectionStart,this.index),this.sectionStart=-1,this.state=s.AfterAttributeName,this.stateAfterAttributeName(p))},l.prototype.stateAfterAttributeName=function(p){p===i.Eq?this.state=s.BeforeAttributeValue:p===i.Slash||p===i.Gt?(this.cbs.onattribend(f.NoValue,this.index),this.state=s.BeforeAttributeName,this.stateBeforeAttributeName(p)):r(p)||(this.cbs.onattribend(f.NoValue,this.index),this.state=s.InAttributeName,this.sectionStart=this.index)},l.prototype.stateBeforeAttributeValue=function(p){p===i.DoubleQuote?(this.state=s.InAttributeValueDq,this.sectionStart=this.index+1):p===i.SingleQuote?(this.state=s.InAttributeValueSq,this.sectionStart=this.index+1):r(p)||(this.sectionStart=this.index,this.state=s.InAttributeValueNq,this.stateInAttributeValueNoQuotes(p))},l.prototype.handleInAttributeValue=function(p,x){p===x||!this.decodeEntities&&this.fastForwardTo(x)?(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=-1,this.cbs.onattribend(x===i.DoubleQuote?f.Double:f.Single,this.index),this.state=s.BeforeAttributeName):this.decodeEntities&&p===i.Amp&&(this.baseState=this.state,this.state=s.BeforeEntity)},l.prototype.stateInAttributeValueDoubleQuotes=function(p){this.handleInAttributeValue(p,i.DoubleQuote)},l.prototype.stateInAttributeValueSingleQuotes=function(p){this.handleInAttributeValue(p,i.SingleQuote)},l.prototype.stateInAttributeValueNoQuotes=function(p){r(p)||p===i.Gt?(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=-1,this.cbs.onattribend(f.Unquoted,this.index),this.state=s.BeforeAttributeName,this.stateBeforeAttributeName(p)):this.decodeEntities&&p===i.Amp&&(this.baseState=this.state,this.state=s.BeforeEntity)},l.prototype.stateBeforeDeclaration=function(p){p===i.OpeningSquareBracket?(this.state=s.CDATASequence,this.sequenceIndex=0):this.state=p===i.Dash?s.BeforeComment:s.InDeclaration},l.prototype.stateInDeclaration=function(p){(p===i.Gt||this.fastForwardTo(i.Gt))&&(this.cbs.ondeclaration(this.sectionStart,this.index),this.state=s.Text,this.sectionStart=this.index+1)},l.prototype.stateInProcessingInstruction=function(p){(p===i.Gt||this.fastForwardTo(i.Gt))&&(this.cbs.onprocessinginstruction(this.sectionStart,this.index),this.state=s.Text,this.sectionStart=this.index+1)},l.prototype.stateBeforeComment=function(p){p===i.Dash?(this.state=s.InCommentLike,this.currentSequence=o.CommentEnd,this.sequenceIndex=2,this.sectionStart=this.index+1):this.state=s.InDeclaration},l.prototype.stateInSpecialComment=function(p){(p===i.Gt||this.fastForwardTo(i.Gt))&&(this.cbs.oncomment(this.sectionStart,this.index,0),this.state=s.Text,this.sectionStart=this.index+1)},l.prototype.stateBeforeSpecialS=function(p){var x=p|32;x===o.ScriptEnd[3]?this.startSpecial(o.ScriptEnd,4):x===o.StyleEnd[3]?this.startSpecial(o.StyleEnd,4):(this.state=s.InTagName,this.stateInTagName(p))},l.prototype.stateBeforeEntity=function(p){this.entityExcess=1,this.entityResult=0,p===i.Number?this.state=s.BeforeNumericEntity:p===i.Amp||(this.trieIndex=0,this.trieCurrent=this.entityTrie[0],this.state=s.InNamedEntity,this.stateInNamedEntity(p))},l.prototype.stateInNamedEntity=function(p){if(this.entityExcess+=1,this.trieIndex=(0,a.determineBranch)(this.entityTrie,this.trieCurrent,this.trieIndex+1,p),this.trieIndex<0){this.emitNamedEntity(),this.index--;return}this.trieCurrent=this.entityTrie[this.trieIndex];var x=this.trieCurrent&a.BinTrieFlags.VALUE_LENGTH;if(x){var w=(x>>14)-1;if(!this.allowLegacyEntity()&&p!==i.Semi)this.trieIndex+=w;else{var b=this.index-this.entityExcess+1;b>this.sectionStart&&this.emitPartial(this.sectionStart,b),this.entityResult=this.trieIndex,this.trieIndex+=w,this.entityExcess=0,this.sectionStart=this.index+1,w===0&&this.emitNamedEntity()}}},l.prototype.emitNamedEntity=function(){if(this.state=this.baseState,this.entityResult!==0){var p=(this.entityTrie[this.entityResult]&a.BinTrieFlags.VALUE_LENGTH)>>14;switch(p){case 1:{this.emitCodePoint(this.entityTrie[this.entityResult]&~a.BinTrieFlags.VALUE_LENGTH);break}case 2:{this.emitCodePoint(this.entityTrie[this.entityResult+1]);break}case 3:this.emitCodePoint(this.entityTrie[this.entityResult+1]),this.emitCodePoint(this.entityTrie[this.entityResult+2])}}},l.prototype.stateBeforeNumericEntity=function(p){(p|32)===i.LowerX?(this.entityExcess++,this.state=s.InHexEntity):(this.state=s.InNumericEntity,this.stateInNumericEntity(p))},l.prototype.emitNumericEntity=function(p){var x=this.index-this.entityExcess-1,w=x+2+ +(this.state===s.InHexEntity);w!==this.index&&(x>this.sectionStart&&this.emitPartial(this.sectionStart,x),this.sectionStart=this.index+Number(p),this.emitCodePoint((0,a.replaceCodePoint)(this.entityResult))),this.state=this.baseState},l.prototype.stateInNumericEntity=function(p){p===i.Semi?this.emitNumericEntity(!0):u(p)?(this.entityResult=this.entityResult*10+(p-i.Zero),this.entityExcess++):(this.allowLegacyEntity()?this.emitNumericEntity(!1):this.state=this.baseState,this.index--)},l.prototype.stateInHexEntity=function(p){p===i.Semi?this.emitNumericEntity(!0):u(p)?(this.entityResult=this.entityResult*16+(p-i.Zero),this.entityExcess++):d(p)?(this.entityResult=this.entityResult*16+((p|32)-i.LowerA+10),this.entityExcess++):(this.allowLegacyEntity()?this.emitNumericEntity(!1):this.state=this.baseState,this.index--)},l.prototype.allowLegacyEntity=function(){return!this.xmlMode&&(this.baseState===s.Text||this.baseState===s.InSpecialTag)},l.prototype.cleanup=function(){this.running&&this.sectionStart!==this.index&&(this.state===s.Text||this.state===s.InSpecialTag&&this.sequenceIndex===0?(this.cbs.ontext(this.sectionStart,this.index),this.sectionStart=this.index):(this.state===s.InAttributeValueDq||this.state===s.InAttributeValueSq||this.state===s.InAttributeValueNq)&&(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=this.index))},l.prototype.shouldContinue=function(){return this.index<this.buffer.length+this.offset&&this.running},l.prototype.parse=function(){for(;this.shouldContinue();){var p=this.buffer.charCodeAt(this.index-this.offset);switch(this.state){case s.Text:{this.stateText(p);break}case s.SpecialStartSequence:{this.stateSpecialStartSequence(p);break}case s.InSpecialTag:{this.stateInSpecialTag(p);break}case s.CDATASequence:{this.stateCDATASequence(p);break}case s.InAttributeValueDq:{this.stateInAttributeValueDoubleQuotes(p);break}case s.InAttributeName:{this.stateInAttributeName(p);break}case s.InCommentLike:{this.stateInCommentLike(p);break}case s.InSpecialComment:{this.stateInSpecialComment(p);break}case s.BeforeAttributeName:{this.stateBeforeAttributeName(p);break}case s.InTagName:{this.stateInTagName(p);break}case s.InClosingTagName:{this.stateInClosingTagName(p);break}case s.BeforeTagName:{this.stateBeforeTagName(p);break}case s.AfterAttributeName:{this.stateAfterAttributeName(p);break}case s.InAttributeValueSq:{this.stateInAttributeValueSingleQuotes(p);break}case s.BeforeAttributeValue:{this.stateBeforeAttributeValue(p);break}case s.BeforeClosingTagName:{this.stateBeforeClosingTagName(p);break}case s.AfterClosingTagName:{this.stateAfterClosingTagName(p);break}case s.BeforeSpecialS:{this.stateBeforeSpecialS(p);break}case s.InAttributeValueNq:{this.stateInAttributeValueNoQuotes(p);break}case s.InSelfClosingTag:{this.stateInSelfClosingTag(p);break}case s.InDeclaration:{this.stateInDeclaration(p);break}case s.BeforeDeclaration:{this.stateBeforeDeclaration(p);break}case s.BeforeComment:{this.stateBeforeComment(p);break}case s.InProcessingInstruction:{this.stateInProcessingInstruction(p);break}case s.InNamedEntity:{this.stateInNamedEntity(p);break}case s.BeforeEntity:{this.stateBeforeEntity(p);break}case s.InHexEntity:{this.stateInHexEntity(p);break}case s.InNumericEntity:{this.stateInNumericEntity(p);break}default:this.stateBeforeNumericEntity(p)}this.index++}this.cleanup()},l.prototype.finish=function(){this.state===s.InNamedEntity&&this.emitNamedEntity(),this.sectionStart<this.index&&this.handleTrailingData(),this.cbs.onend()},l.prototype.handleTrailingData=function(){var p=this.buffer.length+this.offset;this.state===s.InCommentLike?this.currentSequence===o.CdataEnd?this.cbs.oncdata(this.sectionStart,p,0):this.cbs.oncomment(this.sectionStart,p,0):this.state===s.InNumericEntity&&this.allowLegacyEntity()?this.emitNumericEntity(!1):this.state===s.InHexEntity&&this.allowLegacyEntity()?this.emitNumericEntity(!1):this.state===s.InTagName||this.state===s.BeforeAttributeName||this.state===s.BeforeAttributeValue||this.state===s.AfterAttributeName||this.state===s.InAttributeName||this.state===s.InAttributeValueSq||this.state===s.InAttributeValueDq||this.state===s.InAttributeValueNq||this.state===s.InClosingTagName||this.cbs.ontext(this.sectionStart,p)},l.prototype.emitPartial=function(p,x){this.baseState!==s.Text&&this.baseState!==s.InSpecialTag?this.cbs.onattribdata(p,x):this.cbs.ontext(p,x)},l.prototype.emitCodePoint=function(p){this.baseState!==s.Text&&this.baseState!==s.InSpecialTag?this.cbs.onattribentity(p):this.cbs.ontextentity(p)},l})();e.default=h})(Gs)),Gs}var ul;function ll(){if(ul)return It;ul=1;var e=It&&It.__createBinding||(Object.create?(function(b,g,v,_){_===void 0&&(_=v);var N=Object.getOwnPropertyDescriptor(g,v);(!N||("get"in N?!g.__esModule:N.writable||N.configurable))&&(N={enumerable:!0,get:function(){return g[v]}}),Object.defineProperty(b,_,N)}):(function(b,g,v,_){_===void 0&&(_=v),b[_]=g[v]})),a=It&&It.__setModuleDefault||(Object.create?(function(b,g){Object.defineProperty(b,"default",{enumerable:!0,value:g})}):function(b,g){b.default=g}),i=It&&It.__importStar||function(b){if(b&&b.__esModule)return b;var g={};if(b!=null)for(var v in b)v!=="default"&&Object.prototype.hasOwnProperty.call(b,v)&&e(g,b,v);return a(g,b),g};Object.defineProperty(It,"__esModule",{value:!0}),It.Parser=void 0;var s=i(id()),r=ts(),n=new Set(["input","option","optgroup","select","button","datalist","textarea"]),u=new Set(["p"]),c=new Set(["thead","tbody"]),d=new Set(["dd","dt"]),f=new Set(["rt","rp"]),o=new Map([["tr",new Set(["tr","th","td"])],["th",new Set(["th"])],["td",new Set(["thead","th","td"])],["body",new Set(["head","link","script"])],["li",new Set(["li"])],["p",u],["h1",u],["h2",u],["h3",u],["h4",u],["h5",u],["h6",u],["select",n],["input",n],["output",n],["button",n],["datalist",n],["textarea",n],["option",new Set(["option"])],["optgroup",new Set(["optgroup","option"])],["dd",d],["dt",d],["address",u],["article",u],["aside",u],["blockquote",u],["details",u],["div",u],["dl",u],["fieldset",u],["figcaption",u],["figure",u],["footer",u],["form",u],["header",u],["hr",u],["main",u],["nav",u],["ol",u],["pre",u],["section",u],["table",u],["ul",u],["rt",f],["rp",f],["tbody",c],["tfoot",c]]),h=new Set(["area","base","basefont","br","col","command","embed","frame","hr","img","input","isindex","keygen","link","meta","param","source","track","wbr"]),l=new Set(["math","svg"]),p=new Set(["mi","mo","mn","ms","mtext","annotation-xml","foreignobject","desc","title"]),x=/\s|\//,w=(function(){function b(g,v){v===void 0&&(v={});var _,N,y,m,k;this.options=v,this.startIndex=0,this.endIndex=0,this.openTagStart=0,this.tagname="",this.attribname="",this.attribvalue="",this.attribs=null,this.stack=[],this.foreignContext=[],this.buffers=[],this.bufferOffset=0,this.writeIndex=0,this.ended=!1,this.cbs=g??{},this.lowerCaseTagNames=(_=v.lowerCaseTags)!==null&&_!==void 0?_:!v.xmlMode,this.lowerCaseAttributeNames=(N=v.lowerCaseAttributeNames)!==null&&N!==void 0?N:!v.xmlMode,this.tokenizer=new((y=v.Tokenizer)!==null&&y!==void 0?y:s.default)(this.options,this),(k=(m=this.cbs).onparserinit)===null||k===void 0||k.call(m,this)}return b.prototype.ontext=function(g,v){var _,N,y=this.getSlice(g,v);this.endIndex=v-1,(N=(_=this.cbs).ontext)===null||N===void 0||N.call(_,y),this.startIndex=v},b.prototype.ontextentity=function(g){var v,_,N=this.tokenizer.getSectionStart();this.endIndex=N-1,(_=(v=this.cbs).ontext)===null||_===void 0||_.call(v,(0,r.fromCodePoint)(g)),this.startIndex=N},b.prototype.isVoidElement=function(g){return!this.options.xmlMode&&h.has(g)},b.prototype.onopentagname=function(g,v){this.endIndex=v;var _=this.getSlice(g,v);this.lowerCaseTagNames&&(_=_.toLowerCase()),this.emitOpenTag(_)},b.prototype.emitOpenTag=function(g){var v,_,N,y;this.openTagStart=this.startIndex,this.tagname=g;var m=!this.options.xmlMode&&o.get(g);if(m)for(;this.stack.length>0&&m.has(this.stack[this.stack.length-1]);){var k=this.stack.pop();(_=(v=this.cbs).onclosetag)===null||_===void 0||_.call(v,k,!0)}this.isVoidElement(g)||(this.stack.push(g),l.has(g)?this.foreignContext.push(!0):p.has(g)&&this.foreignContext.push(!1)),(y=(N=this.cbs).onopentagname)===null||y===void 0||y.call(N,g),this.cbs.onopentag&&(this.attribs={})},b.prototype.endOpenTag=function(g){var v,_;this.startIndex=this.openTagStart,this.attribs&&((_=(v=this.cbs).onopentag)===null||_===void 0||_.call(v,this.tagname,this.attribs,g),this.attribs=null),this.cbs.onclosetag&&this.isVoidElement(this.tagname)&&this.cbs.onclosetag(this.tagname,!0),this.tagname=""},b.prototype.onopentagend=function(g){this.endIndex=g,this.endOpenTag(!1),this.startIndex=g+1},b.prototype.onclosetag=function(g,v){var _,N,y,m,k,j;this.endIndex=v;var A=this.getSlice(g,v);if(this.lowerCaseTagNames&&(A=A.toLowerCase()),(l.has(A)||p.has(A))&&this.foreignContext.pop(),this.isVoidElement(A))!this.options.xmlMode&&A==="br"&&((N=(_=this.cbs).onopentagname)===null||N===void 0||N.call(_,"br"),(m=(y=this.cbs).onopentag)===null||m===void 0||m.call(y,"br",{},!0),(j=(k=this.cbs).onclosetag)===null||j===void 0||j.call(k,"br",!1));else{var D=this.stack.lastIndexOf(A);if(D!==-1)if(this.cbs.onclosetag)for(var C=this.stack.length-D;C--;)this.cbs.onclosetag(this.stack.pop(),C!==0);else this.stack.length=D;else!this.options.xmlMode&&A==="p"&&(this.emitOpenTag("p"),this.closeCurrentTag(!0))}this.startIndex=v+1},b.prototype.onselfclosingtag=function(g){this.endIndex=g,this.options.xmlMode||this.options.recognizeSelfClosing||this.foreignContext[this.foreignContext.length-1]?(this.closeCurrentTag(!1),this.startIndex=g+1):this.onopentagend(g)},b.prototype.closeCurrentTag=function(g){var v,_,N=this.tagname;this.endOpenTag(g),this.stack[this.stack.length-1]===N&&((_=(v=this.cbs).onclosetag)===null||_===void 0||_.call(v,N,!g),this.stack.pop())},b.prototype.onattribname=function(g,v){this.startIndex=g;var _=this.getSlice(g,v);this.attribname=this.lowerCaseAttributeNames?_.toLowerCase():_},b.prototype.onattribdata=function(g,v){this.attribvalue+=this.getSlice(g,v)},b.prototype.onattribentity=function(g){this.attribvalue+=(0,r.fromCodePoint)(g)},b.prototype.onattribend=function(g,v){var _,N;this.endIndex=v,(N=(_=this.cbs).onattribute)===null||N===void 0||N.call(_,this.attribname,this.attribvalue,g===s.QuoteType.Double?'"':g===s.QuoteType.Single?"'":g===s.QuoteType.NoValue?void 0:null),this.attribs&&!Object.prototype.hasOwnProperty.call(this.attribs,this.attribname)&&(this.attribs[this.attribname]=this.attribvalue),this.attribvalue=""},b.prototype.getInstructionName=function(g){var v=g.search(x),_=v<0?g:g.substr(0,v);return this.lowerCaseTagNames&&(_=_.toLowerCase()),_},b.prototype.ondeclaration=function(g,v){this.endIndex=v;var _=this.getSlice(g,v);if(this.cbs.onprocessinginstruction){var N=this.getInstructionName(_);this.cbs.onprocessinginstruction("!".concat(N),"!".concat(_))}this.startIndex=v+1},b.prototype.onprocessinginstruction=function(g,v){this.endIndex=v;var _=this.getSlice(g,v);if(this.cbs.onprocessinginstruction){var N=this.getInstructionName(_);this.cbs.onprocessinginstruction("?".concat(N),"?".concat(_))}this.startIndex=v+1},b.prototype.oncomment=function(g,v,_){var N,y,m,k;this.endIndex=v,(y=(N=this.cbs).oncomment)===null||y===void 0||y.call(N,this.getSlice(g,v-_)),(k=(m=this.cbs).oncommentend)===null||k===void 0||k.call(m),this.startIndex=v+1},b.prototype.oncdata=function(g,v,_){var N,y,m,k,j,A,D,C,O,L;this.endIndex=v;var H=this.getSlice(g,v-_);this.options.xmlMode||this.options.recognizeCDATA?((y=(N=this.cbs).oncdatastart)===null||y===void 0||y.call(N),(k=(m=this.cbs).ontext)===null||k===void 0||k.call(m,H),(A=(j=this.cbs).oncdataend)===null||A===void 0||A.call(j)):((C=(D=this.cbs).oncomment)===null||C===void 0||C.call(D,"[CDATA[".concat(H,"]]")),(L=(O=this.cbs).oncommentend)===null||L===void 0||L.call(O)),this.startIndex=v+1},b.prototype.onend=function(){var g,v;if(this.cbs.onclosetag){this.endIndex=this.startIndex;for(var _=this.stack.length;_>0;this.cbs.onclosetag(this.stack[--_],!0));}(v=(g=this.cbs).onend)===null||v===void 0||v.call(g)},b.prototype.reset=function(){var g,v,_,N;(v=(g=this.cbs).onreset)===null||v===void 0||v.call(g),this.tokenizer.reset(),this.tagname="",this.attribname="",this.attribs=null,this.stack.length=0,this.startIndex=0,this.endIndex=0,(N=(_=this.cbs).onparserinit)===null||N===void 0||N.call(_,this),this.buffers.length=0,this.bufferOffset=0,this.writeIndex=0,this.ended=!1},b.prototype.parseComplete=function(g){this.reset(),this.end(g)},b.prototype.getSlice=function(g,v){for(;g-this.bufferOffset>=this.buffers[0].length;)this.shiftBuffer();for(var _=this.buffers[0].slice(g-this.bufferOffset,v-this.bufferOffset);v-this.bufferOffset>this.buffers[0].length;)this.shiftBuffer(),_+=this.buffers[0].slice(0,v-this.bufferOffset);return _},b.prototype.shiftBuffer=function(){this.bufferOffset+=this.buffers[0].length,this.writeIndex--,this.buffers.shift()},b.prototype.write=function(g){var v,_;if(this.ended){(_=(v=this.cbs).onerror)===null||_===void 0||_.call(v,new Error(".write() after done!"));return}this.buffers.push(g),this.tokenizer.running&&(this.tokenizer.write(g),this.writeIndex++)},b.prototype.end=function(g){var v,_;if(this.ended){(_=(v=this.cbs).onerror)===null||_===void 0||_.call(v,new Error(".end() after done!"));return}g&&this.write(g),this.ended=!0,this.tokenizer.end()},b.prototype.pause=function(){this.tokenizer.pause()},b.prototype.resume=function(){for(this.tokenizer.resume();this.tokenizer.running&&this.writeIndex<this.buffers.length;)this.tokenizer.write(this.buffers[this.writeIndex++]);this.ended&&this.tokenizer.end()},b.prototype.parseChunk=function(g){this.write(g)},b.prototype.done=function(g){this.end(g)},b})();return It.Parser=w,It}var Ir={},Ys={},cl;function nn(){return cl||(cl=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Doctype=e.CDATA=e.Tag=e.Style=e.Script=e.Comment=e.Directive=e.Text=e.Root=e.isTag=e.ElementType=void 0;var a;(function(s){s.Root="root",s.Text="text",s.Directive="directive",s.Comment="comment",s.Script="script",s.Style="style",s.Tag="tag",s.CDATA="cdata",s.Doctype="doctype"})(a=e.ElementType||(e.ElementType={}));function i(s){return s.type===a.Tag||s.type===a.Script||s.type===a.Style}e.isTag=i,e.Root=a.Root,e.Text=a.Text,e.Directive=a.Directive,e.Comment=a.Comment,e.Script=a.Script,e.Style=a.Style,e.Tag=a.Tag,e.CDATA=a.CDATA,e.Doctype=a.Doctype})(Ys)),Ys}var ve={},dl;function fl(){if(dl)return ve;dl=1;var e=ve&&ve.__extends||(function(){var y=function(m,k){return y=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(j,A){j.__proto__=A}||function(j,A){for(var D in A)Object.prototype.hasOwnProperty.call(A,D)&&(j[D]=A[D])},y(m,k)};return function(m,k){if(typeof k!="function"&&k!==null)throw new TypeError("Class extends value "+String(k)+" is not a constructor or null");y(m,k);function j(){this.constructor=m}m.prototype=k===null?Object.create(k):(j.prototype=k.prototype,new j)}})(),a=ve&&ve.__assign||function(){return a=Object.assign||function(y){for(var m,k=1,j=arguments.length;k<j;k++){m=arguments[k];for(var A in m)Object.prototype.hasOwnProperty.call(m,A)&&(y[A]=m[A])}return y},a.apply(this,arguments)};Object.defineProperty(ve,"__esModule",{value:!0}),ve.cloneNode=ve.hasChildren=ve.isDocument=ve.isDirective=ve.isComment=ve.isText=ve.isCDATA=ve.isTag=ve.Element=ve.Document=ve.CDATA=ve.NodeWithChildren=ve.ProcessingInstruction=ve.Comment=ve.Text=ve.DataNode=ve.Node=void 0;var i=nn(),s=(function(){function y(){this.parent=null,this.prev=null,this.next=null,this.startIndex=null,this.endIndex=null}return Object.defineProperty(y.prototype,"parentNode",{get:function(){return this.parent},set:function(m){this.parent=m},enumerable:!1,configurable:!0}),Object.defineProperty(y.prototype,"previousSibling",{get:function(){return this.prev},set:function(m){this.prev=m},enumerable:!1,configurable:!0}),Object.defineProperty(y.prototype,"nextSibling",{get:function(){return this.next},set:function(m){this.next=m},enumerable:!1,configurable:!0}),y.prototype.cloneNode=function(m){return m===void 0&&(m=!1),_(this,m)},y})();ve.Node=s;var r=(function(y){e(m,y);function m(k){var j=y.call(this)||this;return j.data=k,j}return Object.defineProperty(m.prototype,"nodeValue",{get:function(){return this.data},set:function(k){this.data=k},enumerable:!1,configurable:!0}),m})(s);ve.DataNode=r;var n=(function(y){e(m,y);function m(){var k=y!==null&&y.apply(this,arguments)||this;return k.type=i.ElementType.Text,k}return Object.defineProperty(m.prototype,"nodeType",{get:function(){return 3},enumerable:!1,configurable:!0}),m})(r);ve.Text=n;var u=(function(y){e(m,y);function m(){var k=y!==null&&y.apply(this,arguments)||this;return k.type=i.ElementType.Comment,k}return Object.defineProperty(m.prototype,"nodeType",{get:function(){return 8},enumerable:!1,configurable:!0}),m})(r);ve.Comment=u;var c=(function(y){e(m,y);function m(k,j){var A=y.call(this,j)||this;return A.name=k,A.type=i.ElementType.Directive,A}return Object.defineProperty(m.prototype,"nodeType",{get:function(){return 1},enumerable:!1,configurable:!0}),m})(r);ve.ProcessingInstruction=c;var d=(function(y){e(m,y);function m(k){var j=y.call(this)||this;return j.children=k,j}return Object.defineProperty(m.prototype,"firstChild",{get:function(){var k;return(k=this.children[0])!==null&&k!==void 0?k:null},enumerable:!1,configurable:!0}),Object.defineProperty(m.prototype,"lastChild",{get:function(){return this.children.length>0?this.children[this.children.length-1]:null},enumerable:!1,configurable:!0}),Object.defineProperty(m.prototype,"childNodes",{get:function(){return this.children},set:function(k){this.children=k},enumerable:!1,configurable:!0}),m})(s);ve.NodeWithChildren=d;var f=(function(y){e(m,y);function m(){var k=y!==null&&y.apply(this,arguments)||this;return k.type=i.ElementType.CDATA,k}return Object.defineProperty(m.prototype,"nodeType",{get:function(){return 4},enumerable:!1,configurable:!0}),m})(d);ve.CDATA=f;var o=(function(y){e(m,y);function m(){var k=y!==null&&y.apply(this,arguments)||this;return k.type=i.ElementType.Root,k}return Object.defineProperty(m.prototype,"nodeType",{get:function(){return 9},enumerable:!1,configurable:!0}),m})(d);ve.Document=o;var h=(function(y){e(m,y);function m(k,j,A,D){A===void 0&&(A=[]),D===void 0&&(D=k==="script"?i.ElementType.Script:k==="style"?i.ElementType.Style:i.ElementType.Tag);var C=y.call(this,A)||this;return C.name=k,C.attribs=j,C.type=D,C}return Object.defineProperty(m.prototype,"nodeType",{get:function(){return 1},enumerable:!1,configurable:!0}),Object.defineProperty(m.prototype,"tagName",{get:function(){return this.name},set:function(k){this.name=k},enumerable:!1,configurable:!0}),Object.defineProperty(m.prototype,"attributes",{get:function(){var k=this;return Object.keys(this.attribs).map(function(j){var A,D;return{name:j,value:k.attribs[j],namespace:(A=k["x-attribsNamespace"])===null||A===void 0?void 0:A[j],prefix:(D=k["x-attribsPrefix"])===null||D===void 0?void 0:D[j]}})},enumerable:!1,configurable:!0}),m})(d);ve.Element=h;function l(y){return(0,i.isTag)(y)}ve.isTag=l;function p(y){return y.type===i.ElementType.CDATA}ve.isCDATA=p;function x(y){return y.type===i.ElementType.Text}ve.isText=x;function w(y){return y.type===i.ElementType.Comment}ve.isComment=w;function b(y){return y.type===i.ElementType.Directive}ve.isDirective=b;function g(y){return y.type===i.ElementType.Root}ve.isDocument=g;function v(y){return Object.prototype.hasOwnProperty.call(y,"children")}ve.hasChildren=v;function _(y,m){m===void 0&&(m=!1);var k;if(x(y))k=new n(y.data);else if(w(y))k=new u(y.data);else if(l(y)){var j=m?N(y.children):[],A=new h(y.name,a({},y.attribs),j);j.forEach(function(L){return L.parent=A}),y.namespace!=null&&(A.namespace=y.namespace),y["x-attribsNamespace"]&&(A["x-attribsNamespace"]=a({},y["x-attribsNamespace"])),y["x-attribsPrefix"]&&(A["x-attribsPrefix"]=a({},y["x-attribsPrefix"])),k=A}else if(p(y)){var j=m?N(y.children):[],D=new f(j);j.forEach(function(H){return H.parent=D}),k=D}else if(g(y)){var j=m?N(y.children):[],C=new o(j);j.forEach(function(H){return H.parent=C}),y["x-mode"]&&(C["x-mode"]=y["x-mode"]),k=C}else if(b(y)){var O=new c(y.name,y.data);y["x-name"]!=null&&(O["x-name"]=y["x-name"],O["x-publicId"]=y["x-publicId"],O["x-systemId"]=y["x-systemId"]),k=O}else throw new Error("Not implemented yet: ".concat(y.type));return k.startIndex=y.startIndex,k.endIndex=y.endIndex,y.sourceCodeLocation!=null&&(k.sourceCodeLocation=y.sourceCodeLocation),k}ve.cloneNode=_;function N(y){for(var m=y.map(function(j){return _(j,!0)}),k=1;k<m.length;k++)m[k].prev=m[k-1],m[k-1].next=m[k];return m}return ve}var hl;function xr(){return hl||(hl=1,(function(e){var a=Ir&&Ir.__createBinding||(Object.create?(function(c,d,f,o){o===void 0&&(o=f);var h=Object.getOwnPropertyDescriptor(d,f);(!h||("get"in h?!d.__esModule:h.writable||h.configurable))&&(h={enumerable:!0,get:function(){return d[f]}}),Object.defineProperty(c,o,h)}):(function(c,d,f,o){o===void 0&&(o=f),c[o]=d[f]})),i=Ir&&Ir.__exportStar||function(c,d){for(var f in c)f!=="default"&&!Object.prototype.hasOwnProperty.call(d,f)&&a(d,c,f)};Object.defineProperty(e,"__esModule",{value:!0}),e.DomHandler=void 0;var s=nn(),r=fl();i(fl(),e);var n={withStartIndices:!1,withEndIndices:!1,xmlMode:!1},u=(function(){function c(d,f,o){this.dom=[],this.root=new r.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null,typeof f=="function"&&(o=f,f=n),typeof d=="object"&&(f=d,d=void 0),this.callback=d??null,this.options=f??n,this.elementCB=o??null}return c.prototype.onparserinit=function(d){this.parser=d},c.prototype.onreset=function(){this.dom=[],this.root=new r.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null},c.prototype.onend=function(){this.done||(this.done=!0,this.parser=null,this.handleCallback(null))},c.prototype.onerror=function(d){this.handleCallback(d)},c.prototype.onclosetag=function(){this.lastNode=null;var d=this.tagStack.pop();this.options.withEndIndices&&(d.endIndex=this.parser.endIndex),this.elementCB&&this.elementCB(d)},c.prototype.onopentag=function(d,f){var o=this.options.xmlMode?s.ElementType.Tag:void 0,h=new r.Element(d,f,void 0,o);this.addNode(h),this.tagStack.push(h)},c.prototype.ontext=function(d){var f=this.lastNode;if(f&&f.type===s.ElementType.Text)f.data+=d,this.options.withEndIndices&&(f.endIndex=this.parser.endIndex);else{var o=new r.Text(d);this.addNode(o),this.lastNode=o}},c.prototype.oncomment=function(d){if(this.lastNode&&this.lastNode.type===s.ElementType.Comment){this.lastNode.data+=d;return}var f=new r.Comment(d);this.addNode(f),this.lastNode=f},c.prototype.oncommentend=function(){this.lastNode=null},c.prototype.oncdatastart=function(){var d=new r.Text(""),f=new r.CDATA([d]);this.addNode(f),d.parent=f,this.lastNode=d},c.prototype.oncdataend=function(){this.lastNode=null},c.prototype.onprocessinginstruction=function(d,f){var o=new r.ProcessingInstruction(d,f);this.addNode(o)},c.prototype.handleCallback=function(d){if(typeof this.callback=="function")this.callback(d,this.dom);else if(d)throw d},c.prototype.addNode=function(d){var f=this.tagStack[this.tagStack.length-1],o=f.children[f.children.length-1];this.options.withStartIndices&&(d.startIndex=this.parser.startIndex),this.options.withEndIndices&&(d.endIndex=this.parser.endIndex),f.children.push(d),o&&(d.prev=o,o.next=d),d.parent=f,this.lastNode=null},c})();e.DomHandler=u,e.default=u})(Ir)),Ir}var Fr={},Wt={},lt={},Zs={},tr={},Vn={},pl;function Rh(){if(pl)return Vn;pl=1,Object.defineProperty(Vn,"__esModule",{value:!0});function e(a){for(var i=1;i<a.length;i++)a[i][0]+=a[i-1][0]+1;return a}return Vn.default=new Map(e([[9,"	"],[0,"
"],[22,"!"],[0,"""],[0,"#"],[0,"$"],[0,"%"],[0,"&"],[0,"'"],[0,"("],[0,")"],[0,"*"],[0,"+"],[0,","],[1,"."],[0,"/"],[10,":"],[0,";"],[0,{v:"<",n:8402,o:"<⃒"}],[0,{v:"=",n:8421,o:"=⃥"}],[0,{v:">",n:8402,o:">⃒"}],[0,"?"],[0,"@"],[26,"["],[0,"\"],[0,"]"],[0,"^"],[0,"_"],[0,"`"],[5,{n:106,o:"fj"}],[20,"{"],[0,"|"],[0,"}"],[34," "],[0,"¡"],[0,"¢"],[0,"£"],[0,"¤"],[0,"¥"],[0,"¦"],[0,"§"],[0,"¨"],[0,"©"],[0,"ª"],[0,"«"],[0,"¬"],[0,"­"],[0,"®"],[0,"¯"],[0,"°"],[0,"±"],[0,"²"],[0,"³"],[0,"´"],[0,"µ"],[0,"¶"],[0,"·"],[0,"¸"],[0,"¹"],[0,"º"],[0,"»"],[0,"¼"],[0,"½"],[0,"¾"],[0,"¿"],[0,"À"],[0,"Á"],[0,"Â"],[0,"Ã"],[0,"Ä"],[0,"Å"],[0,"Æ"],[0,"Ç"],[0,"È"],[0,"É"],[0,"Ê"],[0,"Ë"],[0,"Ì"],[0,"Í"],[0,"Î"],[0,"Ï"],[0,"Ð"],[0,"Ñ"],[0,"Ò"],[0,"Ó"],[0,"Ô"],[0,"Õ"],[0,"Ö"],[0,"×"],[0,"Ø"],[0,"Ù"],[0,"Ú"],[0,"Û"],[0,"Ü"],[0,"Ý"],[0,"Þ"],[0,"ß"],[0,"à"],[0,"á"],[0,"â"],[0,"ã"],[0,"ä"],[0,"å"],[0,"æ"],[0,"ç"],[0,"è"],[0,"é"],[0,"ê"],[0,"ë"],[0,"ì"],[0,"í"],[0,"î"],[0,"ï"],[0,"ð"],[0,"ñ"],[0,"ò"],[0,"ó"],[0,"ô"],[0,"õ"],[0,"ö"],[0,"÷"],[0,"ø"],[0,"ù"],[0,"ú"],[0,"û"],[0,"ü"],[0,"ý"],[0,"þ"],[0,"ÿ"],[0,"Ā"],[0,"ā"],[0,"Ă"],[0,"ă"],[0,"Ą"],[0,"ą"],[0,"Ć"],[0,"ć"],[0,"Ĉ"],[0,"ĉ"],[0,"Ċ"],[0,"ċ"],[0,"Č"],[0,"č"],[0,"Ď"],[0,"ď"],[0,"Đ"],[0,"đ"],[0,"Ē"],[0,"ē"],[2,"Ė"],[0,"ė"],[0,"Ę"],[0,"ę"],[0,"Ě"],[0,"ě"],[0,"Ĝ"],[0,"ĝ"],[0,"Ğ"],[0,"ğ"],[0,"Ġ"],[0,"ġ"],[0,"Ģ"],[1,"Ĥ"],[0,"ĥ"],[0,"Ħ"],[0,"ħ"],[0,"Ĩ"],[0,"ĩ"],[0,"Ī"],[0,"ī"],[2,"Į"],[0,"į"],[0,"İ"],[0,"ı"],[0,"IJ"],[0,"ij"],[0,"Ĵ"],[0,"ĵ"],[0,"Ķ"],[0,"ķ"],[0,"ĸ"],[0,"Ĺ"],[0,"ĺ"],[0,"Ļ"],[0,"ļ"],[0,"Ľ"],[0,"ľ"],[0,"Ŀ"],[0,"ŀ"],[0,"Ł"],[0,"ł"],[0,"Ń"],[0,"ń"],[0,"Ņ"],[0,"ņ"],[0,"Ň"],[0,"ň"],[0,"ʼn"],[0,"Ŋ"],[0,"ŋ"],[0,"Ō"],[0,"ō"],[2,"Ő"],[0,"ő"],[0,"Œ"],[0,"œ"],[0,"Ŕ"],[0,"ŕ"],[0,"Ŗ"],[0,"ŗ"],[0,"Ř"],[0,"ř"],[0,"Ś"],[0,"ś"],[0,"Ŝ"],[0,"ŝ"],[0,"Ş"],[0,"ş"],[0,"Š"],[0,"š"],[0,"Ţ"],[0,"ţ"],[0,"Ť"],[0,"ť"],[0,"Ŧ"],[0,"ŧ"],[0,"Ũ"],[0,"ũ"],[0,"Ū"],[0,"ū"],[0,"Ŭ"],[0,"ŭ"],[0,"Ů"],[0,"ů"],[0,"Ű"],[0,"ű"],[0,"Ų"],[0,"ų"],[0,"Ŵ"],[0,"ŵ"],[0,"Ŷ"],[0,"ŷ"],[0,"Ÿ"],[0,"Ź"],[0,"ź"],[0,"Ż"],[0,"ż"],[0,"Ž"],[0,"ž"],[19,"ƒ"],[34,"Ƶ"],[63,"ǵ"],[65,"ȷ"],[142,"ˆ"],[0,"ˇ"],[16,"˘"],[0,"˙"],[0,"˚"],[0,"˛"],[0,"˜"],[0,"˝"],[51,"̑"],[127,"Α"],[0,"Β"],[0,"Γ"],[0,"Δ"],[0,"Ε"],[0,"Ζ"],[0,"Η"],[0,"Θ"],[0,"Ι"],[0,"Κ"],[0,"Λ"],[0,"Μ"],[0,"Ν"],[0,"Ξ"],[0,"Ο"],[0,"Π"],[0,"Ρ"],[1,"Σ"],[0,"Τ"],[0,"Υ"],[0,"Φ"],[0,"Χ"],[0,"Ψ"],[0,"Ω"],[7,"α"],[0,"β"],[0,"γ"],[0,"δ"],[0,"ε"],[0,"ζ"],[0,"η"],[0,"θ"],[0,"ι"],[0,"κ"],[0,"λ"],[0,"μ"],[0,"ν"],[0,"ξ"],[0,"ο"],[0,"π"],[0,"ρ"],[0,"ς"],[0,"σ"],[0,"τ"],[0,"υ"],[0,"φ"],[0,"χ"],[0,"ψ"],[0,"ω"],[7,"ϑ"],[0,"ϒ"],[2,"ϕ"],[0,"ϖ"],[5,"Ϝ"],[0,"ϝ"],[18,"ϰ"],[0,"ϱ"],[3,"ϵ"],[0,"϶"],[10,"Ё"],[0,"Ђ"],[0,"Ѓ"],[0,"Є"],[0,"Ѕ"],[0,"І"],[0,"Ї"],[0,"Ј"],[0,"Љ"],[0,"Њ"],[0,"Ћ"],[0,"Ќ"],[1,"Ў"],[0,"Џ"],[0,"А"],[0,"Б"],[0,"В"],[0,"Г"],[0,"Д"],[0,"Е"],[0,"Ж"],[0,"З"],[0,"И"],[0,"Й"],[0,"К"],[0,"Л"],[0,"М"],[0,"Н"],[0,"О"],[0,"П"],[0,"Р"],[0,"С"],[0,"Т"],[0,"У"],[0,"Ф"],[0,"Х"],[0,"Ц"],[0,"Ч"],[0,"Ш"],[0,"Щ"],[0,"Ъ"],[0,"Ы"],[0,"Ь"],[0,"Э"],[0,"Ю"],[0,"Я"],[0,"а"],[0,"б"],[0,"в"],[0,"г"],[0,"д"],[0,"е"],[0,"ж"],[0,"з"],[0,"и"],[0,"й"],[0,"к"],[0,"л"],[0,"м"],[0,"н"],[0,"о"],[0,"п"],[0,"р"],[0,"с"],[0,"т"],[0,"у"],[0,"ф"],[0,"х"],[0,"ц"],[0,"ч"],[0,"ш"],[0,"щ"],[0,"ъ"],[0,"ы"],[0,"ь"],[0,"э"],[0,"ю"],[0,"я"],[1,"ё"],[0,"ђ"],[0,"ѓ"],[0,"є"],[0,"ѕ"],[0,"і"],[0,"ї"],[0,"ј"],[0,"љ"],[0,"њ"],[0,"ћ"],[0,"ќ"],[1,"ў"],[0,"џ"],[7074," "],[0," "],[0," "],[0," "],[1," "],[0," "],[0," "],[0," "],[0,"​"],[0,"‌"],[0,"‍"],[0,"‎"],[0,"‏"],[0,"‐"],[2,"–"],[0,"—"],[0,"―"],[0,"‖"],[1,"‘"],[0,"’"],[0,"‚"],[1,"“"],[0,"”"],[0,"„"],[1,"†"],[0,"‡"],[0,"•"],[2,"‥"],[0,"…"],[9,"‰"],[0,"‱"],[0,"′"],[0,"″"],[0,"‴"],[0,"‵"],[3,"‹"],[0,"›"],[3,"‾"],[2,"⁁"],[1,"⁃"],[0,"⁄"],[10,"⁏"],[7,"⁗"],[7,{v:" ",n:8202,o:"  "}],[0,"⁠"],[0,"⁡"],[0,"⁢"],[0,"⁣"],[72,"€"],[46,"⃛"],[0,"⃜"],[37,"ℂ"],[2,"℅"],[4,"ℊ"],[0,"ℋ"],[0,"ℌ"],[0,"ℍ"],[0,"ℎ"],[0,"ℏ"],[0,"ℐ"],[0,"ℑ"],[0,"ℒ"],[0,"ℓ"],[1,"ℕ"],[0,"№"],[0,"℗"],[0,"℘"],[0,"ℙ"],[0,"ℚ"],[0,"ℛ"],[0,"ℜ"],[0,"ℝ"],[0,"℞"],[3,"™"],[1,"ℤ"],[2,"℧"],[0,"ℨ"],[0,"℩"],[2,"ℬ"],[0,"ℭ"],[1,"ℯ"],[0,"ℰ"],[0,"ℱ"],[1,"ℳ"],[0,"ℴ"],[0,"ℵ"],[0,"ℶ"],[0,"ℷ"],[0,"ℸ"],[12,"ⅅ"],[0,"ⅆ"],[0,"ⅇ"],[0,"ⅈ"],[10,"⅓"],[0,"⅔"],[0,"⅕"],[0,"⅖"],[0,"⅗"],[0,"⅘"],[0,"⅙"],[0,"⅚"],[0,"⅛"],[0,"⅜"],[0,"⅝"],[0,"⅞"],[49,"←"],[0,"↑"],[0,"→"],[0,"↓"],[0,"↔"],[0,"↕"],[0,"↖"],[0,"↗"],[0,"↘"],[0,"↙"],[0,"↚"],[0,"↛"],[1,{v:"↝",n:824,o:"↝̸"}],[0,"↞"],[0,"↟"],[0,"↠"],[0,"↡"],[0,"↢"],[0,"↣"],[0,"↤"],[0,"↥"],[0,"↦"],[0,"↧"],[1,"↩"],[0,"↪"],[0,"↫"],[0,"↬"],[0,"↭"],[0,"↮"],[1,"↰"],[0,"↱"],[0,"↲"],[0,"↳"],[1,"↵"],[0,"↶"],[0,"↷"],[2,"↺"],[0,"↻"],[0,"↼"],[0,"↽"],[0,"↾"],[0,"↿"],[0,"⇀"],[0,"⇁"],[0,"⇂"],[0,"⇃"],[0,"⇄"],[0,"⇅"],[0,"⇆"],[0,"⇇"],[0,"⇈"],[0,"⇉"],[0,"⇊"],[0,"⇋"],[0,"⇌"],[0,"⇍"],[0,"⇎"],[0,"⇏"],[0,"⇐"],[0,"⇑"],[0,"⇒"],[0,"⇓"],[0,"⇔"],[0,"⇕"],[0,"⇖"],[0,"⇗"],[0,"⇘"],[0,"⇙"],[0,"⇚"],[0,"⇛"],[1,"⇝"],[6,"⇤"],[0,"⇥"],[15,"⇵"],[7,"⇽"],[0,"⇾"],[0,"⇿"],[0,"∀"],[0,"∁"],[0,{v:"∂",n:824,o:"∂̸"}],[0,"∃"],[0,"∄"],[0,"∅"],[1,"∇"],[0,"∈"],[0,"∉"],[1,"∋"],[0,"∌"],[2,"∏"],[0,"∐"],[0,"∑"],[0,"−"],[0,"∓"],[0,"∔"],[1,"∖"],[0,"∗"],[0,"∘"],[1,"√"],[2,"∝"],[0,"∞"],[0,"∟"],[0,{v:"∠",n:8402,o:"∠⃒"}],[0,"∡"],[0,"∢"],[0,"∣"],[0,"∤"],[0,"∥"],[0,"∦"],[0,"∧"],[0,"∨"],[0,{v:"∩",n:65024,o:"∩︀"}],[0,{v:"∪",n:65024,o:"∪︀"}],[0,"∫"],[0,"∬"],[0,"∭"],[0,"∮"],[0,"∯"],[0,"∰"],[0,"∱"],[0,"∲"],[0,"∳"],[0,"∴"],[0,"∵"],[0,"∶"],[0,"∷"],[0,"∸"],[1,"∺"],[0,"∻"],[0,{v:"∼",n:8402,o:"∼⃒"}],[0,{v:"∽",n:817,o:"∽̱"}],[0,{v:"∾",n:819,o:"∾̳"}],[0,"∿"],[0,"≀"],[0,"≁"],[0,{v:"≂",n:824,o:"≂̸"}],[0,"≃"],[0,"≄"],[0,"≅"],[0,"≆"],[0,"≇"],[0,"≈"],[0,"≉"],[0,"≊"],[0,{v:"≋",n:824,o:"≋̸"}],[0,"≌"],[0,{v:"≍",n:8402,o:"≍⃒"}],[0,{v:"≎",n:824,o:"≎̸"}],[0,{v:"≏",n:824,o:"≏̸"}],[0,{v:"≐",n:824,o:"≐̸"}],[0,"≑"],[0,"≒"],[0,"≓"],[0,"≔"],[0,"≕"],[0,"≖"],[0,"≗"],[1,"≙"],[0,"≚"],[1,"≜"],[2,"≟"],[0,"≠"],[0,{v:"≡",n:8421,o:"≡⃥"}],[0,"≢"],[1,{v:"≤",n:8402,o:"≤⃒"}],[0,{v:"≥",n:8402,o:"≥⃒"}],[0,{v:"≦",n:824,o:"≦̸"}],[0,{v:"≧",n:824,o:"≧̸"}],[0,{v:"≨",n:65024,o:"≨︀"}],[0,{v:"≩",n:65024,o:"≩︀"}],[0,{v:"≪",n:new Map(e([[824,"≪̸"],[7577,"≪⃒"]]))}],[0,{v:"≫",n:new Map(e([[824,"≫̸"],[7577,"≫⃒"]]))}],[0,"≬"],[0,"≭"],[0,"≮"],[0,"≯"],[0,"≰"],[0,"≱"],[0,"≲"],[0,"≳"],[0,"≴"],[0,"≵"],[0,"≶"],[0,"≷"],[0,"≸"],[0,"≹"],[0,"≺"],[0,"≻"],[0,"≼"],[0,"≽"],[0,"≾"],[0,{v:"≿",n:824,o:"≿̸"}],[0,"⊀"],[0,"⊁"],[0,{v:"⊂",n:8402,o:"⊂⃒"}],[0,{v:"⊃",n:8402,o:"⊃⃒"}],[0,"⊄"],[0,"⊅"],[0,"⊆"],[0,"⊇"],[0,"⊈"],[0,"⊉"],[0,{v:"⊊",n:65024,o:"⊊︀"}],[0,{v:"⊋",n:65024,o:"⊋︀"}],[1,"⊍"],[0,"⊎"],[0,{v:"⊏",n:824,o:"⊏̸"}],[0,{v:"⊐",n:824,o:"⊐̸"}],[0,"⊑"],[0,"⊒"],[0,{v:"⊓",n:65024,o:"⊓︀"}],[0,{v:"⊔",n:65024,o:"⊔︀"}],[0,"⊕"],[0,"⊖"],[0,"⊗"],[0,"⊘"],[0,"⊙"],[0,"⊚"],[0,"⊛"],[1,"⊝"],[0,"⊞"],[0,"⊟"],[0,"⊠"],[0,"⊡"],[0,"⊢"],[0,"⊣"],[0,"⊤"],[0,"⊥"],[1,"⊧"],[0,"⊨"],[0,"⊩"],[0,"⊪"],[0,"⊫"],[0,"⊬"],[0,"⊭"],[0,"⊮"],[0,"⊯"],[0,"⊰"],[1,"⊲"],[0,"⊳"],[0,{v:"⊴",n:8402,o:"⊴⃒"}],[0,{v:"⊵",n:8402,o:"⊵⃒"}],[0,"⊶"],[0,"⊷"],[0,"⊸"],[0,"⊹"],[0,"⊺"],[0,"⊻"],[1,"⊽"],[0,"⊾"],[0,"⊿"],[0,"⋀"],[0,"⋁"],[0,"⋂"],[0,"⋃"],[0,"⋄"],[0,"⋅"],[0,"⋆"],[0,"⋇"],[0,"⋈"],[0,"⋉"],[0,"⋊"],[0,"⋋"],[0,"⋌"],[0,"⋍"],[0,"⋎"],[0,"⋏"],[0,"⋐"],[0,"⋑"],[0,"⋒"],[0,"⋓"],[0,"⋔"],[0,"⋕"],[0,"⋖"],[0,"⋗"],[0,{v:"⋘",n:824,o:"⋘̸"}],[0,{v:"⋙",n:824,o:"⋙̸"}],[0,{v:"⋚",n:65024,o:"⋚︀"}],[0,{v:"⋛",n:65024,o:"⋛︀"}],[2,"⋞"],[0,"⋟"],[0,"⋠"],[0,"⋡"],[0,"⋢"],[0,"⋣"],[2,"⋦"],[0,"⋧"],[0,"⋨"],[0,"⋩"],[0,"⋪"],[0,"⋫"],[0,"⋬"],[0,"⋭"],[0,"⋮"],[0,"⋯"],[0,"⋰"],[0,"⋱"],[0,"⋲"],[0,"⋳"],[0,"⋴"],[0,{v:"⋵",n:824,o:"⋵̸"}],[0,"⋶"],[0,"⋷"],[1,{v:"⋹",n:824,o:"⋹̸"}],[0,"⋺"],[0,"⋻"],[0,"⋼"],[0,"⋽"],[0,"⋾"],[6,"⌅"],[0,"⌆"],[1,"⌈"],[0,"⌉"],[0,"⌊"],[0,"⌋"],[0,"⌌"],[0,"⌍"],[0,"⌎"],[0,"⌏"],[0,"⌐"],[1,"⌒"],[0,"⌓"],[1,"⌕"],[0,"⌖"],[5,"⌜"],[0,"⌝"],[0,"⌞"],[0,"⌟"],[2,"⌢"],[0,"⌣"],[9,"⌭"],[0,"⌮"],[7,"⌶"],[6,"⌽"],[1,"⌿"],[60,"⍼"],[51,"⎰"],[0,"⎱"],[2,"⎴"],[0,"⎵"],[0,"⎶"],[37,"⏜"],[0,"⏝"],[0,"⏞"],[0,"⏟"],[2,"⏢"],[4,"⏧"],[59,"␣"],[164,"Ⓢ"],[55,"─"],[1,"│"],[9,"┌"],[3,"┐"],[3,"└"],[3,"┘"],[3,"├"],[7,"┤"],[7,"┬"],[7,"┴"],[7,"┼"],[19,"═"],[0,"║"],[0,"╒"],[0,"╓"],[0,"╔"],[0,"╕"],[0,"╖"],[0,"╗"],[0,"╘"],[0,"╙"],[0,"╚"],[0,"╛"],[0,"╜"],[0,"╝"],[0,"╞"],[0,"╟"],[0,"╠"],[0,"╡"],[0,"╢"],[0,"╣"],[0,"╤"],[0,"╥"],[0,"╦"],[0,"╧"],[0,"╨"],[0,"╩"],[0,"╪"],[0,"╫"],[0,"╬"],[19,"▀"],[3,"▄"],[3,"█"],[8,"░"],[0,"▒"],[0,"▓"],[13,"□"],[8,"▪"],[0,"▫"],[1,"▭"],[0,"▮"],[2,"▱"],[1,"△"],[0,"▴"],[0,"▵"],[2,"▸"],[0,"▹"],[3,"▽"],[0,"▾"],[0,"▿"],[2,"◂"],[0,"◃"],[6,"◊"],[0,"○"],[32,"◬"],[2,"◯"],[8,"◸"],[0,"◹"],[0,"◺"],[0,"◻"],[0,"◼"],[8,"★"],[0,"☆"],[7,"☎"],[49,"♀"],[1,"♂"],[29,"♠"],[2,"♣"],[1,"♥"],[0,"♦"],[3,"♪"],[2,"♭"],[0,"♮"],[0,"♯"],[163,"✓"],[3,"✗"],[8,"✠"],[21,"✶"],[33,"❘"],[25,"❲"],[0,"❳"],[84,"⟈"],[0,"⟉"],[28,"⟦"],[0,"⟧"],[0,"⟨"],[0,"⟩"],[0,"⟪"],[0,"⟫"],[0,"⟬"],[0,"⟭"],[7,"⟵"],[0,"⟶"],[0,"⟷"],[0,"⟸"],[0,"⟹"],[0,"⟺"],[1,"⟼"],[2,"⟿"],[258,"⤂"],[0,"⤃"],[0,"⤄"],[0,"⤅"],[6,"⤌"],[0,"⤍"],[0,"⤎"],[0,"⤏"],[0,"⤐"],[0,"⤑"],[0,"⤒"],[0,"⤓"],[2,"⤖"],[2,"⤙"],[0,"⤚"],[0,"⤛"],[0,"⤜"],[0,"⤝"],[0,"⤞"],[0,"⤟"],[0,"⤠"],[2,"⤣"],[0,"⤤"],[0,"⤥"],[0,"⤦"],[0,"⤧"],[0,"⤨"],[0,"⤩"],[0,"⤪"],[8,{v:"⤳",n:824,o:"⤳̸"}],[1,"⤵"],[0,"⤶"],[0,"⤷"],[0,"⤸"],[0,"⤹"],[2,"⤼"],[0,"⤽"],[7,"⥅"],[2,"⥈"],[0,"⥉"],[0,"⥊"],[0,"⥋"],[2,"⥎"],[0,"⥏"],[0,"⥐"],[0,"⥑"],[0,"⥒"],[0,"⥓"],[0,"⥔"],[0,"⥕"],[0,"⥖"],[0,"⥗"],[0,"⥘"],[0,"⥙"],[0,"⥚"],[0,"⥛"],[0,"⥜"],[0,"⥝"],[0,"⥞"],[0,"⥟"],[0,"⥠"],[0,"⥡"],[0,"⥢"],[0,"⥣"],[0,"⥤"],[0,"⥥"],[0,"⥦"],[0,"⥧"],[0,"⥨"],[0,"⥩"],[0,"⥪"],[0,"⥫"],[0,"⥬"],[0,"⥭"],[0,"⥮"],[0,"⥯"],[0,"⥰"],[0,"⥱"],[0,"⥲"],[0,"⥳"],[0,"⥴"],[0,"⥵"],[0,"⥶"],[1,"⥸"],[0,"⥹"],[1,"⥻"],[0,"⥼"],[0,"⥽"],[0,"⥾"],[0,"⥿"],[5,"⦅"],[0,"⦆"],[4,"⦋"],[0,"⦌"],[0,"⦍"],[0,"⦎"],[0,"⦏"],[0,"⦐"],[0,"⦑"],[0,"⦒"],[0,"⦓"],[0,"⦔"],[0,"⦕"],[0,"⦖"],[3,"⦚"],[1,"⦜"],[0,"⦝"],[6,"⦤"],[0,"⦥"],[0,"⦦"],[0,"⦧"],[0,"⦨"],[0,"⦩"],[0,"⦪"],[0,"⦫"],[0,"⦬"],[0,"⦭"],[0,"⦮"],[0,"⦯"],[0,"⦰"],[0,"⦱"],[0,"⦲"],[0,"⦳"],[0,"⦴"],[0,"⦵"],[0,"⦶"],[0,"⦷"],[1,"⦹"],[1,"⦻"],[0,"⦼"],[1,"⦾"],[0,"⦿"],[0,"⧀"],[0,"⧁"],[0,"⧂"],[0,"⧃"],[0,"⧄"],[0,"⧅"],[3,"⧉"],[3,"⧍"],[0,"⧎"],[0,{v:"⧏",n:824,o:"⧏̸"}],[0,{v:"⧐",n:824,o:"⧐̸"}],[11,"⧜"],[0,"⧝"],[0,"⧞"],[4,"⧣"],[0,"⧤"],[0,"⧥"],[5,"⧫"],[8,"⧴"],[1,"⧶"],[9,"⨀"],[0,"⨁"],[0,"⨂"],[1,"⨄"],[1,"⨆"],[5,"⨌"],[0,"⨍"],[2,"⨐"],[0,"⨑"],[0,"⨒"],[0,"⨓"],[0,"⨔"],[0,"⨕"],[0,"⨖"],[0,"⨗"],[10,"⨢"],[0,"⨣"],[0,"⨤"],[0,"⨥"],[0,"⨦"],[0,"⨧"],[1,"⨩"],[0,"⨪"],[2,"⨭"],[0,"⨮"],[0,"⨯"],[0,"⨰"],[0,"⨱"],[1,"⨳"],[0,"⨴"],[0,"⨵"],[0,"⨶"],[0,"⨷"],[0,"⨸"],[0,"⨹"],[0,"⨺"],[0,"⨻"],[0,"⨼"],[2,"⨿"],[0,"⩀"],[1,"⩂"],[0,"⩃"],[0,"⩄"],[0,"⩅"],[0,"⩆"],[0,"⩇"],[0,"⩈"],[0,"⩉"],[0,"⩊"],[0,"⩋"],[0,"⩌"],[0,"⩍"],[2,"⩐"],[2,"⩓"],[0,"⩔"],[0,"⩕"],[0,"⩖"],[0,"⩗"],[0,"⩘"],[1,"⩚"],[0,"⩛"],[0,"⩜"],[0,"⩝"],[1,"⩟"],[6,"⩦"],[3,"⩪"],[2,{v:"⩭",n:824,o:"⩭̸"}],[0,"⩮"],[0,"⩯"],[0,{v:"⩰",n:824,o:"⩰̸"}],[0,"⩱"],[0,"⩲"],[0,"⩳"],[0,"⩴"],[0,"⩵"],[1,"⩷"],[0,"⩸"],[0,"⩹"],[0,"⩺"],[0,"⩻"],[0,"⩼"],[0,{v:"⩽",n:824,o:"⩽̸"}],[0,{v:"⩾",n:824,o:"⩾̸"}],[0,"⩿"],[0,"⪀"],[0,"⪁"],[0,"⪂"],[0,"⪃"],[0,"⪄"],[0,"⪅"],[0,"⪆"],[0,"⪇"],[0,"⪈"],[0,"⪉"],[0,"⪊"],[0,"⪋"],[0,"⪌"],[0,"⪍"],[0,"⪎"],[0,"⪏"],[0,"⪐"],[0,"⪑"],[0,"⪒"],[0,"⪓"],[0,"⪔"],[0,"⪕"],[0,"⪖"],[0,"⪗"],[0,"⪘"],[0,"⪙"],[0,"⪚"],[2,"⪝"],[0,"⪞"],[0,"⪟"],[0,"⪠"],[0,{v:"⪡",n:824,o:"⪡̸"}],[0,{v:"⪢",n:824,o:"⪢̸"}],[1,"⪤"],[0,"⪥"],[0,"⪦"],[0,"⪧"],[0,"⪨"],[0,"⪩"],[0,"⪪"],[0,"⪫"],[0,{v:"⪬",n:65024,o:"⪬︀"}],[0,{v:"⪭",n:65024,o:"⪭︀"}],[0,"⪮"],[0,{v:"⪯",n:824,o:"⪯̸"}],[0,{v:"⪰",n:824,o:"⪰̸"}],[2,"⪳"],[0,"⪴"],[0,"⪵"],[0,"⪶"],[0,"⪷"],[0,"⪸"],[0,"⪹"],[0,"⪺"],[0,"⪻"],[0,"⪼"],[0,"⪽"],[0,"⪾"],[0,"⪿"],[0,"⫀"],[0,"⫁"],[0,"⫂"],[0,"⫃"],[0,"⫄"],[0,{v:"⫅",n:824,o:"⫅̸"}],[0,{v:"⫆",n:824,o:"⫆̸"}],[0,"⫇"],[0,"⫈"],[2,{v:"⫋",n:65024,o:"⫋︀"}],[0,{v:"⫌",n:65024,o:"⫌︀"}],[2,"⫏"],[0,"⫐"],[0,"⫑"],[0,"⫒"],[0,"⫓"],[0,"⫔"],[0,"⫕"],[0,"⫖"],[0,"⫗"],[0,"⫘"],[0,"⫙"],[0,"⫚"],[0,"⫛"],[8,"⫤"],[1,"⫦"],[0,"⫧"],[0,"⫨"],[0,"⫩"],[1,"⫫"],[0,"⫬"],[0,"⫭"],[0,"⫮"],[0,"⫯"],[0,"⫰"],[0,"⫱"],[0,"⫲"],[0,"⫳"],[9,{v:"⫽",n:8421,o:"⫽⃥"}],[44343,{n:new Map(e([[56476,"𝒜"],[1,"𝒞"],[0,"𝒟"],[2,"𝒢"],[2,"𝒥"],[0,"𝒦"],[2,"𝒩"],[0,"𝒪"],[0,"𝒫"],[0,"𝒬"],[1,"𝒮"],[0,"𝒯"],[0,"𝒰"],[0,"𝒱"],[0,"𝒲"],[0,"𝒳"],[0,"𝒴"],[0,"𝒵"],[0,"𝒶"],[0,"𝒷"],[0,"𝒸"],[0,"𝒹"],[1,"𝒻"],[1,"𝒽"],[0,"𝒾"],[0,"𝒿"],[0,"𝓀"],[0,"𝓁"],[0,"𝓂"],[0,"𝓃"],[1,"𝓅"],[0,"𝓆"],[0,"𝓇"],[0,"𝓈"],[0,"𝓉"],[0,"𝓊"],[0,"𝓋"],[0,"𝓌"],[0,"𝓍"],[0,"𝓎"],[0,"𝓏"],[52,"𝔄"],[0,"𝔅"],[1,"𝔇"],[0,"𝔈"],[0,"𝔉"],[0,"𝔊"],[2,"𝔍"],[0,"𝔎"],[0,"𝔏"],[0,"𝔐"],[0,"𝔑"],[0,"𝔒"],[0,"𝔓"],[0,"𝔔"],[1,"𝔖"],[0,"𝔗"],[0,"𝔘"],[0,"𝔙"],[0,"𝔚"],[0,"𝔛"],[0,"𝔜"],[1,"𝔞"],[0,"𝔟"],[0,"𝔠"],[0,"𝔡"],[0,"𝔢"],[0,"𝔣"],[0,"𝔤"],[0,"𝔥"],[0,"𝔦"],[0,"𝔧"],[0,"𝔨"],[0,"𝔩"],[0,"𝔪"],[0,"𝔫"],[0,"𝔬"],[0,"𝔭"],[0,"𝔮"],[0,"𝔯"],[0,"𝔰"],[0,"𝔱"],[0,"𝔲"],[0,"𝔳"],[0,"𝔴"],[0,"𝔵"],[0,"𝔶"],[0,"𝔷"],[0,"𝔸"],[0,"𝔹"],[1,"𝔻"],[0,"𝔼"],[0,"𝔽"],[0,"𝔾"],[1,"𝕀"],[0,"𝕁"],[0,"𝕂"],[0,"𝕃"],[0,"𝕄"],[1,"𝕆"],[3,"𝕊"],[0,"𝕋"],[0,"𝕌"],[0,"𝕍"],[0,"𝕎"],[0,"𝕏"],[0,"𝕐"],[1,"𝕒"],[0,"𝕓"],[0,"𝕔"],[0,"𝕕"],[0,"𝕖"],[0,"𝕗"],[0,"𝕘"],[0,"𝕙"],[0,"𝕚"],[0,"𝕛"],[0,"𝕜"],[0,"𝕝"],[0,"𝕞"],[0,"𝕟"],[0,"𝕠"],[0,"𝕡"],[0,"𝕢"],[0,"𝕣"],[0,"𝕤"],[0,"𝕥"],[0,"𝕦"],[0,"𝕧"],[0,"𝕨"],[0,"𝕩"],[0,"𝕪"],[0,"𝕫"]]))}],[8906,"ff"],[0,"fi"],[0,"fl"],[0,"ffi"],[0,"ffl"]])),Vn}var Xs={},ml;function Fi(){return ml||(ml=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.escapeText=e.escapeAttribute=e.escapeUTF8=e.escape=e.encodeXML=e.getCodePoint=e.xmlReplacer=void 0,e.xmlReplacer=/["&'<>$\x80-\uFFFF]/g;var a=new Map([[34,"""],[38,"&"],[39,"'"],[60,"<"],[62,">"]]);e.getCodePoint=String.prototype.codePointAt!=null?function(r,n){return r.codePointAt(n)}:function(r,n){return(r.charCodeAt(n)&64512)===55296?(r.charCodeAt(n)-55296)*1024+r.charCodeAt(n+1)-56320+65536:r.charCodeAt(n)};function i(r){for(var n="",u=0,c;(c=e.xmlReplacer.exec(r))!==null;){var d=c.index,f=r.charCodeAt(d),o=a.get(f);o!==void 0?(n+=r.substring(u,d)+o,u=d+1):(n+="".concat(r.substring(u,d),"&#x").concat((0,e.getCodePoint)(r,d).toString(16),";"),u=e.xmlReplacer.lastIndex+=+((f&64512)===55296))}return n+r.substr(u)}e.encodeXML=i,e.escape=i;function s(r,n){return function(c){for(var d,f=0,o="";d=r.exec(c);)f!==d.index&&(o+=c.substring(f,d.index)),o+=n.get(d[0].charCodeAt(0)),f=d.index+1;return o+c.substring(f)}}e.escapeUTF8=s(/[&<>'"]/g,a),e.escapeAttribute=s(/["&\u00A0]/g,new Map([[34,"""],[38,"&"],[160," "]])),e.escapeText=s(/[&<>\u00A0]/g,new Map([[38,"&"],[60,"<"],[62,">"],[160," "]]))})(Xs)),Xs}var gl;function bl(){if(gl)return tr;gl=1;var e=tr&&tr.__importDefault||function(c){return c&&c.__esModule?c:{default:c}};Object.defineProperty(tr,"__esModule",{value:!0}),tr.encodeNonAsciiHTML=tr.encodeHTML=void 0;var a=e(Rh()),i=Fi(),s=/[\t\n!-,./:-@[-`\f{-}$\x80-\uFFFF]/g;function r(c){return u(s,c)}tr.encodeHTML=r;function n(c){return u(i.xmlReplacer,c)}tr.encodeNonAsciiHTML=n;function u(c,d){for(var f="",o=0,h;(h=c.exec(d))!==null;){var l=h.index;f+=d.substring(o,l);var p=d.charCodeAt(l),x=a.default.get(p);if(typeof x=="object"){if(l+1<d.length){var w=d.charCodeAt(l+1),b=typeof x.n=="number"?x.n===w?x.o:void 0:x.n.get(w);if(b!==void 0){f+=b,o=c.lastIndex+=1;continue}}x=x.v}if(x!==void 0)f+=x,o=l+1;else{var g=(0,i.getCodePoint)(d,l);f+="&#x".concat(g.toString(16),";"),o=c.lastIndex+=+(g!==p)}}return f+d.substr(o)}return tr}var xl;function Ih(){return xl||(xl=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.decodeXMLStrict=e.decodeHTML5Strict=e.decodeHTML4Strict=e.decodeHTML5=e.decodeHTML4=e.decodeHTMLAttribute=e.decodeHTMLStrict=e.decodeHTML=e.decodeXML=e.DecodingMode=e.EntityDecoder=e.encodeHTML5=e.encodeHTML4=e.encodeNonAsciiHTML=e.encodeHTML=e.escapeText=e.escapeAttribute=e.escapeUTF8=e.escape=e.encodeXML=e.encode=e.decodeStrict=e.decode=e.EncodingMode=e.EntityLevel=void 0;var a=ts(),i=bl(),s=Fi(),r;(function(l){l[l.XML=0]="XML",l[l.HTML=1]="HTML"})(r=e.EntityLevel||(e.EntityLevel={}));var n;(function(l){l[l.UTF8=0]="UTF8",l[l.ASCII=1]="ASCII",l[l.Extensive=2]="Extensive",l[l.Attribute=3]="Attribute",l[l.Text=4]="Text"})(n=e.EncodingMode||(e.EncodingMode={}));function u(l,p){p===void 0&&(p=r.XML);var x=typeof p=="number"?p:p.level;if(x===r.HTML){var w=typeof p=="object"?p.mode:void 0;return(0,a.decodeHTML)(l,w)}return(0,a.decodeXML)(l)}e.decode=u;function c(l,p){var x;p===void 0&&(p=r.XML);var w=typeof p=="number"?{level:p}:p;return(x=w.mode)!==null&&x!==void 0||(w.mode=a.DecodingMode.Strict),u(l,w)}e.decodeStrict=c;function d(l,p){p===void 0&&(p=r.XML);var x=typeof p=="number"?{level:p}:p;return x.mode===n.UTF8?(0,s.escapeUTF8)(l):x.mode===n.Attribute?(0,s.escapeAttribute)(l):x.mode===n.Text?(0,s.escapeText)(l):x.level===r.HTML?x.mode===n.ASCII?(0,i.encodeNonAsciiHTML)(l):(0,i.encodeHTML)(l):(0,s.encodeXML)(l)}e.encode=d;var f=Fi();Object.defineProperty(e,"encodeXML",{enumerable:!0,get:function(){return f.encodeXML}}),Object.defineProperty(e,"escape",{enumerable:!0,get:function(){return f.escape}}),Object.defineProperty(e,"escapeUTF8",{enumerable:!0,get:function(){return f.escapeUTF8}}),Object.defineProperty(e,"escapeAttribute",{enumerable:!0,get:function(){return f.escapeAttribute}}),Object.defineProperty(e,"escapeText",{enumerable:!0,get:function(){return f.escapeText}});var o=bl();Object.defineProperty(e,"encodeHTML",{enumerable:!0,get:function(){return o.encodeHTML}}),Object.defineProperty(e,"encodeNonAsciiHTML",{enumerable:!0,get:function(){return o.encodeNonAsciiHTML}}),Object.defineProperty(e,"encodeHTML4",{enumerable:!0,get:function(){return o.encodeHTML}}),Object.defineProperty(e,"encodeHTML5",{enumerable:!0,get:function(){return o.encodeHTML}});var h=ts();Object.defineProperty(e,"EntityDecoder",{enumerable:!0,get:function(){return h.EntityDecoder}}),Object.defineProperty(e,"DecodingMode",{enumerable:!0,get:function(){return h.DecodingMode}}),Object.defineProperty(e,"decodeXML",{enumerable:!0,get:function(){return h.decodeXML}}),Object.defineProperty(e,"decodeHTML",{enumerable:!0,get:function(){return h.decodeHTML}}),Object.defineProperty(e,"decodeHTMLStrict",{enumerable:!0,get:function(){return h.decodeHTMLStrict}}),Object.defineProperty(e,"decodeHTMLAttribute",{enumerable:!0,get:function(){return h.decodeHTMLAttribute}}),Object.defineProperty(e,"decodeHTML4",{enumerable:!0,get:function(){return h.decodeHTML}}),Object.defineProperty(e,"decodeHTML5",{enumerable:!0,get:function(){return h.decodeHTML}}),Object.defineProperty(e,"decodeHTML4Strict",{enumerable:!0,get:function(){return h.decodeHTMLStrict}}),Object.defineProperty(e,"decodeHTML5Strict",{enumerable:!0,get:function(){return h.decodeHTMLStrict}}),Object.defineProperty(e,"decodeXMLStrict",{enumerable:!0,get:function(){return h.decodeXML}})})(Zs)),Zs}var qr={},yl;function Fh(){return yl||(yl=1,Object.defineProperty(qr,"__esModule",{value:!0}),qr.attributeNames=qr.elementNames=void 0,qr.elementNames=new Map(["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","textPath"].map(function(e){return[e.toLowerCase(),e]})),qr.attributeNames=new Map(["definitionURL","attributeName","attributeType","baseFrequency","baseProfile","calcMode","clipPathUnits","diffuseConstant","edgeMode","filterUnits","glyphRef","gradientTransform","gradientUnits","kernelMatrix","kernelUnitLength","keyPoints","keySplines","keyTimes","lengthAdjust","limitingConeAngle","markerHeight","markerUnits","markerWidth","maskContentUnits","maskUnits","numOctaves","pathLength","patternContentUnits","patternTransform","patternUnits","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","refX","refY","repeatCount","repeatDur","requiredExtensions","requiredFeatures","specularConstant","specularExponent","spreadMethod","startOffset","stdDeviation","stitchTiles","surfaceScale","systemLanguage","tableValues","targetX","targetY","textLength","viewBox","viewTarget","xChannelSelector","yChannelSelector","zoomAndPan"].map(function(e){return[e.toLowerCase(),e]}))),qr}var vl;function qh(){if(vl)return lt;vl=1;var e=lt&<.__assign||function(){return e=Object.assign||function(N){for(var y,m=1,k=arguments.length;m<k;m++){y=arguments[m];for(var j in y)Object.prototype.hasOwnProperty.call(y,j)&&(N[j]=y[j])}return N},e.apply(this,arguments)},a=lt&<.__createBinding||(Object.create?(function(N,y,m,k){k===void 0&&(k=m);var j=Object.getOwnPropertyDescriptor(y,m);(!j||("get"in j?!y.__esModule:j.writable||j.configurable))&&(j={enumerable:!0,get:function(){return y[m]}}),Object.defineProperty(N,k,j)}):(function(N,y,m,k){k===void 0&&(k=m),N[k]=y[m]})),i=lt&<.__setModuleDefault||(Object.create?(function(N,y){Object.defineProperty(N,"default",{enumerable:!0,value:y})}):function(N,y){N.default=y}),s=lt&<.__importStar||function(N){if(N&&N.__esModule)return N;var y={};if(N!=null)for(var m in N)m!=="default"&&Object.prototype.hasOwnProperty.call(N,m)&&a(y,N,m);return i(y,N),y};Object.defineProperty(lt,"__esModule",{value:!0}),lt.render=void 0;var r=s(nn()),n=Ih(),u=Fh(),c=new Set(["style","script","xmp","iframe","noembed","noframes","plaintext","noscript"]);function d(N){return N.replace(/"/g,""")}function f(N,y){var m;if(N){var k=((m=y.encodeEntities)!==null&&m!==void 0?m:y.decodeEntities)===!1?d:y.xmlMode||y.encodeEntities!=="utf8"?n.encodeXML:n.escapeAttribute;return Object.keys(N).map(function(j){var A,D,C=(A=N[j])!==null&&A!==void 0?A:"";return y.xmlMode==="foreign"&&(j=(D=u.attributeNames.get(j))!==null&&D!==void 0?D:j),!y.emptyAttrs&&!y.xmlMode&&C===""?j:"".concat(j,'="').concat(k(C),'"')}).join(" ")}}var o=new Set(["area","base","basefont","br","col","command","embed","frame","hr","img","input","isindex","keygen","link","meta","param","source","track","wbr"]);function h(N,y){y===void 0&&(y={});for(var m=("length"in N)?N:[N],k="",j=0;j<m.length;j++)k+=l(m[j],y);return k}lt.render=h,lt.default=h;function l(N,y){switch(N.type){case r.Root:return h(N.children,y);case r.Doctype:case r.Directive:return b(N);case r.Comment:return _(N);case r.CDATA:return v(N);case r.Script:case r.Style:case r.Tag:return w(N,y);case r.Text:return g(N,y)}}var p=new Set(["mi","mo","mn","ms","mtext","annotation-xml","foreignObject","desc","title"]),x=new Set(["svg","math"]);function w(N,y){var m;y.xmlMode==="foreign"&&(N.name=(m=u.elementNames.get(N.name))!==null&&m!==void 0?m:N.name,N.parent&&p.has(N.parent.name)&&(y=e(e({},y),{xmlMode:!1}))),!y.xmlMode&&x.has(N.name)&&(y=e(e({},y),{xmlMode:"foreign"}));var k="<".concat(N.name),j=f(N.attribs,y);return j&&(k+=" ".concat(j)),N.children.length===0&&(y.xmlMode?y.selfClosingTags!==!1:y.selfClosingTags&&o.has(N.name))?(y.xmlMode||(k+=" "),k+="/>"):(k+=">",N.children.length>0&&(k+=h(N.children,y)),(y.xmlMode||!o.has(N.name))&&(k+="</".concat(N.name,">"))),k}function b(N){return"<".concat(N.data,">")}function g(N,y){var m,k=N.data||"";return((m=y.encodeEntities)!==null&&m!==void 0?m:y.decodeEntities)!==!1&&!(!y.xmlMode&&N.parent&&c.has(N.parent.name))&&(k=y.xmlMode||y.encodeEntities!=="utf8"?(0,n.encodeXML)(k):(0,n.escapeText)(k)),k}function v(N){return"<![CDATA[".concat(N.children[0].data,"]]>")}function _(N){return"<!--".concat(N.data,"-->")}return lt}var wl;function od(){if(wl)return Wt;wl=1;var e=Wt&&Wt.__importDefault||function(f){return f&&f.__esModule?f:{default:f}};Object.defineProperty(Wt,"__esModule",{value:!0}),Wt.getOuterHTML=r,Wt.getInnerHTML=n,Wt.getText=u,Wt.textContent=c,Wt.innerText=d;var a=xr(),i=e(qh()),s=nn();function r(f,o){return(0,i.default)(f,o)}function n(f,o){return(0,a.hasChildren)(f)?f.children.map(function(h){return r(h,o)}).join(""):""}function u(f){return Array.isArray(f)?f.map(u).join(""):(0,a.isTag)(f)?f.name==="br"?`
|
|
1048
|
-
`:u(f.children):(0,a.isCDATA)(f)?u(f.children):(0,a.isText)(f)?f.data:""}function c(f){return Array.isArray(f)?f.map(c).join(""):(0,a.hasChildren)(f)&&!(0,a.isComment)(f)?c(f.children):(0,a.isText)(f)?f.data:""}function d(f){return Array.isArray(f)?f.map(d).join(""):(0,a.hasChildren)(f)&&(f.type===s.ElementType.Tag||(0,a.isCDATA)(f))?d(f.children):(0,a.isText)(f)?f.data:""}return Wt}var qt={},_l;function Bh(){if(_l)return qt;_l=1,Object.defineProperty(qt,"__esModule",{value:!0}),qt.getChildren=a,qt.getParent=i,qt.getSiblings=s,qt.getAttributeValue=r,qt.hasAttrib=n,qt.getName=u,qt.nextElementSibling=c,qt.prevElementSibling=d;var e=xr();function a(f){return(0,e.hasChildren)(f)?f.children:[]}function i(f){return f.parent||null}function s(f){var o,h,l=i(f);if(l!=null)return a(l);for(var p=[f],x=f.prev,w=f.next;x!=null;)p.unshift(x),o=x,x=o.prev;for(;w!=null;)p.push(w),h=w,w=h.next;return p}function r(f,o){var h;return(h=f.attribs)===null||h===void 0?void 0:h[o]}function n(f,o){return f.attribs!=null&&Object.prototype.hasOwnProperty.call(f.attribs,o)&&f.attribs[o]!=null}function u(f){return f.name}function c(f){for(var o,h=f.next;h!==null&&!(0,e.isTag)(h);)o=h,h=o.next;return h}function d(f){for(var o,h=f.prev;h!==null&&!(0,e.isTag)(h);)o=h,h=o.prev;return h}return qt}var rr={},kl;function Vh(){if(kl)return rr;kl=1,Object.defineProperty(rr,"__esModule",{value:!0}),rr.removeElement=e,rr.replaceElement=a,rr.appendChild=i,rr.append=s,rr.prependChild=r,rr.prepend=n;function e(u){if(u.prev&&(u.prev.next=u.next),u.next&&(u.next.prev=u.prev),u.parent){var c=u.parent.children,d=c.lastIndexOf(u);d>=0&&c.splice(d,1)}u.next=null,u.prev=null,u.parent=null}function a(u,c){var d=c.prev=u.prev;d&&(d.next=c);var f=c.next=u.next;f&&(f.prev=c);var o=c.parent=u.parent;if(o){var h=o.children;h[h.lastIndexOf(u)]=c,u.parent=null}}function i(u,c){if(e(c),c.next=null,c.parent=u,u.children.push(c)>1){var d=u.children[u.children.length-2];d.next=c,c.prev=d}else c.prev=null}function s(u,c){e(c);var d=u.parent,f=u.next;if(c.next=f,c.prev=u,u.next=c,c.parent=d,f){if(f.prev=c,d){var o=d.children;o.splice(o.lastIndexOf(f),0,c)}}else d&&d.children.push(c)}function r(u,c){if(e(c),c.parent=u,c.prev=null,u.children.unshift(c)!==1){var d=u.children[1];d.prev=c,c.next=d}else c.next=null}function n(u,c){e(c);var d=u.parent;if(d){var f=d.children;f.splice(f.indexOf(u),0,c)}u.prev&&(u.prev.next=c),c.parent=d,c.prev=u.prev,c.next=u,u.prev=c}return rr}var ar={},Nl;function ud(){if(Nl)return ar;Nl=1,Object.defineProperty(ar,"__esModule",{value:!0}),ar.filter=a,ar.find=i,ar.findOneChild=s,ar.findOne=r,ar.existsOne=n,ar.findAll=u;var e=xr();function a(c,d,f,o){return f===void 0&&(f=!0),o===void 0&&(o=1/0),i(c,Array.isArray(d)?d:[d],f,o)}function i(c,d,f,o){for(var h=[],l=[Array.isArray(d)?d:[d]],p=[0];;){if(p[0]>=l[0].length){if(p.length===1)return h;l.shift(),p.shift();continue}var x=l[0][p[0]++];if(c(x)&&(h.push(x),--o<=0))return h;f&&(0,e.hasChildren)(x)&&x.children.length>0&&(p.unshift(0),l.unshift(x.children))}}function s(c,d){return d.find(c)}function r(c,d,f){f===void 0&&(f=!0);for(var o=Array.isArray(d)?d:[d],h=0;h<o.length;h++){var l=o[h];if((0,e.isTag)(l)&&c(l))return l;if(f&&(0,e.hasChildren)(l)&&l.children.length>0){var p=r(c,l.children,!0);if(p)return p}}return null}function n(c,d){return(Array.isArray(d)?d:[d]).some(function(f){return(0,e.isTag)(f)&&c(f)||(0,e.hasChildren)(f)&&n(c,f.children)})}function u(c,d){for(var f=[],o=[Array.isArray(d)?d:[d]],h=[0];;){if(h[0]>=o[0].length){if(o.length===1)return f;o.shift(),h.shift();continue}var l=o[0][h[0]++];(0,e.isTag)(l)&&c(l)&&f.push(l),(0,e.hasChildren)(l)&&l.children.length>0&&(h.unshift(0),o.unshift(l.children))}}return ar}var nr={},jl;function ld(){if(jl)return nr;jl=1,Object.defineProperty(nr,"__esModule",{value:!0}),nr.testElement=u,nr.getElements=c,nr.getElementById=d,nr.getElementsByTagName=f,nr.getElementsByClassName=o,nr.getElementsByTagType=h;var e=xr(),a=ud(),i={tag_name:function(l){return typeof l=="function"?function(p){return(0,e.isTag)(p)&&l(p.name)}:l==="*"?e.isTag:function(p){return(0,e.isTag)(p)&&p.name===l}},tag_type:function(l){return typeof l=="function"?function(p){return l(p.type)}:function(p){return p.type===l}},tag_contains:function(l){return typeof l=="function"?function(p){return(0,e.isText)(p)&&l(p.data)}:function(p){return(0,e.isText)(p)&&p.data===l}}};function s(l,p){return typeof p=="function"?function(x){return(0,e.isTag)(x)&&p(x.attribs[l])}:function(x){return(0,e.isTag)(x)&&x.attribs[l]===p}}function r(l,p){return function(x){return l(x)||p(x)}}function n(l){var p=Object.keys(l).map(function(x){var w=l[x];return Object.prototype.hasOwnProperty.call(i,x)?i[x](w):s(x,w)});return p.length===0?null:p.reduce(r)}function u(l,p){var x=n(l);return x?x(p):!0}function c(l,p,x,w){w===void 0&&(w=1/0);var b=n(l);return b?(0,a.filter)(b,p,x,w):[]}function d(l,p,x){return x===void 0&&(x=!0),Array.isArray(p)||(p=[p]),(0,a.findOne)(s("id",l),p,x)}function f(l,p,x,w){return x===void 0&&(x=!0),w===void 0&&(w=1/0),(0,a.filter)(i.tag_name(l),p,x,w)}function o(l,p,x,w){return x===void 0&&(x=!0),w===void 0&&(w=1/0),(0,a.filter)(s("class",l),p,x,w)}function h(l,p,x,w){return x===void 0&&(x=!0),w===void 0&&(w=1/0),(0,a.filter)(i.tag_type(l),p,x,w)}return nr}var mr={},El;function Uh(){if(El)return mr;El=1,Object.defineProperty(mr,"__esModule",{value:!0}),mr.DocumentPosition=void 0,mr.removeSubsets=a,mr.compareDocumentPosition=s,mr.uniqueSort=r;var e=xr();function a(n){for(var u=n.length;--u>=0;){var c=n[u];if(u>0&&n.lastIndexOf(c,u-1)>=0){n.splice(u,1);continue}for(var d=c.parent;d;d=d.parent)if(n.includes(d)){n.splice(u,1);break}}return n}var i;(function(n){n[n.DISCONNECTED=1]="DISCONNECTED",n[n.PRECEDING=2]="PRECEDING",n[n.FOLLOWING=4]="FOLLOWING",n[n.CONTAINS=8]="CONTAINS",n[n.CONTAINED_BY=16]="CONTAINED_BY"})(i||(mr.DocumentPosition=i={}));function s(n,u){var c=[],d=[];if(n===u)return 0;for(var f=(0,e.hasChildren)(n)?n:n.parent;f;)c.unshift(f),f=f.parent;for(f=(0,e.hasChildren)(u)?u:u.parent;f;)d.unshift(f),f=f.parent;for(var o=Math.min(c.length,d.length),h=0;h<o&&c[h]===d[h];)h++;if(h===0)return i.DISCONNECTED;var l=c[h-1],p=l.children,x=c[h],w=d[h];return p.indexOf(x)>p.indexOf(w)?l===u?i.FOLLOWING|i.CONTAINED_BY:i.FOLLOWING:l===n?i.PRECEDING|i.CONTAINS:i.PRECEDING}function r(n){return n=n.filter(function(u,c,d){return!d.includes(u,c+1)}),n.sort(function(u,c){var d=s(u,c);return d&i.PRECEDING?-1:d&i.FOLLOWING?1:0}),n}return mr}var Un={},Al;function zh(){if(Al)return Un;Al=1,Object.defineProperty(Un,"__esModule",{value:!0}),Un.getFeed=i;var e=od(),a=ld();function i(l){var p=d(h,l);return p?p.name==="feed"?s(p):r(p):null}function s(l){var p,x=l.children,w={type:"atom",items:(0,a.getElementsByTagName)("entry",x).map(function(v){var _,N=v.children,y={media:c(N)};o(y,"id","id",N),o(y,"title","title",N);var m=(_=d("link",N))===null||_===void 0?void 0:_.attribs.href;m&&(y.link=m);var k=f("summary",N)||f("content",N);k&&(y.description=k);var j=f("updated",N);return j&&(y.pubDate=new Date(j)),y})};o(w,"id","id",x),o(w,"title","title",x);var b=(p=d("link",x))===null||p===void 0?void 0:p.attribs.href;b&&(w.link=b),o(w,"description","subtitle",x);var g=f("updated",x);return g&&(w.updated=new Date(g)),o(w,"author","email",x,!0),w}function r(l){var p,x,w=(x=(p=d("channel",l.children))===null||p===void 0?void 0:p.children)!==null&&x!==void 0?x:[],b={type:l.name.substr(0,3),id:"",items:(0,a.getElementsByTagName)("item",l.children).map(function(v){var _=v.children,N={media:c(_)};o(N,"id","guid",_),o(N,"title","title",_),o(N,"link","link",_),o(N,"description","description",_);var y=f("pubDate",_)||f("dc:date",_);return y&&(N.pubDate=new Date(y)),N})};o(b,"title","title",w),o(b,"link","link",w),o(b,"description","description",w);var g=f("lastBuildDate",w);return g&&(b.updated=new Date(g)),o(b,"author","managingEditor",w,!0),b}var n=["url","type","lang"],u=["fileSize","bitrate","framerate","samplingrate","channels","duration","height","width"];function c(l){return(0,a.getElementsByTagName)("media:content",l).map(function(p){for(var x=p.attribs,w={medium:x.medium,isDefault:!!x.isDefault},b=0,g=n;b<g.length;b++){var v=g[b];x[v]&&(w[v]=x[v])}for(var _=0,N=u;_<N.length;_++){var v=N[_];x[v]&&(w[v]=parseInt(x[v],10))}return x.expression&&(w.expression=x.expression),w})}function d(l,p){return(0,a.getElementsByTagName)(l,p,!0,1)[0]}function f(l,p,x){return x===void 0&&(x=!1),(0,e.textContent)((0,a.getElementsByTagName)(l,p,x,1)).trim()}function o(l,p,x,w,b){b===void 0&&(b=!1);var g=f(x,w,b);g&&(l[p]=g)}function h(l){return l==="rss"||l==="feed"||l==="rdf:RDF"}return Un}var Sl;function Ks(){return Sl||(Sl=1,(function(e){var a=Fr&&Fr.__createBinding||(Object.create?(function(r,n,u,c){c===void 0&&(c=u);var d=Object.getOwnPropertyDescriptor(n,u);(!d||("get"in d?!n.__esModule:d.writable||d.configurable))&&(d={enumerable:!0,get:function(){return n[u]}}),Object.defineProperty(r,c,d)}):(function(r,n,u,c){c===void 0&&(c=u),r[c]=n[u]})),i=Fr&&Fr.__exportStar||function(r,n){for(var u in r)u!=="default"&&!Object.prototype.hasOwnProperty.call(n,u)&&a(n,r,u)};Object.defineProperty(e,"__esModule",{value:!0}),e.hasChildren=e.isDocument=e.isComment=e.isText=e.isCDATA=e.isTag=void 0,i(od(),e),i(Bh(),e),i(Vh(),e),i(ud(),e),i(ld(),e),i(Uh(),e),i(zh(),e);var s=xr();Object.defineProperty(e,"isTag",{enumerable:!0,get:function(){return s.isTag}}),Object.defineProperty(e,"isCDATA",{enumerable:!0,get:function(){return s.isCDATA}}),Object.defineProperty(e,"isText",{enumerable:!0,get:function(){return s.isText}}),Object.defineProperty(e,"isComment",{enumerable:!0,get:function(){return s.isComment}}),Object.defineProperty(e,"isDocument",{enumerable:!0,get:function(){return s.isDocument}}),Object.defineProperty(e,"hasChildren",{enumerable:!0,get:function(){return s.hasChildren}})})(Fr)),Fr}var Cl;function Hh(){return Cl||(Cl=1,(function(e){var a=Rt&&Rt.__createBinding||(Object.create?(function(g,v,_,N){N===void 0&&(N=_);var y=Object.getOwnPropertyDescriptor(v,_);(!y||("get"in y?!v.__esModule:y.writable||y.configurable))&&(y={enumerable:!0,get:function(){return v[_]}}),Object.defineProperty(g,N,y)}):(function(g,v,_,N){N===void 0&&(N=_),g[N]=v[_]})),i=Rt&&Rt.__setModuleDefault||(Object.create?(function(g,v){Object.defineProperty(g,"default",{enumerable:!0,value:v})}):function(g,v){g.default=v}),s=Rt&&Rt.__importStar||function(g){if(g&&g.__esModule)return g;var v={};if(g!=null)for(var _ in g)_!=="default"&&Object.prototype.hasOwnProperty.call(g,_)&&a(v,g,_);return i(v,g),v},r=Rt&&Rt.__importDefault||function(g){return g&&g.__esModule?g:{default:g}};Object.defineProperty(e,"__esModule",{value:!0}),e.DomUtils=e.parseFeed=e.getFeed=e.ElementType=e.Tokenizer=e.createDomStream=e.parseDOM=e.parseDocument=e.DefaultHandler=e.DomHandler=e.Parser=void 0;var n=ll(),u=ll();Object.defineProperty(e,"Parser",{enumerable:!0,get:function(){return u.Parser}});var c=xr(),d=xr();Object.defineProperty(e,"DomHandler",{enumerable:!0,get:function(){return d.DomHandler}}),Object.defineProperty(e,"DefaultHandler",{enumerable:!0,get:function(){return d.DomHandler}});function f(g,v){var _=new c.DomHandler(void 0,v);return new n.Parser(_,v).end(g),_.root}e.parseDocument=f;function o(g,v){return f(g,v).children}e.parseDOM=o;function h(g,v,_){var N=new c.DomHandler(g,v,_);return new n.Parser(N,v)}e.createDomStream=h;var l=id();Object.defineProperty(e,"Tokenizer",{enumerable:!0,get:function(){return r(l).default}}),e.ElementType=s(nn());var p=Ks(),x=Ks();Object.defineProperty(e,"getFeed",{enumerable:!0,get:function(){return x.getFeed}});var w={xmlMode:!0};function b(g,v){return v===void 0&&(v=w),(0,p.getFeed)(o(g,v))}e.parseFeed=b,e.DomUtils=s(Ks())})(Rt)),Rt}var Qs,Dl;function Wh(){return Dl||(Dl=1,Qs=e=>{if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}),Qs}var zn={},Tl;function Gh(){if(Tl)return zn;Tl=1,Object.defineProperty(zn,"__esModule",{value:!0});/*!
|
|
1047
|
+
`);return Fn.default=e,Fn}var rl;function Oh(){if(rl)return Mr;rl=1;var e=Mr&&Mr.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(Mr,"__esModule",{value:!0}),Mr.AccountNameValidator=void 0;const r=e(Th());let i=class{static validateAccountName(a,n){let u,c,d;if(!a)return n.accountNameWrongLength;const f=a.length;if(f<3||f>16)return n.accountNameWrongLength;if(r.default.includes(a))return n.accountNameBadActor;const o=a.split(".");for(u=0,d=o.length;u<d;u++)if(c=o[u],!/^[a-z]/.test(c)||!/^[a-z0-9-]*$/.test(c)||!/[a-z0-9]$/.test(c)||!(c.length>=3))return n.accountNameWrongSegment;return null}};return Mr.AccountNameValidator=i,Mr}var al;function Ph(){if(al)return st;al=1;var e=st&&st.__createBinding||(Object.create?(function(w,b,g,v){v===void 0&&(v=g);var _=Object.getOwnPropertyDescriptor(b,g);(!_||("get"in _?!b.__esModule:_.writable||_.configurable))&&(_={enumerable:!0,get:function(){return b[g]}}),Object.defineProperty(w,v,_)}):(function(w,b,g,v){v===void 0&&(v=g),w[v]=b[g]})),r=st&&st.__setModuleDefault||(Object.create?(function(w,b){Object.defineProperty(w,"default",{enumerable:!0,value:b})}):function(w,b){w.default=b}),i=st&&st.__importStar||function(w){if(w&&w.__esModule)return w;var b={};if(w!=null)for(var g in w)g!=="default"&&Object.prototype.hasOwnProperty.call(w,g)&&e(b,w,g);return r(b,w),b},s=st&&st.__importDefault||function(w){return w&&w.__esModule?w:{default:w}};Object.defineProperty(st,"__esModule",{value:!0}),st.HtmlDOMParserError=st.HtmlDOMParser=void 0;const a=i(mh()),n=s(fs()),u=ir(),c=Nh(),d=Ji(),f=Dh(),o=id(),h=Oh(),l=i(ad());let p=class{constructor(b,g=d.Localization.DEFAULT){this.domParser=new a.DOMParser({errorHandler:{warning:()=>{},error:()=>{}}}),this.xmlSerializer=new a.XMLSerializer,this.mutate=!0,this.parsedDocument=void 0,f.AssetEmbedder.validate(b),d.Localization.validate(g),this.options=b,this.localization=g,this.linkSanitizer=new c.LinkSanitizer({baseUrl:this.options.baseUrl}),this.embedder=new f.AssetEmbedder({ipfsPrefix:this.options.ipfsPrefix,width:this.options.width,height:this.options.height,hideImages:this.options.hideImages,imageProxyFn:this.options.imageProxyFn,hashtagUrlFn:this.options.hashtagUrlFn,usertagUrlFn:this.options.usertagUrlFn,baseUrl:this.options.baseUrl},g),this.state={hashtags:new Set,usertags:new Set,htmltags:new Set,images:new Set,links:new Set}}setMutateEnabled(b){return this.mutate=b,this}parse(b){try{const g=this.domParser.parseFromString(b,"text/html");this.traverseDOMNode(g),this.mutate&&this.postprocessDOM(g),this.parsedDocument=g}catch(g){throw new x("Parsing error",g)}return this}getState(){if(!this.parsedDocument)throw new x("Html has not been parsed yet");return this.state}getParsedDocument(){if(!this.parsedDocument)throw new x("Html has not been parsed yet");return this.parsedDocument}getParsedDocumentAsString(){return this.xmlSerializer.serializeToString(this.getParsedDocument())}traverseDOMNode(b,g=0){!b||!b.childNodes||Array.from(b.childNodes).forEach(v=>{const _=v.tagName?v.tagName.toLowerCase():null;_&&this.state.htmltags.add(_),_==="img"?this.processImgTag(v):_==="iframe"?this.processIframeTag(v):_==="a"?this.processLinkTag(v):v.nodeName==="#text"&&this.processTextNode(v),this.traverseDOMNode(v,g+1)})}processLinkTag(b){const g=b.getAttribute("href");if(g&&(this.state.links.add(g),this.mutate)){const v=b.textContent+"",_=this.linkSanitizer.sanitizeLink(g,v);if(_===!1){const N=b.ownerDocument.createElement("div");N.textContent=`${b.textContent} / ${g}`,N.setAttribute("title",this.localization.phishingWarning),N.setAttribute("class","phishy");const y=b.parentNode;y&&(y.appendChild(N),y.removeChild(b))}else b.setAttribute("href",_)}}processIframeTag(b){const g=b.getAttribute("src");if(g&&this.reportIframeLink(g),!this.mutate||(b.parentNode.tagName?b.parentNode.tagName.toLowerCase():b.parentNode.tagName)==="div"&&b.parentNode.getAttribute("class")==="videoWrapper")return;const _=this.xmlSerializer.serializeToString(b),N=this.domParser.parseFromString(`<div class="videoWrapper">${_}</div>`),y=b.parentNode;y&&(y.appendChild(N),y.removeChild(b))}reportIframeLink(b){const g=o.YoutubeEmbedder.getYoutubeMetadataFromLink(b);g&&(this.state.links.add(g.url),this.state.images.add("https://img.youtube.com/vi/"+g.id+"/0.jpg"))}processImgTag(b){const g=b.getAttribute("src");if(g&&(this.state.images.add(g),this.mutate)){let v=this.normalizeUrl(g);/^\/\//.test(v)&&(v="https:"+v),v!==g&&b.setAttribute("src",v)}}processTextNode(b){try{const g=b.parentNode.tagName?b.parentNode.tagName.toLowerCase():b.parentNode.tagName;if(g==="code"||g==="a"||!b.data)return;const v=this.embedder.processTextNodeAndInsertEmbeds(b);v.images.forEach(y=>this.state.images.add(y)),v.links.forEach(y=>this.state.links.add(y));const _=this.xmlSerializer.serializeToString(b),N=this.linkify(_);if(this.mutate&&N!==_){const y=this.domParser.parseFromString(`<span>${N}</span>`),m=b.parentNode;return m&&(m.appendChild(y),m.removeChild(b)),y}}catch(g){u.Log.log().error(g)}}linkify(b){return b=b.replace((0,l.any)("gi"),g=>{if(l.default.image.test(g))return this.state.images.add(g),`<img src="${this.normalizeUrl(g)}" />`;if(/\.(zip|exe)$/i.test(g))return g;const v=this.linkSanitizer.sanitizeLink(g,g);return v===!1?`<div title='${this.localization.phishingWarning}' class='phishy'>${g}</div>`:(this.state.links.add(v),`<a href="${this.normalizeUrl(g)}">${v}</a>`)}),b=b.replace(/(^|\s)(#[-a-z\d]+)/gi,g=>{if(/#[\d]+$/.test(g))return g;const v=/^\s/.test(g)?g[0]:"",N=g.trim().substring(1).toLowerCase();if(this.state.hashtags.add(N),!this.mutate)return g;const y=this.options.hashtagUrlFn(N);return v+`<a href="${y}">${g.trim()}</a>`}),b=b.replace(/(^|[^a-zA-Z0-9_!#$%&*@@/]|(^|[^a-zA-Z0-9_+~.-/#]))[@@]([a-z][-.a-z\d]+[a-z\d])/gi,(g,v,_,N)=>{const y=N.toLowerCase(),m=h.AccountNameValidator.validateAccountName(y,this.localization)==null;m&&this.state.usertags&&this.state.usertags.add(y);const k=(v||"")+(_||"");if(!this.mutate)return`${k}${N}`;const j=this.options.usertagUrlFn(y);return m?`${k}<a href="${j}">@${N}</a>`:`${k}@${N}`}),b}postprocessDOM(b){this.hideImagesIfNeeded(b),this.proxifyImagesIfNeeded(b)}hideImagesIfNeeded(b){if(this.mutate&&this.options.hideImages)for(const g of Array.from(b.getElementsByTagName("img"))){const v=b.createElement("pre");v.setAttribute("class","image-url-only"),v.appendChild(b.createTextNode(g.getAttribute("src")||""));const _=g.parentNode;_&&(_.appendChild(v),_.removeChild(g))}}proxifyImagesIfNeeded(b){this.mutate&&!this.options.hideImages&&this.proxifyImages(b)}proxifyImages(b){b&&Array.from(b.getElementsByTagName("img")).forEach(g=>{const v=g.getAttribute("src")||"";l.default.local.test(v)||g.setAttribute("src",this.options.imageProxyFn(v))})}normalizeUrl(b){if(this.options.ipfsPrefix&&l.default.ipfsProtocol.test(b)){const[g]=b.match(l.default.ipfsProtocol),v=b.replace(g,"");return`${this.options.ipfsPrefix.replace(/\/+$/,"")}/${v}`}return b}};st.HtmlDOMParser=p;class x extends n.default{constructor(b,g){super(b,g)}}return st.HtmlDOMParserError=x,st}var Za={},nl;function $h(){if(nl)return Za;nl=1,Object.defineProperty(Za,"__esModule",{value:!0}),Za.PreliminarySanitizer=void 0;let e=class ud{static preliminarySanitize(i){return ud.stripHtmlComments(i)}static stripHtmlComments(i){return i.replace(/<!--([\s\S]+?)(-->|$)/g,"(html comment removed: $1)")}};return Za.PreliminarySanitizer=e,Za}var Rr={},Rt={},It={},Js={},Ft={},qn={},sl;function Lh(){return sl||(sl=1,Object.defineProperty(qn,"__esModule",{value:!0}),qn.default=new Uint16Array('ᵁ<Õıʊҝջאٵ۞ޢߖࠏઑඡ༉༦ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲϏϢϸontourIntegraìȹoɴ\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲy;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱còJTabcdfgorstרׯؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ߂ߐĀiyޱrc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣসে্ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४ĀnrࢃgleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpwਖਛgȀLRlr৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼અઋp;椅y;䐜Ādl੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑඞcy;䐊cute;䅃ƀaeyહાron;䅇dil;䅅;䐝ƀgswે૰ativeƀMTV૨ediumSpace;怋hiĀcn૦ëeryThiîtedĀGLଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷreak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪௫ఄ಄ದൡඅ櫬Āoungruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater;EFGLSTஶஷ扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨setĀ;Eೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂෛ෧ขภยา฿ไlig;䅒cute耻Ó䃓Āiyීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲcr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬืde耻Õ䃕es;樷ml耻Ö䃖erĀBP๋Āar๐๓r;怾acĀek๚;揞et;掴arenthesis;揜ҀacfhilorsງຊຏຒດຝະrtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ檻cedesȀ;EST່້扺qual;檯lantEqual;扼ilde;找me;怳Ādpuct;戏ortionĀ;aȥl;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL憒ar;懥eftArrow;懄eiling;按oǵ\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄቕቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHcቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗ĀeiቻDzኀ\0ኇefore;戴a;䎘ĀcnኘkSpace;쀀 Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtèa;䎖r;愨pf;愤cr;쀀𝒵ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒;Eaeiopᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;eᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;eᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰᝃᝈ០៦ᠹᡐᜍ᥈ᥰot;櫭ĀcrᛶkȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;tbrk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯᝳ;䎲;愶een;扬r;쀀𝔟gcostuvwឍឝឳេ៕៛ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀakoᠦᠵĀcn៲ᠣkƀlst֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ;敛;敘;攘;攔;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģbar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;elƀ;bhᥨᥩᥫ䁜;槅sub;柈ŬᥴlĀ;e怢t»pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭒\0᯽\0ᰌƀcprᦲute;䄇̀;abcdsᦿᧀᧄ᧕᧙戩nd;橄rcup;橉Āau᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r;Ecefms᩠ᩢᩫ᪤᪪旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ\0\0aĀ;t䀬;䁀ƀ;fl戁îᅠeĀmxent»eóɍǧ\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯delprvw᭠᭬᭷ᮂᮬᯔarrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;pᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰻᰿ᱝᱩᱵᲞᲬᲷᴍᵻᶑᶫᶻ᷆᷍ròar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂᳖᳜᳠mƀ;oș᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄĀDoḆᴴoôĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»ṺƀaeiἒἚls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧\0耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₥₰₴⃰℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽ƀ;qsؾٌlanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqrⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0proør;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼ròòΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonóquigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roøurĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻 ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨íistĀ;sடr;쀀𝔫ȀEest⩦⩹⩼ƀ;qs⩭ƀ;qs⩴lanôií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast⭕⭚⭟lleìl;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖchimpqu⮽⯍⯙⬄⯤⯯Ȁ;cerല⯆ഷ⯉uå;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭ååഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñĀ;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;cⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācrir;榿;쀀𝔬ͯ\0\0\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕⶥⶨrò᪀Āirⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔǒr;榷rp;榹;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ\0\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ脀¶;l䂶leìЃɩ\0\0m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳ᤈ⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t⾴ïrel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⋢⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔ABHabcdefhilmnoprstuxけさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstwガクシスゼゾダッデナp;極Ā;fゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ìâヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘rrowĀ;tㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowóarpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓ròaòՑ;怏oustĀ;a㈞掱che»mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì耻䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;qኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫwar;椪lig耻ß䃟㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rëƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproøim»ኬsðኞĀas㚺㚮ðrn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈadempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xôheadĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roðtré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜtré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌'.split("").map(function(e){return e.charCodeAt(0)}))),qn}var Bn={},il;function Mh(){return il||(il=1,Object.defineProperty(Bn,"__esModule",{value:!0}),Bn.default=new Uint16Array("Ȁaglq \x1Bɭ\0\0p;䀦os;䀧t;䀾t;䀼uot;䀢".split("").map(function(e){return e.charCodeAt(0)}))),Bn}var Ys={},ol;function ul(){return ol||(ol=1,(function(e){var r;Object.defineProperty(e,"__esModule",{value:!0}),e.replaceCodePoint=e.fromCodePoint=void 0;var i=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]);e.fromCodePoint=(r=String.fromCodePoint)!==null&&r!==void 0?r:function(n){var u="";return n>65535&&(n-=65536,u+=String.fromCharCode(n>>>10&1023|55296),n=56320|n&1023),u+=String.fromCharCode(n),u};function s(n){var u;return n>=55296&&n<=57343||n>1114111?65533:(u=i.get(n))!==null&&u!==void 0?u:n}e.replaceCodePoint=s;function a(n){return(0,e.fromCodePoint)(s(n))}e.default=a})(Ys)),Ys}var ll;function ts(){return ll||(ll=1,(function(e){var r=Ft&&Ft.__createBinding||(Object.create?(function(C,P,$,H){H===void 0&&(H=$);var F=Object.getOwnPropertyDescriptor(P,$);(!F||("get"in F?!P.__esModule:F.writable||F.configurable))&&(F={enumerable:!0,get:function(){return P[$]}}),Object.defineProperty(C,H,F)}):(function(C,P,$,H){H===void 0&&(H=$),C[H]=P[$]})),i=Ft&&Ft.__setModuleDefault||(Object.create?(function(C,P){Object.defineProperty(C,"default",{enumerable:!0,value:P})}):function(C,P){C.default=P}),s=Ft&&Ft.__importStar||function(C){if(C&&C.__esModule)return C;var P={};if(C!=null)for(var $ in C)$!=="default"&&Object.prototype.hasOwnProperty.call(C,$)&&r(P,C,$);return i(P,C),P},a=Ft&&Ft.__importDefault||function(C){return C&&C.__esModule?C:{default:C}};Object.defineProperty(e,"__esModule",{value:!0}),e.decodeXML=e.decodeHTMLStrict=e.decodeHTMLAttribute=e.decodeHTML=e.determineBranch=e.EntityDecoder=e.DecodingMode=e.BinTrieFlags=e.fromCodePoint=e.replaceCodePoint=e.decodeCodePoint=e.xmlDecodeTree=e.htmlDecodeTree=void 0;var n=a(Lh());e.htmlDecodeTree=n.default;var u=a(Mh());e.xmlDecodeTree=u.default;var c=s(ul());e.decodeCodePoint=c.default;var d=ul();Object.defineProperty(e,"replaceCodePoint",{enumerable:!0,get:function(){return d.replaceCodePoint}}),Object.defineProperty(e,"fromCodePoint",{enumerable:!0,get:function(){return d.fromCodePoint}});var f;(function(C){C[C.NUM=35]="NUM",C[C.SEMI=59]="SEMI",C[C.EQUALS=61]="EQUALS",C[C.ZERO=48]="ZERO",C[C.NINE=57]="NINE",C[C.LOWER_A=97]="LOWER_A",C[C.LOWER_F=102]="LOWER_F",C[C.LOWER_X=120]="LOWER_X",C[C.LOWER_Z=122]="LOWER_Z",C[C.UPPER_A=65]="UPPER_A",C[C.UPPER_F=70]="UPPER_F",C[C.UPPER_Z=90]="UPPER_Z"})(f||(f={}));var o=32,h;(function(C){C[C.VALUE_LENGTH=49152]="VALUE_LENGTH",C[C.BRANCH_LENGTH=16256]="BRANCH_LENGTH",C[C.JUMP_TABLE=127]="JUMP_TABLE"})(h=e.BinTrieFlags||(e.BinTrieFlags={}));function l(C){return C>=f.ZERO&&C<=f.NINE}function p(C){return C>=f.UPPER_A&&C<=f.UPPER_F||C>=f.LOWER_A&&C<=f.LOWER_F}function x(C){return C>=f.UPPER_A&&C<=f.UPPER_Z||C>=f.LOWER_A&&C<=f.LOWER_Z||l(C)}function w(C){return C===f.EQUALS||x(C)}var b;(function(C){C[C.EntityStart=0]="EntityStart",C[C.NumericStart=1]="NumericStart",C[C.NumericDecimal=2]="NumericDecimal",C[C.NumericHex=3]="NumericHex",C[C.NamedEntity=4]="NamedEntity"})(b||(b={}));var g;(function(C){C[C.Legacy=0]="Legacy",C[C.Strict=1]="Strict",C[C.Attribute=2]="Attribute"})(g=e.DecodingMode||(e.DecodingMode={}));var v=(function(){function C(P,$,H){this.decodeTree=P,this.emitCodePoint=$,this.errors=H,this.state=b.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=g.Strict}return C.prototype.startEntity=function(P){this.decodeMode=P,this.state=b.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1},C.prototype.write=function(P,$){switch(this.state){case b.EntityStart:return P.charCodeAt($)===f.NUM?(this.state=b.NumericStart,this.consumed+=1,this.stateNumericStart(P,$+1)):(this.state=b.NamedEntity,this.stateNamedEntity(P,$));case b.NumericStart:return this.stateNumericStart(P,$);case b.NumericDecimal:return this.stateNumericDecimal(P,$);case b.NumericHex:return this.stateNumericHex(P,$);case b.NamedEntity:return this.stateNamedEntity(P,$)}},C.prototype.stateNumericStart=function(P,$){return $>=P.length?-1:(P.charCodeAt($)|o)===f.LOWER_X?(this.state=b.NumericHex,this.consumed+=1,this.stateNumericHex(P,$+1)):(this.state=b.NumericDecimal,this.stateNumericDecimal(P,$))},C.prototype.addToNumericResult=function(P,$,H,F){if($!==H){var B=H-$;this.result=this.result*Math.pow(F,B)+parseInt(P.substr($,B),F),this.consumed+=B}},C.prototype.stateNumericHex=function(P,$){for(var H=$;$<P.length;){var F=P.charCodeAt($);if(l(F)||p(F))$+=1;else return this.addToNumericResult(P,H,$,16),this.emitNumericEntity(F,3)}return this.addToNumericResult(P,H,$,16),-1},C.prototype.stateNumericDecimal=function(P,$){for(var H=$;$<P.length;){var F=P.charCodeAt($);if(l(F))$+=1;else return this.addToNumericResult(P,H,$,10),this.emitNumericEntity(F,2)}return this.addToNumericResult(P,H,$,10),-1},C.prototype.emitNumericEntity=function(P,$){var H;if(this.consumed<=$)return(H=this.errors)===null||H===void 0||H.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(P===f.SEMI)this.consumed+=1;else if(this.decodeMode===g.Strict)return 0;return this.emitCodePoint((0,c.replaceCodePoint)(this.result),this.consumed),this.errors&&(P!==f.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed},C.prototype.stateNamedEntity=function(P,$){for(var H=this.decodeTree,F=H[this.treeIndex],B=(F&h.VALUE_LENGTH)>>14;$<P.length;$++,this.excess++){var L=P.charCodeAt($);if(this.treeIndex=N(H,F,this.treeIndex+Math.max(1,B),L),this.treeIndex<0)return this.result===0||this.decodeMode===g.Attribute&&(B===0||w(L))?0:this.emitNotTerminatedNamedEntity();if(F=H[this.treeIndex],B=(F&h.VALUE_LENGTH)>>14,B!==0){if(L===f.SEMI)return this.emitNamedEntityData(this.treeIndex,B,this.consumed+this.excess);this.decodeMode!==g.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1},C.prototype.emitNotTerminatedNamedEntity=function(){var P,$=this,H=$.result,F=$.decodeTree,B=(F[H]&h.VALUE_LENGTH)>>14;return this.emitNamedEntityData(H,B,this.consumed),(P=this.errors)===null||P===void 0||P.missingSemicolonAfterCharacterReference(),this.consumed},C.prototype.emitNamedEntityData=function(P,$,H){var F=this.decodeTree;return this.emitCodePoint($===1?F[P]&~h.VALUE_LENGTH:F[P+1],H),$===3&&this.emitCodePoint(F[P+2],H),H},C.prototype.end=function(){var P;switch(this.state){case b.NamedEntity:return this.result!==0&&(this.decodeMode!==g.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case b.NumericDecimal:return this.emitNumericEntity(0,2);case b.NumericHex:return this.emitNumericEntity(0,3);case b.NumericStart:return(P=this.errors)===null||P===void 0||P.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case b.EntityStart:return 0}},C})();e.EntityDecoder=v;function _(C){var P="",$=new v(C,function(H){return P+=(0,c.fromCodePoint)(H)});return function(F,B){for(var L=0,G=0;(G=F.indexOf("&",G))>=0;){P+=F.slice(L,G),$.startEntity(B);var X=$.write(F,G+1);if(X<0){L=G+$.end();break}L=G+X,G=X===0?L+1:L}var ee=P+F.slice(L);return P="",ee}}function N(C,P,$,H){var F=(P&h.BRANCH_LENGTH)>>7,B=P&h.JUMP_TABLE;if(F===0)return B!==0&&H===B?$:-1;if(B){var L=H-B;return L<0||L>=F?-1:C[$+L]-1}for(var G=$,X=G+F-1;G<=X;){var ee=G+X>>>1,R=C[ee];if(R<H)G=ee+1;else if(R>H)X=ee-1;else return C[ee+F]}return-1}e.determineBranch=N;var y=_(n.default),m=_(u.default);function k(C,P){return P===void 0&&(P=g.Legacy),y(C,P)}e.decodeHTML=k;function j(C){return y(C,g.Attribute)}e.decodeHTMLAttribute=j;function E(C){return y(C,g.Strict)}e.decodeHTMLStrict=E;function D(C){return m(C,g.Strict)}e.decodeXML=D})(Ft)),Ft}var cl;function ld(){return cl||(cl=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.QuoteType=void 0;var r=ts(),i;(function(l){l[l.Tab=9]="Tab",l[l.NewLine=10]="NewLine",l[l.FormFeed=12]="FormFeed",l[l.CarriageReturn=13]="CarriageReturn",l[l.Space=32]="Space",l[l.ExclamationMark=33]="ExclamationMark",l[l.Number=35]="Number",l[l.Amp=38]="Amp",l[l.SingleQuote=39]="SingleQuote",l[l.DoubleQuote=34]="DoubleQuote",l[l.Dash=45]="Dash",l[l.Slash=47]="Slash",l[l.Zero=48]="Zero",l[l.Nine=57]="Nine",l[l.Semi=59]="Semi",l[l.Lt=60]="Lt",l[l.Eq=61]="Eq",l[l.Gt=62]="Gt",l[l.Questionmark=63]="Questionmark",l[l.UpperA=65]="UpperA",l[l.LowerA=97]="LowerA",l[l.UpperF=70]="UpperF",l[l.LowerF=102]="LowerF",l[l.UpperZ=90]="UpperZ",l[l.LowerZ=122]="LowerZ",l[l.LowerX=120]="LowerX",l[l.OpeningSquareBracket=91]="OpeningSquareBracket"})(i||(i={}));var s;(function(l){l[l.Text=1]="Text",l[l.BeforeTagName=2]="BeforeTagName",l[l.InTagName=3]="InTagName",l[l.InSelfClosingTag=4]="InSelfClosingTag",l[l.BeforeClosingTagName=5]="BeforeClosingTagName",l[l.InClosingTagName=6]="InClosingTagName",l[l.AfterClosingTagName=7]="AfterClosingTagName",l[l.BeforeAttributeName=8]="BeforeAttributeName",l[l.InAttributeName=9]="InAttributeName",l[l.AfterAttributeName=10]="AfterAttributeName",l[l.BeforeAttributeValue=11]="BeforeAttributeValue",l[l.InAttributeValueDq=12]="InAttributeValueDq",l[l.InAttributeValueSq=13]="InAttributeValueSq",l[l.InAttributeValueNq=14]="InAttributeValueNq",l[l.BeforeDeclaration=15]="BeforeDeclaration",l[l.InDeclaration=16]="InDeclaration",l[l.InProcessingInstruction=17]="InProcessingInstruction",l[l.BeforeComment=18]="BeforeComment",l[l.CDATASequence=19]="CDATASequence",l[l.InSpecialComment=20]="InSpecialComment",l[l.InCommentLike=21]="InCommentLike",l[l.BeforeSpecialS=22]="BeforeSpecialS",l[l.SpecialStartSequence=23]="SpecialStartSequence",l[l.InSpecialTag=24]="InSpecialTag",l[l.BeforeEntity=25]="BeforeEntity",l[l.BeforeNumericEntity=26]="BeforeNumericEntity",l[l.InNamedEntity=27]="InNamedEntity",l[l.InNumericEntity=28]="InNumericEntity",l[l.InHexEntity=29]="InHexEntity"})(s||(s={}));function a(l){return l===i.Space||l===i.NewLine||l===i.Tab||l===i.FormFeed||l===i.CarriageReturn}function n(l){return l===i.Slash||l===i.Gt||a(l)}function u(l){return l>=i.Zero&&l<=i.Nine}function c(l){return l>=i.LowerA&&l<=i.LowerZ||l>=i.UpperA&&l<=i.UpperZ}function d(l){return l>=i.UpperA&&l<=i.UpperF||l>=i.LowerA&&l<=i.LowerF}var f;(function(l){l[l.NoValue=0]="NoValue",l[l.Unquoted=1]="Unquoted",l[l.Single=2]="Single",l[l.Double=3]="Double"})(f=e.QuoteType||(e.QuoteType={}));var o={Cdata:new Uint8Array([67,68,65,84,65,91]),CdataEnd:new Uint8Array([93,93,62]),CommentEnd:new Uint8Array([45,45,62]),ScriptEnd:new Uint8Array([60,47,115,99,114,105,112,116]),StyleEnd:new Uint8Array([60,47,115,116,121,108,101]),TitleEnd:new Uint8Array([60,47,116,105,116,108,101])},h=(function(){function l(p,x){var w=p.xmlMode,b=w===void 0?!1:w,g=p.decodeEntities,v=g===void 0?!0:g;this.cbs=x,this.state=s.Text,this.buffer="",this.sectionStart=0,this.index=0,this.baseState=s.Text,this.isSpecial=!1,this.running=!0,this.offset=0,this.currentSequence=void 0,this.sequenceIndex=0,this.trieIndex=0,this.trieCurrent=0,this.entityResult=0,this.entityExcess=0,this.xmlMode=b,this.decodeEntities=v,this.entityTrie=b?r.xmlDecodeTree:r.htmlDecodeTree}return l.prototype.reset=function(){this.state=s.Text,this.buffer="",this.sectionStart=0,this.index=0,this.baseState=s.Text,this.currentSequence=void 0,this.running=!0,this.offset=0},l.prototype.write=function(p){this.offset+=this.buffer.length,this.buffer=p,this.parse()},l.prototype.end=function(){this.running&&this.finish()},l.prototype.pause=function(){this.running=!1},l.prototype.resume=function(){this.running=!0,this.index<this.buffer.length+this.offset&&this.parse()},l.prototype.getIndex=function(){return this.index},l.prototype.getSectionStart=function(){return this.sectionStart},l.prototype.stateText=function(p){p===i.Lt||!this.decodeEntities&&this.fastForwardTo(i.Lt)?(this.index>this.sectionStart&&this.cbs.ontext(this.sectionStart,this.index),this.state=s.BeforeTagName,this.sectionStart=this.index):this.decodeEntities&&p===i.Amp&&(this.state=s.BeforeEntity)},l.prototype.stateSpecialStartSequence=function(p){var x=this.sequenceIndex===this.currentSequence.length,w=x?n(p):(p|32)===this.currentSequence[this.sequenceIndex];if(!w)this.isSpecial=!1;else if(!x){this.sequenceIndex++;return}this.sequenceIndex=0,this.state=s.InTagName,this.stateInTagName(p)},l.prototype.stateInSpecialTag=function(p){if(this.sequenceIndex===this.currentSequence.length){if(p===i.Gt||a(p)){var x=this.index-this.currentSequence.length;if(this.sectionStart<x){var w=this.index;this.index=x,this.cbs.ontext(this.sectionStart,x),this.index=w}this.isSpecial=!1,this.sectionStart=x+2,this.stateInClosingTagName(p);return}this.sequenceIndex=0}(p|32)===this.currentSequence[this.sequenceIndex]?this.sequenceIndex+=1:this.sequenceIndex===0?this.currentSequence===o.TitleEnd?this.decodeEntities&&p===i.Amp&&(this.state=s.BeforeEntity):this.fastForwardTo(i.Lt)&&(this.sequenceIndex=1):this.sequenceIndex=+(p===i.Lt)},l.prototype.stateCDATASequence=function(p){p===o.Cdata[this.sequenceIndex]?++this.sequenceIndex===o.Cdata.length&&(this.state=s.InCommentLike,this.currentSequence=o.CdataEnd,this.sequenceIndex=0,this.sectionStart=this.index+1):(this.sequenceIndex=0,this.state=s.InDeclaration,this.stateInDeclaration(p))},l.prototype.fastForwardTo=function(p){for(;++this.index<this.buffer.length+this.offset;)if(this.buffer.charCodeAt(this.index-this.offset)===p)return!0;return this.index=this.buffer.length+this.offset-1,!1},l.prototype.stateInCommentLike=function(p){p===this.currentSequence[this.sequenceIndex]?++this.sequenceIndex===this.currentSequence.length&&(this.currentSequence===o.CdataEnd?this.cbs.oncdata(this.sectionStart,this.index,2):this.cbs.oncomment(this.sectionStart,this.index,2),this.sequenceIndex=0,this.sectionStart=this.index+1,this.state=s.Text):this.sequenceIndex===0?this.fastForwardTo(this.currentSequence[0])&&(this.sequenceIndex=1):p!==this.currentSequence[this.sequenceIndex-1]&&(this.sequenceIndex=0)},l.prototype.isTagStartChar=function(p){return this.xmlMode?!n(p):c(p)},l.prototype.startSpecial=function(p,x){this.isSpecial=!0,this.currentSequence=p,this.sequenceIndex=x,this.state=s.SpecialStartSequence},l.prototype.stateBeforeTagName=function(p){if(p===i.ExclamationMark)this.state=s.BeforeDeclaration,this.sectionStart=this.index+1;else if(p===i.Questionmark)this.state=s.InProcessingInstruction,this.sectionStart=this.index+1;else if(this.isTagStartChar(p)){var x=p|32;this.sectionStart=this.index,!this.xmlMode&&x===o.TitleEnd[2]?this.startSpecial(o.TitleEnd,3):this.state=!this.xmlMode&&x===o.ScriptEnd[2]?s.BeforeSpecialS:s.InTagName}else p===i.Slash?this.state=s.BeforeClosingTagName:(this.state=s.Text,this.stateText(p))},l.prototype.stateInTagName=function(p){n(p)&&(this.cbs.onopentagname(this.sectionStart,this.index),this.sectionStart=-1,this.state=s.BeforeAttributeName,this.stateBeforeAttributeName(p))},l.prototype.stateBeforeClosingTagName=function(p){a(p)||(p===i.Gt?this.state=s.Text:(this.state=this.isTagStartChar(p)?s.InClosingTagName:s.InSpecialComment,this.sectionStart=this.index))},l.prototype.stateInClosingTagName=function(p){(p===i.Gt||a(p))&&(this.cbs.onclosetag(this.sectionStart,this.index),this.sectionStart=-1,this.state=s.AfterClosingTagName,this.stateAfterClosingTagName(p))},l.prototype.stateAfterClosingTagName=function(p){(p===i.Gt||this.fastForwardTo(i.Gt))&&(this.state=s.Text,this.baseState=s.Text,this.sectionStart=this.index+1)},l.prototype.stateBeforeAttributeName=function(p){p===i.Gt?(this.cbs.onopentagend(this.index),this.isSpecial?(this.state=s.InSpecialTag,this.sequenceIndex=0):this.state=s.Text,this.baseState=this.state,this.sectionStart=this.index+1):p===i.Slash?this.state=s.InSelfClosingTag:a(p)||(this.state=s.InAttributeName,this.sectionStart=this.index)},l.prototype.stateInSelfClosingTag=function(p){p===i.Gt?(this.cbs.onselfclosingtag(this.index),this.state=s.Text,this.baseState=s.Text,this.sectionStart=this.index+1,this.isSpecial=!1):a(p)||(this.state=s.BeforeAttributeName,this.stateBeforeAttributeName(p))},l.prototype.stateInAttributeName=function(p){(p===i.Eq||n(p))&&(this.cbs.onattribname(this.sectionStart,this.index),this.sectionStart=-1,this.state=s.AfterAttributeName,this.stateAfterAttributeName(p))},l.prototype.stateAfterAttributeName=function(p){p===i.Eq?this.state=s.BeforeAttributeValue:p===i.Slash||p===i.Gt?(this.cbs.onattribend(f.NoValue,this.index),this.state=s.BeforeAttributeName,this.stateBeforeAttributeName(p)):a(p)||(this.cbs.onattribend(f.NoValue,this.index),this.state=s.InAttributeName,this.sectionStart=this.index)},l.prototype.stateBeforeAttributeValue=function(p){p===i.DoubleQuote?(this.state=s.InAttributeValueDq,this.sectionStart=this.index+1):p===i.SingleQuote?(this.state=s.InAttributeValueSq,this.sectionStart=this.index+1):a(p)||(this.sectionStart=this.index,this.state=s.InAttributeValueNq,this.stateInAttributeValueNoQuotes(p))},l.prototype.handleInAttributeValue=function(p,x){p===x||!this.decodeEntities&&this.fastForwardTo(x)?(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=-1,this.cbs.onattribend(x===i.DoubleQuote?f.Double:f.Single,this.index),this.state=s.BeforeAttributeName):this.decodeEntities&&p===i.Amp&&(this.baseState=this.state,this.state=s.BeforeEntity)},l.prototype.stateInAttributeValueDoubleQuotes=function(p){this.handleInAttributeValue(p,i.DoubleQuote)},l.prototype.stateInAttributeValueSingleQuotes=function(p){this.handleInAttributeValue(p,i.SingleQuote)},l.prototype.stateInAttributeValueNoQuotes=function(p){a(p)||p===i.Gt?(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=-1,this.cbs.onattribend(f.Unquoted,this.index),this.state=s.BeforeAttributeName,this.stateBeforeAttributeName(p)):this.decodeEntities&&p===i.Amp&&(this.baseState=this.state,this.state=s.BeforeEntity)},l.prototype.stateBeforeDeclaration=function(p){p===i.OpeningSquareBracket?(this.state=s.CDATASequence,this.sequenceIndex=0):this.state=p===i.Dash?s.BeforeComment:s.InDeclaration},l.prototype.stateInDeclaration=function(p){(p===i.Gt||this.fastForwardTo(i.Gt))&&(this.cbs.ondeclaration(this.sectionStart,this.index),this.state=s.Text,this.sectionStart=this.index+1)},l.prototype.stateInProcessingInstruction=function(p){(p===i.Gt||this.fastForwardTo(i.Gt))&&(this.cbs.onprocessinginstruction(this.sectionStart,this.index),this.state=s.Text,this.sectionStart=this.index+1)},l.prototype.stateBeforeComment=function(p){p===i.Dash?(this.state=s.InCommentLike,this.currentSequence=o.CommentEnd,this.sequenceIndex=2,this.sectionStart=this.index+1):this.state=s.InDeclaration},l.prototype.stateInSpecialComment=function(p){(p===i.Gt||this.fastForwardTo(i.Gt))&&(this.cbs.oncomment(this.sectionStart,this.index,0),this.state=s.Text,this.sectionStart=this.index+1)},l.prototype.stateBeforeSpecialS=function(p){var x=p|32;x===o.ScriptEnd[3]?this.startSpecial(o.ScriptEnd,4):x===o.StyleEnd[3]?this.startSpecial(o.StyleEnd,4):(this.state=s.InTagName,this.stateInTagName(p))},l.prototype.stateBeforeEntity=function(p){this.entityExcess=1,this.entityResult=0,p===i.Number?this.state=s.BeforeNumericEntity:p===i.Amp||(this.trieIndex=0,this.trieCurrent=this.entityTrie[0],this.state=s.InNamedEntity,this.stateInNamedEntity(p))},l.prototype.stateInNamedEntity=function(p){if(this.entityExcess+=1,this.trieIndex=(0,r.determineBranch)(this.entityTrie,this.trieCurrent,this.trieIndex+1,p),this.trieIndex<0){this.emitNamedEntity(),this.index--;return}this.trieCurrent=this.entityTrie[this.trieIndex];var x=this.trieCurrent&r.BinTrieFlags.VALUE_LENGTH;if(x){var w=(x>>14)-1;if(!this.allowLegacyEntity()&&p!==i.Semi)this.trieIndex+=w;else{var b=this.index-this.entityExcess+1;b>this.sectionStart&&this.emitPartial(this.sectionStart,b),this.entityResult=this.trieIndex,this.trieIndex+=w,this.entityExcess=0,this.sectionStart=this.index+1,w===0&&this.emitNamedEntity()}}},l.prototype.emitNamedEntity=function(){if(this.state=this.baseState,this.entityResult!==0){var p=(this.entityTrie[this.entityResult]&r.BinTrieFlags.VALUE_LENGTH)>>14;switch(p){case 1:{this.emitCodePoint(this.entityTrie[this.entityResult]&~r.BinTrieFlags.VALUE_LENGTH);break}case 2:{this.emitCodePoint(this.entityTrie[this.entityResult+1]);break}case 3:this.emitCodePoint(this.entityTrie[this.entityResult+1]),this.emitCodePoint(this.entityTrie[this.entityResult+2])}}},l.prototype.stateBeforeNumericEntity=function(p){(p|32)===i.LowerX?(this.entityExcess++,this.state=s.InHexEntity):(this.state=s.InNumericEntity,this.stateInNumericEntity(p))},l.prototype.emitNumericEntity=function(p){var x=this.index-this.entityExcess-1,w=x+2+ +(this.state===s.InHexEntity);w!==this.index&&(x>this.sectionStart&&this.emitPartial(this.sectionStart,x),this.sectionStart=this.index+Number(p),this.emitCodePoint((0,r.replaceCodePoint)(this.entityResult))),this.state=this.baseState},l.prototype.stateInNumericEntity=function(p){p===i.Semi?this.emitNumericEntity(!0):u(p)?(this.entityResult=this.entityResult*10+(p-i.Zero),this.entityExcess++):(this.allowLegacyEntity()?this.emitNumericEntity(!1):this.state=this.baseState,this.index--)},l.prototype.stateInHexEntity=function(p){p===i.Semi?this.emitNumericEntity(!0):u(p)?(this.entityResult=this.entityResult*16+(p-i.Zero),this.entityExcess++):d(p)?(this.entityResult=this.entityResult*16+((p|32)-i.LowerA+10),this.entityExcess++):(this.allowLegacyEntity()?this.emitNumericEntity(!1):this.state=this.baseState,this.index--)},l.prototype.allowLegacyEntity=function(){return!this.xmlMode&&(this.baseState===s.Text||this.baseState===s.InSpecialTag)},l.prototype.cleanup=function(){this.running&&this.sectionStart!==this.index&&(this.state===s.Text||this.state===s.InSpecialTag&&this.sequenceIndex===0?(this.cbs.ontext(this.sectionStart,this.index),this.sectionStart=this.index):(this.state===s.InAttributeValueDq||this.state===s.InAttributeValueSq||this.state===s.InAttributeValueNq)&&(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=this.index))},l.prototype.shouldContinue=function(){return this.index<this.buffer.length+this.offset&&this.running},l.prototype.parse=function(){for(;this.shouldContinue();){var p=this.buffer.charCodeAt(this.index-this.offset);switch(this.state){case s.Text:{this.stateText(p);break}case s.SpecialStartSequence:{this.stateSpecialStartSequence(p);break}case s.InSpecialTag:{this.stateInSpecialTag(p);break}case s.CDATASequence:{this.stateCDATASequence(p);break}case s.InAttributeValueDq:{this.stateInAttributeValueDoubleQuotes(p);break}case s.InAttributeName:{this.stateInAttributeName(p);break}case s.InCommentLike:{this.stateInCommentLike(p);break}case s.InSpecialComment:{this.stateInSpecialComment(p);break}case s.BeforeAttributeName:{this.stateBeforeAttributeName(p);break}case s.InTagName:{this.stateInTagName(p);break}case s.InClosingTagName:{this.stateInClosingTagName(p);break}case s.BeforeTagName:{this.stateBeforeTagName(p);break}case s.AfterAttributeName:{this.stateAfterAttributeName(p);break}case s.InAttributeValueSq:{this.stateInAttributeValueSingleQuotes(p);break}case s.BeforeAttributeValue:{this.stateBeforeAttributeValue(p);break}case s.BeforeClosingTagName:{this.stateBeforeClosingTagName(p);break}case s.AfterClosingTagName:{this.stateAfterClosingTagName(p);break}case s.BeforeSpecialS:{this.stateBeforeSpecialS(p);break}case s.InAttributeValueNq:{this.stateInAttributeValueNoQuotes(p);break}case s.InSelfClosingTag:{this.stateInSelfClosingTag(p);break}case s.InDeclaration:{this.stateInDeclaration(p);break}case s.BeforeDeclaration:{this.stateBeforeDeclaration(p);break}case s.BeforeComment:{this.stateBeforeComment(p);break}case s.InProcessingInstruction:{this.stateInProcessingInstruction(p);break}case s.InNamedEntity:{this.stateInNamedEntity(p);break}case s.BeforeEntity:{this.stateBeforeEntity(p);break}case s.InHexEntity:{this.stateInHexEntity(p);break}case s.InNumericEntity:{this.stateInNumericEntity(p);break}default:this.stateBeforeNumericEntity(p)}this.index++}this.cleanup()},l.prototype.finish=function(){this.state===s.InNamedEntity&&this.emitNamedEntity(),this.sectionStart<this.index&&this.handleTrailingData(),this.cbs.onend()},l.prototype.handleTrailingData=function(){var p=this.buffer.length+this.offset;this.state===s.InCommentLike?this.currentSequence===o.CdataEnd?this.cbs.oncdata(this.sectionStart,p,0):this.cbs.oncomment(this.sectionStart,p,0):this.state===s.InNumericEntity&&this.allowLegacyEntity()?this.emitNumericEntity(!1):this.state===s.InHexEntity&&this.allowLegacyEntity()?this.emitNumericEntity(!1):this.state===s.InTagName||this.state===s.BeforeAttributeName||this.state===s.BeforeAttributeValue||this.state===s.AfterAttributeName||this.state===s.InAttributeName||this.state===s.InAttributeValueSq||this.state===s.InAttributeValueDq||this.state===s.InAttributeValueNq||this.state===s.InClosingTagName||this.cbs.ontext(this.sectionStart,p)},l.prototype.emitPartial=function(p,x){this.baseState!==s.Text&&this.baseState!==s.InSpecialTag?this.cbs.onattribdata(p,x):this.cbs.ontext(p,x)},l.prototype.emitCodePoint=function(p){this.baseState!==s.Text&&this.baseState!==s.InSpecialTag?this.cbs.onattribentity(p):this.cbs.ontextentity(p)},l})();e.default=h})(Js)),Js}var dl;function fl(){if(dl)return It;dl=1;var e=It&&It.__createBinding||(Object.create?(function(b,g,v,_){_===void 0&&(_=v);var N=Object.getOwnPropertyDescriptor(g,v);(!N||("get"in N?!g.__esModule:N.writable||N.configurable))&&(N={enumerable:!0,get:function(){return g[v]}}),Object.defineProperty(b,_,N)}):(function(b,g,v,_){_===void 0&&(_=v),b[_]=g[v]})),r=It&&It.__setModuleDefault||(Object.create?(function(b,g){Object.defineProperty(b,"default",{enumerable:!0,value:g})}):function(b,g){b.default=g}),i=It&&It.__importStar||function(b){if(b&&b.__esModule)return b;var g={};if(b!=null)for(var v in b)v!=="default"&&Object.prototype.hasOwnProperty.call(b,v)&&e(g,b,v);return r(g,b),g};Object.defineProperty(It,"__esModule",{value:!0}),It.Parser=void 0;var s=i(ld()),a=ts(),n=new Set(["input","option","optgroup","select","button","datalist","textarea"]),u=new Set(["p"]),c=new Set(["thead","tbody"]),d=new Set(["dd","dt"]),f=new Set(["rt","rp"]),o=new Map([["tr",new Set(["tr","th","td"])],["th",new Set(["th"])],["td",new Set(["thead","th","td"])],["body",new Set(["head","link","script"])],["li",new Set(["li"])],["p",u],["h1",u],["h2",u],["h3",u],["h4",u],["h5",u],["h6",u],["select",n],["input",n],["output",n],["button",n],["datalist",n],["textarea",n],["option",new Set(["option"])],["optgroup",new Set(["optgroup","option"])],["dd",d],["dt",d],["address",u],["article",u],["aside",u],["blockquote",u],["details",u],["div",u],["dl",u],["fieldset",u],["figcaption",u],["figure",u],["footer",u],["form",u],["header",u],["hr",u],["main",u],["nav",u],["ol",u],["pre",u],["section",u],["table",u],["ul",u],["rt",f],["rp",f],["tbody",c],["tfoot",c]]),h=new Set(["area","base","basefont","br","col","command","embed","frame","hr","img","input","isindex","keygen","link","meta","param","source","track","wbr"]),l=new Set(["math","svg"]),p=new Set(["mi","mo","mn","ms","mtext","annotation-xml","foreignobject","desc","title"]),x=/\s|\//,w=(function(){function b(g,v){v===void 0&&(v={});var _,N,y,m,k;this.options=v,this.startIndex=0,this.endIndex=0,this.openTagStart=0,this.tagname="",this.attribname="",this.attribvalue="",this.attribs=null,this.stack=[],this.foreignContext=[],this.buffers=[],this.bufferOffset=0,this.writeIndex=0,this.ended=!1,this.cbs=g??{},this.lowerCaseTagNames=(_=v.lowerCaseTags)!==null&&_!==void 0?_:!v.xmlMode,this.lowerCaseAttributeNames=(N=v.lowerCaseAttributeNames)!==null&&N!==void 0?N:!v.xmlMode,this.tokenizer=new((y=v.Tokenizer)!==null&&y!==void 0?y:s.default)(this.options,this),(k=(m=this.cbs).onparserinit)===null||k===void 0||k.call(m,this)}return b.prototype.ontext=function(g,v){var _,N,y=this.getSlice(g,v);this.endIndex=v-1,(N=(_=this.cbs).ontext)===null||N===void 0||N.call(_,y),this.startIndex=v},b.prototype.ontextentity=function(g){var v,_,N=this.tokenizer.getSectionStart();this.endIndex=N-1,(_=(v=this.cbs).ontext)===null||_===void 0||_.call(v,(0,a.fromCodePoint)(g)),this.startIndex=N},b.prototype.isVoidElement=function(g){return!this.options.xmlMode&&h.has(g)},b.prototype.onopentagname=function(g,v){this.endIndex=v;var _=this.getSlice(g,v);this.lowerCaseTagNames&&(_=_.toLowerCase()),this.emitOpenTag(_)},b.prototype.emitOpenTag=function(g){var v,_,N,y;this.openTagStart=this.startIndex,this.tagname=g;var m=!this.options.xmlMode&&o.get(g);if(m)for(;this.stack.length>0&&m.has(this.stack[this.stack.length-1]);){var k=this.stack.pop();(_=(v=this.cbs).onclosetag)===null||_===void 0||_.call(v,k,!0)}this.isVoidElement(g)||(this.stack.push(g),l.has(g)?this.foreignContext.push(!0):p.has(g)&&this.foreignContext.push(!1)),(y=(N=this.cbs).onopentagname)===null||y===void 0||y.call(N,g),this.cbs.onopentag&&(this.attribs={})},b.prototype.endOpenTag=function(g){var v,_;this.startIndex=this.openTagStart,this.attribs&&((_=(v=this.cbs).onopentag)===null||_===void 0||_.call(v,this.tagname,this.attribs,g),this.attribs=null),this.cbs.onclosetag&&this.isVoidElement(this.tagname)&&this.cbs.onclosetag(this.tagname,!0),this.tagname=""},b.prototype.onopentagend=function(g){this.endIndex=g,this.endOpenTag(!1),this.startIndex=g+1},b.prototype.onclosetag=function(g,v){var _,N,y,m,k,j;this.endIndex=v;var E=this.getSlice(g,v);if(this.lowerCaseTagNames&&(E=E.toLowerCase()),(l.has(E)||p.has(E))&&this.foreignContext.pop(),this.isVoidElement(E))!this.options.xmlMode&&E==="br"&&((N=(_=this.cbs).onopentagname)===null||N===void 0||N.call(_,"br"),(m=(y=this.cbs).onopentag)===null||m===void 0||m.call(y,"br",{},!0),(j=(k=this.cbs).onclosetag)===null||j===void 0||j.call(k,"br",!1));else{var D=this.stack.lastIndexOf(E);if(D!==-1)if(this.cbs.onclosetag)for(var C=this.stack.length-D;C--;)this.cbs.onclosetag(this.stack.pop(),C!==0);else this.stack.length=D;else!this.options.xmlMode&&E==="p"&&(this.emitOpenTag("p"),this.closeCurrentTag(!0))}this.startIndex=v+1},b.prototype.onselfclosingtag=function(g){this.endIndex=g,this.options.xmlMode||this.options.recognizeSelfClosing||this.foreignContext[this.foreignContext.length-1]?(this.closeCurrentTag(!1),this.startIndex=g+1):this.onopentagend(g)},b.prototype.closeCurrentTag=function(g){var v,_,N=this.tagname;this.endOpenTag(g),this.stack[this.stack.length-1]===N&&((_=(v=this.cbs).onclosetag)===null||_===void 0||_.call(v,N,!g),this.stack.pop())},b.prototype.onattribname=function(g,v){this.startIndex=g;var _=this.getSlice(g,v);this.attribname=this.lowerCaseAttributeNames?_.toLowerCase():_},b.prototype.onattribdata=function(g,v){this.attribvalue+=this.getSlice(g,v)},b.prototype.onattribentity=function(g){this.attribvalue+=(0,a.fromCodePoint)(g)},b.prototype.onattribend=function(g,v){var _,N;this.endIndex=v,(N=(_=this.cbs).onattribute)===null||N===void 0||N.call(_,this.attribname,this.attribvalue,g===s.QuoteType.Double?'"':g===s.QuoteType.Single?"'":g===s.QuoteType.NoValue?void 0:null),this.attribs&&!Object.prototype.hasOwnProperty.call(this.attribs,this.attribname)&&(this.attribs[this.attribname]=this.attribvalue),this.attribvalue=""},b.prototype.getInstructionName=function(g){var v=g.search(x),_=v<0?g:g.substr(0,v);return this.lowerCaseTagNames&&(_=_.toLowerCase()),_},b.prototype.ondeclaration=function(g,v){this.endIndex=v;var _=this.getSlice(g,v);if(this.cbs.onprocessinginstruction){var N=this.getInstructionName(_);this.cbs.onprocessinginstruction("!".concat(N),"!".concat(_))}this.startIndex=v+1},b.prototype.onprocessinginstruction=function(g,v){this.endIndex=v;var _=this.getSlice(g,v);if(this.cbs.onprocessinginstruction){var N=this.getInstructionName(_);this.cbs.onprocessinginstruction("?".concat(N),"?".concat(_))}this.startIndex=v+1},b.prototype.oncomment=function(g,v,_){var N,y,m,k;this.endIndex=v,(y=(N=this.cbs).oncomment)===null||y===void 0||y.call(N,this.getSlice(g,v-_)),(k=(m=this.cbs).oncommentend)===null||k===void 0||k.call(m),this.startIndex=v+1},b.prototype.oncdata=function(g,v,_){var N,y,m,k,j,E,D,C,P,$;this.endIndex=v;var H=this.getSlice(g,v-_);this.options.xmlMode||this.options.recognizeCDATA?((y=(N=this.cbs).oncdatastart)===null||y===void 0||y.call(N),(k=(m=this.cbs).ontext)===null||k===void 0||k.call(m,H),(E=(j=this.cbs).oncdataend)===null||E===void 0||E.call(j)):((C=(D=this.cbs).oncomment)===null||C===void 0||C.call(D,"[CDATA[".concat(H,"]]")),($=(P=this.cbs).oncommentend)===null||$===void 0||$.call(P)),this.startIndex=v+1},b.prototype.onend=function(){var g,v;if(this.cbs.onclosetag){this.endIndex=this.startIndex;for(var _=this.stack.length;_>0;this.cbs.onclosetag(this.stack[--_],!0));}(v=(g=this.cbs).onend)===null||v===void 0||v.call(g)},b.prototype.reset=function(){var g,v,_,N;(v=(g=this.cbs).onreset)===null||v===void 0||v.call(g),this.tokenizer.reset(),this.tagname="",this.attribname="",this.attribs=null,this.stack.length=0,this.startIndex=0,this.endIndex=0,(N=(_=this.cbs).onparserinit)===null||N===void 0||N.call(_,this),this.buffers.length=0,this.bufferOffset=0,this.writeIndex=0,this.ended=!1},b.prototype.parseComplete=function(g){this.reset(),this.end(g)},b.prototype.getSlice=function(g,v){for(;g-this.bufferOffset>=this.buffers[0].length;)this.shiftBuffer();for(var _=this.buffers[0].slice(g-this.bufferOffset,v-this.bufferOffset);v-this.bufferOffset>this.buffers[0].length;)this.shiftBuffer(),_+=this.buffers[0].slice(0,v-this.bufferOffset);return _},b.prototype.shiftBuffer=function(){this.bufferOffset+=this.buffers[0].length,this.writeIndex--,this.buffers.shift()},b.prototype.write=function(g){var v,_;if(this.ended){(_=(v=this.cbs).onerror)===null||_===void 0||_.call(v,new Error(".write() after done!"));return}this.buffers.push(g),this.tokenizer.running&&(this.tokenizer.write(g),this.writeIndex++)},b.prototype.end=function(g){var v,_;if(this.ended){(_=(v=this.cbs).onerror)===null||_===void 0||_.call(v,new Error(".end() after done!"));return}g&&this.write(g),this.ended=!0,this.tokenizer.end()},b.prototype.pause=function(){this.tokenizer.pause()},b.prototype.resume=function(){for(this.tokenizer.resume();this.tokenizer.running&&this.writeIndex<this.buffers.length;)this.tokenizer.write(this.buffers[this.writeIndex++]);this.ended&&this.tokenizer.end()},b.prototype.parseChunk=function(g){this.write(g)},b.prototype.done=function(g){this.end(g)},b})();return It.Parser=w,It}var Ir={},Zs={},hl;function nn(){return hl||(hl=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Doctype=e.CDATA=e.Tag=e.Style=e.Script=e.Comment=e.Directive=e.Text=e.Root=e.isTag=e.ElementType=void 0;var r;(function(s){s.Root="root",s.Text="text",s.Directive="directive",s.Comment="comment",s.Script="script",s.Style="style",s.Tag="tag",s.CDATA="cdata",s.Doctype="doctype"})(r=e.ElementType||(e.ElementType={}));function i(s){return s.type===r.Tag||s.type===r.Script||s.type===r.Style}e.isTag=i,e.Root=r.Root,e.Text=r.Text,e.Directive=r.Directive,e.Comment=r.Comment,e.Script=r.Script,e.Style=r.Style,e.Tag=r.Tag,e.CDATA=r.CDATA,e.Doctype=r.Doctype})(Zs)),Zs}var ve={},pl;function ml(){if(pl)return ve;pl=1;var e=ve&&ve.__extends||(function(){var y=function(m,k){return y=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(j,E){j.__proto__=E}||function(j,E){for(var D in E)Object.prototype.hasOwnProperty.call(E,D)&&(j[D]=E[D])},y(m,k)};return function(m,k){if(typeof k!="function"&&k!==null)throw new TypeError("Class extends value "+String(k)+" is not a constructor or null");y(m,k);function j(){this.constructor=m}m.prototype=k===null?Object.create(k):(j.prototype=k.prototype,new j)}})(),r=ve&&ve.__assign||function(){return r=Object.assign||function(y){for(var m,k=1,j=arguments.length;k<j;k++){m=arguments[k];for(var E in m)Object.prototype.hasOwnProperty.call(m,E)&&(y[E]=m[E])}return y},r.apply(this,arguments)};Object.defineProperty(ve,"__esModule",{value:!0}),ve.cloneNode=ve.hasChildren=ve.isDocument=ve.isDirective=ve.isComment=ve.isText=ve.isCDATA=ve.isTag=ve.Element=ve.Document=ve.CDATA=ve.NodeWithChildren=ve.ProcessingInstruction=ve.Comment=ve.Text=ve.DataNode=ve.Node=void 0;var i=nn(),s=(function(){function y(){this.parent=null,this.prev=null,this.next=null,this.startIndex=null,this.endIndex=null}return Object.defineProperty(y.prototype,"parentNode",{get:function(){return this.parent},set:function(m){this.parent=m},enumerable:!1,configurable:!0}),Object.defineProperty(y.prototype,"previousSibling",{get:function(){return this.prev},set:function(m){this.prev=m},enumerable:!1,configurable:!0}),Object.defineProperty(y.prototype,"nextSibling",{get:function(){return this.next},set:function(m){this.next=m},enumerable:!1,configurable:!0}),y.prototype.cloneNode=function(m){return m===void 0&&(m=!1),_(this,m)},y})();ve.Node=s;var a=(function(y){e(m,y);function m(k){var j=y.call(this)||this;return j.data=k,j}return Object.defineProperty(m.prototype,"nodeValue",{get:function(){return this.data},set:function(k){this.data=k},enumerable:!1,configurable:!0}),m})(s);ve.DataNode=a;var n=(function(y){e(m,y);function m(){var k=y!==null&&y.apply(this,arguments)||this;return k.type=i.ElementType.Text,k}return Object.defineProperty(m.prototype,"nodeType",{get:function(){return 3},enumerable:!1,configurable:!0}),m})(a);ve.Text=n;var u=(function(y){e(m,y);function m(){var k=y!==null&&y.apply(this,arguments)||this;return k.type=i.ElementType.Comment,k}return Object.defineProperty(m.prototype,"nodeType",{get:function(){return 8},enumerable:!1,configurable:!0}),m})(a);ve.Comment=u;var c=(function(y){e(m,y);function m(k,j){var E=y.call(this,j)||this;return E.name=k,E.type=i.ElementType.Directive,E}return Object.defineProperty(m.prototype,"nodeType",{get:function(){return 1},enumerable:!1,configurable:!0}),m})(a);ve.ProcessingInstruction=c;var d=(function(y){e(m,y);function m(k){var j=y.call(this)||this;return j.children=k,j}return Object.defineProperty(m.prototype,"firstChild",{get:function(){var k;return(k=this.children[0])!==null&&k!==void 0?k:null},enumerable:!1,configurable:!0}),Object.defineProperty(m.prototype,"lastChild",{get:function(){return this.children.length>0?this.children[this.children.length-1]:null},enumerable:!1,configurable:!0}),Object.defineProperty(m.prototype,"childNodes",{get:function(){return this.children},set:function(k){this.children=k},enumerable:!1,configurable:!0}),m})(s);ve.NodeWithChildren=d;var f=(function(y){e(m,y);function m(){var k=y!==null&&y.apply(this,arguments)||this;return k.type=i.ElementType.CDATA,k}return Object.defineProperty(m.prototype,"nodeType",{get:function(){return 4},enumerable:!1,configurable:!0}),m})(d);ve.CDATA=f;var o=(function(y){e(m,y);function m(){var k=y!==null&&y.apply(this,arguments)||this;return k.type=i.ElementType.Root,k}return Object.defineProperty(m.prototype,"nodeType",{get:function(){return 9},enumerable:!1,configurable:!0}),m})(d);ve.Document=o;var h=(function(y){e(m,y);function m(k,j,E,D){E===void 0&&(E=[]),D===void 0&&(D=k==="script"?i.ElementType.Script:k==="style"?i.ElementType.Style:i.ElementType.Tag);var C=y.call(this,E)||this;return C.name=k,C.attribs=j,C.type=D,C}return Object.defineProperty(m.prototype,"nodeType",{get:function(){return 1},enumerable:!1,configurable:!0}),Object.defineProperty(m.prototype,"tagName",{get:function(){return this.name},set:function(k){this.name=k},enumerable:!1,configurable:!0}),Object.defineProperty(m.prototype,"attributes",{get:function(){var k=this;return Object.keys(this.attribs).map(function(j){var E,D;return{name:j,value:k.attribs[j],namespace:(E=k["x-attribsNamespace"])===null||E===void 0?void 0:E[j],prefix:(D=k["x-attribsPrefix"])===null||D===void 0?void 0:D[j]}})},enumerable:!1,configurable:!0}),m})(d);ve.Element=h;function l(y){return(0,i.isTag)(y)}ve.isTag=l;function p(y){return y.type===i.ElementType.CDATA}ve.isCDATA=p;function x(y){return y.type===i.ElementType.Text}ve.isText=x;function w(y){return y.type===i.ElementType.Comment}ve.isComment=w;function b(y){return y.type===i.ElementType.Directive}ve.isDirective=b;function g(y){return y.type===i.ElementType.Root}ve.isDocument=g;function v(y){return Object.prototype.hasOwnProperty.call(y,"children")}ve.hasChildren=v;function _(y,m){m===void 0&&(m=!1);var k;if(x(y))k=new n(y.data);else if(w(y))k=new u(y.data);else if(l(y)){var j=m?N(y.children):[],E=new h(y.name,r({},y.attribs),j);j.forEach(function($){return $.parent=E}),y.namespace!=null&&(E.namespace=y.namespace),y["x-attribsNamespace"]&&(E["x-attribsNamespace"]=r({},y["x-attribsNamespace"])),y["x-attribsPrefix"]&&(E["x-attribsPrefix"]=r({},y["x-attribsPrefix"])),k=E}else if(p(y)){var j=m?N(y.children):[],D=new f(j);j.forEach(function(H){return H.parent=D}),k=D}else if(g(y)){var j=m?N(y.children):[],C=new o(j);j.forEach(function(H){return H.parent=C}),y["x-mode"]&&(C["x-mode"]=y["x-mode"]),k=C}else if(b(y)){var P=new c(y.name,y.data);y["x-name"]!=null&&(P["x-name"]=y["x-name"],P["x-publicId"]=y["x-publicId"],P["x-systemId"]=y["x-systemId"]),k=P}else throw new Error("Not implemented yet: ".concat(y.type));return k.startIndex=y.startIndex,k.endIndex=y.endIndex,y.sourceCodeLocation!=null&&(k.sourceCodeLocation=y.sourceCodeLocation),k}ve.cloneNode=_;function N(y){for(var m=y.map(function(j){return _(j,!0)}),k=1;k<m.length;k++)m[k].prev=m[k-1],m[k-1].next=m[k];return m}return ve}var gl;function xr(){return gl||(gl=1,(function(e){var r=Ir&&Ir.__createBinding||(Object.create?(function(c,d,f,o){o===void 0&&(o=f);var h=Object.getOwnPropertyDescriptor(d,f);(!h||("get"in h?!d.__esModule:h.writable||h.configurable))&&(h={enumerable:!0,get:function(){return d[f]}}),Object.defineProperty(c,o,h)}):(function(c,d,f,o){o===void 0&&(o=f),c[o]=d[f]})),i=Ir&&Ir.__exportStar||function(c,d){for(var f in c)f!=="default"&&!Object.prototype.hasOwnProperty.call(d,f)&&r(d,c,f)};Object.defineProperty(e,"__esModule",{value:!0}),e.DomHandler=void 0;var s=nn(),a=ml();i(ml(),e);var n={withStartIndices:!1,withEndIndices:!1,xmlMode:!1},u=(function(){function c(d,f,o){this.dom=[],this.root=new a.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null,typeof f=="function"&&(o=f,f=n),typeof d=="object"&&(f=d,d=void 0),this.callback=d??null,this.options=f??n,this.elementCB=o??null}return c.prototype.onparserinit=function(d){this.parser=d},c.prototype.onreset=function(){this.dom=[],this.root=new a.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null},c.prototype.onend=function(){this.done||(this.done=!0,this.parser=null,this.handleCallback(null))},c.prototype.onerror=function(d){this.handleCallback(d)},c.prototype.onclosetag=function(){this.lastNode=null;var d=this.tagStack.pop();this.options.withEndIndices&&(d.endIndex=this.parser.endIndex),this.elementCB&&this.elementCB(d)},c.prototype.onopentag=function(d,f){var o=this.options.xmlMode?s.ElementType.Tag:void 0,h=new a.Element(d,f,void 0,o);this.addNode(h),this.tagStack.push(h)},c.prototype.ontext=function(d){var f=this.lastNode;if(f&&f.type===s.ElementType.Text)f.data+=d,this.options.withEndIndices&&(f.endIndex=this.parser.endIndex);else{var o=new a.Text(d);this.addNode(o),this.lastNode=o}},c.prototype.oncomment=function(d){if(this.lastNode&&this.lastNode.type===s.ElementType.Comment){this.lastNode.data+=d;return}var f=new a.Comment(d);this.addNode(f),this.lastNode=f},c.prototype.oncommentend=function(){this.lastNode=null},c.prototype.oncdatastart=function(){var d=new a.Text(""),f=new a.CDATA([d]);this.addNode(f),d.parent=f,this.lastNode=d},c.prototype.oncdataend=function(){this.lastNode=null},c.prototype.onprocessinginstruction=function(d,f){var o=new a.ProcessingInstruction(d,f);this.addNode(o)},c.prototype.handleCallback=function(d){if(typeof this.callback=="function")this.callback(d,this.dom);else if(d)throw d},c.prototype.addNode=function(d){var f=this.tagStack[this.tagStack.length-1],o=f.children[f.children.length-1];this.options.withStartIndices&&(d.startIndex=this.parser.startIndex),this.options.withEndIndices&&(d.endIndex=this.parser.endIndex),f.children.push(d),o&&(d.prev=o,o.next=d),d.parent=f,this.lastNode=null},c})();e.DomHandler=u,e.default=u})(Ir)),Ir}var Fr={},Wt={},lt={},Xs={},tr={},Vn={},bl;function Rh(){if(bl)return Vn;bl=1,Object.defineProperty(Vn,"__esModule",{value:!0});function e(r){for(var i=1;i<r.length;i++)r[i][0]+=r[i-1][0]+1;return r}return Vn.default=new Map(e([[9,"	"],[0,"
"],[22,"!"],[0,"""],[0,"#"],[0,"$"],[0,"%"],[0,"&"],[0,"'"],[0,"("],[0,")"],[0,"*"],[0,"+"],[0,","],[1,"."],[0,"/"],[10,":"],[0,";"],[0,{v:"<",n:8402,o:"<⃒"}],[0,{v:"=",n:8421,o:"=⃥"}],[0,{v:">",n:8402,o:">⃒"}],[0,"?"],[0,"@"],[26,"["],[0,"\"],[0,"]"],[0,"^"],[0,"_"],[0,"`"],[5,{n:106,o:"fj"}],[20,"{"],[0,"|"],[0,"}"],[34," "],[0,"¡"],[0,"¢"],[0,"£"],[0,"¤"],[0,"¥"],[0,"¦"],[0,"§"],[0,"¨"],[0,"©"],[0,"ª"],[0,"«"],[0,"¬"],[0,"­"],[0,"®"],[0,"¯"],[0,"°"],[0,"±"],[0,"²"],[0,"³"],[0,"´"],[0,"µ"],[0,"¶"],[0,"·"],[0,"¸"],[0,"¹"],[0,"º"],[0,"»"],[0,"¼"],[0,"½"],[0,"¾"],[0,"¿"],[0,"À"],[0,"Á"],[0,"Â"],[0,"Ã"],[0,"Ä"],[0,"Å"],[0,"Æ"],[0,"Ç"],[0,"È"],[0,"É"],[0,"Ê"],[0,"Ë"],[0,"Ì"],[0,"Í"],[0,"Î"],[0,"Ï"],[0,"Ð"],[0,"Ñ"],[0,"Ò"],[0,"Ó"],[0,"Ô"],[0,"Õ"],[0,"Ö"],[0,"×"],[0,"Ø"],[0,"Ù"],[0,"Ú"],[0,"Û"],[0,"Ü"],[0,"Ý"],[0,"Þ"],[0,"ß"],[0,"à"],[0,"á"],[0,"â"],[0,"ã"],[0,"ä"],[0,"å"],[0,"æ"],[0,"ç"],[0,"è"],[0,"é"],[0,"ê"],[0,"ë"],[0,"ì"],[0,"í"],[0,"î"],[0,"ï"],[0,"ð"],[0,"ñ"],[0,"ò"],[0,"ó"],[0,"ô"],[0,"õ"],[0,"ö"],[0,"÷"],[0,"ø"],[0,"ù"],[0,"ú"],[0,"û"],[0,"ü"],[0,"ý"],[0,"þ"],[0,"ÿ"],[0,"Ā"],[0,"ā"],[0,"Ă"],[0,"ă"],[0,"Ą"],[0,"ą"],[0,"Ć"],[0,"ć"],[0,"Ĉ"],[0,"ĉ"],[0,"Ċ"],[0,"ċ"],[0,"Č"],[0,"č"],[0,"Ď"],[0,"ď"],[0,"Đ"],[0,"đ"],[0,"Ē"],[0,"ē"],[2,"Ė"],[0,"ė"],[0,"Ę"],[0,"ę"],[0,"Ě"],[0,"ě"],[0,"Ĝ"],[0,"ĝ"],[0,"Ğ"],[0,"ğ"],[0,"Ġ"],[0,"ġ"],[0,"Ģ"],[1,"Ĥ"],[0,"ĥ"],[0,"Ħ"],[0,"ħ"],[0,"Ĩ"],[0,"ĩ"],[0,"Ī"],[0,"ī"],[2,"Į"],[0,"į"],[0,"İ"],[0,"ı"],[0,"IJ"],[0,"ij"],[0,"Ĵ"],[0,"ĵ"],[0,"Ķ"],[0,"ķ"],[0,"ĸ"],[0,"Ĺ"],[0,"ĺ"],[0,"Ļ"],[0,"ļ"],[0,"Ľ"],[0,"ľ"],[0,"Ŀ"],[0,"ŀ"],[0,"Ł"],[0,"ł"],[0,"Ń"],[0,"ń"],[0,"Ņ"],[0,"ņ"],[0,"Ň"],[0,"ň"],[0,"ʼn"],[0,"Ŋ"],[0,"ŋ"],[0,"Ō"],[0,"ō"],[2,"Ő"],[0,"ő"],[0,"Œ"],[0,"œ"],[0,"Ŕ"],[0,"ŕ"],[0,"Ŗ"],[0,"ŗ"],[0,"Ř"],[0,"ř"],[0,"Ś"],[0,"ś"],[0,"Ŝ"],[0,"ŝ"],[0,"Ş"],[0,"ş"],[0,"Š"],[0,"š"],[0,"Ţ"],[0,"ţ"],[0,"Ť"],[0,"ť"],[0,"Ŧ"],[0,"ŧ"],[0,"Ũ"],[0,"ũ"],[0,"Ū"],[0,"ū"],[0,"Ŭ"],[0,"ŭ"],[0,"Ů"],[0,"ů"],[0,"Ű"],[0,"ű"],[0,"Ų"],[0,"ų"],[0,"Ŵ"],[0,"ŵ"],[0,"Ŷ"],[0,"ŷ"],[0,"Ÿ"],[0,"Ź"],[0,"ź"],[0,"Ż"],[0,"ż"],[0,"Ž"],[0,"ž"],[19,"ƒ"],[34,"Ƶ"],[63,"ǵ"],[65,"ȷ"],[142,"ˆ"],[0,"ˇ"],[16,"˘"],[0,"˙"],[0,"˚"],[0,"˛"],[0,"˜"],[0,"˝"],[51,"̑"],[127,"Α"],[0,"Β"],[0,"Γ"],[0,"Δ"],[0,"Ε"],[0,"Ζ"],[0,"Η"],[0,"Θ"],[0,"Ι"],[0,"Κ"],[0,"Λ"],[0,"Μ"],[0,"Ν"],[0,"Ξ"],[0,"Ο"],[0,"Π"],[0,"Ρ"],[1,"Σ"],[0,"Τ"],[0,"Υ"],[0,"Φ"],[0,"Χ"],[0,"Ψ"],[0,"Ω"],[7,"α"],[0,"β"],[0,"γ"],[0,"δ"],[0,"ε"],[0,"ζ"],[0,"η"],[0,"θ"],[0,"ι"],[0,"κ"],[0,"λ"],[0,"μ"],[0,"ν"],[0,"ξ"],[0,"ο"],[0,"π"],[0,"ρ"],[0,"ς"],[0,"σ"],[0,"τ"],[0,"υ"],[0,"φ"],[0,"χ"],[0,"ψ"],[0,"ω"],[7,"ϑ"],[0,"ϒ"],[2,"ϕ"],[0,"ϖ"],[5,"Ϝ"],[0,"ϝ"],[18,"ϰ"],[0,"ϱ"],[3,"ϵ"],[0,"϶"],[10,"Ё"],[0,"Ђ"],[0,"Ѓ"],[0,"Є"],[0,"Ѕ"],[0,"І"],[0,"Ї"],[0,"Ј"],[0,"Љ"],[0,"Њ"],[0,"Ћ"],[0,"Ќ"],[1,"Ў"],[0,"Џ"],[0,"А"],[0,"Б"],[0,"В"],[0,"Г"],[0,"Д"],[0,"Е"],[0,"Ж"],[0,"З"],[0,"И"],[0,"Й"],[0,"К"],[0,"Л"],[0,"М"],[0,"Н"],[0,"О"],[0,"П"],[0,"Р"],[0,"С"],[0,"Т"],[0,"У"],[0,"Ф"],[0,"Х"],[0,"Ц"],[0,"Ч"],[0,"Ш"],[0,"Щ"],[0,"Ъ"],[0,"Ы"],[0,"Ь"],[0,"Э"],[0,"Ю"],[0,"Я"],[0,"а"],[0,"б"],[0,"в"],[0,"г"],[0,"д"],[0,"е"],[0,"ж"],[0,"з"],[0,"и"],[0,"й"],[0,"к"],[0,"л"],[0,"м"],[0,"н"],[0,"о"],[0,"п"],[0,"р"],[0,"с"],[0,"т"],[0,"у"],[0,"ф"],[0,"х"],[0,"ц"],[0,"ч"],[0,"ш"],[0,"щ"],[0,"ъ"],[0,"ы"],[0,"ь"],[0,"э"],[0,"ю"],[0,"я"],[1,"ё"],[0,"ђ"],[0,"ѓ"],[0,"є"],[0,"ѕ"],[0,"і"],[0,"ї"],[0,"ј"],[0,"љ"],[0,"њ"],[0,"ћ"],[0,"ќ"],[1,"ў"],[0,"џ"],[7074," "],[0," "],[0," "],[0," "],[1," "],[0," "],[0," "],[0," "],[0,"​"],[0,"‌"],[0,"‍"],[0,"‎"],[0,"‏"],[0,"‐"],[2,"–"],[0,"—"],[0,"―"],[0,"‖"],[1,"‘"],[0,"’"],[0,"‚"],[1,"“"],[0,"”"],[0,"„"],[1,"†"],[0,"‡"],[0,"•"],[2,"‥"],[0,"…"],[9,"‰"],[0,"‱"],[0,"′"],[0,"″"],[0,"‴"],[0,"‵"],[3,"‹"],[0,"›"],[3,"‾"],[2,"⁁"],[1,"⁃"],[0,"⁄"],[10,"⁏"],[7,"⁗"],[7,{v:" ",n:8202,o:"  "}],[0,"⁠"],[0,"⁡"],[0,"⁢"],[0,"⁣"],[72,"€"],[46,"⃛"],[0,"⃜"],[37,"ℂ"],[2,"℅"],[4,"ℊ"],[0,"ℋ"],[0,"ℌ"],[0,"ℍ"],[0,"ℎ"],[0,"ℏ"],[0,"ℐ"],[0,"ℑ"],[0,"ℒ"],[0,"ℓ"],[1,"ℕ"],[0,"№"],[0,"℗"],[0,"℘"],[0,"ℙ"],[0,"ℚ"],[0,"ℛ"],[0,"ℜ"],[0,"ℝ"],[0,"℞"],[3,"™"],[1,"ℤ"],[2,"℧"],[0,"ℨ"],[0,"℩"],[2,"ℬ"],[0,"ℭ"],[1,"ℯ"],[0,"ℰ"],[0,"ℱ"],[1,"ℳ"],[0,"ℴ"],[0,"ℵ"],[0,"ℶ"],[0,"ℷ"],[0,"ℸ"],[12,"ⅅ"],[0,"ⅆ"],[0,"ⅇ"],[0,"ⅈ"],[10,"⅓"],[0,"⅔"],[0,"⅕"],[0,"⅖"],[0,"⅗"],[0,"⅘"],[0,"⅙"],[0,"⅚"],[0,"⅛"],[0,"⅜"],[0,"⅝"],[0,"⅞"],[49,"←"],[0,"↑"],[0,"→"],[0,"↓"],[0,"↔"],[0,"↕"],[0,"↖"],[0,"↗"],[0,"↘"],[0,"↙"],[0,"↚"],[0,"↛"],[1,{v:"↝",n:824,o:"↝̸"}],[0,"↞"],[0,"↟"],[0,"↠"],[0,"↡"],[0,"↢"],[0,"↣"],[0,"↤"],[0,"↥"],[0,"↦"],[0,"↧"],[1,"↩"],[0,"↪"],[0,"↫"],[0,"↬"],[0,"↭"],[0,"↮"],[1,"↰"],[0,"↱"],[0,"↲"],[0,"↳"],[1,"↵"],[0,"↶"],[0,"↷"],[2,"↺"],[0,"↻"],[0,"↼"],[0,"↽"],[0,"↾"],[0,"↿"],[0,"⇀"],[0,"⇁"],[0,"⇂"],[0,"⇃"],[0,"⇄"],[0,"⇅"],[0,"⇆"],[0,"⇇"],[0,"⇈"],[0,"⇉"],[0,"⇊"],[0,"⇋"],[0,"⇌"],[0,"⇍"],[0,"⇎"],[0,"⇏"],[0,"⇐"],[0,"⇑"],[0,"⇒"],[0,"⇓"],[0,"⇔"],[0,"⇕"],[0,"⇖"],[0,"⇗"],[0,"⇘"],[0,"⇙"],[0,"⇚"],[0,"⇛"],[1,"⇝"],[6,"⇤"],[0,"⇥"],[15,"⇵"],[7,"⇽"],[0,"⇾"],[0,"⇿"],[0,"∀"],[0,"∁"],[0,{v:"∂",n:824,o:"∂̸"}],[0,"∃"],[0,"∄"],[0,"∅"],[1,"∇"],[0,"∈"],[0,"∉"],[1,"∋"],[0,"∌"],[2,"∏"],[0,"∐"],[0,"∑"],[0,"−"],[0,"∓"],[0,"∔"],[1,"∖"],[0,"∗"],[0,"∘"],[1,"√"],[2,"∝"],[0,"∞"],[0,"∟"],[0,{v:"∠",n:8402,o:"∠⃒"}],[0,"∡"],[0,"∢"],[0,"∣"],[0,"∤"],[0,"∥"],[0,"∦"],[0,"∧"],[0,"∨"],[0,{v:"∩",n:65024,o:"∩︀"}],[0,{v:"∪",n:65024,o:"∪︀"}],[0,"∫"],[0,"∬"],[0,"∭"],[0,"∮"],[0,"∯"],[0,"∰"],[0,"∱"],[0,"∲"],[0,"∳"],[0,"∴"],[0,"∵"],[0,"∶"],[0,"∷"],[0,"∸"],[1,"∺"],[0,"∻"],[0,{v:"∼",n:8402,o:"∼⃒"}],[0,{v:"∽",n:817,o:"∽̱"}],[0,{v:"∾",n:819,o:"∾̳"}],[0,"∿"],[0,"≀"],[0,"≁"],[0,{v:"≂",n:824,o:"≂̸"}],[0,"≃"],[0,"≄"],[0,"≅"],[0,"≆"],[0,"≇"],[0,"≈"],[0,"≉"],[0,"≊"],[0,{v:"≋",n:824,o:"≋̸"}],[0,"≌"],[0,{v:"≍",n:8402,o:"≍⃒"}],[0,{v:"≎",n:824,o:"≎̸"}],[0,{v:"≏",n:824,o:"≏̸"}],[0,{v:"≐",n:824,o:"≐̸"}],[0,"≑"],[0,"≒"],[0,"≓"],[0,"≔"],[0,"≕"],[0,"≖"],[0,"≗"],[1,"≙"],[0,"≚"],[1,"≜"],[2,"≟"],[0,"≠"],[0,{v:"≡",n:8421,o:"≡⃥"}],[0,"≢"],[1,{v:"≤",n:8402,o:"≤⃒"}],[0,{v:"≥",n:8402,o:"≥⃒"}],[0,{v:"≦",n:824,o:"≦̸"}],[0,{v:"≧",n:824,o:"≧̸"}],[0,{v:"≨",n:65024,o:"≨︀"}],[0,{v:"≩",n:65024,o:"≩︀"}],[0,{v:"≪",n:new Map(e([[824,"≪̸"],[7577,"≪⃒"]]))}],[0,{v:"≫",n:new Map(e([[824,"≫̸"],[7577,"≫⃒"]]))}],[0,"≬"],[0,"≭"],[0,"≮"],[0,"≯"],[0,"≰"],[0,"≱"],[0,"≲"],[0,"≳"],[0,"≴"],[0,"≵"],[0,"≶"],[0,"≷"],[0,"≸"],[0,"≹"],[0,"≺"],[0,"≻"],[0,"≼"],[0,"≽"],[0,"≾"],[0,{v:"≿",n:824,o:"≿̸"}],[0,"⊀"],[0,"⊁"],[0,{v:"⊂",n:8402,o:"⊂⃒"}],[0,{v:"⊃",n:8402,o:"⊃⃒"}],[0,"⊄"],[0,"⊅"],[0,"⊆"],[0,"⊇"],[0,"⊈"],[0,"⊉"],[0,{v:"⊊",n:65024,o:"⊊︀"}],[0,{v:"⊋",n:65024,o:"⊋︀"}],[1,"⊍"],[0,"⊎"],[0,{v:"⊏",n:824,o:"⊏̸"}],[0,{v:"⊐",n:824,o:"⊐̸"}],[0,"⊑"],[0,"⊒"],[0,{v:"⊓",n:65024,o:"⊓︀"}],[0,{v:"⊔",n:65024,o:"⊔︀"}],[0,"⊕"],[0,"⊖"],[0,"⊗"],[0,"⊘"],[0,"⊙"],[0,"⊚"],[0,"⊛"],[1,"⊝"],[0,"⊞"],[0,"⊟"],[0,"⊠"],[0,"⊡"],[0,"⊢"],[0,"⊣"],[0,"⊤"],[0,"⊥"],[1,"⊧"],[0,"⊨"],[0,"⊩"],[0,"⊪"],[0,"⊫"],[0,"⊬"],[0,"⊭"],[0,"⊮"],[0,"⊯"],[0,"⊰"],[1,"⊲"],[0,"⊳"],[0,{v:"⊴",n:8402,o:"⊴⃒"}],[0,{v:"⊵",n:8402,o:"⊵⃒"}],[0,"⊶"],[0,"⊷"],[0,"⊸"],[0,"⊹"],[0,"⊺"],[0,"⊻"],[1,"⊽"],[0,"⊾"],[0,"⊿"],[0,"⋀"],[0,"⋁"],[0,"⋂"],[0,"⋃"],[0,"⋄"],[0,"⋅"],[0,"⋆"],[0,"⋇"],[0,"⋈"],[0,"⋉"],[0,"⋊"],[0,"⋋"],[0,"⋌"],[0,"⋍"],[0,"⋎"],[0,"⋏"],[0,"⋐"],[0,"⋑"],[0,"⋒"],[0,"⋓"],[0,"⋔"],[0,"⋕"],[0,"⋖"],[0,"⋗"],[0,{v:"⋘",n:824,o:"⋘̸"}],[0,{v:"⋙",n:824,o:"⋙̸"}],[0,{v:"⋚",n:65024,o:"⋚︀"}],[0,{v:"⋛",n:65024,o:"⋛︀"}],[2,"⋞"],[0,"⋟"],[0,"⋠"],[0,"⋡"],[0,"⋢"],[0,"⋣"],[2,"⋦"],[0,"⋧"],[0,"⋨"],[0,"⋩"],[0,"⋪"],[0,"⋫"],[0,"⋬"],[0,"⋭"],[0,"⋮"],[0,"⋯"],[0,"⋰"],[0,"⋱"],[0,"⋲"],[0,"⋳"],[0,"⋴"],[0,{v:"⋵",n:824,o:"⋵̸"}],[0,"⋶"],[0,"⋷"],[1,{v:"⋹",n:824,o:"⋹̸"}],[0,"⋺"],[0,"⋻"],[0,"⋼"],[0,"⋽"],[0,"⋾"],[6,"⌅"],[0,"⌆"],[1,"⌈"],[0,"⌉"],[0,"⌊"],[0,"⌋"],[0,"⌌"],[0,"⌍"],[0,"⌎"],[0,"⌏"],[0,"⌐"],[1,"⌒"],[0,"⌓"],[1,"⌕"],[0,"⌖"],[5,"⌜"],[0,"⌝"],[0,"⌞"],[0,"⌟"],[2,"⌢"],[0,"⌣"],[9,"⌭"],[0,"⌮"],[7,"⌶"],[6,"⌽"],[1,"⌿"],[60,"⍼"],[51,"⎰"],[0,"⎱"],[2,"⎴"],[0,"⎵"],[0,"⎶"],[37,"⏜"],[0,"⏝"],[0,"⏞"],[0,"⏟"],[2,"⏢"],[4,"⏧"],[59,"␣"],[164,"Ⓢ"],[55,"─"],[1,"│"],[9,"┌"],[3,"┐"],[3,"└"],[3,"┘"],[3,"├"],[7,"┤"],[7,"┬"],[7,"┴"],[7,"┼"],[19,"═"],[0,"║"],[0,"╒"],[0,"╓"],[0,"╔"],[0,"╕"],[0,"╖"],[0,"╗"],[0,"╘"],[0,"╙"],[0,"╚"],[0,"╛"],[0,"╜"],[0,"╝"],[0,"╞"],[0,"╟"],[0,"╠"],[0,"╡"],[0,"╢"],[0,"╣"],[0,"╤"],[0,"╥"],[0,"╦"],[0,"╧"],[0,"╨"],[0,"╩"],[0,"╪"],[0,"╫"],[0,"╬"],[19,"▀"],[3,"▄"],[3,"█"],[8,"░"],[0,"▒"],[0,"▓"],[13,"□"],[8,"▪"],[0,"▫"],[1,"▭"],[0,"▮"],[2,"▱"],[1,"△"],[0,"▴"],[0,"▵"],[2,"▸"],[0,"▹"],[3,"▽"],[0,"▾"],[0,"▿"],[2,"◂"],[0,"◃"],[6,"◊"],[0,"○"],[32,"◬"],[2,"◯"],[8,"◸"],[0,"◹"],[0,"◺"],[0,"◻"],[0,"◼"],[8,"★"],[0,"☆"],[7,"☎"],[49,"♀"],[1,"♂"],[29,"♠"],[2,"♣"],[1,"♥"],[0,"♦"],[3,"♪"],[2,"♭"],[0,"♮"],[0,"♯"],[163,"✓"],[3,"✗"],[8,"✠"],[21,"✶"],[33,"❘"],[25,"❲"],[0,"❳"],[84,"⟈"],[0,"⟉"],[28,"⟦"],[0,"⟧"],[0,"⟨"],[0,"⟩"],[0,"⟪"],[0,"⟫"],[0,"⟬"],[0,"⟭"],[7,"⟵"],[0,"⟶"],[0,"⟷"],[0,"⟸"],[0,"⟹"],[0,"⟺"],[1,"⟼"],[2,"⟿"],[258,"⤂"],[0,"⤃"],[0,"⤄"],[0,"⤅"],[6,"⤌"],[0,"⤍"],[0,"⤎"],[0,"⤏"],[0,"⤐"],[0,"⤑"],[0,"⤒"],[0,"⤓"],[2,"⤖"],[2,"⤙"],[0,"⤚"],[0,"⤛"],[0,"⤜"],[0,"⤝"],[0,"⤞"],[0,"⤟"],[0,"⤠"],[2,"⤣"],[0,"⤤"],[0,"⤥"],[0,"⤦"],[0,"⤧"],[0,"⤨"],[0,"⤩"],[0,"⤪"],[8,{v:"⤳",n:824,o:"⤳̸"}],[1,"⤵"],[0,"⤶"],[0,"⤷"],[0,"⤸"],[0,"⤹"],[2,"⤼"],[0,"⤽"],[7,"⥅"],[2,"⥈"],[0,"⥉"],[0,"⥊"],[0,"⥋"],[2,"⥎"],[0,"⥏"],[0,"⥐"],[0,"⥑"],[0,"⥒"],[0,"⥓"],[0,"⥔"],[0,"⥕"],[0,"⥖"],[0,"⥗"],[0,"⥘"],[0,"⥙"],[0,"⥚"],[0,"⥛"],[0,"⥜"],[0,"⥝"],[0,"⥞"],[0,"⥟"],[0,"⥠"],[0,"⥡"],[0,"⥢"],[0,"⥣"],[0,"⥤"],[0,"⥥"],[0,"⥦"],[0,"⥧"],[0,"⥨"],[0,"⥩"],[0,"⥪"],[0,"⥫"],[0,"⥬"],[0,"⥭"],[0,"⥮"],[0,"⥯"],[0,"⥰"],[0,"⥱"],[0,"⥲"],[0,"⥳"],[0,"⥴"],[0,"⥵"],[0,"⥶"],[1,"⥸"],[0,"⥹"],[1,"⥻"],[0,"⥼"],[0,"⥽"],[0,"⥾"],[0,"⥿"],[5,"⦅"],[0,"⦆"],[4,"⦋"],[0,"⦌"],[0,"⦍"],[0,"⦎"],[0,"⦏"],[0,"⦐"],[0,"⦑"],[0,"⦒"],[0,"⦓"],[0,"⦔"],[0,"⦕"],[0,"⦖"],[3,"⦚"],[1,"⦜"],[0,"⦝"],[6,"⦤"],[0,"⦥"],[0,"⦦"],[0,"⦧"],[0,"⦨"],[0,"⦩"],[0,"⦪"],[0,"⦫"],[0,"⦬"],[0,"⦭"],[0,"⦮"],[0,"⦯"],[0,"⦰"],[0,"⦱"],[0,"⦲"],[0,"⦳"],[0,"⦴"],[0,"⦵"],[0,"⦶"],[0,"⦷"],[1,"⦹"],[1,"⦻"],[0,"⦼"],[1,"⦾"],[0,"⦿"],[0,"⧀"],[0,"⧁"],[0,"⧂"],[0,"⧃"],[0,"⧄"],[0,"⧅"],[3,"⧉"],[3,"⧍"],[0,"⧎"],[0,{v:"⧏",n:824,o:"⧏̸"}],[0,{v:"⧐",n:824,o:"⧐̸"}],[11,"⧜"],[0,"⧝"],[0,"⧞"],[4,"⧣"],[0,"⧤"],[0,"⧥"],[5,"⧫"],[8,"⧴"],[1,"⧶"],[9,"⨀"],[0,"⨁"],[0,"⨂"],[1,"⨄"],[1,"⨆"],[5,"⨌"],[0,"⨍"],[2,"⨐"],[0,"⨑"],[0,"⨒"],[0,"⨓"],[0,"⨔"],[0,"⨕"],[0,"⨖"],[0,"⨗"],[10,"⨢"],[0,"⨣"],[0,"⨤"],[0,"⨥"],[0,"⨦"],[0,"⨧"],[1,"⨩"],[0,"⨪"],[2,"⨭"],[0,"⨮"],[0,"⨯"],[0,"⨰"],[0,"⨱"],[1,"⨳"],[0,"⨴"],[0,"⨵"],[0,"⨶"],[0,"⨷"],[0,"⨸"],[0,"⨹"],[0,"⨺"],[0,"⨻"],[0,"⨼"],[2,"⨿"],[0,"⩀"],[1,"⩂"],[0,"⩃"],[0,"⩄"],[0,"⩅"],[0,"⩆"],[0,"⩇"],[0,"⩈"],[0,"⩉"],[0,"⩊"],[0,"⩋"],[0,"⩌"],[0,"⩍"],[2,"⩐"],[2,"⩓"],[0,"⩔"],[0,"⩕"],[0,"⩖"],[0,"⩗"],[0,"⩘"],[1,"⩚"],[0,"⩛"],[0,"⩜"],[0,"⩝"],[1,"⩟"],[6,"⩦"],[3,"⩪"],[2,{v:"⩭",n:824,o:"⩭̸"}],[0,"⩮"],[0,"⩯"],[0,{v:"⩰",n:824,o:"⩰̸"}],[0,"⩱"],[0,"⩲"],[0,"⩳"],[0,"⩴"],[0,"⩵"],[1,"⩷"],[0,"⩸"],[0,"⩹"],[0,"⩺"],[0,"⩻"],[0,"⩼"],[0,{v:"⩽",n:824,o:"⩽̸"}],[0,{v:"⩾",n:824,o:"⩾̸"}],[0,"⩿"],[0,"⪀"],[0,"⪁"],[0,"⪂"],[0,"⪃"],[0,"⪄"],[0,"⪅"],[0,"⪆"],[0,"⪇"],[0,"⪈"],[0,"⪉"],[0,"⪊"],[0,"⪋"],[0,"⪌"],[0,"⪍"],[0,"⪎"],[0,"⪏"],[0,"⪐"],[0,"⪑"],[0,"⪒"],[0,"⪓"],[0,"⪔"],[0,"⪕"],[0,"⪖"],[0,"⪗"],[0,"⪘"],[0,"⪙"],[0,"⪚"],[2,"⪝"],[0,"⪞"],[0,"⪟"],[0,"⪠"],[0,{v:"⪡",n:824,o:"⪡̸"}],[0,{v:"⪢",n:824,o:"⪢̸"}],[1,"⪤"],[0,"⪥"],[0,"⪦"],[0,"⪧"],[0,"⪨"],[0,"⪩"],[0,"⪪"],[0,"⪫"],[0,{v:"⪬",n:65024,o:"⪬︀"}],[0,{v:"⪭",n:65024,o:"⪭︀"}],[0,"⪮"],[0,{v:"⪯",n:824,o:"⪯̸"}],[0,{v:"⪰",n:824,o:"⪰̸"}],[2,"⪳"],[0,"⪴"],[0,"⪵"],[0,"⪶"],[0,"⪷"],[0,"⪸"],[0,"⪹"],[0,"⪺"],[0,"⪻"],[0,"⪼"],[0,"⪽"],[0,"⪾"],[0,"⪿"],[0,"⫀"],[0,"⫁"],[0,"⫂"],[0,"⫃"],[0,"⫄"],[0,{v:"⫅",n:824,o:"⫅̸"}],[0,{v:"⫆",n:824,o:"⫆̸"}],[0,"⫇"],[0,"⫈"],[2,{v:"⫋",n:65024,o:"⫋︀"}],[0,{v:"⫌",n:65024,o:"⫌︀"}],[2,"⫏"],[0,"⫐"],[0,"⫑"],[0,"⫒"],[0,"⫓"],[0,"⫔"],[0,"⫕"],[0,"⫖"],[0,"⫗"],[0,"⫘"],[0,"⫙"],[0,"⫚"],[0,"⫛"],[8,"⫤"],[1,"⫦"],[0,"⫧"],[0,"⫨"],[0,"⫩"],[1,"⫫"],[0,"⫬"],[0,"⫭"],[0,"⫮"],[0,"⫯"],[0,"⫰"],[0,"⫱"],[0,"⫲"],[0,"⫳"],[9,{v:"⫽",n:8421,o:"⫽⃥"}],[44343,{n:new Map(e([[56476,"𝒜"],[1,"𝒞"],[0,"𝒟"],[2,"𝒢"],[2,"𝒥"],[0,"𝒦"],[2,"𝒩"],[0,"𝒪"],[0,"𝒫"],[0,"𝒬"],[1,"𝒮"],[0,"𝒯"],[0,"𝒰"],[0,"𝒱"],[0,"𝒲"],[0,"𝒳"],[0,"𝒴"],[0,"𝒵"],[0,"𝒶"],[0,"𝒷"],[0,"𝒸"],[0,"𝒹"],[1,"𝒻"],[1,"𝒽"],[0,"𝒾"],[0,"𝒿"],[0,"𝓀"],[0,"𝓁"],[0,"𝓂"],[0,"𝓃"],[1,"𝓅"],[0,"𝓆"],[0,"𝓇"],[0,"𝓈"],[0,"𝓉"],[0,"𝓊"],[0,"𝓋"],[0,"𝓌"],[0,"𝓍"],[0,"𝓎"],[0,"𝓏"],[52,"𝔄"],[0,"𝔅"],[1,"𝔇"],[0,"𝔈"],[0,"𝔉"],[0,"𝔊"],[2,"𝔍"],[0,"𝔎"],[0,"𝔏"],[0,"𝔐"],[0,"𝔑"],[0,"𝔒"],[0,"𝔓"],[0,"𝔔"],[1,"𝔖"],[0,"𝔗"],[0,"𝔘"],[0,"𝔙"],[0,"𝔚"],[0,"𝔛"],[0,"𝔜"],[1,"𝔞"],[0,"𝔟"],[0,"𝔠"],[0,"𝔡"],[0,"𝔢"],[0,"𝔣"],[0,"𝔤"],[0,"𝔥"],[0,"𝔦"],[0,"𝔧"],[0,"𝔨"],[0,"𝔩"],[0,"𝔪"],[0,"𝔫"],[0,"𝔬"],[0,"𝔭"],[0,"𝔮"],[0,"𝔯"],[0,"𝔰"],[0,"𝔱"],[0,"𝔲"],[0,"𝔳"],[0,"𝔴"],[0,"𝔵"],[0,"𝔶"],[0,"𝔷"],[0,"𝔸"],[0,"𝔹"],[1,"𝔻"],[0,"𝔼"],[0,"𝔽"],[0,"𝔾"],[1,"𝕀"],[0,"𝕁"],[0,"𝕂"],[0,"𝕃"],[0,"𝕄"],[1,"𝕆"],[3,"𝕊"],[0,"𝕋"],[0,"𝕌"],[0,"𝕍"],[0,"𝕎"],[0,"𝕏"],[0,"𝕐"],[1,"𝕒"],[0,"𝕓"],[0,"𝕔"],[0,"𝕕"],[0,"𝕖"],[0,"𝕗"],[0,"𝕘"],[0,"𝕙"],[0,"𝕚"],[0,"𝕛"],[0,"𝕜"],[0,"𝕝"],[0,"𝕞"],[0,"𝕟"],[0,"𝕠"],[0,"𝕡"],[0,"𝕢"],[0,"𝕣"],[0,"𝕤"],[0,"𝕥"],[0,"𝕦"],[0,"𝕧"],[0,"𝕨"],[0,"𝕩"],[0,"𝕪"],[0,"𝕫"]]))}],[8906,"ff"],[0,"fi"],[0,"fl"],[0,"ffi"],[0,"ffl"]])),Vn}var Ks={},xl;function qi(){return xl||(xl=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.escapeText=e.escapeAttribute=e.escapeUTF8=e.escape=e.encodeXML=e.getCodePoint=e.xmlReplacer=void 0,e.xmlReplacer=/["&'<>$\x80-\uFFFF]/g;var r=new Map([[34,"""],[38,"&"],[39,"'"],[60,"<"],[62,">"]]);e.getCodePoint=String.prototype.codePointAt!=null?function(a,n){return a.codePointAt(n)}:function(a,n){return(a.charCodeAt(n)&64512)===55296?(a.charCodeAt(n)-55296)*1024+a.charCodeAt(n+1)-56320+65536:a.charCodeAt(n)};function i(a){for(var n="",u=0,c;(c=e.xmlReplacer.exec(a))!==null;){var d=c.index,f=a.charCodeAt(d),o=r.get(f);o!==void 0?(n+=a.substring(u,d)+o,u=d+1):(n+="".concat(a.substring(u,d),"&#x").concat((0,e.getCodePoint)(a,d).toString(16),";"),u=e.xmlReplacer.lastIndex+=+((f&64512)===55296))}return n+a.substr(u)}e.encodeXML=i,e.escape=i;function s(a,n){return function(c){for(var d,f=0,o="";d=a.exec(c);)f!==d.index&&(o+=c.substring(f,d.index)),o+=n.get(d[0].charCodeAt(0)),f=d.index+1;return o+c.substring(f)}}e.escapeUTF8=s(/[&<>'"]/g,r),e.escapeAttribute=s(/["&\u00A0]/g,new Map([[34,"""],[38,"&"],[160," "]])),e.escapeText=s(/[&<>\u00A0]/g,new Map([[38,"&"],[60,"<"],[62,">"],[160," "]]))})(Ks)),Ks}var yl;function vl(){if(yl)return tr;yl=1;var e=tr&&tr.__importDefault||function(c){return c&&c.__esModule?c:{default:c}};Object.defineProperty(tr,"__esModule",{value:!0}),tr.encodeNonAsciiHTML=tr.encodeHTML=void 0;var r=e(Rh()),i=qi(),s=/[\t\n!-,./:-@[-`\f{-}$\x80-\uFFFF]/g;function a(c){return u(s,c)}tr.encodeHTML=a;function n(c){return u(i.xmlReplacer,c)}tr.encodeNonAsciiHTML=n;function u(c,d){for(var f="",o=0,h;(h=c.exec(d))!==null;){var l=h.index;f+=d.substring(o,l);var p=d.charCodeAt(l),x=r.default.get(p);if(typeof x=="object"){if(l+1<d.length){var w=d.charCodeAt(l+1),b=typeof x.n=="number"?x.n===w?x.o:void 0:x.n.get(w);if(b!==void 0){f+=b,o=c.lastIndex+=1;continue}}x=x.v}if(x!==void 0)f+=x,o=l+1;else{var g=(0,i.getCodePoint)(d,l);f+="&#x".concat(g.toString(16),";"),o=c.lastIndex+=+(g!==p)}}return f+d.substr(o)}return tr}var wl;function Ih(){return wl||(wl=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.decodeXMLStrict=e.decodeHTML5Strict=e.decodeHTML4Strict=e.decodeHTML5=e.decodeHTML4=e.decodeHTMLAttribute=e.decodeHTMLStrict=e.decodeHTML=e.decodeXML=e.DecodingMode=e.EntityDecoder=e.encodeHTML5=e.encodeHTML4=e.encodeNonAsciiHTML=e.encodeHTML=e.escapeText=e.escapeAttribute=e.escapeUTF8=e.escape=e.encodeXML=e.encode=e.decodeStrict=e.decode=e.EncodingMode=e.EntityLevel=void 0;var r=ts(),i=vl(),s=qi(),a;(function(l){l[l.XML=0]="XML",l[l.HTML=1]="HTML"})(a=e.EntityLevel||(e.EntityLevel={}));var n;(function(l){l[l.UTF8=0]="UTF8",l[l.ASCII=1]="ASCII",l[l.Extensive=2]="Extensive",l[l.Attribute=3]="Attribute",l[l.Text=4]="Text"})(n=e.EncodingMode||(e.EncodingMode={}));function u(l,p){p===void 0&&(p=a.XML);var x=typeof p=="number"?p:p.level;if(x===a.HTML){var w=typeof p=="object"?p.mode:void 0;return(0,r.decodeHTML)(l,w)}return(0,r.decodeXML)(l)}e.decode=u;function c(l,p){var x;p===void 0&&(p=a.XML);var w=typeof p=="number"?{level:p}:p;return(x=w.mode)!==null&&x!==void 0||(w.mode=r.DecodingMode.Strict),u(l,w)}e.decodeStrict=c;function d(l,p){p===void 0&&(p=a.XML);var x=typeof p=="number"?{level:p}:p;return x.mode===n.UTF8?(0,s.escapeUTF8)(l):x.mode===n.Attribute?(0,s.escapeAttribute)(l):x.mode===n.Text?(0,s.escapeText)(l):x.level===a.HTML?x.mode===n.ASCII?(0,i.encodeNonAsciiHTML)(l):(0,i.encodeHTML)(l):(0,s.encodeXML)(l)}e.encode=d;var f=qi();Object.defineProperty(e,"encodeXML",{enumerable:!0,get:function(){return f.encodeXML}}),Object.defineProperty(e,"escape",{enumerable:!0,get:function(){return f.escape}}),Object.defineProperty(e,"escapeUTF8",{enumerable:!0,get:function(){return f.escapeUTF8}}),Object.defineProperty(e,"escapeAttribute",{enumerable:!0,get:function(){return f.escapeAttribute}}),Object.defineProperty(e,"escapeText",{enumerable:!0,get:function(){return f.escapeText}});var o=vl();Object.defineProperty(e,"encodeHTML",{enumerable:!0,get:function(){return o.encodeHTML}}),Object.defineProperty(e,"encodeNonAsciiHTML",{enumerable:!0,get:function(){return o.encodeNonAsciiHTML}}),Object.defineProperty(e,"encodeHTML4",{enumerable:!0,get:function(){return o.encodeHTML}}),Object.defineProperty(e,"encodeHTML5",{enumerable:!0,get:function(){return o.encodeHTML}});var h=ts();Object.defineProperty(e,"EntityDecoder",{enumerable:!0,get:function(){return h.EntityDecoder}}),Object.defineProperty(e,"DecodingMode",{enumerable:!0,get:function(){return h.DecodingMode}}),Object.defineProperty(e,"decodeXML",{enumerable:!0,get:function(){return h.decodeXML}}),Object.defineProperty(e,"decodeHTML",{enumerable:!0,get:function(){return h.decodeHTML}}),Object.defineProperty(e,"decodeHTMLStrict",{enumerable:!0,get:function(){return h.decodeHTMLStrict}}),Object.defineProperty(e,"decodeHTMLAttribute",{enumerable:!0,get:function(){return h.decodeHTMLAttribute}}),Object.defineProperty(e,"decodeHTML4",{enumerable:!0,get:function(){return h.decodeHTML}}),Object.defineProperty(e,"decodeHTML5",{enumerable:!0,get:function(){return h.decodeHTML}}),Object.defineProperty(e,"decodeHTML4Strict",{enumerable:!0,get:function(){return h.decodeHTMLStrict}}),Object.defineProperty(e,"decodeHTML5Strict",{enumerable:!0,get:function(){return h.decodeHTMLStrict}}),Object.defineProperty(e,"decodeXMLStrict",{enumerable:!0,get:function(){return h.decodeXML}})})(Xs)),Xs}var qr={},_l;function Fh(){return _l||(_l=1,Object.defineProperty(qr,"__esModule",{value:!0}),qr.attributeNames=qr.elementNames=void 0,qr.elementNames=new Map(["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","textPath"].map(function(e){return[e.toLowerCase(),e]})),qr.attributeNames=new Map(["definitionURL","attributeName","attributeType","baseFrequency","baseProfile","calcMode","clipPathUnits","diffuseConstant","edgeMode","filterUnits","glyphRef","gradientTransform","gradientUnits","kernelMatrix","kernelUnitLength","keyPoints","keySplines","keyTimes","lengthAdjust","limitingConeAngle","markerHeight","markerUnits","markerWidth","maskContentUnits","maskUnits","numOctaves","pathLength","patternContentUnits","patternTransform","patternUnits","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","refX","refY","repeatCount","repeatDur","requiredExtensions","requiredFeatures","specularConstant","specularExponent","spreadMethod","startOffset","stdDeviation","stitchTiles","surfaceScale","systemLanguage","tableValues","targetX","targetY","textLength","viewBox","viewTarget","xChannelSelector","yChannelSelector","zoomAndPan"].map(function(e){return[e.toLowerCase(),e]}))),qr}var kl;function qh(){if(kl)return lt;kl=1;var e=lt&<.__assign||function(){return e=Object.assign||function(N){for(var y,m=1,k=arguments.length;m<k;m++){y=arguments[m];for(var j in y)Object.prototype.hasOwnProperty.call(y,j)&&(N[j]=y[j])}return N},e.apply(this,arguments)},r=lt&<.__createBinding||(Object.create?(function(N,y,m,k){k===void 0&&(k=m);var j=Object.getOwnPropertyDescriptor(y,m);(!j||("get"in j?!y.__esModule:j.writable||j.configurable))&&(j={enumerable:!0,get:function(){return y[m]}}),Object.defineProperty(N,k,j)}):(function(N,y,m,k){k===void 0&&(k=m),N[k]=y[m]})),i=lt&<.__setModuleDefault||(Object.create?(function(N,y){Object.defineProperty(N,"default",{enumerable:!0,value:y})}):function(N,y){N.default=y}),s=lt&<.__importStar||function(N){if(N&&N.__esModule)return N;var y={};if(N!=null)for(var m in N)m!=="default"&&Object.prototype.hasOwnProperty.call(N,m)&&r(y,N,m);return i(y,N),y};Object.defineProperty(lt,"__esModule",{value:!0}),lt.render=void 0;var a=s(nn()),n=Ih(),u=Fh(),c=new Set(["style","script","xmp","iframe","noembed","noframes","plaintext","noscript"]);function d(N){return N.replace(/"/g,""")}function f(N,y){var m;if(N){var k=((m=y.encodeEntities)!==null&&m!==void 0?m:y.decodeEntities)===!1?d:y.xmlMode||y.encodeEntities!=="utf8"?n.encodeXML:n.escapeAttribute;return Object.keys(N).map(function(j){var E,D,C=(E=N[j])!==null&&E!==void 0?E:"";return y.xmlMode==="foreign"&&(j=(D=u.attributeNames.get(j))!==null&&D!==void 0?D:j),!y.emptyAttrs&&!y.xmlMode&&C===""?j:"".concat(j,'="').concat(k(C),'"')}).join(" ")}}var o=new Set(["area","base","basefont","br","col","command","embed","frame","hr","img","input","isindex","keygen","link","meta","param","source","track","wbr"]);function h(N,y){y===void 0&&(y={});for(var m=("length"in N)?N:[N],k="",j=0;j<m.length;j++)k+=l(m[j],y);return k}lt.render=h,lt.default=h;function l(N,y){switch(N.type){case a.Root:return h(N.children,y);case a.Doctype:case a.Directive:return b(N);case a.Comment:return _(N);case a.CDATA:return v(N);case a.Script:case a.Style:case a.Tag:return w(N,y);case a.Text:return g(N,y)}}var p=new Set(["mi","mo","mn","ms","mtext","annotation-xml","foreignObject","desc","title"]),x=new Set(["svg","math"]);function w(N,y){var m;y.xmlMode==="foreign"&&(N.name=(m=u.elementNames.get(N.name))!==null&&m!==void 0?m:N.name,N.parent&&p.has(N.parent.name)&&(y=e(e({},y),{xmlMode:!1}))),!y.xmlMode&&x.has(N.name)&&(y=e(e({},y),{xmlMode:"foreign"}));var k="<".concat(N.name),j=f(N.attribs,y);return j&&(k+=" ".concat(j)),N.children.length===0&&(y.xmlMode?y.selfClosingTags!==!1:y.selfClosingTags&&o.has(N.name))?(y.xmlMode||(k+=" "),k+="/>"):(k+=">",N.children.length>0&&(k+=h(N.children,y)),(y.xmlMode||!o.has(N.name))&&(k+="</".concat(N.name,">"))),k}function b(N){return"<".concat(N.data,">")}function g(N,y){var m,k=N.data||"";return((m=y.encodeEntities)!==null&&m!==void 0?m:y.decodeEntities)!==!1&&!(!y.xmlMode&&N.parent&&c.has(N.parent.name))&&(k=y.xmlMode||y.encodeEntities!=="utf8"?(0,n.encodeXML)(k):(0,n.escapeText)(k)),k}function v(N){return"<![CDATA[".concat(N.children[0].data,"]]>")}function _(N){return"<!--".concat(N.data,"-->")}return lt}var Nl;function cd(){if(Nl)return Wt;Nl=1;var e=Wt&&Wt.__importDefault||function(f){return f&&f.__esModule?f:{default:f}};Object.defineProperty(Wt,"__esModule",{value:!0}),Wt.getOuterHTML=a,Wt.getInnerHTML=n,Wt.getText=u,Wt.textContent=c,Wt.innerText=d;var r=xr(),i=e(qh()),s=nn();function a(f,o){return(0,i.default)(f,o)}function n(f,o){return(0,r.hasChildren)(f)?f.children.map(function(h){return a(h,o)}).join(""):""}function u(f){return Array.isArray(f)?f.map(u).join(""):(0,r.isTag)(f)?f.name==="br"?`
|
|
1048
|
+
`:u(f.children):(0,r.isCDATA)(f)?u(f.children):(0,r.isText)(f)?f.data:""}function c(f){return Array.isArray(f)?f.map(c).join(""):(0,r.hasChildren)(f)&&!(0,r.isComment)(f)?c(f.children):(0,r.isText)(f)?f.data:""}function d(f){return Array.isArray(f)?f.map(d).join(""):(0,r.hasChildren)(f)&&(f.type===s.ElementType.Tag||(0,r.isCDATA)(f))?d(f.children):(0,r.isText)(f)?f.data:""}return Wt}var qt={},jl;function Bh(){if(jl)return qt;jl=1,Object.defineProperty(qt,"__esModule",{value:!0}),qt.getChildren=r,qt.getParent=i,qt.getSiblings=s,qt.getAttributeValue=a,qt.hasAttrib=n,qt.getName=u,qt.nextElementSibling=c,qt.prevElementSibling=d;var e=xr();function r(f){return(0,e.hasChildren)(f)?f.children:[]}function i(f){return f.parent||null}function s(f){var o,h,l=i(f);if(l!=null)return r(l);for(var p=[f],x=f.prev,w=f.next;x!=null;)p.unshift(x),o=x,x=o.prev;for(;w!=null;)p.push(w),h=w,w=h.next;return p}function a(f,o){var h;return(h=f.attribs)===null||h===void 0?void 0:h[o]}function n(f,o){return f.attribs!=null&&Object.prototype.hasOwnProperty.call(f.attribs,o)&&f.attribs[o]!=null}function u(f){return f.name}function c(f){for(var o,h=f.next;h!==null&&!(0,e.isTag)(h);)o=h,h=o.next;return h}function d(f){for(var o,h=f.prev;h!==null&&!(0,e.isTag)(h);)o=h,h=o.prev;return h}return qt}var rr={},El;function Vh(){if(El)return rr;El=1,Object.defineProperty(rr,"__esModule",{value:!0}),rr.removeElement=e,rr.replaceElement=r,rr.appendChild=i,rr.append=s,rr.prependChild=a,rr.prepend=n;function e(u){if(u.prev&&(u.prev.next=u.next),u.next&&(u.next.prev=u.prev),u.parent){var c=u.parent.children,d=c.lastIndexOf(u);d>=0&&c.splice(d,1)}u.next=null,u.prev=null,u.parent=null}function r(u,c){var d=c.prev=u.prev;d&&(d.next=c);var f=c.next=u.next;f&&(f.prev=c);var o=c.parent=u.parent;if(o){var h=o.children;h[h.lastIndexOf(u)]=c,u.parent=null}}function i(u,c){if(e(c),c.next=null,c.parent=u,u.children.push(c)>1){var d=u.children[u.children.length-2];d.next=c,c.prev=d}else c.prev=null}function s(u,c){e(c);var d=u.parent,f=u.next;if(c.next=f,c.prev=u,u.next=c,c.parent=d,f){if(f.prev=c,d){var o=d.children;o.splice(o.lastIndexOf(f),0,c)}}else d&&d.children.push(c)}function a(u,c){if(e(c),c.parent=u,c.prev=null,u.children.unshift(c)!==1){var d=u.children[1];d.prev=c,c.next=d}else c.next=null}function n(u,c){e(c);var d=u.parent;if(d){var f=d.children;f.splice(f.indexOf(u),0,c)}u.prev&&(u.prev.next=c),c.parent=d,c.prev=u.prev,c.next=u,u.prev=c}return rr}var ar={},Al;function dd(){if(Al)return ar;Al=1,Object.defineProperty(ar,"__esModule",{value:!0}),ar.filter=r,ar.find=i,ar.findOneChild=s,ar.findOne=a,ar.existsOne=n,ar.findAll=u;var e=xr();function r(c,d,f,o){return f===void 0&&(f=!0),o===void 0&&(o=1/0),i(c,Array.isArray(d)?d:[d],f,o)}function i(c,d,f,o){for(var h=[],l=[Array.isArray(d)?d:[d]],p=[0];;){if(p[0]>=l[0].length){if(p.length===1)return h;l.shift(),p.shift();continue}var x=l[0][p[0]++];if(c(x)&&(h.push(x),--o<=0))return h;f&&(0,e.hasChildren)(x)&&x.children.length>0&&(p.unshift(0),l.unshift(x.children))}}function s(c,d){return d.find(c)}function a(c,d,f){f===void 0&&(f=!0);for(var o=Array.isArray(d)?d:[d],h=0;h<o.length;h++){var l=o[h];if((0,e.isTag)(l)&&c(l))return l;if(f&&(0,e.hasChildren)(l)&&l.children.length>0){var p=a(c,l.children,!0);if(p)return p}}return null}function n(c,d){return(Array.isArray(d)?d:[d]).some(function(f){return(0,e.isTag)(f)&&c(f)||(0,e.hasChildren)(f)&&n(c,f.children)})}function u(c,d){for(var f=[],o=[Array.isArray(d)?d:[d]],h=[0];;){if(h[0]>=o[0].length){if(o.length===1)return f;o.shift(),h.shift();continue}var l=o[0][h[0]++];(0,e.isTag)(l)&&c(l)&&f.push(l),(0,e.hasChildren)(l)&&l.children.length>0&&(h.unshift(0),o.unshift(l.children))}}return ar}var nr={},Sl;function fd(){if(Sl)return nr;Sl=1,Object.defineProperty(nr,"__esModule",{value:!0}),nr.testElement=u,nr.getElements=c,nr.getElementById=d,nr.getElementsByTagName=f,nr.getElementsByClassName=o,nr.getElementsByTagType=h;var e=xr(),r=dd(),i={tag_name:function(l){return typeof l=="function"?function(p){return(0,e.isTag)(p)&&l(p.name)}:l==="*"?e.isTag:function(p){return(0,e.isTag)(p)&&p.name===l}},tag_type:function(l){return typeof l=="function"?function(p){return l(p.type)}:function(p){return p.type===l}},tag_contains:function(l){return typeof l=="function"?function(p){return(0,e.isText)(p)&&l(p.data)}:function(p){return(0,e.isText)(p)&&p.data===l}}};function s(l,p){return typeof p=="function"?function(x){return(0,e.isTag)(x)&&p(x.attribs[l])}:function(x){return(0,e.isTag)(x)&&x.attribs[l]===p}}function a(l,p){return function(x){return l(x)||p(x)}}function n(l){var p=Object.keys(l).map(function(x){var w=l[x];return Object.prototype.hasOwnProperty.call(i,x)?i[x](w):s(x,w)});return p.length===0?null:p.reduce(a)}function u(l,p){var x=n(l);return x?x(p):!0}function c(l,p,x,w){w===void 0&&(w=1/0);var b=n(l);return b?(0,r.filter)(b,p,x,w):[]}function d(l,p,x){return x===void 0&&(x=!0),Array.isArray(p)||(p=[p]),(0,r.findOne)(s("id",l),p,x)}function f(l,p,x,w){return x===void 0&&(x=!0),w===void 0&&(w=1/0),(0,r.filter)(i.tag_name(l),p,x,w)}function o(l,p,x,w){return x===void 0&&(x=!0),w===void 0&&(w=1/0),(0,r.filter)(s("class",l),p,x,w)}function h(l,p,x,w){return x===void 0&&(x=!0),w===void 0&&(w=1/0),(0,r.filter)(i.tag_type(l),p,x,w)}return nr}var mr={},Cl;function Uh(){if(Cl)return mr;Cl=1,Object.defineProperty(mr,"__esModule",{value:!0}),mr.DocumentPosition=void 0,mr.removeSubsets=r,mr.compareDocumentPosition=s,mr.uniqueSort=a;var e=xr();function r(n){for(var u=n.length;--u>=0;){var c=n[u];if(u>0&&n.lastIndexOf(c,u-1)>=0){n.splice(u,1);continue}for(var d=c.parent;d;d=d.parent)if(n.includes(d)){n.splice(u,1);break}}return n}var i;(function(n){n[n.DISCONNECTED=1]="DISCONNECTED",n[n.PRECEDING=2]="PRECEDING",n[n.FOLLOWING=4]="FOLLOWING",n[n.CONTAINS=8]="CONTAINS",n[n.CONTAINED_BY=16]="CONTAINED_BY"})(i||(mr.DocumentPosition=i={}));function s(n,u){var c=[],d=[];if(n===u)return 0;for(var f=(0,e.hasChildren)(n)?n:n.parent;f;)c.unshift(f),f=f.parent;for(f=(0,e.hasChildren)(u)?u:u.parent;f;)d.unshift(f),f=f.parent;for(var o=Math.min(c.length,d.length),h=0;h<o&&c[h]===d[h];)h++;if(h===0)return i.DISCONNECTED;var l=c[h-1],p=l.children,x=c[h],w=d[h];return p.indexOf(x)>p.indexOf(w)?l===u?i.FOLLOWING|i.CONTAINED_BY:i.FOLLOWING:l===n?i.PRECEDING|i.CONTAINS:i.PRECEDING}function a(n){return n=n.filter(function(u,c,d){return!d.includes(u,c+1)}),n.sort(function(u,c){var d=s(u,c);return d&i.PRECEDING?-1:d&i.FOLLOWING?1:0}),n}return mr}var Un={},Dl;function zh(){if(Dl)return Un;Dl=1,Object.defineProperty(Un,"__esModule",{value:!0}),Un.getFeed=i;var e=cd(),r=fd();function i(l){var p=d(h,l);return p?p.name==="feed"?s(p):a(p):null}function s(l){var p,x=l.children,w={type:"atom",items:(0,r.getElementsByTagName)("entry",x).map(function(v){var _,N=v.children,y={media:c(N)};o(y,"id","id",N),o(y,"title","title",N);var m=(_=d("link",N))===null||_===void 0?void 0:_.attribs.href;m&&(y.link=m);var k=f("summary",N)||f("content",N);k&&(y.description=k);var j=f("updated",N);return j&&(y.pubDate=new Date(j)),y})};o(w,"id","id",x),o(w,"title","title",x);var b=(p=d("link",x))===null||p===void 0?void 0:p.attribs.href;b&&(w.link=b),o(w,"description","subtitle",x);var g=f("updated",x);return g&&(w.updated=new Date(g)),o(w,"author","email",x,!0),w}function a(l){var p,x,w=(x=(p=d("channel",l.children))===null||p===void 0?void 0:p.children)!==null&&x!==void 0?x:[],b={type:l.name.substr(0,3),id:"",items:(0,r.getElementsByTagName)("item",l.children).map(function(v){var _=v.children,N={media:c(_)};o(N,"id","guid",_),o(N,"title","title",_),o(N,"link","link",_),o(N,"description","description",_);var y=f("pubDate",_)||f("dc:date",_);return y&&(N.pubDate=new Date(y)),N})};o(b,"title","title",w),o(b,"link","link",w),o(b,"description","description",w);var g=f("lastBuildDate",w);return g&&(b.updated=new Date(g)),o(b,"author","managingEditor",w,!0),b}var n=["url","type","lang"],u=["fileSize","bitrate","framerate","samplingrate","channels","duration","height","width"];function c(l){return(0,r.getElementsByTagName)("media:content",l).map(function(p){for(var x=p.attribs,w={medium:x.medium,isDefault:!!x.isDefault},b=0,g=n;b<g.length;b++){var v=g[b];x[v]&&(w[v]=x[v])}for(var _=0,N=u;_<N.length;_++){var v=N[_];x[v]&&(w[v]=parseInt(x[v],10))}return x.expression&&(w.expression=x.expression),w})}function d(l,p){return(0,r.getElementsByTagName)(l,p,!0,1)[0]}function f(l,p,x){return x===void 0&&(x=!1),(0,e.textContent)((0,r.getElementsByTagName)(l,p,x,1)).trim()}function o(l,p,x,w,b){b===void 0&&(b=!1);var g=f(x,w,b);g&&(l[p]=g)}function h(l){return l==="rss"||l==="feed"||l==="rdf:RDF"}return Un}var Tl;function Qs(){return Tl||(Tl=1,(function(e){var r=Fr&&Fr.__createBinding||(Object.create?(function(a,n,u,c){c===void 0&&(c=u);var d=Object.getOwnPropertyDescriptor(n,u);(!d||("get"in d?!n.__esModule:d.writable||d.configurable))&&(d={enumerable:!0,get:function(){return n[u]}}),Object.defineProperty(a,c,d)}):(function(a,n,u,c){c===void 0&&(c=u),a[c]=n[u]})),i=Fr&&Fr.__exportStar||function(a,n){for(var u in a)u!=="default"&&!Object.prototype.hasOwnProperty.call(n,u)&&r(n,a,u)};Object.defineProperty(e,"__esModule",{value:!0}),e.hasChildren=e.isDocument=e.isComment=e.isText=e.isCDATA=e.isTag=void 0,i(cd(),e),i(Bh(),e),i(Vh(),e),i(dd(),e),i(fd(),e),i(Uh(),e),i(zh(),e);var s=xr();Object.defineProperty(e,"isTag",{enumerable:!0,get:function(){return s.isTag}}),Object.defineProperty(e,"isCDATA",{enumerable:!0,get:function(){return s.isCDATA}}),Object.defineProperty(e,"isText",{enumerable:!0,get:function(){return s.isText}}),Object.defineProperty(e,"isComment",{enumerable:!0,get:function(){return s.isComment}}),Object.defineProperty(e,"isDocument",{enumerable:!0,get:function(){return s.isDocument}}),Object.defineProperty(e,"hasChildren",{enumerable:!0,get:function(){return s.hasChildren}})})(Fr)),Fr}var Ol;function Hh(){return Ol||(Ol=1,(function(e){var r=Rt&&Rt.__createBinding||(Object.create?(function(g,v,_,N){N===void 0&&(N=_);var y=Object.getOwnPropertyDescriptor(v,_);(!y||("get"in y?!v.__esModule:y.writable||y.configurable))&&(y={enumerable:!0,get:function(){return v[_]}}),Object.defineProperty(g,N,y)}):(function(g,v,_,N){N===void 0&&(N=_),g[N]=v[_]})),i=Rt&&Rt.__setModuleDefault||(Object.create?(function(g,v){Object.defineProperty(g,"default",{enumerable:!0,value:v})}):function(g,v){g.default=v}),s=Rt&&Rt.__importStar||function(g){if(g&&g.__esModule)return g;var v={};if(g!=null)for(var _ in g)_!=="default"&&Object.prototype.hasOwnProperty.call(g,_)&&r(v,g,_);return i(v,g),v},a=Rt&&Rt.__importDefault||function(g){return g&&g.__esModule?g:{default:g}};Object.defineProperty(e,"__esModule",{value:!0}),e.DomUtils=e.parseFeed=e.getFeed=e.ElementType=e.Tokenizer=e.createDomStream=e.parseDOM=e.parseDocument=e.DefaultHandler=e.DomHandler=e.Parser=void 0;var n=fl(),u=fl();Object.defineProperty(e,"Parser",{enumerable:!0,get:function(){return u.Parser}});var c=xr(),d=xr();Object.defineProperty(e,"DomHandler",{enumerable:!0,get:function(){return d.DomHandler}}),Object.defineProperty(e,"DefaultHandler",{enumerable:!0,get:function(){return d.DomHandler}});function f(g,v){var _=new c.DomHandler(void 0,v);return new n.Parser(_,v).end(g),_.root}e.parseDocument=f;function o(g,v){return f(g,v).children}e.parseDOM=o;function h(g,v,_){var N=new c.DomHandler(g,v,_);return new n.Parser(N,v)}e.createDomStream=h;var l=ld();Object.defineProperty(e,"Tokenizer",{enumerable:!0,get:function(){return a(l).default}}),e.ElementType=s(nn());var p=Qs(),x=Qs();Object.defineProperty(e,"getFeed",{enumerable:!0,get:function(){return x.getFeed}});var w={xmlMode:!0};function b(g,v){return v===void 0&&(v=w),(0,p.getFeed)(o(g,v))}e.parseFeed=b,e.DomUtils=s(Qs())})(Rt)),Rt}var ei,Pl;function Wh(){return Pl||(Pl=1,ei=e=>{if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}),ei}var zn={},$l;function Gh(){if($l)return zn;$l=1,Object.defineProperty(zn,"__esModule",{value:!0});/*!
|
|
1049
1049
|
* is-plain-object <https://github.com/jonschlinkert/is-plain-object>
|
|
1050
1050
|
*
|
|
1051
1051
|
* Copyright (c) 2014-2017, Jon Schlinkert.
|
|
1052
1052
|
* Released under the MIT License.
|
|
1053
|
-
*/function e(i){return Object.prototype.toString.call(i)==="[object Object]"}function
|
|
1054
|
-
`||N==="\f"||N==="\r"}function s(N){var y,m=N.exec(
|
|
1053
|
+
*/function e(i){return Object.prototype.toString.call(i)==="[object Object]"}function r(i){var s,a;return e(i)===!1?!1:(s=i.constructor,s===void 0?!0:(a=s.prototype,!(e(a)===!1||a.hasOwnProperty("isPrototypeOf")===!1)))}return zn.isPlainObject=r,zn}var Yn={exports:{}},Jh=Yn.exports,Ll;function Yh(){return Ll||(Ll=1,(function(e){(function(r,i){e.exports?e.exports=i():r.parseSrcset=i()})(Jh,function(){return function(r){function i(N){return N===" "||N===" "||N===`
|
|
1054
|
+
`||N==="\f"||N==="\r"}function s(N){var y,m=N.exec(r.substring(b));if(m)return y=m[0],b+=y.length,y}for(var a=r.length,n=/^[ \t\n\r\u000c]+/,u=/^[, \t\n\r\u000c]+/,c=/^[^ \t\n\r\u000c]+/,d=/[,]+$/,f=/^\d+$/,o=/^-?(?:[0-9]+|[0-9]*\.[0-9]+)(?:[eE][+-]?[0-9]+)?$/,h,l,p,x,w,b=0,g=[];;){if(s(u),b>=a)return g;h=s(c),l=[],h.slice(-1)===","?(h=h.replace(d,""),_()):v()}function v(){for(s(n),p="",x="in descriptor";;){if(w=r.charAt(b),x==="in descriptor")if(i(w))p&&(l.push(p),p="",x="after descriptor");else if(w===","){b+=1,p&&l.push(p),_();return}else if(w==="(")p=p+w,x="in parens";else if(w===""){p&&l.push(p),_();return}else p=p+w;else if(x==="in parens")if(w===")")p=p+w,x="in descriptor";else if(w===""){l.push(p),_();return}else p=p+w;else if(x==="after descriptor"&&!i(w))if(w===""){_();return}else x="in descriptor",b-=1;b+=1}}function _(){var N=!1,y,m,k,j,E={},D,C,P,$,H;for(j=0;j<l.length;j++)D=l[j],C=D[D.length-1],P=D.substring(0,D.length-1),$=parseInt(P,10),H=parseFloat(P),f.test(P)&&C==="w"?((y||m)&&(N=!0),$===0?N=!0:y=$):o.test(P)&&C==="x"?((y||m||k)&&(N=!0),H<0?N=!0:m=H):f.test(P)&&C==="h"?((k||m)&&(N=!0),$===0?N=!0:k=$):N=!0;N?console&&console.log&&console.log("Invalid srcset descriptor found in '"+r+"' at '"+D+"'."):(E.url=h,y&&(E.w=y),m&&(E.d=m),k&&(E.h=k),g.push(E))}}})})(Yn)),Yn.exports}var Hn={exports:{}},Ml;function Zh(){if(Ml)return Hn.exports;Ml=1;var e=String,r=function(){return{isColorSupported:!1,reset:e,bold:e,dim:e,italic:e,underline:e,inverse:e,hidden:e,strikethrough:e,black:e,red:e,green:e,yellow:e,blue:e,magenta:e,cyan:e,white:e,gray:e,bgBlack:e,bgRed:e,bgGreen:e,bgYellow:e,bgBlue:e,bgMagenta:e,bgCyan:e,bgWhite:e,blackBright:e,redBright:e,greenBright:e,yellowBright:e,blueBright:e,magentaBright:e,cyanBright:e,whiteBright:e,bgBlackBright:e,bgRedBright:e,bgGreenBright:e,bgYellowBright:e,bgBlueBright:e,bgMagentaBright:e,bgCyanBright:e,bgWhiteBright:e}};return Hn.exports=r(),Hn.exports.createColors=r,Hn.exports}var ti,Rl;function Yi(){if(Rl)return ti;Rl=1;let e=Zh(),r=dt;class i extends Error{constructor(a,n,u,c,d,f){super(a),this.name="CssSyntaxError",this.reason=a,d&&(this.file=d),c&&(this.source=c),f&&(this.plugin=f),typeof n<"u"&&typeof u<"u"&&(typeof n=="number"?(this.line=n,this.column=u):(this.line=n.line,this.column=n.column,this.endLine=u.line,this.endColumn=u.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,i)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",typeof this.line<"u"&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(a){if(!this.source)return"";let n=this.source;a==null&&(a=e.isColorSupported);let u=p=>p,c=p=>p,d=p=>p;if(a){let{bold:p,gray:x,red:w}=e.createColors(!0);c=b=>p(w(b)),u=b=>x(b),r&&(d=b=>r(b))}let f=n.split(/\r?\n/),o=Math.max(this.line-3,0),h=Math.min(this.line+2,f.length),l=String(h).length;return f.slice(o,h).map((p,x)=>{let w=o+1+x,b=" "+(" "+w).slice(-l)+" | ";if(w===this.line){if(p.length>160){let v=20,_=Math.max(0,this.column-v),N=Math.max(this.column+v,this.endColumn+v),y=p.slice(_,N),m=u(b.replace(/\d/g," "))+p.slice(0,Math.min(this.column-1,v-1)).replace(/[^\t]/g," ");return c(">")+u(b)+d(y)+`
|
|
1055
1055
|
`+m+c("^")}let g=u(b.replace(/\d/g," "))+p.slice(0,this.column-1).replace(/[^\t]/g," ");return c(">")+u(b)+d(p)+`
|
|
1056
1056
|
`+g+c("^")}return" "+u(b)+d(p)}).join(`
|
|
1057
|
-
`)}toString(){let
|
|
1057
|
+
`)}toString(){let a=this.showSourceCode();return a&&(a=`
|
|
1058
1058
|
|
|
1059
|
-
`+
|
|
1060
|
-
`),this.name+": "+this.message+
|
|
1059
|
+
`+a+`
|
|
1060
|
+
`),this.name+": "+this.message+a}}return ti=i,i.default=i,ti}var ri,Il;function hd(){if(Il)return ri;Il=1;const e={after:`
|
|
1061
1061
|
`,beforeClose:`
|
|
1062
1062
|
`,beforeComment:`
|
|
1063
1063
|
`,beforeDecl:`
|
|
1064
1064
|
`,beforeOpen:" ",beforeRule:`
|
|
1065
|
-
`,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function
|
|
1066
|
-
`)){let f=this.raw(
|
|
1067
|
-
`)&&(n=n.replace(/[^\n]+$/,"")),!1}),n&&(n=n.replace(/\S/g,"")),n}rawBeforeComment(
|
|
1068
|
-
`)&&(u=u.replace(/[^\n]+$/,"")),!1}),typeof u>"u"?u=this.raw(n,null,"beforeDecl"):u&&(u=u.replace(/\S/g,"")),u}rawBeforeDecl(
|
|
1069
|
-
`)&&(u=u.replace(/[^\n]+$/,"")),!1}),typeof u>"u"?u=this.raw(n,null,"beforeRule"):u&&(u=u.replace(/\S/g,"")),u}rawBeforeOpen(
|
|
1070
|
-
`)&&(n=n.replace(/[^\n]+$/,"")),!1}),n&&(n=n.replace(/\S/g,"")),n}rawColon(
|
|
1071
|
-
`);return n=d[d.length-1],n=n.replace(/\S/g,""),!1}}),n}rawSemicolon(
|
|
1072
|
-
`?(o=1,h+=1):o+=1}return l}class c{get proxyOf(){return this}constructor(f={}){this.raws={},this[s]=!1,this[
|
|
1073
|
-
`?(o=1,h+=1):o+=1;return{column:o,line:h,offset:x}}prev(){if(!this.parent)return;let f=this.parent.index(this);return this.parent.nodes[f-1]}rangeBy(f={}){let o="document"in this.source.input?this.source.input.document:this.source.input.css,h={column:this.source.start.column,line:this.source.start.line,offset:u(o,this.source.start)},l=this.source.end?{column:this.source.end.column+1,line:this.source.end.line,offset:typeof this.source.end.offset=="number"?this.source.end.offset:u(o,this.source.end)+1}:{column:h.column+1,line:h.line,offset:h.offset+1};if(f.word){let x=o.slice(u(o,this.source.start),u(o,this.source.end)).indexOf(f.word);x!==-1&&(h=this.positionInside(x),l=this.positionInside(x+f.word.length))}else f.start?h={column:f.start.column,line:f.start.line,offset:u(o,f.start)}:f.index&&(h=this.positionInside(f.index)),f.end?l={column:f.end.column,line:f.end.line,offset:u(o,f.end)}:typeof f.endIndex=="number"?l=this.positionInside(f.endIndex):f.index&&(l=this.positionInside(f.index+1));return(l.line<h.line||l.line===h.line&&l.column<=h.column)&&(l={column:h.column+1,line:h.line,offset:h.offset+1}),{end:l,start:h}}raw(f,o){return new a().raw(this,f,o)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...f){if(this.parent){let o=this,h=!1;for(let l of f)l===this?h=!0:h?(this.parent.insertAfter(o,l),o=l):this.parent.insertBefore(o,l);h||this.remove()}return this}root(){let f=this;for(;f.parent&&f.parent.type!=="document";)f=f.parent;return f}toJSON(f,o){let h={},l=o==null;o=o||new Map;let p=0;for(let x in this){if(!Object.prototype.hasOwnProperty.call(this,x)||x==="parent"||x==="proxyCache")continue;let w=this[x];if(Array.isArray(w))h[x]=w.map(b=>typeof b=="object"&&b.toJSON?b.toJSON(null,o):b);else if(typeof w=="object"&&w.toJSON)h[x]=w.toJSON(null,o);else if(x==="source"){if(w==null)continue;let b=o.get(w.input);b==null&&(b=p,o.set(w.input,p),p++),h[x]={end:w.end,inputId:b,start:w.start}}else h[x]=w}return l&&(h.inputs=[...o.keys()].map(x=>x.toJSON())),h}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(f=i){f.stringify&&(f=f.stringify);let o="";return f(this,h=>{o+=h}),o}warn(f,o,h={}){let l={node:this};for(let p in h)l[p]=h[p];return f.warn(o,l)}}return ai=c,c.default=c,ai}var ni,Fl;function xs(){if(Fl)return ni;Fl=1;let e=bs();class a extends e{constructor(s){super(s),this.type="comment"}}return ni=a,a.default=a,ni}var si,ql;function ys(){if(ql)return si;ql=1;let e=bs();class a extends e{get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}constructor(s){s&&typeof s.value<"u"&&typeof s.value!="string"&&(s={...s,value:String(s.value)}),super(s),this.type="decl"}}return si=a,a.default=a,si}var ii,Bl;function Wr(){if(Bl)return ii;Bl=1;let e=xs(),a=ys(),i=bs(),{isClean:s,my:r}=Yi(),n,u,c,d;function f(l){return l.map(p=>(p.nodes&&(p.nodes=f(p.nodes)),delete p.source,p))}function o(l){if(l[s]=!1,l.proxyOf.nodes)for(let p of l.proxyOf.nodes)o(p)}class h extends i{get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}append(...p){for(let x of p){let w=this.normalize(x,this.last);for(let b of w)this.proxyOf.nodes.push(b)}return this.markDirty(),this}cleanRaws(p){if(super.cleanRaws(p),this.nodes)for(let x of this.nodes)x.cleanRaws(p)}each(p){if(!this.proxyOf.nodes)return;let x=this.getIterator(),w,b;for(;this.indexes[x]<this.proxyOf.nodes.length&&(w=this.indexes[x],b=p(this.proxyOf.nodes[w],w),b!==!1);)this.indexes[x]+=1;return delete this.indexes[x],b}every(p){return this.nodes.every(p)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let p=this.lastEach;return this.indexes[p]=0,p}getProxyProcessor(){return{get(p,x){return x==="proxyOf"?p:p[x]?x==="each"||typeof x=="string"&&x.startsWith("walk")?(...w)=>p[x](...w.map(b=>typeof b=="function"?(g,v)=>b(g.toProxy(),v):b)):x==="every"||x==="some"?w=>p[x]((b,...g)=>w(b.toProxy(),...g)):x==="root"?()=>p.root().toProxy():x==="nodes"?p.nodes.map(w=>w.toProxy()):x==="first"||x==="last"?p[x].toProxy():p[x]:p[x]},set(p,x,w){return p[x]===w||(p[x]=w,(x==="name"||x==="params"||x==="selector")&&p.markDirty()),!0}}}index(p){return typeof p=="number"?p:(p.proxyOf&&(p=p.proxyOf),this.proxyOf.nodes.indexOf(p))}insertAfter(p,x){let w=this.index(p),b=this.normalize(x,this.proxyOf.nodes[w]).reverse();w=this.index(p);for(let v of b)this.proxyOf.nodes.splice(w+1,0,v);let g;for(let v in this.indexes)g=this.indexes[v],w<g&&(this.indexes[v]=g+b.length);return this.markDirty(),this}insertBefore(p,x){let w=this.index(p),b=w===0?"prepend":!1,g=this.normalize(x,this.proxyOf.nodes[w],b).reverse();w=this.index(p);for(let _ of g)this.proxyOf.nodes.splice(w,0,_);let v;for(let _ in this.indexes)v=this.indexes[_],w<=v&&(this.indexes[_]=v+g.length);return this.markDirty(),this}normalize(p,x){if(typeof p=="string")p=f(u(p).nodes);else if(typeof p>"u")p=[];else if(Array.isArray(p)){p=p.slice(0);for(let b of p)b.parent&&b.parent.removeChild(b,"ignore")}else if(p.type==="root"&&this.type!=="document"){p=p.nodes.slice(0);for(let b of p)b.parent&&b.parent.removeChild(b,"ignore")}else if(p.type)p=[p];else if(p.prop){if(typeof p.value>"u")throw new Error("Value field is missed in node creation");typeof p.value!="string"&&(p.value=String(p.value)),p=[new a(p)]}else if(p.selector||p.selectors)p=[new d(p)];else if(p.name)p=[new n(p)];else if(p.text)p=[new e(p)];else throw new Error("Unknown node type in node creation");return p.map(b=>(b[r]||h.rebuild(b),b=b.proxyOf,b.parent&&b.parent.removeChild(b),b[s]&&o(b),b.raws||(b.raws={}),typeof b.raws.before>"u"&&x&&typeof x.raws.before<"u"&&(b.raws.before=x.raws.before.replace(/\S/g,"")),b.parent=this.proxyOf,b))}prepend(...p){p=p.reverse();for(let x of p){let w=this.normalize(x,this.first,"prepend").reverse();for(let b of w)this.proxyOf.nodes.unshift(b);for(let b in this.indexes)this.indexes[b]=this.indexes[b]+w.length}return this.markDirty(),this}push(p){return p.parent=this,this.proxyOf.nodes.push(p),this}removeAll(){for(let p of this.proxyOf.nodes)p.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(p){p=this.index(p),this.proxyOf.nodes[p].parent=void 0,this.proxyOf.nodes.splice(p,1);let x;for(let w in this.indexes)x=this.indexes[w],x>=p&&(this.indexes[w]=x-1);return this.markDirty(),this}replaceValues(p,x,w){return w||(w=x,x={}),this.walkDecls(b=>{x.props&&!x.props.includes(b.prop)||x.fast&&!b.value.includes(x.fast)||(b.value=b.value.replace(p,w))}),this.markDirty(),this}some(p){return this.nodes.some(p)}walk(p){return this.each((x,w)=>{let b;try{b=p(x,w)}catch(g){throw x.addToError(g)}return b!==!1&&x.walk&&(b=x.walk(p)),b})}walkAtRules(p,x){return x?p instanceof RegExp?this.walk((w,b)=>{if(w.type==="atrule"&&p.test(w.name))return x(w,b)}):this.walk((w,b)=>{if(w.type==="atrule"&&w.name===p)return x(w,b)}):(x=p,this.walk((w,b)=>{if(w.type==="atrule")return x(w,b)}))}walkComments(p){return this.walk((x,w)=>{if(x.type==="comment")return p(x,w)})}walkDecls(p,x){return x?p instanceof RegExp?this.walk((w,b)=>{if(w.type==="decl"&&p.test(w.prop))return x(w,b)}):this.walk((w,b)=>{if(w.type==="decl"&&w.prop===p)return x(w,b)}):(x=p,this.walk((w,b)=>{if(w.type==="decl")return x(w,b)}))}walkRules(p,x){return x?p instanceof RegExp?this.walk((w,b)=>{if(w.type==="rule"&&p.test(w.selector))return x(w,b)}):this.walk((w,b)=>{if(w.type==="rule"&&w.selector===p)return x(w,b)}):(x=p,this.walk((w,b)=>{if(w.type==="rule")return x(w,b)}))}}return h.registerParse=l=>{u=l},h.registerRule=l=>{d=l},h.registerAtRule=l=>{n=l},h.registerRoot=l=>{c=l},ii=h,h.default=h,h.rebuild=l=>{l.type==="atrule"?Object.setPrototypeOf(l,n.prototype):l.type==="rule"?Object.setPrototypeOf(l,d.prototype):l.type==="decl"?Object.setPrototypeOf(l,a.prototype):l.type==="comment"?Object.setPrototypeOf(l,e.prototype):l.type==="root"&&Object.setPrototypeOf(l,c.prototype),l[r]=!0,l.nodes&&l.nodes.forEach(p=>{h.rebuild(p)})},ii}var oi,Vl;function Zi(){if(Vl)return oi;Vl=1;let e=Wr();class a extends e{constructor(s){super(s),this.type="atrule"}append(...s){return this.proxyOf.nodes||(this.nodes=[]),super.append(...s)}prepend(...s){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...s)}}return oi=a,a.default=a,e.registerAtRule(a),oi}var ui,Ul;function Xi(){if(Ul)return ui;Ul=1;let e=Wr(),a,i;class s extends e{constructor(n){super({type:"document",...n}),this.nodes||(this.nodes=[])}toResult(n={}){return new a(new i,this,n).stringify()}}return s.registerLazyResult=r=>{a=r},s.registerProcessor=r=>{i=r},ui=s,s.default=s,ui}var li,zl;function Xh(){if(zl)return li;zl=1;let e="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";return li={nanoid:(s=21)=>{let r="",n=s|0;for(;n--;)r+=e[Math.random()*64|0];return r},customAlphabet:(s,r=21)=>(n=r)=>{let u="",c=n|0;for(;c--;)u+=s[Math.random()*s.length|0];return u}},li}var ci,Hl;function dd(){if(Hl)return ci;Hl=1;let{existsSync:e,readFileSync:a}=dt,{dirname:i,join:s}=dt,{SourceMapConsumer:r,SourceMapGenerator:n}=dt;function u(d){return Buffer?Buffer.from(d,"base64").toString():window.atob(d)}class c{constructor(f,o){if(o.map===!1)return;this.loadAnnotation(f),this.inline=this.startWith(this.annotation,"data:");let h=o.map?o.map.prev:void 0,l=this.loadMap(o.from,h);!this.mapFile&&o.from&&(this.mapFile=o.from),this.mapFile&&(this.root=i(this.mapFile)),l&&(this.text=l)}consumer(){return this.consumerCache||(this.consumerCache=new r(this.text)),this.consumerCache}decodeInline(f){let o=/^data:application\/json;charset=utf-?8;base64,/,h=/^data:application\/json;base64,/,l=/^data:application\/json;charset=utf-?8,/,p=/^data:application\/json,/,x=f.match(l)||f.match(p);if(x)return decodeURIComponent(f.substr(x[0].length));let w=f.match(o)||f.match(h);if(w)return u(f.substr(w[0].length));let b=f.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+b)}getAnnotationURL(f){return f.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(f){return typeof f!="object"?!1:typeof f.mappings=="string"||typeof f._mappings=="string"||Array.isArray(f.sections)}loadAnnotation(f){let o=f.match(/\/\*\s*# sourceMappingURL=/g);if(!o)return;let h=f.lastIndexOf(o.pop()),l=f.indexOf("*/",h);h>-1&&l>-1&&(this.annotation=this.getAnnotationURL(f.substring(h,l)))}loadFile(f){if(this.root=i(f),e(f))return this.mapFile=f,a(f,"utf-8").toString().trim()}loadMap(f,o){if(o===!1)return!1;if(o){if(typeof o=="string")return o;if(typeof o=="function"){let h=o(f);if(h){let l=this.loadFile(h);if(!l)throw new Error("Unable to load previous source map: "+h.toString());return l}}else{if(o instanceof r)return n.fromSourceMap(o).toString();if(o instanceof n)return o.toString();if(this.isMap(o))return JSON.stringify(o);throw new Error("Unsupported previous source map format: "+o.toString())}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let h=this.annotation;return f&&(h=s(i(f),h)),this.loadFile(h)}}}startWith(f,o){return f?f.substr(0,o.length)===o:!1}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}}return ci=c,c.default=c,ci}var di,Wl;function vs(){if(Wl)return di;Wl=1;let{nanoid:e}=Xh(),{isAbsolute:a,resolve:i}=dt,{SourceMapConsumer:s,SourceMapGenerator:r}=dt,{fileURLToPath:n,pathToFileURL:u}=dt,c=Ji(),d=dd(),f=dt,o=Symbol("lineToIndexCache"),h=!!(s&&r),l=!!(i&&a);function p(w){if(w[o])return w[o];let b=w.css.split(`
|
|
1074
|
-
`),g=new Array(b.length),v=0;for(let _=0,N=b.length;_<N;_++)g[_]=v,v+=b[_].length+1;return w[o]=g,g}class x{get from(){return this.file||this.id}constructor(b,g={}){if(b===null||typeof b>"u"||typeof b=="object"&&!b.toString)throw new Error(`PostCSS received ${b} instead of CSS string`);if(this.css=b.toString(),this.css[0]==="\uFEFF"||this.css[0]===""?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,this.document=this.css,g.document&&(this.document=g.document.toString()),g.from&&(!l||/^\w+:\/\//.test(g.from)||
|
|
1075
|
-
`," "];return e.split(
|
|
1065
|
+
`,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function r(s){return s[0].toUpperCase()+s.slice(1)}class i{constructor(a){this.builder=a}atrule(a,n){let u="@"+a.name,c=a.params?this.rawValue(a,"params"):"";if(typeof a.raws.afterName<"u"?u+=a.raws.afterName:c&&(u+=" "),a.nodes)this.block(a,u+c);else{let d=(a.raws.between||"")+(n?";":"");this.builder(u+c+d,a)}}beforeAfter(a,n){let u;a.type==="decl"?u=this.raw(a,null,"beforeDecl"):a.type==="comment"?u=this.raw(a,null,"beforeComment"):n==="before"?u=this.raw(a,null,"beforeRule"):u=this.raw(a,null,"beforeClose");let c=a.parent,d=0;for(;c&&c.type!=="root";)d+=1,c=c.parent;if(u.includes(`
|
|
1066
|
+
`)){let f=this.raw(a,null,"indent");if(f.length)for(let o=0;o<d;o++)u+=f}return u}block(a,n){let u=this.raw(a,"between","beforeOpen");this.builder(n+u+"{",a,"start");let c;a.nodes&&a.nodes.length?(this.body(a),c=this.raw(a,"after")):c=this.raw(a,"after","emptyBody"),c&&this.builder(c),this.builder("}",a,"end")}body(a){let n=a.nodes.length-1;for(;n>0&&a.nodes[n].type==="comment";)n-=1;let u=this.raw(a,"semicolon");for(let c=0;c<a.nodes.length;c++){let d=a.nodes[c],f=this.raw(d,"before");f&&this.builder(f),this.stringify(d,n!==c||u)}}comment(a){let n=this.raw(a,"left","commentLeft"),u=this.raw(a,"right","commentRight");this.builder("/*"+n+a.text+u+"*/",a)}decl(a,n){let u=this.raw(a,"between","colon"),c=a.prop+u+this.rawValue(a,"value");a.important&&(c+=a.raws.important||" !important"),n&&(c+=";"),this.builder(c,a)}document(a){this.body(a)}raw(a,n,u){let c;if(u||(u=n),n&&(c=a.raws[n],typeof c<"u"))return c;let d=a.parent;if(u==="before"&&(!d||d.type==="root"&&d.first===a||d&&d.type==="document"))return"";if(!d)return e[u];let f=a.root();if(f.rawCache||(f.rawCache={}),typeof f.rawCache[u]<"u")return f.rawCache[u];if(u==="before"||u==="after")return this.beforeAfter(a,u);{let o="raw"+r(u);this[o]?c=this[o](f,a):f.walk(h=>{if(c=h.raws[n],typeof c<"u")return!1})}return typeof c>"u"&&(c=e[u]),f.rawCache[u]=c,c}rawBeforeClose(a){let n;return a.walk(u=>{if(u.nodes&&u.nodes.length>0&&typeof u.raws.after<"u")return n=u.raws.after,n.includes(`
|
|
1067
|
+
`)&&(n=n.replace(/[^\n]+$/,"")),!1}),n&&(n=n.replace(/\S/g,"")),n}rawBeforeComment(a,n){let u;return a.walkComments(c=>{if(typeof c.raws.before<"u")return u=c.raws.before,u.includes(`
|
|
1068
|
+
`)&&(u=u.replace(/[^\n]+$/,"")),!1}),typeof u>"u"?u=this.raw(n,null,"beforeDecl"):u&&(u=u.replace(/\S/g,"")),u}rawBeforeDecl(a,n){let u;return a.walkDecls(c=>{if(typeof c.raws.before<"u")return u=c.raws.before,u.includes(`
|
|
1069
|
+
`)&&(u=u.replace(/[^\n]+$/,"")),!1}),typeof u>"u"?u=this.raw(n,null,"beforeRule"):u&&(u=u.replace(/\S/g,"")),u}rawBeforeOpen(a){let n;return a.walk(u=>{if(u.type!=="decl"&&(n=u.raws.between,typeof n<"u"))return!1}),n}rawBeforeRule(a){let n;return a.walk(u=>{if(u.nodes&&(u.parent!==a||a.first!==u)&&typeof u.raws.before<"u")return n=u.raws.before,n.includes(`
|
|
1070
|
+
`)&&(n=n.replace(/[^\n]+$/,"")),!1}),n&&(n=n.replace(/\S/g,"")),n}rawColon(a){let n;return a.walkDecls(u=>{if(typeof u.raws.between<"u")return n=u.raws.between.replace(/[^\s:]/g,""),!1}),n}rawEmptyBody(a){let n;return a.walk(u=>{if(u.nodes&&u.nodes.length===0&&(n=u.raws.after,typeof n<"u"))return!1}),n}rawIndent(a){if(a.raws.indent)return a.raws.indent;let n;return a.walk(u=>{let c=u.parent;if(c&&c!==a&&c.parent&&c.parent===a&&typeof u.raws.before<"u"){let d=u.raws.before.split(`
|
|
1071
|
+
`);return n=d[d.length-1],n=n.replace(/\S/g,""),!1}}),n}rawSemicolon(a){let n;return a.walk(u=>{if(u.nodes&&u.nodes.length&&u.last.type==="decl"&&(n=u.raws.semicolon,typeof n<"u"))return!1}),n}rawValue(a,n){let u=a[n],c=a.raws[n];return c&&c.value===u?c.raw:u}root(a){this.body(a),a.raws.after&&this.builder(a.raws.after)}rule(a){this.block(a,this.rawValue(a,"selector")),a.raws.ownSemicolon&&this.builder(a.raws.ownSemicolon,a,"end")}stringify(a,n){if(!this[a.type])throw new Error("Unknown AST node type "+a.type+". Maybe you need to change PostCSS stringifier.");this[a.type](a,n)}}return ri=i,i.default=i,ri}var ai,Fl;function bs(){if(Fl)return ai;Fl=1;let e=hd();function r(i,s){new e(s).stringify(i)}return ai=r,r.default=r,ai}var Wn={},ql;function Zi(){return ql||(ql=1,Wn.isClean=Symbol("isClean"),Wn.my=Symbol("my")),Wn}var ni,Bl;function xs(){if(Bl)return ni;Bl=1;let e=Yi(),r=hd(),i=bs(),{isClean:s,my:a}=Zi();function n(d,f){let o=new d.constructor;for(let h in d){if(!Object.prototype.hasOwnProperty.call(d,h)||h==="proxyCache")continue;let l=d[h],p=typeof l;h==="parent"&&p==="object"?f&&(o[h]=f):h==="source"?o[h]=l:Array.isArray(l)?o[h]=l.map(x=>n(x,o)):(p==="object"&&l!==null&&(l=n(l)),o[h]=l)}return o}function u(d,f){if(f&&typeof f.offset<"u")return f.offset;let o=1,h=1,l=0;for(let p=0;p<d.length;p++){if(h===f.line&&o===f.column){l=p;break}d[p]===`
|
|
1072
|
+
`?(o=1,h+=1):o+=1}return l}class c{get proxyOf(){return this}constructor(f={}){this.raws={},this[s]=!1,this[a]=!0;for(let o in f)if(o==="nodes"){this.nodes=[];for(let h of f[o])typeof h.clone=="function"?this.append(h.clone()):this.append(h)}else this[o]=f[o]}addToError(f){if(f.postcssNode=this,f.stack&&this.source&&/\n\s{4}at /.test(f.stack)){let o=this.source;f.stack=f.stack.replace(/\n\s{4}at /,`$&${o.input.from}:${o.start.line}:${o.start.column}$&`)}return f}after(f){return this.parent.insertAfter(this,f),this}assign(f={}){for(let o in f)this[o]=f[o];return this}before(f){return this.parent.insertBefore(this,f),this}cleanRaws(f){delete this.raws.before,delete this.raws.after,f||delete this.raws.between}clone(f={}){let o=n(this);for(let h in f)o[h]=f[h];return o}cloneAfter(f={}){let o=this.clone(f);return this.parent.insertAfter(this,o),o}cloneBefore(f={}){let o=this.clone(f);return this.parent.insertBefore(this,o),o}error(f,o={}){if(this.source){let{end:h,start:l}=this.rangeBy(o);return this.source.input.error(f,{column:l.column,line:l.line},{column:h.column,line:h.line},o)}return new e(f)}getProxyProcessor(){return{get(f,o){return o==="proxyOf"?f:o==="root"?()=>f.root().toProxy():f[o]},set(f,o,h){return f[o]===h||(f[o]=h,(o==="prop"||o==="value"||o==="name"||o==="params"||o==="important"||o==="text")&&f.markDirty()),!0}}}markClean(){this[s]=!0}markDirty(){if(this[s]){this[s]=!1;let f=this;for(;f=f.parent;)f[s]=!1}}next(){if(!this.parent)return;let f=this.parent.index(this);return this.parent.nodes[f+1]}positionBy(f={}){let o=this.source.start;if(f.index)o=this.positionInside(f.index);else if(f.word){let h="document"in this.source.input?this.source.input.document:this.source.input.css,p=h.slice(u(h,this.source.start),u(h,this.source.end)).indexOf(f.word);p!==-1&&(o=this.positionInside(p))}return o}positionInside(f){let o=this.source.start.column,h=this.source.start.line,l="document"in this.source.input?this.source.input.document:this.source.input.css,p=u(l,this.source.start),x=p+f;for(let w=p;w<x;w++)l[w]===`
|
|
1073
|
+
`?(o=1,h+=1):o+=1;return{column:o,line:h,offset:x}}prev(){if(!this.parent)return;let f=this.parent.index(this);return this.parent.nodes[f-1]}rangeBy(f={}){let o="document"in this.source.input?this.source.input.document:this.source.input.css,h={column:this.source.start.column,line:this.source.start.line,offset:u(o,this.source.start)},l=this.source.end?{column:this.source.end.column+1,line:this.source.end.line,offset:typeof this.source.end.offset=="number"?this.source.end.offset:u(o,this.source.end)+1}:{column:h.column+1,line:h.line,offset:h.offset+1};if(f.word){let x=o.slice(u(o,this.source.start),u(o,this.source.end)).indexOf(f.word);x!==-1&&(h=this.positionInside(x),l=this.positionInside(x+f.word.length))}else f.start?h={column:f.start.column,line:f.start.line,offset:u(o,f.start)}:f.index&&(h=this.positionInside(f.index)),f.end?l={column:f.end.column,line:f.end.line,offset:u(o,f.end)}:typeof f.endIndex=="number"?l=this.positionInside(f.endIndex):f.index&&(l=this.positionInside(f.index+1));return(l.line<h.line||l.line===h.line&&l.column<=h.column)&&(l={column:h.column+1,line:h.line,offset:h.offset+1}),{end:l,start:h}}raw(f,o){return new r().raw(this,f,o)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...f){if(this.parent){let o=this,h=!1;for(let l of f)l===this?h=!0:h?(this.parent.insertAfter(o,l),o=l):this.parent.insertBefore(o,l);h||this.remove()}return this}root(){let f=this;for(;f.parent&&f.parent.type!=="document";)f=f.parent;return f}toJSON(f,o){let h={},l=o==null;o=o||new Map;let p=0;for(let x in this){if(!Object.prototype.hasOwnProperty.call(this,x)||x==="parent"||x==="proxyCache")continue;let w=this[x];if(Array.isArray(w))h[x]=w.map(b=>typeof b=="object"&&b.toJSON?b.toJSON(null,o):b);else if(typeof w=="object"&&w.toJSON)h[x]=w.toJSON(null,o);else if(x==="source"){if(w==null)continue;let b=o.get(w.input);b==null&&(b=p,o.set(w.input,p),p++),h[x]={end:w.end,inputId:b,start:w.start}}else h[x]=w}return l&&(h.inputs=[...o.keys()].map(x=>x.toJSON())),h}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(f=i){f.stringify&&(f=f.stringify);let o="";return f(this,h=>{o+=h}),o}warn(f,o,h={}){let l={node:this};for(let p in h)l[p]=h[p];return f.warn(o,l)}}return ni=c,c.default=c,ni}var si,Vl;function ys(){if(Vl)return si;Vl=1;let e=xs();class r extends e{constructor(s){super(s),this.type="comment"}}return si=r,r.default=r,si}var ii,Ul;function vs(){if(Ul)return ii;Ul=1;let e=xs();class r extends e{get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}constructor(s){s&&typeof s.value<"u"&&typeof s.value!="string"&&(s={...s,value:String(s.value)}),super(s),this.type="decl"}}return ii=r,r.default=r,ii}var oi,zl;function Wr(){if(zl)return oi;zl=1;let e=ys(),r=vs(),i=xs(),{isClean:s,my:a}=Zi(),n,u,c,d;function f(l){return l.map(p=>(p.nodes&&(p.nodes=f(p.nodes)),delete p.source,p))}function o(l){if(l[s]=!1,l.proxyOf.nodes)for(let p of l.proxyOf.nodes)o(p)}class h extends i{get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}append(...p){for(let x of p){let w=this.normalize(x,this.last);for(let b of w)this.proxyOf.nodes.push(b)}return this.markDirty(),this}cleanRaws(p){if(super.cleanRaws(p),this.nodes)for(let x of this.nodes)x.cleanRaws(p)}each(p){if(!this.proxyOf.nodes)return;let x=this.getIterator(),w,b;for(;this.indexes[x]<this.proxyOf.nodes.length&&(w=this.indexes[x],b=p(this.proxyOf.nodes[w],w),b!==!1);)this.indexes[x]+=1;return delete this.indexes[x],b}every(p){return this.nodes.every(p)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let p=this.lastEach;return this.indexes[p]=0,p}getProxyProcessor(){return{get(p,x){return x==="proxyOf"?p:p[x]?x==="each"||typeof x=="string"&&x.startsWith("walk")?(...w)=>p[x](...w.map(b=>typeof b=="function"?(g,v)=>b(g.toProxy(),v):b)):x==="every"||x==="some"?w=>p[x]((b,...g)=>w(b.toProxy(),...g)):x==="root"?()=>p.root().toProxy():x==="nodes"?p.nodes.map(w=>w.toProxy()):x==="first"||x==="last"?p[x].toProxy():p[x]:p[x]},set(p,x,w){return p[x]===w||(p[x]=w,(x==="name"||x==="params"||x==="selector")&&p.markDirty()),!0}}}index(p){return typeof p=="number"?p:(p.proxyOf&&(p=p.proxyOf),this.proxyOf.nodes.indexOf(p))}insertAfter(p,x){let w=this.index(p),b=this.normalize(x,this.proxyOf.nodes[w]).reverse();w=this.index(p);for(let v of b)this.proxyOf.nodes.splice(w+1,0,v);let g;for(let v in this.indexes)g=this.indexes[v],w<g&&(this.indexes[v]=g+b.length);return this.markDirty(),this}insertBefore(p,x){let w=this.index(p),b=w===0?"prepend":!1,g=this.normalize(x,this.proxyOf.nodes[w],b).reverse();w=this.index(p);for(let _ of g)this.proxyOf.nodes.splice(w,0,_);let v;for(let _ in this.indexes)v=this.indexes[_],w<=v&&(this.indexes[_]=v+g.length);return this.markDirty(),this}normalize(p,x){if(typeof p=="string")p=f(u(p).nodes);else if(typeof p>"u")p=[];else if(Array.isArray(p)){p=p.slice(0);for(let b of p)b.parent&&b.parent.removeChild(b,"ignore")}else if(p.type==="root"&&this.type!=="document"){p=p.nodes.slice(0);for(let b of p)b.parent&&b.parent.removeChild(b,"ignore")}else if(p.type)p=[p];else if(p.prop){if(typeof p.value>"u")throw new Error("Value field is missed in node creation");typeof p.value!="string"&&(p.value=String(p.value)),p=[new r(p)]}else if(p.selector||p.selectors)p=[new d(p)];else if(p.name)p=[new n(p)];else if(p.text)p=[new e(p)];else throw new Error("Unknown node type in node creation");return p.map(b=>(b[a]||h.rebuild(b),b=b.proxyOf,b.parent&&b.parent.removeChild(b),b[s]&&o(b),b.raws||(b.raws={}),typeof b.raws.before>"u"&&x&&typeof x.raws.before<"u"&&(b.raws.before=x.raws.before.replace(/\S/g,"")),b.parent=this.proxyOf,b))}prepend(...p){p=p.reverse();for(let x of p){let w=this.normalize(x,this.first,"prepend").reverse();for(let b of w)this.proxyOf.nodes.unshift(b);for(let b in this.indexes)this.indexes[b]=this.indexes[b]+w.length}return this.markDirty(),this}push(p){return p.parent=this,this.proxyOf.nodes.push(p),this}removeAll(){for(let p of this.proxyOf.nodes)p.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(p){p=this.index(p),this.proxyOf.nodes[p].parent=void 0,this.proxyOf.nodes.splice(p,1);let x;for(let w in this.indexes)x=this.indexes[w],x>=p&&(this.indexes[w]=x-1);return this.markDirty(),this}replaceValues(p,x,w){return w||(w=x,x={}),this.walkDecls(b=>{x.props&&!x.props.includes(b.prop)||x.fast&&!b.value.includes(x.fast)||(b.value=b.value.replace(p,w))}),this.markDirty(),this}some(p){return this.nodes.some(p)}walk(p){return this.each((x,w)=>{let b;try{b=p(x,w)}catch(g){throw x.addToError(g)}return b!==!1&&x.walk&&(b=x.walk(p)),b})}walkAtRules(p,x){return x?p instanceof RegExp?this.walk((w,b)=>{if(w.type==="atrule"&&p.test(w.name))return x(w,b)}):this.walk((w,b)=>{if(w.type==="atrule"&&w.name===p)return x(w,b)}):(x=p,this.walk((w,b)=>{if(w.type==="atrule")return x(w,b)}))}walkComments(p){return this.walk((x,w)=>{if(x.type==="comment")return p(x,w)})}walkDecls(p,x){return x?p instanceof RegExp?this.walk((w,b)=>{if(w.type==="decl"&&p.test(w.prop))return x(w,b)}):this.walk((w,b)=>{if(w.type==="decl"&&w.prop===p)return x(w,b)}):(x=p,this.walk((w,b)=>{if(w.type==="decl")return x(w,b)}))}walkRules(p,x){return x?p instanceof RegExp?this.walk((w,b)=>{if(w.type==="rule"&&p.test(w.selector))return x(w,b)}):this.walk((w,b)=>{if(w.type==="rule"&&w.selector===p)return x(w,b)}):(x=p,this.walk((w,b)=>{if(w.type==="rule")return x(w,b)}))}}return h.registerParse=l=>{u=l},h.registerRule=l=>{d=l},h.registerAtRule=l=>{n=l},h.registerRoot=l=>{c=l},oi=h,h.default=h,h.rebuild=l=>{l.type==="atrule"?Object.setPrototypeOf(l,n.prototype):l.type==="rule"?Object.setPrototypeOf(l,d.prototype):l.type==="decl"?Object.setPrototypeOf(l,r.prototype):l.type==="comment"?Object.setPrototypeOf(l,e.prototype):l.type==="root"&&Object.setPrototypeOf(l,c.prototype),l[a]=!0,l.nodes&&l.nodes.forEach(p=>{h.rebuild(p)})},oi}var ui,Hl;function Xi(){if(Hl)return ui;Hl=1;let e=Wr();class r extends e{constructor(s){super(s),this.type="atrule"}append(...s){return this.proxyOf.nodes||(this.nodes=[]),super.append(...s)}prepend(...s){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...s)}}return ui=r,r.default=r,e.registerAtRule(r),ui}var li,Wl;function Ki(){if(Wl)return li;Wl=1;let e=Wr(),r,i;class s extends e{constructor(n){super({type:"document",...n}),this.nodes||(this.nodes=[])}toResult(n={}){return new r(new i,this,n).stringify()}}return s.registerLazyResult=a=>{r=a},s.registerProcessor=a=>{i=a},li=s,s.default=s,li}var ci,Gl;function Xh(){if(Gl)return ci;Gl=1;let e="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";return ci={nanoid:(s=21)=>{let a="",n=s|0;for(;n--;)a+=e[Math.random()*64|0];return a},customAlphabet:(s,a=21)=>(n=a)=>{let u="",c=n|0;for(;c--;)u+=s[Math.random()*s.length|0];return u}},ci}var di,Jl;function pd(){if(Jl)return di;Jl=1;let{existsSync:e,readFileSync:r}=dt,{dirname:i,join:s}=dt,{SourceMapConsumer:a,SourceMapGenerator:n}=dt;function u(d){return Buffer?Buffer.from(d,"base64").toString():window.atob(d)}class c{constructor(f,o){if(o.map===!1)return;this.loadAnnotation(f),this.inline=this.startWith(this.annotation,"data:");let h=o.map?o.map.prev:void 0,l=this.loadMap(o.from,h);!this.mapFile&&o.from&&(this.mapFile=o.from),this.mapFile&&(this.root=i(this.mapFile)),l&&(this.text=l)}consumer(){return this.consumerCache||(this.consumerCache=new a(this.text)),this.consumerCache}decodeInline(f){let o=/^data:application\/json;charset=utf-?8;base64,/,h=/^data:application\/json;base64,/,l=/^data:application\/json;charset=utf-?8,/,p=/^data:application\/json,/,x=f.match(l)||f.match(p);if(x)return decodeURIComponent(f.substr(x[0].length));let w=f.match(o)||f.match(h);if(w)return u(f.substr(w[0].length));let b=f.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+b)}getAnnotationURL(f){return f.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(f){return typeof f!="object"?!1:typeof f.mappings=="string"||typeof f._mappings=="string"||Array.isArray(f.sections)}loadAnnotation(f){let o=f.match(/\/\*\s*# sourceMappingURL=/g);if(!o)return;let h=f.lastIndexOf(o.pop()),l=f.indexOf("*/",h);h>-1&&l>-1&&(this.annotation=this.getAnnotationURL(f.substring(h,l)))}loadFile(f){if(this.root=i(f),e(f))return this.mapFile=f,r(f,"utf-8").toString().trim()}loadMap(f,o){if(o===!1)return!1;if(o){if(typeof o=="string")return o;if(typeof o=="function"){let h=o(f);if(h){let l=this.loadFile(h);if(!l)throw new Error("Unable to load previous source map: "+h.toString());return l}}else{if(o instanceof a)return n.fromSourceMap(o).toString();if(o instanceof n)return o.toString();if(this.isMap(o))return JSON.stringify(o);throw new Error("Unsupported previous source map format: "+o.toString())}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let h=this.annotation;return f&&(h=s(i(f),h)),this.loadFile(h)}}}startWith(f,o){return f?f.substr(0,o.length)===o:!1}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}}return di=c,c.default=c,di}var fi,Yl;function ws(){if(Yl)return fi;Yl=1;let{nanoid:e}=Xh(),{isAbsolute:r,resolve:i}=dt,{SourceMapConsumer:s,SourceMapGenerator:a}=dt,{fileURLToPath:n,pathToFileURL:u}=dt,c=Yi(),d=pd(),f=dt,o=Symbol("lineToIndexCache"),h=!!(s&&a),l=!!(i&&r);function p(w){if(w[o])return w[o];let b=w.css.split(`
|
|
1074
|
+
`),g=new Array(b.length),v=0;for(let _=0,N=b.length;_<N;_++)g[_]=v,v+=b[_].length+1;return w[o]=g,g}class x{get from(){return this.file||this.id}constructor(b,g={}){if(b===null||typeof b>"u"||typeof b=="object"&&!b.toString)throw new Error(`PostCSS received ${b} instead of CSS string`);if(this.css=b.toString(),this.css[0]==="\uFEFF"||this.css[0]===""?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,this.document=this.css,g.document&&(this.document=g.document.toString()),g.from&&(!l||/^\w+:\/\//.test(g.from)||r(g.from)?this.file=g.from:this.file=i(g.from)),l&&h){let v=new d(this.css,g);if(v.text){this.map=v;let _=v.consumer().file;!this.file&&_&&(this.file=this.mapResolve(_))}}this.file||(this.id="<input css "+e(6)+">"),this.map&&(this.map.file=this.from)}error(b,g,v,_={}){let N,y,m,k,j;if(g&&typeof g=="object"){let D=g,C=v;if(typeof D.offset=="number"){k=D.offset;let P=this.fromOffset(k);g=P.line,v=P.col}else g=D.line,v=D.column,k=this.fromLineAndColumn(g,v);if(typeof C.offset=="number"){m=C.offset;let P=this.fromOffset(m);y=P.line,N=P.col}else y=C.line,N=C.column,m=this.fromLineAndColumn(C.line,C.column)}else if(v)k=this.fromLineAndColumn(g,v);else{k=g;let D=this.fromOffset(k);g=D.line,v=D.col}let E=this.origin(g,v,y,N);return E?j=new c(b,E.endLine===void 0?E.line:{column:E.column,line:E.line},E.endLine===void 0?E.column:{column:E.endColumn,line:E.endLine},E.source,E.file,_.plugin):j=new c(b,y===void 0?g:{column:v,line:g},y===void 0?v:{column:N,line:y},this.css,this.file,_.plugin),j.input={column:v,endColumn:N,endLine:y,endOffset:m,line:g,offset:k,source:this.css},this.file&&(u&&(j.input.url=u(this.file).toString()),j.input.file=this.file),j}fromLineAndColumn(b,g){return p(this)[b-1]+g-1}fromOffset(b){let g=p(this),v=g[g.length-1],_=0;if(b>=v)_=g.length-1;else{let N=g.length-2,y;for(;_<N;)if(y=_+(N-_>>1),b<g[y])N=y-1;else if(b>=g[y+1])_=y+1;else{_=y;break}}return{col:b-g[_]+1,line:_+1}}mapResolve(b){return/^\w+:\/\//.test(b)?b:i(this.map.consumer().sourceRoot||this.map.root||".",b)}origin(b,g,v,_){if(!this.map)return!1;let N=this.map.consumer(),y=N.originalPositionFor({column:g,line:b});if(!y.source)return!1;let m;typeof v=="number"&&(m=N.originalPositionFor({column:_,line:v}));let k;r(y.source)?k=u(y.source):k=new URL(y.source,this.map.consumer().sourceRoot||u(this.map.mapFile));let j={column:y.column,endColumn:m&&m.column,endLine:m&&m.line,line:y.line,url:k.toString()};if(k.protocol==="file:")if(n)j.file=n(k);else throw new Error("file: protocol is not available in this PostCSS build");let E=N.sourceContentFor(y.source);return E&&(j.source=E),j}toJSON(){let b={};for(let g of["hasBOM","css","file","id"])this[g]!=null&&(b[g]=this[g]);return this.map&&(b.map={...this.map},b.map.consumerCache&&(b.map.consumerCache=void 0)),b}}return fi=x,x.default=x,f&&f.registerInput&&f.registerInput(x),fi}var hi,Zl;function sn(){if(Zl)return hi;Zl=1;let e=Wr(),r,i;class s extends e{constructor(n){super(n),this.type="root",this.nodes||(this.nodes=[])}normalize(n,u,c){let d=super.normalize(n);if(u){if(c==="prepend")this.nodes.length>1?u.raws.before=this.nodes[1].raws.before:delete u.raws.before;else if(this.first!==u)for(let f of d)f.raws.before=u.raws.before}return d}removeChild(n,u){let c=this.index(n);return!u&&c===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[c].raws.before),super.removeChild(n)}toResult(n={}){return new r(new i,this,n).stringify()}}return s.registerLazyResult=a=>{r=a},s.registerProcessor=a=>{i=a},hi=s,s.default=s,e.registerRoot(s),hi}var pi,Xl;function md(){if(Xl)return pi;Xl=1;let e={comma(r){return e.split(r,[","],!0)},space(r){let i=[" ",`
|
|
1075
|
+
`," "];return e.split(r,i)},split(r,i,s){let a=[],n="",u=!1,c=0,d=!1,f="",o=!1;for(let h of r)o?o=!1:h==="\\"?o=!0:d?h===f&&(d=!1):h==='"'||h==="'"?(d=!0,f=h):h==="("?c+=1:h===")"?c>0&&(c-=1):c===0&&i.includes(h)&&(u=!0),u?(n!==""&&a.push(n.trim()),n="",u=!1):n+=h;return(s||n!=="")&&a.push(n.trim()),a}};return pi=e,e.default=e,pi}var mi,Kl;function Qi(){if(Kl)return mi;Kl=1;let e=Wr(),r=md();class i extends e{get selectors(){return r.comma(this.selector)}set selectors(a){let n=this.selector?this.selector.match(/,\s*/):null,u=n?n[0]:","+this.raw("between","beforeOpen");this.selector=a.join(u)}constructor(a){super(a),this.type="rule",this.nodes||(this.nodes=[])}}return mi=i,i.default=i,e.registerRule(i),mi}var gi,Ql;function Kh(){if(Ql)return gi;Ql=1;let e=Xi(),r=ys(),i=vs(),s=ws(),a=pd(),n=sn(),u=Qi();function c(d,f){if(Array.isArray(d))return d.map(l=>c(l));let{inputs:o,...h}=d;if(o){f=[];for(let l of o){let p={...l,__proto__:s.prototype};p.map&&(p.map={...p.map,__proto__:a.prototype}),f.push(p)}}if(h.nodes&&(h.nodes=d.nodes.map(l=>c(l,f))),h.source){let{inputId:l,...p}=h.source;h.source=p,l!=null&&(h.source.input=f[l])}if(h.type==="root")return new n(h);if(h.type==="decl")return new i(h);if(h.type==="rule")return new u(h);if(h.type==="comment")return new r(h);if(h.type==="atrule")return new e(h);throw new Error("Unknown node type: "+d.type)}return gi=c,c.default=c,gi}var bi,ec;function gd(){if(ec)return bi;ec=1;let{dirname:e,relative:r,resolve:i,sep:s}=dt,{SourceMapConsumer:a,SourceMapGenerator:n}=dt,{pathToFileURL:u}=dt,c=ws(),d=!!(a&&n),f=!!(e&&i&&r&&s);class o{constructor(l,p,x,w){this.stringify=l,this.mapOpts=x.map||{},this.root=p,this.opts=x,this.css=w,this.originalCSS=w,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let l;this.isInline()?l="data:application/json;base64,"+this.toBase64(this.map.toString()):typeof this.mapOpts.annotation=="string"?l=this.mapOpts.annotation:typeof this.mapOpts.annotation=="function"?l=this.mapOpts.annotation(this.opts.to,this.root):l=this.outputFile()+".map";let p=`
|
|
1076
1076
|
`;this.css.includes(`\r
|
|
1077
1077
|
`)&&(p=`\r
|
|
1078
|
-
`),this.css+=p+"/*# sourceMappingURL="+l+" */"}applyPrevMaps(){for(let l of this.previous()){let p=this.toUrl(this.path(l.file)),x=l.root||e(l.file),w;this.mapOpts.sourcesContent===!1?(w=new
|
|
1079
|
-
`),p=v.length-b):p+=v.length,_&&N!=="start"){let y=_.parent||{raws:{}};(!(_.type==="decl"||_.type==="atrule"&&!_.nodes)||_!==y.last||y.raws.semicolon)&&(_.source&&_.source.end?(w.source=this.sourcePath(_),w.original.line=_.source.end.line,w.original.column=_.source.end.column-1,w.generated.line=l,w.generated.column=p-2,this.map.addMapping(w)):(w.source=x,w.original.line=1,w.original.column=0,w.generated.line=l,w.generated.column=p-1,this.map.addMapping(w)))}})}isAnnotation(){return this.isInline()?!0:typeof this.mapOpts.annotation<"u"?this.mapOpts.annotation:this.previous().length?this.previous().some(l=>l.annotation):!0}isInline(){if(typeof this.mapOpts.inline<"u")return this.mapOpts.inline;let l=this.mapOpts.annotation;return typeof l<"u"&&l!==!0?!1:this.previous().length?this.previous().some(p=>p.inline):!0}isMap(){return typeof this.opts.map<"u"?!!this.opts.map:this.previous().length>0}isSourcesContent(){return typeof this.mapOpts.sourcesContent<"u"?this.mapOpts.sourcesContent:this.previous().length?this.previous().some(l=>l.withContent()):!0}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(l){if(this.mapOpts.absolute||l.charCodeAt(0)===60||/^\w+:\/\//.test(l))return l;let p=this.memoizedPaths.get(l);if(p)return p;let x=this.opts.to?e(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(x=e(i(x,this.mapOpts.annotation)));let w=a(x,l);return this.memoizedPaths.set(l,w),w}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(l=>{if(l.source&&l.source.input.map){let p=l.source.input.map;this.previousMaps.includes(p)||this.previousMaps.push(p)}});else{let l=new c(this.originalCSS,this.opts);l.map&&this.previousMaps.push(l.map)}return this.previousMaps}setSourcesContent(){let l={};if(this.root)this.root.walk(p=>{if(p.source){let x=p.source.input.from;if(x&&!l[x]){l[x]=!0;let w=this.usesFileUrls?this.toFileUrl(x):this.toUrl(this.path(x));this.map.setSourceContent(w,p.source.input.css)}}});else if(this.css){let p=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(p,this.css)}}sourcePath(l){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(l.source.input.from):this.toUrl(this.path(l.source.input.from))}toBase64(l){return Buffer?Buffer.from(l).toString("base64"):window.btoa(unescape(encodeURIComponent(l)))}toFileUrl(l){let p=this.memoizedFileURLs.get(l);if(p)return p;if(u){let x=u(l).toString();return this.memoizedFileURLs.set(l,x),x}else throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(l){let p=this.memoizedURLs.get(l);if(p)return p;s==="\\"&&(l=l.replace(/\\/g,"/"));let x=encodeURI(l).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(l,x),x}}return gi=o,gi}var bi,Kl;function Qh(){if(Kl)return bi;Kl=1;const e=39,a=34,i=92,s=47,r=10,n=32,u=12,c=9,d=13,f=91,o=93,h=40,l=41,p=123,x=125,w=59,b=42,g=58,v=64,_=/[\t\n\f\r "#'()/;[\\\]{}]/g,N=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,y=/.[\r\n"'(/\\]/,m=/[\da-f]/i;return bi=function(j,A={}){let D=j.css.valueOf(),C=A.ignoreErrors,O,L,H,F,B,$,G,X,ee,R,se=D.length,I=0,V=[],J=[];function oe(){return I}function K(Z){throw j.error("Unclosed "+Z,I)}function te(){return J.length===0&&I>=se}function pe(Z){if(J.length)return J.pop();if(I>=se)return;let ae=Z?Z.ignoreUnclosed:!1;switch(O=D.charCodeAt(I),O){case r:case n:case c:case d:case u:{F=I;do F+=1,O=D.charCodeAt(F);while(O===n||O===r||O===c||O===d||O===u);$=["space",D.slice(I,F)],I=F-1;break}case f:case o:case p:case x:case g:case w:case l:{let re=String.fromCharCode(O);$=[re,re,I];break}case h:{if(R=V.length?V.pop()[1]:"",ee=D.charCodeAt(I+1),R==="url"&&ee!==e&&ee!==a&&ee!==n&&ee!==r&&ee!==c&&ee!==u&&ee!==d){F=I;do{if(G=!1,F=D.indexOf(")",F+1),F===-1)if(C||ae){F=I;break}else K("bracket");for(X=F;D.charCodeAt(X-1)===i;)X-=1,G=!G}while(G);$=["brackets",D.slice(I,F+1),I,F],I=F}else F=D.indexOf(")",I+1),L=D.slice(I,F+1),F===-1||y.test(L)?$=["(","(",I]:($=["brackets",L,I,F],I=F);break}case e:case a:{B=O===e?"'":'"',F=I;do{if(G=!1,F=D.indexOf(B,F+1),F===-1)if(C||ae){F=I+1;break}else K("string");for(X=F;D.charCodeAt(X-1)===i;)X-=1,G=!G}while(G);$=["string",D.slice(I,F+1),I,F],I=F;break}case v:{_.lastIndex=I+1,_.test(D),_.lastIndex===0?F=D.length-1:F=_.lastIndex-2,$=["at-word",D.slice(I,F+1),I,F],I=F;break}case i:{for(F=I,H=!0;D.charCodeAt(F+1)===i;)F+=1,H=!H;if(O=D.charCodeAt(F+1),H&&O!==s&&O!==n&&O!==r&&O!==c&&O!==d&&O!==u&&(F+=1,m.test(D.charAt(F)))){for(;m.test(D.charAt(F+1));)F+=1;D.charCodeAt(F+1)===n&&(F+=1)}$=["word",D.slice(I,F+1),I,F],I=F;break}default:{O===s&&D.charCodeAt(I+1)===b?(F=D.indexOf("*/",I+2)+1,F===0&&(C||ae?F=D.length:K("comment")),$=["comment",D.slice(I,F+1),I,F],I=F):(N.lastIndex=I+1,N.test(D),N.lastIndex===0?F=D.length-1:F=N.lastIndex-2,$=["word",D.slice(I,F+1),I,F],V.push($),I=F);break}}return I++,$}function Ee(Z){J.push(Z)}return{back:Ee,endOfFile:te,nextToken:pe,position:oe}},bi}var xi,Ql;function ep(){if(Ql)return xi;Ql=1;let e=Zi(),a=xs(),i=ys(),s=sn(),r=Ki(),n=Qh();const u={empty:!0,space:!0};function c(f){for(let o=f.length-1;o>=0;o--){let h=f[o],l=h[3]||h[2];if(l)return l}}class d{constructor(o){this.input=o,this.root=new s,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:o,start:{column:1,line:1,offset:0}}}atrule(o){let h=new e;h.name=o[1].slice(1),h.name===""&&this.unnamedAtrule(h,o),this.init(h,o[2]);let l,p,x,w=!1,b=!1,g=[],v=[];for(;!this.tokenizer.endOfFile();){if(o=this.tokenizer.nextToken(),l=o[0],l==="("||l==="["?v.push(l==="("?")":"]"):l==="{"&&v.length>0?v.push("}"):l===v[v.length-1]&&v.pop(),v.length===0)if(l===";"){h.source.end=this.getPosition(o[2]),h.source.end.offset++,this.semicolon=!0;break}else if(l==="{"){b=!0;break}else if(l==="}"){if(g.length>0){for(x=g.length-1,p=g[x];p&&p[0]==="space";)p=g[--x];p&&(h.source.end=this.getPosition(p[3]||p[2]),h.source.end.offset++)}this.end(o);break}else g.push(o);else g.push(o);if(this.tokenizer.endOfFile()){w=!0;break}}h.raws.between=this.spacesAndCommentsFromEnd(g),g.length?(h.raws.afterName=this.spacesAndCommentsFromStart(g),this.raw(h,"params",g),w&&(o=g[g.length-1],h.source.end=this.getPosition(o[3]||o[2]),h.source.end.offset++,this.spaces=h.raws.between,h.raws.between="")):(h.raws.afterName="",h.params=""),b&&(h.nodes=[],this.current=h)}checkMissedSemicolon(o){let h=this.colon(o);if(h===!1)return;let l=0,p;for(let x=h-1;x>=0&&(p=o[x],!(p[0]!=="space"&&(l+=1,l===2)));x--);throw this.input.error("Missed semicolon",p[0]==="word"?p[3]+1:p[2])}colon(o){let h=0,l,p,x;for(let[w,b]of o.entries()){if(p=b,x=p[0],x==="("&&(h+=1),x===")"&&(h-=1),h===0&&x===":")if(!l)this.doubleColon(p);else{if(l[0]==="word"&&l[1]==="progid")continue;return w}l=p}return!1}comment(o){let h=new a;this.init(h,o[2]),h.source.end=this.getPosition(o[3]||o[2]),h.source.end.offset++;let l=o[1].slice(2,-2);if(/^\s*$/.test(l))h.text="",h.raws.left=l,h.raws.right="";else{let p=l.match(/^(\s*)([^]*\S)(\s*)$/);h.text=p[2],h.raws.left=p[1],h.raws.right=p[3]}}createTokenizer(){this.tokenizer=n(this.input)}decl(o,h){let l=new i;this.init(l,o[0][2]);let p=o[o.length-1];for(p[0]===";"&&(this.semicolon=!0,o.pop()),l.source.end=this.getPosition(p[3]||p[2]||c(o)),l.source.end.offset++;o[0][0]!=="word";)o.length===1&&this.unknownWord(o),l.raws.before+=o.shift()[1];for(l.source.start=this.getPosition(o[0][2]),l.prop="";o.length;){let v=o[0][0];if(v===":"||v==="space"||v==="comment")break;l.prop+=o.shift()[1]}l.raws.between="";let x;for(;o.length;)if(x=o.shift(),x[0]===":"){l.raws.between+=x[1];break}else x[0]==="word"&&/\w/.test(x[1])&&this.unknownWord([x]),l.raws.between+=x[1];(l.prop[0]==="_"||l.prop[0]==="*")&&(l.raws.before+=l.prop[0],l.prop=l.prop.slice(1));let w=[],b;for(;o.length&&(b=o[0][0],!(b!=="space"&&b!=="comment"));)w.push(o.shift());this.precheckMissedSemicolon(o);for(let v=o.length-1;v>=0;v--){if(x=o[v],x[1].toLowerCase()==="!important"){l.important=!0;let _=this.stringFrom(o,v);_=this.spacesFromEnd(o)+_,_!==" !important"&&(l.raws.important=_);break}else if(x[1].toLowerCase()==="important"){let _=o.slice(0),N="";for(let y=v;y>0;y--){let m=_[y][0];if(N.trim().startsWith("!")&&m!=="space")break;N=_.pop()[1]+N}N.trim().startsWith("!")&&(l.important=!0,l.raws.important=N,o=_)}if(x[0]!=="space"&&x[0]!=="comment")break}o.some(v=>v[0]!=="space"&&v[0]!=="comment")&&(l.raws.between+=w.map(v=>v[1]).join(""),w=[]),this.raw(l,"value",w.concat(o),h),l.value.includes(":")&&!h&&this.checkMissedSemicolon(o)}doubleColon(o){throw this.input.error("Double colon",{offset:o[2]},{offset:o[2]+o[1].length})}emptyRule(o){let h=new r;this.init(h,o[2]),h.selector="",h.raws.between="",this.current=h}end(o){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(o[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(o)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(o){if(this.spaces+=o[1],this.current.nodes){let h=this.current.nodes[this.current.nodes.length-1];h&&h.type==="rule"&&!h.raws.ownSemicolon&&(h.raws.ownSemicolon=this.spaces,this.spaces="",h.source.end=this.getPosition(o[2]),h.source.end.offset+=h.raws.ownSemicolon.length)}}getPosition(o){let h=this.input.fromOffset(o);return{column:h.col,line:h.line,offset:o}}init(o,h){this.current.push(o),o.source={input:this.input,start:this.getPosition(h)},o.raws.before=this.spaces,this.spaces="",o.type!=="comment"&&(this.semicolon=!1)}other(o){let h=!1,l=null,p=!1,x=null,w=[],b=o[1].startsWith("--"),g=[],v=o;for(;v;){if(l=v[0],g.push(v),l==="("||l==="[")x||(x=v),w.push(l==="("?")":"]");else if(b&&p&&l==="{")x||(x=v),w.push("}");else if(w.length===0)if(l===";")if(p){this.decl(g,b);return}else break;else if(l==="{"){this.rule(g);return}else if(l==="}"){this.tokenizer.back(g.pop()),h=!0;break}else l===":"&&(p=!0);else l===w[w.length-1]&&(w.pop(),w.length===0&&(x=null));v=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(h=!0),w.length>0&&this.unclosedBracket(x),h&&p){if(!b)for(;g.length&&(v=g[g.length-1][0],!(v!=="space"&&v!=="comment"));)this.tokenizer.back(g.pop());this.decl(g,b)}else this.unknownWord(g)}parse(){let o;for(;!this.tokenizer.endOfFile();)switch(o=this.tokenizer.nextToken(),o[0]){case"space":this.spaces+=o[1];break;case";":this.freeSemicolon(o);break;case"}":this.end(o);break;case"comment":this.comment(o);break;case"at-word":this.atrule(o);break;case"{":this.emptyRule(o);break;default:this.other(o);break}this.endFile()}precheckMissedSemicolon(){}raw(o,h,l,p){let x,w,b=l.length,g="",v=!0,_,N;for(let y=0;y<b;y+=1)x=l[y],w=x[0],w==="space"&&y===b-1&&!p?v=!1:w==="comment"?(N=l[y-1]?l[y-1][0]:"empty",_=l[y+1]?l[y+1][0]:"empty",!u[N]&&!u[_]?g.slice(-1)===","?v=!1:g+=x[1]:v=!1):g+=x[1];if(!v){let y=l.reduce((m,k)=>m+k[1],"");o.raws[h]={raw:y,value:g}}o[h]=g}rule(o){o.pop();let h=new r;this.init(h,o[0][2]),h.raws.between=this.spacesAndCommentsFromEnd(o),this.raw(h,"selector",o),this.current=h}spacesAndCommentsFromEnd(o){let h,l="";for(;o.length&&(h=o[o.length-1][0],!(h!=="space"&&h!=="comment"));)l=o.pop()[1]+l;return l}spacesAndCommentsFromStart(o){let h,l="";for(;o.length&&(h=o[0][0],!(h!=="space"&&h!=="comment"));)l+=o.shift()[1];return l}spacesFromEnd(o){let h,l="";for(;o.length&&(h=o[o.length-1][0],h==="space");)l=o.pop()[1]+l;return l}stringFrom(o,h){let l="";for(let p=h;p<o.length;p++)l+=o[p][1];return o.splice(h,o.length-h),l}unclosedBlock(){let o=this.current.source.start;throw this.input.error("Unclosed block",o.line,o.column)}unclosedBracket(o){throw this.input.error("Unclosed bracket",{offset:o[2]},{offset:o[2]+1})}unexpectedClose(o){throw this.input.error("Unexpected }",{offset:o[2]},{offset:o[2]+1})}unknownWord(o){throw this.input.error("Unknown word "+o[0][1],{offset:o[0][2]},{offset:o[0][2]+o[0][1].length})}unnamedAtrule(o,h){throw this.input.error("At-rule without name",{offset:h[2]},{offset:h[2]+h[1].length})}}return xi=d,xi}var yi,ec;function Qi(){if(ec)return yi;ec=1;let e=Wr(),a=vs(),i=ep();function s(r,n){let u=new a(r,n),c=new i(u);try{c.parse()}catch(d){throw process.env.NODE_ENV!=="production"&&d.name==="CssSyntaxError"&&n&&n.from&&(/\.scss$/i.test(n.from)?d.message+=`
|
|
1078
|
+
`),this.css+=p+"/*# sourceMappingURL="+l+" */"}applyPrevMaps(){for(let l of this.previous()){let p=this.toUrl(this.path(l.file)),x=l.root||e(l.file),w;this.mapOpts.sourcesContent===!1?(w=new a(l.text),w.sourcesContent&&(w.sourcesContent=null)):w=l.consumer(),this.map.applySourceMap(w,p,this.toUrl(this.path(x)))}}clearAnnotation(){if(this.mapOpts.annotation!==!1)if(this.root){let l;for(let p=this.root.nodes.length-1;p>=0;p--)l=this.root.nodes[p],l.type==="comment"&&l.text.startsWith("# sourceMappingURL=")&&this.root.removeChild(p)}else this.css&&(this.css=this.css.replace(/\n*\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),f&&d&&this.isMap())return this.generateMap();{let l="";return this.stringify(this.root,p=>{l+=p}),[l]}}generateMap(){if(this.root)this.generateString();else if(this.previous().length===1){let l=this.previous()[0].consumer();l.file=this.outputFile(),this.map=n.fromSourceMap(l,{ignoreInvalidMapping:!0})}else this.map=new n({file:this.outputFile(),ignoreInvalidMapping:!0}),this.map.addMapping({generated:{column:0,line:1},original:{column:0,line:1},source:this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>"});return this.isSourcesContent()&&this.setSourcesContent(),this.root&&this.previous().length>0&&this.applyPrevMaps(),this.isAnnotation()&&this.addAnnotation(),this.isInline()?[this.css]:[this.css,this.map]}generateString(){this.css="",this.map=new n({file:this.outputFile(),ignoreInvalidMapping:!0});let l=1,p=1,x="<no source>",w={generated:{column:0,line:0},original:{column:0,line:0},source:""},b,g;this.stringify(this.root,(v,_,N)=>{if(this.css+=v,_&&N!=="end"&&(w.generated.line=l,w.generated.column=p-1,_.source&&_.source.start?(w.source=this.sourcePath(_),w.original.line=_.source.start.line,w.original.column=_.source.start.column-1,this.map.addMapping(w)):(w.source=x,w.original.line=1,w.original.column=0,this.map.addMapping(w))),g=v.match(/\n/g),g?(l+=g.length,b=v.lastIndexOf(`
|
|
1079
|
+
`),p=v.length-b):p+=v.length,_&&N!=="start"){let y=_.parent||{raws:{}};(!(_.type==="decl"||_.type==="atrule"&&!_.nodes)||_!==y.last||y.raws.semicolon)&&(_.source&&_.source.end?(w.source=this.sourcePath(_),w.original.line=_.source.end.line,w.original.column=_.source.end.column-1,w.generated.line=l,w.generated.column=p-2,this.map.addMapping(w)):(w.source=x,w.original.line=1,w.original.column=0,w.generated.line=l,w.generated.column=p-1,this.map.addMapping(w)))}})}isAnnotation(){return this.isInline()?!0:typeof this.mapOpts.annotation<"u"?this.mapOpts.annotation:this.previous().length?this.previous().some(l=>l.annotation):!0}isInline(){if(typeof this.mapOpts.inline<"u")return this.mapOpts.inline;let l=this.mapOpts.annotation;return typeof l<"u"&&l!==!0?!1:this.previous().length?this.previous().some(p=>p.inline):!0}isMap(){return typeof this.opts.map<"u"?!!this.opts.map:this.previous().length>0}isSourcesContent(){return typeof this.mapOpts.sourcesContent<"u"?this.mapOpts.sourcesContent:this.previous().length?this.previous().some(l=>l.withContent()):!0}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(l){if(this.mapOpts.absolute||l.charCodeAt(0)===60||/^\w+:\/\//.test(l))return l;let p=this.memoizedPaths.get(l);if(p)return p;let x=this.opts.to?e(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(x=e(i(x,this.mapOpts.annotation)));let w=r(x,l);return this.memoizedPaths.set(l,w),w}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(l=>{if(l.source&&l.source.input.map){let p=l.source.input.map;this.previousMaps.includes(p)||this.previousMaps.push(p)}});else{let l=new c(this.originalCSS,this.opts);l.map&&this.previousMaps.push(l.map)}return this.previousMaps}setSourcesContent(){let l={};if(this.root)this.root.walk(p=>{if(p.source){let x=p.source.input.from;if(x&&!l[x]){l[x]=!0;let w=this.usesFileUrls?this.toFileUrl(x):this.toUrl(this.path(x));this.map.setSourceContent(w,p.source.input.css)}}});else if(this.css){let p=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(p,this.css)}}sourcePath(l){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(l.source.input.from):this.toUrl(this.path(l.source.input.from))}toBase64(l){return Buffer?Buffer.from(l).toString("base64"):window.btoa(unescape(encodeURIComponent(l)))}toFileUrl(l){let p=this.memoizedFileURLs.get(l);if(p)return p;if(u){let x=u(l).toString();return this.memoizedFileURLs.set(l,x),x}else throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(l){let p=this.memoizedURLs.get(l);if(p)return p;s==="\\"&&(l=l.replace(/\\/g,"/"));let x=encodeURI(l).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(l,x),x}}return bi=o,bi}var xi,tc;function Qh(){if(tc)return xi;tc=1;const e=39,r=34,i=92,s=47,a=10,n=32,u=12,c=9,d=13,f=91,o=93,h=40,l=41,p=123,x=125,w=59,b=42,g=58,v=64,_=/[\t\n\f\r "#'()/;[\\\]{}]/g,N=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,y=/.[\r\n"'(/\\]/,m=/[\da-f]/i;return xi=function(j,E={}){let D=j.css.valueOf(),C=E.ignoreErrors,P,$,H,F,B,L,G,X,ee,R,se=D.length,I=0,V=[],J=[];function oe(){return I}function K(Z){throw j.error("Unclosed "+Z,I)}function te(){return J.length===0&&I>=se}function pe(Z){if(J.length)return J.pop();if(I>=se)return;let ae=Z?Z.ignoreUnclosed:!1;switch(P=D.charCodeAt(I),P){case a:case n:case c:case d:case u:{F=I;do F+=1,P=D.charCodeAt(F);while(P===n||P===a||P===c||P===d||P===u);L=["space",D.slice(I,F)],I=F-1;break}case f:case o:case p:case x:case g:case w:case l:{let re=String.fromCharCode(P);L=[re,re,I];break}case h:{if(R=V.length?V.pop()[1]:"",ee=D.charCodeAt(I+1),R==="url"&&ee!==e&&ee!==r&&ee!==n&&ee!==a&&ee!==c&&ee!==u&&ee!==d){F=I;do{if(G=!1,F=D.indexOf(")",F+1),F===-1)if(C||ae){F=I;break}else K("bracket");for(X=F;D.charCodeAt(X-1)===i;)X-=1,G=!G}while(G);L=["brackets",D.slice(I,F+1),I,F],I=F}else F=D.indexOf(")",I+1),$=D.slice(I,F+1),F===-1||y.test($)?L=["(","(",I]:(L=["brackets",$,I,F],I=F);break}case e:case r:{B=P===e?"'":'"',F=I;do{if(G=!1,F=D.indexOf(B,F+1),F===-1)if(C||ae){F=I+1;break}else K("string");for(X=F;D.charCodeAt(X-1)===i;)X-=1,G=!G}while(G);L=["string",D.slice(I,F+1),I,F],I=F;break}case v:{_.lastIndex=I+1,_.test(D),_.lastIndex===0?F=D.length-1:F=_.lastIndex-2,L=["at-word",D.slice(I,F+1),I,F],I=F;break}case i:{for(F=I,H=!0;D.charCodeAt(F+1)===i;)F+=1,H=!H;if(P=D.charCodeAt(F+1),H&&P!==s&&P!==n&&P!==a&&P!==c&&P!==d&&P!==u&&(F+=1,m.test(D.charAt(F)))){for(;m.test(D.charAt(F+1));)F+=1;D.charCodeAt(F+1)===n&&(F+=1)}L=["word",D.slice(I,F+1),I,F],I=F;break}default:{P===s&&D.charCodeAt(I+1)===b?(F=D.indexOf("*/",I+2)+1,F===0&&(C||ae?F=D.length:K("comment")),L=["comment",D.slice(I,F+1),I,F],I=F):(N.lastIndex=I+1,N.test(D),N.lastIndex===0?F=D.length-1:F=N.lastIndex-2,L=["word",D.slice(I,F+1),I,F],V.push(L),I=F);break}}return I++,L}function Ee(Z){J.push(Z)}return{back:Ee,endOfFile:te,nextToken:pe,position:oe}},xi}var yi,rc;function ep(){if(rc)return yi;rc=1;let e=Xi(),r=ys(),i=vs(),s=sn(),a=Qi(),n=Qh();const u={empty:!0,space:!0};function c(f){for(let o=f.length-1;o>=0;o--){let h=f[o],l=h[3]||h[2];if(l)return l}}class d{constructor(o){this.input=o,this.root=new s,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:o,start:{column:1,line:1,offset:0}}}atrule(o){let h=new e;h.name=o[1].slice(1),h.name===""&&this.unnamedAtrule(h,o),this.init(h,o[2]);let l,p,x,w=!1,b=!1,g=[],v=[];for(;!this.tokenizer.endOfFile();){if(o=this.tokenizer.nextToken(),l=o[0],l==="("||l==="["?v.push(l==="("?")":"]"):l==="{"&&v.length>0?v.push("}"):l===v[v.length-1]&&v.pop(),v.length===0)if(l===";"){h.source.end=this.getPosition(o[2]),h.source.end.offset++,this.semicolon=!0;break}else if(l==="{"){b=!0;break}else if(l==="}"){if(g.length>0){for(x=g.length-1,p=g[x];p&&p[0]==="space";)p=g[--x];p&&(h.source.end=this.getPosition(p[3]||p[2]),h.source.end.offset++)}this.end(o);break}else g.push(o);else g.push(o);if(this.tokenizer.endOfFile()){w=!0;break}}h.raws.between=this.spacesAndCommentsFromEnd(g),g.length?(h.raws.afterName=this.spacesAndCommentsFromStart(g),this.raw(h,"params",g),w&&(o=g[g.length-1],h.source.end=this.getPosition(o[3]||o[2]),h.source.end.offset++,this.spaces=h.raws.between,h.raws.between="")):(h.raws.afterName="",h.params=""),b&&(h.nodes=[],this.current=h)}checkMissedSemicolon(o){let h=this.colon(o);if(h===!1)return;let l=0,p;for(let x=h-1;x>=0&&(p=o[x],!(p[0]!=="space"&&(l+=1,l===2)));x--);throw this.input.error("Missed semicolon",p[0]==="word"?p[3]+1:p[2])}colon(o){let h=0,l,p,x;for(let[w,b]of o.entries()){if(p=b,x=p[0],x==="("&&(h+=1),x===")"&&(h-=1),h===0&&x===":")if(!l)this.doubleColon(p);else{if(l[0]==="word"&&l[1]==="progid")continue;return w}l=p}return!1}comment(o){let h=new r;this.init(h,o[2]),h.source.end=this.getPosition(o[3]||o[2]),h.source.end.offset++;let l=o[1].slice(2,-2);if(/^\s*$/.test(l))h.text="",h.raws.left=l,h.raws.right="";else{let p=l.match(/^(\s*)([^]*\S)(\s*)$/);h.text=p[2],h.raws.left=p[1],h.raws.right=p[3]}}createTokenizer(){this.tokenizer=n(this.input)}decl(o,h){let l=new i;this.init(l,o[0][2]);let p=o[o.length-1];for(p[0]===";"&&(this.semicolon=!0,o.pop()),l.source.end=this.getPosition(p[3]||p[2]||c(o)),l.source.end.offset++;o[0][0]!=="word";)o.length===1&&this.unknownWord(o),l.raws.before+=o.shift()[1];for(l.source.start=this.getPosition(o[0][2]),l.prop="";o.length;){let v=o[0][0];if(v===":"||v==="space"||v==="comment")break;l.prop+=o.shift()[1]}l.raws.between="";let x;for(;o.length;)if(x=o.shift(),x[0]===":"){l.raws.between+=x[1];break}else x[0]==="word"&&/\w/.test(x[1])&&this.unknownWord([x]),l.raws.between+=x[1];(l.prop[0]==="_"||l.prop[0]==="*")&&(l.raws.before+=l.prop[0],l.prop=l.prop.slice(1));let w=[],b;for(;o.length&&(b=o[0][0],!(b!=="space"&&b!=="comment"));)w.push(o.shift());this.precheckMissedSemicolon(o);for(let v=o.length-1;v>=0;v--){if(x=o[v],x[1].toLowerCase()==="!important"){l.important=!0;let _=this.stringFrom(o,v);_=this.spacesFromEnd(o)+_,_!==" !important"&&(l.raws.important=_);break}else if(x[1].toLowerCase()==="important"){let _=o.slice(0),N="";for(let y=v;y>0;y--){let m=_[y][0];if(N.trim().startsWith("!")&&m!=="space")break;N=_.pop()[1]+N}N.trim().startsWith("!")&&(l.important=!0,l.raws.important=N,o=_)}if(x[0]!=="space"&&x[0]!=="comment")break}o.some(v=>v[0]!=="space"&&v[0]!=="comment")&&(l.raws.between+=w.map(v=>v[1]).join(""),w=[]),this.raw(l,"value",w.concat(o),h),l.value.includes(":")&&!h&&this.checkMissedSemicolon(o)}doubleColon(o){throw this.input.error("Double colon",{offset:o[2]},{offset:o[2]+o[1].length})}emptyRule(o){let h=new a;this.init(h,o[2]),h.selector="",h.raws.between="",this.current=h}end(o){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(o[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(o)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(o){if(this.spaces+=o[1],this.current.nodes){let h=this.current.nodes[this.current.nodes.length-1];h&&h.type==="rule"&&!h.raws.ownSemicolon&&(h.raws.ownSemicolon=this.spaces,this.spaces="",h.source.end=this.getPosition(o[2]),h.source.end.offset+=h.raws.ownSemicolon.length)}}getPosition(o){let h=this.input.fromOffset(o);return{column:h.col,line:h.line,offset:o}}init(o,h){this.current.push(o),o.source={input:this.input,start:this.getPosition(h)},o.raws.before=this.spaces,this.spaces="",o.type!=="comment"&&(this.semicolon=!1)}other(o){let h=!1,l=null,p=!1,x=null,w=[],b=o[1].startsWith("--"),g=[],v=o;for(;v;){if(l=v[0],g.push(v),l==="("||l==="[")x||(x=v),w.push(l==="("?")":"]");else if(b&&p&&l==="{")x||(x=v),w.push("}");else if(w.length===0)if(l===";")if(p){this.decl(g,b);return}else break;else if(l==="{"){this.rule(g);return}else if(l==="}"){this.tokenizer.back(g.pop()),h=!0;break}else l===":"&&(p=!0);else l===w[w.length-1]&&(w.pop(),w.length===0&&(x=null));v=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(h=!0),w.length>0&&this.unclosedBracket(x),h&&p){if(!b)for(;g.length&&(v=g[g.length-1][0],!(v!=="space"&&v!=="comment"));)this.tokenizer.back(g.pop());this.decl(g,b)}else this.unknownWord(g)}parse(){let o;for(;!this.tokenizer.endOfFile();)switch(o=this.tokenizer.nextToken(),o[0]){case"space":this.spaces+=o[1];break;case";":this.freeSemicolon(o);break;case"}":this.end(o);break;case"comment":this.comment(o);break;case"at-word":this.atrule(o);break;case"{":this.emptyRule(o);break;default:this.other(o);break}this.endFile()}precheckMissedSemicolon(){}raw(o,h,l,p){let x,w,b=l.length,g="",v=!0,_,N;for(let y=0;y<b;y+=1)x=l[y],w=x[0],w==="space"&&y===b-1&&!p?v=!1:w==="comment"?(N=l[y-1]?l[y-1][0]:"empty",_=l[y+1]?l[y+1][0]:"empty",!u[N]&&!u[_]?g.slice(-1)===","?v=!1:g+=x[1]:v=!1):g+=x[1];if(!v){let y=l.reduce((m,k)=>m+k[1],"");o.raws[h]={raw:y,value:g}}o[h]=g}rule(o){o.pop();let h=new a;this.init(h,o[0][2]),h.raws.between=this.spacesAndCommentsFromEnd(o),this.raw(h,"selector",o),this.current=h}spacesAndCommentsFromEnd(o){let h,l="";for(;o.length&&(h=o[o.length-1][0],!(h!=="space"&&h!=="comment"));)l=o.pop()[1]+l;return l}spacesAndCommentsFromStart(o){let h,l="";for(;o.length&&(h=o[0][0],!(h!=="space"&&h!=="comment"));)l+=o.shift()[1];return l}spacesFromEnd(o){let h,l="";for(;o.length&&(h=o[o.length-1][0],h==="space");)l=o.pop()[1]+l;return l}stringFrom(o,h){let l="";for(let p=h;p<o.length;p++)l+=o[p][1];return o.splice(h,o.length-h),l}unclosedBlock(){let o=this.current.source.start;throw this.input.error("Unclosed block",o.line,o.column)}unclosedBracket(o){throw this.input.error("Unclosed bracket",{offset:o[2]},{offset:o[2]+1})}unexpectedClose(o){throw this.input.error("Unexpected }",{offset:o[2]},{offset:o[2]+1})}unknownWord(o){throw this.input.error("Unknown word "+o[0][1],{offset:o[0][2]},{offset:o[0][2]+o[0][1].length})}unnamedAtrule(o,h){throw this.input.error("At-rule without name",{offset:h[2]},{offset:h[2]+h[1].length})}}return yi=d,yi}var vi,ac;function eo(){if(ac)return vi;ac=1;let e=Wr(),r=ws(),i=ep();function s(a,n){let u=new r(a,n),c=new i(u);try{c.parse()}catch(d){throw process.env.NODE_ENV!=="production"&&d.name==="CssSyntaxError"&&n&&n.from&&(/\.scss$/i.test(n.from)?d.message+=`
|
|
1080
1080
|
You tried to parse SCSS with the standard CSS parser; try again with the postcss-scss parser`:/\.sass/i.test(n.from)?d.message+=`
|
|
1081
1081
|
You tried to parse Sass with the standard CSS parser; try again with the postcss-sass parser`:/\.less$/i.test(n.from)&&(d.message+=`
|
|
1082
|
-
You tried to parse Less with the standard CSS parser; try again with the postcss-less parser`)),d}return c.root}return yi=s,s.default=s,e.registerParse(s),yi}var vi,tc;function pd(){if(tc)return vi;tc=1;class e{constructor(i,s={}){if(this.type="warning",this.text=i,s.node&&s.node.source){let r=s.node.rangeBy(s);this.line=r.start.line,this.column=r.start.column,this.endLine=r.end.line,this.endColumn=r.end.column}for(let r in s)this[r]=s[r]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}}return vi=e,e.default=e,vi}var wi,rc;function eo(){if(rc)return wi;rc=1;let e=pd();class a{get content(){return this.css}constructor(s,r,n){this.processor=s,this.messages=[],this.root=r,this.opts=n,this.css="",this.map=void 0}toString(){return this.css}warn(s,r={}){r.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(r.plugin=this.lastPlugin.postcssPlugin);let n=new e(s,r);return this.messages.push(n),n}warnings(){return this.messages.filter(s=>s.type==="warning")}}return wi=a,a.default=a,wi}var _i,ac;function md(){if(ac)return _i;ac=1;let e={};return _i=function(i){e[i]||(e[i]=!0,typeof console<"u"&&console.warn&&console.warn(i))},_i}var ki,nc;function gd(){if(nc)return ki;nc=1;let e=Wr(),a=Xi(),i=hd(),s=Qi(),r=eo(),n=sn(),u=gs(),{isClean:c,my:d}=Yi(),f=md();const o={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},h={AtRule:!0,AtRuleExit:!0,Comment:!0,CommentExit:!0,Declaration:!0,DeclarationExit:!0,Document:!0,DocumentExit:!0,Once:!0,OnceExit:!0,postcssPlugin:!0,prepare:!0,Root:!0,RootExit:!0,Rule:!0,RuleExit:!0},l={Once:!0,postcssPlugin:!0,prepare:!0},p=0;function x(N){return typeof N=="object"&&typeof N.then=="function"}function w(N){let y=!1,m=o[N.type];return N.type==="decl"?y=N.prop.toLowerCase():N.type==="atrule"&&(y=N.name.toLowerCase()),y&&N.append?[m,m+"-"+y,p,m+"Exit",m+"Exit-"+y]:y?[m,m+"-"+y,m+"Exit",m+"Exit-"+y]:N.append?[m,p,m+"Exit"]:[m,m+"Exit"]}function b(N){let y;return N.type==="document"?y=["Document",p,"DocumentExit"]:N.type==="root"?y=["Root",p,"RootExit"]:y=w(N),{eventIndex:0,events:y,iterator:0,node:N,visitorIndex:0,visitors:[]}}function g(N){return N[c]=!1,N.nodes&&N.nodes.forEach(y=>g(y)),N}let v={};class _{get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}constructor(y,m,k){this.stringified=!1,this.processed=!1;let j;if(typeof m=="object"&&m!==null&&(m.type==="root"||m.type==="document"))j=g(m);else if(m instanceof _||m instanceof r)j=g(m.root),m.map&&(typeof k.map>"u"&&(k.map={}),k.map.inline||(k.map.inline=!1),k.map.prev=m.map);else{let A=s;k.syntax&&(A=k.syntax.parse),k.parser&&(A=k.parser),A.parse&&(A=A.parse);try{j=A(m,k)}catch(D){this.processed=!0,this.error=D}j&&!j[d]&&e.rebuild(j)}this.result=new r(y,j,k),this.helpers={...v,postcss:v,result:this.result},this.plugins=this.processor.plugins.map(A=>typeof A=="object"&&A.prepare?{...A,...A.prepare(this.result)}:A)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(y){return this.async().catch(y)}finally(y){return this.async().then(y,y)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(y,m){let k=this.result.lastPlugin;try{if(m&&m.addToError(y),this.error=y,y.name==="CssSyntaxError"&&!y.plugin)y.plugin=k.postcssPlugin,y.setMessage();else if(k.postcssVersion&&process.env.NODE_ENV!=="production"){let j=k.postcssPlugin,A=k.postcssVersion,D=this.result.processor.version,C=A.split("."),O=D.split(".");(C[0]!==O[0]||parseInt(C[1])>parseInt(O[1]))&&console.error("Unknown error from PostCSS plugin. Your current PostCSS version is "+D+", but "+j+" uses "+A+". Perhaps this is the source of the error below.")}}catch(j){console&&console.error&&console.error(j)}return y}prepareVisitors(){this.listeners={};let y=(m,k,j)=>{this.listeners[k]||(this.listeners[k]=[]),this.listeners[k].push([m,j])};for(let m of this.plugins)if(typeof m=="object")for(let k in m){if(!h[k]&&/^[A-Z]/.test(k))throw new Error(`Unknown event ${k} in ${m.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!l[k])if(typeof m[k]=="object")for(let j in m[k])j==="*"?y(m,k,m[k][j]):y(m,k+"-"+j.toLowerCase(),m[k][j]);else typeof m[k]=="function"&&y(m,k,m[k])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let y=0;y<this.plugins.length;y++){let m=this.plugins[y],k=this.runOnRoot(m);if(x(k))try{await k}catch(j){throw this.handleError(j)}}if(this.prepareVisitors(),this.hasListener){let y=this.result.root;for(;!y[c];){y[c]=!0;let m=[b(y)];for(;m.length>0;){let k=this.visitTick(m);if(x(k))try{await k}catch(j){let A=m[m.length-1].node;throw this.handleError(j,A)}}}if(this.listeners.OnceExit)for(let[m,k]of this.listeners.OnceExit){this.result.lastPlugin=m;try{if(y.type==="document"){let j=y.nodes.map(A=>k(A,this.helpers));await Promise.all(j)}else await k(y,this.helpers)}catch(j){throw this.handleError(j)}}}return this.processed=!0,this.stringify()}runOnRoot(y){this.result.lastPlugin=y;try{if(typeof y=="object"&&y.Once){if(this.result.root.type==="document"){let m=this.result.root.nodes.map(k=>y.Once(k,this.helpers));return x(m[0])?Promise.all(m):m}return y.Once(this.result.root,this.helpers)}else if(typeof y=="function")return y(this.result.root,this.result)}catch(m){throw this.handleError(m)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let y=this.result.opts,m=u;y.syntax&&(m=y.syntax.stringify),y.stringifier&&(m=y.stringifier),m.stringify&&(m=m.stringify);let j=new i(m,this.result.root,this.result.opts).generate();return this.result.css=j[0],this.result.map=j[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let y of this.plugins){let m=this.runOnRoot(y);if(x(m))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let y=this.result.root;for(;!y[c];)y[c]=!0,this.walkSync(y);if(this.listeners.OnceExit)if(y.type==="document")for(let m of y.nodes)this.visitSync(this.listeners.OnceExit,m);else this.visitSync(this.listeners.OnceExit,y)}return this.result}then(y,m){return process.env.NODE_ENV!=="production"&&("from"in this.opts||f("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(y,m)}toString(){return this.css}visitSync(y,m){for(let[k,j]of y){this.result.lastPlugin=k;let A;try{A=j(m,this.helpers)}catch(D){throw this.handleError(D,m.proxyOf)}if(m.type!=="root"&&m.type!=="document"&&!m.parent)return!0;if(x(A))throw this.getAsyncError()}}visitTick(y){let m=y[y.length-1],{node:k,visitors:j}=m;if(k.type!=="root"&&k.type!=="document"&&!k.parent){y.pop();return}if(j.length>0&&m.visitorIndex<j.length){let[D,C]=j[m.visitorIndex];m.visitorIndex+=1,m.visitorIndex===j.length&&(m.visitors=[],m.visitorIndex=0),this.result.lastPlugin=D;try{return C(k.toProxy(),this.helpers)}catch(O){throw this.handleError(O,k)}}if(m.iterator!==0){let D=m.iterator,C;for(;C=k.nodes[k.indexes[D]];)if(k.indexes[D]+=1,!C[c]){C[c]=!0,y.push(b(C));return}m.iterator=0,delete k.indexes[D]}let A=m.events;for(;m.eventIndex<A.length;){let D=A[m.eventIndex];if(m.eventIndex+=1,D===p){k.nodes&&k.nodes.length&&(k[c]=!0,m.iterator=k.getIterator());return}else if(this.listeners[D]){m.visitors=this.listeners[D];return}}y.pop()}walkSync(y){y[c]=!0;let m=w(y);for(let k of m)if(k===p)y.nodes&&y.each(j=>{j[c]||this.walkSync(j)});else{let j=this.listeners[k];if(j&&this.visitSync(j,y.toProxy()))return}}warnings(){return this.sync().warnings()}}return _.registerPostcss=N=>{v=N},ki=_,_.default=_,n.registerLazyResult(_),a.registerLazyResult(_),ki}var Ni,sc;function tp(){if(sc)return Ni;sc=1;let e=hd(),a=Qi();const i=eo();let s=gs(),r=md();class n{get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let c,d=a;try{c=d(this._css,this._opts)}catch(f){this.error=f}if(this.error)throw this.error;return this._root=c,c}get[Symbol.toStringTag](){return"NoWorkResult"}constructor(c,d,f){d=d.toString(),this.stringified=!1,this._processor=c,this._css=d,this._opts=f,this._map=void 0;let o,h=s;this.result=new i(this._processor,o,this._opts),this.result.css=d;let l=this;Object.defineProperty(this.result,"root",{get(){return l.root}});let p=new e(h,o,this._opts,d);if(p.isMap()){let[x,w]=p.generate();x&&(this.result.css=x),w&&(this.result.map=w)}else p.clearAnnotation(),this.result.css=p.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(c){return this.async().catch(c)}finally(c){return this.async().then(c,c)}sync(){if(this.error)throw this.error;return this.result}then(c,d){return process.env.NODE_ENV!=="production"&&("from"in this._opts||r("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(c,d)}toString(){return this._css}warnings(){return[]}}return Ni=n,n.default=n,Ni}var ji,ic;function rp(){if(ic)return ji;ic=1;let e=Xi(),a=gd(),i=tp(),s=sn();class r{constructor(u=[]){this.version="8.5.6",this.plugins=this.normalize(u)}normalize(u){let c=[];for(let d of u)if(d.postcss===!0?d=d():d.postcss&&(d=d.postcss),typeof d=="object"&&Array.isArray(d.plugins))c=c.concat(d.plugins);else if(typeof d=="object"&&d.postcssPlugin)c.push(d);else if(typeof d=="function")c.push(d);else if(typeof d=="object"&&(d.parse||d.stringify)){if(process.env.NODE_ENV!=="production")throw new Error("PostCSS syntaxes cannot be used as plugins. Instead, please use one of the syntax/parser/stringifier options as outlined in your PostCSS runner documentation.")}else throw new Error(d+" is not a PostCSS plugin");return c}process(u,c={}){return!this.plugins.length&&!c.parser&&!c.stringifier&&!c.syntax?new i(this,u,c):new a(this,u,c)}use(u){return this.plugins=this.plugins.concat(this.normalize([u])),this}}return ji=r,r.default=r,s.registerProcessor(r),e.registerProcessor(r),ji}var Ei,oc;function ap(){if(oc)return Ei;oc=1;let e=Zi(),a=xs(),i=Wr(),s=Ji(),r=ys(),n=Xi(),u=Kh(),c=vs(),d=gd(),f=fd(),o=bs(),h=Qi(),l=rp(),p=eo(),x=sn(),w=Ki(),b=gs(),g=pd();function v(..._){return _.length===1&&Array.isArray(_[0])&&(_=_[0]),new l(_)}return v.plugin=function(N,y){let m=!1;function k(...A){console&&console.warn&&!m&&(m=!0,console.warn(N+`: postcss.plugin was deprecated. Migration guide:
|
|
1082
|
+
You tried to parse Less with the standard CSS parser; try again with the postcss-less parser`)),d}return c.root}return vi=s,s.default=s,e.registerParse(s),vi}var wi,nc;function bd(){if(nc)return wi;nc=1;class e{constructor(i,s={}){if(this.type="warning",this.text=i,s.node&&s.node.source){let a=s.node.rangeBy(s);this.line=a.start.line,this.column=a.start.column,this.endLine=a.end.line,this.endColumn=a.end.column}for(let a in s)this[a]=s[a]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}}return wi=e,e.default=e,wi}var _i,sc;function to(){if(sc)return _i;sc=1;let e=bd();class r{get content(){return this.css}constructor(s,a,n){this.processor=s,this.messages=[],this.root=a,this.opts=n,this.css="",this.map=void 0}toString(){return this.css}warn(s,a={}){a.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(a.plugin=this.lastPlugin.postcssPlugin);let n=new e(s,a);return this.messages.push(n),n}warnings(){return this.messages.filter(s=>s.type==="warning")}}return _i=r,r.default=r,_i}var ki,ic;function xd(){if(ic)return ki;ic=1;let e={};return ki=function(i){e[i]||(e[i]=!0,typeof console<"u"&&console.warn&&console.warn(i))},ki}var Ni,oc;function yd(){if(oc)return Ni;oc=1;let e=Wr(),r=Ki(),i=gd(),s=eo(),a=to(),n=sn(),u=bs(),{isClean:c,my:d}=Zi(),f=xd();const o={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},h={AtRule:!0,AtRuleExit:!0,Comment:!0,CommentExit:!0,Declaration:!0,DeclarationExit:!0,Document:!0,DocumentExit:!0,Once:!0,OnceExit:!0,postcssPlugin:!0,prepare:!0,Root:!0,RootExit:!0,Rule:!0,RuleExit:!0},l={Once:!0,postcssPlugin:!0,prepare:!0},p=0;function x(N){return typeof N=="object"&&typeof N.then=="function"}function w(N){let y=!1,m=o[N.type];return N.type==="decl"?y=N.prop.toLowerCase():N.type==="atrule"&&(y=N.name.toLowerCase()),y&&N.append?[m,m+"-"+y,p,m+"Exit",m+"Exit-"+y]:y?[m,m+"-"+y,m+"Exit",m+"Exit-"+y]:N.append?[m,p,m+"Exit"]:[m,m+"Exit"]}function b(N){let y;return N.type==="document"?y=["Document",p,"DocumentExit"]:N.type==="root"?y=["Root",p,"RootExit"]:y=w(N),{eventIndex:0,events:y,iterator:0,node:N,visitorIndex:0,visitors:[]}}function g(N){return N[c]=!1,N.nodes&&N.nodes.forEach(y=>g(y)),N}let v={};class _{get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}constructor(y,m,k){this.stringified=!1,this.processed=!1;let j;if(typeof m=="object"&&m!==null&&(m.type==="root"||m.type==="document"))j=g(m);else if(m instanceof _||m instanceof a)j=g(m.root),m.map&&(typeof k.map>"u"&&(k.map={}),k.map.inline||(k.map.inline=!1),k.map.prev=m.map);else{let E=s;k.syntax&&(E=k.syntax.parse),k.parser&&(E=k.parser),E.parse&&(E=E.parse);try{j=E(m,k)}catch(D){this.processed=!0,this.error=D}j&&!j[d]&&e.rebuild(j)}this.result=new a(y,j,k),this.helpers={...v,postcss:v,result:this.result},this.plugins=this.processor.plugins.map(E=>typeof E=="object"&&E.prepare?{...E,...E.prepare(this.result)}:E)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(y){return this.async().catch(y)}finally(y){return this.async().then(y,y)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(y,m){let k=this.result.lastPlugin;try{if(m&&m.addToError(y),this.error=y,y.name==="CssSyntaxError"&&!y.plugin)y.plugin=k.postcssPlugin,y.setMessage();else if(k.postcssVersion&&process.env.NODE_ENV!=="production"){let j=k.postcssPlugin,E=k.postcssVersion,D=this.result.processor.version,C=E.split("."),P=D.split(".");(C[0]!==P[0]||parseInt(C[1])>parseInt(P[1]))&&console.error("Unknown error from PostCSS plugin. Your current PostCSS version is "+D+", but "+j+" uses "+E+". Perhaps this is the source of the error below.")}}catch(j){console&&console.error&&console.error(j)}return y}prepareVisitors(){this.listeners={};let y=(m,k,j)=>{this.listeners[k]||(this.listeners[k]=[]),this.listeners[k].push([m,j])};for(let m of this.plugins)if(typeof m=="object")for(let k in m){if(!h[k]&&/^[A-Z]/.test(k))throw new Error(`Unknown event ${k} in ${m.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!l[k])if(typeof m[k]=="object")for(let j in m[k])j==="*"?y(m,k,m[k][j]):y(m,k+"-"+j.toLowerCase(),m[k][j]);else typeof m[k]=="function"&&y(m,k,m[k])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let y=0;y<this.plugins.length;y++){let m=this.plugins[y],k=this.runOnRoot(m);if(x(k))try{await k}catch(j){throw this.handleError(j)}}if(this.prepareVisitors(),this.hasListener){let y=this.result.root;for(;!y[c];){y[c]=!0;let m=[b(y)];for(;m.length>0;){let k=this.visitTick(m);if(x(k))try{await k}catch(j){let E=m[m.length-1].node;throw this.handleError(j,E)}}}if(this.listeners.OnceExit)for(let[m,k]of this.listeners.OnceExit){this.result.lastPlugin=m;try{if(y.type==="document"){let j=y.nodes.map(E=>k(E,this.helpers));await Promise.all(j)}else await k(y,this.helpers)}catch(j){throw this.handleError(j)}}}return this.processed=!0,this.stringify()}runOnRoot(y){this.result.lastPlugin=y;try{if(typeof y=="object"&&y.Once){if(this.result.root.type==="document"){let m=this.result.root.nodes.map(k=>y.Once(k,this.helpers));return x(m[0])?Promise.all(m):m}return y.Once(this.result.root,this.helpers)}else if(typeof y=="function")return y(this.result.root,this.result)}catch(m){throw this.handleError(m)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let y=this.result.opts,m=u;y.syntax&&(m=y.syntax.stringify),y.stringifier&&(m=y.stringifier),m.stringify&&(m=m.stringify);let j=new i(m,this.result.root,this.result.opts).generate();return this.result.css=j[0],this.result.map=j[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let y of this.plugins){let m=this.runOnRoot(y);if(x(m))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let y=this.result.root;for(;!y[c];)y[c]=!0,this.walkSync(y);if(this.listeners.OnceExit)if(y.type==="document")for(let m of y.nodes)this.visitSync(this.listeners.OnceExit,m);else this.visitSync(this.listeners.OnceExit,y)}return this.result}then(y,m){return process.env.NODE_ENV!=="production"&&("from"in this.opts||f("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(y,m)}toString(){return this.css}visitSync(y,m){for(let[k,j]of y){this.result.lastPlugin=k;let E;try{E=j(m,this.helpers)}catch(D){throw this.handleError(D,m.proxyOf)}if(m.type!=="root"&&m.type!=="document"&&!m.parent)return!0;if(x(E))throw this.getAsyncError()}}visitTick(y){let m=y[y.length-1],{node:k,visitors:j}=m;if(k.type!=="root"&&k.type!=="document"&&!k.parent){y.pop();return}if(j.length>0&&m.visitorIndex<j.length){let[D,C]=j[m.visitorIndex];m.visitorIndex+=1,m.visitorIndex===j.length&&(m.visitors=[],m.visitorIndex=0),this.result.lastPlugin=D;try{return C(k.toProxy(),this.helpers)}catch(P){throw this.handleError(P,k)}}if(m.iterator!==0){let D=m.iterator,C;for(;C=k.nodes[k.indexes[D]];)if(k.indexes[D]+=1,!C[c]){C[c]=!0,y.push(b(C));return}m.iterator=0,delete k.indexes[D]}let E=m.events;for(;m.eventIndex<E.length;){let D=E[m.eventIndex];if(m.eventIndex+=1,D===p){k.nodes&&k.nodes.length&&(k[c]=!0,m.iterator=k.getIterator());return}else if(this.listeners[D]){m.visitors=this.listeners[D];return}}y.pop()}walkSync(y){y[c]=!0;let m=w(y);for(let k of m)if(k===p)y.nodes&&y.each(j=>{j[c]||this.walkSync(j)});else{let j=this.listeners[k];if(j&&this.visitSync(j,y.toProxy()))return}}warnings(){return this.sync().warnings()}}return _.registerPostcss=N=>{v=N},Ni=_,_.default=_,n.registerLazyResult(_),r.registerLazyResult(_),Ni}var ji,uc;function tp(){if(uc)return ji;uc=1;let e=gd(),r=eo();const i=to();let s=bs(),a=xd();class n{get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let c,d=r;try{c=d(this._css,this._opts)}catch(f){this.error=f}if(this.error)throw this.error;return this._root=c,c}get[Symbol.toStringTag](){return"NoWorkResult"}constructor(c,d,f){d=d.toString(),this.stringified=!1,this._processor=c,this._css=d,this._opts=f,this._map=void 0;let o,h=s;this.result=new i(this._processor,o,this._opts),this.result.css=d;let l=this;Object.defineProperty(this.result,"root",{get(){return l.root}});let p=new e(h,o,this._opts,d);if(p.isMap()){let[x,w]=p.generate();x&&(this.result.css=x),w&&(this.result.map=w)}else p.clearAnnotation(),this.result.css=p.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(c){return this.async().catch(c)}finally(c){return this.async().then(c,c)}sync(){if(this.error)throw this.error;return this.result}then(c,d){return process.env.NODE_ENV!=="production"&&("from"in this._opts||a("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(c,d)}toString(){return this._css}warnings(){return[]}}return ji=n,n.default=n,ji}var Ei,lc;function rp(){if(lc)return Ei;lc=1;let e=Ki(),r=yd(),i=tp(),s=sn();class a{constructor(u=[]){this.version="8.5.6",this.plugins=this.normalize(u)}normalize(u){let c=[];for(let d of u)if(d.postcss===!0?d=d():d.postcss&&(d=d.postcss),typeof d=="object"&&Array.isArray(d.plugins))c=c.concat(d.plugins);else if(typeof d=="object"&&d.postcssPlugin)c.push(d);else if(typeof d=="function")c.push(d);else if(typeof d=="object"&&(d.parse||d.stringify)){if(process.env.NODE_ENV!=="production")throw new Error("PostCSS syntaxes cannot be used as plugins. Instead, please use one of the syntax/parser/stringifier options as outlined in your PostCSS runner documentation.")}else throw new Error(d+" is not a PostCSS plugin");return c}process(u,c={}){return!this.plugins.length&&!c.parser&&!c.stringifier&&!c.syntax?new i(this,u,c):new r(this,u,c)}use(u){return this.plugins=this.plugins.concat(this.normalize([u])),this}}return Ei=a,a.default=a,s.registerProcessor(a),e.registerProcessor(a),Ei}var Ai,cc;function ap(){if(cc)return Ai;cc=1;let e=Xi(),r=ys(),i=Wr(),s=Yi(),a=vs(),n=Ki(),u=Kh(),c=ws(),d=yd(),f=md(),o=xs(),h=eo(),l=rp(),p=to(),x=sn(),w=Qi(),b=bs(),g=bd();function v(..._){return _.length===1&&Array.isArray(_[0])&&(_=_[0]),new l(_)}return v.plugin=function(N,y){let m=!1;function k(...E){console&&console.warn&&!m&&(m=!0,console.warn(N+`: postcss.plugin was deprecated. Migration guide:
|
|
1083
1083
|
https://evilmartians.com/chronicles/postcss-8-plugin-migration`),process.env.LANG&&process.env.LANG.startsWith("cn")&&console.warn(N+`: 里面 postcss.plugin 被弃用. 迁移指南:
|
|
1084
|
-
https://www.w3ctech.com/topic/2226`));let D=y(...
|
|
1084
|
+
https://www.w3ctech.com/topic/2226`));let D=y(...E);return D.postcssPlugin=N,D.postcssVersion=new l().version,D}let j;return Object.defineProperty(k,"postcss",{get(){return j||(j=k()),j}}),k.process=function(E,D,C){return v([k(C)]).process(E,D)},k},v.stringify=b,v.parse=h,v.fromJSON=u,v.list=f,v.comment=_=>new r(_),v.atRule=_=>new e(_),v.decl=_=>new a(_),v.rule=_=>new w(_),v.root=_=>new x(_),v.document=_=>new n(_),v.CssSyntaxError=s,v.Declaration=a,v.Container=i,v.Processor=l,v.Document=n,v.Comment=r,v.Warning=g,v.AtRule=e,v.Result=p,v.Input=c,v.Rule=w,v.Root=x,v.Node=o,d.registerPostcss(v),Ai=v,v.default=v,Ai}var Si,dc;function np(){if(dc)return Si;dc=1;const e=Hh(),r=Wh(),{isPlainObject:i}=Gh(),s=Vc(),a=Yh(),{parse:n}=ap(),u=["img","audio","video","picture","svg","object","map","iframe","embed"],c=["script","style"];function d(b,g){b&&Object.keys(b).forEach(function(v){g(b[v],v)})}function f(b,g){return{}.hasOwnProperty.call(b,g)}function o(b,g){const v=[];return d(b,function(_){g(_)&&v.push(_)}),v}function h(b){for(const g in b)if(f(b,g))return!1;return!0}function l(b){return b.map(function(g){if(!g.url)throw new Error("URL missing");return g.url+(g.w?` ${g.w}w`:"")+(g.h?` ${g.h}h`:"")+(g.d?` ${g.d}x`:"")}).join(", ")}Si=x;const p=/^[^\0\t\n\f\r /<=>]+$/;function x(b,g,v){if(b==null)return"";typeof b=="number"&&(b=b.toString());let _="",N="";function y(Z,ae){const re=this;this.tag=Z,this.attribs=ae||{},this.tagPosition=_.length,this.text="",this.mediaChildren=[],this.updateParentNodeText=function(){if(B.length){const ce=B[B.length-1];ce.text+=re.text}},this.updateParentNodeMediaChildren=function(){B.length&&u.includes(this.tag)&&B[B.length-1].mediaChildren.push(this.tag)}}g=Object.assign({},x.defaults,g),g.parser=Object.assign({},w,g.parser);const m=function(Z){return g.allowedTags===!1||(g.allowedTags||[]).indexOf(Z)>-1};c.forEach(function(Z){m(Z)&&!g.allowVulnerableTags&&console.warn(`
|
|
1085
1085
|
|
|
1086
1086
|
⚠️ Your \`allowedTags\` option includes, \`${Z}\`, which is inherently
|
|
1087
1087
|
vulnerable to XSS attacks. Please remove it from \`allowedTags\`.
|
|
1088
1088
|
Or, to disable this warning, add the \`allowVulnerableTags\` option
|
|
1089
1089
|
and ensure you are accounting for this risk.
|
|
1090
1090
|
|
|
1091
|
-
`)});const k=g.nonTextTags||["script","style","textarea","option"];let j,A;g.allowedAttributes&&(j={},A={},d(g.allowedAttributes,function(Z,ae){j[ae]=[];const re=[];Z.forEach(function(ce){typeof ce=="string"&&ce.indexOf("*")>=0?re.push(a(ce).replace(/\\\*/g,".*")):j[ae].push(ce)}),re.length&&(A[ae]=new RegExp("^("+re.join("|")+")$"))}));const D={},C={},O={};d(g.allowedClasses,function(Z,ae){if(j&&(f(j,ae)||(j[ae]=[]),j[ae].push("class")),D[ae]=Z,Array.isArray(Z)){const re=[];D[ae]=[],O[ae]=[],Z.forEach(function(ce){typeof ce=="string"&&ce.indexOf("*")>=0?re.push(a(ce).replace(/\\\*/g,".*")):ce instanceof RegExp?O[ae].push(ce):D[ae].push(ce)}),re.length&&(C[ae]=new RegExp("^("+re.join("|")+")$"))}});const L={};let H;d(g.transformTags,function(Z,ae){let re;typeof Z=="function"?re=Z:typeof Z=="string"&&(re=x.simpleTransform(Z)),ae==="*"?H=re:L[ae]=re});let F,B,$,G,X,ee,R=!1;I();const se=new e.Parser({onopentag:function(Z,ae){if(g.enforceHtmlBoundary&&Z==="html"&&I(),X){ee++;return}const re=new y(Z,ae);B.push(re);let ce=!1;const xe=!!re.text;let ge;if(f(L,Z)&&(ge=L[Z](Z,ae),re.attribs=ae=ge.attribs,ge.text!==void 0&&(re.innerText=ge.text),Z!==ge.tagName&&(re.name=Z=ge.tagName,G[F]=ge.tagName)),H&&(ge=H(Z,ae),re.attribs=ae=ge.attribs,Z!==ge.tagName&&(re.name=Z=ge.tagName,G[F]=ge.tagName)),(!m(Z)||g.disallowedTagsMode==="recursiveEscape"&&!h($)||g.nestingLimit!=null&&F>=g.nestingLimit)&&(ce=!0,$[F]=!0,(g.disallowedTagsMode==="discard"||g.disallowedTagsMode==="completelyDiscard")&&k.indexOf(Z)!==-1&&(X=!0,ee=1),$[F]=!0),F++,ce){if(g.disallowedTagsMode==="discard"||g.disallowedTagsMode==="completelyDiscard")return;N=_,_=""}_+="<"+Z,Z==="script"&&(g.allowedScriptHostnames||g.allowedScriptDomains)&&(re.innerText=""),(!j||f(j,Z)||j["*"])&&d(ae,function(ke,me){if(!p.test(me)){delete re.attribs[me];return}if(ke===""&&!g.allowedEmptyAttributes.includes(me)&&(g.nonBooleanAttributes.includes(me)||g.nonBooleanAttributes.includes("*"))){delete re.attribs[me];return}let Ye=!1;if(!j||f(j,Z)&&j[Z].indexOf(me)!==-1||j["*"]&&j["*"].indexOf(me)!==-1||f(A,Z)&&A[Z].test(me)||A["*"]&&A["*"].test(me))Ye=!0;else if(j&&j[Z]){for(const we of j[Z])if(i(we)&&we.name&&we.name===me){Ye=!0;let fe="";if(we.multiple===!0){const Ae=ke.split(" ");for(const Oe of Ae)we.values.indexOf(Oe)!==-1&&(fe===""?fe=Oe:fe+=" "+Oe)}else we.values.indexOf(ke)>=0&&(fe=ke);ke=fe}}if(Ye){if(g.allowedSchemesAppliedToAttributes.indexOf(me)!==-1&&J(Z,ke)){delete re.attribs[me];return}if(Z==="script"&&me==="src"){let we=!0;try{const fe=oe(ke);if(g.allowedScriptHostnames||g.allowedScriptDomains){const Ae=(g.allowedScriptHostnames||[]).find(function(Ve){return Ve===fe.url.hostname}),Oe=(g.allowedScriptDomains||[]).find(function(Ve){return fe.url.hostname===Ve||fe.url.hostname.endsWith(`.${Ve}`)});we=Ae||Oe}}catch{we=!1}if(!we){delete re.attribs[me];return}}if(Z==="iframe"&&me==="src"){let we=!0;try{const fe=oe(ke);if(fe.isRelativeUrl)we=f(g,"allowIframeRelativeUrls")?g.allowIframeRelativeUrls:!g.allowedIframeHostnames&&!g.allowedIframeDomains;else if(g.allowedIframeHostnames||g.allowedIframeDomains){const Ae=(g.allowedIframeHostnames||[]).find(function(Ve){return Ve===fe.url.hostname}),Oe=(g.allowedIframeDomains||[]).find(function(Ve){return fe.url.hostname===Ve||fe.url.hostname.endsWith(`.${Ve}`)});we=Ae||Oe}}catch{we=!1}if(!we){delete re.attribs[me];return}}if(me==="srcset")try{let we=r(ke);if(we.forEach(function(fe){J("srcset",fe.url)&&(fe.evil=!0)}),we=o(we,function(fe){return!fe.evil}),we.length)ke=l(o(we,function(fe){return!fe.evil})),re.attribs[me]=ke;else{delete re.attribs[me];return}}catch{delete re.attribs[me];return}if(me==="class"){const we=D[Z],fe=D["*"],Ae=C[Z],Oe=O[Z],Ve=C["*"],St=[Ae,Ve].concat(Oe).filter(function(Jt){return Jt});if(we&&fe?ke=Ee(ke,s(we,fe),St):ke=Ee(ke,we||fe,St),!ke.length){delete re.attribs[me];return}}if(me==="style"){if(g.parseStyleAttributes)try{const we=n(Z+" {"+ke+"}",{map:!1}),fe=K(we,g.allowedStyles);if(ke=te(fe),ke.length===0){delete re.attribs[me];return}}catch{typeof window<"u"&&console.warn('Failed to parse "'+Z+" {"+ke+`}", If you're running this in a browser, we recommend to disable style parsing: options.parseStyleAttributes: false, since this only works in a node environment due to a postcss dependency, More info: https://github.com/apostrophecms/sanitize-html/issues/547`),delete re.attribs[me];return}else if(g.allowedStyles)throw new Error("allowedStyles option cannot be used together with parseStyleAttributes: false.")}_+=" "+me,ke&&ke.length?_+='="'+V(ke,!0)+'"':g.allowedEmptyAttributes.includes(me)&&(_+='=""')}else delete re.attribs[me]}),g.selfClosing.indexOf(Z)!==-1?_+=" />":(_+=">",re.innerText&&!xe&&!g.textFilter&&(_+=V(re.innerText),R=!0)),ce&&(_=N+V(_),N="")},ontext:function(Z){if(X)return;const ae=B[B.length-1];let re;if(ae&&(re=ae.tag,Z=ae.innerText!==void 0?ae.innerText:Z),g.disallowedTagsMode==="completelyDiscard"&&!m(re))Z="";else if((g.disallowedTagsMode==="discard"||g.disallowedTagsMode==="completelyDiscard")&&(re==="script"||re==="style"))_+=Z;else{const ce=V(Z,!1);g.textFilter&&!R?_+=g.textFilter(ce,re):R||(_+=ce)}if(B.length){const ce=B[B.length-1];ce.text+=Z}},onclosetag:function(Z,ae){if(X)if(ee--,!ee)X=!1;else return;const re=B.pop();if(!re)return;if(re.tag!==Z){B.push(re);return}X=g.enforceHtmlBoundary?Z==="html":!1,F--;const ce=$[F];if(ce){if(delete $[F],g.disallowedTagsMode==="discard"||g.disallowedTagsMode==="completelyDiscard"){re.updateParentNodeText();return}N=_,_=""}if(G[F]&&(Z=G[F],delete G[F]),g.exclusiveFilter&&g.exclusiveFilter(re)){_=_.substr(0,re.tagPosition);return}if(re.updateParentNodeMediaChildren(),re.updateParentNodeText(),g.selfClosing.indexOf(Z)!==-1||ae&&!m(Z)&&["escape","recursiveEscape"].indexOf(g.disallowedTagsMode)>=0){ce&&(_=N,N="");return}_+="</"+Z+">",ce&&(_=N+V(_),N=""),R=!1}},g.parser);return se.write(b),se.end(),_;function I(){_="",F=0,B=[],$={},G={},X=!1,ee=0}function V(Z,ae){return typeof Z!="string"&&(Z=Z+""),g.parser.decodeEntities&&(Z=Z.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">"),ae&&(Z=Z.replace(/"/g,"""))),Z=Z.replace(/&(?![a-zA-Z0-9#]{1,20};)/g,"&").replace(/</g,"<").replace(/>/g,">"),ae&&(Z=Z.replace(/"/g,""")),Z}function J(Z,ae){for(ae=ae.replace(/[\x00-\x20]+/g,"");;){const xe=ae.indexOf("<!--");if(xe===-1)break;const ge=ae.indexOf("-->",xe+4);if(ge===-1)break;ae=ae.substring(0,xe)+ae.substring(ge+3)}const re=ae.match(/^([a-zA-Z][a-zA-Z0-9.\-+]*):/);if(!re)return ae.match(/^[/\\]{2}/)?!g.allowProtocolRelative:!1;const ce=re[1].toLowerCase();return f(g.allowedSchemesByTag,Z)?g.allowedSchemesByTag[Z].indexOf(ce)===-1:!g.allowedSchemes||g.allowedSchemes.indexOf(ce)===-1}function oe(Z){if(Z=Z.replace(/^(\w+:)?\s*[\\/]\s*[\\/]/,"$1//"),Z.startsWith("relative:"))throw new Error("relative: exploit attempt");let ae="relative://relative-site";for(let xe=0;xe<100;xe++)ae+=`/${xe}`;const re=new URL(Z,ae);return{isRelativeUrl:re&&re.hostname==="relative-site"&&re.protocol==="relative:",url:re}}function K(Z,ae){if(!ae)return Z;const re=Z.nodes[0];let ce;return ae[re.selector]&&ae["*"]?ce=s(ae[re.selector],ae["*"]):ce=ae[re.selector]||ae["*"],ce&&(Z.nodes[0].nodes=re.nodes.reduce(pe(ce),[])),Z}function te(Z){return Z.nodes[0].nodes.reduce(function(ae,re){return ae.push(`${re.prop}:${re.value}${re.important?" !important":""}`),ae},[]).join(";")}function pe(Z){return function(ae,re){return f(Z,re.prop)&&Z[re.prop].some(function(xe){return xe.test(re.value)})&&ae.push(re),ae}}function Ee(Z,ae,re){return ae?(Z=Z.split(/\s+/),Z.filter(function(ce){return ae.indexOf(ce)!==-1||re.some(function(xe){return xe.test(ce)})}).join(" ")):Z}}const w={decodeEntities:!0};return x.defaults={allowedTags:["address","article","aside","footer","header","h1","h2","h3","h4","h5","h6","hgroup","main","nav","section","blockquote","dd","div","dl","dt","figcaption","figure","hr","li","main","ol","p","pre","ul","a","abbr","b","bdi","bdo","br","cite","code","data","dfn","em","i","kbd","mark","q","rb","rp","rt","rtc","ruby","s","samp","small","span","strong","sub","sup","time","u","var","wbr","caption","col","colgroup","table","tbody","td","tfoot","th","thead","tr"],nonBooleanAttributes:["abbr","accept","accept-charset","accesskey","action","allow","alt","as","autocapitalize","autocomplete","blocking","charset","cite","class","color","cols","colspan","content","contenteditable","coords","crossorigin","data","datetime","decoding","dir","dirname","download","draggable","enctype","enterkeyhint","fetchpriority","for","form","formaction","formenctype","formmethod","formtarget","headers","height","hidden","high","href","hreflang","http-equiv","id","imagesizes","imagesrcset","inputmode","integrity","is","itemid","itemprop","itemref","itemtype","kind","label","lang","list","loading","low","max","maxlength","media","method","min","minlength","name","nonce","optimum","pattern","ping","placeholder","popover","popovertarget","popovertargetaction","poster","preload","referrerpolicy","rel","rows","rowspan","sandbox","scope","shape","size","sizes","slot","span","spellcheck","src","srcdoc","srclang","srcset","start","step","style","tabindex","target","title","translate","type","usemap","value","width","wrap","onauxclick","onafterprint","onbeforematch","onbeforeprint","onbeforeunload","onbeforetoggle","onblur","oncancel","oncanplay","oncanplaythrough","onchange","onclick","onclose","oncontextlost","oncontextmenu","oncontextrestored","oncopy","oncuechange","oncut","ondblclick","ondrag","ondragend","ondragenter","ondragleave","ondragover","ondragstart","ondrop","ondurationchange","onemptied","onended","onerror","onfocus","onformdata","onhashchange","oninput","oninvalid","onkeydown","onkeypress","onkeyup","onlanguagechange","onload","onloadeddata","onloadedmetadata","onloadstart","onmessage","onmessageerror","onmousedown","onmouseenter","onmouseleave","onmousemove","onmouseout","onmouseover","onmouseup","onoffline","ononline","onpagehide","onpageshow","onpaste","onpause","onplay","onplaying","onpopstate","onprogress","onratechange","onreset","onresize","onrejectionhandled","onscroll","onscrollend","onsecuritypolicyviolation","onseeked","onseeking","onselect","onslotchange","onstalled","onstorage","onsubmit","onsuspend","ontimeupdate","ontoggle","onunhandledrejection","onunload","onvolumechange","onwaiting","onwheel"],disallowedTagsMode:"discard",allowedAttributes:{a:["href","name","target"],img:["src","srcset","alt","title","width","height","loading"]},allowedEmptyAttributes:["alt"],selfClosing:["img","br","hr","area","base","basefont","input","link","meta"],allowedSchemes:["http","https","ftp","mailto","tel"],allowedSchemesByTag:{},allowedSchemesAppliedToAttributes:["href","src","cite"],allowProtocolRelative:!0,enforceHtmlBoundary:!1,parseStyleAttributes:!0},x.simpleTransform=function(b,g,v){return v=v===void 0?!0:v,g=g||{},function(_,N){let y;if(v)for(y in g)N[y]=g[y];else N=g;return{tagName:b,attribs:N}}},Ai}var lc;function sp(){if(lc)return Rr;lc=1;var e=Rr&&Rr.__importDefault||function(c){return c&&c.__esModule?c:{default:c}};Object.defineProperty(Rr,"__esModule",{value:!0}),Rr.TagTransformingSanitizer=void 0;const a=e(rn()),i=e(np()),s=ir(),r=Gi(),n=td();let u=class{constructor(d,f){this.sanitizationErrors=[],this.validate(d),r.Localization.validate(f),this.localization=f,this.options=d}sanitize(d){return(0,i.default)(d,this.generateSanitizeConfig())}getErrors(){return this.sanitizationErrors}generateSanitizeConfig(){return{allowedTags:n.StaticConfig.sanitization.allowedTags,allowedAttributes:{iframe:["src","width","height","frameborder","allowfullscreen","webkitallowfullscreen","mozallowfullscreen"],div:["class","title"],td:["style"],img:["src","alt"],a:["href","rel","title","class","target","id"]},allowedSchemes:["http","https","hive"],transformTags:{iframe:(d,f)=>{const o=f.src;for(const l of n.StaticConfig.sanitization.iframeWhitelist)if(l.re.test(o)){const p=typeof l.fn=="function"?l.fn(o):o;if(!p)break;return{tagName:"iframe",attribs:{src:p,width:this.options.iframeWidth+"",height:this.options.iframeHeight+"",frameborder:"0",allowfullscreen:"allowfullscreen",webkitallowfullscreen:"webkitallowfullscreen",mozallowfullscreen:"mozallowfullscreen"}}}return s.Log.log().warn('Blocked, did not match iframe "src" white list urls:',d,f),this.sanitizationErrors.push("Invalid iframe URL: "+o),{tagName:"div",text:`(Unsupported ${o})`,attribs:{}}},img:(d,f)=>{if(this.options.noImage)return{tagName:"div",text:this.localization.noImage,attribs:{}};const{src:o,alt:h}=f;if(!/^(https?:)?\/\//i.test(o))return s.Log.log().warn("Blocked, image tag src does not appear to be a url",d,f),this.sanitizationErrors.push("An image in this post did not save properly."),{tagName:"img",attribs:{src:"brokenimg.jpg"}};const l={};return l.src=o.replace(/^http:\/\//i,"//"),h&&h!==""&&(l.alt=h),{tagName:d,attribs:l}},div:(d,f)=>{const o={},l=["pull-right","pull-left","text-justify","text-rtl","text-center","text-right","videoWrapper","phishy"].find(x=>f.class===x);return l&&(o.class=l),l==="phishy"&&f.title===this.localization.phishingWarning&&(o.title=f.title),{tagName:d,attribs:o}},td:(d,f)=>{const o={};return f.style==="text-align:right"&&(o.style="text-align:right"),{tagName:d,attribs:o}},a:(d,f)=>{const o=Object.assign({},f);let{href:h}=f;return h&&(h=h.trim(),o.href=h),h&&!this.options.isLinkSafeFn(h)&&(o.rel=this.options.addNofollowToLinks?"nofollow noopener":"noopener",o.title=this.localization.phishingWarning,o.target=this.options.addTargetBlankToLinks?"_blank":"_self"),h&&this.options.addExternalCssClassToMatchingLinksFn(h)?o.class=this.options.cssClassForExternalLinks?this.options.cssClassForExternalLinks:"":o.class=this.options.cssClassForInternalLinks?this.options.cssClassForInternalLinks:"",{tagName:d,attribs:o}}}}}validate(d){(0,a.default)(d,"TagsSanitizerOptions",a.default.object),(0,a.default)(d.iframeWidth,"TagsSanitizerOptions.iframeWidth",a.default.number.integer.positive),(0,a.default)(d.iframeHeight,"TagsSanitizerOptions.iframeHeight",a.default.number.integer.positive),(0,a.default)(d.addNofollowToLinks,"TagsSanitizerOptions.addNofollowToLinks",a.default.boolean),(0,a.default)(d.addTargetBlankToLinks,"TagsSanitizerOptions.addTargetBlankToLinks",a.default.optional.boolean),(0,a.default)(d.cssClassForInternalLinks,"TagsSanitizerOptions.cssClassForInternalLinks",a.default.optional.string),(0,a.default)(d.cssClassForExternalLinks,"TagsSanitizerOptions.cssClassForExternalLinks",a.default.optional.string),(0,a.default)(d.noImage,"TagsSanitizerOptions.noImage",a.default.boolean),(0,a.default)(d.isLinkSafeFn,"TagsSanitizerOptions.isLinkSafeFn",a.default.function),(0,a.default)(d.addExternalCssClassToMatchingLinksFn,"TagsSanitizerOptions.addExternalCssClassToMatchingLinksFn",a.default.function)}};return Rr.TagTransformingSanitizer=u,Rr}var cc;function dc(){if(cc)return Sr;cc=1;var e=Sr&&Sr.__importDefault||function(f){return f&&f.__esModule?f:{default:f}};Object.defineProperty(Sr,"__esModule",{value:!0}),Sr.DefaultRenderer=void 0;const a=e(rn()),i=eh,s=dh(),r=Ph(),n=Gi(),u=$h(),c=sp();let d=class{constructor(o,h=n.Localization.DEFAULT){this.validate(o),this.options=o,n.Localization.validate(h),this.tagTransformingSanitizer=new c.TagTransformingSanitizer({iframeWidth:this.options.assetsWidth,iframeHeight:this.options.assetsHeight,addNofollowToLinks:this.options.addNofollowToLinks,addTargetBlankToLinks:this.options.addTargetBlankToLinks,cssClassForInternalLinks:this.options.cssClassForInternalLinks,cssClassForExternalLinks:this.options.cssClassForExternalLinks,noImage:this.options.doNotShowImages,isLinkSafeFn:this.options.isLinkSafeFn,addExternalCssClassToMatchingLinksFn:this.options.addExternalCssClassToMatchingLinksFn},h),this.domParser=new r.HtmlDOMParser({width:this.options.assetsWidth,height:this.options.assetsHeight,ipfsPrefix:this.options.ipfsPrefix,baseUrl:this.options.baseUrl,imageProxyFn:this.options.imageProxyFn,hashtagUrlFn:this.options.hashtagUrlFn,usertagUrlFn:this.options.usertagUrlFn,hideImages:this.options.doNotShowImages},h)}render(o){return(0,a.default)(o,"input",a.default.string.nonEmpty),this.doRender(o)}doRender(o){return o=u.PreliminarySanitizer.preliminarySanitize(o),o=this.isHtml(o)?o:this.renderMarkdown(o),o=this.wrapRenderedTextWithHtmlIfNeeded(o),o=this.domParser.parse(o).getParsedDocumentAsString(),o=this.sanitize(o),s.SecurityChecker.checkSecurity(o,{allowScriptTag:this.options.allowInsecureScriptTags}),o=this.domParser.embedder.insertAssets(o),o}renderMarkdown(o){return new i.Remarkable({html:!0,breaks:this.options.breaks,typographer:!1,quotes:"“”‘’"}).render(o)}wrapRenderedTextWithHtmlIfNeeded(o){return o.indexOf("<html>")!==0&&(o="<html>"+o+"</html>"),o}isHtml(o){let h=!1;const l=o.match(/^<html>([\S\s]*)<\/html>$/);return l&&l.length===2?(h=!0,o=l[1]):h=/^<p>[\S\s]*<\/p>/.test(o),h}sanitize(o){return this.options.skipSanitization?o:this.tagTransformingSanitizer.sanitize(o)}validate(o){(0,a.default)(o,"RendererOptions",a.default.object),(0,a.default)(o.baseUrl,"RendererOptions.baseUrl",a.default.string.nonEmpty),(0,a.default)(o.breaks,"RendererOptions.breaks",a.default.boolean),(0,a.default)(o.skipSanitization,"RendererOptions.skipSanitization",a.default.boolean),(0,a.default)(o.addNofollowToLinks,"RendererOptions.addNofollowToLinks",a.default.boolean),(0,a.default)(o.addTargetBlankToLinks,"RendererOptions.addTargetBlankToLinks",a.default.optional.boolean),(0,a.default)(o.cssClassForInternalLinks,"RendererOptions.cssClassForInternalLinks",a.default.optional.string),(0,a.default)(o.cssClassForExternalLinks,"RendererOptions.cssClassForExternalLinks",a.default.optional.string),(0,a.default)(o.doNotShowImages,"RendererOptions.doNotShowImages",a.default.boolean),(0,a.default)(o.ipfsPrefix,"RendererOptions.ipfsPrefix",a.default.optional.string),(0,a.default)(o.assetsWidth,"RendererOptions.assetsWidth",a.default.number.integer.positive),(0,a.default)(o.assetsHeight,"RendererOptions.assetsHeight",a.default.number.integer.positive),(0,a.default)(o.imageProxyFn,"RendererOptions.imageProxyFn",a.default.function),(0,a.default)(o.hashtagUrlFn,"RendererOptions.hashtagUrlFn",a.default.function),(0,a.default)(o.usertagUrlFn,"RendererOptions.usertagUrlFn",a.default.function),(0,a.default)(o.isLinkSafeFn,"RendererOptions.isLinkSafeFn",a.default.function),(0,a.default)(o.addExternalCssClassToMatchingLinksFn,"RendererOptions.addExternalCssClassToMatchingLinksFn",a.default.function)}};return Sr.DefaultRenderer=d,Sr}var fc;function ip(){return fc||(fc=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.HiveContentRenderer=e.DefaultRenderer=void 0;const a=dc();var i=dc();Object.defineProperty(e,"DefaultRenderer",{enumerable:!0,get:function(){return i.DefaultRenderer}}),e.HiveContentRenderer={DefaultRenderer:a.DefaultRenderer},e.default=e.HiveContentRenderer})(js)),js}var to=ip();function ro({author:e,permlink:a,defaultValue:i=100,onUpvote:s,onCancel:r}){const[n,u]=P.useState(i),[c,d]=P.useState(!1),f=[1,...Array.from({length:10},(h,l)=>(l+1)*10)],o=async()=>{if(!(n===0||c)){d(!0);try{await s(n)}finally{d(!1)}}};return t.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/70 backdrop-blur-sm p-4",children:t.jsxs("div",{className:"bg-white dark:bg-gray-900 rounded-2xl w-full max-w-md p-5 sm:p-6 shadow-xl flex flex-col",children:[t.jsxs("h2",{className:"text-center text-base sm:text-lg font-semibold text-gray-800 dark:text-white mb-6",children:["Vote for @",e]}),t.jsxs("div",{className:"relative w-full flex flex-col items-center mb-8",children:[t.jsxs("div",{className:"absolute -top-8 left-0",style:{left:`${n}%`,transform:"translateX(-50%)"},children:[t.jsxs("div",{className:"bg-blue-600 text-white text-xs sm:text-sm px-2 py-1 rounded-lg shadow",children:[n,"%"]}),t.jsx("div",{className:"mx-auto w-2 h-2 bg-blue-600 rotate-45 -mt-1"})]}),t.jsx("input",{type:"range",min:1,max:100,value:n,onChange:h=>u(Number(h.target.value)),className:"w-full h-2 rounded-lg appearance-none bg-gray-200 dark:bg-gray-700 accent-blue-600 cursor-pointer"}),t.jsx("div",{className:"flex justify-between w-full mt-3 ml-2 text-[10px] sm:text-xs text-gray-500 dark:text-gray-400",children:f.map(h=>t.jsx("button",{type:"button",onClick:()=>u(h),className:`focus:outline-none px-1 rounded transition
|
|
1091
|
+
`)});const k=g.nonTextTags||["script","style","textarea","option"];let j,E;g.allowedAttributes&&(j={},E={},d(g.allowedAttributes,function(Z,ae){j[ae]=[];const re=[];Z.forEach(function(ce){typeof ce=="string"&&ce.indexOf("*")>=0?re.push(r(ce).replace(/\\\*/g,".*")):j[ae].push(ce)}),re.length&&(E[ae]=new RegExp("^("+re.join("|")+")$"))}));const D={},C={},P={};d(g.allowedClasses,function(Z,ae){if(j&&(f(j,ae)||(j[ae]=[]),j[ae].push("class")),D[ae]=Z,Array.isArray(Z)){const re=[];D[ae]=[],P[ae]=[],Z.forEach(function(ce){typeof ce=="string"&&ce.indexOf("*")>=0?re.push(r(ce).replace(/\\\*/g,".*")):ce instanceof RegExp?P[ae].push(ce):D[ae].push(ce)}),re.length&&(C[ae]=new RegExp("^("+re.join("|")+")$"))}});const $={};let H;d(g.transformTags,function(Z,ae){let re;typeof Z=="function"?re=Z:typeof Z=="string"&&(re=x.simpleTransform(Z)),ae==="*"?H=re:$[ae]=re});let F,B,L,G,X,ee,R=!1;I();const se=new e.Parser({onopentag:function(Z,ae){if(g.enforceHtmlBoundary&&Z==="html"&&I(),X){ee++;return}const re=new y(Z,ae);B.push(re);let ce=!1;const xe=!!re.text;let ge;if(f($,Z)&&(ge=$[Z](Z,ae),re.attribs=ae=ge.attribs,ge.text!==void 0&&(re.innerText=ge.text),Z!==ge.tagName&&(re.name=Z=ge.tagName,G[F]=ge.tagName)),H&&(ge=H(Z,ae),re.attribs=ae=ge.attribs,Z!==ge.tagName&&(re.name=Z=ge.tagName,G[F]=ge.tagName)),(!m(Z)||g.disallowedTagsMode==="recursiveEscape"&&!h(L)||g.nestingLimit!=null&&F>=g.nestingLimit)&&(ce=!0,L[F]=!0,(g.disallowedTagsMode==="discard"||g.disallowedTagsMode==="completelyDiscard")&&k.indexOf(Z)!==-1&&(X=!0,ee=1),L[F]=!0),F++,ce){if(g.disallowedTagsMode==="discard"||g.disallowedTagsMode==="completelyDiscard")return;N=_,_=""}_+="<"+Z,Z==="script"&&(g.allowedScriptHostnames||g.allowedScriptDomains)&&(re.innerText=""),(!j||f(j,Z)||j["*"])&&d(ae,function(ke,me){if(!p.test(me)){delete re.attribs[me];return}if(ke===""&&!g.allowedEmptyAttributes.includes(me)&&(g.nonBooleanAttributes.includes(me)||g.nonBooleanAttributes.includes("*"))){delete re.attribs[me];return}let Ye=!1;if(!j||f(j,Z)&&j[Z].indexOf(me)!==-1||j["*"]&&j["*"].indexOf(me)!==-1||f(E,Z)&&E[Z].test(me)||E["*"]&&E["*"].test(me))Ye=!0;else if(j&&j[Z]){for(const we of j[Z])if(i(we)&&we.name&&we.name===me){Ye=!0;let fe="";if(we.multiple===!0){const Ae=ke.split(" ");for(const Pe of Ae)we.values.indexOf(Pe)!==-1&&(fe===""?fe=Pe:fe+=" "+Pe)}else we.values.indexOf(ke)>=0&&(fe=ke);ke=fe}}if(Ye){if(g.allowedSchemesAppliedToAttributes.indexOf(me)!==-1&&J(Z,ke)){delete re.attribs[me];return}if(Z==="script"&&me==="src"){let we=!0;try{const fe=oe(ke);if(g.allowedScriptHostnames||g.allowedScriptDomains){const Ae=(g.allowedScriptHostnames||[]).find(function(Ve){return Ve===fe.url.hostname}),Pe=(g.allowedScriptDomains||[]).find(function(Ve){return fe.url.hostname===Ve||fe.url.hostname.endsWith(`.${Ve}`)});we=Ae||Pe}}catch{we=!1}if(!we){delete re.attribs[me];return}}if(Z==="iframe"&&me==="src"){let we=!0;try{const fe=oe(ke);if(fe.isRelativeUrl)we=f(g,"allowIframeRelativeUrls")?g.allowIframeRelativeUrls:!g.allowedIframeHostnames&&!g.allowedIframeDomains;else if(g.allowedIframeHostnames||g.allowedIframeDomains){const Ae=(g.allowedIframeHostnames||[]).find(function(Ve){return Ve===fe.url.hostname}),Pe=(g.allowedIframeDomains||[]).find(function(Ve){return fe.url.hostname===Ve||fe.url.hostname.endsWith(`.${Ve}`)});we=Ae||Pe}}catch{we=!1}if(!we){delete re.attribs[me];return}}if(me==="srcset")try{let we=a(ke);if(we.forEach(function(fe){J("srcset",fe.url)&&(fe.evil=!0)}),we=o(we,function(fe){return!fe.evil}),we.length)ke=l(o(we,function(fe){return!fe.evil})),re.attribs[me]=ke;else{delete re.attribs[me];return}}catch{delete re.attribs[me];return}if(me==="class"){const we=D[Z],fe=D["*"],Ae=C[Z],Pe=P[Z],Ve=C["*"],St=[Ae,Ve].concat(Pe).filter(function(Jt){return Jt});if(we&&fe?ke=Ee(ke,s(we,fe),St):ke=Ee(ke,we||fe,St),!ke.length){delete re.attribs[me];return}}if(me==="style"){if(g.parseStyleAttributes)try{const we=n(Z+" {"+ke+"}",{map:!1}),fe=K(we,g.allowedStyles);if(ke=te(fe),ke.length===0){delete re.attribs[me];return}}catch{typeof window<"u"&&console.warn('Failed to parse "'+Z+" {"+ke+`}", If you're running this in a browser, we recommend to disable style parsing: options.parseStyleAttributes: false, since this only works in a node environment due to a postcss dependency, More info: https://github.com/apostrophecms/sanitize-html/issues/547`),delete re.attribs[me];return}else if(g.allowedStyles)throw new Error("allowedStyles option cannot be used together with parseStyleAttributes: false.")}_+=" "+me,ke&&ke.length?_+='="'+V(ke,!0)+'"':g.allowedEmptyAttributes.includes(me)&&(_+='=""')}else delete re.attribs[me]}),g.selfClosing.indexOf(Z)!==-1?_+=" />":(_+=">",re.innerText&&!xe&&!g.textFilter&&(_+=V(re.innerText),R=!0)),ce&&(_=N+V(_),N="")},ontext:function(Z){if(X)return;const ae=B[B.length-1];let re;if(ae&&(re=ae.tag,Z=ae.innerText!==void 0?ae.innerText:Z),g.disallowedTagsMode==="completelyDiscard"&&!m(re))Z="";else if((g.disallowedTagsMode==="discard"||g.disallowedTagsMode==="completelyDiscard")&&(re==="script"||re==="style"))_+=Z;else{const ce=V(Z,!1);g.textFilter&&!R?_+=g.textFilter(ce,re):R||(_+=ce)}if(B.length){const ce=B[B.length-1];ce.text+=Z}},onclosetag:function(Z,ae){if(X)if(ee--,!ee)X=!1;else return;const re=B.pop();if(!re)return;if(re.tag!==Z){B.push(re);return}X=g.enforceHtmlBoundary?Z==="html":!1,F--;const ce=L[F];if(ce){if(delete L[F],g.disallowedTagsMode==="discard"||g.disallowedTagsMode==="completelyDiscard"){re.updateParentNodeText();return}N=_,_=""}if(G[F]&&(Z=G[F],delete G[F]),g.exclusiveFilter&&g.exclusiveFilter(re)){_=_.substr(0,re.tagPosition);return}if(re.updateParentNodeMediaChildren(),re.updateParentNodeText(),g.selfClosing.indexOf(Z)!==-1||ae&&!m(Z)&&["escape","recursiveEscape"].indexOf(g.disallowedTagsMode)>=0){ce&&(_=N,N="");return}_+="</"+Z+">",ce&&(_=N+V(_),N=""),R=!1}},g.parser);return se.write(b),se.end(),_;function I(){_="",F=0,B=[],L={},G={},X=!1,ee=0}function V(Z,ae){return typeof Z!="string"&&(Z=Z+""),g.parser.decodeEntities&&(Z=Z.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">"),ae&&(Z=Z.replace(/"/g,"""))),Z=Z.replace(/&(?![a-zA-Z0-9#]{1,20};)/g,"&").replace(/</g,"<").replace(/>/g,">"),ae&&(Z=Z.replace(/"/g,""")),Z}function J(Z,ae){for(ae=ae.replace(/[\x00-\x20]+/g,"");;){const xe=ae.indexOf("<!--");if(xe===-1)break;const ge=ae.indexOf("-->",xe+4);if(ge===-1)break;ae=ae.substring(0,xe)+ae.substring(ge+3)}const re=ae.match(/^([a-zA-Z][a-zA-Z0-9.\-+]*):/);if(!re)return ae.match(/^[/\\]{2}/)?!g.allowProtocolRelative:!1;const ce=re[1].toLowerCase();return f(g.allowedSchemesByTag,Z)?g.allowedSchemesByTag[Z].indexOf(ce)===-1:!g.allowedSchemes||g.allowedSchemes.indexOf(ce)===-1}function oe(Z){if(Z=Z.replace(/^(\w+:)?\s*[\\/]\s*[\\/]/,"$1//"),Z.startsWith("relative:"))throw new Error("relative: exploit attempt");let ae="relative://relative-site";for(let xe=0;xe<100;xe++)ae+=`/${xe}`;const re=new URL(Z,ae);return{isRelativeUrl:re&&re.hostname==="relative-site"&&re.protocol==="relative:",url:re}}function K(Z,ae){if(!ae)return Z;const re=Z.nodes[0];let ce;return ae[re.selector]&&ae["*"]?ce=s(ae[re.selector],ae["*"]):ce=ae[re.selector]||ae["*"],ce&&(Z.nodes[0].nodes=re.nodes.reduce(pe(ce),[])),Z}function te(Z){return Z.nodes[0].nodes.reduce(function(ae,re){return ae.push(`${re.prop}:${re.value}${re.important?" !important":""}`),ae},[]).join(";")}function pe(Z){return function(ae,re){return f(Z,re.prop)&&Z[re.prop].some(function(xe){return xe.test(re.value)})&&ae.push(re),ae}}function Ee(Z,ae,re){return ae?(Z=Z.split(/\s+/),Z.filter(function(ce){return ae.indexOf(ce)!==-1||re.some(function(xe){return xe.test(ce)})}).join(" ")):Z}}const w={decodeEntities:!0};return x.defaults={allowedTags:["address","article","aside","footer","header","h1","h2","h3","h4","h5","h6","hgroup","main","nav","section","blockquote","dd","div","dl","dt","figcaption","figure","hr","li","main","ol","p","pre","ul","a","abbr","b","bdi","bdo","br","cite","code","data","dfn","em","i","kbd","mark","q","rb","rp","rt","rtc","ruby","s","samp","small","span","strong","sub","sup","time","u","var","wbr","caption","col","colgroup","table","tbody","td","tfoot","th","thead","tr"],nonBooleanAttributes:["abbr","accept","accept-charset","accesskey","action","allow","alt","as","autocapitalize","autocomplete","blocking","charset","cite","class","color","cols","colspan","content","contenteditable","coords","crossorigin","data","datetime","decoding","dir","dirname","download","draggable","enctype","enterkeyhint","fetchpriority","for","form","formaction","formenctype","formmethod","formtarget","headers","height","hidden","high","href","hreflang","http-equiv","id","imagesizes","imagesrcset","inputmode","integrity","is","itemid","itemprop","itemref","itemtype","kind","label","lang","list","loading","low","max","maxlength","media","method","min","minlength","name","nonce","optimum","pattern","ping","placeholder","popover","popovertarget","popovertargetaction","poster","preload","referrerpolicy","rel","rows","rowspan","sandbox","scope","shape","size","sizes","slot","span","spellcheck","src","srcdoc","srclang","srcset","start","step","style","tabindex","target","title","translate","type","usemap","value","width","wrap","onauxclick","onafterprint","onbeforematch","onbeforeprint","onbeforeunload","onbeforetoggle","onblur","oncancel","oncanplay","oncanplaythrough","onchange","onclick","onclose","oncontextlost","oncontextmenu","oncontextrestored","oncopy","oncuechange","oncut","ondblclick","ondrag","ondragend","ondragenter","ondragleave","ondragover","ondragstart","ondrop","ondurationchange","onemptied","onended","onerror","onfocus","onformdata","onhashchange","oninput","oninvalid","onkeydown","onkeypress","onkeyup","onlanguagechange","onload","onloadeddata","onloadedmetadata","onloadstart","onmessage","onmessageerror","onmousedown","onmouseenter","onmouseleave","onmousemove","onmouseout","onmouseover","onmouseup","onoffline","ononline","onpagehide","onpageshow","onpaste","onpause","onplay","onplaying","onpopstate","onprogress","onratechange","onreset","onresize","onrejectionhandled","onscroll","onscrollend","onsecuritypolicyviolation","onseeked","onseeking","onselect","onslotchange","onstalled","onstorage","onsubmit","onsuspend","ontimeupdate","ontoggle","onunhandledrejection","onunload","onvolumechange","onwaiting","onwheel"],disallowedTagsMode:"discard",allowedAttributes:{a:["href","name","target"],img:["src","srcset","alt","title","width","height","loading"]},allowedEmptyAttributes:["alt"],selfClosing:["img","br","hr","area","base","basefont","input","link","meta"],allowedSchemes:["http","https","ftp","mailto","tel"],allowedSchemesByTag:{},allowedSchemesAppliedToAttributes:["href","src","cite"],allowProtocolRelative:!0,enforceHtmlBoundary:!1,parseStyleAttributes:!0},x.simpleTransform=function(b,g,v){return v=v===void 0?!0:v,g=g||{},function(_,N){let y;if(v)for(y in g)N[y]=g[y];else N=g;return{tagName:b,attribs:N}}},Si}var fc;function sp(){if(fc)return Rr;fc=1;var e=Rr&&Rr.__importDefault||function(c){return c&&c.__esModule?c:{default:c}};Object.defineProperty(Rr,"__esModule",{value:!0}),Rr.TagTransformingSanitizer=void 0;const r=e(rn()),i=e(np()),s=ir(),a=Ji(),n=nd();let u=class{constructor(d,f){this.sanitizationErrors=[],this.validate(d),a.Localization.validate(f),this.localization=f,this.options=d}sanitize(d){return(0,i.default)(d,this.generateSanitizeConfig())}getErrors(){return this.sanitizationErrors}generateSanitizeConfig(){return{allowedTags:n.StaticConfig.sanitization.allowedTags,allowedAttributes:{iframe:["src","width","height","frameborder","allowfullscreen","webkitallowfullscreen","mozallowfullscreen"],div:["class","title"],td:["style"],img:["src","alt"],a:["href","rel","title","class","target","id"]},allowedSchemes:["http","https","hive"],transformTags:{iframe:(d,f)=>{const o=f.src;for(const l of n.StaticConfig.sanitization.iframeWhitelist)if(l.re.test(o)){const p=typeof l.fn=="function"?l.fn(o):o;if(!p)break;return{tagName:"iframe",attribs:{src:p,width:this.options.iframeWidth+"",height:this.options.iframeHeight+"",frameborder:"0",allowfullscreen:"allowfullscreen",webkitallowfullscreen:"webkitallowfullscreen",mozallowfullscreen:"mozallowfullscreen"}}}return s.Log.log().warn('Blocked, did not match iframe "src" white list urls:',d,f),this.sanitizationErrors.push("Invalid iframe URL: "+o),{tagName:"div",text:`(Unsupported ${o})`,attribs:{}}},img:(d,f)=>{if(this.options.noImage)return{tagName:"div",text:this.localization.noImage,attribs:{}};const{src:o,alt:h}=f;if(!/^(https?:)?\/\//i.test(o))return s.Log.log().warn("Blocked, image tag src does not appear to be a url",d,f),this.sanitizationErrors.push("An image in this post did not save properly."),{tagName:"img",attribs:{src:"brokenimg.jpg"}};const l={};return l.src=o.replace(/^http:\/\//i,"//"),h&&h!==""&&(l.alt=h),{tagName:d,attribs:l}},div:(d,f)=>{const o={},l=["pull-right","pull-left","text-justify","text-rtl","text-center","text-right","videoWrapper","phishy"].find(x=>f.class===x);return l&&(o.class=l),l==="phishy"&&f.title===this.localization.phishingWarning&&(o.title=f.title),{tagName:d,attribs:o}},td:(d,f)=>{const o={};return f.style==="text-align:right"&&(o.style="text-align:right"),{tagName:d,attribs:o}},a:(d,f)=>{const o=Object.assign({},f);let{href:h}=f;return h&&(h=h.trim(),o.href=h),h&&!this.options.isLinkSafeFn(h)&&(o.rel=this.options.addNofollowToLinks?"nofollow noopener":"noopener",o.title=this.localization.phishingWarning,o.target=this.options.addTargetBlankToLinks?"_blank":"_self"),h&&this.options.addExternalCssClassToMatchingLinksFn(h)?o.class=this.options.cssClassForExternalLinks?this.options.cssClassForExternalLinks:"":o.class=this.options.cssClassForInternalLinks?this.options.cssClassForInternalLinks:"",{tagName:d,attribs:o}}}}}validate(d){(0,r.default)(d,"TagsSanitizerOptions",r.default.object),(0,r.default)(d.iframeWidth,"TagsSanitizerOptions.iframeWidth",r.default.number.integer.positive),(0,r.default)(d.iframeHeight,"TagsSanitizerOptions.iframeHeight",r.default.number.integer.positive),(0,r.default)(d.addNofollowToLinks,"TagsSanitizerOptions.addNofollowToLinks",r.default.boolean),(0,r.default)(d.addTargetBlankToLinks,"TagsSanitizerOptions.addTargetBlankToLinks",r.default.optional.boolean),(0,r.default)(d.cssClassForInternalLinks,"TagsSanitizerOptions.cssClassForInternalLinks",r.default.optional.string),(0,r.default)(d.cssClassForExternalLinks,"TagsSanitizerOptions.cssClassForExternalLinks",r.default.optional.string),(0,r.default)(d.noImage,"TagsSanitizerOptions.noImage",r.default.boolean),(0,r.default)(d.isLinkSafeFn,"TagsSanitizerOptions.isLinkSafeFn",r.default.function),(0,r.default)(d.addExternalCssClassToMatchingLinksFn,"TagsSanitizerOptions.addExternalCssClassToMatchingLinksFn",r.default.function)}};return Rr.TagTransformingSanitizer=u,Rr}var hc;function pc(){if(hc)return Sr;hc=1;var e=Sr&&Sr.__importDefault||function(f){return f&&f.__esModule?f:{default:f}};Object.defineProperty(Sr,"__esModule",{value:!0}),Sr.DefaultRenderer=void 0;const r=e(rn()),i=eh,s=dh(),a=Ph(),n=Ji(),u=$h(),c=sp();let d=class{constructor(o,h=n.Localization.DEFAULT){this.validate(o),this.options=o,n.Localization.validate(h),this.tagTransformingSanitizer=new c.TagTransformingSanitizer({iframeWidth:this.options.assetsWidth,iframeHeight:this.options.assetsHeight,addNofollowToLinks:this.options.addNofollowToLinks,addTargetBlankToLinks:this.options.addTargetBlankToLinks,cssClassForInternalLinks:this.options.cssClassForInternalLinks,cssClassForExternalLinks:this.options.cssClassForExternalLinks,noImage:this.options.doNotShowImages,isLinkSafeFn:this.options.isLinkSafeFn,addExternalCssClassToMatchingLinksFn:this.options.addExternalCssClassToMatchingLinksFn},h),this.domParser=new a.HtmlDOMParser({width:this.options.assetsWidth,height:this.options.assetsHeight,ipfsPrefix:this.options.ipfsPrefix,baseUrl:this.options.baseUrl,imageProxyFn:this.options.imageProxyFn,hashtagUrlFn:this.options.hashtagUrlFn,usertagUrlFn:this.options.usertagUrlFn,hideImages:this.options.doNotShowImages},h)}render(o){return(0,r.default)(o,"input",r.default.string.nonEmpty),this.doRender(o)}doRender(o){return o=u.PreliminarySanitizer.preliminarySanitize(o),o=this.isHtml(o)?o:this.renderMarkdown(o),o=this.wrapRenderedTextWithHtmlIfNeeded(o),o=this.domParser.parse(o).getParsedDocumentAsString(),o=this.sanitize(o),s.SecurityChecker.checkSecurity(o,{allowScriptTag:this.options.allowInsecureScriptTags}),o=this.domParser.embedder.insertAssets(o),o}renderMarkdown(o){return new i.Remarkable({html:!0,breaks:this.options.breaks,typographer:!1,quotes:"“”‘’"}).render(o)}wrapRenderedTextWithHtmlIfNeeded(o){return o.indexOf("<html>")!==0&&(o="<html>"+o+"</html>"),o}isHtml(o){let h=!1;const l=o.match(/^<html>([\S\s]*)<\/html>$/);return l&&l.length===2?(h=!0,o=l[1]):h=/^<p>[\S\s]*<\/p>/.test(o),h}sanitize(o){return this.options.skipSanitization?o:this.tagTransformingSanitizer.sanitize(o)}validate(o){(0,r.default)(o,"RendererOptions",r.default.object),(0,r.default)(o.baseUrl,"RendererOptions.baseUrl",r.default.string.nonEmpty),(0,r.default)(o.breaks,"RendererOptions.breaks",r.default.boolean),(0,r.default)(o.skipSanitization,"RendererOptions.skipSanitization",r.default.boolean),(0,r.default)(o.addNofollowToLinks,"RendererOptions.addNofollowToLinks",r.default.boolean),(0,r.default)(o.addTargetBlankToLinks,"RendererOptions.addTargetBlankToLinks",r.default.optional.boolean),(0,r.default)(o.cssClassForInternalLinks,"RendererOptions.cssClassForInternalLinks",r.default.optional.string),(0,r.default)(o.cssClassForExternalLinks,"RendererOptions.cssClassForExternalLinks",r.default.optional.string),(0,r.default)(o.doNotShowImages,"RendererOptions.doNotShowImages",r.default.boolean),(0,r.default)(o.ipfsPrefix,"RendererOptions.ipfsPrefix",r.default.optional.string),(0,r.default)(o.assetsWidth,"RendererOptions.assetsWidth",r.default.number.integer.positive),(0,r.default)(o.assetsHeight,"RendererOptions.assetsHeight",r.default.number.integer.positive),(0,r.default)(o.imageProxyFn,"RendererOptions.imageProxyFn",r.default.function),(0,r.default)(o.hashtagUrlFn,"RendererOptions.hashtagUrlFn",r.default.function),(0,r.default)(o.usertagUrlFn,"RendererOptions.usertagUrlFn",r.default.function),(0,r.default)(o.isLinkSafeFn,"RendererOptions.isLinkSafeFn",r.default.function),(0,r.default)(o.addExternalCssClassToMatchingLinksFn,"RendererOptions.addExternalCssClassToMatchingLinksFn",r.default.function)}};return Sr.DefaultRenderer=d,Sr}var mc;function ip(){return mc||(mc=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.HiveContentRenderer=e.DefaultRenderer=void 0;const r=pc();var i=pc();Object.defineProperty(e,"DefaultRenderer",{enumerable:!0,get:function(){return i.DefaultRenderer}}),e.HiveContentRenderer={DefaultRenderer:r.DefaultRenderer},e.default=e.HiveContentRenderer})(Es)),Es}var ro=ip();function ao({author:e,permlink:r,defaultValue:i=100,onUpvote:s,onCancel:a}){const[n,u]=O.useState(i),[c,d]=O.useState(!1),f=[1,...Array.from({length:10},(h,l)=>(l+1)*10)],o=async()=>{if(!(n===0||c)){d(!0);try{await s(n)}finally{d(!1)}}};return t.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/70 backdrop-blur-sm p-4",children:t.jsxs("div",{className:"bg-white dark:bg-gray-900 rounded-2xl w-full max-w-md p-5 sm:p-6 shadow-xl flex flex-col",children:[t.jsxs("h2",{className:"text-center text-base sm:text-lg font-semibold text-gray-800 dark:text-white mb-6",children:["Vote for @",e]}),t.jsxs("div",{className:"relative w-full flex flex-col items-center mb-8",children:[t.jsxs("div",{className:"absolute -top-8 left-0",style:{left:`${n}%`,transform:"translateX(-50%)"},children:[t.jsxs("div",{className:"bg-blue-600 text-white text-xs sm:text-sm px-2 py-1 rounded-lg shadow",children:[n,"%"]}),t.jsx("div",{className:"mx-auto w-2 h-2 bg-blue-600 rotate-45 -mt-1"})]}),t.jsx("input",{type:"range",min:1,max:100,value:n,onChange:h=>u(Number(h.target.value)),className:"w-full h-2 rounded-lg appearance-none bg-gray-200 dark:bg-gray-700 accent-blue-600 cursor-pointer"}),t.jsx("div",{className:"flex justify-between w-full mt-3 ml-2 text-[10px] sm:text-xs text-gray-500 dark:text-gray-400",children:f.map(h=>t.jsx("button",{type:"button",onClick:()=>u(h),className:`focus:outline-none px-1 rounded transition
|
|
1092
1092
|
${n===h?"text-blue-600 font-bold":"hover:text-blue-700 hover:bg-blue-50 dark:hover:bg-gray-700"}`,style:{background:"none",border:"none",cursor:"pointer"},children:h},h))})]}),t.jsxs("div",{className:"flex gap-3",children:[t.jsx("button",{onClick:o,disabled:n===0||c,className:`flex-1 flex items-center justify-center rounded-full font-semibold transition
|
|
1093
1093
|
text-sm sm:text-base px-3 py-2 sm:px-4 sm:py-3 shadow
|
|
1094
|
-
${n===0||c?"bg-blue-300 text-white cursor-not-allowed":"bg-blue-600 hover:bg-blue-700 text-white"}`,children:c?t.jsxs(t.Fragment,{children:[t.jsx(z.Loader2,{className:"w-4 h-4 sm:w-5 sm:h-5 mr-1 animate-spin"}),"Voting..."]}):t.jsxs(t.Fragment,{children:[t.jsx(z.ThumbsUp,{className:"w-4 h-4 sm:w-5 sm:h-5 mr-1"}),"Vote"]})}),t.jsxs("button",{onClick:
|
|
1094
|
+
${n===0||c?"bg-blue-300 text-white cursor-not-allowed":"bg-blue-600 hover:bg-blue-700 text-white"}`,children:c?t.jsxs(t.Fragment,{children:[t.jsx(z.Loader2,{className:"w-4 h-4 sm:w-5 sm:h-5 mr-1 animate-spin"}),"Voting..."]}):t.jsxs(t.Fragment,{children:[t.jsx(z.ThumbsUp,{className:"w-4 h-4 sm:w-5 sm:h-5 mr-1"}),"Vote"]})}),t.jsxs("button",{onClick:a,disabled:c,className:`flex-1 flex items-center justify-center rounded-full font-semibold text-sm sm:text-base px-3 py-2 sm:px-4 sm:py-3 shadow
|
|
1095
1095
|
bg-gray-300 hover:bg-gray-400 dark:bg-gray-700 dark:hover:bg-gray-600 text-gray-800 dark:text-white
|
|
1096
|
-
disabled:opacity-50 disabled:cursor-not-allowed`,children:[t.jsx(z.X,{className:"w-4 h-4 sm:w-5 sm:h-5 mr-1"}),"Cancel"]})]})]})})}const bd=({comment:e,allComments:a,onReply:i,currentUser:s,token:r,searchQuery:n,depth:u=0,onVotedRefresh:c,onClickCommentUpvote:d,onClickCommentReply:f,onClickUpvoteButton:o})=>{const[h,l]=P.useState(!1),[p,x]=P.useState(!0),[w,b]=P.useState(!1),g=P.useMemo(()=>{const K=e.active_votes||[];if(!s)return!1;const te=s.toLowerCase();return K.some(pe=>(pe.voter||"").toLowerCase()===te)},[e.active_votes,s]),[v,_]=P.useState(!1),[N,y]=P.useState(""),[m,k]=P.useState(!1),j=K=>{y(K),_(!0),setTimeout(()=>_(!1),2500)},A=e.depth||0;let C=a.filter(K=>K.parent_author===e.author&&K.parent_permlink===e.permlink&&(typeof K.depth!="number"||K.depth===A+1));if((!C||C.length===0)&&Array.isArray(e.replies)&&e.replies.length>0){const K=new Set(e.replies);C=a.filter(te=>K.has(`${te.author}/${te.permlink}`))}const O=C.length>0,L=u>=4,H=(K,te)=>{if(!te)return K;const pe=new RegExp(`(${te})`,"gi");return K.replace(pe,'<mark class="bg-yellow-200 dark:bg-yellow-800">$1</mark>')},F=()=>{b(!0)},B=async K=>{if(d){try{await Promise.resolve(d(e.author,e.permlink,K)),l(!0),b(!1),setTimeout(()=>{c?.(),j("Vote submitted successfully!")},3e3)}catch(te){const pe=te instanceof Error?te.message:"Failed to upvote";alert(pe)}return}if(!r){j("Please login or provide an upvote handler to vote");return}try{const te=Math.round(K*100);await Re.handleUpvote({author:e.author,permlink:e.permlink,weight:te,authToken:r}),l(!0),b(!1),k(!0),setTimeout(()=>{c?.(),k(!1),j("Vote submitted successfully ✅")},3e3)}catch(te){const pe=te instanceof Error?te.message:"Failed to upvote";alert(pe)}},$=()=>{s?i(e.author,e.permlink):j("Please login to upvote")},G=e.json_metadata_parsed||(()=>{try{return e.json_metadata?JSON.parse(e.json_metadata):void 0}catch{return}})(),X=e.body||"",R=(K=>{const te=/^(\s*(?:#[\p{L}\p{N}_-]+\s*(?:,\s*)?)+\s*)$/gimu;return K.replace(te,"").trim()})(X),se=n?H(R,n):R,I=/!\[[^\]]*\]\([^)]+\)/.test(R)||/<img\s/i.test(R),V=Array.isArray(G?.image)?G.image:[],J=new to.DefaultRenderer({baseUrl:"https://hive.blog/",breaks:!0,skipSanitization:!1,allowInsecureScriptTags:!1,addNofollowToLinks:!0,doNotShowImages:!1,assetsWidth:640,assetsHeight:480,imageProxyFn:K=>K,usertagUrlFn:K=>`/@${K}`,hashtagUrlFn:K=>`/trending/${K}`,isLinkSafeFn:K=>!0,addExternalCssClassToMatchingLinksFn:K=>!0,ipfsPrefix:"https://ipfs.io/ipfs/"}),oe=e.stats?.total_votes||e.net_votes||0;return t.jsxs("div",{className:`${u>0?"ml-4 md:ml-8 border-l-2 border-gray-200 dark:border-gray-700 pl-4 md:pl-6":""}`,children:[t.jsx("div",{className:"group hover:bg-gray-50 dark:hover:bg-gray-800/50 transition-colors duration-200 p-4 md:p-6",children:t.jsxs("div",{className:"flex items-start space-x-3 md:space-x-4",children:[t.jsx("div",{className:"flex-shrink-0",children:t.jsx("img",{src:`https://images.hive.blog/u/${e.author}/avatar`,alt:e.author,className:"w-8 h-8 md:w-10 md:h-10 rounded-full object-cover ring-2 ring-gray-200 dark:ring-gray-700",onError:K=>{K.target.src=`https://ui-avatars.com/api/?name=${e.author}&background=random`}})}),t.jsxs("div",{className:"flex-1 min-w-0",children:[t.jsxs("div",{className:"flex items-center flex-wrap gap-2 mb-2",children:[t.jsxs("button",{className:"font-semibold text-gray-900 dark:text-white hover:text-blue-600 dark:hover:text-blue-400 transition-colors duration-200 text-sm md:text-base",onClick:()=>{},children:["@",e.author]}),t.jsxs("div",{className:"flex items-center text-xs md:text-sm text-gray-500 dark:text-gray-400 space-x-1",children:[t.jsx(z.Clock,{className:"w-3 h-3 md:w-4 md:h-4"}),t.jsx("span",{children:ns.formatDistanceToNow(new Date(e.created+"Z"),{addSuffix:!0})})]}),e.author===s&&t.jsx("span",{className:"px-2 py-1 text-xs bg-blue-100 dark:bg-blue-900 text-blue-800 dark:text-blue-200 rounded-full",children:"You"})]}),t.jsx("div",{className:"prose prose-sm md:prose-base dark:prose-invert max-w-none mb-3 comment-content text-left text-gray-900 dark:text-gray-100 prose-a:text-blue-600 dark:prose-a:text-blue-400 [&>*]:text-left",children:n?t.jsx("div",{className:"text-left",dangerouslySetInnerHTML:{__html:se}}):t.jsx("div",{className:"text-left",dangerouslySetInnerHTML:{__html:J.render(R)}})}),!I&&V.length>0&&t.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3 mb-3",children:V.map((K,te)=>t.jsx("img",{src:K,alt:`image-${te}`,className:"max-w-full h-auto rounded-lg shadow-sm cursor-pointer hover:shadow-md transition-shadow duration-200",onClick:()=>window.open(K,"_blank")},K+te))}),t.jsxs("div",{className:"flex items-center space-x-4 md:space-x-6",children:[t.jsxs("button",{onClick:()=>{if(d){if(!s){j("Please login to upvote");return}if(g||h){j("You have already upvoted this comment");return}F()}else if(o){if(!s){j("Please login to upvote");return}if(g||h){j("You have already upvoted this comment");return}F()}else{if(!s){j("Please login to upvote");return}r?g?j("You have already upvoted this comment"):F():(c?.(),j("Vote submitted successfully ✅"))}},className:`flex items-center space-x-1 md:space-x-2 text-xs md:text-sm font-medium transition-colors duration-200 ${h?"text-blue-600 dark:text-blue-400":"text-gray-500 dark:text-gray-400 hover:text-blue-600 dark:hover:text-blue-400"}`,children:[t.jsx(z.ThumbsUp,{className:`w-4 h-4 ${g||h?"fill-current text-blue-600 dark:text-blue-400":""}`}),t.jsx("span",{children:oe})]}),t.jsxs("button",{onClick:()=>{f?f(e):$()},className:"flex items-center space-x-1 md:space-x-2 text-xs md:text-sm font-medium text-gray-500 dark:text-gray-400 hover:text-blue-600 dark:hover:text-blue-400 transition-colors duration-200",children:[t.jsx(z.MessageSquare,{className:"w-4 h-4"}),t.jsx("span",{children:"Reply"})]}),O&&t.jsx("button",{onClick:()=>x(!p),className:"flex items-center space-x-1 md:space-x-2 text-xs md:text-sm font-medium text-gray-500 dark:text-gray-400 hover:text-blue-600 dark:hover:text-blue-400 transition-colors duration-200",children:t.jsxs("span",{children:[p?"Hide":"Show"," ",C.length," ",C.length===1?"reply":"replies"]})}),t.jsx("button",{onClick:()=>f?.(e),className:"opacity-0 group-hover:opacity-100 p-1 rounded-full hover:bg-gray-200 dark:hover:bg-gray-700 transition-all duration-200",children:t.jsx(z.MoreHorizontal,{className:"w-4 h-4 text-gray-400"})})]}),w&&!g&&t.jsx("div",{className:"mt-3",children:t.jsx(ro,{author:e.author,permlink:e.permlink,onUpvote:B,onCancel:()=>b(!1)})}),m&&t.jsxs("div",{className:"mt-3 inline-flex items-center text-xs text-gray-500 dark:text-gray-400",children:[t.jsx("span",{className:"w-4 h-4 border-2 border-blue-500 border-t-transparent rounded-full animate-spin mr-2"}),"Updating votes..."]}),v&&t.jsx("div",{className:"fixed bottom-4 right-4 w-[280px] z-50",children:t.jsx("div",{className:"bg-gray-800 text-white rounded px-3 py-2 shadow-lg text-sm",children:N})})]})]})}),O&&p&&!L&&t.jsx("div",{className:"space-y-0",children:C.map(K=>t.jsx(bd,{comment:K,allComments:a,onReply:i,currentUser:s,searchQuery:n,depth:u+1,onVotedRefresh:c,onClickCommentUpvote:d,onClickCommentReply:f,onClickUpvoteButton:o},K.permlink))}),O&&L&&t.jsx("div",{className:"ml-4 md:ml-8 p-3 text-sm text-gray-500 dark:text-gray-400 border-l-2 border-gray-200 dark:border-gray-700 pl-4",children:t.jsxs("button",{onClick:()=>{console.log("Show more replies for:",e.author,e.permlink)},className:"text-blue-600 dark:text-blue-400 hover:underline",children:["View ",C.length," more ",C.length===1?"reply":"replies"]})})]})},xd=({onSubmit:e,onCancel:a,currentUser:i,placeholder:s="Write your comment...",parentAuthor:r,parentPermlink:n})=>{const[u,c]=P.useState(""),[d,f]=P.useState(!1),o=P.useRef(null);P.useEffect(()=>{o.current&&o.current.focus()},[]);const h=async()=>{if(!(!u.trim()||d)){f(!0);try{await e(u.trim()),c("")}catch(p){console.error("Failed to submit comment:",p)}finally{f(!1)}}},l=p=>{p.key==="Enter"&&(p.metaKey||p.ctrlKey)&&(p.preventDefault(),h()),p.key==="Escape"&&a()};return t.jsxs("div",{className:"p-4 md:p-6 space-y-4 bg-white dark:bg-gray-800",children:[t.jsxs("div",{className:"flex items-center justify-start space-x-3 text-left",children:[t.jsx("div",{className:"flex-shrink-0",children:i?t.jsx("img",{src:`https://images.hive.blog/u/${i}/avatar`,alt:i,className:"w-10 h-10 rounded-full object-cover border-2 border-gray-200 dark:border-gray-600",onError:p=>{p.target.src=`https://ui-avatars.com/api/?name=${i}&background=random`}}):t.jsx("div",{className:"w-10 h-10 rounded-full bg-gray-200 dark:bg-gray-600 flex items-center justify-center",children:t.jsx(z.User,{className:"w-6 h-6 text-gray-500 dark:text-gray-400"})})}),t.jsxs("div",{className:"flex-1 min-w-0 text-left",children:[t.jsx("div",{className:"text-sm text-gray-900 dark:text-white font-medium",children:i?`@${i}`:"Anonymous"}),r&&t.jsxs("div",{className:"text-xs text-gray-500 dark:text-gray-400",children:["Replying to @",r]})]})]}),t.jsx("div",{className:"relative",children:t.jsx("textarea",{ref:o,value:u,onChange:p=>c(p.target.value),onKeyDown:l,placeholder:s,disabled:d,className:"w-full min-h-[100px] max-h-[300px] p-4 border border-gray-200 dark:border-gray-600 rounded-lg resize-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500 bg-white dark:bg-gray-700 text-gray-900 dark:text-white placeholder-gray-500 dark:placeholder-gray-400 transition-colors duration-200 disabled:opacity-50",style:{height:"auto"},onInput:p=>{const x=p.target;x.style.height="auto",x.style.height=x.scrollHeight+"px"}})}),t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsx("div",{className:"text-xs text-gray-500 dark:text-gray-400",children:"Press Cmd+Enter to post"}),t.jsxs("div",{className:"flex items-center space-x-3",children:[t.jsx("button",{onClick:a,disabled:d,className:"px-4 py-2 text-gray-600 dark:text-gray-400 hover:text-gray-800 dark:hover:text-gray-200 transition-colors duration-200 disabled:opacity-50",children:"Cancel"}),t.jsx("button",{onClick:h,disabled:d||!u.trim(),className:"px-6 py-2 bg-blue-500 hover:bg-blue-600 disabled:bg-gray-300 dark:disabled:bg-gray-600 text-white rounded-lg font-medium transition-all duration-200 transform hover:scale-[1.02] disabled:transform-none disabled:opacity-50 flex items-center space-x-2",children:d?t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"w-4 h-4 border-2 border-white border-t-transparent rounded-full animate-spin"}),t.jsx("span",{children:"Posting..."})]}):t.jsxs(t.Fragment,{children:[t.jsx(z.Send,{className:"w-4 h-4"}),t.jsx("span",{children:"Post"})]})})]})]})]})},op=({parentAuthor:e,parentPermlink:a,onClose:i,onCommentSubmitted:s,currentUser:r})=>{const[n,u]=P.useState(!1),c=async d=>{if(!(!d.trim()||n)){u(!0);try{await s(e,a,d),i()}catch(f){console.error("Failed to submit reply:",f)}finally{u(!1)}}};return P.useEffect(()=>{const d=f=>{f.key==="Escape"&&i()};return document.addEventListener("keydown",d),()=>document.removeEventListener("keydown",d)},[i]),t.jsx("div",{className:"fixed inset-0 bg-black/50 backdrop-blur-sm flex items-center justify-center z-50 p-4",children:t.jsxs("div",{className:"bg-white dark:bg-gray-800 rounded-xl shadow-2xl w-full max-w-2xl max-h-[90vh] flex flex-col overflow-hidden",children:[t.jsxs("div",{className:"flex items-center justify-between p-4 md:p-6 border-b border-gray-200 dark:border-gray-700 bg-gray-50 dark:bg-gray-900/50",children:[t.jsxs("div",{className:"flex items-center space-x-3",children:[t.jsx("div",{className:"p-2 bg-blue-100 dark:bg-blue-900 rounded-lg",children:t.jsx(z.Send,{className:"w-5 h-5 text-blue-600 dark:text-blue-400"})}),t.jsxs("div",{children:[t.jsx("h2",{className:"text-lg font-bold text-gray-900 dark:text-white",children:"Reply to Comment"}),t.jsxs("p",{className:"text-sm text-gray-500 dark:text-gray-400",children:["@",e]})]})]}),t.jsx("button",{onClick:i,disabled:n,className:"p-2 rounded-lg hover:bg-gray-200 dark:hover:bg-gray-700 transition-colors duration-200 disabled:opacity-50",children:t.jsx(z.X,{className:"w-6 h-6 text-gray-500 dark:text-gray-400"})})]}),t.jsx("div",{className:"flex-1 overflow-y-auto",children:t.jsx(xd,{onSubmit:c,onCancel:i,currentUser:r,parentAuthor:e,parentPermlink:a,placeholder:`Reply to @${e}...`})}),t.jsx("div",{className:"p-4 md:p-6 border-t border-gray-200 dark:border-gray-700 bg-gray-50 dark:bg-gray-900/50",children:t.jsxs("div",{className:"flex items-center justify-between text-xs md:text-sm text-gray-500 dark:text-gray-400",children:[t.jsxs("div",{className:"flex items-center space-x-4",children:[t.jsx("span",{children:"• Markdown supported"}),t.jsx("span",{children:"• Be respectful"})]}),t.jsx("div",{className:"hidden md:block",children:"Press Esc to close"})]})})]})})},up=({isVisible:e,searchQuery:a,onSearchChange:i,onClose:s})=>{const r=P.useRef(null);P.useEffect(()=>{e&&r.current&&r.current.focus()},[e]);const n=()=>{i(""),s()};return t.jsx("div",{className:`overflow-hidden transition-all duration-300 ease-in-out ${e?"max-h-20 opacity-100":"max-h-0 opacity-0"}`,children:t.jsx("div",{className:"p-4 border-b border-gray-200 dark:border-gray-700 bg-gray-50 dark:bg-gray-900/30",children:t.jsxs("div",{className:"relative",children:[t.jsx(z.Search,{className:"absolute left-3 top-1/2 transform -translate-y-1/2 w-5 h-5 text-gray-400"}),t.jsx("input",{ref:r,type:"text",value:a,onChange:u=>i(u.target.value),placeholder:"Search comments and authors...",className:"w-full pl-10 pr-10 py-2 bg-white dark:bg-gray-800 border border-gray-300 dark:border-gray-600 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-blue-500 text-gray-900 dark:text-white placeholder-gray-500 dark:placeholder-gray-400 transition-colors duration-200"}),a&&t.jsx("button",{onClick:()=>i(""),className:"absolute right-8 top-1/2 transform -translate-y-1/2 p-1 rounded-full hover:bg-gray-200 dark:hover:bg-gray-700 transition-colors duration-200",children:t.jsx(z.X,{className:"w-4 h-4 text-gray-400"})}),t.jsx("button",{onClick:n,className:"absolute right-3 top-1/2 transform -translate-y-1/2 p-1 rounded-full hover:bg-gray-200 dark:hover:bg-gray-700 transition-colors duration-200",children:t.jsx(z.X,{className:"w-4 h-4 text-gray-400"})})]})})})},ao=({author:e,permlink:a,onClose:i,currentUser:s,token:r,onClickCommentUpvote:n,onClickCommentReply:u,onClickUpvoteButton:c,onSubmitComment:d})=>{const[f,o]=P.useState([]),[h,l]=P.useState([]),[p,x]=P.useState(!0),[w,b]=P.useState(null),[g,v]=P.useState(null),[_,N]=P.useState(!1),[y,m]=P.useState(""),[k,j]=P.useState(!1),[A,D]=P.useState(!1),C=P.useCallback(async($=!1)=>{$?D(!0):x(!0),b(null);try{const G=await Re.getCommentsList(e,a);o(G),l(G)}catch(G){b(G instanceof Error?G.message:"Failed to load comments")}finally{x(!1),D(!1)}},[e,a]);P.useEffect(()=>{C()},[C]),P.useEffect(()=>{if(!y.trim())l(f);else{const $=f.filter(G=>G.body?.toLowerCase().includes(y.toLowerCase())||G.author.toLowerCase().includes(y.toLowerCase()));l($)}},[y,f]);const O=($,G)=>{v({author:$,permlink:G})},L=$=>{$.target===$.currentTarget&&i()},H=async($,G,X)=>{if(d){try{await Promise.resolve(d($,G,X)),j(!1),D(!0),setTimeout(async()=>{await C(!0),D(!1)},3e3)}catch(ee){const R=ee instanceof Error?ee.message:"Failed to post comment";alert(R)}return}if(!r){alert("Please login to comment");return}try{await Re.handleComment({author:$,permlink:G,body:X,authToken:r}),j(!1),D(!0),setTimeout(async()=>{await C(!0),D(!1)},3e3)}catch(ee){const R=ee instanceof Error?ee.message:"Failed to post comment";alert(R)}},F=P.useMemo(()=>{if(!s?.trim())return h;const $=s.toLowerCase();return[...h].sort((G,X)=>{const ee=G.author?.toLowerCase()===$,R=X.author?.toLowerCase()===$;return ee&&!R?-1:!ee&&R?1:0})},[h,s]),B=F.filter($=>$.parent_author===e&&$.parent_permlink===a);return p?t.jsx("div",{className:"fixed inset-0 bg-black/50 backdrop-blur-sm flex items-center justify-center z-50 p-4 h-screen",children:t.jsx("div",{className:"bg-white dark:bg-gray-800 rounded-xl shadow-2xl w-full max-w-2xl h-[90vh] flex flex-col",children:t.jsx("div",{className:"flex justify-center items-center h-full",children:t.jsxs("div",{className:"text-center",children:[t.jsx(z.Loader2,{className:"w-12 h-12 animate-spin text-blue-500 mx-auto mb-4"}),t.jsx("p",{className:"text-gray-600 dark:text-gray-300",children:"Loading comments..."})]})})})}):w?t.jsx("div",{className:"fixed inset-0 bg-black/50 backdrop-blur-sm flex items-center justify-center z-40 p-4 h-screen",onClick:L,children:t.jsx("div",{className:"bg-white dark:bg-gray-800 rounded-xl shadow-2xl w-full max-w-4xl h-[90vh] flex flex-col overflow-hidden",children:t.jsx("div",{className:"flex justify-center items-center h-full",children:t.jsxs("div",{className:"text-center p-6",children:[t.jsx(z.AlertCircle,{className:"w-16 h-16 text-red-500 mx-auto mb-4"}),t.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-white mb-2",children:"Failed to load comments"}),t.jsx("p",{className:"text-gray-600 dark:text-gray-300 mb-6",children:w}),t.jsx("button",{onClick:()=>C(),className:"px-6 py-2 bg-blue-500 hover:bg-blue-600 text-white rounded-lg transition-colors duration-200",children:"Try Again"})]})})})}):t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"fixed inset-0 bg-black/50 backdrop-blur-sm flex items-center justify-center z-40 p-4 h-screen",onClick:L,children:t.jsxs("div",{className:"bg-white dark:bg-gray-800 rounded-xl shadow-2xl w-full max-w-4xl h-[90vh] flex flex-col overflow-hidden",children:[t.jsxs("div",{className:"flex justify-between items-center p-4 md:p-6 border-b border-gray-200 dark:border-gray-700 bg-gray-50 dark:bg-gray-900/50",children:[t.jsxs("div",{className:"flex items-center space-x-4",children:[t.jsxs("h2",{className:"text-lg md:text-xl font-bold text-gray-900 dark:text-white",children:["Comments (",f.length,")"]}),A&&t.jsx(z.Loader2,{className:"w-5 h-5 animate-spin text-blue-500"})]}),t.jsxs("div",{className:"flex items-center space-x-2",children:[t.jsx("button",{onClick:()=>C(!0),disabled:A,className:"p-2 rounded-lg hover:bg-gray-200 dark:hover:bg-gray-700 transition-colors duration-200 disabled:opacity-50",title:"Refresh comments",children:t.jsx(z.RefreshCw,{className:`w-5 h-5 text-gray-500 dark:text-gray-400 ${A?"animate-spin":""}`})}),t.jsx("button",{onClick:()=>N(!_),className:"p-2 rounded-lg hover:bg-gray-200 dark:hover:bg-gray-700 transition-colors duration-200",title:"Search comments",children:t.jsx(z.Search,{className:"w-5 h-5 text-gray-500 dark:text-gray-400"})}),t.jsx("button",{onClick:i,className:"p-2 rounded-lg hover:bg-gray-200 dark:hover:bg-gray-700 transition-colors duration-200",children:t.jsx(z.X,{className:"w-6 h-6 text-gray-500 dark:text-gray-400"})})]})]}),t.jsx(up,{isVisible:_,searchQuery:y,onSearchChange:m,onClose:()=>N(!1)}),t.jsxs("div",{className:"flex-1 overflow-y-auto",children:[k&&t.jsx("div",{className:"border-b border-gray-200 dark:border-gray-700",children:t.jsx(xd,{onSubmit:$=>H(e,a,$),onCancel:()=>j(!1),currentUser:s,placeholder:"Add a comment..."})}),B.length===0?t.jsxs("div",{className:"flex flex-col items-center justify-center h-full p-8 text-center",children:[t.jsx(z.MessageCirclePlus,{className:"w-16 h-16 text-gray-300 dark:text-gray-600 mb-4"}),t.jsx("h3",{className:"text-lg font-medium text-gray-900 dark:text-white mb-2",children:y?"No comments found":"No comments yet"}),t.jsx("p",{className:"text-gray-500 dark:text-gray-400 mb-6",children:y?"Try adjusting your search terms":"Be the first to share your thoughts!"}),!y&&s&&t.jsx("button",{onClick:()=>j(!0),className:"px-6 py-3 bg-blue-500 hover:bg-blue-600 text-white rounded-lg font-medium transition-colors duration-200",children:"Add Comment"})]}):t.jsx("div",{className:"divide-y divide-gray-100 dark:divide-gray-700",children:B.map($=>t.jsx(bd,{comment:$,allComments:F,onReply:O,currentUser:s,token:r,searchQuery:y,depth:0,onVotedRefresh:()=>C(!0),onClickCommentUpvote:n,onClickCommentReply:u,onClickUpvoteButton:c},$.permlink))})]}),!k&&s&&B.length>0&&t.jsx("div",{className:"p-4 md:p-6 border-t border-gray-200 dark:border-gray-700 bg-gray-50 dark:bg-gray-900/50",children:t.jsxs("button",{onClick:()=>j(!0),className:"w-full md:w-auto px-6 py-3 bg-blue-500 hover:bg-blue-600 text-white rounded-lg font-medium transition-all duration-200 transform hover:scale-[1.02] flex items-center justify-center space-x-2",children:[t.jsx(z.MessageCirclePlus,{className:"w-5 h-5"}),t.jsx("span",{children:"Add Comment"})]})})]})}),g&&t.jsx(op,{parentAuthor:g.author,parentPermlink:g.permlink,onClose:()=>v(null),onCommentSubmitted:H,currentUser:s})]})};function lp(e){const a=typeof e=="string"?new Date(e):e,i=Math.floor((Date.now()-a.getTime())/1e3),s={year:31536e3,month:2628e3,day:86400,hour:3600,minute:60};for(const[r,n]of Object.entries(s)){const u=Math.floor(i/n);if(u>1)return`${u} ${r}s ago`;if(u===1)return`${u} ${r} ago`}return"just now"}const yd=({author:e,permlink:a,onClose:i,currentUser:s,token:r,onClickUpvoteButton:n})=>{const[u,c]=P.useState([]),[d,f]=P.useState(!0),[o,h]=P.useState(!1),l=!!s&&u.some(k=>k.voter===s),[p,x]=P.useState(!1),[w,b]=P.useState(""),[g,v]=P.useState(!1),_=k=>{b(k),x(!0),setTimeout(()=>x(!1),2500)},N=async()=>{f(!0);const k=await Re.getActiveVotes(e,a);k.sort((j,A)=>!j.time||!A.time?0:new Date(A.time).getTime()-new Date(j.time).getTime()),c(k),f(!1)};P.useEffect(()=>{N()},[e,a]);const y=k=>{k.target===k.currentTarget&&i()},m=async k=>{if(!r||!s){alert("Please login to upvote");return}try{const j=Math.round(k*100);await Re.handleUpvote({author:e,permlink:a,weight:j,authToken:r}),h(!1),v(!0),setTimeout(async()=>{await N(),v(!1),_("Vote submitted successfully ✅"),i()},3e3)}catch(j){const A=j instanceof Error?j.message:"Failed to upvote";alert(A)}};return t.jsxs("div",{className:"fixed inset-0 bg-black/50 backdrop-blur-sm flex items-center justify-center z-50 px-4 h-screen",onClick:y,children:[t.jsxs("div",{className:"relative bg-white dark:bg-gray-800 rounded-xl shadow-2xl w-full max-w-md max-h-[80vh] flex flex-col overflow-hidden",children:[t.jsxs("div",{className:"p-4 md:p-6 border-b border-gray-200 dark:border-gray-700 bg-gray-50 dark:bg-gray-900/50 flex items-center justify-between",children:[t.jsxs("h2",{className:"text-lg font-bold text-gray-900 dark:text-white flex items-center space-x-2",children:[t.jsxs("span",{children:["Voters (",u.length,")"]}),g&&t.jsx("span",{className:"inline-flex items-center ml-2",children:t.jsx("span",{className:"w-4 h-4 border-2 border-blue-500 border-t-transparent rounded-full animate-spin"})})]}),!o&&t.jsx("button",{onClick:()=>{if(n){n(s,r);return}if(!s||!r){_("Please login to upvote");return}l?_("You have already upvoted this post"):h(!0)},"aria-label":"Open Vote Slider",className:"p-1 hover:bg-gray-200 dark:hover:bg-gray-700 rounded",type:"button",children:t.jsx(z.ThumbsUp,{className:`w-5 h-5 ${l?"text-blue-600 dark:text-blue-400 fill-current":"text-gray-600 dark:text-gray-300"}`})})]}),t.jsx("div",{className:"flex-1 overflow-y-auto p-4",children:d?t.jsx("div",{className:"flex justify-center items-center h-full p-8",children:t.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-blue-500"})}):o&&!l?t.jsx(ro,{author:e,permlink:a,onUpvote:m,onCancel:()=>h(!1)}):t.jsx("ul",{children:u.map(k=>t.jsxs("li",{className:"flex items-center p-4 border-b dark:border-gray-700",children:[t.jsx("img",{src:`https://images.hive.blog/u/${k.voter}/avatar`,alt:k.voter,className:"w-10 h-10 rounded-full mr-4",onError:j=>{j.target.src=`https://ui-avatars.com/api/?name=${k.voter}&background=random`}}),t.jsxs("div",{children:[t.jsx("div",{className:"font-semibold text-gray-900 dark:text-white",children:k.voter}),t.jsxs("div",{className:"text-sm text-gray-500 dark:text-gray-400",children:[((k.percent||0)/100).toFixed(0),"%",k.time&&` · ${lp(k.time+"Z")}`]})]})]},k.voter))})})]}),p&&t.jsx("div",{className:"fixed bottom-4 right-4 w-[280px] z-50",children:t.jsx("div",{className:"bg-gray-800 text-white rounded px-3 py-2 shadow-lg text-sm",children:w})})]})},vd=({isOpen:e,onClose:a,title:i,children:s,maxWidth:r="max-w-2xl"})=>e?t.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center",children:[t.jsx("div",{className:"absolute inset-0 bg-black/60 backdrop-blur-sm",onClick:a}),t.jsxs("div",{className:`relative bg-card border border-border rounded-xl shadow-xl w-full mx-4 ${r} max-h-[90vh] overflow-hidden animate-scale-in`,children:[t.jsxs("div",{className:"flex items-center justify-between p-6 border-b border-border",children:[t.jsx("h2",{className:"text-xl font-bold text-card-foreground",children:i}),t.jsx("button",{onClick:a,className:"p-2 rounded-lg hover:bg-muted transition-colors",children:t.jsx(z.X,{className:"w-5 h-5 text-muted-foreground"})})]}),t.jsx("div",{className:"overflow-y-auto max-h-[calc(90vh-80px)] custom-scrollbar",children:s})]})]}):null,cp=({author:e,permlink:a,content:i,onClose:s})=>t.jsx(vd,{isOpen:!0,onClose:s,title:"Video Description",maxWidth:"max-w-2xl",children:t.jsxs("div",{className:"p-6",children:[i?t.jsx("div",{className:"prose prose-sm max-w-none",children:t.jsx("div",{className:"bg-muted/30 rounded-lg p-4",children:t.jsx("pre",{className:"whitespace-pre-wrap text-sm text-card-foreground font-sans leading-relaxed",children:i})})}):t.jsxs("div",{className:"text-center py-8",children:[t.jsx(z.FileText,{className:"w-12 h-12 text-muted-foreground mx-auto mb-2"}),t.jsx("p",{className:"text-muted-foreground",children:"No description available"}),t.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:"This video doesn't have a description yet."})]}),t.jsx("div",{className:"mt-6 pt-4 border-t border-border",children:t.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[t.jsxs("span",{children:["By @",e]}),t.jsx("span",{children:"•"}),t.jsxs("span",{children:["/",a]})]})})]})}),dp=({username:e,permlink:a,onAuthorClick:i,onVideoClick:s,onTagClick:r,onBack:n,onCommentsModal:u,onUpvotesModal:c,onDescriptionModal:d,onVideoInfo:f,onShare:o,onBookmark:h}={})=>{const l=e,p=a,[x,w]=P.useState(null),[b,g]=P.useState(!0),[v,_]=P.useState(null),[N,y]=P.useState(!1),[m,k]=P.useState(null),[j,A]=P.useState(!1),[D,C]=P.useState(!1),[O,L]=P.useState(!1),[H,F]=P.useState(!1),B=P.useRef(null),$=P.useRef(null),G=P.useRef(null);P.useEffect(()=>{(async()=>{if(!(!l||!p))try{g(!0),_(null);const J=await Re.getVideoDetails(l,p);w(J),y(!1),k(null)}catch(J){_(J instanceof Error?J.message:"Failed to load video")}finally{g(!1)}})()},[l,p]);const X=V=>V?V.startsWith("ipfs://")?`https://ipfs-3speak.b-cdn.net/ipfs/${V.replace("ipfs://","").split("/")[0]}/manifest.m3u8`:V:"";P.useEffect(()=>((async()=>{const J=x?.video_v2;if(!N||!J||!B.current)return;const oe=B.current,K=X(J);$.current&&($.current.destroy(),$.current=null),oe.src="",oe.load();try{let te=!1;const pe=()=>{te||(te=!0,oe.play().then(()=>k(null)).catch(xe=>k(`Playback failed: ${xe.message}`)))};if(Qr.isSupported()){const xe=new Qr({debug:!1,enableWorker:!1,lowLatencyMode:!1,backBufferLength:90,maxLoadingDelay:4,maxBufferLength:30,maxMaxBufferLength:600,startLevel:-1});$.current=xe,xe.on(Qr.Events.MANIFEST_PARSED,()=>{}),xe.on(Qr.Events.ERROR,(ge,ke)=>{if(ke.fatal)switch(ke.type){case Qr.ErrorTypes.NETWORK_ERROR:k("Network error, retrying..."),setTimeout(()=>xe.startLoad(),1e3);break;case Qr.ErrorTypes.MEDIA_ERROR:k("Media error, retrying..."),setTimeout(()=>xe.recoverMediaError(),1e3);break;default:k(`Fatal error: ${ke.details}`),xe.destroy(),$.current=null;break}}),xe.attachMedia(oe),xe.loadSource(K)}else if(oe.canPlayType("application/vnd.apple.mpegurl"))oe.src=K;else{const xe=K.replace("/manifest.m3u8","/480p/index.m3u8");oe.src=xe}const Ee=()=>A(!0),Z=()=>{A(!1),pe()},ae=xe=>{const ge=xe.target;k(`Video error: ${ge.error?.message||"Unknown error"}`),A(!1)},re=()=>A(!1);oe.addEventListener("loadstart",Ee),oe.addEventListener("canplay",Z),oe.addEventListener("error",ae),oe.addEventListener("loadeddata",re);const ce=async()=>{const xe=!!document.fullscreenElement;try{xe?"orientation"in screen&&await(screen.orientation?.lock?.("landscape")??Promise.resolve()):"orientation"in screen&&screen.orientation?.unlock?.()}catch{}};return document.addEventListener("fullscreenchange",ce),G.current=()=>{document.removeEventListener("fullscreenchange",ce)},()=>{oe.removeEventListener("loadstart",Ee),oe.removeEventListener("canplay",Z),oe.removeEventListener("error",ae),oe.removeEventListener("loadeddata",re),G.current&&G.current()}}catch(te){k(`Setup error: ${te instanceof Error?te.message:"Unknown"}`)}})(),()=>{$.current&&($.current.destroy(),$.current=null)}),[N,x?.video_v2]);const ee=()=>{if(!x?.video_v2){k("No video source available");return}y(!0),k(null),A(!0)},R=V=>{s&&s(V)},se=V=>{i&&i(V)},I=V=>{if(!V)return"00:00";const J=Math.floor(V),oe=Math.floor(J/3600),K=Math.floor(J%3600/60),te=J%60,pe=Ee=>Ee.toString().padStart(2,"0");return J<60?`00:${pe(te)}`:oe===0?`${pe(K)}:${pe(te)}`:`${pe(oe)}:${pe(K)}:${pe(te)}`};return b?t.jsxs("div",{className:"min-h-screen bg-background",children:[t.jsx("div",{className:"sticky top-0 z-50 w-full bg-background border-b border-border",children:t.jsx("div",{className:"container mx-auto px-4 py-3",children:t.jsx("div",{className:"h-8 w-24 bg-muted rounded-full animate-pulse"})})}),t.jsx("div",{className:"container mx-auto px-4 py-8 max-w-6xl",children:t.jsxs("div",{className:"animate-pulse space-y-6",children:[t.jsx("div",{className:"aspect-video bg-muted rounded-xl"}),t.jsxs("div",{className:"space-y-3",children:[t.jsx("div",{className:"h-6 bg-muted rounded w-3/4"}),t.jsx("div",{className:"h-4 bg-muted rounded w-1/2"})]})]})})]}):v||!x?t.jsx("div",{className:"min-h-screen bg-background flex items-center justify-center",children:t.jsxs("div",{className:"text-center max-w-md mx-auto px-4",children:[t.jsx("h2",{className:"text-xl font-semibold text-card-foreground mb-2",children:"Failed to Load Video"}),t.jsx("p",{className:"text-muted-foreground mb-4",children:v||"Video not found"}),t.jsxs("button",{onClick:()=>{n&&n()},className:"inline-flex items-center gap-2 px-4 py-2 bg-card border border-border text-card-foreground rounded-lg hover:bg-card-hover transition-colors",children:[t.jsx(z.ArrowLeft,{className:"w-4 h-4"}),"Go Back"]})]})}):t.jsxs("div",{className:"min-h-screen bg-background",children:[t.jsx("div",{className:"sticky top-0 z-50 w-full bg-background/95 backdrop-blur-sm border-b border-border",children:t.jsx("div",{className:"container mx-auto px-4 py-3",children:t.jsxs("button",{onClick:()=>{n&&n()},className:"inline-flex items-center gap-2 text-muted-foreground hover:text-card-foreground transition-colors",children:[t.jsx(z.ArrowLeft,{className:"w-4 h-4"}),"Back"]})})}),t.jsx("div",{className:"container mx-auto px-4 py-8 max-w-6xl",children:t.jsxs("div",{className:"flex flex-col gap-8",children:[t.jsxs("div",{className:"lg:col-span-2 space-y-6",children:[t.jsx("div",{className:"w-full aspect-video bg-black rounded-xl overflow-hidden relative shadow-card",children:N?t.jsxs("div",{className:"relative w-full h-full",children:[t.jsx("video",{ref:B,controls:!0,poster:Br(x.thumbnail),className:"w-full h-full object-contain bg-black",onDoubleClick:async V=>{const J=V.currentTarget;try{document.fullscreenElement?await document.exitFullscreen():await J.requestFullscreen()}catch{}}}),j&&t.jsx("div",{className:"absolute inset-0 flex items-center justify-center bg-black/50",children:t.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-primary"})}),m&&t.jsx("div",{className:"absolute inset-0 flex items-center justify-center bg-black/80",children:t.jsxs("div",{className:"text-center text-white",children:[t.jsx("p",{className:"mb-4",children:m}),t.jsx("button",{onClick:()=>{y(!1),k(null)},className:"px-4 py-2 bg-primary text-primary-foreground rounded-lg hover:bg-primary-hover transition-colors",children:"Try Again"})]})})]}):t.jsxs(t.Fragment,{children:[t.jsx("img",{src:Br(x.thumbnail)||`https://images.hive.blog/u/${x.owner}/avatar`,alt:x.title,className:"w-full h-full object-cover",onError:V=>{V.target.src=`https://images.hive.blog/u/${x.owner}/avatar`}}),t.jsx("div",{className:"absolute inset-0 bg-gradient-overlay opacity-30"}),t.jsx("div",{className:"absolute inset-0 flex items-center justify-center",children:t.jsx("button",{onClick:ee,className:"bg-primary hover:bg-primary-hover rounded-full p-6 transform hover:scale-110 transition-all duration-300 shadow-lg",children:t.jsx(z.Play,{className:"w-8 h-8 text-primary-foreground ml-1",fill:"currentColor"})})}),x.duration&&t.jsxs("div",{className:"absolute bottom-4 right-4 bg-black/80 text-white text-sm px-3 py-1 rounded-md flex items-center gap-1 backdrop-blur-sm",children:[t.jsx(z.Clock,{className:"w-3 h-3"}),I(x.duration)]}),x.views&&t.jsxs("div",{className:"absolute bottom-4 left-4 bg-black/80 text-white text-sm px-3 py-1 rounded-md flex items-center gap-1 backdrop-blur-sm",children:[t.jsx(z.Eye,{className:"w-3 h-3"}),x.views.toLocaleString()," views"]})]})}),t.jsx(Ec,{title:x.title||"",author:x.owner||"",permlink:x.permlink||"",createdAt:x.created,description:x.description||"",video:{title:x.title||"",author:x.owner||"",permlink:x.permlink||"",created:x.created||new Date,category:x.category||"",numOfUpvotes:void 0,numOfComments:void 0,hiveValue:void 0,duration:x.duration,thumbnail:x.thumbnail,views:x.views},onTapComment:()=>{u?u(l,p):C(!0)},onTapUpvote:()=>{c?c(l,p):L(!0)},onTapInfo:()=>{d?d(l,p,x.description||""):F(!0)},onTapAuthor:()=>{i&&i(x.owner)},onTapShare:()=>{o&&o(l,p)},onTapBookmark:()=>{h&&h(l,p)}}),x.tags&&t.jsx("div",{className:"flex flex-wrap gap-2",children:x.tags.split(",").map((V,J)=>t.jsxs("span",{className:"bg-primary/10 text-primary px-3 py-1 rounded-full text-sm font-medium hover:bg-primary/20 transition-colors cursor-pointer",onClick:()=>{r&&r(V.trim())},children:["#",V.trim()]},J))})]}),t.jsxs("div",{className:"bg-card border border-border rounded-xl p-6 sticky top-24",children:[t.jsx("h3",{className:"font-semibold text-card-foreground mb-4 text-lg",children:"Related Videos"}),t.jsx("div",{className:"space-y-4",children:t.jsx(ss,{feedType:Ge.RELATED,username:x.owner,onVideoClick:R,onAuthorClick:se})})]})]})}),D&&l&&p&&t.jsx(ao,{author:l,permlink:p,onClose:()=>C(!1)}),O&&l&&p&&t.jsx(yd,{author:l,permlink:p,onClose:()=>L(!1)}),H&&l&&p&&t.jsx(cp,{author:l,permlink:p,content:x.description||"",onClose:()=>F(!1)})]})};var wd={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},hc=P.createContext&&P.createContext(wd),fp=["attr","size","title"];function hp(e,a){if(e==null)return{};var i=pp(e,a),s,r;if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);for(r=0;r<n.length;r++)s=n[r],!(a.indexOf(s)>=0)&&Object.prototype.propertyIsEnumerable.call(e,s)&&(i[s]=e[s])}return i}function pp(e,a){if(e==null)return{};var i={};for(var s in e)if(Object.prototype.hasOwnProperty.call(e,s)){if(a.indexOf(s)>=0)continue;i[s]=e[s]}return i}function rs(){return rs=Object.assign?Object.assign.bind():function(e){for(var a=1;a<arguments.length;a++){var i=arguments[a];for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(e[s]=i[s])}return e},rs.apply(this,arguments)}function pc(e,a){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);a&&(s=s.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),i.push.apply(i,s)}return i}function as(e){for(var a=1;a<arguments.length;a++){var i=arguments[a]!=null?arguments[a]:{};a%2?pc(Object(i),!0).forEach(function(s){mp(e,s,i[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):pc(Object(i)).forEach(function(s){Object.defineProperty(e,s,Object.getOwnPropertyDescriptor(i,s))})}return e}function mp(e,a,i){return a=gp(a),a in e?Object.defineProperty(e,a,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[a]=i,e}function gp(e){var a=bp(e,"string");return typeof a=="symbol"?a:a+""}function bp(e,a){if(typeof e!="object"||!e)return e;var i=e[Symbol.toPrimitive];if(i!==void 0){var s=i.call(e,a);if(typeof s!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return(a==="string"?String:Number)(e)}function _d(e){return e&&e.map((a,i)=>P.createElement(a.tag,as({key:i},a.attr),_d(a.child)))}function la(e){return a=>P.createElement(xp,rs({attr:as({},e.attr)},a),_d(e.child))}function xp(e){var a=i=>{var{attr:s,size:r,title:n}=e,u=hp(e,fp),c=r||i.size||"1em",d;return i.className&&(d=i.className),e.className&&(d=(d?d+" ":"")+e.className),P.createElement("svg",rs({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},i.attr,s,u,{className:d,style:as(as({color:e.color||i.color},i.style),e.style),height:c,width:c,xmlns:"http://www.w3.org/2000/svg"}),n&&P.createElement("title",null,n),e.children)};return hc!==void 0?P.createElement(hc.Consumer,null,i=>a(i)):a(wd)}function yp(e){return la({attr:{viewBox:"0 0 320 512"},child:[{tag:"path",attr:{d:"M296 160H180.6l42.6-129.8C227.2 15 215.7 0 200 0H56C44 0 33.8 8.9 32.2 20.8l-32 240C-1.7 275.2 9.5 288 24 288h118.7L96.6 482.5c-3.6 15.2 8 29.5 23.3 29.5 8.4 0 16.4-4.4 20.8-12l176-304c9.3-15.9-2.2-36-20.7-36z"},child:[]}]})(e)}function vp(e){return la({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M0 405.3V448c0 35.3 86 64 192 64s192-28.7 192-64v-42.7C342.7 434.4 267.2 448 192 448S41.3 434.4 0 405.3zM320 128c106 0 192-28.7 192-64S426 0 320 0 128 28.7 128 64s86 64 192 64zM0 300.4V352c0 35.3 86 64 192 64s192-28.7 192-64v-51.6c-41.3 34-116.9 51.6-192 51.6S41.3 334.4 0 300.4zm416 11c57.3-11.1 96-31.7 96-55.4v-42.7c-23.2 16.4-57.3 27.6-96 34.5v63.6zM192 160C86 160 0 195.8 0 240s86 80 192 80 192-35.8 192-80-86-80-192-80zm219.3 56.3c60-10.8 100.7-32 100.7-56.3v-42.7c-35.5 25.1-96.5 38.6-160.7 41.8 29.5 14.3 51.2 33.5 60 57.2z"},child:[]}]})(e)}function wp(e){return la({attr:{viewBox:"0 0 576 512"},child:[{tag:"path",attr:{d:"M569.517 440.013C587.975 472.007 564.806 512 527.94 512H48.054c-36.937 0-59.999-40.055-41.577-71.987L246.423 23.985c18.467-32.009 64.72-31.951 83.154 0l239.94 416.028zM288 354c-25.405 0-46 20.595-46 46s20.595 46 46 46 46-20.595 46-46-20.595-46-46-46zm-43.673-165.346l7.418 136c.347 6.364 5.609 11.346 11.982 11.346h48.546c6.373 0 11.635-4.982 11.982-11.346l7.418-136c.375-6.874-5.098-12.654-11.982-12.654h-63.383c-6.884 0-12.356 5.78-11.981 12.654z"},child:[]}]})(e)}function _p(e){return la({attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M608 64H32C14.33 64 0 78.33 0 96v320c0 17.67 14.33 32 32 32h576c17.67 0 32-14.33 32-32V96c0-17.67-14.33-32-32-32zM48 400v-64c35.35 0 64 28.65 64 64H48zm0-224v-64h64c0 35.35-28.65 64-64 64zm272 176c-44.19 0-80-42.99-80-96 0-53.02 35.82-96 80-96s80 42.98 80 96c0 53.03-35.83 96-80 96zm272 48h-64c0-35.35 28.65-64 64-64v64zm0-224c-35.35 0-64-28.65-64-64h64v64z"},child:[]}]})(e)}function kp(e){return la({attr:{viewBox:"0 0 576 512"},child:[{tag:"path",attr:{d:"M560 224h-29.5c-8.8-20-21.6-37.7-37.4-52.5L512 96h-32c-29.4 0-55.4 13.5-73 34.3-7.6-1.1-15.1-2.3-23-2.3H256c-77.4 0-141.9 55-156.8 128H56c-14.8 0-26.5-13.5-23.5-28.8C34.7 215.8 45.4 208 57 208h1c3.3 0 6-2.7 6-6v-20c0-3.3-2.7-6-6-6-28.5 0-53.9 20.4-57.5 48.6C-3.9 258.8 22.7 288 56 288h40c0 52.2 25.4 98.1 64 127.3V496c0 8.8 7.2 16 16 16h64c8.8 0 16-7.2 16-16v-48h128v48c0 8.8 7.2 16 16 16h64c8.8 0 16-7.2 16-16v-80.7c11.8-8.9 22.3-19.4 31.3-31.3H560c8.8 0 16-7.2 16-16V240c0-8.8-7.2-16-16-16zm-128 64c-8.8 0-16-7.2-16-16s7.2-16 16-16 16 7.2 16 16-7.2 16-16 16zM256 96h128c5.4 0 10.7.4 15.9.8 0-.3.1-.5.1-.8 0-53-43-96-96-96s-96 43-96 96c0 2.1.5 4.1.6 6.2 15.2-3.9 31-6.2 47.4-6.2z"},child:[]}]})(e)}function Np(e){return la({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M461.2 128H80c-8.84 0-16-7.16-16-16s7.16-16 16-16h384c8.84 0 16-7.16 16-16 0-26.51-21.49-48-48-48H64C28.65 32 0 60.65 0 96v320c0 35.35 28.65 64 64 64h397.2c28.02 0 50.8-21.53 50.8-48V176c0-26.47-22.78-48-50.8-48zM416 336c-17.67 0-32-14.33-32-32s14.33-32 32-32 32 14.33 32 32-14.33 32-32 32z"},child:[]}]})(e)}const no=new Id.Client(["https://api.hive.blog"]),jp=async e=>{try{const a=await no.database.getAccounts([e]);if(!a||a.length===0)throw new Error("Account not found");return a[0]}catch(a){return console.error("Error in getWalletDataDetail:",a),{error:a instanceof Error?a.message:"Unknown error"}}},Ep=async e=>{try{const a=await no.database.getDynamicGlobalProperties(),i=parseFloat(e.split(" ")[0]),s=parseFloat(String(a.total_vesting_shares).split(" ")[0]),r=parseFloat(String(a.total_vesting_fund_hive).split(" ")[0]);return(i*r/s).toFixed(3)}catch(a){return console.error("Error in convertVestingSharesToHiveData:",a),"0"}},Ap=async e=>{try{const i=(await no.database.call("get_feed_history",[])).current_median_history,s=parseFloat(i.base.split(" ")[0]),r=typeof e=="string"?parseFloat(e):e;return(s*r).toFixed(2)}catch(a){return console.error("Error in convertHivetoUSDData:",a),"0"}},kd=_c.create(e=>({walletData:null,isLoading:!1,error:null,setWalletData:a=>e({walletData:a}),clearWalletData:()=>e({walletData:null,error:null}),fetchWalletData:async a=>{e({isLoading:!0,error:null});try{const i=await jp(a),s=w=>"error"in w;if(!i||s(i))throw new Error(s(i)?i.error:"Account not found");const r=typeof i.vesting_shares=="string"?i.vesting_shares:"0.000000 VESTS",n=typeof i.balance=="string"?i.balance:i.balance.toString(),u=typeof i.hbd_balance=="string"?i.hbd_balance:i.hbd_balance.toString(),c=typeof i.savings_balance=="string"?i.savings_balance:i.savings_balance.toString(),d=typeof i.savings_hbd_balance=="string"?i.savings_hbd_balance:i.savings_hbd_balance.toString(),f=await Ep(r),o=parseFloat(n.split(" ")[0]||"0"),h=parseFloat(f),l=(o+h).toFixed(3),p=await Ap(l),x={balance:n,hbd_balance:u,savings_balance:c,savings_hbd_balance:d,hive_power:`${f} HP`,estimated_value:`$${p}`};return e({walletData:x}),x}catch(i){const s=i instanceof Error?i.message:"Failed to fetch wallet data";console.error("Wallet fetch error:",s);const r={balance:"0.000 HIVE",hbd_balance:"0.000 HBD",savings_balance:"0.000 HIVE",savings_hbd_balance:"0.000 HBD",hive_power:"0 HP",estimated_value:"$0.00",error:s};return e({walletData:r,error:s}),r}finally{e({isLoading:!1})}}})),Sp=({username:e,className:a=""})=>{const{walletData:i,fetchWalletData:s,isLoading:r,error:n}=kd();P.useEffect(()=>{e&&s(e)},[e,s]);const u=({label:c,value:d,icon:f,colorClass:o="bg-primary/10"})=>t.jsxs("div",{className:"flex items-center justify-between p-4 rounded-lg bg-card border border-border shadow-sm mb-3 transition-all duration-200 hover:shadow-md",children:[t.jsxs("div",{className:"flex items-center gap-3",children:[f&&t.jsx("div",{className:`p-2 rounded-full flex items-center justify-center ${o} text-primary`,children:f}),t.jsx("span",{className:"font-semibold text-card-foreground",children:c})]}),t.jsx("span",{className:"font-medium text-muted-foreground",children:d??"-"})]});return t.jsx("div",{className:`min-h-screen bg-gradient-elegant p-4 transition-all duration-300 ${a}`,children:t.jsxs("div",{className:"max-w-md mx-auto",children:[t.jsxs("div",{className:"flex flex-col items-center p-6 mb-6 rounded-xl bg-card border border-border shadow-elegant",children:[e&&t.jsx("img",{src:`https://images.hive.blog/u/${e}/avatar`,alt:`${e} avatar`,className:"w-20 h-20 rounded-full border-4 border-primary/20 mb-3 transition-transform hover:scale-105",onError:c=>{c.target.src=`https://ui-avatars.com/api/?name=${e}&background=random`}}),t.jsx("div",{className:"text-lg font-bold text-card-foreground",children:e}),t.jsx("div",{className:"text-sm text-muted-foreground",children:"Hive Wallet Overview"})]}),t.jsxs("div",{className:"text-center rounded-xl bg-gradient-primary shadow-glow p-6 mb-6 transition-all duration-300 hover:shadow-elegant",children:[t.jsx("div",{className:"text-sm font-semibold text-primary-foreground/80",children:"Estimated Value"}),t.jsx("div",{className:"text-3xl font-bold mt-2 text-primary-foreground",children:r?t.jsxs("div",{className:"flex items-center justify-center gap-2",children:[t.jsx("div",{className:"w-6 h-6 border-2 border-primary-foreground/30 border-t-primary-foreground rounded-full animate-spin"}),"Loading..."]}):i?.estimated_value??"-"})]}),n&&t.jsxs("div",{className:"flex items-center p-3 rounded-lg bg-destructive/10 border border-destructive/20 text-destructive mb-4",children:[t.jsx(wp,{className:"mr-2"}),t.jsx("span",{children:n})]}),t.jsx(u,{label:"Balance",value:i?.balance,icon:t.jsx(Np,{}),colorClass:"bg-blue-500/10"}),t.jsx(u,{label:"HBD Balance",value:i?.hbd_balance,icon:t.jsx(_p,{}),colorClass:"bg-green-500/10"}),t.jsx(u,{label:"Savings Balance",value:i?.savings_balance,icon:t.jsx(kp,{}),colorClass:"bg-yellow-500/10"}),t.jsx(u,{label:"Savings HBD Balance",value:i?.savings_hbd_balance,icon:t.jsx(vp,{}),colorClass:"bg-purple-500/10"}),t.jsx(u,{label:"Hive Power",value:i?.hive_power,icon:t.jsx(yp,{}),colorClass:"bg-orange-500/10"})]})})};function Nd({sort:e="trending",tag:a="",observer:i="hive.blog",limit:s=20,showSortDropdown:r=!0,theme:n="dark",onAuthorClick:u,onPostClick:c,onCommunityClick:d,onPayoutClick:f,onUpvoteClick:o,onCommentClick:h,onReblogClick:l}){const[p,x]=P.useState([]),[w,b]=P.useState(!0),[g,v]=P.useState(null),[_,N]=P.useState(e),[y,m]=P.useState(!0),[k,j]=P.useState(!1),A=P.useRef(null);new to.DefaultRenderer({baseUrl:"https://hive.blog/",breaks:!0,skipSanitization:!1,allowInsecureScriptTags:!1,addNofollowToLinks:!0,doNotShowImages:!1,assetsWidth:640,assetsHeight:480,imageProxyFn:B=>B,usertagUrlFn:B=>`/@${B}`,hashtagUrlFn:B=>`/trending/${B}`,isLinkSafeFn:B=>!0,addExternalCssClassToMatchingLinksFn:B=>!0,ipfsPrefix:"https://ipfs.io/ipfs/"});const D=P.useCallback(async(B,$=!1)=>{$?j(!0):(b(!0),m(!0)),v(null);try{const G=$&&p.length>0?p[p.length-1]:null,X=await Re.getRankedPosts(B,a,i,s,G?.author,G?.permlink);$?(x(ee=>{const R=new Set(ee.map(I=>I.post_id)),se=X.filter(I=>!R.has(I.post_id));return[...ee,...se]}),m(X.length===s)):(x(X),m(X.length===s))}catch(G){v(G instanceof Error?G.message:"Failed to load posts"),m(!1)}finally{b(!1),j(!1)}},[a,i,s,p]),C=P.useCallback(()=>{!k&&y&&!w&&D(_,!0)},[k,y,w,_,D]);P.useEffect(()=>{D(_)},[_,a,i,s]),P.useEffect(()=>{const B=new IntersectionObserver($=>{$[0].isIntersecting&&C()},{threshold:1});return A.current&&B.observe(A.current),()=>{A.current&&B.unobserve(A.current)}},[C]);const O=B=>{N(B),x([]),m(!0)},L=B=>B>=1e6?`${(B/1e6).toFixed(1)}M`:B>=1e3?`${(B/1e3).toFixed(1)}K`:B.toString(),H=B=>{const $=B.payout*.5,G=B.payout*.5,ee=(B.beneficiaries.find(R=>R.account==="commentrewarder")?.weight||0)/1e4*100;return{pending:`$${B.payout.toFixed(2)}`,breakdown:`${$.toFixed(2)} HBD, ${G.toFixed(2)} HP`,commentRewarder:`${ee.toFixed(2)}%`,payoutInDays:Math.ceil((new Date(B.payout_at).getTime()-Date.now())/(1e3*60*60*24))}},F=B=>{const G=(B.body||"").replace(/!\[[^\]]*\]\([^)]+\)/g,"").replace(/\[([^\]]+)\]\([^)]+\)/g,"$1").replace(/^#+\s*/gm,"").replace(/\*\*([^*]+)\*\*/g,"$1").replace(/\*([^*]+)\*/g,"$1").replace(/`([^`]+)`/g,"$1").replace(/<[^>]*>/g,"").replace(/\n+/g," ").trim();return G.length>200?G.substring(0,200)+"...":G};return w?t.jsx("div",{className:"flex justify-center items-center min-h-[400px]",children:t.jsx(z.Loader2,{className:"w-8 h-8 animate-spin"})}):g?t.jsxs("div",{className:"flex flex-col items-center justify-center min-h-[400px] space-y-4",children:[t.jsx("h3",{className:"text-lg font-semibold text-card-foreground",children:"Failed to load posts"}),t.jsx("p",{className:"text-muted-foreground",children:g}),t.jsx("button",{onClick:()=>D(_),className:"px-4 py-2 bg-primary text-primary-foreground rounded-lg hover:bg-primary/90",children:"Retry"})]}):t.jsx("div",{className:n==="dark"?"dark":"",children:t.jsxs("div",{className:`space-y-6 p-2 ${n==="dark"?"bg-slate-950":"bg-white"}`,children:[r&&t.jsx("div",{className:"flex justify-center",children:t.jsxs("select",{value:_,onChange:B=>O(B.target.value),className:`px-4 py-2 border border-border rounded-lg focus:outline-none focus:ring-2 focus:ring-primary ${n==="dark"?"bg-slate-950 text-white":"bg-card text-card-foreground"}`,children:[t.jsx("option",{value:"trending",children:"Trending"}),t.jsx("option",{value:"hot",children:"Hot"}),t.jsx("option",{value:"created",children:"New"})]})}),t.jsxs("div",{className:"space-y-4",children:[p.map(B=>{const $=B.json_metadata?.image?.[0],G=H(B);return t.jsxs("div",{className:`border border-border rounded-xl p-4 shadow-card hover:shadow-card-hover transition-shadow ${n==="dark"?"bg-slate-900 text-white":"bg-slate-50 text-black"}`,children:[t.jsxs("div",{className:"flex items-center gap-2 mb-3 flex-wrap",children:[t.jsx("img",{src:`https://images.hive.blog/u/${B.author}/avatar`,alt:B.author,className:"w-8 h-8 rounded-full cursor-pointer flex-shrink-0",onClick:()=>u?.(B.author,`https://images.hive.blog/u/${B.author}/avatar`),onError:X=>{X.target.src=`https://ui-avatars.com/api/?name=${B.author}&background=random`}}),t.jsx("span",{className:"font-medium cursor-pointer hover:text-primary",onClick:()=>u?.(B.author,`https://images.hive.blog/u/${B.author}/avatar`),children:B.author}),t.jsxs("span",{className:n==="dark"?"text-gray-400":"text-muted-foreground",children:["(",B.author_reputation.toFixed(2),")"]}),t.jsx("span",{className:`cursor-pointer hover:text-primary ${n==="dark"?"text-gray-400":"text-muted-foreground"}`,onClick:()=>d?.(B.community_title),children:B.community_title}),t.jsx("span",{className:`hidden sm:inline ${n==="dark"?"text-gray-400":"text-muted-foreground"}`,children:"•"}),t.jsx("span",{className:`text-sm ${n==="dark"?"text-gray-400":"text-muted-foreground"}`,children:ns.formatDistanceToNow(new Date(B.created+"Z"),{addSuffix:!0})})]}),t.jsxs("div",{className:"flex gap-3 sm:gap-4",children:[t.jsx("div",{className:"flex-shrink-0",children:$?t.jsxs("div",{className:"relative",children:[t.jsx("img",{src:$.startsWith("http")?$:`https://images.hive.blog/u/320x0/${$}`,alt:B.title,className:"w-20 h-20 sm:w-32 sm:h-32 object-cover rounded-lg cursor-pointer",onClick:()=>c?.(B),onError:X=>{X.target.src!==`https://images.hive.blog/u/${B.author}/avatar`?X.target.src=`https://images.hive.blog/u/${B.author}/avatar`:X.target.src="https://images.hive.blog/u/null/avatar"}}),(()=>{const X=B.body?.match(/!\[[^\]]*\]\(([^)]+)\)/g)?.map(ee=>{const R=ee.match(/\(([^)]+)\)/);return R?R[1]:null}).filter(Boolean)||[];return X.length>0?t.jsx("div",{className:"absolute -bottom-1 -right-1 sm:-bottom-2 sm:-right-2 flex space-x-1",children:X.slice(0,3).map((ee,R)=>t.jsx("img",{src:ee,alt:`body-image-${R}`,className:"w-6 h-6 sm:w-8 sm:h-8 object-cover rounded border-2 border-white shadow-sm cursor-pointer",onClick:se=>{se.stopPropagation();const I=se.currentTarget.parentElement?.parentElement?.querySelector("img:not(.w-6):not(.w-8)");I&&(I.src=ee)}},R))}):null})()]}):t.jsx("img",{src:`https://images.hive.blog/u/${B.author}/avatar`,alt:B.author,className:"w-20 h-20 sm:w-32 sm:h-32 rounded-lg cursor-pointer",onClick:()=>c?.(B)})}),t.jsxs("div",{className:"flex-1 min-w-0",children:[t.jsx("h3",{className:"font-semibold text-base sm:text-lg mb-1 sm:mb-2 cursor-pointer hover:text-primary line-clamp-2",onClick:()=>c?.(B),children:B.title}),t.jsx("p",{className:`mb-2 sm:mb-3 line-clamp-2 sm:line-clamp-3 cursor-pointer hover:text-primary text-sm sm:text-base ${n==="dark"?"text-gray-300":"text-gray-600"}`,onClick:()=>c?.(B),children:B.json_metadata?.description||F(B)||"No description available"}),t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsxs("div",{className:"relative group",children:[t.jsxs("span",{className:"font-semibold text-green-600 cursor-pointer hover:text-green-700 text-sm sm:text-base",onClick:()=>f?.(B.payout),children:["$",B.payout.toFixed(2)]}),t.jsxs("div",{className:"absolute bottom-full left-0 mb-2 hidden group-hover:block bg-black text-white text-xs p-2 rounded shadow-lg whitespace-nowrap z-10",children:[t.jsxs("div",{children:["Pending payout amount: ",G.pending]}),t.jsxs("div",{children:["Breakdown: ",G.breakdown]}),t.jsxs("div",{children:["commentrewarder: ",G.commentRewarder]}),t.jsxs("div",{children:["Payout in ",G.payoutInDays," days"]})]})]}),t.jsxs("div",{className:"flex items-center gap-3 sm:gap-4",children:[t.jsxs("div",{className:`flex items-center gap-1 hover:text-primary transition-colors cursor-pointer ${n==="dark"?"text-gray-400":"text-muted-foreground"}`,onClick:()=>o?.(B),children:[t.jsx(z.ThumbsUp,{className:"w-3 h-3 sm:w-4 sm:h-4"}),t.jsx("span",{className:"text-xs sm:text-sm",children:L(B.stats.total_votes)})]}),t.jsxs("div",{className:`flex items-center gap-1 hover:text-blue-400 transition-colors cursor-pointer ${n==="dark"?"text-blue-400":"text-blue-600"}`,onClick:()=>h?.(B),children:[t.jsx(z.MessageCircle,{className:"w-3 h-3 sm:w-4 sm:h-4"}),t.jsx("span",{className:"text-xs sm:text-sm",children:L(B.children)})]}),t.jsxs("div",{className:`flex items-center gap-1 hover:text-gray-400 transition-colors cursor-pointer ${n==="dark"?"text-gray-400":"text-gray-600"}`,onClick:()=>l?.(B),children:[t.jsx(z.Repeat2,{className:"w-3 h-3 sm:w-4 sm:h-4"}),t.jsx("span",{className:"text-xs sm:text-sm",children:L(B.reblogs)})]})]})]})]})]})]},B.post_id)}),k&&t.jsxs("div",{className:"flex justify-center items-center py-4",children:[t.jsx(z.Loader2,{className:"w-6 h-6 animate-spin"}),t.jsx("span",{className:`ml-2 ${n==="dark"?"text-gray-400":"text-muted-foreground"}`,children:"Loading more posts..."})]}),y&&!k&&t.jsx("div",{ref:A,className:"h-10"})]})]})})}class sa{static instance;static getInstance(){return sa.instance||(sa.instance=new sa),sa.instance}async getProposals(a){return a==="expired"?this.getExpiredProposals():this.getActiveProposals()}async getActiveProposals(){try{const s=(await(await fetch("https://api.hive.blog/",{method:"POST",headers:{accept:"application/json, text/plain, */*","accept-language":"en-GB,en-US;q=0.9,en;q=0.8,hi;q=0.7","content-type":"application/json",origin:"https://peakd.com","sec-ch-ua":'"Google Chrome";v="141", "Not?A_Brand";v="8", "Chromium";v="141"',"sec-ch-ua-mobile":"?0","sec-ch-ua-platform":'"macOS"',"sec-fetch-dest":"empty","sec-fetch-mode":"cors","sec-fetch-site":"cross-site","user-agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36"},body:JSON.stringify({id:72,jsonrpc:"2.0",method:"database_api.list_proposals",params:{start:[-1],limit:500,order:"by_total_votes",order_direction:"descending",status:"votable"}})})).json()).result.proposals,n=await(await fetch("https://stats.hivehub.dev/dhf_proposals")).json(),u={};n.forEach(h=>{u[h.proposal_id]=h});const f=(await(await fetch("https://api.hive.blog/",{method:"POST",headers:{accept:"application/json, text/plain, */*","accept-language":"en-GB,en-US;q=0.9,en;q=0.8,hi;q=0.7","content-type":"application/json",origin:"https://peakd.com","sec-ch-ua":'"Google Chrome";v="141", "Not?A_Brand";v="8", "Chromium";v="141"',"sec-ch-ua-mobile":"?0","sec-ch-ua-platform":'"macOS"',"sec-fetch-dest":"empty","sec-fetch-mode":"cors","sec-fetch-site":"cross-site","user-agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36"},body:JSON.stringify({id:73,jsonrpc:"2.0",method:"database_api.list_proposal_votes",params:{start:["shaktimaaan"],limit:1e3,order:"by_voter_proposal",order_direction:"ascending",status:"votable"}})})).json()).result.proposal_votes||[],o={};return f.forEach(h=>{o[h.proposal.proposal_id]||(o[h.proposal.proposal_id]=[]),o[h.proposal.proposal_id].push(h)}),s.map(h=>{const l=h.id,p=u[l],x=o[l]||[],w=x.reduce((b,g)=>b+parseFloat(g.total_hbd||"0"),0);return{proposal_id:l,subject:h.subject,permlink:h.permlink,creator:h.creator,receiver:h.receiver,start_date:h.start_date,end_date:h.end_date,total_hbd_received:p?p.total_hbd_received:"0",max_hbd_remaining:p?p.max_hbd_remaining:"0",all_votes_num:h.total_votes||"0",all_votes_hp:p?p.all_votes_hp:w.toString(),votes:p?p.votes:x,status:h.status,daily_pay:h.daily_pay,total_votes:h.total_votes,daily_pay_hbd:h.daily_pay?Number(h.daily_pay.amount)/Math.pow(10,h.daily_pay.precision):0,remaining_days:Math.max(0,Math.ceil((new Date(h.end_date).getTime()-new Date().getTime())/(1e3*60*60*24))),vote_value_total:p?parseFloat(p.all_votes_hp):w}})}catch(a){return console.error("Error fetching active proposals:",a),[]}}async getExpiredProposals(){try{const s=(await(await fetch("https://api.hive.blog/",{method:"POST",headers:{accept:"application/json, text/plain, */*","accept-language":"en-GB,en-US;q=0.9,en;q=0.8,hi;q=0.7","content-type":"application/json",origin:"https://peakd.com","sec-ch-ua":'"Google Chrome";v="141", "Not?A_Brand";v="8", "Chromium";v="141"',"sec-ch-ua-mobile":"?0","sec-ch-ua-platform":'"macOS"',"sec-fetch-dest":"empty","sec-fetch-mode":"cors","sec-fetch-site":"cross-site","user-agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36"},body:JSON.stringify({id:65,jsonrpc:"2.0",method:"database_api.list_proposals",params:{start:[-1],limit:500,order:"by_total_votes",order_direction:"descending",status:"expired"}})})).json()).result.proposals,n=await(await fetch("https://stats.hivehub.dev/dhf_proposals")).json(),u={};n.forEach(h=>{u[h.proposal_id]=h});const f=(await(await fetch("https://api.hive.blog/",{method:"POST",headers:{accept:"application/json, text/plain, */*","accept-language":"en-GB,en-US;q=0.9,en;q=0.8,hi;q=0.7","content-type":"application/json",origin:"https://peakd.com","sec-ch-ua":'"Google Chrome";v="141", "Not?A_Brand";v="8", "Chromium";v="141"',"sec-ch-ua-mobile":"?0","sec-ch-ua-platform":'"macOS"',"sec-fetch-dest":"empty","sec-fetch-mode":"cors","sec-fetch-site":"cross-site","user-agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36"},body:JSON.stringify({id:76,jsonrpc:"2.0",method:"database_api.list_proposal_votes",params:{start:["shaktimaaan"],limit:1e3,order:"by_voter_proposal",order_direction:"ascending",status:"expired"}})})).json()).result.proposal_votes||[],o={};return f.forEach(h=>{o[h.proposal_id]||(o[h.proposal_id]=[]),o[h.proposal_id].push(h)}),s.map(h=>{const l=h.id,p=u[l],x=o[l]||[],w=x.reduce((b,g)=>b+parseFloat(g.total_hbd||"0"),0);return{proposal_id:l,subject:h.subject,permlink:h.permlink,creator:h.creator,receiver:h.receiver,start_date:h.start_date,end_date:h.end_date,total_hbd_received:p?p.total_hbd_received:"0",max_hbd_remaining:p?p.max_hbd_remaining:"0",all_votes_num:h.total_votes||"0",all_votes_hp:p?p.all_votes_hp:w.toString(),votes:p?p.votes:x,status:h.status,daily_pay:h.daily_pay,total_votes:h.total_votes,daily_pay_hbd:h.daily_pay?Number(h.daily_pay.amount)/Math.pow(10,h.daily_pay.precision):0,remaining_days:0,vote_value_total:p?parseFloat(p.all_votes_hp):w}})}catch(a){return console.error("Error fetching expired proposals:",a),[]}}}const mc=sa.getInstance(),Cp=["All","Active","Upcoming","Expired","By Peak Projects"],jd=["Votes","Start Date","End Date","Creator"],gc=e=>e==="By Peak Projects"?["Creator"]:jd,it=e=>{const a=typeof e=="string"?parseFloat(e):e;return isNaN(a)?e.toString():a.toLocaleString()},Si=e=>{const a=new Date(e.start_date),i=new Date(e.end_date);return`(${Math.ceil((i.getTime()-a.getTime())/(1e3*60*60*24))} days)`},Dp=({onClickSupport:e,onClickVoteValue:a,onClickSelect:i,onClickUser:s,onClickAvatar:r,theme:n="dark"})=>{const[u,c]=P.useState([]),[d,f]=P.useState("All"),[o,h]=P.useState("Votes");P.useEffect(()=>{d==="By Peak Projects"&&!gc(d).includes(o)?h("Creator"):d!=="By Peak Projects"&&o==="Creator"&&!jd.includes(o)&&h("Votes")},[d,o]);const[l,p]=P.useState(!0);P.useEffect(()=>{(async()=>{p(!0);try{const[g,v]=await Promise.all([mc.getProposals("active"),mc.getProposals("expired")]);c([...g,...v])}catch(g){console.error("Error fetching proposals:",g),c([])}p(!1)})()},[]);const x=u.filter(b=>d==="All"?b.status==="active"||new Date(b.start_date+"Z")>new Date:d==="Active"?b.status==="active":d==="Upcoming"?new Date(b.start_date+"Z")>new Date:d==="Expired"?new Date(b.end_date+"Z")<new Date:d==="By Peak Projects"?b.creator==="peakd":!0).sort((b,g)=>d==="By Peak Projects"?g.creator.localeCompare(b.creator):0),w=d==="All"?(()=>{const b=x.filter(_=>_.status==="active"),g=x.filter(_=>new Date(_.start_date+"Z")>new Date),v=(_,N)=>o==="Votes"?Number(N.all_votes_num)-Number(_.all_votes_num):o==="Start Date"?new Date(N.start_date+"Z").getTime()-new Date(_.start_date+"Z").getTime():o==="End Date"?new Date(_.end_date+"Z").getTime()-new Date(N.end_date+"Z").getTime():o==="Creator"?_.creator.localeCompare(N.creator):0;return[...b.sort(v),...g.sort(v)]})():x.sort((b,g)=>o==="Votes"?Number(g.all_votes_num)-Number(b.all_votes_num):o==="Start Date"?new Date(g.start_date+"Z").getTime()-new Date(b.start_date+"Z").getTime():o==="End Date"?new Date(b.end_date+"Z").getTime()-new Date(g.end_date+"Z").getTime():o==="Creator"?b.creator.localeCompare(g.creator):0);return l?t.jsx("div",{className:"flex justify-center items-center py-8",children:t.jsx("div",{className:"text-gray-600 dark:text-gray-400",children:"Loading proposals..."})}):t.jsx("div",{className:n==="dark"?"dark":"",children:t.jsxs("div",{className:`space-y-6 p-2 ${n==="dark"?"bg-slate-950":"bg-white"}`,children:[t.jsx("div",{className:"flex gap-2 mb-4 flex-wrap",children:Cp.map(b=>t.jsx("button",{className:`px-3 py-1 rounded text-sm ${d===b?"bg-blue-500 text-white":`${n==="dark"?"bg-slate-900 text-gray-300":"bg-gray-200 text-gray-700"}`}`,onClick:()=>f(b),children:b},b))}),t.jsxs("div",{className:"mb-4",children:[t.jsx("label",{className:`${n==="dark"?"text-gray-300":"text-gray-700"} mr-2`,children:"Sort by:"}),t.jsx("select",{value:o,onChange:b=>h(b.target.value),className:`px-3 py-1 border rounded ${n==="dark"?"border-gray-600 bg-slate-900 text-gray-100":"border-gray-300 bg-white text-gray-900"}`,children:gc(d).map(b=>t.jsx("option",{value:b,children:b},b))})]}),t.jsxs("div",{children:[d==="All"&&(()=>{const b=w.filter(v=>v.status==="active"),g=w.filter(v=>new Date(v.start_date+"Z")>new Date);return t.jsxs(t.Fragment,{children:[b.map(v=>t.jsx("div",{className:`border rounded-lg mb-4 p-2 sm:p-4 shadow ${n==="dark"?"border-gray-800 bg-slate-900":"border-gray-200 bg-white"}`,children:t.jsxs("div",{className:"flex flex-col sm:flex-row",children:[t.jsxs("div",{className:"flex-1",children:[t.jsxs("div",{className:"flex items-center mb-2",children:[t.jsx("span",{onClick:()=>r(v),className:"inline-block mr-2 cursor-pointer",children:t.jsx("img",{src:`https://images.hive.blog/u/${v.creator}/avatar`,className:"w-8 h-8 rounded-full inline",alt:`${v.creator} avatar`})}),t.jsxs("span",{className:`font-bold cursor-pointer ${n==="dark"?"text-gray-100":"text-gray-900"}`,onClick:()=>s(v),children:["by ",v.creator]}),v.receiver&&t.jsxs("span",{className:`ml-2 ${n==="dark"?"text-gray-400":"text-gray-500"}`,children:["with receiver ",t.jsx("strong",{className:`${n==="dark"?"text-gray-100":"text-gray-900"}`,children:v.receiver})]})]}),t.jsxs("div",{className:`cursor-pointer text-lg font-semibold mb-1 ${n==="dark"?"text-gray-100":"text-gray-900"}`,onClick:()=>i(v),children:[v.subject," ",t.jsxs("span",{className:`cursor-pointer text-lg font-semibold mb-1 ${n==="dark"?"text-gray-500":"text-gray-600"}`,children:["#",v.proposal_id]})]}),t.jsxs("div",{className:`text-sm mb-2 ${n==="dark"?"text-gray-400":"text-gray-500"}`,children:[t.jsx("span",{className:`inline-block px-2 py-1 rounded text-xs font-medium ${new Date(v.start_date+"Z")>new Date?"bg-yellow-100 text-yellow-800 dark:bg-yellow-900 dark:text-yellow-200":new Date(v.end_date+"Z")<new Date?"bg-red-100 text-red-800 dark:bg-red-900 dark:text-red-200":v.status==="active"?"bg-purple-100 text-purple-800 dark:bg-purple-900 dark:text-purple-200":"bg-gray-100 text-gray-800 dark:bg-gray-700 dark:text-gray-300"}`,children:new Date(v.start_date+"Z")>new Date?"upcoming":new Date(v.end_date+"Z")<new Date?"expired":v.status})," - "+new Date(v.start_date+"Z").toLocaleDateString()+" - "+new Date(v.end_date+"Z").toLocaleDateString()," ",t.jsx("span",{className:`text-xs ${n==="dark"?"text-gray-500":"text-gray-400"}`,children:Si(v)})]}),t.jsxs("div",{className:"flex gap-2 mb-2",children:[t.jsx("button",{onClick:()=>window.open(`https://peakd.com/${v.creator}/${v.permlink}`,"_blank"),className:"text-blue-500 hover:text-blue-700 dark:text-blue-400 dark:hover:text-blue-300",title:"View on Peakd",children:t.jsx(z.ExternalLink,{size:16})}),t.jsxs("button",{onClick:()=>window.open(`https://hivehub.dev/proposals/${v.proposal_id}`,"_blank"),className:"flex text-green-500 hover:text-green-700 dark:text-green-400 dark:hover:text-green-300",title:"View Stats",children:[t.jsx(z.PieChart,{size:16})," Stats"]})]}),t.jsx("div",{className:"mb-2",children:t.jsxs("span",{className:`inline-block cursor-pointer px-2 py-1 rounded ${n==="dark"?"bg-gray-800 text-gray-300":"bg-gray-100 text-gray-700"}`,onClick:()=>a(v),children:["Vote value: ",v.vote_value_total?it(v.vote_value_total):0," HP"]})})]}),t.jsxs("div",{className:"mt-4 sm:mt-0 sm:ml-4 w-full sm:w-48 flex flex-col space-y-1",children:[t.jsxs("div",{className:"flex justify-between",children:[t.jsx("span",{className:`font-mono text-xs sm:text-sm ${n==="dark"?"text-gray-400":"text-gray-600"}`,children:"Daily Pay:"}),t.jsxs("strong",{className:`text-xs sm:text-sm ${n==="dark"?"text-gray-100":"text-gray-900"}`,children:[v.daily_pay_hbd?it(v.daily_pay_hbd):0," HBD"]})]}),t.jsxs("div",{className:"flex justify-between",children:[t.jsx("span",{className:`font-mono text-xs sm:text-sm ${n==="dark"?"text-gray-400":"text-gray-600"}`,children:"Remaining:"}),t.jsxs("strong",{className:`text-xs sm:text-sm ${n==="dark"?"text-gray-100":"text-gray-900"}`,children:[it(v.remaining_days||0)," Days"]})]}),t.jsxs("div",{className:"flex justify-between",children:[t.jsx("span",{className:`font-mono text-xs sm:text-sm ${n==="dark"?"text-gray-400":"text-gray-600"}`,children:"Paid:"}),t.jsxs("strong",{className:`text-xs sm:text-sm ${n==="dark"?"text-gray-100":"text-gray-900"}`,children:[it(v.total_hbd_received||0)," HBD"]})]}),t.jsxs("div",{className:"flex justify-between",children:[t.jsx("span",{className:`font-mono text-xs sm:text-sm ${n==="dark"?"text-gray-400":"text-gray-600"}`,children:"To Pay:"}),t.jsxs("strong",{className:`text-xs sm:text-sm ${n==="dark"?"text-gray-100":"text-gray-900"}`,children:[it(v.max_hbd_remaining||0)," HBD"]})]}),t.jsx("div",{className:"mt-2",children:t.jsx("button",{className:"px-3 sm:px-5 py-2 bg-green-600 hover:bg-green-700 text-white rounded cursor-pointer w-full text-xs sm:text-sm",onClick:()=>e(v),children:"Support"})})]})]})},v.proposal_id)),g.length>0&&t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"my-6 text-center",children:[t.jsx("h3",{className:`text-xl font-bold mb-2 ${n==="dark"?"text-gray-100":"text-gray-900"}`,children:"Upcoming proposals"}),t.jsx("p",{className:`${n==="dark"?"text-gray-400":"text-gray-600"}`,children:"The proposals listed below will start in the future. You can already support them."})]}),g.map(v=>t.jsx("div",{className:`border rounded-lg mb-4 p-2 sm:p-4 shadow ${n==="dark"?"border-gray-800 bg-slate-950":"border-gray-200 bg-white"}`,children:t.jsxs("div",{className:"flex flex-col sm:flex-row",children:[t.jsxs("div",{className:"flex-1",children:[t.jsxs("div",{className:"flex items-center mb-2",children:[t.jsx("span",{onClick:()=>r(v),className:"inline-block mr-2 cursor-pointer",children:t.jsx("img",{src:`https://images.hive.blog/u/${v.creator}/avatar`,className:"w-8 h-8 rounded-full inline",alt:`${v.creator} avatar`})}),t.jsx("span",{className:`font-bold cursor-pointer ${n==="dark"?"text-gray-100":"text-gray-900"}`,onClick:()=>s(v),children:v.creator}),t.jsxs("span",{className:`ml-2 ${n==="dark"?"text-gray-400":"text-gray-500"}`,children:["with receiver ",t.jsx("strong",{className:`${n==="dark"?"text-gray-100":"text-gray-900"}`,children:v.receiver})]})]}),t.jsx("div",{className:`cursor-pointer text-lg font-semibold mb-1 ${n==="dark"?"text-gray-100":"text-gray-900"}`,onClick:()=>i(v),children:v.subject}),t.jsxs("div",{className:`text-sm mb-2 ${n==="dark"?"text-gray-400":"text-gray-500"}`,children:[t.jsx("span",{className:`inline-block px-2 py-1 rounded text-xs font-medium ${new Date(v.start_date+"Z")>new Date?"bg-yellow-100 text-yellow-800 dark:bg-yellow-900 dark:text-yellow-200":new Date(v.end_date+"Z")<new Date?"bg-red-100 text-red-800 dark:bg-red-900 dark:text-red-200":v.status==="active"?"bg-purple-100 text-purple-800 dark:bg-purple-900 dark:text-purple-200":"bg-gray-100 text-gray-800 dark:bg-gray-700 dark:text-gray-300"}`,children:new Date(v.start_date+"Z")>new Date?"upcoming":new Date(v.end_date+"Z")<new Date?"expired":v.status})," - "+new Date(v.start_date+"Z").toLocaleDateString()+" - "+new Date(v.end_date+"Z").toLocaleDateString()," ",t.jsx("span",{className:`text-xs ${n==="dark"?"text-gray-500":"text-gray-400"}`,children:Si(v)})]}),t.jsxs("div",{className:"flex gap-2 mb-2",children:[t.jsx("button",{onClick:()=>window.open(`https://peakd.com/${v.creator}/${v.permlink}`,"_blank"),className:"text-blue-500 hover:text-blue-700 dark:text-blue-400 dark:hover:text-blue-300",title:"View on Peakd",children:t.jsx(z.ExternalLink,{size:16})}),t.jsxs("button",{onClick:()=>window.open(`https://hivehub.dev/proposals/${v.proposal_id}`,"_blank"),className:"flex text-green-500 hover:text-green-700 dark:text-green-400 dark:hover:text-green-300",title:"View Stats",children:[t.jsx(z.PieChart,{size:16})," Stats"]})]}),t.jsx("div",{className:"mb-2",children:t.jsxs("span",{className:`inline-block cursor-pointer px-2 py-1 rounded ${n==="dark"?"bg-gray-800 text-gray-300":"bg-gray-100 text-gray-700"}`,onClick:()=>a(v),children:["Vote value: ",v.vote_value_total?it(v.vote_value_total):0," HP"]})})]}),t.jsxs("div",{className:"mt-4 sm:mt-0 sm:ml-4 w-full sm:w-48 flex flex-col space-y-1",children:[t.jsxs("div",{className:"flex justify-between",children:[t.jsx("span",{className:`font-mono text-xs sm:text-sm ${n==="dark"?"text-gray-400":"text-gray-600"}`,children:"Daily Pay:"}),t.jsxs("strong",{className:`text-xs sm:text-sm ${n==="dark"?"text-gray-100":"text-gray-900"}`,children:[v.daily_pay_hbd?it(v.daily_pay_hbd):0," HBD"]})]}),t.jsxs("div",{className:"flex justify-between",children:[t.jsx("span",{className:`font-mono text-xs sm:text-sm ${n==="dark"?"text-gray-400":"text-gray-600"}`,children:"Remaining:"}),t.jsxs("strong",{className:`text-xs sm:text-sm ${n==="dark"?"text-gray-100":"text-gray-900"}`,children:[it(v.remaining_days||0)," Days"]})]}),t.jsxs("div",{className:"flex justify-between",children:[t.jsx("span",{className:`font-mono text-xs sm:text-sm ${n==="dark"?"text-gray-400":"text-gray-600"}`,children:"Paid:"}),t.jsxs("strong",{className:`text-xs sm:text-sm ${n==="dark"?"text-gray-100":"text-gray-900"}`,children:[it(v.total_hbd_received||0)," HBD"]})]}),t.jsxs("div",{className:"flex justify-between",children:[t.jsx("span",{className:`font-mono text-xs sm:text-sm ${n==="dark"?"text-gray-400":"text-gray-600"}`,children:"To Pay:"}),t.jsxs("strong",{className:`text-xs sm:text-sm ${n==="dark"?"text-gray-100":"text-gray-900"}`,children:[it(v.max_hbd_remaining||0)," HBD"]})]}),t.jsx("div",{className:"mt-2",children:t.jsx("button",{className:"px-3 sm:px-5 py-2 bg-green-600 hover:bg-green-700 text-white rounded cursor-pointer w-full text-xs sm:text-sm",onClick:()=>e(v),children:"Support"})})]})]})},v.proposal_id))]})]})})(),d!=="All"&&w.map(b=>t.jsx("div",{className:`border rounded-lg mb-4 p-2 sm:p-4 shadow ${n==="dark"?"border-gray-800 bg-slate-950":"border-gray-200 bg-white"}`,children:t.jsxs("div",{className:"flex flex-col sm:flex-row",children:[t.jsxs("div",{className:"flex-1",children:[t.jsxs("div",{className:"flex items-center mb-2",children:[t.jsx("span",{onClick:()=>r(b),className:"inline-block mr-2 cursor-pointer",children:t.jsx("img",{src:`https://images.hive.blog/u/${b.creator}/avatar`,className:"w-8 h-8 rounded-full inline",alt:`${b.creator} avatar`})}),t.jsx("span",{className:`font-bold cursor-pointer ${n==="dark"?"text-gray-100":"text-gray-900"}`,onClick:()=>s(b),children:b.creator}),t.jsxs("span",{className:`ml-2 ${n==="dark"?"text-gray-400":"text-gray-500"}`,children:["with receiver ",t.jsx("strong",{className:`${n==="dark"?"text-gray-100":"text-gray-900"}`,children:b.receiver})]})]}),t.jsxs("div",{className:`cursor-pointer text-lg font-semibold mb-1 ${n==="dark"?"text-gray-100":"text-gray-900"}`,onClick:()=>i(b),children:[b.subject," #",b.proposal_id]}),t.jsxs("div",{className:`text-sm mb-2 ${n==="dark"?"text-gray-400":"text-gray-500"}`,children:[t.jsx("span",{className:`inline-block px-2 py-1 rounded text-xs font-medium ${new Date(b.start_date+"Z")>new Date?"bg-yellow-100 text-yellow-800 dark:bg-yellow-900 dark:text-yellow-200":new Date(b.end_date+"Z")<new Date?"bg-red-100 text-red-800 dark:bg-red-900 dark:text-red-200":b.status==="active"?"bg-purple-100 text-purple-800 dark:bg-purple-900 dark:text-purple-200":"bg-gray-100 text-gray-800 dark:bg-gray-700 dark:text-gray-300"}`,children:new Date(b.start_date+"Z")>new Date?"upcoming":new Date(b.end_date+"Z")<new Date?"expired":b.status})," - "+new Date(b.start_date+"Z").toLocaleDateString()+" - "+new Date(b.end_date+"Z").toLocaleDateString()," ",t.jsx("span",{className:`text-xs ${n==="dark"?"text-gray-500":"text-gray-400"}`,children:Si(b)})]}),t.jsxs("div",{className:"flex gap-2 mb-2",children:[t.jsx("button",{onClick:()=>window.open(`https://peakd.com/@${b.creator}/${b.permlink}`,"_blank"),className:"text-blue-500 hover:text-blue-700 dark:text-blue-400 dark:hover:text-blue-300",title:"View on Peakd",children:t.jsx(z.ExternalLink,{size:16})}),t.jsxs("button",{onClick:()=>window.open(`https://hivehub.dev/proposals/${b.proposal_id}`,"_blank"),className:"flex text-green-500 hover:text-green-700 dark:text-green-400 dark:hover:text-green-300",title:"View Stats",children:[t.jsx(z.PieChart,{size:16})," Stats"]})]}),t.jsx("div",{className:"mb-2",children:t.jsxs("span",{className:`inline-block cursor-pointer px-2 py-1 rounded ${n==="dark"?"bg-gray-800 text-gray-300":"bg-gray-100 text-gray-700"}`,onClick:()=>a(b),children:["Vote value: ",b.vote_value_total?it(b.vote_value_total):0," HP"]})})]}),t.jsxs("div",{className:"mt-4 sm:mt-0 sm:ml-4 w-full sm:w-48 flex flex-col space-y-1",children:[t.jsxs("div",{className:"flex justify-between",children:[t.jsx("span",{className:"font-mono text-gray-600 dark:text-gray-400 text-xs sm:text-sm",children:"Daily Pay:"}),t.jsxs("strong",{className:"text-gray-900 dark:text-gray-100 text-xs sm:text-sm",children:[b.daily_pay_hbd?it(b.daily_pay_hbd):0," HBD"]})]}),t.jsxs("div",{className:"flex justify-between",children:[t.jsx("span",{className:"font-mono text-gray-600 dark:text-gray-400 text-xs sm:text-sm",children:"Remaining:"}),t.jsxs("strong",{className:"text-gray-900 dark:text-gray-100 text-xs sm:text-sm",children:[it(b.remaining_days||0)," Days"]})]}),d!=="Expired"&&t.jsxs("div",{className:"flex justify-between",children:[t.jsx("span",{className:"font-mono text-gray-600 dark:text-gray-400 text-xs sm:text-sm",children:"Paid:"}),t.jsxs("strong",{className:"text-gray-900 dark:text-gray-100 text-xs sm:text-sm",children:[it(b.total_hbd_received||0)," HBD"]})]}),t.jsxs("div",{className:"flex justify-between",children:[t.jsx("span",{className:"font-mono text-gray-600 dark:text-gray-400 text-xs sm:text-sm",children:"To Pay:"}),t.jsxs("strong",{className:"text-gray-900 dark:text-gray-100 text-xs sm:text-sm",children:[it(b.max_hbd_remaining||0)," HBD"]})]}),t.jsx("div",{className:"mt-2",children:t.jsx("button",{className:"px-3 sm:px-5 py-2 bg-green-600 hover:bg-green-700 text-white rounded cursor-pointer w-full text-xs sm:text-sm",onClick:()=>e(b),children:"Support"})})]})]})},b.proposal_id))]})]})})};class Tp{HIVE_API_URL="https://api.hive.blog";async getProfile(a){const i={jsonrpc:"2.0",method:"bridge.get_profile",params:{account:a},id:1},s=await fetch(this.HIVE_API_URL,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(i)});if(!s.ok)throw new Error(`HTTP error! status: ${s.status}`);return await s.json()}async getFollowers(a){const i={jsonrpc:"2.0",method:"condenser_api.get_followers",params:[a,null,"blog"],id:1},s=await fetch(this.HIVE_API_URL,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(i)});if(!s.ok)throw new Error(`HTTP error! status: ${s.status}`);return(await s.json()).result}async getFollowing(a){const i={jsonrpc:"2.0",method:"condenser_api.get_following",params:[a,null,"blog"],id:1},s=await fetch(this.HIVE_API_URL,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(i)});if(!s.ok)throw new Error(`HTTP error! status: ${s.status}`);return(await s.json()).result}async getAccounts(a){const i={jsonrpc:"2.0",method:"condenser_api.get_accounts",params:[a],id:1},s=await fetch(this.HIVE_API_URL,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(i)});if(!s.ok)throw new Error(`HTTP error! status: ${s.status}`);return(await s.json()).result}async getDynamicGlobalProperties(){const a={jsonrpc:"2.0",method:"condenser_api.get_dynamic_global_properties",params:[],id:1},i=await fetch(this.HIVE_API_URL,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(a)});if(!i.ok)throw new Error(`HTTP error! status: ${i.status}`);return(await i.json()).result}async convertVestingSharesToHive(a){try{const i=await this.getDynamicGlobalProperties(),s=parseFloat(a.split(" ")[0]),r=parseFloat(i.total_vesting_shares.split(" ")[0]),n=parseFloat(i.total_vesting_fund_hive.split(" ")[0]);return(s*n/r).toFixed(3)}catch(i){return console.error("Error converting vesting shares:",i),"0"}}async getFeedHistory(){const a={jsonrpc:"2.0",method:"condenser_api.get_feed_history",params:[],id:1},i=await fetch(this.HIVE_API_URL,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(a)});if(!i.ok)throw new Error(`HTTP error! status: ${i.status}`);return(await i.json()).result}async getVoteValue(a,i=1e4){try{const s=await this.getAccounts([a]);if(s.length===0)throw new Error("Account not found!");const r=s[0],n=await this.getDynamicGlobalProperties(),u=await this.getFeedHistory(),c=parseFloat(r.vesting_shares)+parseFloat(r.received_vesting_shares)-parseFloat(r.delegated_vesting_shares)-parseFloat(r.vesting_withdraw_rate),d=Math.floor(Date.now()/1e3)-r.voting_manabar.last_update_time,f=c*1e6/4;let o=parseFloat(r.voting_manabar.current_mana.toString())+d*f/(300*60*24);o>f&&(o=f);const h=o*100/f,l=r.vesting_shares||"0 VESTS",p=parseFloat(l.toString().split(" ")[0]),x=n.total_vesting_shares||"0 VESTS",w=parseFloat(x.toString().split(" ")[0]),b=i/1e4,g=h*b/100,v=n.vote_power_reserve_rate*(300*60*24)/(3600*24),_=g*f/100,N=parseFloat(n.recent_claims||"0"),y=n.reward_balance||"0 HIVE",m=parseFloat(y.toString().split(" ")[0]),k=n.current_supply||"0 HIVE",j=parseFloat(k.toString().split(" ")[0]),A=n.current_sbd_supply||"0 HBD",D=parseFloat(A.toString().split(" ")[0]),C=m/N*(p/w)*(_/f)*j,O=u?.current_median_history;if(!O||!O.base)return"0.00";const L=parseFloat(O.base.toString().split(" ")[0]);return(C*L).toFixed(2)}catch(s){return console.error("Error calculating vote value:",s),"0.00"}}userAvatar(a){return`https://images.hive.blog/u/${a}/avatar`}}const be=new Tp,bc=({vestingShares:e})=>{const[a,i]=P.useState("...");return P.useEffect(()=>{(async()=>{try{const r=await be.convertVestingSharesToHive(e);i(r)}catch(r){console.error("Error calculating HP:",r);const n=parseFloat(e.split(" ")[0]);i((n/1e6).toFixed(3))}})()},[e]),t.jsxs("span",{className:"text-sm font-medium text-gray-900 dark:text-white",children:[a," HP"]})},Op=({username:e,onClickAuthor:a,onClickAddRemoveFromLists:i,onClickFollow:s})=>{const[r,n]=P.useState([]),[u,c]=P.useState([]),[d,f]=P.useState({}),[o,h]=P.useState(!0),[l,p]=P.useState(null),[x,w]=P.useState(null),b=P.useRef(null),g=async()=>{try{h(!0),p(null);const N=await be.getFollowers(e);if(n(N),N.length>0){const y=N.map(A=>A.follower),m=await be.getAccounts(y);c(m);const k={},j={};for(const A of N)try{const D=await be.getVoteValue(A.follower);j[A.follower]=D}catch(D){console.warn(`Failed to get voting data for ${A.follower}:`,D),k[A.follower]={upvotepower:"0",downvote:"0"},j[A.follower]="0.00"}f(j)}}catch(N){p(N instanceof Error?N.message:"Failed to load followers data")}finally{h(!1)}};P.useEffect(()=>{g()},[e]),P.useEffect(()=>{const N=y=>{b.current&&!b.current.contains(y.target)&&w(null)};return document.addEventListener("mousedown",N),()=>{document.removeEventListener("mousedown",N)}},[]);const v=N=>{const y=u.find(m=>m.name===N);if(!y)return null;try{return JSON.parse(y.posting_json_metadata)?.profile||{}}catch{return{}}},_=N=>{const y=new Date,m=new Date(N),k=y.getTime()-m.getTime(),j=Math.floor(k/(1e3*60*60*24));if(Math.floor(j/30)>=1)return m.toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"});const D=Math.floor(k/1e3),C=Math.floor(D/60),O=Math.floor(C/60),L=Math.floor(j/7),H=Math.floor(j/365);return H>0?`${H} year${H>1?"s":""} ago`:L>0?`${L} week${L>1?"s":""} ago`:j>0?`${j} day${j>1?"s":""} ago`:O>0?`${O} hour${O>1?"s":""} ago`:C>0?`${C} minute${C>1?"s":""} ago`:"Just now"};return o?t.jsx("div",{className:"flex items-center justify-center min-h-[400px]",children:t.jsxs("div",{className:"flex items-center gap-2 text-gray-500 dark:text-gray-400",children:[t.jsx(z.Loader2,{className:"w-5 h-5 animate-spin"}),"Loading followers..."]})}):l?t.jsx("div",{className:"flex flex-col items-center justify-center min-h-[400px] space-y-4",children:t.jsxs("div",{className:"text-center",children:[t.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-white mb-2",children:"Failed to load followers"}),t.jsx("p",{className:"text-gray-500 dark:text-gray-400 mb-4",children:l}),t.jsxs("button",{onClick:g,className:"m-2 inline-flex items-center justify-center rounded-md border border-input text-gray-400 cursor-pointer bg-background p-2 text-sm font-medium text-foreground shadow-sm transition-colors hover:bg-accent hover:text-accent-foreground disabled:opacity-50 disabled:pointer-events-none",children:[t.jsx(z.RefreshCw,{className:"w-4 h-4 mr-2"}),"Try Again"]})]})}):r.length===0?t.jsx("div",{className:"flex items-center justify-center min-h-[400px]",children:t.jsx("p",{className:"text-gray-500 dark:text-gray-400",children:"This user has no followers."})}):t.jsxs("div",{className:"space-y-6",children:[t.jsx("div",{className:"hidden md:block overflow-x-auto",children:t.jsxs("table",{className:"w-full border-collapse",children:[t.jsx("thead",{children:t.jsxs("tr",{className:"border-b border-gray-200 dark:border-gray-700",children:[t.jsx("th",{className:"text-left py-3 px-4 font-semibold text-gray-900 dark:text-white",children:"Avatar"}),t.jsx("th",{className:"text-left py-3 px-4 font-semibold text-gray-900 dark:text-white",children:"Username"}),t.jsx("th",{className:"text-left py-3 px-4 font-semibold text-gray-900 dark:text-white",children:"Last Post"}),t.jsx("th",{className:"text-left py-3 px-4 font-semibold text-gray-900 dark:text-white",children:"HP"}),t.jsx("th",{className:"text-left py-3 px-4 font-semibold text-gray-900 dark:text-white",children:"Vote Value"}),t.jsx("th",{className:"text-left py-3 px-4 font-semibold text-gray-900 dark:text-white",children:"Manage"})]})}),t.jsx("tbody",{children:r.map((N,y)=>{const m=u.find(j=>j.name===N.follower),k=v(N.follower);return t.jsxs("tr",{className:"border-b border-gray-100 dark:border-gray-800 hover:bg-gray-50 dark:hover:bg-gray-800/50",children:[t.jsx("td",{className:"py-4 px-4",children:t.jsx("img",{src:k?.profile_image||be.userAvatar(N.follower),alt:N.follower,className:"w-12 h-12 rounded-full object-cover cursor-pointer",onClick:()=>a&&a(N.follower),onError:j=>{j.target.src=`https://ui-avatars.com/api/?name=${N.follower}&background=random`}})}),t.jsxs("td",{className:"py-4 px-4",children:[t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsxs("span",{className:"font-semibold text-gray-900 dark:text-white cursor-pointer hover:text-blue-600 dark:hover:text-blue-400",onClick:()=>a&&a(N.follower),children:["@",N.follower]}),k?.location&&t.jsxs("div",{className:"relative group",children:[t.jsx(z.MapPin,{className:"w-4 h-4 text-gray-500 dark:text-gray-400"}),t.jsx("div",{className:"absolute bottom-full left-1/2 transform -translate-x-1/2 mb-2 px-2 py-1 bg-gray-900 text-white text-xs rounded opacity-0 group-hover:opacity-100 transition-opacity whitespace-nowrap z-10",children:k.location})]})]}),k?.about&&t.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400 mt-1 truncate max-w-xs",children:k.about})]}),t.jsx("td",{className:"py-4 px-4",children:m?.last_post&&m.last_post!=="1970-01-01T00:00:00"?t.jsx("span",{className:"text-sm text-gray-600 dark:text-gray-400",children:_(m.last_root_post)}):t.jsx("span",{className:"text-sm text-gray-400 dark:text-gray-500",children:"Never"})}),t.jsx("td",{className:"py-4 px-4",children:m?t.jsx(bc,{vestingShares:m.vesting_shares}):t.jsx("span",{className:"text-sm text-gray-400 dark:text-gray-500",children:"-"})}),t.jsx("td",{className:"py-4 px-4",children:d[N.follower]?t.jsxs("span",{className:"text-sm text-gray-600 dark:text-gray-400",children:["$",d[N.follower]]}):t.jsx("span",{className:"text-sm text-gray-400 dark:text-gray-500",children:"-"})}),t.jsx("td",{className:"py-4 px-4",children:t.jsxs("div",{className:"relative",ref:x===N.follower?b:null,children:[t.jsx("button",{onClick:()=>w(x===N.follower?null:N.follower),className:"p-2 rounded-lg hover:bg-gray-100 dark:hover:bg-gray-700 transition-colors",children:t.jsx(z.MoreVertical,{className:"w-4 h-4 text-gray-600 dark:text-gray-400"})}),x===N.follower&&t.jsxs("div",{className:"absolute right-0 mt-2 w-48 bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg shadow-lg z-10",children:[t.jsxs("button",{onClick:()=>{i&&i(N.follower),w(null)},className:"w-full text-left px-4 py-2 text-sm text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-700 flex items-center gap-2",children:[t.jsx(z.UserPlus,{className:"w-4 h-4"}),"Add/remove from lists"]}),t.jsxs("button",{onClick:()=>{s&&s(N.follower),w(null)},className:"w-full text-left px-4 py-2 text-sm text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-700 flex items-center gap-2",children:[t.jsx(z.UserMinus,{className:"w-4 h-4"}),"Follow"]})]})]})})]},`${N.follower}-${y}`)})})]})}),t.jsx("div",{className:"md:hidden space-y-4",children:r.map((N,y)=>{const m=u.find(j=>j.name===N.follower),k=v(N.follower);return t.jsx("div",{className:"bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-xl p-4",children:t.jsxs("div",{className:"flex items-start gap-3",children:[t.jsx("img",{src:k?.profile_image||be.userAvatar(N.follower),alt:N.follower,className:"w-10 h-10 rounded-full object-cover cursor-pointer flex-shrink-0",onClick:()=>a&&a(N.follower),onError:j=>{j.target.src=`https://ui-avatars.com/api/?name=${N.follower}&background=random`}}),t.jsxs("div",{className:"flex-1 min-w-0",children:[t.jsxs("div",{className:"flex items-center justify-between mb-1",children:[t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsxs("span",{className:"font-semibold text-gray-900 dark:text-white cursor-pointer hover:text-blue-600 dark:hover:text-blue-400 text-sm",onClick:()=>a&&a(N.follower),children:["@",N.follower]}),k?.location&&t.jsxs("div",{className:"relative group",children:[t.jsx(z.MapPin,{className:"w-3 h-3 text-gray-500 dark:text-gray-400"}),t.jsx("div",{className:"absolute bottom-full left-1/2 transform -translate-x-1/2 mb-2 px-2 py-1 bg-gray-900 text-white text-xs rounded opacity-0 group-hover:opacity-100 transition-opacity whitespace-nowrap z-10",children:k.location})]})]}),t.jsx("div",{className:"text-xs text-gray-600 dark:text-gray-400",children:m?.last_post&&m.last_post!=="1970-01-01T00:00:00"?_(m.last_root_post):t.jsx("span",{className:"text-gray-400 dark:text-gray-500",children:"Never"})})]}),t.jsxs("div",{className:"flex items-center justify-between mt-2",children:[t.jsx("div",{className:"flex items-center gap-4",children:m&&t.jsx("div",{className:"text-xs text-gray-600 dark:text-gray-400",children:t.jsx(bc,{vestingShares:m.vesting_shares})})}),t.jsxs("div",{className:"relative",ref:x===N.follower?b:null,children:[t.jsx("button",{onClick:()=>w(x===N.follower?null:N.follower),className:"p-1 rounded-lg hover:bg-gray-100 dark:hover:bg-gray-700 transition-colors",children:t.jsx(z.MoreVertical,{className:"w-3 h-3 text-gray-600 dark:text-gray-400"})}),x===N.follower&&t.jsxs("div",{className:"absolute right-0 mt-1 w-40 bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg shadow-lg z-10",children:[t.jsxs("button",{onClick:()=>{i&&i(N.follower),w(null)},className:"w-full text-left px-3 py-2 text-xs text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-700 flex items-center gap-2",children:[t.jsx(z.UserPlus,{className:"w-3 h-3"}),"Add/remove from lists"]}),t.jsxs("button",{onClick:()=>{s&&s(N.follower),w(null)},className:"w-full text-left px-3 py-2 text-xs text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-700 flex items-center gap-2",children:[t.jsx(z.UserMinus,{className:"w-3 h-3"}),"Follow"]})]})]})]})]})]})},`${N.follower}-${y}`)})})]})},xc=({vestingShares:e})=>{const[a,i]=P.useState("...");return P.useEffect(()=>{(async()=>{try{const r=await be.convertVestingSharesToHive(e);i(r)}catch(r){console.error("Error calculating HP:",r);const n=parseFloat(e.split(" ")[0]);i((n/1e6).toFixed(3))}})()},[e]),t.jsxs("span",{className:"text-sm font-medium text-gray-900 dark:text-white",children:[a," HP"]})},Pp=({username:e,onClickAuthor:a,onClickAddRemoveFromLists:i,onClickUnfollow:s})=>{const[r,n]=P.useState([]),[u,c]=P.useState([]),[d,f]=P.useState({}),[o,h]=P.useState(!0),[l,p]=P.useState(null),[x,w]=P.useState(null),b=P.useRef(null),g=async()=>{try{h(!0),p(null);const N=await be.getFollowing(e);if(n(N),N.length>0){const y=N.map(j=>j.following),m=await be.getAccounts(y);c(m);const k={};for(const j of N)try{const A=await be.getVoteValue(j.following);k[j.following]=A}catch(A){console.warn(`Failed to get voting data for ${j.following}:`,A),k[j.following]="0.00"}f(k)}}catch(N){p(N instanceof Error?N.message:"Failed to load following data")}finally{h(!1)}};P.useEffect(()=>{g()},[e]),P.useEffect(()=>{const N=y=>{b.current&&!b.current.contains(y.target)&&w(null)};return document.addEventListener("mousedown",N),()=>{document.removeEventListener("mousedown",N)}},[]);const v=N=>{const y=u.find(m=>m.name===N);if(!y)return null;try{return JSON.parse(y.posting_json_metadata)?.profile||{}}catch{return{}}},_=N=>{const y=new Date,m=new Date(N),k=y.getTime()-m.getTime(),j=Math.floor(k/(1e3*60*60*24));if(Math.floor(j/30)>=1)return m.toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"});const D=Math.floor(k/1e3),C=Math.floor(D/60),O=Math.floor(C/60),L=Math.floor(j/7),H=Math.floor(j/365);return H>0?`${H} year${H>1?"s":""} ago`:L>0?`${L} week${L>1?"s":""} ago`:j>0?`${j} day${j>1?"s":""} ago`:O>0?`${O} hour${O>1?"s":""} ago`:C>0?`${C} minute${C>1?"s":""} ago`:"Just now"};return o?t.jsx("div",{className:"flex items-center justify-center min-h-[400px]",children:t.jsxs("div",{className:"flex items-center gap-2 text-gray-500 dark:text-gray-400",children:[t.jsx(z.Loader2,{className:"w-5 h-5 animate-spin"}),"Loading following..."]})}):l?t.jsx("div",{className:"flex flex-col items-center justify-center min-h-[400px] space-y-4",children:t.jsxs("div",{className:"text-center",children:[t.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-white mb-2",children:"Failed to load following"}),t.jsx("p",{className:"text-gray-500 dark:text-gray-400 mb-4",children:l}),t.jsxs("button",{onClick:g,className:"m-2 inline-flex items-center justify-center rounded-md border border-input text-gray-400 cursor-pointer bg-background p-2 text-sm font-medium text-foreground shadow-sm transition-colors hover:bg-accent hover:text-accent-foreground disabled:opacity-50 disabled:pointer-events-none",children:[t.jsx(z.RefreshCw,{className:"w-4 h-4 mr-2"}),"Try Again"]})]})}):r.length===0?t.jsx("div",{className:"flex items-center justify-center min-h-[400px]",children:t.jsx("p",{className:"text-gray-500 dark:text-gray-400",children:"This user is not following anyone."})}):t.jsxs("div",{className:"space-y-6",children:[t.jsx("div",{className:"hidden md:block overflow-x-auto",children:t.jsxs("table",{className:"w-full border-collapse",children:[t.jsx("thead",{children:t.jsxs("tr",{className:"border-b border-gray-200 dark:border-gray-700",children:[t.jsx("th",{className:"text-left py-3 px-4 font-semibold text-gray-900 dark:text-white",children:"Avatar"}),t.jsx("th",{className:"text-left py-3 px-4 font-semibold text-gray-900 dark:text-white",children:"Username"}),t.jsx("th",{className:"text-left py-3 px-4 font-semibold text-gray-900 dark:text-white",children:"Last Post"}),t.jsx("th",{className:"text-left py-3 px-4 font-semibold text-gray-900 dark:text-white",children:"HP"}),t.jsx("th",{className:"text-left py-3 px-4 font-semibold text-gray-900 dark:text-white",children:"Vote Value"}),t.jsx("th",{className:"text-left py-3 px-4 font-semibold text-gray-900 dark:text-white",children:"Manage"})]})}),t.jsx("tbody",{children:r.map((N,y)=>{const m=u.find(j=>j.name===N.following),k=v(N.following);return t.jsxs("tr",{className:"border-b border-gray-100 dark:border-gray-800 hover:bg-gray-50 dark:hover:bg-gray-800/50",children:[t.jsx("td",{className:"py-4 px-4",children:t.jsx("img",{src:k?.profile_image||be.userAvatar(N.following),alt:N.following,className:"w-12 h-12 rounded-full object-cover cursor-pointer",onClick:()=>a&&a(N.following),onError:j=>{j.target.src=`https://ui-avatars.com/api/?name=${N.following}&background=random`}})}),t.jsxs("td",{className:"py-4 px-4",children:[t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsxs("span",{className:"font-semibold text-gray-900 dark:text-white cursor-pointer hover:text-blue-600 dark:hover:text-blue-400",onClick:()=>a&&a(N.following),children:["@",N.following]}),k?.location&&t.jsxs("div",{className:"relative group",children:[t.jsx(z.MapPin,{className:"w-4 h-4 text-gray-500 dark:text-gray-400"}),t.jsx("div",{className:"absolute bottom-full left-1/2 transform -translate-x-1/2 mb-2 px-2 py-1 bg-gray-900 text-white text-xs rounded opacity-0 group-hover:opacity-100 transition-opacity whitespace-nowrap z-10",children:k.location})]})]}),k?.about&&t.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400 mt-1 truncate max-w-xs",children:k.about})]}),t.jsx("td",{className:"py-4 px-4",children:m?.last_post&&m.last_post!=="1970-01-01T00:00:00"?t.jsx("span",{className:"text-sm text-gray-600 dark:text-gray-400",children:_(m.last_root_post)}):t.jsx("span",{className:"text-sm text-gray-400 dark:text-gray-500",children:"Never"})}),t.jsx("td",{className:"py-4 px-4",children:m?t.jsx(xc,{vestingShares:m.vesting_shares}):t.jsx("span",{className:"text-sm text-gray-400 dark:text-gray-500",children:"-"})}),t.jsx("td",{className:"py-4 px-4",children:d[N.following]?t.jsxs("span",{className:"text-sm text-gray-600 dark:text-gray-400",children:["$",d[N.following]]}):t.jsx("span",{className:"text-sm text-gray-400 dark:text-gray-500",children:"-"})}),t.jsx("td",{className:"py-4 px-4",children:t.jsxs("div",{className:"relative",ref:x===N.following?b:null,children:[t.jsx("button",{onClick:()=>w(x===N.following?null:N.following),className:"p-2 rounded-lg hover:bg-gray-100 dark:hover:bg-gray-700 transition-colors",children:t.jsx(z.MoreVertical,{className:"w-4 h-4 text-gray-600 dark:text-gray-400"})}),x===N.following&&t.jsxs("div",{className:"absolute right-0 mt-2 w-48 bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg shadow-lg z-10",children:[t.jsxs("button",{onClick:()=>{i&&i(N.following),w(null)},className:"w-full text-left px-4 py-2 text-sm text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-700 flex items-center gap-2",children:[t.jsx(z.UserPlus,{className:"w-4 h-4"}),"Add/remove from lists"]}),t.jsxs("button",{onClick:()=>{s&&s(N.following),w(null)},className:"w-full text-left px-4 py-2 text-sm text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-700 flex items-center gap-2",children:[t.jsx(z.UserMinus,{className:"w-4 h-4"}),"Unfollow"]})]})]})})]},`${N.following}-${y}`)})})]})}),t.jsx("div",{className:"md:hidden space-y-4",children:r.map((N,y)=>{const m=u.find(j=>j.name===N.following),k=v(N.following);return t.jsx("div",{className:"bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-xl p-4",children:t.jsxs("div",{className:"flex items-start gap-3",children:[t.jsx("img",{src:k?.profile_image||be.userAvatar(N.following),alt:N.following,className:"w-10 h-10 rounded-full object-cover cursor-pointer flex-shrink-0",onClick:()=>a&&a(N.following),onError:j=>{j.target.src=`https://ui-avatars.com/api/?name=${N.following}&background=random`}}),t.jsxs("div",{className:"flex-1 min-w-0",children:[t.jsxs("div",{className:"flex items-center justify-between mb-1",children:[t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsxs("span",{className:"font-semibold text-gray-900 dark:text-white cursor-pointer hover:text-blue-600 dark:hover:text-blue-400 text-sm",onClick:()=>a&&a(N.following),children:["@",N.following]}),k?.location&&t.jsxs("div",{className:"relative group",children:[t.jsx(z.MapPin,{className:"w-3 h-3 text-gray-500 dark:text-gray-400"}),t.jsx("div",{className:"absolute bottom-full left-1/2 transform -translate-x-1/2 mb-2 px-2 py-1 bg-gray-900 text-white text-xs rounded opacity-0 group-hover:opacity-100 transition-opacity whitespace-nowrap z-10",children:k.location})]})]}),t.jsx("div",{className:"text-xs text-gray-600 dark:text-gray-400",children:m?.last_post&&m.last_post!=="1970-01-01T00:00:00"?_(m.last_root_post):t.jsx("span",{className:"text-gray-400 dark:text-gray-500",children:"Never"})})]}),t.jsxs("div",{className:"flex items-center justify-between mt-2",children:[t.jsx("div",{className:"flex items-center gap-4",children:m&&t.jsx("div",{className:"text-xs text-gray-600 dark:text-gray-400",children:t.jsx(xc,{vestingShares:m.vesting_shares})})}),t.jsxs("div",{className:"relative",ref:x===N.following?b:null,children:[t.jsx("button",{onClick:()=>w(x===N.following?null:N.following),className:"p-1 rounded-lg hover:bg-gray-100 dark:hover:bg-gray-700 transition-colors",children:t.jsx(z.MoreVertical,{className:"w-3 h-3 text-gray-600 dark:text-gray-400"})}),x===N.following&&t.jsxs("div",{className:"absolute right-0 mt-1 w-40 bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg shadow-lg z-10",children:[t.jsxs("button",{onClick:()=>{i&&i(N.following),w(null)},className:"w-full text-left px-3 py-2 text-xs text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-700 flex items-center gap-2",children:[t.jsx(z.UserPlus,{className:"w-3 h-3"}),"Add/remove from lists"]}),t.jsxs("button",{onClick:()=>{s&&s(N.following),w(null)},className:"w-full text-left px-3 py-2 text-xs text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-700 flex items-center gap-2",children:[t.jsx(z.UserMinus,{className:"w-3 h-3"}),"Unfollow"]})]})]})]})]})]})},`${N.following}-${y}`)})})]})},yc=new oa.Client(["https://api.hive.blog","https://api.syncad.com","https://api.deathwing.me"]);class $p{async getAccountHistory(a,i=-1,s=1e3,r,n){try{const u=[a,i,s];return r!==void 0&&n!==void 0&&u.push(r,n),(await yc.call("condenser_api","get_account_history",u)).map(([d,f])=>({index:d,block:f.block,op:{type:f.op[0],value:f.op[1]},op_in_trx:f.op_in_trx,timestamp:f.timestamp,trx_id:f.trx_id,trx_in_block:f.trx_in_block,virtual_op:f.virtual_op}))}catch(u){return console.error("Error fetching account history:",u),[]}}async getNextAccountHistoryPage(a,i,s=1e3){try{const r=i-1;return(await yc.call("condenser_api","get_account_history",[a,r,s])).map(([c,d])=>({index:c,block:d.block,op:{type:d.op[0],value:d.op[1]},op_in_trx:d.op_in_trx,timestamp:d.timestamp,trx_id:d.trx_id,trx_in_block:d.trx_in_block,virtual_op:d.virtual_op})).filter(c=>c.index<i)}catch(r){return console.error("Error fetching next page of account history:",r),[]}}convertToActivityListItems(a,i){return a.filter(s=>{const r=s.op.type;return r!=="effective_comment_vote"&&r!=="witness_set_properties"&&r!=="producer_reward"&&r!=="comment_reward"&&r!=="comment_payout_update"&&r!=="claim_reward_balance"&&r!=="transfer"&&r!=="claim_account"&&r!=="transfer_to_vesting"&&r!=="transfer_to_vesting_completed"}).map(s=>{const r=this.parseOperation(s,i);return{id:`${s.index}-${s.trx_id}`,type:r.type,direction:r.direction,timestamp:s.timestamp,block:s.block,description:r.description,details:s.op.value,index:s.index,...r.extraFields}}).filter(s=>s!==null)}parseOperation(a,i){const{op:s}=a,r=s.type,n=s.value;switch(r){case"vote":return this.parseVoteOperation(n,i);case"comment":return this.parseCommentOperation(n,i);case"custom_json":return this.parseCustomJsonOperation(n,i);case"comment_options":return this.parseCommentOptionsOperation(n,i);case"effective_comment_vote":return this.parseEffectiveCommentVoteOperation(n,i);case"curation_reward":return this.parseCurationRewardOperation(n,i);case"author_reward":return this.parseAuthorRewardOperation(n,i);case"comment_benefactor_reward":return this.parseCommentBenefactorRewardOperation(n,i);default:return{type:"other",direction:"out",description:`${r} operation`,extraFields:{}}}}parseVoteOperation(a,i){const{voter:s,author:r,permlink:n,weight:u}=a,c=r===i,d=c?"in":"out",f=(u/100).toFixed(0);let o="";return c?o=`${s} voted ${r}/${n} with ${f}%`:o=`Voted ${r}/${n} with ${f}%`,{type:"vote",direction:d,description:o,extraFields:{voter:s,author:r,permlink:n,weight:parseInt(f)}}}parseCommentOperation(a,i){const{author:s,parent_author:r,parent_permlink:n,permlink:u}=a,d=r===i?"in":"out",o=`Commented on ${n} by ${r||s}.`;return{type:"comment",direction:d,description:o,extraFields:{author:s,permlink:u,parent_author:r,parent_permlink:n}}}parseCustomJsonOperation(a,i){const{id:s,json:r,required_auths:n,required_posting_auths:u}=a;let c={};try{c=JSON.parse(r)}catch{}let d="Custom Json";if(s==="follow"){const[f,o]=c;f==="follow"&&(d="Custom Json")}return{type:"custom_json",direction:"out",description:d,extraFields:{}}}parseCommentOptionsOperation(a,i){const{author:s,permlink:r,max_accepted_payout:n}=a;return{type:"comment_options",direction:"out",description:"Comment Payout Update",extraFields:{author:s,permlink:r,payout:n}}}parseEffectiveCommentVoteOperation(a,i){const{voter:s,author:r,permlink:n,pending_payout:u}=a,c=r===i,d=c?"in":"out",f=c?`${s} voted on ${r}/${n} (effective vote)`:`Effective vote on ${r}/${n}`;return{type:"effective_comment_vote",direction:d,description:f,extraFields:{voter:s,author:r,permlink:n,payout:u}}}parseCurationRewardOperation(a,i){const{author:s,curator:r,permlink:n,reward:u}=a,d=r===i?"in":"out",h=`${(parseFloat(u.split(" ")[0])*1e-6).toFixed(3)} HP`,l=`Curation reward for ${r}/${n} by ${s}`;return{type:"curation_reward",direction:d,description:l,extraFields:{author:s,curator:r,permlink:n,reward:h}}}parseAuthorRewardOperation(a,i){const{author:s,permlink:r,hbd_payout:n,hive_payout:u,vesting_payout:c}=a,f=s===i?"in":"out",h=(parseFloat(c.split(" ")[0])*1e-6).toFixed(3),l=n.split(" ")[0],p=u.split(" ")[0],x=`Author reward: ${l} HBD, ${p} HIVE, ${h} HP for ${r}`;return{type:"author_reward",direction:f,description:x,extraFields:{author:s,permlink:r,hbd_payout:n,hive_payout:u,vesting_payout:c}}}parseCommentBenefactorRewardOperation(a,i){const{author:s,benefactor:r,permlink:n,hbd_payout:u,hive_payout:c,vesting_payout:d}=a,o=r===i?"in":"out",l=(parseFloat(d.split(" ")[0])*1e-6).toFixed(3),p=u.split(" ")[0],x=c.split(" ")[0],w=`Benefactor reward on ${n} by ${s}: ${p} HBD, ${x} HIVE, ${l} HP`;return{type:"comment_benefactor_reward",direction:o,description:w,extraFields:{author:s,benefactor:r,permlink:n,hbd_payout:u,hive_payout:c,vesting_payout:d}}}filterByDirection(a,i){return i==="all"?a:a.filter(s=>s.direction===i)}filterByGeneralType(a,i){if(i==="all")return a;switch(i){case"votes":return a.filter(s=>s.type==="vote"||s.type==="effective_comment_vote");case"comments":return a.filter(s=>s.type==="comment");case"replies":return a.filter(s=>s.type==="comment"&&s.direction==="in");case"others":return a.filter(s=>s.type==="custom_json"||s.type==="comment_options"||s.type==="other");default:return a}}filterByRewardType(a,i){if(i==="all")return a;switch(i){case"author":return a.filter(s=>s.type==="effective_comment_vote"&&s.direction==="in");case"curation":return a.filter(s=>s.type==="effective_comment_vote"&&s.direction==="out");case"benefactor":return a.filter(s=>s.type==="comment_options"&&s.details?.beneficiaries);default:return a}}searchActivities(a,i){if(!i.trim())return a;const s=i.toLowerCase();return a.filter(r=>r.description.toLowerCase().includes(s)||r.author?.toLowerCase().includes(s)||r.permlink?.toLowerCase().includes(s)||r.voter?.toLowerCase().includes(s))}getRelativeTime(a){try{const i=new Date(a),r=new Date().getTime()-i.getTime(),n=Math.floor(r/1e3),u=Math.floor(n/60),c=Math.floor(u/60),d=Math.floor(c/24);return n<60?`${n} seconds ago`:u<60?`${u} minutes ago`:c<24?`${c} hours ago`:d<7?`${d} days ago`:i.toLocaleDateString()}catch(i){return console.error("Error calculating relative time:",i),a}}}const ra=new $p,Lp=({username:e,directionFilter:a="all",generalFilter:i="all",rewardFilter:s="all",searchTerm:r="",limit:n=1e3,className:u,onClickPermlink:c,onSelectActivity:d})=>{const[f,o]=P.useState(r),[h,l]=P.useState(a),[p,x]=P.useState(i),[w,b]=P.useState(s),[g,v]=P.useState([]),[_,N]=P.useState([]),[y,m]=P.useState(!1),[k,j]=P.useState(null),[A,D]=P.useState(new Set),[C,O]=P.useState(null),[L,H]=P.useState(!0),[F,B]=P.useState(!1),[$,G]=P.useState(-1),X=P.useRef(null),ee=async(V=!1)=>{if(e){V?B(!0):(m(!0),H(!0),G(-1)),j(null);try{let J;V?J=await ra.getNextAccountHistoryPage(e,$,n):J=await ra.getAccountHistory(e,-1,n);const oe=ra.convertToActivityListItems(J,e);if(oe.sort((K,te)=>new Date(te.timestamp).getTime()-new Date(K.timestamp).getTime()),v(V?K=>[...K,...oe]:oe),J.length>0){const K=Math.min(...J.map(te=>te.index));G(K)}oe.length===0&&H(!1)}catch(J){j("Failed to load activity history"),console.error("Error loading activities:",J),H(!1)}finally{m(!1),B(!1)}}};P.useEffect(()=>{ee()},[e,n]);const R=P.useCallback(()=>{L&&!y&&!F&&ee(!0)},[L,y,F]);P.useEffect(()=>{let V=g;h!=="all"?V=V.filter(J=>J.direction===h):V=V.filter(J=>J.type!=="custom_json"&&J.type!=="comment_options"),p!=="all"&&(p==="votes"?V=V.filter(J=>J.type==="vote"||J.type==="effective_comment_vote"):p==="comments"?V=V.filter(J=>J.type==="comment"):p==="replies"?V=V.filter(J=>J.type==="comment"&&J.direction==="in"):p==="curation"?V=V.filter(J=>J.type==="curation_reward"):p==="others"&&(V=g.filter(J=>J.type==="custom_json"||J.type==="comment_options"))),w!=="all"&&(w==="author"?V=V.filter(J=>J.type==="effective_comment_vote"&&J.direction==="in"):w==="curation"?V=V.filter(J=>J.type==="effective_comment_vote"&&J.direction==="out"):w==="benefactor"&&(V=V.filter(J=>J.type==="comment_options"))),f&&(V=V.filter(J=>J.description.toLowerCase().includes(f.toLowerCase())||J.author?.toLowerCase().includes(f.toLowerCase())||J.permlink?.toLowerCase().includes(f.toLowerCase()))),N(V)},[g,h,p,w,f]),P.useEffect(()=>{const V=J=>{X.current&&!X.current.contains(J.target)&&O(null)};return document.addEventListener("mousedown",V),()=>{document.removeEventListener("mousedown",V)}},[]);const se=V=>{switch(V.type){case"vote":case"effective_comment_vote":return t.jsx(z.Wallet,{className:"h-4 w-4"});case"comment":return t.jsx(z.MessageCircle,{className:"h-4 w-4"});case"custom_json":return t.jsx(z.FileText,{className:"h-4 w-4"});case"curation_reward":return t.jsx(z.Wallet,{className:"h-4 w-4"});case"author_reward":return t.jsx(z.DollarSign,{className:"h-4 w-4"});case"comment_benefactor_reward":return t.jsx(z.User,{className:"h-4 w-4"});default:return t.jsx(z.Eye,{className:"h-4 w-4"})}},I=(V,J)=>V.split(/(\s+)/).map((K,te)=>{if(K.includes("/")){const[pe,Ee]=K.split("/");if(pe&&Ee)return t.jsx("span",{className:"text-blue-500 cursor-pointer hover:underline",onClick:Z=>{Z.stopPropagation(),console.log("Clicked permlink:",pe,Ee),c?.(pe,Ee)},children:K},te)}return t.jsx("span",{children:K},te)});return y?t.jsxs("div",{className:"space-y-6",children:[t.jsxs("div",{className:"bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg p-4",children:[t.jsxs("div",{className:"flex flex-col lg:flex-row gap-4 items-start lg:items-center justify-between",children:[t.jsx("div",{className:"flex-1 max-w-md",children:t.jsxs("div",{className:"relative",children:[t.jsx("div",{className:"absolute left-3 top-1/2 transform -translate-y-1/2 h-4 w-4 bg-gray-200 dark:bg-gray-700 rounded animate-pulse"}),t.jsx("div",{className:"w-full h-10 bg-gray-200 dark:bg-gray-700 rounded-md animate-pulse"})]})}),t.jsx("div",{className:"flex flex-wrap gap-2",children:Array.from({length:5}).map((V,J)=>t.jsx("div",{className:"w-24 h-10 bg-gray-200 dark:bg-gray-700 rounded-md animate-pulse"},J))})]}),t.jsx("div",{className:"flex flex-wrap gap-4 mt-4 pt-4 border-t border-gray-200 dark:border-gray-700",children:Array.from({length:4}).map((V,J)=>t.jsx("div",{className:"h-4 bg-gray-200 dark:bg-gray-700 rounded animate-pulse w-20"},J))})]}),t.jsx("div",{className:"space-y-4",children:Array.from({length:5}).map((V,J)=>t.jsxs("div",{className:"flex items-center justify-between py-3 px-4 bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg",children:[t.jsxs("div",{className:"flex items-center gap-3 flex-1 min-w-0",children:[t.jsx("div",{className:"w-8 h-8 bg-gray-200 dark:bg-gray-700 rounded-full animate-pulse flex-shrink-0"}),t.jsx("div",{className:"flex-1 min-w-0 space-y-2",children:t.jsx("div",{className:"h-4 bg-gray-200 dark:bg-gray-700 rounded animate-pulse w-3/4"})})]}),t.jsxs("div",{className:"flex items-center gap-1 flex-shrink-0 ml-4",children:[t.jsx("div",{className:"w-3 h-3 bg-gray-200 dark:bg-gray-700 rounded animate-pulse"}),t.jsx("div",{className:"h-4 bg-gray-200 dark:bg-gray-700 rounded animate-pulse w-16"})]})]},J))})]}):k?t.jsx("div",{className:"flex flex-col items-center justify-center min-h-[400px] space-y-4",children:t.jsxs("div",{className:"text-center",children:[t.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-white mb-2",children:"Failed to load activities"}),t.jsx("p",{className:"text-gray-500 dark:text-gray-400 mb-4",children:k}),t.jsxs("button",{onClick:()=>ee(),className:"inline-flex items-center justify-center rounded-md border border-input text-gray-400 cursor-pointer bg-background p-2 text-sm font-medium text-foreground shadow-sm transition-colors hover:bg-accent hover:text-accent-foreground disabled:opacity-50 disabled:pointer-events-none",children:[t.jsx(z.RefreshCw,{className:"w-4 h-4 mr-2"}),"Try Again"]})]})}):t.jsxs("div",{className:"space-y-6",children:[t.jsxs("div",{className:"bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg p-4",children:[t.jsxs("div",{className:"flex flex-col lg:flex-row gap-4 items-start lg:items-center justify-between",children:[t.jsx("div",{className:"flex-1 max-w-md",children:t.jsxs("div",{className:"relative",children:[t.jsx(z.Search,{className:"absolute left-3 top-1/2 transform -translate-y-1/2 h-4 w-4 text-gray-400"}),t.jsx("input",{type:"text",placeholder:"Search activities...",value:f,onChange:V=>o(V.target.value),className:"w-full pl-10 pr-3 py-2 bg-gray-50 dark:bg-gray-900 border border-gray-200 dark:border-gray-700 rounded-md text-gray-900 dark:text-gray-100 placeholder-gray-500 dark:placeholder-gray-400 focus:outline-none focus:ring-2 focus:ring-blue-500"})]})}),t.jsxs("div",{className:"flex flex-wrap gap-2",children:[t.jsxs("select",{value:h,onChange:V=>l(V.target.value),className:"px-3 py-2 bg-gray-50 dark:bg-gray-900 border border-gray-200 dark:border-gray-700 rounded-md text-gray-900 dark:text-gray-100 focus:outline-none focus:ring-2 focus:ring-blue-500 text-sm",children:[t.jsx("option",{value:"all",children:"All Directions"}),t.jsx("option",{value:"in",children:"Incoming"}),t.jsx("option",{value:"out",children:"Outgoing"})]}),t.jsxs("select",{value:p,onChange:V=>x(V.target.value),className:"px-3 py-2 bg-gray-50 dark:bg-gray-900 border border-gray-200 dark:border-gray-700 rounded-md text-gray-900 dark:text-gray-100 focus:outline-none focus:ring-2 focus:ring-blue-500 text-sm",children:[t.jsx("option",{value:"all",children:"All Types"}),t.jsx("option",{value:"votes",children:"Votes"}),t.jsx("option",{value:"comments",children:"Comments"}),t.jsx("option",{value:"replies",children:"Replies"}),t.jsx("option",{value:"curation",children:"Curation"}),t.jsx("option",{value:"others",children:"Others"})]}),t.jsxs("select",{value:w,onChange:V=>b(V.target.value),className:"px-3 py-2 bg-gray-50 dark:bg-gray-900 border border-gray-200 dark:border-gray-700 rounded-md text-gray-900 dark:text-gray-100 focus:outline-none focus:ring-2 focus:ring-blue-500 text-sm",children:[t.jsx("option",{value:"all",children:"All Rewards"}),t.jsx("option",{value:"author",children:"Author"}),t.jsx("option",{value:"curation",children:"Curation"}),t.jsx("option",{value:"benefactor",children:"Benefactor"})]}),t.jsx("button",{onClick:()=>ee(),disabled:y||F,className:"px-3 py-2 bg-gray-50 dark:bg-gray-900 border border-gray-200 dark:border-gray-700 rounded-md hover:bg-gray-100 dark:hover:bg-gray-800 text-gray-700 dark:text-gray-300 focus:outline-none focus:ring-2 focus:ring-blue-500 disabled:opacity-50 disabled:cursor-not-allowed",children:t.jsx(z.RefreshCw,{className:"h-4 w-4"})})]})]}),t.jsxs("div",{className:"flex flex-wrap gap-4 mt-4 pt-4 border-t border-gray-200 dark:border-gray-700",children:[t.jsxs("div",{className:"text-sm text-gray-600 dark:text-gray-400",children:["Total: ",t.jsx("span",{className:"font-semibold text-gray-900 dark:text-white",children:g.length})]}),t.jsxs("div",{className:"text-sm text-gray-600 dark:text-gray-400",children:["Filtered: ",t.jsx("span",{className:"font-semibold text-gray-900 dark:text-white",children:_.length})]}),t.jsxs("div",{className:"text-sm text-gray-600 dark:text-gray-400",children:["Incoming: ",t.jsx("span",{className:"font-semibold text-green-600 dark:text-green-400",children:g.filter(V=>V.direction==="in").length})]}),t.jsxs("div",{className:"text-sm text-gray-600 dark:text-gray-400",children:["Outgoing: ",t.jsx("span",{className:"font-semibold text-blue-600 dark:text-blue-400",children:g.filter(V=>V.direction==="out").length})]})]})]}),t.jsx("div",{className:"space-y-4",children:_.length===0?t.jsx("div",{className:"flex items-center justify-center min-h-[200px]",children:t.jsx("p",{className:"text-gray-500 dark:text-gray-400",children:g.length===0?"No activities found for this user.":"No activities match the current filters."})}):t.jsxs(t.Fragment,{children:[_.map((V,J)=>t.jsxs("div",{className:"flex items-center justify-between py-3 px-4 bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg hover:bg-gray-50 dark:hover:bg-gray-800/50 transition-colors cursor-pointer",onClick:oe=>{d?.(V)},children:[t.jsxs("div",{className:"flex items-center gap-3 flex-1 min-w-0",children:[V.type==="vote"&&V.voter?t.jsx("img",{src:`https://images.hive.blog/u/${V.voter}/avatar`,alt:V.voter,className:"w-8 h-8 rounded-full flex-shrink-0",onError:oe=>{const K=oe.target;K.style.display="none";const te=K.nextElementSibling;te&&(te.style.display="flex")}}):V.type==="comment_benefactor_reward"&&V.author?t.jsx("img",{src:`https://images.hive.blog/u/${V.author}/avatar`,alt:V.author,className:"w-8 h-8 rounded-full flex-shrink-0",onError:oe=>{const K=oe.target;K.style.display="none";const te=K.nextElementSibling;te&&(te.style.display="flex")}}):V.type==="comment"&&V.author?t.jsx("img",{src:`https://images.hive.blog/u/${V.author}/avatar`,alt:V.author,className:"w-8 h-8 rounded-full flex-shrink-0",onError:oe=>{const K=oe.target;K.style.display="none";const te=K.nextElementSibling;te&&(te.style.display="flex")}}):null,t.jsx("div",{className:`w-8 h-8 bg-purple-100 dark:bg-purple-900/20 rounded-full flex items-center justify-center flex-shrink-0 ${V.type==="vote"&&V.voter||V.type==="comment_benefactor_reward"&&V.author||V.type==="comment"&&V.author?"hidden":""}`,children:se(V)}),t.jsx("div",{className:"flex-1 min-w-0",children:V.type==="custom_json"||V.type==="comment_options"?t.jsxs("div",{children:[t.jsx("p",{className:"text-sm text-gray-900 dark:text-white break-words font-medium",children:I(V.description)}),t.jsx("p",{className:"text-xs text-gray-600 dark:text-gray-400",children:ra.getRelativeTime(V.timestamp+"Z")}),t.jsx("div",{className:"border border-gray-200 dark:border-gray-600 rounded p-2 bg-gray-50 dark:bg-gray-700/50 mt-1",children:t.jsxs("div",{className:"text-xs text-gray-600 dark:text-gray-400 space-y-1 font-mono break-words",children:[V.type==="custom_json"&&t.jsxs(t.Fragment,{children:[t.jsxs("div",{children:[t.jsx("span",{className:"font-medium",children:"id:"})," ",V.details.id]}),t.jsxs("div",{className:"break-all",children:[t.jsx("span",{className:"font-medium",children:"json:"})," ",JSON.stringify(V.details.json).replace(/\\\"/g,'"').replace(/^"|"$/g,"")]}),t.jsxs("div",{children:[t.jsx("span",{className:"font-medium",children:"required_auths:"})," ",JSON.stringify(V.details.required_auths)]}),t.jsxs("div",{children:[t.jsx("span",{className:"font-medium",children:"required_posting_auths:"})," ",JSON.stringify(V.details.required_posting_auths)]})]}),V.type==="comment_options"&&t.jsxs(t.Fragment,{children:[t.jsxs("div",{children:[t.jsx("span",{className:"font-medium",children:"author:"}),t.jsx("span",{className:"text-blue-500 cursor-pointer hover:underline",children:V.details.author})]}),t.jsxs("div",{children:[t.jsx("span",{className:"font-medium",children:"permlink:"}),t.jsx("span",{className:"text-blue-500 cursor-pointer hover:underline",onClick:oe=>{oe.stopPropagation(),console.log("Clicked permlink:",V.details.author,V.details.permlink),c?.(V.details.author,V.details.permlink)},children:V.details.permlink})]})]})]})})]}):t.jsxs("div",{children:[t.jsx("p",{className:"text-sm text-gray-900 dark:text-white break-words",children:I(V.description)}),t.jsx("p",{className:"text-xs text-gray-600 dark:text-gray-400 sm:hidden",children:ra.getRelativeTime(V.timestamp+"Z")})]})})]}),t.jsx("div",{className:"flex items-center gap-1 text-sm text-gray-600 dark:text-gray-400 flex-shrink-0 ml-4 hidden sm:flex",children:V.type!=="custom_json"&&V.type!=="comment_options"&&t.jsxs(t.Fragment,{children:[t.jsx(z.Clock,{className:"h-3 w-3 flex-shrink-0"}),t.jsx("span",{className:"truncate",children:ra.getRelativeTime(V.timestamp+"Z")})]})})]},`${V.id}-${J}`)),L&&g.length>0&&t.jsx("div",{className:"flex justify-center py-6",children:t.jsx("button",{onClick:R,disabled:y||F,className:"px-6 py-2 bg-blue-600 hover:bg-blue-700 disabled:bg-blue-400 text-white rounded-lg font-medium transition-colors disabled:cursor-not-allowed flex items-center gap-2",children:F?t.jsxs(t.Fragment,{children:[t.jsx(z.RefreshCw,{className:"h-4 w-4 animate-spin"}),"Loading..."]}):"Load More Activities"})}),!L&&g.length>0&&t.jsx("div",{className:"text-center text-sm text-gray-400 py-4",children:"No more activities to load"})]})})]})},Gn=new oa.Client(["https://api.hive.blog","https://api.syncad.com","https://api.deathwing.me"]);class Mp{async getWitnessesByVote(a="",i=60){try{return await Gn.call("condenser_api","get_witnesses_by_vote",[a,i])}catch(s){throw console.error("Error fetching witnesses by vote:",s),s}}async getAccount(a){try{const i=await Gn.call("condenser_api","get_accounts",[[a]]);return i&&i.length>0?i[0]:null}catch(i){return console.error("Error fetching account:",i),null}}async getAccounts(a){try{return await Gn.call("condenser_api","get_accounts",[a])}catch(i){return console.error("Error fetching accounts:",i),[]}}async getWitnessVotes(a,i="",s=250){try{return await Gn.call("database_api","list_witness_votes",{start:[a,i],limit:s,order:"by_witness_account"})}catch(r){throw console.error("Error fetching witness votes:",r),r}}async getAllWitnessVotes(a){const i=[];let s="";try{for(;;){const n=await this.getWitnessVotes(a,s,250);if(i.push(...n.votes),n.votes.length<250)break;s=n.votes[n.votes.length-1].account}return i}catch(n){return console.error("Error fetching all witness votes:",n),[]}}async hasUserVotedForWitness(a,i){try{const s=await this.getAccount(a);return!s||!s.witness_votes?!1:s.witness_votes.includes(i)}catch(s){return console.error("Error checking witness vote:",s),!1}}async getUserWitnessVotes(a){try{return(await this.getAccount(a))?.witness_votes||[]}catch(i){return console.error("Error fetching user witness votes:",i),[]}}formatVotesToMHP(a){return`${(parseFloat(a)/1e6).toFixed(1)}m`}calculateAPR(a){return a/100}getVersionStatus(a,i){const s=this.parseVersion(a),r=this.parseVersion(i);return this.compareVersions(s,r)>=0?"green":this.compareVersions(s,r)<0?"red":"grey"}parseVersion(a){return a.split(".").map(i=>parseInt(i,10))}compareVersions(a,i){const s=Math.max(a.length,i.length);for(let r=0;r<s;r++){const n=a[r]||0,u=i[r]||0;if(n>u)return 1;if(n<u)return-1}return 0}getWitnessDescription(a){try{let i;if(a.json_metadata&&a.json_metadata!=="{}"){i=JSON.parse(a.json_metadata);const s=i.profile?.witness_description;if(s)return s}return a.posting_json_metadata&&a.posting_json_metadata!=="{}"?(i=JSON.parse(a.posting_json_metadata),i.profile?.about||""):""}catch(i){return console.error("Error parsing witness description:",i),""}}formatTimeAgo(a){const i=new Date(a),r=Math.floor((new Date().getTime()-i.getTime())/1e3);if(r<60)return`${r} second${r>1?"s":""} ago`;if(r<3600){const n=Math.floor(r/60);return`${n} minute${n>1?"s":""} ago`}else if(r<86400){const n=Math.floor(r/3600);return`${n} hour${n>1?"s":""} ago`}else if(r<604800){const n=Math.floor(r/86400);return`${n} day${n>1?"s":""} ago`}else if(r<2592e3){const n=Math.floor(r/604800);return`${n} week${n>1?"s":""} ago`}else if(r<31536e3){const n=Math.floor(r/2592e3);return`${n} month${n>1?"s":""} ago`}else{const n=Math.floor(r/31536e3);return`${n} year${n>1?"s":""} ago`}}}const ct=new Mp,Ue=_c.create((e,a)=>({witnesses:[],witnessVotes:[],userWitnessVotes:[],witnessDetails:new Map,witnessAccounts:new Map,loadingWitnesses:!1,loadingMoreWitnesses:!1,loadingVotes:!1,loadingMoreVotes:!1,loadingUserVotes:!1,error:null,nextWitnessStart:"",nextVotesStart:"",hasMoreWitnesses:!0,hasMoreVotes:!1,selectedWitness:null,filters:{status:"all",name:"",version:""},loadWitnesses:async(i="",s=50)=>{const{witnesses:r}=a();if(r.length>=500){e({hasMoreWitnesses:!1});return}e(i!==""?{loadingMoreWitnesses:!0}:{loadingWitnesses:!0,error:null});try{const u=await ct.getWitnessesByVote(i,s);e(d=>{const f=new Set(d.witnesses.map(h=>h.owner)),o=u.filter(h=>!f.has(h.owner));return{witnesses:[...d.witnesses,...o],nextWitnessStart:u.length>0?u[u.length-1].owner:"",hasMoreWitnesses:u.length===s}});const c=u.filter(d=>!a().witnessDetails.has(d.owner)).map(d=>d.owner);c.length>0&&a().loadWitnessDetails(c)}catch(u){console.error("Error loading witnesses:",u),e({error:"Failed to load witnesses data"})}finally{e({loadingWitnesses:!1,loadingMoreWitnesses:!1})}},loadMoreWitnesses:async()=>{const{nextWitnessStart:i,hasMoreWitnesses:s,loadingMoreWitnesses:r}=a();!s||r||!i||await a().loadWitnesses(i,50)},loadWitnessVotes:async i=>{e({loadingVotes:!0,witnessVotes:[],nextVotesStart:"",hasMoreVotes:!1,selectedWitness:i});try{const s=await ct.getWitnessVotes(i,"",250);e({witnessVotes:s.votes,nextVotesStart:s.votes.length>0?s.votes[s.votes.length-1].account:"",hasMoreVotes:s.votes.length===250,loadingVotes:!1})}catch(s){console.error("Error loading witness votes:",s),e({error:"Failed to load witness votes",loadingVotes:!1})}},loadMoreVotes:async()=>{const{hasMoreVotes:i,loadingMoreVotes:s,nextVotesStart:r,selectedWitness:n,witnessVotes:u}=a();if(!i||s||!r||u.length>=1e3){u.length>=1e3&&e({hasMoreVotes:!1});return}e({loadingMoreVotes:!0});try{const c=await ct.getWitnessVotes(n||"",r,250);e(d=>{const o=[...d.witnessVotes,...c.votes].filter((l,p,x)=>x.findIndex(w=>w.account===l.account)===p),h=c.votes.filter((l,p,x)=>x.findIndex(w=>w.account===l.account)===p);return{witnessVotes:o,nextVotesStart:h.length>0?h[h.length-1].account:"",hasMoreVotes:c.votes.length===250}})}catch(c){console.error("Error loading more witness votes:",c)}finally{e({loadingMoreVotes:!1})}},loadUserWitnessVotes:async i=>{if(i){e({loadingUserVotes:!0});try{const s=await ct.getUserWitnessVotes(i);e({userWitnessVotes:s})}catch(s){console.error("Error loading user witness votes:",s)}finally{e({loadingUserVotes:!1})}}},loadWitnessDetails:async i=>{try{const s=await ct.getAccounts(i);e(r=>{const n=new Map(r.witnessDetails),u=new Map(r.witnessAccounts);return s.forEach(c=>{const d=ct.getWitnessDescription(c);d&&n.set(c.name,d),u.set(c.name,c)}),{witnessDetails:n,witnessAccounts:u}})}catch(s){console.error("Error loading witness details:",s)}},setFilters:i=>e({filters:i}),setSelectedWitness:i=>e({selectedWitness:i}),clearVotes:()=>e({witnessVotes:[],nextVotesStart:"",hasMoreVotes:!1,selectedWitness:null})})),vc=({filters:e,onFiltersChange:a,theme:i="dark"})=>{const s=i==="dark"?"text-blue-400 hover:text-blue-300":"text-blue-600 hover:text-blue-800",r=c=>{const d=e.status===c?"all":c;a({...e,status:d})},n=c=>{a({...e,name:c})},u=c=>{a({...e,version:c})};return t.jsxs("div",{className:`rounded-lg p-4 mb-6 border ${i==="dark"?"bg-slate-950 border-gray-800":"bg-white border-gray-200"}`,children:[t.jsx("h3",{className:`text-lg font-semibold mb-4 ${i==="dark"?"text-white":"text-gray-900"}`,children:"FILTERS"}),t.jsxs("div",{className:"mb-6",children:[t.jsx("h4",{className:`text-sm font-medium mb-3 ${i==="dark"?"text-gray-300":"text-gray-700"}`,children:"WITNESS"}),t.jsxs("div",{className:"space-y-2",children:[t.jsxs("label",{className:"flex items-center space-x-2 cursor-pointer",children:[t.jsx("input",{type:"checkbox",checked:e.status==="active",onChange:()=>r("active"),className:"w-4 h-4 text-blue-600 rounded focus:ring-blue-500 focus:ring-2"}),t.jsx("span",{className:`${i==="dark"?"text-white":"text-gray-900"}`,children:"Active"})]}),t.jsxs("label",{className:"flex items-center space-x-2 cursor-pointer",children:[t.jsx("input",{type:"checkbox",checked:e.status==="disabled",onChange:()=>r("disabled"),className:"w-4 h-4 text-blue-600 rounded focus:ring-blue-500 focus:ring-2"}),t.jsx("span",{className:`${i==="dark"?"text-white":"text-gray-900"}`,children:"Disabled/Stale"})]}),t.jsxs("label",{className:"flex items-center space-x-2 cursor-pointer",children:[t.jsx("input",{type:"checkbox",checked:e.status==="approved",onChange:()=>r("approved"),className:"w-4 h-4 text-blue-600 rounded focus:ring-blue-500 focus:ring-2"}),t.jsx("span",{className:`${i==="dark"?"text-white":"text-gray-900"}`,children:"Approved"})]}),e.status!=="all"&&t.jsx("button",{onClick:()=>a({...e,status:"all"}),className:`text-sm underline ${s}`,children:"Clear Status Filter"})]})]}),t.jsxs("div",{className:"mb-6",children:[t.jsx("h4",{className:`text-sm font-medium mb-3 ${i==="dark"?"text-gray-300":"text-gray-700"}`,children:"NAME"}),t.jsxs("div",{className:"relative",children:[t.jsx("div",{className:"absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none",children:t.jsx("svg",{className:`w-4 h-4 ${i==="dark"?"text-gray-400":"text-gray-500"}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})})}),t.jsx("input",{type:"text",placeholder:"Search",value:e.name,onChange:c=>n(c.target.value),className:`w-full pl-10 pr-4 py-2 border-b focus:outline-none focus:border-blue-500 ${i==="dark"?"bg-slate-900 border-gray-700 text-white placeholder-gray-400":"bg-gray-50 border-gray-300 text-gray-900 placeholder-gray-500"}`})]})]}),t.jsxs("div",{children:[t.jsx("h4",{className:`text-sm font-medium mb-3 ${i==="dark"?"text-gray-300":"text-gray-700"}`,children:"VERSION"}),t.jsxs("div",{className:"relative",children:[t.jsx("div",{className:"absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none",children:t.jsx("svg",{className:`w-4 h-4 ${i==="dark"?"text-gray-400":"text-gray-500"}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})})}),t.jsx("input",{type:"text",placeholder:"Version",value:e.version,onChange:c=>u(c.target.value),className:`w-full pl-10 pr-4 py-2 border-b focus:outline-none focus:border-blue-500 ${i==="dark"?"bg-slate-900 border-gray-700 text-white placeholder-gray-400":"bg-gray-50 border-gray-300 text-gray-900 placeholder-gray-500"}`})]})]})]})},Ci=768;function Ed(){const[e,a]=Qn.useState(void 0);return Qn.useEffect(()=>{const i=window.matchMedia(`(max-width: ${Ci-1}px)`),s=()=>{a(window.innerWidth<Ci)};return i.addEventListener("change",s),a(window.innerWidth<Ci),()=>i.removeEventListener("change",s)},[]),!!e}const Rp=({isOpen:e,onClose:a,witness:i,votes:s,loadingMore:r,hasMore:n,loadingInitial:u,scrollContainerRef:c,sentinelRef:d,loadMoreVotes:f,theme:o="dark"})=>{const h=P.useCallback(l=>{l[0].isIntersecting&&n&&!r&&f()},[n,r,f]);return P.useEffect(()=>{const l=new IntersectionObserver(h,{threshold:.1,root:c.current});return d.current&&l.observe(d.current),()=>{d.current&&l.unobserve(d.current)}},[h,c,d]),e?t.jsx("div",{className:"fixed inset-0 bg-black/50 bg-opacity-50 flex items-center justify-center z-50 p-4",children:t.jsxs("div",{className:`rounded-lg max-w-2xl w-full max-h-[80vh] overflow-hidden border ${o==="dark"?"bg-slate-950 border-gray-800":"bg-white border-gray-200"}`,children:[t.jsxs("div",{className:`flex items-center justify-between p-4 border-b ${o==="dark"?"border-gray-800":"border-gray-200"}`,children:[t.jsxs("h3",{className:`text-lg font-semibold ${o==="dark"?"text-white":"text-gray-900"}`,children:["Votes for @",i," (showing ",s.length,")"]}),t.jsx("button",{onClick:a,className:`text-xl font-bold ${o==="dark"?"text-gray-400 hover:text-white":"text-gray-500 hover:text-gray-900"}`,children:"×"})]}),t.jsxs("div",{ref:c,className:"p-4 overflow-y-auto max-h-[60vh]",children:[t.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:s.map((l,p)=>t.jsxs("div",{className:`flex items-center space-x-3 p-3 rounded-lg border ${o==="dark"?"bg-gray-800 border-gray-800":"bg-gray-50 border-gray-200"}`,children:[t.jsx("div",{className:`w-8 h-8 rounded-full flex items-center justify-center text-sm font-medium ${o==="dark"?"bg-gray-600 text-white":"bg-gray-200 text-gray-900"}`,children:t.jsx("img",{className:"w-8 h-8 rounded-full",src:`https://images.hive.blog/u/${l.account}/avatar`,alt:l.account,onError:x=>{x.target.src="https://images.hive.blog/u/null/avatar"}})}),t.jsxs("div",{className:"flex-1",children:[t.jsx("div",{className:`font-medium ${o==="dark"?"text-white":"text-gray-900"}`,children:l.account}),t.jsxs("div",{className:`text-sm ${o==="dark"?"text-gray-400":"text-gray-500"}`,children:["Vote #",p+1]})]}),t.jsx("div",{className:`text-sm ${o==="dark"?"text-gray-400":"text-gray-500"}`,children:"25"})]},l.account))}),s.length===0&&!u&&t.jsx("div",{className:`text-center py-8 ${o==="dark"?"text-gray-400":"text-gray-500"}`,children:"No votes found for this witness."}),r&&t.jsx("div",{className:`text-center py-4 ${o==="dark"?"text-gray-400":"text-gray-500"}`,children:"Loading more votes..."}),n&&!r&&t.jsx("div",{className:"text-center py-4",children:t.jsx("button",{onClick:f,className:"bg-blue-500 hover:bg-blue-700 text-white font-bold py-2 px-4 rounded",children:"Load More Votes"})}),n&&t.jsx("div",{ref:d,className:"h-4"})]})]})}):null},Ip=({username:e,filters:a={status:"all",name:"",version:""},onWitnessVoteClick:i,onWitnessStatsClick:s,onWitnessUrlClick:r,theme:n="dark"})=>{const u=Ed(),c=Ue(I=>I.witnesses),d=Ue(I=>I.userWitnessVotes),f=Ue(I=>I.loadingWitnesses),o=Ue(I=>I.error),h=Ue(I=>I.selectedWitness),l=Ue(I=>I.witnessVotes),p=Ue(I=>I.hasMoreVotes),x=Ue(I=>I.loadingMoreVotes),w=Ue(I=>I.loadingVotes),b=Ue(I=>I.filters),g=Ue(I=>I.hasMoreWitnesses),v=Ue(I=>I.loadingWitnesses),_=Ue(I=>I.witnessDetails);Ue(I=>I.witnessAccounts);const N=Ue(I=>I.loadWitnesses),y=Ue(I=>I.loadMoreWitnesses),m=Ue(I=>I.loadWitnessVotes),k=Ue(I=>I.loadMoreVotes),j=Ue(I=>I.loadUserWitnessVotes),A=Ue(I=>I.setFilters),[D,C]=P.useState(!1),[O,L]=P.useState(!1),H=P.useRef(null),F=P.useRef(null),B=P.useRef(null),$=P.useCallback(I=>{I[0].isIntersecting&&g&&!v&&y()},[g,v,y]);P.useEffect(()=>{const I=new IntersectionObserver($,{threshold:.1});return B.current&&I.observe(B.current),()=>{B.current&&I.unobserve(B.current)}},[$]),P.useEffect(()=>{N()},[N]),P.useEffect(()=>{e&&j(e)},[e,j]),P.useEffect(()=>{A(a)},[]);const G=P.useMemo(()=>c.filter(I=>{if(b.status!=="all"){if(b.status==="active"){const V=new Date;if(V.setFullYear(V.getFullYear()-1),new Date(I.last_hbd_exchange_update+"Z")<=V)return!1}else if(b.status==="disabled"){const V=new Date;if(V.setFullYear(V.getFullYear()-1),new Date(I.last_hbd_exchange_update+"Z")>V)return!1}else if(b.status==="approved"&&!d.includes(I.owner))return!1}return!(b.name&&!I.owner.toLowerCase().includes(b.name.toLowerCase())||b.version&&!I.running_version.includes(b.version))}),[c,b,d]),X=async I=>{i?i(I):(await m(I),C(!0))},ee=I=>{s?s(I):window.open(`https://hivehub.dev/witnesses/@${I}`,"_blank")},R=I=>{r?r(I):window.open(I,"_blank")},se=I=>e?d.includes(I):!1;return f?t.jsx("div",{className:"flex items-center justify-center p-8",children:t.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-blue-500"})}):o?t.jsx("div",{className:"text-center p-8 text-red-400",children:o}):t.jsxs("div",{className:"w-full",children:[t.jsx(Rp,{isOpen:D,onClose:()=>C(!1),witness:h||"",votes:l,loadingMore:x,hasMore:p,loadingInitial:w,scrollContainerRef:F,sentinelRef:H,loadMoreVotes:k,theme:n}),u?t.jsxs("div",{className:`w-full p-2 ${n==="dark"?"bg-slate-950":"bg-white"}`,children:[t.jsxs("div",{className:"flex justify-between items-center mb-4",children:[t.jsx("h2",{className:`text-lg font-semibold ${n==="dark"?"text-white":"text-gray-900"}`,children:"Witnesses"}),t.jsxs("button",{onClick:()=>L(!O),className:"bg-blue-500 hover:bg-blue-700 text-white font-bold py-2 px-4 rounded flex items-center space-x-2",children:[t.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 4a1 1 0 011-1h16a1 1 0 011 1v2.586a1 1 0 01-.293.707l-6.414 6.414a1 1 0 00-.293.707V17l-4 4v-6.586a1 1 0 00-.293-.707L3.293 7.293A1 1 0 013 6.586V4z"})}),t.jsx("span",{children:O?"Hide Filters":"Show Filters"})]})]}),O&&t.jsx("div",{className:"fixed inset-0 bg-black/50 bg-opacity-50 flex items-center justify-center z-50 p-4",children:t.jsxs("div",{className:`rounded-lg w-full max-w-md max-h-[80vh] overflow-hidden border ${n==="dark"?"bg-slate-950 border-gray-800":"bg-white border-gray-200"}`,children:[t.jsxs("div",{className:`flex items-center justify-between p-4 border-b ${n==="dark"?"border-gray-800":"border-gray-200"}`,children:[t.jsx("h3",{className:`text-lg font-semibold ${n==="dark"?"text-white":"text-gray-900"}`,children:"Filters"}),t.jsx("button",{onClick:()=>L(!1),className:`text-xl font-bold ${n==="dark"?"text-gray-400 hover:text-white":"text-gray-500 hover:text-gray-900"}`,children:"×"})]}),t.jsx("div",{className:"p-4 overflow-y-auto max-h-[60vh]",children:t.jsx(vc,{filters:b,onFiltersChange:A,theme:n})})]})}),t.jsxs("div",{className:"space-y-4 max-h-[70vh] overflow-y-auto",children:[G.map((I,V)=>{const J=ct.getVersionStatus(I.running_version,I.hardfork_version_vote),oe=se(I.owner),K=c.findIndex(te=>te.owner===I.owner)+1;return t.jsxs("div",{className:`rounded-lg border p-4 shadow-sm ${n==="dark"?"bg-slate-900 border-gray-800":"bg-white border-gray-200"}`,children:[t.jsxs("div",{className:"flex items-center justify-between mb-3",children:[t.jsxs("div",{className:"flex items-center space-x-3",children:[t.jsxs("span",{className:`text-lg font-bold ${n==="dark"?"text-white":"text-gray-900"}`,children:["#",K]}),t.jsx("img",{className:"w-10 h-10 rounded-full",src:`https://images.hive.blog/u/${I.owner}/avatar`,alt:I.owner,onError:te=>{te.target.src="https://images.hive.blog/u/null/avatar"}}),t.jsxs("div",{children:[t.jsx("div",{className:`font-medium ${n==="dark"?"text-white":"text-gray-900"}`,children:I.owner}),t.jsxs("div",{className:`text-xs ${n==="dark"?"text-gray-400":"text-gray-500"}`,children:["Since ",new Date(I.created).getFullYear()]})]})]}),t.jsxs("div",{className:"flex items-center space-x-2",children:[t.jsx("div",{className:"flex items-center justify-center",children:t.jsx("svg",{className:`w-6 h-6 ${oe?"text-green-600":n==="dark"?"text-gray-500":"text-gray-400"}`,fill:"currentColor",viewBox:"0 0 20 20",children:t.jsx("path",{fillRule:"evenodd",d:"M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z",clipRule:"evenodd"})})}),t.jsxs("div",{className:"flex space-x-1",children:[t.jsx("button",{onClick:()=>R(I.url),className:`${n==="dark"?"text-gray-400 hover:text-white":"text-gray-500 hover:text-gray-900"}`,title:"Visit witness URL",children:"🔗"}),t.jsx("button",{onClick:()=>ee(I.owner),className:`${n==="dark"?"text-gray-400 hover:text-white":"text-gray-500 hover:text-gray-900"}`,title:"View witness stats",children:"📊"})]})]})]}),t.jsxs("div",{className:"grid grid-cols-3 gap-4 mb-3",children:[t.jsxs("div",{className:"text-center",children:[t.jsx("div",{className:`text-xs uppercase ${n==="dark"?"text-gray-400":"text-gray-500"}`,children:"Version"}),t.jsx("span",{className:`px-2 py-1 rounded-full text-xs font-medium mt-1 block ${J==="green"?"bg-green-100 text-green-800":J==="red"?"bg-red-100 text-red-800":"bg-gray-100 text-gray-800"}`,children:I.running_version})]}),t.jsxs("div",{className:"text-center",children:[t.jsx("div",{className:`text-xs uppercase ${n==="dark"?"text-gray-400":"text-gray-500"}`,children:"Votes (MHP)"}),t.jsx("button",{onClick:()=>X(I.owner),className:"text-blue-600 hover:text-blue-800 cursor-pointer text-sm font-medium mt-1",disabled:w,children:w&&h===I.owner?"Loading...":ct.formatVotesToMHP(I.votes)})]}),t.jsxs("div",{className:"text-center",children:[t.jsx("div",{className:`text-xs uppercase ${n==="dark"?"text-gray-400":"text-gray-500"}`,children:"APR"}),t.jsxs("div",{className:`font-medium mt-1 ${n==="dark"?"text-white":"text-gray-900"}`,children:[ct.calculateAPR(I.props.hbd_interest_rate),"%"]})]})]}),t.jsxs("div",{className:"grid grid-cols-3 gap-4 text-xs",children:[t.jsxs("div",{className:"text-center",children:[t.jsx("div",{className:`uppercase ${n==="dark"?"text-gray-400":"text-gray-500"}`,children:"Last Block"}),t.jsx("div",{className:`${n==="dark"?"text-white":"text-gray-900"}`,children:I.last_confirmed_block_num.toLocaleString()})]}),t.jsxs("div",{className:"text-center",children:[t.jsx("div",{className:`uppercase ${n==="dark"?"text-gray-400":"text-gray-500"}`,children:"Miss"}),t.jsx("div",{className:`${n==="dark"?"text-white":"text-gray-900"}`,children:I.total_missed.toLocaleString()})]}),t.jsxs("div",{className:"text-center",children:[t.jsx("div",{className:`uppercase ${n==="dark"?"text-gray-400":"text-gray-500"}`,children:"Price Feed"}),t.jsx("div",{className:`${n==="dark"?"text-white":"text-gray-900"}`,children:I.hbd_exchange_rate.base}),t.jsx("div",{className:`${n==="dark"?"text-gray-400":"text-gray-500"}`,children:ct.formatTimeAgo(I.last_hbd_exchange_update+"Z")})]})]}),_.get(I.owner)&&t.jsx("div",{className:`mt-3 pt-3 border-t ${n==="dark"?"border-gray-800":"border-gray-200"}`,children:t.jsx("div",{className:`text-xs line-clamp-2 ${n==="dark"?"text-gray-400":"text-gray-500"}`,children:_.get(I.owner)})})]},I.owner)}),v&&t.jsxs("div",{className:"flex items-center justify-center py-4",children:[t.jsx("div",{className:"animate-spin rounded-full h-6 w-6 border-b-2 border-blue-500"}),t.jsx("span",{className:`ml-2 ${n==="dark"?"text-gray-400":"text-gray-500"}`,children:"Loading more witnesses..."})]}),g&&t.jsx("div",{ref:B,className:"h-1"})]})]}):t.jsx("div",{className:`max-w-7xl mx-auto p-2 ${n==="dark"?"bg-slate-950":"bg-white"}`,children:t.jsxs("div",{className:"grid grid-cols-5 gap-4",children:[t.jsx("div",{className:"col-span-1 sticky top-0 h-screen overflow-y-auto",children:t.jsx(vc,{filters:b,onFiltersChange:A,theme:n})}),t.jsxs("div",{className:"col-span-4 overflow-auto max-h-screen",children:[t.jsxs("table",{className:`w-full text-xs text-left ${n==="dark"?"text-gray-400":"text-gray-500"}`,children:[t.jsx("thead",{className:`text-xs uppercase ${n==="dark"?"text-gray-400 bg-slate-900":"text-gray-700 bg-gray-50"}`,children:t.jsxs("tr",{children:[t.jsx("th",{scope:"col",className:"px-2 py-2",children:"Rank"}),t.jsx("th",{scope:"col",className:"px-2 py-2",children:"Witness"}),t.jsx("th",{scope:"col",className:"px-2 py-2",children:"Version"}),t.jsx("th",{scope:"col",className:"px-2 py-2",children:"Votes"}),t.jsx("th",{scope:"col",className:"px-2 py-2",children:"Last Block"}),t.jsx("th",{scope:"col",className:"px-2 py-2",children:"Miss"}),t.jsx("th",{scope:"col",className:"px-2 py-2",children:"Feed"}),t.jsx("th",{scope:"col",className:"px-2 py-2",children:"APR"}),t.jsx("th",{scope:"col",className:"px-2 py-2",children:"Vote"})]})}),t.jsx("tbody",{children:G.map((I,V)=>{const J=ct.getVersionStatus(I.running_version,I.hardfork_version_vote),oe=se(I.owner);return t.jsxs("tr",{className:`border-b hover:bg-gray-50 ${n==="dark"?"border-gray-800 hover:bg-gray-800":"border-gray-200"}`,children:[t.jsx("td",{className:`px-2 py-2 font-medium text-xs ${n==="dark"?"text-white":"text-gray-900"}`,children:c.findIndex(K=>K.owner===I.owner)+1}),t.jsx("td",{className:"px-2 py-2",children:t.jsxs("div",{className:"flex items-center space-x-2",children:[t.jsx("img",{className:"w-6 h-6 rounded-full",src:`https://images.hive.blog/u/${I.owner}/avatar`,alt:I.owner,onError:K=>{K.target.src="https://images.hive.blog/u/null/avatar"}}),t.jsxs("div",{className:"flex-1 min-w-0",children:[t.jsx("div",{className:`font-medium text-xs truncate ${n==="dark"?"text-white":"text-gray-900"}`,children:I.owner}),t.jsxs("div",{className:`text-xs ${n==="dark"?"text-gray-400":"text-gray-500"}`,children:["Since ",new Date(I.created).getFullYear()]})]}),t.jsxs("div",{className:"flex space-x-1 flex-shrink-0",children:[t.jsx("button",{onClick:()=>R(I.url),className:`text-xs ${n==="dark"?"text-gray-400 hover:text-white":"text-gray-500 hover:text-gray-900"}`,title:"Visit witness URL",children:"🔗"}),t.jsx("button",{onClick:()=>ee(I.owner),className:`text-xs ${n==="dark"?"text-gray-400 hover:text-white":"text-gray-500 hover:text-gray-900"}`,title:"View witness stats",children:"📊"})]})]})}),t.jsx("td",{className:"px-2 py-2",children:t.jsx("span",{className:`px-1 py-0.5 rounded text-xs font-medium ${J==="green"?"bg-green-100 text-green-800":J==="red"?"bg-red-100 text-red-800":"bg-gray-100 text-gray-800"}`,children:I.running_version})}),t.jsx("td",{className:"px-2 py-2",children:t.jsx("button",{onClick:()=>X(I.owner),className:"text-blue-600 hover:text-blue-800 cursor-pointer text-xs",disabled:w,children:w&&h===I.owner?"...":ct.formatVotesToMHP(I.votes)})}),t.jsx("td",{className:"px-2 py-2 text-right",children:t.jsx("div",{className:`text-xs ${n==="dark"?"text-white":"text-gray-900"}`,children:I.last_confirmed_block_num.toLocaleString()})}),t.jsx("td",{className:"px-2 py-2 text-right text-xs",children:t.jsx("div",{className:`${n==="dark"?"text-white":"text-gray-900"}`,children:I.total_missed.toLocaleString()})}),t.jsx("td",{className:"px-2 py-2 text-right",children:t.jsx("div",{className:`text-xs ${n==="dark"?"text-white":"text-gray-900"}`,children:I.hbd_exchange_rate.base})}),t.jsx("td",{className:"px-2 py-2 text-right text-xs",children:t.jsxs("div",{className:`${n==="dark"?"text-white":"text-gray-900"}`,children:[ct.calculateAPR(I.props.hbd_interest_rate),"%"]})}),t.jsx("td",{className:"px-2 py-2",children:t.jsx("div",{className:"flex items-center justify-center",children:t.jsx("svg",{className:`w-4 h-4 ${oe?"text-green-600":n==="dark"?"text-gray-500":"text-gray-400"}`,fill:"currentColor",viewBox:"0 0 20 20",children:t.jsx("path",{fillRule:"evenodd",d:"M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z",clipRule:"evenodd"})})})})]},I.owner)})})]}),v&&t.jsxs("div",{className:"flex items-center justify-center py-4",children:[t.jsx("div",{className:"animate-spin rounded-full h-6 w-6 border-b-2 border-blue-500"}),t.jsx("span",{className:`ml-2 ${n==="dark"?"text-gray-400":"text-gray-500"}`,children:"Loading more witnesses..."})]}),g&&t.jsx("div",{ref:B,className:"h-1"})]})]})})]})},Fp=new oa.Client(["https://api.hive.blog","https://api.syncad.com","https://api.deathwing.me"]);class qp{async getTransactionHistory(a,i=-1,s=1e3,r=null,n=null){try{const u=[a,i,s];r!==null&&n!==null&&u.push(r,n);const c=await Fp.call("condenser_api","get_account_history",u);return Array.isArray(c)?c.map(d=>Array.isArray(d)&&d.length>=2?d[1]:d):[]}catch(u){return console.error("Error in getTransactionHistory:",u),[]}}async getFilteredTransactionHistory(a,i=[],s=100){try{const r=await this.getTransactionHistory(a,-1,1e3);let n=r;return i.length>0&&(n=r.filter(u=>{const c=u.op?.[0];return i.includes(c)})),n.slice(0,s)}catch(r){return console.error("Error in getFilteredTransactionHistory:",r),[]}}async getRecentTransfers(a,i=50){return this.getFilteredTransactionHistory(a,["transfer"],i)}async getRecentVotes(a,i=50){return this.getFilteredTransactionHistory(a,["vote"],i)}async getRecentComments(a,i=50){return this.getFilteredTransactionHistory(a,["comment"],i)}parseOperation(a){try{if(!a.op||!Array.isArray(a.op)||a.op.length<2)return null;const[i,s]=a.op;switch(i){case"transfer":return{type:"transfer",value:{from:s.from||"",to:s.to||"",amount:s.amount||"",memo:s.memo||""}};case"vote":return{type:"vote",value:{voter:s.voter||"",author:s.author||"",permlink:s.permlink||"",weight:s.weight||0}};case"comment":return{type:"comment",value:{parent_author:s.parent_author||"",parent_permlink:s.parent_permlink||"",author:s.author||"",permlink:s.permlink||"",title:s.title||"",body:s.body||"",json_metadata:s.json_metadata||""}};case"custom_json":return{type:"custom_json",value:{required_auths:s.required_auths||[],required_posting_auths:s.required_posting_auths||[],id:s.id||"",json:s.json||""}};case"comment_payout_update":return{type:"comment_payout_update",value:{author:s.author||"",permlink:s.permlink||""}};case"comment_options":return{type:"comment_options",value:{author:s.author||"",permlink:s.permlink||"",max_accepted_payout:s.max_accepted_payout||"",percent_hbd:s.percent_hbd||0,allow_votes:s.allow_votes||!1,allow_curation_rewards:s.allow_curation_rewards||!1,extensions:s.extensions||[]}};case"effective_comment_vote":return{type:"effective_comment_vote",value:{voter:s.voter||"",author:s.author||"",permlink:s.permlink||"",pending_payout:s.pending_payout||"",weight:s.weight||0,rshares:s.rshares||0,total_vote_weight:s.total_vote_weight||0}};default:return console.warn("Unknown operation type:",i,a.op),null}}catch(i){return console.error("Error parsing operation:",i,a.op),null}}formatTimestamp(a){try{return new Date(a).toLocaleString()}catch(i){return console.error("Error formatting timestamp:",i),a}}getTransactionSummary(a){const i={};let s="",r="";return a.forEach(n=>{const u=n.op?.[0]||"unknown";i[u]=(i[u]||0)+1,(!s||n.timestamp<s)&&(s=n.timestamp),(!r||n.timestamp>r)&&(r=n.timestamp)}),{totalTransactions:a.length,operationCounts:i,dateRange:{earliest:s,latest:r}}}}const aa=new qp;function Bp({account:e,className:a}){const[i,s]=P.useState([]),[r,n]=P.useState([]),[u,c]=P.useState(!1),[d,f]=P.useState(null),[o,h]=P.useState(""),[l,p]=P.useState("all"),[x,w]=P.useState(50),b=[{value:"all",label:"All Operations",icon:z.Activity},{value:"transfer",label:"Transfers",icon:z.Send},{value:"vote",label:"Votes",icon:z.TrendingUp},{value:"comment",label:"Comments",icon:z.MessageCircle},{value:"custom_json",label:"Custom JSON",icon:z.ArrowUpDown},{value:"comment_payout_update",label:"Payout Updates",icon:z.RefreshCw},{value:"comment_options",label:"Comment Options",icon:z.Filter},{value:"effective_comment_vote",label:"Effective Votes",icon:z.Users}],g=async()=>{if(e){c(!0),f(null);try{const y=await aa.getTransactionHistory(e,-1,x);s(y),n(y)}catch(y){f("Failed to load transaction history"),console.error("Error loading transactions:",y)}finally{c(!1)}}};P.useEffect(()=>{g()},[e,x]),P.useEffect(()=>{let y=i;if(l!=="all"&&(y=y.filter(m=>m.op?.[0]===l)),o){const m=o.toLowerCase();y=y.filter(k=>{const j=aa.parseOperation(k);if(!j)return!1;switch(j.type){case"transfer":return j.value.from.toLowerCase().includes(m)||j.value.to.toLowerCase().includes(m)||j.value.memo.toLowerCase().includes(m);case"vote":return j.value.voter.toLowerCase().includes(m)||j.value.author.toLowerCase().includes(m)||j.value.permlink.toLowerCase().includes(m);case"comment":return j.value.author.toLowerCase().includes(m)||j.value.title.toLowerCase().includes(m)||j.value.permlink.toLowerCase().includes(m);default:return!1}})}n(y)},[i,l,o]);const v=y=>{if(!y)return t.jsx(z.Activity,{className:"h-4 w-4"});const m=b.find(k=>k.value===y.type)?.icon||z.Activity;return t.jsx(m,{className:"h-4 w-4"})},_=y=>{const m=aa.parseOperation(y);if(!m)return t.jsx("span",{className:"text-gray-400",children:"Unknown operation"});switch(m.type){case"transfer":return t.jsxs("div",{className:"space-y-1",children:[t.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center gap-2",children:[t.jsx("span",{className:"px-2 py-1 bg-gray-700 text-gray-300 rounded text-xs font-medium",children:"Transfer"}),t.jsx("span",{className:"text-sm font-medium text-white",children:m.value.amount})]}),t.jsxs("div",{className:"text-sm text-gray-400 flex items-center gap-2",children:[t.jsx("span",{className:"flex-shrink-0",children:"From:"}),t.jsx("img",{src:be.userAvatar(m.value.from),alt:`${m.value.from} avatar`,className:"w-4 h-4 rounded-full flex-shrink-0",onError:k=>{k.target.src=be.userAvatar(m.value.from)}}),t.jsx("span",{className:"font-mono text-gray-300 truncate",children:m.value.from})]}),t.jsxs("div",{className:"text-sm text-gray-400 flex items-center gap-2",children:[t.jsx("span",{className:"flex-shrink-0",children:"To:"}),t.jsx("img",{src:be.userAvatar(m.value.to),alt:`${m.value.to} avatar`,className:"w-4 h-4 rounded-full flex-shrink-0",onError:k=>{k.target.src=be.userAvatar(m.value.to)}}),t.jsx("span",{className:"font-mono text-gray-300 truncate",children:m.value.to})]}),m.value.memo&&t.jsxs("div",{className:"text-sm text-gray-400",children:[t.jsx("span",{className:"flex-shrink-0",children:"Memo:"})," ",m.value.memo]})]});case"vote":return t.jsxs("div",{className:"space-y-1",children:[t.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center gap-2",children:[t.jsx("span",{className:"px-2 py-1 bg-gray-700 text-gray-300 rounded text-xs font-medium",children:"Vote"}),t.jsxs("span",{className:"text-sm font-medium text-white",children:[m.value.weight,"%"]})]}),t.jsxs("div",{className:"text-sm text-gray-400 flex items-center gap-2",children:[t.jsx("span",{className:"flex-shrink-0",children:"Voter:"}),t.jsx("img",{src:be.userAvatar(m.value.voter),alt:`${m.value.voter} avatar`,className:"w-4 h-4 rounded-full flex-shrink-0",onError:k=>{k.target.src=be.userAvatar(m.value.voter)}}),t.jsx("span",{className:"font-mono text-gray-300 truncate",children:m.value.voter})]}),t.jsxs("div",{className:"text-sm text-gray-400 flex items-center gap-2",children:[t.jsx("span",{className:"flex-shrink-0",children:"Author:"}),t.jsx("img",{src:be.userAvatar(m.value.author),alt:`${m.value.author} avatar`,className:"w-4 h-4 rounded-full flex-shrink-0",onError:k=>{k.target.src=be.userAvatar(m.value.author)}}),t.jsx("span",{className:"font-mono text-gray-300 truncate",children:m.value.author})]}),t.jsxs("div",{className:"text-sm text-gray-400",children:[t.jsx("span",{className:"flex-shrink-0",children:"Permlink:"})," ",m.value.permlink]})]});case"comment":return t.jsxs("div",{className:"space-y-1",children:[t.jsx("div",{className:"flex items-center gap-2",children:t.jsx("span",{className:"px-2 py-1 bg-gray-700 text-gray-300 rounded text-xs font-medium",children:"Comment"})}),t.jsxs("div",{className:"text-sm text-gray-400 flex items-center gap-2",children:[t.jsx("span",{className:"flex-shrink-0",children:"Author:"}),t.jsx("img",{src:be.userAvatar(m.value.author),alt:`${m.value.author} avatar`,className:"w-4 h-4 rounded-full flex-shrink-0",onError:k=>{k.target.src=be.userAvatar(m.value.author)}}),t.jsx("span",{className:"font-mono text-gray-300 truncate",children:m.value.author})]}),t.jsxs("div",{className:"text-sm text-gray-400",children:[t.jsx("span",{className:"flex-shrink-0",children:"Title:"})," ",m.value.title]}),t.jsxs("div",{className:"text-sm text-gray-400",children:[t.jsx("span",{className:"flex-shrink-0",children:"Permlink:"})," ",m.value.permlink]})]});case"custom_json":return t.jsxs("div",{className:"space-y-1",children:[t.jsx("div",{className:"flex items-center gap-2",children:t.jsx("span",{className:"px-2 py-1 bg-gray-700 text-gray-300 rounded text-xs font-medium",children:"Custom JSON"})}),t.jsxs("div",{className:"text-sm text-gray-400",children:["ID: ",m.value.id]}),t.jsxs("div",{className:"text-sm text-gray-400",children:["JSON: ",m.value.json.substring(0,100),"..."]})]});case"comment_payout_update":return t.jsxs("div",{className:"space-y-1",children:[t.jsx("div",{className:"flex items-center gap-2",children:t.jsx("span",{className:"px-2 py-1 bg-gray-700 text-gray-300 rounded text-xs font-medium",children:"Payout Update"})}),t.jsxs("div",{className:"text-sm text-gray-400 flex items-center gap-2",children:[t.jsx("span",{className:"flex-shrink-0",children:"Author:"}),t.jsx("img",{src:be.userAvatar(m.value.author),alt:`${m.value.author} avatar`,className:"w-4 h-4 rounded-full flex-shrink-0",onError:k=>{k.target.src=be.userAvatar(m.value.author)}}),t.jsx("span",{className:"font-mono text-gray-300 truncate",children:m.value.author})]}),t.jsxs("div",{className:"text-sm text-gray-400",children:[t.jsx("span",{className:"flex-shrink-0",children:"Permlink:"})," ",m.value.permlink]})]});case"comment_options":return t.jsxs("div",{className:"space-y-1",children:[t.jsx("div",{className:"flex items-center gap-2",children:t.jsx("span",{className:"px-2 py-1 bg-gray-700 text-gray-300 rounded text-xs font-medium",children:"Comment Options"})}),t.jsxs("div",{className:"text-sm text-gray-400 flex items-center gap-2",children:[t.jsx("span",{className:"flex-shrink-0",children:"Author:"}),t.jsx("img",{src:be.userAvatar(m.value.author),alt:`${m.value.author} avatar`,className:"w-4 h-4 rounded-full flex-shrink-0",onError:k=>{k.target.src=be.userAvatar(m.value.author)}}),t.jsx("span",{className:"font-mono text-gray-300 truncate",children:m.value.author})]}),t.jsxs("div",{className:"text-sm text-gray-400",children:[t.jsx("span",{className:"flex-shrink-0",children:"Max Payout:"})," ",m.value.max_accepted_payout]}),t.jsxs("div",{className:"text-sm text-gray-400",children:[t.jsx("span",{className:"flex-shrink-0",children:"HBD Percent:"})," ",m.value.percent_hbd,"%"]})]});case"effective_comment_vote":return t.jsxs("div",{className:"space-y-1",children:[t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx("span",{className:"px-2 py-1 bg-gray-700 text-gray-300 rounded text-xs font-medium",children:"Effective Vote"}),t.jsx("span",{className:"text-sm font-medium text-white",children:m.value.weight})]}),t.jsxs("div",{className:"text-sm text-gray-400",children:["Voter:"," ",t.jsx("span",{className:"font-mono text-gray-300",children:m.value.voter})]}),t.jsxs("div",{className:"text-sm text-gray-400",children:["Post: @",m.value.author,"/",m.value.permlink]}),t.jsxs("div",{className:"text-sm text-gray-400",children:["Pending Payout: ",m.value.pending_payout]})]});default:return t.jsx("span",{className:"text-gray-400",children:"Unknown operation"})}},N=aa.getTransactionSummary(i);return u?t.jsxs("div",{className:`bg-gray-800 border border-gray-700 rounded-lg shadow-sm ${a}`,children:[t.jsxs("div",{className:"p-2 md:p-6",children:[t.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[t.jsx(z.Activity,{className:"h-5 w-5 text-gray-300"}),t.jsx("h3",{className:"text-lg font-semibold text-white",children:"Transaction History"})]}),t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx("p",{className:"text-sm text-gray-400",children:"Loading transaction history for"}),t.jsx("img",{src:be.userAvatar(e),alt:`${e} avatar`,className:"w-6 h-6 rounded-full",onError:y=>{y.target.src=be.userAvatar(e)}}),t.jsxs("p",{className:"text-sm text-gray-400",children:["@",e]})]})]}),t.jsx("div",{className:"p-2 md:p-6 space-y-2 md:space-y-4",children:Array.from({length:5}).map((y,m)=>t.jsxs("div",{className:"space-y-2",children:[t.jsx("div",{className:"h-4 bg-gray-700 rounded animate-pulse w-3/4"}),t.jsx("div",{className:"h-3 bg-gray-700 rounded animate-pulse w-1/2"})]},m))})]}):t.jsxs("div",{className:`bg-gray-800 border border-gray-700 rounded-lg shadow-sm ${a}`,children:[t.jsxs("div",{className:"p-4 md:p-6",children:[t.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[t.jsx(z.Activity,{className:"h-5 w-5 text-gray-300"}),t.jsx("h3",{className:"text-lg font-semibold text-white",children:"Transaction History"})]}),t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx("p",{className:"text-sm text-gray-400",children:"Transaction history for"}),t.jsx("img",{src:be.userAvatar(e),alt:`${e} avatar`,className:"w-6 h-6 rounded-full",onError:y=>{y.target.src=be.userAvatar(e)}}),t.jsxs("p",{className:"text-sm text-gray-400",children:["@",e]})]}),t.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4 mt-4",children:[t.jsxs("div",{className:"text-center",children:[t.jsx("div",{className:"text-2xl font-bold text-white",children:N.totalTransactions}),t.jsx("div",{className:"text-sm text-gray-400",children:"Total"})]}),t.jsxs("div",{className:"text-center",children:[t.jsx("div",{className:"text-2xl font-bold text-white",children:N.operationCounts.transfer||0}),t.jsx("div",{className:"text-sm text-gray-400",children:"Transfers"})]}),t.jsxs("div",{className:"text-center",children:[t.jsx("div",{className:"text-2xl font-bold text-white",children:N.operationCounts.vote||0}),t.jsx("div",{className:"text-sm text-gray-400",children:"Votes"})]}),t.jsxs("div",{className:"text-center",children:[t.jsx("div",{className:"text-2xl font-bold text-white",children:N.operationCounts.comment||0}),t.jsx("div",{className:"text-sm text-gray-400",children:"Comments"})]})]})]}),t.jsxs("div",{className:"p-4 md:p-6 space-y-4",children:[t.jsxs("div",{className:"flex flex-col sm:flex-row gap-4",children:[t.jsx("div",{className:"flex-1",children:t.jsxs("div",{className:"relative",children:[t.jsx(z.Search,{className:"absolute left-3 top-1/2 transform -translate-y-1/2 h-4 w-4 text-gray-400"}),t.jsx("input",{type:"text",placeholder:"Search transactions...",value:o,onChange:y=>h(y.target.value),className:"w-full pl-10 pr-3 py-2 bg-gray-700 border border-gray-600 rounded-md text-white placeholder-gray-400 focus:outline-none focus:ring-2 focus:ring-blue-500"})]})}),t.jsx("select",{value:l,onChange:y=>p(y.target.value),className:"w-full sm:w-48 px-3 py-2 bg-gray-700 border border-gray-600 rounded-md text-white focus:outline-none focus:ring-2 focus:ring-blue-500",children:b.map(y=>t.jsx("option",{value:y.value,children:y.label},y.value))}),t.jsxs("select",{value:x.toString(),onChange:y=>w(parseInt(y.target.value)),className:"w-full sm:w-32 px-3 py-2 bg-gray-700 border border-gray-600 rounded-md text-white focus:outline-none focus:ring-2 focus:ring-blue-500",children:[t.jsx("option",{value:"25",children:"25"}),t.jsx("option",{value:"50",children:"50"}),t.jsx("option",{value:"100",children:"100"}),t.jsx("option",{value:"200",children:"200"})]}),t.jsx("button",{onClick:g,className:"px-3 py-2 bg-gray-700 border border-gray-600 rounded-md hover:bg-gray-600 text-white focus:outline-none focus:ring-2 focus:ring-blue-500",children:t.jsx(z.RefreshCw,{className:"h-4 w-4"})})]}),d&&t.jsx("div",{className:"p-4 border border-red-700 bg-red-900 rounded-md",children:t.jsx("p",{className:"text-red-300",children:d})}),t.jsx("div",{className:"space-y-4",children:r.length===0?t.jsx("div",{className:"text-center py-8 text-gray-400",children:"No transactions found"}):r.map(y=>{const m=aa.parseOperation(y);return t.jsxs("div",{className:"border border-gray-600 rounded-lg p-3 md:p-4 space-y-3 hover:bg-gray-700 transition-colors",children:[t.jsx("div",{className:"flex items-center justify-between",children:t.jsxs("div",{className:"flex items-center gap-3",children:[v(m),t.jsxs("div",{children:[t.jsx("div",{className:"font-medium text-white",children:m?.type?m.type.charAt(0).toUpperCase()+m.type.slice(1):"Unknown"}),t.jsxs("div",{className:"text-sm text-gray-400 flex items-center gap-1",children:[t.jsx(z.Clock,{className:"h-3 w-3"}),aa.formatTimestamp(y.timestamp)]})]})]})}),t.jsx("div",{className:"ml-6 md:ml-7",children:_(y)})]},`${y.trx_id}-${y.op_in_trx}`)})}),r.length>0&&t.jsxs("div",{className:"text-center text-sm text-gray-400",children:["Showing ",r.length," of ",i.length," ","transactions"]})]})]})}const Vp=new oa.Client(["https://api.hive.blog","https://api.syncad.com","https://api.deathwing.me"]);class Up{async getUserChannel(a,i="posts",s=20,r=null,n=null,u=null){const c={account:a,sort:i,limit:s};r&&(c.start_author=r),n&&(c.start_permlink=n),u&&(c.observer=u);try{const d=await Vp.call("bridge","get_account_posts",c);return Array.isArray(d)?d:[]}catch(d){return console.error("Error in getUserChannel:",d),[]}}async getUserPosts(a,i=20){return this.getUserChannel(a,"posts",i)}async getUserComments(a,i=20){return this.getUserChannel(a,"comments",i)}async getUserReplies(a,i=20){return this.getUserChannel(a,"replies",i)}async getAllUserActivity(a,i=10){try{const[s,r,n]=await Promise.all([this.getUserPosts(a,i),this.getUserComments(a,i),this.getUserReplies(a,i)]);return[...s,...r,...n].sort((c,d)=>new Date(d.created).getTime()-new Date(c.created).getTime())}catch(s){return console.error("Error in getAllUserActivity:",s),[]}}convertToDisplayItem(a){return{id:a.id,author:a.author,permlink:a.permlink,title:a.title,body:a.body,created:a.created,category:a.category,net_votes:a.net_votes,children:a.children,total_payout_value:a.total_payout_value,pending_payout_value:a.pending_payout_value,url:a.url,type:a.parent_author===""?"post":"comment"}}formatTimestamp(a){try{return new Date(a).toLocaleString()}catch(i){return console.error("Error formatting timestamp:",i),a}}getRelativeTime(a){try{const i=new Date(a),r=new Date().getTime()-i.getTime(),n=Math.floor(r/1e3),u=Math.floor(n/60),c=Math.floor(u/60),d=Math.floor(c/24);return n<60?`${n} seconds ago`:u<60?`${u} minutes ago`:c<24?`${c} hours ago`:d<7?`${d} days ago`:i.toLocaleDateString()}catch(i){return console.error("Error calculating relative time:",i),a}}truncateText(a,i=150){return a.length<=i?a:a.substring(0,i)+"..."}getActivitySummary(a){let i=0,s=0,r=0,n=0;return a.forEach(u=>{u.parent_author===""?i++:s++,r+=u.net_votes||0;const c=u.total_payout_value?.match(/(\d+\.?\d*)/);c&&(n+=parseFloat(c[1]))}),{totalActivities:a.length,postsCount:i,commentsCount:s,totalVotes:r,totalPayout:`${n.toFixed(3)} HIVE`,averageVotes:a.length>0?Math.round(r/a.length):0}}filterByCategory(a,i){return a.filter(s=>s.category===i)}filterByDateRange(a,i,s){return a.filter(r=>{const n=new Date(r.created);return n>=i&&n<=s})}searchActivities(a,i){const s=i.toLowerCase();return a.filter(r=>r.title.toLowerCase().includes(s)||r.body.toLowerCase().includes(s)||r.category.toLowerCase().includes(s))}}const na=new Up,zp=({username:e,className:a})=>{const[i,s]=P.useState([]),[r,n]=P.useState([]),[u,c]=P.useState([]),[d,f]=P.useState([]),[o,h]=P.useState([]),[l,p]=P.useState(!1),[x,w]=P.useState(null),[b,g]=P.useState(""),[v,_]=P.useState(20),[N,y]=P.useState("all"),[m,k]=P.useState(new Set),[j,A]=P.useState(!1),D=async()=>{if(!(!e||j)){p(!0),w(null);try{const[$,G,X]=await Promise.all([na.getUserPosts(e,v),na.getUserComments(e,v),na.getUserReplies(e,v)]);s($),n(G),c(X),A(!0)}catch($){w("Failed to load activity history"),console.error("Error loading activities:",$)}finally{p(!1)}}};P.useEffect(()=>{D()},[e]),P.useEffect(()=>{if(!j)return;let $=[];switch(N){case"posts":$=i;break;case"comments":$=r;break;case"replies":$=u;break;default:$=[...i,...r,...u].sort((G,X)=>new Date(X.created).getTime()-new Date(G.created).getTime());break}f($),h($)},[N,i,r,u,j]),P.useEffect(()=>{let $=d;b&&($=na.searchActivities(d,b)),h($)},[d,b]);const C=$=>!$||$==="0.000 HIVE"?"0 HIVE":$,O=$=>$.parent_author===""?"Post":$.depth===1?"Comment":"Reply",L=new to.DefaultRenderer({baseUrl:"https://hive.blog/",breaks:!0,skipSanitization:!1,allowInsecureScriptTags:!1,addNofollowToLinks:!0,doNotShowImages:!1,assetsWidth:640,assetsHeight:480,imageProxyFn:$=>$,usertagUrlFn:$=>`/@${$}`,hashtagUrlFn:$=>`/trending/${$}`,isLinkSafeFn:$=>!0,addExternalCssClassToMatchingLinksFn:$=>!0,ipfsPrefix:"https://ipfs.io/ipfs/"}),H=$=>{const G=new Set(m);G.has($)?G.delete($):G.add($),k(G)},F=$=>{const G=`${$.author}-${$.permlink}`,X=m.has(G),ee=$.body.length>100;return t.jsxs("div",{className:"border border-gray-200 dark:border-gray-600 rounded-lg p-3 sm:p-4 space-y-3 hover:bg-gray-50 dark:hover:bg-gray-700 transition-colors relative",children:[t.jsx("div",{className:"flex flex-col sm:flex-row sm:items-start sm:justify-between gap-3",children:t.jsx("div",{className:"flex items-start gap-3 flex-1",children:t.jsxs("div",{className:"flex-1 min-w-0",children:[t.jsxs("div",{className:"flex flex-wrap items-center gap-2 mb-1",children:[t.jsx("span",{className:`px-2 py-1 rounded text-xs font-medium ${$.parent_author===""?"bg-blue-900 text-blue-300":"bg-gray-100 dark:bg-gray-700 text-gray-600 dark:text-gray-300"}`,children:O($)}),t.jsxs("span",{className:"text-sm text-gray-500 dark:text-gray-400",children:["in #",$.category]})]}),t.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[t.jsx("img",{src:be.userAvatar($.author),alt:`${$.author} avatar`,className:"w-5 h-5 sm:w-6 sm:h-6 rounded-full flex-shrink-0",onError:R=>{R.target.src=be.userAvatar($.author)}}),t.jsx("h3",{className:"font-medium text-base sm:text-lg leading-tight text-gray-900 dark:text-white break-words",children:$.title||"Untitled"})]}),t.jsxs("div",{className:"prose prose-sm dark:prose-invert max-w-none mb-3 text-gray-500 dark:text-gray-400 comment-content overflow-hidden",children:[t.jsx("div",{className:"break-words overflow-wrap-anywhere",dangerouslySetInnerHTML:{__html:L.render(ee&&!X?$.body.substring(0,50)+".....":$.body)}}),ee&&t.jsxs("button",{onClick:()=>H(G),className:"mt-2 text-blue-400 hover:text-blue-300 text-sm font-medium flex items-center gap-1",children:[t.jsx(z.ChevronDown,{className:`h-3 w-3 transition-transform ${X?"rotate-180":""}`}),X?"Show less":"Show more"]})]}),t.jsxs("div",{className:"flex flex-wrap items-center gap-2 sm:gap-4 text-sm text-gray-500 dark:text-gray-400",children:[t.jsxs("div",{className:"flex items-center gap-1",children:[t.jsx(z.Clock,{className:"h-3 w-3 flex-shrink-0"}),t.jsx("span",{className:"truncate",children:na.getRelativeTime($.created)})]}),t.jsxs("div",{className:"flex items-center gap-1",children:[t.jsx(z.ThumbsUp,{className:"h-3 w-3 flex-shrink-0"}),t.jsxs("span",{children:[$.net_votes," votes"]})]}),t.jsxs("div",{className:"flex items-center gap-1",children:[t.jsx(z.Reply,{className:"h-3 w-3 flex-shrink-0"}),t.jsxs("span",{children:[$.children," replies"]})]}),t.jsxs("div",{className:"flex items-center gap-1",children:[t.jsx("span",{children:"💰"}),t.jsx("span",{children:C($.total_payout_value)})]})]})]})})}),t.jsx("button",{onClick:()=>window.open(`https://peakd.com/@${$.author}/${$.permlink}`,"_blank"),className:"absolute top-3 right-3 flex-shrink-0 p-2 hover:bg-gray-200 dark:hover:bg-gray-600 rounded-md transition-colors text-gray-500 dark:text-gray-400 hover:text-gray-900 dark:hover:text-white",children:t.jsx(z.ExternalLink,{className:"h-4 w-4"})})]},G)},B=na.getActivitySummary(d);return l?t.jsxs("div",{className:`bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg shadow-sm ${a}`,children:[t.jsx("div",{className:"p-6",children:t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400",children:"Loading activity history for"}),t.jsx("img",{src:be.userAvatar(e),alt:`${e} avatar`,className:"w-6 h-6 rounded-full",onError:$=>{$.target.src=be.userAvatar(e)}}),t.jsxs("p",{className:"text-sm text-gray-500 dark:text-gray-400",children:["@",e]})]})}),t.jsx("div",{className:"p-6 space-y-4",children:Array.from({length:5}).map(($,G)=>t.jsxs("div",{className:"space-y-2",children:[t.jsx("div",{className:"h-4 bg-gray-200 dark:bg-gray-700 rounded animate-pulse w-3/4"}),t.jsx("div",{className:"h-3 bg-gray-200 dark:bg-gray-700 rounded animate-pulse w-1/2"}),t.jsx("div",{className:"h-20 bg-gray-200 dark:bg-gray-700 rounded animate-pulse w-full"})]},G))})]}):t.jsxs("div",{className:`space-y-6 ${a}`,children:[t.jsx("div",{className:"bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-xl p-6",children:t.jsxs("div",{className:"flex flex-col md:flex-row items-start md:items-center gap-6",children:[t.jsx("img",{src:be.userAvatar(e),alt:`${e} avatar`,className:"w-16 h-16 rounded-full object-cover",onError:$=>{$.target.src=be.userAvatar(e)}}),t.jsxs("div",{className:"flex-1",children:[t.jsxs("h1",{className:"text-2xl font-bold text-gray-900 dark:text-white mb-2",children:["@",e]}),t.jsx("p",{className:"text-gray-600 dark:text-gray-400 mb-4",children:"Activity History"}),t.jsx("div",{className:"flex flex-wrap gap-6 text-sm",children:t.jsxs("div",{className:"flex items-center gap-2 text-gray-500 dark:text-gray-400",children:[t.jsx(z.FileText,{className:"w-4 h-4"}),t.jsxs("span",{children:[B.totalActivities," Total Activities"]})]})})]})]})}),t.jsxs("div",{children:[t.jsxs("div",{className:"flex md:grid md:grid-cols-4 overflow-x-auto md:overflow-visible w-full bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg",children:[t.jsx("button",{onClick:()=>y("all"),className:`flex-shrink-0 md:flex-shrink px-4 py-2 text-xs sm:text-sm font-medium transition-colors ${N==="all"?"bg-blue-600 dark:bg-blue-500 text-white":"text-gray-700 dark:text-gray-300 hover:bg-gray-300 dark:hover:bg-gray-700"}`,children:"All"}),t.jsx("button",{onClick:()=>y("posts"),className:`flex-shrink-0 md:flex-shrink px-4 py-2 text-xs sm:text-sm font-medium transition-colors ${N==="posts"?"bg-blue-600 dark:bg-blue-500 text-white":"text-gray-700 dark:text-gray-300 hover:bg-gray-300 dark:hover:bg-gray-700"}`,children:"Posts"}),t.jsx("button",{onClick:()=>y("comments"),className:`flex-shrink-0 md:flex-shrink px-4 py-2 text-xs sm:text-sm font-medium transition-colors ${N==="comments"?"bg-blue-600 dark:bg-blue-500 text-white":"text-gray-700 dark:text-gray-300 hover:bg-gray-300 dark:hover:bg-gray-700"}`,children:"Comments"}),t.jsx("button",{onClick:()=>y("replies"),className:`flex-shrink-0 md:flex-shrink px-4 py-2 text-xs sm:text-sm font-medium transition-colors ${N==="replies"?"bg-blue-600 dark:bg-blue-500 text-white":"text-gray-700 dark:text-gray-300 hover:bg-gray-300 dark:hover:bg-gray-700"}`,children:"Replies"})]}),t.jsxs("div",{className:"mt-6",children:[t.jsxs("div",{className:"flex flex-row gap-4 mb-6",children:[t.jsx("div",{className:"flex-1",children:t.jsxs("div",{className:"relative",children:[t.jsx(z.Search,{className:"absolute left-3 top-1/2 transform -translate-y-1/2 h-4 w-4 text-gray-500 dark:text-gray-400"}),t.jsx("input",{type:"text",placeholder:"Search activities...",value:b,onChange:$=>g($.target.value),className:"w-full pl-10 pr-3 py-2 bg-gray-100 dark:bg-gray-700 border border-gray-200 dark:border-gray-600 rounded-md text-gray-900 dark:text-white placeholder-gray-500 dark:placeholder-gray-400 focus:outline-none focus:ring-2 focus:ring-blue-500"})]})}),t.jsx("button",{onClick:()=>{A(!1),D()},className:"px-3 py-2 bg-gray-100 dark:bg-gray-700 border border-gray-200 dark:border-gray-600 rounded-md hover:bg-gray-200 dark:hover:bg-gray-600 text-gray-900 dark:text-white focus:outline-none focus:ring-2 focus:ring-blue-500",children:t.jsx(z.RefreshCw,{className:"h-4 w-4"})})]}),x&&t.jsx("div",{className:"p-4 border border-red-200 dark:border-red-700 bg-red-50 dark:bg-red-900 rounded-md",children:t.jsx("p",{className:"text-red-600 dark:text-red-300",children:x})}),t.jsx("div",{className:"space-y-4",children:o.length===0?t.jsx("div",{className:"text-center py-8 text-gray-500 dark:text-gray-400",children:"No activities found"}):o.map(F)}),o.length>0&&t.jsxs("div",{className:"text-center text-sm text-gray-500 dark:text-gray-400",children:["Showing ",o.length," of ",d.length," ","activities"]})]})]})]})};function Hp({author:e,permlink:a,currentUser:i,hiveValue:s=0,onUpvote:r,onSubmitComment:n,onComments:u,onReblog:c,onShare:d,onTip:f,onReport:o,onClickCommentUpvote:h}){const l=i==null||i===""?null:i,p=l!=null,[x,w]=P.useState([]),[b,g]=P.useState(0),[v,_]=P.useState(!1),[N,y]=P.useState(!1),[m,k]=P.useState(!1),[j,A]=P.useState({message:"",visible:!1}),[D,C]=P.useState(!1),O=P.useCallback(K=>{A({message:K,visible:!0}),setTimeout(()=>A(te=>({...te,visible:!1})),2500)},[]),L=P.useCallback(async()=>{const K=await Re.getActiveVotes(e,a);w(K)},[e,a]);P.useEffect(()=>{L()},[L]),P.useEffect(()=>{Re.getCommentsList(e,a).then(K=>{g(K.length)})},[e,a]);const H=p&&!!l&&x.some(K=>K.voter.toLowerCase()===l.toLowerCase()),F=(K,te)=>{if(!p){O(`Please Login to ${K}`);return}te()},B=()=>{F("Upvote",()=>{if(H){O("You have already upvoted this post");return}_(!0)})},$=async K=>{if(r){C(!0);try{await Promise.resolve(r(K)),_(!1),await L(),O("Vote submitted successfully")}catch(te){const pe=te instanceof Error?te.message:"Failed to upvote";O(pe)}finally{C(!1)}}},G=()=>{y(!0)},X=()=>{y(!1),p&&!H?_(!0):O(p?"You have already upvoted this post":"Please Login to Upvote")},ee=()=>{F("Comment",()=>{u?.(),k(!0)})},R=()=>{F("Reblog",()=>c?.())},se=()=>{F("Report",()=>o?.())},I=()=>{F("Tip",()=>f?.())},V=()=>{if(d){d();return}typeof navigator<"u"&&navigator.share?navigator.share({title:`${e}'s post`,url:`https://peakd.com/@${e}/${a}`,text:`Check out this post by @${e}`}).then(()=>O("Shared")).catch(()=>{}):(navigator.clipboard?.writeText(`https://peakd.com/@${e}/${a}`),O("Link copied to clipboard"))},J=async(K,te,pe)=>{if(!p){O("Please Login to comment");return}if(n)try{await Promise.resolve(n(K,te,pe)),O("Comment posted")}catch(Ee){const Z=Ee instanceof Error?Ee.message:"Failed to post comment";throw O(Z),Ee}},oe="absolute left-1/2 -translate-x-1/2 bottom-full mb-1 px-2 py-1 text-xs font-medium text-white bg-gray-800 dark:bg-gray-700 rounded shadow-lg whitespace-nowrap opacity-0 pointer-events-none group-hover:opacity-100 transition-opacity duration-150 z-[60]";return t.jsxs("div",{className:"flex flex-wrap items-center gap-3 sm:gap-4 text-sm",children:[t.jsxs("div",{className:"flex items-center gap-1",children:[t.jsxs("div",{className:"relative group",children:[t.jsx("span",{className:oe,children:"Upvote"}),t.jsx("button",{type:"button",onClick:B,disabled:D,className:"p-1 rounded hover:bg-gray-200 dark:hover:bg-gray-700 disabled:opacity-50","aria-label":"Upvote",children:D?t.jsx(z.Loader2,{className:"w-4 h-4 sm:w-5 sm:h-5 animate-spin text-blue-600"}):t.jsx(z.ThumbsUp,{className:`w-4 h-4 sm:w-5 sm:h-5 ${H?"text-blue-600 dark:text-blue-400 fill-current":"text-gray-600 dark:text-gray-400"}`})})]}),t.jsxs("div",{className:"relative group",children:[t.jsx("span",{className:oe,children:"View upvotes"}),t.jsx("button",{type:"button",onClick:G,className:"flex items-center gap-1 text-gray-700 dark:text-gray-300 hover:text-blue-600 dark:hover:text-blue-400 transition-colors","aria-label":"View upvotes",children:t.jsx("span",{children:x.length})})]})]}),t.jsxs("div",{className:"relative group",children:[t.jsx("span",{className:oe,children:"Comments"}),t.jsxs("button",{type:"button",onClick:ee,className:"flex items-center gap-1 text-gray-700 dark:text-gray-300 hover:text-blue-600 dark:hover:text-blue-400 transition-colors","aria-label":"Comments",children:[t.jsx(z.MessageCircle,{className:"w-4 h-4 sm:w-5 sm:h-5"}),t.jsx("span",{children:b})]})]}),t.jsxs("div",{className:"relative group",children:[t.jsx("span",{className:oe,children:"Reblog"}),t.jsx("button",{type:"button",onClick:R,className:"flex items-center gap-1 text-gray-600 dark:text-gray-400 hover:text-blue-600 dark:hover:text-blue-400 transition-colors p-1 rounded","aria-label":"Reblog",children:t.jsx(z.Repeat2,{className:"w-4 h-4 sm:w-5 sm:h-5"})})]}),t.jsxs("div",{className:"relative group",children:[t.jsx("span",{className:oe,children:"Share"}),t.jsx("button",{type:"button",onClick:V,className:"flex items-center gap-1 text-gray-600 dark:text-gray-400 hover:text-blue-600 dark:hover:text-blue-400 transition-colors p-1 rounded","aria-label":"Share",children:t.jsx(z.Share2,{className:"w-4 h-4 sm:w-5 sm:h-5"})})]}),t.jsxs("div",{className:"relative group",children:[t.jsx("span",{className:oe,children:"Report"}),t.jsx("button",{type:"button",onClick:se,className:"flex items-center gap-1 text-gray-600 dark:text-gray-400 hover:text-red-600 dark:hover:text-red-400 transition-colors p-1 rounded","aria-label":"Report",children:t.jsx(z.Flag,{className:"w-4 h-4 sm:w-5 sm:h-5"})})]}),t.jsxs("div",{className:"relative group",children:[t.jsx("span",{className:oe,children:"Tip"}),t.jsx("button",{type:"button",onClick:I,className:"flex items-center gap-1 text-gray-600 dark:text-gray-400 hover:text-green-600 dark:hover:text-green-400 transition-colors p-1 rounded","aria-label":"Tip",children:t.jsx(z.Gift,{className:"w-4 h-4 sm:w-5 sm:h-5"})})]}),s>0&&t.jsxs("span",{className:"font-semibold text-green-600 dark:text-green-400",children:["$",s.toFixed(2)]}),v&&t.jsx(ro,{author:e,permlink:a,onUpvote:$,onCancel:()=>_(!1)}),N&&t.jsx(yd,{author:e,permlink:a,onClose:()=>y(!1),currentUser:l??void 0,token:void 0,onClickUpvoteButton:X}),m&&t.jsx(ao,{author:e,permlink:a,onClose:()=>{k(!1),Re.getCommentsList(e,a).then(K=>g(K.length))},currentUser:l??void 0,token:void 0,onSubmitComment:n?J:void 0,onClickCommentUpvote:h}),j.visible&&t.jsx("div",{className:"fixed bottom-4 right-4 z-[100] max-w-[280px] rounded-lg bg-gray-800 dark:bg-gray-900 text-white px-3 py-2 shadow-lg text-sm",children:j.message})]})}const Di="_communityLocalKey",Zn={getBookmarkedCommunities:()=>{const e=localStorage.getItem(Di);return e?JSON.parse(e):[]},isUserPresentLocally:e=>{const a=localStorage.getItem(Di);return a?JSON.parse(a).includes(e):!1},storeLikedCommunityLocally:(e,a=!1)=>{let i=Zn.getBookmarkedCommunities();return i.includes(e)?i=i.filter(s=>s!==e):a||i.push(e),localStorage.setItem(Di,JSON.stringify(i)),i}},so=({id:e,toastType:a,isLiked:i,onAdd:s,onRemove:r,onFavourite:n})=>{const[u,c]=P.useState(i??Zn.isUserPresentLocally(e));P.useEffect(()=>{i!==void 0&&c(i)},[i]);const d=()=>{n&&n(),u?(r?r(e,"remove_bookmark"):Zn.storeLikedCommunityLocally(e,!0),f(!1)):(s?s(e,"add_bookmark"):Zn.storeLikedCommunityLocally(e),f(!0)),c(!u)},f=o=>{alert(`The ${a} is ${o?"added to":"removed from"} your bookmarks`)};return t.jsx("button",{onClick:d,className:"p-2 rounded-lg border border-gray-300 dark:border-gray-600 text-gray-600 dark:text-gray-300 hover:bg-gray-300 dark:hover:bg-gray-700",children:u?t.jsx(z.BookmarkCheck,{className:"w-5 h-5 text-blue-600 dark:text-blue-400"}):t.jsx(z.Bookmark,{className:"w-5 h-5 text-gray-500 dark:text-gray-400"})})};class Wp{HIVE_API_URL="https://api.hive.blog";async getListOfCommunities(a,i=20,s){const r={limit:i};s&&s.trim()!==""&&(r.last=s),a&&a.trim()!==""&&(r.query=a);const n={jsonrpc:"2.0",method:"bridge.list_communities",params:r,id:1};try{const u=await fetch(this.HIVE_API_URL,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)});if(!u.ok)throw new Error(`HTTP error! status: ${u.status}`);return(await u.json()).result||[]}catch(u){throw console.error("Error fetching communities:",u),u}}async getCommunityDetails(a){const i={jsonrpc:"2.0",method:"bridge.get_community",params:{name:a},id:1};try{const s=await fetch(this.HIVE_API_URL,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(i)});if(!s.ok)throw new Error(`HTTP error! status: ${s.status}`);return await s.json()}catch(s){throw console.error("Error fetching community details:",s),s}}async getCommunitySubscribers(a,i=100,s){const r={community:a,limit:i};s&&s.trim()!==""&&(r.last=s);const n={jsonrpc:"2.0",method:"bridge.list_community_roles",params:r,id:1};try{const u=await fetch(this.HIVE_API_URL,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)});if(!u.ok)throw new Error(`HTTP error! status: ${u.status}`);return((await u.json()).result||[]).map(d=>({username:d[0],role:d[1],extra:d[2],subscribedAt:d[3]}))}catch(u){throw console.error("Error fetching community subscribers:",u),u}}async getCommunitySubscribersList(a,i=100,s){const r={community:a,limit:i};s&&s.trim()!==""&&(r.last=s);const n={jsonrpc:"2.0",method:"bridge.list_subscribers",params:r,id:2};try{const u=await fetch(this.HIVE_API_URL,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)});if(!u.ok)throw new Error(`HTTP error! status: ${u.status}`);return((await u.json()).result||[]).map(d=>({username:d[0],role:d[1],extra:d[2],subscribedAt:d[3]}))}catch(u){throw console.error("Error fetching community subscribers list:",u),u}}async getCommunityAccounts(a){const i={jsonrpc:"2.0",method:"condenser_api.get_accounts",params:[[a]],id:2};try{const s=await fetch(this.HIVE_API_URL,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(i)});if(!s.ok)throw new Error(`HTTP error! status: ${s.status}`);return(await s.json()).result||[]}catch(s){throw console.error("Error fetching community accounts:",s),s}}async getRankedPosts(a,i="created",s=20,r,n){const u={tag:a,sort:i,limit:s};r&&n&&(u.start_author=r,u.start_permlink=n);const c={jsonrpc:"2.0",method:"bridge.get_ranked_posts",params:u,id:3};try{const d=await fetch(this.HIVE_API_URL,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(c)});if(!d.ok)throw new Error(`HTTP error! status: ${d.status}`);return(await d.json()).result||[]}catch(d){throw console.error("Error fetching ranked posts:",d),d}}communityIcon(a){return`https://images.hive.blog/u/${a}/avatar?size=icon`}userOwnerThumb(a){return`https://images.hive.blog/u/${a}/avatar`}async getCommunityActivities(a,i=100,s){const r={account:a,limit:i};s&&(r.last_id=s);const n={jsonrpc:"2.0",method:"bridge.account_notifications",params:r,id:19};try{const u=await fetch(this.HIVE_API_URL,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)});if(!u.ok)throw new Error(`HTTP error! status: ${u.status}`);return(await u.json()).result||[]}catch(u){throw console.error("Error fetching community activities:",u),u}}}const ot=new Wp,Gp=({onSelectCommunity:e,theme:a="dark"})=>{const[i,s]=P.useState([]),[r,n]=P.useState(""),[u,c]=P.useState(!0),[d,f]=P.useState(!1),[o,h]=P.useState(!0),[l,p]=P.useState(null),[x,w]=P.useState(null),b=20,g=P.useRef(null),v=P.useCallback(async(y=!1)=>{if(!(!y&&(d||!o)))try{y?(c(!0),w(null),s([]),p(null),h(!0)):f(!0);const m=r.trim(),k=await ot.getListOfCommunities(m.length>=3?m:void 0,b,y?void 0:l||void 0);s(j=>y?k:[...j,...k]),k.length<b||k.length>0&&k[k.length-1].name===l?h(!1):k.length>0&&p(k[k.length-1].name||null)}catch(m){w(m instanceof Error?m.message:"Failed to load communities"),h(!1)}finally{c(!1),f(!1)}},[r,d,o,l]);P.useEffect(()=>{const y=setTimeout(()=>{v(!0)},r.length>=3||r.length===0?0:500);return()=>clearTimeout(y)},[r]),P.useEffect(()=>{g.current?.focus()},[r,u,x]),P.useEffect(()=>{const y=()=>{window.innerHeight+document.documentElement.scrollTop>=document.documentElement.offsetHeight-200&&!d&&!u&&o&&v()};return window.addEventListener("scroll",y),()=>window.removeEventListener("scroll",y)},[v,d,u,o]);const _=()=>{v(!0)},N=()=>t.jsx("div",{className:"space-y-4",children:Array.from({length:6}).map((y,m)=>t.jsx("div",{className:`${a==="dark"?"bg-slate-900 border-gray-800":"bg-white border-gray-200"} border rounded-xl p-4 animate-pulse`,children:t.jsxs("div",{className:"flex items-center gap-4",children:[t.jsx("div",{className:`w-12 h-12 ${a==="dark"?"bg-slate-800":"bg-gray-200"} rounded-full`}),t.jsxs("div",{className:"flex-1 space-y-2",children:[t.jsx("div",{className:`h-4 ${a==="dark"?"bg-slate-800":"bg-gray-200"} rounded w-3/4`}),t.jsx("div",{className:`h-3 ${a==="dark"?"bg-slate-800":"bg-gray-200"} rounded w-1/2`})]}),t.jsx("div",{className:`h-3 ${a==="dark"?"bg-slate-800":"bg-gray-200"} rounded w-16`})]})},m))});return u&&i.length===0?t.jsxs("div",{className:`space-y-6 ${a==="dark"?"bg-slate-950":"bg-white"}`,children:[t.jsxs("div",{className:"relative",children:[t.jsx(z.Search,{className:`absolute left-3 top-1/2 transform -translate-y-1/2 ${a==="dark"?"text-gray-400":"text-gray-500"} w-5 h-5`}),t.jsx("input",{type:"text",placeholder:"Search communities...",value:r,onChange:y=>n(y.target.value),ref:g,autoFocus:!0,className:`w-full pl-10 pr-4 py-3 ${a==="dark"?"bg-slate-900 border-gray-800 text-white placeholder-gray-400":"bg-white border-gray-200 text-gray-900 placeholder-gray-500"}
|
|
1097
|
-
rounded-xl focus:outline-none focus:ring-2 focus:ring-blue-500`})]}),t.jsx(N,{})]}):x&&i.length===0?t.jsxs("div",{className:`space-y-6 ${
|
|
1098
|
-
rounded-xl focus:outline-none focus:ring-2 focus:ring-blue-500`})]}),t.jsx("div",{className:"flex flex-col items-center justify-center min-h-[400px] space-y-4",children:t.jsxs("div",{className:"text-center",children:[t.jsx("h3",{className:`text-lg font-semibold ${
|
|
1099
|
-
rounded-xl focus:outline-none focus:ring-2 focus:ring-blue-500`}),t.jsx("button",{onClick:_,className:`m-2 inline-flex items-center justify-center rounded-md border ${
|
|
1096
|
+
disabled:opacity-50 disabled:cursor-not-allowed`,children:[t.jsx(z.X,{className:"w-4 h-4 sm:w-5 sm:h-5 mr-1"}),"Cancel"]})]})]})})}const no=({comment:e,allComments:r,onReply:i,currentUser:s,token:a,searchQuery:n,depth:u=0,onVotedRefresh:c,onClickCommentUpvote:d,onClickCommentReply:f,onClickUpvoteButton:o})=>{const[h,l]=O.useState(!1),[p,x]=O.useState(!0),[w,b]=O.useState(!1),g=O.useMemo(()=>{const K=e.active_votes||[];if(!s)return!1;const te=s.toLowerCase();return K.some(pe=>(pe.voter||"").toLowerCase()===te)},[e.active_votes,s]),[v,_]=O.useState(!1),[N,y]=O.useState(""),[m,k]=O.useState(!1),j=K=>{y(K),_(!0),setTimeout(()=>_(!1),2500)},E=e.depth||0;let C=r.filter(K=>K.parent_author===e.author&&K.parent_permlink===e.permlink&&(typeof K.depth!="number"||K.depth===E+1));if((!C||C.length===0)&&Array.isArray(e.replies)&&e.replies.length>0){const K=new Set(e.replies);C=r.filter(te=>K.has(`${te.author}/${te.permlink}`))}const P=C.length>0,$=u>=4,H=(K,te)=>{if(!te)return K;const pe=new RegExp(`(${te})`,"gi");return K.replace(pe,'<mark class="bg-yellow-200 dark:bg-yellow-800">$1</mark>')},F=()=>{b(!0)},B=async K=>{if(d){try{await Promise.resolve(d(e.author,e.permlink,K)),l(!0),b(!1),setTimeout(()=>{c?.(),j("Vote submitted successfully!")},3e3)}catch(te){const pe=te instanceof Error?te.message:"Failed to upvote";alert(pe)}return}if(!a){j("Please login or provide an upvote handler to vote");return}try{const te=Math.round(K*100);await Te.handleUpvote({author:e.author,permlink:e.permlink,weight:te,authToken:a}),l(!0),b(!1),k(!0),setTimeout(()=>{c?.(),k(!1),j("Vote submitted successfully ✅")},3e3)}catch(te){const pe=te instanceof Error?te.message:"Failed to upvote";alert(pe)}},L=()=>{s?i(e.author,e.permlink):j("Please login to upvote")},G=e.json_metadata_parsed||(()=>{try{return e.json_metadata?JSON.parse(e.json_metadata):void 0}catch{return}})(),X=e.body||"",R=(K=>{const te=/^(\s*(?:#[\p{L}\p{N}_-]+\s*(?:,\s*)?)+\s*)$/gimu;return K.replace(te,"").trim()})(X),se=n?H(R,n):R,I=/!\[[^\]]*\]\([^)]+\)/.test(R)||/<img\s/i.test(R),V=Array.isArray(G?.image)?G.image:[],J=new ro.DefaultRenderer({baseUrl:"https://hive.blog/",breaks:!0,skipSanitization:!1,allowInsecureScriptTags:!1,addNofollowToLinks:!0,doNotShowImages:!1,assetsWidth:640,assetsHeight:480,imageProxyFn:K=>K,usertagUrlFn:K=>`/@${K}`,hashtagUrlFn:K=>`/trending/${K}`,isLinkSafeFn:K=>!0,addExternalCssClassToMatchingLinksFn:K=>!0,ipfsPrefix:"https://ipfs.io/ipfs/"}),oe=e.stats?.total_votes||e.net_votes||0;return t.jsxs("div",{className:`${u>0?"ml-4 md:ml-8 border-l-2 border-gray-200 dark:border-gray-700 pl-4 md:pl-6":""}`,children:[t.jsx("div",{className:"group hover:bg-gray-50 dark:hover:bg-gray-800/50 transition-colors duration-200 p-4 md:p-6",children:t.jsxs("div",{className:"flex items-start space-x-3 md:space-x-4",children:[t.jsx("div",{className:"flex-shrink-0",children:t.jsx("img",{src:`https://images.hive.blog/u/${e.author}/avatar`,alt:e.author,className:"w-8 h-8 md:w-10 md:h-10 rounded-full object-cover ring-2 ring-gray-200 dark:ring-gray-700",onError:K=>{K.target.src=`https://ui-avatars.com/api/?name=${e.author}&background=random`}})}),t.jsxs("div",{className:"flex-1 min-w-0",children:[t.jsxs("div",{className:"flex items-center flex-wrap gap-2 mb-2",children:[t.jsxs("button",{className:"font-semibold text-gray-900 dark:text-white hover:text-blue-600 dark:hover:text-blue-400 transition-colors duration-200 text-sm md:text-base",onClick:()=>{},children:["@",e.author]}),t.jsxs("div",{className:"flex items-center text-xs md:text-sm text-gray-500 dark:text-gray-400 space-x-1",children:[t.jsx(z.Clock,{className:"w-3 h-3 md:w-4 md:h-4"}),t.jsx("span",{children:ss.formatDistanceToNow(new Date(e.created+"Z"),{addSuffix:!0})})]}),e.author===s&&t.jsx("span",{className:"px-2 py-1 text-xs bg-blue-100 dark:bg-blue-900 text-blue-800 dark:text-blue-200 rounded-full",children:"You"})]}),t.jsx("div",{className:"prose prose-sm md:prose-base dark:prose-invert max-w-none mb-3 comment-content text-left text-gray-900 dark:text-gray-100 prose-a:text-blue-600 dark:prose-a:text-blue-400 [&>*]:text-left",children:n?t.jsx("div",{className:"text-left",dangerouslySetInnerHTML:{__html:se}}):t.jsx("div",{className:"text-left",dangerouslySetInnerHTML:{__html:J.render(R)}})}),!I&&V.length>0&&t.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3 mb-3",children:V.map((K,te)=>t.jsx("img",{src:K,alt:`image-${te}`,className:"max-w-full h-auto rounded-lg shadow-sm cursor-pointer hover:shadow-md transition-shadow duration-200",onClick:()=>window.open(K,"_blank")},K+te))}),t.jsxs("div",{className:"flex items-center space-x-4 md:space-x-6",children:[t.jsxs("button",{onClick:()=>{if(d){if(!s){j("Please login to upvote");return}if(g||h){j("You have already upvoted this comment");return}F()}else if(o){if(!s){j("Please login to upvote");return}if(g||h){j("You have already upvoted this comment");return}F()}else{if(!s){j("Please login to upvote");return}a?g?j("You have already upvoted this comment"):F():(c?.(),j("Vote submitted successfully ✅"))}},className:`flex items-center space-x-1 md:space-x-2 text-xs md:text-sm font-medium transition-colors duration-200 ${h?"text-blue-600 dark:text-blue-400":"text-gray-500 dark:text-gray-400 hover:text-blue-600 dark:hover:text-blue-400"}`,children:[t.jsx(z.ThumbsUp,{className:`w-4 h-4 ${g||h?"fill-current text-blue-600 dark:text-blue-400":""}`}),t.jsx("span",{children:oe})]}),t.jsxs("button",{onClick:()=>{f?f(e):L()},className:"flex items-center space-x-1 md:space-x-2 text-xs md:text-sm font-medium text-gray-500 dark:text-gray-400 hover:text-blue-600 dark:hover:text-blue-400 transition-colors duration-200",children:[t.jsx(z.MessageSquare,{className:"w-4 h-4"}),t.jsx("span",{children:"Reply"})]}),P&&t.jsx("button",{onClick:()=>x(!p),className:"flex items-center space-x-1 md:space-x-2 text-xs md:text-sm font-medium text-gray-500 dark:text-gray-400 hover:text-blue-600 dark:hover:text-blue-400 transition-colors duration-200",children:t.jsxs("span",{children:[p?"Hide":"Show"," ",C.length," ",C.length===1?"reply":"replies"]})}),t.jsx("button",{onClick:()=>f?.(e),className:"opacity-0 group-hover:opacity-100 p-1 rounded-full hover:bg-gray-200 dark:hover:bg-gray-700 transition-all duration-200",children:t.jsx(z.MoreHorizontal,{className:"w-4 h-4 text-gray-400"})})]}),w&&!g&&t.jsx("div",{className:"mt-3",children:t.jsx(ao,{author:e.author,permlink:e.permlink,onUpvote:B,onCancel:()=>b(!1)})}),m&&t.jsxs("div",{className:"mt-3 inline-flex items-center text-xs text-gray-500 dark:text-gray-400",children:[t.jsx("span",{className:"w-4 h-4 border-2 border-blue-500 border-t-transparent rounded-full animate-spin mr-2"}),"Updating votes..."]}),v&&t.jsx("div",{className:"fixed bottom-4 right-4 w-[280px] z-50",children:t.jsx("div",{className:"bg-gray-800 text-white rounded px-3 py-2 shadow-lg text-sm",children:N})})]})]})}),P&&p&&!$&&t.jsx("div",{className:"space-y-0",children:C.map(K=>t.jsx(no,{comment:K,allComments:r,onReply:i,currentUser:s,searchQuery:n,depth:u+1,onVotedRefresh:c,onClickCommentUpvote:d,onClickCommentReply:f,onClickUpvoteButton:o},K.permlink))}),P&&$&&t.jsx("div",{className:"ml-4 md:ml-8 p-3 text-sm text-gray-500 dark:text-gray-400 border-l-2 border-gray-200 dark:border-gray-700 pl-4",children:t.jsxs("button",{onClick:()=>{console.log("Show more replies for:",e.author,e.permlink)},className:"text-blue-600 dark:text-blue-400 hover:underline",children:["View ",C.length," more ",C.length===1?"reply":"replies"]})})]})},rs=({onSubmit:e,onCancel:r,currentUser:i,placeholder:s="Write your comment...",parentAuthor:a,parentPermlink:n})=>{const[u,c]=O.useState(""),[d,f]=O.useState(!1),o=O.useRef(null);O.useEffect(()=>{o.current&&o.current.focus()},[]);const h=async()=>{if(!(!u.trim()||d)){f(!0);try{await e(u.trim()),c("")}catch(p){console.error("Failed to submit comment:",p)}finally{f(!1)}}},l=p=>{p.key==="Enter"&&(p.metaKey||p.ctrlKey)&&(p.preventDefault(),h()),p.key==="Escape"&&r()};return t.jsxs("div",{className:"p-4 md:p-6 space-y-4 bg-white dark:bg-gray-800",children:[t.jsxs("div",{className:"flex items-center justify-start space-x-3 text-left",children:[t.jsx("div",{className:"flex-shrink-0",children:i?t.jsx("img",{src:`https://images.hive.blog/u/${i}/avatar`,alt:i,className:"w-10 h-10 rounded-full object-cover border-2 border-gray-200 dark:border-gray-600",onError:p=>{p.target.src=`https://ui-avatars.com/api/?name=${i}&background=random`}}):t.jsx("div",{className:"w-10 h-10 rounded-full bg-gray-200 dark:bg-gray-600 flex items-center justify-center",children:t.jsx(z.User,{className:"w-6 h-6 text-gray-500 dark:text-gray-400"})})}),t.jsxs("div",{className:"flex-1 min-w-0 text-left",children:[t.jsx("div",{className:"text-sm text-gray-900 dark:text-white font-medium",children:i?`@${i}`:"Anonymous"}),a&&t.jsxs("div",{className:"text-xs text-gray-500 dark:text-gray-400",children:["Replying to @",a]})]})]}),t.jsx("div",{className:"relative",children:t.jsx("textarea",{ref:o,value:u,onChange:p=>c(p.target.value),onKeyDown:l,placeholder:s,disabled:d,className:"w-full min-h-[100px] max-h-[300px] p-4 border border-gray-200 dark:border-gray-600 rounded-lg resize-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500 bg-white dark:bg-gray-700 text-gray-900 dark:text-white placeholder-gray-500 dark:placeholder-gray-400 transition-colors duration-200 disabled:opacity-50",style:{height:"auto"},onInput:p=>{const x=p.target;x.style.height="auto",x.style.height=x.scrollHeight+"px"}})}),t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsx("div",{className:"text-xs text-gray-500 dark:text-gray-400",children:"Press Cmd+Enter to post"}),t.jsxs("div",{className:"flex items-center space-x-3",children:[t.jsx("button",{onClick:r,disabled:d,className:"px-4 py-2 text-gray-600 dark:text-gray-400 hover:text-gray-800 dark:hover:text-gray-200 transition-colors duration-200 disabled:opacity-50",children:"Cancel"}),t.jsx("button",{onClick:h,disabled:d||!u.trim(),className:"px-6 py-2 bg-blue-500 hover:bg-blue-600 disabled:bg-gray-300 dark:disabled:bg-gray-600 text-white rounded-lg font-medium transition-all duration-200 transform hover:scale-[1.02] disabled:transform-none disabled:opacity-50 flex items-center space-x-2",children:d?t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"w-4 h-4 border-2 border-white border-t-transparent rounded-full animate-spin"}),t.jsx("span",{children:"Posting..."})]}):t.jsxs(t.Fragment,{children:[t.jsx(z.Send,{className:"w-4 h-4"}),t.jsx("span",{children:"Post"})]})})]})]})]})},op=({parentAuthor:e,parentPermlink:r,onClose:i,onCommentSubmitted:s,currentUser:a})=>{const[n,u]=O.useState(!1),c=async d=>{if(!(!d.trim()||n)){u(!0);try{await s(e,r,d),i()}catch(f){console.error("Failed to submit reply:",f)}finally{u(!1)}}};return O.useEffect(()=>{const d=f=>{f.key==="Escape"&&i()};return document.addEventListener("keydown",d),()=>document.removeEventListener("keydown",d)},[i]),t.jsx("div",{className:"fixed inset-0 bg-black/50 backdrop-blur-sm flex items-center justify-center z-50 p-4",children:t.jsxs("div",{className:"bg-white dark:bg-gray-800 rounded-xl shadow-2xl w-full max-w-2xl max-h-[90vh] flex flex-col overflow-hidden",children:[t.jsxs("div",{className:"flex items-center justify-between p-4 md:p-6 border-b border-gray-200 dark:border-gray-700 bg-gray-50 dark:bg-gray-900/50",children:[t.jsxs("div",{className:"flex items-center space-x-3",children:[t.jsx("div",{className:"p-2 bg-blue-100 dark:bg-blue-900 rounded-lg",children:t.jsx(z.Send,{className:"w-5 h-5 text-blue-600 dark:text-blue-400"})}),t.jsxs("div",{children:[t.jsx("h2",{className:"text-lg font-bold text-gray-900 dark:text-white",children:"Reply to Comment"}),t.jsxs("p",{className:"text-sm text-gray-500 dark:text-gray-400",children:["@",e]})]})]}),t.jsx("button",{onClick:i,disabled:n,className:"p-2 rounded-lg hover:bg-gray-200 dark:hover:bg-gray-700 transition-colors duration-200 disabled:opacity-50",children:t.jsx(z.X,{className:"w-6 h-6 text-gray-500 dark:text-gray-400"})})]}),t.jsx("div",{className:"flex-1 overflow-y-auto",children:t.jsx(rs,{onSubmit:c,onCancel:i,currentUser:a,parentAuthor:e,parentPermlink:r,placeholder:`Reply to @${e}...`})}),t.jsx("div",{className:"p-4 md:p-6 border-t border-gray-200 dark:border-gray-700 bg-gray-50 dark:bg-gray-900/50",children:t.jsxs("div",{className:"flex items-center justify-between text-xs md:text-sm text-gray-500 dark:text-gray-400",children:[t.jsxs("div",{className:"flex items-center space-x-4",children:[t.jsx("span",{children:"• Markdown supported"}),t.jsx("span",{children:"• Be respectful"})]}),t.jsx("div",{className:"hidden md:block",children:"Press Esc to close"})]})})]})})},up=({isVisible:e,searchQuery:r,onSearchChange:i,onClose:s})=>{const a=O.useRef(null);O.useEffect(()=>{e&&a.current&&a.current.focus()},[e]);const n=()=>{i(""),s()};return t.jsx("div",{className:`overflow-hidden transition-all duration-300 ease-in-out ${e?"max-h-20 opacity-100":"max-h-0 opacity-0"}`,children:t.jsx("div",{className:"p-4 border-b border-gray-200 dark:border-gray-700 bg-gray-50 dark:bg-gray-900/30",children:t.jsxs("div",{className:"relative",children:[t.jsx(z.Search,{className:"absolute left-3 top-1/2 transform -translate-y-1/2 w-5 h-5 text-gray-400"}),t.jsx("input",{ref:a,type:"text",value:r,onChange:u=>i(u.target.value),placeholder:"Search comments and authors...",className:"w-full pl-10 pr-10 py-2 bg-white dark:bg-gray-800 border border-gray-300 dark:border-gray-600 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-blue-500 text-gray-900 dark:text-white placeholder-gray-500 dark:placeholder-gray-400 transition-colors duration-200"}),r&&t.jsx("button",{onClick:()=>i(""),className:"absolute right-8 top-1/2 transform -translate-y-1/2 p-1 rounded-full hover:bg-gray-200 dark:hover:bg-gray-700 transition-colors duration-200",children:t.jsx(z.X,{className:"w-4 h-4 text-gray-400"})}),t.jsx("button",{onClick:n,className:"absolute right-3 top-1/2 transform -translate-y-1/2 p-1 rounded-full hover:bg-gray-200 dark:hover:bg-gray-700 transition-colors duration-200",children:t.jsx(z.X,{className:"w-4 h-4 text-gray-400"})})]})})})},so=({author:e,permlink:r,onClose:i,currentUser:s,token:a,onClickCommentUpvote:n,onClickCommentReply:u,onClickUpvoteButton:c,onSubmitComment:d})=>{const[f,o]=O.useState([]),[h,l]=O.useState([]),[p,x]=O.useState(!0),[w,b]=O.useState(null),[g,v]=O.useState(null),[_,N]=O.useState(!1),[y,m]=O.useState(""),[k,j]=O.useState(!1),[E,D]=O.useState(!1),C=O.useCallback(async(L=!1)=>{L?D(!0):x(!0),b(null);try{const G=await Te.getCommentsList(e,r);o(G),l(G)}catch(G){b(G instanceof Error?G.message:"Failed to load comments")}finally{x(!1),D(!1)}},[e,r]);O.useEffect(()=>{C()},[C]),O.useEffect(()=>{if(!y.trim())l(f);else{const L=f.filter(G=>G.body?.toLowerCase().includes(y.toLowerCase())||G.author.toLowerCase().includes(y.toLowerCase()));l(L)}},[y,f]);const P=(L,G)=>{v({author:L,permlink:G})},$=L=>{L.target===L.currentTarget&&i()},H=async(L,G,X)=>{if(d){try{await Promise.resolve(d(L,G,X)),j(!1),D(!0),setTimeout(async()=>{await C(!0),D(!1)},3e3)}catch(ee){const R=ee instanceof Error?ee.message:"Failed to post comment";alert(R)}return}if(!a){alert("Please login to comment");return}try{await Te.handleComment({author:L,permlink:G,body:X,authToken:a}),j(!1),D(!0),setTimeout(async()=>{await C(!0),D(!1)},3e3)}catch(ee){const R=ee instanceof Error?ee.message:"Failed to post comment";alert(R)}},F=O.useMemo(()=>{if(!s?.trim())return h;const L=s.toLowerCase();return[...h].sort((G,X)=>{const ee=G.author?.toLowerCase()===L,R=X.author?.toLowerCase()===L;return ee&&!R?-1:!ee&&R?1:0})},[h,s]),B=F.filter(L=>L.parent_author===e&&L.parent_permlink===r);return p?t.jsx("div",{className:"fixed inset-0 bg-black/50 backdrop-blur-sm flex items-center justify-center z-50 p-4 h-screen",children:t.jsx("div",{className:"bg-white dark:bg-gray-800 rounded-xl shadow-2xl w-full max-w-2xl h-[90vh] flex flex-col",children:t.jsx("div",{className:"flex justify-center items-center h-full",children:t.jsxs("div",{className:"text-center",children:[t.jsx(z.Loader2,{className:"w-12 h-12 animate-spin text-blue-500 mx-auto mb-4"}),t.jsx("p",{className:"text-gray-600 dark:text-gray-300",children:"Loading comments..."})]})})})}):w?t.jsx("div",{className:"fixed inset-0 bg-black/50 backdrop-blur-sm flex items-center justify-center z-40 p-4 h-screen",onClick:$,children:t.jsx("div",{className:"bg-white dark:bg-gray-800 rounded-xl shadow-2xl w-full max-w-4xl h-[90vh] flex flex-col overflow-hidden",children:t.jsx("div",{className:"flex justify-center items-center h-full",children:t.jsxs("div",{className:"text-center p-6",children:[t.jsx(z.AlertCircle,{className:"w-16 h-16 text-red-500 mx-auto mb-4"}),t.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-white mb-2",children:"Failed to load comments"}),t.jsx("p",{className:"text-gray-600 dark:text-gray-300 mb-6",children:w}),t.jsx("button",{onClick:()=>C(),className:"px-6 py-2 bg-blue-500 hover:bg-blue-600 text-white rounded-lg transition-colors duration-200",children:"Try Again"})]})})})}):t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"fixed inset-0 bg-black/50 backdrop-blur-sm flex items-center justify-center z-40 p-4 h-screen",onClick:$,children:t.jsxs("div",{className:"bg-white dark:bg-gray-800 rounded-xl shadow-2xl w-full max-w-4xl h-[90vh] flex flex-col overflow-hidden",children:[t.jsxs("div",{className:"flex justify-between items-center p-4 md:p-6 border-b border-gray-200 dark:border-gray-700 bg-gray-50 dark:bg-gray-900/50",children:[t.jsxs("div",{className:"flex items-center space-x-4",children:[t.jsxs("h2",{className:"text-lg md:text-xl font-bold text-gray-900 dark:text-white",children:["Comments (",f.length,")"]}),E&&t.jsx(z.Loader2,{className:"w-5 h-5 animate-spin text-blue-500"})]}),t.jsxs("div",{className:"flex items-center space-x-2",children:[t.jsx("button",{onClick:()=>C(!0),disabled:E,className:"p-2 rounded-lg hover:bg-gray-200 dark:hover:bg-gray-700 transition-colors duration-200 disabled:opacity-50",title:"Refresh comments",children:t.jsx(z.RefreshCw,{className:`w-5 h-5 text-gray-500 dark:text-gray-400 ${E?"animate-spin":""}`})}),t.jsx("button",{onClick:()=>N(!_),className:"p-2 rounded-lg hover:bg-gray-200 dark:hover:bg-gray-700 transition-colors duration-200",title:"Search comments",children:t.jsx(z.Search,{className:"w-5 h-5 text-gray-500 dark:text-gray-400"})}),t.jsx("button",{onClick:i,className:"p-2 rounded-lg hover:bg-gray-200 dark:hover:bg-gray-700 transition-colors duration-200",children:t.jsx(z.X,{className:"w-6 h-6 text-gray-500 dark:text-gray-400"})})]})]}),t.jsx(up,{isVisible:_,searchQuery:y,onSearchChange:m,onClose:()=>N(!1)}),t.jsxs("div",{className:"flex-1 overflow-y-auto",children:[k&&t.jsx("div",{className:"border-b border-gray-200 dark:border-gray-700",children:t.jsx(rs,{onSubmit:L=>H(e,r,L),onCancel:()=>j(!1),currentUser:s,placeholder:"Add a comment..."})}),B.length===0?t.jsxs("div",{className:"flex flex-col items-center justify-center h-full p-8 text-center",children:[t.jsx(z.MessageCirclePlus,{className:"w-16 h-16 text-gray-300 dark:text-gray-600 mb-4"}),t.jsx("h3",{className:"text-lg font-medium text-gray-900 dark:text-white mb-2",children:y?"No comments found":"No comments yet"}),t.jsx("p",{className:"text-gray-500 dark:text-gray-400 mb-6",children:y?"Try adjusting your search terms":"Be the first to share your thoughts!"}),!y&&s&&t.jsx("button",{onClick:()=>j(!0),className:"px-6 py-3 bg-blue-500 hover:bg-blue-600 text-white rounded-lg font-medium transition-colors duration-200",children:"Add Comment"})]}):t.jsx("div",{className:"divide-y divide-gray-100 dark:divide-gray-700",children:B.map(L=>t.jsx(no,{comment:L,allComments:F,onReply:P,currentUser:s,token:a,searchQuery:y,depth:0,onVotedRefresh:()=>C(!0),onClickCommentUpvote:n,onClickCommentReply:u,onClickUpvoteButton:c},L.permlink))})]}),!k&&s&&B.length>0&&t.jsx("div",{className:"p-4 md:p-6 border-t border-gray-200 dark:border-gray-700 bg-gray-50 dark:bg-gray-900/50",children:t.jsxs("button",{onClick:()=>j(!0),className:"w-full md:w-auto px-6 py-3 bg-blue-500 hover:bg-blue-600 text-white rounded-lg font-medium transition-all duration-200 transform hover:scale-[1.02] flex items-center justify-center space-x-2",children:[t.jsx(z.MessageCirclePlus,{className:"w-5 h-5"}),t.jsx("span",{children:"Add Comment"})]})})]})}),g&&t.jsx(op,{parentAuthor:g.author,parentPermlink:g.permlink,onClose:()=>v(null),onCommentSubmitted:H,currentUser:s})]})};function lp(e){const r=typeof e=="string"?new Date(e):e,i=Math.floor((Date.now()-r.getTime())/1e3),s={year:31536e3,month:2628e3,day:86400,hour:3600,minute:60};for(const[a,n]of Object.entries(s)){const u=Math.floor(i/n);if(u>1)return`${u} ${a}s ago`;if(u===1)return`${u} ${a} ago`}return"just now"}const io=({author:e,permlink:r,onClose:i,currentUser:s,token:a,onClickUpvoteButton:n})=>{const[u,c]=O.useState([]),[d,f]=O.useState(!0),[o,h]=O.useState(!1),l=!!s&&u.some(k=>k.voter===s),[p,x]=O.useState(!1),[w,b]=O.useState(""),[g,v]=O.useState(!1),_=k=>{b(k),x(!0),setTimeout(()=>x(!1),2500)},N=async()=>{f(!0);const k=await Te.getActiveVotes(e,r);k.sort((j,E)=>!j.time||!E.time?0:new Date(E.time).getTime()-new Date(j.time).getTime()),c(k),f(!1)};O.useEffect(()=>{N()},[e,r]);const y=k=>{k.target===k.currentTarget&&i()},m=async k=>{if(!a||!s){alert("Please login to upvote");return}try{const j=Math.round(k*100);await Te.handleUpvote({author:e,permlink:r,weight:j,authToken:a}),h(!1),v(!0),setTimeout(async()=>{await N(),v(!1),_("Vote submitted successfully ✅"),i()},3e3)}catch(j){const E=j instanceof Error?j.message:"Failed to upvote";alert(E)}};return t.jsxs("div",{className:"fixed inset-0 bg-black/50 backdrop-blur-sm flex items-center justify-center z-50 px-4 h-screen",onClick:y,children:[t.jsxs("div",{className:"relative bg-white dark:bg-gray-800 rounded-xl shadow-2xl w-full max-w-md max-h-[80vh] flex flex-col overflow-hidden",children:[t.jsxs("div",{className:"p-4 md:p-6 border-b border-gray-200 dark:border-gray-700 bg-gray-50 dark:bg-gray-900/50 flex items-center justify-between",children:[t.jsxs("h2",{className:"text-lg font-bold text-gray-900 dark:text-white flex items-center space-x-2",children:[t.jsxs("span",{children:["Voters (",u.length,")"]}),g&&t.jsx("span",{className:"inline-flex items-center ml-2",children:t.jsx("span",{className:"w-4 h-4 border-2 border-blue-500 border-t-transparent rounded-full animate-spin"})})]}),!o&&t.jsx("button",{onClick:()=>{if(n){n(s,a);return}if(!s||!a){_("Please login to upvote");return}l?_("You have already upvoted this post"):h(!0)},"aria-label":"Open Vote Slider",className:"p-1 hover:bg-gray-200 dark:hover:bg-gray-700 rounded",type:"button",children:t.jsx(z.ThumbsUp,{className:`w-5 h-5 ${l?"text-blue-600 dark:text-blue-400 fill-current":"text-gray-600 dark:text-gray-300"}`})})]}),t.jsx("div",{className:"flex-1 overflow-y-auto p-4",children:d?t.jsx("div",{className:"flex justify-center items-center h-full p-8",children:t.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-blue-500"})}):o&&!l?t.jsx(ao,{author:e,permlink:r,onUpvote:m,onCancel:()=>h(!1)}):t.jsx("ul",{children:u.map(k=>t.jsxs("li",{className:"flex items-center p-4 border-b dark:border-gray-700",children:[t.jsx("img",{src:`https://images.hive.blog/u/${k.voter}/avatar`,alt:k.voter,className:"w-10 h-10 rounded-full mr-4",onError:j=>{j.target.src=`https://ui-avatars.com/api/?name=${k.voter}&background=random`}}),t.jsxs("div",{children:[t.jsx("div",{className:"font-semibold text-gray-900 dark:text-white",children:k.voter}),t.jsxs("div",{className:"text-sm text-gray-500 dark:text-gray-400",children:[((k.percent||0)/100).toFixed(0),"%",k.time&&` · ${lp(k.time+"Z")}`]})]})]},k.voter))})})]}),p&&t.jsx("div",{className:"fixed bottom-4 right-4 w-[280px] z-50",children:t.jsx("div",{className:"bg-gray-800 text-white rounded px-3 py-2 shadow-lg text-sm",children:w})})]})},vd=({isOpen:e,onClose:r,title:i,children:s,maxWidth:a="max-w-2xl"})=>e?t.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center",children:[t.jsx("div",{className:"absolute inset-0 bg-black/60 backdrop-blur-sm",onClick:r}),t.jsxs("div",{className:`relative bg-card border border-border rounded-xl shadow-xl w-full mx-4 ${a} max-h-[90vh] overflow-hidden animate-scale-in`,children:[t.jsxs("div",{className:"flex items-center justify-between p-6 border-b border-border",children:[t.jsx("h2",{className:"text-xl font-bold text-card-foreground",children:i}),t.jsx("button",{onClick:r,className:"p-2 rounded-lg hover:bg-muted transition-colors",children:t.jsx(z.X,{className:"w-5 h-5 text-muted-foreground"})})]}),t.jsx("div",{className:"overflow-y-auto max-h-[calc(90vh-80px)] custom-scrollbar",children:s})]})]}):null,cp=({author:e,permlink:r,content:i,onClose:s})=>t.jsx(vd,{isOpen:!0,onClose:s,title:"Video Description",maxWidth:"max-w-2xl",children:t.jsxs("div",{className:"p-6",children:[i?t.jsx("div",{className:"prose prose-sm max-w-none",children:t.jsx("div",{className:"bg-muted/30 rounded-lg p-4",children:t.jsx("pre",{className:"whitespace-pre-wrap text-sm text-card-foreground font-sans leading-relaxed",children:i})})}):t.jsxs("div",{className:"text-center py-8",children:[t.jsx(z.FileText,{className:"w-12 h-12 text-muted-foreground mx-auto mb-2"}),t.jsx("p",{className:"text-muted-foreground",children:"No description available"}),t.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:"This video doesn't have a description yet."})]}),t.jsx("div",{className:"mt-6 pt-4 border-t border-border",children:t.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[t.jsxs("span",{children:["By @",e]}),t.jsx("span",{children:"•"}),t.jsxs("span",{children:["/",r]})]})})]})}),dp=({username:e,permlink:r,onAuthorClick:i,onVideoClick:s,onTagClick:a,onBack:n,onCommentsModal:u,onUpvotesModal:c,onDescriptionModal:d,onVideoInfo:f,onShare:o,onBookmark:h}={})=>{const l=e,p=r,[x,w]=O.useState(null),[b,g]=O.useState(!0),[v,_]=O.useState(null),[N,y]=O.useState(!1),[m,k]=O.useState(null),[j,E]=O.useState(!1),[D,C]=O.useState(!1),[P,$]=O.useState(!1),[H,F]=O.useState(!1),B=O.useRef(null),L=O.useRef(null),G=O.useRef(null);O.useEffect(()=>{(async()=>{if(!(!l||!p))try{g(!0),_(null);const J=await Te.getVideoDetails(l,p);w(J),y(!1),k(null)}catch(J){_(J instanceof Error?J.message:"Failed to load video")}finally{g(!1)}})()},[l,p]);const X=V=>V?V.startsWith("ipfs://")?`https://ipfs-3speak.b-cdn.net/ipfs/${V.replace("ipfs://","").split("/")[0]}/manifest.m3u8`:V:"";O.useEffect(()=>((async()=>{const J=x?.video_v2;if(!N||!J||!B.current)return;const oe=B.current,K=X(J);L.current&&(L.current.destroy(),L.current=null),oe.src="",oe.load();try{let te=!1;const pe=()=>{te||(te=!0,oe.play().then(()=>k(null)).catch(xe=>k(`Playback failed: ${xe.message}`)))};if(Qr.isSupported()){const xe=new Qr({debug:!1,enableWorker:!1,lowLatencyMode:!1,backBufferLength:90,maxLoadingDelay:4,maxBufferLength:30,maxMaxBufferLength:600,startLevel:-1});L.current=xe,xe.on(Qr.Events.MANIFEST_PARSED,()=>{}),xe.on(Qr.Events.ERROR,(ge,ke)=>{if(ke.fatal)switch(ke.type){case Qr.ErrorTypes.NETWORK_ERROR:k("Network error, retrying..."),setTimeout(()=>xe.startLoad(),1e3);break;case Qr.ErrorTypes.MEDIA_ERROR:k("Media error, retrying..."),setTimeout(()=>xe.recoverMediaError(),1e3);break;default:k(`Fatal error: ${ke.details}`),xe.destroy(),L.current=null;break}}),xe.attachMedia(oe),xe.loadSource(K)}else if(oe.canPlayType("application/vnd.apple.mpegurl"))oe.src=K;else{const xe=K.replace("/manifest.m3u8","/480p/index.m3u8");oe.src=xe}const Ee=()=>E(!0),Z=()=>{E(!1),pe()},ae=xe=>{const ge=xe.target;k(`Video error: ${ge.error?.message||"Unknown error"}`),E(!1)},re=()=>E(!1);oe.addEventListener("loadstart",Ee),oe.addEventListener("canplay",Z),oe.addEventListener("error",ae),oe.addEventListener("loadeddata",re);const ce=async()=>{const xe=!!document.fullscreenElement;try{xe?"orientation"in screen&&await(screen.orientation?.lock?.("landscape")??Promise.resolve()):"orientation"in screen&&screen.orientation?.unlock?.()}catch{}};return document.addEventListener("fullscreenchange",ce),G.current=()=>{document.removeEventListener("fullscreenchange",ce)},()=>{oe.removeEventListener("loadstart",Ee),oe.removeEventListener("canplay",Z),oe.removeEventListener("error",ae),oe.removeEventListener("loadeddata",re),G.current&&G.current()}}catch(te){k(`Setup error: ${te instanceof Error?te.message:"Unknown"}`)}})(),()=>{L.current&&(L.current.destroy(),L.current=null)}),[N,x?.video_v2]);const ee=()=>{if(!x?.video_v2){k("No video source available");return}y(!0),k(null),E(!0)},R=V=>{s&&s(V)},se=V=>{i&&i(V)},I=V=>{if(!V)return"00:00";const J=Math.floor(V),oe=Math.floor(J/3600),K=Math.floor(J%3600/60),te=J%60,pe=Ee=>Ee.toString().padStart(2,"0");return J<60?`00:${pe(te)}`:oe===0?`${pe(K)}:${pe(te)}`:`${pe(oe)}:${pe(K)}:${pe(te)}`};return b?t.jsxs("div",{className:"min-h-screen bg-background",children:[t.jsx("div",{className:"sticky top-0 z-50 w-full bg-background border-b border-border",children:t.jsx("div",{className:"container mx-auto px-4 py-3",children:t.jsx("div",{className:"h-8 w-24 bg-muted rounded-full animate-pulse"})})}),t.jsx("div",{className:"container mx-auto px-4 py-8 max-w-6xl",children:t.jsxs("div",{className:"animate-pulse space-y-6",children:[t.jsx("div",{className:"aspect-video bg-muted rounded-xl"}),t.jsxs("div",{className:"space-y-3",children:[t.jsx("div",{className:"h-6 bg-muted rounded w-3/4"}),t.jsx("div",{className:"h-4 bg-muted rounded w-1/2"})]})]})})]}):v||!x?t.jsx("div",{className:"min-h-screen bg-background flex items-center justify-center",children:t.jsxs("div",{className:"text-center max-w-md mx-auto px-4",children:[t.jsx("h2",{className:"text-xl font-semibold text-card-foreground mb-2",children:"Failed to Load Video"}),t.jsx("p",{className:"text-muted-foreground mb-4",children:v||"Video not found"}),t.jsxs("button",{onClick:()=>{n&&n()},className:"inline-flex items-center gap-2 px-4 py-2 bg-card border border-border text-card-foreground rounded-lg hover:bg-card-hover transition-colors",children:[t.jsx(z.ArrowLeft,{className:"w-4 h-4"}),"Go Back"]})]})}):t.jsxs("div",{className:"min-h-screen bg-background",children:[t.jsx("div",{className:"sticky top-0 z-50 w-full bg-background/95 backdrop-blur-sm border-b border-border",children:t.jsx("div",{className:"container mx-auto px-4 py-3",children:t.jsxs("button",{onClick:()=>{n&&n()},className:"inline-flex items-center gap-2 text-muted-foreground hover:text-card-foreground transition-colors",children:[t.jsx(z.ArrowLeft,{className:"w-4 h-4"}),"Back"]})})}),t.jsx("div",{className:"container mx-auto px-4 py-8 max-w-6xl",children:t.jsxs("div",{className:"flex flex-col gap-8",children:[t.jsxs("div",{className:"lg:col-span-2 space-y-6",children:[t.jsx("div",{className:"w-full aspect-video bg-black rounded-xl overflow-hidden relative shadow-card",children:N?t.jsxs("div",{className:"relative w-full h-full",children:[t.jsx("video",{ref:B,controls:!0,poster:Br(x.thumbnail),className:"w-full h-full object-contain bg-black",onDoubleClick:async V=>{const J=V.currentTarget;try{document.fullscreenElement?await document.exitFullscreen():await J.requestFullscreen()}catch{}}}),j&&t.jsx("div",{className:"absolute inset-0 flex items-center justify-center bg-black/50",children:t.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-primary"})}),m&&t.jsx("div",{className:"absolute inset-0 flex items-center justify-center bg-black/80",children:t.jsxs("div",{className:"text-center text-white",children:[t.jsx("p",{className:"mb-4",children:m}),t.jsx("button",{onClick:()=>{y(!1),k(null)},className:"px-4 py-2 bg-primary text-primary-foreground rounded-lg hover:bg-primary-hover transition-colors",children:"Try Again"})]})})]}):t.jsxs(t.Fragment,{children:[t.jsx("img",{src:Br(x.thumbnail)||`https://images.hive.blog/u/${x.owner}/avatar`,alt:x.title,className:"w-full h-full object-cover",onError:V=>{V.target.src=`https://images.hive.blog/u/${x.owner}/avatar`}}),t.jsx("div",{className:"absolute inset-0 bg-gradient-overlay opacity-30"}),t.jsx("div",{className:"absolute inset-0 flex items-center justify-center",children:t.jsx("button",{onClick:ee,className:"bg-primary hover:bg-primary-hover rounded-full p-6 transform hover:scale-110 transition-all duration-300 shadow-lg",children:t.jsx(z.Play,{className:"w-8 h-8 text-primary-foreground ml-1",fill:"currentColor"})})}),x.duration&&t.jsxs("div",{className:"absolute bottom-4 right-4 bg-black/80 text-white text-sm px-3 py-1 rounded-md flex items-center gap-1 backdrop-blur-sm",children:[t.jsx(z.Clock,{className:"w-3 h-3"}),I(x.duration)]}),x.views&&t.jsxs("div",{className:"absolute bottom-4 left-4 bg-black/80 text-white text-sm px-3 py-1 rounded-md flex items-center gap-1 backdrop-blur-sm",children:[t.jsx(z.Eye,{className:"w-3 h-3"}),x.views.toLocaleString()," views"]})]})}),t.jsx(Cc,{title:x.title||"",author:x.owner||"",permlink:x.permlink||"",createdAt:x.created,description:x.description||"",video:{title:x.title||"",author:x.owner||"",permlink:x.permlink||"",created:x.created||new Date,category:x.category||"",numOfUpvotes:void 0,numOfComments:void 0,hiveValue:void 0,duration:x.duration,thumbnail:x.thumbnail,views:x.views},onTapComment:()=>{u?u(l,p):C(!0)},onTapUpvote:()=>{c?c(l,p):$(!0)},onTapInfo:()=>{d?d(l,p,x.description||""):F(!0)},onTapAuthor:()=>{i&&i(x.owner)},onTapShare:()=>{o&&o(l,p)},onTapBookmark:()=>{h&&h(l,p)}}),x.tags&&t.jsx("div",{className:"flex flex-wrap gap-2",children:x.tags.split(",").map((V,J)=>t.jsxs("span",{className:"bg-primary/10 text-primary px-3 py-1 rounded-full text-sm font-medium hover:bg-primary/20 transition-colors cursor-pointer",onClick:()=>{a&&a(V.trim())},children:["#",V.trim()]},J))})]}),t.jsxs("div",{className:"bg-card border border-border rounded-xl p-6 sticky top-24",children:[t.jsx("h3",{className:"font-semibold text-card-foreground mb-4 text-lg",children:"Related Videos"}),t.jsx("div",{className:"space-y-4",children:t.jsx(is,{feedType:Ge.RELATED,username:x.owner,onVideoClick:R,onAuthorClick:se})})]})]})}),D&&l&&p&&t.jsx(so,{author:l,permlink:p,onClose:()=>C(!1)}),P&&l&&p&&t.jsx(io,{author:l,permlink:p,onClose:()=>$(!1)}),H&&l&&p&&t.jsx(cp,{author:l,permlink:p,content:x.description||"",onClose:()=>F(!1)})]})};var wd={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},gc=O.createContext&&O.createContext(wd),fp=["attr","size","title"];function hp(e,r){if(e==null)return{};var i=pp(e,r),s,a;if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);for(a=0;a<n.length;a++)s=n[a],!(r.indexOf(s)>=0)&&Object.prototype.propertyIsEnumerable.call(e,s)&&(i[s]=e[s])}return i}function pp(e,r){if(e==null)return{};var i={};for(var s in e)if(Object.prototype.hasOwnProperty.call(e,s)){if(r.indexOf(s)>=0)continue;i[s]=e[s]}return i}function as(){return as=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var i=arguments[r];for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(e[s]=i[s])}return e},as.apply(this,arguments)}function bc(e,r){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);r&&(s=s.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),i.push.apply(i,s)}return i}function ns(e){for(var r=1;r<arguments.length;r++){var i=arguments[r]!=null?arguments[r]:{};r%2?bc(Object(i),!0).forEach(function(s){mp(e,s,i[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):bc(Object(i)).forEach(function(s){Object.defineProperty(e,s,Object.getOwnPropertyDescriptor(i,s))})}return e}function mp(e,r,i){return r=gp(r),r in e?Object.defineProperty(e,r,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[r]=i,e}function gp(e){var r=bp(e,"string");return typeof r=="symbol"?r:r+""}function bp(e,r){if(typeof e!="object"||!e)return e;var i=e[Symbol.toPrimitive];if(i!==void 0){var s=i.call(e,r);if(typeof s!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}function _d(e){return e&&e.map((r,i)=>O.createElement(r.tag,ns({key:i},r.attr),_d(r.child)))}function la(e){return r=>O.createElement(xp,as({attr:ns({},e.attr)},r),_d(e.child))}function xp(e){var r=i=>{var{attr:s,size:a,title:n}=e,u=hp(e,fp),c=a||i.size||"1em",d;return i.className&&(d=i.className),e.className&&(d=(d?d+" ":"")+e.className),O.createElement("svg",as({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},i.attr,s,u,{className:d,style:ns(ns({color:e.color||i.color},i.style),e.style),height:c,width:c,xmlns:"http://www.w3.org/2000/svg"}),n&&O.createElement("title",null,n),e.children)};return gc!==void 0?O.createElement(gc.Consumer,null,i=>r(i)):r(wd)}function yp(e){return la({attr:{viewBox:"0 0 320 512"},child:[{tag:"path",attr:{d:"M296 160H180.6l42.6-129.8C227.2 15 215.7 0 200 0H56C44 0 33.8 8.9 32.2 20.8l-32 240C-1.7 275.2 9.5 288 24 288h118.7L96.6 482.5c-3.6 15.2 8 29.5 23.3 29.5 8.4 0 16.4-4.4 20.8-12l176-304c9.3-15.9-2.2-36-20.7-36z"},child:[]}]})(e)}function vp(e){return la({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M0 405.3V448c0 35.3 86 64 192 64s192-28.7 192-64v-42.7C342.7 434.4 267.2 448 192 448S41.3 434.4 0 405.3zM320 128c106 0 192-28.7 192-64S426 0 320 0 128 28.7 128 64s86 64 192 64zM0 300.4V352c0 35.3 86 64 192 64s192-28.7 192-64v-51.6c-41.3 34-116.9 51.6-192 51.6S41.3 334.4 0 300.4zm416 11c57.3-11.1 96-31.7 96-55.4v-42.7c-23.2 16.4-57.3 27.6-96 34.5v63.6zM192 160C86 160 0 195.8 0 240s86 80 192 80 192-35.8 192-80-86-80-192-80zm219.3 56.3c60-10.8 100.7-32 100.7-56.3v-42.7c-35.5 25.1-96.5 38.6-160.7 41.8 29.5 14.3 51.2 33.5 60 57.2z"},child:[]}]})(e)}function wp(e){return la({attr:{viewBox:"0 0 576 512"},child:[{tag:"path",attr:{d:"M569.517 440.013C587.975 472.007 564.806 512 527.94 512H48.054c-36.937 0-59.999-40.055-41.577-71.987L246.423 23.985c18.467-32.009 64.72-31.951 83.154 0l239.94 416.028zM288 354c-25.405 0-46 20.595-46 46s20.595 46 46 46 46-20.595 46-46-20.595-46-46-46zm-43.673-165.346l7.418 136c.347 6.364 5.609 11.346 11.982 11.346h48.546c6.373 0 11.635-4.982 11.982-11.346l7.418-136c.375-6.874-5.098-12.654-11.982-12.654h-63.383c-6.884 0-12.356 5.78-11.981 12.654z"},child:[]}]})(e)}function _p(e){return la({attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M608 64H32C14.33 64 0 78.33 0 96v320c0 17.67 14.33 32 32 32h576c17.67 0 32-14.33 32-32V96c0-17.67-14.33-32-32-32zM48 400v-64c35.35 0 64 28.65 64 64H48zm0-224v-64h64c0 35.35-28.65 64-64 64zm272 176c-44.19 0-80-42.99-80-96 0-53.02 35.82-96 80-96s80 42.98 80 96c0 53.03-35.83 96-80 96zm272 48h-64c0-35.35 28.65-64 64-64v64zm0-224c-35.35 0-64-28.65-64-64h64v64z"},child:[]}]})(e)}function kp(e){return la({attr:{viewBox:"0 0 576 512"},child:[{tag:"path",attr:{d:"M560 224h-29.5c-8.8-20-21.6-37.7-37.4-52.5L512 96h-32c-29.4 0-55.4 13.5-73 34.3-7.6-1.1-15.1-2.3-23-2.3H256c-77.4 0-141.9 55-156.8 128H56c-14.8 0-26.5-13.5-23.5-28.8C34.7 215.8 45.4 208 57 208h1c3.3 0 6-2.7 6-6v-20c0-3.3-2.7-6-6-6-28.5 0-53.9 20.4-57.5 48.6C-3.9 258.8 22.7 288 56 288h40c0 52.2 25.4 98.1 64 127.3V496c0 8.8 7.2 16 16 16h64c8.8 0 16-7.2 16-16v-48h128v48c0 8.8 7.2 16 16 16h64c8.8 0 16-7.2 16-16v-80.7c11.8-8.9 22.3-19.4 31.3-31.3H560c8.8 0 16-7.2 16-16V240c0-8.8-7.2-16-16-16zm-128 64c-8.8 0-16-7.2-16-16s7.2-16 16-16 16 7.2 16 16-7.2 16-16 16zM256 96h128c5.4 0 10.7.4 15.9.8 0-.3.1-.5.1-.8 0-53-43-96-96-96s-96 43-96 96c0 2.1.5 4.1.6 6.2 15.2-3.9 31-6.2 47.4-6.2z"},child:[]}]})(e)}function Np(e){return la({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M461.2 128H80c-8.84 0-16-7.16-16-16s7.16-16 16-16h384c8.84 0 16-7.16 16-16 0-26.51-21.49-48-48-48H64C28.65 32 0 60.65 0 96v320c0 35.35 28.65 64 64 64h397.2c28.02 0 50.8-21.53 50.8-48V176c0-26.47-22.78-48-50.8-48zM416 336c-17.67 0-32-14.33-32-32s14.33-32 32-32 32 14.33 32 32-14.33 32-32 32z"},child:[]}]})(e)}const oo=new Id.Client(["https://api.hive.blog"]),jp=async e=>{try{const r=await oo.database.getAccounts([e]);if(!r||r.length===0)throw new Error("Account not found");return r[0]}catch(r){return console.error("Error in getWalletDataDetail:",r),{error:r instanceof Error?r.message:"Unknown error"}}},Ep=async e=>{try{const r=await oo.database.getDynamicGlobalProperties(),i=parseFloat(e.split(" ")[0]),s=parseFloat(String(r.total_vesting_shares).split(" ")[0]),a=parseFloat(String(r.total_vesting_fund_hive).split(" ")[0]);return(i*a/s).toFixed(3)}catch(r){return console.error("Error in convertVestingSharesToHiveData:",r),"0"}},Ap=async e=>{try{const i=(await oo.database.call("get_feed_history",[])).current_median_history,s=parseFloat(i.base.split(" ")[0]),a=typeof e=="string"?parseFloat(e):e;return(s*a).toFixed(2)}catch(r){return console.error("Error in convertHivetoUSDData:",r),"0"}},kd=jc.create(e=>({walletData:null,isLoading:!1,error:null,setWalletData:r=>e({walletData:r}),clearWalletData:()=>e({walletData:null,error:null}),fetchWalletData:async r=>{e({isLoading:!0,error:null});try{const i=await jp(r),s=w=>"error"in w;if(!i||s(i))throw new Error(s(i)?i.error:"Account not found");const a=typeof i.vesting_shares=="string"?i.vesting_shares:"0.000000 VESTS",n=typeof i.balance=="string"?i.balance:i.balance.toString(),u=typeof i.hbd_balance=="string"?i.hbd_balance:i.hbd_balance.toString(),c=typeof i.savings_balance=="string"?i.savings_balance:i.savings_balance.toString(),d=typeof i.savings_hbd_balance=="string"?i.savings_hbd_balance:i.savings_hbd_balance.toString(),f=await Ep(a),o=parseFloat(n.split(" ")[0]||"0"),h=parseFloat(f),l=(o+h).toFixed(3),p=await Ap(l),x={balance:n,hbd_balance:u,savings_balance:c,savings_hbd_balance:d,hive_power:`${f} HP`,estimated_value:`$${p}`};return e({walletData:x}),x}catch(i){const s=i instanceof Error?i.message:"Failed to fetch wallet data";console.error("Wallet fetch error:",s);const a={balance:"0.000 HIVE",hbd_balance:"0.000 HBD",savings_balance:"0.000 HIVE",savings_hbd_balance:"0.000 HBD",hive_power:"0 HP",estimated_value:"$0.00",error:s};return e({walletData:a,error:s}),a}finally{e({isLoading:!1})}}})),Sp=({username:e,className:r=""})=>{const{walletData:i,fetchWalletData:s,isLoading:a,error:n}=kd();O.useEffect(()=>{e&&s(e)},[e,s]);const u=({label:c,value:d,icon:f,colorClass:o="bg-primary/10"})=>t.jsxs("div",{className:"flex items-center justify-between p-4 rounded-lg bg-card border border-border shadow-sm mb-3 transition-all duration-200 hover:shadow-md",children:[t.jsxs("div",{className:"flex items-center gap-3",children:[f&&t.jsx("div",{className:`p-2 rounded-full flex items-center justify-center ${o} text-primary`,children:f}),t.jsx("span",{className:"font-semibold text-card-foreground",children:c})]}),t.jsx("span",{className:"font-medium text-muted-foreground",children:d??"-"})]});return t.jsx("div",{className:`min-h-screen bg-gradient-elegant p-4 transition-all duration-300 ${r}`,children:t.jsxs("div",{className:"max-w-md mx-auto",children:[t.jsxs("div",{className:"flex flex-col items-center p-6 mb-6 rounded-xl bg-card border border-border shadow-elegant",children:[e&&t.jsx("img",{src:`https://images.hive.blog/u/${e}/avatar`,alt:`${e} avatar`,className:"w-20 h-20 rounded-full border-4 border-primary/20 mb-3 transition-transform hover:scale-105",onError:c=>{c.target.src=`https://ui-avatars.com/api/?name=${e}&background=random`}}),t.jsx("div",{className:"text-lg font-bold text-card-foreground",children:e}),t.jsx("div",{className:"text-sm text-muted-foreground",children:"Hive Wallet Overview"})]}),t.jsxs("div",{className:"text-center rounded-xl bg-gradient-primary shadow-glow p-6 mb-6 transition-all duration-300 hover:shadow-elegant",children:[t.jsx("div",{className:"text-sm font-semibold text-primary-foreground/80",children:"Estimated Value"}),t.jsx("div",{className:"text-3xl font-bold mt-2 text-primary-foreground",children:a?t.jsxs("div",{className:"flex items-center justify-center gap-2",children:[t.jsx("div",{className:"w-6 h-6 border-2 border-primary-foreground/30 border-t-primary-foreground rounded-full animate-spin"}),"Loading..."]}):i?.estimated_value??"-"})]}),n&&t.jsxs("div",{className:"flex items-center p-3 rounded-lg bg-destructive/10 border border-destructive/20 text-destructive mb-4",children:[t.jsx(wp,{className:"mr-2"}),t.jsx("span",{children:n})]}),t.jsx(u,{label:"Balance",value:i?.balance,icon:t.jsx(Np,{}),colorClass:"bg-blue-500/10"}),t.jsx(u,{label:"HBD Balance",value:i?.hbd_balance,icon:t.jsx(_p,{}),colorClass:"bg-green-500/10"}),t.jsx(u,{label:"Savings Balance",value:i?.savings_balance,icon:t.jsx(kp,{}),colorClass:"bg-yellow-500/10"}),t.jsx(u,{label:"Savings HBD Balance",value:i?.savings_hbd_balance,icon:t.jsx(vp,{}),colorClass:"bg-purple-500/10"}),t.jsx(u,{label:"Hive Power",value:i?.hive_power,icon:t.jsx(yp,{}),colorClass:"bg-orange-500/10"})]})})};function Nd({sort:e="trending",tag:r="",observer:i="hive.blog",limit:s=20,showSortDropdown:a=!0,theme:n="dark",onAuthorClick:u,onPostClick:c,onCommunityClick:d,onPayoutClick:f,onUpvoteClick:o,onCommentClick:h,onReblogClick:l}){const[p,x]=O.useState([]),[w,b]=O.useState(!0),[g,v]=O.useState(null),[_,N]=O.useState(e),[y,m]=O.useState(!0),[k,j]=O.useState(!1),E=O.useRef(null);new ro.DefaultRenderer({baseUrl:"https://hive.blog/",breaks:!0,skipSanitization:!1,allowInsecureScriptTags:!1,addNofollowToLinks:!0,doNotShowImages:!1,assetsWidth:640,assetsHeight:480,imageProxyFn:B=>B,usertagUrlFn:B=>`/@${B}`,hashtagUrlFn:B=>`/trending/${B}`,isLinkSafeFn:B=>!0,addExternalCssClassToMatchingLinksFn:B=>!0,ipfsPrefix:"https://ipfs.io/ipfs/"});const D=O.useCallback(async(B,L=!1)=>{L?j(!0):(b(!0),m(!0)),v(null);try{const G=L&&p.length>0?p[p.length-1]:null,X=await Te.getRankedPosts(B,r,i,s,G?.author,G?.permlink);L?(x(ee=>{const R=new Set(ee.map(I=>I.post_id)),se=X.filter(I=>!R.has(I.post_id));return[...ee,...se]}),m(X.length===s)):(x(X),m(X.length===s))}catch(G){v(G instanceof Error?G.message:"Failed to load posts"),m(!1)}finally{b(!1),j(!1)}},[r,i,s,p]),C=O.useCallback(()=>{!k&&y&&!w&&D(_,!0)},[k,y,w,_,D]);O.useEffect(()=>{D(_)},[_,r,i,s]),O.useEffect(()=>{const B=new IntersectionObserver(L=>{L[0].isIntersecting&&C()},{threshold:1});return E.current&&B.observe(E.current),()=>{E.current&&B.unobserve(E.current)}},[C]);const P=B=>{N(B),x([]),m(!0)},$=B=>B>=1e6?`${(B/1e6).toFixed(1)}M`:B>=1e3?`${(B/1e3).toFixed(1)}K`:B.toString(),H=B=>{const L=B.payout*.5,G=B.payout*.5,ee=(B.beneficiaries.find(R=>R.account==="commentrewarder")?.weight||0)/1e4*100;return{pending:`$${B.payout.toFixed(2)}`,breakdown:`${L.toFixed(2)} HBD, ${G.toFixed(2)} HP`,commentRewarder:`${ee.toFixed(2)}%`,payoutInDays:Math.ceil((new Date(B.payout_at).getTime()-Date.now())/(1e3*60*60*24))}},F=B=>{const G=(B.body||"").replace(/!\[[^\]]*\]\([^)]+\)/g,"").replace(/\[([^\]]+)\]\([^)]+\)/g,"$1").replace(/^#+\s*/gm,"").replace(/\*\*([^*]+)\*\*/g,"$1").replace(/\*([^*]+)\*/g,"$1").replace(/`([^`]+)`/g,"$1").replace(/<[^>]*>/g,"").replace(/\n+/g," ").trim();return G.length>200?G.substring(0,200)+"...":G};return w?t.jsx("div",{className:"flex justify-center items-center min-h-[400px]",children:t.jsx(z.Loader2,{className:"w-8 h-8 animate-spin"})}):g?t.jsxs("div",{className:"flex flex-col items-center justify-center min-h-[400px] space-y-4",children:[t.jsx("h3",{className:"text-lg font-semibold text-card-foreground",children:"Failed to load posts"}),t.jsx("p",{className:"text-muted-foreground",children:g}),t.jsx("button",{onClick:()=>D(_),className:"px-4 py-2 bg-primary text-primary-foreground rounded-lg hover:bg-primary/90",children:"Retry"})]}):t.jsx("div",{className:n==="dark"?"dark":"",children:t.jsxs("div",{className:`space-y-6 p-2 ${n==="dark"?"bg-slate-950":"bg-white"}`,children:[a&&t.jsx("div",{className:"flex justify-center",children:t.jsxs("select",{value:_,onChange:B=>P(B.target.value),className:`px-4 py-2 border border-border rounded-lg focus:outline-none focus:ring-2 focus:ring-primary ${n==="dark"?"bg-slate-950 text-white":"bg-card text-card-foreground"}`,children:[t.jsx("option",{value:"trending",children:"Trending"}),t.jsx("option",{value:"hot",children:"Hot"}),t.jsx("option",{value:"created",children:"New"})]})}),t.jsxs("div",{className:"space-y-4",children:[p.map(B=>{const L=B.json_metadata?.image?.[0],G=H(B);return t.jsxs("div",{className:`border border-border rounded-xl p-4 shadow-card hover:shadow-card-hover transition-shadow ${n==="dark"?"bg-slate-900 text-white":"bg-slate-50 text-black"}`,children:[t.jsxs("div",{className:"flex items-center gap-2 mb-3 flex-wrap",children:[t.jsx("img",{src:`https://images.hive.blog/u/${B.author}/avatar`,alt:B.author,className:"w-8 h-8 rounded-full cursor-pointer flex-shrink-0",onClick:()=>u?.(B.author,`https://images.hive.blog/u/${B.author}/avatar`),onError:X=>{X.target.src=`https://ui-avatars.com/api/?name=${B.author}&background=random`}}),t.jsx("span",{className:"font-medium cursor-pointer hover:text-primary",onClick:()=>u?.(B.author,`https://images.hive.blog/u/${B.author}/avatar`),children:B.author}),t.jsxs("span",{className:n==="dark"?"text-gray-400":"text-muted-foreground",children:["(",B.author_reputation.toFixed(2),")"]}),t.jsx("span",{className:`cursor-pointer hover:text-primary ${n==="dark"?"text-gray-400":"text-muted-foreground"}`,onClick:()=>d?.(B.community_title),children:B.community_title}),t.jsx("span",{className:`hidden sm:inline ${n==="dark"?"text-gray-400":"text-muted-foreground"}`,children:"•"}),t.jsx("span",{className:`text-sm ${n==="dark"?"text-gray-400":"text-muted-foreground"}`,children:ss.formatDistanceToNow(new Date(B.created+"Z"),{addSuffix:!0})})]}),t.jsxs("div",{className:"flex gap-3 sm:gap-4",children:[t.jsx("div",{className:"flex-shrink-0",children:L?t.jsxs("div",{className:"relative",children:[t.jsx("img",{src:L.startsWith("http")?L:`https://images.hive.blog/u/320x0/${L}`,alt:B.title,className:"w-20 h-20 sm:w-32 sm:h-32 object-cover rounded-lg cursor-pointer",onClick:()=>c?.(B),onError:X=>{X.target.src!==`https://images.hive.blog/u/${B.author}/avatar`?X.target.src=`https://images.hive.blog/u/${B.author}/avatar`:X.target.src="https://images.hive.blog/u/null/avatar"}}),(()=>{const X=B.body?.match(/!\[[^\]]*\]\(([^)]+)\)/g)?.map(ee=>{const R=ee.match(/\(([^)]+)\)/);return R?R[1]:null}).filter(Boolean)||[];return X.length>0?t.jsx("div",{className:"absolute -bottom-1 -right-1 sm:-bottom-2 sm:-right-2 flex space-x-1",children:X.slice(0,3).map((ee,R)=>t.jsx("img",{src:ee,alt:`body-image-${R}`,className:"w-6 h-6 sm:w-8 sm:h-8 object-cover rounded border-2 border-white shadow-sm cursor-pointer",onClick:se=>{se.stopPropagation();const I=se.currentTarget.parentElement?.parentElement?.querySelector("img:not(.w-6):not(.w-8)");I&&(I.src=ee)}},R))}):null})()]}):t.jsx("img",{src:`https://images.hive.blog/u/${B.author}/avatar`,alt:B.author,className:"w-20 h-20 sm:w-32 sm:h-32 rounded-lg cursor-pointer",onClick:()=>c?.(B)})}),t.jsxs("div",{className:"flex-1 min-w-0",children:[t.jsx("h3",{className:"font-semibold text-base sm:text-lg mb-1 sm:mb-2 cursor-pointer hover:text-primary line-clamp-2",onClick:()=>c?.(B),children:B.title}),t.jsx("p",{className:`mb-2 sm:mb-3 line-clamp-2 sm:line-clamp-3 cursor-pointer hover:text-primary text-sm sm:text-base ${n==="dark"?"text-gray-300":"text-gray-600"}`,onClick:()=>c?.(B),children:B.json_metadata?.description||F(B)||"No description available"}),t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsxs("div",{className:"relative group",children:[t.jsxs("span",{className:"font-semibold text-green-600 cursor-pointer hover:text-green-700 text-sm sm:text-base",onClick:()=>f?.(B.payout),children:["$",B.payout.toFixed(2)]}),t.jsxs("div",{className:"absolute bottom-full left-0 mb-2 hidden group-hover:block bg-black text-white text-xs p-2 rounded shadow-lg whitespace-nowrap z-10",children:[t.jsxs("div",{children:["Pending payout amount: ",G.pending]}),t.jsxs("div",{children:["Breakdown: ",G.breakdown]}),t.jsxs("div",{children:["commentrewarder: ",G.commentRewarder]}),t.jsxs("div",{children:["Payout in ",G.payoutInDays," days"]})]})]}),t.jsxs("div",{className:"flex items-center gap-3 sm:gap-4",children:[t.jsxs("div",{className:`flex items-center gap-1 hover:text-primary transition-colors cursor-pointer ${n==="dark"?"text-gray-400":"text-muted-foreground"}`,onClick:()=>o?.(B),children:[t.jsx(z.ThumbsUp,{className:"w-3 h-3 sm:w-4 sm:h-4"}),t.jsx("span",{className:"text-xs sm:text-sm",children:$(B.stats.total_votes)})]}),t.jsxs("div",{className:`flex items-center gap-1 hover:text-blue-400 transition-colors cursor-pointer ${n==="dark"?"text-blue-400":"text-blue-600"}`,onClick:()=>h?.(B),children:[t.jsx(z.MessageCircle,{className:"w-3 h-3 sm:w-4 sm:h-4"}),t.jsx("span",{className:"text-xs sm:text-sm",children:$(B.children)})]}),t.jsxs("div",{className:`flex items-center gap-1 hover:text-gray-400 transition-colors cursor-pointer ${n==="dark"?"text-gray-400":"text-gray-600"}`,onClick:()=>l?.(B),children:[t.jsx(z.Repeat2,{className:"w-3 h-3 sm:w-4 sm:h-4"}),t.jsx("span",{className:"text-xs sm:text-sm",children:$(B.reblogs)})]})]})]})]})]})]},B.post_id)}),k&&t.jsxs("div",{className:"flex justify-center items-center py-4",children:[t.jsx(z.Loader2,{className:"w-6 h-6 animate-spin"}),t.jsx("span",{className:`ml-2 ${n==="dark"?"text-gray-400":"text-muted-foreground"}`,children:"Loading more posts..."})]}),y&&!k&&t.jsx("div",{ref:E,className:"h-10"})]})]})})}class sa{static instance;static getInstance(){return sa.instance||(sa.instance=new sa),sa.instance}async getProposals(r){return r==="expired"?this.getExpiredProposals():this.getActiveProposals()}async getActiveProposals(){try{const s=(await(await fetch("https://api.hive.blog/",{method:"POST",headers:{accept:"application/json, text/plain, */*","accept-language":"en-GB,en-US;q=0.9,en;q=0.8,hi;q=0.7","content-type":"application/json",origin:"https://peakd.com","sec-ch-ua":'"Google Chrome";v="141", "Not?A_Brand";v="8", "Chromium";v="141"',"sec-ch-ua-mobile":"?0","sec-ch-ua-platform":'"macOS"',"sec-fetch-dest":"empty","sec-fetch-mode":"cors","sec-fetch-site":"cross-site","user-agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36"},body:JSON.stringify({id:72,jsonrpc:"2.0",method:"database_api.list_proposals",params:{start:[-1],limit:500,order:"by_total_votes",order_direction:"descending",status:"votable"}})})).json()).result.proposals,n=await(await fetch("https://stats.hivehub.dev/dhf_proposals")).json(),u={};n.forEach(h=>{u[h.proposal_id]=h});const f=(await(await fetch("https://api.hive.blog/",{method:"POST",headers:{accept:"application/json, text/plain, */*","accept-language":"en-GB,en-US;q=0.9,en;q=0.8,hi;q=0.7","content-type":"application/json",origin:"https://peakd.com","sec-ch-ua":'"Google Chrome";v="141", "Not?A_Brand";v="8", "Chromium";v="141"',"sec-ch-ua-mobile":"?0","sec-ch-ua-platform":'"macOS"',"sec-fetch-dest":"empty","sec-fetch-mode":"cors","sec-fetch-site":"cross-site","user-agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36"},body:JSON.stringify({id:73,jsonrpc:"2.0",method:"database_api.list_proposal_votes",params:{start:["shaktimaaan"],limit:1e3,order:"by_voter_proposal",order_direction:"ascending",status:"votable"}})})).json()).result.proposal_votes||[],o={};return f.forEach(h=>{o[h.proposal.proposal_id]||(o[h.proposal.proposal_id]=[]),o[h.proposal.proposal_id].push(h)}),s.map(h=>{const l=h.id,p=u[l],x=o[l]||[],w=x.reduce((b,g)=>b+parseFloat(g.total_hbd||"0"),0);return{proposal_id:l,subject:h.subject,permlink:h.permlink,creator:h.creator,receiver:h.receiver,start_date:h.start_date,end_date:h.end_date,total_hbd_received:p?p.total_hbd_received:"0",max_hbd_remaining:p?p.max_hbd_remaining:"0",all_votes_num:h.total_votes||"0",all_votes_hp:p?p.all_votes_hp:w.toString(),votes:p?p.votes:x,status:h.status,daily_pay:h.daily_pay,total_votes:h.total_votes,daily_pay_hbd:h.daily_pay?Number(h.daily_pay.amount)/Math.pow(10,h.daily_pay.precision):0,remaining_days:Math.max(0,Math.ceil((new Date(h.end_date).getTime()-new Date().getTime())/(1e3*60*60*24))),vote_value_total:p?parseFloat(p.all_votes_hp):w}})}catch(r){return console.error("Error fetching active proposals:",r),[]}}async getExpiredProposals(){try{const s=(await(await fetch("https://api.hive.blog/",{method:"POST",headers:{accept:"application/json, text/plain, */*","accept-language":"en-GB,en-US;q=0.9,en;q=0.8,hi;q=0.7","content-type":"application/json",origin:"https://peakd.com","sec-ch-ua":'"Google Chrome";v="141", "Not?A_Brand";v="8", "Chromium";v="141"',"sec-ch-ua-mobile":"?0","sec-ch-ua-platform":'"macOS"',"sec-fetch-dest":"empty","sec-fetch-mode":"cors","sec-fetch-site":"cross-site","user-agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36"},body:JSON.stringify({id:65,jsonrpc:"2.0",method:"database_api.list_proposals",params:{start:[-1],limit:500,order:"by_total_votes",order_direction:"descending",status:"expired"}})})).json()).result.proposals,n=await(await fetch("https://stats.hivehub.dev/dhf_proposals")).json(),u={};n.forEach(h=>{u[h.proposal_id]=h});const f=(await(await fetch("https://api.hive.blog/",{method:"POST",headers:{accept:"application/json, text/plain, */*","accept-language":"en-GB,en-US;q=0.9,en;q=0.8,hi;q=0.7","content-type":"application/json",origin:"https://peakd.com","sec-ch-ua":'"Google Chrome";v="141", "Not?A_Brand";v="8", "Chromium";v="141"',"sec-ch-ua-mobile":"?0","sec-ch-ua-platform":'"macOS"',"sec-fetch-dest":"empty","sec-fetch-mode":"cors","sec-fetch-site":"cross-site","user-agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36"},body:JSON.stringify({id:76,jsonrpc:"2.0",method:"database_api.list_proposal_votes",params:{start:["shaktimaaan"],limit:1e3,order:"by_voter_proposal",order_direction:"ascending",status:"expired"}})})).json()).result.proposal_votes||[],o={};return f.forEach(h=>{o[h.proposal_id]||(o[h.proposal_id]=[]),o[h.proposal_id].push(h)}),s.map(h=>{const l=h.id,p=u[l],x=o[l]||[],w=x.reduce((b,g)=>b+parseFloat(g.total_hbd||"0"),0);return{proposal_id:l,subject:h.subject,permlink:h.permlink,creator:h.creator,receiver:h.receiver,start_date:h.start_date,end_date:h.end_date,total_hbd_received:p?p.total_hbd_received:"0",max_hbd_remaining:p?p.max_hbd_remaining:"0",all_votes_num:h.total_votes||"0",all_votes_hp:p?p.all_votes_hp:w.toString(),votes:p?p.votes:x,status:h.status,daily_pay:h.daily_pay,total_votes:h.total_votes,daily_pay_hbd:h.daily_pay?Number(h.daily_pay.amount)/Math.pow(10,h.daily_pay.precision):0,remaining_days:0,vote_value_total:p?parseFloat(p.all_votes_hp):w}})}catch(r){return console.error("Error fetching expired proposals:",r),[]}}}const xc=sa.getInstance(),Cp=["All","Active","Upcoming","Expired","By Peak Projects"],jd=["Votes","Start Date","End Date","Creator"],yc=e=>e==="By Peak Projects"?["Creator"]:jd,it=e=>{const r=typeof e=="string"?parseFloat(e):e;return isNaN(r)?e.toString():r.toLocaleString()},Ci=e=>{const r=new Date(e.start_date),i=new Date(e.end_date);return`(${Math.ceil((i.getTime()-r.getTime())/(1e3*60*60*24))} days)`},Dp=({onClickSupport:e,onClickVoteValue:r,onClickSelect:i,onClickUser:s,onClickAvatar:a,theme:n="dark"})=>{const[u,c]=O.useState([]),[d,f]=O.useState("All"),[o,h]=O.useState("Votes");O.useEffect(()=>{d==="By Peak Projects"&&!yc(d).includes(o)?h("Creator"):d!=="By Peak Projects"&&o==="Creator"&&!jd.includes(o)&&h("Votes")},[d,o]);const[l,p]=O.useState(!0);O.useEffect(()=>{(async()=>{p(!0);try{const[g,v]=await Promise.all([xc.getProposals("active"),xc.getProposals("expired")]);c([...g,...v])}catch(g){console.error("Error fetching proposals:",g),c([])}p(!1)})()},[]);const x=u.filter(b=>d==="All"?b.status==="active"||new Date(b.start_date+"Z")>new Date:d==="Active"?b.status==="active":d==="Upcoming"?new Date(b.start_date+"Z")>new Date:d==="Expired"?new Date(b.end_date+"Z")<new Date:d==="By Peak Projects"?b.creator==="peakd":!0).sort((b,g)=>d==="By Peak Projects"?g.creator.localeCompare(b.creator):0),w=d==="All"?(()=>{const b=x.filter(_=>_.status==="active"),g=x.filter(_=>new Date(_.start_date+"Z")>new Date),v=(_,N)=>o==="Votes"?Number(N.all_votes_num)-Number(_.all_votes_num):o==="Start Date"?new Date(N.start_date+"Z").getTime()-new Date(_.start_date+"Z").getTime():o==="End Date"?new Date(_.end_date+"Z").getTime()-new Date(N.end_date+"Z").getTime():o==="Creator"?_.creator.localeCompare(N.creator):0;return[...b.sort(v),...g.sort(v)]})():x.sort((b,g)=>o==="Votes"?Number(g.all_votes_num)-Number(b.all_votes_num):o==="Start Date"?new Date(g.start_date+"Z").getTime()-new Date(b.start_date+"Z").getTime():o==="End Date"?new Date(b.end_date+"Z").getTime()-new Date(g.end_date+"Z").getTime():o==="Creator"?b.creator.localeCompare(g.creator):0);return l?t.jsx("div",{className:"flex justify-center items-center py-8",children:t.jsx("div",{className:"text-gray-600 dark:text-gray-400",children:"Loading proposals..."})}):t.jsx("div",{className:n==="dark"?"dark":"",children:t.jsxs("div",{className:`space-y-6 p-2 ${n==="dark"?"bg-slate-950":"bg-white"}`,children:[t.jsx("div",{className:"flex gap-2 mb-4 flex-wrap",children:Cp.map(b=>t.jsx("button",{className:`px-3 py-1 rounded text-sm ${d===b?"bg-blue-500 text-white":`${n==="dark"?"bg-slate-900 text-gray-300":"bg-gray-200 text-gray-700"}`}`,onClick:()=>f(b),children:b},b))}),t.jsxs("div",{className:"mb-4",children:[t.jsx("label",{className:`${n==="dark"?"text-gray-300":"text-gray-700"} mr-2`,children:"Sort by:"}),t.jsx("select",{value:o,onChange:b=>h(b.target.value),className:`px-3 py-1 border rounded ${n==="dark"?"border-gray-600 bg-slate-900 text-gray-100":"border-gray-300 bg-white text-gray-900"}`,children:yc(d).map(b=>t.jsx("option",{value:b,children:b},b))})]}),t.jsxs("div",{children:[d==="All"&&(()=>{const b=w.filter(v=>v.status==="active"),g=w.filter(v=>new Date(v.start_date+"Z")>new Date);return t.jsxs(t.Fragment,{children:[b.map(v=>t.jsx("div",{className:`border rounded-lg mb-4 p-2 sm:p-4 shadow ${n==="dark"?"border-gray-800 bg-slate-900":"border-gray-200 bg-white"}`,children:t.jsxs("div",{className:"flex flex-col sm:flex-row",children:[t.jsxs("div",{className:"flex-1",children:[t.jsxs("div",{className:"flex items-center mb-2",children:[t.jsx("span",{onClick:()=>a(v),className:"inline-block mr-2 cursor-pointer",children:t.jsx("img",{src:`https://images.hive.blog/u/${v.creator}/avatar`,className:"w-8 h-8 rounded-full inline",alt:`${v.creator} avatar`})}),t.jsxs("span",{className:`font-bold cursor-pointer ${n==="dark"?"text-gray-100":"text-gray-900"}`,onClick:()=>s(v),children:["by ",v.creator]}),v.receiver&&t.jsxs("span",{className:`ml-2 ${n==="dark"?"text-gray-400":"text-gray-500"}`,children:["with receiver ",t.jsx("strong",{className:`${n==="dark"?"text-gray-100":"text-gray-900"}`,children:v.receiver})]})]}),t.jsxs("div",{className:`cursor-pointer text-lg font-semibold mb-1 ${n==="dark"?"text-gray-100":"text-gray-900"}`,onClick:()=>i(v),children:[v.subject," ",t.jsxs("span",{className:`cursor-pointer text-lg font-semibold mb-1 ${n==="dark"?"text-gray-500":"text-gray-600"}`,children:["#",v.proposal_id]})]}),t.jsxs("div",{className:`text-sm mb-2 ${n==="dark"?"text-gray-400":"text-gray-500"}`,children:[t.jsx("span",{className:`inline-block px-2 py-1 rounded text-xs font-medium ${new Date(v.start_date+"Z")>new Date?"bg-yellow-100 text-yellow-800 dark:bg-yellow-900 dark:text-yellow-200":new Date(v.end_date+"Z")<new Date?"bg-red-100 text-red-800 dark:bg-red-900 dark:text-red-200":v.status==="active"?"bg-purple-100 text-purple-800 dark:bg-purple-900 dark:text-purple-200":"bg-gray-100 text-gray-800 dark:bg-gray-700 dark:text-gray-300"}`,children:new Date(v.start_date+"Z")>new Date?"upcoming":new Date(v.end_date+"Z")<new Date?"expired":v.status})," - "+new Date(v.start_date+"Z").toLocaleDateString()+" - "+new Date(v.end_date+"Z").toLocaleDateString()," ",t.jsx("span",{className:`text-xs ${n==="dark"?"text-gray-500":"text-gray-400"}`,children:Ci(v)})]}),t.jsxs("div",{className:"flex gap-2 mb-2",children:[t.jsx("button",{onClick:()=>window.open(`https://peakd.com/${v.creator}/${v.permlink}`,"_blank"),className:"text-blue-500 hover:text-blue-700 dark:text-blue-400 dark:hover:text-blue-300",title:"View on Peakd",children:t.jsx(z.ExternalLink,{size:16})}),t.jsxs("button",{onClick:()=>window.open(`https://hivehub.dev/proposals/${v.proposal_id}`,"_blank"),className:"flex text-green-500 hover:text-green-700 dark:text-green-400 dark:hover:text-green-300",title:"View Stats",children:[t.jsx(z.PieChart,{size:16})," Stats"]})]}),t.jsx("div",{className:"mb-2",children:t.jsxs("span",{className:`inline-block cursor-pointer px-2 py-1 rounded ${n==="dark"?"bg-gray-800 text-gray-300":"bg-gray-100 text-gray-700"}`,onClick:()=>r(v),children:["Vote value: ",v.vote_value_total?it(v.vote_value_total):0," HP"]})})]}),t.jsxs("div",{className:"mt-4 sm:mt-0 sm:ml-4 w-full sm:w-48 flex flex-col space-y-1",children:[t.jsxs("div",{className:"flex justify-between",children:[t.jsx("span",{className:`font-mono text-xs sm:text-sm ${n==="dark"?"text-gray-400":"text-gray-600"}`,children:"Daily Pay:"}),t.jsxs("strong",{className:`text-xs sm:text-sm ${n==="dark"?"text-gray-100":"text-gray-900"}`,children:[v.daily_pay_hbd?it(v.daily_pay_hbd):0," HBD"]})]}),t.jsxs("div",{className:"flex justify-between",children:[t.jsx("span",{className:`font-mono text-xs sm:text-sm ${n==="dark"?"text-gray-400":"text-gray-600"}`,children:"Remaining:"}),t.jsxs("strong",{className:`text-xs sm:text-sm ${n==="dark"?"text-gray-100":"text-gray-900"}`,children:[it(v.remaining_days||0)," Days"]})]}),t.jsxs("div",{className:"flex justify-between",children:[t.jsx("span",{className:`font-mono text-xs sm:text-sm ${n==="dark"?"text-gray-400":"text-gray-600"}`,children:"Paid:"}),t.jsxs("strong",{className:`text-xs sm:text-sm ${n==="dark"?"text-gray-100":"text-gray-900"}`,children:[it(v.total_hbd_received||0)," HBD"]})]}),t.jsxs("div",{className:"flex justify-between",children:[t.jsx("span",{className:`font-mono text-xs sm:text-sm ${n==="dark"?"text-gray-400":"text-gray-600"}`,children:"To Pay:"}),t.jsxs("strong",{className:`text-xs sm:text-sm ${n==="dark"?"text-gray-100":"text-gray-900"}`,children:[it(v.max_hbd_remaining||0)," HBD"]})]}),t.jsx("div",{className:"mt-2",children:t.jsx("button",{className:"px-3 sm:px-5 py-2 bg-green-600 hover:bg-green-700 text-white rounded cursor-pointer w-full text-xs sm:text-sm",onClick:()=>e(v),children:"Support"})})]})]})},v.proposal_id)),g.length>0&&t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"my-6 text-center",children:[t.jsx("h3",{className:`text-xl font-bold mb-2 ${n==="dark"?"text-gray-100":"text-gray-900"}`,children:"Upcoming proposals"}),t.jsx("p",{className:`${n==="dark"?"text-gray-400":"text-gray-600"}`,children:"The proposals listed below will start in the future. You can already support them."})]}),g.map(v=>t.jsx("div",{className:`border rounded-lg mb-4 p-2 sm:p-4 shadow ${n==="dark"?"border-gray-800 bg-slate-950":"border-gray-200 bg-white"}`,children:t.jsxs("div",{className:"flex flex-col sm:flex-row",children:[t.jsxs("div",{className:"flex-1",children:[t.jsxs("div",{className:"flex items-center mb-2",children:[t.jsx("span",{onClick:()=>a(v),className:"inline-block mr-2 cursor-pointer",children:t.jsx("img",{src:`https://images.hive.blog/u/${v.creator}/avatar`,className:"w-8 h-8 rounded-full inline",alt:`${v.creator} avatar`})}),t.jsx("span",{className:`font-bold cursor-pointer ${n==="dark"?"text-gray-100":"text-gray-900"}`,onClick:()=>s(v),children:v.creator}),t.jsxs("span",{className:`ml-2 ${n==="dark"?"text-gray-400":"text-gray-500"}`,children:["with receiver ",t.jsx("strong",{className:`${n==="dark"?"text-gray-100":"text-gray-900"}`,children:v.receiver})]})]}),t.jsx("div",{className:`cursor-pointer text-lg font-semibold mb-1 ${n==="dark"?"text-gray-100":"text-gray-900"}`,onClick:()=>i(v),children:v.subject}),t.jsxs("div",{className:`text-sm mb-2 ${n==="dark"?"text-gray-400":"text-gray-500"}`,children:[t.jsx("span",{className:`inline-block px-2 py-1 rounded text-xs font-medium ${new Date(v.start_date+"Z")>new Date?"bg-yellow-100 text-yellow-800 dark:bg-yellow-900 dark:text-yellow-200":new Date(v.end_date+"Z")<new Date?"bg-red-100 text-red-800 dark:bg-red-900 dark:text-red-200":v.status==="active"?"bg-purple-100 text-purple-800 dark:bg-purple-900 dark:text-purple-200":"bg-gray-100 text-gray-800 dark:bg-gray-700 dark:text-gray-300"}`,children:new Date(v.start_date+"Z")>new Date?"upcoming":new Date(v.end_date+"Z")<new Date?"expired":v.status})," - "+new Date(v.start_date+"Z").toLocaleDateString()+" - "+new Date(v.end_date+"Z").toLocaleDateString()," ",t.jsx("span",{className:`text-xs ${n==="dark"?"text-gray-500":"text-gray-400"}`,children:Ci(v)})]}),t.jsxs("div",{className:"flex gap-2 mb-2",children:[t.jsx("button",{onClick:()=>window.open(`https://peakd.com/${v.creator}/${v.permlink}`,"_blank"),className:"text-blue-500 hover:text-blue-700 dark:text-blue-400 dark:hover:text-blue-300",title:"View on Peakd",children:t.jsx(z.ExternalLink,{size:16})}),t.jsxs("button",{onClick:()=>window.open(`https://hivehub.dev/proposals/${v.proposal_id}`,"_blank"),className:"flex text-green-500 hover:text-green-700 dark:text-green-400 dark:hover:text-green-300",title:"View Stats",children:[t.jsx(z.PieChart,{size:16})," Stats"]})]}),t.jsx("div",{className:"mb-2",children:t.jsxs("span",{className:`inline-block cursor-pointer px-2 py-1 rounded ${n==="dark"?"bg-gray-800 text-gray-300":"bg-gray-100 text-gray-700"}`,onClick:()=>r(v),children:["Vote value: ",v.vote_value_total?it(v.vote_value_total):0," HP"]})})]}),t.jsxs("div",{className:"mt-4 sm:mt-0 sm:ml-4 w-full sm:w-48 flex flex-col space-y-1",children:[t.jsxs("div",{className:"flex justify-between",children:[t.jsx("span",{className:`font-mono text-xs sm:text-sm ${n==="dark"?"text-gray-400":"text-gray-600"}`,children:"Daily Pay:"}),t.jsxs("strong",{className:`text-xs sm:text-sm ${n==="dark"?"text-gray-100":"text-gray-900"}`,children:[v.daily_pay_hbd?it(v.daily_pay_hbd):0," HBD"]})]}),t.jsxs("div",{className:"flex justify-between",children:[t.jsx("span",{className:`font-mono text-xs sm:text-sm ${n==="dark"?"text-gray-400":"text-gray-600"}`,children:"Remaining:"}),t.jsxs("strong",{className:`text-xs sm:text-sm ${n==="dark"?"text-gray-100":"text-gray-900"}`,children:[it(v.remaining_days||0)," Days"]})]}),t.jsxs("div",{className:"flex justify-between",children:[t.jsx("span",{className:`font-mono text-xs sm:text-sm ${n==="dark"?"text-gray-400":"text-gray-600"}`,children:"Paid:"}),t.jsxs("strong",{className:`text-xs sm:text-sm ${n==="dark"?"text-gray-100":"text-gray-900"}`,children:[it(v.total_hbd_received||0)," HBD"]})]}),t.jsxs("div",{className:"flex justify-between",children:[t.jsx("span",{className:`font-mono text-xs sm:text-sm ${n==="dark"?"text-gray-400":"text-gray-600"}`,children:"To Pay:"}),t.jsxs("strong",{className:`text-xs sm:text-sm ${n==="dark"?"text-gray-100":"text-gray-900"}`,children:[it(v.max_hbd_remaining||0)," HBD"]})]}),t.jsx("div",{className:"mt-2",children:t.jsx("button",{className:"px-3 sm:px-5 py-2 bg-green-600 hover:bg-green-700 text-white rounded cursor-pointer w-full text-xs sm:text-sm",onClick:()=>e(v),children:"Support"})})]})]})},v.proposal_id))]})]})})(),d!=="All"&&w.map(b=>t.jsx("div",{className:`border rounded-lg mb-4 p-2 sm:p-4 shadow ${n==="dark"?"border-gray-800 bg-slate-950":"border-gray-200 bg-white"}`,children:t.jsxs("div",{className:"flex flex-col sm:flex-row",children:[t.jsxs("div",{className:"flex-1",children:[t.jsxs("div",{className:"flex items-center mb-2",children:[t.jsx("span",{onClick:()=>a(b),className:"inline-block mr-2 cursor-pointer",children:t.jsx("img",{src:`https://images.hive.blog/u/${b.creator}/avatar`,className:"w-8 h-8 rounded-full inline",alt:`${b.creator} avatar`})}),t.jsx("span",{className:`font-bold cursor-pointer ${n==="dark"?"text-gray-100":"text-gray-900"}`,onClick:()=>s(b),children:b.creator}),t.jsxs("span",{className:`ml-2 ${n==="dark"?"text-gray-400":"text-gray-500"}`,children:["with receiver ",t.jsx("strong",{className:`${n==="dark"?"text-gray-100":"text-gray-900"}`,children:b.receiver})]})]}),t.jsxs("div",{className:`cursor-pointer text-lg font-semibold mb-1 ${n==="dark"?"text-gray-100":"text-gray-900"}`,onClick:()=>i(b),children:[b.subject," #",b.proposal_id]}),t.jsxs("div",{className:`text-sm mb-2 ${n==="dark"?"text-gray-400":"text-gray-500"}`,children:[t.jsx("span",{className:`inline-block px-2 py-1 rounded text-xs font-medium ${new Date(b.start_date+"Z")>new Date?"bg-yellow-100 text-yellow-800 dark:bg-yellow-900 dark:text-yellow-200":new Date(b.end_date+"Z")<new Date?"bg-red-100 text-red-800 dark:bg-red-900 dark:text-red-200":b.status==="active"?"bg-purple-100 text-purple-800 dark:bg-purple-900 dark:text-purple-200":"bg-gray-100 text-gray-800 dark:bg-gray-700 dark:text-gray-300"}`,children:new Date(b.start_date+"Z")>new Date?"upcoming":new Date(b.end_date+"Z")<new Date?"expired":b.status})," - "+new Date(b.start_date+"Z").toLocaleDateString()+" - "+new Date(b.end_date+"Z").toLocaleDateString()," ",t.jsx("span",{className:`text-xs ${n==="dark"?"text-gray-500":"text-gray-400"}`,children:Ci(b)})]}),t.jsxs("div",{className:"flex gap-2 mb-2",children:[t.jsx("button",{onClick:()=>window.open(`https://peakd.com/@${b.creator}/${b.permlink}`,"_blank"),className:"text-blue-500 hover:text-blue-700 dark:text-blue-400 dark:hover:text-blue-300",title:"View on Peakd",children:t.jsx(z.ExternalLink,{size:16})}),t.jsxs("button",{onClick:()=>window.open(`https://hivehub.dev/proposals/${b.proposal_id}`,"_blank"),className:"flex text-green-500 hover:text-green-700 dark:text-green-400 dark:hover:text-green-300",title:"View Stats",children:[t.jsx(z.PieChart,{size:16})," Stats"]})]}),t.jsx("div",{className:"mb-2",children:t.jsxs("span",{className:`inline-block cursor-pointer px-2 py-1 rounded ${n==="dark"?"bg-gray-800 text-gray-300":"bg-gray-100 text-gray-700"}`,onClick:()=>r(b),children:["Vote value: ",b.vote_value_total?it(b.vote_value_total):0," HP"]})})]}),t.jsxs("div",{className:"mt-4 sm:mt-0 sm:ml-4 w-full sm:w-48 flex flex-col space-y-1",children:[t.jsxs("div",{className:"flex justify-between",children:[t.jsx("span",{className:"font-mono text-gray-600 dark:text-gray-400 text-xs sm:text-sm",children:"Daily Pay:"}),t.jsxs("strong",{className:"text-gray-900 dark:text-gray-100 text-xs sm:text-sm",children:[b.daily_pay_hbd?it(b.daily_pay_hbd):0," HBD"]})]}),t.jsxs("div",{className:"flex justify-between",children:[t.jsx("span",{className:"font-mono text-gray-600 dark:text-gray-400 text-xs sm:text-sm",children:"Remaining:"}),t.jsxs("strong",{className:"text-gray-900 dark:text-gray-100 text-xs sm:text-sm",children:[it(b.remaining_days||0)," Days"]})]}),d!=="Expired"&&t.jsxs("div",{className:"flex justify-between",children:[t.jsx("span",{className:"font-mono text-gray-600 dark:text-gray-400 text-xs sm:text-sm",children:"Paid:"}),t.jsxs("strong",{className:"text-gray-900 dark:text-gray-100 text-xs sm:text-sm",children:[it(b.total_hbd_received||0)," HBD"]})]}),t.jsxs("div",{className:"flex justify-between",children:[t.jsx("span",{className:"font-mono text-gray-600 dark:text-gray-400 text-xs sm:text-sm",children:"To Pay:"}),t.jsxs("strong",{className:"text-gray-900 dark:text-gray-100 text-xs sm:text-sm",children:[it(b.max_hbd_remaining||0)," HBD"]})]}),t.jsx("div",{className:"mt-2",children:t.jsx("button",{className:"px-3 sm:px-5 py-2 bg-green-600 hover:bg-green-700 text-white rounded cursor-pointer w-full text-xs sm:text-sm",onClick:()=>e(b),children:"Support"})})]})]})},b.proposal_id))]})]})})};class Tp{HIVE_API_URL="https://api.hive.blog";async getProfile(r){const i={jsonrpc:"2.0",method:"bridge.get_profile",params:{account:r},id:1},s=await fetch(this.HIVE_API_URL,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(i)});if(!s.ok)throw new Error(`HTTP error! status: ${s.status}`);return await s.json()}async getFollowers(r){const i={jsonrpc:"2.0",method:"condenser_api.get_followers",params:[r,null,"blog"],id:1},s=await fetch(this.HIVE_API_URL,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(i)});if(!s.ok)throw new Error(`HTTP error! status: ${s.status}`);return(await s.json()).result}async getFollowing(r){const i={jsonrpc:"2.0",method:"condenser_api.get_following",params:[r,null,"blog"],id:1},s=await fetch(this.HIVE_API_URL,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(i)});if(!s.ok)throw new Error(`HTTP error! status: ${s.status}`);return(await s.json()).result}async getAccounts(r){const i={jsonrpc:"2.0",method:"condenser_api.get_accounts",params:[r],id:1},s=await fetch(this.HIVE_API_URL,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(i)});if(!s.ok)throw new Error(`HTTP error! status: ${s.status}`);return(await s.json()).result}async getDynamicGlobalProperties(){const r={jsonrpc:"2.0",method:"condenser_api.get_dynamic_global_properties",params:[],id:1},i=await fetch(this.HIVE_API_URL,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(r)});if(!i.ok)throw new Error(`HTTP error! status: ${i.status}`);return(await i.json()).result}async convertVestingSharesToHive(r){try{const i=await this.getDynamicGlobalProperties(),s=parseFloat(r.split(" ")[0]),a=parseFloat(i.total_vesting_shares.split(" ")[0]),n=parseFloat(i.total_vesting_fund_hive.split(" ")[0]);return(s*n/a).toFixed(3)}catch(i){return console.error("Error converting vesting shares:",i),"0"}}async getFeedHistory(){const r={jsonrpc:"2.0",method:"condenser_api.get_feed_history",params:[],id:1},i=await fetch(this.HIVE_API_URL,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(r)});if(!i.ok)throw new Error(`HTTP error! status: ${i.status}`);return(await i.json()).result}async getVoteValue(r,i=1e4){try{const s=await this.getAccounts([r]);if(s.length===0)throw new Error("Account not found!");const a=s[0],n=await this.getDynamicGlobalProperties(),u=await this.getFeedHistory(),c=parseFloat(a.vesting_shares)+parseFloat(a.received_vesting_shares)-parseFloat(a.delegated_vesting_shares)-parseFloat(a.vesting_withdraw_rate),d=Math.floor(Date.now()/1e3)-a.voting_manabar.last_update_time,f=c*1e6/4;let o=parseFloat(a.voting_manabar.current_mana.toString())+d*f/(300*60*24);o>f&&(o=f);const h=o*100/f,l=a.vesting_shares||"0 VESTS",p=parseFloat(l.toString().split(" ")[0]),x=n.total_vesting_shares||"0 VESTS",w=parseFloat(x.toString().split(" ")[0]),b=i/1e4,g=h*b/100,v=n.vote_power_reserve_rate*(300*60*24)/(3600*24),_=g*f/100,N=parseFloat(n.recent_claims||"0"),y=n.reward_balance||"0 HIVE",m=parseFloat(y.toString().split(" ")[0]),k=n.current_supply||"0 HIVE",j=parseFloat(k.toString().split(" ")[0]),E=n.current_sbd_supply||"0 HBD",D=parseFloat(E.toString().split(" ")[0]),C=m/N*(p/w)*(_/f)*j,P=u?.current_median_history;if(!P||!P.base)return"0.00";const $=parseFloat(P.base.toString().split(" ")[0]);return(C*$).toFixed(2)}catch(s){return console.error("Error calculating vote value:",s),"0.00"}}userAvatar(r){return`https://images.hive.blog/u/${r}/avatar`}}const be=new Tp,vc=({vestingShares:e})=>{const[r,i]=O.useState("...");return O.useEffect(()=>{(async()=>{try{const a=await be.convertVestingSharesToHive(e);i(a)}catch(a){console.error("Error calculating HP:",a);const n=parseFloat(e.split(" ")[0]);i((n/1e6).toFixed(3))}})()},[e]),t.jsxs("span",{className:"text-sm font-medium text-gray-900 dark:text-white",children:[r," HP"]})},Op=({username:e,onClickAuthor:r,onClickAddRemoveFromLists:i,onClickFollow:s})=>{const[a,n]=O.useState([]),[u,c]=O.useState([]),[d,f]=O.useState({}),[o,h]=O.useState(!0),[l,p]=O.useState(null),[x,w]=O.useState(null),b=O.useRef(null),g=async()=>{try{h(!0),p(null);const N=await be.getFollowers(e);if(n(N),N.length>0){const y=N.map(E=>E.follower),m=await be.getAccounts(y);c(m);const k={},j={};for(const E of N)try{const D=await be.getVoteValue(E.follower);j[E.follower]=D}catch(D){console.warn(`Failed to get voting data for ${E.follower}:`,D),k[E.follower]={upvotepower:"0",downvote:"0"},j[E.follower]="0.00"}f(j)}}catch(N){p(N instanceof Error?N.message:"Failed to load followers data")}finally{h(!1)}};O.useEffect(()=>{g()},[e]),O.useEffect(()=>{const N=y=>{b.current&&!b.current.contains(y.target)&&w(null)};return document.addEventListener("mousedown",N),()=>{document.removeEventListener("mousedown",N)}},[]);const v=N=>{const y=u.find(m=>m.name===N);if(!y)return null;try{return JSON.parse(y.posting_json_metadata)?.profile||{}}catch{return{}}},_=N=>{const y=new Date,m=new Date(N),k=y.getTime()-m.getTime(),j=Math.floor(k/(1e3*60*60*24));if(Math.floor(j/30)>=1)return m.toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"});const D=Math.floor(k/1e3),C=Math.floor(D/60),P=Math.floor(C/60),$=Math.floor(j/7),H=Math.floor(j/365);return H>0?`${H} year${H>1?"s":""} ago`:$>0?`${$} week${$>1?"s":""} ago`:j>0?`${j} day${j>1?"s":""} ago`:P>0?`${P} hour${P>1?"s":""} ago`:C>0?`${C} minute${C>1?"s":""} ago`:"Just now"};return o?t.jsx("div",{className:"flex items-center justify-center min-h-[400px]",children:t.jsxs("div",{className:"flex items-center gap-2 text-gray-500 dark:text-gray-400",children:[t.jsx(z.Loader2,{className:"w-5 h-5 animate-spin"}),"Loading followers..."]})}):l?t.jsx("div",{className:"flex flex-col items-center justify-center min-h-[400px] space-y-4",children:t.jsxs("div",{className:"text-center",children:[t.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-white mb-2",children:"Failed to load followers"}),t.jsx("p",{className:"text-gray-500 dark:text-gray-400 mb-4",children:l}),t.jsxs("button",{onClick:g,className:"m-2 inline-flex items-center justify-center rounded-md border border-input text-gray-400 cursor-pointer bg-background p-2 text-sm font-medium text-foreground shadow-sm transition-colors hover:bg-accent hover:text-accent-foreground disabled:opacity-50 disabled:pointer-events-none",children:[t.jsx(z.RefreshCw,{className:"w-4 h-4 mr-2"}),"Try Again"]})]})}):a.length===0?t.jsx("div",{className:"flex items-center justify-center min-h-[400px]",children:t.jsx("p",{className:"text-gray-500 dark:text-gray-400",children:"This user has no followers."})}):t.jsxs("div",{className:"space-y-6",children:[t.jsx("div",{className:"hidden md:block overflow-x-auto",children:t.jsxs("table",{className:"w-full border-collapse",children:[t.jsx("thead",{children:t.jsxs("tr",{className:"border-b border-gray-200 dark:border-gray-700",children:[t.jsx("th",{className:"text-left py-3 px-4 font-semibold text-gray-900 dark:text-white",children:"Avatar"}),t.jsx("th",{className:"text-left py-3 px-4 font-semibold text-gray-900 dark:text-white",children:"Username"}),t.jsx("th",{className:"text-left py-3 px-4 font-semibold text-gray-900 dark:text-white",children:"Last Post"}),t.jsx("th",{className:"text-left py-3 px-4 font-semibold text-gray-900 dark:text-white",children:"HP"}),t.jsx("th",{className:"text-left py-3 px-4 font-semibold text-gray-900 dark:text-white",children:"Vote Value"}),t.jsx("th",{className:"text-left py-3 px-4 font-semibold text-gray-900 dark:text-white",children:"Manage"})]})}),t.jsx("tbody",{children:a.map((N,y)=>{const m=u.find(j=>j.name===N.follower),k=v(N.follower);return t.jsxs("tr",{className:"border-b border-gray-100 dark:border-gray-800 hover:bg-gray-50 dark:hover:bg-gray-800/50",children:[t.jsx("td",{className:"py-4 px-4",children:t.jsx("img",{src:k?.profile_image||be.userAvatar(N.follower),alt:N.follower,className:"w-12 h-12 rounded-full object-cover cursor-pointer",onClick:()=>r&&r(N.follower),onError:j=>{j.target.src=`https://ui-avatars.com/api/?name=${N.follower}&background=random`}})}),t.jsxs("td",{className:"py-4 px-4",children:[t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsxs("span",{className:"font-semibold text-gray-900 dark:text-white cursor-pointer hover:text-blue-600 dark:hover:text-blue-400",onClick:()=>r&&r(N.follower),children:["@",N.follower]}),k?.location&&t.jsxs("div",{className:"relative group",children:[t.jsx(z.MapPin,{className:"w-4 h-4 text-gray-500 dark:text-gray-400"}),t.jsx("div",{className:"absolute bottom-full left-1/2 transform -translate-x-1/2 mb-2 px-2 py-1 bg-gray-900 text-white text-xs rounded opacity-0 group-hover:opacity-100 transition-opacity whitespace-nowrap z-10",children:k.location})]})]}),k?.about&&t.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400 mt-1 truncate max-w-xs",children:k.about})]}),t.jsx("td",{className:"py-4 px-4",children:m?.last_post&&m.last_post!=="1970-01-01T00:00:00"?t.jsx("span",{className:"text-sm text-gray-600 dark:text-gray-400",children:_(m.last_root_post)}):t.jsx("span",{className:"text-sm text-gray-400 dark:text-gray-500",children:"Never"})}),t.jsx("td",{className:"py-4 px-4",children:m?t.jsx(vc,{vestingShares:m.vesting_shares}):t.jsx("span",{className:"text-sm text-gray-400 dark:text-gray-500",children:"-"})}),t.jsx("td",{className:"py-4 px-4",children:d[N.follower]?t.jsxs("span",{className:"text-sm text-gray-600 dark:text-gray-400",children:["$",d[N.follower]]}):t.jsx("span",{className:"text-sm text-gray-400 dark:text-gray-500",children:"-"})}),t.jsx("td",{className:"py-4 px-4",children:t.jsxs("div",{className:"relative",ref:x===N.follower?b:null,children:[t.jsx("button",{onClick:()=>w(x===N.follower?null:N.follower),className:"p-2 rounded-lg hover:bg-gray-100 dark:hover:bg-gray-700 transition-colors",children:t.jsx(z.MoreVertical,{className:"w-4 h-4 text-gray-600 dark:text-gray-400"})}),x===N.follower&&t.jsxs("div",{className:"absolute right-0 mt-2 w-48 bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg shadow-lg z-10",children:[t.jsxs("button",{onClick:()=>{i&&i(N.follower),w(null)},className:"w-full text-left px-4 py-2 text-sm text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-700 flex items-center gap-2",children:[t.jsx(z.UserPlus,{className:"w-4 h-4"}),"Add/remove from lists"]}),t.jsxs("button",{onClick:()=>{s&&s(N.follower),w(null)},className:"w-full text-left px-4 py-2 text-sm text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-700 flex items-center gap-2",children:[t.jsx(z.UserMinus,{className:"w-4 h-4"}),"Follow"]})]})]})})]},`${N.follower}-${y}`)})})]})}),t.jsx("div",{className:"md:hidden space-y-4",children:a.map((N,y)=>{const m=u.find(j=>j.name===N.follower),k=v(N.follower);return t.jsx("div",{className:"bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-xl p-4",children:t.jsxs("div",{className:"flex items-start gap-3",children:[t.jsx("img",{src:k?.profile_image||be.userAvatar(N.follower),alt:N.follower,className:"w-10 h-10 rounded-full object-cover cursor-pointer flex-shrink-0",onClick:()=>r&&r(N.follower),onError:j=>{j.target.src=`https://ui-avatars.com/api/?name=${N.follower}&background=random`}}),t.jsxs("div",{className:"flex-1 min-w-0",children:[t.jsxs("div",{className:"flex items-center justify-between mb-1",children:[t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsxs("span",{className:"font-semibold text-gray-900 dark:text-white cursor-pointer hover:text-blue-600 dark:hover:text-blue-400 text-sm",onClick:()=>r&&r(N.follower),children:["@",N.follower]}),k?.location&&t.jsxs("div",{className:"relative group",children:[t.jsx(z.MapPin,{className:"w-3 h-3 text-gray-500 dark:text-gray-400"}),t.jsx("div",{className:"absolute bottom-full left-1/2 transform -translate-x-1/2 mb-2 px-2 py-1 bg-gray-900 text-white text-xs rounded opacity-0 group-hover:opacity-100 transition-opacity whitespace-nowrap z-10",children:k.location})]})]}),t.jsx("div",{className:"text-xs text-gray-600 dark:text-gray-400",children:m?.last_post&&m.last_post!=="1970-01-01T00:00:00"?_(m.last_root_post):t.jsx("span",{className:"text-gray-400 dark:text-gray-500",children:"Never"})})]}),t.jsxs("div",{className:"flex items-center justify-between mt-2",children:[t.jsx("div",{className:"flex items-center gap-4",children:m&&t.jsx("div",{className:"text-xs text-gray-600 dark:text-gray-400",children:t.jsx(vc,{vestingShares:m.vesting_shares})})}),t.jsxs("div",{className:"relative",ref:x===N.follower?b:null,children:[t.jsx("button",{onClick:()=>w(x===N.follower?null:N.follower),className:"p-1 rounded-lg hover:bg-gray-100 dark:hover:bg-gray-700 transition-colors",children:t.jsx(z.MoreVertical,{className:"w-3 h-3 text-gray-600 dark:text-gray-400"})}),x===N.follower&&t.jsxs("div",{className:"absolute right-0 mt-1 w-40 bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg shadow-lg z-10",children:[t.jsxs("button",{onClick:()=>{i&&i(N.follower),w(null)},className:"w-full text-left px-3 py-2 text-xs text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-700 flex items-center gap-2",children:[t.jsx(z.UserPlus,{className:"w-3 h-3"}),"Add/remove from lists"]}),t.jsxs("button",{onClick:()=>{s&&s(N.follower),w(null)},className:"w-full text-left px-3 py-2 text-xs text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-700 flex items-center gap-2",children:[t.jsx(z.UserMinus,{className:"w-3 h-3"}),"Follow"]})]})]})]})]})]})},`${N.follower}-${y}`)})})]})},wc=({vestingShares:e})=>{const[r,i]=O.useState("...");return O.useEffect(()=>{(async()=>{try{const a=await be.convertVestingSharesToHive(e);i(a)}catch(a){console.error("Error calculating HP:",a);const n=parseFloat(e.split(" ")[0]);i((n/1e6).toFixed(3))}})()},[e]),t.jsxs("span",{className:"text-sm font-medium text-gray-900 dark:text-white",children:[r," HP"]})},Pp=({username:e,onClickAuthor:r,onClickAddRemoveFromLists:i,onClickUnfollow:s})=>{const[a,n]=O.useState([]),[u,c]=O.useState([]),[d,f]=O.useState({}),[o,h]=O.useState(!0),[l,p]=O.useState(null),[x,w]=O.useState(null),b=O.useRef(null),g=async()=>{try{h(!0),p(null);const N=await be.getFollowing(e);if(n(N),N.length>0){const y=N.map(j=>j.following),m=await be.getAccounts(y);c(m);const k={};for(const j of N)try{const E=await be.getVoteValue(j.following);k[j.following]=E}catch(E){console.warn(`Failed to get voting data for ${j.following}:`,E),k[j.following]="0.00"}f(k)}}catch(N){p(N instanceof Error?N.message:"Failed to load following data")}finally{h(!1)}};O.useEffect(()=>{g()},[e]),O.useEffect(()=>{const N=y=>{b.current&&!b.current.contains(y.target)&&w(null)};return document.addEventListener("mousedown",N),()=>{document.removeEventListener("mousedown",N)}},[]);const v=N=>{const y=u.find(m=>m.name===N);if(!y)return null;try{return JSON.parse(y.posting_json_metadata)?.profile||{}}catch{return{}}},_=N=>{const y=new Date,m=new Date(N),k=y.getTime()-m.getTime(),j=Math.floor(k/(1e3*60*60*24));if(Math.floor(j/30)>=1)return m.toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"});const D=Math.floor(k/1e3),C=Math.floor(D/60),P=Math.floor(C/60),$=Math.floor(j/7),H=Math.floor(j/365);return H>0?`${H} year${H>1?"s":""} ago`:$>0?`${$} week${$>1?"s":""} ago`:j>0?`${j} day${j>1?"s":""} ago`:P>0?`${P} hour${P>1?"s":""} ago`:C>0?`${C} minute${C>1?"s":""} ago`:"Just now"};return o?t.jsx("div",{className:"flex items-center justify-center min-h-[400px]",children:t.jsxs("div",{className:"flex items-center gap-2 text-gray-500 dark:text-gray-400",children:[t.jsx(z.Loader2,{className:"w-5 h-5 animate-spin"}),"Loading following..."]})}):l?t.jsx("div",{className:"flex flex-col items-center justify-center min-h-[400px] space-y-4",children:t.jsxs("div",{className:"text-center",children:[t.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-white mb-2",children:"Failed to load following"}),t.jsx("p",{className:"text-gray-500 dark:text-gray-400 mb-4",children:l}),t.jsxs("button",{onClick:g,className:"m-2 inline-flex items-center justify-center rounded-md border border-input text-gray-400 cursor-pointer bg-background p-2 text-sm font-medium text-foreground shadow-sm transition-colors hover:bg-accent hover:text-accent-foreground disabled:opacity-50 disabled:pointer-events-none",children:[t.jsx(z.RefreshCw,{className:"w-4 h-4 mr-2"}),"Try Again"]})]})}):a.length===0?t.jsx("div",{className:"flex items-center justify-center min-h-[400px]",children:t.jsx("p",{className:"text-gray-500 dark:text-gray-400",children:"This user is not following anyone."})}):t.jsxs("div",{className:"space-y-6",children:[t.jsx("div",{className:"hidden md:block overflow-x-auto",children:t.jsxs("table",{className:"w-full border-collapse",children:[t.jsx("thead",{children:t.jsxs("tr",{className:"border-b border-gray-200 dark:border-gray-700",children:[t.jsx("th",{className:"text-left py-3 px-4 font-semibold text-gray-900 dark:text-white",children:"Avatar"}),t.jsx("th",{className:"text-left py-3 px-4 font-semibold text-gray-900 dark:text-white",children:"Username"}),t.jsx("th",{className:"text-left py-3 px-4 font-semibold text-gray-900 dark:text-white",children:"Last Post"}),t.jsx("th",{className:"text-left py-3 px-4 font-semibold text-gray-900 dark:text-white",children:"HP"}),t.jsx("th",{className:"text-left py-3 px-4 font-semibold text-gray-900 dark:text-white",children:"Vote Value"}),t.jsx("th",{className:"text-left py-3 px-4 font-semibold text-gray-900 dark:text-white",children:"Manage"})]})}),t.jsx("tbody",{children:a.map((N,y)=>{const m=u.find(j=>j.name===N.following),k=v(N.following);return t.jsxs("tr",{className:"border-b border-gray-100 dark:border-gray-800 hover:bg-gray-50 dark:hover:bg-gray-800/50",children:[t.jsx("td",{className:"py-4 px-4",children:t.jsx("img",{src:k?.profile_image||be.userAvatar(N.following),alt:N.following,className:"w-12 h-12 rounded-full object-cover cursor-pointer",onClick:()=>r&&r(N.following),onError:j=>{j.target.src=`https://ui-avatars.com/api/?name=${N.following}&background=random`}})}),t.jsxs("td",{className:"py-4 px-4",children:[t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsxs("span",{className:"font-semibold text-gray-900 dark:text-white cursor-pointer hover:text-blue-600 dark:hover:text-blue-400",onClick:()=>r&&r(N.following),children:["@",N.following]}),k?.location&&t.jsxs("div",{className:"relative group",children:[t.jsx(z.MapPin,{className:"w-4 h-4 text-gray-500 dark:text-gray-400"}),t.jsx("div",{className:"absolute bottom-full left-1/2 transform -translate-x-1/2 mb-2 px-2 py-1 bg-gray-900 text-white text-xs rounded opacity-0 group-hover:opacity-100 transition-opacity whitespace-nowrap z-10",children:k.location})]})]}),k?.about&&t.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400 mt-1 truncate max-w-xs",children:k.about})]}),t.jsx("td",{className:"py-4 px-4",children:m?.last_post&&m.last_post!=="1970-01-01T00:00:00"?t.jsx("span",{className:"text-sm text-gray-600 dark:text-gray-400",children:_(m.last_root_post)}):t.jsx("span",{className:"text-sm text-gray-400 dark:text-gray-500",children:"Never"})}),t.jsx("td",{className:"py-4 px-4",children:m?t.jsx(wc,{vestingShares:m.vesting_shares}):t.jsx("span",{className:"text-sm text-gray-400 dark:text-gray-500",children:"-"})}),t.jsx("td",{className:"py-4 px-4",children:d[N.following]?t.jsxs("span",{className:"text-sm text-gray-600 dark:text-gray-400",children:["$",d[N.following]]}):t.jsx("span",{className:"text-sm text-gray-400 dark:text-gray-500",children:"-"})}),t.jsx("td",{className:"py-4 px-4",children:t.jsxs("div",{className:"relative",ref:x===N.following?b:null,children:[t.jsx("button",{onClick:()=>w(x===N.following?null:N.following),className:"p-2 rounded-lg hover:bg-gray-100 dark:hover:bg-gray-700 transition-colors",children:t.jsx(z.MoreVertical,{className:"w-4 h-4 text-gray-600 dark:text-gray-400"})}),x===N.following&&t.jsxs("div",{className:"absolute right-0 mt-2 w-48 bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg shadow-lg z-10",children:[t.jsxs("button",{onClick:()=>{i&&i(N.following),w(null)},className:"w-full text-left px-4 py-2 text-sm text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-700 flex items-center gap-2",children:[t.jsx(z.UserPlus,{className:"w-4 h-4"}),"Add/remove from lists"]}),t.jsxs("button",{onClick:()=>{s&&s(N.following),w(null)},className:"w-full text-left px-4 py-2 text-sm text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-700 flex items-center gap-2",children:[t.jsx(z.UserMinus,{className:"w-4 h-4"}),"Unfollow"]})]})]})})]},`${N.following}-${y}`)})})]})}),t.jsx("div",{className:"md:hidden space-y-4",children:a.map((N,y)=>{const m=u.find(j=>j.name===N.following),k=v(N.following);return t.jsx("div",{className:"bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-xl p-4",children:t.jsxs("div",{className:"flex items-start gap-3",children:[t.jsx("img",{src:k?.profile_image||be.userAvatar(N.following),alt:N.following,className:"w-10 h-10 rounded-full object-cover cursor-pointer flex-shrink-0",onClick:()=>r&&r(N.following),onError:j=>{j.target.src=`https://ui-avatars.com/api/?name=${N.following}&background=random`}}),t.jsxs("div",{className:"flex-1 min-w-0",children:[t.jsxs("div",{className:"flex items-center justify-between mb-1",children:[t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsxs("span",{className:"font-semibold text-gray-900 dark:text-white cursor-pointer hover:text-blue-600 dark:hover:text-blue-400 text-sm",onClick:()=>r&&r(N.following),children:["@",N.following]}),k?.location&&t.jsxs("div",{className:"relative group",children:[t.jsx(z.MapPin,{className:"w-3 h-3 text-gray-500 dark:text-gray-400"}),t.jsx("div",{className:"absolute bottom-full left-1/2 transform -translate-x-1/2 mb-2 px-2 py-1 bg-gray-900 text-white text-xs rounded opacity-0 group-hover:opacity-100 transition-opacity whitespace-nowrap z-10",children:k.location})]})]}),t.jsx("div",{className:"text-xs text-gray-600 dark:text-gray-400",children:m?.last_post&&m.last_post!=="1970-01-01T00:00:00"?_(m.last_root_post):t.jsx("span",{className:"text-gray-400 dark:text-gray-500",children:"Never"})})]}),t.jsxs("div",{className:"flex items-center justify-between mt-2",children:[t.jsx("div",{className:"flex items-center gap-4",children:m&&t.jsx("div",{className:"text-xs text-gray-600 dark:text-gray-400",children:t.jsx(wc,{vestingShares:m.vesting_shares})})}),t.jsxs("div",{className:"relative",ref:x===N.following?b:null,children:[t.jsx("button",{onClick:()=>w(x===N.following?null:N.following),className:"p-1 rounded-lg hover:bg-gray-100 dark:hover:bg-gray-700 transition-colors",children:t.jsx(z.MoreVertical,{className:"w-3 h-3 text-gray-600 dark:text-gray-400"})}),x===N.following&&t.jsxs("div",{className:"absolute right-0 mt-1 w-40 bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg shadow-lg z-10",children:[t.jsxs("button",{onClick:()=>{i&&i(N.following),w(null)},className:"w-full text-left px-3 py-2 text-xs text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-700 flex items-center gap-2",children:[t.jsx(z.UserPlus,{className:"w-3 h-3"}),"Add/remove from lists"]}),t.jsxs("button",{onClick:()=>{s&&s(N.following),w(null)},className:"w-full text-left px-3 py-2 text-xs text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-700 flex items-center gap-2",children:[t.jsx(z.UserMinus,{className:"w-3 h-3"}),"Unfollow"]})]})]})]})]})]})},`${N.following}-${y}`)})})]})},_c=new oa.Client(["https://api.hive.blog","https://api.syncad.com","https://api.deathwing.me"]);class $p{async getAccountHistory(r,i=-1,s=1e3,a,n){try{const u=[r,i,s];return a!==void 0&&n!==void 0&&u.push(a,n),(await _c.call("condenser_api","get_account_history",u)).map(([d,f])=>({index:d,block:f.block,op:{type:f.op[0],value:f.op[1]},op_in_trx:f.op_in_trx,timestamp:f.timestamp,trx_id:f.trx_id,trx_in_block:f.trx_in_block,virtual_op:f.virtual_op}))}catch(u){return console.error("Error fetching account history:",u),[]}}async getNextAccountHistoryPage(r,i,s=1e3){try{const a=i-1;return(await _c.call("condenser_api","get_account_history",[r,a,s])).map(([c,d])=>({index:c,block:d.block,op:{type:d.op[0],value:d.op[1]},op_in_trx:d.op_in_trx,timestamp:d.timestamp,trx_id:d.trx_id,trx_in_block:d.trx_in_block,virtual_op:d.virtual_op})).filter(c=>c.index<i)}catch(a){return console.error("Error fetching next page of account history:",a),[]}}convertToActivityListItems(r,i){return r.filter(s=>{const a=s.op.type;return a!=="effective_comment_vote"&&a!=="witness_set_properties"&&a!=="producer_reward"&&a!=="comment_reward"&&a!=="comment_payout_update"&&a!=="claim_reward_balance"&&a!=="transfer"&&a!=="claim_account"&&a!=="transfer_to_vesting"&&a!=="transfer_to_vesting_completed"}).map(s=>{const a=this.parseOperation(s,i);return{id:`${s.index}-${s.trx_id}`,type:a.type,direction:a.direction,timestamp:s.timestamp,block:s.block,description:a.description,details:s.op.value,index:s.index,...a.extraFields}}).filter(s=>s!==null)}parseOperation(r,i){const{op:s}=r,a=s.type,n=s.value;switch(a){case"vote":return this.parseVoteOperation(n,i);case"comment":return this.parseCommentOperation(n,i);case"custom_json":return this.parseCustomJsonOperation(n,i);case"comment_options":return this.parseCommentOptionsOperation(n,i);case"effective_comment_vote":return this.parseEffectiveCommentVoteOperation(n,i);case"curation_reward":return this.parseCurationRewardOperation(n,i);case"author_reward":return this.parseAuthorRewardOperation(n,i);case"comment_benefactor_reward":return this.parseCommentBenefactorRewardOperation(n,i);default:return{type:"other",direction:"out",description:`${a} operation`,extraFields:{}}}}parseVoteOperation(r,i){const{voter:s,author:a,permlink:n,weight:u}=r,c=a===i,d=c?"in":"out",f=(u/100).toFixed(0);let o="";return c?o=`${s} voted ${a}/${n} with ${f}%`:o=`Voted ${a}/${n} with ${f}%`,{type:"vote",direction:d,description:o,extraFields:{voter:s,author:a,permlink:n,weight:parseInt(f)}}}parseCommentOperation(r,i){const{author:s,parent_author:a,parent_permlink:n,permlink:u}=r,d=a===i?"in":"out",o=`Commented on ${n} by ${a||s}.`;return{type:"comment",direction:d,description:o,extraFields:{author:s,permlink:u,parent_author:a,parent_permlink:n}}}parseCustomJsonOperation(r,i){const{id:s,json:a,required_auths:n,required_posting_auths:u}=r;let c={};try{c=JSON.parse(a)}catch{}let d="Custom Json";if(s==="follow"){const[f,o]=c;f==="follow"&&(d="Custom Json")}return{type:"custom_json",direction:"out",description:d,extraFields:{}}}parseCommentOptionsOperation(r,i){const{author:s,permlink:a,max_accepted_payout:n}=r;return{type:"comment_options",direction:"out",description:"Comment Payout Update",extraFields:{author:s,permlink:a,payout:n}}}parseEffectiveCommentVoteOperation(r,i){const{voter:s,author:a,permlink:n,pending_payout:u}=r,c=a===i,d=c?"in":"out",f=c?`${s} voted on ${a}/${n} (effective vote)`:`Effective vote on ${a}/${n}`;return{type:"effective_comment_vote",direction:d,description:f,extraFields:{voter:s,author:a,permlink:n,payout:u}}}parseCurationRewardOperation(r,i){const{author:s,curator:a,permlink:n,reward:u}=r,d=a===i?"in":"out",h=`${(parseFloat(u.split(" ")[0])*1e-6).toFixed(3)} HP`,l=`Curation reward for ${a}/${n} by ${s}`;return{type:"curation_reward",direction:d,description:l,extraFields:{author:s,curator:a,permlink:n,reward:h}}}parseAuthorRewardOperation(r,i){const{author:s,permlink:a,hbd_payout:n,hive_payout:u,vesting_payout:c}=r,f=s===i?"in":"out",h=(parseFloat(c.split(" ")[0])*1e-6).toFixed(3),l=n.split(" ")[0],p=u.split(" ")[0],x=`Author reward: ${l} HBD, ${p} HIVE, ${h} HP for ${a}`;return{type:"author_reward",direction:f,description:x,extraFields:{author:s,permlink:a,hbd_payout:n,hive_payout:u,vesting_payout:c}}}parseCommentBenefactorRewardOperation(r,i){const{author:s,benefactor:a,permlink:n,hbd_payout:u,hive_payout:c,vesting_payout:d}=r,o=a===i?"in":"out",l=(parseFloat(d.split(" ")[0])*1e-6).toFixed(3),p=u.split(" ")[0],x=c.split(" ")[0],w=`Benefactor reward on ${n} by ${s}: ${p} HBD, ${x} HIVE, ${l} HP`;return{type:"comment_benefactor_reward",direction:o,description:w,extraFields:{author:s,benefactor:a,permlink:n,hbd_payout:u,hive_payout:c,vesting_payout:d}}}filterByDirection(r,i){return i==="all"?r:r.filter(s=>s.direction===i)}filterByGeneralType(r,i){if(i==="all")return r;switch(i){case"votes":return r.filter(s=>s.type==="vote"||s.type==="effective_comment_vote");case"comments":return r.filter(s=>s.type==="comment");case"replies":return r.filter(s=>s.type==="comment"&&s.direction==="in");case"others":return r.filter(s=>s.type==="custom_json"||s.type==="comment_options"||s.type==="other");default:return r}}filterByRewardType(r,i){if(i==="all")return r;switch(i){case"author":return r.filter(s=>s.type==="effective_comment_vote"&&s.direction==="in");case"curation":return r.filter(s=>s.type==="effective_comment_vote"&&s.direction==="out");case"benefactor":return r.filter(s=>s.type==="comment_options"&&s.details?.beneficiaries);default:return r}}searchActivities(r,i){if(!i.trim())return r;const s=i.toLowerCase();return r.filter(a=>a.description.toLowerCase().includes(s)||a.author?.toLowerCase().includes(s)||a.permlink?.toLowerCase().includes(s)||a.voter?.toLowerCase().includes(s))}getRelativeTime(r){try{const i=new Date(r),a=new Date().getTime()-i.getTime(),n=Math.floor(a/1e3),u=Math.floor(n/60),c=Math.floor(u/60),d=Math.floor(c/24);return n<60?`${n} seconds ago`:u<60?`${u} minutes ago`:c<24?`${c} hours ago`:d<7?`${d} days ago`:i.toLocaleDateString()}catch(i){return console.error("Error calculating relative time:",i),r}}}const ra=new $p,Lp=({username:e,directionFilter:r="all",generalFilter:i="all",rewardFilter:s="all",searchTerm:a="",limit:n=1e3,className:u,onClickPermlink:c,onSelectActivity:d})=>{const[f,o]=O.useState(a),[h,l]=O.useState(r),[p,x]=O.useState(i),[w,b]=O.useState(s),[g,v]=O.useState([]),[_,N]=O.useState([]),[y,m]=O.useState(!1),[k,j]=O.useState(null),[E,D]=O.useState(new Set),[C,P]=O.useState(null),[$,H]=O.useState(!0),[F,B]=O.useState(!1),[L,G]=O.useState(-1),X=O.useRef(null),ee=async(V=!1)=>{if(e){V?B(!0):(m(!0),H(!0),G(-1)),j(null);try{let J;V?J=await ra.getNextAccountHistoryPage(e,L,n):J=await ra.getAccountHistory(e,-1,n);const oe=ra.convertToActivityListItems(J,e);if(oe.sort((K,te)=>new Date(te.timestamp).getTime()-new Date(K.timestamp).getTime()),v(V?K=>[...K,...oe]:oe),J.length>0){const K=Math.min(...J.map(te=>te.index));G(K)}oe.length===0&&H(!1)}catch(J){j("Failed to load activity history"),console.error("Error loading activities:",J),H(!1)}finally{m(!1),B(!1)}}};O.useEffect(()=>{ee()},[e,n]);const R=O.useCallback(()=>{$&&!y&&!F&&ee(!0)},[$,y,F]);O.useEffect(()=>{let V=g;h!=="all"?V=V.filter(J=>J.direction===h):V=V.filter(J=>J.type!=="custom_json"&&J.type!=="comment_options"),p!=="all"&&(p==="votes"?V=V.filter(J=>J.type==="vote"||J.type==="effective_comment_vote"):p==="comments"?V=V.filter(J=>J.type==="comment"):p==="replies"?V=V.filter(J=>J.type==="comment"&&J.direction==="in"):p==="curation"?V=V.filter(J=>J.type==="curation_reward"):p==="others"&&(V=g.filter(J=>J.type==="custom_json"||J.type==="comment_options"))),w!=="all"&&(w==="author"?V=V.filter(J=>J.type==="effective_comment_vote"&&J.direction==="in"):w==="curation"?V=V.filter(J=>J.type==="effective_comment_vote"&&J.direction==="out"):w==="benefactor"&&(V=V.filter(J=>J.type==="comment_options"))),f&&(V=V.filter(J=>J.description.toLowerCase().includes(f.toLowerCase())||J.author?.toLowerCase().includes(f.toLowerCase())||J.permlink?.toLowerCase().includes(f.toLowerCase()))),N(V)},[g,h,p,w,f]),O.useEffect(()=>{const V=J=>{X.current&&!X.current.contains(J.target)&&P(null)};return document.addEventListener("mousedown",V),()=>{document.removeEventListener("mousedown",V)}},[]);const se=V=>{switch(V.type){case"vote":case"effective_comment_vote":return t.jsx(z.Wallet,{className:"h-4 w-4"});case"comment":return t.jsx(z.MessageCircle,{className:"h-4 w-4"});case"custom_json":return t.jsx(z.FileText,{className:"h-4 w-4"});case"curation_reward":return t.jsx(z.Wallet,{className:"h-4 w-4"});case"author_reward":return t.jsx(z.DollarSign,{className:"h-4 w-4"});case"comment_benefactor_reward":return t.jsx(z.User,{className:"h-4 w-4"});default:return t.jsx(z.Eye,{className:"h-4 w-4"})}},I=(V,J)=>V.split(/(\s+)/).map((K,te)=>{if(K.includes("/")){const[pe,Ee]=K.split("/");if(pe&&Ee)return t.jsx("span",{className:"text-blue-500 cursor-pointer hover:underline",onClick:Z=>{Z.stopPropagation(),console.log("Clicked permlink:",pe,Ee),c?.(pe,Ee)},children:K},te)}return t.jsx("span",{children:K},te)});return y?t.jsxs("div",{className:"space-y-6",children:[t.jsxs("div",{className:"bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg p-4",children:[t.jsxs("div",{className:"flex flex-col lg:flex-row gap-4 items-start lg:items-center justify-between",children:[t.jsx("div",{className:"flex-1 max-w-md",children:t.jsxs("div",{className:"relative",children:[t.jsx("div",{className:"absolute left-3 top-1/2 transform -translate-y-1/2 h-4 w-4 bg-gray-200 dark:bg-gray-700 rounded animate-pulse"}),t.jsx("div",{className:"w-full h-10 bg-gray-200 dark:bg-gray-700 rounded-md animate-pulse"})]})}),t.jsx("div",{className:"flex flex-wrap gap-2",children:Array.from({length:5}).map((V,J)=>t.jsx("div",{className:"w-24 h-10 bg-gray-200 dark:bg-gray-700 rounded-md animate-pulse"},J))})]}),t.jsx("div",{className:"flex flex-wrap gap-4 mt-4 pt-4 border-t border-gray-200 dark:border-gray-700",children:Array.from({length:4}).map((V,J)=>t.jsx("div",{className:"h-4 bg-gray-200 dark:bg-gray-700 rounded animate-pulse w-20"},J))})]}),t.jsx("div",{className:"space-y-4",children:Array.from({length:5}).map((V,J)=>t.jsxs("div",{className:"flex items-center justify-between py-3 px-4 bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg",children:[t.jsxs("div",{className:"flex items-center gap-3 flex-1 min-w-0",children:[t.jsx("div",{className:"w-8 h-8 bg-gray-200 dark:bg-gray-700 rounded-full animate-pulse flex-shrink-0"}),t.jsx("div",{className:"flex-1 min-w-0 space-y-2",children:t.jsx("div",{className:"h-4 bg-gray-200 dark:bg-gray-700 rounded animate-pulse w-3/4"})})]}),t.jsxs("div",{className:"flex items-center gap-1 flex-shrink-0 ml-4",children:[t.jsx("div",{className:"w-3 h-3 bg-gray-200 dark:bg-gray-700 rounded animate-pulse"}),t.jsx("div",{className:"h-4 bg-gray-200 dark:bg-gray-700 rounded animate-pulse w-16"})]})]},J))})]}):k?t.jsx("div",{className:"flex flex-col items-center justify-center min-h-[400px] space-y-4",children:t.jsxs("div",{className:"text-center",children:[t.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-white mb-2",children:"Failed to load activities"}),t.jsx("p",{className:"text-gray-500 dark:text-gray-400 mb-4",children:k}),t.jsxs("button",{onClick:()=>ee(),className:"inline-flex items-center justify-center rounded-md border border-input text-gray-400 cursor-pointer bg-background p-2 text-sm font-medium text-foreground shadow-sm transition-colors hover:bg-accent hover:text-accent-foreground disabled:opacity-50 disabled:pointer-events-none",children:[t.jsx(z.RefreshCw,{className:"w-4 h-4 mr-2"}),"Try Again"]})]})}):t.jsxs("div",{className:"space-y-6",children:[t.jsxs("div",{className:"bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg p-4",children:[t.jsxs("div",{className:"flex flex-col lg:flex-row gap-4 items-start lg:items-center justify-between",children:[t.jsx("div",{className:"flex-1 max-w-md",children:t.jsxs("div",{className:"relative",children:[t.jsx(z.Search,{className:"absolute left-3 top-1/2 transform -translate-y-1/2 h-4 w-4 text-gray-400"}),t.jsx("input",{type:"text",placeholder:"Search activities...",value:f,onChange:V=>o(V.target.value),className:"w-full pl-10 pr-3 py-2 bg-gray-50 dark:bg-gray-900 border border-gray-200 dark:border-gray-700 rounded-md text-gray-900 dark:text-gray-100 placeholder-gray-500 dark:placeholder-gray-400 focus:outline-none focus:ring-2 focus:ring-blue-500"})]})}),t.jsxs("div",{className:"flex flex-wrap gap-2",children:[t.jsxs("select",{value:h,onChange:V=>l(V.target.value),className:"px-3 py-2 bg-gray-50 dark:bg-gray-900 border border-gray-200 dark:border-gray-700 rounded-md text-gray-900 dark:text-gray-100 focus:outline-none focus:ring-2 focus:ring-blue-500 text-sm",children:[t.jsx("option",{value:"all",children:"All Directions"}),t.jsx("option",{value:"in",children:"Incoming"}),t.jsx("option",{value:"out",children:"Outgoing"})]}),t.jsxs("select",{value:p,onChange:V=>x(V.target.value),className:"px-3 py-2 bg-gray-50 dark:bg-gray-900 border border-gray-200 dark:border-gray-700 rounded-md text-gray-900 dark:text-gray-100 focus:outline-none focus:ring-2 focus:ring-blue-500 text-sm",children:[t.jsx("option",{value:"all",children:"All Types"}),t.jsx("option",{value:"votes",children:"Votes"}),t.jsx("option",{value:"comments",children:"Comments"}),t.jsx("option",{value:"replies",children:"Replies"}),t.jsx("option",{value:"curation",children:"Curation"}),t.jsx("option",{value:"others",children:"Others"})]}),t.jsxs("select",{value:w,onChange:V=>b(V.target.value),className:"px-3 py-2 bg-gray-50 dark:bg-gray-900 border border-gray-200 dark:border-gray-700 rounded-md text-gray-900 dark:text-gray-100 focus:outline-none focus:ring-2 focus:ring-blue-500 text-sm",children:[t.jsx("option",{value:"all",children:"All Rewards"}),t.jsx("option",{value:"author",children:"Author"}),t.jsx("option",{value:"curation",children:"Curation"}),t.jsx("option",{value:"benefactor",children:"Benefactor"})]}),t.jsx("button",{onClick:()=>ee(),disabled:y||F,className:"px-3 py-2 bg-gray-50 dark:bg-gray-900 border border-gray-200 dark:border-gray-700 rounded-md hover:bg-gray-100 dark:hover:bg-gray-800 text-gray-700 dark:text-gray-300 focus:outline-none focus:ring-2 focus:ring-blue-500 disabled:opacity-50 disabled:cursor-not-allowed",children:t.jsx(z.RefreshCw,{className:"h-4 w-4"})})]})]}),t.jsxs("div",{className:"flex flex-wrap gap-4 mt-4 pt-4 border-t border-gray-200 dark:border-gray-700",children:[t.jsxs("div",{className:"text-sm text-gray-600 dark:text-gray-400",children:["Total: ",t.jsx("span",{className:"font-semibold text-gray-900 dark:text-white",children:g.length})]}),t.jsxs("div",{className:"text-sm text-gray-600 dark:text-gray-400",children:["Filtered: ",t.jsx("span",{className:"font-semibold text-gray-900 dark:text-white",children:_.length})]}),t.jsxs("div",{className:"text-sm text-gray-600 dark:text-gray-400",children:["Incoming: ",t.jsx("span",{className:"font-semibold text-green-600 dark:text-green-400",children:g.filter(V=>V.direction==="in").length})]}),t.jsxs("div",{className:"text-sm text-gray-600 dark:text-gray-400",children:["Outgoing: ",t.jsx("span",{className:"font-semibold text-blue-600 dark:text-blue-400",children:g.filter(V=>V.direction==="out").length})]})]})]}),t.jsx("div",{className:"space-y-4",children:_.length===0?t.jsx("div",{className:"flex items-center justify-center min-h-[200px]",children:t.jsx("p",{className:"text-gray-500 dark:text-gray-400",children:g.length===0?"No activities found for this user.":"No activities match the current filters."})}):t.jsxs(t.Fragment,{children:[_.map((V,J)=>t.jsxs("div",{className:"flex items-center justify-between py-3 px-4 bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg hover:bg-gray-50 dark:hover:bg-gray-800/50 transition-colors cursor-pointer",onClick:oe=>{d?.(V)},children:[t.jsxs("div",{className:"flex items-center gap-3 flex-1 min-w-0",children:[V.type==="vote"&&V.voter?t.jsx("img",{src:`https://images.hive.blog/u/${V.voter}/avatar`,alt:V.voter,className:"w-8 h-8 rounded-full flex-shrink-0",onError:oe=>{const K=oe.target;K.style.display="none";const te=K.nextElementSibling;te&&(te.style.display="flex")}}):V.type==="comment_benefactor_reward"&&V.author?t.jsx("img",{src:`https://images.hive.blog/u/${V.author}/avatar`,alt:V.author,className:"w-8 h-8 rounded-full flex-shrink-0",onError:oe=>{const K=oe.target;K.style.display="none";const te=K.nextElementSibling;te&&(te.style.display="flex")}}):V.type==="comment"&&V.author?t.jsx("img",{src:`https://images.hive.blog/u/${V.author}/avatar`,alt:V.author,className:"w-8 h-8 rounded-full flex-shrink-0",onError:oe=>{const K=oe.target;K.style.display="none";const te=K.nextElementSibling;te&&(te.style.display="flex")}}):null,t.jsx("div",{className:`w-8 h-8 bg-purple-100 dark:bg-purple-900/20 rounded-full flex items-center justify-center flex-shrink-0 ${V.type==="vote"&&V.voter||V.type==="comment_benefactor_reward"&&V.author||V.type==="comment"&&V.author?"hidden":""}`,children:se(V)}),t.jsx("div",{className:"flex-1 min-w-0",children:V.type==="custom_json"||V.type==="comment_options"?t.jsxs("div",{children:[t.jsx("p",{className:"text-sm text-gray-900 dark:text-white break-words font-medium",children:I(V.description)}),t.jsx("p",{className:"text-xs text-gray-600 dark:text-gray-400",children:ra.getRelativeTime(V.timestamp+"Z")}),t.jsx("div",{className:"border border-gray-200 dark:border-gray-600 rounded p-2 bg-gray-50 dark:bg-gray-700/50 mt-1",children:t.jsxs("div",{className:"text-xs text-gray-600 dark:text-gray-400 space-y-1 font-mono break-words",children:[V.type==="custom_json"&&t.jsxs(t.Fragment,{children:[t.jsxs("div",{children:[t.jsx("span",{className:"font-medium",children:"id:"})," ",V.details.id]}),t.jsxs("div",{className:"break-all",children:[t.jsx("span",{className:"font-medium",children:"json:"})," ",JSON.stringify(V.details.json).replace(/\\\"/g,'"').replace(/^"|"$/g,"")]}),t.jsxs("div",{children:[t.jsx("span",{className:"font-medium",children:"required_auths:"})," ",JSON.stringify(V.details.required_auths)]}),t.jsxs("div",{children:[t.jsx("span",{className:"font-medium",children:"required_posting_auths:"})," ",JSON.stringify(V.details.required_posting_auths)]})]}),V.type==="comment_options"&&t.jsxs(t.Fragment,{children:[t.jsxs("div",{children:[t.jsx("span",{className:"font-medium",children:"author:"}),t.jsx("span",{className:"text-blue-500 cursor-pointer hover:underline",children:V.details.author})]}),t.jsxs("div",{children:[t.jsx("span",{className:"font-medium",children:"permlink:"}),t.jsx("span",{className:"text-blue-500 cursor-pointer hover:underline",onClick:oe=>{oe.stopPropagation(),console.log("Clicked permlink:",V.details.author,V.details.permlink),c?.(V.details.author,V.details.permlink)},children:V.details.permlink})]})]})]})})]}):t.jsxs("div",{children:[t.jsx("p",{className:"text-sm text-gray-900 dark:text-white break-words",children:I(V.description)}),t.jsx("p",{className:"text-xs text-gray-600 dark:text-gray-400 sm:hidden",children:ra.getRelativeTime(V.timestamp+"Z")})]})})]}),t.jsx("div",{className:"flex items-center gap-1 text-sm text-gray-600 dark:text-gray-400 flex-shrink-0 ml-4 hidden sm:flex",children:V.type!=="custom_json"&&V.type!=="comment_options"&&t.jsxs(t.Fragment,{children:[t.jsx(z.Clock,{className:"h-3 w-3 flex-shrink-0"}),t.jsx("span",{className:"truncate",children:ra.getRelativeTime(V.timestamp+"Z")})]})})]},`${V.id}-${J}`)),$&&g.length>0&&t.jsx("div",{className:"flex justify-center py-6",children:t.jsx("button",{onClick:R,disabled:y||F,className:"px-6 py-2 bg-blue-600 hover:bg-blue-700 disabled:bg-blue-400 text-white rounded-lg font-medium transition-colors disabled:cursor-not-allowed flex items-center gap-2",children:F?t.jsxs(t.Fragment,{children:[t.jsx(z.RefreshCw,{className:"h-4 w-4 animate-spin"}),"Loading..."]}):"Load More Activities"})}),!$&&g.length>0&&t.jsx("div",{className:"text-center text-sm text-gray-400 py-4",children:"No more activities to load"})]})})]})},Gn=new oa.Client(["https://api.hive.blog","https://api.syncad.com","https://api.deathwing.me"]);class Mp{async getWitnessesByVote(r="",i=60){try{return await Gn.call("condenser_api","get_witnesses_by_vote",[r,i])}catch(s){throw console.error("Error fetching witnesses by vote:",s),s}}async getAccount(r){try{const i=await Gn.call("condenser_api","get_accounts",[[r]]);return i&&i.length>0?i[0]:null}catch(i){return console.error("Error fetching account:",i),null}}async getAccounts(r){try{return await Gn.call("condenser_api","get_accounts",[r])}catch(i){return console.error("Error fetching accounts:",i),[]}}async getWitnessVotes(r,i="",s=250){try{return await Gn.call("database_api","list_witness_votes",{start:[r,i],limit:s,order:"by_witness_account"})}catch(a){throw console.error("Error fetching witness votes:",a),a}}async getAllWitnessVotes(r){const i=[];let s="";try{for(;;){const n=await this.getWitnessVotes(r,s,250);if(i.push(...n.votes),n.votes.length<250)break;s=n.votes[n.votes.length-1].account}return i}catch(n){return console.error("Error fetching all witness votes:",n),[]}}async hasUserVotedForWitness(r,i){try{const s=await this.getAccount(r);return!s||!s.witness_votes?!1:s.witness_votes.includes(i)}catch(s){return console.error("Error checking witness vote:",s),!1}}async getUserWitnessVotes(r){try{return(await this.getAccount(r))?.witness_votes||[]}catch(i){return console.error("Error fetching user witness votes:",i),[]}}formatVotesToMHP(r){return`${(parseFloat(r)/1e6).toFixed(1)}m`}calculateAPR(r){return r/100}getVersionStatus(r,i){const s=this.parseVersion(r),a=this.parseVersion(i);return this.compareVersions(s,a)>=0?"green":this.compareVersions(s,a)<0?"red":"grey"}parseVersion(r){return r.split(".").map(i=>parseInt(i,10))}compareVersions(r,i){const s=Math.max(r.length,i.length);for(let a=0;a<s;a++){const n=r[a]||0,u=i[a]||0;if(n>u)return 1;if(n<u)return-1}return 0}getWitnessDescription(r){try{let i;if(r.json_metadata&&r.json_metadata!=="{}"){i=JSON.parse(r.json_metadata);const s=i.profile?.witness_description;if(s)return s}return r.posting_json_metadata&&r.posting_json_metadata!=="{}"?(i=JSON.parse(r.posting_json_metadata),i.profile?.about||""):""}catch(i){return console.error("Error parsing witness description:",i),""}}formatTimeAgo(r){const i=new Date(r),a=Math.floor((new Date().getTime()-i.getTime())/1e3);if(a<60)return`${a} second${a>1?"s":""} ago`;if(a<3600){const n=Math.floor(a/60);return`${n} minute${n>1?"s":""} ago`}else if(a<86400){const n=Math.floor(a/3600);return`${n} hour${n>1?"s":""} ago`}else if(a<604800){const n=Math.floor(a/86400);return`${n} day${n>1?"s":""} ago`}else if(a<2592e3){const n=Math.floor(a/604800);return`${n} week${n>1?"s":""} ago`}else if(a<31536e3){const n=Math.floor(a/2592e3);return`${n} month${n>1?"s":""} ago`}else{const n=Math.floor(a/31536e3);return`${n} year${n>1?"s":""} ago`}}}const ct=new Mp,Ue=jc.create((e,r)=>({witnesses:[],witnessVotes:[],userWitnessVotes:[],witnessDetails:new Map,witnessAccounts:new Map,loadingWitnesses:!1,loadingMoreWitnesses:!1,loadingVotes:!1,loadingMoreVotes:!1,loadingUserVotes:!1,error:null,nextWitnessStart:"",nextVotesStart:"",hasMoreWitnesses:!0,hasMoreVotes:!1,selectedWitness:null,filters:{status:"all",name:"",version:""},loadWitnesses:async(i="",s=50)=>{const{witnesses:a}=r();if(a.length>=500){e({hasMoreWitnesses:!1});return}e(i!==""?{loadingMoreWitnesses:!0}:{loadingWitnesses:!0,error:null});try{const u=await ct.getWitnessesByVote(i,s);e(d=>{const f=new Set(d.witnesses.map(h=>h.owner)),o=u.filter(h=>!f.has(h.owner));return{witnesses:[...d.witnesses,...o],nextWitnessStart:u.length>0?u[u.length-1].owner:"",hasMoreWitnesses:u.length===s}});const c=u.filter(d=>!r().witnessDetails.has(d.owner)).map(d=>d.owner);c.length>0&&r().loadWitnessDetails(c)}catch(u){console.error("Error loading witnesses:",u),e({error:"Failed to load witnesses data"})}finally{e({loadingWitnesses:!1,loadingMoreWitnesses:!1})}},loadMoreWitnesses:async()=>{const{nextWitnessStart:i,hasMoreWitnesses:s,loadingMoreWitnesses:a}=r();!s||a||!i||await r().loadWitnesses(i,50)},loadWitnessVotes:async i=>{e({loadingVotes:!0,witnessVotes:[],nextVotesStart:"",hasMoreVotes:!1,selectedWitness:i});try{const s=await ct.getWitnessVotes(i,"",250);e({witnessVotes:s.votes,nextVotesStart:s.votes.length>0?s.votes[s.votes.length-1].account:"",hasMoreVotes:s.votes.length===250,loadingVotes:!1})}catch(s){console.error("Error loading witness votes:",s),e({error:"Failed to load witness votes",loadingVotes:!1})}},loadMoreVotes:async()=>{const{hasMoreVotes:i,loadingMoreVotes:s,nextVotesStart:a,selectedWitness:n,witnessVotes:u}=r();if(!i||s||!a||u.length>=1e3){u.length>=1e3&&e({hasMoreVotes:!1});return}e({loadingMoreVotes:!0});try{const c=await ct.getWitnessVotes(n||"",a,250);e(d=>{const o=[...d.witnessVotes,...c.votes].filter((l,p,x)=>x.findIndex(w=>w.account===l.account)===p),h=c.votes.filter((l,p,x)=>x.findIndex(w=>w.account===l.account)===p);return{witnessVotes:o,nextVotesStart:h.length>0?h[h.length-1].account:"",hasMoreVotes:c.votes.length===250}})}catch(c){console.error("Error loading more witness votes:",c)}finally{e({loadingMoreVotes:!1})}},loadUserWitnessVotes:async i=>{if(i){e({loadingUserVotes:!0});try{const s=await ct.getUserWitnessVotes(i);e({userWitnessVotes:s})}catch(s){console.error("Error loading user witness votes:",s)}finally{e({loadingUserVotes:!1})}}},loadWitnessDetails:async i=>{try{const s=await ct.getAccounts(i);e(a=>{const n=new Map(a.witnessDetails),u=new Map(a.witnessAccounts);return s.forEach(c=>{const d=ct.getWitnessDescription(c);d&&n.set(c.name,d),u.set(c.name,c)}),{witnessDetails:n,witnessAccounts:u}})}catch(s){console.error("Error loading witness details:",s)}},setFilters:i=>e({filters:i}),setSelectedWitness:i=>e({selectedWitness:i}),clearVotes:()=>e({witnessVotes:[],nextVotesStart:"",hasMoreVotes:!1,selectedWitness:null})})),kc=({filters:e,onFiltersChange:r,theme:i="dark"})=>{const s=i==="dark"?"text-blue-400 hover:text-blue-300":"text-blue-600 hover:text-blue-800",a=c=>{const d=e.status===c?"all":c;r({...e,status:d})},n=c=>{r({...e,name:c})},u=c=>{r({...e,version:c})};return t.jsxs("div",{className:`rounded-lg p-4 mb-6 border ${i==="dark"?"bg-slate-950 border-gray-800":"bg-white border-gray-200"}`,children:[t.jsx("h3",{className:`text-lg font-semibold mb-4 ${i==="dark"?"text-white":"text-gray-900"}`,children:"FILTERS"}),t.jsxs("div",{className:"mb-6",children:[t.jsx("h4",{className:`text-sm font-medium mb-3 ${i==="dark"?"text-gray-300":"text-gray-700"}`,children:"WITNESS"}),t.jsxs("div",{className:"space-y-2",children:[t.jsxs("label",{className:"flex items-center space-x-2 cursor-pointer",children:[t.jsx("input",{type:"checkbox",checked:e.status==="active",onChange:()=>a("active"),className:"w-4 h-4 text-blue-600 rounded focus:ring-blue-500 focus:ring-2"}),t.jsx("span",{className:`${i==="dark"?"text-white":"text-gray-900"}`,children:"Active"})]}),t.jsxs("label",{className:"flex items-center space-x-2 cursor-pointer",children:[t.jsx("input",{type:"checkbox",checked:e.status==="disabled",onChange:()=>a("disabled"),className:"w-4 h-4 text-blue-600 rounded focus:ring-blue-500 focus:ring-2"}),t.jsx("span",{className:`${i==="dark"?"text-white":"text-gray-900"}`,children:"Disabled/Stale"})]}),t.jsxs("label",{className:"flex items-center space-x-2 cursor-pointer",children:[t.jsx("input",{type:"checkbox",checked:e.status==="approved",onChange:()=>a("approved"),className:"w-4 h-4 text-blue-600 rounded focus:ring-blue-500 focus:ring-2"}),t.jsx("span",{className:`${i==="dark"?"text-white":"text-gray-900"}`,children:"Approved"})]}),e.status!=="all"&&t.jsx("button",{onClick:()=>r({...e,status:"all"}),className:`text-sm underline ${s}`,children:"Clear Status Filter"})]})]}),t.jsxs("div",{className:"mb-6",children:[t.jsx("h4",{className:`text-sm font-medium mb-3 ${i==="dark"?"text-gray-300":"text-gray-700"}`,children:"NAME"}),t.jsxs("div",{className:"relative",children:[t.jsx("div",{className:"absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none",children:t.jsx("svg",{className:`w-4 h-4 ${i==="dark"?"text-gray-400":"text-gray-500"}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})})}),t.jsx("input",{type:"text",placeholder:"Search",value:e.name,onChange:c=>n(c.target.value),className:`w-full pl-10 pr-4 py-2 border-b focus:outline-none focus:border-blue-500 ${i==="dark"?"bg-slate-900 border-gray-700 text-white placeholder-gray-400":"bg-gray-50 border-gray-300 text-gray-900 placeholder-gray-500"}`})]})]}),t.jsxs("div",{children:[t.jsx("h4",{className:`text-sm font-medium mb-3 ${i==="dark"?"text-gray-300":"text-gray-700"}`,children:"VERSION"}),t.jsxs("div",{className:"relative",children:[t.jsx("div",{className:"absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none",children:t.jsx("svg",{className:`w-4 h-4 ${i==="dark"?"text-gray-400":"text-gray-500"}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})})}),t.jsx("input",{type:"text",placeholder:"Version",value:e.version,onChange:c=>u(c.target.value),className:`w-full pl-10 pr-4 py-2 border-b focus:outline-none focus:border-blue-500 ${i==="dark"?"bg-slate-900 border-gray-700 text-white placeholder-gray-400":"bg-gray-50 border-gray-300 text-gray-900 placeholder-gray-500"}`})]})]})]})},Di=768;function Ed(){const[e,r]=Qn.useState(void 0);return Qn.useEffect(()=>{const i=window.matchMedia(`(max-width: ${Di-1}px)`),s=()=>{r(window.innerWidth<Di)};return i.addEventListener("change",s),r(window.innerWidth<Di),()=>i.removeEventListener("change",s)},[]),!!e}const Rp=({isOpen:e,onClose:r,witness:i,votes:s,loadingMore:a,hasMore:n,loadingInitial:u,scrollContainerRef:c,sentinelRef:d,loadMoreVotes:f,theme:o="dark"})=>{const h=O.useCallback(l=>{l[0].isIntersecting&&n&&!a&&f()},[n,a,f]);return O.useEffect(()=>{const l=new IntersectionObserver(h,{threshold:.1,root:c.current});return d.current&&l.observe(d.current),()=>{d.current&&l.unobserve(d.current)}},[h,c,d]),e?t.jsx("div",{className:"fixed inset-0 bg-black/50 bg-opacity-50 flex items-center justify-center z-50 p-4",children:t.jsxs("div",{className:`rounded-lg max-w-2xl w-full max-h-[80vh] overflow-hidden border ${o==="dark"?"bg-slate-950 border-gray-800":"bg-white border-gray-200"}`,children:[t.jsxs("div",{className:`flex items-center justify-between p-4 border-b ${o==="dark"?"border-gray-800":"border-gray-200"}`,children:[t.jsxs("h3",{className:`text-lg font-semibold ${o==="dark"?"text-white":"text-gray-900"}`,children:["Votes for @",i," (showing ",s.length,")"]}),t.jsx("button",{onClick:r,className:`text-xl font-bold ${o==="dark"?"text-gray-400 hover:text-white":"text-gray-500 hover:text-gray-900"}`,children:"×"})]}),t.jsxs("div",{ref:c,className:"p-4 overflow-y-auto max-h-[60vh]",children:[t.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:s.map((l,p)=>t.jsxs("div",{className:`flex items-center space-x-3 p-3 rounded-lg border ${o==="dark"?"bg-gray-800 border-gray-800":"bg-gray-50 border-gray-200"}`,children:[t.jsx("div",{className:`w-8 h-8 rounded-full flex items-center justify-center text-sm font-medium ${o==="dark"?"bg-gray-600 text-white":"bg-gray-200 text-gray-900"}`,children:t.jsx("img",{className:"w-8 h-8 rounded-full",src:`https://images.hive.blog/u/${l.account}/avatar`,alt:l.account,onError:x=>{x.target.src="https://images.hive.blog/u/null/avatar"}})}),t.jsxs("div",{className:"flex-1",children:[t.jsx("div",{className:`font-medium ${o==="dark"?"text-white":"text-gray-900"}`,children:l.account}),t.jsxs("div",{className:`text-sm ${o==="dark"?"text-gray-400":"text-gray-500"}`,children:["Vote #",p+1]})]}),t.jsx("div",{className:`text-sm ${o==="dark"?"text-gray-400":"text-gray-500"}`,children:"25"})]},l.account))}),s.length===0&&!u&&t.jsx("div",{className:`text-center py-8 ${o==="dark"?"text-gray-400":"text-gray-500"}`,children:"No votes found for this witness."}),a&&t.jsx("div",{className:`text-center py-4 ${o==="dark"?"text-gray-400":"text-gray-500"}`,children:"Loading more votes..."}),n&&!a&&t.jsx("div",{className:"text-center py-4",children:t.jsx("button",{onClick:f,className:"bg-blue-500 hover:bg-blue-700 text-white font-bold py-2 px-4 rounded",children:"Load More Votes"})}),n&&t.jsx("div",{ref:d,className:"h-4"})]})]})}):null},Ip=({username:e,filters:r={status:"all",name:"",version:""},onWitnessVoteClick:i,onWitnessStatsClick:s,onWitnessUrlClick:a,theme:n="dark"})=>{const u=Ed(),c=Ue(I=>I.witnesses),d=Ue(I=>I.userWitnessVotes),f=Ue(I=>I.loadingWitnesses),o=Ue(I=>I.error),h=Ue(I=>I.selectedWitness),l=Ue(I=>I.witnessVotes),p=Ue(I=>I.hasMoreVotes),x=Ue(I=>I.loadingMoreVotes),w=Ue(I=>I.loadingVotes),b=Ue(I=>I.filters),g=Ue(I=>I.hasMoreWitnesses),v=Ue(I=>I.loadingWitnesses),_=Ue(I=>I.witnessDetails);Ue(I=>I.witnessAccounts);const N=Ue(I=>I.loadWitnesses),y=Ue(I=>I.loadMoreWitnesses),m=Ue(I=>I.loadWitnessVotes),k=Ue(I=>I.loadMoreVotes),j=Ue(I=>I.loadUserWitnessVotes),E=Ue(I=>I.setFilters),[D,C]=O.useState(!1),[P,$]=O.useState(!1),H=O.useRef(null),F=O.useRef(null),B=O.useRef(null),L=O.useCallback(I=>{I[0].isIntersecting&&g&&!v&&y()},[g,v,y]);O.useEffect(()=>{const I=new IntersectionObserver(L,{threshold:.1});return B.current&&I.observe(B.current),()=>{B.current&&I.unobserve(B.current)}},[L]),O.useEffect(()=>{N()},[N]),O.useEffect(()=>{e&&j(e)},[e,j]),O.useEffect(()=>{E(r)},[]);const G=O.useMemo(()=>c.filter(I=>{if(b.status!=="all"){if(b.status==="active"){const V=new Date;if(V.setFullYear(V.getFullYear()-1),new Date(I.last_hbd_exchange_update+"Z")<=V)return!1}else if(b.status==="disabled"){const V=new Date;if(V.setFullYear(V.getFullYear()-1),new Date(I.last_hbd_exchange_update+"Z")>V)return!1}else if(b.status==="approved"&&!d.includes(I.owner))return!1}return!(b.name&&!I.owner.toLowerCase().includes(b.name.toLowerCase())||b.version&&!I.running_version.includes(b.version))}),[c,b,d]),X=async I=>{i?i(I):(await m(I),C(!0))},ee=I=>{s?s(I):window.open(`https://hivehub.dev/witnesses/@${I}`,"_blank")},R=I=>{a?a(I):window.open(I,"_blank")},se=I=>e?d.includes(I):!1;return f?t.jsx("div",{className:"flex items-center justify-center p-8",children:t.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-blue-500"})}):o?t.jsx("div",{className:"text-center p-8 text-red-400",children:o}):t.jsxs("div",{className:"w-full",children:[t.jsx(Rp,{isOpen:D,onClose:()=>C(!1),witness:h||"",votes:l,loadingMore:x,hasMore:p,loadingInitial:w,scrollContainerRef:F,sentinelRef:H,loadMoreVotes:k,theme:n}),u?t.jsxs("div",{className:`w-full p-2 ${n==="dark"?"bg-slate-950":"bg-white"}`,children:[t.jsxs("div",{className:"flex justify-between items-center mb-4",children:[t.jsx("h2",{className:`text-lg font-semibold ${n==="dark"?"text-white":"text-gray-900"}`,children:"Witnesses"}),t.jsxs("button",{onClick:()=>$(!P),className:"bg-blue-500 hover:bg-blue-700 text-white font-bold py-2 px-4 rounded flex items-center space-x-2",children:[t.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 4a1 1 0 011-1h16a1 1 0 011 1v2.586a1 1 0 01-.293.707l-6.414 6.414a1 1 0 00-.293.707V17l-4 4v-6.586a1 1 0 00-.293-.707L3.293 7.293A1 1 0 013 6.586V4z"})}),t.jsx("span",{children:P?"Hide Filters":"Show Filters"})]})]}),P&&t.jsx("div",{className:"fixed inset-0 bg-black/50 bg-opacity-50 flex items-center justify-center z-50 p-4",children:t.jsxs("div",{className:`rounded-lg w-full max-w-md max-h-[80vh] overflow-hidden border ${n==="dark"?"bg-slate-950 border-gray-800":"bg-white border-gray-200"}`,children:[t.jsxs("div",{className:`flex items-center justify-between p-4 border-b ${n==="dark"?"border-gray-800":"border-gray-200"}`,children:[t.jsx("h3",{className:`text-lg font-semibold ${n==="dark"?"text-white":"text-gray-900"}`,children:"Filters"}),t.jsx("button",{onClick:()=>$(!1),className:`text-xl font-bold ${n==="dark"?"text-gray-400 hover:text-white":"text-gray-500 hover:text-gray-900"}`,children:"×"})]}),t.jsx("div",{className:"p-4 overflow-y-auto max-h-[60vh]",children:t.jsx(kc,{filters:b,onFiltersChange:E,theme:n})})]})}),t.jsxs("div",{className:"space-y-4 max-h-[70vh] overflow-y-auto",children:[G.map((I,V)=>{const J=ct.getVersionStatus(I.running_version,I.hardfork_version_vote),oe=se(I.owner),K=c.findIndex(te=>te.owner===I.owner)+1;return t.jsxs("div",{className:`rounded-lg border p-4 shadow-sm ${n==="dark"?"bg-slate-900 border-gray-800":"bg-white border-gray-200"}`,children:[t.jsxs("div",{className:"flex items-center justify-between mb-3",children:[t.jsxs("div",{className:"flex items-center space-x-3",children:[t.jsxs("span",{className:`text-lg font-bold ${n==="dark"?"text-white":"text-gray-900"}`,children:["#",K]}),t.jsx("img",{className:"w-10 h-10 rounded-full",src:`https://images.hive.blog/u/${I.owner}/avatar`,alt:I.owner,onError:te=>{te.target.src="https://images.hive.blog/u/null/avatar"}}),t.jsxs("div",{children:[t.jsx("div",{className:`font-medium ${n==="dark"?"text-white":"text-gray-900"}`,children:I.owner}),t.jsxs("div",{className:`text-xs ${n==="dark"?"text-gray-400":"text-gray-500"}`,children:["Since ",new Date(I.created).getFullYear()]})]})]}),t.jsxs("div",{className:"flex items-center space-x-2",children:[t.jsx("div",{className:"flex items-center justify-center",children:t.jsx("svg",{className:`w-6 h-6 ${oe?"text-green-600":n==="dark"?"text-gray-500":"text-gray-400"}`,fill:"currentColor",viewBox:"0 0 20 20",children:t.jsx("path",{fillRule:"evenodd",d:"M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z",clipRule:"evenodd"})})}),t.jsxs("div",{className:"flex space-x-1",children:[t.jsx("button",{onClick:()=>R(I.url),className:`${n==="dark"?"text-gray-400 hover:text-white":"text-gray-500 hover:text-gray-900"}`,title:"Visit witness URL",children:"🔗"}),t.jsx("button",{onClick:()=>ee(I.owner),className:`${n==="dark"?"text-gray-400 hover:text-white":"text-gray-500 hover:text-gray-900"}`,title:"View witness stats",children:"📊"})]})]})]}),t.jsxs("div",{className:"grid grid-cols-3 gap-4 mb-3",children:[t.jsxs("div",{className:"text-center",children:[t.jsx("div",{className:`text-xs uppercase ${n==="dark"?"text-gray-400":"text-gray-500"}`,children:"Version"}),t.jsx("span",{className:`px-2 py-1 rounded-full text-xs font-medium mt-1 block ${J==="green"?"bg-green-100 text-green-800":J==="red"?"bg-red-100 text-red-800":"bg-gray-100 text-gray-800"}`,children:I.running_version})]}),t.jsxs("div",{className:"text-center",children:[t.jsx("div",{className:`text-xs uppercase ${n==="dark"?"text-gray-400":"text-gray-500"}`,children:"Votes (MHP)"}),t.jsx("button",{onClick:()=>X(I.owner),className:"text-blue-600 hover:text-blue-800 cursor-pointer text-sm font-medium mt-1",disabled:w,children:w&&h===I.owner?"Loading...":ct.formatVotesToMHP(I.votes)})]}),t.jsxs("div",{className:"text-center",children:[t.jsx("div",{className:`text-xs uppercase ${n==="dark"?"text-gray-400":"text-gray-500"}`,children:"APR"}),t.jsxs("div",{className:`font-medium mt-1 ${n==="dark"?"text-white":"text-gray-900"}`,children:[ct.calculateAPR(I.props.hbd_interest_rate),"%"]})]})]}),t.jsxs("div",{className:"grid grid-cols-3 gap-4 text-xs",children:[t.jsxs("div",{className:"text-center",children:[t.jsx("div",{className:`uppercase ${n==="dark"?"text-gray-400":"text-gray-500"}`,children:"Last Block"}),t.jsx("div",{className:`${n==="dark"?"text-white":"text-gray-900"}`,children:I.last_confirmed_block_num.toLocaleString()})]}),t.jsxs("div",{className:"text-center",children:[t.jsx("div",{className:`uppercase ${n==="dark"?"text-gray-400":"text-gray-500"}`,children:"Miss"}),t.jsx("div",{className:`${n==="dark"?"text-white":"text-gray-900"}`,children:I.total_missed.toLocaleString()})]}),t.jsxs("div",{className:"text-center",children:[t.jsx("div",{className:`uppercase ${n==="dark"?"text-gray-400":"text-gray-500"}`,children:"Price Feed"}),t.jsx("div",{className:`${n==="dark"?"text-white":"text-gray-900"}`,children:I.hbd_exchange_rate.base}),t.jsx("div",{className:`${n==="dark"?"text-gray-400":"text-gray-500"}`,children:ct.formatTimeAgo(I.last_hbd_exchange_update+"Z")})]})]}),_.get(I.owner)&&t.jsx("div",{className:`mt-3 pt-3 border-t ${n==="dark"?"border-gray-800":"border-gray-200"}`,children:t.jsx("div",{className:`text-xs line-clamp-2 ${n==="dark"?"text-gray-400":"text-gray-500"}`,children:_.get(I.owner)})})]},I.owner)}),v&&t.jsxs("div",{className:"flex items-center justify-center py-4",children:[t.jsx("div",{className:"animate-spin rounded-full h-6 w-6 border-b-2 border-blue-500"}),t.jsx("span",{className:`ml-2 ${n==="dark"?"text-gray-400":"text-gray-500"}`,children:"Loading more witnesses..."})]}),g&&t.jsx("div",{ref:B,className:"h-1"})]})]}):t.jsx("div",{className:`max-w-7xl mx-auto p-2 ${n==="dark"?"bg-slate-950":"bg-white"}`,children:t.jsxs("div",{className:"grid grid-cols-5 gap-4",children:[t.jsx("div",{className:"col-span-1 sticky top-0 h-screen overflow-y-auto",children:t.jsx(kc,{filters:b,onFiltersChange:E,theme:n})}),t.jsxs("div",{className:"col-span-4 overflow-auto max-h-screen",children:[t.jsxs("table",{className:`w-full text-xs text-left ${n==="dark"?"text-gray-400":"text-gray-500"}`,children:[t.jsx("thead",{className:`text-xs uppercase ${n==="dark"?"text-gray-400 bg-slate-900":"text-gray-700 bg-gray-50"}`,children:t.jsxs("tr",{children:[t.jsx("th",{scope:"col",className:"px-2 py-2",children:"Rank"}),t.jsx("th",{scope:"col",className:"px-2 py-2",children:"Witness"}),t.jsx("th",{scope:"col",className:"px-2 py-2",children:"Version"}),t.jsx("th",{scope:"col",className:"px-2 py-2",children:"Votes"}),t.jsx("th",{scope:"col",className:"px-2 py-2",children:"Last Block"}),t.jsx("th",{scope:"col",className:"px-2 py-2",children:"Miss"}),t.jsx("th",{scope:"col",className:"px-2 py-2",children:"Feed"}),t.jsx("th",{scope:"col",className:"px-2 py-2",children:"APR"}),t.jsx("th",{scope:"col",className:"px-2 py-2",children:"Vote"})]})}),t.jsx("tbody",{children:G.map((I,V)=>{const J=ct.getVersionStatus(I.running_version,I.hardfork_version_vote),oe=se(I.owner);return t.jsxs("tr",{className:`border-b hover:bg-gray-50 ${n==="dark"?"border-gray-800 hover:bg-gray-800":"border-gray-200"}`,children:[t.jsx("td",{className:`px-2 py-2 font-medium text-xs ${n==="dark"?"text-white":"text-gray-900"}`,children:c.findIndex(K=>K.owner===I.owner)+1}),t.jsx("td",{className:"px-2 py-2",children:t.jsxs("div",{className:"flex items-center space-x-2",children:[t.jsx("img",{className:"w-6 h-6 rounded-full",src:`https://images.hive.blog/u/${I.owner}/avatar`,alt:I.owner,onError:K=>{K.target.src="https://images.hive.blog/u/null/avatar"}}),t.jsxs("div",{className:"flex-1 min-w-0",children:[t.jsx("div",{className:`font-medium text-xs truncate ${n==="dark"?"text-white":"text-gray-900"}`,children:I.owner}),t.jsxs("div",{className:`text-xs ${n==="dark"?"text-gray-400":"text-gray-500"}`,children:["Since ",new Date(I.created).getFullYear()]})]}),t.jsxs("div",{className:"flex space-x-1 flex-shrink-0",children:[t.jsx("button",{onClick:()=>R(I.url),className:`text-xs ${n==="dark"?"text-gray-400 hover:text-white":"text-gray-500 hover:text-gray-900"}`,title:"Visit witness URL",children:"🔗"}),t.jsx("button",{onClick:()=>ee(I.owner),className:`text-xs ${n==="dark"?"text-gray-400 hover:text-white":"text-gray-500 hover:text-gray-900"}`,title:"View witness stats",children:"📊"})]})]})}),t.jsx("td",{className:"px-2 py-2",children:t.jsx("span",{className:`px-1 py-0.5 rounded text-xs font-medium ${J==="green"?"bg-green-100 text-green-800":J==="red"?"bg-red-100 text-red-800":"bg-gray-100 text-gray-800"}`,children:I.running_version})}),t.jsx("td",{className:"px-2 py-2",children:t.jsx("button",{onClick:()=>X(I.owner),className:"text-blue-600 hover:text-blue-800 cursor-pointer text-xs",disabled:w,children:w&&h===I.owner?"...":ct.formatVotesToMHP(I.votes)})}),t.jsx("td",{className:"px-2 py-2 text-right",children:t.jsx("div",{className:`text-xs ${n==="dark"?"text-white":"text-gray-900"}`,children:I.last_confirmed_block_num.toLocaleString()})}),t.jsx("td",{className:"px-2 py-2 text-right text-xs",children:t.jsx("div",{className:`${n==="dark"?"text-white":"text-gray-900"}`,children:I.total_missed.toLocaleString()})}),t.jsx("td",{className:"px-2 py-2 text-right",children:t.jsx("div",{className:`text-xs ${n==="dark"?"text-white":"text-gray-900"}`,children:I.hbd_exchange_rate.base})}),t.jsx("td",{className:"px-2 py-2 text-right text-xs",children:t.jsxs("div",{className:`${n==="dark"?"text-white":"text-gray-900"}`,children:[ct.calculateAPR(I.props.hbd_interest_rate),"%"]})}),t.jsx("td",{className:"px-2 py-2",children:t.jsx("div",{className:"flex items-center justify-center",children:t.jsx("svg",{className:`w-4 h-4 ${oe?"text-green-600":n==="dark"?"text-gray-500":"text-gray-400"}`,fill:"currentColor",viewBox:"0 0 20 20",children:t.jsx("path",{fillRule:"evenodd",d:"M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z",clipRule:"evenodd"})})})})]},I.owner)})})]}),v&&t.jsxs("div",{className:"flex items-center justify-center py-4",children:[t.jsx("div",{className:"animate-spin rounded-full h-6 w-6 border-b-2 border-blue-500"}),t.jsx("span",{className:`ml-2 ${n==="dark"?"text-gray-400":"text-gray-500"}`,children:"Loading more witnesses..."})]}),g&&t.jsx("div",{ref:B,className:"h-1"})]})]})})]})},Fp=new oa.Client(["https://api.hive.blog","https://api.syncad.com","https://api.deathwing.me"]);class qp{async getTransactionHistory(r,i=-1,s=1e3,a=null,n=null){try{const u=[r,i,s];a!==null&&n!==null&&u.push(a,n);const c=await Fp.call("condenser_api","get_account_history",u);return Array.isArray(c)?c.map(d=>Array.isArray(d)&&d.length>=2?d[1]:d):[]}catch(u){return console.error("Error in getTransactionHistory:",u),[]}}async getFilteredTransactionHistory(r,i=[],s=100){try{const a=await this.getTransactionHistory(r,-1,1e3);let n=a;return i.length>0&&(n=a.filter(u=>{const c=u.op?.[0];return i.includes(c)})),n.slice(0,s)}catch(a){return console.error("Error in getFilteredTransactionHistory:",a),[]}}async getRecentTransfers(r,i=50){return this.getFilteredTransactionHistory(r,["transfer"],i)}async getRecentVotes(r,i=50){return this.getFilteredTransactionHistory(r,["vote"],i)}async getRecentComments(r,i=50){return this.getFilteredTransactionHistory(r,["comment"],i)}parseOperation(r){try{if(!r.op||!Array.isArray(r.op)||r.op.length<2)return null;const[i,s]=r.op;switch(i){case"transfer":return{type:"transfer",value:{from:s.from||"",to:s.to||"",amount:s.amount||"",memo:s.memo||""}};case"vote":return{type:"vote",value:{voter:s.voter||"",author:s.author||"",permlink:s.permlink||"",weight:s.weight||0}};case"comment":return{type:"comment",value:{parent_author:s.parent_author||"",parent_permlink:s.parent_permlink||"",author:s.author||"",permlink:s.permlink||"",title:s.title||"",body:s.body||"",json_metadata:s.json_metadata||""}};case"custom_json":return{type:"custom_json",value:{required_auths:s.required_auths||[],required_posting_auths:s.required_posting_auths||[],id:s.id||"",json:s.json||""}};case"comment_payout_update":return{type:"comment_payout_update",value:{author:s.author||"",permlink:s.permlink||""}};case"comment_options":return{type:"comment_options",value:{author:s.author||"",permlink:s.permlink||"",max_accepted_payout:s.max_accepted_payout||"",percent_hbd:s.percent_hbd||0,allow_votes:s.allow_votes||!1,allow_curation_rewards:s.allow_curation_rewards||!1,extensions:s.extensions||[]}};case"effective_comment_vote":return{type:"effective_comment_vote",value:{voter:s.voter||"",author:s.author||"",permlink:s.permlink||"",pending_payout:s.pending_payout||"",weight:s.weight||0,rshares:s.rshares||0,total_vote_weight:s.total_vote_weight||0}};default:return console.warn("Unknown operation type:",i,r.op),null}}catch(i){return console.error("Error parsing operation:",i,r.op),null}}formatTimestamp(r){try{return new Date(r).toLocaleString()}catch(i){return console.error("Error formatting timestamp:",i),r}}getTransactionSummary(r){const i={};let s="",a="";return r.forEach(n=>{const u=n.op?.[0]||"unknown";i[u]=(i[u]||0)+1,(!s||n.timestamp<s)&&(s=n.timestamp),(!a||n.timestamp>a)&&(a=n.timestamp)}),{totalTransactions:r.length,operationCounts:i,dateRange:{earliest:s,latest:a}}}}const aa=new qp;function Bp({account:e,className:r}){const[i,s]=O.useState([]),[a,n]=O.useState([]),[u,c]=O.useState(!1),[d,f]=O.useState(null),[o,h]=O.useState(""),[l,p]=O.useState("all"),[x,w]=O.useState(50),b=[{value:"all",label:"All Operations",icon:z.Activity},{value:"transfer",label:"Transfers",icon:z.Send},{value:"vote",label:"Votes",icon:z.TrendingUp},{value:"comment",label:"Comments",icon:z.MessageCircle},{value:"custom_json",label:"Custom JSON",icon:z.ArrowUpDown},{value:"comment_payout_update",label:"Payout Updates",icon:z.RefreshCw},{value:"comment_options",label:"Comment Options",icon:z.Filter},{value:"effective_comment_vote",label:"Effective Votes",icon:z.Users}],g=async()=>{if(e){c(!0),f(null);try{const y=await aa.getTransactionHistory(e,-1,x);s(y),n(y)}catch(y){f("Failed to load transaction history"),console.error("Error loading transactions:",y)}finally{c(!1)}}};O.useEffect(()=>{g()},[e,x]),O.useEffect(()=>{let y=i;if(l!=="all"&&(y=y.filter(m=>m.op?.[0]===l)),o){const m=o.toLowerCase();y=y.filter(k=>{const j=aa.parseOperation(k);if(!j)return!1;switch(j.type){case"transfer":return j.value.from.toLowerCase().includes(m)||j.value.to.toLowerCase().includes(m)||j.value.memo.toLowerCase().includes(m);case"vote":return j.value.voter.toLowerCase().includes(m)||j.value.author.toLowerCase().includes(m)||j.value.permlink.toLowerCase().includes(m);case"comment":return j.value.author.toLowerCase().includes(m)||j.value.title.toLowerCase().includes(m)||j.value.permlink.toLowerCase().includes(m);default:return!1}})}n(y)},[i,l,o]);const v=y=>{if(!y)return t.jsx(z.Activity,{className:"h-4 w-4"});const m=b.find(k=>k.value===y.type)?.icon||z.Activity;return t.jsx(m,{className:"h-4 w-4"})},_=y=>{const m=aa.parseOperation(y);if(!m)return t.jsx("span",{className:"text-gray-400",children:"Unknown operation"});switch(m.type){case"transfer":return t.jsxs("div",{className:"space-y-1",children:[t.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center gap-2",children:[t.jsx("span",{className:"px-2 py-1 bg-gray-700 text-gray-300 rounded text-xs font-medium",children:"Transfer"}),t.jsx("span",{className:"text-sm font-medium text-white",children:m.value.amount})]}),t.jsxs("div",{className:"text-sm text-gray-400 flex items-center gap-2",children:[t.jsx("span",{className:"flex-shrink-0",children:"From:"}),t.jsx("img",{src:be.userAvatar(m.value.from),alt:`${m.value.from} avatar`,className:"w-4 h-4 rounded-full flex-shrink-0",onError:k=>{k.target.src=be.userAvatar(m.value.from)}}),t.jsx("span",{className:"font-mono text-gray-300 truncate",children:m.value.from})]}),t.jsxs("div",{className:"text-sm text-gray-400 flex items-center gap-2",children:[t.jsx("span",{className:"flex-shrink-0",children:"To:"}),t.jsx("img",{src:be.userAvatar(m.value.to),alt:`${m.value.to} avatar`,className:"w-4 h-4 rounded-full flex-shrink-0",onError:k=>{k.target.src=be.userAvatar(m.value.to)}}),t.jsx("span",{className:"font-mono text-gray-300 truncate",children:m.value.to})]}),m.value.memo&&t.jsxs("div",{className:"text-sm text-gray-400",children:[t.jsx("span",{className:"flex-shrink-0",children:"Memo:"})," ",m.value.memo]})]});case"vote":return t.jsxs("div",{className:"space-y-1",children:[t.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center gap-2",children:[t.jsx("span",{className:"px-2 py-1 bg-gray-700 text-gray-300 rounded text-xs font-medium",children:"Vote"}),t.jsxs("span",{className:"text-sm font-medium text-white",children:[m.value.weight,"%"]})]}),t.jsxs("div",{className:"text-sm text-gray-400 flex items-center gap-2",children:[t.jsx("span",{className:"flex-shrink-0",children:"Voter:"}),t.jsx("img",{src:be.userAvatar(m.value.voter),alt:`${m.value.voter} avatar`,className:"w-4 h-4 rounded-full flex-shrink-0",onError:k=>{k.target.src=be.userAvatar(m.value.voter)}}),t.jsx("span",{className:"font-mono text-gray-300 truncate",children:m.value.voter})]}),t.jsxs("div",{className:"text-sm text-gray-400 flex items-center gap-2",children:[t.jsx("span",{className:"flex-shrink-0",children:"Author:"}),t.jsx("img",{src:be.userAvatar(m.value.author),alt:`${m.value.author} avatar`,className:"w-4 h-4 rounded-full flex-shrink-0",onError:k=>{k.target.src=be.userAvatar(m.value.author)}}),t.jsx("span",{className:"font-mono text-gray-300 truncate",children:m.value.author})]}),t.jsxs("div",{className:"text-sm text-gray-400",children:[t.jsx("span",{className:"flex-shrink-0",children:"Permlink:"})," ",m.value.permlink]})]});case"comment":return t.jsxs("div",{className:"space-y-1",children:[t.jsx("div",{className:"flex items-center gap-2",children:t.jsx("span",{className:"px-2 py-1 bg-gray-700 text-gray-300 rounded text-xs font-medium",children:"Comment"})}),t.jsxs("div",{className:"text-sm text-gray-400 flex items-center gap-2",children:[t.jsx("span",{className:"flex-shrink-0",children:"Author:"}),t.jsx("img",{src:be.userAvatar(m.value.author),alt:`${m.value.author} avatar`,className:"w-4 h-4 rounded-full flex-shrink-0",onError:k=>{k.target.src=be.userAvatar(m.value.author)}}),t.jsx("span",{className:"font-mono text-gray-300 truncate",children:m.value.author})]}),t.jsxs("div",{className:"text-sm text-gray-400",children:[t.jsx("span",{className:"flex-shrink-0",children:"Title:"})," ",m.value.title]}),t.jsxs("div",{className:"text-sm text-gray-400",children:[t.jsx("span",{className:"flex-shrink-0",children:"Permlink:"})," ",m.value.permlink]})]});case"custom_json":return t.jsxs("div",{className:"space-y-1",children:[t.jsx("div",{className:"flex items-center gap-2",children:t.jsx("span",{className:"px-2 py-1 bg-gray-700 text-gray-300 rounded text-xs font-medium",children:"Custom JSON"})}),t.jsxs("div",{className:"text-sm text-gray-400",children:["ID: ",m.value.id]}),t.jsxs("div",{className:"text-sm text-gray-400",children:["JSON: ",m.value.json.substring(0,100),"..."]})]});case"comment_payout_update":return t.jsxs("div",{className:"space-y-1",children:[t.jsx("div",{className:"flex items-center gap-2",children:t.jsx("span",{className:"px-2 py-1 bg-gray-700 text-gray-300 rounded text-xs font-medium",children:"Payout Update"})}),t.jsxs("div",{className:"text-sm text-gray-400 flex items-center gap-2",children:[t.jsx("span",{className:"flex-shrink-0",children:"Author:"}),t.jsx("img",{src:be.userAvatar(m.value.author),alt:`${m.value.author} avatar`,className:"w-4 h-4 rounded-full flex-shrink-0",onError:k=>{k.target.src=be.userAvatar(m.value.author)}}),t.jsx("span",{className:"font-mono text-gray-300 truncate",children:m.value.author})]}),t.jsxs("div",{className:"text-sm text-gray-400",children:[t.jsx("span",{className:"flex-shrink-0",children:"Permlink:"})," ",m.value.permlink]})]});case"comment_options":return t.jsxs("div",{className:"space-y-1",children:[t.jsx("div",{className:"flex items-center gap-2",children:t.jsx("span",{className:"px-2 py-1 bg-gray-700 text-gray-300 rounded text-xs font-medium",children:"Comment Options"})}),t.jsxs("div",{className:"text-sm text-gray-400 flex items-center gap-2",children:[t.jsx("span",{className:"flex-shrink-0",children:"Author:"}),t.jsx("img",{src:be.userAvatar(m.value.author),alt:`${m.value.author} avatar`,className:"w-4 h-4 rounded-full flex-shrink-0",onError:k=>{k.target.src=be.userAvatar(m.value.author)}}),t.jsx("span",{className:"font-mono text-gray-300 truncate",children:m.value.author})]}),t.jsxs("div",{className:"text-sm text-gray-400",children:[t.jsx("span",{className:"flex-shrink-0",children:"Max Payout:"})," ",m.value.max_accepted_payout]}),t.jsxs("div",{className:"text-sm text-gray-400",children:[t.jsx("span",{className:"flex-shrink-0",children:"HBD Percent:"})," ",m.value.percent_hbd,"%"]})]});case"effective_comment_vote":return t.jsxs("div",{className:"space-y-1",children:[t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx("span",{className:"px-2 py-1 bg-gray-700 text-gray-300 rounded text-xs font-medium",children:"Effective Vote"}),t.jsx("span",{className:"text-sm font-medium text-white",children:m.value.weight})]}),t.jsxs("div",{className:"text-sm text-gray-400",children:["Voter:"," ",t.jsx("span",{className:"font-mono text-gray-300",children:m.value.voter})]}),t.jsxs("div",{className:"text-sm text-gray-400",children:["Post: @",m.value.author,"/",m.value.permlink]}),t.jsxs("div",{className:"text-sm text-gray-400",children:["Pending Payout: ",m.value.pending_payout]})]});default:return t.jsx("span",{className:"text-gray-400",children:"Unknown operation"})}},N=aa.getTransactionSummary(i);return u?t.jsxs("div",{className:`bg-gray-800 border border-gray-700 rounded-lg shadow-sm ${r}`,children:[t.jsxs("div",{className:"p-2 md:p-6",children:[t.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[t.jsx(z.Activity,{className:"h-5 w-5 text-gray-300"}),t.jsx("h3",{className:"text-lg font-semibold text-white",children:"Transaction History"})]}),t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx("p",{className:"text-sm text-gray-400",children:"Loading transaction history for"}),t.jsx("img",{src:be.userAvatar(e),alt:`${e} avatar`,className:"w-6 h-6 rounded-full",onError:y=>{y.target.src=be.userAvatar(e)}}),t.jsxs("p",{className:"text-sm text-gray-400",children:["@",e]})]})]}),t.jsx("div",{className:"p-2 md:p-6 space-y-2 md:space-y-4",children:Array.from({length:5}).map((y,m)=>t.jsxs("div",{className:"space-y-2",children:[t.jsx("div",{className:"h-4 bg-gray-700 rounded animate-pulse w-3/4"}),t.jsx("div",{className:"h-3 bg-gray-700 rounded animate-pulse w-1/2"})]},m))})]}):t.jsxs("div",{className:`bg-gray-800 border border-gray-700 rounded-lg shadow-sm ${r}`,children:[t.jsxs("div",{className:"p-4 md:p-6",children:[t.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[t.jsx(z.Activity,{className:"h-5 w-5 text-gray-300"}),t.jsx("h3",{className:"text-lg font-semibold text-white",children:"Transaction History"})]}),t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx("p",{className:"text-sm text-gray-400",children:"Transaction history for"}),t.jsx("img",{src:be.userAvatar(e),alt:`${e} avatar`,className:"w-6 h-6 rounded-full",onError:y=>{y.target.src=be.userAvatar(e)}}),t.jsxs("p",{className:"text-sm text-gray-400",children:["@",e]})]}),t.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4 mt-4",children:[t.jsxs("div",{className:"text-center",children:[t.jsx("div",{className:"text-2xl font-bold text-white",children:N.totalTransactions}),t.jsx("div",{className:"text-sm text-gray-400",children:"Total"})]}),t.jsxs("div",{className:"text-center",children:[t.jsx("div",{className:"text-2xl font-bold text-white",children:N.operationCounts.transfer||0}),t.jsx("div",{className:"text-sm text-gray-400",children:"Transfers"})]}),t.jsxs("div",{className:"text-center",children:[t.jsx("div",{className:"text-2xl font-bold text-white",children:N.operationCounts.vote||0}),t.jsx("div",{className:"text-sm text-gray-400",children:"Votes"})]}),t.jsxs("div",{className:"text-center",children:[t.jsx("div",{className:"text-2xl font-bold text-white",children:N.operationCounts.comment||0}),t.jsx("div",{className:"text-sm text-gray-400",children:"Comments"})]})]})]}),t.jsxs("div",{className:"p-4 md:p-6 space-y-4",children:[t.jsxs("div",{className:"flex flex-col sm:flex-row gap-4",children:[t.jsx("div",{className:"flex-1",children:t.jsxs("div",{className:"relative",children:[t.jsx(z.Search,{className:"absolute left-3 top-1/2 transform -translate-y-1/2 h-4 w-4 text-gray-400"}),t.jsx("input",{type:"text",placeholder:"Search transactions...",value:o,onChange:y=>h(y.target.value),className:"w-full pl-10 pr-3 py-2 bg-gray-700 border border-gray-600 rounded-md text-white placeholder-gray-400 focus:outline-none focus:ring-2 focus:ring-blue-500"})]})}),t.jsx("select",{value:l,onChange:y=>p(y.target.value),className:"w-full sm:w-48 px-3 py-2 bg-gray-700 border border-gray-600 rounded-md text-white focus:outline-none focus:ring-2 focus:ring-blue-500",children:b.map(y=>t.jsx("option",{value:y.value,children:y.label},y.value))}),t.jsxs("select",{value:x.toString(),onChange:y=>w(parseInt(y.target.value)),className:"w-full sm:w-32 px-3 py-2 bg-gray-700 border border-gray-600 rounded-md text-white focus:outline-none focus:ring-2 focus:ring-blue-500",children:[t.jsx("option",{value:"25",children:"25"}),t.jsx("option",{value:"50",children:"50"}),t.jsx("option",{value:"100",children:"100"}),t.jsx("option",{value:"200",children:"200"})]}),t.jsx("button",{onClick:g,className:"px-3 py-2 bg-gray-700 border border-gray-600 rounded-md hover:bg-gray-600 text-white focus:outline-none focus:ring-2 focus:ring-blue-500",children:t.jsx(z.RefreshCw,{className:"h-4 w-4"})})]}),d&&t.jsx("div",{className:"p-4 border border-red-700 bg-red-900 rounded-md",children:t.jsx("p",{className:"text-red-300",children:d})}),t.jsx("div",{className:"space-y-4",children:a.length===0?t.jsx("div",{className:"text-center py-8 text-gray-400",children:"No transactions found"}):a.map(y=>{const m=aa.parseOperation(y);return t.jsxs("div",{className:"border border-gray-600 rounded-lg p-3 md:p-4 space-y-3 hover:bg-gray-700 transition-colors",children:[t.jsx("div",{className:"flex items-center justify-between",children:t.jsxs("div",{className:"flex items-center gap-3",children:[v(m),t.jsxs("div",{children:[t.jsx("div",{className:"font-medium text-white",children:m?.type?m.type.charAt(0).toUpperCase()+m.type.slice(1):"Unknown"}),t.jsxs("div",{className:"text-sm text-gray-400 flex items-center gap-1",children:[t.jsx(z.Clock,{className:"h-3 w-3"}),aa.formatTimestamp(y.timestamp)]})]})]})}),t.jsx("div",{className:"ml-6 md:ml-7",children:_(y)})]},`${y.trx_id}-${y.op_in_trx}`)})}),a.length>0&&t.jsxs("div",{className:"text-center text-sm text-gray-400",children:["Showing ",a.length," of ",i.length," ","transactions"]})]})]})}const Vp=new oa.Client(["https://api.hive.blog","https://api.syncad.com","https://api.deathwing.me"]);class Up{async getUserChannel(r,i="posts",s=20,a=null,n=null,u=null){const c={account:r,sort:i,limit:s};a&&(c.start_author=a),n&&(c.start_permlink=n),u&&(c.observer=u);try{const d=await Vp.call("bridge","get_account_posts",c);return Array.isArray(d)?d:[]}catch(d){return console.error("Error in getUserChannel:",d),[]}}async getUserPosts(r,i=20){return this.getUserChannel(r,"posts",i)}async getUserComments(r,i=20){return this.getUserChannel(r,"comments",i)}async getUserReplies(r,i=20){return this.getUserChannel(r,"replies",i)}async getAllUserActivity(r,i=10){try{const[s,a,n]=await Promise.all([this.getUserPosts(r,i),this.getUserComments(r,i),this.getUserReplies(r,i)]);return[...s,...a,...n].sort((c,d)=>new Date(d.created).getTime()-new Date(c.created).getTime())}catch(s){return console.error("Error in getAllUserActivity:",s),[]}}convertToDisplayItem(r){return{id:r.id,author:r.author,permlink:r.permlink,title:r.title,body:r.body,created:r.created,category:r.category,net_votes:r.net_votes,children:r.children,total_payout_value:r.total_payout_value,pending_payout_value:r.pending_payout_value,url:r.url,type:r.parent_author===""?"post":"comment"}}formatTimestamp(r){try{return new Date(r).toLocaleString()}catch(i){return console.error("Error formatting timestamp:",i),r}}getRelativeTime(r){try{const i=new Date(r),a=new Date().getTime()-i.getTime(),n=Math.floor(a/1e3),u=Math.floor(n/60),c=Math.floor(u/60),d=Math.floor(c/24);return n<60?`${n} seconds ago`:u<60?`${u} minutes ago`:c<24?`${c} hours ago`:d<7?`${d} days ago`:i.toLocaleDateString()}catch(i){return console.error("Error calculating relative time:",i),r}}truncateText(r,i=150){return r.length<=i?r:r.substring(0,i)+"..."}getActivitySummary(r){let i=0,s=0,a=0,n=0;return r.forEach(u=>{u.parent_author===""?i++:s++,a+=u.net_votes||0;const c=u.total_payout_value?.match(/(\d+\.?\d*)/);c&&(n+=parseFloat(c[1]))}),{totalActivities:r.length,postsCount:i,commentsCount:s,totalVotes:a,totalPayout:`${n.toFixed(3)} HIVE`,averageVotes:r.length>0?Math.round(a/r.length):0}}filterByCategory(r,i){return r.filter(s=>s.category===i)}filterByDateRange(r,i,s){return r.filter(a=>{const n=new Date(a.created);return n>=i&&n<=s})}searchActivities(r,i){const s=i.toLowerCase();return r.filter(a=>a.title.toLowerCase().includes(s)||a.body.toLowerCase().includes(s)||a.category.toLowerCase().includes(s))}}const na=new Up,zp=({username:e,className:r})=>{const[i,s]=O.useState([]),[a,n]=O.useState([]),[u,c]=O.useState([]),[d,f]=O.useState([]),[o,h]=O.useState([]),[l,p]=O.useState(!1),[x,w]=O.useState(null),[b,g]=O.useState(""),[v,_]=O.useState(20),[N,y]=O.useState("all"),[m,k]=O.useState(new Set),[j,E]=O.useState(!1),D=async()=>{if(!(!e||j)){p(!0),w(null);try{const[L,G,X]=await Promise.all([na.getUserPosts(e,v),na.getUserComments(e,v),na.getUserReplies(e,v)]);s(L),n(G),c(X),E(!0)}catch(L){w("Failed to load activity history"),console.error("Error loading activities:",L)}finally{p(!1)}}};O.useEffect(()=>{D()},[e]),O.useEffect(()=>{if(!j)return;let L=[];switch(N){case"posts":L=i;break;case"comments":L=a;break;case"replies":L=u;break;default:L=[...i,...a,...u].sort((G,X)=>new Date(X.created).getTime()-new Date(G.created).getTime());break}f(L),h(L)},[N,i,a,u,j]),O.useEffect(()=>{let L=d;b&&(L=na.searchActivities(d,b)),h(L)},[d,b]);const C=L=>!L||L==="0.000 HIVE"?"0 HIVE":L,P=L=>L.parent_author===""?"Post":L.depth===1?"Comment":"Reply",$=new ro.DefaultRenderer({baseUrl:"https://hive.blog/",breaks:!0,skipSanitization:!1,allowInsecureScriptTags:!1,addNofollowToLinks:!0,doNotShowImages:!1,assetsWidth:640,assetsHeight:480,imageProxyFn:L=>L,usertagUrlFn:L=>`/@${L}`,hashtagUrlFn:L=>`/trending/${L}`,isLinkSafeFn:L=>!0,addExternalCssClassToMatchingLinksFn:L=>!0,ipfsPrefix:"https://ipfs.io/ipfs/"}),H=L=>{const G=new Set(m);G.has(L)?G.delete(L):G.add(L),k(G)},F=L=>{const G=`${L.author}-${L.permlink}`,X=m.has(G),ee=L.body.length>100;return t.jsxs("div",{className:"border border-gray-200 dark:border-gray-600 rounded-lg p-3 sm:p-4 space-y-3 hover:bg-gray-50 dark:hover:bg-gray-700 transition-colors relative",children:[t.jsx("div",{className:"flex flex-col sm:flex-row sm:items-start sm:justify-between gap-3",children:t.jsx("div",{className:"flex items-start gap-3 flex-1",children:t.jsxs("div",{className:"flex-1 min-w-0",children:[t.jsxs("div",{className:"flex flex-wrap items-center gap-2 mb-1",children:[t.jsx("span",{className:`px-2 py-1 rounded text-xs font-medium ${L.parent_author===""?"bg-blue-900 text-blue-300":"bg-gray-100 dark:bg-gray-700 text-gray-600 dark:text-gray-300"}`,children:P(L)}),t.jsxs("span",{className:"text-sm text-gray-500 dark:text-gray-400",children:["in #",L.category]})]}),t.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[t.jsx("img",{src:be.userAvatar(L.author),alt:`${L.author} avatar`,className:"w-5 h-5 sm:w-6 sm:h-6 rounded-full flex-shrink-0",onError:R=>{R.target.src=be.userAvatar(L.author)}}),t.jsx("h3",{className:"font-medium text-base sm:text-lg leading-tight text-gray-900 dark:text-white break-words",children:L.title||"Untitled"})]}),t.jsxs("div",{className:"prose prose-sm dark:prose-invert max-w-none mb-3 text-gray-500 dark:text-gray-400 comment-content overflow-hidden",children:[t.jsx("div",{className:"break-words overflow-wrap-anywhere",dangerouslySetInnerHTML:{__html:$.render(ee&&!X?L.body.substring(0,50)+".....":L.body)}}),ee&&t.jsxs("button",{onClick:()=>H(G),className:"mt-2 text-blue-400 hover:text-blue-300 text-sm font-medium flex items-center gap-1",children:[t.jsx(z.ChevronDown,{className:`h-3 w-3 transition-transform ${X?"rotate-180":""}`}),X?"Show less":"Show more"]})]}),t.jsxs("div",{className:"flex flex-wrap items-center gap-2 sm:gap-4 text-sm text-gray-500 dark:text-gray-400",children:[t.jsxs("div",{className:"flex items-center gap-1",children:[t.jsx(z.Clock,{className:"h-3 w-3 flex-shrink-0"}),t.jsx("span",{className:"truncate",children:na.getRelativeTime(L.created)})]}),t.jsxs("div",{className:"flex items-center gap-1",children:[t.jsx(z.ThumbsUp,{className:"h-3 w-3 flex-shrink-0"}),t.jsxs("span",{children:[L.net_votes," votes"]})]}),t.jsxs("div",{className:"flex items-center gap-1",children:[t.jsx(z.Reply,{className:"h-3 w-3 flex-shrink-0"}),t.jsxs("span",{children:[L.children," replies"]})]}),t.jsxs("div",{className:"flex items-center gap-1",children:[t.jsx("span",{children:"💰"}),t.jsx("span",{children:C(L.total_payout_value)})]})]})]})})}),t.jsx("button",{onClick:()=>window.open(`https://peakd.com/@${L.author}/${L.permlink}`,"_blank"),className:"absolute top-3 right-3 flex-shrink-0 p-2 hover:bg-gray-200 dark:hover:bg-gray-600 rounded-md transition-colors text-gray-500 dark:text-gray-400 hover:text-gray-900 dark:hover:text-white",children:t.jsx(z.ExternalLink,{className:"h-4 w-4"})})]},G)},B=na.getActivitySummary(d);return l?t.jsxs("div",{className:`bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg shadow-sm ${r}`,children:[t.jsx("div",{className:"p-6",children:t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400",children:"Loading activity history for"}),t.jsx("img",{src:be.userAvatar(e),alt:`${e} avatar`,className:"w-6 h-6 rounded-full",onError:L=>{L.target.src=be.userAvatar(e)}}),t.jsxs("p",{className:"text-sm text-gray-500 dark:text-gray-400",children:["@",e]})]})}),t.jsx("div",{className:"p-6 space-y-4",children:Array.from({length:5}).map((L,G)=>t.jsxs("div",{className:"space-y-2",children:[t.jsx("div",{className:"h-4 bg-gray-200 dark:bg-gray-700 rounded animate-pulse w-3/4"}),t.jsx("div",{className:"h-3 bg-gray-200 dark:bg-gray-700 rounded animate-pulse w-1/2"}),t.jsx("div",{className:"h-20 bg-gray-200 dark:bg-gray-700 rounded animate-pulse w-full"})]},G))})]}):t.jsxs("div",{className:`space-y-6 ${r}`,children:[t.jsx("div",{className:"bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-xl p-6",children:t.jsxs("div",{className:"flex flex-col md:flex-row items-start md:items-center gap-6",children:[t.jsx("img",{src:be.userAvatar(e),alt:`${e} avatar`,className:"w-16 h-16 rounded-full object-cover",onError:L=>{L.target.src=be.userAvatar(e)}}),t.jsxs("div",{className:"flex-1",children:[t.jsxs("h1",{className:"text-2xl font-bold text-gray-900 dark:text-white mb-2",children:["@",e]}),t.jsx("p",{className:"text-gray-600 dark:text-gray-400 mb-4",children:"Activity History"}),t.jsx("div",{className:"flex flex-wrap gap-6 text-sm",children:t.jsxs("div",{className:"flex items-center gap-2 text-gray-500 dark:text-gray-400",children:[t.jsx(z.FileText,{className:"w-4 h-4"}),t.jsxs("span",{children:[B.totalActivities," Total Activities"]})]})})]})]})}),t.jsxs("div",{children:[t.jsxs("div",{className:"flex md:grid md:grid-cols-4 overflow-x-auto md:overflow-visible w-full bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg",children:[t.jsx("button",{onClick:()=>y("all"),className:`flex-shrink-0 md:flex-shrink px-4 py-2 text-xs sm:text-sm font-medium transition-colors ${N==="all"?"bg-blue-600 dark:bg-blue-500 text-white":"text-gray-700 dark:text-gray-300 hover:bg-gray-300 dark:hover:bg-gray-700"}`,children:"All"}),t.jsx("button",{onClick:()=>y("posts"),className:`flex-shrink-0 md:flex-shrink px-4 py-2 text-xs sm:text-sm font-medium transition-colors ${N==="posts"?"bg-blue-600 dark:bg-blue-500 text-white":"text-gray-700 dark:text-gray-300 hover:bg-gray-300 dark:hover:bg-gray-700"}`,children:"Posts"}),t.jsx("button",{onClick:()=>y("comments"),className:`flex-shrink-0 md:flex-shrink px-4 py-2 text-xs sm:text-sm font-medium transition-colors ${N==="comments"?"bg-blue-600 dark:bg-blue-500 text-white":"text-gray-700 dark:text-gray-300 hover:bg-gray-300 dark:hover:bg-gray-700"}`,children:"Comments"}),t.jsx("button",{onClick:()=>y("replies"),className:`flex-shrink-0 md:flex-shrink px-4 py-2 text-xs sm:text-sm font-medium transition-colors ${N==="replies"?"bg-blue-600 dark:bg-blue-500 text-white":"text-gray-700 dark:text-gray-300 hover:bg-gray-300 dark:hover:bg-gray-700"}`,children:"Replies"})]}),t.jsxs("div",{className:"mt-6",children:[t.jsxs("div",{className:"flex flex-row gap-4 mb-6",children:[t.jsx("div",{className:"flex-1",children:t.jsxs("div",{className:"relative",children:[t.jsx(z.Search,{className:"absolute left-3 top-1/2 transform -translate-y-1/2 h-4 w-4 text-gray-500 dark:text-gray-400"}),t.jsx("input",{type:"text",placeholder:"Search activities...",value:b,onChange:L=>g(L.target.value),className:"w-full pl-10 pr-3 py-2 bg-gray-100 dark:bg-gray-700 border border-gray-200 dark:border-gray-600 rounded-md text-gray-900 dark:text-white placeholder-gray-500 dark:placeholder-gray-400 focus:outline-none focus:ring-2 focus:ring-blue-500"})]})}),t.jsx("button",{onClick:()=>{E(!1),D()},className:"px-3 py-2 bg-gray-100 dark:bg-gray-700 border border-gray-200 dark:border-gray-600 rounded-md hover:bg-gray-200 dark:hover:bg-gray-600 text-gray-900 dark:text-white focus:outline-none focus:ring-2 focus:ring-blue-500",children:t.jsx(z.RefreshCw,{className:"h-4 w-4"})})]}),x&&t.jsx("div",{className:"p-4 border border-red-200 dark:border-red-700 bg-red-50 dark:bg-red-900 rounded-md",children:t.jsx("p",{className:"text-red-600 dark:text-red-300",children:x})}),t.jsx("div",{className:"space-y-4",children:o.length===0?t.jsx("div",{className:"text-center py-8 text-gray-500 dark:text-gray-400",children:"No activities found"}):o.map(F)}),o.length>0&&t.jsxs("div",{className:"text-center text-sm text-gray-500 dark:text-gray-400",children:["Showing ",o.length," of ",d.length," ","activities"]})]})]})]})};function Hp({author:e,permlink:r,currentUser:i,hiveValue:s,onUpvote:a,onSubmitComment:n,onComments:u,onReblog:c,onShare:d,onTip:f,onReport:o,onClickCommentUpvote:h}){const l=i==null||i===""?null:i,p=l!=null,[x,w]=O.useState([]),[b,g]=O.useState(0),[v,_]=O.useState(!1),[N,y]=O.useState(!1),[m,k]=O.useState(!1),[j,E]=O.useState({message:"",visible:!1}),[D,C]=O.useState(!1),P=O.useCallback(K=>{E({message:K,visible:!0}),setTimeout(()=>E(te=>({...te,visible:!1})),2500)},[]),$=O.useCallback(async()=>{const K=await Te.getActiveVotes(e,r);w(K)},[e,r]);O.useEffect(()=>{$()},[$]),O.useEffect(()=>{Te.getCommentsList(e,r).then(K=>{g(K.length)})},[e,r]);const H=p&&!!l&&x.some(K=>K.voter.toLowerCase()===l.toLowerCase()),F=(K,te)=>{if(!p){P(`Please Login to ${K}`);return}te()},B=()=>{F("Upvote",()=>{if(H){P("You have already upvoted this post");return}_(!0)})},L=async K=>{if(a){C(!0);try{await Promise.resolve(a(K)),_(!1),await $(),P("Vote submitted successfully")}catch(te){const pe=te instanceof Error?te.message:"Failed to upvote";P(pe)}finally{C(!1)}}},G=()=>{y(!0)},X=()=>{y(!1),p&&!H?_(!0):P(p?"You have already upvoted this post":"Please Login to Upvote")},ee=()=>{F("Comment",()=>{u?.(),k(!0)})},R=()=>{F("Reblog",()=>c?.())},se=()=>{F("Report",()=>o?.())},I=()=>{F("Tip",()=>f?.())},V=()=>{if(d){d();return}typeof navigator<"u"&&navigator.share?navigator.share({title:`${e}'s post`,url:`https://peakd.com/@${e}/${r}`,text:`Check out this post by @${e}`}).then(()=>P("Shared")).catch(()=>{}):(navigator.clipboard?.writeText(`https://peakd.com/@${e}/${r}`),P("Link copied to clipboard"))},J=async(K,te,pe)=>{if(!p){P("Please Login to comment");return}if(n)try{await Promise.resolve(n(K,te,pe)),P("Comment posted")}catch(Ee){const Z=Ee instanceof Error?Ee.message:"Failed to post comment";throw P(Z),Ee}},oe="absolute left-1/2 -translate-x-1/2 bottom-full mb-1 px-2 py-1 text-xs font-medium text-white bg-gray-800 dark:bg-gray-700 rounded shadow-lg whitespace-nowrap opacity-0 pointer-events-none group-hover:opacity-100 transition-opacity duration-150 z-[60]";return t.jsxs("div",{className:"flex items-center justify-between gap-4 text-sm w-full",children:[t.jsxs("div",{className:"flex flex-wrap items-center justify-center gap-3 sm:gap-4 shrink-0",children:[t.jsxs("div",{className:"flex items-center gap-1",children:[t.jsxs("div",{className:"relative group",children:[t.jsx("span",{className:oe,children:"Upvote"}),t.jsx("button",{type:"button",onClick:B,disabled:D,className:"p-1 rounded hover:bg-gray-200 dark:hover:bg-gray-700 disabled:opacity-50","aria-label":"Upvote",children:D?t.jsx(z.Loader2,{className:"w-4 h-4 sm:w-5 sm:h-5 animate-spin text-blue-600"}):t.jsx(z.ThumbsUp,{className:`w-4 h-4 sm:w-5 sm:h-5 ${H?"text-blue-600 dark:text-blue-400 fill-current":"text-gray-600 dark:text-gray-400"}`})})]}),t.jsxs("div",{className:"relative group",children:[t.jsx("span",{className:oe,children:"View upvotes"}),t.jsx("button",{type:"button",onClick:G,className:"flex items-center gap-1 text-gray-700 dark:text-gray-300 hover:text-blue-600 dark:hover:text-blue-400 transition-colors","aria-label":"View upvotes",children:t.jsx("span",{children:x.length})})]})]}),t.jsxs("div",{className:"relative group",children:[t.jsx("span",{className:oe,children:"Comments"}),t.jsxs("button",{type:"button",onClick:ee,className:"flex items-center gap-1 text-gray-700 dark:text-gray-300 hover:text-blue-600 dark:hover:text-blue-400 transition-colors","aria-label":"Comments",children:[t.jsx(z.MessageCircle,{className:"w-4 h-4 sm:w-5 sm:h-5"}),t.jsx("span",{children:b})]})]}),t.jsxs("div",{className:"relative group",children:[t.jsx("span",{className:oe,children:"Reblog"}),t.jsx("button",{type:"button",onClick:R,className:"flex items-center gap-1 text-gray-600 dark:text-gray-400 hover:text-blue-600 dark:hover:text-blue-400 transition-colors p-1 rounded","aria-label":"Reblog",children:t.jsx(z.Repeat2,{className:"w-4 h-4 sm:w-5 sm:h-5"})})]}),t.jsxs("div",{className:"relative group",children:[t.jsx("span",{className:oe,children:"Share"}),t.jsx("button",{type:"button",onClick:V,className:"flex items-center gap-1 text-gray-600 dark:text-gray-400 hover:text-blue-600 dark:hover:text-blue-400 transition-colors p-1 rounded","aria-label":"Share",children:t.jsx(z.Share2,{className:"w-4 h-4 sm:w-5 sm:h-5"})})]}),t.jsxs("div",{className:"relative group",children:[t.jsx("span",{className:oe,children:"Report"}),t.jsx("button",{type:"button",onClick:se,className:"flex items-center gap-1 text-gray-600 dark:text-gray-400 hover:text-red-600 dark:hover:text-red-400 transition-colors p-1 rounded","aria-label":"Report",children:t.jsx(z.Flag,{className:"w-4 h-4 sm:w-5 sm:h-5"})})]}),t.jsxs("div",{className:"relative group",children:[t.jsx("span",{className:oe,children:"Tip"}),t.jsx("button",{type:"button",onClick:I,className:"flex items-center gap-1 text-gray-600 dark:text-gray-400 hover:text-green-600 dark:hover:text-green-400 transition-colors p-1 rounded","aria-label":"Tip",children:t.jsx(z.Gift,{className:"w-4 h-4 sm:w-5 sm:h-5"})})]})]}),t.jsx("div",{className:"flex-1 flex justify-end min-w-0 shrink-0",children:s!=null&&s!==""&&t.jsx("span",{className:"font-semibold text-green-600 dark:text-green-400",children:s})}),v&&t.jsx(ao,{author:e,permlink:r,onUpvote:L,onCancel:()=>_(!1)}),N&&t.jsx(io,{author:e,permlink:r,onClose:()=>y(!1),currentUser:l??void 0,token:void 0,onClickUpvoteButton:X}),m&&t.jsx(so,{author:e,permlink:r,onClose:()=>{k(!1),Te.getCommentsList(e,r).then(K=>g(K.length))},currentUser:l??void 0,token:void 0,onSubmitComment:n?J:void 0,onClickCommentUpvote:h}),j.visible&&t.jsx("div",{className:"fixed bottom-4 right-4 z-[100] max-w-[280px] rounded-lg bg-gray-800 dark:bg-gray-900 text-white px-3 py-2 shadow-lg text-sm",children:j.message})]})}const Ti="_communityLocalKey",Zn={getBookmarkedCommunities:()=>{const e=localStorage.getItem(Ti);return e?JSON.parse(e):[]},isUserPresentLocally:e=>{const r=localStorage.getItem(Ti);return r?JSON.parse(r).includes(e):!1},storeLikedCommunityLocally:(e,r=!1)=>{let i=Zn.getBookmarkedCommunities();return i.includes(e)?i=i.filter(s=>s!==e):r||i.push(e),localStorage.setItem(Ti,JSON.stringify(i)),i}},uo=({id:e,toastType:r,isLiked:i,onAdd:s,onRemove:a,onFavourite:n})=>{const[u,c]=O.useState(i??Zn.isUserPresentLocally(e));O.useEffect(()=>{i!==void 0&&c(i)},[i]);const d=()=>{n&&n(),u?(a?a(e,"remove_bookmark"):Zn.storeLikedCommunityLocally(e,!0),f(!1)):(s?s(e,"add_bookmark"):Zn.storeLikedCommunityLocally(e),f(!0)),c(!u)},f=o=>{alert(`The ${r} is ${o?"added to":"removed from"} your bookmarks`)};return t.jsx("button",{onClick:d,className:"p-2 rounded-lg border border-gray-300 dark:border-gray-600 text-gray-600 dark:text-gray-300 hover:bg-gray-300 dark:hover:bg-gray-700",children:u?t.jsx(z.BookmarkCheck,{className:"w-5 h-5 text-blue-600 dark:text-blue-400"}):t.jsx(z.Bookmark,{className:"w-5 h-5 text-gray-500 dark:text-gray-400"})})};class Wp{HIVE_API_URL="https://api.hive.blog";async getListOfCommunities(r,i=20,s){const a={limit:i};s&&s.trim()!==""&&(a.last=s),r&&r.trim()!==""&&(a.query=r);const n={jsonrpc:"2.0",method:"bridge.list_communities",params:a,id:1};try{const u=await fetch(this.HIVE_API_URL,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)});if(!u.ok)throw new Error(`HTTP error! status: ${u.status}`);return(await u.json()).result||[]}catch(u){throw console.error("Error fetching communities:",u),u}}async getCommunityDetails(r){const i={jsonrpc:"2.0",method:"bridge.get_community",params:{name:r},id:1};try{const s=await fetch(this.HIVE_API_URL,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(i)});if(!s.ok)throw new Error(`HTTP error! status: ${s.status}`);return await s.json()}catch(s){throw console.error("Error fetching community details:",s),s}}async getCommunitySubscribers(r,i=100,s){const a={community:r,limit:i};s&&s.trim()!==""&&(a.last=s);const n={jsonrpc:"2.0",method:"bridge.list_community_roles",params:a,id:1};try{const u=await fetch(this.HIVE_API_URL,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)});if(!u.ok)throw new Error(`HTTP error! status: ${u.status}`);return((await u.json()).result||[]).map(d=>({username:d[0],role:d[1],extra:d[2],subscribedAt:d[3]}))}catch(u){throw console.error("Error fetching community subscribers:",u),u}}async getCommunitySubscribersList(r,i=100,s){const a={community:r,limit:i};s&&s.trim()!==""&&(a.last=s);const n={jsonrpc:"2.0",method:"bridge.list_subscribers",params:a,id:2};try{const u=await fetch(this.HIVE_API_URL,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)});if(!u.ok)throw new Error(`HTTP error! status: ${u.status}`);return((await u.json()).result||[]).map(d=>({username:d[0],role:d[1],extra:d[2],subscribedAt:d[3]}))}catch(u){throw console.error("Error fetching community subscribers list:",u),u}}async getCommunityAccounts(r){const i={jsonrpc:"2.0",method:"condenser_api.get_accounts",params:[[r]],id:2};try{const s=await fetch(this.HIVE_API_URL,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(i)});if(!s.ok)throw new Error(`HTTP error! status: ${s.status}`);return(await s.json()).result||[]}catch(s){throw console.error("Error fetching community accounts:",s),s}}async getRankedPosts(r,i="created",s=20,a,n){const u={tag:r,sort:i,limit:s};a&&n&&(u.start_author=a,u.start_permlink=n);const c={jsonrpc:"2.0",method:"bridge.get_ranked_posts",params:u,id:3};try{const d=await fetch(this.HIVE_API_URL,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(c)});if(!d.ok)throw new Error(`HTTP error! status: ${d.status}`);return(await d.json()).result||[]}catch(d){throw console.error("Error fetching ranked posts:",d),d}}communityIcon(r){return`https://images.hive.blog/u/${r}/avatar?size=icon`}userOwnerThumb(r){return`https://images.hive.blog/u/${r}/avatar`}async getCommunityActivities(r,i=100,s){const a={account:r,limit:i};s&&(a.last_id=s);const n={jsonrpc:"2.0",method:"bridge.account_notifications",params:a,id:19};try{const u=await fetch(this.HIVE_API_URL,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)});if(!u.ok)throw new Error(`HTTP error! status: ${u.status}`);return(await u.json()).result||[]}catch(u){throw console.error("Error fetching community activities:",u),u}}}const ot=new Wp,Gp=({onSelectCommunity:e,theme:r="dark"})=>{const[i,s]=O.useState([]),[a,n]=O.useState(""),[u,c]=O.useState(!0),[d,f]=O.useState(!1),[o,h]=O.useState(!0),[l,p]=O.useState(null),[x,w]=O.useState(null),b=20,g=O.useRef(null),v=O.useCallback(async(y=!1)=>{if(!(!y&&(d||!o)))try{y?(c(!0),w(null),s([]),p(null),h(!0)):f(!0);const m=a.trim(),k=await ot.getListOfCommunities(m.length>=3?m:void 0,b,y?void 0:l||void 0);s(j=>y?k:[...j,...k]),k.length<b||k.length>0&&k[k.length-1].name===l?h(!1):k.length>0&&p(k[k.length-1].name||null)}catch(m){w(m instanceof Error?m.message:"Failed to load communities"),h(!1)}finally{c(!1),f(!1)}},[a,d,o,l]);O.useEffect(()=>{const y=setTimeout(()=>{v(!0)},a.length>=3||a.length===0?0:500);return()=>clearTimeout(y)},[a]),O.useEffect(()=>{g.current?.focus()},[a,u,x]),O.useEffect(()=>{const y=()=>{window.innerHeight+document.documentElement.scrollTop>=document.documentElement.offsetHeight-200&&!d&&!u&&o&&v()};return window.addEventListener("scroll",y),()=>window.removeEventListener("scroll",y)},[v,d,u,o]);const _=()=>{v(!0)},N=()=>t.jsx("div",{className:"space-y-4",children:Array.from({length:6}).map((y,m)=>t.jsx("div",{className:`${r==="dark"?"bg-slate-900 border-gray-800":"bg-white border-gray-200"} border rounded-xl p-4 animate-pulse`,children:t.jsxs("div",{className:"flex items-center gap-4",children:[t.jsx("div",{className:`w-12 h-12 ${r==="dark"?"bg-slate-800":"bg-gray-200"} rounded-full`}),t.jsxs("div",{className:"flex-1 space-y-2",children:[t.jsx("div",{className:`h-4 ${r==="dark"?"bg-slate-800":"bg-gray-200"} rounded w-3/4`}),t.jsx("div",{className:`h-3 ${r==="dark"?"bg-slate-800":"bg-gray-200"} rounded w-1/2`})]}),t.jsx("div",{className:`h-3 ${r==="dark"?"bg-slate-800":"bg-gray-200"} rounded w-16`})]})},m))});return u&&i.length===0?t.jsxs("div",{className:`space-y-6 ${r==="dark"?"bg-slate-950":"bg-white"}`,children:[t.jsxs("div",{className:"relative",children:[t.jsx(z.Search,{className:`absolute left-3 top-1/2 transform -translate-y-1/2 ${r==="dark"?"text-gray-400":"text-gray-500"} w-5 h-5`}),t.jsx("input",{type:"text",placeholder:"Search communities...",value:a,onChange:y=>n(y.target.value),ref:g,autoFocus:!0,className:`w-full pl-10 pr-4 py-3 ${r==="dark"?"bg-slate-900 border-gray-800 text-white placeholder-gray-400":"bg-white border-gray-200 text-gray-900 placeholder-gray-500"}
|
|
1097
|
+
rounded-xl focus:outline-none focus:ring-2 focus:ring-blue-500`})]}),t.jsx(N,{})]}):x&&i.length===0?t.jsxs("div",{className:`space-y-6 ${r==="dark"?"bg-slate-950":"bg-white"}`,children:[t.jsxs("div",{className:"relative",children:[t.jsx(z.Search,{className:`absolute left-3 top-1/2 transform -translate-y-1/2 ${r==="dark"?"text-gray-400":"text-gray-500"} w-5 h-5`}),t.jsx("input",{type:"text",placeholder:"Search communities...",value:a,onChange:y=>n(y.target.value),ref:g,autoFocus:!0,className:`w-full pl-10 pr-4 py-3 ${r==="dark"?"bg-slate-900 border-gray-800 text-white placeholder-gray-400":"bg-white border-gray-200 text-gray-900 placeholder-gray-500"}
|
|
1098
|
+
rounded-xl focus:outline-none focus:ring-2 focus:ring-blue-500`})]}),t.jsx("div",{className:"flex flex-col items-center justify-center min-h-[400px] space-y-4",children:t.jsxs("div",{className:"text-center",children:[t.jsx("h3",{className:`text-lg font-semibold ${r==="dark"?"text-white":"text-gray-900"} mb-2`,children:"Failed to load communities"}),t.jsx("p",{className:`${r==="dark"?"text-gray-400":"text-gray-500"} mb-4`,children:x}),t.jsxs("button",{onClick:_,className:`m-2 inline-flex items-center justify-center rounded-md border ${r==="dark"?"border-gray-800 bg-slate-900 text-gray-400 hover:bg-gray-800 hover:text-white":"border-gray-200 bg-white text-gray-500 hover:bg-gray-100 hover:text-gray-900"} p-2 text-sm font-medium shadow-sm transition-colors disabled:opacity-50 disabled:pointer-events-none`,children:[t.jsx(z.RefreshCw,{className:"w-4 h-4 mr-2"}),"Try Again"]})]})})]}):t.jsxs("div",{className:`space-y-6 ${r==="dark"?"bg-slate-950":"bg-white"}`,children:[t.jsx("div",{className:"",children:t.jsx("h2",{className:`text-xl font-semibold ${r==="dark"?"text-white":"text-gray-900"}`,children:"Communities"})}),t.jsxs("div",{className:"relative flex justify-between items-center",children:[t.jsx(z.Search,{className:`absolute left-3 top-1/2 transform -translate-y-1/2 ${r==="dark"?"text-gray-400":"text-gray-500"} w-5 h-5`}),t.jsx("input",{type:"text",placeholder:"Search communities...",value:a,onChange:y=>n(y.target.value),ref:g,autoFocus:!0,className:`w-full pl-10 pr-4 py-3 ${r==="dark"?"bg-slate-900 border-gray-800 text-white placeholder-gray-400":"bg-white border-gray-200 text-gray-900 placeholder-gray-500"}
|
|
1099
|
+
rounded-xl focus:outline-none focus:ring-2 focus:ring-blue-500`}),t.jsx("button",{onClick:_,className:`m-2 inline-flex items-center justify-center rounded-md border ${r==="dark"?"border-gray-800 bg-slate-900 text-gray-400 hover:bg-gray-800 hover:text-white":"border-gray-200 bg-white text-gray-500 hover:bg-gray-100 hover:text-gray-900"} p-2 text-sm font-medium shadow-sm transition-colors disabled:opacity-50 disabled:pointer-events-none`,children:t.jsx(z.RefreshCw,{className:"w-4 h-4"})})]}),i.length===0?t.jsx("div",{className:"flex flex-col items-center justify-center min-h-[400px] space-y-4",children:t.jsxs("div",{className:"text-center",children:[t.jsx("h3",{className:`text-lg font-semibold ${r==="dark"?"text-white":"text-gray-900"} mb-2`,children:"No communities found"}),t.jsx("p",{className:`${r==="dark"?"text-gray-400":"text-gray-500"}`,children:a?"Try adjusting your search terms":"Check back later for new communities"})]})}):t.jsxs("div",{className:"space-y-4",children:[i.map(y=>t.jsx("div",{className:`${r==="dark"?"bg-slate-900 border-gray-800 hover:bg-slate-800":"bg-white border-gray-200 hover:bg-gray-100"} border rounded-xl p-4 transition-colors cursor-pointer`,onClick:()=>e(y.name||""),children:t.jsxs("div",{className:"flex items-center gap-4",children:[t.jsx("img",{src:ot.communityIcon(y.name||""),alt:y.title,className:"w-12 h-12 rounded-full object-cover",onError:m=>{m.target.src=`https://ui-avatars.com/api/?name=${y.title}&background=random`}}),t.jsxs("div",{className:"flex-1 min-w-0",children:[t.jsx("h3",{className:`font-semibold truncate ${r==="dark"?"text-white":"text-gray-900"}`,children:y.title}),t.jsx("p",{className:`text-sm line-clamp-2 ${r==="dark"?"text-gray-400":"text-gray-500"}`,children:y.about})]}),t.jsx("div",{className:"text-right",children:t.jsxs("p",{className:`text-sm ${r==="dark"?"text-gray-400":"text-gray-500"}`,children:[(y.subscribers||0).toLocaleString()," members"]})})]})},y.id)),o&&t.jsx("div",{className:"flex justify-center pt-4",children:d?t.jsxs("div",{className:`flex items-center gap-2 ${r==="dark"?"text-gray-400":"text-gray-500"}`,children:[t.jsx(z.Loader2,{className:"w-4 h-4 animate-spin"}),"Loading more communities..."]}):t.jsx("button",{onClick:()=>v(),className:`m-2 inline-flex items-center justify-center rounded-md border ${r==="dark"?"border-gray-800 bg-slate-900 text-gray-400 hover:bg-gray-800 hover:text-white":"border-gray-200 bg-white text-gray-500 hover:bg-gray-100 hover:text-gray-900"} p-2 text-sm font-medium shadow-sm transition-colors disabled:opacity-50 disabled:pointer-events-none`,children:"Load More Communities"})})]})]})},Ad=({communityId:e})=>{const[r,i]=O.useState(null),[s,a]=O.useState(!0),[n,u]=O.useState(null),c=async()=>{try{a(!0),u(null);const h=await ot.getCommunityDetails(e);i(h)}catch(h){u(h instanceof Error?h.message:"Failed to load community details")}finally{a(!1)}};O.useEffect(()=>{c()},[e]);const d=h=>{try{return new Date(h).toLocaleDateString("en-US",{year:"numeric",month:"long",day:"numeric"})}catch{return h}},f=h=>h.replace(/<[^>]*>/g,"");if(s)return t.jsx("div",{className:"flex items-center justify-center min-h-[400px]",children:t.jsxs("div",{className:"flex items-center gap-2 text-gray-500 dark:text-gray-400",children:[t.jsx(z.Loader2,{className:"w-5 h-5 animate-spin"}),"Loading community details..."]})});if(n)return t.jsx("div",{className:"flex flex-col items-center justify-center min-h-[400px] space-y-4",children:t.jsxs("div",{className:"text-center",children:[t.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-white mb-2",children:"Failed to load community details"}),t.jsx("p",{className:"text-gray-500 dark:text-gray-400 mb-4",children:n}),t.jsxs("button",{onClick:c,className:"m-2 inline-flex items-center justify-center rounded-md border border-input bg-background p-2 text-sm font-medium text-foreground shadow-sm transition-colors hover:bg-accent hover:text-accent-foreground disabled:opacity-50 disabled:pointer-events-none",children:[t.jsx(z.RefreshCw,{className:"w-4 h-4"}),"Try Again"]})]})});if(!r?.result)return t.jsx("div",{className:"flex items-center justify-center min-h-[400px]",children:t.jsx("p",{className:"text-gray-500 dark:text-gray-400",children:"No community details available"})});const o=r.result;return t.jsx("div",{className:"space-y-6",children:t.jsxs("div",{className:"bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-xl p-6",children:[o.about&&t.jsxs("div",{className:"mb-6",children:[t.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-white mb-3",children:"About"}),t.jsx("p",{className:"text-gray-600 dark:text-gray-300 leading-relaxed",children:f(o.about)})]}),o.description&&t.jsxs("div",{className:"mb-6",children:[t.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-white mb-3",children:"Information"}),t.jsx("div",{className:"text-gray-600 dark:text-gray-300 leading-relaxed whitespace-pre-wrap",children:f(o.description)})]}),o.flag_text&&t.jsxs("div",{className:"mb-6",children:[t.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-white mb-3",children:"Community Rules"}),t.jsx("div",{className:"text-gray-600 dark:text-gray-300 leading-relaxed whitespace-pre-wrap",children:f(o.flag_text)})]}),t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:[t.jsxs("div",{className:"bg-gray-50 dark:bg-gray-900 p-4 rounded-lg",children:[t.jsx("h4",{className:"text-sm font-medium text-gray-500 dark:text-gray-400 mb-1",children:"Total Authors"}),t.jsx("p",{className:"text-2xl font-bold text-gray-900 dark:text-white",children:o.num_authors?.toLocaleString()||"0"})]}),t.jsxs("div",{className:"bg-gray-50 dark:bg-gray-900 p-4 rounded-lg",children:[t.jsx("h4",{className:"text-sm font-medium text-gray-500 dark:text-gray-400 mb-1",children:"Subscribers"}),t.jsx("p",{className:"text-2xl font-bold text-gray-900 dark:text-white",children:o.subscribers?.toLocaleString()||"0"})]}),t.jsxs("div",{className:"bg-gray-50 dark:bg-gray-900 p-4 rounded-lg",children:[t.jsx("h4",{className:"text-sm font-medium text-gray-500 dark:text-gray-400 mb-1",children:"Created"}),t.jsx("p",{className:"text-lg font-semibold text-gray-900 dark:text-white",children:o.created_at?d(o.created_at):"Unknown"})]}),o.lang&&t.jsxs("div",{className:"bg-gray-50 dark:bg-gray-900 p-4 rounded-lg",children:[t.jsx("h4",{className:"text-sm font-medium text-gray-500 dark:text-gray-400 mb-1",children:"Language"}),t.jsx("p",{className:"text-lg font-semibold text-gray-900 dark:text-white",children:o.lang.toUpperCase()})]}),t.jsxs("div",{className:"bg-gray-50 dark:bg-gray-900 p-4 rounded-lg",children:[t.jsx("h4",{className:"text-sm font-medium text-gray-500 dark:text-gray-400 mb-1",children:"Pending Posts"}),t.jsx("p",{className:"text-lg font-semibold text-gray-900 dark:text-white",children:o.num_pending?.toLocaleString()||"0"})]}),t.jsxs("div",{className:"bg-gray-50 dark:bg-gray-900 p-4 rounded-lg",children:[t.jsx("h4",{className:"text-sm font-medium text-gray-500 dark:text-gray-400 mb-1",children:"Type"}),t.jsx("p",{className:"text-lg font-semibold text-gray-900 dark:text-white",children:o.is_nsfw?"NSFW":"Safe"})]})]})]})})},Sd=({communityId:e,onSelectTeamMember:r})=>{const[i,s]=O.useState(null),[a,n]=O.useState(!0),[u,c]=O.useState(null),d=async()=>{try{n(!0),c(null);const o=await ot.getCommunityDetails(e);s(o)}catch(o){c(o instanceof Error?o.message:"Failed to load team details")}finally{n(!1)}};O.useEffect(()=>{d()},[e]);const f=i?.result?.team||[];return a?t.jsx("div",{className:"flex items-center justify-center min-h-[400px]",children:t.jsxs("div",{className:"flex items-center gap-2 text-gray-500 dark:text-gray-400",children:[t.jsx(z.Loader2,{className:"w-5 h-5 animate-spin"}),"Loading team members..."]})}):u?t.jsx("div",{className:"flex flex-col items-center justify-center min-h-[400px] space-y-4",children:t.jsxs("div",{className:"text-center",children:[t.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-white mb-2",children:"Failed to load team details"}),t.jsx("p",{className:"text-gray-500 dark:text-gray-400 mb-4",children:u}),t.jsxs("button",{onClick:d,className:"m-2 inline-flex items-center justify-center rounded-md border border-input text-gray-400 cursor-pointer bg-background p-2 text-sm font-medium text-foreground shadow-sm transition-colors hover:bg-accent hover:text-accent-foreground disabled:opacity-50 disabled:pointer-events-none",children:[t.jsx(z.RefreshCw,{className:"w-4 h-4 mr-2"}),"Try Again"]})]})}):f.length===0?t.jsx("div",{className:"flex items-center justify-center min-h-[400px]",children:t.jsx("p",{className:"text-gray-500 dark:text-gray-400",children:"No team members found"})}):t.jsx("div",{className:"space-y-6",children:t.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-4",children:f.map((o,h)=>{const l=o[0],p=o.length>1?o[1]:"";return t.jsx("div",{onClick:()=>r&&r(l),className:`bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700
|
|
1100
1100
|
rounded-xl p-4 hover:bg-gray-300 dark:hover:bg-gray-700
|
|
1101
|
-
transition-colors cursor-pointer`,children:t.jsxs("div",{className:"flex items-center gap-3",children:[t.jsx("img",{src:ot.userOwnerThumb(l),alt:l,className:"w-12 h-12 rounded-full object-cover",onError:x=>{x.target.src=`https://ui-avatars.com/api/?name=${l}&background=random`}}),t.jsxs("div",{className:"flex-1 min-w-0",children:[t.jsxs("h3",{className:"font-semibold text-gray-900 dark:text-white truncate",children:["@",l]}),p&&t.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400 capitalize truncate",children:p})]})]})},`${l}-${h}`)})})})},Cd=({communityId:e,onSelectCommunityMember:a})=>{const[i,s]=P.useState([]),[r,n]=P.useState(!0),[u,c]=P.useState(!1),[d,f]=P.useState(!0),[o,h]=P.useState(null),[l,p]=P.useState(null),x=100,w=P.useCallback(async(b=!1)=>{if(!(u&&!b))try{b?(n(!0),p(null),s([]),h(null),f(!0)):c(!0);const g=await ot.getCommunitySubscribers(e,x,b?void 0:o||void 0);g.length===0?f(!1):(s(v=>{if(b)return g;const _=new Set(v.map(y=>y.username)),N=g.filter(y=>!_.has(y.username));return[...v,...N]}),g.length>0&&h(g[g.length-1].username),f(g.length===x))}catch(g){p(g instanceof Error?g.message:"Failed to load members")}finally{n(!1),c(!1)}},[e,u,o]);return P.useEffect(()=>{w(!0)},[e]),P.useEffect(()=>{const b=()=>{window.innerHeight+document.documentElement.scrollTop>=document.documentElement.offsetHeight-200&&!u&&!r&&d&&w()};return window.addEventListener("scroll",b),()=>window.removeEventListener("scroll",b)},[w,u,r,d]),r&&i.length===0?t.jsx("div",{className:"flex items-center justify-center min-h-[400px]",children:t.jsxs("div",{className:"flex items-center gap-2 text-gray-500 dark:text-gray-400",children:[t.jsx(z.Loader2,{className:"w-5 h-5 animate-spin"}),"Loading members..."]})}):l&&i.length===0?t.jsx("div",{className:"flex flex-col items-center justify-center min-h-[400px] space-y-4",children:t.jsxs("div",{className:"text-center",children:[t.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-white mb-2",children:"Failed to load members"}),t.jsx("p",{className:"text-gray-500 dark:text-gray-400 mb-4",children:l}),t.jsxs("button",{onClick:()=>w(!0),className:"m-2 inline-flex items-center justify-center rounded-md border border-input bg-background p-2 text-sm font-medium text-foreground shadow-sm transition-colors hover:bg-accent hover:text-accent-foreground disabled:opacity-50 disabled:pointer-events-none",children:[t.jsx(z.RefreshCw,{className:"w-4 h-4 mr-2"}),"Try Again"]})]})}):i.length===0?t.jsx("div",{className:"flex items-center justify-center min-h-[400px]",children:t.jsx("p",{className:"text-gray-500 dark:text-gray-400",children:"No community members found"})}):t.jsxs("div",{className:"space-y-6",children:[t.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-4",children:i.map((b,g)=>t.jsx("div",{className:"bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-xl p-4 hover:bg-gray-300 dark:hover:bg-gray-700 transition-colors cursor-pointer",onClick:()=>a?.(b.username),children:t.jsxs("div",{className:"flex items-center gap-3",children:[t.jsx("img",{src:ot.userOwnerThumb(b.username),alt:b.username,className:"w-12 h-12 rounded-full object-cover",onError:v=>{v.target.src=`https://ui-avatars.com/api/?name=${b.username}&background=random`}}),t.jsxs("div",{className:"flex-1 min-w-0",children:[t.jsxs("h3",{className:"font-semibold text-gray-900 dark:text-white truncate",children:["@",b.username]}),b.role&&t.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400 capitalize truncate",children:b.role})]})]})},`${b.username}-${g}`))}),d&&t.jsx("div",{className:"flex justify-center pt-4",children:u?t.jsxs("div",{className:"flex items-center gap-2 text-gray-500 dark:text-gray-400",children:[t.jsx(z.Loader2,{className:"w-4 h-4 animate-spin"}),"Loading more members..."]}):t.jsx("button",{onClick:()=>w(),className:"m-2 inline-flex items-center justify-center rounded-md border border-input bg-background p-2 text-sm font-medium text-foreground shadow-sm transition-colors hover:bg-accent hover:text-accent-foreground disabled:opacity-50 disabled:pointer-events-none",children:"Load More Members"})})]})},Jp=({communityId:e,onVideoClick:a,onAuthorClick:i,onBack:s,onclickAboutTab:r,onclickTeamTab:n,onclickMemberTab:u,onShare:c,onFavourite:d,onRss:f,onMoreVertical:o,showMoreVertical:h=!0})=>{const l=kc.useNavigate(),[p,x]=P.useState("videos"),[w,b]=P.useState(null),[g,v]=P.useState(!1),[_,N]=P.useState(!0);P.useEffect(()=>{(async()=>{try{N(!0);const D=await ot.getCommunityDetails(e);b(D)}catch(D){console.error("Failed to fetch community details:",D)}finally{N(!1)}})()},[e]);const y=()=>{const A=`https://3speak.tv/user/${e}`;navigator.share?navigator.share({title:w?.result?.title||e,url:A}):navigator.clipboard.writeText(A)},m=()=>{window.open(`https://3speak.tv/rss/${e}.xml`,"_blank")},k=A=>{l(`/user/${A}`)};if(_)return t.jsx("div",{className:"space-y-6",children:t.jsxs("div",{className:"animate-pulse",children:[t.jsx("div",{className:"h-8 bg-gray-200 dark:bg-gray-700 rounded w-32 mb-6"}),t.jsxs("div",{className:"bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-xl p-6",children:[t.jsxs("div",{className:"flex items-center gap-4 mb-4",children:[t.jsx("div",{className:"w-16 h-16 bg-gray-200 dark:bg-gray-700 rounded-full"}),t.jsxs("div",{className:"flex-1 space-y-2",children:[t.jsx("div",{className:"h-6 bg-gray-200 dark:bg-gray-700 rounded w-48"}),t.jsx("div",{className:"h-4 bg-gray-200 dark:bg-gray-700 rounded w-32"})]})]}),t.jsx("div",{className:"flex gap-2",children:Array.from({length:4}).map((A,D)=>t.jsx("div",{className:"h-10 bg-gray-200 dark:bg-gray-700 rounded w-20"},D))})]})]})});const j=w?.result;return t.jsxs("div",{className:"space-y-6",children:[t.jsxs("button",{onClick:s,className:"flex items-center justify-center mr-4 px-2 text-gray-400 hover:bg-gray-200 dark:hover:bg-gray-700 rounded-full",children:[t.jsx(z.ArrowLeft,{className:"w-4 h-4 mr-2"}),"Back"]}),t.jsx("div",{className:"bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-xl p-6",children:t.jsxs("div",{className:"flex flex-col md:flex-row items-start md:items-center gap-6",children:[t.jsx("img",{src:ot.userOwnerThumb(e),alt:j?.title||e,className:"w-16 h-16 rounded-full object-cover",onError:A=>{A.target.src=`https://images.hive.blog/u/${j?.title||e}/avatar`}}),t.jsxs("div",{className:"flex-1",children:[t.jsx("h1",{className:"text-2xl font-bold text-gray-900 dark:text-white mb-2",children:j?.title||e}),t.jsx("p",{className:"text-gray-600 dark:text-gray-400 mb-4",children:j?.about||"Community description"}),t.jsxs("div",{className:"flex flex-wrap gap-6 text-sm",children:[t.jsxs("div",{className:"flex items-center gap-2 text-gray-500 dark:text-gray-400",children:[t.jsx(z.Users,{className:"w-4 h-4"}),t.jsxs("span",{children:[(j?.subscribers||0).toLocaleString()," members"]})]}),t.jsxs("div",{className:"flex items-center gap-2 text-gray-500 dark:text-gray-400",children:[t.jsx(z.Calendar,{className:"w-4 h-4"}),t.jsxs("span",{children:["Created"," ",j?.created_at?new Date(j.created_at).getFullYear():"Unknown"]})]})]})]}),t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx(so,{id:e,toastType:"community",onAdd:(A,D)=>console.log("Added:",A,D),onRemove:(A,D)=>console.log("Removed:",A,D),onFavourite:d}),t.jsx("button",{onClick:f||m,className:"p-2 rounded-lg border border-gray-300 dark:border-gray-600 text-gray-600 dark:text-gray-300 hover:bg-gray-300 dark:hover:bg-gray-700",children:t.jsx(z.Rss,{className:"w-4 h-4"})}),t.jsx("button",{onClick:c||y,className:"p-2 rounded-lg border border-gray-300 dark:border-gray-600 text-gray-600 dark:text-gray-300 hover:bg-gray-300 dark:hover:bg-gray-700",children:t.jsx(z.Share2,{className:"w-4 h-4"})}),h&&t.jsx("button",{onClick:o||(()=>{}),className:"p-2 rounded-lg border border-gray-300 dark:border-gray-600 text-gray-600 dark:text-gray-300 hover:bg-gray-300 dark:hover:bg-gray-700",children:t.jsx(z.MoreVertical,{className:"w-4 h-4"})})]})]})}),t.jsxs("div",{children:[t.jsxs("div",{className:"grid grid-cols-4 w-full bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg overflow-hidden",children:[t.jsx("button",{onClick:()=>x("videos"),className:`px-4 py-2 text-xs sm:text-sm font-medium transition-colors ${p==="videos"?"bg-blue-600 dark:bg-blue-500 text-white":"text-gray-700 dark:text-gray-300 hover:bg-gray-300 dark:hover:bg-gray-700"}`,children:"Videos"}),t.jsx("button",{onClick:()=>r?r():x("about"),className:`px-4 py-2 text-xs sm:text-sm font-medium transition-colors ${p==="about"?"bg-blue-600 dark:bg-blue-500 text-white":"text-gray-700 dark:text-gray-300 hover:bg-gray-300 dark:hover:bg-gray-700"}`,children:"About"}),t.jsx("button",{onClick:()=>n?n():x("team"),className:`px-4 py-2 text-xs sm:text-sm font-medium transition-colors ${p==="team"?"bg-blue-600 dark:bg-blue-500 text-white":"text-gray-700 dark:text-gray-300 hover:bg-gray-300 dark:hover:bg-gray-700"}`,children:"Team"}),t.jsx("button",{onClick:()=>u?u():x("members"),className:`px-4 py-2 text-xs sm:text-sm font-medium transition-colors ${p==="members"?"bg-blue-600 dark:bg-blue-500 text-white":"text-gray-700 dark:text-gray-300 hover:bg-gray-300 dark:hover:bg-gray-700"}`,children:"Members"})]}),t.jsxs("div",{className:"mt-6",children:[p==="videos"&&t.jsx(ss,{feedType:Ge.COMMUNITY,communityId:e,onVideoClick:a,onAuthorClick:i}),p==="about"&&!r&&t.jsx(Ad,{communityId:e}),p==="team"&&!n&&t.jsx(Sd,{communityId:e,onSelectTeamMember:k}),p==="members"&&!u&&t.jsx(Cd,{communityId:e,onSelectCommunityMember:k})]})]})]})},Yp=({communityId:e,onAuthorClick:a,onPostClick:i,onCommunityClick:s,onPayoutClick:r,onUpvoteClick:n,onCommentClick:u,onReblogClick:c,theme:d="dark"})=>{const[f,o]=P.useState("posts"),[h,l]=P.useState(null),[p,x]=P.useState([]),[w,b]=P.useState([]),[g,v]=P.useState(!0),[_,N]=P.useState(!1),[y,m]=P.useState(!1),[k,j]=P.useState(null);P.useEffect(()=>{(async()=>{try{v(!0),j(null);const H=await ot.getCommunityDetails(e);l(H.result)}catch(H){j(H instanceof Error?H.message:"Failed to fetch community details")}finally{v(!1)}})()},[e]),P.useEffect(()=>{f==="subscribers"&&h?A():f==="activities"&&h&&D()},[f,h]);const A=async()=>{try{N(!0);const L=await ot.getCommunitySubscribersList(e,100);x(L)}catch(L){console.error("Failed to fetch subscribers:",L)}finally{N(!1)}},D=async()=>{try{m(!0);const L=await ot.getCommunityActivities(e,100);b(L)}catch(L){console.error("Failed to fetch activities:",L)}finally{m(!1)}},C=L=>{try{const H=new Date(L),B=new Date().getTime()-H.getTime(),$=Math.floor(B/1e3),G=Math.floor($/60),X=Math.floor(G/60),ee=Math.floor(X/24),R=Math.floor(ee/30),se=Math.floor(ee/365);return se>0?`${se} year${se>1?"s":""} ago`:R>0?`${R} month${R>1?"s":""} ago`:ee>0?`${ee} day${ee>1?"s":""} ago`:X>0?`${X} hour${X>1?"s":""} ago`:G>0?`${G} minute${G>1?"s":""} ago`:"just now"}catch{return L}},O=L=>L.replace(/<[^>]*>/g,"");return g?t.jsx("div",{className:`flex items-center justify-center min-h-[400px] ${d==="dark"?"bg-slate-950":"bg-white"}`,children:t.jsxs("div",{className:`flex items-center gap-2 ${d==="dark"?"text-gray-400":"text-gray-500"}`,children:[t.jsx(z.Loader2,{className:"w-5 h-5 animate-spin"}),"Loading community details..."]})}):k||!h?t.jsxs("div",{className:`flex flex-col items-center justify-center min-h-[400px] space-y-4 ${d==="dark"?"bg-slate-950":"bg-white"}`,children:[t.jsx("h3",{className:`text-lg font-semibold ${d==="dark"?"text-white":"text-gray-900"}`,children:"Failed to load community details"}),t.jsx("p",{className:`${d==="dark"?"text-gray-400":"text-gray-500"}`,children:k})]}):t.jsxs("div",{className:`space-y-6 ${d==="dark"?"bg-slate-950":"bg-white"}`,children:[t.jsx("div",{className:`${d==="dark"?"bg-slate-900 border-gray-800":"bg-white border-gray-200"} border rounded-xl p-6`,children:t.jsxs("div",{className:"flex flex-col md:flex-row items-start md:items-center gap-6",children:[t.jsx("img",{src:ot.userOwnerThumb(e),alt:h.title,className:"w-16 h-16 rounded-full object-cover",onError:L=>{L.target.src=`https://images.hive.blog/u/${h.title}/avatar`}}),t.jsxs("div",{className:"flex-1",children:[t.jsx("h1",{className:`text-2xl font-bold mb-2 ${d==="dark"?"text-white":"text-gray-900"}`,children:h.title}),t.jsx("p",{className:`${d==="dark"?"text-gray-400":"text-gray-600"} mb-4`,children:h.about}),t.jsxs("div",{className:"flex flex-wrap gap-6 text-sm",children:[t.jsxs("div",{className:`flex items-center gap-2 ${d==="dark"?"text-gray-400":"text-gray-500"}`,children:[t.jsx(z.Users,{className:"w-4 h-4"}),t.jsxs("span",{children:[h.subscribers.toLocaleString()," members"]})]}),t.jsxs("div",{className:`flex items-center gap-2 ${d==="dark"?"text-gray-400":"text-gray-500"}`,children:[t.jsx(z.Calendar,{className:"w-4 h-4"}),t.jsxs("span",{children:["Created ",C(h.created_at)]})]})]})]})]})}),t.jsxs("div",{children:[t.jsxs("div",{className:`flex md:grid md:grid-cols-4 overflow-x-auto md:overflow-visible w-full ${d==="dark"?"bg-slate-900 border-gray-800":"bg-white border-gray-200"} border rounded-lg`,children:[t.jsx("button",{onClick:()=>o("posts"),className:`flex-shrink-0 md:flex-shrink px-4 py-2 text-xs sm:text-sm font-medium transition-colors ${f==="posts"?`${d==="dark"?"bg-blue-500 text-white":"bg-blue-600 text-white"}`:`${d==="dark"?"text-gray-300 hover:bg-gray-700":"text-gray-500 hover:bg-gray-300"}`}`,children:"Posts"}),t.jsx("button",{onClick:()=>o("about"),className:`flex-shrink-0 md:flex-shrink px-4 py-2 text-xs sm:text-sm font-medium transition-colors ${f==="about"?`${d==="dark"?"bg-blue-500 text-white":"bg-blue-600 text-white"}`:`${d==="dark"?"text-gray-300 hover:bg-gray-700":"text-gray-700 hover:bg-gray-300"}`}`,children:"About"}),t.jsx("button",{onClick:()=>o("subscribers"),className:`flex-shrink-0 md:flex-shrink px-4 py-2 text-xs sm:text-sm font-medium transition-colors ${f==="subscribers"?`${d==="dark"?"bg-blue-500 text-white":"bg-blue-600 text-white"}`:`${d==="dark"?"text-gray-300 hover:bg-gray-700":"text-gray-700 hover:bg-gray-300"}`}`,children:"Subscribers"}),t.jsx("button",{onClick:()=>o("activities"),className:`flex-shrink-0 md:flex-shrink px-4 py-2 text-xs sm:text-sm font-medium transition-colors ${f==="activities"?`${d==="dark"?"bg-blue-500 text-white":"bg-blue-600 text-white"}`:`${d==="dark"?"text-gray-300 hover:bg-gray-700":"text-gray-700 hover:bg-gray-300"}`}`,children:"Activities"})]}),t.jsxs("div",{className:"mt-6",children:[f==="posts"&&t.jsx(Nd,{tag:e,sort:"created",limit:20,showSortDropdown:!1,onAuthorClick:a,onPostClick:i,onCommunityClick:s,onPayoutClick:r,onUpvoteClick:n,onCommentClick:u,onReblogClick:c,theme:d}),f==="about"&&t.jsxs("div",{className:`${d==="dark"?"bg-slate-900 border-gray-800":"bg-white border-gray-200"} border rounded-xl p-6`,children:[h.about&&t.jsxs("div",{className:"mb-6",children:[t.jsx("h3",{className:`text-lg font-semibold mb-3 ${d==="dark"?"text-white":"text-gray-900"}`,children:"About"}),t.jsx("p",{className:`${d==="dark"?"text-gray-300":"text-gray-600"} leading-relaxed`,children:O(h.about)})]}),h.description&&t.jsxs("div",{className:"mb-6",children:[t.jsx("h3",{className:`text-lg font-semibold mb-3 ${d==="dark"?"text-white":"text-gray-900"}`,children:"Information"}),t.jsx("div",{className:`${d==="dark"?"text-gray-300":"text-gray-600"} leading-relaxed whitespace-pre-wrap`,children:O(h.description)})]}),h.flag_text&&t.jsxs("div",{className:"mb-6",children:[t.jsx("h3",{className:`text-lg font-semibold mb-3 ${d==="dark"?"text-white":"text-gray-900"}`,children:"Community Rules"}),t.jsx("div",{className:`${d==="dark"?"text-gray-300":"text-gray-600"} leading-relaxed whitespace-pre-wrap`,children:O(h.flag_text)})]}),t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:[t.jsxs("div",{className:`${d==="dark"?"bg-slate-800":"bg-gray-50"} p-4 rounded-lg`,children:[t.jsx("h4",{className:`text-sm font-medium mb-1 ${d==="dark"?"text-gray-400":"text-gray-500"}`,children:"Total Authors"}),t.jsx("p",{className:`text-2xl font-bold ${d==="dark"?"text-white":"text-gray-900"}`,children:h.num_authors.toLocaleString()})]}),t.jsxs("div",{className:`${d==="dark"?"bg-slate-800":"bg-gray-50"} p-4 rounded-lg`,children:[t.jsx("h4",{className:`text-sm font-medium mb-1 ${d==="dark"?"text-gray-400":"text-gray-500"}`,children:"Subscribers"}),t.jsx("p",{className:`text-2xl font-bold ${d==="dark"?"text-white":"text-gray-900"}`,children:h.subscribers.toLocaleString()})]}),t.jsxs("div",{className:`${d==="dark"?"bg-slate-800":"bg-gray-50"} p-4 rounded-lg`,children:[t.jsx("h4",{className:`text-sm font-medium mb-1 ${d==="dark"?"text-gray-400":"text-gray-500"}`,children:"Created"}),t.jsx("p",{className:`text-lg font-semibold ${d==="dark"?"text-white":"text-gray-900"}`,children:C(h.created_at)})]}),h.lang&&t.jsxs("div",{className:`${d==="dark"?"bg-slate-800":"bg-gray-50"} p-4 rounded-lg`,children:[t.jsx("h4",{className:`text-sm font-medium mb-1 ${d==="dark"?"text-gray-400":"text-gray-500"}`,children:"Language"}),t.jsx("p",{className:`text-lg font-semibold ${d==="dark"?"text-white":"text-gray-900"}`,children:h.lang.toUpperCase()})]}),t.jsxs("div",{className:`${d==="dark"?"bg-slate-800":"bg-gray-50"} p-4 rounded-lg`,children:[t.jsx("h4",{className:`text-sm font-medium mb-1 ${d==="dark"?"text-gray-400":"text-gray-500"}`,children:"Pending Posts"}),t.jsx("p",{className:`text-lg font-semibold ${d==="dark"?"text-white":"text-gray-900"}`,children:h.num_pending.toLocaleString()})]}),t.jsxs("div",{className:`${d==="dark"?"bg-slate-800":"bg-gray-50"} p-4 rounded-lg`,children:[t.jsx("h4",{className:`text-sm font-medium mb-1 ${d==="dark"?"text-gray-400":"text-gray-500"}`,children:"Type"}),t.jsx("p",{className:`text-lg font-semibold ${d==="dark"?"text-white":"text-gray-900"}`,children:h.is_nsfw?"NSFW":"Safe"})]})]})]}),f==="subscribers"&&t.jsx("div",{className:`${d==="dark"?"bg-slate-900 border-gray-800":"bg-white border-gray-200"} border rounded-xl p-6`,children:_?t.jsx("div",{className:"flex items-center justify-center min-h-[200px]",children:t.jsx(z.Loader2,{className:"w-5 h-5 animate-spin"})}):p.length>0?t.jsxs("div",{className:"space-y-4",children:[t.jsxs("h3",{className:`text-lg font-semibold mb-4 ${d==="dark"?"text-white":"text-gray-900"}`,children:["Subscribers (",p.length,")"]}),p.map(L=>t.jsxs("div",{className:`${d==="dark"?"bg-slate-800":"bg-gray-50"} flex items-center gap-4 p-4 rounded-lg`,children:[t.jsx("img",{src:ot.userOwnerThumb(L.username),alt:L.username,className:"w-10 h-10 rounded-full object-cover",onError:H=>{H.target.src=`https://images.hive.blog/u/${L.username}/avatar`}}),t.jsxs("div",{className:"flex-1",children:[t.jsxs("p",{className:`font-medium ${d==="dark"?"text-white":"text-gray-900"}`,children:["@",L.username]}),t.jsxs("p",{className:`text-sm ${d==="dark"?"text-gray-400":"text-gray-500"}`,children:["Role: ",L.role," • Subscribed"," ",C(L.subscribedAt)]})]})]},L.username))]}):t.jsx("div",{className:`text-center py-8 ${d==="dark"?"text-gray-400":"text-gray-500"}`,children:"No subscribers found"})}),f==="activities"&&t.jsx("div",{className:`${d==="dark"?"bg-slate-900 border-gray-800":"bg-white border-gray-200"} border rounded-xl p-6`,children:y?t.jsx("div",{className:"flex items-center justify-center min-h-[200px]",children:t.jsx(z.Loader2,{className:"w-5 h-5 animate-spin"})}):w.length>0?t.jsxs("div",{className:"space-y-4",children:[t.jsxs("h3",{className:`text-lg font-semibold mb-4 ${d==="dark"?"text-white":"text-gray-900"}`,children:["Recent Activities (",w.length,")"]}),w.map(L=>{const H=L.msg.split(" ")[0].substring(1);return t.jsxs("div",{className:`${d==="dark"?"bg-slate-800":"bg-gray-50"} flex items-center gap-4 p-4 rounded-lg`,children:[t.jsx("img",{src:ot.userOwnerThumb(H),alt:H,className:"w-10 h-10 rounded-full object-cover",onError:F=>{F.target.src=`https://images.hive.blog/u/${H}/avatar`}}),t.jsxs("div",{className:"flex-1",children:[t.jsx("p",{className:`mb-1 ${d==="dark"?"text-white":"text-gray-900"}`,children:L.msg}),t.jsxs("p",{className:`text-sm ${d==="dark"?"text-gray-400":"text-gray-500"}`,children:[C(L.date),L.score&&` • Score: ${L.score}`]})]})]},L.id)})]}):t.jsx("div",{className:`text-center py-8 ${d==="dark"?"text-gray-400":"text-gray-500"}`,children:"No activities found"})})]})]})]})},Zp=({currentUser:e,onTabChanged:a,onPublish:i,onViewMyVideo:s,onMoreOptions:r,onTapBackButton:n,shouldShowBackButton:u=!0,shouldShowPublishButton:c=!1,shouldShowMoreOptionsButton:d=!1})=>{const f=kc.useNavigate(),[o,h]=P.useState(0),[l,p]=P.useState([]),[x,w]=P.useState(!0),[b,g]=P.useState(null),v=l.filter(C=>["encoding","uploaded","encoding_queued","encoding_preparing","ipfs_pinning","ipfs_pinning_failed","encoding_failed","encoding_ipfs"].includes(C.status||"")),_=l.filter(C=>C.status==="publish_manual"),N=l.filter(C=>C.status==="published");P.useEffect(()=>{e?.token&&y()},[e]);const y=async()=>{if(!e?.token){g("No authentication token provided"),w(!1);return}w(!0),g(null);try{const C=await Re.getMyVideos(e.token);p(C)}catch(C){console.error("Error fetching videos:",C),g(`Failed to load videos: ${C instanceof Error?C.message:"Unknown error"}`)}finally{w(!1)}},m=C=>{h(C),a?.(C)},k=C=>{C.owner&&C.permlink&&f(`/video/${C.owner}/${C.permlink}`)},j=C=>{switch(C.toLowerCase()){case"published":return"bg-green-500";case"encoding":case"encoding_queued":return"bg-orange-500";case"uploaded":return"bg-blue-500";case"publish_manual":return"bg-purple-500";default:return"bg-gray-500"}},A=["ipfs_pinning","ipfs_pinning_failed","encoding","encoding_failed","encoding_ipfs"],D=(C,O)=>{if(C.length===0){let L="";switch(O){case"publishNow":L="No videos ready to publish.";break;case"myVideos":L="No published videos found.";break;case"encoding":L="No videos currently encoding.";break}return t.jsxs("div",{className:"flex flex-col items-center justify-center py-16",children:[t.jsx(z.Video,{className:"w-16 h-16 text-gray-400 mb-4"}),t.jsx("p",{className:"text-gray-600 dark:text-gray-400 text-center",children:L})]})}return t.jsx("div",{className:"space-y-3 w-full",children:C.map((L,H)=>{const F=L.thumbnail||"",B=L.title||"No Title",$=L.permlink||"",G=L.owner||e?.username||"",X=L.id||"",ee=A.includes(L.status||"");return t.jsx("div",{className:"bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg p-3 hover:shadow-md transition-shadow",children:t.jsxs("div",{className:"flex items-center gap-3",children:[t.jsxs("div",{className:"relative flex-shrink-0",children:[t.jsx("img",{src:Br(F)||`https://images.hive.blog/u/${e?.username}/avatar`,alt:B,className:"w-24 h-16 rounded-lg object-cover",onError:R=>{R.target.src=`https://images.hive.blog/u/${e?.username}/avatar`}}),A.includes(L.status||"")?t.jsx("div",{className:"absolute inset-0 flex items-center justify-center bg-black/30 rounded-lg",children:t.jsx(z.Ban,{className:"w-6 h-6 text-red-500"})}):t.jsx("div",{className:"absolute inset-0 flex items-center justify-center bg-black/20 opacity-0 hover:opacity-100 transition-opacity cursor-pointer rounded-lg",onClick:()=>k(L),children:t.jsx(z.Play,{className:"w-6 h-6 text-white"})})]}),t.jsxs("div",{className:"flex-1 min-w-0",children:[t.jsx("h3",{className:"font-semibold text-gray-900 dark:text-white text-sm cursor-pointer hover:text-blue-600 dark:hover:text-blue-400",onClick:()=>k(L),style:{display:"-webkit-box",WebkitLineClamp:2,WebkitBoxOrient:"vertical",overflow:"hidden",textOverflow:"ellipsis"},children:B}),t.jsxs("p",{className:"text-gray-600 dark:text-gray-400 text-xs mt-1",children:["By ",G]}),L.status&&t.jsx("div",{className:"mt-2",children:t.jsx("span",{className:`inline-block px-2 py-1 rounded-full text-xs font-semibold text-white ${j(L.status)}`,children:L.status.toUpperCase()})})]}),ee?t.jsx("div",{className:"flex-shrink-0 pl-2",children:t.jsx(z.Ban,{className:"w-5 h-5 text-red-500"})}):t.jsxs("div",{className:"flex flex-col items-end gap-2",children:[O==="publishNow"&&c&&t.jsx("button",{onClick:()=>i?.(G,$),className:"bg-green-600 hover:bg-green-700 text-white text-xs px-3 py-1 rounded-md transition-colors",children:"Publish"}),O==="myVideos"&&t.jsx("button",{onClick:()=>s?s(G,$):k(L),className:"bg-blue-600 hover:bg-blue-700 text-white text-xs px-3 py-1 rounded-md transition-colors",children:"View"}),d&&t.jsx("button",{onClick:()=>r?.(X),className:"p-1 h-6 w-6 rounded-md hover:bg-gray-300 dark:hover:bg-gray-700 transition-colors",children:t.jsx(z.MoreVertical,{className:"w-4 h-4"})})]})]})},`${X}-${H}`)})})};return e?t.jsxs("div",{className:"min-h-screen bg-gray-50 dark:bg-gray-900",children:[u&&t.jsxs("button",{onClick:n,className:"flex items-center justify-center mr-4 my-2 px-2 text-gray-400 hover:bg-gray-200 dark:hover:bg-gray-700 rounded-full",children:[t.jsx(z.ArrowLeft,{className:"w-4 h-4 mr-2"}),"Back"]}),t.jsxs("div",{className:"bg-white dark:bg-gray-800 border-b border-gray-200 dark:border-gray-700",children:[t.jsxs("div",{className:"flex items-center justify-between p-4",children:[t.jsx("div",{className:"flex items-center gap-3",children:t.jsxs("div",{className:"flex items-center gap-3",children:[t.jsx("img",{src:`https://images.hive.blog/u/${e.username}/avatar`,alt:e.username,className:"w-12 h-12 md:w-16 md:h-16 rounded-full object-cover border-2 border-gray-200 dark:border-gray-700",onError:C=>{C.target.src=`https://ui-avatars.com/api/?name=${e.username}&background=random&size=64`}}),t.jsx("div",{children:t.jsx("h1",{className:"text-lg md:text-xl font-semibold text-gray-900 dark:text-white",children:e.username})})]})}),t.jsx("div",{className:"flex items-center gap-2",children:t.jsx("button",{onClick:y,className:"p-2 rounded-md hover:bg-gray-300 dark:hover:bg-gray-700 transition-colors",children:t.jsx(z.RefreshCw,{className:"w-5 h-5"})})})]}),t.jsx("div",{className:"border-b border-gray-200 dark:border-gray-700",children:t.jsxs("div",{className:"flex overflow-x-auto scrollbar-hide",children:[t.jsxs("button",{onClick:()=>m(0),className:`flex items-center gap-2 px-4 md:px-6 py-3 border-b-2 font-medium text-sm transition-colors whitespace-nowrap flex-shrink-0 ${o===0?"border-blue-500 text-blue-600 dark:text-blue-400":"border-transparent text-gray-500 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-300"}`,children:[t.jsx(z.Upload,{className:"w-4 h-4"}),t.jsx("span",{className:"hidden sm:inline",children:"Publish Now"}),t.jsx("span",{className:"sm:hidden",children:"Publish"}),_.length>0&&t.jsx("span",{className:"bg-blue-100 dark:bg-blue-900 text-blue-800 dark:text-blue-200 text-xs px-2 py-1 rounded-full",children:_.length})]}),t.jsxs("button",{onClick:()=>m(1),className:`flex items-center gap-2 px-4 md:px-6 py-3 border-b-2 font-medium text-sm transition-colors whitespace-nowrap flex-shrink-0 ${o===1?"border-blue-500 text-blue-600 dark:text-blue-400":"border-transparent text-gray-500 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-300"}`,children:[t.jsx(z.Video,{className:"w-4 h-4"}),t.jsx("span",{className:"hidden sm:inline",children:"My Videos"}),t.jsx("span",{className:"sm:hidden",children:"Videos"}),N.length>0&&t.jsx("span",{className:"bg-blue-100 dark:bg-blue-900 text-blue-800 dark:text-blue-200 text-xs px-2 py-1 rounded-full",children:N.length})]}),t.jsxs("button",{onClick:()=>m(2),className:`flex items-center gap-2 px-4 md:px-6 py-3 border-b-2 font-medium text-sm transition-colors whitespace-nowrap flex-shrink-0 ${o===2?"border-blue-500 text-blue-600 dark:text-blue-400":"border-transparent text-gray-500 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-300"}`,children:[t.jsx(z.Hourglass,{className:"w-4 h-4"}),t.jsx("span",{className:"hidden sm:inline",children:"Encoding"}),t.jsx("span",{className:"sm:hidden",children:"Encoding"}),v.length>0&&t.jsx("span",{className:"bg-blue-100 dark:bg-blue-900 text-blue-800 dark:text-blue-200 text-xs px-2 py-1 rounded-full",children:v.length})]})]})})]}),t.jsx("div",{className:"py-4 md:py-6 w-full",children:x?t.jsx("div",{className:"flex items-center justify-center min-h-[400px]",children:t.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-blue-600"})}):b?t.jsxs("div",{className:"flex flex-col items-center justify-center min-h-[400px] text-center",children:[t.jsx("div",{className:"w-16 h-16 bg-red-100 dark:bg-red-900 rounded-full flex items-center justify-center mb-4",children:t.jsx(z.Info,{className:"w-8 h-8 text-red-600 dark:text-red-400"})}),t.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-white mb-2",children:"Failed to load videos"}),t.jsx("p",{className:"text-gray-600 dark:text-gray-400 mb-4",children:b}),t.jsx("button",{onClick:y,className:"bg-blue-600 hover:bg-blue-700 text-white px-4 py-2 rounded-md transition-colors",children:"Retry"})]}):t.jsxs("div",{className:"space-y-6",children:[o===0&&D(_,"publishNow"),o===1&&D(N,"myVideos"),o===2&&D(v,"encoding")]})})]}):t.jsx("div",{className:"flex items-center justify-center min-h-[400px]",children:t.jsx("p",{className:"text-gray-600 dark:text-gray-400",children:"Please login to view your account"})})},Dd=({username:e,onSelectUser:a})=>{const[i,s]=P.useState([]),[r,n]=P.useState(!0),[u,c]=P.useState(null),d=async()=>{try{n(!0),c(null);const f=await be.getFollowers(e);s(f)}catch(f){c(f instanceof Error?f.message:"Failed to load followers")}finally{n(!1)}};return P.useEffect(()=>{d()},[e]),r?t.jsx("div",{className:"flex items-center justify-center min-h-[400px]",children:t.jsxs("div",{className:"flex items-center gap-2 text-gray-500 dark:text-gray-400",children:[t.jsx(z.Loader2,{className:"w-5 h-5 animate-spin"}),"Loading followers..."]})}):u?t.jsx("div",{className:"flex flex-col items-center justify-center min-h-[400px] space-y-4",children:t.jsxs("div",{className:"text-center",children:[t.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-white mb-2",children:"Failed to load followers"}),t.jsx("p",{className:"text-gray-500 dark:text-gray-400 mb-4",children:u}),t.jsxs("button",{onClick:d,className:"m-2 inline-flex items-center justify-center rounded-md border border-input text-gray-400 cursor-pointer bg-background p-2 text-sm font-medium text-foreground shadow-sm transition-colors hover:bg-accent hover:text-accent-foreground disabled:opacity-50 disabled:pointer-events-none",children:[t.jsx(z.RefreshCw,{className:"w-4 h-4 mr-2"}),"Try Again"]})]})}):i.length===0?t.jsx("div",{className:"flex items-center justify-center min-h-[400px]",children:t.jsx("p",{className:"text-gray-500 dark:text-gray-400",children:"This user has no followers."})}):t.jsx("div",{className:"space-y-6",children:t.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-4",children:i.map((f,o)=>t.jsx("div",{onClick:()=>a&&a(f.follower),className:`bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700
|
|
1101
|
+
transition-colors cursor-pointer`,children:t.jsxs("div",{className:"flex items-center gap-3",children:[t.jsx("img",{src:ot.userOwnerThumb(l),alt:l,className:"w-12 h-12 rounded-full object-cover",onError:x=>{x.target.src=`https://ui-avatars.com/api/?name=${l}&background=random`}}),t.jsxs("div",{className:"flex-1 min-w-0",children:[t.jsxs("h3",{className:"font-semibold text-gray-900 dark:text-white truncate",children:["@",l]}),p&&t.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400 capitalize truncate",children:p})]})]})},`${l}-${h}`)})})})},Cd=({communityId:e,onSelectCommunityMember:r})=>{const[i,s]=O.useState([]),[a,n]=O.useState(!0),[u,c]=O.useState(!1),[d,f]=O.useState(!0),[o,h]=O.useState(null),[l,p]=O.useState(null),x=100,w=O.useCallback(async(b=!1)=>{if(!(u&&!b))try{b?(n(!0),p(null),s([]),h(null),f(!0)):c(!0);const g=await ot.getCommunitySubscribers(e,x,b?void 0:o||void 0);g.length===0?f(!1):(s(v=>{if(b)return g;const _=new Set(v.map(y=>y.username)),N=g.filter(y=>!_.has(y.username));return[...v,...N]}),g.length>0&&h(g[g.length-1].username),f(g.length===x))}catch(g){p(g instanceof Error?g.message:"Failed to load members")}finally{n(!1),c(!1)}},[e,u,o]);return O.useEffect(()=>{w(!0)},[e]),O.useEffect(()=>{const b=()=>{window.innerHeight+document.documentElement.scrollTop>=document.documentElement.offsetHeight-200&&!u&&!a&&d&&w()};return window.addEventListener("scroll",b),()=>window.removeEventListener("scroll",b)},[w,u,a,d]),a&&i.length===0?t.jsx("div",{className:"flex items-center justify-center min-h-[400px]",children:t.jsxs("div",{className:"flex items-center gap-2 text-gray-500 dark:text-gray-400",children:[t.jsx(z.Loader2,{className:"w-5 h-5 animate-spin"}),"Loading members..."]})}):l&&i.length===0?t.jsx("div",{className:"flex flex-col items-center justify-center min-h-[400px] space-y-4",children:t.jsxs("div",{className:"text-center",children:[t.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-white mb-2",children:"Failed to load members"}),t.jsx("p",{className:"text-gray-500 dark:text-gray-400 mb-4",children:l}),t.jsxs("button",{onClick:()=>w(!0),className:"m-2 inline-flex items-center justify-center rounded-md border border-input bg-background p-2 text-sm font-medium text-foreground shadow-sm transition-colors hover:bg-accent hover:text-accent-foreground disabled:opacity-50 disabled:pointer-events-none",children:[t.jsx(z.RefreshCw,{className:"w-4 h-4 mr-2"}),"Try Again"]})]})}):i.length===0?t.jsx("div",{className:"flex items-center justify-center min-h-[400px]",children:t.jsx("p",{className:"text-gray-500 dark:text-gray-400",children:"No community members found"})}):t.jsxs("div",{className:"space-y-6",children:[t.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-4",children:i.map((b,g)=>t.jsx("div",{className:"bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-xl p-4 hover:bg-gray-300 dark:hover:bg-gray-700 transition-colors cursor-pointer",onClick:()=>r?.(b.username),children:t.jsxs("div",{className:"flex items-center gap-3",children:[t.jsx("img",{src:ot.userOwnerThumb(b.username),alt:b.username,className:"w-12 h-12 rounded-full object-cover",onError:v=>{v.target.src=`https://ui-avatars.com/api/?name=${b.username}&background=random`}}),t.jsxs("div",{className:"flex-1 min-w-0",children:[t.jsxs("h3",{className:"font-semibold text-gray-900 dark:text-white truncate",children:["@",b.username]}),b.role&&t.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400 capitalize truncate",children:b.role})]})]})},`${b.username}-${g}`))}),d&&t.jsx("div",{className:"flex justify-center pt-4",children:u?t.jsxs("div",{className:"flex items-center gap-2 text-gray-500 dark:text-gray-400",children:[t.jsx(z.Loader2,{className:"w-4 h-4 animate-spin"}),"Loading more members..."]}):t.jsx("button",{onClick:()=>w(),className:"m-2 inline-flex items-center justify-center rounded-md border border-input bg-background p-2 text-sm font-medium text-foreground shadow-sm transition-colors hover:bg-accent hover:text-accent-foreground disabled:opacity-50 disabled:pointer-events-none",children:"Load More Members"})})]})},Jp=({communityId:e,onVideoClick:r,onAuthorClick:i,onBack:s,onclickAboutTab:a,onclickTeamTab:n,onclickMemberTab:u,onShare:c,onFavourite:d,onRss:f,onMoreVertical:o,showMoreVertical:h=!0})=>{const l=Ec.useNavigate(),[p,x]=O.useState("videos"),[w,b]=O.useState(null),[g,v]=O.useState(!1),[_,N]=O.useState(!0);O.useEffect(()=>{(async()=>{try{N(!0);const D=await ot.getCommunityDetails(e);b(D)}catch(D){console.error("Failed to fetch community details:",D)}finally{N(!1)}})()},[e]);const y=()=>{const E=`https://3speak.tv/user/${e}`;navigator.share?navigator.share({title:w?.result?.title||e,url:E}):navigator.clipboard.writeText(E)},m=()=>{window.open(`https://3speak.tv/rss/${e}.xml`,"_blank")},k=E=>{l(`/user/${E}`)};if(_)return t.jsx("div",{className:"space-y-6",children:t.jsxs("div",{className:"animate-pulse",children:[t.jsx("div",{className:"h-8 bg-gray-200 dark:bg-gray-700 rounded w-32 mb-6"}),t.jsxs("div",{className:"bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-xl p-6",children:[t.jsxs("div",{className:"flex items-center gap-4 mb-4",children:[t.jsx("div",{className:"w-16 h-16 bg-gray-200 dark:bg-gray-700 rounded-full"}),t.jsxs("div",{className:"flex-1 space-y-2",children:[t.jsx("div",{className:"h-6 bg-gray-200 dark:bg-gray-700 rounded w-48"}),t.jsx("div",{className:"h-4 bg-gray-200 dark:bg-gray-700 rounded w-32"})]})]}),t.jsx("div",{className:"flex gap-2",children:Array.from({length:4}).map((E,D)=>t.jsx("div",{className:"h-10 bg-gray-200 dark:bg-gray-700 rounded w-20"},D))})]})]})});const j=w?.result;return t.jsxs("div",{className:"space-y-6",children:[t.jsxs("button",{onClick:s,className:"flex items-center justify-center mr-4 px-2 text-gray-400 hover:bg-gray-200 dark:hover:bg-gray-700 rounded-full",children:[t.jsx(z.ArrowLeft,{className:"w-4 h-4 mr-2"}),"Back"]}),t.jsx("div",{className:"bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-xl p-6",children:t.jsxs("div",{className:"flex flex-col md:flex-row items-start md:items-center gap-6",children:[t.jsx("img",{src:ot.userOwnerThumb(e),alt:j?.title||e,className:"w-16 h-16 rounded-full object-cover",onError:E=>{E.target.src=`https://images.hive.blog/u/${j?.title||e}/avatar`}}),t.jsxs("div",{className:"flex-1",children:[t.jsx("h1",{className:"text-2xl font-bold text-gray-900 dark:text-white mb-2",children:j?.title||e}),t.jsx("p",{className:"text-gray-600 dark:text-gray-400 mb-4",children:j?.about||"Community description"}),t.jsxs("div",{className:"flex flex-wrap gap-6 text-sm",children:[t.jsxs("div",{className:"flex items-center gap-2 text-gray-500 dark:text-gray-400",children:[t.jsx(z.Users,{className:"w-4 h-4"}),t.jsxs("span",{children:[(j?.subscribers||0).toLocaleString()," members"]})]}),t.jsxs("div",{className:"flex items-center gap-2 text-gray-500 dark:text-gray-400",children:[t.jsx(z.Calendar,{className:"w-4 h-4"}),t.jsxs("span",{children:["Created"," ",j?.created_at?new Date(j.created_at).getFullYear():"Unknown"]})]})]})]}),t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx(uo,{id:e,toastType:"community",onAdd:(E,D)=>console.log("Added:",E,D),onRemove:(E,D)=>console.log("Removed:",E,D),onFavourite:d}),t.jsx("button",{onClick:f||m,className:"p-2 rounded-lg border border-gray-300 dark:border-gray-600 text-gray-600 dark:text-gray-300 hover:bg-gray-300 dark:hover:bg-gray-700",children:t.jsx(z.Rss,{className:"w-4 h-4"})}),t.jsx("button",{onClick:c||y,className:"p-2 rounded-lg border border-gray-300 dark:border-gray-600 text-gray-600 dark:text-gray-300 hover:bg-gray-300 dark:hover:bg-gray-700",children:t.jsx(z.Share2,{className:"w-4 h-4"})}),h&&t.jsx("button",{onClick:o||(()=>{}),className:"p-2 rounded-lg border border-gray-300 dark:border-gray-600 text-gray-600 dark:text-gray-300 hover:bg-gray-300 dark:hover:bg-gray-700",children:t.jsx(z.MoreVertical,{className:"w-4 h-4"})})]})]})}),t.jsxs("div",{children:[t.jsxs("div",{className:"grid grid-cols-4 w-full bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg overflow-hidden",children:[t.jsx("button",{onClick:()=>x("videos"),className:`px-4 py-2 text-xs sm:text-sm font-medium transition-colors ${p==="videos"?"bg-blue-600 dark:bg-blue-500 text-white":"text-gray-700 dark:text-gray-300 hover:bg-gray-300 dark:hover:bg-gray-700"}`,children:"Videos"}),t.jsx("button",{onClick:()=>a?a():x("about"),className:`px-4 py-2 text-xs sm:text-sm font-medium transition-colors ${p==="about"?"bg-blue-600 dark:bg-blue-500 text-white":"text-gray-700 dark:text-gray-300 hover:bg-gray-300 dark:hover:bg-gray-700"}`,children:"About"}),t.jsx("button",{onClick:()=>n?n():x("team"),className:`px-4 py-2 text-xs sm:text-sm font-medium transition-colors ${p==="team"?"bg-blue-600 dark:bg-blue-500 text-white":"text-gray-700 dark:text-gray-300 hover:bg-gray-300 dark:hover:bg-gray-700"}`,children:"Team"}),t.jsx("button",{onClick:()=>u?u():x("members"),className:`px-4 py-2 text-xs sm:text-sm font-medium transition-colors ${p==="members"?"bg-blue-600 dark:bg-blue-500 text-white":"text-gray-700 dark:text-gray-300 hover:bg-gray-300 dark:hover:bg-gray-700"}`,children:"Members"})]}),t.jsxs("div",{className:"mt-6",children:[p==="videos"&&t.jsx(is,{feedType:Ge.COMMUNITY,communityId:e,onVideoClick:r,onAuthorClick:i}),p==="about"&&!a&&t.jsx(Ad,{communityId:e}),p==="team"&&!n&&t.jsx(Sd,{communityId:e,onSelectTeamMember:k}),p==="members"&&!u&&t.jsx(Cd,{communityId:e,onSelectCommunityMember:k})]})]})]})},Yp=({communityId:e,onAuthorClick:r,onPostClick:i,onCommunityClick:s,onPayoutClick:a,onUpvoteClick:n,onCommentClick:u,onReblogClick:c,theme:d="dark"})=>{const[f,o]=O.useState("posts"),[h,l]=O.useState(null),[p,x]=O.useState([]),[w,b]=O.useState([]),[g,v]=O.useState(!0),[_,N]=O.useState(!1),[y,m]=O.useState(!1),[k,j]=O.useState(null);O.useEffect(()=>{(async()=>{try{v(!0),j(null);const H=await ot.getCommunityDetails(e);l(H.result)}catch(H){j(H instanceof Error?H.message:"Failed to fetch community details")}finally{v(!1)}})()},[e]),O.useEffect(()=>{f==="subscribers"&&h?E():f==="activities"&&h&&D()},[f,h]);const E=async()=>{try{N(!0);const $=await ot.getCommunitySubscribersList(e,100);x($)}catch($){console.error("Failed to fetch subscribers:",$)}finally{N(!1)}},D=async()=>{try{m(!0);const $=await ot.getCommunityActivities(e,100);b($)}catch($){console.error("Failed to fetch activities:",$)}finally{m(!1)}},C=$=>{try{const H=new Date($),B=new Date().getTime()-H.getTime(),L=Math.floor(B/1e3),G=Math.floor(L/60),X=Math.floor(G/60),ee=Math.floor(X/24),R=Math.floor(ee/30),se=Math.floor(ee/365);return se>0?`${se} year${se>1?"s":""} ago`:R>0?`${R} month${R>1?"s":""} ago`:ee>0?`${ee} day${ee>1?"s":""} ago`:X>0?`${X} hour${X>1?"s":""} ago`:G>0?`${G} minute${G>1?"s":""} ago`:"just now"}catch{return $}},P=$=>$.replace(/<[^>]*>/g,"");return g?t.jsx("div",{className:`flex items-center justify-center min-h-[400px] ${d==="dark"?"bg-slate-950":"bg-white"}`,children:t.jsxs("div",{className:`flex items-center gap-2 ${d==="dark"?"text-gray-400":"text-gray-500"}`,children:[t.jsx(z.Loader2,{className:"w-5 h-5 animate-spin"}),"Loading community details..."]})}):k||!h?t.jsxs("div",{className:`flex flex-col items-center justify-center min-h-[400px] space-y-4 ${d==="dark"?"bg-slate-950":"bg-white"}`,children:[t.jsx("h3",{className:`text-lg font-semibold ${d==="dark"?"text-white":"text-gray-900"}`,children:"Failed to load community details"}),t.jsx("p",{className:`${d==="dark"?"text-gray-400":"text-gray-500"}`,children:k})]}):t.jsxs("div",{className:`space-y-6 ${d==="dark"?"bg-slate-950":"bg-white"}`,children:[t.jsx("div",{className:`${d==="dark"?"bg-slate-900 border-gray-800":"bg-white border-gray-200"} border rounded-xl p-6`,children:t.jsxs("div",{className:"flex flex-col md:flex-row items-start md:items-center gap-6",children:[t.jsx("img",{src:ot.userOwnerThumb(e),alt:h.title,className:"w-16 h-16 rounded-full object-cover",onError:$=>{$.target.src=`https://images.hive.blog/u/${h.title}/avatar`}}),t.jsxs("div",{className:"flex-1",children:[t.jsx("h1",{className:`text-2xl font-bold mb-2 ${d==="dark"?"text-white":"text-gray-900"}`,children:h.title}),t.jsx("p",{className:`${d==="dark"?"text-gray-400":"text-gray-600"} mb-4`,children:h.about}),t.jsxs("div",{className:"flex flex-wrap gap-6 text-sm",children:[t.jsxs("div",{className:`flex items-center gap-2 ${d==="dark"?"text-gray-400":"text-gray-500"}`,children:[t.jsx(z.Users,{className:"w-4 h-4"}),t.jsxs("span",{children:[h.subscribers.toLocaleString()," members"]})]}),t.jsxs("div",{className:`flex items-center gap-2 ${d==="dark"?"text-gray-400":"text-gray-500"}`,children:[t.jsx(z.Calendar,{className:"w-4 h-4"}),t.jsxs("span",{children:["Created ",C(h.created_at)]})]})]})]})]})}),t.jsxs("div",{children:[t.jsxs("div",{className:`flex md:grid md:grid-cols-4 overflow-x-auto md:overflow-visible w-full ${d==="dark"?"bg-slate-900 border-gray-800":"bg-white border-gray-200"} border rounded-lg`,children:[t.jsx("button",{onClick:()=>o("posts"),className:`flex-shrink-0 md:flex-shrink px-4 py-2 text-xs sm:text-sm font-medium transition-colors ${f==="posts"?`${d==="dark"?"bg-blue-500 text-white":"bg-blue-600 text-white"}`:`${d==="dark"?"text-gray-300 hover:bg-gray-700":"text-gray-500 hover:bg-gray-300"}`}`,children:"Posts"}),t.jsx("button",{onClick:()=>o("about"),className:`flex-shrink-0 md:flex-shrink px-4 py-2 text-xs sm:text-sm font-medium transition-colors ${f==="about"?`${d==="dark"?"bg-blue-500 text-white":"bg-blue-600 text-white"}`:`${d==="dark"?"text-gray-300 hover:bg-gray-700":"text-gray-700 hover:bg-gray-300"}`}`,children:"About"}),t.jsx("button",{onClick:()=>o("subscribers"),className:`flex-shrink-0 md:flex-shrink px-4 py-2 text-xs sm:text-sm font-medium transition-colors ${f==="subscribers"?`${d==="dark"?"bg-blue-500 text-white":"bg-blue-600 text-white"}`:`${d==="dark"?"text-gray-300 hover:bg-gray-700":"text-gray-700 hover:bg-gray-300"}`}`,children:"Subscribers"}),t.jsx("button",{onClick:()=>o("activities"),className:`flex-shrink-0 md:flex-shrink px-4 py-2 text-xs sm:text-sm font-medium transition-colors ${f==="activities"?`${d==="dark"?"bg-blue-500 text-white":"bg-blue-600 text-white"}`:`${d==="dark"?"text-gray-300 hover:bg-gray-700":"text-gray-700 hover:bg-gray-300"}`}`,children:"Activities"})]}),t.jsxs("div",{className:"mt-6",children:[f==="posts"&&t.jsx(Nd,{tag:e,sort:"created",limit:20,showSortDropdown:!1,onAuthorClick:r,onPostClick:i,onCommunityClick:s,onPayoutClick:a,onUpvoteClick:n,onCommentClick:u,onReblogClick:c,theme:d}),f==="about"&&t.jsxs("div",{className:`${d==="dark"?"bg-slate-900 border-gray-800":"bg-white border-gray-200"} border rounded-xl p-6`,children:[h.about&&t.jsxs("div",{className:"mb-6",children:[t.jsx("h3",{className:`text-lg font-semibold mb-3 ${d==="dark"?"text-white":"text-gray-900"}`,children:"About"}),t.jsx("p",{className:`${d==="dark"?"text-gray-300":"text-gray-600"} leading-relaxed`,children:P(h.about)})]}),h.description&&t.jsxs("div",{className:"mb-6",children:[t.jsx("h3",{className:`text-lg font-semibold mb-3 ${d==="dark"?"text-white":"text-gray-900"}`,children:"Information"}),t.jsx("div",{className:`${d==="dark"?"text-gray-300":"text-gray-600"} leading-relaxed whitespace-pre-wrap`,children:P(h.description)})]}),h.flag_text&&t.jsxs("div",{className:"mb-6",children:[t.jsx("h3",{className:`text-lg font-semibold mb-3 ${d==="dark"?"text-white":"text-gray-900"}`,children:"Community Rules"}),t.jsx("div",{className:`${d==="dark"?"text-gray-300":"text-gray-600"} leading-relaxed whitespace-pre-wrap`,children:P(h.flag_text)})]}),t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:[t.jsxs("div",{className:`${d==="dark"?"bg-slate-800":"bg-gray-50"} p-4 rounded-lg`,children:[t.jsx("h4",{className:`text-sm font-medium mb-1 ${d==="dark"?"text-gray-400":"text-gray-500"}`,children:"Total Authors"}),t.jsx("p",{className:`text-2xl font-bold ${d==="dark"?"text-white":"text-gray-900"}`,children:h.num_authors.toLocaleString()})]}),t.jsxs("div",{className:`${d==="dark"?"bg-slate-800":"bg-gray-50"} p-4 rounded-lg`,children:[t.jsx("h4",{className:`text-sm font-medium mb-1 ${d==="dark"?"text-gray-400":"text-gray-500"}`,children:"Subscribers"}),t.jsx("p",{className:`text-2xl font-bold ${d==="dark"?"text-white":"text-gray-900"}`,children:h.subscribers.toLocaleString()})]}),t.jsxs("div",{className:`${d==="dark"?"bg-slate-800":"bg-gray-50"} p-4 rounded-lg`,children:[t.jsx("h4",{className:`text-sm font-medium mb-1 ${d==="dark"?"text-gray-400":"text-gray-500"}`,children:"Created"}),t.jsx("p",{className:`text-lg font-semibold ${d==="dark"?"text-white":"text-gray-900"}`,children:C(h.created_at)})]}),h.lang&&t.jsxs("div",{className:`${d==="dark"?"bg-slate-800":"bg-gray-50"} p-4 rounded-lg`,children:[t.jsx("h4",{className:`text-sm font-medium mb-1 ${d==="dark"?"text-gray-400":"text-gray-500"}`,children:"Language"}),t.jsx("p",{className:`text-lg font-semibold ${d==="dark"?"text-white":"text-gray-900"}`,children:h.lang.toUpperCase()})]}),t.jsxs("div",{className:`${d==="dark"?"bg-slate-800":"bg-gray-50"} p-4 rounded-lg`,children:[t.jsx("h4",{className:`text-sm font-medium mb-1 ${d==="dark"?"text-gray-400":"text-gray-500"}`,children:"Pending Posts"}),t.jsx("p",{className:`text-lg font-semibold ${d==="dark"?"text-white":"text-gray-900"}`,children:h.num_pending.toLocaleString()})]}),t.jsxs("div",{className:`${d==="dark"?"bg-slate-800":"bg-gray-50"} p-4 rounded-lg`,children:[t.jsx("h4",{className:`text-sm font-medium mb-1 ${d==="dark"?"text-gray-400":"text-gray-500"}`,children:"Type"}),t.jsx("p",{className:`text-lg font-semibold ${d==="dark"?"text-white":"text-gray-900"}`,children:h.is_nsfw?"NSFW":"Safe"})]})]})]}),f==="subscribers"&&t.jsx("div",{className:`${d==="dark"?"bg-slate-900 border-gray-800":"bg-white border-gray-200"} border rounded-xl p-6`,children:_?t.jsx("div",{className:"flex items-center justify-center min-h-[200px]",children:t.jsx(z.Loader2,{className:"w-5 h-5 animate-spin"})}):p.length>0?t.jsxs("div",{className:"space-y-4",children:[t.jsxs("h3",{className:`text-lg font-semibold mb-4 ${d==="dark"?"text-white":"text-gray-900"}`,children:["Subscribers (",p.length,")"]}),p.map($=>t.jsxs("div",{className:`${d==="dark"?"bg-slate-800":"bg-gray-50"} flex items-center gap-4 p-4 rounded-lg`,children:[t.jsx("img",{src:ot.userOwnerThumb($.username),alt:$.username,className:"w-10 h-10 rounded-full object-cover",onError:H=>{H.target.src=`https://images.hive.blog/u/${$.username}/avatar`}}),t.jsxs("div",{className:"flex-1",children:[t.jsxs("p",{className:`font-medium ${d==="dark"?"text-white":"text-gray-900"}`,children:["@",$.username]}),t.jsxs("p",{className:`text-sm ${d==="dark"?"text-gray-400":"text-gray-500"}`,children:["Role: ",$.role," • Subscribed"," ",C($.subscribedAt)]})]})]},$.username))]}):t.jsx("div",{className:`text-center py-8 ${d==="dark"?"text-gray-400":"text-gray-500"}`,children:"No subscribers found"})}),f==="activities"&&t.jsx("div",{className:`${d==="dark"?"bg-slate-900 border-gray-800":"bg-white border-gray-200"} border rounded-xl p-6`,children:y?t.jsx("div",{className:"flex items-center justify-center min-h-[200px]",children:t.jsx(z.Loader2,{className:"w-5 h-5 animate-spin"})}):w.length>0?t.jsxs("div",{className:"space-y-4",children:[t.jsxs("h3",{className:`text-lg font-semibold mb-4 ${d==="dark"?"text-white":"text-gray-900"}`,children:["Recent Activities (",w.length,")"]}),w.map($=>{const H=$.msg.split(" ")[0].substring(1);return t.jsxs("div",{className:`${d==="dark"?"bg-slate-800":"bg-gray-50"} flex items-center gap-4 p-4 rounded-lg`,children:[t.jsx("img",{src:ot.userOwnerThumb(H),alt:H,className:"w-10 h-10 rounded-full object-cover",onError:F=>{F.target.src=`https://images.hive.blog/u/${H}/avatar`}}),t.jsxs("div",{className:"flex-1",children:[t.jsx("p",{className:`mb-1 ${d==="dark"?"text-white":"text-gray-900"}`,children:$.msg}),t.jsxs("p",{className:`text-sm ${d==="dark"?"text-gray-400":"text-gray-500"}`,children:[C($.date),$.score&&` • Score: ${$.score}`]})]})]},$.id)})]}):t.jsx("div",{className:`text-center py-8 ${d==="dark"?"text-gray-400":"text-gray-500"}`,children:"No activities found"})})]})]})]})};function Zp(e){const r=typeof e=="string"?new Date(e):e,s=Math.floor((new Date().getTime()-r.getTime())/1e3);if(s<60)return`${s}s ago`;const a=Math.floor(s/60);if(a<60)return`${a}m ago`;const n=Math.floor(a/60);if(n<24)return`${n}h ago`;const u=Math.floor(n/24);if(u<30)return`${u}d ago`;const c=Math.floor(u/30);return c<12?`${c}mo ago`:`${Math.floor(c/12)}y ago`}function Xp({author:e,permlink:r,currentUser:i,token:s,onClickUpvoteButton:a}){const[n,u]=O.useState([]),[c,d]=O.useState(!0);O.useEffect(()=>{f()},[e,r]);const f=async()=>{d(!0);try{const o=await Te.getPostContent(e,r);o?.active_votes&&u(o.active_votes)}catch(o){console.error("Failed to fetch votes:",o)}finally{d(!1)}};return c?t.jsx("div",{className:"flex justify-center items-center p-8",children:t.jsx(z.Loader2,{className:"w-6 h-6 animate-spin text-blue-500"})}):n.length===0?t.jsx("div",{className:"text-center text-gray-500 dark:text-gray-400 p-8",children:"No votes yet"}):t.jsx("div",{className:"space-y-2",children:n.map((o,h)=>t.jsxs("div",{className:"flex items-center justify-between p-3 bg-gray-50 dark:bg-gray-700 rounded-lg",children:[t.jsxs("div",{className:"flex items-center space-x-3",children:[t.jsx("img",{src:`https://images.hive.blog/u/${o.voter}/avatar`,alt:o.voter,className:"w-8 h-8 rounded-full",onError:l=>{l.target.src=`https://ui-avatars.com/api/?name=${o.voter}&background=random&size=32`}}),t.jsxs("div",{children:[t.jsxs("p",{className:"font-medium text-gray-900 dark:text-white",children:["@",o.voter]}),t.jsxs("p",{className:"text-sm text-gray-500 dark:text-gray-400",children:[Math.round(o.percent/100),"%"]})]})]}),t.jsx("div",{className:"text-sm text-gray-500 dark:text-gray-400",children:Zp(o.time+"Z")})]},h))})}function Kp({author:e,permlink:r,currentUser:i,token:s,onClickUpvoteButton:a,onClickCommentUpvote:n,onClickCommentReply:u}){const[c,d]=O.useState([]),[f,o]=O.useState([]),[h,l]=O.useState(!0),[p,x]=O.useState(null),[w,b]=O.useState(!1),[g,v]=O.useState(!1),[_,N]=O.useState(null),y=O.useCallback(async(E=!1)=>{E?v(!0):l(!0),x(null);try{const D=await Te.getCommentsList(e,r);d(D),o(D)}catch(D){x(D instanceof Error?D.message:"Failed to load comments")}finally{l(!1),v(!1)}},[e,r]);O.useEffect(()=>{y()},[y]);const m=async(E,D,C)=>{if(!s){alert("Please login to comment");return}try{await Te.handleComment({author:E,permlink:D,body:C,authToken:s}),b(!1),N(null),v(!0),setTimeout(async()=>{await y(!0),v(!1)},3e3)}catch(P){const $=P instanceof Error?P.message:"Failed to post comment";alert($)}},k=(E,D)=>{N({author:E,permlink:D})},j=f.filter(E=>E.parent_author===e&&E.parent_permlink===r);return h?t.jsx("div",{className:"flex justify-center items-center p-8",children:t.jsx(z.Loader2,{className:"w-6 h-6 animate-spin text-blue-500"})}):p?t.jsxs("div",{className:"text-center p-8",children:[t.jsx(z.AlertCircle,{className:"w-16 h-16 text-red-500 mx-auto mb-4"}),t.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-white mb-2",children:"Failed to load comments"}),t.jsx("p",{className:"text-gray-600 dark:text-gray-300 mb-6",children:p}),t.jsx("button",{onClick:()=>y(),className:"px-6 py-2 bg-blue-500 hover:bg-blue-600 text-white rounded-lg transition-colors duration-200",children:"Try Again"})]}):t.jsxs("div",{className:"space-y-4",children:[t.jsxs("div",{className:"flex justify-between items-center",children:[t.jsxs("div",{className:"flex items-center space-x-2",children:[t.jsxs("h3",{className:"text-lg font-semibold text-gray-900 dark:text-white",children:["Comments (",j.length,")"]}),g&&t.jsx(z.Loader2,{className:"w-4 h-4 animate-spin text-blue-500"})]}),t.jsxs("div",{className:"flex items-center space-x-2",children:[t.jsx("button",{onClick:()=>y(!0),disabled:g,className:"p-2 rounded-lg hover:bg-gray-200 dark:hover:bg-gray-700 transition-colors duration-200 disabled:opacity-50",title:"Refresh comments",children:t.jsx(z.RefreshCw,{className:`w-4 h-4 text-gray-500 dark:text-gray-400 ${g?"animate-spin":""}`})}),i&&t.jsx("button",{onClick:()=>{u?u({author:e,permlink:r}):b(!w)},className:"p-2 rounded-lg hover:bg-gray-200 dark:hover:bg-gray-700 transition-colors duration-200",title:"Add comment",children:t.jsx(z.MessageCirclePlus,{className:"w-4 h-4 text-gray-500 dark:text-gray-400"})})]})]}),w&&t.jsx("div",{className:"border border-gray-200 dark:border-gray-700 rounded-lg",children:t.jsx(rs,{onSubmit:E=>m(e,r,E),onCancel:()=>b(!1),currentUser:i,placeholder:"Add a comment..."})}),_&&t.jsx("div",{className:"border border-gray-200 dark:border-gray-700 rounded-lg",children:t.jsx(rs,{onSubmit:E=>m(_.author,_.permlink,E),onCancel:()=>N(null),currentUser:i,placeholder:`Reply to @${_.author}...`})}),j.length===0?t.jsxs("div",{className:"text-center text-gray-500 dark:text-gray-400 p-8",children:[t.jsx(z.MessageCirclePlus,{className:"w-16 h-16 mx-auto mb-4 text-gray-300 dark:text-gray-600"}),t.jsx("h3",{className:"text-lg font-medium text-gray-900 dark:text-white mb-2",children:"No comments yet"}),t.jsx("p",{className:"text-gray-500 dark:text-gray-400 mb-6",children:"Be the first to share your thoughts!"}),!w&&i&&t.jsx("button",{onClick:()=>b(!0),className:"px-6 py-3 bg-blue-500 hover:bg-blue-600 text-white rounded-lg font-medium transition-colors duration-200",children:"Add Comment"})]}):t.jsx("div",{className:"space-y-4",children:j.map(E=>t.jsx(no,{comment:E,allComments:f,onReply:k,currentUser:i,token:s,searchQuery:"",depth:0,onVotedRefresh:()=>y(!0),onClickCommentUpvote:n,onClickCommentReply:u,onClickUpvoteButton:a},E.permlink))})]})}const Qp=({currentUser:e,onTabChanged:r,onPublish:i,onViewMyVideo:s,onMoreOptions:a,onTapBackButton:n,shouldShowBackButton:u=!0,shouldShowPublishButton:c=!1,shouldShowMoreOptionsButton:d=!1})=>{const f=Ec.useNavigate(),[o,h]=O.useState(0),[l,p]=O.useState([]),[x,w]=O.useState(!0),[b,g]=O.useState(null),v=l.filter(C=>["encoding","uploaded","encoding_queued","encoding_preparing","ipfs_pinning","ipfs_pinning_failed","encoding_failed","encoding_ipfs"].includes(C.status||"")),_=l.filter(C=>C.status==="publish_manual"),N=l.filter(C=>C.status==="published");O.useEffect(()=>{e?.token&&y()},[e]);const y=async()=>{if(!e?.token){g("No authentication token provided"),w(!1);return}w(!0),g(null);try{const C=await Te.getMyVideos(e.token);p(C)}catch(C){console.error("Error fetching videos:",C),g(`Failed to load videos: ${C instanceof Error?C.message:"Unknown error"}`)}finally{w(!1)}},m=C=>{h(C),r?.(C)},k=C=>{C.owner&&C.permlink&&f(`/video/${C.owner}/${C.permlink}`)},j=C=>{switch(C.toLowerCase()){case"published":return"bg-green-500";case"encoding":case"encoding_queued":return"bg-orange-500";case"uploaded":return"bg-blue-500";case"publish_manual":return"bg-purple-500";default:return"bg-gray-500"}},E=["ipfs_pinning","ipfs_pinning_failed","encoding","encoding_failed","encoding_ipfs"],D=(C,P)=>{if(C.length===0){let $="";switch(P){case"publishNow":$="No videos ready to publish.";break;case"myVideos":$="No published videos found.";break;case"encoding":$="No videos currently encoding.";break}return t.jsxs("div",{className:"flex flex-col items-center justify-center py-16",children:[t.jsx(z.Video,{className:"w-16 h-16 text-gray-400 mb-4"}),t.jsx("p",{className:"text-gray-600 dark:text-gray-400 text-center",children:$})]})}return t.jsx("div",{className:"space-y-3 w-full",children:C.map(($,H)=>{const F=$.thumbnail||"",B=$.title||"No Title",L=$.permlink||"",G=$.owner||e?.username||"",X=$.id||"",ee=E.includes($.status||"");return t.jsx("div",{className:"bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg p-3 hover:shadow-md transition-shadow",children:t.jsxs("div",{className:"flex items-center gap-3",children:[t.jsxs("div",{className:"relative flex-shrink-0",children:[t.jsx("img",{src:Br(F)||`https://images.hive.blog/u/${e?.username}/avatar`,alt:B,className:"w-24 h-16 rounded-lg object-cover",onError:R=>{R.target.src=`https://images.hive.blog/u/${e?.username}/avatar`}}),E.includes($.status||"")?t.jsx("div",{className:"absolute inset-0 flex items-center justify-center bg-black/30 rounded-lg",children:t.jsx(z.Ban,{className:"w-6 h-6 text-red-500"})}):t.jsx("div",{className:"absolute inset-0 flex items-center justify-center bg-black/20 opacity-0 hover:opacity-100 transition-opacity cursor-pointer rounded-lg",onClick:()=>k($),children:t.jsx(z.Play,{className:"w-6 h-6 text-white"})})]}),t.jsxs("div",{className:"flex-1 min-w-0",children:[t.jsx("h3",{className:"font-semibold text-gray-900 dark:text-white text-sm cursor-pointer hover:text-blue-600 dark:hover:text-blue-400",onClick:()=>k($),style:{display:"-webkit-box",WebkitLineClamp:2,WebkitBoxOrient:"vertical",overflow:"hidden",textOverflow:"ellipsis"},children:B}),t.jsxs("p",{className:"text-gray-600 dark:text-gray-400 text-xs mt-1",children:["By ",G]}),$.status&&t.jsx("div",{className:"mt-2",children:t.jsx("span",{className:`inline-block px-2 py-1 rounded-full text-xs font-semibold text-white ${j($.status)}`,children:$.status.toUpperCase()})})]}),ee?t.jsx("div",{className:"flex-shrink-0 pl-2",children:t.jsx(z.Ban,{className:"w-5 h-5 text-red-500"})}):t.jsxs("div",{className:"flex flex-col items-end gap-2",children:[P==="publishNow"&&c&&t.jsx("button",{onClick:()=>i?.(G,L),className:"bg-green-600 hover:bg-green-700 text-white text-xs px-3 py-1 rounded-md transition-colors",children:"Publish"}),P==="myVideos"&&t.jsx("button",{onClick:()=>s?s(G,L):k($),className:"bg-blue-600 hover:bg-blue-700 text-white text-xs px-3 py-1 rounded-md transition-colors",children:"View"}),d&&t.jsx("button",{onClick:()=>a?.(X),className:"p-1 h-6 w-6 rounded-md hover:bg-gray-300 dark:hover:bg-gray-700 transition-colors",children:t.jsx(z.MoreVertical,{className:"w-4 h-4"})})]})]})},`${X}-${H}`)})})};return e?t.jsxs("div",{className:"min-h-screen bg-gray-50 dark:bg-gray-900",children:[u&&t.jsxs("button",{onClick:n,className:"flex items-center justify-center mr-4 my-2 px-2 text-gray-400 hover:bg-gray-200 dark:hover:bg-gray-700 rounded-full",children:[t.jsx(z.ArrowLeft,{className:"w-4 h-4 mr-2"}),"Back"]}),t.jsxs("div",{className:"bg-white dark:bg-gray-800 border-b border-gray-200 dark:border-gray-700",children:[t.jsxs("div",{className:"flex items-center justify-between p-4",children:[t.jsx("div",{className:"flex items-center gap-3",children:t.jsxs("div",{className:"flex items-center gap-3",children:[t.jsx("img",{src:`https://images.hive.blog/u/${e.username}/avatar`,alt:e.username,className:"w-12 h-12 md:w-16 md:h-16 rounded-full object-cover border-2 border-gray-200 dark:border-gray-700",onError:C=>{C.target.src=`https://ui-avatars.com/api/?name=${e.username}&background=random&size=64`}}),t.jsx("div",{children:t.jsx("h1",{className:"text-lg md:text-xl font-semibold text-gray-900 dark:text-white",children:e.username})})]})}),t.jsx("div",{className:"flex items-center gap-2",children:t.jsx("button",{onClick:y,className:"p-2 rounded-md hover:bg-gray-300 dark:hover:bg-gray-700 transition-colors",children:t.jsx(z.RefreshCw,{className:"w-5 h-5"})})})]}),t.jsx("div",{className:"border-b border-gray-200 dark:border-gray-700",children:t.jsxs("div",{className:"flex overflow-x-auto scrollbar-hide",children:[t.jsxs("button",{onClick:()=>m(0),className:`flex items-center gap-2 px-4 md:px-6 py-3 border-b-2 font-medium text-sm transition-colors whitespace-nowrap flex-shrink-0 ${o===0?"border-blue-500 text-blue-600 dark:text-blue-400":"border-transparent text-gray-500 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-300"}`,children:[t.jsx(z.Upload,{className:"w-4 h-4"}),t.jsx("span",{className:"hidden sm:inline",children:"Publish Now"}),t.jsx("span",{className:"sm:hidden",children:"Publish"}),_.length>0&&t.jsx("span",{className:"bg-blue-100 dark:bg-blue-900 text-blue-800 dark:text-blue-200 text-xs px-2 py-1 rounded-full",children:_.length})]}),t.jsxs("button",{onClick:()=>m(1),className:`flex items-center gap-2 px-4 md:px-6 py-3 border-b-2 font-medium text-sm transition-colors whitespace-nowrap flex-shrink-0 ${o===1?"border-blue-500 text-blue-600 dark:text-blue-400":"border-transparent text-gray-500 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-300"}`,children:[t.jsx(z.Video,{className:"w-4 h-4"}),t.jsx("span",{className:"hidden sm:inline",children:"My Videos"}),t.jsx("span",{className:"sm:hidden",children:"Videos"}),N.length>0&&t.jsx("span",{className:"bg-blue-100 dark:bg-blue-900 text-blue-800 dark:text-blue-200 text-xs px-2 py-1 rounded-full",children:N.length})]}),t.jsxs("button",{onClick:()=>m(2),className:`flex items-center gap-2 px-4 md:px-6 py-3 border-b-2 font-medium text-sm transition-colors whitespace-nowrap flex-shrink-0 ${o===2?"border-blue-500 text-blue-600 dark:text-blue-400":"border-transparent text-gray-500 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-300"}`,children:[t.jsx(z.Hourglass,{className:"w-4 h-4"}),t.jsx("span",{className:"hidden sm:inline",children:"Encoding"}),t.jsx("span",{className:"sm:hidden",children:"Encoding"}),v.length>0&&t.jsx("span",{className:"bg-blue-100 dark:bg-blue-900 text-blue-800 dark:text-blue-200 text-xs px-2 py-1 rounded-full",children:v.length})]})]})})]}),t.jsx("div",{className:"py-4 md:py-6 w-full",children:x?t.jsx("div",{className:"flex items-center justify-center min-h-[400px]",children:t.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-blue-600"})}):b?t.jsxs("div",{className:"flex flex-col items-center justify-center min-h-[400px] text-center",children:[t.jsx("div",{className:"w-16 h-16 bg-red-100 dark:bg-red-900 rounded-full flex items-center justify-center mb-4",children:t.jsx(z.Info,{className:"w-8 h-8 text-red-600 dark:text-red-400"})}),t.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-white mb-2",children:"Failed to load videos"}),t.jsx("p",{className:"text-gray-600 dark:text-gray-400 mb-4",children:b}),t.jsx("button",{onClick:y,className:"bg-blue-600 hover:bg-blue-700 text-white px-4 py-2 rounded-md transition-colors",children:"Retry"})]}):t.jsxs("div",{className:"space-y-6",children:[o===0&&D(_,"publishNow"),o===1&&D(N,"myVideos"),o===2&&D(v,"encoding")]})})]}):t.jsx("div",{className:"flex items-center justify-center min-h-[400px]",children:t.jsx("p",{className:"text-gray-600 dark:text-gray-400",children:"Please login to view your account"})})},Dd=({username:e,onSelectUser:r})=>{const[i,s]=O.useState([]),[a,n]=O.useState(!0),[u,c]=O.useState(null),d=async()=>{try{n(!0),c(null);const f=await be.getFollowers(e);s(f)}catch(f){c(f instanceof Error?f.message:"Failed to load followers")}finally{n(!1)}};return O.useEffect(()=>{d()},[e]),a?t.jsx("div",{className:"flex items-center justify-center min-h-[400px]",children:t.jsxs("div",{className:"flex items-center gap-2 text-gray-500 dark:text-gray-400",children:[t.jsx(z.Loader2,{className:"w-5 h-5 animate-spin"}),"Loading followers..."]})}):u?t.jsx("div",{className:"flex flex-col items-center justify-center min-h-[400px] space-y-4",children:t.jsxs("div",{className:"text-center",children:[t.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-white mb-2",children:"Failed to load followers"}),t.jsx("p",{className:"text-gray-500 dark:text-gray-400 mb-4",children:u}),t.jsxs("button",{onClick:d,className:"m-2 inline-flex items-center justify-center rounded-md border border-input text-gray-400 cursor-pointer bg-background p-2 text-sm font-medium text-foreground shadow-sm transition-colors hover:bg-accent hover:text-accent-foreground disabled:opacity-50 disabled:pointer-events-none",children:[t.jsx(z.RefreshCw,{className:"w-4 h-4 mr-2"}),"Try Again"]})]})}):i.length===0?t.jsx("div",{className:"flex items-center justify-center min-h-[400px]",children:t.jsx("p",{className:"text-gray-500 dark:text-gray-400",children:"This user has no followers."})}):t.jsx("div",{className:"space-y-6",children:t.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-4",children:i.map((f,o)=>t.jsx("div",{onClick:()=>r&&r(f.follower),className:`bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700
|
|
1102
1102
|
rounded-xl p-4 hover:bg-gray-300 dark:hover:bg-gray-700
|
|
1103
|
-
transition-colors cursor-pointer`,children:t.jsxs("div",{className:"flex items-center gap-3",children:[t.jsx("img",{src:be.userAvatar(f.follower),alt:f.follower,className:"w-12 h-12 rounded-full object-cover",onError:h=>{h.target.src=`https://ui-avatars.com/api/?name=${f.follower}&background=random`}}),t.jsx("div",{className:"flex-1 min-w-0",children:t.jsxs("h3",{className:"font-semibold text-gray-900 dark:text-white truncate",children:["@",f.follower]})})]})},`${f.follower}-${o}`))})})},Td=({username:e,onSelectUser:
|
|
1103
|
+
transition-colors cursor-pointer`,children:t.jsxs("div",{className:"flex items-center gap-3",children:[t.jsx("img",{src:be.userAvatar(f.follower),alt:f.follower,className:"w-12 h-12 rounded-full object-cover",onError:h=>{h.target.src=`https://ui-avatars.com/api/?name=${f.follower}&background=random`}}),t.jsx("div",{className:"flex-1 min-w-0",children:t.jsxs("h3",{className:"font-semibold text-gray-900 dark:text-white truncate",children:["@",f.follower]})})]})},`${f.follower}-${o}`))})})},Td=({username:e,onSelectUser:r})=>{const[i,s]=O.useState([]),[a,n]=O.useState(!0),[u,c]=O.useState(null),d=async()=>{try{n(!0),c(null);const f=await be.getFollowing(e);s(f)}catch(f){c(f instanceof Error?f.message:"Failed to load following list")}finally{n(!1)}};return O.useEffect(()=>{d()},[e]),a?t.jsx("div",{className:"flex items-center justify-center min-h-[400px]",children:t.jsxs("div",{className:"flex items-center gap-2 text-gray-500 dark:text-gray-400",children:[t.jsx(z.Loader2,{className:"w-5 h-5 animate-spin"}),"Loading following list..."]})}):u?t.jsx("div",{className:"flex flex-col items-center justify-center min-h-[400px] space-y-4",children:t.jsxs("div",{className:"text-center",children:[t.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-white mb-2",children:"Failed to load following list"}),t.jsx("p",{className:"text-gray-500 dark:text-gray-400 mb-4",children:u}),t.jsxs("button",{onClick:d,className:"m-2 inline-flex items-center justify-center rounded-md border border-input text-gray-400 cursor-pointer bg-background p-2 text-sm font-medium text-foreground shadow-sm transition-colors hover:bg-accent hover:text-accent-foreground disabled:opacity-50 disabled:pointer-events-none",children:[t.jsx(z.RefreshCw,{className:"w-4 h-4 mr-2"}),"Try Again"]})]})}):i.length===0?t.jsx("div",{className:"flex items-center justify-center min-h-[400px]",children:t.jsx("p",{className:"text-gray-500 dark:text-gray-400",children:"This user is not following anyone."})}):t.jsx("div",{className:"space-y-6",children:t.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-4",children:i.map((f,o)=>t.jsx("div",{onClick:()=>r&&r(f.following),className:`bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700
|
|
1104
1104
|
rounded-xl p-4 hover:bg-gray-300 dark:hover:bg-gray-700
|
|
1105
|
-
transition-colors cursor-pointer`,children:t.jsxs("div",{className:"flex items-center gap-3",children:[t.jsx("img",{src:be.userAvatar(f.following),alt:f.following,className:"w-12 h-12 rounded-full object-cover",onError:h=>{h.target.src=`https://ui-avatars.com/api/?name=${f.following}&background=random`}}),t.jsx("div",{className:"flex-1 min-w-0",children:t.jsxs("h3",{className:"font-semibold text-gray-900 dark:text-white truncate",children:["@",f.following]})})]})},`${f.following}-${o}`))})})},Od=({username:e})=>{const[a,i]=P.useState(null),[s,r]=P.useState(!0),[n,u]=P.useState(null),c=async()=>{try{r(!0),u(null);const l=await be.getProfile(e);i(l)}catch(l){u(l instanceof Error?l.message:"Failed to load user details")}finally{r(!1)}};P.useEffect(()=>{c()},[e]);const d=l=>{try{return new Date(l).toLocaleDateString("en-US",{year:"numeric",month:"long",day:"numeric"})}catch{return l}},f=l=>l.replace(/<[^>]*>/g,"");if(s)return t.jsx("div",{className:"flex items-center justify-center min-h-[400px]",children:t.jsxs("div",{className:"flex items-center gap-2 text-gray-500 dark:text-gray-400",children:[t.jsx(z.Loader2,{className:"w-5 h-5 animate-spin"}),"Loading user details..."]})});if(n)return t.jsx("div",{className:"flex flex-col items-center justify-center min-h-[400px] space-y-4",children:t.jsxs("div",{className:"text-center",children:[t.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-white mb-2",children:"Failed to load user details"}),t.jsx("p",{className:"text-gray-500 dark:text-gray-400 mb-4",children:n}),t.jsxs("button",{onClick:c,className:"m-2 inline-flex items-center justify-center rounded-md border border-input bg-background p-2 text-sm font-medium text-foreground shadow-sm transition-colors hover:bg-accent hover:text-accent-foreground disabled:opacity-50 disabled:pointer-events-none",children:[t.jsx(z.RefreshCw,{className:"w-4 h-4"}),"Try Again"]})]})});if(!a?.result)return t.jsx("div",{className:"flex items-center justify-center min-h-[400px]",children:t.jsx("p",{className:"text-gray-500 dark:text-gray-400",children:"No user details available"})});const o=a.result,h=o.metadata?.profile;return t.jsx("div",{className:"space-y-6",children:t.jsxs("div",{className:"bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-xl p-6",children:[h?.about&&t.jsxs("div",{className:"mb-6",children:[t.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-white mb-3",children:"About"}),t.jsx("div",{className:"text-gray-600 dark:text-gray-300 leading-relaxed whitespace-pre-wrap",children:f(h.about)})]}),t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:[t.jsxs("div",{className:"bg-gray-50 dark:bg-gray-900 p-4 rounded-lg",children:[t.jsx("h4",{className:"text-sm font-medium text-gray-500 dark:text-gray-400 mb-1",children:"Location"}),t.jsx("p",{className:"text-lg font-semibold text-gray-900 dark:text-white",children:h?.location||"Not specified"})]}),t.jsxs("div",{className:"bg-gray-50 dark:bg-gray-900 p-4 rounded-lg",children:[t.jsx("h4",{className:"text-sm font-medium text-gray-500 dark:text-gray-400 mb-1",children:"Website"}),t.jsx("a",{href:h?.website,target:"_blank",rel:"noopener noreferrer",className:"text-lg font-semibold text-blue-500 hover:underline",children:h?.website||"Not specified"})]}),t.jsxs("div",{className:"bg-gray-50 dark:bg-gray-900 p-4 rounded-lg",children:[t.jsx("h4",{className:"text-sm font-medium text-gray-500 dark:text-gray-400 mb-1",children:"Joined"}),t.jsx("p",{className:"text-lg font-semibold text-gray-900 dark:text-white",children:o.created?d(o.created):"Unknown"})]}),t.jsxs("div",{className:"bg-gray-50 dark:bg-gray-900 p-4 rounded-lg",children:[t.jsx("h4",{className:"text-sm font-medium text-gray-500 dark:text-gray-400 mb-1",children:"Followers"}),t.jsx("p",{className:"text-2xl font-bold text-gray-900 dark:text-white",children:o.stats?.followers?.toLocaleString()||"0"})]}),t.jsxs("div",{className:"bg-gray-50 dark:bg-gray-900 p-4 rounded-lg",children:[t.jsx("h4",{className:"text-sm font-medium text-gray-500 dark:text-gray-400 mb-1",children:"Following"}),t.jsx("p",{className:"text-2xl font-bold text-gray-900 dark:text-white",children:o.stats?.following?.toLocaleString()||"0"})]}),t.jsxs("div",{className:"bg-gray-50 dark:bg-gray-900 p-4 rounded-lg",children:[t.jsx("h4",{className:"text-sm font-medium text-gray-500 dark:text-gray-400 mb-1",children:"Post Count"}),t.jsx("p",{className:"text-2xl font-bold text-gray-900 dark:text-white",children:o.post_count?.toLocaleString()||"0"})]})]})]})})},Xp=({username:e,onVideoClick:a,onAuthorClick:i,onBack:s,onClickUserInfoTab:r,onClickFollowersTab:n,onClickFollowingTab:u,onBookmarkToggle:c,onRss:d,onShare:f,onMoreMenu:o,showMoreMenu:h=!1})=>{const[l,p]=P.useState("videos"),[x,w]=P.useState(null),[b,g]=P.useState(!1),[v,_]=P.useState(!0);P.useEffect(()=>{(async()=>{try{_(!0);const D=await be.getProfile(e);w(D)}catch(D){console.error("Failed to fetch user details:",D)}finally{_(!1)}})()},[e]);const N=()=>{if(f)f(e);else{const A=`https://3speak.tv/user/${e}`;navigator.share?navigator.share({title:x?.result?.name||e,url:A}):navigator.clipboard.writeText(A)}},y=()=>{d?d(e):window.open(`https://3speak.tv/rss/${e}.xml`,"_blank")},m=A=>{i(A)};if(v)return t.jsx("div",{className:"space-y-6",children:t.jsxs("div",{className:"animate-pulse",children:[t.jsx("div",{className:"h-8 bg-gray-200 dark:bg-gray-700 rounded w-32 mb-6"}),t.jsxs("div",{className:"bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-xl p-6",children:[t.jsxs("div",{className:"flex items-center gap-4 mb-4",children:[t.jsx("div",{className:"w-16 h-16 bg-gray-200 dark:bg-gray-700 rounded-full"}),t.jsxs("div",{className:"flex-1 space-y-2",children:[t.jsx("div",{className:"h-6 bg-gray-200 dark:bg-gray-700 rounded w-48"}),t.jsx("div",{className:"h-4 bg-gray-200 dark:bg-gray-700 rounded w-32"})]})]}),t.jsx("div",{className:"flex gap-2",children:Array.from({length:4}).map((A,D)=>t.jsx("div",{className:"h-10 bg-gray-200 dark:bg-gray-700 rounded w-20"},D))})]})]})});const k=x?.result,j=k?.metadata?.profile;return t.jsxs("div",{className:"space-y-6",children:[t.jsxs("button",{onClick:s,className:"flex items-center justify-center mr-4 px-2 text-gray-400 hover:bg-gray-200 dark:hover:bg-gray-700 rounded-full",children:[t.jsx(z.ArrowLeft,{className:"w-4 h-4 mr-2"}),"Back"]}),t.jsxs("div",{className:"relative bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-xl overflow-hidden",children:[t.jsx("img",{src:j.cover_image||be.userAvatar(e),alt:"Cover",className:"w-full h-48 object-cover",onError:A=>{A.target.src=be.userAvatar(e)}}),t.jsx("div",{className:"p-6",children:t.jsxs("div",{className:"flex flex-col md:flex-row items-start md:items-center gap-6",children:[t.jsx("img",{src:j?.profile_image,alt:j?.name,className:"w-24 h-24 rounded-full object-cover border-4 border-white dark:border-gray-800 -mt-16",onError:A=>{A.target.src=be.userAvatar(e)}}),t.jsxs("div",{className:"flex-1",children:[t.jsx("h1",{className:"text-2xl font-bold text-gray-900 dark:text-white mb-2",children:j?.name||e}),t.jsx("p",{className:"text-gray-600 dark:text-gray-400 mb-4",children:j?.about||"No description available"}),t.jsxs("div",{className:"flex flex-wrap gap-6 text-sm",children:[t.jsxs("div",{className:"flex items-center gap-2 text-gray-500 dark:text-gray-400",children:[t.jsx(z.Users,{className:"w-4 h-4"}),t.jsxs("span",{children:[(k?.stats?.followers||0).toLocaleString()," Followers"]})]}),t.jsxs("div",{className:"flex items-center gap-2 text-gray-500 dark:text-gray-400",children:[t.jsx(z.Users,{className:"w-4 h-4"}),t.jsxs("span",{children:[(k?.stats?.following||0).toLocaleString()," Following"]})]}),t.jsxs("div",{className:"flex items-center gap-2 text-gray-500 dark:text-gray-400",children:[t.jsx(z.Calendar,{className:"w-4 h-4"}),t.jsxs("span",{children:["Joined"," ",k?.created?new Date(k.created).getFullYear():"Unknown"]})]})]})]}),t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx(so,{id:e,toastType:"user",onAdd:(A,D)=>{c?c(A,!0):console.log("Added:",A,D)},onRemove:(A,D)=>{c?c(A,!1):console.log("Removed:",A,D)}}),t.jsx("button",{onClick:y,className:"p-2 border border-gray-300 dark:border-gray-600 rounded-lg text-gray-700 dark:text-gray-300 hover:bg-gray-300 dark:hover:bg-gray-700",children:t.jsx(z.Rss,{className:"w-4 h-4"})}),t.jsx("button",{onClick:N,className:"p-2 border border-gray-300 dark:border-gray-600 rounded-lg text-gray-700 dark:text-gray-300 hover:bg-gray-300 dark:hover:bg-gray-700",children:t.jsx(z.Share2,{className:"w-4 h-4"})}),h&&t.jsx("button",{onClick:()=>{o&&o(e)},className:"p-2 border border-gray-300 dark:border-gray-600 rounded-lg text-gray-700 dark:text-gray-300 hover:bg-gray-300 dark:hover:bg-gray-700",children:t.jsx(z.MoreVertical,{className:"w-4 h-4"})})]})]})})]}),t.jsxs("div",{children:[t.jsx("div",{className:"grid grid-cols-4 bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg overflow-hidden",children:[{key:"videos",label:"Videos"},{key:"about",label:"User Info",callback:r},{key:"followers",label:"Followers",callback:n},{key:"following",label:"Following",callback:u}].map((A,D)=>t.jsx("button",{onClick:()=>{A.callback?A.callback():p(A.key)},className:`px-4 py-2 text-xs sm:text-sm font-medium transition-colors ${l===A.key?"bg-blue-600 dark:bg-blue-500 text-white":"text-gray-700 dark:text-gray-300 hover:bg-gray-300 dark:hover:bg-gray-700"}`,children:A.label},A.key))}),t.jsxs("div",{className:"mt-6",children:[l==="videos"&&t.jsx(ss,{feedType:Ge.USER,username:e,onVideoClick:a,onAuthorClick:i}),l==="about"&&t.jsx(Od,{username:e}),l==="followers"&&t.jsx(Dd,{username:e,onSelectUser:m}),l==="following"&&t.jsx(Td,{username:e,onSelectUser:m})]})]})]})},Kp=1,Qp=1e6;let Ti=0;function em(){return Ti=(Ti+1)%Number.MAX_SAFE_INTEGER,Ti.toString()}const Oi=new Map,wc=e=>{if(Oi.has(e))return;const a=setTimeout(()=>{Oi.delete(e),Ka({type:"REMOVE_TOAST",toastId:e})},Qp);Oi.set(e,a)},Pd=(e,a)=>{switch(a.type){case"ADD_TOAST":return{...e,toasts:[a.toast,...e.toasts].slice(0,Kp)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(i=>i.id===a.toast.id?{...i,...a.toast}:i)};case"DISMISS_TOAST":{const{toastId:i}=a;return i?wc(i):e.toasts.forEach(s=>{wc(s.id)}),{...e,toasts:e.toasts.map(s=>s.id===i||i===void 0?{...s,open:!1}:s)}}case"REMOVE_TOAST":return a.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(i=>i.id!==a.toastId)}}},Xn=[];let Kn={toasts:[]};function Ka(e){Kn=Pd(Kn,e),Xn.forEach(a=>{a(Kn)})}function $d({...e}){const a=em(),i=r=>Ka({type:"UPDATE_TOAST",toast:{...r,id:a}}),s=()=>Ka({type:"DISMISS_TOAST",toastId:a});return Ka({type:"ADD_TOAST",toast:{...e,id:a,open:!0,onOpenChange:r=>{r||s()}}}),{id:a,dismiss:s,update:i}}function tm(){const[e,a]=Qn.useState(Kn);return Qn.useEffect(()=>(Xn.push(a),()=>{const i=Xn.indexOf(a);i>-1&&Xn.splice(i,1)}),[e]),{...e,toast:$d,dismiss:i=>Ka({type:"DISMISS_TOAST",toastId:i})}}exports.ActivityList=Lp;exports.ApiVideoFeedType=Ge;exports.CommentsModal=ao;exports.CommunitiesList=Gp;exports.CommunityAbout=Ad;exports.CommunityDetail=Jp;exports.CommunityMembers=Cd;exports.CommunityPostDetails=Yp;exports.CommunityTeam=Sd;exports.FavouriteWidget=so;exports.FollowersList=Op;exports.FollowingList=Pp;exports.ListOfWitnesses=Ip;exports.Modal=vd;exports.PostActionButton=Hp;exports.PostFeedList=Nd;exports.ProposalsList=Dp;exports.TransactionHistory=Bp;exports.UserAccount=Zp;exports.UserChannel=zp;exports.UserFollowers=Dd;exports.UserFollowing=Td;exports.UserInfo=Od;exports.UserProfilePage=Xp;exports.VideoCard=jc;exports.VideoDetail=dp;exports.VideoFeed=ss;exports.VideoInfo=Ec;exports.Wallet=Sp;exports.apiService=Re;exports.reducer=Pd;exports.server=sr;exports.toast=$d;exports.useIsMobile=Ed;exports.useToast=tm;exports.useWalletStore=kd;exports.witnessService=ct;
|
|
1105
|
+
transition-colors cursor-pointer`,children:t.jsxs("div",{className:"flex items-center gap-3",children:[t.jsx("img",{src:be.userAvatar(f.following),alt:f.following,className:"w-12 h-12 rounded-full object-cover",onError:h=>{h.target.src=`https://ui-avatars.com/api/?name=${f.following}&background=random`}}),t.jsx("div",{className:"flex-1 min-w-0",children:t.jsxs("h3",{className:"font-semibold text-gray-900 dark:text-white truncate",children:["@",f.following]})})]})},`${f.following}-${o}`))})})},Od=({username:e})=>{const[r,i]=O.useState(null),[s,a]=O.useState(!0),[n,u]=O.useState(null),c=async()=>{try{a(!0),u(null);const l=await be.getProfile(e);i(l)}catch(l){u(l instanceof Error?l.message:"Failed to load user details")}finally{a(!1)}};O.useEffect(()=>{c()},[e]);const d=l=>{try{return new Date(l).toLocaleDateString("en-US",{year:"numeric",month:"long",day:"numeric"})}catch{return l}},f=l=>l.replace(/<[^>]*>/g,"");if(s)return t.jsx("div",{className:"flex items-center justify-center min-h-[400px]",children:t.jsxs("div",{className:"flex items-center gap-2 text-gray-500 dark:text-gray-400",children:[t.jsx(z.Loader2,{className:"w-5 h-5 animate-spin"}),"Loading user details..."]})});if(n)return t.jsx("div",{className:"flex flex-col items-center justify-center min-h-[400px] space-y-4",children:t.jsxs("div",{className:"text-center",children:[t.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-white mb-2",children:"Failed to load user details"}),t.jsx("p",{className:"text-gray-500 dark:text-gray-400 mb-4",children:n}),t.jsxs("button",{onClick:c,className:"m-2 inline-flex items-center justify-center rounded-md border border-input bg-background p-2 text-sm font-medium text-foreground shadow-sm transition-colors hover:bg-accent hover:text-accent-foreground disabled:opacity-50 disabled:pointer-events-none",children:[t.jsx(z.RefreshCw,{className:"w-4 h-4"}),"Try Again"]})]})});if(!r?.result)return t.jsx("div",{className:"flex items-center justify-center min-h-[400px]",children:t.jsx("p",{className:"text-gray-500 dark:text-gray-400",children:"No user details available"})});const o=r.result,h=o.metadata?.profile;return t.jsx("div",{className:"space-y-6",children:t.jsxs("div",{className:"bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-xl p-6",children:[h?.about&&t.jsxs("div",{className:"mb-6",children:[t.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-white mb-3",children:"About"}),t.jsx("div",{className:"text-gray-600 dark:text-gray-300 leading-relaxed whitespace-pre-wrap",children:f(h.about)})]}),t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:[t.jsxs("div",{className:"bg-gray-50 dark:bg-gray-900 p-4 rounded-lg",children:[t.jsx("h4",{className:"text-sm font-medium text-gray-500 dark:text-gray-400 mb-1",children:"Location"}),t.jsx("p",{className:"text-lg font-semibold text-gray-900 dark:text-white",children:h?.location||"Not specified"})]}),t.jsxs("div",{className:"bg-gray-50 dark:bg-gray-900 p-4 rounded-lg",children:[t.jsx("h4",{className:"text-sm font-medium text-gray-500 dark:text-gray-400 mb-1",children:"Website"}),t.jsx("a",{href:h?.website,target:"_blank",rel:"noopener noreferrer",className:"text-lg font-semibold text-blue-500 hover:underline",children:h?.website||"Not specified"})]}),t.jsxs("div",{className:"bg-gray-50 dark:bg-gray-900 p-4 rounded-lg",children:[t.jsx("h4",{className:"text-sm font-medium text-gray-500 dark:text-gray-400 mb-1",children:"Joined"}),t.jsx("p",{className:"text-lg font-semibold text-gray-900 dark:text-white",children:o.created?d(o.created):"Unknown"})]}),t.jsxs("div",{className:"bg-gray-50 dark:bg-gray-900 p-4 rounded-lg",children:[t.jsx("h4",{className:"text-sm font-medium text-gray-500 dark:text-gray-400 mb-1",children:"Followers"}),t.jsx("p",{className:"text-2xl font-bold text-gray-900 dark:text-white",children:o.stats?.followers?.toLocaleString()||"0"})]}),t.jsxs("div",{className:"bg-gray-50 dark:bg-gray-900 p-4 rounded-lg",children:[t.jsx("h4",{className:"text-sm font-medium text-gray-500 dark:text-gray-400 mb-1",children:"Following"}),t.jsx("p",{className:"text-2xl font-bold text-gray-900 dark:text-white",children:o.stats?.following?.toLocaleString()||"0"})]}),t.jsxs("div",{className:"bg-gray-50 dark:bg-gray-900 p-4 rounded-lg",children:[t.jsx("h4",{className:"text-sm font-medium text-gray-500 dark:text-gray-400 mb-1",children:"Post Count"}),t.jsx("p",{className:"text-2xl font-bold text-gray-900 dark:text-white",children:o.post_count?.toLocaleString()||"0"})]})]})]})})},em=({username:e,onVideoClick:r,onAuthorClick:i,onBack:s,onClickUserInfoTab:a,onClickFollowersTab:n,onClickFollowingTab:u,onBookmarkToggle:c,onRss:d,onShare:f,onMoreMenu:o,showMoreMenu:h=!1})=>{const[l,p]=O.useState("videos"),[x,w]=O.useState(null),[b,g]=O.useState(!1),[v,_]=O.useState(!0);O.useEffect(()=>{(async()=>{try{_(!0);const D=await be.getProfile(e);w(D)}catch(D){console.error("Failed to fetch user details:",D)}finally{_(!1)}})()},[e]);const N=()=>{if(f)f(e);else{const E=`https://3speak.tv/user/${e}`;navigator.share?navigator.share({title:x?.result?.name||e,url:E}):navigator.clipboard.writeText(E)}},y=()=>{d?d(e):window.open(`https://3speak.tv/rss/${e}.xml`,"_blank")},m=E=>{i(E)};if(v)return t.jsx("div",{className:"space-y-6",children:t.jsxs("div",{className:"animate-pulse",children:[t.jsx("div",{className:"h-8 bg-gray-200 dark:bg-gray-700 rounded w-32 mb-6"}),t.jsxs("div",{className:"bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-xl p-6",children:[t.jsxs("div",{className:"flex items-center gap-4 mb-4",children:[t.jsx("div",{className:"w-16 h-16 bg-gray-200 dark:bg-gray-700 rounded-full"}),t.jsxs("div",{className:"flex-1 space-y-2",children:[t.jsx("div",{className:"h-6 bg-gray-200 dark:bg-gray-700 rounded w-48"}),t.jsx("div",{className:"h-4 bg-gray-200 dark:bg-gray-700 rounded w-32"})]})]}),t.jsx("div",{className:"flex gap-2",children:Array.from({length:4}).map((E,D)=>t.jsx("div",{className:"h-10 bg-gray-200 dark:bg-gray-700 rounded w-20"},D))})]})]})});const k=x?.result,j=k?.metadata?.profile;return t.jsxs("div",{className:"space-y-6",children:[t.jsxs("button",{onClick:s,className:"flex items-center justify-center mr-4 px-2 text-gray-400 hover:bg-gray-200 dark:hover:bg-gray-700 rounded-full",children:[t.jsx(z.ArrowLeft,{className:"w-4 h-4 mr-2"}),"Back"]}),t.jsxs("div",{className:"relative bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-xl overflow-hidden",children:[t.jsx("img",{src:j.cover_image||be.userAvatar(e),alt:"Cover",className:"w-full h-48 object-cover",onError:E=>{E.target.src=be.userAvatar(e)}}),t.jsx("div",{className:"p-6",children:t.jsxs("div",{className:"flex flex-col md:flex-row items-start md:items-center gap-6",children:[t.jsx("img",{src:j?.profile_image,alt:j?.name,className:"w-24 h-24 rounded-full object-cover border-4 border-white dark:border-gray-800 -mt-16",onError:E=>{E.target.src=be.userAvatar(e)}}),t.jsxs("div",{className:"flex-1",children:[t.jsx("h1",{className:"text-2xl font-bold text-gray-900 dark:text-white mb-2",children:j?.name||e}),t.jsx("p",{className:"text-gray-600 dark:text-gray-400 mb-4",children:j?.about||"No description available"}),t.jsxs("div",{className:"flex flex-wrap gap-6 text-sm",children:[t.jsxs("div",{className:"flex items-center gap-2 text-gray-500 dark:text-gray-400",children:[t.jsx(z.Users,{className:"w-4 h-4"}),t.jsxs("span",{children:[(k?.stats?.followers||0).toLocaleString()," Followers"]})]}),t.jsxs("div",{className:"flex items-center gap-2 text-gray-500 dark:text-gray-400",children:[t.jsx(z.Users,{className:"w-4 h-4"}),t.jsxs("span",{children:[(k?.stats?.following||0).toLocaleString()," Following"]})]}),t.jsxs("div",{className:"flex items-center gap-2 text-gray-500 dark:text-gray-400",children:[t.jsx(z.Calendar,{className:"w-4 h-4"}),t.jsxs("span",{children:["Joined"," ",k?.created?new Date(k.created).getFullYear():"Unknown"]})]})]})]}),t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx(uo,{id:e,toastType:"user",onAdd:(E,D)=>{c?c(E,!0):console.log("Added:",E,D)},onRemove:(E,D)=>{c?c(E,!1):console.log("Removed:",E,D)}}),t.jsx("button",{onClick:y,className:"p-2 border border-gray-300 dark:border-gray-600 rounded-lg text-gray-700 dark:text-gray-300 hover:bg-gray-300 dark:hover:bg-gray-700",children:t.jsx(z.Rss,{className:"w-4 h-4"})}),t.jsx("button",{onClick:N,className:"p-2 border border-gray-300 dark:border-gray-600 rounded-lg text-gray-700 dark:text-gray-300 hover:bg-gray-300 dark:hover:bg-gray-700",children:t.jsx(z.Share2,{className:"w-4 h-4"})}),h&&t.jsx("button",{onClick:()=>{o&&o(e)},className:"p-2 border border-gray-300 dark:border-gray-600 rounded-lg text-gray-700 dark:text-gray-300 hover:bg-gray-300 dark:hover:bg-gray-700",children:t.jsx(z.MoreVertical,{className:"w-4 h-4"})})]})]})})]}),t.jsxs("div",{children:[t.jsx("div",{className:"grid grid-cols-4 bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg overflow-hidden",children:[{key:"videos",label:"Videos"},{key:"about",label:"User Info",callback:a},{key:"followers",label:"Followers",callback:n},{key:"following",label:"Following",callback:u}].map((E,D)=>t.jsx("button",{onClick:()=>{E.callback?E.callback():p(E.key)},className:`px-4 py-2 text-xs sm:text-sm font-medium transition-colors ${l===E.key?"bg-blue-600 dark:bg-blue-500 text-white":"text-gray-700 dark:text-gray-300 hover:bg-gray-300 dark:hover:bg-gray-700"}`,children:E.label},E.key))}),t.jsxs("div",{className:"mt-6",children:[l==="videos"&&t.jsx(is,{feedType:Ge.USER,username:e,onVideoClick:r,onAuthorClick:i}),l==="about"&&t.jsx(Od,{username:e}),l==="followers"&&t.jsx(Dd,{username:e,onSelectUser:m}),l==="following"&&t.jsx(Td,{username:e,onSelectUser:m})]})]})]})},tm=1,rm=1e6;let Oi=0;function am(){return Oi=(Oi+1)%Number.MAX_SAFE_INTEGER,Oi.toString()}const Pi=new Map,Nc=e=>{if(Pi.has(e))return;const r=setTimeout(()=>{Pi.delete(e),Ka({type:"REMOVE_TOAST",toastId:e})},rm);Pi.set(e,r)},Pd=(e,r)=>{switch(r.type){case"ADD_TOAST":return{...e,toasts:[r.toast,...e.toasts].slice(0,tm)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(i=>i.id===r.toast.id?{...i,...r.toast}:i)};case"DISMISS_TOAST":{const{toastId:i}=r;return i?Nc(i):e.toasts.forEach(s=>{Nc(s.id)}),{...e,toasts:e.toasts.map(s=>s.id===i||i===void 0?{...s,open:!1}:s)}}case"REMOVE_TOAST":return r.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(i=>i.id!==r.toastId)}}},Xn=[];let Kn={toasts:[]};function Ka(e){Kn=Pd(Kn,e),Xn.forEach(r=>{r(Kn)})}function $d({...e}){const r=am(),i=a=>Ka({type:"UPDATE_TOAST",toast:{...a,id:r}}),s=()=>Ka({type:"DISMISS_TOAST",toastId:r});return Ka({type:"ADD_TOAST",toast:{...e,id:r,open:!0,onOpenChange:a=>{a||s()}}}),{id:r,dismiss:s,update:i}}function nm(){const[e,r]=Qn.useState(Kn);return Qn.useEffect(()=>(Xn.push(r),()=>{const i=Xn.indexOf(r);i>-1&&Xn.splice(i,1)}),[e]),{...e,toast:$d,dismiss:i=>Ka({type:"DISMISS_TOAST",toastId:i})}}exports.ActivityList=Lp;exports.ApiVideoFeedType=Ge;exports.CommentsList=Kp;exports.CommentsModal=so;exports.CommunitiesList=Gp;exports.CommunityAbout=Ad;exports.CommunityDetail=Jp;exports.CommunityMembers=Cd;exports.CommunityPostDetails=Yp;exports.CommunityTeam=Sd;exports.FavouriteWidget=uo;exports.FollowersList=Op;exports.FollowingList=Pp;exports.ListOfWitnesses=Ip;exports.Modal=vd;exports.PostActionButton=Hp;exports.PostFeedList=Nd;exports.ProposalsList=Dp;exports.TransactionHistory=Bp;exports.UpvoteList=Xp;exports.UpvoteListModal=io;exports.UserAccount=Qp;exports.UserChannel=zp;exports.UserFollowers=Dd;exports.UserFollowing=Td;exports.UserInfo=Od;exports.UserProfilePage=em;exports.VideoCard=Sc;exports.VideoDetail=dp;exports.VideoFeed=is;exports.VideoInfo=Cc;exports.Wallet=Sp;exports.apiService=Te;exports.reducer=Pd;exports.server=sr;exports.toast=$d;exports.useIsMobile=Ed;exports.useToast=nm;exports.useWalletStore=kd;exports.witnessService=ct;
|