@pod-os/elements 0.39.0 → 0.40.0-rc.0e71f55.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/elements.cjs.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/pos-add-new-thing_32.cjs.entry.js +21 -10
- package/dist/cjs/pos-markdown-document.cjs.entry.js +1 -1
- package/dist/cjs/pos-relations_2.cjs.entry.js +1 -1
- package/dist/cjs/pos-tool-attachments.cjs.entry.js +1 -1
- package/dist/collection/components/pos-login/pos-login.css +3 -0
- package/dist/collection/components/pos-login-form/pos-login-form.css +41 -0
- package/dist/collection/components/pos-login-form/pos-login-form.js +13 -2
- package/dist/collection/components/pos-markdown-document/pos-markdown-document.js +1 -1
- package/dist/collection/components/pos-navigation/bar/pos-navigation-bar.js +1 -1
- package/dist/collection/components/pos-navigation/pos-navigation.js +1 -1
- package/dist/collection/components/pos-new-thing-form/pos-new-thing-form.js +1 -1
- package/dist/collection/components/pos-relations/pos-relations.js +1 -1
- package/dist/collection/components/pos-router/pos-router.js +1 -1
- package/dist/collection/components/pos-select-term/pos-select-term.js +1 -1
- package/dist/collection/components/pos-share/pos-share.js +1 -1
- package/dist/collection/components/pos-upload/pos-upload.js +1 -1
- package/dist/collection/store/settings.js +2 -0
- package/dist/collection/tools/pos-tool-attachments/pos-tool-attachments.js +1 -1
- package/dist/components/pos-login-form2.js +1 -1
- package/dist/components/pos-login2.js +1 -1
- package/dist/components/pos-markdown-document2.js +1 -1
- package/dist/components/pos-navigation-bar2.js +1 -1
- package/dist/components/pos-navigation2.js +1 -1
- package/dist/components/pos-new-thing-form2.js +1 -1
- package/dist/components/pos-relations2.js +1 -1
- package/dist/components/pos-router2.js +1 -1
- package/dist/components/pos-select-term2.js +1 -1
- package/dist/components/pos-share2.js +1 -1
- package/dist/components/pos-tool-attachments.js +1 -1
- package/dist/components/pos-upload2.js +1 -1
- package/dist/components/settings.js +1 -1
- package/dist/elements/elements.esm.js +1 -1
- package/dist/elements/{p-ceeba057.entry.js → p-0febf76e.entry.js} +1 -1
- package/dist/elements/{p-1910fa2d.entry.js → p-57d32176.entry.js} +5 -5
- package/dist/elements/{p-780eb6aa.entry.js → p-c4034954.entry.js} +1 -1
- package/dist/elements/{p-80c897c2.entry.js → p-d6e9d178.entry.js} +1 -1
- package/dist/esm/elements.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/pos-add-new-thing_32.entry.js +21 -10
- package/dist/esm/pos-markdown-document.entry.js +1 -1
- package/dist/esm/pos-relations_2.entry.js +1 -1
- package/dist/esm/pos-tool-attachments.entry.js +1 -1
- package/dist/types/components/pos-login-form/pos-login-form.d.ts +2 -0
- package/dist/types/store/settings.d.ts +1 -0
- package/package.json +5 -5
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as e,h as t,H as i,c as r,a as o,i as s,j as a}from"./p-spEUIGXI.js";import{i as n,E as l,T as d,c as p,_ as h,n as c,S as u,x as f,d as m,r as b,w as y,e as g,f as v}from"./p-Bz2zblgU.js";import{c as w,s as x,B as k}from"./p-DO6v4X9H.js";import{P as S,N as D,a as I,T as C}from"./p-BXBNVUZ5.js";import{c as B}from"./p-vFMstSdt.js";import{L as P,e as z,s as F,a as T,g as A,b as E,w as _,S as M}from"./p-DPNKR_cm.js";import{a as R,i as N,t as U,e as O}from"./p-DpbuT47x.js";import{s as $}from"./p-BW_CkW1K.js";import{s as j}from"./p-jlzl8vRd.js";import{u as W}from"./p-D0uCfr1-.js";const L=class{constructor(t){e(this,t)}openDialog(){this.dialog.showModal()}render(){return t(i,{key:"9a60547270fcc455679acdfe6de75da57e513b1f"},t("button",{key:"32a8ba00ef511587024c843663e281e2b6930c19",id:"new",title:"Add a new thing",onClick:()=>this.openDialog()},t("sl-icon",{key:"6faf99cef999b441410770b0509f5a8d6a10f7e9",name:"plus-circle"})),t("pos-dialog",{key:"f6cd827c19d3dfe33500f03e561f399e11d728ce",ref:e=>this.dialog=e},t("span",{key:"ff40b8f28a349a1ad6db11e2d427d74ea5fbd300",slot:"title"},"Add a new thing"),t("pos-new-thing-form",{key:"e48257160d78d025e6213bd61c4953261d4829c2",slot:"content",referenceUri:this.referenceUri})))}};L.style=":host{font-family:var(--font-sans);display:block}button#new{cursor:pointer;display:flex;align-items:center;justify-content:center;border:none;width:var(--size-10);height:var(--size-10);background-color:var(--pos-primary-color);color:var(--pos-primary-text-color);font-size:var(--scale-6);border-radius:var(--radius-xs);padding:var(--size-2)}button#new:hover,button#new:focus{outline:none;filter:brightness(110%);box-shadow:var(--shadow-sm)}pos-new-thing-form{margin:var(--scale-3)}";const H=localStorage.getItem("settings"),V=w(H?JSON.parse(H):{offlineCache:!1});V.on("set",(()=>{const e=JSON.stringify(V.state);localStorage.setItem("settings",e)})),window.addEventListener("storage",(e=>{if("settings"===e.key&&e.newValue){const t=JSON.parse(e.newValue);V.state.offlineCache=t.offlineCache}}));const J=(e,t)=>t.some((t=>e instanceof t));let K,q;const G=new WeakMap,X=new WeakMap,Y=new WeakMap;let Z={get(e,t,i){if(e instanceof IDBTransaction){if("done"===t)return G.get(e);if("store"===t)return i.objectStoreNames[1]?void 0:i.objectStore(i.objectStoreNames[0])}return te(e[t])},set:(e,t,i)=>(e[t]=i,!0),has:(e,t)=>e instanceof IDBTransaction&&("done"===t||"store"===t)||t in e};function Q(e){Z=e(Z)}function ee(e){return"function"==typeof e?(t=e,(q||(q=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])).includes(t)?function(...e){return t.apply(ie(this),e),te(this.request)}:function(...e){return te(t.apply(ie(this),e))}):(e instanceof IDBTransaction&&function(e){if(G.has(e))return;const t=new Promise(((t,i)=>{const r=()=>{e.removeEventListener("complete",o),e.removeEventListener("error",s),e.removeEventListener("abort",s)},o=()=>{t(),r()},s=()=>{i(e.error||new DOMException("AbortError","AbortError")),r()};e.addEventListener("complete",o),e.addEventListener("error",s),e.addEventListener("abort",s)}));G.set(e,t)}(e),J(e,K||(K=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction]))?new Proxy(e,Z):e);var t}function te(e){if(e instanceof IDBRequest)return function(e){const t=new Promise(((t,i)=>{const r=()=>{e.removeEventListener("success",o),e.removeEventListener("error",s)},o=()=>{t(te(e.result)),r()},s=()=>{i(e.error),r()};e.addEventListener("success",o),e.addEventListener("error",s)}));return Y.set(t,e),t}(e);if(X.has(e))return X.get(e);const t=ee(e);return t!==e&&(X.set(e,t),Y.set(t,e)),t}const ie=e=>Y.get(e),re=["get","getKey","getAll","getAllKeys","count"],oe=["put","add","delete","clear"],se=new Map;function ae(e,t){if(!(e instanceof IDBDatabase)||t in e||"string"!=typeof t)return;if(se.get(t))return se.get(t);const i=t.replace(/FromIndex$/,""),r=t!==i,o=oe.includes(i);if(!(i in(r?IDBIndex:IDBObjectStore).prototype)||!o&&!re.includes(i))return;const s=async function(e,...t){const s=this.transaction(e,o?"readwrite":"readonly");let a=s.store;return r&&(a=a.index(t.shift())),(await Promise.all([a[i](...t),o&&s.done]))[0]};return se.set(t,s),s}Q((e=>({...e,get:(t,i,r)=>ae(t,i)||e.get(t,i,r),has:(t,i)=>!!ae(t,i)||e.has(t,i)})));const ne=["continue","continuePrimaryKey","advance"],le={},de=new WeakMap,pe=new WeakMap,he={get(e,t){if(!ne.includes(t))return e[t];let i=le[t];return i||(i=le[t]=function(...e){de.set(this,pe.get(this)[t](...e))}),i}};async function*ce(...e){let t=this;if(t instanceof IDBCursor||(t=await t.openCursor(...e)),!t)return;const i=new Proxy(t,he);for(pe.set(i,t),Y.set(i,ie(t));t;)yield i,t=await(de.get(i)||t.continue()),de.delete(i)}function ue(e,t){return t===Symbol.asyncIterator&&J(e,[IDBIndex,IDBObjectStore,IDBCursor])||"iterate"===t&&J(e,[IDBIndex,IDBObjectStore])}Q((e=>({...e,get:(t,i,r)=>ue(t,i)?ce:e.get(t,i,r),has:(t,i)=>ue(t,i)||e.has(t,i)})));class fe{constructor(){this.dbPromise=function(e,t,{blocked:i,upgrade:r,blocking:o,terminated:s}={}){const a=indexedDB.open(e,t),n=te(a);return r&&a.addEventListener("upgradeneeded",(e=>{r(te(a.result),e.oldVersion,e.newVersion,te(a.transaction),e)})),i&&a.addEventListener("blocked",(e=>i(e.oldVersion,e.newVersion,e))),n.then((e=>{s&&e.addEventListener("close",(()=>s())),o&&e.addEventListener("versionchange",(e=>o(e.oldVersion,e.newVersion,e)))})).catch((()=>{})),n}("OfflineCacheDB",1,{upgrade(e){e.objectStoreNames.contains("documents")||e.createObjectStore("documents",{keyPath:"url"}).createIndex("url-revision",["url","revision"])}})}async clear(){return(await this.dbPromise).clear("documents")}async get(e){const t=await this.dbPromise;return await t.get("documents",e)}async put(e){const t=await this.dbPromise;await t.getFromIndex("documents","url-revision",[e.url,e.revision])||await t.put("documents",e)}}class me{isOnline(){return navigator.onLine}}const be=(e,t)=>new S({session:e,offlineCache:t.offlineCache?new fe:new D,onlineStatus:new me});var ye="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function ge(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ve=crypto;const we=e=>e instanceof CryptoKey;const xe=new TextEncoder,ke=new TextDecoder;function Se(...e){const t=e.reduce(((e,{length:t})=>e+t),0),i=new Uint8Array(t);let r=0;for(const t of e)i.set(t,r),r+=t.length;return i}const De=e=>(e=>{let t=e;"string"==typeof t&&(t=xe.encode(t));const i=[];for(let e=0;e<t.length;e+=32768)i.push(String.fromCharCode.apply(null,t.subarray(e,e+32768)));return btoa(i.join(""))})(e).replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_"),Ie=e=>{let t=e;t instanceof Uint8Array&&(t=ke.decode(t)),t=t.replace(/-/g,"+").replace(/_/g,"/").replace(/\s/g,"");try{return(e=>{const t=atob(e),i=new Uint8Array(t.length);for(let e=0;e<t.length;e++)i[e]=t.charCodeAt(e);return i})(t)}catch{throw new TypeError("The input to be decoded is not correctly encoded.")}};class Ce extends Error{constructor(e,t){super(e,t),this.code="ERR_JOSE_GENERIC",this.name=this.constructor.name,Error.captureStackTrace?.(this,this.constructor)}}Ce.code="ERR_JOSE_GENERIC";class Be extends Ce{constructor(e,t,i="unspecified",r="unspecified"){super(e,{cause:{claim:i,reason:r,payload:t}}),this.code="ERR_JWT_CLAIM_VALIDATION_FAILED",this.claim=i,this.reason=r,this.payload=t}}Be.code="ERR_JWT_CLAIM_VALIDATION_FAILED";class Pe extends Ce{constructor(e,t,i="unspecified",r="unspecified"){super(e,{cause:{claim:i,reason:r,payload:t}}),this.code="ERR_JWT_EXPIRED",this.claim=i,this.reason=r,this.payload=t}}Pe.code="ERR_JWT_EXPIRED";class ze extends Ce{constructor(){super(...arguments),this.code="ERR_JOSE_ALG_NOT_ALLOWED"}}ze.code="ERR_JOSE_ALG_NOT_ALLOWED";class Fe extends Ce{constructor(){super(...arguments),this.code="ERR_JOSE_NOT_SUPPORTED"}}Fe.code="ERR_JOSE_NOT_SUPPORTED",class extends Ce{constructor(e="decryption operation failed",t){super(e,t),this.code="ERR_JWE_DECRYPTION_FAILED"}}.code="ERR_JWE_DECRYPTION_FAILED",class extends Ce{constructor(){super(...arguments),this.code="ERR_JWE_INVALID"}}.code="ERR_JWE_INVALID";class Te extends Ce{constructor(){super(...arguments),this.code="ERR_JWS_INVALID"}}Te.code="ERR_JWS_INVALID";class Ae extends Ce{constructor(){super(...arguments),this.code="ERR_JWT_INVALID"}}Ae.code="ERR_JWT_INVALID";class Ee extends Ce{constructor(){super(...arguments),this.code="ERR_JWK_INVALID"}}Ee.code="ERR_JWK_INVALID";class _e extends Ce{constructor(){super(...arguments),this.code="ERR_JWKS_INVALID"}}_e.code="ERR_JWKS_INVALID";class Me extends Ce{constructor(e="no applicable key found in the JSON Web Key Set",t){super(e,t),this.code="ERR_JWKS_NO_MATCHING_KEY"}}Me.code="ERR_JWKS_NO_MATCHING_KEY";class Re extends Ce{constructor(e="multiple matching keys found in the JSON Web Key Set",t){super(e,t),this.code="ERR_JWKS_MULTIPLE_MATCHING_KEYS"}}Re.code="ERR_JWKS_MULTIPLE_MATCHING_KEYS";class Ne extends Ce{constructor(e="request timed out",t){super(e,t),this.code="ERR_JWKS_TIMEOUT"}}Ne.code="ERR_JWKS_TIMEOUT";class Ue extends Ce{constructor(e="signature verification failed",t){super(e,t),this.code="ERR_JWS_SIGNATURE_VERIFICATION_FAILED"}}function Oe(e,t="algorithm.name"){return new TypeError(`CryptoKey does not support this operation, its ${t} must be ${e}`)}function $e(e,t){return e.name===t}function je(e){return parseInt(e.name.slice(4),10)}function We(e,t,...i){if((i=i.filter(Boolean)).length>2){const t=i.pop();e+=`one of type ${i.join(", ")}, or ${t}.`}else e+=2===i.length?`one of type ${i[0]} or ${i[1]}.`:`of type ${i[0]}.`;return null==t?e+=` Received ${t}`:"function"==typeof t&&t.name?e+=` Received function ${t.name}`:"object"==typeof t&&null!=t&&t.constructor?.name&&(e+=` Received an instance of ${t.constructor.name}`),e}Ue.code="ERR_JWS_SIGNATURE_VERIFICATION_FAILED";var Le=(e,...t)=>We("Key must be ",e,...t);function He(e,t,...i){return We(`Key for the ${e} algorithm must be `,t,...i)}var Ve=e=>!!we(e)||"KeyObject"===e?.[Symbol.toStringTag];const Je=["CryptoKey"];var Ke=(...e)=>{const t=e.filter(Boolean);if(0===t.length||1===t.length)return!0;let i;for(const e of t){const t=Object.keys(e);if(i&&0!==i.size)for(const e of t){if(i.has(e))return!1;i.add(e)}else i=new Set(t)}return!0};function qe(e){if("object"!=typeof(t=e)||null===t||"[object Object]"!==Object.prototype.toString.call(e))return!1;var t;if(null===Object.getPrototypeOf(e))return!0;let i=e;for(;null!==Object.getPrototypeOf(i);)i=Object.getPrototypeOf(i);return Object.getPrototypeOf(e)===i}var Ge=(e,t)=>{if(e.startsWith("RS")||e.startsWith("PS")){const{modulusLength:i}=t.algorithm;if("number"!=typeof i||i<2048)throw new TypeError(`${e} requires key modulusLength to be 2048 bits or larger`)}};function Xe(e){return qe(e)&&"string"==typeof e.kty}var Ye=async e=>{if(!e.alg)throw new TypeError('"alg" argument is required when "jwk.alg" is not present');const{algorithm:t,keyUsages:i}=function(e){let t,i;switch(e.kty){case"RSA":switch(e.alg){case"PS256":case"PS384":case"PS512":t={name:"RSA-PSS",hash:`SHA-${e.alg.slice(-3)}`},i=e.d?["sign"]:["verify"];break;case"RS256":case"RS384":case"RS512":t={name:"RSASSA-PKCS1-v1_5",hash:`SHA-${e.alg.slice(-3)}`},i=e.d?["sign"]:["verify"];break;case"RSA-OAEP":case"RSA-OAEP-256":case"RSA-OAEP-384":case"RSA-OAEP-512":t={name:"RSA-OAEP",hash:`SHA-${parseInt(e.alg.slice(-3),10)||1}`},i=e.d?["decrypt","unwrapKey"]:["encrypt","wrapKey"];break;default:throw new Fe('Invalid or unsupported JWK "alg" (Algorithm) Parameter value')}break;case"EC":switch(e.alg){case"ES256":t={name:"ECDSA",namedCurve:"P-256"},i=e.d?["sign"]:["verify"];break;case"ES384":t={name:"ECDSA",namedCurve:"P-384"},i=e.d?["sign"]:["verify"];break;case"ES512":t={name:"ECDSA",namedCurve:"P-521"},i=e.d?["sign"]:["verify"];break;case"ECDH-ES":case"ECDH-ES+A128KW":case"ECDH-ES+A192KW":case"ECDH-ES+A256KW":t={name:"ECDH",namedCurve:e.crv},i=e.d?["deriveBits"]:[];break;default:throw new Fe('Invalid or unsupported JWK "alg" (Algorithm) Parameter value')}break;case"OKP":switch(e.alg){case"Ed25519":t={name:"Ed25519"},i=e.d?["sign"]:["verify"];break;case"EdDSA":t={name:e.crv},i=e.d?["sign"]:["verify"];break;case"ECDH-ES":case"ECDH-ES+A128KW":case"ECDH-ES+A192KW":case"ECDH-ES+A256KW":t={name:e.crv},i=e.d?["deriveBits"]:[];break;default:throw new Fe('Invalid or unsupported JWK "alg" (Algorithm) Parameter value')}break;default:throw new Fe('Invalid or unsupported JWK "kty" (Key Type) Parameter value')}return{algorithm:t,keyUsages:i}}(e),r=[t,e.ext??!1,e.key_ops??i],o={...e};return delete o.alg,delete o.use,ve.subtle.importKey("jwk",o,...r)};const Ze=e=>Ie(e);let Qe,et;const tt=e=>"KeyObject"===e?.[Symbol.toStringTag],it=async(e,t,i,r,o=!1)=>{let s=e.get(t);if(s?.[r])return s[r];const a=await Ye({...i,alg:r});return o&&Object.freeze(t),s?s[r]=a:e.set(t,{[r]:a}),a};async function rt(e,t){if(!qe(e))throw new TypeError("JWK must be an object");switch(t||(t=e.alg),e.kty){case"oct":if("string"!=typeof e.k||!e.k)throw new TypeError('missing "k" (Key Value) Parameter value');return Ie(e.k);case"RSA":if("oth"in e&&void 0!==e.oth)throw new Fe('RSA JWK "oth" (Other Primes Info) Parameter value is not supported');case"EC":case"OKP":return Ye({...e,alg:t});default:throw new Fe('Unsupported "kty" (Key Type) Parameter value')}}const ot=e=>e?.[Symbol.toStringTag],st=(e,t,i)=>{if(void 0!==t.use&&"sig"!==t.use)throw new TypeError("Invalid key for this operation, when present its use must be sig");if(void 0!==t.key_ops&&!0!==t.key_ops.includes?.(i))throw new TypeError(`Invalid key for this operation, when present its key_ops must include ${i}`);if(void 0!==t.alg&&t.alg!==e)throw new TypeError(`Invalid key for this operation, when present its alg must be ${e}`);return!0};function at(e,t,i,r){t.startsWith("HS")||"dir"===t||t.startsWith("PBES2")||/^A\d{3}(?:GCM)?KW$/.test(t)?((e,t,i,r)=>{if(!(t instanceof Uint8Array)){if(r&&Xe(t)){if(function(e){return Xe(e)&&"oct"===e.kty&&"string"==typeof e.k}(t)&&st(e,t,i))return;throw new TypeError('JSON Web Key for symmetric algorithms must have JWK "kty" (Key Type) equal to "oct" and the JWK "k" (Key Value) present')}if(!Ve(t))throw new TypeError(He(e,t,...Je,"Uint8Array",r?"JSON Web Key":null));if("secret"!==t.type)throw new TypeError(`${ot(t)} instances for symmetric algorithms must be of type "secret"`)}})(t,i,r,e):((e,t,i,r)=>{if(r&&Xe(t))switch(i){case"sign":if(function(e){return"oct"!==e.kty&&"string"==typeof e.d}(t)&&st(e,t,i))return;throw new TypeError("JSON Web Key for this operation be a private JWK");case"verify":if(function(e){return"oct"!==e.kty&&void 0===e.d}(t)&&st(e,t,i))return;throw new TypeError("JSON Web Key for this operation be a public JWK")}if(!Ve(t))throw new TypeError(He(e,t,...Je,r?"JSON Web Key":null));if("secret"===t.type)throw new TypeError(`${ot(t)} instances for asymmetric algorithms must not be of type "secret"`);if("sign"===i&&"public"===t.type)throw new TypeError(`${ot(t)} instances for asymmetric algorithm signing must be of type "private"`);if("decrypt"===i&&"public"===t.type)throw new TypeError(`${ot(t)} instances for asymmetric algorithm decryption must be of type "private"`);if(t.algorithm&&"verify"===i&&"private"===t.type)throw new TypeError(`${ot(t)} instances for asymmetric algorithm verifying must be of type "public"`);if(t.algorithm&&"encrypt"===i&&"private"===t.type)throw new TypeError(`${ot(t)} instances for asymmetric algorithm encryption must be of type "public"`)})(t,i,r,e)}at.bind(void 0,!1);const nt=at.bind(void 0,!0);function lt(e,t,i,r,o){if(void 0!==o.crit&&void 0===r?.crit)throw new e('"crit" (Critical) Header Parameter MUST be integrity protected');if(!r||void 0===r.crit)return new Set;if(!Array.isArray(r.crit)||0===r.crit.length||r.crit.some((e=>"string"!=typeof e||0===e.length)))throw new e('"crit" (Critical) Header Parameter MUST be an array of non-empty strings when present');let s;s=void 0!==i?new Map([...Object.entries(i),...t.entries()]):t;for(const t of r.crit){if(!s.has(t))throw new Fe(`Extension Header Parameter "${t}" is not recognized`);if(void 0===o[t])throw new e(`Extension Header Parameter "${t}" is missing`);if(s.get(t)&&void 0===r[t])throw new e(`Extension Header Parameter "${t}" MUST be integrity protected`)}return new Set(r.crit)}async function dt(e){return(async e=>{if(e instanceof Uint8Array)return{kty:"oct",k:De(e)};if(!we(e))throw new TypeError(Le(e,...Je,"Uint8Array"));if(!e.extractable)throw new TypeError("non-extractable CryptoKey cannot be exported as a JWK");const{ext:t,key_ops:i,alg:r,use:o,...s}=await ve.subtle.exportKey("jwk",e);return s})(e)}function pt(e,t){const i=`SHA-${e.slice(-3)}`;switch(e){case"HS256":case"HS384":case"HS512":return{hash:i,name:"HMAC"};case"PS256":case"PS384":case"PS512":return{hash:i,name:"RSA-PSS",saltLength:e.slice(-3)>>3};case"RS256":case"RS384":case"RS512":return{hash:i,name:"RSASSA-PKCS1-v1_5"};case"ES256":case"ES384":case"ES512":return{hash:i,name:"ECDSA",namedCurve:t.namedCurve};case"Ed25519":return{name:"Ed25519"};case"EdDSA":return{name:t.name};default:throw new Fe(`alg ${e} is not supported either by JOSE or your javascript runtime`)}}async function ht(e,t,i){if("sign"===i&&(t=await((e,t)=>{if(tt(e)){let i=e.export({format:"jwk"});return i.k?Ze(i.k):(Qe||(Qe=new WeakMap),it(Qe,e,i,t))}return Xe(e)?e.k?Ie(e.k):(Qe||(Qe=new WeakMap),it(Qe,e,e,t,!0)):e})(t,e)),"verify"===i&&(t=await((e,t)=>{if(tt(e)){let i=e.export({format:"jwk"});return delete i.d,delete i.dp,delete i.dq,delete i.p,delete i.q,delete i.qi,i.k?Ze(i.k):(et||(et=new WeakMap),it(et,e,i,t))}return Xe(e)?e.k?Ie(e.k):(et||(et=new WeakMap),it(et,e,e,t,!0)):e})(t,e)),we(t))return function(e,t,...i){switch(t){case"HS256":case"HS384":case"HS512":{if(!$e(e.algorithm,"HMAC"))throw Oe("HMAC");const i=parseInt(t.slice(2),10);if(je(e.algorithm.hash)!==i)throw Oe(`SHA-${i}`,"algorithm.hash");break}case"RS256":case"RS384":case"RS512":{if(!$e(e.algorithm,"RSASSA-PKCS1-v1_5"))throw Oe("RSASSA-PKCS1-v1_5");const i=parseInt(t.slice(2),10);if(je(e.algorithm.hash)!==i)throw Oe(`SHA-${i}`,"algorithm.hash");break}case"PS256":case"PS384":case"PS512":{if(!$e(e.algorithm,"RSA-PSS"))throw Oe("RSA-PSS");const i=parseInt(t.slice(2),10);if(je(e.algorithm.hash)!==i)throw Oe(`SHA-${i}`,"algorithm.hash");break}case"EdDSA":if("Ed25519"!==e.algorithm.name&&"Ed448"!==e.algorithm.name)throw Oe("Ed25519 or Ed448");break;case"Ed25519":if(!$e(e.algorithm,"Ed25519"))throw Oe("Ed25519");break;case"ES256":case"ES384":case"ES512":{if(!$e(e.algorithm,"ECDSA"))throw Oe("ECDSA");const i=function(e){switch(e){case"ES256":return"P-256";case"ES384":return"P-384";case"ES512":return"P-521";default:throw new Error("unreachable")}}(t);if(e.algorithm.namedCurve!==i)throw Oe(i,"algorithm.namedCurve");break}default:throw new TypeError("CryptoKey does not support this operation")}!function(e,t){if(t.length&&!t.some((t=>e.usages.includes(t)))){let e="CryptoKey does not support this operation, its usages must include ";if(t.length>2){const i=t.pop();e+=`one of ${t.join(", ")}, or ${i}.`}else e+=2===t.length?`one of ${t[0]} or ${t[1]}.`:`${t[0]}.`;throw new TypeError(e)}}(e,i)}(t,e,i),t;if(t instanceof Uint8Array){if(!e.startsWith("HS"))throw new TypeError(Le(t,...Je));return ve.subtle.importKey("raw",t,{hash:`SHA-${e.slice(-3)}`,name:"HMAC"},!1,[i])}throw new TypeError(Le(t,...Je,"Uint8Array","JSON Web Key"))}async function ct(e,t,i){if(e instanceof Uint8Array&&(e=ke.decode(e)),"string"!=typeof e)throw new Te("Compact JWS must be a string or Uint8Array");const{0:r,1:o,2:s,length:a}=e.split(".");if(3!==a)throw new Te("Invalid Compact JWS");const n=await async function(e,t,i){if(!qe(e))throw new Te("Flattened JWS must be an object");if(void 0===e.protected&&void 0===e.header)throw new Te('Flattened JWS must have either of the "protected" or "header" members');if(void 0!==e.protected&&"string"!=typeof e.protected)throw new Te("JWS Protected Header incorrect type");if(void 0===e.payload)throw new Te("JWS Payload missing");if("string"!=typeof e.signature)throw new Te("JWS Signature missing or incorrect type");if(void 0!==e.header&&!qe(e.header))throw new Te("JWS Unprotected Header incorrect type");let r={};if(e.protected)try{const t=Ie(e.protected);r=JSON.parse(ke.decode(t))}catch{throw new Te("JWS Protected Header is invalid")}if(!Ke(r,e.header))throw new Te("JWS Protected and JWS Unprotected Header Parameter names must be disjoint");const o={...r,...e.header};let s=!0;if(lt(Te,new Map([["b64",!0]]),i?.crit,r,o).has("b64")&&(s=r.b64,"boolean"!=typeof s))throw new Te('The "b64" (base64url-encode payload) Header Parameter must be a boolean');const{alg:a}=o;if("string"!=typeof a||!a)throw new Te('JWS "alg" (Algorithm) Header Parameter missing or invalid');const n=i&&((e,t)=>{if(void 0!==t&&(!Array.isArray(t)||t.some((e=>"string"!=typeof e))))throw new TypeError(`"${e}" option must be an array of strings`);if(t)return new Set(t)})("algorithms",i.algorithms);if(n&&!n.has(a))throw new ze('"alg" (Algorithm) Header Parameter value not allowed');if(s){if("string"!=typeof e.payload)throw new Te("JWS Payload must be a string")}else if("string"!=typeof e.payload&&!(e.payload instanceof Uint8Array))throw new Te("JWS Payload must be a string or an Uint8Array instance");let l=!1;"function"==typeof t?(t=await t(r,e),l=!0,nt(a,t,"verify"),Xe(t)&&(t=await rt(t,a))):nt(a,t,"verify");const d=Se(xe.encode(e.protected??""),xe.encode("."),"string"==typeof e.payload?xe.encode(e.payload):e.payload);let p,h;try{p=Ie(e.signature)}catch{throw new Te("Failed to base64url decode the signature")}if(!await(async(e,t,i,r)=>{const o=await ht(e,t,"verify");Ge(e,o);const s=pt(e,o.algorithm);try{return await ve.subtle.verify(s,o,i,r)}catch{return!1}})(a,t,p,d))throw new Ue;if(s)try{h=Ie(e.payload)}catch{throw new Te("Failed to base64url decode the payload")}else h="string"==typeof e.payload?xe.encode(e.payload):e.payload;const c={payload:h};return void 0!==e.protected&&(c.protectedHeader=r),void 0!==e.header&&(c.unprotectedHeader=e.header),l?{...c,key:t}:c}({payload:o,protected:r,signature:s},t,i),l={payload:n.payload,protectedHeader:n.protectedHeader};return"function"==typeof t?{...l,key:n.key}:l}var ut=e=>Math.floor(e.getTime()/1e3);const ft=/^(\+|\-)? ?(\d+|\d+\.\d+) ?(seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)(?: (ago|from now))?$/i;var mt=e=>{const t=ft.exec(e);if(!t||t[4]&&t[1])throw new TypeError("Invalid time period format");const i=parseFloat(t[2]);let r;switch(t[3].toLowerCase()){case"sec":case"secs":case"second":case"seconds":case"s":r=Math.round(i);break;case"minute":case"minutes":case"min":case"mins":case"m":r=Math.round(60*i);break;case"hour":case"hours":case"hr":case"hrs":case"h":r=Math.round(3600*i);break;case"day":case"days":case"d":r=Math.round(86400*i);break;case"week":case"weeks":case"w":r=Math.round(604800*i);break;default:r=Math.round(31557600*i)}return"-"===t[1]||"ago"===t[4]?-r:r};const bt=e=>e.toLowerCase().replace(/^application\//,"");var yt=(e,t,i={})=>{let r;try{r=JSON.parse(ke.decode(t))}catch{}if(!qe(r))throw new Ae("JWT Claims Set must be a top-level JSON object");const{typ:o}=i;if(o&&("string"!=typeof e.typ||bt(e.typ)!==bt(o)))throw new Be('unexpected "typ" JWT header value',r,"typ","check_failed");const{requiredClaims:s=[],issuer:a,subject:n,audience:l,maxTokenAge:d}=i,p=[...s];void 0!==d&&p.push("iat"),void 0!==l&&p.push("aud"),void 0!==n&&p.push("sub"),void 0!==a&&p.push("iss");for(const e of new Set(p.reverse()))if(!(e in r))throw new Be(`missing required "${e}" claim`,r,e,"missing");if(a&&!(Array.isArray(a)?a:[a]).includes(r.iss))throw new Be('unexpected "iss" claim value',r,"iss","check_failed");if(n&&r.sub!==n)throw new Be('unexpected "sub" claim value',r,"sub","check_failed");if(l&&(c="string"==typeof l?[l]:l,!("string"==typeof(h=r.aud)?c.includes(h):Array.isArray(h)&&c.some(Set.prototype.has.bind(new Set(h))))))throw new Be('unexpected "aud" claim value',r,"aud","check_failed");var h,c;let u;switch(typeof i.clockTolerance){case"string":u=mt(i.clockTolerance);break;case"number":u=i.clockTolerance;break;case"undefined":u=0;break;default:throw new TypeError("Invalid clockTolerance option type")}const{currentDate:f}=i,m=ut(f||new Date);if((void 0!==r.iat||d)&&"number"!=typeof r.iat)throw new Be('"iat" claim must be a number',r,"iat","invalid");if(void 0!==r.nbf){if("number"!=typeof r.nbf)throw new Be('"nbf" claim must be a number',r,"nbf","invalid");if(r.nbf>m+u)throw new Be('"nbf" claim timestamp check failed',r,"nbf","check_failed")}if(void 0!==r.exp){if("number"!=typeof r.exp)throw new Be('"exp" claim must be a number',r,"exp","invalid");if(r.exp<=m-u)throw new Pe('"exp" claim timestamp check failed',r,"exp","check_failed")}if(d){const e=m-r.iat;if(e-u>("number"==typeof d?d:mt(d)))throw new Pe('"iat" claim timestamp check failed (too far in the past)',r,"iat","check_failed");if(e<0-u)throw new Be('"iat" claim timestamp check failed (it should be in the past)',r,"iat","check_failed")}return r};async function gt(e,t,i){const r=await ct(e,t,i);if(r.protectedHeader.crit?.includes("b64")&&!1===r.protectedHeader.b64)throw new Ae("JWTs MUST NOT use unencoded payload");const o={payload:yt(r.protectedHeader,r.payload,i),protectedHeader:r.protectedHeader};return"function"==typeof t?{...o,key:r.key}:o}class vt{constructor(e){if(!(e instanceof Uint8Array))throw new TypeError("payload must be an instance of Uint8Array");this._payload=e}setProtectedHeader(e){if(this._protectedHeader)throw new TypeError("setProtectedHeader can only be called once");return this._protectedHeader=e,this}setUnprotectedHeader(e){if(this._unprotectedHeader)throw new TypeError("setUnprotectedHeader can only be called once");return this._unprotectedHeader=e,this}async sign(e,t){if(!this._protectedHeader&&!this._unprotectedHeader)throw new Te("either setProtectedHeader or setUnprotectedHeader must be called before #sign()");if(!Ke(this._protectedHeader,this._unprotectedHeader))throw new Te("JWS Protected and JWS Unprotected Header Parameter names must be disjoint");const i={...this._protectedHeader,...this._unprotectedHeader};let r=!0;if(lt(Te,new Map([["b64",!0]]),t?.crit,this._protectedHeader,i).has("b64")&&(r=this._protectedHeader.b64,"boolean"!=typeof r))throw new Te('The "b64" (base64url-encode payload) Header Parameter must be a boolean');const{alg:o}=i;if("string"!=typeof o||!o)throw new Te('JWS "alg" (Algorithm) Header Parameter missing or invalid');nt(o,e,"sign");let s,a=this._payload;r&&(a=xe.encode(De(a))),s=xe.encode(this._protectedHeader?De(JSON.stringify(this._protectedHeader)):"");const n=Se(s,xe.encode("."),a),l=await(async(e,t,i)=>{const r=await ht(e,t,"sign");Ge(e,r);const o=await ve.subtle.sign(pt(e,r.algorithm),r,i);return new Uint8Array(o)})(o,e,n),d={signature:De(l),payload:""};return r&&(d.payload=ke.decode(a)),this._unprotectedHeader&&(d.header=this._unprotectedHeader),this._protectedHeader&&(d.protected=ke.decode(s)),d}}class wt{constructor(e){this._flattened=new vt(e)}setProtectedHeader(e){return this._flattened.setProtectedHeader(e),this}async sign(e,t){const i=await this._flattened.sign(e,t);if(void 0===i.payload)throw new TypeError("use the flattened module for creating JWS with b64: false");return`${i.protected}.${i.payload}.${i.signature}`}}function xt(e,t){if(!Number.isFinite(t))throw new TypeError(`Invalid ${e} input`);return t}class kt{constructor(e={}){if(!qe(e))throw new TypeError("JWT Claims Set MUST be an object");this._payload=e}setIssuer(e){return this._payload={...this._payload,iss:e},this}setSubject(e){return this._payload={...this._payload,sub:e},this}setAudience(e){return this._payload={...this._payload,aud:e},this}setJti(e){return this._payload={...this._payload,jti:e},this}setNotBefore(e){return this._payload="number"==typeof e?{...this._payload,nbf:xt("setNotBefore",e)}:e instanceof Date?{...this._payload,nbf:xt("setNotBefore",ut(e))}:{...this._payload,nbf:ut(new Date)+mt(e)},this}setExpirationTime(e){return this._payload="number"==typeof e?{...this._payload,exp:xt("setExpirationTime",e)}:e instanceof Date?{...this._payload,exp:xt("setExpirationTime",ut(e))}:{...this._payload,exp:ut(new Date)+mt(e)},this}setIssuedAt(e){return this._payload=void 0===e?{...this._payload,iat:ut(new Date)}:e instanceof Date?{...this._payload,iat:xt("setIssuedAt",ut(e))}:"string"==typeof e?{...this._payload,iat:xt("setIssuedAt",ut(new Date)+mt(e))}:{...this._payload,iat:xt("setIssuedAt",e)},this}}class St extends kt{setProtectedHeader(e){return this._protectedHeader=e,this}async sign(e,t){const i=new wt(xe.encode(JSON.stringify(this._payload)));if(i.setProtectedHeader(this._protectedHeader),Array.isArray(this._protectedHeader?.crit)&&this._protectedHeader.crit.includes("b64")&&!1===this._protectedHeader.b64)throw new Ae("JWTs MUST NOT use unencoded payload");return i.sign(e,t)}}const Dt=(e,t)=>{if("string"!=typeof e||!e)throw new Ee(`${t} missing or invalid`)};async function It(e,t){if(!qe(e))throw new TypeError("JWK must be an object");if(t??(t="sha256"),"sha256"!==t&&"sha384"!==t&&"sha512"!==t)throw new TypeError('digestAlgorithm must one of "sha256", "sha384", or "sha512"');let i;switch(e.kty){case"EC":Dt(e.crv,'"crv" (Curve) Parameter'),Dt(e.x,'"x" (X Coordinate) Parameter'),Dt(e.y,'"y" (Y Coordinate) Parameter'),i={crv:e.crv,kty:e.kty,x:e.x,y:e.y};break;case"OKP":Dt(e.crv,'"crv" (Subtype of Key Pair) Parameter'),Dt(e.x,'"x" (Public Key) Parameter'),i={crv:e.crv,kty:e.kty,x:e.x};break;case"RSA":Dt(e.e,'"e" (Exponent) Parameter'),Dt(e.n,'"n" (Modulus) Parameter'),i={e:e.e,kty:e.kty,n:e.n};break;case"oct":Dt(e.k,'"k" (Key Value) Parameter'),i={k:e.k,kty:e.kty};break;default:throw new Fe('"kty" (Key Type) Parameter missing or unsupported')}const r=xe.encode(JSON.stringify(i));return De(await(async(e,t)=>{const i=`SHA-${e.slice(-3)}`;return new Uint8Array(await ve.subtle.digest(i,t))})(t,r))}function Ct(e){return qe(e)}function Bt(e){return"function"==typeof structuredClone?structuredClone(e):JSON.parse(JSON.stringify(e))}class Pt{constructor(e){if(this._cached=new WeakMap,!function(e){return e&&"object"==typeof e&&Array.isArray(e.keys)&&e.keys.every(Ct)}(e))throw new _e("JSON Web Key Set malformed");this._jwks=Bt(e)}async getKey(e,t){const{alg:i,kid:r}={...e,...t?.header},o=function(e){switch("string"==typeof e&&e.slice(0,2)){case"RS":case"PS":return"RSA";case"ES":return"EC";case"Ed":return"OKP";default:throw new Fe('Unsupported "alg" value for a JSON Web Key Set')}}(i),s=this._jwks.keys.filter((e=>{let t=o===e.kty;if(t&&"string"==typeof r&&(t=r===e.kid),t&&"string"==typeof e.alg&&(t=i===e.alg),t&&"string"==typeof e.use&&(t="sig"===e.use),t&&Array.isArray(e.key_ops)&&(t=e.key_ops.includes("verify")),t)switch(i){case"ES256":t="P-256"===e.crv;break;case"ES256K":t="secp256k1"===e.crv;break;case"ES384":t="P-384"===e.crv;break;case"ES512":t="P-521"===e.crv;break;case"Ed25519":t="Ed25519"===e.crv;break;case"EdDSA":t="Ed25519"===e.crv||"Ed448"===e.crv}return t})),{0:a,length:n}=s;if(0===n)throw new Me;if(1!==n){const e=new Re,{_cached:t}=this;throw e[Symbol.asyncIterator]=async function*(){for(const e of s)try{yield await zt(t,e,i)}catch{}},e}return zt(this._cached,a,i)}}async function zt(e,t,i){const r=e.get(t)||e.set(t,{}).get(t);if(void 0===r[i]){const e=await rt({...t,ext:!0},i);if(e instanceof Uint8Array||"public"!==e.type)throw new _e("JSON Web Key Set members must be public keys");r[i]=e}return r[i]}function Ft(e){const t=new Pt(e),i=async(e,i)=>t.getKey(e,i);return Object.defineProperties(i,{jwks:{value:()=>Bt(t._jwks),enumerable:!0,configurable:!1,writable:!1}}),i}let Tt;"undefined"!=typeof navigator&&navigator.userAgent?.startsWith?.("Mozilla/5.0 ")||(Tt="jose/v5.10.0");const At=Symbol();class Et{constructor(e,t){if(!(e instanceof URL))throw new TypeError("url must be an instance of URL");var i,r;this._url=new URL(e.href),this._options={agent:t?.agent,headers:t?.headers},this._timeoutDuration="number"==typeof t?.timeoutDuration?t?.timeoutDuration:5e3,this._cooldownDuration="number"==typeof t?.cooldownDuration?t?.cooldownDuration:3e4,this._cacheMaxAge="number"==typeof t?.cacheMaxAge?t?.cacheMaxAge:6e5,void 0!==t?.[At]&&(this._cache=t?.[At],i=t?.[At],r=this._cacheMaxAge,"object"==typeof i&&null!==i&&"uat"in i&&"number"==typeof i.uat&&!(Date.now()-i.uat>=r)&&"jwks"in i&&qe(i.jwks)&&Array.isArray(i.jwks.keys)&&Array.prototype.every.call(i.jwks.keys,qe)&&(this._jwksTimestamp=this._cache.uat,this._local=Ft(this._cache.jwks)))}coolingDown(){return"number"==typeof this._jwksTimestamp&&Date.now()<this._jwksTimestamp+this._cooldownDuration}fresh(){return"number"==typeof this._jwksTimestamp&&Date.now()<this._jwksTimestamp+this._cacheMaxAge}async getKey(e,t){this._local&&this.fresh()||await this.reload();try{return await this._local(e,t)}catch(i){if(i instanceof Me&&!1===this.coolingDown())return await this.reload(),this._local(e,t);throw i}}async reload(){this._pendingFetch&&("undefined"!=typeof WebSocketPair||"undefined"!=typeof navigator&&"Cloudflare-Workers"===navigator.userAgent||"undefined"!=typeof EdgeRuntime&&"vercel"===EdgeRuntime)&&(this._pendingFetch=void 0);const e=new Headers(this._options.headers);Tt&&!e.has("User-Agent")&&(e.set("User-Agent",Tt),this._options.headers=Object.fromEntries(e.entries())),this._pendingFetch||(this._pendingFetch=(async(e,t,i)=>{let r,o,s=!1;"function"==typeof AbortController&&(r=new AbortController,o=setTimeout((()=>{s=!0,r.abort()}),t));const a=await fetch(e.href,{signal:r?r.signal:void 0,redirect:"manual",headers:i.headers}).catch((e=>{if(s)throw new Ne;throw e}));if(void 0!==o&&clearTimeout(o),200!==a.status)throw new Ce("Expected 200 OK from the JSON Web Key Set HTTP response");try{return await a.json()}catch{throw new Ce("Failed to parse the JSON Web Key Set HTTP response as JSON")}})(this._url,this._timeoutDuration,this._options).then((e=>{this._local=Ft(e),this._cache&&(this._cache.uat=Date.now(),this._cache.jwks=e),this._jwksTimestamp=Date.now(),this._pendingFetch=void 0})).catch((e=>{throw this._pendingFetch=void 0,e}))),await this._pendingFetch}}function _t(e,t){const i=new Et(e,t),r=async(e,t)=>i.getKey(e,t);return Object.defineProperties(r,{coolingDown:{get:()=>i.coolingDown(),enumerable:!0,configurable:!1},fresh:{get:()=>i.fresh(),enumerable:!0,configurable:!1},reload:{value:()=>i.reload(),enumerable:!0,configurable:!1,writable:!1},reloading:{get:()=>!!i._pendingFetch,enumerable:!0,configurable:!1},jwks:{value:()=>i._local?.jwks(),enumerable:!0,configurable:!1,writable:!1}}),r}const Mt=Ie;function Rt(e){const t=e?.modulusLength??2048;if("number"!=typeof t||t<2048)throw new Fe("Invalid or unsupported modulusLength option provided, 2048 bits or larger keys must be used");return t}class Nt{dbName;storeName;dbVersion;db=null;constructor(e="soidc",t="session",i=1){this.dbName=e,this.storeName=t,this.dbVersion=i}async init(){return new Promise(((e,t)=>{const i=indexedDB.open(this.dbName,this.dbVersion);i.onerror=e=>{t(new Error(`Database error: ${e.target.error}`))},i.onsuccess=t=>{this.db=t.target.result,e(this)},i.onupgradeneeded=e=>{const t=e.target.result;t.objectStoreNames.contains(this.storeName)||t.createObjectStore(this.storeName)}}))}async setItem(e,t){return this.db||await this.init(),new Promise(((i,r)=>{const o=this.db.transaction(this.storeName,"readwrite");o.oncomplete=()=>{i()},o.onerror=t=>{r(new Error(`Transaction error for setItem(${e},...): ${t.target.error}`))},o.onabort=t=>{r(new Error(`Transaction aborted for setItem(${e},...): ${t.target.error}`))},o.objectStore(this.storeName).put(t,e)}))}async getItem(e){return this.db||await this.init(),new Promise(((t,i)=>{const r=this.db.transaction(this.storeName,"readonly");r.onerror=t=>{i(new Error(`Transaction error for getItem(${e}): ${t.target.error}`))},r.onabort=t=>{i(new Error(`Transaction aborted for getItem(${e}): ${t.target.error}`))};const o=r.objectStore(this.storeName).get(e);o.onsuccess=()=>{t(o.result||null)}}))}async deleteItem(e){return this.db||await this.init(),new Promise(((t,i)=>{const r=this.db.transaction(this.storeName,"readwrite");r.oncomplete=()=>{t()},r.onerror=t=>{i(new Error(`Transaction error for deleteItem(${e}): ${t.target.error}`))},r.onabort=t=>{i(new Error(`Transaction aborted for deleteItem(${e}): ${t.target.error}`))},r.objectStore(this.storeName).delete(e)}))}async clear(){return this.db||await this.init(),new Promise(((e,t)=>{const i=this.db.transaction(this.storeName,"readwrite");i.oncomplete=()=>{e()},i.onerror=e=>{t(new Error(`Transaction error for clear(): ${e.target.error}`))},i.onabort=e=>{t(new Error(`Transaction aborted for clear(): ${e.target.error}`))},i.objectStore(this.storeName).clear()}))}close(){this.db&&(this.db.close(),this.db=null)}}const Ut=async()=>{const e=window.crypto.randomUUID()+"-"+window.crypto.randomUUID(),t=new Uint8Array(await window.crypto.subtle.digest("SHA-256",(new TextEncoder).encode(e)));return{pkce_code_verifier:e,pkce_code_challenge:btoa(String.fromCharCode(...t)).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}},Ot=async()=>{const e=await(new Nt).init(),t=await e.getItem("client_id"),i=await e.getItem("token_endpoint"),r=await e.getItem("dpop_keypair"),o=await e.getItem("refresh_token");if(null===t||null===i||null===r||null===o)throw new Error("Could not refresh tokens: details missing from database.");const s=await $t(o,t,i,r).then((e=>{if(!e.ok)throw new Error(`HTTP error! Status: ${e.status}`);return e.json()})),a=s.access_token,n=await e.getItem("idp");if(null===n)throw new Error("Access Token validation preparation - Could not find in sessionDatabase: idp");const l=await e.getItem("jwks_uri");if(null===l)throw new Error("Access Token validation preparation - Could not find in sessionDatabase: jwks_uri");const d=_t(new URL(l)),{payload:p}=await gt(a,d,{issuer:n,audience:"solid"}),h=await It(await dt(r.publicKey));if(p.cnf.jkt!=h)throw new Error("Access Token validation failed on `jkt`: jkt != DPoP thumbprint - "+p.cnf.jkt+" != "+h);if(p.client_id!=t)throw new Error("Access Token validation failed on `client_id`: JWT payload != client_id - "+p.client_id+" != "+t);return await e.setItem("refresh_token",s.refresh_token),e.close(),{...s,dpop_key_pair:r}},$t=async(e,t,i,r)=>{const o=await dt(r.publicKey);o.alg="ES256";const s=await new St({htu:i,htm:"POST"}).setIssuedAt().setJti(window.crypto.randomUUID()).setProtectedHeader({alg:"ES256",typ:"dpop+jwt",jwk:o}).sign(r.privateKey);return fetch(i,{method:"POST",headers:{dpop:s,"Content-Type":"application/x-www-form-urlencoded"},body:new URLSearchParams({grant_type:"refresh_token",refresh_token:e,client_id:t})})};class jt{sessionInformation;isActive_=!1;webId_=void 0;currentAth_=void 0;tokenRefreshTimeout;sessionDeactivateTimeout;onSessionExpirationWarning;constructor(e,t){this.sessionInformation={clientDetails:e},this.onSessionExpirationWarning=t?.onSessionExpirationWarning}async login(e,t){await(async(e,t,i)=>{const r=new URL(t),o=r.origin+r.pathname+r.search,s=new URL(e).origin,a=await fetch(`${s}/.well-known/openid-configuration`).then((e=>{if(!e.ok)throw new Error(`HTTP error! Status: ${e.status}`);return e.json()})),n=a.issuer,l=e=>e.endsWith("/")?e.slice(0,-1):e;if(l(e)!==l(n))throw new Error("RFC 9207 - iss != idp - "+n+" != "+e);sessionStorage.setItem("idp",n),sessionStorage.setItem("token_endpoint",a.token_endpoint),sessionStorage.setItem("jwks_uri",a.jwks_uri);let d=i?.client_id;if(!d){const e=a.registration_endpoint,t=await(async(e,t)=>{const i={...t,grant_types:["authorization_code","refresh_token"],id_token_signed_response_alg:"ES256",token_endpoint_auth_method:"none",application_type:"web",subject_type:"public"};return fetch(e,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(i)})})(e,i??{redirect_uris:[o]}).then((e=>{if(!e.ok)throw new Error(`HTTP error! Status: ${e.status}`);return e.json()}));d=t.client_id,sessionStorage.setItem("client_id",d)}const{pkce_code_verifier:p,pkce_code_challenge:h}=await Ut();sessionStorage.setItem("pkce_code_verifier",p);const c=window.crypto.randomUUID();sessionStorage.setItem("csrf_token",c);const u=a.authorization_endpoint+"?response_type=code"+`&redirect_uri=${encodeURIComponent(o)}&scope=openid offline_access webid`+`&client_id=${encodeURIComponent(d)}&code_challenge_method=S256`+`&code_challenge=${h}`+`&state=${c}&prompt=consent`;window.location.href=u})(e,t,this.sessionInformation.clientDetails)}async logout(){if(this.sessionDeactivateTimeout&&clearTimeout(this.sessionDeactivateTimeout),this.sessionDeactivateTimeout=void 0,this.tokenRefreshTimeout&&clearTimeout(this.tokenRefreshTimeout),this.tokenRefreshTimeout=void 0,this.sessionInformation.idpDetails=void 0,this.sessionInformation.tokenDetails=void 0,this.isActive_=!1,this.webId_=void 0,this.sessionInformation.clientDetails?.client_id)try{new URL(this.sessionInformation.clientDetails.client_id)}catch(e){this.sessionInformation.clientDetails.client_id=void 0}const e=await(new Nt).init();await e.clear(),e.close()}async handleRedirectFromLogin(){const e=await(async e=>{const t=new URL(window.location.href),i=t.searchParams.get("code");if(null===i)return{clientDetails:e};const r=sessionStorage.getItem("idp");if(null===r||t.searchParams.get("iss")!=r)throw new Error("RFC 9207 - iss != idp - "+t.searchParams.get("iss")+" != "+r);if(t.searchParams.get("state")!=sessionStorage.getItem("csrf_token"))throw new Error("RFC 6749 - state != csrf_token - "+t.searchParams.get("state")+" != "+sessionStorage.getItem("csrf_token"));t.searchParams.delete("iss"),t.searchParams.delete("state"),t.searchParams.delete("code"),window.history.pushState({},document.title,t.toString());const o=sessionStorage.getItem("pkce_code_verifier");if(null===o)throw new Error("Access Token Request preparation - Could not find in sessionStorage: pkce_code_verifier");const s=e?.client_id||sessionStorage.getItem("client_id");if(!s)throw new Error("Access Token Request preparation - Could not find in sessionStorage: client_id (dynamic registration)");const a=sessionStorage.getItem("token_endpoint");if(null===a)throw new Error("Access Token Request preparation - Could not find in sessionStorage: token_endpoint");const n=await async function(e,t){return async function(e,t){let i,r;switch(e){case"PS256":case"PS384":case"PS512":i={name:"RSA-PSS",hash:`SHA-${e.slice(-3)}`,publicExponent:new Uint8Array([1,0,1]),modulusLength:Rt(t)},r=["sign","verify"];break;case"RS256":case"RS384":case"RS512":i={name:"RSASSA-PKCS1-v1_5",hash:`SHA-${e.slice(-3)}`,publicExponent:new Uint8Array([1,0,1]),modulusLength:Rt(t)},r=["sign","verify"];break;case"RSA-OAEP":case"RSA-OAEP-256":case"RSA-OAEP-384":case"RSA-OAEP-512":i={name:"RSA-OAEP",hash:`SHA-${parseInt(e.slice(-3),10)||1}`,publicExponent:new Uint8Array([1,0,1]),modulusLength:Rt(t)},r=["decrypt","unwrapKey","encrypt","wrapKey"];break;case"ES256":i={name:"ECDSA",namedCurve:"P-256"},r=["sign","verify"];break;case"ES384":i={name:"ECDSA",namedCurve:"P-384"},r=["sign","verify"];break;case"ES512":i={name:"ECDSA",namedCurve:"P-521"},r=["sign","verify"];break;case"Ed25519":i={name:"Ed25519"},r=["sign","verify"];break;case"EdDSA":{r=["sign","verify"];const e="Ed25519";switch(e){case"Ed25519":case"Ed448":i={name:e};break;default:throw new Fe("Invalid or unsupported crv option provided")}break}case"ECDH-ES":case"ECDH-ES+A128KW":case"ECDH-ES+A192KW":case"ECDH-ES+A256KW":{r=["deriveKey","deriveBits"];const e="P-256";switch(e){case"P-256":case"P-384":case"P-521":i={name:"ECDH",namedCurve:e};break;case"X25519":case"X448":i={name:e};break;default:throw new Fe("Invalid or unsupported crv option provided, supported values are P-256, P-384, P-521, X25519, and X448")}break}default:throw new Fe('Invalid or unsupported JWK "alg" (Algorithm) Parameter value')}return ve.subtle.generateKey(i,!1,r)}(e,t)}("ES256"),l=await(async(e,t,i,r,o,s)=>{const a=await dt(s.publicKey);a.alg="ES256";const n=await new St({htu:o,htm:"POST"}).setIssuedAt().setJti(window.crypto.randomUUID()).setProtectedHeader({alg:"ES256",typ:"dpop+jwt",jwk:a}).sign(s.privateKey);return fetch(o,{method:"POST",headers:{dpop:n,"Content-Type":"application/x-www-form-urlencoded"},body:new URLSearchParams({grant_type:"authorization_code",code:e,code_verifier:t,redirect_uri:i,client_id:r})})})(i,o,t.toString(),s,a,n).then((e=>{if(!e.ok)throw new Error(`HTTP error! Status: ${e.status}`);return e.json()})),d=l.access_token,p=sessionStorage.getItem("jwks_uri");if(null===p)throw new Error("Access Token validation preparation - Could not find in sessionStorage: jwks_uri");const h=_t(new URL(p)),{payload:c}=await gt(d,h,{issuer:r,audience:"solid"}),u=await It(await dt(n.publicKey));if(c.cnf.jkt!=u)throw new Error("Access Token validation failed on `jkt`: jkt != DPoP thumbprint - "+c.cnf.jkt+" != "+u);if(c.client_id!=s)throw new Error("Access Token validation failed on `client_id`: JWT payload != client_id - "+c.client_id+" != "+s);const f={...l,dpop_key_pair:n},m={idp:r,jwks_uri:p,token_endpoint:a};e||(e={redirect_uris:[window.location.href]}),e.client_id=s;const b=await(new Nt).init();return await Promise.all([b.setItem("idp",r),b.setItem("jwks_uri",p),b.setItem("token_endpoint",a),b.setItem("client_id",s),b.setItem("dpop_keypair",n),b.setItem("refresh_token",l.refresh_token)]),b.close(),sessionStorage.removeItem("csrf_token"),sessionStorage.removeItem("pkce_code_verifier"),sessionStorage.removeItem("idp"),sessionStorage.removeItem("jwks_uri"),sessionStorage.removeItem("token_endpoint"),sessionStorage.removeItem("client_id"),{clientDetails:e,idpDetails:m,tokenDetails:f}})(this.sessionInformation.clientDetails);e.tokenDetails&&(this.sessionInformation=e,await this.setSessionDetails())}async restore(){await Ot().then((e=>(this.sessionInformation.tokenDetails=e,this.setSessionDetails()))).catch((()=>{}))}async createSignedDPoPToken(e){if(!this.sessionInformation.tokenDetails||!this.currentAth_)throw new Error("Session not established.");e.ath=this.currentAth_;const t=await dt(this.sessionInformation.tokenDetails.dpop_key_pair.publicKey);return new St(e).setIssuedAt().setJti(window.crypto.randomUUID()).setProtectedHeader({alg:"ES256",typ:"dpop+jwt",jwk:t}).sign(this.sessionInformation.tokenDetails.dpop_key_pair.privateKey)}async authFetch(e,t,i){let r,o,s;if(e instanceof Request?(r=new URL(e.url),o=t?.method||e?.method||"GET",s=new Headers(e.headers)):(t=t||{},r=new URL(e.toString()),o=t.method||"GET",s=t.headers?new Headers(t.headers):new Headers),this.sessionInformation.tokenDetails){i=i??{htu:`${r.origin}${r.pathname}`,htm:o.toUpperCase()};const e=await this.createSignedDPoPToken(i);s.set("dpop",e),s.set("authorization",`DPoP ${this.sessionInformation.tokenDetails.access_token}`)}return e instanceof Request?fetch(new Request(e,{...t,headers:s})):fetch(r,{...t,headers:s})}get isActive(){return this.isActive_}get webId(){return this.webId_}async setSessionDetails(){this.sessionInformation.tokenDetails?.access_token||this.logout(),this.currentAth_=await this.computeAth(this.sessionInformation.tokenDetails.access_token),this.webId_=function(e){if("string"!=typeof e)throw new Ae("JWTs must use Compact JWS serialization, JWT must be a string");const{1:t,length:i}=e.split(".");if(5===i)throw new Ae("Only JWTs using Compact JWS serialization can be decoded");if(3!==i)throw new Ae("Invalid JWT");if(!t)throw new Ae("JWTs must contain a payload");let r,o;try{r=Mt(t)}catch{throw new Ae("Failed to base64url decode the payload")}try{o=JSON.parse(ke.decode(r))}catch{throw new Ae("Failed to parse the decoded payload as JSON")}if(!qe(o))throw new Ae("Invalid JWT Claims Set");return o}(this.sessionInformation.tokenDetails.access_token).webid,this.isActive_=void 0!==this.webId,this.setSessionDeactivateTimeout(),this.setTokenRefreshTimeout()}setSessionDeactivateTimeout(){const e=1e3*(this.sessionInformation.tokenDetails.expires_in-5);this.sessionDeactivateTimeout&&clearTimeout(this.sessionDeactivateTimeout),this.sessionDeactivateTimeout=setTimeout((()=>this.logout()),e)}setTokenRefreshTimeout(){const e=1e3*(this.sessionInformation.tokenDetails.expires_in-95);this.tokenRefreshTimeout&&clearTimeout(this.tokenRefreshTimeout),this.tokenRefreshTimeout=setTimeout((async()=>{const e=await Ot().catch((()=>{this.onSessionExpirationWarning&&this.onSessionExpirationWarning()}));e&&(this.sessionInformation.tokenDetails=e,this.setSessionDetails())}),e)}async computeAth(e){const t=(new TextEncoder).encode(e),i=await crypto.subtle.digest("SHA-256",t),r=Array.from(new Uint8Array(i));return btoa(String.fromCharCode(...r)).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}}class Wt{get authenticatedFetch(){return this._authenticatedFetch}constructor(){this.onSessionRestoreCallback=()=>{},this.sessionInfo$=new B.BehaviorSubject({isLoggedIn:!1,webId:void 0}),this.session=new jt,this._authenticatedFetch=this.session.authFetch.bind(this.session)}async handleIncomingRedirect(e=!1){await this.session.handleRedirectFromLogin(),e&&(await this.session.restore(),this.session.isActive&&this.onSessionRestoreCallback(window.location.href)),this.sessionInfo$.next({isLoggedIn:this.session.isActive,webId:this.session.webId})}async login(e){return this.session.login(e,window.location.href)}async logout(){await this.session.logout(),this.sessionInfo$.next({isLoggedIn:!1,webId:void 0})}observeSession(){return this.sessionInfo$}onSessionRestore(e){this.onSessionRestoreCallback=e}}var Lt=n`
|
|
1
|
+
import{r as e,h as t,H as i,c as r,a as o,i as s,j as a}from"./p-spEUIGXI.js";import{i as n,E as l,T as d,c as p,_ as h,n as c,S as u,x as f,d as m,r as b,w as y,e as g,f as v}from"./p-Bz2zblgU.js";import{c as w,s as x,B as k}from"./p-DO6v4X9H.js";import{P as S,N as D,a as I,T as C}from"./p-BXBNVUZ5.js";import{c as B}from"./p-vFMstSdt.js";import{L as P,e as z,s as F,a as T,g as A,b as E,w as _,S as M}from"./p-DPNKR_cm.js";import{a as R,i as N,t as U,e as O}from"./p-DpbuT47x.js";import{s as $}from"./p-BW_CkW1K.js";import{s as j}from"./p-jlzl8vRd.js";import{u as W}from"./p-D0uCfr1-.js";const L=class{constructor(t){e(this,t)}openDialog(){this.dialog.showModal()}render(){return t(i,{key:"9a60547270fcc455679acdfe6de75da57e513b1f"},t("button",{key:"32a8ba00ef511587024c843663e281e2b6930c19",id:"new",title:"Add a new thing",onClick:()=>this.openDialog()},t("sl-icon",{key:"6faf99cef999b441410770b0509f5a8d6a10f7e9",name:"plus-circle"})),t("pos-dialog",{key:"f6cd827c19d3dfe33500f03e561f399e11d728ce",ref:e=>this.dialog=e},t("span",{key:"ff40b8f28a349a1ad6db11e2d427d74ea5fbd300",slot:"title"},"Add a new thing"),t("pos-new-thing-form",{key:"e48257160d78d025e6213bd61c4953261d4829c2",slot:"content",referenceUri:this.referenceUri})))}};L.style=":host{font-family:var(--font-sans);display:block}button#new{cursor:pointer;display:flex;align-items:center;justify-content:center;border:none;width:var(--size-10);height:var(--size-10);background-color:var(--pos-primary-color);color:var(--pos-primary-text-color);font-size:var(--scale-6);border-radius:var(--radius-xs);padding:var(--size-2)}button#new:hover,button#new:focus{outline:none;filter:brightness(110%);box-shadow:var(--shadow-sm)}pos-new-thing-form{margin:var(--scale-3)}";const H=localStorage.getItem("settings"),V=w(H?JSON.parse(H):{offlineCache:!1,rememberedIdp:null});V.on("set",(()=>{const e=JSON.stringify(V.state);localStorage.setItem("settings",e)})),window.addEventListener("storage",(e=>{if("settings"===e.key&&e.newValue){const t=JSON.parse(e.newValue);V.state.offlineCache=t.offlineCache,V.state.rememberedIdp=t.rememberedIdp}}));const J=(e,t)=>t.some((t=>e instanceof t));let K,q;const G=new WeakMap,X=new WeakMap,Y=new WeakMap;let Z={get(e,t,i){if(e instanceof IDBTransaction){if("done"===t)return G.get(e);if("store"===t)return i.objectStoreNames[1]?void 0:i.objectStore(i.objectStoreNames[0])}return te(e[t])},set:(e,t,i)=>(e[t]=i,!0),has:(e,t)=>e instanceof IDBTransaction&&("done"===t||"store"===t)||t in e};function Q(e){Z=e(Z)}function ee(e){return"function"==typeof e?(t=e,(q||(q=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])).includes(t)?function(...e){return t.apply(ie(this),e),te(this.request)}:function(...e){return te(t.apply(ie(this),e))}):(e instanceof IDBTransaction&&function(e){if(G.has(e))return;const t=new Promise(((t,i)=>{const r=()=>{e.removeEventListener("complete",o),e.removeEventListener("error",s),e.removeEventListener("abort",s)},o=()=>{t(),r()},s=()=>{i(e.error||new DOMException("AbortError","AbortError")),r()};e.addEventListener("complete",o),e.addEventListener("error",s),e.addEventListener("abort",s)}));G.set(e,t)}(e),J(e,K||(K=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction]))?new Proxy(e,Z):e);var t}function te(e){if(e instanceof IDBRequest)return function(e){const t=new Promise(((t,i)=>{const r=()=>{e.removeEventListener("success",o),e.removeEventListener("error",s)},o=()=>{t(te(e.result)),r()},s=()=>{i(e.error),r()};e.addEventListener("success",o),e.addEventListener("error",s)}));return Y.set(t,e),t}(e);if(X.has(e))return X.get(e);const t=ee(e);return t!==e&&(X.set(e,t),Y.set(t,e)),t}const ie=e=>Y.get(e),re=["get","getKey","getAll","getAllKeys","count"],oe=["put","add","delete","clear"],se=new Map;function ae(e,t){if(!(e instanceof IDBDatabase)||t in e||"string"!=typeof t)return;if(se.get(t))return se.get(t);const i=t.replace(/FromIndex$/,""),r=t!==i,o=oe.includes(i);if(!(i in(r?IDBIndex:IDBObjectStore).prototype)||!o&&!re.includes(i))return;const s=async function(e,...t){const s=this.transaction(e,o?"readwrite":"readonly");let a=s.store;return r&&(a=a.index(t.shift())),(await Promise.all([a[i](...t),o&&s.done]))[0]};return se.set(t,s),s}Q((e=>({...e,get:(t,i,r)=>ae(t,i)||e.get(t,i,r),has:(t,i)=>!!ae(t,i)||e.has(t,i)})));const ne=["continue","continuePrimaryKey","advance"],le={},de=new WeakMap,pe=new WeakMap,he={get(e,t){if(!ne.includes(t))return e[t];let i=le[t];return i||(i=le[t]=function(...e){de.set(this,pe.get(this)[t](...e))}),i}};async function*ce(...e){let t=this;if(t instanceof IDBCursor||(t=await t.openCursor(...e)),!t)return;const i=new Proxy(t,he);for(pe.set(i,t),Y.set(i,ie(t));t;)yield i,t=await(de.get(i)||t.continue()),de.delete(i)}function ue(e,t){return t===Symbol.asyncIterator&&J(e,[IDBIndex,IDBObjectStore,IDBCursor])||"iterate"===t&&J(e,[IDBIndex,IDBObjectStore])}Q((e=>({...e,get:(t,i,r)=>ue(t,i)?ce:e.get(t,i,r),has:(t,i)=>ue(t,i)||e.has(t,i)})));class fe{constructor(){this.dbPromise=function(e,t,{blocked:i,upgrade:r,blocking:o,terminated:s}={}){const a=indexedDB.open(e,t),n=te(a);return r&&a.addEventListener("upgradeneeded",(e=>{r(te(a.result),e.oldVersion,e.newVersion,te(a.transaction),e)})),i&&a.addEventListener("blocked",(e=>i(e.oldVersion,e.newVersion,e))),n.then((e=>{s&&e.addEventListener("close",(()=>s())),o&&e.addEventListener("versionchange",(e=>o(e.oldVersion,e.newVersion,e)))})).catch((()=>{})),n}("OfflineCacheDB",1,{upgrade(e){e.objectStoreNames.contains("documents")||e.createObjectStore("documents",{keyPath:"url"}).createIndex("url-revision",["url","revision"])}})}async clear(){return(await this.dbPromise).clear("documents")}async get(e){const t=await this.dbPromise;return await t.get("documents",e)}async put(e){const t=await this.dbPromise;await t.getFromIndex("documents","url-revision",[e.url,e.revision])||await t.put("documents",e)}}class me{isOnline(){return navigator.onLine}}const be=(e,t)=>new S({session:e,offlineCache:t.offlineCache?new fe:new D,onlineStatus:new me});var ye="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function ge(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ve=crypto;const we=e=>e instanceof CryptoKey;const xe=new TextEncoder,ke=new TextDecoder;function Se(...e){const t=e.reduce(((e,{length:t})=>e+t),0),i=new Uint8Array(t);let r=0;for(const t of e)i.set(t,r),r+=t.length;return i}const De=e=>(e=>{let t=e;"string"==typeof t&&(t=xe.encode(t));const i=[];for(let e=0;e<t.length;e+=32768)i.push(String.fromCharCode.apply(null,t.subarray(e,e+32768)));return btoa(i.join(""))})(e).replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_"),Ie=e=>{let t=e;t instanceof Uint8Array&&(t=ke.decode(t)),t=t.replace(/-/g,"+").replace(/_/g,"/").replace(/\s/g,"");try{return(e=>{const t=atob(e),i=new Uint8Array(t.length);for(let e=0;e<t.length;e++)i[e]=t.charCodeAt(e);return i})(t)}catch{throw new TypeError("The input to be decoded is not correctly encoded.")}};class Ce extends Error{constructor(e,t){super(e,t),this.code="ERR_JOSE_GENERIC",this.name=this.constructor.name,Error.captureStackTrace?.(this,this.constructor)}}Ce.code="ERR_JOSE_GENERIC";class Be extends Ce{constructor(e,t,i="unspecified",r="unspecified"){super(e,{cause:{claim:i,reason:r,payload:t}}),this.code="ERR_JWT_CLAIM_VALIDATION_FAILED",this.claim=i,this.reason=r,this.payload=t}}Be.code="ERR_JWT_CLAIM_VALIDATION_FAILED";class Pe extends Ce{constructor(e,t,i="unspecified",r="unspecified"){super(e,{cause:{claim:i,reason:r,payload:t}}),this.code="ERR_JWT_EXPIRED",this.claim=i,this.reason=r,this.payload=t}}Pe.code="ERR_JWT_EXPIRED";class ze extends Ce{constructor(){super(...arguments),this.code="ERR_JOSE_ALG_NOT_ALLOWED"}}ze.code="ERR_JOSE_ALG_NOT_ALLOWED";class Fe extends Ce{constructor(){super(...arguments),this.code="ERR_JOSE_NOT_SUPPORTED"}}Fe.code="ERR_JOSE_NOT_SUPPORTED",class extends Ce{constructor(e="decryption operation failed",t){super(e,t),this.code="ERR_JWE_DECRYPTION_FAILED"}}.code="ERR_JWE_DECRYPTION_FAILED",class extends Ce{constructor(){super(...arguments),this.code="ERR_JWE_INVALID"}}.code="ERR_JWE_INVALID";class Te extends Ce{constructor(){super(...arguments),this.code="ERR_JWS_INVALID"}}Te.code="ERR_JWS_INVALID";class Ae extends Ce{constructor(){super(...arguments),this.code="ERR_JWT_INVALID"}}Ae.code="ERR_JWT_INVALID";class Ee extends Ce{constructor(){super(...arguments),this.code="ERR_JWK_INVALID"}}Ee.code="ERR_JWK_INVALID";class _e extends Ce{constructor(){super(...arguments),this.code="ERR_JWKS_INVALID"}}_e.code="ERR_JWKS_INVALID";class Me extends Ce{constructor(e="no applicable key found in the JSON Web Key Set",t){super(e,t),this.code="ERR_JWKS_NO_MATCHING_KEY"}}Me.code="ERR_JWKS_NO_MATCHING_KEY";class Re extends Ce{constructor(e="multiple matching keys found in the JSON Web Key Set",t){super(e,t),this.code="ERR_JWKS_MULTIPLE_MATCHING_KEYS"}}Re.code="ERR_JWKS_MULTIPLE_MATCHING_KEYS";class Ne extends Ce{constructor(e="request timed out",t){super(e,t),this.code="ERR_JWKS_TIMEOUT"}}Ne.code="ERR_JWKS_TIMEOUT";class Ue extends Ce{constructor(e="signature verification failed",t){super(e,t),this.code="ERR_JWS_SIGNATURE_VERIFICATION_FAILED"}}function Oe(e,t="algorithm.name"){return new TypeError(`CryptoKey does not support this operation, its ${t} must be ${e}`)}function $e(e,t){return e.name===t}function je(e){return parseInt(e.name.slice(4),10)}function We(e,t,...i){if((i=i.filter(Boolean)).length>2){const t=i.pop();e+=`one of type ${i.join(", ")}, or ${t}.`}else e+=2===i.length?`one of type ${i[0]} or ${i[1]}.`:`of type ${i[0]}.`;return null==t?e+=` Received ${t}`:"function"==typeof t&&t.name?e+=` Received function ${t.name}`:"object"==typeof t&&null!=t&&t.constructor?.name&&(e+=` Received an instance of ${t.constructor.name}`),e}Ue.code="ERR_JWS_SIGNATURE_VERIFICATION_FAILED";var Le=(e,...t)=>We("Key must be ",e,...t);function He(e,t,...i){return We(`Key for the ${e} algorithm must be `,t,...i)}var Ve=e=>!!we(e)||"KeyObject"===e?.[Symbol.toStringTag];const Je=["CryptoKey"];var Ke=(...e)=>{const t=e.filter(Boolean);if(0===t.length||1===t.length)return!0;let i;for(const e of t){const t=Object.keys(e);if(i&&0!==i.size)for(const e of t){if(i.has(e))return!1;i.add(e)}else i=new Set(t)}return!0};function qe(e){if("object"!=typeof(t=e)||null===t||"[object Object]"!==Object.prototype.toString.call(e))return!1;var t;if(null===Object.getPrototypeOf(e))return!0;let i=e;for(;null!==Object.getPrototypeOf(i);)i=Object.getPrototypeOf(i);return Object.getPrototypeOf(e)===i}var Ge=(e,t)=>{if(e.startsWith("RS")||e.startsWith("PS")){const{modulusLength:i}=t.algorithm;if("number"!=typeof i||i<2048)throw new TypeError(`${e} requires key modulusLength to be 2048 bits or larger`)}};function Xe(e){return qe(e)&&"string"==typeof e.kty}var Ye=async e=>{if(!e.alg)throw new TypeError('"alg" argument is required when "jwk.alg" is not present');const{algorithm:t,keyUsages:i}=function(e){let t,i;switch(e.kty){case"RSA":switch(e.alg){case"PS256":case"PS384":case"PS512":t={name:"RSA-PSS",hash:`SHA-${e.alg.slice(-3)}`},i=e.d?["sign"]:["verify"];break;case"RS256":case"RS384":case"RS512":t={name:"RSASSA-PKCS1-v1_5",hash:`SHA-${e.alg.slice(-3)}`},i=e.d?["sign"]:["verify"];break;case"RSA-OAEP":case"RSA-OAEP-256":case"RSA-OAEP-384":case"RSA-OAEP-512":t={name:"RSA-OAEP",hash:`SHA-${parseInt(e.alg.slice(-3),10)||1}`},i=e.d?["decrypt","unwrapKey"]:["encrypt","wrapKey"];break;default:throw new Fe('Invalid or unsupported JWK "alg" (Algorithm) Parameter value')}break;case"EC":switch(e.alg){case"ES256":t={name:"ECDSA",namedCurve:"P-256"},i=e.d?["sign"]:["verify"];break;case"ES384":t={name:"ECDSA",namedCurve:"P-384"},i=e.d?["sign"]:["verify"];break;case"ES512":t={name:"ECDSA",namedCurve:"P-521"},i=e.d?["sign"]:["verify"];break;case"ECDH-ES":case"ECDH-ES+A128KW":case"ECDH-ES+A192KW":case"ECDH-ES+A256KW":t={name:"ECDH",namedCurve:e.crv},i=e.d?["deriveBits"]:[];break;default:throw new Fe('Invalid or unsupported JWK "alg" (Algorithm) Parameter value')}break;case"OKP":switch(e.alg){case"Ed25519":t={name:"Ed25519"},i=e.d?["sign"]:["verify"];break;case"EdDSA":t={name:e.crv},i=e.d?["sign"]:["verify"];break;case"ECDH-ES":case"ECDH-ES+A128KW":case"ECDH-ES+A192KW":case"ECDH-ES+A256KW":t={name:e.crv},i=e.d?["deriveBits"]:[];break;default:throw new Fe('Invalid or unsupported JWK "alg" (Algorithm) Parameter value')}break;default:throw new Fe('Invalid or unsupported JWK "kty" (Key Type) Parameter value')}return{algorithm:t,keyUsages:i}}(e),r=[t,e.ext??!1,e.key_ops??i],o={...e};return delete o.alg,delete o.use,ve.subtle.importKey("jwk",o,...r)};const Ze=e=>Ie(e);let Qe,et;const tt=e=>"KeyObject"===e?.[Symbol.toStringTag],it=async(e,t,i,r,o=!1)=>{let s=e.get(t);if(s?.[r])return s[r];const a=await Ye({...i,alg:r});return o&&Object.freeze(t),s?s[r]=a:e.set(t,{[r]:a}),a};async function rt(e,t){if(!qe(e))throw new TypeError("JWK must be an object");switch(t||(t=e.alg),e.kty){case"oct":if("string"!=typeof e.k||!e.k)throw new TypeError('missing "k" (Key Value) Parameter value');return Ie(e.k);case"RSA":if("oth"in e&&void 0!==e.oth)throw new Fe('RSA JWK "oth" (Other Primes Info) Parameter value is not supported');case"EC":case"OKP":return Ye({...e,alg:t});default:throw new Fe('Unsupported "kty" (Key Type) Parameter value')}}const ot=e=>e?.[Symbol.toStringTag],st=(e,t,i)=>{if(void 0!==t.use&&"sig"!==t.use)throw new TypeError("Invalid key for this operation, when present its use must be sig");if(void 0!==t.key_ops&&!0!==t.key_ops.includes?.(i))throw new TypeError(`Invalid key for this operation, when present its key_ops must include ${i}`);if(void 0!==t.alg&&t.alg!==e)throw new TypeError(`Invalid key for this operation, when present its alg must be ${e}`);return!0};function at(e,t,i,r){t.startsWith("HS")||"dir"===t||t.startsWith("PBES2")||/^A\d{3}(?:GCM)?KW$/.test(t)?((e,t,i,r)=>{if(!(t instanceof Uint8Array)){if(r&&Xe(t)){if(function(e){return Xe(e)&&"oct"===e.kty&&"string"==typeof e.k}(t)&&st(e,t,i))return;throw new TypeError('JSON Web Key for symmetric algorithms must have JWK "kty" (Key Type) equal to "oct" and the JWK "k" (Key Value) present')}if(!Ve(t))throw new TypeError(He(e,t,...Je,"Uint8Array",r?"JSON Web Key":null));if("secret"!==t.type)throw new TypeError(`${ot(t)} instances for symmetric algorithms must be of type "secret"`)}})(t,i,r,e):((e,t,i,r)=>{if(r&&Xe(t))switch(i){case"sign":if(function(e){return"oct"!==e.kty&&"string"==typeof e.d}(t)&&st(e,t,i))return;throw new TypeError("JSON Web Key for this operation be a private JWK");case"verify":if(function(e){return"oct"!==e.kty&&void 0===e.d}(t)&&st(e,t,i))return;throw new TypeError("JSON Web Key for this operation be a public JWK")}if(!Ve(t))throw new TypeError(He(e,t,...Je,r?"JSON Web Key":null));if("secret"===t.type)throw new TypeError(`${ot(t)} instances for asymmetric algorithms must not be of type "secret"`);if("sign"===i&&"public"===t.type)throw new TypeError(`${ot(t)} instances for asymmetric algorithm signing must be of type "private"`);if("decrypt"===i&&"public"===t.type)throw new TypeError(`${ot(t)} instances for asymmetric algorithm decryption must be of type "private"`);if(t.algorithm&&"verify"===i&&"private"===t.type)throw new TypeError(`${ot(t)} instances for asymmetric algorithm verifying must be of type "public"`);if(t.algorithm&&"encrypt"===i&&"private"===t.type)throw new TypeError(`${ot(t)} instances for asymmetric algorithm encryption must be of type "public"`)})(t,i,r,e)}at.bind(void 0,!1);const nt=at.bind(void 0,!0);function lt(e,t,i,r,o){if(void 0!==o.crit&&void 0===r?.crit)throw new e('"crit" (Critical) Header Parameter MUST be integrity protected');if(!r||void 0===r.crit)return new Set;if(!Array.isArray(r.crit)||0===r.crit.length||r.crit.some((e=>"string"!=typeof e||0===e.length)))throw new e('"crit" (Critical) Header Parameter MUST be an array of non-empty strings when present');let s;s=void 0!==i?new Map([...Object.entries(i),...t.entries()]):t;for(const t of r.crit){if(!s.has(t))throw new Fe(`Extension Header Parameter "${t}" is not recognized`);if(void 0===o[t])throw new e(`Extension Header Parameter "${t}" is missing`);if(s.get(t)&&void 0===r[t])throw new e(`Extension Header Parameter "${t}" MUST be integrity protected`)}return new Set(r.crit)}async function dt(e){return(async e=>{if(e instanceof Uint8Array)return{kty:"oct",k:De(e)};if(!we(e))throw new TypeError(Le(e,...Je,"Uint8Array"));if(!e.extractable)throw new TypeError("non-extractable CryptoKey cannot be exported as a JWK");const{ext:t,key_ops:i,alg:r,use:o,...s}=await ve.subtle.exportKey("jwk",e);return s})(e)}function pt(e,t){const i=`SHA-${e.slice(-3)}`;switch(e){case"HS256":case"HS384":case"HS512":return{hash:i,name:"HMAC"};case"PS256":case"PS384":case"PS512":return{hash:i,name:"RSA-PSS",saltLength:e.slice(-3)>>3};case"RS256":case"RS384":case"RS512":return{hash:i,name:"RSASSA-PKCS1-v1_5"};case"ES256":case"ES384":case"ES512":return{hash:i,name:"ECDSA",namedCurve:t.namedCurve};case"Ed25519":return{name:"Ed25519"};case"EdDSA":return{name:t.name};default:throw new Fe(`alg ${e} is not supported either by JOSE or your javascript runtime`)}}async function ht(e,t,i){if("sign"===i&&(t=await((e,t)=>{if(tt(e)){let i=e.export({format:"jwk"});return i.k?Ze(i.k):(Qe||(Qe=new WeakMap),it(Qe,e,i,t))}return Xe(e)?e.k?Ie(e.k):(Qe||(Qe=new WeakMap),it(Qe,e,e,t,!0)):e})(t,e)),"verify"===i&&(t=await((e,t)=>{if(tt(e)){let i=e.export({format:"jwk"});return delete i.d,delete i.dp,delete i.dq,delete i.p,delete i.q,delete i.qi,i.k?Ze(i.k):(et||(et=new WeakMap),it(et,e,i,t))}return Xe(e)?e.k?Ie(e.k):(et||(et=new WeakMap),it(et,e,e,t,!0)):e})(t,e)),we(t))return function(e,t,...i){switch(t){case"HS256":case"HS384":case"HS512":{if(!$e(e.algorithm,"HMAC"))throw Oe("HMAC");const i=parseInt(t.slice(2),10);if(je(e.algorithm.hash)!==i)throw Oe(`SHA-${i}`,"algorithm.hash");break}case"RS256":case"RS384":case"RS512":{if(!$e(e.algorithm,"RSASSA-PKCS1-v1_5"))throw Oe("RSASSA-PKCS1-v1_5");const i=parseInt(t.slice(2),10);if(je(e.algorithm.hash)!==i)throw Oe(`SHA-${i}`,"algorithm.hash");break}case"PS256":case"PS384":case"PS512":{if(!$e(e.algorithm,"RSA-PSS"))throw Oe("RSA-PSS");const i=parseInt(t.slice(2),10);if(je(e.algorithm.hash)!==i)throw Oe(`SHA-${i}`,"algorithm.hash");break}case"EdDSA":if("Ed25519"!==e.algorithm.name&&"Ed448"!==e.algorithm.name)throw Oe("Ed25519 or Ed448");break;case"Ed25519":if(!$e(e.algorithm,"Ed25519"))throw Oe("Ed25519");break;case"ES256":case"ES384":case"ES512":{if(!$e(e.algorithm,"ECDSA"))throw Oe("ECDSA");const i=function(e){switch(e){case"ES256":return"P-256";case"ES384":return"P-384";case"ES512":return"P-521";default:throw new Error("unreachable")}}(t);if(e.algorithm.namedCurve!==i)throw Oe(i,"algorithm.namedCurve");break}default:throw new TypeError("CryptoKey does not support this operation")}!function(e,t){if(t.length&&!t.some((t=>e.usages.includes(t)))){let e="CryptoKey does not support this operation, its usages must include ";if(t.length>2){const i=t.pop();e+=`one of ${t.join(", ")}, or ${i}.`}else e+=2===t.length?`one of ${t[0]} or ${t[1]}.`:`${t[0]}.`;throw new TypeError(e)}}(e,i)}(t,e,i),t;if(t instanceof Uint8Array){if(!e.startsWith("HS"))throw new TypeError(Le(t,...Je));return ve.subtle.importKey("raw",t,{hash:`SHA-${e.slice(-3)}`,name:"HMAC"},!1,[i])}throw new TypeError(Le(t,...Je,"Uint8Array","JSON Web Key"))}async function ct(e,t,i){if(e instanceof Uint8Array&&(e=ke.decode(e)),"string"!=typeof e)throw new Te("Compact JWS must be a string or Uint8Array");const{0:r,1:o,2:s,length:a}=e.split(".");if(3!==a)throw new Te("Invalid Compact JWS");const n=await async function(e,t,i){if(!qe(e))throw new Te("Flattened JWS must be an object");if(void 0===e.protected&&void 0===e.header)throw new Te('Flattened JWS must have either of the "protected" or "header" members');if(void 0!==e.protected&&"string"!=typeof e.protected)throw new Te("JWS Protected Header incorrect type");if(void 0===e.payload)throw new Te("JWS Payload missing");if("string"!=typeof e.signature)throw new Te("JWS Signature missing or incorrect type");if(void 0!==e.header&&!qe(e.header))throw new Te("JWS Unprotected Header incorrect type");let r={};if(e.protected)try{const t=Ie(e.protected);r=JSON.parse(ke.decode(t))}catch{throw new Te("JWS Protected Header is invalid")}if(!Ke(r,e.header))throw new Te("JWS Protected and JWS Unprotected Header Parameter names must be disjoint");const o={...r,...e.header};let s=!0;if(lt(Te,new Map([["b64",!0]]),i?.crit,r,o).has("b64")&&(s=r.b64,"boolean"!=typeof s))throw new Te('The "b64" (base64url-encode payload) Header Parameter must be a boolean');const{alg:a}=o;if("string"!=typeof a||!a)throw new Te('JWS "alg" (Algorithm) Header Parameter missing or invalid');const n=i&&((e,t)=>{if(void 0!==t&&(!Array.isArray(t)||t.some((e=>"string"!=typeof e))))throw new TypeError(`"${e}" option must be an array of strings`);if(t)return new Set(t)})("algorithms",i.algorithms);if(n&&!n.has(a))throw new ze('"alg" (Algorithm) Header Parameter value not allowed');if(s){if("string"!=typeof e.payload)throw new Te("JWS Payload must be a string")}else if("string"!=typeof e.payload&&!(e.payload instanceof Uint8Array))throw new Te("JWS Payload must be a string or an Uint8Array instance");let l=!1;"function"==typeof t?(t=await t(r,e),l=!0,nt(a,t,"verify"),Xe(t)&&(t=await rt(t,a))):nt(a,t,"verify");const d=Se(xe.encode(e.protected??""),xe.encode("."),"string"==typeof e.payload?xe.encode(e.payload):e.payload);let p,h;try{p=Ie(e.signature)}catch{throw new Te("Failed to base64url decode the signature")}if(!await(async(e,t,i,r)=>{const o=await ht(e,t,"verify");Ge(e,o);const s=pt(e,o.algorithm);try{return await ve.subtle.verify(s,o,i,r)}catch{return!1}})(a,t,p,d))throw new Ue;if(s)try{h=Ie(e.payload)}catch{throw new Te("Failed to base64url decode the payload")}else h="string"==typeof e.payload?xe.encode(e.payload):e.payload;const c={payload:h};return void 0!==e.protected&&(c.protectedHeader=r),void 0!==e.header&&(c.unprotectedHeader=e.header),l?{...c,key:t}:c}({payload:o,protected:r,signature:s},t,i),l={payload:n.payload,protectedHeader:n.protectedHeader};return"function"==typeof t?{...l,key:n.key}:l}var ut=e=>Math.floor(e.getTime()/1e3);const ft=/^(\+|\-)? ?(\d+|\d+\.\d+) ?(seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)(?: (ago|from now))?$/i;var mt=e=>{const t=ft.exec(e);if(!t||t[4]&&t[1])throw new TypeError("Invalid time period format");const i=parseFloat(t[2]);let r;switch(t[3].toLowerCase()){case"sec":case"secs":case"second":case"seconds":case"s":r=Math.round(i);break;case"minute":case"minutes":case"min":case"mins":case"m":r=Math.round(60*i);break;case"hour":case"hours":case"hr":case"hrs":case"h":r=Math.round(3600*i);break;case"day":case"days":case"d":r=Math.round(86400*i);break;case"week":case"weeks":case"w":r=Math.round(604800*i);break;default:r=Math.round(31557600*i)}return"-"===t[1]||"ago"===t[4]?-r:r};const bt=e=>e.toLowerCase().replace(/^application\//,"");var yt=(e,t,i={})=>{let r;try{r=JSON.parse(ke.decode(t))}catch{}if(!qe(r))throw new Ae("JWT Claims Set must be a top-level JSON object");const{typ:o}=i;if(o&&("string"!=typeof e.typ||bt(e.typ)!==bt(o)))throw new Be('unexpected "typ" JWT header value',r,"typ","check_failed");const{requiredClaims:s=[],issuer:a,subject:n,audience:l,maxTokenAge:d}=i,p=[...s];void 0!==d&&p.push("iat"),void 0!==l&&p.push("aud"),void 0!==n&&p.push("sub"),void 0!==a&&p.push("iss");for(const e of new Set(p.reverse()))if(!(e in r))throw new Be(`missing required "${e}" claim`,r,e,"missing");if(a&&!(Array.isArray(a)?a:[a]).includes(r.iss))throw new Be('unexpected "iss" claim value',r,"iss","check_failed");if(n&&r.sub!==n)throw new Be('unexpected "sub" claim value',r,"sub","check_failed");if(l&&(c="string"==typeof l?[l]:l,!("string"==typeof(h=r.aud)?c.includes(h):Array.isArray(h)&&c.some(Set.prototype.has.bind(new Set(h))))))throw new Be('unexpected "aud" claim value',r,"aud","check_failed");var h,c;let u;switch(typeof i.clockTolerance){case"string":u=mt(i.clockTolerance);break;case"number":u=i.clockTolerance;break;case"undefined":u=0;break;default:throw new TypeError("Invalid clockTolerance option type")}const{currentDate:f}=i,m=ut(f||new Date);if((void 0!==r.iat||d)&&"number"!=typeof r.iat)throw new Be('"iat" claim must be a number',r,"iat","invalid");if(void 0!==r.nbf){if("number"!=typeof r.nbf)throw new Be('"nbf" claim must be a number',r,"nbf","invalid");if(r.nbf>m+u)throw new Be('"nbf" claim timestamp check failed',r,"nbf","check_failed")}if(void 0!==r.exp){if("number"!=typeof r.exp)throw new Be('"exp" claim must be a number',r,"exp","invalid");if(r.exp<=m-u)throw new Pe('"exp" claim timestamp check failed',r,"exp","check_failed")}if(d){const e=m-r.iat;if(e-u>("number"==typeof d?d:mt(d)))throw new Pe('"iat" claim timestamp check failed (too far in the past)',r,"iat","check_failed");if(e<0-u)throw new Be('"iat" claim timestamp check failed (it should be in the past)',r,"iat","check_failed")}return r};async function gt(e,t,i){const r=await ct(e,t,i);if(r.protectedHeader.crit?.includes("b64")&&!1===r.protectedHeader.b64)throw new Ae("JWTs MUST NOT use unencoded payload");const o={payload:yt(r.protectedHeader,r.payload,i),protectedHeader:r.protectedHeader};return"function"==typeof t?{...o,key:r.key}:o}class vt{constructor(e){if(!(e instanceof Uint8Array))throw new TypeError("payload must be an instance of Uint8Array");this._payload=e}setProtectedHeader(e){if(this._protectedHeader)throw new TypeError("setProtectedHeader can only be called once");return this._protectedHeader=e,this}setUnprotectedHeader(e){if(this._unprotectedHeader)throw new TypeError("setUnprotectedHeader can only be called once");return this._unprotectedHeader=e,this}async sign(e,t){if(!this._protectedHeader&&!this._unprotectedHeader)throw new Te("either setProtectedHeader or setUnprotectedHeader must be called before #sign()");if(!Ke(this._protectedHeader,this._unprotectedHeader))throw new Te("JWS Protected and JWS Unprotected Header Parameter names must be disjoint");const i={...this._protectedHeader,...this._unprotectedHeader};let r=!0;if(lt(Te,new Map([["b64",!0]]),t?.crit,this._protectedHeader,i).has("b64")&&(r=this._protectedHeader.b64,"boolean"!=typeof r))throw new Te('The "b64" (base64url-encode payload) Header Parameter must be a boolean');const{alg:o}=i;if("string"!=typeof o||!o)throw new Te('JWS "alg" (Algorithm) Header Parameter missing or invalid');nt(o,e,"sign");let s,a=this._payload;r&&(a=xe.encode(De(a))),s=xe.encode(this._protectedHeader?De(JSON.stringify(this._protectedHeader)):"");const n=Se(s,xe.encode("."),a),l=await(async(e,t,i)=>{const r=await ht(e,t,"sign");Ge(e,r);const o=await ve.subtle.sign(pt(e,r.algorithm),r,i);return new Uint8Array(o)})(o,e,n),d={signature:De(l),payload:""};return r&&(d.payload=ke.decode(a)),this._unprotectedHeader&&(d.header=this._unprotectedHeader),this._protectedHeader&&(d.protected=ke.decode(s)),d}}class wt{constructor(e){this._flattened=new vt(e)}setProtectedHeader(e){return this._flattened.setProtectedHeader(e),this}async sign(e,t){const i=await this._flattened.sign(e,t);if(void 0===i.payload)throw new TypeError("use the flattened module for creating JWS with b64: false");return`${i.protected}.${i.payload}.${i.signature}`}}function xt(e,t){if(!Number.isFinite(t))throw new TypeError(`Invalid ${e} input`);return t}class kt{constructor(e={}){if(!qe(e))throw new TypeError("JWT Claims Set MUST be an object");this._payload=e}setIssuer(e){return this._payload={...this._payload,iss:e},this}setSubject(e){return this._payload={...this._payload,sub:e},this}setAudience(e){return this._payload={...this._payload,aud:e},this}setJti(e){return this._payload={...this._payload,jti:e},this}setNotBefore(e){return this._payload="number"==typeof e?{...this._payload,nbf:xt("setNotBefore",e)}:e instanceof Date?{...this._payload,nbf:xt("setNotBefore",ut(e))}:{...this._payload,nbf:ut(new Date)+mt(e)},this}setExpirationTime(e){return this._payload="number"==typeof e?{...this._payload,exp:xt("setExpirationTime",e)}:e instanceof Date?{...this._payload,exp:xt("setExpirationTime",ut(e))}:{...this._payload,exp:ut(new Date)+mt(e)},this}setIssuedAt(e){return this._payload=void 0===e?{...this._payload,iat:ut(new Date)}:e instanceof Date?{...this._payload,iat:xt("setIssuedAt",ut(e))}:"string"==typeof e?{...this._payload,iat:xt("setIssuedAt",ut(new Date)+mt(e))}:{...this._payload,iat:xt("setIssuedAt",e)},this}}class St extends kt{setProtectedHeader(e){return this._protectedHeader=e,this}async sign(e,t){const i=new wt(xe.encode(JSON.stringify(this._payload)));if(i.setProtectedHeader(this._protectedHeader),Array.isArray(this._protectedHeader?.crit)&&this._protectedHeader.crit.includes("b64")&&!1===this._protectedHeader.b64)throw new Ae("JWTs MUST NOT use unencoded payload");return i.sign(e,t)}}const Dt=(e,t)=>{if("string"!=typeof e||!e)throw new Ee(`${t} missing or invalid`)};async function It(e,t){if(!qe(e))throw new TypeError("JWK must be an object");if(t??(t="sha256"),"sha256"!==t&&"sha384"!==t&&"sha512"!==t)throw new TypeError('digestAlgorithm must one of "sha256", "sha384", or "sha512"');let i;switch(e.kty){case"EC":Dt(e.crv,'"crv" (Curve) Parameter'),Dt(e.x,'"x" (X Coordinate) Parameter'),Dt(e.y,'"y" (Y Coordinate) Parameter'),i={crv:e.crv,kty:e.kty,x:e.x,y:e.y};break;case"OKP":Dt(e.crv,'"crv" (Subtype of Key Pair) Parameter'),Dt(e.x,'"x" (Public Key) Parameter'),i={crv:e.crv,kty:e.kty,x:e.x};break;case"RSA":Dt(e.e,'"e" (Exponent) Parameter'),Dt(e.n,'"n" (Modulus) Parameter'),i={e:e.e,kty:e.kty,n:e.n};break;case"oct":Dt(e.k,'"k" (Key Value) Parameter'),i={k:e.k,kty:e.kty};break;default:throw new Fe('"kty" (Key Type) Parameter missing or unsupported')}const r=xe.encode(JSON.stringify(i));return De(await(async(e,t)=>{const i=`SHA-${e.slice(-3)}`;return new Uint8Array(await ve.subtle.digest(i,t))})(t,r))}function Ct(e){return qe(e)}function Bt(e){return"function"==typeof structuredClone?structuredClone(e):JSON.parse(JSON.stringify(e))}class Pt{constructor(e){if(this._cached=new WeakMap,!function(e){return e&&"object"==typeof e&&Array.isArray(e.keys)&&e.keys.every(Ct)}(e))throw new _e("JSON Web Key Set malformed");this._jwks=Bt(e)}async getKey(e,t){const{alg:i,kid:r}={...e,...t?.header},o=function(e){switch("string"==typeof e&&e.slice(0,2)){case"RS":case"PS":return"RSA";case"ES":return"EC";case"Ed":return"OKP";default:throw new Fe('Unsupported "alg" value for a JSON Web Key Set')}}(i),s=this._jwks.keys.filter((e=>{let t=o===e.kty;if(t&&"string"==typeof r&&(t=r===e.kid),t&&"string"==typeof e.alg&&(t=i===e.alg),t&&"string"==typeof e.use&&(t="sig"===e.use),t&&Array.isArray(e.key_ops)&&(t=e.key_ops.includes("verify")),t)switch(i){case"ES256":t="P-256"===e.crv;break;case"ES256K":t="secp256k1"===e.crv;break;case"ES384":t="P-384"===e.crv;break;case"ES512":t="P-521"===e.crv;break;case"Ed25519":t="Ed25519"===e.crv;break;case"EdDSA":t="Ed25519"===e.crv||"Ed448"===e.crv}return t})),{0:a,length:n}=s;if(0===n)throw new Me;if(1!==n){const e=new Re,{_cached:t}=this;throw e[Symbol.asyncIterator]=async function*(){for(const e of s)try{yield await zt(t,e,i)}catch{}},e}return zt(this._cached,a,i)}}async function zt(e,t,i){const r=e.get(t)||e.set(t,{}).get(t);if(void 0===r[i]){const e=await rt({...t,ext:!0},i);if(e instanceof Uint8Array||"public"!==e.type)throw new _e("JSON Web Key Set members must be public keys");r[i]=e}return r[i]}function Ft(e){const t=new Pt(e),i=async(e,i)=>t.getKey(e,i);return Object.defineProperties(i,{jwks:{value:()=>Bt(t._jwks),enumerable:!0,configurable:!1,writable:!1}}),i}let Tt;"undefined"!=typeof navigator&&navigator.userAgent?.startsWith?.("Mozilla/5.0 ")||(Tt="jose/v5.10.0");const At=Symbol();class Et{constructor(e,t){if(!(e instanceof URL))throw new TypeError("url must be an instance of URL");var i,r;this._url=new URL(e.href),this._options={agent:t?.agent,headers:t?.headers},this._timeoutDuration="number"==typeof t?.timeoutDuration?t?.timeoutDuration:5e3,this._cooldownDuration="number"==typeof t?.cooldownDuration?t?.cooldownDuration:3e4,this._cacheMaxAge="number"==typeof t?.cacheMaxAge?t?.cacheMaxAge:6e5,void 0!==t?.[At]&&(this._cache=t?.[At],i=t?.[At],r=this._cacheMaxAge,"object"==typeof i&&null!==i&&"uat"in i&&"number"==typeof i.uat&&!(Date.now()-i.uat>=r)&&"jwks"in i&&qe(i.jwks)&&Array.isArray(i.jwks.keys)&&Array.prototype.every.call(i.jwks.keys,qe)&&(this._jwksTimestamp=this._cache.uat,this._local=Ft(this._cache.jwks)))}coolingDown(){return"number"==typeof this._jwksTimestamp&&Date.now()<this._jwksTimestamp+this._cooldownDuration}fresh(){return"number"==typeof this._jwksTimestamp&&Date.now()<this._jwksTimestamp+this._cacheMaxAge}async getKey(e,t){this._local&&this.fresh()||await this.reload();try{return await this._local(e,t)}catch(i){if(i instanceof Me&&!1===this.coolingDown())return await this.reload(),this._local(e,t);throw i}}async reload(){this._pendingFetch&&("undefined"!=typeof WebSocketPair||"undefined"!=typeof navigator&&"Cloudflare-Workers"===navigator.userAgent||"undefined"!=typeof EdgeRuntime&&"vercel"===EdgeRuntime)&&(this._pendingFetch=void 0);const e=new Headers(this._options.headers);Tt&&!e.has("User-Agent")&&(e.set("User-Agent",Tt),this._options.headers=Object.fromEntries(e.entries())),this._pendingFetch||(this._pendingFetch=(async(e,t,i)=>{let r,o,s=!1;"function"==typeof AbortController&&(r=new AbortController,o=setTimeout((()=>{s=!0,r.abort()}),t));const a=await fetch(e.href,{signal:r?r.signal:void 0,redirect:"manual",headers:i.headers}).catch((e=>{if(s)throw new Ne;throw e}));if(void 0!==o&&clearTimeout(o),200!==a.status)throw new Ce("Expected 200 OK from the JSON Web Key Set HTTP response");try{return await a.json()}catch{throw new Ce("Failed to parse the JSON Web Key Set HTTP response as JSON")}})(this._url,this._timeoutDuration,this._options).then((e=>{this._local=Ft(e),this._cache&&(this._cache.uat=Date.now(),this._cache.jwks=e),this._jwksTimestamp=Date.now(),this._pendingFetch=void 0})).catch((e=>{throw this._pendingFetch=void 0,e}))),await this._pendingFetch}}function _t(e,t){const i=new Et(e,t),r=async(e,t)=>i.getKey(e,t);return Object.defineProperties(r,{coolingDown:{get:()=>i.coolingDown(),enumerable:!0,configurable:!1},fresh:{get:()=>i.fresh(),enumerable:!0,configurable:!1},reload:{value:()=>i.reload(),enumerable:!0,configurable:!1,writable:!1},reloading:{get:()=>!!i._pendingFetch,enumerable:!0,configurable:!1},jwks:{value:()=>i._local?.jwks(),enumerable:!0,configurable:!1,writable:!1}}),r}const Mt=Ie;function Rt(e){const t=e?.modulusLength??2048;if("number"!=typeof t||t<2048)throw new Fe("Invalid or unsupported modulusLength option provided, 2048 bits or larger keys must be used");return t}class Nt{dbName;storeName;dbVersion;db=null;constructor(e="soidc",t="session",i=1){this.dbName=e,this.storeName=t,this.dbVersion=i}async init(){return new Promise(((e,t)=>{const i=indexedDB.open(this.dbName,this.dbVersion);i.onerror=e=>{t(new Error(`Database error: ${e.target.error}`))},i.onsuccess=t=>{this.db=t.target.result,e(this)},i.onupgradeneeded=e=>{const t=e.target.result;t.objectStoreNames.contains(this.storeName)||t.createObjectStore(this.storeName)}}))}async setItem(e,t){return this.db||await this.init(),new Promise(((i,r)=>{const o=this.db.transaction(this.storeName,"readwrite");o.oncomplete=()=>{i()},o.onerror=t=>{r(new Error(`Transaction error for setItem(${e},...): ${t.target.error}`))},o.onabort=t=>{r(new Error(`Transaction aborted for setItem(${e},...): ${t.target.error}`))},o.objectStore(this.storeName).put(t,e)}))}async getItem(e){return this.db||await this.init(),new Promise(((t,i)=>{const r=this.db.transaction(this.storeName,"readonly");r.onerror=t=>{i(new Error(`Transaction error for getItem(${e}): ${t.target.error}`))},r.onabort=t=>{i(new Error(`Transaction aborted for getItem(${e}): ${t.target.error}`))};const o=r.objectStore(this.storeName).get(e);o.onsuccess=()=>{t(o.result||null)}}))}async deleteItem(e){return this.db||await this.init(),new Promise(((t,i)=>{const r=this.db.transaction(this.storeName,"readwrite");r.oncomplete=()=>{t()},r.onerror=t=>{i(new Error(`Transaction error for deleteItem(${e}): ${t.target.error}`))},r.onabort=t=>{i(new Error(`Transaction aborted for deleteItem(${e}): ${t.target.error}`))},r.objectStore(this.storeName).delete(e)}))}async clear(){return this.db||await this.init(),new Promise(((e,t)=>{const i=this.db.transaction(this.storeName,"readwrite");i.oncomplete=()=>{e()},i.onerror=e=>{t(new Error(`Transaction error for clear(): ${e.target.error}`))},i.onabort=e=>{t(new Error(`Transaction aborted for clear(): ${e.target.error}`))},i.objectStore(this.storeName).clear()}))}close(){this.db&&(this.db.close(),this.db=null)}}const Ut=async()=>{const e=window.crypto.randomUUID()+"-"+window.crypto.randomUUID(),t=new Uint8Array(await window.crypto.subtle.digest("SHA-256",(new TextEncoder).encode(e)));return{pkce_code_verifier:e,pkce_code_challenge:btoa(String.fromCharCode(...t)).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}},Ot=async()=>{const e=await(new Nt).init(),t=await e.getItem("client_id"),i=await e.getItem("token_endpoint"),r=await e.getItem("dpop_keypair"),o=await e.getItem("refresh_token");if(null===t||null===i||null===r||null===o)throw new Error("Could not refresh tokens: details missing from database.");const s=await $t(o,t,i,r).then((e=>{if(!e.ok)throw new Error(`HTTP error! Status: ${e.status}`);return e.json()})),a=s.access_token,n=await e.getItem("idp");if(null===n)throw new Error("Access Token validation preparation - Could not find in sessionDatabase: idp");const l=await e.getItem("jwks_uri");if(null===l)throw new Error("Access Token validation preparation - Could not find in sessionDatabase: jwks_uri");const d=_t(new URL(l)),{payload:p}=await gt(a,d,{issuer:n,audience:"solid"}),h=await It(await dt(r.publicKey));if(p.cnf.jkt!=h)throw new Error("Access Token validation failed on `jkt`: jkt != DPoP thumbprint - "+p.cnf.jkt+" != "+h);if(p.client_id!=t)throw new Error("Access Token validation failed on `client_id`: JWT payload != client_id - "+p.client_id+" != "+t);return await e.setItem("refresh_token",s.refresh_token),e.close(),{...s,dpop_key_pair:r}},$t=async(e,t,i,r)=>{const o=await dt(r.publicKey);o.alg="ES256";const s=await new St({htu:i,htm:"POST"}).setIssuedAt().setJti(window.crypto.randomUUID()).setProtectedHeader({alg:"ES256",typ:"dpop+jwt",jwk:o}).sign(r.privateKey);return fetch(i,{method:"POST",headers:{dpop:s,"Content-Type":"application/x-www-form-urlencoded"},body:new URLSearchParams({grant_type:"refresh_token",refresh_token:e,client_id:t})})};class jt{sessionInformation;isActive_=!1;webId_=void 0;currentAth_=void 0;tokenRefreshTimeout;sessionDeactivateTimeout;onSessionExpirationWarning;constructor(e,t){this.sessionInformation={clientDetails:e},this.onSessionExpirationWarning=t?.onSessionExpirationWarning}async login(e,t){await(async(e,t,i)=>{const r=new URL(t),o=r.origin+r.pathname+r.search,s=new URL(e).origin,a=await fetch(`${s}/.well-known/openid-configuration`).then((e=>{if(!e.ok)throw new Error(`HTTP error! Status: ${e.status}`);return e.json()})),n=a.issuer,l=e=>e.endsWith("/")?e.slice(0,-1):e;if(l(e)!==l(n))throw new Error("RFC 9207 - iss != idp - "+n+" != "+e);sessionStorage.setItem("idp",n),sessionStorage.setItem("token_endpoint",a.token_endpoint),sessionStorage.setItem("jwks_uri",a.jwks_uri);let d=i?.client_id;if(!d){const e=a.registration_endpoint,t=await(async(e,t)=>{const i={...t,grant_types:["authorization_code","refresh_token"],id_token_signed_response_alg:"ES256",token_endpoint_auth_method:"none",application_type:"web",subject_type:"public"};return fetch(e,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(i)})})(e,i??{redirect_uris:[o]}).then((e=>{if(!e.ok)throw new Error(`HTTP error! Status: ${e.status}`);return e.json()}));d=t.client_id,sessionStorage.setItem("client_id",d)}const{pkce_code_verifier:p,pkce_code_challenge:h}=await Ut();sessionStorage.setItem("pkce_code_verifier",p);const c=window.crypto.randomUUID();sessionStorage.setItem("csrf_token",c);const u=a.authorization_endpoint+"?response_type=code"+`&redirect_uri=${encodeURIComponent(o)}&scope=openid offline_access webid`+`&client_id=${encodeURIComponent(d)}&code_challenge_method=S256`+`&code_challenge=${h}`+`&state=${c}&prompt=consent`;window.location.href=u})(e,t,this.sessionInformation.clientDetails)}async logout(){if(this.sessionDeactivateTimeout&&clearTimeout(this.sessionDeactivateTimeout),this.sessionDeactivateTimeout=void 0,this.tokenRefreshTimeout&&clearTimeout(this.tokenRefreshTimeout),this.tokenRefreshTimeout=void 0,this.sessionInformation.idpDetails=void 0,this.sessionInformation.tokenDetails=void 0,this.isActive_=!1,this.webId_=void 0,this.sessionInformation.clientDetails?.client_id)try{new URL(this.sessionInformation.clientDetails.client_id)}catch(e){this.sessionInformation.clientDetails.client_id=void 0}const e=await(new Nt).init();await e.clear(),e.close()}async handleRedirectFromLogin(){const e=await(async e=>{const t=new URL(window.location.href),i=t.searchParams.get("code");if(null===i)return{clientDetails:e};const r=sessionStorage.getItem("idp");if(null===r||t.searchParams.get("iss")!=r)throw new Error("RFC 9207 - iss != idp - "+t.searchParams.get("iss")+" != "+r);if(t.searchParams.get("state")!=sessionStorage.getItem("csrf_token"))throw new Error("RFC 6749 - state != csrf_token - "+t.searchParams.get("state")+" != "+sessionStorage.getItem("csrf_token"));t.searchParams.delete("iss"),t.searchParams.delete("state"),t.searchParams.delete("code"),window.history.pushState({},document.title,t.toString());const o=sessionStorage.getItem("pkce_code_verifier");if(null===o)throw new Error("Access Token Request preparation - Could not find in sessionStorage: pkce_code_verifier");const s=e?.client_id||sessionStorage.getItem("client_id");if(!s)throw new Error("Access Token Request preparation - Could not find in sessionStorage: client_id (dynamic registration)");const a=sessionStorage.getItem("token_endpoint");if(null===a)throw new Error("Access Token Request preparation - Could not find in sessionStorage: token_endpoint");const n=await async function(e,t){return async function(e,t){let i,r;switch(e){case"PS256":case"PS384":case"PS512":i={name:"RSA-PSS",hash:`SHA-${e.slice(-3)}`,publicExponent:new Uint8Array([1,0,1]),modulusLength:Rt(t)},r=["sign","verify"];break;case"RS256":case"RS384":case"RS512":i={name:"RSASSA-PKCS1-v1_5",hash:`SHA-${e.slice(-3)}`,publicExponent:new Uint8Array([1,0,1]),modulusLength:Rt(t)},r=["sign","verify"];break;case"RSA-OAEP":case"RSA-OAEP-256":case"RSA-OAEP-384":case"RSA-OAEP-512":i={name:"RSA-OAEP",hash:`SHA-${parseInt(e.slice(-3),10)||1}`,publicExponent:new Uint8Array([1,0,1]),modulusLength:Rt(t)},r=["decrypt","unwrapKey","encrypt","wrapKey"];break;case"ES256":i={name:"ECDSA",namedCurve:"P-256"},r=["sign","verify"];break;case"ES384":i={name:"ECDSA",namedCurve:"P-384"},r=["sign","verify"];break;case"ES512":i={name:"ECDSA",namedCurve:"P-521"},r=["sign","verify"];break;case"Ed25519":i={name:"Ed25519"},r=["sign","verify"];break;case"EdDSA":{r=["sign","verify"];const e="Ed25519";switch(e){case"Ed25519":case"Ed448":i={name:e};break;default:throw new Fe("Invalid or unsupported crv option provided")}break}case"ECDH-ES":case"ECDH-ES+A128KW":case"ECDH-ES+A192KW":case"ECDH-ES+A256KW":{r=["deriveKey","deriveBits"];const e="P-256";switch(e){case"P-256":case"P-384":case"P-521":i={name:"ECDH",namedCurve:e};break;case"X25519":case"X448":i={name:e};break;default:throw new Fe("Invalid or unsupported crv option provided, supported values are P-256, P-384, P-521, X25519, and X448")}break}default:throw new Fe('Invalid or unsupported JWK "alg" (Algorithm) Parameter value')}return ve.subtle.generateKey(i,!1,r)}(e,t)}("ES256"),l=await(async(e,t,i,r,o,s)=>{const a=await dt(s.publicKey);a.alg="ES256";const n=await new St({htu:o,htm:"POST"}).setIssuedAt().setJti(window.crypto.randomUUID()).setProtectedHeader({alg:"ES256",typ:"dpop+jwt",jwk:a}).sign(s.privateKey);return fetch(o,{method:"POST",headers:{dpop:n,"Content-Type":"application/x-www-form-urlencoded"},body:new URLSearchParams({grant_type:"authorization_code",code:e,code_verifier:t,redirect_uri:i,client_id:r})})})(i,o,t.toString(),s,a,n).then((e=>{if(!e.ok)throw new Error(`HTTP error! Status: ${e.status}`);return e.json()})),d=l.access_token,p=sessionStorage.getItem("jwks_uri");if(null===p)throw new Error("Access Token validation preparation - Could not find in sessionStorage: jwks_uri");const h=_t(new URL(p)),{payload:c}=await gt(d,h,{issuer:r,audience:"solid"}),u=await It(await dt(n.publicKey));if(c.cnf.jkt!=u)throw new Error("Access Token validation failed on `jkt`: jkt != DPoP thumbprint - "+c.cnf.jkt+" != "+u);if(c.client_id!=s)throw new Error("Access Token validation failed on `client_id`: JWT payload != client_id - "+c.client_id+" != "+s);const f={...l,dpop_key_pair:n},m={idp:r,jwks_uri:p,token_endpoint:a};e||(e={redirect_uris:[window.location.href]}),e.client_id=s;const b=await(new Nt).init();return await Promise.all([b.setItem("idp",r),b.setItem("jwks_uri",p),b.setItem("token_endpoint",a),b.setItem("client_id",s),b.setItem("dpop_keypair",n),b.setItem("refresh_token",l.refresh_token)]),b.close(),sessionStorage.removeItem("csrf_token"),sessionStorage.removeItem("pkce_code_verifier"),sessionStorage.removeItem("idp"),sessionStorage.removeItem("jwks_uri"),sessionStorage.removeItem("token_endpoint"),sessionStorage.removeItem("client_id"),{clientDetails:e,idpDetails:m,tokenDetails:f}})(this.sessionInformation.clientDetails);e.tokenDetails&&(this.sessionInformation=e,await this.setSessionDetails())}async restore(){await Ot().then((e=>(this.sessionInformation.tokenDetails=e,this.setSessionDetails()))).catch((()=>{}))}async createSignedDPoPToken(e){if(!this.sessionInformation.tokenDetails||!this.currentAth_)throw new Error("Session not established.");e.ath=this.currentAth_;const t=await dt(this.sessionInformation.tokenDetails.dpop_key_pair.publicKey);return new St(e).setIssuedAt().setJti(window.crypto.randomUUID()).setProtectedHeader({alg:"ES256",typ:"dpop+jwt",jwk:t}).sign(this.sessionInformation.tokenDetails.dpop_key_pair.privateKey)}async authFetch(e,t,i){let r,o,s;if(e instanceof Request?(r=new URL(e.url),o=t?.method||e?.method||"GET",s=new Headers(e.headers)):(t=t||{},r=new URL(e.toString()),o=t.method||"GET",s=t.headers?new Headers(t.headers):new Headers),this.sessionInformation.tokenDetails){i=i??{htu:`${r.origin}${r.pathname}`,htm:o.toUpperCase()};const e=await this.createSignedDPoPToken(i);s.set("dpop",e),s.set("authorization",`DPoP ${this.sessionInformation.tokenDetails.access_token}`)}return e instanceof Request?fetch(new Request(e,{...t,headers:s})):fetch(r,{...t,headers:s})}get isActive(){return this.isActive_}get webId(){return this.webId_}async setSessionDetails(){this.sessionInformation.tokenDetails?.access_token||this.logout(),this.currentAth_=await this.computeAth(this.sessionInformation.tokenDetails.access_token),this.webId_=function(e){if("string"!=typeof e)throw new Ae("JWTs must use Compact JWS serialization, JWT must be a string");const{1:t,length:i}=e.split(".");if(5===i)throw new Ae("Only JWTs using Compact JWS serialization can be decoded");if(3!==i)throw new Ae("Invalid JWT");if(!t)throw new Ae("JWTs must contain a payload");let r,o;try{r=Mt(t)}catch{throw new Ae("Failed to base64url decode the payload")}try{o=JSON.parse(ke.decode(r))}catch{throw new Ae("Failed to parse the decoded payload as JSON")}if(!qe(o))throw new Ae("Invalid JWT Claims Set");return o}(this.sessionInformation.tokenDetails.access_token).webid,this.isActive_=void 0!==this.webId,this.setSessionDeactivateTimeout(),this.setTokenRefreshTimeout()}setSessionDeactivateTimeout(){const e=1e3*(this.sessionInformation.tokenDetails.expires_in-5);this.sessionDeactivateTimeout&&clearTimeout(this.sessionDeactivateTimeout),this.sessionDeactivateTimeout=setTimeout((()=>this.logout()),e)}setTokenRefreshTimeout(){const e=1e3*(this.sessionInformation.tokenDetails.expires_in-95);this.tokenRefreshTimeout&&clearTimeout(this.tokenRefreshTimeout),this.tokenRefreshTimeout=setTimeout((async()=>{const e=await Ot().catch((()=>{this.onSessionExpirationWarning&&this.onSessionExpirationWarning()}));e&&(this.sessionInformation.tokenDetails=e,this.setSessionDetails())}),e)}async computeAth(e){const t=(new TextEncoder).encode(e),i=await crypto.subtle.digest("SHA-256",t),r=Array.from(new Uint8Array(i));return btoa(String.fromCharCode(...r)).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}}class Wt{get authenticatedFetch(){return this._authenticatedFetch}constructor(){this.onSessionRestoreCallback=()=>{},this.sessionInfo$=new B.BehaviorSubject({isLoggedIn:!1,webId:void 0}),this.session=new jt,this._authenticatedFetch=this.session.authFetch.bind(this.session)}async handleIncomingRedirect(e=!1){await this.session.handleRedirectFromLogin(),e&&(await this.session.restore(),this.session.isActive&&this.onSessionRestoreCallback(window.location.href)),this.sessionInfo$.next({isLoggedIn:this.session.isActive,webId:this.session.webId})}async login(e){return this.session.login(e,window.location.href)}async logout(){await this.session.logout(),this.sessionInfo$.next({isLoggedIn:!1,webId:void 0})}observeSession(){return this.sessionInfo$}onSessionRestore(e){this.onSessionRestoreCallback=e}}var Lt=n`
|
|
2
2
|
:host {
|
|
3
3
|
--height: 1rem;
|
|
4
4
|
--track-color: var(--sl-color-neutral-200);
|
|
@@ -362,7 +362,7 @@ import{r as e,h as t,H as i,c as r,a as o,i as s,j as a}from"./p-spEUIGXI.js";im
|
|
|
362
362
|
</div>
|
|
363
363
|
`:""}
|
|
364
364
|
</div>
|
|
365
|
-
`}};ci.styles=[p,hi],ci.dependencies={"sl-icon-button":di},h([z('[part~="base"]')],ci.prototype,"base",2),h([z(".alert__countdown-elapsed")],ci.prototype,"countdownElement",2),h([c({type:Boolean,reflect:!0})],ci.prototype,"open",2),h([c({type:Boolean,reflect:!0})],ci.prototype,"closable",2),h([c({reflect:!0})],ci.prototype,"variant",2),h([c({type:Number})],ci.prototype,"duration",2),h([c({type:String,reflect:!0})],ci.prototype,"countdown",2),h([b()],ci.prototype,"remainingTime",2),h([y("open",{waitUntilFirstUpdate:!0})],ci.prototype,"handleOpenChange",1),h([y("duration")],ci.prototype,"handleDurationChange",1);var ui=ci;F("alert.show",{keyframes:[{opacity:0,scale:.8},{opacity:1,scale:1}],options:{duration:250,easing:"ease"}}),F("alert.hide",{keyframes:[{opacity:1,scale:1},{opacity:0,scale:.8}],options:{duration:250,easing:"ease"}}),ui.define("sl-alert");const fi=class{constructor(t){e(this,t)}async unhandledRejection(e){e.stopPropagation(),console.error("unhandled promise rejection",e),this.title="Unhandled promise rejection",this.message=e.reason.toString()}async catchError(e){if(e.stopPropagation(),console.error(e.detail),e.detail instanceof Error)this.title="Error",this.message=e.detail.message;else{const t=e.detail;this.title=t.title,this.message=t.detail}await this.alert.toast()}render(){return t(i,{key:"a2c2db82c085541f2912861ff715633c1a50872e"},t("sl-alert",{key:"af7e56dacdd8c2cdacfe4eb5020d59e8111e9947",ref:e=>this.alert=e,variant:"danger",duration:"10000",closable:!0},t("sl-icon",{key:"f50b8c321b0844c2f3cac2886f23b758e18500b1",slot:"icon",name:"exclamation-octagon"}),t("strong",{key:"0f7c7880b08366a16baaa1385df12614d6a6cddf"},this.title),t("br",{key:"5660dbabfa1162590b386087231301ee3920a415"}),this.message),t("slot",{key:"671026ea140044dfbeb63dee5c08a65591464668"}))}},mi=class{constructor(t){e(this,t)}render(){return t(i,{key:"edfbfc18bef5794e03385a6712cd6301b9f7fb56"},t("div",{key:"cb211969daa03f9377b9cc91d32983305d8efc8f"},t("h2",{key:"df34f7358c8b232d6d4874069c3a93491332589e"},"Try these... 💡"),t("p",{key:"512f37a9d3ba9f7492ab1770472732d3027751d4"},"No idea where to start? Try these example resources, and follow your nose 👃"),t("div",{key:"70c3dd35ffb296cfa535df0e74a1142c825d24a2",class:"links"},t("pos-rich-link",{key:"441945b22665c8688efb69bdb90fb61c13e41192",uri:"https://pod-os.solidcommunity.net/profile/card#me"}),t("pos-rich-link",{key:"d159b08661afd4c3dcc1d305f51c0a71dd8d1556",uri:"https://angelo.veltens.org/profile/card#me"}),t("pos-rich-link",{key:"82bf392405f612530d5de60d93e2201fae53f8fd",uri:"https://angelo.veltens.org/public/bookmarks"}),t("pos-rich-link",{key:"6f2151ad44f7659e723cb31f33b1a26170fbe37b",uri:"https://solidos.solidcommunity.net/profile/card#me"}))))}};mi.style=":host{border:var(--size-px) solid var(--pos-border-color);border-radius:var(--radius-lg);box-shadow:var(--shadow-md);padding:var(--size-8);max-width:var(--size-96);background:var(--pos-card-background)}.links{display:flex;flex-direction:column;gap:var(--size-3);max-width:80vw}";const bi=class{constructor(t){e(this,t),this.login=r(this,"pod-os:login",7)}render(){return t(i,{key:"7486f4d04e3b7bd341fd2d9c02b85360079c5d5a"},t("div",{key:"710c84685022c9a55c821a421642cbff24c7ba5a"},t("h2",{key:"f01aa189a05ea101c61eecdc68d6fa1db9fefbb3"},"Getting started 🚀"),t("p",{key:"0e3320c4297a3438b2cdda02e27f0517a0ac2a85"},"🔎 Enter a URL into the above navigation bar to browse through the web of data. "),t("p",{key:"f99d218c35b6aa698bba807dc0f3b272ecd81416"},"🔐"," ",t("button",{key:"7091693cc439ddb12f35ef2f3be54f649c47e4ce",class:"login",onClick:()=>this.login.emit()},"Sign in")," ","to access private resources on your Solid Pod or those of your friends or coworkers.")),t("div",{key:"643c46009b4a962548ac501b3bca912a5163f4d3"},t("p",{key:"7fb4a75e5eb6f55a6b8d25825b39f8f82bcadeb9",class:"question"},"New to Solid?"),t("p",{key:"e7dd87fc055ad8981f28f00eb29a65c9e67f7a96"},t("a",{key:"1ad84ef46c7320e4adbb1ce573a8c6b97f60b8ec",href:"https://solidproject.org/for-developers#hosted-pod-services"},"Get a Pod →"))),t("div",{key:"bf50fd05a28e6536aae13cd6c7245c4b487850a6"},t("p",{key:"911eec270cee7a1dcc40320fb43298ad61b01206",class:"question"},"Want to dig deeper into PodOS?"),t("p",{key:"d1f7f4215577f50f1186b48ea0d48670eee53c22"},t("a",{key:"18c487f6e1ea48289654005286816b18e741c8a0",href:"http://pod-os.org"},"Learn more →"))))}};bi.style=":host{border:var(--size-px) solid var(--pos-border-color);border-radius:var(--radius-lg);box-shadow:var(--shadow-md);padding:var(--size-8);max-width:var(--size-96);background:var(--pos-card-background)}.question{font-weight:var(--weight-semibold)}a{font-weight:var(--weight-bold);color:var(--pos-primary-color)}button.login{background:none;color:var(--pos-primary-color);display:inline;text-decoration:underline;border:none;padding:0;margin:0;cursor:pointer;font-size:unset}";const yi=class{constructor(t){e(this,t),this.initializeOsEmitter=r(this,"pod-os:init",7),this.resourceLoadedEmitter=r(this,"pod-os:resource-loaded",7),this.blurredBackground=!1,this.loading=!0,this.setOs=async e=>{this.os=e}}componentWillLoad(){x.onChange("isLoggedIn",(()=>this.fetchBlob())),this.initializeOsEmitter.emit(this.setOs)}async fetchBlob(){try{this.loading=!0,this.imageError=null,this.networkError=null,this.brokenFile=null;const e=await this.os.files().fetchFile(this.src);this.resourceLoadedEmitter.emit(this.src),e.blob()?this.dataUri=URL.createObjectURL(e.blob()):this.brokenFile=e}catch(e){this.networkError=e}finally{this.loading=!1}}onImageError(e){this.networkError=null,this.imageError=e}render(){return this.loading?t("sl-skeleton",{effect:"sheen"}):this.networkError?t("img",{alt:this.alt,src:this.src,onError:e=>this.onImageError(e)}):this.brokenFile?t(k,{file:this.brokenFile}):this.imageError?t("div",{class:"error"},t("a",{href:this.src},this.src)):t(i,{style:{backgroundImage:this.blurredBackground?`url('${this.dataUri}')`:null}},t("img",{src:this.dataUri,alt:this.alt}))}static get watchers(){return{os:[{fetchBlob:0}],src:[{fetchBlob:0}]}}};yi.style=":host{display:flex;background-size:cover;background-repeat:no-repeat;background-position:center;border-radius:inherit}img,div.error{border-radius:var(--border-radius);width:var(--width);height:var(--height);max-width:var(--max-width);max-height:var(--max-height);object-fit:var(--object-fit)}img{backdrop-filter:var(--blur-xl)}.error{display:flex;opacity:0.8;background:repeating-linear-gradient(-45deg, rgba(150, 0, 0, 0.1), rgba(150, 0, 0, 0.1) 10px, #fff 5px, #fff 25px);flex-direction:column;border:1px solid red;color:black;align-items:center;justify-content:center;word-break:break-all;padding:1rem;box-sizing:border-box}.error sl-icon{color:#282828;font-size:calc(var(--width) / 2)}a.error{text-decoration:none;width:var(--width);height:var(--height)}.code{font-weight:bold;font-size:calc(var(--width) / 8)}.text{font-size:calc(var(--width) / 20)}sl-skeleton{--border-radius:inherit;width:var(--width);height:var(--height);max-width:var(--max-width);max-height:var(--max-height);aspect-ratio:16 / 9}";const gi=class{constructor(t){e(this,t),this.uri="pod-os:dashboard"}render(){return t("pod-os:settings"===this.uri?"pos-app-settings":"pos-app-dashboard",null)}},vi=class{constructor(t){e(this,t),this.subscribeResource=r(this,"pod-os:resource",7),this.receiveResource=e=>{this.resource=e}}componentWillLoad(){$(this)}render(){return this.resource?this.resource.label():null}},wi=class{constructor(t){e(this,t),this.initializeOsEmitter=r(this,"pod-os:init",7),this.customLoggedInComponent=!1,this.setOs=async e=>{this.os=e}}componentWillLoad(){this.customLoggedInComponent=!!this.host.querySelector('[slot="if-logged-in"]'),this.initializeOsEmitter.emit(this.setOs)}login(e){this.os.login(e.detail)}logout(){this.os.logout()}onLogin(){this.openDialog()}openDialog(){this.dialog.showModal()}render(){return t(i,{key:"9c0cb63442db7acea4e60b09528bf4fc25afe2de"},t("div",{key:"ca56c2b730f371da27c1ac0a465a45d87071722f",class:"container"},x.state.isLoggedIn?this.loggedInComponents():t("button",{id:"login",onClick:()=>this.openDialog()},"Login")),t("pos-dialog",{key:"97b7d80acd6b57980641f189e3c2a67e8e45df44",ref:e=>this.dialog=e},t("span",{key:"3296c22755474e139546491890a5cc35c7a07be9",slot:"title"},"Sign in to your Pod"),t("pos-login-form",{key:"cb68b44a0a7541c116d3711c3ce8d0141515e815","onPod-os:idp-url-selected":e=>this.login(e),slot:"content"})))}loggedInComponents(){return this.customLoggedInComponent?t("slot",{name:"if-logged-in"}):this.defaultLoggedInComponents()}defaultLoggedInComponents(){return[t("pos-resource",{uri:x.state.webId},t("span",{class:"user-data"},t("pos-picture",{"no-upload":!0}),t("pos-label",null))),t("button",{id:"logout",onClick:()=>this.logout()},"Logout")]}get host(){return o(this)}};wi.style=".container{display:flex;align-items:center;gap:var(--size-2)}.user-data{align-items:center;display:inline-flex;gap:10px}.user-data pos-picture{--width:40px;--height:40px;--border-radius:50%}pos-login-form{margin:var(--size-2)}dialog{margin-top:var(--size-10)}button#login,button#logout{outline:none;font-weight:var(--weight-bold);letter-spacing:var(--letter-xl);border:none;box-sizing:border-box;border-radius:var(--radius-xs);padding:var(--size-2);box-shadow:var(--shadow-sm);color:var(--pos-primary-text-color);background-color:var(--pos-primary-color)}button#login:focus-within,button#logout:focus-within{outline:var(--pos-input-focus-outline)}button#login:focus,button#login:hover,button#logout:focus,button#logout:hover{filter:brightness(110%);box-shadow:var(--shadow-md)}";const xi=class{constructor(t){e(this,t),this.idpUrlSelected=r(this,"pod-os:idp-url-selected",7),this.idpUrl="",this.canSubmit=!1}validate(){this.canSubmit=Boolean(this.idpUrl)}render(){return t("form",{key:"15b515887ebceff9ed2adb03f05e4725d5b1d4da",method:"dialog",onSubmit:()=>this.handleSubmit()},t("label",{key:"2278fd2cd0629dfc8d0bc3dc1c10223383131e15",htmlFor:"idpUrl"},"Please enter your Identity Provider"),t("input",{key:"2e63bb5aa1d16393abd46d042fd78a8e70dbc476",id:"idpUrl",type:"url",value:this.idpUrl,required:!0,onInput:e=>this.handleChange(e),list:"suggestedIssuers",placeholder:"Type to search..."}),t("datalist",{key:"16de93f77ee4f756c76fd5e58d84cf8a96b7fafb",id:"suggestedIssuers"},t("option",{key:"c6612878e0dc7be06ba9c88266ba746cc41bbcbd",value:"https://solidcommunity.net/"},"solidcommunity.net"),t("option",{key:"c93e6a9e2cad61c5247a048a4261079daca2655d",value:"https://solidweb.me/"},"solidweb.me"),t("option",{key:"d051f96a34bafa0d8c55e0ea1b9bfc7a5eb4f59a",value:"https://login.inrupt.com"},"Inrupt PodSpaces"),t("option",{key:"c793826a68676e176714898363ad06daa023a2f3",value:"https://trinpod.us"},"trinpod.us"),t("option",{key:"8ed729faba2a6c7b9fbc53d96511ec4ebc0db340",value:"https://trinpod.eu"},"trinpod.eu"),t("option",{key:"e683f8901b359e8bf82cb3e6d196817ac1150134",value:"https://solid.redpencil.io/"},"redpencil.io"),t("option",{key:"ddbad19605db043fc6f19ca5d4fc7bfd1d96b743",value:"https://teamid.live/"},"teamid.live")),t("input",{key:"ac9ebfdcfe6e1053fde4f890abd3e1183621060c",id:"login",type:"submit",value:"Login",disabled:!this.canSubmit}))}handleChange(e){this.validate(),this.idpUrl=e.target.value}async handleSubmit(){this.idpUrlSelected.emit(this.idpUrl)}static get delegatesFocus(){return!0}static get watchers(){return{idpUrl:[{validate:0}]}}};xi.style=":host{display:block;margin:0}form{display:flex;flex-direction:column;gap:var(--size-4)}input{outline:var(--pos-input-outline);padding:var(--scale-000);border:none;border-radius:var(--radius-xs);width:var(--size-full);box-sizing:border-box;background:var(--pos-input-background-color);color:var(--pos-normal-text-color)}input:focus-within{outline:var(--pos-input-focus-outline)}input#login{outline:none;box-shadow:var(--shadow-sm);cursor:pointer;color:var(--pos-primary-text-color);background-color:var(--pos-primary-color)}input#login:disabled{cursor:default;color:var(--pos-disabled-text-color);background-color:var(--pos-disabled-color);box-shadow:none}input#login:hover:not(:disabled),input#login:focus{filter:brightness(110%);box-shadow:var(--shadow-md)}";var ki=n`
|
|
365
|
+
`}};ci.styles=[p,hi],ci.dependencies={"sl-icon-button":di},h([z('[part~="base"]')],ci.prototype,"base",2),h([z(".alert__countdown-elapsed")],ci.prototype,"countdownElement",2),h([c({type:Boolean,reflect:!0})],ci.prototype,"open",2),h([c({type:Boolean,reflect:!0})],ci.prototype,"closable",2),h([c({reflect:!0})],ci.prototype,"variant",2),h([c({type:Number})],ci.prototype,"duration",2),h([c({type:String,reflect:!0})],ci.prototype,"countdown",2),h([b()],ci.prototype,"remainingTime",2),h([y("open",{waitUntilFirstUpdate:!0})],ci.prototype,"handleOpenChange",1),h([y("duration")],ci.prototype,"handleDurationChange",1);var ui=ci;F("alert.show",{keyframes:[{opacity:0,scale:.8},{opacity:1,scale:1}],options:{duration:250,easing:"ease"}}),F("alert.hide",{keyframes:[{opacity:1,scale:1},{opacity:0,scale:.8}],options:{duration:250,easing:"ease"}}),ui.define("sl-alert");const fi=class{constructor(t){e(this,t)}async unhandledRejection(e){e.stopPropagation(),console.error("unhandled promise rejection",e),this.title="Unhandled promise rejection",this.message=e.reason.toString()}async catchError(e){if(e.stopPropagation(),console.error(e.detail),e.detail instanceof Error)this.title="Error",this.message=e.detail.message;else{const t=e.detail;this.title=t.title,this.message=t.detail}await this.alert.toast()}render(){return t(i,{key:"a2c2db82c085541f2912861ff715633c1a50872e"},t("sl-alert",{key:"af7e56dacdd8c2cdacfe4eb5020d59e8111e9947",ref:e=>this.alert=e,variant:"danger",duration:"10000",closable:!0},t("sl-icon",{key:"f50b8c321b0844c2f3cac2886f23b758e18500b1",slot:"icon",name:"exclamation-octagon"}),t("strong",{key:"0f7c7880b08366a16baaa1385df12614d6a6cddf"},this.title),t("br",{key:"5660dbabfa1162590b386087231301ee3920a415"}),this.message),t("slot",{key:"671026ea140044dfbeb63dee5c08a65591464668"}))}},mi=class{constructor(t){e(this,t)}render(){return t(i,{key:"edfbfc18bef5794e03385a6712cd6301b9f7fb56"},t("div",{key:"cb211969daa03f9377b9cc91d32983305d8efc8f"},t("h2",{key:"df34f7358c8b232d6d4874069c3a93491332589e"},"Try these... 💡"),t("p",{key:"512f37a9d3ba9f7492ab1770472732d3027751d4"},"No idea where to start? Try these example resources, and follow your nose 👃"),t("div",{key:"70c3dd35ffb296cfa535df0e74a1142c825d24a2",class:"links"},t("pos-rich-link",{key:"441945b22665c8688efb69bdb90fb61c13e41192",uri:"https://pod-os.solidcommunity.net/profile/card#me"}),t("pos-rich-link",{key:"d159b08661afd4c3dcc1d305f51c0a71dd8d1556",uri:"https://angelo.veltens.org/profile/card#me"}),t("pos-rich-link",{key:"82bf392405f612530d5de60d93e2201fae53f8fd",uri:"https://angelo.veltens.org/public/bookmarks"}),t("pos-rich-link",{key:"6f2151ad44f7659e723cb31f33b1a26170fbe37b",uri:"https://solidos.solidcommunity.net/profile/card#me"}))))}};mi.style=":host{border:var(--size-px) solid var(--pos-border-color);border-radius:var(--radius-lg);box-shadow:var(--shadow-md);padding:var(--size-8);max-width:var(--size-96);background:var(--pos-card-background)}.links{display:flex;flex-direction:column;gap:var(--size-3);max-width:80vw}";const bi=class{constructor(t){e(this,t),this.login=r(this,"pod-os:login",7)}render(){return t(i,{key:"7486f4d04e3b7bd341fd2d9c02b85360079c5d5a"},t("div",{key:"710c84685022c9a55c821a421642cbff24c7ba5a"},t("h2",{key:"f01aa189a05ea101c61eecdc68d6fa1db9fefbb3"},"Getting started 🚀"),t("p",{key:"0e3320c4297a3438b2cdda02e27f0517a0ac2a85"},"🔎 Enter a URL into the above navigation bar to browse through the web of data. "),t("p",{key:"f99d218c35b6aa698bba807dc0f3b272ecd81416"},"🔐"," ",t("button",{key:"7091693cc439ddb12f35ef2f3be54f649c47e4ce",class:"login",onClick:()=>this.login.emit()},"Sign in")," ","to access private resources on your Solid Pod or those of your friends or coworkers.")),t("div",{key:"643c46009b4a962548ac501b3bca912a5163f4d3"},t("p",{key:"7fb4a75e5eb6f55a6b8d25825b39f8f82bcadeb9",class:"question"},"New to Solid?"),t("p",{key:"e7dd87fc055ad8981f28f00eb29a65c9e67f7a96"},t("a",{key:"1ad84ef46c7320e4adbb1ce573a8c6b97f60b8ec",href:"https://solidproject.org/for-developers#hosted-pod-services"},"Get a Pod →"))),t("div",{key:"bf50fd05a28e6536aae13cd6c7245c4b487850a6"},t("p",{key:"911eec270cee7a1dcc40320fb43298ad61b01206",class:"question"},"Want to dig deeper into PodOS?"),t("p",{key:"d1f7f4215577f50f1186b48ea0d48670eee53c22"},t("a",{key:"18c487f6e1ea48289654005286816b18e741c8a0",href:"http://pod-os.org"},"Learn more →"))))}};bi.style=":host{border:var(--size-px) solid var(--pos-border-color);border-radius:var(--radius-lg);box-shadow:var(--shadow-md);padding:var(--size-8);max-width:var(--size-96);background:var(--pos-card-background)}.question{font-weight:var(--weight-semibold)}a{font-weight:var(--weight-bold);color:var(--pos-primary-color)}button.login{background:none;color:var(--pos-primary-color);display:inline;text-decoration:underline;border:none;padding:0;margin:0;cursor:pointer;font-size:unset}";const yi=class{constructor(t){e(this,t),this.initializeOsEmitter=r(this,"pod-os:init",7),this.resourceLoadedEmitter=r(this,"pod-os:resource-loaded",7),this.blurredBackground=!1,this.loading=!0,this.setOs=async e=>{this.os=e}}componentWillLoad(){x.onChange("isLoggedIn",(()=>this.fetchBlob())),this.initializeOsEmitter.emit(this.setOs)}async fetchBlob(){try{this.loading=!0,this.imageError=null,this.networkError=null,this.brokenFile=null;const e=await this.os.files().fetchFile(this.src);this.resourceLoadedEmitter.emit(this.src),e.blob()?this.dataUri=URL.createObjectURL(e.blob()):this.brokenFile=e}catch(e){this.networkError=e}finally{this.loading=!1}}onImageError(e){this.networkError=null,this.imageError=e}render(){return this.loading?t("sl-skeleton",{effect:"sheen"}):this.networkError?t("img",{alt:this.alt,src:this.src,onError:e=>this.onImageError(e)}):this.brokenFile?t(k,{file:this.brokenFile}):this.imageError?t("div",{class:"error"},t("a",{href:this.src},this.src)):t(i,{style:{backgroundImage:this.blurredBackground?`url('${this.dataUri}')`:null}},t("img",{src:this.dataUri,alt:this.alt}))}static get watchers(){return{os:[{fetchBlob:0}],src:[{fetchBlob:0}]}}};yi.style=":host{display:flex;background-size:cover;background-repeat:no-repeat;background-position:center;border-radius:inherit}img,div.error{border-radius:var(--border-radius);width:var(--width);height:var(--height);max-width:var(--max-width);max-height:var(--max-height);object-fit:var(--object-fit)}img{backdrop-filter:var(--blur-xl)}.error{display:flex;opacity:0.8;background:repeating-linear-gradient(-45deg, rgba(150, 0, 0, 0.1), rgba(150, 0, 0, 0.1) 10px, #fff 5px, #fff 25px);flex-direction:column;border:1px solid red;color:black;align-items:center;justify-content:center;word-break:break-all;padding:1rem;box-sizing:border-box}.error sl-icon{color:#282828;font-size:calc(var(--width) / 2)}a.error{text-decoration:none;width:var(--width);height:var(--height)}.code{font-weight:bold;font-size:calc(var(--width) / 8)}.text{font-size:calc(var(--width) / 20)}sl-skeleton{--border-radius:inherit;width:var(--width);height:var(--height);max-width:var(--max-width);max-height:var(--max-height);aspect-ratio:16 / 9}";const gi=class{constructor(t){e(this,t),this.uri="pod-os:dashboard"}render(){return t("pod-os:settings"===this.uri?"pos-app-settings":"pos-app-dashboard",null)}},vi=class{constructor(t){e(this,t),this.subscribeResource=r(this,"pod-os:resource",7),this.receiveResource=e=>{this.resource=e}}componentWillLoad(){$(this)}render(){return this.resource?this.resource.label():null}},wi=class{constructor(t){e(this,t),this.initializeOsEmitter=r(this,"pod-os:init",7),this.customLoggedInComponent=!1,this.setOs=async e=>{this.os=e}}componentWillLoad(){this.customLoggedInComponent=!!this.host.querySelector('[slot="if-logged-in"]'),this.initializeOsEmitter.emit(this.setOs)}login(e){this.os.login(e.detail)}logout(){this.os.logout()}onLogin(){this.openDialog()}openDialog(){this.dialog.showModal()}render(){return t(i,{key:"9c0cb63442db7acea4e60b09528bf4fc25afe2de"},t("div",{key:"ca56c2b730f371da27c1ac0a465a45d87071722f",class:"container"},x.state.isLoggedIn?this.loggedInComponents():t("button",{id:"login",onClick:()=>this.openDialog()},"Login")),t("pos-dialog",{key:"97b7d80acd6b57980641f189e3c2a67e8e45df44",ref:e=>this.dialog=e},t("span",{key:"3296c22755474e139546491890a5cc35c7a07be9",slot:"title"},"Sign in to your Pod"),t("pos-login-form",{key:"cb68b44a0a7541c116d3711c3ce8d0141515e815","onPod-os:idp-url-selected":e=>this.login(e),slot:"content"})))}loggedInComponents(){return this.customLoggedInComponent?t("slot",{name:"if-logged-in"}):this.defaultLoggedInComponents()}defaultLoggedInComponents(){return[t("pos-resource",{uri:x.state.webId},t("span",{class:"user-data"},t("pos-picture",{"no-upload":!0}),t("pos-label",null))),t("button",{id:"logout",onClick:()=>this.logout()},"Logout")]}get host(){return o(this)}};wi.style=".container { display: flex; align-items: center; gap: var(--size-2); > pos-resource { display: flex; } } .user-data { align-items: center; display: inline-flex; gap: 10px; } .user-data pos-picture { --width: 40px; --height: 40px; --border-radius: 50%; } pos-login-form { margin: var(--size-2); } dialog { margin-top: var(--size-10); } button#login, button#logout { outline: none; font-weight: var(--weight-bold); letter-spacing: var(--letter-xl); border: none; box-sizing: border-box; border-radius: var(--radius-xs); padding: var(--size-2); box-shadow: var(--shadow-sm); color: var(--pos-primary-text-color); background-color: var(--pos-primary-color); } button#login:focus-within, button#logout:focus-within { outline: var(--pos-input-focus-outline); } button#login:focus, button#login:hover, button#logout:focus, button#logout:hover { filter: brightness(110%); box-shadow: var(--shadow-md); } ";const xi=class{constructor(t){e(this,t),this.idpUrlSelected=r(this,"pod-os:idp-url-selected",7),this.idpUrl="",this.canSubmit=!1,this.rememberMe=!1}componentWillLoad(){const e=V.state.rememberedIdp;e&&(this.idpUrl=e,this.rememberMe=!0)}validate(){this.canSubmit=Boolean(this.idpUrl)}render(){return t("form",{key:"a402f5254881c362889e82905685ddbcd67043d8",method:"dialog",onSubmit:()=>this.handleSubmit()},t("label",{key:"c5370460c8c8bcb5ed36eeeeee505e65f7e9c223",htmlFor:"idpUrl"},"Please enter your Identity Provider"),t("input",{key:"960c58b08c3d14cc84bc1220f2af76d039b406e4",id:"idpUrl",type:"url",value:this.idpUrl,required:!0,onInput:e=>this.handleChange(e),list:"suggestedIssuers",placeholder:"Type to search..."}),t("datalist",{key:"8d3edf275da4caf0fb1d711ae9ab0b4bd2637a57",id:"suggestedIssuers"},t("option",{key:"4793ca17b5463b29cf53bf6530d80f0bbecf48da",value:"https://solidcommunity.net/"},"solidcommunity.net"),t("option",{key:"c6b930fd29cd8a8a1a8aa534d607ce2d008a44a9",value:"https://solidweb.me/"},"solidweb.me"),t("option",{key:"b3e418d76ac9b59ff7fad5e5df07c59ed5e8acb5",value:"https://login.inrupt.com"},"Inrupt PodSpaces"),t("option",{key:"ffe3602d4a7823bcc1c9c8a3b15a67ee48341e45",value:"https://trinpod.us"},"trinpod.us"),t("option",{key:"896032d7f419cb26bfaf01a82c0698f166c0a47d",value:"https://trinpod.eu"},"trinpod.eu"),t("option",{key:"7b08e9c47808ec1b6cd2ee268579662c3c867f07",value:"https://solid.redpencil.io/"},"redpencil.io"),t("option",{key:"bac6459ab354f4c821b6bf5043bb5e0783e72e88",value:"https://teamid.live/"},"teamid.live")),t("label",{key:"64bf359c6f5e19ab9fde2b1cd17db678c638a556",class:"remember-me"},t("input",{key:"299df2152d0d18d8238c533ecb62800568215926",id:"rememberMe",type:"checkbox",checked:this.rememberMe,onChange:e=>this.rememberMe=e.target.checked}),"Remember me"),t("input",{key:"7a8f9a24a0a6210bb64335058c5529b0cb1454b0",id:"login",type:"submit",value:"Login",disabled:!this.canSubmit}))}handleChange(e){this.validate(),this.idpUrl=e.target.value}async handleSubmit(){V.state.rememberedIdp=this.rememberMe?this.idpUrl:null,this.idpUrlSelected.emit(this.idpUrl)}static get delegatesFocus(){return!0}static get watchers(){return{idpUrl:[{validate:0}]}}};xi.style=":host{display:block;margin:0}form{display:flex;flex-direction:column;gap:var(--size-4)}input{outline:var(--pos-input-outline);padding:var(--scale-000);border:none;border-radius:var(--radius-xs);width:var(--size-full);box-sizing:border-box;background:var(--pos-input-background-color);color:var(--pos-normal-text-color)}input:focus-within{outline:var(--pos-input-focus-outline)}input#login{outline:none;box-shadow:var(--shadow-sm);cursor:pointer;color:var(--pos-primary-text-color);background-color:var(--pos-primary-color)}input#login:disabled{cursor:default;color:var(--pos-disabled-text-color);background-color:var(--pos-disabled-color);box-shadow:none}input#login:hover:not(:disabled),input#login:focus{filter:brightness(110%);box-shadow:var(--shadow-md)}label.remember-me{display:flex;align-items:center;gap:var(--size-2);cursor:pointer}label.remember-me input[type='checkbox']{margin:0;appearance:none;padding:var(--size-2);width:var(--size-2);height:var(--size-2);border-radius:var(--radius-xs);cursor:pointer;position:relative;flex-shrink:0}label.remember-me input[type='checkbox']:checked{background-color:var(--pos-primary-color);border-color:var(--pos-primary-color)}label.remember-me input[type='checkbox']:checked::after{content:'';position:absolute;inset:0;margin:auto;width:3px;height:6px;border:solid white;border-width:0 1.5px 1.5px 0;transform:translateY(-1px) rotate(45deg)}label.remember-me input[type='checkbox']:focus{outline:2px solid var(--pos-primary-color);outline-offset:2px}";var ki=n`
|
|
366
366
|
:host {
|
|
367
367
|
display: inline-block;
|
|
368
368
|
}
|
|
@@ -726,7 +726,7 @@ import{r as e,h as t,H as i,c as r,a as o,i as s,j as a}from"./p-spEUIGXI.js";im
|
|
|
726
726
|
${this.submenuController.renderSubmenu()}
|
|
727
727
|
${this.loading?f` <sl-spinner part="spinner" exportparts="base:spinner__base"></sl-spinner> `:""}
|
|
728
728
|
</div>
|
|
729
|
-
`}};Hi.styles=[p,Fi],Hi.dependencies={"sl-icon":m,"sl-popup":M,"sl-spinner":Li},h([z("slot:not([name])")],Hi.prototype,"defaultSlot",2),h([z(".menu-item")],Hi.prototype,"menuItem",2),h([c()],Hi.prototype,"type",2),h([c({type:Boolean,reflect:!0})],Hi.prototype,"checked",2),h([c()],Hi.prototype,"value",2),h([c({type:Boolean,reflect:!0})],Hi.prototype,"loading",2),h([c({type:Boolean,reflect:!0})],Hi.prototype,"disabled",2),h([y("checked")],Hi.prototype,"handleCheckedChange",1),h([y("disabled")],Hi.prototype,"handleDisabledChange",1),h([y("type")],Hi.prototype,"handleTypeChange",1),Hi.define("sl-menu-item");const Vi=class{constructor(t){e(this,t),this.subscribePodOs=r(this,"pod-os:init",7),this.errorEmitter=r(this,"pod-os:error",7),this.indexUpdatedEmitter=r(this,"pod-os:search:index-updated",7),this.indexCreatedEmitter=r(this,"pod-os:search:index-created",7),this.indexes=[],this.showOptions=!1,this.isIndexed=!1,this.receivePodOs=async e=>{this.os=e,this.thing=this.os.store.get(this.uri),this.getLabelIndexes(x.state.profile),this.unsubscribeSessionChange=x.onChange("profile",(e=>{this.getLabelIndexes(e)}))}}componentWillLoad(){j(this)}disconnectedCallback(){this.unsubscribeSessionChange&&this.unsubscribeSessionChange()}updateUri(e){this.thing=this.os.store.get(e),this.isIndexed=this.checkIfIndexed(e)}checkIfIndexed(e){return this.indexes.some((t=>t.contains(e)))}getLabelIndexes(e){e&&(this.indexes=e.getPrivateLabelIndexes().map((e=>this.os.store.get(e).assume(I))),this.showOptions=this.indexes.length>1,this.isIndexed=this.checkIfIndexed(this.uri))}async onClick(e){if(e.preventDefault(),1===this.indexes.length){const e=this.indexes[0];await this.addToLabelIndex(e),this.indexUpdatedEmitter.emit(e)}else if(0===this.indexes.length){const e=await this.createDefaultLabelIndex();await this.addToLabelIndex(e),this.indexCreatedEmitter.emit(e)}}async addToLabelIndex(e){try{await this.os.addToLabelIndex(this.thing,e),this.isIndexed=!0}catch(e){this.errorEmitter.emit(e)}}async createDefaultLabelIndex(){try{return await this.os.createDefaultLabelIndex(x.state.profile)}catch(e){this.errorEmitter.emit(e)}}render(){if(!x.state.isLoggedIn||!this.uri)return null;const e="Make this findable",r=t("button",{type:"button",slot:"trigger","aria-label":e,class:{main:!0,success:this.isIndexed},onClick:e=>this.onClick(e),title:""},t(this.isIndexed?Ki:Ji,null),t("p",null,e));return this.showOptions?t(i,null,t("sl-dropdown",null,r,t("sl-menu",{role:"listbox"},this.indexes.map((e=>t("sl-menu-item",{role:"option",value:e,type:"checkbox",checked:e.contains(this.uri)},t("pos-resource",{uri:e.uri,lazy:!0},t("pos-label",null)))))))):r}async onSelect(e){const t=e.detail.item.value;e.preventDefault(),await this.addToLabelIndex(t),this.indexUpdatedEmitter.emit(t)}get el(){return o(this)}static get watchers(){return{uri:[{updateUri:0}]}}},Ji=()=>t("svg",{role:"presentation",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor"},t("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M19.5 14.25v-2.625a3.375 3.375 0 0 0-3.375-3.375h-1.5A1.125 1.125 0 0 1 13.5 7.125v-1.5a3.375 3.375 0 0 0-3.375-3.375H8.25m5.231 13.481L15 17.25m-4.5-15H5.625c-.621 0-1.125.504-1.125 1.125v16.5c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 0 0-9-9Zm3.75 11.625a2.625 2.625 0 1 1-5.25 0 2.625 2.625 0 0 1 5.25 0Z"})),Ki=()=>t("svg",{role:"presentation",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor"},t("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M10.125 2.25h-4.5c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125v-9M10.125 2.25h.375a9 9 0 0 1 9 9v.375M10.125 2.25A3.375 3.375 0 0 1 13.5 5.625v1.5c0 .621.504 1.125 1.125 1.125h1.5a3.375 3.375 0 0 1 3.375 3.375M9 15l2.25 2.25L15 12"}));Vi.style="button.main{display:flex;transition:width 200ms, background-color 500ms, color 500ms, border-color 500ms;max-width:var(--size-40);flex-direction:row;overflow:hidden;height:var(--pos-navigation-bar-height);width:var(--pos-navigation-bar-height);align-items:center;justify-content:center;border-radius:var(--radius-md);color:var(--pos-subtle-text-color);border:var(--size-px) dashed var(--pos-subtle-text-color);background-color:var(--pos-background-color);p{padding:0;margin:0;display:none;white-space:nowrap}&.success{color:var(--color-green-700);border-color:var(--color-green-700);border-style:solid;background-color:var(--color-green-100)}&:active{transform:scale(0.99);filter:brightness(90%)}&:focus{outline:var(--pos-input-focus-outline)}}svg{display:inline-block;height:var(--size-6);flex-shrink:0;flex-grow:0;width:var(--size-6)}button.main:hover,sl-dropdown[open] button{width:var(--size-full);height:var(--pos-navigation-bar-height);background:var(--pos-background-color);color:var(--pos-normal-text-color);&.success{background:var(--color-green-200);color:var(--color-green-700)}p{display:inline-block}}";const qi=class{constructor(t){e(this,t),this.subscribePodOs=r(this,"pod-os:init",7),this.linkEmitter=r(this,"pod-os:link",7),this.uri="",this.inputValue=this.uri,this.searchIndex=void 0,this.suggestions=[],this.selectedIndex=-1,this.resource=null,this.changeEvents=new B.Subject,this.debouncedSearch=null,this.receivePodOs=async e=>{this.os=e}}updateResource(){var e;try{this.resource=this.uri?null===(e=this.os)||void 0===e?void 0:e.store.get(this.uri):null}catch(e){this.resource=null}}componentWillLoad(){j(this),this.updateResource(),x.onChange("isLoggedIn",(async e=>{e?await this.buildSearchIndex():this.clearSearchIndex()})),this.debouncedSearch=this.changeEvents.pipe(B.debounceTime(300)).subscribe((()=>this.search()))}disconnectedCallback(){var e;null===(e=this.debouncedSearch)||void 0===e||e.unsubscribe()}async buildSearchIndex(){this.searchIndex=await this.os.buildSearchIndex(x.state.profile)}rebuildSearchIndex(){this.searchIndex.rebuild()}openNavigationDialog(e){var t,i;this.resource=e.detail,e.detail&&(this.inputValue=e.detail.uri,this.search()),null===(t=this.inputRef)||void 0===t||t.select(),null===(i=this.dialogRef)||void 0===i||i.show()}clearSearchIndex(){var e;null===(e=this.searchIndex)||void 0===e||e.clear()}onChange(e){this.inputValue=e.target.value,this.changeEvents.next()}closeDialog(){var e;null===(e=this.dialogRef)||void 0===e||e.close(),this.selectedIndex=-1}clearSuggestions(){var e;this.suggestions=[],null===(e=this.dialogRef)||void 0===e||e.close(),this.selectedIndex=-1}onClickSelf(e){e.stopPropagation()}handleKeyDown(e){"Escape"===e.key?this.closeDialog():"ArrowDown"===e.key?(e.preventDefault(),this.selectedIndex=Math.min(this.selectedIndex+1,this.suggestions.length-1)):"ArrowUp"===e.key&&(e.preventDefault(),this.selectedIndex=Math.max(this.selectedIndex-1,0))}search(){this.searchIndex&&(this.suggestions=this.inputValue?this.searchIndex.search(this.inputValue):[])}onSubmit(){this.linkEmitter.emit(this.suggestions&&this.selectedIndex>-1?this.suggestions[this.selectedIndex].ref:this.inputValue)}render(){return t("nav",{key:"d5ad4841674cf172e9401a63fc50e58900ca5b1f"},t("search",{key:"8daf86774c49234d10637160fd983681ac483b44"},t("pos-navigation-bar",{key:"200137643dbc0aa1f120c231dc70a0d3f71b596a",searchIndexReady:void 0!==this.searchIndex,current:this.resource}),t("dialog",{key:"f2fb1d3e4a38d17efb6bd80ca791e8a30fafab66",ref:e=>this.dialogRef=e},t("form",{key:"e54698d8fb968a5ee6007cc4d5644fec36bf74f3",method:"dialog",onSubmit:()=>this.onSubmit()},t("input",{key:"633a4030c6296b5c94e2661bd73168afc1e04438",ref:e=>this.inputRef=e,enterkeyhint:"search","aria-label":"Search or enter URI",placeholder:"Search or enter URI",value:this.uri,onChange:e=>this.onChange(e),onInput:e=>this.onChange(e),role:"combobox","aria-autocomplete":"list","aria-expanded":this.suggestions.length>0,"aria-controls":"suggestions-list","aria-activedescendant":this.selectedIndex>=0?`option-${this.selectedIndex}`:null}),this.suggestions.length>0?t("div",{class:"suggestions"},t("ol",{id:"suggestions-list",role:"listbox","aria-label":"Search results"},this.suggestions.map(((e,i)=>t("li",{id:`option-${i}`,role:"option","aria-selected":i===this.selectedIndex?"true":"false"},t("pos-rich-link",{uri:e.ref})))))):null))))}static get watchers(){return{uri:[{updateResource:0}],os:[{updateResource:0}]}}};qi.style=":host{--pos-navigation-bar-height:var(--size-10)}search{position:relative}.suggestions ol{border:1px solid var(--pos-border-color);display:flex;flex-direction:column;margin:0;padding:0;list-style-type:none}.suggestions{width:100%;overflow-y:auto;max-height:90dvh;li{padding:1rem;background-color:var(--pos-background-color);pos-rich-link{--background-color:inherit}&[aria-selected='true']{background-color:var(--pos-primary-color);&:hover{background-color:var(--pos-primary-color)}}&:hover{background-color:var(--pos-border-color)}}}.suggestions li.selected pos-rich-link{--label-color:white;--description-color:var(--pos-border-color);--uri-color:var(--pos-subtle-text-color)}dialog{position:absolute;margin-top:calc(-1 * var(--pos-navigation-bar-height));padding:0;width:100%;max-width:100%;min-width:100%;overflow:hidden;max-height:100dvh;background-color:var(--pos-background-color);color:var(--pos-normal-text-color);border:var(--pos-border-color);border-radius:var(--radius-md);box-shadow:var(--shadow-md);form{display:flex;flex-direction:column;height:100%;width:100%;align-items:center;input{display:flex;font-size:var(--scale-1);height:var(--pos-navigation-bar-height);border-top-left-radius:var(--radius-md);border-top-right-radius:var(--radius-md);padding-left:var(--size-2);width:100%;border:none;outline:none;color:var(--pos-normal-text-color);background-color:var(--pos-input-background-color);box-sizing:border-box}}}dialog[open]{display:flex;z-index:var(--layer-top);animation:slideIn 100ms ease-out}@media (max-width: 640px){search{position:unset}dialog{margin-top:var(--size-1);top:0;width:95dvw;max-width:unset;min-width:unset;form{input{height:var(--size-12);font-size:var(--scale-fluid-3)}}}}@keyframes fadeIn{from{opacity:0}to{opacity:1}}";const Gi=class{constructor(t){e(this,t),this.navigate=r(this,"pod-os:navigate",7)}onClick(){this.navigate.emit(this.current)}activate(e){(e.ctrlKey||e.metaKey)&&"k"===e.key&&(e.preventDefault(),this.navigate.emit(this.current))}render(){const e=this.current?`${this.current.label()} (Click to search or enter URI)`:"Search or enter URI";return t("section",{key:"5f49aa9dad9d07550ee8ffbee90036cbc1efda55",class:"current"},this.current&&this.searchIndexReady&&t("pos-make-findable",{key:"85974a4772aaf8cad3a11cdcd49e6df10141bfe3",uri:this.current.uri}),t("button",{key:"40660a3455b0f3392c68d7aea0075b102a1762a2","aria-label":e,onClick:()=>this.onClick()},t("div",{key:"9ab8922175d701f714f72aefb95745cf5ae4bb95"},this.current?this.current.label():"Search or enter URI"),this.icon()),this.current&&t("pos-share",{key:"3b80c1987f9f5138b11b8a106171fc73a236f426",uri:this.current.uri}))}icon(){return t("svg",{"aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor"},t("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"m21 21-5.197-5.197m0 0A7.5 7.5 0 1 0 5.196 5.196a7.5 7.5 0 0 0 10.607 10.607Z"}))}};Gi.style="section.current{display:flex;align-items:center;box-sizing:border-box;padding:0 var(--size-2) 0 0;height:var(--pos-navigation-bar-height);flex-grow:1;gap:0;background-color:var(--pos-input-background-color);border-radius:var(--radius-md);width:100%;&:focus-within{outline:var(--pos-input-focus-outline)}button{cursor:pointer;font-size:var(--scale-1);display:flex;align-items:center;justify-content:center;flex-grow:1;background:none;color:var(--pos-normal-text-color);outline:none;border:none;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;&:focus{text-decoration:underline}:first-child{flex-grow:1}svg{width:var(--size-6);color:var(--pos-subtle-text-color)}}pos-share{height:80%;&:hover{&::part(button){color:var(--pos-primary-color);background-color:var(--pos-border-color);border-radius:var(--radius-full)}}&::part(button){font-size:var(--size-4);background:none;outline:none;border:none;color:var(--pos-subtle-text-color)}}}";const Xi=class{constructor(t){e(this,t),this.linkEmitter=r(this,"pod-os:link",7),this.errorEmitter=r(this,"pod-os:error",7),this.subscribePodOs=r(this,"pod-os:init",7),this.canSubmit=!1,this.receivePodOs=async e=>{this.os=e}}validate(){this.canSubmit=Boolean(this.name&&this.selectedTypeUri)}componentWillLoad(){j(this)}render(){return t("form",{key:"64781cfb0e570d2368325d674c6637c581bb87c2",method:"dialog",onSubmit:e=>this.handleSubmit(e)},t("label",{key:"409e04f147430042eb334024fc7061574ab543cf",htmlFor:"type"},"Type"),t("pos-select-term",{key:"8d5d580ee1f1e2e2c60cac0cc06798e94a0d28c3",id:"type",placeholder:"",value:this.selectedTypeUri,"onPod-os:term-selected":e=>this.onTermSelected(e)}),t("label",{key:"a45199618751e24b7d4a1bc13ad85c599cc93d1c",htmlFor:"name"},"Name"),t("input",{key:"bee3be7a680abbffc08caa5c549b68b1e653872d",id:"name",type:"text",value:this.name,onInput:e=>this.handleChange(e)}),this.newUri?t("div",{id:"new-uri",title:"This will be the URI of the new thing"},this.newUri):null,t("input",{key:"e8fab4d442188f7f2f325ff7bde3dce6d3f772f6",id:"create",type:"submit",value:"Create",disabled:!this.canSubmit}))}handleChange(e){this.name=e.target.value,this.newUri=this.os.proposeUriForNewThing(this.referenceUri,this.name)}onTermSelected(e){this.selectedTypeUri=e.detail.uri}async handleSubmit(e){try{await this.os.addNewThing(this.newUri,this.name,this.selectedTypeUri),this.linkEmitter.emit(this.newUri),this.reset()}catch(t){e.preventDefault(),this.errorEmitter.emit(t)}}reset(){this.name="",this.newUri="",this.selectedTypeUri=""}static get delegatesFocus(){return!0}static get watchers(){return{name:[{validate:0}],selectedTypeUri:[{validate:0}]}}};Xi.style=":host{display:block}form{display:grid;grid-template-columns:var(--size-16) 1fr;grid-gap:var(--scale-0)}label{grid-column:1 / 2;display:flex;align-items:center;justify-content:flex-end}input,pos-select-term,button{grid-column:2 / 3}input,pos-select-term::part(input){outline:var(--pos-input-outline);padding:var(--scale-000);border:none;border-radius:var(--radius-xs);width:var(--size-full);box-sizing:border-box;background:var(--pos-input-background-color);color:var(--pos-normal-text-color)}input:focus-within,pos-select-term::part(input):focus-within{outline:var(--pos-input-focus-outline)}#new-uri{grid-column:1/3;cursor:default;word-break:break-all;color:var(--pos-normal-text-color);font-weight:var(--weight-light);background:var(--pos-disabled-color);padding:var(--scale-000);border-radius:var(--radius-xs)}input#create{outline:none;box-shadow:var(--shadow-sm);cursor:pointer;color:var(--pos-primary-text-color);background-color:var(--pos-primary-color)}input#create:disabled{cursor:default;color:var(--pos-disabled-text-color);background-color:var(--pos-disabled-color);box-shadow:none}input#create:hover:not(:disabled),input#create:focus{filter:brightness(110%);box-shadow:var(--shadow-md)}";const Yi=class{constructor(t){e(this,t),this.subscribeResource=r(this,"pod-os:resource",7),this.blurredBackground=!1,this.noUpload=!1,this.isUploading=!1,this.receiveResource=e=>{this.resource=e},this.enterUploadMode=()=>{this.isUploading=!0},this.exitUploadMode=()=>{this.isUploading=!1}}async componentWillLoad(){$(this),this.os=await W(this.el)}renderUpload(){return t("div",{class:"upload-container"},t("button",{class:"close",onClick:()=>this.exitUploadMode()},t("sl-icon",{name:"x-circle"}),"Close upload"),t("pos-upload",{uploader:e=>this.os.uploadAndAddPicture(this.resource,e)}))}shouldShowUploadButton(){var e;return!0===(null===(e=this.resource)||void 0===e?void 0:e.editable)&&!this.noUpload}renderUploadButton(){return this.shouldShowUploadButton()?t("button",{class:"add",onClick:this.enterUploadMode},t("sl-icon",{name:"cloud-plus"}),"Upload picture"):null}renderPicture(){var e;const i=null===(e=this.resource)||void 0===e?void 0:e.picture();return i?[t("pos-image",{blurredBackground:this.blurredBackground,src:i.url,alt:this.resource.label()}),this.renderUploadButton()]:t("div",{class:"no-picture"},t("slot",null),this.renderUploadButton())}render(){return this.isUploading?this.renderUpload():this.renderPicture()}get el(){return o(this)}};Yi.style=":host{--width:300px;--height:300px;--border-radius:var(--border-radius, 0);--object-fit:var(--object-fit, cover);display:block;position:relative}button.add{display:none;align-items:center;gap:var(--size-1);padding:var(--size-1);position:absolute;bottom:var(--size-2);right:var(--size-2);z-index:var(--layer-top)}:host(:hover) button.add{display:flex}@media (pointer: coarse){button.add{display:flex}}.no-picture{display:flex;flex-direction:column;align-items:center;justify-content:center;min-height:var(--height);width:var(--width);position:relative}.no-picture button.add{position:static;margin-top:var(--size-2);display:flex}.upload-container{display:flex;flex-direction:column;gap:var(--size-2);padding:var(--size-2);button.close{display:flex;align-items:center;gap:var(--size-1);padding:var(--size-1)}}";const Zi=class{constructor(t){e(this,t),this.expanded=!1}render(){return this.expanded?t("div",{class:"container"},t("a",{href:this.uri},this.uri),t("sl-tooltip",{content:"Collapse URI"},t("button",{"aria-label":`collapse URI to ${this.label}`,onClick:()=>this.expanded=!1},t("sl-icon",{name:"arrow-left-circle"})))):t("sl-tooltip",{content:`${this.uri}`},t("button",{onClick:()=>this.expanded=!0},this.label))}};Zi.style=":host{--text-color:var(--pos-primary-color);font-family:var(--font-sans)}button{line-height:var(--scale-0);font-family:inherit;margin:0;padding:0;display:flex;background:none;border:none;cursor:pointer}button,a{color:var(--text-color);font-weight:var(--weight-light);line-height:var(--scale-0);font-size:var(--scale-0);font-family:inherit}.container{display:flex;gap:var(--size-1);flex-direction:row;align-items:center;line-height:var(--scale-0)}";const Qi=class{constructor(t){e(this,t),this.subscribePodOs=r(this,"pod-os:init",7),this.resourceLoadedEmitter=r(this,"pod-os:resource-loaded",7),this.consumers=[],this.lazy=!1,this.loading=!0,this.receivePodOs=async e=>{this.os=e}}componentWillLoad(){x.onChange("isLoggedIn",(()=>this.loadResource())),j(this)}async provideResource(e){e.stopPropagation(),this.resource&&e.detail(this.resource),this.consumers.push(e)}async loadResource(){await this.getResource(!this.lazy)}async fetch(){await this.getResource(!0)}async getResource(e=!1){try{e&&(this.loading=!0,await this.os.fetch(this.uri),this.resourceLoadedEmitter.emit(this.uri)),this.resource=this.os.store.get(this.uri),this.error=null,this.consumers.forEach((e=>{e.detail(this.resource)}))}catch(e){this.error=e}finally{this.loading=!1}}render(){return this.loading?t("sl-progress-bar",{indeterminate:!0}):this.error?t("details",{class:"error"},t("summary",{title:"Click to expand"},"⚠ Sorry, something went wrong"),t("p",null,"Status:",this.error.status),t("p",null,this.error.message),t("p",null,"You can try to open the link outside PodOS: ",t("a",{href:this.uri},this.uri))):t("slot",null)}static get watchers(){return{os:[{loadResource:0}],uri:[{loadResource:0}]}}};Qi.style="details.error{margin:var(--size-2);background-color:var(--pos-error-background-color);border:var(--size-px) solid var(--pos-error-border-color);padding:var(--size-2);border-radius:var(--radius-md);a{color:var(--pos-normal-text-color)}}sl-progress-bar{--height:var(--size-1)}";const er=class{constructor(t){e(this,t),this.linkEmitter=r(this,"pod-os:link",7),this.subscribeResource=r(this,"pod-os:resource",7),this.errorEmitter=r(this,"pod-os:error",7),this.followPredicate=!1,this.error=null,this.showCustomContent=!1,this.receiveResource=e=>{const t=(e,t,i,r)=>{0==e.length?(this.error="No matching link found",this.errorEmitter.emit(new Error(`pos-rich-link: No matching link found from ${t.uri} ${r}=${i}`))):e[0].uris.length>1?(this.error="More than one matching link found",this.errorEmitter.emit(new Error(`pos-rich-link: More than one matching link found from ${t.uri} ${r}=${i}`))):(this.link=e[0].uris[0],this.followPredicate=!0)};this.rel?t(e.relations(this.rel),e,this.rel,"rel"):this.rev?t(e.reverseRelations(this.rev),e,this.rev,"rev"):this.link=e.uri}}componentWillLoad(){this.showCustomContent=!!this.host.lastElementChild||""!=this.host.textContent.trim(),this.uri||$(this)}render(){const e=e=>this.showCustomContent?t("a",{href:e,onClick:t=>{t.preventDefault(),this.linkEmitter.emit(e)}},t("slot",null)):t("p",{class:"content"},t("a",{href:e,onClick:t=>{t.preventDefault(),this.linkEmitter.emit(e)}},t("pos-label",null)),t("span",{class:"url"},new URL(e).host),t("pos-description",null));return this.error?this.error:this.followPredicate?t("pos-resource",{lazy:!0,uri:this.link},e(this.link)):this.link?e(this.link):this.uri?t("pos-resource",{lazy:!0,uri:this.uri},e(this.uri)):null}get host(){return o(this)}};er.style=":host{--background-color:inherit;--label-color:var(--pos-normal-text-color);--description-color:var(--pos-normal-text-color);--uri-color:var(--pos-subtle-text-color);--font-family:var(--font-sans)}p.content{background-color:var(--background-color);line-height:var(--line-xs);margin:0;display:flex;flex-direction:column;align-items:baseline;gap:var(--size-1);.url{font-size:var(--scale-fluid-1);color:var(--pos-subtle-text-color)}}a{color:var(--label-color);max-width:min(100%, var(--prose-lg));text-decoration:underline;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;text-decoration-thickness:var(--size-px)}pos-label{color:var(--label-color);font-size:var(--scale-fluid-2);margin-bottom:var(--size-1)}pos-description{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;text-overflow:ellipsis;overflow:hidden;font-weight:var(--weight-light);color:var(--description-color);font-size:var(--scale-fluid-2)}@media (min-width: 640px){pos-label{font-size:var(--scale-fluid-0)}pos-description{font-size:var(--scale-fluid-1)}p.content{.url{font-size:var(--scale-fluid-000)}}}";const tr=e=>!("isConnected"in e)||e.isConnected,ir=(()=>{let e;return(...t)=>{e&&clearTimeout(e),e=setTimeout((()=>{e=0,(e=>{for(let t of e.keys())e.set(t,e.get(t).filter(tr))})(...t)}),2e3)}})(),rr=(e,t)=>{if("string"==typeof t){if(t===e)return{}}else if("function"==typeof t){const i=t(e);if(i)return!0===i?{}:{...i}}else{const i=t.exec(e);if(i)return t.lastIndex=0,{...i}}},or=e=>e.pathname.toLowerCase(),sr=(()=>{const e=window,t=new URL(e.location.href),i=or,{state:r,onChange:o,dispose:n}=((e,t)=>{const i=((e,t=(e,t)=>e!==t)=>{let i=new Map(Object.entries(null!=e?e:{}));const r={dispose:[],get:[],set:[],reset:[]},o=()=>{i=new Map(Object.entries(null!=e?e:{})),r.reset.forEach((e=>e()))},s=e=>(r.get.forEach((t=>t(e))),i.get(e)),a=(e,o)=>{const s=i.get(e);t(o,s,e)&&(i.set(e,o),r.set.forEach((t=>t(e,o,s))))},n="undefined"==typeof Proxy?{}:new Proxy(e,{get:(e,t)=>s(t),ownKeys:()=>Array.from(i.keys()),getOwnPropertyDescriptor:()=>({enumerable:!0,configurable:!0}),has:(e,t)=>i.has(t),set:(e,t,i)=>(a(t,i),!0)}),l=(e,t)=>(r[e].push(t),()=>{((e,t)=>{const i=e.indexOf(t);i>=0&&(e[i]=e[e.length-1],e.length--)})(r[e],t)});return{state:n,get:s,set:a,on:l,onChange:(t,i)=>{const r=l("set",((e,r)=>{e===t&&i(r)})),o=l("reset",(()=>i(e[t])));return()=>{r(),o()}},use:(...e)=>{const t=e.reduce(((e,t)=>(t.set&&e.push(l("set",t.set)),t.get&&e.push(l("get",t.get)),t.reset&&e.push(l("reset",t.reset)),t.dispose&&e.push(l("dispose",t.dispose)),e)),[]);return()=>t.forEach((e=>e()))},dispose:()=>{r.dispose.forEach((e=>e())),o()},reset:o,forceUpdate:e=>{const t=i.get(e);r.set.forEach((i=>i(e,t,t)))}}})(e,t);return i.use((()=>{if("function"!=typeof s)return{};const e=new Map;return{dispose:()=>e.clear(),get:t=>{const i=s();i&&((e,t,i)=>{const r=e.get(t);r?r.includes(i)||r.push(i):e.set(t,[i])})(e,t,i)},set:t=>{const i=e.get(t);i&&e.set(t,i.filter(a)),ir(e)},reset:()=>{e.forEach((e=>e.forEach(a))),ir(e)}}})()),i})({url:t,activePath:i(t)},((e,t,i)=>"url"===i?e.href!==t.href:e!==t)),l=e=>{history.pushState(null,null,e);const t=new URL(e,document.baseURI);r.url=t,r.activePath=i(t)},d=e=>{const{activePath:t}=r;for(let i of e){const r=rr(t,i.path);if(r){if(null!=i.to){const r="string"==typeof i.to?i.to:i.to(t);return l(r),d(e)}return{params:r,route:i}}}},p=()=>{const t=new URL(e.location.href);r.url=t,r.activePath=i(t)},h={Switch:(e,t)=>{const i=d(t);if(i)return"function"==typeof i.route.jsx?i.route.jsx(i.params):i.route.jsx},get url(){return r.url},get activePath(){return r.activePath},push:l,onChange:o,dispose:()=>{e.removeEventListener("popstate",p),n()}};return p(),e.addEventListener("popstate",p),h})(),ar=class{constructor(t){e(this,t),this.routeChanged=r(this,"pod-os:route-changed",7),this.mode="standalone"}linkClicked(e){this.navigate(e.detail)}sessionRestored(e){sr.push(e.detail.url)}componentWillLoad(){this.updateUri(),sr.onChange("url",(()=>{this.updateUri()}))}navigate(e){sr.push("?uri="+encodeURIComponent(e))}updateUri(){this.uri=new URLSearchParams(window.location.search).get("uri")||("standalone"===this.mode?"pod-os:dashboard":window.location.href),this.routeChanged.emit(this.uri)}render(){return t("slot",{key:"c092d822705ddca00018c6850358412be5f0aef0"})}};ar.style=".toolbar{display:flex;flex-direction:row;gap:0;align-items:center;margin-left:0.5rem}pos-navigation{flex-grow:1}";const nr=class{constructor(t){e(this,t),this.subscribePodOs=r(this,"pod-os:init",7),this.termSelected=r(this,"pod-os:term-selected",7),this.placeholder="Type to search...",this.value="",this.terms=[],this.receivePodOs=async e=>{this.os=e}}componentWillLoad(){j(this)}setTerms(){this.terms=this.os.listKnownTerms()}handleChange(e){this.termSelected.emit({uri:e.target.value})}render(){return t(i,{key:"6a2e97c7b3c21cbcb7e64af30f133b7f721a589f"},t("input",{key:"57bdfec32da3713362fcaf49f25b98184fed03f8",part:"input",list:"terms",placeholder:this.placeholder,value:this.value,onChange:e=>this.handleChange(e)}),t("datalist",{key:"8d92be9bbb91323a8fef79c542f92de72e9d1829",part:"terms",id:"terms"},this.terms.map((e=>t("option",{value:e.uri},e.shorthand)))))}static get delegatesFocus(){return!0}static get watchers(){return{os:[{setTerms:0}]}}};nr.style=":host{display:block}input{background-color:transparent;color:var(--pos-normal-text-color);border:none;padding-top:1rem;padding-bottom:1rem}input:focus{outline:none}";const lr=class{constructor(t){e(this,t)}render(){return t(i,{key:"7417274658af9e41cf662b9ab20d4b5a6236586f"},t("div",{key:"e92a78a1d2b1d067ffd10a68d78a386208d629d8"},t("h2",{key:"7be5f2cf380363e824519fc24fd1e07f0651334b"},t("svg",{key:"d2aa35c987e12836cf665b2574ae0c42a1574e97",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor"},t("path",{key:"562e3432799cb8111e543080722b6f20867f4b46","stroke-linecap":"round","stroke-linejoin":"round",d:"M20.25 6.375c0 2.278-3.694 4.125-8.25 4.125S3.75 8.653 3.75 6.375m16.5 0c0-2.278-3.694-4.125-8.25-4.125S3.75 4.097 3.75 6.375m16.5 0v11.25c0 2.278-3.694 4.125-8.25 4.125s-8.25-1.847-8.25-4.125V6.375m16.5 0v3.75m-16.5-3.75v3.75m16.5 0v3.75C20.25 16.153 16.556 18 12 18s-8.25-1.847-8.25-4.125v-3.75m16.5 0c0 2.278-3.694 4.125-8.25 4.125s-8.25-1.847-8.25-4.125"})),"Cache Settings"),t("p",{key:"002eed9e13146d25cc9e52a68c8d9e030f1dd775",class:"info"},"ℹ Enable offline cache to be able to access previously loaded data while offline."),t("p",{key:"b5a1f45ed9fec335a43ecbb6573a31ed29e0692e",class:"warn"},"⚠ Private data may be stored on this device. Only enable it, if you trust this device."),t("label",{key:"49ab529db0b9d1bd4f216f6c54e78ed30a43be41"},t("input",{key:"e764d1a106906059c7c5286d13b9b8c7a6c01cce",type:"checkbox",checked:V.state.offlineCache,onChange:e=>V.state.offlineCache=e.target.checked}),"Enable offline cache")))}};lr.style=":host{border:var(--size-px) solid var(--pos-border-color);border-radius:var(--radius-lg);box-shadow:var(--shadow-md);padding:var(--size-8);max-width:var(--size-96);background:var(--pos-card-background)}svg{width:var(--size-8)}h2{display:flex;align-items:center}p{padding:var(--size-2)}.info{color:var(--color-grey-900);background-color:var(--color-blue-200)}.warn{color:var(--color-grey-900);background-color:var(--color-yellow-200)}";var dr=n`
|
|
729
|
+
`}};Hi.styles=[p,Fi],Hi.dependencies={"sl-icon":m,"sl-popup":M,"sl-spinner":Li},h([z("slot:not([name])")],Hi.prototype,"defaultSlot",2),h([z(".menu-item")],Hi.prototype,"menuItem",2),h([c()],Hi.prototype,"type",2),h([c({type:Boolean,reflect:!0})],Hi.prototype,"checked",2),h([c()],Hi.prototype,"value",2),h([c({type:Boolean,reflect:!0})],Hi.prototype,"loading",2),h([c({type:Boolean,reflect:!0})],Hi.prototype,"disabled",2),h([y("checked")],Hi.prototype,"handleCheckedChange",1),h([y("disabled")],Hi.prototype,"handleDisabledChange",1),h([y("type")],Hi.prototype,"handleTypeChange",1),Hi.define("sl-menu-item");const Vi=class{constructor(t){e(this,t),this.subscribePodOs=r(this,"pod-os:init",7),this.errorEmitter=r(this,"pod-os:error",7),this.indexUpdatedEmitter=r(this,"pod-os:search:index-updated",7),this.indexCreatedEmitter=r(this,"pod-os:search:index-created",7),this.indexes=[],this.showOptions=!1,this.isIndexed=!1,this.receivePodOs=async e=>{this.os=e,this.thing=this.os.store.get(this.uri),this.getLabelIndexes(x.state.profile),this.unsubscribeSessionChange=x.onChange("profile",(e=>{this.getLabelIndexes(e)}))}}componentWillLoad(){j(this)}disconnectedCallback(){this.unsubscribeSessionChange&&this.unsubscribeSessionChange()}updateUri(e){this.thing=this.os.store.get(e),this.isIndexed=this.checkIfIndexed(e)}checkIfIndexed(e){return this.indexes.some((t=>t.contains(e)))}getLabelIndexes(e){e&&(this.indexes=e.getPrivateLabelIndexes().map((e=>this.os.store.get(e).assume(I))),this.showOptions=this.indexes.length>1,this.isIndexed=this.checkIfIndexed(this.uri))}async onClick(e){if(e.preventDefault(),1===this.indexes.length){const e=this.indexes[0];await this.addToLabelIndex(e),this.indexUpdatedEmitter.emit(e)}else if(0===this.indexes.length){const e=await this.createDefaultLabelIndex();await this.addToLabelIndex(e),this.indexCreatedEmitter.emit(e)}}async addToLabelIndex(e){try{await this.os.addToLabelIndex(this.thing,e),this.isIndexed=!0}catch(e){this.errorEmitter.emit(e)}}async createDefaultLabelIndex(){try{return await this.os.createDefaultLabelIndex(x.state.profile)}catch(e){this.errorEmitter.emit(e)}}render(){if(!x.state.isLoggedIn||!this.uri)return null;const e="Make this findable",r=t("button",{type:"button",slot:"trigger","aria-label":e,class:{main:!0,success:this.isIndexed},onClick:e=>this.onClick(e),title:""},t(this.isIndexed?Ki:Ji,null),t("p",null,e));return this.showOptions?t(i,null,t("sl-dropdown",null,r,t("sl-menu",{role:"listbox"},this.indexes.map((e=>t("sl-menu-item",{role:"option",value:e,type:"checkbox",checked:e.contains(this.uri)},t("pos-resource",{uri:e.uri,lazy:!0},t("pos-label",null)))))))):r}async onSelect(e){const t=e.detail.item.value;e.preventDefault(),await this.addToLabelIndex(t),this.indexUpdatedEmitter.emit(t)}get el(){return o(this)}static get watchers(){return{uri:[{updateUri:0}]}}},Ji=()=>t("svg",{role:"presentation",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor"},t("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M19.5 14.25v-2.625a3.375 3.375 0 0 0-3.375-3.375h-1.5A1.125 1.125 0 0 1 13.5 7.125v-1.5a3.375 3.375 0 0 0-3.375-3.375H8.25m5.231 13.481L15 17.25m-4.5-15H5.625c-.621 0-1.125.504-1.125 1.125v16.5c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 0 0-9-9Zm3.75 11.625a2.625 2.625 0 1 1-5.25 0 2.625 2.625 0 0 1 5.25 0Z"})),Ki=()=>t("svg",{role:"presentation",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor"},t("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M10.125 2.25h-4.5c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125v-9M10.125 2.25h.375a9 9 0 0 1 9 9v.375M10.125 2.25A3.375 3.375 0 0 1 13.5 5.625v1.5c0 .621.504 1.125 1.125 1.125h1.5a3.375 3.375 0 0 1 3.375 3.375M9 15l2.25 2.25L15 12"}));Vi.style="button.main{display:flex;transition:width 200ms, background-color 500ms, color 500ms, border-color 500ms;max-width:var(--size-40);flex-direction:row;overflow:hidden;height:var(--pos-navigation-bar-height);width:var(--pos-navigation-bar-height);align-items:center;justify-content:center;border-radius:var(--radius-md);color:var(--pos-subtle-text-color);border:var(--size-px) dashed var(--pos-subtle-text-color);background-color:var(--pos-background-color);p{padding:0;margin:0;display:none;white-space:nowrap}&.success{color:var(--color-green-700);border-color:var(--color-green-700);border-style:solid;background-color:var(--color-green-100)}&:active{transform:scale(0.99);filter:brightness(90%)}&:focus{outline:var(--pos-input-focus-outline)}}svg{display:inline-block;height:var(--size-6);flex-shrink:0;flex-grow:0;width:var(--size-6)}button.main:hover,sl-dropdown[open] button{width:var(--size-full);height:var(--pos-navigation-bar-height);background:var(--pos-background-color);color:var(--pos-normal-text-color);&.success{background:var(--color-green-200);color:var(--color-green-700)}p{display:inline-block}}";const qi=class{constructor(t){e(this,t),this.subscribePodOs=r(this,"pod-os:init",7),this.linkEmitter=r(this,"pod-os:link",7),this.uri="",this.inputValue=this.uri,this.searchIndex=void 0,this.suggestions=[],this.selectedIndex=-1,this.resource=null,this.changeEvents=new B.Subject,this.debouncedSearch=null,this.receivePodOs=async e=>{this.os=e}}updateResource(){var e;try{this.resource=this.uri?null===(e=this.os)||void 0===e?void 0:e.store.get(this.uri):null}catch(e){this.resource=null}}componentWillLoad(){j(this),this.updateResource(),x.onChange("isLoggedIn",(async e=>{e?await this.buildSearchIndex():this.clearSearchIndex()})),this.debouncedSearch=this.changeEvents.pipe(B.debounceTime(300)).subscribe((()=>this.search()))}disconnectedCallback(){var e;null===(e=this.debouncedSearch)||void 0===e||e.unsubscribe()}async buildSearchIndex(){this.searchIndex=await this.os.buildSearchIndex(x.state.profile)}rebuildSearchIndex(){this.searchIndex.rebuild()}openNavigationDialog(e){var t,i;this.resource=e.detail,e.detail&&(this.inputValue=e.detail.uri,this.search()),null===(t=this.inputRef)||void 0===t||t.select(),null===(i=this.dialogRef)||void 0===i||i.show()}clearSearchIndex(){var e;null===(e=this.searchIndex)||void 0===e||e.clear()}onChange(e){this.inputValue=e.target.value,this.changeEvents.next()}closeDialog(){var e;null===(e=this.dialogRef)||void 0===e||e.close(),this.selectedIndex=-1}clearSuggestions(){var e;this.suggestions=[],null===(e=this.dialogRef)||void 0===e||e.close(),this.selectedIndex=-1}onClickSelf(e){e.stopPropagation()}handleKeyDown(e){"Escape"===e.key?this.closeDialog():"ArrowDown"===e.key?(e.preventDefault(),this.selectedIndex=Math.min(this.selectedIndex+1,this.suggestions.length-1)):"ArrowUp"===e.key&&(e.preventDefault(),this.selectedIndex=Math.max(this.selectedIndex-1,0))}search(){this.searchIndex&&(this.suggestions=this.inputValue?this.searchIndex.search(this.inputValue):[])}onSubmit(){this.linkEmitter.emit(this.suggestions&&this.selectedIndex>-1?this.suggestions[this.selectedIndex].ref:this.inputValue)}render(){return t("nav",{key:"44f504f9a905c6e63353741cda554a6a35a46f82"},t("search",{key:"98e7cae9729db2959d992f9e41a4cc99064b9eb0"},t("pos-navigation-bar",{key:"c0ce90fcc8334d0ea784ca3126a1524b036631ac",searchIndexReady:void 0!==this.searchIndex,current:this.resource}),t("dialog",{key:"a9b1418ad48ae298fbd8eaa56e62eb613e8deef6",ref:e=>this.dialogRef=e},t("form",{key:"a75933116bd844e0afc4e94eee713adb6d6bb4ea",method:"dialog",onSubmit:()=>this.onSubmit()},t("input",{key:"c6de46f82392acf3752e51e64dc6e5526f8d6a04",ref:e=>this.inputRef=e,enterkeyhint:"search","aria-label":"Search or enter URI",placeholder:"Search or enter URI",value:this.uri,onChange:e=>this.onChange(e),onInput:e=>this.onChange(e),role:"combobox","aria-autocomplete":"list","aria-expanded":this.suggestions.length>0,"aria-controls":"suggestions-list","aria-activedescendant":this.selectedIndex>=0?`option-${this.selectedIndex}`:null}),this.suggestions.length>0?t("div",{class:"suggestions"},t("ol",{id:"suggestions-list",role:"listbox","aria-label":"Search results"},this.suggestions.map(((e,i)=>t("li",{id:`option-${i}`,role:"option","aria-selected":i===this.selectedIndex?"true":"false"},t("pos-rich-link",{uri:e.ref})))))):null))))}static get watchers(){return{uri:[{updateResource:0}],os:[{updateResource:0}]}}};qi.style=":host{--pos-navigation-bar-height:var(--size-10)}search{position:relative}.suggestions ol{border:1px solid var(--pos-border-color);display:flex;flex-direction:column;margin:0;padding:0;list-style-type:none}.suggestions{width:100%;overflow-y:auto;max-height:90dvh;li{padding:1rem;background-color:var(--pos-background-color);pos-rich-link{--background-color:inherit}&[aria-selected='true']{background-color:var(--pos-primary-color);&:hover{background-color:var(--pos-primary-color)}}&:hover{background-color:var(--pos-border-color)}}}.suggestions li.selected pos-rich-link{--label-color:white;--description-color:var(--pos-border-color);--uri-color:var(--pos-subtle-text-color)}dialog{position:absolute;margin-top:calc(-1 * var(--pos-navigation-bar-height));padding:0;width:100%;max-width:100%;min-width:100%;overflow:hidden;max-height:100dvh;background-color:var(--pos-background-color);color:var(--pos-normal-text-color);border:var(--pos-border-color);border-radius:var(--radius-md);box-shadow:var(--shadow-md);form{display:flex;flex-direction:column;height:100%;width:100%;align-items:center;input{display:flex;font-size:var(--scale-1);height:var(--pos-navigation-bar-height);border-top-left-radius:var(--radius-md);border-top-right-radius:var(--radius-md);padding-left:var(--size-2);width:100%;border:none;outline:none;color:var(--pos-normal-text-color);background-color:var(--pos-input-background-color);box-sizing:border-box}}}dialog[open]{display:flex;z-index:var(--layer-top);animation:slideIn 100ms ease-out}@media (max-width: 640px){search{position:unset}dialog{margin-top:var(--size-1);top:0;width:95dvw;max-width:unset;min-width:unset;form{input{height:var(--size-12);font-size:var(--scale-fluid-3)}}}}@keyframes fadeIn{from{opacity:0}to{opacity:1}}";const Gi=class{constructor(t){e(this,t),this.navigate=r(this,"pod-os:navigate",7)}onClick(){this.navigate.emit(this.current)}activate(e){(e.ctrlKey||e.metaKey)&&"k"===e.key&&(e.preventDefault(),this.navigate.emit(this.current))}render(){const e=this.current?`${this.current.label()} (Click to search or enter URI)`:"Search or enter URI";return t("section",{key:"a66626042ab42e63094b7b27729f0c299d6e62a3",class:"current"},this.current&&this.searchIndexReady&&t("pos-make-findable",{key:"4e2e2e3271c4ed78c34e32e0a815a87dd9d73b52",uri:this.current.uri}),t("button",{key:"5ff874354f32f9fef4b15337ce7230c43df0c0ca","aria-label":e,onClick:()=>this.onClick()},t("div",{key:"d00d82f397fb9f3ede61484d6cc2ae74ef92fd06"},this.current?this.current.label():"Search or enter URI"),this.icon()),this.current&&t("pos-share",{key:"a86d78b83dedc4f7cc77170f96c973fe21ded57d",uri:this.current.uri}))}icon(){return t("svg",{"aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor"},t("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"m21 21-5.197-5.197m0 0A7.5 7.5 0 1 0 5.196 5.196a7.5 7.5 0 0 0 10.607 10.607Z"}))}};Gi.style="section.current{display:flex;align-items:center;box-sizing:border-box;padding:0 var(--size-2) 0 0;height:var(--pos-navigation-bar-height);flex-grow:1;gap:0;background-color:var(--pos-input-background-color);border-radius:var(--radius-md);width:100%;&:focus-within{outline:var(--pos-input-focus-outline)}button{cursor:pointer;font-size:var(--scale-1);display:flex;align-items:center;justify-content:center;flex-grow:1;background:none;color:var(--pos-normal-text-color);outline:none;border:none;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;&:focus{text-decoration:underline}:first-child{flex-grow:1}svg{width:var(--size-6);color:var(--pos-subtle-text-color)}}pos-share{height:80%;&:hover{&::part(button){color:var(--pos-primary-color);background-color:var(--pos-border-color);border-radius:var(--radius-full)}}&::part(button){font-size:var(--size-4);background:none;outline:none;border:none;color:var(--pos-subtle-text-color)}}}";const Xi=class{constructor(t){e(this,t),this.linkEmitter=r(this,"pod-os:link",7),this.errorEmitter=r(this,"pod-os:error",7),this.subscribePodOs=r(this,"pod-os:init",7),this.canSubmit=!1,this.receivePodOs=async e=>{this.os=e}}validate(){this.canSubmit=Boolean(this.name&&this.selectedTypeUri)}componentWillLoad(){j(this)}render(){return t("form",{key:"4926181b537caafb59e07a22a1ad57b321d85db7",method:"dialog",onSubmit:e=>this.handleSubmit(e)},t("label",{key:"a1a22fe893a3b963c93d8963345b266987fd2f4b",htmlFor:"type"},"Type"),t("pos-select-term",{key:"549dd0e431534ba1320049ef47bdb2e2efd2d49e",id:"type",placeholder:"",value:this.selectedTypeUri,"onPod-os:term-selected":e=>this.onTermSelected(e)}),t("label",{key:"5cf8edca5189307fdd2adc2c0035115b51a0b2fd",htmlFor:"name"},"Name"),t("input",{key:"ea4d4c78016cda1c546fd6aa3addfdedd453c1e2",id:"name",type:"text",value:this.name,onInput:e=>this.handleChange(e)}),this.newUri?t("div",{id:"new-uri",title:"This will be the URI of the new thing"},this.newUri):null,t("input",{key:"95da60988cc9ef920add0bd1d5531d234a92372e",id:"create",type:"submit",value:"Create",disabled:!this.canSubmit}))}handleChange(e){this.name=e.target.value,this.newUri=this.os.proposeUriForNewThing(this.referenceUri,this.name)}onTermSelected(e){this.selectedTypeUri=e.detail.uri}async handleSubmit(e){try{await this.os.addNewThing(this.newUri,this.name,this.selectedTypeUri),this.linkEmitter.emit(this.newUri),this.reset()}catch(t){e.preventDefault(),this.errorEmitter.emit(t)}}reset(){this.name="",this.newUri="",this.selectedTypeUri=""}static get delegatesFocus(){return!0}static get watchers(){return{name:[{validate:0}],selectedTypeUri:[{validate:0}]}}};Xi.style=":host{display:block}form{display:grid;grid-template-columns:var(--size-16) 1fr;grid-gap:var(--scale-0)}label{grid-column:1 / 2;display:flex;align-items:center;justify-content:flex-end}input,pos-select-term,button{grid-column:2 / 3}input,pos-select-term::part(input){outline:var(--pos-input-outline);padding:var(--scale-000);border:none;border-radius:var(--radius-xs);width:var(--size-full);box-sizing:border-box;background:var(--pos-input-background-color);color:var(--pos-normal-text-color)}input:focus-within,pos-select-term::part(input):focus-within{outline:var(--pos-input-focus-outline)}#new-uri{grid-column:1/3;cursor:default;word-break:break-all;color:var(--pos-normal-text-color);font-weight:var(--weight-light);background:var(--pos-disabled-color);padding:var(--scale-000);border-radius:var(--radius-xs)}input#create{outline:none;box-shadow:var(--shadow-sm);cursor:pointer;color:var(--pos-primary-text-color);background-color:var(--pos-primary-color)}input#create:disabled{cursor:default;color:var(--pos-disabled-text-color);background-color:var(--pos-disabled-color);box-shadow:none}input#create:hover:not(:disabled),input#create:focus{filter:brightness(110%);box-shadow:var(--shadow-md)}";const Yi=class{constructor(t){e(this,t),this.subscribeResource=r(this,"pod-os:resource",7),this.blurredBackground=!1,this.noUpload=!1,this.isUploading=!1,this.receiveResource=e=>{this.resource=e},this.enterUploadMode=()=>{this.isUploading=!0},this.exitUploadMode=()=>{this.isUploading=!1}}async componentWillLoad(){$(this),this.os=await W(this.el)}renderUpload(){return t("div",{class:"upload-container"},t("button",{class:"close",onClick:()=>this.exitUploadMode()},t("sl-icon",{name:"x-circle"}),"Close upload"),t("pos-upload",{uploader:e=>this.os.uploadAndAddPicture(this.resource,e)}))}shouldShowUploadButton(){var e;return!0===(null===(e=this.resource)||void 0===e?void 0:e.editable)&&!this.noUpload}renderUploadButton(){return this.shouldShowUploadButton()?t("button",{class:"add",onClick:this.enterUploadMode},t("sl-icon",{name:"cloud-plus"}),"Upload picture"):null}renderPicture(){var e;const i=null===(e=this.resource)||void 0===e?void 0:e.picture();return i?[t("pos-image",{blurredBackground:this.blurredBackground,src:i.url,alt:this.resource.label()}),this.renderUploadButton()]:t("div",{class:"no-picture"},t("slot",null),this.renderUploadButton())}render(){return this.isUploading?this.renderUpload():this.renderPicture()}get el(){return o(this)}};Yi.style=":host{--width:300px;--height:300px;--border-radius:var(--border-radius, 0);--object-fit:var(--object-fit, cover);display:block;position:relative}button.add{display:none;align-items:center;gap:var(--size-1);padding:var(--size-1);position:absolute;bottom:var(--size-2);right:var(--size-2);z-index:var(--layer-top)}:host(:hover) button.add{display:flex}@media (pointer: coarse){button.add{display:flex}}.no-picture{display:flex;flex-direction:column;align-items:center;justify-content:center;min-height:var(--height);width:var(--width);position:relative}.no-picture button.add{position:static;margin-top:var(--size-2);display:flex}.upload-container{display:flex;flex-direction:column;gap:var(--size-2);padding:var(--size-2);button.close{display:flex;align-items:center;gap:var(--size-1);padding:var(--size-1)}}";const Zi=class{constructor(t){e(this,t),this.expanded=!1}render(){return this.expanded?t("div",{class:"container"},t("a",{href:this.uri},this.uri),t("sl-tooltip",{content:"Collapse URI"},t("button",{"aria-label":`collapse URI to ${this.label}`,onClick:()=>this.expanded=!1},t("sl-icon",{name:"arrow-left-circle"})))):t("sl-tooltip",{content:`${this.uri}`},t("button",{onClick:()=>this.expanded=!0},this.label))}};Zi.style=":host{--text-color:var(--pos-primary-color);font-family:var(--font-sans)}button{line-height:var(--scale-0);font-family:inherit;margin:0;padding:0;display:flex;background:none;border:none;cursor:pointer}button,a{color:var(--text-color);font-weight:var(--weight-light);line-height:var(--scale-0);font-size:var(--scale-0);font-family:inherit}.container{display:flex;gap:var(--size-1);flex-direction:row;align-items:center;line-height:var(--scale-0)}";const Qi=class{constructor(t){e(this,t),this.subscribePodOs=r(this,"pod-os:init",7),this.resourceLoadedEmitter=r(this,"pod-os:resource-loaded",7),this.consumers=[],this.lazy=!1,this.loading=!0,this.receivePodOs=async e=>{this.os=e}}componentWillLoad(){x.onChange("isLoggedIn",(()=>this.loadResource())),j(this)}async provideResource(e){e.stopPropagation(),this.resource&&e.detail(this.resource),this.consumers.push(e)}async loadResource(){await this.getResource(!this.lazy)}async fetch(){await this.getResource(!0)}async getResource(e=!1){try{e&&(this.loading=!0,await this.os.fetch(this.uri),this.resourceLoadedEmitter.emit(this.uri)),this.resource=this.os.store.get(this.uri),this.error=null,this.consumers.forEach((e=>{e.detail(this.resource)}))}catch(e){this.error=e}finally{this.loading=!1}}render(){return this.loading?t("sl-progress-bar",{indeterminate:!0}):this.error?t("details",{class:"error"},t("summary",{title:"Click to expand"},"⚠ Sorry, something went wrong"),t("p",null,"Status:",this.error.status),t("p",null,this.error.message),t("p",null,"You can try to open the link outside PodOS: ",t("a",{href:this.uri},this.uri))):t("slot",null)}static get watchers(){return{os:[{loadResource:0}],uri:[{loadResource:0}]}}};Qi.style="details.error{margin:var(--size-2);background-color:var(--pos-error-background-color);border:var(--size-px) solid var(--pos-error-border-color);padding:var(--size-2);border-radius:var(--radius-md);a{color:var(--pos-normal-text-color)}}sl-progress-bar{--height:var(--size-1)}";const er=class{constructor(t){e(this,t),this.linkEmitter=r(this,"pod-os:link",7),this.subscribeResource=r(this,"pod-os:resource",7),this.errorEmitter=r(this,"pod-os:error",7),this.followPredicate=!1,this.error=null,this.showCustomContent=!1,this.receiveResource=e=>{const t=(e,t,i,r)=>{0==e.length?(this.error="No matching link found",this.errorEmitter.emit(new Error(`pos-rich-link: No matching link found from ${t.uri} ${r}=${i}`))):e[0].uris.length>1?(this.error="More than one matching link found",this.errorEmitter.emit(new Error(`pos-rich-link: More than one matching link found from ${t.uri} ${r}=${i}`))):(this.link=e[0].uris[0],this.followPredicate=!0)};this.rel?t(e.relations(this.rel),e,this.rel,"rel"):this.rev?t(e.reverseRelations(this.rev),e,this.rev,"rev"):this.link=e.uri}}componentWillLoad(){this.showCustomContent=!!this.host.lastElementChild||""!=this.host.textContent.trim(),this.uri||$(this)}render(){const e=e=>this.showCustomContent?t("a",{href:e,onClick:t=>{t.preventDefault(),this.linkEmitter.emit(e)}},t("slot",null)):t("p",{class:"content"},t("a",{href:e,onClick:t=>{t.preventDefault(),this.linkEmitter.emit(e)}},t("pos-label",null)),t("span",{class:"url"},new URL(e).host),t("pos-description",null));return this.error?this.error:this.followPredicate?t("pos-resource",{lazy:!0,uri:this.link},e(this.link)):this.link?e(this.link):this.uri?t("pos-resource",{lazy:!0,uri:this.uri},e(this.uri)):null}get host(){return o(this)}};er.style=":host{--background-color:inherit;--label-color:var(--pos-normal-text-color);--description-color:var(--pos-normal-text-color);--uri-color:var(--pos-subtle-text-color);--font-family:var(--font-sans)}p.content{background-color:var(--background-color);line-height:var(--line-xs);margin:0;display:flex;flex-direction:column;align-items:baseline;gap:var(--size-1);.url{font-size:var(--scale-fluid-1);color:var(--pos-subtle-text-color)}}a{color:var(--label-color);max-width:min(100%, var(--prose-lg));text-decoration:underline;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;text-decoration-thickness:var(--size-px)}pos-label{color:var(--label-color);font-size:var(--scale-fluid-2);margin-bottom:var(--size-1)}pos-description{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;text-overflow:ellipsis;overflow:hidden;font-weight:var(--weight-light);color:var(--description-color);font-size:var(--scale-fluid-2)}@media (min-width: 640px){pos-label{font-size:var(--scale-fluid-0)}pos-description{font-size:var(--scale-fluid-1)}p.content{.url{font-size:var(--scale-fluid-000)}}}";const tr=e=>!("isConnected"in e)||e.isConnected,ir=(()=>{let e;return(...t)=>{e&&clearTimeout(e),e=setTimeout((()=>{e=0,(e=>{for(let t of e.keys())e.set(t,e.get(t).filter(tr))})(...t)}),2e3)}})(),rr=(e,t)=>{if("string"==typeof t){if(t===e)return{}}else if("function"==typeof t){const i=t(e);if(i)return!0===i?{}:{...i}}else{const i=t.exec(e);if(i)return t.lastIndex=0,{...i}}},or=e=>e.pathname.toLowerCase(),sr=(()=>{const e=window,t=new URL(e.location.href),i=or,{state:r,onChange:o,dispose:n}=((e,t)=>{const i=((e,t=(e,t)=>e!==t)=>{let i=new Map(Object.entries(null!=e?e:{}));const r={dispose:[],get:[],set:[],reset:[]},o=()=>{i=new Map(Object.entries(null!=e?e:{})),r.reset.forEach((e=>e()))},s=e=>(r.get.forEach((t=>t(e))),i.get(e)),a=(e,o)=>{const s=i.get(e);t(o,s,e)&&(i.set(e,o),r.set.forEach((t=>t(e,o,s))))},n="undefined"==typeof Proxy?{}:new Proxy(e,{get:(e,t)=>s(t),ownKeys:()=>Array.from(i.keys()),getOwnPropertyDescriptor:()=>({enumerable:!0,configurable:!0}),has:(e,t)=>i.has(t),set:(e,t,i)=>(a(t,i),!0)}),l=(e,t)=>(r[e].push(t),()=>{((e,t)=>{const i=e.indexOf(t);i>=0&&(e[i]=e[e.length-1],e.length--)})(r[e],t)});return{state:n,get:s,set:a,on:l,onChange:(t,i)=>{const r=l("set",((e,r)=>{e===t&&i(r)})),o=l("reset",(()=>i(e[t])));return()=>{r(),o()}},use:(...e)=>{const t=e.reduce(((e,t)=>(t.set&&e.push(l("set",t.set)),t.get&&e.push(l("get",t.get)),t.reset&&e.push(l("reset",t.reset)),t.dispose&&e.push(l("dispose",t.dispose)),e)),[]);return()=>t.forEach((e=>e()))},dispose:()=>{r.dispose.forEach((e=>e())),o()},reset:o,forceUpdate:e=>{const t=i.get(e);r.set.forEach((i=>i(e,t,t)))}}})(e,t);return i.use((()=>{if("function"!=typeof s)return{};const e=new Map;return{dispose:()=>e.clear(),get:t=>{const i=s();i&&((e,t,i)=>{const r=e.get(t);r?r.includes(i)||r.push(i):e.set(t,[i])})(e,t,i)},set:t=>{const i=e.get(t);i&&e.set(t,i.filter(a)),ir(e)},reset:()=>{e.forEach((e=>e.forEach(a))),ir(e)}}})()),i})({url:t,activePath:i(t)},((e,t,i)=>"url"===i?e.href!==t.href:e!==t)),l=e=>{history.pushState(null,null,e);const t=new URL(e,document.baseURI);r.url=t,r.activePath=i(t)},d=e=>{const{activePath:t}=r;for(let i of e){const r=rr(t,i.path);if(r){if(null!=i.to){const r="string"==typeof i.to?i.to:i.to(t);return l(r),d(e)}return{params:r,route:i}}}},p=()=>{const t=new URL(e.location.href);r.url=t,r.activePath=i(t)},h={Switch:(e,t)=>{const i=d(t);if(i)return"function"==typeof i.route.jsx?i.route.jsx(i.params):i.route.jsx},get url(){return r.url},get activePath(){return r.activePath},push:l,onChange:o,dispose:()=>{e.removeEventListener("popstate",p),n()}};return p(),e.addEventListener("popstate",p),h})(),ar=class{constructor(t){e(this,t),this.routeChanged=r(this,"pod-os:route-changed",7),this.mode="standalone"}linkClicked(e){this.navigate(e.detail)}sessionRestored(e){sr.push(e.detail.url)}componentWillLoad(){this.updateUri(),sr.onChange("url",(()=>{this.updateUri()}))}navigate(e){sr.push("?uri="+encodeURIComponent(e))}updateUri(){this.uri=new URLSearchParams(window.location.search).get("uri")||("standalone"===this.mode?"pod-os:dashboard":window.location.href),this.routeChanged.emit(this.uri)}render(){return t("slot",{key:"7e0f0f4ff13b90a511272ca93fee4f954eebb5f4"})}};ar.style=".toolbar{display:flex;flex-direction:row;gap:0;align-items:center;margin-left:0.5rem}pos-navigation{flex-grow:1}";const nr=class{constructor(t){e(this,t),this.subscribePodOs=r(this,"pod-os:init",7),this.termSelected=r(this,"pod-os:term-selected",7),this.placeholder="Type to search...",this.value="",this.terms=[],this.receivePodOs=async e=>{this.os=e}}componentWillLoad(){j(this)}setTerms(){this.terms=this.os.listKnownTerms()}handleChange(e){this.termSelected.emit({uri:e.target.value})}render(){return t(i,{key:"2a4b6f065c03e62274de7a5c73c95e9539baea21"},t("input",{key:"724179b341841a39d37ebdb94c16c4c09b7673a9",part:"input",list:"terms",placeholder:this.placeholder,value:this.value,onChange:e=>this.handleChange(e)}),t("datalist",{key:"a8fb7b0ab70e4b4fcb92d6efab25341c37eeea3a",part:"terms",id:"terms"},this.terms.map((e=>t("option",{value:e.uri},e.shorthand)))))}static get delegatesFocus(){return!0}static get watchers(){return{os:[{setTerms:0}]}}};nr.style=":host{display:block}input{background-color:transparent;color:var(--pos-normal-text-color);border:none;padding-top:1rem;padding-bottom:1rem}input:focus{outline:none}";const lr=class{constructor(t){e(this,t)}render(){return t(i,{key:"7417274658af9e41cf662b9ab20d4b5a6236586f"},t("div",{key:"e92a78a1d2b1d067ffd10a68d78a386208d629d8"},t("h2",{key:"7be5f2cf380363e824519fc24fd1e07f0651334b"},t("svg",{key:"d2aa35c987e12836cf665b2574ae0c42a1574e97",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor"},t("path",{key:"562e3432799cb8111e543080722b6f20867f4b46","stroke-linecap":"round","stroke-linejoin":"round",d:"M20.25 6.375c0 2.278-3.694 4.125-8.25 4.125S3.75 8.653 3.75 6.375m16.5 0c0-2.278-3.694-4.125-8.25-4.125S3.75 4.097 3.75 6.375m16.5 0v11.25c0 2.278-3.694 4.125-8.25 4.125s-8.25-1.847-8.25-4.125V6.375m16.5 0v3.75m-16.5-3.75v3.75m16.5 0v3.75C20.25 16.153 16.556 18 12 18s-8.25-1.847-8.25-4.125v-3.75m16.5 0c0 2.278-3.694 4.125-8.25 4.125s-8.25-1.847-8.25-4.125"})),"Cache Settings"),t("p",{key:"002eed9e13146d25cc9e52a68c8d9e030f1dd775",class:"info"},"ℹ Enable offline cache to be able to access previously loaded data while offline."),t("p",{key:"b5a1f45ed9fec335a43ecbb6573a31ed29e0692e",class:"warn"},"⚠ Private data may be stored on this device. Only enable it, if you trust this device."),t("label",{key:"49ab529db0b9d1bd4f216f6c54e78ed30a43be41"},t("input",{key:"e764d1a106906059c7c5286d13b9b8c7a6c01cce",type:"checkbox",checked:V.state.offlineCache,onChange:e=>V.state.offlineCache=e.target.checked}),"Enable offline cache")))}};lr.style=":host{border:var(--size-px) solid var(--pos-border-color);border-radius:var(--radius-lg);box-shadow:var(--shadow-md);padding:var(--size-8);max-width:var(--size-96);background:var(--pos-card-background)}svg{width:var(--size-8)}h2{display:flex;align-items:center}p{padding:var(--size-2)}.info{color:var(--color-grey-900);background-color:var(--color-blue-200)}.warn{color:var(--color-grey-900);background-color:var(--color-yellow-200)}";var dr=n`
|
|
730
730
|
:host {
|
|
731
731
|
--color: var(--sl-panel-border-color);
|
|
732
732
|
--width: var(--sl-panel-border-width);
|
|
@@ -745,7 +745,7 @@ import{r as e,h as t,H as i,c as r,a as o,i as s,j as a}from"./p-spEUIGXI.js";im
|
|
|
745
745
|
border-left: solid var(--width) var(--color);
|
|
746
746
|
margin: 0 var(--spacing);
|
|
747
747
|
}
|
|
748
|
-
`,pr=class extends u{constructor(){super(...arguments),this.vertical=!1}connectedCallback(){super.connectedCallback(),this.setAttribute("role","separator")}handleVerticalChange(){this.setAttribute("aria-orientation",this.vertical?"vertical":"horizontal")}};pr.styles=[p,dr],h([c({type:Boolean,reflect:!0})],pr.prototype,"vertical",2),h([y("vertical")],pr.prototype,"handleVerticalChange",1),pr.define("sl-divider");const hr=class{constructor(t){e(this,t),this.apps=[]}async resourceLoaded(e){e.detail===this.uri&&await this.updateApps()}async componentWillLoad(){this.os=await W(this.el),await this.updateApps()}async updateApps(){const e=this.os.store.get(this.uri);this.apps=this.os.proposeAppsFor(e)}onSelect(e){const{value:t}=e.detail.item;var i;"copy-uri"===t?navigator.clipboard.writeText(this.uri):(i=t.urlTemplate.expand({uri:this.uri}),window.open(i.toString(),"_blank"))}render(){return t("sl-dropdown",{key:"6f05a2eb1b492c9424fa28b76826b59192d93ac3"},t("button",{key:"c0f7530ece1ad1f6cfe85e7291dbc50aa6cbdec7",slot:"trigger","aria-label":"Share",part:"button"},t("sl-icon",{key:"9e4c5299dea09378599c97166b10e32ca2db9181",name:"share"})),t("sl-menu",{key:"cbceb11123c96e008df27021fc4a00050d807fe5"},t("sl-menu-item",{key:"3cf3473830aa4d7bc272057febd8fa1c11821c91",value:"copy-uri"},t("sl-icon",{key:"e1256e2dc3466630484ba23321c79bb3fdc8e81d",slot:"prefix",name:"copy"}),"Copy URI"),this.apps.length>0&&t(cr,{key:"5093596308586326c8201f52e609d6037aae9716",apps:this.apps})))}get el(){return o(this)}static get watchers(){return{uri:[{updateApps:0}]}}};function cr({apps:e}){return[t("sl-divider",null),t("sl-menu-item",{disabled:!0},"Open with..."),e.map((e=>t("sl-menu-item",{value:e},e.name)))]}hr.style=":host{display:flex;aspect-ratio:1/1;height:var(--size-8);align-items:center;justify-content:center}sl-dropdown{height:100%;width:100%;display:flex;align-items:center;justify-content:center;&::part(trigger){height:100%;width:100%}button{display:flex;align-items:center;justify-content:center;height:100%;width:100%;cursor:pointer;padding:0;margin:0}}sl-menu-item[disabled]{&::part(base){cursor:default;opacity:1}}";const ur=class{constructor(t){e(this,t),this.toolSelected=r(this,"pod-os:tool-selected",7),this.tools=[]}render(){return this.tools.length>1?t("div",{role:"tablist","aria-label":"Tools","aria-multiselectable":"false"},this.tools.map((e=>{var i;return t("button",{role:"tab","aria-selected":(null===(i=this.selected)||void 0===i?void 0:i.element)===e.element,onClick:()=>this.toolSelected.emit(e)},t("sl-icon",{name:e.icon}),t("span",{class:"text"},e.label))}))):null}};ur.style=":host { --button-size: var(--size-16); display: block; position: sticky; align-self: flex-start; top: 0; overflow: auto; min-width: var(--button-size); z-index: var(--layer-1); } [role='tablist'] { display: flex; flex-direction: column; justify-content: center; border-right: var(--size-px) solid var(--pos-border-color); button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0; font-size: var(--size-6); position: relative; overflow: hidden; outline: none; border: none; width: var(--button-size); min-width: var(--button-size); height: var(--button-size); min-height: var(--button-size); color: var(--pos-normal-text-color); background-color: var(--pos-background-color); &::after { content: ''; position: absolute; top: 50%; left: 50%; width: 0; height: 0; border-radius: 100%; background: color-mix(in srgb, var(--pos-primary-color), transparent 50%); transform: translate(-50%, -50%); opacity: 1; } &:active::after, &:focus::after { width: calc(var(--button-size) * 1.5); height: calc(var(--button-size) * 1.5); opacity: 0; transition: width 0.5s ease-out, height 0.5s ease-out, opacity 1s ease-out; } &:focus-visible { border: var(--size-px) solid var(--pos-primary-color); } @media (min-width: 640px) { &[aria-selected] { border-right: var(--size-1) solid var(--pos-primary-color); } } .text { font-size: var(--size-3); white-space: nowrap; text-overflow: ellipsis; width: 100%; overflow: hidden; } } } @media (max-width: 640px) { :host { position: fixed; top: unset; bottom: 0; width: 100dvw; } [role='tablist'] { flex-direction: row; background-color: var(--pos-background-color); border-top: var(--size-px) solid var(--pos-border-color); button { &[aria-selected] { border-top: var(--size-1) solid var(--pos-primary-color); } } } } ";const fr=class{constructor(t){e(this,t)}async componentWillLoad(){const e=await W(this.el);e.store.get(this.uri);const t=e.store.get(this.uri).assume(C);this.entries=t.listAll()}render(){if(0===this.entries.length)return null;const e=this.entries.map((e=>t("div",null,t("dt",null,t("pos-predicate",{uri:e.forClass,label:e.label})),e.targets.map((e=>t("dd",null,t("pos-rich-link",{uri:e.uri})))))));return t("dl",null,e)}get el(){return o(this)}};fr.style="dl { > * { display: flex; flex-direction: column; gap: var(--size-1); } display: flex; flex-direction: column; gap: var(--size-4); dd { margin: 0; } } ";const mr={Generic:{element:"pos-app-generic",label:"Data",icon:"list-ul",types:[]},Attachments:{element:"pos-tool-attachments",label:"Attach",icon:"paperclip",types:[]},RdfDocument:{element:"pos-app-rdf-document",label:"Things",icon:"diagram-2",types:[{uri:"http://www.w3.org/2007/ont/link#RDFDocument",priority:20}]},DocumentViewer:{element:"pos-app-document-viewer",label:"Doc",icon:"file-text",types:[{uri:"http://www.w3.org/ns/iana/media-types/application/pdf#Resource",priority:30},{uri:"http://www.w3.org/2007/ont/link#Document",priority:10}]},ImageViewer:{element:"pos-app-image-viewer",label:"Pic",icon:"file-image",types:[{uri:"http://purl.org/dc/terms/Image",priority:20}]},LdpContainer:{element:"pos-app-ldp-container",label:"Content",icon:"folder",types:[{uri:"http://www.w3.org/ns/ldp#Container",priority:30}]}};function br(e,t){return e.filter((e=>t.has(e.uri))).reduce(((e,t)=>Math.max(e,t.priority)),0)}const yr=e=>e.priority>0,gr=(e,t)=>t.priority-e.priority,vr=class{constructor(t){e(this,t),this.subscribeResource=r(this,"pod-os:resource",7),this.transitioning=!1,this.receiveResource=e=>{var t;const i=e.types();this.availableTools=function(e){const t=new Set(e.map((e=>e.uri)));return Object.values(mr).map((e=>t=>({tool:t,priority:br(t.types,e)}))(t)).filter(yr).toSorted(gr).map((e=>e.tool)).concat(mr.Generic).concat(mr.Attachments)}(i),this.currentTool=null!==(t=this.availableTools.find((e=>e.element===this.initialTool)))&&void 0!==t?t:this.availableTools[0]}}componentWillLoad(){$(this);const e=new URLSearchParams(window.location.search).get("tool");e&&(this.initialTool=e)}handleToolSelected(e){this.oldTool=this.currentTool,this.currentTool=e.detail,this.transitioning=!0;const t=new URL(window.location.href);t.searchParams.set("tool",e.detail.element),window.history.replaceState({},"",t.toString())}render(){return this.availableTools?this.renderApp():null}renderApp(){var e;const i=this.currentTool.element,r=null===(e=this.oldTool)||void 0===e?void 0:e.element;return t("section",null,t("pos-tool-select",{selected:this.currentTool,tools:this.availableTools}),t("div",{class:{tools:!0,transition:this.transitioning},onAnimationEnd:()=>this.removeOldTool()},r&&t(r,{class:"tool hidden"}),t(i,{class:"tool visible"})))}removeOldTool(){this.oldTool=null,this.transitioning=!1}};vr.style="section{display:flex;flex-direction:row}.tools{flex-grow:1;&.transition{position:relative;.tool{position:absolute}}}.tool{top:0;right:0;left:0;bottom:0;&.visible{animation:fadeIn 300ms ease-in}&.hidden{animation:fadeOut 300ms ease-in}}@keyframes fadeIn{from{opacity:0}to{opacity:1}}@keyframes fadeOut{from{opacity:1}to{opacity:0}}@media (max-width: 640px){section{--toolbar-size:var(--size-16);flex-direction:column-reverse;padding-bottom:var(--toolbar-size);pos-tool-select{--button-size:var(--toolbar-size)}}}";const wr=/^data:([^/]+\/[^,;]+(?:[^,]*?))(;base64)?,([\s\S]*)$/;function xr(e,t,i,r){return e===t?e:0===r?t:e+(t-e)*2**(-r/i)}var kr=['a[href]:not([tabindex^="-"]):not([inert]):not([aria-hidden])','area[href]:not([tabindex^="-"]):not([inert]):not([aria-hidden])',"input:not([disabled]):not([inert]):not([aria-hidden])","select:not([disabled]):not([inert]):not([aria-hidden])","textarea:not([disabled]):not([inert]):not([aria-hidden])","button:not([disabled]):not([inert]):not([aria-hidden])",'iframe:not([tabindex^="-"]):not([inert]):not([aria-hidden])','object:not([tabindex^="-"]):not([inert]):not([aria-hidden])','embed:not([tabindex^="-"]):not([inert]):not([aria-hidden])','[contenteditable]:not([tabindex^="-"]):not([inert]):not([aria-hidden])','[tabindex]:not([tabindex^="-"]):not([inert]):not([aria-hidden])'];function Sr(e){return"object"==typeof e&&null!==e&&"nodeType"in e&&e.nodeType===Node.ELEMENT_NODE}function Dr(e){if("string"==typeof e){const t=document.querySelectorAll(e);return 0===t.length?null:Array.from(t)}return"object"==typeof e&&Sr(e)?[e]:null}function Ir(e){const t=e.lastIndexOf(".");return-1===t||t===e.length-1?{name:e,extension:void 0}:{name:e.slice(0,t),extension:e.slice(t+1)}}var Cr={__proto__:null,md:"text/markdown",markdown:"text/markdown",mp4:"video/mp4",mp3:"audio/mp3",svg:"image/svg+xml",jpg:"image/jpeg",png:"image/png",webp:"image/webp",gif:"image/gif",heic:"image/heic",heif:"image/heif",yaml:"text/yaml",yml:"text/yaml",csv:"text/csv",tsv:"text/tab-separated-values",tab:"text/tab-separated-values",avi:"video/x-msvideo",mks:"video/x-matroska",mkv:"video/x-matroska",mov:"video/quicktime",dicom:"application/dicom",doc:"application/msword",msg:"application/vnd.ms-outlook",docm:"application/vnd.ms-word.document.macroenabled.12",docx:"application/vnd.openxmlformats-officedocument.wordprocessingml.document",dot:"application/msword",dotm:"application/vnd.ms-word.template.macroenabled.12",dotx:"application/vnd.openxmlformats-officedocument.wordprocessingml.template",xla:"application/vnd.ms-excel",xlam:"application/vnd.ms-excel.addin.macroenabled.12",xlc:"application/vnd.ms-excel",xlf:"application/x-xliff+xml",xlm:"application/vnd.ms-excel",xls:"application/vnd.ms-excel",xlsb:"application/vnd.ms-excel.sheet.binary.macroenabled.12",xlsm:"application/vnd.ms-excel.sheet.macroenabled.12",xlsx:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",xlt:"application/vnd.ms-excel",xltm:"application/vnd.ms-excel.template.macroenabled.12",xltx:"application/vnd.openxmlformats-officedocument.spreadsheetml.template",xlw:"application/vnd.ms-excel",txt:"text/plain",text:"text/plain",conf:"text/plain",log:"text/plain",pdf:"application/pdf",zip:"application/zip","7z":"application/x-7z-compressed",rar:"application/x-rar-compressed",tar:"application/x-tar",gz:"application/gzip",dmg:"application/x-apple-diskimage"};function Br(e){if(e.type)return e.type;const t=e.name?Ir(e.name).extension?.toLowerCase():null;return t&&t in Cr?Cr[t]:"application/octet-stream"}function Pr(e){let t="";return e.replace(/[^A-Z0-9]/gi,(e=>(t+=`-${function(e){return e.charCodeAt(0).toString(32)}(e)}`,"/")))+t}var zr=Array.from;function Fr(e,t,i,{onSuccess:r}){e.readEntries((o=>{const s=[...t,...o];o.length?queueMicrotask((()=>{Fr(e,s,i,{onSuccess:r})})):r(s)}),(e=>{i(e),r(t)}))}function Tr(e,t){return null==e?e:{kind:e.isFile?"file":e.isDirectory?"directory":void 0,name:e.name,getFile:()=>new Promise(((t,i)=>e.file(t,i))),async*values(){const i=e.createReader(),r=await new Promise((e=>{Fr(i,[],t,{onSuccess:i=>e(i.map((e=>Tr(e,t))))})}));yield*r},isSameEntry:void 0}}async function*Ar(e,t,i){const r=()=>`${t}/${e.name}`;if("file"===e.kind){const o=await e.getFile();null!=o?(o.relativePath=t?r():null,yield o):null!=i&&(yield i)}else if("directory"===e.kind)for await(const i of e.values())yield*Ar(i,t?r():e.name);else null!=i&&(yield i)}const Er={__proto__:null,"audio/mp3":"mp3","audio/mp4":"mp4","audio/ogg":"ogg","audio/webm":"webm","image/gif":"gif","image/heic":"heic","image/heif":"heif","image/jpeg":"jpg","image/webp":"webp","image/png":"png","image/svg+xml":"svg","video/mp4":"mp4","video/ogg":"ogv","video/quicktime":"mov","video/webm":"webm","video/x-matroska":"mkv","video/x-msvideo":"avi"};function _r(e){return[e]=e.split(";",1),Er[e]||null}function Mr(e){return e<10?`0${e}`:e.toString()}function Rr(){const e=new Date;return`${Mr(e.getHours())}:${Mr(e.getMinutes())}:${Mr(e.getSeconds())}`}function Nr(){if("undefined"==typeof window)return!1;const e=document.body;return null!=e&&null!=window&&"draggable"in e&&"ondragstart"in e&&"ondrop"in e&&"FormData"in window&&"FileReader"in window}function Ur(e){return e.startsWith("blob:")}function Or(e){return!!e&&/^[^/]+\/(jpe?g|gif|png|svg|svg\+xml|bmp|webp|avif)$/.test(e)}function $r(e){const t=(i=e,{hours:Math.floor(i/3600)%24,minutes:Math.floor(i/60)%60,seconds:Math.floor(i%60)});var i;return`${0===t.hours?"":`${t.hours}h`}${0===t.minutes?"":`${0===t.hours?t.minutes:` ${t.minutes.toString(10).padStart(2,"0")}`}m`}${0!==t.hours?"":`${0===t.minutes?t.seconds:` ${t.seconds.toString(10).padStart(2,"0")}`}s`}`}function jr(e,t,i){const r=[];return e.forEach((e=>"string"!=typeof e?r.push(e):t[Symbol.split](e).forEach(((e,t,o)=>{""!==e&&r.push(e),t<o.length-1&&r.push(i)})))),r}
|
|
748
|
+
`,pr=class extends u{constructor(){super(...arguments),this.vertical=!1}connectedCallback(){super.connectedCallback(),this.setAttribute("role","separator")}handleVerticalChange(){this.setAttribute("aria-orientation",this.vertical?"vertical":"horizontal")}};pr.styles=[p,dr],h([c({type:Boolean,reflect:!0})],pr.prototype,"vertical",2),h([y("vertical")],pr.prototype,"handleVerticalChange",1),pr.define("sl-divider");const hr=class{constructor(t){e(this,t),this.apps=[]}async resourceLoaded(e){e.detail===this.uri&&await this.updateApps()}async componentWillLoad(){this.os=await W(this.el),await this.updateApps()}async updateApps(){const e=this.os.store.get(this.uri);this.apps=this.os.proposeAppsFor(e)}onSelect(e){const{value:t}=e.detail.item;var i;"copy-uri"===t?navigator.clipboard.writeText(this.uri):(i=t.urlTemplate.expand({uri:this.uri}),window.open(i.toString(),"_blank"))}render(){return t("sl-dropdown",{key:"9fe1f5774f811f40ca0a3c51b12df8122e4765d8"},t("button",{key:"bdb2c61d418749cb7cedf0ead54babf7ba1d3a93",slot:"trigger","aria-label":"Share",part:"button"},t("sl-icon",{key:"d0a5ab504ea43edada1b378b8d7627cd4f812aae",name:"share"})),t("sl-menu",{key:"75d02eb169c84416c5625f3899987c8e6123d1e1"},t("sl-menu-item",{key:"b7b6219a57fb40b702f396203e80b419ac6159e1",value:"copy-uri"},t("sl-icon",{key:"de2921edf5269c22efd828f5eb31f122375061f1",slot:"prefix",name:"copy"}),"Copy URI"),this.apps.length>0&&t(cr,{key:"b636c8e8ea6db6d104eaf4b4cb27078dc8dc0531",apps:this.apps})))}get el(){return o(this)}static get watchers(){return{uri:[{updateApps:0}]}}};function cr({apps:e}){return[t("sl-divider",null),t("sl-menu-item",{disabled:!0},"Open with..."),e.map((e=>t("sl-menu-item",{value:e},e.name)))]}hr.style=":host{display:flex;aspect-ratio:1/1;height:var(--size-8);align-items:center;justify-content:center}sl-dropdown{height:100%;width:100%;display:flex;align-items:center;justify-content:center;&::part(trigger){height:100%;width:100%}button{display:flex;align-items:center;justify-content:center;height:100%;width:100%;cursor:pointer;padding:0;margin:0}}sl-menu-item[disabled]{&::part(base){cursor:default;opacity:1}}";const ur=class{constructor(t){e(this,t),this.toolSelected=r(this,"pod-os:tool-selected",7),this.tools=[]}render(){return this.tools.length>1?t("div",{role:"tablist","aria-label":"Tools","aria-multiselectable":"false"},this.tools.map((e=>{var i;return t("button",{role:"tab","aria-selected":(null===(i=this.selected)||void 0===i?void 0:i.element)===e.element,onClick:()=>this.toolSelected.emit(e)},t("sl-icon",{name:e.icon}),t("span",{class:"text"},e.label))}))):null}};ur.style=":host { --button-size: var(--size-16); display: block; position: sticky; align-self: flex-start; top: 0; overflow: auto; min-width: var(--button-size); z-index: var(--layer-1); } [role='tablist'] { display: flex; flex-direction: column; justify-content: center; border-right: var(--size-px) solid var(--pos-border-color); button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0; font-size: var(--size-6); position: relative; overflow: hidden; outline: none; border: none; width: var(--button-size); min-width: var(--button-size); height: var(--button-size); min-height: var(--button-size); color: var(--pos-normal-text-color); background-color: var(--pos-background-color); &::after { content: ''; position: absolute; top: 50%; left: 50%; width: 0; height: 0; border-radius: 100%; background: color-mix(in srgb, var(--pos-primary-color), transparent 50%); transform: translate(-50%, -50%); opacity: 1; } &:active::after, &:focus::after { width: calc(var(--button-size) * 1.5); height: calc(var(--button-size) * 1.5); opacity: 0; transition: width 0.5s ease-out, height 0.5s ease-out, opacity 1s ease-out; } &:focus-visible { border: var(--size-px) solid var(--pos-primary-color); } @media (min-width: 640px) { &[aria-selected] { border-right: var(--size-1) solid var(--pos-primary-color); } } .text { font-size: var(--size-3); white-space: nowrap; text-overflow: ellipsis; width: 100%; overflow: hidden; } } } @media (max-width: 640px) { :host { position: fixed; top: unset; bottom: 0; width: 100dvw; } [role='tablist'] { flex-direction: row; background-color: var(--pos-background-color); border-top: var(--size-px) solid var(--pos-border-color); button { &[aria-selected] { border-top: var(--size-1) solid var(--pos-primary-color); } } } } ";const fr=class{constructor(t){e(this,t)}async componentWillLoad(){const e=await W(this.el);e.store.get(this.uri);const t=e.store.get(this.uri).assume(C);this.entries=t.listAll()}render(){if(0===this.entries.length)return null;const e=this.entries.map((e=>t("div",null,t("dt",null,t("pos-predicate",{uri:e.forClass,label:e.label})),e.targets.map((e=>t("dd",null,t("pos-rich-link",{uri:e.uri})))))));return t("dl",null,e)}get el(){return o(this)}};fr.style="dl { > * { display: flex; flex-direction: column; gap: var(--size-1); } display: flex; flex-direction: column; gap: var(--size-4); dd { margin: 0; } } ";const mr={Generic:{element:"pos-app-generic",label:"Data",icon:"list-ul",types:[]},Attachments:{element:"pos-tool-attachments",label:"Attach",icon:"paperclip",types:[]},RdfDocument:{element:"pos-app-rdf-document",label:"Things",icon:"diagram-2",types:[{uri:"http://www.w3.org/2007/ont/link#RDFDocument",priority:20}]},DocumentViewer:{element:"pos-app-document-viewer",label:"Doc",icon:"file-text",types:[{uri:"http://www.w3.org/ns/iana/media-types/application/pdf#Resource",priority:30},{uri:"http://www.w3.org/2007/ont/link#Document",priority:10}]},ImageViewer:{element:"pos-app-image-viewer",label:"Pic",icon:"file-image",types:[{uri:"http://purl.org/dc/terms/Image",priority:20}]},LdpContainer:{element:"pos-app-ldp-container",label:"Content",icon:"folder",types:[{uri:"http://www.w3.org/ns/ldp#Container",priority:30}]}};function br(e,t){return e.filter((e=>t.has(e.uri))).reduce(((e,t)=>Math.max(e,t.priority)),0)}const yr=e=>e.priority>0,gr=(e,t)=>t.priority-e.priority,vr=class{constructor(t){e(this,t),this.subscribeResource=r(this,"pod-os:resource",7),this.transitioning=!1,this.receiveResource=e=>{var t;const i=e.types();this.availableTools=function(e){const t=new Set(e.map((e=>e.uri)));return Object.values(mr).map((e=>t=>({tool:t,priority:br(t.types,e)}))(t)).filter(yr).toSorted(gr).map((e=>e.tool)).concat(mr.Generic).concat(mr.Attachments)}(i),this.currentTool=null!==(t=this.availableTools.find((e=>e.element===this.initialTool)))&&void 0!==t?t:this.availableTools[0]}}componentWillLoad(){$(this);const e=new URLSearchParams(window.location.search).get("tool");e&&(this.initialTool=e)}handleToolSelected(e){this.oldTool=this.currentTool,this.currentTool=e.detail,this.transitioning=!0;const t=new URL(window.location.href);t.searchParams.set("tool",e.detail.element),window.history.replaceState({},"",t.toString())}render(){return this.availableTools?this.renderApp():null}renderApp(){var e;const i=this.currentTool.element,r=null===(e=this.oldTool)||void 0===e?void 0:e.element;return t("section",null,t("pos-tool-select",{selected:this.currentTool,tools:this.availableTools}),t("div",{class:{tools:!0,transition:this.transitioning},onAnimationEnd:()=>this.removeOldTool()},r&&t(r,{class:"tool hidden"}),t(i,{class:"tool visible"})))}removeOldTool(){this.oldTool=null,this.transitioning=!1}};vr.style="section{display:flex;flex-direction:row}.tools{flex-grow:1;&.transition{position:relative;.tool{position:absolute}}}.tool{top:0;right:0;left:0;bottom:0;&.visible{animation:fadeIn 300ms ease-in}&.hidden{animation:fadeOut 300ms ease-in}}@keyframes fadeIn{from{opacity:0}to{opacity:1}}@keyframes fadeOut{from{opacity:1}to{opacity:0}}@media (max-width: 640px){section{--toolbar-size:var(--size-16);flex-direction:column-reverse;padding-bottom:var(--toolbar-size);pos-tool-select{--button-size:var(--toolbar-size)}}}";const wr=/^data:([^/]+\/[^,;]+(?:[^,]*?))(;base64)?,([\s\S]*)$/;function xr(e,t,i,r){return e===t?e:0===r?t:e+(t-e)*2**(-r/i)}var kr=['a[href]:not([tabindex^="-"]):not([inert]):not([aria-hidden])','area[href]:not([tabindex^="-"]):not([inert]):not([aria-hidden])',"input:not([disabled]):not([inert]):not([aria-hidden])","select:not([disabled]):not([inert]):not([aria-hidden])","textarea:not([disabled]):not([inert]):not([aria-hidden])","button:not([disabled]):not([inert]):not([aria-hidden])",'iframe:not([tabindex^="-"]):not([inert]):not([aria-hidden])','object:not([tabindex^="-"]):not([inert]):not([aria-hidden])','embed:not([tabindex^="-"]):not([inert]):not([aria-hidden])','[contenteditable]:not([tabindex^="-"]):not([inert]):not([aria-hidden])','[tabindex]:not([tabindex^="-"]):not([inert]):not([aria-hidden])'];function Sr(e){return"object"==typeof e&&null!==e&&"nodeType"in e&&e.nodeType===Node.ELEMENT_NODE}function Dr(e){if("string"==typeof e){const t=document.querySelectorAll(e);return 0===t.length?null:Array.from(t)}return"object"==typeof e&&Sr(e)?[e]:null}function Ir(e){const t=e.lastIndexOf(".");return-1===t||t===e.length-1?{name:e,extension:void 0}:{name:e.slice(0,t),extension:e.slice(t+1)}}var Cr={__proto__:null,md:"text/markdown",markdown:"text/markdown",mp4:"video/mp4",mp3:"audio/mp3",svg:"image/svg+xml",jpg:"image/jpeg",png:"image/png",webp:"image/webp",gif:"image/gif",heic:"image/heic",heif:"image/heif",yaml:"text/yaml",yml:"text/yaml",csv:"text/csv",tsv:"text/tab-separated-values",tab:"text/tab-separated-values",avi:"video/x-msvideo",mks:"video/x-matroska",mkv:"video/x-matroska",mov:"video/quicktime",dicom:"application/dicom",doc:"application/msword",msg:"application/vnd.ms-outlook",docm:"application/vnd.ms-word.document.macroenabled.12",docx:"application/vnd.openxmlformats-officedocument.wordprocessingml.document",dot:"application/msword",dotm:"application/vnd.ms-word.template.macroenabled.12",dotx:"application/vnd.openxmlformats-officedocument.wordprocessingml.template",xla:"application/vnd.ms-excel",xlam:"application/vnd.ms-excel.addin.macroenabled.12",xlc:"application/vnd.ms-excel",xlf:"application/x-xliff+xml",xlm:"application/vnd.ms-excel",xls:"application/vnd.ms-excel",xlsb:"application/vnd.ms-excel.sheet.binary.macroenabled.12",xlsm:"application/vnd.ms-excel.sheet.macroenabled.12",xlsx:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",xlt:"application/vnd.ms-excel",xltm:"application/vnd.ms-excel.template.macroenabled.12",xltx:"application/vnd.openxmlformats-officedocument.spreadsheetml.template",xlw:"application/vnd.ms-excel",txt:"text/plain",text:"text/plain",conf:"text/plain",log:"text/plain",pdf:"application/pdf",zip:"application/zip","7z":"application/x-7z-compressed",rar:"application/x-rar-compressed",tar:"application/x-tar",gz:"application/gzip",dmg:"application/x-apple-diskimage"};function Br(e){if(e.type)return e.type;const t=e.name?Ir(e.name).extension?.toLowerCase():null;return t&&t in Cr?Cr[t]:"application/octet-stream"}function Pr(e){let t="";return e.replace(/[^A-Z0-9]/gi,(e=>(t+=`-${function(e){return e.charCodeAt(0).toString(32)}(e)}`,"/")))+t}var zr=Array.from;function Fr(e,t,i,{onSuccess:r}){e.readEntries((o=>{const s=[...t,...o];o.length?queueMicrotask((()=>{Fr(e,s,i,{onSuccess:r})})):r(s)}),(e=>{i(e),r(t)}))}function Tr(e,t){return null==e?e:{kind:e.isFile?"file":e.isDirectory?"directory":void 0,name:e.name,getFile:()=>new Promise(((t,i)=>e.file(t,i))),async*values(){const i=e.createReader(),r=await new Promise((e=>{Fr(i,[],t,{onSuccess:i=>e(i.map((e=>Tr(e,t))))})}));yield*r},isSameEntry:void 0}}async function*Ar(e,t,i){const r=()=>`${t}/${e.name}`;if("file"===e.kind){const o=await e.getFile();null!=o?(o.relativePath=t?r():null,yield o):null!=i&&(yield i)}else if("directory"===e.kind)for await(const i of e.values())yield*Ar(i,t?r():e.name);else null!=i&&(yield i)}const Er={__proto__:null,"audio/mp3":"mp3","audio/mp4":"mp4","audio/ogg":"ogg","audio/webm":"webm","image/gif":"gif","image/heic":"heic","image/heif":"heif","image/jpeg":"jpg","image/webp":"webp","image/png":"png","image/svg+xml":"svg","video/mp4":"mp4","video/ogg":"ogv","video/quicktime":"mov","video/webm":"webm","video/x-matroska":"mkv","video/x-msvideo":"avi"};function _r(e){return[e]=e.split(";",1),Er[e]||null}function Mr(e){return e<10?`0${e}`:e.toString()}function Rr(){const e=new Date;return`${Mr(e.getHours())}:${Mr(e.getMinutes())}:${Mr(e.getSeconds())}`}function Nr(){if("undefined"==typeof window)return!1;const e=document.body;return null!=e&&null!=window&&"draggable"in e&&"ondragstart"in e&&"ondrop"in e&&"FormData"in window&&"FileReader"in window}function Ur(e){return e.startsWith("blob:")}function Or(e){return!!e&&/^[^/]+\/(jpe?g|gif|png|svg|svg\+xml|bmp|webp|avif)$/.test(e)}function $r(e){const t=(i=e,{hours:Math.floor(i/3600)%24,minutes:Math.floor(i/60)%60,seconds:Math.floor(i%60)});var i;return`${0===t.hours?"":`${t.hours}h`}${0===t.minutes?"":`${0===t.hours?t.minutes:` ${t.minutes.toString(10).padStart(2,"0")}`}m`}${0!==t.hours?"":`${0===t.minutes?t.seconds:` ${t.seconds.toString(10).padStart(2,"0")}`}s`}`}function jr(e,t,i){const r=[];return e.forEach((e=>"string"!=typeof e?r.push(e):t[Symbol.split](e).forEach(((e,t,o)=>{""!==e&&r.push(e),t<o.length-1&&r.push(i)})))),r}
|
|
749
749
|
/**
|
|
750
750
|
* Takes a string with placeholder variables like `%{smart_count} file selected`
|
|
751
751
|
* and replaces it with values from options `{smart_count: 5}`
|
|
@@ -769,7 +769,7 @@ import{r as e,h as t,H as i,c as r,a as o,i as s,j as a}from"./p-spEUIGXI.js";im
|
|
|
769
769
|
* Released under the MIT license
|
|
770
770
|
*
|
|
771
771
|
* Date: 2024-04-21T07:43:05.335Z
|
|
772
|
-
*/class ad extends uo{imgElement;componentDidMount(){const{initCropper:e}=this.props;this.imgElement&&e(this.imgElement)}onRotate90Deg=()=>{this.props.rotateBy(-90)};onRotateGranular=e=>{const t=Number(e.target.value);this.props.rotateGranular(t)};renderGranularRotate(){const{i18n:e}=this.props,{angleGranular:t}=this.props;return Mo("label",{role:"tooltip","aria-label":`${t}º`,"data-microtip-position":"top",className:"uppy-ImageCropper-rangeWrapper",children:Mo("input",{className:"uppy-ImageCropper-range uppy-u-reset",type:"range",onInput:this.onRotateGranular,onChange:this.onRotateGranular,value:t,min:"-45",max:"45","aria-label":e("rotate")})})}renderRevert(){const{i18n:e}=this.props;return Mo("button",{"data-microtip-position":"top",type:"button",className:"uppy-u-reset uppy-c-btn","aria-label":e("revert"),onClick:()=>{this.props.reset()},children:Mo("svg",{"aria-hidden":"true",className:"uppy-c-icon",width:"24",height:"24",viewBox:"0 0 24 24",children:[Mo("path",{d:"M0 0h24v24H0z",fill:"none"}),Mo("path",{d:"M13 3c-4.97 0-9 4.03-9 9H1l3.89 3.89.07.14L9 12H6c0-3.87 3.13-7 7-7s7 3.13 7 7-3.13 7-7 7c-1.93 0-3.68-.79-4.94-2.06l-1.42 1.42C8.27 19.99 10.51 21 13 21c4.97 0 9-4.03 9-9s-4.03-9-9-9zm-1 5v5l4.28 2.54.72-1.21-3.5-2.08V8H12z"})]})})}renderRotate(){const{i18n:e}=this.props;return Mo("button",{"data-microtip-position":"top",type:"button",className:"uppy-u-reset uppy-c-btn","aria-label":e("rotate"),onClick:this.onRotate90Deg,children:Mo("svg",{"aria-hidden":"true",className:"uppy-c-icon",width:"24",height:"24",viewBox:"0 0 24 24",children:[Mo("path",{d:"M0 0h24v24H0V0zm0 0h24v24H0V0z",fill:"none"}),Mo("path",{d:"M14 10a2 2 0 012 2v7a2 2 0 01-2 2H6a2 2 0 01-2-2v-7a2 2 0 012-2h8zm0 1.75H6a.25.25 0 00-.243.193L5.75 12v7a.25.25 0 00.193.243L6 19.25h8a.25.25 0 00.243-.193L14.25 19v-7a.25.25 0 00-.193-.243L14 11.75zM12 .76V4c2.3 0 4.61.88 6.36 2.64a8.95 8.95 0 012.634 6.025L21 13a1 1 0 01-1.993.117L19 13h-.003a6.979 6.979 0 00-2.047-4.95 6.97 6.97 0 00-4.652-2.044L12 6v3.24L7.76 5 12 .76z"})]})})}renderFlip(){const{i18n:e}=this.props;return Mo("button",{"data-microtip-position":"top",type:"button",className:"uppy-u-reset uppy-c-btn","aria-label":e("flipHorizontal"),onClick:()=>this.props.flipHorizontal(),children:Mo("svg",{"aria-hidden":"true",className:"uppy-c-icon",width:"24",height:"24",viewBox:"0 0 24 24",children:[Mo("path",{d:"M0 0h24v24H0z",fill:"none"}),Mo("path",{d:"M15 21h2v-2h-2v2zm4-12h2V7h-2v2zM3 5v14c0 1.1.9 2 2 2h4v-2H5V5h4V3H5c-1.1 0-2 .9-2 2zm16-2v2h2c0-1.1-.9-2-2-2zm-8 20h2V1h-2v22zm8-6h2v-2h-2v2zM15 5h2V3h-2v2zm4 8h2v-2h-2v2zm0 8c1.1 0 2-.9 2-2h-2v2z"})]})})}renderZoomIn(){const{i18n:e}=this.props;return Mo("button",{"data-microtip-position":"top",type:"button",className:"uppy-u-reset uppy-c-btn","aria-label":e("zoomIn"),onClick:()=>this.props.zoom(.1),children:Mo("svg",{"aria-hidden":"true",className:"uppy-c-icon",height:"24",viewBox:"0 0 24 24",width:"24",children:[Mo("path",{d:"M0 0h24v24H0V0z",fill:"none"}),Mo("path",{d:"M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"}),Mo("path",{d:"M12 10h-2v2H9v-2H7V9h2V7h1v2h2v1z"})]})})}renderZoomOut(){const{i18n:e}=this.props;return Mo("button",{"data-microtip-position":"top",type:"button",className:"uppy-u-reset uppy-c-btn","aria-label":e("zoomOut"),onClick:()=>this.props.zoom(-.1),children:Mo("svg",{"aria-hidden":"true",className:"uppy-c-icon",width:"24",height:"24",viewBox:"0 0 24 24",children:[Mo("path",{d:"M0 0h24v24H0V0z",fill:"none"}),Mo("path",{d:"M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14zM7 9h5v1H7z"})]})})}renderCropSquare(){const{i18n:e}=this.props;return Mo("button",{"data-microtip-position":"top",type:"button",className:"uppy-u-reset uppy-c-btn","aria-label":e("aspectRatioSquare"),onClick:()=>this.props.setAspectRatio("1:1"),children:Mo("svg",{"aria-hidden":"true",className:"uppy-c-icon",width:"24",height:"24",viewBox:"0 0 24 24",children:[Mo("path",{d:"M0 0h24v24H0z",fill:"none"}),Mo("path",{d:"M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"})]})})}renderCropWidescreen(){const{i18n:e}=this.props;return Mo("button",{"data-microtip-position":"top",type:"button",className:"uppy-u-reset uppy-c-btn","aria-label":e("aspectRatioLandscape"),onClick:()=>this.props.setAspectRatio("16:9"),children:Mo("svg",{"aria-hidden":"true",className:"uppy-c-icon",width:"24",height:"24",viewBox:"0 0 24 24",children:[Mo("path",{d:"M 19,4.9999992 V 17.000001 H 4.9999998 V 6.9999992 H 19 m 0,-2 H 4.9999998 c -1.0999999,0 -1.9999999,0.9000001 -1.9999999,2 V 17.000001 c 0,1.1 0.9,2 1.9999999,2 H 19 c 1.1,0 2,-0.9 2,-2 V 6.9999992 c 0,-1.0999999 -0.9,-2 -2,-2 z"}),Mo("path",{fill:"none",d:"M0 0h24v24H0z"})]})})}renderCropWidescreenVertical(){const{i18n:e}=this.props;return Mo("button",{"data-microtip-position":"top",type:"button","aria-label":e("aspectRatioPortrait"),className:"uppy-u-reset uppy-c-btn",onClick:()=>this.props.setAspectRatio("9:16"),children:Mo("svg",{"aria-hidden":"true",className:"uppy-c-icon",width:"24",height:"24",viewBox:"0 0 24 24",children:[Mo("path",{d:"M 19.000001,19 H 6.999999 V 5 h 10.000002 v 14 m 2,0 V 5 c 0,-1.0999999 -0.9,-1.9999999 -2,-1.9999999 H 6.999999 c -1.1,0 -2,0.9 -2,1.9999999 v 14 c 0,1.1 0.9,2 2,2 h 10.000002 c 1.1,0 2,-0.9 2,-2 z"}),Mo("path",{d:"M0 0h24v24H0z",fill:"none"})]})})}render(){const{currentImage:e,objectUrl:t,opts:i}=this.props,{actions:r}=i;return Mo("div",{className:"uppy-ImageCropper",children:[Mo("div",{className:"uppy-ImageCropper-container",children:Mo("img",{className:"uppy-ImageCropper-image",alt:e.name,src:t,ref:e=>{this.imgElement=e}})}),Mo("div",{className:"uppy-ImageCropper-controls",children:[r.revert&&this.renderRevert(),r.rotate&&this.renderRotate(),r.granularRotate&&this.renderGranularRotate(),r.flip&&this.renderFlip(),r.zoomIn&&this.renderZoomIn(),r.zoomOut&&this.renderZoomOut(),r.cropSquare&&this.renderCropSquare(),r.cropWidescreen&&this.renderCropWidescreen(),r.cropWidescreenVertical&&this.renderCropWidescreenVertical()]})]})}}var nd={strings:{revert:"Reset",rotate:"Rotate 90°",zoomIn:"Zoom in",zoomOut:"Zoom out",flipHorizontal:"Flip horizontally",aspectRatioSquare:"Crop square",aspectRatioLandscape:"Crop landscape (16:9)",aspectRatioPortrait:"Crop portrait (9:16)"}};const ld={angle:0,angleGranular:0,isFlippedHorizontally:!1,aspectRatio:"free",cropperReady:!1},dd={viewMode:0,background:!1,autoCropArea:1,responsive:!0,minCropBoxWidth:70,minCropBoxHeight:70,croppedCanvasOptions:{},initialAspectRatio:0},pd={revert:!0,rotate:!0,granularRotate:!0,flip:!0,zoomIn:!0,zoomOut:!0,cropSquare:!0,cropWidescreen:!0,cropWidescreenVertical:!0},hd={quality:.8,actions:pd,cropperOptions:dd};class cd extends Bs{static VERSION="4.2.0";cropper=null;objectUrl=null;prevCropboxData=null;imgElement=null;cropstartHandler=null;cropendHandler=null;cropperReadyHandler=null;constructor(e,t){super(e,{...hd,...t,actions:{...pd,...t?.actions},cropperOptions:{...dd,...t?.cropperOptions}}),this.id=this.opts.id||"ImageEditor",this.title="Image Editor",this.type="editor",this.defaultLocale=nd,this.i18nInit()}canEditFile(e){if(!e.type||e.isRemote)return!1;const t=e.type.split("/")[1];return!!/^(jpe?g|gif|png|bmp|webp)$/.test(t)}save=()=>{const{currentImage:e}=this.getPluginState();if(!e)return;if(!this.cropper)return;const t=this.cropper.getCroppedCanvas({});t.width%2!=0&&this.cropper.setData({width:t.width-1}),t.height%2!=0&&this.cropper.setData({height:t.height-1}),this.cropper.getCroppedCanvas(this.opts.cropperOptions.croppedCanvasOptions).toBlob((t=>{if(!t)return;const i=e.id;if(!this.uppy.getFile(i))return;this.uppy.setFileState(i,{data:new File([t],e.name??this.i18n("unnamed"),{type:t.type}),size:t.size,preview:void 0});const r=this.uppy.getFile(i);r&&(this.uppy.emit("thumbnail:request",r),this.setPluginState({currentImage:r}),this.uppy.emit("file-editor:complete",r))}),e.type,this.opts.quality)};storeCropperInstance=e=>{this.cropper=e};selectFile=e=>{this.start(e)};resetEditorState=(e=this.getPluginState().currentImage)=>{this.setPluginState({currentImage:e,...ld,cropperReady:!!this.cropper})};rotateBy=e=>{if(!this.cropper)return;const{angle:t,angleGranular:i,isFlippedHorizontally:r}=this.getPluginState(),o=t-i+e;this.cropper.scale(r?-1:1),this.cropper.rotateTo(o);const s=this.cropper.getCanvasData(),a=function(e,t){const i=Math.min(e.width/t.width,e.height/t.height),r=t.width*i,o=t.height*i;return{width:r,height:o,left:(e.width-r)/2,top:(e.height-o)/2}}(this.cropper.getContainerData(),s);this.cropper.setCanvasData(a),this.cropper.setCropBoxData(a),this.setPluginState({angle:o,angleGranular:0})};rotateGranular=e=>{if(!this.cropper)return;const{angle:t,angleGranular:i,isFlippedHorizontally:r}=this.getPluginState(),o=t-i+e;this.cropper.rotateTo(o);const s=this.cropper.getImageData(),a=function(e,t,i){const r=Math.abs(i*(Math.PI/180));return Math.max((Math.sin(r)*e+Math.cos(r)*t)/t,(Math.sin(r)*t+Math.cos(r)*e)/e)}(s.naturalWidth,s.naturalHeight,e);this.cropper.scale(r?-a:a,a),this.setPluginState({angle:o,angleGranular:e})};flipHorizontal=()=>{if(!this.cropper)return;const{isFlippedHorizontally:e}=this.getPluginState();this.cropper.scaleX(-this.cropper.getData().scaleX||-1),this.setPluginState({isFlippedHorizontally:!e})};zoom=e=>{this.cropper&&this.cropper.zoom(e)};setAspectRatio=e=>{this.cropper&&(this.cropper.setAspectRatio({free:0,"1:1":1,"16:9":16/9,"9:16":9/16}[e]),this.setPluginState({aspectRatio:e}))};reset=()=>{this.cropper&&(this.cropper.reset(),this.cropper.setAspectRatio(this.opts.cropperOptions.initialAspectRatio||0),this.resetEditorState())};start=e=>{this.objectUrl&&(URL.revokeObjectURL(this.objectUrl),this.objectUrl=null);let t=e.data;if(!(t instanceof Blob)){const i=this.uppy.getFile(e.id);t=i?.data}t instanceof Blob?this.objectUrl=URL.createObjectURL(t):console.warn("[Uppy ImageEditor] Cannot edit file: file.data is not a Blob.","File:",e,"file.data:",e.data,"typeof file.data:",typeof e.data),this.uppy.emit("file-editor:start",e),this.resetEditorState(e)};stop=()=>{this.destroyCropper(),this.objectUrl&&(URL.revokeObjectURL(this.objectUrl),this.objectUrl=null),this.resetEditorState(null)};initCropper=e=>{this.cropper||(this.imgElement=e,this.cropper=new sd(e,this.opts.cropperOptions),this.cropstartHandler=()=>{this.cropper&&(this.prevCropboxData=this.cropper.getCropBoxData())},this.cropendHandler=e=>{if(!this.cropper||!this.prevCropboxData)return;const t=this.cropper.getCanvasData(),i=this.cropper.getCropBoxData();if("all"===e.detail.action){const e=(s=this.prevCropboxData,(o=i).left<(r=t).left?{left:r.left,width:s.width}:o.top<r.top?{top:r.top,height:s.height}:o.left+o.width>r.left+r.width?{left:r.left+r.width-s.width,width:s.width}:o.top+o.height>r.top+r.height?{top:r.top+r.height-s.height,height:s.height}:null);e&&this.cropper.setCropBoxData(e)}else{const e=function(e,t,i){return t.left<e.left?{left:e.left,width:i.left+i.width-e.left}:t.top<e.top?{top:e.top,height:i.top+i.height-e.top}:t.left+t.width>e.left+e.width?{left:i.left,width:e.left+e.width-i.left}:t.top+t.height>e.top+e.height?{top:i.top,height:e.top+e.height-i.top}:null}(t,i,this.prevCropboxData);e&&this.cropper.setCropBoxData(e)}var r,o,s},this.cropperReadyHandler=()=>{this.setPluginState({cropperReady:!0})},e.addEventListener("cropstart",this.cropstartHandler),e.addEventListener("cropend",this.cropendHandler),e.addEventListener("ready",this.cropperReadyHandler,{once:!0}))};destroyCropper=()=>{this.cropper&&(this.setPluginState({cropperReady:!1}),this.cropstartHandler&&this.imgElement&&this.imgElement.removeEventListener("cropstart",this.cropstartHandler),this.cropendHandler&&this.imgElement&&this.imgElement.removeEventListener("cropend",this.cropendHandler),this.cropperReadyHandler&&this.imgElement&&this.imgElement.removeEventListener("ready",this.cropperReadyHandler),this.cropper.destroy(),this.cropper=null,this.imgElement=null,this.cropstartHandler=null,this.cropendHandler=null,this.cropperReadyHandler=null,this.prevCropboxData=null)};getObjectUrl=()=>this.objectUrl;install(){this.resetEditorState(null);const{target:e}=this.opts;e&&this.mount(e,this)}uninstall(){const{currentImage:e}=this.getPluginState();if(e){const t=this.uppy.getFile(e.id);this.uppy.emit("file-editor:cancel",t)}this.stop(),this.unmount()}render(){const{currentImage:e,angleGranular:t}=this.getPluginState();return null===e||e.isRemote?null:Mo(ad,{currentImage:e,objectUrl:this.objectUrl??"",initCropper:this.initCropper,save:this.save,opts:this.opts,i18n:this.i18n,angleGranular:t,rotateBy:this.rotateBy,rotateGranular:this.rotateGranular,flipHorizontal:this.flipHorizontal,zoom:this.zoom,setAspectRatio:this.setAspectRatio,reset:this.reset})}}var ud,fd={exports:{}},md=function(){if(ud)return fd.exports;ud=1,fd.exports=r,fd.exports.isMobile=r,fd.exports.default=r;const e=/(android|bb\d+|meego).+mobile|armv7l|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series[46]0|samsungbrowser.*mobile|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i,t=/CrOS/,i=/android|ipad|playbook|silk/i;function r(r){r||(r={});let o=r.ua;if(o||"undefined"==typeof navigator||(o=navigator.userAgent),o&&o.headers&&"string"==typeof o.headers["user-agent"]&&(o=o.headers["user-agent"]),"string"!=typeof o)return!1;let s=e.test(o)&&!t.test(o)||!!r.tablet&&i.test(o);return!s&&r.tablet&&r.featureDetect&&navigator&&navigator.maxTouchPoints>1&&-1!==o.indexOf("Macintosh")&&-1!==o.indexOf("Safari")&&(s=!0),s}return fd.exports}();function bd(){return Mo("svg",{"aria-hidden":"true",focusable:"false",fill:"#0097DC",width:"66",height:"55",viewBox:"0 0 66 55",children:Mo("path",{d:"M57.3 8.433c4.59 0 8.1 3.51 8.1 8.1v29.7c0 4.59-3.51 8.1-8.1 8.1H8.7c-4.59 0-8.1-3.51-8.1-8.1v-29.7c0-4.59 3.51-8.1 8.1-8.1h9.45l4.59-7.02c.54-.54 1.35-1.08 2.16-1.08h16.2c.81 0 1.62.54 2.16 1.08l4.59 7.02h9.45zM33 14.64c-8.62 0-15.393 6.773-15.393 15.393 0 8.62 6.773 15.393 15.393 15.393 8.62 0 15.393-6.773 15.393-15.393 0-8.62-6.773-15.393-15.393-15.393zM33 40c-5.648 0-9.966-4.319-9.966-9.967 0-5.647 4.318-9.966 9.966-9.966s9.966 4.319 9.966 9.966C42.966 35.681 38.648 40 33 40z",fillRule:"evenodd"})})}function yd({onDiscard:e,i18n:t}){return Mo("button",{className:"uppy-u-reset uppy-c-btn uppy-Webcam-button uppy-Webcam-button--discard",type:"button",title:t("discardRecordedFile"),"aria-label":t("discardRecordedFile"),onClick:e,"data-uppy-super-focusable":!0,children:Mo("svg",{width:"13",height:"13",viewBox:"0 0 13 13",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",focusable:"false",className:"uppy-c-icon",children:Mo("g",{fill:"#FFF",fillRule:"evenodd",children:[Mo("path",{d:"M.496 11.367L11.103.76l1.414 1.414L1.911 12.781z"}),Mo("path",{d:"M11.104 12.782L.497 2.175 1.911.76l10.607 10.606z"})]})})})}function gd({recording:e,onStartRecording:t,onStopRecording:i,i18n:r}){return Mo("button",e?{className:"uppy-u-reset uppy-c-btn uppy-Webcam-button",type:"button",title:r("stopRecording"),"aria-label":r("stopRecording"),onClick:i,"data-uppy-super-focusable":!0,children:Mo("svg",{"aria-hidden":"true",focusable:"false",className:"uppy-c-icon",width:"100",height:"100",viewBox:"0 0 100 100",children:Mo("rect",{x:"15",y:"15",width:"70",height:"70"})})}:{className:"uppy-u-reset uppy-c-btn uppy-Webcam-button",type:"button",title:r("startRecording"),"aria-label":r("startRecording"),onClick:t,"data-uppy-super-focusable":!0,children:Mo("svg",{"aria-hidden":"true",focusable:"false",className:"uppy-c-icon",width:"100",height:"100",viewBox:"0 0 100 100",children:Mo("circle",{cx:"50",cy:"50",r:"40"})})})}function vd({recordingLengthSeconds:e}){var t;return Mo("span",{children:(t=e,`${Math.floor(t/60)}:${String(t%60).padStart(2,"0")}`)})}function wd({onSnapshot:e,i18n:t}){return Mo("button",{className:"uppy-u-reset uppy-c-btn uppy-Webcam-button uppy-Webcam-button--picture",type:"button",title:t("takePicture"),"aria-label":t("takePicture"),onClick:e,"data-uppy-super-focusable":!0,children:bd()})}function xd({onSubmit:e,i18n:t}){return Mo("button",{className:"uppy-u-reset uppy-c-btn uppy-Webcam-button uppy-Webcam-button--submit",type:"button",title:t("submitRecordedFile"),"aria-label":t("submitRecordedFile"),onClick:e,"data-uppy-super-focusable":!0,children:Mo("svg",{width:"12",height:"9",viewBox:"0 0 12 9",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",focusable:"false",className:"uppy-c-icon",children:Mo("path",{fill:"#fff",fillRule:"nonzero",d:"M10.66 0L12 1.31 4.136 9 0 4.956l1.34-1.31L4.136 6.38z"})})})}function kd({currentDeviceId:e,videoSources:t,onChangeVideoSource:i}){return Mo("div",{className:"uppy-Webcam-videoSource",children:Mo("select",{className:"uppy-u-reset uppy-Webcam-videoSource-select",onChange:e=>{i(e.target.value)},children:t.map((t=>Mo("option",{value:t.deviceId,selected:t.deviceId===e,children:t.label},t.deviceId)))})})}function Sd(e,t){return e.includes(t)}class Dd extends uo{videoElement;refs;componentDidMount(){const{onFocus:e}=this.props;e()}componentWillUnmount(){const{onStop:e}=this.props;e()}render(){const{src:e,recordedVideo:t,capturedSnapshot:i,recording:r,modes:o,supportsRecording:s,videoSources:a,showVideoSourceDropdown:n,showRecordingLength:l,onSubmit:d,i18n:p,mirror:h,onSnapshot:c,onStartRecording:u,onStopRecording:f,onDiscardRecordedMedia:m,recordingLengthSeconds:b}=this.props,y=!!t,g=!!i,v=y||g,w=!v&&s&&(Sd(o,"video-only")||Sd(o,"audio-only")||Sd(o,"video-audio")),x=!v&&Sd(o,"picture"),k=s&&l&&!y,S=n&&a&&a.length>1,D={playsInline:!0};return t?(D.muted=!1,D.controls=!0,D.src=t,this.videoElement&&(this.videoElement.srcObject=null)):(D.muted=!0,D.autoPlay=!0,D.srcObject=e),Mo("div",{className:"uppy uppy-Webcam-container",children:[Mo("div",{className:"uppy-Webcam-videoContainer",children:!i||r||t?Mo("video",{ref:e=>{this.videoElement=e},className:"uppy-Webcam-video "+(h?"uppy-Webcam-video--mirrored":""),...D}):Mo("div",{className:"uppy-Webcam-imageContainer",children:Mo("img",{src:i,className:"uppy-Webcam-video",alt:"capturedSnapshot"})})}),Mo("div",{className:"uppy-Webcam-footer",children:[Mo("div",{className:"uppy-Webcam-videoSourceContainer",children:S?kd(this.props):null}),Mo("div",{className:"uppy-Webcam-buttonContainer",children:[x&&Mo(wd,{onSnapshot:c,i18n:p}),w&&Mo(gd,{recording:r,onStartRecording:u,onStopRecording:f,i18n:p}),(y||g)&&Mo(xd,{onSubmit:d,i18n:p}),(y||g)&&Mo(yd,{onDiscard:m,i18n:p})]}),Mo("div",{className:"uppy-Webcam-recordingLength",children:k&&Mo(vd,{recordingLengthSeconds:b})})]})]})}}var Id={strings:{pluginNameCamera:"Camera",noCameraTitle:"Camera Not Available",noCameraDescription:"In order to take pictures or record video, please connect a camera device",recordingStoppedMaxSize:"Recording stopped because the file size is about to exceed the limit",submitRecordedFile:"Submit recorded file",discardRecordedFile:"Discard recorded file",smile:"Smile!",takePicture:"Take a picture",startRecording:"Begin video recording",stopRecording:"Stop video recording",recordingLength:"Recording length %{recording_length}",allowAccessTitle:"Please allow access to your camera",allowAccessDescription:"In order to take pictures or record video with your camera, please allow camera access for this site."}};function Cd({icon:e,i18n:t,hasCamera:i}){return Mo("div",{className:"uppy-Webcam-permissons",children:[Mo("div",{className:"uppy-Webcam-permissonsIcon",children:e()}),Mo("div",{className:"uppy-Webcam-title",children:t(i?"allowAccessTitle":"noCameraTitle")}),Mo("p",{children:t(i?"allowAccessDescription":"noCameraDescription")})]})}function Bd(e){return"."===e[0]?Cr[e.slice(1)]:e}function Pd(e){return/^video\/[^*]+$/.test(e)}function zd(e){return/^image\/[^*]+$/.test(e)}function Fd(e,t){return e.includes(t)}const Td={onBeforeSnapshot:()=>Promise.resolve(),countdown:!1,modes:["video-audio","video-only","audio-only","picture"],mirror:!0,showVideoSourceDropdown:!1,preferredImageMimeType:null,preferredVideoMimeType:null,showRecordingLength:!1,mobileNativeCamera:md.isMobile({tablet:!0})};class Ad extends Bs{static VERSION="5.1.0";#Y;mediaDevices;supportsUserMedia;protocol;capturedMediaFile;icon;webcamActive;stream=null;recorder=null;recordingChunks=null;recordingLengthTimer;captureInProgress=!1;constructor(e,t){super(e,{...Td,...t}),this.mediaDevices=navigator.mediaDevices,this.supportsUserMedia=!!this.mediaDevices,this.protocol=location.protocol.match(/https/i)?"https":"http",this.id=this.opts.id||"Webcam",this.type="acquirer",this.capturedMediaFile=null,this.icon=()=>Mo("svg",{"aria-hidden":"true",focusable:"false",width:"32",height:"32",viewBox:"0 0 32 32",children:Mo("path",{d:"M23.5 9.5c1.417 0 2.5 1.083 2.5 2.5v9.167c0 1.416-1.083 2.5-2.5 2.5h-15c-1.417 0-2.5-1.084-2.5-2.5V12c0-1.417 1.083-2.5 2.5-2.5h2.917l1.416-2.167C13 7.167 13.25 7 13.5 7h5c.25 0 .5.167.667.333L20.583 9.5H23.5zM16 11.417a4.706 4.706 0 00-4.75 4.75 4.704 4.704 0 004.75 4.75 4.703 4.703 0 004.75-4.75c0-2.663-2.09-4.75-4.75-4.75zm0 7.825c-1.744 0-3.076-1.332-3.076-3.074 0-1.745 1.333-3.077 3.076-3.077 1.744 0 3.074 1.333 3.074 3.076s-1.33 3.075-3.074 3.075z",fill:"#02B383",fillRule:"nonzero"})}),this.defaultLocale=Id,this.i18nInit(),this.title=this.i18n("pluginNameCamera"),this.#Y=this.opts.mirror,this.install=this.install.bind(this),this.setPluginState=this.setPluginState.bind(this),this.render=this.render.bind(this),this.start=this.start.bind(this),this.stop=this.stop.bind(this),this.takeSnapshot=this.takeSnapshot.bind(this),this.startRecording=this.startRecording.bind(this),this.stopRecording=this.stopRecording.bind(this),this.discardRecordedMedia=this.discardRecordedMedia.bind(this),this.submit=this.submit.bind(this),this.oneTwoThreeSmile=this.oneTwoThreeSmile.bind(this),this.focus=this.focus.bind(this),this.changeVideoSource=this.changeVideoSource.bind(this),this.webcamActive=!1,this.opts.countdown&&(this.opts.onBeforeSnapshot=this.oneTwoThreeSmile),this.setPluginState({hasCamera:!1,cameraReady:!1,cameraError:null,recordingLengthSeconds:0,videoSources:[],currentDeviceId:null,capturedSnapshot:null})}getStatus(){const{recordedVideo:e,capturedSnapshot:t,isRecording:i,cameraReady:r,cameraError:o}=this.getPluginState();return i?"recording":null!=e||null!=t?"captured":r?"ready":o?"error":"init"}setOptions(e){super.setOptions({...e,videoConstraints:{...this.opts.videoConstraints,...e?.videoConstraints}})}hasCameraCheck(){return this.mediaDevices?this.mediaDevices.enumerateDevices().then((e=>e.some((e=>"videoinput"===e.kind)))):Promise.resolve(!1)}isAudioOnly(){return 1===this.opts.modes.length&&"audio-only"===this.opts.modes[0]}getConstraints(e=null){const t=-1!==this.opts.modes.indexOf("video-audio")||-1!==this.opts.modes.indexOf("audio-only"),i=!this.isAudioOnly()&&(-1!==this.opts.modes.indexOf("video-audio")||-1!==this.opts.modes.indexOf("video-only")||-1!==this.opts.modes.indexOf("picture")),r={...this.opts.videoConstraints||{},...null!=e&&{deviceId:e}};return{audio:t,video:!!i&&r}}start(e=null){if(!this.supportsUserMedia)return Promise.reject(new Error("Webcam access not supported"));this.webcamActive=!0,this.opts.mirror&&(this.#Y=!0);const t=this.getConstraints(e?.deviceId);this.hasCameraCheck().then((i=>(this.setPluginState({hasCamera:i}),this.mediaDevices.getUserMedia(t).then((t=>{this.stream=t;let i=null;const r=this.isAudioOnly()?t.getAudioTracks():t.getVideoTracks();e&&e.deviceId?r.forEach((t=>{t.getSettings().deviceId===e.deviceId&&(i=t.getSettings().deviceId)})):i=r[0].getSettings().deviceId,this.updateVideoSources(),this.setPluginState({currentDeviceId:i,cameraReady:!0})})).catch((e=>{this.setPluginState({cameraReady:!1,cameraError:e}),this.uppy.info(e.message,"error")})))))}getMediaRecorderOptions(){const e={};if(MediaRecorder.isTypeSupported){const{restrictions:t}=this.uppy.opts;let i=[];this.opts.preferredVideoMimeType?i=[this.opts.preferredVideoMimeType]:t.allowedFileTypes&&(i=t.allowedFileTypes.map(Bd).filter(Pd));const r=i.filter((e=>MediaRecorder.isTypeSupported(e)&&_r(e)));r.length>0&&(e.mimeType=r[0])}return e}startRecording(){this.recorder=new MediaRecorder(this.stream,this.getMediaRecorderOptions()),this.recordingChunks=[];let e=!1;this.recorder.addEventListener("dataavailable",(t=>{this.recordingChunks.push(t.data);const{restrictions:i}=this.uppy.opts;if(this.recordingChunks.length>1&&null!=i.maxFileSize&&!e){const t=this.recordingChunks.reduce(((e,t)=>e+t.size),0);t>Math.max(0,i.maxFileSize-(t-this.recordingChunks[0].size)/(this.recordingChunks.length-1)*3)&&(e=!0,this.uppy.info(this.i18n("recordingStoppedMaxSize"),"warning",4e3),this.stopRecording())}})),this.recorder.start(500),this.opts.showRecordingLength&&(this.recordingLengthTimer=setInterval((()=>{const e=this.getPluginState().recordingLengthSeconds;this.setPluginState({recordingLengthSeconds:e+1})}),1e3)),this.setPluginState({isRecording:!0})}stopRecording(){return new Promise((e=>{this.recorder.addEventListener("stop",(()=>{e()})),this.recorder.stop(),this.opts.showRecordingLength&&(clearInterval(this.recordingLengthTimer),this.setPluginState({recordingLengthSeconds:0}))})).then((()=>(this.setPluginState({isRecording:!1}),this.getVideo()))).then((e=>{try{this.capturedMediaFile=e,this.setPluginState({recordedVideo:URL.createObjectURL(e.data)}),this.#Y=!1}catch(e){e.isRestriction||this.uppy.log(e)}})).then((()=>{this.recordingChunks=null,this.recorder=null}),(e=>{throw this.recordingChunks=null,this.recorder=null,e}))}discardRecordedMedia(){const{recordedVideo:e,capturedSnapshot:t}=this.getPluginState();e&&URL.revokeObjectURL(e),t&&URL.revokeObjectURL(t),this.setPluginState({recordedVideo:null,capturedSnapshot:null}),this.opts.mirror&&(this.#Y=!0),this.capturedMediaFile=null}submit(){try{this.capturedMediaFile&&this.uppy.addFile(this.capturedMediaFile)}catch(e){e.isRestriction||this.uppy.log(e,"error")}}async stop(){if(this.stream){const e=this.stream.getAudioTracks(),t=this.stream.getVideoTracks();e.concat(t).forEach((e=>e.stop()))}this.recorder&&await new Promise((e=>{this.recorder.addEventListener("stop",e,{once:!0}),this.recorder.stop(),this.opts.showRecordingLength&&clearInterval(this.recordingLengthTimer)})),this.recordingChunks=null,this.recorder=null,this.webcamActive=!1,this.stream=null,this.setPluginState({recordedVideo:null,capturedSnapshot:null,isRecording:!1,recordingLengthSeconds:0})}getVideoElement(){return this.el.querySelector(".uppy-Webcam-video")}oneTwoThreeSmile(){return new Promise(((e,t)=>{let i=this.opts.countdown;const r=setInterval((()=>{if(!this.webcamActive)return clearInterval(r),this.captureInProgress=!1,t(new Error("Webcam is not active"));i?(this.uppy.info(`${i}...`,"warning",800),i--):(clearInterval(r),this.uppy.info(this.i18n("smile"),"success",1500),setTimeout((()=>e()),1500))}),1e3)}))}async takeSnapshot(){if(!this.captureInProgress){this.captureInProgress=!0;try{await this.opts.onBeforeSnapshot()}catch(e){const t="object"==typeof e?e.message:e;throw this.uppy.info(t,"error",5e3),new Error(`onBeforeSnapshot: ${t}`)}try{const e=await this.getImage();if(this.capturedMediaFile=e,null==e.data)throw new Error("File data is empty");const t=URL.createObjectURL(e.data);this.setPluginState({capturedSnapshot:t}),this.captureInProgress=!1}catch(e){this.captureInProgress=!1,e.isRestriction||this.uppy.log(e)}}}async getImage(){const e=this.getVideoElement();if(!e)return Promise.reject(new Error("No video element found, likely due to the Webcam tab being closed."));const t=e.videoWidth,i=e.videoHeight,r=document.createElement("canvas");r.width=t,r.height=i,r.getContext("2d").drawImage(e,0,0);const{restrictions:o}=this.uppy.opts;let s=[];this.opts.preferredImageMimeType?s=[this.opts.preferredImageMimeType]:o.allowedFileTypes&&(s=o.allowedFileTypes.map(Bd).filter(zd));const a=s[0]||"image/jpeg",n=_r(a)||"jpg",l=`cam-${Date.now()}.${n}`;return function(e,t){return new Promise((i=>{e.toBlob(i,t,undefined)}))}(r,a).then((e=>({source:this.id,name:l,data:new Blob([e],{type:a}),type:a})))}getVideo(){const e=this.recordingChunks.find((e=>e.type?.length>0)).type,t=_r(e);if(!t)return Promise.reject(new Error(`Could not retrieve recording: Unsupported media type "${e}"`));const i=`webcam-${Date.now()}.${t}`,r=new Blob(this.recordingChunks,{type:e}),o={source:this.id,name:i,data:new Blob([r],{type:e}),type:e};return Promise.resolve(o)}focus(){this.opts.countdown&&setTimeout((()=>{this.uppy.info(this.i18n("smile"),"success",1500)}),1e3)}changeVideoSource(e){this.stop(),this.start({deviceId:e})}updateVideoSources(){this.mediaDevices.enumerateDevices().then((e=>{this.setPluginState({videoSources:e.filter((e=>"videoinput"===e.kind))})}))}render(){this.webcamActive||this.start();const e=this.getPluginState();return e.cameraReady&&e.hasCamera?Mo(Dd,{...e,onChangeVideoSource:this.changeVideoSource,onSnapshot:this.takeSnapshot,onStartRecording:this.startRecording,onStopRecording:this.stopRecording,onDiscardRecordedMedia:this.discardRecordedMedia,onSubmit:this.submit,onFocus:this.focus,onStop:this.stop,i18n:this.i18n,modes:this.opts.modes,showRecordingLength:this.opts.showRecordingLength,showVideoSourceDropdown:this.opts.showVideoSourceDropdown,supportsRecording:"function"==typeof MediaRecorder&&!!MediaRecorder.prototype&&"function"==typeof MediaRecorder.prototype.start,recording:e.isRecording,mirror:this.#Y,src:this.stream}):Mo(Cd,{icon:bd,i18n:this.i18n,hasCamera:e.hasCamera})}install(){const{mobileNativeCamera:e,modes:t,videoConstraints:i}=this.opts,{target:r}=this.opts;e&&r?this.getTargetPlugin(r)?.setOptions({showNativeVideoCameraButton:Fd(t,"video-only")||Fd(t,"video-audio"),showNativePhotoCameraButton:Fd(t,"picture"),nativeCameraFacingMode:i?.facingMode}):(this.setPluginState({cameraReady:!1,recordingLengthSeconds:0}),r&&this.mount(r,this),this.mediaDevices&&(this.updateVideoSources(),this.mediaDevices.ondevicechange=()=>{if(this.updateVideoSources(),this.stream){let e=!0;const{videoSources:t,currentDeviceId:i}=this.getPluginState();t.forEach((t=>{i===t.deviceId&&(e=!1)})),e&&(this.stop(),this.start())}}))}uninstall(){this.stop(),this.unmount()}onUnmount(){this.stop()}}const Ed={withStackTrace:!1},_d=(e,t,i=Ed)=>({data:t.isOk()?{type:"Ok",value:t.value}:{type:"Err",value:t.error},message:e,stack:i.withStackTrace?(new Error).stack:void 0});function Md(e,t,i,r){return new(i||(i=Promise))((function(t,o){function s(e){try{n(r.next(e))}catch(e){o(e)}}function a(e){try{n(r.throw(e))}catch(e){o(e)}}function n(e){var r;e.done?t(e.value):(r=e.value,r instanceof i?r:new i((function(e){e(r)}))).then(s,a)}n((r=r.apply(e,[])).next())}))}function Rd(e){return this instanceof Rd?(this.v=e,this):new Rd(e)}function Nd(e,t,i){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,o=i.apply(e,t||[]),s=[];return r=Object.create(("function"==typeof AsyncIterator?AsyncIterator:Object).prototype),a("next"),a("throw"),a("return",(function(e){return function(t){return Promise.resolve(t).then(e,d)}})),r[Symbol.asyncIterator]=function(){return this},r;function a(e,t){o[e]&&(r[e]=function(t){return new Promise((function(i,r){s.push([e,t,i,r])>1||n(e,t)}))},t&&(r[e]=t(r[e])))}function n(e,t){try{!function(e){e.value instanceof Rd?Promise.resolve(e.value.v).then(l,d):p(s[0][2],e)}(o[e](t))}catch(e){p(s[0][3],e)}}function l(e){n("next",e)}function d(e){n("throw",e)}function p(e,t){e(t),s.shift(),s.length&&n(s[0][0],s[0][1])}}function Ud(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,i=e[Symbol.asyncIterator];return i?i.call(e):(e=function(e){var t="function"==typeof Symbol&&Symbol.iterator,i=t&&e[t],r=0;if(i)return i.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(i){t[i]=e[i]&&function(t){return new Promise((function(r,o){!function(e,t,i,r){Promise.resolve(r).then((function(t){e({value:t,done:i})}),t)}(r,o,(t=e[i](t)).done,t.value)}))}}}"function"==typeof SuppressedError&&SuppressedError;class Od{constructor(e){this._promise=e}static fromSafePromise(e){const t=e.then((e=>new qd(e)));return new Od(t)}static fromPromise(e,t){const i=e.then((e=>new qd(e))).catch((e=>new Gd(t(e))));return new Od(i)}static fromThrowable(e,t){return(...i)=>new Od((()=>Md(this,0,void 0,(function*(){try{return new qd(yield e(...i))}catch(e){return new Gd(t?t(e):e)}})))())}static combine(e){return Wd(e)}static combineWithAllErrors(e){return Hd(e)}map(e){return new Od(this._promise.then((t=>Md(this,0,void 0,(function*(){return t.isErr()?new Gd(t.error):new qd(yield e(t.value))})))))}andThrough(e){return new Od(this._promise.then((t=>Md(this,0,void 0,(function*(){if(t.isErr())return new Gd(t.error);const i=yield e(t.value);return i.isErr()?new Gd(i.error):new qd(t.value)})))))}andTee(e){return new Od(this._promise.then((t=>Md(this,0,void 0,(function*(){if(t.isErr())return new Gd(t.error);try{yield e(t.value)}catch(e){}return new qd(t.value)})))))}orTee(e){return new Od(this._promise.then((t=>Md(this,0,void 0,(function*(){if(t.isOk())return new qd(t.value);try{yield e(t.error)}catch(e){}return new Gd(t.error)})))))}mapErr(e){return new Od(this._promise.then((t=>Md(this,0,void 0,(function*(){return t.isOk()?new qd(t.value):new Gd(yield e(t.error))})))))}andThen(e){return new Od(this._promise.then((t=>{if(t.isErr())return new Gd(t.error);const i=e(t.value);return i instanceof Od?i._promise:i})))}orElse(e){return new Od(this._promise.then((t=>Md(this,0,void 0,(function*(){return t.isErr()?e(t.error):new qd(t.value)})))))}match(e,t){return this._promise.then((i=>i.match(e,t)))}unwrapOr(e){return this._promise.then((t=>t.unwrapOr(e)))}safeUnwrap(){return Nd(this,arguments,(function*(){return yield Rd(yield Rd(yield*function(e){var t,i;return t={},r("next"),r("throw",(function(e){throw e})),r("return"),t[Symbol.iterator]=function(){return this},t;function r(r,o){t[r]=e[r]?function(t){return(i=!i)?{value:Rd(e[r](t)),done:!1}:o?o(t):t}:o}}(Ud(yield Rd(this._promise.then((e=>e.safeUnwrap())))))))}))}then(e,t){return this._promise.then(e,t)}[Symbol.asyncIterator](){return Nd(this,arguments,(function*(){const e=yield Rd(this._promise);return e.isErr()&&(yield yield Rd($d(e.error))),yield Rd(e.value)}))}}function $d(e){return new Od(Promise.resolve(new Gd(e)))}const jd=e=>{let t=Jd([]);for(const i of e){if(i.isErr()){t=Kd(i.error);break}t.map((e=>e.push(i.value)))}return t},Wd=e=>Od.fromSafePromise(Promise.all(e)).andThen(jd),Ld=e=>{let t=Jd([]);for(const i of e)i.isErr()&&t.isErr()?t.error.push(i.error):i.isErr()&&t.isOk()?t=Kd([i.error]):i.isOk()&&t.isOk()&&t.value.push(i.value);return t},Hd=e=>Od.fromSafePromise(Promise.all(e)).andThen(Ld);var Vd;function Jd(e){return new qd(e)}function Kd(e){return new Gd(e)}!function(e){e.fromThrowable=function(e,t){return(...i)=>{try{return Jd(e(...i))}catch(e){return Kd(t?t(e):e)}}},e.combine=function(e){return jd(e)},e.combineWithAllErrors=function(e){return Ld(e)}}(Vd||(Vd={}));class qd{constructor(e){this.value=e}isOk(){return!0}isErr(){return!this.isOk()}map(e){return Jd(e(this.value))}mapErr(e){return Jd(this.value)}andThen(e){return e(this.value)}andThrough(e){return e(this.value).map((()=>this.value))}andTee(e){try{e(this.value)}catch(e){}return Jd(this.value)}orTee(e){return Jd(this.value)}orElse(e){return Jd(this.value)}asyncAndThen(e){return e(this.value)}asyncAndThrough(e){return e(this.value).map((()=>this.value))}asyncMap(e){return Od.fromSafePromise(e(this.value))}unwrapOr(e){return this.value}match(e,t){return e(this.value)}safeUnwrap(){const e=this.value;return function*(){return e}()}_unsafeUnwrap(e){return this.value}_unsafeUnwrapErr(e){throw _d("Called `_unsafeUnwrapErr` on an Ok",this,e)}*[Symbol.iterator](){return this.value}}class Gd{constructor(e){this.error=e}isOk(){return!1}isErr(){return!this.isOk()}map(e){return Kd(this.error)}mapErr(e){return Kd(e(this.error))}andThrough(e){return Kd(this.error)}andTee(e){return Kd(this.error)}orTee(e){try{e(this.error)}catch(e){}return Kd(this.error)}andThen(e){return Kd(this.error)}orElse(e){return e(this.error)}asyncAndThen(e){return $d(this.error)}asyncAndThrough(e){return $d(this.error)}asyncMap(e){return $d(this.error)}unwrapOr(e){return e}match(e,t){return t(this.error)}safeUnwrap(){const e=this.error;return function*(){throw yield Kd(e),new Error("Do not use this generator out of `safeTry`")}()}_unsafeUnwrap(e){throw _d("Called `_unsafeUnwrap` on an Err",this,e)}_unsafeUnwrapErr(e){return this.error}*[Symbol.iterator](){return yield this,this}}const Xd=class{constructor(t){e(this,t),this.accept=["image/*"]}componentDidRender(){const e=(new wa).use(td,{inline:!0,target:this.uppy,theme:"auto"}).use(cd).use(Ad,{modes:["picture"],showVideoSourceDropdown:!0});e.setOptions({restrictions:{allowedFileTypes:this.accept}}),e.addUploader((async t=>{const i=e.getFilesByIds(t);e.emit("upload-start",i);for(const t of i)await this.toFile(t).asyncAndThen((e=>this.uploader(e))).match((()=>e.emit("upload-success",t,{status:201})),(i=>{e.emit("upload-error",t,new Error(i.title+" - "+i.detail))}))}))}toFile(e){return e.data instanceof File?Jd(e.data):e.data instanceof Blob?Jd(new File([e.data],e.name,{type:e.type})):Kd({type:"file",title:"Unknow data type",detail:"Expected file to be a File or Blob object"})}render(){return t("div",{key:"7f1e6cd1c4f7503012242d3872b967be4adcbbc3",class:"container",ref:e=>this.uppy=e})}};Xd.style=".uppy-Root{box-sizing:border-box;color:#333;font-family:-apple-system,system-ui,BlinkMacSystemFont,Segoe UI,Segoe UI Symbol,Segoe UI Emoji,Apple Color Emoji,Roboto,Helvetica,Arial,sans-serif;line-height:1;position:relative;text-align:left;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.uppy-Root[dir=rtl],[dir=rtl] .uppy-Root{text-align:right}.uppy-Root *,.uppy-Root :after,.uppy-Root :before{box-sizing:inherit}.uppy-Root [hidden]{display:none}.uppy-u-reset{all:initial;appearance:none;box-sizing:border-box;font-family:-apple-system,system-ui,BlinkMacSystemFont,Segoe UI,Segoe UI Symbol,Segoe UI Emoji,Apple Color Emoji,Roboto,Helvetica,Arial,sans-serif;line-height:1}[dir=rtl] .uppy-u-reset{text-align:right}.uppy-truncate-text{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.uppy-c-textInput{background-color:#fff;border:1px solid #ddd;border-radius:4px;font-family:inherit;font-size:14px;line-height:1.5;padding:6px 8px}.uppy-size--md .uppy-c-textInput{padding:8px 10px}.uppy-c-textInput:focus{border-color:#1269cf99;box-shadow:0 0 0 3px #1269cf26;outline:none}[data-uppy-theme=dark] .uppy-c-textInput{background-color:#333;border-color:#333;color:#eaeaea}[data-uppy-theme=dark] .uppy-c-textInput:focus{border-color:#525252;box-shadow:none}.uppy-c-icon{display:inline-block;max-height:100%;max-width:100%;overflow:hidden;fill:currentColor}.uppy-c-btn{align-items:center;color:inherit;display:inline-flex;font-family:inherit;font-size:inherit;font-weight:500;justify-content:center;line-height:1;transition-duration:.3s;transition-property:background-color,color;user-select:none;white-space:nowrap}.uppy-c-btn,[dir=rtl] .uppy-c-btn{text-align:center}.uppy-c-btn:not(:disabled):not(.disabled){cursor:pointer}.uppy-c-btn::-moz-focus-inner{border:0}.uppy-c-btn-primary{background-color:#1269cf;border-radius:4px;color:#fff;font-size:14px;padding:10px 18px}.uppy-c-btn-primary:not(:disabled):hover{background-color:#0e51a0}.uppy-c-btn-primary:focus{box-shadow:0 0 0 3px #1269cf66;outline:none}.uppy-size--md .uppy-c-btn-primary{padding:13px 22px}[data-uppy-theme=dark] .uppy-c-btn-primary{color:#eaeaea}[data-uppy-theme=dark] .uppy-c-btn-primary:focus{outline:none}[data-uppy-theme=dark] .uppy-c-btn-primary::-moz-focus-inner{border:0}[data-uppy-theme=dark] .uppy-c-btn-primary:focus{box-shadow:0 0 0 2px #aae1ffd9}.uppy-c-btn-primary.uppy-c-btn--disabled{background-color:#8eb2db}.uppy-c-btn-link{background-color:initial;border-radius:4px;color:#525252;font-size:14px;line-height:1;padding:10px 15px}.uppy-c-btn-link:hover{color:#333}.uppy-c-btn-link:focus{box-shadow:0 0 0 3px #1269cf40;outline:none}.uppy-size--md .uppy-c-btn-link{padding:13px 18px}[data-uppy-theme=dark] .uppy-c-btn-link{color:#eaeaea}[data-uppy-theme=dark] .uppy-c-btn-link:focus{outline:none}[data-uppy-theme=dark] .uppy-c-btn-link::-moz-focus-inner{border:0}[data-uppy-theme=dark] .uppy-c-btn-link:focus{box-shadow:0 0 0 2px #aae1ffd9}[data-uppy-theme=dark] .uppy-c-btn-link:hover{color:#939393}@charset \"UTF-8\";.uppy-ProviderBrowser-viewType--grid ul.uppy-ProviderBrowser-list,.uppy-ProviderBrowser-viewType--unsplash ul.uppy-ProviderBrowser-list{align-items:flex-start;display:flex;flex-direction:row;flex-wrap:wrap;justify-content:space-between;padding:6px}.uppy-ProviderBrowser-viewType--grid ul.uppy-ProviderBrowser-list:after,.uppy-ProviderBrowser-viewType--unsplash ul.uppy-ProviderBrowser-list:after{content:\"\";flex:auto}.uppy-ProviderBrowser-viewType--grid li.uppy-ProviderBrowserItem,.uppy-ProviderBrowser-viewType--unsplash li.uppy-ProviderBrowserItem{margin:0;position:relative;width:50%}.uppy-size--md .uppy-ProviderBrowser-viewType--grid li.uppy-ProviderBrowserItem,.uppy-size--md .uppy-ProviderBrowser-viewType--unsplash li.uppy-ProviderBrowserItem{width:33.3333%}.uppy-size--lg .uppy-ProviderBrowser-viewType--grid li.uppy-ProviderBrowserItem,.uppy-size--lg .uppy-ProviderBrowser-viewType--unsplash li.uppy-ProviderBrowserItem{width:25%}.uppy-ProviderBrowser-viewType--grid li.uppy-ProviderBrowserItem:before,.uppy-ProviderBrowser-viewType--unsplash li.uppy-ProviderBrowserItem:before{content:\"\";display:block;padding-top:100%}.uppy-ProviderBrowser-viewType--grid li.uppy-ProviderBrowserItem--selected img,.uppy-ProviderBrowser-viewType--grid li.uppy-ProviderBrowserItem--selected svg,.uppy-ProviderBrowser-viewType--unsplash li.uppy-ProviderBrowserItem--selected img,.uppy-ProviderBrowser-viewType--unsplash li.uppy-ProviderBrowserItem--selected svg{opacity:.85}.uppy-ProviderBrowser-viewType--grid li.uppy-ProviderBrowserItem--disabled,.uppy-ProviderBrowser-viewType--unsplash li.uppy-ProviderBrowserItem--disabled{opacity:.5}.uppy-ProviderBrowser-viewType--grid li.uppy-ProviderBrowserItem--noPreview .uppy-ProviderBrowserItem-inner,.uppy-ProviderBrowser-viewType--unsplash li.uppy-ProviderBrowserItem--noPreview .uppy-ProviderBrowserItem-inner{background-color:#93939333}[data-uppy-theme=dark] .uppy-ProviderBrowser-viewType--grid li.uppy-ProviderBrowserItem--noPreview .uppy-ProviderBrowserItem-inner,[data-uppy-theme=dark] .uppy-ProviderBrowser-viewType--unsplash li.uppy-ProviderBrowserItem--noPreview .uppy-ProviderBrowserItem-inner{background-color:#eaeaea33}.uppy-ProviderBrowser-viewType--grid li.uppy-ProviderBrowserItem--noPreview svg,.uppy-ProviderBrowser-viewType--unsplash li.uppy-ProviderBrowserItem--noPreview svg{height:30%;width:30%;fill:#000000b3}[data-uppy-theme=dark] .uppy-ProviderBrowser-viewType--grid li.uppy-ProviderBrowserItem--noPreview svg,[data-uppy-theme=dark] .uppy-ProviderBrowser-viewType--unsplash li.uppy-ProviderBrowserItem--noPreview svg{fill:#fffc}.uppy-ProviderBrowser-viewType--grid .uppy-ProviderBrowserItem-inner,.uppy-ProviderBrowser-viewType--unsplash .uppy-ProviderBrowserItem-inner{border-radius:4px;bottom:7px;height:calc(100% - 14px);left:7px;overflow:hidden;position:absolute;right:7px;text-align:center;top:7px;width:calc(100% - 14px)}@media (hover:none){.uppy-ProviderBrowser-viewType--grid .uppy-ProviderBrowserItem-inner .uppy-ProviderBrowserItem-author,.uppy-ProviderBrowser-viewType--unsplash .uppy-ProviderBrowserItem-inner .uppy-ProviderBrowserItem-author{display:block}}[data-uppy-theme=dark] .uppy-ProviderBrowser-viewType--grid .uppy-ProviderBrowserItem-inner,[data-uppy-theme=dark] .uppy-ProviderBrowser-viewType--unsplash .uppy-ProviderBrowserItem-inner{box-shadow:0 0 0 3px #aae1ffb3}.uppy-ProviderBrowser-viewType--grid .uppy-ProviderBrowserItem-inner img,.uppy-ProviderBrowser-viewType--unsplash .uppy-ProviderBrowserItem-inner img{border-radius:4px;height:100%;object-fit:cover;width:100%}.uppy-ProviderBrowser-viewType--grid .uppy-ProviderBrowserItem-author,.uppy-ProviderBrowser-viewType--unsplash .uppy-ProviderBrowserItem-author{background:#0000004d;bottom:0;color:#fff;display:none;font-size:12px;font-weight:500;left:0;margin:0;padding:5px;position:absolute;text-decoration:none;width:100%}.uppy-ProviderBrowser-viewType--grid .uppy-ProviderBrowserItem-author:hover,.uppy-ProviderBrowser-viewType--unsplash .uppy-ProviderBrowserItem-author:hover{background:#0006;text-decoration:underline}.uppy-ProviderBrowser-viewType--grid .uppy-ProviderBrowserItem-checkbox,.uppy-ProviderBrowser-viewType--unsplash .uppy-ProviderBrowserItem-checkbox{background-color:#1269cf;border-radius:50%;height:26px;opacity:0;position:absolute;right:16px;top:16px;width:26px;z-index:1002}.uppy-ProviderBrowser-viewType--grid .uppy-ProviderBrowserItem-checkbox:after,.uppy-ProviderBrowser-viewType--unsplash .uppy-ProviderBrowserItem-checkbox:after{height:7px;inset-inline-start:7px;top:8px;width:12px}.uppy-ProviderBrowser-viewType--grid .uppy-ProviderBrowserItem--is-checked .uppy-ProviderBrowserItem-checkbox,.uppy-ProviderBrowser-viewType--unsplash .uppy-ProviderBrowserItem--is-checked .uppy-ProviderBrowserItem-checkbox{opacity:1}.uppy-ProviderBrowser-viewType--grid .uppy-ProviderBrowserItem-checkbox--grid:focus+label .uppy-ProviderBrowserItem-author,.uppy-ProviderBrowser-viewType--grid .uppy-ProviderBrowserItem-checkbox--grid:hover+label .uppy-ProviderBrowserItem-author,.uppy-ProviderBrowser-viewType--unsplash .uppy-ProviderBrowserItem-checkbox--grid:focus+label .uppy-ProviderBrowserItem-author,.uppy-ProviderBrowser-viewType--unsplash .uppy-ProviderBrowserItem-checkbox--grid:hover+label .uppy-ProviderBrowserItem-author{display:block}.uppy-ProviderBrowser-viewType--grid .uppy-ProviderBrowserItem-checkbox--grid:focus+label,.uppy-ProviderBrowser-viewType--unsplash .uppy-ProviderBrowserItem-checkbox--grid:focus+label{box-shadow:0 0 0 3px #1269cf80}.uppy-ProviderBrowser-viewType--grid .uppy-ProviderBrowserItem-checkbox--grid:focus+label:focus,.uppy-ProviderBrowser-viewType--unsplash .uppy-ProviderBrowserItem-checkbox--grid:focus+label:focus{outline:none}.uppy-ProviderBrowser-viewType--grid .uppy-ProviderBrowserItem-checkbox--grid:focus+label::-moz-focus-inner,.uppy-ProviderBrowser-viewType--unsplash .uppy-ProviderBrowserItem-checkbox--grid:focus+label::-moz-focus-inner{border:0}.uppy-ProviderBrowser-viewType--list{background-color:#fff}[data-uppy-theme=dark] .uppy-ProviderBrowser-viewType--list{background-color:#1f1f1f}.uppy-ProviderBrowser-viewType--list li.uppy-ProviderBrowserItem{align-items:center;display:flex;margin:0;padding:7px 15px}[data-uppy-theme=dark] .uppy-ProviderBrowser-viewType--list li.uppy-ProviderBrowserItem{color:#eaeaea}.uppy-ProviderBrowser-viewType--list li.uppy-ProviderBrowserItem--disabled{opacity:.6}.uppy-ProviderBrowser-viewType--list .uppy-ProviderBrowserItem-checkbox{background-color:#fff;border:1px solid #cfcfcf;border-radius:3px;height:17px;margin-inline-end:15px;width:17px}.uppy-ProviderBrowser-viewType--list .uppy-ProviderBrowserItem-checkbox:focus{border:1px solid #1269cf;box-shadow:0 0 0 3px #1269cf40;outline:none}.uppy-ProviderBrowser-viewType--list .uppy-ProviderBrowserItem-checkbox:after{height:5px;inset-inline-start:3px;opacity:0;top:4px;width:9px}[data-uppy-theme=dark] .uppy-ProviderBrowser-viewType--list .uppy-ProviderBrowserItem-checkbox:focus{border-color:#02baf2b3;box-shadow:0 0 0 3px #02baf233}.uppy-ProviderBrowser-viewType--list .uppy-ProviderBrowserItem--is-checked .uppy-ProviderBrowserItem-checkbox,.uppy-ProviderBrowser-viewType--list .uppy-ProviderBrowserItem--is-partial .uppy-ProviderBrowserItem-checkbox{background-color:#1269cf;border-color:#1269cf}.uppy-ProviderBrowser-viewType--list .uppy-ProviderBrowserItem--is-checked .uppy-ProviderBrowserItem-checkbox:after,.uppy-ProviderBrowser-viewType--list .uppy-ProviderBrowserItem--is-partial .uppy-ProviderBrowserItem-checkbox:after{opacity:1}.uppy-ProviderBrowser-viewType--list .uppy-ProviderBrowserItem-inner{align-items:center;color:inherit;display:flex;font-family:-apple-system,system-ui,BlinkMacSystemFont,Segoe UI,Segoe UI Symbol,Segoe UI Emoji,Apple Color Emoji,Roboto,Helvetica,Arial,sans-serif;overflow:hidden;padding:2px;text-overflow:ellipsis;white-space:nowrap}.uppy-ProviderBrowser-viewType--list .uppy-ProviderBrowserItem-inner:focus{outline:none;text-decoration:underline}.uppy-ProviderBrowser-viewType--list .uppy-ProviderBrowserItem-inner img,.uppy-ProviderBrowser-viewType--list .uppy-ProviderBrowserItem-inner svg{margin-inline-end:8px}.uppy-ProviderBrowser-viewType--list .uppy-ProviderBrowserItem-inner span{line-height:1.2;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.uppy-ProviderBrowser-viewType--list .uppy-ProviderBrowserItem--disabled .uppy-ProviderBrowserItem-inner{cursor:default}.uppy-ProviderBrowser-viewType--list .uppy-ProviderBrowserItem-iconWrap{margin-inline-end:7px;width:20px}.uppy-ProviderBrowserItem-checkbox{cursor:pointer;flex-shrink:0;position:relative}.uppy-ProviderBrowserItem-checkbox:disabled,.uppy-ProviderBrowserItem-checkbox:disabled:after{cursor:default}[data-uppy-theme=dark] .uppy-ProviderBrowserItem-checkbox{background-color:#1f1f1f;border-color:#939393}[data-uppy-theme=dark] .uppy-ProviderBrowserItem--is-checked .uppy-ProviderBrowserItem-checkbox{background-color:#333}.uppy-ProviderBrowserItem--is-checked .uppy-ProviderBrowserItem-checkbox:after{border-bottom:2px solid #eaeaea;border-left:2px solid #eaeaea;content:\"\";cursor:pointer;position:absolute;transform:rotate(-45deg)}.uppy-ProviderBrowserItem--is-partial .uppy-ProviderBrowserItem-checkbox:after{background-color:#eaeaea!important;content:\"\"!important;height:2px!important;left:20%!important;position:absolute!important;right:20%!important;top:50%!important;transform:translateY(-50%)!important}.uppy-SearchProvider{align-items:center;display:flex;flex:1;flex-direction:column;height:100%;justify-content:center;width:100%}[data-uppy-theme=dark] .uppy-SearchProvider{background-color:#1f1f1f}.uppy-SearchProvider-input{margin-bottom:15px;max-width:650px;width:90%}.uppy-size--md .uppy-SearchProvider-input{margin-bottom:20px}.uppy-SearchProvider-input::-webkit-search-cancel-button{display:none}.uppy-SearchProvider-searchButton{padding:13px 25px}.uppy-size--md .uppy-SearchProvider-searchButton{padding:13px 30px}.uppy-DashboardContent-panelBody{align-items:center;display:flex;flex:1;justify-content:center}[data-uppy-theme=dark] .uppy-DashboardContent-panelBody{background-color:#1f1f1f}.uppy-Provider-auth,.uppy-Provider-empty,.uppy-Provider-error,.uppy-Provider-loading{align-items:center;color:#939393;display:flex;flex:1;flex-flow:column wrap;justify-content:center}.uppy-Provider-empty{color:#939393}.uppy-Provider-authIcon svg{height:75px;width:100px}.uppy-Provider-authTitle{color:#757575;font-size:17px;font-weight:400;line-height:1.4;margin-bottom:30px;max-width:500px;padding:0 15px;text-align:center}.uppy-size--md .uppy-Provider-authTitle{font-size:20px}[data-uppy-theme=dark] .uppy-Provider-authTitle{color:#cfcfcf}.uppy-Provider-btn-google{align-items:center;background:#4285f4;display:flex;padding:8px 12px!important}.uppy-Provider-btn-google:hover{background-color:#1266f1}.uppy-Provider-btn-google:focus{box-shadow:0 0 0 3px #4285f466;outline:none}.uppy-Provider-btn-google svg{margin-right:8px}.uppy-Provider-breadcrumbs{color:#525252;flex:1;font-size:12px;margin-bottom:10px;text-align:start}.uppy-size--md .uppy-Provider-breadcrumbs{margin-bottom:0}[data-uppy-theme=dark] .uppy-Provider-breadcrumbs{color:#eaeaea}.uppy-Provider-breadcrumbsIcon{color:#525252;display:inline-block;line-height:1;margin-inline-end:4px;vertical-align:middle}.uppy-Provider-breadcrumbsIcon svg{height:13px;width:13px;fill:#525252}.uppy-Provider-breadcrumbs button{border-radius:3px;display:inline-block;line-height:inherit;padding:4px}.uppy-Provider-breadcrumbs button:focus{outline:none}.uppy-Provider-breadcrumbs button::-moz-focus-inner{border:0}.uppy-Provider-breadcrumbs button:hover{color:#0e51a0}.uppy-Provider-breadcrumbs button:focus{background-color:#dfe6f1}[data-uppy-theme=dark] .uppy-Provider-breadcrumbs button:focus{background-color:#333}.uppy-Provider-breadcrumbs button:not(:last-of-type){text-decoration:underline}.uppy-Provider-breadcrumbs button:last-of-type{color:#333;cursor:normal;font-weight:500;pointer-events:none}.uppy-Provider-breadcrumbs button:hover{cursor:pointer}[data-uppy-theme=dark] .uppy-Provider-breadcrumbs button{color:#eaeaea}.uppy-ProviderBrowser{display:flex;flex:1;flex-direction:column;font-size:14px;font-weight:400;height:100%}.uppy-ProviderBrowser-user{color:#333;font-weight:500;margin:0 8px 0 0}[data-uppy-theme=dark] .uppy-ProviderBrowser-user{color:#eaeaea}.uppy-ProviderBrowser-user:after{color:#939393;content:\"·\";font-weight:400;inset-inline-start:4px;position:relative}.uppy-ProviderBrowser-header{border-bottom:1px solid #eaeaea;position:relative;z-index:1001}[data-uppy-theme=dark] .uppy-ProviderBrowser-header{border-bottom:1px solid #333}.uppy-ProviderBrowser-headerBar{background-color:#fafafa;color:#757575;font-size:12px;line-height:1.4;padding:7px 15px;z-index:1001}.uppy-size--md .uppy-ProviderBrowser-headerBar{align-items:center;display:flex}[data-uppy-theme=dark] .uppy-ProviderBrowser-headerBar{background-color:#1f1f1f}.uppy-ProviderBrowser-headerBar--simple{display:block;justify-content:center;text-align:center}.uppy-ProviderBrowser-headerBar--simple .uppy-Provider-breadcrumbsWrap{display:inline-block;flex:none;vertical-align:middle}.uppy-ProviderBrowser-searchFilter{align-items:center;display:flex;height:30px;margin-bottom:15px;margin-top:15px;padding-left:8px;padding-right:8px;position:relative;width:100%}.uppy-ProviderBrowser-searchFilterInput{background-color:#eaeaea;border:0;border-radius:4px;color:#333;font-family:-apple-system,system-ui,BlinkMacSystemFont,Segoe UI,Segoe UI Symbol,Segoe UI Emoji,Apple Color Emoji,Roboto,Helvetica,Arial,sans-serif;font-size:13px;height:30px;line-height:1.4;outline:0;padding-inline-end:30px;padding-inline-start:30px;width:100%;z-index:1001}.uppy-ProviderBrowser-searchFilterInput::-webkit-search-cancel-button{display:none}[data-uppy-theme=dark] .uppy-ProviderBrowser-searchFilterInput{background-color:#1f1f1f;color:#eaeaea}.uppy-ProviderBrowser-searchFilterInput:focus{background-color:#cfcfcf;border:0}[data-uppy-theme=dark] .uppy-ProviderBrowser-searchFilterInput:focus{background-color:#333}.uppy-ProviderBrowser-searchFilterIcon{color:#757575;height:12px;inset-inline-start:16px;position:absolute;width:12px;z-index:1002}.uppy-ProviderBrowser-searchFilterInput::placeholder{color:#939393;opacity:1}.uppy-ProviderBrowser-searchFilterReset{border-radius:3px;color:#939393;cursor:pointer;height:22px;inset-inline-end:16px;padding:6px;position:absolute;width:22px;z-index:1002}.uppy-ProviderBrowser-searchFilterReset:focus{outline:none}.uppy-ProviderBrowser-searchFilterReset::-moz-focus-inner{border:0}.uppy-ProviderBrowser-searchFilterReset:focus{box-shadow:0 0 0 3px #1269cf80}.uppy-ProviderBrowser-searchFilterReset:hover{color:#757575}.uppy-ProviderBrowser-searchFilterReset svg{vertical-align:text-top}.uppy-ProviderBrowser-userLogout{border-radius:3px;color:#1269cf;cursor:pointer;line-height:inherit;padding:4px}.uppy-ProviderBrowser-userLogout:focus{outline:none}.uppy-ProviderBrowser-userLogout::-moz-focus-inner{border:0}.uppy-ProviderBrowser-userLogout:hover{color:#0e51a0}.uppy-ProviderBrowser-userLogout:focus{background-color:#dfe6f1}[data-uppy-theme=dark] .uppy-ProviderBrowser-userLogout:focus{background-color:#333}.uppy-ProviderBrowser-userLogout:hover{text-decoration:underline}[data-uppy-theme=dark] .uppy-ProviderBrowser-userLogout{color:#eaeaea}.uppy-ProviderBrowser-body{flex:1;position:relative}.uppy-ProviderBrowser-list{background-color:#fff;border-spacing:0;bottom:0;display:block;flex:1;height:100%;left:0;list-style:none;margin:0;overflow-x:hidden;overflow-y:auto;padding:0;position:absolute;right:0;top:0;width:100%;-webkit-overflow-scrolling:touch}[data-uppy-theme=dark] .uppy-ProviderBrowser-list{background-color:#1f1f1f}.uppy-ProviderBrowser-list:focus{outline:none}.uppy-ProviderBrowserItem-inner{cursor:pointer;font-size:13px;font-weight:500}.uppy-ProviderBrowser-footer{align-items:center;background-color:#fff;border-top:1px solid #eaeaea;display:flex;justify-content:space-between;padding:15px}.uppy-ProviderBrowser-footer button{margin-inline-end:8px}[data-uppy-theme=dark] .uppy-ProviderBrowser-footer{background-color:#1f1f1f;border-top:1px solid #333}.uppy-ProviderBrowser-footer-buttons{flex-shrink:0}.uppy-ProviderBrowser-footer-error{color:#e32437;line-height:18px}@media (max-width:426px){.uppy-ProviderBrowser-footer{align-items:stretch;flex-direction:column-reverse}.uppy-ProviderBrowser-footer-error{padding-bottom:10px}}.picker-dialog-bg{z-index:20000!important}.picker-dialog{z-index:20001!important}.uppy-Dashboard-Item-previewInnerWrap{align-items:center;border-radius:3px;box-shadow:0 0 2px 0 #0006;display:flex;flex-direction:column;height:100%;justify-content:center;overflow:hidden;position:relative;width:100%}.uppy-size--md .uppy-Dashboard-Item-previewInnerWrap{box-shadow:0 1px 2px #00000026}.uppy-Dashboard--singleFile .uppy-Dashboard-Item-previewInnerWrap{box-shadow:none}.uppy-Dashboard-Item-previewInnerWrap:after{background-color:#000000a6;bottom:0;content:\"\";display:none;left:0;position:absolute;right:0;top:0;z-index:1001}.uppy-Dashboard-Item-previewLink{bottom:0;left:0;position:absolute;right:0;top:0;z-index:1002}.uppy-Dashboard-Item-previewLink:focus{box-shadow:inset 0 0 0 3px #579df0}[data-uppy-theme=dark] .uppy-Dashboard-Item-previewLink:focus{box-shadow:inset 0 0 0 3px #016c8d}.uppy-Dashboard-Item-preview img.uppy-Dashboard-Item-previewImg{border-radius:3px;height:100%;object-fit:cover;transform:translateZ(0);width:100%}.uppy-Dashboard--singleFile .uppy-Dashboard-Item-preview img.uppy-Dashboard-Item-previewImg{height:auto;max-height:100%;max-width:100%;object-fit:contain;padding:10px;width:auto}.uppy-Dashboard-Item-progress{color:#fff;left:50%;position:absolute;text-align:center;top:50%;transform:translate(-50%,-50%);transition:all .35 ease;width:120px;z-index:1002}.uppy-Dashboard-Item-progressIndicator{color:#fff;display:inline-block;height:38px;opacity:.9;width:38px}.uppy-size--md .uppy-Dashboard-Item-progressIndicator{height:55px;width:55px}button.uppy-Dashboard-Item-progressIndicator{cursor:pointer}button.uppy-Dashboard-Item-progressIndicator:focus{outline:none}button.uppy-Dashboard-Item-progressIndicator::-moz-focus-inner{border:0}button.uppy-Dashboard-Item-progressIndicator:focus .uppy-Dashboard-Item-progressIcon--bg,button.uppy-Dashboard-Item-progressIndicator:focus .uppy-Dashboard-Item-progressIcon--retry{fill:#579df0}.uppy-Dashboard-Item-progressIcon--circle{height:100%;width:100%}.uppy-Dashboard-Item-progressIcon--bg{stroke:#fff6}.uppy-Dashboard-Item-progressIcon--progress{transition:stroke-dashoffset .5s ease-out;stroke:#fff}.uppy-Dashboard-Item-progressIcon--play{transition:all .2s;fill:#fff;stroke:#fff}.uppy-Dashboard-Item-progressIcon--cancel{transition:all .2s;fill:#fff}.uppy-Dashboard-Item-progressIcon--pause{transition:all .2s;fill:#fff;stroke:#fff}.uppy-Dashboard-Item-progressIcon--check{transition:all .2s;fill:#fff}.uppy-Dashboard-Item-progressIcon--retry{fill:#fff}.uppy-Dashboard-Item.is-complete .uppy-Dashboard-Item-progress{inset-inline-end:-8px;inset-inline-start:auto;top:-9px;transform:none;width:auto}.uppy-Dashboard-Item.is-error .uppy-Dashboard-Item-progressIndicator{height:18px;width:18px}.uppy-size--md .uppy-Dashboard-Item.is-error .uppy-Dashboard-Item-progressIndicator{height:28px;width:28px}.uppy-Dashboard-Item.is-complete .uppy-Dashboard-Item-progressIndicator{height:18px;opacity:1;width:18px}.uppy-size--md .uppy-Dashboard-Item.is-complete .uppy-Dashboard-Item-progressIndicator{height:22px;width:22px}.uppy-Dashboard-Item.is-processing .uppy-Dashboard-Item-progress{opacity:0}.uppy-Dashboard-Item-fileInfo{padding-inline-end:5px}.uppy-Dashboard--singleFile .uppy-Dashboard-Item-fileInfo{padding-inline-end:10px}.uppy-size--md.uppy-Dashboard--singleFile .uppy-Dashboard-Item-fileInfo{padding-inline-end:15px}.uppy-Dashboard-Item-name{font-size:12px;font-weight:500;line-height:1.3;margin-bottom:5px;word-wrap:anywhere;word-break:break-all}[data-uppy-theme=dark] .uppy-Dashboard-Item-name{color:#eaeaea}.uppy-size--md.uppy-Dashboard--singleFile .uppy-Dashboard-Item-name{font-size:14px;line-height:1.4}.uppy-Dashboard-Item-fileName{align-items:baseline;display:flex}.uppy-Dashboard-Item-fileName button{margin-left:5px}.uppy-Dashboard-Item-author{color:#757575;display:inline-block;font-size:11px;font-weight:400;line-height:1;margin-bottom:5px;vertical-align:bottom}.uppy-Dashboard-Item-author a{color:#757575}.uppy-Dashboard-Item-status{color:#757575;font-size:11px;font-weight:400;line-height:1}[data-uppy-theme=dark] .uppy-Dashboard-Item-status{color:#bbb}.uppy-Dashboard-Item-statusSize{display:inline-block;margin-bottom:5px;text-transform:uppercase;vertical-align:bottom}.uppy-Dashboard-Item-reSelect{color:#1269cf;font-family:inherit;font-size:inherit;font-weight:600}.uppy-Dashboard-Item-errorMessage{background-color:#fdeff1;color:#a51523;font-size:11px;font-weight:500;line-height:1.3;padding:5px 6px}.uppy-Dashboard-Item-errorMessageBtn{color:#a51523;cursor:pointer;font-size:11px;font-weight:500;text-decoration:underline}.uppy-Dashboard-Item-preview .uppy-Dashboard-Item-errorMessage{display:none}.uppy-size--md .uppy-Dashboard-Item-preview .uppy-Dashboard-Item-errorMessage{border-bottom-left-radius:3px;border-bottom-right-radius:3px;border-top:1px solid #f7c2c8;bottom:0;display:block;left:0;line-height:1.4;padding:6px 8px;position:absolute;right:0}.uppy-Dashboard-Item-fileInfo .uppy-Dashboard-Item-errorMessage{border:1px solid #f7c2c8;border-radius:3px;display:inline-block;position:static}.uppy-size--md .uppy-Dashboard-Item-fileInfo .uppy-Dashboard-Item-errorMessage{display:none}.uppy-Dashboard-Item-action{color:#939393;cursor:pointer}.uppy-Dashboard-Item-action:focus{outline:none}.uppy-Dashboard-Item-action::-moz-focus-inner{border:0}.uppy-Dashboard-Item-action:focus{box-shadow:0 0 0 3px #1269cf80}.uppy-Dashboard-Item-action:hover{color:#1f1f1f;opacity:1}[data-uppy-theme=dark] .uppy-Dashboard-Item-action{color:#cfcfcf}[data-uppy-theme=dark] .uppy-Dashboard-Item-action:focus{outline:none}[data-uppy-theme=dark] .uppy-Dashboard-Item-action::-moz-focus-inner{border:0}[data-uppy-theme=dark] .uppy-Dashboard-Item-action:focus{box-shadow:0 0 0 2px #aae1ffd9}[data-uppy-theme=dark] .uppy-Dashboard-Item-action:hover{color:#eaeaea}.uppy-Dashboard-Item-action--remove{color:#1f1f1f;opacity:.95}.uppy-Dashboard-Item-action--remove:hover{color:#000;opacity:1}.uppy-size--md .uppy-Dashboard-Item-action--remove{height:18px;inset-inline-end:-8px;padding:0;position:absolute;top:-8px;width:18px;z-index:1002}.uppy-size--md .uppy-Dashboard-Item-action--remove:focus{border-radius:50%}.uppy-Dashboard--singleFile.uppy-size--height-md .uppy-Dashboard-Item-action--remove{inset-inline-end:8px;position:absolute;top:8px}[data-uppy-theme=dark] .uppy-Dashboard-Item-action--remove{color:#525252}[data-uppy-theme=dark] .uppy-Dashboard-Item-action--remove:hover{color:#333}.uppy-Dashboard:not(.uppy-size--md):not(.uppy-Dashboard--singleFile.uppy-size--height-md) .uppy-Dashboard-Item-actionWrapper{align-items:center;display:flex}.uppy-Dashboard:not(.uppy-size--md):not(.uppy-Dashboard--singleFile.uppy-size--height-md) .uppy-Dashboard-Item-action{height:22px;margin-left:3px;padding:3px;width:22px}.uppy-Dashboard:not(.uppy-size--md):not(.uppy-Dashboard--singleFile.uppy-size--height-md) .uppy-Dashboard-Item-action:focus{border-radius:3px}.uppy-size--md .uppy-Dashboard-Item-action--copyLink,.uppy-size--md .uppy-Dashboard-Item-action--edit{height:16px;padding:0;width:16px}.uppy-size--md .uppy-Dashboard-Item-action--copyLink:focus,.uppy-size--md .uppy-Dashboard-Item-action--edit:focus{border-radius:3px}.uppy-Dashboard-Item{align-items:center;border-bottom:1px solid #eaeaea;display:flex;padding:10px}.uppy-Dashboard:not(.uppy-Dashboard--singleFile) .uppy-Dashboard-Item{padding-inline-end:0}[data-uppy-theme=dark] .uppy-Dashboard-Item{border-bottom:1px solid #333}.uppy-size--md .uppy-Dashboard-Item{border-bottom:0;display:block;float:inline-start;height:215px;margin:5px 15px;padding:0;position:relative;width:calc(33.333% - 30px)}.uppy-size--lg .uppy-Dashboard-Item{height:190px;margin:5px 15px;padding:0;width:calc(25% - 30px)}.uppy-size--xl .uppy-Dashboard-Item{height:210px;padding:0;width:calc(20% - 30px)}.uppy-Dashboard--singleFile .uppy-Dashboard-Item{border-bottom:0;display:flex;flex-direction:column;height:100%;max-width:400px;padding:15px;position:relative;width:100%}.uppy-Dashboard-Item.is-ghost .uppy-Dashboard-Item-previewInnerWrap{opacity:.2}.uppy-Dashboard-Item.is-ghost .uppy-Dashboard-Item-name{opacity:.7}.uppy-Dashboard-Item.is-ghost .uppy-Dashboard-Item-preview:before{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='35' height='39' viewBox='0 0 35 39'%3E%3Cpath fill='%2523000' d='M1.708 38.66c1.709 0 3.417-3.417 6.834-3.417s5.125 3.417 8.61 3.417c3.348 0 5.056-3.417 8.473-3.417 4.305 0 5.125 3.417 6.833 3.417.889 0 1.709-.889 1.709-1.709v-19.68C34.167-5.757 0-5.757 0 17.271v19.68c0 .82.888 1.709 1.708 1.709m8.542-17.084a3.383 3.383 0 0 1-3.417-3.416 3.383 3.383 0 0 1 3.417-3.417 3.383 3.383 0 0 1 3.417 3.417 3.383 3.383 0 0 1-3.417 3.416m13.667 0A3.383 3.383 0 0 1 20.5 18.16a3.383 3.383 0 0 1 3.417-3.417 3.383 3.383 0 0 1 3.416 3.417 3.383 3.383 0 0 1-3.416 3.416'/%3E%3C/svg%3E\");background-position:50% 10px;background-repeat:no-repeat;background-size:25px;bottom:0;content:\"\";left:0;opacity:.5;position:absolute;right:0;top:0;z-index:1005}.uppy-size--md .uppy-Dashboard-Item.is-ghost .uppy-Dashboard-Item-preview:before{background-position:50% 50%;background-size:40px}.uppy-Dashboard--singleFile .uppy-Dashboard-Item.is-ghost .uppy-Dashboard-Item-preview:before{background-position:50% 50%;background-size:30%}.uppy-Dashboard-Item-preview{flex-grow:0;flex-shrink:0;height:50px;position:relative;width:50px}.uppy-size--md .uppy-Dashboard-Item-preview{height:140px;width:100%}.uppy-size--lg .uppy-Dashboard-Item-preview{height:120px}.uppy-size--xl .uppy-Dashboard-Item-preview{height:140px}.uppy-Dashboard--singleFile .uppy-Dashboard-Item-preview{flex-grow:1;max-height:75%;width:100%}.uppy-Dashboard--singleFile.uppy-size--md .uppy-Dashboard-Item-preview{max-height:100%}.uppy-Dashboard-Item-fileInfoAndButtons{align-items:center;display:flex;flex-grow:1;justify-content:space-between;padding-inline-end:8px;padding-inline-start:12px}.uppy-Dashboard--singleFile .uppy-Dashboard-Item-fileInfoAndButtons,.uppy-size--md .uppy-Dashboard-Item-fileInfoAndButtons{align-items:flex-start;padding:9px 0 0}.uppy-Dashboard--singleFile .uppy-Dashboard-Item-fileInfoAndButtons{flex-grow:0;width:100%}.uppy-Dashboard-Item-fileInfo{flex-grow:1;flex-shrink:1}.uppy-Dashboard-Item-actionWrapper{flex-grow:0;flex-shrink:0}.uppy-Dashboard-Item.is-error .uppy-Dashboard-Item-previewInnerWrap:after,.uppy-Dashboard-Item.is-inprogress .uppy-Dashboard-Item-previewInnerWrap:after{display:block}.uppy-Dashboard-Item-errorDetails{appearance:none;background-color:#939393;border:none;border-radius:50%;color:#fff;cursor:help;flex-shrink:0;font-size:10px;font-weight:600;height:13px;inset-inline-start:2px;line-height:12px;position:relative;text-align:center;top:0;width:13px}.uppy-Dashboard-Item-errorDetails:after{line-height:1.3;word-wrap:break-word}.uppy-Dashboard-FileCard{background-color:#fff;border-radius:5px;bottom:0;box-shadow:0 0 10px 4px #0000001a;display:flex;flex-direction:column;height:100%;left:0;position:absolute;right:0;top:0;width:100%;z-index:1005}.uppy-Dashboard-FileCard .uppy-DashboardContent-bar{border-top-left-radius:5px;border-top-right-radius:5px}.uppy-Dashboard-FileCard .uppy-Dashboard-FileCard-actions{border-bottom-left-radius:5px;border-bottom-right-radius:5px}.uppy-Dashboard-FileCard-inner{display:flex;flex-direction:column;flex-grow:1;flex-shrink:1;height:100%;min-height:0}.uppy-Dashboard-FileCard-preview{align-items:center;border-bottom:1px solid #eaeaea;display:flex;flex-grow:0;flex-shrink:1;height:60%;justify-content:center;min-height:0;position:relative}[data-uppy-theme=dark] .uppy-Dashboard-FileCard-preview{background-color:#333;border-bottom:0}.uppy-Dashboard-FileCard-preview img.uppy-Dashboard-Item-previewImg{border-radius:3px;box-shadow:0 3px 20px #00000026;flex:0 0 auto;max-height:90%;max-width:90%;object-fit:cover}.uppy-Dashboard-FileCard-edit{background-color:#00000080;border-radius:50px;color:#fff;font-size:13px;inset-inline-end:10px;padding:7px 15px;position:absolute;top:10px}.uppy-Dashboard-FileCard-edit:focus{outline:none}.uppy-Dashboard-FileCard-edit::-moz-focus-inner{border:0}.uppy-Dashboard-FileCard-edit:focus{box-shadow:0 0 0 3px #1269cf80}.uppy-Dashboard-FileCard-edit:hover{background-color:#000c}.uppy-Dashboard-FileCard-info{flex-grow:0;flex-shrink:0;height:40%;overflow-y:auto;padding:30px 20px 20px;-webkit-overflow-scrolling:touch}[data-uppy-theme=dark] .uppy-Dashboard-FileCard-info{background-color:#1f1f1f}.uppy-Dashboard-FileCard-fieldset{border:0;font-size:0;margin:auto auto 12px;max-width:640px;padding:0}.uppy-Dashboard-FileCard-label{color:#525252;display:inline-block;font-size:12px;vertical-align:middle;width:22%}.uppy-size--md .uppy-Dashboard-FileCard-label{font-size:14px}[data-uppy-theme=dark] .uppy-Dashboard-FileCard-label{color:#eaeaea}.uppy-Dashboard-FileCard-input{display:inline-block;vertical-align:middle;width:78%}.uppy-Dashboard-FileCard-actions{align-items:center;background-color:#fafafa;border-top:1px solid #eaeaea;display:flex;flex-grow:0;flex-shrink:0;height:55px;padding:0 15px}.uppy-size--md .uppy-Dashboard-FileCard-actions{height:65px}[data-uppy-theme=dark] .uppy-Dashboard-FileCard-actions{background-color:#1f1f1f;border-top:1px solid #333}.uppy-Dashboard-FileCard-actionsBtn{margin-inline-end:10px}.uppy-Informer{bottom:60px;left:0;position:absolute;right:0;text-align:center;z-index:1005}.uppy-Informer span>div{margin-bottom:6px}.uppy-Informer-animated{opacity:0;transform:translateY(350%);transition:all .3s ease-in;z-index:-1000}.uppy-Informer p{background-color:#757575;border-radius:18px;color:#fff;display:inline-block;font-size:12px;font-weight:400;line-height:1.4;margin:0;max-width:90%;padding:6px 15px}.uppy-size--md .uppy-Informer p{font-size:14px;line-height:1.3;max-width:500px;padding:10px 20px}[data-uppy-theme=dark] .uppy-Informer p{background-color:#333}.uppy-Informer p span{background-color:#fff;border-radius:50%;color:#525252;display:inline-block;font-size:10px;height:13px;inset-inline-start:3px;line-height:12px;margin-inline-start:-1px;position:relative;top:-1px;vertical-align:middle;width:13px}.uppy-Informer p span:hover{cursor:help}.uppy-Informer p span:after{line-height:1.3;word-wrap:break-word}.uppy-Root [aria-label][role~=tooltip]{position:relative}.uppy-Root [aria-label][role~=tooltip]:after,.uppy-Root [aria-label][role~=tooltip]:before{-webkit-backface-visibility:hidden;backface-visibility:hidden;box-sizing:border-box;opacity:0;pointer-events:none;position:absolute;transform:translateZ(0);transform-origin:top;transition:all var(--microtip-transition-duration,.18s) var(--microtip-transition-easing,ease-in-out) var(--microtip-transition-delay,0s);will-change:transform;z-index:10}.uppy-Root [aria-label][role~=tooltip]:before{background-size:100% auto!important;content:\"\"}.uppy-Root [aria-label][role~=tooltip]:after{background:#111111e6;border-radius:4px;box-sizing:initial;color:#fff;content:attr(aria-label);font-size:var(--microtip-font-size,13px);font-weight:var(--microtip-font-weight,normal);padding:.5em 1em;text-transform:var(--microtip-text-transform,none);white-space:nowrap}.uppy-Root [aria-label][role~=tooltip]:focus:after,.uppy-Root [aria-label][role~=tooltip]:focus:before,.uppy-Root [aria-label][role~=tooltip]:hover:after,.uppy-Root [aria-label][role~=tooltip]:hover:before{opacity:1;pointer-events:auto}.uppy-Root [role~=tooltip][data-microtip-position|=top]:before{background:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='36' height='12'%3E%3Cpath fill='rgba(17, 17, 17, 0.9)' d='M2.658 0h32.004c-6 0-11.627 12.002-16.002 12.002S8.594 0 2.658 0'/%3E%3C/svg%3E\") no-repeat;bottom:100%;height:6px;left:50%;margin-bottom:5px;transform:translate3d(-50%,0,0);width:18px}.uppy-Root [role~=tooltip][data-microtip-position|=top]:after{bottom:100%;left:50%;margin-bottom:11px;transform:translate3d(-50%,0,0)}.uppy-Root [role~=tooltip][data-microtip-position=top]:hover:after,.uppy-Root [role~=tooltip][data-microtip-position|=top]:hover:before{transform:translate3d(-50%,-5px,0)}.uppy-Root [role~=tooltip][data-microtip-position=top-left]:after{bottom:100%;transform:translate3d(calc(-100% + 16px),0,0)}.uppy-Root [role~=tooltip][data-microtip-position=top-left]:hover:after{transform:translate3d(calc(-100% + 16px),-5px,0)}.uppy-Root [role~=tooltip][data-microtip-position=top-right]:after{bottom:100%;transform:translate3d(-16px,0,0)}.uppy-Root [role~=tooltip][data-microtip-position=top-right]:hover:after{transform:translate3d(-16px,-5px,0)}.uppy-Root [role~=tooltip][data-microtip-position|=bottom]:before{background:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='36' height='12'%3E%3Cpath fill='rgba(17, 17, 17, 0.9)' d='M33.342 12H1.338c6 0 11.627-12.002 16.002-12.002S27.406 12 33.342 12'/%3E%3C/svg%3E\") no-repeat;bottom:auto;height:6px;left:50%;margin-bottom:0;margin-top:5px;top:100%;transform:translate3d(-50%,-10px,0);width:18px}.uppy-Root [role~=tooltip][data-microtip-position|=bottom]:after{left:50%;margin-top:11px;top:100%;transform:translate3d(-50%,-10px,0)}.uppy-Root [role~=tooltip][data-microtip-position=bottom]:hover:after,.uppy-Root [role~=tooltip][data-microtip-position|=bottom]:hover:before{transform:translate3d(-50%,0,0)}.uppy-Root [role~=tooltip][data-microtip-position=bottom-left]:after{top:100%;transform:translate3d(calc(-100% + 16px),-10px,0)}.uppy-Root [role~=tooltip][data-microtip-position=bottom-left]:hover:after{transform:translate3d(calc(-100% + 16px),0,0)}.uppy-Root [role~=tooltip][data-microtip-position=bottom-right]:after{top:100%;transform:translate3d(-16px,-10px,0)}.uppy-Root [role~=tooltip][data-microtip-position=bottom-right]:hover:after{transform:translate3d(-16px,0,0)}.uppy-Root [role~=tooltip][data-microtip-position=left]:after,.uppy-Root [role~=tooltip][data-microtip-position=left]:before{bottom:auto;left:auto;right:100%;top:50%;transform:translate3d(10px,-50%,0)}.uppy-Root [role~=tooltip][data-microtip-position=left]:before{background:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='36'%3E%3Cpath fill='rgba(17, 17, 17, 0.9)' d='M0 33.342V1.338c0 6 12.002 11.627 12.002 16.002S0 27.406 0 33.342'/%3E%3C/svg%3E\") no-repeat;height:18px;margin-bottom:0;margin-right:5px;width:6px}.uppy-Root [role~=tooltip][data-microtip-position=left]:after{margin-right:11px}.uppy-Root [role~=tooltip][data-microtip-position=left]:hover:after,.uppy-Root [role~=tooltip][data-microtip-position=left]:hover:before{transform:translate3d(0,-50%,0)}.uppy-Root [role~=tooltip][data-microtip-position=right]:after,.uppy-Root [role~=tooltip][data-microtip-position=right]:before{bottom:auto;left:100%;top:50%;transform:translate3d(-10px,-50%,0)}.uppy-Root [role~=tooltip][data-microtip-position=right]:before{background:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='36'%3E%3Cpath fill='rgba(17, 17, 17, 0.9)' d='M12 2.658v32.004c0-6-12.002-11.627-12.002-16.002S12 8.594 12 2.658'/%3E%3C/svg%3E\") no-repeat;height:18px;margin-bottom:0;margin-left:5px;width:6px}.uppy-Root [role~=tooltip][data-microtip-position=right]:after{margin-left:11px}.uppy-Root [role~=tooltip][data-microtip-position=right]:hover:after,.uppy-Root [role~=tooltip][data-microtip-position=right]:hover:before{transform:translate3d(0,-50%,0)}.uppy-Root [role~=tooltip][data-microtip-size=small]:after{white-space:normal;width:80px}.uppy-Root [role~=tooltip][data-microtip-size=medium]:after{white-space:normal;width:150px}.uppy-Root [role~=tooltip][data-microtip-size=large]:after{white-space:normal;width:260px}.uppy-StatusBar{background-color:#fff;color:#fff;display:flex;font-size:12px;font-weight:400;height:46px;line-height:40px;position:relative;transition:height .2s;z-index:1001}[data-uppy-theme=dark] .uppy-StatusBar{background-color:#1f1f1f}.uppy-StatusBar:before{background-color:#eaeaea;bottom:0;content:\"\";height:2px;left:0;position:absolute;right:0;top:0;width:100%}[data-uppy-theme=dark] .uppy-StatusBar:before{background-color:#757575}.uppy-StatusBar[aria-hidden=true]{height:0;overflow-y:hidden}.uppy-StatusBar.is-complete .uppy-StatusBar-progress{background-color:#1bb240}.uppy-StatusBar.is-error .uppy-StatusBar-progress{background-color:#e32437}.uppy-StatusBar.is-complete .uppy-StatusBar-statusIndicator{color:#1bb240}.uppy-StatusBar.is-error .uppy-StatusBar-statusIndicator{color:#e32437}.uppy-StatusBar:not([aria-hidden=true]).is-waiting{background-color:#fff;border-top:1px solid #eaeaea;height:65px}[data-uppy-theme=dark] .uppy-StatusBar:not([aria-hidden=true]).is-waiting{background-color:#1f1f1f;border-top:1px solid #333}.uppy-StatusBar-progress{background-color:#1269cf;height:2px;position:absolute;transition:background-color,width .3s ease-out;z-index:1001}.uppy-StatusBar-progress.is-indeterminate{animation:uppy-StatusBar-ProgressStripes 1s linear infinite;background-image:linear-gradient(45deg,#0000004d 25%,#0000 0,#0000 50%,#0000004d 0,#0000004d 75%,#0000 0,#0000);background-size:64px 64px}@keyframes uppy-StatusBar-ProgressStripes{0%{background-position:0 0}to{background-position:64px 0}}.uppy-StatusBar.is-postprocessing .uppy-StatusBar-progress,.uppy-StatusBar.is-preprocessing .uppy-StatusBar-progress{background-color:#f6a623}.uppy-StatusBar.is-waiting .uppy-StatusBar-progress{display:none}.uppy-StatusBar-content{align-items:center;color:#333;display:flex;height:100%;padding-inline-start:10px;position:relative;text-overflow:ellipsis;white-space:nowrap;z-index:1002}.uppy-size--md .uppy-StatusBar-content{padding-inline-start:15px}[data-uppy-theme=dark] .uppy-StatusBar-content{color:#eaeaea}.uppy-StatusBar-status{display:flex;flex-direction:column;font-weight:400;justify-content:center;line-height:1.4;padding-inline-end:.3em}.uppy-StatusBar-statusPrimary{display:flex;font-weight:500;line-height:1}.uppy-StatusBar-statusPrimary button.uppy-StatusBar-details{margin-left:5px}[data-uppy-theme=dark] .uppy-StatusBar-statusPrimary{color:#eaeaea}.uppy-StatusBar-statusSecondary{color:#757575;display:inline-block;font-size:11px;line-height:1.2;margin-top:1px;white-space:nowrap}[data-uppy-theme=dark] .uppy-StatusBar-statusSecondary{color:#bbb}.uppy-StatusBar-statusSecondaryHint{display:inline-block;line-height:1;margin-inline-end:5px;vertical-align:middle}.uppy-size--md .uppy-StatusBar-statusSecondaryHint{margin-inline-end:8px}.uppy-StatusBar-statusIndicator{color:#525252;margin-inline-end:7px;position:relative;top:1px}.uppy-StatusBar-statusIndicator svg{vertical-align:text-bottom}.uppy-StatusBar-actions{align-items:center;bottom:0;display:flex;inset-inline-end:10px;position:absolute;top:0;z-index:1004}.uppy-StatusBar.is-waiting .uppy-StatusBar-actions{background-color:#fafafa;height:100%;padding:0 15px;position:static;width:100%}[data-uppy-theme=dark] .uppy-StatusBar.is-waiting .uppy-StatusBar-actions{background-color:#1f1f1f}.uppy-StatusBar:not([aria-hidden=true]).is-waiting.has-ghosts{flex-direction:column;height:90px}.uppy-size--md .uppy-StatusBar:not([aria-hidden=true]).is-waiting.has-ghosts{flex-direction:row;height:65px}.uppy-StatusBar:not([aria-hidden=true]).is-waiting.has-ghosts .uppy-StatusBar-actions{flex-direction:column;justify-content:center}.uppy-size--md .uppy-StatusBar:not([aria-hidden=true]).is-waiting.has-ghosts .uppy-StatusBar-actions{flex-direction:row;justify-content:normal}.uppy-StatusBar-actionCircleBtn{cursor:pointer;line-height:1;margin:3px;opacity:.9}.uppy-StatusBar-actionCircleBtn:focus{outline:none}.uppy-StatusBar-actionCircleBtn::-moz-focus-inner{border:0}.uppy-StatusBar-actionCircleBtn:focus{box-shadow:0 0 0 3px #1269cf80}[data-uppy-theme=dark] .uppy-StatusBar-actionCircleBtn:focus{outline:none}[data-uppy-theme=dark] .uppy-StatusBar-actionCircleBtn::-moz-focus-inner{border:0}[data-uppy-theme=dark] .uppy-StatusBar-actionCircleBtn:focus{box-shadow:0 0 0 2px #aae1ffd9}.uppy-StatusBar-actionCircleBtn:hover{opacity:1}.uppy-StatusBar-actionCircleBtn:focus{border-radius:50%}.uppy-StatusBar-actionCircleBtn svg{vertical-align:bottom}.uppy-StatusBar-actionBtn{color:#1269cf;display:inline-block;font-size:10px;line-height:inherit;vertical-align:middle}.uppy-size--md .uppy-StatusBar-actionBtn{font-size:11px}.uppy-StatusBar-actionBtn--disabled{opacity:.4}[data-uppy-theme=dark] .uppy-StatusBar-actionBtn--disabled{opacity:.7}.uppy-StatusBar-actionBtn--retry{background-color:#ff4b23;border-radius:8px;color:#fff;height:16px;line-height:1;margin-inline-end:6px;padding:1px 6px 3px 18px;position:relative}.uppy-StatusBar-actionBtn--retry:focus{outline:none}.uppy-StatusBar-actionBtn--retry::-moz-focus-inner{border:0}.uppy-StatusBar-actionBtn--retry:focus{box-shadow:0 0 0 3px #1269cf80}[data-uppy-theme=dark] .uppy-StatusBar-actionBtn--retry:focus{outline:none}[data-uppy-theme=dark] .uppy-StatusBar-actionBtn--retry::-moz-focus-inner{border:0}[data-uppy-theme=dark] .uppy-StatusBar-actionBtn--retry:focus{box-shadow:0 0 0 2px #aae1ffd9}.uppy-StatusBar-actionBtn--retry:hover{background-color:#f92d00}.uppy-StatusBar-actionBtn--retry svg{inset-inline-start:6px;position:absolute;top:3px}.uppy-StatusBar.is-waiting .uppy-StatusBar-actionBtn--upload{background-color:#1bb240;color:#fff;font-size:14px;line-height:1;padding:15px 10px;width:100%}.uppy-StatusBar.is-waiting .uppy-StatusBar-actionBtn--upload:hover{background-color:#189c38}[data-uppy-theme=dark] .uppy-StatusBar.is-waiting .uppy-StatusBar-actionBtn--upload{background-color:#1c8b37}[data-uppy-theme=dark] .uppy-StatusBar.is-waiting .uppy-StatusBar-actionBtn--upload:hover{background-color:#18762f}.uppy-size--md .uppy-StatusBar.is-waiting .uppy-StatusBar-actionBtn--upload{padding:13px 22px;width:auto}.uppy-StatusBar.is-waiting .uppy-StatusBar-actionBtn--upload.uppy-StatusBar-actionBtn--disabled:hover{background-color:#1bb240;cursor:not-allowed}[data-uppy-theme=dark] .uppy-StatusBar.is-waiting .uppy-StatusBar-actionBtn--upload.uppy-StatusBar-actionBtn--disabled:hover{background-color:#1c8b37}.uppy-StatusBar:not(.is-waiting) .uppy-StatusBar-actionBtn--upload{background-color:initial;color:#1269cf}.uppy-StatusBar-actionBtn--uploadNewlyAdded{border-radius:3px;padding-inline-end:3px;padding-bottom:1px;padding-inline-start:3px}.uppy-StatusBar-actionBtn--uploadNewlyAdded:focus{outline:none}.uppy-StatusBar-actionBtn--uploadNewlyAdded::-moz-focus-inner{border:0}.uppy-StatusBar-actionBtn--uploadNewlyAdded:focus{box-shadow:0 0 0 3px #1269cf80}[data-uppy-theme=dark] .uppy-StatusBar-actionBtn--uploadNewlyAdded:focus{outline:none}[data-uppy-theme=dark] .uppy-StatusBar-actionBtn--uploadNewlyAdded::-moz-focus-inner{border:0}[data-uppy-theme=dark] .uppy-StatusBar-actionBtn--uploadNewlyAdded:focus{box-shadow:0 0 0 2px #aae1ffd9}.uppy-StatusBar.is-postprocessing .uppy-StatusBar-actionBtn--uploadNewlyAdded,.uppy-StatusBar.is-preprocessing .uppy-StatusBar-actionBtn--uploadNewlyAdded{display:none}.uppy-StatusBar-actionBtn--done{border-radius:3px;line-height:1;padding:7px 8px}.uppy-StatusBar-actionBtn--done:focus{outline:none}.uppy-StatusBar-actionBtn--done::-moz-focus-inner{border:0}.uppy-StatusBar-actionBtn--done:hover{color:#0e51a0}.uppy-StatusBar-actionBtn--done:focus{background-color:#dfe6f1}[data-uppy-theme=dark] .uppy-StatusBar-actionBtn--done:focus{background-color:#333}[data-uppy-theme=dark] .uppy-StatusBar-actionBtn--done{color:#02baf2}.uppy-size--md .uppy-StatusBar-actionBtn--done{font-size:14px}.uppy-StatusBar-serviceMsg{color:#000;font-size:11px;line-height:1.1;padding-left:10px}.uppy-size--md .uppy-StatusBar-serviceMsg{font-size:14px;padding-left:15px}[data-uppy-theme=dark] .uppy-StatusBar-serviceMsg{color:#eaeaea}.uppy-StatusBar-serviceMsg-ghostsIcon{left:6px;opacity:.5;position:relative;top:2px;vertical-align:text-bottom;width:10px}.uppy-size--md .uppy-StatusBar-serviceMsg-ghostsIcon{left:10px;top:1px;width:15px}.uppy-StatusBar-details{appearance:none;background-color:#939393;border-radius:50%;color:#fff;cursor:help;display:inline-block;font-size:10px;font-weight:600;height:13px;inset-inline-start:2px;line-height:12px;position:relative;text-align:center;top:0;vertical-align:middle;width:13px}.uppy-StatusBar-details:after{line-height:1.3;word-wrap:break-word}.uppy-StatusBar-spinner{animation-duration:1s;animation-iteration-count:infinite;animation-name:uppy-StatusBar-spinnerAnimation;animation-timing-function:linear;fill:#1269cf;margin-inline-end:10px}.uppy-StatusBar.is-postprocessing .uppy-StatusBar-spinner,.uppy-StatusBar.is-preprocessing .uppy-StatusBar-spinner{fill:#f6a623}@keyframes uppy-StatusBar-spinnerAnimation{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}.uppy-transition-slideDownUp-enter{opacity:.01;transform:translate3d(0,-105%,0);transition:transform .25s ease-in-out,opacity .25s ease-in-out}.uppy-transition-slideDownUp-enter.uppy-transition-slideDownUp-enter-active{opacity:1;transform:translateZ(0)}.uppy-transition-slideDownUp-leave{opacity:1;transform:translateZ(0);transition:transform .25s ease-in-out,opacity .25s ease-in-out}.uppy-transition-slideDownUp-leave.uppy-transition-slideDownUp-leave-active{opacity:.01;transform:translate3d(0,-105%,0)}@keyframes uppy-Dashboard-fadeIn{0%{opacity:0}to{opacity:1}}@keyframes uppy-Dashboard-fadeOut{0%{opacity:1}to{opacity:0}}@keyframes uppy-Dashboard-slideDownAndFadeIn{0%{opacity:0;transform:translate3d(-50%,-70%,0)}to{opacity:1;transform:translate3d(-50%,-50%,0)}}@keyframes uppy-Dashboard-slideDownAndFadeIn--small{0%{opacity:0;transform:translate3d(0,-20%,0)}to{opacity:1;transform:translateZ(0)}}@keyframes uppy-Dashboard-slideUpFadeOut{0%{opacity:1;transform:translate3d(-50%,-50%,0)}to{opacity:0;transform:translate3d(-50%,-70%,0)}}@keyframes uppy-Dashboard-slideUpFadeOut--small{0%{opacity:1;transform:translateZ(0)}to{opacity:0;transform:translate3d(0,-20%,0)}}.uppy-Dashboard--modal{z-index:1001}.uppy-Dashboard--modal[aria-hidden=true]{display:none}.uppy-Dashboard--modal.uppy-Dashboard--animateOpenClose>.uppy-Dashboard-inner{animation:uppy-Dashboard-slideDownAndFadeIn--small .3s cubic-bezier(0,0,.2,1)}@media only screen and (min-width:820px){.uppy-Dashboard--modal.uppy-Dashboard--animateOpenClose>.uppy-Dashboard-inner{animation:uppy-Dashboard-slideDownAndFadeIn .3s cubic-bezier(0,0,.2,1)}}.uppy-Dashboard--modal.uppy-Dashboard--animateOpenClose>.uppy-Dashboard-overlay{animation:uppy-Dashboard-fadeIn .3s cubic-bezier(0,0,.2,1)}.uppy-Dashboard--modal.uppy-Dashboard--animateOpenClose.uppy-Dashboard--isClosing>.uppy-Dashboard-inner{animation:uppy-Dashboard-slideUpFadeOut--small .3s cubic-bezier(0,0,.2,1)}@media only screen and (min-width:820px){.uppy-Dashboard--modal.uppy-Dashboard--animateOpenClose.uppy-Dashboard--isClosing>.uppy-Dashboard-inner{animation:uppy-Dashboard-slideUpFadeOut .3s cubic-bezier(0,0,.2,1)}}.uppy-Dashboard--modal.uppy-Dashboard--animateOpenClose.uppy-Dashboard--isClosing>.uppy-Dashboard-overlay{animation:uppy-Dashboard-fadeOut .3s cubic-bezier(0,0,.2,1)}.uppy-Dashboard-isFixed{height:100vh;overflow:hidden}.uppy-Dashboard--modal .uppy-Dashboard-overlay{background-color:#00000080;bottom:0;left:0;position:fixed;right:0;top:0;z-index:1001}.uppy-Dashboard-inner{background-color:#f4f4f4;border:1px solid #eaeaea;border-radius:5px;max-height:100%;max-width:100%;outline:none;position:relative}.uppy-size--md .uppy-Dashboard-inner{min-height:auto}@media only screen and (min-width:820px){.uppy-Dashboard-inner{height:500px;width:650px}}.uppy-Dashboard--modal .uppy-Dashboard-inner{z-index:1002}[data-uppy-theme=dark] .uppy-Dashboard-inner{background-color:#1f1f1f}.uppy-Dashboard--isDisabled .uppy-Dashboard-inner{cursor:not-allowed}.uppy-Dashboard-innerWrap{border-radius:5px;display:flex;flex-direction:column;height:100%;opacity:0;overflow:hidden;position:relative}.uppy-Dashboard--isInnerWrapVisible .uppy-Dashboard-innerWrap{opacity:1}.uppy-Dashboard--isDisabled .uppy-Dashboard-innerWrap{cursor:not-allowed;filter:grayscale(100%);opacity:.6;user-select:none}.uppy-Dashboard--isDisabled .uppy-ProviderIconBg{fill:#9f9f9f}.uppy-Dashboard--isDisabled [aria-disabled],.uppy-Dashboard--isDisabled [disabled]{cursor:not-allowed;pointer-events:none}.uppy-Dashboard--modal .uppy-Dashboard-inner{border:none;bottom:15px;left:15px;position:fixed;right:15px;top:35px}@media only screen and (min-width:820px){.uppy-Dashboard--modal .uppy-Dashboard-inner{box-shadow:0 5px 15px 4px #00000026;left:50%;right:auto;top:50%;transform:translate(-50%,-50%)}}.uppy-Dashboard-close{color:#ffffffe6;cursor:pointer;display:block;font-size:27px;inset-inline-end:-2px;position:absolute;top:-33px;z-index:1005}.uppy-Dashboard-close:focus{outline:none}.uppy-Dashboard-close::-moz-focus-inner{border:0}.uppy-Dashboard-close:focus{color:#6eabf2}@media only screen and (min-width:820px){.uppy-Dashboard-close{font-size:35px;inset-inline-end:-35px;top:-10px}}.uppy-Dashboard-serviceMsg{background-color:#fffbf7;border-bottom:1px solid #edd4b9;border-top:1px solid #edd4b9;font-size:12px;font-weight:500;line-height:1.3;padding:12px 0;position:relative;top:-1px;z-index:1004}.uppy-size--md .uppy-Dashboard-serviceMsg{font-size:14px;line-height:1.4}[data-uppy-theme=dark] .uppy-Dashboard-serviceMsg{background-color:#1f1f1f;border-bottom:1px solid #333;border-top:1px solid #333;color:#eaeaea}.uppy-Dashboard-serviceMsg-title{display:block;line-height:1;margin-bottom:4px;padding-left:42px}.uppy-Dashboard-serviceMsg-text{padding:0 15px}.uppy-Dashboard-serviceMsg-actionBtn{color:#1269cf;font-size:inherit;font-weight:inherit;vertical-align:initial}[data-uppy-theme=dark] .uppy-Dashboard-serviceMsg-actionBtn{color:#02baf2e6}.uppy-Dashboard-serviceMsg-icon{left:15px;position:absolute;top:10px}.uppy-Dashboard-AddFiles{align-items:center;display:flex;flex-direction:column;height:100%;justify-content:center;position:relative;text-align:center}[data-uppy-drag-drop-supported=true] .uppy-Dashboard-AddFiles{border:1px dashed #dfdfdf;border-radius:3px;height:calc(100% - 14px);margin:7px}.uppy-Dashboard-AddFilesPanel .uppy-Dashboard-AddFiles{border:none;height:calc(100% - 54px)}.uppy-Dashboard--modal .uppy-Dashboard-AddFiles{border-color:#cfcfcf}[data-uppy-theme=dark] .uppy-Dashboard-AddFiles{border-color:#757575}.uppy-Dashboard-AddFiles-info{display:none;margin-top:auto;padding-bottom:15px;padding-top:15px}.uppy-size--height-md .uppy-Dashboard-AddFiles-info{display:block}.uppy-size--md .uppy-Dashboard-AddFiles-info{bottom:25px;left:0;padding-bottom:0;padding-top:30px;position:absolute;right:0}[data-uppy-num-acquirers=\"0\"] .uppy-Dashboard-AddFiles-info{margin-top:0}.uppy-Dashboard-browse{color:#1269cf;cursor:pointer}.uppy-Dashboard-browse:focus{outline:none}.uppy-Dashboard-browse::-moz-focus-inner{border:0}.uppy-Dashboard-browse:focus,.uppy-Dashboard-browse:hover{border-bottom:1px solid #1269cf}[data-uppy-theme=dark] .uppy-Dashboard-browse{color:#02baf2e6}[data-uppy-theme=dark] .uppy-Dashboard-browse:focus,[data-uppy-theme=dark] .uppy-Dashboard-browse:hover{border-bottom:1px solid #02baf2}.uppy-Dashboard-browseBtn{display:block;font-size:14px;font-weight:500;margin-bottom:5px;margin-top:8px;width:100%}.uppy-size--md .uppy-Dashboard-browseBtn{font-size:15px;margin:15px auto;padding:13px 44px;width:auto}.uppy-Dashboard-AddFiles-list{display:flex;flex:1;flex-direction:column;margin-top:2px;overflow-y:auto;padding:2px 0;width:100%;-webkit-overflow-scrolling:touch}.uppy-size--md .uppy-Dashboard-AddFiles-list{flex:none;flex-direction:row;flex-wrap:wrap;justify-content:center;margin-top:15px;max-width:600px;overflow-y:visible;padding-top:0}.uppy-DashboardTab{border-bottom:1px solid #eaeaea;text-align:center;width:100%}[data-uppy-theme=dark] .uppy-DashboardTab{border-bottom:1px solid #333}.uppy-size--md .uppy-DashboardTab{border-bottom:none;display:inline-block;margin-bottom:10px;width:auto}.uppy-DashboardTab-btn{align-items:center;-webkit-appearance:none;appearance:none;background-color:initial;color:#525252;cursor:pointer;flex-direction:row;height:100%;justify-content:left;padding:12px 15px;width:100%}.uppy-DashboardTab-btn:focus{outline:none}.uppy-size--md .uppy-DashboardTab-btn{border-radius:5px;flex-direction:column;margin-inline-end:1px;padding:10px 3px;width:86px}[data-uppy-theme=dark] .uppy-DashboardTab-btn{color:#eaeaea}.uppy-DashboardTab-btn::-moz-focus-inner{border:0}.uppy-DashboardTab-btn:hover{background-color:#e9ecef}[data-uppy-theme=dark] .uppy-DashboardTab-btn:hover{background-color:#333}.uppy-DashboardTab-btn:active,.uppy-DashboardTab-btn:focus{background-color:#dfe6f1}[data-uppy-theme=dark] .uppy-DashboardTab-btn:active,[data-uppy-theme=dark] .uppy-DashboardTab-btn:focus{background-color:#525252}.uppy-DashboardTab-btn svg{display:inline-block;max-height:100%;max-width:100%;overflow:hidden;transition:transform .15s ease-in-out;vertical-align:text-top}.uppy-DashboardTab-inner{align-items:center;background-color:#fff;border-radius:8px;box-shadow:0 1px 1px 0 #0000001a,0 1px 2px 0 #0000001a,0 2px 3px 0 #00000005;display:flex;height:32px;justify-content:center;margin-inline-end:10px;width:32px}.uppy-size--md .uppy-DashboardTab-inner{margin-inline-end:0}[data-uppy-theme=dark] .uppy-DashboardTab-inner{background-color:#323232;box-shadow:0 1px 1px 0 #0003,0 1px 2px 0 #0003,0 2px 3px 0 #00000014}.uppy-DashboardTab-name{font-size:14px;font-weight:400}.uppy-size--md .uppy-DashboardTab-name{font-size:12px;line-height:15px;margin-bottom:0;margin-top:8px}.uppy-DashboardTab-iconMyDevice{color:#1269cf}[data-uppy-theme=dark] .uppy-DashboardTab-iconMyDevice{color:#02baf2}.uppy-DashboardTab-iconBox{color:#0061d5}[data-uppy-theme=dark] .uppy-DashboardTab-iconBox{color:#eaeaea}.uppy-DashboardTab-iconDropbox{color:#0061fe}[data-uppy-theme=dark] .uppy-DashboardTab-iconDropbox{color:#eaeaea}.uppy-DashboardTab-iconUnsplash{color:#111}[data-uppy-theme=dark] .uppy-DashboardTab-iconUnsplash{color:#eaeaea}.uppy-DashboardTab-iconWebdav{color:#111}[data-uppy-theme=dark] .uppy-DashboardTab-iconWebdav{color:#eaeaea}.uppy-DashboardTab-iconScreenRec{color:#2c3e50}[data-uppy-theme=dark] .uppy-DashboardTab-iconScreenRec{color:#eaeaea}.uppy-DashboardTab-iconAudio{color:#8030a3}[data-uppy-theme=dark] .uppy-DashboardTab-iconAudio{color:#bf6ee3}.uppy-Dashboard-input{height:.1px;opacity:0;overflow:hidden;position:absolute;width:.1px;z-index:-1}.uppy-DashboardContent-bar{align-items:center;background-color:#fafafa;border-bottom:1px solid #eaeaea;display:flex;flex-shrink:0;height:40px;justify-content:space-between;padding:0 10px;position:relative;width:100%;z-index:1004}.uppy-size--md .uppy-DashboardContent-bar{height:50px;padding:0 15px}[data-uppy-theme=dark] .uppy-DashboardContent-bar{background-color:#1f1f1f;border-bottom:1px solid #333}.uppy-DashboardContent-title{font-size:12px;font-weight:500;left:0;line-height:40px;margin:auto;max-width:170px;overflow-x:hidden;position:absolute;right:0;text-align:center;text-overflow:ellipsis;top:0;white-space:nowrap;width:100%}.uppy-size--md .uppy-DashboardContent-title{font-size:14px;line-height:50px;max-width:300px}[data-uppy-theme=dark] .uppy-DashboardContent-title{color:#eaeaea}.uppy-DashboardContent-back,.uppy-DashboardContent-save{-webkit-appearance:none;background:none;border:0;border-radius:3px;color:inherit;color:#1269cf;cursor:pointer;font-family:inherit;font-size:inherit;font-size:12px;font-weight:400;line-height:1;margin:0;margin-inline-start:-6px;padding:7px 6px}.uppy-DashboardContent-back:focus,.uppy-DashboardContent-save:focus{outline:none}.uppy-DashboardContent-back::-moz-focus-inner,.uppy-DashboardContent-save::-moz-focus-inner{border:0}.uppy-DashboardContent-back:hover,.uppy-DashboardContent-save:hover{color:#0e51a0}.uppy-DashboardContent-back:focus,.uppy-DashboardContent-save:focus{background-color:#dfe6f1}[data-uppy-theme=dark] .uppy-DashboardContent-back:focus,[data-uppy-theme=dark] .uppy-DashboardContent-save:focus{background-color:#333}.uppy-size--md .uppy-DashboardContent-back,.uppy-size--md .uppy-DashboardContent-save{font-size:14px}[data-uppy-theme=dark] .uppy-DashboardContent-back,[data-uppy-theme=dark] .uppy-DashboardContent-save{color:#02baf2}.uppy-DashboardContent-addMore{-webkit-appearance:none;background:none;border:0;border-radius:3px;color:inherit;color:#1269cf;cursor:pointer;font-family:inherit;font-size:inherit;font-weight:500;height:29px;line-height:1;margin:0;margin-inline-end:-5px;padding:7px 8px;width:29px}.uppy-DashboardContent-addMore:focus{outline:none}.uppy-DashboardContent-addMore::-moz-focus-inner{border:0}.uppy-DashboardContent-addMore:hover{color:#0e51a0}.uppy-DashboardContent-addMore:focus{background-color:#dfe6f1}[data-uppy-theme=dark] .uppy-DashboardContent-addMore:focus{background-color:#333}.uppy-size--md .uppy-DashboardContent-addMore{font-size:14px;height:auto;margin-inline-end:-8px;width:auto}[data-uppy-theme=dark] .uppy-DashboardContent-addMore{color:#02baf2}.uppy-DashboardContent-addMore svg{margin-inline-end:4px;vertical-align:initial}.uppy-size--md .uppy-DashboardContent-addMore svg{height:11px;width:11px}.uppy-DashboardContent-addMoreCaption{display:none}.uppy-size--md .uppy-DashboardContent-addMoreCaption{display:inline}.uppy-DashboardContent-panel{background-color:#f5f5f5;flex:1}.uppy-Dashboard-AddFilesPanel,.uppy-DashboardContent-panel{border-radius:5px;bottom:0;display:flex;flex-direction:column;left:0;overflow:hidden;position:absolute;right:0;top:0;z-index:1005}.uppy-Dashboard-AddFilesPanel{background:#fafafa;background:linear-gradient(0deg,#fafafa 35%,#fafafad9);box-shadow:0 0 10px 5px #00000026}[data-uppy-theme=dark] .uppy-Dashboard-AddFilesPanel{background-color:#333;background-image:linear-gradient(0deg,#1f1f1f 35%,#1f1f1fd9)}.uppy-Dashboard--isAddFilesPanelVisible .uppy-Dashboard-files{filter:blur(2px)}.uppy-Dashboard-progress{bottom:0;height:12%;left:0;position:absolute;width:100%}.uppy-Dashboard-progressBarContainer.is-active{height:100%;left:0;position:absolute;top:0;width:100%;z-index:1004}.uppy-Dashboard-filesContainer{flex:1;margin:0;overflow-y:hidden;position:relative}.uppy-Dashboard-filesContainer:after{clear:both;content:\"\";display:table}.uppy-Dashboard-files{flex:1;margin:0;overflow-y:auto;padding:0 0 10px;-webkit-overflow-scrolling:touch}.uppy-size--md .uppy-Dashboard-files{padding-top:10px}.uppy-Dashboard--singleFile .uppy-Dashboard-filesInner{align-items:center;display:flex;height:100%;justify-content:center}.uppy-Dashboard-dropFilesHereHint{align-items:center;background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48'%3E%3Cpath fill='%231269CF' d='M24 1v1C11.85 2 2 11.85 2 24s9.85 22 22 22 22-9.85 22-22S36.15 2 24 2zm0 0V0c13.254 0 24 10.746 24 24S37.254 48 24 48 0 37.254 0 24 10.746 0 24 0zm7.707 19.293a.999.999 0 1 1-1.414 1.414L25 16.414V34a1 1 0 1 1-2 0V16.414l-5.293 5.293a.999.999 0 1 1-1.414-1.414l7-7a1 1 0 0 1 1.414 0z'/%3E%3C/svg%3E\");background-position:50% 50%;background-repeat:no-repeat;border:1px dashed #1269cf;border-radius:3px;bottom:7px;color:#757575;display:flex;font-size:16px;justify-content:center;left:7px;padding-top:90px;position:absolute;right:7px;text-align:center;top:7px;visibility:hidden;z-index:2000}[data-uppy-theme=dark] .uppy-Dashboard-dropFilesHereHint{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48'%3E%3Cpath fill='%2302BAF2' d='M24 1v1C11.85 2 2 11.85 2 24s9.85 22 22 22 22-9.85 22-22S36.15 2 24 2zm0 0V0c13.254 0 24 10.746 24 24S37.254 48 24 48 0 37.254 0 24 10.746 0 24 0zm7.707 19.293a.999.999 0 1 1-1.414 1.414L25 16.414V34a1 1 0 1 1-2 0V16.414l-5.293 5.293a.999.999 0 1 1-1.414-1.414l7-7a1 1 0 0 1 1.414 0z'/%3E%3C/svg%3E\");border-color:#02baf2;color:#bbb}.uppy-Dashboard.uppy-Dashboard--isDraggingOver .uppy-Dashboard-dropFilesHereHint{pointer-events:none;visibility:visible}.uppy-Dashboard.uppy-Dashboard--isDraggingOver .uppy-Dashboard-files,.uppy-Dashboard.uppy-Dashboard--isDraggingOver .uppy-Dashboard-progressindicators,.uppy-Dashboard.uppy-Dashboard--isDraggingOver .uppy-Dashboard-serviceMsg,.uppy-Dashboard.uppy-Dashboard--isDraggingOver .uppy-DashboardContent-bar{opacity:.15}.uppy-Dashboard.uppy-Dashboard--isDraggingOver .uppy-Dashboard-AddFiles{opacity:.03}.uppy-Dashboard-AddFiles-title{color:#000;font-size:17px;font-weight:500;line-height:1.35;margin-bottom:5px;margin-top:15px;padding:0 15px;text-align:inline-start;width:100%}.uppy-size--md .uppy-Dashboard-AddFiles-title{font-size:21px;font-weight:400;margin-top:5px;max-width:480px;padding:0 35px;text-align:center}[data-uppy-num-acquirers=\"0\"] .uppy-Dashboard-AddFiles-title{text-align:center}[data-uppy-theme=dark] .uppy-Dashboard-AddFiles-title{color:#eaeaea}.uppy-Dashboard-AddFiles-title button{font-weight:500}.uppy-size--md .uppy-Dashboard-AddFiles-title button{font-weight:400}.uppy-Dashboard-note{color:#757575;font-size:14px;line-height:1.25;margin:auto;max-width:350px;padding:0 15px;text-align:center}.uppy-size--md .uppy-Dashboard-note{line-height:1.35;max-width:600px}[data-uppy-theme=dark] .uppy-Dashboard-note{color:#cfcfcf}a.uppy-Dashboard-poweredBy{color:#939393;display:inline-block;font-size:11px;margin-top:8px;text-align:center;text-decoration:none}.uppy-Dashboard-poweredByIcon{margin-left:1px;margin-right:1px;opacity:.9;position:relative;top:1px;vertical-align:text-top;fill:none;stroke:#939393}.uppy-Dashboard-Item-previewIcon{height:25px;left:50%;position:absolute;top:50%;transform:translate(-50%,-50%);width:25px;z-index:100}.uppy-size--md .uppy-Dashboard-Item-previewIcon{height:38px;width:38px}.uppy-Dashboard-Item-previewIcon svg{height:100%;width:100%}.uppy-Dashboard--singleFile .uppy-Dashboard-Item-previewIcon{height:100%;max-height:60%;max-width:60%;width:100%}.uppy-Dashboard-Item-previewIconWrap{height:76px;max-height:75%;position:relative}.uppy-Dashboard--singleFile .uppy-Dashboard-Item-previewIconWrap{height:100%;width:100%}.uppy-Dashboard-Item-previewIconBg{filter:drop-shadow(rgba(0,0,0,.1) 0 1px 1px);height:100%;width:100%}.uppy-Dashboard-upload{height:50px;position:relative;width:50px}.uppy-size--md .uppy-Dashboard-upload{height:60px;width:60px}.uppy-Dashboard-upload .uppy-c-icon{position:relative;top:1px;width:50%}.uppy-Dashboard-uploadCount{background-color:#1bb240;border-radius:50%;color:#fff;font-size:8px;height:16px;inset-inline-end:-12px;line-height:16px;position:absolute;top:-12px;width:16px}.uppy-size--md .uppy-Dashboard-uploadCount{font-size:9px;height:18px;line-height:18px;width:18px}.uppy-ImageCropper-range{-webkit-appearance:none;background:#0000;margin:8px 0;width:100%}.uppy-ImageCropper-range::-moz-focus-outer{border:0}.uppy-ImageCropper-range:focus{outline:0}.uppy-ImageCropper-range:focus::-webkit-slider-runnable-track{background:#fff3}.uppy-ImageCropper-range:focus::-ms-fill-lower,.uppy-ImageCropper-range:focus::-ms-fill-upper{background:#fff3}.uppy-ImageCropper-range::-webkit-slider-runnable-track{background:#fff3;border:0 solid #0000;border-radius:5px;box-shadow:0 0 0 #0000,0 0 0 #0d0d0d00;cursor:default;height:4px;transition:all .2s ease;width:100%}.uppy-ImageCropper-range::-webkit-slider-thumb{-webkit-appearance:none;background:#fff;border:0 solid #0000;border-radius:9px;box-shadow:0 0 4px #0003,0 0 0 #0d0d0d33;box-sizing:border-box;cursor:default;height:16px;margin-top:-6px;width:16px}.uppy-ImageCropper-range::-moz-range-track{background:#fff3;border:0 solid #0000;border-radius:5px;box-shadow:0 0 0 #0000,0 0 0 #0d0d0d00;cursor:default;height:2px;transition:all .2s ease;width:100%}.uppy-ImageCropper-range::-moz-range-thumb{background:#fff;border:0 solid #0000;border-radius:9px;box-shadow:0 0 4px #0003,0 0 0 #0d0d0d33;box-sizing:border-box;cursor:default;height:16px;width:16px}.uppy-ImageCropper-range::-ms-track{background:#0000;border-color:#0000;border-width:8px 0;color:#0000;cursor:default;height:4px;transition:all .2s ease;width:100%}.uppy-ImageCropper-range::-ms-fill-lower{background:#f2f2f233;border:0 solid #0000;border-radius:10px;box-shadow:0 0 0 #0000,0 0 0 #0d0d0d00}.uppy-ImageCropper-range::-ms-fill-upper{background:#fff3;border:0 solid #0000;border-radius:10px;box-shadow:0 0 0 #0000,0 0 0 #0d0d0d00}.uppy-ImageCropper-range::-ms-thumb{background:#fff;border:0 solid #0000;border-radius:9px;box-shadow:0 0 4px #0003,0 0 0 #0d0d0d33;box-sizing:border-box;cursor:default;height:16px;margin-top:1px;width:16px}.uppy-ImageCropper-range:disabled::-moz-range-thumb,.uppy-ImageCropper-range:disabled::-ms-fill-lower,.uppy-ImageCropper-range:disabled::-ms-fill-upper,.uppy-ImageCropper-range:disabled::-ms-thumb,.uppy-ImageCropper-range:disabled::-webkit-slider-runnable-track,.uppy-ImageCropper-range:disabled::-webkit-slider-thumb{cursor:not-allowed}.cropper-container{direction:ltr;font-size:0;line-height:0;position:relative;-ms-touch-action:none;touch-action:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.cropper-container img{display:block;height:100%;image-orientation:0deg;max-height:none!important;max-width:none!important;min-height:0!important;min-width:0!important;width:100%}.cropper-canvas,.cropper-crop-box,.cropper-drag-box,.cropper-modal,.cropper-wrap-box{bottom:0;left:0;position:absolute;right:0;top:0}.cropper-canvas,.cropper-wrap-box{overflow:hidden}.cropper-drag-box{background-color:#fff;opacity:0}.cropper-modal{background-color:#000;opacity:.5}.cropper-view-box{display:block;height:100%;outline:1px solid #39f;outline-color:#3399ffbf;overflow:hidden;width:100%}.cropper-dashed{border:0 dashed #eee;display:block;opacity:.5;position:absolute}.cropper-dashed.dashed-h{border-bottom-width:1px;border-top-width:1px;height:33.3333333333%;left:0;top:33.3333333333%;width:100%}.cropper-dashed.dashed-v{border-left-width:1px;border-right-width:1px;height:100%;left:33.3333333333%;top:0;width:33.3333333333%}.cropper-center{display:block;height:0;left:50%;opacity:.75;position:absolute;top:50%;width:0}.cropper-center:after,.cropper-center:before{background-color:#eee;content:\" \";display:block;position:absolute}.cropper-center:before{height:1px;left:-3px;top:0;width:7px}.cropper-center:after{height:7px;left:0;top:-3px;width:1px}.cropper-face,.cropper-line,.cropper-point{display:block;height:100%;opacity:.1;position:absolute;width:100%}.cropper-face{background-color:#fff;left:0;top:0}.cropper-line{background-color:#39f}.cropper-line.line-e{cursor:ew-resize;right:-3px;top:0;width:5px}.cropper-line.line-n{cursor:ns-resize;height:5px;left:0;top:-3px}.cropper-line.line-w{cursor:ew-resize;left:-3px;top:0;width:5px}.cropper-line.line-s{bottom:-3px;cursor:ns-resize;height:5px;left:0}.cropper-point{background-color:#39f;height:5px;opacity:.75;width:5px}.cropper-point.point-e{cursor:ew-resize;margin-top:-3px;right:-3px;top:50%}.cropper-point.point-n{cursor:ns-resize;left:50%;margin-left:-3px;top:-3px}.cropper-point.point-w{cursor:ew-resize;left:-3px;margin-top:-3px;top:50%}.cropper-point.point-s{bottom:-3px;cursor:s-resize;left:50%;margin-left:-3px}.cropper-point.point-ne{cursor:nesw-resize;right:-3px;top:-3px}.cropper-point.point-nw{cursor:nwse-resize;left:-3px;top:-3px}.cropper-point.point-sw{bottom:-3px;cursor:nesw-resize;left:-3px}.cropper-point.point-se{bottom:-3px;cursor:nwse-resize;height:20px;opacity:1;right:-3px;width:20px}@media (min-width:768px){.cropper-point.point-se{height:15px;width:15px}}@media (min-width:992px){.cropper-point.point-se{height:10px;width:10px}}@media (min-width:1200px){.cropper-point.point-se{height:5px;opacity:.75;width:5px}}.cropper-point.point-se:before{background-color:#39f;bottom:-50%;content:\" \";display:block;height:200%;opacity:0;position:absolute;right:-50%;width:200%}.cropper-invisible{opacity:0}.cropper-bg{background-image:url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQAQMAAAAlPW0iAAAAA3NCSVQICAjb4U/gAAAABlBMVEXMzMz////TjRV2AAAACXBIWXMAAArrAAAK6wGCiw1aAAAAHHRFWHRTb2Z0d2FyZQBBZG9iZSBGaXJld29ya3MgQ1M26LyyjAAAABFJREFUCJlj+M/AgBVhF/0PAH6/D/HkDxOGAAAAAElFTkSuQmCC\")}.cropper-hide{display:block;height:0;position:absolute;width:0}.cropper-hidden{display:none!important}.cropper-move{cursor:move}.cropper-crop{cursor:crosshair}.cropper-disabled .cropper-drag-box,.cropper-disabled .cropper-face,.cropper-disabled .cropper-line,.cropper-disabled .cropper-point{cursor:not-allowed}.uppy-ImageCropper{display:flex;flex-direction:column;height:100%;width:100%}.uppy-ImageCropper-container{flex-grow:1}.uppy-ImageCropper-image{display:block;max-height:400px;max-width:100%}.uppy-ImageCropper-controls{align-items:center;background-color:#0009;border-radius:5px;bottom:15px;color:#fff;display:flex;justify-content:center;left:50%;padding-top:38px;position:absolute;transform:translateX(-50%)}.uppy-size--md .uppy-ImageCropper-controls{padding-top:0}.uppy-ImageCropper-controls button{border-radius:5px;height:35px;width:35px}.uppy-ImageCropper-controls button svg{padding:3px}.uppy-size--md .uppy-ImageCropper-controls button{height:40px;width:40px}.uppy-size--md .uppy-ImageCropper-controls button svg{padding:1px}.uppy-ImageCropper-controls button:hover{background-color:#ffffff80}.uppy-ImageCropper-controls button:focus{background-color:#ffffff80;outline:none}.uppy-Dashboard:not(.uppy-size--md) .uppy-ImageCropper-rangeWrapper{height:38px;left:10px;position:absolute!important;right:10px;top:0}.uppy-size--md .uppy-ImageCropper-range{margin-left:5px;margin-right:5px;width:180px}.uppy-ImageCropper .cropper-point{height:8px;width:8px}.uppy-ImageCropper .cropper-view-box{background:repeating-conic-gradient(#bdbdbd33 0 25%,#fff 0 50%) 50%/16px 16px;outline:2px solid #39f}[data-uppy-theme=dark] .uppy-ImageCropper .cropper-view-box{background:repeating-conic-gradient(#2b2a2a 0 25%,#000 0 50%) 50%/16px 16px}.uppy-ImageCropper .cropper-modal{background-color:#fff;opacity:.9}[data-uppy-theme=dark] .uppy-ImageCropper .cropper-modal{background-color:#000;opacity:.7}.uppy-ImageCropper .cropper-face{opacity:0}.uppy-ImageCropper-range::-moz-range-track{height:4px}.uppy-ImageCropper-range:focus::-webkit-slider-runnable-track,.uppy-ImageCropper-range:hover::-webkit-slider-runnable-track{background:#ffffff80}.uppy-ImageCropper-range:focus::-ms-fill-lower,.uppy-ImageCropper-range:focus::-ms-fill-upper,.uppy-ImageCropper-range:hover::-ms-fill-lower,.uppy-ImageCropper-range:hover::-ms-fill-upper{background:#ffffff80}.uppy-ImageCropper-range:focus::-moz-range-track,.uppy-ImageCropper-range:hover::-moz-range-track{background:#ffffff80}.uppy-Webcam-container{align-items:center;display:flex;flex-direction:column;height:100%;justify-content:center;width:100%}.uppy-Webcam-videoContainer{background-color:#333;flex:1;flex-grow:1;overflow:hidden;position:relative;text-align:center;width:100%}.uppy-Webcam-video{bottom:0;left:0;margin:auto;max-height:100%;max-width:100%;position:absolute;right:0;top:0}.uppy-Webcam-video--mirrored{transform:scaleX(-1)}.uppy-Webcam-imageContainer{height:100%;position:relative;width:100%}.uppy-Webcam-image{bottom:0;left:0;margin:auto;max-height:100%;max-width:100%;position:absolute;right:0;top:0}.uppy-Webcam-image--mirrored{transform:scaleX(-1)}.uppy-Webcam-footer{align-items:center;display:flex;flex-wrap:wrap;justify-content:space-between;min-height:75px;padding:20px;width:100%}.uppy-Webcam-videoSourceContainer{flex-grow:0;width:100%}.uppy-size--lg .uppy-Webcam-videoSourceContainer{margin:0;width:33%}.uppy-Webcam-videoSource-select{background-image:url(\"data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23757575%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E\");background-position:right .4em top 50%,0 0;background-repeat:no-repeat;background-size:.65em auto,100%;border:1px solid #757575;display:block;font-size:16px;line-height:1.2;margin:auto auto 10px;max-width:90%;padding:.4em 1em .3em .4em;text-overflow:ellipsis;white-space:nowrap;width:100%}.uppy-size--lg .uppy-Webcam-videoSource-select{font-size:14px;margin-bottom:0}.uppy-Webcam-videoSource-select::-ms-expand{display:none}.uppy-Webcam-buttonContainer{margin-left:25%;text-align:center;width:50%}.uppy-size--lg .uppy-Webcam-buttonContainer{margin-left:0;width:34%}.uppy-Webcam-recordingLength{color:#757575;flex-grow:0;font-family:SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;text-align:right;width:25%}.uppy-size--lg .uppy-Webcam-recordingLength{width:33%}.uppy-Webcam-button{background-color:#e32437;border-radius:50%;color:#fff;cursor:pointer;height:45px;transition:all .3s;width:45px}.uppy-Webcam-button:focus{outline:none}.uppy-Webcam-button::-moz-focus-inner{border:0}.uppy-Webcam-button:focus{box-shadow:0 0 0 3px #1269cf80}.uppy-Webcam-button:hover{background-color:#d31b2d}[data-uppy-theme=dark] .uppy-Webcam-button:focus{outline:none}[data-uppy-theme=dark] .uppy-Webcam-button::-moz-focus-inner{border:0}[data-uppy-theme=dark] .uppy-Webcam-button:focus{box-shadow:0 0 0 2px #aae1ffd9}.uppy-Webcam-button--submit{background-color:#1269cf;margin:0 12px}.uppy-Webcam-button--submit:hover{background-color:#105db8}.uppy-Webcam-button svg{display:inline-block;height:30px;max-height:100%;max-width:100%;overflow:hidden;vertical-align:text-top;width:30px;fill:currentColor}.uppy-size--md .uppy-Webcam-button{height:60px;width:60px}.uppy-Webcam-button--picture{margin-right:12px}.uppy-Webcam-permissons{align-items:center;display:flex;flex:1;flex-flow:column wrap;height:100%;justify-content:center;padding:15px}.uppy-Webcam-permissons p{color:#939393;line-height:1.3;line-height:1.45;margin:0;max-width:450px;text-align:center}.uppy-Webcam-permissonsIcon svg{color:#bbb;height:75px;margin-bottom:30px;width:100px}.uppy-Webcam-title{color:#333;font-size:22px;font-weight:400;line-height:1.35;margin:0 0 5px;max-width:500px;padding:0 15px;text-align:center}[data-uppy-theme=dark] .uppy-Webcam-title{color:#eaeaea}.container{aspect-ratio:4 / 3;max-width:var(--max-width);max-height:var(--max-height);height:var(--height);width:var(--width);box-sizing:border-box;padding:0;.uppy-Root,.uppy-Dashboard{height:100%}}";var Yd=n`
|
|
772
|
+
*/class ad extends uo{imgElement;componentDidMount(){const{initCropper:e}=this.props;this.imgElement&&e(this.imgElement)}onRotate90Deg=()=>{this.props.rotateBy(-90)};onRotateGranular=e=>{const t=Number(e.target.value);this.props.rotateGranular(t)};renderGranularRotate(){const{i18n:e}=this.props,{angleGranular:t}=this.props;return Mo("label",{role:"tooltip","aria-label":`${t}º`,"data-microtip-position":"top",className:"uppy-ImageCropper-rangeWrapper",children:Mo("input",{className:"uppy-ImageCropper-range uppy-u-reset",type:"range",onInput:this.onRotateGranular,onChange:this.onRotateGranular,value:t,min:"-45",max:"45","aria-label":e("rotate")})})}renderRevert(){const{i18n:e}=this.props;return Mo("button",{"data-microtip-position":"top",type:"button",className:"uppy-u-reset uppy-c-btn","aria-label":e("revert"),onClick:()=>{this.props.reset()},children:Mo("svg",{"aria-hidden":"true",className:"uppy-c-icon",width:"24",height:"24",viewBox:"0 0 24 24",children:[Mo("path",{d:"M0 0h24v24H0z",fill:"none"}),Mo("path",{d:"M13 3c-4.97 0-9 4.03-9 9H1l3.89 3.89.07.14L9 12H6c0-3.87 3.13-7 7-7s7 3.13 7 7-3.13 7-7 7c-1.93 0-3.68-.79-4.94-2.06l-1.42 1.42C8.27 19.99 10.51 21 13 21c4.97 0 9-4.03 9-9s-4.03-9-9-9zm-1 5v5l4.28 2.54.72-1.21-3.5-2.08V8H12z"})]})})}renderRotate(){const{i18n:e}=this.props;return Mo("button",{"data-microtip-position":"top",type:"button",className:"uppy-u-reset uppy-c-btn","aria-label":e("rotate"),onClick:this.onRotate90Deg,children:Mo("svg",{"aria-hidden":"true",className:"uppy-c-icon",width:"24",height:"24",viewBox:"0 0 24 24",children:[Mo("path",{d:"M0 0h24v24H0V0zm0 0h24v24H0V0z",fill:"none"}),Mo("path",{d:"M14 10a2 2 0 012 2v7a2 2 0 01-2 2H6a2 2 0 01-2-2v-7a2 2 0 012-2h8zm0 1.75H6a.25.25 0 00-.243.193L5.75 12v7a.25.25 0 00.193.243L6 19.25h8a.25.25 0 00.243-.193L14.25 19v-7a.25.25 0 00-.193-.243L14 11.75zM12 .76V4c2.3 0 4.61.88 6.36 2.64a8.95 8.95 0 012.634 6.025L21 13a1 1 0 01-1.993.117L19 13h-.003a6.979 6.979 0 00-2.047-4.95 6.97 6.97 0 00-4.652-2.044L12 6v3.24L7.76 5 12 .76z"})]})})}renderFlip(){const{i18n:e}=this.props;return Mo("button",{"data-microtip-position":"top",type:"button",className:"uppy-u-reset uppy-c-btn","aria-label":e("flipHorizontal"),onClick:()=>this.props.flipHorizontal(),children:Mo("svg",{"aria-hidden":"true",className:"uppy-c-icon",width:"24",height:"24",viewBox:"0 0 24 24",children:[Mo("path",{d:"M0 0h24v24H0z",fill:"none"}),Mo("path",{d:"M15 21h2v-2h-2v2zm4-12h2V7h-2v2zM3 5v14c0 1.1.9 2 2 2h4v-2H5V5h4V3H5c-1.1 0-2 .9-2 2zm16-2v2h2c0-1.1-.9-2-2-2zm-8 20h2V1h-2v22zm8-6h2v-2h-2v2zM15 5h2V3h-2v2zm4 8h2v-2h-2v2zm0 8c1.1 0 2-.9 2-2h-2v2z"})]})})}renderZoomIn(){const{i18n:e}=this.props;return Mo("button",{"data-microtip-position":"top",type:"button",className:"uppy-u-reset uppy-c-btn","aria-label":e("zoomIn"),onClick:()=>this.props.zoom(.1),children:Mo("svg",{"aria-hidden":"true",className:"uppy-c-icon",height:"24",viewBox:"0 0 24 24",width:"24",children:[Mo("path",{d:"M0 0h24v24H0V0z",fill:"none"}),Mo("path",{d:"M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"}),Mo("path",{d:"M12 10h-2v2H9v-2H7V9h2V7h1v2h2v1z"})]})})}renderZoomOut(){const{i18n:e}=this.props;return Mo("button",{"data-microtip-position":"top",type:"button",className:"uppy-u-reset uppy-c-btn","aria-label":e("zoomOut"),onClick:()=>this.props.zoom(-.1),children:Mo("svg",{"aria-hidden":"true",className:"uppy-c-icon",width:"24",height:"24",viewBox:"0 0 24 24",children:[Mo("path",{d:"M0 0h24v24H0V0z",fill:"none"}),Mo("path",{d:"M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14zM7 9h5v1H7z"})]})})}renderCropSquare(){const{i18n:e}=this.props;return Mo("button",{"data-microtip-position":"top",type:"button",className:"uppy-u-reset uppy-c-btn","aria-label":e("aspectRatioSquare"),onClick:()=>this.props.setAspectRatio("1:1"),children:Mo("svg",{"aria-hidden":"true",className:"uppy-c-icon",width:"24",height:"24",viewBox:"0 0 24 24",children:[Mo("path",{d:"M0 0h24v24H0z",fill:"none"}),Mo("path",{d:"M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"})]})})}renderCropWidescreen(){const{i18n:e}=this.props;return Mo("button",{"data-microtip-position":"top",type:"button",className:"uppy-u-reset uppy-c-btn","aria-label":e("aspectRatioLandscape"),onClick:()=>this.props.setAspectRatio("16:9"),children:Mo("svg",{"aria-hidden":"true",className:"uppy-c-icon",width:"24",height:"24",viewBox:"0 0 24 24",children:[Mo("path",{d:"M 19,4.9999992 V 17.000001 H 4.9999998 V 6.9999992 H 19 m 0,-2 H 4.9999998 c -1.0999999,0 -1.9999999,0.9000001 -1.9999999,2 V 17.000001 c 0,1.1 0.9,2 1.9999999,2 H 19 c 1.1,0 2,-0.9 2,-2 V 6.9999992 c 0,-1.0999999 -0.9,-2 -2,-2 z"}),Mo("path",{fill:"none",d:"M0 0h24v24H0z"})]})})}renderCropWidescreenVertical(){const{i18n:e}=this.props;return Mo("button",{"data-microtip-position":"top",type:"button","aria-label":e("aspectRatioPortrait"),className:"uppy-u-reset uppy-c-btn",onClick:()=>this.props.setAspectRatio("9:16"),children:Mo("svg",{"aria-hidden":"true",className:"uppy-c-icon",width:"24",height:"24",viewBox:"0 0 24 24",children:[Mo("path",{d:"M 19.000001,19 H 6.999999 V 5 h 10.000002 v 14 m 2,0 V 5 c 0,-1.0999999 -0.9,-1.9999999 -2,-1.9999999 H 6.999999 c -1.1,0 -2,0.9 -2,1.9999999 v 14 c 0,1.1 0.9,2 2,2 h 10.000002 c 1.1,0 2,-0.9 2,-2 z"}),Mo("path",{d:"M0 0h24v24H0z",fill:"none"})]})})}render(){const{currentImage:e,objectUrl:t,opts:i}=this.props,{actions:r}=i;return Mo("div",{className:"uppy-ImageCropper",children:[Mo("div",{className:"uppy-ImageCropper-container",children:Mo("img",{className:"uppy-ImageCropper-image",alt:e.name,src:t,ref:e=>{this.imgElement=e}})}),Mo("div",{className:"uppy-ImageCropper-controls",children:[r.revert&&this.renderRevert(),r.rotate&&this.renderRotate(),r.granularRotate&&this.renderGranularRotate(),r.flip&&this.renderFlip(),r.zoomIn&&this.renderZoomIn(),r.zoomOut&&this.renderZoomOut(),r.cropSquare&&this.renderCropSquare(),r.cropWidescreen&&this.renderCropWidescreen(),r.cropWidescreenVertical&&this.renderCropWidescreenVertical()]})]})}}var nd={strings:{revert:"Reset",rotate:"Rotate 90°",zoomIn:"Zoom in",zoomOut:"Zoom out",flipHorizontal:"Flip horizontally",aspectRatioSquare:"Crop square",aspectRatioLandscape:"Crop landscape (16:9)",aspectRatioPortrait:"Crop portrait (9:16)"}};const ld={angle:0,angleGranular:0,isFlippedHorizontally:!1,aspectRatio:"free",cropperReady:!1},dd={viewMode:0,background:!1,autoCropArea:1,responsive:!0,minCropBoxWidth:70,minCropBoxHeight:70,croppedCanvasOptions:{},initialAspectRatio:0},pd={revert:!0,rotate:!0,granularRotate:!0,flip:!0,zoomIn:!0,zoomOut:!0,cropSquare:!0,cropWidescreen:!0,cropWidescreenVertical:!0},hd={quality:.8,actions:pd,cropperOptions:dd};class cd extends Bs{static VERSION="4.2.0";cropper=null;objectUrl=null;prevCropboxData=null;imgElement=null;cropstartHandler=null;cropendHandler=null;cropperReadyHandler=null;constructor(e,t){super(e,{...hd,...t,actions:{...pd,...t?.actions},cropperOptions:{...dd,...t?.cropperOptions}}),this.id=this.opts.id||"ImageEditor",this.title="Image Editor",this.type="editor",this.defaultLocale=nd,this.i18nInit()}canEditFile(e){if(!e.type||e.isRemote)return!1;const t=e.type.split("/")[1];return!!/^(jpe?g|gif|png|bmp|webp)$/.test(t)}save=()=>{const{currentImage:e}=this.getPluginState();if(!e)return;if(!this.cropper)return;const t=this.cropper.getCroppedCanvas({});t.width%2!=0&&this.cropper.setData({width:t.width-1}),t.height%2!=0&&this.cropper.setData({height:t.height-1}),this.cropper.getCroppedCanvas(this.opts.cropperOptions.croppedCanvasOptions).toBlob((t=>{if(!t)return;const i=e.id;if(!this.uppy.getFile(i))return;this.uppy.setFileState(i,{data:new File([t],e.name??this.i18n("unnamed"),{type:t.type}),size:t.size,preview:void 0});const r=this.uppy.getFile(i);r&&(this.uppy.emit("thumbnail:request",r),this.setPluginState({currentImage:r}),this.uppy.emit("file-editor:complete",r))}),e.type,this.opts.quality)};storeCropperInstance=e=>{this.cropper=e};selectFile=e=>{this.start(e)};resetEditorState=(e=this.getPluginState().currentImage)=>{this.setPluginState({currentImage:e,...ld,cropperReady:!!this.cropper})};rotateBy=e=>{if(!this.cropper)return;const{angle:t,angleGranular:i,isFlippedHorizontally:r}=this.getPluginState(),o=t-i+e;this.cropper.scale(r?-1:1),this.cropper.rotateTo(o);const s=this.cropper.getCanvasData(),a=function(e,t){const i=Math.min(e.width/t.width,e.height/t.height),r=t.width*i,o=t.height*i;return{width:r,height:o,left:(e.width-r)/2,top:(e.height-o)/2}}(this.cropper.getContainerData(),s);this.cropper.setCanvasData(a),this.cropper.setCropBoxData(a),this.setPluginState({angle:o,angleGranular:0})};rotateGranular=e=>{if(!this.cropper)return;const{angle:t,angleGranular:i,isFlippedHorizontally:r}=this.getPluginState(),o=t-i+e;this.cropper.rotateTo(o);const s=this.cropper.getImageData(),a=function(e,t,i){const r=Math.abs(i*(Math.PI/180));return Math.max((Math.sin(r)*e+Math.cos(r)*t)/t,(Math.sin(r)*t+Math.cos(r)*e)/e)}(s.naturalWidth,s.naturalHeight,e);this.cropper.scale(r?-a:a,a),this.setPluginState({angle:o,angleGranular:e})};flipHorizontal=()=>{if(!this.cropper)return;const{isFlippedHorizontally:e}=this.getPluginState();this.cropper.scaleX(-this.cropper.getData().scaleX||-1),this.setPluginState({isFlippedHorizontally:!e})};zoom=e=>{this.cropper&&this.cropper.zoom(e)};setAspectRatio=e=>{this.cropper&&(this.cropper.setAspectRatio({free:0,"1:1":1,"16:9":16/9,"9:16":9/16}[e]),this.setPluginState({aspectRatio:e}))};reset=()=>{this.cropper&&(this.cropper.reset(),this.cropper.setAspectRatio(this.opts.cropperOptions.initialAspectRatio||0),this.resetEditorState())};start=e=>{this.objectUrl&&(URL.revokeObjectURL(this.objectUrl),this.objectUrl=null);let t=e.data;if(!(t instanceof Blob)){const i=this.uppy.getFile(e.id);t=i?.data}t instanceof Blob?this.objectUrl=URL.createObjectURL(t):console.warn("[Uppy ImageEditor] Cannot edit file: file.data is not a Blob.","File:",e,"file.data:",e.data,"typeof file.data:",typeof e.data),this.uppy.emit("file-editor:start",e),this.resetEditorState(e)};stop=()=>{this.destroyCropper(),this.objectUrl&&(URL.revokeObjectURL(this.objectUrl),this.objectUrl=null),this.resetEditorState(null)};initCropper=e=>{this.cropper||(this.imgElement=e,this.cropper=new sd(e,this.opts.cropperOptions),this.cropstartHandler=()=>{this.cropper&&(this.prevCropboxData=this.cropper.getCropBoxData())},this.cropendHandler=e=>{if(!this.cropper||!this.prevCropboxData)return;const t=this.cropper.getCanvasData(),i=this.cropper.getCropBoxData();if("all"===e.detail.action){const e=(s=this.prevCropboxData,(o=i).left<(r=t).left?{left:r.left,width:s.width}:o.top<r.top?{top:r.top,height:s.height}:o.left+o.width>r.left+r.width?{left:r.left+r.width-s.width,width:s.width}:o.top+o.height>r.top+r.height?{top:r.top+r.height-s.height,height:s.height}:null);e&&this.cropper.setCropBoxData(e)}else{const e=function(e,t,i){return t.left<e.left?{left:e.left,width:i.left+i.width-e.left}:t.top<e.top?{top:e.top,height:i.top+i.height-e.top}:t.left+t.width>e.left+e.width?{left:i.left,width:e.left+e.width-i.left}:t.top+t.height>e.top+e.height?{top:i.top,height:e.top+e.height-i.top}:null}(t,i,this.prevCropboxData);e&&this.cropper.setCropBoxData(e)}var r,o,s},this.cropperReadyHandler=()=>{this.setPluginState({cropperReady:!0})},e.addEventListener("cropstart",this.cropstartHandler),e.addEventListener("cropend",this.cropendHandler),e.addEventListener("ready",this.cropperReadyHandler,{once:!0}))};destroyCropper=()=>{this.cropper&&(this.setPluginState({cropperReady:!1}),this.cropstartHandler&&this.imgElement&&this.imgElement.removeEventListener("cropstart",this.cropstartHandler),this.cropendHandler&&this.imgElement&&this.imgElement.removeEventListener("cropend",this.cropendHandler),this.cropperReadyHandler&&this.imgElement&&this.imgElement.removeEventListener("ready",this.cropperReadyHandler),this.cropper.destroy(),this.cropper=null,this.imgElement=null,this.cropstartHandler=null,this.cropendHandler=null,this.cropperReadyHandler=null,this.prevCropboxData=null)};getObjectUrl=()=>this.objectUrl;install(){this.resetEditorState(null);const{target:e}=this.opts;e&&this.mount(e,this)}uninstall(){const{currentImage:e}=this.getPluginState();if(e){const t=this.uppy.getFile(e.id);this.uppy.emit("file-editor:cancel",t)}this.stop(),this.unmount()}render(){const{currentImage:e,angleGranular:t}=this.getPluginState();return null===e||e.isRemote?null:Mo(ad,{currentImage:e,objectUrl:this.objectUrl??"",initCropper:this.initCropper,save:this.save,opts:this.opts,i18n:this.i18n,angleGranular:t,rotateBy:this.rotateBy,rotateGranular:this.rotateGranular,flipHorizontal:this.flipHorizontal,zoom:this.zoom,setAspectRatio:this.setAspectRatio,reset:this.reset})}}var ud,fd={exports:{}},md=function(){if(ud)return fd.exports;ud=1,fd.exports=r,fd.exports.isMobile=r,fd.exports.default=r;const e=/(android|bb\d+|meego).+mobile|armv7l|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series[46]0|samsungbrowser.*mobile|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i,t=/CrOS/,i=/android|ipad|playbook|silk/i;function r(r){r||(r={});let o=r.ua;if(o||"undefined"==typeof navigator||(o=navigator.userAgent),o&&o.headers&&"string"==typeof o.headers["user-agent"]&&(o=o.headers["user-agent"]),"string"!=typeof o)return!1;let s=e.test(o)&&!t.test(o)||!!r.tablet&&i.test(o);return!s&&r.tablet&&r.featureDetect&&navigator&&navigator.maxTouchPoints>1&&-1!==o.indexOf("Macintosh")&&-1!==o.indexOf("Safari")&&(s=!0),s}return fd.exports}();function bd(){return Mo("svg",{"aria-hidden":"true",focusable:"false",fill:"#0097DC",width:"66",height:"55",viewBox:"0 0 66 55",children:Mo("path",{d:"M57.3 8.433c4.59 0 8.1 3.51 8.1 8.1v29.7c0 4.59-3.51 8.1-8.1 8.1H8.7c-4.59 0-8.1-3.51-8.1-8.1v-29.7c0-4.59 3.51-8.1 8.1-8.1h9.45l4.59-7.02c.54-.54 1.35-1.08 2.16-1.08h16.2c.81 0 1.62.54 2.16 1.08l4.59 7.02h9.45zM33 14.64c-8.62 0-15.393 6.773-15.393 15.393 0 8.62 6.773 15.393 15.393 15.393 8.62 0 15.393-6.773 15.393-15.393 0-8.62-6.773-15.393-15.393-15.393zM33 40c-5.648 0-9.966-4.319-9.966-9.967 0-5.647 4.318-9.966 9.966-9.966s9.966 4.319 9.966 9.966C42.966 35.681 38.648 40 33 40z",fillRule:"evenodd"})})}function yd({onDiscard:e,i18n:t}){return Mo("button",{className:"uppy-u-reset uppy-c-btn uppy-Webcam-button uppy-Webcam-button--discard",type:"button",title:t("discardRecordedFile"),"aria-label":t("discardRecordedFile"),onClick:e,"data-uppy-super-focusable":!0,children:Mo("svg",{width:"13",height:"13",viewBox:"0 0 13 13",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",focusable:"false",className:"uppy-c-icon",children:Mo("g",{fill:"#FFF",fillRule:"evenodd",children:[Mo("path",{d:"M.496 11.367L11.103.76l1.414 1.414L1.911 12.781z"}),Mo("path",{d:"M11.104 12.782L.497 2.175 1.911.76l10.607 10.606z"})]})})})}function gd({recording:e,onStartRecording:t,onStopRecording:i,i18n:r}){return Mo("button",e?{className:"uppy-u-reset uppy-c-btn uppy-Webcam-button",type:"button",title:r("stopRecording"),"aria-label":r("stopRecording"),onClick:i,"data-uppy-super-focusable":!0,children:Mo("svg",{"aria-hidden":"true",focusable:"false",className:"uppy-c-icon",width:"100",height:"100",viewBox:"0 0 100 100",children:Mo("rect",{x:"15",y:"15",width:"70",height:"70"})})}:{className:"uppy-u-reset uppy-c-btn uppy-Webcam-button",type:"button",title:r("startRecording"),"aria-label":r("startRecording"),onClick:t,"data-uppy-super-focusable":!0,children:Mo("svg",{"aria-hidden":"true",focusable:"false",className:"uppy-c-icon",width:"100",height:"100",viewBox:"0 0 100 100",children:Mo("circle",{cx:"50",cy:"50",r:"40"})})})}function vd({recordingLengthSeconds:e}){var t;return Mo("span",{children:(t=e,`${Math.floor(t/60)}:${String(t%60).padStart(2,"0")}`)})}function wd({onSnapshot:e,i18n:t}){return Mo("button",{className:"uppy-u-reset uppy-c-btn uppy-Webcam-button uppy-Webcam-button--picture",type:"button",title:t("takePicture"),"aria-label":t("takePicture"),onClick:e,"data-uppy-super-focusable":!0,children:bd()})}function xd({onSubmit:e,i18n:t}){return Mo("button",{className:"uppy-u-reset uppy-c-btn uppy-Webcam-button uppy-Webcam-button--submit",type:"button",title:t("submitRecordedFile"),"aria-label":t("submitRecordedFile"),onClick:e,"data-uppy-super-focusable":!0,children:Mo("svg",{width:"12",height:"9",viewBox:"0 0 12 9",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",focusable:"false",className:"uppy-c-icon",children:Mo("path",{fill:"#fff",fillRule:"nonzero",d:"M10.66 0L12 1.31 4.136 9 0 4.956l1.34-1.31L4.136 6.38z"})})})}function kd({currentDeviceId:e,videoSources:t,onChangeVideoSource:i}){return Mo("div",{className:"uppy-Webcam-videoSource",children:Mo("select",{className:"uppy-u-reset uppy-Webcam-videoSource-select",onChange:e=>{i(e.target.value)},children:t.map((t=>Mo("option",{value:t.deviceId,selected:t.deviceId===e,children:t.label},t.deviceId)))})})}function Sd(e,t){return e.includes(t)}class Dd extends uo{videoElement;refs;componentDidMount(){const{onFocus:e}=this.props;e()}componentWillUnmount(){const{onStop:e}=this.props;e()}render(){const{src:e,recordedVideo:t,capturedSnapshot:i,recording:r,modes:o,supportsRecording:s,videoSources:a,showVideoSourceDropdown:n,showRecordingLength:l,onSubmit:d,i18n:p,mirror:h,onSnapshot:c,onStartRecording:u,onStopRecording:f,onDiscardRecordedMedia:m,recordingLengthSeconds:b}=this.props,y=!!t,g=!!i,v=y||g,w=!v&&s&&(Sd(o,"video-only")||Sd(o,"audio-only")||Sd(o,"video-audio")),x=!v&&Sd(o,"picture"),k=s&&l&&!y,S=n&&a&&a.length>1,D={playsInline:!0};return t?(D.muted=!1,D.controls=!0,D.src=t,this.videoElement&&(this.videoElement.srcObject=null)):(D.muted=!0,D.autoPlay=!0,D.srcObject=e),Mo("div",{className:"uppy uppy-Webcam-container",children:[Mo("div",{className:"uppy-Webcam-videoContainer",children:!i||r||t?Mo("video",{ref:e=>{this.videoElement=e},className:"uppy-Webcam-video "+(h?"uppy-Webcam-video--mirrored":""),...D}):Mo("div",{className:"uppy-Webcam-imageContainer",children:Mo("img",{src:i,className:"uppy-Webcam-video",alt:"capturedSnapshot"})})}),Mo("div",{className:"uppy-Webcam-footer",children:[Mo("div",{className:"uppy-Webcam-videoSourceContainer",children:S?kd(this.props):null}),Mo("div",{className:"uppy-Webcam-buttonContainer",children:[x&&Mo(wd,{onSnapshot:c,i18n:p}),w&&Mo(gd,{recording:r,onStartRecording:u,onStopRecording:f,i18n:p}),(y||g)&&Mo(xd,{onSubmit:d,i18n:p}),(y||g)&&Mo(yd,{onDiscard:m,i18n:p})]}),Mo("div",{className:"uppy-Webcam-recordingLength",children:k&&Mo(vd,{recordingLengthSeconds:b})})]})]})}}var Id={strings:{pluginNameCamera:"Camera",noCameraTitle:"Camera Not Available",noCameraDescription:"In order to take pictures or record video, please connect a camera device",recordingStoppedMaxSize:"Recording stopped because the file size is about to exceed the limit",submitRecordedFile:"Submit recorded file",discardRecordedFile:"Discard recorded file",smile:"Smile!",takePicture:"Take a picture",startRecording:"Begin video recording",stopRecording:"Stop video recording",recordingLength:"Recording length %{recording_length}",allowAccessTitle:"Please allow access to your camera",allowAccessDescription:"In order to take pictures or record video with your camera, please allow camera access for this site."}};function Cd({icon:e,i18n:t,hasCamera:i}){return Mo("div",{className:"uppy-Webcam-permissons",children:[Mo("div",{className:"uppy-Webcam-permissonsIcon",children:e()}),Mo("div",{className:"uppy-Webcam-title",children:t(i?"allowAccessTitle":"noCameraTitle")}),Mo("p",{children:t(i?"allowAccessDescription":"noCameraDescription")})]})}function Bd(e){return"."===e[0]?Cr[e.slice(1)]:e}function Pd(e){return/^video\/[^*]+$/.test(e)}function zd(e){return/^image\/[^*]+$/.test(e)}function Fd(e,t){return e.includes(t)}const Td={onBeforeSnapshot:()=>Promise.resolve(),countdown:!1,modes:["video-audio","video-only","audio-only","picture"],mirror:!0,showVideoSourceDropdown:!1,preferredImageMimeType:null,preferredVideoMimeType:null,showRecordingLength:!1,mobileNativeCamera:md.isMobile({tablet:!0})};class Ad extends Bs{static VERSION="5.1.0";#Y;mediaDevices;supportsUserMedia;protocol;capturedMediaFile;icon;webcamActive;stream=null;recorder=null;recordingChunks=null;recordingLengthTimer;captureInProgress=!1;constructor(e,t){super(e,{...Td,...t}),this.mediaDevices=navigator.mediaDevices,this.supportsUserMedia=!!this.mediaDevices,this.protocol=location.protocol.match(/https/i)?"https":"http",this.id=this.opts.id||"Webcam",this.type="acquirer",this.capturedMediaFile=null,this.icon=()=>Mo("svg",{"aria-hidden":"true",focusable:"false",width:"32",height:"32",viewBox:"0 0 32 32",children:Mo("path",{d:"M23.5 9.5c1.417 0 2.5 1.083 2.5 2.5v9.167c0 1.416-1.083 2.5-2.5 2.5h-15c-1.417 0-2.5-1.084-2.5-2.5V12c0-1.417 1.083-2.5 2.5-2.5h2.917l1.416-2.167C13 7.167 13.25 7 13.5 7h5c.25 0 .5.167.667.333L20.583 9.5H23.5zM16 11.417a4.706 4.706 0 00-4.75 4.75 4.704 4.704 0 004.75 4.75 4.703 4.703 0 004.75-4.75c0-2.663-2.09-4.75-4.75-4.75zm0 7.825c-1.744 0-3.076-1.332-3.076-3.074 0-1.745 1.333-3.077 3.076-3.077 1.744 0 3.074 1.333 3.074 3.076s-1.33 3.075-3.074 3.075z",fill:"#02B383",fillRule:"nonzero"})}),this.defaultLocale=Id,this.i18nInit(),this.title=this.i18n("pluginNameCamera"),this.#Y=this.opts.mirror,this.install=this.install.bind(this),this.setPluginState=this.setPluginState.bind(this),this.render=this.render.bind(this),this.start=this.start.bind(this),this.stop=this.stop.bind(this),this.takeSnapshot=this.takeSnapshot.bind(this),this.startRecording=this.startRecording.bind(this),this.stopRecording=this.stopRecording.bind(this),this.discardRecordedMedia=this.discardRecordedMedia.bind(this),this.submit=this.submit.bind(this),this.oneTwoThreeSmile=this.oneTwoThreeSmile.bind(this),this.focus=this.focus.bind(this),this.changeVideoSource=this.changeVideoSource.bind(this),this.webcamActive=!1,this.opts.countdown&&(this.opts.onBeforeSnapshot=this.oneTwoThreeSmile),this.setPluginState({hasCamera:!1,cameraReady:!1,cameraError:null,recordingLengthSeconds:0,videoSources:[],currentDeviceId:null,capturedSnapshot:null})}getStatus(){const{recordedVideo:e,capturedSnapshot:t,isRecording:i,cameraReady:r,cameraError:o}=this.getPluginState();return i?"recording":null!=e||null!=t?"captured":r?"ready":o?"error":"init"}setOptions(e){super.setOptions({...e,videoConstraints:{...this.opts.videoConstraints,...e?.videoConstraints}})}hasCameraCheck(){return this.mediaDevices?this.mediaDevices.enumerateDevices().then((e=>e.some((e=>"videoinput"===e.kind)))):Promise.resolve(!1)}isAudioOnly(){return 1===this.opts.modes.length&&"audio-only"===this.opts.modes[0]}getConstraints(e=null){const t=-1!==this.opts.modes.indexOf("video-audio")||-1!==this.opts.modes.indexOf("audio-only"),i=!this.isAudioOnly()&&(-1!==this.opts.modes.indexOf("video-audio")||-1!==this.opts.modes.indexOf("video-only")||-1!==this.opts.modes.indexOf("picture")),r={...this.opts.videoConstraints||{},...null!=e&&{deviceId:e}};return{audio:t,video:!!i&&r}}start(e=null){if(!this.supportsUserMedia)return Promise.reject(new Error("Webcam access not supported"));this.webcamActive=!0,this.opts.mirror&&(this.#Y=!0);const t=this.getConstraints(e?.deviceId);this.hasCameraCheck().then((i=>(this.setPluginState({hasCamera:i}),this.mediaDevices.getUserMedia(t).then((t=>{this.stream=t;let i=null;const r=this.isAudioOnly()?t.getAudioTracks():t.getVideoTracks();e&&e.deviceId?r.forEach((t=>{t.getSettings().deviceId===e.deviceId&&(i=t.getSettings().deviceId)})):i=r[0].getSettings().deviceId,this.updateVideoSources(),this.setPluginState({currentDeviceId:i,cameraReady:!0})})).catch((e=>{this.setPluginState({cameraReady:!1,cameraError:e}),this.uppy.info(e.message,"error")})))))}getMediaRecorderOptions(){const e={};if(MediaRecorder.isTypeSupported){const{restrictions:t}=this.uppy.opts;let i=[];this.opts.preferredVideoMimeType?i=[this.opts.preferredVideoMimeType]:t.allowedFileTypes&&(i=t.allowedFileTypes.map(Bd).filter(Pd));const r=i.filter((e=>MediaRecorder.isTypeSupported(e)&&_r(e)));r.length>0&&(e.mimeType=r[0])}return e}startRecording(){this.recorder=new MediaRecorder(this.stream,this.getMediaRecorderOptions()),this.recordingChunks=[];let e=!1;this.recorder.addEventListener("dataavailable",(t=>{this.recordingChunks.push(t.data);const{restrictions:i}=this.uppy.opts;if(this.recordingChunks.length>1&&null!=i.maxFileSize&&!e){const t=this.recordingChunks.reduce(((e,t)=>e+t.size),0);t>Math.max(0,i.maxFileSize-(t-this.recordingChunks[0].size)/(this.recordingChunks.length-1)*3)&&(e=!0,this.uppy.info(this.i18n("recordingStoppedMaxSize"),"warning",4e3),this.stopRecording())}})),this.recorder.start(500),this.opts.showRecordingLength&&(this.recordingLengthTimer=setInterval((()=>{const e=this.getPluginState().recordingLengthSeconds;this.setPluginState({recordingLengthSeconds:e+1})}),1e3)),this.setPluginState({isRecording:!0})}stopRecording(){return new Promise((e=>{this.recorder.addEventListener("stop",(()=>{e()})),this.recorder.stop(),this.opts.showRecordingLength&&(clearInterval(this.recordingLengthTimer),this.setPluginState({recordingLengthSeconds:0}))})).then((()=>(this.setPluginState({isRecording:!1}),this.getVideo()))).then((e=>{try{this.capturedMediaFile=e,this.setPluginState({recordedVideo:URL.createObjectURL(e.data)}),this.#Y=!1}catch(e){e.isRestriction||this.uppy.log(e)}})).then((()=>{this.recordingChunks=null,this.recorder=null}),(e=>{throw this.recordingChunks=null,this.recorder=null,e}))}discardRecordedMedia(){const{recordedVideo:e,capturedSnapshot:t}=this.getPluginState();e&&URL.revokeObjectURL(e),t&&URL.revokeObjectURL(t),this.setPluginState({recordedVideo:null,capturedSnapshot:null}),this.opts.mirror&&(this.#Y=!0),this.capturedMediaFile=null}submit(){try{this.capturedMediaFile&&this.uppy.addFile(this.capturedMediaFile)}catch(e){e.isRestriction||this.uppy.log(e,"error")}}async stop(){if(this.stream){const e=this.stream.getAudioTracks(),t=this.stream.getVideoTracks();e.concat(t).forEach((e=>e.stop()))}this.recorder&&await new Promise((e=>{this.recorder.addEventListener("stop",e,{once:!0}),this.recorder.stop(),this.opts.showRecordingLength&&clearInterval(this.recordingLengthTimer)})),this.recordingChunks=null,this.recorder=null,this.webcamActive=!1,this.stream=null,this.setPluginState({recordedVideo:null,capturedSnapshot:null,isRecording:!1,recordingLengthSeconds:0})}getVideoElement(){return this.el.querySelector(".uppy-Webcam-video")}oneTwoThreeSmile(){return new Promise(((e,t)=>{let i=this.opts.countdown;const r=setInterval((()=>{if(!this.webcamActive)return clearInterval(r),this.captureInProgress=!1,t(new Error("Webcam is not active"));i?(this.uppy.info(`${i}...`,"warning",800),i--):(clearInterval(r),this.uppy.info(this.i18n("smile"),"success",1500),setTimeout((()=>e()),1500))}),1e3)}))}async takeSnapshot(){if(!this.captureInProgress){this.captureInProgress=!0;try{await this.opts.onBeforeSnapshot()}catch(e){const t="object"==typeof e?e.message:e;throw this.uppy.info(t,"error",5e3),new Error(`onBeforeSnapshot: ${t}`)}try{const e=await this.getImage();if(this.capturedMediaFile=e,null==e.data)throw new Error("File data is empty");const t=URL.createObjectURL(e.data);this.setPluginState({capturedSnapshot:t}),this.captureInProgress=!1}catch(e){this.captureInProgress=!1,e.isRestriction||this.uppy.log(e)}}}async getImage(){const e=this.getVideoElement();if(!e)return Promise.reject(new Error("No video element found, likely due to the Webcam tab being closed."));const t=e.videoWidth,i=e.videoHeight,r=document.createElement("canvas");r.width=t,r.height=i,r.getContext("2d").drawImage(e,0,0);const{restrictions:o}=this.uppy.opts;let s=[];this.opts.preferredImageMimeType?s=[this.opts.preferredImageMimeType]:o.allowedFileTypes&&(s=o.allowedFileTypes.map(Bd).filter(zd));const a=s[0]||"image/jpeg",n=_r(a)||"jpg",l=`cam-${Date.now()}.${n}`;return function(e,t){return new Promise((i=>{e.toBlob(i,t,undefined)}))}(r,a).then((e=>({source:this.id,name:l,data:new Blob([e],{type:a}),type:a})))}getVideo(){const e=this.recordingChunks.find((e=>e.type?.length>0)).type,t=_r(e);if(!t)return Promise.reject(new Error(`Could not retrieve recording: Unsupported media type "${e}"`));const i=`webcam-${Date.now()}.${t}`,r=new Blob(this.recordingChunks,{type:e}),o={source:this.id,name:i,data:new Blob([r],{type:e}),type:e};return Promise.resolve(o)}focus(){this.opts.countdown&&setTimeout((()=>{this.uppy.info(this.i18n("smile"),"success",1500)}),1e3)}changeVideoSource(e){this.stop(),this.start({deviceId:e})}updateVideoSources(){this.mediaDevices.enumerateDevices().then((e=>{this.setPluginState({videoSources:e.filter((e=>"videoinput"===e.kind))})}))}render(){this.webcamActive||this.start();const e=this.getPluginState();return e.cameraReady&&e.hasCamera?Mo(Dd,{...e,onChangeVideoSource:this.changeVideoSource,onSnapshot:this.takeSnapshot,onStartRecording:this.startRecording,onStopRecording:this.stopRecording,onDiscardRecordedMedia:this.discardRecordedMedia,onSubmit:this.submit,onFocus:this.focus,onStop:this.stop,i18n:this.i18n,modes:this.opts.modes,showRecordingLength:this.opts.showRecordingLength,showVideoSourceDropdown:this.opts.showVideoSourceDropdown,supportsRecording:"function"==typeof MediaRecorder&&!!MediaRecorder.prototype&&"function"==typeof MediaRecorder.prototype.start,recording:e.isRecording,mirror:this.#Y,src:this.stream}):Mo(Cd,{icon:bd,i18n:this.i18n,hasCamera:e.hasCamera})}install(){const{mobileNativeCamera:e,modes:t,videoConstraints:i}=this.opts,{target:r}=this.opts;e&&r?this.getTargetPlugin(r)?.setOptions({showNativeVideoCameraButton:Fd(t,"video-only")||Fd(t,"video-audio"),showNativePhotoCameraButton:Fd(t,"picture"),nativeCameraFacingMode:i?.facingMode}):(this.setPluginState({cameraReady:!1,recordingLengthSeconds:0}),r&&this.mount(r,this),this.mediaDevices&&(this.updateVideoSources(),this.mediaDevices.ondevicechange=()=>{if(this.updateVideoSources(),this.stream){let e=!0;const{videoSources:t,currentDeviceId:i}=this.getPluginState();t.forEach((t=>{i===t.deviceId&&(e=!1)})),e&&(this.stop(),this.start())}}))}uninstall(){this.stop(),this.unmount()}onUnmount(){this.stop()}}const Ed={withStackTrace:!1},_d=(e,t,i=Ed)=>({data:t.isOk()?{type:"Ok",value:t.value}:{type:"Err",value:t.error},message:e,stack:i.withStackTrace?(new Error).stack:void 0});function Md(e,t,i,r){return new(i||(i=Promise))((function(t,o){function s(e){try{n(r.next(e))}catch(e){o(e)}}function a(e){try{n(r.throw(e))}catch(e){o(e)}}function n(e){var r;e.done?t(e.value):(r=e.value,r instanceof i?r:new i((function(e){e(r)}))).then(s,a)}n((r=r.apply(e,[])).next())}))}function Rd(e){return this instanceof Rd?(this.v=e,this):new Rd(e)}function Nd(e,t,i){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,o=i.apply(e,t||[]),s=[];return r=Object.create(("function"==typeof AsyncIterator?AsyncIterator:Object).prototype),a("next"),a("throw"),a("return",(function(e){return function(t){return Promise.resolve(t).then(e,d)}})),r[Symbol.asyncIterator]=function(){return this},r;function a(e,t){o[e]&&(r[e]=function(t){return new Promise((function(i,r){s.push([e,t,i,r])>1||n(e,t)}))},t&&(r[e]=t(r[e])))}function n(e,t){try{!function(e){e.value instanceof Rd?Promise.resolve(e.value.v).then(l,d):p(s[0][2],e)}(o[e](t))}catch(e){p(s[0][3],e)}}function l(e){n("next",e)}function d(e){n("throw",e)}function p(e,t){e(t),s.shift(),s.length&&n(s[0][0],s[0][1])}}function Ud(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,i=e[Symbol.asyncIterator];return i?i.call(e):(e=function(e){var t="function"==typeof Symbol&&Symbol.iterator,i=t&&e[t],r=0;if(i)return i.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(i){t[i]=e[i]&&function(t){return new Promise((function(r,o){!function(e,t,i,r){Promise.resolve(r).then((function(t){e({value:t,done:i})}),t)}(r,o,(t=e[i](t)).done,t.value)}))}}}"function"==typeof SuppressedError&&SuppressedError;class Od{constructor(e){this._promise=e}static fromSafePromise(e){const t=e.then((e=>new qd(e)));return new Od(t)}static fromPromise(e,t){const i=e.then((e=>new qd(e))).catch((e=>new Gd(t(e))));return new Od(i)}static fromThrowable(e,t){return(...i)=>new Od((()=>Md(this,0,void 0,(function*(){try{return new qd(yield e(...i))}catch(e){return new Gd(t?t(e):e)}})))())}static combine(e){return Wd(e)}static combineWithAllErrors(e){return Hd(e)}map(e){return new Od(this._promise.then((t=>Md(this,0,void 0,(function*(){return t.isErr()?new Gd(t.error):new qd(yield e(t.value))})))))}andThrough(e){return new Od(this._promise.then((t=>Md(this,0,void 0,(function*(){if(t.isErr())return new Gd(t.error);const i=yield e(t.value);return i.isErr()?new Gd(i.error):new qd(t.value)})))))}andTee(e){return new Od(this._promise.then((t=>Md(this,0,void 0,(function*(){if(t.isErr())return new Gd(t.error);try{yield e(t.value)}catch(e){}return new qd(t.value)})))))}orTee(e){return new Od(this._promise.then((t=>Md(this,0,void 0,(function*(){if(t.isOk())return new qd(t.value);try{yield e(t.error)}catch(e){}return new Gd(t.error)})))))}mapErr(e){return new Od(this._promise.then((t=>Md(this,0,void 0,(function*(){return t.isOk()?new qd(t.value):new Gd(yield e(t.error))})))))}andThen(e){return new Od(this._promise.then((t=>{if(t.isErr())return new Gd(t.error);const i=e(t.value);return i instanceof Od?i._promise:i})))}orElse(e){return new Od(this._promise.then((t=>Md(this,0,void 0,(function*(){return t.isErr()?e(t.error):new qd(t.value)})))))}match(e,t){return this._promise.then((i=>i.match(e,t)))}unwrapOr(e){return this._promise.then((t=>t.unwrapOr(e)))}safeUnwrap(){return Nd(this,arguments,(function*(){return yield Rd(yield Rd(yield*function(e){var t,i;return t={},r("next"),r("throw",(function(e){throw e})),r("return"),t[Symbol.iterator]=function(){return this},t;function r(r,o){t[r]=e[r]?function(t){return(i=!i)?{value:Rd(e[r](t)),done:!1}:o?o(t):t}:o}}(Ud(yield Rd(this._promise.then((e=>e.safeUnwrap())))))))}))}then(e,t){return this._promise.then(e,t)}[Symbol.asyncIterator](){return Nd(this,arguments,(function*(){const e=yield Rd(this._promise);return e.isErr()&&(yield yield Rd($d(e.error))),yield Rd(e.value)}))}}function $d(e){return new Od(Promise.resolve(new Gd(e)))}const jd=e=>{let t=Jd([]);for(const i of e){if(i.isErr()){t=Kd(i.error);break}t.map((e=>e.push(i.value)))}return t},Wd=e=>Od.fromSafePromise(Promise.all(e)).andThen(jd),Ld=e=>{let t=Jd([]);for(const i of e)i.isErr()&&t.isErr()?t.error.push(i.error):i.isErr()&&t.isOk()?t=Kd([i.error]):i.isOk()&&t.isOk()&&t.value.push(i.value);return t},Hd=e=>Od.fromSafePromise(Promise.all(e)).andThen(Ld);var Vd;function Jd(e){return new qd(e)}function Kd(e){return new Gd(e)}!function(e){e.fromThrowable=function(e,t){return(...i)=>{try{return Jd(e(...i))}catch(e){return Kd(t?t(e):e)}}},e.combine=function(e){return jd(e)},e.combineWithAllErrors=function(e){return Ld(e)}}(Vd||(Vd={}));class qd{constructor(e){this.value=e}isOk(){return!0}isErr(){return!this.isOk()}map(e){return Jd(e(this.value))}mapErr(e){return Jd(this.value)}andThen(e){return e(this.value)}andThrough(e){return e(this.value).map((()=>this.value))}andTee(e){try{e(this.value)}catch(e){}return Jd(this.value)}orTee(e){return Jd(this.value)}orElse(e){return Jd(this.value)}asyncAndThen(e){return e(this.value)}asyncAndThrough(e){return e(this.value).map((()=>this.value))}asyncMap(e){return Od.fromSafePromise(e(this.value))}unwrapOr(e){return this.value}match(e,t){return e(this.value)}safeUnwrap(){const e=this.value;return function*(){return e}()}_unsafeUnwrap(e){return this.value}_unsafeUnwrapErr(e){throw _d("Called `_unsafeUnwrapErr` on an Ok",this,e)}*[Symbol.iterator](){return this.value}}class Gd{constructor(e){this.error=e}isOk(){return!1}isErr(){return!this.isOk()}map(e){return Kd(this.error)}mapErr(e){return Kd(e(this.error))}andThrough(e){return Kd(this.error)}andTee(e){return Kd(this.error)}orTee(e){try{e(this.error)}catch(e){}return Kd(this.error)}andThen(e){return Kd(this.error)}orElse(e){return e(this.error)}asyncAndThen(e){return $d(this.error)}asyncAndThrough(e){return $d(this.error)}asyncMap(e){return $d(this.error)}unwrapOr(e){return e}match(e,t){return t(this.error)}safeUnwrap(){const e=this.error;return function*(){throw yield Kd(e),new Error("Do not use this generator out of `safeTry`")}()}_unsafeUnwrap(e){throw _d("Called `_unsafeUnwrap` on an Err",this,e)}_unsafeUnwrapErr(e){return this.error}*[Symbol.iterator](){return yield this,this}}const Xd=class{constructor(t){e(this,t),this.accept=["image/*"]}componentDidRender(){const e=(new wa).use(td,{inline:!0,target:this.uppy,theme:"auto"}).use(cd).use(Ad,{modes:["picture"],showVideoSourceDropdown:!0});e.setOptions({restrictions:{allowedFileTypes:this.accept}}),e.addUploader((async t=>{const i=e.getFilesByIds(t);e.emit("upload-start",i);for(const t of i)await this.toFile(t).asyncAndThen((e=>this.uploader(e))).match((()=>e.emit("upload-success",t,{status:201})),(i=>{e.emit("upload-error",t,new Error(i.title+" - "+i.detail))}))}))}toFile(e){return e.data instanceof File?Jd(e.data):e.data instanceof Blob?Jd(new File([e.data],e.name,{type:e.type})):Kd({type:"file",title:"Unknow data type",detail:"Expected file to be a File or Blob object"})}render(){return t("div",{key:"dc900ad6df4df3ab8fe3ce17b4e9a15ae7b70413",class:"container",ref:e=>this.uppy=e})}};Xd.style=".uppy-Root{box-sizing:border-box;color:#333;font-family:-apple-system,system-ui,BlinkMacSystemFont,Segoe UI,Segoe UI Symbol,Segoe UI Emoji,Apple Color Emoji,Roboto,Helvetica,Arial,sans-serif;line-height:1;position:relative;text-align:left;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.uppy-Root[dir=rtl],[dir=rtl] .uppy-Root{text-align:right}.uppy-Root *,.uppy-Root :after,.uppy-Root :before{box-sizing:inherit}.uppy-Root [hidden]{display:none}.uppy-u-reset{all:initial;appearance:none;box-sizing:border-box;font-family:-apple-system,system-ui,BlinkMacSystemFont,Segoe UI,Segoe UI Symbol,Segoe UI Emoji,Apple Color Emoji,Roboto,Helvetica,Arial,sans-serif;line-height:1}[dir=rtl] .uppy-u-reset{text-align:right}.uppy-truncate-text{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.uppy-c-textInput{background-color:#fff;border:1px solid #ddd;border-radius:4px;font-family:inherit;font-size:14px;line-height:1.5;padding:6px 8px}.uppy-size--md .uppy-c-textInput{padding:8px 10px}.uppy-c-textInput:focus{border-color:#1269cf99;box-shadow:0 0 0 3px #1269cf26;outline:none}[data-uppy-theme=dark] .uppy-c-textInput{background-color:#333;border-color:#333;color:#eaeaea}[data-uppy-theme=dark] .uppy-c-textInput:focus{border-color:#525252;box-shadow:none}.uppy-c-icon{display:inline-block;max-height:100%;max-width:100%;overflow:hidden;fill:currentColor}.uppy-c-btn{align-items:center;color:inherit;display:inline-flex;font-family:inherit;font-size:inherit;font-weight:500;justify-content:center;line-height:1;transition-duration:.3s;transition-property:background-color,color;user-select:none;white-space:nowrap}.uppy-c-btn,[dir=rtl] .uppy-c-btn{text-align:center}.uppy-c-btn:not(:disabled):not(.disabled){cursor:pointer}.uppy-c-btn::-moz-focus-inner{border:0}.uppy-c-btn-primary{background-color:#1269cf;border-radius:4px;color:#fff;font-size:14px;padding:10px 18px}.uppy-c-btn-primary:not(:disabled):hover{background-color:#0e51a0}.uppy-c-btn-primary:focus{box-shadow:0 0 0 3px #1269cf66;outline:none}.uppy-size--md .uppy-c-btn-primary{padding:13px 22px}[data-uppy-theme=dark] .uppy-c-btn-primary{color:#eaeaea}[data-uppy-theme=dark] .uppy-c-btn-primary:focus{outline:none}[data-uppy-theme=dark] .uppy-c-btn-primary::-moz-focus-inner{border:0}[data-uppy-theme=dark] .uppy-c-btn-primary:focus{box-shadow:0 0 0 2px #aae1ffd9}.uppy-c-btn-primary.uppy-c-btn--disabled{background-color:#8eb2db}.uppy-c-btn-link{background-color:initial;border-radius:4px;color:#525252;font-size:14px;line-height:1;padding:10px 15px}.uppy-c-btn-link:hover{color:#333}.uppy-c-btn-link:focus{box-shadow:0 0 0 3px #1269cf40;outline:none}.uppy-size--md .uppy-c-btn-link{padding:13px 18px}[data-uppy-theme=dark] .uppy-c-btn-link{color:#eaeaea}[data-uppy-theme=dark] .uppy-c-btn-link:focus{outline:none}[data-uppy-theme=dark] .uppy-c-btn-link::-moz-focus-inner{border:0}[data-uppy-theme=dark] .uppy-c-btn-link:focus{box-shadow:0 0 0 2px #aae1ffd9}[data-uppy-theme=dark] .uppy-c-btn-link:hover{color:#939393}@charset \"UTF-8\";.uppy-ProviderBrowser-viewType--grid ul.uppy-ProviderBrowser-list,.uppy-ProviderBrowser-viewType--unsplash ul.uppy-ProviderBrowser-list{align-items:flex-start;display:flex;flex-direction:row;flex-wrap:wrap;justify-content:space-between;padding:6px}.uppy-ProviderBrowser-viewType--grid ul.uppy-ProviderBrowser-list:after,.uppy-ProviderBrowser-viewType--unsplash ul.uppy-ProviderBrowser-list:after{content:\"\";flex:auto}.uppy-ProviderBrowser-viewType--grid li.uppy-ProviderBrowserItem,.uppy-ProviderBrowser-viewType--unsplash li.uppy-ProviderBrowserItem{margin:0;position:relative;width:50%}.uppy-size--md .uppy-ProviderBrowser-viewType--grid li.uppy-ProviderBrowserItem,.uppy-size--md .uppy-ProviderBrowser-viewType--unsplash li.uppy-ProviderBrowserItem{width:33.3333%}.uppy-size--lg .uppy-ProviderBrowser-viewType--grid li.uppy-ProviderBrowserItem,.uppy-size--lg .uppy-ProviderBrowser-viewType--unsplash li.uppy-ProviderBrowserItem{width:25%}.uppy-ProviderBrowser-viewType--grid li.uppy-ProviderBrowserItem:before,.uppy-ProviderBrowser-viewType--unsplash li.uppy-ProviderBrowserItem:before{content:\"\";display:block;padding-top:100%}.uppy-ProviderBrowser-viewType--grid li.uppy-ProviderBrowserItem--selected img,.uppy-ProviderBrowser-viewType--grid li.uppy-ProviderBrowserItem--selected svg,.uppy-ProviderBrowser-viewType--unsplash li.uppy-ProviderBrowserItem--selected img,.uppy-ProviderBrowser-viewType--unsplash li.uppy-ProviderBrowserItem--selected svg{opacity:.85}.uppy-ProviderBrowser-viewType--grid li.uppy-ProviderBrowserItem--disabled,.uppy-ProviderBrowser-viewType--unsplash li.uppy-ProviderBrowserItem--disabled{opacity:.5}.uppy-ProviderBrowser-viewType--grid li.uppy-ProviderBrowserItem--noPreview .uppy-ProviderBrowserItem-inner,.uppy-ProviderBrowser-viewType--unsplash li.uppy-ProviderBrowserItem--noPreview .uppy-ProviderBrowserItem-inner{background-color:#93939333}[data-uppy-theme=dark] .uppy-ProviderBrowser-viewType--grid li.uppy-ProviderBrowserItem--noPreview .uppy-ProviderBrowserItem-inner,[data-uppy-theme=dark] .uppy-ProviderBrowser-viewType--unsplash li.uppy-ProviderBrowserItem--noPreview .uppy-ProviderBrowserItem-inner{background-color:#eaeaea33}.uppy-ProviderBrowser-viewType--grid li.uppy-ProviderBrowserItem--noPreview svg,.uppy-ProviderBrowser-viewType--unsplash li.uppy-ProviderBrowserItem--noPreview svg{height:30%;width:30%;fill:#000000b3}[data-uppy-theme=dark] .uppy-ProviderBrowser-viewType--grid li.uppy-ProviderBrowserItem--noPreview svg,[data-uppy-theme=dark] .uppy-ProviderBrowser-viewType--unsplash li.uppy-ProviderBrowserItem--noPreview svg{fill:#fffc}.uppy-ProviderBrowser-viewType--grid .uppy-ProviderBrowserItem-inner,.uppy-ProviderBrowser-viewType--unsplash .uppy-ProviderBrowserItem-inner{border-radius:4px;bottom:7px;height:calc(100% - 14px);left:7px;overflow:hidden;position:absolute;right:7px;text-align:center;top:7px;width:calc(100% - 14px)}@media (hover:none){.uppy-ProviderBrowser-viewType--grid .uppy-ProviderBrowserItem-inner .uppy-ProviderBrowserItem-author,.uppy-ProviderBrowser-viewType--unsplash .uppy-ProviderBrowserItem-inner .uppy-ProviderBrowserItem-author{display:block}}[data-uppy-theme=dark] .uppy-ProviderBrowser-viewType--grid .uppy-ProviderBrowserItem-inner,[data-uppy-theme=dark] .uppy-ProviderBrowser-viewType--unsplash .uppy-ProviderBrowserItem-inner{box-shadow:0 0 0 3px #aae1ffb3}.uppy-ProviderBrowser-viewType--grid .uppy-ProviderBrowserItem-inner img,.uppy-ProviderBrowser-viewType--unsplash .uppy-ProviderBrowserItem-inner img{border-radius:4px;height:100%;object-fit:cover;width:100%}.uppy-ProviderBrowser-viewType--grid .uppy-ProviderBrowserItem-author,.uppy-ProviderBrowser-viewType--unsplash .uppy-ProviderBrowserItem-author{background:#0000004d;bottom:0;color:#fff;display:none;font-size:12px;font-weight:500;left:0;margin:0;padding:5px;position:absolute;text-decoration:none;width:100%}.uppy-ProviderBrowser-viewType--grid .uppy-ProviderBrowserItem-author:hover,.uppy-ProviderBrowser-viewType--unsplash .uppy-ProviderBrowserItem-author:hover{background:#0006;text-decoration:underline}.uppy-ProviderBrowser-viewType--grid .uppy-ProviderBrowserItem-checkbox,.uppy-ProviderBrowser-viewType--unsplash .uppy-ProviderBrowserItem-checkbox{background-color:#1269cf;border-radius:50%;height:26px;opacity:0;position:absolute;right:16px;top:16px;width:26px;z-index:1002}.uppy-ProviderBrowser-viewType--grid .uppy-ProviderBrowserItem-checkbox:after,.uppy-ProviderBrowser-viewType--unsplash .uppy-ProviderBrowserItem-checkbox:after{height:7px;inset-inline-start:7px;top:8px;width:12px}.uppy-ProviderBrowser-viewType--grid .uppy-ProviderBrowserItem--is-checked .uppy-ProviderBrowserItem-checkbox,.uppy-ProviderBrowser-viewType--unsplash .uppy-ProviderBrowserItem--is-checked .uppy-ProviderBrowserItem-checkbox{opacity:1}.uppy-ProviderBrowser-viewType--grid .uppy-ProviderBrowserItem-checkbox--grid:focus+label .uppy-ProviderBrowserItem-author,.uppy-ProviderBrowser-viewType--grid .uppy-ProviderBrowserItem-checkbox--grid:hover+label .uppy-ProviderBrowserItem-author,.uppy-ProviderBrowser-viewType--unsplash .uppy-ProviderBrowserItem-checkbox--grid:focus+label .uppy-ProviderBrowserItem-author,.uppy-ProviderBrowser-viewType--unsplash .uppy-ProviderBrowserItem-checkbox--grid:hover+label .uppy-ProviderBrowserItem-author{display:block}.uppy-ProviderBrowser-viewType--grid .uppy-ProviderBrowserItem-checkbox--grid:focus+label,.uppy-ProviderBrowser-viewType--unsplash .uppy-ProviderBrowserItem-checkbox--grid:focus+label{box-shadow:0 0 0 3px #1269cf80}.uppy-ProviderBrowser-viewType--grid .uppy-ProviderBrowserItem-checkbox--grid:focus+label:focus,.uppy-ProviderBrowser-viewType--unsplash .uppy-ProviderBrowserItem-checkbox--grid:focus+label:focus{outline:none}.uppy-ProviderBrowser-viewType--grid .uppy-ProviderBrowserItem-checkbox--grid:focus+label::-moz-focus-inner,.uppy-ProviderBrowser-viewType--unsplash .uppy-ProviderBrowserItem-checkbox--grid:focus+label::-moz-focus-inner{border:0}.uppy-ProviderBrowser-viewType--list{background-color:#fff}[data-uppy-theme=dark] .uppy-ProviderBrowser-viewType--list{background-color:#1f1f1f}.uppy-ProviderBrowser-viewType--list li.uppy-ProviderBrowserItem{align-items:center;display:flex;margin:0;padding:7px 15px}[data-uppy-theme=dark] .uppy-ProviderBrowser-viewType--list li.uppy-ProviderBrowserItem{color:#eaeaea}.uppy-ProviderBrowser-viewType--list li.uppy-ProviderBrowserItem--disabled{opacity:.6}.uppy-ProviderBrowser-viewType--list .uppy-ProviderBrowserItem-checkbox{background-color:#fff;border:1px solid #cfcfcf;border-radius:3px;height:17px;margin-inline-end:15px;width:17px}.uppy-ProviderBrowser-viewType--list .uppy-ProviderBrowserItem-checkbox:focus{border:1px solid #1269cf;box-shadow:0 0 0 3px #1269cf40;outline:none}.uppy-ProviderBrowser-viewType--list .uppy-ProviderBrowserItem-checkbox:after{height:5px;inset-inline-start:3px;opacity:0;top:4px;width:9px}[data-uppy-theme=dark] .uppy-ProviderBrowser-viewType--list .uppy-ProviderBrowserItem-checkbox:focus{border-color:#02baf2b3;box-shadow:0 0 0 3px #02baf233}.uppy-ProviderBrowser-viewType--list .uppy-ProviderBrowserItem--is-checked .uppy-ProviderBrowserItem-checkbox,.uppy-ProviderBrowser-viewType--list .uppy-ProviderBrowserItem--is-partial .uppy-ProviderBrowserItem-checkbox{background-color:#1269cf;border-color:#1269cf}.uppy-ProviderBrowser-viewType--list .uppy-ProviderBrowserItem--is-checked .uppy-ProviderBrowserItem-checkbox:after,.uppy-ProviderBrowser-viewType--list .uppy-ProviderBrowserItem--is-partial .uppy-ProviderBrowserItem-checkbox:after{opacity:1}.uppy-ProviderBrowser-viewType--list .uppy-ProviderBrowserItem-inner{align-items:center;color:inherit;display:flex;font-family:-apple-system,system-ui,BlinkMacSystemFont,Segoe UI,Segoe UI Symbol,Segoe UI Emoji,Apple Color Emoji,Roboto,Helvetica,Arial,sans-serif;overflow:hidden;padding:2px;text-overflow:ellipsis;white-space:nowrap}.uppy-ProviderBrowser-viewType--list .uppy-ProviderBrowserItem-inner:focus{outline:none;text-decoration:underline}.uppy-ProviderBrowser-viewType--list .uppy-ProviderBrowserItem-inner img,.uppy-ProviderBrowser-viewType--list .uppy-ProviderBrowserItem-inner svg{margin-inline-end:8px}.uppy-ProviderBrowser-viewType--list .uppy-ProviderBrowserItem-inner span{line-height:1.2;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.uppy-ProviderBrowser-viewType--list .uppy-ProviderBrowserItem--disabled .uppy-ProviderBrowserItem-inner{cursor:default}.uppy-ProviderBrowser-viewType--list .uppy-ProviderBrowserItem-iconWrap{margin-inline-end:7px;width:20px}.uppy-ProviderBrowserItem-checkbox{cursor:pointer;flex-shrink:0;position:relative}.uppy-ProviderBrowserItem-checkbox:disabled,.uppy-ProviderBrowserItem-checkbox:disabled:after{cursor:default}[data-uppy-theme=dark] .uppy-ProviderBrowserItem-checkbox{background-color:#1f1f1f;border-color:#939393}[data-uppy-theme=dark] .uppy-ProviderBrowserItem--is-checked .uppy-ProviderBrowserItem-checkbox{background-color:#333}.uppy-ProviderBrowserItem--is-checked .uppy-ProviderBrowserItem-checkbox:after{border-bottom:2px solid #eaeaea;border-left:2px solid #eaeaea;content:\"\";cursor:pointer;position:absolute;transform:rotate(-45deg)}.uppy-ProviderBrowserItem--is-partial .uppy-ProviderBrowserItem-checkbox:after{background-color:#eaeaea!important;content:\"\"!important;height:2px!important;left:20%!important;position:absolute!important;right:20%!important;top:50%!important;transform:translateY(-50%)!important}.uppy-SearchProvider{align-items:center;display:flex;flex:1;flex-direction:column;height:100%;justify-content:center;width:100%}[data-uppy-theme=dark] .uppy-SearchProvider{background-color:#1f1f1f}.uppy-SearchProvider-input{margin-bottom:15px;max-width:650px;width:90%}.uppy-size--md .uppy-SearchProvider-input{margin-bottom:20px}.uppy-SearchProvider-input::-webkit-search-cancel-button{display:none}.uppy-SearchProvider-searchButton{padding:13px 25px}.uppy-size--md .uppy-SearchProvider-searchButton{padding:13px 30px}.uppy-DashboardContent-panelBody{align-items:center;display:flex;flex:1;justify-content:center}[data-uppy-theme=dark] .uppy-DashboardContent-panelBody{background-color:#1f1f1f}.uppy-Provider-auth,.uppy-Provider-empty,.uppy-Provider-error,.uppy-Provider-loading{align-items:center;color:#939393;display:flex;flex:1;flex-flow:column wrap;justify-content:center}.uppy-Provider-empty{color:#939393}.uppy-Provider-authIcon svg{height:75px;width:100px}.uppy-Provider-authTitle{color:#757575;font-size:17px;font-weight:400;line-height:1.4;margin-bottom:30px;max-width:500px;padding:0 15px;text-align:center}.uppy-size--md .uppy-Provider-authTitle{font-size:20px}[data-uppy-theme=dark] .uppy-Provider-authTitle{color:#cfcfcf}.uppy-Provider-btn-google{align-items:center;background:#4285f4;display:flex;padding:8px 12px!important}.uppy-Provider-btn-google:hover{background-color:#1266f1}.uppy-Provider-btn-google:focus{box-shadow:0 0 0 3px #4285f466;outline:none}.uppy-Provider-btn-google svg{margin-right:8px}.uppy-Provider-breadcrumbs{color:#525252;flex:1;font-size:12px;margin-bottom:10px;text-align:start}.uppy-size--md .uppy-Provider-breadcrumbs{margin-bottom:0}[data-uppy-theme=dark] .uppy-Provider-breadcrumbs{color:#eaeaea}.uppy-Provider-breadcrumbsIcon{color:#525252;display:inline-block;line-height:1;margin-inline-end:4px;vertical-align:middle}.uppy-Provider-breadcrumbsIcon svg{height:13px;width:13px;fill:#525252}.uppy-Provider-breadcrumbs button{border-radius:3px;display:inline-block;line-height:inherit;padding:4px}.uppy-Provider-breadcrumbs button:focus{outline:none}.uppy-Provider-breadcrumbs button::-moz-focus-inner{border:0}.uppy-Provider-breadcrumbs button:hover{color:#0e51a0}.uppy-Provider-breadcrumbs button:focus{background-color:#dfe6f1}[data-uppy-theme=dark] .uppy-Provider-breadcrumbs button:focus{background-color:#333}.uppy-Provider-breadcrumbs button:not(:last-of-type){text-decoration:underline}.uppy-Provider-breadcrumbs button:last-of-type{color:#333;cursor:normal;font-weight:500;pointer-events:none}.uppy-Provider-breadcrumbs button:hover{cursor:pointer}[data-uppy-theme=dark] .uppy-Provider-breadcrumbs button{color:#eaeaea}.uppy-ProviderBrowser{display:flex;flex:1;flex-direction:column;font-size:14px;font-weight:400;height:100%}.uppy-ProviderBrowser-user{color:#333;font-weight:500;margin:0 8px 0 0}[data-uppy-theme=dark] .uppy-ProviderBrowser-user{color:#eaeaea}.uppy-ProviderBrowser-user:after{color:#939393;content:\"·\";font-weight:400;inset-inline-start:4px;position:relative}.uppy-ProviderBrowser-header{border-bottom:1px solid #eaeaea;position:relative;z-index:1001}[data-uppy-theme=dark] .uppy-ProviderBrowser-header{border-bottom:1px solid #333}.uppy-ProviderBrowser-headerBar{background-color:#fafafa;color:#757575;font-size:12px;line-height:1.4;padding:7px 15px;z-index:1001}.uppy-size--md .uppy-ProviderBrowser-headerBar{align-items:center;display:flex}[data-uppy-theme=dark] .uppy-ProviderBrowser-headerBar{background-color:#1f1f1f}.uppy-ProviderBrowser-headerBar--simple{display:block;justify-content:center;text-align:center}.uppy-ProviderBrowser-headerBar--simple .uppy-Provider-breadcrumbsWrap{display:inline-block;flex:none;vertical-align:middle}.uppy-ProviderBrowser-searchFilter{align-items:center;display:flex;height:30px;margin-bottom:15px;margin-top:15px;padding-left:8px;padding-right:8px;position:relative;width:100%}.uppy-ProviderBrowser-searchFilterInput{background-color:#eaeaea;border:0;border-radius:4px;color:#333;font-family:-apple-system,system-ui,BlinkMacSystemFont,Segoe UI,Segoe UI Symbol,Segoe UI Emoji,Apple Color Emoji,Roboto,Helvetica,Arial,sans-serif;font-size:13px;height:30px;line-height:1.4;outline:0;padding-inline-end:30px;padding-inline-start:30px;width:100%;z-index:1001}.uppy-ProviderBrowser-searchFilterInput::-webkit-search-cancel-button{display:none}[data-uppy-theme=dark] .uppy-ProviderBrowser-searchFilterInput{background-color:#1f1f1f;color:#eaeaea}.uppy-ProviderBrowser-searchFilterInput:focus{background-color:#cfcfcf;border:0}[data-uppy-theme=dark] .uppy-ProviderBrowser-searchFilterInput:focus{background-color:#333}.uppy-ProviderBrowser-searchFilterIcon{color:#757575;height:12px;inset-inline-start:16px;position:absolute;width:12px;z-index:1002}.uppy-ProviderBrowser-searchFilterInput::placeholder{color:#939393;opacity:1}.uppy-ProviderBrowser-searchFilterReset{border-radius:3px;color:#939393;cursor:pointer;height:22px;inset-inline-end:16px;padding:6px;position:absolute;width:22px;z-index:1002}.uppy-ProviderBrowser-searchFilterReset:focus{outline:none}.uppy-ProviderBrowser-searchFilterReset::-moz-focus-inner{border:0}.uppy-ProviderBrowser-searchFilterReset:focus{box-shadow:0 0 0 3px #1269cf80}.uppy-ProviderBrowser-searchFilterReset:hover{color:#757575}.uppy-ProviderBrowser-searchFilterReset svg{vertical-align:text-top}.uppy-ProviderBrowser-userLogout{border-radius:3px;color:#1269cf;cursor:pointer;line-height:inherit;padding:4px}.uppy-ProviderBrowser-userLogout:focus{outline:none}.uppy-ProviderBrowser-userLogout::-moz-focus-inner{border:0}.uppy-ProviderBrowser-userLogout:hover{color:#0e51a0}.uppy-ProviderBrowser-userLogout:focus{background-color:#dfe6f1}[data-uppy-theme=dark] .uppy-ProviderBrowser-userLogout:focus{background-color:#333}.uppy-ProviderBrowser-userLogout:hover{text-decoration:underline}[data-uppy-theme=dark] .uppy-ProviderBrowser-userLogout{color:#eaeaea}.uppy-ProviderBrowser-body{flex:1;position:relative}.uppy-ProviderBrowser-list{background-color:#fff;border-spacing:0;bottom:0;display:block;flex:1;height:100%;left:0;list-style:none;margin:0;overflow-x:hidden;overflow-y:auto;padding:0;position:absolute;right:0;top:0;width:100%;-webkit-overflow-scrolling:touch}[data-uppy-theme=dark] .uppy-ProviderBrowser-list{background-color:#1f1f1f}.uppy-ProviderBrowser-list:focus{outline:none}.uppy-ProviderBrowserItem-inner{cursor:pointer;font-size:13px;font-weight:500}.uppy-ProviderBrowser-footer{align-items:center;background-color:#fff;border-top:1px solid #eaeaea;display:flex;justify-content:space-between;padding:15px}.uppy-ProviderBrowser-footer button{margin-inline-end:8px}[data-uppy-theme=dark] .uppy-ProviderBrowser-footer{background-color:#1f1f1f;border-top:1px solid #333}.uppy-ProviderBrowser-footer-buttons{flex-shrink:0}.uppy-ProviderBrowser-footer-error{color:#e32437;line-height:18px}@media (max-width:426px){.uppy-ProviderBrowser-footer{align-items:stretch;flex-direction:column-reverse}.uppy-ProviderBrowser-footer-error{padding-bottom:10px}}.picker-dialog-bg{z-index:20000!important}.picker-dialog{z-index:20001!important}.uppy-Dashboard-Item-previewInnerWrap{align-items:center;border-radius:3px;box-shadow:0 0 2px 0 #0006;display:flex;flex-direction:column;height:100%;justify-content:center;overflow:hidden;position:relative;width:100%}.uppy-size--md .uppy-Dashboard-Item-previewInnerWrap{box-shadow:0 1px 2px #00000026}.uppy-Dashboard--singleFile .uppy-Dashboard-Item-previewInnerWrap{box-shadow:none}.uppy-Dashboard-Item-previewInnerWrap:after{background-color:#000000a6;bottom:0;content:\"\";display:none;left:0;position:absolute;right:0;top:0;z-index:1001}.uppy-Dashboard-Item-previewLink{bottom:0;left:0;position:absolute;right:0;top:0;z-index:1002}.uppy-Dashboard-Item-previewLink:focus{box-shadow:inset 0 0 0 3px #579df0}[data-uppy-theme=dark] .uppy-Dashboard-Item-previewLink:focus{box-shadow:inset 0 0 0 3px #016c8d}.uppy-Dashboard-Item-preview img.uppy-Dashboard-Item-previewImg{border-radius:3px;height:100%;object-fit:cover;transform:translateZ(0);width:100%}.uppy-Dashboard--singleFile .uppy-Dashboard-Item-preview img.uppy-Dashboard-Item-previewImg{height:auto;max-height:100%;max-width:100%;object-fit:contain;padding:10px;width:auto}.uppy-Dashboard-Item-progress{color:#fff;left:50%;position:absolute;text-align:center;top:50%;transform:translate(-50%,-50%);transition:all .35 ease;width:120px;z-index:1002}.uppy-Dashboard-Item-progressIndicator{color:#fff;display:inline-block;height:38px;opacity:.9;width:38px}.uppy-size--md .uppy-Dashboard-Item-progressIndicator{height:55px;width:55px}button.uppy-Dashboard-Item-progressIndicator{cursor:pointer}button.uppy-Dashboard-Item-progressIndicator:focus{outline:none}button.uppy-Dashboard-Item-progressIndicator::-moz-focus-inner{border:0}button.uppy-Dashboard-Item-progressIndicator:focus .uppy-Dashboard-Item-progressIcon--bg,button.uppy-Dashboard-Item-progressIndicator:focus .uppy-Dashboard-Item-progressIcon--retry{fill:#579df0}.uppy-Dashboard-Item-progressIcon--circle{height:100%;width:100%}.uppy-Dashboard-Item-progressIcon--bg{stroke:#fff6}.uppy-Dashboard-Item-progressIcon--progress{transition:stroke-dashoffset .5s ease-out;stroke:#fff}.uppy-Dashboard-Item-progressIcon--play{transition:all .2s;fill:#fff;stroke:#fff}.uppy-Dashboard-Item-progressIcon--cancel{transition:all .2s;fill:#fff}.uppy-Dashboard-Item-progressIcon--pause{transition:all .2s;fill:#fff;stroke:#fff}.uppy-Dashboard-Item-progressIcon--check{transition:all .2s;fill:#fff}.uppy-Dashboard-Item-progressIcon--retry{fill:#fff}.uppy-Dashboard-Item.is-complete .uppy-Dashboard-Item-progress{inset-inline-end:-8px;inset-inline-start:auto;top:-9px;transform:none;width:auto}.uppy-Dashboard-Item.is-error .uppy-Dashboard-Item-progressIndicator{height:18px;width:18px}.uppy-size--md .uppy-Dashboard-Item.is-error .uppy-Dashboard-Item-progressIndicator{height:28px;width:28px}.uppy-Dashboard-Item.is-complete .uppy-Dashboard-Item-progressIndicator{height:18px;opacity:1;width:18px}.uppy-size--md .uppy-Dashboard-Item.is-complete .uppy-Dashboard-Item-progressIndicator{height:22px;width:22px}.uppy-Dashboard-Item.is-processing .uppy-Dashboard-Item-progress{opacity:0}.uppy-Dashboard-Item-fileInfo{padding-inline-end:5px}.uppy-Dashboard--singleFile .uppy-Dashboard-Item-fileInfo{padding-inline-end:10px}.uppy-size--md.uppy-Dashboard--singleFile .uppy-Dashboard-Item-fileInfo{padding-inline-end:15px}.uppy-Dashboard-Item-name{font-size:12px;font-weight:500;line-height:1.3;margin-bottom:5px;word-wrap:anywhere;word-break:break-all}[data-uppy-theme=dark] .uppy-Dashboard-Item-name{color:#eaeaea}.uppy-size--md.uppy-Dashboard--singleFile .uppy-Dashboard-Item-name{font-size:14px;line-height:1.4}.uppy-Dashboard-Item-fileName{align-items:baseline;display:flex}.uppy-Dashboard-Item-fileName button{margin-left:5px}.uppy-Dashboard-Item-author{color:#757575;display:inline-block;font-size:11px;font-weight:400;line-height:1;margin-bottom:5px;vertical-align:bottom}.uppy-Dashboard-Item-author a{color:#757575}.uppy-Dashboard-Item-status{color:#757575;font-size:11px;font-weight:400;line-height:1}[data-uppy-theme=dark] .uppy-Dashboard-Item-status{color:#bbb}.uppy-Dashboard-Item-statusSize{display:inline-block;margin-bottom:5px;text-transform:uppercase;vertical-align:bottom}.uppy-Dashboard-Item-reSelect{color:#1269cf;font-family:inherit;font-size:inherit;font-weight:600}.uppy-Dashboard-Item-errorMessage{background-color:#fdeff1;color:#a51523;font-size:11px;font-weight:500;line-height:1.3;padding:5px 6px}.uppy-Dashboard-Item-errorMessageBtn{color:#a51523;cursor:pointer;font-size:11px;font-weight:500;text-decoration:underline}.uppy-Dashboard-Item-preview .uppy-Dashboard-Item-errorMessage{display:none}.uppy-size--md .uppy-Dashboard-Item-preview .uppy-Dashboard-Item-errorMessage{border-bottom-left-radius:3px;border-bottom-right-radius:3px;border-top:1px solid #f7c2c8;bottom:0;display:block;left:0;line-height:1.4;padding:6px 8px;position:absolute;right:0}.uppy-Dashboard-Item-fileInfo .uppy-Dashboard-Item-errorMessage{border:1px solid #f7c2c8;border-radius:3px;display:inline-block;position:static}.uppy-size--md .uppy-Dashboard-Item-fileInfo .uppy-Dashboard-Item-errorMessage{display:none}.uppy-Dashboard-Item-action{color:#939393;cursor:pointer}.uppy-Dashboard-Item-action:focus{outline:none}.uppy-Dashboard-Item-action::-moz-focus-inner{border:0}.uppy-Dashboard-Item-action:focus{box-shadow:0 0 0 3px #1269cf80}.uppy-Dashboard-Item-action:hover{color:#1f1f1f;opacity:1}[data-uppy-theme=dark] .uppy-Dashboard-Item-action{color:#cfcfcf}[data-uppy-theme=dark] .uppy-Dashboard-Item-action:focus{outline:none}[data-uppy-theme=dark] .uppy-Dashboard-Item-action::-moz-focus-inner{border:0}[data-uppy-theme=dark] .uppy-Dashboard-Item-action:focus{box-shadow:0 0 0 2px #aae1ffd9}[data-uppy-theme=dark] .uppy-Dashboard-Item-action:hover{color:#eaeaea}.uppy-Dashboard-Item-action--remove{color:#1f1f1f;opacity:.95}.uppy-Dashboard-Item-action--remove:hover{color:#000;opacity:1}.uppy-size--md .uppy-Dashboard-Item-action--remove{height:18px;inset-inline-end:-8px;padding:0;position:absolute;top:-8px;width:18px;z-index:1002}.uppy-size--md .uppy-Dashboard-Item-action--remove:focus{border-radius:50%}.uppy-Dashboard--singleFile.uppy-size--height-md .uppy-Dashboard-Item-action--remove{inset-inline-end:8px;position:absolute;top:8px}[data-uppy-theme=dark] .uppy-Dashboard-Item-action--remove{color:#525252}[data-uppy-theme=dark] .uppy-Dashboard-Item-action--remove:hover{color:#333}.uppy-Dashboard:not(.uppy-size--md):not(.uppy-Dashboard--singleFile.uppy-size--height-md) .uppy-Dashboard-Item-actionWrapper{align-items:center;display:flex}.uppy-Dashboard:not(.uppy-size--md):not(.uppy-Dashboard--singleFile.uppy-size--height-md) .uppy-Dashboard-Item-action{height:22px;margin-left:3px;padding:3px;width:22px}.uppy-Dashboard:not(.uppy-size--md):not(.uppy-Dashboard--singleFile.uppy-size--height-md) .uppy-Dashboard-Item-action:focus{border-radius:3px}.uppy-size--md .uppy-Dashboard-Item-action--copyLink,.uppy-size--md .uppy-Dashboard-Item-action--edit{height:16px;padding:0;width:16px}.uppy-size--md .uppy-Dashboard-Item-action--copyLink:focus,.uppy-size--md .uppy-Dashboard-Item-action--edit:focus{border-radius:3px}.uppy-Dashboard-Item{align-items:center;border-bottom:1px solid #eaeaea;display:flex;padding:10px}.uppy-Dashboard:not(.uppy-Dashboard--singleFile) .uppy-Dashboard-Item{padding-inline-end:0}[data-uppy-theme=dark] .uppy-Dashboard-Item{border-bottom:1px solid #333}.uppy-size--md .uppy-Dashboard-Item{border-bottom:0;display:block;float:inline-start;height:215px;margin:5px 15px;padding:0;position:relative;width:calc(33.333% - 30px)}.uppy-size--lg .uppy-Dashboard-Item{height:190px;margin:5px 15px;padding:0;width:calc(25% - 30px)}.uppy-size--xl .uppy-Dashboard-Item{height:210px;padding:0;width:calc(20% - 30px)}.uppy-Dashboard--singleFile .uppy-Dashboard-Item{border-bottom:0;display:flex;flex-direction:column;height:100%;max-width:400px;padding:15px;position:relative;width:100%}.uppy-Dashboard-Item.is-ghost .uppy-Dashboard-Item-previewInnerWrap{opacity:.2}.uppy-Dashboard-Item.is-ghost .uppy-Dashboard-Item-name{opacity:.7}.uppy-Dashboard-Item.is-ghost .uppy-Dashboard-Item-preview:before{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='35' height='39' viewBox='0 0 35 39'%3E%3Cpath fill='%2523000' d='M1.708 38.66c1.709 0 3.417-3.417 6.834-3.417s5.125 3.417 8.61 3.417c3.348 0 5.056-3.417 8.473-3.417 4.305 0 5.125 3.417 6.833 3.417.889 0 1.709-.889 1.709-1.709v-19.68C34.167-5.757 0-5.757 0 17.271v19.68c0 .82.888 1.709 1.708 1.709m8.542-17.084a3.383 3.383 0 0 1-3.417-3.416 3.383 3.383 0 0 1 3.417-3.417 3.383 3.383 0 0 1 3.417 3.417 3.383 3.383 0 0 1-3.417 3.416m13.667 0A3.383 3.383 0 0 1 20.5 18.16a3.383 3.383 0 0 1 3.417-3.417 3.383 3.383 0 0 1 3.416 3.417 3.383 3.383 0 0 1-3.416 3.416'/%3E%3C/svg%3E\");background-position:50% 10px;background-repeat:no-repeat;background-size:25px;bottom:0;content:\"\";left:0;opacity:.5;position:absolute;right:0;top:0;z-index:1005}.uppy-size--md .uppy-Dashboard-Item.is-ghost .uppy-Dashboard-Item-preview:before{background-position:50% 50%;background-size:40px}.uppy-Dashboard--singleFile .uppy-Dashboard-Item.is-ghost .uppy-Dashboard-Item-preview:before{background-position:50% 50%;background-size:30%}.uppy-Dashboard-Item-preview{flex-grow:0;flex-shrink:0;height:50px;position:relative;width:50px}.uppy-size--md .uppy-Dashboard-Item-preview{height:140px;width:100%}.uppy-size--lg .uppy-Dashboard-Item-preview{height:120px}.uppy-size--xl .uppy-Dashboard-Item-preview{height:140px}.uppy-Dashboard--singleFile .uppy-Dashboard-Item-preview{flex-grow:1;max-height:75%;width:100%}.uppy-Dashboard--singleFile.uppy-size--md .uppy-Dashboard-Item-preview{max-height:100%}.uppy-Dashboard-Item-fileInfoAndButtons{align-items:center;display:flex;flex-grow:1;justify-content:space-between;padding-inline-end:8px;padding-inline-start:12px}.uppy-Dashboard--singleFile .uppy-Dashboard-Item-fileInfoAndButtons,.uppy-size--md .uppy-Dashboard-Item-fileInfoAndButtons{align-items:flex-start;padding:9px 0 0}.uppy-Dashboard--singleFile .uppy-Dashboard-Item-fileInfoAndButtons{flex-grow:0;width:100%}.uppy-Dashboard-Item-fileInfo{flex-grow:1;flex-shrink:1}.uppy-Dashboard-Item-actionWrapper{flex-grow:0;flex-shrink:0}.uppy-Dashboard-Item.is-error .uppy-Dashboard-Item-previewInnerWrap:after,.uppy-Dashboard-Item.is-inprogress .uppy-Dashboard-Item-previewInnerWrap:after{display:block}.uppy-Dashboard-Item-errorDetails{appearance:none;background-color:#939393;border:none;border-radius:50%;color:#fff;cursor:help;flex-shrink:0;font-size:10px;font-weight:600;height:13px;inset-inline-start:2px;line-height:12px;position:relative;text-align:center;top:0;width:13px}.uppy-Dashboard-Item-errorDetails:after{line-height:1.3;word-wrap:break-word}.uppy-Dashboard-FileCard{background-color:#fff;border-radius:5px;bottom:0;box-shadow:0 0 10px 4px #0000001a;display:flex;flex-direction:column;height:100%;left:0;position:absolute;right:0;top:0;width:100%;z-index:1005}.uppy-Dashboard-FileCard .uppy-DashboardContent-bar{border-top-left-radius:5px;border-top-right-radius:5px}.uppy-Dashboard-FileCard .uppy-Dashboard-FileCard-actions{border-bottom-left-radius:5px;border-bottom-right-radius:5px}.uppy-Dashboard-FileCard-inner{display:flex;flex-direction:column;flex-grow:1;flex-shrink:1;height:100%;min-height:0}.uppy-Dashboard-FileCard-preview{align-items:center;border-bottom:1px solid #eaeaea;display:flex;flex-grow:0;flex-shrink:1;height:60%;justify-content:center;min-height:0;position:relative}[data-uppy-theme=dark] .uppy-Dashboard-FileCard-preview{background-color:#333;border-bottom:0}.uppy-Dashboard-FileCard-preview img.uppy-Dashboard-Item-previewImg{border-radius:3px;box-shadow:0 3px 20px #00000026;flex:0 0 auto;max-height:90%;max-width:90%;object-fit:cover}.uppy-Dashboard-FileCard-edit{background-color:#00000080;border-radius:50px;color:#fff;font-size:13px;inset-inline-end:10px;padding:7px 15px;position:absolute;top:10px}.uppy-Dashboard-FileCard-edit:focus{outline:none}.uppy-Dashboard-FileCard-edit::-moz-focus-inner{border:0}.uppy-Dashboard-FileCard-edit:focus{box-shadow:0 0 0 3px #1269cf80}.uppy-Dashboard-FileCard-edit:hover{background-color:#000c}.uppy-Dashboard-FileCard-info{flex-grow:0;flex-shrink:0;height:40%;overflow-y:auto;padding:30px 20px 20px;-webkit-overflow-scrolling:touch}[data-uppy-theme=dark] .uppy-Dashboard-FileCard-info{background-color:#1f1f1f}.uppy-Dashboard-FileCard-fieldset{border:0;font-size:0;margin:auto auto 12px;max-width:640px;padding:0}.uppy-Dashboard-FileCard-label{color:#525252;display:inline-block;font-size:12px;vertical-align:middle;width:22%}.uppy-size--md .uppy-Dashboard-FileCard-label{font-size:14px}[data-uppy-theme=dark] .uppy-Dashboard-FileCard-label{color:#eaeaea}.uppy-Dashboard-FileCard-input{display:inline-block;vertical-align:middle;width:78%}.uppy-Dashboard-FileCard-actions{align-items:center;background-color:#fafafa;border-top:1px solid #eaeaea;display:flex;flex-grow:0;flex-shrink:0;height:55px;padding:0 15px}.uppy-size--md .uppy-Dashboard-FileCard-actions{height:65px}[data-uppy-theme=dark] .uppy-Dashboard-FileCard-actions{background-color:#1f1f1f;border-top:1px solid #333}.uppy-Dashboard-FileCard-actionsBtn{margin-inline-end:10px}.uppy-Informer{bottom:60px;left:0;position:absolute;right:0;text-align:center;z-index:1005}.uppy-Informer span>div{margin-bottom:6px}.uppy-Informer-animated{opacity:0;transform:translateY(350%);transition:all .3s ease-in;z-index:-1000}.uppy-Informer p{background-color:#757575;border-radius:18px;color:#fff;display:inline-block;font-size:12px;font-weight:400;line-height:1.4;margin:0;max-width:90%;padding:6px 15px}.uppy-size--md .uppy-Informer p{font-size:14px;line-height:1.3;max-width:500px;padding:10px 20px}[data-uppy-theme=dark] .uppy-Informer p{background-color:#333}.uppy-Informer p span{background-color:#fff;border-radius:50%;color:#525252;display:inline-block;font-size:10px;height:13px;inset-inline-start:3px;line-height:12px;margin-inline-start:-1px;position:relative;top:-1px;vertical-align:middle;width:13px}.uppy-Informer p span:hover{cursor:help}.uppy-Informer p span:after{line-height:1.3;word-wrap:break-word}.uppy-Root [aria-label][role~=tooltip]{position:relative}.uppy-Root [aria-label][role~=tooltip]:after,.uppy-Root [aria-label][role~=tooltip]:before{-webkit-backface-visibility:hidden;backface-visibility:hidden;box-sizing:border-box;opacity:0;pointer-events:none;position:absolute;transform:translateZ(0);transform-origin:top;transition:all var(--microtip-transition-duration,.18s) var(--microtip-transition-easing,ease-in-out) var(--microtip-transition-delay,0s);will-change:transform;z-index:10}.uppy-Root [aria-label][role~=tooltip]:before{background-size:100% auto!important;content:\"\"}.uppy-Root [aria-label][role~=tooltip]:after{background:#111111e6;border-radius:4px;box-sizing:initial;color:#fff;content:attr(aria-label);font-size:var(--microtip-font-size,13px);font-weight:var(--microtip-font-weight,normal);padding:.5em 1em;text-transform:var(--microtip-text-transform,none);white-space:nowrap}.uppy-Root [aria-label][role~=tooltip]:focus:after,.uppy-Root [aria-label][role~=tooltip]:focus:before,.uppy-Root [aria-label][role~=tooltip]:hover:after,.uppy-Root [aria-label][role~=tooltip]:hover:before{opacity:1;pointer-events:auto}.uppy-Root [role~=tooltip][data-microtip-position|=top]:before{background:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='36' height='12'%3E%3Cpath fill='rgba(17, 17, 17, 0.9)' d='M2.658 0h32.004c-6 0-11.627 12.002-16.002 12.002S8.594 0 2.658 0'/%3E%3C/svg%3E\") no-repeat;bottom:100%;height:6px;left:50%;margin-bottom:5px;transform:translate3d(-50%,0,0);width:18px}.uppy-Root [role~=tooltip][data-microtip-position|=top]:after{bottom:100%;left:50%;margin-bottom:11px;transform:translate3d(-50%,0,0)}.uppy-Root [role~=tooltip][data-microtip-position=top]:hover:after,.uppy-Root [role~=tooltip][data-microtip-position|=top]:hover:before{transform:translate3d(-50%,-5px,0)}.uppy-Root [role~=tooltip][data-microtip-position=top-left]:after{bottom:100%;transform:translate3d(calc(-100% + 16px),0,0)}.uppy-Root [role~=tooltip][data-microtip-position=top-left]:hover:after{transform:translate3d(calc(-100% + 16px),-5px,0)}.uppy-Root [role~=tooltip][data-microtip-position=top-right]:after{bottom:100%;transform:translate3d(-16px,0,0)}.uppy-Root [role~=tooltip][data-microtip-position=top-right]:hover:after{transform:translate3d(-16px,-5px,0)}.uppy-Root [role~=tooltip][data-microtip-position|=bottom]:before{background:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='36' height='12'%3E%3Cpath fill='rgba(17, 17, 17, 0.9)' d='M33.342 12H1.338c6 0 11.627-12.002 16.002-12.002S27.406 12 33.342 12'/%3E%3C/svg%3E\") no-repeat;bottom:auto;height:6px;left:50%;margin-bottom:0;margin-top:5px;top:100%;transform:translate3d(-50%,-10px,0);width:18px}.uppy-Root [role~=tooltip][data-microtip-position|=bottom]:after{left:50%;margin-top:11px;top:100%;transform:translate3d(-50%,-10px,0)}.uppy-Root [role~=tooltip][data-microtip-position=bottom]:hover:after,.uppy-Root [role~=tooltip][data-microtip-position|=bottom]:hover:before{transform:translate3d(-50%,0,0)}.uppy-Root [role~=tooltip][data-microtip-position=bottom-left]:after{top:100%;transform:translate3d(calc(-100% + 16px),-10px,0)}.uppy-Root [role~=tooltip][data-microtip-position=bottom-left]:hover:after{transform:translate3d(calc(-100% + 16px),0,0)}.uppy-Root [role~=tooltip][data-microtip-position=bottom-right]:after{top:100%;transform:translate3d(-16px,-10px,0)}.uppy-Root [role~=tooltip][data-microtip-position=bottom-right]:hover:after{transform:translate3d(-16px,0,0)}.uppy-Root [role~=tooltip][data-microtip-position=left]:after,.uppy-Root [role~=tooltip][data-microtip-position=left]:before{bottom:auto;left:auto;right:100%;top:50%;transform:translate3d(10px,-50%,0)}.uppy-Root [role~=tooltip][data-microtip-position=left]:before{background:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='36'%3E%3Cpath fill='rgba(17, 17, 17, 0.9)' d='M0 33.342V1.338c0 6 12.002 11.627 12.002 16.002S0 27.406 0 33.342'/%3E%3C/svg%3E\") no-repeat;height:18px;margin-bottom:0;margin-right:5px;width:6px}.uppy-Root [role~=tooltip][data-microtip-position=left]:after{margin-right:11px}.uppy-Root [role~=tooltip][data-microtip-position=left]:hover:after,.uppy-Root [role~=tooltip][data-microtip-position=left]:hover:before{transform:translate3d(0,-50%,0)}.uppy-Root [role~=tooltip][data-microtip-position=right]:after,.uppy-Root [role~=tooltip][data-microtip-position=right]:before{bottom:auto;left:100%;top:50%;transform:translate3d(-10px,-50%,0)}.uppy-Root [role~=tooltip][data-microtip-position=right]:before{background:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='36'%3E%3Cpath fill='rgba(17, 17, 17, 0.9)' d='M12 2.658v32.004c0-6-12.002-11.627-12.002-16.002S12 8.594 12 2.658'/%3E%3C/svg%3E\") no-repeat;height:18px;margin-bottom:0;margin-left:5px;width:6px}.uppy-Root [role~=tooltip][data-microtip-position=right]:after{margin-left:11px}.uppy-Root [role~=tooltip][data-microtip-position=right]:hover:after,.uppy-Root [role~=tooltip][data-microtip-position=right]:hover:before{transform:translate3d(0,-50%,0)}.uppy-Root [role~=tooltip][data-microtip-size=small]:after{white-space:normal;width:80px}.uppy-Root [role~=tooltip][data-microtip-size=medium]:after{white-space:normal;width:150px}.uppy-Root [role~=tooltip][data-microtip-size=large]:after{white-space:normal;width:260px}.uppy-StatusBar{background-color:#fff;color:#fff;display:flex;font-size:12px;font-weight:400;height:46px;line-height:40px;position:relative;transition:height .2s;z-index:1001}[data-uppy-theme=dark] .uppy-StatusBar{background-color:#1f1f1f}.uppy-StatusBar:before{background-color:#eaeaea;bottom:0;content:\"\";height:2px;left:0;position:absolute;right:0;top:0;width:100%}[data-uppy-theme=dark] .uppy-StatusBar:before{background-color:#757575}.uppy-StatusBar[aria-hidden=true]{height:0;overflow-y:hidden}.uppy-StatusBar.is-complete .uppy-StatusBar-progress{background-color:#1bb240}.uppy-StatusBar.is-error .uppy-StatusBar-progress{background-color:#e32437}.uppy-StatusBar.is-complete .uppy-StatusBar-statusIndicator{color:#1bb240}.uppy-StatusBar.is-error .uppy-StatusBar-statusIndicator{color:#e32437}.uppy-StatusBar:not([aria-hidden=true]).is-waiting{background-color:#fff;border-top:1px solid #eaeaea;height:65px}[data-uppy-theme=dark] .uppy-StatusBar:not([aria-hidden=true]).is-waiting{background-color:#1f1f1f;border-top:1px solid #333}.uppy-StatusBar-progress{background-color:#1269cf;height:2px;position:absolute;transition:background-color,width .3s ease-out;z-index:1001}.uppy-StatusBar-progress.is-indeterminate{animation:uppy-StatusBar-ProgressStripes 1s linear infinite;background-image:linear-gradient(45deg,#0000004d 25%,#0000 0,#0000 50%,#0000004d 0,#0000004d 75%,#0000 0,#0000);background-size:64px 64px}@keyframes uppy-StatusBar-ProgressStripes{0%{background-position:0 0}to{background-position:64px 0}}.uppy-StatusBar.is-postprocessing .uppy-StatusBar-progress,.uppy-StatusBar.is-preprocessing .uppy-StatusBar-progress{background-color:#f6a623}.uppy-StatusBar.is-waiting .uppy-StatusBar-progress{display:none}.uppy-StatusBar-content{align-items:center;color:#333;display:flex;height:100%;padding-inline-start:10px;position:relative;text-overflow:ellipsis;white-space:nowrap;z-index:1002}.uppy-size--md .uppy-StatusBar-content{padding-inline-start:15px}[data-uppy-theme=dark] .uppy-StatusBar-content{color:#eaeaea}.uppy-StatusBar-status{display:flex;flex-direction:column;font-weight:400;justify-content:center;line-height:1.4;padding-inline-end:.3em}.uppy-StatusBar-statusPrimary{display:flex;font-weight:500;line-height:1}.uppy-StatusBar-statusPrimary button.uppy-StatusBar-details{margin-left:5px}[data-uppy-theme=dark] .uppy-StatusBar-statusPrimary{color:#eaeaea}.uppy-StatusBar-statusSecondary{color:#757575;display:inline-block;font-size:11px;line-height:1.2;margin-top:1px;white-space:nowrap}[data-uppy-theme=dark] .uppy-StatusBar-statusSecondary{color:#bbb}.uppy-StatusBar-statusSecondaryHint{display:inline-block;line-height:1;margin-inline-end:5px;vertical-align:middle}.uppy-size--md .uppy-StatusBar-statusSecondaryHint{margin-inline-end:8px}.uppy-StatusBar-statusIndicator{color:#525252;margin-inline-end:7px;position:relative;top:1px}.uppy-StatusBar-statusIndicator svg{vertical-align:text-bottom}.uppy-StatusBar-actions{align-items:center;bottom:0;display:flex;inset-inline-end:10px;position:absolute;top:0;z-index:1004}.uppy-StatusBar.is-waiting .uppy-StatusBar-actions{background-color:#fafafa;height:100%;padding:0 15px;position:static;width:100%}[data-uppy-theme=dark] .uppy-StatusBar.is-waiting .uppy-StatusBar-actions{background-color:#1f1f1f}.uppy-StatusBar:not([aria-hidden=true]).is-waiting.has-ghosts{flex-direction:column;height:90px}.uppy-size--md .uppy-StatusBar:not([aria-hidden=true]).is-waiting.has-ghosts{flex-direction:row;height:65px}.uppy-StatusBar:not([aria-hidden=true]).is-waiting.has-ghosts .uppy-StatusBar-actions{flex-direction:column;justify-content:center}.uppy-size--md .uppy-StatusBar:not([aria-hidden=true]).is-waiting.has-ghosts .uppy-StatusBar-actions{flex-direction:row;justify-content:normal}.uppy-StatusBar-actionCircleBtn{cursor:pointer;line-height:1;margin:3px;opacity:.9}.uppy-StatusBar-actionCircleBtn:focus{outline:none}.uppy-StatusBar-actionCircleBtn::-moz-focus-inner{border:0}.uppy-StatusBar-actionCircleBtn:focus{box-shadow:0 0 0 3px #1269cf80}[data-uppy-theme=dark] .uppy-StatusBar-actionCircleBtn:focus{outline:none}[data-uppy-theme=dark] .uppy-StatusBar-actionCircleBtn::-moz-focus-inner{border:0}[data-uppy-theme=dark] .uppy-StatusBar-actionCircleBtn:focus{box-shadow:0 0 0 2px #aae1ffd9}.uppy-StatusBar-actionCircleBtn:hover{opacity:1}.uppy-StatusBar-actionCircleBtn:focus{border-radius:50%}.uppy-StatusBar-actionCircleBtn svg{vertical-align:bottom}.uppy-StatusBar-actionBtn{color:#1269cf;display:inline-block;font-size:10px;line-height:inherit;vertical-align:middle}.uppy-size--md .uppy-StatusBar-actionBtn{font-size:11px}.uppy-StatusBar-actionBtn--disabled{opacity:.4}[data-uppy-theme=dark] .uppy-StatusBar-actionBtn--disabled{opacity:.7}.uppy-StatusBar-actionBtn--retry{background-color:#ff4b23;border-radius:8px;color:#fff;height:16px;line-height:1;margin-inline-end:6px;padding:1px 6px 3px 18px;position:relative}.uppy-StatusBar-actionBtn--retry:focus{outline:none}.uppy-StatusBar-actionBtn--retry::-moz-focus-inner{border:0}.uppy-StatusBar-actionBtn--retry:focus{box-shadow:0 0 0 3px #1269cf80}[data-uppy-theme=dark] .uppy-StatusBar-actionBtn--retry:focus{outline:none}[data-uppy-theme=dark] .uppy-StatusBar-actionBtn--retry::-moz-focus-inner{border:0}[data-uppy-theme=dark] .uppy-StatusBar-actionBtn--retry:focus{box-shadow:0 0 0 2px #aae1ffd9}.uppy-StatusBar-actionBtn--retry:hover{background-color:#f92d00}.uppy-StatusBar-actionBtn--retry svg{inset-inline-start:6px;position:absolute;top:3px}.uppy-StatusBar.is-waiting .uppy-StatusBar-actionBtn--upload{background-color:#1bb240;color:#fff;font-size:14px;line-height:1;padding:15px 10px;width:100%}.uppy-StatusBar.is-waiting .uppy-StatusBar-actionBtn--upload:hover{background-color:#189c38}[data-uppy-theme=dark] .uppy-StatusBar.is-waiting .uppy-StatusBar-actionBtn--upload{background-color:#1c8b37}[data-uppy-theme=dark] .uppy-StatusBar.is-waiting .uppy-StatusBar-actionBtn--upload:hover{background-color:#18762f}.uppy-size--md .uppy-StatusBar.is-waiting .uppy-StatusBar-actionBtn--upload{padding:13px 22px;width:auto}.uppy-StatusBar.is-waiting .uppy-StatusBar-actionBtn--upload.uppy-StatusBar-actionBtn--disabled:hover{background-color:#1bb240;cursor:not-allowed}[data-uppy-theme=dark] .uppy-StatusBar.is-waiting .uppy-StatusBar-actionBtn--upload.uppy-StatusBar-actionBtn--disabled:hover{background-color:#1c8b37}.uppy-StatusBar:not(.is-waiting) .uppy-StatusBar-actionBtn--upload{background-color:initial;color:#1269cf}.uppy-StatusBar-actionBtn--uploadNewlyAdded{border-radius:3px;padding-inline-end:3px;padding-bottom:1px;padding-inline-start:3px}.uppy-StatusBar-actionBtn--uploadNewlyAdded:focus{outline:none}.uppy-StatusBar-actionBtn--uploadNewlyAdded::-moz-focus-inner{border:0}.uppy-StatusBar-actionBtn--uploadNewlyAdded:focus{box-shadow:0 0 0 3px #1269cf80}[data-uppy-theme=dark] .uppy-StatusBar-actionBtn--uploadNewlyAdded:focus{outline:none}[data-uppy-theme=dark] .uppy-StatusBar-actionBtn--uploadNewlyAdded::-moz-focus-inner{border:0}[data-uppy-theme=dark] .uppy-StatusBar-actionBtn--uploadNewlyAdded:focus{box-shadow:0 0 0 2px #aae1ffd9}.uppy-StatusBar.is-postprocessing .uppy-StatusBar-actionBtn--uploadNewlyAdded,.uppy-StatusBar.is-preprocessing .uppy-StatusBar-actionBtn--uploadNewlyAdded{display:none}.uppy-StatusBar-actionBtn--done{border-radius:3px;line-height:1;padding:7px 8px}.uppy-StatusBar-actionBtn--done:focus{outline:none}.uppy-StatusBar-actionBtn--done::-moz-focus-inner{border:0}.uppy-StatusBar-actionBtn--done:hover{color:#0e51a0}.uppy-StatusBar-actionBtn--done:focus{background-color:#dfe6f1}[data-uppy-theme=dark] .uppy-StatusBar-actionBtn--done:focus{background-color:#333}[data-uppy-theme=dark] .uppy-StatusBar-actionBtn--done{color:#02baf2}.uppy-size--md .uppy-StatusBar-actionBtn--done{font-size:14px}.uppy-StatusBar-serviceMsg{color:#000;font-size:11px;line-height:1.1;padding-left:10px}.uppy-size--md .uppy-StatusBar-serviceMsg{font-size:14px;padding-left:15px}[data-uppy-theme=dark] .uppy-StatusBar-serviceMsg{color:#eaeaea}.uppy-StatusBar-serviceMsg-ghostsIcon{left:6px;opacity:.5;position:relative;top:2px;vertical-align:text-bottom;width:10px}.uppy-size--md .uppy-StatusBar-serviceMsg-ghostsIcon{left:10px;top:1px;width:15px}.uppy-StatusBar-details{appearance:none;background-color:#939393;border-radius:50%;color:#fff;cursor:help;display:inline-block;font-size:10px;font-weight:600;height:13px;inset-inline-start:2px;line-height:12px;position:relative;text-align:center;top:0;vertical-align:middle;width:13px}.uppy-StatusBar-details:after{line-height:1.3;word-wrap:break-word}.uppy-StatusBar-spinner{animation-duration:1s;animation-iteration-count:infinite;animation-name:uppy-StatusBar-spinnerAnimation;animation-timing-function:linear;fill:#1269cf;margin-inline-end:10px}.uppy-StatusBar.is-postprocessing .uppy-StatusBar-spinner,.uppy-StatusBar.is-preprocessing .uppy-StatusBar-spinner{fill:#f6a623}@keyframes uppy-StatusBar-spinnerAnimation{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}.uppy-transition-slideDownUp-enter{opacity:.01;transform:translate3d(0,-105%,0);transition:transform .25s ease-in-out,opacity .25s ease-in-out}.uppy-transition-slideDownUp-enter.uppy-transition-slideDownUp-enter-active{opacity:1;transform:translateZ(0)}.uppy-transition-slideDownUp-leave{opacity:1;transform:translateZ(0);transition:transform .25s ease-in-out,opacity .25s ease-in-out}.uppy-transition-slideDownUp-leave.uppy-transition-slideDownUp-leave-active{opacity:.01;transform:translate3d(0,-105%,0)}@keyframes uppy-Dashboard-fadeIn{0%{opacity:0}to{opacity:1}}@keyframes uppy-Dashboard-fadeOut{0%{opacity:1}to{opacity:0}}@keyframes uppy-Dashboard-slideDownAndFadeIn{0%{opacity:0;transform:translate3d(-50%,-70%,0)}to{opacity:1;transform:translate3d(-50%,-50%,0)}}@keyframes uppy-Dashboard-slideDownAndFadeIn--small{0%{opacity:0;transform:translate3d(0,-20%,0)}to{opacity:1;transform:translateZ(0)}}@keyframes uppy-Dashboard-slideUpFadeOut{0%{opacity:1;transform:translate3d(-50%,-50%,0)}to{opacity:0;transform:translate3d(-50%,-70%,0)}}@keyframes uppy-Dashboard-slideUpFadeOut--small{0%{opacity:1;transform:translateZ(0)}to{opacity:0;transform:translate3d(0,-20%,0)}}.uppy-Dashboard--modal{z-index:1001}.uppy-Dashboard--modal[aria-hidden=true]{display:none}.uppy-Dashboard--modal.uppy-Dashboard--animateOpenClose>.uppy-Dashboard-inner{animation:uppy-Dashboard-slideDownAndFadeIn--small .3s cubic-bezier(0,0,.2,1)}@media only screen and (min-width:820px){.uppy-Dashboard--modal.uppy-Dashboard--animateOpenClose>.uppy-Dashboard-inner{animation:uppy-Dashboard-slideDownAndFadeIn .3s cubic-bezier(0,0,.2,1)}}.uppy-Dashboard--modal.uppy-Dashboard--animateOpenClose>.uppy-Dashboard-overlay{animation:uppy-Dashboard-fadeIn .3s cubic-bezier(0,0,.2,1)}.uppy-Dashboard--modal.uppy-Dashboard--animateOpenClose.uppy-Dashboard--isClosing>.uppy-Dashboard-inner{animation:uppy-Dashboard-slideUpFadeOut--small .3s cubic-bezier(0,0,.2,1)}@media only screen and (min-width:820px){.uppy-Dashboard--modal.uppy-Dashboard--animateOpenClose.uppy-Dashboard--isClosing>.uppy-Dashboard-inner{animation:uppy-Dashboard-slideUpFadeOut .3s cubic-bezier(0,0,.2,1)}}.uppy-Dashboard--modal.uppy-Dashboard--animateOpenClose.uppy-Dashboard--isClosing>.uppy-Dashboard-overlay{animation:uppy-Dashboard-fadeOut .3s cubic-bezier(0,0,.2,1)}.uppy-Dashboard-isFixed{height:100vh;overflow:hidden}.uppy-Dashboard--modal .uppy-Dashboard-overlay{background-color:#00000080;bottom:0;left:0;position:fixed;right:0;top:0;z-index:1001}.uppy-Dashboard-inner{background-color:#f4f4f4;border:1px solid #eaeaea;border-radius:5px;max-height:100%;max-width:100%;outline:none;position:relative}.uppy-size--md .uppy-Dashboard-inner{min-height:auto}@media only screen and (min-width:820px){.uppy-Dashboard-inner{height:500px;width:650px}}.uppy-Dashboard--modal .uppy-Dashboard-inner{z-index:1002}[data-uppy-theme=dark] .uppy-Dashboard-inner{background-color:#1f1f1f}.uppy-Dashboard--isDisabled .uppy-Dashboard-inner{cursor:not-allowed}.uppy-Dashboard-innerWrap{border-radius:5px;display:flex;flex-direction:column;height:100%;opacity:0;overflow:hidden;position:relative}.uppy-Dashboard--isInnerWrapVisible .uppy-Dashboard-innerWrap{opacity:1}.uppy-Dashboard--isDisabled .uppy-Dashboard-innerWrap{cursor:not-allowed;filter:grayscale(100%);opacity:.6;user-select:none}.uppy-Dashboard--isDisabled .uppy-ProviderIconBg{fill:#9f9f9f}.uppy-Dashboard--isDisabled [aria-disabled],.uppy-Dashboard--isDisabled [disabled]{cursor:not-allowed;pointer-events:none}.uppy-Dashboard--modal .uppy-Dashboard-inner{border:none;bottom:15px;left:15px;position:fixed;right:15px;top:35px}@media only screen and (min-width:820px){.uppy-Dashboard--modal .uppy-Dashboard-inner{box-shadow:0 5px 15px 4px #00000026;left:50%;right:auto;top:50%;transform:translate(-50%,-50%)}}.uppy-Dashboard-close{color:#ffffffe6;cursor:pointer;display:block;font-size:27px;inset-inline-end:-2px;position:absolute;top:-33px;z-index:1005}.uppy-Dashboard-close:focus{outline:none}.uppy-Dashboard-close::-moz-focus-inner{border:0}.uppy-Dashboard-close:focus{color:#6eabf2}@media only screen and (min-width:820px){.uppy-Dashboard-close{font-size:35px;inset-inline-end:-35px;top:-10px}}.uppy-Dashboard-serviceMsg{background-color:#fffbf7;border-bottom:1px solid #edd4b9;border-top:1px solid #edd4b9;font-size:12px;font-weight:500;line-height:1.3;padding:12px 0;position:relative;top:-1px;z-index:1004}.uppy-size--md .uppy-Dashboard-serviceMsg{font-size:14px;line-height:1.4}[data-uppy-theme=dark] .uppy-Dashboard-serviceMsg{background-color:#1f1f1f;border-bottom:1px solid #333;border-top:1px solid #333;color:#eaeaea}.uppy-Dashboard-serviceMsg-title{display:block;line-height:1;margin-bottom:4px;padding-left:42px}.uppy-Dashboard-serviceMsg-text{padding:0 15px}.uppy-Dashboard-serviceMsg-actionBtn{color:#1269cf;font-size:inherit;font-weight:inherit;vertical-align:initial}[data-uppy-theme=dark] .uppy-Dashboard-serviceMsg-actionBtn{color:#02baf2e6}.uppy-Dashboard-serviceMsg-icon{left:15px;position:absolute;top:10px}.uppy-Dashboard-AddFiles{align-items:center;display:flex;flex-direction:column;height:100%;justify-content:center;position:relative;text-align:center}[data-uppy-drag-drop-supported=true] .uppy-Dashboard-AddFiles{border:1px dashed #dfdfdf;border-radius:3px;height:calc(100% - 14px);margin:7px}.uppy-Dashboard-AddFilesPanel .uppy-Dashboard-AddFiles{border:none;height:calc(100% - 54px)}.uppy-Dashboard--modal .uppy-Dashboard-AddFiles{border-color:#cfcfcf}[data-uppy-theme=dark] .uppy-Dashboard-AddFiles{border-color:#757575}.uppy-Dashboard-AddFiles-info{display:none;margin-top:auto;padding-bottom:15px;padding-top:15px}.uppy-size--height-md .uppy-Dashboard-AddFiles-info{display:block}.uppy-size--md .uppy-Dashboard-AddFiles-info{bottom:25px;left:0;padding-bottom:0;padding-top:30px;position:absolute;right:0}[data-uppy-num-acquirers=\"0\"] .uppy-Dashboard-AddFiles-info{margin-top:0}.uppy-Dashboard-browse{color:#1269cf;cursor:pointer}.uppy-Dashboard-browse:focus{outline:none}.uppy-Dashboard-browse::-moz-focus-inner{border:0}.uppy-Dashboard-browse:focus,.uppy-Dashboard-browse:hover{border-bottom:1px solid #1269cf}[data-uppy-theme=dark] .uppy-Dashboard-browse{color:#02baf2e6}[data-uppy-theme=dark] .uppy-Dashboard-browse:focus,[data-uppy-theme=dark] .uppy-Dashboard-browse:hover{border-bottom:1px solid #02baf2}.uppy-Dashboard-browseBtn{display:block;font-size:14px;font-weight:500;margin-bottom:5px;margin-top:8px;width:100%}.uppy-size--md .uppy-Dashboard-browseBtn{font-size:15px;margin:15px auto;padding:13px 44px;width:auto}.uppy-Dashboard-AddFiles-list{display:flex;flex:1;flex-direction:column;margin-top:2px;overflow-y:auto;padding:2px 0;width:100%;-webkit-overflow-scrolling:touch}.uppy-size--md .uppy-Dashboard-AddFiles-list{flex:none;flex-direction:row;flex-wrap:wrap;justify-content:center;margin-top:15px;max-width:600px;overflow-y:visible;padding-top:0}.uppy-DashboardTab{border-bottom:1px solid #eaeaea;text-align:center;width:100%}[data-uppy-theme=dark] .uppy-DashboardTab{border-bottom:1px solid #333}.uppy-size--md .uppy-DashboardTab{border-bottom:none;display:inline-block;margin-bottom:10px;width:auto}.uppy-DashboardTab-btn{align-items:center;-webkit-appearance:none;appearance:none;background-color:initial;color:#525252;cursor:pointer;flex-direction:row;height:100%;justify-content:left;padding:12px 15px;width:100%}.uppy-DashboardTab-btn:focus{outline:none}.uppy-size--md .uppy-DashboardTab-btn{border-radius:5px;flex-direction:column;margin-inline-end:1px;padding:10px 3px;width:86px}[data-uppy-theme=dark] .uppy-DashboardTab-btn{color:#eaeaea}.uppy-DashboardTab-btn::-moz-focus-inner{border:0}.uppy-DashboardTab-btn:hover{background-color:#e9ecef}[data-uppy-theme=dark] .uppy-DashboardTab-btn:hover{background-color:#333}.uppy-DashboardTab-btn:active,.uppy-DashboardTab-btn:focus{background-color:#dfe6f1}[data-uppy-theme=dark] .uppy-DashboardTab-btn:active,[data-uppy-theme=dark] .uppy-DashboardTab-btn:focus{background-color:#525252}.uppy-DashboardTab-btn svg{display:inline-block;max-height:100%;max-width:100%;overflow:hidden;transition:transform .15s ease-in-out;vertical-align:text-top}.uppy-DashboardTab-inner{align-items:center;background-color:#fff;border-radius:8px;box-shadow:0 1px 1px 0 #0000001a,0 1px 2px 0 #0000001a,0 2px 3px 0 #00000005;display:flex;height:32px;justify-content:center;margin-inline-end:10px;width:32px}.uppy-size--md .uppy-DashboardTab-inner{margin-inline-end:0}[data-uppy-theme=dark] .uppy-DashboardTab-inner{background-color:#323232;box-shadow:0 1px 1px 0 #0003,0 1px 2px 0 #0003,0 2px 3px 0 #00000014}.uppy-DashboardTab-name{font-size:14px;font-weight:400}.uppy-size--md .uppy-DashboardTab-name{font-size:12px;line-height:15px;margin-bottom:0;margin-top:8px}.uppy-DashboardTab-iconMyDevice{color:#1269cf}[data-uppy-theme=dark] .uppy-DashboardTab-iconMyDevice{color:#02baf2}.uppy-DashboardTab-iconBox{color:#0061d5}[data-uppy-theme=dark] .uppy-DashboardTab-iconBox{color:#eaeaea}.uppy-DashboardTab-iconDropbox{color:#0061fe}[data-uppy-theme=dark] .uppy-DashboardTab-iconDropbox{color:#eaeaea}.uppy-DashboardTab-iconUnsplash{color:#111}[data-uppy-theme=dark] .uppy-DashboardTab-iconUnsplash{color:#eaeaea}.uppy-DashboardTab-iconWebdav{color:#111}[data-uppy-theme=dark] .uppy-DashboardTab-iconWebdav{color:#eaeaea}.uppy-DashboardTab-iconScreenRec{color:#2c3e50}[data-uppy-theme=dark] .uppy-DashboardTab-iconScreenRec{color:#eaeaea}.uppy-DashboardTab-iconAudio{color:#8030a3}[data-uppy-theme=dark] .uppy-DashboardTab-iconAudio{color:#bf6ee3}.uppy-Dashboard-input{height:.1px;opacity:0;overflow:hidden;position:absolute;width:.1px;z-index:-1}.uppy-DashboardContent-bar{align-items:center;background-color:#fafafa;border-bottom:1px solid #eaeaea;display:flex;flex-shrink:0;height:40px;justify-content:space-between;padding:0 10px;position:relative;width:100%;z-index:1004}.uppy-size--md .uppy-DashboardContent-bar{height:50px;padding:0 15px}[data-uppy-theme=dark] .uppy-DashboardContent-bar{background-color:#1f1f1f;border-bottom:1px solid #333}.uppy-DashboardContent-title{font-size:12px;font-weight:500;left:0;line-height:40px;margin:auto;max-width:170px;overflow-x:hidden;position:absolute;right:0;text-align:center;text-overflow:ellipsis;top:0;white-space:nowrap;width:100%}.uppy-size--md .uppy-DashboardContent-title{font-size:14px;line-height:50px;max-width:300px}[data-uppy-theme=dark] .uppy-DashboardContent-title{color:#eaeaea}.uppy-DashboardContent-back,.uppy-DashboardContent-save{-webkit-appearance:none;background:none;border:0;border-radius:3px;color:inherit;color:#1269cf;cursor:pointer;font-family:inherit;font-size:inherit;font-size:12px;font-weight:400;line-height:1;margin:0;margin-inline-start:-6px;padding:7px 6px}.uppy-DashboardContent-back:focus,.uppy-DashboardContent-save:focus{outline:none}.uppy-DashboardContent-back::-moz-focus-inner,.uppy-DashboardContent-save::-moz-focus-inner{border:0}.uppy-DashboardContent-back:hover,.uppy-DashboardContent-save:hover{color:#0e51a0}.uppy-DashboardContent-back:focus,.uppy-DashboardContent-save:focus{background-color:#dfe6f1}[data-uppy-theme=dark] .uppy-DashboardContent-back:focus,[data-uppy-theme=dark] .uppy-DashboardContent-save:focus{background-color:#333}.uppy-size--md .uppy-DashboardContent-back,.uppy-size--md .uppy-DashboardContent-save{font-size:14px}[data-uppy-theme=dark] .uppy-DashboardContent-back,[data-uppy-theme=dark] .uppy-DashboardContent-save{color:#02baf2}.uppy-DashboardContent-addMore{-webkit-appearance:none;background:none;border:0;border-radius:3px;color:inherit;color:#1269cf;cursor:pointer;font-family:inherit;font-size:inherit;font-weight:500;height:29px;line-height:1;margin:0;margin-inline-end:-5px;padding:7px 8px;width:29px}.uppy-DashboardContent-addMore:focus{outline:none}.uppy-DashboardContent-addMore::-moz-focus-inner{border:0}.uppy-DashboardContent-addMore:hover{color:#0e51a0}.uppy-DashboardContent-addMore:focus{background-color:#dfe6f1}[data-uppy-theme=dark] .uppy-DashboardContent-addMore:focus{background-color:#333}.uppy-size--md .uppy-DashboardContent-addMore{font-size:14px;height:auto;margin-inline-end:-8px;width:auto}[data-uppy-theme=dark] .uppy-DashboardContent-addMore{color:#02baf2}.uppy-DashboardContent-addMore svg{margin-inline-end:4px;vertical-align:initial}.uppy-size--md .uppy-DashboardContent-addMore svg{height:11px;width:11px}.uppy-DashboardContent-addMoreCaption{display:none}.uppy-size--md .uppy-DashboardContent-addMoreCaption{display:inline}.uppy-DashboardContent-panel{background-color:#f5f5f5;flex:1}.uppy-Dashboard-AddFilesPanel,.uppy-DashboardContent-panel{border-radius:5px;bottom:0;display:flex;flex-direction:column;left:0;overflow:hidden;position:absolute;right:0;top:0;z-index:1005}.uppy-Dashboard-AddFilesPanel{background:#fafafa;background:linear-gradient(0deg,#fafafa 35%,#fafafad9);box-shadow:0 0 10px 5px #00000026}[data-uppy-theme=dark] .uppy-Dashboard-AddFilesPanel{background-color:#333;background-image:linear-gradient(0deg,#1f1f1f 35%,#1f1f1fd9)}.uppy-Dashboard--isAddFilesPanelVisible .uppy-Dashboard-files{filter:blur(2px)}.uppy-Dashboard-progress{bottom:0;height:12%;left:0;position:absolute;width:100%}.uppy-Dashboard-progressBarContainer.is-active{height:100%;left:0;position:absolute;top:0;width:100%;z-index:1004}.uppy-Dashboard-filesContainer{flex:1;margin:0;overflow-y:hidden;position:relative}.uppy-Dashboard-filesContainer:after{clear:both;content:\"\";display:table}.uppy-Dashboard-files{flex:1;margin:0;overflow-y:auto;padding:0 0 10px;-webkit-overflow-scrolling:touch}.uppy-size--md .uppy-Dashboard-files{padding-top:10px}.uppy-Dashboard--singleFile .uppy-Dashboard-filesInner{align-items:center;display:flex;height:100%;justify-content:center}.uppy-Dashboard-dropFilesHereHint{align-items:center;background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48'%3E%3Cpath fill='%231269CF' d='M24 1v1C11.85 2 2 11.85 2 24s9.85 22 22 22 22-9.85 22-22S36.15 2 24 2zm0 0V0c13.254 0 24 10.746 24 24S37.254 48 24 48 0 37.254 0 24 10.746 0 24 0zm7.707 19.293a.999.999 0 1 1-1.414 1.414L25 16.414V34a1 1 0 1 1-2 0V16.414l-5.293 5.293a.999.999 0 1 1-1.414-1.414l7-7a1 1 0 0 1 1.414 0z'/%3E%3C/svg%3E\");background-position:50% 50%;background-repeat:no-repeat;border:1px dashed #1269cf;border-radius:3px;bottom:7px;color:#757575;display:flex;font-size:16px;justify-content:center;left:7px;padding-top:90px;position:absolute;right:7px;text-align:center;top:7px;visibility:hidden;z-index:2000}[data-uppy-theme=dark] .uppy-Dashboard-dropFilesHereHint{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48'%3E%3Cpath fill='%2302BAF2' d='M24 1v1C11.85 2 2 11.85 2 24s9.85 22 22 22 22-9.85 22-22S36.15 2 24 2zm0 0V0c13.254 0 24 10.746 24 24S37.254 48 24 48 0 37.254 0 24 10.746 0 24 0zm7.707 19.293a.999.999 0 1 1-1.414 1.414L25 16.414V34a1 1 0 1 1-2 0V16.414l-5.293 5.293a.999.999 0 1 1-1.414-1.414l7-7a1 1 0 0 1 1.414 0z'/%3E%3C/svg%3E\");border-color:#02baf2;color:#bbb}.uppy-Dashboard.uppy-Dashboard--isDraggingOver .uppy-Dashboard-dropFilesHereHint{pointer-events:none;visibility:visible}.uppy-Dashboard.uppy-Dashboard--isDraggingOver .uppy-Dashboard-files,.uppy-Dashboard.uppy-Dashboard--isDraggingOver .uppy-Dashboard-progressindicators,.uppy-Dashboard.uppy-Dashboard--isDraggingOver .uppy-Dashboard-serviceMsg,.uppy-Dashboard.uppy-Dashboard--isDraggingOver .uppy-DashboardContent-bar{opacity:.15}.uppy-Dashboard.uppy-Dashboard--isDraggingOver .uppy-Dashboard-AddFiles{opacity:.03}.uppy-Dashboard-AddFiles-title{color:#000;font-size:17px;font-weight:500;line-height:1.35;margin-bottom:5px;margin-top:15px;padding:0 15px;text-align:inline-start;width:100%}.uppy-size--md .uppy-Dashboard-AddFiles-title{font-size:21px;font-weight:400;margin-top:5px;max-width:480px;padding:0 35px;text-align:center}[data-uppy-num-acquirers=\"0\"] .uppy-Dashboard-AddFiles-title{text-align:center}[data-uppy-theme=dark] .uppy-Dashboard-AddFiles-title{color:#eaeaea}.uppy-Dashboard-AddFiles-title button{font-weight:500}.uppy-size--md .uppy-Dashboard-AddFiles-title button{font-weight:400}.uppy-Dashboard-note{color:#757575;font-size:14px;line-height:1.25;margin:auto;max-width:350px;padding:0 15px;text-align:center}.uppy-size--md .uppy-Dashboard-note{line-height:1.35;max-width:600px}[data-uppy-theme=dark] .uppy-Dashboard-note{color:#cfcfcf}a.uppy-Dashboard-poweredBy{color:#939393;display:inline-block;font-size:11px;margin-top:8px;text-align:center;text-decoration:none}.uppy-Dashboard-poweredByIcon{margin-left:1px;margin-right:1px;opacity:.9;position:relative;top:1px;vertical-align:text-top;fill:none;stroke:#939393}.uppy-Dashboard-Item-previewIcon{height:25px;left:50%;position:absolute;top:50%;transform:translate(-50%,-50%);width:25px;z-index:100}.uppy-size--md .uppy-Dashboard-Item-previewIcon{height:38px;width:38px}.uppy-Dashboard-Item-previewIcon svg{height:100%;width:100%}.uppy-Dashboard--singleFile .uppy-Dashboard-Item-previewIcon{height:100%;max-height:60%;max-width:60%;width:100%}.uppy-Dashboard-Item-previewIconWrap{height:76px;max-height:75%;position:relative}.uppy-Dashboard--singleFile .uppy-Dashboard-Item-previewIconWrap{height:100%;width:100%}.uppy-Dashboard-Item-previewIconBg{filter:drop-shadow(rgba(0,0,0,.1) 0 1px 1px);height:100%;width:100%}.uppy-Dashboard-upload{height:50px;position:relative;width:50px}.uppy-size--md .uppy-Dashboard-upload{height:60px;width:60px}.uppy-Dashboard-upload .uppy-c-icon{position:relative;top:1px;width:50%}.uppy-Dashboard-uploadCount{background-color:#1bb240;border-radius:50%;color:#fff;font-size:8px;height:16px;inset-inline-end:-12px;line-height:16px;position:absolute;top:-12px;width:16px}.uppy-size--md .uppy-Dashboard-uploadCount{font-size:9px;height:18px;line-height:18px;width:18px}.uppy-ImageCropper-range{-webkit-appearance:none;background:#0000;margin:8px 0;width:100%}.uppy-ImageCropper-range::-moz-focus-outer{border:0}.uppy-ImageCropper-range:focus{outline:0}.uppy-ImageCropper-range:focus::-webkit-slider-runnable-track{background:#fff3}.uppy-ImageCropper-range:focus::-ms-fill-lower,.uppy-ImageCropper-range:focus::-ms-fill-upper{background:#fff3}.uppy-ImageCropper-range::-webkit-slider-runnable-track{background:#fff3;border:0 solid #0000;border-radius:5px;box-shadow:0 0 0 #0000,0 0 0 #0d0d0d00;cursor:default;height:4px;transition:all .2s ease;width:100%}.uppy-ImageCropper-range::-webkit-slider-thumb{-webkit-appearance:none;background:#fff;border:0 solid #0000;border-radius:9px;box-shadow:0 0 4px #0003,0 0 0 #0d0d0d33;box-sizing:border-box;cursor:default;height:16px;margin-top:-6px;width:16px}.uppy-ImageCropper-range::-moz-range-track{background:#fff3;border:0 solid #0000;border-radius:5px;box-shadow:0 0 0 #0000,0 0 0 #0d0d0d00;cursor:default;height:2px;transition:all .2s ease;width:100%}.uppy-ImageCropper-range::-moz-range-thumb{background:#fff;border:0 solid #0000;border-radius:9px;box-shadow:0 0 4px #0003,0 0 0 #0d0d0d33;box-sizing:border-box;cursor:default;height:16px;width:16px}.uppy-ImageCropper-range::-ms-track{background:#0000;border-color:#0000;border-width:8px 0;color:#0000;cursor:default;height:4px;transition:all .2s ease;width:100%}.uppy-ImageCropper-range::-ms-fill-lower{background:#f2f2f233;border:0 solid #0000;border-radius:10px;box-shadow:0 0 0 #0000,0 0 0 #0d0d0d00}.uppy-ImageCropper-range::-ms-fill-upper{background:#fff3;border:0 solid #0000;border-radius:10px;box-shadow:0 0 0 #0000,0 0 0 #0d0d0d00}.uppy-ImageCropper-range::-ms-thumb{background:#fff;border:0 solid #0000;border-radius:9px;box-shadow:0 0 4px #0003,0 0 0 #0d0d0d33;box-sizing:border-box;cursor:default;height:16px;margin-top:1px;width:16px}.uppy-ImageCropper-range:disabled::-moz-range-thumb,.uppy-ImageCropper-range:disabled::-ms-fill-lower,.uppy-ImageCropper-range:disabled::-ms-fill-upper,.uppy-ImageCropper-range:disabled::-ms-thumb,.uppy-ImageCropper-range:disabled::-webkit-slider-runnable-track,.uppy-ImageCropper-range:disabled::-webkit-slider-thumb{cursor:not-allowed}.cropper-container{direction:ltr;font-size:0;line-height:0;position:relative;-ms-touch-action:none;touch-action:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.cropper-container img{display:block;height:100%;image-orientation:0deg;max-height:none!important;max-width:none!important;min-height:0!important;min-width:0!important;width:100%}.cropper-canvas,.cropper-crop-box,.cropper-drag-box,.cropper-modal,.cropper-wrap-box{bottom:0;left:0;position:absolute;right:0;top:0}.cropper-canvas,.cropper-wrap-box{overflow:hidden}.cropper-drag-box{background-color:#fff;opacity:0}.cropper-modal{background-color:#000;opacity:.5}.cropper-view-box{display:block;height:100%;outline:1px solid #39f;outline-color:#3399ffbf;overflow:hidden;width:100%}.cropper-dashed{border:0 dashed #eee;display:block;opacity:.5;position:absolute}.cropper-dashed.dashed-h{border-bottom-width:1px;border-top-width:1px;height:33.3333333333%;left:0;top:33.3333333333%;width:100%}.cropper-dashed.dashed-v{border-left-width:1px;border-right-width:1px;height:100%;left:33.3333333333%;top:0;width:33.3333333333%}.cropper-center{display:block;height:0;left:50%;opacity:.75;position:absolute;top:50%;width:0}.cropper-center:after,.cropper-center:before{background-color:#eee;content:\" \";display:block;position:absolute}.cropper-center:before{height:1px;left:-3px;top:0;width:7px}.cropper-center:after{height:7px;left:0;top:-3px;width:1px}.cropper-face,.cropper-line,.cropper-point{display:block;height:100%;opacity:.1;position:absolute;width:100%}.cropper-face{background-color:#fff;left:0;top:0}.cropper-line{background-color:#39f}.cropper-line.line-e{cursor:ew-resize;right:-3px;top:0;width:5px}.cropper-line.line-n{cursor:ns-resize;height:5px;left:0;top:-3px}.cropper-line.line-w{cursor:ew-resize;left:-3px;top:0;width:5px}.cropper-line.line-s{bottom:-3px;cursor:ns-resize;height:5px;left:0}.cropper-point{background-color:#39f;height:5px;opacity:.75;width:5px}.cropper-point.point-e{cursor:ew-resize;margin-top:-3px;right:-3px;top:50%}.cropper-point.point-n{cursor:ns-resize;left:50%;margin-left:-3px;top:-3px}.cropper-point.point-w{cursor:ew-resize;left:-3px;margin-top:-3px;top:50%}.cropper-point.point-s{bottom:-3px;cursor:s-resize;left:50%;margin-left:-3px}.cropper-point.point-ne{cursor:nesw-resize;right:-3px;top:-3px}.cropper-point.point-nw{cursor:nwse-resize;left:-3px;top:-3px}.cropper-point.point-sw{bottom:-3px;cursor:nesw-resize;left:-3px}.cropper-point.point-se{bottom:-3px;cursor:nwse-resize;height:20px;opacity:1;right:-3px;width:20px}@media (min-width:768px){.cropper-point.point-se{height:15px;width:15px}}@media (min-width:992px){.cropper-point.point-se{height:10px;width:10px}}@media (min-width:1200px){.cropper-point.point-se{height:5px;opacity:.75;width:5px}}.cropper-point.point-se:before{background-color:#39f;bottom:-50%;content:\" \";display:block;height:200%;opacity:0;position:absolute;right:-50%;width:200%}.cropper-invisible{opacity:0}.cropper-bg{background-image:url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQAQMAAAAlPW0iAAAAA3NCSVQICAjb4U/gAAAABlBMVEXMzMz////TjRV2AAAACXBIWXMAAArrAAAK6wGCiw1aAAAAHHRFWHRTb2Z0d2FyZQBBZG9iZSBGaXJld29ya3MgQ1M26LyyjAAAABFJREFUCJlj+M/AgBVhF/0PAH6/D/HkDxOGAAAAAElFTkSuQmCC\")}.cropper-hide{display:block;height:0;position:absolute;width:0}.cropper-hidden{display:none!important}.cropper-move{cursor:move}.cropper-crop{cursor:crosshair}.cropper-disabled .cropper-drag-box,.cropper-disabled .cropper-face,.cropper-disabled .cropper-line,.cropper-disabled .cropper-point{cursor:not-allowed}.uppy-ImageCropper{display:flex;flex-direction:column;height:100%;width:100%}.uppy-ImageCropper-container{flex-grow:1}.uppy-ImageCropper-image{display:block;max-height:400px;max-width:100%}.uppy-ImageCropper-controls{align-items:center;background-color:#0009;border-radius:5px;bottom:15px;color:#fff;display:flex;justify-content:center;left:50%;padding-top:38px;position:absolute;transform:translateX(-50%)}.uppy-size--md .uppy-ImageCropper-controls{padding-top:0}.uppy-ImageCropper-controls button{border-radius:5px;height:35px;width:35px}.uppy-ImageCropper-controls button svg{padding:3px}.uppy-size--md .uppy-ImageCropper-controls button{height:40px;width:40px}.uppy-size--md .uppy-ImageCropper-controls button svg{padding:1px}.uppy-ImageCropper-controls button:hover{background-color:#ffffff80}.uppy-ImageCropper-controls button:focus{background-color:#ffffff80;outline:none}.uppy-Dashboard:not(.uppy-size--md) .uppy-ImageCropper-rangeWrapper{height:38px;left:10px;position:absolute!important;right:10px;top:0}.uppy-size--md .uppy-ImageCropper-range{margin-left:5px;margin-right:5px;width:180px}.uppy-ImageCropper .cropper-point{height:8px;width:8px}.uppy-ImageCropper .cropper-view-box{background:repeating-conic-gradient(#bdbdbd33 0 25%,#fff 0 50%) 50%/16px 16px;outline:2px solid #39f}[data-uppy-theme=dark] .uppy-ImageCropper .cropper-view-box{background:repeating-conic-gradient(#2b2a2a 0 25%,#000 0 50%) 50%/16px 16px}.uppy-ImageCropper .cropper-modal{background-color:#fff;opacity:.9}[data-uppy-theme=dark] .uppy-ImageCropper .cropper-modal{background-color:#000;opacity:.7}.uppy-ImageCropper .cropper-face{opacity:0}.uppy-ImageCropper-range::-moz-range-track{height:4px}.uppy-ImageCropper-range:focus::-webkit-slider-runnable-track,.uppy-ImageCropper-range:hover::-webkit-slider-runnable-track{background:#ffffff80}.uppy-ImageCropper-range:focus::-ms-fill-lower,.uppy-ImageCropper-range:focus::-ms-fill-upper,.uppy-ImageCropper-range:hover::-ms-fill-lower,.uppy-ImageCropper-range:hover::-ms-fill-upper{background:#ffffff80}.uppy-ImageCropper-range:focus::-moz-range-track,.uppy-ImageCropper-range:hover::-moz-range-track{background:#ffffff80}.uppy-Webcam-container{align-items:center;display:flex;flex-direction:column;height:100%;justify-content:center;width:100%}.uppy-Webcam-videoContainer{background-color:#333;flex:1;flex-grow:1;overflow:hidden;position:relative;text-align:center;width:100%}.uppy-Webcam-video{bottom:0;left:0;margin:auto;max-height:100%;max-width:100%;position:absolute;right:0;top:0}.uppy-Webcam-video--mirrored{transform:scaleX(-1)}.uppy-Webcam-imageContainer{height:100%;position:relative;width:100%}.uppy-Webcam-image{bottom:0;left:0;margin:auto;max-height:100%;max-width:100%;position:absolute;right:0;top:0}.uppy-Webcam-image--mirrored{transform:scaleX(-1)}.uppy-Webcam-footer{align-items:center;display:flex;flex-wrap:wrap;justify-content:space-between;min-height:75px;padding:20px;width:100%}.uppy-Webcam-videoSourceContainer{flex-grow:0;width:100%}.uppy-size--lg .uppy-Webcam-videoSourceContainer{margin:0;width:33%}.uppy-Webcam-videoSource-select{background-image:url(\"data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23757575%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E\");background-position:right .4em top 50%,0 0;background-repeat:no-repeat;background-size:.65em auto,100%;border:1px solid #757575;display:block;font-size:16px;line-height:1.2;margin:auto auto 10px;max-width:90%;padding:.4em 1em .3em .4em;text-overflow:ellipsis;white-space:nowrap;width:100%}.uppy-size--lg .uppy-Webcam-videoSource-select{font-size:14px;margin-bottom:0}.uppy-Webcam-videoSource-select::-ms-expand{display:none}.uppy-Webcam-buttonContainer{margin-left:25%;text-align:center;width:50%}.uppy-size--lg .uppy-Webcam-buttonContainer{margin-left:0;width:34%}.uppy-Webcam-recordingLength{color:#757575;flex-grow:0;font-family:SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;text-align:right;width:25%}.uppy-size--lg .uppy-Webcam-recordingLength{width:33%}.uppy-Webcam-button{background-color:#e32437;border-radius:50%;color:#fff;cursor:pointer;height:45px;transition:all .3s;width:45px}.uppy-Webcam-button:focus{outline:none}.uppy-Webcam-button::-moz-focus-inner{border:0}.uppy-Webcam-button:focus{box-shadow:0 0 0 3px #1269cf80}.uppy-Webcam-button:hover{background-color:#d31b2d}[data-uppy-theme=dark] .uppy-Webcam-button:focus{outline:none}[data-uppy-theme=dark] .uppy-Webcam-button::-moz-focus-inner{border:0}[data-uppy-theme=dark] .uppy-Webcam-button:focus{box-shadow:0 0 0 2px #aae1ffd9}.uppy-Webcam-button--submit{background-color:#1269cf;margin:0 12px}.uppy-Webcam-button--submit:hover{background-color:#105db8}.uppy-Webcam-button svg{display:inline-block;height:30px;max-height:100%;max-width:100%;overflow:hidden;vertical-align:text-top;width:30px;fill:currentColor}.uppy-size--md .uppy-Webcam-button{height:60px;width:60px}.uppy-Webcam-button--picture{margin-right:12px}.uppy-Webcam-permissons{align-items:center;display:flex;flex:1;flex-flow:column wrap;height:100%;justify-content:center;padding:15px}.uppy-Webcam-permissons p{color:#939393;line-height:1.3;line-height:1.45;margin:0;max-width:450px;text-align:center}.uppy-Webcam-permissonsIcon svg{color:#bbb;height:75px;margin-bottom:30px;width:100px}.uppy-Webcam-title{color:#333;font-size:22px;font-weight:400;line-height:1.35;margin:0 0 5px;max-width:500px;padding:0 15px;text-align:center}[data-uppy-theme=dark] .uppy-Webcam-title{color:#eaeaea}.container{aspect-ratio:4 / 3;max-width:var(--max-width);max-height:var(--max-height);height:var(--height);width:var(--width);box-sizing:border-box;padding:0;.uppy-Root,.uppy-Dashboard{height:100%}}";var Yd=n`
|
|
773
773
|
:host {
|
|
774
774
|
display: inline-block;
|
|
775
775
|
|