{"version":3,"file":"BillboardSchema.BHeP4Ybb.mjs","names":[],"sources":["https:/framerusercontent.com/modules/PrZUfOipP2PPwRJu23tW/kDNovUpNUlYQFpgZIe9u/BillboardSchema.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{addPropertyControls,ControlType,RenderTarget}from\"framer\";/**\n * Kevani — per-asset JSON-LD emitter for CMS billboard pages.\n *\n * Renders the <script> tag inside the component's return value so that\n * Framer's prerenderer bakes it into the published static HTML. Do NOT\n * refactor this to useEffect / document.head.appendChild — that would make\n * the markup invisible to non-rendering crawlers.\n *\n * Place on the Icons CMS collection template page only.\n *\n * @framerIntrinsicWidth 260\n * @framerIntrinsicHeight 32\n * @framerSupportedLayoutWidth fixed\n * @framerSupportedLayoutHeight fixed\n */export default function BillboardSchema(props){const{debug,name,slug,pathPrefix,description,latitude,longitude,areaServed,serviceType,mediaFormat,structureCount,displayFaceCount,totalDisplayArea,totalMonthlyImpressions,impressions4WkPerSpot,unitIds,specSheetUrl}=props;const blank=v=>v===undefined||v===null||String(v).trim()===\"\";// Strips commas, units, stray characters: \"9,400 sq ft\" -> 9400\nconst num=v=>{if(blank(v))return undefined;const n=parseFloat(String(v).replace(/[^0-9.\\-]/g,\"\"));return Number.isNaN(n)?undefined:n;};const str=v=>blank(v)?undefined:String(v).trim();const pv=(label,value,{numeric,unitText,unitCode}={})=>{const val=numeric?num(value):str(value);if(val===undefined)return null;const entry={\"@type\":\"PropertyValue\",name:label,value:val};if(unitText)entry.unitText=unitText;if(unitCode)entry.unitCode=unitCode;return entry;};// ---- Service type derived from media format --------------------------\nconst serviceTypeMap={Digital:\"Digital billboard advertising\",\"Full Motion\":\"Full-motion digital billboard advertising\",Vinyl:\"Printed vinyl billboard advertising\",Handpaint:\"Hand-painted mural advertising\"};// ---- URL -------------------------------------------------------------\nconst prefix=blank(pathPrefix)?\"/icons/\":String(pathPrefix).trim();const canonicalUrl=blank(slug)?undefined:`https://kevani.com${prefix}${String(slug).trim()}`;// ---- Unit IDs --------------------------------------------------------\n// Splits on commas AND the word \"and\", so a CMS value like\n// \"1157, 1158, 1159A, 1159B and 1161A/B\" yields five clean identifiers.\nconst identifier=blank(unitIds)?undefined:String(unitIds).split(/,|\\s+and\\s+/).map(s=>s.trim()).filter(Boolean).map(v=>({\"@type\":\"PropertyValue\",propertyID:\"Kevani Unit ID\",value:v}));// ---- Spec sheet ------------------------------------------------------\n// Accepts either a bare Framer asset filename (\"abc123.pdf\") or a full\n// URL. Bare filenames get the asset base prepended. Anything that isn't\n// a .pdf is discarded rather than published malformed.\nconst ASSET_BASE=\"https://framerusercontent.com/assets/\";const sheetRaw=str(specSheetUrl);const sheet=sheetRaw&&/\\.pdf(\\?|#|$)/i.test(sheetRaw)?sheetRaw:undefined;const sheetUrl=!sheet?undefined:/^https?:\\/\\//i.test(sheet)?sheet:ASSET_BASE+sheet.replace(/^\\/+/,\"\");const subjectOf=!sheetUrl?undefined:{\"@type\":\"DigitalDocument\",name:`${str(name)||\"Asset\"} Spec Sheet`,url:sheetUrl,encodingFormat:\"application/pdf\"};// ---- Spec properties -------------------------------------------------\nconst additionalProperty=[pv(\"Media Format\",mediaFormat),pv(\"Structure Count\",structureCount,{numeric:true}),pv(\"Display Face Count\",displayFaceCount,{numeric:true}),pv(\"Total Display Area\",totalDisplayArea,{numeric:true,unitText:\"square feet\",unitCode:\"FTK\"}),pv(\"Total Monthly Impressions\",totalMonthlyImpressions,{numeric:true,unitText:\"audited impressions per month, all displays combined\"}),pv(\"A18+ Impressions, 4-Week, Per Spot\",impressions4WkPerSpot,{numeric:true,unitText:\"Geopath-audited adult 18+ impressions delivered per spot over a 4-week period\"})].filter(Boolean);const lat=num(latitude);const lng=num(longitude);const market=str(areaServed);const schema={\"@context\":\"https://schema.org\",\"@type\":[\"Place\",\"Service\"],\"@id\":canonicalUrl?`${canonicalUrl}#place`:undefined,name:str(name),description:str(description),url:canonicalUrl,geo:lat!==undefined&&lng!==undefined?{\"@type\":\"GeoCoordinates\",latitude:lat,longitude:lng}:undefined,additionalType:\"https://en.wikipedia.org/wiki/Billboard_(advertising)\",provider:{\"@id\":\"https://kevani.com/#organization\"},serviceType:str(serviceType)||serviceTypeMap[str(mediaFormat)]||\"Out-of-home advertising\",areaServed:market?{\"@type\":\"City\",name:market}:undefined,identifier:identifier&&identifier.length?identifier:undefined,subjectOf,additionalProperty:additionalProperty.length?additionalProperty:undefined};const json=JSON.stringify(schema,(k,v)=>blank(v)?undefined:v).replace(/</g,\"\\\\u003c\");// ---- Canvas debug display (editor only, never published) --------------\nif(RenderTarget.current()===RenderTarget.canvas){const warn=!name||!canonicalUrl;if(!debug){return /*#__PURE__*/_jsx(\"div\",{style:{width:8,height:8,borderRadius:4,background:warn?\"#FF8A8A\":\"#2A2A2A\",opacity:.5}});}return /*#__PURE__*/_jsxs(\"div\",{style:{width:\"100%\",height:\"100%\",fontSize:11,lineHeight:1.25,background:warn?\"#3A0D0D\":\"#111\",color:warn?\"#FF8A8A\":\"#7CFF9B\",padding:5,borderRadius:3,fontFamily:\"monospace\",overflow:\"hidden\",whiteSpace:\"nowrap\"},children:[\"JSON-LD \\xb7 \",name||\"⚠ name unbound\",\" \\xb7\",\" \",str(mediaFormat)||\"⚠ no format\",\" \\xb7\",\" \",additionalProperty.length,\" props \\xb7\",\" \",identifier?identifier.length:0,\" IDs \\xb7\",\" \",sheetUrl?\"PDF\":\"no PDF\"]});}return /*#__PURE__*/_jsx(\"div\",{style:{display:\"none\"},children:/*#__PURE__*/_jsx(\"script\",{type:\"application/ld+json\",dangerouslySetInnerHTML:{__html:json}})});}addPropertyControls(BillboardSchema,{debug:{type:ControlType.Boolean,title:\"Debug Chip\",defaultValue:true,enabledTitle:\"Show\",disabledTitle:\"Hide\"},name:{type:ControlType.String,title:\"Name\"},slug:{type:ControlType.String,title:\"Slug\"},pathPrefix:{type:ControlType.String,title:\"Path Prefix\",defaultValue:\"/icons/\"},description:{type:ControlType.String,title:\"Description\",displayTextArea:true},latitude:{type:ControlType.String,title:\"Latitude\"},longitude:{type:ControlType.String,title:\"Longitude\"},areaServed:{type:ControlType.String,title:\"Area Served\"},serviceType:{type:ControlType.String,title:\"Service Type\"},mediaFormat:{type:ControlType.String,title:\"Media Format\"},structureCount:{type:ControlType.String,title:\"Structure Count\"},displayFaceCount:{type:ControlType.String,title:\"Display Faces\"},totalDisplayArea:{type:ControlType.String,title:\"Display Area (sq ft)\"},totalMonthlyImpressions:{type:ControlType.String,title:\"Monthly Impr. (Total)\"},impressions4WkPerSpot:{type:ControlType.String,title:\"A18+ 4wk Per Spot\"},unitIds:{type:ControlType.String,title:\"Unit IDs (comma-sep)\"},specSheetUrl:{type:ControlType.String,title:\"Spec Sheet (URL or file)\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"BillboardSchema\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutHeight\":\"fixed\",\"framerIntrinsicWidth\":\"260\",\"framerSupportedLayoutWidth\":\"fixed\",\"framerIntrinsicHeight\":\"32\",\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./BillboardSchema.map"],"mappings":"sKAcG,SAAwB,EAAgB,EAAM,CAAC,GAAK,CAAC,QAAM,OAAK,OAAK,aAAW,cAAY,WAAS,YAAU,aAAW,cAAY,cAAY,iBAAe,mBAAiB,mBAAiB,0BAAwB,wBAAsB,UAAQ,gBAAc,EAAY,EAAM,GAAG,GAAmB,MAAM,OAAO,CAAC,CAAC,CAAC,KAAK,IAAI,GACrU,EAAI,GAAG,CAAC,GAAG,EAAM,CAAC,EAAE,OAAiB,IAAM,EAAE,WAAW,OAAO,CAAC,CAAC,CAAC,QAAQ,aAAa,EAAE,CAAC,EAAE,OAAO,OAAO,MAAM,CAAC,EAAE,IAAA,GAAU,CAAE,EAAQ,EAAI,GAAG,EAAM,CAAC,EAAE,IAAA,GAAU,OAAO,CAAC,CAAC,CAAC,KAAK,E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