1import{aV as De,bd as _e,b2 as Ae,b7 as re,be as ie}from"./Ds9SuTJ1.js";(function(){try{var n=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};n.SENTRY_RELEASE={id:"b24213e2c22b5a7ffb9ebe42a4a1af091c72d06b"};var e=new n.Error().stack;e&&(n._sentryDebugIds=n._sentryDebugIds||{},n._sentryDebugIds[e]="38b2df5c-b124-4160-a9da-5753be23d873",n._sentryDebugIdIdentifier="sentry-dbid-38b2df5c-b124-4160-a9da-5753be23d873")}catch{}})();const i=Symbol.for("drizzle:entityKind");function I(n,e){if(!n||typeof n!="object")return!1;if(n instanceof e)return!0;if(!Object.prototype.hasOwnProperty.call(e,i))throw new Error(`Class "${e.name??"<unknown>"}" doesn't look like a Drizzle entity. If this is incorrect and the class is provided by Drizzle, please report this as a bug.`);let t=Object.getPrototypeOf(n).constructor;if(t)for(;t;){if(i in t&&t[i]===e[i])return!0;t=Object.getPrototypeOf(t)}return!1}class Z{constructor(e,t){this.table=e,this.config=t,this.name=t.name,this.keyAsName=t.keyAsName,this.notNull=t.notNull,this.default=t.default,this.defaultFn=t.defaultFn,this.onUpdateFn=t.onUpdateFn,this.hasDefault=t.hasDefault,this.primary=t.primaryKey,this.isUnique=t.isUnique,this.uniqueName=t.uniqueName,this.uniqueType=t.uniqueType,this.dataType=t.dataType,this.columnType=t.columnType,this.generated=t.generated,this.generatedIdentity=t.generatedIdentity}static[i]="Column";name;keyAsName;primary;notNull;default;defaultFn;onUpdateFn;hasDefault;isUnique;uniqueName;uniqueType;dataType;columnType;enumValues=void 0;generated=void 0;generatedIdentity=void 0;config;mapFromDriverValue(e){return e}mapToDriverValue(e){return e}shouldDisableInsert(){return this.config.generated!==void 0&&this.config.generated.type!=="byDefault"}}class ve{static[i]="ColumnBuilder";config;constructor(e,t,r){this.config={name:e,keyAsName:e==="",notNull:!1,default:void 0,hasDefault:!1,primaryKey:!1,isUnique:!1,uniqueName:void 0,uniqueType:void 0,dataType:t,columnType:r,generated:void 0}}$type(){return this}notNull(){return this.config.notNull=!0,this}default(e){return this.config.default=e,this.config.hasDefault=!0,this}$defaultFn(e){return this.config.defaultFn=e,this.config.hasDefault=!0,this}$default=this.$defaultFn;$onUpdateFn(e){return this.config.onUpdateFn=e,this.config.hasDefault=!0,this}$onUpdate=this.$onUpdateFn;primaryKey(){return this.config.primaryKey=!0,this.config.notNull=!0,this}setName(e){this.config.name===""&&(this.config.name=e)}}const V=Symbol.for("drizzle:Name");class de{static[i]="PgForeignKeyBuilder";reference;_onUpdate="no action";_onDelete="no action";constructor(e,t){this.reference=()=>{const{name:r,columns:o,foreignColumns:l}=e();return{name:r,columns:o,foreignTable:l[0].table,foreignColumns:l}},t&&(this._onUpdate=t.onUpdate,this._onDelete=t.onDelete)}onUpdate(e){return this._onUpdate=e===void 0?"no action":e,this}onDelete(e){return this._onDelete=e===void 0?"no action":e,this}build(e){return new Ve(e,this)}}class Ve{constructor(e,t){this.table=e,this.reference=t.reference,this.onUpdate=t._onUpdate,this.onDelete=t._onDelete}static[i]="PgForeignKey";reference;onUpdate;onDelete;getName(){const{name:e,columns:t,foreignColumns:r}=this.reference(),o=t.map(w=>w.name),l=r.map(w=>w.name),P=[this.table[V],...o,r[0].table[V],...l];return e??`${P.join("_")}_fk`}}function Ee(n){function e(){const{name:t,columns:r,foreignColumns:o}=n;return{name:t,columns:r,foreignColumns:o}}return new de(e)}function Le(n,...e){return n(...e)}function Fe(n,e){return`${n[V]}_${e.join("_")}_unique`}function se(n,e,t){for(let r=e;r<n.length;r++){const o=n[r];if(o==="\\"){r++;continue}if(o==='"')return[n.slice(e,r).replace(/\\/g,""),r+1];if(!t&&(o===","||o==="}"))return[n.slice(e,r).replace(/\\/g,""),r]}return[n.slice(e).replace(/\\/g,""),n.length]}function me(n,e=0){const t=[];let r=e,o=!1;for(;r<n.length;){const l=n[r];if(l===","){(o||r===e)&&t.push(""),o=!0,r++;continue}if(o=!1,l==="\\"){r+=2;continue}if(l==='"'){const[y,N]=se(n,r+1,!0);t.push(y),r=N;continue}if(l==="}")return[t,r+1];if(l==="{"){const[y,N]=me(n,r+1);t.push(y),r=N;continue}const[P,w]=se(n,r,!1);t.push(P),r=w}return[t,r]}function qe(n){const[e]=me(n,1);return e}function ge(n){return`{${n.map(e=>Array.isArray(e)?ge(e):typeof e=="string"?`"${e.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}"`:`${e}`).join(",")}}`}class m extends ve{foreignKeyConfigs=[];static[i]="PgColumnBuilder";array(e){return new Oe(this.config.name,this,e)}references(e,t={}){return this.foreignKeyConfigs.push({ref:e,actions:t}),this}unique(e,t){return this.config.isUnique=!0,this.config.uniqueName=e,this.config.uniqueType=t?.nulls,this}generatedAlwaysAs(e){return this.config.generated={as:e,type:"always",mode:"stored"},this}buildForeignKeys(e,t){return this.foreignKeyConfigs.map(({ref:r,actions:o})=>Le((l,P)=>{const w=new de(()=>{const y=l();return{columns:[e],foreignColumns:[y]}});return P.onUpdate&&w.onUpdate(P.onUpdate),P.onDelete&&w.onDelete(P.onDelete),w.build(t)},r,o))}buildExtraConfigColumn(e){return new ze(e,this.config)}}class c extends Z{constructor(e,t){t.uniqueName||(t.uniqueName=Fe(e,[t.name])),super(e,t),this.table=e}static[i]="PgColumn"}class ze extends c{static[i]="ExtraConfigColumn";
1getSQLType(){return this.getSQLType()}indexConfig={order:this.config.order??"asc",nulls:this.config.nulls??"last",opClass:this.config.opClass};defaultConfig={order:"asc",nulls:"last",opClass:void 0};asc(){return this.indexConfig.order="asc",this}desc(){return this.indexConfig.order="desc",this}nullsFirst(){return this.indexConfig.nulls="first",this}nullsLast(){return this.indexConfig.nulls="last",this}op(e){return this.indexConfig.opClass=e,this}}class U{static[i]="IndexedColumn";constructor(e,t,r,o){this.name=e,this.keyAsName=t,this.type=r,this.indexConfig=o}name;keyAsName;type;indexConfig}class Oe extends m{static[i]="PgArrayBuilder";constructor(e,t,r){super(e,"array","PgArray"),this.config.baseBuilder=t,this.config.size=r}build(e){const t=this.config.baseBuilder.build(e);return new ee(e,this.config,t)}}class ee extends c{constructor(e,t,r,o){super(e,t),this.baseColumn=r,this.range=o,this.size=t.size}size;static[i]="PgArray";getSQLType(){return`${this.baseColumn.getSQLType()}[${typeof this.size=="number"?this.size:""}]`}mapFromDriverValue(e){return typeof e=="string"&&(e=qe(e)),e.map(t=>this.baseColumn.mapFromDriverValue(t))}mapToDriverValue(e,t=!1){const r=e.map(o=>o===null?null:I(this.baseColumn,ee)?this.baseColumn.mapToDriverValue(o,!0):this.baseColumn.mapToDriverValue(o));return t?r:ge(r)}}class je extends m{static[i]="PgEnumObjectColumnBuilder";constructor(e,t){super(e,"string","PgEnumObjectColumn"),this.config.enum=t}build(e){return new $e(e,this.config)}}class $e extends c{static[i]="PgEnumObjectColumn";enum;enumValues=this.config.enum.enumValues;constructor(e,t){super(e,t),this.enum=t.enum}getSQLType(){return this.enum.enumName}}const O=Symbol.for("drizzle:isPgEnum");function Qe(n){return!!n&&typeof n=="function"&&O in n&&n[O]===!0}class Ke extends m{static[i]="PgEnumColumnBuilder";constructor(e,t){super(e,"string","PgEnumColumn"),this.config.enum=t}build(e){return new Re(e,this.config)}}class Re extends c{static[i]="PgEnumColumn";enum=this.config.enum;enumValues=this.config.enum.enumValues;constructor(e,t){super(e,t),this.enum=t.enum}getSQLType(){return this.enum.enumName}}function B(n,e){return Array.isArray(e)?Ue(n,[...e],void 0):Je(n,e,void 0)}function Ue(n,e,t){const r=Object.assign(o=>new Ke(o??"",r),{enumName:n,enumValues:e,schema:t,[O]:!0});return r}function Je(n,e,t){const r=Object.assign(o=>new je(o??"",r),{enumName:n,enumValues:Object.values(e),schema:t,[O]:!0});return r}class pe{static[i]="Subquery";constructor(e,t,r,o=!1,l=[]){this._={brand:"Subquery",sql:e,selectedFields:t,alias:r,isWith:o,usedTables:l}}}const Me={startActiveSpan(n,e){return e()}},E=Symbol.for("drizzle:ViewBaseConfig"),J=Symbol.for("drizzle:Schema"),oe=Symbol.for("drizzle:Columns"),ae=Symbol.for("drizzle:ExtraConfigColumns"),M=Symbol.for("drizzle:OriginalName"),W=Symbol.for("drizzle:BaseName"),j=Symbol.for("drizzle:IsAlias"),ue=Symbol.for("drizzle:ExtraConfigBuilder"),We=Symbol.for("drizzle:IsDrizzleTable");class x{static[i]="Table";static Symbol={Name:V,Schema:J,OriginalName:M,Columns:oe,ExtraConfigColumns:ae,BaseName:W,IsAlias:j,ExtraConfigBuilder:ue};[V];[M];[J];[oe];[ae];[W];[j]=!1;[We]=!0;[ue]=void 0;constructor(e,t,r){this[V]=this[M]=e,this[J]=t,this[W]=r}}function He(n){return n!=null&&typeof n.getSQL=="function"}function ke(n){const e={sql:"",params:[]};for(const t of n)e.sql+=t.sql,e.params.push(...t.params),t.typings?.length&&(e.typings||(e.typings=[]),e.typings.push(...t.typings));return e}class C{static[i]="StringChunk";value;constructor(e){this.value=Array.isArray(e)?e:[e]}getSQL(){return new h([this])}}class h{constructor(e){this.queryChunks=e;for(const t of e)if(I(t,x)){const r=t[x.Symbol.Schema];this.usedTables.push(r===void 0?t[x.Symbol.Name]:r+"."+t[x.Symbol.Name])}}static[i]="SQL";decoder=fe;shouldInlineParams=!1;usedTables=[];append(e){return this.queryChunks.push(...e.queryChunks),this}toQuery(e){return Me.startActiveSpan("drizzle.buildSQL",t=>{const r=this.buildQueryFromSourceParams(this.queryChunks,e);return t?.setAttributes({"drizzle.query.text":r.sql,"drizzle.query.params":JSON.stringify(r.params)}),r})}buildQueryFromSourceParams(e,t){const r=Object.assign({},t,{inlineParams:t.inlineParams||this.shouldInlineParams,paramStartIndex:t.paramStartIndex||{value:0}}),{casing:o,escapeName:l,escapeParam:P,prepareTyping:w,inlineParams:y,paramStartIndex:N}=r;return ke(e.map(a=>{if(I(a,C))return{sql:a.value.join(""),params:[]};if(I(a,G))return{sql:l(a.value),params:[]};if(a===void 0)return{sql:"",params:[]};if(Array.isArray(a)){const f=[new C("(")];for(const[b,v]of a.entries())f.push(v),b<a.length-1&&f.push(new C(", "));return f.push(new C(")")),this.buildQueryFromSourceParams(f,r)}if(I(a,h))return this.buildQueryFromSourceParams(a.queryChunks,{...r,inlineParams:y||a.shouldInlineParams});if(I(a,x)){const f=a[x.Symbol.Schema],b=a[x.Symbol.Name];return{sql:f===void 0||a[j]?l(b):l(f)+"."+l(b),params:[]}}if(I(a,Z)){const f=o.getColumnCasing(a);if(t.invokeSource==="indexes")return{sql:l(f),params:[]};const b=a.table[x.Symbol.Schema];return{sql:a.table[j]||b===void 0?l(a.table[x.Symbol.Name])+"."+l(f):l(b)+"."+l(a.table[x.Symbol.Name])+"."+l(f),params:[]}}if(I(a,Ye)){const f=a[E].schema,b=a[E].name;return{sql:f===void 0||a[E].isAlias?l(b):l(f)+"."+l(b),params:[]}}if(I(a,he)){if(I(a.value,Y))return{sql:P(N.value++,a),params:[a],typings:["none"]};const f=a.value===null?null:a.encoder.mapToDriverValue(a.value);if(I(f,h))return this.buildQueryFromSourceParams([f],r);if(y)return{sql:this.mapInlineParam(f,r),params:[]};let b=["none"];return w&&(b=[w(a.encoder)]),{sql:P(N.value++,f),params:[f],typings:b}}return I(a,Y)?{sql:P(N.value++,a),params:[a],typings:["none"]}:I(a,h.Aliased)&&a.fieldAlias!==void 0?{sql:l(a.fieldAlias),params:[]}:I(a,pe)?a._.isWith?{sql:l(a._.alias),params:[]}:this.buildQueryFromSourceParams([new C("("),a._.sql,new C(") "),new G(a._.alias)],r):Qe(a)?a.schema?{sql:l(a.schema)+"."+l(a.enumName),params:[]}:{sql:l(a.enumName),params:[]}:He(a)?a.shouldOmitSQLParens?.()?this.buildQueryFromSourceParams([a.getSQL()],r):this.buildQueryFromSourceParams([new C("("),a.getSQL(),new C(")")],r):y?{sql:this.mapInlineParam(a,r),params:[]}:{sql:P(N.value++,a),params:[a],typings:["none"]}}))}mapInlineParam(e,{escapeString:t}
1){if(e===null)return"null";if(typeof e=="number"||typeof e=="boolean")return e.toString();if(typeof e=="string")return t(e);if(typeof e=="object"){const r=e.toString();return t(r==="[object Object]"?JSON.stringify(e):r)}throw new Error("Unexpected param value: "+e)}getSQL(){return this}as(e){return e===void 0?this:new h.Aliased(this,e)}mapWith(e){return this.decoder=typeof e=="function"?{mapFromDriverValue:e}:e,this}inlineParams(){return this.shouldInlineParams=!0,this}if(e){return e?this:void 0}}class G{constructor(e){this.value=e}static[i]="Name";brand;getSQL(){return new h([this])}}const fe={mapFromDriverValue:n=>n},ye={mapToDriverValue:n=>n};({...fe,...ye});class he{constructor(e,t=ye){this.value=e,this.encoder=t}static[i]="Param";brand;getSQL(){return new h([this])}}function D(n,...e){const t=[];(e.length>0||n.length>0&&n[0]!=="")&&t.push(new C(n[0]));for(const[r,o]of e.entries())t.push(o,new C(n[r+1]));return new h(t)}(n=>{function e(){return new h([])}n.empty=e;function t(y){return new h(y)}n.fromList=t;function r(y){return new h([new C(y)])}n.raw=r;function o(y,N){const a=[];for(const[f,b]of y.entries())f>0&&N!==void 0&&a.push(N),a.push(b);return new h(a)}n.join=o;function l(y){return new G(y)}n.identifier=l;function P(y){return new Y(y)}n.placeholder=P;function w(y,N){return new he(y,N)}n.param=w})(D||(D={}));(n=>{class e{constructor(r,o){this.sql=r,this.fieldAlias=o}static[i]="SQL.Aliased";isSelectionField=!1;getSQL(){return this.sql}clone(){return new e(this.sql,this.fieldAlias)}}n.Aliased=e})(h||(h={}));class Y{constructor(e){this.name=e}static[i]="Placeholder";getSQL(){return new h([this])}}const Ge=Symbol.for("drizzle:IsDrizzleView");class Ye{static[i]="View";[E];[Ge]=!0;constructor({name:e,schema:t,selectedFields:r,query:o}){this[E]={name:e,originalName:e,schema:t,selectedFields:r,query:o,isExisting:!o,isAlias:!1}}getSQL(){return new h([this])}}Z.prototype.getSQL=function(){return new h([this])};x.prototype.getSQL=function(){return new h([this])};pe.prototype.getSQL=function(){return new h([this])};class Xe{constructor(e,t){this.name=e,this.value=t}static[i]="PgCheckBuilder";brand;build(e){return new Ze(e,this)}}class Ze{constructor(e,t){this.table=e,this.name=t.name,this.value=t.value}static[i]="PgCheck";name;value}function $(n,e){return new Xe(n,e)}function T(n,e){return{name:typeof n=="string"&&n.length>0?n:"",config:typeof n=="object"?n:e}}typeof TextDecoder>"u"||new TextDecoder;class K extends m{static[i]="PgIntColumnBaseBuilder";generatedAlwaysAsIdentity(e){if(e){const{name:t,...r}=e;this.config.generatedIdentity={type:"always",sequenceName:t,sequenceOptions:r}}else this.config.generatedIdentity={type:"always"};return this.config.hasDefault=!0,this.config.notNull=!0,this}generatedByDefaultAsIdentity(e){if(e){const{name:t,...r}=e;this.config.generatedIdentity={type:"byDefault",sequenceName:t,sequenceOptions:r}}else this.config.generatedIdentity={type:"byDefault"};return this.config.hasDefault=!0,this.config.notNull=!0,this}}class et extends K{static[i]="PgBigInt53Builder";constructor(e){super(e,"number","PgBigInt53")}build(e){return new tt(e,this.config)}}class tt extends c{static[i]="PgBigInt53";getSQLType(){return"bigint"}mapFromDriverValue(e){return typeof e=="number"?e:Number(e)}}class nt extends K{static[i]="PgBigInt64Builder";constructor(e){super(e,"bigint","PgBigInt64")}build(e){return new rt(e,this.config)}}class rt extends c{static[i]="PgBigInt64";getSQLType(){return"bigint"}mapFromDriverValue(e){return BigInt(e)}}function it(n,e){const{name:t,config:r}=T(n,e);return r.mode==="number"?new et(t):new nt(t)}class st extends m{static[i]="PgBigSerial53Builder";constructor(e){super(e,"number","PgBigSerial53"),this.config.hasDefault=!0,this.config.notNull=!0}build(e){return new ot(e,this.config)}}class ot extends c{static[i]="PgBigSerial53";getSQLType(){return"bigserial"}mapFromDriverValue(e){return typeof e=="number"?e:Number(e)}}class at extends m{static[i]="PgBigSerial64Builder";constructor(e){super(e,"bigint","PgBigSerial64"),this.config.hasDefault=!0}build(e){return new ut(e,this.config)}}
1class ut extends c{static[i]="PgBigSerial64";getSQLType(){return"bigserial"}mapFromDriverValue(e){return BigInt(e)}}function lt(n,e){const{name:t,config:r}=T(n,e);return r.mode==="number"?new st(t):new at(t)}class ct extends m{static[i]="PgBooleanBuilder";constructor(e){super(e,"boolean","PgBoolean")}build(e){return new dt(e,this.config)}}class dt extends c{static[i]="PgBoolean";getSQLType(){return"boolean"}}function S(n){return new ct(n??"")}class mt extends m{static[i]="PgCharBuilder";constructor(e,t){super(e,"string","PgChar"),this.config.length=t.length,this.config.enumValues=t.enum}build(e){return new gt(e,this.config)}}class gt extends c{static[i]="PgChar";length=this.config.length;enumValues=this.config.enumValues;getSQLType(){return this.length===void 0?"char":`char(${this.length})`}}function pt(n,e={}){const{name:t,config:r}=T(n,e);return new mt(t,r)}class ft extends m{static[i]="PgCidrBuilder";constructor(e){super(e,"string","PgCidr")}build(e){return new yt(e,this.config)}}class yt extends c{static[i]="PgCidr";getSQLType(){return"cidr"}}function ht(n){return new ft(n??"")}class bt extends m{static[i]="PgCustomColumnBuilder";constructor(e,t,r){super(e,"custom","PgCustomColumn"),this.config.fieldConfig=t,this.config.customTypeParams=r}build(e){return new Pt(e,this.config)}}class Pt extends c{static[i]="PgCustomColumn";sqlName;mapTo;mapFrom;constructor(e,t){super(e,t),this.sqlName=t.customTypeParams.dataType(t.fieldConfig),this.mapTo=t.customTypeParams.toDriver,this.mapFrom=t.customTypeParams.fromDriver}getSQLType(){return this.sqlName}mapFromDriverValue(e){return typeof this.mapFrom=="function"?this.mapFrom(e):e}mapToDriverValue(e){return typeof this.mapTo=="function"?this.mapTo(e):e}}function Nt(n){return(e,t)=>{const{name:r,config:o}=T(e,t);return new bt(r,o,n)}}class z extends m{static[i]="PgDateColumnBaseBuilder";defaultNow(){return this.default(D`now()`)}}class wt extends z{static[i]="PgDateBuilder";constructor(e){super(e,"date","PgDate")}build(e){return new St(e,this.config)}}class St extends c{static[i]="PgDate";getSQLType(){return"date"}mapFromDriverValue(e){return typeof e=="string"?new Date(e):e}mapToDriverValue(e){return e.toISOString()}}class Tt extends z{static[i]="PgDateStringBuilder";constructor(e){super(e,"string","PgDateString")}build(e){return new It(e,this.config)}}class It extends c{static[i]="PgDateString";
1getSQLType(){return"date"}mapFromDriverValue(e){return typeof e=="string"?e:e.toISOString().slice(0,-14)}}function L(n,e){const{name:t,config:r}=T(n,e);return r?.mode==="date"?new wt(t):new Tt(t)}class xt extends m{static[i]="PgDoublePrecisionBuilder";constructor(e){super(e,"number","PgDoublePrecision")}build(e){return new Ct(e,this.config)}}class Ct extends c{static[i]="PgDoublePrecision";getSQLType(){return"double precision"}mapFromDriverValue(e){return typeof e=="string"?Number.parseFloat(e):e}}function Bt(n){return new xt(n??"")}class Dt extends m{static[i]="PgInetBuilder";constructor(e){super(e,"string","PgInet")}build(e){return new _t(e,this.config)}}class _t extends c{static[i]="PgInet";getSQLType(){return"inet"}}function At(n){return new Dt(n??"")}class vt extends K{static[i]="PgIntegerBuilder";constructor(e){super(e,"number","PgInteger")}build(e){return new Vt(e,this.config)}}class Vt extends c{static[i]="PgInteger";getSQLType(){return"integer"}mapFromDriverValue(e){return typeof e=="string"?Number.parseInt(e):e}}function u(n){return new vt(n??"")}class Et extends m{static[i]="PgIntervalBuilder";constructor(e,t){super(e,"string","PgInterval"),this.config.intervalConfig=t}build(e){return new Lt(e,this.config)}}class Lt extends c{static[i]="PgInterval";fields=this.config.intervalConfig.fields;precision=this.config.intervalConfig.precision;getSQLType(){const e=this.fields?` ${this.fields}`:"",t=this.precision?`(${this.precision})`:"";return`interval${e}${t}`}}function Ft(n,e={}){const{name:t,config:r}=T(n,e);return new Et(t,r)}class qt extends m{static[i]="PgJsonBuilder";constructor(e){super(e,"json","PgJson")}build(e){return new zt(e,this.config)}}class zt extends c{static[i]="PgJson";constructor(e,t){super(e,t)}getSQLType(){return"json"}mapToDriverValue(e){return JSON.stringify(e)}mapFromDriverValue(e){if(typeof e=="string")try{return JSON.parse(e)}catch{return e}return e}}function be(n){return new qt(n??"")}class Ot extends m{static[i]="PgJsonbBuilder";constructor(e){super(e,"json","PgJsonb")}build(e){return new jt(e,this.config)}}class jt extends c{static[i]="PgJsonb";constructor(e,t){super(e,t)}getSQLType(){return"jsonb"}mapToDriverValue(e){return JSON.stringify(e)}mapFromDriverValue(e){if(typeof e=="string")try{return JSON.parse(e)}catch{return e}return e}}function A(n){return new Ot(n??"")}class $t extends m{static[i]="PgLineBuilder";constructor(e){super(e,"array","PgLine")}build(e){return new Qt(e,this.config)}}class Qt extends c{static[i]="PgLine";getSQLType(){return"line"}mapFromDriverValue(e){const[t,r,o]=e.slice(1,-1).split(",");return[Number.parseFloat(t),Number.parseFloat(r),Number.parseFloat(o)]}mapToDriverValue(e){return`{${e[0]},${e[1]},${e[2]}}`}}class Kt extends m{static[i]="PgLineABCBuilder";constructor(e){super(e,"json","PgLineABC")}build(e){return new Rt(e,this.config)}}class Rt extends c{static[i]="PgLineABC";getSQLType(){return"line"}mapFromDriverValue(e){const[t,r,o]=e.slice(1,-1).split(",");return{a:Number.parseFloat(t),b:Number.parseFloat(r),c:Number.parseFloat(o)}}mapToDriverValue(e){return`{${e.a},${e.b},${e.c}}`}}function Ut(n,e){const{name:t,config:r}=T(n,e);return!r?.mode||r.mode==="tuple"?new $t(t):new Kt(t)}class Jt extends m{static[i]="PgMacaddrBuilder";constructor(e){super(e,"string","PgMacaddr")}build(e){return new Mt(e,this.config)}}class Mt extends c{static[i]="PgMacaddr";getSQLType(){return"macaddr"}}function Wt(n){return new Jt(n??"")}class Ht extends m{static[i]="PgMacaddr8Builder";constructor(e){super(e,"string","PgMacaddr8")}build(e){return new kt(e,this.config)}}class kt extends c{static[i]="PgMacaddr8";getSQLType(){return"macaddr8"}}function Gt(n){return new Ht(n??"")}class Yt extends m{static[i]="PgNumericBuilder";constructor(e,t,r){super(e,"string","PgNumeric"),this.config.precision=t,this.config.scale=r}build(e){return new Xt(e,this.config)}}class Xt extends c{static[i]="PgNumeric";precision;scale;constructor(e,t){super(e,t),this.precision=t.precision,this.scale=t.scale}mapFromDriverValue(e){return typeof e=="string"?e:String(e)}getSQLType(){return this.precision!==void 0&&this.scale!==void 0?`numeric(${this.precision}, ${this.scale})`:this.precision===void 0?"numeric":`numeric(${this.precision})`}}class Zt extends m{static[i]="PgNumericNumberBuilder";constructor(e,t,r){super(e,"number","PgNumericNumber"),this.config.precision=t,this.config.scale=r}build(e){return new en(e,this.config)}}class en extends c{static[i]="PgNumericNumber";precision;scale;constructor(e,t){super(e,t),this.precision=t.precision,this.scale=t.scale}mapFromDriverValue(e){return typeof e=="number"?e:Number(e)}mapToDriverValue=String;getSQLType(){return this.precision!==void 0&&this.scale!==void 0?`numeric(${this.precision}, ${this.scale})`:this.precision===void 0?"numeric":`numeric(${this.precision})`}}class tn extends m{static[i]="PgNumericBigIntBuilder";constructor(e,t,r){super(e,"bigint","PgNumericBigInt"),this.config.precision=t,this.config.scale=r}build(e){return new nn(e,this.config)}}class nn extends c{static[i]="PgNumericBigInt";precision;scale;constructor(e,t){super(e,t),this.precision=t.precision,this.scale=t.scale}mapFromDriverValue=BigInt;mapToDriverValue=String;getSQLType(){return this.precision!==void 0&&this.scale!==void 0?`numeric(${this.precision}, ${this.scale})`:this.precision===void 0?"numeric":`numeric(${this.precision})`}}function rn(n,e){const{name:t,config:r}=T(n,e),o=r?.mode;return o==="number"?new Zt(t,r?.precision,r?.scale):o==="bigint"?new tn(t,r?.precision,r?.scale):new Yt(t,r?.precision,r?.scale)}class sn extends m{static[i]="PgPointTupleBuilder";constructor(e){super(e,"array","PgPointTuple")}build(e){return new on(e,this.config)}}class on extends c{static[i]="PgPointTuple";getSQLType(){return"point"}mapFromDriverValue(e){if(typeof e=="string"){const[t,r]=e.slice(1,-1).split(",");return[Number.parseFloat(t),Number.parseFloat(r)]}return[e.x,e.y]}mapToDriverValue(e){return`(${e[0]},${e[1]})`}}class an extends m{static[i]="PgPointObjectBuilder";constructor(e){super(e,"json","PgPointObject")}build(e){return new un(e,this.config)}}class un extends c{static[i]="PgPointObject";getSQLType(){return"point"}mapFromDriverValue(e){if(typeof e=="string"){const[t,r]=e.slice(1,-1).split(",");return{x:Number.parseFloat(t),y:Number.parseFloat(r)}}return e}mapToDriverValue(e){return`(${e.x},${e.y})`}}function ln(n,e){const{name:t,config:r}=T(n,e);return!r?.mode||r.mode==="tuple"?new sn(t):new an(t)}function cn(n){const e=[];for(let t=0;t<n.length;t+=2)e.push(Number.parseInt(n.slice(t,t+2),16));return new Uint8Array(e)}function le(n,e){const t=new ArrayBuffer(8),r=new DataView(t);for(let o=0;o<8;o++)r.setUint8(o,n[e+o]);return r.getFloat64(0,!0)}function Pe(n){const e=cn(n);let t=0;const r=e[t];t+=1;const o=new DataView(e.buffer),l=o.getUint32(t,r===1);if(t+=4,l&536870912&&(o.getUint32(t,r===1),t+=4),(l&65535)===1){const P=le(e,t);t+=8;const w=le(e,t);return t+=8,[P,w]}throw new Error("Unsupported geometry type")}class dn extends m{static[i]="PgGeometryBuilder";constructor(e){super(e,"array","PgGeometry")}build(e){return new mn(e,this.config)}}class mn extends c{static[i]="PgGeometry";getSQLType(){return"geometry(point)"}mapFromDriverValue(e){return Pe(e)}mapToDriverValue(e){return`point(${e[0]} ${e[1]})`}}class gn extends m{static[i]="PgGeometryObjectBuilder";constructor(e){super(e,"json","PgGeometryObject")}build(e){return new pn(e,this.config)}}class pn extends c{static[i]="PgGeometryObject";getSQLType(){return"geometry(point)"}mapFromDriverValue(e){const t=Pe(e);return{x:t[0],y:t[1]}}mapToDriverValue(e){return`point(${e.x} ${e.y})`}}function fn(n,e){const{name:t,config:r}=T(n,e);return!r?.mode||r.mode==="tuple"?new dn(t):new gn(t)}class yn extends m{static[i]="PgRealBuilder";constructor(e,t){super(e,"number","PgReal"),this.config.length=t}build(e){return new hn(e,this.config)}}class hn extends c{static[i]="PgReal";constructor(e,t){super(e,t)}getSQLType(){return"real"}mapFromDriverValue=e=>typeof e=="string"?Number.parseFloat(e):e}function F(n){return new yn(n??"")}class bn extends m{static[i]="PgSerialBuilder";constructor(e){super(e,"number","PgSerial"),this.config.hasDefault=!0,this.config.notNull=!0}build(e){return new Pn(e,this.config)}}class Pn extends c{static[i]="PgSerial";
1getSQLType(){return"serial"}}function Nn(n){return new bn(n??"")}class wn extends K{static[i]="PgSmallIntBuilder";constructor(e){super(e,"number","PgSmallInt")}build(e){return new Sn(e,this.config)}}class Sn extends c{static[i]="PgSmallInt";getSQLType(){return"smallint"}mapFromDriverValue=e=>typeof e=="string"?Number(e):e}function Tn(n){return new wn(n??"")}class In extends m{static[i]="PgSmallSerialBuilder";constructor(e){super(e,"number","PgSmallSerial"),this.config.hasDefault=!0,this.config.notNull=!0}build(e){return new xn(e,this.config)}}class xn extends c{static[i]="PgSmallSerial";getSQLType(){return"smallserial"}}function Cn(n){return new In(n??"")}class Bn extends m{static[i]="PgTextBuilder";constructor(e,t){super(e,"string","PgText"),this.config.enumValues=t.enum}build(e){return new Dn(e,this.config)}}class Dn extends c{static[i]="PgText";enumValues=this.config.enumValues;getSQLType(){return"text"}}function q(n,e={}){const{name:t,config:r}=T(n,e);return new Bn(t,r)}class _n extends z{constructor(e,t,r){super(e,"string","PgTime"),this.withTimezone=t,this.precision=r,this.config.withTimezone=t,this.config.precision=r}static[i]="PgTimeBuilder";build(e){return new An(e,this.config)}}class An extends c{static[i]="PgTime";withTimezone;precision;constructor(e,t){super(e,t),this.withTimezone=t.withTimezone,this.precision=t.precision}getSQLType(){return`time${this.precision===void 0?"":`(${this.precision})`}${this.withTimezone?" with time zone":""}`}}function vn(n,e={}){const{name:t,config:r}=T(n,e);return new _n(t,r.withTimezone??!1,r.precision)}class Vn extends z{static[i]="PgTimestampBuilder";constructor(e,t,r){super(e,"date","PgTimestamp"),this.config.withTimezone=t,this.config.precision=r}build(e){return new En(e,this.config)}}class En extends c{static[i]="PgTimestamp";withTimezone;precision;constructor(e,t){super(e,t),this.withTimezone=t.withTimezone,this.precision=t.precision}getSQLType(){return`timestamp${this.precision===void 0?"":` (${this.precision})`}${this.withTimezone?" with time zone":""}`}mapFromDriverValue(e){return typeof e=="string"?new Date(this.withTimezone?e:e+"+0000"):e}mapToDriverValue=e=>e.toISOString()}class Ln extends z{static[i]="PgTimestampStringBuilder";constructor(e,t,r){super(e,"string","PgTimestampString"),this.config.withTimezone=t,this.config.precision=r}build(e){return new Fn(e,this.config)}}class Fn extends c{static[i]="PgTimestampString";withTimezone;precision;constructor(e,t){super(e,t),this.withTimezone=t.withTimezone,this.precision=t.precision}getSQLType(){return`timestamp${this.precision===void 0?"":`(${this.precision})`}${this.withTimezone?" with time zone":""}`}mapFromDriverValue(e){if(typeof e=="string")return e;const t=e.toISOString().slice(0,-1).replace("T"," ");if(this.withTimezone){const r=e.getTimezoneOffset(),o=r<=0?"+":"-";return`${t}${o}${Math.floor(Math.abs(r)/60).toString().padStart(2,"0")}`}return t}}function g(n,e={}){const{name:t,config:r}=T(n,e);return r?.mode==="string"?new Ln(t,r.withTimezone??!1,r.precision):new Vn(t,r?.withTimezone??!1,r?.precision)}class qn extends m{static[i]="PgUUIDBuilder";constructor(e){super(e,"string","PgUUID")}defaultRandom(){return this.default(D`gen_random_uuid()`)}build(e){return new zn(e,this.config)}}class zn extends c{static[i]="PgUUID";getSQLType(){return"uuid"}}function p(n){return new qn(n??"")}class On extends m{static[i]="PgVarcharBuilder";constructor(e,t){super(e,"string","PgVarchar"),this.config.length=t.length,this.config.enumValues=t.enum}build(e){return new jn(e,this.config)}}class jn extends c{static[i]="PgVarchar";length=this.config.length;enumValues=this.config.enumValues;getSQLType(){return this.length===void 0?"varchar":`varchar(${this.length})`}}function s(n,e={}){const{name:t,config:r}=T(n,e);return new On(t,r)}class $n extends m{static[i]="PgBinaryVectorBuilder";constructor(e,t){super(e,"string","PgBinaryVector"),this.config.dimensions=t.dimensions}build(e){return new Qn(e,this.config)}}class Qn extends c{static[i]="PgBinaryVector";dimensions=this.config.dimensions;getSQLType(){return`bit(${this.dimensions})`}}function Kn(n,e){const{name:t,config:r}=T(n,e);return new $n(t,r)}class Rn extends m{static[i]="PgHalfVectorBuilder";constructor(e,t){super(e,"array","PgHalfVector"),this.config.dimensions=t.dimensions}build(e){return new Un(e,this.config)}}class Un extends c{static[i]="PgHalfVector";dimensions=this.config.dimensions;getSQLType(){return`halfvec(${this.dimensions})`}mapToDriverValue(e){return JSON.stringify(e)}mapFromDriverValue(e){return e.slice(1,-1).split(",").map(t=>Number.parseFloat(t))}}function Jn(n,e){const{name:t,config:r}=T(n,e);return new Rn(t,r)}class Mn extends m{static[i]="PgSparseVectorBuilder";constructor(e,t){super(e,"string","PgSparseVector"),this.config.dimensions=t.dimensions}build(e){return new Wn(e,this.config)}}
1class Wn extends c{static[i]="PgSparseVector";dimensions=this.config.dimensions;getSQLType(){return`sparsevec(${this.dimensions})`}}function Hn(n,e){const{name:t,config:r}=T(n,e);return new Mn(t,r)}class kn extends m{static[i]="PgVectorBuilder";constructor(e,t){super(e,"array","PgVector"),this.config.dimensions=t.dimensions}build(e){return new Gn(e,this.config)}}class Gn extends c{static[i]="PgVector";dimensions=this.config.dimensions;getSQLType(){return`vector(${this.dimensions})`}mapToDriverValue(e){return JSON.stringify(e)}mapFromDriverValue(e){return e.slice(1,-1).split(",").map(t=>Number.parseFloat(t))}}function Yn(n,e){const{name:t,config:r}=T(n,e);return new kn(t,r)}function Xn(){return{bigint:it,bigserial:lt,boolean:S,char:pt,cidr:ht,customType:Nt,date:L,doublePrecision:Bt,inet:At,integer:u,interval:Ft,json:be,jsonb:A,line:Ut,macaddr:Wt,macaddr8:Gt,numeric:rn,point:ln,geometry:fn,real:F,serial:Nn,smallint:Tn,smallserial:Cn,text:q,time:vn,timestamp:g,uuid:p,varchar:s,bit:Kn,halfvec:Jn,sparsevec:Hn,vector:Yn}}const X=Symbol.for("drizzle:PgInlineForeignKeys"),ce=Symbol.for("drizzle:EnableRLS");class H extends x{static[i]="PgTable";static Symbol=Object.assign({},x.Symbol,{InlineForeignKeys:X,EnableRLS:ce});[X]=[];[ce]=!1;[x.Symbol.ExtraConfigBuilder]=void 0;[x.Symbol.ExtraConfigColumns]={}}function Zn(n,e,t,r,o=n){const l=new H(n,r,o),P=typeof e=="function"?e(Xn()):e,w=Object.fromEntries(Object.entries(P).map(([a,f])=>{const b=f;b.setName(a);const v=b.build(l);return l[X].push(...b.buildForeignKeys(v,l)),[a,v]})),y=Object.fromEntries(Object.entries(P).map(([a,f])=>{const b=f;b.setName(a);const v=b.buildExtraConfigColumn(l);return[a,v]})),N=Object.assign(l,w);return N[x.Symbol.Columns]=w,N[x.Symbol.ExtraConfigColumns]=y,t&&(N[H.Symbol.ExtraConfigBuilder]=t),Object.assign(N,{enableRLS:()=>(N[H.Symbol.EnableRLS]=!0,N)})}const d=(n,e,t)=>Zn(n,e,t,void 0);class er{constructor(e,t){this.unique=e,this.name=t}static[i]="PgIndexBuilderOn";on(...e){return new k(e.map(t=>{if(I(t,h))return t;t=t;const r=new U(t.name,!!t.keyAsName,t.columnType,t.indexConfig);return t.indexConfig=JSON.parse(JSON.stringify(t.defaultConfig)),r}),this.unique,!1,this.name)}onOnly(...e){return new k(e.map(t=>{if(I(t,h))return t;t=t;const r=new U(t.name,!!t.keyAsName,t.columnType,t.indexConfig);return t.indexConfig=t.defaultConfig,r}),this.unique,!0,this.name)}using(e,...t){return new k(t.map(r=>{if(I(r,h))return r;r=r;const o=new U(r.name,!!r.keyAsName,r.columnType,r.indexConfig);return r.indexConfig=JSON.parse(JSON.stringify(r.defaultConfig)),o}),this.unique,!0,this.name,e)}}class k{static[i]="PgIndexBuilder";config;constructor(e,t,r,o,l="btree"){this.config={name:o,columns:e,unique:t,only:r,method:l}}concurrently(){return this.config.concurrently=!0,this}with(e){return this.config.with=e,this}where(e){return this.config.where=e,this}build(e){return new tr(this.config,e)}}class tr{static[i]="PgIndex";config;constructor(e,t){this.config={...e,table:t}}}function _(n){return new er(!0,n)}const R=d("addresses",{id:u().primaryKey().generatedAlwaysAsIdentity(),name:s().notNull(),company:s(),street:s(),postalCode:s(),city:s(),country:s(),state:s(),lat:F(),lng:F(),createdAt:g().defaultNow()});d("users",{id:p().defaultRandom().primaryKey(),userId:s().notNull(),customerId:s()});d("tmp_gewinnspiel_entries",{id:p().defaultRandom().primaryKey(),email:s().notNull(),name:s().notNull(),city:s().notNull()});const nr=B("issue_exception_type",["skipped","extra"]);d("issue_exceptions",{id:u().primaryKey().generatedAlwaysAsIdentity(),isoWeek:s().notNull(),type:nr().notNull(),note:s(),createdAt:g({precision:3}).notNull().defaultNow()});d("issue_kaz_deadlines",{id:u().primaryKey().generatedAlwaysAsIdentity(),isoWeek:s().notNull(),deadline:g({precision:0}).notNull(),createdAt:g({precision:3}).notNull().defaultNow()});const rr=B("event_status",["pending","approved","rejected"]);d("events",{id:u().primaryKey().generatedAlwaysAsIdentity(),title:s().notNull(),description:s(),website:s(),dateStart:L().notNull(),dateEnd:L(),dateDescription:s(),protectedContactName:s(),protectedContactEmail:s(),protectedContactPhone:s(),contactName:s(),contactEmail:s(),contactPhone:s(),userId:s(),status:rr().notNull().default("pending"),addressId:u().notNull().references(()=>
1R.id,{onDelete:"cascade"}),createdAt:g().defaultNow(),updatedAt:g().defaultNow()});const te=d("surveys",{id:u().primaryKey().generatedAlwaysAsIdentity(),createdAt:g({precision:3}).notNull().defaultNow(),title:s({length:255}).notNull()}),ir=d("surveys_choices",{id:u().primaryKey().generatedAlwaysAsIdentity(),title:s({length:255}).notNull(),surveyId:u("survey_id").notNull().references(()=>te.id)});d("surveys_votes",{id:p().primaryKey().defaultRandom(),createdAt:g({precision:3}).notNull().defaultNow(),deviceFingerprint:s({length:512}).notNull(),surveyId:u("survey_id").notNull().references(()=>te.id),choiceId:u("choice_id").notNull().references(()=>ir.id)});d("surveys_impressions",{id:p().primaryKey().defaultRandom(),createdAt:g({precision:3}).notNull().defaultNow(),deviceFingerprint:s({length:128}).notNull(),surveyId:u("survey_id").notNull().references(()=>te.id)});const sr=B("kleinanzeigen_pricing_option",["specific","on_request","no_price"]);d("kleinanzeigen",{id:u().primaryKey().generatedAlwaysAsIdentity(),createdAt:g().defaultNow(),userId:s(),email:s(),name:s().notNull(),slug:s().unique(),category:s({length:512}).notNull(),addressId:u().notNull().references(()=>R.id,{onDelete:"cascade"}),priceOption:sr().notNull().default("no_price"),priceInCents:u().notNull().default(0),adText:s({length:400}).notNull(),detailedDescription:s({length:2e3}),paymentId:s(),printConfigId:u().references(()=>or.id,{onDelete:"cascade"}),validUntil:L().notNull().default(D`CURRENT_DATE + INTERVAL '45 days'`),published:S().notNull().default(!1),onlineVersionDeleted:S().notNull().default(!1),images:A().$type(),orderNumber:s().notNull().default("-"),archived:S().notNull().default(!1)});const or=d("kleinanzeigen_print_config",{id:u().primaryKey().generatedAlwaysAsIdentity(),issues:be().$type(),text:s({length:400}).notNull(),image:S().notNull().default(!1),highlight:S().notNull().default(!1),superWord:s({length:100}),invoiceId:s(),isChiffre:S().notNull().default(!1)}),ar=B("advert_status",["RESERVED","CONFIRMED","READY_FOR_SCHEDULING","SCHEDULED_AND_READY_FOR_PUBLISHING","PUBLISHED"]),Ne=B("material_type",["TEXT","FILE","COLOR"]),ur=d("channels",{id:u().primaryKey().generatedAlwaysAsIdentity(),order:u().notNull().default(0),name:s().notNull().unique(),relevantForPrintIssues:S().notNull().default(!1),maxTotalInsertWeight:u(),isActive:S().notNull().default(!0),createdAt:g().defaultNow()}),lr=d("advert_dimensions",{id:u().primaryKey().generatedAlwaysAsIdentity(),name:s().notNull().unique(),width:u().notNull(),height:u().notNull(),createdAt:g().defaultNow()},n=>({widthCheck:$("a4-width-range-check-mm",D`${n.width} >= 1 AND ${n.width} <= 200`),heightCheck:$("a4-height-range-check-mm",D`${n.height} >= 1 AND ${n.height} <= 270`)})),Q=d("advert_types",{id:u().primaryKey().generatedAlwaysAsIdentity(),order:u().notNull().default(0),name:s().notNull(),slotCount:u(),isActive:S().notNull().default(!0),isPrintInsert:S().notNull().default(!1),channelId:u().notNull().references(()=>ur.id,{onDelete:"cascade"}),dimensionId:u().references(()=>lr.id),createdAt:g().defaultNow()}),we=d("material_constraint_sets",{id:u().primaryKey().generatedAlwaysAsIdentity(),name:s().notNull(),materialType:Ne().notNull(),isRequired:S().notNull().default(!1),minCount:u().notNull().default(1),maxCount:u().notNull().default(1),maxTextLength:u(),minTextLength:u(),allowedFileFormats:s(),aspectRatio:F(),maxFileSizeBytes:u(),minFileSizeBytes:u(),minResolutionWidth:u(),createdAt:g().defaultNow()});d("advert_type_material_constraints",{id:u().primaryKey().generatedAlwaysAsIdentity(),advertTypeId:u().notNull().references(()=>Q.id,{onDelete:"cascade"}),materialConstraintSetId:u().notNull().references(()=>we.id,{onDelete:"cascade"}),createdAt:g().defaultNow()},n=>({uniqueConstraint:_("advert_type_material_constraint_unique_idx").on(n.advertTypeId,n.materialConstraintSetId)}));const cr=d("adverts",{id:u().primaryKey().generatedAlwaysAsIdentity(),identifier:s().notNull(),customHeight:u(),customWidth:u(),additionalInformation:s(),status:ar().notNull().default("RESERVED"),issues:A().$type(),targetSegments:A().$type(),targetUrl:s(),weight:u(),advertTypeId:u().notNull().references(()=>
1Q.id,{onDelete:"cascade"}),createdAt:g().defaultNow(),createdByUserId:s()},n=>({customWidthCheck:$("a4-custom-width-range-check-mm",D`${n.customWidth} >= 1 AND ${n.customWidth} <= 200`),customHeightCheck:$("a4-custom-height-range-check-mm",D`${n.customHeight} >= 1 AND ${n.customHeight} <= 270`)})),dr=d("materials",{id:u().primaryKey().generatedAlwaysAsIdentity(),materialType:Ne().notNull(),content:s().notNull(),createdAt:g().defaultNow()});d("advert_materials",{id:u().primaryKey().generatedAlwaysAsIdentity(),advertId:u().notNull().references(()=>cr.id,{onDelete:"cascade"}),materialId:u().notNull().references(()=>dr.id,{onDelete:"cascade"}),materialConstraintSetId:u().references(()=>we.id),createdAt:g().defaultNow()},n=>({uniqueConstraint:_("advert_material_unique_idx").on(n.advertId,n.materialId)}));d("advert_type_blocking",{id:u().primaryKey().generatedAlwaysAsIdentity(),blockingAdvertTypeId:u().notNull().references(()=>Q.id,{onDelete:"cascade"}),blockedAdvertTypeId:u().notNull().references(()=>Q.id,{onDelete:"cascade"}),createdAt:g().defaultNow()},n=>({uniqueConstraint:_("advert_type_blocking_unique_idx").on(n.blockingAdvertTypeId,n.blockedAdvertTypeId)}));const mr=["FULL_TIME","PART_TIME","CONTRACTOR","INTERN","VOLUNTEER","SEASONAL","LEASING","REMOTE","APPRENTICESHIP","PER_DIEM"],gr=["1-5","6-10","11-20","21-50","51-100","101-500","501-1000","1001-2000","2001-3000","3001-4000","4001-5000","5001+"],pr=B("employer_number_of_employees",gr),Se=B("job_posting_employment_type",mr),Te=d("job_skills",{id:p().primaryKey().defaultRandom(),name:s().notNull().unique()}),Ie=d("job_occupational_roles",{id:p().primaryKey().defaultRandom(),name:s().notNull().unique()}),xe=d("job_recruitment_contacts",{id:p().primaryKey().defaultRandom(),employerProfileId:p().references(()=>ne.id),createdAt:g().defaultNow(),updatedAt:g().defaultNow(),name:s().notNull(),roleTitle:s(),phone:s(),email:s().notNull()}),ne=d("job_employer_profiles",{id:p().primaryKey().defaultRandom(),createdAt:g().defaultNow(),updatedAt:g().defaultNow(),userId:s(),name:s().notNull(),establishedYear:u(),numberOfEmployees:pr(),industrySector:s(),websiteUrl:s(),shortDescription:q(),logoUrl:s(),defaultContactPersonId:p().references(()=>xe.id)}),fr=d("job_employer_profiles_to_addresses",{id:u().primaryKey().generatedAlwaysAsIdentity(),employerProfileId:p().notNull().references(()=>ne.id,{onDelete:"cascade"}),addressId:u().notNull().references(()=>R.id,{onDelete:"cascade"}),createdAt:g().defaultNow()},n=>({uniqueConstraint:_("job_employer_profile_address_unique_idx").on(n.employerProfileId,n.addressId)})),Ce=d("job_postings",{id:p().primaryKey().defaultRandom(),createdAt:g().defaultNow(),updatedAt:g().defaultNow(),title:s().notNull(),description:q(),expiresAt:L().notNull(),employmentType:Se().array(),compensationValue:F(),compensationType:s(),employerProfileId:p().notNull().references(()=>ne.id,{onDelete:"cascade"}),occupationalRoleId:p().references(()=>Ie.id),contactPersonId:p().references(()=>xe.id),invoiceId:s(),slug:s().unique(),published:S().notNull().default(!1),requestPrintAd:S().notNull().default(!1),archived:S().notNull().default(!1)});d("job_postings_to_locations",{id:u().primaryKey().generatedAlwaysAsIdentity(),jobPostingId:p().notNull().references(()=>Ce.id,{onDelete:"cascade"}),employerProfileAddressId:u().notNull().references(()=>fr.id,{onDelete:"cascade"}),createdAt:g().defaultNow()},n=>({uniqueConstraint:_("job_posting_location_unique_idx").on(n.jobPostingId,n.employerProfileAddressId)}));d("job_postings_to_skills",{id:u().primaryKey().generatedAlwaysAsIdentity(),jobPostingId:p().notNull().references(()=>Ce.id,{onDelete:"cascade"}),skillId:p().notNull().references(()=>Te.id,{onDelete:"cascade"})},n=>({uniqueConstraint:_("job_posting_skill_unique_idx").on(n.jobPostingId,n.skillId)}));const Be=d("job_candidate_profiles",{id:p().primaryKey().defaultRandom(),createdAt:g().defaultNow(),updatedAt:g().defaultNow(),userId:s().notNull().unique(),firstName:s().notNull(),lastName:s().notNull(),email:s().notNull(),phone:s(),tagline:q(),longDescription:q(),employmentType:Se().array(),jobMatchingAlerts:S().default(!1),termsAcceptedAt:g(),publicVisibilityConsentAt:g(),addressId:u().notNull().references(()=>
1R.id,{onDelete:"cascade"})});d("job_candidate_profiles_to_skills",{id:u().primaryKey().generatedAlwaysAsIdentity(),candidateProfileId:p().notNull().references(()=>Be.id,{onDelete:"cascade"}),skillId:p().notNull().references(()=>Te.id,{onDelete:"cascade"})},n=>({uniqueConstraint:_("job_candidate_profile_skill_unique_idx").on(n.candidateProfileId,n.skillId)}));d("job_candidate_profiles_to_roles",{id:u().primaryKey().generatedAlwaysAsIdentity(),candidateProfileId:p().notNull().references(()=>Be.id,{onDelete:"cascade"}),occupationalRoleId:p().notNull().references(()=>Ie.id,{onDelete:"cascade"})},n=>({uniqueConstraint:_("job_candidate_profile_role_unique_idx").on(n.candidateProfileId,n.occupationalRoleId)}));const yr=["Niederösterreich/Wien","Oberösterreich","Tirol","Steiermark","Salzburg","Kärnten","Burgenland","Vorarlberg"],hr=B("article_project_placement",yr),br=B("article_project_type",["advert","story","placeholder"]),Pr=B("page_type",["title","back","double"]),Nr=d("plannable_issues",{id:p().primaryKey().defaultRandom(),issue:A().$type(),placement:hr()},n=>({issueAndPlacementUnique:_("issue_placement_unique_idx").on(n.issue,n.placement)})),wr=d("plannable_issue_pages",{id:p().primaryKey().defaultRandom(),name:s().notNull(),plannableIssueId:p().notNull().references(()=>Nr.id,{onDelete:"cascade"}),pageType:Pr().notNull(),pageNumber:u().notNull(),isCountrySpecific:S().default(!1).notNull(),pageNumberToLinkTo:u(),linkedPageId:p(),deletedLinkedContentItemIds:A().$type().default([])},n=>[Ee({columns:[n.linkedPageId],foreignColumns:[n.id],name:"fk_plannable_issue_page_linked_page_id"})]);d("placeholder_content_items",{id:p().primaryKey().defaultRandom(),name:s().notNull(),characterLength:u().notNull()});d("planned_content_items",{id:p().primaryKey().defaultRandom(),plannableIssuePageId:p().notNull().references(()=>wr.id,{onDelete:"cascade"}),type:br().notNull(),externalId:s().notNull()});d("giveawayEntries",{id:p().primaryKey().defaultRandom(),giveawayId:s().notNull(),salutation:s(),firstname:s(),lastname:s(),email:s(),street:s(),houseNumber:s(),postalCode:s(),state:s(),city:s(),newsletterOptIn:S().default(!1),createdAt:g().defaultNow(),updatedAt:g().defaultNow()});d("app_settings",{id:u().primaryKey().generatedAlwaysAsIdentity(),key:s().notNull().unique(),value:A().notNull().$type(),updatedAt:g().defaultNow(),updatedByUserId:s()});const Sr={class:"aspect-square flex flex-col rounded-less overflow-clip w-[4.5rem] border border-border-primary group-hover:border-border-tertiary"},Tr={class:"text-secondary-on-surface bg-surface-primary py-1 text-center group-hover:bg-surface-tertiary"},Ir={class:"tertiary-title text-center flex items-center justify-center grow"},xr=De({__name:"atom",props:{event:{}},setup(n){const e=o=>r(o,{weekday:"short"}),t=o=>r(o,{day:"numeric"}),r=(o,l)=>new Date(o.dateStart).toLocaleString("de-DE",l);return(o,l)=>(Ae(),_e("div",Sr,[re("div",Tr,ie(e(n.event)),1),re("div",Ir,ie(t(n.event)),1)]))}}),Br=Object.assign(xr,{__name:"EventCalendarDateAtom"});export{Br as _};
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.