{"version":3,"file":"TextFromQueryParam.Ue_cbbfC.mjs","names":["useState","text"],"sources":["https:/framerusercontent.com/modules/MZUwNjK2KoHOYOPFQgc2/K644Ky8MGv0EVFGoSyb6/CopyButton.js","https:/framer.com/m/CopyButton-atDr.js@K644Ky8MGv0EVFGoSyb6","https:/framerusercontent.com/modules/SPLe3zzV1PfgKZfyuReB/D5fQuts8LYtnyufnSU2D/TextFromQueryParam.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{addPropertyControls,ControlType}from\"framer\";import{useState}from\"react\";/**\n * These annotations control how your component sizes\n * Learn more: https://www.framer.com/developers/#code-components-auto-sizing\n *\n * @framerSupportedLayoutWidth auto\n * @framerSupportedLayoutHeight auto\n */export default function CopyButton({text,color,fontFamily,isDesktop}){const[isCopied,setIsCopied]=useState(false);const iconSize=isDesktop?\"24px\":\"30px\";async function copyToClipboard(text){try{await navigator.clipboard.writeText(text);setIsCopied(true);setTimeout(()=>{setIsCopied(false);},2e3);}catch(err){}}return /*#__PURE__*/_jsxs(\"button\",{type:\"button\",style:{display:\"flex\",flexDirection:\"column\",justifyItems:\"center\",gap:\"2px\",padding:\"4px\",alignItems:\"center\",border:\"none\",background:\"none\",color,fontFamily,cursor:\"pointer\",width:isDesktop?\"42px\":\"46px\"},onClick:()=>copyToClipboard(text),children:[isCopied?/*#__PURE__*/_jsx(IconValid01,{style:{height:iconSize,width:iconSize}}):/*#__PURE__*/_jsx(IconCopy01,{style:{height:iconSize,width:iconSize}}),/*#__PURE__*/_jsx(\"span\",{style:{textTransform:\"uppercase\",fontSize:isDesktop?\"9px\":\"10px\"},children:isCopied?\"Copi\\xe9\":\"Copier\"})]});}addPropertyControls(CopyButton,{text:{type:ControlType.String,title:\"Text\",description:\"Text to copy\"},color:{type:ControlType.Color,title:\"Color\",description:\"Color for the icon and text\"},isDesktop:{type:ControlType.Boolean,title:\"Desktop mode\",description:\"Will change the icon & font size\"},fontFamily:{type:ControlType.Enum,title:\"Font Family\",defaultValue:\"PP Neueu Montreal Regular\",options:[\"PP Neue Montreal Regular\",\"PP Neue Montreal Medium\",\"PP Neue Montreal SemiBold\",\"PP Neue Montreal Bold\",\"PP Agrandir Tight Black\",\"PP Agrandir Narrow Medium\",\"PP Agrandir Narrow Bold\"]}});function IconCopy01(){return /*#__PURE__*/_jsxs(\"svg\",{width:\"24\",height:\"25\",viewBox:\"0 0 24 25\",fill:\"none\",xmlns:\"http://www.w3.org/2000/svg\",children:[/*#__PURE__*/_jsx(\"path\",{\"fill-rule\":\"evenodd\",\"clip-rule\":\"evenodd\",d:\"M5.45145 9.0077C5.46835 9.00727 5.42611 9.00834 5.42612 9.00834C5.9782 8.99435 6.45144 9.45575 6.45145 10.008C6.45145 10.008 6.45145 9.99463 6.45145 9.99998C6.45145 10.0049 6.45145 10.008 6.45145 10.008C6.45144 10.5603 6.03182 10.9914 5.47977 11.007C5.47977 11.007 5.4703 11.0073 5.45137 11.0078C5.26376 11.0131 5.10513 11.022 4.95813 11.037C4.62303 11.0711 4.50496 11.1281 4.44443 11.1685C4.33524 11.2415 4.24149 11.3352 4.16854 11.4444C4.12809 11.505 4.07109 11.623 4.037 11.9581C4.00121 12.3099 4 12.777 4 13.5V17.5C4 18.4711 4.00213 19.0988 4.06431 19.5613C4.12263 19.995 4.21677 20.131 4.2929 20.2071C4.36902 20.2832 4.50497 20.3774 4.93871 20.4357C5.40122 20.4979 6.02893 20.5 7 20.5H11C11.723 20.5 12.1901 20.4988 12.5419 20.463C12.877 20.4289 12.995 20.3719 13.0556 20.3315C13.1648 20.2585 13.2585 20.1648 13.3315 20.0556C13.3719 19.995 13.4289 19.877 13.463 19.5419C13.478 19.3949 13.4869 19.2363 13.4922 19.0486C13.4927 19.0297 13.493 19.0203 13.493 19.0202C13.5086 18.4682 13.9403 18.0486 14.4926 18.0486C14.4926 18.0486 14.4951 18.0486 14.5 18.0486C14.5054 18.0486 14.4926 18.0486 14.4926 18.0486C15.0448 18.0486 15.5057 18.5218 15.4917 19.0739C15.4917 19.0739 15.4927 19.0317 15.4923 19.0486C15.4859 19.3011 15.4742 19.5335 15.4527 19.7443C15.4026 20.2375 15.291 20.7228 14.9944 21.1667C14.7755 21.4943 14.4943 21.7755 14.1667 21.9944C13.7228 22.291 13.2375 22.4026 12.7443 22.4527C12.2791 22.5001 11.7093 22.5 11.0486 22.5H6.93417C6.04769 22.5001 5.28387 22.5001 4.67221 22.4179C4.0167 22.3297 3.38835 22.131 2.87868 21.6213C2.36902 21.1117 2.17028 20.4833 2.08215 19.8278C1.99991 19.2161 1.99995 18.4523 2 17.5658L2 13.5C2 13.4838 2 13.4676 2 13.4514C1.99998 12.7907 1.99995 12.2209 2.04727 11.7557C2.09745 11.2625 2.20898 10.7772 2.5056 10.3333C2.72447 10.0057 3.00572 9.72447 3.33329 9.5056C3.77721 9.20898 4.26248 9.09745 4.75572 9.04727C4.96656 9.02582 5.1989 9.0141 5.45145 9.0077Z\",fill:\"currentColor\"}),/*#__PURE__*/_jsx(\"path\",{\"fill-rule\":\"evenodd\",\"clip-rule\":\"evenodd\",d:\"M13.4342 2.5C13.456 2.5 13.478 2.5 13.5 2.5L17.0658 2.5C17.9523 2.49995 18.7161 2.49991 19.3278 2.58215C19.9833 2.67028 20.6117 2.86902 21.1213 3.37868C21.631 3.88835 21.8297 4.5167 21.9179 5.17221C22.0001 5.78387 22.0001 6.54769 22 7.43417V11.0658C22.0001 11.9523 22.0001 12.7161 21.9179 13.3278C21.8297 13.9833 21.631 14.6117 21.1213 15.1213C20.6117 15.631 19.9833 15.8297 19.3278 15.9179C18.7161 16.0001 17.9523 16.0001 17.0658 16H13.4342C12.5477 16.0001 11.7839 16.0001 11.1722 15.9179C10.5167 15.8297 9.88835 15.631 9.37868 15.1213C8.86902 14.6117 8.67028 13.9833 8.58215 13.3278C8.49991 12.7161 8.49995 11.9523 8.5 11.0658L8.5 7.5C8.5 7.47799 8.5 7.45604 8.5 7.43417C8.49995 6.54769 8.49991 5.78387 8.58215 5.17221C8.67028 4.5167 8.86902 3.88835 9.37868 3.37868C9.88835 2.86902 10.5167 2.67028 11.1722 2.58215C11.7839 2.49991 12.5477 2.49995 13.4342 2.5ZM11.4387 4.56431C11.005 4.62263 10.869 4.71677 10.7929 4.7929C10.7168 4.86902 10.6226 5.00497 10.5643 5.43871C10.5021 5.90122 10.5 6.52893 10.5 7.5V11C10.5 11.9711 10.5021 12.5988 10.5643 13.0613C10.6226 13.495 10.7168 13.631 10.7929 13.7071C10.869 13.7832 11.005 13.8774 11.4387 13.9357C11.9012 13.9979 12.5289 14 13.5 14H17C17.9711 14 18.5988 13.9979 19.0613 13.9357C19.495 13.8774 19.631 13.7832 19.7071 13.7071C19.7832 13.631 19.8774 13.495 19.9357 13.0613C19.9979 12.5988 20 11.9711 20 11V7.5C20 6.52893 19.9979 5.90122 19.9357 5.43871C19.8774 5.00497 19.7832 4.86902 19.7071 4.7929C19.631 4.71677 19.495 4.62263 19.0613 4.56431C18.5988 4.50213 17.9711 4.5 17 4.5H13.5C12.5289 4.5 11.9012 4.50213 11.4387 4.56431Z\",fill:\"currentColor\"})]});}function IconValid01(){return /*#__PURE__*/_jsx(\"svg\",{width:\"24\",height:\"25\",viewBox:\"0 0 24 25\",fill:\"none\",xmlns:\"http://www.w3.org/2000/svg\",children:/*#__PURE__*/_jsx(\"path\",{\"fill-rule\":\"evenodd\",\"clip-rule\":\"evenodd\",d:\"M12 2.5C6.47715 2.5 2 6.97715 2 12.5C2 18.0228 6.47715 22.5 12 22.5C17.5228 22.5 22 18.0228 22 12.5C22 6.97715 17.5228 2.5 12 2.5ZM16.7071 10.7071C17.0976 10.3166 17.0976 9.68342 16.7071 9.29289C16.3166 8.90237 15.6834 8.90237 15.2929 9.29289L10.6667 13.9191L8.70711 11.9596C8.31658 11.569 7.68342 11.569 7.29289 11.9596C6.90237 12.3501 6.90237 12.9832 7.29289 13.3738L9.95956 16.0404C10.3501 16.431 10.9832 16.431 11.3738 16.0404L16.7071 10.7071Z\",fill:\"currentColor\"})});}\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"CopyButton\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerSupportedLayoutHeight\":\"auto\",\"framerSupportedLayoutWidth\":\"auto\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./CopyButton.map","/*\n * CopyButton\n *\n * Learn More: https://www.framer.com/asset-urls\n */\n\nexport * from \"https://framerusercontent.com/modules/MZUwNjK2KoHOYOPFQgc2/K644Ky8MGv0EVFGoSyb6/CopyButton.js\"\nexport { default } from \"https://framerusercontent.com/modules/MZUwNjK2KoHOYOPFQgc2/K644Ky8MGv0EVFGoSyb6/CopyButton.js\"\n","import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{addPropertyControls,ControlType}from\"framer\";import CopyButton from\"https://framer.com/m/CopyButton-atDr.js@K644Ky8MGv0EVFGoSyb6\";/**\n * These annotations control how your component sizes\n * Learn more: https://www.framer.com/developers/#code-components-auto-sizing\n *\n * @framerSupportedLayoutWidth auto\n * @framerSupportedLayoutHeight auto\n */export default function TextFromQueryParam({defaultText,queryKey,canCopy,color,fontSize,fontFamily,isDesktop}){const isServer=typeof document===\"undefined\";const codeStyle={color,fontSize,fontFamily,textTransform:\"uppercase\"};if(isServer){return /*#__PURE__*/_jsx(\"span\",{style:codeStyle,children:defaultText});}const searchParams=new URLSearchParams(document.location.search);const text=searchParams.get(queryKey)||defaultText;return /*#__PURE__*/_jsxs(\"div\",{style:{display:\"flex\",gap:\"8px\",alignItems:\"center\"},children:[/*#__PURE__*/_jsx(\"span\",{style:codeStyle,children:text}),canCopy&&/*#__PURE__*/_jsx(CopyButton,{text:text,color:color,fontFamily:\"PP Neue Montreal SemiBold\",isDesktop:isDesktop})]});}addPropertyControls(TextFromQueryParam,{queryKey:{type:ControlType.String,title:\"Query parameter key\",description:\"The value corresponding to that key will be displayed\"},defaultText:{type:ControlType.String,title:\"Default text\",description:\"Text to display if the value is missing or invalid\"},canCopy:{type:ControlType.Boolean,title:\"Text can be copied\",description:\"Add an icon to copy the text to the clipboard\"},color:{type:ControlType.Color,title:\"Color\",defaultValue:\"black\"},fontSize:{type:ControlType.Number,title:\"Font Size\",defaultValue:16},isDesktop:{type:ControlType.Boolean,title:\"Desktop mode\",description:\"Will change the copy button's icon & font size\"},fontFamily:{type:ControlType.Enum,title:\"Font Family\",defaultValue:\"PP Neueu Montreal Regular\",options:[\"PP Neue Montreal Regular\",\"PP Neue Montreal Medium\",\"PP Neue Montreal SemiBold\",\"PP Neue Montreal Bold\",\"PP Agrandir Tight Black\",\"PP Agrandir Narrow Medium\",\"PP Agrandir Narrow Bold\"]}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"TextFromQueryParam\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerSupportedLayoutHeight\":\"auto\",\"framerSupportedLayoutWidth\":\"auto\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./TextFromQueryParam.map"],"mappings":"+LAMG,SAAwB,EAAW,CAAC,OAAK,QAAM,aAAW,aAAW,CAAC,GAAK,CAAC,EAAS,GAAaA,EAAS,GAAM,CAAO,EAAS,EAAU,OAAO,OAAO,eAAe,EAAgB,EAAK,CAAC,GAAG,CAAC,MAAM,EAAU,UAAU,UAAUC,EAAK,CAAC,EAAY,GAAK,CAAC,eAAe,CAAC,EAAY,GAAM,EAAG,IAAI,MAAY,GAAG,OAAoB,EAAM,SAAS,CAAC,KAAK,SAAS,MAAM,CAAC,QAAQ,OAAO,cAAc,SAAS,aAAa,SAAS,IAAI,MAAM,QAAQ,MAAM,WAAW,SAAS,OAAO,OAAO,WAAW,OAAO,QAAM,aAAW,OAAO,UAAU,MAAM,EAAU,OAAO,OAAO,CAAC,YAAY,EAAgB,EAAK,CAAC,SAAS,CAAuB,EAAtB,EAA2B,EAAwE,EAA5D,CAA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