Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-time-picker-ios-like-v2

Package Overview
Dependencies
Maintainers
1
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-time-picker-ios-like-v2 - npm Package Compare versions

Comparing version 0.0.1 to 0.0.2

2

dist/TimePicker.js

@@ -1,1 +0,1 @@

!function(){var e={346:function(e,t,n){"use strict";var r=n(81),o=n.n(r),i=n(645),a=n.n(i)()(o());a.push([e.id,".react-ios-time-picker {\n margin-bottom: 50px;\n border-radius: 12px;\n overflow: hidden; \n box-shadow: 0 11px 15px #0005;\n}\n\n.react-ios-time-picker-transition {\n animation: fade-in 150ms ease-out;\n}\n\n@keyframes fade-in {\n 0% {\n transform: translateY(150px);\n opacity: 0;\n }\n 100% {\n transform: translateY(0);\n opacity: 1;\n }\n}\n\n.react-ios-time-picker-container {\n display: flex;\n justify-content: center;\n position: relative;\n background-color: #1d1d1d;\n width: 220px;\n overflow: hidden;\n /* border-radius: 0 0 15px 17px; */\n padding: 20px 0;\n /* box-shadow: inset 0px 0px 5px 0px rgba(255, 159, 10, 0.5); */\n /* box-shadow: 0 11px 15px -7px rgb(0 0 0 / 20%),\n 0 24px 38px 3px rgb(0 0 0 / 14%), 0 9px 46px 8px rgb(0 0 0 / 12%); */\n}\n\n.react-ios-time-picker-hour {\n position: relative;\n width: 50px;\n overflow: hidden;\n z-index: 100;\n margin-right: 5px;\n}\n\n.react-ios-time-picker-minute {\n position: relative;\n width: 50px;\n overflow: hidden;\n z-index: 100;\n margin-left: 5px;\n}\n\n.react-ios-time-picker-hour-format {\n position: relative;\n width: 40px;\n overflow: hidden;\n z-index: 100;\n}\n\n.react-ios-time-picker-fast {\n transition: transform 700ms cubic-bezier(0.13, 0.67, 0.01, 0.94);\n}\n\n.react-ios-time-picker-slow {\n transition: transform 600ms cubic-bezier(0.13, 0.67, 0.01, 0.94);\n}\n\n.react-ios-time-picker-selected-overlay {\n position: absolute;\n border-radius: 6px;\n background-color: #2c2c2f;\n pointer-events: none;\n margin: 0 10px;\n left: 0;\n right: 0;\n z-index: 1;\n /* box-shadow: inset 0px 0px 2px 0px rgba(255, 159, 10, 0.3); */\n}\n\n.react-ios-time-picker-top-shadow {\n position: absolute;\n top: 0;\n width: 100%;\n background: #0009;\n background: linear-gradient(180deg, #0009 0%, #1c1c1c 100%);\n}\n\n.react-ios-time-picker-bottom-shadow {\n position: absolute;\n bottom: 0;\n width: 100%;\n background: #0009;\n background: linear-gradient(0deg, #0009 0%, hsla(0, 0%, 11%, 1) 100%);\n}\n\n.react-ios-time-picker-cell-hour {\n width: 100%;\n text-align: center;\n display: flex;\n justify-content: end;\n align-items: center;\n user-select: none;\n transition: all 100ms linear;\n}\n.react-ios-time-picker-cell-minute {\n width: 100%;\n text-align: center;\n display: flex;\n justify-content: start;\n align-items: center;\n user-select: none;\n transition: all 100ms linear;\n}\n.react-ios-time-picker-cell-hour-format {\n width: 100%;\n text-align: center;\n display: flex;\n justify-content: end;\n align-items: center;\n user-select: none;\n transition: all 100ms linear;\n}\n\n.react-ios-time-picker-cell-inner-hour {\n width: fit-content;\n height: 100%;\n transition: all 100ms linear;\n cursor: pointer;\n border-radius: 7px;\n line-height: 35px;\n text-align: center;\n display: flex;\n justify-content: end;\n align-items: center;\n font-size: 14px;\n color: #666;\n padding: 0 10px;\n}\n\n.react-ios-time-picker-cell-inner-hour-format {\n width: fit-content;\n height: 100%;\n transition: all 100ms linear;\n cursor: pointer;\n border-radius: 7px;\n line-height: 35px;\n text-align: center;\n display: flex;\n justify-content: end;\n align-items: center;\n font-size: 14px;\n color: #6a6a6b;\n padding: 0 10px;\n}\n\n.react-ios-time-picker-cell-inner-minute {\n width: fit-content;\n height: 100%;\n transition: all 100ms linear;\n cursor: pointer;\n border-radius: 7px;\n line-height: 35px;\n text-align: center;\n display: flex;\n justify-content: start;\n align-items: center;\n font-size: 14px;\n color: #6a6a6b;\n padding: 0 10px;\n}\n\n.react-ios-time-picker-cell-inner-hour:hover,\n.react-ios-time-picker-cell-inner-minute:hover,\n.react-ios-time-picker-cell-inner-hour-format:hover {\n background-color: #ff9d0ac9;\n color: white;\n}\n\n.react-ios-time-picker-cell-inner-selected {\n /* font-weight: 500; */\n color: #f7f7f7;\n font-size: 16px;\n}\n\n.react-ios-time-picker-cell-inner-hour-format-selected {\n font-weight: 400;\n color: #f7f7f7;\n}\n\n.react-ios-time-picker-btn-container {\n position: relative;\n display: flex;\n justify-content: space-between;\n background-color: #292929;\n border-bottom: 1px solid #333;\n z-index: 100;\n}\n\n.react-ios-time-picker-btn {\n padding: 10px 15px;\n font-size: 13px;\n color: #fe9f06;\n transition: all 150ms linear;\n font-weight: 500;\n z-index: 1;\n}\n\n.react-ios-time-picker-btn:hover {\n opacity: 0.6;\n}\n\n.react-ios-time-picker-btn-cancel {\n font-size: 12px;\n font-weight: 300;\n}\n\n.react-ios-time-picker-popup {\n position: fixed;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n display: flex;\n justify-content: center;\n align-items: flex-end;\n z-index: 99998;\n}\n\n.react-ios-time-picker-popup-overlay {\n position: fixed;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n}\n\n.react-ios-time-picker-input {\n cursor: text;\n padding: 5px 10px;\n border-radius: 5px;\n border: 1px solid #0005;\n}\n\n.react-ios-time-picker-colon {\n display: flex;\n justify-content: center;\n align-items: center;\n height: 100%;\n color: #f7f7f7;\n position: relative;\n z-index: 100;\n font-weight: 600;\n}\n\n.react-ios-time-picker-cell-inner-hidden {\n opacity: 0;\n visibility: hidden;\n pointer-events: none;\n}\n\n.react-ios-time-picker-hour-format-transition {\n transition: transform 100ms ease-out;\n}\n",""]),t.Z=a},645:function(e){"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n="",r=void 0!==t[5];return t[4]&&(n+="@supports (".concat(t[4],") {")),t[2]&&(n+="@media ".concat(t[2]," {")),r&&(n+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),n+=e(t),r&&(n+="}"),t[2]&&(n+="}"),t[4]&&(n+="}"),n})).join("")},t.i=function(e,n,r,o,i){"string"==typeof e&&(e=[[null,e,void 0]]);var a={};if(r)for(var c=0;c<this.length;c++){var u=this[c][0];null!=u&&(a[u]=!0)}for(var l=0;l<e.length;l++){var s=[].concat(e[l]);r&&a[s[0]]||(void 0!==i&&(void 0===s[5]||(s[1]="@layer".concat(s[5].length>0?" ".concat(s[5]):""," {").concat(s[1],"}")),s[5]=i),n&&(s[2]?(s[1]="@media ".concat(s[2]," {").concat(s[1],"}"),s[2]=n):s[2]=n),o&&(s[4]?(s[1]="@supports (".concat(s[4],") {").concat(s[1],"}"),s[4]=o):s[4]="".concat(o)),t.push(s))}},t}},81:function(e){"use strict";e.exports=function(e){return e[1]}},703:function(e,t,n){"use strict";var r=n(414);function o(){}function i(){}i.resetWarningCache=o,e.exports=function(){function e(e,t,n,o,i,a){if(a!==r){var c=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw c.name="Invariant Violation",c}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:i,resetWarningCache:o};return n.PropTypes=n,n}},697:function(e,t,n){e.exports=n(703)()},414:function(e){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},379:function(e){"use strict";var t=[];function n(e){for(var n=-1,r=0;r<t.length;r++)if(t[r].identifier===e){n=r;break}return n}function r(e,r){for(var i={},a=[],c=0;c<e.length;c++){var u=e[c],l=r.base?u[0]+r.base:u[0],s=i[l]||0,f="".concat(l," ").concat(s);i[l]=s+1;var p=n(f),d={css:u[1],media:u[2],sourceMap:u[3],supports:u[4],layer:u[5]};if(-1!==p)t[p].references++,t[p].updater(d);else{var m=o(d,r);r.byIndex=c,t.splice(c,0,{identifier:f,updater:m,references:1})}a.push(f)}return a}function o(e,t){var n=t.domAPI(t);return n.update(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap&&t.supports===e.supports&&t.layer===e.layer)return;n.update(e=t)}else n.remove()}}e.exports=function(e,o){var i=r(e=e||[],o=o||{});return function(e){e=e||[];for(var a=0;a<i.length;a++){var c=n(i[a]);t[c].references--}for(var u=r(e,o),l=0;l<i.length;l++){var s=n(i[l]);0===t[s].references&&(t[s].updater(),t.splice(s,1))}i=u}}},569:function(e){"use strict";var t={};e.exports=function(e,n){var r=function(e){if(void 0===t[e]){var n=document.querySelector(e);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}t[e]=n}return t[e]}(e);if(!r)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");r.appendChild(n)}},216:function(e){"use strict";e.exports=function(e){var t=document.createElement("style");return e.setAttributes(t,e.attributes),e.insert(t,e.options),t}},565:function(e,t,n){"use strict";e.exports=function(e){var t=n.nc;t&&e.setAttribute("nonce",t)}},795:function(e){"use strict";e.exports=function(e){var t=e.insertStyleElement(e);return{update:function(n){!function(e,t,n){var r="";n.supports&&(r+="@supports (".concat(n.supports,") {")),n.media&&(r+="@media ".concat(n.media," {"));var o=void 0!==n.layer;o&&(r+="@layer".concat(n.layer.length>0?" ".concat(n.layer):""," {")),r+=n.css,o&&(r+="}"),n.media&&(r+="}"),n.supports&&(r+="}");var i=n.sourceMap;i&&"undefined"!=typeof btoa&&(r+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(i))))," */")),t.styleTagTransform(r,e,t.options)}(t,e,n)},remove:function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(t)}}}},589:function(e){"use strict";e.exports=function(e,t){if(t.styleSheet)t.styleSheet.cssText=e;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(e))}}}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var i=t[r]={id:r,exports:{}};return e[r](i,i.exports,n),i.exports}n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,{a:t}),t},n.d=function(e,t){for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.nc=void 0;var r={};!function(){"use strict";n.r(r),n.d(r,{TimePicker:function(){return ce}});var e=require("react"),t=n.n(e),o=require("react-dom"),i=n.n(o),a=n(697),c=n.n(a),u=!("undefined"==typeof window||!window.document||!window.document.createElement),l=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function f(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}var p=function(e){function t(){return s(this,t),f(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),l(t,[{key:"componentWillUnmount",value:function(){this.defaultNode&&document.body.removeChild(this.defaultNode),this.defaultNode=null}},{key:"render",value:function(){return u?(this.props.node||this.defaultNode||(this.defaultNode=document.createElement("div"),document.body.appendChild(this.defaultNode)),i().createPortal(this.props.children,this.props.node||this.defaultNode)):null}}]),t}(t().Component);p.propTypes={children:c().node.isRequired,node:c().any};var d=p,m=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function h(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function y(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}var v=function(e){function n(){return h(this,n),y(this,(n.__proto__||Object.getPrototypeOf(n)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(n,e),m(n,[{key:"componentDidMount",value:function(){this.renderPortal()}},{key:"componentDidUpdate",value:function(e){this.renderPortal()}},{key:"componentWillUnmount",value:function(){i().unmountComponentAtNode(this.defaultNode||this.props.node),this.defaultNode&&document.body.removeChild(this.defaultNode),this.defaultNode=null,this.portal=null}},{key:"renderPortal",value:function(e){this.props.node||this.defaultNode||(this.defaultNode=document.createElement("div"),document.body.appendChild(this.defaultNode));var n=this.props.children;"function"==typeof this.props.children.type&&(n=t().cloneElement(this.props.children)),this.portal=i().unstable_renderSubtreeIntoContainer(this,n,this.props.node||this.defaultNode)}},{key:"render",value:function(){return null}}]),n}(t().Component),b=v;v.propTypes={children:c().node.isRequired,node:c().any};var g=i().createPortal?d:b;function w(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function x(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?w(Object(n),!0).forEach((function(t){S(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):w(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function S(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function O(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,c=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){c=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(c)throw o}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return k(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?k(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function k(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var j=function(n){var r=n.height,o=(n.value,n.setValue,n.onAmPmChange,n.setHourFormat),i=n.hourFormat,a=[{number:"AM",translatedValue:(2*r).toString(),selected:!1},{number:"PM",translatedValue:r.toString(),selected:!1}],c=O((0,e.useState)([{number:"AM",translatedValue:(2*r).toString(),selected:"AM"===i.hourFormat},{number:"PM",translatedValue:r.toString(),selected:"PM"===i.hourFormat}]),2),u=c[0],l=c[1],s=(0,e.useRef)(null),f=O((0,e.useState)(null),2),p=f[0],d=f[1],m=O((0,e.useState)(null),2),h=m[0],y=m[1],v=O((0,e.useState)(parseInt(u.filter((function(e){return!0===e.selected}))[0].translatedValue)),2),b=v[0],g=v[1],w=O((0,e.useState)(!1),2),S=w[0],k=w[1],j=O((0,e.useState)(!1),2),E=j[0],P=j[1],T=O((0,e.useState)(null),2),N=T[0],M=T[1],C=O((0,e.useState)(null),2),A=C[0],V=C[1],I=O((0,e.useState)(null),2),Y=(I[0],I[1]),_=O((0,e.useState)(null),2),D=(_[0],_[1]),F=O((0,e.useState)(null),2),z=(F[0],F[1]),U=O((0,e.useState)(null),2),R=(U[0],U[1]),H=function(e){k(!1),g((function(e){return e+p})),P(!0),V(performance.now()),performance.now()-N<=100?D("fast"):D("slow"),z(p<0?"down":"up")};(0,e.useEffect)((function(){S&&(s.current.style.transform="translateY(".concat(b+p,"px)"))}),[p]),(0,e.useEffect)((function(){if(E){Y(A-N);var e=Math.round(b/r)*r;e<r&&(e=r),e>2*r&&(e=2*r),s.current.style.transform="translateY(".concat(e,"px)"),g(e),d(0)}}),[E]);var q=function(e){0===p&&g(parseInt(e.target.dataset.translatedValue))};return t().createElement("div",{className:"react-ios-time-picker-hour-format",onMouseDown:function(e){P(!1),y(e.clientY),k(!0),M(performance.now())},onMouseUp:H,onMouseMove:function(e){d(S?e.clientY-h:0)},onMouseLeave:function(e){k(!1),g((function(e){return e+p})),P(!0),V(performance.now()),z(p<0?"down":"up")},style:{height:5*r},onWheel:function(e){e.deltaY>0?b<=r&&g((function(e){return e+r})):b>=2*r&&g((function(e){return e-r}))},onTouchStart:function(e){P(!1),y(e.targetTouches[0].clientY),k(!0),M(performance.now())},onTouchMove:function(e){d(S?e.targetTouches[0].clientY-h:0)},onTouchEnd:H},t().createElement("div",{ref:s,className:"".concat(E&&"react-ios-time-picker-hour-format-transition"),onTransitionEnd:function(e){"transform"===e.propertyName&&[{number:"AM",translatedValue:(2*r).toString(),arrayNumber:0},{number:"PM",translatedValue:r.toString(),arrayNumber:1}].map((function(e){parseInt(e.translatedValue)===b&&(R(e.arrayNumber),o({mount:!0,hourFormat:e.number}),l((function(){return a.map((function(t){return t.number==e.number&&t.translatedValue==b?x(x({},t),{},{selected:!0}):t}))})))}))},style:{transform:"translateY(".concat(b,"px)")}},u.map((function(e,n){return t().createElement("div",{key:n,className:"react-ios-time-picker-cell-hour",style:{height:"".concat(r,"px")}},t().createElement("div",{className:"react-ios-time-picker-cell-inner-hour-format".concat(e.selected?" react-ios-time-picker-cell-inner-hour-format-selected":""),onClick:q,"data-translated-value":e.translatedValue},e.number))}))))},E=function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:54,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:24,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=[{number:"00",translatedValue:(2*e).toString(),selected:!1},{number:"01",translatedValue:e.toString(),selected:!1}],i=[{number:"00",translatedValue:e.toString(),selected:!1,hidden:!0},{number:"01",translatedValue:e.toString(),selected:!1}],a=13===t?i:o,c=0,u=0;u<3;u++)for(var l=0;l<t;l++){if(!1!==r){var s=1===l.toString().length?"0".concat(l):l.toString();if(!r.includes(s))continue}0===u&&l<2||13===t&&0===l||(1!==u||l!==n?(1===l.toString().length?a.push({number:"0".concat(l.toString()),translatedValue:"-".concat(c),selected:!1}):a.push({number:l.toString(),translatedValue:"-".concat(c),selected:!1}),c+=e):(1===l.toString().length?a.push({number:"0".concat(l.toString()),translatedValue:"-".concat(c),selected:!0}):a.push({number:l.toString(),translatedValue:"-".concat(c),selected:!0}),c+=e))}return a},P=function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:54,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:24,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=[{number:"00",translatedValue:(2*e).toString(),arrayNumber:0},{number:"01",translatedValue:e.toString(),arrayNumber:1}],o=0,i=0;i<3;i++)for(var a=0;a<t;a++){if(!1!==n){var c=1===a.toString().length?"0".concat(a):a.toString();if(!n.includes(c))continue}0===i&&a<2||13===t&&0===a||(1===a.toString().length?r.push({number:"0".concat(a.toString()),translatedValue:"-".concat(o),selected:!1}):r.push({number:a.toString(),translatedValue:"-".concat(o),selected:!1}),o+=e)}return r};function T(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function N(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?T(Object(n),!0).forEach((function(t){M(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):T(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function M(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function C(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,c=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){c=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(c)throw o}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return A(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?A(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function A(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var V=function(n){var r=n.height,o=n.value,i=n.setValue,a=n.use12Hours,c=n.availableHours,u=a?13:24,l=C((0,e.useState)(E(r,u,parseInt(o.slice(0,2)),c)),2),s=l[0],f=l[1],p=(0,e.useRef)(null),d=C((0,e.useState)(null),2),m=d[0],h=d[1],y=C((0,e.useState)(null),2),v=y[0],b=y[1],g=C((0,e.useState)(parseInt(E(r,u,parseInt(o.slice(0,2)),c).filter((function(e){return e.number===o.slice(0,2)&&!0===e.selected}))[0].translatedValue)),2),w=g[0],x=g[1],S=C((0,e.useState)(!1),2),O=S[0],k=S[1],j=C((0,e.useState)(!1),2),T=j[0],M=j[1],A=C((0,e.useState)(null),2),V=A[0],I=A[1],Y=C((0,e.useState)(null),2),_=Y[0],D=Y[1],F=C((0,e.useState)(null),2),z=(F[0],F[1]),U=C((0,e.useState)(null),2),R=U[0],H=U[1],q=C((0,e.useState)(null),2),L=q[0],W=q[1],B=C((0,e.useState)(null),2),Z=(B[0],B[1]),$=function(e){k(!1),x((function(e){return e+m})),M(!0),D(performance.now()),performance.now()-V<=100?H("fast"):H("slow"),W(m<0?"down":"up")};(0,e.useEffect)((function(){O&&(p.current.style.transform="translateY(".concat(w+m,"px)"))}),[m]),(0,e.useEffect)((function(){if(T){if(z(_-V),_-V<=100&&0!==m){var e;"down"===L?e=w-120/(_-V)*100:"up"===L&&(e=w+120/(_-V)*100);var t=Math.round(e/r)*r;a?(t<-34*r&&(t=-34*r),t>r&&(t=r)):(t<-69*r&&(t=-69*r),t>2*r&&(t=2*r)),p.current.style.transform="translateY(".concat(t,"px)"),x(t)}if(_-V>100&&0!==m){var n=Math.round(w/r)*r;a?(n<-34*r&&(n=-34*r),n>r&&(n=r)):(n<-69*r&&(n=-69*r),n>2*r&&(n=2*r)),p.current.style.transform="translateY(".concat(n,"px)"),x(n)}h(0)}}),[T]);var J=function(e){0===m&&x(parseInt(e.target.dataset.translatedValue))},G=T&&"fast"===R,K=T&&"slow"===R;return t().createElement("div",{className:"react-ios-time-picker-hour ".concat(a&&"react-ios-time-picker-hour-12hour-format"),onMouseDown:function(e){M(!1),b(e.clientY),k(!0),I(performance.now())},onMouseUp:$,onMouseMove:function(e){h(O?e.clientY-v:0)},onMouseLeave:function(e){k(!1),x((function(e){return e+m})),M(!0),D(performance.now()),performance.now()-V<=100?H("fast"):H("slow"),W(m<0?"down":"up")},style:{height:5*r},onWheel:function(e){a?e.deltaY>0?w<r&&x((function(e){return e+r})):w>-34*r&&x((function(e){return e-r})):e.deltaY>0?w<2*r&&x((function(e){return e+r})):w>-69*r&&x((function(e){return e-r}))},onTouchStart:function(e){M(!1),b(e.targetTouches[0].clientY),k(!0),I(performance.now())},onTouchMove:function(e){h(O?e.targetTouches[0].clientY-v:0)},onTouchEnd:$},t().createElement("div",{ref:p,className:"".concat(!0===G&&"react-ios-time-picker-fast"," ").concat(!0===K&&"react-ios-time-picker-slow"),onTransitionEnd:function(e){P(r,u).map((function(e){parseInt(e.translatedValue)===w&&(Z(e.arrayNumber),i((function(t){return"".concat(e.number,":").concat(t.slice(3,6))})),f((function(){return E(r,u,null,c).map((function(t){return t.number==e.number&&t.translatedValue==w?N(N({},t),{},{selected:!0}):t}))})))}))},style:{transform:"translateY(".concat(w,"px)")}},s.map((function(e,n){return t().createElement("div",{key:n,className:"react-ios-time-picker-cell-hour",style:{height:"".concat(r,"px")}},t().createElement("div",{className:"react-ios-time-picker-cell-inner-hour".concat(e.selected?" react-ios-time-picker-cell-inner-selected":"").concat(null!=e&&e.hidden?" react-ios-time-picker-cell-inner-hidden":""),onClick:J,"data-translated-value":e.translatedValue},e.number))}))))};function I(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Y(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?I(Object(n),!0).forEach((function(t){_(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):I(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function _(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function D(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,c=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){c=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(c)throw o}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return F(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?F(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function F(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var z=function(n){var r=n.height,o=n.value,i=n.setValue,a=n.availableMinutes,c=D((0,e.useState)(E(r,60,parseInt(o.slice(3,6)),a)),2),u=c[0],l=c[1],s=(0,e.useRef)(null),f=D((0,e.useState)(null),2),p=f[0],d=f[1],m=D((0,e.useState)(null),2),h=m[0],y=m[1],v=D((0,e.useState)(parseInt(E(r,60,parseInt(o.slice(3,6)),a).filter((function(e){return e.number===o.slice(3,6)&&!0===e.selected}))[0].translatedValue)),2),b=v[0],g=v[1],w=D((0,e.useState)(!1),2),x=w[0],S=w[1],O=D((0,e.useState)(!1),2),k=O[0],j=O[1],T=D((0,e.useState)(null),2),N=T[0],M=T[1],C=D((0,e.useState)(null),2),A=C[0],V=C[1],I=D((0,e.useState)(null),2),_=(I[0],I[1]),F=D((0,e.useState)(null),2),z=F[0],U=F[1],R=D((0,e.useState)(null),2),H=R[0],q=R[1],L=D((0,e.useState)(null),2),W=(L[0],L[1]),B=function(e){S(!1),g((function(e){return e+p})),j(!0),V(performance.now()),performance.now()-N<=100?U("fast"):U("slow"),q(p<0?"down":"up")};(0,e.useEffect)((function(){x&&(s.current.style.transform="translateY(".concat(b+p,"px)"))}),[p]),(0,e.useEffect)((function(){if(k){if(_(A-N),A-N<=100&&0!==p){var e;"down"===H?e=b-120/(A-N)*100:"up"===H&&(e=b+120/(A-N)*100);var t=Math.round(e/r)*r;t<-177*r&&(t=-177*r),t>2*r&&(t=2*r),s.current.style.transform="translateY(".concat(t,"px)"),g(t)}if(A-N>100&&0!==p){var n=Math.round(b/r)*r;n<-177*r&&(n=-177*r),n>2*r&&(n=2*r),s.current.style.transform="translateY(".concat(n,"px)"),g(n)}d(0)}}),[k]);var Z=function(e){0===p&&g(parseInt(e.target.dataset.translatedValue))},$=k&&"fast"===z,J=k&&"slow"===z;return t().createElement("div",{className:"react-ios-time-picker-minute",onMouseDown:function(e){j(!1),y(e.clientY),S(!0),M(performance.now())},onMouseUp:B,onMouseMove:function(e){d(x?e.clientY-h:0)},onMouseLeave:function(e){S(!1),g((function(e){return e+p})),j(!0),V(performance.now()),performance.now()-N<=100?U("fast"):U("slow"),q(p<0?"down":"up")},style:{height:5*r},onWheel:function(e){e.deltaY>0?b<2*r&&g((function(e){return e+r})):b>-177*r&&g((function(e){return e-r}))},onTouchStart:function(e){j(!1),y(e.targetTouches[0].clientY),S(!0),M(performance.now())},onTouchMove:function(e){d(x?e.targetTouches[0].clientY-h:0)},onTouchEnd:B},t().createElement("div",{ref:s,className:"".concat(!0===$&&"react-ios-time-picker-fast"," ").concat(!0===J&&"react-ios-time-picker-slow"),onTransitionEnd:function(e){P(r,60).map((function(e){parseInt(e.translatedValue)===b&&(W(e.arrayNumber),i((function(t){return"".concat(t.slice(0,2),":").concat(e.number)})),l((function(){return E(r,60,null,a).map((function(t){return t.number==e.number&&t.translatedValue==b?Y(Y({},t),{},{selected:!0}):t}))})))}))},style:{transform:"translateY(".concat(b,"px)")}},u.map((function(e,n){return t().createElement("div",{key:n,className:"react-ios-time-picker-cell-minute",style:{height:"".concat(r,"px")}},t().createElement("div",{className:"react-ios-time-picker-cell-inner-minute".concat(e.selected?" react-ios-time-picker-cell-inner-selected":""),onClick:Z,"data-translated-value":e.translatedValue},e.number))}))))};function U(){return U=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},U.apply(this,arguments)}function R(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,c=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){c=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(c)throw o}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return H(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?H(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function H(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var q=function(n){var r=n.pickerDefaultValue,o=n.initialValue,i=n.onChange,a=n.height,c=n.onSave,u=n.onCancel,l=n.cancelButtonText,s=n.saveButtonText,f=n.controllers,p=n.setInputValue,d=n.setIsOpen,m=n.seperator,h=n.use12Hours,y=n.onAmPmChange,v=n.minOptions,b=n.hourOptions,g=h?o.slice(0,5):o,w=R((0,e.useState)(null===o?r:g),2),x=w[0],S=w[1],O=R((0,e.useState)({mount:!1,hourFormat:o.slice(6,8)}),2),k=O[0],E=O[1];(0,e.useEffect)((function(){if(!1===f){var e=h?"".concat(x," ").concat(k.hourFormat):x;p(e),i(e)}}),[x]),(0,e.useEffect)((function(){k.mount&&y(k.hourFormat)}),[k]);var P={height:a,value:x,setValue:S,controllers:f,use12Hours:h,onAmPmChange:y,setHourFormat:E,hourFormat:k,hourOptions:b,minOptions:v};return t().createElement("div",{className:"react-ios-time-picker react-ios-time-picker-transition"},f&&t().createElement("div",{className:"react-ios-time-picker-btn-container"},t().createElement("button",{className:"react-ios-time-picker-btn react-ios-time-picker-btn-cancel",onClick:function(){u(),d(!1)}},l),t().createElement("button",{className:"react-ios-time-picker-btn",onClick:function(){var e=h?"".concat(x," ").concat(k.hourFormat):x;p(e),i(e),c(e),d(!1)}},s)),t().createElement("div",{className:"react-ios-time-picker-container",style:{height:"".concat(5*a+40,"px")}},t().createElement("div",{className:"react-ios-time-picker-selected-overlay",style:{top:"".concat(2*a+20,"px"),height:"".concat(a,"px")}}),t().createElement(V,U({hourOptions:b},P)),m&&t().createElement("div",{className:"react-ios-time-picker-colon"},":"),t().createElement(z,U({minOptions:v},P)),h&&t().createElement(j,P)))},L=n(379),W=n.n(L),B=n(795),Z=n.n(B),$=n(569),J=n.n($),G=n(565),K=n.n(G),Q=n(216),X=n.n(Q),ee=n(589),te=n.n(ee),ne=n(346),re={};function oe(){return oe=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},oe.apply(this,arguments)}function ie(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,c=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){c=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(c)throw o}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return ae(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ae(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ae(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}re.styleTagTransform=te(),re.setAttributes=K(),re.insert=J().bind(null,"head"),re.domAPI=Z(),re.insertStyleElement=X(),W()(ne.Z,re),ne.Z&&ne.Z.locals&&ne.Z.locals;var ce=function(n){var r=n.value,o=void 0===r?null:r,i=n.cellHeight,a=void 0===i?28:i,c=n.placeHolder,u=void 0===c?"Select Time":c,l=n.pickerDefaultValue,s=void 0===l?"10:00":l,f=n.onChange,p=void 0===f?function(){}:f,d=n.onFocus,m=void 0===d?function(){}:d,h=n.onSave,y=void 0===h?function(){}:h,v=n.onCancel,b=void 0===v?function(){}:v,w=n.disabled,x=void 0!==w&&w,S=n.isOpen,O=void 0!==S&&S,k=n.required,j=void 0!==k&&k,E=n.cancelButtonText,P=void 0===E?"Cancel":E,T=n.saveButtonText,N=void 0===T?"Save":T,M=n.controllers,C=void 0===M||M,A=n.seperator,V=void 0===A||A,I=n.id,Y=void 0===I?null:I,_=n.use12Hours,D=void 0!==_&&_,F=n.onAmPmChange,z=void 0===F?function(){}:F,U=n.name,R=void 0===U?null:U,H=n.onOpen,L=void 0===H?function(){}:H,W=n.popupClassName,B=void 0===W?null:W,Z=n.inputClassName,$=void 0===Z?null:Z,J=n.hourOptions,G=void 0===J?[]:J,K=n.minOptions,Q=void 0===K?[]:K,X=ie((0,e.useState)(O),2),ee=X[0],te=X[1],ne=ie((0,e.useState)(a),2),re=ne[0],ae=(ne[1],ie((0,e.useState)(o),2)),ce=ae[0],ue=ae[1],le=ce;null===o&&D?le="".concat(s," AM"):null!==o||D||(le=s);var se={onChange:p,height:re,onSave:y,onCancel:b,cancelButtonText:P,saveButtonText:N,controllers:C,setInputValue:ue,setIsOpen:te,seperator:V,use12Hours:D,onAmPmChange:z,initialValue:le,pickerDefaultValue:s,hourOptions:G,minOptions:Q};return t().createElement(t().Fragment,null,t().createElement("div",{className:"react-ios-time-picker-main",onClick:function(){te(!ee)}},t().createElement("input",{id:Y,name:R,className:"react-ios-time-picker-input ".concat($||""),value:null===ce?"":ce,type:"text",placeholder:u,readOnly:!0,disabled:x,required:j,onFocus:function(){m(),L()}})),ee&&!x&&t().createElement(g,null,t().createElement("div",{className:"react-ios-time-picker-popup"},t().createElement("div",{className:"react-ios-time-picker-popup-overlay ".concat(B||""),onClick:function(){b(),te(!ee)}}),t().createElement(q,oe({},se,{hourOptions:G,minOptions:Q})))))}}(),module.exports=r}();
!function(){var e={346:function(e,t,n){"use strict";var r=n(81),o=n.n(r),a=n(645),i=n.n(a)()(o());i.push([e.id,".react-ios-time-picker {\n margin-bottom: 50px;\n border-radius: 12px;\n overflow: hidden; \n box-shadow: 0 11px 15px #0005;\n}\n\n.react-ios-time-picker-transition {\n animation: fade-in 150ms ease-out;\n}\n\n@keyframes fade-in {\n 0% {\n transform: translateY(150px);\n opacity: 0;\n }\n 100% {\n transform: translateY(0);\n opacity: 1;\n }\n}\n\n.react-ios-time-picker-container {\n display: flex;\n justify-content: center;\n position: relative;\n background-color: #1d1d1d;\n width: 220px;\n overflow: hidden;\n /* border-radius: 0 0 15px 17px; */\n padding: 20px 0;\n /* box-shadow: inset 0px 0px 5px 0px rgba(255, 159, 10, 0.5); */\n /* box-shadow: 0 11px 15px -7px rgb(0 0 0 / 20%),\n 0 24px 38px 3px rgb(0 0 0 / 14%), 0 9px 46px 8px rgb(0 0 0 / 12%); */\n}\n\n.react-ios-time-picker-hour {\n position: relative;\n width: 50px;\n overflow: hidden;\n z-index: 100;\n margin-right: 5px;\n}\n\n.react-ios-time-picker-minute {\n position: relative;\n width: 50px;\n overflow: hidden;\n z-index: 100;\n margin-left: 5px;\n}\n\n.react-ios-time-picker-hour-format {\n position: relative;\n width: 40px;\n overflow: hidden;\n z-index: 100;\n}\n\n.react-ios-time-picker-fast {\n transition: transform 700ms cubic-bezier(0.13, 0.67, 0.01, 0.94);\n}\n\n.react-ios-time-picker-slow {\n transition: transform 600ms cubic-bezier(0.13, 0.67, 0.01, 0.94);\n}\n\n.react-ios-time-picker-selected-overlay {\n position: absolute;\n border-radius: 6px;\n background-color: #2c2c2f;\n pointer-events: none;\n margin: 0 10px;\n left: 0;\n right: 0;\n z-index: 1;\n /* box-shadow: inset 0px 0px 2px 0px rgba(255, 159, 10, 0.3); */\n}\n\n.react-ios-time-picker-top-shadow {\n position: absolute;\n top: 0;\n width: 100%;\n background: #0009;\n background: linear-gradient(180deg, #0009 0%, #1c1c1c 100%);\n}\n\n.react-ios-time-picker-bottom-shadow {\n position: absolute;\n bottom: 0;\n width: 100%;\n background: #0009;\n background: linear-gradient(0deg, #0009 0%, hsla(0, 0%, 11%, 1) 100%);\n}\n\n.react-ios-time-picker-cell-hour {\n width: 100%;\n text-align: center;\n display: flex;\n justify-content: end;\n align-items: center;\n user-select: none;\n transition: all 100ms linear;\n}\n.react-ios-time-picker-cell-minute {\n width: 100%;\n text-align: center;\n display: flex;\n justify-content: start;\n align-items: center;\n user-select: none;\n transition: all 100ms linear;\n}\n.react-ios-time-picker-cell-hour-format {\n width: 100%;\n text-align: center;\n display: flex;\n justify-content: end;\n align-items: center;\n user-select: none;\n transition: all 100ms linear;\n}\n\n.react-ios-time-picker-cell-inner-hour {\n width: fit-content;\n height: 100%;\n transition: all 100ms linear;\n cursor: pointer;\n border-radius: 7px;\n line-height: 35px;\n text-align: center;\n display: flex;\n justify-content: end;\n align-items: center;\n font-size: 14px;\n color: #666;\n padding: 0 10px;\n}\n\n.react-ios-time-picker-cell-inner-hour-format {\n width: fit-content;\n height: 100%;\n transition: all 100ms linear;\n cursor: pointer;\n border-radius: 7px;\n line-height: 35px;\n text-align: center;\n display: flex;\n justify-content: end;\n align-items: center;\n font-size: 14px;\n color: #6a6a6b;\n padding: 0 10px;\n}\n\n.react-ios-time-picker-cell-inner-minute {\n width: fit-content;\n height: 100%;\n transition: all 100ms linear;\n cursor: pointer;\n border-radius: 7px;\n line-height: 35px;\n text-align: center;\n display: flex;\n justify-content: start;\n align-items: center;\n font-size: 14px;\n color: #6a6a6b;\n padding: 0 10px;\n}\n\n.react-ios-time-picker-cell-inner-hour:hover,\n.react-ios-time-picker-cell-inner-minute:hover,\n.react-ios-time-picker-cell-inner-hour-format:hover {\n background-color: #ff9d0ac9;\n color: white;\n}\n\n.react-ios-time-picker-cell-inner-selected {\n /* font-weight: 500; */\n color: #f7f7f7;\n font-size: 16px;\n}\n\n.react-ios-time-picker-cell-inner-hour-format-selected {\n font-weight: 400;\n color: #f7f7f7;\n}\n\n.react-ios-time-picker-btn-container {\n position: relative;\n display: flex;\n justify-content: space-between;\n background-color: #292929;\n border-bottom: 1px solid #333;\n z-index: 100;\n}\n\n.react-ios-time-picker-btn {\n padding: 10px 15px;\n font-size: 13px;\n color: #fe9f06;\n transition: all 150ms linear;\n font-weight: 500;\n z-index: 1;\n}\n\n.react-ios-time-picker-btn:hover {\n opacity: 0.6;\n}\n\n.react-ios-time-picker-btn-cancel {\n font-size: 12px;\n font-weight: 300;\n}\n\n.react-ios-time-picker-popup {\n position: fixed;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n display: flex;\n justify-content: center;\n align-items: flex-end;\n z-index: 99998;\n}\n\n.react-ios-time-picker-popup-overlay {\n position: fixed;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n}\n\n.react-ios-time-picker-input {\n cursor: text;\n padding: 5px 10px;\n border-radius: 5px;\n border: 1px solid #0005;\n}\n\n.react-ios-time-picker-colon {\n display: flex;\n justify-content: center;\n align-items: center;\n height: 100%;\n color: #f7f7f7;\n position: relative;\n z-index: 100;\n font-weight: 600;\n}\n\n.react-ios-time-picker-cell-inner-hidden {\n opacity: 0;\n visibility: hidden;\n pointer-events: none;\n}\n\n.react-ios-time-picker-hour-format-transition {\n transition: transform 100ms ease-out;\n}\n",""]),t.Z=i},645:function(e){"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n="",r=void 0!==t[5];return t[4]&&(n+="@supports (".concat(t[4],") {")),t[2]&&(n+="@media ".concat(t[2]," {")),r&&(n+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),n+=e(t),r&&(n+="}"),t[2]&&(n+="}"),t[4]&&(n+="}"),n})).join("")},t.i=function(e,n,r,o,a){"string"==typeof e&&(e=[[null,e,void 0]]);var i={};if(r)for(var c=0;c<this.length;c++){var u=this[c][0];null!=u&&(i[u]=!0)}for(var l=0;l<e.length;l++){var s=[].concat(e[l]);r&&i[s[0]]||(void 0!==a&&(void 0===s[5]||(s[1]="@layer".concat(s[5].length>0?" ".concat(s[5]):""," {").concat(s[1],"}")),s[5]=a),n&&(s[2]?(s[1]="@media ".concat(s[2]," {").concat(s[1],"}"),s[2]=n):s[2]=n),o&&(s[4]?(s[1]="@supports (".concat(s[4],") {").concat(s[1],"}"),s[4]=o):s[4]="".concat(o)),t.push(s))}},t}},81:function(e){"use strict";e.exports=function(e){return e[1]}},703:function(e,t,n){"use strict";var r=n(414);function o(){}function a(){}a.resetWarningCache=o,e.exports=function(){function e(e,t,n,o,a,i){if(i!==r){var c=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw c.name="Invariant Violation",c}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:a,resetWarningCache:o};return n.PropTypes=n,n}},697:function(e,t,n){e.exports=n(703)()},414:function(e){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},379:function(e){"use strict";var t=[];function n(e){for(var n=-1,r=0;r<t.length;r++)if(t[r].identifier===e){n=r;break}return n}function r(e,r){for(var a={},i=[],c=0;c<e.length;c++){var u=e[c],l=r.base?u[0]+r.base:u[0],s=a[l]||0,f="".concat(l," ").concat(s);a[l]=s+1;var p=n(f),d={css:u[1],media:u[2],sourceMap:u[3],supports:u[4],layer:u[5]};if(-1!==p)t[p].references++,t[p].updater(d);else{var m=o(d,r);r.byIndex=c,t.splice(c,0,{identifier:f,updater:m,references:1})}i.push(f)}return i}function o(e,t){var n=t.domAPI(t);return n.update(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap&&t.supports===e.supports&&t.layer===e.layer)return;n.update(e=t)}else n.remove()}}e.exports=function(e,o){var a=r(e=e||[],o=o||{});return function(e){e=e||[];for(var i=0;i<a.length;i++){var c=n(a[i]);t[c].references--}for(var u=r(e,o),l=0;l<a.length;l++){var s=n(a[l]);0===t[s].references&&(t[s].updater(),t.splice(s,1))}a=u}}},569:function(e){"use strict";var t={};e.exports=function(e,n){var r=function(e){if(void 0===t[e]){var n=document.querySelector(e);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}t[e]=n}return t[e]}(e);if(!r)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");r.appendChild(n)}},216:function(e){"use strict";e.exports=function(e){var t=document.createElement("style");return e.setAttributes(t,e.attributes),e.insert(t,e.options),t}},565:function(e,t,n){"use strict";e.exports=function(e){var t=n.nc;t&&e.setAttribute("nonce",t)}},795:function(e){"use strict";e.exports=function(e){var t=e.insertStyleElement(e);return{update:function(n){!function(e,t,n){var r="";n.supports&&(r+="@supports (".concat(n.supports,") {")),n.media&&(r+="@media ".concat(n.media," {"));var o=void 0!==n.layer;o&&(r+="@layer".concat(n.layer.length>0?" ".concat(n.layer):""," {")),r+=n.css,o&&(r+="}"),n.media&&(r+="}"),n.supports&&(r+="}");var a=n.sourceMap;a&&"undefined"!=typeof btoa&&(r+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(a))))," */")),t.styleTagTransform(r,e,t.options)}(t,e,n)},remove:function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(t)}}}},589:function(e){"use strict";e.exports=function(e,t){if(t.styleSheet)t.styleSheet.cssText=e;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(e))}}}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var a=t[r]={id:r,exports:{}};return e[r](a,a.exports,n),a.exports}n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,{a:t}),t},n.d=function(e,t){for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.nc=void 0;var r={};!function(){"use strict";n.r(r),n.d(r,{TimePicker:function(){return ce}});var e=require("react"),t=n.n(e),o=require("react-dom"),a=n.n(o),i=n(697),c=n.n(i),u=!("undefined"==typeof window||!window.document||!window.document.createElement),l=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function f(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}var p=function(e){function t(){return s(this,t),f(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),l(t,[{key:"componentWillUnmount",value:function(){this.defaultNode&&document.body.removeChild(this.defaultNode),this.defaultNode=null}},{key:"render",value:function(){return u?(this.props.node||this.defaultNode||(this.defaultNode=document.createElement("div"),document.body.appendChild(this.defaultNode)),a().createPortal(this.props.children,this.props.node||this.defaultNode)):null}}]),t}(t().Component);p.propTypes={children:c().node.isRequired,node:c().any};var d=p,m=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function h(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function y(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}var v=function(e){function n(){return h(this,n),y(this,(n.__proto__||Object.getPrototypeOf(n)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(n,e),m(n,[{key:"componentDidMount",value:function(){this.renderPortal()}},{key:"componentDidUpdate",value:function(e){this.renderPortal()}},{key:"componentWillUnmount",value:function(){a().unmountComponentAtNode(this.defaultNode||this.props.node),this.defaultNode&&document.body.removeChild(this.defaultNode),this.defaultNode=null,this.portal=null}},{key:"renderPortal",value:function(e){this.props.node||this.defaultNode||(this.defaultNode=document.createElement("div"),document.body.appendChild(this.defaultNode));var n=this.props.children;"function"==typeof this.props.children.type&&(n=t().cloneElement(this.props.children)),this.portal=a().unstable_renderSubtreeIntoContainer(this,n,this.props.node||this.defaultNode)}},{key:"render",value:function(){return null}}]),n}(t().Component),b=v;v.propTypes={children:c().node.isRequired,node:c().any};var g=a().createPortal?d:b;function w(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function x(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?w(Object(n),!0).forEach((function(t){S(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):w(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function S(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function O(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,a=[],i=!0,c=!1;try{for(n=n.call(e);!(i=(r=n.next()).done)&&(a.push(r.value),!t||a.length!==t);i=!0);}catch(e){c=!0,o=e}finally{try{i||null==n.return||n.return()}finally{if(c)throw o}}return a}}(e,t)||function(e,t){if(e){if("string"==typeof e)return k(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?k(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function k(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var j=function(n){var r=n.height,o=(n.value,n.setValue,n.onAmPmChange,n.setHourFormat),a=n.hourFormat,i=[{number:"AM",translatedValue:(2*r).toString(),selected:!1},{number:"PM",translatedValue:r.toString(),selected:!1}],c=O((0,e.useState)([{number:"AM",translatedValue:(2*r).toString(),selected:"AM"===a.hourFormat},{number:"PM",translatedValue:r.toString(),selected:"PM"===a.hourFormat}]),2),u=c[0],l=c[1],s=(0,e.useRef)(null),f=O((0,e.useState)(null),2),p=f[0],d=f[1],m=O((0,e.useState)(null),2),h=m[0],y=m[1],v=O((0,e.useState)(parseInt(u.filter((function(e){return!0===e.selected}))[0].translatedValue)),2),b=v[0],g=v[1],w=O((0,e.useState)(!1),2),S=w[0],k=w[1],j=O((0,e.useState)(!1),2),E=j[0],P=j[1],T=O((0,e.useState)(null),2),M=T[0],N=T[1],C=O((0,e.useState)(null),2),A=C[0],V=C[1],I=O((0,e.useState)(null),2),Y=(I[0],I[1]),_=O((0,e.useState)(null),2),D=(_[0],_[1]),H=O((0,e.useState)(null),2),F=(H[0],H[1]),z=O((0,e.useState)(null),2),U=(z[0],z[1]),R=function(e){k(!1),g((function(e){return e+p})),P(!0),V(performance.now()),performance.now()-M<=100?D("fast"):D("slow"),F(p<0?"down":"up")};(0,e.useEffect)((function(){S&&(s.current.style.transform="translateY(".concat(b+p,"px)"))}),[p]),(0,e.useEffect)((function(){if(E){Y(A-M);var e=Math.round(b/r)*r;e<r&&(e=r),e>2*r&&(e=2*r),s.current.style.transform="translateY(".concat(e,"px)"),g(e),d(0)}}),[E]);var q=function(e){0===p&&g(parseInt(e.target.dataset.translatedValue))};return t().createElement("div",{className:"react-ios-time-picker-hour-format",onMouseDown:function(e){P(!1),y(e.clientY),k(!0),N(performance.now())},onMouseUp:R,onMouseMove:function(e){d(S?e.clientY-h:0)},onMouseLeave:function(e){k(!1),g((function(e){return e+p})),P(!0),V(performance.now()),F(p<0?"down":"up")},style:{height:5*r},onWheel:function(e){e.deltaY>0?b<=r&&g((function(e){return e+r})):b>=2*r&&g((function(e){return e-r}))},onTouchStart:function(e){P(!1),y(e.targetTouches[0].clientY),k(!0),N(performance.now())},onTouchMove:function(e){d(S?e.targetTouches[0].clientY-h:0)},onTouchEnd:R},t().createElement("div",{ref:s,className:"".concat(E&&"react-ios-time-picker-hour-format-transition"),onTransitionEnd:function(e){"transform"===e.propertyName&&[{number:"AM",translatedValue:(2*r).toString(),arrayNumber:0},{number:"PM",translatedValue:r.toString(),arrayNumber:1}].map((function(e){parseInt(e.translatedValue)===b&&(U(e.arrayNumber),o({mount:!0,hourFormat:e.number}),l((function(){return i.map((function(t){return t.number==e.number&&t.translatedValue==b?x(x({},t),{},{selected:!0}):t}))})))}))},style:{transform:"translateY(".concat(b,"px)")}},u.map((function(e,n){return t().createElement("div",{key:n,className:"react-ios-time-picker-cell-hour",style:{height:"".concat(r,"px")}},t().createElement("div",{className:"react-ios-time-picker-cell-inner-hour-format".concat(e.selected?" react-ios-time-picker-cell-inner-hour-format-selected":""),onClick:q,"data-translated-value":e.translatedValue},e.number))}))))},E=function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:54,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:24,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=[{number:"00",translatedValue:(2*e).toString(),selected:!1},{number:"01",translatedValue:e.toString(),selected:!1}],a=[{number:"00",translatedValue:e.toString(),selected:!1,hidden:!0},{number:"01",translatedValue:e.toString(),selected:!1}],i=13===t?a:o,c=0,u=0;u<3;u++)for(var l=0;l<t;l++){if(!1!==r){var s=1===l.toString().length?"0".concat(l):l.toString();if(!r.includes(s))continue}0===u&&l<2||13===t&&0===l||(1!==u||l!==n?(1===l.toString().length?i.push({number:"0".concat(l.toString()),translatedValue:"-".concat(c),selected:!1}):i.push({number:l.toString(),translatedValue:"-".concat(c),selected:!1}),c+=e):(1===l.toString().length?i.push({number:"0".concat(l.toString()),translatedValue:"-".concat(c),selected:!0}):i.push({number:l.toString(),translatedValue:"-".concat(c),selected:!0}),c+=e))}return i},P=function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:54,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:24,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=[{number:"00",translatedValue:(2*e).toString(),arrayNumber:0},{number:"01",translatedValue:e.toString(),arrayNumber:1}],o=0,a=0;a<3;a++)for(var i=0;i<t;i++){if(!1!==n){var c=1===i.toString().length?"0".concat(i):i.toString();if(!n.includes(c))continue}0===a&&i<2||13===t&&0===i||(1===i.toString().length?r.push({number:"0".concat(i.toString()),translatedValue:"-".concat(o),selected:!1}):r.push({number:i.toString(),translatedValue:"-".concat(o),selected:!1}),o+=e)}return r};function T(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function M(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?T(Object(n),!0).forEach((function(t){N(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):T(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function N(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function C(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,a=[],i=!0,c=!1;try{for(n=n.call(e);!(i=(r=n.next()).done)&&(a.push(r.value),!t||a.length!==t);i=!0);}catch(e){c=!0,o=e}finally{try{i||null==n.return||n.return()}finally{if(c)throw o}}return a}}(e,t)||function(e,t){if(e){if("string"==typeof e)return A(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?A(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function A(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var V=function(n){var r=n.height,o=n.value,a=n.setValue,i=n.use12Hours,c=n.availableHours,u=i?13:24,l=C((0,e.useState)(E(r,u,parseInt(o.slice(0,2)),c)),2),s=l[0],f=l[1],p=(0,e.useRef)(null),d=C((0,e.useState)(null),2),m=d[0],h=d[1],y=C((0,e.useState)(null),2),v=y[0],b=y[1],g=C((0,e.useState)(parseInt(E(r,u,parseInt(o.slice(0,2)),c).filter((function(e){return e.number===o.slice(0,2)&&!0===e.selected}))[0].translatedValue)),2),w=g[0],x=g[1],S=C((0,e.useState)(!1),2),O=S[0],k=S[1],j=C((0,e.useState)(!1),2),T=j[0],N=j[1],A=C((0,e.useState)(null),2),V=A[0],I=A[1],Y=C((0,e.useState)(null),2),_=Y[0],D=Y[1],H=C((0,e.useState)(null),2),F=(H[0],H[1]),z=C((0,e.useState)(null),2),U=z[0],R=z[1],q=C((0,e.useState)(null),2),L=q[0],W=q[1],B=C((0,e.useState)(null),2),Z=(B[0],B[1]),$=function(e){k(!1),x((function(e){return e+m})),N(!0),D(performance.now()),performance.now()-V<=100?R("fast"):R("slow"),W(m<0?"down":"up")};(0,e.useEffect)((function(){O&&(p.current.style.transform="translateY(".concat(w+m,"px)"))}),[m]),(0,e.useEffect)((function(){if(T){if(F(_-V),_-V<=100&&0!==m){var e;"down"===L?e=w-120/(_-V)*100:"up"===L&&(e=w+120/(_-V)*100);var t=Math.round(e/r)*r;i?(t<-34*r&&(t=-34*r),t>r&&(t=r)):(t<-69*r&&(t=-69*r),t>2*r&&(t=2*r)),p.current.style.transform="translateY(".concat(t,"px)"),x(t)}if(_-V>100&&0!==m){var n=Math.round(w/r)*r;i?(n<-34*r&&(n=-34*r),n>r&&(n=r)):(n<-69*r&&(n=-69*r),n>2*r&&(n=2*r)),p.current.style.transform="translateY(".concat(n,"px)"),x(n)}h(0)}}),[T]);var J=function(e){0===m&&x(parseInt(e.target.dataset.translatedValue))},G=T&&"fast"===U,K=T&&"slow"===U;return t().createElement("div",{className:"react-ios-time-picker-hour ".concat(i&&"react-ios-time-picker-hour-12hour-format"),onMouseDown:function(e){N(!1),b(e.clientY),k(!0),I(performance.now())},onMouseUp:$,onMouseMove:function(e){h(O?e.clientY-v:0)},onMouseLeave:function(e){k(!1),x((function(e){return e+m})),N(!0),D(performance.now()),performance.now()-V<=100?R("fast"):R("slow"),W(m<0?"down":"up")},style:{height:5*r},onWheel:function(e){i?e.deltaY>0?w<r&&x((function(e){return e+r})):w>-34*r&&x((function(e){return e-r})):e.deltaY>0?w<2*r&&x((function(e){return e+r})):w>-69*r&&x((function(e){return e-r}))},onTouchStart:function(e){N(!1),b(e.targetTouches[0].clientY),k(!0),I(performance.now())},onTouchMove:function(e){h(O?e.targetTouches[0].clientY-v:0)},onTouchEnd:$},t().createElement("div",{ref:p,className:"".concat(!0===G&&"react-ios-time-picker-fast"," ").concat(!0===K&&"react-ios-time-picker-slow"),onTransitionEnd:function(e){P(r,u).map((function(e){parseInt(e.translatedValue)===w&&(Z(e.arrayNumber),a((function(t){return"".concat(e.number,":").concat(t.slice(3,6))})),f((function(){return E(r,u,null,c).map((function(t){return t.number==e.number&&t.translatedValue==w?M(M({},t),{},{selected:!0}):t}))})))}))},style:{transform:"translateY(".concat(w,"px)")}},s.map((function(e,n){return t().createElement("div",{key:n,className:"react-ios-time-picker-cell-hour",style:{height:"".concat(r,"px")}},t().createElement("div",{className:"react-ios-time-picker-cell-inner-hour".concat(e.selected?" react-ios-time-picker-cell-inner-selected":"").concat(null!=e&&e.hidden?" react-ios-time-picker-cell-inner-hidden":""),onClick:J,"data-translated-value":e.translatedValue},e.number))}))))};function I(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Y(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?I(Object(n),!0).forEach((function(t){_(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):I(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function _(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function D(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,a=[],i=!0,c=!1;try{for(n=n.call(e);!(i=(r=n.next()).done)&&(a.push(r.value),!t||a.length!==t);i=!0);}catch(e){c=!0,o=e}finally{try{i||null==n.return||n.return()}finally{if(c)throw o}}return a}}(e,t)||function(e,t){if(e){if("string"==typeof e)return H(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?H(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function H(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var F=function(n){var r=n.height,o=n.value,a=n.setValue,i=n.availableMinutes,c=D((0,e.useState)(E(r,60,parseInt(o.slice(3,6)),i)),2),u=c[0],l=c[1],s=(0,e.useRef)(null),f=D((0,e.useState)(null),2),p=f[0],d=f[1],m=D((0,e.useState)(null),2),h=m[0],y=m[1],v=D((0,e.useState)(parseInt(E(r,60,parseInt(o.slice(3,6)),i).filter((function(e){return e.number===o.slice(3,6)&&!0===e.selected}))[0].translatedValue)),2),b=v[0],g=v[1],w=D((0,e.useState)(!1),2),x=w[0],S=w[1],O=D((0,e.useState)(!1),2),k=O[0],j=O[1],T=D((0,e.useState)(null),2),M=T[0],N=T[1],C=D((0,e.useState)(null),2),A=C[0],V=C[1],I=D((0,e.useState)(null),2),_=(I[0],I[1]),H=D((0,e.useState)(null),2),F=H[0],z=H[1],U=D((0,e.useState)(null),2),R=U[0],q=U[1],L=D((0,e.useState)(null),2),W=(L[0],L[1]),B=function(e){S(!1),g((function(e){return e+p})),j(!0),V(performance.now()),performance.now()-M<=100?z("fast"):z("slow"),q(p<0?"down":"up")};(0,e.useEffect)((function(){x&&(s.current.style.transform="translateY(".concat(b+p,"px)"))}),[p]),(0,e.useEffect)((function(){if(k){if(_(A-M),A-M<=100&&0!==p){var e;"down"===R?e=b-120/(A-M)*100:"up"===R&&(e=b+120/(A-M)*100);var t=Math.round(e/r)*r;t<-177*r&&(t=-177*r),t>2*r&&(t=2*r),s.current.style.transform="translateY(".concat(t,"px)"),g(t)}if(A-M>100&&0!==p){var n=Math.round(b/r)*r;n<-177*r&&(n=-177*r),n>2*r&&(n=2*r),s.current.style.transform="translateY(".concat(n,"px)"),g(n)}d(0)}}),[k]);var Z=function(e){0===p&&g(parseInt(e.target.dataset.translatedValue))},$=k&&"fast"===F,J=k&&"slow"===F;return t().createElement("div",{className:"react-ios-time-picker-minute",onMouseDown:function(e){j(!1),y(e.clientY),S(!0),N(performance.now())},onMouseUp:B,onMouseMove:function(e){d(x?e.clientY-h:0)},onMouseLeave:function(e){S(!1),g((function(e){return e+p})),j(!0),V(performance.now()),performance.now()-M<=100?z("fast"):z("slow"),q(p<0?"down":"up")},style:{height:5*r},onWheel:function(e){e.deltaY>0?b<2*r&&g((function(e){return e+r})):b>-177*r&&g((function(e){return e-r}))},onTouchStart:function(e){j(!1),y(e.targetTouches[0].clientY),S(!0),N(performance.now())},onTouchMove:function(e){d(x?e.targetTouches[0].clientY-h:0)},onTouchEnd:B},t().createElement("div",{ref:s,className:"".concat(!0===$&&"react-ios-time-picker-fast"," ").concat(!0===J&&"react-ios-time-picker-slow"),onTransitionEnd:function(e){P(r,60).map((function(e){parseInt(e.translatedValue)===b&&(W(e.arrayNumber),a((function(t){return"".concat(t.slice(0,2),":").concat(e.number)})),l((function(){return E(r,60,null,i).map((function(t){return t.number==e.number&&t.translatedValue==b?Y(Y({},t),{},{selected:!0}):t}))})))}))},style:{transform:"translateY(".concat(b,"px)")}},u.map((function(e,n){return t().createElement("div",{key:n,className:"react-ios-time-picker-cell-minute",style:{height:"".concat(r,"px")}},t().createElement("div",{className:"react-ios-time-picker-cell-inner-minute".concat(e.selected?" react-ios-time-picker-cell-inner-selected":""),onClick:Z,"data-translated-value":e.translatedValue},e.number))}))))};function z(){return z=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},z.apply(this,arguments)}function U(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,a=[],i=!0,c=!1;try{for(n=n.call(e);!(i=(r=n.next()).done)&&(a.push(r.value),!t||a.length!==t);i=!0);}catch(e){c=!0,o=e}finally{try{i||null==n.return||n.return()}finally{if(c)throw o}}return a}}(e,t)||function(e,t){if(e){if("string"==typeof e)return R(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?R(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function R(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var q=function(n){var r=n.pickerDefaultValue,o=n.initialValue,a=n.onChange,i=n.height,c=n.onSave,u=n.onCancel,l=n.cancelButtonText,s=n.saveButtonText,f=n.controllers,p=n.setInputValue,d=n.setIsOpen,m=n.seperator,h=n.use12Hours,y=n.onAmPmChange,v=n.availableMinutes,b=n.availableHours,g=h?o.slice(0,5):o,w=U((0,e.useState)(null===o?r:g),2),x=w[0],S=w[1],O=U((0,e.useState)({mount:!1,hourFormat:o.slice(6,8)}),2),k=O[0],E=O[1];(0,e.useEffect)((function(){if(!1===f){var e=h?"".concat(x," ").concat(k.hourFormat):x;p(e),a(e)}}),[x]),(0,e.useEffect)((function(){k.mount&&y(k.hourFormat)}),[k]);var P={height:i,value:x,setValue:S,controllers:f,use12Hours:h,onAmPmChange:y,setHourFormat:E,hourFormat:k,availableHours:b,availableMinutes:v};return t().createElement("div",{className:"react-ios-time-picker react-ios-time-picker-transition"},f&&t().createElement("div",{className:"react-ios-time-picker-btn-container"},t().createElement("button",{className:"react-ios-time-picker-btn react-ios-time-picker-btn-cancel",onClick:function(){u(),d(!1)}},l),t().createElement("button",{className:"react-ios-time-picker-btn",onClick:function(){var e=h?"".concat(x," ").concat(k.hourFormat):x;p(e),a(e),c(e),d(!1)}},s)),t().createElement("div",{className:"react-ios-time-picker-container",style:{height:"".concat(5*i+40,"px")}},t().createElement("div",{className:"react-ios-time-picker-selected-overlay",style:{top:"".concat(2*i+20,"px"),height:"".concat(i,"px")}}),t().createElement(V,z({availableHours:b},P)),m&&t().createElement("div",{className:"react-ios-time-picker-colon"},":"),t().createElement(F,z({availableMinutes:v},P)),h&&t().createElement(j,P)))},L=n(379),W=n.n(L),B=n(795),Z=n.n(B),$=n(569),J=n.n($),G=n(565),K=n.n(G),Q=n(216),X=n.n(Q),ee=n(589),te=n.n(ee),ne=n(346),re={};function oe(){return oe=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},oe.apply(this,arguments)}function ae(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,a=[],i=!0,c=!1;try{for(n=n.call(e);!(i=(r=n.next()).done)&&(a.push(r.value),!t||a.length!==t);i=!0);}catch(e){c=!0,o=e}finally{try{i||null==n.return||n.return()}finally{if(c)throw o}}return a}}(e,t)||function(e,t){if(e){if("string"==typeof e)return ie(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ie(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ie(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}re.styleTagTransform=te(),re.setAttributes=K(),re.insert=J().bind(null,"head"),re.domAPI=Z(),re.insertStyleElement=X(),W()(ne.Z,re),ne.Z&&ne.Z.locals&&ne.Z.locals;var ce=function(n){var r=n.value,o=void 0===r?null:r,a=n.cellHeight,i=void 0===a?28:a,c=n.placeHolder,u=void 0===c?"Select Time":c,l=n.pickerDefaultValue,s=void 0===l?"10:00":l,f=n.onChange,p=void 0===f?function(){}:f,d=n.onFocus,m=void 0===d?function(){}:d,h=n.onSave,y=void 0===h?function(){}:h,v=n.onCancel,b=void 0===v?function(){}:v,w=n.disabled,x=void 0!==w&&w,S=n.isOpen,O=void 0!==S&&S,k=n.required,j=void 0!==k&&k,E=n.cancelButtonText,P=void 0===E?"Cancel":E,T=n.saveButtonText,M=void 0===T?"Save":T,N=n.controllers,C=void 0===N||N,A=n.seperator,V=void 0===A||A,I=n.id,Y=void 0===I?null:I,_=n.use12Hours,D=void 0!==_&&_,H=n.onAmPmChange,F=void 0===H?function(){}:H,z=n.name,U=void 0===z?null:z,R=n.onOpen,L=void 0===R?function(){}:R,W=n.popupClassName,B=void 0===W?null:W,Z=n.inputClassName,$=void 0===Z?null:Z,J=n.availableHours,G=void 0!==J&&J,K=n.availableMinutes,Q=void 0!==K&&K,X=ae((0,e.useState)(O),2),ee=X[0],te=X[1],ne=ae((0,e.useState)(i),2),re=ne[0],ie=(ne[1],ae((0,e.useState)(o),2)),ce=ie[0],ue=ie[1],le=ce;null===o&&D?le="".concat(s," AM"):null!==o||D||(le=s);var se={onChange:p,height:re,onSave:y,onCancel:b,cancelButtonText:P,saveButtonText:M,controllers:C,setInputValue:ue,setIsOpen:te,seperator:V,use12Hours:D,onAmPmChange:F,initialValue:le,pickerDefaultValue:s,availableHours:G,availableMinutes:Q};return t().createElement(t().Fragment,null,t().createElement("div",{className:"react-ios-time-picker-main",onClick:function(){te(!ee)}},t().createElement("input",{id:Y,name:U,className:"react-ios-time-picker-input ".concat($||""),value:null===ce?"":ce,type:"text",placeholder:u,readOnly:!0,disabled:x,required:j,onFocus:function(){m(),L()}})),ee&&!x&&t().createElement(g,null,t().createElement("div",{className:"react-ios-time-picker-popup"},t().createElement("div",{className:"react-ios-time-picker-popup-overlay ".concat(B||""),onClick:function(){b(),te(!ee)}}),t().createElement(q,oe({},se,{availableHours:G,availableMinutes:Q})))))}}(),module.exports=r}();
{
"name": "react-time-picker-ios-like-v2",
"version": "0.0.1",
"version": "0.0.2",
"description": "A modern time picker for your React app.",

@@ -5,0 +5,0 @@ "main": "dist/TimePicker.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc