@nocobase/plugin-public-forms 1.4.0-alpha.20240928155737

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.
Files changed (39) hide show
  1. package/LICENSE.txt +123 -0
  2. package/client.d.ts +2 -0
  3. package/client.js +1 -0
  4. package/dist/client/collections/index.d.ts +9 -0
  5. package/dist/client/collections/publicForms.d.ts +72 -0
  6. package/dist/client/components/AdminPublicFormList.d.ts +10 -0
  7. package/dist/client/components/AdminPublicFormPage.d.ts +10 -0
  8. package/dist/client/components/ConfigureLink.d.ts +10 -0
  9. package/dist/client/components/PublicFormPage.d.ts +12 -0
  10. package/dist/client/components/UnEnabledFormPlaceholder.d.ts +11 -0
  11. package/dist/client/hooks/index.d.ts +12 -0
  12. package/dist/client/hooks/useDeleteActionProps.d.ts +10 -0
  13. package/dist/client/hooks/useEditFormProps.d.ts +11 -0
  14. package/dist/client/hooks/usePublicSubmitActionProps.d.ts +4 -0
  15. package/dist/client/hooks/useSubmitActionProps.d.ts +12 -0
  16. package/dist/client/index.d.ts +20 -0
  17. package/dist/client/index.js +17 -0
  18. package/dist/client/locale.d.ts +12 -0
  19. package/dist/client/schemas/createActionSchema.d.ts +70 -0
  20. package/dist/client/schemas/editActionSchema.d.ts +81 -0
  21. package/dist/client/schemas/formSchemaCallback.d.ts +46 -0
  22. package/dist/client/schemas/index.d.ts +9 -0
  23. package/dist/client/schemas/publicForms.d.ts +10 -0
  24. package/dist/client/settings/index.d.ts +11 -0
  25. package/dist/externalVersion.js +26 -0
  26. package/dist/index.d.ts +10 -0
  27. package/dist/index.js +48 -0
  28. package/dist/locale/zh-CN.json +18 -0
  29. package/dist/server/collections/publicForms.d.ts +10 -0
  30. package/dist/server/collections/publicForms.js +69 -0
  31. package/dist/server/hook.d.ts +21 -0
  32. package/dist/server/hook.js +121 -0
  33. package/dist/server/index.d.ts +9 -0
  34. package/dist/server/index.js +42 -0
  35. package/dist/server/plugin.d.ts +47 -0
  36. package/dist/server/plugin.js +220 -0
  37. package/package.json +20 -0
  38. package/server.d.ts +2 -0
  39. package/server.js +1 -0
