youtuber-blog-frontend/build/client/_app/immutable/nodes/7.BTHgoMeQ.js

2 lines
34 KiB
JavaScript
Raw Normal View History

2024-08-09 18:09:22 +00:00
import{s as st,y as H,E as xe,z as $t,S as et,c as it,u as ot,g as ut,a as _t,e as M,b as E,d as C,f as B,j as V,r as Je,i as _,p as T,k as I,l as j,v as mt,o as tt,a9 as Ke,t as S,h as A,L as O,aa as Y,m as pt}from"../chunks/scheduler.Nb9dF4RD.js";import{S as ft,i as lt,c as g,b as d,m as b,t as p,a as c,d as v,g as ct,e as gt,f as W}from"../chunks/index.aIvb1r_w.js";import{g as N,a as G}from"../chunks/spread.CgU5AtxT.js";import{z,F as K,s as dt,a as bt,C as Q,b as je,c as y,d as X,I as oe,S as Xe,T as at}from"../chunks/textarea.Gpzzxkab.js";import"../chunks/entry.B5KzfddK.js";import{t as nt}from"../chunks/Toaster.svelte_svelte_type_style_lang.BVlHgIyE.js";import"../chunks/index.CnPkSA2E.js";import{c as Qe}from"../chunks/config.COxMlsuO.js";import{B as vt}from"../chunks/button.Hx4R_eXH.js";function ht(a){let e;const s=a[1].default,t=it(s,a,a[4],null);return{c(){t&&t.c()},l(l){t&&t.l(l)},m(l,r){t&&t.m(l,r),e=!0},p(l,r){t&&t.p&&(!e||r&16)&&ot(t,s,l,l[4],e?_t(s,l[4],r,null):ut(l[4]),null)},i(l){e||(p(t,l),e=!0)},o(l){c(t,l),e=!1},d(l){t&&t.d(l)}}}function wt(a){let e,s;const t=[{type:"submit"},a[0]];let l={$$slots:{default:[ht]},$$scope:{ctx:a}};for(let r=0;r<t.length;r+=1)l=H(l,t[r]);return e=new vt({props:l}),e.$on("click",a[2]),e.$on("keydown",a[3]),{c(){g(e.$$.fragment)},l(r){d(e.$$.fragment,r)},m(r,i){b(e,r,i),s=!0},p(r,[i]){const n=i&1?N(t,[t[0],G(r[0])]):{};i&16&&(n.$$scope={dirty:i,ctx:r}),e.$set(n)},i(r){s||(p(e.$$.fragment,r),s=!0)},o(r){c(e.$$.fragment,r),s=!1},d(r){v(e,r)}}}function It(a,e,s){const t=[];let l=xe(e,t),{$$slots:r={},$$scope:i}=e;function n($){et.call(this,a,$)}function o($){et.call(this,a,$)}return a.$$set=$=>{e=H(H({},e),$t($)),s(0,l=xe(e,t)),"$$scope"in $&&s(4,i=$.$$scope)},[l,r,n,o,i]}class kt extends ft{constructor(e){super(),lt(this,e,It,wt,st,{})}}const Dt=z.object({id:z.string(),name:z.string().min(4).max(32),domain:z.string().refine(a=>a===null||/^[a-z0-9\.\-]*$/.test(a),{message:"Invalid domain"}).nullable(),use_freebie:z.boolean().default(!1),freebie_title:z.string().nullable(),freebie_url:z.string().nullable(),freebie_image_url:z.string().nullable(),freebie_text:z.string().nullable(),title:z.string(),subtitle:z.string(),auto_publish:z.boolean(),use_contact_page:z.boolean(),contact_email:z.string().email().nullable(),use_about_page:z.boolean(),about_text:z.string().nullable()}).superRefine((a,e)=>{a.use_freebie&&(a.freebie_url||e.addIssue({path:["freebie_url"],message:"A freebie file is required when 'Use freebie' is true.",code:"custom"})),a.use_contact_page&&!a.contact_email&&e.addIssue({path:["contact_email"],message:"A contact email is required when the contact page is enabled",code:"custom"})});function Et(a){let e;return{c(){e=S("Blog name")},l(s){e=A(s,"Blog name")},m(s,t){I(s,e,t)},d(s){s&&_(e)}}}function Vt(a){let e,s,t,l,r;e=new X({props:{$$slots:{default:[Et]},$$scope:{ctx:a}}});const i=[a[29]];function n($){a[10]($)}let o={};for(let $=0;$<i.length;$+=1)o=H(o,i[$]);return a[1].name!==void 0&&(o.value=a[1].name),t=new oe({props:o}),O.push(()=>W(t,"value",n)),{c(){g(e.$$.fragment),s=E(),g(t.$$.fragment)},l($){d(e.$$.fragment,$),s=V($),d(t.$$.fragment,$)},m($,f){b(e,$,f),I($,s,f),b(t,$,f),r=!0},p($,f){const u={};f&1073741824&&(u.$$scope={dirty:f,ctx:$}),e.$set(u);const m=f&536870912?N(i,[G($[29])]):{};!l&&f&2&&(l=!0,m.value=$[1].name,Y(()=>l=!1)),t.$set(m)},i($){r||(p(e.$$.fragment,$),p(t.$$.fragment,$),r=!0)},o($){c(e.$$.fragment,$),c(t.$$.fragment,$),r=!1},d($){$&&_(s),v(e,$),v(t,$)}}}function Ft(a){let e,s,t,l,r,i;return e=new Q({props:{$$slots:{default:[Vt,({attrs:n})=>({29:n}),({attrs:n})=>n?536870912:0]},$$scope:{ctx:a}}}),t=new je({}),r=new y({}),{c(){g(e.$$.fragment),s=E(),g(t.$$.fragment),l=E(),g(r.$$.fragment)},l(n){d(e.$$.fragment,n),s=V(n),d(t.$$.fragment,n),l=V(n),d(r.$$.fragment,n)},m(n,o){b(e,n,o),I(n,s,o),b(t,n,o),I(n,l,o),b(r,n,o),i=!0},p(n,o){const $={};o&1610612738&&($.$$scope={dirty:o,ctx:n}),e.$set($)},i(n){i||(p(e.$$.fragment,n),p(t.$$.fragment,n),p(r.$$.fragment,n),i=!0)},o(n){c(e.$$.fragment,n),c(t.$$.fragment,n),c(r.$$.fragment,n),i=!1},d(n){n&&(_(s),_(