youtuber-blog-frontend/build/client/_app/immutable/chunks/x.BhzcNrGh.js

8 lines
67 KiB
JavaScript
Raw Normal View History

2024-06-21 23:07:29 +00:00
import{d as Te,w as ne,a as Ne}from"./index.DwF-TCr7.js";import{r as ni,n as Q,h as un,i as X,w as cn,v as ii,x as Ce,u as ge,a as It,j as Tt,o as oi,m as Ct,d as Qt,s as Re,e as Nt,p as ri,c as si,k as xt}from"./index.BBc34iid.js";import{O as ai,K as Oe,ad as li,ab as ui,s as Pt,c as Y,u as G,g as Z,a as J,o as bt,F as ut,k as U,i as R,E as ct,y as L,z as kt,I as tt,e as nt,d as it,f as ot,D as M,v as rt,w as A,x as at,S,V as Bt,n as pe}from"./scheduler.BsMbz5U8.js";import{S as Ft,i as Dt,t as B,a as V,g as qt,e as Xt,f as fe,h as de,j as ie,c as ci,b as fi,m as di,d as hi}from"./index.rkWRBFIu.js";import{g as x,a as mi}from"./spread.CgU5AtxT.js";import{t as Ie,o as bi,c as vi,r as gi,g as pi,a as fn}from"./Toaster.svelte_svelte_type_style_lang.DiP1zXXX.js";import{I as _i}from"./button.Ba55pzkL.js";function ds(e,t,n,i=!0){const o=t-n;return o<=0?i?e[e.length-1]:e[0]:e[o]}function hs(e,t,n,i=!0){const o=t+n;return o>e.length-1?i?e[0]:e[e.length-1]:e[o]}function ms(e,t,n=!0){return t===e.length-1?n?e[0]:e[t]:e[t+1]}function bs(e,t,n=!0){return t<=0?n?e[e.length-1]:e[0]:e[t-1]}function yi(e){return e[e.length-1]}function wi(e,t){return e.map((n,i)=>e[(t+i)%e.length])}function vs(e,t,n=ni){const i=t.findIndex(o=>n(o,e));return i!==-1?t.splice(i,1):t.push(e),t}function gs(e){e.setAttribute("data-highlighted","")}function ps(e){e.removeAttribute("data-highlighted")}function Ee(e){return new Promise(t=>setTimeout(t,e))}let Ti="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",Ci=(e=21)=>{let t="",n=e;for(;n--;)t+=Ti[Math.random()*64|0];return t};function Oi(){return Ci(10)}function Ei(e){return e.reduce((t,n)=>(t[n]=Oi(),t),{})}function ki(e,t=500){let n=null;return function(...i){const o=()=>{n=null,e(...i)};n&&clearTimeout(n),n=setTimeout(o,t)}}const dn=()=>typeof window<"u";function Ai(){const e=navigator.userAgentData;return(e==null?void 0:e.platform)??navigator.platform}const hn=e=>dn()&&e.test(Ai().toLowerCase()),Si=()=>dn()&&!!navigator.maxTouchPoints,Pi=()=>hn(/^mac/)&&!Si(),Fi=()=>hn(/mac|iphone|ipad|ipod/i),Di=()=>Fi()&&!Pi(),be="data-melt-scroll-lock";function Le(e,t){if(!e)return;const n=e.style.cssText;return Object.assign(e.style,t),()=>{e.style.cssText=n}}function Ni(e,t,n){if(!e)return;const i=e.style.getPropertyValue(t);return e.style.setProperty(t,n),()=>{i?e.style.setProperty(t,i):e.style.removeProperty(t)}}function Ri(e){const t=e.getBoundingClientRect().left;return Math.round(t)+e.scrollLeft?"paddingLeft":"paddingRight"}function Ii(e){const t=e??document,n=t.defaultView??window,{documentElement:i,body:o}=t;if(o.hasAttribute(be))return Q;o.setAttribute(be,"");const r=n.innerWidth-i.clientWidth,u=()=>Ni(i,"--scrollbar-width",`${r}px`),s=Ri(i),l=n.getComputedStyle(o)[s],c=()=>Le(o,{overflow:"hidden",[s]:`calc(${l} + ${r}px)`}),f=()=>{const{scrollX:v,scrollY:y,visualViewport:g}=n,b=(g==null?void 0:g.offsetLeft)??0,w=(g==null?void 0:g.offsetTop)??0,E=Le(o,{position:"fixed",overflow:"hidden",top:`${-(y-Math.floor(w))}px`,left:`${-(v-Math.floor(b))}px`,right:"0",[s]:`calc(${l} + ${r}px)`});return()=>{E==null||E(),n.scrollTo(v,y)}},p=[u(),Di()?f():c()];return()=>{p.forEach(v=>v==null?void 0:v()),o.removeAttribute(be)}}function _s(e){const{open:t,forceVisible:n,activeTrigger:i}=e;return Te([t,n,i],([o,a,r])=>(o||a)&&r!==null)}function Li(e){un&&Ee(1).then(()=>{const t=document.activeElement;!X(t)||t===e||(t.tabIndex=-1,e&&(e.tabIndex=0,e.focus()))})}function mn(){return Array.from(document.querySelectorAll('a[href]:not([tabindex="-1"]), button:not([disabled]):not([tabindex="-1"]), input:not([disabled]):not([tabindex="-1"]), select:not([disabled]):not([tabindex="-1"]), textarea:not([disabled]):not([tabindex="-1"]), [tabindex]:not([tabindex="-1"])'))}function ys(e){const t=mn(),i=t.indexOf(e)+1,o=t[i];return i<t.length&&X(o)?o:null}function ws(e){const t=mn(),i=t.indexOf(e)-1,o=t[i];return i>=0&&X(o)?o:null}const Mi=new Set(["Shift","Control","Alt","Meta","CapsLock","NumLock"]),Bi={onMatch:Li,getCurrentItem:()=>document.activeElement};function Ts(e={}){const t={...Bi,...e},n=cn(ne([])),i=ki(()=>{n.up
* tabbable 6.2.0
* @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
*/var En=["input:not([inert])","select:not([inert])","textarea:not([inert])","a[href]:not([inert])","button:not([inert])","[tabindex]:not(slot):not([inert])","audio[controls]:not([inert])","video[controls]:not([inert])",'[contenteditable]:not([contenteditable="false"]):not([inert])',"details>summary:first-of-type:not([inert])","details:not([inert])"],ae=En.join(","),kn=typeof Element>"u",St=kn?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,le=!kn&&Element.prototype.getRootNode?function(e){var t;return e==null||(t=e.getRootNode)===null||t===void 0?void 0:t.call(e)}:function(e){return e==null?void 0:e.ownerDocument},ue=function e(t,n){var i;n===void 0&&(n=!0);var o=t==null||(i=t.getAttribute)===null||i===void 0?void 0:i.call(t,"inert"),a=o===""||o==="true",r=a||n&&t&&e(t.parentNode);return r},Po=function(t){var n,i=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return i===""||i==="true"},An=function(t,n,i){if(ue(t))return[];var o=Array.prototype.slice.apply(t.querySelectorAll(ae));return n&&St.call(t,ae)&&o.unshift(t),o=o.filter(i),o},Sn=function e(t,n,i){for(var o=[],a=Array.from(t);a.length;){var r=a.shift();if(!ue(r,!1))if(r.tagName==="SLOT"){var u=r.assignedElements(),s=u.length?u:r.children,l=e(s,!0,i);i.flatten?o.push.apply(o,l):o.push({scopeParent:r,candidates:l})}else{var c=St.call(r,ae);c&&i.filter(r)&&(n||!t.includes(r))&&o.push(r);var f=r.shadowRoot||typeof i.getShadowRoot=="function"&&i.getShadowRoot(r),p=!ue(f,!1)&&(!i.shadowRootFilter||i.shadowRootFilter(r));if(f&&p){var v=e(f===!0?r.children:f.children,!0,i);i.flatten?o.push.apply(o,v):o.push({scopeParent:r,candidates:v})}else a.unshift.apply(a,r.children)}}return o},Pn=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},Et=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||Po(t))&&!Pn(t)?0:t.tabIndex},Fo=function(t,n){var i=Et(t);return i<0&&n&&!Pn(t)?0:i},Do=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},Fn=function(t){return t.tagName==="INPUT"},No=function(t){return Fn(t)&&t.type==="hidden"},Ro=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(i){return i.tagName==="SUMMARY"});return n},Io=function(t,n){for(var i=0;i<t.length;i++)if(t[i].checked&&t[i].form===n)return t[i]},Lo=function(t){if(!t.name)return!0;var n=t.form||le(t),i=function(u){return n.querySelectorAll('input[type="radio"][name="'+u+'"]')},o;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")o=i(window.CSS.escape(t.name));else try{o=i(t.name)}catch(r){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",r.message),!1}var a=Io(o,t.form);return!a||a===t},Mo=function(t){return Fn(t)&&t.type==="radio"},Bo=function(t){return Mo(t)&&!Lo(t)},Vo=function(t){var n,i=t&&le(t),o=(n=i)===null||n===void 0?void 0:n.host,a=!1;if(i&&i!==t){var r,u,s;for(a=!!((r=o)!==null&&r!==void 0&&(u=r.ownerDocument)!==null&&u!==void 0&&u.contains(o)||t!=null&&(s=t.ownerDocument)!==null&&s!==void 0&&s.contains(t));!a&&o;){var l,c,f;i=le(o),o=(l=i)===null||l===void 0?void 0:l.host,a=!!((c=o)!==null&&c!==void 0&&(f=c.ownerDocument)!==null&&f!==void 0&&f.contains(o))}}return a},Ke=function(t){var n=t.getBoundingClientRect(),i=n.width,o=n.height;return i===0&&o===0},Wo=function(t,n){var i=n.displayCheck,o=n.getShadowRoot;if(getComputedStyle(t).visibility==="hidden")return!0;var a=St.call(t,"details>summary:first-of-type"),r=a?t.parentElement:t;if(St.call(r,"details:not([open]) *"))return!0;if(!i||i==="full"||i==="legacy-full"){if(typeof o=="function"){for(var u=t;t;){var s=t.parentElement,l=le(t);if(s&&!s.shadowRoot&&o(s)===!0)return Ke(t);t.assignedSlot?t=t.assignedSlot:!s&&l!==t.ownerDocument?t=l.host:t=s}t=u}if(Vo(t))return!t.getClientRects().length;if(i!=="legacy-full")return!0}else if(i==="non-zero-are
* focus-trap 7.5.4
* @license MIT, https://github.com/focus-trap/focus-trap/blob/master/LICENSE
*/function He(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,i)}return n}function ze(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?He(Object(n),!0).forEach(function(i){Xo(e,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):He(Object(n)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(n,i))})}return e}function Xo(e,t,n){return t=Go(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Yo(e,t){if(typeof e!="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var i=n.call(e,t||"default");if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Go(e){var t=Yo(e,"string");return typeof t=="symbol"?t:String(t)}var Ue={activateTrap:function(t,n){if(t.length>0){var i=t[t.length-1];i!==n&&i.pause()}var o=t.indexOf(n);o===-1||t.splice(o,1),t.push(n)},deactivateTrap:function(t,n){var i=t.indexOf(n);i!==-1&&t.splice(i,1),t.length>0&&t[t.length-1].unpause()}},Zo=function(t){return t.tagName&&t.tagName.toLowerCase()==="input"&&typeof t.select=="function"},Jo=function(t){return(t==null?void 0:t.key)==="Escape"||(t==null?void 0:t.key)==="Esc"||(t==null?void 0:t.keyCode)===27},zt=function(t){return(t==null?void 0:t.key)==="Tab"||(t==null?void 0:t.keyCode)===9},Qo=function(t){return zt(t)&&!t.shiftKey},xo=function(t){return zt(t)&&t.shiftKey},qe=function(t){return setTimeout(t,0)},Xe=function(t,n){var i=-1;return t.every(function(o,a){return n(o)?(i=a,!1):!0}),i},Ht=function(t){for(var n=arguments.length,i=new Array(n>1?n-1:0),o=1;o<n;o++)i[o-1]=arguments[o];return typeof t=="function"?t.apply(void 0,i):t},te=function(t){return t.target.shadowRoot&&typeof t.composedPath=="function"?t.composedPath()[0]:t.target},$o=[],tr=function(t,n){var i=(n==null?void 0:n.document)||document,o=(n==null?void 0:n.trapStack)||$o,a=ze({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0,isKeyForward:Qo,isKeyBackward:xo},n),r={containers:[],containerGroups:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,delayInitialFocusTimer:void 0,recentNavEvent:void 0},u,s=function(h,d,C){return h&&h[d]!==void 0?h[d]:a[C||d]},l=function(h,d){var C=typeof(d==null?void 0:d.composedPath)=="function"?d.composedPath():void 0;return r.containerGroups.findIndex(function(k){var _=k.container,P=k.tabbableNodes;return _.contains(h)||(C==null?void 0:C.includes(_))||P.find(function(N){return N===h})})},c=function(h){var d=a[h];if(typeof d=="function"){for(var C=arguments.length,k=new Array(C>1?C-1:0),_=1;_<C;_++)k[_-1]=arguments[_];d=d.apply(void 0,k)}if(d===!0&&(d=void 0),!d){if(d===void 0||d===!1)return d;throw new Error("`".concat(h,"` was specified but was not a node, or did not return a node"))}var P=d;if(typeof d=="string"&&(P=i.querySelector(d),!P))throw new Error("`".concat(h,"` as selector refers to no known node"));return P},f=function(){var h=c("initialFocus");if(h===!1)return!1;if(h===void 0||!ve(h,a.tabbableOptions))if(l(i.activeElement)>=0)h=i.activeElement;else{var d=r.tabbableGroups[0],C=d&&d.firstTabbableNode;h=C||c("fallbackFocus")}if(!h)throw new Error("Your focus-trap needs to have at least one focusable element");return h},p=function(){if(r.containerGroups=r.containers.map(function(h){var d=zo(h,a.tabbableOptions),C=Uo(h,a.tabbableOptions),k=d.length>0?d[0]:void 0,_=d.length>0?d[d.length-1]:void 0,P=C.find(function(z){return Rt(z)}),N=C.slice().reverse().find(function(z){return Rt(z)}),j=!!d.find(function(z){return Et(z)>0});return{container:h,tabbableNodes:d,focusableNodes:C,posTabIndexesFound:j,firstTabbableNode:k,lastTabbableNode:_,firstDomTabbableNode:P,lastDomTabbableNode:N,nextTabbableNode:function(dt){var yt=arguments.length>1&&arguments[1]!==void 0?arguments