update 2026-10-13 23:30:23

This commit is contained in:
action committed 2026-10-13 23:30:23 +08:00
1 parent 09818a2882
commit 1e69cad46b
710 files changed
+368 -159536

No files matched your search

@@ -1 +0,0 @@
"use strict";"require baseclass";"require rpc";"require ui";const MAX_UPLOAD=8388608,formatSize=e=>e>=1048576?(e/1048576).toFixed(1)+" MB":Math.max(1,Math.round(e/1024))+" KB",extOf=e=>(e.match(/\.([a-z0-9]+)$/i)?.[1]||"").toLowerCase();return baseclass.extend({MAX_UPLOAD:8388608,formatSize:formatSize,extOf:extOf,checkFile(e,t){const a=t?.exts||[],s=extOf(e.name);return a.length&&!a.includes(s)?{ok:!1,err:_("Unsupported file type. Allowed: %s").format(a.join(", "))}:e.size>8388608?{ok:!1,err:_("File is %s, exceeding the 8MB limit.").format(formatSize(e.size))}:{ok:!0,err:""}},uploadToRouter:e=>new Promise((t,a)=>{const s=new XMLHttpRequest;e.onProgress&&s.upload.addEventListener("progress",t=>{t.lengthComputable&&e.onProgress(Math.round(t.loaded/t.total*100))}),s.addEventListener("load",()=>200===s.status?t():a(new Error(_("Upload failed (HTTP %s)").format(s.status)))),s.addEventListener("error",()=>a(new Error(_("Upload failed"))));const r=new FormData;r.append("sessionid",rpc.getSessionID()),r.append("filename",e.tmpPath),r.append("filemode","0600"),r.append("filedata",e.file,e.file.name),s.open("POST","/cgi-bin/cgi-upload"),s.withCredentials=!0,s.send(r)}),createAssetManager(e){const t=e.rows||[],a=E("div",{}),s=E("div",{});a.appendChild(s),t.length?a.appendChild(E("table",{class:"table"},[E("tr",{class:"tr table-titles"},[E("th",{class:"th",style:"width:56px;"},""),E("th",{class:"th"},_("Name")),E("th",{class:"th"},e.badgeHeader),E("th",{class:"th"},_("Size")),E("th",{class:"th center"},"")]),...t.map(e=>E("tr",{class:"tr"},[E("td",{class:"td"},e.preview),E("td",{class:"td",style:"word-break:break-all;"},e.name),E("td",{class:"td",style:"color:var(--text-muted);font-size:0.9em;"},e.badge||""),E("td",{class:"td",style:"color:var(--text-muted);font-variant-numeric:tabular-nums;white-space:nowrap;"},formatSize(e.size||0)),E("td",{class:"td center"},E("button",{type:"button",class:"cbi-button cbi-button-remove",click:e.onDelete},_("Delete")))]))])):a.appendChild(E("div",{style:"padding:0.5em 0;"},[E("em",{},e.emptyText)]));const r=()=>{for(;s.firstChild;)s.firstChild.remove()},i=()=>{r();const t=E("input",{type:"file",style:"display:none;",accept:e.bar&&e.bar.accept||""});t.addEventListener("change",()=>{const e=t.files&&t.files[0];t.value="",e&&o(e)});const a=E("button",{type:"button",style:"display:block;width:100%;border:2px dashed var(--hairline);border-radius:0.5em;padding:1.25em 1em;text-align:center;cursor:pointer;margin-bottom:0.75em;transition:border-color 0.15s,background 0.15s;",click:()=>t.click(),dragover:e=>{e.preventDefault(),a.style.borderColor="var(--brand)",a.style.background="var(--brand-subtle)"},dragleave:()=>{a.style.borderColor="",a.style.background=""},drop:e=>{e.preventDefault(),a.style.borderColor="",a.style.background="";const t=e.dataTransfer&&e.dataTransfer.files[0];t&&o(t)}},[E("div",{style:"font-size:1.5em;margin-bottom:0.25em;pointer-events:none;"},"⬆"),E("strong",{style:"pointer-events:none;"},e.bar.hint),E("div",{style:"font-size:0.8em;opacity:0.6;margin-top:0.25em;pointer-events:none;"},e.bar.sub||"")]);s.appendChild(a),s.appendChild(t)},o=t=>{const a=e.checkFile(t);r(),s.appendChild(((t,a)=>{const s=e.form.fields(t),r=E("div",{style:"height:100%;width:0%;transition:width 0.12s linear;background:var(--brand);border-radius:999px;"}),o=E("div",{style:"display:none;height:5px;border-radius:999px;background:var(--hairline);overflow:hidden;margin-top:0.6em;"},[r]),n=e=>{r.style.width=e+"%"};let l=!1;const d=E("button",{type:"button",class:"cbi-button",click:i},_("Cancel")),c=E("div",{style:"margin-bottom:0.6em;"},[E("strong",{style:"word-break:break-all;"},t.name)," · "+formatSize(t.size)]),b=a.ok?null:E("p",{style:"color:var(--danger);font-weight:600;font-size:0.9em;margin:0 0 0.6em;"},a.err),p=E("div",{style:"margin-bottom:0.6em;"},s.rows.map(e=>E("div",{class:"cbi-value"},[E("label",{class:"cbi-value-title"},e.label),E("div",{class:"cbi-value-field"},e.control)]))),m=E("button",{type:"button",class:"cbi-button cbi-button-positive"},_("Confirm Upload")),u=()=>{l||(m.disabled=!a.ok||!s.valid())};u(),p.addEventListener("input",u),p.addEventListener("change",u);const h=E("div",{class:"right"},[d," ",m]);return m.addEventListener("click",()=>{l=!0,m.disabled=!0,d.disabled=!0,s.setDisabled(!0),o.style.display="block",n(0);const a=s.value();e.upload(t,a,n).catch(e=>{l=!1,d.disabled=!1,s.setDisabled(!1),o.style.display="none",n(0),u(),ui.addNotification(null,E("p",_("Upload failed: %s").format(e.message)),"error")})}),E("div",{style:"margin-bottom:0.5em;padding-bottom:0.6em;border-bottom:1px solid var(--hairline);"},[c,b,p,h,o].filter(Boolean))})(t,a))};return i(),a},confirmDelete:e=>new Promise(t=>{ui.showModal(e.title,[E("p",{},e.message),E("div",{class:"right"},[E("button",{class:"btn",click:()=>{ui.hideModal(),t(!1)}},_("Cancel"))," ",E("button",{class:"btn cbi-button-negative",click:()=>{ui.hideModal(),t(!0)}},_("Delete"))])])})});
@@ -1,49 +0,0 @@
/*!
colorjs.io -- https://colorjs.io -- MIT License
Copyright (c) 2021 Lea Verou, Chris Lilley
This build embeds the following, each under the MIT License:
The MIT License (MIT)
Copyright (c) 2024 Matt DesLauriers
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE
OR OTHER DEALINGS IN THE SOFTWARE.
----------------------------------------------------------------
Copyright (c) 2021 Björn Ottosson
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
of the Software, and to permit persons to whom the Software is furnished to do
so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
*/
var Color=function(){"use strict";function e(e,t){let r,a,n=e.length,o=!1,s=!1;Array.isArray(e[0])?r=e:(r=[e],n=r.length,o=!0),Array.isArray(t[0])?a=t:(a=t.length>0?t.map(e=>[e]):[[]],s=!0);let i=a[0].length,c=a[0].map((e,t)=>a.map(e=>e[t])),l=r.map(e=>c.map(t=>{let r=0;if(!Array.isArray(e)){for(let a of t)r+=e*a;return r}for(let a=0;a<e.length;a++)r+=e[a]*(t[a]||0);return r}));return 1===n&&o&&(l=l[0]),1===i&&s?1===n&&o?l[0]:l.map(e=>e[0]):l}function t(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}function r(e,r,a=[0,0,0]){const n=t(e,r[0]),o=t(e,r[1]),s=t(e,r[2]);return a[0]=n,a[1]=o,a[2]=s,a}function a(e){return"string"===n(e)}function n(e){return(Object.prototype.toString.call(e).match(/^\[object\s+(.*?)\]$/)[1]||"").toLowerCase()}function o(e,{precision:t=16,unit:r}){return s(e)?"none":(e=+c(e,t))+(r??"")}function s(e){return null===e}function i(e){return s(e)?0:e}function c(e,t){if(0===e)return 0;let r=~~e,a=0;r&&t&&(a=1+~~Math.log10(Math.abs(r)));const n=10**(t-a);return Math.floor(e*n+.5)/n}function l(e,t,r){return isNaN(e)?t:isNaN(t)?e:e+(t-e)*r}function u(e,t,r){return(r-e)/(t-e)}function h(e,t,r){return!e||!t||e===t||e[0]===t[0]&&e[1]===t[1]||isNaN(r)||null===r?r:l(t[0],t[1],u(e[0],e[1],r))}function p(e,t,r){return Math.max(Math.min(r,t),e)}function m(e,t){return Math.sign(e)===Math.sign(t)?e:-e}function f(e,t){return m(Math.abs(e)**t,e)}function d(e,t){return 0===t?0:e/t}function g(e,t,r=0,a=e.length){for(;r<a;){const n=r+a>>1;e[n]<t?r=n+1:a=n}return r}function b(e,t){if(e instanceof t)return!0;const r=t.name;for(;e;){const t=Object.getPrototypeOf(e),a=t?.constructor?.name;if(a===r)return!0;if(!a||"Object"===a)return!1;e=t}return!1}var M=Object.freeze({__proto__:null,bisectLeft:g,clamp:p,copySign:m,interpolate:l,interpolateInv:u,isInstance:b,isNone:s,isString:a,mapRange:h,multiplyMatrices:e,multiply_v3_m3x3:r,serializeNumber:o,skipNone:i,spow:f,toPrecision:c,type:n,zdiv:d});const y=new class{add(e,t,r){if("string"==typeof arguments[0])(Array.isArray(e)?e:[e]).forEach(function(e){this[e]=this[e]||[],t&&this[e][r?"unshift":"push"](t)},this);else for(var e in arguments[0])this.add(e,arguments[0][e],arguments[1])}run(e,t){this[e]=this[e]||[],this[e].forEach(function(e){e.call(t&&t.context?t.context:t,t)})}};var w={gamut_mapping:"css",precision:5,deltaE:"76",verbose:"test"!==globalThis?.process?.env?.NODE_ENV?.toLowerCase(),warn:function(e){this.verbose&&globalThis?.console?.warn?.(e)}};class v{type;coordMeta;coordRange;range;constructor(e,t){if("object"==typeof e&&(this.coordMeta=e),t&&(this.coordMeta=t,this.coordRange=t.range??t.refRange),"string"==typeof e){let t=e.trim().match(/^(?<type><[a-z]+>)(\[(?<min>-?[.\d]+),\s*(?<max>-?[.\d]+)\])?$/);if(!t)throw new TypeError(`Cannot parse ${e} as a type definition.`);this.type=t.groups.type;let{min:r,max:a}=t.groups;(r||a)&&(this.range=[+r,+a])}}get computedRange(){return this.range?this.range:"<percentage>"===this.type?this.percentageRange():"<angle>"===this.type?[0,360]:null}get unit(){return"<percentage>"===this.type?"%":"<angle>"===this.type?"deg":""}resolve(e){if("<angle>"===this.type)return e;let t=this.computedRange,r=this.coordRange;return"<percentage>"===this.type&&(r??=this.percentageRange()),h(t,r,e)}serialize(e,t){let r="<percentage>"===this.type?this.percentageRange(100):this.computedRange,a=this.unit;return o(e=h(this.coordRange,r,e),{unit:a,precision:t})}toString(){let e=this.type;if(this.range){let[t="",r=""]=this.range;e+=`[${t},${r}]`}return e}percentageRange(e=1){let t;return t=this.coordMeta&&this.coordMeta.range||this.coordRange&&this.coordRange[0]>=0?[0,1]:[-1,1],[t[0]*e,t[1]*e]}static get(e,t){return b(e,this)?e:new this(e,t)}}const C=Symbol("instance");class R{type;name;spaceCoords;coords;id;alpha;constructor(e,t=e.space){e[C]=this,this.type="function",this.name="color",Object.assign(this,e),this.space=t,"custom"!==this.type&&(this.spaceCoords=Object.values(t.coords),this.coords||(this.coords=this.spaceCoords.map(e=>{let t=["<number>","<percentage>"];return"angle"===e.type&&t.push("<angle>"),t})),this.coords=this.coords.map((e,t)=>{let r=this.spaceCoords[t];return"string"==typeof e&&(e=e.trim().split(/\s*\|\s*/)),e.map(e=>v.get(e,r))}))}serializeCoords(e,t,r){return r=e.map((e,t)=>v.get(r?.[t]??this.coords[t][0],this.spaceCoords[t])),e.map((e,a)=>r[a].serialize(e,t))}coerceCoords(e,t){return Object.entries(this.space.coords).map(([r,a],n)=>{let o=e[n];if(s(o)||isNaN(o))return o;let i=t[n],c=this.coords[n].find(e=>e.type==i);if(!c){let e=a.name||r;throw new TypeError(`${i??o?.raw??o} not allowed for ${e} in ${this.name}()`)}return o=c.resolve(o),c.range&&(t[n]=c.toString()),o})}canSerialize(){return"function"===this.type||this.serialize}parse(e){return null}static get(e,...t){return!e||b(e,this)?e:e[C]?e[C]:new R(e,...t)}}const B={D50:[.3457/.3585,1,.2958/.3585],D65:[.3127/.329,1,.3583/.329]};function _(e){return Array.isArray(e)?e:B[e]}function k(e,t,a,n={}){if(e=_(e),t=_(t),!e||!t)throw new TypeError(`Missing white point to convert Line truncated
@@ -1 +0,0 @@
"use strict";"require baseclass";const PACKAGE_PAGE_CANDIDATES=["package-manager","opkg","packages"];return baseclass.extend({PACKAGE_PAGE_CANDIDATES:PACKAGE_PAGE_CANDIDATES,parseRevision:function(n){const e=/-r(\d{8})\b/.exec(String(null==n?"":n));return e?Number(e[1]):null},isNewer:function(n,e){const r=this.parseRevision(n),s=this.parseRevision(e);return null!==r&&null!==s&&s>r},findManifestVersion:function(n,e,r,s){const i=n?.channels?.[e]?.[r];if(!Array.isArray(i))return null;const t=i.find(n=>n?.pkg===s);return t?.version||null},pickPackageManagerPath:function(n){const e=n?.children?.admin?.children?.system?.children;if(!e)return null;const r=PACKAGE_PAGE_CANDIDATES.find(n=>{const r=e[n];return r&&!1!==r.satisfied});return r?`admin/system/${r}`:null}});
@@ -1 +0,0 @@
"use strict";"require baseclass";"require rpc";"require utils.notices as notices";const CACHE_KEY="aurora.hub.list",ME_CACHE_KEY="aurora.hub.me",NOTICES_CACHE_KEY="aurora.hub.notices",INBOX_READ_KEY="aurora.hub.inboxRead",INBOX_DONE_KEY="aurora.hub.inboxDone",NOTICES_CHECKED_KEY="aurora.hub.noticesChecked",HUB_BASE="https://themes.eamonxg.fun",HUB_TIMEOUT_MS=15e3,HUB_NOT_FOUND="invalid_id",CLIENT_SCHEMA=1,hubFetch=e=>{const t=new AbortController,a=setTimeout(()=>t.abort(),15e3);return fetch(HUB_BASE+e,{signal:t.signal,headers:{Accept:"application/json"}}).then(e=>404===e.status?{result:1,error:"invalid_id"}:e.ok?e.json().then(e=>({result:0,data:e})):{result:1,error:"hub_unreachable"}).catch(()=>({result:1,error:"hub_unreachable"})).finally(()=>clearTimeout(a))},putAssetBytes=(e,t,a,r)=>new Promise(o=>{const l=new XMLHttpRequest;l.open("PUT",e,!0),l.setRequestHeader("Authorization","Bearer "+t),l.setRequestHeader("Content-Type","application/octet-stream"),l.timeout=12e4,l.upload.onprogress=e=>{e.lengthComputable&&r&&r(e.loaded,e.total)},l.onload=()=>o(l.status>=200&&l.status<300),l.onerror=()=>o(!1),l.ontimeout=()=>o(!1),l.send(a)}),ASSET_PATH_RE=/^\/assets\/[A-Za-z0-9]{1,32}\/[a-z0-9_]{1,32}$/,makeCache=(e,t)=>({getStale(){try{const t=localStorage.getItem(e);return t?JSON.parse(t).value??null:null}catch(e){return null}},set(a){try{localStorage.setItem(e,JSON.stringify({timestamp:Date.now(),value:a}))}catch(e){console.error("Failed to cache hub "+t+" data:",e)}},clear(){try{localStorage.removeItem(e)}catch(e){}}}),readStored=(e,t)=>{try{const a=JSON.parse(localStorage.getItem(e));return null==a?t:a}catch(e){return t}},writeStored=(e,t)=>{try{localStorage.setItem(e,JSON.stringify(t))}catch(e){}},patchSnapshot=(e,t)=>{const a=e.getStale(),r=Object.assign({notices:notices.sanitize(a&&a.notices),local:a&&a.local||null},t);return e.set(r),r};return baseclass.extend({listCache:makeCache(CACHE_KEY,"list"),meCache:makeCache(ME_CACHE_KEY,"me"),noticesCache:makeCache(NOTICES_CACHE_KEY,"notices"),CLIENT_SCHEMA:1,callHubList(e,t){const a="new"===e?"new":"hot",r=Number.isInteger(t)&&t>0?t:1;return hubFetch("/api/v1/themes/aurora/configs?sort="+a+"&page="+r+"&schema=1")},callHubNotices:()=>hubFetch("/api/v1/notices?theme=aurora&schema=1").then(e=>"invalid_id"===e.error?{result:0,data:{notices:[]}}:e),noticesCheckedAt(){const e=readStored(NOTICES_CHECKED_KEY,0);return Number.isFinite(e)?e:0},markNoticesChecked(e){writeStored(NOTICES_CHECKED_KEY,e)},inboxState(){const e=e=>{const t=readStored(e,[]);return Array.isArray(t)?t.filter(e=>"string"==typeof e):[]};return{read:e(INBOX_READ_KEY),done:e(INBOX_DONE_KEY)}},setInboxState(e){writeStored(INBOX_READ_KEY,e.read),writeStored(INBOX_DONE_KEY,e.done)},setNoticesLocal(e){return patchSnapshot(this.noticesCache,{local:e})},refreshNotices(e){const t=e||{},a=void 0===t.me?null:Promise.resolve(t.me).catch(()=>null);this.markNoticesChecked(Date.now());const r=L.resolveDefault(this.callGetInitData(),null).then(e=>notices.localState(e));return Promise.all([this.callHubNotices(),r]).then(([e,t])=>{const r=this.noticesCache.getStale(),o=t||r&&r.local||null,l={feed:Boolean(e&&0===e.result),me:!1,local:Boolean(t)},s={notices:notices.sanitize(l.feed?e.data&&e.data.notices:r&&r.notices),local:o},c=s.notices,n=this.meCache.getStale();return(a||(()=>l.feed&&(c.some(e=>"creators"===e.audience)||notices.hasShares(n))?L.resolveDefault(this.callHubMe(),null).then(e=>{const t=e&&0===e.result&&e.data?e.data:null;return t&&this.meCache.set(t),t}):Promise.resolve(null))()).then(e=>{this.noticesCache.set(s);const t=notices.inbox(s,e||n,null).map(e=>e.key),a=this.inboxState();return l.me=Boolean(e),this.setInboxState({read:notices.pruneKeys(a.read,t,l),done:notices.pruneKeys(a.done,t,l)}),s})})},callHubGet:e=>/^[A-Za-z0-9]+$/.test(String(e||""))?hubFetch("/api/v1/themes/aurora/configs/"+e):Promise.resolve({result:1,error:"invalid_id"}),hubAssetUrl:e=>"string"==typeof e&&ASSET_PATH_RE.test(e)?HUB_BASE+e:"",callHubApply:rpc.declare({object:"luci.aurora",method:"hub_apply",params:["id"]}),callGetHubStatus:rpc.declare({object:"luci.aurora",method:"get_hub_status",params:["job_id"]}),callHubRestore:rpc.declare({object:"luci.aurora",method:"hub_restore_backup"}),callHubLocalState:rpc.declare({object:"luci.aurora",method:"hub_local_state"}),callHubShareBegin:rpc.declare({object:"luci.aurora",method:"hub_share_begin",params:["name","description","target_id"]}),callHubShareCommit:rpc.declare({object:"luci.aurora",method:"hub_share_commit",params:["draft_id"]}),publishCurrentConfig(e){const t=e||{},a=e=>{"function"==typeof t.onProgress&&t.onProgress(e)};return a({phase:"begin"}),L.resolveDefault(this.callHubShareBegin(t.name,t.description||"",t.targetId||""),null).then(e=>{if(!e||0!==e.result)return{result:1,error:e&&e.error||"hub_unreachable"};if(e.duplicate)return{result:0,id:e.id,duplicate:!0};const t=e.assets||[];let r=0;const o=()=>{if(r>=t.length)return a({phase:"commit"}),L.resolveDefault(this.callHubShareLine truncated
@@ -1 +0,0 @@
"use strict";"require baseclass";const MD_MAX_DEPTH=2,MD_HEADING_OFFSET=3,MD_FENCE="```",MD_HEADING_RE=/^(#{1,3}) +(.*)$/,MD_RULE_RE=/^-{3,} *$/,MD_QUOTE_RE=/^> ?/,MD_BULLET_RE=/^[-*] +/,MD_NUMBER_RE=/^[0-9]{1,9}[.] +/,MD_EXTERNAL_RE=/^https:/;function mdClean(e){const t="string"==typeof e?e:"";let n="",l=0;for(let e=0;e<t.length;e+=1){const i=t.charCodeAt(e);(i<32&&9!==i&&10!==i||127===i)&&(n+=t.slice(l,e),l=e+1)}return n+t.slice(l)}function mdInline(e,t){const n=[],l={};let i="",r=0;const s=()=>{i&&n.push({type:"text",text:i}),i=""},o=(t,n)=>{if(l[t])return-1;const i=e.indexOf(t,n);return-1===i&&(l[t]=!0),i},c=e=>t<2?mdInline(e,t+1):[{type:"text",text:e}];for(;r<e.length;){const t=e[r];if("`"===t){const t=o("`",r+1);if(t>r+1){s(),n.push({type:"code",text:e.slice(r+1,t)}),r=t+1;continue}}else if("*"===t){const t="*"===e[r+1]?"**":"*",l=r+t.length;if(l<e.length&&" "!==e[l]){const i=o(t,l);if(i>l&&" "!==e[i-1]){s(),n.push({type:"**"===t?"strong":"em",children:c(e.slice(l,i))}),r=i+t.length;continue}}if("**"===t){i+=t,r+=2;continue}}else if("["===t){let t=r+1;for(;t<e.length&&"["!==e[t]&&"]"!==e[t];)t+=1;if(t>r+1&&"]"===e[t]&&"("===e[t+1]){let l=t+2;for(;l<e.length&&")"!==e[l]&&"("!==e[l]&&" "!==e[l];)l+=1;if(l>t+2&&")"===e[l]){s(),n.push({type:"link",text:e.slice(r+1,t),url:e.slice(t+2,l)}),r=l+1;continue}}}i+=t,r+=1}return s(),n}function mdBlocks(e){const t=mdClean(e).split("\n"),n=[];let l=null;const i=()=>{l=null},r=(e,t)=>{l&&l.type===e?l.lines.push(t):(l={type:e,lines:[t]},n.push(l))},s=(e,t)=>{l&&l.type===e?l.items.push(t):(l={type:e,items:[t]},n.push(l))};for(let e=0;e<t.length;e+=1){const o=t[e].trim();if(o.startsWith("```")){const l=[];for(e+=1;e<t.length&&!t[e].trim().startsWith("```");)l.push(t[e]),e+=1;i(),n.push({type:"code",text:l.join("\n")});continue}if(""===o){i();continue}const c=MD_HEADING_RE.exec(o);c?(i(),n.push({type:"heading",level:c[1].length,text:c[2]})):MD_RULE_RE.test(o)?(i(),n.push({type:"rule"})):MD_QUOTE_RE.test(o)?r("quote",o.replace(MD_QUOTE_RE,"")):MD_BULLET_RE.test(o)?s("bullets",o.replace(MD_BULLET_RE,"")):MD_NUMBER_RE.test(o)?s("numbers",o.replace(MD_NUMBER_RE,"")):l&&l.items?l.items[l.items.length-1]+=" "+o:r("paragraph",o)}return n}function mdPlain(e){return e.map(e=>e.children?mdPlain(e.children):e.text).join("")}function renderMarkdown(e,t,n){const l=t.createDocumentFragment(),i=(e,l)=>(l.forEach(l=>{if("text"===l.type)e.appendChild(t.createTextNode(l.text));else if("code"===l.type){const n=t.createElement("code");n.appendChild(t.createTextNode(l.text)),e.appendChild(n)}else if("link"===l.type){const i="function"==typeof n?n(l.url):"";if("string"!=typeof i||""===i)return void e.appendChild(t.createTextNode(l.text));const r=t.createElement("a");r.setAttribute("href",i),MD_EXTERNAL_RE.test(i)&&(r.setAttribute("target","_blank"),r.setAttribute("rel","noreferrer")),r.appendChild(t.createTextNode(l.text)),e.appendChild(r)}else{const n=t.createElement("strong"===l.type?"strong":"em");i(n,l.children),e.appendChild(n)}}),e),r=(e,n)=>i(t.createElement(e),mdInline(n,0));return mdBlocks(e).forEach(e=>{if("code"===e.type){const n=t.createElement("pre"),i=t.createElement("code");i.appendChild(t.createTextNode(e.text)),n.appendChild(i),l.appendChild(n)}else if("rule"===e.type)l.appendChild(t.createElement("hr"));else if("heading"===e.type)l.appendChild(r("h"+(e.level+3),e.text));else if(e.items){const n=t.createElement("numbers"===e.type?"ol":"ul");e.items.forEach(e=>n.appendChild(r("li",e))),l.appendChild(n)}else l.appendChild(r("quote"===e.type?"blockquote":"p",e.lines.join(" ")))}),l}function markdownToText(e){const t=mdBlocks(e);for(let e=0;e<t.length;e+=1){const n=t[e];let l="";if("code"===n.type?l=n.text.split("\n").filter(e=>""!==e.trim())[0]||"":"heading"===n.type?l=mdPlain(mdInline(n.text,0)):n.items?l=mdPlain(mdInline(n.items[0],0)):n.lines&&(l=mdPlain(mdInline(n.lines[0],0))),""!==l.trim())return l.trim()}return""}return baseclass.extend({render:renderMarkdown,toText:markdownToText});
@@ -1 +0,0 @@
"use strict";"require baseclass";const POLL_INTERVAL_MS=432e5,MAX_NOTICES=20,MAX_TITLE_CHARS=120,MAX_BODY_CHARS=4e3,MAX_REASON_CHARS=1e3,MAX_VERSION_CHARS=64,ID_RE=/^[A-Za-z0-9]{1,32}$/,LANG_RE=/^[a-z]{2}(-[a-z]{2,4})?$/,LEVELS=["info","warning","critical"],BADGE_LEVELS=["warning","critical"],AUDIENCES=["all","creators"],COMPAT_STATES=["unsupported","deprecated"],HTTPS_PREFIX="https://",LUCI_PATH_RE=/^admin\/[A-Za-z0-9_\-./?=&%#]*$/,URL_FORBIDDEN_RE=/[\u0000-\u0020\u007f\\]/,STAMP_RE=/^(\d{4})-(\d{2})-(\d{2})(?:[ T](\d{2}):(\d{2})(?::(\d{2}))?)?/,SUNSET_DATE_RE=/^\d{4}-\d{2}-\d{2}(?=$|[ T])/,GROUP_ACTION="action",GROUP_UPDATES="updates",SOURCE_ROUTER="router",SOURCE_SHARES="shares",SOURCE_STORE="store",FEED_KEY="feed:missing",LOCAL_KEY_PREFIX="feed:",DERIVED_KEY_MARK=":",AGE_STEPS=[["week",6048e5],["day",864e5],["hour",36e5],["minute",6e4]],isObject=e=>null!==e&&"object"==typeof e&&!Array.isArray(e),charCount=e=>Array.from(e).length,isTitle=e=>"string"==typeof e&&""!==e.trim()&&charCount(e)<=120,isBody=e=>"string"==typeof e&&charCount(e)<=4e3,cleanI18n=e=>{const t={};return isObject(e)?(Object.keys(e).forEach(s=>{const r=e[s];if(!LANG_RE.test(s)||!isObject(r))return;const n={};isTitle(r.title)&&(n.title=r.title),isBody(r.body)&&""!==r.body&&(n.body=r.body),Object.keys(n).length&&(t[s]=n)}),t):t},stampOf=e=>{const t="string"==typeof e?STAMP_RE.exec(e):null;return t?t[0]:""},cleanNotice=e=>isObject(e)&&"string"==typeof e.id&&ID_RE.test(e.id)&&LEVELS.includes(e.level)&&AUDIENCES.includes(e.audience)&&isTitle(e.title)&&isBody(e.body)?{id:e.id,level:e.level,audience:e.audience,title:e.title,body:e.body,url:"string"==typeof e.url?e.url:"",i18n:cleanI18n(e.i18n),at:stampOf(e.starts_at)||stampOf(e.at)||stampOf(e.created_at)}:null,stringList=e=>Array.isArray(e)?e.filter(e=>"string"==typeof e):[],ownConfigs=e=>isObject(e)&&Array.isArray(e.configs)?e.configs.filter(e=>isObject(e)&&"string"==typeof e.id&&ID_RE.test(e.id)):[],isReason=e=>"string"==typeof e&&charCount(e)<=1e3,versionOf=e=>{const t=isObject(e)?e.installed_version:null;return"string"==typeof t&&charCount(t)<=64?t:""},nameOf=e=>"string"==typeof e.name?e.name:"",shortHash=e=>{let t=2166136261;for(let s=0;s<e.length;s+=1)t^=e.charCodeAt(s),t=Math.imul(t,16777619);return(t>>>0).toString(36)};return baseclass.extend({POLL_INTERVAL_MS:432e5,MAX_NOTICES:20,GROUP_ACTION:"action",GROUP_UPDATES:"updates",SOURCE_ROUTER:"router",SOURCE_SHARES:"shares",SOURCE_STORE:"store",FEED_KEY:FEED_KEY,localize(e,t){const s=isObject(e)?e:{},r=isObject(s.i18n)?s.i18n:{},n=String(null==t?"":t).toLowerCase().replace(/_/g,"-"),i=[r[n],r[n.split("-")[0]],s],o=e=>{const t=i.find(t=>isObject(t)&&"string"==typeof t[e]&&""!==t[e]);return t?t[e]:""};return{title:o("title"),body:o("body")}},safeUrl(e){if("string"!=typeof e||URL_FORBIDDEN_RE.test(e))return"";if(LUCI_PATH_RE.test(e))return e.includes("..")||e.includes("//")?"":e;if(!e.startsWith("https://"))return"";try{const t=new URL(e);return"https:"===t.protocol&&t.hostname?t.username||t.password?"":e:""}catch(e){return""}},isExternalUrl:e=>"string"==typeof e&&e.startsWith("https://"),present(e,t){const s=this.localize(e,t),r=this.safeUrl(e?.url);return{title:s.title,body:s.body,url:r,external:this.isExternalUrl(r)}},sanitize(e){if(!Array.isArray(e))return[];const t=[];for(const s of e){if(t.length>=20)break;const e=cleanNotice(s);e&&!t.some(t=>t.id===e.id)&&t.push(e)}return t},isDue:(e,t)=>!Number.isFinite(e)||e<=0||!Number.isFinite(t)||t<e||t-e>=432e5,creatorAffected(e){if(!isObject(e))return!1;const t=isObject(e.compat_summary)?e.compat_summary:{},s=e=>Number.isFinite(t[e])?t[e]:0;return s("deprecated")+s("unsupported")>0||(Array.isArray(e.configs)?e.configs:[]).some(e=>{if(!isObject(e)||"removed"===e.status)return!1;const t=isObject(e.compat)?e.compat.state:null;return"string"==typeof t&&"ok"!==t})},hasShares:e=>ownConfigs(e).length>0,compatBadge(e){const t=e?.compat?.state;return COMPAT_STATES.includes(t)?t:null},sunsetDate(e){const t=e?.compat?.sunset_at,s="string"==typeof t?SUNSET_DATE_RE.exec(t):null;return s?s[0]:""},compatCounts(e){const t={deprecated:0,unsupported:0,sunset:""};return ownConfigs(e).filter(e=>"removed"!==e.status).forEach(e=>{const s=this.compatBadge(e);s&&(t[s]+=1);const r="deprecated"===s?this.sunsetDate(e):"";r&&(!t.sunset||r<t.sunset)&&(t.sunset=r)}),isObject(e)&&isObject(e.compat_summary)&&["deprecated","unsupported"].forEach(s=>{const r=e.compat_summary[s];t[s]=Number.isInteger(r)&&r>0?r:0}),t},shortHash:shortHash,derive(e){const t=ownConfigs(e),s=t.filter(e=>"removed"!==e.status),r=[];return COMPAT_STATES.forEach(e=>{const t=s.filter(t=>this.compatBadge(t)===e);if(!t.length)return;const n=t.map(e=>this.sunsetDate(e)).filter(e=>e).sort();r.push({key:"compat:"+e+":"+shortHash(t.map(e=>e.id).sort().join(",")),group:"action",source:"shares",kind:"compat",state:e,level:"critical",names:t.map(nameOf),sunset:"deprecated"===e&&n.length?n[0]:""})}),s.filter(e=>"rejected"===e.assets_status).forEach(e=>r.push({key:"rLine truncated
@@ -1 +0,0 @@
"use strict";"require baseclass";const HEX_RE=/^#[0-9a-fA-F]{3,8}$/,safeHex=(e,t)=>HEX_RE.test(e||"")?e:t,mixHex=(e,t)=>"color-mix(in srgb, "+e+" "+t+"%, transparent)",logoImage=(e,t,i)=>{if(!e)return t;const o=E("img",{src:e,alt:"",style:i});return o.addEventListener("error",()=>{o.parentNode&&o.parentNode.replaceChild(t,o)}),o},buildMini=(e,t)=>{const i=t&&t.nav||"top",o=safeHex(e&&e.bg,"#f7fafc"),s=safeHex(e&&e.surface,"#ffffff"),r=safeHex(e&&e.text,"#121a22"),n=safeHex(e&&e.brand,"#0086bf"),l=(e,t,i)=>{const o=E("span",{style:"height:22%;border-radius:99px;width:"+e+";"+(i||"")});return o.style.background=mixHex(r,t),o},d=e=>{const t=E("div",{style:"height:5px;border-radius:99px;margin-bottom:4%;width:"+e+";"});return t.style.background=mixHex(r,24),t},a=e=>{const t=E("div",{style:"border-radius:8px;padding:4%;margin-bottom:5%;"},e);return t.style.background=s,t.style.border="1px solid "+mixHex(r,10),t},g="width:7%;aspect-ratio:1;border-radius:25%;flex:none;",b=E("span",{style:g});b.style.background=n;const x=logoImage(t&&t.logo||"",b,g+"object-fit:contain;"),u=E("div",{style:"height:8px;max-height:14%;border-radius:99px;width:45%;margin-bottom:6%;"});u.style.background=mixHex(r,72);const h=E("span",{style:"display:inline-block;width:26%;height:12px;border-radius:99px;"});h.style.background=n;const p=[a([u,d("90%"),d("70%"),h]),a([d("85%"),d("60%")])];let c,m;if("sidebar"===i){const e=E("div",{style:"position:absolute;left:0;top:0;bottom:0;width:22%;display:flex;flex-direction:column;gap:8%;padding:6% 4%;box-sizing:border-box;"},[x,l("80%",28,"height:7%;"),l("90%",28,"height:7%;"),l("70%",28,"height:7%;")]);e.children[2].style.background=n,e.style.background=s,e.style.borderRight="1px solid "+mixHex(r,12),c=[e],m=E("div",{style:"position:absolute;left:27%;top:7%;right:5%;bottom:0;"},p)}else{const e=E("div",{style:"position:absolute;left:0;right:0;top:0;height:16%;display:flex;align-items:center;gap:4%;padding:0 4%;box-sizing:border-box;"},[x,l("18%",55),l("12%",34),l("12%",34)]);if(e.style.background=s,e.style.borderBottom="1px solid "+mixHex(r,12),c=[e],"mega-menu"===i){const e=E("div",{style:"position:absolute;left:0;right:0;top:16%;height:13%;display:flex;align-items:center;gap:3%;padding:0 4%;box-sizing:border-box;"},[l("10%",30,"height:26%;"),l("14%",30,"height:26%;"),l("9%",30,"height:26%;"),l("12%",30,"height:26%;")]);e.style.background=s,e.style.borderBottom="1px solid "+mixHex(r,12),c.push(e)}m=E("div",{style:"position:absolute;left:5%;top:"+("mega-menu"===i?"37%":"24%")+";right:5%;bottom:0;"},p)}const y=E("div",{style:"position:absolute;inset:0;overflow:hidden;"},c.concat([m]));return y.style.background=o,y},buildDuo=(e,t)=>{const i=buildMini(e&&e.dark||{},t);return i.style.clipPath="polygon(58% 0, 100% 0, 100% 100%, 42% 100%)",E("div",{style:"position:relative;width:100%;height:100%;"},[buildMini(e&&e.light||{},t),i])};return baseclass.extend({safeHex:safeHex,mixHex:mixHex,logoImage:logoImage,buildMini:buildMini,buildDuo:buildDuo});
@@ -1 +0,0 @@
var AuroraTokens=(()=>{var e=Object.defineProperty,r=Object.getOwnPropertyDescriptor,a=Object.getOwnPropertyNames,s=Object.prototype.hasOwnProperty,n={};((r,a)=>{for(var s in a)e(r,s,{get:a[s],enumerable:!0})})(n,{DEFAULTS:()=>l,DERIVATIONS:()=>c,DERIVED_KEYS:()=>_,INPUTS:()=>d,resolve:()=>k});var o,t,c={light:{text_muted:["mix","text","bg",.62],text_subtle:["mix","text","bg",.48],surface_sunken:["set","bg",.975,.005],surface_overlay:["shade","bg",.016],hairline:["alpha","text",.13],hover_faint:["set","bg",.95,.006],brand_hover:["shade","brand",-.06],brand_subtle:["mix","brand","bg",.12],brand_subtle_hover:["shade","brand_subtle",-.04],focus_ring:["alpha","brand",.6],progress_start:["mix","brand","surface_sunken",.65],progress_end:["const","var:brand"],info_surface:["set","info",.945,.042],warning_surface:["set","warning",.955,.042],success_surface:["set","success",.95,.042],danger_surface:["set","danger",.95,.036],danger_surface_hover:["shade","danger_surface",-.04],control_bg:["const","var:surface_overlay"],scrim:["const","oklch(0 0 0 / 0.6)"],mega_menu_bg:["set","bg",.972,.008],mega_menu_scrim:["const","oklch(0.22 0.035 250 / 0.38)"]},dark:{text_muted:["mix","text","bg",.62],text_subtle:["mix","text","bg",.42],surface_sunken:["shade","surface",-.045],surface_overlay:["shade","surface",.02],hairline:["alpha","text",.1],hover_faint:["alpha","text",.05],brand_hover:["shade","brand",-.05],brand_subtle:["mix","brand","bg",.16],brand_subtle_hover:["shade","brand_subtle",.04],focus_ring:["alpha","brand",.6],progress_start:["mix","brand","surface_sunken",.65],progress_end:["const","var:brand"],info_surface:["set","info",.32,.05],warning_surface:["set","warning",.33,.06],success_surface:["set","success",.3,.05],danger_surface:["set","danger",.32,.08],danger_surface_hover:["shade","danger_surface",.04],control_bg:["const","var:surface_sunken"],scrim:["const","oklch(0 0 0 / 0.6)"],mega_menu_bg:["alpha","surface_sunken",1],mega_menu_scrim:["const","oklch(0 0 0 / 0.5)"]}},l={light:{bg:"oklch(0.984 0.004 235)",surface:"oklch(1 0 0)",text:"oklch(0.215 0.02 250)",brand:"oklch(0.58 0.14 233)",on_brand:"oklch(1 0 0)",link:"oklch(0.58 0.14 233)",info:"oklch(0.45 0.12 250)",warning:"oklch(0.4 0.09 72)",success:"oklch(0.38 0.1 172)",danger:"oklch(0.42 0.15 22)"},dark:{bg:"oklch(0.13 0.018 264)",surface:"oklch(0.21 0.02 264)",text:"oklch(0.985 0.002 264)",brand:"oklch(0.6 0.13 188.745)",on_brand:"oklch(1 0 0)",link:"oklch(0.6 0.13 188.745)",info:"oklch(0.8 0.11 255)",warning:"oklch(0.82 0.13 80)",success:"oklch(0.72 0.13 158)",danger:"oklch(0.7 0.16 22)"}},u=globalThis.Color,h=e=>e instanceof u?e:new u(e),i=["info","warning","success","danger"],b=(Object.fromEntries(i.map(e=>[e,l.light[e]])),Object.fromEntries(i.map(e=>[e,l.dark[e]])),l.light,l.dark,o=c,function(e,r){const a=o[e];if(!a)throw new Error(`unknown mode: ${e}`);const s={...r},n=e=>(void 0===s[e]&&t(e),s[e]);function t(e){const r=a[e];if(!r)throw new Error(`unknown derived token: ${e}`);const[o,...t]=r;let c;switch(o){case"mix":i=n(t[0]),b=n(t[1]),d=t[2],c=u.mix(h(i),h(b),1-d,{space:"oklab",outputSpace:"oklch"});break;case"shade":c=((e,r)=>{const a=h(e).to("oklch");return a.coords[0]+=r,a})(n(t[0]),t[1]);break;case"set":c=((e,r,a)=>{const s=h(e).to("oklch");s.coords[0]=r;const n=s.coords[1]<.001||Number.isNaN(s.coords[2]);return s.coords[1]=n?0:a,s})(n(t[0]),t[1],t[2]);break;case"alpha":c=((e,r)=>{const a=h(e).to("oklch");return a.alpha=r,a})(n(t[0]),t[1]);break;case"const":if(t[0].startsWith("var:"))return void(s[e]=n(t[0].slice(4)));l=t[0],c=h(l).to("oklch");break;default:throw new Error(`unknown op: ${o}`)}var l,i,b,d;s[e]=h(c).to("oklch").toString({precision:4,format:"oklch"})}for(const e of Object.keys(a))t(e);return s}),d=Object.keys(l.light),_=Object.keys(c.light),k=b;return t=n,((n,o,t,c)=>{if(o&&"object"==typeof o||"function"==typeof o)for(let t of a(o))s.call(n,t)||void 0===t||e(n,t,{get:()=>o[t],enumerable:!(c=r(o,t))||c.enumerable});return n})(e({},"__esModule",{value:!0}),t)})();