@navservice/assinatura 1.38.0 → 1.42.0
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.
|
@@ -18,7 +18,7 @@ interface AssinaturaState {
|
|
|
18
18
|
checkout: t.Controller.Assinatura.CriarCheckoutSession.Output | null;
|
|
19
19
|
loading: boolean;
|
|
20
20
|
}
|
|
21
|
-
declare
|
|
21
|
+
export declare const contexto_assinatura: {
|
|
22
22
|
api: {
|
|
23
23
|
criar: (props: t.Controller.Assinatura.Criar.Input) => Promise<t.Controller.Assinatura.Criar.Output | null>;
|
|
24
24
|
buscar_pelo_id: (props: t.Controller.Assinatura.BuscarPeloId.Input) => Promise<t.Controller.Assinatura.BuscarPeloId.Output | null>;
|
|
@@ -32,6 +32,5 @@ declare class contexto_assinatura {
|
|
|
32
32
|
get get_jsx(): AssinaturaState;
|
|
33
33
|
get get_state(): AssinaturaState;
|
|
34
34
|
set_state: (updater: (state: AssinaturaState) => void) => void;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
export default _default;
|
|
35
|
+
};
|
|
36
|
+
export {};
|
package/build/es/index.js
CHANGED
|
@@ -1,265 +1,9 @@
|
|
|
1
1
|
/*! For license information please see index.js.LICENSE.txt */
|
|
2
|
-
import
|
|
2
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import react, { createElement, forwardRef, useEffect, useLayoutEffect, useMemo, useRef, useState } from "react";
|
|
3
4
|
import { createPortal } from "react-dom";
|
|
4
5
|
import { TypesUsuario } from "@navservice/usuario";
|
|
5
|
-
var
|
|
6
|
-
"../../node_modules/react/cjs/react-jsx-runtime.development.js" (__unused_rspack_module, exports, __webpack_require__) {
|
|
7
|
-
/**
|
|
8
|
-
* @license React
|
|
9
|
-
* react-jsx-runtime.development.js
|
|
10
|
-
*
|
|
11
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
12
|
-
*
|
|
13
|
-
* This source code is licensed under the MIT license found in the
|
|
14
|
-
* LICENSE file in the root directory of this source tree.
|
|
15
|
-
*/ "production" !== process.env.NODE_ENV && function() {
|
|
16
|
-
function getComponentNameFromType(type) {
|
|
17
|
-
if (null == type) return null;
|
|
18
|
-
if ("function" == typeof type) return type.$$typeof === REACT_CLIENT_REFERENCE ? null : type.displayName || type.name || null;
|
|
19
|
-
if ("string" == typeof type) return type;
|
|
20
|
-
switch(type){
|
|
21
|
-
case REACT_FRAGMENT_TYPE:
|
|
22
|
-
return "Fragment";
|
|
23
|
-
case REACT_PROFILER_TYPE:
|
|
24
|
-
return "Profiler";
|
|
25
|
-
case REACT_STRICT_MODE_TYPE:
|
|
26
|
-
return "StrictMode";
|
|
27
|
-
case REACT_SUSPENSE_TYPE:
|
|
28
|
-
return "Suspense";
|
|
29
|
-
case REACT_SUSPENSE_LIST_TYPE:
|
|
30
|
-
return "SuspenseList";
|
|
31
|
-
case REACT_ACTIVITY_TYPE:
|
|
32
|
-
return "Activity";
|
|
33
|
-
}
|
|
34
|
-
if ("object" == typeof type) switch("number" == typeof type.tag && console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), type.$$typeof){
|
|
35
|
-
case REACT_PORTAL_TYPE:
|
|
36
|
-
return "Portal";
|
|
37
|
-
case REACT_CONTEXT_TYPE:
|
|
38
|
-
return type.displayName || "Context";
|
|
39
|
-
case REACT_CONSUMER_TYPE:
|
|
40
|
-
return (type._context.displayName || "Context") + ".Consumer";
|
|
41
|
-
case REACT_FORWARD_REF_TYPE:
|
|
42
|
-
var innerType = type.render;
|
|
43
|
-
type = type.displayName;
|
|
44
|
-
type || (type = innerType.displayName || innerType.name || "", type = "" !== type ? "ForwardRef(" + type + ")" : "ForwardRef");
|
|
45
|
-
return type;
|
|
46
|
-
case REACT_MEMO_TYPE:
|
|
47
|
-
return innerType = type.displayName || null, null !== innerType ? innerType : getComponentNameFromType(type.type) || "Memo";
|
|
48
|
-
case REACT_LAZY_TYPE:
|
|
49
|
-
innerType = type._payload;
|
|
50
|
-
type = type._init;
|
|
51
|
-
try {
|
|
52
|
-
return getComponentNameFromType(type(innerType));
|
|
53
|
-
} catch (x) {}
|
|
54
|
-
}
|
|
55
|
-
return null;
|
|
56
|
-
}
|
|
57
|
-
function testStringCoercion(value) {
|
|
58
|
-
return "" + value;
|
|
59
|
-
}
|
|
60
|
-
function checkKeyStringCoercion(value) {
|
|
61
|
-
try {
|
|
62
|
-
testStringCoercion(value);
|
|
63
|
-
var JSCompiler_inline_result = !1;
|
|
64
|
-
} catch (e) {
|
|
65
|
-
JSCompiler_inline_result = !0;
|
|
66
|
-
}
|
|
67
|
-
if (JSCompiler_inline_result) {
|
|
68
|
-
JSCompiler_inline_result = console;
|
|
69
|
-
var JSCompiler_temp_const = JSCompiler_inline_result.error;
|
|
70
|
-
var JSCompiler_inline_result$jscomp$0 = "function" == typeof Symbol && Symbol.toStringTag && value[Symbol.toStringTag] || value.constructor.name || "Object";
|
|
71
|
-
JSCompiler_temp_const.call(JSCompiler_inline_result, "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.", JSCompiler_inline_result$jscomp$0);
|
|
72
|
-
return testStringCoercion(value);
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
function getTaskName(type) {
|
|
76
|
-
if (type === REACT_FRAGMENT_TYPE) return "<>";
|
|
77
|
-
if ("object" == typeof type && null !== type && type.$$typeof === REACT_LAZY_TYPE) return "<...>";
|
|
78
|
-
try {
|
|
79
|
-
var name = getComponentNameFromType(type);
|
|
80
|
-
return name ? "<" + name + ">" : "<...>";
|
|
81
|
-
} catch (x) {
|
|
82
|
-
return "<...>";
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
function getOwner() {
|
|
86
|
-
var dispatcher = ReactSharedInternals.A;
|
|
87
|
-
return null === dispatcher ? null : dispatcher.getOwner();
|
|
88
|
-
}
|
|
89
|
-
function UnknownOwner() {
|
|
90
|
-
return Error("react-stack-top-frame");
|
|
91
|
-
}
|
|
92
|
-
function hasValidKey(config) {
|
|
93
|
-
if (hasOwnProperty.call(config, "key")) {
|
|
94
|
-
var getter = Object.getOwnPropertyDescriptor(config, "key").get;
|
|
95
|
-
if (getter && getter.isReactWarning) return !1;
|
|
96
|
-
}
|
|
97
|
-
return void 0 !== config.key;
|
|
98
|
-
}
|
|
99
|
-
function defineKeyPropWarningGetter(props, displayName) {
|
|
100
|
-
function warnAboutAccessingKey() {
|
|
101
|
-
specialPropKeyWarningShown || (specialPropKeyWarningShown = !0, console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)", displayName));
|
|
102
|
-
}
|
|
103
|
-
warnAboutAccessingKey.isReactWarning = !0;
|
|
104
|
-
Object.defineProperty(props, "key", {
|
|
105
|
-
get: warnAboutAccessingKey,
|
|
106
|
-
configurable: !0
|
|
107
|
-
});
|
|
108
|
-
}
|
|
109
|
-
function elementRefGetterWithDeprecationWarning() {
|
|
110
|
-
var componentName = getComponentNameFromType(this.type);
|
|
111
|
-
didWarnAboutElementRef[componentName] || (didWarnAboutElementRef[componentName] = !0, console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."));
|
|
112
|
-
componentName = this.props.ref;
|
|
113
|
-
return void 0 !== componentName ? componentName : null;
|
|
114
|
-
}
|
|
115
|
-
function ReactElement(type, key, props, owner, debugStack, debugTask) {
|
|
116
|
-
var refProp = props.ref;
|
|
117
|
-
type = {
|
|
118
|
-
$$typeof: REACT_ELEMENT_TYPE,
|
|
119
|
-
type: type,
|
|
120
|
-
key: key,
|
|
121
|
-
props: props,
|
|
122
|
-
_owner: owner
|
|
123
|
-
};
|
|
124
|
-
null !== (void 0 !== refProp ? refProp : null) ? Object.defineProperty(type, "ref", {
|
|
125
|
-
enumerable: !1,
|
|
126
|
-
get: elementRefGetterWithDeprecationWarning
|
|
127
|
-
}) : Object.defineProperty(type, "ref", {
|
|
128
|
-
enumerable: !1,
|
|
129
|
-
value: null
|
|
130
|
-
});
|
|
131
|
-
type._store = {};
|
|
132
|
-
Object.defineProperty(type._store, "validated", {
|
|
133
|
-
configurable: !1,
|
|
134
|
-
enumerable: !1,
|
|
135
|
-
writable: !0,
|
|
136
|
-
value: 0
|
|
137
|
-
});
|
|
138
|
-
Object.defineProperty(type, "_debugInfo", {
|
|
139
|
-
configurable: !1,
|
|
140
|
-
enumerable: !1,
|
|
141
|
-
writable: !0,
|
|
142
|
-
value: null
|
|
143
|
-
});
|
|
144
|
-
Object.defineProperty(type, "_debugStack", {
|
|
145
|
-
configurable: !1,
|
|
146
|
-
enumerable: !1,
|
|
147
|
-
writable: !0,
|
|
148
|
-
value: debugStack
|
|
149
|
-
});
|
|
150
|
-
Object.defineProperty(type, "_debugTask", {
|
|
151
|
-
configurable: !1,
|
|
152
|
-
enumerable: !1,
|
|
153
|
-
writable: !0,
|
|
154
|
-
value: debugTask
|
|
155
|
-
});
|
|
156
|
-
Object.freeze && (Object.freeze(type.props), Object.freeze(type));
|
|
157
|
-
return type;
|
|
158
|
-
}
|
|
159
|
-
function jsxDEVImpl(type, config, maybeKey, isStaticChildren, debugStack, debugTask) {
|
|
160
|
-
var children = config.children;
|
|
161
|
-
if (void 0 !== children) if (isStaticChildren) if (isArrayImpl(children)) {
|
|
162
|
-
for(isStaticChildren = 0; isStaticChildren < children.length; isStaticChildren++)validateChildKeys(children[isStaticChildren]);
|
|
163
|
-
Object.freeze && Object.freeze(children);
|
|
164
|
-
} else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
|
|
165
|
-
else validateChildKeys(children);
|
|
166
|
-
if (hasOwnProperty.call(config, "key")) {
|
|
167
|
-
children = getComponentNameFromType(type);
|
|
168
|
-
var keys = Object.keys(config).filter(function(k) {
|
|
169
|
-
return "key" !== k;
|
|
170
|
-
});
|
|
171
|
-
isStaticChildren = 0 < keys.length ? "{key: someKey, " + keys.join(": ..., ") + ": ...}" : "{key: someKey}";
|
|
172
|
-
didWarnAboutKeySpread[children + isStaticChildren] || (keys = 0 < keys.length ? "{" + keys.join(": ..., ") + ": ...}" : "{}", console.error('A props object containing a "key" prop is being spread into JSX:\n let props = %s;\n <%s {...props} />\nReact keys must be passed directly to JSX without using spread:\n let props = %s;\n <%s key={someKey} {...props} />', isStaticChildren, children, keys, children), didWarnAboutKeySpread[children + isStaticChildren] = !0);
|
|
173
|
-
}
|
|
174
|
-
children = null;
|
|
175
|
-
void 0 !== maybeKey && (checkKeyStringCoercion(maybeKey), children = "" + maybeKey);
|
|
176
|
-
hasValidKey(config) && (checkKeyStringCoercion(config.key), children = "" + config.key);
|
|
177
|
-
if ("key" in config) {
|
|
178
|
-
maybeKey = {};
|
|
179
|
-
for(var propName in config)"key" !== propName && (maybeKey[propName] = config[propName]);
|
|
180
|
-
} else maybeKey = config;
|
|
181
|
-
children && defineKeyPropWarningGetter(maybeKey, "function" == typeof type ? type.displayName || type.name || "Unknown" : type);
|
|
182
|
-
return ReactElement(type, children, maybeKey, getOwner(), debugStack, debugTask);
|
|
183
|
-
}
|
|
184
|
-
function validateChildKeys(node) {
|
|
185
|
-
isValidElement(node) ? node._store && (node._store.validated = 1) : "object" == typeof node && null !== node && node.$$typeof === REACT_LAZY_TYPE && ("fulfilled" === node._payload.status ? isValidElement(node._payload.value) && node._payload.value._store && (node._payload.value._store.validated = 1) : node._store && (node._store.validated = 1));
|
|
186
|
-
}
|
|
187
|
-
function isValidElement(object) {
|
|
188
|
-
return "object" == typeof object && null !== object && object.$$typeof === REACT_ELEMENT_TYPE;
|
|
189
|
-
}
|
|
190
|
-
var React = __webpack_require__("react"), REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"), REACT_PORTAL_TYPE = Symbol.for("react.portal"), REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"), REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"), REACT_PROFILER_TYPE = Symbol.for("react.profiler"), REACT_CONSUMER_TYPE = Symbol.for("react.consumer"), REACT_CONTEXT_TYPE = Symbol.for("react.context"), REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"), REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"), REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list"), REACT_MEMO_TYPE = Symbol.for("react.memo"), REACT_LAZY_TYPE = Symbol.for("react.lazy"), REACT_ACTIVITY_TYPE = Symbol.for("react.activity"), REACT_CLIENT_REFERENCE = Symbol.for("react.client.reference"), ReactSharedInternals = React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, hasOwnProperty = Object.prototype.hasOwnProperty, isArrayImpl = Array.isArray, createTask = console.createTask ? console.createTask : function() {
|
|
191
|
-
return null;
|
|
192
|
-
};
|
|
193
|
-
React = {
|
|
194
|
-
react_stack_bottom_frame: function(callStackForError) {
|
|
195
|
-
return callStackForError();
|
|
196
|
-
}
|
|
197
|
-
};
|
|
198
|
-
var specialPropKeyWarningShown;
|
|
199
|
-
var didWarnAboutElementRef = {};
|
|
200
|
-
var unknownOwnerDebugStack = React.react_stack_bottom_frame.bind(React, UnknownOwner)();
|
|
201
|
-
var unknownOwnerDebugTask = createTask(getTaskName(UnknownOwner));
|
|
202
|
-
var didWarnAboutKeySpread = {};
|
|
203
|
-
exports.Fragment = REACT_FRAGMENT_TYPE;
|
|
204
|
-
exports.jsx = function(type, config, maybeKey) {
|
|
205
|
-
var trackActualOwner = 1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++;
|
|
206
|
-
return jsxDEVImpl(type, config, maybeKey, !1, trackActualOwner ? Error("react-stack-top-frame") : unknownOwnerDebugStack, trackActualOwner ? createTask(getTaskName(type)) : unknownOwnerDebugTask);
|
|
207
|
-
};
|
|
208
|
-
exports.jsxs = function(type, config, maybeKey) {
|
|
209
|
-
var trackActualOwner = 1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++;
|
|
210
|
-
return jsxDEVImpl(type, config, maybeKey, !0, trackActualOwner ? Error("react-stack-top-frame") : unknownOwnerDebugStack, trackActualOwner ? createTask(getTaskName(type)) : unknownOwnerDebugTask);
|
|
211
|
-
};
|
|
212
|
-
}();
|
|
213
|
-
},
|
|
214
|
-
"../../node_modules/react/cjs/react-jsx-runtime.production.js" (__unused_rspack_module, exports) {
|
|
215
|
-
/**
|
|
216
|
-
* @license React
|
|
217
|
-
* react-jsx-runtime.production.js
|
|
218
|
-
*
|
|
219
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
220
|
-
*
|
|
221
|
-
* This source code is licensed under the MIT license found in the
|
|
222
|
-
* LICENSE file in the root directory of this source tree.
|
|
223
|
-
*/ var REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"), REACT_FRAGMENT_TYPE = Symbol.for("react.fragment");
|
|
224
|
-
function jsxProd(type, config, maybeKey) {
|
|
225
|
-
var key = null;
|
|
226
|
-
void 0 !== maybeKey && (key = "" + maybeKey);
|
|
227
|
-
void 0 !== config.key && (key = "" + config.key);
|
|
228
|
-
if ("key" in config) {
|
|
229
|
-
maybeKey = {};
|
|
230
|
-
for(var propName in config)"key" !== propName && (maybeKey[propName] = config[propName]);
|
|
231
|
-
} else maybeKey = config;
|
|
232
|
-
config = maybeKey.ref;
|
|
233
|
-
return {
|
|
234
|
-
$$typeof: REACT_ELEMENT_TYPE,
|
|
235
|
-
type: type,
|
|
236
|
-
key: key,
|
|
237
|
-
ref: void 0 !== config ? config : null,
|
|
238
|
-
props: maybeKey
|
|
239
|
-
};
|
|
240
|
-
}
|
|
241
|
-
exports.Fragment = REACT_FRAGMENT_TYPE;
|
|
242
|
-
exports.jsx = jsxProd;
|
|
243
|
-
exports.jsxs = jsxProd;
|
|
244
|
-
},
|
|
245
|
-
"../../node_modules/react/jsx-runtime.js" (module, __unused_rspack_exports, __webpack_require__) {
|
|
246
|
-
if ('production' === process.env.NODE_ENV) module.exports = __webpack_require__("../../node_modules/react/cjs/react-jsx-runtime.production.js");
|
|
247
|
-
else module.exports = __webpack_require__("../../node_modules/react/cjs/react-jsx-runtime.development.js");
|
|
248
|
-
},
|
|
249
|
-
react (module) {
|
|
250
|
-
module.exports = __rspack_external_React;
|
|
251
|
-
}
|
|
252
|
-
};
|
|
253
|
-
var __webpack_module_cache__ = {};
|
|
254
|
-
function __webpack_require__(moduleId) {
|
|
255
|
-
var cachedModule = __webpack_module_cache__[moduleId];
|
|
256
|
-
if (void 0 !== cachedModule) return cachedModule.exports;
|
|
257
|
-
var module = __webpack_module_cache__[moduleId] = {
|
|
258
|
-
exports: {}
|
|
259
|
-
};
|
|
260
|
-
__webpack_modules__[moduleId](module, module.exports, __webpack_require__);
|
|
261
|
-
return module.exports;
|
|
262
|
-
}
|
|
6
|
+
var __webpack_require__ = {};
|
|
263
7
|
(()=>{
|
|
264
8
|
__webpack_require__.d = (exports, definition)=>{
|
|
265
9
|
for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) Object.defineProperty(exports, key, {
|
|
@@ -1212,8 +956,6 @@ __webpack_require__.d(common_utils_namespaceObject, {
|
|
|
1212
956
|
navigator: ()=>_navigator,
|
|
1213
957
|
origin: ()=>utils_origin
|
|
1214
958
|
});
|
|
1215
|
-
var jsx_runtime = __webpack_require__("../../node_modules/react/jsx-runtime.js");
|
|
1216
|
-
var external_React_ = __webpack_require__("react");
|
|
1217
959
|
/**
|
|
1218
960
|
* @license lucide-react v0.544.0 - ISC
|
|
1219
961
|
*
|
|
@@ -1250,7 +992,7 @@ const hasA11yProp = (props)=>{
|
|
|
1250
992
|
*
|
|
1251
993
|
* This source code is licensed under the ISC license.
|
|
1252
994
|
* See the LICENSE file in the root directory of this source tree.
|
|
1253
|
-
*/ const Icon =
|
|
995
|
+
*/ const Icon = forwardRef(({ color = "currentColor", size = 24, strokeWidth = 2, absoluteStrokeWidth, className = "", children, iconNode, ...rest }, ref)=>createElement("svg", {
|
|
1254
996
|
ref,
|
|
1255
997
|
...defaultAttributes,
|
|
1256
998
|
width: size,
|
|
@@ -1263,7 +1005,7 @@ const hasA11yProp = (props)=>{
|
|
|
1263
1005
|
},
|
|
1264
1006
|
...rest
|
|
1265
1007
|
}, [
|
|
1266
|
-
...iconNode.map(([tag, attrs])=>
|
|
1008
|
+
...iconNode.map(([tag, attrs])=>createElement(tag, attrs)),
|
|
1267
1009
|
...Array.isArray(children) ? children : [
|
|
1268
1010
|
children
|
|
1269
1011
|
]
|
|
@@ -1274,7 +1016,7 @@ const hasA11yProp = (props)=>{
|
|
|
1274
1016
|
* This source code is licensed under the ISC license.
|
|
1275
1017
|
* See the LICENSE file in the root directory of this source tree.
|
|
1276
1018
|
*/ const createLucideIcon = (iconName, iconNode)=>{
|
|
1277
|
-
const Component =
|
|
1019
|
+
const Component = forwardRef(({ className, ...props }, ref)=>createElement(Icon, {
|
|
1278
1020
|
ref,
|
|
1279
1021
|
iconNode,
|
|
1280
1022
|
className: mergeClasses(`lucide-${toKebabCase(toPascalCase(iconName))}`, `lucide-${iconName}`, className),
|
|
@@ -1337,10 +1079,10 @@ const CircleCheckBig = createLucideIcon("circle-check-big", __iconNode);
|
|
|
1337
1079
|
];
|
|
1338
1080
|
const CircleX = createLucideIcon("circle-x", circle_x_iconNode);
|
|
1339
1081
|
function CheckoutStripe() {
|
|
1340
|
-
const [message, setMessage] =
|
|
1341
|
-
const [success, setSuccess] =
|
|
1342
|
-
const [sessionId, setSessionId] =
|
|
1343
|
-
|
|
1082
|
+
const [message, setMessage] = useState("");
|
|
1083
|
+
const [success, setSuccess] = useState(false);
|
|
1084
|
+
const [sessionId, setSessionId] = useState("");
|
|
1085
|
+
useEffect(()=>{
|
|
1344
1086
|
const query = new URLSearchParams(window.location.search);
|
|
1345
1087
|
if (query.get("success")) {
|
|
1346
1088
|
setSuccess(true);
|
|
@@ -1351,44 +1093,44 @@ function CheckoutStripe() {
|
|
|
1351
1093
|
setMessage("Pagamento cancelado — você pode tentar novamente quando quiser.");
|
|
1352
1094
|
}
|
|
1353
1095
|
}, []);
|
|
1354
|
-
if (!success && "" === message) return /*#__PURE__*/
|
|
1355
|
-
if (success && "" !== sessionId) return /*#__PURE__*/
|
|
1096
|
+
if (!success && "" === message) return /*#__PURE__*/ jsx(ProductDisplay, {});
|
|
1097
|
+
if (success && "" !== sessionId) return /*#__PURE__*/ jsx(SuccessDisplay, {
|
|
1356
1098
|
sessionId: sessionId
|
|
1357
1099
|
});
|
|
1358
|
-
return /*#__PURE__*/
|
|
1100
|
+
return /*#__PURE__*/ jsx(Message, {
|
|
1359
1101
|
message: message
|
|
1360
1102
|
});
|
|
1361
1103
|
}
|
|
1362
|
-
const ProductDisplay = ()=>/*#__PURE__*/
|
|
1104
|
+
const ProductDisplay = ()=>/*#__PURE__*/ jsx("section", {
|
|
1363
1105
|
className: "min-h-screen flex flex-col justify-center items-center p-6",
|
|
1364
|
-
children: /*#__PURE__*/
|
|
1106
|
+
children: /*#__PURE__*/ jsxs("div", {
|
|
1365
1107
|
className: "bg-white rounded-2xl shadow-lg p-6 w-full max-w-md text-center border border-default-200",
|
|
1366
1108
|
children: [
|
|
1367
|
-
/*#__PURE__*/
|
|
1368
|
-
/*#__PURE__*/
|
|
1109
|
+
/*#__PURE__*/ jsx(Logo, {}),
|
|
1110
|
+
/*#__PURE__*/ jsxs("div", {
|
|
1369
1111
|
className: "mt-4 mb-6",
|
|
1370
1112
|
children: [
|
|
1371
|
-
/*#__PURE__*/
|
|
1113
|
+
/*#__PURE__*/ jsx("h3", {
|
|
1372
1114
|
className: "text-lg font-semibold text-basic-900",
|
|
1373
1115
|
children: "Plano mensal AI Pages"
|
|
1374
1116
|
}),
|
|
1375
|
-
/*#__PURE__*/
|
|
1117
|
+
/*#__PURE__*/ jsx("p", {
|
|
1376
1118
|
className: "text-primary-600 text-xl font-bold",
|
|
1377
1119
|
children: "R$ 29,90 / m\xeas"
|
|
1378
1120
|
})
|
|
1379
1121
|
]
|
|
1380
1122
|
}),
|
|
1381
|
-
/*#__PURE__*/
|
|
1123
|
+
/*#__PURE__*/ jsxs("form", {
|
|
1382
1124
|
action: "/create-checkout-session",
|
|
1383
1125
|
method: "POST",
|
|
1384
1126
|
className: "mt-4",
|
|
1385
1127
|
children: [
|
|
1386
|
-
/*#__PURE__*/
|
|
1128
|
+
/*#__PURE__*/ jsx("input", {
|
|
1387
1129
|
type: "hidden",
|
|
1388
1130
|
name: "lookup_key",
|
|
1389
1131
|
value: "Plano_mensal_ai_pages-4efccc1"
|
|
1390
1132
|
}),
|
|
1391
|
-
/*#__PURE__*/
|
|
1133
|
+
/*#__PURE__*/ jsx("button", {
|
|
1392
1134
|
id: "checkout-and-portal-button",
|
|
1393
1135
|
type: "submit",
|
|
1394
1136
|
className: "w-full py-3 px-4 rounded-xl bg-primary-600 text-white font-semibold hover:bg-primary-700 transition-all shadow-sm",
|
|
@@ -1399,39 +1141,39 @@ const ProductDisplay = ()=>/*#__PURE__*/ (0, jsx_runtime.jsx)("section", {
|
|
|
1399
1141
|
]
|
|
1400
1142
|
})
|
|
1401
1143
|
});
|
|
1402
|
-
const SuccessDisplay = ({ sessionId })=>/*#__PURE__*/
|
|
1144
|
+
const SuccessDisplay = ({ sessionId })=>/*#__PURE__*/ jsx("section", {
|
|
1403
1145
|
className: "min-h-screen flex flex-col justify-center items-center p-6",
|
|
1404
|
-
children: /*#__PURE__*/
|
|
1146
|
+
children: /*#__PURE__*/ jsxs("div", {
|
|
1405
1147
|
className: "bg-white rounded-2xl shadow-lg p-6 w-full max-w-md text-center border border-default-200",
|
|
1406
1148
|
children: [
|
|
1407
|
-
/*#__PURE__*/
|
|
1149
|
+
/*#__PURE__*/ jsx(CircleCheckBig, {
|
|
1408
1150
|
className: "w-12 h-12 text-success-600 mx-auto mb-4"
|
|
1409
1151
|
}),
|
|
1410
|
-
/*#__PURE__*/
|
|
1411
|
-
/*#__PURE__*/
|
|
1152
|
+
/*#__PURE__*/ jsx(Logo, {}),
|
|
1153
|
+
/*#__PURE__*/ jsx("h3", {
|
|
1412
1154
|
className: "text-lg font-bold text-basic-900 mt-4",
|
|
1413
1155
|
children: "Sua assinatura foi ativada com sucesso!"
|
|
1414
1156
|
}),
|
|
1415
|
-
/*#__PURE__*/
|
|
1157
|
+
/*#__PURE__*/ jsx("p", {
|
|
1416
1158
|
className: "text-default-500 text-sm mt-2",
|
|
1417
1159
|
children: "Session ID:"
|
|
1418
1160
|
}),
|
|
1419
|
-
/*#__PURE__*/
|
|
1161
|
+
/*#__PURE__*/ jsx("p", {
|
|
1420
1162
|
className: "text-default-800 text-xs font-mono",
|
|
1421
1163
|
children: sessionId
|
|
1422
1164
|
}),
|
|
1423
|
-
/*#__PURE__*/
|
|
1165
|
+
/*#__PURE__*/ jsxs("form", {
|
|
1424
1166
|
action: "/create-portal-session",
|
|
1425
1167
|
method: "POST",
|
|
1426
1168
|
className: "mt-6",
|
|
1427
1169
|
children: [
|
|
1428
|
-
/*#__PURE__*/
|
|
1170
|
+
/*#__PURE__*/ jsx("input", {
|
|
1429
1171
|
type: "hidden",
|
|
1430
1172
|
id: "session-id",
|
|
1431
1173
|
name: "session_id",
|
|
1432
1174
|
value: sessionId
|
|
1433
1175
|
}),
|
|
1434
|
-
/*#__PURE__*/
|
|
1176
|
+
/*#__PURE__*/ jsx("button", {
|
|
1435
1177
|
id: "checkout-and-portal-button",
|
|
1436
1178
|
type: "submit",
|
|
1437
1179
|
className: "w-full py-3 px-4 rounded-xl bg-primary-600 text-white font-semibold hover:bg-primary-700 transition-all shadow-sm",
|
|
@@ -1442,19 +1184,19 @@ const SuccessDisplay = ({ sessionId })=>/*#__PURE__*/ (0, jsx_runtime.jsx)("sect
|
|
|
1442
1184
|
]
|
|
1443
1185
|
})
|
|
1444
1186
|
});
|
|
1445
|
-
const Message = ({ message })=>/*#__PURE__*/
|
|
1187
|
+
const Message = ({ message })=>/*#__PURE__*/ jsx("section", {
|
|
1446
1188
|
className: "min-h-screen flex flex-col justify-center items-center p-6",
|
|
1447
|
-
children: /*#__PURE__*/
|
|
1189
|
+
children: /*#__PURE__*/ jsxs("div", {
|
|
1448
1190
|
className: "bg-white rounded-2xl shadow-lg p-6 w-full max-w-md text-center border border-default-200",
|
|
1449
1191
|
children: [
|
|
1450
|
-
/*#__PURE__*/
|
|
1192
|
+
/*#__PURE__*/ jsx(CircleX, {
|
|
1451
1193
|
className: "w-12 h-12 text-error-600 mx-auto mb-4"
|
|
1452
1194
|
}),
|
|
1453
|
-
/*#__PURE__*/
|
|
1195
|
+
/*#__PURE__*/ jsx("p", {
|
|
1454
1196
|
className: "text-default-800 font-medium",
|
|
1455
1197
|
children: message
|
|
1456
1198
|
}),
|
|
1457
|
-
/*#__PURE__*/
|
|
1199
|
+
/*#__PURE__*/ jsx("button", {
|
|
1458
1200
|
onClick: ()=>window.location.href = "/",
|
|
1459
1201
|
className: "mt-6 w-full py-3 px-4 rounded-xl bg-basic-100 text-basic-900 font-semibold hover:bg-basic-200 transition-all",
|
|
1460
1202
|
children: "Voltar"
|
|
@@ -1462,14 +1204,14 @@ const Message = ({ message })=>/*#__PURE__*/ (0, jsx_runtime.jsx)("section", {
|
|
|
1462
1204
|
]
|
|
1463
1205
|
})
|
|
1464
1206
|
});
|
|
1465
|
-
const Logo = ()=>/*#__PURE__*/
|
|
1207
|
+
const Logo = ()=>/*#__PURE__*/ jsx("div", {
|
|
1466
1208
|
className: "flex justify-center mb-2",
|
|
1467
|
-
children: /*#__PURE__*/
|
|
1209
|
+
children: /*#__PURE__*/ jsx("svg", {
|
|
1468
1210
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1469
1211
|
width: "20px",
|
|
1470
1212
|
height: "22px",
|
|
1471
1213
|
viewBox: "0 0 14 16",
|
|
1472
|
-
children: /*#__PURE__*/
|
|
1214
|
+
children: /*#__PURE__*/ jsx("path", {
|
|
1473
1215
|
fill: "#9b5cff",
|
|
1474
1216
|
d: "M127,50 L126,50 C123.238576,50 121,47.7614237 121,45 C121,42.2385763 123.238576,40 126,40 L135,40 L135,56 L133,56 L133,42 L129,42 L129,56 L127,56 L127,50 Z M127,48 L127,42 L126,42 C124.343146,42 123,43.3431458 123,45 C123,46.6568542 124.343146,48 126,48 L127,48 Z",
|
|
1475
1217
|
transform: "translate(-121 -40)"
|
|
@@ -16782,8 +16524,8 @@ const _sistema = {
|
|
|
16782
16524
|
const utils_sistema = _sistema;
|
|
16783
16525
|
class _hooks {
|
|
16784
16526
|
use_is_mobile() {
|
|
16785
|
-
const [isMobile, setIsMobile] =
|
|
16786
|
-
|
|
16527
|
+
const [isMobile, setIsMobile] = useState(false);
|
|
16528
|
+
useLayoutEffect(()=>{
|
|
16787
16529
|
const updateSize = ()=>setIsMobile(window.innerWidth < 768);
|
|
16788
16530
|
window.addEventListener("resize", updateSize);
|
|
16789
16531
|
updateSize();
|
|
@@ -16853,14 +16595,14 @@ const createStoreImpl = (createState)=>{
|
|
|
16853
16595
|
const createStore = (createState)=>createState ? createStoreImpl(createState) : createStoreImpl;
|
|
16854
16596
|
const identity = (arg)=>arg;
|
|
16855
16597
|
function useStore(api, selector = identity) {
|
|
16856
|
-
const slice =
|
|
16598
|
+
const slice = react.useSyncExternalStore(api.subscribe, react.useCallback(()=>selector(api.getState()), [
|
|
16857
16599
|
api,
|
|
16858
16600
|
selector
|
|
16859
|
-
]),
|
|
16601
|
+
]), react.useCallback(()=>selector(api.getInitialState()), [
|
|
16860
16602
|
api,
|
|
16861
16603
|
selector
|
|
16862
16604
|
]));
|
|
16863
|
-
|
|
16605
|
+
react.useDebugValue(slice);
|
|
16864
16606
|
return slice;
|
|
16865
16607
|
}
|
|
16866
16608
|
const createImpl = (createState)=>{
|
|
@@ -19333,7 +19075,7 @@ const criar_estado_inicial = ()=>({
|
|
|
19333
19075
|
const contexto_assinatura_store = react_create()(immer_immer(()=>({
|
|
19334
19076
|
states: criar_estado_inicial()
|
|
19335
19077
|
})));
|
|
19336
|
-
|
|
19078
|
+
const contexto_assinatura = new class {
|
|
19337
19079
|
api = {
|
|
19338
19080
|
criar: async (props)=>{
|
|
19339
19081
|
try {
|
|
@@ -19533,18 +19275,17 @@ class contexto_assinatura {
|
|
|
19533
19275
|
updater(s.states);
|
|
19534
19276
|
});
|
|
19535
19277
|
};
|
|
19536
|
-
}
|
|
19537
|
-
const contexto_contexto_assinatura = new contexto_assinatura();
|
|
19278
|
+
};
|
|
19538
19279
|
function ButtonGerarUrl({ input, label = "Gerar link de pagamento", setUpgradePlano }) {
|
|
19539
|
-
const [isLoading, setIsLoading] =
|
|
19540
|
-
const [hasError, setHasError] =
|
|
19541
|
-
const [openConfirm, setOpenConfirm] =
|
|
19280
|
+
const [isLoading, setIsLoading] = useState(false);
|
|
19281
|
+
const [hasError, setHasError] = useState(false);
|
|
19282
|
+
const [openConfirm, setOpenConfirm] = useState(false);
|
|
19542
19283
|
async function handleClick() {
|
|
19543
19284
|
if (isLoading) return;
|
|
19544
19285
|
try {
|
|
19545
19286
|
setIsLoading(true);
|
|
19546
19287
|
setHasError(false);
|
|
19547
|
-
const resultado = await
|
|
19288
|
+
const resultado = await contexto_assinatura.api.criar_checkout_session(input);
|
|
19548
19289
|
const url = resultado?.data?.checkout?.url;
|
|
19549
19290
|
if (resultado?.data?.checkout?.tipo_evento === "upgrade") return window.location.reload();
|
|
19550
19291
|
if ("string" == typeof url && url.length > 0) window.location.href = url;
|
|
@@ -19559,9 +19300,9 @@ function ButtonGerarUrl({ input, label = "Gerar link de pagamento", setUpgradePl
|
|
|
19559
19300
|
if (setUpgradePlano) return void setOpenConfirm(true);
|
|
19560
19301
|
handleClick();
|
|
19561
19302
|
}
|
|
19562
|
-
return /*#__PURE__*/
|
|
19303
|
+
return /*#__PURE__*/ jsxs(Fragment, {
|
|
19563
19304
|
children: [
|
|
19564
|
-
/*#__PURE__*/
|
|
19305
|
+
/*#__PURE__*/ jsxs("button", {
|
|
19565
19306
|
type: "button",
|
|
19566
19307
|
onClick: onButtonClick,
|
|
19567
19308
|
disabled: isLoading,
|
|
@@ -19573,41 +19314,41 @@ function ButtonGerarUrl({ input, label = "Gerar link de pagamento", setUpgradePl
|
|
|
19573
19314
|
relative select-none active:scale-95
|
|
19574
19315
|
`,
|
|
19575
19316
|
children: [
|
|
19576
|
-
/*#__PURE__*/
|
|
19317
|
+
/*#__PURE__*/ jsx("span", {
|
|
19577
19318
|
children: isLoading ? "Processando..." : label
|
|
19578
19319
|
}),
|
|
19579
|
-
isLoading && /*#__PURE__*/
|
|
19320
|
+
isLoading && /*#__PURE__*/ jsx("span", {
|
|
19580
19321
|
className: "w-4 h-4 rounded-full border-2 border-default-300 border-t-primary-600 animate-spin"
|
|
19581
19322
|
}),
|
|
19582
|
-
hasError && !isLoading && /*#__PURE__*/
|
|
19323
|
+
hasError && !isLoading && /*#__PURE__*/ jsx("span", {
|
|
19583
19324
|
className: "text-error-200 text-xs ml-2 font-medium bg-white/10 px-1.5 py-0.5 rounded-sm",
|
|
19584
19325
|
children: "Erro ao gerar"
|
|
19585
19326
|
})
|
|
19586
19327
|
]
|
|
19587
19328
|
}),
|
|
19588
|
-
openConfirm && /*#__PURE__*/ createPortal(/*#__PURE__*/
|
|
19329
|
+
openConfirm && /*#__PURE__*/ createPortal(/*#__PURE__*/ jsx("div", {
|
|
19589
19330
|
className: "fixed inset-0 z-[9999] flex items-center justify-center bg-black/60",
|
|
19590
|
-
children: /*#__PURE__*/
|
|
19331
|
+
children: /*#__PURE__*/ jsxs("div", {
|
|
19591
19332
|
className: "bg-white rounded-xl p-6 w-full max-w-sm shadow-2xl",
|
|
19592
19333
|
children: [
|
|
19593
|
-
/*#__PURE__*/
|
|
19334
|
+
/*#__PURE__*/ jsx("h3", {
|
|
19594
19335
|
className: "text-lg font-semibold text-default-900 mb-2",
|
|
19595
19336
|
children: "Confirmar atualiza\xe7\xe3o de plano"
|
|
19596
19337
|
}),
|
|
19597
|
-
/*#__PURE__*/
|
|
19338
|
+
/*#__PURE__*/ jsx("p", {
|
|
19598
19339
|
className: "text-sm text-default-600 mb-6",
|
|
19599
19340
|
children: "Voc\xea tem certeza que deseja prosseguir com a atualiza\xe7\xe3o do seu plano?"
|
|
19600
19341
|
}),
|
|
19601
|
-
/*#__PURE__*/
|
|
19342
|
+
/*#__PURE__*/ jsxs("div", {
|
|
19602
19343
|
className: "flex justify-end gap-3",
|
|
19603
19344
|
children: [
|
|
19604
|
-
/*#__PURE__*/
|
|
19345
|
+
/*#__PURE__*/ jsx("button", {
|
|
19605
19346
|
type: "button",
|
|
19606
19347
|
onClick: ()=>setOpenConfirm(false),
|
|
19607
19348
|
className: "px-4 py-2 rounded-lg text-sm font-medium bg-default-100 hover:bg-default-200",
|
|
19608
19349
|
children: "Cancelar"
|
|
19609
19350
|
}),
|
|
19610
|
-
/*#__PURE__*/
|
|
19351
|
+
/*#__PURE__*/ jsx("button", {
|
|
19611
19352
|
type: "button",
|
|
19612
19353
|
onClick: ()=>{
|
|
19613
19354
|
setOpenConfirm(false);
|
|
@@ -19633,15 +19374,15 @@ function labelPeriodo(interval, count) {
|
|
|
19633
19374
|
return `${count} ${interval}`;
|
|
19634
19375
|
}
|
|
19635
19376
|
function CheckoutAssinaturaStripe() {
|
|
19636
|
-
const { data, loading, periodo_selecionado, produto_id, periodos } =
|
|
19377
|
+
const { data, loading, periodo_selecionado, produto_id, periodos } = contexto_assinatura.get_jsx.produto;
|
|
19637
19378
|
const isMobile = src_utils.hooks.use_is_mobile();
|
|
19638
|
-
const selecionadoManual =
|
|
19639
|
-
|
|
19640
|
-
|
|
19379
|
+
const selecionadoManual = useRef(false);
|
|
19380
|
+
useEffect(()=>{
|
|
19381
|
+
contexto_assinatura.api.buscar_produto_stripe();
|
|
19641
19382
|
}, []);
|
|
19642
19383
|
const planoAtualPriceId = data?.plano_atual?.price_id ?? null;
|
|
19643
19384
|
const planoAtualEhFree = null === planoAtualPriceId;
|
|
19644
|
-
const produtosOrdenados =
|
|
19385
|
+
const produtosOrdenados = useMemo(()=>{
|
|
19645
19386
|
if (!data?.produtos?.length) return [];
|
|
19646
19387
|
return [
|
|
19647
19388
|
...data.produtos
|
|
@@ -19656,22 +19397,22 @@ function CheckoutAssinaturaStripe() {
|
|
|
19656
19397
|
data?.produtos,
|
|
19657
19398
|
periodo_selecionado
|
|
19658
19399
|
]);
|
|
19659
|
-
|
|
19400
|
+
useEffect(()=>{
|
|
19660
19401
|
if (!data?.produtos?.length) return;
|
|
19661
19402
|
if (selecionadoManual.current) return;
|
|
19662
|
-
if (!planoAtualEhFree && planoAtualPriceId) return void
|
|
19403
|
+
if (!planoAtualEhFree && planoAtualPriceId) return void contexto_assinatura.set_state((store)=>{
|
|
19663
19404
|
store.produto.produto_id = planoAtualPriceId;
|
|
19664
19405
|
});
|
|
19665
19406
|
if (planoAtualEhFree) {
|
|
19666
19407
|
const primeiroZero = data.produtos.flatMap((p)=>p.precos).find((p)=>0 === p.unit_amount);
|
|
19667
|
-
if (primeiroZero)
|
|
19408
|
+
if (primeiroZero) contexto_assinatura.set_state((store)=>{
|
|
19668
19409
|
store.produto.produto_id = primeiroZero.id;
|
|
19669
19410
|
});
|
|
19670
19411
|
}
|
|
19671
19412
|
}, [
|
|
19672
19413
|
data
|
|
19673
19414
|
]);
|
|
19674
|
-
const isPlanoAtualSelecionado =
|
|
19415
|
+
const isPlanoAtualSelecionado = useMemo(()=>{
|
|
19675
19416
|
if (!produto_id) return true;
|
|
19676
19417
|
if (!planoAtualEhFree) return produto_id === planoAtualPriceId;
|
|
19677
19418
|
const precoSelecionado = data?.produtos?.flatMap((p)=>p.precos)?.find((p)=>p.id === produto_id);
|
|
@@ -19682,29 +19423,29 @@ function CheckoutAssinaturaStripe() {
|
|
|
19682
19423
|
planoAtualEhFree,
|
|
19683
19424
|
data
|
|
19684
19425
|
]);
|
|
19685
|
-
if (loading) return /*#__PURE__*/
|
|
19426
|
+
if (loading) return /*#__PURE__*/ jsx("div", {
|
|
19686
19427
|
className: "h-[60vh] flex flex-col justify-center items-center text-theme-text/60 gap-4",
|
|
19687
|
-
children: /*#__PURE__*/
|
|
19428
|
+
children: /*#__PURE__*/ jsx("div", {
|
|
19688
19429
|
className: "w-10 h-10 border border-theme-border border-t-primary-600 rounded-full animate-spin"
|
|
19689
19430
|
})
|
|
19690
19431
|
});
|
|
19691
|
-
return /*#__PURE__*/
|
|
19432
|
+
return /*#__PURE__*/ jsxs("main", {
|
|
19692
19433
|
className: [
|
|
19693
19434
|
"font-sans min-h-screen bg-theme-bg text-theme-text box-border",
|
|
19694
19435
|
isMobile ? "pt-8 px-4 pb-36" : "pt-20 px-6 pb-36"
|
|
19695
19436
|
].join(" "),
|
|
19696
19437
|
children: [
|
|
19697
|
-
/*#__PURE__*/
|
|
19438
|
+
/*#__PURE__*/ jsxs("header", {
|
|
19698
19439
|
className: "text-center max-w-xl mx-auto mb-8",
|
|
19699
19440
|
children: [
|
|
19700
|
-
/*#__PURE__*/
|
|
19441
|
+
/*#__PURE__*/ jsx("h1", {
|
|
19701
19442
|
className: [
|
|
19702
19443
|
"font-extrabold tracking-tight mb-3 text-theme-text leading-tight",
|
|
19703
19444
|
isMobile ? "text-3xl" : "text-5xl"
|
|
19704
19445
|
].join(" "),
|
|
19705
19446
|
children: "Escolha o plano ideal"
|
|
19706
19447
|
}),
|
|
19707
|
-
/*#__PURE__*/
|
|
19448
|
+
/*#__PURE__*/ jsx("p", {
|
|
19708
19449
|
className: [
|
|
19709
19450
|
"text-theme-text/70 leading-relaxed",
|
|
19710
19451
|
isMobile ? "text-base" : "text-lg"
|
|
@@ -19713,16 +19454,16 @@ function CheckoutAssinaturaStripe() {
|
|
|
19713
19454
|
})
|
|
19714
19455
|
]
|
|
19715
19456
|
}),
|
|
19716
|
-
/*#__PURE__*/
|
|
19457
|
+
/*#__PURE__*/ jsx("div", {
|
|
19717
19458
|
className: `flex justify-center ${isMobile ? "mb-6" : "mb-12"}`,
|
|
19718
|
-
children: /*#__PURE__*/
|
|
19459
|
+
children: /*#__PURE__*/ jsx("div", {
|
|
19719
19460
|
className: "inline-flex bg-theme-card p-1 rounded-full border border-theme-border max-w-full overflow-x-auto whitespace-nowrap gap-1",
|
|
19720
19461
|
children: periodos?.map((id)=>{
|
|
19721
19462
|
const [interval, count] = id?.split(":");
|
|
19722
19463
|
const ativo = periodo_selecionado === id;
|
|
19723
|
-
return /*#__PURE__*/
|
|
19464
|
+
return /*#__PURE__*/ jsx("button", {
|
|
19724
19465
|
type: "button",
|
|
19725
|
-
onClick: ()=>
|
|
19466
|
+
onClick: ()=>contexto_assinatura.set_state((store)=>{
|
|
19726
19467
|
store.produto.periodo_selecionado = id;
|
|
19727
19468
|
store.produto.produto_id = null;
|
|
19728
19469
|
selecionadoManual.current = false;
|
|
@@ -19737,7 +19478,7 @@ function CheckoutAssinaturaStripe() {
|
|
|
19737
19478
|
})
|
|
19738
19479
|
})
|
|
19739
19480
|
}),
|
|
19740
|
-
/*#__PURE__*/
|
|
19481
|
+
/*#__PURE__*/ jsx("div", {
|
|
19741
19482
|
className: [
|
|
19742
19483
|
"grid max-w-7xl mx-auto items-start",
|
|
19743
19484
|
isMobile ? "grid-cols-1 gap-5 px-2" : "grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-8"
|
|
@@ -19749,10 +19490,10 @@ function CheckoutAssinaturaStripe() {
|
|
|
19749
19490
|
const isSelectedVisual = produto_id === precoAtivo.id || isPlanoAtualVisual;
|
|
19750
19491
|
const valorFormatado = src_utils.form.formatar_reais_br(String(precoAtivo.unit_amount));
|
|
19751
19492
|
const [inteiro, centavos] = valorFormatado.split(",");
|
|
19752
|
-
return /*#__PURE__*/
|
|
19493
|
+
return /*#__PURE__*/ jsxs("article", {
|
|
19753
19494
|
onClick: ()=>{
|
|
19754
19495
|
selecionadoManual.current = true;
|
|
19755
|
-
|
|
19496
|
+
contexto_assinatura.set_state((store)=>{
|
|
19756
19497
|
store.produto.produto_id = precoAtivo.id;
|
|
19757
19498
|
});
|
|
19758
19499
|
},
|
|
@@ -19762,40 +19503,40 @@ function CheckoutAssinaturaStripe() {
|
|
|
19762
19503
|
isSelectedVisual ? "border-primary-600 shadow-[0_20px_25px_-5px_rgba(79,70,229,0.15),0_8px_10px_-6px_rgba(79,70,229,0.1)] transform md:scale-[1.02] md:-translate-y-1 z-10" : "border-theme-border z-0"
|
|
19763
19504
|
].join(" "),
|
|
19764
19505
|
children: [
|
|
19765
|
-
isSelectedVisual && /*#__PURE__*/
|
|
19506
|
+
isSelectedVisual && /*#__PURE__*/ jsxs("div", {
|
|
19766
19507
|
className: "absolute -top-3 left-1/2 -translate-x-1/2 bg-primary-600 text-white px-4 py-1.5 rounded-full text-xs font-bold flex items-center gap-1 shadow-md",
|
|
19767
19508
|
children: [
|
|
19768
|
-
/*#__PURE__*/
|
|
19509
|
+
/*#__PURE__*/ jsx(Star, {
|
|
19769
19510
|
size: 12,
|
|
19770
19511
|
fill: "white"
|
|
19771
19512
|
}),
|
|
19772
19513
|
isPlanoAtualVisual ? "Plano Atual" : "Selecionado"
|
|
19773
19514
|
]
|
|
19774
19515
|
}),
|
|
19775
|
-
/*#__PURE__*/
|
|
19516
|
+
/*#__PURE__*/ jsxs("div", {
|
|
19776
19517
|
children: [
|
|
19777
|
-
/*#__PURE__*/
|
|
19518
|
+
/*#__PURE__*/ jsx("h3", {
|
|
19778
19519
|
className: "text-xl font-bold text-theme-text mb-2",
|
|
19779
19520
|
children: produto.name
|
|
19780
19521
|
}),
|
|
19781
|
-
produto.description && /*#__PURE__*/
|
|
19522
|
+
produto.description && /*#__PURE__*/ jsx("p", {
|
|
19782
19523
|
className: "text-sm text-theme-text/70 leading-normal",
|
|
19783
19524
|
children: produto.description
|
|
19784
19525
|
})
|
|
19785
19526
|
]
|
|
19786
19527
|
}),
|
|
19787
|
-
/*#__PURE__*/
|
|
19528
|
+
/*#__PURE__*/ jsxs("div", {
|
|
19788
19529
|
className: "flex items-baseline",
|
|
19789
19530
|
children: [
|
|
19790
|
-
/*#__PURE__*/
|
|
19531
|
+
/*#__PURE__*/ jsx("span", {
|
|
19791
19532
|
className: "text-base text-theme-text/70 font-medium mr-1",
|
|
19792
19533
|
children: "R$"
|
|
19793
19534
|
}),
|
|
19794
|
-
/*#__PURE__*/
|
|
19535
|
+
/*#__PURE__*/ jsx("span", {
|
|
19795
19536
|
className: "text-[3.5rem] font-extrabold text-theme-text leading-none tracking-tighter",
|
|
19796
19537
|
children: inteiro
|
|
19797
19538
|
}),
|
|
19798
|
-
/*#__PURE__*/
|
|
19539
|
+
/*#__PURE__*/ jsxs("span", {
|
|
19799
19540
|
className: "text-xl font-semibold text-theme-text/70",
|
|
19800
19541
|
children: [
|
|
19801
19542
|
",",
|
|
@@ -19804,17 +19545,17 @@ function CheckoutAssinaturaStripe() {
|
|
|
19804
19545
|
})
|
|
19805
19546
|
]
|
|
19806
19547
|
}),
|
|
19807
|
-
/*#__PURE__*/
|
|
19548
|
+
/*#__PURE__*/ jsx("div", {
|
|
19808
19549
|
className: "w-full h-px bg-theme-border/40"
|
|
19809
19550
|
}),
|
|
19810
|
-
/*#__PURE__*/
|
|
19551
|
+
/*#__PURE__*/ jsx("ul", {
|
|
19811
19552
|
className: "list-none p-0 m-0 flex flex-col gap-4 flex-1",
|
|
19812
|
-
children: Object.values(produto.metadata || {}).slice(0, 4).map((texto, idx)=>/*#__PURE__*/
|
|
19553
|
+
children: Object.values(produto.metadata || {}).slice(0, 4).map((texto, idx)=>/*#__PURE__*/ jsxs("li", {
|
|
19813
19554
|
className: "flex items-start gap-3 text-sm text-theme-text/80 leading-normal",
|
|
19814
19555
|
children: [
|
|
19815
|
-
/*#__PURE__*/
|
|
19556
|
+
/*#__PURE__*/ jsx("div", {
|
|
19816
19557
|
className: "min-w-[22px] h-[22px] bg-primary-50 rounded-full flex items-center justify-center text-primary-600 flex-shrink-0",
|
|
19817
|
-
children: /*#__PURE__*/
|
|
19558
|
+
children: /*#__PURE__*/ jsx(Check, {
|
|
19818
19559
|
size: 14,
|
|
19819
19560
|
strokeWidth: 3
|
|
19820
19561
|
})
|
|
@@ -19827,14 +19568,14 @@ function CheckoutAssinaturaStripe() {
|
|
|
19827
19568
|
}, produto.id);
|
|
19828
19569
|
})
|
|
19829
19570
|
}),
|
|
19830
|
-
!isPlanoAtualSelecionado && produto_id && /*#__PURE__*/
|
|
19571
|
+
!isPlanoAtualSelecionado && produto_id && /*#__PURE__*/ jsx("div", {
|
|
19831
19572
|
className: "fixed bottom-0 left-0 right-0 bg-theme-card/95 backdrop-blur-md border-t border-theme-border px-4 md:px-6 py-4 md:py-5 flex justify-center z-50 shadow-[0_-4px_20px_-5px_rgba(0,0,0,0.05)]",
|
|
19832
|
-
children: /*#__PURE__*/
|
|
19573
|
+
children: /*#__PURE__*/ jsxs("div", {
|
|
19833
19574
|
className: "w-full max-w-xl flex flex-col items-center gap-3",
|
|
19834
19575
|
children: [
|
|
19835
|
-
/*#__PURE__*/
|
|
19576
|
+
/*#__PURE__*/ jsx("div", {
|
|
19836
19577
|
className: "w-full flex justify-center",
|
|
19837
|
-
children: /*#__PURE__*/
|
|
19578
|
+
children: /*#__PURE__*/ jsx(ButtonGerarUrl, {
|
|
19838
19579
|
setUpgradePlano: true,
|
|
19839
19580
|
label: planoAtualEhFree && "Ir Para Pagamento Seguro" || "Atualizar Meu Plano",
|
|
19840
19581
|
input: {
|
|
@@ -19847,14 +19588,14 @@ function CheckoutAssinaturaStripe() {
|
|
|
19847
19588
|
}
|
|
19848
19589
|
})
|
|
19849
19590
|
}),
|
|
19850
|
-
/*#__PURE__*/
|
|
19591
|
+
/*#__PURE__*/ jsxs("div", {
|
|
19851
19592
|
className: "flex items-center gap-1.5 text-theme-text/60 text-xs font-medium",
|
|
19852
19593
|
children: [
|
|
19853
|
-
/*#__PURE__*/
|
|
19594
|
+
/*#__PURE__*/ jsx(Shield, {
|
|
19854
19595
|
size: 12,
|
|
19855
19596
|
className: "text-success-500"
|
|
19856
19597
|
}),
|
|
19857
|
-
/*#__PURE__*/
|
|
19598
|
+
/*#__PURE__*/ jsx("span", {
|
|
19858
19599
|
children: "Ambiente criptografado e seguro"
|
|
19859
19600
|
})
|
|
19860
19601
|
]
|
|
@@ -19862,26 +19603,26 @@ function CheckoutAssinaturaStripe() {
|
|
|
19862
19603
|
]
|
|
19863
19604
|
})
|
|
19864
19605
|
}),
|
|
19865
|
-
!isMobile && data?.produtos?.length && data?.produtos?.length > 0 && /*#__PURE__*/
|
|
19606
|
+
!isMobile && data?.produtos?.length && data?.produtos?.length > 0 && /*#__PURE__*/ jsxs("section", {
|
|
19866
19607
|
className: "mt-24 max-w-7xl mx-auto",
|
|
19867
19608
|
children: [
|
|
19868
|
-
/*#__PURE__*/
|
|
19609
|
+
/*#__PURE__*/ jsx("h2", {
|
|
19869
19610
|
className: "text-center text-3xl font-bold mb-10 text-theme-text",
|
|
19870
19611
|
children: "Compare os recursos"
|
|
19871
19612
|
}),
|
|
19872
|
-
/*#__PURE__*/
|
|
19613
|
+
/*#__PURE__*/ jsx("div", {
|
|
19873
19614
|
className: "overflow-x-auto bg-theme-card rounded-3xl border border-theme-border shadow-lg",
|
|
19874
|
-
children: /*#__PURE__*/
|
|
19615
|
+
children: /*#__PURE__*/ jsxs("table", {
|
|
19875
19616
|
className: "w-full border-collapse min-w-[600px]",
|
|
19876
19617
|
children: [
|
|
19877
|
-
/*#__PURE__*/
|
|
19878
|
-
children: /*#__PURE__*/
|
|
19618
|
+
/*#__PURE__*/ jsx("thead", {
|
|
19619
|
+
children: /*#__PURE__*/ jsxs("tr", {
|
|
19879
19620
|
children: [
|
|
19880
|
-
/*#__PURE__*/
|
|
19621
|
+
/*#__PURE__*/ jsx("th", {
|
|
19881
19622
|
className: "px-6 py-6 text-left text-theme-text/70 font-semibold border-b border-theme-border w-2/5 text-sm uppercase tracking-wider",
|
|
19882
19623
|
children: "Recurso"
|
|
19883
19624
|
}),
|
|
19884
|
-
data?.produtos.map((p)=>/*#__PURE__*/
|
|
19625
|
+
data?.produtos.map((p)=>/*#__PURE__*/ jsx("th", {
|
|
19885
19626
|
className: [
|
|
19886
19627
|
"px-6 py-6 text-center text-theme-text font-bold text-lg border-b border-theme-border",
|
|
19887
19628
|
p.precos.some((pr)=>pr.id === produto_id) ? "bg-theme-card" : ""
|
|
@@ -19891,7 +19632,7 @@ function CheckoutAssinaturaStripe() {
|
|
|
19891
19632
|
]
|
|
19892
19633
|
})
|
|
19893
19634
|
}),
|
|
19894
|
-
/*#__PURE__*/
|
|
19635
|
+
/*#__PURE__*/ jsx("tbody", {
|
|
19895
19636
|
children: (()=>{
|
|
19896
19637
|
const todasChaves = new Set();
|
|
19897
19638
|
data?.produtos?.forEach((p)=>{
|
|
@@ -19904,10 +19645,10 @@ function CheckoutAssinaturaStripe() {
|
|
|
19904
19645
|
const texto = String(prod.metadata[chave]).replace(/\{\{.*?\}\}/g, "");
|
|
19905
19646
|
return texto.trim();
|
|
19906
19647
|
})();
|
|
19907
|
-
return /*#__PURE__*/
|
|
19648
|
+
return /*#__PURE__*/ jsxs("tr", {
|
|
19908
19649
|
className: "border-b border-theme-border/40",
|
|
19909
19650
|
children: [
|
|
19910
|
-
/*#__PURE__*/
|
|
19651
|
+
/*#__PURE__*/ jsx("td", {
|
|
19911
19652
|
className: "px-6 py-4 text-theme-text/80 text-sm font-medium",
|
|
19912
19653
|
children: linhaTexto
|
|
19913
19654
|
}),
|
|
@@ -19915,25 +19656,25 @@ function CheckoutAssinaturaStripe() {
|
|
|
19915
19656
|
const feature = produto.metadata?.[chave];
|
|
19916
19657
|
const conteudo = String(feature || "").match(/\{\{(.*?)\}\}/)?.[1];
|
|
19917
19658
|
const isSelectedCol = produto.precos.some((pr)=>pr.id === produto_id);
|
|
19918
|
-
return /*#__PURE__*/
|
|
19659
|
+
return /*#__PURE__*/ jsx("td", {
|
|
19919
19660
|
className: [
|
|
19920
19661
|
"text-center px-4 py-4",
|
|
19921
19662
|
isSelectedCol ? "bg-theme-card" : ""
|
|
19922
19663
|
].join(" "),
|
|
19923
|
-
children: feature ? /*#__PURE__*/
|
|
19664
|
+
children: feature ? /*#__PURE__*/ jsxs("div", {
|
|
19924
19665
|
className: "flex items-center justify-center gap-2",
|
|
19925
19666
|
children: [
|
|
19926
|
-
/*#__PURE__*/
|
|
19667
|
+
/*#__PURE__*/ jsx(Check, {
|
|
19927
19668
|
size: 18,
|
|
19928
19669
|
className: "text-success-600",
|
|
19929
19670
|
strokeWidth: 3
|
|
19930
19671
|
}),
|
|
19931
|
-
/*#__PURE__*/
|
|
19672
|
+
/*#__PURE__*/ jsx("span", {
|
|
19932
19673
|
className: "text-sm text-theme-text/70",
|
|
19933
19674
|
children: conteudo || ""
|
|
19934
19675
|
})
|
|
19935
19676
|
]
|
|
19936
|
-
}) : /*#__PURE__*/
|
|
19677
|
+
}) : /*#__PURE__*/ jsx("span", {
|
|
19937
19678
|
className: "text-theme-text/30 text-2xl leading-none",
|
|
19938
19679
|
children: "-"
|
|
19939
19680
|
})
|
|
@@ -19952,4 +19693,4 @@ function CheckoutAssinaturaStripe() {
|
|
|
19952
19693
|
]
|
|
19953
19694
|
});
|
|
19954
19695
|
}
|
|
19955
|
-
export { CheckoutAssinaturaStripe, CheckoutStripe };
|
|
19696
|
+
export { CheckoutAssinaturaStripe, CheckoutStripe, contexto_assinatura };
|
|
@@ -1,23 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license React
|
|
3
|
-
* react-jsx-runtime.development.js
|
|
4
|
-
*
|
|
5
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
6
|
-
*
|
|
7
|
-
* This source code is licensed under the MIT license found in the
|
|
8
|
-
* LICENSE file in the root directory of this source tree.
|
|
9
|
-
*/
|
|
10
|
-
|
|
11
|
-
/**
|
|
12
|
-
* @license React
|
|
13
|
-
* react-jsx-runtime.production.js
|
|
14
|
-
*
|
|
15
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
16
|
-
*
|
|
17
|
-
* This source code is licensed under the MIT license found in the
|
|
18
|
-
* LICENSE file in the root directory of this source tree.
|
|
19
|
-
*/
|
|
20
|
-
|
|
21
1
|
/**
|
|
22
2
|
* @license lucide-react v0.544.0 - ISC
|
|
23
3
|
*
|