1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/reference.detail._slug-DQE_XJeE.js","assets/createLucideIcon-DvNR0LE5.js","assets/link-LlUs0RbA.js","assets/admin-photo-form-CTrtNCYC.js","assets/photo-lightbox-DFKrFVyF.js","assets/site-footer-bDszHA9D.js"])))=>i.map(i=>d[i]); 2import{_ as e,c as t,d as n,f as r,g as i,h as a,m as o,n as s,p as c,u as l,v as u}from"./createLucideIcon-DvNR0LE5.js";import{n as d,r as f,t as p}from"./preload-helper-BSoWNPqY.js";import{n as m,r as h}from"./admin-photo-form-CTrtNCYC.js";var g=Object.defineProperty,_=(e,t,n)=>t in e?g(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,v=(e,t,n)=>_(e,typeof t==`symbol`?t:t+``,n),y=void 0,b=class{constructor(t,r){if(v(this,`address`),v(this,`auth`),v(this,`adminAuth`),v(this,`encodedTsPromise`),v(this,`debug`),v(this,`fetchOptions`),v(this,`fetch`),v(this,`logger`),v(this,`mutationQueue`,[]),v(this,`isProcessingQueue`,!1),typeof r==`boolean`)throw Error("skipConvexDeploymentUrlCheck as the second argument is no longer supported. Please pass an options object, `{ skipConvexDeploymentUrlCheck: true }`.");(r??{}).skipConvexDeploymentUrlCheck!==!0&&e(t),this.logger=r?.logger===!1?n({verbose:!1}):r?.logger!==!0&&r?.logger?r.logger:l({verbose:!1}),this.address=t,this.debug=!0,this.auth=void 0,this.adminAuth=void 0,this.fetch=r?.fetch,r?.auth&&this.setAuth(r.auth)}backendUrl(){return`${this.address}/api`}get url(){return this.address}setAuth(e){this.clearAuth(),this.auth=e}setAdminAuth(e,t){if(this.clearAuth(),t!==void 0){let n=new TextEncoder().encode(JSON.stringify(t)),r=btoa(String.fromCodePoint(...n));this.adminAuth=`${e}:${r}`}else this.adminAuth=e}clearAuth(){this.auth=void 0,this.adminAuth=void 0}setDebug(e){this.debug=e}setFetchOptions(e){this.fetchOptions=e}async consistentQuery(e,...t){let n=i(t[0]),r=this.getTimestamp();return await this.queryInner(e,n,{timestampPromise:r})}async getTimestamp(){return this.encodedTsPromise?this.encodedTsPromise:this.encodedTsPromise=this.getTimestampInner()}async getTimestampInner(){let e=this.fetch||y||fetch,t={"Content-Type":`application/json`,"Convex-Client":`npm-${u}`},n=await e(`${this.address}/api/query_ts`,{...this.fetchOptions,method:`POST`,headers:t});if(!n.ok)throw Error(await n.text());let{ts:r}=await n.json();return r}async query(e,...t){let n=i(t[0]);return await this.queryInner(e,n,{})}async queryInner(e,n,i){let s=t(e),l=[o(n)],d={"Content-Type":`application/json`,"Convex-Client":`npm-${u}`};this.adminAuth?d.Authorization=`Convex ${this.adminAuth}`:this.auth&&(d.Authorization=`Bearer ${this.auth}`);let f=this.fetch||y||fetch,p=i.timestampPromise?await i.timestampPromise:void 0,m=JSON.stringify({path:s,format:`convex_encoded_json`,args:l,...p?{ts:p}:{}}),h=await f(p?`${this.address}/api/query_at_ts`:`${this.address}/api/query`,{...this.fetchOptions,body:m,method:`POST`,headers:d});if(!h.ok&&h.status!==560)throw Error(await h.text());let g=await h.json();if(this.debug)for(let e of g.logLines??[])r(this.logger,`info`,`query`,s,e);switch(g.status){case`success`:return a(g.value);case`error`:throw g.errorData===void 0?Error(g.errorMessage):x(g.errorData,new c(g.errorMessage));default:throw Error(`Invalid response: ${JSON.stringify(g)}`)}}async mutationInner(e,n){let i=t(e),s=JSON.stringify({path:i,format:`convex_encoded_json`,args:[o(n)]}),l={"Content-Type":`application/json`,"Convex-Client":`npm-${u}`};this.adminAuth?l.Authorization=`Convex ${this.adminAuth}`:this.auth&&(l.Authorization=`Bearer ${this.auth}`);let d=await(this.fetch||y||fetch)(`${this.address}/api/mutation`,{...this.fetchOptions,body:s,method:`POST`,headers:l});if(!d.ok&&d.status!==560)throw Error(await d.text());let f=await d.json();if(this.debug)for(let e of f.logLines??[])r(this.logger,`info`,`mutation`,i,e);switch(f.status){case`success`:return a(f.value);case`error`:throw f.errorData===void 0?Error(f.errorMessage):x(f.errorData,new c(f.errorMessage));default:throw Error(`Invalid response: ${JSON.stringify(f)}`)}}async processMutationQueue(){if(!this.isProcessingQueue){for(this.isProcessingQueue=!0;
2this.mutationQueue.length>0;){let{mutation:e,args:t,resolve:n,reject:r}=this.mutationQueue.shift();try{n(await this.mutationInner(e,t))}catch(e){r(e)}}this.isProcessingQueue=!1}}enqueueMutation(e,t){return new Promise((n,r)=>{this.mutationQueue.push({mutation:e,args:t,resolve:n,reject:r}),this.processMutationQueue()})}async mutation(e,...t){let[n,r]=t,a=i(n);return r?.skipQueue?await this.mutationInner(e,a):await this.enqueueMutation(e,a)}async action(e,...n){let s=i(n[0]),l=t(e),d=JSON.stringify({path:l,format:`convex_encoded_json`,args:[o(s)]}),f={"Content-Type":`application/json`,"Convex-Client":`npm-${u}`};this.adminAuth?f.Authorization=`Convex ${this.adminAuth}`:this.auth&&(f.Authorization=`Bearer ${this.auth}`);let p=await(this.fetch||y||fetch)(`${this.address}/api/action`,{...this.fetchOptions,body:d,method:`POST`,headers:f});if(!p.ok&&p.status!==560)throw Error(await p.text());let m=await p.json();if(this.debug)for(let e of m.logLines??[])r(this.logger,`info`,`action`,l,e);switch(m.status){case`success`:return a(m.value);case`error`:throw m.errorData===void 0?Error(m.errorMessage):x(m.errorData,new c(m.errorMessage));default:throw Error(`Invalid response: ${JSON.stringify(m)}`)}}async function(e,n,...s){let l=i(s[0]),d=typeof e==`string`?e:t(e),f=JSON.stringify({componentPath:n,path:d,format:`convex_encoded_json`,args:o(l)}),p={"Content-Type":`application/json`,"Convex-Client":`npm-${u}`};this.adminAuth?p.Authorization=`Convex ${this.adminAuth}`:this.auth&&(p.Authorization=`Bearer ${this.auth}`);let m=await(this.fetch||y||fetch)(`${this.address}/api/function`,{...this.fetchOptions,body:f,method:`POST`,headers:p});if(!m.ok&&m.status!==560)throw Error(await m.text());let h=await m.json();if(this.debug)for(let e of h.logLines??[])r(this.logger,`info`,`any`,d,e);switch(h.status){case`success`:return a(h.value);case`error`:throw h.errorData===void 0?Error(h.errorMessage):x(h.errorData,new c(h.errorMessage));default:throw Error(`Invalid response: ${JSON.stringify(h)}`)}}};function x(e,t){return t.data=a(e),t}var S=`https://hw3ttjg707rg073k6oad293b.macaly.app`;async function C(e,...n){let r=await T(e,...n);return{_name:t(e),_argsJSON:o(n[0]??{}),_valueJSON:o(r)}}function w(e){return a(e._valueJSON)}async function T(e,...t){let[n,r]=t;return E(r??{}).query(e,n||{})}function E(e){`url`in e&&e.url===void 0&&console.error("deploymentUrl is undefined, are your environment variables set? In the future explicitly passing undefined will cause an error. To explicitly use the default, pass `process.env.NEXT_PUBLIC_CONVEX_URL`.");let t=new b(D(e.url,e.skipConvexDeploymentUrlCheck??!1));return e.token!==void 0&&t.setAuth(e.token),e.adminToken!==void 0&&t.setAdminAuth(e.adminToken),t.setFetchOptions({cache:`no-store`}),t}function D(t,n){let r=t??{}.NEXT_PUBLIC_CONVEX_URL,i=t===void 0;if(typeof r!=`string`)throw Error(i?`Environment variable NEXT_PUBLIC_CONVEX_URL is not set.`:`Convex function called with invalid deployment address.`);return n||e(r),r}async function O(e,t,n){let r=n?.url??`https://affable-barracuda-835.eu-west-1.convex.cloud`;return C(e,t??{},{url:r})}var k=f(`/reference/detail/$slug`)({loader:async({params:e})=>({preloadedDetail:await O(s.referencePhotos.getDetailBySlug,{slug:e.slug})}),head:({loaderData:e})=>{let t=e?w(e.preloadedDetail):null;if(!t)return{meta:[{title:`Fotka nenalezena | KaufCOLOR`}]};let{photo:n}=t,r=m(n.category),i=h(n.realizationMonth,n.realizationYear,n.location),a=`${n.description} â ${r} | KaufCOLOR`,o=`Reference realizace: ${n.description}. Kategorie: ${r}${i?`, `+i:``}.`;return{meta:[{title:a},{name:`description`,content:o},{property:`og:title`,content:a},{property:`og:description`,content:o},{property:`og:image`,content:n.url},{property:`og:type`,content:`article`},{name:`twitter:card`,content:`summary_large_image`}],links:[{rel:`canonical`,href:`${S}/reference/detail/${n.slug}`}]}},component:d(()=>p(()=>import(`./reference.detail._slug-DQE_XJeE.js`),__vite__mapDeps([0,1,2,3,4,5])),`component`)});export{S as n,b as r,k as t};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.