docs-combiner 0.1.17 → 0.1.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/renderer.js +1294 -441
- package/dist/renderer.js.map +1 -1
- package/package.json +1 -1
package/dist/renderer.js
CHANGED
|
@@ -2803,6 +2803,29 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
2803
2803
|
|
|
2804
2804
|
/***/ }),
|
|
2805
2805
|
|
|
2806
|
+
/***/ "./node_modules/@mui/icons-material/esm/Backup.js":
|
|
2807
|
+
/*!********************************************************!*\
|
|
2808
|
+
!*** ./node_modules/@mui/icons-material/esm/Backup.js ***!
|
|
2809
|
+
\********************************************************/
|
|
2810
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
2811
|
+
|
|
2812
|
+
"use strict";
|
|
2813
|
+
__webpack_require__.r(__webpack_exports__);
|
|
2814
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
2815
|
+
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
2816
|
+
/* harmony export */ });
|
|
2817
|
+
/* harmony import */ var _utils_createSvgIcon_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./utils/createSvgIcon.js */ "./node_modules/@mui/material/esm/utils/createSvgIcon.js");
|
|
2818
|
+
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
|
|
2819
|
+
"use client";
|
|
2820
|
+
|
|
2821
|
+
|
|
2822
|
+
|
|
2823
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ((0,_utils_createSvgIcon_js__WEBPACK_IMPORTED_MODULE_0__["default"])(/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("path", {
|
|
2824
|
+
d: "M19.35 10.04C18.67 6.59 15.64 4 12 4 9.11 4 6.6 5.64 5.35 8.04 2.34 8.36 0 10.91 0 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96M14 13v4h-4v-4H7l5-5 5 5z"
|
|
2825
|
+
}), 'Backup'));
|
|
2826
|
+
|
|
2827
|
+
/***/ }),
|
|
2828
|
+
|
|
2806
2829
|
/***/ "./node_modules/@mui/icons-material/esm/Brightness4.js":
|
|
2807
2830
|
/*!*************************************************************!*\
|
|
2808
2831
|
!*** ./node_modules/@mui/icons-material/esm/Brightness4.js ***!
|
|
@@ -12363,6 +12386,162 @@ const formControlLabelClasses = (0,_mui_utils_generateUtilityClasses__WEBPACK_IM
|
|
|
12363
12386
|
|
|
12364
12387
|
/***/ }),
|
|
12365
12388
|
|
|
12389
|
+
/***/ "./node_modules/@mui/material/esm/FormGroup/FormGroup.js":
|
|
12390
|
+
/*!***************************************************************!*\
|
|
12391
|
+
!*** ./node_modules/@mui/material/esm/FormGroup/FormGroup.js ***!
|
|
12392
|
+
\***************************************************************/
|
|
12393
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
12394
|
+
|
|
12395
|
+
"use strict";
|
|
12396
|
+
__webpack_require__.r(__webpack_exports__);
|
|
12397
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
12398
|
+
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
12399
|
+
/* harmony export */ });
|
|
12400
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "./node_modules/react/index.js");
|
|
12401
|
+
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! prop-types */ "./node_modules/prop-types/index.js");
|
|
12402
|
+
/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! clsx */ "./node_modules/clsx/dist/clsx.mjs");
|
|
12403
|
+
/* harmony import */ var _mui_utils_composeClasses__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @mui/utils/composeClasses */ "./node_modules/@mui/utils/esm/composeClasses/composeClasses.js");
|
|
12404
|
+
/* harmony import */ var _zero_styled_index_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../zero-styled/index.js */ "./node_modules/@mui/material/esm/styles/styled.js");
|
|
12405
|
+
/* harmony import */ var _DefaultPropsProvider_index_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../DefaultPropsProvider/index.js */ "./node_modules/@mui/material/esm/DefaultPropsProvider/DefaultPropsProvider.js");
|
|
12406
|
+
/* harmony import */ var _formGroupClasses_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./formGroupClasses.js */ "./node_modules/@mui/material/esm/FormGroup/formGroupClasses.js");
|
|
12407
|
+
/* harmony import */ var _FormControl_useFormControl_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../FormControl/useFormControl.js */ "./node_modules/@mui/material/esm/FormControl/useFormControl.js");
|
|
12408
|
+
/* harmony import */ var _FormControl_formControlState_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../FormControl/formControlState.js */ "./node_modules/@mui/material/esm/FormControl/formControlState.js");
|
|
12409
|
+
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
|
|
12410
|
+
'use client';
|
|
12411
|
+
|
|
12412
|
+
|
|
12413
|
+
|
|
12414
|
+
|
|
12415
|
+
|
|
12416
|
+
|
|
12417
|
+
|
|
12418
|
+
|
|
12419
|
+
|
|
12420
|
+
|
|
12421
|
+
|
|
12422
|
+
const useUtilityClasses = ownerState => {
|
|
12423
|
+
const {
|
|
12424
|
+
classes,
|
|
12425
|
+
row,
|
|
12426
|
+
error
|
|
12427
|
+
} = ownerState;
|
|
12428
|
+
const slots = {
|
|
12429
|
+
root: ['root', row && 'row', error && 'error']
|
|
12430
|
+
};
|
|
12431
|
+
return (0,_mui_utils_composeClasses__WEBPACK_IMPORTED_MODULE_3__["default"])(slots, _formGroupClasses_js__WEBPACK_IMPORTED_MODULE_6__.getFormGroupUtilityClass, classes);
|
|
12432
|
+
};
|
|
12433
|
+
const FormGroupRoot = (0,_zero_styled_index_js__WEBPACK_IMPORTED_MODULE_4__["default"])('div', {
|
|
12434
|
+
name: 'MuiFormGroup',
|
|
12435
|
+
slot: 'Root',
|
|
12436
|
+
overridesResolver: (props, styles) => {
|
|
12437
|
+
const {
|
|
12438
|
+
ownerState
|
|
12439
|
+
} = props;
|
|
12440
|
+
return [styles.root, ownerState.row && styles.row];
|
|
12441
|
+
}
|
|
12442
|
+
})({
|
|
12443
|
+
display: 'flex',
|
|
12444
|
+
flexDirection: 'column',
|
|
12445
|
+
flexWrap: 'wrap',
|
|
12446
|
+
variants: [{
|
|
12447
|
+
props: {
|
|
12448
|
+
row: true
|
|
12449
|
+
},
|
|
12450
|
+
style: {
|
|
12451
|
+
flexDirection: 'row'
|
|
12452
|
+
}
|
|
12453
|
+
}]
|
|
12454
|
+
});
|
|
12455
|
+
|
|
12456
|
+
/**
|
|
12457
|
+
* `FormGroup` wraps controls such as `Checkbox` and `Switch`.
|
|
12458
|
+
* It provides compact row layout.
|
|
12459
|
+
* For the `Radio`, you should be using the `RadioGroup` component instead of this one.
|
|
12460
|
+
*/
|
|
12461
|
+
const FormGroup = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.forwardRef(function FormGroup(inProps, ref) {
|
|
12462
|
+
const props = (0,_DefaultPropsProvider_index_js__WEBPACK_IMPORTED_MODULE_5__.useDefaultProps)({
|
|
12463
|
+
props: inProps,
|
|
12464
|
+
name: 'MuiFormGroup'
|
|
12465
|
+
});
|
|
12466
|
+
const {
|
|
12467
|
+
className,
|
|
12468
|
+
row = false,
|
|
12469
|
+
...other
|
|
12470
|
+
} = props;
|
|
12471
|
+
const muiFormControl = (0,_FormControl_useFormControl_js__WEBPACK_IMPORTED_MODULE_7__["default"])();
|
|
12472
|
+
const fcs = (0,_FormControl_formControlState_js__WEBPACK_IMPORTED_MODULE_8__["default"])({
|
|
12473
|
+
props,
|
|
12474
|
+
muiFormControl,
|
|
12475
|
+
states: ['error']
|
|
12476
|
+
});
|
|
12477
|
+
const ownerState = {
|
|
12478
|
+
...props,
|
|
12479
|
+
row,
|
|
12480
|
+
error: fcs.error
|
|
12481
|
+
};
|
|
12482
|
+
const classes = useUtilityClasses(ownerState);
|
|
12483
|
+
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_9__.jsx)(FormGroupRoot, {
|
|
12484
|
+
className: (0,clsx__WEBPACK_IMPORTED_MODULE_2__["default"])(classes.root, className),
|
|
12485
|
+
ownerState: ownerState,
|
|
12486
|
+
ref: ref,
|
|
12487
|
+
...other
|
|
12488
|
+
});
|
|
12489
|
+
});
|
|
12490
|
+
true ? FormGroup.propTypes /* remove-proptypes */ = {
|
|
12491
|
+
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
|
12492
|
+
// │ These PropTypes are generated from the TypeScript type definitions. │
|
|
12493
|
+
// │ To update them, edit the d.ts file and run `pnpm proptypes`. │
|
|
12494
|
+
// └─────────────────────────────────────────────────────────────────────┘
|
|
12495
|
+
/**
|
|
12496
|
+
* The content of the component.
|
|
12497
|
+
*/
|
|
12498
|
+
children: prop_types__WEBPACK_IMPORTED_MODULE_1__.node,
|
|
12499
|
+
/**
|
|
12500
|
+
* Override or extend the styles applied to the component.
|
|
12501
|
+
*/
|
|
12502
|
+
classes: prop_types__WEBPACK_IMPORTED_MODULE_1__.object,
|
|
12503
|
+
/**
|
|
12504
|
+
* @ignore
|
|
12505
|
+
*/
|
|
12506
|
+
className: prop_types__WEBPACK_IMPORTED_MODULE_1__.string,
|
|
12507
|
+
/**
|
|
12508
|
+
* Display group of elements in a compact row.
|
|
12509
|
+
* @default false
|
|
12510
|
+
*/
|
|
12511
|
+
row: prop_types__WEBPACK_IMPORTED_MODULE_1__.bool,
|
|
12512
|
+
/**
|
|
12513
|
+
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
12514
|
+
*/
|
|
12515
|
+
sx: prop_types__WEBPACK_IMPORTED_MODULE_1__.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_1__.arrayOf(prop_types__WEBPACK_IMPORTED_MODULE_1__.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_1__.func, prop_types__WEBPACK_IMPORTED_MODULE_1__.object, prop_types__WEBPACK_IMPORTED_MODULE_1__.bool])), prop_types__WEBPACK_IMPORTED_MODULE_1__.func, prop_types__WEBPACK_IMPORTED_MODULE_1__.object])
|
|
12516
|
+
} : 0;
|
|
12517
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (FormGroup);
|
|
12518
|
+
|
|
12519
|
+
/***/ }),
|
|
12520
|
+
|
|
12521
|
+
/***/ "./node_modules/@mui/material/esm/FormGroup/formGroupClasses.js":
|
|
12522
|
+
/*!**********************************************************************!*\
|
|
12523
|
+
!*** ./node_modules/@mui/material/esm/FormGroup/formGroupClasses.js ***!
|
|
12524
|
+
\**********************************************************************/
|
|
12525
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
12526
|
+
|
|
12527
|
+
"use strict";
|
|
12528
|
+
__webpack_require__.r(__webpack_exports__);
|
|
12529
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
12530
|
+
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__),
|
|
12531
|
+
/* harmony export */ getFormGroupUtilityClass: () => (/* binding */ getFormGroupUtilityClass)
|
|
12532
|
+
/* harmony export */ });
|
|
12533
|
+
/* harmony import */ var _mui_utils_generateUtilityClasses__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @mui/utils/generateUtilityClasses */ "./node_modules/@mui/utils/esm/generateUtilityClasses/generateUtilityClasses.js");
|
|
12534
|
+
/* harmony import */ var _mui_utils_generateUtilityClass__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @mui/utils/generateUtilityClass */ "./node_modules/@mui/utils/esm/generateUtilityClass/generateUtilityClass.js");
|
|
12535
|
+
|
|
12536
|
+
|
|
12537
|
+
function getFormGroupUtilityClass(slot) {
|
|
12538
|
+
return (0,_mui_utils_generateUtilityClass__WEBPACK_IMPORTED_MODULE_1__["default"])('MuiFormGroup', slot);
|
|
12539
|
+
}
|
|
12540
|
+
const formGroupClasses = (0,_mui_utils_generateUtilityClasses__WEBPACK_IMPORTED_MODULE_0__["default"])('MuiFormGroup', ['root', 'row', 'error']);
|
|
12541
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (formGroupClasses);
|
|
12542
|
+
|
|
12543
|
+
/***/ }),
|
|
12544
|
+
|
|
12366
12545
|
/***/ "./node_modules/@mui/material/esm/FormHelperText/FormHelperText.js":
|
|
12367
12546
|
/*!*************************************************************************!*\
|
|
12368
12547
|
!*** ./node_modules/@mui/material/esm/FormHelperText/FormHelperText.js ***!
|
|
@@ -100922,21 +101101,21 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
100922
101101
|
/* harmony import */ var _mui_material__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @mui/material */ "./node_modules/@mui/material/esm/Box/Box.js");
|
|
100923
101102
|
/* harmony import */ var _mui_material__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @mui/material */ "./node_modules/@mui/material/esm/Typography/Typography.js");
|
|
100924
101103
|
/* harmony import */ var _mui_material__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @mui/material */ "./node_modules/@mui/material/esm/Container/Container.js");
|
|
100925
|
-
/* harmony import */ var _mui_material__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @mui/material */ "./node_modules/@mui/material/esm/
|
|
100926
|
-
/* harmony import */ var _mui_material__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @mui/material */ "./node_modules/@mui/material/esm/
|
|
100927
|
-
/* harmony import */ var _mui_material__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @mui/material */ "./node_modules/@mui/material/esm/
|
|
100928
|
-
/* harmony import */ var _mui_material__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! @mui/material */ "./node_modules/@mui/material/esm/
|
|
100929
|
-
/* harmony import */ var _mui_material__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! @mui/material */ "./node_modules/@mui/material/esm/
|
|
100930
|
-
/* harmony import */ var _mui_material__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! @mui/material */ "./node_modules/@mui/material/esm/
|
|
100931
|
-
/* harmony import */ var _mui_material__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! @mui/material */ "./node_modules/@mui/material/esm/
|
|
100932
|
-
/* harmony import */ var _mui_material__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! @mui/material */ "./node_modules/@mui/material/esm/
|
|
100933
|
-
/* harmony import */ var _mui_material__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! @mui/material */ "./node_modules/@mui/material/esm/
|
|
100934
|
-
/* harmony import */ var _mui_material__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! @mui/material */ "./node_modules/@mui/material/esm/
|
|
100935
|
-
/* harmony import */ var _mui_material__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! @mui/material */ "./node_modules/@mui/material/esm/
|
|
100936
|
-
/* harmony import */ var _mui_material__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! @mui/material */ "./node_modules/@mui/material/esm/
|
|
100937
|
-
/* harmony import */ var _mui_material__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! @mui/material */ "./node_modules/@mui/material/esm/
|
|
100938
|
-
/* harmony import */ var _mui_material__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! @mui/material */ "./node_modules/@mui/material/esm/
|
|
100939
|
-
/* harmony import */ var _mui_material__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! @mui/material */ "./node_modules/@mui/material/esm/
|
|
101104
|
+
/* harmony import */ var _mui_material__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @mui/material */ "./node_modules/@mui/material/esm/Tooltip/Tooltip.js");
|
|
101105
|
+
/* harmony import */ var _mui_material__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @mui/material */ "./node_modules/@mui/material/esm/IconButton/IconButton.js");
|
|
101106
|
+
/* harmony import */ var _mui_material__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @mui/material */ "./node_modules/@mui/material/esm/Card/Card.js");
|
|
101107
|
+
/* harmony import */ var _mui_material__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! @mui/material */ "./node_modules/@mui/material/esm/CardContent/CardContent.js");
|
|
101108
|
+
/* harmony import */ var _mui_material__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! @mui/material */ "./node_modules/@mui/material/esm/Stack/Stack.js");
|
|
101109
|
+
/* harmony import */ var _mui_material__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! @mui/material */ "./node_modules/@mui/material/esm/Accordion/Accordion.js");
|
|
101110
|
+
/* harmony import */ var _mui_material__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! @mui/material */ "./node_modules/@mui/material/esm/AccordionSummary/AccordionSummary.js");
|
|
101111
|
+
/* harmony import */ var _mui_material__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! @mui/material */ "./node_modules/@mui/material/esm/AccordionDetails/AccordionDetails.js");
|
|
101112
|
+
/* harmony import */ var _mui_material__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! @mui/material */ "./node_modules/@mui/material/esm/TextField/TextField.js");
|
|
101113
|
+
/* harmony import */ var _mui_material__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! @mui/material */ "./node_modules/@mui/material/esm/FormHelperText/FormHelperText.js");
|
|
101114
|
+
/* harmony import */ var _mui_material__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! @mui/material */ "./node_modules/@mui/material/esm/CircularProgress/CircularProgress.js");
|
|
101115
|
+
/* harmony import */ var _mui_material__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! @mui/material */ "./node_modules/@mui/material/esm/Alert/Alert.js");
|
|
101116
|
+
/* harmony import */ var _mui_material__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! @mui/material */ "./node_modules/@mui/material/esm/Divider/Divider.js");
|
|
101117
|
+
/* harmony import */ var _mui_material__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! @mui/material */ "./node_modules/@mui/material/esm/Button/Button.js");
|
|
101118
|
+
/* harmony import */ var _mui_material__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! @mui/material */ "./node_modules/@mui/material/esm/InputAdornment/InputAdornment.js");
|
|
100940
101119
|
/* harmony import */ var _mui_material__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! @mui/material */ "./node_modules/@mui/material/esm/FormControlLabel/FormControlLabel.js");
|
|
100941
101120
|
/* harmony import */ var _mui_material__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! @mui/material */ "./node_modules/@mui/material/esm/Checkbox/Checkbox.js");
|
|
100942
101121
|
/* harmony import */ var _mui_material__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! @mui/material */ "./node_modules/@mui/material/esm/FormControl/FormControl.js");
|
|
@@ -100946,37 +101125,41 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
100946
101125
|
/* harmony import */ var _mui_material__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! @mui/material */ "./node_modules/@mui/material/esm/ToggleButtonGroup/ToggleButtonGroup.js");
|
|
100947
101126
|
/* harmony import */ var _mui_material__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! @mui/material */ "./node_modules/@mui/material/esm/ToggleButton/ToggleButton.js");
|
|
100948
101127
|
/* harmony import */ var _mui_material__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! @mui/material */ "./node_modules/@mui/material/esm/Dialog/Dialog.js");
|
|
100949
|
-
/* harmony import */ var _mui_material__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(/*! @mui/material */ "./node_modules/@mui/material/esm/
|
|
100950
|
-
/* harmony import */ var _mui_material__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(/*! @mui/material */ "./node_modules/@mui/material/esm/
|
|
100951
|
-
/* harmony import */ var _mui_material__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(/*! @mui/material */ "./node_modules/@mui/material/esm/
|
|
100952
|
-
/* harmony import */ var _mui_material__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(/*! @mui/material */ "./node_modules/@mui/material/esm/
|
|
100953
|
-
/* harmony import */ var _mui_material__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(/*! @mui/material */ "./node_modules/@mui/material/esm/
|
|
100954
|
-
/* harmony import */ var _mui_material__WEBPACK_IMPORTED_MODULE_38__ = __webpack_require__(/*! @mui/material */ "./node_modules/@mui/material/esm/
|
|
100955
|
-
/* harmony import */ var
|
|
100956
|
-
/* harmony import */ var
|
|
100957
|
-
/* harmony import */ var _mui_icons_material__WEBPACK_IMPORTED_MODULE_41__ = __webpack_require__(/*! @mui/icons-material */ "./node_modules/@mui/icons-material/esm/
|
|
100958
|
-
/* harmony import */ var _mui_icons_material__WEBPACK_IMPORTED_MODULE_42__ = __webpack_require__(/*! @mui/icons-material */ "./node_modules/@mui/icons-material/esm/
|
|
100959
|
-
/* harmony import */ var _mui_icons_material__WEBPACK_IMPORTED_MODULE_43__ = __webpack_require__(/*! @mui/icons-material */ "./node_modules/@mui/icons-material/esm/
|
|
100960
|
-
/* harmony import */ var _mui_icons_material__WEBPACK_IMPORTED_MODULE_44__ = __webpack_require__(/*! @mui/icons-material */ "./node_modules/@mui/icons-material/esm/
|
|
100961
|
-
/* harmony import */ var _mui_icons_material__WEBPACK_IMPORTED_MODULE_45__ = __webpack_require__(/*! @mui/icons-material */ "./node_modules/@mui/icons-material/esm/
|
|
100962
|
-
/* harmony import */ var _mui_icons_material__WEBPACK_IMPORTED_MODULE_46__ = __webpack_require__(/*! @mui/icons-material */ "./node_modules/@mui/icons-material/esm/
|
|
100963
|
-
/* harmony import */ var _mui_icons_material__WEBPACK_IMPORTED_MODULE_47__ = __webpack_require__(/*! @mui/icons-material */ "./node_modules/@mui/icons-material/esm/
|
|
100964
|
-
/* harmony import */ var _mui_icons_material__WEBPACK_IMPORTED_MODULE_48__ = __webpack_require__(/*! @mui/icons-material */ "./node_modules/@mui/icons-material/esm/
|
|
100965
|
-
/* harmony import */ var _mui_icons_material__WEBPACK_IMPORTED_MODULE_49__ = __webpack_require__(/*! @mui/icons-material */ "./node_modules/@mui/icons-material/esm/
|
|
100966
|
-
/* harmony import */ var _mui_icons_material__WEBPACK_IMPORTED_MODULE_50__ = __webpack_require__(/*! @mui/icons-material */ "./node_modules/@mui/icons-material/esm/
|
|
100967
|
-
/* harmony import */ var _mui_icons_material__WEBPACK_IMPORTED_MODULE_51__ = __webpack_require__(/*! @mui/icons-material */ "./node_modules/@mui/icons-material/esm/
|
|
100968
|
-
/* harmony import */ var _mui_icons_material__WEBPACK_IMPORTED_MODULE_52__ = __webpack_require__(/*! @mui/icons-material */ "./node_modules/@mui/icons-material/esm/
|
|
100969
|
-
/* harmony import */ var _mui_icons_material__WEBPACK_IMPORTED_MODULE_53__ = __webpack_require__(/*! @mui/icons-material */ "./node_modules/@mui/icons-material/esm/
|
|
100970
|
-
/* harmony import */ var _mui_icons_material__WEBPACK_IMPORTED_MODULE_54__ = __webpack_require__(/*! @mui/icons-material */ "./node_modules/@mui/icons-material/esm/
|
|
100971
|
-
/* harmony import */ var _mui_icons_material__WEBPACK_IMPORTED_MODULE_55__ = __webpack_require__(/*! @mui/icons-material */ "./node_modules/@mui/icons-material/esm/
|
|
100972
|
-
/* harmony import */ var _mui_icons_material__WEBPACK_IMPORTED_MODULE_56__ = __webpack_require__(/*! @mui/icons-material */ "./node_modules/@mui/icons-material/esm/
|
|
100973
|
-
/* harmony import */ var _mui_icons_material__WEBPACK_IMPORTED_MODULE_57__ = __webpack_require__(/*! @mui/icons-material */ "./node_modules/@mui/icons-material/esm/
|
|
100974
|
-
/* harmony import */ var _mui_icons_material__WEBPACK_IMPORTED_MODULE_58__ = __webpack_require__(/*! @mui/icons-material */ "./node_modules/@mui/icons-material/esm/
|
|
100975
|
-
/* harmony import */ var
|
|
100976
|
-
/* harmony import */ var
|
|
100977
|
-
/* harmony import */ var
|
|
100978
|
-
/* harmony import */ var
|
|
100979
|
-
/* harmony import */ var
|
|
101128
|
+
/* harmony import */ var _mui_material__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(/*! @mui/material */ "./node_modules/@mui/material/esm/DialogTitle/DialogTitle.js");
|
|
101129
|
+
/* harmony import */ var _mui_material__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(/*! @mui/material */ "./node_modules/@mui/material/esm/DialogContent/DialogContent.js");
|
|
101130
|
+
/* harmony import */ var _mui_material__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(/*! @mui/material */ "./node_modules/@mui/material/esm/DialogActions/DialogActions.js");
|
|
101131
|
+
/* harmony import */ var _mui_material__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(/*! @mui/material */ "./node_modules/@mui/material/esm/Paper/Paper.js");
|
|
101132
|
+
/* harmony import */ var _mui_material__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(/*! @mui/material */ "./node_modules/@mui/material/esm/FormGroup/FormGroup.js");
|
|
101133
|
+
/* harmony import */ var _mui_material__WEBPACK_IMPORTED_MODULE_38__ = __webpack_require__(/*! @mui/material */ "./node_modules/@mui/material/esm/Snackbar/Snackbar.js");
|
|
101134
|
+
/* harmony import */ var _mui_material__WEBPACK_IMPORTED_MODULE_39__ = __webpack_require__(/*! @mui/material */ "./node_modules/@mui/material/esm/styles/createTheme.js");
|
|
101135
|
+
/* harmony import */ var _mui_material__WEBPACK_IMPORTED_MODULE_40__ = __webpack_require__(/*! @mui/material */ "./node_modules/@mui/material/esm/styles/ThemeProvider.js");
|
|
101136
|
+
/* harmony import */ var _mui_icons_material__WEBPACK_IMPORTED_MODULE_41__ = __webpack_require__(/*! @mui/icons-material */ "./node_modules/@mui/icons-material/esm/AccountBalance.js");
|
|
101137
|
+
/* harmony import */ var _mui_icons_material__WEBPACK_IMPORTED_MODULE_42__ = __webpack_require__(/*! @mui/icons-material */ "./node_modules/@mui/icons-material/esm/AttachMoney.js");
|
|
101138
|
+
/* harmony import */ var _mui_icons_material__WEBPACK_IMPORTED_MODULE_43__ = __webpack_require__(/*! @mui/icons-material */ "./node_modules/@mui/icons-material/esm/AutoAwesome.js");
|
|
101139
|
+
/* harmony import */ var _mui_icons_material__WEBPACK_IMPORTED_MODULE_44__ = __webpack_require__(/*! @mui/icons-material */ "./node_modules/@mui/icons-material/esm/Backup.js");
|
|
101140
|
+
/* harmony import */ var _mui_icons_material__WEBPACK_IMPORTED_MODULE_45__ = __webpack_require__(/*! @mui/icons-material */ "./node_modules/@mui/icons-material/esm/Brightness4.js");
|
|
101141
|
+
/* harmony import */ var _mui_icons_material__WEBPACK_IMPORTED_MODULE_46__ = __webpack_require__(/*! @mui/icons-material */ "./node_modules/@mui/icons-material/esm/Brightness7.js");
|
|
101142
|
+
/* harmony import */ var _mui_icons_material__WEBPACK_IMPORTED_MODULE_47__ = __webpack_require__(/*! @mui/icons-material */ "./node_modules/@mui/icons-material/esm/CheckCircle.js");
|
|
101143
|
+
/* harmony import */ var _mui_icons_material__WEBPACK_IMPORTED_MODULE_48__ = __webpack_require__(/*! @mui/icons-material */ "./node_modules/@mui/icons-material/esm/Close.js");
|
|
101144
|
+
/* harmony import */ var _mui_icons_material__WEBPACK_IMPORTED_MODULE_49__ = __webpack_require__(/*! @mui/icons-material */ "./node_modules/@mui/icons-material/esm/CloudDownload.js");
|
|
101145
|
+
/* harmony import */ var _mui_icons_material__WEBPACK_IMPORTED_MODULE_50__ = __webpack_require__(/*! @mui/icons-material */ "./node_modules/@mui/icons-material/esm/ContentCopy.js");
|
|
101146
|
+
/* harmony import */ var _mui_icons_material__WEBPACK_IMPORTED_MODULE_51__ = __webpack_require__(/*! @mui/icons-material */ "./node_modules/@mui/icons-material/esm/ContentPaste.js");
|
|
101147
|
+
/* harmony import */ var _mui_icons_material__WEBPACK_IMPORTED_MODULE_52__ = __webpack_require__(/*! @mui/icons-material */ "./node_modules/@mui/icons-material/esm/DeleteOutline.js");
|
|
101148
|
+
/* harmony import */ var _mui_icons_material__WEBPACK_IMPORTED_MODULE_53__ = __webpack_require__(/*! @mui/icons-material */ "./node_modules/@mui/icons-material/esm/ExpandMore.js");
|
|
101149
|
+
/* harmony import */ var _mui_icons_material__WEBPACK_IMPORTED_MODULE_54__ = __webpack_require__(/*! @mui/icons-material */ "./node_modules/@mui/icons-material/esm/Fullscreen.js");
|
|
101150
|
+
/* harmony import */ var _mui_icons_material__WEBPACK_IMPORTED_MODULE_55__ = __webpack_require__(/*! @mui/icons-material */ "./node_modules/@mui/icons-material/esm/Login.js");
|
|
101151
|
+
/* harmony import */ var _mui_icons_material__WEBPACK_IMPORTED_MODULE_56__ = __webpack_require__(/*! @mui/icons-material */ "./node_modules/@mui/icons-material/esm/Logout.js");
|
|
101152
|
+
/* harmony import */ var _mui_icons_material__WEBPACK_IMPORTED_MODULE_57__ = __webpack_require__(/*! @mui/icons-material */ "./node_modules/@mui/icons-material/esm/NoteAdd.js");
|
|
101153
|
+
/* harmony import */ var _mui_icons_material__WEBPACK_IMPORTED_MODULE_58__ = __webpack_require__(/*! @mui/icons-material */ "./node_modules/@mui/icons-material/esm/OpenInNew.js");
|
|
101154
|
+
/* harmony import */ var _mui_icons_material__WEBPACK_IMPORTED_MODULE_59__ = __webpack_require__(/*! @mui/icons-material */ "./node_modules/@mui/icons-material/esm/Replay.js");
|
|
101155
|
+
/* harmony import */ var _mui_icons_material__WEBPACK_IMPORTED_MODULE_60__ = __webpack_require__(/*! @mui/icons-material */ "./node_modules/@mui/icons-material/esm/Settings.js");
|
|
101156
|
+
/* harmony import */ var _mui_icons_material__WEBPACK_IMPORTED_MODULE_61__ = __webpack_require__(/*! @mui/icons-material */ "./node_modules/@mui/icons-material/esm/Visibility.js");
|
|
101157
|
+
/* harmony import */ var _PromptManagerDialog__WEBPACK_IMPORTED_MODULE_62__ = __webpack_require__(/*! ./PromptManagerDialog */ "./src/PromptManagerDialog.tsx");
|
|
101158
|
+
/* harmony import */ var _promptOverrides__WEBPACK_IMPORTED_MODULE_63__ = __webpack_require__(/*! ./promptOverrides */ "./src/promptOverrides.ts");
|
|
101159
|
+
/* harmony import */ var _appSettingsBundle__WEBPACK_IMPORTED_MODULE_64__ = __webpack_require__(/*! ./appSettingsBundle */ "./src/appSettingsBundle.ts");
|
|
101160
|
+
/* harmony import */ var xlsx__WEBPACK_IMPORTED_MODULE_65__ = __webpack_require__(/*! xlsx */ "./node_modules/xlsx/xlsx.mjs");
|
|
101161
|
+
/* harmony import */ var jszip__WEBPACK_IMPORTED_MODULE_66__ = __webpack_require__(/*! jszip */ "./node_modules/jszip/dist/jszip.min.js");
|
|
101162
|
+
/* harmony import */ var jszip__WEBPACK_IMPORTED_MODULE_66___default = /*#__PURE__*/__webpack_require__.n(jszip__WEBPACK_IMPORTED_MODULE_66__);
|
|
100980
101163
|
|
|
100981
101164
|
|
|
100982
101165
|
|
|
@@ -101699,6 +101882,8 @@ function App() {
|
|
|
101699
101882
|
const [deletingDriveImageIndex, setDeletingDriveImageIndex] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(null);
|
|
101700
101883
|
/** Полноэкранный просмотр сгенерированного крео (url + подпись). */
|
|
101701
101884
|
const [creoFullscreen, setCreoFullscreen] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(null);
|
|
101885
|
+
/** Полный текст ответа валидатора (или сообщение при сбое канала) — для отладки из карточки крео */
|
|
101886
|
+
const [validatorDebugDialog, setValidatorDebugDialog] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(null);
|
|
101702
101887
|
const [uploadingProduct, setUploadingProduct] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(false);
|
|
101703
101888
|
const [folderFilesInfo, setFolderFilesInfo] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(null);
|
|
101704
101889
|
const [rootFolderInfo, setRootFolderInfo] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(null);
|
|
@@ -101749,6 +101934,9 @@ function App() {
|
|
|
101749
101934
|
const [openRouterKeyCopied, setOpenRouterKeyCopied] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(false);
|
|
101750
101935
|
const [loadingContentFromDrive, setLoadingContentFromDrive] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(false);
|
|
101751
101936
|
const [driveFilesFound, setDriveFilesFound] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)({ content: false });
|
|
101937
|
+
/** Креатив/новая папка без project-settings: пользователь нажал «это нормально» — больше не спрашивать для этой папки в сессии. */
|
|
101938
|
+
const dismissedSettingsMissingForFolderRef = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(new Set());
|
|
101939
|
+
const [settingsFileMissingDialog, setSettingsFileMissingDialog] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)({ open: false, folderId: null, retrying: false });
|
|
101752
101940
|
const syncDriveAfterPromptSaveRef = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(() => { });
|
|
101753
101941
|
// Theme state
|
|
101754
101942
|
const [darkMode, setDarkMode] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(() => {
|
|
@@ -101824,7 +102012,7 @@ function App() {
|
|
|
101824
102012
|
}
|
|
101825
102013
|
};
|
|
101826
102014
|
// Create theme based on mode
|
|
101827
|
-
const theme = react__WEBPACK_IMPORTED_MODULE_0___default().useMemo(() => (0,
|
|
102015
|
+
const theme = react__WEBPACK_IMPORTED_MODULE_0___default().useMemo(() => (0,_mui_material__WEBPACK_IMPORTED_MODULE_39__["default"])({
|
|
101828
102016
|
palette: {
|
|
101829
102017
|
mode: darkMode ? 'dark' : 'light',
|
|
101830
102018
|
...(darkMode
|
|
@@ -101879,6 +102067,15 @@ function App() {
|
|
|
101879
102067
|
applyThemeStyles(darkMode);
|
|
101880
102068
|
}, [darkMode]);
|
|
101881
102069
|
const [promptManagerOpen, setPromptManagerOpen] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(false);
|
|
102070
|
+
/** Резервная копия локальных настроек: что включить в экспорт */
|
|
102071
|
+
const [settingsExportFlags, setSettingsExportFlags] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)({ ..._appSettingsBundle__WEBPACK_IMPORTED_MODULE_64__.DEFAULT_EXPORT_FLAGS });
|
|
102072
|
+
/** Загруженный из файла бандл до подтверждения импорта */
|
|
102073
|
+
const [settingsImportBundle, setSettingsImportBundle] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(null);
|
|
102074
|
+
/** Какие блоки из `settingsImportBundle` применить (чекбоксы) */
|
|
102075
|
+
const [settingsImportFlags, setSettingsImportFlags] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(null);
|
|
102076
|
+
const [settingsBackupSnackbar, setSettingsBackupSnackbar] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)({ open: false, message: '', severity: 'success' });
|
|
102077
|
+
const [settingsBackupDialogOpen, setSettingsBackupDialogOpen] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(false);
|
|
102078
|
+
const settingsImportFileInputRef = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null);
|
|
101882
102079
|
/** После загрузки project-settings.json: спросить, подставить подходы из файла или оставить локальные. */
|
|
101883
102080
|
const [approachLoadChoice, setApproachLoadChoice] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(null);
|
|
101884
102081
|
(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => {
|
|
@@ -101930,7 +102127,7 @@ function App() {
|
|
|
101930
102127
|
};
|
|
101931
102128
|
loadKey();
|
|
101932
102129
|
// Load prompt overrides from Electron config
|
|
101933
|
-
(0,
|
|
102130
|
+
(0,_promptOverrides__WEBPACK_IMPORTED_MODULE_63__.loadOverridesFromElectron)();
|
|
101934
102131
|
}, []);
|
|
101935
102132
|
// Save form fields to localStorage whenever they change
|
|
101936
102133
|
(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => {
|
|
@@ -101966,6 +102163,9 @@ function App() {
|
|
|
101966
102163
|
// Don't save while loading from Drive to avoid loops
|
|
101967
102164
|
if (loadingContentFromDrive)
|
|
101968
102165
|
return;
|
|
102166
|
+
// Пока открыт диалог «настройки не найдены» — не создаём/не перезаписываем project-settings (иначе гонка с «перепроверить»)
|
|
102167
|
+
if (settingsFileMissingDialog.open)
|
|
102168
|
+
return;
|
|
101969
102169
|
const folderId = extractFolderId(driveFolderUrl);
|
|
101970
102170
|
if (!folderId)
|
|
101971
102171
|
return;
|
|
@@ -102003,12 +102203,14 @@ function App() {
|
|
|
102003
102203
|
catalogUrlImageAspectParam,
|
|
102004
102204
|
catalogLinkExtraMacros,
|
|
102005
102205
|
driveFolderUrl,
|
|
102006
|
-
loadingContentFromDrive
|
|
102206
|
+
loadingContentFromDrive,
|
|
102207
|
+
settingsFileMissingDialog.open
|
|
102007
102208
|
]);
|
|
102008
102209
|
// Load generated content from Google Drive when driveFolderUrl changes
|
|
102009
102210
|
(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => {
|
|
102010
102211
|
if (!driveFolderUrl) {
|
|
102011
102212
|
logToTerminal('log', '[Load] No driveFolderUrl, skipping load');
|
|
102213
|
+
setSettingsFileMissingDialog({ open: false, folderId: null, retrying: false });
|
|
102012
102214
|
setLoadingContentFromDrive(false);
|
|
102013
102215
|
setDriveFilesFound({ content: false });
|
|
102014
102216
|
// Clear all data when driveFolderUrl is cleared
|
|
@@ -102028,6 +102230,7 @@ function App() {
|
|
|
102028
102230
|
const folderId = extractFolderId(driveFolderUrl);
|
|
102029
102231
|
if (!folderId) {
|
|
102030
102232
|
logToTerminal('warn', '[Load] Invalid driveFolderUrl, cannot extract folderId:', driveFolderUrl);
|
|
102233
|
+
setSettingsFileMissingDialog({ open: false, folderId: null, retrying: false });
|
|
102031
102234
|
setLoadingContentFromDrive(false);
|
|
102032
102235
|
setDriveFilesFound({ content: false });
|
|
102033
102236
|
// Clear all data when folderId cannot be extracted
|
|
@@ -102057,13 +102260,20 @@ function App() {
|
|
|
102057
102260
|
setPairTranslations({});
|
|
102058
102261
|
setPairTranslationFailed(false);
|
|
102059
102262
|
setApproachLoadChoice(null);
|
|
102263
|
+
setSettingsFileMissingDialog({ open: false, folderId: null, retrying: false });
|
|
102060
102264
|
setLoadingContentFromDrive(true);
|
|
102061
102265
|
setDriveFilesFound({ content: false });
|
|
102062
102266
|
// Load content from Google Drive
|
|
102063
|
-
loadGeneratedContentFromDrive(folderId)
|
|
102064
|
-
|
|
102267
|
+
loadGeneratedContentFromDrive(folderId)
|
|
102268
|
+
.then((result) => {
|
|
102269
|
+
logToTerminal('log', '[Load] Content loading completed, found:', result.found, 'noSettingsFile:', Boolean(result.noSettingsFile));
|
|
102065
102270
|
setLoadingContentFromDrive(false);
|
|
102066
|
-
|
|
102271
|
+
if (result.noSettingsFile &&
|
|
102272
|
+
!dismissedSettingsMissingForFolderRef.current.has(folderId)) {
|
|
102273
|
+
setSettingsFileMissingDialog({ open: true, folderId, retrying: false });
|
|
102274
|
+
}
|
|
102275
|
+
})
|
|
102276
|
+
.catch((err) => {
|
|
102067
102277
|
logToTerminal('error', '[Load] Error loading content from Google Drive:', err);
|
|
102068
102278
|
setLoadingContentFromDrive(false);
|
|
102069
102279
|
});
|
|
@@ -103694,7 +103904,7 @@ function App() {
|
|
|
103694
103904
|
setPairTranslations({});
|
|
103695
103905
|
setPairTranslationFailed(false);
|
|
103696
103906
|
// Read pairs count from settings (3–10, default 3)
|
|
103697
|
-
const pairsCountInit = (0,
|
|
103907
|
+
const pairsCountInit = (0,_promptOverrides__WEBPACK_IMPORTED_MODULE_63__.getPairsCount)();
|
|
103698
103908
|
// Initialize placeholders
|
|
103699
103909
|
const initialTitles = Array.from({ length: pairsCountInit }, (_, index) => ({
|
|
103700
103910
|
index: index + 1,
|
|
@@ -103744,7 +103954,7 @@ function App() {
|
|
|
103744
103954
|
})));
|
|
103745
103955
|
await new Promise(r => setTimeout(r, CONTENT_GEN_RETRY_DELAY_MS));
|
|
103746
103956
|
}
|
|
103747
|
-
const selectedIndices = (0,
|
|
103957
|
+
const selectedIndices = (0,_promptOverrides__WEBPACK_IMPORTED_MODULE_63__.getSelectedPairApproaches)();
|
|
103748
103958
|
setLastUsedApproachIndices(selectedIndices);
|
|
103749
103959
|
const pairsCount = selectedIndices.length;
|
|
103750
103960
|
if (attempt === 1) {
|
|
@@ -103828,7 +104038,7 @@ function App() {
|
|
|
103828
104038
|
}
|
|
103829
104039
|
addLog(formatLogMessage('log', `✅ Successfully generated ${parsedTitles} title(s) and ${parsedTexts} text(s)`));
|
|
103830
104040
|
// Save generated content to Google Drive
|
|
103831
|
-
if (driveFolderUrl) {
|
|
104041
|
+
if (driveFolderUrl && !settingsFileMissingDialog.open) {
|
|
103832
104042
|
try {
|
|
103833
104043
|
const folderId = extractFolderId(driveFolderUrl);
|
|
103834
104044
|
if (folderId) {
|
|
@@ -103846,6 +104056,9 @@ function App() {
|
|
|
103846
104056
|
addLog(formatLogMessage('warn', `⚠️ Failed to save content to Google Drive: ${err.message || 'Unknown error'}`));
|
|
103847
104057
|
}
|
|
103848
104058
|
}
|
|
104059
|
+
else if (driveFolderUrl && settingsFileMissingDialog.open) {
|
|
104060
|
+
addLog(formatLogMessage('log', '⏸ Пропуск сохранения в Drive: ответьте в диалоге «настройки не найдены»'));
|
|
104061
|
+
}
|
|
103849
104062
|
const totalTime = Math.floor((Date.now() - startTime) / 1000);
|
|
103850
104063
|
addLog(formatLogMessage('log', `🎉 === Content generation completed ===`));
|
|
103851
104064
|
addLog(formatLogMessage('log', `⏱️ Total time: ${totalTime}s`));
|
|
@@ -104190,8 +104403,15 @@ function App() {
|
|
|
104190
104403
|
else {
|
|
104191
104404
|
logMsg('log', '💶 Поле цены в приложении пустое — валидатор сверяет только визуал двух цен');
|
|
104192
104405
|
}
|
|
104406
|
+
const baseName = (0,_prompts__WEBPACK_IMPORTED_MODULE_2__.getCreoApproachBaseNameFromImageLabel)(approachName?.trim() || '');
|
|
104407
|
+
const approachForBullets = _prompts__WEBPACK_IMPORTED_MODULE_2__.CREO_APPROACHES.find(a => a.name === baseName);
|
|
104408
|
+
const expectNoBullets = approachForBullets
|
|
104409
|
+
? (0,_prompts__WEBPACK_IMPORTED_MODULE_2__.getEffectiveCreoNoBullets)(approachForBullets)
|
|
104410
|
+
: true;
|
|
104193
104411
|
const validationPrompt = (withProductReference ? `${(0,_prompts__WEBPACK_IMPORTED_MODULE_2__.getValidationProductReferencePreamble)()}\n` : '') +
|
|
104194
|
-
(0,_prompts__WEBPACK_IMPORTED_MODULE_2__.getValidationPrompt)(product, geo, keywords, approachName, undefined, priceBriefForValidation
|
|
104412
|
+
(0,_prompts__WEBPACK_IMPORTED_MODULE_2__.getValidationPrompt)(product, geo, keywords, approachName, undefined, priceBriefForValidation, {
|
|
104413
|
+
expectNoBullets
|
|
104414
|
+
});
|
|
104195
104415
|
const visionContent = [
|
|
104196
104416
|
{ type: 'text', text: validationPrompt },
|
|
104197
104417
|
{ type: 'image_url', image_url: { url: imageUrl } }
|
|
@@ -104381,7 +104601,7 @@ function App() {
|
|
|
104381
104601
|
: status === 'needs_rebuild'
|
|
104382
104602
|
? (snippet
|
|
104383
104603
|
? [`Валидатор не выписал строки «ОШИБКА:». Фрагмент ответа: ${snippet}`]
|
|
104384
|
-
: ['Валидатор указал пересборку, но не перечислил причины (нет строк «ОШИБКА:»).
|
|
104604
|
+
: ['Валидатор указал пересборку, но не перечислил причины (нет строк «ОШИБКА:»). Нажмите «Полный ответ валидатора» под карточкой или откройте лог; при необходимости повторите проверку.'])
|
|
104385
104605
|
: [];
|
|
104386
104606
|
if (truncatedByLimit) {
|
|
104387
104607
|
const truncationMsg = 'ОШИБКА: ответ валидатора обрезан по лимиту токенов (OpenRouter/провайдер вернули неполный текст — обычно finish_reason=length). Повторите проверку или выберите модель без тяжёлого reasoning.';
|
|
@@ -104693,7 +104913,7 @@ function App() {
|
|
|
104693
104913
|
addLog(formatLogMessage(level, ...args));
|
|
104694
104914
|
};
|
|
104695
104915
|
logMsg('log', '📦 Creating ZIP archive with HTML and product image...');
|
|
104696
|
-
const zip = new (
|
|
104916
|
+
const zip = new (jszip__WEBPACK_IMPORTED_MODULE_66___default())();
|
|
104697
104917
|
// Replace product image path in HTML to match actual filename (png/jpg/webp)
|
|
104698
104918
|
const htmlWithProductPath = htmlContent.replace(/src=["']product\.(png|jpe?g|webp)["']/gi, `src="${productImageName}"`);
|
|
104699
104919
|
zip.file('index.html', htmlWithProductPath);
|
|
@@ -105037,7 +105257,7 @@ function App() {
|
|
|
105037
105257
|
const expandedTasks = (0,_prompts__WEBPACK_IMPORTED_MODULE_2__.getCreoApproachExpandedTasks)();
|
|
105038
105258
|
if (expandedTasks.length === 0) {
|
|
105039
105259
|
addLog(formatLogMessage('error', '❌ Укажите количество изображений (хотя бы 1) в настройках подходов'));
|
|
105040
|
-
alert(`Укажите количество изображений (1–${
|
|
105260
|
+
alert(`Укажите количество изображений (1–${_promptOverrides__WEBPACK_IMPORTED_MODULE_63__.MAX_IMAGES_PER_CREO_APPROACH}) хотя бы для одного подхода в настройках`);
|
|
105041
105261
|
setGeneratingImages(false);
|
|
105042
105262
|
return;
|
|
105043
105263
|
}
|
|
@@ -106325,8 +106545,8 @@ ${imageData.originalPrompt}
|
|
|
106325
106545
|
catalogUrlCreoApproachParam,
|
|
106326
106546
|
catalogUrlImageAspectParam,
|
|
106327
106547
|
catalogLinkExtraMacros,
|
|
106328
|
-
selectedPairApproaches: (0,
|
|
106329
|
-
imageApproachCounts: (0,
|
|
106548
|
+
selectedPairApproaches: (0,_promptOverrides__WEBPACK_IMPORTED_MODULE_63__.getSelectedPairApproaches)(),
|
|
106549
|
+
imageApproachCounts: (0,_promptOverrides__WEBPACK_IMPORTED_MODULE_63__.getImageApproachCounts)(),
|
|
106330
106550
|
savedAt: new Date().toISOString()
|
|
106331
106551
|
};
|
|
106332
106552
|
const jsonContent = JSON.stringify(dataToSave, null, 2);
|
|
@@ -106400,137 +106620,182 @@ ${imageData.originalPrompt}
|
|
|
106400
106620
|
};
|
|
106401
106621
|
// Load generated content from Google Drive
|
|
106402
106622
|
const loadGeneratedContentFromDrive = async (folderId) => {
|
|
106403
|
-
|
|
106404
|
-
|
|
106405
|
-
|
|
106406
|
-
|
|
106407
|
-
|
|
106408
|
-
|
|
106409
|
-
|
|
106410
|
-
|
|
106411
|
-
|
|
106412
|
-
|
|
106413
|
-
|
|
106414
|
-
|
|
106415
|
-
|
|
106416
|
-
|
|
106417
|
-
|
|
106418
|
-
const
|
|
106419
|
-
|
|
106420
|
-
|
|
106421
|
-
|
|
106422
|
-
|
|
106623
|
+
try {
|
|
106624
|
+
logToTerminal('log', '[Load Content] Starting load from Google Drive, folderId:', folderId);
|
|
106625
|
+
const validToken = await getValidAccessToken();
|
|
106626
|
+
if (!validToken) {
|
|
106627
|
+
logToTerminal('warn', '[Load Content] No valid token, skipping load');
|
|
106628
|
+
setDriveFilesFound(prev => ({ ...prev, content: false }));
|
|
106629
|
+
return { found: false };
|
|
106630
|
+
}
|
|
106631
|
+
// 1) Корень папки проекта; 2) иначе legacy: папка env (без создания env)
|
|
106632
|
+
let fileId = await findSettingsFileInFolder(folderId);
|
|
106633
|
+
if (fileId) {
|
|
106634
|
+
logToTerminal('log', '[Load Content] Found settings in project root');
|
|
106635
|
+
}
|
|
106636
|
+
else {
|
|
106637
|
+
const envIds = await findEnvFolderIds(folderId);
|
|
106638
|
+
for (const envFolderId of envIds) {
|
|
106639
|
+
const id = await findSettingsFileInFolder(envFolderId);
|
|
106640
|
+
if (id) {
|
|
106641
|
+
fileId = id;
|
|
106642
|
+
logToTerminal('log', '[Load Content] Found settings in legacy env folder:', envFolderId);
|
|
106643
|
+
break;
|
|
106644
|
+
}
|
|
106423
106645
|
}
|
|
106424
106646
|
}
|
|
106425
|
-
|
|
106426
|
-
|
|
106427
|
-
|
|
106428
|
-
|
|
106429
|
-
return { found: false };
|
|
106430
|
-
}
|
|
106431
|
-
setDriveFilesFound(prev => ({ ...prev, content: true }));
|
|
106432
|
-
logToTerminal('log', '[Load Content] File found, id:', fileId);
|
|
106433
|
-
// Download file content
|
|
106434
|
-
const downloadUrl = `https://www.googleapis.com/drive/v3/files/${fileId}?alt=media`;
|
|
106435
|
-
const downloadResponse = await fetch(downloadUrl, {
|
|
106436
|
-
headers: {
|
|
106437
|
-
'Authorization': `Bearer ${validToken}`
|
|
106647
|
+
if (!fileId) {
|
|
106648
|
+
logToTerminal('log', `[Load Content] No settings file (${PROJECT_SETTINGS_FILENAME} or ${LEGACY_PROJECT_SETTINGS_FILENAME}) in root or env`);
|
|
106649
|
+
setDriveFilesFound(prev => ({ ...prev, content: false }));
|
|
106650
|
+
return { found: false, noSettingsFile: true };
|
|
106438
106651
|
}
|
|
106439
|
-
|
|
106440
|
-
|
|
106441
|
-
|
|
106442
|
-
|
|
106443
|
-
|
|
106444
|
-
|
|
106445
|
-
|
|
106446
|
-
const jsonContent = await downloadResponse.text();
|
|
106447
|
-
logToTerminal('log', '[Load Content] File downloaded, length:', jsonContent.length);
|
|
106448
|
-
try {
|
|
106449
|
-
const loadedData = JSON.parse(jsonContent);
|
|
106450
|
-
logToTerminal('log', '[Load Content] Parsed settings');
|
|
106451
|
-
// Titles and texts are not loaded from Drive (no longer saved there)
|
|
106452
|
-
// Load AI Generation Settings
|
|
106453
|
-
if (loadedData.aiGenerationSettings) {
|
|
106454
|
-
logToTerminal('log', '[Load Content] Loading AI Generation Settings');
|
|
106455
|
-
const settings = loadedData.aiGenerationSettings;
|
|
106456
|
-
if (settings.generateProduct) {
|
|
106457
|
-
setGenerateProduct(settings.generateProduct);
|
|
106458
|
-
logToTerminal('log', '[Load Content] Loaded generateProduct:', settings.generateProduct);
|
|
106652
|
+
setDriveFilesFound(prev => ({ ...prev, content: true }));
|
|
106653
|
+
logToTerminal('log', '[Load Content] File found, id:', fileId);
|
|
106654
|
+
// Download file content
|
|
106655
|
+
const downloadUrl = `https://www.googleapis.com/drive/v3/files/${fileId}?alt=media`;
|
|
106656
|
+
const downloadResponse = await fetch(downloadUrl, {
|
|
106657
|
+
headers: {
|
|
106658
|
+
'Authorization': `Bearer ${validToken}`
|
|
106459
106659
|
}
|
|
106460
|
-
|
|
106461
|
-
|
|
106462
|
-
|
|
106660
|
+
});
|
|
106661
|
+
if (!downloadResponse.ok) {
|
|
106662
|
+
const errorText = await downloadResponse.text();
|
|
106663
|
+
logToTerminal('warn', '[Load Content] Download failed, status:', downloadResponse.status, 'error:', errorText);
|
|
106664
|
+
setDriveFilesFound(prev => ({ ...prev, content: false }));
|
|
106665
|
+
return { found: false };
|
|
106666
|
+
}
|
|
106667
|
+
const jsonContent = await downloadResponse.text();
|
|
106668
|
+
logToTerminal('log', '[Load Content] File downloaded, length:', jsonContent.length);
|
|
106669
|
+
try {
|
|
106670
|
+
const loadedData = JSON.parse(jsonContent);
|
|
106671
|
+
logToTerminal('log', '[Load Content] Parsed settings');
|
|
106672
|
+
// Titles and texts are not loaded from Drive (no longer saved there)
|
|
106673
|
+
// Load AI Generation Settings
|
|
106674
|
+
if (loadedData.aiGenerationSettings) {
|
|
106675
|
+
logToTerminal('log', '[Load Content] Loading AI Generation Settings');
|
|
106676
|
+
const settings = loadedData.aiGenerationSettings;
|
|
106677
|
+
if (settings.generateProduct) {
|
|
106678
|
+
setGenerateProduct(settings.generateProduct);
|
|
106679
|
+
logToTerminal('log', '[Load Content] Loaded generateProduct:', settings.generateProduct);
|
|
106680
|
+
}
|
|
106681
|
+
if (settings.generateGeo) {
|
|
106682
|
+
setGenerateGeo(settings.generateGeo);
|
|
106683
|
+
logToTerminal('log', '[Load Content] Loaded generateGeo:', settings.generateGeo);
|
|
106684
|
+
}
|
|
106685
|
+
if (settings.generateAdditionalInfo !== undefined) {
|
|
106686
|
+
setGenerateAdditionalInfo(settings.generateAdditionalInfo);
|
|
106687
|
+
logToTerminal('log', '[Load Content] Loaded generateAdditionalInfo');
|
|
106688
|
+
}
|
|
106689
|
+
if (settings.generatePriceWithCurrency) {
|
|
106690
|
+
setGeneratePriceWithCurrency(settings.generatePriceWithCurrency);
|
|
106691
|
+
logToTerminal('log', '[Load Content] Loaded generatePriceWithCurrency:', settings.generatePriceWithCurrency);
|
|
106692
|
+
}
|
|
106463
106693
|
}
|
|
106464
|
-
|
|
106465
|
-
|
|
106466
|
-
|
|
106694
|
+
// Load link (brand is auto-generated from product, geo, price)
|
|
106695
|
+
if (loadedData.link !== undefined) {
|
|
106696
|
+
setLink(loadedData.link || '');
|
|
106697
|
+
logToTerminal('log', '[Load Content] Loaded link:', loadedData.link || '(empty)');
|
|
106467
106698
|
}
|
|
106468
|
-
if (
|
|
106469
|
-
|
|
106470
|
-
logToTerminal('log', '[Load Content] Loaded generatePriceWithCurrency:', settings.generatePriceWithCurrency);
|
|
106699
|
+
if (typeof loadedData.catalogUrlIncludeTextApproach === 'boolean') {
|
|
106700
|
+
setCatalogUrlIncludeTextApproach(loadedData.catalogUrlIncludeTextApproach);
|
|
106471
106701
|
}
|
|
106702
|
+
if (typeof loadedData.catalogUrlIncludeCreoApproach === 'boolean') {
|
|
106703
|
+
setCatalogUrlIncludeCreoApproach(loadedData.catalogUrlIncludeCreoApproach);
|
|
106704
|
+
}
|
|
106705
|
+
if (typeof loadedData.catalogUrlTextApproachParam === 'string' && loadedData.catalogUrlTextApproachParam.trim()) {
|
|
106706
|
+
setCatalogUrlTextApproachParam(loadedData.catalogUrlTextApproachParam.trim());
|
|
106707
|
+
}
|
|
106708
|
+
if (typeof loadedData.catalogUrlCreoApproachParam === 'string' && loadedData.catalogUrlCreoApproachParam.trim()) {
|
|
106709
|
+
setCatalogUrlCreoApproachParam(loadedData.catalogUrlCreoApproachParam.trim());
|
|
106710
|
+
}
|
|
106711
|
+
if (typeof loadedData.catalogUrlIncludeImageAspect === 'boolean') {
|
|
106712
|
+
setCatalogUrlIncludeImageAspect(loadedData.catalogUrlIncludeImageAspect);
|
|
106713
|
+
}
|
|
106714
|
+
if (typeof loadedData.catalogUrlImageAspectParam === 'string' && loadedData.catalogUrlImageAspectParam.trim()) {
|
|
106715
|
+
setCatalogUrlImageAspectParam(loadedData.catalogUrlImageAspectParam.trim());
|
|
106716
|
+
}
|
|
106717
|
+
if (typeof loadedData.catalogLinkExtraMacros === 'string') {
|
|
106718
|
+
setCatalogLinkExtraMacros(loadedData.catalogLinkExtraMacros);
|
|
106719
|
+
}
|
|
106720
|
+
else {
|
|
106721
|
+
setCatalogLinkExtraMacros(DEFAULT_CATALOG_LINK_EXTRA_MACROS);
|
|
106722
|
+
}
|
|
106723
|
+
const parsedApproaches = (0,_promptOverrides__WEBPACK_IMPORTED_MODULE_63__.parseApproachesFromDriveData)(loadedData);
|
|
106724
|
+
const currentPairs = (0,_promptOverrides__WEBPACK_IMPORTED_MODULE_63__.getSelectedPairApproaches)();
|
|
106725
|
+
const currentCounts = (0,_promptOverrides__WEBPACK_IMPORTED_MODULE_63__.getImageApproachCounts)();
|
|
106726
|
+
const hasDrivePairs = parsedApproaches.pairs !== null;
|
|
106727
|
+
const hasDriveCounts = parsedApproaches.counts !== null;
|
|
106728
|
+
if (hasDrivePairs || hasDriveCounts) {
|
|
106729
|
+
const pairsDiffer = hasDrivePairs && !sortedPairIndicesEqual(parsedApproaches.pairs, currentPairs);
|
|
106730
|
+
const countsDiffer = hasDriveCounts && !imageApproachCountsEqual(parsedApproaches.counts, currentCounts);
|
|
106731
|
+
if (pairsDiffer || countsDiffer) {
|
|
106732
|
+
setApproachLoadChoice({
|
|
106733
|
+
savedPairs: parsedApproaches.pairs,
|
|
106734
|
+
savedCounts: parsedApproaches.counts,
|
|
106735
|
+
currentPairs,
|
|
106736
|
+
currentCounts,
|
|
106737
|
+
});
|
|
106738
|
+
logToTerminal('log', '[Load Content] Offer file contains approach settings — asking user to apply or keep current');
|
|
106739
|
+
}
|
|
106740
|
+
}
|
|
106741
|
+
logToTerminal('log', '[Load Content] Successfully loaded content');
|
|
106742
|
+
setDriveFilesFound(prev => ({ ...prev, content: false }));
|
|
106743
|
+
return { found: true };
|
|
106472
106744
|
}
|
|
106473
|
-
|
|
106474
|
-
|
|
106475
|
-
|
|
106476
|
-
|
|
106477
|
-
}
|
|
106478
|
-
if (typeof loadedData.catalogUrlIncludeTextApproach === 'boolean') {
|
|
106479
|
-
setCatalogUrlIncludeTextApproach(loadedData.catalogUrlIncludeTextApproach);
|
|
106480
|
-
}
|
|
106481
|
-
if (typeof loadedData.catalogUrlIncludeCreoApproach === 'boolean') {
|
|
106482
|
-
setCatalogUrlIncludeCreoApproach(loadedData.catalogUrlIncludeCreoApproach);
|
|
106483
|
-
}
|
|
106484
|
-
if (typeof loadedData.catalogUrlTextApproachParam === 'string' && loadedData.catalogUrlTextApproachParam.trim()) {
|
|
106485
|
-
setCatalogUrlTextApproachParam(loadedData.catalogUrlTextApproachParam.trim());
|
|
106486
|
-
}
|
|
106487
|
-
if (typeof loadedData.catalogUrlCreoApproachParam === 'string' && loadedData.catalogUrlCreoApproachParam.trim()) {
|
|
106488
|
-
setCatalogUrlCreoApproachParam(loadedData.catalogUrlCreoApproachParam.trim());
|
|
106489
|
-
}
|
|
106490
|
-
if (typeof loadedData.catalogUrlIncludeImageAspect === 'boolean') {
|
|
106491
|
-
setCatalogUrlIncludeImageAspect(loadedData.catalogUrlIncludeImageAspect);
|
|
106492
|
-
}
|
|
106493
|
-
if (typeof loadedData.catalogUrlImageAspectParam === 'string' && loadedData.catalogUrlImageAspectParam.trim()) {
|
|
106494
|
-
setCatalogUrlImageAspectParam(loadedData.catalogUrlImageAspectParam.trim());
|
|
106745
|
+
catch (err) {
|
|
106746
|
+
logToTerminal('error', '[Load Content] Failed to parse loaded content:', err);
|
|
106747
|
+
setDriveFilesFound(prev => ({ ...prev, content: false }));
|
|
106748
|
+
return { found: false };
|
|
106495
106749
|
}
|
|
106496
|
-
|
|
106497
|
-
|
|
106750
|
+
}
|
|
106751
|
+
catch (err) {
|
|
106752
|
+
logToTerminal('error', '[Load Content] Error loading settings from Drive:', err);
|
|
106753
|
+
setDriveFilesFound(prev => ({ ...prev, content: false }));
|
|
106754
|
+
return { found: false };
|
|
106755
|
+
}
|
|
106756
|
+
};
|
|
106757
|
+
const handleSettingsFileMissingDismissOk = () => {
|
|
106758
|
+
const id = settingsFileMissingDialog.folderId;
|
|
106759
|
+
if (id) {
|
|
106760
|
+
dismissedSettingsMissingForFolderRef.current.add(id);
|
|
106761
|
+
}
|
|
106762
|
+
setSettingsFileMissingDialog({ open: false, folderId: null, retrying: false });
|
|
106763
|
+
};
|
|
106764
|
+
const handleSettingsFileMissingRetry = async () => {
|
|
106765
|
+
const folderId = settingsFileMissingDialog.folderId;
|
|
106766
|
+
if (!folderId)
|
|
106767
|
+
return;
|
|
106768
|
+
setSettingsFileMissingDialog(s => ({ ...s, retrying: true }));
|
|
106769
|
+
setLoadingContentFromDrive(true);
|
|
106770
|
+
try {
|
|
106771
|
+
await new Promise(r => {
|
|
106772
|
+
setTimeout(r, 500);
|
|
106773
|
+
});
|
|
106774
|
+
const result = await loadGeneratedContentFromDrive(folderId);
|
|
106775
|
+
if (result.found) {
|
|
106776
|
+
setSettingsFileMissingDialog({ open: false, folderId: null, retrying: false });
|
|
106498
106777
|
}
|
|
106499
106778
|
else {
|
|
106500
|
-
|
|
106501
|
-
|
|
106502
|
-
|
|
106503
|
-
|
|
106504
|
-
|
|
106505
|
-
const hasDrivePairs = parsedApproaches.pairs !== null;
|
|
106506
|
-
const hasDriveCounts = parsedApproaches.counts !== null;
|
|
106507
|
-
if (hasDrivePairs || hasDriveCounts) {
|
|
106508
|
-
const pairsDiffer = hasDrivePairs && !sortedPairIndicesEqual(parsedApproaches.pairs, currentPairs);
|
|
106509
|
-
const countsDiffer = hasDriveCounts && !imageApproachCountsEqual(parsedApproaches.counts, currentCounts);
|
|
106510
|
-
if (pairsDiffer || countsDiffer) {
|
|
106511
|
-
setApproachLoadChoice({
|
|
106512
|
-
savedPairs: parsedApproaches.pairs,
|
|
106513
|
-
savedCounts: parsedApproaches.counts,
|
|
106514
|
-
currentPairs,
|
|
106515
|
-
currentCounts,
|
|
106516
|
-
});
|
|
106517
|
-
logToTerminal('log', '[Load Content] Offer file contains approach settings — asking user to apply or keep current');
|
|
106779
|
+
if (result.noSettingsFile) {
|
|
106780
|
+
setSettingsFileMissingDialog(s => ({ ...s, retrying: false }));
|
|
106781
|
+
}
|
|
106782
|
+
else {
|
|
106783
|
+
setSettingsFileMissingDialog({ open: false, folderId: null, retrying: false });
|
|
106518
106784
|
}
|
|
106519
106785
|
}
|
|
106520
|
-
logToTerminal('log', '[Load Content] Successfully loaded content');
|
|
106521
|
-
setDriveFilesFound(prev => ({ ...prev, content: false }));
|
|
106522
|
-
return { found: true };
|
|
106523
106786
|
}
|
|
106524
|
-
catch (
|
|
106525
|
-
logToTerminal('error', '[Load Content]
|
|
106526
|
-
|
|
106527
|
-
|
|
106787
|
+
catch (e) {
|
|
106788
|
+
logToTerminal('error', '[Load Content] Retry after missing settings failed:', e);
|
|
106789
|
+
setSettingsFileMissingDialog(s => ({ ...s, retrying: false }));
|
|
106790
|
+
}
|
|
106791
|
+
finally {
|
|
106792
|
+
setLoadingContentFromDrive(false);
|
|
106528
106793
|
}
|
|
106529
106794
|
};
|
|
106530
106795
|
const handleApproachLoadApplyFromFile = () => {
|
|
106531
106796
|
if (!approachLoadChoice)
|
|
106532
106797
|
return;
|
|
106533
|
-
const applied = (0,
|
|
106798
|
+
const applied = (0,_promptOverrides__WEBPACK_IMPORTED_MODULE_63__.applyParsedApproachesFromDrive)(approachLoadChoice.savedPairs, approachLoadChoice.savedCounts);
|
|
106534
106799
|
if (applied) {
|
|
106535
106800
|
logToTerminal('log', '[Load Content] Applied approach settings from offer file (user choice)');
|
|
106536
106801
|
}
|
|
@@ -106543,6 +106808,8 @@ ${imageData.originalPrompt}
|
|
|
106543
106808
|
syncDriveAfterPromptSaveRef.current = () => {
|
|
106544
106809
|
if (!driveFolderUrl || loadingContentFromDrive)
|
|
106545
106810
|
return;
|
|
106811
|
+
if (settingsFileMissingDialog.open)
|
|
106812
|
+
return;
|
|
106546
106813
|
const folderId = extractFolderId(driveFolderUrl);
|
|
106547
106814
|
if (!folderId)
|
|
106548
106815
|
return;
|
|
@@ -106558,8 +106825,8 @@ ${imageData.originalPrompt}
|
|
|
106558
106825
|
};
|
|
106559
106826
|
(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => {
|
|
106560
106827
|
const listener = () => syncDriveAfterPromptSaveRef.current();
|
|
106561
|
-
window.addEventListener(
|
|
106562
|
-
return () => window.removeEventListener(
|
|
106828
|
+
window.addEventListener(_promptOverrides__WEBPACK_IMPORTED_MODULE_63__.PROMPT_OVERRIDES_SAVED_EVENT, listener);
|
|
106829
|
+
return () => window.removeEventListener(_promptOverrides__WEBPACK_IMPORTED_MODULE_63__.PROMPT_OVERRIDES_SAVED_EVENT, listener);
|
|
106563
106830
|
}, []);
|
|
106564
106831
|
const handleGenerate = async () => {
|
|
106565
106832
|
if (!driveFolderUrl || !brand || !link) {
|
|
@@ -106660,8 +106927,8 @@ ${imageData.originalPrompt}
|
|
|
106660
106927
|
}
|
|
106661
106928
|
setGeneratedData(rows);
|
|
106662
106929
|
// Create workbook
|
|
106663
|
-
const wb =
|
|
106664
|
-
const ws =
|
|
106930
|
+
const wb = xlsx__WEBPACK_IMPORTED_MODULE_65__.utils.book_new();
|
|
106931
|
+
const ws = xlsx__WEBPACK_IMPORTED_MODULE_65__.utils.aoa_to_sheet(rows);
|
|
106665
106932
|
// Set column widths (approximate pixel width / 7)
|
|
106666
106933
|
ws['!cols'] = [
|
|
106667
106934
|
{ wch: 20 }, // id
|
|
@@ -106674,9 +106941,9 @@ ${imageData.originalPrompt}
|
|
|
106674
106941
|
{ wch: 40 }, // image_link
|
|
106675
106942
|
{ wch: 20 } // brand
|
|
106676
106943
|
];
|
|
106677
|
-
|
|
106944
|
+
xlsx__WEBPACK_IMPORTED_MODULE_65__.utils.book_append_sheet(wb, ws, "Products");
|
|
106678
106945
|
// Generate buffer
|
|
106679
|
-
const wbout =
|
|
106946
|
+
const wbout = xlsx__WEBPACK_IMPORTED_MODULE_65__.write(wb, { bookType: 'xlsx', type: 'array' });
|
|
106680
106947
|
// Upload to Drive (имя файла по бренду)
|
|
106681
106948
|
const dateStr = new Date().toISOString().split('T')[0];
|
|
106682
106949
|
const fileName = `${brand}-${dateStr}.xlsx`;
|
|
@@ -106806,13 +107073,13 @@ ${imageData.originalPrompt}
|
|
|
106806
107073
|
setTestLoading(true);
|
|
106807
107074
|
try {
|
|
106808
107075
|
// Create simple test workbook with structure
|
|
106809
|
-
const wb =
|
|
107076
|
+
const wb = xlsx__WEBPACK_IMPORTED_MODULE_65__.utils.book_new();
|
|
106810
107077
|
const rows = [
|
|
106811
107078
|
INSTRUCTION_ROW,
|
|
106812
107079
|
['id', 'title', 'description', 'availability', 'condition', 'price', 'link', 'image_link', 'brand'],
|
|
106813
107080
|
['test1', 'Test Title', 'Test Description', 'in stock', 'new', testPrice, 'http://test.com', 'http://test.com/img.jpg', 'TestBrand']
|
|
106814
107081
|
];
|
|
106815
|
-
const ws =
|
|
107082
|
+
const ws = xlsx__WEBPACK_IMPORTED_MODULE_65__.utils.aoa_to_sheet(rows);
|
|
106816
107083
|
// Set column widths
|
|
106817
107084
|
ws['!cols'] = [
|
|
106818
107085
|
{ wch: 20 }, // id
|
|
@@ -106825,8 +107092,8 @@ ${imageData.originalPrompt}
|
|
|
106825
107092
|
{ wch: 40 }, // image_link
|
|
106826
107093
|
{ wch: 20 } // brand
|
|
106827
107094
|
];
|
|
106828
|
-
|
|
106829
|
-
const wbout =
|
|
107095
|
+
xlsx__WEBPACK_IMPORTED_MODULE_65__.utils.book_append_sheet(wb, ws, "Test");
|
|
107096
|
+
const wbout = xlsx__WEBPACK_IMPORTED_MODULE_65__.write(wb, { bookType: 'xlsx', type: 'array' });
|
|
106830
107097
|
// Try to extract folder ID if available, otherwise upload to root
|
|
106831
107098
|
const folderId = driveFolderUrl ? extractFolderId(driveFolderUrl) : undefined;
|
|
106832
107099
|
const result = await uploadFileToDrive(wbout, 'test_table.xlsx', folderId || undefined);
|
|
@@ -106876,9 +107143,170 @@ ${imageData.originalPrompt}
|
|
|
106876
107143
|
alert('Не удалось скопировать в буфер обмена');
|
|
106877
107144
|
}
|
|
106878
107145
|
};
|
|
107146
|
+
const syncUIFromImportedLocalStorage = (m) => {
|
|
107147
|
+
const g = (k) => m[k];
|
|
107148
|
+
const t = g('themeMode');
|
|
107149
|
+
if (t === 'dark' || t === 'light') {
|
|
107150
|
+
const isDark = t === 'dark';
|
|
107151
|
+
setDarkMode(isDark);
|
|
107152
|
+
applyThemeStyles(isDark);
|
|
107153
|
+
}
|
|
107154
|
+
if (g('selectedImageModelSquare'))
|
|
107155
|
+
setSelectedImageModelSquare(g('selectedImageModelSquare'));
|
|
107156
|
+
if (g('selectedImageModelRect'))
|
|
107157
|
+
setSelectedImageModelRect(g('selectedImageModelRect'));
|
|
107158
|
+
if (g('selectedValidationModel'))
|
|
107159
|
+
setSelectedValidationModel(g('selectedValidationModel'));
|
|
107160
|
+
if (g('selectedContentModel'))
|
|
107161
|
+
setSelectedContentModel(g('selectedContentModel'));
|
|
107162
|
+
if (g('selectedLandingModel'))
|
|
107163
|
+
setSelectedLandingModel(g('selectedLandingModel'));
|
|
107164
|
+
if (g('validationDisabled') !== undefined)
|
|
107165
|
+
setValidationDisabled(g('validationDisabled') === 'true');
|
|
107166
|
+
if (g('autoRemakeOnValidatorError') !== undefined) {
|
|
107167
|
+
setAutoRemakeOnValidatorError(g('autoRemakeOnValidatorError') === 'true');
|
|
107168
|
+
}
|
|
107169
|
+
const ar = g('imageAspectRatio');
|
|
107170
|
+
if (ar === '1:1' || ar === '2:3' || ar === 'both')
|
|
107171
|
+
setImageAspectRatio(ar);
|
|
107172
|
+
else if (ar === '4:5' || ar === '9:16')
|
|
107173
|
+
setImageAspectRatio('2:3');
|
|
107174
|
+
if (g('cached_driveFolderUrl') !== undefined)
|
|
107175
|
+
setDriveFolderUrl(g('cached_driveFolderUrl'));
|
|
107176
|
+
if (g('cached_rootDriveFolderUrl') !== undefined)
|
|
107177
|
+
setRootDriveFolderUrl(g('cached_rootDriveFolderUrl'));
|
|
107178
|
+
};
|
|
107179
|
+
const handleSettingsExport = async () => {
|
|
107180
|
+
try {
|
|
107181
|
+
const api = getElectronAPI();
|
|
107182
|
+
let el = null;
|
|
107183
|
+
if (api?.loadConfig) {
|
|
107184
|
+
try {
|
|
107185
|
+
el = (await api.loadConfig());
|
|
107186
|
+
}
|
|
107187
|
+
catch {
|
|
107188
|
+
el = null;
|
|
107189
|
+
}
|
|
107190
|
+
}
|
|
107191
|
+
const bundle = (0,_appSettingsBundle__WEBPACK_IMPORTED_MODULE_64__.buildSettingsBundle)(settingsExportFlags, el);
|
|
107192
|
+
const json = (0,_appSettingsBundle__WEBPACK_IMPORTED_MODULE_64__.serializeBundle)(bundle);
|
|
107193
|
+
if (api?.saveFile) {
|
|
107194
|
+
const ok = await api.saveFile(json, 'docs-combiner-settings.json');
|
|
107195
|
+
if (!ok) {
|
|
107196
|
+
setSettingsBackupSnackbar({ open: true, message: 'Сохранение отменено', severity: 'error' });
|
|
107197
|
+
return;
|
|
107198
|
+
}
|
|
107199
|
+
}
|
|
107200
|
+
else {
|
|
107201
|
+
const blob = new Blob([json], { type: 'application/json' });
|
|
107202
|
+
const a = document.createElement('a');
|
|
107203
|
+
const url = URL.createObjectURL(blob);
|
|
107204
|
+
a.href = url;
|
|
107205
|
+
a.download = 'docs-combiner-settings.json';
|
|
107206
|
+
a.click();
|
|
107207
|
+
URL.revokeObjectURL(url);
|
|
107208
|
+
}
|
|
107209
|
+
setSettingsBackupSnackbar({ open: true, message: 'Настройки экспортированы в JSON', severity: 'success' });
|
|
107210
|
+
}
|
|
107211
|
+
catch (e) {
|
|
107212
|
+
setSettingsBackupSnackbar({
|
|
107213
|
+
open: true,
|
|
107214
|
+
message: e?.message || String(e),
|
|
107215
|
+
severity: 'error',
|
|
107216
|
+
});
|
|
107217
|
+
}
|
|
107218
|
+
};
|
|
107219
|
+
const handleSettingsImportFileChange = (e) => {
|
|
107220
|
+
const file = e.target.files?.[0];
|
|
107221
|
+
e.target.value = '';
|
|
107222
|
+
if (!file)
|
|
107223
|
+
return;
|
|
107224
|
+
const reader = new FileReader();
|
|
107225
|
+
reader.onload = () => {
|
|
107226
|
+
try {
|
|
107227
|
+
const text = String(reader.result || '');
|
|
107228
|
+
const bundle = (0,_appSettingsBundle__WEBPACK_IMPORTED_MODULE_64__.parseSettingsBundleJson)(text);
|
|
107229
|
+
setSettingsImportBundle(bundle);
|
|
107230
|
+
const present = (0,_appSettingsBundle__WEBPACK_IMPORTED_MODULE_64__.getPresentSections)(bundle);
|
|
107231
|
+
setSettingsImportFlags({
|
|
107232
|
+
promptOverrides: present.promptOverrides,
|
|
107233
|
+
localStorage: present.localStorage,
|
|
107234
|
+
electronConfig: present.electronConfig,
|
|
107235
|
+
});
|
|
107236
|
+
}
|
|
107237
|
+
catch (err) {
|
|
107238
|
+
setSettingsBackupSnackbar({
|
|
107239
|
+
open: true,
|
|
107240
|
+
message: err?.message || String(err),
|
|
107241
|
+
severity: 'error',
|
|
107242
|
+
});
|
|
107243
|
+
setSettingsImportBundle(null);
|
|
107244
|
+
setSettingsImportFlags(null);
|
|
107245
|
+
}
|
|
107246
|
+
};
|
|
107247
|
+
reader.onerror = () => {
|
|
107248
|
+
setSettingsBackupSnackbar({ open: true, message: 'Не удалось прочитать файл', severity: 'error' });
|
|
107249
|
+
};
|
|
107250
|
+
reader.readAsText(file);
|
|
107251
|
+
};
|
|
107252
|
+
const handleSettingsImportApply = async () => {
|
|
107253
|
+
if (!settingsImportBundle || !settingsImportFlags)
|
|
107254
|
+
return;
|
|
107255
|
+
const b = settingsImportBundle;
|
|
107256
|
+
const f = settingsImportFlags;
|
|
107257
|
+
let electronConfigSkipped = false;
|
|
107258
|
+
try {
|
|
107259
|
+
if (f.localStorage && b.localStorage && Object.keys(b.localStorage).length) {
|
|
107260
|
+
(0,_appSettingsBundle__WEBPACK_IMPORTED_MODULE_64__.applyLocalStorageFromBundle)(b, true);
|
|
107261
|
+
syncUIFromImportedLocalStorage(b.localStorage);
|
|
107262
|
+
}
|
|
107263
|
+
if (f.promptOverrides) {
|
|
107264
|
+
(0,_appSettingsBundle__WEBPACK_IMPORTED_MODULE_64__.applyPromptOverridesFromBundle)(b, true);
|
|
107265
|
+
}
|
|
107266
|
+
if (f.electronConfig && b.electronConfig && Object.keys(b.electronConfig).length) {
|
|
107267
|
+
const api = getElectronAPI();
|
|
107268
|
+
if (api?.loadConfig && api?.saveConfig) {
|
|
107269
|
+
const cur = (await api.loadConfig());
|
|
107270
|
+
const next = (0,_appSettingsBundle__WEBPACK_IMPORTED_MODULE_64__.mergeElectronImport)(cur, b, true);
|
|
107271
|
+
await api.saveConfig(next);
|
|
107272
|
+
const ec = b.electronConfig;
|
|
107273
|
+
if (ec.clientId !== undefined)
|
|
107274
|
+
setClientId(String(ec.clientId));
|
|
107275
|
+
if (ec.clientSecret !== undefined)
|
|
107276
|
+
setClientSecret(String(ec.clientSecret));
|
|
107277
|
+
if (ec.openaiApiKey !== undefined)
|
|
107278
|
+
setOpenaiApiKey(String(ec.openaiApiKey));
|
|
107279
|
+
if (ec.accessToken !== undefined)
|
|
107280
|
+
setAccessToken(String(ec.accessToken));
|
|
107281
|
+
if (ec.refreshToken !== undefined)
|
|
107282
|
+
setRefreshToken(String(ec.refreshToken));
|
|
107283
|
+
}
|
|
107284
|
+
else {
|
|
107285
|
+
electronConfigSkipped = true;
|
|
107286
|
+
}
|
|
107287
|
+
}
|
|
107288
|
+
setSettingsImportBundle(null);
|
|
107289
|
+
setSettingsImportFlags(null);
|
|
107290
|
+
setSettingsBackupDialogOpen(false);
|
|
107291
|
+
setSettingsBackupSnackbar({
|
|
107292
|
+
open: true,
|
|
107293
|
+
message: electronConfigSkipped
|
|
107294
|
+
? 'Импорт применён. Блок OAuth / ключ OpenRouter / токены Google: только в десктопе (Electron).'
|
|
107295
|
+
: 'Импорт настроек применён',
|
|
107296
|
+
severity: 'success',
|
|
107297
|
+
});
|
|
107298
|
+
}
|
|
107299
|
+
catch (e) {
|
|
107300
|
+
setSettingsBackupSnackbar({
|
|
107301
|
+
open: true,
|
|
107302
|
+
message: e?.message || String(e),
|
|
107303
|
+
severity: 'error',
|
|
107304
|
+
});
|
|
107305
|
+
}
|
|
107306
|
+
};
|
|
106879
107307
|
// Show lock screen if not unlocked
|
|
106880
107308
|
if (!unlocked) {
|
|
106881
|
-
return (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
107309
|
+
return (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_40__["default"], { theme: theme },
|
|
106882
107310
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_5__["default"], null),
|
|
106883
107311
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_6__["default"], { onClick: handleSecretClick, sx: {
|
|
106884
107312
|
width: '100vw',
|
|
@@ -106918,45 +107346,49 @@ ${imageData.originalPrompt}
|
|
|
106918
107346
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("br", null),
|
|
106919
107347
|
"Please contact system administrator"))));
|
|
106920
107348
|
}
|
|
106921
|
-
return (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
107349
|
+
return (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_40__["default"], { theme: theme },
|
|
106922
107350
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_5__["default"], null),
|
|
106923
107351
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_8__["default"], { maxWidth: "lg", sx: { py: 4 } },
|
|
106924
107352
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_6__["default"], { sx: { display: 'flex', justifyContent: 'space-between', alignItems: 'center', mb: 2 } },
|
|
106925
107353
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_7__["default"], { variant: "h4", component: "h1", sx: { fontWeight: 'bold', color: 'primary.main' } }, "Docs Combiner"),
|
|
106926
107354
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_6__["default"], null,
|
|
106927
|
-
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_9__["default"], {
|
|
106928
|
-
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
106929
|
-
|
|
106930
|
-
|
|
106931
|
-
|
|
106932
|
-
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
107355
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_9__["default"], { title: "\u0420\u0435\u0437\u0435\u0440\u0432\u043D\u0430\u044F \u043A\u043E\u043F\u0438\u044F \u043D\u0430\u0441\u0442\u0440\u043E\u0435\u043A (\u044D\u043A\u0441\u043F\u043E\u0440\u0442 / \u0438\u043C\u043F\u043E\u0440\u0442)" },
|
|
107356
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_10__["default"], { onClick: () => setSettingsBackupDialogOpen(true), color: "inherit", "aria-label": "\u0440\u0435\u0437\u0435\u0440\u0432\u043D\u0430\u044F \u043A\u043E\u043F\u0438\u044F \u043D\u0430\u0441\u0442\u0440\u043E\u0435\u043A", sx: { mr: 1 } },
|
|
107357
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_icons_material__WEBPACK_IMPORTED_MODULE_44__["default"], null))),
|
|
107358
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_10__["default"], { onClick: () => setPromptManagerOpen(true), color: "inherit", "aria-label": "manage prompts", sx: { mr: 1 } },
|
|
107359
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_icons_material__WEBPACK_IMPORTED_MODULE_60__["default"], null)),
|
|
107360
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_10__["default"], { onClick: toggleTheme, color: "inherit", "aria-label": "toggle theme" }, darkMode ? react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_icons_material__WEBPACK_IMPORTED_MODULE_46__["default"], null) : react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_icons_material__WEBPACK_IMPORTED_MODULE_45__["default"], null)))),
|
|
107361
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("input", { type: "file", ref: settingsImportFileInputRef, style: { display: 'none' }, accept: "application/json,.json", onChange: handleSettingsImportFileChange }),
|
|
107362
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_11__["default"], { variant: "outlined", sx: { mb: 4 } },
|
|
107363
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_12__["default"], null,
|
|
107364
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_13__["default"], { spacing: 3 },
|
|
106933
107365
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_6__["default"], null,
|
|
106934
107366
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_7__["default"], { variant: "h6", gutterBottom: true }, "Google Drive Authentication"),
|
|
106935
|
-
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
106936
|
-
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
106937
|
-
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
107367
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_14__["default"], { defaultExpanded: false },
|
|
107368
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_15__["default"], { expandIcon: react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_icons_material__WEBPACK_IMPORTED_MODULE_53__["default"], null) }, accessToken ? (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_7__["default"], { sx: { display: 'flex', alignItems: 'center', color: 'success.main' } },
|
|
107369
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_icons_material__WEBPACK_IMPORTED_MODULE_47__["default"], { sx: { mr: 1 } }),
|
|
106938
107370
|
" Logged In (Credentials Hidden)")) : (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_7__["default"], { color: "text.secondary" }, "Credentials"))),
|
|
106939
|
-
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
106940
|
-
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
107371
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_16__["default"], null,
|
|
107372
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_13__["default"], { spacing: 2 },
|
|
106941
107373
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_6__["default"], null,
|
|
106942
107374
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_7__["default"], { variant: "subtitle2", color: "text.secondary", gutterBottom: true }, "\u041A\u043E\u0440\u043D\u0435\u0432\u0430\u044F \u043F\u0430\u043F\u043A\u0430 \u043F\u0440\u043E\u0435\u043A\u0442\u0430"),
|
|
106943
107375
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_7__["default"], { variant: "caption", color: "text.secondary", display: "block", sx: { mb: 1 } }, "\u0421\u0441\u044B\u043B\u043A\u0430 \u043D\u0430 \u043A\u043E\u0440\u043D\u0435\u0432\u0443\u044E \u043F\u0430\u043F\u043A\u0443 \u043D\u0430 Google \u0414\u0438\u0441\u043A\u0435 (\u0432\u043D\u0443\u0442\u0440\u0438 \u043D\u0435\u0451 \u0434\u043E\u043B\u0436\u043D\u0430 \u0431\u044B\u0442\u044C \u043F\u0430\u043F\u043A\u0430 OFFERS)."),
|
|
106944
|
-
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
106945
|
-
checkingRootFolder && (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
107376
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_17__["default"], { label: "URL \u043A\u043E\u0440\u043D\u0435\u0432\u043E\u0439 \u043F\u0430\u043F\u043A\u0438 Google Drive", variant: "outlined", fullWidth: true, value: rootDriveFolderUrl, onChange: (e) => setRootDriveFolderUrl(e.target.value), placeholder: "https://drive.google.com/drive/folders/...", sx: { mb: 1 } }),
|
|
107377
|
+
checkingRootFolder && (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_18__["default"], null,
|
|
106946
107378
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_6__["default"], { component: "span", sx: { display: 'inline-flex', alignItems: 'center', gap: 1 } },
|
|
106947
|
-
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
107379
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_19__["default"], { size: 14 }),
|
|
106948
107380
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("span", null, "\u041F\u0440\u043E\u0432\u0435\u0440\u043A\u0430 \u043A\u043E\u0440\u043D\u0435\u0432\u043E\u0439 \u043F\u0430\u043F\u043A\u0438 (OFFERS, \u0434\u043E\u0441\u0442\u0443\u043F)...")))),
|
|
106949
|
-
drivePublicAccessWarning && extractFolderId(rootDriveFolderUrl) && (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
106950
|
-
!checkingRootFolder && rootFolderInfo && !rootFolderInfo.hasOffersFolder && extractFolderId(rootDriveFolderUrl) && (accessToken || refreshToken) && (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
106951
|
-
!checkingRootFolder && !rootFolderInfo && rootDriveFolderUrl.trim() && (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
107381
|
+
drivePublicAccessWarning && extractFolderId(rootDriveFolderUrl) && (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_20__["default"], { severity: "warning", sx: { mt: 1 } }, "\u041E\u0431\u0449\u0438\u0439 \u0434\u043E\u0441\u0442\u0443\u043F \u043F\u043E \u0441\u0441\u044B\u043B\u043A\u0435 \u0432\u0441\u0451 \u0435\u0449\u0451 \u0432\u043A\u043B\u044E\u0447\u0451\u043D. \u0417\u0430\u043A\u0440\u043E\u0439\u0442\u0435 \u0435\u0433\u043E \u0432\u0440\u0443\u0447\u043D\u0443\u044E \u0432 \u043D\u0430\u0441\u0442\u0440\u043E\u0439\u043A\u0430\u0445 \u0434\u043E\u0441\u0442\u0443\u043F\u0430 Google \u0414\u0438\u0441\u043A\u0430 \u0438\u043B\u0438 \u0441\u043C\u0435\u043D\u0438\u0442\u0435 \u043F\u0430\u043F\u043A\u0443 \u0438 \u0441\u043E\u0433\u043B\u0430\u0441\u0438\u0442\u0435\u0441\u044C \u0443\u0431\u0440\u0430\u0442\u044C \u0434\u043E\u0441\u0442\u0443\u043F \u0430\u0432\u0442\u043E\u043C\u0430\u0442\u0438\u0447\u0435\u0441\u043A\u0438.")),
|
|
107382
|
+
!checkingRootFolder && rootFolderInfo && !rootFolderInfo.hasOffersFolder && extractFolderId(rootDriveFolderUrl) && (accessToken || refreshToken) && (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_20__["default"], { severity: "error", sx: { mt: 1 } }, "\u0412 \u043A\u043E\u0440\u043D\u0435\u0432\u043E\u0439 \u043F\u0430\u043F\u043A\u0435 \u043D\u0435\u0442 \u043F\u043E\u0434\u043F\u0430\u043F\u043A\u0438 OFFERS. \u0421\u043E\u0437\u0434\u0430\u0439\u0442\u0435 \u043F\u0430\u043F\u043A\u0443 \u0441 \u0438\u043C\u0435\u043D\u0435\u043C OFFERS (\u0440\u0435\u0433\u0438\u0441\u0442\u0440 \u043D\u0435 \u0432\u0430\u0436\u0435\u043D) \u0438 \u043F\u043E\u0432\u0442\u043E\u0440\u0438\u0442\u0435 \u043F\u0440\u043E\u0432\u0435\u0440\u043A\u0443.")),
|
|
107383
|
+
!checkingRootFolder && !rootFolderInfo && rootDriveFolderUrl.trim() && (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_18__["default"], null, (accessToken || refreshToken)
|
|
106952
107384
|
? 'Введите корректную ссылку на корневую папку Google Drive'
|
|
106953
107385
|
: 'Войдите в Google, чтобы проверить корневую папку и подпапку OFFERS'))),
|
|
106954
|
-
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
106955
|
-
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
106956
|
-
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
106957
|
-
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
107386
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_17__["default"], { label: "Client ID", variant: "outlined", fullWidth: true, value: clientId, onChange: (e) => handleClientIdChange(e.target.value), helperText: "From Google Cloud Console (OAuth 2.0 Client ID)" }),
|
|
107387
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_17__["default"], { label: "Client Secret", variant: "outlined", fullWidth: true, value: clientSecret, onChange: (e) => handleClientSecretChange(e.target.value) }),
|
|
107388
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_21__["default"], null),
|
|
107389
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_17__["default"], { label: "OpenRouter API Key", variant: "outlined", fullWidth: true, value: openaiApiKey, onChange: (e) => handleOpenaiApiKeyChange(e.target.value), helperText: "Required for AI generation (images and text). Your key is stored locally. Get your key at openrouter.ai" })))),
|
|
106958
107390
|
openaiApiKey && (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_6__["default"], { sx: { display: 'flex', alignItems: 'center', gap: 2, mt: 2 } },
|
|
106959
|
-
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
107391
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_icons_material__WEBPACK_IMPORTED_MODULE_41__["default"], { color: openRouterAccountBalance !== null ? 'primary' : 'disabled' }),
|
|
106960
107392
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_7__["default"], { variant: "body2", color: openRouterAccountBalance !== null ? 'text.primary' : 'text.secondary' },
|
|
106961
107393
|
"\u0411\u0430\u043B\u0430\u043D\u0441: ",
|
|
106962
107394
|
openRouterBalanceLoading ? 'Loading...' : (openRouterAccountBalance !== null ? `$${openRouterAccountBalance.toFixed(2)}` : 'N/A')),
|
|
@@ -106964,35 +107396,35 @@ ${imageData.originalPrompt}
|
|
|
106964
107396
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_7__["default"], { variant: "body2", color: openRouterBalance !== null ? 'text.primary' : 'text.secondary' },
|
|
106965
107397
|
"\u041B\u0438\u043C\u0438\u0442 \u043A\u043B\u044E\u0447\u0430: ",
|
|
106966
107398
|
openRouterBalanceLoading ? 'Loading...' : (openRouterBalance === -1 ? 'Без лимита' : (openRouterBalance !== null ? `${openRouterBalance.toFixed(4)}` : 'N/A'))))),
|
|
106967
|
-
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
106968
|
-
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
107399
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_13__["default"], { direction: "row", spacing: 2, alignItems: "center", sx: { mt: 2 }, flexWrap: "wrap", useFlexGap: true },
|
|
107400
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_22__["default"], { variant: "contained", color: accessToken ? "success" : "primary", onClick: handleLogin, disabled: authLoading || !clientId || !clientSecret, startIcon: authLoading ? react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_19__["default"], { size: 20, color: "inherit" }) : (accessToken ? react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_icons_material__WEBPACK_IMPORTED_MODULE_47__["default"], null) : react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_icons_material__WEBPACK_IMPORTED_MODULE_55__["default"], null)), sx: { flexGrow: 1, minWidth: 200 } }, authLoading ? 'Logging in...' : (accessToken ? 'Logged In' : 'Login with Google')),
|
|
106969
107401
|
authLoading && (react__WEBPACK_IMPORTED_MODULE_0___default().createElement((react__WEBPACK_IMPORTED_MODULE_0___default().Fragment), null,
|
|
106970
|
-
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
106971
|
-
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
106972
|
-
accessToken && (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
106973
|
-
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
107402
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_22__["default"], { variant: "outlined", color: "primary", onClick: () => void handleReopenAuthBrowser(), startIcon: react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_icons_material__WEBPACK_IMPORTED_MODULE_58__["default"], null) }, "\u041E\u0442\u043A\u0440\u044B\u0442\u044C \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0443 \u0432\u0445\u043E\u0434\u0430 \u0441\u043D\u043E\u0432\u0430"),
|
|
107403
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_22__["default"], { variant: "outlined", color: "inherit", onClick: () => void handleCancelPendingAuth(), startIcon: react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_icons_material__WEBPACK_IMPORTED_MODULE_48__["default"], null) }, "\u041E\u0442\u043C\u0435\u043D\u0438\u0442\u044C \u0432\u0445\u043E\u0434"))),
|
|
107404
|
+
accessToken && (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_22__["default"], { variant: "outlined", color: "error", onClick: handleLogout, startIcon: react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_icons_material__WEBPACK_IMPORTED_MODULE_56__["default"], null) }, "Logout")))),
|
|
107405
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_21__["default"], { sx: { my: 2 } }),
|
|
106974
107406
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_6__["default"], null,
|
|
106975
107407
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_7__["default"], { variant: "h6", gutterBottom: true }, "Google Drive Folder"),
|
|
106976
|
-
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
107408
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_13__["default"], { direction: { xs: 'column', sm: 'row' }, spacing: 2 },
|
|
106977
107409
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_6__["default"], { sx: { flexGrow: 1 } },
|
|
106978
|
-
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
106979
|
-
endAdornment: (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
106980
|
-
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
106981
|
-
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
106982
|
-
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
107410
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_17__["default"], { label: "Google Drive Folder URL", variant: "outlined", fullWidth: true, value: driveFolderUrl, onChange: (e) => setDriveFolderUrl(e.target.value), placeholder: "https://drive.google.com/drive/folders/...", InputProps: {
|
|
107411
|
+
endAdornment: (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_23__["default"], { position: "end" },
|
|
107412
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_9__["default"], { title: "\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u044C \u0438\u0437 \u0431\u0443\u0444\u0435\u0440\u0430 \u043E\u0431\u043C\u0435\u043D\u0430" },
|
|
107413
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_10__["default"], { edge: "end", "aria-label": "\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u044C \u0441\u0441\u044B\u043B\u043A\u0443 \u043D\u0430 \u043F\u0430\u043F\u043A\u0443 \u0438\u0437 \u0431\u0443\u0444\u0435\u0440\u0430", onClick: () => void handlePasteDriveFolderUrl() },
|
|
107414
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_icons_material__WEBPACK_IMPORTED_MODULE_51__["default"], null)))))
|
|
106983
107415
|
} }),
|
|
106984
|
-
checkingFolderFiles && (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
107416
|
+
checkingFolderFiles && (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_18__["default"], null,
|
|
106985
107417
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_6__["default"], { component: "span", sx: { display: 'inline-flex', alignItems: 'center', gap: 1 } },
|
|
106986
|
-
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
107418
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_19__["default"], { size: 14 }),
|
|
106987
107419
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("span", null, "\u041F\u0440\u043E\u0432\u0435\u0440\u043A\u0430 \u0444\u0430\u0439\u043B\u043E\u0432 \u0432 \u043F\u0430\u043F\u043A\u0435...")))),
|
|
106988
|
-
!checkingFolderFiles && folderFilesInfo && (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
107420
|
+
!checkingFolderFiles && folderFilesInfo && (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_18__["default"], null,
|
|
106989
107421
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_6__["default"], { component: "span", sx: { display: 'block' } }, folderFilesInfo.hasProduct ? (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_7__["default"], { component: "span", sx: { color: 'success.main' } }, "\u2713 product.png/jpg/webp \u043D\u0430\u0439\u0434\u0435\u043D")) : (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_7__["default"], { component: "span", sx: { color: 'info.main' } }, "\u2139 product.png/jpg/webp \u043D\u0435 \u043D\u0430\u0439\u0434\u0435\u043D \u2014 \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u0435 \u0447\u0435\u0440\u0435\u0437 \u043A\u043D\u043E\u043F\u043A\u0443 \u043D\u0438\u0436\u0435"))))),
|
|
106990
|
-
!checkingFolderFiles && !folderFilesInfo && driveFolderUrl.trim() && (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
107422
|
+
!checkingFolderFiles && !folderFilesInfo && driveFolderUrl.trim() && (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_18__["default"], null, (accessToken || refreshToken)
|
|
106991
107423
|
? 'Введите корректную ссылку на папку Google Drive'
|
|
106992
107424
|
: 'Войдите в Google, чтобы проверить файлы в папке'))))),
|
|
106993
|
-
!driveFolderUrl.trim() ? (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
107425
|
+
!driveFolderUrl.trim() ? (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_20__["default"], { severity: "info", sx: { mt: 2 } },
|
|
106994
107426
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_7__["default"], { variant: "body1", sx: { fontWeight: 'bold', mb: 1 } }, "\u0423\u043A\u0430\u0436\u0438\u0442\u0435 \u043F\u0430\u043F\u043A\u0443 Google Drive \u0434\u043B\u044F \u043F\u0440\u043E\u0434\u043E\u043B\u0436\u0435\u043D\u0438\u044F"),
|
|
106995
|
-
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_7__["default"], { variant: "body2" }, "\u0414\u043B\u044F \u0440\u0430\u0431\u043E\u0442\u044B \u0441 \u0433\u0435\u043D\u0435\u0440\u0430\u0446\u0438\u0435\u0439 \u043A\u043E\u043D\u0442\u0435\u043D\u0442\u0430 \u0438 \u0438\u0437\u043E\u0431\u0440\u0430\u0436\u0435\u043D\u0438\u0439 \u043D\u0435\u043E\u0431\u0445\u043E\u0434\u0438\u043C\u043E \u0443\u043A\u0430\u0437\u0430\u0442\u044C \u043F\u0430\u043F\u043A\u0443 Google Drive."))) : !extractFolderId(driveFolderUrl) ? (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
107427
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_7__["default"], { variant: "body2" }, "\u0414\u043B\u044F \u0440\u0430\u0431\u043E\u0442\u044B \u0441 \u0433\u0435\u043D\u0435\u0440\u0430\u0446\u0438\u0435\u0439 \u043A\u043E\u043D\u0442\u0435\u043D\u0442\u0430 \u0438 \u0438\u0437\u043E\u0431\u0440\u0430\u0436\u0435\u043D\u0438\u0439 \u043D\u0435\u043E\u0431\u0445\u043E\u0434\u0438\u043C\u043E \u0443\u043A\u0430\u0437\u0430\u0442\u044C \u043F\u0430\u043F\u043A\u0443 Google Drive."))) : !extractFolderId(driveFolderUrl) ? (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_20__["default"], { severity: "warning", sx: { mt: 2 } },
|
|
106996
107428
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_7__["default"], { variant: "body1", sx: { fontWeight: 'bold', mb: 1 } }, "\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u043A\u043E\u0440\u0440\u0435\u043A\u0442\u043D\u0443\u044E \u0441\u0441\u044B\u043B\u043A\u0443 \u043D\u0430 \u043F\u0430\u043F\u043A\u0443"),
|
|
106997
107429
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_7__["default"], { variant: "body2" }, "\u0421\u0441\u044B\u043B\u043A\u0430 \u0434\u043E\u043B\u0436\u043D\u0430 \u0431\u044B\u0442\u044C \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435: https://drive.google.com/drive/folders/..."))) : loadingContentFromDrive ? (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_6__["default"], { sx: {
|
|
106998
107430
|
display: 'flex',
|
|
@@ -107008,76 +107440,76 @@ ${imageData.originalPrompt}
|
|
|
107008
107440
|
? 'rgba(25, 118, 210, 0.1)'
|
|
107009
107441
|
: 'rgba(25, 118, 210, 0.05)'
|
|
107010
107442
|
} },
|
|
107011
|
-
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
107443
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_19__["default"], { size: 40, sx: { color: 'primary.main' } }),
|
|
107012
107444
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_7__["default"], { variant: "body1", sx: { color: 'text.secondary', fontWeight: 'bold' } }, "\u0417\u0430\u0433\u0440\u0443\u0437\u043A\u0430 \u0434\u0430\u043D\u043D\u044B\u0445 \u0438\u0437 \u043F\u0430\u043F\u043A\u0438..."))) : (react__WEBPACK_IMPORTED_MODULE_0___default().createElement((react__WEBPACK_IMPORTED_MODULE_0___default().Fragment), null,
|
|
107013
|
-
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
107014
|
-
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
107445
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_13__["default"], { direction: { xs: 'column', sm: 'row' }, spacing: 2 },
|
|
107446
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_17__["default"], { label: "Brand (Short ID)", variant: "outlined", sx: { flex: '0 0 320px', minWidth: 280 }, value: brand, InputProps: { readOnly: true }, placeholder: "\u0410\u0432\u0442\u043E: \u0442\u043E\u0432\u0430\u0440-\u0433\u0435\u043E-\u0446\u0435\u043D\u0430", helperText: "\u0410\u0432\u0442\u043E\u0433\u0435\u043D\u0435\u0440\u0430\u0446\u0438\u044F \u0438\u0437 \u0442\u043E\u0432\u0430\u0440\u0430, \u0433\u0435\u043E \u0438 \u0446\u0435\u043D\u044B" }),
|
|
107015
107447
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_6__["default"], { sx: { flex: 1, minWidth: 0 } },
|
|
107016
|
-
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
107448
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_17__["default"], { label: "Link", variant: "outlined", fullWidth: true, value: link, onChange: (e) => handleLinkChange(e.target.value), onBlur: handleLinkBlur, error: !!linkError, helperText: linkError, placeholder: "https://example.com/product/", inputRef: linkInputRef, InputProps: {
|
|
107017
107449
|
onPaste: handleLinkPaste,
|
|
107018
|
-
endAdornment: (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
107019
|
-
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
107020
|
-
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
107021
|
-
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
107450
|
+
endAdornment: (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_23__["default"], { position: "end" },
|
|
107451
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_9__["default"], { title: "\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u044C \u0438\u0437 \u0431\u0443\u0444\u0435\u0440\u0430 \u043E\u0431\u043C\u0435\u043D\u0430" },
|
|
107452
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_10__["default"], { edge: "end", "aria-label": "\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u044C \u0441\u0441\u044B\u043B\u043A\u0443 \u043D\u0430 \u0442\u043E\u0432\u0430\u0440 \u0438\u0437 \u0431\u0443\u0444\u0435\u0440\u0430", onClick: () => void handlePasteProductLink() },
|
|
107453
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_icons_material__WEBPACK_IMPORTED_MODULE_51__["default"], null)))))
|
|
107022
107454
|
} }))),
|
|
107023
107455
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_6__["default"], { sx: { display: 'flex', gap: 1, alignItems: 'flex-start', mt: 1.5 } },
|
|
107024
|
-
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
107025
|
-
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
107026
|
-
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
107027
|
-
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
107028
|
-
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
107029
|
-
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
107456
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_17__["default"], { label: "\u0414\u043E\u043F. \u043C\u0430\u043A\u0440\u043E\u0441\u044B (\u043A\u0430\u0442\u0430\u043B\u043E\u0433)", variant: "outlined", size: "small", fullWidth: true, multiline: true, minRows: 2, value: catalogLinkExtraMacros, onChange: (e) => setCatalogLinkExtraMacros(e.target.value), placeholder: DEFAULT_CATALOG_LINK_EXTRA_MACROS, helperText: "\u0414\u043E\u0431\u0430\u0432\u043B\u044F\u0435\u0442\u0441\u044F \u043F\u043E\u0441\u043B\u0435 creative_id \u0438 \u043F\u0430\u0440\u0430\u043C\u0435\u0442\u0440\u043E\u0432 \u043F\u043E\u0434\u0445\u043E\u0434\u043E\u0432 (sub18, sub19, sub20 \u043F\u0440\u0438 \u0432\u043A\u043B\u044E\u0447\u0435\u043D\u0438\u0438). \u0421\u043E\u0445\u0440\u0430\u043D\u044F\u0435\u0442\u0441\u044F \u0432 JSON \u043D\u0430\u0441\u0442\u0440\u043E\u0435\u043A \u043F\u0430\u043F\u043A\u0438.", sx: { '& .MuiInputBase-input': { fontFamily: 'monospace', fontSize: 12 } } }),
|
|
107457
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_13__["default"], { spacing: 0.5, sx: { flexShrink: 0, mt: 0.5 } },
|
|
107458
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_22__["default"], { size: "small", variant: "outlined", onClick: () => setCatalogLinkExtraMacros(DEFAULT_CATALOG_LINK_EXTRA_MACROS), sx: { textTransform: 'none', whiteSpace: 'nowrap' } }, "redtrack"),
|
|
107459
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_22__["default"], { size: "small", variant: "outlined", onClick: () => setCatalogLinkExtraMacros(DEFAULT_CATALOG_LINK_KEITARO_MACROS), sx: { textTransform: 'none', whiteSpace: 'nowrap' } }, "keitaro"))),
|
|
107460
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_13__["default"], { spacing: 1.5, sx: { mt: 1 } },
|
|
107461
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_13__["default"], { direction: { xs: 'column', sm: 'row' }, spacing: 2, alignItems: { xs: 'stretch', sm: 'flex-start' } },
|
|
107030
107462
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_24__["default"], { control: react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_25__["default"], { checked: catalogUrlIncludeTextApproach, onChange: e => setCatalogUrlIncludeTextApproach(e.target.checked), size: "small" }), label: react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_6__["default"], null,
|
|
107031
107463
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_7__["default"], { variant: "body2" }, "\u041F\u043E\u0434\u0445\u043E\u0434 \u043A \u0442\u0435\u043A\u0441\u0442\u0443 \u0432 URL \u043A\u0430\u0442\u0430\u043B\u043E\u0433\u0430"),
|
|
107032
107464
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_7__["default"], { variant: "caption", color: "text.secondary" }, "\u0417\u043D\u0430\u0447\u0435\u043D\u0438\u0435 \u2014 \u043D\u043E\u043C\u0435\u0440 \u0441\u0442\u0440\u043E\u043A\u0438 \u043F\u043E\u0434\u0445\u043E\u0434\u0430 \u0434\u043B\u044F \u043F\u0430\u0440 \u0432 \u0442\u0430\u0431\u043B\u0438\u0446\u0435 \u043D\u0430\u0441\u0442\u0440\u043E\u0435\u043A (1\u201310)")), sx: { alignItems: 'flex-start', mr: 0, flex: { sm: '1 1 200px' }, minWidth: 0 } }),
|
|
107033
|
-
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
107034
|
-
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
107465
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_17__["default"], { label: "\u041F\u0430\u0440\u0430\u043C\u0435\u0442\u0440 \u0434\u043B\u044F \u0442\u0435\u043A\u0441\u0442\u0430", size: "small", value: catalogUrlTextApproachParam, onChange: e => setCatalogUrlTextApproachParam(e.target.value), placeholder: DEFAULT_CATALOG_TEXT_APPROACH_PARAM, sx: { width: { xs: '100%', sm: 200 }, flexShrink: 0 }, helperText: `По умолчанию: ${DEFAULT_CATALOG_TEXT_APPROACH_PARAM}` })),
|
|
107466
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_13__["default"], { direction: { xs: 'column', sm: 'row' }, spacing: 2, alignItems: { xs: 'stretch', sm: 'flex-start' } },
|
|
107035
107467
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_24__["default"], { control: react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_25__["default"], { checked: catalogUrlIncludeCreoApproach, onChange: e => setCatalogUrlIncludeCreoApproach(e.target.checked), size: "small" }), label: react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_6__["default"], null,
|
|
107036
107468
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_7__["default"], { variant: "body2" }, "\u041F\u043E\u0434\u0445\u043E\u0434 \u043A \u043A\u0440\u0435\u043E \u0432 URL \u043A\u0430\u0442\u0430\u043B\u043E\u0433\u0430"),
|
|
107037
107469
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_7__["default"], { variant: "caption", color: "text.secondary" }, "\u0417\u043D\u0430\u0447\u0435\u043D\u0438\u0435 \u2014 \u043D\u043E\u043C\u0435\u0440 N \u0438\u0437 \u0438\u043C\u0435\u043D\u0438 N_xxxxxxxx_11|23.png \u043D\u0430 Drive (N = \u0441\u0442\u0440\u043E\u043A\u0430 \u043F\u043E\u0434\u0445\u043E\u0434\u0430 \u043A \u043A\u0440\u0435\u043E, 1\u201310); \u00AB (1)\u00BB \u043E\u0442 \u0434\u0443\u0431\u043B\u0438\u043A\u0430\u0442\u0430 Google \u0441\u043D\u0438\u043C\u0430\u0435\u0442\u0441\u044F")), sx: { alignItems: 'flex-start', mr: 0, flex: { sm: '1 1 200px' }, minWidth: 0 } }),
|
|
107038
|
-
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
107039
|
-
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
107470
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_17__["default"], { label: "\u041F\u0430\u0440\u0430\u043C\u0435\u0442\u0440 \u0434\u043B\u044F \u043A\u0440\u0435\u043E", size: "small", value: catalogUrlCreoApproachParam, onChange: e => setCatalogUrlCreoApproachParam(e.target.value), placeholder: DEFAULT_CATALOG_CREO_APPROACH_PARAM, sx: { width: { xs: '100%', sm: 200 }, flexShrink: 0 }, helperText: `По умолчанию: ${DEFAULT_CATALOG_CREO_APPROACH_PARAM}` })),
|
|
107471
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_13__["default"], { direction: { xs: 'column', sm: 'row' }, spacing: 2, alignItems: { xs: 'stretch', sm: 'flex-start' } },
|
|
107040
107472
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_24__["default"], { control: react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_25__["default"], { checked: catalogUrlIncludeImageAspect, onChange: e => setCatalogUrlIncludeImageAspect(e.target.checked), size: "small" }), label: react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_6__["default"], null,
|
|
107041
107473
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_7__["default"], { variant: "body2" }, "\u0422\u0438\u043F \u0438\u0437\u043E\u0431\u0440\u0430\u0436\u0435\u043D\u0438\u044F \u0432 URL \u043A\u0430\u0442\u0430\u043B\u043E\u0433\u0430"),
|
|
107042
107474
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_7__["default"], { variant: "caption", color: "text.secondary" }, "\u0417\u043D\u0430\u0447\u0435\u043D\u0438\u044F 1_1 (1:1) \u0438 2_3 (2:3) \u2014 \u0438\u0437 \u0441\u0443\u0444\u0444\u0438\u043A\u0441\u0430 _11 / _23 \u0432 \u0438\u043C\u0435\u043D\u0438 \u0444\u0430\u0439\u043B\u0430 \u043D\u0430 Drive \u0438\u043B\u0438 \u0438\u0437 \u043D\u0430\u0441\u0442\u0440\u043E\u0439\u043A\u0438 \u0441\u043E\u043E\u0442\u043D\u043E\u0448\u0435\u043D\u0438\u044F, \u0435\u0441\u043B\u0438 \u0441\u0443\u0444\u0444\u0438\u043A\u0441\u0430 \u043D\u0435\u0442")), sx: { alignItems: 'flex-start', mr: 0, flex: { sm: '1 1 200px' }, minWidth: 0 } }),
|
|
107043
|
-
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
107044
|
-
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
107475
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_17__["default"], { label: "\u041F\u0430\u0440\u0430\u043C\u0435\u0442\u0440 \u0434\u043B\u044F \u0442\u0438\u043F\u0430 \u0438\u0437\u043E\u0431\u0440\u0430\u0436\u0435\u043D\u0438\u044F", size: "small", value: catalogUrlImageAspectParam, onChange: e => setCatalogUrlImageAspectParam(e.target.value), placeholder: DEFAULT_CATALOG_IMAGE_ASPECT_PARAM, sx: { width: { xs: '100%', sm: 200 }, flexShrink: 0 }, helperText: `По умолчанию: ${DEFAULT_CATALOG_IMAGE_ASPECT_PARAM}` }))),
|
|
107476
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_21__["default"], { sx: { my: 2 } }),
|
|
107045
107477
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_7__["default"], { variant: "h6", gutterBottom: true }, "AI Generation Settings"),
|
|
107046
107478
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_6__["default"], null,
|
|
107047
|
-
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
107048
|
-
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
107049
|
-
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
107050
|
-
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
107051
|
-
endAdornment: (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
107479
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_17__["default"], { label: "\u0422\u043E\u0432\u0430\u0440", variant: "outlined", fullWidth: true, value: generateProduct, onChange: (e) => setGenerateProduct(e.target.value), placeholder: "\u043D\u0430\u043F\u0440\u0438\u043C\u0435\u0440: \u043A\u0430\u043F\u043B\u0438 \u043E\u0442 \u043F\u0430\u0440\u0430\u0437\u0438\u0442\u043E\u0432 Detoxil Water", sx: { mb: 2 } })),
|
|
107480
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_13__["default"], { direction: "row", spacing: 2, sx: { mb: 2 } },
|
|
107481
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_17__["default"], { label: "\u0413\u0435\u043E", variant: "outlined", fullWidth: true, value: generateGeo, onChange: (e) => setGenerateGeo(e.target.value), placeholder: "\u043D\u0430\u043F\u0440\u0438\u043C\u0435\u0440: \u0420\u0443\u043C\u044B\u043D\u0438\u044F" }),
|
|
107482
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_17__["default"], { label: "\u0426\u0435\u043D\u0430 \u0438 \u0432\u0430\u043B\u044E\u0442\u0430", variant: "outlined", fullWidth: true, value: generatePriceWithCurrency, onChange: (e) => setGeneratePriceWithCurrency(e.target.value), placeholder: "\u043D\u0430\u043F\u0440\u0438\u043C\u0435\u0440: 29 euro, 11400 HUF, 149 RON \u0438\u043B\u0438 \u043B\u044E\u0431\u043E\u0439 \u0434\u0440\u0443\u0433\u043E\u0439 \u0444\u043E\u0440\u043C\u0430\u0442", helperText: "\u041B\u044E\u0431\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435 \u0434\u043B\u044F \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u043D\u0438\u044F \u0432 \u043F\u0440\u043E\u043C\u043F\u0442\u0435 \u0433\u0435\u043D\u0435\u0440\u0430\u0446\u0438\u0438 \u0438\u0437\u043E\u0431\u0440\u0430\u0436\u0435\u043D\u0438\u0439. \u041A\u043D\u043E\u043F\u043A\u0438 \u0441\u043F\u0440\u0430\u0432\u0430 \u043F\u043E\u0434\u0441\u0442\u0430\u0432\u043B\u044F\u044E\u0442 \u0441\u0438\u043C\u0432\u043E\u043B \u0432\u0430\u043B\u044E\u0442\u044B, \u0446\u0438\u0444\u0440\u0443 \u0431\u0435\u0440\u0443\u0442 \u0438\u0437 \u043F\u043E\u043B\u044F (\u0438\u043B\u0438 99).", InputProps: {
|
|
107483
|
+
endAdornment: (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_23__["default"], { position: "end" },
|
|
107052
107484
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_6__["default"], { sx: { display: 'flex', alignItems: 'center', gap: 0.25, mr: -0.5 } },
|
|
107053
|
-
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
107054
|
-
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
107485
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_9__["default"], { title: "\u041F\u043E\u0434\u0441\u0442\u0430\u0432\u0438\u0442\u044C $ (\u0446\u0438\u0444\u0440\u0430 \u0438\u0437 \u043F\u043E\u043B\u044F \u0438\u043B\u0438 99)" },
|
|
107486
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_10__["default"], { size: "small", "aria-label": "\u0411\u044B\u0441\u0442\u0440\u043E \u0434\u043E\u043B\u043B\u0430\u0440", onClick: () => {
|
|
107055
107487
|
const n = extractLeadingPriceNumber(generatePriceWithCurrency);
|
|
107056
107488
|
setGeneratePriceWithCurrency(`$${n}`);
|
|
107057
107489
|
}, edge: "end" },
|
|
107058
|
-
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
107059
|
-
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
107060
|
-
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
107490
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_icons_material__WEBPACK_IMPORTED_MODULE_42__["default"], { sx: { fontSize: 20 } }))),
|
|
107491
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_9__["default"], { title: "\u041F\u043E\u0434\u0441\u0442\u0430\u0432\u0438\u0442\u044C \u20AC (\u0446\u0438\u0444\u0440\u0430 \u0438\u0437 \u043F\u043E\u043B\u044F \u0438\u043B\u0438 99)" },
|
|
107492
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_10__["default"], { size: "small", "aria-label": "\u0411\u044B\u0441\u0442\u0440\u043E \u0435\u0432\u0440\u043E", onClick: () => {
|
|
107061
107493
|
const n = extractLeadingPriceNumber(generatePriceWithCurrency);
|
|
107062
107494
|
setGeneratePriceWithCurrency(`€${n}`);
|
|
107063
107495
|
}, edge: "end", sx: { minWidth: 34, fontSize: '1rem', fontWeight: 700 } }, "\u20AC")),
|
|
107064
|
-
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
107065
|
-
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
107496
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_9__["default"], { title: "\u041F\u043E\u0434\u0441\u0442\u0430\u0432\u0438\u0442\u044C z\u0142 (\u0446\u0438\u0444\u0440\u0430 \u0438\u0437 \u043F\u043E\u043B\u044F \u0438\u043B\u0438 99)" },
|
|
107497
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_10__["default"], { size: "small", "aria-label": "\u0411\u044B\u0441\u0442\u0440\u043E \u0437\u043B\u043E\u0442\u044B\u0435", onClick: () => {
|
|
107066
107498
|
const n = extractLeadingPriceNumber(generatePriceWithCurrency);
|
|
107067
107499
|
setGeneratePriceWithCurrency(`${n} zł`);
|
|
107068
107500
|
}, edge: "end", sx: { minWidth: 36, fontSize: '0.8rem', fontWeight: 700, letterSpacing: -0.3 } }, "z\u0142"))))),
|
|
107069
107501
|
} })),
|
|
107070
107502
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_6__["default"], null,
|
|
107071
|
-
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
107503
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_17__["default"], { label: "\u0414\u043E\u043F\u043E\u043B\u043D\u0438\u0442\u0435\u043B\u044C\u043D\u0430\u044F \u0438\u043D\u0444\u043E\u0440\u043C\u0430\u0446\u0438\u044F (\u043D\u0435 \u043E\u0431\u044F\u0437\u0430\u0442\u0435\u043B\u044C\u043D\u043E)", variant: "outlined", fullWidth: true, multiline: true, minRows: 3, value: generateAdditionalInfo, onChange: (e) => setGenerateAdditionalInfo(e.target.value), placeholder: "\u0418\u043D\u0433\u0440\u0435\u0434\u0438\u0435\u043D\u0442\u044B, \u0443\u0442\u043E\u0447\u043D\u0435\u043D\u0438\u044F \u043A \u043F\u0440\u043E\u043C\u043F\u0442\u0443 \u0438 \u0442.\u0434.", sx: { mb: 2 } })),
|
|
107072
107504
|
openaiApiKey && (react__WEBPACK_IMPORTED_MODULE_0___default().createElement((react__WEBPACK_IMPORTED_MODULE_0___default().Fragment), null,
|
|
107073
|
-
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
107505
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_13__["default"], { direction: { xs: 'column', md: 'row' }, spacing: 2, sx: { mb: 2, alignItems: 'stretch' } },
|
|
107074
107506
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_26__["default"], { fullWidth: true, variant: "outlined", sx: { flex: { md: '1 1 0' }, minWidth: { md: 0 } } },
|
|
107075
107507
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_27__["default"], null, "\u041C\u043E\u0434\u0435\u043B\u044C \u0434\u043B\u044F \u043A\u0432\u0430\u0434\u0440\u0430\u0442\u043E\u0432 (1:1)"),
|
|
107076
107508
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_28__["default"], { value: selectedImageModelSquare, onChange: (e) => handleImageModelSquareChange(e.target.value), label: "\u041C\u043E\u0434\u0435\u043B\u044C \u0434\u043B\u044F \u043A\u0432\u0430\u0434\u0440\u0430\u0442\u043E\u0432 (1:1)", disabled: loadingImageModels || imageModels.length === 0 }, loadingImageModels ? (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_29__["default"], { disabled: true },
|
|
107077
107509
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_6__["default"], { sx: { display: 'flex', alignItems: 'center', gap: 1 } },
|
|
107078
|
-
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
107510
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_19__["default"], { size: 16 }),
|
|
107079
107511
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("span", null, "\u0417\u0430\u0433\u0440\u0443\u0437\u043A\u0430 \u043C\u043E\u0434\u0435\u043B\u0435\u0439...")))) : imageModels.length === 0 ? (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_29__["default"], { disabled: true }, "\u041D\u0435\u0442 \u0434\u043E\u0441\u0442\u0443\u043F\u043D\u044B\u0445 \u043C\u043E\u0434\u0435\u043B\u0435\u0439")) : (imageModels.map((model) => (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_29__["default"], { key: model.id, value: model.id }, model.name))))),
|
|
107080
|
-
!loadingImageModels && imageModels.length > 0 && (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
107512
|
+
!loadingImageModels && imageModels.length > 0 && (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_18__["default"], null, selectedImageModelSquare === _models__WEBPACK_IMPORTED_MODULE_3__.MODELS.imageGeneration
|
|
107081
107513
|
? 'По умолчанию для квадрата'
|
|
107082
107514
|
: '1:1: ' +
|
|
107083
107515
|
(imageModels.find(m => m.id === selectedImageModelSquare)?.name ||
|
|
@@ -107086,9 +107518,9 @@ ${imageData.originalPrompt}
|
|
|
107086
107518
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_27__["default"], null, "\u041C\u043E\u0434\u0435\u043B\u044C \u0434\u043B\u044F \u043F\u0440\u044F\u043C\u043E\u0443\u0433\u043E\u043B\u044C\u043D\u0438\u043A\u043E\u0432 (2:3)"),
|
|
107087
107519
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_28__["default"], { value: selectedImageModelRect, onChange: (e) => handleImageModelRectChange(e.target.value), label: "\u041C\u043E\u0434\u0435\u043B\u044C \u0434\u043B\u044F \u043F\u0440\u044F\u043C\u043E\u0443\u0433\u043E\u043B\u044C\u043D\u0438\u043A\u043E\u0432 (2:3)", disabled: loadingImageModels || imageModels.length === 0 }, loadingImageModels ? (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_29__["default"], { disabled: true },
|
|
107088
107520
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_6__["default"], { sx: { display: 'flex', alignItems: 'center', gap: 1 } },
|
|
107089
|
-
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
107521
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_19__["default"], { size: 16 }),
|
|
107090
107522
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("span", null, "\u0417\u0430\u0433\u0440\u0443\u0437\u043A\u0430 \u043C\u043E\u0434\u0435\u043B\u0435\u0439...")))) : imageModels.length === 0 ? (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_29__["default"], { disabled: true }, "\u041D\u0435\u0442 \u0434\u043E\u0441\u0442\u0443\u043F\u043D\u044B\u0445 \u043C\u043E\u0434\u0435\u043B\u0435\u0439")) : (imageModels.map((model) => (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_29__["default"], { key: model.id, value: model.id }, model.name))))),
|
|
107091
|
-
!loadingImageModels && imageModels.length > 0 && (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
107523
|
+
!loadingImageModels && imageModels.length > 0 && (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_18__["default"], null, selectedImageModelRect === _models__WEBPACK_IMPORTED_MODULE_3__.MODELS.imageGeneration
|
|
107092
107524
|
? 'По умолчанию для 2:3'
|
|
107093
107525
|
: '2:3: ' +
|
|
107094
107526
|
(imageModels.find(m => m.id === selectedImageModelRect)?.name ||
|
|
@@ -107097,24 +107529,24 @@ ${imageData.originalPrompt}
|
|
|
107097
107529
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_27__["default"], null, "\u041C\u043E\u0434\u0435\u043B\u044C \u0434\u043B\u044F \u043F\u0440\u043E\u0432\u0435\u0440\u043A\u0438 \u043A\u0440\u0435\u0430\u0442\u0438\u0432\u043E\u0432"),
|
|
107098
107530
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_28__["default"], { value: selectedValidationModel, onChange: (e) => handleValidationModelChange(e.target.value), label: "\u041C\u043E\u0434\u0435\u043B\u044C \u0434\u043B\u044F \u043F\u0440\u043E\u0432\u0435\u0440\u043A\u0438 \u043A\u0440\u0435\u0430\u0442\u0438\u0432\u043E\u0432", disabled: loadingValidationModels || validationModels.length === 0 }, loadingValidationModels ? (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_29__["default"], { disabled: true },
|
|
107099
107531
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_6__["default"], { sx: { display: 'flex', alignItems: 'center', gap: 1 } },
|
|
107100
|
-
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
107532
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_19__["default"], { size: 16 }),
|
|
107101
107533
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("span", null, "\u0417\u0430\u0433\u0440\u0443\u0437\u043A\u0430 \u043C\u043E\u0434\u0435\u043B\u0435\u0439...")))) : validationModels.length === 0 ? (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_29__["default"], { disabled: true }, "\u041D\u0435\u0442 \u0434\u043E\u0441\u0442\u0443\u043F\u043D\u044B\u0445 \u043C\u043E\u0434\u0435\u043B\u0435\u0439")) : (validationModels.map((model) => (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_29__["default"], { key: model.id, value: model.id }, model.name))))),
|
|
107102
|
-
!loadingValidationModels && validationModels.length > 0 && (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
107534
|
+
!loadingValidationModels && validationModels.length > 0 && (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_18__["default"], null, selectedValidationModel === _models__WEBPACK_IMPORTED_MODULE_3__.MODELS.creativeValidation
|
|
107103
107535
|
? 'Используется модель по умолчанию'
|
|
107104
107536
|
: 'Выбрана модель: ' + (validationModels.find(m => m.id === selectedValidationModel)?.name || selectedValidationModel))),
|
|
107105
107537
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_24__["default"], { control: react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_25__["default"], { checked: validationDisabled, onChange: (e) => handleValidationDisabledChange(e.target.checked), color: "primary" }), label: "\u041E\u0442\u043A\u043B\u044E\u0447\u0438\u0442\u044C \u043F\u0440\u043E\u0432\u0435\u0440\u043A\u0443", sx: { mt: 1 } }),
|
|
107106
107538
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_24__["default"], { control: react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_25__["default"], { checked: autoRemakeOnValidatorError, onChange: (e) => handleAutoRemakeOnValidatorErrorChange(e.target.checked), color: "primary", disabled: validationDisabled }), label: "\u0430\u0432\u0442\u043E\u043F\u0435\u0440\u0435\u0434\u0435\u043B\u043A\u0430", sx: { mt: 0.5, display: 'block' } }),
|
|
107107
|
-
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
107539
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_18__["default"], { sx: { mt: 0, mx: 0 } }, validationDisabled
|
|
107108
107540
|
? 'Недоступно, пока проверка отключена.'
|
|
107109
107541
|
: 'Один раз на слот креатива: при сбое проверки (сеть, таймаут, ошибка API) или когда валидатор вернул «нужна пересборка» с замечаниями — автоматически одна полная переделка с нуля (исходный промпт + product, без правок по списку ошибок).'))),
|
|
107110
|
-
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
107542
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_13__["default"], { direction: { xs: 'column', md: 'row' }, spacing: 2, sx: { mb: 2, alignItems: 'stretch' } },
|
|
107111
107543
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_26__["default"], { fullWidth: true, variant: "outlined", sx: { flex: { md: '1 1 0' }, minWidth: { md: 0 } } },
|
|
107112
107544
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_27__["default"], null, "\u041C\u043E\u0434\u0435\u043B\u044C \u0434\u043B\u044F \u0437\u0430\u0433\u043E\u043B\u043E\u0432\u043A\u043E\u0432 \u0438 \u0442\u0435\u043A\u0441\u0442\u043E\u0432"),
|
|
107113
107545
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_28__["default"], { value: selectedContentModel, onChange: (e) => handleContentModelChange(e.target.value), label: "\u041C\u043E\u0434\u0435\u043B\u044C \u0434\u043B\u044F \u0437\u0430\u0433\u043E\u043B\u043E\u0432\u043A\u043E\u0432 \u0438 \u0442\u0435\u043A\u0441\u0442\u043E\u0432", disabled: loadingValidationModels || chatModels.length === 0 }, loadingValidationModels ? (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_29__["default"], { disabled: true },
|
|
107114
107546
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_6__["default"], { sx: { display: 'flex', alignItems: 'center', gap: 1 } },
|
|
107115
|
-
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
107547
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_19__["default"], { size: 16 }),
|
|
107116
107548
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("span", null, "\u0417\u0430\u0433\u0440\u0443\u0437\u043A\u0430 \u043C\u043E\u0434\u0435\u043B\u0435\u0439...")))) : chatModels.length === 0 ? (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_29__["default"], { disabled: true }, "\u041D\u0435\u0442 \u0434\u043E\u0441\u0442\u0443\u043F\u043D\u044B\u0445 \u043C\u043E\u0434\u0435\u043B\u0435\u0439")) : (chatModels.map((model) => (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_29__["default"], { key: model.id, value: model.id }, model.name))))),
|
|
107117
|
-
!loadingValidationModels && chatModels.length > 0 && (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
107549
|
+
!loadingValidationModels && chatModels.length > 0 && (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_18__["default"], null, selectedContentModel === _models__WEBPACK_IMPORTED_MODULE_3__.MODELS.contentGeneration
|
|
107118
107550
|
? 'Заголовки, описания, пары и перевод — модель по умолчанию из кода'
|
|
107119
107551
|
: 'Заголовки и тексты: ' +
|
|
107120
107552
|
(chatModels.find(m => m.id === selectedContentModel)?.name ||
|
|
@@ -107123,17 +107555,17 @@ ${imageData.originalPrompt}
|
|
|
107123
107555
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_27__["default"], null, "\u041C\u043E\u0434\u0435\u043B\u044C \u0434\u043B\u044F \u0433\u0435\u043D\u0435\u0440\u0430\u0446\u0438\u0438 \u043B\u0435\u043D\u0434\u0438\u043D\u0433\u0430"),
|
|
107124
107556
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_28__["default"], { value: selectedLandingModel, onChange: (e) => handleLandingModelChange(e.target.value), label: "\u041C\u043E\u0434\u0435\u043B\u044C \u0434\u043B\u044F \u0433\u0435\u043D\u0435\u0440\u0430\u0446\u0438\u0438 \u043B\u0435\u043D\u0434\u0438\u043D\u0433\u0430", disabled: loadingValidationModels || chatModels.length === 0 }, loadingValidationModels ? (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_29__["default"], { disabled: true },
|
|
107125
107557
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_6__["default"], { sx: { display: 'flex', alignItems: 'center', gap: 1 } },
|
|
107126
|
-
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
107558
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_19__["default"], { size: 16 }),
|
|
107127
107559
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("span", null, "\u0417\u0430\u0433\u0440\u0443\u0437\u043A\u0430 \u043C\u043E\u0434\u0435\u043B\u0435\u0439...")))) : chatModels.length === 0 ? (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_29__["default"], { disabled: true }, "\u041D\u0435\u0442 \u0434\u043E\u0441\u0442\u0443\u043F\u043D\u044B\u0445 \u043C\u043E\u0434\u0435\u043B\u0435\u0439")) : (chatModels.map((model) => (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_29__["default"], { key: model.id, value: model.id }, model.name))))),
|
|
107128
|
-
!loadingValidationModels && chatModels.length > 0 && (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
107560
|
+
!loadingValidationModels && chatModels.length > 0 && (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_18__["default"], null, selectedLandingModel === _models__WEBPACK_IMPORTED_MODULE_3__.MODELS.landingGeneration
|
|
107129
107561
|
? 'HTML лендинга — модель по умолчанию из кода'
|
|
107130
107562
|
: 'Лендинг: ' +
|
|
107131
107563
|
(chatModels.find(m => m.id === selectedLandingModel)?.name ||
|
|
107132
107564
|
selectedLandingModel))))))),
|
|
107133
|
-
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
107134
|
-
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
107135
|
-
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
107136
|
-
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
107565
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_13__["default"], { direction: "row", spacing: 2, sx: { mb: 2 } },
|
|
107566
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_22__["default"], { variant: "contained", color: "primary", startIcon: react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_icons_material__WEBPACK_IMPORTED_MODULE_43__["default"], null), onClick: handleGenerateContent, disabled: generating || loadingContentFromDrive || !openaiApiKey || !generateProduct.trim() || !generateGeo.trim(), sx: { flexGrow: 1 }, size: "large" }, generating ? 'Generating...' : 'Generate Titles & Descriptions'),
|
|
107567
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_13__["default"], { direction: "row", spacing: 1, alignItems: "center", sx: { flexGrow: 1 } },
|
|
107568
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_9__["default"], { title: imageAspectRatio === '1:1'
|
|
107137
107569
|
? '1:1 — квадрат (1024×1024 px)'
|
|
107138
107570
|
: imageAspectRatio === '2:3'
|
|
107139
107571
|
? '2:3 — портрет (1024×1536 px)'
|
|
@@ -107158,7 +107590,7 @@ ${imageData.originalPrompt}
|
|
|
107158
107590
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_31__["default"], { value: "1:1", sx: { px: 1.5, fontWeight: 600, fontSize: '0.8rem' } }, "1:1"),
|
|
107159
107591
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_31__["default"], { value: "2:3", sx: { px: 1.5, fontWeight: 600, fontSize: '0.8rem' } }, "2:3"),
|
|
107160
107592
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_31__["default"], { value: "both", sx: { px: 1.5, fontWeight: 600, fontSize: '0.8rem' } }, "\u041E\u0431\u0430")))),
|
|
107161
|
-
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
107593
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_22__["default"], { variant: "contained", color: "secondary", startIcon: react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_icons_material__WEBPACK_IMPORTED_MODULE_43__["default"], null), onClick: handleGenerateImages, disabled: generatingImages ||
|
|
107162
107594
|
!openaiApiKey ||
|
|
107163
107595
|
(!accessToken && !refreshToken) ||
|
|
107164
107596
|
!generateProduct.trim() ||
|
|
@@ -107176,9 +107608,9 @@ ${imageData.originalPrompt}
|
|
|
107176
107608
|
: !driveFolderUrl.trim()
|
|
107177
107609
|
? 'Заполните URL папки Google Drive'
|
|
107178
107610
|
: undefined }, generatingImages ? 'Generating Images...' : 'Generate Images')),
|
|
107179
|
-
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
107180
|
-
uploadedLink && (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
107181
|
-
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
107611
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_22__["default"], { variant: "contained", color: "success", size: "large", onClick: handleGenerate, disabled: loading, startIcon: loading ? react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_19__["default"], { size: 20, color: "inherit" }) : react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_icons_material__WEBPACK_IMPORTED_MODULE_49__["default"], null), sx: { py: 1.5, fontSize: '1.1rem', flexGrow: 1 } }, loading ? 'Generating...' : 'Generate Catalog'),
|
|
107612
|
+
uploadedLink && (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_20__["default"], { severity: "success", sx: { flexGrow: 1, minWidth: 0 }, action: react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_10__["default"], { "aria-label": "copy link", color: "inherit", size: "small", onClick: handleCopyLink, sx: { ml: 1 } },
|
|
107613
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_icons_material__WEBPACK_IMPORTED_MODULE_50__["default"], { fontSize: "small" })) },
|
|
107182
107614
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_6__["default"], { sx: { display: 'flex', alignItems: 'center', gap: 1, flexWrap: 'wrap' } },
|
|
107183
107615
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("span", null,
|
|
107184
107616
|
"\u041A\u0430\u0442\u0430\u043B\u043E\u0433 \u0437\u0430\u0433\u0440\u0443\u0436\u0435\u043D!",
|
|
@@ -107188,17 +107620,17 @@ ${imageData.originalPrompt}
|
|
|
107188
107620
|
getElectronAPI().openExternal(uploadedLink);
|
|
107189
107621
|
}, style: { cursor: 'pointer', textDecoration: 'underline', color: 'inherit' } }, "\u041E\u0442\u043A\u0440\u044B\u0442\u044C \u0432 Google Drive")),
|
|
107190
107622
|
linkCopied && (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_7__["default"], { variant: "caption", sx: { color: 'success.dark', fontWeight: 'bold' } }, "\u0421\u043A\u043E\u043F\u0438\u0440\u043E\u0432\u0430\u043D\u043E!"))))),
|
|
107191
|
-
folderFilesInfo !== null && !folderFilesInfo.hasProduct && driveFolderUrl.trim() && (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
107623
|
+
folderFilesInfo !== null && !folderFilesInfo.hasProduct && driveFolderUrl.trim() && (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_20__["default"], { severity: "warning", sx: { mt: 1 } }, "\u0414\u043B\u044F \u0433\u0435\u043D\u0435\u0440\u0430\u0446\u0438\u0438 \u0438\u0437\u043E\u0431\u0440\u0430\u0436\u0435\u043D\u0438\u0439 \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044F product.png/jpg/webp. \u0421\u043D\u0430\u0447\u0430\u043B\u0430 \u0441\u0433\u0435\u043D\u0435\u0440\u0438\u0440\u0443\u0439\u0442\u0435 \u0435\u0433\u043E \u0441 \u043F\u043E\u043C\u043E\u0449\u044C\u044E \u043A\u043D\u043E\u043F\u043A\u0438 \"Generate Product from Banka\".")),
|
|
107192
107624
|
!generatingImages && (react__WEBPACK_IMPORTED_MODULE_0___default().createElement((react__WEBPACK_IMPORTED_MODULE_0___default().Fragment), null,
|
|
107193
|
-
!openaiApiKey && (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
107194
|
-
openaiApiKey && (!accessToken && !refreshToken) && (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
107195
|
-
openaiApiKey && (accessToken || refreshToken) && !generateProduct.trim() && (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
107196
|
-
openaiApiKey && (accessToken || refreshToken) && generateProduct.trim() && !generateGeo.trim() && (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
107197
|
-
openaiApiKey && (accessToken || refreshToken) && generateProduct.trim() && generateGeo.trim() && !driveFolderUrl.trim() && (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
107625
|
+
!openaiApiKey && (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_20__["default"], { severity: "error", sx: { mt: 1 } }, "\u0417\u0430\u043F\u043E\u043B\u043D\u0438\u0442\u0435 OpenRouter API Key")),
|
|
107626
|
+
openaiApiKey && (!accessToken && !refreshToken) && (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_20__["default"], { severity: "error", sx: { mt: 1 } }, "\u0412\u043E\u0439\u0434\u0438\u0442\u0435 \u0432 Google Drive")),
|
|
107627
|
+
openaiApiKey && (accessToken || refreshToken) && !generateProduct.trim() && (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_20__["default"], { severity: "error", sx: { mt: 1 } }, "\u0417\u0430\u043F\u043E\u043B\u043D\u0438\u0442\u0435 \u043F\u043E\u043B\u0435 \u0422\u043E\u0432\u0430\u0440")),
|
|
107628
|
+
openaiApiKey && (accessToken || refreshToken) && generateProduct.trim() && !generateGeo.trim() && (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_20__["default"], { severity: "error", sx: { mt: 1 } }, "\u0417\u0430\u043F\u043E\u043B\u043D\u0438\u0442\u0435 \u043F\u043E\u043B\u0435 \u0413\u0435\u043E")),
|
|
107629
|
+
openaiApiKey && (accessToken || refreshToken) && generateProduct.trim() && generateGeo.trim() && !driveFolderUrl.trim() && (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_20__["default"], { severity: "error", sx: { mt: 1 } }, "\u0417\u0430\u043F\u043E\u043B\u043D\u0438\u0442\u0435 URL \u043F\u0430\u043F\u043A\u0438 Google Drive"))))),
|
|
107198
107630
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("input", { type: "file", ref: productFileInputRef, accept: "image/png,image/jpeg,image/jpg,image/webp", style: { display: 'none' }, onChange: handleProductFileSelected }),
|
|
107199
|
-
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
107200
|
-
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
107201
|
-
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
107631
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_13__["default"], { direction: "row", spacing: 2, sx: { mb: 2 } },
|
|
107632
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_22__["default"], { variant: "contained", color: "success", startIcon: uploadingProduct ? react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_19__["default"], { size: 20, color: "inherit" }) : react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_icons_material__WEBPACK_IMPORTED_MODULE_49__["default"], null), onClick: handleUploadProductFile, disabled: uploadingProduct || !accessToken || !driveFolderUrl.trim(), sx: { flexGrow: 1 }, size: "large" }, uploadingProduct ? 'Загрузка...' : 'Загрузить product.png/jpg/webp'),
|
|
107633
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_22__["default"], { variant: "contained", color: "info", startIcon: generatingLanding ? react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_19__["default"], { size: 20, color: "inherit" }) : react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_icons_material__WEBPACK_IMPORTED_MODULE_57__["default"], null), onClick: handleCreateLanding, disabled: generatingLanding ||
|
|
107202
107634
|
!openaiApiKey ||
|
|
107203
107635
|
!accessToken ||
|
|
107204
107636
|
!driveFolderUrl.trim() ||
|
|
@@ -107213,10 +107645,10 @@ ${imageData.originalPrompt}
|
|
|
107213
107645
|
generatedImagesData.length,
|
|
107214
107646
|
")"),
|
|
107215
107647
|
checkingImages && (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_6__["default"], { sx: { display: 'flex', alignItems: 'center', gap: 1, mb: 2 } },
|
|
107216
|
-
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
107648
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_19__["default"], { size: 16 }),
|
|
107217
107649
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_7__["default"], { variant: "caption", sx: { color: 'text.secondary' } }, "\u041F\u0440\u043E\u0432\u0435\u0440\u043A\u0430 \u043A\u0430\u0447\u0435\u0441\u0442\u0432\u0430..."))),
|
|
107218
107650
|
generatedImagesData.length > 0 && generatedImagesData.some(img => !img.uploaded && img.imageUrl) && (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_6__["default"], { sx: { mb: 2 } },
|
|
107219
|
-
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
107651
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_22__["default"], { variant: "contained", color: "primary", onClick: handleUploadAllImages, disabled: uploadingImages || generatingImages || !driveFolderUrl.trim(), startIcon: uploadingImages ? react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_19__["default"], { size: 20 }) : react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_icons_material__WEBPACK_IMPORTED_MODULE_49__["default"], null), fullWidth: true }, uploadingImages ? 'Загрузка...' : `Загрузить все (${generatedImagesData.filter(img => !img.uploaded && img.imageUrl).length})`))),
|
|
107220
107652
|
generatedImagesData.length > 0 && (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_6__["default"], { sx: {
|
|
107221
107653
|
display: 'grid',
|
|
107222
107654
|
gridTemplateColumns: { xs: '1fr', sm: 'repeat(2, 1fr)', md: 'repeat(3, 1fr)' },
|
|
@@ -107253,9 +107685,9 @@ ${imageData.originalPrompt}
|
|
|
107253
107685
|
}
|
|
107254
107686
|
: {})
|
|
107255
107687
|
} },
|
|
107256
|
-
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
107688
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_9__["default"], { title: "\u0423\u0434\u0430\u043B\u0438\u0442\u044C \u043A\u0440\u0435\u0430\u0442\u0438\u0432" },
|
|
107257
107689
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("span", null,
|
|
107258
|
-
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
107690
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_10__["default"], { size: "small", "aria-label": "\u0423\u0434\u0430\u043B\u0438\u0442\u044C \u043A\u0440\u0435\u0430\u0442\u0438\u0432", sx: {
|
|
107259
107691
|
position: 'absolute',
|
|
107260
107692
|
top: 6,
|
|
107261
107693
|
right: 6,
|
|
@@ -107281,8 +107713,8 @@ ${imageData.originalPrompt}
|
|
|
107281
107713
|
!!imageData.regenerating ||
|
|
107282
107714
|
!!imageData.uploading ||
|
|
107283
107715
|
deletingDriveImageIndex === imageData.index },
|
|
107284
|
-
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
107285
|
-
imageData.imageUrl ? (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
107716
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_icons_material__WEBPACK_IMPORTED_MODULE_52__["default"], { fontSize: "small" })))),
|
|
107717
|
+
imageData.imageUrl ? (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_10__["default"], { size: "small", "aria-label": "\u041D\u0430 \u0432\u0435\u0441\u044C \u044D\u043A\u0440\u0430\u043D", sx: {
|
|
107286
107718
|
position: 'absolute',
|
|
107287
107719
|
top: 6,
|
|
107288
107720
|
left: 6,
|
|
@@ -107309,7 +107741,7 @@ ${imageData.originalPrompt}
|
|
|
107309
107741
|
}), disabled: imageData.generating ||
|
|
107310
107742
|
!!imageData.uploading ||
|
|
107311
107743
|
deletingDriveImageIndex === imageData.index },
|
|
107312
|
-
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
107744
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_icons_material__WEBPACK_IMPORTED_MODULE_54__["default"], { fontSize: "small" }))) : null,
|
|
107313
107745
|
imageData.generating ? (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_6__["default"], { sx: {
|
|
107314
107746
|
width: '100%',
|
|
107315
107747
|
aspectRatio: aspectRatioCss,
|
|
@@ -107325,7 +107757,7 @@ ${imageData.originalPrompt}
|
|
|
107325
107757
|
gap: 2,
|
|
107326
107758
|
p: 3
|
|
107327
107759
|
} },
|
|
107328
|
-
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
107760
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_19__["default"], { size: 40, sx: { color: 'primary.main' } }),
|
|
107329
107761
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_7__["default"], { variant: "body2", sx: { color: 'text.secondary', textAlign: 'center', fontWeight: 'bold' } }, "\u0413\u0435\u043D\u0435\u0440\u0430\u0446\u0438\u044F..."),
|
|
107330
107762
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_7__["default"], { variant: "caption", sx: { color: 'text.secondary', textAlign: 'center' } }, imageData.approach),
|
|
107331
107763
|
generatingImages && (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_7__["default"], { variant: "caption", sx: { color: 'text.secondary', textAlign: 'center' } },
|
|
@@ -107345,7 +107777,7 @@ ${imageData.originalPrompt}
|
|
|
107345
107777
|
gap: 2,
|
|
107346
107778
|
p: 3
|
|
107347
107779
|
} },
|
|
107348
|
-
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
107780
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_19__["default"], { size: 40, sx: { color: 'primary.main' } }),
|
|
107349
107781
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_7__["default"], { variant: "body2", sx: { color: 'text.secondary', textAlign: 'center', fontWeight: 'bold' } }, "\u041F\u0435\u0440\u0435\u0434\u0435\u043B\u043A\u0430..."),
|
|
107350
107782
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_7__["default"], { variant: "caption", sx: { color: 'text.secondary', textAlign: 'center' } }, imageData.approach))) : imageData.imageUrl ? (react__WEBPACK_IMPORTED_MODULE_0___default().createElement((react__WEBPACK_IMPORTED_MODULE_0___default().Fragment), null, hideUploadedPreview ? (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_6__["default"], { sx: {
|
|
107351
107783
|
width: '100%',
|
|
@@ -107364,14 +107796,14 @@ ${imageData.originalPrompt}
|
|
|
107364
107796
|
boxSizing: 'border-box'
|
|
107365
107797
|
} },
|
|
107366
107798
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_7__["default"], { variant: "body2", color: "text.secondary", align: "center", sx: { px: 1 } }, "\u0417\u0430\u0433\u0440\u0443\u0436\u0435\u043D\u043E \u043D\u0430 Google \u0414\u0438\u0441\u043A \u2014 \u043F\u0440\u0435\u0432\u044C\u044E \u0441\u043A\u0440\u044B\u0442\u043E"),
|
|
107367
|
-
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
107368
|
-
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
107799
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_13__["default"], { direction: "row", spacing: 1, flexWrap: "wrap", justifyContent: "center" },
|
|
107800
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_22__["default"], { size: "small", variant: "contained", onClick: () => setGeneratedImagesData(prev => prev.map(img => img.index === imageData.index
|
|
107369
107801
|
? { ...img, uploadedPreviewHidden: false }
|
|
107370
107802
|
: img)) }, "\u041F\u043E\u043A\u0430\u0437\u0430\u0442\u044C \u043F\u0440\u0435\u0432\u044C\u044E"),
|
|
107371
|
-
imageData.driveUploadedFileId ? (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
107803
|
+
imageData.driveUploadedFileId ? (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_22__["default"], { size: "small", variant: "outlined", color: "error", disabled: deletingDriveImageIndex === imageData.index, onClick: () => void handleDeleteCreativeFromDrive(imageData) }, deletingDriveImageIndex === imageData.index
|
|
107372
107804
|
? 'Удаление…'
|
|
107373
107805
|
: 'Удалить с Диска')) : null,
|
|
107374
|
-
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
107806
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_22__["default"], { size: "small", variant: "outlined", startIcon: react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_icons_material__WEBPACK_IMPORTED_MODULE_54__["default"], null), onClick: () => setCreoFullscreen({
|
|
107375
107807
|
url: imageData.imageUrl,
|
|
107376
107808
|
title: `${imageData.index}. ${imageData.approach}`
|
|
107377
107809
|
}), disabled: !!imageData.uploading || deletingDriveImageIndex === imageData.index }, "\u041D\u0430 \u0432\u0435\u0441\u044C \u044D\u043A\u0440\u0430\u043D")))) : (react__WEBPACK_IMPORTED_MODULE_0___default().createElement((react__WEBPACK_IMPORTED_MODULE_0___default().Fragment), null,
|
|
@@ -107394,13 +107826,13 @@ ${imageData.originalPrompt}
|
|
|
107394
107826
|
alignItems: 'center',
|
|
107395
107827
|
gap: 1
|
|
107396
107828
|
} },
|
|
107397
|
-
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
107829
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_19__["default"], { size: 40, sx: { color: 'primary.main' } }),
|
|
107398
107830
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_7__["default"], { variant: "caption", sx: { color: 'white', fontWeight: 'bold', textShadow: '1px 1px 2px rgba(0,0,0,0.8)' } }, "\u041F\u0435\u0440\u0435\u0434\u0435\u043B\u043A\u0430..."))),
|
|
107399
107831
|
imageData.uploaded && !imageData.regenerating ? (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_6__["default"], { sx: { display: 'flex', justifyContent: 'center', mt: 0.5 } },
|
|
107400
|
-
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
107832
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_22__["default"], { size: "small", variant: "text", onClick: () => setGeneratedImagesData(prev => prev.map(img => img.index === imageData.index
|
|
107401
107833
|
? { ...img, uploadedPreviewHidden: true }
|
|
107402
107834
|
: img)) }, "\u0421\u043A\u0440\u044B\u0442\u044C \u043F\u0440\u0435\u0432\u044C\u044E"),
|
|
107403
|
-
imageData.driveUploadedFileId ? (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
107835
|
+
imageData.driveUploadedFileId ? (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_22__["default"], { size: "small", variant: "outlined", color: "error", sx: { ml: 1 }, disabled: deletingDriveImageIndex === imageData.index, onClick: () => void handleDeleteCreativeFromDrive(imageData) }, deletingDriveImageIndex === imageData.index
|
|
107404
107836
|
? 'Удаление…'
|
|
107405
107837
|
: 'Удалить с Диска')) : null)) : null)))) : imageData.failed ? (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_6__["default"], { sx: {
|
|
107406
107838
|
width: '100%',
|
|
@@ -107450,25 +107882,46 @@ ${imageData.originalPrompt}
|
|
|
107450
107882
|
!hideUploadedPreview && imageData.checkStatus === 'ok' && imageData.checkResult !== 'Проверка отключена' && (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_7__["default"], { variant: "caption", sx: { color: 'success.main', display: 'block', fontWeight: 'bold' } }, "\u2705 \u041F\u0440\u043E\u0432\u0435\u0440\u043A\u0430 \u043F\u0440\u043E\u0439\u0434\u0435\u043D\u0430")),
|
|
107451
107883
|
!hideUploadedPreview && imageData.checkStatus === 'needs_rebuild' && (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_6__["default"], null,
|
|
107452
107884
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_7__["default"], { variant: "caption", sx: { color: 'error.main', display: 'block', fontWeight: 'bold' } }, imageData.checkFailed ? '⚠️ Ошибка проверки' : '❌ Требует пересборки'),
|
|
107453
|
-
imageData.checkErrors && imageData.checkErrors.length > 0 &&
|
|
107885
|
+
imageData.checkErrors && imageData.checkErrors.length > 0 && (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_6__["default"], { sx: { mt: 0.5 } },
|
|
107454
107886
|
imageData.checkErrors.slice(0, 2).map((error, idx) => (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_7__["default"], { key: idx, variant: "caption", sx: {
|
|
107455
107887
|
color: 'error.main',
|
|
107456
107888
|
display: 'block',
|
|
107457
107889
|
fontSize: '0.7rem',
|
|
107458
|
-
lineHeight: 1.
|
|
107890
|
+
lineHeight: 1.35,
|
|
107891
|
+
wordBreak: 'break-word'
|
|
107459
107892
|
} },
|
|
107460
107893
|
"\u2022 ",
|
|
107461
|
-
error.length >
|
|
107894
|
+
error.length > 220 ? error.substring(0, 220) + '…' : error))),
|
|
107462
107895
|
imageData.checkErrors.length > 2 && (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_7__["default"], { variant: "caption", sx: { color: 'text.secondary', fontSize: '0.7rem' } },
|
|
107463
107896
|
"+",
|
|
107464
107897
|
imageData.checkErrors.length - 2,
|
|
107465
107898
|
" \u0435\u0449\u0451")))))),
|
|
107899
|
+
(() => {
|
|
107900
|
+
const checkedOk = imageData.checkStatus === 'ok' &&
|
|
107901
|
+
imageData.checkResult &&
|
|
107902
|
+
imageData.checkResult.trim() !== '' &&
|
|
107903
|
+
imageData.checkResult !== 'Проверка отключена';
|
|
107904
|
+
const checkedRebuild = imageData.checkStatus === 'needs_rebuild';
|
|
107905
|
+
if (!checkedOk && !checkedRebuild)
|
|
107906
|
+
return null;
|
|
107907
|
+
const body = (imageData.checkResult && imageData.checkResult.trim()) ||
|
|
107908
|
+
(imageData.checkErrors?.length
|
|
107909
|
+
? imageData.checkErrors.join('\n\n')
|
|
107910
|
+
: '');
|
|
107911
|
+
if (!body)
|
|
107912
|
+
return null;
|
|
107913
|
+
return (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_22__["default"], { size: "small", variant: "text", sx: { mt: 0.5, p: 0, minHeight: 'auto', fontSize: '0.7rem', textTransform: 'none', alignSelf: 'flex-start', display: 'block' }, onClick: () => setValidatorDebugDialog({
|
|
107914
|
+
kind: imageData.checkFailed ? 'transport' : 'validator',
|
|
107915
|
+
subtitle: `${imageData.index}. ${imageData.approach}`,
|
|
107916
|
+
text: body
|
|
107917
|
+
}) }, imageData.checkFailed ? 'Детали ошибки проверки' : 'Полный ответ валидатора'));
|
|
107918
|
+
})(),
|
|
107466
107919
|
!hideUploadedPreview && imageData.checkStatus === 'checking' && (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_7__["default"], { variant: "caption", sx: { color: 'warning.main', display: 'block' } }, "\uD83D\uDD0D \u041F\u0440\u043E\u0432\u0435\u0440\u044F\u0435\u0442\u0441\u044F...")),
|
|
107467
107920
|
!hideUploadedPreview && imageData.checkStatus === 'pending' && !imageData.failed && !imageData.generating && imageData.imageUrl && (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_7__["default"], { variant: "caption", sx: { color: 'text.secondary', display: 'block' } }, "\u23F3 \u041E\u0436\u0438\u0434\u0430\u0435\u0442 \u043F\u0440\u043E\u0432\u0435\u0440\u043A\u0438")),
|
|
107468
107921
|
!hideUploadedPreview && imageData.failed && !imageData.generating && !imageData.imageUrl && (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_7__["default"], { variant: "caption", sx: { color: 'error.main', display: 'block', fontWeight: 'bold' } }, "\u274C \u0413\u0435\u043D\u0435\u0440\u0430\u0446\u0438\u044F \u043D\u0435 \u0443\u0434\u0430\u043B\u0430\u0441\u044C")),
|
|
107469
107922
|
!hideUploadedPreview && imageData.uploaded && (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_7__["default"], { variant: "caption", sx: { color: 'success.main', display: 'block', mt: 0.5 } }, "\u2713 \u0417\u0430\u0433\u0440\u0443\u0436\u0435\u043D\u043E"))),
|
|
107470
107923
|
!imageData.generating && !hideUploadedPreview && (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_6__["default"], { sx: { display: 'flex', gap: 1, flexDirection: 'column', mt: 1 } },
|
|
107471
|
-
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
107924
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_17__["default"], { size: "small", multiline: true, minRows: 2, maxRows: 4, fullWidth: true, placeholder: "\u0423\u0442\u043E\u0447\u043D\u0435\u043D\u0438\u044F \u0434\u043B\u044F \u043F\u0435\u0440\u0435\u0434\u0435\u043B\u043A\u0438 (\u0430\u0432\u0442\u043E\u043C\u0430\u0442\u0438\u0447\u0435\u0441\u043A\u0438 \u0437\u0430\u043F\u043E\u043B\u043D\u0435\u043D\u043E \u043F\u0440\u0438 \u043F\u0440\u043E\u0431\u043B\u0435\u043C\u0430\u0445)", value: imageData.customRegeneratePrompt || '', onChange: (e) => {
|
|
107472
107925
|
setGeneratedImagesData(prev => prev.map(img => img.index === imageData.index
|
|
107473
107926
|
? { ...img, customRegeneratePrompt: e.target.value }
|
|
107474
107927
|
: img));
|
|
@@ -107485,8 +107938,8 @@ ${imageData.originalPrompt}
|
|
|
107485
107938
|
: 'transparent'
|
|
107486
107939
|
}
|
|
107487
107940
|
} }),
|
|
107488
|
-
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
107489
|
-
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
107941
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_13__["default"], { direction: "row", spacing: 1, sx: { width: '100%', alignItems: 'stretch' } },
|
|
107942
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_22__["default"], { size: "small", variant: "contained", color: imageData.failed ? 'error' : imageData.checkStatus === 'needs_rebuild' ? 'warning' : 'primary', startIcon: imageData.regenerating ? react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_19__["default"], { size: 16 }) : react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_icons_material__WEBPACK_IMPORTED_MODULE_43__["default"], null), onClick: () => handleRegenerateImage(imageData), disabled: imageData.regenerating ||
|
|
107490
107943
|
imageData.uploading ||
|
|
107491
107944
|
imageData.checkStatus === 'checking' ||
|
|
107492
107945
|
!imageData.originalPrompt ||
|
|
@@ -107496,16 +107949,16 @@ ${imageData.originalPrompt}
|
|
|
107496
107949
|
: ((generatingImages && !imageData.imageUrl && !imageData.failed && !imageData.generating)
|
|
107497
107950
|
? 'В очереди'
|
|
107498
107951
|
: (!imageData.imageUrl ? 'Сгенерировать' : 'Переделать'))),
|
|
107499
|
-
imageData.imageUrl ? (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
107952
|
+
imageData.imageUrl ? (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_22__["default"], { size: "small", variant: "outlined", color: "secondary", startIcon: react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_icons_material__WEBPACK_IMPORTED_MODULE_59__["default"], null), onClick: () => handleRegenerateImageFresh(imageData), disabled: imageData.regenerating ||
|
|
107500
107953
|
imageData.uploading ||
|
|
107501
107954
|
imageData.checkStatus === 'checking' ||
|
|
107502
107955
|
!imageData.originalPrompt ||
|
|
107503
107956
|
!imageData.productImageUrl, sx: { flex: 1, minWidth: 0, py: 1, lineHeight: 1.2, whiteSpace: 'normal' } }, "\u041F\u0435\u0440\u0435\u0434\u0435\u043B\u0430\u0442\u044C \u0437\u0430\u043D\u043E\u0432\u043E")) : null),
|
|
107504
|
-
imageData.imageUrl && !validationDisabled && (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
107957
|
+
imageData.imageUrl && !validationDisabled && (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_22__["default"], { size: "small", variant: "outlined", color: "warning", startIcon: imageData.checkStatus === 'checking' ? (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_19__["default"], { size: 16, color: "inherit" })) : (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_icons_material__WEBPACK_IMPORTED_MODULE_59__["default"], null)), onClick: () => handleRetryCheck(imageData), disabled: imageData.regenerating ||
|
|
107505
107958
|
imageData.uploading ||
|
|
107506
107959
|
imageData.generating ||
|
|
107507
107960
|
imageData.checkStatus === 'checking', fullWidth: true }, imageData.checkStatus === 'checking' ? 'Проверка…' : 'Перепроверить')),
|
|
107508
|
-
!imageData.uploaded && imageData.imageUrl && (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
107961
|
+
!imageData.uploaded && imageData.imageUrl && (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_22__["default"], { size: "small", variant: "outlined", startIcon: react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_icons_material__WEBPACK_IMPORTED_MODULE_49__["default"], null), onClick: () => {
|
|
107509
107962
|
const folderId = extractFolderId(driveFolderUrl);
|
|
107510
107963
|
if (folderId) {
|
|
107511
107964
|
handleUploadImage(imageData, folderId);
|
|
@@ -107513,7 +107966,7 @@ ${imageData.originalPrompt}
|
|
|
107513
107966
|
}, disabled: imageData.uploading || imageData.regenerating || !driveFolderUrl.trim(), fullWidth: true }, imageData.uploading ? 'Загрузка...' : 'Загрузить'))))));
|
|
107514
107967
|
}))),
|
|
107515
107968
|
generatedImagesData.length > 0 && generatedImagesData.some(img => !img.uploaded && img.imageUrl) && (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_6__["default"], { sx: { mt: 2 } },
|
|
107516
|
-
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
107969
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_22__["default"], { variant: "contained", color: "primary", onClick: handleUploadAllImages, disabled: uploadingImages || generatingImages || !driveFolderUrl.trim(), startIcon: uploadingImages ? react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_19__["default"], { size: 20 }) : react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_icons_material__WEBPACK_IMPORTED_MODULE_49__["default"], null), fullWidth: true }, uploadingImages ? 'Загрузка...' : `Загрузить все (${generatedImagesData.filter(img => !img.uploaded && img.imageUrl).length})`))),
|
|
107517
107970
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_32__["default"], { fullScreen: true, open: Boolean(creoFullscreen), onClose: () => setCreoFullscreen(null), PaperProps: {
|
|
107518
107971
|
sx: {
|
|
107519
107972
|
m: 0,
|
|
@@ -107534,9 +107987,9 @@ ${imageData.originalPrompt}
|
|
|
107534
107987
|
flexShrink: 0
|
|
107535
107988
|
} },
|
|
107536
107989
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_7__["default"], { variant: "subtitle1", sx: { color: '#fff', flex: 1, pr: 1 }, noWrap: true }, creoFullscreen?.title),
|
|
107537
|
-
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
107538
|
-
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
107539
|
-
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
107990
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_9__["default"], { title: "\u0417\u0430\u043A\u0440\u044B\u0442\u044C (Esc)" },
|
|
107991
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_10__["default"], { "aria-label": "\u0417\u0430\u043A\u0440\u044B\u0442\u044C \u043F\u043E\u043B\u043D\u043E\u044D\u043A\u0440\u0430\u043D\u043D\u044B\u0439 \u043F\u0440\u043E\u0441\u043C\u043E\u0442\u0440", onClick: () => setCreoFullscreen(null), sx: { color: '#fff' } },
|
|
107992
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_icons_material__WEBPACK_IMPORTED_MODULE_48__["default"], null)))),
|
|
107540
107993
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_6__["default"], { sx: {
|
|
107541
107994
|
flex: 1,
|
|
107542
107995
|
minHeight: 0,
|
|
@@ -107552,8 +108005,29 @@ ${imageData.originalPrompt}
|
|
|
107552
108005
|
height: 'auto',
|
|
107553
108006
|
objectFit: 'contain',
|
|
107554
108007
|
borderRadius: 1
|
|
107555
|
-
} })) : null))
|
|
107556
|
-
|
|
108008
|
+
} })) : null)),
|
|
108009
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_32__["default"], { open: Boolean(validatorDebugDialog), onClose: () => setValidatorDebugDialog(null), maxWidth: "md", fullWidth: true, scroll: "paper" },
|
|
108010
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_33__["default"], { sx: { pr: 5 } },
|
|
108011
|
+
validatorDebugDialog?.kind === 'transport'
|
|
108012
|
+
? 'Детали ошибки проверки'
|
|
108013
|
+
: 'Полный ответ модели-валидатора',
|
|
108014
|
+
validatorDebugDialog?.subtitle ? (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_7__["default"], { component: "div", variant: "caption", color: "text.secondary", sx: { display: 'block', mt: 0.5, fontWeight: 400 } }, validatorDebugDialog.subtitle)) : null),
|
|
108015
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_34__["default"], { dividers: true },
|
|
108016
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_17__["default"], { value: validatorDebugDialog?.text ?? '', multiline: true, fullWidth: true, minRows: 14, maxRows: 32, InputProps: { readOnly: true }, variant: "outlined", size: "small", sx: {
|
|
108017
|
+
'& .MuiInputBase-input': {
|
|
108018
|
+
fontFamily: 'ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace',
|
|
108019
|
+
fontSize: '0.8rem',
|
|
108020
|
+
lineHeight: 1.45
|
|
108021
|
+
}
|
|
108022
|
+
} })),
|
|
108023
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_35__["default"], { sx: { px: 2, py: 1.5 } },
|
|
108024
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_22__["default"], { startIcon: react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_icons_material__WEBPACK_IMPORTED_MODULE_50__["default"], null), onClick: () => {
|
|
108025
|
+
const t = validatorDebugDialog?.text;
|
|
108026
|
+
if (t)
|
|
108027
|
+
void navigator.clipboard.writeText(t);
|
|
108028
|
+
}, disabled: !validatorDebugDialog?.text }, "\u041A\u043E\u043F\u0438\u0440\u043E\u0432\u0430\u0442\u044C"),
|
|
108029
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_22__["default"], { variant: "contained", onClick: () => setValidatorDebugDialog(null) }, "\u0417\u0430\u043A\u0440\u044B\u0442\u044C"))))),
|
|
108030
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_21__["default"], { sx: { my: 2 } }),
|
|
107557
108031
|
(generatedTitlesData.length > 0 || generatedTextsData.length > 0 || loadingContentFromDrive) && (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_6__["default"], { sx: { mb: 2 } },
|
|
107558
108032
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_6__["default"], { sx: { display: 'flex', alignItems: 'center', justifyContent: 'space-between', gap: 1, mb: 1 } },
|
|
107559
108033
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_7__["default"], { variant: "h6", sx: { fontWeight: 'bold' }, component: "div" },
|
|
@@ -107562,14 +108036,14 @@ ${imageData.originalPrompt}
|
|
|
107562
108036
|
"/",
|
|
107563
108037
|
Math.max(generatedTitlesData.length, generatedTextsData.length),
|
|
107564
108038
|
")"),
|
|
107565
|
-
(generatedTitlesData.length > 0 || generatedTextsData.length > 0) && (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
107566
|
-
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
108039
|
+
(generatedTitlesData.length > 0 || generatedTextsData.length > 0) && (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_9__["default"], { title: pairsJsonCopied ? 'Скопировано' : 'Скопировать все пары как JSON-массив' },
|
|
108040
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_10__["default"], { size: "small", "aria-label": "\u0421\u043A\u043E\u043F\u0438\u0440\u043E\u0432\u0430\u0442\u044C \u043F\u0430\u0440\u044B \u043A\u0430\u043A JSON", onClick: () => void copyGeneratedPairsAsJson(), disabled: generating, sx: {
|
|
107567
108041
|
opacity: 0.28,
|
|
107568
108042
|
p: 0.35,
|
|
107569
108043
|
color: 'text.secondary',
|
|
107570
108044
|
'&:hover': { opacity: 0.75, color: 'text.primary' },
|
|
107571
108045
|
} },
|
|
107572
|
-
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
108046
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_icons_material__WEBPACK_IMPORTED_MODULE_50__["default"], { sx: { fontSize: 16 } }))))),
|
|
107573
108047
|
loadingContentFromDrive && (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_6__["default"], { sx: {
|
|
107574
108048
|
display: 'flex',
|
|
107575
108049
|
flexDirection: 'column',
|
|
@@ -107584,10 +108058,10 @@ ${imageData.originalPrompt}
|
|
|
107584
108058
|
: 'rgba(25, 118, 210, 0.05)',
|
|
107585
108059
|
mb: 2
|
|
107586
108060
|
} },
|
|
107587
|
-
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
108061
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_19__["default"], { size: 40, sx: { color: 'primary.main' } }),
|
|
107588
108062
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_7__["default"], { variant: "body1", sx: { color: 'text.secondary', fontWeight: 'bold' } }, "\u0417\u0430\u0433\u0440\u0443\u0437\u043A\u0430 \u043A\u043E\u043D\u0442\u0435\u043D\u0442\u0430 \u0438\u0437 Google Drive..."))),
|
|
107589
|
-
(generatedTitlesData.length > 0 || generatedTextsData.length > 0) && (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
107590
|
-
pairTranslationFailed && !translatingPairs && !generating ? (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
108063
|
+
(generatedTitlesData.length > 0 || generatedTextsData.length > 0) && (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_13__["default"], { spacing: 2 },
|
|
108064
|
+
pairTranslationFailed && !translatingPairs && !generating ? (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_20__["default"], { severity: "warning", action: react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_22__["default"], { color: "inherit", size: "small", onClick: handleRetryPairTranslation, sx: { textTransform: 'none', whiteSpace: 'nowrap' } }, "\u0417\u0430\u043F\u0440\u043E\u0441\u0438\u0442\u044C \u043F\u0435\u0440\u0435\u0432\u043E\u0434") }, "\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u043F\u043E\u043B\u0443\u0447\u0438\u0442\u044C \u043F\u0435\u0440\u0435\u0432\u043E\u0434 \u043F\u0430\u0440 \u043D\u0430 \u0440\u0443\u0441\u0441\u043A\u0438\u0439 (\u043E\u0442\u0434\u0435\u043B\u044C\u043D\u044B\u0439 \u0437\u0430\u043F\u0440\u043E\u0441 \u043A \u043C\u043E\u0434\u0435\u043B\u0438).")) : null,
|
|
107591
108065
|
Array.from({
|
|
107592
108066
|
length: Math.max(generatedTitlesData.length, generatedTextsData.length)
|
|
107593
108067
|
}, (_, i) => i).map((i) => {
|
|
@@ -107598,7 +108072,7 @@ ${imageData.originalPrompt}
|
|
|
107598
108072
|
const pairLabel = pairApproach ? pairApproach.name : `пара ${i + 1}`;
|
|
107599
108073
|
const pairGenerating = (titleData?.generating || textData?.generating);
|
|
107600
108074
|
const pairFailed = (!pairGenerating && titleData?.failed && textData?.failed);
|
|
107601
|
-
return (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
108075
|
+
return (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_36__["default"], { key: i, variant: "outlined", sx: {
|
|
107602
108076
|
p: 2,
|
|
107603
108077
|
borderColor: pairFailed
|
|
107604
108078
|
? 'error.main'
|
|
@@ -107610,7 +108084,7 @@ ${imageData.originalPrompt}
|
|
|
107610
108084
|
? (theme.palette.mode === 'dark' ? 'rgba(25,118,210,0.05)' : 'rgba(25,118,210,0.02)')
|
|
107611
108085
|
: 'transparent',
|
|
107612
108086
|
} },
|
|
107613
|
-
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
108087
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_13__["default"], { direction: "row", spacing: 1, alignItems: "center", sx: { mb: 1.5, flexWrap: 'wrap' } },
|
|
107614
108088
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_7__["default"], { variant: "caption", sx: {
|
|
107615
108089
|
fontWeight: 700,
|
|
107616
108090
|
px: 1,
|
|
@@ -107627,16 +108101,16 @@ ${imageData.originalPrompt}
|
|
|
107627
108101
|
i + 1),
|
|
107628
108102
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_7__["default"], { variant: "caption", color: "text.secondary" }, pairLabel),
|
|
107629
108103
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_6__["default"], { sx: { flexGrow: 1, minWidth: 8 } }),
|
|
107630
|
-
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
108104
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_9__["default"], { title: "\u0423\u0434\u0430\u043B\u0438\u0442\u044C \u043F\u0430\u0440\u0443" },
|
|
107631
108105
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("span", null,
|
|
107632
|
-
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
107633
|
-
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
107634
|
-
translatingPairs && !pairTranslations[i] ? (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
107635
|
-
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
108106
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_10__["default"], { size: "small", color: "error", "aria-label": "\u0423\u0434\u0430\u043B\u0438\u0442\u044C \u043F\u0430\u0440\u0443", onClick: () => handleDeleteGeneratedPair(i), disabled: pairGenerating || generating },
|
|
108107
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_icons_material__WEBPACK_IMPORTED_MODULE_52__["default"], { fontSize: "small" })))),
|
|
108108
|
+
translatingPairs && !pairTranslations[i] ? (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_19__["default"], { size: 13, sx: { color: 'text.disabled', ml: 0.5 } })) : null),
|
|
108109
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_13__["default"], { spacing: 1.5 },
|
|
107636
108110
|
titleData && (react__WEBPACK_IMPORTED_MODULE_0___default().createElement((react__WEBPACK_IMPORTED_MODULE_0___default().Fragment), null,
|
|
107637
108111
|
titleData.generating ? (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_6__["default"], { sx: { display: 'flex', alignItems: 'center', gap: 1 } },
|
|
107638
|
-
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
107639
|
-
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_7__["default"], { variant: "body2", color: "text.secondary" }, "\u0413\u0435\u043D\u0435\u0440\u0430\u0446\u0438\u044F \u0437\u0430\u0433\u043E\u043B\u043E\u0432\u043A\u0430\u2026"))) : titleData.failed ? (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
108112
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_19__["default"], { size: 16, sx: { color: 'primary.main' } }),
|
|
108113
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_7__["default"], { variant: "body2", color: "text.secondary" }, "\u0413\u0435\u043D\u0435\u0440\u0430\u0446\u0438\u044F \u0437\u0430\u0433\u043E\u043B\u043E\u0432\u043A\u0430\u2026"))) : titleData.failed ? (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_17__["default"], { label: `Заголовок ${i + 1}`, variant: "outlined", fullWidth: true, size: "small", value: titleData.title, placeholder: "\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u0437\u0430\u0433\u043E\u043B\u043E\u0432\u043E\u043A \u0432\u0440\u0443\u0447\u043D\u0443\u044E", helperText: titleData.errorMessage ? `Не сгенерирован: ${titleData.errorMessage}` : 'Можно ввести или исправить заголовок вручную', error: !!titleData.errorMessage, onChange: (e) => {
|
|
107640
108114
|
const newValue = e.target.value;
|
|
107641
108115
|
setGeneratedTitlesData(prev => {
|
|
107642
108116
|
const updated = prev.map(t => t.index === titleData.index
|
|
@@ -107651,7 +108125,7 @@ ${imageData.originalPrompt}
|
|
|
107651
108125
|
? 'rgba(244,67,54,0.08)'
|
|
107652
108126
|
: 'rgba(244,67,54,0.04)'
|
|
107653
108127
|
}
|
|
107654
|
-
} })) : (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
108128
|
+
} })) : (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_17__["default"], { label: `Заголовок ${i + 1}`, variant: "outlined", fullWidth: true, size: "small", value: titleData.title, onChange: (e) => {
|
|
107655
108129
|
const newValue = e.target.value;
|
|
107656
108130
|
setGeneratedTitlesData(prev => {
|
|
107657
108131
|
const updated = prev.map(t => t.index === titleData.index ? { ...t, title: newValue } : t);
|
|
@@ -107676,8 +108150,8 @@ ${imageData.originalPrompt}
|
|
|
107676
108150
|
} }, pairTranslations[i].titleRu)) : null)),
|
|
107677
108151
|
textData && (react__WEBPACK_IMPORTED_MODULE_0___default().createElement((react__WEBPACK_IMPORTED_MODULE_0___default().Fragment), null,
|
|
107678
108152
|
textData.generating ? (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_6__["default"], { sx: { display: 'flex', alignItems: 'center', gap: 1 } },
|
|
107679
|
-
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
107680
|
-
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_7__["default"], { variant: "body2", color: "text.secondary" }, "\u0413\u0435\u043D\u0435\u0440\u0430\u0446\u0438\u044F \u0442\u0435\u043A\u0441\u0442\u0430\u2026"))) : textData.failed ? (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
108153
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_19__["default"], { size: 16, sx: { color: 'primary.main' } }),
|
|
108154
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_7__["default"], { variant: "body2", color: "text.secondary" }, "\u0413\u0435\u043D\u0435\u0440\u0430\u0446\u0438\u044F \u0442\u0435\u043A\u0441\u0442\u0430\u2026"))) : textData.failed ? (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_17__["default"], { label: `Текст ${i + 1}`, variant: "outlined", fullWidth: true, multiline: true, minRows: 3, value: textData.text, placeholder: "\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u0442\u0435\u043A\u0441\u0442 \u043E\u0431\u044A\u044F\u0432\u043B\u0435\u043D\u0438\u044F \u0432\u0440\u0443\u0447\u043D\u0443\u044E", helperText: textData.errorMessage ? `Не сгенерирован: ${textData.errorMessage}` : 'Можно ввести или исправить текст вручную', error: !!textData.errorMessage, onChange: (e) => {
|
|
107681
108155
|
const newValue = e.target.value;
|
|
107682
108156
|
setGeneratedTextsData(prev => {
|
|
107683
108157
|
const updated = prev.map(t => t.index === textData.index
|
|
@@ -107692,7 +108166,7 @@ ${imageData.originalPrompt}
|
|
|
107692
108166
|
? 'rgba(244,67,54,0.08)'
|
|
107693
108167
|
: 'rgba(244,67,54,0.04)'
|
|
107694
108168
|
}
|
|
107695
|
-
} })) : (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
108169
|
+
} })) : (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_17__["default"], { label: `Текст ${i + 1}`, variant: "outlined", fullWidth: true, multiline: true, minRows: 3, value: textData.text, onChange: (e) => {
|
|
107696
108170
|
const newValue = e.target.value;
|
|
107697
108171
|
setGeneratedTextsData(prev => {
|
|
107698
108172
|
const updated = prev.map(t => t.index === textData.index ? { ...t, text: newValue } : t);
|
|
@@ -107720,7 +108194,7 @@ ${imageData.originalPrompt}
|
|
|
107720
108194
|
}))))),
|
|
107721
108195
|
(landingGenerationLogs.length > 0 || generatingLanding) && (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_6__["default"], { sx: { mb: 2 } },
|
|
107722
108196
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_7__["default"], { variant: "h6", gutterBottom: true, sx: { fontWeight: 'bold' } }, "\u041F\u0440\u043E\u0446\u0435\u0441\u0441 \u0441\u043E\u0437\u0434\u0430\u043D\u0438\u044F \u043B\u0435\u043D\u0434\u0438\u043D\u0433\u0430"),
|
|
107723
|
-
landingGenerationLogs.length > 0 && (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
108197
|
+
landingGenerationLogs.length > 0 && (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_36__["default"], { sx: {
|
|
107724
108198
|
p: 2,
|
|
107725
108199
|
backgroundColor: (theme) => theme.palette.mode === 'dark'
|
|
107726
108200
|
? 'rgba(25, 118, 210, 0.1)'
|
|
@@ -107744,38 +108218,120 @@ ${imageData.originalPrompt}
|
|
|
107744
108218
|
'text.primary'
|
|
107745
108219
|
} }, log)))))),
|
|
107746
108220
|
generatingLanding && (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_6__["default"], { sx: { display: 'flex', alignItems: 'center', gap: 1, mb: 2 } },
|
|
107747
|
-
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
108221
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_19__["default"], { size: 20 }),
|
|
107748
108222
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_7__["default"], { variant: "body2", sx: { color: 'text.secondary' } }, formatElapsedTime(elapsedTime.landing)))),
|
|
107749
|
-
!generatingLanding && generatedLandingHTML && generatedLandingImageBlob && (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
108223
|
+
!generatingLanding && generatedLandingHTML && generatedLandingImageBlob && (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_22__["default"], { variant: "outlined", color: "primary", onClick: handlePreviewLanding, startIcon: react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_icons_material__WEBPACK_IMPORTED_MODULE_61__["default"], null), fullWidth: true }, "\u041F\u0440\u0435\u0434\u043F\u0440\u043E\u0441\u043C\u043E\u0442\u0440 \u043B\u0435\u043D\u0434\u0438\u043D\u0433\u0430"))))))))),
|
|
107750
108224
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_32__["default"], { open: approachLoadChoice !== null, onClose: handleApproachLoadKeepCurrent, maxWidth: "md", fullWidth: true }, approachLoadChoice ? (react__WEBPACK_IMPORTED_MODULE_0___default().createElement((react__WEBPACK_IMPORTED_MODULE_0___default().Fragment), null,
|
|
107751
|
-
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
107752
|
-
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
108225
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_33__["default"], null, "\u041F\u043E\u0434\u0445\u043E\u0434\u044B \u0438\u0437 \u0444\u0430\u0439\u043B\u0430 \u043E\u0444\u0444\u0435\u0440\u0430"),
|
|
108226
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_34__["default"], null,
|
|
107753
108227
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_7__["default"], { variant: "body2", color: "text.secondary", sx: { mb: 2 } }, "\u0412 project-settings.json \u0435\u0441\u0442\u044C \u0441\u043E\u0445\u0440\u0430\u043D\u0451\u043D\u043D\u044B\u0435 \u043F\u043E\u0434\u0445\u043E\u0434\u044B \u0434\u043B\u044F \u0437\u0430\u0433\u043E\u043B\u043E\u0432\u043A\u043E\u0432/\u0442\u0435\u043A\u0441\u0442\u043E\u0432 \u0438 \u0434\u043B\u044F \u043A\u0440\u0435\u043E. \u041F\u0440\u0438\u043C\u0435\u043D\u0438\u0442\u044C \u0438\u0445 \u0432 \u043F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u0438 \u0438\u043B\u0438 \u043E\u0441\u0442\u0430\u0432\u0438\u0442\u044C \u0442\u0435, \u0447\u0442\u043E \u0443\u0436\u0435 \u0432\u044B\u0431\u0440\u0430\u043D\u044B \u043B\u043E\u043A\u0430\u043B\u044C\u043D\u043E?"),
|
|
107754
|
-
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
108228
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_13__["default"], { spacing: 2 },
|
|
107755
108229
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_7__["default"], { variant: "subtitle2" }, "\u0417\u0430\u0433\u043E\u043B\u043E\u0432\u043A\u0438 \u0438 \u0442\u0435\u043A\u0441\u0442\u044B (\u043F\u0430\u0440\u044B \u043F\u043E\u0434\u0445\u043E\u0434\u043E\u0432)"),
|
|
107756
|
-
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
107757
|
-
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
108230
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_13__["default"], { direction: { xs: 'column', sm: 'row' }, spacing: 2 },
|
|
108231
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_36__["default"], { variant: "outlined", sx: { p: 1.5, flex: 1 } },
|
|
107758
108232
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_7__["default"], { variant: "caption", color: "text.secondary", display: "block", gutterBottom: true }, "\u0421\u0435\u0439\u0447\u0430\u0441 \u0432 \u043F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u0438"),
|
|
107759
108233
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_7__["default"], { variant: "body2", component: "div", sx: { whiteSpace: 'pre-wrap', fontFamily: 'inherit' } }, formatPairApproachesForDisplay(approachLoadChoice.currentPairs))),
|
|
107760
|
-
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
108234
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_36__["default"], { variant: "outlined", sx: { p: 1.5, flex: 1 } },
|
|
107761
108235
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_7__["default"], { variant: "caption", color: "text.secondary", display: "block", gutterBottom: true }, "\u0412 \u0444\u0430\u0439\u043B\u0435 \u043E\u0444\u0444\u0435\u0440\u0430"),
|
|
107762
108236
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_7__["default"], { variant: "body2", component: "div", sx: { whiteSpace: 'pre-wrap', fontFamily: 'inherit' } }, approachLoadChoice.savedPairs
|
|
107763
108237
|
? formatPairApproachesForDisplay(approachLoadChoice.savedPairs)
|
|
107764
108238
|
: '— не указано (список для текстов не изменится)'))),
|
|
107765
108239
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_7__["default"], { variant: "subtitle2" }, "\u0418\u0437\u043E\u0431\u0440\u0430\u0436\u0435\u043D\u0438\u044F (\u043A\u043E\u043B\u0438\u0447\u0435\u0441\u0442\u0432\u043E \u043F\u043E \u043F\u043E\u0434\u0445\u043E\u0434\u0443)"),
|
|
107766
|
-
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
107767
|
-
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
108240
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_13__["default"], { direction: { xs: 'column', sm: 'row' }, spacing: 2 },
|
|
108241
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_36__["default"], { variant: "outlined", sx: { p: 1.5, flex: 1 } },
|
|
107768
108242
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_7__["default"], { variant: "caption", color: "text.secondary", display: "block", gutterBottom: true }, "\u0421\u0435\u0439\u0447\u0430\u0441 \u0432 \u043F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u0438"),
|
|
107769
108243
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_7__["default"], { variant: "body2", component: "div", sx: { whiteSpace: 'pre-wrap', fontFamily: 'inherit' } }, formatImageCountsForDisplay(approachLoadChoice.currentCounts))),
|
|
107770
|
-
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
108244
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_36__["default"], { variant: "outlined", sx: { p: 1.5, flex: 1 } },
|
|
107771
108245
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_7__["default"], { variant: "caption", color: "text.secondary", display: "block", gutterBottom: true }, "\u0412 \u0444\u0430\u0439\u043B\u0435 \u043E\u0444\u0444\u0435\u0440\u0430"),
|
|
107772
108246
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_7__["default"], { variant: "body2", component: "div", sx: { whiteSpace: 'pre-wrap', fontFamily: 'inherit' } }, approachLoadChoice.savedCounts
|
|
107773
108247
|
? formatImageCountsForDisplay(approachLoadChoice.savedCounts)
|
|
107774
108248
|
: '— не указано (количества крео не изменятся)'))))),
|
|
107775
|
-
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
107776
|
-
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
107777
|
-
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
107778
|
-
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
108249
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_35__["default"], null,
|
|
108250
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_22__["default"], { onClick: handleApproachLoadKeepCurrent }, "\u041E\u0441\u0442\u0430\u0432\u0438\u0442\u044C \u043A\u0430\u043A \u0441\u0435\u0439\u0447\u0430\u0441"),
|
|
108251
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_22__["default"], { variant: "contained", onClick: handleApproachLoadApplyFromFile }, "\u041F\u0440\u0438\u043C\u0435\u043D\u0438\u0442\u044C \u0438\u0437 \u0444\u0430\u0439\u043B\u0430")))) : null),
|
|
108252
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_32__["default"], { open: settingsFileMissingDialog.open, onClose: (_, reason) => {
|
|
108253
|
+
if (settingsFileMissingDialog.retrying)
|
|
108254
|
+
return;
|
|
108255
|
+
if (reason === 'backdropClick' || reason === 'escapeKeyDown') {
|
|
108256
|
+
handleSettingsFileMissingDismissOk();
|
|
108257
|
+
}
|
|
108258
|
+
}, maxWidth: "sm", fullWidth: true },
|
|
108259
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_33__["default"], null, "\u041D\u0430\u0441\u0442\u0440\u043E\u0439\u043A\u0438 \u043D\u0435 \u043D\u0430\u0439\u0434\u0435\u043D\u044B"),
|
|
108260
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_34__["default"], null,
|
|
108261
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_7__["default"], { variant: "body2", color: "text.secondary", sx: { mb: 1 } },
|
|
108262
|
+
"\u0412 \u043F\u0430\u043F\u043A\u0435 \u043D\u0435\u0442 \u0444\u0430\u0439\u043B\u0430 ",
|
|
108263
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("code", null, "project-settings.json"),
|
|
108264
|
+
" (\u0438\u043B\u0438 \u0443\u0441\u0442\u0430\u0440\u0435\u0432\u0448\u0435\u0433\u043E",
|
|
108265
|
+
' ',
|
|
108266
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("code", null, "temp-generated-content.json"),
|
|
108267
|
+
") \u2014 \u0432 \u043A\u043E\u0440\u043D\u0435 \u043F\u0440\u043E\u0435\u043A\u0442\u0430 \u0438\u043B\u0438 \u0432 \u043F\u0430\u043F\u043A\u0435 ",
|
|
108268
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("code", null, "env"),
|
|
108269
|
+
"."),
|
|
108270
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_7__["default"], { variant: "body2", color: "text.secondary", sx: { mb: 1 } }, "\u041C\u043E\u0436\u043D\u043E \u043F\u043E\u0432\u0442\u043E\u0440\u0438\u0442\u044C \u043F\u0440\u043E\u0432\u0435\u0440\u043A\u0443 (\u0438\u043D\u043E\u0433\u0434\u0430 Google \u0414\u0438\u0441\u043A \u0435\u0449\u0451 \u043D\u0435 \u043E\u0442\u0434\u0430\u043B \u0441\u043F\u0438\u0441\u043E\u043A \u0444\u0430\u0439\u043B\u043E\u0432) \u0438\u043B\u0438 \u043E\u0441\u0442\u0430\u0432\u0438\u0442\u044C \u043A\u0430\u043A \u0435\u0441\u0442\u044C, \u0435\u0441\u043B\u0438 \u0434\u043B\u044F \u044D\u0442\u043E\u0439 \u043F\u0430\u043F\u043A\u0438 \u0444\u0430\u0439\u043B\u0430 \u0438 \u043D\u0435 \u0434\u043E\u043B\u0436\u043D\u043E \u0431\u044B\u0442\u044C."),
|
|
108271
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_7__["default"], { variant: "body2", color: "text.secondary" }, "\u041F\u043E\u043A\u0430 \u043E\u043A\u043D\u043E \u043E\u0442\u043A\u0440\u044B\u0442\u043E, \u0430\u0432\u0442\u043E\u0441\u043E\u0445\u0440\u0430\u043D\u0435\u043D\u0438\u0435 \u0438 \u0437\u0430\u043F\u0438\u0441\u044C \u043D\u0430\u0441\u0442\u0440\u043E\u0435\u043A \u0432 \u044D\u0442\u0443 \u043F\u0430\u043F\u043A\u0443 \u043D\u0430 \u0414\u0438\u0441\u043A\u0435 \u043D\u0435 \u0432\u044B\u043F\u043E\u043B\u043D\u044F\u044E\u0442\u0441\u044F \u2014 \u0447\u0442\u043E\u0431\u044B \u043D\u0435 \u0441\u043E\u0437\u0434\u0430\u0442\u044C \u043D\u043E\u0432\u044B\u0439 \u0444\u0430\u0439\u043B, \u043F\u043E\u043A\u0430 \u0432\u044B \u043D\u0435 \u0440\u0435\u0448\u0438\u0442\u0435, \u0435\u0441\u0442\u044C \u043B\u0438 \u0443\u0436\u0435 \u043D\u0430\u0441\u0442\u0440\u043E\u0439\u043A\u0438.")),
|
|
108272
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_35__["default"], { sx: { px: 3, pb: 2, gap: 1 } },
|
|
108273
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_22__["default"], { onClick: handleSettingsFileMissingRetry, variant: "outlined", disabled: settingsFileMissingDialog.retrying, startIcon: settingsFileMissingDialog.retrying ? react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_19__["default"], { size: 16, color: "inherit" }) : react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_icons_material__WEBPACK_IMPORTED_MODULE_59__["default"], null) }, "\u041F\u0435\u0440\u0435\u043F\u0440\u043E\u0432\u0435\u0440\u0438\u0442\u044C"),
|
|
108274
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_22__["default"], { onClick: handleSettingsFileMissingDismissOk, variant: "contained", disabled: settingsFileMissingDialog.retrying }, "\u044D\u0442\u043E \u043D\u043E\u0440\u043C\u0430\u043B\u044C\u043D\u043E"))),
|
|
108275
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_PromptManagerDialog__WEBPACK_IMPORTED_MODULE_62__["default"], { open: promptManagerOpen, onClose: () => setPromptManagerOpen(false) }),
|
|
108276
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_32__["default"], { open: settingsBackupDialogOpen, onClose: () => {
|
|
108277
|
+
setSettingsBackupDialogOpen(false);
|
|
108278
|
+
setSettingsImportBundle(null);
|
|
108279
|
+
setSettingsImportFlags(null);
|
|
108280
|
+
}, maxWidth: "md", fullWidth: true, scroll: "paper" },
|
|
108281
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_33__["default"], { sx: {
|
|
108282
|
+
display: 'flex',
|
|
108283
|
+
alignItems: 'center',
|
|
108284
|
+
justifyContent: 'space-between',
|
|
108285
|
+
gap: 1,
|
|
108286
|
+
pr: 1
|
|
108287
|
+
} },
|
|
108288
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_7__["default"], { component: "span", variant: "h6", sx: { fontSize: '1.1rem' } }, "\u0420\u0435\u0437\u0435\u0440\u0432\u043D\u0430\u044F \u043A\u043E\u043F\u0438\u044F \u043D\u0430\u0441\u0442\u0440\u043E\u0435\u043A (\u044D\u0442\u043E \u0443\u0441\u0442\u0440\u043E\u0439\u0441\u0442\u0432\u043E)"),
|
|
108289
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_10__["default"], { "aria-label": "\u0437\u0430\u043A\u0440\u044B\u0442\u044C", onClick: () => {
|
|
108290
|
+
setSettingsBackupDialogOpen(false);
|
|
108291
|
+
setSettingsImportBundle(null);
|
|
108292
|
+
setSettingsImportFlags(null);
|
|
108293
|
+
}, size: "small" },
|
|
108294
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_icons_material__WEBPACK_IMPORTED_MODULE_48__["default"], null))),
|
|
108295
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_34__["default"], { dividers: true, sx: { maxHeight: { xs: '70vh', sm: '75vh' } } },
|
|
108296
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_7__["default"], { variant: "body2", color: "text.secondary", sx: { mb: 2 } },
|
|
108297
|
+
"\u041F\u0440\u043E\u043C\u043F\u0442\u044B, \u043E\u0432\u0435\u0440\u0440\u0430\u0439\u0434\u044B, \u043F\u043E\u0434\u0445\u043E\u0434\u044B (\u0432\u043A\u043B\u044E\u0447\u0430\u044F \u0433\u043B\u043E\u0431\u0430\u043B\u044C\u043D\u044B\u0439 \u0438 \u043F\u043E-\u0441\u0442\u0440\u043E\u0447\u043D\u044B\u0435 \u0440\u0435\u0436\u0438\u043C\u044B \u0431\u0443\u043B\u043B\u0435\u0442\u043E\u0432 \u0432\u043D\u0443\u0442\u0440\u0438 promptOverrides), \u043C\u043E\u0434\u0435\u043B\u0438; \u043F\u0440\u0438 \u043E\u0442\u043C\u0435\u0447\u0435\u043D\u043D\u044B\u0445 \u043E\u043F\u0446\u0438\u044F\u0445 \u2014 Google OAuth, \u043A\u043B\u044E\u0447 OpenRouter, \u0442\u043E\u043A\u0435\u043D\u044B. \u041A\u044D\u0448 URL \u043F\u0430\u043F\u043E\u043A Drive \u0432 \u0431\u0430\u043D\u0434\u043B \u043D\u0435 \u0432\u0445\u043E\u0434\u0438\u0442. \u041D\u0435 \u0437\u0430\u0442\u0440\u0430\u0433\u0438\u0432\u0430\u0435\u0442 \u043F\u0430\u043F\u043A\u0438 \u043E\u0444\u0444\u0435\u0440\u043E\u0432 \u0438 project-settings \u043D\u0430 Google Drive. \u0424\u0430\u0439\u043B JSON: format = ",
|
|
108298
|
+
_appSettingsBundle__WEBPACK_IMPORTED_MODULE_64__.SETTINGS_BUNDLE_FORMAT,
|
|
108299
|
+
", \u0432\u0435\u0440\u0441\u0438\u044F 1."),
|
|
108300
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_13__["default"], { direction: { xs: 'column', md: 'row' }, spacing: 3, alignItems: "flex-start" },
|
|
108301
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_6__["default"], { sx: { flex: 1, minWidth: 260 } },
|
|
108302
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_7__["default"], { variant: "subtitle2", sx: { mb: 1, fontWeight: 600 } }, "\u042D\u043A\u0441\u043F\u043E\u0440\u0442"),
|
|
108303
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_37__["default"], null,
|
|
108304
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_24__["default"], { control: react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_25__["default"], { checked: settingsExportFlags.promptOverrides, onChange: e => setSettingsExportFlags(f => ({ ...f, promptOverrides: e.target.checked })) }), label: "\u041F\u0440\u043E\u043C\u043F\u0442\u044B \u0438 \u043F\u043E\u0434\u0445\u043E\u0434\u044B (\u043A\u0440\u0435\u043E, \u043F\u0430\u0440\u044B, \u0441\u0447\u0451\u0442\u0447\u0438\u043A\u0438, \u043A\u0430\u0441\u0442\u043E\u043C\u043D\u044B\u0435 \u0442\u0435\u043A\u0441\u0442\u044B, \u0442\u0443\u043C\u0431\u043B\u0435\u0440\u044B \u0431\u0443\u043B\u043B\u0435\u0442\u043E\u0432: \u0432\u0435\u0437\u0434\u0435 / \u043F\u043E \u043F\u043E\u0434\u0445\u043E\u0434\u0430\u043C \u2014 \u0432\u0441\u0451 \u0432 promptOverrides)" }),
|
|
108305
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_24__["default"], { control: react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_25__["default"], { checked: settingsExportFlags.localStorageUi, onChange: e => setSettingsExportFlags(f => ({ ...f, localStorageUi: e.target.checked })) }), label: "\u041C\u043E\u0434\u0435\u043B\u0438, \u0432\u0430\u043B\u0438\u0434\u0430\u0442\u043E\u0440, \u0442\u0435\u043C\u0430, \u0441\u043E\u043E\u0442\u043D\u043E\u0448\u0435\u043D\u0438\u0435 \u0441\u0442\u043E\u0440\u043E\u043D" }),
|
|
108306
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_24__["default"], { control: react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_25__["default"], { checked: settingsExportFlags.googleOAuth, onChange: e => setSettingsExportFlags(f => ({ ...f, googleOAuth: e.target.checked })) }), label: "Google Client ID / Secret (\u0438\u0437 config)" }),
|
|
108307
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_24__["default"], { control: react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_25__["default"], { checked: settingsExportFlags.openRouterKey, onChange: e => setSettingsExportFlags(f => ({ ...f, openRouterKey: e.target.checked })) }), label: "\u041A\u043B\u044E\u0447 OpenRouter (\u0438\u0437 config; \u0445\u0440\u0430\u043D\u0438\u0442\u0435 \u0444\u0430\u0439\u043B \u0432 \u0431\u0435\u0437\u043E\u043F\u0430\u0441\u043D\u043E\u0441\u0442\u0438)" }),
|
|
108308
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_24__["default"], { control: react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_25__["default"], { checked: settingsExportFlags.googleTokens, onChange: e => setSettingsExportFlags(f => ({ ...f, googleTokens: e.target.checked })) }), label: "\u0422\u043E\u043A\u0435\u043D\u044B Google (\u0434\u043E\u0441\u0442\u0443\u043F/\u043E\u0431\u043D\u043E\u0432\u043B\u0435\u043D\u0438\u0435) \u2014 \u043F\u043E \u0443\u043C\u043E\u043B\u0447\u0430\u043D\u0438\u044E \u0432\u044B\u043A\u043B., \u0440\u0438\u0441\u043A \u0443\u0442\u0435\u0447\u043A\u0438" })),
|
|
108309
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_22__["default"], { variant: "outlined", sx: { mt: 2 }, onClick: handleSettingsExport }, "\u0421\u043E\u0445\u0440\u0430\u043D\u0438\u0442\u044C JSON\u2026")),
|
|
108310
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_6__["default"], { sx: { flex: 1, minWidth: 260 } },
|
|
108311
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_7__["default"], { variant: "subtitle2", sx: { mb: 1, fontWeight: 600 } }, "\u0418\u043C\u043F\u043E\u0440\u0442"),
|
|
108312
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_22__["default"], { variant: "outlined", onClick: () => settingsImportFileInputRef.current?.click() }, "\u0412\u044B\u0431\u0440\u0430\u0442\u044C JSON\u2026"),
|
|
108313
|
+
settingsImportBundle && settingsImportFlags && (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_6__["default"], { sx: { mt: 2, p: 1.5, border: 1, borderColor: 'divider', borderRadius: 1 } },
|
|
108314
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_7__["default"], { variant: "caption", color: "text.secondary", display: "block", sx: { mb: 1 } },
|
|
108315
|
+
"\u0424\u0430\u0439\u043B: ",
|
|
108316
|
+
settingsImportBundle.exportedAt ? new Date(settingsImportBundle.exportedAt).toLocaleString() : '—'),
|
|
108317
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_37__["default"], null,
|
|
108318
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_24__["default"], { control: react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_25__["default"], { checked: settingsImportFlags.promptOverrides, disabled: !(0,_appSettingsBundle__WEBPACK_IMPORTED_MODULE_64__.getPresentSections)(settingsImportBundle).promptOverrides, onChange: e => setSettingsImportFlags(f => f ? { ...f, promptOverrides: e.target.checked } : f) }), label: "\u041F\u0440\u043E\u043C\u043F\u0442\u044B \u0438 \u043F\u043E\u0434\u0445\u043E\u0434\u044B" }),
|
|
108319
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_24__["default"], { control: react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_25__["default"], { checked: settingsImportFlags.localStorage, disabled: !(0,_appSettingsBundle__WEBPACK_IMPORTED_MODULE_64__.getPresentSections)(settingsImportBundle).localStorage, onChange: e => setSettingsImportFlags(f => f ? { ...f, localStorage: e.target.checked } : f) }), label: "LocalStorage (\u043C\u043E\u0434\u0435\u043B\u0438, \u0442\u0435\u043C\u0430, \u043A\u044D\u0448 \u043F\u0430\u043F\u043E\u043A, \u2026)" }),
|
|
108320
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_24__["default"], { control: react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_25__["default"], { checked: settingsImportFlags.electronConfig, disabled: !(0,_appSettingsBundle__WEBPACK_IMPORTED_MODULE_64__.getPresentSections)(settingsImportBundle).electronConfig, onChange: e => setSettingsImportFlags(f => f ? { ...f, electronConfig: e.target.checked } : f) }), label: "Config: OAuth, \u043A\u043B\u044E\u0447, \u0442\u043E\u043A\u0435\u043D\u044B (\u0435\u0441\u043B\u0438 \u0435\u0441\u0442\u044C \u0432 \u0444\u0430\u0439\u043B\u0435)" })),
|
|
108321
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_13__["default"], { direction: "row", spacing: 1, sx: { mt: 2 } },
|
|
108322
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_22__["default"], { variant: "contained", onClick: handleSettingsImportApply }, "\u041F\u0440\u0438\u043C\u0435\u043D\u0438\u0442\u044C"),
|
|
108323
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_22__["default"], { onClick: () => {
|
|
108324
|
+
setSettingsImportBundle(null);
|
|
108325
|
+
setSettingsImportFlags(null);
|
|
108326
|
+
} }, "\u041E\u0442\u043C\u0435\u043D\u0430"))))))),
|
|
108327
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_35__["default"], null,
|
|
108328
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_22__["default"], { onClick: () => {
|
|
108329
|
+
setSettingsBackupDialogOpen(false);
|
|
108330
|
+
setSettingsImportBundle(null);
|
|
108331
|
+
setSettingsImportFlags(null);
|
|
108332
|
+
} }, "\u0417\u0430\u043A\u0440\u044B\u0442\u044C"))),
|
|
108333
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_38__["default"], { open: settingsBackupSnackbar.open, autoHideDuration: 7000, onClose: () => setSettingsBackupSnackbar(s => ({ ...s, open: false })), anchorOrigin: { vertical: 'bottom', horizontal: 'center' } },
|
|
108334
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_20__["default"], { onClose: () => setSettingsBackupSnackbar(s => ({ ...s, open: false })), severity: settingsBackupSnackbar.severity, variant: "filled", sx: { width: '100%' } }, settingsBackupSnackbar.message)))));
|
|
107779
108335
|
}
|
|
107780
108336
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (App);
|
|
107781
108337
|
|
|
@@ -107814,25 +108370,28 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
107814
108370
|
/* harmony import */ var _mui_material__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! @mui/material */ "./node_modules/@mui/material/esm/Tab/Tab.js");
|
|
107815
108371
|
/* harmony import */ var _mui_material__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! @mui/material */ "./node_modules/@mui/material/esm/Tooltip/Tooltip.js");
|
|
107816
108372
|
/* harmony import */ var _mui_material__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! @mui/material */ "./node_modules/@mui/material/esm/Checkbox/Checkbox.js");
|
|
107817
|
-
/* harmony import */ var _mui_material__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! @mui/material */ "./node_modules/@mui/material/esm/
|
|
107818
|
-
/* harmony import */ var _mui_material__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! @mui/material */ "./node_modules/@mui/material/esm/
|
|
107819
|
-
/* harmony import */ var _mui_material__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! @mui/material */ "./node_modules/@mui/material/esm/
|
|
107820
|
-
/* harmony import */ var _mui_material__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! @mui/material */ "./node_modules/@mui/material/esm/
|
|
107821
|
-
/* harmony import */ var _mui_material__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! @mui/material */ "./node_modules/@mui/material/esm/
|
|
107822
|
-
/* harmony import */ var
|
|
107823
|
-
/* harmony import */ var
|
|
107824
|
-
/* harmony import */ var
|
|
107825
|
-
/* harmony import */ var _mui_icons_material__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! @mui/icons-material */ "./node_modules/@mui/icons-material/esm/
|
|
107826
|
-
/* harmony import */ var _mui_icons_material__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! @mui/icons-material */ "./node_modules/@mui/icons-material/esm/
|
|
107827
|
-
/* harmony import */ var _mui_icons_material__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! @mui/icons-material */ "./node_modules/@mui/icons-material/esm/
|
|
107828
|
-
/* harmony import */ var _mui_icons_material__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! @mui/icons-material */ "./node_modules/@mui/icons-material/esm/
|
|
107829
|
-
/* harmony import */ var _mui_icons_material__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! @mui/icons-material */ "./node_modules/@mui/icons-material/esm/
|
|
107830
|
-
/* harmony import */ var _mui_icons_material__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(/*! @mui/icons-material */ "./node_modules/@mui/icons-material/esm/
|
|
107831
|
-
/* harmony import */ var _mui_icons_material__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(/*! @mui/icons-material */ "./node_modules/@mui/icons-material/esm/
|
|
107832
|
-
/* harmony import */ var _mui_icons_material__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(/*! @mui/icons-material */ "./node_modules/@mui/icons-material/esm/
|
|
107833
|
-
/* harmony import */ var
|
|
107834
|
-
/* harmony import */ var
|
|
107835
|
-
/* harmony import */ var
|
|
108373
|
+
/* harmony import */ var _mui_material__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! @mui/material */ "./node_modules/@mui/material/esm/FormControl/FormControl.js");
|
|
108374
|
+
/* harmony import */ var _mui_material__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! @mui/material */ "./node_modules/@mui/material/esm/Select/Select.js");
|
|
108375
|
+
/* harmony import */ var _mui_material__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! @mui/material */ "./node_modules/@mui/material/esm/MenuItem/MenuItem.js");
|
|
108376
|
+
/* harmony import */ var _mui_material__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! @mui/material */ "./node_modules/@mui/material/esm/Accordion/Accordion.js");
|
|
108377
|
+
/* harmony import */ var _mui_material__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! @mui/material */ "./node_modules/@mui/material/esm/AccordionSummary/AccordionSummary.js");
|
|
108378
|
+
/* harmony import */ var _mui_material__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! @mui/material */ "./node_modules/@mui/material/esm/AccordionDetails/AccordionDetails.js");
|
|
108379
|
+
/* harmony import */ var _mui_material__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! @mui/material */ "./node_modules/@mui/material/esm/DialogActions/DialogActions.js");
|
|
108380
|
+
/* harmony import */ var _mui_material__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! @mui/material */ "./node_modules/@mui/material/esm/Snackbar/Snackbar.js");
|
|
108381
|
+
/* harmony import */ var _mui_icons_material__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! @mui/icons-material */ "./node_modules/@mui/icons-material/esm/Cancel.js");
|
|
108382
|
+
/* harmony import */ var _mui_icons_material__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! @mui/icons-material */ "./node_modules/@mui/icons-material/esm/Close.js");
|
|
108383
|
+
/* harmony import */ var _mui_icons_material__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! @mui/icons-material */ "./node_modules/@mui/icons-material/esm/CompareArrows.js");
|
|
108384
|
+
/* harmony import */ var _mui_icons_material__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! @mui/icons-material */ "./node_modules/@mui/icons-material/esm/Edit.js");
|
|
108385
|
+
/* harmony import */ var _mui_icons_material__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! @mui/icons-material */ "./node_modules/@mui/icons-material/esm/ExpandMore.js");
|
|
108386
|
+
/* harmony import */ var _mui_icons_material__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(/*! @mui/icons-material */ "./node_modules/@mui/icons-material/esm/KeyboardArrowDown.js");
|
|
108387
|
+
/* harmony import */ var _mui_icons_material__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(/*! @mui/icons-material */ "./node_modules/@mui/icons-material/esm/KeyboardArrowUp.js");
|
|
108388
|
+
/* harmony import */ var _mui_icons_material__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(/*! @mui/icons-material */ "./node_modules/@mui/icons-material/esm/RestartAlt.js");
|
|
108389
|
+
/* harmony import */ var _mui_icons_material__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(/*! @mui/icons-material */ "./node_modules/@mui/icons-material/esm/Save.js");
|
|
108390
|
+
/* harmony import */ var _mui_icons_material__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(/*! @mui/icons-material */ "./node_modules/@mui/icons-material/esm/Search.js");
|
|
108391
|
+
/* harmony import */ var _mui_icons_material__WEBPACK_IMPORTED_MODULE_38__ = __webpack_require__(/*! @mui/icons-material */ "./node_modules/@mui/icons-material/esm/Settings.js");
|
|
108392
|
+
/* harmony import */ var _prompts__WEBPACK_IMPORTED_MODULE_39__ = __webpack_require__(/*! ./prompts */ "./src/prompts.ts");
|
|
108393
|
+
/* harmony import */ var _landingPrompts__WEBPACK_IMPORTED_MODULE_40__ = __webpack_require__(/*! ./landingPrompts */ "./src/landingPrompts.ts");
|
|
108394
|
+
/* harmony import */ var _promptOverrides__WEBPACK_IMPORTED_MODULE_41__ = __webpack_require__(/*! ./promptOverrides */ "./src/promptOverrides.ts");
|
|
107836
108395
|
|
|
107837
108396
|
|
|
107838
108397
|
|
|
@@ -107845,11 +108404,11 @@ function TabPanel(props) {
|
|
|
107845
108404
|
}
|
|
107846
108405
|
/** Подсказка для кнопки типа товара: списки подходов для текстов и картинок (номера как в таблицах). */
|
|
107847
108406
|
function productTypePresetTooltip(label) {
|
|
107848
|
-
const textNums =
|
|
108407
|
+
const textNums = _promptOverrides__WEBPACK_IMPORTED_MODULE_41__.PRODUCT_TYPE_TEXT_PAIR_PRESETS[label];
|
|
107849
108408
|
if (!textNums)
|
|
107850
108409
|
return label;
|
|
107851
108410
|
const sortedText = [...textNums].sort((a, b) => a - b);
|
|
107852
|
-
const imgPreset =
|
|
108411
|
+
const imgPreset = _promptOverrides__WEBPACK_IMPORTED_MODULE_41__.PRODUCT_TYPE_IMAGE_PRESETS[label];
|
|
107853
108412
|
const sortedImg = imgPreset ? [...imgPreset].sort((a, b) => a - b) : null;
|
|
107854
108413
|
return (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_1__["default"], { sx: { py: 0.25, maxWidth: 380, color: 'common.white', fontSize: '0.75rem' } },
|
|
107855
108414
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_2__["default"], { variant: "caption", component: "div", sx: { fontWeight: 700, mb: 0.75, display: 'block', color: 'inherit' } },
|
|
@@ -107861,7 +108420,7 @@ function productTypePresetTooltip(label) {
|
|
|
107861
108420
|
n,
|
|
107862
108421
|
"."),
|
|
107863
108422
|
" ",
|
|
107864
|
-
|
|
108423
|
+
_prompts__WEBPACK_IMPORTED_MODULE_39__.PAIR_APPROACH_POOL[n - 1]?.name ?? '—')))),
|
|
107865
108424
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_2__["default"], { variant: "caption", component: "div", sx: { fontWeight: 700, mb: 0.75, display: 'block', color: 'inherit' } },
|
|
107866
108425
|
"\u0418\u0437\u043E\u0431\u0440\u0430\u0436\u0435\u043D\u0438\u044F",
|
|
107867
108426
|
sortedImg ? ` — ${sortedImg.length} подходов` : '',
|
|
@@ -107871,7 +108430,7 @@ function productTypePresetTooltip(label) {
|
|
|
107871
108430
|
n,
|
|
107872
108431
|
"."),
|
|
107873
108432
|
" ",
|
|
107874
|
-
|
|
108433
|
+
_prompts__WEBPACK_IMPORTED_MODULE_39__.CREO_APPROACHES[n - 1]?.name ?? '—'))))) : (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_2__["default"], { variant: "caption", sx: { display: 'block', lineHeight: 1.5, opacity: 0.85, color: 'inherit' } }, "\u0412\u0441\u0435 10 \u043F\u043E\u0434\u0445\u043E\u0434\u043E\u0432 \u043F\u043E 1 \u043A\u0440\u0435\u043E (\u043D\u0435\u0442 \u043E\u0442\u0434\u0435\u043B\u044C\u043D\u043E\u0433\u043E \u043F\u0440\u0435\u0441\u0435\u0442\u0430)"))));
|
|
107875
108434
|
}
|
|
107876
108435
|
function SearchableTextField({ value, onChange, disabled, rows = 15, placeholder, helperText, fullWidth = true, multiline = true }) {
|
|
107877
108436
|
const [searchOpen, setSearchOpen] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(false);
|
|
@@ -107956,7 +108515,7 @@ function SearchableTextField({ value, onChange, disabled, rows = 15, placeholder
|
|
|
107956
108515
|
border: '1px solid',
|
|
107957
108516
|
borderColor: 'divider',
|
|
107958
108517
|
} },
|
|
107959
|
-
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
108518
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_icons_material__WEBPACK_IMPORTED_MODULE_37__["default"], { sx: { fontSize: 18, color: 'text.secondary' } }),
|
|
107960
108519
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("input", { ref: searchInputRef, value: searchQuery, onChange: (e) => { setSearchQuery(e.target.value); setCurrentMatch(0); }, onKeyDown: handleKeyDown, placeholder: "\u041F\u043E\u0438\u0441\u043A...", style: {
|
|
107961
108520
|
border: 'none',
|
|
107962
108521
|
outline: 'none',
|
|
@@ -107969,11 +108528,11 @@ function SearchableTextField({ value, onChange, disabled, rows = 15, placeholder
|
|
|
107969
108528
|
}, autoFocus: true }),
|
|
107970
108529
|
searchQuery && (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_2__["default"], { variant: "caption", sx: { color: 'text.secondary', whiteSpace: 'nowrap', minWidth: 50, textAlign: 'center' } }, matches.length > 0 ? `${currentMatch + 1} / ${matches.length}` : 'нет')),
|
|
107971
108530
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_4__["default"], { size: "small", onClick: () => navigateToMatch(currentMatch - 1), disabled: matches.length === 0, sx: { p: 0.3 } },
|
|
107972
|
-
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
108531
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_icons_material__WEBPACK_IMPORTED_MODULE_34__["default"], { sx: { fontSize: 18 } })),
|
|
107973
108532
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_4__["default"], { size: "small", onClick: () => navigateToMatch(currentMatch + 1), disabled: matches.length === 0, sx: { p: 0.3 } },
|
|
107974
|
-
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
108533
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_icons_material__WEBPACK_IMPORTED_MODULE_33__["default"], { sx: { fontSize: 18 } })),
|
|
107975
108534
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_4__["default"], { size: "small", onClick: () => { setSearchOpen(false); setSearchQuery(''); }, sx: { p: 0.3 } },
|
|
107976
|
-
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
108535
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_icons_material__WEBPACK_IMPORTED_MODULE_29__["default"], { sx: { fontSize: 18 } })))),
|
|
107977
108536
|
!searchOpen && (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_4__["default"], { size: "small", onClick: () => { setSearchOpen(true); setTimeout(() => searchInputRef.current?.focus(), 50); }, sx: {
|
|
107978
108537
|
position: 'absolute',
|
|
107979
108538
|
top: 8,
|
|
@@ -107984,7 +108543,7 @@ function SearchableTextField({ value, onChange, disabled, rows = 15, placeholder
|
|
|
107984
108543
|
bgcolor: 'background.paper',
|
|
107985
108544
|
boxShadow: 1,
|
|
107986
108545
|
} },
|
|
107987
|
-
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
108546
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_icons_material__WEBPACK_IMPORTED_MODULE_37__["default"], { sx: { fontSize: 16 } }))),
|
|
107988
108547
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_5__["default"], { inputRef: textareaRef, fullWidth: fullWidth, multiline: multiline, rows: rows, value: value, onChange: onChange, disabled: disabled, placeholder: placeholder, helperText: helperText, onKeyDown: handleTextareaKeyDown, sx: {
|
|
107989
108548
|
'& .MuiInputBase-input': {
|
|
107990
108549
|
fontFamily: '"SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace',
|
|
@@ -108146,7 +108705,7 @@ function DiffViewer({ oldText, newText }) {
|
|
|
108146
108705
|
border: '1px solid',
|
|
108147
108706
|
borderColor: 'divider',
|
|
108148
108707
|
} },
|
|
108149
|
-
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
108708
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_icons_material__WEBPACK_IMPORTED_MODULE_37__["default"], { sx: { fontSize: 18, color: 'text.secondary' } }),
|
|
108150
108709
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("input", { ref: searchInputRef, value: searchQuery, onChange: (e) => { setSearchQuery(e.target.value); setCurrentMatch(0); }, onKeyDown: handleSearchKeyDown, placeholder: "\u041F\u043E\u0438\u0441\u043A...", style: {
|
|
108151
108710
|
border: 'none',
|
|
108152
108711
|
outline: 'none',
|
|
@@ -108159,11 +108718,11 @@ function DiffViewer({ oldText, newText }) {
|
|
|
108159
108718
|
}, autoFocus: true }),
|
|
108160
108719
|
searchQuery && (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_2__["default"], { variant: "caption", sx: { color: 'text.secondary', whiteSpace: 'nowrap', minWidth: 50, textAlign: 'center' } }, totalMatches > 0 ? `${currentMatch + 1} / ${totalMatches}` : 'нет')),
|
|
108161
108720
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_4__["default"], { size: "small", onClick: () => navigateMatch(-1), disabled: totalMatches === 0, sx: { p: 0.3 } },
|
|
108162
|
-
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
108721
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_icons_material__WEBPACK_IMPORTED_MODULE_34__["default"], { sx: { fontSize: 18 } })),
|
|
108163
108722
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_4__["default"], { size: "small", onClick: () => navigateMatch(1), disabled: totalMatches === 0, sx: { p: 0.3 } },
|
|
108164
|
-
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
108723
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_icons_material__WEBPACK_IMPORTED_MODULE_33__["default"], { sx: { fontSize: 18 } })),
|
|
108165
108724
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_4__["default"], { size: "small", onClick: () => { setSearchOpen(false); setSearchQuery(''); }, sx: { p: 0.3 } },
|
|
108166
|
-
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
108725
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_icons_material__WEBPACK_IMPORTED_MODULE_29__["default"], { sx: { fontSize: 18 } })))),
|
|
108167
108726
|
!searchOpen && (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_4__["default"], { size: "small", onClick: () => { setSearchOpen(true); setTimeout(() => searchInputRef.current?.focus(), 50); }, sx: {
|
|
108168
108727
|
position: 'absolute',
|
|
108169
108728
|
top: 28,
|
|
@@ -108174,7 +108733,7 @@ function DiffViewer({ oldText, newText }) {
|
|
|
108174
108733
|
bgcolor: 'background.paper',
|
|
108175
108734
|
boxShadow: 1,
|
|
108176
108735
|
} },
|
|
108177
|
-
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
108736
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_icons_material__WEBPACK_IMPORTED_MODULE_37__["default"], { sx: { fontSize: 16 } }))),
|
|
108178
108737
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_6__["default"], { direction: "row", spacing: 1, sx: { mb: 1 }, alignItems: "center" },
|
|
108179
108738
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_7__["default"], { label: `+${stats.added}`, size: "small", sx: { bgcolor: '#e6ffec', color: '#1a7f37', fontWeight: 'bold', fontFamily: 'monospace' } }),
|
|
108180
108739
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_7__["default"], { label: `−${stats.removed}`, size: "small", sx: { bgcolor: '#ffebe9', color: '#cf222e', fontWeight: 'bold', fontFamily: 'monospace' } })),
|
|
@@ -108243,17 +108802,17 @@ function PromptManagerDialog({ open, onClose }) {
|
|
|
108243
108802
|
// selectedApproaches: array of indices from PAIR_APPROACH_POOL, ordered
|
|
108244
108803
|
const [selectedApproaches, setSelectedApproaches] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)([0, 1, 2]);
|
|
108245
108804
|
// imageApproachCounts: по одному на каждый подход (CREO_APPROACHES), каждый 0–MAX_IMAGES_PER_CREO_APPROACH
|
|
108246
|
-
const [imageApproachCounts, setImageApproachCounts] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(() => Array(
|
|
108805
|
+
const [imageApproachCounts, setImageApproachCounts] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(() => Array(_prompts__WEBPACK_IMPORTED_MODULE_39__.CREO_APPROACHES.length).fill(1));
|
|
108247
108806
|
const [creoToastOpen, setCreoToastOpen] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(false);
|
|
108248
108807
|
const [creoToastMessage, setCreoToastMessage] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)('');
|
|
108249
108808
|
const creoToastDebounceRef = react__WEBPACK_IMPORTED_MODULE_0___default().useRef(null);
|
|
108250
108809
|
// Загрузить оверрайды при открытии
|
|
108251
108810
|
(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => {
|
|
108252
108811
|
if (open) {
|
|
108253
|
-
const loaded = (0,
|
|
108812
|
+
const loaded = (0,_promptOverrides__WEBPACK_IMPORTED_MODULE_41__.loadPromptOverrides)();
|
|
108254
108813
|
setOverrides(loaded);
|
|
108255
|
-
setSelectedApproaches((0,
|
|
108256
|
-
setImageApproachCounts((0,
|
|
108814
|
+
setSelectedApproaches((0,_promptOverrides__WEBPACK_IMPORTED_MODULE_41__.getSelectedPairApproaches)());
|
|
108815
|
+
setImageApproachCounts((0,_promptOverrides__WEBPACK_IMPORTED_MODULE_41__.getImageApproachCounts)());
|
|
108257
108816
|
setHasChanges(false);
|
|
108258
108817
|
}
|
|
108259
108818
|
}, [open]);
|
|
@@ -108291,7 +108850,7 @@ function PromptManagerDialog({ open, onClose }) {
|
|
|
108291
108850
|
});
|
|
108292
108851
|
};
|
|
108293
108852
|
const handleImageApproachCountChange = (idx, count) => {
|
|
108294
|
-
const clamped = Math.max(0, Math.min(
|
|
108853
|
+
const clamped = Math.max(0, Math.min(_promptOverrides__WEBPACK_IMPORTED_MODULE_41__.MAX_IMAGES_PER_CREO_APPROACH, count));
|
|
108295
108854
|
setImageApproachCounts(prev => {
|
|
108296
108855
|
const next = [...prev];
|
|
108297
108856
|
if (idx >= 0 && idx < next.length)
|
|
@@ -108369,15 +108928,15 @@ function PromptManagerDialog({ open, onClose }) {
|
|
|
108369
108928
|
else {
|
|
108370
108929
|
console.log(debugMsg, overrides);
|
|
108371
108930
|
}
|
|
108372
|
-
(0,
|
|
108373
|
-
window.dispatchEvent(new Event(
|
|
108931
|
+
(0,_promptOverrides__WEBPACK_IMPORTED_MODULE_41__.savePromptOverrides)(overrides);
|
|
108932
|
+
window.dispatchEvent(new Event(_promptOverrides__WEBPACK_IMPORTED_MODULE_41__.PROMPT_OVERRIDES_SAVED_EVENT));
|
|
108374
108933
|
setHasChanges(false);
|
|
108375
108934
|
onClose();
|
|
108376
108935
|
};
|
|
108377
108936
|
const handleCancel = () => {
|
|
108378
108937
|
if (hasChanges) {
|
|
108379
108938
|
if (window.confirm('Есть несохраненные изменения. Закрыть без сохранения?')) {
|
|
108380
|
-
setOverrides((0,
|
|
108939
|
+
setOverrides((0,_promptOverrides__WEBPACK_IMPORTED_MODULE_41__.loadPromptOverrides)());
|
|
108381
108940
|
setHasChanges(false);
|
|
108382
108941
|
onClose();
|
|
108383
108942
|
}
|
|
@@ -108391,23 +108950,23 @@ function PromptManagerDialog({ open, onClose }) {
|
|
|
108391
108950
|
const getOriginalPrompt = (promptName) => {
|
|
108392
108951
|
switch (promptName) {
|
|
108393
108952
|
case 'getPairsSystemPrompt':
|
|
108394
|
-
return (0,
|
|
108953
|
+
return (0,_prompts__WEBPACK_IMPORTED_MODULE_39__.getPairsSystemPrompt)('${geo}', true, selectedApproaches.length, selectedApproaches);
|
|
108395
108954
|
case 'getPairsUserPrompt':
|
|
108396
|
-
return (0,
|
|
108955
|
+
return (0,_prompts__WEBPACK_IMPORTED_MODULE_39__.getPairsUserPrompt)('${product}', '${geo}', '${additionalInfo}', true, selectedApproaches.length, selectedApproaches);
|
|
108397
108956
|
case 'getTitlesSystemPrompt':
|
|
108398
|
-
return (0,
|
|
108957
|
+
return (0,_prompts__WEBPACK_IMPORTED_MODULE_39__.getTitlesSystemPrompt)('${geo}', true, selectedApproaches.length);
|
|
108399
108958
|
case 'getTextsSystemPrompt':
|
|
108400
|
-
return (0,
|
|
108959
|
+
return (0,_prompts__WEBPACK_IMPORTED_MODULE_39__.getTextsSystemPrompt)('${geo}', true, selectedApproaches.length);
|
|
108401
108960
|
case 'getUserPrompt':
|
|
108402
|
-
return (0,
|
|
108961
|
+
return (0,_prompts__WEBPACK_IMPORTED_MODULE_39__.getUserPrompt)('${product}', '${geo}', '${additionalInfo}', 'titles', true, selectedApproaches.length);
|
|
108403
108962
|
case 'getValidationPrompt':
|
|
108404
|
-
return (0,
|
|
108963
|
+
return (0,_prompts__WEBPACK_IMPORTED_MODULE_39__.getValidationPrompt)('${product}', '${geo}', ['keyword1', 'keyword2'], '${approachName}', true, 'Новая по брифу: 29 EUR; старая (2×): 58 EUR — в рантайме подставляется из поля цены; в кастомном промпте плейсхолдер ${priceBrief}', { expectNoBullets: true });
|
|
108405
108964
|
case 'getImageGenerationBasePrompt':
|
|
108406
|
-
return (0,
|
|
108965
|
+
return (0,_prompts__WEBPACK_IMPORTED_MODULE_39__.getImageGenerationBasePrompt)('${generateGeo}', '${generatePrice}', '${generateCurrency}', true);
|
|
108407
108966
|
case 'getLandingPageSystemPrompt':
|
|
108408
|
-
return (0,
|
|
108967
|
+
return (0,_landingPrompts__WEBPACK_IMPORTED_MODULE_40__.getLandingPageSystemPrompt)(true);
|
|
108409
108968
|
case 'getLandingPageUserPrompt':
|
|
108410
|
-
return (0,
|
|
108969
|
+
return (0,_landingPrompts__WEBPACK_IMPORTED_MODULE_40__.getLandingPageUserPrompt)('${product}', '${geo}', true);
|
|
108411
108970
|
default:
|
|
108412
108971
|
return '';
|
|
108413
108972
|
}
|
|
@@ -108429,18 +108988,18 @@ function PromptManagerDialog({ open, onClose }) {
|
|
|
108429
108988
|
enabled && (react__WEBPACK_IMPORTED_MODULE_0___default().createElement((react__WEBPACK_IMPORTED_MODULE_0___default().Fragment), null,
|
|
108430
108989
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_10__["default"], { size: "small", value: viewMode, exclusive: true, onChange: (_, val) => val && setViewModes(prev => ({ ...prev, [viewModeKey]: val })) },
|
|
108431
108990
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_11__["default"], { value: "edit" },
|
|
108432
|
-
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
108991
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_icons_material__WEBPACK_IMPORTED_MODULE_31__["default"], { sx: { fontSize: 16, mr: 0.5 } }),
|
|
108433
108992
|
" \u0420\u0435\u0434\u0430\u043A\u0442\u043E\u0440"),
|
|
108434
108993
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_11__["default"], { value: "diff" },
|
|
108435
|
-
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
108994
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_icons_material__WEBPACK_IMPORTED_MODULE_30__["default"], { sx: { fontSize: 16, mr: 0.5 } }),
|
|
108436
108995
|
" Diff")),
|
|
108437
|
-
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_12__["default"], { size: "small", startIcon: react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
108996
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_12__["default"], { size: "small", startIcon: react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_icons_material__WEBPACK_IMPORTED_MODULE_35__["default"], null), onClick: () => handleResetPrompt(promptName) }, "\u0421\u0431\u0440\u043E\u0441\u0438\u0442\u044C")))),
|
|
108438
108997
|
description && (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_2__["default"], { variant: "body2", color: "text.secondary", sx: { mb: 1 } }, description)),
|
|
108439
108998
|
enabled && viewMode === 'diff' ? (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(DiffViewer, { oldText: originalPrompt, newText: customPrompt })) : (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(SearchableTextField, { rows: 15, value: displayPrompt, onChange: (e) => handlePromptChange(promptName, e.target.value), disabled: !enabled, placeholder: enabled ? 'Введите кастомный промпт' : 'Включите переключатель для редактирования', helperText: !enabled ? 'Это оригинальный промпт. Включите переключатель выше для редактирования.' : undefined }))));
|
|
108440
108999
|
};
|
|
108441
109000
|
// Управление подходами для изображений
|
|
108442
109001
|
const handleApproachToggle = (approachName, enabled) => {
|
|
108443
|
-
const originalApproach =
|
|
109002
|
+
const originalApproach = _prompts__WEBPACK_IMPORTED_MODULE_39__.CREO_APPROACHES.find(a => a.name === approachName);
|
|
108444
109003
|
if (!originalApproach)
|
|
108445
109004
|
return;
|
|
108446
109005
|
setOverrides(prev => {
|
|
@@ -108490,7 +109049,7 @@ function PromptManagerDialog({ open, onClose }) {
|
|
|
108490
109049
|
return (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_13__["default"], { open: open, onClose: handleCancel, maxWidth: "lg", fullWidth: true },
|
|
108491
109050
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_14__["default"], null,
|
|
108492
109051
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_6__["default"], { direction: "row", spacing: 2, alignItems: "center" },
|
|
108493
|
-
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
109052
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_icons_material__WEBPACK_IMPORTED_MODULE_38__["default"], null),
|
|
108494
109053
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_2__["default"], { variant: "h6" }, "\u0423\u043F\u0440\u0430\u0432\u043B\u0435\u043D\u0438\u0435 \u043F\u0440\u043E\u043C\u043F\u0442\u0430\u043C\u0438"),
|
|
108495
109054
|
hasChanges && (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_7__["default"], { label: "\u0415\u0441\u0442\u044C \u043D\u0435\u0441\u043E\u0445\u0440\u0430\u043D\u0435\u043D\u043D\u044B\u0435 \u0438\u0437\u043C\u0435\u043D\u0435\u043D\u0438\u044F", color: "warning", size: "small" })))),
|
|
108496
109055
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_15__["default"], null,
|
|
@@ -108506,7 +109065,7 @@ function PromptManagerDialog({ open, onClose }) {
|
|
|
108506
109065
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_7__["default"], { label: `Выбрано: ${selectedApproaches.length}`, color: "primary", size: "small" }),
|
|
108507
109066
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_2__["default"], { variant: "caption", color: "text.secondary" }, "(\u043C\u0438\u043D\u0438\u043C\u0443\u043C 2, \u043C\u0430\u043A\u0441\u0438\u043C\u0443\u043C 10)")),
|
|
108508
109067
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_2__["default"], { variant: "caption", color: "text.secondary", sx: { display: 'block', mb: 0.75 } }, "\u0422\u0438\u043F \u0442\u043E\u0432\u0430\u0440\u0430 \u2014 \u0431\u044B\u0441\u0442\u0440\u044B\u0439 \u043D\u0430\u0431\u043E\u0440 \u043F\u0430\u0440 \u0442\u0435\u043A\u0441\u0442\u043E\u0432 \u0438 \u043F\u043E\u0434\u0445\u043E\u0434\u043E\u0432 \u043A \u0438\u0437\u043E\u0431\u0440\u0430\u0436\u0435\u043D\u0438\u044F\u043C (1\u201310 = \u2116 \u0441\u0442\u0440\u043E\u043A\u0438 \u0432 \u043A\u0430\u0436\u0434\u043E\u0439 \u0442\u0430\u0431\u043B\u0438\u0446\u0435):"),
|
|
108509
|
-
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_6__["default"], { direction: "row", flexWrap: "wrap", gap: 0.75, sx: { mb: 1.5 } }, Object.entries(
|
|
109068
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_6__["default"], { direction: "row", flexWrap: "wrap", gap: 0.75, sx: { mb: 1.5 } }, Object.entries(_promptOverrides__WEBPACK_IMPORTED_MODULE_41__.PRODUCT_TYPE_TEXT_PAIR_PRESETS).map(([label, nums]) => (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_18__["default"], { key: label, title: productTypePresetTooltip(label), placement: "top", arrow: true, enterDelay: 200, componentsProps: {
|
|
108510
109069
|
tooltip: {
|
|
108511
109070
|
sx: {
|
|
108512
109071
|
maxWidth: 420,
|
|
@@ -108519,13 +109078,13 @@ function PromptManagerDialog({ open, onClose }) {
|
|
|
108519
109078
|
},
|
|
108520
109079
|
} },
|
|
108521
109080
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_12__["default"], { size: "small", variant: "outlined", color: "inherit", sx: { textTransform: 'none', fontSize: '0.8rem' }, onClick: () => {
|
|
108522
|
-
const next = (0,
|
|
109081
|
+
const next = (0,_promptOverrides__WEBPACK_IMPORTED_MODULE_41__.productPresetNumbersToIndices)(nums);
|
|
108523
109082
|
if (next.length < 2)
|
|
108524
109083
|
return;
|
|
108525
|
-
const imgNums =
|
|
109084
|
+
const imgNums = _promptOverrides__WEBPACK_IMPORTED_MODULE_41__.PRODUCT_TYPE_IMAGE_PRESETS[label];
|
|
108526
109085
|
const nextImageCounts = imgNums
|
|
108527
|
-
? (0,
|
|
108528
|
-
: Array(
|
|
109086
|
+
? (0,_promptOverrides__WEBPACK_IMPORTED_MODULE_41__.productPresetNumbersToImageCounts)(imgNums)
|
|
109087
|
+
: Array(_prompts__WEBPACK_IMPORTED_MODULE_39__.CREO_APPROACHES.length).fill(1);
|
|
108529
109088
|
setSelectedApproaches(next);
|
|
108530
109089
|
setImageApproachCounts(nextImageCounts);
|
|
108531
109090
|
setOverrides(o => ({
|
|
@@ -108545,7 +109104,7 @@ function PromptManagerDialog({ open, onClose }) {
|
|
|
108545
109104
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("th", { style: { textAlign: 'left', padding: '4px 8px', borderBottom: '1px solid #ccc', whiteSpace: 'nowrap', width: 140 } }, "\u0423\u0433\u043E\u043B"),
|
|
108546
109105
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("th", { style: { textAlign: 'left', padding: '4px 8px', borderBottom: '1px solid #ccc' } }, "\u0417\u0430\u0433\u043E\u043B\u043E\u0432\u043E\u043A"),
|
|
108547
109106
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("th", { style: { textAlign: 'left', padding: '4px 8px', borderBottom: '1px solid #ccc' } }, "\u0422\u0435\u043A\u0441\u0442"))),
|
|
108548
|
-
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("tbody", null,
|
|
109107
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("tbody", null, _prompts__WEBPACK_IMPORTED_MODULE_39__.PAIR_APPROACH_POOL.map((p, i) => {
|
|
108549
109108
|
const checked = selectedApproaches.includes(i);
|
|
108550
109109
|
const isLast = checked && selectedApproaches.length <= 2;
|
|
108551
109110
|
return (react__WEBPACK_IMPORTED_MODULE_0___default().createElement("tr", { key: i, onClick: () => handlePairApproachToggle(i), style: {
|
|
@@ -108563,22 +109122,39 @@ function PromptManagerDialog({ open, onClose }) {
|
|
|
108563
109122
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("td", { style: { padding: '4px 8px', color: '#777' } }, p.textApproach.split('\n')[0])));
|
|
108564
109123
|
}))))),
|
|
108565
109124
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_1__["default"], { sx: { mb: 3, p: 2, border: '1px solid', borderColor: 'divider', borderRadius: 1 } },
|
|
108566
|
-
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_6__["default"], { direction: "row", spacing: 2, alignItems: "center", sx: { mb: 1.5 } },
|
|
109125
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_6__["default"], { direction: "row", spacing: 2, alignItems: "center", sx: { mb: 1.5, flexWrap: 'wrap' } },
|
|
108567
109126
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_2__["default"], { variant: "subtitle1", sx: { fontWeight: 600 } }, "\u041F\u043E\u0434\u0445\u043E\u0434\u044B \u0434\u043B\u044F \u0438\u0437\u043E\u0431\u0440\u0430\u0436\u0435\u043D\u0438\u0439"),
|
|
108568
109127
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_7__["default"], { label: `Всего: ${imageApproachCounts.reduce((a, b) => a + b, 0)}`, color: "primary", size: "small" }),
|
|
108569
109128
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_2__["default"], { variant: "caption", color: "text.secondary" },
|
|
108570
109129
|
"(0\u2013",
|
|
108571
|
-
|
|
109130
|
+
_promptOverrides__WEBPACK_IMPORTED_MODULE_41__.MAX_IMAGES_PER_CREO_APPROACH,
|
|
108572
109131
|
" \u043D\u0430 \u043A\u0430\u0436\u0434\u044B\u0439 \u043F\u043E\u0434\u0445\u043E\u0434)")),
|
|
109132
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_8__["default"], { sx: { mb: 1.5, display: 'flex' }, control: react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_9__["default"], { size: "small", checked: Boolean(overrides.imageBulletsGlobalOff), onChange: (_, c) => {
|
|
109133
|
+
setOverrides(o => {
|
|
109134
|
+
const n = { ...o };
|
|
109135
|
+
if (c)
|
|
109136
|
+
n.imageBulletsGlobalOff = true;
|
|
109137
|
+
else
|
|
109138
|
+
delete n.imageBulletsGlobalOff;
|
|
109139
|
+
return n;
|
|
109140
|
+
});
|
|
109141
|
+
setHasChanges(true);
|
|
109142
|
+
} }), label: react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_1__["default"], null,
|
|
109143
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_2__["default"], { variant: "body2" }, "\u0412\u0435\u0437\u0434\u0435 \u0431\u0435\u0437 \u043E\u0431\u044F\u0437\u0430\u0442\u0435\u043B\u044C\u043D\u044B\u0445 \u0431\u0443\u043B\u043B\u0435\u0442\u043E\u0432"),
|
|
109144
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_2__["default"], { variant: "caption", color: "text.secondary", display: "block" }, "\u0412\u043A\u043B\u044E\u0447\u0430\u0435\u0442 \u0433\u0435\u043D\u0435\u0440\u0430\u0446\u0438\u044E \u0438 \u0432\u0430\u043B\u0438\u0434\u0430\u0442\u043E\u0440. \u0421\u043E\u0445\u0440\u0430\u043D\u044F\u0435\u0442\u0441\u044F \u0432 \u043D\u0430\u0441\u0442\u0440\u043E\u0439\u043A\u0430\u0445 \u043F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u044F, \u043D\u0435 \u0432 \u043F\u0430\u043F\u043A\u0443 \u043E\u0444\u0444\u0435\u0440\u0430. \u041F\u0435\u0440\u0435\u043A\u0440\u044B\u0432\u0430\u0435\u0442 \u00AB\u0432\u043A\u043B.\u00BB \u0432 \u0441\u0442\u0440\u043E\u043A\u0435.")) }),
|
|
108573
109145
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_1__["default"], { sx: { overflowX: 'auto' } },
|
|
108574
109146
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("table", { style: { width: '100%', borderCollapse: 'collapse', fontSize: 12 } },
|
|
108575
109147
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("thead", null,
|
|
108576
109148
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("tr", null,
|
|
108577
109149
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("th", { style: { textAlign: 'center', padding: '4px 8px', borderBottom: '1px solid #ccc', width: 70 } }, "\u041A\u043E\u043B-\u0432\u043E"),
|
|
108578
|
-
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("th", { style: { textAlign: 'left', padding: '4px 8px', borderBottom: '1px solid #ccc', whiteSpace: 'nowrap',
|
|
109150
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("th", { style: { textAlign: 'left', padding: '4px 8px', borderBottom: '1px solid #ccc', whiteSpace: 'nowrap', maxWidth: 200 } }, "\u041F\u043E\u0434\u0445\u043E\u0434"),
|
|
109151
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("th", { style: { textAlign: 'left', padding: '4px 8px', borderBottom: '1px solid #ccc', minWidth: 200 } },
|
|
109152
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_18__["default"], { title: "\u041F\u043E \u0443\u043C\u043E\u043B\u0447\u0430\u043D\u0438\u044E = \u043A\u0430\u043A \u0432 \u043F\u043E\u0441\u0442\u0430\u0432\u043A\u0435 \u043F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u044F. \u00AB\u0412\u043A\u043B.\u00BB \u0441 \u0431\u0443\u043B\u043B\u0435\u0442\u0430\u043C\u0438 \u0442\u043E\u043B\u044C\u043A\u043E \u0435\u0441\u043B\u0438 \u0433\u043B\u043E\u0431\u0430\u043B\u044C\u043D\u044B\u0439 \u0442\u0443\u043C\u0431\u043B\u0435\u0440 \u0432\u044B\u0448\u0435 \u0432\u044B\u043A\u043B\u044E\u0447\u0435\u043D.", arrow: true, placement: "top" },
|
|
109153
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("span", null, "\u0411\u0443\u043B\u043B\u0435\u0442\u044B"))),
|
|
108579
109154
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("th", { style: { textAlign: 'left', padding: '4px 8px', borderBottom: '1px solid #ccc' } }, "\u041E\u043F\u0438\u0441\u0430\u043D\u0438\u0435"))),
|
|
108580
|
-
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("tbody", null,
|
|
109155
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("tbody", null, _prompts__WEBPACK_IMPORTED_MODULE_39__.CREO_APPROACHES.map((approach, i) => {
|
|
108581
109156
|
const count = imageApproachCounts[i] ?? 0;
|
|
109157
|
+
const mode = overrides.imageApproachNoBulletsMode?.[approach.name] ?? 'default';
|
|
108582
109158
|
return (react__WEBPACK_IMPORTED_MODULE_0___default().createElement("tr", { key: i, style: { opacity: count > 0 ? 1 : 0.6 } },
|
|
108583
109159
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("td", { style: { textAlign: 'center', padding: '2px 8px', verticalAlign: 'middle' } },
|
|
108584
109160
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_5__["default"], { type: "number", size: "small", value: count, onChange: (e) => {
|
|
@@ -108586,13 +109162,35 @@ function PromptManagerDialog({ open, onClose }) {
|
|
|
108586
109162
|
handleImageApproachCountChange(i, isNaN(v) ? 0 : v);
|
|
108587
109163
|
}, onBlur: handleImageCountBlur, inputProps: {
|
|
108588
109164
|
min: 0,
|
|
108589
|
-
max:
|
|
109165
|
+
max: _promptOverrides__WEBPACK_IMPORTED_MODULE_41__.MAX_IMAGES_PER_CREO_APPROACH,
|
|
108590
109166
|
step: 1,
|
|
108591
109167
|
onWheel: (e) => {
|
|
108592
109168
|
e.preventDefault();
|
|
108593
109169
|
},
|
|
108594
109170
|
}, sx: { width: 56, '& .MuiInputBase-input': { textAlign: 'center', py: 0.5 } } })),
|
|
108595
|
-
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("td", { style: { padding: '4px 8px', fontWeight: 500, whiteSpace: '
|
|
109171
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("td", { style: { padding: '4px 8px', fontWeight: 500, whiteSpace: 'normal' } }, approach.name),
|
|
109172
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("td", { style: { padding: '4px 8px', verticalAlign: 'middle' } },
|
|
109173
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_20__["default"], { size: "small", sx: { minWidth: 168 } },
|
|
109174
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_21__["default"], { value: mode, onChange: e => {
|
|
109175
|
+
const v = e.target.value;
|
|
109176
|
+
setOverrides(o => {
|
|
109177
|
+
const m = { ...(o.imageApproachNoBulletsMode || {}) };
|
|
109178
|
+
if (v === 'default') {
|
|
109179
|
+
delete m[approach.name];
|
|
109180
|
+
}
|
|
109181
|
+
else {
|
|
109182
|
+
m[approach.name] = v;
|
|
109183
|
+
}
|
|
109184
|
+
return {
|
|
109185
|
+
...o,
|
|
109186
|
+
imageApproachNoBulletsMode: Object.keys(m).length > 0 ? m : undefined,
|
|
109187
|
+
};
|
|
109188
|
+
});
|
|
109189
|
+
setHasChanges(true);
|
|
109190
|
+
} },
|
|
109191
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_22__["default"], { value: "default" }, "\u041F\u043E \u0443\u043C\u043E\u043B\u0447\u0430\u043D\u0438\u044E"),
|
|
109192
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_22__["default"], { value: "off" }, "\u0412\u044B\u043A\u043B. (0 \u0431\u0443\u043B\u043B\u0435\u0442\u043E\u0432)"),
|
|
109193
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_22__["default"], { value: "on" }, "\u0412\u043A\u043B. (3 \u0432\u044B\u0433\u043E\u0434\u044B)")))),
|
|
108596
109194
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("td", { style: { padding: '4px 8px', color: '#777' } }, approach.prompt.split('\n')[0])));
|
|
108597
109195
|
}))))),
|
|
108598
109196
|
renderPromptEditor('getPairsSystemPrompt', 'Системный промпт (пары заголовок + текст)', 'Единый системный промпт, генерирующий все пары одним запросом. Переменные: ${geo}, ${count}, ${n}'),
|
|
@@ -108600,29 +109198,29 @@ function PromptManagerDialog({ open, onClose }) {
|
|
|
108600
109198
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(TabPanel, { value: tabValue, index: 1 },
|
|
108601
109199
|
renderPromptEditor('getImageGenerationBasePrompt', 'Базовый промпт для изображений', 'Базовый промпт, используемый для всех подходов'),
|
|
108602
109200
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_2__["default"], { variant: "h6", sx: { mt: 3, mb: 2 } }, "\u0420\u0435\u0434\u0430\u043A\u0442\u0438\u0440\u043E\u0432\u0430\u043D\u0438\u0435 \u043F\u043E\u0434\u0445\u043E\u0434\u043E\u0432 \u0434\u043B\u044F \u0433\u0435\u043D\u0435\u0440\u0430\u0446\u0438\u0438 \u043A\u0440\u0435\u0430\u0442\u0438\u0432\u043E\u0432"),
|
|
108603
|
-
|
|
109201
|
+
_prompts__WEBPACK_IMPORTED_MODULE_39__.CREO_APPROACHES.map((approach) => {
|
|
108604
109202
|
const override = overrides.creoApproaches?.[approach.name];
|
|
108605
109203
|
const enabled = override?.enabled || false;
|
|
108606
109204
|
const approachViewKey = `approach_${approach.name}`;
|
|
108607
109205
|
const approachViewMode = viewModes[approachViewKey] || 'edit';
|
|
108608
|
-
return (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
108609
|
-
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
109206
|
+
return (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_23__["default"], { key: approach.name, sx: { mb: 2 } },
|
|
109207
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_24__["default"], { expandIcon: react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_icons_material__WEBPACK_IMPORTED_MODULE_32__["default"], null) },
|
|
108610
109208
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_6__["default"], { direction: "row", spacing: 2, alignItems: "center", sx: { width: '100%', mr: 2 } },
|
|
108611
109209
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_2__["default"], { variant: "subtitle1" }, approach.name),
|
|
108612
109210
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_7__["default"], { label: enabled ? 'Кастомный' : 'Оригинал', color: enabled ? 'primary' : 'default', size: "small" }),
|
|
108613
|
-
enabled && (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_12__["default"], { size: "small", startIcon: react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
109211
|
+
enabled && (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_12__["default"], { size: "small", startIcon: react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_icons_material__WEBPACK_IMPORTED_MODULE_35__["default"], null), onClick: (e) => {
|
|
108614
109212
|
e.stopPropagation();
|
|
108615
109213
|
handleResetApproach(approach.name);
|
|
108616
109214
|
} }, "\u0421\u0431\u0440\u043E\u0441\u0438\u0442\u044C")))),
|
|
108617
|
-
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
109215
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_25__["default"], null,
|
|
108618
109216
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_6__["default"], { direction: "row", spacing: 2, alignItems: "center", sx: { mb: 2 } },
|
|
108619
109217
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_8__["default"], { control: react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_9__["default"], { checked: enabled, onChange: (e) => handleApproachToggle(approach.name, e.target.checked) }), label: "\u0418\u0441\u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u044C \u043A\u0430\u0441\u0442\u043E\u043C\u043D\u044B\u0439 \u043F\u043E\u0434\u0445\u043E\u0434" }),
|
|
108620
109218
|
enabled && (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_10__["default"], { size: "small", value: approachViewMode, exclusive: true, onChange: (_, val) => val && setViewModes(prev => ({ ...prev, [approachViewKey]: val })) },
|
|
108621
109219
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_11__["default"], { value: "edit" },
|
|
108622
|
-
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
109220
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_icons_material__WEBPACK_IMPORTED_MODULE_31__["default"], { sx: { fontSize: 16, mr: 0.5 } }),
|
|
108623
109221
|
" \u0420\u0435\u0434\u0430\u043A\u0442\u043E\u0440"),
|
|
108624
109222
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_11__["default"], { value: "diff" },
|
|
108625
|
-
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
109223
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_icons_material__WEBPACK_IMPORTED_MODULE_30__["default"], { sx: { fontSize: 16, mr: 0.5 } }),
|
|
108626
109224
|
" Diff")))),
|
|
108627
109225
|
enabled && approachViewMode === 'diff' ? (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_1__["default"], null,
|
|
108628
109226
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_2__["default"], { variant: "subtitle2", sx: { mb: 1 } }, "\u041F\u0440\u043E\u043C\u043F\u0442 \u043F\u043E\u0434\u0445\u043E\u0434\u0430"),
|
|
@@ -108645,10 +109243,202 @@ function PromptManagerDialog({ open, onClose }) {
|
|
|
108645
109243
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(TabPanel, { value: tabValue, index: 3 },
|
|
108646
109244
|
renderPromptEditor('getLandingPageSystemPrompt', 'Промпт лендинга (System)', 'Системный промпт для генерации лендинг-страниц'),
|
|
108647
109245
|
renderPromptEditor('getLandingPageUserPrompt', 'Промпт лендинга (User)', 'Пользовательский промпт для генерации лендинг-страниц'))),
|
|
108648
|
-
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
108649
|
-
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_12__["default"], { onClick: handleCancel, startIcon: react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
108650
|
-
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_12__["default"], { onClick: handleSave, variant: "contained", startIcon: react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
108651
|
-
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
109246
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_26__["default"], null,
|
|
109247
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_12__["default"], { onClick: handleCancel, startIcon: react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_icons_material__WEBPACK_IMPORTED_MODULE_28__["default"], null) }, "\u041E\u0442\u043C\u0435\u043D\u0430"),
|
|
109248
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_12__["default"], { onClick: handleSave, variant: "contained", startIcon: react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_icons_material__WEBPACK_IMPORTED_MODULE_36__["default"], null), disabled: !hasChanges }, "\u0421\u043E\u0445\u0440\u0430\u043D\u0438\u0442\u044C")),
|
|
109249
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_mui_material__WEBPACK_IMPORTED_MODULE_27__["default"], { open: creoToastOpen, autoHideDuration: 3000, onClose: () => setCreoToastOpen(false), message: creoToastMessage, anchorOrigin: { vertical: 'bottom', horizontal: 'center' } })));
|
|
109250
|
+
}
|
|
109251
|
+
|
|
109252
|
+
|
|
109253
|
+
/***/ }),
|
|
109254
|
+
|
|
109255
|
+
/***/ "./src/appSettingsBundle.ts":
|
|
109256
|
+
/*!**********************************!*\
|
|
109257
|
+
!*** ./src/appSettingsBundle.ts ***!
|
|
109258
|
+
\**********************************/
|
|
109259
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
109260
|
+
|
|
109261
|
+
"use strict";
|
|
109262
|
+
__webpack_require__.r(__webpack_exports__);
|
|
109263
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
109264
|
+
/* harmony export */ CURRENT_SETTINGS_BUNDLE_VERSION: () => (/* binding */ CURRENT_SETTINGS_BUNDLE_VERSION),
|
|
109265
|
+
/* harmony export */ DEFAULT_EXPORT_FLAGS: () => (/* binding */ DEFAULT_EXPORT_FLAGS),
|
|
109266
|
+
/* harmony export */ LOCAL_STORAGE_UI_KEYS: () => (/* binding */ LOCAL_STORAGE_UI_KEYS),
|
|
109267
|
+
/* harmony export */ SETTINGS_BUNDLE_FORMAT: () => (/* binding */ SETTINGS_BUNDLE_FORMAT),
|
|
109268
|
+
/* harmony export */ applyLocalStorageFromBundle: () => (/* binding */ applyLocalStorageFromBundle),
|
|
109269
|
+
/* harmony export */ applyPromptOverridesFromBundle: () => (/* binding */ applyPromptOverridesFromBundle),
|
|
109270
|
+
/* harmony export */ buildSettingsBundle: () => (/* binding */ buildSettingsBundle),
|
|
109271
|
+
/* harmony export */ getPresentSections: () => (/* binding */ getPresentSections),
|
|
109272
|
+
/* harmony export */ mergeElectronImport: () => (/* binding */ mergeElectronImport),
|
|
109273
|
+
/* harmony export */ parseSettingsBundleJson: () => (/* binding */ parseSettingsBundleJson),
|
|
109274
|
+
/* harmony export */ serializeBundle: () => (/* binding */ serializeBundle)
|
|
109275
|
+
/* harmony export */ });
|
|
109276
|
+
/* harmony import */ var _promptOverrides__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./promptOverrides */ "./src/promptOverrides.ts");
|
|
109277
|
+
/**
|
|
109278
|
+
* Экспорт / импорт локальных настроек (localStorage, promptOverrides, фрагменты config.json Electron).
|
|
109279
|
+
* Не включает данные офферов на Google Drive.
|
|
109280
|
+
*/
|
|
109281
|
+
|
|
109282
|
+
const SETTINGS_BUNDLE_FORMAT = 'docs-combiner-settings';
|
|
109283
|
+
const CURRENT_SETTINGS_BUNDLE_VERSION = 1;
|
|
109284
|
+
/** Ключи localStorage: UI + модели + валидатор (без кэша Drive) */
|
|
109285
|
+
const LOCAL_STORAGE_UI_KEYS = [
|
|
109286
|
+
'themeMode',
|
|
109287
|
+
'selectedImageModelSquare',
|
|
109288
|
+
'selectedImageModelRect',
|
|
109289
|
+
'selectedImageModel',
|
|
109290
|
+
'selectedValidationModel',
|
|
109291
|
+
'selectedContentModel',
|
|
109292
|
+
'selectedLandingModel',
|
|
109293
|
+
'validationDisabled',
|
|
109294
|
+
'autoRemakeOnValidatorError',
|
|
109295
|
+
'imageAspectRatio',
|
|
109296
|
+
];
|
|
109297
|
+
const DEFAULT_EXPORT_FLAGS = {
|
|
109298
|
+
promptOverrides: true,
|
|
109299
|
+
localStorageUi: true,
|
|
109300
|
+
googleOAuth: false,
|
|
109301
|
+
openRouterKey: false,
|
|
109302
|
+
googleTokens: false,
|
|
109303
|
+
};
|
|
109304
|
+
function collectLocalStorageKeys(keys) {
|
|
109305
|
+
const out = {};
|
|
109306
|
+
for (const k of keys) {
|
|
109307
|
+
try {
|
|
109308
|
+
const v = localStorage.getItem(k);
|
|
109309
|
+
if (v !== null)
|
|
109310
|
+
out[k] = v;
|
|
109311
|
+
}
|
|
109312
|
+
catch {
|
|
109313
|
+
// ignore
|
|
109314
|
+
}
|
|
109315
|
+
}
|
|
109316
|
+
return out;
|
|
109317
|
+
}
|
|
109318
|
+
/**
|
|
109319
|
+
* Собрать бандл для сохранения в JSON.
|
|
109320
|
+
* `fullElectronConfig` — результат `loadConfig()` в Electron, иначе null (секции из config не попадут).
|
|
109321
|
+
*/
|
|
109322
|
+
function buildSettingsBundle(flags, fullElectronConfig) {
|
|
109323
|
+
const bundle = {
|
|
109324
|
+
format: SETTINGS_BUNDLE_FORMAT,
|
|
109325
|
+
version: 1,
|
|
109326
|
+
exportedAt: new Date().toISOString(),
|
|
109327
|
+
};
|
|
109328
|
+
if (flags.promptOverrides) {
|
|
109329
|
+
try {
|
|
109330
|
+
bundle.promptOverrides = (0,_promptOverrides__WEBPACK_IMPORTED_MODULE_0__.loadPromptOverrides)();
|
|
109331
|
+
}
|
|
109332
|
+
catch {
|
|
109333
|
+
// ignore
|
|
109334
|
+
}
|
|
109335
|
+
}
|
|
109336
|
+
const ls = {};
|
|
109337
|
+
if (flags.localStorageUi) {
|
|
109338
|
+
Object.assign(ls, collectLocalStorageKeys(LOCAL_STORAGE_UI_KEYS));
|
|
109339
|
+
}
|
|
109340
|
+
if (Object.keys(ls).length)
|
|
109341
|
+
bundle.localStorage = ls;
|
|
109342
|
+
if (fullElectronConfig && typeof fullElectronConfig === 'object') {
|
|
109343
|
+
const ec = {};
|
|
109344
|
+
if (flags.googleOAuth) {
|
|
109345
|
+
if (typeof fullElectronConfig.clientId === 'string')
|
|
109346
|
+
ec.clientId = fullElectronConfig.clientId;
|
|
109347
|
+
if (typeof fullElectronConfig.clientSecret === 'string')
|
|
109348
|
+
ec.clientSecret = fullElectronConfig.clientSecret;
|
|
109349
|
+
}
|
|
109350
|
+
if (flags.openRouterKey && typeof fullElectronConfig.openaiApiKey === 'string') {
|
|
109351
|
+
ec.openaiApiKey = fullElectronConfig.openaiApiKey;
|
|
109352
|
+
}
|
|
109353
|
+
if (flags.googleTokens) {
|
|
109354
|
+
if (typeof fullElectronConfig.accessToken === 'string')
|
|
109355
|
+
ec.accessToken = fullElectronConfig.accessToken;
|
|
109356
|
+
if (typeof fullElectronConfig.refreshToken === 'string')
|
|
109357
|
+
ec.refreshToken = fullElectronConfig.refreshToken;
|
|
109358
|
+
}
|
|
109359
|
+
if (Object.keys(ec).length)
|
|
109360
|
+
bundle.electronConfig = ec;
|
|
109361
|
+
}
|
|
109362
|
+
return bundle;
|
|
109363
|
+
}
|
|
109364
|
+
function serializeBundle(bundle) {
|
|
109365
|
+
return JSON.stringify(bundle, null, 2);
|
|
109366
|
+
}
|
|
109367
|
+
function parseSettingsBundleJson(text) {
|
|
109368
|
+
let data;
|
|
109369
|
+
try {
|
|
109370
|
+
data = JSON.parse(text);
|
|
109371
|
+
}
|
|
109372
|
+
catch (e) {
|
|
109373
|
+
throw new Error('Файл не является корректным JSON');
|
|
109374
|
+
}
|
|
109375
|
+
if (!data || typeof data !== 'object')
|
|
109376
|
+
throw new Error('Некорректная структура файла');
|
|
109377
|
+
const o = data;
|
|
109378
|
+
if (o.format !== SETTINGS_BUNDLE_FORMAT) {
|
|
109379
|
+
throw new Error('Не файл настроек Docs Combiner (неверный format)');
|
|
109380
|
+
}
|
|
109381
|
+
if (o.version !== 1) {
|
|
109382
|
+
throw new Error(`Версия бандла ${String(o.version)} не поддерживается (ожидается 1)`);
|
|
109383
|
+
}
|
|
109384
|
+
return o;
|
|
109385
|
+
}
|
|
109386
|
+
/** Какие блоки реально есть в бандле — для чекбоксов импорта */
|
|
109387
|
+
function getPresentSections(bundle) {
|
|
109388
|
+
return {
|
|
109389
|
+
promptOverrides: bundle.promptOverrides != null && Object.keys(bundle.promptOverrides).length > 0,
|
|
109390
|
+
localStorage: bundle.localStorage != null && Object.keys(bundle.localStorage).length > 0,
|
|
109391
|
+
electronConfig: bundle.electronConfig != null && Object.keys(bundle.electronConfig).length > 0,
|
|
109392
|
+
};
|
|
109393
|
+
}
|
|
109394
|
+
/**
|
|
109395
|
+
* Импортирует настройки. Возвращает, что сделать с React (вызвать из App).
|
|
109396
|
+
*/
|
|
109397
|
+
function applyLocalStorageFromBundle(bundle, importLocal) {
|
|
109398
|
+
if (!importLocal || !bundle.localStorage)
|
|
109399
|
+
return { keysWritten: [] };
|
|
109400
|
+
const keysWritten = [];
|
|
109401
|
+
let themeMode;
|
|
109402
|
+
for (const [k, v] of Object.entries(bundle.localStorage)) {
|
|
109403
|
+
try {
|
|
109404
|
+
localStorage.setItem(k, v);
|
|
109405
|
+
keysWritten.push(k);
|
|
109406
|
+
if (k === 'themeMode' && (v === 'dark' || v === 'light'))
|
|
109407
|
+
themeMode = v;
|
|
109408
|
+
}
|
|
109409
|
+
catch {
|
|
109410
|
+
// ignore
|
|
109411
|
+
}
|
|
109412
|
+
}
|
|
109413
|
+
return { keysWritten, themeMode };
|
|
109414
|
+
}
|
|
109415
|
+
/**
|
|
109416
|
+
* `savePromptOverrides` + событие синхронизации. Имеет смысл вызывать после `applyLocalStorageFromBundle`, чтобы перезаписать сырой ключ `promptOverrides` в localStorage, если он был в файле.
|
|
109417
|
+
*/
|
|
109418
|
+
function applyPromptOverridesFromBundle(bundle, on) {
|
|
109419
|
+
if (!on || !bundle.promptOverrides)
|
|
109420
|
+
return;
|
|
109421
|
+
(0,_promptOverrides__WEBPACK_IMPORTED_MODULE_0__.savePromptOverrides)(bundle.promptOverrides);
|
|
109422
|
+
try {
|
|
109423
|
+
window.dispatchEvent(new Event(_promptOverrides__WEBPACK_IMPORTED_MODULE_0__.PROMPT_OVERRIDES_SAVED_EVENT));
|
|
109424
|
+
}
|
|
109425
|
+
catch {
|
|
109426
|
+
// ignore
|
|
109427
|
+
}
|
|
109428
|
+
}
|
|
109429
|
+
/**
|
|
109430
|
+
* Слияние electron-конфига. Только перечисленные поля из `bundle.electronConfig`, остальное в `current` не трогаем.
|
|
109431
|
+
*/
|
|
109432
|
+
function mergeElectronImport(current, bundle, on) {
|
|
109433
|
+
if (!on || !bundle.electronConfig)
|
|
109434
|
+
return current;
|
|
109435
|
+
const next = { ...current };
|
|
109436
|
+
const ec = bundle.electronConfig;
|
|
109437
|
+
['clientId', 'clientSecret', 'openaiApiKey', 'accessToken', 'refreshToken'].forEach(f => {
|
|
109438
|
+
if (ec[f] !== undefined)
|
|
109439
|
+
next[f] = ec[f];
|
|
109440
|
+
});
|
|
109441
|
+
return next;
|
|
108652
109442
|
}
|
|
108653
109443
|
|
|
108654
109444
|
|
|
@@ -108871,6 +109661,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
108871
109661
|
/* harmony export */ applyParsedApproachesFromDrive: () => (/* binding */ applyParsedApproachesFromDrive),
|
|
108872
109662
|
/* harmony export */ getCreoApproachOverride: () => (/* binding */ getCreoApproachOverride),
|
|
108873
109663
|
/* harmony export */ getImageApproachCounts: () => (/* binding */ getImageApproachCounts),
|
|
109664
|
+
/* harmony export */ getImageApproachNoBulletsMode: () => (/* binding */ getImageApproachNoBulletsMode),
|
|
109665
|
+
/* harmony export */ getImageBulletsGlobalOff: () => (/* binding */ getImageBulletsGlobalOff),
|
|
108874
109666
|
/* harmony export */ getPairsCount: () => (/* binding */ getPairsCount),
|
|
108875
109667
|
/* harmony export */ getPromptOverride: () => (/* binding */ getPromptOverride),
|
|
108876
109668
|
/* harmony export */ getSelectedPairApproaches: () => (/* binding */ getSelectedPairApproaches),
|
|
@@ -109000,6 +109792,19 @@ function normalizeImageApproachCountsFromDrive(raw) {
|
|
|
109000
109792
|
return null;
|
|
109001
109793
|
return out;
|
|
109002
109794
|
}
|
|
109795
|
+
/**
|
|
109796
|
+
* «Везде без обязательных буллетов» (генерация + валидатор). Через `promptOverrides` (localStorage).
|
|
109797
|
+
*/
|
|
109798
|
+
function getImageBulletsGlobalOff() {
|
|
109799
|
+
return Boolean(loadPromptOverrides().imageBulletsGlobalOff);
|
|
109800
|
+
}
|
|
109801
|
+
/** Режим буллетов для крео-подхода; без записи = default. */
|
|
109802
|
+
function getImageApproachNoBulletsMode(approachName) {
|
|
109803
|
+
const raw = loadPromptOverrides().imageApproachNoBulletsMode?.[approachName];
|
|
109804
|
+
if (raw === 'off' || raw === 'on' || raw === 'default')
|
|
109805
|
+
return raw;
|
|
109806
|
+
return 'default';
|
|
109807
|
+
}
|
|
109003
109808
|
/**
|
|
109004
109809
|
* Получить количество изображений по каждому подходу (N элементов, 0–MAX_IMAGES_PER_CREO_APPROACH).
|
|
109005
109810
|
* По умолчанию — по 1 на каждый подход.
|
|
@@ -109217,8 +110022,10 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
109217
110022
|
/* harmony export */ PAIR_APPROACH_POOL: () => (/* binding */ PAIR_APPROACH_POOL),
|
|
109218
110023
|
/* harmony export */ TEXTS_APPROACH_POOL: () => (/* binding */ TEXTS_APPROACH_POOL),
|
|
109219
110024
|
/* harmony export */ TITLES_APPROACH_POOL: () => (/* binding */ TITLES_APPROACH_POOL),
|
|
110025
|
+
/* harmony export */ getCreoApproachBaseNameFromImageLabel: () => (/* binding */ getCreoApproachBaseNameFromImageLabel),
|
|
109220
110026
|
/* harmony export */ getCreoApproachExpandedTasks: () => (/* binding */ getCreoApproachExpandedTasks),
|
|
109221
110027
|
/* harmony export */ getCreoApproaches: () => (/* binding */ getCreoApproaches),
|
|
110028
|
+
/* harmony export */ getEffectiveCreoNoBullets: () => (/* binding */ getEffectiveCreoNoBullets),
|
|
109222
110029
|
/* harmony export */ getImageGenerationBasePrompt: () => (/* binding */ getImageGenerationBasePrompt),
|
|
109223
110030
|
/* harmony export */ getPairsSystemPrompt: () => (/* binding */ getPairsSystemPrompt),
|
|
109224
110031
|
/* harmony export */ getPairsUserPrompt: () => (/* binding */ getPairsUserPrompt),
|
|
@@ -109276,6 +110083,24 @@ function pickOne(arr) {
|
|
|
109276
110083
|
function shuffle(arr) {
|
|
109277
110084
|
return [...arr].sort(() => Math.random() - 0.5);
|
|
109278
110085
|
}
|
|
110086
|
+
/** Суффикс ` (1:1)` / ` (2:3)` в подписи слота — убрать, чтобы сопоставить с CREO_APPROACHES. */
|
|
110087
|
+
function getCreoApproachBaseNameFromImageLabel(approachLabel) {
|
|
110088
|
+
return approachLabel.replace(/\s+\((1:1|2:3)\)\s*$/, '').trim() || approachLabel;
|
|
110089
|
+
}
|
|
110090
|
+
/**
|
|
110091
|
+
* Итог: буллет-блок **не** использовать (0 буллетов), с учётом глобального и per-approach в promptOverrides
|
|
110092
|
+
* и умолчания `noBullets` в `CREO_APPROACHES`.
|
|
110093
|
+
*/
|
|
110094
|
+
function getEffectiveCreoNoBullets(approach) {
|
|
110095
|
+
if ((0,_promptOverrides__WEBPACK_IMPORTED_MODULE_0__.getImageBulletsGlobalOff)())
|
|
110096
|
+
return true;
|
|
110097
|
+
const mode = (0,_promptOverrides__WEBPACK_IMPORTED_MODULE_0__.getImageApproachNoBulletsMode)(approach.name);
|
|
110098
|
+
if (mode === 'off')
|
|
110099
|
+
return true;
|
|
110100
|
+
if (mode === 'on')
|
|
110101
|
+
return false;
|
|
110102
|
+
return Boolean(approach.noBullets);
|
|
110103
|
+
}
|
|
109279
110104
|
/** Выбрать 3 случайных буллета по правилам подхода (1 из каждой категории, порядок случайный) */
|
|
109280
110105
|
function pickRandomBullets(approachName) {
|
|
109281
110106
|
const categories = APPROACH_BULLET_CATEGORIES[approachName];
|
|
@@ -109658,32 +110483,58 @@ function getValidationProductReferencePreamble() {
|
|
|
109658
110483
|
---
|
|
109659
110484
|
`;
|
|
109660
110485
|
}
|
|
110486
|
+
function getValidationPromptBulletAddendum(expectNoBullets) {
|
|
110487
|
+
if (expectNoBullets === undefined)
|
|
110488
|
+
return '';
|
|
110489
|
+
if (expectNoBullets) {
|
|
110490
|
+
return `
|
|
110491
|
+
|
|
110492
|
+
---
|
|
110493
|
+
АВТО — БУЛЛЕТЫ ДЛЯ ЭТОГО КРЕО (подмешано приложением):
|
|
110494
|
+
- Отдельный вертикальный список из трёх выгод с «галочками»/иконками **не** требуется. Не пиши ОШИБКИ «нет 3 буллетов», «нужен список выгод», «недостаточно буллетов».
|
|
110495
|
+
- Не добавляй в список ОШИБОК пункты по вертикальности, «ровно 3», иконкам у буллетов, читаемости буллетов.`;
|
|
110496
|
+
}
|
|
110497
|
+
return `
|
|
110498
|
+
|
|
110499
|
+
---
|
|
110500
|
+
АВТО — БУЛЛЕТЫ ДЛЯ ЭТОГО КРЕО (подмешано приложением):
|
|
110501
|
+
- Должны быть **три** отдельные короткие выгоды (вертикальный список), с визуальными галочками/иконками, **вне** банки/упаковки. **ОШИБКА**, если визуально **нет** такого блока или **меньше трёх** отдельных читаемых строк (не путай с ценой/скидкой).`;
|
|
110502
|
+
}
|
|
109661
110503
|
/**
|
|
109662
110504
|
* Промпт для валидации рекламных креативов.
|
|
109663
110505
|
* `keywords` — только для подстановки в кастомный override (${keywords}); в дефолтном тексте не используется.
|
|
110506
|
+
* `options.expectNoBullets` — true: не требовать 3 буллета; false: требовать три выгоды-строки. undefined: как «true» (как раньше).
|
|
109664
110507
|
*/
|
|
109665
110508
|
function getValidationPrompt(product, geo, keywords, approachName, noOverride,
|
|
109666
110509
|
/** Краткий эталон цен из приложения (новая + ожидаемая старая при -50%); пусто — без сверки чисел */
|
|
109667
|
-
priceBrief) {
|
|
110510
|
+
priceBrief, options) {
|
|
110511
|
+
const expectNoBullets = options?.expectNoBullets !== false;
|
|
109668
110512
|
if (!noOverride) {
|
|
109669
110513
|
const override = (0,_promptOverrides__WEBPACK_IMPORTED_MODULE_0__.getPromptOverride)('getValidationPrompt');
|
|
109670
110514
|
if (override?.enabled && override.customPrompt) {
|
|
109671
110515
|
const approachLine = approachName?.trim() ? `\nПОДХОД: ${approachName.trim()}\n` : '\n';
|
|
109672
|
-
|
|
110516
|
+
const base = override.customPrompt
|
|
109673
110517
|
.replace(/\$\{product\}/g, product)
|
|
109674
110518
|
.replace(/\$\{geo\}/g, geo)
|
|
109675
110519
|
.replace(/\$\{keywords\}/g, keywords.join(', '))
|
|
109676
110520
|
.replace(/\$\{approachLine\}/g, approachLine)
|
|
109677
110521
|
.replace(/\$\{priceBrief\}/g, priceBrief?.trim() || 'В приложении бриф цены не задан — сверяй только визуально две цены и -50%.');
|
|
110522
|
+
return base + getValidationPromptBulletAddendum(options?.expectNoBullets);
|
|
109678
110523
|
}
|
|
109679
110524
|
}
|
|
109680
110525
|
const approachLine = approachName?.trim() ? `\nПОДХОД: ${approachName.trim()}\n` : '\n';
|
|
109681
110526
|
const isScreenshotReviews = (approachName?.trim() ?? '') === 'Скрин отзывов';
|
|
109682
|
-
|
|
109683
|
-
|
|
109684
|
-
|
|
110527
|
+
const step0BulletsHint = expectNoBullets
|
|
110528
|
+
? 'BULLETS: кратко опиши, что видишь (для справки). Для **этого** крео отдельные три benefit-строки с «галочками» **не** обязательны; не используй для вердикта требований «ровно 3».'
|
|
110529
|
+
: 'BULLETS: укажи, видишь ли **три** отдельные короткие выгоды (вертикальный список, иконки/✓) вне банки. Если **нет** трёх различимых строк — явно напиши «< 3» или «нет списка».';
|
|
110530
|
+
const step2Bullets = expectNoBullets
|
|
110531
|
+
? `ШАГ 2 — БУЛЛЕТЫ:
|
|
109685
110532
|
- Не проверяй и не оценивай количество, отсутствие или наличие буллетов. 0, 1, 2, 3 и больше — всё допустимо.
|
|
109686
|
-
- НЕ добавляй в финальный список ошибок ни одного пункта, связанного с буллетами (вертикальность, «ровно 3», иконки, читаемость буллетов и т.п.)
|
|
110533
|
+
- НЕ добавляй в финальный список ошибок ни одного пункта, связанного с буллетами (вертикальность, «ровно 3», иконки, читаемость буллетов и т.п.).`
|
|
110534
|
+
: `ШАГ 2 — БУЛЛЕТЫ (жёстко для этого крео):
|
|
110535
|
+
- Должны присутствовать **три** отдельные короткие выгоды, визуально как вертикальный список, с иконками/галочками, **вне** упаковки/банки.
|
|
110536
|
+
- **ОШИБКА**, если визуально **нет** такого блока, **меньше трёх** читаемых отдельных строк, или неразличимы 3 смысла. Не путай с ценой, скидкой и CTA.
|
|
110537
|
+
- **ОШИБКА**, если выгоды печатны **на** банке/этикетке (должны быть в рекламном слое, не на продукте).`;
|
|
109687
110538
|
const priceBriefTrim = priceBrief?.trim() || '';
|
|
109688
110539
|
const stepPriceBrief = priceBriefTrim
|
|
109689
110540
|
? `ШАГ P — ЦЕНЫ (сначала макет, потом бриф):
|
|
@@ -109796,10 +110647,10 @@ function getImageGenerationBasePrompt(generateGeo, generatePrice, generateCurren
|
|
|
109796
110647
|
}
|
|
109797
110648
|
_debugLog('⚠️ Using DEFAULT getImageGenerationBasePrompt');
|
|
109798
110649
|
}
|
|
109799
|
-
// Подходы без буллитов — из подходов с count > 0
|
|
110650
|
+
// Подходы без буллитов — из подходов с count > 0 (умолчание + per-approach + глобал)
|
|
109800
110651
|
const counts = (0,_promptOverrides__WEBPACK_IMPORTED_MODULE_0__.getImageApproachCounts)();
|
|
109801
110652
|
const selectedApproaches = CREO_APPROACHES.filter((_, i) => counts[i] > 0);
|
|
109802
|
-
const noBulletsNames = selectedApproaches.filter(a => a
|
|
110653
|
+
const noBulletsNames = selectedApproaches.filter(a => getEffectiveCreoNoBullets(a)).map(a => a.name);
|
|
109803
110654
|
const noBulletsCond = noBulletsNames.map(n => `"${n}"`).join(' или ');
|
|
109804
110655
|
const totalApproaches = counts.reduce((a, b) => a + b, 0);
|
|
109805
110656
|
const ratio = aspectRatio || '1:1';
|
|
@@ -109969,14 +110820,16 @@ function getCreoApproachExpandedTasks() {
|
|
|
109969
110820
|
if (!approach)
|
|
109970
110821
|
continue;
|
|
109971
110822
|
const override = (0,_promptOverrides__WEBPACK_IMPORTED_MODULE_0__.getCreoApproachOverride)(approach.name);
|
|
110823
|
+
const effNoBullets = getEffectiveCreoNoBullets(approach);
|
|
109972
110824
|
const resolved = override?.enabled
|
|
109973
110825
|
? {
|
|
109974
110826
|
...approach,
|
|
110827
|
+
noBullets: effNoBullets,
|
|
109975
110828
|
prompt: override.customPrompt || approach.prompt,
|
|
109976
110829
|
headlineAngle: override.customHeadlineAngle || approach.headlineAngle,
|
|
109977
110830
|
bulletsFocus: override.customBulletsFocus || approach.bulletsFocus
|
|
109978
110831
|
}
|
|
109979
|
-
: approach;
|
|
110832
|
+
: { ...approach, noBullets: effNoBullets };
|
|
109980
110833
|
if (override?.enabled) {
|
|
109981
110834
|
_debugLog(`✅ Using CUSTOM approach: ${approach.name}`, `hasPrompt=${!!override.customPrompt}`, `hasHeadline=${!!override.customHeadlineAngle}`, `hasBullets=${!!override.customBulletsFocus}`);
|
|
109982
110835
|
}
|