{"version":3,"file":"Filiere_fiche_societe.CyCdf_dC.mjs","names":["p","React.Fragment","__esmMin","x","init_npm_react_18_3_1","p","c","init_jsx_runtime","addPropertyControls","init_framer_Cb9Z_4vX","ControlType","CodinfFilieresIncidents","fil","lignes","p$1","inc","a","b","l","norm","count","f","rawTitre","CSS","part","i","arr","on","Icon","ICONS","iconPath","init_Filiere_fiche_societe","s","n","name","k","size","color","t"],"sources":["https:/framerusercontent.com/modules/s7w1fVtaVDOPyq8wFqQ9/a6ggcXXXLghqyFSuD3Lb/Filiere_fiche_societe.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import*as React from\"react\";import{addPropertyControls,ControlType}from\"framer\";/**\n * Rangée des filières du réseau (page Fiabilité client) : une société fictive vue par chaque filière.\n * Les filières ayant déclaré un incident de paiement sont en bleu plein, avec la date ; les autres sont en gris.\n * Incidents : une ligne par incident, au format « Filière | date » (ex. « Emballage | 14/09 »). Le nombre d'incidents est compté automatiquement.\n * Filières : une par ligne.\n * Police : Roboto (à charger dans le projet Framer).\n * @framerSupportedLayoutWidth any\n * @framerSupportedLayoutHeight any\n */const CSS=`.cfi{container-type:inline-size;box-sizing:border-box;width:100%;font-family:'Roboto',system-ui,-apple-system,'Segoe UI',sans-serif;color:#1A1A2E;font-size:16px;line-height:1.5}\n.cfi *{box-sizing:border-box}\n.cfi .cp{max-width:var(--mw,100%);margin:0 auto 16px;text-align:center;font-size:15px;color:#555;width:100%}\n.cfi .cp b{color:#1A1A2E}\n.cfi .g{max-width:var(--mw,100%);margin:0 auto;display:grid;grid-template-columns:repeat(auto-fill, minmax(110px, 1fr));gap:10px;width:100%}\n.cfi .t{border:1.5px solid #F0F0F0;border-radius:18px;padding:14px 8px;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;gap:6px;background:#FAFAFF;min-width:0;transition:all 0.2s ease-in-out}\n.cfi .t b{font-size:13px;line-height:1.25;overflow-wrap:anywhere}\n.cfi .t em{font-style:normal;font-size:11px;color:#9E9E9E}\n.cfi .t.on{background:#3D3BE8;border-color:#3D3BE8;color:#fff;box-shadow:0 10px 24px rgba(61,59,232,.3)}\n.cfi .t.on em{color:rgba(255,255,255,.9);font-weight:500}\n.cfi .fo{max-width:var(--mw,100%);margin:14px auto 0;text-align:center;font-size:12px;color:#9E9E9E;width:100%}\n@container (max-width:520px){.cfi .g{grid-template-columns:repeat(auto-fill, minmax(90px, 1fr))}.cfi .t{padding:10px 6px}}\n`;const ICONS={btp:\"M3 21h18M5 21V7l8-4v18M19 21V11l-6-4M9 9v.01M9 12v.01M9 15v.01M9 18v.01\",agro:\"M7 20h10M10 20c5.5-2.5.8-6.4 3-10M9.5 9.4c1.1.8 1.8 2.2 2.3 3.7-2 .4-3.5.4-4.8-.3-1.2-.6-2.3-1.9-3-4.2 2.8-.5 4.4 0 5.5.8zM14.1 6a7 7 0 0 0-1.1 4c1.9-.1 3.3-.6 4.3-1.4 1-1 1.6-2.3 1.7-4.6-2.7.1-4 1-4.9 2z\",emball:\"M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16zM3.3 7l8.7 5 8.7-5M12 22V12\",froid:\"M12 2v20M2 12h20M5 5l14 14M19 5L5 19\",machin:\"M7 10a5 5 0 1 0 0 10 5 5 0 0 0 0-10zM18 16a2 2 0 1 0 0 4 2 2 0 0 0 0-4zM3 4h8l2 7M4 11V4M8 10V4M18 5v6.5M16 18h-4\",meuble:\"M19 9V6a2 2 0 0 0-2-2H7a2 2 0 0 0-2 2v3M3 16a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-5a2 2 0 0 0-4 0v1.5a.5.5 0 0 1-.5.5h-9a.5.5 0 0 1-.5-.5V11a2 2 0 0 0-4 0zM5 18v2M19 18v2\",bois:\"M17 14l3 3.3a1 1 0 0 1-.7 1.7H4.7a1 1 0 0 1-.7-1.7L7 14h-.3a1 1 0 0 1-.7-1.7L9 9h-.2A1 1 0 0 1 8 7.3L12 3l4 4.3a1 1 0 0 1-.8 1.7H15l3 3.3a1 1 0 0 1-.7 1.7zM12 22v-3\",labo:\"M10 2v7.5a2 2 0 0 1-.2.9L4.7 20.5a1 1 0 0 0 .9 1.5h12.8a1 1 0 0 0 .9-1.5l-5.1-10.1a2 2 0 0 1-.2-.9V2M8.5 2h7M7 16h10\",servic:\"M4 7h16a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V9a2 2 0 0 1 2-2zM16 21V5a2 2 0 0 0-2-2h-4a2 2 0 0 0-2 2v16\"};const norm=s=>s.normalize(\"NFD\").replace(/[\\u0300-\\u036f]/g,\"\").toLowerCase();const iconPath=name=>{const n=norm(name);const k=Object.keys(ICONS).find(x=>n.includes(x));return k?ICONS[k]:\"M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0-18 0M12 8v8M8 12h8\";};const Icon=({name,color,size=28})=>/*#__PURE__*/_jsx(\"svg\",{width:size,height:size,viewBox:\"0 0 24 24\",fill:\"none\",stroke:color,strokeWidth:\"1.7\",strokeLinecap:\"round\",strokeLinejoin:\"round\",\"aria-hidden\":\"true\",children:/*#__PURE__*/_jsx(\"path\",{d:iconPath(name)})});const lignes=t=>(Array.isArray(t)?t:String(t||\"\").split(\"\\n\")).map(x=>x.trim()).filter(Boolean);export default function CodinfFilieresIncidents(p){const fil=lignes(p.filieres);const inc={};lignes(p.incidents).forEach(l=>{const[a,...b]=l.split(\"|\");if(a)inc[norm(a.trim())]=b.join(\"|\").trim();});const count=fil.filter(f=>norm(f) in inc).length;const rawTitre=(p.titre||\"\").replace(\"{n}\",String(count)).replace(\"{societe}\",p.societe);return /*#__PURE__*/_jsxs(\"div\",{className:\"cfi\",style:{[\"--mw\"]:Number(p.largeurMax)>0?`${p.largeurMax}px`:\"100%\"},children:[/*#__PURE__*/_jsx(\"style\",{children:CSS}),rawTitre?/*#__PURE__*/_jsx(\"p\",{className:\"cp\",children:rawTitre.split(p.societe).map((part,i,arr)=>/*#__PURE__*/_jsxs(React.Fragment,{children:[part,i<arr.length-1&&/*#__PURE__*/_jsx(\"b\",{children:p.societe})]},i))}):null,/*#__PURE__*/_jsx(\"div\",{className:\"g\",children:fil.map((f,i)=>{const on=norm(f) in inc;return /*#__PURE__*/_jsxs(\"div\",{className:`t${on?\" on\":\"\"}`,children:[/*#__PURE__*/_jsx(Icon,{name:f,color:on?\"#FFFFFF\":\"#3D3BE8\",size:24}),/*#__PURE__*/_jsx(\"b\",{children:f}),/*#__PURE__*/_jsx(\"em\",{children:on?`${p.libelleIncident}${inc[norm(f)]?\" \\xb7 \"+inc[norm(f)]:\"\"}`:p.libelleAucun})]},i);})}),p.mention?/*#__PURE__*/_jsx(\"p\",{className:\"fo\",children:p.mention}):null]});}CodinfFilieresIncidents.defaultProps={societe:\"Soci\\xe9t\\xe9 DACOURT SAS\",titre:\"{societe}, vue par les neuf fili\\xe8res : {n} incidents de paiement d\\xe9clar\\xe9s\",filieres:\"BTP\\nAgro\\nEmballage\\nFroid\\nMachines agricoles\\nMeubles\\nBois\\nLabo\\nServices\",incidents:\"Emballage | 14/09\\nFroid | 28/07\\nServices | 03/05\",libelleIncident:\"Incident\",libelleAucun:\"Aucun signalement\",mention:\"Exemple illustratif, soci\\xe9t\\xe9 fictive.\",largeurMax:0};addPropertyControls(CodinfFilieresIncidents,{societe:{type:ControlType.String,title:\"Soci\\xe9t\\xe9\"},titre:{type:ControlType.String,title:\"Titre ({societe}, {n})\",displayTextArea:true},filieres:{type:ControlType.String,title:\"Fili\\xe8res (une par ligne)\",displayTextArea:true},incidents:{type:ControlType.String,title:\"Incidents (Fili\\xe8re | date)\",displayTextArea:true},libelleIncident:{type:ControlType.String,title:\"Libell\\xe9 incident\"},libelleAucun:{type:ControlType.String,title:\"Libell\\xe9 sans incident\"},mention:{type:ControlType.String,title:\"Mention\"},largeurMax:{type:ControlType.Number,title:\"Largeur max (0 = pleine)\",min:0,max:2e3,step:20,unit:\"px\",defaultValue:0}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"CodinfFilieresIncidents\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Filiere_fiche_societe.map"],"mappings":"A,iLAoB0yD,SAAwBW,EAAwB,EAAE,CAAC,IAAMC,EAAIC,EAAOb,EAAE,QAAQ,EAAQe,EAAI,CAAC,EAAEF,EAAOb,EAAE,SAAS,CAAC,CAAC,QAAQ,GAAG,CAAC,GAAK,CAACgB,EAAE,GAAGC,GAAGC,EAAE,MAAM,GAAG,EAAKF,IAAE,EAAIG,EAAKH,EAAE,KAAK,CAAC,GAAGC,EAAE,KAAK,GAAG,CAAC,CAAC,KAAK,EAAE,CAAC,EAAE,IAAMG,EAAMR,EAAI,OAAO,GAAGO,EAAKE,CAAC,IAAKN,CAAG,CAAC,CAAC,OAAaO,GAAUtB,EAAE,OAAO,GAAA,CAAI,QAAQ,MAAM,OAAOoB,CAAK,CAAC,CAAC,CAAC,QAAQ,YAAYpB,EAAE,OAAO,EAAE,MAAoB,gBAAM,MAAM,CAAC,UAAU,MAAM,MAAM,CAAE,OAAQ,OAAOA,EAAE,UAAU,EAAE,EAAE,GAAGA,EAAE,WAAW,IAAI,MAAM,EAAE,SAAS,CAAc,gBAAK,QAAQ,CAAC,SAASuB,CAAG,CAAC,EAAED,EAAsB,gBAAK,IAAI,CAAC,UAAU,KAAK,SAASA,EAAS,MAAMtB,EAAE,OAAO,CAAC,CAAC,KAAK,EAAK,EAAE,IAAmB,gBAAMC,EAAe,CAAC,SAAS,CAACuB,EAAKC,EAAEC,EAAI,OAAO,GAAgB,gBAAK,IAAI,CAAC,SAAS1B,EAAE,OAAO,CAAC,CAAC,CAAC,EAAEyB,CAAC,CAAC,CAAC,CAAC,EAAE,KAAkB,gBAAK,MAAM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