(()=>{var e={};e.id=4034,e.ids=[4034],e.modules={3295:e=>{"use strict";e.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},10846:e=>{"use strict";e.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},29294:e=>{"use strict";e.exports=require("next/dist/server/app-render/work-async-storage.external.js")},29706:(e,t,o)=>{"use strict";o.d(t,{nE:()=>r,z$:()=>a});var n=o(63095),s=o(39300),i=o(94634);async function r(e){let t=await (0,n.A)().select().from(s.options).where((0,i.eq)(s.options.optionName,e));return Object.keys(t).length>0?t[0].optionValue:(await a(e,""),null)}async function a(e,t){"boolean"==typeof t&&(t=t?"1":" 0"),0==Object.keys(await (0,n.A)().select().from(s.options).where((0,i.eq)(s.options.optionName,e))).length?await (0,n.A)().insert(s.options).values({optionName:e,optionValue:t}):await (0,n.A)().update(s.options).set({optionValue:t}).where((0,i.eq)(s.options.optionName,e))}},38121:(e,t,o)=>{"use strict";o.r(t),o.d(t,{patchFetch:()=>N,routeModule:()=>p,serverHooks:()=>m,workAsyncStorage:()=>d,workUnitAsyncStorage:()=>c});var n={};o.r(n),o.d(n,{POST:()=>u});var s=o(96559),i=o(48088),r=o(37719),a=o(32190),l=o(29706);async function u(e){let t=(await e.json()).optionName,o=await (0,l.nE)(t);return a.NextResponse.json({data:o,success:!0})}let p=new s.AppRouteRouteModule({definition:{kind:i.RouteKind.APP_ROUTE,page:"/[locale]/api/options/get-option-value/route",pathname:"/[locale]/api/options/get-option-value",filename:"route",bundlePath:"app/[locale]/api/options/get-option-value/route"},resolvedPagePath:"E:\\xampp01\\htdocs\\wx-saas\\timynote\\app\\[locale]\\api\\options\\get-option-value\\route.tsx",nextConfigOutput:"standalone",userland:n}),{workAsyncStorage:d,workUnitAsyncStorage:c,serverHooks:m}=p;function N(){return(0,r.patchFetch)({workAsyncStorage:d,workUnitAsyncStorage:c})}},39300:(e,t,o)=>{"use strict";o.r(t),o.d(t,{categories:()=>p,medias:()=>u,metaRelations:()=>N,options:()=>l,posts:()=>d,tags:()=>c,templates:()=>m});var n=o(81598),s=o(70932),i=o(22077),r=o(89283),a=o(49930);let l=(0,n.D)("options",{id:(0,s.nd)("id").primaryKey({autoIncrement:!0}).notNull(),optionName:(0,i.sH)("option_name").default().notNull(),optionValue:(0,i.sH)("option_value").notNull()}),u=(0,n.D)("medias",{id:(0,s.nd)("id").primaryKey({autoIncrement:!0}),name:(0,r.Qq)("name").notNull(),description:(0,r.Qq)("description"),extension:(0,r.Qq)("extension").default("NA").notNull(),url:(0,r.Qq)("url").notNull(),timeCreated:(0,i.sH)("time_created").default((0,a.ll)`(CURRENT_TIMESTAMP)`),timeModified:(0,i.sH)("time_modified").default((0,a.ll)`(CURRENT_TIMESTAMP)`)}),p=(0,n.D)("categories",{id:(0,s.nd)("id").primaryKey({autoIncrement:!0}).notNull(),category:(0,i.sH)("category").notNull(),description:(0,i.sH)("description").notNull(),slug:(0,i.sH)("slug").notNull(),parent:(0,i.sH)("parent").notNull()}),d=(0,n.D)("posts",{id:(0,s.nd)("id").primaryKey({autoIncrement:!0}).notNull(),title:(0,r.Qq)("title").notNull(),content:(0,i.sH)("content"),slug:(0,i.sH)("slug").notNull(),timeCreated:(0,i.sH)("time_created").default((0,a.ll)`(CURRENT_TIMESTAMP)`).notNull(),timeModified:(0,i.sH)("time_modified").default((0,a.ll)`(NULL)`),status:(0,i.sH)("status").default("draft").notNull(),isTop:(0,i.sH)("is_top").notNull(),excerpt:(0,r.Qq)("excerpt"),featureImg:(0,r.Qq)("feature_img")}),c=(0,n.D)("tags",{id:(0,s.nd)("id").primaryKey({autoIncrement:!0}).notNull(),tag:(0,i.sH)("tag").notNull(),description:(0,i.sH)("description").notNull(),slug:(0,i.sH)("slug").notNull()}),m=(0,n.D)("templates",{id:(0,s.nd)("id").primaryKey({autoIncrement:!0}).notNull(),title:(0,r.Qq)("title").notNull(),content:(0,i.sH)("content").notNull()}),N=(0,n.D)("meta_relations",{id:(0,s.nd)("id").primaryKey({autoIncrement:!0}).notNull(),metaId:(0,i.sH)("meta_id"),type:(0,i.sH)("type"),postId:(0,i.sH)("post_id").references(()=>d.id)})},44870:e=>{"use strict";e.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},63033:e=>{"use strict";e.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},63095:(e,t,o)=>{"use strict";o.d(t,{A:()=>a});var n=o(87550),s=o.n(n),i=o(46267),r=o(39300);let a=()=>{let e=new(s())("./contents/data.db");return(0,i.f)(e,{schema:r})}},78335:()=>{},87550:e=>{"use strict";e.exports=require("better-sqlite3")},96487:()=>{}};var t=require("../../../../../webpack-runtime.js");t.C(e);var o=e=>t(t.s=e),n=t.X(0,[4447,580,902],()=>o(38121));module.exports=n})();