diff --git a/public/build/assets/NativeImageBlock-bcbff98b.js b/public/build/assets/NativeImageBlock-49da3dd3.js similarity index 99% rename from public/build/assets/NativeImageBlock-bcbff98b.js rename to public/build/assets/NativeImageBlock-49da3dd3.js index 0bcf301..6b843be 100644 --- a/public/build/assets/NativeImageBlock-bcbff98b.js +++ b/public/build/assets/NativeImageBlock-49da3dd3.js @@ -1 +1 @@ -import{l as m,_ as y,a as b,c as g,e as c,p as w,t as $,o as f,q as S,s as I}from"./admin-app-0df052b8.js";var _=m();class p{constructor(e,t,r){this.name=e,this.definition=t,this.bindings=t.bindings??{},this.wheres=t.wheres??{},this.config=r}get template(){return`${this.origin}/${this.definition.uri}`.replace(/\/+$/,"")}get origin(){return this.config.absolute?this.definition.domain?`${this.config.url.match(/^\w+:\/\//)[0]}${this.definition.domain}${this.config.port?`:${this.config.port}`:""}`:this.config.url:""}get parameterSegments(){var e;return((e=this.template.match(/{[^}?]+\??}/g))==null?void 0:e.map(t=>({name:t.replace(/{|\??}/g,""),required:!/\?}$/.test(t)})))??[]}matchesUrl(e){if(!this.definition.methods.includes("GET"))return!1;const t=this.template.replace(/(\/?){([^}?]*)(\??)}/g,(n,l,u,h)=>{var d;const a=`(?<${u}>${((d=this.wheres[u])==null?void 0:d.replace(/(^\^)|(\$$)/g,""))||"[^/?]+"})`;return h?`(${l}${a})?`:`${l}${a}`}).replace(/^\w+:\/\//,""),[r,s]=e.replace(/^\w+:\/\//,"").split("?"),i=new RegExp(`^${t}/?$`).exec(r);if(i){for(const n in i.groups)i.groups[n]=typeof i.groups[n]=="string"?decodeURIComponent(i.groups[n]):i.groups[n];return{params:i.groups,query:_.parse(s)}}return!1}compile(e){const t=this.parameterSegments;return t.length?this.template.replace(/{([^}?]+)(\??)}/g,(r,s,i)=>{if(!i&&[null,void 0].includes(e[s]))throw new Error(`Ziggy error: '${s}' parameter is required for route '${this.name}'.`);if(t[t.length-1].name===s&&this.wheres[s]===".*")return encodeURIComponent(e[s]??"").replace(/%2F/g,"/");if(this.wheres[s]&&!new RegExp(`^${i?`(${this.wheres[s]})?`:this.wheres[s]}$`).test(e[s]??""))throw new Error(`Ziggy error: '${s}' parameter does not match required format '${this.wheres[s]}' for route '${this.name}'.`);return encodeURIComponent(e[s]??"")}).replace(`${this.origin}//`,`${this.origin}/`).replace(/\/+$/,""):this.template}}class v extends String{constructor(e,t,r=!0,s){if(super(),this._config=s??(typeof Ziggy<"u"?Ziggy:globalThis==null?void 0:globalThis.Ziggy),this._config={...this._config,absolute:r},e){if(!this._config.routes[e])throw new Error(`Ziggy error: route '${e}' is not in the route list.`);this._route=new p(e,this._config.routes[e],this._config),this._params=this._parse(t)}}toString(){const e=Object.keys(this._params).filter(t=>!this._route.parameterSegments.some(({name:r})=>r===t)).filter(t=>t!=="_query").reduce((t,r)=>({...t,[r]:this._params[r]}),{});return this._route.compile(this._params)+_.stringify({...e,...this._params._query},{addQueryPrefix:!0,arrayFormat:"indices",encodeValuesOnly:!0,skipNulls:!0,encoder:(t,r)=>typeof t=="boolean"?Number(t):r(t)})}_unresolve(e){e?this._config.absolute&&e.startsWith("/")&&(e=this._location().host+e):e=this._currentUrl();let t={};const[r,s]=Object.entries(this._config.routes).find(([i,n])=>t=new p(i,n,this._config).matchesUrl(e))||[void 0,void 0];return{name:r,...t,route:s}}_currentUrl(){const{host:e,pathname:t,search:r}=this._location();return(this._config.absolute?e+t:t.replace(this._config.url.replace(/^\w*:\/\/[^/]+/,""),"").replace(/^\/+/,"/"))+r}current(e,t){const{name:r,params:s,query:i,route:n}=this._unresolve();if(!e)return r;const l=new RegExp(`^${e.replace(/\./g,"\\.").replace(/\*/g,".*")}$`).test(r);if([null,void 0].includes(t)||!l)return l;const u=new p(r,n,this._config);t=this._parse(t,u);const h={...s,...i};return Object.values(t).every(a=>!a)&&!Object.values(h).some(a=>a!==void 0)?!0:Object.entries(t).every(([a,d])=>h[a]==d)}_location(){var s,i,n;const{host:e="",pathname:t="",search:r=""}=typeof window<"u"?window.location:{};return{host:((s=this._config.location)==null?void 0:s.host)??e,pathname:((i=this._config.location)==null?void 0:i.pathname)??t,search:((n=this._config.location)==null?void 0:n.search)??r}}get params(){const{params:e,query:t}=this._unresolve();return{...e,...t}}has(e){return Object.keys(this._config.routes).includes(e)}_parse(e={},t=this._route){e??(e={}),e=["string","number"].includes(typeof e)?[e]:e;const r=t.parameterSegments.filter(({name:s})=>!this._config.defaults[s]);return Array.isArray(e)?e=e.reduce((s,i,n)=>r[n]?{...s,[r[n].name]:i}:typeof i=="object"?{...s,...i}:{...s,[i]:""},{}):r.length===1&&!e[r[0].name]&&(e.hasOwnProperty(Object.values(t.bindings)[0])||e.hasOwnProperty("id"))&&(e={[r[0].name]:e}),{...this._defaults(t),...this._substituteBindings(e,t)}}_defaults(e){return e.parameterSegments.filter(({name:t})=>this._config.defaults[t]).reduce((t,{name:r},s)=>({...t,[r]:this._config.defaults[r]}),{})}_substituteBindings(e,{bindings:t,parameterSegments:r}){return Object.entries(e).reduce((s,[i,n])=>{if(!n||typeof n!="object"||Array.isArray(n)||!r.some(({name:l})=>l===i))return{...s,[i]:n};if(!n.hasOwnProperty(t[i]))if(n.hasOwnProperty("id"))t[i]="id";else throw new Error(`Ziggy error: object passed as '${i}' parameter is missing route model binding key '${t[i]}'.`);return{...s,[i]:n[t[i]]}},{})}valueOf(){return this.toString()}check(e){return this.has(e)}}function x(o,e,t,r){const s=new v(o,e,t,r);return o?s.toString():s}const O={name:"NativeImageBlock",props:{inputImage:{type:String,default:null}},data:()=>({isLoaded:!1,isUploading:!1,imgSrc:null,placeholderSrc:"https://placekitten.com/g/2100/900"}),computed:{getButtonName(){var o;return this.imgSrc!=null&&((o=this.imgSrc)==null?void 0:o.length)>0?"Change featured image":"Upload featured image"},getBlurPx(){return this.imgSrc?0:12},bgStyle(){return{backgroundImage:`url(${this.getImgSrc})`,backgroundPosition:"center",backgroundSize:"cover",filter:`blur(${this.getBlurPx}px)`,webkitFilter:`blur(${this.getBlurPx}px)`}},getImgSrc(){var o;return this.imgSrc!=null&&((o=this.imgSrc)==null?void 0:o.length)>0?this.imgSrc:this.placeholderSrc}},methods:{openFileInput(){this.$refs.fileInput.click()},handleFileChange(o){const e=o.target.files[0];e&&this.uploadImage(e)},uploadImage(o){this.isUploading=!0;const e=new FormData;e.append("file",o),b.post(x("api.admin.upload.cloud.image"),e,{headers:{"Content-Type":"multipart/form-data"}}).then(t=>{t.data.success===1&&t.data.file&&t.data.file.url?(this.imgSrc=t.data.file.url,this.$emit("saved",t.data.file.url)):console.error("Image upload failed. Invalid response format.")}).catch(t=>{console.error("Image upload failed:",t.response)}).finally(()=>{this.isUploading=!1})},setInputImage(){var o;this.inputImage!=null&&((o=this.inputImage)==null?void 0:o.length)>0&&(this.imgSrc=this.inputImage),this.isLoaded=!0}},mounted(){this.isUploading=!1,setTimeout((function(){this.setInputImage(),this.isLoaded=!0}).bind(this),3e3)}},j=o=>(S("data-v-c6e8911d"),o=o(),I(),o),k={class:"card"},B={class:"card-body ratio ratio-21x9 bg-dark overflow-hidden"},P={class:"position-absolute w-100 h-100 d-flex justify-content-center text-center"},U={key:0,class:"align-self-center"},q=j(()=>c("div",{class:"spinner-border text-light",role:"status"},[c("span",{class:"visually-hidden"},"Loading...")],-1)),C=[q],E={key:1,class:"align-self-center"};function F(o,e,t,r,s,i){return f(),g("div",null,[c("div",k,[c("div",B,[c("div",{class:"d-flex justify-content-center text-center rounded-2",style:w(i.bgStyle)},null,4),c("div",P,[o.isUploading||!o.isLoaded?(f(),g("div",U,C)):(f(),g("div",E,[c("input",{type:"file",onChange:e[0]||(e[0]=(...n)=>i.handleFileChange&&i.handleFileChange(...n)),accept:"image/*",ref:"fileInput",style:{display:"none"}},null,544),c("button",{class:"btn btn-primary",onClick:e[1]||(e[1]=(...n)=>i.openFileInput&&i.openFileInput(...n))},$(i.getButtonName),1)]))])])])])}const N=y(O,[["render",F],["__scopeId","data-v-c6e8911d"]]),Z=Object.freeze(Object.defineProperty({__proto__:null,default:N},Symbol.toStringTag,{value:"Module"}));export{Z as N,N as _,x as r}; +import{l as m,_ as y,a as b,c as g,e as c,p as w,t as $,o as f,q as S,s as I}from"./admin-app-9fc1473b.js";var _=m();class p{constructor(e,t,r){this.name=e,this.definition=t,this.bindings=t.bindings??{},this.wheres=t.wheres??{},this.config=r}get template(){return`${this.origin}/${this.definition.uri}`.replace(/\/+$/,"")}get origin(){return this.config.absolute?this.definition.domain?`${this.config.url.match(/^\w+:\/\//)[0]}${this.definition.domain}${this.config.port?`:${this.config.port}`:""}`:this.config.url:""}get parameterSegments(){var e;return((e=this.template.match(/{[^}?]+\??}/g))==null?void 0:e.map(t=>({name:t.replace(/{|\??}/g,""),required:!/\?}$/.test(t)})))??[]}matchesUrl(e){if(!this.definition.methods.includes("GET"))return!1;const t=this.template.replace(/(\/?){([^}?]*)(\??)}/g,(n,l,u,h)=>{var d;const a=`(?<${u}>${((d=this.wheres[u])==null?void 0:d.replace(/(^\^)|(\$$)/g,""))||"[^/?]+"})`;return h?`(${l}${a})?`:`${l}${a}`}).replace(/^\w+:\/\//,""),[r,s]=e.replace(/^\w+:\/\//,"").split("?"),i=new RegExp(`^${t}/?$`).exec(r);if(i){for(const n in i.groups)i.groups[n]=typeof i.groups[n]=="string"?decodeURIComponent(i.groups[n]):i.groups[n];return{params:i.groups,query:_.parse(s)}}return!1}compile(e){const t=this.parameterSegments;return t.length?this.template.replace(/{([^}?]+)(\??)}/g,(r,s,i)=>{if(!i&&[null,void 0].includes(e[s]))throw new Error(`Ziggy error: '${s}' parameter is required for route '${this.name}'.`);if(t[t.length-1].name===s&&this.wheres[s]===".*")return encodeURIComponent(e[s]??"").replace(/%2F/g,"/");if(this.wheres[s]&&!new RegExp(`^${i?`(${this.wheres[s]})?`:this.wheres[s]}$`).test(e[s]??""))throw new Error(`Ziggy error: '${s}' parameter does not match required format '${this.wheres[s]}' for route '${this.name}'.`);return encodeURIComponent(e[s]??"")}).replace(`${this.origin}//`,`${this.origin}/`).replace(/\/+$/,""):this.template}}class v extends String{constructor(e,t,r=!0,s){if(super(),this._config=s??(typeof Ziggy<"u"?Ziggy:globalThis==null?void 0:globalThis.Ziggy),this._config={...this._config,absolute:r},e){if(!this._config.routes[e])throw new Error(`Ziggy error: route '${e}' is not in the route list.`);this._route=new p(e,this._config.routes[e],this._config),this._params=this._parse(t)}}toString(){const e=Object.keys(this._params).filter(t=>!this._route.parameterSegments.some(({name:r})=>r===t)).filter(t=>t!=="_query").reduce((t,r)=>({...t,[r]:this._params[r]}),{});return this._route.compile(this._params)+_.stringify({...e,...this._params._query},{addQueryPrefix:!0,arrayFormat:"indices",encodeValuesOnly:!0,skipNulls:!0,encoder:(t,r)=>typeof t=="boolean"?Number(t):r(t)})}_unresolve(e){e?this._config.absolute&&e.startsWith("/")&&(e=this._location().host+e):e=this._currentUrl();let t={};const[r,s]=Object.entries(this._config.routes).find(([i,n])=>t=new p(i,n,this._config).matchesUrl(e))||[void 0,void 0];return{name:r,...t,route:s}}_currentUrl(){const{host:e,pathname:t,search:r}=this._location();return(this._config.absolute?e+t:t.replace(this._config.url.replace(/^\w*:\/\/[^/]+/,""),"").replace(/^\/+/,"/"))+r}current(e,t){const{name:r,params:s,query:i,route:n}=this._unresolve();if(!e)return r;const l=new RegExp(`^${e.replace(/\./g,"\\.").replace(/\*/g,".*")}$`).test(r);if([null,void 0].includes(t)||!l)return l;const u=new p(r,n,this._config);t=this._parse(t,u);const h={...s,...i};return Object.values(t).every(a=>!a)&&!Object.values(h).some(a=>a!==void 0)?!0:Object.entries(t).every(([a,d])=>h[a]==d)}_location(){var s,i,n;const{host:e="",pathname:t="",search:r=""}=typeof window<"u"?window.location:{};return{host:((s=this._config.location)==null?void 0:s.host)??e,pathname:((i=this._config.location)==null?void 0:i.pathname)??t,search:((n=this._config.location)==null?void 0:n.search)??r}}get params(){const{params:e,query:t}=this._unresolve();return{...e,...t}}has(e){return Object.keys(this._config.routes).includes(e)}_parse(e={},t=this._route){e??(e={}),e=["string","number"].includes(typeof e)?[e]:e;const r=t.parameterSegments.filter(({name:s})=>!this._config.defaults[s]);return Array.isArray(e)?e=e.reduce((s,i,n)=>r[n]?{...s,[r[n].name]:i}:typeof i=="object"?{...s,...i}:{...s,[i]:""},{}):r.length===1&&!e[r[0].name]&&(e.hasOwnProperty(Object.values(t.bindings)[0])||e.hasOwnProperty("id"))&&(e={[r[0].name]:e}),{...this._defaults(t),...this._substituteBindings(e,t)}}_defaults(e){return e.parameterSegments.filter(({name:t})=>this._config.defaults[t]).reduce((t,{name:r},s)=>({...t,[r]:this._config.defaults[r]}),{})}_substituteBindings(e,{bindings:t,parameterSegments:r}){return Object.entries(e).reduce((s,[i,n])=>{if(!n||typeof n!="object"||Array.isArray(n)||!r.some(({name:l})=>l===i))return{...s,[i]:n};if(!n.hasOwnProperty(t[i]))if(n.hasOwnProperty("id"))t[i]="id";else throw new Error(`Ziggy error: object passed as '${i}' parameter is missing route model binding key '${t[i]}'.`);return{...s,[i]:n[t[i]]}},{})}valueOf(){return this.toString()}check(e){return this.has(e)}}function x(o,e,t,r){const s=new v(o,e,t,r);return o?s.toString():s}const O={name:"NativeImageBlock",props:{inputImage:{type:String,default:null}},data:()=>({isLoaded:!1,isUploading:!1,imgSrc:null,placeholderSrc:"https://placekitten.com/g/2100/900"}),computed:{getButtonName(){var o;return this.imgSrc!=null&&((o=this.imgSrc)==null?void 0:o.length)>0?"Change featured image":"Upload featured image"},getBlurPx(){return this.imgSrc?0:12},bgStyle(){return{backgroundImage:`url(${this.getImgSrc})`,backgroundPosition:"center",backgroundSize:"cover",filter:`blur(${this.getBlurPx}px)`,webkitFilter:`blur(${this.getBlurPx}px)`}},getImgSrc(){var o;return this.imgSrc!=null&&((o=this.imgSrc)==null?void 0:o.length)>0?this.imgSrc:this.placeholderSrc}},methods:{openFileInput(){this.$refs.fileInput.click()},handleFileChange(o){const e=o.target.files[0];e&&this.uploadImage(e)},uploadImage(o){this.isUploading=!0;const e=new FormData;e.append("file",o),b.post(x("api.admin.upload.cloud.image"),e,{headers:{"Content-Type":"multipart/form-data"}}).then(t=>{t.data.success===1&&t.data.file&&t.data.file.url?(this.imgSrc=t.data.file.url,this.$emit("saved",t.data.file.url)):console.error("Image upload failed. Invalid response format.")}).catch(t=>{console.error("Image upload failed:",t.response)}).finally(()=>{this.isUploading=!1})},setInputImage(){var o;this.inputImage!=null&&((o=this.inputImage)==null?void 0:o.length)>0&&(this.imgSrc=this.inputImage),this.isLoaded=!0}},mounted(){this.isUploading=!1,setTimeout((function(){this.setInputImage(),this.isLoaded=!0}).bind(this),3e3)}},j=o=>(S("data-v-c6e8911d"),o=o(),I(),o),k={class:"card"},B={class:"card-body ratio ratio-21x9 bg-dark overflow-hidden"},P={class:"position-absolute w-100 h-100 d-flex justify-content-center text-center"},U={key:0,class:"align-self-center"},q=j(()=>c("div",{class:"spinner-border text-light",role:"status"},[c("span",{class:"visually-hidden"},"Loading...")],-1)),C=[q],E={key:1,class:"align-self-center"};function F(o,e,t,r,s,i){return f(),g("div",null,[c("div",k,[c("div",B,[c("div",{class:"d-flex justify-content-center text-center rounded-2",style:w(i.bgStyle)},null,4),c("div",P,[o.isUploading||!o.isLoaded?(f(),g("div",U,C)):(f(),g("div",E,[c("input",{type:"file",onChange:e[0]||(e[0]=(...n)=>i.handleFileChange&&i.handleFileChange(...n)),accept:"image/*",ref:"fileInput",style:{display:"none"}},null,544),c("button",{class:"btn btn-primary",onClick:e[1]||(e[1]=(...n)=>i.openFileInput&&i.openFileInput(...n))},$(i.getButtonName),1)]))])])])])}const N=y(O,[["render",F],["__scopeId","data-v-c6e8911d"]]),Z=Object.freeze(Object.defineProperty({__proto__:null,default:N},Symbol.toStringTag,{value:"Module"}));export{Z as N,N as _,x as r}; diff --git a/public/build/assets/PostEditor-a6038129.js b/public/build/assets/PostEditor-a50a8942.js similarity index 97% rename from public/build/assets/PostEditor-a6038129.js rename to public/build/assets/PostEditor-a50a8942.js index 4c5b867..6f47c88 100644 --- a/public/build/assets/PostEditor-a6038129.js +++ b/public/build/assets/PostEditor-a50a8942.js @@ -1 +1 @@ -import x from"./VueEditorJs-6310d292.js";import{r as h,_ as P}from"./NativeImageBlock-bcbff98b.js";import{L as b}from"./bundle-43b5b4d7.js";import{H as S}from"./bundle-94bef551.js";import{d as V,a as p,_ as A,m as D,b as E,c as r,e as o,w as d,v as y,t as u,f as C,g as M,F as f,r as m,n as I,h as T,i as j,o as c,j as L,k}from"./admin-app-0df052b8.js";import"./index-8746c87e.js";const w=V("postStore",{state:()=>({data:{defaultLocaleSlug:"my",countryLocales:[],localeCategories:[],authors:[]}}),getters:{defaultLocaleSlug(t){return t.data.defaultLocaleSlug},countryLocales(t){return t.data.countryLocales},localeCategories(t){return t.data.localeCategories},authors(t){return t.data.authors}},actions:{async fetchAuthors(){try{const t=await p.get(h("api.admin.authors"));console.log(t),this.data.authors=t.data.authors}catch(t){console.log(t)}},async fetchCountryLocales(){try{const t=await p.get(h("api.admin.country-locales"));console.log(t),this.data.countryLocales=t.data.country_locales,this.data.defaultLocaleSlug=t.data.default_locale_slug}catch(t){console.log(t)}},async fetchLocaleCategories(t){try{const e=await p.get(h("api.admin.categories",{country_locale_slug:t}));console.log(e),this.data.localeCategories=e.data.categories}catch(e){console.log(e)}}}}),z={components:{VueEditorJs:x,List:b,Header:S},props:{postId:{type:Number,default:null}},data(){return{isSaving:!1,showEditorJs:!1,post:{id:null,title:"",slug:"",excerpt:"",author_id:null,featured:!1,publish_date:null,featured_image:null,body:{time:1591362820044,blocks:[],version:"2.25.0"},locale_slug:null,locale_id:null,status:"draft",categories:null},status:["publish","future","draft","private","trash"],config:{placeholder:"Write something (ノ◕ヮ◕)ノ*:・゚✧",tools:{header:{class:S,config:{placeholder:"Enter a header",levels:[2,3,4],defaultLevel:3}},list:{class:b,inlineToolbar:!0}},onReady:()=>{},onChange:t=>{},data:{time:1591362820044,blocks:[],version:"2.25.0"}}}},watch:{"post.title":{deep:!0,handler(t,e){this.post.slug=this.slugify(t)}}},computed:{...D(w,["countryLocales","localeCategories","defaultLocaleSlug","authors"]),getPostFullUrl(){var t;return((t=this.post.slug)==null?void 0:t.length)>0?"https://productalert.co/"+this.post.locale_slug+"/posts/"+this.post.slug:"https://productalert.co/"+this.post.locale_slug+"/posts/enter-a-post-title-to-autogen-slug"}},methods:{...E(w,["fetchCountryLocales","fetchLocaleCategories","fetchAuthors"]),checkAndSave(){var e,i,a,s,n,g,_;let t=[];((e=this.post.title)==null?void 0:e.length)>0||t.push("post title"),((i=this.post.publish_date)==null?void 0:i.length)>0||t.push("publish date"),((a=this.post.slug)==null?void 0:a.length)>0||t.push("post slug"),((s=this.post.excerpt)==null?void 0:s.length)>0||t.push("post excerpt"),((n=this.post.featured_image)==null?void 0:n.length)>0||t.push("post featured image"),((g=this.post.body.blocks)==null?void 0:g.length)>0||t.push("Post body"),(!(((_=this.post.locale_slug)==null?void 0:_.length)>0)||this.post.locale_id==null)&&t.push("Country locality"),this.post.categories==null&&t.push("Category"),t.length>0?alert("HAIYA many errors! pls fix "+t.join(", ")):this.savePost()},savePost(){this.isSaving=!0;const t=new FormData;for(const[e,i]of Object.entries(this.post))e=="body"?t.append(e,JSON.stringify(i)):t.append(e,i);p.post(h("api.admin.post.upsert"),t,{headers:{"Content-Type":"application/json"}}).then(e=>{console.warn(e)}),setTimeout((function(){this.isSaving=!1}).bind(this),1e3)},onInitialized(t){},imageSaved(t){this.post.featured_image=t},editorSaved(t){this.post.body=t},statusChanged(t){this.post.status=t.target.value},localeChanged(t){this.post.locale_slug=t.target.value,this.post.locale_id=this.getLocaleIdBySlug(t.target.value),this.post.categories=[],setTimeout((function(){this.fetchLocaleCategories(this.post.locale_slug)}).bind(this),100)},setDefaultLocale(){(this.post.locale_slug==null||this.post.locale_slug=="")&&(this.post.locale_slug=this.defaultLocaleSlug,this.post.locale_id=this.getLocaleIdBySlug(this.defaultLocaleSlug))},getLocaleIdBySlug(t){for(const[e,i]of Object.entries(this.countryLocales))if(i.slug==t)return i.id;return null},async fetchPostData(t){var i;const e=await p.get(h("api.admin.post.get",{id:t}));if(((i=e==null?void 0:e.data)==null?void 0:i.post)!=null){let a=this.post,s=e.data.post;a.id=s.id,a.title=s.title,a.slug=s.slug,a.publish_date=s.publish_date,a.excerpt=s.excerpt,a.author_id=s.author_id,a.featured=s.featured,a.featured_image=s.featured_image,a.body=s.body,a.locale_slug=s.post_category.category.country_locale_slug,a.locale_id=s.post_category.category.country_locale_id,a.status=s.status,a.categories=s.post_category.category.id,this.post=a,this.config.data=s.body}console.log(e.data.post)},slugify:function(t){var e="",i=t.toLowerCase();return e=i.replace(/[^a-z0-9\s]/g,""),e=e.replace(/\s+/g," "),e=e.trim(),e=e.replace(/\s+/g,"-"),e}},mounted(){this.fetchCountryLocales().then(()=>{this.setDefaultLocale(),setTimeout((function(){this.fetchLocaleCategories(this.post.locale_slug),this.fetchAuthors(),this.postId!=null?this.fetchPostData(this.postId).then(()=>{setTimeout((function(){this.showEditorJs=!0}).bind(this),1e3)}):setTimeout((function(){this.showEditorJs=!0}).bind(this),1e3)}).bind(this),100)})}},B={class:"row justify-content-center"},U={class:"col-9",style:{"max-width":"700px"}},N={class:"mb-3"},F={class:"form-floating"},J=o("label",null,"Write a SEO post title",-1),O={class:"text-secondary"},H={class:"form-floating mb-3"},W=o("label",null,"Write a simple excerpt to convince & entice users to view this post!",-1),R={key:0,class:"card"},Y={class:"card-body"},q={class:"col-3"},G={class:"d-grid mb-2"},K=["selected","value"],Q=o("div",{class:"fw-bold"},"Publish Date",-1),X={class:"input-icon mb-2"},Z=j('',1),$=["disabled"],tt=o("span",{class:"visually-hidden"},"Saving...",-1),et=[tt],st={key:1},ot={class:"card mb-2"},lt=o("div",{class:"card-header fw-bold"},"Country Locality",-1),at={class:"card-body"},it=["value","selected"],nt={class:"card mb-2"},rt=o("div",{class:"card-header fw-bold"},"Categories",-1),ct={class:"card-body"},dt=["id","value"],ut={class:"card mb-2"},ht=o("div",{class:"card-header fw-bold"},"Authors",-1),pt={class:"card-body"},gt=["id","value"],_t={class:"card mb-2"},ft=o("div",{class:"card-header fw-bold"},"Other Settings",-1),mt={class:"card-body"},vt={class:"form-check form-switch"},yt=o("label",{class:"form-check-label"},"Feature this Post",-1);function bt(t,e,i,a,s,n){const g=P,_=x;return c(),r("div",null,[o("div",B,[o("div",U,[o("div",N,[o("div",F,[d(o("input",{"onUpdate:modelValue":e[0]||(e[0]=l=>s.post.title=l),type:"text",class:"form-control",placeholder:"Post title"},null,512),[[y,s.post.title]]),J]),o("small",null,[o("span",O,u(n.getPostFullUrl),1)])]),o("div",H,[d(o("textarea",{"onUpdate:modelValue":e[1]||(e[1]=l=>s.post.excerpt=l),class:"form-control",style:{"min-height":"150px"},placeholder:"Enter a post excerpt/summary"},null,512),[[y,s.post.excerpt]]),W]),C(g,{ref:"imageBlock",class:"mb-3","input-image":s.post.featured_image,onSaved:n.imageSaved},null,8,["input-image","onSaved"]),s.showEditorJs?(c(),r("div",R,[o("div",Y,[C(_,{onSaved:n.editorSaved,config:s.config,initialized:n.onInitialized},null,8,["onSaved","config","initialized"])])])):M("",!0)]),o("div",q,[o("div",G,[o("select",{class:"form-select mb-2","aria-label":"Default select example",onChange:e[2]||(e[2]=(...l)=>n.statusChanged&&n.statusChanged(...l))},[(c(!0),r(f,null,m(s.status,l=>(c(),r("option",{key:l,selected:l==s.post.status,value:l}," Post Status: "+u(l),9,K))),128))],32),Q,o("div",X,[Z,d(o("input",{type:"date","onUpdate:modelValue":e[3]||(e[3]=l=>s.post.publish_date=l),class:"form-control",placeholder:"Select a date",id:"datepicker-icon-prepend"},null,512),[[y,s.post.publish_date]])]),o("button",{onClick:e[4]||(e[4]=(...l)=>n.checkAndSave&&n.checkAndSave(...l)),class:"btn btn-primary",style:{height:"50px"}},[s.isSaving?(c(),r("div",{key:0,class:I(["spinner-border",s.isSaving?"disabled":""]),role:"status",disabled:s.isSaving},et,10,$)):(c(),r("span",st,"Save as "+u(s.post.status),1))])]),o("div",ot,[lt,o("div",at,[o("select",{class:"form-select",onChange:e[5]||(e[5]=(...l)=>n.localeChanged&&n.localeChanged(...l))},[(c(!0),r(f,null,m(t.countryLocales,l=>(c(),r("option",{key:l.id,value:l.slug,selected:l.slug==s.post.locale_slug},u(l.name),9,it))),128))],32)])]),o("div",nt,[rt,o("div",ct,[(c(!0),r(f,null,m(t.localeCategories,l=>(c(),r("div",{class:"py-1",key:l.id},[o("label",null,[d(o("input",{type:"radio",id:l.id,value:l.id,"onUpdate:modelValue":e[6]||(e[6]=v=>s.post.categories=v)},null,8,dt),[[L,s.post.categories]]),k(" "+u(l.name),1)])]))),128))])]),o("div",ut,[ht,o("div",pt,[(c(!0),r(f,null,m(t.authors,l=>(c(),r("div",{class:"py-1",key:l.id},[o("label",null,[d(o("input",{type:"radio",id:l.id,value:l.id,"onUpdate:modelValue":e[7]||(e[7]=v=>s.post.author_id=v)},null,8,gt),[[L,s.post.author_id]]),k(" "+u(l.name),1)])]))),128))])]),o("div",_t,[ft,o("div",mt,[o("div",vt,[d(o("input",{"onUpdate:modelValue":e[8]||(e[8]=l=>s.post.featured=l),class:"form-check-input",type:"checkbox",role:"switch"},null,512),[[T,s.post.featured]]),yt])])])])])])}const Pt=A(z,[["render",bt]]);export{Pt as default}; +import x from"./VueEditorJs-a618215f.js";import{r as h,_ as P}from"./NativeImageBlock-49da3dd3.js";import{L as b}from"./bundle-60a987a2.js";import{H as S}from"./bundle-7f656357.js";import{d as V,a as p,_ as A,m as D,b as E,c as r,e as o,w as d,v as y,t as u,f as C,g as M,F as f,r as m,n as I,h as T,i as j,o as c,j as L,k}from"./admin-app-9fc1473b.js";import"./index-8746c87e.js";const w=V("postStore",{state:()=>({data:{defaultLocaleSlug:"my",countryLocales:[],localeCategories:[],authors:[]}}),getters:{defaultLocaleSlug(t){return t.data.defaultLocaleSlug},countryLocales(t){return t.data.countryLocales},localeCategories(t){return t.data.localeCategories},authors(t){return t.data.authors}},actions:{async fetchAuthors(){try{const t=await p.get(h("api.admin.authors"));console.log(t),this.data.authors=t.data.authors}catch(t){console.log(t)}},async fetchCountryLocales(){try{const t=await p.get(h("api.admin.country-locales"));console.log(t),this.data.countryLocales=t.data.country_locales,this.data.defaultLocaleSlug=t.data.default_locale_slug}catch(t){console.log(t)}},async fetchLocaleCategories(t){try{const e=await p.get(h("api.admin.categories",{country_locale_slug:t}));console.log(e),this.data.localeCategories=e.data.categories}catch(e){console.log(e)}}}}),z={components:{VueEditorJs:x,List:b,Header:S},props:{postId:{type:Number,default:null}},data(){return{isSaving:!1,showEditorJs:!1,post:{id:null,title:"",slug:"",excerpt:"",author_id:null,featured:!1,publish_date:null,featured_image:null,body:{time:1591362820044,blocks:[],version:"2.25.0"},locale_slug:null,locale_id:null,status:"draft",categories:null},status:["publish","future","draft","private","trash"],config:{placeholder:"Write something (ノ◕ヮ◕)ノ*:・゚✧",tools:{header:{class:S,config:{placeholder:"Enter a header",levels:[2,3,4],defaultLevel:3}},list:{class:b,inlineToolbar:!0}},onReady:()=>{},onChange:t=>{},data:{time:1591362820044,blocks:[],version:"2.25.0"}}}},watch:{"post.title":{deep:!0,handler(t,e){this.post.slug=this.slugify(t)}}},computed:{...D(w,["countryLocales","localeCategories","defaultLocaleSlug","authors"]),getPostFullUrl(){var t;return((t=this.post.slug)==null?void 0:t.length)>0?"https://productalert.co/"+this.post.locale_slug+"/posts/"+this.post.slug:"https://productalert.co/"+this.post.locale_slug+"/posts/enter-a-post-title-to-autogen-slug"}},methods:{...E(w,["fetchCountryLocales","fetchLocaleCategories","fetchAuthors"]),checkAndSave(){var e,i,a,s,n,g,_;let t=[];((e=this.post.title)==null?void 0:e.length)>0||t.push("post title"),((i=this.post.publish_date)==null?void 0:i.length)>0||t.push("publish date"),((a=this.post.slug)==null?void 0:a.length)>0||t.push("post slug"),((s=this.post.excerpt)==null?void 0:s.length)>0||t.push("post excerpt"),((n=this.post.featured_image)==null?void 0:n.length)>0||t.push("post featured image"),((g=this.post.body.blocks)==null?void 0:g.length)>0||t.push("Post body"),(!(((_=this.post.locale_slug)==null?void 0:_.length)>0)||this.post.locale_id==null)&&t.push("Country locality"),this.post.categories==null&&t.push("Category"),t.length>0?alert("HAIYA many errors! pls fix "+t.join(", ")):this.savePost()},savePost(){this.isSaving=!0;const t=new FormData;for(const[e,i]of Object.entries(this.post))e=="body"?t.append(e,JSON.stringify(i)):t.append(e,i);p.post(h("api.admin.post.upsert"),t,{headers:{"Content-Type":"application/json"}}).then(e=>{console.warn(e)}),setTimeout((function(){this.isSaving=!1}).bind(this),1e3)},onInitialized(t){},imageSaved(t){this.post.featured_image=t},editorSaved(t){this.post.body=t},statusChanged(t){this.post.status=t.target.value},localeChanged(t){this.post.locale_slug=t.target.value,this.post.locale_id=this.getLocaleIdBySlug(t.target.value),this.post.categories=[],setTimeout((function(){this.fetchLocaleCategories(this.post.locale_slug)}).bind(this),100)},setDefaultLocale(){(this.post.locale_slug==null||this.post.locale_slug=="")&&(this.post.locale_slug=this.defaultLocaleSlug,this.post.locale_id=this.getLocaleIdBySlug(this.defaultLocaleSlug))},getLocaleIdBySlug(t){for(const[e,i]of Object.entries(this.countryLocales))if(i.slug==t)return i.id;return null},async fetchPostData(t){var i;const e=await p.get(h("api.admin.post.get",{id:t}));if(((i=e==null?void 0:e.data)==null?void 0:i.post)!=null){let a=this.post,s=e.data.post;a.id=s.id,a.title=s.title,a.slug=s.slug,a.publish_date=s.publish_date,a.excerpt=s.excerpt,a.author_id=s.author_id,a.featured=s.featured,a.featured_image=s.featured_image,a.body=s.body,a.locale_slug=s.post_category.category.country_locale_slug,a.locale_id=s.post_category.category.country_locale_id,a.status=s.status,a.categories=s.post_category.category.id,this.post=a,this.config.data=s.body}console.log(e.data.post)},slugify:function(t){var e="",i=t.toLowerCase();return e=i.replace(/[^a-z0-9\s]/g,""),e=e.replace(/\s+/g," "),e=e.trim(),e=e.replace(/\s+/g,"-"),e}},mounted(){this.fetchCountryLocales().then(()=>{this.setDefaultLocale(),setTimeout((function(){this.fetchLocaleCategories(this.post.locale_slug),this.fetchAuthors(),this.postId!=null?this.fetchPostData(this.postId).then(()=>{setTimeout((function(){this.showEditorJs=!0}).bind(this),1e3)}):setTimeout((function(){this.showEditorJs=!0}).bind(this),1e3)}).bind(this),100)})}},B={class:"row justify-content-center"},U={class:"col-9",style:{"max-width":"700px"}},N={class:"mb-3"},F={class:"form-floating"},J=o("label",null,"Write a SEO post title",-1),O={class:"text-secondary"},H={class:"form-floating mb-3"},W=o("label",null,"Write a simple excerpt to convince & entice users to view this post!",-1),R={key:0,class:"card"},Y={class:"card-body"},q={class:"col-3"},G={class:"d-grid mb-2"},K=["selected","value"],Q=o("div",{class:"fw-bold"},"Publish Date",-1),X={class:"input-icon mb-2"},Z=j('',1),$=["disabled"],tt=o("span",{class:"visually-hidden"},"Saving...",-1),et=[tt],st={key:1},ot={class:"card mb-2"},lt=o("div",{class:"card-header fw-bold"},"Country Locality",-1),at={class:"card-body"},it=["value","selected"],nt={class:"card mb-2"},rt=o("div",{class:"card-header fw-bold"},"Categories",-1),ct={class:"card-body"},dt=["id","value"],ut={class:"card mb-2"},ht=o("div",{class:"card-header fw-bold"},"Authors",-1),pt={class:"card-body"},gt=["id","value"],_t={class:"card mb-2"},ft=o("div",{class:"card-header fw-bold"},"Other Settings",-1),mt={class:"card-body"},vt={class:"form-check form-switch"},yt=o("label",{class:"form-check-label"},"Feature this Post",-1);function bt(t,e,i,a,s,n){const g=P,_=x;return c(),r("div",null,[o("div",B,[o("div",U,[o("div",N,[o("div",F,[d(o("input",{"onUpdate:modelValue":e[0]||(e[0]=l=>s.post.title=l),type:"text",class:"form-control",placeholder:"Post title"},null,512),[[y,s.post.title]]),J]),o("small",null,[o("span",O,u(n.getPostFullUrl),1)])]),o("div",H,[d(o("textarea",{"onUpdate:modelValue":e[1]||(e[1]=l=>s.post.excerpt=l),class:"form-control",style:{"min-height":"150px"},placeholder:"Enter a post excerpt/summary"},null,512),[[y,s.post.excerpt]]),W]),C(g,{ref:"imageBlock",class:"mb-3","input-image":s.post.featured_image,onSaved:n.imageSaved},null,8,["input-image","onSaved"]),s.showEditorJs?(c(),r("div",R,[o("div",Y,[C(_,{onSaved:n.editorSaved,config:s.config,initialized:n.onInitialized},null,8,["onSaved","config","initialized"])])])):M("",!0)]),o("div",q,[o("div",G,[o("select",{class:"form-select mb-2","aria-label":"Default select example",onChange:e[2]||(e[2]=(...l)=>n.statusChanged&&n.statusChanged(...l))},[(c(!0),r(f,null,m(s.status,l=>(c(),r("option",{key:l,selected:l==s.post.status,value:l}," Post Status: "+u(l),9,K))),128))],32),Q,o("div",X,[Z,d(o("input",{type:"date","onUpdate:modelValue":e[3]||(e[3]=l=>s.post.publish_date=l),class:"form-control",placeholder:"Select a date",id:"datepicker-icon-prepend"},null,512),[[y,s.post.publish_date]])]),o("button",{onClick:e[4]||(e[4]=(...l)=>n.checkAndSave&&n.checkAndSave(...l)),class:"btn btn-primary",style:{height:"50px"}},[s.isSaving?(c(),r("div",{key:0,class:I(["spinner-border",s.isSaving?"disabled":""]),role:"status",disabled:s.isSaving},et,10,$)):(c(),r("span",st,"Save as "+u(s.post.status),1))])]),o("div",ot,[lt,o("div",at,[o("select",{class:"form-select",onChange:e[5]||(e[5]=(...l)=>n.localeChanged&&n.localeChanged(...l))},[(c(!0),r(f,null,m(t.countryLocales,l=>(c(),r("option",{key:l.id,value:l.slug,selected:l.slug==s.post.locale_slug},u(l.name),9,it))),128))],32)])]),o("div",nt,[rt,o("div",ct,[(c(!0),r(f,null,m(t.localeCategories,l=>(c(),r("div",{class:"py-1",key:l.id},[o("label",null,[d(o("input",{type:"radio",id:l.id,value:l.id,"onUpdate:modelValue":e[6]||(e[6]=v=>s.post.categories=v)},null,8,dt),[[L,s.post.categories]]),k(" "+u(l.name),1)])]))),128))])]),o("div",ut,[ht,o("div",pt,[(c(!0),r(f,null,m(t.authors,l=>(c(),r("div",{class:"py-1",key:l.id},[o("label",null,[d(o("input",{type:"radio",id:l.id,value:l.id,"onUpdate:modelValue":e[7]||(e[7]=v=>s.post.author_id=v)},null,8,gt),[[L,s.post.author_id]]),k(" "+u(l.name),1)])]))),128))])]),o("div",_t,[ft,o("div",mt,[o("div",vt,[d(o("input",{"onUpdate:modelValue":e[8]||(e[8]=l=>s.post.featured=l),class:"form-check-input",type:"checkbox",role:"switch"},null,512),[[T,s.post.featured]]),yt])])])])])])}const Pt=A(z,[["render",bt]]);export{Pt as default}; diff --git a/public/build/assets/VueEditorJs-6310d292.js b/public/build/assets/VueEditorJs-a618215f.js similarity index 99% rename from public/build/assets/VueEditorJs-6310d292.js rename to public/build/assets/VueEditorJs-a618215f.js index a48ce5d..9b57ccf 100644 --- a/public/build/assets/VueEditorJs-6310d292.js +++ b/public/build/assets/VueEditorJs-a618215f.js @@ -1,4 +1,4 @@ -import{_ as Le,u as Zt,x as Oe,c as Ne,y as Re,z as De,o as Pe}from"./admin-app-0df052b8.js";import"./index-8746c87e.js";var Fe=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function xt(s){return s&&s.__esModule&&Object.prototype.hasOwnProperty.call(s,"default")?s.default:s}function St(){}Object.assign(St,{default:St,register:St,revert:function(){},__esModule:!0});Element.prototype.matches||(Element.prototype.matches=Element.prototype.matchesSelector||Element.prototype.mozMatchesSelector||Element.prototype.msMatchesSelector||Element.prototype.oMatchesSelector||Element.prototype.webkitMatchesSelector||function(s){const t=(this.document||this.ownerDocument).querySelectorAll(s);let e=t.length;for(;--e>=0&&t.item(e)!==this;);return e>-1});Element.prototype.closest||(Element.prototype.closest=function(s){let t=this;if(!document.documentElement.contains(t))return null;do{if(t.matches(s))return t;t=t.parentElement||t.parentNode}while(t!==null);return null});Element.prototype.prepend||(Element.prototype.prepend=function(s){const t=document.createDocumentFragment();Array.isArray(s)||(s=[s]),s.forEach(e=>{const o=e instanceof Node;t.appendChild(o?e:document.createTextNode(e))}),this.insertBefore(t,this.firstChild)});Element.prototype.scrollIntoViewIfNeeded||(Element.prototype.scrollIntoViewIfNeeded=function(s){s=arguments.length===0?!0:!!s;const t=this.parentNode,e=window.getComputedStyle(t,null),o=parseInt(e.getPropertyValue("border-top-width")),i=parseInt(e.getPropertyValue("border-left-width")),n=this.offsetTop-t.offsetTopt.scrollTop+t.clientHeight,a=this.offsetLeft-t.offsetLeftt.scrollLeft+t.clientWidth,c=n&&!r;(n||r)&&s&&(t.scrollTop=this.offsetTop-t.offsetTop-t.clientHeight/2-o+this.clientHeight/2),(a||l)&&s&&(t.scrollLeft=this.offsetLeft-t.offsetLeft-t.clientWidth/2-i+this.clientWidth/2),(n||r||a||l)&&!s&&this.scrollIntoView(c)});let He=(s=21)=>crypto.getRandomValues(new Uint8Array(s)).reduce((t,e)=>(e&=63,e<36?t+=e.toString(36):e<62?t+=(e-26).toString(36).toUpperCase():e>62?t+="-":t+="_",t),"");var oe=(s=>(s.VERBOSE="VERBOSE",s.INFO="INFO",s.WARN="WARN",s.ERROR="ERROR",s))(oe||{});const E={BACKSPACE:8,TAB:9,ENTER:13,SHIFT:16,CTRL:17,ALT:18,ESC:27,SPACE:32,LEFT:37,UP:38,DOWN:40,RIGHT:39,DELETE:46,META:91},je={LEFT:0,WHEEL:1,RIGHT:2,BACKWARD:3,FORWARD:4};function gt(s,t,e="log",o,i="color: inherit"){if(!("console"in window)||!window.console[e])return;const n=["info","log","warn","error"].includes(e),r=[];switch(gt.logLevel){case"ERROR":if(e!=="error")return;break;case"WARN":if(!["error","warn"].includes(e))return;break;case"INFO":if(!n||s)return;break}o&&r.push(o);const a="Editor.js 2.27.2",l=`line-height: 1em; +import{_ as Le,u as Zt,x as Oe,c as Ne,y as Re,z as De,o as Pe}from"./admin-app-9fc1473b.js";import"./index-8746c87e.js";var Fe=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function xt(s){return s&&s.__esModule&&Object.prototype.hasOwnProperty.call(s,"default")?s.default:s}function St(){}Object.assign(St,{default:St,register:St,revert:function(){},__esModule:!0});Element.prototype.matches||(Element.prototype.matches=Element.prototype.matchesSelector||Element.prototype.mozMatchesSelector||Element.prototype.msMatchesSelector||Element.prototype.oMatchesSelector||Element.prototype.webkitMatchesSelector||function(s){const t=(this.document||this.ownerDocument).querySelectorAll(s);let e=t.length;for(;--e>=0&&t.item(e)!==this;);return e>-1});Element.prototype.closest||(Element.prototype.closest=function(s){let t=this;if(!document.documentElement.contains(t))return null;do{if(t.matches(s))return t;t=t.parentElement||t.parentNode}while(t!==null);return null});Element.prototype.prepend||(Element.prototype.prepend=function(s){const t=document.createDocumentFragment();Array.isArray(s)||(s=[s]),s.forEach(e=>{const o=e instanceof Node;t.appendChild(o?e:document.createTextNode(e))}),this.insertBefore(t,this.firstChild)});Element.prototype.scrollIntoViewIfNeeded||(Element.prototype.scrollIntoViewIfNeeded=function(s){s=arguments.length===0?!0:!!s;const t=this.parentNode,e=window.getComputedStyle(t,null),o=parseInt(e.getPropertyValue("border-top-width")),i=parseInt(e.getPropertyValue("border-left-width")),n=this.offsetTop-t.offsetTopt.scrollTop+t.clientHeight,a=this.offsetLeft-t.offsetLeftt.scrollLeft+t.clientWidth,c=n&&!r;(n||r)&&s&&(t.scrollTop=this.offsetTop-t.offsetTop-t.clientHeight/2-o+this.clientHeight/2),(a||l)&&s&&(t.scrollLeft=this.offsetLeft-t.offsetLeft-t.clientWidth/2-i+this.clientWidth/2),(n||r||a||l)&&!s&&this.scrollIntoView(c)});let He=(s=21)=>crypto.getRandomValues(new Uint8Array(s)).reduce((t,e)=>(e&=63,e<36?t+=e.toString(36):e<62?t+=(e-26).toString(36).toUpperCase():e>62?t+="-":t+="_",t),"");var oe=(s=>(s.VERBOSE="VERBOSE",s.INFO="INFO",s.WARN="WARN",s.ERROR="ERROR",s))(oe||{});const E={BACKSPACE:8,TAB:9,ENTER:13,SHIFT:16,CTRL:17,ALT:18,ESC:27,SPACE:32,LEFT:37,UP:38,DOWN:40,RIGHT:39,DELETE:46,META:91},je={LEFT:0,WHEEL:1,RIGHT:2,BACKWARD:3,FORWARD:4};function gt(s,t,e="log",o,i="color: inherit"){if(!("console"in window)||!window.console[e])return;const n=["info","log","warn","error"].includes(e),r=[];switch(gt.logLevel){case"ERROR":if(e!=="error")return;break;case"WARN":if(!["error","warn"].includes(e))return;break;case"INFO":if(!n||s)return;break}o&&r.push(o);const a="Editor.js 2.27.2",l=`line-height: 1em; color: #006FEA; display: inline-block; font-size: 11px; @@ -80,4 +80,4 @@ import{_ as Le,u as Zt,x as Oe,c as Ne,y as Re,z as De,o as Pe}from"./admin-app- * @license Apache-2.0 * @see Editor.js * @author CodeX Team - */class yi{static get version(){return"2.27.2"}constructor(t){let e=()=>{};z(t)&&D(t.onReady)&&(e=t.onReady);const o=new wi(t);this.isReady=o.isReady.then(()=>{this.exportAPI(o),e()})}exportAPI(t){const e=["configuration"],o=()=>{Object.values(t.moduleInstances).forEach(i=>{D(i.destroy)&&i.destroy(),i.listeners.removeAll()}),t=null;for(const i in this)Object.prototype.hasOwnProperty.call(this,i)&&delete this[i];Object.setPrototypeOf(this,null)};e.forEach(i=>{this[i]=t[i]}),this.destroy=o,Object.setPrototypeOf(this,t.moduleInstances.API.methods),delete this.exportAPI,Object.entries({blocks:{clear:"clear",render:"render"},caret:{focus:"focus"},events:{on:"on",off:"off",emit:"emit"},saver:{save:"save"}}).forEach(([i,n])=>{Object.entries(n).forEach(([r,a])=>{this[a]=t.moduleInstances.API.methods[i][r]})})}}const Tt={header:Zt(()=>import("./bundle-94bef551.js").then(s=>s.b),["assets/bundle-94bef551.js","assets/admin-app-0df052b8.js","assets/index-8746c87e.js","assets/admin-app-935fc652.css"]),list:Zt(()=>import("./bundle-43b5b4d7.js").then(s=>s.b),["assets/bundle-43b5b4d7.js","assets/admin-app-0df052b8.js","assets/index-8746c87e.js","assets/admin-app-935fc652.css"])},Ei=Oe({name:"vue-editor-js",props:{holder:{type:String,default:()=>"vue-editor-js",require:!0},config:{type:Object,default:()=>({}),require:!0},initialized:{type:Function,default:()=>{}}},setup:(s,t)=>{const e=Re({editor:null});function o(r){i(),e.editor=new yi({holder:r.holder||"vue-editor-js",...r.config,onChange:(a,l)=>{n()}}),r.initialized(e.editor)}function i(){e.editor&&(e.editor.destroy(),e.editor=null)}function n(){console.log("saveEditor"),e.editor&&e.editor.save().then(r=>{console.log(r),t.emit("saved",r)})}return De(r=>o(s)),{props:s,state:e}},methods:{useTools(s,t){const e=Object.keys(Tt),o={...s.customTools};return e.every(i=>!s[i])?(e.forEach(i=>o[i]={class:Tt[i]}),Object.keys(t).forEach(i=>{o[i]!==void 0&&o[i]!==null&&(o[i].config=t[i])}),o):(e.forEach(i=>{const n=s[i];if(n&&(o[i]={class:Tt[i]},typeof n=="object")){const r=Object.assign({},s[i]);delete r.class,o[i]=Object.assign(o[i],r)}}),Object.keys(t).forEach(i=>{o[i]!==void 0&&o[i]!==null&&(o[i].config=t[i])}),o)}}}),Si=["id"];function Ci(s,t,e,o,i,n){return Pe(),Ne("div",{id:s.holder},null,8,Si)}const Ii=Le(Ei,[["render",Ci]]);export{Tt as PLUGINS,Ii as default}; + */class yi{static get version(){return"2.27.2"}constructor(t){let e=()=>{};z(t)&&D(t.onReady)&&(e=t.onReady);const o=new wi(t);this.isReady=o.isReady.then(()=>{this.exportAPI(o),e()})}exportAPI(t){const e=["configuration"],o=()=>{Object.values(t.moduleInstances).forEach(i=>{D(i.destroy)&&i.destroy(),i.listeners.removeAll()}),t=null;for(const i in this)Object.prototype.hasOwnProperty.call(this,i)&&delete this[i];Object.setPrototypeOf(this,null)};e.forEach(i=>{this[i]=t[i]}),this.destroy=o,Object.setPrototypeOf(this,t.moduleInstances.API.methods),delete this.exportAPI,Object.entries({blocks:{clear:"clear",render:"render"},caret:{focus:"focus"},events:{on:"on",off:"off",emit:"emit"},saver:{save:"save"}}).forEach(([i,n])=>{Object.entries(n).forEach(([r,a])=>{this[a]=t.moduleInstances.API.methods[i][r]})})}}const Tt={header:Zt(()=>import("./bundle-7f656357.js").then(s=>s.b),["assets/bundle-7f656357.js","assets/admin-app-9fc1473b.js","assets/index-8746c87e.js","assets/admin-app-935fc652.css"]),list:Zt(()=>import("./bundle-60a987a2.js").then(s=>s.b),["assets/bundle-60a987a2.js","assets/admin-app-9fc1473b.js","assets/index-8746c87e.js","assets/admin-app-935fc652.css"])},Ei=Oe({name:"vue-editor-js",props:{holder:{type:String,default:()=>"vue-editor-js",require:!0},config:{type:Object,default:()=>({}),require:!0},initialized:{type:Function,default:()=>{}}},setup:(s,t)=>{const e=Re({editor:null});function o(r){i(),e.editor=new yi({holder:r.holder||"vue-editor-js",...r.config,onChange:(a,l)=>{n()}}),r.initialized(e.editor)}function i(){e.editor&&(e.editor.destroy(),e.editor=null)}function n(){console.log("saveEditor"),e.editor&&e.editor.save().then(r=>{console.log(r),t.emit("saved",r)})}return De(r=>o(s)),{props:s,state:e}},methods:{useTools(s,t){const e=Object.keys(Tt),o={...s.customTools};return e.every(i=>!s[i])?(e.forEach(i=>o[i]={class:Tt[i]}),Object.keys(t).forEach(i=>{o[i]!==void 0&&o[i]!==null&&(o[i].config=t[i])}),o):(e.forEach(i=>{const n=s[i];if(n&&(o[i]={class:Tt[i]},typeof n=="object")){const r=Object.assign({},s[i]);delete r.class,o[i]=Object.assign(o[i],r)}}),Object.keys(t).forEach(i=>{o[i]!==void 0&&o[i]!==null&&(o[i].config=t[i])}),o)}}}),Si=["id"];function Ci(s,t,e,o,i,n){return Pe(),Ne("div",{id:s.holder},null,8,Si)}const Ii=Le(Ei,[["render",Ci]]);export{Tt as PLUGINS,Ii as default}; diff --git a/public/build/assets/admin-app-0df052b8.js b/public/build/assets/admin-app-9fc1473b.js similarity index 92% rename from public/build/assets/admin-app-0df052b8.js rename to public/build/assets/admin-app-9fc1473b.js index 785019c..d6249e4 100644 --- a/public/build/assets/admin-app-0df052b8.js +++ b/public/build/assets/admin-app-9fc1473b.js @@ -14,4 +14,4 @@ import{P as of,c as af}from"./index-8746c87e.js";const qp="modulepreload",zp=fun * pinia v2.1.6 * (c) 2023 Eduardo San Martin Morote * @license MIT - */let Fp;const yo=t=>Fp=t,Lp=Symbol();function Va(t){return t&&typeof t=="object"&&Object.prototype.toString.call(t)==="[object Object]"&&typeof t.toJSON!="function"}var Ws;(function(t){t.direct="direct",t.patchObject="patch object",t.patchFunction="patch function"})(Ws||(Ws={}));function OS(){const t=ol(!0),e=t.run(()=>qt({}));let n=[],s=[];const r=br({install(i){yo(r),r._a=i,i.provide(Lp,r),i.config.globalProperties.$pinia=r,s.forEach(o=>n.push(o)),s=[]},use(i){return!this._a&&!wS?s.push(i):n.push(i),this},_p:n,_a:null,_e:t,_s:new Map,state:e});return r}const Mp=()=>{};function Qc(t,e,n,s=Mp){t.push(e);const r=()=>{const i=t.indexOf(e);i>-1&&(t.splice(i,1),s())};return!n&&al()&&ph(r),r}function Kn(t,...e){t.slice().forEach(n=>{n(...e)})}const kS=t=>t();function Ha(t,e){t instanceof Map&&e instanceof Map&&e.forEach((n,s)=>t.set(s,n)),t instanceof Set&&e instanceof Set&&e.forEach(t.add,t);for(const n in e){if(!e.hasOwnProperty(n))continue;const s=e[n],r=t[n];Va(r)&&Va(s)&&t.hasOwnProperty(n)&&!_e(s)&&!Dt(s)?t[n]=Ha(r,s):t[n]=s}return t}const NS=Symbol();function DS(t){return!Va(t)||!t.hasOwnProperty(NS)}const{assign:Ut}=Object;function PS(t){return!!(_e(t)&&t.effect)}function IS(t,e,n,s){const{state:r,actions:i,getters:o}=e,a=n.state.value[t];let l;function u(){a||(n.state.value[t]=r?r():{});const c=Nh(n.state.value[t]);return Ut(c,i,Object.keys(o||{}).reduce((f,m)=>(f[m]=br(Fl(()=>{yo(n);const E=n._s.get(t);return o[m].call(E,E)})),f),{}))}return l=Bp(t,u,e,n,s,!0),l}function Bp(t,e,n={},s,r,i){let o;const a=Ut({actions:{}},n),l={deep:!0};let u,c,f=[],m=[],E;const p=s.state.value[t];!i&&!p&&(s.state.value[t]={}),qt({});let h;function y(b){let w;u=c=!1,typeof b=="function"?(b(s.state.value[t]),w={type:Ws.patchFunction,storeId:t,events:E}):(Ha(s.state.value[t],b),w={type:Ws.patchObject,payload:b,storeId:t,events:E});const k=h=Symbol();eo().then(()=>{h===k&&(u=!0)}),c=!0,Kn(f,w,s.state.value[t])}const d=i?function(){const{state:w}=n,k=w?w():{};this.$patch(P=>{Ut(P,k)})}:Mp;function _(){o.stop(),f=[],m=[],s._s.delete(t)}function v(b,w){return function(){yo(s);const k=Array.from(arguments),P=[],N=[];function R(G){P.push(G)}function x(G){N.push(G)}Kn(m,{args:k,name:b,store:T,after:R,onError:x});let Z;try{Z=w.apply(this&&this.$id===t?this:T,k)}catch(G){throw Kn(N,G),G}return Z instanceof Promise?Z.then(G=>(Kn(P,G),G)).catch(G=>(Kn(N,G),Promise.reject(G))):(Kn(P,Z),Z)}}const g={_p:s,$id:t,$onAction:Qc.bind(null,m),$patch:y,$reset:d,$subscribe(b,w={}){const k=Qc(f,b,w.detached,()=>P()),P=o.run(()=>zt(()=>s.state.value[t],N=>{(w.flush==="sync"?c:u)&&b({storeId:t,type:Ws.direct,events:E},N)},Ut({},l,w)));return k},$dispose:_},T=vt(g);s._s.set(t,T);const O=s._a&&s._a.runWithContext||kS,S=s._e.run(()=>(o=ol(),O(()=>o.run(e))));for(const b in S){const w=S[b];if(_e(w)&&!PS(w)||Dt(w))i||(p&&DS(w)&&(_e(w)?w.value=p[b]:Ha(w,p[b])),s.state.value[t][b]=w);else if(typeof w=="function"){const k=v(b,w);S[b]=k,a.actions[b]=w}}return Ut(T,S),Ut(se(T),S),Object.defineProperty(T,"$state",{get:()=>s.state.value[t],set:b=>{y(w=>{Ut(w,b)})}}),s._p.forEach(b=>{Ut(T,o.run(()=>b({store:T,app:s._a,pinia:s,options:a})))}),p&&i&&n.hydrate&&n.hydrate(T.$state,p),u=!0,c=!0,T}function xp(t,e,n){let s,r;const i=typeof e=="function";typeof t=="string"?(s=t,r=i?n:e):(r=t,s=t.id);function o(a,l){const u=rd();return a=a||(u?ss(Lp,null):null),a&&yo(a),a=Fp,a._s.has(s)||(i?Bp(s,e,r,a):IS(s,r,a)),a._s.get(s)}return o.$id=s,o}function tw(t,e){return Array.isArray(e)?e.reduce((n,s)=>(n[s]=function(){return t(this.$pinia)[s]},n),{}):Object.keys(e).reduce((n,s)=>(n[s]=function(){const r=t(this.$pinia),i=e[s];return typeof i=="function"?i.call(this,r):r[i]},n),{})}function nw(t,e){return Array.isArray(e)?e.reduce((n,s)=>(n[s]=function(...r){return t(this.$pinia)[s](...r)},n),{}):Object.keys(e).reduce((n,s)=>(n[s]=function(...r){return t(this.$pinia)[e[s]](...r)},n),{})}const $p=xp("error",{state:()=>({message:null,errors:{}})});/*! js-cookie v3.0.5 | MIT */function Xr(t){for(var e=1;e"u")){o=Xr({},e,o),typeof o.expires=="number"&&(o.expires=new Date(Date.now()+o.expires*864e5)),o.expires&&(o.expires=o.expires.toUTCString()),r=encodeURIComponent(r).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var a="";for(var l in o)o[l]&&(a+="; "+l,o[l]!==!0&&(a+="="+o[l].split(";")[0]));return document.cookie=r+"="+t.write(i,r)+a}}function s(r){if(!(typeof document>"u"||arguments.length&&!r)){for(var i=document.cookie?document.cookie.split("; "):[],o={},a=0;aqe.get("/sanctum/csrf-cookie");qe.interceptors.request.use(function(t){return $p().$reset(),Ua.get("XSRF-TOKEN")?t:FS().then(e=>t)},function(t){return Promise.reject(t)});qe.interceptors.response.use(function(t){var e,n,s,r,i,o;return(((s=(n=(e=t==null?void 0:t.data)==null?void 0:e.data)==null?void 0:n.csrf_token)==null?void 0:s.length)>0||((o=(i=(r=t==null?void 0:t.data)==null?void 0:r.data)==null?void 0:i.token)==null?void 0:o.length)>0)&&Ua.set("XSRF-TOKEN",t.data.data.csrf_token),t},function(t){switch(t.response.status){case 401:localStorage.removeItem("token"),window.location.reload();break;case 403:case 404:console.error("404");break;case 422:$p().$state=t.response.data;break;default:console.log(t.response.data)}return Promise.reject(t)});function Mi(t){return Mi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Mi(t)}function ci(t,e){if(!t.vueAxiosInstalled){var n=Vp(e)?BS(e):e;if(xS(n)){var s=$S(t);if(s){var r=s<3?LS:MS;Object.keys(n).forEach(function(i){r(t,i,n[i])}),t.vueAxiosInstalled=!0}else console.error("[vue-axios] unknown Vue version")}else console.error("[vue-axios] configuration is invalid, expected options are either or { : }")}}function LS(t,e,n){Object.defineProperty(t.prototype,e,{get:function(){return n}}),t[e]=n}function MS(t,e,n){t.config.globalProperties[e]=n,t[e]=n}function Vp(t){return t&&typeof t.get=="function"&&typeof t.post=="function"}function BS(t){return{axios:t,$http:t}}function xS(t){return Mi(t)==="object"&&Object.keys(t).every(function(e){return Vp(t[e])})}function $S(t){return t&&t.version&&Number(t.version.split(".")[0])}(typeof exports>"u"?"undefined":Mi(exports))=="object"?module.exports=ci:typeof define=="function"&&define.amd?define([],function(){return ci}):window.Vue&&window.axios&&window.Vue.use&&Vue.use(ci,window.axios);const Zo=xp("auth",{state:()=>({loggedIn:!!localStorage.getItem("token"),user:null}),getters:{},actions:{async login(t){await qe.get("sanctum/csrf-cookie");const e=(await qe.post("api/login",t)).data;if(e){const n=`Bearer ${e.token}`;localStorage.setItem("token",n),qe.defaults.headers.common.Authorization=n,await this.ftechUser()}},async logout(){(await qe.post("api/logout")).data&&(localStorage.removeItem("token"),this.$reset())},async ftechUser(){this.user=(await qe.get("api/me")).data,this.loggedIn=!0}}}),VS={install:({config:t})=>{t.globalProperties.$auth=Zo(),Zo().loggedIn&&Zo().ftechUser()}};function HS(t){return{all:t=t||new Map,on:function(e,n){var s=t.get(e);s?s.push(n):t.set(e,[n])},off:function(e,n){var s=t.get(e);s&&(n?s.splice(s.indexOf(n)>>>0,1):t.set(e,[]))},emit:function(e,n){var s=t.get(e);s&&s.slice().map(function(r){r(n)}),(s=t.get("*"))&&s.slice().map(function(r){r(e,n)})}}}const jS={install:(t,e)=>{t.config.globalProperties.$eventBus=HS()}},Hp={TOP_LEFT:"top-left",TOP_RIGHT:"top-right",TOP_CENTER:"top-center",BOTTOM_LEFT:"bottom-left",BOTTOM_RIGHT:"bottom-right",BOTTOM_CENTER:"bottom-center"},Bi={LIGHT:"light",DARK:"dark",COLORED:"colored",AUTO:"auto"},su={INFO:"info",SUCCESS:"success",WARNING:"warning",ERROR:"error",DEFAULT:"default"},jp={dangerouslyHTMLString:!1,multiple:!0,position:Hp.TOP_RIGHT,autoClose:5e3,transition:"bounce",hideProgressBar:!1,pauseOnHover:!0,pauseOnFocusLoss:!0,closeOnClick:!0,className:"",bodyClassName:"",style:{},progressClassName:"",progressStyle:{},role:"alert",theme:"light"},US={rtl:!1,newestOnTop:!1,toastClassName:""},KS={...jp,...US};({...jp,type:su.DEFAULT});var xi=(t=>(t[t.COLLAPSE_DURATION=300]="COLLAPSE_DURATION",t[t.DEBOUNCE_DURATION=50]="DEBOUNCE_DURATION",t.CSS_NAMESPACE="Toastify",t))(xi||{});vt({});vt({});vt({items:[]});const WS=vt({});vt({});function qS(...t){return Il(...t)}function zS(t={}){WS[`${xi.CSS_NAMESPACE}-default-options`]=t}Hp.TOP_LEFT,Bi.AUTO,su.DEFAULT;su.DEFAULT,Bi.AUTO;Bi.AUTO,Bi.LIGHT;const Up={install(t,e={}){YS(e)}};typeof window<"u"&&(window.Vue3Toastify=Up);function YS(t={}){const e=qS(KS,t);zS(e)}const ru={url:"https://productalert.test",port:null,defaults:{},routes:{"debugbar.openhandler":{uri:"_debugbar/open",methods:["GET","HEAD"]},"debugbar.clockwork":{uri:"_debugbar/clockwork/{id}",methods:["GET","HEAD"]},"debugbar.assets.css":{uri:"_debugbar/assets/stylesheets",methods:["GET","HEAD"]},"debugbar.assets.js":{uri:"_debugbar/assets/javascript",methods:["GET","HEAD"]},"debugbar.cache.delete":{uri:"_debugbar/cache/{key}/{tags?}",methods:["DELETE"]},"sanctum.csrf-cookie":{uri:"sanctum/csrf-cookie",methods:["GET","HEAD"]},"ignition.healthCheck":{uri:"_ignition/health-check",methods:["GET","HEAD"]},"ignition.executeSolution":{uri:"_ignition/execute-solution",methods:["POST"]},"ignition.updateConfig":{uri:"_ignition/update-config",methods:["POST"]},"api.auth.login.post":{uri:"api/login",methods:["POST"]},"api.auth.logout.post":{uri:"api/logout",methods:["POST"]},"api.admin.post.get":{uri:"api/admin/post/{id}",methods:["GET","HEAD"]},"api.admin.country-locales":{uri:"api/admin/country-locales",methods:["GET","HEAD"]},"api.admin.categories":{uri:"api/admin/categories/{country_locale_slug}",methods:["GET","HEAD"]},"api.admin.authors":{uri:"api/admin/authors",methods:["GET","HEAD"]},"api.admin.upload.cloud.image":{uri:"api/admin/image/upload",methods:["POST"]},"api.admin.post.upsert":{uri:"api/admin/admin/post/upsert",methods:["POST"]},login:{uri:"login",methods:["GET","HEAD"]},logout:{uri:"logout",methods:["POST"]},register:{uri:"register",methods:["GET","HEAD"]},"password.request":{uri:"password/reset",methods:["GET","HEAD"]},"password.email":{uri:"password/email",methods:["POST"]},"password.reset":{uri:"password/reset/{token}",methods:["GET","HEAD"]},"password.update":{uri:"password/reset",methods:["POST"]},"password.confirm":{uri:"password/confirm",methods:["GET","HEAD"]},dashboard:{uri:"admin",methods:["GET","HEAD"]},about:{uri:"admin/about",methods:["GET","HEAD"]},"users.index":{uri:"admin/users",methods:["GET","HEAD"]},"posts.manage":{uri:"admin/posts",methods:["GET","HEAD"]},"posts.manage.edit":{uri:"admin/posts/edit/{post_id}",methods:["GET","HEAD"]},"posts.manage.new":{uri:"admin/posts/new",methods:["GET","HEAD"]},"profile.show":{uri:"admin/profile",methods:["GET","HEAD"]},"profile.update":{uri:"admin/profile",methods:["PUT"]},home:{uri:"/",methods:["GET","HEAD"]},"home.country":{uri:"{country}",methods:["GET","HEAD"]},"home.country.posts":{uri:"{country}/posts",methods:["GET","HEAD"]},"home.country.post":{uri:"{country}/posts/{post_slug}",methods:["GET","HEAD"]},"home.country.category":{uri:"{country}/{category}",methods:["GET","HEAD"]}}};typeof window<"u"&&typeof window.Ziggy<"u"&&Object.assign(ru.routes,window.Ziggy.routes);var GS=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function sw(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Ka={exports:{}},Qo,ef;function iu(){if(ef)return Qo;ef=1;var t=String.prototype.replace,e=/%20/g,n={RFC1738:"RFC1738",RFC3986:"RFC3986"};return Qo={default:n.RFC3986,formatters:{RFC1738:function(s){return t.call(s,e,"+")},RFC3986:function(s){return String(s)}},RFC1738:n.RFC1738,RFC3986:n.RFC3986},Qo}var ea,tf;function Kp(){if(tf)return ea;tf=1;var t=iu(),e=Object.prototype.hasOwnProperty,n=Array.isArray,s=function(){for(var h=[],y=0;y<256;++y)h.push("%"+((y<16?"0":"")+y.toString(16)).toUpperCase());return h}(),r=function(y){for(;y.length>1;){var d=y.pop(),_=d.obj[d.prop];if(n(_)){for(var v=[],g=0;g<_.length;++g)typeof _[g]<"u"&&v.push(_[g]);d.obj[d.prop]=v}}},i=function(y,d){for(var _=d&&d.plainObjects?Object.create(null):{},v=0;v=48&&b<=57||b>=65&&b<=90||b>=97&&b<=122||g===t.RFC1738&&(b===40||b===41)){O+=T.charAt(S);continue}if(b<128){O=O+s[b];continue}if(b<2048){O=O+(s[192|b>>6]+s[128|b&63]);continue}if(b<55296||b>=57344){O=O+(s[224|b>>12]+s[128|b>>6&63]+s[128|b&63]);continue}S+=1,b=65536+((b&1023)<<10|T.charCodeAt(S)&1023),O+=s[240|b>>18]+s[128|b>>12&63]+s[128|b>>6&63]+s[128|b&63]}return O},c=function(y){for(var d=[{obj:{o:y},prop:"o"}],_=[],v=0;v"u")return oe;var Oe;if(d==="comma"&&r(R))Oe=[{value:R.length>0?R.join(",")||null:void 0}];else if(r(T))Oe=T;else{var cn=Object.keys(R);Oe=O?cn.sort(O):cn}for(var ut=0;ut"u"?c.allowDots:!!h.allowDots,charset:y,charsetSentinel:typeof h.charsetSentinel=="boolean"?h.charsetSentinel:c.charsetSentinel,delimiter:typeof h.delimiter>"u"?c.delimiter:h.delimiter,encode:typeof h.encode=="boolean"?h.encode:c.encode,encoder:typeof h.encoder=="function"?h.encoder:c.encoder,encodeValuesOnly:typeof h.encodeValuesOnly=="boolean"?h.encodeValuesOnly:c.encodeValuesOnly,filter:v,format:d,formatter:_,serializeDate:typeof h.serializeDate=="function"?h.serializeDate:c.serializeDate,skipNulls:typeof h.skipNulls=="boolean"?h.skipNulls:c.skipNulls,sort:typeof h.sort=="function"?h.sort:null,strictNullHandling:typeof h.strictNullHandling=="boolean"?h.strictNullHandling:c.strictNullHandling}};return ta=function(p,h){var y=p,d=E(h),_,v;typeof d.filter=="function"?(v=d.filter,y=v("",y)):r(d.filter)&&(v=d.filter,_=v);var g=[];if(typeof y!="object"||y===null)return"";var T;h&&h.arrayFormat in s?T=h.arrayFormat:h&&"indices"in h?T=h.indices?"indices":"repeat":T="indices";var O=s[T];_||(_=Object.keys(y)),d.sort&&_.sort(d.sort);for(var S=0;S<_.length;++S){var b=_[S];d.skipNulls&&y[b]===null||a(g,m(y[b],b,O,d.strictNullHandling,d.skipNulls,d.encode?d.encoder:null,d.filter,d.sort,d.allowDots,d.serializeDate,d.format,d.formatter,d.encodeValuesOnly,d.charset))}var w=g.join(d.delimiter),k=d.addQueryPrefix===!0?"?":"";return d.charsetSentinel&&(d.charset==="iso-8859-1"?k+="utf8=%26%2310003%3B&":k+="utf8=%E2%9C%93&"),w.length>0?k+w:""},ta}var na,sf;function XS(){if(sf)return na;sf=1;var t=Kp(),e=Object.prototype.hasOwnProperty,n=Array.isArray,s={allowDots:!1,allowPrototypes:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:t.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},r=function(m){return m.replace(/&#(\d+);/g,function(E,p){return String.fromCharCode(parseInt(p,10))})},i=function(m,E){return m&&typeof m=="string"&&E.comma&&m.indexOf(",")>-1?m.split(","):m},o="utf8=%26%2310003%3B",a="utf8=%E2%9C%93",l=function(E,p){var h={},y=p.ignoreQueryPrefix?E.replace(/^\?/,""):E,d=p.parameterLimit===1/0?void 0:p.parameterLimit,_=y.split(p.delimiter,d),v=-1,g,T=p.charset;if(p.charsetSentinel)for(g=0;g<_.length;++g)_[g].indexOf("utf8=")===0&&(_[g]===a?T="utf-8":_[g]===o&&(T="iso-8859-1"),v=g,g=_.length);for(g=0;g<_.length;++g)if(g!==v){var O=_[g],S=O.indexOf("]="),b=S===-1?O.indexOf("="):S+1,w,k;b===-1?(w=p.decoder(O,s.decoder,T,"key"),k=p.strictNullHandling?null:""):(w=p.decoder(O.slice(0,b),s.decoder,T,"key"),k=t.maybeMap(i(O.slice(b+1),p),function(P){return p.decoder(P,s.decoder,T,"value")})),k&&p.interpretNumericEntities&&T==="iso-8859-1"&&(k=r(k)),O.indexOf("[]=")>-1&&(k=n(k)?[k]:k),e.call(h,w)?h[w]=t.combine(h[w],k):h[w]=k}return h},u=function(m,E,p,h){for(var y=h?E:i(E,p),d=m.length-1;d>=0;--d){var _,v=m[d];if(v==="[]"&&p.parseArrays)_=[].concat(y);else{_=p.plainObjects?Object.create(null):{};var g=v.charAt(0)==="["&&v.charAt(v.length-1)==="]"?v.slice(1,-1):v,T=parseInt(g,10);!p.parseArrays&&g===""?_={0:y}:!isNaN(T)&&v!==g&&String(T)===g&&T>=0&&p.parseArrays&&T<=p.arrayLimit?(_=[],_[T]=y):g!=="__proto__"&&(_[g]=y)}y=_}return y},c=function(E,p,h,y){if(E){var d=h.allowDots?E.replace(/\.([^.[]+)/g,"[$1]"):E,_=/(\[[^[\]]*])/,v=/(\[[^[\]]*])/g,g=h.depth>0&&_.exec(d),T=g?d.slice(0,g.index):d,O=[];if(T){if(!h.plainObjects&&e.call(Object.prototype,T)&&!h.allowPrototypes)return;O.push(T)}for(var S=0;h.depth>0&&(g=v.exec(d))!==null&&S"u"?s.charset:E.charset;return{allowDots:typeof E.allowDots>"u"?s.allowDots:!!E.allowDots,allowPrototypes:typeof E.allowPrototypes=="boolean"?E.allowPrototypes:s.allowPrototypes,arrayLimit:typeof E.arrayLimit=="number"?E.arrayLimit:s.arrayLimit,charset:p,charsetSentinel:typeof E.charsetSentinel=="boolean"?E.charsetSentinel:s.charsetSentinel,comma:typeof E.comma=="boolean"?E.comma:s.comma,decoder:typeof E.decoder=="function"?E.decoder:s.decoder,delimiter:typeof E.delimiter=="string"||t.isRegExp(E.delimiter)?E.delimiter:s.delimiter,depth:typeof E.depth=="number"||E.depth===!1?+E.depth:s.depth,ignoreQueryPrefix:E.ignoreQueryPrefix===!0,interpretNumericEntities:typeof E.interpretNumericEntities=="boolean"?E.interpretNumericEntities:s.interpretNumericEntities,parameterLimit:typeof E.parameterLimit=="number"?E.parameterLimit:s.parameterLimit,parseArrays:E.parseArrays!==!1,plainObjects:typeof E.plainObjects=="boolean"?E.plainObjects:s.plainObjects,strictNullHandling:typeof E.strictNullHandling=="boolean"?E.strictNullHandling:s.strictNullHandling}};return na=function(m,E){var p=f(E);if(m===""||m===null||typeof m>"u")return p.plainObjects?Object.create(null):{};for(var h=typeof m=="string"?l(m,p):m,y=p.plainObjects?Object.create(null):{},d=Object.keys(h),_=0;_"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function c(p,h,y){return c=u()?Reflect.construct.bind():function(d,_,v){var g=[null];g.push.apply(g,_);var T=new(Function.bind.apply(d,g));return v&&l(T,v.prototype),T},c.apply(null,arguments)}function f(p){var h=typeof Map=="function"?new Map:void 0;return f=function(y){if(y===null||Function.toString.call(y).indexOf("[native code]")===-1)return y;if(typeof y!="function")throw new TypeError("Super expression must either be null or a function");if(h!==void 0){if(h.has(y))return h.get(y);h.set(y,d)}function d(){return c(y,arguments,a(this).constructor)}return d.prototype=Object.create(y.prototype,{constructor:{value:d,enumerable:!1,writable:!0,configurable:!0}}),l(d,y)},f(p)}var m=function(){function p(y,d,_){var v,g;this.name=y,this.definition=d,this.bindings=(v=d.bindings)!=null?v:{},this.wheres=(g=d.wheres)!=null?g:{},this.config=_}var h=p.prototype;return h.matchesUrl=function(y){var d=this;if(!this.definition.methods.includes("GET"))return!1;var _=this.template.replace(/(\/?){([^}?]*)(\??)}/g,function(b,w,k,P){var N,R="(?<"+k+">"+(((N=d.wheres[k])==null?void 0:N.replace(/(^\^)|(\$$)/g,""))||"[^/?]+")+")";return P?"("+w+R+")?":""+w+R}).replace(/^\w+:\/\//,""),v=y.replace(/^\w+:\/\//,"").split("?"),g=v[0],T=v[1],O=new RegExp("^"+_+"/?$").exec(g);if(O){for(var S in O.groups)O.groups[S]=typeof O.groups[S]=="string"?decodeURIComponent(O.groups[S]):O.groups[S];return{params:O.groups,query:s.parse(T)}}return!1},h.compile=function(y){var d=this,_=this.parameterSegments;return _.length?this.template.replace(/{([^}?]+)(\??)}/g,function(v,g,T){var O,S,b;if(!T&&[null,void 0].includes(y[g]))throw new Error("Ziggy error: '"+g+"' parameter is required for route '"+d.name+"'.");if(_[_.length-1].name===g&&d.wheres[g]===".*")return encodeURIComponent((b=y[g])!=null?b:"").replace(/%2F/g,"/");if(d.wheres[g]&&!new RegExp("^"+(T?"("+d.wheres[g]+")?":d.wheres[g])+"$").test((O=y[g])!=null?O:""))throw new Error("Ziggy error: '"+g+"' parameter does not match required format '"+d.wheres[g]+"' for route '"+d.name+"'.");return encodeURIComponent((S=y[g])!=null?S:"")}).replace(this.origin+"//",this.origin+"/").replace(/\/+$/,""):this.template},i(p,[{key:"template",get:function(){return(this.origin+"/"+this.definition.uri).replace(/\/+$/,"")}},{key:"origin",get:function(){return this.config.absolute?this.definition.domain?""+this.config.url.match(/^\w+:\/\//)[0]+this.definition.domain+(this.config.port?":"+this.config.port:""):this.config.url:""}},{key:"parameterSegments",get:function(){var y,d;return(y=(d=this.template.match(/{[^}?]+\??}/g))==null?void 0:d.map(function(_){return{name:_.replace(/{|\??}/g,""),required:!/\?}$/.test(_)}}))!=null?y:[]}}]),p}(),E=function(p){var h,y;function d(v,g,T,O){var S;if(T===void 0&&(T=!0),(S=p.call(this)||this).t=O??(typeof Ziggy<"u"?Ziggy:globalThis==null?void 0:globalThis.Ziggy),S.t=o({},S.t,{absolute:T}),v){if(!S.t.routes[v])throw new Error("Ziggy error: route '"+v+"' is not in the route list.");S.i=new m(v,S.t.routes[v],S.t),S.u=S.o(g)}return S}y=p,(h=d).prototype=Object.create(y.prototype),h.prototype.constructor=h,l(h,y);var _=d.prototype;return _.toString=function(){var v=this,g=Object.keys(this.u).filter(function(T){return!v.i.parameterSegments.some(function(O){return O.name===T})}).filter(function(T){return T!=="_query"}).reduce(function(T,O){var S;return o({},T,((S={})[O]=v.u[O],S))},{});return this.i.compile(this.u)+s.stringify(o({},g,this.u._query),{addQueryPrefix:!0,arrayFormat:"indices",encodeValuesOnly:!0,skipNulls:!0,encoder:function(T,O){return typeof T=="boolean"?Number(T):O(T)}})},_.l=function(v){var g=this;v?this.t.absolute&&v.startsWith("/")&&(v=this.h().host+v):v=this.v();var T={},O=Object.entries(this.t.routes).find(function(S){return T=new m(S[0],S[1],g.t).matchesUrl(v)})||[void 0,void 0];return o({name:O[0]},T,{route:O[1]})},_.v=function(){var v=this.h(),g=v.pathname,T=v.search;return(this.t.absolute?v.host+g:g.replace(this.t.url.replace(/^\w*:\/\/[^/]+/,""),"").replace(/^\/+/,"/"))+T},_.current=function(v,g){var T=this.l(),O=T.name,S=T.params,b=T.query,w=T.route;if(!v)return O;var k=new RegExp("^"+v.replace(/\./g,"\\.").replace(/\*/g,".*")+"$").test(O);if([null,void 0].includes(g)||!k)return k;var P=new m(O,w,this.t);g=this.o(g,P);var N=o({},S,b);return!(!Object.values(g).every(function(R){return!R})||Object.values(N).some(function(R){return R!==void 0}))||Object.entries(g).every(function(R){return N[R[0]]==R[1]})},_.h=function(){var v,g,T,O,S,b,w=typeof window<"u"?window.location:{},k=w.host,P=w.pathname,N=w.search;return{host:(v=(g=this.t.location)==null?void 0:g.host)!=null?v:k===void 0?"":k,pathname:(T=(O=this.t.location)==null?void 0:O.pathname)!=null?T:P===void 0?"":P,search:(S=(b=this.t.location)==null?void 0:b.search)!=null?S:N===void 0?"":N}},_.has=function(v){return Object.keys(this.t.routes).includes(v)},_.o=function(v,g){var T=this;v===void 0&&(v={}),g===void 0&&(g=this.i),v!=null||(v={}),v=["string","number"].includes(typeof v)?[v]:v;var O=g.parameterSegments.filter(function(b){return!T.t.defaults[b.name]});if(Array.isArray(v))v=v.reduce(function(b,w,k){var P,N;return o({},b,O[k]?((P={})[O[k].name]=w,P):typeof w=="object"?w:((N={})[w]="",N))},{});else if(O.length===1&&!v[O[0].name]&&(v.hasOwnProperty(Object.values(g.bindings)[0])||v.hasOwnProperty("id"))){var S;(S={})[O[0].name]=v,v=S}return o({},this.p(g),this.g(v,g))},_.p=function(v){var g=this;return v.parameterSegments.filter(function(T){return g.t.defaults[T.name]}).reduce(function(T,O,S){var b,w=O.name;return o({},T,((b={})[w]=g.t.defaults[w],b))},{})},_.g=function(v,g){var T=g.bindings,O=g.parameterSegments;return Object.entries(v).reduce(function(S,b){var w,k,P=b[0],N=b[1];if(!N||typeof N!="object"||Array.isArray(N)||!O.some(function(R){return R.name===P}))return o({},S,((k={})[P]=N,k));if(!N.hasOwnProperty(T[P])){if(!N.hasOwnProperty("id"))throw new Error("Ziggy error: object passed as '"+P+"' parameter is missing route model binding key '"+T[P]+"'.");T[P]="id"}return o({},S,((w={})[P]=N[T[P]],w))},{})},_.valueOf=function(){return this.toString()},_.check=function(v){return this.has(v)},i(d,[{key:"params",get:function(){var v=this.l();return o({},v.params,v.query)}}]),d}(f(String));n.ZiggyVue={install:function(p,h){var y=function(d,_,v,g){return g===void 0&&(g=h),function(T,O,S,b){var w=new E(T,O,S,b);return T?w.toString():w}(d,_,v,g)};p.mixin({methods:{route:y}}),parseInt(p.version)>2&&p.provide("route",y)}}})})(Ka,Ka.exports);var QS=Ka.exports;const un=zd({AdminApp:Rp}),Wp=Object.assign({"/resources/js/vue/AdminApp.vue":()=>Dr(()=>Promise.resolve().then(()=>SS),void 0),"/resources/js/vue/NativeImageBlock.vue":()=>Dr(()=>import("./NativeImageBlock-bcbff98b.js").then(t=>t.N),["assets/NativeImageBlock-bcbff98b.js","assets/NativeImageBlock-e3b0c442.css"]),"/resources/js/vue/PostEditor.vue":()=>Dr(()=>import("./PostEditor-a6038129.js"),["assets/PostEditor-a6038129.js","assets/VueEditorJs-6310d292.js","assets/index-8746c87e.js","assets/NativeImageBlock-bcbff98b.js","assets/NativeImageBlock-e3b0c442.css","assets/bundle-43b5b4d7.js","assets/bundle-94bef551.js"]),"/resources/js/vue/VueEditorJs.vue":()=>Dr(()=>import("./VueEditorJs-6310d292.js"),["assets/VueEditorJs-6310d292.js","assets/index-8746c87e.js"])});console.log(Wp);un.use(OS());un.use(ci,qe);un.use(VS);un.use(jS);un.use(Up);un.use(QS.ZiggyVue,ru);window.Ziggy=ru;Object.entries({...Wp}).forEach(([t,e])=>{const n=t.split("/").pop().replace(/\.\w+$/,"").replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();un.component(n,jh(e))});un.mount("#app");export{sw as A,Ne as F,AS as _,qe as a,nw as b,md as c,xp as d,Nl as e,de as f,PA as g,Ml as h,DA as i,Bl as j,Dl as k,ZS as l,tw as m,Er as n,Cr as o,_r as p,yv as q,Wv as r,bv as s,A0 as t,Dr as u,Ci as v,Mv as w,io as x,vt as y,Tr as z}; + */let Fp;const yo=t=>Fp=t,Lp=Symbol();function Va(t){return t&&typeof t=="object"&&Object.prototype.toString.call(t)==="[object Object]"&&typeof t.toJSON!="function"}var Ws;(function(t){t.direct="direct",t.patchObject="patch object",t.patchFunction="patch function"})(Ws||(Ws={}));function OS(){const t=ol(!0),e=t.run(()=>qt({}));let n=[],s=[];const r=br({install(i){yo(r),r._a=i,i.provide(Lp,r),i.config.globalProperties.$pinia=r,s.forEach(o=>n.push(o)),s=[]},use(i){return!this._a&&!wS?s.push(i):n.push(i),this},_p:n,_a:null,_e:t,_s:new Map,state:e});return r}const Mp=()=>{};function Qc(t,e,n,s=Mp){t.push(e);const r=()=>{const i=t.indexOf(e);i>-1&&(t.splice(i,1),s())};return!n&&al()&&ph(r),r}function Kn(t,...e){t.slice().forEach(n=>{n(...e)})}const kS=t=>t();function Ha(t,e){t instanceof Map&&e instanceof Map&&e.forEach((n,s)=>t.set(s,n)),t instanceof Set&&e instanceof Set&&e.forEach(t.add,t);for(const n in e){if(!e.hasOwnProperty(n))continue;const s=e[n],r=t[n];Va(r)&&Va(s)&&t.hasOwnProperty(n)&&!_e(s)&&!Dt(s)?t[n]=Ha(r,s):t[n]=s}return t}const NS=Symbol();function DS(t){return!Va(t)||!t.hasOwnProperty(NS)}const{assign:Ut}=Object;function PS(t){return!!(_e(t)&&t.effect)}function IS(t,e,n,s){const{state:r,actions:i,getters:o}=e,a=n.state.value[t];let l;function u(){a||(n.state.value[t]=r?r():{});const c=Nh(n.state.value[t]);return Ut(c,i,Object.keys(o||{}).reduce((f,m)=>(f[m]=br(Fl(()=>{yo(n);const E=n._s.get(t);return o[m].call(E,E)})),f),{}))}return l=Bp(t,u,e,n,s,!0),l}function Bp(t,e,n={},s,r,i){let o;const a=Ut({actions:{}},n),l={deep:!0};let u,c,f=[],m=[],E;const p=s.state.value[t];!i&&!p&&(s.state.value[t]={}),qt({});let h;function y(b){let w;u=c=!1,typeof b=="function"?(b(s.state.value[t]),w={type:Ws.patchFunction,storeId:t,events:E}):(Ha(s.state.value[t],b),w={type:Ws.patchObject,payload:b,storeId:t,events:E});const k=h=Symbol();eo().then(()=>{h===k&&(u=!0)}),c=!0,Kn(f,w,s.state.value[t])}const d=i?function(){const{state:w}=n,k=w?w():{};this.$patch(P=>{Ut(P,k)})}:Mp;function _(){o.stop(),f=[],m=[],s._s.delete(t)}function v(b,w){return function(){yo(s);const k=Array.from(arguments),P=[],N=[];function R(G){P.push(G)}function x(G){N.push(G)}Kn(m,{args:k,name:b,store:T,after:R,onError:x});let Z;try{Z=w.apply(this&&this.$id===t?this:T,k)}catch(G){throw Kn(N,G),G}return Z instanceof Promise?Z.then(G=>(Kn(P,G),G)).catch(G=>(Kn(N,G),Promise.reject(G))):(Kn(P,Z),Z)}}const g={_p:s,$id:t,$onAction:Qc.bind(null,m),$patch:y,$reset:d,$subscribe(b,w={}){const k=Qc(f,b,w.detached,()=>P()),P=o.run(()=>zt(()=>s.state.value[t],N=>{(w.flush==="sync"?c:u)&&b({storeId:t,type:Ws.direct,events:E},N)},Ut({},l,w)));return k},$dispose:_},T=vt(g);s._s.set(t,T);const O=s._a&&s._a.runWithContext||kS,S=s._e.run(()=>(o=ol(),O(()=>o.run(e))));for(const b in S){const w=S[b];if(_e(w)&&!PS(w)||Dt(w))i||(p&&DS(w)&&(_e(w)?w.value=p[b]:Ha(w,p[b])),s.state.value[t][b]=w);else if(typeof w=="function"){const k=v(b,w);S[b]=k,a.actions[b]=w}}return Ut(T,S),Ut(se(T),S),Object.defineProperty(T,"$state",{get:()=>s.state.value[t],set:b=>{y(w=>{Ut(w,b)})}}),s._p.forEach(b=>{Ut(T,o.run(()=>b({store:T,app:s._a,pinia:s,options:a})))}),p&&i&&n.hydrate&&n.hydrate(T.$state,p),u=!0,c=!0,T}function xp(t,e,n){let s,r;const i=typeof e=="function";typeof t=="string"?(s=t,r=i?n:e):(r=t,s=t.id);function o(a,l){const u=rd();return a=a||(u?ss(Lp,null):null),a&&yo(a),a=Fp,a._s.has(s)||(i?Bp(s,e,r,a):IS(s,r,a)),a._s.get(s)}return o.$id=s,o}function tw(t,e){return Array.isArray(e)?e.reduce((n,s)=>(n[s]=function(){return t(this.$pinia)[s]},n),{}):Object.keys(e).reduce((n,s)=>(n[s]=function(){const r=t(this.$pinia),i=e[s];return typeof i=="function"?i.call(this,r):r[i]},n),{})}function nw(t,e){return Array.isArray(e)?e.reduce((n,s)=>(n[s]=function(...r){return t(this.$pinia)[s](...r)},n),{}):Object.keys(e).reduce((n,s)=>(n[s]=function(...r){return t(this.$pinia)[e[s]](...r)},n),{})}const $p=xp("error",{state:()=>({message:null,errors:{}})});/*! js-cookie v3.0.5 | MIT */function Xr(t){for(var e=1;e"u")){o=Xr({},e,o),typeof o.expires=="number"&&(o.expires=new Date(Date.now()+o.expires*864e5)),o.expires&&(o.expires=o.expires.toUTCString()),r=encodeURIComponent(r).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var a="";for(var l in o)o[l]&&(a+="; "+l,o[l]!==!0&&(a+="="+o[l].split(";")[0]));return document.cookie=r+"="+t.write(i,r)+a}}function s(r){if(!(typeof document>"u"||arguments.length&&!r)){for(var i=document.cookie?document.cookie.split("; "):[],o={},a=0;aqe.get("/sanctum/csrf-cookie");qe.interceptors.request.use(function(t){return $p().$reset(),Ua.get("XSRF-TOKEN")?t:FS().then(e=>t)},function(t){return Promise.reject(t)});qe.interceptors.response.use(function(t){var e,n,s,r,i,o;return(((s=(n=(e=t==null?void 0:t.data)==null?void 0:e.data)==null?void 0:n.csrf_token)==null?void 0:s.length)>0||((o=(i=(r=t==null?void 0:t.data)==null?void 0:r.data)==null?void 0:i.token)==null?void 0:o.length)>0)&&Ua.set("XSRF-TOKEN",t.data.data.csrf_token),t},function(t){switch(t.response.status){case 401:localStorage.removeItem("token"),window.location.reload();break;case 403:case 404:console.error("404");break;case 422:$p().$state=t.response.data;break;default:console.log(t.response.data)}return Promise.reject(t)});function Mi(t){return Mi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Mi(t)}function ci(t,e){if(!t.vueAxiosInstalled){var n=Vp(e)?BS(e):e;if(xS(n)){var s=$S(t);if(s){var r=s<3?LS:MS;Object.keys(n).forEach(function(i){r(t,i,n[i])}),t.vueAxiosInstalled=!0}else console.error("[vue-axios] unknown Vue version")}else console.error("[vue-axios] configuration is invalid, expected options are either or { : }")}}function LS(t,e,n){Object.defineProperty(t.prototype,e,{get:function(){return n}}),t[e]=n}function MS(t,e,n){t.config.globalProperties[e]=n,t[e]=n}function Vp(t){return t&&typeof t.get=="function"&&typeof t.post=="function"}function BS(t){return{axios:t,$http:t}}function xS(t){return Mi(t)==="object"&&Object.keys(t).every(function(e){return Vp(t[e])})}function $S(t){return t&&t.version&&Number(t.version.split(".")[0])}(typeof exports>"u"?"undefined":Mi(exports))=="object"?module.exports=ci:typeof define=="function"&&define.amd?define([],function(){return ci}):window.Vue&&window.axios&&window.Vue.use&&Vue.use(ci,window.axios);const Zo=xp("auth",{state:()=>({loggedIn:!!localStorage.getItem("token"),user:null}),getters:{},actions:{async login(t){await qe.get("sanctum/csrf-cookie");const e=(await qe.post("api/login",t)).data;if(e){const n=`Bearer ${e.token}`;localStorage.setItem("token",n),qe.defaults.headers.common.Authorization=n,await this.ftechUser()}},async logout(){(await qe.post("api/logout")).data&&(localStorage.removeItem("token"),this.$reset())},async ftechUser(){this.user=(await qe.get("api/me")).data,this.loggedIn=!0}}}),VS={install:({config:t})=>{t.globalProperties.$auth=Zo(),Zo().loggedIn&&Zo().ftechUser()}};function HS(t){return{all:t=t||new Map,on:function(e,n){var s=t.get(e);s?s.push(n):t.set(e,[n])},off:function(e,n){var s=t.get(e);s&&(n?s.splice(s.indexOf(n)>>>0,1):t.set(e,[]))},emit:function(e,n){var s=t.get(e);s&&s.slice().map(function(r){r(n)}),(s=t.get("*"))&&s.slice().map(function(r){r(e,n)})}}}const jS={install:(t,e)=>{t.config.globalProperties.$eventBus=HS()}},Hp={TOP_LEFT:"top-left",TOP_RIGHT:"top-right",TOP_CENTER:"top-center",BOTTOM_LEFT:"bottom-left",BOTTOM_RIGHT:"bottom-right",BOTTOM_CENTER:"bottom-center"},Bi={LIGHT:"light",DARK:"dark",COLORED:"colored",AUTO:"auto"},su={INFO:"info",SUCCESS:"success",WARNING:"warning",ERROR:"error",DEFAULT:"default"},jp={dangerouslyHTMLString:!1,multiple:!0,position:Hp.TOP_RIGHT,autoClose:5e3,transition:"bounce",hideProgressBar:!1,pauseOnHover:!0,pauseOnFocusLoss:!0,closeOnClick:!0,className:"",bodyClassName:"",style:{},progressClassName:"",progressStyle:{},role:"alert",theme:"light"},US={rtl:!1,newestOnTop:!1,toastClassName:""},KS={...jp,...US};({...jp,type:su.DEFAULT});var xi=(t=>(t[t.COLLAPSE_DURATION=300]="COLLAPSE_DURATION",t[t.DEBOUNCE_DURATION=50]="DEBOUNCE_DURATION",t.CSS_NAMESPACE="Toastify",t))(xi||{});vt({});vt({});vt({items:[]});const WS=vt({});vt({});function qS(...t){return Il(...t)}function zS(t={}){WS[`${xi.CSS_NAMESPACE}-default-options`]=t}Hp.TOP_LEFT,Bi.AUTO,su.DEFAULT;su.DEFAULT,Bi.AUTO;Bi.AUTO,Bi.LIGHT;const Up={install(t,e={}){YS(e)}};typeof window<"u"&&(window.Vue3Toastify=Up);function YS(t={}){const e=qS(KS,t);zS(e)}const ru={url:"https://productalert.co",port:null,defaults:{},routes:{"debugbar.openhandler":{uri:"_debugbar/open",methods:["GET","HEAD"]},"debugbar.clockwork":{uri:"_debugbar/clockwork/{id}",methods:["GET","HEAD"]},"debugbar.assets.css":{uri:"_debugbar/assets/stylesheets",methods:["GET","HEAD"]},"debugbar.assets.js":{uri:"_debugbar/assets/javascript",methods:["GET","HEAD"]},"debugbar.cache.delete":{uri:"_debugbar/cache/{key}/{tags?}",methods:["DELETE"]},"sanctum.csrf-cookie":{uri:"sanctum/csrf-cookie",methods:["GET","HEAD"]},"ignition.healthCheck":{uri:"_ignition/health-check",methods:["GET","HEAD"]},"ignition.executeSolution":{uri:"_ignition/execute-solution",methods:["POST"]},"ignition.updateConfig":{uri:"_ignition/update-config",methods:["POST"]},"api.auth.login.post":{uri:"api/login",methods:["POST"]},"api.auth.logout.post":{uri:"api/logout",methods:["POST"]},"api.admin.post.get":{uri:"api/admin/post/{id}",methods:["GET","HEAD"]},"api.admin.country-locales":{uri:"api/admin/country-locales",methods:["GET","HEAD"]},"api.admin.categories":{uri:"api/admin/categories/{country_locale_slug}",methods:["GET","HEAD"]},"api.admin.authors":{uri:"api/admin/authors",methods:["GET","HEAD"]},"api.admin.upload.cloud.image":{uri:"api/admin/image/upload",methods:["POST"]},"api.admin.post.upsert":{uri:"api/admin/admin/post/upsert",methods:["POST"]},login:{uri:"login",methods:["GET","HEAD"]},logout:{uri:"logout",methods:["POST"]},register:{uri:"register",methods:["GET","HEAD"]},"password.request":{uri:"password/reset",methods:["GET","HEAD"]},"password.email":{uri:"password/email",methods:["POST"]},"password.reset":{uri:"password/reset/{token}",methods:["GET","HEAD"]},"password.update":{uri:"password/reset",methods:["POST"]},"password.confirm":{uri:"password/confirm",methods:["GET","HEAD"]},dashboard:{uri:"admin",methods:["GET","HEAD"]},about:{uri:"admin/about",methods:["GET","HEAD"]},"users.index":{uri:"admin/users",methods:["GET","HEAD"]},"posts.manage":{uri:"admin/posts",methods:["GET","HEAD"]},"posts.manage.edit":{uri:"admin/posts/edit/{post_id}",methods:["GET","HEAD"]},"posts.manage.new":{uri:"admin/posts/new",methods:["GET","HEAD"]},"profile.show":{uri:"admin/profile",methods:["GET","HEAD"]},"profile.update":{uri:"admin/profile",methods:["PUT"]},home:{uri:"/",methods:["GET","HEAD"]},"home.country":{uri:"{country}",methods:["GET","HEAD"]},"home.country.posts":{uri:"{country}/posts",methods:["GET","HEAD"]},"home.country.post":{uri:"{country}/posts/{post_slug}",methods:["GET","HEAD"]},"home.country.category":{uri:"{country}/{category}",methods:["GET","HEAD"]}}};typeof window<"u"&&typeof window.Ziggy<"u"&&Object.assign(ru.routes,window.Ziggy.routes);var GS=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function sw(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Ka={exports:{}},Qo,ef;function iu(){if(ef)return Qo;ef=1;var t=String.prototype.replace,e=/%20/g,n={RFC1738:"RFC1738",RFC3986:"RFC3986"};return Qo={default:n.RFC3986,formatters:{RFC1738:function(s){return t.call(s,e,"+")},RFC3986:function(s){return String(s)}},RFC1738:n.RFC1738,RFC3986:n.RFC3986},Qo}var ea,tf;function Kp(){if(tf)return ea;tf=1;var t=iu(),e=Object.prototype.hasOwnProperty,n=Array.isArray,s=function(){for(var h=[],y=0;y<256;++y)h.push("%"+((y<16?"0":"")+y.toString(16)).toUpperCase());return h}(),r=function(y){for(;y.length>1;){var d=y.pop(),_=d.obj[d.prop];if(n(_)){for(var v=[],g=0;g<_.length;++g)typeof _[g]<"u"&&v.push(_[g]);d.obj[d.prop]=v}}},i=function(y,d){for(var _=d&&d.plainObjects?Object.create(null):{},v=0;v=48&&b<=57||b>=65&&b<=90||b>=97&&b<=122||g===t.RFC1738&&(b===40||b===41)){O+=T.charAt(S);continue}if(b<128){O=O+s[b];continue}if(b<2048){O=O+(s[192|b>>6]+s[128|b&63]);continue}if(b<55296||b>=57344){O=O+(s[224|b>>12]+s[128|b>>6&63]+s[128|b&63]);continue}S+=1,b=65536+((b&1023)<<10|T.charCodeAt(S)&1023),O+=s[240|b>>18]+s[128|b>>12&63]+s[128|b>>6&63]+s[128|b&63]}return O},c=function(y){for(var d=[{obj:{o:y},prop:"o"}],_=[],v=0;v"u")return oe;var Oe;if(d==="comma"&&r(R))Oe=[{value:R.length>0?R.join(",")||null:void 0}];else if(r(T))Oe=T;else{var cn=Object.keys(R);Oe=O?cn.sort(O):cn}for(var ut=0;ut"u"?c.allowDots:!!h.allowDots,charset:y,charsetSentinel:typeof h.charsetSentinel=="boolean"?h.charsetSentinel:c.charsetSentinel,delimiter:typeof h.delimiter>"u"?c.delimiter:h.delimiter,encode:typeof h.encode=="boolean"?h.encode:c.encode,encoder:typeof h.encoder=="function"?h.encoder:c.encoder,encodeValuesOnly:typeof h.encodeValuesOnly=="boolean"?h.encodeValuesOnly:c.encodeValuesOnly,filter:v,format:d,formatter:_,serializeDate:typeof h.serializeDate=="function"?h.serializeDate:c.serializeDate,skipNulls:typeof h.skipNulls=="boolean"?h.skipNulls:c.skipNulls,sort:typeof h.sort=="function"?h.sort:null,strictNullHandling:typeof h.strictNullHandling=="boolean"?h.strictNullHandling:c.strictNullHandling}};return ta=function(p,h){var y=p,d=E(h),_,v;typeof d.filter=="function"?(v=d.filter,y=v("",y)):r(d.filter)&&(v=d.filter,_=v);var g=[];if(typeof y!="object"||y===null)return"";var T;h&&h.arrayFormat in s?T=h.arrayFormat:h&&"indices"in h?T=h.indices?"indices":"repeat":T="indices";var O=s[T];_||(_=Object.keys(y)),d.sort&&_.sort(d.sort);for(var S=0;S<_.length;++S){var b=_[S];d.skipNulls&&y[b]===null||a(g,m(y[b],b,O,d.strictNullHandling,d.skipNulls,d.encode?d.encoder:null,d.filter,d.sort,d.allowDots,d.serializeDate,d.format,d.formatter,d.encodeValuesOnly,d.charset))}var w=g.join(d.delimiter),k=d.addQueryPrefix===!0?"?":"";return d.charsetSentinel&&(d.charset==="iso-8859-1"?k+="utf8=%26%2310003%3B&":k+="utf8=%E2%9C%93&"),w.length>0?k+w:""},ta}var na,sf;function XS(){if(sf)return na;sf=1;var t=Kp(),e=Object.prototype.hasOwnProperty,n=Array.isArray,s={allowDots:!1,allowPrototypes:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:t.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},r=function(m){return m.replace(/&#(\d+);/g,function(E,p){return String.fromCharCode(parseInt(p,10))})},i=function(m,E){return m&&typeof m=="string"&&E.comma&&m.indexOf(",")>-1?m.split(","):m},o="utf8=%26%2310003%3B",a="utf8=%E2%9C%93",l=function(E,p){var h={},y=p.ignoreQueryPrefix?E.replace(/^\?/,""):E,d=p.parameterLimit===1/0?void 0:p.parameterLimit,_=y.split(p.delimiter,d),v=-1,g,T=p.charset;if(p.charsetSentinel)for(g=0;g<_.length;++g)_[g].indexOf("utf8=")===0&&(_[g]===a?T="utf-8":_[g]===o&&(T="iso-8859-1"),v=g,g=_.length);for(g=0;g<_.length;++g)if(g!==v){var O=_[g],S=O.indexOf("]="),b=S===-1?O.indexOf("="):S+1,w,k;b===-1?(w=p.decoder(O,s.decoder,T,"key"),k=p.strictNullHandling?null:""):(w=p.decoder(O.slice(0,b),s.decoder,T,"key"),k=t.maybeMap(i(O.slice(b+1),p),function(P){return p.decoder(P,s.decoder,T,"value")})),k&&p.interpretNumericEntities&&T==="iso-8859-1"&&(k=r(k)),O.indexOf("[]=")>-1&&(k=n(k)?[k]:k),e.call(h,w)?h[w]=t.combine(h[w],k):h[w]=k}return h},u=function(m,E,p,h){for(var y=h?E:i(E,p),d=m.length-1;d>=0;--d){var _,v=m[d];if(v==="[]"&&p.parseArrays)_=[].concat(y);else{_=p.plainObjects?Object.create(null):{};var g=v.charAt(0)==="["&&v.charAt(v.length-1)==="]"?v.slice(1,-1):v,T=parseInt(g,10);!p.parseArrays&&g===""?_={0:y}:!isNaN(T)&&v!==g&&String(T)===g&&T>=0&&p.parseArrays&&T<=p.arrayLimit?(_=[],_[T]=y):g!=="__proto__"&&(_[g]=y)}y=_}return y},c=function(E,p,h,y){if(E){var d=h.allowDots?E.replace(/\.([^.[]+)/g,"[$1]"):E,_=/(\[[^[\]]*])/,v=/(\[[^[\]]*])/g,g=h.depth>0&&_.exec(d),T=g?d.slice(0,g.index):d,O=[];if(T){if(!h.plainObjects&&e.call(Object.prototype,T)&&!h.allowPrototypes)return;O.push(T)}for(var S=0;h.depth>0&&(g=v.exec(d))!==null&&S"u"?s.charset:E.charset;return{allowDots:typeof E.allowDots>"u"?s.allowDots:!!E.allowDots,allowPrototypes:typeof E.allowPrototypes=="boolean"?E.allowPrototypes:s.allowPrototypes,arrayLimit:typeof E.arrayLimit=="number"?E.arrayLimit:s.arrayLimit,charset:p,charsetSentinel:typeof E.charsetSentinel=="boolean"?E.charsetSentinel:s.charsetSentinel,comma:typeof E.comma=="boolean"?E.comma:s.comma,decoder:typeof E.decoder=="function"?E.decoder:s.decoder,delimiter:typeof E.delimiter=="string"||t.isRegExp(E.delimiter)?E.delimiter:s.delimiter,depth:typeof E.depth=="number"||E.depth===!1?+E.depth:s.depth,ignoreQueryPrefix:E.ignoreQueryPrefix===!0,interpretNumericEntities:typeof E.interpretNumericEntities=="boolean"?E.interpretNumericEntities:s.interpretNumericEntities,parameterLimit:typeof E.parameterLimit=="number"?E.parameterLimit:s.parameterLimit,parseArrays:E.parseArrays!==!1,plainObjects:typeof E.plainObjects=="boolean"?E.plainObjects:s.plainObjects,strictNullHandling:typeof E.strictNullHandling=="boolean"?E.strictNullHandling:s.strictNullHandling}};return na=function(m,E){var p=f(E);if(m===""||m===null||typeof m>"u")return p.plainObjects?Object.create(null):{};for(var h=typeof m=="string"?l(m,p):m,y=p.plainObjects?Object.create(null):{},d=Object.keys(h),_=0;_"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function c(p,h,y){return c=u()?Reflect.construct.bind():function(d,_,v){var g=[null];g.push.apply(g,_);var T=new(Function.bind.apply(d,g));return v&&l(T,v.prototype),T},c.apply(null,arguments)}function f(p){var h=typeof Map=="function"?new Map:void 0;return f=function(y){if(y===null||Function.toString.call(y).indexOf("[native code]")===-1)return y;if(typeof y!="function")throw new TypeError("Super expression must either be null or a function");if(h!==void 0){if(h.has(y))return h.get(y);h.set(y,d)}function d(){return c(y,arguments,a(this).constructor)}return d.prototype=Object.create(y.prototype,{constructor:{value:d,enumerable:!1,writable:!0,configurable:!0}}),l(d,y)},f(p)}var m=function(){function p(y,d,_){var v,g;this.name=y,this.definition=d,this.bindings=(v=d.bindings)!=null?v:{},this.wheres=(g=d.wheres)!=null?g:{},this.config=_}var h=p.prototype;return h.matchesUrl=function(y){var d=this;if(!this.definition.methods.includes("GET"))return!1;var _=this.template.replace(/(\/?){([^}?]*)(\??)}/g,function(b,w,k,P){var N,R="(?<"+k+">"+(((N=d.wheres[k])==null?void 0:N.replace(/(^\^)|(\$$)/g,""))||"[^/?]+")+")";return P?"("+w+R+")?":""+w+R}).replace(/^\w+:\/\//,""),v=y.replace(/^\w+:\/\//,"").split("?"),g=v[0],T=v[1],O=new RegExp("^"+_+"/?$").exec(g);if(O){for(var S in O.groups)O.groups[S]=typeof O.groups[S]=="string"?decodeURIComponent(O.groups[S]):O.groups[S];return{params:O.groups,query:s.parse(T)}}return!1},h.compile=function(y){var d=this,_=this.parameterSegments;return _.length?this.template.replace(/{([^}?]+)(\??)}/g,function(v,g,T){var O,S,b;if(!T&&[null,void 0].includes(y[g]))throw new Error("Ziggy error: '"+g+"' parameter is required for route '"+d.name+"'.");if(_[_.length-1].name===g&&d.wheres[g]===".*")return encodeURIComponent((b=y[g])!=null?b:"").replace(/%2F/g,"/");if(d.wheres[g]&&!new RegExp("^"+(T?"("+d.wheres[g]+")?":d.wheres[g])+"$").test((O=y[g])!=null?O:""))throw new Error("Ziggy error: '"+g+"' parameter does not match required format '"+d.wheres[g]+"' for route '"+d.name+"'.");return encodeURIComponent((S=y[g])!=null?S:"")}).replace(this.origin+"//",this.origin+"/").replace(/\/+$/,""):this.template},i(p,[{key:"template",get:function(){return(this.origin+"/"+this.definition.uri).replace(/\/+$/,"")}},{key:"origin",get:function(){return this.config.absolute?this.definition.domain?""+this.config.url.match(/^\w+:\/\//)[0]+this.definition.domain+(this.config.port?":"+this.config.port:""):this.config.url:""}},{key:"parameterSegments",get:function(){var y,d;return(y=(d=this.template.match(/{[^}?]+\??}/g))==null?void 0:d.map(function(_){return{name:_.replace(/{|\??}/g,""),required:!/\?}$/.test(_)}}))!=null?y:[]}}]),p}(),E=function(p){var h,y;function d(v,g,T,O){var S;if(T===void 0&&(T=!0),(S=p.call(this)||this).t=O??(typeof Ziggy<"u"?Ziggy:globalThis==null?void 0:globalThis.Ziggy),S.t=o({},S.t,{absolute:T}),v){if(!S.t.routes[v])throw new Error("Ziggy error: route '"+v+"' is not in the route list.");S.i=new m(v,S.t.routes[v],S.t),S.u=S.o(g)}return S}y=p,(h=d).prototype=Object.create(y.prototype),h.prototype.constructor=h,l(h,y);var _=d.prototype;return _.toString=function(){var v=this,g=Object.keys(this.u).filter(function(T){return!v.i.parameterSegments.some(function(O){return O.name===T})}).filter(function(T){return T!=="_query"}).reduce(function(T,O){var S;return o({},T,((S={})[O]=v.u[O],S))},{});return this.i.compile(this.u)+s.stringify(o({},g,this.u._query),{addQueryPrefix:!0,arrayFormat:"indices",encodeValuesOnly:!0,skipNulls:!0,encoder:function(T,O){return typeof T=="boolean"?Number(T):O(T)}})},_.l=function(v){var g=this;v?this.t.absolute&&v.startsWith("/")&&(v=this.h().host+v):v=this.v();var T={},O=Object.entries(this.t.routes).find(function(S){return T=new m(S[0],S[1],g.t).matchesUrl(v)})||[void 0,void 0];return o({name:O[0]},T,{route:O[1]})},_.v=function(){var v=this.h(),g=v.pathname,T=v.search;return(this.t.absolute?v.host+g:g.replace(this.t.url.replace(/^\w*:\/\/[^/]+/,""),"").replace(/^\/+/,"/"))+T},_.current=function(v,g){var T=this.l(),O=T.name,S=T.params,b=T.query,w=T.route;if(!v)return O;var k=new RegExp("^"+v.replace(/\./g,"\\.").replace(/\*/g,".*")+"$").test(O);if([null,void 0].includes(g)||!k)return k;var P=new m(O,w,this.t);g=this.o(g,P);var N=o({},S,b);return!(!Object.values(g).every(function(R){return!R})||Object.values(N).some(function(R){return R!==void 0}))||Object.entries(g).every(function(R){return N[R[0]]==R[1]})},_.h=function(){var v,g,T,O,S,b,w=typeof window<"u"?window.location:{},k=w.host,P=w.pathname,N=w.search;return{host:(v=(g=this.t.location)==null?void 0:g.host)!=null?v:k===void 0?"":k,pathname:(T=(O=this.t.location)==null?void 0:O.pathname)!=null?T:P===void 0?"":P,search:(S=(b=this.t.location)==null?void 0:b.search)!=null?S:N===void 0?"":N}},_.has=function(v){return Object.keys(this.t.routes).includes(v)},_.o=function(v,g){var T=this;v===void 0&&(v={}),g===void 0&&(g=this.i),v!=null||(v={}),v=["string","number"].includes(typeof v)?[v]:v;var O=g.parameterSegments.filter(function(b){return!T.t.defaults[b.name]});if(Array.isArray(v))v=v.reduce(function(b,w,k){var P,N;return o({},b,O[k]?((P={})[O[k].name]=w,P):typeof w=="object"?w:((N={})[w]="",N))},{});else if(O.length===1&&!v[O[0].name]&&(v.hasOwnProperty(Object.values(g.bindings)[0])||v.hasOwnProperty("id"))){var S;(S={})[O[0].name]=v,v=S}return o({},this.p(g),this.g(v,g))},_.p=function(v){var g=this;return v.parameterSegments.filter(function(T){return g.t.defaults[T.name]}).reduce(function(T,O,S){var b,w=O.name;return o({},T,((b={})[w]=g.t.defaults[w],b))},{})},_.g=function(v,g){var T=g.bindings,O=g.parameterSegments;return Object.entries(v).reduce(function(S,b){var w,k,P=b[0],N=b[1];if(!N||typeof N!="object"||Array.isArray(N)||!O.some(function(R){return R.name===P}))return o({},S,((k={})[P]=N,k));if(!N.hasOwnProperty(T[P])){if(!N.hasOwnProperty("id"))throw new Error("Ziggy error: object passed as '"+P+"' parameter is missing route model binding key '"+T[P]+"'.");T[P]="id"}return o({},S,((w={})[P]=N[T[P]],w))},{})},_.valueOf=function(){return this.toString()},_.check=function(v){return this.has(v)},i(d,[{key:"params",get:function(){var v=this.l();return o({},v.params,v.query)}}]),d}(f(String));n.ZiggyVue={install:function(p,h){var y=function(d,_,v,g){return g===void 0&&(g=h),function(T,O,S,b){var w=new E(T,O,S,b);return T?w.toString():w}(d,_,v,g)};p.mixin({methods:{route:y}}),parseInt(p.version)>2&&p.provide("route",y)}}})})(Ka,Ka.exports);var QS=Ka.exports;const un=zd({AdminApp:Rp}),Wp=Object.assign({"/resources/js/vue/AdminApp.vue":()=>Dr(()=>Promise.resolve().then(()=>SS),void 0),"/resources/js/vue/NativeImageBlock.vue":()=>Dr(()=>import("./NativeImageBlock-49da3dd3.js").then(t=>t.N),["assets/NativeImageBlock-49da3dd3.js","assets/NativeImageBlock-e3b0c442.css"]),"/resources/js/vue/PostEditor.vue":()=>Dr(()=>import("./PostEditor-a50a8942.js"),["assets/PostEditor-a50a8942.js","assets/VueEditorJs-a618215f.js","assets/index-8746c87e.js","assets/NativeImageBlock-49da3dd3.js","assets/NativeImageBlock-e3b0c442.css","assets/bundle-60a987a2.js","assets/bundle-7f656357.js"]),"/resources/js/vue/VueEditorJs.vue":()=>Dr(()=>import("./VueEditorJs-a618215f.js"),["assets/VueEditorJs-a618215f.js","assets/index-8746c87e.js"])});console.log(Wp);un.use(OS());un.use(ci,qe);un.use(VS);un.use(jS);un.use(Up);un.use(QS.ZiggyVue,ru);window.Ziggy=ru;Object.entries({...Wp}).forEach(([t,e])=>{const n=t.split("/").pop().replace(/\.\w+$/,"").replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();un.component(n,jh(e))});un.mount("#app");export{sw as A,Ne as F,AS as _,qe as a,nw as b,md as c,xp as d,Nl as e,de as f,PA as g,Ml as h,DA as i,Bl as j,Dl as k,ZS as l,tw as m,Er as n,Cr as o,_r as p,yv as q,Wv as r,bv as s,A0 as t,Dr as u,Ci as v,Mv as w,io as x,vt as y,Tr as z}; diff --git a/public/build/assets/bundle-43b5b4d7.js b/public/build/assets/bundle-60a987a2.js similarity index 99% rename from public/build/assets/bundle-43b5b4d7.js rename to public/build/assets/bundle-60a987a2.js index 749029b..5eda451 100644 --- a/public/build/assets/bundle-43b5b4d7.js +++ b/public/build/assets/bundle-60a987a2.js @@ -1,4 +1,4 @@ -import{A as E}from"./admin-app-0df052b8.js";function P(_,j){for(var v=0;vp[c]})}}}return Object.freeze(Object.defineProperty(_,Symbol.toStringTag,{value:"Module"}))}var T={exports:{}};(function(_,j){(function(v,p){_.exports=p()})(window,function(){return function(v){var p={};function c(o){if(p[o])return p[o].exports;var l=p[o]={i:o,l:!1,exports:{}};return v[o].call(l.exports,l,l.exports,c),l.l=!0,l.exports}return c.m=v,c.c=p,c.d=function(o,l,d){c.o(o,l)||Object.defineProperty(o,l,{enumerable:!0,get:d})},c.r=function(o){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(o,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(o,"__esModule",{value:!0})},c.t=function(o,l){if(1&l&&(o=c(o)),8&l||4&l&&typeof o=="object"&&o&&o.__esModule)return o;var d=Object.create(null);if(c.r(d),Object.defineProperty(d,"default",{enumerable:!0,value:o}),2&l&&typeof o!="string")for(var f in o)c.d(d,f,(function(b){return o[b]}).bind(null,f));return d},c.n=function(o){var l=o&&o.__esModule?function(){return o.default}:function(){return o};return c.d(l,"a",l),l},c.o=function(o,l){return Object.prototype.hasOwnProperty.call(o,l)},c.p="/",c(c.s=4)}([function(v,p,c){var o=c(1),l=c(2);typeof(l=l.__esModule?l.default:l)=="string"&&(l=[[v.i,l,""]]);var d={insert:"head",singleton:!1};o(l,d),v.exports=l.locals||{}},function(v,p,c){var o,l=function(){return o===void 0&&(o=!!(window&&document&&document.all&&!window.atob)),o},d=function(){var r={};return function(i){if(r[i]===void 0){var s=document.querySelector(i);if(window.HTMLIFrameElement&&s instanceof window.HTMLIFrameElement)try{s=s.contentDocument.head}catch{s=null}r[i]=s}return r[i]}}(),f=[];function b(r){for(var i=-1,s=0;sp[c]})}}}return Object.freeze(Object.defineProperty(_,Symbol.toStringTag,{value:"Module"}))}var T={exports:{}};(function(_,j){(function(v,p){_.exports=p()})(window,function(){return function(v){var p={};function c(o){if(p[o])return p[o].exports;var l=p[o]={i:o,l:!1,exports:{}};return v[o].call(l.exports,l,l.exports,c),l.l=!0,l.exports}return c.m=v,c.c=p,c.d=function(o,l,d){c.o(o,l)||Object.defineProperty(o,l,{enumerable:!0,get:d})},c.r=function(o){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(o,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(o,"__esModule",{value:!0})},c.t=function(o,l){if(1&l&&(o=c(o)),8&l||4&l&&typeof o=="object"&&o&&o.__esModule)return o;var d=Object.create(null);if(c.r(d),Object.defineProperty(d,"default",{enumerable:!0,value:o}),2&l&&typeof o!="string")for(var f in o)c.d(d,f,(function(b){return o[b]}).bind(null,f));return d},c.n=function(o){var l=o&&o.__esModule?function(){return o.default}:function(){return o};return c.d(l,"a",l),l},c.o=function(o,l){return Object.prototype.hasOwnProperty.call(o,l)},c.p="/",c(c.s=4)}([function(v,p,c){var o=c(1),l=c(2);typeof(l=l.__esModule?l.default:l)=="string"&&(l=[[v.i,l,""]]);var d={insert:"head",singleton:!1};o(l,d),v.exports=l.locals||{}},function(v,p,c){var o,l=function(){return o===void 0&&(o=!!(window&&document&&document.all&&!window.atob)),o},d=function(){var r={};return function(i){if(r[i]===void 0){var s=document.querySelector(i);if(window.HTMLIFrameElement&&s instanceof window.HTMLIFrameElement)try{s=s.contentDocument.head}catch{s=null}r[i]=s}return r[i]}}(),f=[];function b(r){for(var i=-1,s=0;sb[l]})}}}return Object.freeze(Object.defineProperty(x,Symbol.toStringTag,{value:"Module"}))}var A={exports:{}};(function(x,H){(function(g,b){x.exports=b()})(window,function(){return function(g){var b={};function l(n){if(b[n])return b[n].exports;var i=b[n]={i:n,l:!1,exports:{}};return g[n].call(i.exports,i,i.exports,l),i.l=!0,i.exports}return l.m=g,l.c=b,l.d=function(n,i,h){l.o(n,i)||Object.defineProperty(n,i,{enumerable:!0,get:h})},l.r=function(n){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(n,"__esModule",{value:!0})},l.t=function(n,i){if(1&i&&(n=l(n)),8&i||4&i&&typeof n=="object"&&n&&n.__esModule)return n;var h=Object.create(null);if(l.r(h),Object.defineProperty(h,"default",{enumerable:!0,value:n}),2&i&&typeof n!="string")for(var m in n)l.d(h,m,(function(f){return n[f]}).bind(null,m));return h},l.n=function(n){var i=n&&n.__esModule?function(){return n.default}:function(){return n};return l.d(i,"a",i),i},l.o=function(n,i){return Object.prototype.hasOwnProperty.call(n,i)},l.p="/",l(l.s=5)}([function(g,b,l){var n=l(1);typeof n=="string"&&(n=[[g.i,n,""]]);var i={hmr:!0,transform:void 0,insertInto:void 0};l(3)(n,i),n.locals&&(g.exports=n.locals)},function(g,b,l){(g.exports=l(2)(!1)).push([g.i,`/** +import{A as N}from"./admin-app-9fc1473b.js";function P(x,H){for(var g=0;gb[l]})}}}return Object.freeze(Object.defineProperty(x,Symbol.toStringTag,{value:"Module"}))}var A={exports:{}};(function(x,H){(function(g,b){x.exports=b()})(window,function(){return function(g){var b={};function l(n){if(b[n])return b[n].exports;var i=b[n]={i:n,l:!1,exports:{}};return g[n].call(i.exports,i,i.exports,l),i.l=!0,i.exports}return l.m=g,l.c=b,l.d=function(n,i,h){l.o(n,i)||Object.defineProperty(n,i,{enumerable:!0,get:h})},l.r=function(n){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(n,"__esModule",{value:!0})},l.t=function(n,i){if(1&i&&(n=l(n)),8&i||4&i&&typeof n=="object"&&n&&n.__esModule)return n;var h=Object.create(null);if(l.r(h),Object.defineProperty(h,"default",{enumerable:!0,value:n}),2&i&&typeof n!="string")for(var m in n)l.d(h,m,(function(f){return n[f]}).bind(null,m));return h},l.n=function(n){var i=n&&n.__esModule?function(){return n.default}:function(){return n};return l.d(i,"a",i),i},l.o=function(n,i){return Object.prototype.hasOwnProperty.call(n,i)},l.p="/",l(l.s=5)}([function(g,b,l){var n=l(1);typeof n=="string"&&(n=[[g.i,n,""]]);var i={hmr:!0,transform:void 0,insertInto:void 0};l(3)(n,i),n.locals&&(g.exports=n.locals)},function(g,b,l){(g.exports=l(2)(!1)).push([g.i,`/** * Plugin styles */ .ce-header { diff --git a/public/build/manifest.json b/public/build/manifest.json index 70e823d..68bbfce 100644 --- a/public/build/manifest.json +++ b/public/build/manifest.json @@ -3,25 +3,25 @@ "file": "assets/NativeImageBlock-e3b0c442.css", "src": "NativeImageBlock.css" }, - "_NativeImageBlock-bcbff98b.js": { + "_NativeImageBlock-49da3dd3.js": { "css": [ "assets/NativeImageBlock-e3b0c442.css" ], - "file": "assets/NativeImageBlock-bcbff98b.js", + "file": "assets/NativeImageBlock-49da3dd3.js", "imports": [ "resources/js/admin-app.js" ], "isDynamicEntry": true }, - "_bundle-43b5b4d7.js": { - "file": "assets/bundle-43b5b4d7.js", + "_bundle-60a987a2.js": { + "file": "assets/bundle-60a987a2.js", "imports": [ "resources/js/admin-app.js" ], "isDynamicEntry": true }, - "_bundle-94bef551.js": { - "file": "assets/bundle-94bef551.js", + "_bundle-7f656357.js": { + "file": "assets/bundle-7f656357.js", "imports": [ "resources/js/admin-app.js" ], @@ -47,11 +47,11 @@ "assets/admin-app-935fc652.css" ], "dynamicImports": [ - "_NativeImageBlock-bcbff98b.js", + "_NativeImageBlock-49da3dd3.js", "resources/js/vue/PostEditor.vue", "resources/js/vue/VueEditorJs.vue" ], - "file": "assets/admin-app-0df052b8.js", + "file": "assets/admin-app-9fc1473b.js", "imports": [ "_index-8746c87e.js" ], @@ -67,12 +67,12 @@ "src": "resources/js/front-app.js" }, "resources/js/vue/PostEditor.vue": { - "file": "assets/PostEditor-a6038129.js", + "file": "assets/PostEditor-a50a8942.js", "imports": [ "resources/js/vue/VueEditorJs.vue", - "_NativeImageBlock-bcbff98b.js", - "_bundle-43b5b4d7.js", - "_bundle-94bef551.js", + "_NativeImageBlock-49da3dd3.js", + "_bundle-60a987a2.js", + "_bundle-7f656357.js", "resources/js/admin-app.js", "_index-8746c87e.js" ], @@ -81,10 +81,10 @@ }, "resources/js/vue/VueEditorJs.vue": { "dynamicImports": [ - "_bundle-94bef551.js", - "_bundle-43b5b4d7.js" + "_bundle-7f656357.js", + "_bundle-60a987a2.js" ], - "file": "assets/VueEditorJs-6310d292.js", + "file": "assets/VueEditorJs-a618215f.js", "imports": [ "resources/js/admin-app.js", "_index-8746c87e.js" diff --git a/resources/js/ziggy.js b/resources/js/ziggy.js index 7d24e91..97c0fd8 100644 --- a/resources/js/ziggy.js +++ b/resources/js/ziggy.js @@ -1,4 +1,4 @@ -const Ziggy = {"url":"https:\/\/productalert.test","port":null,"defaults":{},"routes":{"debugbar.openhandler":{"uri":"_debugbar\/open","methods":["GET","HEAD"]},"debugbar.clockwork":{"uri":"_debugbar\/clockwork\/{id}","methods":["GET","HEAD"]},"debugbar.assets.css":{"uri":"_debugbar\/assets\/stylesheets","methods":["GET","HEAD"]},"debugbar.assets.js":{"uri":"_debugbar\/assets\/javascript","methods":["GET","HEAD"]},"debugbar.cache.delete":{"uri":"_debugbar\/cache\/{key}\/{tags?}","methods":["DELETE"]},"sanctum.csrf-cookie":{"uri":"sanctum\/csrf-cookie","methods":["GET","HEAD"]},"ignition.healthCheck":{"uri":"_ignition\/health-check","methods":["GET","HEAD"]},"ignition.executeSolution":{"uri":"_ignition\/execute-solution","methods":["POST"]},"ignition.updateConfig":{"uri":"_ignition\/update-config","methods":["POST"]},"api.auth.login.post":{"uri":"api\/login","methods":["POST"]},"api.auth.logout.post":{"uri":"api\/logout","methods":["POST"]},"api.admin.post.get":{"uri":"api\/admin\/post\/{id}","methods":["GET","HEAD"]},"api.admin.country-locales":{"uri":"api\/admin\/country-locales","methods":["GET","HEAD"]},"api.admin.categories":{"uri":"api\/admin\/categories\/{country_locale_slug}","methods":["GET","HEAD"]},"api.admin.authors":{"uri":"api\/admin\/authors","methods":["GET","HEAD"]},"api.admin.upload.cloud.image":{"uri":"api\/admin\/image\/upload","methods":["POST"]},"api.admin.post.upsert":{"uri":"api\/admin\/admin\/post\/upsert","methods":["POST"]},"login":{"uri":"login","methods":["GET","HEAD"]},"logout":{"uri":"logout","methods":["POST"]},"register":{"uri":"register","methods":["GET","HEAD"]},"password.request":{"uri":"password\/reset","methods":["GET","HEAD"]},"password.email":{"uri":"password\/email","methods":["POST"]},"password.reset":{"uri":"password\/reset\/{token}","methods":["GET","HEAD"]},"password.update":{"uri":"password\/reset","methods":["POST"]},"password.confirm":{"uri":"password\/confirm","methods":["GET","HEAD"]},"dashboard":{"uri":"admin","methods":["GET","HEAD"]},"about":{"uri":"admin\/about","methods":["GET","HEAD"]},"users.index":{"uri":"admin\/users","methods":["GET","HEAD"]},"posts.manage":{"uri":"admin\/posts","methods":["GET","HEAD"]},"posts.manage.edit":{"uri":"admin\/posts\/edit\/{post_id}","methods":["GET","HEAD"]},"posts.manage.new":{"uri":"admin\/posts\/new","methods":["GET","HEAD"]},"profile.show":{"uri":"admin\/profile","methods":["GET","HEAD"]},"profile.update":{"uri":"admin\/profile","methods":["PUT"]},"home":{"uri":"\/","methods":["GET","HEAD"]},"home.country":{"uri":"{country}","methods":["GET","HEAD"]},"home.country.posts":{"uri":"{country}\/posts","methods":["GET","HEAD"]},"home.country.post":{"uri":"{country}\/posts\/{post_slug}","methods":["GET","HEAD"]},"home.country.category":{"uri":"{country}\/{category}","methods":["GET","HEAD"]}}}; +const Ziggy = {"url":"https:\/\/productalert.co","port":null,"defaults":{},"routes":{"debugbar.openhandler":{"uri":"_debugbar\/open","methods":["GET","HEAD"]},"debugbar.clockwork":{"uri":"_debugbar\/clockwork\/{id}","methods":["GET","HEAD"]},"debugbar.assets.css":{"uri":"_debugbar\/assets\/stylesheets","methods":["GET","HEAD"]},"debugbar.assets.js":{"uri":"_debugbar\/assets\/javascript","methods":["GET","HEAD"]},"debugbar.cache.delete":{"uri":"_debugbar\/cache\/{key}\/{tags?}","methods":["DELETE"]},"sanctum.csrf-cookie":{"uri":"sanctum\/csrf-cookie","methods":["GET","HEAD"]},"ignition.healthCheck":{"uri":"_ignition\/health-check","methods":["GET","HEAD"]},"ignition.executeSolution":{"uri":"_ignition\/execute-solution","methods":["POST"]},"ignition.updateConfig":{"uri":"_ignition\/update-config","methods":["POST"]},"api.auth.login.post":{"uri":"api\/login","methods":["POST"]},"api.auth.logout.post":{"uri":"api\/logout","methods":["POST"]},"api.admin.post.get":{"uri":"api\/admin\/post\/{id}","methods":["GET","HEAD"]},"api.admin.country-locales":{"uri":"api\/admin\/country-locales","methods":["GET","HEAD"]},"api.admin.categories":{"uri":"api\/admin\/categories\/{country_locale_slug}","methods":["GET","HEAD"]},"api.admin.authors":{"uri":"api\/admin\/authors","methods":["GET","HEAD"]},"api.admin.upload.cloud.image":{"uri":"api\/admin\/image\/upload","methods":["POST"]},"api.admin.post.upsert":{"uri":"api\/admin\/admin\/post\/upsert","methods":["POST"]},"login":{"uri":"login","methods":["GET","HEAD"]},"logout":{"uri":"logout","methods":["POST"]},"register":{"uri":"register","methods":["GET","HEAD"]},"password.request":{"uri":"password\/reset","methods":["GET","HEAD"]},"password.email":{"uri":"password\/email","methods":["POST"]},"password.reset":{"uri":"password\/reset\/{token}","methods":["GET","HEAD"]},"password.update":{"uri":"password\/reset","methods":["POST"]},"password.confirm":{"uri":"password\/confirm","methods":["GET","HEAD"]},"dashboard":{"uri":"admin","methods":["GET","HEAD"]},"about":{"uri":"admin\/about","methods":["GET","HEAD"]},"users.index":{"uri":"admin\/users","methods":["GET","HEAD"]},"posts.manage":{"uri":"admin\/posts","methods":["GET","HEAD"]},"posts.manage.edit":{"uri":"admin\/posts\/edit\/{post_id}","methods":["GET","HEAD"]},"posts.manage.new":{"uri":"admin\/posts\/new","methods":["GET","HEAD"]},"profile.show":{"uri":"admin\/profile","methods":["GET","HEAD"]},"profile.update":{"uri":"admin\/profile","methods":["PUT"]},"home":{"uri":"\/","methods":["GET","HEAD"]},"home.country":{"uri":"{country}","methods":["GET","HEAD"]},"home.country.posts":{"uri":"{country}\/posts","methods":["GET","HEAD"]},"home.country.post":{"uri":"{country}\/posts\/{post_slug}","methods":["GET","HEAD"]},"home.country.category":{"uri":"{country}\/{category}","methods":["GET","HEAD"]}}}; if (typeof window !== 'undefined' && typeof window.Ziggy !== 'undefined') { Object.assign(Ziggy.routes, window.Ziggy.routes); diff --git a/run_dev.sh b/run_dev.sh new file mode 100644 index 0000000..6de0d7b --- /dev/null +++ b/run_dev.sh @@ -0,0 +1,4 @@ +#!/bin/bash + +eval 'php artisan ziggy:generate'; +eval 'npm run dev'; \ No newline at end of file diff --git a/run_prod.sh b/run_prod.sh new file mode 100644 index 0000000..496deb6 --- /dev/null +++ b/run_prod.sh @@ -0,0 +1,4 @@ +#!/bin/bash + +eval 'APP_URL=https://productalert.co php artisan ziggy:generate'; +eval 'npm run build'; \ No newline at end of file