250 lines
88 KiB
JavaScript
250 lines
88 KiB
JavaScript
!function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=19)}([function(e,t){e.exports=window.React},function(e,t){e.exports=window.wp.element},function(e,t){e.exports=window.wp.i18n},function(e,t){e.exports=window.wp.components},function(e,t){e.exports=window.wc.wcSettings},,function(e,t){function n(){return e.exports=n=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},e.exports.__esModule=!0,e.exports.default=e.exports,n.apply(this,arguments)}e.exports=n,e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t){e.exports=window.ReactDOM},function(e,t){e.exports=window.wp.url},,function(e,t,n){"use strict";e.exports=function e(t,n){if(t===n)return!0;if(t&&n&&"object"==typeof t&&"object"==typeof n){if(t.constructor!==n.constructor)return!1;var r,o,a;if(Array.isArray(t)){if((r=t.length)!=n.length)return!1;for(o=r;0!=o--;)if(!e(t[o],n[o]))return!1;return!0}if(t instanceof Map&&n instanceof Map){if(t.size!==n.size)return!1;for(o of t.entries())if(!n.has(o[0]))return!1;for(o of t.entries())if(!e(o[1],n.get(o[0])))return!1;return!0}if(t instanceof Set&&n instanceof Set){if(t.size!==n.size)return!1;for(o of t.entries())if(!n.has(o[0]))return!1;return!0}if(ArrayBuffer.isView(t)&&ArrayBuffer.isView(n)){if((r=t.length)!=n.length)return!1;for(o=r;0!=o--;)if(t[o]!==n[o])return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if((r=(a=Object.keys(t)).length)!==Object.keys(n).length)return!1;for(o=r;0!=o--;)if(!Object.prototype.hasOwnProperty.call(n,a[o]))return!1;for(o=r;0!=o--;){var i=a[o];if(!e(t[i],n[i]))return!1}return!0}return t!=t&&n!=n}},function(e,t){e.exports=window.wp.primitives},,function(e,t,n){"use strict";var r=n(17),o={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},a={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},i={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},c={};function l(e){return r.isMemo(e)?i:c[e.$$typeof]||o}c[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},c[r.Memo]=i;var s=Object.defineProperty,u=Object.getOwnPropertyNames,d=Object.getOwnPropertySymbols,p=Object.getOwnPropertyDescriptor,f=Object.getPrototypeOf,b=Object.prototype;e.exports=function e(t,n,r){if("string"!=typeof n){if(b){var o=f(n);o&&o!==b&&e(t,o,r)}var i=u(n);d&&(i=i.concat(d(n)));for(var c=l(t),g=l(n),h=0;h<i.length;++h){var m=i[h];if(!(a[m]||r&&r[m]||g&&g[m]||c&&c[m])){var v=p(n,m);try{s(t,m,v)}catch(e){}}}}return t}},function(e,t){e.exports=window.wp.apiFetch},function(e,t){e.exports=window.wp.data},,function(e,t,n){"use strict";e.exports=n(18)},function(e,t,n){"use strict";var r="function"==typeof Symbol&&Symbol.for,o=r?Symbol.for("react.element"):60103,a=r?Symbol.for("react.portal"):60106,i=r?Symbol.for("react.fragment"):60107,c=r?Symbol.for("react.strict_mode"):60108,l=r?Symbol.for("react.profiler"):60114,s=r?Symbol.for("react.provider"):60109,u=r?Symbol.for("react.context"):60110,d=r?Symbol.for("react.async_mode"):60111,p=r?Symbol.for("react.concurrent_mode"):60111,f=r?Symbol.for("react.forward_ref"):60112,b=r?Symbol.for("react.suspense"):60113,g=r?Symbol.for("react.suspense_list"):60120,h=r?Symbol.for("react.memo"):60115,m=r?Symbol.for("react.lazy"):60116,v=r?Symbol.for("react.block"):60121,y=r?Symbol.for("react.fundamental"):60117,O=r?Symbol.for("react.responder"):60118,w=r?Symbol.for("react.scope"):60119;function x(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case o:switch(e=e.type){case d:case p:case i:case l:case c:case b:return e;default:switch(e=e&&e.$$typeof){case u:case f:case m:case h:case s:return e;default:return t}}case a:return t}}}function j(e){return x(e)===p}t.AsyncMode=d,t.ConcurrentMode=p,t.ContextConsumer=u,t.ContextProvider=s,t.Element=o,t.ForwardRef=f,t.Fragment=i,t.Lazy=m,t.Memo=h,t.Portal=a,t.Profiler=l,t.StrictMode=c,t.Suspense=b,t.isAsyncMode=function(e){return j(e)||x(e)===d},t.isConcurrentMode=j,t.isContextConsumer=function(e){return x(e)===u},t.isContextProvider=function(e){return x(e)===s},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===o},t.isForwardRef=function(e){return x(e)===f},t.isFragment=function(e){return x(e)===i},t.isLazy=function(e){return x(e)===m},t.isMemo=function(e){return x(e)===h},t.isPortal=function(e){return x(e)===a},t.isProfiler=function(e){return x(e)===l},t.isStrictMode=function(e){return x(e)===c},t.isSuspense=function(e){return x(e)===b},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===i||e===p||e===l||e===c||e===b||e===g||"object"==typeof e&&null!==e&&(e.$$typeof===m||e.$$typeof===h||e.$$typeof===s||e.$$typeof===u||e.$$typeof===f||e.$$typeof===y||e.$$typeof===O||e.$$typeof===w||e.$$typeof===v)},t.typeOf=x},function(e,t,n){"use strict";n.r(t);var r=n(1),o=n(6),a=n.n(o),i=n(0),c=n.n(i),l=function(e){var t=Object.create(null);return function(n){return void 0===t[n]&&(t[n]=e(n)),t[n]}},s=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,u=l((function(e){return s.test(e)||111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&e.charCodeAt(2)<91}));function d(){return(d=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var p=function(){function e(e){var t=this;this._insertTag=function(e){var n;n=0===t.tags.length?t.insertionPoint?t.insertionPoint.nextSibling:t.prepend?t.container.firstChild:t.before:t.tags[t.tags.length-1].nextSibling,t.container.insertBefore(e,n),t.tags.push(e)},this.isSpeedy=void 0===e.speedy||e.speedy,this.tags=[],this.ctr=0,this.nonce=e.nonce,this.key=e.key,this.container=e.container,this.prepend=e.prepend,this.insertionPoint=e.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(e){e.forEach(this._insertTag)},t.insert=function(e){this.ctr%(this.isSpeedy?65e3:1)==0&&this._insertTag(function(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),void 0!==e.nonce&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}(this));var t=this.tags[this.tags.length-1];if(this.isSpeedy){var n=function(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}(t);try{n.insertRule(e,n.cssRules.length)}catch(e){}}else t.appendChild(document.createTextNode(e));this.ctr++},t.flush=function(){this.tags.forEach((function(e){return e.parentNode&&e.parentNode.removeChild(e)})),this.tags=[],this.ctr=0},e}(),f="-ms-",b="-moz-",g="-webkit-",h="comm",m="rule",v="decl",y="@keyframes",O=Math.abs,w=String.fromCharCode,x=Object.assign;function j(e){return e.trim()}function k(e,t,n){return e.replace(t,n)}function E(e,t){return e.indexOf(t)}function C(e,t){return 0|e.charCodeAt(t)}function S(e,t,n){return e.slice(t,n)}function _(e){return e.length}function R(e){return e.length}function D(e,t){return t.push(e),e}var M=1,A=1,T=0,P=0,I=0,N="";function L(e,t,n,r,o,a,i){return{value:e,root:t,parent:n,type:r,props:o,children:a,line:M,column:A,length:i,return:""}}function $(e,t){return x(L("",null,null,"",null,null,0),e,{length:-e.length},t)}function z(){return I=P>0?C(N,--P):0,A--,10===I&&(A=1,M--),I}function F(){return I=P<T?C(N,P++):0,A++,10===I&&(A=1,M++),I}function B(){return C(N,P)}function U(){return P}function V(e,t){return S(N,e,t)}function q(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function G(e){return M=A=1,T=_(N=e),P=0,[]}function H(e){return N="",e}function W(e){return j(V(P-1,function e(t){for(;F();)switch(I){case t:return P;case 34:case 39:34!==t&&39!==t&&e(I);break;case 40:41===t&&e(t);break;case 92:F()}return P}(91===e?e+2:40===e?e+1:e)))}function X(e){for(;(I=B())&&I<33;)F();return q(e)>2||q(I)>3?"":" "}function Y(e,t){for(;--t&&F()&&!(I<48||I>102||I>57&&I<65||I>70&&I<97););return V(e,U()+(t<6&&32==B()&&32==F()))}function K(e,t){for(;F()&&e+I!==57&&(e+I!==84||47!==B()););return"/*"+V(t,P-1)+"*"+w(47===e?e:F())}function J(e){for(;!q(B());)F();return V(e,P)}function Z(e,t,n,r,o,a,i,c,l,s,u){for(var d=o-1,p=0===o?a:[""],f=R(p),b=0,g=0,h=0;b<r;++b)for(var v=0,y=S(e,d+1,d=O(g=i[b])),w=e;v<f;++v)(w=j(g>0?p[v]+" "+y:k(y,/&\f/g,p[v])))&&(l[h++]=w);return L(e,t,n,0===o?m:c,l,s,u)}function Q(e,t,n){return L(e,t,n,h,w(I),S(e,2,-2),0)}function ee(e,t,n,r){return L(e,t,n,v,S(e,0,r),S(e,r+1,-1),r)}function te(e,t){for(var n="",r=R(e),o=0;o<r;o++)n+=t(e[o],o,e,t)||"";return n}function ne(e,t,n,r){switch(e.type){case"@import":case v:return e.return=e.return||e.value;case h:return"";case y:return e.return=e.value+"{"+te(e.children,r)+"}";case m:e.value=e.props.join(",")}return _(n=te(e.children,r))?e.return=e.value+"{"+n+"}":""}function re(e){return function(t){t.root||(t=t.return)&&e(t)}}var oe=function(e,t,n){for(var r=0,o=0;r=o,o=B(),38===r&&12===o&&(t[n]=1),!q(o);)F();return V(e,P)},ae=new WeakMap,ie=function(e){if("rule"===e.type&&e.parent&&!(e.length<1)){for(var t=e.value,n=e.parent,r=e.column===n.column&&e.line===n.line;"rule"!==n.type;)if(!(n=n.parent))return;if((1!==e.props.length||58===t.charCodeAt(0)||ae.get(n))&&!r){ae.set(e,!0);for(var o=[],a=function(e,t){return H(function(e,t){var n=-1,r=44;do{switch(q(r)){case 0:38===r&&12===B()&&(t[n]=1),e[n]+=oe(P-1,t,n);break;case 2:e[n]+=W(r);break;case 4:if(44===r){e[++n]=58===B()?"&\f":"",t[n]=e[n].length;break}default:e[n]+=w(r)}}while(r=F());return e}(G(e),t))}(t,o),i=n.props,c=0,l=0;c<a.length;c++)for(var s=0;s<i.length;s++,l++)e.props[l]=o[c]?a[c].replace(/&\f/g,i[s]):i[s]+" "+a[c]}}},ce=function(e){if("decl"===e.type){var t=e.value;108===t.charCodeAt(0)&&98===t.charCodeAt(2)&&(e.return="",e.value="")}},le=[function(e,t,n,r){if(e.length>-1&&!e.return)switch(e.type){case v:e.return=function e(t,n){switch(function(e,t){return(((t<<2^C(e,0))<<2^C(e,1))<<2^C(e,2))<<2^C(e,3)}(t,n)){case 5103:return g+"print-"+t+t;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return g+t+t;case 5349:case 4246:case 4810:case 6968:case 2756:return g+t+b+t+f+t+t;case 6828:case 4268:return g+t+f+t+t;case 6165:return g+t+f+"flex-"+t+t;case 5187:return g+t+k(t,/(\w+).+(:[^]+)/,g+"box-$1$2"+f+"flex-$1$2")+t;case 5443:return g+t+f+"flex-item-"+k(t,/flex-|-self/,"")+t;case 4675:return g+t+f+"flex-line-pack"+k(t,/align-content|flex-|-self/,"")+t;case 5548:return g+t+f+k(t,"shrink","negative")+t;case 5292:return g+t+f+k(t,"basis","preferred-size")+t;case 6060:return g+"box-"+k(t,"-grow","")+g+t+f+k(t,"grow","positive")+t;case 4554:return g+k(t,/([^-])(transform)/g,"$1"+g+"$2")+t;case 6187:return k(k(k(t,/(zoom-|grab)/,g+"$1"),/(image-set)/,g+"$1"),t,"")+t;case 5495:case 3959:return k(t,/(image-set\([^]*)/,g+"$1$`$1");case 4968:return k(k(t,/(.+:)(flex-)?(.*)/,g+"box-pack:$3"+f+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+g+t+t;case 4095:case 3583:case 4068:case 2532:return k(t,/(.+)-inline(.+)/,g+"$1$2")+t;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(_(t)-1-n>6)switch(C(t,n+1)){case 109:if(45!==C(t,n+4))break;case 102:return k(t,/(.+:)(.+)-([^]+)/,"$1"+g+"$2-$3$1"+b+(108==C(t,n+3)?"$3":"$2-$3"))+t;case 115:return~E(t,"stretch")?e(k(t,"stretch","fill-available"),n)+t:t}break;case 4949:if(115!==C(t,n+1))break;case 6444:switch(C(t,_(t)-3-(~E(t,"!important")&&10))){case 107:return k(t,":",":"+g)+t;case 101:return k(t,/(.+:)([^;!]+)(;|!.+)?/,"$1"+g+(45===C(t,14)?"inline-":"")+"box$3$1"+g+"$2$3$1"+f+"$2box$3")+t}break;case 5936:switch(C(t,n+11)){case 114:return g+t+f+k(t,/[svh]\w+-[tblr]{2}/,"tb")+t;case 108:return g+t+f+k(t,/[svh]\w+-[tblr]{2}/,"tb-rl")+t;case 45:return g+t+f+k(t,/[svh]\w+-[tblr]{2}/,"lr")+t}return g+t+f+t+t}return t}(e.value,e.length);break;case y:return te([$(e,{value:k(e.value,"@","@"+g)})],r);case m:if(e.length)return function(e,t){return e.map(t).join("")}(e.props,(function(t){switch(function(e,t){return(e=/(::plac\w+|:read-\w+)/.exec(e))?e[0]:e}(t)){case":read-only":case":read-write":return te([$(e,{props:[k(t,/:(read-\w+)/,":-moz-$1")]})],r);case"::placeholder":return te([$(e,{props:[k(t,/:(plac\w+)/,":"+g+"input-$1")]}),$(e,{props:[k(t,/:(plac\w+)/,":-moz-$1")]}),$(e,{props:[k(t,/:(plac\w+)/,f+"input-$1")]})],r)}return""}))}}],se=function(e){var t=e.key;if("css"===t){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,(function(e){-1!==e.getAttribute("data-emotion").indexOf(" ")&&(document.head.appendChild(e),e.setAttribute("data-s",""))}))}var r,o,a=e.stylisPlugins||le,i={},c=[];r=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+t+' "]'),(function(e){for(var t=e.getAttribute("data-emotion").split(" "),n=1;n<t.length;n++)i[t[n]]=!0;c.push(e)}));var l,s=[ie,ce],u=[ne,re((function(e){l.insert(e)}))],d=function(e){var t=R(e);return function(n,r,o,a){for(var i="",c=0;c<t;c++)i+=e[c](n,r,o,a)||"";return i}}(s.concat(a,u));o=function(e,t,n,r){l=n,te(function(e){return H(function e(t,n,r,o,a,i,c,l,s){for(var u=0,d=0,p=c,f=0,b=0,g=0,h=1,m=1,v=1,y=0,O="",x=a,j=i,C=o,S=O;m;)switch(g=y,y=F()){case 40:if(108!=g&&58==S.charCodeAt(p-1)){-1!=E(S+=k(W(y),"&","&\f"),"&\f")&&(v=-1);break}case 34:case 39:case 91:S+=W(y);break;case 9:case 10:case 13:case 32:S+=X(g);break;case 92:S+=Y(U()-1,7);continue;case 47:switch(B()){case 42:case 47:D(Q(K(F(),U()),n,r),s);break;default:S+="/"}break;case 123*h:l[u++]=_(S)*v;case 125*h:case 59:case 0:switch(y){case 0:case 125:m=0;case 59+d:b>0&&_(S)-p&&D(b>32?ee(S+";",o,r,p-1):ee(k(S," ","")+";",o,r,p-2),s);break;case 59:S+=";";default:if(D(C=Z(S,n,r,u,d,a,l,O,x=[],j=[],p),i),123===y)if(0===d)e(S,n,C,C,x,i,p,l,j);else switch(f){case 100:case 109:case 115:e(t,C,C,o&&D(Z(t,C,C,0,0,a,l,O,a,x=[],p),j),a,j,p,l,o?x:j);break;default:e(S,C,C,C,[""],j,0,l,j)}}u=d=b=0,h=v=1,O=S="",p=c;break;case 58:p=1+_(S),b=g;default:if(h<1)if(123==y)--h;else if(125==y&&0==h++&&125==z())continue;switch(S+=w(y),y*h){case 38:v=d>0?1:(S+="\f",-1);break;case 44:l[u++]=(_(S)-1)*v,v=1;break;case 64:45===B()&&(S+=W(F())),f=B(),d=p=_(O=S+=J(U())),y++;break;case 45:45===g&&2==_(S)&&(h=0)}}return i}("",null,null,null,[""],e=G(e),0,[0],e))}(e?e+"{"+t.styles+"}":t.styles),d),r&&(f.inserted[t.name]=!0)};var f={key:t,sheet:new p({key:t,container:r,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend,insertionPoint:e.insertionPoint}),nonce:e.nonce,inserted:i,registered:{},insert:o};return f.sheet.hydrate(c),f};n(13);var ue=Object(i.createContext)("undefined"!=typeof HTMLElement?se({key:"css"}):null);ue.Provider;var de=function(e){return Object(i.forwardRef)((function(t,n){var r=Object(i.useContext)(ue);return e(t,r,n)}))},pe=Object(i.createContext)({});function fe(e,t,n){var r="";return n.split(" ").forEach((function(n){void 0!==e[n]?t.push(e[n]+";"):r+=n+" "})),r}i.useInsertionEffect&&i.useInsertionEffect;var be=function(e,t,n){var r=e.key+"-"+t.name;!1===n&&void 0===e.registered[r]&&(e.registered[r]=t.styles)},ge=function(e){for(var t,n=0,r=0,o=e.length;o>=4;++r,o-=4)t=1540483477*(65535&(t=255&e.charCodeAt(r)|(255&e.charCodeAt(++r))<<8|(255&e.charCodeAt(++r))<<16|(255&e.charCodeAt(++r))<<24))+(59797*(t>>>16)<<16),n=1540483477*(65535&(t^=t>>>24))+(59797*(t>>>16)<<16)^1540483477*(65535&n)+(59797*(n>>>16)<<16);switch(o){case 3:n^=(255&e.charCodeAt(r+2))<<16;case 2:n^=(255&e.charCodeAt(r+1))<<8;case 1:n=1540483477*(65535&(n^=255&e.charCodeAt(r)))+(59797*(n>>>16)<<16)}return(((n=1540483477*(65535&(n^=n>>>13))+(59797*(n>>>16)<<16))^n>>>15)>>>0).toString(36)},he={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},me=/[A-Z]|^ms/g,ve=/_EMO_([^_]+?)_([^]*?)_EMO_/g,ye=function(e){return 45===e.charCodeAt(1)},Oe=function(e){return null!=e&&"boolean"!=typeof e},we=l((function(e){return ye(e)?e:e.replace(me,"-$&").toLowerCase()})),xe=function(e,t){switch(e){case"animation":case"animationName":if("string"==typeof t)return t.replace(ve,(function(e,t,n){return ke={name:t,styles:n,next:ke},t}))}return 1===he[e]||ye(e)||"number"!=typeof t||0===t?t:t+"px"};function je(e,t,n){if(null==n)return"";if(void 0!==n.__emotion_styles)return n;switch(typeof n){case"boolean":return"";case"object":if(1===n.anim)return ke={name:n.name,styles:n.styles,next:ke},n.name;if(void 0!==n.styles){var r=n.next;if(void 0!==r)for(;void 0!==r;)ke={name:r.name,styles:r.styles,next:ke},r=r.next;return n.styles+";"}return function(e,t,n){var r="";if(Array.isArray(n))for(var o=0;o<n.length;o++)r+=je(e,t,n[o])+";";else for(var a in n){var i=n[a];if("object"!=typeof i)null!=t&&void 0!==t[i]?r+=a+"{"+t[i]+"}":Oe(i)&&(r+=we(a)+":"+xe(a,i)+";");else if(!Array.isArray(i)||"string"!=typeof i[0]||null!=t&&void 0!==t[i[0]]){var c=je(e,t,i);switch(a){case"animation":case"animationName":r+=we(a)+":"+c+";";break;default:r+=a+"{"+c+"}"}}else for(var l=0;l<i.length;l++)Oe(i[l])&&(r+=we(a)+":"+xe(a,i[l])+";")}return r}(e,t,n);case"function":if(void 0!==e){var o=ke,a=n(e);return ke=o,je(e,t,a)}}if(null==t)return n;var i=t[n];return void 0!==i?i:n}var ke,Ee=/label:\s*([^\s;\n{]+)\s*(;|$)/g,Ce=function(e,t,n){if(1===e.length&&"object"==typeof e[0]&&null!==e[0]&&void 0!==e[0].styles)return e[0];var r=!0,o="";ke=void 0;var a=e[0];null==a||void 0===a.raw?(r=!1,o+=je(n,t,a)):o+=a[0];for(var i=1;i<e.length;i++)o+=je(n,t,e[i]),r&&(o+=a[i]);Ee.lastIndex=0;for(var c,l="";null!==(c=Ee.exec(o));)l+="-"+c[1];return{name:ge(o)+l,styles:o,next:ke}},Se=!!i.useInsertionEffect&&i.useInsertionEffect,_e=Se||function(e){return e()},Re=(Se||i.useLayoutEffect,u),De=function(e){return"theme"!==e},Me=function(e){return"string"==typeof e&&e.charCodeAt(0)>96?Re:De},Ae=function(e,t,n){var r;if(t){var o=t.shouldForwardProp;r=e.__emotion_forwardProp&&o?function(t){return e.__emotion_forwardProp(t)&&o(t)}:o}return"function"!=typeof r&&n&&(r=e.__emotion_forwardProp),r},Te=function(e){var t=e.cache,n=e.serialized,r=e.isStringTag;return be(t,n,r),_e((function(){return function(e,t,n){be(e,t,n);var r=e.key+"-"+t.name;if(void 0===e.inserted[t.name]){var o=t;do{e.insert(t===o?"."+r:"",o,e.sheet,!0),o=o.next}while(void 0!==o)}}(t,n,r)})),null},Pe=function e(t,n){var r,o,a=t.__emotion_real===t,c=a&&t.__emotion_base||t;void 0!==n&&(r=n.label,o=n.target);var l=Ae(t,n,a),s=l||Me(c),u=!s("as");return function(){var p=arguments,f=a&&void 0!==t.__emotion_styles?t.__emotion_styles.slice(0):[];if(void 0!==r&&f.push("label:"+r+";"),null==p[0]||void 0===p[0].raw)f.push.apply(f,p);else{f.push(p[0][0]);for(var b=p.length,g=1;g<b;g++)f.push(p[g],p[0][g])}var h=de((function(e,t,n){var r=u&&e.as||c,a="",d=[],p=e;if(null==e.theme){for(var b in p={},e)p[b]=e[b];p.theme=Object(i.useContext)(pe)}"string"==typeof e.className?a=fe(t.registered,d,e.className):null!=e.className&&(a=e.className+" ");var g=Ce(f.concat(d),t.registered,p);a+=t.key+"-"+g.name,void 0!==o&&(a+=" "+o);var h=u&&void 0===l?Me(r):s,m={};for(var v in e)u&&"as"===v||h(v)&&(m[v]=e[v]);return m.className=a,m.ref=n,Object(i.createElement)(i.Fragment,null,Object(i.createElement)(Te,{cache:t,serialized:g,isStringTag:"string"==typeof r}),Object(i.createElement)(r,m))}));return h.displayName=void 0!==r?r:"Styled("+("string"==typeof c?c:c.displayName||c.name||"Component")+")",h.defaultProps=t.defaultProps,h.__emotion_real=h,h.__emotion_base=c,h.__emotion_styles=f,h.__emotion_forwardProp=l,Object.defineProperty(h,"toString",{value:function(){return"."+o}}),h.withComponent=function(t,r){return e(t,d({},n,r,{shouldForwardProp:Ae(h,r,!0)})).apply(void 0,f)},h}}.bind();["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"].forEach((function(e){Pe[e]=Pe(e)}));var Ie,Ne=Pe,Le=n(2),$e=n(4);const ze=Object($e.getSetting)("wcBlocksConfig",{buildPhase:1,pluginUrl:"",productCount:0,defaultAvatar:"",restApiRoutes:{},wordCountType:"words"}),Fe=(ze.pluginUrl,ze.pluginUrl,ze.buildPhase,null===(Ie=$e.STORE_PAGES.shop)||void 0===Ie||Ie.permalink,$e.STORE_PAGES.checkout.id),Be=($e.STORE_PAGES.checkout.permalink,$e.STORE_PAGES.privacy.permalink,$e.STORE_PAGES.privacy.title,$e.STORE_PAGES.terms.permalink,$e.STORE_PAGES.terms.title,$e.STORE_PAGES.cart.id,$e.STORE_PAGES.cart.permalink,$e.STORE_PAGES.myaccount.permalink?$e.STORE_PAGES.myaccount.permalink:Object($e.getSetting)("wpLoginUrl","/wp-login.php"),Object($e.getSetting)("localPickupEnabled",!1),Object($e.getSetting)("countries",{})),Ue=Object($e.getSetting)("countryData",{});Object.fromEntries(Object.keys(Ue).filter(e=>!0===Ue[e].allowBilling).map(e=>[e,Be[e]||""])),Object.fromEntries(Object.keys(Ue).filter(e=>!0===Ue[e].allowBilling).map(e=>[e,Ue[e].states||[]])),Object.fromEntries(Object.keys(Ue).filter(e=>!0===Ue[e].allowShipping).map(e=>[e,Be[e]||""])),Object.fromEntries(Object.keys(Ue).filter(e=>!0===Ue[e].allowShipping).map(e=>[e,Ue[e].states||[]])),Object.fromEntries(Object.keys(Ue).map(e=>[e,Ue[e].locale||[]]));var Ve=n(3);const qe=Ne.div`
|
|
display: flex;
|
|
flex-flow: column;
|
|
margin-bottom: 24px;
|
|
&:last-child {
|
|
margin-bottom: 0;
|
|
}
|
|
@media ( min-width: 800px ) {
|
|
flex-flow: row;
|
|
}
|
|
.components-base-control {
|
|
label {
|
|
text-transform: none !important;
|
|
}
|
|
}
|
|
`,Ge=Ne.div`
|
|
flex: 0 1 auto;
|
|
margin-bottom: 24px;
|
|
@media ( min-width: 800px ) {
|
|
flex: 0 0 250px;
|
|
margin: 0 32px 0 0;
|
|
}
|
|
h2 {
|
|
font-size: 16px;
|
|
line-height: 24px;
|
|
}
|
|
p {
|
|
font-size: 13px;
|
|
line-height: 17.89px;
|
|
margin: 12px 0;
|
|
}
|
|
> :last-child {
|
|
margin-bottom: 0;
|
|
}
|
|
`,He=Ne.div`
|
|
flex: 1 1 auto;
|
|
margin-bottom: 12px;
|
|
`;var We=e=>{let{Description:t=(()=>null),children:n,...o}=e;return Object(r.createElement)(qe,o,Object(r.createElement)(Ge,null,Object(r.createElement)(t,null)),Object(r.createElement)(He,null,n))};const Xe=Ne(Ve.Card)`
|
|
border-radius: 3px;
|
|
`,Ye=Ne(Ve.CardBody)`
|
|
padding: 24px;
|
|
|
|
// increasing the specificity of the styles to override the Gutenberg ones
|
|
&.is-size-medium.is-size-medium {
|
|
padding: 24px;
|
|
}
|
|
|
|
h4 {
|
|
margin-top: 0;
|
|
margin-bottom: 1em;
|
|
}
|
|
|
|
> * {
|
|
margin-top: 0;
|
|
margin-bottom: 1.5em;
|
|
|
|
// fixing the spacing on the inputs and their help text, to ensure it is consistent
|
|
&:last-child {
|
|
margin-bottom: 0;
|
|
|
|
> :last-child {
|
|
margin-bottom: 0;
|
|
}
|
|
}
|
|
}
|
|
|
|
input,
|
|
select {
|
|
margin: 0;
|
|
}
|
|
|
|
// spacing adjustment on "Express checkouts > Show express checkouts on" list
|
|
ul > li:last-child {
|
|
margin-bottom: 0;
|
|
|
|
.components-base-control__field {
|
|
margin-bottom: 0;
|
|
}
|
|
}
|
|
`;var Ke=e=>{let{children:t,...n}=e;return Object(r.createElement)(Xe,null,Object(r.createElement)(Ye,n,t))},Je=n(8),Ze=n(14),Qe=n.n(Ze),et=n(15),tt=n(10),nt=n.n(tt);const rt=e=>!(e=>null===e)(e)&&e instanceof Object&&e.constructor===Object,ot={enabled:!1,title:Object(Le.__)("Local Pickup","woocommerce"),tax_status:"taxable",cost:""},at={hasLegacyPickup:!1,storeCountry:"",storeState:""},it=()=>{const e=hydratedScreenSettings.pickupLocationSettings;return{enabled:null!=e&&e.enabled?"yes"===(null==e?void 0:e.enabled):ot.enabled,title:(null==e?void 0:e.title)||ot.title,tax_status:(null==e?void 0:e.tax_status)||ot.tax_status,cost:(null==e?void 0:e.cost)||ot.cost}},ct=()=>(hydratedScreenSettings.pickupLocations||[]).map((e,t)=>({...e,id:Object(Je.cleanForSlug)(e.name)+"-"+t})),lt=hydratedScreenSettings.readonlySettings||at,st=Object($e.getSetting)("countries",[]),ut=Object($e.getSetting)("countryStates",[]),dt={options:Object.keys(st).map(e=>{const t=ut[e]||{};if(0===Object.keys(t).length)return{options:[{value:e,label:st[e]}]};const n=Object.keys(t).map(n=>({value:`${e}:${n}`,label:`${st[e]} — ${t[n]}`}));return{label:st[e],options:[...n]}})},pt=Object(r.createContext)({settings:ot,readOnlySettings:at,setSettingField:()=>()=>{},pickupLocations:[],setPickupLocations:()=>{},toggleLocation:()=>{},updateLocation:()=>{},isSaving:!1,save:()=>{}}),ft=()=>Object(r.useContext)(pt),bt=e=>{let{children:t}=e;const[n,o]=Object(r.useState)(!1),[a,i]=Object(r.useState)(ct),[c,l]=Object(r.useState)(it),s=Object(r.useCallback)(e=>t=>{l(n=>({...n,[e]:t}))},[]),u=Object(r.useCallback)(e=>{i(t=>{const n=t.findIndex(t=>{let{id:n}=t;return n===e}),r=[...t];return r[n].enabled=!t[n].enabled,r})},[]),d=Object(r.useCallback)(()=>{const e={pickup_location_settings:{enabled:c.enabled?"yes":"no",title:c.title,tax_status:["taxable","none"].includes(c.tax_status)?c.tax_status:"taxable",cost:c.cost},pickup_locations:a.map(e=>({name:e.name,address:e.address,details:e.details,enabled:e.enabled}))};o(!0),Qe()({path:"/wp/v2/settings",method:"POST",data:e}).then(t=>{o(!1),nt()(t.pickup_location_settings,e.pickup_location_settings)&&nt()(t.pickup_locations,e.pickup_locations)&&Object(et.dispatch)("core/notices").createSuccessNotice(Object(Le.__)("Local Pickup settings have been saved.","woocommerce"))})},[c,a]),p={settings:c,setSettingField:s,readOnlySettings:lt,pickupLocations:a,setPickupLocations:i,toggleLocation:u,updateLocation:(e,t)=>{i(n=>"new"===e?[...n,{...t,id:Object(Je.cleanForSlug)(t.name)+"-"+n.length}]:n.map(n=>n.id===e?t:n).filter(Boolean))},isSaving:n,save:d};return Object(r.createElement)(pt.Provider,{value:p},t)},gt=()=>Object(r.createElement)(r.Fragment,null,Object(r.createElement)("h2",null,Object(Le.__)("General","woocommerce")),Object(r.createElement)("p",null,Object(Le.__)("Enable or disable local pickup on your store, and define costs. Local pickup is only available from the block checkout.","woocommerce")),Object(r.createElement)(Ve.ExternalLink,{href:`${$e.ADMIN_URL}post.php?post=${Fe}&action=edit`},Object(Le.__)("View checkout page","woocommerce"))),ht=Ne(Ve.Notice)`
|
|
margin-left: 0;
|
|
margin-right: 0;
|
|
`;var mt=()=>{const{settings:e,setSettingField:t,readOnlySettings:n}=ft(),[o,a]=Object(r.useState)(!!e.cost),i=Object($e.getSetting)("shippingCostRequiresAddress",!1);return Object(r.createElement)(We,{Description:gt},Object(r.createElement)(Ke,null,n.hasLegacyPickup&&Object(r.createElement)(ht,{status:"warning",isDismissible:!1},Object(r.createInterpolateElement)(Object(Le.__)("Enabling this will produce duplicate options at checkout. Remove the local pickup shipping method from your <a>shipping zones</a>.","woocommerce"),{a:Object(r.createElement)("a",{href:$e.ADMIN_URL+"admin.php?page=wc-settings&tab=shipping",target:"_blank",rel:"noopener noreferrer"})})),Object(r.createElement)(Ve.CheckboxControl,{checked:e.enabled,name:"local_pickup_enabled",onChange:t("enabled"),label:Object(Le.__)("Enable local pickup","woocommerce"),help:Object(r.createElement)("span",null,Object(Le.__)("When enabled, local pickup will appear as an option on the block based checkout.","woocommerce"),i?Object(r.createElement)(r.Fragment,null,Object(r.createElement)("br",null),Object(Le.__)('If local pickup is enabled, the "Hide shipping costs until an address is entered" setting will be ignored.',"woocommerce")):null)}),Object(r.createElement)(Ve.TextControl,{label:Object(Le.__)("Title","woocommerce"),name:"local_pickup_title",help:Object(Le.__)("This is the shipping method title shown to customers.","woocommerce"),placeholder:Object(Le.__)("Local Pickup","woocommerce"),value:e.title,onChange:t("title"),disabled:!1,autoComplete:"off",required:!0,onInvalid:e=>{e.target.setCustomValidity(Object(Le.__)("Local pickup title is required","woocommerce"))},onInput:e=>{e.target.setCustomValidity("")}}),Object(r.createElement)(Ve.CheckboxControl,{checked:o,onChange:()=>{a(!o),t("cost")("")},label:Object(Le.__)("Add a price for customers who choose local pickup","woocommerce"),help:Object(Le.__)("By default, the local pickup shipping method is free.","woocommerce")}),o?Object(r.createElement)(r.Fragment,null,Object(r.createElement)(Ve.TextControl,{label:Object(Le.__)("Cost","woocommerce"),name:"local_pickup_cost",help:Object(Le.__)("Optional cost to charge for local pickup.","woocommerce"),placeholder:Object(Le.__)("Free","woocommerce"),type:"number",pattern:"[0-9]+\\.?[0-9]*",min:0,value:e.cost,onChange:t("cost"),disabled:!1,autoComplete:"off"}),Object(r.createElement)(Ve.SelectControl,{label:Object(Le.__)("Taxes","woocommerce"),name:"local_pickup_tax_status",help:Object(Le.__)("If a cost is defined, this controls if taxes are applied to that cost.","woocommerce"),options:[{label:Object(Le.__)("Taxable","woocommerce"),value:"taxable"},{label:Object(Le.__)("Not taxable","woocommerce"),value:"none"}],value:e.tax_status,onChange:t("tax_status"),disabled:!1})):null))},vt=function(e){let{icon:t,size:n=24,...o}=e;return Object(r.cloneElement)(t,{width:n,height:n,...o})},yt=n(11),Ot=Object(r.createElement)(yt.SVG,{width:"18",height:"18",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 18 18"},Object(r.createElement)(yt.Path,{d:"M5 4h2V2H5v2zm6-2v2h2V2h-2zm-6 8h2V8H5v2zm6 0h2V8h-2v2zm-6 6h2v-2H5v2zm6 0h2v-2h-2v2z"})),wt=n(7);const xt="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement;function jt(e){const t=Object.prototype.toString.call(e);return"[object Window]"===t||"[object global]"===t}function kt(e){return"nodeType"in e}function Et(e){var t,n;return e?jt(e)?e:kt(e)&&null!=(t=null==(n=e.ownerDocument)?void 0:n.defaultView)?t:window:window}function Ct(e){const{Document:t}=Et(e);return e instanceof t}function St(e){return!jt(e)&&e instanceof Et(e).HTMLElement}function _t(e){return e?jt(e)?e.document:kt(e)?Ct(e)?e:St(e)?e.ownerDocument:document:document:document}const Rt=xt?i.useLayoutEffect:i.useEffect;function Dt(e){const t=Object(i.useRef)(e);return Rt(()=>{t.current=e}),Object(i.useCallback)((function(...e){return null==t.current?void 0:t.current(...e)}),[])}function Mt(e,t=[e]){const n=Object(i.useRef)(e);return Rt(()=>{n.current!==e&&(n.current=e)},t),n}function At(e,t){const n=Object(i.useRef)();return Object(i.useMemo)(()=>{const t=e(n.current);return n.current=t,t},[...t])}function Tt(e){const t=Dt(e),n=Object(i.useRef)(null),r=Object(i.useCallback)(e=>{e!==n.current&&(null==t||t(e,n.current)),n.current=e},[]);return[n,r]}function Pt(e){const t=Object(i.useRef)();return Object(i.useEffect)(()=>{t.current=e},[e]),t.current}let It={};function Nt(e,t){return Object(i.useMemo)(()=>{if(t)return t;const n=null==It[e]?0:It[e]+1;return It[e]=n,`${e}-${n}`},[e,t])}function Lt(e){return(t,...n)=>n.reduce((t,n)=>{const r=Object.entries(n);for(const[n,o]of r){const r=t[n];null!=r&&(t[n]=r+e*o)}return t},{...t})}const $t=Lt(1),zt=Lt(-1);function Ft(e){if(!e)return!1;const{KeyboardEvent:t}=Et(e.target);return t&&e instanceof t}function Bt(e){if(function(e){if(!e)return!1;const{TouchEvent:t}=Et(e.target);return t&&e instanceof t}(e)){if(e.touches&&e.touches.length){const{clientX:t,clientY:n}=e.touches[0];return{x:t,y:n}}if(e.changedTouches&&e.changedTouches.length){const{clientX:t,clientY:n}=e.changedTouches[0];return{x:t,y:n}}}return function(e){return"clientX"in e&&"clientY"in e}(e)?{x:e.clientX,y:e.clientY}:null}const Ut=Object.freeze({Translate:{toString(e){if(!e)return;const{x:t,y:n}=e;return`translate3d(${t?Math.round(t):0}px, ${n?Math.round(n):0}px, 0)`}},Scale:{toString(e){if(!e)return;const{scaleX:t,scaleY:n}=e;return`scaleX(${t}) scaleY(${n})`}},Transform:{toString(e){if(e)return[Ut.Translate.toString(e),Ut.Scale.toString(e)].join(" ")}},Transition:{toString:({property:e,duration:t,easing:n})=>`${e} ${t}ms ${n}`}}),Vt="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function qt(e){return e.matches(Vt)?e:e.querySelector(Vt)}const Gt={display:"none"};function Ht(e){let{id:t,value:n}=e;return c.a.createElement("div",{id:t,style:Gt},n)}const Wt={position:"fixed",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"};function Xt(e){let{id:t,announcement:n}=e;return c.a.createElement("div",{id:t,style:Wt,role:"status","aria-live":"assertive","aria-atomic":!0},n)}const Yt=Object(i.createContext)(null),Kt={draggable:"\n To pick up a draggable item, press the space bar.\n While dragging, use the arrow keys to move the item.\n Press space again to drop the item in its new position, or press escape to cancel.\n "},Jt={onDragStart(e){let{active:t}=e;return"Picked up draggable item "+t.id+"."},onDragOver(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was moved over droppable area "+n.id+".":"Draggable item "+t.id+" is no longer over a droppable area."},onDragEnd(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was dropped over droppable area "+n.id:"Draggable item "+t.id+" was dropped."},onDragCancel(e){let{active:t}=e;return"Dragging was cancelled. Draggable item "+t.id+" was dropped."}};function Zt(e){let{announcements:t=Jt,container:n,hiddenTextDescribedById:r,screenReaderInstructions:o=Kt}=e;const{announce:a,announcement:l}=function(){const[e,t]=Object(i.useState)("");return{announce:Object(i.useCallback)(e=>{null!=e&&t(e)},[]),announcement:e}}(),s=Nt("DndLiveRegion"),[u,d]=Object(i.useState)(!1);if(Object(i.useEffect)(()=>{d(!0)},[]),function(e){const t=Object(i.useContext)(Yt);Object(i.useEffect)(()=>{if(!t)throw new Error("useDndMonitor must be used within a children of <DndContext>");return t(e)},[e,t])}(Object(i.useMemo)(()=>({onDragStart(e){let{active:n}=e;a(t.onDragStart({active:n}))},onDragMove(e){let{active:n,over:r}=e;t.onDragMove&&a(t.onDragMove({active:n,over:r}))},onDragOver(e){let{active:n,over:r}=e;a(t.onDragOver({active:n,over:r}))},onDragEnd(e){let{active:n,over:r}=e;a(t.onDragEnd({active:n,over:r}))},onDragCancel(e){let{active:n,over:r}=e;a(t.onDragCancel({active:n,over:r}))}}),[a,t])),!u)return null;const p=c.a.createElement(c.a.Fragment,null,c.a.createElement(Ht,{id:r,value:o.draggable}),c.a.createElement(Xt,{id:s,announcement:l}));return n?Object(wt.createPortal)(p,n):p}var Qt;function en(){}function tn(e,t){return Object(i.useMemo)(()=>({sensor:e,options:null!=t?t:{}}),[e,t])}!function(e){e.DragStart="dragStart",e.DragMove="dragMove",e.DragEnd="dragEnd",e.DragCancel="dragCancel",e.DragOver="dragOver",e.RegisterDroppable="registerDroppable",e.SetDroppableDisabled="setDroppableDisabled",e.UnregisterDroppable="unregisterDroppable"}(Qt||(Qt={}));const nn=Object.freeze({x:0,y:0});function rn(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return n-r}function on(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return r-n}function an(e,t,n){return void 0===t&&(t=e.left),void 0===n&&(n=e.top),{x:t+.5*e.width,y:n+.5*e.height}}const cn=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const o=an(t,t.left,t.top),a=[];for(const e of r){const{id:t}=e,r=n.get(t);if(r){const n=(i=an(r),c=o,Math.sqrt(Math.pow(i.x-c.x,2)+Math.pow(i.y-c.y,2)));a.push({id:t,data:{droppableContainer:e,value:n}})}}var i,c;return a.sort(rn)};function ln(e,t){const n=Math.max(t.top,e.top),r=Math.max(t.left,e.left),o=Math.min(t.left+t.width,e.left+e.width),a=Math.min(t.top+t.height,e.top+e.height),i=o-r,c=a-n;if(r<o&&n<a){const n=t.width*t.height,r=e.width*e.height,o=i*c;return Number((o/(n+r-o)).toFixed(4))}return 0}const sn=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const o=[];for(const e of r){const{id:r}=e,a=n.get(r);if(a){const n=ln(a,t);n>0&&o.push({id:r,data:{droppableContainer:e,value:n}})}}return o.sort(on)};function un(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:nn}function dn(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return r.reduce((t,n)=>({...t,top:t.top+e*n.y,bottom:t.bottom+e*n.y,left:t.left+e*n.x,right:t.right+e*n.x}),{...t})}}const pn=dn(1);const fn={ignoreTransform:!1};function bn(e,t){void 0===t&&(t=fn);let n=e.getBoundingClientRect();if(t.ignoreTransform){const{getComputedStyle:t}=Et(e),{transform:r,transformOrigin:o}=t(e);r&&(n=function(e,t,n){const r=function(e){if(e.startsWith("matrix3d(")){const t=e.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}if(e.startsWith("matrix(")){const t=e.slice(7,-1).split(/, /);return{x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}(t);if(!r)return e;const{scaleX:o,scaleY:a,x:i,y:c}=r,l=e.left-i-(1-o)*parseFloat(n),s=e.top-c-(1-a)*parseFloat(n.slice(n.indexOf(" ")+1)),u=o?e.width/o:e.width,d=a?e.height/a:e.height;return{width:u,height:d,top:s,right:l+u,bottom:s+d,left:l}}(n,r,o))}const{top:r,left:o,width:a,height:i,bottom:c,right:l}=n;return{top:r,left:o,width:a,height:i,bottom:c,right:l}}function gn(e){return bn(e,{ignoreTransform:!0})}function hn(e,t){const n=[];return e?function r(o){if(null!=t&&n.length>=t)return n;if(!o)return n;if(Ct(o)&&null!=o.scrollingElement&&!n.includes(o.scrollingElement))return n.push(o.scrollingElement),n;if(!St(o)||function(e){return e instanceof Et(e).SVGElement}(o))return n;if(n.includes(o))return n;const{getComputedStyle:a}=Et(o),i=a(o);return o!==e&&function(e,t){void 0===t&&(t=Et(e).getComputedStyle(e));const n=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some(e=>{const r=t[e];return"string"==typeof r&&n.test(r)})}(o,i)&&n.push(o),function(e,t){return void 0===t&&(t=Et(e).getComputedStyle(e)),"fixed"===t.position}(o,i)?n:r(o.parentNode)}(e):n}function mn(e){const[t]=hn(e,1);return null!=t?t:null}function vn(e){return xt&&e?jt(e)?e:kt(e)?Ct(e)||e===_t(e).scrollingElement?window:St(e)?e:null:null:null}function yn(e){return jt(e)?e.scrollX:e.scrollLeft}function On(e){return jt(e)?e.scrollY:e.scrollTop}function wn(e){return{x:yn(e),y:On(e)}}var xn;function jn(e){return!(!xt||!e)&&e===document.scrollingElement}function kn(e){const t={x:0,y:0},n=jn(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},r={x:e.scrollWidth-n.width,y:e.scrollHeight-n.height};return{isTop:e.scrollTop<=t.y,isLeft:e.scrollLeft<=t.x,isBottom:e.scrollTop>=r.y,isRight:e.scrollLeft>=r.x,maxScroll:r,minScroll:t}}!function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"}(xn||(xn={}));const En={x:.2,y:.2};function Cn(e,t,n,r,o){let{top:a,left:i,right:c,bottom:l}=n;void 0===r&&(r=10),void 0===o&&(o=En);const{isTop:s,isBottom:u,isLeft:d,isRight:p}=kn(e),f={x:0,y:0},b={x:0,y:0},g=t.height*o.y,h=t.width*o.x;return!s&&a<=t.top+g?(f.y=xn.Backward,b.y=r*Math.abs((t.top+g-a)/g)):!u&&l>=t.bottom-g&&(f.y=xn.Forward,b.y=r*Math.abs((t.bottom-g-l)/g)),!p&&c>=t.right-h?(f.x=xn.Forward,b.x=r*Math.abs((t.right-h-c)/h)):!d&&i<=t.left+h&&(f.x=xn.Backward,b.x=r*Math.abs((t.left+h-i)/h)),{direction:f,speed:b}}function Sn(e){if(e===document.scrollingElement){const{innerWidth:e,innerHeight:t}=window;return{top:0,left:0,right:e,bottom:t,width:e,height:t}}const{top:t,left:n,right:r,bottom:o}=e.getBoundingClientRect();return{top:t,left:n,right:r,bottom:o,width:e.clientWidth,height:e.clientHeight}}function Rn(e){return e.reduce((e,t)=>$t(e,wn(t)),nn)}const Dn=[["x",["left","right"],function(e){return e.reduce((e,t)=>e+yn(t),0)}],["y",["top","bottom"],function(e){return e.reduce((e,t)=>e+On(t),0)}]];class Mn{constructor(e,t){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;const n=hn(t),r=Rn(n);this.rect={...e},this.width=e.width,this.height=e.height;for(const[e,t,o]of Dn)for(const a of t)Object.defineProperty(this,a,{get:()=>{const t=o(n),i=r[e]-t;return this.rect[a]+i},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class An{constructor(e){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(e=>{var t;return null==(t=this.target)?void 0:t.removeEventListener(...e)})},this.target=e}add(e,t,n){var r;null==(r=this.target)||r.addEventListener(e,t,n),this.listeners.push([e,t,n])}}function Tn(e,t){const n=Math.abs(e.x),r=Math.abs(e.y);return"number"==typeof t?Math.sqrt(n**2+r**2)>t:"x"in t&&"y"in t?n>t.x&&r>t.y:"x"in t?n>t.x:"y"in t&&r>t.y}var Pn,In;function Nn(e){e.preventDefault()}function Ln(e){e.stopPropagation()}!function(e){e.Click="click",e.DragStart="dragstart",e.Keydown="keydown",e.ContextMenu="contextmenu",e.Resize="resize",e.SelectionChange="selectionchange",e.VisibilityChange="visibilitychange"}(Pn||(Pn={})),function(e){e.Space="Space",e.Down="ArrowDown",e.Right="ArrowRight",e.Left="ArrowLeft",e.Up="ArrowUp",e.Esc="Escape",e.Enter="Enter"}(In||(In={}));const $n={start:[In.Space,In.Enter],cancel:[In.Esc],end:[In.Space,In.Enter]},zn=(e,t)=>{let{currentCoordinates:n}=t;switch(e.code){case In.Right:return{...n,x:n.x+25};case In.Left:return{...n,x:n.x-25};case In.Down:return{...n,y:n.y+25};case In.Up:return{...n,y:n.y-25}}};class Fn{constructor(e){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=e;const{event:{target:t}}=e;this.props=e,this.listeners=new An(_t(t)),this.windowListeners=new An(Et(t)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(Pn.Resize,this.handleCancel),this.windowListeners.add(Pn.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(Pn.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:e,onStart:t}=this.props,n=e.node.current;n&&function(e,t){if(void 0===t&&(t=bn),!e)return;const{top:n,left:r,bottom:o,right:a}=t(e);mn(e)&&(o<=0||a<=0||n>=window.innerHeight||r>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}(n),t(nn)}handleKeyDown(e){if(Ft(e)){const{active:t,context:n,options:r}=this.props,{keyboardCodes:o=$n,coordinateGetter:a=zn,scrollBehavior:i="smooth"}=r,{code:c}=e;if(o.end.includes(c))return void this.handleEnd(e);if(o.cancel.includes(c))return void this.handleCancel(e);const{collisionRect:l}=n.current,s=l?{x:l.left,y:l.top}:nn;this.referenceCoordinates||(this.referenceCoordinates=s);const u=a(e,{active:t,context:n.current,currentCoordinates:s});if(u){const t=zt(u,s),r={x:0,y:0},{scrollableAncestors:o}=n.current;for(const n of o){const o=e.code,{isTop:a,isRight:c,isLeft:l,isBottom:s,maxScroll:d,minScroll:p}=kn(n),f=Sn(n),b={x:Math.min(o===In.Right?f.right-f.width/2:f.right,Math.max(o===In.Right?f.left:f.left+f.width/2,u.x)),y:Math.min(o===In.Down?f.bottom-f.height/2:f.bottom,Math.max(o===In.Down?f.top:f.top+f.height/2,u.y))},g=o===In.Right&&!c||o===In.Left&&!l,h=o===In.Down&&!s||o===In.Up&&!a;if(g&&b.x!==u.x){const e=n.scrollLeft+t.x,a=o===In.Right&&e<=d.x||o===In.Left&&e>=p.x;if(a&&!t.y)return void n.scrollTo({left:e,behavior:i});r.x=a?n.scrollLeft-e:o===In.Right?n.scrollLeft-d.x:n.scrollLeft-p.x,r.x&&n.scrollBy({left:-r.x,behavior:i});break}if(h&&b.y!==u.y){const e=n.scrollTop+t.y,a=o===In.Down&&e<=d.y||o===In.Up&&e>=p.y;if(a&&!t.x)return void n.scrollTo({top:e,behavior:i});r.y=a?n.scrollTop-e:o===In.Down?n.scrollTop-d.y:n.scrollTop-p.y,r.y&&n.scrollBy({top:-r.y,behavior:i});break}}this.handleMove(e,$t(zt(u,this.referenceCoordinates),r))}}}handleMove(e,t){const{onMove:n}=this.props;e.preventDefault(),n(t)}handleEnd(e){const{onEnd:t}=this.props;e.preventDefault(),this.detach(),t()}handleCancel(e){const{onCancel:t}=this.props;e.preventDefault(),this.detach(),t()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}}function Bn(e){return Boolean(e&&"distance"in e)}function Un(e){return Boolean(e&&"delay"in e)}Fn.activators=[{eventName:"onKeyDown",handler:(e,t,n)=>{let{keyboardCodes:r=$n,onActivation:o}=t,{active:a}=n;const{code:i}=e.nativeEvent;if(r.start.includes(i)){const t=a.activatorNode.current;return!(t&&e.target!==t||(e.preventDefault(),null==o||o({event:e.nativeEvent}),0))}return!1}}];class Vn{constructor(e,t,n){var r;void 0===n&&(n=function(e){const{EventTarget:t}=Et(e);return e instanceof t?e:_t(e)}(e.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=e,this.events=t;const{event:o}=e,{target:a}=o;this.props=e,this.events=t,this.document=_t(a),this.documentListeners=new An(this.document),this.listeners=new An(n),this.windowListeners=new An(Et(a)),this.initialCoordinates=null!=(r=Bt(o))?r:nn,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){const{events:e,props:{options:{activationConstraint:t}}}=this;if(this.listeners.add(e.move.name,this.handleMove,{passive:!1}),this.listeners.add(e.end.name,this.handleEnd),this.windowListeners.add(Pn.Resize,this.handleCancel),this.windowListeners.add(Pn.DragStart,Nn),this.windowListeners.add(Pn.VisibilityChange,this.handleCancel),this.windowListeners.add(Pn.ContextMenu,Nn),this.documentListeners.add(Pn.Keydown,this.handleKeydown),t){if(Bn(t))return;if(Un(t))return void(this.timeoutId=setTimeout(this.handleStart,t.delay))}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),null!==this.timeoutId&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handleStart(){const{initialCoordinates:e}=this,{onStart:t}=this.props;e&&(this.activated=!0,this.documentListeners.add(Pn.Click,Ln,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(Pn.SelectionChange,this.removeTextSelection),t(e))}handleMove(e){var t;const{activated:n,initialCoordinates:r,props:o}=this,{onMove:a,options:{activationConstraint:i}}=o;if(!r)return;const c=null!=(t=Bt(e))?t:nn,l=zt(r,c);if(!n&&i){if(Un(i))return Tn(l,i.tolerance)?this.handleCancel():void 0;if(Bn(i))return null!=i.tolerance&&Tn(l,i.tolerance)?this.handleCancel():Tn(l,i.distance)?this.handleStart():void 0}e.cancelable&&e.preventDefault(),a(c)}handleEnd(){const{onEnd:e}=this.props;this.detach(),e()}handleCancel(){const{onCancel:e}=this.props;this.detach(),e()}handleKeydown(e){e.code===In.Esc&&this.handleCancel()}removeTextSelection(){var e;null==(e=this.document.getSelection())||e.removeAllRanges()}}const qn={move:{name:"pointermove"},end:{name:"pointerup"}};class Gn extends Vn{constructor(e){const{event:t}=e,n=_t(t.target);super(e,qn,n)}}Gn.activators=[{eventName:"onPointerDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return!(!n.isPrimary||0!==n.button||(null==r||r({event:n}),0))}}];const Hn={move:{name:"mousemove"},end:{name:"mouseup"}};var Wn;!function(e){e[e.RightClick=2]="RightClick"}(Wn||(Wn={}));class Xn extends Vn{constructor(e){super(e,Hn,_t(e.event.target))}}Xn.activators=[{eventName:"onMouseDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return n.button!==Wn.RightClick&&(null==r||r({event:n}),!0)}}];const Yn={move:{name:"touchmove"},end:{name:"touchend"}};class Kn extends Vn{constructor(e){super(e,Yn)}static setup(){return window.addEventListener(Yn.move.name,e,{capture:!1,passive:!1}),function(){window.removeEventListener(Yn.move.name,e)};function e(){}}}var Jn,Zn;Kn.activators=[{eventName:"onTouchStart",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;const{touches:o}=n;return!(o.length>1||(null==r||r({event:n}),0))}}],function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"}(Jn||(Jn={})),function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"}(Zn||(Zn={}));const Qn={x:{[xn.Backward]:!1,[xn.Forward]:!1},y:{[xn.Backward]:!1,[xn.Forward]:!1}};var er,tr;!function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"}(er||(er={})),function(e){e.Optimized="optimized"}(tr||(tr={}));const nr=new Map;function rr(e,t){return At(n=>e?n||("function"==typeof t?t(e):e):null,[t,e])}function or(e){let{callback:t,disabled:n}=e;const r=Dt(t),o=Object(i.useMemo)(()=>{if(n||"undefined"==typeof window||void 0===window.ResizeObserver)return;const{ResizeObserver:e}=window;return new e(r)},[n]);return Object(i.useEffect)(()=>()=>null==o?void 0:o.disconnect(),[o]),o}function ar(e){return new Mn(bn(e),e)}function ir(e,t,n){void 0===t&&(t=ar);const[r,o]=Object(i.useReducer)((function(r){if(!e)return null;var o;if(!1===e.isConnected)return null!=(o=null!=r?r:n)?o:null;const a=t(e);return JSON.stringify(r)===JSON.stringify(a)?r:a}),null),a=function(e){let{callback:t,disabled:n}=e;const r=Dt(t),o=Object(i.useMemo)(()=>{if(n||"undefined"==typeof window||void 0===window.MutationObserver)return;const{MutationObserver:e}=window;return new e(r)},[r,n]);return Object(i.useEffect)(()=>()=>null==o?void 0:o.disconnect(),[o]),o}({callback(t){if(e)for(const n of t){const{type:t,target:r}=n;if("childList"===t&&r instanceof HTMLElement&&r.contains(e)){o();break}}}}),c=or({callback:o});return Rt(()=>{o(),e?(null==c||c.observe(e),null==a||a.observe(document.body,{childList:!0,subtree:!0})):(null==c||c.disconnect(),null==a||a.disconnect())},[e]),r}const cr=[];function lr(e,t){void 0===t&&(t=[]);const n=Object(i.useRef)(null);return Object(i.useEffect)(()=>{n.current=null},t),Object(i.useEffect)(()=>{const t=e!==nn;t&&!n.current&&(n.current=e),!t&&n.current&&(n.current=null)},[e]),n.current?zt(e,n.current):nn}function sr(e){return Object(i.useMemo)(()=>e?function(e){const t=e.innerWidth,n=e.innerHeight;return{top:0,left:0,right:t,bottom:n,width:t,height:n}}(e):null,[e])}const ur=[];const dr=[{sensor:Gn,options:{}},{sensor:Fn,options:{}}],pr={current:{}},fr={draggable:{measure:gn},droppable:{measure:gn,strategy:er.WhileDragging,frequency:tr.Optimized},dragOverlay:{measure:bn}};class br extends Map{get(e){var t;return null!=e&&null!=(t=super.get(e))?t:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter(e=>{let{disabled:t}=e;return!t})}getNodeFor(e){var t,n;return null!=(t=null==(n=this.get(e))?void 0:n.node.current)?t:void 0}}const gr={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new br,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:en},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:fr,measureDroppableContainers:en,windowRect:null,measuringScheduled:!1},hr={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:en,draggableNodes:new Map,over:null,measureDroppableContainers:en},mr=Object(i.createContext)(hr),vr=Object(i.createContext)(gr);function yr(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new br}}}function Or(e,t){switch(t.type){case Qt.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case Qt.DragMove:return e.draggable.active?{...e,draggable:{...e.draggable,translate:{x:t.coordinates.x-e.draggable.initialCoordinates.x,y:t.coordinates.y-e.draggable.initialCoordinates.y}}}:e;case Qt.DragEnd:case Qt.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case Qt.RegisterDroppable:{const{element:n}=t,{id:r}=n,o=new br(e.droppable.containers);return o.set(r,n),{...e,droppable:{...e.droppable,containers:o}}}case Qt.SetDroppableDisabled:{const{id:n,key:r,disabled:o}=t,a=e.droppable.containers.get(n);if(!a||r!==a.key)return e;const i=new br(e.droppable.containers);return i.set(n,{...a,disabled:o}),{...e,droppable:{...e.droppable,containers:i}}}case Qt.UnregisterDroppable:{const{id:n,key:r}=t,o=e.droppable.containers.get(n);if(!o||r!==o.key)return e;const a=new br(e.droppable.containers);return a.delete(n),{...e,droppable:{...e.droppable,containers:a}}}default:return e}}function wr(e){let{disabled:t}=e;const{active:n,activatorEvent:r,draggableNodes:o}=Object(i.useContext)(mr),a=Pt(r),c=Pt(null==n?void 0:n.id);return Object(i.useEffect)(()=>{if(!t&&!r&&a&&null!=c){if(!Ft(a))return;if(document.activeElement===a.target)return;const e=o.get(c);if(!e)return;const{activatorNode:t,node:n}=e;if(!t.current&&!n.current)return;requestAnimationFrame(()=>{for(const e of[t.current,n.current]){if(!e)continue;const t=qt(e);if(t){t.focus();break}}})}},[r,t,o,c,a]),null}const xr=Object(i.createContext)({...nn,scaleX:1,scaleY:1});var jr;!function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"}(jr||(jr={}));const kr=Object(i.memo)((function(e){var t,n,r,o;let{id:a,accessibility:l,autoScroll:s=!0,children:u,sensors:d=dr,collisionDetection:p=sn,measuring:f,modifiers:b,...g}=e;const h=Object(i.useReducer)(Or,void 0,yr),[m,v]=h,[y,O]=function(){const[e]=Object(i.useState)(()=>new Set),t=Object(i.useCallback)(t=>(e.add(t),()=>e.delete(t)),[e]);return[Object(i.useCallback)(t=>{let{type:n,event:r}=t;e.forEach(e=>{var t;return null==(t=e[n])?void 0:t.call(e,r)})},[e]),t]}(),[w,x]=Object(i.useState)(jr.Uninitialized),j=w===jr.Initialized,{draggable:{active:k,nodes:E,translate:C},droppable:{containers:S}}=m,_=k?E.get(k):null,R=Object(i.useRef)({initial:null,translated:null}),D=Object(i.useMemo)(()=>{var e;return null!=k?{id:k,data:null!=(e=null==_?void 0:_.data)?e:pr,rect:R}:null},[k,_]),M=Object(i.useRef)(null),[A,T]=Object(i.useState)(null),[P,I]=Object(i.useState)(null),N=Mt(g,Object.values(g)),L=Nt("DndDescribedBy",a),$=Object(i.useMemo)(()=>S.getEnabled(),[S]),z=(F=f,Object(i.useMemo)(()=>({draggable:{...fr.draggable,...null==F?void 0:F.draggable},droppable:{...fr.droppable,...null==F?void 0:F.droppable},dragOverlay:{...fr.dragOverlay,...null==F?void 0:F.dragOverlay}}),[null==F?void 0:F.draggable,null==F?void 0:F.droppable,null==F?void 0:F.dragOverlay]));var F;const{droppableRects:B,measureDroppableContainers:U,measuringScheduled:V}=function(e,t){let{dragging:n,dependencies:r,config:o}=t;const[a,c]=Object(i.useState)(null),l=null!=a,{frequency:s,measure:u,strategy:d}=o,p=Object(i.useRef)(e),f=function(){switch(d){case er.Always:return!1;case er.BeforeDragging:return n;default:return!n}}(),b=Mt(f),g=Object(i.useCallback)((function(e){void 0===e&&(e=[]),b.current||c(t=>t?t.concat(e):e)}),[b]),h=Object(i.useRef)(null),m=At(t=>{if(f&&!n)return nr;const r=a;if(!t||t===nr||p.current!==e||null!=r){const t=new Map;for(let n of e){if(!n)continue;if(r&&r.length>0&&!r.includes(n.id)&&n.rect.current){t.set(n.id,n.rect.current);continue}const e=n.node.current,o=e?new Mn(u(e),e):null;n.rect.current=o,o&&t.set(n.id,o)}return t}return t},[e,a,n,f,u]);return Object(i.useEffect)(()=>{p.current=e},[e]),Object(i.useEffect)(()=>{f||requestAnimationFrame(()=>g())},[n,f]),Object(i.useEffect)(()=>{l&&c(null)},[l]),Object(i.useEffect)(()=>{f||"number"!=typeof s||null!==h.current||(h.current=setTimeout(()=>{g(),h.current=null},s))},[s,f,g,...r]),{droppableRects:m,measureDroppableContainers:g,measuringScheduled:l}}($,{dragging:j,dependencies:[C.x,C.y],config:z.droppable}),q=function(e,t){const n=null!==t?e.get(t):void 0,r=n?n.node.current:null;return At(e=>{var n;return null===t?null:null!=(n=null!=r?r:e)?n:null},[r,t])}(E,k),G=Object(i.useMemo)(()=>P?Bt(P):null,[P]),H=function(){const e=!1===(null==A?void 0:A.autoScrollEnabled),t="object"==typeof s?!1===s.enabled:!1===s,n=j&&!e&&!t;return"object"==typeof s?{...s,enabled:n}:{enabled:n}}(),W=function(e,t){return rr(e,t)}(q,z.draggable.measure);!function(e){let{activeNode:t,measure:n,initialRect:r,config:o=!0}=e;const a=Object(i.useRef)(!1),{x:c,y:l}="boolean"==typeof o?{x:o,y:o}:o;Rt(()=>{if(!c&&!l||!t)return void(a.current=!1);if(a.current||!r)return;const e=null==t?void 0:t.node.current;if(!e||!1===e.isConnected)return;const o=un(n(e),r);if(c||(o.x=0),l||(o.y=0),a.current=!0,Math.abs(o.x)>0||Math.abs(o.y)>0){const t=mn(e);t&&t.scrollBy({top:o.y,left:o.x})}},[t,c,l,r,n])}({activeNode:k?E.get(k):null,config:H.layoutShiftCompensation,initialRect:W,measure:z.draggable.measure});const X=ir(q,z.draggable.measure,W),Y=ir(q?q.parentElement:null),K=Object(i.useRef)({activatorEvent:null,active:null,activeNode:q,collisionRect:null,collisions:null,droppableRects:B,draggableNodes:E,draggingNode:null,draggingNodeRect:null,droppableContainers:S,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),J=S.getNodeFor(null==(t=K.current.over)?void 0:t.id),Z=function(e){let{measure:t}=e;const[n,r]=Object(i.useState)(null),o=or({callback:Object(i.useCallback)(e=>{for(const{target:n}of e)if(St(n)){r(e=>{const r=t(n);return e?{...e,width:r.width,height:r.height}:r});break}},[t])}),a=Object(i.useCallback)(e=>{const n=function(e){if(!e)return null;if(e.children.length>1)return e;const t=e.children[0];return St(t)?t:e}(e);null==o||o.disconnect(),n&&(null==o||o.observe(n)),r(n?t(n):null)},[t,o]),[c,l]=Tt(a);return Object(i.useMemo)(()=>({nodeRef:c,rect:n,setRef:l}),[n,c,l])}({measure:z.dragOverlay.measure}),Q=null!=(n=Z.nodeRef.current)?n:q,ee=j?null!=(r=Z.rect)?r:X:null,te=Boolean(Z.nodeRef.current&&Z.rect),ne=un(re=te?null:X,rr(re));var re;const oe=sr(Q?Et(Q):null),ae=function(e){const t=Object(i.useRef)(e),n=At(n=>e?n&&n!==cr&&e&&t.current&&e.parentNode===t.current.parentNode?n:hn(e):cr,[e]);return Object(i.useEffect)(()=>{t.current=e},[e]),n}(j?null!=J?J:q:null),ie=function(e,t){void 0===t&&(t=bn);const[n]=e,r=sr(n?Et(n):null),[o,a]=Object(i.useReducer)((function(){return e.length?e.map(e=>jn(e)?r:new Mn(t(e),e)):ur}),ur),c=or({callback:a});return e.length>0&&o===ur&&a(),Rt(()=>{e.length?e.forEach(e=>null==c?void 0:c.observe(e)):(null==c||c.disconnect(),a())},[e]),o}(ae),ce=function(e,t){let{transform:n,...r}=t;return null!=e&&e.length?e.reduce((e,t)=>t({transform:e,...r}),n):n}(b,{transform:{x:C.x-ne.x,y:C.y-ne.y,scaleX:1,scaleY:1},activatorEvent:P,active:D,activeNodeRect:X,containerNodeRect:Y,draggingNodeRect:ee,over:K.current.over,overlayNodeRect:Z.rect,scrollableAncestors:ae,scrollableAncestorRects:ie,windowRect:oe}),le=G?$t(G,C):null,se=function(e){const[t,n]=Object(i.useState)(null),r=Object(i.useRef)(e),o=Object(i.useCallback)(e=>{const t=vn(e.target);t&&n(e=>e?(e.set(t,wn(t)),new Map(e)):null)},[]);return Object(i.useEffect)(()=>{const t=r.current;if(e!==t){a(t);const i=e.map(e=>{const t=vn(e);return t?(t.addEventListener("scroll",o,{passive:!0}),[t,wn(t)]):null}).filter(e=>null!=e);n(i.length?new Map(i):null),r.current=e}return()=>{a(e),a(t)};function a(e){e.forEach(e=>{const t=vn(e);null==t||t.removeEventListener("scroll",o)})}},[o,e]),Object(i.useMemo)(()=>e.length?t?Array.from(t.values()).reduce((e,t)=>$t(e,t),nn):Rn(e):nn,[e,t])}(ae),ue=lr(se),de=lr(se,[X]),pe=$t(ce,ue),fe=ee?pn(ee,ce):null,be=D&&fe?p({active:D,collisionRect:fe,droppableRects:B,droppableContainers:$,pointerCoordinates:le}):null,ge=function(e,t){if(!e||0===e.length)return null;const[n]=e;return t?n[t]:n}(be,"id"),[he,me]=Object(i.useState)(null),ve=function(e,t,n){return{...e,scaleX:t&&n?t.width/n.width:1,scaleY:t&&n?t.height/n.height:1}}(te?ce:$t(ce,de),null!=(o=null==he?void 0:he.rect)?o:null,X),ye=Object(i.useCallback)((e,t)=>{let{sensor:n,options:r}=t;if(null==M.current)return;const o=E.get(M.current);if(!o)return;const a=e.nativeEvent,i=new n({active:M.current,activeNode:o,event:a,options:r,context:K,onStart(e){const t=M.current;if(null==t)return;const n=E.get(t);if(!n)return;const{onDragStart:r}=N.current,o={active:{id:t,data:n.data,rect:R}};Object(wt.unstable_batchedUpdates)(()=>{null==r||r(o),x(jr.Initializing),v({type:Qt.DragStart,initialCoordinates:e,active:t}),y({type:"onDragStart",event:o})})},onMove(e){v({type:Qt.DragMove,coordinates:e})},onEnd:c(Qt.DragEnd),onCancel:c(Qt.DragCancel)});function c(e){return async function(){const{active:t,collisions:n,over:r,scrollAdjustedTranslate:o}=K.current;let i=null;if(t&&o){const{cancelDrop:c}=N.current;i={activatorEvent:a,active:t,collisions:n,delta:o,over:r},e===Qt.DragEnd&&"function"==typeof c&&await Promise.resolve(c(i))&&(e=Qt.DragCancel)}M.current=null,Object(wt.unstable_batchedUpdates)(()=>{v({type:e}),x(jr.Uninitialized),me(null),T(null),I(null);const t=e===Qt.DragEnd?"onDragEnd":"onDragCancel";if(i){const e=N.current[t];null==e||e(i),y({type:t,event:i})}})}}Object(wt.unstable_batchedUpdates)(()=>{T(i),I(e.nativeEvent)})},[E]),Oe=function(e,t){return Object(i.useMemo)(()=>e.reduce((e,n)=>{const{sensor:r}=n;return[...e,...r.activators.map(e=>({eventName:e.eventName,handler:t(e.handler,n)}))]},[]),[e,t])}(d,Object(i.useCallback)((e,t)=>(n,r)=>{const o=n.nativeEvent,a=E.get(r);if(null!==M.current||!a||o.dndKit||o.defaultPrevented)return;const i={active:a};!0===e(n,t.options,i)&&(o.dndKit={capturedBy:t.sensor},M.current=r,ye(n,t))},[E,ye]));!function(e){Object(i.useEffect)(()=>{if(!xt)return;const t=e.map(e=>{let{sensor:t}=e;return null==t.setup?void 0:t.setup()});return()=>{for(const e of t)null==e||e()}},e.map(e=>{let{sensor:t}=e;return t}))}(d),Rt(()=>{X&&w===jr.Initializing&&x(jr.Initialized)},[X,w]),Object(i.useEffect)(()=>{const{onDragMove:e}=N.current,{active:t,activatorEvent:n,collisions:r,over:o}=K.current;if(!t||!n)return;const a={active:t,activatorEvent:n,collisions:r,delta:{x:pe.x,y:pe.y},over:o};Object(wt.unstable_batchedUpdates)(()=>{null==e||e(a),y({type:"onDragMove",event:a})})},[pe.x,pe.y]),Object(i.useEffect)(()=>{const{active:e,activatorEvent:t,collisions:n,droppableContainers:r,scrollAdjustedTranslate:o}=K.current;if(!e||null==M.current||!t||!o)return;const{onDragOver:a}=N.current,i=r.get(ge),c=i&&i.rect.current?{id:i.id,rect:i.rect.current,data:i.data,disabled:i.disabled}:null,l={active:e,activatorEvent:t,collisions:n,delta:{x:o.x,y:o.y},over:c};Object(wt.unstable_batchedUpdates)(()=>{me(c),null==a||a(l),y({type:"onDragOver",event:l})})},[ge]),Rt(()=>{K.current={activatorEvent:P,active:D,activeNode:q,collisionRect:fe,collisions:be,droppableRects:B,draggableNodes:E,draggingNode:Q,draggingNodeRect:ee,droppableContainers:S,over:he,scrollableAncestors:ae,scrollAdjustedTranslate:pe},R.current={initial:ee,translated:fe}},[D,q,be,fe,E,Q,ee,B,S,he,ae,pe]),function(e){let{acceleration:t,activator:n=Jn.Pointer,canScroll:r,draggingRect:o,enabled:a,interval:c=5,order:l=Zn.TreeOrder,pointerCoordinates:s,scrollableAncestors:u,scrollableAncestorRects:d,delta:p,threshold:f}=e;const b=function(e){let{delta:t,disabled:n}=e;const r=Pt(t);return At(e=>{if(n||!r||!e)return Qn;const o=Math.sign(t.x-r.x),a=Math.sign(t.y-r.y);return{x:{[xn.Backward]:e.x[xn.Backward]||-1===o,[xn.Forward]:e.x[xn.Forward]||1===o},y:{[xn.Backward]:e.y[xn.Backward]||-1===a,[xn.Forward]:e.y[xn.Forward]||1===a}}},[n,t,r])}({delta:p,disabled:!a}),[g,h]=function(){const e=Object(i.useRef)(null);return[Object(i.useCallback)((t,n)=>{e.current=setInterval(t,n)},[]),Object(i.useCallback)(()=>{null!==e.current&&(clearInterval(e.current),e.current=null)},[])]}(),m=Object(i.useRef)({x:0,y:0}),v=Object(i.useRef)({x:0,y:0}),y=Object(i.useMemo)(()=>{switch(n){case Jn.Pointer:return s?{top:s.y,bottom:s.y,left:s.x,right:s.x}:null;case Jn.DraggableRect:return o}},[n,o,s]),O=Object(i.useRef)(null),w=Object(i.useCallback)(()=>{const e=O.current;if(!e)return;const t=m.current.x*v.current.x,n=m.current.y*v.current.y;e.scrollBy(t,n)},[]),x=Object(i.useMemo)(()=>l===Zn.TreeOrder?[...u].reverse():u,[l,u]);Object(i.useEffect)(()=>{if(a&&u.length&&y){for(const e of x){if(!1===(null==r?void 0:r(e)))continue;const n=u.indexOf(e),o=d[n];if(!o)continue;const{direction:a,speed:i}=Cn(e,o,y,t,f);for(const e of["x","y"])b[e][a[e]]||(i[e]=0,a[e]=0);if(i.x>0||i.y>0)return h(),O.current=e,g(w,c),m.current=i,void(v.current=a)}m.current={x:0,y:0},v.current={x:0,y:0},h()}else h()},[t,w,r,h,a,c,JSON.stringify(y),JSON.stringify(b),g,u,x,d,JSON.stringify(f)])}({...H,delta:C,draggingRect:fe,pointerCoordinates:le,scrollableAncestors:ae,scrollableAncestorRects:ie});const we=Object(i.useMemo)(()=>({active:D,activeNode:q,activeNodeRect:X,activatorEvent:P,collisions:be,containerNodeRect:Y,dragOverlay:Z,draggableNodes:E,droppableContainers:S,droppableRects:B,over:he,measureDroppableContainers:U,scrollableAncestors:ae,scrollableAncestorRects:ie,measuringConfiguration:z,measuringScheduled:V,windowRect:oe}),[D,q,X,P,be,Y,Z,E,S,B,he,U,ae,ie,z,V,oe]),xe=Object(i.useMemo)(()=>({activatorEvent:P,activators:Oe,active:D,activeNodeRect:X,ariaDescribedById:{draggable:L},dispatch:v,draggableNodes:E,over:he,measureDroppableContainers:U}),[P,Oe,D,X,v,L,E,he,U]);return c.a.createElement(Yt.Provider,{value:O},c.a.createElement(mr.Provider,{value:xe},c.a.createElement(vr.Provider,{value:we},c.a.createElement(xr.Provider,{value:ve},u)),c.a.createElement(wr,{disabled:!1===(null==l?void 0:l.restoreFocus)})),c.a.createElement(Zt,{...l,hiddenTextDescribedById:L}))})),Er=Object(i.createContext)(null),Cr="button";const Sr={timeout:25},_r=({transform:e})=>({...e,x:0});function Rr(e,t,n){const r=e.slice();return r.splice(n<0?r.length+n:n,0,r.splice(t,1)[0]),r}function Dr(e,t){return e.reduce((e,n,r)=>{const o=t.get(n);return o&&(e[r]=o),e},Array(e.length))}function Mr(e){return null!==e&&e>=0}const Ar=e=>{let{rects:t,activeIndex:n,overIndex:r,index:o}=e;const a=Rr(t,r,n),i=t[o],c=a[o];return c&&i?{x:c.left-i.left,y:c.top-i.top,scaleX:c.width/i.width,scaleY:c.height/i.height}:null},Tr={scaleX:1,scaleY:1},Pr=e=>{var t;let{activeIndex:n,activeNodeRect:r,index:o,rects:a,overIndex:i}=e;const c=null!=(t=a[n])?t:r;if(!c)return null;if(o===n){const e=a[i];return e?{x:0,y:n<i?e.top+e.height-(c.top+c.height):e.top-c.top,...Tr}:null}const l=function(e,t,n){const r=e[t],o=e[t-1],a=e[t+1];return r?n<t?o?r.top-(o.top+o.height):a?a.top-(r.top+r.height):0:a?a.top-(r.top+r.height):o?r.top-(o.top+o.height):0:0}(a,o,n);return o>n&&o<=i?{x:0,y:-c.height-l,...Tr}:o<n&&o>=i?{x:0,y:c.height+l,...Tr}:{x:0,y:0,...Tr}},Ir=c.a.createContext({activeIndex:-1,containerId:"Sortable",disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:Ar,disabled:{draggable:!1,droppable:!1}});function Nr(e){let{children:t,id:n,items:r,strategy:o=Ar,disabled:a=!1}=e;const{active:l,dragOverlay:s,droppableRects:u,over:d,measureDroppableContainers:p,measuringScheduled:f}=Object(i.useContext)(vr),b=Nt("Sortable",n),g=Boolean(null!==s.rect),h=Object(i.useMemo)(()=>r.map(e=>"object"==typeof e&&"id"in e?e.id:e),[r]),m=null!=l,v=l?h.indexOf(l.id):-1,y=d?h.indexOf(d.id):-1,O=Object(i.useRef)(h),w=!function(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}(h,O.current),x=-1!==y&&-1===v||w,j=function(e){return"boolean"==typeof e?{draggable:e,droppable:e}:e}(a);Rt(()=>{w&&m&&!f&&p(h)},[w,h,m,p,f]),Object(i.useEffect)(()=>{O.current=h},[h]);const k=Object(i.useMemo)(()=>({activeIndex:v,containerId:b,disabled:j,disableTransforms:x,items:h,overIndex:y,useDragOverlay:g,sortedRects:Dr(h,u),strategy:o}),[v,b,j.draggable,j.droppable,x,h,y,u,g,o]);return c.a.createElement(Ir.Provider,{value:k},t)}const Lr=e=>{let{id:t,items:n,activeIndex:r,overIndex:o}=e;return Rr(n,r,o).indexOf(t)},$r=e=>{let{containerId:t,isSorting:n,wasDragging:r,index:o,items:a,newIndex:i,previousItems:c,previousContainerId:l,transition:s}=e;return!(!s||!r||c!==a&&o===i||!n&&(i===o||t!==l))},zr={duration:200,easing:"ease"},Fr=Ut.Transition.toString({property:"transform",duration:0,easing:"linear"}),Br={roleDescription:"sortable"};function Ur(e){let{animateLayoutChanges:t=$r,attributes:n,disabled:r,data:o,getNewIndex:a=Lr,id:c,strategy:l,resizeObserverConfig:s,transition:u=zr}=e;const{items:d,containerId:p,activeIndex:f,disabled:b,disableTransforms:g,sortedRects:h,overIndex:m,useDragOverlay:v,strategy:y}=Object(i.useContext)(Ir),O=function(e,t){var n,r;return"boolean"==typeof e?{draggable:e,droppable:!1}:{draggable:null!=(n=null==e?void 0:e.draggable)?n:t.draggable,droppable:null!=(r=null==e?void 0:e.droppable)?r:t.droppable}}(r,b),w=d.indexOf(c),x=Object(i.useMemo)(()=>({sortable:{containerId:p,index:w,items:d},...o}),[p,o,w,d]),j=Object(i.useMemo)(()=>d.slice(d.indexOf(c)),[d,c]),{rect:k,node:E,isOver:C,setNodeRef:S}=function(e){let{data:t,disabled:n=!1,id:r,resizeObserverConfig:o}=e;const a=Nt("Droppable"),{active:c,dispatch:l,over:s,measureDroppableContainers:u}=Object(i.useContext)(mr),d=Object(i.useRef)({disabled:n}),p=Object(i.useRef)(!1),f=Object(i.useRef)(null),b=Object(i.useRef)(null),{disabled:g,updateMeasurementsFor:h,timeout:m}={...Sr,...o},v=Mt(null!=h?h:r),y=or({callback:Object(i.useCallback)(()=>{p.current?(null!=b.current&&clearTimeout(b.current),b.current=setTimeout(()=>{u(Array.isArray(v.current)?v.current:[v.current]),b.current=null},m)):p.current=!0},[m]),disabled:g||!c}),O=Object(i.useCallback)((e,t)=>{y&&(t&&(y.unobserve(t),p.current=!1),e&&y.observe(e))},[y]),[w,x]=Tt(O),j=Mt(t);return Object(i.useEffect)(()=>{y&&w.current&&(y.disconnect(),p.current=!1,y.observe(w.current))},[w,y]),Rt(()=>(l({type:Qt.RegisterDroppable,element:{id:r,key:a,disabled:n,node:w,rect:f,data:j}}),()=>l({type:Qt.UnregisterDroppable,key:a,id:r})),[r]),Object(i.useEffect)(()=>{n!==d.current.disabled&&(l({type:Qt.SetDroppableDisabled,id:r,key:a,disabled:n}),d.current.disabled=n)},[r,a,n,l]),{active:c,rect:f,isOver:(null==s?void 0:s.id)===r,node:w,over:s,setNodeRef:x}}({id:c,data:x,disabled:O.droppable,resizeObserverConfig:{updateMeasurementsFor:j,...s}}),{active:_,activatorEvent:R,activeNodeRect:D,attributes:M,setNodeRef:A,listeners:T,isDragging:P,over:I,setActivatorNodeRef:N,transform:L}=function(e){let{id:t,data:n,disabled:r=!1,attributes:o}=e;const a=Nt("Droppable"),{activators:c,activatorEvent:l,active:s,activeNodeRect:u,ariaDescribedById:d,draggableNodes:p,over:f}=Object(i.useContext)(mr),{role:b=Cr,roleDescription:g="draggable",tabIndex:h=0}=null!=o?o:{},m=(null==s?void 0:s.id)===t,v=Object(i.useContext)(m?xr:Er),[y,O]=Tt(),[w,x]=Tt(),j=function(e,t){return Object(i.useMemo)(()=>e.reduce((e,n)=>{let{eventName:r,handler:o}=n;return e[r]=e=>{o(e,t)},e},{}),[e,t])}(c,t),k=Mt(n);return Rt(()=>(p.set(t,{id:t,key:a,node:y,activatorNode:w,data:k}),()=>{const e=p.get(t);e&&e.key===a&&p.delete(t)}),[p,t]),{active:s,activatorEvent:l,activeNodeRect:u,attributes:Object(i.useMemo)(()=>({role:b,tabIndex:h,"aria-disabled":r,"aria-pressed":!(!m||b!==Cr)||void 0,"aria-roledescription":g,"aria-describedby":d.draggable}),[r,b,h,m,g,d.draggable]),isDragging:m,listeners:r?void 0:j,node:y,over:f,setNodeRef:O,setActivatorNodeRef:x,transform:v}}({id:c,data:x,attributes:{...Br,...n},disabled:O.draggable}),$=function(...e){return Object(i.useMemo)(()=>t=>{e.forEach(e=>e(t))},e)}(S,A),z=Boolean(_),F=z&&!g&&Mr(f)&&Mr(m),B=!v&&P,U=B&&F?L:null,V=F?null!=U?U:(null!=l?l:y)({rects:h,activeNodeRect:D,activeIndex:f,overIndex:m,index:w}):null,q=Mr(f)&&Mr(m)?a({id:c,items:d,activeIndex:f,overIndex:m}):w,G=null==_?void 0:_.id,H=Object(i.useRef)({activeId:G,items:d,newIndex:q,containerId:p}),W=d!==H.current.items,X=t({active:_,containerId:p,isDragging:P,isSorting:z,id:c,index:w,items:d,newIndex:H.current.newIndex,previousItems:H.current.items,previousContainerId:H.current.containerId,transition:u,wasDragging:null!=H.current.activeId}),Y=function(e){let{disabled:t,index:n,node:r,rect:o}=e;const[a,c]=Object(i.useState)(null),l=Object(i.useRef)(n);return Rt(()=>{if(!t&&n!==l.current&&r.current){const e=o.current;if(e){const t=bn(r.current,{ignoreTransform:!0}),n={x:e.left-t.left,y:e.top-t.top,scaleX:e.width/t.width,scaleY:e.height/t.height};(n.x||n.y)&&c(n)}}n!==l.current&&(l.current=n)},[t,n,r,o]),Object(i.useEffect)(()=>{a&&requestAnimationFrame(()=>{c(null)})},[a]),a}({disabled:!X,index:w,node:E,rect:k});return Object(i.useEffect)(()=>{z&&H.current.newIndex!==q&&(H.current.newIndex=q),p!==H.current.containerId&&(H.current.containerId=p),d!==H.current.items&&(H.current.items=d)},[z,q,p,d]),Object(i.useEffect)(()=>{if(G===H.current.activeId)return;if(G&&!H.current.activeId)return void(H.current.activeId=G);const e=setTimeout(()=>{H.current.activeId=G},50);return()=>clearTimeout(e)},[G]),{active:_,activeIndex:f,attributes:M,data:x,rect:k,index:w,newIndex:q,items:d,isOver:C,isSorting:z,isDragging:P,listeners:T,node:E,overIndex:m,over:I,setNodeRef:$,setActivatorNodeRef:N,setDroppableNodeRef:S,setDraggableNodeRef:A,transform:null!=Y?Y:V,transition:Y||W&&H.current.newIndex===w?Fr:B&&!Ft(R)||!u?void 0:z||X?Ut.Transition.toString({...u,property:"transform"}):void 0}}In.Down,In.Right,In.Up,In.Left;const Vr=e=>{let{children:t,id:n}=e;const{attributes:o,listeners:i,transform:c,transition:l,setNodeRef:s}=Ur({id:n}),u={transform:Ut.Transform.toString(c),transition:l};return Object(r.createElement)("tr",{ref:s,style:u},Object(r.createElement)(r.Fragment,null,Object(r.createElement)("td",{style:{width:"1%"}},Object(r.createElement)(vt,a()({icon:Ot,size:14,className:"sortable-table__handle"},o,i))),t))},qr=Ne.table`
|
|
background: #fff;
|
|
border: 0;
|
|
border-radius: 3px;
|
|
box-shadow: 0 0 0 1px rgb( 0 0 0 / 10% );
|
|
border-spacing: 0;
|
|
width: 100%;
|
|
clear: both;
|
|
margin: 0;
|
|
font-size: 14px;
|
|
|
|
.align-left {
|
|
text-align: left;
|
|
.components-flex {
|
|
justify-content: flex-start;
|
|
gap: 0;
|
|
}
|
|
}
|
|
.align-right {
|
|
text-align: right;
|
|
.components-flex {
|
|
justify-content: flex-end;
|
|
gap: 0;
|
|
}
|
|
}
|
|
.align-center {
|
|
text-align: center;
|
|
> * {
|
|
margin: 0 auto;
|
|
}
|
|
.components-flex {
|
|
display: block;
|
|
}
|
|
}
|
|
|
|
.sortable-table__handle {
|
|
cursor: move;
|
|
}
|
|
|
|
th {
|
|
position: relative;
|
|
color: #2c3338;
|
|
text-align: left;
|
|
vertical-align: middle;
|
|
vertical-align: top;
|
|
word-wrap: break-word;
|
|
}
|
|
|
|
tbody {
|
|
td {
|
|
vertical-align: top;
|
|
margin-bottom: 9px;
|
|
}
|
|
}
|
|
|
|
tfoot {
|
|
td {
|
|
text-align: left;
|
|
vertical-align: middle;
|
|
}
|
|
}
|
|
|
|
thead,
|
|
tfoot,
|
|
tbody {
|
|
td,
|
|
th {
|
|
border-top: 1px solid rgb( 0 0 0 / 10% );
|
|
border-bottom: 1px solid rgb( 0 0 0 / 10% );
|
|
padding: 16px 0 16px 24px;
|
|
line-height: 1.5;
|
|
|
|
&:last-child {
|
|
padding-right: 24px;
|
|
}
|
|
|
|
> svg,
|
|
> .components-base-control {
|
|
margin: 3px 0;
|
|
}
|
|
}
|
|
}
|
|
|
|
thead th {
|
|
border-top: 0;
|
|
}
|
|
|
|
tfoot td {
|
|
border-bottom: 0;
|
|
}
|
|
`,Gr=e=>{let{columns:t,data:n,setData:o,className:c,footerContent:l,placeholder:s}=e;const u=Object(r.useMemo)(()=>n.map(e=>{let{id:t}=e;return t}),[n]),d=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Object(i.useMemo)(()=>[...t].filter(e=>null!=e),[...t])}(tn(Xn,{}),tn(Kn,{}),tn(Fn,{})),p=(e,t)=>{const n=(null==e?void 0:e.align)||"left",r=(null==e?void 0:e.width)||"auto";return{className:`${t}-${e.name} align-${n}`,style:{width:r}}};return Object(r.createElement)(kr,{sensors:d,onDragEnd:function(e){const{active:t,over:r}=e;if(null!==t&&null!==r&&(null==t?void 0:t.id)!==(null==r?void 0:r.id)){const e=Rr(n,u.indexOf(t.id),u.indexOf(r.id));o(e)}},collisionDetection:cn,modifiers:[_r]},Object(r.createElement)(qr,{className:c+" sortable-table"},Object(r.createElement)("thead",null,Object(r.createElement)("tr",null,t.map((e,t)=>Object(r.createElement)("th",a()({key:e.name},p(e,"sortable-table__column"),{colSpan:0===t?2:1}),e.label)))),l&&Object(r.createElement)("tfoot",null,Object(r.createElement)("tr",null,Object(r.createElement)("td",{colSpan:t.length+1},Object(r.createElement)(l,null)))),Object(r.createElement)("tbody",null,Object(r.createElement)(Nr,{items:u,strategy:Pr},n.length?n.map(e=>e&&Object(r.createElement)(Vr,{key:e.id,id:e.id,className:c},t.map(t=>{return Object(r.createElement)("td",a()({key:`${e.id}-${t.name}`},p(t,"sortable-table__column")),t.renderCallback?t.renderCallback(e):Object(r.createElement)(r.Fragment,null,(n=e,o=t.name,rt(n)&&o in n&&e[t.name])));var n,o}))):Object(r.createElement)("tr",null,Object(r.createElement)("td",{colSpan:t.length+1},s))))))},Hr=Ne(Ve.Modal)`
|
|
max-width: 600px;
|
|
border-radius: 4px;
|
|
@media ( min-width: 600px ) {
|
|
min-width: 560px;
|
|
}
|
|
|
|
.components-modal__header {
|
|
padding: 12px 24px;
|
|
border-bottom: 1px solid #e0e0e0;
|
|
position: relative;
|
|
height: auto;
|
|
width: auto;
|
|
margin: 0 -24px 16px;
|
|
|
|
@media ( max-width: 599px ) {
|
|
button {
|
|
display: none;
|
|
}
|
|
}
|
|
}
|
|
|
|
.components-modal__content {
|
|
margin: 0;
|
|
padding: 0 24px;
|
|
|
|
@media ( max-width: 599px ) {
|
|
display: flex;
|
|
flex-direction: column;
|
|
|
|
hr:last-of-type {
|
|
margin-top: auto;
|
|
}
|
|
}
|
|
|
|
.components-base-control {
|
|
label {
|
|
margin-top: 8px;
|
|
text-transform: none !important;
|
|
}
|
|
}
|
|
}
|
|
`,Wr=Ne.div`
|
|
display: flex;
|
|
justify-content: flex-end;
|
|
border-top: 1px solid #e0e0e0;
|
|
margin: 24px -24px 0;
|
|
padding: 24px;
|
|
|
|
> * {
|
|
&:not( :first-of-type ) {
|
|
margin-left: 8px;
|
|
}
|
|
}
|
|
|
|
.button-link-delete {
|
|
margin-right: auto;
|
|
color: #d63638;
|
|
}
|
|
`;var Xr=e=>{let{children:t,actions:n,title:o,onRequestClose:i,...c}=e;return Object(r.createElement)(Hr,a()({title:o,onRequestClose:i},c),t,Object(r.createElement)(Wr,null,n))},Yr=e=>{let{formRef:t,values:n,setValues:o}=e;const{country:a,state:i}=n.address,c=e=>t=>{o(n=>({...n,[e]:t}))},l=e=>t=>{o(n=>({...n,address:{...n.address,[e]:t}}))},s=ut[a]&&Object.keys(ut[a]).length>0;return Object(r.createElement)("form",{ref:t},Object(r.createElement)(Ve.TextControl,{label:Object(Le.__)("Location name","woocommerce"),name:"location_name",value:n.name,onChange:c("name"),autoComplete:"off",required:!0,onInvalid:e=>{e.target.setCustomValidity(Object(Le.__)("A Location title is required","woocommerce"))},onInput:e=>{e.target.setCustomValidity("")}}),Object(r.createElement)(Ve.TextControl,{label:Object(Le.__)("Address","woocommerce"),name:"location_address",placeholder:Object(Le.__)("Address","woocommerce"),value:n.address.address_1,onChange:l("address_1"),autoComplete:"off"}),Object(r.createElement)(Ve.TextControl,{label:Object(Le.__)("City","woocommerce"),name:"location_city",hideLabelFromVision:!0,placeholder:Object(Le.__)("City","woocommerce"),value:n.address.city,onChange:l("city"),autoComplete:"off"}),Object(r.createElement)(Ve.TextControl,{label:Object(Le.__)("Postcode / ZIP","woocommerce"),name:"location_postcode",hideLabelFromVision:!0,placeholder:Object(Le.__)("Postcode / ZIP","woocommerce"),value:n.address.postcode,onChange:l("postcode"),autoComplete:"off"}),!s&&Object(r.createElement)(Ve.TextControl,{placeholder:Object(Le.__)("State","woocommerce"),value:i,onChange:l("state")}),Object(r.createElement)(Ve.SelectControl,{name:"location_country_state",label:Object(Le.__)("Country / State","woocommerce"),hideLabelFromVision:!0,placeholder:Object(Le.__)("Country / State","woocommerce"),value:!i&&s?`${a}:${Object.keys(ut[a])[0]}`:`${a}${i&&null!==(u=ut[a])&&void 0!==u&&u[i]?":"+i:""}`,onChange:e=>{const[t,n=""]=e.split(":");l("country")(t),l("state")(n)}},dt.options.map(e=>e.label?Object(r.createElement)("optgroup",{key:e.label,label:e.label},e.options.map(e=>Object(r.createElement)("option",{key:e.value,value:e.value},e.label))):Object(r.createElement)("option",{key:e.options[0].value,value:e.options[0].value},e.options[0].label))),Object(r.createElement)(Ve.TextControl,{label:Object(Le.__)("Pickup details","woocommerce"),name:"pickup_details",value:n.details,onChange:c("details"),autoComplete:"off"}));var u},Kr=e=>{let{locationData:t,editingLocation:n,onClose:o,onSave:a,onDelete:i}=e;const c=Object(r.useRef)(null),[l,s]=Object(r.useState)(t);return t?Object(r.createElement)(Xr,{onRequestClose:o,title:"new"===n?Object(Le.__)("Pickup location","woocommerce"):Object(Le.__)("Edit pickup location","woocommerce"),actions:Object(r.createElement)(r.Fragment,null,"new"!==n&&Object(r.createElement)(Ve.Button,{variant:"link",className:"button-link-delete",onClick:()=>{i(),o()}},Object(Le.__)("Delete location","woocommerce")),Object(r.createElement)(Ve.Button,{variant:"secondary",onClick:o},Object(Le.__)("Cancel","woocommerce")),Object(r.createElement)(Ve.Button,{variant:"primary",onClick:()=>{(null==c?void 0:c.current).reportValidity()&&(a(l),o())}},Object(Le.__)("Done","woocommerce")))},Object(r.createElement)(Yr,{formRef:c,values:l,setValues:s})):null};const Jr=()=>Object(r.createElement)(r.Fragment,null,Object(r.createElement)("h2",null,Object(Le.__)("Pickup locations","woocommerce")),Object(r.createElement)("p",null,Object(Le.__)("Define pickup locations for your customers to choose from during checkout.","woocommerce")),Object(r.createElement)(Ve.ExternalLink,{href:"https://woocommerce.com/document/local-pickup/"},Object(Le.__)("Learn more","woocommerce"))),Zr=Ne.address`
|
|
color: #757575;
|
|
font-style: normal;
|
|
display: inline;
|
|
margin-left: 12px;
|
|
`;var Qr=()=>{const{pickupLocations:e,setPickupLocations:t,toggleLocation:n,updateLocation:o,readOnlySettings:a}=ft(),[i,c]=Object(r.useState)(""),l=[{name:"name",label:Object(Le.__)("Pickup location","woocommerce"),width:"50%",renderCallback:e=>Object(r.createElement)(r.Fragment,null,e.name,Object(r.createElement)(Zr,null,(e=>{var t;const n=rt(e)&&{...e,country:"string"==typeof e.country&&st[e.country],state:"string"==typeof e.country&&"string"==typeof e.state&&null!==(t=ut[e.country])&&void 0!==t&&t[e.state]?ut[e.country][e.state]:e.state};return Object.values(n).filter(e=>""!==e).join(", ")})(e.address)))},{name:"enabled",label:Object(Le.__)("Enabled","woocommerce"),align:"right",renderCallback:e=>{return Object(r.createElement)(Ve.ToggleControl,{checked:(t=e.enabled,"boolean"==typeof t&&e.enabled),onChange:()=>n(e.id)});var t}},{name:"edit",label:"",align:"center",width:"1%",renderCallback:e=>Object(r.createElement)("button",{type:"button",className:"button-link-edit button-link",onClick:()=>{c(e.id)}},Object(Le.__)("Edit","woocommerce"))}];return Object(r.createElement)(We,{Description:Jr},Object(r.createElement)(Gr,{className:"pickup-locations",columns:l,data:e,setData:e=>{t(e)},placeholder:Object(Le.__)("When you add a pickup location, it will appear here.","woocommerce"),footerContent:()=>Object(r.createElement)(Ve.Button,{variant:"secondary",onClick:()=>{c("new")}},Object(Le.__)("Add pickup location","woocommerce"))}),i&&Object(r.createElement)(Kr,{locationData:"new"===i?{name:"",details:"",enabled:!0,address:{address_1:"",city:"",state:a.storeState,postcode:"",country:a.storeCountry}}:e.find(e=>{let{id:t}=e;return t===i})||null,editingLocation:i,onSave:e=>{o(i,e)},onClose:()=>c(""),onDelete:()=>{o(i,null),c("")}}))};const eo=Ne(We)`
|
|
text-align: right;
|
|
padding-top: 0;
|
|
margin-top: 0;
|
|
`;var to=()=>{const{isSaving:e,save:t}=ft();return Object(r.createElement)(eo,{className:"submit"},Object(r.createElement)(Ve.Button,{variant:"primary",isBusy:e,disabled:e,onClick:e=>{var n;e.preventDefault();const r=e.target;null!=r&&null!==(n=r.form)&&void 0!==n&&n.reportValidity()&&t()},type:"submit"},Object(Le.__)("Save changes","woocommerce")))};const no=Ne.form`
|
|
margin: 48px auto 0;
|
|
max-width: 1032px;
|
|
display: flex;
|
|
flex-flow: column;
|
|
|
|
@media ( min-width: 960px ) {
|
|
padding: 0 56px;
|
|
}
|
|
`;const ro=document.getElementById("wc-shipping-method-pickup-location-settings-container");ro&&Object(r.render)(Object(r.createElement)(()=>Object(r.createElement)(no,{id:"local-pickup-settings"},Object(r.createElement)(bt,null,Object(r.createElement)(mt,null),Object(r.createElement)(Qr,null),Object(r.createElement)(to,null))),null),ro)}]); |