IOPaint/lama_cleaner/app/build/static/js/main.e73104cb.chunk.js

1 line
63 KiB
JavaScript
Raw Normal View History

2022-09-25 16:33:09 +02:00
(this["webpackJsonplama-cleaner"]=this["webpackJsonplama-cleaner"]||[]).push([[0],{62:function(e,t,n){},67:function(e,t,n){"use strict";n.r(t);var a=n(0),c=n.n(a),r=n(12),i=n.n(r),o=(n(62),n(7)),s=n(3),l=n(53),u=n(9),d=n.n(u),b=n(13);var j=n(6),h=n(2),f=n(48),p=n.n(f),O=n(14),g=n(23),v=n(1),m=function(e){var t=e.width,n=e.value,c=e.chevronDirection,r=e.options,i=e.autoFocusAfterClose,o=e.onChange,s=Object(a.useRef)(null);return Object(v.jsxs)(g.f,{value:n,onValueChange:o,onOpenChange:function(e){e||i||window.setTimeout((function(){var e;null===s||void 0===s||null===(e=s.current)||void 0===e||e.blur()}),100)},children:[Object(v.jsxs)(g.g,{className:"select-trigger",style:{width:t},ref:s,onKeyDown:function(e){return e.preventDefault()},children:[Object(v.jsx)(g.h,{}),Object(v.jsx)(g.b,{children:"up"===c?Object(v.jsx)(O.d,{}):Object(v.jsx)(O.c,{})})]}),Object(v.jsx)(g.a,{className:"select-content",children:Object(v.jsx)(g.i,{className:"select-viewport",children:r.map((function(e){return Object(v.jsxs)(g.c,{value:e,className:"select-item",children:[Object(v.jsx)(g.e,{children:e}),Object(v.jsx)(g.d,{className:"select-item-indicator",children:Object(v.jsx)(O.b,{})})]},e)}))})})]})};m.defaultProps={chevronDirection:"down",autoFocusAfterClose:!0};var x=m,w=n(71),y=n(4),S=["onFocus","onBlur"],k=c.a.forwardRef((function(e,t){var n=e.onFocus,a=e.onBlur,c=Object(y.a)(e,S),r=Object(o.d)(V),i=Object(s.a)(r,2),l=(i[0],i[1]);return Object(v.jsx)("input",Object(h.a)(Object(h.a)({},c),{},{ref:t,type:"text",onFocus:function(e){l((function(e){return Object(h.a)(Object(h.a)({},e),{},{disableShortCuts:!0})})),null===n||void 0===n||n(e)},onBlur:function(e){l((function(e){return Object(h.a)(Object(h.a)({},e),{},{disableShortCuts:!1})})),null===a||void 0===a||a(e)},onKeyDown:function(e){"Escape"===e.key&&e.currentTarget.blur(),(e.ctrlKey||e.metaKey)&&"z"===e.key&&e.stopPropagation()}}))})),C=["value","allowFloat","onValue"],L=c.a.forwardRef((function(e,t){var n=e.value,c=e.allowFloat,r=e.onValue,i=Object(y.a)(e,C),o=Object(a.useState)(n),l=Object(s.a)(o,2),u=l[0],d=l[1];Object(a.useEffect)((function(){d(n)}),[n]);return Object(v.jsx)(k,Object(h.a)(Object(h.a)({value:u,onInput:function(e){var t=e.target.value;c?(t=t.replace(/[^0-9.]/g,"").replace(/(\..*?)\..*/g,"$1"),null===r||void 0===r||r(t)):(t=t.replace(/\D/g,""),null===r||void 0===r||r(t)),d(t)},className:"number-input"},i),{},{ref:t}))}));L.defaultProps={allowFloat:!1};var M=L,N=n(28),I=function(e){var t=e.content,n=e.children;return Object(v.jsx)(N.d,{children:Object(v.jsxs)(N.c,{children:[Object(v.jsx)(N.e,{className:"tooltip-trigger",children:n}),Object(v.jsxs)(N.b,{className:"tooltip-content",children:[t,Object(v.jsx)(N.a,{className:"tooltip-arrow"})]})]})})};var z=function(e){var t=e.title,n=e.titleSuffix,a=e.desc,c=e.input,r=e.optionDesc,i=e.className;return Object(v.jsxs)("div",{className:"setting-block ".concat(i),children:[Object(v.jsxs)("div",{className:"setting-block-content",children:[Object(v.jsx)("div",{className:"setting-block-content-title",children:Object(v.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"12px"},children:[a?Object(v.jsx)(I,{content:Object(v.jsx)("div",{style:{maxWidth:400},children:a}),children:Object(v.jsx)("span",{children:t})}):Object(v.jsx)("span",{children:t}),n]})}),c]}),r&&Object(v.jsx)("div",{className:"option-desc",children:r})]})};function E(e){var t=e.title,n=e.allowFloat,c=e.desc,r=e.value,i=e.suffix,o=e.onValue,s=e.width,l=e.widthUnit,u=e.disable,d=Object(a.useRef)(null);return Object(w.a)(d,(function(){(null===d||void 0===d?void 0:d.current)&&d.current.blur()})),Object(v.jsx)(z,{className:"sub-setting-block",title:t,desc:c,input:Object(v.jsxs)("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",gap:"8px"},children:[Object(v.jsx)(M,{allowFloat:n,style:{width:"".concat(s).concat(l)},value:r,disabled:u,onValue:o,ref:d}),i&&Object(v.jsx)("span",{children:i})]})})}E.defaultProps={allowFloat:!1,width:80,widthUnit:"px",disable:!1};var T,D,R=E;!function(e){e.ORIGINAL="Original",e.RESIZE="Resize",e.CROP="Crop"}(T||(T={}