{"version":3,"file":"DateOverride.yFyloGUG.mjs","names":[],"sources":["https:/framerusercontent.com/modules/Ioy8MKV16XAQyXIVdOeK/xvov1kU4smWLjb5hQMXK/DateOverride.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import*as React from\"react\";/**\n * Framer用日付動的更新オーバーライド集\n * テキスト内のYYYY/MM/DD/HH/mm/ssプレースホルダーを自動置換\n */// ========== ヘルパー関数 ==========\nconst getJSTDate=()=>{const now=new Date;const jstOffset=9*60;const utcTime=now.getTime()+now.getTimezoneOffset()*6e4;return new Date(utcTime+jstOffset*6e4);};const processChildren=(children,replacements)=>{if(typeof children===\"string\"){let result=children;Object.entries(replacements).forEach(([key,value])=>{result=result.replace(new RegExp(key,\"g\"),value);});return result;}if(/*#__PURE__*/React.isValidElement(children)){const element=children;return /*#__PURE__*/React.cloneElement(element,{...element.props,children:processChildren(element.props.children,replacements)});}if(Array.isArray(children)){return children.map(child=>processChildren(child,replacements));}return children;};// ========== エクスポート関数: 現在日付 ==========\n/**\n * 現在日付（ゼロパディングなし）\n * 例: \"YYYY年MM月\" → \"2025年9月\"\n */export function withCurrentDate(Component){return props=>{const jstTime=getJSTDate();const year=jstTime.getFullYear();const month=jstTime.getMonth()+1;const day=jstTime.getDate();const replacements={YYYY:year.toString(),MM:month.toString(),DD:day.toString()};const newChildren=processChildren(props.children,replacements);return /*#__PURE__*/_jsx(Component,{...props,children:newChildren});};}/**\n * 現在日付（ゼロパディング付き）\n * 例: \"YYYY年MM月DD日\" → \"2025年09月07日\"\n */export function withCurrentDatePadded(Component){return props=>{const jstTime=getJSTDate();const year=jstTime.getFullYear();const month=String(jstTime.getMonth()+1).padStart(2,\"0\");const day=String(jstTime.getDate()).padStart(2,\"0\");const replacements={YYYY:year.toString(),MM:month,DD:day};const newChildren=processChildren(props.children,replacements);return /*#__PURE__*/_jsx(Component,{...props,children:newChildren});};}/**\n * 詳細版 - 日付と時刻も対応\n * 例: \"YYYY年MM月DD日 HH:mm:ss\" → \"2025年09月28日 15:30:45\"\n */export function withDetailedDate(Component){return props=>{const jstTime=getJSTDate();const year=jstTime.getFullYear();const month=String(jstTime.getMonth()+1).padStart(2,\"0\");const day=String(jstTime.getDate()).padStart(2,\"0\");const hours=String(jstTime.getHours()).padStart(2,\"0\");const minutes=String(jstTime.getMinutes()).padStart(2,\"0\");const seconds=String(jstTime.getSeconds()).padStart(2,\"0\");const replacements={YYYY:year.toString(),MM:month,DD:day,HH:hours,mm:minutes,ss:seconds};const newChildren=processChildren(props.children,replacements);return /*#__PURE__*/_jsx(Component,{...props,children:newChildren});};}// ========== 未来日付（月単位） ==========\nexport function withFutureDate1Month(Component){return props=>{const jstTime=getJSTDate();const targetDate=new Date(jstTime);targetDate.setMonth(targetDate.getMonth()+1);const year=targetDate.getFullYear();const month=targetDate.getMonth()+1;const day=targetDate.getDate();const replacements={YYYY:year.toString(),MM:month.toString(),DD:day.toString()};const newChildren=processChildren(props.children,replacements);return /*#__PURE__*/_jsx(Component,{...props,children:newChildren});};}export function withFutureDate2Months(Component){return props=>{const jstTime=getJSTDate();const targetDate=new Date(jstTime);targetDate.setMonth(targetDate.getMonth()+2);const year=targetDate.getFullYear();const month=targetDate.getMonth()+1;const day=targetDate.getDate();const replacements={YYYY:year.toString(),MM:month.toString(),DD:day.toString()};const newChildren=processChildren(props.children,replacements);return /*#__PURE__*/_jsx(Component,{...props,children:newChildren});};}export function withFutureDate3Months(Component){return props=>{const jstTime=getJSTDate();const targetDate=new Date(jstTime);targetDate.setMonth(targetDate.getMonth()+3);const year=targetDate.getFullYear();const month=targetDate.getMonth()+1;const day=targetDate.getDate();const replacements={YYYY:year.toString(),MM:month.toString(),DD:day.toString()};const newChildren=processChildren(props.children,replacements);return /*#__PURE__*/_jsx(Component,{...props,children:newChildren});};}export function withFutureDate6Months(Component){return props=>{const jstTime=getJSTDate();const targetDate=new Date(jstTime);targetDate.setMonth(targetDate.getMonth()+6);const year=targetDate.getFullYear();const month=targetDate.getMonth()+1;const day=targetDate.getDate();const replacements={YYYY:year.toString(),MM:month.toString(),DD:day.toString()};const newChildren=processChildren(props.children,replacements);return /*#__PURE__*/_jsx(Component,{...props,children:newChildren});};}export function withFutureDate12Months(Component){return props=>{const jstTime=getJSTDate();const targetDate=new Date(jstTime);targetDate.setMonth(targetDate.getMonth()+12);const year=targetDate.getFullYear();const month=targetDate.getMonth()+1;const day=targetDate.getDate();const replacements={YYYY:year.toString(),MM:month.toString(),DD:day.toString()};const newChildren=processChildren(props.children,replacements);return /*#__PURE__*/_jsx(Component,{...props,children:newChildren});};}// ========== 未来日付（日単位） ==========\nexport function withFutureDate7Days(Component){return props=>{const jstTime=getJSTDate();const targetDate=new Date(jstTime);targetDate.setDate(targetDate.getDate()+7);const year=targetDate.getFullYear();const month=targetDate.getMonth()+1;const day=targetDate.getDate();const replacements={YYYY:year.toString(),MM:month.toString(),DD:day.toString()};const newChildren=processChildren(props.children,replacements);return /*#__PURE__*/_jsx(Component,{...props,children:newChildren});};}export function withFutureDate14Days(Component){return props=>{const jstTime=getJSTDate();const targetDate=new Date(jstTime);targetDate.setDate(targetDate.getDate()+14);const year=targetDate.getFullYear();const month=targetDate.getMonth()+1;const day=targetDate.getDate();const replacements={YYYY:year.toString(),MM:month.toString(),DD:day.toString()};const newChildren=processChildren(props.children,replacements);return /*#__PURE__*/_jsx(Component,{...props,children:newChildren});};}// ========== 過去日付（月単位） ==========\nexport function withPastDate1Month(Component){return props=>{const jstTime=getJSTDate();const targetDate=new Date(jstTime);targetDate.setMonth(targetDate.getMonth()-1);const year=targetDate.getFullYear();const month=targetDate.getMonth()+1;const day=targetDate.getDate();const replacements={YYYY:year.toString(),MM:month.toString(),DD:day.toString()};const newChildren=processChildren(props.children,replacements);return /*#__PURE__*/_jsx(Component,{...props,children:newChildren});};}export function withPastDate3Months(Component){return props=>{const jstTime=getJSTDate();const targetDate=new Date(jstTime);targetDate.setMonth(targetDate.getMonth()-3);const year=targetDate.getFullYear();const month=targetDate.getMonth()+1;const day=targetDate.getDate();const replacements={YYYY:year.toString(),MM:month.toString(),DD:day.toString()};const newChildren=processChildren(props.children,replacements);return /*#__PURE__*/_jsx(Component,{...props,children:newChildren});};}export function withPastDate6Months(Component){return props=>{const jstTime=getJSTDate();const targetDate=new Date(jstTime);targetDate.setMonth(targetDate.getMonth()-6);const year=targetDate.getFullYear();const month=targetDate.getMonth()+1;const day=targetDate.getDate();const replacements={YYYY:year.toString(),MM:month.toString(),DD:day.toString()};const newChildren=processChildren(props.children,replacements);return /*#__PURE__*/_jsx(Component,{...props,children:newChildren});};}export function withPastDate12Months(Component){return props=>{const jstTime=getJSTDate();const targetDate=new Date(jstTime);targetDate.setMonth(targetDate.getMonth()-12);const year=targetDate.getFullYear();const month=targetDate.getMonth()+1;const day=targetDate.getDate();const replacements={YYYY:year.toString(),MM:month.toString(),DD:day.toString()};const newChildren=processChildren(props.children,replacements);return /*#__PURE__*/_jsx(Component,{...props,children:newChildren});};}// ========== 過去日付（日単位） ==========\nexport function withPastDate7Days(Component){return props=>{const jstTime=getJSTDate();const targetDate=new Date(jstTime);targetDate.setDate(targetDate.getDate()-7);const year=targetDate.getFullYear();const month=targetDate.getMonth()+1;const day=targetDate.getDate();const replacements={YYYY:year.toString(),MM:month.toString(),DD:day.toString()};const newChildren=processChildren(props.children,replacements);return /*#__PURE__*/_jsx(Component,{...props,children:newChildren});};}export function withPastDate14Days(Component){return props=>{const jstTime=getJSTDate();const targetDate=new Date(jstTime);targetDate.setDate(targetDate.getDate()-14);const year=targetDate.getFullYear();const month=targetDate.getMonth()+1;const day=targetDate.getDate();const replacements={YYYY:year.toString(),MM:month.toString(),DD:day.toString()};const newChildren=processChildren(props.children,replacements);return /*#__PURE__*/_jsx(Component,{...props,children:newChildren});};}\nexport const __FramerMetadata__ = {\"exports\":{\"withFutureDate12Months\":{\"type\":\"reactHoc\",\"name\":\"withFutureDate12Months\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withPastDate3Months\":{\"type\":\"reactHoc\",\"name\":\"withPastDate3Months\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withFutureDate3Months\":{\"type\":\"reactHoc\",\"name\":\"withFutureDate3Months\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withFutureDate6Months\":{\"type\":\"reactHoc\",\"name\":\"withFutureDate6Months\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withCurrentDate\":{\"type\":\"reactHoc\",\"name\":\"withCurrentDate\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withFutureDate7Days\":{\"type\":\"reactHoc\",\"name\":\"withFutureDate7Days\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withPastDate12Months\":{\"type\":\"reactHoc\",\"name\":\"withPastDate12Months\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withPastDate6Months\":{\"type\":\"reactHoc\",\"name\":\"withPastDate6Months\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withFutureDate2Months\":{\"type\":\"reactHoc\",\"name\":\"withFutureDate2Months\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withPastDate14Days\":{\"type\":\"reactHoc\",\"name\":\"withPastDate14Days\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withCurrentDatePadded\":{\"type\":\"reactHoc\",\"name\":\"withCurrentDatePadded\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withPastDate1Month\":{\"type\":\"reactHoc\",\"name\":\"withPastDate1Month\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withFutureDate1Month\":{\"type\":\"reactHoc\",\"name\":\"withFutureDate1Month\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withFutureDate14Days\":{\"type\":\"reactHoc\",\"name\":\"withFutureDate14Days\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withPastDate7Days\":{\"type\":\"reactHoc\",\"name\":\"withPastDate7Days\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withDetailedDate\":{\"type\":\"reactHoc\",\"name\":\"withDetailedDate\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./DateOverride.map"],"mappings":"iKAQG,SAAgB,EAAgB,EAAU,CAAC,MAAO,IAAO,CAAC,IAAM,EAAQ,GAAY,CAAO,EAAK,EAAQ,aAAa,CAAO,EAAM,EAAQ,UAAU,CAAC,EAAQ,EAAI,EAAQ,SAAS,CAAO,EAAa,CAAC,KAAK,EAAK,UAAU,CAAC,GAAG,EAAM,UAAU,CAAC,GAAG,EAAI,UAAU,CAAC,CAAO,EAAY,EAAgB,EAAM,SAAS,EAAa,CAAC,OAAoB,EAAK,EAAU,CAAC,GAAG,EAAM,SAAS,EAAY,CAAC,uBAR7V,IAA4B,CAIjE,MAAe,CAAC,IAAM,EAAI,IAAI,KAAgC,EAAQ,EAAI,SAAS,CAAC,EAAI,mBAAmB,CAAC,IAAI,OAAO,IAAI,KAAK,EAAQ,IAAU,IAAI,EAAS,GAAiB,EAAS,IAAe,CAAC,GAAG,OAAO,GAAW,SAAS,CAAC,IAAI,EAAO,EAAkH,OAAzG,OAAO,QAAQ,EAAa,CAAC,SAAS,CAAC,EAAI,KAAS,CAAC,EAAO,EAAO,QAAQ,IAAI,OAAO,EAAI,IAAI,CAAC,EAAM,EAAG,CAAQ,EAAQ,GAAgB,EAAqB,EAAS,CAAC,CAAC,IAAM,EAAQ,EAAS,OAAoB,EAAmB,EAAQ,CAAC,GAAG,EAAQ,MAAM,SAAS,EAAgB,EAAQ,MAAM,SAAS,EAAa,CAAC,CAAC,CAA+F,OAA1F,MAAM,QAAQ,EAAS,CAAS,EAAS,IAAI,GAAO,EAAgB,EAAM,EAAa,CAAC,CAAS"}