Initial commit with user management

This commit is contained in:
Magnus Åhall 2024-11-27 21:41:48 +01:00
commit a1a928e7cb
98 changed files with 13042 additions and 0 deletions

6
static/js/lib/htm/htm.d.ts vendored Normal file
View file

@ -0,0 +1,6 @@
declare const htm: {
bind<HResult>(
h: (type: any, props: Record<string, any>, ...children: any[]) => HResult
): (strings: TemplateStringsArray, ...values: any[]) => HResult | HResult[];
};
export default htm;

1
static/js/lib/htm/htm.js Normal file
View file

@ -0,0 +1 @@
!function(){const t=(e,n,s,u)=>{let h;n[0]=0;for(let l=1;l<n.length;l++){const p=n[l++],o=n[l]?(n[0]|=p?1:2,s[n[l++]]):n[++l];3===p?u[0]=o:4===p?u[1]=Object.assign(u[1]||{},o):5===p?(u[1]=u[1]||{})[n[++l]]=o:6===p?u[1][n[++l]]+=o+"":p?(h=e.apply(o,t(e,o,s,["",null])),u.push(h),o[0]?n[0]|=2:(n[l-2]=0,n[l]=h)):u.push(o)}return u},e=function(t){let e,n,s=1,u="",h="",l=[0];const p=t=>{1===s&&(t||(u=u.replace(/^\s*\n\s*|\s*\n\s*$/g,"")))?l.push(0,t,u):3===s&&(t||u)?(l.push(3,t,u),s=2):2===s&&"..."===u&&t?l.push(4,t,0):2===s&&u&&!t?l.push(5,0,!0,u):s>=5&&((u||!t&&5===s)&&(l.push(s,0,u,n),s=6),t&&(l.push(s,t,0,n),s=6)),u=""};for(let o=0;o<t.length;o++){o&&(1===s&&p(),p(o));for(let r=0;r<t[o].length;r++)e=t[o][r],1===s?"<"===e?(p(),l=[l],s=3):u+=e:4===s?"--"===u&&">"===e?(s=1,u=""):u=e+u[0]:h?e===h?h="":u+=e:'"'===e||"'"===e?h=e:">"===e?(p(),s=1):s&&("="===e?(s=5,n=u,u=""):"/"===e&&(s<5||">"===t[o][r+1])?(p(),3===s&&(l=l[0]),s=l,(l=l[0]).push(2,0,s),s=0):" "===e||"\t"===e||"\n"===e||"\r"===e?(p(),s=2):u+=e),3===s&&"!--"===u&&(s=4,l=l[0])}return p(),l},n=new Map;var s=function(s){let u=n.get(this);return u||(u=new Map,n.set(this,u)),u=t(this,u.get(s)||(u.set(s,u=e(s)),u),arguments,[]),u.length>1?u:u[0]};"undefined"!=typeof module?module.exports=s:self.htm=s}();

View file

@ -0,0 +1 @@
const t=(e,s,n,h)=>{let u;s[0]=0;for(let l=1;l<s.length;l++){const p=s[l++],r=s[l]?(s[0]|=p?1:2,n[s[l++]]):s[++l];3===p?h[0]=r:4===p?h[1]=Object.assign(h[1]||{},r):5===p?(h[1]=h[1]||{})[s[++l]]=r:6===p?h[1][s[++l]]+=r+"":p?(u=e.apply(r,t(e,r,n,["",null])),h.push(u),r[0]?s[0]|=2:(s[l-2]=0,s[l]=u)):h.push(r)}return h},e=function(t){let e,s,n=1,h="",u="",l=[0];const p=t=>{1===n&&(t||(h=h.replace(/^\s*\n\s*|\s*\n\s*$/g,"")))?l.push(0,t,h):3===n&&(t||h)?(l.push(3,t,h),n=2):2===n&&"..."===h&&t?l.push(4,t,0):2===n&&h&&!t?l.push(5,0,!0,h):n>=5&&((h||!t&&5===n)&&(l.push(n,0,h,s),n=6),t&&(l.push(n,t,0,s),n=6)),h=""};for(let r=0;r<t.length;r++){r&&(1===n&&p(),p(r));for(let o=0;o<t[r].length;o++)e=t[r][o],1===n?"<"===e?(p(),l=[l],n=3):h+=e:4===n?"--"===h&&">"===e?(n=1,h=""):h=e+h[0]:u?e===u?u="":h+=e:'"'===e||"'"===e?u=e:">"===e?(p(),n=1):n&&("="===e?(n=5,s=h,h=""):"/"===e&&(n<5||">"===t[r][o+1])?(p(),3===n&&(l=l[0]),n=l,(l=l[0]).push(2,0,n),n=0):" "===e||"\t"===e||"\n"===e||"\r"===e?(p(),n=2):h+=e),3===n&&"!--"===h&&(n=4,l=l[0])}return p(),l},s=new Map;var n=function(n){let h=s.get(this);return h||(h=new Map,s.set(this,h)),h=t(this,h.get(n)||(h.set(n,h=e(n)),h),arguments,[]),h.length>1?h:h[0]};export{n as default};

