ingred-ui 25.8.0 → 25.8.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.es.js CHANGED
@@ -2493,7 +2493,7 @@ object-assign
2493
2493
  &:hover:not(:disabled) {
2494
2494
  background: ${({theme:e})=>e.palette.gray.highlight};
2495
2495
  }
2496
- `,Ew=()=>{const{columns:e,setColumns:n,isSmallLayout:i}=s(zx),[a,l]=r(!1),[u,p]=r(e.map((e=>e.filtered||!1))),m=d((()=>e.filter((e=>e.filtered)).length),[e]),h=c((()=>{p(e.map((e=>e.filtered||!1)))}),[e]),g=c(((e,t)=>{p((n=>n.map(((n,r)=>e===r?t:n))))}),[p]),f=c((()=>{h(),l(!1)}),[h]),b=c((()=>{const t=structuredClone(e).map(((e,t)=>Object.assign(Object.assign({},e),{filtered:u[t]})));n(t),l(!1)}),[e,n,u]),v=c((e=>{l(e),e||h()}),[l,h]);return o((()=>h()),[e,h]),t.createElement(Gl,null,t.createElement(Fl,{width:360,trigger:t.createElement(qx,{type:"button",disabled:0===m},t.createElement(U,{name:"filter",color:"currentColor"}),i?m:`${m}列に適用中`),open:a,onOpenChange:v},t.createElement(jl,null,"フィルタが適用されている列"),e.map(((e,n)=>!0===e.filtered?t.createElement(Ri,{key:e.id,checked:u[n],onChange:e=>g(n,e)},e.label):null)),t.createElement(Yl,{prepend:t.createElement(U,{name:"question"})},"リセットしたいフィルタのボタンをオフにしてください"),t.createElement(Xl,null),t.createElement(Jl,null,t.createElement(fs,{type:"button",size:"small",color:"clear",onClick:f},"キャンセル"),t.createElement(fs,{type:"button",size:"small",onClick:b},"適用"))))},Cw=({onClose:e})=>{const{columns:n,setColumns:i}=s(zx),[o,a]=r(n),l=d((()=>[...o].sort(((e,t)=>e.order-t.order))),[o]),u=d((()=>l.reduce(((e,t)=>t.sortable||0!==e.sortable.length?t.sortable&&0===e.endFixed.length?(e.sortable.push(t),e):(e.endFixed.push(t),e):(e.startFixed.push(t),e)),{startFixed:[],sortable:[],endFixed:[]})),[l]),p=c((e=>{const t=structuredClone(n);t.forEach((t=>{if(u.startFixed.find((e=>e.id===t.id))||u.endFixed.find((e=>e.id===t.id)))return;const n=e.indexOf(t.id);-1!==n&&(t.order=u.startFixed.length+n)})),a(t)}),[n,u]),m=c((()=>{a(n),e()}),[n,e]),h=c((()=>{i(o),e()}),[i,o,e]);return t.createElement(Fl,{width:328,trigger:t.createElement(Bi,null,"カラムを編集")},u.startFixed.map((e=>t.createElement(Ol,{key:e.id,disabled:!0,id:e.id},t.createElement(Ri,{disabled:!0,checked:e.visible},e.label)))),t.createElement(Al,{order:u.sortable.map((e=>e.id)),onOrderChange:p},u.sortable.map((e=>t.createElement(Ol,{key:e.id,id:e.id},t.createElement(Ri,{checked:e.visible,onChange:()=>a(o.map((t=>t.id===e.id?Object.assign(Object.assign({},t),{visible:!t.visible}):t)))},e.label))))),u.endFixed.map((e=>t.createElement(Ol,{key:e.id,disabled:!0,id:e.id},t.createElement(Ri,{key:e.id,disabled:!0,checked:e.visible},e.label)))),t.createElement(Yl,{prepend:t.createElement(U,{name:"question"})},"カラムの並び順、表示・非表示を切り替えます。"),t.createElement(Xl,null),t.createElement(Jl,null,t.createElement(fs,{size:"small",color:"clear",onClick:m},"キャンセル"),t.createElement(fs,{size:"small",onClick:h},"適用")))},Iw=()=>{const{pageSize:e,pageSizeOptions:n,setPageSize:r}=s(zx);return t.createElement(Fl,{width:136,trigger:t.createElement(Bi,{append:e},"件数を変更")},n.map((n=>t.createElement(Oi,{key:n,closeOnChange:!0,checked:e===n,onChange:()=>r(n)},n,"件"))))},kw=[{value:-2,label:"より狭くする"},{value:-1,label:"狭くする"},{value:0,label:"標準"},{value:1,label:"広くする"},{value:2,label:"より広くする"}],Aw=()=>{const{rowSpacing:e,setRowSpacing:n}=s(zx),r=d((()=>{var t;return(null===(t=kw.find((t=>t.value===e)))||void 0===t?void 0:t.label)||"標準"}),[e]);return t.createElement(Fl,{width:168,trigger:t.createElement(Bi,{append:r},"表示密度を変更")},kw.map((({value:r,label:i})=>t.createElement(Oi,{key:r,closeOnChange:!0,checked:e===r,onChange:()=>(e=>{n(e)})(r)},i))))},Mw=()=>{const{isSmallLayout:e,totalCount:n,currentPage:r,pageSize:i,pageSizeOptions:a,setCurrentPage:l,setPageSize:u}=s(zx),p=c((e=>{l(0),u(e)}),[l,u]),m=d((()=>Math.ceil(n/i)-1),[n,i]);return o((()=>{r>m&&l(m)}),[r,m,l]),t.createElement(Ux,null,t.createElement("button",{type:"button","aria-label":"前のページへ",disabled:0===r||0===n,onClick:()=>l(Math.max(r-1,0))},t.createElement(U,{name:"arrow_left",color:"currentColor"})),!e&&t.createElement(Gl,null,t.createElement(Fl,{width:296,trigger:t.createElement("button",{type:"button"},0===n?t.createElement(t.Fragment,null,"0 / 0"):t.createElement(t.Fragment,null,Math.min(r*i+1,n),t.createElement(Qx,null,"-"),Math.min((r+1)*i,n),t.createElement(Qx,null,"/"),n),t.createElement(U,{name:"arrow_down",size:"sm",color:"currentColor"}))},t.createElement(jl,null,"表示件数を変更"),a.map((e=>t.createElement(Oi,{key:e,checked:i===e,onChange:()=>p(e)},e))))),t.createElement("button",{type:"button","aria-label":"次のページへ",disabled:r===m||0===n,onClick:()=>l(Math.min(r+1,m))},t.createElement(U,{name:"arrow_right",color:"currentColor"})))},Dw=({tableActions:e,customTableActionArea:n})=>{const{isSmallLayout:i,columns:o,rowIds:a,checkedRows:l,setCheckedRows:u}=s(zx),p=j(),m=d((()=>a.length>0&&l.length===a.length),[l,a]),h=d((()=>0!==l.length&&l.length!==a.length),[l,a]),[g,f]=r(!1),[b,v]=r(!1),[y,x]=r(!1),w=d((()=>o.some((e=>void 0!==e.filtered))),[o]),E=c((()=>{u(m?[]:a)}),[m,a,u]),C=c(((e,n)=>((e,n,r,i)=>{if(n&&t.isValidElement(e)){let o=r?n.enabled:n.disabled||"currentColor";return"success"===o?o=i.palette.success.main:"danger"===o?o=i.palette.danger.main:"primary"===o?o=i.palette.primary.main:"warning"===o&&(o=i.palette.warning.main),t.cloneElement(e,Object.assign(Object.assign({},e.props),{color:o}))}return e})(e,n,l.length>0,p)),[l.length,p]),I=c(((e,n,r)=>{var i;return"singleButton"===e.type?t.createElement(fs,{key:Px(e,n),icon:C(e.icon,e.dynamicIconColor),color:null!==(i=e.color)&&void 0!==i?i:"basicLight",size:"small",inline:r,style:e.style,disabled:_x(e,l),onClick:()=>e.onClick(l)},e.label):"groupButton"===e.type?t.createElement(Pp,{key:Px(e,n),size:"small"},e.items.map(((e,r)=>{var i;return t.createElement(fs,{key:Fx(e,n,r),icon:C(e.icon,e.dynamicIconColor),color:null!==(i=e.color)&&void 0!==i?i:"basicLight",style:e.style,disabled:_x(e,l),onClick:()=>e.onClick(l)},e.label)}))):"separator"===e.type?t.createElement(yw,{key:Px(e,n)}):"heading"===e.type?t.createElement("span",{key:Px(e,n),style:{padding:"8px",fontSize:"14px",fontWeight:"bold"}},e.label):t.createElement(yw,{key:Px(e,n)})}),[l,C]),k=c(((e,n=!1)=>{const r=[],i=new Set;return e.forEach(((o,a)=>{if("singleButton"!==o.type&&"groupButton"!==o.type||!o.headingLabel||i.has(o.headingLabel))"singleButton"!==o.type&&"groupButton"!==o.type||o.headingLabel?"separator"===o.type?r.push(t.createElement(Xl,{key:`separator-${a}`})):"heading"===o.type?r.push(t.createElement(jl,{key:`heading-${o.label||a}`},o.label)):"divider"===o.type&&r.push(t.createElement(Xl,{key:`divider-${a}`})):"singleButton"===o.type?r.push(t.createElement(ki,{key:`single-${o.label||a}`,prepend:C(o.icon,o.dynamicIconColor),disabled:_x(o,l,n),onClick:()=>{o.onClick(l),n?x(!1):v(!1)}},o.label)):"groupButton"===o.type&&o.items.forEach(((e,i)=>{r.push(t.createElement(ki,{key:Gx(e,"mobile-group",a,i),prepend:C(e.icon,e.dynamicIconColor),disabled:_x(e,l,n),onClick:()=>{e.onClick(l),n?x(!1):v(!1)}},e.label))}));else{i.add(o.headingLabel);const a=e.filter((e=>("singleButton"===e.type||"groupButton"===e.type)&&e.headingLabel===o.headingLabel));r.push(t.createElement(jl,{key:`group-${o.headingLabel}-heading`},o.headingLabel)),a.forEach(((e,i)=>{"singleButton"===e.type?r.push(t.createElement(ki,{key:`group-${e.headingLabel}-${e.label||i}`,prepend:C(e.icon,e.dynamicIconColor),disabled:_x(e,l,n),onClick:()=>{e.onClick(l),n?x(!1):v(!1)}},e.label)):"groupButton"===e.type&&e.items.forEach(((e,a)=>{r.push(t.createElement(ki,{key:Gx(e,`group-${o.headingLabel}-group`,i,a),prepend:C(e.icon,e.dynamicIconColor),disabled:_x(e,l,n),onClick:()=>{e.onClick(l),n?x(!1):v(!1)}},e.label))}))}))}})),r}),[l,v,x,C]);let A=null;if(n)A=n({isSmallLayout:i,checkedRows:l});else if(e&&e.length>0){const{checkedActions:n,uncheckedActions:r}={checkedActions:(M=e).filter((e=>{const t="enabledWhen"in e?e.enabledWhen:void 0;return"checked"===t||void 0===t})),uncheckedActions:M.filter((e=>"unchecked"===("enabledWhen"in e?e.enabledWhen:void 0)))};if(i)A=t.createElement(xw,null,n.length>0&&t.createElement(Gl,null,t.createElement(Fl,{open:b,trigger:t.createElement(ww,{type:"button",disabled:0===l.length},t.createElement("span",{style:{color:0===l.length?"inherit":p.palette.primary.main,fontWeight:700}},0===l.length?"-":l.length),"件を操作",t.createElement(U,{name:"arrow_down",size:"sm-md",color:"currentColor"})),width:200,onOpenChange:v},k(n))),r.length>0&&t.createElement(Gl,null,t.createElement(Fl,{open:y,trigger:t.createElement(fs,{type:"button",color:"basicLight",size:"small",icon:t.createElement(U,{name:"more_vert",color:"currentColor"}),disabled:l.length>0}),width:200,onOpenChange:x},k(r,!0))));else{const{dropdownActions:e}=Bx(n),{dropdownActions:i}=Bx(r),o=()=>{const r=[];return n.forEach(((n,i)=>{var o;const a=null!==(o=n.displayIn)&&void 0!==o?o:"toolbar";if("toolbar"===a)r.push(I(n,i,!0));else if("dropdown"===a){r.some((e=>t.isValidElement(e)&&"checked-dropdown"===e.key))||r.push(t.createElement(Gl,{key:"checked-dropdown"},t.createElement(Fl,{open:b,trigger:t.createElement(fs,{type:"button",color:"basicLight",size:"small",icon:t.createElement(U,{name:"more_vert",color:"currentColor"}),disabled:0===l.length}),width:200,onOpenChange:v},e.map(((e,n)=>"singleButton"===e.type?t.createElement(ki,{key:`checked-single-${e.label||n}`,prepend:C(e.icon,e.dynamicIconColor),disabled:_x(e,l),onClick:()=>{e.onClick(l),v(!1)}},e.label):"groupButton"===e.type?e.items.map(((e,r)=>t.createElement(ki,{key:Gx(e,"checked-group",n,r),prepend:C(e.icon,e.dynamicIconColor),disabled:_x(e,l),onClick:()=>{e.onClick(l),v(!1)}},e.label))):"separator"===e.type?t.createElement(Xl,{key:`checked-separator-sep-${n}`}):"heading"===e.type?t.createElement(jl,{key:`checked-heading-${e.label||`heading${n}`}`},e.label):t.createElement(Xl,{key:`checked-divider-div-${n}`}))))))}})),r},a=()=>{const e=[];return r.forEach(((n,r)=>{var o;const a=null!==(o=n.displayIn)&&void 0!==o?o:"toolbar";if("toolbar"===a)e.push(I(n,r,!0));else if("dropdown"===a){e.some((e=>t.isValidElement(e)&&"unchecked-dropdown"===e.key))||e.push(t.createElement(Gl,{key:"unchecked-dropdown"},t.createElement(Fl,{open:y,trigger:t.createElement(fs,{type:"button",color:"basicLight",size:"small",icon:t.createElement(U,{name:"more_vert",color:"currentColor"}),disabled:l.length>0}),width:200,onOpenChange:x},i.map(((e,n)=>"singleButton"===e.type?t.createElement(ki,{key:`unchecked-single-${e.label||n}`,prepend:C(e.icon,e.dynamicIconColor),disabled:_x(e,l,!0),onClick:()=>{e.onClick(l),x(!1)}},e.label):"groupButton"===e.type?e.items.map(((e,r)=>t.createElement(ki,{key:Gx(e,"unchecked-group",n,r),prepend:C(e.icon,e.dynamicIconColor),disabled:_x(e,l,!0),onClick:()=>{e.onClick(l),x(!1)}},e.label))):"separator"===e.type?t.createElement(Xl,{key:`unchecked-separator-sep-${n}`}):"heading"===e.type?t.createElement(jl,{key:`unchecked-heading-${e.label||`heading${n}`}`},e.label):t.createElement(Xl,{key:`unchecked-divider-div-${n}`}))))))}})),e};A=t.createElement(xw,null,o(),n.length>0&&r.length>0&&t.createElement(yw,null),a())}}var M;return t.createElement(Jx,{isSmallLayout:i},t.createElement(fw,null,t.createElement(hh,{checked:m||h,indeterminate:h,disabled:0===a.length,onChange:E}),!i&&t.createElement(bw,null,t.createElement("span",{style:{color:p.palette.primary.main,fontWeight:700}},0===l.length?"-":l.length),"件を"),A),t.createElement(Kx,null,w&&t.createElement(Ew,null),t.createElement(Mw,null),t.createElement(Gl,null,t.createElement(Fl,{open:g,width:316,trigger:t.createElement(fs,{type:"button",color:"basicLight",size:"small",icon:t.createElement(U,{name:"setting",color:"currentColor"})}),onOpenChange:f},o.some((e=>e.sortable))&&t.createElement(Cw,{onClose:()=>f(!1)}),t.createElement(Iw,null),t.createElement(Aw,null)))))},$w=({bordered:e,currentPage:n,pageSize:a,pageSizeOptions:l,totalCount:s,columns:d,onPageChange:u,onPageSizeChange:p,onColumnsChange:m,onCheckedRowsChange:h,children:g,tableActions:f,customTableActionArea:b})=>{const[v,y]=r(!1),[x,w]=r([]),[E,C]=r([]),[I,k]=r([]),[A,M]=r(0),D=i(null),$=c(((e,t)=>{const n=[...I];n[e]=t,k(n)}),[I,k]);o((()=>{if(!D.current)return;const e=()=>{var e;D.current&&y((null===(e=D.current)||void 0===e?void 0:e.clientWidth)<640)},t=new ResizeObserver(e);return e(),t.observe(D.current),()=>{t.disconnect()}}),[]);const O=c((e=>{C(e),null==h||h(e)}),[C,h]),N=i(n);return o((()=>{N.current!==n&&O([]),N.current=n}),[n,O]),o((()=>{if(0===E.length)return;const e=E.filter((e=>x.includes(e)));e.length!==E.length&&O(e)}),[x,E,O]),t.createElement(Wx,{ref:D,bordered:e},t.createElement(zx.Provider,{value:{isSmallLayout:v,rowIds:x,hasRowControls:!!f,checkedRows:E,totalCount:s,currentPage:n,pageSize:a,pageSizeOptions:l,columns:d,columnWidths:I,rowSpacing:A,setRowIds:w,setCheckedRows:O,setCurrentPage:u,setPageSize:p,setColumns:m,setColumnWidth:$,setRowSpacing:M}},t.createElement(Dw,{tableActions:f,customTableActionArea:b}),t.createElement(Xx,null,t.createElement("table",null,g))))},Ow=({children:e})=>{const{hasRowControls:n,columns:r}=s(zx),i=d((()=>h.toArray(e).map(((e,t)=>{const n=r[t];return{id:n.id,index:t,order:n.order,visible:n.visible,child:e}})).filter((e=>void 0!==e.id))),[e,r]),o=d((()=>i.sort(((e,t)=>e.order-t.order)).filter((e=>e.visible))),[i]);return t.createElement(t.Fragment,null,t.createElement("colgroup",null,n&&t.createElement("col",{style:{width:34}}),o.map((({id:e,child:n})=>g(n)?t.createElement("col",{key:e,style:{width:n.props.width}}):null))),t.createElement(tw,null,t.createElement("tr",null,n&&t.createElement("th",{"aria-label":"empty cell"}),o.map((({id:e,index:n,child:r})=>t.createElement(Zx.Provider,{key:e,value:{index:n}},r))))))},Nw=({className:e,isResizable:n,width:a,minWidth:l=32,maxWidth:d=1/0,children:u,onWidthChange:p})=>{const{isSmallLayout:m,setColumnWidth:h}=s(zx),g=s(Zx),[f,b]=r(!1),v=i(null),y=i(null),x=i(0),w=i(0),E=c((e=>{b(!0),y.current&&null===v.current&&(v.current=e.pointerId,w.current=a||y.current.clientWidth,x.current=e.clientX)}),[a]),C=c((e=>{if(!p)return;if(v.current!==e.pointerId)return;e.cancelable&&e.preventDefault();const t=e.clientX-x.current,n=((e,t,n)=>Math.min(Math.max(e,t),n))(w.current+t,l,d);p(n),h(g.index,n)}),[p,l,d,h,g.index]),I=c((()=>{b(!1),v.current=null}),[]);return o((()=>{if(f)return document.addEventListener("pointermove",C),document.addEventListener("pointerup",I),()=>{document.removeEventListener("pointermove",C),document.removeEventListener("pointerup",I)}}),[f,C,I]),t.createElement(nw,{ref:y,className:e,"data-dragging":f,style:{minWidth:isFinite(l)&&l<=d?l:void 0,maxWidth:isFinite(d)&&l<=d?d:void 0}},t.createElement(rw,{isSmallLayout:m},u,n&&t.createElement(iw,{type:"button","aria-label":"resize the column",onPointerDown:E}),f&&A(t.createElement(ow,{"data-min":a&&l>=a,"data-max":a&&d<=a}),document.body)))},Sw=({showSortButton:e,sortButtonDirection:n,onSortChange:r,children:i})=>{const o=d((()=>"asc"===n?"desc":"desc"!==n?"asc":void 0),[n]),a=c((()=>{null==r||r(o)}),[r,o]);return t.createElement(aw,null,i,e&&t.createElement(lw,{type:"button","aria-label":"sort the column","data-sort-direction":n,onClick:a},t.createElement("svg",{width:"18",height:"18",viewBox:"0 0 18 18"},t.createElement("path",{d:"M8.17 3.25a1 1 0 0 1 1.3-.33c.15.08.27.19.36.33l2.13 3.2c.1.15.16.33.17.51 0 .18-.03.36-.12.52s-.21.29-.37.39a1 1 0 0 1-.51.14H6.87a1 1 0 0 1-.83-1.56z"}),t.createElement("path",{d:"M9.83 14.75a1 1 0 0 1-1.3.33.95.95 0 0 1-.36-.33l-2.13-3.2c-.1-.15-.16-.33-.17-.51 0-.18.03-.36.12-.52s.21-.29.37-.39a1 1 0 0 1 .51-.14h4.26a1 1 0 0 1 .83 1.56z"}))))},Lw=({children:e})=>{const{rowIds:n,setRowIds:r}=s(zx);return o((()=>{const t=[];h.forEach(e,(e=>{g(e)&&"string"==typeof e.props.id&&t.push(e.props.id)})),t.length===n.length&&t.every((e=>n.includes(e)))||r(t)}),[e,n,r]),t.createElement("tbody",null,e)},Hw=({id:e,children:n})=>{const{isSmallLayout:r,columns:i,hasRowControls:o,checkedRows:a,setCheckedRows:l,rowSpacing:u}=s(zx),p=d((()=>a.includes(e)),[e,a]),m=c((()=>{const t=a.includes(e)?a.filter((t=>t!==e)):[...a,e];l(t)}),[e,a,l]),g=d((()=>h.toArray(n).map(((e,t)=>{const n=i[t];return{id:n.id,index:t,order:n.order,visible:n.visible,child:e}})).filter((e=>void 0!==e.id))),[n,i]),f=d((()=>g.sort(((e,t)=>e.order-t.order)).filter((e=>e.visible))),[g]);return t.createElement(sw,{"data-highlighted":p,"data-spacing":u,isSmallLayout:r},o&&t.createElement(cw,null,t.createElement(dw,null,t.createElement(hh,{checked:p,onChange:m}),t.createElement("input",{type:"checkbox","aria-label":"この行を選択"}))),f.map((({child:e})=>e)))},Vw=({loading:e,children:n})=>t.createElement("td",null,t.createElement(uw,null,t.createElement(mw,null,n),e&&t.createElement(pw,null,t.createElement(us,{width:"20px"})))),Rw=({prepend:e,children:n,onClick:r})=>{const{isSmallLayout:i}=s(zx);return i?t.createElement(ki,{prepend:e,onClick:r},n):t.createElement(ew,{type:"button",onClick:r},e,n)},Tw=({label:e,value:n,children:i,onChange:a})=>{const[l,s]=r(n),[c,d]=r(!1),u=()=>{d(!1),a(l)};return o((()=>{s(n)}),[n]),t.createElement(hw,null,i,t.createElement(gw,null,t.createElement(Gl,null,t.createElement(Fl,{width:252,trigger:t.createElement(fs,{type:"button",color:"primaryPale",size:"small",inline:!0,icon:t.createElement(U,{name:"pencil",color:"currentColor"})}),open:c,onOpenChange:d},t.createElement(jl,null,e),t.createElement(Hl,{value:l,onChange:e=>s(e.target.value),onEnter:u}),t.createElement(Xl,null),t.createElement(Jl,null,t.createElement(fs,{type:"button",color:"clear",size:"small",onClick:()=>{d(!1),s(n)}},"キャンセル"),t.createElement(fs,{type:"button",color:"primary",size:"small",onClick:u},"適用"))))))},zw=({label:e,value:n,options:i,children:o,onChange:a})=>{const[l,s]=r(!1);return t.createElement(hw,null,o,t.createElement(gw,null,t.createElement(Gl,null,t.createElement(Fl,{width:252,trigger:t.createElement(fs,{type:"button",color:"primaryPale",size:"small",inline:!0,icon:t.createElement(U,{name:"pencil",color:"currentColor"})}),open:l,onOpenChange:s},t.createElement(jl,null,e),i.map((e=>t.createElement(Oi,{key:e,closeOnChange:!0,checked:n===e,onChange:()=>a(e)},e)))))))},Zw=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|YYYY|YY?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,Bw=/\d\d/,_w=/-?\d\d?/,Pw=/\d*[^-_:/,()\s\d]+/;let Fw={},Gw=function(e){return(e=+e)+(e>68?1900:2e3)};const jw=function(e){return function(t){this[e]=+t}},Ww=[/[+-]\d\d:?(\d\d)?|Z/,function(e){(this.zone||(this.zone={})).offset=function(e){if(!e)return 0;if("Z"===e)return 0;const t=e.match(/([+-]|\d\d)/g),n=60*t[1]+(+t[2]||0);return 0===n?0:"+"===t[0]?-n:n}(e)}],Yw=e=>{const t=Fw[e];return t&&(t.indexOf?t:t.s.concat(t.f))},Xw=(e,t)=>{let n;const{meridiem:r}=Fw;if(r){for(let i=1;i<=24;i+=1)if(e.indexOf(r(i,0,t))>-1){n=i>12;break}}else n=e===(t?"pm":"PM");return n},Jw={A:[Pw,function(e){this.afternoon=Xw(e,!1)}],a:[Pw,function(e){this.afternoon=Xw(e,!0)}],S:[/\d/,function(e){this.milliseconds=100*+e}],SS:[Bw,function(e){this.milliseconds=10*+e}],SSS:[/\d{3}/,function(e){this.milliseconds=+e}],s:[_w,jw("seconds")],ss:[_w,jw("seconds")],m:[_w,jw("minutes")],mm:[_w,jw("minutes")],H:[_w,jw("hours")],h:[_w,jw("hours")],HH:[_w,jw("hours")],hh:[_w,jw("hours")],D:[_w,jw("day")],DD:[Bw,jw("day")],Do:[Pw,function(e){const{ordinal:t}=Fw;if([this.day]=e.match(/\d+/),t)for(let n=1;n<=31;n+=1)t(n).replace(/\[|\]/g,"")===e&&(this.day=n)}],M:[_w,jw("month")],MM:[Bw,jw("month")],MMM:[Pw,function(e){const t=Yw("months"),n=(Yw("monthsShort")||t.map((e=>e.slice(0,3)))).indexOf(e)+1;if(n<1)throw new Error;this.month=n%12||n}],MMMM:[Pw,function(e){const t=Yw("months").indexOf(e)+1;if(t<1)throw new Error;this.month=t%12||t}],Y:[/[+-]?\d+/,jw("year")],YY:[Bw,function(e){this.year=Gw(e)}],YYYY:[/\d{4}/,jw("year")],Z:Ww,ZZ:Ww};const Uw=(e,t,n)=>{try{if(["x","X"].indexOf(t)>-1)return new Date(("X"===t?1e3:1)*e);const r=function(e){const t=e.match(Zw),{length:n}=t;for(let e=0;e<n;e+=1){const n=t[e],r=Jw[n],i=r&&r[0],o=r&&r[1];t[e]=o?{regex:i,parser:o}:n.replace(/^\[|\]$/g,"")}return function(e){const r={};for(let i=0,o=0;i<n;i+=1){const n=t[i];if("string"==typeof n)o+=n.length;else{const{regex:t,parser:i}=n,a=e.slice(o),l=t.exec(a)[0];i.call(r,l),e=e.replace(l,"")}}return function(e){const{afternoon:t}=e;if(void 0!==t){const{hours:n}=e;t?n<12&&(e.hours+=12):12===n&&(e.hours=0),delete e.afternoon}}(r),r}}(t),{year:i,month:o,day:a,hours:l,minutes:s,seconds:c,milliseconds:d,zone:u}=r(e),p=new Date,m=i||p.getFullYear(),h=o-1,g=l||0,f=s||0,b=c||0,v=d||0;return u?new Date(Date.UTC(m,h,a,g,f,b,v+60*u.offset*1e3)):n?new Date(Date.UTC(m,h,a,g,f,b,v)):new Date(m,h,a,g,f,b,v)}catch(e){return new Date("")}};var Qw=(e,t,n)=>{n.p.customParseFormat=!0,e&&e.parseTwoDigitYear&&({parseTwoDigitYear:Gw}=e);const r=t.prototype,i=r.parse;r.parse=function(e){const{date:t,utc:r,args:o}=e;this.$u=r;const a=o[1];if("string"==typeof a){const e=!0===o[2],i=!0===o[3],l=e||i;let s=o[2];i&&([,,s]=o),Fw=this.$locale(),!e&&s&&(Fw=n.Ls[s]),this.$d=Uw(t,a,r),this.init(),s&&!0!==s&&(this.$L=this.locale(s).$L),l&&t!=this.format(a)&&(this.$d=new Date("")),Fw={}}else if(a instanceof Array){const e=a.length;for(let t=1;t<=e;t+=1){o[1]=a[t-1];const r=n.apply(this,o);if(r.isValid()){this.$d=r.$d,this.$L=r.$L,this.init();break}t===e&&(this.$d=new Date(""))}}else i.call(this,e)}};const qw=({date:e,format:t="YYYY-MM-DD",onDateChange:n})=>{ql.extend(Qw);const a=i(null),[l,s]=r(null==e?void 0:e.format(t)),[d,u]=r(hm(l)),[p,m]=r({start:0,end:d.length-1,current:0}),[h,g]=r(0),f=c((()=>{setTimeout((()=>{var e,t,n;const r=null!==(t=null===(e=a.current)||void 0===e?void 0:e.selectionStart)&&void 0!==t?t:0,i=d[d.length-1].end+1,o=r>=i?i:r,l=d.findIndex((e=>o>=e.start&&o<=e.end+1));m((e=>d[l].editable?e.current===l?e:Object.assign(Object.assign({},e),{current:l}):Object.assign(Object.assign({},e),{current:l+1}))),null===(n=a.current)||void 0===n||n.setSelectionRange(d[l].start,d[l].end+1)}))}),[d]),b=c((()=>{}),[]),v=c((()=>{m((e=>Object.assign(Object.assign({},e),{current:0}))),g(0)}),[]),y=c((e=>{const r=pm(e.code),i=r?mm(e.code):null;if(!um.includes(e.key)&&!r)return;if(e.key===sm.ArrowLeft||e.key===sm.ArrowRight){e.preventDefault();const t=e=>{const t=p.current;if(e===sm.ArrowLeft){for(let e=t-1;e>=0;e--)if(d[e].editable)return e-t}else if(e===sm.ArrowRight)for(let e=t+1;e<d.length;e++)if(d[e].editable)return e-t;return 0},n=e.key;m((e=>Object.assign(Object.assign({},e),{current:e.current+t(n)})))}if(e.key===sm.ArrowUp||e.key===sm.ArrowDown){e.preventDefault();const r=e.key===sm.ArrowUp?1:-1,i=Number(d[p.current].value)+r,o=String(i).padStart(d[p.current].value.length,"0"),a=[...d];a[p.current].value=o,u(a);const l=gm(a),c=ql(l,t);s(c.format(t)),c.isValid()&&n&&n(c)}const o=r?i:e.key;if((dm.includes(e.key)||r)&&o){e.preventDefault(),0===h&&(d[p.current].value="".padStart(d[p.current].value.length,"0"));const r=`${d[p.current].value.slice(1)}${o}`,i=[...d];i[p.current].value=r,u(i),g(h+1);const a=((e,t,n)=>{if(4===e)return"year";if(2===e){const e=(t.match(/[YMD]+/g)||[]).map(((e,t)=>({token:e,length:e.length,index:t}))),r=e[n];if(r){if(r.token.includes("Y"))return"year";if(r.token.includes("M"))return"month";if(r.token.includes("D"))return"day"}}return"unknown"})(d[p.current].value.length,t,p.current),l=((e,t,n,r)=>{if(0===t){const t=parseInt(e);return"month"===n?t>=2:"day"===n&&t>=4}return t+1===r})(o,h,a,d[p.current].value.length);if(l){g(0);for(let e=p.current+1;e<d.length;e++)if(d[e].editable){m((t=>Object.assign(Object.assign({},t),{current:e})));break}const e=gm(d),r=ql(e,t);s(r.format(t)),n&&n(r)}else{const e=gm(d);if(!ql(e,t,!0).isValid())return void s(e);const r=ql(e,t);s(r.format(t)),n&&n(r)}}}),[d,t,n,p]),x=c((()=>{f()}),[f]),w=c((e=>{e.preventDefault();const r=e.clipboardData.getData("text").trim(),i=/[Hh]|mm|ss/.test(t),o=[];o.push(t),o.push("YYYY年M月D日","YYYY年MM月DD日"),i&&o.push("YYYY年M月D日 HH:mm","YYYY年MM月DD日 HH:mm","YYYY年M月D日 HH:mm:ss","YYYY年MM月DD日 HH:mm:ss"),o.push("YYYY-MM-DD","YYYY-M-DD","YYYY-MM-D","YYYY-M-D"),i&&o.push("YYYY-MM-DD HH:mm","YYYY-M-DD HH:mm","YYYY-MM-D HH:mm","YYYY-M-D HH:mm","YYYY-MM-DD HH:mm:ss","YYYY-M-DD HH:mm:ss","YYYY-MM-D HH:mm:ss","YYYY-M-D HH:mm:ss"),o.push("YYYY/MM/DD","YYYY/M/DD","YYYY/MM/D","YYYY/M/D"),i&&o.push("YYYY/MM/DD HH:mm","YYYY/M/DD HH:mm","YYYY/MM/D HH:mm","YYYY/M/D HH:mm","YYYY/MM/DD HH:mm:ss","YYYY/M/DD HH:mm:ss","YYYY/MM/D HH:mm:ss","YYYY/M/D HH:mm:ss");const a=r.match(/(\d{4})[-/年](\d{1,2})[-/月](\d{1,2})/);if(a){const e=parseInt(a[1],10),t=parseInt(a[2],10),n=parseInt(a[3],10);if(!(e>=1900&&e<=2100&&t>=1&&t<=12&&n>=1&&n<=31))return;if(n>ql(`${e}-${t}-01`).daysInMonth())return}let l=null;const s=ql(r);if(s.isValid())l=s;else for(const e of o){const t=ql(r,e,!0);if(t.isValid()){l=t;break}}if(!l||!l.isValid())return;const c=l.year(),d=l.month()+1,u=l.date();if(c>=1900&&c<=2100&&d>=1&&d<=12&&u>=1&&u<=31){if(i){const e=r.match(/(\d{1,2}):(\d{1,2})(?::(\d{1,2}))?/);if(e){const t=parseInt(e[1],10),n=parseInt(e[2],10),r=e[3]?parseInt(e[3],10):0;if(!(!isNaN(t)&&!isNaN(n)&&!isNaN(r)&&t>=0&&t<=23&&n>=0&&n<=59&&r>=0&&r<=59))return}}n&&n(l)}}),[t,n]);return o((()=>{var e;null===(e=a.current)||void 0===e||e.setSelectionRange(d[p.current].start,d[p.current].end+1)}),[p,d]),o((()=>{s(null==e?void 0:e.format(t)),u(hm(null==e?void 0:e.format(t)))}),[e,t]),{ref:a,value:l,onFocus:b,onBlur:v,onKeyDown:y,onMouseDown:x,onPaste:w}},Kw=n((function(e,n){var{error:r=!1,errorText:i,format:o="YYYY-MM-DD",disabled:a=!1,size:l="medium",variant:s="light",width:c,append:u,onAppendClick:p}=e,m=$(e,["error","errorText","format","disabled","size","variant","width","append","onAppendClick"]);const h=qw(Object.assign({format:o},m)),{ref:g}=h,f=$(h,["ref"]),b=Td(n,g),v=d((()=>9*Mu(o)*(parseInt(Iu[l].fontSize)/13)+"px"),[o,l]),y=null!=c?c:v;return t.createElement(t.Fragment,null,t.createElement(Vu,Object.assign({ref:b,readOnly:!0,error:r||!!i,disabled:a,size:l,variant:s,width:y,append:u,onAppendClick:p},f)),i&&t.createElement(is,{pt:1},t.createElement(cu,null,i)))}));var eE=u(Kw);const tE=y.div`
2496
+ `,Ew=()=>{const{columns:e,setColumns:n,isSmallLayout:i}=s(zx),[a,l]=r(!1),[u,p]=r(e.map((e=>e.filtered||!1))),m=d((()=>e.filter((e=>e.filtered)).length),[e]),h=c((()=>{p(e.map((e=>e.filtered||!1)))}),[e]),g=c(((e,t)=>{p((n=>n.map(((n,r)=>e===r?t:n))))}),[p]),f=c((()=>{h(),l(!1)}),[h]),b=c((()=>{const t=structuredClone(e).map(((e,t)=>Object.assign(Object.assign({},e),{filtered:u[t]})));n(t),l(!1)}),[e,n,u]),v=c((e=>{l(e),e||h()}),[l,h]);return o((()=>h()),[e,h]),t.createElement(Gl,null,t.createElement(Fl,{width:360,trigger:t.createElement(qx,{type:"button",disabled:0===m},t.createElement(U,{name:"filter",color:"currentColor"}),i?m:`${m}列に適用中`),open:a,onOpenChange:v},t.createElement(jl,null,"フィルタが適用されている列"),e.map(((e,n)=>!0===e.filtered?t.createElement(Ri,{key:e.id,checked:u[n],onChange:e=>g(n,e)},e.label):null)),t.createElement(Yl,{prepend:t.createElement(U,{name:"question"})},"リセットしたいフィルタのボタンをオフにしてください"),t.createElement(Xl,null),t.createElement(Jl,null,t.createElement(fs,{type:"button",size:"small",color:"clear",onClick:f},"キャンセル"),t.createElement(fs,{type:"button",size:"small",onClick:b},"適用"))))},Cw=({onClose:e})=>{const{columns:n,setColumns:i}=s(zx),[o,a]=r(n),l=d((()=>[...o].sort(((e,t)=>e.order-t.order))),[o]),u=d((()=>l.reduce(((e,t)=>t.sortable||0!==e.sortable.length?t.sortable&&0===e.endFixed.length?(e.sortable.push(t),e):(e.endFixed.push(t),e):(e.startFixed.push(t),e)),{startFixed:[],sortable:[],endFixed:[]})),[l]),p=c((e=>{const t=structuredClone(n);t.forEach((t=>{if(u.startFixed.find((e=>e.id===t.id))||u.endFixed.find((e=>e.id===t.id)))return;const n=e.indexOf(t.id);-1!==n&&(t.order=u.startFixed.length+n)})),a(t)}),[n,u]),m=c((()=>{a(n),e()}),[n,e]),h=c((()=>{i(o),e()}),[i,o,e]);return t.createElement(Fl,{width:328,trigger:t.createElement(Bi,null,"カラムを編集")},u.startFixed.map((e=>t.createElement(Ol,{key:e.id,disabled:!0,id:e.id},t.createElement(Ri,{disabled:!0,checked:e.visible},e.label)))),t.createElement(Al,{order:u.sortable.map((e=>e.id)),onOrderChange:p},u.sortable.map((e=>t.createElement(Ol,{key:e.id,id:e.id},t.createElement(Ri,{checked:e.visible,onChange:()=>a(o.map((t=>t.id===e.id?Object.assign(Object.assign({},t),{visible:!t.visible}):t)))},e.label))))),u.endFixed.map((e=>t.createElement(Ol,{key:e.id,disabled:!0,id:e.id},t.createElement(Ri,{key:e.id,disabled:!0,checked:e.visible},e.label)))),t.createElement(Yl,{prepend:t.createElement(U,{name:"question"})},"カラムの並び順、表示・非表示を切り替えます。"),t.createElement(Xl,null),t.createElement(Jl,null,t.createElement(fs,{size:"small",color:"clear",onClick:m},"キャンセル"),t.createElement(fs,{size:"small",onClick:h},"適用")))},Iw=()=>{const{pageSize:e,pageSizeOptions:n,setPageSize:r}=s(zx);return t.createElement(Fl,{width:136,trigger:t.createElement(Bi,{append:e},"件数を変更")},n.map((n=>t.createElement(Oi,{key:n,closeOnChange:!0,checked:e===n,onChange:()=>r(n)},n,"件"))))},kw=[{value:-2,label:"より狭くする"},{value:-1,label:"狭くする"},{value:0,label:"標準"},{value:1,label:"広くする"},{value:2,label:"より広くする"}],Aw=()=>{const{rowSpacing:e,setRowSpacing:n}=s(zx),r=d((()=>{var t;return(null===(t=kw.find((t=>t.value===e)))||void 0===t?void 0:t.label)||"標準"}),[e]);return t.createElement(Fl,{width:168,trigger:t.createElement(Bi,{append:r},"表示密度を変更")},kw.map((({value:r,label:i})=>t.createElement(Oi,{key:r,closeOnChange:!0,checked:e===r,onChange:()=>(e=>{n(e)})(r)},i))))},Mw=()=>{const{isSmallLayout:e,totalCount:n,currentPage:r,pageSize:i,pageSizeOptions:a,setCurrentPage:l,setPageSize:u}=s(zx),p=c((e=>{l(0),u(e)}),[l,u]),m=d((()=>Math.ceil(n/i)-1),[n,i]);return o((()=>{r>m&&l(m)}),[r,m,l]),t.createElement(Ux,null,t.createElement("button",{type:"button","aria-label":"前のページへ",disabled:0===r||0===n,onClick:()=>l(Math.max(r-1,0))},t.createElement(U,{name:"arrow_left",color:"currentColor"})),!e&&t.createElement(Gl,null,t.createElement(Fl,{width:296,trigger:t.createElement("button",{type:"button"},0===n?t.createElement(t.Fragment,null,"0 / 0"):t.createElement(t.Fragment,null,Math.min(r*i+1,n),t.createElement(Qx,null,"-"),Math.min((r+1)*i,n),t.createElement(Qx,null,"/"),n),t.createElement(U,{name:"arrow_down",size:"sm",color:"currentColor"}))},t.createElement(jl,null,"表示件数を変更"),a.map((e=>t.createElement(Oi,{key:e,checked:i===e,onChange:()=>p(e)},e))))),t.createElement("button",{type:"button","aria-label":"次のページへ",disabled:r===m||0===n,onClick:()=>l(Math.min(r+1,m))},t.createElement(U,{name:"arrow_right",color:"currentColor"})))},Dw=({tableActions:e,customTableActionArea:n})=>{const{isSmallLayout:i,columns:o,rowIds:a,checkedRows:l,setCheckedRows:u}=s(zx),p=j(),m=d((()=>a.length>0&&l.length===a.length),[l,a]),h=d((()=>0!==l.length&&l.length!==a.length),[l,a]),[g,f]=r(!1),[b,v]=r(!1),[y,x]=r(!1),w=d((()=>o.some((e=>void 0!==e.filtered))),[o]),E=c((()=>{u(m?[]:a)}),[m,a,u]),C=c(((e,n)=>((e,n,r,i)=>{if(n&&t.isValidElement(e)){let o=r?n.enabled:n.disabled||"currentColor";return"success"===o?o=i.palette.success.main:"danger"===o?o=i.palette.danger.main:"primary"===o?o=i.palette.primary.main:"warning"===o&&(o=i.palette.warning.main),t.cloneElement(e,Object.assign(Object.assign({},e.props),{color:o}))}return e})(e,n,l.length>0,p)),[l.length,p]),I=c(((e,n,r)=>{var i;return"singleButton"===e.type?t.createElement(fs,{key:Px(e,n),icon:C(e.icon,e.dynamicIconColor),color:null!==(i=e.color)&&void 0!==i?i:"basicLight",size:"small",inline:r,style:e.style,disabled:_x(e,l),onClick:()=>e.onClick(l)},e.label):"groupButton"===e.type?t.createElement(Pp,{key:Px(e,n),size:"small"},e.items.map(((e,r)=>{var i;return t.createElement(fs,{key:Fx(e,n,r),icon:C(e.icon,e.dynamicIconColor),color:null!==(i=e.color)&&void 0!==i?i:"basicLight",style:e.style,disabled:_x(e,l),onClick:()=>e.onClick(l)},e.label)}))):"separator"===e.type?t.createElement(yw,{key:Px(e,n)}):"heading"===e.type?t.createElement("span",{key:Px(e,n),style:{padding:"8px",fontSize:"14px",fontWeight:"bold"}},e.label):t.createElement(yw,{key:Px(e,n)})}),[l,C]),k=c(((e,n=!1)=>{const r=[],i=new Set;return e.forEach(((o,a)=>{if("singleButton"!==o.type&&"groupButton"!==o.type||!o.headingLabel||i.has(o.headingLabel))"singleButton"!==o.type&&"groupButton"!==o.type||o.headingLabel?"separator"===o.type?r.push(t.createElement(Xl,{key:`separator-${a}`})):"heading"===o.type?r.push(t.createElement(jl,{key:`heading-${o.label||a}`},o.label)):"divider"===o.type&&r.push(t.createElement(Xl,{key:`divider-${a}`})):"singleButton"===o.type?r.push(t.createElement(ki,{key:`single-${o.label||a}`,prepend:C(o.icon,o.dynamicIconColor),disabled:_x(o,l,n),onClick:()=>{o.onClick(l),n?x(!1):v(!1)}},o.label)):"groupButton"===o.type&&o.items.forEach(((e,i)=>{r.push(t.createElement(ki,{key:Gx(e,"mobile-group",a,i),prepend:C(e.icon,e.dynamicIconColor),disabled:_x(e,l,n),onClick:()=>{e.onClick(l),n?x(!1):v(!1)}},e.label))}));else{i.add(o.headingLabel);const a=e.filter((e=>("singleButton"===e.type||"groupButton"===e.type)&&e.headingLabel===o.headingLabel));r.push(t.createElement(jl,{key:`group-${o.headingLabel}-heading`},o.headingLabel)),a.forEach(((e,i)=>{"singleButton"===e.type?r.push(t.createElement(ki,{key:`group-${e.headingLabel}-${e.label||i}`,prepend:C(e.icon,e.dynamicIconColor),disabled:_x(e,l,n),onClick:()=>{e.onClick(l),n?x(!1):v(!1)}},e.label)):"groupButton"===e.type&&e.items.forEach(((e,a)=>{r.push(t.createElement(ki,{key:Gx(e,`group-${o.headingLabel}-group`,i,a),prepend:C(e.icon,e.dynamicIconColor),disabled:_x(e,l,n),onClick:()=>{e.onClick(l),n?x(!1):v(!1)}},e.label))}))}))}})),r}),[l,v,x,C]);let A=null;if(n)A=n({isSmallLayout:i,checkedRows:l});else if(e&&e.length>0){const{checkedActions:n,uncheckedActions:r}={checkedActions:(M=e).filter((e=>{const t="enabledWhen"in e?e.enabledWhen:void 0;return"checked"===t||void 0===t})),uncheckedActions:M.filter((e=>"unchecked"===("enabledWhen"in e?e.enabledWhen:void 0)))};if(i)A=t.createElement(xw,null,n.length>0&&t.createElement(Gl,null,t.createElement(Fl,{open:b,trigger:t.createElement(ww,{type:"button",disabled:0===l.length},t.createElement("span",{style:{color:0===l.length?"inherit":p.palette.primary.main,fontWeight:700}},0===l.length?"-":l.length),"件を操作",t.createElement(U,{name:"arrow_down",size:"sm-md",color:"currentColor"})),width:200,onOpenChange:v},k(n))),r.length>0&&t.createElement(Gl,null,t.createElement(Fl,{open:y,trigger:t.createElement(fs,{type:"button",color:"basicLight",size:"small",icon:t.createElement(U,{name:"more_vert",color:"currentColor"}),disabled:l.length>0}),width:200,onOpenChange:x},k(r,!0))));else{const{dropdownActions:e}=Bx(n),{dropdownActions:i}=Bx(r),o=()=>{const r=[];return n.forEach(((n,i)=>{var o;const a=null!==(o=n.displayIn)&&void 0!==o?o:"toolbar";if("toolbar"===a)r.push(I(n,i,!0));else if("dropdown"===a){r.some((e=>t.isValidElement(e)&&"checked-dropdown"===e.key))||r.push(t.createElement(Gl,{key:"checked-dropdown"},t.createElement(Fl,{open:b,trigger:t.createElement(fs,{type:"button",color:"basicLight",size:"small",icon:t.createElement(U,{name:"more_vert",color:"currentColor"}),disabled:0===l.length}),width:200,onOpenChange:v},e.map(((e,n)=>"singleButton"===e.type?t.createElement(ki,{key:`checked-single-${e.label||n}`,prepend:C(e.icon,e.dynamicIconColor),disabled:_x(e,l),onClick:()=>{e.onClick(l),v(!1)}},e.label):"groupButton"===e.type?e.items.map(((e,r)=>t.createElement(ki,{key:Gx(e,"checked-group",n,r),prepend:C(e.icon,e.dynamicIconColor),disabled:_x(e,l),onClick:()=>{e.onClick(l),v(!1)}},e.label))):"separator"===e.type?t.createElement(Xl,{key:`checked-separator-sep-${n}`}):"heading"===e.type?t.createElement(jl,{key:`checked-heading-${e.label||`heading${n}`}`},e.label):t.createElement(Xl,{key:`checked-divider-div-${n}`}))))))}})),r},a=()=>{const e=[];return r.forEach(((n,r)=>{var o;const a=null!==(o=n.displayIn)&&void 0!==o?o:"toolbar";if("toolbar"===a)e.push(I(n,r,!0));else if("dropdown"===a){e.some((e=>t.isValidElement(e)&&"unchecked-dropdown"===e.key))||e.push(t.createElement(Gl,{key:"unchecked-dropdown"},t.createElement(Fl,{open:y,trigger:t.createElement(fs,{type:"button",color:"basicLight",size:"small",icon:t.createElement(U,{name:"more_vert",color:"currentColor"}),disabled:l.length>0}),width:200,onOpenChange:x},i.map(((e,n)=>"singleButton"===e.type?t.createElement(ki,{key:`unchecked-single-${e.label||n}`,prepend:C(e.icon,e.dynamicIconColor),disabled:_x(e,l,!0),onClick:()=>{e.onClick(l),x(!1)}},e.label):"groupButton"===e.type?e.items.map(((e,r)=>t.createElement(ki,{key:Gx(e,"unchecked-group",n,r),prepend:C(e.icon,e.dynamicIconColor),disabled:_x(e,l,!0),onClick:()=>{e.onClick(l),x(!1)}},e.label))):"separator"===e.type?t.createElement(Xl,{key:`unchecked-separator-sep-${n}`}):"heading"===e.type?t.createElement(jl,{key:`unchecked-heading-${e.label||`heading${n}`}`},e.label):t.createElement(Xl,{key:`unchecked-divider-div-${n}`}))))))}})),e};A=t.createElement(xw,null,o(),n.length>0&&r.length>0&&t.createElement(yw,null),a())}}var M;return t.createElement(Jx,{isSmallLayout:i},t.createElement(fw,null,t.createElement(hh,{checked:m||h,indeterminate:h,disabled:0===a.length,onChange:E}),!i&&t.createElement(bw,null,t.createElement("span",{style:{color:p.palette.primary.main,fontWeight:700}},0===l.length?"-":l.length),"件を"),A),t.createElement(Kx,null,w&&t.createElement(Ew,null),t.createElement(Mw,null),t.createElement(Gl,null,t.createElement(Fl,{open:g,width:316,trigger:t.createElement(fs,{type:"button",color:"basicLight",size:"small",icon:t.createElement(U,{name:"setting",color:"currentColor"})}),onOpenChange:f},o.some((e=>e.sortable))&&t.createElement(Cw,{onClose:()=>f(!1)}),t.createElement(Iw,null),t.createElement(Aw,null)))))},$w=({bordered:e,currentPage:n,pageSize:a,pageSizeOptions:l,totalCount:s,columns:d,onPageChange:u,onPageSizeChange:p,onColumnsChange:m,onCheckedRowsChange:h,children:g,tableActions:f,customTableActionArea:b})=>{const[v,y]=r(!1),[x,w]=r([]),[E,C]=r([]),[I,k]=r([]),[A,M]=r(0),D=i(null),$=c(((e,t)=>{const n=[...I];n[e]=t,k(n)}),[I,k]);o((()=>{if(!D.current)return;const e=()=>{var e;D.current&&y((null===(e=D.current)||void 0===e?void 0:e.clientWidth)<640)},t=new ResizeObserver(e);return e(),t.observe(D.current),()=>{t.disconnect()}}),[]);const O=c((e=>{C(e),null==h||h(e)}),[C,h]),N=i(n);return o((()=>{N.current!==n&&O([]),N.current=n}),[n,O]),o((()=>{if(0===E.length)return;const e=E.filter((e=>x.includes(e)));e.length!==E.length&&O(e)}),[x,E,O]),t.createElement(Wx,{ref:D,bordered:e},t.createElement(zx.Provider,{value:{isSmallLayout:v,rowIds:x,hasRowControls:!!f,checkedRows:E,totalCount:s,currentPage:n,pageSize:a,pageSizeOptions:l,columns:d,columnWidths:I,rowSpacing:A,setRowIds:w,setCheckedRows:O,setCurrentPage:u,setPageSize:p,setColumns:m,setColumnWidth:$,setRowSpacing:M}},t.createElement(Dw,{tableActions:f,customTableActionArea:b}),t.createElement(Xx,null,t.createElement("table",null,g))))},Ow=({children:e})=>{const{hasRowControls:n,columns:r}=s(zx),i=d((()=>h.toArray(e).map(((e,t)=>{const n=r[t];return{id:n.id,index:t,order:n.order,visible:n.visible,child:e}})).filter((e=>void 0!==e.id))),[e,r]),o=d((()=>i.sort(((e,t)=>e.order-t.order)).filter((e=>e.visible))),[i]);return t.createElement(t.Fragment,null,t.createElement("colgroup",null,n&&t.createElement("col",{style:{width:34}}),o.map((({id:e,child:n})=>g(n)?t.createElement("col",{key:e,style:{width:n.props.width}}):null))),t.createElement(tw,null,t.createElement("tr",null,n&&t.createElement("th",{"aria-label":"empty cell"}),o.map((({id:e,index:n,child:r})=>t.createElement(Zx.Provider,{key:e,value:{index:n}},r))))))},Nw=({className:e,isResizable:n,width:a,minWidth:l=32,maxWidth:d=1/0,children:u,onWidthChange:p})=>{const{isSmallLayout:m,setColumnWidth:h}=s(zx),g=s(Zx),[f,b]=r(!1),v=i(null),y=i(null),x=i(0),w=i(0),E=c((e=>{b(!0),y.current&&null===v.current&&(v.current=e.pointerId,w.current=a||y.current.clientWidth,x.current=e.clientX)}),[a]),C=c((e=>{if(!p)return;if(v.current!==e.pointerId)return;e.cancelable&&e.preventDefault();const t=e.clientX-x.current,n=((e,t,n)=>Math.min(Math.max(e,t),n))(w.current+t,l,d);p(n),h(g.index,n)}),[p,l,d,h,g.index]),I=c((()=>{b(!1),v.current=null}),[]);return o((()=>{if(f)return document.addEventListener("pointermove",C),document.addEventListener("pointerup",I),()=>{document.removeEventListener("pointermove",C),document.removeEventListener("pointerup",I)}}),[f,C,I]),t.createElement(nw,{ref:y,className:e,"data-dragging":f,style:{minWidth:isFinite(l)&&l<=d?l:void 0,maxWidth:isFinite(d)&&l<=d?d:void 0}},t.createElement(rw,{isSmallLayout:m},u,n&&t.createElement(iw,{type:"button","aria-label":"resize the column",onPointerDown:E}),f&&A(t.createElement(ow,{"data-min":a&&l>=a,"data-max":a&&d<=a}),document.body)))},Sw=({showSortButton:e,sortButtonDirection:n,onSortChange:r,children:i})=>{const o=d((()=>"asc"===n?"desc":"desc"!==n?"asc":void 0),[n]),a=c((()=>{null==r||r(o)}),[r,o]);return t.createElement(aw,null,i,e&&t.createElement(lw,{type:"button","aria-label":"sort the column","data-sort-direction":n,onClick:a},t.createElement("svg",{width:"18",height:"18",viewBox:"0 0 18 18"},t.createElement("path",{d:"M8.17 3.25a1 1 0 0 1 1.3-.33c.15.08.27.19.36.33l2.13 3.2c.1.15.16.33.17.51 0 .18-.03.36-.12.52s-.21.29-.37.39a1 1 0 0 1-.51.14H6.87a1 1 0 0 1-.83-1.56z"}),t.createElement("path",{d:"M9.83 14.75a1 1 0 0 1-1.3.33.95.95 0 0 1-.36-.33l-2.13-3.2c-.1-.15-.16-.33-.17-.51 0-.18.03-.36.12-.52s.21-.29.37-.39a1 1 0 0 1 .51-.14h4.26a1 1 0 0 1 .83 1.56z"}))))},Lw=({children:e})=>{const{rowIds:n,setRowIds:r}=s(zx);return o((()=>{const t=[];h.forEach(e,(e=>{g(e)&&"string"==typeof e.props.id&&t.push(e.props.id)})),t.length===n.length&&t.every((e=>n.includes(e)))||r(t)}),[e,n,r]),t.createElement("tbody",null,e)},Hw=({id:e,children:n})=>{const{isSmallLayout:r,columns:i,hasRowControls:o,checkedRows:a,setCheckedRows:l,rowSpacing:u}=s(zx),p=d((()=>a.includes(e)),[e,a]),m=c((()=>{const t=a.includes(e)?a.filter((t=>t!==e)):[...a,e];l(t)}),[e,a,l]),g=d((()=>h.toArray(n).map(((e,t)=>{const n=i[t];return{id:n.id,index:t,order:n.order,visible:n.visible,child:e}})).filter((e=>void 0!==e.id))),[n,i]),f=d((()=>g.sort(((e,t)=>e.order-t.order)).filter((e=>e.visible))),[g]);return t.createElement(sw,{"data-highlighted":p,"data-spacing":u,isSmallLayout:r},o&&t.createElement(cw,null,t.createElement(dw,null,t.createElement(hh,{checked:p,onChange:m}),t.createElement("input",{type:"checkbox","aria-label":"この行を選択"}))),f.map((({child:e})=>e)))},Vw=({loading:e,children:n})=>t.createElement("td",null,t.createElement(uw,null,t.createElement(mw,null,n),e&&t.createElement(pw,null,t.createElement(us,{width:"20px"})))),Rw=({prepend:e,children:n,onClick:r})=>{const{isSmallLayout:i}=s(zx);return i?t.createElement(ki,{prepend:e,onClick:r},n):t.createElement(ew,{type:"button",onClick:r},e,n)},Tw=({label:e,value:n,children:i,onChange:a})=>{const[l,s]=r(n),[c,d]=r(!1),u=()=>{d(!1),a(l)};return o((()=>{s(n)}),[n]),t.createElement(hw,null,i,t.createElement(gw,null,t.createElement(Gl,null,t.createElement(Fl,{width:252,trigger:t.createElement(fs,{type:"button",color:"primaryPale",size:"small",inline:!0,icon:t.createElement(U,{name:"pencil",color:"currentColor"})}),open:c,onOpenChange:d},t.createElement(jl,null,e),t.createElement(Hl,{value:l,onChange:e=>s(e.target.value),onEnter:u}),t.createElement(Xl,null),t.createElement(Jl,null,t.createElement(fs,{type:"button",color:"clear",size:"small",onClick:()=>{d(!1),s(n)}},"キャンセル"),t.createElement(fs,{type:"button",color:"primary",size:"small",onClick:u},"適用"))))))},zw=({label:e,value:n,options:i,children:o,onChange:a})=>{const[l,s]=r(!1);return t.createElement(hw,null,o,t.createElement(gw,null,t.createElement(Gl,null,t.createElement(Fl,{width:252,trigger:t.createElement(fs,{type:"button",color:"primaryPale",size:"small",inline:!0,icon:t.createElement(U,{name:"pencil",color:"currentColor"})}),open:l,onOpenChange:s},t.createElement(jl,null,e),i.map((e=>t.createElement(Oi,{key:e,closeOnChange:!0,checked:n===e,onChange:()=>a(e)},e)))))))},Zw=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|YYYY|YY?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,Bw=/\d\d/,_w=/-?\d\d?/,Pw=/\d*[^-_:/,()\s\d]+/;let Fw={},Gw=function(e){return(e=+e)+(e>68?1900:2e3)};const jw=function(e){return function(t){this[e]=+t}},Ww=[/[+-]\d\d:?(\d\d)?|Z/,function(e){(this.zone||(this.zone={})).offset=function(e){if(!e)return 0;if("Z"===e)return 0;const t=e.match(/([+-]|\d\d)/g),n=60*t[1]+(+t[2]||0);return 0===n?0:"+"===t[0]?-n:n}(e)}],Yw=e=>{const t=Fw[e];return t&&(t.indexOf?t:t.s.concat(t.f))},Xw=(e,t)=>{let n;const{meridiem:r}=Fw;if(r){for(let i=1;i<=24;i+=1)if(e.indexOf(r(i,0,t))>-1){n=i>12;break}}else n=e===(t?"pm":"PM");return n},Jw={A:[Pw,function(e){this.afternoon=Xw(e,!1)}],a:[Pw,function(e){this.afternoon=Xw(e,!0)}],S:[/\d/,function(e){this.milliseconds=100*+e}],SS:[Bw,function(e){this.milliseconds=10*+e}],SSS:[/\d{3}/,function(e){this.milliseconds=+e}],s:[_w,jw("seconds")],ss:[_w,jw("seconds")],m:[_w,jw("minutes")],mm:[_w,jw("minutes")],H:[_w,jw("hours")],h:[_w,jw("hours")],HH:[_w,jw("hours")],hh:[_w,jw("hours")],D:[_w,jw("day")],DD:[Bw,jw("day")],Do:[Pw,function(e){const{ordinal:t}=Fw;if([this.day]=e.match(/\d+/),t)for(let n=1;n<=31;n+=1)t(n).replace(/\[|\]/g,"")===e&&(this.day=n)}],M:[_w,jw("month")],MM:[Bw,jw("month")],MMM:[Pw,function(e){const t=Yw("months"),n=(Yw("monthsShort")||t.map((e=>e.slice(0,3)))).indexOf(e)+1;if(n<1)throw new Error;this.month=n%12||n}],MMMM:[Pw,function(e){const t=Yw("months").indexOf(e)+1;if(t<1)throw new Error;this.month=t%12||t}],Y:[/[+-]?\d+/,jw("year")],YY:[Bw,function(e){this.year=Gw(e)}],YYYY:[/\d{4}/,jw("year")],Z:Ww,ZZ:Ww};const Uw=(e,t,n)=>{try{if(["x","X"].indexOf(t)>-1)return new Date(("X"===t?1e3:1)*e);const r=function(e){const t=e.match(Zw),{length:n}=t;for(let e=0;e<n;e+=1){const n=t[e],r=Jw[n],i=r&&r[0],o=r&&r[1];t[e]=o?{regex:i,parser:o}:n.replace(/^\[|\]$/g,"")}return function(e){const r={};for(let i=0,o=0;i<n;i+=1){const n=t[i];if("string"==typeof n)o+=n.length;else{const{regex:t,parser:i}=n,a=e.slice(o),l=t.exec(a)[0];i.call(r,l),e=e.replace(l,"")}}return function(e){const{afternoon:t}=e;if(void 0!==t){const{hours:n}=e;t?n<12&&(e.hours+=12):12===n&&(e.hours=0),delete e.afternoon}}(r),r}}(t),{year:i,month:o,day:a,hours:l,minutes:s,seconds:c,milliseconds:d,zone:u}=r(e),p=new Date,m=i||p.getFullYear(),h=o-1,g=l||0,f=s||0,b=c||0,v=d||0;return u?new Date(Date.UTC(m,h,a,g,f,b,v+60*u.offset*1e3)):n?new Date(Date.UTC(m,h,a,g,f,b,v)):new Date(m,h,a,g,f,b,v)}catch(e){return new Date("")}};var Qw=(e,t,n)=>{n.p.customParseFormat=!0,e&&e.parseTwoDigitYear&&({parseTwoDigitYear:Gw}=e);const r=t.prototype,i=r.parse;r.parse=function(e){const{date:t,utc:r,args:o}=e;this.$u=r;const a=o[1];if("string"==typeof a){const e=!0===o[2],i=!0===o[3],l=e||i;let s=o[2];i&&([,,s]=o),Fw=this.$locale(),!e&&s&&(Fw=n.Ls[s]),this.$d=Uw(t,a,r),this.init(),s&&!0!==s&&(this.$L=this.locale(s).$L),l&&t!=this.format(a)&&(this.$d=new Date("")),Fw={}}else if(a instanceof Array){const e=a.length;for(let t=1;t<=e;t+=1){o[1]=a[t-1];const r=n.apply(this,o);if(r.isValid()){this.$d=r.$d,this.$L=r.$L,this.init();break}t===e&&(this.$d=new Date(""))}}else i.call(this,e)}};const qw=({date:e,format:t="YYYY-MM-DD",onDateChange:n})=>{ql.extend(Qw);const a=i(null),[l,s]=r(null==e?void 0:e.format(t)),[d,u]=r(hm(l)),[p,m]=r({start:0,end:d.length-1,current:0}),[h,g]=r(0),f=c((()=>{setTimeout((()=>{var e,t,n;if(0===d.length)return;const r=null!==(t=null===(e=a.current)||void 0===e?void 0:e.selectionStart)&&void 0!==t?t:0,i=d[d.length-1].end+1,o=r>=i?i:r,l=d.findIndex((e=>o>=e.start&&o<=e.end+1));-1!==l&&(m((e=>d[l].editable?e.current===l?e:Object.assign(Object.assign({},e),{current:l}):Object.assign(Object.assign({},e),{current:l+1}))),null===(n=a.current)||void 0===n||n.setSelectionRange(d[l].start,d[l].end+1))}))}),[d]),b=c((()=>{}),[]),v=c((()=>{m((e=>Object.assign(Object.assign({},e),{current:0}))),g(0)}),[]),y=c((e=>{if(0===d.length)return;const r=pm(e.code),i=r?mm(e.code):null;if(!um.includes(e.key)&&!r)return;if(e.key===sm.ArrowLeft||e.key===sm.ArrowRight){e.preventDefault();const t=e=>{const t=p.current;if(e===sm.ArrowLeft){for(let e=t-1;e>=0;e--)if(d[e].editable)return e-t}else if(e===sm.ArrowRight)for(let e=t+1;e<d.length;e++)if(d[e].editable)return e-t;return 0},n=e.key;m((e=>Object.assign(Object.assign({},e),{current:e.current+t(n)})))}if(e.key===sm.ArrowUp||e.key===sm.ArrowDown){e.preventDefault();const r=e.key===sm.ArrowUp?1:-1,i=Number(d[p.current].value)+r,o=String(i).padStart(d[p.current].value.length,"0"),a=[...d];a[p.current].value=o,u(a);const l=gm(a),c=ql(l,t);s(c.format(t)),c.isValid()&&n&&n(c)}const o=r?i:e.key;if((dm.includes(e.key)||r)&&o){e.preventDefault(),0===h&&(d[p.current].value="".padStart(d[p.current].value.length,"0"));const r=`${d[p.current].value.slice(1)}${o}`,i=[...d];i[p.current].value=r,u(i),g(h+1);const a=((e,t,n)=>{if(4===e)return"year";if(2===e){const e=(t.match(/[YMD]+/g)||[]).map(((e,t)=>({token:e,length:e.length,index:t}))),r=e[n];if(r){if(r.token.includes("Y"))return"year";if(r.token.includes("M"))return"month";if(r.token.includes("D"))return"day"}}return"unknown"})(d[p.current].value.length,t,p.current),l=((e,t,n,r)=>{if(0===t){const t=parseInt(e);return"month"===n?t>=2:"day"===n&&t>=4}return t+1===r})(o,h,a,d[p.current].value.length);if(l){g(0);for(let e=p.current+1;e<d.length;e++)if(d[e].editable){m((t=>Object.assign(Object.assign({},t),{current:e})));break}const e=gm(d),r=ql(e,t);s(r.format(t)),n&&n(r)}else{const e=gm(d);if(!ql(e,t,!0).isValid())return void s(e);const r=ql(e,t);s(r.format(t)),n&&n(r)}}}),[d,t,n,p]),x=c((()=>{f()}),[f]),w=c((e=>{e.preventDefault();const r=e.clipboardData.getData("text").trim(),i=/[Hh]|mm|ss/.test(t),o=[];o.push(t),o.push("YYYY年M月D日","YYYY年MM月DD日"),i&&o.push("YYYY年M月D日 HH:mm","YYYY年MM月DD日 HH:mm","YYYY年M月D日 HH:mm:ss","YYYY年MM月DD日 HH:mm:ss"),o.push("YYYY-MM-DD","YYYY-M-DD","YYYY-MM-D","YYYY-M-D"),i&&o.push("YYYY-MM-DD HH:mm","YYYY-M-DD HH:mm","YYYY-MM-D HH:mm","YYYY-M-D HH:mm","YYYY-MM-DD HH:mm:ss","YYYY-M-DD HH:mm:ss","YYYY-MM-D HH:mm:ss","YYYY-M-D HH:mm:ss"),o.push("YYYY/MM/DD","YYYY/M/DD","YYYY/MM/D","YYYY/M/D"),i&&o.push("YYYY/MM/DD HH:mm","YYYY/M/DD HH:mm","YYYY/MM/D HH:mm","YYYY/M/D HH:mm","YYYY/MM/DD HH:mm:ss","YYYY/M/DD HH:mm:ss","YYYY/MM/D HH:mm:ss","YYYY/M/D HH:mm:ss");const a=r.match(/(\d{4})[-/年](\d{1,2})[-/月](\d{1,2})/);if(a){const e=parseInt(a[1],10),t=parseInt(a[2],10),n=parseInt(a[3],10);if(!(e>=1900&&e<=2100&&t>=1&&t<=12&&n>=1&&n<=31))return;if(n>ql(`${e}-${t}-01`).daysInMonth())return}let l=null;const s=ql(r);if(s.isValid())l=s;else for(const e of o){const t=ql(r,e,!0);if(t.isValid()){l=t;break}}if(!l||!l.isValid())return;const c=l.year(),d=l.month()+1,u=l.date();if(c>=1900&&c<=2100&&d>=1&&d<=12&&u>=1&&u<=31){if(i){const e=r.match(/(\d{1,2}):(\d{1,2})(?::(\d{1,2}))?/);if(e){const t=parseInt(e[1],10),n=parseInt(e[2],10),r=e[3]?parseInt(e[3],10):0;if(!(!isNaN(t)&&!isNaN(n)&&!isNaN(r)&&t>=0&&t<=23&&n>=0&&n<=59&&r>=0&&r<=59))return}}n&&n(l)}}),[t,n]);return o((()=>{var e;if(0===d.length)return;const t=d[p.current];t&&(null===(e=a.current)||void 0===e||e.setSelectionRange(t.start,t.end+1))}),[p,d]),o((()=>{s(null==e?void 0:e.format(t)),u(hm(null==e?void 0:e.format(t)))}),[e,t]),{ref:a,value:l,onFocus:b,onBlur:v,onKeyDown:y,onMouseDown:x,onPaste:w}},Kw=n((function(e,n){var{error:r=!1,errorText:i,format:o="YYYY-MM-DD",disabled:a=!1,size:l="medium",variant:s="light",width:c,append:u,onAppendClick:p}=e,m=$(e,["error","errorText","format","disabled","size","variant","width","append","onAppendClick"]);const h=qw(Object.assign({format:o},m)),{ref:g}=h,f=$(h,["ref"]),b=Td(n,g),v=d((()=>9*Mu(o)*(parseInt(Iu[l].fontSize)/13)+"px"),[o,l]),y=null!=c?c:v;return t.createElement(t.Fragment,null,t.createElement(Vu,Object.assign({ref:b,readOnly:!0,error:r||!!i,disabled:a,size:l,variant:s,width:y,append:u,onAppendClick:p},f)),i&&t.createElement(is,{pt:1},t.createElement(cu,null,i)))}));var eE=u(Kw);const tE=y.div`
2497
2497
  display: flex;
2498
2498
  align-items: center;
2499
2499
  width: fit-content;