package/LICENSE.txt ADDED
@@ -0,0 +1,123 @@
1
+ Updated Date: September 17, 2024
2
+
3
+ NocoBase License Agreement
4
+
5
+ NOCOBASE PTE. LTD.,a Singaporean Exempt Private Company Limited by Shares with its principal place of business located at #03-01 ROBINSON 112 ("The Company") https://www.nocobase.com/ issues this License Agreement ("Agreement") to you. You, as an individual or a company ("User"), will be deemed to voluntarily accept all terms of this Agreement by using NocoBase (including but not limited to obtaining NocoBase source code or installation package in any form, installing and using NocoBase, purchasing NocoBase commercial license and services, purchasing NocoBase commercial plugins). If the User does not agree to any term of this Agreement, or cannot accurately understand our interpretation of the relevant terms, please stop using it immediately.
6
+
7
+ This Agreement applies to any use, quotation, contract, invoice, and all software delivered by the Company. The User and the Company or NocoBase's agents can no longer sign a separate license agreement for the sale and delivery of the software.
8
+
9
+ The Company reserves the right to formulate and modify this Agreement from time to time as needed. If there are changes, the Company will announce them in the form of website announcements, without further individual notification. The changed Agreement will automatically take effect once it is announced, becoming part of this Agreement.
10
+
11
+ ==============
12
+ 1. Definitions
13
+ ==============
14
+
15
+ 1.1 "Software" refers to the NocoBase kernel and plugins placed in the same code repository as the kernel, including their source code, installation packages, images, and all their modifications, updates, and upgrades.
16
+
17
+ 1.2 "Marketplace" refers to the marketplace provided by the Company for selling Software plugins and solutions.
18
+
19
+ 1.3 "Commercial Plugin" refers to the paid plugins sold in the Marketplace.
20
+
21
+ 1.4 "Upper Layer Application" refers to a specific business use case application serving internal or external customers of the User, developed based on Software and Commercial Plugins, such as ERP/CRM.
22
+
23
+ 1.5 "Customer" refers to the clients who purchase the User's Upper Layer Application.
24
+
25
+ 1.6 "Third-Party Open Source Software" refers to open source software provided with Software and Commercial Plugins. They are licensed through various published open source software licenses or copyright notices accompanying such software.
26
+
27
+ ===================================
28
+ 2. Intellectual Property Protection
29
+ ===================================
30
+
31
+ Except for Third-Party Open Source Software, the Company owns all copyrights, trademark rights, patent rights, trade secrets, and other intellectual property rights of the Software, and has registered and protected them in relevant countries and regions according to the "Paris Convention" or "TRIPS Agreement", ensuring that the intellectual property rights of the Software and Commercial Plugins are internationally recognized and protected.
32
+
33
+ =============
34
+ 3. Disclaimer
35
+ =============
36
+
37
+ 3.1 Users shall not use the Software and Commercial Plugins to engage in activities that violate local laws and regulations, religious beliefs. All legal responsibilities and legal consequences arising from the use of Software and Commercial Plugins shall be borne by the User.
38
+
39
+ 3.2 The Company shall not be liable for any direct, indirect, special, incidental, or consequential damages (including but not limited to loss of profits, business interruption, data loss, or business information disclosure) caused by the User's use of the Software and Commercial Plugins, even if it has been previously informed of the possibility of such damages.
40
+
41
+ ===============
42
+ 4. License Type
43
+ ===============
44
+
45
+ 4.1 The Software uses a dual license type of AGPL-3.0 Open Source License https://www.gnu.org/licenses/agpl-3..en.htm and Commercial License.
46
+
47
+ 4.2 Commercial Plugins use Commercial License.
48
+
49
+ ================================================
50
+ 5. Rights and Obligations of Open Source License
51
+ ================================================
52
+
53
+ 5.1 The Software can be used for commercial purposes.
54
+
55
+ 5.2 User can sell plugins developed for the Software in the Marketplace.
56
+
57
+ 5.3 Outside the Marketplace, changes and plugins to the Software developed by User or third parties, and third-party applications developed based on the Software must all be open-sourced under the AGPL-3.0 license.
58
+
59
+ 5.4 It is not allowed to remove or change the brand, name, link, version number, license, and other information about NocoBase on the Software interface, except for the main LOGO in the upper left corner of the page.
60
+
61
+ 5.5 It is not allowed to remove or change all intellectual property statements about NocoBase in the code.
62
+
63
+ 5.6 It is not allowed to provide any form of no-code, zero-code, low-code platform SaaS products to the public using the original or modified Software.
64
+
65
+ 5.7 Comply with all requirements of the AGPL-3.0 agreement.
66
+
67
+ ===============================
68
+ 6. Rights of Commercial License
69
+ ===============================
70
+
71
+ 6.1 Obtain a permanent commercial license of the Software or Commercial Plugin.
72
+
73
+ 6.2 Get 12 months of upgrade and exclusive technical support.
74
+
75
+ 6.3 The licensed Software and Commercial Plugins can be used for commercial purposes with no restrictions on the number of applications and users.
76
+
77
+ 6.4 Changes and plugins to the Software, and applications integrated with the Software do not need to be open sourced.
78
+
79
+ 6.5 Can remove or change the brand, name, link, version number, license, and other information about NocoBase on the Software interface.
80
+
81
+ 6.6 Can sell plugins developed for Software in the Marketplace.
82
+
83
+ 6.7 Users with a Professional or Enterprise Edition license can sell Upper Layer Application to their clients.
84
+
85
+ 6.8 Not restricted by the AGPL-3.0 agreement.
86
+
87
+ 6.9 If there are other agreements in the contract for the above rights, the contract agreement shall prevail.
88
+
89
+ ====================================
90
+ 7. Obligations of Commercial License
91
+ ====================================
92
+
93
+ 7.1 It is not allowed to remove or change all intellectual property statements about NocoBase in the code.
94
+
95
+ 7.2 It is not allowed to sell, transfer, lease, share, or distribute the Commercial License.
96
+
97
+ 7.3 It is not allowed to sell, transfer, lease, share, or distribute any form of no-code, zero-code, low-code platform, or developer tools developed based on Software.
98
+
99
+ 7.4 It is not allowed to provide any form of no-code, zero-code, low-code platform SaaS products to the public using the original or modified Software.
100
+
101
+ 7.5 It is not allowed for Users with a standard license to sell Upper Layer Application to clients without a commercial license.
102
+
103
+ 7.6 It is not allowed to use reverse engineering, decompilation, and other means to try to discover the source code of Commercial Plugins that have not obtained source code license.
104
+
105
+ 7.7 It is not allowed to disclose the source code of Commercial Plugins to any third party.
106
+
107
+ 7.8 It is not allowed to publicly sell plugins developed for Software outside of the Marketplace.
108
+
109
+ 7.9 If there is a violation of the above obligations or the terms of this Agreement, the rights owned by the User will be immediately terminated, the paid fees will not be refunded, and the Company reserves the right to pursue the User's legal responsibility.
110
+
111
+ 7.10 If there are other agreements in the contract for the above obligations, the contract agreement shall prevail.
112
+
113
+ =============================================================
114
+ 8. Legal Jurisdiction, Interpretation, and Dispute Resolution
115
+ =============================================================
116
+
117
+ 8.1 Except for Mainland China, the interpretation, application, and all matters related to this agreement are subject to the jurisdiction of Singapore law.
118
+
119
+ 8.2 Any dispute related to this Agreement should first be resolved through friendly negotiation. If the negotiation fails to resolve the dispute, the dispute should be submitted to the International Chamber of Commerce (ICC) for arbitration. The arbitration venue should be Singapore, conducted in English.
120
+
121
+ 8.3 All terms and conditions of this Agreement shall be deemed enforceable to the maximum extent permitted by applicable law. If any term of this Agreement is deemed invalid by any applicable law, the invalidity of that term does not affect the validity of any other term of this Agreement, and it should be deemed that the invalid term has been modified as much as possible to make it valid and enforceable, or if the term cannot be modified, it should be deemed to have been deleted from this Agreement.
122
+
123
+ 8.4 The arbitration award is final, binding on both parties, and can be enforced in any court with jurisdiction.
package/client.d.ts ADDED
@@ -0,0 +1,2 @@
1
+ export * from './dist/client';
2
+ export { default } from './dist/client';
package/client.js ADDED
@@ -0,0 +1 @@
1
+ module.exports = require('./dist/client/index.js');
@@ -0,0 +1,9 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
9
+ export * from './publicForms';
@@ -0,0 +1,72 @@
1
+ export declare const publicFormsCollection: {
2
+ name: string;
3
+ filterTargetKey: string;
4
+ fields: ({
5
+ type: string;
6
+ name: string;
7
+ interface: string;
8
+ uiSchema: {
9
+ type: string;
10
+ title: string;
11
+ required: boolean;
12
+ 'x-component': string;
13
+ enum?: undefined;
14
+ 'x-component-props'?: undefined;
15
+ default?: undefined;
16
+ };
17
+ } | {
18
+ type: string;
19
+ name: string;
20
+ interface: string;
21
+ uiSchema: {
22
+ type: string;
23
+ title: string;
24
+ 'x-component': string;
25
+ required?: undefined;
26
+ enum?: undefined;
27
+ 'x-component-props'?: undefined;
28
+ default?: undefined;
29
+ };
30
+ } | {
31
+ type: string;
32
+ name: string;
33
+ interface: string;
34
+ uiSchema: {
35
+ type: string;
36
+ title: string;
37
+ 'x-component': string;
38
+ enum: string;
39
+ required?: undefined;
40
+ 'x-component-props'?: undefined;
41
+ default?: undefined;
42
+ };
43
+ } | {
44
+ type: string;
45
+ name: string;
46
+ interface: string;
47
+ uiSchema: {
48
+ type: string;
49
+ title: string;
50
+ 'x-component': string;
51
+ 'x-component-props': {
52
+ autocomplete: string;
53
+ };
54
+ required?: undefined;
55
+ enum?: undefined;
56
+ default?: undefined;
57
+ };
58
+ } | {
59
+ type: string;
60
+ name: string;
61
+ interface: string;
62
+ uiSchema: {
63
+ type: string;
64
+ title: string;
65
+ 'x-component': string;
66
+ default: boolean;
67
+ required?: undefined;
68
+ enum?: undefined;
69
+ 'x-component-props'?: undefined;
70
+ };
71
+ })[];
72
+ };
@@ -0,0 +1,10 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
9
+ import React from 'react';
10
+ export declare const AdminPublicFormList: () => React.JSX.Element;
@@ -0,0 +1,10 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
9
+ import React from 'react';
10
+ export declare function AdminPublicFormPage(): React.JSX.Element;
@@ -0,0 +1,10 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
9
+ import React from 'react';
10
+ export declare function ConfigureLink(): React.JSX.Element;
@@ -0,0 +1,12 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
9
+ import React from 'react';
10
+ export declare const PublicFormMessageContext: React.Context<any>;
11
+ export declare const PageBackgroundColor = "#f5f5f5";
12
+ export declare function PublicFormPage(): React.JSX.Element;
@@ -0,0 +1,11 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
9
+ import React from 'react';
10
+ export declare const UnEnabledFormPlaceholder: () => React.JSX.Element;
11
+ export declare const UnFoundFormPlaceholder: () => React.JSX.Element;
@@ -0,0 +1,12 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
9
+ export * from './useDeleteActionProps';
10
+ export * from './useEditFormProps';
11
+ export * from './usePublicSubmitActionProps';
12
+ export * from './useSubmitActionProps';
@@ -0,0 +1,10 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
9
+ import { ActionProps } from '@nocobase/client';
10
+ export declare function useDeleteActionProps(): ActionProps;
@@ -0,0 +1,11 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
9
+ export declare const useEditFormProps: () => {
10
+ form: import("@formily/core").Form<any>;
11
+ };
@@ -0,0 +1,4 @@
1
+ export declare const usePublicSubmitActionProps: () => {
2
+ type: string;
3
+ onClick(): Promise<void>;
4
+ };
@@ -0,0 +1,12 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
9
+ export declare const useSubmitActionProps: () => {
10
+ type: string;
11
+ onClick(): Promise<void>;
12
+ };
@@ -0,0 +1,20 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
9
+ import { ISchema, Plugin } from '@nocobase/client';
10
+ export declare class PluginPublicFormsClient extends Plugin {
11
+ protected formTypes: Map<any, any>;
12
+ registerFormType(type: string, options: {
13
+ label: string;
14
+ uiSchema: (options: any) => ISchema;
15
+ }): void;
16
+ getFormSchemaByType(type?: string): any;
17
+ getFormTypeOptions(): any[];
18
+ load(): Promise<void>;
19
+ }
20
+ export default PluginPublicFormsClient;
@@ -0,0 +1,17 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
9
+
10
+ (function(w,c){typeof exports=="object"&&typeof module!="undefined"?c(exports,require("@nocobase/client"),require("react/jsx-runtime"),require("react"),require("@ant-design/icons"),require("antd"),require("react-router"),require("react-router-dom"),require("@formily/antd-v5"),require("@formily/core"),require("@formily/react"),require("@emotion/css"),require("@formily/shared"),require("react-i18next")):typeof define=="function"&&define.amd?define(["exports","@nocobase/client","react/jsx-runtime","react","@ant-design/icons","antd","react-router","react-router-dom","@formily/antd-v5","@formily/core","@formily/react","@emotion/css","@formily/shared","react-i18next"],c):(w=typeof globalThis!="undefined"?globalThis:w||self,c(w["@nocobase/plugin-public-forms"]={},w["@nocobase/client"],w.jsxRuntime,w.react,w["@ant-design/icons"],w.antd,w["react-router"],w["react-router-dom"],w["@formily/antd-v5"],w["@formily/core"],w["@formily/react"],w["@emotion/css"],w["@formily/shared"],w["react-i18next"]))})(this,function(w,c,d,O,ie,A,ae,Q,K,se,$,gt,Ie,Qe){"use strict";var wo=Object.defineProperty,vo=Object.defineProperties;var go=Object.getOwnPropertyDescriptors;var Fe=Object.getOwnPropertySymbols;var bt=Object.prototype.hasOwnProperty,ft=Object.prototype.propertyIsEnumerable;var Ze=(w,c,d)=>c in w?wo(w,c,{enumerable:!0,configurable:!0,writable:!0,value:d}):w[c]=d,oe=(w,c)=>{for(var d in c||(c={}))bt.call(c,d)&&Ze(w,d,c[d]);if(Fe)for(var d of Fe(c))ft.call(c,d)&&Ze(w,d,c[d]);return w},Me=(w,c)=>vo(w,go(c));var wt=(w,c)=>{var d={};for(var O in w)bt.call(w,O)&&c.indexOf(O)<0&&(d[O]=w[O]);if(w!=null&&Fe)for(var O of Fe(w))c.indexOf(O)<0&&ft.call(w,O)&&(d[O]=w[O]);return d};var vt=(w,c,d)=>(Ze(w,typeof c!="symbol"?c+"":c,d),d);var Z=(w,c,d)=>new Promise((O,ie)=>{var A=K=>{try{Q(d.next(K))}catch(se){ie(se)}},ae=K=>{try{Q(d.throw(K))}catch(se){ie(se)}},Q=K=>K.done?O(K.value):Promise.resolve(K.value).then(A,ae);Q((d=d.apply(w,c)).next())});const ht={name:"@nocobase/plugin-public-forms",version:"1.4.0-alpha.20240928155737",main:"dist/server/index.js",displayName:"Public forms","displayName.zh-CN":"公开表单",description:"Share public forms externally to collect information from anonymous users","description.zh-CN":"对外分享公开表单,向匿名用户收集信息。",license:"AGPL-3.0",homepage:"https://docs.nocobase.com/handbook/public-form","homepage.zh-CN":"https://docs-cn.nocobase.com/public-form",peerDependencies:{"@nocobase/client":"1.x","@nocobase/plugin-client":"1.x","@nocobase/plugin-ui-schema-storage":"1.x","@nocobase/server":"1.x","@nocobase/test":"1.x"}},q="public-forms";function yt(){const t=c.useApp();return e=>t.i18n.t(e,{ns:[ht.name,"client"]})}function we(){return Qe.useTranslation([q,"client"],{nsMode:"fallback"})}const Ve={name:"publicForms",filterTargetKey:"key",fields:[{type:"string",name:"title",interface:"input",uiSchema:{type:"string",title:"{{t('Title')}}",required:!0,"x-component":"Input"}},{type:"text",name:"description",interface:"textarea",uiSchema:{type:"string",title:"{{t('Description')}}","x-component":"Input.TextArea"}},{type:"string",name:"type",interface:"radioGroup",uiSchema:{type:"string",title:'{{t("Type",{ns:"public-forms"})}}',"x-component":"Radio.Group",enum:"{{ formTypes }}"}},{type:"string",name:"collection",interface:"collection",uiSchema:{type:"string",title:"{{t('Collection')}}",required:!0,"x-component":"DataSourceCollectionCascader"}},{type:"password",name:"password",interface:"password",uiSchema:{type:"string",title:"{{t('Password')}}","x-component":"Password","x-component-props":{autocomplete:"new-password"}}},{type:"boolean",name:"enabled",interface:"checkbox",uiSchema:{type:"string",title:`{{t("Enable form",{ns:"${q}"})}}`,"x-component":"Checkbox",default:!0}}]};function xt(){const{message:t}=A.App.useApp(),e=c.useCollectionRecordData(),r=c.useDataBlockResource(),{service:n}=c.useBlockRequestContext(),o=c.useCollection();return{confirm:{title:"Delete",content:"Are you sure you want to delete it?"},onClick(){return Z(this,null,function*(){if(!o)throw new Error("collection does not exist");yield r.destroy({filterByTk:e[o.filterTargetKey]}),yield n.refresh(),t.success("Deleted!")})}}}const St=()=>{const t=c.useCollectionRecordData();return{form:O.useMemo(()=>se.createForm({initialValues:t}),[t])}};var Tt=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{},p={},Be={exports:{}};(function(t,e){(function(r,n){var o="1.0.38",m="",g="?",S="function",B="undefined",E="object",F="string",W="major",a="model",l="name",i="type",s="vendor",u="version",_="architecture",ue="console",y="mobile",h="tablet",U="smarttv",te="wearable",je="embedded",qe=500,Se="Amazon",pe="Apple",tt="ASUS",nt="BlackBerry",J="Browser",Te="Chrome",po="Edge",Ce="Firefox",Pe="Google",ot="Huawei",ze="LG",Ge="Microsoft",it="Motorola",me="Opera",ke="Samsung",at="Sharp",Oe="Sony",He="Xiaomi",Ke="Zebra",st="Facebook",lt="Chromium OS",ct="Mac OS",mo=function(x,C){var v={};for(var k in x)C[k]&&C[k].length%2===0?v[k]=C[k].concat(x[k]):v[k]=x[k];return v},Ee=function(x){for(var C={},v=0;v<x.length;v++)C[x[v].toUpperCase()]=x[v];return C},dt=function(x,C){return typeof x===F?be(C).indexOf(be(x))!==-1:!1},be=function(x){return x.toLowerCase()},bo=function(x){return typeof x===F?x.replace(/[^\d\.]/g,m).split(".")[0]:n},Ye=function(x,C){if(typeof x===F)return x=x.replace(/^\s\s*/,m),typeof C===B?x:x.substring(0,qe)},fe=function(x,C){for(var v=0,k,Y,G,T,f,H;v<C.length&&!f;){var Xe=C[v],mt=C[v+1];for(k=Y=0;k<Xe.length&&!f&&Xe[k];)if(f=Xe[k++].exec(x),f)for(G=0;G<mt.length;G++)H=f[++Y],T=mt[G],typeof T===E&&T.length>0?T.length===2?typeof T[1]==S?this[T[0]]=T[1].call(this,H):this[T[0]]=T[1]:T.length===3?typeof T[1]===S&&!(T[1].exec&&T[1].test)?this[T[0]]=H?T[1].call(this,H,T[2]):n:this[T[0]]=H?H.replace(T[1],T[2]):n:T.length===4&&(this[T[0]]=H?T[3].call(this,H.replace(T[1],T[2])):n):this[T]=H||n;v+=2}},Re=function(x,C){for(var v in C)if(typeof C[v]===E&&C[v].length>0){for(var k=0;k<C[v].length;k++)if(dt(C[v][k],x))return v===g?n:v}else if(dt(C[v],x))return v===g?n:v;return x},fo={"1.0":"/8",1.2:"/1",1.3:"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"},ut={ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2",8.1:"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"},pt={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[u,[l,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[u,[l,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[l,u],[/opios[\/ ]+([\w\.]+)/i],[u,[l,me+" Mini"]],[/\bop(?:rg)?x\/([\w\.]+)/i],[u,[l,me+" GX"]],[/\bopr\/([\w\.]+)/i],[u,[l,me]],[/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i],[u,[l,"Baidu"]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer)[\/ ]?([\w\.]*)/i,/(avant|iemobile|slim)\s?(?:browser)?[\/ ]?([\w\.]*)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|bolt|iron|vivaldi|iridium|phantomjs|bowser|quark|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|qq|duckduckgo)\/([-\w\.]+)/i,/(heytap|ovi)browser\/([\d\.]+)/i,/(weibo)__([\d\.]+)/i],[l,u],[/\bddg\/([\w\.]+)/i],[u,[l,"DuckDuckGo"]],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[u,[l,"UC"+J]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i,/micromessenger\/([\w\.]+)/i],[u,[l,"WeChat"]],[/konqueror\/([\w\.]+)/i],[u,[l,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[u,[l,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[u,[l,"Yandex"]],[/slbrowser\/([\w\.]+)/i],[u,[l,"Smart Lenovo "+J]],[/(avast|avg)\/([\w\.]+)/i],[[l,/(.+)/,"$1 Secure "+J],u],[/\bfocus\/([\w\.]+)/i],[u,[l,Ce+" Focus"]],[/\bopt\/([\w\.]+)/i],[u,[l,me+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[u,[l,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[u,[l,"Dolphin"]],[/coast\/([\w\.]+)/i],[u,[l,me+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[u,[l,"MIUI "+J]],[/fxios\/([-\w\.]+)/i],[u,[l,Ce]],[/\bqihu|(qi?ho?o?|360)browser/i],[[l,"360 "+J]],[/(oculus|sailfish|huawei|vivo)browser\/([\w\.]+)/i],[[l,/(.+)/,"$1 "+J],u],[/samsungbrowser\/([\w\.]+)/i],[u,[l,ke+" Internet"]],[/(comodo_dragon)\/([\w\.]+)/i],[[l,/_/g," "],u],[/metasr[\/ ]?([\d\.]+)/i],[u,[l,"Sogou Explorer"]],[/(sogou)mo\w+\/([\d\.]+)/i],[[l,"Sogou Mobile"],u],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|2345Explorer)[\/ ]?([\w\.]+)/i],[l,u],[/(lbbrowser)/i,/\[(linkedin)app\]/i],[l],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[l,st],u],[/(Klarna)\/([\w\.]+)/i,/(kakao(?:talk|story))[\/ ]([\w\.]+)/i,/(naver)\(.*?(\d+\.[\w\.]+).*\)/i,/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(alipay)client\/([\w\.]+)/i,/(twitter)(?:and| f.+e\/([\w\.]+))/i,/(chromium|instagram|snapchat)[\/ ]([-\w\.]+)/i],[l,u],[/\bgsa\/([\w\.]+) .*safari\//i],[u,[l,"GSA"]],[/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i],[u,[l,"TikTok"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[u,[l,Te+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[l,Te+" WebView"],u],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[u,[l,"Android "+J]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[l,u],[/version\/([\w\.\,]+) .*mobile\/\w+ (safari)/i],[u,[l,"Mobile Safari"]],[/version\/([\w(\.|\,)]+) .*(mobile ?safari|safari)/i],[u,l],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[l,[u,Re,fo]],[/(webkit|khtml)\/([\w\.]+)/i],[l,u],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[l,"Netscape"],u],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[u,[l,Ce+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror|klar)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|sleipnir|obigo|mosaic|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/(links) \(([\w\.]+)/i,/panasonic;(viera)/i],[l,u],[/(cobalt)\/([\w\.]+)/i],[l,[u,/master.|lts./,""]]],cpu:[[/(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\)]/i],[[_,"amd64"]],[/(ia32(?=;))/i],[[_,be]],[/((?:i[346]|x)86)[;\)]/i],[[_,"ia32"]],[/\b(aarch64|arm(v?8e?l?|_?64))\b/i],[[_,"arm64"]],[/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i],[[_,"armhf"]],[/windows (ce|mobile); ppc;/i],[[_,"arm"]],[/((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i],[[_,/ower/,m,be]],[/(sun4\w)[;\)]/i],[[_,"sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i],[[_,be]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[a,[s,ke],[i,h]],[/\b((?:s[cgp]h|gt|sm)-\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]([-\w]+)/i,/sec-(sgh\w+)/i],[a,[s,ke],[i,y]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i],[a,[s,pe],[i,y]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[a,[s,pe],[i,h]],[/(macintosh);/i],[a,[s,pe]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[a,[s,at],[i,y]],[/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],[a,[s,ot],[i,h]],[/(?:huawei|honor)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[a,[s,ot],[i,y]],[/\b(poco[\w ]+|m2\d{3}j\d\d[a-z]{2})(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/oid[^\)]+; (m?[12][0-389][01]\w{3,6}[c-y])( bui|; wv|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite)?)(?: bui|\))/i],[[a,/_/g," "],[s,He],[i,y]],[/oid[^\)]+; (2\d{4}(283|rpbf)[cgl])( bui|\))/i,/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i],[[a,/_/g," "],[s,He],[i,h]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[a,[s,"OPPO"],[i,y]],[/\b(opd2\d{3}a?) bui/i],[a,[s,"OPPO"],[i,h]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[a,[s,"Vivo"],[i,y]],[/\b(rmx[1-3]\d{3})(?: bui|;|\))/i],[a,[s,"Realme"],[i,y]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ](\w*)/i,/((?:moto[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i],[a,[s,it],[i,y]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[a,[s,it],[i,h]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[a,[s,ze],[i,h]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,/\blg-?([\d\w]+) bui/i],[a,[s,ze],[i,y]],[/(ideatab[-\w ]+)/i,/lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i],[a,[s,"Lenovo"],[i,h]],[/(?:maemo|nokia).*(n900|lumia \d+)/i,/nokia[-_ ]?([-\w\.]*)/i],[[a,/_/g," "],[s,"Nokia"],[i,y]],[/(pixel c)\b/i],[a,[s,Pe],[i,h]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[a,[s,Pe],[i,y]],[/droid.+ (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[a,[s,Oe],[i,y]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[a,"Xperia Tablet"],[s,Oe],[i,h]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[a,[s,"OnePlus"],[i,y]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo[c-r]{2})( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[a,[s,Se],[i,h]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[a,/(.+)/g,"Fire Phone $1"],[s,Se],[i,y]],[/(playbook);[-\w\),; ]+(rim)/i],[a,s,[i,h]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[a,[s,nt],[i,y]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[a,[s,tt],[i,h]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[a,[s,tt],[i,y]],[/(nexus 9)/i],[a,[s,"HTC"],[i,h]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[s,[a,/_/g," "],[i,y]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[a,[s,"Acer"],[i,h]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[a,[s,"Meizu"],[i,y]],[/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i],[a,[s,"Ulefone"],[i,y]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron|infinix|tecno)[-_ ]?([-\w]*)/i,/(hp) ([\w ]+\w)/i,/(asus)-?(\w+)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w]+)/i,/(jolla)/i,/(oppo) ?([\w ]+) bui/i],[s,a,[i,y]],[/(kobo)\s(ereader|touch)/i,/(archos) (gamepad2?)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i,/(nook)[\w ]+build\/(\w+)/i,/(dell) (strea[kpr\d ]*[\dko])/i,/(le[- ]+pan)[- ]+(\w{1,9}) bui/i,/(trinity)[- ]*(t\d{3}) bui/i,/(gigaset)[- ]+(q\w{1,9}) bui/i,/(vodafone) ([\w ]+)(?:\)| bui)/i],[s,a,[i,h]],[/(surface duo)/i],[a,[s,Ge],[i,h]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[a,[s,"Fairphone"],[i,y]],[/(u304aa)/i],[a,[s,"AT&T"],[i,y]],[/\bsie-(\w*)/i],[a,[s,"Siemens"],[i,y]],[/\b(rct\w+) b/i],[a,[s,"RCA"],[i,h]],[/\b(venue[\d ]{2,7}) b/i],[a,[s,"Dell"],[i,h]],[/\b(q(?:mv|ta)\w+) b/i],[a,[s,"Verizon"],[i,h]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[a,[s,"Barnes & Noble"],[i,h]],[/\b(tm\d{3}\w+) b/i],[a,[s,"NuVision"],[i,h]],[/\b(k88) b/i],[a,[s,"ZTE"],[i,h]],[/\b(nx\d{3}j) b/i],[a,[s,"ZTE"],[i,y]],[/\b(gen\d{3}) b.+49h/i],[a,[s,"Swiss"],[i,y]],[/\b(zur\d{3}) b/i],[a,[s,"Swiss"],[i,h]],[/\b((zeki)?tb.*\b) b/i],[a,[s,"Zeki"],[i,h]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[s,"Dragon Touch"],a,[i,h]],[/\b(ns-?\w{0,9}) b/i],[a,[s,"Insignia"],[i,h]],[/\b((nxa|next)-?\w{0,9}) b/i],[a,[s,"NextBook"],[i,h]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[s,"Voice"],a,[i,y]],[/\b(lvtel\-)?(v1[12]) b/i],[[s,"LvTel"],a,[i,y]],[/\b(ph-1) /i],[a,[s,"Essential"],[i,y]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[a,[s,"Envizen"],[i,h]],[/\b(trio[-\w\. ]+) b/i],[a,[s,"MachSpeed"],[i,h]],[/\btu_(1491) b/i],[a,[s,"Rotor"],[i,h]],[/(shield[\w ]+) b/i],[a,[s,"Nvidia"],[i,h]],[/(sprint) (\w+)/i],[s,a,[i,y]],[/(kin\.[onetw]{3})/i],[[a,/\./g," "],[s,Ge],[i,y]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[a,[s,Ke],[i,h]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[a,[s,Ke],[i,y]],[/smart-tv.+(samsung)/i],[s,[i,U]],[/hbbtv.+maple;(\d+)/i],[[a,/^/,"SmartTV"],[s,ke],[i,U]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[s,ze],[i,U]],[/(apple) ?tv/i],[s,[a,pe+" TV"],[i,U]],[/crkey/i],[[a,Te+"cast"],[s,Pe],[i,U]],[/droid.+aft(\w+)( bui|\))/i],[a,[s,Se],[i,U]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[a,[s,at],[i,U]],[/(bravia[\w ]+)( bui|\))/i],[a,[s,Oe],[i,U]],[/(mitv-\w{5}) bui/i],[a,[s,He],[i,U]],[/Hbbtv.*(technisat) (.*);/i],[s,a,[i,U]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[s,Ye],[a,Ye],[i,U]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[i,U]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[s,a,[i,ue]],[/droid.+; (shield) bui/i],[a,[s,"Nvidia"],[i,ue]],[/(playstation [345portablevi]+)/i],[a,[s,Oe],[i,ue]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[a,[s,Ge],[i,ue]],[/((pebble))app/i],[s,a,[i,te]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[a,[s,pe],[i,te]],[/droid.+; (glass) \d/i],[a,[s,Pe],[i,te]],[/droid.+; (wt63?0{2,3})\)/i],[a,[s,Ke],[i,te]],[/(quest( \d| pro)?)/i],[a,[s,st],[i,te]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[s,[i,je]],[/(aeobc)\b/i],[a,[s,Se],[i,je]],[/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew).+? mobile safari/i],[a,[i,y]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[a,[i,h]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[i,h]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[i,y]],[/(android[-\w\. ]{0,9});.+buil/i],[a,[s,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[u,[l,po+"HTML"]],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[u,[l,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i,/\b(libweb)/i],[l,u],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[u,l]],os:[[/microsoft (windows) (vista|xp)/i],[l,u],[/(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i],[l,[u,Re,ut]],[/windows nt 6\.2; (arm)/i,/windows[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i,/(?:win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[u,Re,ut],[l,"Windows"]],[/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i,/(?:ios;fbsv\/|iphone.+ios[\/ ])([\d\.]+)/i,/cfnetwork\/.+darwin/i],[[u,/_/g,"."],[l,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[l,ct],[u,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i],[u,l],[/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish)[-\/ ]?([\w\.]*)/i,/(blackberry)\w*\/([\w\.]*)/i,/(tizen|kaios)[\/ ]([\w\.]+)/i,/\((series40);/i],[l,u],[/\(bb(10);/i],[u,[l,nt]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i],[u,[l,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[u,[l,Ce+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[u,[l,"webOS"]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[u,[l,"watchOS"]],[/crkey\/([\d\.]+)/i],[u,[l,Te+"cast"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[l,lt],u],[/panasonic;(viera)/i,/(netrange)mmh/i,/(nettv)\/(\d+\.[\w\.]+)/i,/(nintendo|playstation) ([wids345portablevuch]+)/i,/(xbox); +xbox ([^\);]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/(mint)[\/\(\) ]?(\w*)/i,/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/(hurd|linux) ?([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) (\w+)/i],[l,u],[/(sunos) ?([\w\.\d]*)/i],[[l,"Solaris"],u],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[l,u]]},j=function(x,C){if(typeof x===E&&(C=x,x=n),!(this instanceof j))return new j(x,C).getResult();var v=typeof r!==B&&r.navigator?r.navigator:n,k=x||(v&&v.userAgent?v.userAgent:m),Y=v&&v.userAgentData?v.userAgentData:n,G=C?mo(pt,C):pt,T=v&&v.userAgent==k;return this.getBrowser=function(){var f={};return f[l]=n,f[u]=n,fe.call(f,k,G.browser),f[W]=bo(f[u]),T&&v&&v.brave&&typeof v.brave.isBrave==S&&(f[l]="Brave"),f},this.getCPU=function(){var f={};return f[_]=n,fe.call(f,k,G.cpu),f},this.getDevice=function(){var f={};return f[s]=n,f[a]=n,f[i]=n,fe.call(f,k,G.device),T&&!f[i]&&Y&&Y.mobile&&(f[i]=y),T&&f[a]=="Macintosh"&&v&&typeof v.standalone!==B&&v.maxTouchPoints&&v.maxTouchPoints>2&&(f[a]="iPad",f[i]=h),f},this.getEngine=function(){var f={};return f[l]=n,f[u]=n,fe.call(f,k,G.engine),f},this.getOS=function(){var f={};return f[l]=n,f[u]=n,fe.call(f,k,G.os),T&&!f[l]&&Y&&Y.platform&&Y.platform!="Unknown"&&(f[l]=Y.platform.replace(/chrome os/i,lt).replace(/macos/i,ct)),f},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return k},this.setUA=function(f){return k=typeof f===F&&f.length>qe?Ye(f,qe):f,this},this.setUA(k),this};j.VERSION=o,j.BROWSER=Ee([l,u,W]),j.CPU=Ee([_]),j.DEVICE=Ee([a,s,i,ue,y,U,h,te,je]),j.ENGINE=j.OS=Ee([l,u]),t.exports&&(e=t.exports=j),e.UAParser=j;var ne=typeof r!==B&&(r.jQuery||r.Zepto);if(ne&&!ne.ua){var Ae=new j;ne.ua=Ae.getResult(),ne.ua.get=function(){return Ae.getUA()},ne.ua.set=function(x){Ae.setUA(x);var C=Ae.getResult();for(var v in C)ne.ua[v]=C[v]}}})(typeof window=="object"?window:Tt)})(Be,Be.exports);var Ct=Be.exports;Object.defineProperty(p,"__esModule",{value:!0});function Pt(t){return t&&typeof t=="object"&&"default"in t?t.default:t}var M=O,P=Pt(M),Je=Ct,R=new Je,I=R.getBrowser(),kt=R.getCPU(),D=R.getDevice(),We=R.getEngine(),X=R.getOS(),le=R.getUA(),$e=function(e){return R.setUA(e)},ce=function(e){if(!e){console.error("No userAgent string was provided");return}var r=new Je(e);return{UA:r,browser:r.getBrowser(),cpu:r.getCPU(),device:r.getDevice(),engine:r.getEngine(),os:r.getOS(),ua:r.getUA(),setUserAgent:function(o){return r.setUA(o)}}},er=Object.freeze({ClientUAInstance:R,browser:I,cpu:kt,device:D,engine:We,os:X,ua:le,setUa:$e,parseUserAgent:ce});function rr(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(t,o).enumerable})),r.push.apply(r,n)}return r}function Ot(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?rr(Object(r),!0).forEach(function(n){Mt(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):rr(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function de(t){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?de=function(e){return typeof e}:de=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},de(t)}function Et(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function At(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function Ft(t,e,r){return e&&At(t.prototype,e),t}function Mt(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Ne(){return Ne=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Ne.apply(this,arguments)}function It(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&De(t,e)}function _e(t){return _e=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},_e(t)}function De(t,e){return De=Object.setPrototypeOf||function(n,o){return n.__proto__=o,n},De(t,e)}function Vt(t,e){if(t==null)return{};var r={},n=Object.keys(t),o,m;for(m=0;m<n.length;m++)o=n[m],!(e.indexOf(o)>=0)&&(r[o]=t[o]);return r}function L(t,e){if(t==null)return{};var r=Vt(t,e),n,o;if(Object.getOwnPropertySymbols){var m=Object.getOwnPropertySymbols(t);for(o=0;o<m.length;o++)n=m[o],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function ve(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Bt(t,e){if(e&&(typeof e=="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return ve(t)}function Wt(t,e){return Nt(t)||_t(t,e)||Dt(t,e)||Ut()}function Nt(t){if(Array.isArray(t))return t}function _t(t,e){var r=t==null?null:typeof Symbol!="undefined"&&t[Symbol.iterator]||t["@@iterator"];if(r!=null){var n=[],o=!0,m=!1,g,S;try{for(r=r.call(t);!(o=(g=r.next()).done)&&(n.push(g.value),!(e&&n.length===e));o=!0);}catch(B){m=!0,S=B}finally{try{!o&&r.return!=null&&r.return()}finally{if(m)throw S}}return n}}function Dt(t,e){if(t){if(typeof t=="string")return tr(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return tr(t,e)}}function tr(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function Ut(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
11
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var V={Mobile:"mobile",Tablet:"tablet",SmartTv:"smarttv",Console:"console",Wearable:"wearable",Embedded:"embedded",Browser:void 0},N={Chrome:"Chrome",Firefox:"Firefox",Opera:"Opera",Yandex:"Yandex",Safari:"Safari",InternetExplorer:"Internet Explorer",Edge:"Edge",Chromium:"Chromium",Ie:"IE",MobileSafari:"Mobile Safari",EdgeChromium:"Edge Chromium",MIUI:"MIUI Browser",SamsungBrowser:"Samsung Browser"},ee={IOS:"iOS",Android:"Android",WindowsPhone:"Windows Phone",Windows:"Windows",MAC_OS:"Mac OS"},Lt={isMobile:!1,isTablet:!1,isBrowser:!1,isSmartTV:!1,isConsole:!1,isWearable:!1},jt=function(e){switch(e){case V.Mobile:return{isMobile:!0};case V.Tablet:return{isTablet:!0};case V.SmartTv:return{isSmartTV:!0};case V.Console:return{isConsole:!0};case V.Wearable:return{isWearable:!0};case V.Browser:return{isBrowser:!0};case V.Embedded:return{isEmbedded:!0};default:return Lt}},qt=function(e){return $e(e)},b=function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"none";return e||r},Ue=function(){return typeof window!="undefined"&&(window.navigator||navigator)?window.navigator||navigator:!1},Le=function(e){var r=Ue();return r&&r.platform&&(r.platform.indexOf(e)!==-1||r.platform==="MacIntel"&&r.maxTouchPoints>1&&!window.MSStream)},zt=function(e,r,n,o,m){return{isBrowser:e,browserMajorVersion:b(r.major),browserFullVersion:b(r.version),browserName:b(r.name),engineName:b(n.name),engineVersion:b(n.version),osName:b(o.name),osVersion:b(o.version),userAgent:b(m)}},nr=function(e,r,n,o){return Ot({},e,{vendor:b(r.vendor),model:b(r.model),os:b(n.name),osVersion:b(n.version),ua:b(o)})},Gt=function(e,r,n,o){return{isSmartTV:e,engineName:b(r.name),engineVersion:b(r.version),osName:b(n.name),osVersion:b(n.version),userAgent:b(o)}},Ht=function(e,r,n,o){return{isConsole:e,engineName:b(r.name),engineVersion:b(r.version),osName:b(n.name),osVersion:b(n.version),userAgent:b(o)}},Kt=function(e,r,n,o){return{isWearable:e,engineName:b(r.name),engineVersion:b(r.version),osName:b(n.name),osVersion:b(n.version),userAgent:b(o)}},Yt=function(e,r,n,o,m){return{isEmbedded:e,vendor:b(r.vendor),model:b(r.model),engineName:b(n.name),engineVersion:b(n.version),osName:b(o.name),osVersion:b(o.version),userAgent:b(m)}};function Rt(t){var e=t?ce(t):er,r=e.device,n=e.browser,o=e.engine,m=e.os,g=e.ua,S=jt(r.type),B=S.isBrowser,E=S.isMobile,F=S.isTablet,W=S.isSmartTV,a=S.isConsole,l=S.isWearable,i=S.isEmbedded;if(B)return zt(B,n,o,m,g);if(W)return Gt(W,o,m,g);if(a)return Ht(a,o,m,g);if(E||F)return nr(S,r,m,g);if(l)return Kt(l,o,m,g);if(i)return Yt(i,r,o,m,g)}var or=function(e){var r=e.type;return r===V.Mobile},ir=function(e){var r=e.type;return r===V.Tablet},ar=function(e){var r=e.type;return r===V.Mobile||r===V.Tablet},sr=function(e){var r=e.type;return r===V.SmartTv},ge=function(e){var r=e.type;return r===V.Browser},lr=function(e){var r=e.type;return r===V.Wearable},cr=function(e){var r=e.type;return r===V.Console},dr=function(e){var r=e.type;return r===V.Embedded},ur=function(e){var r=e.vendor;return b(r)},pr=function(e){var r=e.model;return b(r)},mr=function(e){var r=e.type;return b(r,"browser")},br=function(e){var r=e.name;return r===ee.Android},fr=function(e){var r=e.name;return r===ee.Windows},wr=function(e){var r=e.name;return r===ee.MAC_OS},vr=function(e){var r=e.name;return r===ee.WindowsPhone},gr=function(e){var r=e.name;return r===ee.IOS},hr=function(e){var r=e.version;return b(r)},yr=function(e){var r=e.name;return b(r)},xr=function(e){var r=e.name;return r===N.Chrome},Sr=function(e){var r=e.name;return r===N.Firefox},Tr=function(e){var r=e.name;return r===N.Chromium},he=function(e){var r=e.name;return r===N.Edge},Cr=function(e){var r=e.name;return r===N.Yandex},Pr=function(e){var r=e.name;return r===N.Safari||r===N.MobileSafari},kr=function(e){var r=e.name;return r===N.MobileSafari},Or=function(e){var r=e.name;return r===N.Opera},Er=function(e){var r=e.name;return r===N.InternetExplorer||r===N.Ie},Ar=function(e){var r=e.name;return r===N.MIUI},Fr=function(e){var r=e.name;return r===N.SamsungBrowser},Mr=function(e){var r=e.version;return b(r)},Ir=function(e){var r=e.major;return b(r)},Vr=function(e){var r=e.name;return b(r)},Br=function(e){var r=e.name;return b(r)},Wr=function(e){var r=e.version;return b(r)},Nr=function(){var e=Ue(),r=e&&e.userAgent&&e.userAgent.toLowerCase();return typeof r=="string"?/electron/.test(r):!1},re=function(e){return typeof e=="string"&&e.indexOf("Edg/")!==-1},_r=function(){var e=Ue();return e&&(/iPad|iPhone|iPod/.test(e.platform)||e.platform==="MacIntel"&&e.maxTouchPoints>1)&&!window.MSStream},z=function(){return Le("iPad")},Dr=function(){return Le("iPhone")},Ur=function(){return Le("iPod")},Lr=function(e){return b(e)};function jr(t){var e=t||er,r=e.device,n=e.browser,o=e.os,m=e.engine,g=e.ua;return{isSmartTV:sr(r),isConsole:cr(r),isWearable:lr(r),isEmbedded:dr(r),isMobileSafari:kr(n)||z(),isChromium:Tr(n),isMobile:ar(r)||z(),isMobileOnly:or(r),isTablet:ir(r)||z(),isBrowser:ge(r),isDesktop:ge(r),isAndroid:br(o),isWinPhone:vr(o),isIOS:gr(o)||z(),isChrome:xr(n),isFirefox:Sr(n),isSafari:Pr(n),isOpera:Or(n),isIE:Er(n),osVersion:hr(o),osName:yr(o),fullBrowserVersion:Mr(n),browserVersion:Ir(n),browserName:Vr(n),mobileVendor:ur(r),mobileModel:pr(r),engineName:Br(m),engineVersion:Wr(m),getUA:Lr(g),isEdge:he(n)||re(g),isYandex:Cr(n),deviceType:mr(r),isIOS13:_r(),isIPad13:z(),isIPhone13:Dr(),isIPod13:Ur(),isElectron:Nr(),isEdgeChromium:re(g),isLegacyEdge:he(n)&&!re(g),isWindows:fr(o),isMacOs:wr(o),isMIUI:Ar(n),isSamsungBrowser:Fr(n)}}var qr=sr(D),zr=cr(D),Gr=lr(D),Xt=dr(D),Zt=kr(I)||z(),Qt=Tr(I),ye=ar(D)||z(),Hr=or(D),Kr=ir(D)||z(),Yr=ge(D),Jt=ge(D),Rr=br(X),Xr=vr(X),Zr=gr(X)||z(),$t=xr(I),en=Sr(I),rn=Pr(I),tn=Or(I),Qr=Er(I),nn=hr(X),on=yr(X),an=Mr(I),sn=Ir(I),ln=Vr(I),cn=ur(D),dn=pr(D),un=Br(We),pn=Wr(We),mn=Lr(le),bn=he(I)||re(le),fn=Cr(I),wn=mr(D),vn=_r(),gn=z(),hn=Dr(),yn=Ur(),xn=Nr(),Sn=re(le),Tn=he(I)&&!re(le),Cn=fr(X),Pn=wr(X),kn=Ar(I),On=Fr(I),En=function(e){if(!e||typeof e!="string"){console.error("No valid user agent string was provided");return}var r=ce(e),n=r.device,o=r.browser,m=r.os,g=r.engine,S=r.ua;return jr({device:n,browser:o,os:m,engine:g,ua:S})},An=function(e){var r=e.renderWithFragment,n=e.children,o=L(e,["renderWithFragment","children"]);return Rr?r?P.createElement(M.Fragment,null,n):P.createElement("div",o,n):null},Fn=function(e){var r=e.renderWithFragment,n=e.children,o=L(e,["renderWithFragment","children"]);return Yr?r?P.createElement(M.Fragment,null,n):P.createElement("div",o,n):null},Mn=function(e){var r=e.renderWithFragment,n=e.children,o=L(e,["renderWithFragment","children"]);return Qr?r?P.createElement(M.Fragment,null,n):P.createElement("div",o,n):null},In=function(e){var r=e.renderWithFragment,n=e.children,o=L(e,["renderWithFragment","children"]);return Zr?r?P.createElement(M.Fragment,null,n):P.createElement("div",o,n):null},Vn=function(e){var r=e.renderWithFragment,n=e.children,o=L(e,["renderWithFragment","children"]);return ye?r?P.createElement(M.Fragment,null,n):P.createElement("div",o,n):null},Bn=function(e){var r=e.renderWithFragment,n=e.children,o=L(e,["renderWithFragment","children"]);return Kr?r?P.createElement(M.Fragment,null,n):P.createElement("div",o,n):null},Wn=function(e){var r=e.renderWithFragment,n=e.children,o=L(e,["renderWithFragment","children"]);return Xr?r?P.createElement(M.Fragment,null,n):P.createElement("div",o,n):null},Nn=function(e){var r=e.renderWithFragment,n=e.children;e.viewClassName,e.style;var o=L(e,["renderWithFragment","children","viewClassName","style"]);return Hr?r?P.createElement(M.Fragment,null,n):P.createElement("div",o,n):null},_n=function(e){var r=e.renderWithFragment,n=e.children,o=L(e,["renderWithFragment","children"]);return qr?r?P.createElement(M.Fragment,null,n):P.createElement("div",o,n):null},Dn=function(e){var r=e.renderWithFragment,n=e.children,o=L(e,["renderWithFragment","children"]);return zr?r?P.createElement(M.Fragment,null,n):P.createElement("div",o,n):null},Un=function(e){var r=e.renderWithFragment,n=e.children,o=L(e,["renderWithFragment","children"]);return Gr?r?P.createElement(M.Fragment,null,n):P.createElement("div",o,n):null},Ln=function(e){var r=e.renderWithFragment,n=e.children;e.viewClassName,e.style;var o=e.condition,m=L(e,["renderWithFragment","children","viewClassName","style","condition"]);return o?r?P.createElement(M.Fragment,null,n):P.createElement("div",m,n):null};function jn(t){return function(e){It(r,e);function r(n){var o;return Et(this,r),o=Bt(this,_e(r).call(this,n)),o.isEventListenerAdded=!1,o.handleOrientationChange=o.handleOrientationChange.bind(ve(o)),o.onOrientationChange=o.onOrientationChange.bind(ve(o)),o.onPageLoad=o.onPageLoad.bind(ve(o)),o.state={isLandscape:!1,isPortrait:!1},o}return Ft(r,[{key:"handleOrientationChange",value:function(){this.isEventListenerAdded||(this.isEventListenerAdded=!0);var o=window.innerWidth>window.innerHeight?90:0;this.setState({isPortrait:o===0,isLandscape:o===90})}},{key:"onOrientationChange",value:function(){this.handleOrientationChange()}},{key:"onPageLoad",value:function(){this.handleOrientationChange()}},{key:"componentDidMount",value:function(){(typeof window=="undefined"?"undefined":de(window))!==void 0&&ye&&(this.isEventListenerAdded?window.removeEventListener("load",this.onPageLoad,!1):(this.handleOrientationChange(),window.addEventListener("load",this.onPageLoad,!1)),window.addEventListener("resize",this.onOrientationChange,!1))}},{key:"componentWillUnmount",value:function(){window.removeEventListener("resize",this.onOrientationChange,!1)}},{key:"render",value:function(){return P.createElement(t,Ne({},this.props,{isLandscape:this.state.isLandscape,isPortrait:this.state.isPortrait}))}}]),r}(P.Component)}function qn(){var t=M.useState(function(){var m=window.innerWidth>window.innerHeight?90:0;return{isPortrait:m===0,isLandscape:m===90,orientation:m===0?"portrait":"landscape"}}),e=Wt(t,2),r=e[0],n=e[1],o=M.useCallback(function(){var m=window.innerWidth>window.innerHeight?90:0,g={isPortrait:m===0,isLandscape:m===90,orientation:m===0?"portrait":"landscape"};r.orientation!==g.orientation&&n(g)},[r.orientation]);return M.useEffect(function(){return(typeof window=="undefined"?"undefined":de(window))!==void 0&&ye&&(o(),window.addEventListener("load",o,!1),window.addEventListener("resize",o,!1)),function(){window.removeEventListener("resize",o,!1),window.removeEventListener("load",o,!1)}},[o]),r}function Jr(t){var e=t||window.navigator.userAgent;return ce(e)}function zn(t){var e=t||window.navigator.userAgent,r=Jr(e),n=jr(r);return[n,r]}p.AndroidView=An,p.BrowserTypes=N,p.BrowserView=Fn,p.ConsoleView=Dn,p.CustomView=Ln,p.IEView=Mn,p.IOSView=In,p.MobileOnlyView=Nn,p.MobileView=Vn,p.OsTypes=ee,p.SmartTVView=_n,p.TabletView=Bn,p.WearableView=Un,p.WinPhoneView=Wn,p.browserName=ln,p.browserVersion=sn,p.deviceDetect=Rt,p.deviceType=wn,p.engineName=un,p.engineVersion=pn,p.fullBrowserVersion=an,p.getSelectorsByUserAgent=En,p.getUA=mn,p.isAndroid=Rr,p.isBrowser=Yr,p.isChrome=$t,p.isChromium=Qt,p.isConsole=zr;var Gn=p.isDesktop=Jt;p.isEdge=bn,p.isEdgeChromium=Sn,p.isElectron=xn,p.isEmbedded=Xt,p.isFirefox=en,p.isIE=Qr,p.isIOS=Zr,p.isIOS13=vn,p.isIPad13=gn,p.isIPhone13=hn,p.isIPod13=yn,p.isLegacyEdge=Tn,p.isMIUI=kn,p.isMacOs=Pn,p.isMobile=ye,p.isMobileOnly=Hr,p.isMobileSafari=Zt,p.isOpera=tn,p.isSafari=rn,p.isSamsungBrowser=On,p.isSmartTV=qr,p.isTablet=Kr,p.isWearable=Gr,p.isWinPhone=Xr,p.isWindows=Cn,p.isYandex=fn,p.mobileModel=dn,p.mobileVendor=cn,p.osName=on,p.osVersion=nn,p.parseUserAgent=ce,p.setUserAgent=qt,p.useDeviceData=Jr,p.useDeviceSelectors=zn,p.useMobileOrientation=qn,p.withOrientationChange=jn;const Hn=()=>{const{t}=we();return d.jsx(c.BlockItemCard,{style:{boxShadow:"unset"},children:d.jsx(A.Result,{status:"403",subTitle:t("The form is not enabled and cannot be accessed",{ns:q})})})},Kn=()=>(we(),d.jsx(c.BlockItemCard,{style:{boxShadow:"unset"},children:d.jsx(A.Result,{status:"404"})}));class Yn extends c.DataSource{getDataSource(){return Z(this,null,function*(){return{}})}}function Rn(t){const{dataSource:e}=t,r=c.useApp(),[n,o]=O.useMemo(()=>{const m=new c.DataSourceManager({},r),g=m.addDataSource(Yn,e),S=new c.CollectionManager([],g);return[m,S]},[r,e]);return d.jsx("div",{children:d.jsx(c.DataSourceApplicationProvider,{dataSource:e.key,dataSourceManager:n,instance:o,children:t.children})})}function Xn({children:t}){const e=c.useApp(),r=O.useMemo(()=>{const n=new c.APIClient(e.getOptions().apiClient);return n.app=e,n.axios.interceptors.request.use(o=>(o.headers&&(o.headers["X-Form-Token"]=localStorage.getItem("NOCOBASE_FORM_TOKEN")||""),o)),n},[e]);return d.jsx(c.APIClientProvider,{apiClient:r,children:t})}const $r=O.createContext({}),et="#f5f5f5",Zn=({children:t})=>{const[e,r]=O.useState(!1),n=$.useField(),o=(m,g)=>{n.form.query(m).take(S=>{S&&(S.visible=g,S.hidden=!g)})};return O.useEffect(()=>{o("success",e),o("form",!e),e||n.form.query("promptMessage").take(m=>{m&&(m.visible=!1,m.hidden=!0)})},[e]),d.jsx($r.Provider,{value:{showMessage:e,setShowMessage:r},children:t})};function Qn(){var E,F,W,a,l;const t=ae.useParams(),e=c.useAPIClient(),{error:r,data:n,loading:o,run:m}=c.useRequest({url:`publicForms:getMeta/${t.name}`},{onSuccess(i){var s;localStorage.setItem("NOCOBASE_FORM_TOKEN",(s=i==null?void 0:i.data)==null?void 0:s.token),e.axios.interceptors.request.use(u=>{var _;return u.headers&&(u.headers["X-Form-Token"]=((_=i==null?void 0:i.data)==null?void 0:_.token)||""),u})}}),[g,S]=O.useState(""),B=O.useContext(c.SchemaComponentContext);return O.useEffect(()=>{if(!Gn){let i=document.querySelector('meta[name="viewport"]');i||(i=document.createElement("meta"),i.setAttribute("name","viewport"),document.head.appendChild(i)),i.setAttribute("content","width=device-width,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no"),document.body.style.backgroundColor=et,document.body.style.overflow="hidden";const s=document.createElement("div");document.body.appendChild(s),document.body.removeChild(s)}},[]),((E=r==null?void 0:r.response)==null?void 0:E.status)===401||(F=n==null?void 0:n.data)!=null&&F.passwordRequired?d.jsx("div",{children:d.jsx(A.Modal,{centered:!0,title:"Password",open:!0,cancelButtonProps:{hidden:!0},onOk:()=>{m({password:g})},children:d.jsx(A.Input.Password,{onChange:i=>{S(i.target.value)}})})}):((W=r==null?void 0:r.response)==null?void 0:W.status)===500?d.jsx(Kn,{}):o?d.jsx(A.Spin,{}):n!=null&&n.data?d.jsx(c.ACLCustomContext.Provider,{value:{allowAll:!0},children:d.jsx(Xn,{children:d.jsx("div",{style:{minHeight:"100vh",background:et,height:"100%",overflow:"auto"},children:d.jsxs("div",{style:{maxWidth:800,margin:"0 auto"},className:gt.css`
12
+ @media (min-width: 1025px) {
13
+ padding-top: 10vh;
14
+ }
15
+ padding-top: 0px;
16
+ `,children:[d.jsx(Rn,{dataSource:(a=n==null?void 0:n.data)==null?void 0:a.dataSource,children:d.jsx(c.VariablesProvider,{children:d.jsx(c.SchemaComponentContext.Provider,{value:Me(oe({},B),{designable:!1}),children:d.jsx(c.SchemaComponent,{schema:(l=n==null?void 0:n.data)==null?void 0:l.schema,scope:{useCreateActionProps:rt},components:{PublicFormMessageProvider:Zn}})})})}),d.jsx("div",{style:{marginBottom:"20px"},children:d.jsx(c.PoweredBy,{})})]})})})}):d.jsx(Hn,{})}function Jn(){return d.jsx(Qn,{})}const rt=()=>{const t=$.useForm(),e=c.useDataBlockResource(),r=$.useField(),n=c.useCollectValuesToSubmit(),o=$.useFieldSchema(),{updateAssociationValues:m}=c.useFormBlockContext(),{setShowMessage:g}=O.useContext($r);return{type:"primary",onClick(){return Z(this,null,function*(){var W;const{skipValidator:B,triggerWorkflows:E}=(W=o==null?void 0:o["x-action-settings"])!=null?W:{};B||(yield t.submit());const F=yield n();r.data=r.data||{},r.data.loading=!0;try{yield t.submit(),yield e.publicSubmit({values:F,triggerWorkflows:E!=null&&E.length?E.map(a=>[a.workflowKey,a.context].filter(Boolean).join("!")).join(","):void 0,updateAssociationValues:m}),yield t.reset(),r.data.loading=!1,g(!0)}catch(a){r.data.loading=!1}})}}},$n=(t,e,r)=>({type:"void",name:Ie.uid(),"x-decorator":"PublicFormMessageProvider",properties:{form:e,promptMessage:{type:"void","x-component":"h3","x-component-props":{style:{margin:"10px 0px 10px"},children:'{{ t("Prompt after successful submission",{ns:"public-forms"})}}'}},success:{type:"void","x-editable":!1,"x-toolbar-props":{draggable:!1},"x-settings":"blockSettings:publicMarkdown","x-component":"Markdown.Void","x-decorator":"CardItem","x-component-props":{content:r(`# Submitted successfully!
17
+ This is a demo text, **supports Markdown syntax**.`)},"x-decorator-props":{name:"markdown",engine:"handlebars"}}}}),eo=()=>{const{setVisible:t}=c.useActionContext(),{message:e}=A.App.useApp(),r=$.useForm(),n=c.useDataBlockResource(),o=c.useCollection(),m=c.useAPIClient(),g=c.usePlugin(xe),{service:S}=c.useBlockRequestContext();return{type:"primary",onClick(){return Z(this,null,function*(){yield r.submit();const E=r.values;if(E[o.filterTargetKey])yield n.update({values:E,filterByTk:E[o.filterTargetKey]});else{const F=Ie.uid(),W=g.getFormSchemaByType(E.type),a=E.collection.split(":"),l=a.pop(),i=a.pop()||"main",s=$n(E,W({collection:l,dataSource:i}),g.t.bind(g));s["x-uid"]=F,yield n.create({values:Me(oe({},E),{key:F})}),yield m.resource("uiSchemas").insert({values:s})}r.reset(),yield S.refresh(),e.success("Saved successfully!"),t(!1)})}}};function ro(){const t=c.useFilterByTk(),e=yt();return d.jsx(Q.Link,{to:`/admin/settings/public-forms/${t}`,children:e("Configure")})}const to={type:"void","x-component":"Action",title:`{{t("Add New", { ns: "${q}" })}}`,"x-align":"right","x-component-props":{type:"primary",icon:"PlusOutlined"},properties:{drawer:{type:"void","x-component":"Action.Drawer",title:"{{t('Add New')}}","x-decorator":"Form",properties:{form:{type:"void",properties:{title:{type:"string","x-decorator":"FormItem","x-component":"CollectionField"},collection:{type:"string","x-decorator":"FormItem","x-component":"CollectionField"},type:{type:"string","x-decorator":"FormItem",title:'{{t("Type",{ns:"public-forms"})}}',"x-component":"CollectionField",default:"form",enum:"{{ formTypes }}"},description:{type:"string","x-decorator":"FormItem","x-component":"CollectionField"},password:{type:"string","x-decorator":"FormItem","x-component":"CollectionField"},enabled:{type:"string","x-decorator":"FormItem","x-component":"CollectionField",default:!0}}},footer:{type:"void","x-component":"Action.Drawer.Footer",properties:{submit:{title:"Submit","x-component":"Action","x-use-component-props":"useSubmitActionProps"}}}}}}},no={type:"void",title:"Edit","x-component":"Action.Link","x-component-props":{openMode:"drawer",icon:"EditOutlined"},properties:{drawer:{type:"void",title:"Edit","x-component":"Action.Drawer","x-decorator":"FormV2","x-use-decorator-props":"useEditFormProps",properties:{form:{type:"void",properties:{title:{type:"string","x-decorator":"FormItem","x-component":"CollectionField"},collection:{type:"string","x-decorator":"FormItem","x-component":"CollectionField","x-component-props":{disabled:!0}},type:{type:"string","x-decorator":"FormItem",title:'{{t("Type",{ns:"public-forms"})}}',"x-component":"Radio.Group",default:"form",enum:"{{ formTypes }}"},description:{type:"string","x-decorator":"FormItem","x-component":"CollectionField"},password:{type:"string","x-decorator":"FormItem","x-component":"CollectionField"},enabled:{type:"string","x-decorator":"FormItem","x-component":"CollectionField",default:!0}}},footer:{type:"void","x-component":"Action.Drawer.Footer",properties:{submit:{title:"Submit","x-component":"Action","x-use-component-props":"useSubmitActionProps"}}}}}}},oo={type:"void",name:Ie.uid(),"x-component":"CardItem","x-decorator":"TableBlockProvider","x-decorator-props":{collection:Ve.name,action:"list",params:{sort:"-createdAt",appends:["createdBy","updatedBy"]},showIndex:!0,dragSort:!1,rowKey:"key"},properties:{actions:{type:"void","x-component":"ActionBar","x-component-props":{style:{marginBottom:20}},properties:{filter:{type:"void",title:'{{ t("Filter") }}',default:{$and:[{title:{$includes:""}}]},"x-action":"filter","x-component":"Filter.Action","x-use-component-props":"useFilterActionProps","x-component-props":{icon:"FilterOutlined"},"x-align":"left"},refresh:{type:"void",title:'{{ t("Refresh") }}',"x-component":"Action","x-use-component-props":"useRefreshActionProps","x-component-props":{icon:"ReloadOutlined"}},destroy:{title:'{{ t("Delete") }}',"x-action":"destroy","x-component":"Action","x-use-component-props":"useBulkDestroyActionProps","x-component-props":{icon:"DeleteOutlined",confirm:{title:"{{t('Delete record')}}",content:"{{t('Are you sure you want to delete it?')}}"}}},createActionSchema:to}},table:{type:"array","x-component":"TableV2","x-use-component-props":"useTableBlockProps","x-component-props":{rowKey:Ve.filterTargetKey,rowSelection:{type:"checkbox"}},properties:{title:{type:"void",title:'{{ t("Title") }}',"x-component":"TableV2.Column","x-component-props":{width:170},properties:{title:{type:"string","x-component":"CollectionField","x-pattern":"readPretty"}}},collection:{type:"void",title:'{{ t("Collection") }}',"x-component":"TableV2.Column","x-component-props":{width:160},properties:{collection:{type:"string","x-component":"CollectionField","x-pattern":"readPretty"}}},column2:{type:"void",title:`{{t("Type", { ns: "${q}" })}}`,"x-component":"TableV2.Column","x-component-props":{width:100},properties:{type:{type:"string","x-component":"Radio.Group","x-pattern":"readPretty",enum:"{{ formTypes }}"}}},column3:{type:"void",title:'{{ t("Enabled") }}',"x-component":"TableV2.Column","x-component-props":{width:80},properties:{enabled:{type:"string","x-component":"CollectionField","x-pattern":"readPretty"}}},description:{type:"void",title:'{{ t("Description") }}',"x-component":"TableV2.Column",properties:{description:{type:"string","x-component":"CollectionField","x-pattern":"readPretty"}}},actions:{type:"void",title:'{{ t("Actions") }}',"x-component":"TableV2.Column",properties:{actions:{type:"void","x-component":"Space","x-component-props":{split:"|"},properties:{configure:{type:"void",title:"Configure","x-component":ro},editActionSchema:no,delete:{type:"void",title:"Delete","x-component":"Action.Link","x-use-component-props":"useDeleteActionProps"}}}}}}}}},io=()=>{const t=c.usePlugin(xe),e=c.useSchemaComponentContext(),r=O.useMemo(()=>t.getFormTypeOptions(),[t]);return d.jsx(c.ExtendCollectionsProvider,{collections:[Ve],children:d.jsx(c.SchemaComponentContext.Provider,{value:Me(oe({},e),{designable:!1}),children:d.jsx(c.SchemaComponent,{schema:oo,scope:{formTypes:r,useSubmitActionProps:eo,useEditFormProps:St,useDeleteActionProps:xt}})})})},ao=()=>{const t=ae.useParams(),[e,r]=O.useState(!1),n=window.location.origin,{t:o}=we(),m=`${n}/public-forms/${t.name}`,g=S=>{r(S)};return d.jsx(A.Popover,{trigger:"hover",open:e,onOpenChange:g,content:e?d.jsx(A.QRCode,{value:m,bordered:!1}):" ",children:o("QR code",{ns:q})})};function so(){const t=ae.useParams(),{t:e}=we(),{theme:r}=c.useGlobalTheme(),n=c.useAPIClient(),{data:o,loading:m,refresh:g}=c.useRequest({url:`publicForms:get/${t.name}`}),l=(o==null?void 0:o.data)||{},{enabled:S,title:B}=l,E=wt(l,["enabled","title"]);if(m)return d.jsx(A.Spin,{});const F=i=>Z(this,null,function*(){yield n.resource("publicForms").update({filterByTk:t.name,values:oe({},i)}),yield g()}),W=()=>Z(this,null,function*(){const i=yield c.FormDialog(e("Password"),()=>d.jsx(c.SchemaComponentOptions,{components:{Checkbox:c.Checkbox,Input:A.Input,FormItem:c.FormItem},children:d.jsx(K.FormLayout,{layout:"vertical",children:d.jsx(c.SchemaComponent,{schema:{properties:{password:{type:"string","x-decorator":"FormItem","x-component":"Input.Password"}}}})})}),r).open({initialValues:oe({},E)}),{password:s}=i;yield F({password:s})}),a=()=>{const s=`${window.location.origin}/public-forms/${t.name}`;navigator.clipboard.writeText(s),A.message.success(e("Link copied successfully"))};return d.jsxs("div",{children:[d.jsxs("div",{style:{margin:"-24px",padding:"10px",background:"#fff",display:"flex",alignItems:"center",justifyContent:"space-between"},children:[d.jsx(A.Breadcrumb,{items:[{title:d.jsx(Q.Link,{to:"/admin/settings/public-forms",children:e("Public forms",{ns:q})})},{title:B}]}),d.jsxs(A.Space,{children:[d.jsx(Q.Link,{target:"_blank",to:`/public-forms/${t.name}`,children:d.jsx(A.Button,{disabled:!S,icon:d.jsx(ie.EyeOutlined,{}),children:e("Open form",{ns:q})})}),d.jsx(A.Dropdown,{menu:{items:[{key:"enabled",label:d.jsxs("span",{style:{display:"flex",alignItems:"center",justifyContent:"space-between"},children:[d.jsx("span",{style:{marginRight:"10px"},children:e("Enable form",{ns:q})}),d.jsx(A.Switch,{size:"small",checked:S,onChange:i=>F({enabled:i})})]})},{key:"password",label:d.jsxs("span",{onClick:W,children:[" ",e("Set password")]})},{key:"divider1",type:"divider"},{key:"copyLink",label:d.jsx("span",{onClick:a,children:e("Copy link")})},{key:"qrcode",label:d.jsx(ao,{})}]},children:d.jsx(A.Button,{icon:d.jsx(ie.SettingOutlined,{}),children:e("Settings")})})]})]}),d.jsxs("div",{style:{maxWidth:800,margin:"100px auto"},children:[d.jsx(c.VariablesProvider,{filterVariables:i=>!["$user","$nRole","$nToken","$nURLSearchParams"].includes(i.key),children:d.jsx(c.RemoteSchemaComponent,{uid:t.name,scope:{useCreateActionProps:rt},components:{PublicFormMessageProvider:i=>i.children}})}),d.jsx(c.PoweredBy,{})]})]})}const lo=t=>({type:"void","x-toolbar":"BlockSchemaToolbar","x-toolbar-props":{draggable:!1},"x-settings":"blockSettings:publicForm","x-component":"CardItem","x-decorator":"FormBlockProvider","x-decorator-props":{collection:t.collection,dataSource:t.dataSource,type:"publicForm"},"x-use-decorator-props":"useCreateFormBlockDecoratorProps",properties:{a69vmspkv8h:{type:"void","x-component":"FormV2","x-use-component-props":"useCreateFormBlockProps",properties:{grid:{type:"void","x-component":"Grid","x-initializer":"form:configureFields"},l9xfwp6cfh1:{type:"void","x-component":"ActionBar","x-initializer":"createForm:configureActions","x-component-props":{layout:"one-column"}}}}}}),co=new c.SchemaSettings({name:"blockSettings:publicForm",items:[{name:"title",Component:c.SchemaSettingsBlockTitleItem},{name:"linkageRules",Component:c.SchemaSettingsLinkageRules,useComponentProps(){const{name:t}=c.useCollection();return{collectionName:t}}}]}),uo=new c.SchemaSettings({name:"blockSettings:publicMarkdown",items:[{name:"EditMarkdown",type:"item",useComponentProps(){const t=$.useField(),{t:e}=Qe.useTranslation();return{title:e("Edit markdown"),onClick:()=>{t.editable=!0}}}},{name:"setBlockTemplate",Component:c.SchemaSettingsRenderEngine}]});class xe extends c.Plugin{constructor(){super(...arguments);vt(this,"formTypes",new Map)}registerFormType(r,n){this.formTypes.set(r,n)}getFormSchemaByType(r="form"){return this.formTypes.get(r)?this.formTypes.get(r).uiSchema:()=>null}getFormTypeOptions(){const r=[];for(const[n,{label:o}]of this.formTypes)r.push({value:n,label:o});return r}load(){return Z(this,null,function*(){this.app.schemaSettingsManager.add(co),this.app.schemaSettingsManager.add(uo),this.registerFormType("form",{label:"Form",uiSchema:lo}),this.app.router.add("public-forms",{path:"/public-forms/:name",Component:Jn}),this.app.pluginSettingsManager.add("public-forms",{title:`{{t("Public forms", { ns: "${q}" })}}`,icon:"TableOutlined",Component:io}),this.app.pluginSettingsManager.add("public-forms/:name",{title:!1,pluginKey:"public-forms",isTopLevel:!1,Component:so})})}}w.PluginPublicFormsClient=xe,w.default=xe,Object.defineProperties(w,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
@@ -0,0 +1,12 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
9
+ export declare const NAMESPACE = "public-forms";
10
+ export declare function useT(): (str: string) => string;
11
+ export declare function tStr(key: string): string;
12
+ export declare function usePublicFormTranslation(): import("react-i18next").UseTranslationResponse<("public-forms" | "client")[], undefined>;
@@ -0,0 +1,70 @@
1
+ export declare const createActionSchema: {
2
+ type: string;
3
+ 'x-component': string;
4
+ title: string;
5
+ 'x-align': string;
6
+ 'x-component-props': {
7
+ type: string;
8
+ icon: string;
9
+ };
10
+ properties: {
11
+ drawer: {
12
+ type: string;
13
+ 'x-component': string;
14
+ title: string;
15
+ 'x-decorator': string;
16
+ properties: {
17
+ form: {
18
+ type: string;
19
+ properties: {
20
+ title: {
21
+ type: string;
22
+ 'x-decorator': string;
23
+ 'x-component': string;
24
+ };
25
+ collection: {
26
+ type: string;
27
+ 'x-decorator': string;
28
+ 'x-component': string;
29
+ };
30
+ type: {
31
+ type: string;
32
+ 'x-decorator': string;
33
+ title: string;
34
+ 'x-component': string;
35
+ default: string;
36
+ enum: string;
37
+ };
38
+ description: {
39
+ type: string;
40
+ 'x-decorator': string;
41
+ 'x-component': string;
42
+ };
43
+ password: {
44
+ type: string;
45
+ 'x-decorator': string;
46
+ 'x-component': string;
47
+ };
48
+ enabled: {
49
+ type: string;
50
+ 'x-decorator': string;
51
+ 'x-component': string;
52
+ default: boolean;
53
+ };
54
+ };
55
+ };
56
+ footer: {
57
+ type: string;
58
+ 'x-component': string;
59
+ properties: {
60
+ submit: {
61
+ title: string;
62
+ 'x-component': string;
63
+ 'x-use-component-props': string;
64
+ };
65
+ };
66
+ };
67
+ };
68
+ };
69
+ };
70
+ };