Anvil/assets/Created-43fad342.js
André Jaenisch 8c2df13ab6
Updates
2024-03-15 11:40:39 +01:00

1 line
1.8 KiB
JavaScript

import{a as k,n as d}from"./utils-6ebe0a8e.js";import{e as c,i as h,d as s,a as f,t as b,H as D,b as m,f as p,h as g,c as v,j as u,k as _}from"./lifecycle-cafe499b.js";import{S as w,i as C}from"./index-3a0d73e3.js";function y(o){let a,e,t,l;return{c(){a=f("span"),e=b("created "),t=f("date"),l=new D(!1),this.h()},l(n){a=m(n,"SPAN",{});var i=p(a);e=g(i,"created "),t=m(i,"DATE",{datetime:!0});var r=p(t);l=v(r,!1),r.forEach(s),i.forEach(s),this.h()},h(){l.a=null,u(t,"datetime",o[0])},m(n,i){h(n,a,i),_(a,e),_(a,t),l.m(o[1],t)},p(n,i){i&2&&l.p(n[1]),i&1&&u(t,"datetime",n[0])},d(n){n&&s(a)}}}function E(o){let a,e=o[0]&&o[1]&&y(o);return{c(){e&&e.c(),a=c()},l(t){e&&e.l(t),a=c()},m(t,l){e&&e.m(t,l),h(t,a,l)},p(t,[l]){t[0]&&t[1]?e?e.p(t,l):(e=y(t),e.c(),e.m(a.parentNode,a)):e&&(e.d(1),e=null)},i:d,o:d,d(t){t&&s(a),e&&e.d(t)}}}function H(o,a,e){let t,{created_at:l=null}=a,{locale:n="en"}=a;return o.$$set=i=>{"created_at"in i&&e(0,l=i.created_at),"locale"in i&&e(2,n=i.locale)},o.$$.update=()=>{o.$$.dirty&5&&e(1,t=new Intl.DateTimeFormat(n).format(l))},[l,t,n]}class S extends w{constructor(a){super(),C(this,a,H,E,k,{created_at:0,locale:2})}}S.__docgen={version:3,name:"Created.svelte",data:[{keywords:[{name:"type",description:"{Date | null}"}],visibility:"public",description:"Date object for created time.",name:"created_at",kind:"let",static:!1,readonly:!1,type:{kind:"union",text:"Date | null",type:[{kind:"type",text:"Date",type:"Date"},{kind:"type",text:"null",type:"null"}]},defaultValue:null},{keywords:[],visibility:"public",description:"Locale to format the datetime according to.",name:"locale",kind:"let",static:!1,readonly:!1,type:{kind:"type",text:"string",type:"string"},defaultValue:"en"}],computed:[],methods:[],components:[],description:null,keywords:[],events:[],slots:[],refs:[]};export{S as C};