View file

@ -0,0 +1 @@
const t=(e,s,n,h)=>{let u;s[0]=0;for(let l=1;l<s.length;l++){const p=s[l++],r=s[l]?(s[0]|=p?1:2,n[s[l++]]):s[++l];3===p?h[0]=r:4===p?h[1]=Object.assign(h[1]||{},r):5===p?(h[1]=h[1]||{})[s[++l]]=r:6===p?h[1][s[++l]]+=r+"":p?(u=e.apply(r,t(e,r,n,["",null])),h.push(u),r[0]?s[0]|=2:(s[l-2]=0,s[l]=u)):h.push(r)}return h},e=function(t){let e,s,n=1,h="",u="",l=[0];const p=t=>{1===n&&(t||(h=h.replace(/^\s*\n\s*|\s*\n\s*$/g,"")))?l.push(0,t,h):3===n&&(t||h)?(l.push(3,t,h),n=2):2===n&&"..."===h&&t?l.push(4,t,0):2===n&&h&&!t?l.push(5,0,!0,h):n>=5&&((h||!t&&5===n)&&(l.push(n,0,h,s),n=6),t&&(l.push(n,t,0,s),n=6)),h=""};for(let r=0;r<t.length;r++){r&&(1===n&&p(),p(r));for(let o=0;o<t[r].length;o++)e=t[r][o],1===n?"<"===e?(p(),l=[l],n=3):h+=e:4===n?"--"===h&&">"===e?(n=1,h=""):h=e+h[0]:u?e===u?u="":h+=e:'"'===e||"'"===e?u=e:">"===e?(p(),n=1):n&&("="===e?(n=5,s=h,h=""):"/"===e&&(n<5||">"===t[r][o+1])?(p(),3===n&&(l=l[0]),n=l,(l=l[0]).push(2,0,n),n=0):" "===e||"\t"===e||"\n"===e||"\r"===e?(p(),n=2):h+=e),3===n&&"!--"===h&&(n=4,l=l[0])}return p(),l},s=new Map;var n=function(n){let h=s.get(this);return h||(h=new Map,s.set(this,h)),h=t(this,h.get(n)||(h.set(n,h=e(n)),h),arguments,[]),h.length>1?h:h[0]};export{n as default};

View file

@ -0,0 +1 @@
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e||self).htm=t()}(this,function(){const e=(t,n,s,u)=>{let o;n[0]=0;for(let l=1;l<n.length;l++){const h=n[l++],p=n[l]?(n[0]|=h?1:2,s[n[l++]]):n[++l];3===h?u[0]=p:4===h?u[1]=Object.assign(u[1]||{},p):5===h?(u[1]=u[1]||{})[n[++l]]=p:6===h?u[1][n[++l]]+=p+"":h?(o=t.apply(p,e(t,p,s,["",null])),u.push(o),p[0]?n[0]|=2:(n[l-2]=0,n[l]=o)):u.push(p)}return u},t=function(e){let t,n,s=1,u="",o="",l=[0];const h=e=>{1===s&&(e||(u=u.replace(/^\s*\n\s*|\s*\n\s*$/g,"")))?l.push(0,e,u):3===s&&(e||u)?(l.push(3,e,u),s=2):2===s&&"..."===u&&e?l.push(4,e,0):2===s&&u&&!e?l.push(5,0,!0,u):s>=5&&((u||!e&&5===s)&&(l.push(s,0,u,n),s=6),e&&(l.push(s,e,0,n),s=6)),u=""};for(let p=0;p<e.length;p++){p&&(1===s&&h(),h(p));for(let f=0;f<e[p].length;f++)t=e[p][f],1===s?"<"===t?(h(),l=[l],s=3):u+=t:4===s?"--"===u&&">"===t?(s=1,u=""):u=t+u[0]:o?t===o?o="":u+=t:'"'===t||"'"===t?o=t:">"===t?(h(),s=1):s&&("="===t?(s=5,n=u,u=""):"/"===t&&(s<5||">"===e[p][f+1])?(h(),3===s&&(l=l[0]),s=l,(l=l[0]).push(2,0,s),s=0):" "===t||"\t"===t||"\n"===t||"\r"===t?(h(),s=2):u+=t),3===s&&"!--"===u&&(s=4,l=l[0])}return h(),l},n=new Map;return function(s){let u=n.get(this);return u||(u=new Map,n.set(this,u)),u=e(this,u.get(s)||(u.set(s,u=t(s)),u),arguments,[]),u.length>1?u:u[0]}});