PageSourceSearch

https://app.lunacheckout.com/_next/static/chunks/5341-9fd856fb9710016c.js

js lunacheckout.com collected 2026-10-04 22:22:35 UTC 15,550 bytes, 29 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5341],{65531:function(e,t,r){"use strict";r.d(t,{Z:function(){return createLucideIcon}});var a=r(2265);/**
2 * @license lucide-react v0.456.0 - ISC
3 *
4 * This source code is licensed under the ISC license.
5 * See the LICENSE file in the root directory of this source tree.
6 */let toKebabCase=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),mergeClasses=(...e)=>e.filter((e,t,r)=>!!e&&""!==e.trim()&&r.indexOf(e)===t).join(" ").trim();/**
7 * @license lucide-react v0.456.0 - ISC
8 *
9 * This source code is licensed under the ISC license.
10 * See the LICENSE file in the root directory of this source tree.
11 */var s={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
12 * @license lucide-react v0.456.0 - ISC
13 *
14 * This source code is licensed under the ISC license.
15 * See the LICENSE file in the root directory of this source tree.
16 */let n=(0,a.forwardRef)(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:n,className:i="",children:l,iconNode:o,...c},d)=>(0,a.createElement)("svg",{ref:d,...s,width:t,height:t,stroke:e,strokeWidth:n?24*Number(r)/Number(t):r,className:mergeClasses("lucide",i),...c},[...o.map(([e,t])=>(0,a.createElement)(e,t)),...Array.isArray(l)?l:[l]])),createLucideIcon=(e,t)=>{let r=(0,a.forwardRef)(({className:r,...s},i)=>(0,a.createElement)(n,{ref:i,iconNode:t,className:mergeClasses(`lucide-${toKebabCase(e)}`,r),...s}));return r.displayName=`${e}`,r}},74056:function(e,t,r){"use strict";r.d(t,{Z:function(){return s}});var a=r(65531);/**
17 * @license lucide-react v0.456.0 - ISC
18 *
19 * This source code is licensed under the ISC license.
20 * See the LICENSE file in the root directory of this source tree.
21 */let s=(0,a.Z)("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]])},36319:function(e,t,r){"use strict";r.r(t);var a=r(57437),s=r(2265),n=r(24033),i=r(14185),l=r(93665),o=r(33718),c=r(16136),d=r(47779),u=r(75224),p=r(19174),h=r(41751),m=r(74056);let Section=e=>{let{title:t,children:r}=e;return(0,a.jsxs)("section",{className:"rounded-lg overflow-hidden bg-[--bg-2] mb-4",children:[(0,a.jsx)("div",{className:"box-title",children:(0,a.jsx)("h1",{children:t})}),(0,a.jsx)("div",{className:"p-6",children:r})]})};t.default=e=>{var t;let{current:r,onSave:f}=e,{push:v}=(0,n.useRouter)(),[b,y]=(0,s.useState)(!1),[k,j]=(0,s.useState)(null!=r?r:{active:"0",name:"",date_init:"",date_end:"",validate_days:0,min_amount:0,max_amount:0,percent:0}),[_,C]=(0,s.useState)(k.date_init?"programed":"indeterminate"),updateProperty=(e,t)=>{j(r=>({...r,[e]:t}))};return(0,a.jsxs)("div",{className:"min-h-screen",children:[(0,a.jsx)("div",{children:(0,a.jsx)("div",{className:"bg-[var(--bg-2)] py-[6px]",children:(0,a.jsxs)(c.$,{className:"content !pl-[14px]",children:[(0,a.jsx)(d.d,{onClick:()=>v("/marketing"),children:"Marketing"}),(0,a.jsx)(d.d,{className:"text-primary",onClick:()=>v("/marketing/cashbacks"),children:"Cashback"}),(0,a.jsx)(d.d,{children:(0,a.jsx)("p",{className:"text-[--secondary-700]",children:"Novo"})})]})})}),(0,a.jsxs)("div",{className:"max-w-5xl mx-auto min-h-screen",children:[(0,a.jsx)("div",{className:"main-title px-0 pt-[32px] pb-[24px]",children:(0,a.jsx)("h1",{className:"sub",children:"Novo cashback"})}),(0,a.jsxs)("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-6",children:[(0,a.jsxs)("div",{className:"lg:col-span-2",children:[(0,a.jsx)(Section,{title:"Informa\xe7\xf5es",children:(0,a.jsxs)("div",{className:"space-y-4",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsx)("span",{className:"font-medium",children:"Ativar cashback"}),(0,a.jsx)(i.Z,{label:"",checked:"1"===k.active,onChange:e=>{let{target:t}=e;return updateProperty("active",t.checked?"1":"0")}})]}),(0,a.jsx)(l.Z,{id:"name",label:"Nome do cashback *",placeholder:"Insira um nome para o cashback",value:k.name,onChange:e=>{let{target:t}=e;return updateProperty("name",t.value)}}
21),(0,a.jsx)(l.Z,{id:"validate_days",type:"number",label:"Validade do saldo (dias) *",placeholder:"N\xfamero de dias",value:null!==(t=k.validate_days)&&void 0!==t?t:"",onChange:e=>updateProperty("validate_days",e.target.value)})]})}),(0,a.jsx)(Section,{title:"Configura\xe7\xf5es",children:(0,a.jsxs)("div",{className:"space-y-4",children:[(0,a.jsx)(l.Z,{id:"minimum-value",prefix:"R$",mask:"currency",label:"Valor m\xednimo da compra *",placeholder:"0,00",value:k.min_amount,onChange:e=>updateProperty("min_amount",e)}),(0,a.jsx)(l.Z,{id:"maximum-value",prefix:"R$",mask:"currency",label:"Valor m\xe1ximo da compra *",placeholder:"0,00",value:k.max_amount,onChange:e=>updateProperty("max_amount",e)}),(0,a.jsx)(l.Z,{id:"percent",type:"number",label:"Percentual *",placeholder:"10",value:k.percent,onChange:e=>{let{target:t}=e;return updateProperty("percent",t.value)}}),(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{htmlFor:"rule-type",className:"block text-sm font-medium mb-1",children:"Tipo de regra *"}),(0,a.jsxs)(u.g,{classNames:{trigger:"bg-transparent border-1 min-h-[40px] rounded-[4px]",value:"text-default-700 rounded-[4px]",popoverContent:"rounded-[4px]"},selectedKeys:[_],onSelectionChange:e=>{let{currentKey:t}=e;C(t),updateProperty("date_init",""),updateProperty("date_end","")},children:[(0,a.jsx)(p.R,{children:"Indeterminado - Sem data para terminar"},"indeterminate"),(0,a.jsx)(p.R,{children:"Programado - Data de In\xedcio e T\xe9rmino"},"programed")]})]}),"programed"===_&&(0,a.jsxs)("div",{className:"grid grid-cols-2 gap-4 mt-2",children:[(0,a.jsx)(o.Z,{id:"date-start",label:"Data de in\xedcio *",placeholder:"dd/mm/aaaa",value:k.date_init,onChange:e=>{let{target:t}=e;return updateProperty("date_init",t.value)}}),(0,a.jsx)(o.Z,{id:"date-final",label:"Data de t\xe9rmino *",placeholder:"dd/mm/aaaa",value:k.date_end,onChange:e=>{let{target:t}=e;return updateProperty("date_end",t.value)}})]})]})})]}),(0,a.jsx)("div",{className:"lg:col-span-1",children:(0,a.jsx)(Section,{title:"Informa\xe7\xf5es adicionais",children:(0,a.jsxs)("div",{className:"p-4 bg-[#DFEBF0] rounded-[8px] border border-blue-100 flex items-center gap-2",children:[(0,a.jsx)(m.Z,{size:20,className:"text-blue-500 mt-1 shrink-0"}),(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"text-sm text-black font-medium",children:"Como funcionam os cashbacks?"}),(0,a.jsx)("p",{className:"text-sm text-[#40424C] ",children:"Os cashbacks s\xe3o percentuais de retorno que os clientes recebem em suas contas ap\xf3s realizarem compras. O valor recebido pode ser utilizado em compras futuras."})]})]})})})]})]}),(0,a.jsx)("div",{className:"page-handles",children:(0,a.jsxs)("div",{children:[(0,a.jsx)(h.A,{className:"bg-transparent   border border-[--primary-700] rounded-[8px] text-[--primary-700] ",onPress:()=>v("/marketing/cashbacks"),children:"Cancelar"}),(0,a.jsx)(h.A,{className:"bg-[--primary-700] rounded-[8px] text-white",onPress:()=>{f&&(y(!0),f(k,y))},disabled:b,children:b?"Aguarde...":"Salvar"})]})})]})}},14185:function(e,t,r){"use strict";var a=r(57437);r(2265);var s=r(78905),n=r.n(s);t.Z=e=>{let{label:t,name:r,value:s,isList:i=!1,defaultChecked:l=!1,onChange:o,checked:c,...d}=e;return(0,a.jsx)("div",{className:n().checkList,children:(0,a.jsxs)("label",{className:n().switch,children:[t&&(0,a.jsx)("span",{className:"label",children:t}),(0,a.jsx)("input",{type:"checkbox",...d,checked:c,name:r,defaultChecked:l,onChange:o}),(0,a.jsx)("div",{className:n().slider,children:(0,a.jsxs)("div",{className:n().circle,children:[(0,a.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",version:"1.1",width:"6",height:"6",x:"0",y:"0",viewBox:"0 0 365.696 365.696",className:n().cross,children:(0,a.jsx)("g",{children:(0,a.jsx)("path",{d:"M243.188 182.86 356.32 69.726c12.5-12.5 12.5-32.766 0-45.247L341.238 9.398c-12.504-12.503-32.77-12.503-45.25 0L182.86 122.528 69.727 9.374c-12.5-12.5-32.766-12.5-45.247 0L9.375 24.457c-12.5 12.504-12.5 32.77 0 45.25l113.152 113.152L9.398 295.99c-12.503 12.503-12.503 32.769 0 45.25L24.48 356.32c12.5 12.5 32.766 12.5 45.247 0l113.132-113.132L295.99 356.32c12.503 12.5 32.769 12.5 45.25 0l15.081-15.082c12.5-12.504 12.5-32.77 0-45.25zm0 0",fill:"currentColor","data-original":"#2ecc71"})})}),(0,a.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",version:"1.1",width:"10",height:"10",x:"0",y:"0",viewBox:"0 0 24 24",className:n().checkmark,children:(0,a.jsx)("g",{children:(0,a.jsx)("path",{d:"M9.707 19.121a.997.997 0 0 1-1.414 0l-5.646-5.647a1.5 1.5 0 0 1 0-2.121l.707-.707a1.5 1.5 0 0 1 2.121 0L9 14.171l9.525-9.525a1.5 1.5 0 0 1 2.121 0l.707.707a1.5 1.5 0 0 1 0 2.121z",fill:"
21currentColor","data-original":"#2ecc71"})})})]})})]})})}},33718:function(e,t,r){"use strict";var a=r(57437);r(2265);var s=r(42203),n=r.n(s);t.Z=e=>{let{id:t,label:r,value:s,...i}=e,l=s?s.split(" ")[0]:"";return(0,a.jsxs)("div",{className:n().date,children:[(0,a.jsx)("label",{htmlFor:t,className:"label",children:r}),(0,a.jsx)("input",{type:"date",id:t,value:l,...i})]})}},78905:function(e){e.exports={switch:"Checkbox_switch__p4KeQ",checkmark:"Checkbox_checkmark__QaP39",cross:"Checkbox_cross__siLnL",slider:"Checkbox_slider__GTTHA",circle:"Checkbox_circle__ngWA9",checkList:"Checkbox_checkList__vvPTZ"}},42203:function(e){e.exports={date:"InputDate_date__vmGUD"}},37673:function(e,t){"use strict";/**
22 * @license React
23 * react.production.min.js
24 *
25 * Copyright (c) Facebook, Inc. and its affiliates.
26 *
27 * This source code is licensed under the MIT license found in the
28 * LICENSE file in the root directory of this source tree.
29 */var r=Symbol.for("react.element"),a=Symbol.for("react.portal"),s=(Symbol.for("react.fragment"),Symbol.for("react.strict_mode"),Symbol.for("react.profiler"),Symbol.for("react.provider"),Symbol.for("react.context"),Symbol.for("react.forward_ref"),Symbol.for("react.suspense"),Symbol.for("react.memo"),Symbol.for("react.lazy"),Symbol.iterator);function A(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=s&&e[s]||e["@@iterator"])?e:null}var n={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},i=Object.assign,l={};function E(e,t,r){this.props=e,this.context=t,this.refs=l,this.updater=r||n}function F(){}function G(e,t,r){this.props=e,this.context=t,this.refs=l,this.updater=r||n}E.prototype.isReactComponent={},E.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")},E.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},F.prototype=E.prototype;var o=G.prototype=new F;o.constructor=G,i(o,E.prototype),o.isPureReactComponent=!0;var c=Array.isArray,d=Object.prototype.hasOwnProperty,u={key:!0,ref:!0,__self:!0,__source:!0};function M(e,t,a){var s,n={},i=null,l=null;if(null!=t)for(s in void 0!==t.ref&&(l=t.ref),void 0!==t.key&&(i=""+t.key),t)d.call(t,s)&&!u.hasOwnProperty(s)&&(n[s]=t[s]);var o=arguments.length-2;if(1===o)n.children=a;else if(1<o){for(var c=Array(o),p=0;p<o;p++)c[p]=arguments[p+2];n.children=c}if(e&&e.defaultProps)for(s in o=e.defaultProps)void 0===n[s]&&(n[s]=o[s]);return{$$typeof:r,type:e,key:i,ref:l,props:n,_owner:null}}function N(e,t){return{$$typeof:r,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function O(e){return"object"==typeof e&&null!==e&&e.$$typeof===r}function escape(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(e){return t[e]})}var p=/\/+/g;function Q(e,t){return"object"==typeof e&&null!==e&&null!=e.key?escape(""+e.key):t.toString(36)}t.createElement=M},90952:function(e,t,r){"use strict";e.exports=r(37673)},95605:function(e,t,r){"use strict";r.d(t,{zd:function(){return O}});var a=Object.defineProperty,x=(e,t,r)=>t in e?a(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,A=(e,t,r)=>x(e,"symbol"!=typeof t?t+"":t,r);let s={"#":{pattern:/[0-9]/},"@":{pattern:/[a-zA-Z]/},"*":{pattern:/[a-zA-Z0-9]/}},N=(e,t,r)=>e.replaceAll(t,"").replace(r,".").replace("..",".").replace(/[^.\d]/g,""),w=(e,t,r)=>{var a;return new Intl.NumberFormat((null==(a=r.number)?void 0:a.locale)??"en",{minimumFractionDigits:e,maximumFractionDigits:t,roundingMode:"trunc"})},P=(e,t=!0,r)=>{var a,s,n,i;let l=(null==(a=r.number)?void 0:a.unsigned)!==!0&&e.startsWith("-")?"-":"",o=(null==(s=r.number)?void 0:s.fraction)??0,c=w(0,o,r),d=c.formatToParts(1000.12),u=(null==(n=d.find(e=>"group"===e.type))?void 0:n.value)??" ",p=(null==(i=d.find(e=>"decimal"===e.type))?void 0:i.value)??".",h=N(e,u,p);if(Number.isNaN(parseFloat(h)))return l;let m=h.split(".");if(null!=m[1]&&m[1].length>=1){let e=m[1].length<=o?m[1].length:o;c=w(e,o,r)}let f=c.format(parseFloat(h));return t?o>0&&h.endsWith(".")&&!h.slice(0,-1).includes(".")&&(f+=p):f=N(f,u,p),l+f},I=()=>{try{return RegExp("\\p{L}","u"),!0}catch{return!1}};let O=class O{constructor(e={}){A(this,"opts",{}
29),A(this,"memo",new Map);let t={...e};if(null!=t.tokens)for(let e of(t.tokens=t.tokensReplace?{...t.tokens}:{...s,...t.tokens},Object.values(t.tokens)))"string"==typeof e.pattern&&(e.pattern=I()?RegExp(e.pattern,"u"):new RegExp(e.pattern));else t.tokens=s;Array.isArray(t.mask)&&(t.mask.length>1?t.mask=[...t.mask].sort((e,t)=>e.length-t.length):t.mask=t.mask[0]??""),""===t.mask&&(t.mask=null),this.opts=t}masked(e){return this.process(String(e),this.findMask(String(e)))}unmasked(e){return this.process(String(e),this.findMask(String(e)),!1)}isEager(){return!0===this.opts.eager}isReversed(){return!0===this.opts.reversed}completed(e){let t=this.findMask(String(e));if(null==this.opts.mask||null==t)return!1;let r=this.process(String(e),t).length;return"string"==typeof this.opts.mask?r>=this.opts.mask.length:r>=t.length}findMask(e){let t=this.opts.mask;if(null==t)return null;if("string"==typeof t)return t;if("function"==typeof t)return t(e);let r=this.process(e,t.slice(-1).pop()??"",!1);return t.find(t=>this.process(e,t,!1).length>=r.length)??""}escapeMask(e){let t=[],r=[];return e.split("").forEach((a,s)=>{"!"===a&&"!"!==e[s-1]?r.push(s-r.length):t.push(a)}),{mask:t.join(""),escaped:r}}process(e,t,r=!0){if(null!=this.opts.number)return P(e,r,this.opts);if(null==t)return e;let a=`v=${e},mr=${t},m=${r?1:0}`;if(this.memo.has(a))return this.memo.get(a);let{mask:s,escaped:n}=this.escapeMask(t),i=[],l=null!=this.opts.tokens?this.opts.tokens:{},o=this.isReversed()?-1:1,c=this.isReversed()?"unshift":"push",d=this.isReversed()?0:s.length-1,u=this.isReversed()?()=>m>-1&&f>-1:()=>m<s.length&&f<e.length,g=e=>!this.isReversed()&&e<=d||this.isReversed()&&e>=d,p,h=-1,m=this.isReversed()?s.length-1:0,f=this.isReversed()?e.length-1:0,v=!1;for(;u();){let t=s.charAt(m),a=l[t],u=(null==a?void 0:a.transform)!=null?a.transform(e.charAt(f)):e.charAt(f);if(n.includes(m)||null==a?(r&&!this.isEager()&&i[c](t),u!==t||this.isEager()?p=t:f+=o,this.isEager()||(m+=o)):(null!=u.match(a.pattern)?(i[c](u),a.repeated?(-1===h?h=m:m===d&&m!==h&&(m=h-o),d===h&&(m-=o)):a.multiple&&(v=!0,m-=o),m+=o):a.multiple?v&&(m+=o,f-=o,v=!1):u===p?p=void 0:a.optional&&(m+=o,f-=o),f+=o),this.isEager())for(;g(m)&&(null==l[s.charAt(m)]||n.includes(m));){if(r){if(i[c](s.charAt(m)),e.charAt(f)===s.charAt(m)){m+=o,f+=o;continue}}else s.charAt(m)===e.charAt(f)&&(f+=o);m+=o}}return this.memo.set(a,i.join("")),this.memo.get(a)}}}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.