slthcore 0.2.9__tar.gz → 0.3.0__tar.gz

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.

Potentially problematic release.


This version of slthcore might be problematic. Click here for more details.

Files changed (104) hide show
  1. {slthcore-0.2.9/slthcore.egg-info → slthcore-0.3.0}/PKG-INFO +1 -1
  2. {slthcore-0.2.9 → slthcore-0.3.0}/setup.py +1 -1
  3. {slthcore-0.2.9 → slthcore-0.3.0}/slth/endpoints/__init__.py +3 -3
  4. {slthcore-0.2.9 → slthcore-0.3.0}/slth/factory.py +8 -0
  5. {slthcore-0.2.9 → slthcore-0.3.0}/slth/forms.py +3 -0
  6. {slthcore-0.2.9 → slthcore-0.3.0}/slth/serializer.py +3 -0
  7. {slthcore-0.2.9 → slthcore-0.3.0}/slth/static/js/slth.min.js +12 -12
  8. {slthcore-0.2.9 → slthcore-0.3.0}/slth/utils.py +1 -1
  9. {slthcore-0.2.9 → slthcore-0.3.0}/slth/views.py +2 -1
  10. {slthcore-0.2.9 → slthcore-0.3.0/slthcore.egg-info}/PKG-INFO +1 -1
  11. {slthcore-0.2.9 → slthcore-0.3.0}/MANIFEST.in +0 -0
  12. {slthcore-0.2.9 → slthcore-0.3.0}/setup.cfg +0 -0
  13. {slthcore-0.2.9 → slthcore-0.3.0}/slth/__init__.py +0 -0
  14. {slthcore-0.2.9 → slthcore-0.3.0}/slth/apps.py +0 -0
  15. {slthcore-0.2.9 → slthcore-0.3.0}/slth/cmd/configure/__main__.py +0 -0
  16. {slthcore-0.2.9 → slthcore-0.3.0}/slth/cmd/init/__main__.py +0 -0
  17. {slthcore-0.2.9 → slthcore-0.3.0}/slth/cmd/init/__pycache__/__main__.cpython-312.pyc +0 -0
  18. {slthcore-0.2.9 → slthcore-0.3.0}/slth/cmd/init/boilerplate/.DS_Store +0 -0
  19. {slthcore-0.2.9 → slthcore-0.3.0}/slth/cmd/init/boilerplate/.gitignore +0 -0
  20. {slthcore-0.2.9 → slthcore-0.3.0}/slth/cmd/init/boilerplate/backend/api/__init__.py +0 -0
  21. {slthcore-0.2.9 → slthcore-0.3.0}/slth/cmd/init/boilerplate/backend/api/asgi.py +0 -0
  22. {slthcore-0.2.9 → slthcore-0.3.0}/slth/cmd/init/boilerplate/backend/api/endpoints/__init__.py +0 -0
  23. {slthcore-0.2.9 → slthcore-0.3.0}/slth/cmd/init/boilerplate/backend/api/models.py +0 -0
  24. {slthcore-0.2.9 → slthcore-0.3.0}/slth/cmd/init/boilerplate/backend/api/settings.py +0 -0
  25. {slthcore-0.2.9 → slthcore-0.3.0}/slth/cmd/init/boilerplate/backend/api/tests.py +0 -0
  26. {slthcore-0.2.9 → slthcore-0.3.0}/slth/cmd/init/boilerplate/backend/api/urls.py +0 -0
  27. {slthcore-0.2.9 → slthcore-0.3.0}/slth/cmd/init/boilerplate/backend/api/wsgi.py +0 -0
  28. {slthcore-0.2.9 → slthcore-0.3.0}/slth/cmd/init/boilerplate/backend/application.yml +0 -0
  29. {slthcore-0.2.9 → slthcore-0.3.0}/slth/cmd/init/boilerplate/backend/entrypoint.sh +0 -0
  30. {slthcore-0.2.9 → slthcore-0.3.0}/slth/cmd/init/boilerplate/backend/manage.py +0 -0
  31. {slthcore-0.2.9 → slthcore-0.3.0}/slth/cmd/init/boilerplate/backend/requirements.txt +0 -0
  32. {slthcore-0.2.9 → slthcore-0.3.0}/slth/cmd/init/boilerplate/base.env +0 -0
  33. {slthcore-0.2.9 → slthcore-0.3.0}/slth/cmd/init/boilerplate/docker-compose.yml +0 -0
  34. {slthcore-0.2.9 → slthcore-0.3.0}/slth/cmd/init/boilerplate/frontend/package.json +0 -0
  35. {slthcore-0.2.9 → slthcore-0.3.0}/slth/cmd/init/boilerplate/frontend/src/main.jsx +0 -0
  36. {slthcore-0.2.9 → slthcore-0.3.0}/slth/cmd/init/boilerplate/frontend/vite.config.js +0 -0
  37. {slthcore-0.2.9 → slthcore-0.3.0}/slth/cmd/init/boilerplate/local.env +0 -0
  38. {slthcore-0.2.9 → slthcore-0.3.0}/slth/cmd/init/boilerplate/run.sh +0 -0
  39. {slthcore-0.2.9 → slthcore-0.3.0}/slth/cmd/init/boilerplate/selenium/run.sh +0 -0
  40. {slthcore-0.2.9 → slthcore-0.3.0}/slth/cmd/init/boilerplate/test.sh +0 -0
  41. {slthcore-0.2.9 → slthcore-0.3.0}/slth/components.py +0 -0
  42. {slthcore-0.2.9 → slthcore-0.3.0}/slth/db/__init__.py +0 -0
  43. {slthcore-0.2.9 → slthcore-0.3.0}/slth/db/generic.py +0 -0
  44. {slthcore-0.2.9 → slthcore-0.3.0}/slth/db/models.py +0 -0
  45. {slthcore-0.2.9 → slthcore-0.3.0}/slth/endpoints/auth.py +0 -0
  46. {slthcore-0.2.9 → slthcore-0.3.0}/slth/endpoints/deletion.py +0 -0
  47. {slthcore-0.2.9 → slthcore-0.3.0}/slth/endpoints/dev.py +0 -0
  48. {slthcore-0.2.9 → slthcore-0.3.0}/slth/endpoints/email.py +0 -0
  49. {slthcore-0.2.9 → slthcore-0.3.0}/slth/endpoints/job.py +0 -0
  50. {slthcore-0.2.9 → slthcore-0.3.0}/slth/endpoints/log.py +0 -0
  51. {slthcore-0.2.9 → slthcore-0.3.0}/slth/endpoints/profile.py +0 -0
  52. {slthcore-0.2.9 → slthcore-0.3.0}/slth/endpoints/pushsubscription.py +0 -0
  53. {slthcore-0.2.9 → slthcore-0.3.0}/slth/endpoints/report.py +0 -0
  54. {slthcore-0.2.9 → slthcore-0.3.0}/slth/endpoints/role.py +0 -0
  55. {slthcore-0.2.9 → slthcore-0.3.0}/slth/endpoints/task.py +0 -0
  56. {slthcore-0.2.9 → slthcore-0.3.0}/slth/endpoints/user.py +0 -0
  57. {slthcore-0.2.9 → slthcore-0.3.0}/slth/exceptions.py +0 -0
  58. {slthcore-0.2.9 → slthcore-0.3.0}/slth/management/__init__.py +0 -0
  59. {slthcore-0.2.9 → slthcore-0.3.0}/slth/management/commands/__init__.py +0 -0
  60. {slthcore-0.2.9 → slthcore-0.3.0}/slth/management/commands/integration_test.py +0 -0
  61. {slthcore-0.2.9 → slthcore-0.3.0}/slth/management/commands/sync.py +0 -0
  62. {slthcore-0.2.9 → slthcore-0.3.0}/slth/management/commands/worker.py +0 -0
  63. {slthcore-0.2.9 → slthcore-0.3.0}/slth/middleware/__init__.py +0 -0
  64. {slthcore-0.2.9 → slthcore-0.3.0}/slth/middleware/timezone.py +0 -0
  65. {slthcore-0.2.9 → slthcore-0.3.0}/slth/migrations/0001_initial.py +0 -0
  66. {slthcore-0.2.9 → slthcore-0.3.0}/slth/migrations/0002_email_role_pushsubscription_error.py +0 -0
  67. {slthcore-0.2.9 → slthcore-0.3.0}/slth/migrations/0003_rename_photo_profile_alter_profile_options.py +0 -0
  68. {slthcore-0.2.9 → slthcore-0.3.0}/slth/migrations/0004_alter_profile_photo.py +0 -0
  69. {slthcore-0.2.9 → slthcore-0.3.0}/slth/migrations/0005_alter_profile_photo.py +0 -0
  70. {slthcore-0.2.9 → slthcore-0.3.0}/slth/migrations/0006_user.py +0 -0
  71. {slthcore-0.2.9 → slthcore-0.3.0}/slth/migrations/0007_deletion_log.py +0 -0
  72. {slthcore-0.2.9 → slthcore-0.3.0}/slth/migrations/0008_alter_deletion_datetime_alter_log_datetime.py +0 -0
  73. {slthcore-0.2.9 → slthcore-0.3.0}/slth/migrations/0009_remove_email_from_email_email_action_email_attempt_and_more.py +0 -0
  74. {slthcore-0.2.9 → slthcore-0.3.0}/slth/migrations/0010_email_key_alter_email_action_alter_email_attempt_and_more.py +0 -0
  75. {slthcore-0.2.9 → slthcore-0.3.0}/slth/migrations/__init__.py +0 -0
  76. {slthcore-0.2.9 → slthcore-0.3.0}/slth/models.py +0 -0
  77. {slthcore-0.2.9 → slthcore-0.3.0}/slth/notifications.py +0 -0
  78. {slthcore-0.2.9 → slthcore-0.3.0}/slth/oauth.py +0 -0
  79. {slthcore-0.2.9 → slthcore-0.3.0}/slth/pdf/__init__.py +0 -0
  80. {slthcore-0.2.9 → slthcore-0.3.0}/slth/pdf/tests.py +0 -0
  81. {slthcore-0.2.9 → slthcore-0.3.0}/slth/permissions.py +0 -0
  82. {slthcore-0.2.9 → slthcore-0.3.0}/slth/printer.py +0 -0
  83. {slthcore-0.2.9 → slthcore-0.3.0}/slth/queryset.py +0 -0
  84. {slthcore-0.2.9 → slthcore-0.3.0}/slth/roles.py +0 -0
  85. {slthcore-0.2.9 → slthcore-0.3.0}/slth/selenium/__init__.py +0 -0
  86. {slthcore-0.2.9 → slthcore-0.3.0}/slth/selenium/browser.py +0 -0
  87. {slthcore-0.2.9 → slthcore-0.3.0}/slth/static/.DS_Store +0 -0
  88. {slthcore-0.2.9 → slthcore-0.3.0}/slth/static/css/.DS_Store +0 -0
  89. {slthcore-0.2.9 → slthcore-0.3.0}/slth/static/css/slth.css +0 -0
  90. {slthcore-0.2.9 → slthcore-0.3.0}/slth/static/js/index.min.js +0 -0
  91. {slthcore-0.2.9 → slthcore-0.3.0}/slth/static/js/react.min.js +0 -0
  92. {slthcore-0.2.9 → slthcore-0.3.0}/slth/statistics.py +0 -0
  93. {slthcore-0.2.9 → slthcore-0.3.0}/slth/tasks.py +0 -0
  94. {slthcore-0.2.9 → slthcore-0.3.0}/slth/templates/email.html +0 -0
  95. {slthcore-0.2.9 → slthcore-0.3.0}/slth/templates/index.html +0 -0
  96. {slthcore-0.2.9 → slthcore-0.3.0}/slth/templates/report.html +0 -0
  97. {slthcore-0.2.9 → slthcore-0.3.0}/slth/templates/service-worker.js +0 -0
  98. {slthcore-0.2.9 → slthcore-0.3.0}/slth/templates/signature.html +0 -0
  99. {slthcore-0.2.9 → slthcore-0.3.0}/slth/tests.py +0 -0
  100. {slthcore-0.2.9 → slthcore-0.3.0}/slth/threadlocal.py +0 -0
  101. {slthcore-0.2.9 → slthcore-0.3.0}/slth/urls.py +0 -0
  102. {slthcore-0.2.9 → slthcore-0.3.0}/slthcore.egg-info/SOURCES.txt +0 -0
  103. {slthcore-0.2.9 → slthcore-0.3.0}/slthcore.egg-info/dependency_links.txt +0 -0
  104. {slthcore-0.2.9 → slthcore-0.3.0}/slthcore.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: slthcore
3
- Version: 0.2.9
3
+ Version: 0.3.0
4
4
  Summary: API generator based on yml file
5
5
  Home-page: https://github.com/brenokcc
6
6
  Author: Breno Silva
@@ -5,7 +5,7 @@ install_requires = []
5
5
 
6
6
  setup(
7
7
  name='slthcore',
8
- version='0.2.9',
8
+ version='0.3.0',
9
9
  packages=find_packages(),
10
10
  install_requires=install_requires,
11
11
  include_package_data=True,
@@ -112,7 +112,7 @@ class Endpoint(metaclass=EnpointMetaclass):
112
112
  return False
113
113
 
114
114
  def redirect(self, url):
115
- raise JsonResponseException(dict(type="redirect", url=url))
115
+ raise JsonResponseException(dict(type="redirect", url=url, autosubmit=self.request.GET.get('autosubmit')))
116
116
 
117
117
  def render(self, data, template=None, pdf=False, autoreload=None):
118
118
  base_url=settings.SITE_URL
@@ -396,8 +396,8 @@ class ModelInstanceEndpoint(ModelEndpoint):
396
396
 
397
397
  class InstanceEndpoint(Generic[T], ModelInstanceEndpoint):
398
398
 
399
- def formfactory(self) -> FormFactory:
400
- return FormFactory(self.get_instance())
399
+ def formfactory(self, instance=None) -> FormFactory:
400
+ return FormFactory(instance or self.get_instance())
401
401
 
402
402
  def serializer(self) -> Serializer:
403
403
  return Serializer(self.get_instance()).contextualize(self.request)
@@ -1,5 +1,7 @@
1
1
  from django.db.models import Model
2
2
  from .serializer import Serializer
3
+
4
+
3
5
  class FormFactory:
4
6
  def __init__(self, instance, endpoint=None, method='POST'):
5
7
  self._instance = instance
@@ -19,6 +21,11 @@ class FormFactory:
19
21
  self._message = None
20
22
  self._dispose = False
21
23
  self._image = None
24
+ self._autosubmit = None
25
+
26
+ def autosubmit(self, seconds):
27
+ self._autosubmit = seconds
28
+ return self
22
29
 
23
30
  def _append_field(self, field_name):
24
31
  if ':' in field_name:
@@ -118,6 +125,7 @@ class FormFactory:
118
125
  form._redirect = self._redirect
119
126
  form._dispose = self._dispose
120
127
  form._image = self._image
128
+ form._autosubmit = self._autosubmit
121
129
  for name in self._fieldlist:
122
130
  if name not in form.fields:
123
131
  form.fields[name] = getattr(endpoint, name)
@@ -167,6 +167,7 @@ class FormMixin:
167
167
  url=absolute_url(self.request),
168
168
  info=self._info,
169
169
  image=self._image,
170
+ autosubmit=self._autosubmit,
170
171
  )
171
172
  data.update(
172
173
  controls=self.controller.controls, width=self.get_metadata("width", "100%")
@@ -525,6 +526,7 @@ class Form(DjangoForm, FormMixin):
525
526
  self._actions = {}
526
527
  self._method = "POST"
527
528
  self._key = self._title.lower()
529
+ self._autosubmit = None
528
530
 
529
531
  self.fieldsets = {}
530
532
  self.fields = {}
@@ -560,6 +562,7 @@ class ModelForm(DjangoModelForm, FormMixin):
560
562
  self._actions = {}
561
563
  self._method = "POST"
562
564
  self._key = self._title.lower()
565
+ self._autosubmit = None
563
566
 
564
567
  self.fieldsets = {}
565
568
  self.request = endpoint.request
@@ -312,7 +312,9 @@ class Serializer:
312
312
  endpoint = cls.instantiate(self.request, self.obj)
313
313
  if endpoint.check_permission():
314
314
  if not lazy:
315
+ self.request.subpath = cls.get_api_url(self.obj.id) if cls.has_args() else cls.get_api_url()
315
316
  returned = endpoint.process()
317
+ del self.request.subpath
316
318
  path = self.path + [key]
317
319
  if wrap:
318
320
  data = dict(type='fieldset', key=key, title=title, url=None, data=serialize(returned))
@@ -322,6 +324,7 @@ class Serializer:
322
324
  if isinstance(data, dict):
323
325
  data['url'] = absolute_url(self.request, 'only={}'.format('__'.join(path)))
324
326
  if leaf: raise JsonResponseException(data)
327
+
325
328
  elif datatype == 'component':
326
329
  title = item['title']
327
330
  component = item['component']
@@ -1,6 +1,6 @@
1
- import{j as t,c as P,r as N,R as Ie}from"./react.min.js";const p={colors:{primary:"var(--primary-color)",success:"var(--success-color)",warning:"var(--warning-color)",info:"var(--info-color)",danger:"var(--danger-color)",highlight:"var(--highlight-color)",seconday:"var(--seconday-color)",auxiliary:"var(--auxiliary-color)"},border:{radius:"var(--border-radius)"},background:{info:"var(--info-background)"}};function Ne(e){function n(){const a={width:30,height:30,borderRadius:"50%",backgroundColor:e.data.value};return t.jsx("div",{style:a})}return n()}function De(e){function n(r){navigator.clipboard.writeText(r),z('Icon "'+r+'" copied to clipboard!')}const a={display:"inline-block",width:150,textAlign:"center",cursor:"pointer"};return t.jsx("div",{style:{marginTop:30},children:qe.map(r=>t.jsxs("div",{className:"icon-box",onClick:()=>n(r),style:a,children:[t.jsx("i",{className:"fa-solid fa-fw fa-"+r}),t.jsx("div",{className:"icon-text",children:r})]},Math.random()))})}function Le(e){function n(){return t.jsx("i",{style:e.style,className:"fa-solid fa-circle-notch fa-spin fa-1x spin"})}return n()}function E(e){var n="fa-solid fa-"+e.icon;return e.className&&(n+=" "+e.className),(e.onClick||e.clickable)&&(n+=" clickable"),t.jsx("i",{style:e.style,className:n,onClick:e.onClick})}function ge(e){function n(){const a={padding:12,textDecoration:"none",whiteSpace:"nowrap",borderRadius:5,margin:5,cursor:"pointer",display:e.display||"block"};return e.primary&&(a.backgroundColor=p.colors.primary,a.color="white"),e.default&&(a.color=p.colors.primary,a.border="solid 1px "+p.colors.primary),t.jsx("a",{id:e.id,style:a,onClick:r=>{r.preventDefault(),e.onClick()},children:t.jsx(E,{icon:e.icon})})}return n()}const qe=["1","2","3","4","5","6","7","8","9","fill-drip","arrows-to-circle","circle-chevron-right","at","trash-can","text-height","user-xmark","stethoscope","message","info","down-left-and-up-right-to-center","explosion","file-text","wave-square","ring","building-un","dice-three","calendar-days","anchor-circle-check","building-circle-arrow-right","volleyball","arrows-up-to-line","sort-down","minus-circle","door-open","sign-out-alt","atom","soap","icons","microphone-lines-slash","bridge-circle-check","pump-medical","fingerprint","hand-point-right","search-location","step-forward","smile-beam","flag-checkered","football","school-circle-exclamation","crop","angles-down","users-rectangle","people-roof","people-line","beer","diagram-predecessor","long-arrow-up","fire-flame-simple","person","laptop","file-csv","menorah","truck-plane","record-vinyl","grin-stars","bong","spaghetti-monster-flying","arrow-down-up-across-line","utensil-spoon","jar-wheat","mail-bulk","file-circle-exclamation","hospital-symbol","pager","contact-book","strikethrough","k","landmark-flag","pencil","backward","caret-right","comments","paste","code-pull-request","clipboard-list","truck-ramp-box","user-check","vial-virus","sheet-plastic","blog","user-ninja","person-arrow-up-from-line","torah","quidditch","toggle-off","box-archive","person-drowning","sort-numeric-down-alt","grin-tongue-squint","spray-can","truck-monster","w","globe-africa","rainbow","circle-notch","tablet-screen-button","paw","cloud","trowel-bricks","flushed","hospital-user","tent-arrow-left-right","legal","binoculars","microphone-slash","box-tissue","motorcycle","concierge-bell","pencil-ruler","people-arrows","mars-and-venus-burst","square-caret-right","scissors","sun-plant-wilt","toilets-portable","hockey-puck","table","magnifying-glass-arrow-right","tachograph-digital","users-slash","clover","reply","star-and-crescent","house-fire","square-minus","helicopter","compass","square-caret-down","file-circle-question","laptop-code","swatchbook","prescription-bottle","navicon","people-group","hourglass-end","heart-crack","square-up-right","kiss-beam","film","ruler-horizontal","people-robbery","lightbulb","caret-left","exclamation-circle","school-circle-xmark","sign-out","circle-chevron-down","unlock-keyhole","cloud-showers-heavy","headphones-simple","sitemap","donate","memory","road-spikes","fire-burner","flag","hanukiah","feather","volume-low","comment-slash","cloud-sun-rain","compress","wheat-awn","ankh","hands-holding-child","asterisk","square-check","peseta-sign","heading","ghost","list","square-phone-flip","cart-plus","gamepad","dot-circle","face-dizzy","egg","house-medical-circle-xmark","campground","folder-plus","soccer-ball","paintbrush","lock","gas-pump","hot-tub","map-marked","house-flood-water","tree","bridge-lock","sack-dollar","pen-to-square","car-side","share-nodes","heart-circle-minus","hourglass-half","microscope","sink","shopping-bag","sort-alpha-down-alt","mitten","person-rays","users","eye-slash","flask-vial","hand","om","worm","house-circle-xmark","plug","chevron-up","hand-spock","stopwatch","kiss","bridge-circle-xmark","grin-tongue","chess-bishop","grin-wink","hard-of-hearing","road-circle-check","dice-five","square-rss","land-mine-on","i-cursor","stamp","stairs","i","hryvnia","pills","grin-alt","tooth","v","bangladeshi-taka-sign","bicycle","staff-snake","head-side-cough-slash","truck-medical","wheat-awn-circle-exclamation","snowman","mortar-pestle","road-barrier","school","igloo","joint","angle-right","horse","q","g","notes-medical","thermometer-half","dong-sign","capsules","poo-storm","frown-open","hand-point-up","money-bill","bookmark","align-justify","umbrella-beach","helmet-un","bullseye","bacon","hand-point-down","arrow-up-from-bracket","folder","file-waveform","radiation","chart-simple","mars-stroke","vial","tachometer-alt-average","wand-magic-sparkles","e","pen-clip","bridge-circle-exclamation","user","school-circle-check","dumpster","van-shuttle","building-user","square-caret-left","highlighter","key","bullhorn","globe","synagogue","person-half-dress","road-bridge","location-arrow","c","tablet-button","building-lock","pizza-slice","money-bill-wave","chart-area","house-flag","person-circle-minus","cancel","camera-rotate","spray-can-sparkles","star","repeat","cross","box","venus-mars","mouse-pointer","maximize","charging-station","triangle-circle-square","shuffle","running","mobile-retro","grip-lines-vertical","spider","hands-bound","file-invoice-dollar","plane-circle-exclamation","x-ray","spell-check","slash","mouse","sign-in","store-alt-slash","server","virus-covid-slash","shop-lock","hourglass-start","blender-phone","building-wheat","person-breastfeeding","sign-in-alt","venus","passport","heartbeat","people-carry","temperature-high","microchip","crown","weight-hanging","xmarks-lines","file-prescription","weight","user-group","sort-alpha-up","chess-knight","laugh-squint","wheelchair","circle-arrow-up","toggle-on","walking","l","fire","procedures","space-shuttle","laugh","folder-open","heart-circle-plus","code-fork","city","microphone-lines","pepper-hot","unlock","colon-sign","headset","store-slash","road-circle-xmark","user-minus","mars-stroke-v","glass-cheers","clipboard","house-circle-exclamation","file-upload","wifi","bathtub","underline","user-pen","signature","stroopwafel","bold","anchor-lock","building-ngo","manat-sign","not-equal","border-top-left","map-marked-alt","jedi","square-poll-vertical","mug-hot","car-battery","gift","dice-two","chess-queen","glasses","chess-board","building-circle-check","person-chalkboard","mars-stroke-right","hand-rock","square-caret-up","cloud-showers-water","chart-bar","hands-wash","less-than-equal","train","low-vision","crow","sailboat","window-restore","square-plus","torii-gate","frog","bucket","image","microphone","cow","caret-up","screwdriver","folder-closed","house-tsunami","square-nfi","arrow-up-from-ground-water","martini-glass","undo-alt","table-columns","lemon","head-side-mask","handshake","gem","dolly","smoking","minimize","monument","snowplow","angles-right","cannabis","play-circle","tablets","ethernet","euro","chair","circle-check","stop-circle","drafting-compass","plate-wheat","icicles","person-shelter","neuter","id-badge","marker","laugh-beam","helicopter-symbol","universal-access","circle-chevron-up","lari-sign","volcano","person-walking-dashed-line-arrow-right","sterling-sign","viruses","square-person-confined","user-tie","long-arrow-down","tent-arrow-down-to-line","certificate","reply-all","suitcase","skating","funnel-dollar","camera-retro","circle-arrow-down","file-import","square-arrow-up-right","box-open","scroll","spa","location-pin-lock","pause","hill-avalanche","thermometer-empty","bomb","registered","vcard","scale-unbalanced-flip","subscript","directions","burst","laptop-house","tired","money-bills","smog","crutch","cloud-upload","palette","arrows-turn-right","vest","ferry","arrows-down-to-people","sprout","left-right","boxes-packing","circle-arrow-left","group-arrows-rotate","bowl-food","candy-cane","sort-amount-down","thunderstorm","text-slash","smile-wink","file-word","file-powerpoint","arrows-left-right","house-lock","cloud-download","children","chalkboard","user-large-slash","envelope-open","handshake-simple-slash","mattress-pillow","guarani-sign","sync","fire-extinguisher","cruzeiro-sign","greater-than-equal","shield-halved","book-atlas","virus","envelope-circle-check","layer-group","arrows-to-dot","archway","heart-circle-check","house-damage","file-zipper","square","martini-glass-empty","couch","cedi-sign","italic","church","comments-dollar","democrat","z","skiing","road-lock","a","temperature-down","feather-pointed","p","snowflake","newspaper","rectangle-ad","circle-arrow-right","filter-circle-xmark","locust","unsorted","list-ol","person-dress-burst","money-check-dollar","vector-square","bread-slice","language","kiss-wink-heart","filter","question","file-signature","up-down-left-right","house-chimney-user","hand-holding-heart","puzzle-piece","money-check","star-half-stroke","code","whiskey-glass","building-circle-exclamation","magnifying-glass-chart","external-link","cubes-stacked","won","virus-covid","austral-sign","f","leaf","road","taxi","person-circle-plus","pie-chart","bolt-lightning","sack-xmark","file-excel","file-contract","fish-fins","building-flag","grin-beam","object-ungroup","poop","map-marker","kaaba","toilet-paper","helmet-safety","eject","circle-right","plane-circle-check","meh-rolling-eyes","object-group","line-chart","mask-ventilator","arrow-right","signs-post","cash-register","person-circle-question","h","tarp","tools","arrows-to-eye","plug-circle-bolt","heart","mars-and-venus","house-user","dumpster-fire","house-crack","martini-glass-citrus","surprise","bottle-water","pause-circle","toilet-paper-slash","apple-whole","kitchen-set","r","thermometer-quarter","cube","bitcoin-sign","shield-dog","solar-panel","lock-open","elevator","money-bill-transfer","money-bill-trend-up","house-flood-water-circle-arrow-right","square-poll-horizontal","circle","fast-backward","recycle","user-astronaut","plane-slash","trademark","basketball","satellite-dish","circle-up","mobile-screen-button","volume-up","users-rays","wallet","clipboard-check","file-audio","hamburger","wrench","bugs","rupee","file-image","question-circle","plane-departure","handshake-slash","book-bookmark","code-branch","hat-cowboy","bridge","phone-flip","truck-front","cat","anchor-circle-exclamation","truck-field","route","clipboard-question","panorama","comment-medical","teeth-open","file-circle-minus","tags","wine-glass","fast","meh-blank","square-parking","house-signal","tasks-alt","faucet-drip","dolly-flatbed","smoking-ban","terminal","mobile-button","house-medical-flag","shopping-basket","tape","bus-simple","eye","sad-cry","audio-description","person-military-to-person","file-shield","user-slash","pen","tower-observation","file-code","signal","bus","heart-circle-xmark","house-chimney","window-maximize","frown","prescription","store-alt","save","vihara","scale-unbalanced","sort-up","commenting","plant-wilt","diamond","grin-squint","hand-holding-usd","bacterium","hand-pointer","drum-steelpan","hand-scissors","praying-hands","redo","biohazard","location","mars-double","child-dress","users-between-lines","lungs-virus","grin-tears","phone","calendar-xmark","child-reaching","head-side-virus","user-gear","sort-numeric-up","door-closed","shield-virus","dice-six","mosquito-net","bridge-water","person-booth","text-width","hat-wizard","fancy","person-digging","trash","tachometer-average","book-medical","poo","quote-right","tshirt","cubes","divide","tenge","headphones","hands-holding","hands-clapping","republican","arrow-left","person-circle-xmark","ruler","align-left","dice-d6","restroom","j","users-viewfinder","file-video","up-right-from-square","th","file-pdf","book-bible","o","suitcase-medical","user-secret","otter","person-dress","comment-dollar","business-time","th-large","tanakh","volume-control-phone","hat-cowboy-side","clipboard-user","child","lira-sign","satellite","plane-lock","tag","comment","cake","envelope","angles-up","paperclip","arrow-right-to-city","ribbon","lungs","sort-numeric-up-alt","litecoin-sign","border-none","circle-nodes","parachute-box","indent","truck-field-un","hourglass","mountain","user-md","info-circle","cloud-meatball","camera","square-virus","meteor","car-on","sleigh","sort-numeric-down","hand-holding-water","water","calendar-check","braille","prescription-bottle-medical","landmark","truck","crosshairs","person-cane","tent","vest-patches","check-double","sort-alpha-down","money-bill-wheat","cookie","undo","hdd","grin-squint-tears","dumbbell","rectangle-list","tarp-droplet","house-medical-circle-check","skiing-nordic","calendar-plus","plane-arrival","circle-left","train-subway","chart-gantt","inr","crop-simple","money-bill-alt","long-arrow-alt-left","dna","virus-slash","subtract","chess","long-arrow-left","plug-circle-check","street-view","franc-sign","volume-off","hands-asl-interpreting","gear","tint-slash","mosque","mosquito","star-of-david","person-military-rifle","shopping-cart","vials","plug-circle-plus","place-of-worship","grip-vertical","level-up","u","square-root-variable","clock","step-backward","pallet","faucet","baseball-bat-ball","s","timeline","keyboard","caret-down","house-chimney-medical","thermometer-three-quarters","mobile-screen","plane-up","piggy-bank","battery-half","mountain-city","coins","khanda","sliders","folder-tree","network-wired","map-pin","hamsa","cent-sign","flask","person-pregnant","wand-sparkles","ellipsis-vertical","ticket","power-off","right-long","flag-usa","laptop-file","tty","diagram-next","person-rifle","house-medical-circle-exclamation","closed-captioning","person-hiking","venus-double","images","calculator","people-pulling","n","tram","cloud-rain","building-circle-xmark","ship","arrows-down-to-line","download","grin","delete-left","eyedropper","file-circle-check","forward","mobile","meh","align-center","book-skull","id-card","outdent","heart-circle-exclamation","house","calendar-week","laptop-medical","b","file-medical","dice-one","kiwi-bird","exchange","rotate-right","utensils","sort-amount-up","mill-sign","bowl-rice","skull","tower-broadcast","truck-pickup","up-long","stop","code-merge","upload","hurricane","mound","toilet-portable","compact-disc","file-download","caravan","shield-cat","zap","glass-water","oil-well","vault","mars","toilet","plane-circle-xmark","yen","ruble","sun","guitar","laugh-wink","horse-head","bore-hole","industry","circle-down","arrows-turn-to-dots","florin-sign","sort-amount-down-alt","less-than","angle-down","car-tunnel","head-side-cough","grip-lines","thumbs-down","user-lock","long-arrow-right","anchor-circle-xmark","ellipsis","chess-pawn","kit-medical","person-through-window","toolbox","hands-holding-circle","bug","credit-card","car","hand-holding-hand","book-reader","mountain-sun","arrows-left-right-to-line","dice-d20","truck-droplet","file-circle-xmark","temperature-up","medal","bed","square-h","podcast","thermometer-full","bell","superscript","plug-circle-xmark","star-of-life","phone-slash","paint-roller","handshake-angle","map-marker-alt","file","greater-than","swimmer","arrow-down","tint","eraser","globe-americas","person-burst","dove","battery-empty","socks","inbox","section","tachometer-alt","envelope-open-text","hospital","wine-bottle","chess-rook","stream","dharmachakra","hotdog","person-walking-with-cane","drum","ice-cream","heart-circle-bolt","fax","paragraph","vote-yea","star-half","boxes","link","ear-listen","tree-city","play","font","rupiah-sign","search","table-tennis","person-dots-from-line","trash-restore-alt","naira-sign","cart-arrow-down","walkie-talkie","file-pen","receipt","square-pen","suitcase-rolling","person-circle-exclamation","chevron-down","battery","skull-crossbones","code-compare","list-ul","school-lock","tower-cell","long-arrow-alt-down","ranking-star","chess-king","person-harassing","brazilian-real-sign","landmark-dome","arrow-up","tv","shrimp","tasks","jug-detergent","user-circle","user-shield","wind","car-crash","y","snowboarding","fast","fish","user-graduate","circle-half-stroke","clapperboard","radiation-alt","baseball","jet-fighter-up","project-diagram","copy","volume-xmark","hand-sparkles","grip","share-square","child-rifle","gun","square-phone","plus","expand","computer","xmark","arrows","chalkboard-user","peso-sign","building-shield","baby","users-line","quote-left","tractor","trash-restore","arrow-down-up-lock","lines-leaning","ruler-combined","copyright","equals","blender","teeth","sheqel","map","rocket","photo-video","folder-minus","store","arrow-trend-up","plug-circle-minus","sign","bezier-curve","bell-slash","tablet","school-flag","fill","angle-up","drumstick-bite","holly-berry","chevron-left","bacteria","hand-lizard","notdef","disease","briefcase-medical","genderless","chevron-right","retweet","car-rear","pump-soap","video-slash","battery-quarter","radio","carriage-baby","traffic-light","thermometer","vr-cardboard","hand-middle-finger","percentage","truck-moving","glass-water-droplet","display","smile","thumbtack","trophy","pray","hammer","hand-peace","sync-alt","spinner","robot","peace","gears","warehouse","arrow-up-right-dots","splotch","grin-hearts","dice-four","sim-card","transgender","mercury","level-down","falling-burst","award","ticket-simple","building","angles-left","qrcode","history","grin-beam-sweat","file-export","shield","sort-amount-up-alt","house-medical","golf-ball","circle-chevron-left","house-chimney-window","pen-nib","tent-arrow-turn-left","tents","wand-magic","dog","carrot","moon","wine-glass-empty","cheese","yin-yang","music","code-commit","temperature-low","person-biking","broom","shield-heart","gopuram","globe-oceania","xmark-square","hashtag","up-right-and-down-left-from-center","oil-can","t","hippo","chart-column","infinity","vial-circle-check","person-arrow-down-to-line","voicemail","fan","person-walking-luggage","up-down","cloud-moon-rain","calendar","trailer","haykal","sd-card","dragon","shoe-prints","plus-circle","grin-tongue-wink","hand-holding","plug-circle-exclamation","unlink","clone","person-walking-arrow-loop-left","sort-alpha-up-alt","fire-flame-curved","tornado","file-circle-plus","quran","anchor","border-all","face-angry","cookie-bite","arrow-trend-down","rss","draw-polygon","scale-balanced","tachometer","shower","desktop","m","th-list","sms","book","user-plus","check","battery-three-quarters","house-circle-check","angle-left","diagram-successor","truck-arrow-right","arrows-split-up-and-left","hand-fist","cloud-moon","briefcase","falling","portrait","user-tag","rug","globe-europe","luggage-cart","window-close","baht-sign","book-open","journal-whills","handcuffs","warning","database","share","bottle-droplet","face","hill-rockslide","right-left","paper-plane","road-circle-exclamation","dungeon","align-right","money-bill-wave-alt","life-ring","signing","calendar-day","water-ladder","arrows-v","grimace","wheelchair-move","turn-down","person-walking-arrow-right","square-envelope","dice","bowling-ball","brain","bandage","calendar-minus","xmark-circle","gifts","hotel","globe-asia","id-card-clip","search-plus","thumbs-up","user-clock","hand-dots","file-invoice","window-minimize","mug-saucer","brush","mask","search-minus","ruler-vertical","user-large","train-tram","user-nurse","syringe","cloud-sun","stopwatch-20","square-full","magnet","jar","sticky-note","bug-slash","arrow-up-from-water-pump","bone","user-injured","sad-tear","plane","tent-arrows-down","exclamation","arrows-spin","print","turkish-lira","usd","x","search-dollar","users-gear","person-military-pointing","university","umbrella","trowel","d","stapler","theater-masks","kip-sign","hand-point-left","handshake-simple","jet-fighter","square-share-nodes","barcode","plus-minus","video","mortar-board","hand-holding-medical","person-circle-check","turn-up"];function Be(e){function n(){const a={position:"fixed",color:"white",backgroundColor:e.isError?"#e52207":p.colors.success,width:300,top:10,left:(window.innerWidth-320)/2,padding:15};return t.jsxs("div",{style:a,children:[t.jsx(E,{icon:e.isError?"xmark-circle":"circle-check",style:{marginRight:5}}),e.text]})}return n()}function z(e,n=!1){const a=document.createElement("div");a.classList.add("message"),P.createRoot(document.body.appendChild(a)).render(t.jsx(Be,{text:e,isError:n})),setTimeout(function(){a.remove()},3e3)}function se(){document.querySelectorAll(".message").forEach(function(e){e.remove()})}function ee(e){function n(){const a={color:p.colors.info,backgroundColor:p.background.info,padding:20,display:"flex",justifyContent:"space-between",marginTop:10,marginBottom:10};return t.jsxs("div",{style:a,children:[t.jsx("div",{children:e.data.text}),e.children&&t.jsx("div",{children:e.children})]})}return n()}function Ae(e){const n=e.data;n.store&&we(n.store),n.redirect&&n.redirect.length>2?(n.message&&localStorage.setItem("message",n.message),document.location.href=V(n.redirect)):n.message&&z(n.message)}function we(e){Object.keys(e).map(function(n){e[n]?(localStorage.setItem(n,e[n]),n=="token"&&(document.cookie="token="+e[n]+";path=/")):(localStorage.removeItem(n,e[n]),n=="token"&&(document.cookie="token=;expires=Thu, 01 Jan 1970 00:00:00 GMT;path=/"))})}function O(e){return e.replace("/app/","/api/")}function V(e){return e.replaceAll("/api/","/app/")}function B(e,n,a,r){const i=localStorage.getItem("token");var o={Accept:"application/json",TZ:Intl.DateTimeFormat().resolvedOptions().timeZone};i&&(o.Authorization="Token "+i);const d=O(n);var c={method:e,headers:new Headers(o),ajax:1};r&&(c.body=r);var s=null,u=null;fetch(d,c).then(function(l){if(s=l,u=s.headers.get("Content-Type"),u=="application/json")return l.text();if(u.indexOf("text")<0||u.indexOf("csv")>=0||u.indexOf("pdf")>=0)return l.arrayBuffer();l.text()}).then(l=>{if(u=="application/json"){var m=JSON.parse(l||"{}");typeof m=="object"&&m.type=="redirect"?document.location.href=V(m.url):a&&a(m,s)}else if(u.indexOf("text")<0||u.indexOf("csv")>=0||u.indexOf("pdf")>=0){var f=window.URL.createObjectURL(new Blob([new Uint8Array(l)],{type:u})),w=document.createElement("a");w.href=f,u.indexOf("excel")>=0?w.download="Download.xls":u.indexOf("pdf")>=0?w.download="Download.pdf":u.indexOf("zip")>=0?w.download="Download.zip":u.indexOf("json")>=0?w.download="Download.json":u.indexOf("csv")>=0?w.download="Download.csv":u.indexOf("png")>=0&&(w.download="Download.png"),document.body.appendChild(w),w.click()}else a&&a(l,s)})}function H(e){if(e===null||e==="")return"-";if(e===!0)return"Sim";if(e===!1)return"Não";if(typeof e=="number"){var n=e.toString().split(".");return n.length==1?e.toString().replace(/\B(?=(\d{3})+(?!\d))/g,"."):(n[0]=n[0].toString().replace(/\B(?=(\d{3})+(?!\d))/g,"."),n[1]=n[1].substring(0,2),n[1].length==1&&(n[1]=n[1]+"0"),n[0]+","+n[1])}if(typeof e=="string"){if(e.length==7&&e[0]=="#")return t.jsx(x,{data:{type:"color",value:e}});if(e.length==19&&e[13]==":"&&e[16]==":"){var n=e.split(" "),a=n[0],r=n[1];return r=="00:00:00"?a:a+" "+r}else if(e.indexOf(`
1
+ import{j as t,c as P,r as I,R as Ie}from"./react.min.js";const p={colors:{primary:"var(--primary-color)",success:"var(--success-color)",warning:"var(--warning-color)",info:"var(--info-color)",danger:"var(--danger-color)",highlight:"var(--highlight-color)",seconday:"var(--seconday-color)",auxiliary:"var(--auxiliary-color)"},border:{radius:"var(--border-radius)"},background:{info:"var(--info-background)"}};function Ne(e){function n(){const a={width:30,height:30,borderRadius:"50%",backgroundColor:e.data.value};return t.jsx("div",{style:a})}return n()}function De(e){function n(r){navigator.clipboard.writeText(r),z('Icon "'+r+'" copied to clipboard!')}const a={display:"inline-block",width:150,textAlign:"center",cursor:"pointer"};return t.jsx("div",{style:{marginTop:30},children:qe.map(r=>t.jsxs("div",{className:"icon-box",onClick:()=>n(r),style:a,children:[t.jsx("i",{className:"fa-solid fa-fw fa-"+r}),t.jsx("div",{className:"icon-text",children:r})]},Math.random()))})}function Le(e){function n(){return t.jsx("i",{style:e.style,className:"fa-solid fa-circle-notch fa-spin fa-1x spin"})}return n()}function E(e){var n="fa-solid fa-"+e.icon;return e.className&&(n+=" "+e.className),(e.onClick||e.clickable)&&(n+=" clickable"),t.jsx("i",{style:e.style,className:n,onClick:e.onClick})}function ge(e){function n(){const a={padding:12,textDecoration:"none",whiteSpace:"nowrap",borderRadius:5,margin:5,cursor:"pointer",display:e.display||"block"};return e.primary&&(a.backgroundColor=p.colors.primary,a.color="white"),e.default&&(a.color=p.colors.primary,a.border="solid 1px "+p.colors.primary),t.jsx("a",{id:e.id,style:a,onClick:r=>{r.preventDefault(),e.onClick()},children:t.jsx(E,{icon:e.icon})})}return n()}const qe=["1","2","3","4","5","6","7","8","9","fill-drip","arrows-to-circle","circle-chevron-right","at","trash-can","text-height","user-xmark","stethoscope","message","info","down-left-and-up-right-to-center","explosion","file-text","wave-square","ring","building-un","dice-three","calendar-days","anchor-circle-check","building-circle-arrow-right","volleyball","arrows-up-to-line","sort-down","minus-circle","door-open","sign-out-alt","atom","soap","icons","microphone-lines-slash","bridge-circle-check","pump-medical","fingerprint","hand-point-right","search-location","step-forward","smile-beam","flag-checkered","football","school-circle-exclamation","crop","angles-down","users-rectangle","people-roof","people-line","beer","diagram-predecessor","long-arrow-up","fire-flame-simple","person","laptop","file-csv","menorah","truck-plane","record-vinyl","grin-stars","bong","spaghetti-monster-flying","arrow-down-up-across-line","utensil-spoon","jar-wheat","mail-bulk","file-circle-exclamation","hospital-symbol","pager","contact-book","strikethrough","k","landmark-flag","pencil","backward","caret-right","comments","paste","code-pull-request","clipboard-list","truck-ramp-box","user-check","vial-virus","sheet-plastic","blog","user-ninja","person-arrow-up-from-line","torah","quidditch","toggle-off","box-archive","person-drowning","sort-numeric-down-alt","grin-tongue-squint","spray-can","truck-monster","w","globe-africa","rainbow","circle-notch","tablet-screen-button","paw","cloud","trowel-bricks","flushed","hospital-user","tent-arrow-left-right","legal","binoculars","microphone-slash","box-tissue","motorcycle","concierge-bell","pencil-ruler","people-arrows","mars-and-venus-burst","square-caret-right","scissors","sun-plant-wilt","toilets-portable","hockey-puck","table","magnifying-glass-arrow-right","tachograph-digital","users-slash","clover","reply","star-and-crescent","house-fire","square-minus","helicopter","compass","square-caret-down","file-circle-question","laptop-code","swatchbook","prescription-bottle","navicon","people-group","hourglass-end","heart-crack","square-up-right","kiss-beam","film","ruler-horizontal","people-robbery","lightbulb","caret-left","exclamation-circle","school-circle-xmark","sign-out","circle-chevron-down","unlock-keyhole","cloud-showers-heavy","headphones-simple","sitemap","donate","memory","road-spikes","fire-burner","flag","hanukiah","feather","volume-low","comment-slash","cloud-sun-rain","compress","wheat-awn","ankh","hands-holding-child","asterisk","square-check","peseta-sign","heading","ghost","list","square-phone-flip","cart-plus","gamepad","dot-circle","face-dizzy","egg","house-medical-circle-xmark","campground","folder-plus","soccer-ball","paintbrush","lock","gas-pump","hot-tub","map-marked","house-flood-water","tree","bridge-lock","sack-dollar","pen-to-square","car-side","share-nodes","heart-circle-minus","hourglass-half","microscope","sink","shopping-bag","sort-alpha-down-alt","mitten","person-rays","users","eye-slash","flask-vial","hand","om","worm","house-circle-xmark","plug","chevron-up","hand-spock","stopwatch","kiss","bridge-circle-xmark","grin-tongue","chess-bishop","grin-wink","hard-of-hearing","road-circle-check","dice-five","square-rss","land-mine-on","i-cursor","stamp","stairs","i","hryvnia","pills","grin-alt","tooth","v","bangladeshi-taka-sign","bicycle","staff-snake","head-side-cough-slash","truck-medical","wheat-awn-circle-exclamation","snowman","mortar-pestle","road-barrier","school","igloo","joint","angle-right","horse","q","g","notes-medical","thermometer-half","dong-sign","capsules","poo-storm","frown-open","hand-point-up","money-bill","bookmark","align-justify","umbrella-beach","helmet-un","bullseye","bacon","hand-point-down","arrow-up-from-bracket","folder","file-waveform","radiation","chart-simple","mars-stroke","vial","tachometer-alt-average","wand-magic-sparkles","e","pen-clip","bridge-circle-exclamation","user","school-circle-check","dumpster","van-shuttle","building-user","square-caret-left","highlighter","key","bullhorn","globe","synagogue","person-half-dress","road-bridge","location-arrow","c","tablet-button","building-lock","pizza-slice","money-bill-wave","chart-area","house-flag","person-circle-minus","cancel","camera-rotate","spray-can-sparkles","star","repeat","cross","box","venus-mars","mouse-pointer","maximize","charging-station","triangle-circle-square","shuffle","running","mobile-retro","grip-lines-vertical","spider","hands-bound","file-invoice-dollar","plane-circle-exclamation","x-ray","spell-check","slash","mouse","sign-in","store-alt-slash","server","virus-covid-slash","shop-lock","hourglass-start","blender-phone","building-wheat","person-breastfeeding","sign-in-alt","venus","passport","heartbeat","people-carry","temperature-high","microchip","crown","weight-hanging","xmarks-lines","file-prescription","weight","user-group","sort-alpha-up","chess-knight","laugh-squint","wheelchair","circle-arrow-up","toggle-on","walking","l","fire","procedures","space-shuttle","laugh","folder-open","heart-circle-plus","code-fork","city","microphone-lines","pepper-hot","unlock","colon-sign","headset","store-slash","road-circle-xmark","user-minus","mars-stroke-v","glass-cheers","clipboard","house-circle-exclamation","file-upload","wifi","bathtub","underline","user-pen","signature","stroopwafel","bold","anchor-lock","building-ngo","manat-sign","not-equal","border-top-left","map-marked-alt","jedi","square-poll-vertical","mug-hot","car-battery","gift","dice-two","chess-queen","glasses","chess-board","building-circle-check","person-chalkboard","mars-stroke-right","hand-rock","square-caret-up","cloud-showers-water","chart-bar","hands-wash","less-than-equal","train","low-vision","crow","sailboat","window-restore","square-plus","torii-gate","frog","bucket","image","microphone","cow","caret-up","screwdriver","folder-closed","house-tsunami","square-nfi","arrow-up-from-ground-water","martini-glass","undo-alt","table-columns","lemon","head-side-mask","handshake","gem","dolly","smoking","minimize","monument","snowplow","angles-right","cannabis","play-circle","tablets","ethernet","euro","chair","circle-check","stop-circle","drafting-compass","plate-wheat","icicles","person-shelter","neuter","id-badge","marker","laugh-beam","helicopter-symbol","universal-access","circle-chevron-up","lari-sign","volcano","person-walking-dashed-line-arrow-right","sterling-sign","viruses","square-person-confined","user-tie","long-arrow-down","tent-arrow-down-to-line","certificate","reply-all","suitcase","skating","funnel-dollar","camera-retro","circle-arrow-down","file-import","square-arrow-up-right","box-open","scroll","spa","location-pin-lock","pause","hill-avalanche","thermometer-empty","bomb","registered","vcard","scale-unbalanced-flip","subscript","directions","burst","laptop-house","tired","money-bills","smog","crutch","cloud-upload","palette","arrows-turn-right","vest","ferry","arrows-down-to-people","sprout","left-right","boxes-packing","circle-arrow-left","group-arrows-rotate","bowl-food","candy-cane","sort-amount-down","thunderstorm","text-slash","smile-wink","file-word","file-powerpoint","arrows-left-right","house-lock","cloud-download","children","chalkboard","user-large-slash","envelope-open","handshake-simple-slash","mattress-pillow","guarani-sign","sync","fire-extinguisher","cruzeiro-sign","greater-than-equal","shield-halved","book-atlas","virus","envelope-circle-check","layer-group","arrows-to-dot","archway","heart-circle-check","house-damage","file-zipper","square","martini-glass-empty","couch","cedi-sign","italic","church","comments-dollar","democrat","z","skiing","road-lock","a","temperature-down","feather-pointed","p","snowflake","newspaper","rectangle-ad","circle-arrow-right","filter-circle-xmark","locust","unsorted","list-ol","person-dress-burst","money-check-dollar","vector-square","bread-slice","language","kiss-wink-heart","filter","question","file-signature","up-down-left-right","house-chimney-user","hand-holding-heart","puzzle-piece","money-check","star-half-stroke","code","whiskey-glass","building-circle-exclamation","magnifying-glass-chart","external-link","cubes-stacked","won","virus-covid","austral-sign","f","leaf","road","taxi","person-circle-plus","pie-chart","bolt-lightning","sack-xmark","file-excel","file-contract","fish-fins","building-flag","grin-beam","object-ungroup","poop","map-marker","kaaba","toilet-paper","helmet-safety","eject","circle-right","plane-circle-check","meh-rolling-eyes","object-group","line-chart","mask-ventilator","arrow-right","signs-post","cash-register","person-circle-question","h","tarp","tools","arrows-to-eye","plug-circle-bolt","heart","mars-and-venus","house-user","dumpster-fire","house-crack","martini-glass-citrus","surprise","bottle-water","pause-circle","toilet-paper-slash","apple-whole","kitchen-set","r","thermometer-quarter","cube","bitcoin-sign","shield-dog","solar-panel","lock-open","elevator","money-bill-transfer","money-bill-trend-up","house-flood-water-circle-arrow-right","square-poll-horizontal","circle","fast-backward","recycle","user-astronaut","plane-slash","trademark","basketball","satellite-dish","circle-up","mobile-screen-button","volume-up","users-rays","wallet","clipboard-check","file-audio","hamburger","wrench","bugs","rupee","file-image","question-circle","plane-departure","handshake-slash","book-bookmark","code-branch","hat-cowboy","bridge","phone-flip","truck-front","cat","anchor-circle-exclamation","truck-field","route","clipboard-question","panorama","comment-medical","teeth-open","file-circle-minus","tags","wine-glass","fast","meh-blank","square-parking","house-signal","tasks-alt","faucet-drip","dolly-flatbed","smoking-ban","terminal","mobile-button","house-medical-flag","shopping-basket","tape","bus-simple","eye","sad-cry","audio-description","person-military-to-person","file-shield","user-slash","pen","tower-observation","file-code","signal","bus","heart-circle-xmark","house-chimney","window-maximize","frown","prescription","store-alt","save","vihara","scale-unbalanced","sort-up","commenting","plant-wilt","diamond","grin-squint","hand-holding-usd","bacterium","hand-pointer","drum-steelpan","hand-scissors","praying-hands","redo","biohazard","location","mars-double","child-dress","users-between-lines","lungs-virus","grin-tears","phone","calendar-xmark","child-reaching","head-side-virus","user-gear","sort-numeric-up","door-closed","shield-virus","dice-six","mosquito-net","bridge-water","person-booth","text-width","hat-wizard","fancy","person-digging","trash","tachometer-average","book-medical","poo","quote-right","tshirt","cubes","divide","tenge","headphones","hands-holding","hands-clapping","republican","arrow-left","person-circle-xmark","ruler","align-left","dice-d6","restroom","j","users-viewfinder","file-video","up-right-from-square","th","file-pdf","book-bible","o","suitcase-medical","user-secret","otter","person-dress","comment-dollar","business-time","th-large","tanakh","volume-control-phone","hat-cowboy-side","clipboard-user","child","lira-sign","satellite","plane-lock","tag","comment","cake","envelope","angles-up","paperclip","arrow-right-to-city","ribbon","lungs","sort-numeric-up-alt","litecoin-sign","border-none","circle-nodes","parachute-box","indent","truck-field-un","hourglass","mountain","user-md","info-circle","cloud-meatball","camera","square-virus","meteor","car-on","sleigh","sort-numeric-down","hand-holding-water","water","calendar-check","braille","prescription-bottle-medical","landmark","truck","crosshairs","person-cane","tent","vest-patches","check-double","sort-alpha-down","money-bill-wheat","cookie","undo","hdd","grin-squint-tears","dumbbell","rectangle-list","tarp-droplet","house-medical-circle-check","skiing-nordic","calendar-plus","plane-arrival","circle-left","train-subway","chart-gantt","inr","crop-simple","money-bill-alt","long-arrow-alt-left","dna","virus-slash","subtract","chess","long-arrow-left","plug-circle-check","street-view","franc-sign","volume-off","hands-asl-interpreting","gear","tint-slash","mosque","mosquito","star-of-david","person-military-rifle","shopping-cart","vials","plug-circle-plus","place-of-worship","grip-vertical","level-up","u","square-root-variable","clock","step-backward","pallet","faucet","baseball-bat-ball","s","timeline","keyboard","caret-down","house-chimney-medical","thermometer-three-quarters","mobile-screen","plane-up","piggy-bank","battery-half","mountain-city","coins","khanda","sliders","folder-tree","network-wired","map-pin","hamsa","cent-sign","flask","person-pregnant","wand-sparkles","ellipsis-vertical","ticket","power-off","right-long","flag-usa","laptop-file","tty","diagram-next","person-rifle","house-medical-circle-exclamation","closed-captioning","person-hiking","venus-double","images","calculator","people-pulling","n","tram","cloud-rain","building-circle-xmark","ship","arrows-down-to-line","download","grin","delete-left","eyedropper","file-circle-check","forward","mobile","meh","align-center","book-skull","id-card","outdent","heart-circle-exclamation","house","calendar-week","laptop-medical","b","file-medical","dice-one","kiwi-bird","exchange","rotate-right","utensils","sort-amount-up","mill-sign","bowl-rice","skull","tower-broadcast","truck-pickup","up-long","stop","code-merge","upload","hurricane","mound","toilet-portable","compact-disc","file-download","caravan","shield-cat","zap","glass-water","oil-well","vault","mars","toilet","plane-circle-xmark","yen","ruble","sun","guitar","laugh-wink","horse-head","bore-hole","industry","circle-down","arrows-turn-to-dots","florin-sign","sort-amount-down-alt","less-than","angle-down","car-tunnel","head-side-cough","grip-lines","thumbs-down","user-lock","long-arrow-right","anchor-circle-xmark","ellipsis","chess-pawn","kit-medical","person-through-window","toolbox","hands-holding-circle","bug","credit-card","car","hand-holding-hand","book-reader","mountain-sun","arrows-left-right-to-line","dice-d20","truck-droplet","file-circle-xmark","temperature-up","medal","bed","square-h","podcast","thermometer-full","bell","superscript","plug-circle-xmark","star-of-life","phone-slash","paint-roller","handshake-angle","map-marker-alt","file","greater-than","swimmer","arrow-down","tint","eraser","globe-americas","person-burst","dove","battery-empty","socks","inbox","section","tachometer-alt","envelope-open-text","hospital","wine-bottle","chess-rook","stream","dharmachakra","hotdog","person-walking-with-cane","drum","ice-cream","heart-circle-bolt","fax","paragraph","vote-yea","star-half","boxes","link","ear-listen","tree-city","play","font","rupiah-sign","search","table-tennis","person-dots-from-line","trash-restore-alt","naira-sign","cart-arrow-down","walkie-talkie","file-pen","receipt","square-pen","suitcase-rolling","person-circle-exclamation","chevron-down","battery","skull-crossbones","code-compare","list-ul","school-lock","tower-cell","long-arrow-alt-down","ranking-star","chess-king","person-harassing","brazilian-real-sign","landmark-dome","arrow-up","tv","shrimp","tasks","jug-detergent","user-circle","user-shield","wind","car-crash","y","snowboarding","fast","fish","user-graduate","circle-half-stroke","clapperboard","radiation-alt","baseball","jet-fighter-up","project-diagram","copy","volume-xmark","hand-sparkles","grip","share-square","child-rifle","gun","square-phone","plus","expand","computer","xmark","arrows","chalkboard-user","peso-sign","building-shield","baby","users-line","quote-left","tractor","trash-restore","arrow-down-up-lock","lines-leaning","ruler-combined","copyright","equals","blender","teeth","sheqel","map","rocket","photo-video","folder-minus","store","arrow-trend-up","plug-circle-minus","sign","bezier-curve","bell-slash","tablet","school-flag","fill","angle-up","drumstick-bite","holly-berry","chevron-left","bacteria","hand-lizard","notdef","disease","briefcase-medical","genderless","chevron-right","retweet","car-rear","pump-soap","video-slash","battery-quarter","radio","carriage-baby","traffic-light","thermometer","vr-cardboard","hand-middle-finger","percentage","truck-moving","glass-water-droplet","display","smile","thumbtack","trophy","pray","hammer","hand-peace","sync-alt","spinner","robot","peace","gears","warehouse","arrow-up-right-dots","splotch","grin-hearts","dice-four","sim-card","transgender","mercury","level-down","falling-burst","award","ticket-simple","building","angles-left","qrcode","history","grin-beam-sweat","file-export","shield","sort-amount-up-alt","house-medical","golf-ball","circle-chevron-left","house-chimney-window","pen-nib","tent-arrow-turn-left","tents","wand-magic","dog","carrot","moon","wine-glass-empty","cheese","yin-yang","music","code-commit","temperature-low","person-biking","broom","shield-heart","gopuram","globe-oceania","xmark-square","hashtag","up-right-and-down-left-from-center","oil-can","t","hippo","chart-column","infinity","vial-circle-check","person-arrow-down-to-line","voicemail","fan","person-walking-luggage","up-down","cloud-moon-rain","calendar","trailer","haykal","sd-card","dragon","shoe-prints","plus-circle","grin-tongue-wink","hand-holding","plug-circle-exclamation","unlink","clone","person-walking-arrow-loop-left","sort-alpha-up-alt","fire-flame-curved","tornado","file-circle-plus","quran","anchor","border-all","face-angry","cookie-bite","arrow-trend-down","rss","draw-polygon","scale-balanced","tachometer","shower","desktop","m","th-list","sms","book","user-plus","check","battery-three-quarters","house-circle-check","angle-left","diagram-successor","truck-arrow-right","arrows-split-up-and-left","hand-fist","cloud-moon","briefcase","falling","portrait","user-tag","rug","globe-europe","luggage-cart","window-close","baht-sign","book-open","journal-whills","handcuffs","warning","database","share","bottle-droplet","face","hill-rockslide","right-left","paper-plane","road-circle-exclamation","dungeon","align-right","money-bill-wave-alt","life-ring","signing","calendar-day","water-ladder","arrows-v","grimace","wheelchair-move","turn-down","person-walking-arrow-right","square-envelope","dice","bowling-ball","brain","bandage","calendar-minus","xmark-circle","gifts","hotel","globe-asia","id-card-clip","search-plus","thumbs-up","user-clock","hand-dots","file-invoice","window-minimize","mug-saucer","brush","mask","search-minus","ruler-vertical","user-large","train-tram","user-nurse","syringe","cloud-sun","stopwatch-20","square-full","magnet","jar","sticky-note","bug-slash","arrow-up-from-water-pump","bone","user-injured","sad-tear","plane","tent-arrows-down","exclamation","arrows-spin","print","turkish-lira","usd","x","search-dollar","users-gear","person-military-pointing","university","umbrella","trowel","d","stapler","theater-masks","kip-sign","hand-point-left","handshake-simple","jet-fighter","square-share-nodes","barcode","plus-minus","video","mortar-board","hand-holding-medical","person-circle-check","turn-up"];function Be(e){function n(){const a={position:"fixed",color:"white",backgroundColor:e.isError?"#e52207":p.colors.success,width:300,top:10,left:(window.innerWidth-320)/2,padding:15};return t.jsxs("div",{style:a,children:[t.jsx(E,{icon:e.isError?"xmark-circle":"circle-check",style:{marginRight:5}}),e.text]})}return n()}function z(e,n=!1){const a=document.createElement("div");a.classList.add("message"),P.createRoot(document.body.appendChild(a)).render(t.jsx(Be,{text:e,isError:n})),setTimeout(function(){a.remove()},3e3)}function se(){document.querySelectorAll(".message").forEach(function(e){e.remove()})}function ee(e){function n(){const a={color:p.colors.info,backgroundColor:p.background.info,padding:20,display:"flex",justifyContent:"space-between",marginTop:10,marginBottom:10};return t.jsxs("div",{style:a,children:[t.jsx("div",{children:e.data.text}),e.children&&t.jsx("div",{children:e.children})]})}return n()}function Ae(e){const n=e.data;n.store&&we(n.store),n.redirect&&n.redirect.length>2?(n.message&&localStorage.setItem("message",n.message),document.location.href=V(n.redirect)):n.message&&z(n.message)}function we(e){Object.keys(e).map(function(n){e[n]?(localStorage.setItem(n,e[n]),n=="token"&&(document.cookie="token="+e[n]+";path=/")):(localStorage.removeItem(n,e[n]),n=="token"&&(document.cookie="token=;expires=Thu, 01 Jan 1970 00:00:00 GMT;path=/"))})}function O(e){return e.replace("/app/","/api/")}function V(e){return e.replaceAll("/api/","/app/")}function B(e,n,a,r){const i=localStorage.getItem("token");var o={Accept:"application/json",TZ:Intl.DateTimeFormat().resolvedOptions().timeZone};i&&(o.Authorization="Token "+i);const d=O(n);var c={method:e,headers:new Headers(o),ajax:1};r&&(c.body=r);var s=null,u=null;fetch(d,c).then(function(l){if(s=l,u=s.headers.get("Content-Type"),u=="application/json")return l.text();if(u.indexOf("text")<0||u.indexOf("csv")>=0||u.indexOf("pdf")>=0)return l.arrayBuffer();l.text()}).then(l=>{if(u=="application/json"){var m=JSON.parse(l||"{}");typeof m=="object"&&m.type=="redirect"&&!m.autosubmit?document.location.href=V(m.url):a&&a(m,s)}else if(u.indexOf("text")<0||u.indexOf("csv")>=0||u.indexOf("pdf")>=0){var f=window.URL.createObjectURL(new Blob([new Uint8Array(l)],{type:u})),w=document.createElement("a");w.href=f,u.indexOf("excel")>=0?w.download="Download.xls":u.indexOf("pdf")>=0?w.download="Download.pdf":u.indexOf("zip")>=0?w.download="Download.zip":u.indexOf("json")>=0?w.download="Download.json":u.indexOf("csv")>=0?w.download="Download.csv":u.indexOf("png")>=0&&(w.download="Download.png"),document.body.appendChild(w),w.click()}else a&&a(l,s)})}function H(e){if(e===null||e==="")return"-";if(e===!0)return"Sim";if(e===!1)return"Não";if(typeof e=="number"){var n=e.toString().split(".");return n.length==1?e.toString().replace(/\B(?=(\d{3})+(?!\d))/g,"."):(n[0]=n[0].toString().replace(/\B(?=(\d{3})+(?!\d))/g,"."),n[1]=n[1].substring(0,2),n[1].length==1&&(n[1]=n[1]+"0"),n[0]+","+n[1])}if(typeof e=="string"){if(e.length==7&&e[0]=="#")return t.jsx(x,{data:{type:"color",value:e}});if(e.length==19&&e[13]==":"&&e[16]==":"){var n=e.split(" "),a=n[0],r=n[1];return r=="00:00:00"?a:a+" "+r}else if(e.indexOf(`
2
2
  `)>=0)return e.split(`
3
- `).map(function(i,o){return t.jsx("div",{children:i},Math.random())});return e}return typeof e=="object"&&e.type?t.jsx(x,{data:e}):typeof e=="object"&&Array.isArray(e)?e.length==0?"-":typeof e[0]=="object"&&e[0].type!=null?t.jsx(t.Fragment,{children:e.map(function(i){return t.jsx(x,{data:i},Math.random())})}):t.jsx("ul",{style:{padding:0,marginLeft:17},children:e.map(function(i){return t.jsx("li",{children:i},Math.random())})}):typeof e=="object"&&JSON.stringify(Object.keys(e))==JSON.stringify(["id","text"])?e.text:JSON.stringify(e)}function ce(){document.querySelector(".layer")==null&&P.createRoot(document.body.appendChild(document.createElement("div"))).render(t.jsx(_e,{}))}function je(e,n){se(),ce(),window.reloader=n;for(var a=document.getElementsByTagName("dialog"),r=0;r<a.length;r++)a[r].style.display="none";P.createRoot(document.body.appendChild(document.createElement("div"))).render(t.jsx(Fe,{url:O(e)}))}function Re(e){se(),ce(),P.createRoot(document.body.appendChild(document.createElement("div"))).render(t.jsx(We,{url:O(e)}))}function J(e){e!=null&&showMessage(e);for(var n=document.getElementsByTagName("dialog"),a=0;a<n.length;a++)if(a==n.length-1){var r=n[a];r.close(),r.classList.remove("opened"),r.remove(),a==0?(document.querySelector(".layer").style.display="none",window.reloader&&window.reloader()):n[a-1].style.display="block"}}function Oe(e){se(),ce(),P.createRoot(document.body.appendChild(document.createElement("div"))).render(t.jsx(ze,{actions:e}))}function _e(e){const n={backgroundColor:"black",bottom:0,left:0,position:"fixed",right:0,top:0,opacity:.7,display:"none"};return t.jsx("div",{className:"layer",onClick:function(){J()},style:n})}function Fe(e){const[n,a]=N.useState(null),[r,i]=N.useState(0);N.useEffect(()=>{o(O(e.url)),document.querySelector(".layer").style.display="block"},[]);function o(s){B("GET",O(s),function(u){a(u),i(r+1)})}function d(){const s={maxWidth:800},u={textAlign:"right",cursor:"pointer",marginTop:-15};if(n)return t.jsxs("div",{style:s,children:[t.jsx("div",{style:u,children:t.jsx(E,{icon:"x",onClick:()=>J()})}),t.jsx(x,{data:n})]})}const c={minWidth:window.innerWidth<800?"calc(100% - 60px)":800,display:n?"block":"none",maxWidth:800,top:window.scrollY+40,border:0};return t.jsx("dialog",{style:c,children:d()},r)}function We(e){var n=Math.random();N.useEffect(()=>{document.querySelector(".layer").style.display="block";var r=document.getElementById(n);r.style.top=document.documentElement.scrollTop+100},[]);function a(){const r={minWidth:window.innerWidth<800?"calc(100% - 60px)":800,display:"block",maxWidth:800,top:window.scrollY+40,border:0},i={float:"right",cursor:"pointer",marginTop:-20};return t.jsxs("dialog",{style:r,id:n,children:[t.jsx("div",{style:i,children:t.jsx(E,{icon:"x",onClick:()=>J()})}),t.jsx("iframe",{src:O(e.url),width:"100%",height:500,style:{border:0}})]})}return a()}function ze(e){const n=Math.random();N.useEffect(()=>{document.querySelector(".layer").style.display="block"},[]);function a(){const o={width:"100%",borderBottom:"solid 1px #DDDD",padding:20};return t.jsx("div",{align:"center",style:{},children:e.actions.map(function(d){return t.jsx("div",{style:o,onClick:r,children:t.jsx(W,{data:d,strech:!0})},Math.random())})})}function r(){const o=document.getElementById(n);o.close(),o.classList.remove("opened"),o.remove(),document.querySelector(".layer").style.display="none"}const i={width:"auto",display:"block",position:"fixed",bottom:0,border:0,padding:0};return t.jsx("dialog",{id:n,style:i,children:a()})}function T(e){return e!=null&&(e=e.toString().replace("-","").normalize("NFD").replace("_","").toLowerCase()),e}const xe={};function A(e){let n="",a=window.document.styleSheets[0];e.split("}").forEach(r=>{let i=(r+"}").replace(/\r?\n|\r/g,"");n=n===""?i:n+i,n.split("{").length===n.split("}").length&&xe[n]==null&&(a.insertRule(n,a.cssRules.length),n="",xe[n]=!0)})}function W(e){const n=e.id||Math.random(),[a,r]=N.useState(e.data.name);function i(c){c.preventDefault();var s=e.data.url;e.data.urlfunc&&(s=e.data.urlfunc()),e.onClick?(a&&r("Aguarde...."),e.onClick(c)):e.data.modal==!1?window.load(V(s)):je(s)}function o(){return e.strech?e.data.name:e.data.icon?e.compact||!e.data.name||window.innerWidth<800?t.jsx(E,{icon:e.data.icon}):t.jsxs(t.Fragment,{children:[t.jsx(E,{icon:e.data.icon,style:{paddingRight:10}}),e.data.name||""]}):e.data.name}function d(){A(`
3
+ `).map(function(i,o){return t.jsx("div",{children:i},Math.random())});return e}return typeof e=="object"&&e.type?t.jsx(x,{data:e}):typeof e=="object"&&Array.isArray(e)?e.length==0?"-":typeof e[0]=="object"&&e[0].type!=null?t.jsx(t.Fragment,{children:e.map(function(i){return t.jsx(x,{data:i},Math.random())})}):t.jsx("ul",{style:{padding:0,marginLeft:17},children:e.map(function(i){return t.jsx("li",{children:i},Math.random())})}):typeof e=="object"&&JSON.stringify(Object.keys(e))==JSON.stringify(["id","text"])?e.text:JSON.stringify(e)}function ce(){document.querySelector(".layer")==null&&P.createRoot(document.body.appendChild(document.createElement("div"))).render(t.jsx(_e,{}))}function je(e,n){se(),ce(),window.reloader=n;for(var a=document.getElementsByTagName("dialog"),r=0;r<a.length;r++)a[r].style.display="none";P.createRoot(document.body.appendChild(document.createElement("div"))).render(t.jsx(Fe,{url:O(e)}))}function Re(e){se(),ce(),P.createRoot(document.body.appendChild(document.createElement("div"))).render(t.jsx(We,{url:O(e)}))}function J(e){e!=null&&showMessage(e);for(var n=document.getElementsByTagName("dialog"),a=0;a<n.length;a++)if(a==n.length-1){var r=n[a];r.close(),r.classList.remove("opened"),r.remove(),a==0?(document.querySelector(".layer").style.display="none",window.reloader&&window.reloader()):n[a-1].style.display="block"}}function Oe(e){se(),ce(),P.createRoot(document.body.appendChild(document.createElement("div"))).render(t.jsx(ze,{actions:e}))}function _e(e){const n={backgroundColor:"black",bottom:0,left:0,position:"fixed",right:0,top:0,opacity:.7,display:"none"};return t.jsx("div",{className:"layer",onClick:function(){J()},style:n})}function Fe(e){const[n,a]=I.useState(null),[r,i]=I.useState(0);I.useEffect(()=>{o(O(e.url)),document.querySelector(".layer").style.display="block"},[]);function o(s){B("GET",O(s),function(u){a(u),i(r+1)})}function d(){const s={maxWidth:800},u={textAlign:"right",cursor:"pointer",marginTop:-15};if(n)return t.jsxs("div",{style:s,children:[t.jsx("div",{style:u,children:t.jsx(E,{icon:"x",onClick:()=>J()})}),t.jsx(x,{data:n})]})}const c={minWidth:window.innerWidth<800?"calc(100% - 60px)":800,display:n?"block":"none",maxWidth:800,top:window.scrollY+40,border:0};return t.jsx("dialog",{style:c,children:d()},r)}function We(e){var n=Math.random();I.useEffect(()=>{document.querySelector(".layer").style.display="block";var r=document.getElementById(n);r.style.top=document.documentElement.scrollTop+100},[]);function a(){const r={minWidth:window.innerWidth<800?"calc(100% - 60px)":800,display:"block",maxWidth:800,top:window.scrollY+40,border:0},i={float:"right",cursor:"pointer",marginTop:-20};return t.jsxs("dialog",{style:r,id:n,children:[t.jsx("div",{style:i,children:t.jsx(E,{icon:"x",onClick:()=>J()})}),t.jsx("iframe",{src:O(e.url),width:"100%",height:500,style:{border:0}})]})}return a()}function ze(e){const n=Math.random();I.useEffect(()=>{document.querySelector(".layer").style.display="block"},[]);function a(){const o={width:"100%",borderBottom:"solid 1px #DDDD",padding:20};return t.jsx("div",{align:"center",style:{},children:e.actions.map(function(d){return t.jsx("div",{style:o,onClick:r,children:t.jsx(W,{data:d,strech:!0})},Math.random())})})}function r(){const o=document.getElementById(n);o.close(),o.classList.remove("opened"),o.remove(),document.querySelector(".layer").style.display="none"}const i={width:"auto",display:"block",position:"fixed",bottom:0,border:0,padding:0};return t.jsx("dialog",{id:n,style:i,children:a()})}function T(e){return e!=null&&(e=e.toString().replace("-","").normalize("NFD").replace("_","").toLowerCase()),e}const xe={};function A(e){let n="",a=window.document.styleSheets[0];e.split("}").forEach(r=>{let i=(r+"}").replace(/\r?\n|\r/g,"");n=n===""?i:n+i,n.split("{").length===n.split("}").length&&xe[n]==null&&(a.insertRule(n,a.cssRules.length),n="",xe[n]=!0)})}function W(e){const n=e.id||Math.random(),[a,r]=I.useState(e.data.name);function i(c){c.preventDefault();var s=e.data.url;e.data.urlfunc&&(s=e.data.urlfunc()),e.onClick?(a&&r("Aguarde...."),e.onClick(c)):e.data.modal==!1?window.load(V(s)):je(s)}function o(){return e.strech?e.data.name:e.data.icon?e.compact||!e.data.name||window.innerWidth<800?t.jsx(E,{icon:e.data.icon}):t.jsxs(t.Fragment,{children:[t.jsx(E,{icon:e.data.icon,style:{paddingRight:10}}),e.data.name||""]}):e.data.name}function d(){A(`
4
4
  .action{
5
5
  padding: 12px;
6
6
  text-decoration: none;
@@ -27,7 +27,7 @@ import{j as t,c as P,r as N,R as Ie}from"./react.min.js";const p={colors:{primar
27
27
  list-style-type: none;
28
28
  padding: 10px;
29
29
  }
30
- `),t.jsxs("div",{className:"dropdown",children:[t.jsx("div",{onClick:a,"data-label":T(e.dataLabel),children:e.children}),e.actions&&e.actions.length>0&&t.jsx("ul",{onMouseLeave:r,children:e.actions.map(o=>t.jsx("li",{children:t.jsx(W,{data:o,style:{padding:0,whiteSpace:"normal"}})},Math.random()))})]})}return i()}function F({id:e,href:n,modal:a,imodal:r,children:i,onClick:o,dataLabel:d,style:c}){const s=n&&n.indexOf("/media/")<0?V(n):n;function u(m){s.indexOf("http")==0?document.location.href=s:(m.preventDefault(),a?je(s):r?Re(s):window.load(s))}function l(){return t.jsx("a",{id:e,onClick:o||u,href:s||"#","data-label":T(d),style:c,children:i})}return l()}function Y(e){function n(){const r={display:"grid",gridGap:0,gridTemplateColumns:"repeat(auto-fit, minmax("+(e.width||200)+"px, 1fr))",alignItems:e.alignItems||"end"};return t.jsx("div",{style:r,children:e.children},Math.random())}return n()}function Q(e){function n(){return e.data.url?t.jsx(He,{data:e.data}):t.jsx(ke,{data:e.data})}return n()}function ke(e){function n(){if(e.data.label)return t.jsxs(t.Fragment,{children:[t.jsx("strong",{children:e.data.label}),":",t.jsx("br",{})]})}function a(){return e.data.url&&e.data.url.indexOf("only=")<0?t.jsx(F,{href:e.data.url,children:t.jsxs(t.Fragment,{children:[H(e.data.value),t.jsx(E,{icon:"external-link",style:{marginLeft:10}})]})}):H(e.data.value)}function r(){const i={minWidth:e.width+"%",marginTop:5,marginBottom:5};return t.jsxs("div",{style:i,children:[n(),a()]})}return r()}function He(e){const n=Math.random(),[a,r]=N.useState(e.data);function i(d){B("GET",d,function(c){r(c)})}function o(){return window[n]=()=>i(e.data.url),t.jsx("div",{className:e.data.url&&"reloadable",id:n,children:t.jsx(ke,{data:a,width:100})})}return o()}function ie(e){function n(){return t.jsx("div",{style:{verticalAlign:"center",textAlign:"right",lineHeight:"3rem"},children:e.data.map(function(a){return t.jsx(W,{data:a,default:!0,compact:!(window.innerWidth>800)},Math.random())})})}return n()}function ue(e){function n(){return e.data.map(function(a){if(Array.isArray(a))return t.jsx(Y,{width:300,alignItems:"start",children:a.map(r=>t.jsx(Q,{data:r,width:100/a.length},Math.random()))},Math.random());if(a.label!="ID"&&(e.exclude==null||a.label!=e.exclude))return t.jsx("div",{children:t.jsx(Q,{data:a,width:100})},Math.random())})}return n()}function Pe(e){function n(){const o={marginTop:5,marginBottom:5};return t.jsx("h3",{style:o,children:e.data.title})}function a(){return t.jsx(ue,{data:e.data.data})}function r(){return t.jsx(ie,{data:e.data.actions})}function i(){const o={border:"solid 1px #DDD",padding:10,borderStyle:"dashed"};return t.jsxs("div",{style:o,children:[n(),a(),r()]})}return i()}function Ue(e){A(`
30
+ `),t.jsxs("div",{className:"dropdown",children:[t.jsx("div",{onClick:a,"data-label":T(e.dataLabel),children:e.children}),e.actions&&e.actions.length>0&&t.jsx("ul",{onMouseLeave:r,children:e.actions.map(o=>t.jsx("li",{children:t.jsx(W,{data:o,style:{padding:0,whiteSpace:"normal"}})},Math.random()))})]})}return i()}function F({id:e,href:n,modal:a,imodal:r,children:i,onClick:o,dataLabel:d,style:c}){const s=n&&n.indexOf("/media/")<0?V(n):n;function u(m){s.indexOf("http")==0?document.location.href=s:(m.preventDefault(),a?je(s):r?Re(s):window.load(s))}function l(){return t.jsx("a",{id:e,onClick:o||u,href:s||"#","data-label":T(d),style:c,children:i})}return l()}function Y(e){function n(){const r={display:"grid",gridGap:0,gridTemplateColumns:"repeat(auto-fit, minmax("+(e.width||200)+"px, 1fr))",alignItems:e.alignItems||"end"};return t.jsx("div",{style:r,children:e.children},Math.random())}return n()}function Q(e){function n(){return e.data.url?t.jsx(He,{data:e.data}):t.jsx(ke,{data:e.data})}return n()}function ke(e){function n(){if(e.data.label)return t.jsxs(t.Fragment,{children:[t.jsx("strong",{children:e.data.label}),":",t.jsx("br",{})]})}function a(){return e.data.url&&e.data.url.indexOf("only=")<0?t.jsx(F,{href:e.data.url,children:t.jsxs(t.Fragment,{children:[H(e.data.value),t.jsx(E,{icon:"external-link",style:{marginLeft:10}})]})}):H(e.data.value)}function r(){const i={minWidth:e.width+"%",marginTop:5,marginBottom:5};return t.jsxs("div",{style:i,children:[n(),a()]})}return r()}function He(e){const n=Math.random(),[a,r]=I.useState(e.data);function i(d){B("GET",d,function(c){r(c)})}function o(){return window[n]=()=>i(e.data.url),t.jsx("div",{className:e.data.url&&"reloadable",id:n,children:t.jsx(ke,{data:a,width:100})})}return o()}function ie(e){function n(){return t.jsx("div",{style:{verticalAlign:"center",textAlign:"right",lineHeight:"3rem"},children:e.data.map(function(a){return t.jsx(W,{data:a,default:!0,compact:!(window.innerWidth>800)},Math.random())})})}return n()}function ue(e){function n(){return e.data.map(function(a){if(Array.isArray(a))return t.jsx(Y,{width:300,alignItems:"start",children:a.map(r=>t.jsx(Q,{data:r,width:100/a.length},Math.random()))},Math.random());if(a.label!="ID"&&(e.exclude==null||a.label!=e.exclude))return t.jsx("div",{children:t.jsx(Q,{data:a,width:100})},Math.random())})}return n()}function Pe(e){function n(){const o={marginTop:5,marginBottom:5};return t.jsx("h3",{style:o,children:e.data.title})}function a(){return t.jsx(ue,{data:e.data.data})}function r(){return t.jsx(ie,{data:e.data.actions})}function i(){const o={border:"solid 1px #DDD",padding:10,borderStyle:"dashed"};return t.jsxs("div",{style:o,children:[n(),a(),r()]})}return i()}function Ue(e){A(`
31
31
  .cards{
32
32
  padding: 10px;
33
33
  box-shadow: 0 1px 6px rgba( 0, 0, 0 , 0.16 );
@@ -45,11 +45,11 @@ import{j as t,c as P,r as N,R as Ie}from"./react.min.js";const p={colors:{primar
45
45
  height: 150px !important;
46
46
  object-fit: cover;
47
47
  }
48
- `);function n(){return t.jsx("h3",{children:e.data.title})}function a(){return t.jsx(ue,{data:e.data.data})}function r(){return t.jsx(ie,{data:e.data.actions})}function i(){return t.jsxs("div",{className:"cards",children:[n(),a(),r()]})}return i()}function Ge(e){function n(){const d={paddingTop:15,marginBottom:10,color:"#1151b3"};return t.jsx("div",{style:d,children:t.jsx("strong",{children:e.data.title})})}function a(){return t.jsx(ue,{data:e.data.data,exclude:e.data.data[1].label})}function r(){const d={position:"absolute",width:140,marginLeft:-128,display:"flex",justifyContent:"space-between",marginTop:10,alignItems:"flex-end"},c={maxWidth:100},s={width:20,height:20,border:"3px solid #1151b3",backgroundColor:"white",borderRadius:"50%"};return t.jsxs("div",{style:d,children:[t.jsx("div",{className:"bold",style:c,children:e.data.data[1].value}),t.jsx("div",{style:s})]})}function i(){return t.jsx(ie,{data:e.data.actions})}function o(){const d={borderBottom:"solid 1px #DDD",padding:0,borderBottomStyle:"dashed",marginLeft:140,borderLeft:"3px solid #1151b3",marginBottom:-10},c={marginLeft:20};return t.jsxs("div",{style:d,children:[r(),t.jsxs("div",{style:c,children:[n(),a(),i()]})]})}return o()}function Ye(e){const n=Math.random(),[a,r]=N.useState(e.data);A(`
48
+ `);function n(){return t.jsx("h3",{children:e.data.title})}function a(){return t.jsx(ue,{data:e.data.data})}function r(){return t.jsx(ie,{data:e.data.actions})}function i(){return t.jsxs("div",{className:"cards",children:[n(),a(),r()]})}return i()}function Ge(e){function n(){const d={paddingTop:15,marginBottom:10,color:"#1151b3"};return t.jsx("div",{style:d,children:t.jsx("strong",{children:e.data.title})})}function a(){return t.jsx(ue,{data:e.data.data,exclude:e.data.data[1].label})}function r(){const d={position:"absolute",width:140,marginLeft:-128,display:"flex",justifyContent:"space-between",marginTop:10,alignItems:"flex-end"},c={maxWidth:100},s={width:20,height:20,border:"3px solid #1151b3",backgroundColor:"white",borderRadius:"50%"};return t.jsxs("div",{style:d,children:[t.jsx("div",{className:"bold",style:c,children:e.data.data[1].value}),t.jsx("div",{style:s})]})}function i(){return t.jsx(ie,{data:e.data.actions})}function o(){const d={borderBottom:"solid 1px #DDD",padding:0,borderBottomStyle:"dashed",marginLeft:140,borderLeft:"3px solid #1151b3",marginBottom:-10},c={marginLeft:20};return t.jsxs("div",{style:d,children:[r(),t.jsxs("div",{style:c,children:[n(),a(),i()]})]})}return o()}function Ye(e){const n=Math.random(),[a,r]=I.useState(e.data);A(`
49
49
  .object-fieldset{
50
50
  margin-top: 10px;
51
51
  }
52
- `);function i(){return t.jsx(Se,{data:a})}function o(){const u={backgroundColor:"white",padding:15,marginBottom:15};return t.jsx("div",{style:u,children:d()})}function d(){return Array.isArray(a.data)?a.data.length==0?t.jsx("div",{children:"Nenhum registro encontrado."}):a.data.map(function(u){return Array.isArray(u)?t.jsx(Y,{width:300,children:u.map(l=>t.jsx(Q,{data:l,width:100/u.length},Math.random()))},Math.random()):t.jsx("div",{children:t.jsx(Q,{data:u,width:100})},Math.random())}):t.jsx(x,{data:a.data})}function c(u){B("GET",u,function(l){r(l)})}function s(){return e.data.url?(window[n]=()=>c(e.data.url),t.jsxs("div",{className:e.data.url?"reloadable object-fieldset":"object-fieldset",id:n,children:[i(),o()]})):t.jsxs("div",{className:"object-fieldset",children:[i(),o()]})}return s()}function Ve(e){const n=Math.random(),[a,r]=N.useState(e.data.actions);function i(){const c=e.data.url.indexOf("?")<0?"?":"&";return e.data.url+c+"only=actions"}function o(){B("GET",i(),function(c){r(c)})}function d(){return window[n]=()=>o(),t.jsx("div",{className:"reloadable",id:n,children:a.map(function(c){return t.jsx(W,{data:c,default:!0},Math.random())})})}return d()}function Xe(e){function n(){A(`
52
+ `);function i(){return t.jsx(Se,{data:a})}function o(){const u={backgroundColor:"white",padding:15,marginBottom:15};return t.jsx("div",{style:u,children:d()})}function d(){return Array.isArray(a.data)?a.data.length==0?t.jsx("div",{children:"Nenhum registro encontrado."}):a.data.map(function(u){return Array.isArray(u)?t.jsx(Y,{width:300,children:u.map(l=>t.jsx(Q,{data:l,width:100/u.length},Math.random()))},Math.random()):t.jsx("div",{children:t.jsx(Q,{data:u,width:100})},Math.random())}):t.jsx(x,{data:a.data})}function c(u){B("GET",u,function(l){r(l)})}function s(){return e.data.url?(window[n]=()=>c(e.data.url),t.jsxs("div",{className:e.data.url?"reloadable object-fieldset":"object-fieldset",id:n,children:[i(),o()]})):t.jsxs("div",{className:"object-fieldset",children:[i(),o()]})}return s()}function Ve(e){const n=Math.random(),[a,r]=I.useState(e.data.actions);function i(){const c=e.data.url.indexOf("?")<0?"?":"&";return e.data.url+c+"only=actions"}function o(){B("GET",i(),function(c){r(c)})}function d(){return window[n]=()=>o(),t.jsx("div",{className:"reloadable",id:n,children:a.map(function(c){return t.jsx(W,{data:c,default:!0},Math.random())})})}return d()}function Xe(e){function n(){A(`
53
53
  .object-title {
54
54
  display: flex;
55
55
  justify-content: space-between;
@@ -78,7 +78,7 @@ import{j as t,c as P,r as N,R as Ie}from"./react.min.js";const p={colors:{primar
78
78
  scrollbar-width: none; /* Firefox */
79
79
  min-height: 2rem;
80
80
  }
81
- `);const[n,a]=N.useState(0);function r(){return t.jsx("div",{className:"noscroll",style:{display:"inline-block",textAlign:"center",width:"100%",margin:"auto",marginBottom:20,overflowX:"auto"},children:e.data.map(function(i,o){return t.jsx(F,{href:i.url,style:{padding:5,fontWeight:n==o?"bold":"normal",borderBottom:n==o?"solid 3px #2670e8":"solid 3px inherite",textDecoration:"none",color:"#0c326f",margin:15},onClick:function(d){d.preventDefault(),a(o),e.loadContent(i.url)},dataLabel:T(i.title),children:i.title},Math.random())})})}return r()}function Ze(e){var n=Math.random();const[a,r]=N.useState(e.data.data[0]);function i(){return e.data.title!="Top"&&t.jsx("h2",{"data-label":T(e.data.title),children:e.data.title})}function o(){return t.jsx(ie,{data:e.data.actions})}function d(){return t.jsx(Qe,{data:e.data.data,loadContent:u})}function c(){var m={...a};m.title=null;const f={padding:0};return t.jsx("div",{style:f,children:t.jsx(x,{data:m},Math.random())})}function s(){const m={width:"50%",margin:"auto",border:"solid 0.5px #DDD",marginTop:30,marginBottom:30};return t.jsx("div",{style:m})}function u(m){B("GET",m,function(f){r(f)})}function l(){return window[n]=()=>u(a.url),e.data.data.length>0&&t.jsxs("div",{className:"reloadable",id:n,children:[i(),o(),d(),c(),s()]})}return l()}function Ke(){document.querySelectorAll(".reloadable").forEach(function(e){window[e.id]()})}function _({id:e,onClick:n,icon:a,label:r,display:i,primary:o,compact:d,spin:c}){function s(){return a?d||!r?t.jsx(E,{icon:a}):t.jsxs(t.Fragment,{children:[t.jsx(Le,{style:{marginRight:10,display:"none"}}),t.jsx(E,{icon:a,style:{marginRight:10}}),r||""]}):r}function u(){A(`
81
+ `);const[n,a]=I.useState(0);function r(){return t.jsx("div",{className:"noscroll",style:{display:"inline-block",textAlign:"center",width:"100%",margin:"auto",marginBottom:20,overflowX:"auto"},children:e.data.map(function(i,o){return t.jsx(F,{href:i.url,style:{padding:5,fontWeight:n==o?"bold":"normal",borderBottom:n==o?"solid 3px #2670e8":"solid 3px inherite",textDecoration:"none",color:"#0c326f",margin:15},onClick:function(d){d.preventDefault(),a(o),e.loadContent(i.url)},dataLabel:T(i.title),children:i.title},Math.random())})})}return r()}function Ze(e){var n=Math.random();const[a,r]=I.useState(e.data.data[0]);function i(){return e.data.title!="Top"&&t.jsx("h2",{"data-label":T(e.data.title),children:e.data.title})}function o(){return t.jsx(ie,{data:e.data.actions})}function d(){return t.jsx(Qe,{data:e.data.data,loadContent:u})}function c(){var m={...a};m.title=null;const f={padding:0};return t.jsx("div",{style:f,children:t.jsx(x,{data:m},Math.random())})}function s(){const m={width:"50%",margin:"auto",border:"solid 0.5px #DDD",marginTop:30,marginBottom:30};return t.jsx("div",{style:m})}function u(m){B("GET",m,function(f){r(f)})}function l(){return window[n]=()=>u(a.url),e.data.data.length>0&&t.jsxs("div",{className:"reloadable",id:n,children:[i(),o(),d(),c(),s()]})}return l()}function Ke(){document.querySelectorAll(".reloadable").forEach(function(e){window[e.id]()})}function _({id:e,onClick:n,icon:a,label:r,display:i,primary:o,compact:d,spin:c}){function s(){return a?d||!r?t.jsx(E,{icon:a}):t.jsxs(t.Fragment,{children:[t.jsx(Le,{style:{marginRight:10,display:"none"}}),t.jsx(E,{icon:a,style:{marginRight:10}}),r||""]}):r}function u(){A(`
82
82
  .button{
83
83
  padding: 12px;
84
84
  text-decoration: none;
@@ -89,8 +89,8 @@ import{j as t,c as P,r as N,R as Ie}from"./react.min.js";const p={colors:{primar
89
89
  width: fit-content;
90
90
  text-wrap: nowrap;
91
91
  }
92
- `);const l={display:i||"block"};return o?(l.backgroundColor=p.colors.primary,l.color="white"):(l.border="solid 1px "+p.colors.primary,l.color=p.colors.primary),t.jsx("a",{id:e,className:"button",style:l,"data-label":T(r||a),onClick:m=>{m.preventDefault(),a&&c&&(m.target.dataset.spinning=a,m.target.querySelector("i.fa-spin").style.display="inline-block",m.target.querySelector("i.fa-"+a).style.display="none"),n(m)},children:s()})}return u()}function et(e){return N.useEffect(()=>{e.data.autoreload&&setTimeout(window.reload,e.data.autoreload)},[]),t.jsx("div",{dangerouslySetInnerHTML:{__html:e.data.content}})}function tt(e){return t.jsx("img",{src:e.data.src,style:{width:"100%"}})}function nt(e){const n={width:"100%",textAlign:"center"};return t.jsx("div",{style:n,children:t.jsx("img",{src:e.data.src||e.data.placeholder,style:{width:e.data.width,height:e.data.height,borderRadius:e.data.round?"50%":0}})})}function at(e){return e.data.latitude&&e.data.longitude&&t.jsx("iframe",{width:e.data.width||"100%",height:e.data.height||"400px",id:"gmap_canvas",src:"https://maps.google.com/maps?q="+e.data.latitude+","+e.data.longitude+"&t=&z=13&ie=UTF8&iwloc=&output=embed",frameBorder:"0",scrolling:"no",marginHeight:"0",marginWidth:"0"})}function rt(e){function n(o){return e.data.icon?o.done?t.jsx(E,{style:{marginTop:6},icon:e.data.icon}):t.jsx("span",{children:" "}):t.jsx("div",{style:{marginTop:6},children:o.number})}function a(o){return{border:"3px solid "+p.colors.primary,borderRadius:"50%",background:o.done?p.colors.primary:"white",color:o.done?"white":p.colors.primary,textAlign:"center",width:50,height:50,margin:"auto",fontSize:"1.5rem"}}function r(o){return{listStyleType:"none",display:"flex",justifyContent:"center",minWidth:o.length*100}}function i(){const o={width:"100%",margin:"auto",overflowX:"auto","&::WebkitScrollbar":{width:0}},d={width:100,marginWidth:100,textAlign:"center"},c={position:"relative",borderBottom:"2px solid #1151b3",top:-28,width:45,left:77};return t.jsx("div",{children:t.jsx("div",{style:o,children:t.jsx("ul",{style:r(e.data.steps),children:e.data.steps.map((s,u)=>t.jsxs("li",{style:d,children:[t.jsx("div",{style:a(s),children:n(s)}),u<e.data.steps.length-1&&t.jsx("div",{style:c}),t.jsx("div",{children:s.name})]},Math.random()))})})})}return i()}function it(e){function n(){const a={display:"inline-block",width:"100%",backgroundColor:"#DDD",borderRadius:5,marginTop:5},r={marginLeft:10},i={display:"block",paddingTop:2,paddingBottom:2,color:"white",borderRadius:5,width:e.data.value+"%",backgroundColor:p.colors[e.data.style]};return t.jsx("span",{style:a,children:t.jsx("span",{style:i,children:t.jsxs("span",{style:r,children:[e.data.value,"%"]})})})}return n()}function ot(e){function n(){return e.data.color=p.colors[e.data.style],t.jsx(Ce,{data:e.data})}return n()}function Ce(e){function n(){const a={color:"white",width:"fit-content",borderRadius:0,textWrap:"nowrap",padding:10,whiteSpace:"nowrap",backgroundColor:e.data.color,display:"inline-flex",border:"solid 3px white",lineHeight:"1rem"};return t.jsxs("div",{style:a,children:[e.data.icon&&t.jsx(E,{icon:e.data.icon,style:{marginRight:5}}),e.data.label]})}return n()}function lt(e){function n(){const a={padding:20,marginLeft:-20,marginRight:-20,textAlign:"center",backgroundColor:"#f8f8f8"},r={padding:20,display:"inline-flex",flexDirection:"column",width:250,height:250,backgroundColor:"white",boxShadow:"0px 15px 10px -15px #DDD",margin:10,textDecoration:"none"},i={marginTop:30,fontSize:"3rem",color:p.colors.auxiliary},o={marginTop:40,fontWeight:"bold",fontSize:"1.2rem",textTransform:"uppercase",height:70,color:p.colors.primary};return e.data.items.length?t.jsxs("div",{style:a,children:[t.jsx("h2",{"data-label":T(e.data.title),style:{color:p.colors.primary},children:e.data.title}),t.jsx("div",{children:e.data.items.map(d=>t.jsxs(F,{href:d.url,style:r,dataLabel:d.label,children:[t.jsx("div",{children:t.jsx(E,{style:i,icon:d.icon})}),t.jsx("div",{style:o,children:d.label})]},Math.random()))})]}):null}return n()}function dt(e){function n(){return t.jsx("div",{style:{backgroundColor:"black",color:"white",padding:"10px",minHeight:"300px",fontFamily:"monospace, monospace",marginBottom:"30px"},children:e.data.output.split(`
93
- `).map(a=>t.jsx("div",{children:a},Math.random()))})}return n()}function st(e){function n(){return e.data.url?t.jsx("div",{style:{maxWidth:"100%"},children:t.jsx(F,{href:e.data.url,imodal:!!e.data.modal,children:e.data.icon?t.jsx(E,{icon:e.data.icon}):e.data.url})}):t.jsx("span",{children:"-"})}return n()}function ct(e){function n(){return t.jsx("iframe",{src:e.data.url,width:"100%",height:500,style:{border:0}})}return n()}function ut(e){const n=Math.random();N.useEffect(()=>{new QRCode(document.getElementById(n),{text:e.data.text,width:128,height:128,colorDark:"#333333",colorLight:"#ffffff",correctLevel:QRCode.CorrectLevel.H})},[]);function a(){return t.jsx("div",{id:n})}return a()}function ht(e){function n(){const a={color:"white",backgroundColor:p.colors.highlight,margin:-20,textAlign:"center",paddingTop:20,paddingBottom:70},r={fontSize:"4rem",fontWeight:"bold",marginTop:25},i={fontSize:"1.2rem",maxWidth:200,margin:"auto"};if(e.data)return t.jsxs("div",{className:"indicators",style:a,children:[t.jsx("h1",{"data-label":T(e.data.title),children:e.data.title}),t.jsx(Y,{width:300,children:e.data.items.map(o=>t.jsxs("div",{children:[t.jsx("div",{style:r,children:H(o.value)}),t.jsx("div",{style:i,children:o.name})]},Math.random()))},Math.random()),t.jsx("div",{className:"actions",children:e.data.actions.map(o=>t.jsx(F,{href:O(o.url),label:o.label,modal:o.modal,children:o.label},Math.random()))})]})}return n()}function mt(e){function n(){return t.jsx(Y,{width:400,children:e.data.items.map((a,r)=>t.jsx("div",{children:t.jsx(x,{data:a})},Math.random()))})}return n()}function ft(e){function n(){return t.jsxs("div",{children:[t.jsx("h2",{align:"center",children:e.data.title}),t.jsx("div",{style:{fontSize:"8rem",textAlign:"center",color:"#5470c6"},children:e.data.value})]})}return n()}function Ee(e){const n=Math.random();var a=!1;const r="rgb(219, 237, 255)",i="rgb(89, 154, 242)",o="rgb(246, 123, 135)",d="rgb(92, 160, 93)",c=[],s=[],u=["DOM","SEG","TER","QUA","QUI","SEX","SAB"],[l,m]=N.useState(e.data);A(`
92
+ `);const l={display:i||"block"};return o?(l.backgroundColor=p.colors.primary,l.color="white"):(l.border="solid 1px "+p.colors.primary,l.color=p.colors.primary),t.jsx("a",{id:e,className:"button",style:l,"data-label":T(r||a),onClick:m=>{m.preventDefault(),a&&c&&(m.target.dataset.spinning=a,m.target.querySelector("i.fa-spin").style.display="inline-block",m.target.querySelector("i.fa-"+a).style.display="none"),n(m)},children:s()})}return u()}function et(e){return I.useEffect(()=>{e.data.autoreload&&setTimeout(window.reload,e.data.autoreload)},[]),t.jsx("div",{dangerouslySetInnerHTML:{__html:e.data.content}})}function tt(e){return t.jsx("img",{src:e.data.src,style:{width:"100%"}})}function nt(e){const n={width:"100%",textAlign:"center"};return t.jsx("div",{style:n,children:t.jsx("img",{src:e.data.src||e.data.placeholder,style:{width:e.data.width,height:e.data.height,borderRadius:e.data.round?"50%":0}})})}function at(e){return e.data.latitude&&e.data.longitude&&t.jsx("iframe",{width:e.data.width||"100%",height:e.data.height||"400px",id:"gmap_canvas",src:"https://maps.google.com/maps?q="+e.data.latitude+","+e.data.longitude+"&t=&z=13&ie=UTF8&iwloc=&output=embed",frameBorder:"0",scrolling:"no",marginHeight:"0",marginWidth:"0"})}function rt(e){function n(o){return e.data.icon?o.done?t.jsx(E,{style:{marginTop:6},icon:e.data.icon}):t.jsx("span",{children:" "}):t.jsx("div",{style:{marginTop:6},children:o.number})}function a(o){return{border:"3px solid "+p.colors.primary,borderRadius:"50%",background:o.done?p.colors.primary:"white",color:o.done?"white":p.colors.primary,textAlign:"center",width:50,height:50,margin:"auto",fontSize:"1.5rem"}}function r(o){return{listStyleType:"none",display:"flex",justifyContent:"center",minWidth:o.length*100}}function i(){const o={width:"100%",margin:"auto",overflowX:"auto","&::WebkitScrollbar":{width:0}},d={width:100,marginWidth:100,textAlign:"center"},c={position:"relative",borderBottom:"2px solid #1151b3",top:-28,width:45,left:77};return t.jsx("div",{children:t.jsx("div",{style:o,children:t.jsx("ul",{style:r(e.data.steps),children:e.data.steps.map((s,u)=>t.jsxs("li",{style:d,children:[t.jsx("div",{style:a(s),children:n(s)}),u<e.data.steps.length-1&&t.jsx("div",{style:c}),t.jsx("div",{children:s.name})]},Math.random()))})})})}return i()}function it(e){function n(){const a={display:"inline-block",width:"100%",backgroundColor:"#DDD",borderRadius:5,marginTop:5},r={marginLeft:10},i={display:"block",paddingTop:2,paddingBottom:2,color:"white",borderRadius:5,width:e.data.value+"%",backgroundColor:p.colors[e.data.style]};return t.jsx("span",{style:a,children:t.jsx("span",{style:i,children:t.jsxs("span",{style:r,children:[e.data.value,"%"]})})})}return n()}function ot(e){function n(){return e.data.color=p.colors[e.data.style],t.jsx(Ce,{data:e.data})}return n()}function Ce(e){function n(){const a={color:"white",width:"fit-content",borderRadius:0,textWrap:"nowrap",padding:10,whiteSpace:"nowrap",backgroundColor:e.data.color,display:"inline-flex",border:"solid 3px white",lineHeight:"1rem"};return t.jsxs("div",{style:a,children:[e.data.icon&&t.jsx(E,{icon:e.data.icon,style:{marginRight:5}}),e.data.label]})}return n()}function lt(e){function n(){const a={padding:20,marginLeft:-20,marginRight:-20,textAlign:"center",backgroundColor:"#f8f8f8"},r={padding:20,display:"inline-flex",flexDirection:"column",width:250,height:250,backgroundColor:"white",boxShadow:"0px 15px 10px -15px #DDD",margin:10,textDecoration:"none"},i={marginTop:30,fontSize:"3rem",color:p.colors.auxiliary},o={marginTop:40,fontWeight:"bold",fontSize:"1.2rem",textTransform:"uppercase",height:70,color:p.colors.primary};return e.data.items.length?t.jsxs("div",{style:a,children:[t.jsx("h2",{"data-label":T(e.data.title),style:{color:p.colors.primary},children:e.data.title}),t.jsx("div",{children:e.data.items.map(d=>t.jsxs(F,{href:d.url,style:r,dataLabel:d.label,children:[t.jsx("div",{children:t.jsx(E,{style:i,icon:d.icon})}),t.jsx("div",{style:o,children:d.label})]},Math.random()))})]}):null}return n()}function dt(e){function n(){return t.jsx("div",{style:{backgroundColor:"black",color:"white",padding:"10px",minHeight:"300px",fontFamily:"monospace, monospace",marginBottom:"30px"},children:e.data.output.split(`
93
+ `).map(a=>t.jsx("div",{children:a},Math.random()))})}return n()}function st(e){function n(){return e.data.url?t.jsx("div",{style:{maxWidth:"100%"},children:t.jsx(F,{href:e.data.url,imodal:!!e.data.modal,children:e.data.icon?t.jsx(E,{icon:e.data.icon}):e.data.url})}):t.jsx("span",{children:"-"})}return n()}function ct(e){function n(){return t.jsx("iframe",{src:e.data.url,width:"100%",height:500,style:{border:0}})}return n()}function ut(e){const n=Math.random();I.useEffect(()=>{new QRCode(document.getElementById(n),{text:e.data.text,width:128,height:128,colorDark:"#333333",colorLight:"#ffffff",correctLevel:QRCode.CorrectLevel.H})},[]);function a(){return t.jsx("div",{id:n})}return a()}function ht(e){function n(){const a={color:"white",backgroundColor:p.colors.highlight,margin:-20,textAlign:"center",paddingTop:20,paddingBottom:70},r={fontSize:"4rem",fontWeight:"bold",marginTop:25},i={fontSize:"1.2rem",maxWidth:200,margin:"auto"};if(e.data)return t.jsxs("div",{className:"indicators",style:a,children:[t.jsx("h1",{"data-label":T(e.data.title),children:e.data.title}),t.jsx(Y,{width:300,children:e.data.items.map(o=>t.jsxs("div",{children:[t.jsx("div",{style:r,children:H(o.value)}),t.jsx("div",{style:i,children:o.name})]},Math.random()))},Math.random()),t.jsx("div",{className:"actions",children:e.data.actions.map(o=>t.jsx(F,{href:O(o.url),label:o.label,modal:o.modal,children:o.label},Math.random()))})]})}return n()}function mt(e){function n(){return t.jsx(Y,{width:400,children:e.data.items.map((a,r)=>t.jsx("div",{children:t.jsx(x,{data:a})},Math.random()))})}return n()}function ft(e){function n(){return t.jsxs("div",{children:[t.jsx("h2",{align:"center",children:e.data.title}),t.jsx("div",{style:{fontSize:"8rem",textAlign:"center",color:"#5470c6"},children:e.data.value})]})}return n()}function Ee(e){const n=Math.random();var a=!1;const r="rgb(219, 237, 255)",i="rgb(89, 154, 242)",o="rgb(246, 123, 135)",d="rgb(92, 160, 93)",c=[],s=[],u=["DOM","SEG","TER","QUA","QUI","SEX","SAB"],[l,m]=I.useState(e.data);A(`
94
94
  .scheduler{
95
95
  width: 100%;
96
96
  max-width: 100%;
@@ -101,7 +101,7 @@ import{j as t,c as P,r as N,R as Ie}from"./react.min.js";const p={colors:{primar
101
101
  .scheduler .hidden{
102
102
  display: none;
103
103
  }
104
- `),N.useEffect(()=>{document.getElementById(n).querySelector(".input-periodo-2").checked=!0,document.getElementById(n).querySelector(".input-periodo-3").checked=!0,window["reload-"+e.data.input_name+"-field"]=function(){const h=document.getElementsByName(e.data.input_name)[0].closest("form");B("GET",$(e.data.url,h,e.data.input_name),function(g){m(g)})}},[]);function f(h,g){return l.readonly?h==null?r:i:h==null?l.selectable==null?r:l.selectable.indexOf(g)>=0?d:r:h.text==null?i:o}function w(h){a=!0}function y(h){a=!1,document.getElementById("input"+n).value=JSON.stringify({select:c,deselect:s})}function b(h){if(!l.readonly&&!(e.data.single_selection&&k().length>0&&h.target.style.backgroundColor!=i)&&a&&h.target.tagName!="I"&&h.target.style.backgroundColor!=o){const g=h.target.dataset.day.split("/"),j=h.target.dataset.time.split(":"),C=h.target.dataset.day+" "+h.target.dataset.time;if(new Date(parseInt(g[2],10),parseInt(g[1],10)-1,parseInt(g[0],10),parseInt(j[0],10),parseInt(j[1],10))>new Date||e.data.weekly){if(e.data.single_selection){for(;s.length>0;)s.pop();for(;c.length>0;)c.pop()}(h.target.style.backgroundColor==r||h.target.style.backgroundColor==d)&&(l.selectable==null||l.selectable.indexOf(C)>=0)?(h.target.style.backgroundColor=i,console.log("MARCOU",h.target.dataset.day,h.target.dataset.time),c.push([h.target.dataset.day,h.target.dataset.time])):(l.selectable==null?h.target.style.backgroundColor=r:h.target.style.backgroundColor=l.selectable.indexOf(C)>=0?d:r,console.log("DEMARCOU",h.target.dataset.day,h.target.dataset.time),s.push([h.target.dataset.day,h.target.dataset.time]))}}}function D(h){const g=h.split("/");return u[new Date(parseInt(g[2],10),parseInt(g[1],10)-1,parseInt(g[0],10)).getDay()]}function k(){const h=[];return document.getElementById(n).querySelectorAll("td").forEach(function(g){g.style.backgroundColor==i&&h.push(g.dataset.day,g.dataset.time)}),h}function L(h){if(h=parseInt(h.split(":")[0]),h>=0&&h<6)return 1;if(h>=6&&h<12)return 2;if(h>=12&&h<18)return 3;if(h>=18&&h<24)return 4}function I(h){const g=L(h);var j="period-"+g;return M(g)||(j+=" hidden"),j}function v(h,g){document.getElementById(n).querySelectorAll(".period-"+h).forEach(function(j){j.style.display=g?"table-row":"none"})}function M(h){return h==2||h==3}function S(){const h={overflowX:"auto"},g={width:"100%",borderSpacing:0,borderCollapse:"collapse",marginTop:15,marginBottom:15},j={border:"solid 4px white",userSelect:"none"};return t.jsxs("div",{id:n,style:h,className:"scheduler",children:[e.data.title&&t.jsx("h2",{children:e.data.title}),t.jsx("input",{id:"input"+n,type:"hidden",name:e.data.input_name}),t.jsxs("div",{className:"periods",children:[t.jsx("input",{className:"input-periodo-1",type:"checkbox","data-label":"madrugada",onChange:C=>v(1,C.target.checked)})," ",t.jsx("span",{children:"Madrugada"}),t.jsx("input",{className:"input-periodo-2",type:"checkbox","data-label":"manha",onChange:C=>v(2,C.target.checked)})," ",t.jsx("span",{children:"Manhã"}),t.jsx("input",{className:"input-periodo-3",type:"checkbox","data-label":"tarde",onChange:C=>v(3,C.target.checked)})," ",t.jsx("span",{children:"Tarde"}),t.jsx("input",{className:"input-periodo-4",type:"checkbox","data-label":"noite",onChange:C=>v(4,C.target.checked)})," ",t.jsx("span",{children:"Noite"})]}),t.jsxs("table",{style:g,onMouseDown:w,onMouseUp:y,children:[t.jsx("thead",{children:t.jsx("tr",{children:l.matrix[0].map(function(C){return t.jsxs("th",{className:"bold",style:j,children:[D(C.text),!e.data.weekly&&t.jsx("br",{}),!e.data.weekly&&C.text]},Math.random())})})}),t.jsx("tbody",{children:l.matrix.map(function(C,q){if(q>0)return t.jsx("tr",{className:I(C[0].text),children:C.map(function(R,U){if(U==0)return t.jsx("th",{className:"bold",align:"center",style:j,children:R.text},Math.random());{const G=l.matrix[0][U].text+" "+C[0].text,te={backgroundColor:f(R,G),border:"solid 4px white",cursor:"pointer"};return t.jsx("td",{align:"center",style:te,onMouseDown:b,onMouseLeave:b,onMouseUp:b,"data-day":l.matrix[0][U].text,"data-time":C[0].text,"data-label":G,children:R&&R.text&&t.jsx(gt,{text:R.text,children:t.jsx(E,{icon:R.icon||"x",style:{color:"white",cursor:"help"}})})},Math.random())}})},Math.random())})})]})]})}return S()}function gt(e){function n(){return A(`
104
+ `),I.useEffect(()=>{document.getElementById(n).querySelector(".input-periodo-2").checked=!0,document.getElementById(n).querySelector(".input-periodo-3").checked=!0,window["reload-"+e.data.input_name+"-field"]=function(){const h=document.getElementsByName(e.data.input_name)[0].closest("form");B("GET",$(e.data.url,h,e.data.input_name),function(g){m(g)})}},[]);function f(h,g){return l.readonly?h==null?r:i:h==null?l.selectable==null?r:l.selectable.indexOf(g)>=0?d:r:h.text==null?i:o}function w(h){a=!0}function y(h){a=!1,document.getElementById("input"+n).value=JSON.stringify({select:c,deselect:s})}function b(h){if(!l.readonly&&!(e.data.single_selection&&k().length>0&&h.target.style.backgroundColor!=i)&&a&&h.target.tagName!="I"&&h.target.style.backgroundColor!=o){const g=h.target.dataset.day.split("/"),j=h.target.dataset.time.split(":"),C=h.target.dataset.day+" "+h.target.dataset.time;if(new Date(parseInt(g[2],10),parseInt(g[1],10)-1,parseInt(g[0],10),parseInt(j[0],10),parseInt(j[1],10))>new Date||e.data.weekly){if(e.data.single_selection){for(;s.length>0;)s.pop();for(;c.length>0;)c.pop()}(h.target.style.backgroundColor==r||h.target.style.backgroundColor==d)&&(l.selectable==null||l.selectable.indexOf(C)>=0)?(h.target.style.backgroundColor=i,console.log("MARCOU",h.target.dataset.day,h.target.dataset.time),c.push([h.target.dataset.day,h.target.dataset.time])):(l.selectable==null?h.target.style.backgroundColor=r:h.target.style.backgroundColor=l.selectable.indexOf(C)>=0?d:r,console.log("DEMARCOU",h.target.dataset.day,h.target.dataset.time),s.push([h.target.dataset.day,h.target.dataset.time]))}}}function D(h){const g=h.split("/");return u[new Date(parseInt(g[2],10),parseInt(g[1],10)-1,parseInt(g[0],10)).getDay()]}function k(){const h=[];return document.getElementById(n).querySelectorAll("td").forEach(function(g){g.style.backgroundColor==i&&h.push(g.dataset.day,g.dataset.time)}),h}function L(h){if(h=parseInt(h.split(":")[0]),h>=0&&h<6)return 1;if(h>=6&&h<12)return 2;if(h>=12&&h<18)return 3;if(h>=18&&h<24)return 4}function N(h){const g=L(h);var j="period-"+g;return M(g)||(j+=" hidden"),j}function v(h,g){document.getElementById(n).querySelectorAll(".period-"+h).forEach(function(j){j.style.display=g?"table-row":"none"})}function M(h){return h==2||h==3}function S(){const h={overflowX:"auto"},g={width:"100%",borderSpacing:0,borderCollapse:"collapse",marginTop:15,marginBottom:15},j={border:"solid 4px white",userSelect:"none"};return t.jsxs("div",{id:n,style:h,className:"scheduler",children:[e.data.title&&t.jsx("h2",{children:e.data.title}),t.jsx("input",{id:"input"+n,type:"hidden",name:e.data.input_name}),t.jsxs("div",{className:"periods",children:[t.jsx("input",{className:"input-periodo-1",type:"checkbox","data-label":"madrugada",onChange:C=>v(1,C.target.checked)})," ",t.jsx("span",{children:"Madrugada"}),t.jsx("input",{className:"input-periodo-2",type:"checkbox","data-label":"manha",onChange:C=>v(2,C.target.checked)})," ",t.jsx("span",{children:"Manhã"}),t.jsx("input",{className:"input-periodo-3",type:"checkbox","data-label":"tarde",onChange:C=>v(3,C.target.checked)})," ",t.jsx("span",{children:"Tarde"}),t.jsx("input",{className:"input-periodo-4",type:"checkbox","data-label":"noite",onChange:C=>v(4,C.target.checked)})," ",t.jsx("span",{children:"Noite"})]}),t.jsxs("table",{style:g,onMouseDown:w,onMouseUp:y,children:[t.jsx("thead",{children:t.jsx("tr",{children:l.matrix[0].map(function(C){return t.jsxs("th",{className:"bold",style:j,children:[D(C.text),!e.data.weekly&&t.jsx("br",{}),!e.data.weekly&&C.text]},Math.random())})})}),t.jsx("tbody",{children:l.matrix.map(function(C,q){if(q>0)return t.jsx("tr",{className:N(C[0].text),children:C.map(function(R,U){if(U==0)return t.jsx("th",{className:"bold",align:"center",style:j,children:R.text},Math.random());{const G=l.matrix[0][U].text+" "+C[0].text,te={backgroundColor:f(R,G),border:"solid 4px white",cursor:"pointer"};return t.jsx("td",{align:"center",style:te,onMouseDown:b,onMouseLeave:b,onMouseUp:b,"data-day":l.matrix[0][U].text,"data-time":C[0].text,"data-label":G,children:R&&R.text&&t.jsx(gt,{text:R.text,children:t.jsx(E,{icon:R.icon||"x",style:{color:"white",cursor:"help"}})})},Math.random())}})},Math.random())})})]})]})}return S()}function gt(e){function n(){return A(`
105
105
  .tooltip {
106
106
  position: relative;
107
107
  display: inline-block;
@@ -124,7 +124,7 @@ import{j as t,c as P,r as N,R as Ie}from"./react.min.js";const p={colors:{primar
124
124
  .tooltip:hover .tooltiptext {
125
125
  visibility: visible;
126
126
  }
127
- `),t.jsxs("div",{className:"tooltip",children:[e.children,t.jsx("div",{className:"tooltiptext",children:H(e.text)})]})}return n()}const xt=["text","password","email","number","date","datetime-local","file","image","range","search","tel","time","url","week","hidden","color"],Z={padding:15,border:"solid 1px #d9d9d9",borderRadius:5,backgroundColor:"white"};function yt(e,n){const a=new FormData(e);for(let[r,i]of Array.from(a.entries())){const o=e[r];n!=r&&(o.tagName=="SELECT"&&i!==""||o.tagName==null&&i!==""||o.type=="radio"&&i!==""||o.type=="checkbox"&&i!==""||a.delete(r))}return new URLSearchParams(a).toString()}function $(e,n,a){const r=e.indexOf("?")<0?"?":"&",i=yt(n,a);return e=e+(i?r+i:""),e}function le(e){if(e){const a=[".png",".jpeg",".jpeg",".gif"];for(var n=0;n<a.length;n++)if(e.toLowerCase().indexOf(a[n])>0)return!0}}function K(e,n){B("GET",$(n,e.closest("form"),e.name),Me)}function vt(e){if(e){var n=document.querySelector(".form-fieldset."+e);n&&(n.style.display="none");var a=document.querySelector(".form-group."+e);a&&(a.style.display="none")}}function bt(e){if(e){var n=document.querySelector(".form-fieldset."+e);n&&(n.style.display="block");var a=document.querySelector(".form-group."+e);a&&(a.style.display="block")}}function pt(e){const n="reload-"+e+"-field";window[n]&&window[n]()}function wt(e,n){var a=document.querySelector(".form-group."+e),r=a.querySelector('*[name="'+e+'"]');if(r.tagName=="INPUT")r.value=n;else if(r.tagName=="SELECT"){if(r.style.display!="none")r.dispatchEvent(new CustomEvent("customchange",{detail:{value:n}}));else for(var i=0;i<r.options.length;i++)if(r.options[i].value==n){r.selectedIndex=i;break}}}function Me(e){if(e){for(var n=0;n<e.hide.length;n++)vt(e.hide[n]);for(var n=0;n<e.show.length;n++)bt(e.show[n]);for(var n=0;n<e.reload.length;n++)pt(e.reload[n]);for(var a in e.set)wt(a,e.set[a])}}function jt(e){function n(){const a={color:p.colors.info,backgroundColor:p.background.info,padding:20,display:"flex",justifyContent:"space-between",marginTop:10,marginBottom:10};return t.jsxs("div",{style:a,children:[t.jsxs("div",{children:[t.jsx(E,{icon:"circle-check",style:{color:p.colors.info,marginRight:20}}),e.data.text]}),e.children&&t.jsx("div",{children:e.children})]})}return n()}function kt(e){function n(){const a={color:"white",display:"none",backgroundColor:"#e52207",marginTop:2,marginBottom:2,padding:8};return t.jsxs("div",{style:a,id:e.id,className:"error",children:[t.jsx(E,{icon:"xmark-circle",style:{marginRight:5}}),t.jsx("span",{})]})}return n()}function St(e){function n(){const a={marginTop:2,marginBottom:2,fontStyle:"italic"};return t.jsx("div",{style:a,children:t.jsx("span",{children:e.text})})}return n()}function ae(e){const n=e.data.name+Math.random();function a(){const c={display:"flex",justifyContent:"space-between",alignItems:"baseline"};return e.data.action&&(e.data.action.icon=null,e.data.action.modal=!0,e.data.action.urlfunc=function(){return $(e.data.action.url,document.getElementById(n).closest("form"))}),t.jsxs("div",{style:c,children:[t.jsxs("label",{className:"bold",children:[e.data.label," ",e.data.label&&e.data.required?"*":""]}),e.data.action&&t.jsx(W,{data:e.data.action,style:{padding:0,margin:0}})]})}function r(){return e.data.type=="datetime"&&(e.data.type="datetime-local"),xt.indexOf(e.data.type)>=0?t.jsx(ye,{data:e.data}):e.data.type=="choice"&&Array.isArray(e.data.choices)?e.data.pick?Array.isArray(e.data.value)?t.jsx(ve,{data:e.data}):t.jsx(de,{data:e.data}):t.jsx(Mt,{data:e.data}):e.data.type=="choice"?e.data.pick?Array.isArray(e.data.value)?t.jsx(ve,{data:e.data}):t.jsx(de,{data:e.data}):t.jsx(Te,{data:e.data}):e.data.type=="decimal"?t.jsx(ye,{data:e.data}):e.data.type=="boolean"?t.jsx(Et,{data:e.data}):e.data.type=="textarea"?t.jsx(Ct,{data:e.data}):e.data.type=="scheduler"?(e.data.scheduler.input_name=e.data.name,t.jsx(Ee,{data:e.data.scheduler})):t.jsx("span",{children:e.data.name})}function i(){return t.jsx("div",{children:t.jsx(kt,{id:e.data.name+"_error"})})}function o(){return e.data.help_text&&t.jsx(St,{text:e.data.help_text})}function d(){const c={display:e.data.type=="hidden"?"none":"flex",flexDirection:"column",padding:5,width:"calc(100%-5px)"};return t.jsxs("div",{id:n,style:c,children:[a(),r(),o(),i()]})}return d()}function ye(e){var n="";const a=e.data.name+Math.random();e.data.mask=="decimal"&&(n="decimal",e.data.value&&(e.data.value=Math.round(parseFloat(e.data.value)).toFixed(2).replace(".",","))),N.useEffect(()=>{function d(u,l,m){var f=m.target,w=f.value.replace(/\D/g,""),y=f.value.length>l?1:0;VMasker(f).unMask(),VMasker(f).maskPattern(u[y]),f.value=VMasker.toPattern(w,u[y])}if(e.data.mask){var c=document.getElementById(a);if(e.data.mask=="decimal")VMasker(c).maskMoney({precision:2,separator:",",delimiter:"."});else if(e.data.mask.indexOf("|")>0){var s=e.data.mask.split("|");VMasker(c).maskPattern(s[0]),c.addEventListener("input",d.bind(void 0,s,14),!1)}else VMasker(c).maskPattern(e.data.mask)}},[]);function r(d){K(d.target,e.data.onchange)}function i(d){if(e.data.type=="file"&&d.target.files){let s=d.target.files[0];var c=new FileReader;c.onload=function(u){if(le(s.name)){const w="display"+a;var l=document.createElement("img");l.id=d.target.id+"img",l.style.width="200px",l.style.display="block",l.style.margin="auto",l.style.marginTop="20px",l.onload=function(y){const b=e.data.width>e.data.height?e.data.width/l.width:e.data.height/l.height;var D=document.createElement("canvas");const k=D.getContext("2d");D.height=D.width*(l.height/l.width);const L=document.createElement("canvas"),I=L.getContext("2d");L.width=l.width*b,L.height=l.height*b,I.drawImage(l,0,0,L.width,L.height),k.drawImage(L,0,0,L.width*b,L.height*b,0,0,D.width,D.height),L.toBlob(function(M){const S=new DataTransfer;S.items.add(new File([M],s.name)),d.target.files=S.files});var v=document.getElementById(w);v==null?(v=document.createElement("div"),v.id=w):v.removeChild(v.childNodes[0]),v.appendChild(l),d.target.parentNode.appendChild(v)},l.src=u.target.result}const m=document.getElementById("fileinfo"+a);var f=s.size/1024;f<1024?f=parseInt(f)+" Kb":f=(f/1024).toFixed(2)+" Mb",m.innerHTML=s.name+" / "+f,e.data.max_size&&s.size/1024/1024>e.data.max_size&&alert("O limite de tamanho é "+e.data.max_size+"Mb. O arquivo informado possui "+f+". Por favor, adicione um arquivo menor.")},c.readAsDataURL(s)}}function o(){var d=e.data.type;if(d=="datetime"&&(d="datetime-regional"),d=="decimal"&&(d="text"),d=="file"){const u={alignContent:"center",minHeight:75,padding:5,maxWidth:"100%",margin:"auto"};var c=null;return e.data.extensions&&e.data.extensions.length>0&&(c=e.data.extensions.map(l=>"."+l).join(", ")),t.jsxs(t.Fragment,{children:[t.jsxs("div",{style:{display:window.innerWidth<800?"block":"flex",justifyContent:"space-between",backgroundColor:"rgba(15, 145, 210, 0.05)",border:"1px dashed rgba(15, 145, 210, 0.4)",borderRadius:10,textAlign:"center"},children:[t.jsx("div",{style:u,children:t.jsx(E,{icon:"cloud-upload",style:{fontSize:"2.5rem",color:p.colors.primary}})}),t.jsxs("div",{style:u,children:[e.data.value&&le(e.data.value)&&t.jsx("div",{style:{textAlign:"center"},children:t.jsx("img",{src:e.data.value,height:50})}),e.data.value&&!le(e.data.value)&&t.jsx("div",{style:{textAlign:"center"},children:e.data.value}),"Selecione um arquivo clicando no botão ao lado.",t.jsxs("div",{className:"bold",id:"fileinfo"+a,children:["O arquivo",e.data.max_size&&"deve possuir até "+e.data.max_size+" Mb e ","deve ter extensão"," ",e.data.extensions.map(l=>"."+l).join(" ou "),"."]})]}),t.jsx("div",{style:u,align:"center",children:t.jsx(_,{label:"Selecionar Arquivo",onClick:()=>document.getElementById(a).click()})})]}),t.jsx("input",{className:"form-control "+n,type:d,name:e.data.name,id:a,"data-label":T(e.data.label),readOnly:e.data.read_only,onBlur:e.data.onchange?r:null,onChange:i,style:{zIndex:"-1",marginTop:-20},accept:c})]})}else{var s=Z;return d=="color"&&(s={...Z},s.width="100%",s.backgroundColor="white",s.height=47.5),t.jsx("input",{className:"form-control "+n,type:d,name:e.data.name,id:a,defaultValue:e.data.value,"data-label":T(e.data.label),readOnly:e.data.read_only,onBlur:e.data.onchange?r:null,onChange:i,style:s})}}return o()}function Te(e){var n=[];Array.isArray(e.data.value)?e.data.value.forEach(function(v,M){n.push({id:v.id,value:v.label})}):e.data.value!=null&&n.push({id:e.data.value.id,value:e.data.value.label}),e.data.id==null&&(e.data.id=Math.random()),e.data.id2==null&&(e.data.id2=e.data.id+"__autocomplete");const a=e.data.id,r=e.data.id2,i=Array.isArray(e.data.value),[o,d]=N.useState(!1),[c,s]=N.useState(null);var u=!1;let l;N.useEffect(()=>{k(n,!0),document.getElementById(a).addEventListener("customchange",function(v){k(v.detail.value);const M=document.getElementById(e.data.name);M&&reactTriggerChange(M)})},[]);function m(){const v=document.getElementById(a);if(i){const M={padding:5,display:"inline"},S={cursor:"pointer",marginRight:5},h={fontSize:"0.8rem"};return t.jsxs("div",{children:[v==null&&n.map((g,j)=>t.jsxs("div",{style:M,children:[t.jsx("span",{onClick:()=>L(j),style:S,children:t.jsx(E,{icon:"trash-can",style:h})}),g.value]},Math.random())),v!=null&&Array.from(v.options).map((g,j)=>t.jsxs("div",{style:M,children:[t.jsx("span",{onClick:()=>L(j),style:S,children:t.jsx(E,{icon:"trash-can",style:h})}),g.innerHTML]},Math.random()))]})}}function f(){return t.jsx("select",{id:a,name:e.data.name,multiple:i,readOnly:!0,style:{display:"contents"}})}function w(){const v={...Z,...e.style||{}},M={padding:0,margin:0,border:"solid 1px #d9d9d9",marginTop:-1,borderRadius:5,maxHeight:150,overflowY:"auto",zIndex:99999};M.position="absolute",M.backgroundColor="white";const S=document.getElementById(r);if(e.data.icon&&(v.paddingLeft=30),S){let q=null,R=S,U=null;for(;!U&&(R=R.parentElement)instanceof HTMLElement;)R.matches("dialog")&&(U=R);q=U;const G=S.getBoundingClientRect();var h=G.top+G.height,g=G.left;if(q){const te=q.getBoundingClientRect();h=h-te.top,g=g-te.left}else h+=window.scrollY,g+=window.scrollX;M.width=G.width,M.top=h,M.left=g}const j={cursor:"pointer",padding:10},C=!i&&n.length>0&&n[0].value||"";return t.jsxs(t.Fragment,{children:[e.data.icon&&t.jsx(E,{icon:e.data.icon,style:{position:"absolute",margin:13,color:"#d9d9d9"}}),t.jsx("input",{id:r,name:e.data.name+"__autocomplete",type:"text",className:"form-control",onFocus:q=>{q.target.select(),D(q)},onChange:D,onMouseLeave:y,onBlur:y,defaultValue:C,style:v,"data-label":T(e.data.label)}),c&&o&&t.jsxs("ul",{style:M,onMouseLeave:b,onMouseEnter:function(q){u=!0},children:[c.length==0&&t.jsx("li",{style:j,children:"Nenhuma opção encontrada."}),c.map(q=>t.jsx("li",{onClick:()=>{d(!1),e.onSelect?e.onSelect(q):k(q)},style:j,className:"autocomplete-item","data-label":T(q.value),children:q.value},Math.random()))]})]})}function y(v){u=!1,setTimeout(function(){u||b(v)},250)}function b(v){const M=document.getElementById(a);if(M){const S=document.getElementById(r);i||M.options.length>0&&S.value!=M.options[0].innerHTML&&(M.innerHTML="",S.value="",d(!1),e.data.onchange&&K(S,e.data.onchange)),v.target.tagName=="UL"?d(!1):u||d(!1)}}function D(v){clearTimeout(l),l=setTimeout(function(){const M=v.target.closest("form"),S=e.data.choices.indexOf("?")<0?"?":"&";d(!0),B("GET",$(e.data.choices+S+"term="+v.target.value,M),function(g){s(g)})},1e3)}function k(v,M=!1){const S=document.getElementById(a),h=document.getElementById(r);S.innerHTML==null&&(S.innerHTML=""),Array.isArray(v)?S.innerHTML=v.map(g=>`<option selected value="${g.id}">${g.value}</option>`).join(""):v?i?(S.innerHTML+=`<option selected value="${v.id}">${v.value}</option>`,h.value=""):(S.innerHTML=`<option selected value="${v.id}">${v.value}</option>`,h.value=v.value):(S.innerHTML="",h.value=""),e.data.onchange&&!M&&K(h,e.data.onchange)}function L(v){const M=document.getElementById(a);var S=Array.from(M.options);M.innerHTML=S.slice(0,v).concat(S.slice(v+1)).map(h=>`<option selected value="${h.value}">${h.innerHTML}</option>`).join(""),s([])}function I(){return t.jsxs(t.Fragment,{children:[m(),f(),w()]})}return I()}function Ct(e){function n(){var a={...Z};return a.height=100,t.jsx("textarea",{id:e.data.name,name:e.data.name,"data-label":T(e.data.label),style:a,defaultValue:e.data.value||"",className:"form-control"})}return n()}function Et(e){var n=e.data;return n.choices=[{id:!0,value:"Sim"},{id:!1,value:"Não"}],t.jsx(de,{data:n})}function de(e){const[n,a]=N.useState(e.data.choices);var r=Math.random(),i=e.data;function o(u){return i.value!=null?i.value==u.id?!0:i.value.id==u.id:!1}function d(u){var l=document.getElementById(u);i.checked&&(l.checked=!1),e.data.onchange&&K(l,e.data.onchange)}function c(u){var l=document.getElementById(u);i.checked=l.checked}function s(){return window["reload-"+i.name+"-field"]=function(){B("GET",$(e.data.pick,document.querySelector(".radio-group."+i.name).closest("form")),function(l){a(l)})},n.length>0?t.jsx("div",{className:"radio-group "+i.name,children:n.map((u,l)=>(u.id||u.id===!1)&&t.jsxs("div",{style:{paddingTop:10,display:"inline-block",marginRight:25,width:window.innerWidth>800?"auto":"100%"},children:[t.jsx("input",{id:i.name+r+l,type:"radio",name:i.name,defaultValue:u.id,defaultChecked:o(u),"data-label":T(u.value),onClick:function(){d(i.name+r+l)},onMouseEnter:function(){c(i.name+r+l)}}),t.jsx("label",{htmlFor:i.name+r+l,children:u.value})]},r+l))}):t.jsx("div",{className:"radio-group empty "+i.name,children:t.jsx(ee,{data:{text:"Nenhuma opção disponível para seleção."}})})}return s()}function ve(e){const[n,a]=N.useState(e.data.choices);var r=Math.random(),i=e.data;function o(s){var u=!1;if(i.value)for(var l=0;l<i.value.length;l++){var m=i.value[l];(m==s.id||m.id==s.id)&&(u=!0)}return u}function d(s){e.data.onchange&&K(s.target,e.data.onchange)}function c(){return window["reload-"+i.name+"-field"]=function(){B("GET",$(e.data.pick,document.querySelector(".checkbox-group."+i.name).closest("form")),function(u){a(u)})},n.length>0?t.jsx("div",{className:"checkbox-group "+i.name,children:n.map((s,u)=>(s.id||s.id===!1)&&t.jsxs("div",{style:{paddingTop:10,display:"inline-block",marginRight:25,width:window.innerWidth>800?"auto":"100%"},children:[t.jsx("input",{id:i.name+r+u,type:"checkbox",name:i.name,onClick:d,defaultValue:s.id,defaultChecked:o(s),"data-label":T(s.value)}),t.jsx("label",{htmlFor:i.name+r+u,children:s.value})]},r+u))}):t.jsx("div",{className:"checkbox-group empty "+i.name,children:t.jsx(ee,{data:{text:"Nenhuma opção disponível para seleção."}})})}return c()}function Mt(e){var n=e.data;return t.jsx(t.Fragment,{children:t.jsx("select",{className:"form-control",id:n.name,name:n.name,"data-label":T(n.label),defaultValue:n.value,style:Z,children:n.choices.map(a=>t.jsx("option",{value:a.id,children:a.value},Math.random()))})})}function Tt(e){const n=Math.random(),a=e.data.value[0],r=a.fields?a.fields[0]:a.fieldsets[0].fields[0][0];function i(){return!e.data.required&&t.jsx("div",{id:"info-"+n,children:t.jsxs(ee,{data:{text:"Esta informação é opcional. Controle seu preenchimento com o botão ao lado."},children:[t.jsx(_,{primary:!0,icon:"pen-clip",onClick:()=>o(!0),id:"show-"+n,display:r.value?"none":"inline"}),t.jsx(_,{primary:!0,icon:"trash",onClick:()=>o(!1),id:"hide-"+n,display:r.value?"inline":"none"})]})})}function o(s){const u=document.querySelector("input[name="+r.name+"]"),l=document.getElementById("inline-form-"+n),m=document.getElementById("show-"+n),f=document.getElementById("hide-"+n);l.style.display=s?"block":"none",m.style.display=s?"none":"inline",f.style.display=s?"inline":"none",s?u.value===""?u.value=0:u.value=-parseInt(u.value):parseInt(u.value)==0?u.value="":u.value=-parseInt(u.value)}function d(){const s={display:r.value?"block":"none"};return e.data.required&&(s.display="block",r.value===""&&(r.value=0)),t.jsx("div",{className:"fieldset-inline-forms",style:s,id:"inline-form-"+n,children:e.data.value.map(function(u){return t.jsx(he,{data:u},Math.random())})})}function c(){const s={margin:0};return t.jsxs("div",{className:"form-fieldset",children:[t.jsx("h2",{style:s,"data-label":T(e.data.label),children:e.data.label}),i(),d()]})}return c()}function It(e){var n=0;const a=Math.random();e.data.template==null&&(e.data.template=e.data.value.pop());function r(l,m){const f=n;return n+=1,t.jsxs("div",{style:{display:"block"},id:"form-"+f+"-"+a,children:[t.jsx(he,{data:l}),t.jsxs("div",{style:{textAlign:"center",marginTop:10,marginBottom:10},children:[t.jsx(_,{primary:!0,icon:"plus",onClick:()=>o(),id:"extra-add-"+f+"-",display:m}),t.jsx(_,{primary:!0,icon:"trash",onClick:()=>d(f),display:"inline"})]})]},Math.random())}function i(){const l=c(),m=l.length>0?"none":"inline";document.getElementById("add-"+a).style.display=m;for(var f=0;f<n;f++){var w=document.getElementById("extra-add-"+f+"-");w.style.display="none"}if(l.length>0){var w=document.getElementById("extra-add-"+l[l.length-1]+"-");w.style.display="inline"}}function o(){i();var l=JSON.parse(JSON.stringify(e.data.template));l.fields?(l.fields.map(function(m){m.name=m.name.replace("__n__","__"+n+"__")}),l.fields[0].value=0):l.fieldsets.map(function(m){m.fields.map(function(f){f.map(function(w){w.name=w.name.replace("__n__","__"+n+"__")}),f[0].value=0})}),P.createRoot(document.getElementById(a).appendChild(document.createElement("div"))).render(r(l,"inline")),setTimeout(i,100)}function d(l){const m=e.data.template,w=(m.fields?m.fields[0]:m.fieldsets[0].fields[0][0]).name.replace("__n__","__"+l+"__"),y=document.querySelector("input[name="+w+"]");parseInt(y.value)==0?y.value="":y.value=-parseInt(y.value),document.getElementById("form-"+l+"-"+a).style.display="none",i()}function c(){for(var l=[],m=0;m<n;m++)document.getElementById("form-"+m+"-"+a).style.display=="block"&&l.push(m);return l}function s(){return t.jsx("div",{id:"info-"+a,children:t.jsx(ee,{data:{text:'Clique no botão com o ícone de "+" para adicionar e com o ícone da "lixeira" para remover.'},children:t.jsx(_,{primary:!0,icon:"add",onClick:()=>o(),id:"add-"+a,display:e.data.value.length>0?"none":"inline"})})})}function u(){const l={margin:0};return t.jsxs("div",{className:"form-fieldset",children:[t.jsx("h2",{style:l,"data-label":T(e.data.label),children:e.data.label}),t.jsx("div",{children:!1}),t.jsxs("div",{id:a,className:"fieldset-inline-forms",children:[s(),e.data.value.map(function(m,f){return r(m,f==e.data.value.length-1?"inline":"none")})]})]})}return u()}function he(e){N.useEffect(()=>{e.data.controls&&Me(e.data.controls)},[]);function n(r){return r.type=="inline"?r.max==r.min==1?t.jsx(Tt,{data:r},Math.random()):t.jsx(It,{data:r},Math.random()):t.jsx(ae,{data:r},Math.random())}function a(){return e.data.fields?t.jsx("div",{className:"form-fields",children:e.data.fields.map(r=>n(r))}):e.data.fieldsets.map(r=>t.jsx("div",{className:"form-fieldset",children:r.type=="inline"?n(r):t.jsxs(t.Fragment,{children:[t.jsx("h2",{"data-label":T(r.title),style:{margin:0},children:r.title}),r.fields.map(i=>t.jsx("div",{children:i.map(o=>t.jsx("div",{className:"form-group "+o.name,style:{verticalAlign:"bottom",width:100/i.length+"%",display:o.type=="hidden"?"none":"inline-block"},children:n(o)},Math.random()))},Math.random()))]})},Math.random()))}return a()}function Nt(e){const n=Math.random();function a(){const f={margin:0,color:p.colors.primary};return t.jsx("h1",{style:f,children:e.data.title})}function r(){return e.data.info&&t.jsx(jt,{data:{text:e.data.info}})}function i(){if(e.data.display)return t.jsxs(t.Fragment,{children:[e.data.display.map(f=>t.jsx(x,{data:f},Math.random())),t.jsx("div",{style:{marginTop:30}})]})}function o(){return t.jsx(he,{data:e.data})}function d(){return t.jsxs("div",{style:{marginTop:20,textAlign:"right"},children:[t.jsx(_,{onClick:l,label:"Cancelar",default:!0,display:"inline"}),t.jsx(_,{onClick:m,label:"Enviar",primary:!0,display:"inline",icon:"chevron-right",spin:!0})]})}function c(){return t.jsx("div",{id:"output",style:{marginTop:30}})}function s(){if(e.data.image)return t.jsx("div",{style:{margin:"auto",width:"100%",textAlign:"center"},children:t.jsx("img",{src:e.data.image})})}function u(){return t.jsxs("form",{id:n,className:e.data.key,action:e.data.url,style:{margin:"auto",backgroundColor:"white"},method:e.data.method,children:[t.jsx("div",{children:!1}),t.jsxs("div",{style:{padding:5},children:[a(),s(),r(),i(),o(),d(),c()]})]})}function l(){J()}function m(f){f.preventDefault();var w=e.data.url,y=document.getElementById(n),b=new FormData(y);if(y.method.toUpperCase()=="GET"){const D=w.indexOf("?")>=0?"&":"?";w=w+D+"form="+e.data.title+"&"+new URLSearchParams(b).toString(),b=null}B(y.method.toUpperCase(),w,function(k){if(y.querySelectorAll(".error").forEach(I=>I.style.display="none"),f.target.dataset.spinning&&(f.target.querySelector("i.fa-spin").style.display="none",f.target.querySelector("i.fa-"+f.target.dataset.spinning).style.display="inline-block"),k.type=="response")if(k.store&&we(k.store),k.redirect&&k.redirect.length>2)k.message&&localStorage.setItem("message",k.message),document.location.href=V(k.redirect);else if(k.message&&z(k.message),k.task){let I=function(){B("GET","/api/job/progress/"+k.task+"/",function(S){S==null||S.progress==100?f.target.innerHTML=v:(f.target.innerHTML="Aguarde... ("+(S.progress||0)+"%)",setTimeout(I,5e3))})};const v=f.target.innerHTML;f.target.innerHTML="Aguarde... (0%)",I()}else k.redirect==".."&&(document.getElementsByTagName("dialog").length==0?history.back():J()),k.redirect=="."&&y.reset(),k.dispose&&(y.style.display="none"),Ke();else if(k.type=="error"){var L=k.text;console.log(k),Object.keys(k.errors).map(function(I){if(I=="__all__")L=k.errors[I];else{const v=y.querySelector("#"+I+"_error");v==null?L=I+":"+k.errors[I]:(v.querySelector("span").innerHTML=k.errors[I],v.style.display="block")}}),z(L,!0)}else{const I=document.querySelector("#output");I.innerHTML="",P.createRoot(I.appendChild(document.createElement("div"))).render(t.jsx(x,{data:k}))}},b)}return u()}function Dt(e){A(`
127
+ `),t.jsxs("div",{className:"tooltip",children:[e.children,t.jsx("div",{className:"tooltiptext",children:H(e.text)})]})}return n()}const xt=["text","password","email","number","date","datetime-local","file","image","range","search","tel","time","url","week","hidden","color"],Z={padding:15,border:"solid 1px #d9d9d9",borderRadius:5,backgroundColor:"white"};function yt(e,n){const a=new FormData(e);for(let[r,i]of Array.from(a.entries())){const o=e[r];n!=r&&(o.tagName=="SELECT"&&i!==""||o.tagName==null&&i!==""||o.type=="radio"&&i!==""||o.type=="checkbox"&&i!==""||a.delete(r))}return new URLSearchParams(a).toString()}function $(e,n,a){const r=e.indexOf("?")<0?"?":"&",i=yt(n,a);return e=e+(i?r+i:""),e}function le(e){if(e){const a=[".png",".jpeg",".jpeg",".gif"];for(var n=0;n<a.length;n++)if(e.toLowerCase().indexOf(a[n])>0)return!0}}function K(e,n){B("GET",$(n,e.closest("form"),e.name),Me)}function vt(e){if(e){var n=document.querySelector(".form-fieldset."+e);n&&(n.style.display="none");var a=document.querySelector(".form-group."+e);a&&(a.style.display="none")}}function bt(e){if(e){var n=document.querySelector(".form-fieldset."+e);n&&(n.style.display="block");var a=document.querySelector(".form-group."+e);a&&(a.style.display="block")}}function pt(e){const n="reload-"+e+"-field";window[n]&&window[n]()}function wt(e,n){var a=document.querySelector(".form-group."+e),r=a.querySelector('*[name="'+e+'"]');if(r.tagName=="INPUT")r.value=n;else if(r.tagName=="SELECT"){if(r.style.display!="none")r.dispatchEvent(new CustomEvent("customchange",{detail:{value:n}}));else for(var i=0;i<r.options.length;i++)if(r.options[i].value==n){r.selectedIndex=i;break}}}function Me(e){if(e){for(var n=0;n<e.hide.length;n++)vt(e.hide[n]);for(var n=0;n<e.show.length;n++)bt(e.show[n]);for(var n=0;n<e.reload.length;n++)pt(e.reload[n]);for(var a in e.set)wt(a,e.set[a])}}function jt(e){function n(){const a={color:p.colors.info,backgroundColor:p.background.info,padding:20,display:"flex",justifyContent:"space-between",marginTop:10,marginBottom:10};return t.jsxs("div",{style:a,children:[t.jsxs("div",{children:[t.jsx(E,{icon:"circle-check",style:{color:p.colors.info,marginRight:20}}),e.data.text]}),e.children&&t.jsx("div",{children:e.children})]})}return n()}function kt(e){function n(){const a={color:"white",display:"none",backgroundColor:"#e52207",marginTop:2,marginBottom:2,padding:8};return t.jsxs("div",{style:a,id:e.id,className:"error",children:[t.jsx(E,{icon:"xmark-circle",style:{marginRight:5}}),t.jsx("span",{})]})}return n()}function St(e){function n(){const a={marginTop:2,marginBottom:2,fontStyle:"italic"};return t.jsx("div",{style:a,children:t.jsx("span",{children:e.text})})}return n()}function ae(e){const n=e.data.name+Math.random();function a(){const c={display:"flex",justifyContent:"space-between",alignItems:"baseline"};return e.data.action&&(e.data.action.icon=null,e.data.action.modal=!0,e.data.action.urlfunc=function(){return $(e.data.action.url,document.getElementById(n).closest("form"))}),t.jsxs("div",{style:c,children:[t.jsxs("label",{className:"bold",children:[e.data.label," ",e.data.label&&e.data.required?"*":""]}),e.data.action&&t.jsx(W,{data:e.data.action,style:{padding:0,margin:0}})]})}function r(){return e.data.type=="datetime"&&(e.data.type="datetime-local"),xt.indexOf(e.data.type)>=0?t.jsx(ye,{data:e.data}):e.data.type=="choice"&&Array.isArray(e.data.choices)?e.data.pick?Array.isArray(e.data.value)?t.jsx(ve,{data:e.data}):t.jsx(de,{data:e.data}):t.jsx(Mt,{data:e.data}):e.data.type=="choice"?e.data.pick?Array.isArray(e.data.value)?t.jsx(ve,{data:e.data}):t.jsx(de,{data:e.data}):t.jsx(Te,{data:e.data}):e.data.type=="decimal"?t.jsx(ye,{data:e.data}):e.data.type=="boolean"?t.jsx(Et,{data:e.data}):e.data.type=="textarea"?t.jsx(Ct,{data:e.data}):e.data.type=="scheduler"?(e.data.scheduler.input_name=e.data.name,t.jsx(Ee,{data:e.data.scheduler})):t.jsx("span",{children:e.data.name})}function i(){return t.jsx("div",{children:t.jsx(kt,{id:e.data.name+"_error"})})}function o(){return e.data.help_text&&t.jsx(St,{text:e.data.help_text})}function d(){const c={display:e.data.type=="hidden"?"none":"flex",flexDirection:"column",padding:5,width:"calc(100%-5px)"};return t.jsxs("div",{id:n,style:c,children:[a(),r(),o(),i()]})}return d()}function ye(e){var n="";const a=e.data.name+Math.random();e.data.mask=="decimal"&&(n="decimal",e.data.value&&(e.data.value=Math.round(parseFloat(e.data.value)).toFixed(2).replace(".",","))),I.useEffect(()=>{function d(u,l,m){var f=m.target,w=f.value.replace(/\D/g,""),y=f.value.length>l?1:0;VMasker(f).unMask(),VMasker(f).maskPattern(u[y]),f.value=VMasker.toPattern(w,u[y])}if(e.data.mask){var c=document.getElementById(a);if(e.data.mask=="decimal")VMasker(c).maskMoney({precision:2,separator:",",delimiter:"."});else if(e.data.mask.indexOf("|")>0){var s=e.data.mask.split("|");VMasker(c).maskPattern(s[0]),c.addEventListener("input",d.bind(void 0,s,14),!1)}else VMasker(c).maskPattern(e.data.mask)}},[]);function r(d){K(d.target,e.data.onchange)}function i(d){if(e.data.type=="file"&&d.target.files){let s=d.target.files[0];var c=new FileReader;c.onload=function(u){if(le(s.name)){const w="display"+a;var l=document.createElement("img");l.id=d.target.id+"img",l.style.width="200px",l.style.display="block",l.style.margin="auto",l.style.marginTop="20px",l.onload=function(y){const b=e.data.width>e.data.height?e.data.width/l.width:e.data.height/l.height;var D=document.createElement("canvas");const k=D.getContext("2d");D.height=D.width*(l.height/l.width);const L=document.createElement("canvas"),N=L.getContext("2d");L.width=l.width*b,L.height=l.height*b,N.drawImage(l,0,0,L.width,L.height),k.drawImage(L,0,0,L.width*b,L.height*b,0,0,D.width,D.height),L.toBlob(function(M){const S=new DataTransfer;S.items.add(new File([M],s.name)),d.target.files=S.files});var v=document.getElementById(w);v==null?(v=document.createElement("div"),v.id=w):v.removeChild(v.childNodes[0]),v.appendChild(l),d.target.parentNode.appendChild(v)},l.src=u.target.result}const m=document.getElementById("fileinfo"+a);var f=s.size/1024;f<1024?f=parseInt(f)+" Kb":f=(f/1024).toFixed(2)+" Mb",m.innerHTML=s.name+" / "+f,e.data.max_size&&s.size/1024/1024>e.data.max_size&&alert("O limite de tamanho é "+e.data.max_size+"Mb. O arquivo informado possui "+f+". Por favor, adicione um arquivo menor.")},c.readAsDataURL(s)}}function o(){var d=e.data.type;if(d=="datetime"&&(d="datetime-regional"),d=="decimal"&&(d="text"),d=="file"){const u={alignContent:"center",minHeight:75,padding:5,maxWidth:"100%",margin:"auto"};var c=null;return e.data.extensions&&e.data.extensions.length>0&&(c=e.data.extensions.map(l=>"."+l).join(", ")),t.jsxs(t.Fragment,{children:[t.jsxs("div",{style:{display:window.innerWidth<800?"block":"flex",justifyContent:"space-between",backgroundColor:"rgba(15, 145, 210, 0.05)",border:"1px dashed rgba(15, 145, 210, 0.4)",borderRadius:10,textAlign:"center"},children:[t.jsx("div",{style:u,children:t.jsx(E,{icon:"cloud-upload",style:{fontSize:"2.5rem",color:p.colors.primary}})}),t.jsxs("div",{style:u,children:[e.data.value&&le(e.data.value)&&t.jsx("div",{style:{textAlign:"center"},children:t.jsx("img",{src:e.data.value,height:50})}),e.data.value&&!le(e.data.value)&&t.jsx("div",{style:{textAlign:"center"},children:e.data.value}),"Selecione um arquivo clicando no botão ao lado.",t.jsxs("div",{className:"bold",id:"fileinfo"+a,children:["O arquivo",e.data.max_size&&"deve possuir até "+e.data.max_size+" Mb e ","deve ter extensão"," ",e.data.extensions.map(l=>"."+l).join(" ou "),"."]})]}),t.jsx("div",{style:u,align:"center",children:t.jsx(_,{label:"Selecionar Arquivo",onClick:()=>document.getElementById(a).click()})})]}),t.jsx("input",{className:"form-control "+n,type:d,name:e.data.name,id:a,"data-label":T(e.data.label),readOnly:e.data.read_only,onBlur:e.data.onchange?r:null,onChange:i,style:{zIndex:"-1",marginTop:-20},accept:c})]})}else{var s=Z;return d=="color"&&(s={...Z},s.width="100%",s.backgroundColor="white",s.height=47.5),t.jsx("input",{className:"form-control "+n,type:d,name:e.data.name,id:a,defaultValue:e.data.value,"data-label":T(e.data.label),readOnly:e.data.read_only,onBlur:e.data.onchange?r:null,onChange:i,style:s})}}return o()}function Te(e){var n=[];Array.isArray(e.data.value)?e.data.value.forEach(function(v,M){n.push({id:v.id,value:v.label})}):e.data.value!=null&&n.push({id:e.data.value.id,value:e.data.value.label}),e.data.id==null&&(e.data.id=Math.random()),e.data.id2==null&&(e.data.id2=e.data.id+"__autocomplete");const a=e.data.id,r=e.data.id2,i=Array.isArray(e.data.value),[o,d]=I.useState(!1),[c,s]=I.useState(null);var u=!1;let l;I.useEffect(()=>{k(n,!0),document.getElementById(a).addEventListener("customchange",function(v){k(v.detail.value);const M=document.getElementById(e.data.name);M&&reactTriggerChange(M)})},[]);function m(){const v=document.getElementById(a);if(i){const M={padding:5,display:"inline"},S={cursor:"pointer",marginRight:5},h={fontSize:"0.8rem"};return t.jsxs("div",{children:[v==null&&n.map((g,j)=>t.jsxs("div",{style:M,children:[t.jsx("span",{onClick:()=>L(j),style:S,children:t.jsx(E,{icon:"trash-can",style:h})}),g.value]},Math.random())),v!=null&&Array.from(v.options).map((g,j)=>t.jsxs("div",{style:M,children:[t.jsx("span",{onClick:()=>L(j),style:S,children:t.jsx(E,{icon:"trash-can",style:h})}),g.innerHTML]},Math.random()))]})}}function f(){return t.jsx("select",{id:a,name:e.data.name,multiple:i,readOnly:!0,style:{display:"contents"}})}function w(){const v={...Z,...e.style||{}},M={padding:0,margin:0,border:"solid 1px #d9d9d9",marginTop:-1,borderRadius:5,maxHeight:150,overflowY:"auto",zIndex:99999};M.position="absolute",M.backgroundColor="white";const S=document.getElementById(r);if(e.data.icon&&(v.paddingLeft=30),S){let q=null,R=S,U=null;for(;!U&&(R=R.parentElement)instanceof HTMLElement;)R.matches("dialog")&&(U=R);q=U;const G=S.getBoundingClientRect();var h=G.top+G.height,g=G.left;if(q){const te=q.getBoundingClientRect();h=h-te.top,g=g-te.left}else h+=window.scrollY,g+=window.scrollX;M.width=G.width,M.top=h,M.left=g}const j={cursor:"pointer",padding:10},C=!i&&n.length>0&&n[0].value||"";return t.jsxs(t.Fragment,{children:[e.data.icon&&t.jsx(E,{icon:e.data.icon,style:{position:"absolute",margin:13,color:"#d9d9d9"}}),t.jsx("input",{id:r,name:e.data.name+"__autocomplete",type:"text",className:"form-control",onFocus:q=>{q.target.select(),D(q)},onChange:D,onMouseLeave:y,onBlur:y,defaultValue:C,style:v,"data-label":T(e.data.label)}),c&&o&&t.jsxs("ul",{style:M,onMouseLeave:b,onMouseEnter:function(q){u=!0},children:[c.length==0&&t.jsx("li",{style:j,children:"Nenhuma opção encontrada."}),c.map(q=>t.jsx("li",{onClick:()=>{d(!1),e.onSelect?e.onSelect(q):k(q)},style:j,className:"autocomplete-item","data-label":T(q.value),children:q.value},Math.random()))]})]})}function y(v){u=!1,setTimeout(function(){u||b(v)},250)}function b(v){const M=document.getElementById(a);if(M){const S=document.getElementById(r);i||M.options.length>0&&S.value!=M.options[0].innerHTML&&(M.innerHTML="",S.value="",d(!1),e.data.onchange&&K(S,e.data.onchange)),v.target.tagName=="UL"?d(!1):u||d(!1)}}function D(v){clearTimeout(l),l=setTimeout(function(){const M=v.target.closest("form"),S=e.data.choices.indexOf("?")<0?"?":"&";d(!0),B("GET",$(e.data.choices+S+"term="+v.target.value,M),function(g){s(g)})},1e3)}function k(v,M=!1){const S=document.getElementById(a),h=document.getElementById(r);S.innerHTML==null&&(S.innerHTML=""),Array.isArray(v)?S.innerHTML=v.map(g=>`<option selected value="${g.id}">${g.value}</option>`).join(""):v?i?(S.innerHTML+=`<option selected value="${v.id}">${v.value}</option>`,h.value=""):(S.innerHTML=`<option selected value="${v.id}">${v.value}</option>`,h.value=v.value):(S.innerHTML="",h.value=""),e.data.onchange&&!M&&K(h,e.data.onchange)}function L(v){const M=document.getElementById(a);var S=Array.from(M.options);M.innerHTML=S.slice(0,v).concat(S.slice(v+1)).map(h=>`<option selected value="${h.value}">${h.innerHTML}</option>`).join(""),s([])}function N(){return t.jsxs(t.Fragment,{children:[m(),f(),w()]})}return N()}function Ct(e){function n(){var a={...Z};return a.height=100,t.jsx("textarea",{id:e.data.name,name:e.data.name,"data-label":T(e.data.label),style:a,defaultValue:e.data.value||"",className:"form-control"})}return n()}function Et(e){var n=e.data;return n.choices=[{id:!0,value:"Sim"},{id:!1,value:"Não"}],t.jsx(de,{data:n})}function de(e){const[n,a]=I.useState(e.data.choices);var r=Math.random(),i=e.data;function o(u){return i.value!=null?i.value==u.id?!0:i.value.id==u.id:!1}function d(u){var l=document.getElementById(u);i.checked&&(l.checked=!1),e.data.onchange&&K(l,e.data.onchange)}function c(u){var l=document.getElementById(u);i.checked=l.checked}function s(){return window["reload-"+i.name+"-field"]=function(){B("GET",$(e.data.pick,document.querySelector(".radio-group."+i.name).closest("form")),function(l){a(l)})},n.length>0?t.jsx("div",{className:"radio-group "+i.name,children:n.map((u,l)=>(u.id||u.id===!1)&&t.jsxs("div",{style:{paddingTop:10,display:"inline-block",marginRight:25,width:window.innerWidth>800?"auto":"100%"},children:[t.jsx("input",{id:i.name+r+l,type:"radio",name:i.name,defaultValue:u.id,defaultChecked:o(u),"data-label":T(u.value),onClick:function(){d(i.name+r+l)},onMouseEnter:function(){c(i.name+r+l)}}),t.jsx("label",{htmlFor:i.name+r+l,children:u.value})]},r+l))}):t.jsx("div",{className:"radio-group empty "+i.name,children:t.jsx(ee,{data:{text:"Nenhuma opção disponível para seleção."}})})}return s()}function ve(e){const[n,a]=I.useState(e.data.choices);var r=Math.random(),i=e.data;function o(s){var u=!1;if(i.value)for(var l=0;l<i.value.length;l++){var m=i.value[l];(m==s.id||m.id==s.id)&&(u=!0)}return u}function d(s){e.data.onchange&&K(s.target,e.data.onchange)}function c(){return window["reload-"+i.name+"-field"]=function(){B("GET",$(e.data.pick,document.querySelector(".checkbox-group."+i.name).closest("form")),function(u){a(u)})},n.length>0?t.jsx("div",{className:"checkbox-group "+i.name,children:n.map((s,u)=>(s.id||s.id===!1)&&t.jsxs("div",{style:{paddingTop:10,display:"inline-block",marginRight:25,width:window.innerWidth>800?"auto":"100%"},children:[t.jsx("input",{id:i.name+r+u,type:"checkbox",name:i.name,onClick:d,defaultValue:s.id,defaultChecked:o(s),"data-label":T(s.value)}),t.jsx("label",{htmlFor:i.name+r+u,children:s.value})]},r+u))}):t.jsx("div",{className:"checkbox-group empty "+i.name,children:t.jsx(ee,{data:{text:"Nenhuma opção disponível para seleção."}})})}return c()}function Mt(e){var n=e.data;return t.jsx(t.Fragment,{children:t.jsx("select",{className:"form-control",id:n.name,name:n.name,"data-label":T(n.label),defaultValue:n.value,style:Z,children:n.choices.map(a=>t.jsx("option",{value:a.id,children:a.value},Math.random()))})})}function Tt(e){const n=Math.random(),a=e.data.value[0],r=a.fields?a.fields[0]:a.fieldsets[0].fields[0][0];function i(){return!e.data.required&&t.jsx("div",{id:"info-"+n,children:t.jsxs(ee,{data:{text:"Esta informação é opcional. Controle seu preenchimento com o botão ao lado."},children:[t.jsx(_,{primary:!0,icon:"pen-clip",onClick:()=>o(!0),id:"show-"+n,display:r.value?"none":"inline"}),t.jsx(_,{primary:!0,icon:"trash",onClick:()=>o(!1),id:"hide-"+n,display:r.value?"inline":"none"})]})})}function o(s){const u=document.querySelector("input[name="+r.name+"]"),l=document.getElementById("inline-form-"+n),m=document.getElementById("show-"+n),f=document.getElementById("hide-"+n);l.style.display=s?"block":"none",m.style.display=s?"none":"inline",f.style.display=s?"inline":"none",s?u.value===""?u.value=0:u.value=-parseInt(u.value):parseInt(u.value)==0?u.value="":u.value=-parseInt(u.value)}function d(){const s={display:r.value?"block":"none"};return e.data.required&&(s.display="block",r.value===""&&(r.value=0)),t.jsx("div",{className:"fieldset-inline-forms",style:s,id:"inline-form-"+n,children:e.data.value.map(function(u){return t.jsx(he,{data:u},Math.random())})})}function c(){const s={margin:0};return t.jsxs("div",{className:"form-fieldset",children:[t.jsx("h2",{style:s,"data-label":T(e.data.label),children:e.data.label}),i(),d()]})}return c()}function It(e){var n=0;const a=Math.random();e.data.template==null&&(e.data.template=e.data.value.pop());function r(l,m){const f=n;return n+=1,t.jsxs("div",{style:{display:"block"},id:"form-"+f+"-"+a,children:[t.jsx(he,{data:l}),t.jsxs("div",{style:{textAlign:"center",marginTop:10,marginBottom:10},children:[t.jsx(_,{primary:!0,icon:"plus",onClick:()=>o(),id:"extra-add-"+f+"-",display:m}),t.jsx(_,{primary:!0,icon:"trash",onClick:()=>d(f),display:"inline"})]})]},Math.random())}function i(){const l=c(),m=l.length>0?"none":"inline";document.getElementById("add-"+a).style.display=m;for(var f=0;f<n;f++){var w=document.getElementById("extra-add-"+f+"-");w.style.display="none"}if(l.length>0){var w=document.getElementById("extra-add-"+l[l.length-1]+"-");w.style.display="inline"}}function o(){i();var l=JSON.parse(JSON.stringify(e.data.template));l.fields?(l.fields.map(function(m){m.name=m.name.replace("__n__","__"+n+"__")}),l.fields[0].value=0):l.fieldsets.map(function(m){m.fields.map(function(f){f.map(function(w){w.name=w.name.replace("__n__","__"+n+"__")}),f[0].value=0})}),P.createRoot(document.getElementById(a).appendChild(document.createElement("div"))).render(r(l,"inline")),setTimeout(i,100)}function d(l){const m=e.data.template,w=(m.fields?m.fields[0]:m.fieldsets[0].fields[0][0]).name.replace("__n__","__"+l+"__"),y=document.querySelector("input[name="+w+"]");parseInt(y.value)==0?y.value="":y.value=-parseInt(y.value),document.getElementById("form-"+l+"-"+a).style.display="none",i()}function c(){for(var l=[],m=0;m<n;m++)document.getElementById("form-"+m+"-"+a).style.display=="block"&&l.push(m);return l}function s(){return t.jsx("div",{id:"info-"+a,children:t.jsx(ee,{data:{text:'Clique no botão com o ícone de "+" para adicionar e com o ícone da "lixeira" para remover.'},children:t.jsx(_,{primary:!0,icon:"add",onClick:()=>o(),id:"add-"+a,display:e.data.value.length>0?"none":"inline"})})})}function u(){const l={margin:0};return t.jsxs("div",{className:"form-fieldset",children:[t.jsx("h2",{style:l,"data-label":T(e.data.label),children:e.data.label}),t.jsx("div",{children:!1}),t.jsxs("div",{id:a,className:"fieldset-inline-forms",children:[s(),e.data.value.map(function(m,f){return r(m,f==e.data.value.length-1?"inline":"none")})]})]})}return u()}function he(e){I.useEffect(()=>{e.data.controls&&Me(e.data.controls)},[]);function n(r){return r.type=="inline"?r.max==r.min==1?t.jsx(Tt,{data:r},Math.random()):t.jsx(It,{data:r},Math.random()):t.jsx(ae,{data:r},Math.random())}function a(){return e.data.fields?t.jsx("div",{className:"form-fields",children:e.data.fields.map(r=>n(r))}):e.data.fieldsets.map(r=>t.jsx("div",{className:"form-fieldset",children:r.type=="inline"?n(r):t.jsxs(t.Fragment,{children:[t.jsx("h2",{"data-label":T(r.title),style:{margin:0},children:r.title}),r.fields.map(i=>t.jsx("div",{children:i.map(o=>t.jsx("div",{className:"form-group "+o.name,style:{verticalAlign:"bottom",width:100/i.length+"%",display:o.type=="hidden"?"none":"inline-block"},children:n(o)},Math.random()))},Math.random()))]})},Math.random()))}return a()}function Nt(e){const n=Math.random();I.useEffect(()=>{e.data.autosubmit&&setInterval(m,e.data.autosubmit*1e3)},[]);function a(){const f={margin:0,color:p.colors.primary};return t.jsx("h1",{style:f,children:e.data.title})}function r(){return e.data.info&&t.jsx(jt,{data:{text:e.data.info}})}function i(){if(e.data.display)return t.jsxs(t.Fragment,{children:[e.data.display.map(f=>t.jsx(x,{data:f},Math.random())),t.jsx("div",{style:{marginTop:30}})]})}function o(){return t.jsx(he,{data:e.data})}function d(){return t.jsxs("div",{style:{marginTop:20,textAlign:"right"},children:[t.jsx(_,{onClick:l,label:"Cancelar",default:!0,display:"inline"}),t.jsx(_,{onClick:m,label:"Enviar",primary:!0,display:"inline",icon:"chevron-right",spin:!0})]})}function c(){return t.jsx("div",{id:"output",style:{marginTop:30}})}function s(){if(e.data.image)return t.jsx("div",{style:{margin:"auto",width:"100%",textAlign:"center"},children:t.jsx("img",{src:e.data.image})})}function u(){return t.jsxs("form",{id:n,className:e.data.key,action:e.data.url,style:{margin:"auto",backgroundColor:"white"},method:e.data.method,children:[t.jsx("div",{children:!1}),t.jsxs("div",{style:{padding:5},children:[a(),s(),r(),i(),o(),d(),c()]})]})}function l(){J()}function m(f){f&&f.preventDefault();var w=e.data.url,y=document.getElementById(n),b=new FormData(y);if(y.method.toUpperCase()=="GET"){const D=w.indexOf("?")>=0?"&":"?";w=w+D+"form="+e.data.title+"&"+new URLSearchParams(b).toString(),b=null}e.data.autosubmit&&f==null&&(w+="&autosubmit=1"),B(y.method.toUpperCase(),w,function(k){if(y.querySelectorAll(".error").forEach(N=>N.style.display="none"),f.target.dataset.spinning&&(f.target.querySelector("i.fa-spin").style.display="none",f.target.querySelector("i.fa-"+f.target.dataset.spinning).style.display="inline-block"),k.type=="response")if(k.store&&we(k.store),k.redirect&&k.redirect.length>2)k.message&&localStorage.setItem("message",k.message),f&&(document.location.href=V(k.redirect));else if(k.message&&z(k.message),k.task){let N=function(){B("GET","/api/job/progress/"+k.task+"/",function(S){S==null||S.progress==100?f.target.innerHTML=v:(f.target.innerHTML="Aguarde... ("+(S.progress||0)+"%)",setTimeout(N,5e3))})};const v=f.target.innerHTML;f.target.innerHTML="Aguarde... (0%)",N()}else k.redirect==".."&&(document.getElementsByTagName("dialog").length==0?history.back():J()),k.redirect=="."&&y.reset(),k.dispose&&(y.style.display="none"),Ke();else if(k.type=="error"){var L=k.text;console.log(k),Object.keys(k.errors).map(function(N){if(N=="__all__")L=k.errors[N];else{const v=y.querySelector("#"+N+"_error");v==null?L=N+":"+k.errors[N]:(v.querySelector("span").innerHTML=k.errors[N],v.style.display="block")}}),z(L,!0)}else{const N=document.querySelector("#output");N.innerHTML="",P.createRoot(N.appendChild(document.createElement("div"))).render(t.jsx(x,{data:k}))}},b)}return u()}function Dt(e){A(`
128
128
  .calendar table{
129
129
  width: 100%;
130
130
  border-spacing: 0px;
@@ -213,11 +213,11 @@ import{j as t,c as P,r as N,R as Ie}from"./react.min.js";const p={colors:{primar
213
213
  font-weight: active ? bold : normal;
214
214
  text-decoration: none;
215
215
  }
216
- `),e.data.id==null&&(e.data.id=Math.random());const[n,a]=N.useState(e.data);function r(){return n.attrname?t.jsx("h2",{"data-label":T(n.title),children:n.title}):t.jsxs("h1",{"data-label":T(n.title),children:[n.title," ",n.total>10&&"("+n.total+")"]})}function i(){return t.jsxs("div",{className:"title",children:[r(),t.jsx("i",{id:"loader-"+e.data.id,className:"fa-solid fa-circle-notch fa-spin fa-1x"})]})}function o(h){document.getElementById("loader-"+e.data.id).style.display=h?"block":"none"}function d(){return n.subsets&&t.jsx("div",{className:"tabs",children:n.subsets.map(function(h,g){var j=n.subset===h.name||!n.subset&&g==0;return t.jsxs(F,{href:"#",style:{borderBottom:j?"solid 3px #2670e8":0,color:"#0c326f"},onClick:function(C){C.preventDefault(),c(h.name)},dataLabel:T(h.label),children:[h.label," ",t.jsx(qt,{total:h.count})]},Math.random())})})}function c(h){const g=document.getElementById("subset-"+e.data.id);g.value=h||"",I()}function s(h,g,j){const C=document.getElementById("form-"+e.data.id);C.querySelector("input[name="+n.calendar.field+"__day]").value=h||"",C.querySelector("input[name="+n.calendar.field+"__month]").value=g||"",C.querySelector("input[name="+n.calendar.field+"__year]").value=j||"",y(1)}function u(){if(n.calendar)return t.jsx(Dt,{data:n.calendar,onChange:s})}function l(h){const g={textAlign:"left",verticalAlign:"top",lineHeight:"1.2rem",color:p.colors.primary,padding:5};if(!(window.innerWidth<800))return t.jsxs("tr",{children:[h.map(function(j){return j.label!="ID"&&t.jsx("th",{style:g,className:"bold",children:j.label},Math.random())}),t.jsx("th",{style:g})]})}function m(h){const g={borderBottom:"solid 1px #DDD",padding:5},j={borderBottom:"solid 1px #DDD",lineHeight:"3rem",textAlign:"right"};return window.innerWidth<800?t.jsxs("tr",{children:[t.jsx("td",{style:g,children:h.title},Math.random()),t.jsx("td",{style:j,children:t.jsx("div",{style:{verticalAlign:"center"},children:t.jsx(E,{icon:"chevron-right",onClick:()=>Oe(h.actions),style:{cursor:"pointer",marginRight:20}})})})]},Math.random()):t.jsxs("tr",{children:[h.data.map(function(C){return C.label!="ID"&&t.jsx("td",{style:g,children:H(C.value)},Math.random())}),t.jsx("td",{style:j,children:t.jsx("div",{style:{verticalAlign:"center"},children:h.actions.map(function(C){return t.jsx(W,{data:C,default:!0},Math.random())})})})]},Math.random())}function f(){return n.data.length>0?(n.render==null&&window.innerWidth<800&&(n.renderer="rows"),n.renderer?n.renderer=="cards"?t.jsx(Y,{width:300,alignItems:"start",children:n.data.map(function(h){return h.type=n.renderer,t.jsx(x,{data:h},Math.random())})}):t.jsx("div",{style:{marginBottom:15},children:n.data.map(function(h){return h.type=n.renderer,t.jsx(x,{data:h},Math.random())})}):w()):t.jsx(ee,{data:{text:"Nenhum registro encontrado."}})}function w(){const h={width:"100%",overflowX:"auto"},g={width:"100%",lineHeight:"2rem",borderSpacing:0};return t.jsx("div",{style:h,children:t.jsxs("table",{style:g,children:[t.jsx("thead",{children:l(n.data[0].data)}),t.jsx("tbody",{children:n.data.map(function(j){return m(j)})})]})})}function y(h){const j=document.getElementById("form-"+e.data.id).querySelector("input[name=page]");j&&(j.value=h),I(),k()}function b(){const h=document.getElementById("form-"+e.data.id);if(h){const g=h.querySelector("input[name=page]");g&&(g.value=n.pagination.page.current)}return t.jsx(Lt,{data:n.pagination,onChange:y,total:n.total})}function D(){return t.jsx("div",{align:"right",style:{marginTop:20,marginBottom:20},children:n.actions.map(function(h){return t.jsx(W,{data:h,primary:!0},Math.random())})})}function k(){const h=document.getElementById(e.data.id).getBoundingClientRect().top+window.scrollY;console.log(h),console.log(e.data.id),window.scrollTo({top:h,behavior:"smooth"})}function L(){const h={backgroundColor:"#f8f8f8",borderBottom:"solid 1px #DDD",marginBottom:10,padding:10},g=n.search.length>0,j=n.filters.length>0;if((n.bi||n.data.length>=0)&&(g||j)){const C={name:"q",mask:null,type:"text",label:"Palavras-chaves",value:n.q};return t.jsxs("div",{style:h,children:[t.jsxs(Y,{width:250,children:[g&&t.jsx("div",{children:t.jsx(ae,{data:C})}),j&&n.filters.map(function(q){return q.type!="hidden"&&t.jsx("div",{children:t.jsx(ae,{data:q})},Math.random())}),t.jsx("div",{children:t.jsx(_,{onClick:I,label:"Filtrar",icon:"filter"})})]}),j&&n.filters.map(function(q){return q.type=="hidden"&&t.jsx("div",{children:t.jsx(ae,{data:q})},Math.random())})]})}}function I(){o(!0);var h;const g=new URLSearchParams(new FormData(document.getElementById("form-"+e.data.id))).toString();e.data.url.indexOf("?")>0?h=e.data.url+"&"+g:h=e.data.url+"?"+g,B("GET",h,function(j){a(j),o(!1)})}function v(){const h={color:p.colors.primary};return e.data.reloadable&&t.jsxs("div",{align:"center",children:[t.jsxs("i",{children:["Ultima atualização em ",new Date().toLocaleTimeString()]}),t.jsx("div",{children:t.jsx(F,{style:h,onClick:g=>{g.preventDefault(),I()},children:"Atualizar agora"})})]})}function M(){return n.bi?t.jsxs(t.Fragment,{children:[L(),n.bi.map(function(h){return t.jsx(Y,{width:300,alignItems:"start",children:h.map(function(g){return t.jsx("div",{children:t.jsx(x,{data:g})},Math.random())})},Math.random())})]}):t.jsxs("div",{className:"content",children:[v(),D(),d(),L(),u(),f(),b()]})}function S(){window[e.data.id]=()=>I();const h={backgroundColor:"white",padding:20};return t.jsx("div",{className:"reloadable queryset",id:e.data.id,sytle:h,children:t.jsxs("form",{id:"form-"+e.data.id,children:[t.jsx("div",{children:!1}),t.jsx("input",{type:"hidden",name:"subset",id:"subset-"+e.data.id}),i(),M()]})})}return S()}function oe(e){var n=Math.random();function a(){var r=document.getElementById(n);if(r){var i=echarts.init(r);i.setOption(e.option)}else setTimeout(a,1e3)}return setTimeout(a,1e3),t.jsx("div",{id:n,style:{width:"100%",height:300}})}function me(e){var n=[["70%","78%"],["60%","68%"],["50%","58%"],["40%","48%"],["30%","48%"],["20%","28%"],["10%","18%"]];function a(){return e.headers?e.headers.slice(1).map(function(i,o){return{name:i,type:"pie",radius:n[o],emphasis:{label:{show:!0,formatter:function(d){return d.value.toLocaleString("pt-BR")},fontWeight:"bold"}},roseType:null,data:e.rows.map(function(d){return{name:d[0],value:d[o+1]}})}}):{name:null,type:"pie",radius:e.donut?["25%","65%"]:["0%","75%"],emphasis:{label:{show:!0,formatter:function(i){return i.value.toLocaleString("pt-BR")},fontWeight:"bold"}},roseType:e.area?"area":null,data:e.rows.map(function(i,o){return{name:i[0],value:i[1]}})}}function r(){var i={tooltip:{trigger:"item",formatter:function(o){return`${o.name}: <b>${o.data.value.toLocaleString("pt-BR")}</b> (${o.percent.toLocaleString("pt-BR")}%)`}},legend:{},label:{show:!0,formatter(o){return o.name+" ("+o.percent.toLocaleString("pt-BR")+"%)"}},series:a()};return t.jsx(oe,{option:i})}return r()}function At(e){return t.jsx(me,{donut:!0,headers:e.headers,rows:e.rows})}function Rt(e){return t.jsx(me,{area:!0,headers:e.headers,rows:e.rows})}function X(e){var n=e.invert||!1,a=e.type||"bar",r=e.stack,i={type:"value"},o={show:!0,feature:{mark:{show:!0},saveAsImage:{show:!0}}},d=e.area?{}:null;function c(){return e.headers?{type:"category",data:e.headers.slice(1)}:{type:"category",data:e.rows.map(function(l){return l[0]})}}function s(){return e.headers?e.rows.map(function(l){return{name:l[0],data:l.slice(1),type:a,stack:r,areaStyle:d}}):[{name:null,data:e.rows.map(function(l){return l[1]}),type:a,stack:r,areaStyle:d}]}function u(){var l={toolbox:o,tooltip:{trigger:"axis",axisPointer:{type:"shadow"},formatter:function(m){return`${m[0].name}: <b>${m[0].value.toLocaleString("pt-BR")}</b>`}},legend:{},label:{show:!0,formatter:function(m){return m.value.toLocaleString("pt-BR")}},xAxis:n?i:c(),yAxis:n?c():i,series:s()};return t.jsx(oe,{option:l})}return u()}function Ot(e){return t.jsx(X,{headers:e.headers,rows:e.rows})}function _t(e){return t.jsx(X,{type:"line",headers:e.headers,rows:e.rows})}function Ft(e){return t.jsx(X,{area:!0,type:"line",headers:e.headers,rows:e.rows})}function Wt(e){return t.jsx(X,{stack:"1",headers:e.headers,rows:e.rows})}function zt(e){return t.jsx(X,{invert:!0,headers:e.headers,rows:e.rows})}function Ht(e){return t.jsx(X,{invert:!0,stack:"1",headers:e.headers,rows:e.rows})}function Pt(e){function n(){return e.headers?[{type:"treemap",roam:"move",nodeClick:!0,data:e.headers.slice(1).map(function(r,i){return{name:r,type:"pie",children:e.rows.map(function(o){return{name:o[0],value:o[i+1]}})}})}]:[{type:"treemap",roam:"move",nodeClick:!1,data:e.rows.map(function(r){return{name:r[0],value:r[1]}})}]}function a(){var r={tooltip:{trigger:"item"},legend:{},label:{show:!0,formatter(i){return i.name+" ("+i.value.toLocaleString("pt-BR")+")"}},series:n()};return t.jsx(oe,{option:r})}return a()}function Ut(e){function n(){var a={series:[{type:"gauge",startAngle:0,endAngle:360,min:0,max:100,progress:{show:!0,width:38},pointer:null,axisTick:null,splitLine:{length:0},axisLine:{lineStyle:{width:38}},axisLabel:null,detail:{backgroundColor:"#fff",fontSize:"2.5rem",width:"60%",lineHeight:40,height:40,borderRadius:8,offsetCenter:[0,"0%"],valueAnimation:!0,formatter:function(r){return r.toFixed(0)+"%"}},data:[{value:e.value}]}]};return t.jsx(oe,{option:a})}return n()}function be(e){function n(){switch(e.type){case"pie":return t.jsx(me,{headers:e.headers,rows:e.rows});case"polar":return t.jsx(Rt,{headers:e.headers,rows:e.rows});case"donut":return t.jsx(At,{headers:e.headers,rows:e.rows});case"bar":return t.jsx(Ot,{headers:e.headers,rows:e.rows});case"stacked_bar":return t.jsx(Wt,{headers:e.headers,rows:e.rows});case"column":return t.jsx(zt,{headers:e.headers,rows:e.rows});case"stacked_column":return t.jsx(Ht,{headers:e.headers,rows:e.rows});case"tree_map":return t.jsx(Pt,{headers:e.headers,rows:e.rows});case"line":return t.jsx(_t,{headers:e.headers,rows:e.rows});case"area":return t.jsx(Ft,{headers:e.headers,rows:e.rows});case"progress":return t.jsx(Ut,{headers:e.headers,rows:e.rows});default:return t.jsx(X,{headers:e.headers,rows:e.rows})}}function a(){return t.jsxs("div",{style:{width:"100%",margin:"auto"},children:[e.title&&t.jsx("h2",{className:"title",children:e.title}),n()]})}return a()}function Gt(e){A(`
216
+ `),e.data.id==null&&(e.data.id=Math.random());const[n,a]=I.useState(e.data);function r(){return n.attrname?t.jsx("h2",{"data-label":T(n.title),children:n.title}):t.jsxs("h1",{"data-label":T(n.title),children:[n.title," ",n.total>10&&"("+n.total+")"]})}function i(){return t.jsxs("div",{className:"title",children:[r(),t.jsx("i",{id:"loader-"+e.data.id,className:"fa-solid fa-circle-notch fa-spin fa-1x"})]})}function o(h){document.getElementById("loader-"+e.data.id).style.display=h?"block":"none"}function d(){return n.subsets&&t.jsx("div",{className:"tabs",children:n.subsets.map(function(h,g){var j=n.subset===h.name||!n.subset&&g==0;return t.jsxs(F,{href:"#",style:{borderBottom:j?"solid 3px #2670e8":0,color:"#0c326f"},onClick:function(C){C.preventDefault(),c(h.name)},dataLabel:T(h.label),children:[h.label," ",t.jsx(qt,{total:h.count})]},Math.random())})})}function c(h){const g=document.getElementById("subset-"+e.data.id);g.value=h||"",N()}function s(h,g,j){const C=document.getElementById("form-"+e.data.id);C.querySelector("input[name="+n.calendar.field+"__day]").value=h||"",C.querySelector("input[name="+n.calendar.field+"__month]").value=g||"",C.querySelector("input[name="+n.calendar.field+"__year]").value=j||"",y(1)}function u(){if(n.calendar)return t.jsx(Dt,{data:n.calendar,onChange:s})}function l(h){const g={textAlign:"left",verticalAlign:"top",lineHeight:"1.2rem",color:p.colors.primary,padding:5};if(!(window.innerWidth<800))return t.jsxs("tr",{children:[h.map(function(j){return j.label!="ID"&&t.jsx("th",{style:g,className:"bold",children:j.label},Math.random())}),t.jsx("th",{style:g})]})}function m(h){const g={borderBottom:"solid 1px #DDD",padding:5},j={borderBottom:"solid 1px #DDD",lineHeight:"3rem",textAlign:"right"};return window.innerWidth<800?t.jsxs("tr",{children:[t.jsx("td",{style:g,children:h.title},Math.random()),t.jsx("td",{style:j,children:t.jsx("div",{style:{verticalAlign:"center"},children:t.jsx(E,{icon:"chevron-right",onClick:()=>Oe(h.actions),style:{cursor:"pointer",marginRight:20}})})})]},Math.random()):t.jsxs("tr",{children:[h.data.map(function(C){return C.label!="ID"&&t.jsx("td",{style:g,children:H(C.value)},Math.random())}),t.jsx("td",{style:j,children:t.jsx("div",{style:{verticalAlign:"center"},children:h.actions.map(function(C){return t.jsx(W,{data:C,default:!0},Math.random())})})})]},Math.random())}function f(){return n.data.length>0?(n.render==null&&window.innerWidth<800&&(n.renderer="rows"),n.renderer?n.renderer=="cards"?t.jsx(Y,{width:300,alignItems:"start",children:n.data.map(function(h){return h.type=n.renderer,t.jsx(x,{data:h},Math.random())})}):t.jsx("div",{style:{marginBottom:15},children:n.data.map(function(h){return h.type=n.renderer,t.jsx(x,{data:h},Math.random())})}):w()):t.jsx(ee,{data:{text:"Nenhum registro encontrado."}})}function w(){const h={width:"100%",overflowX:"auto"},g={width:"100%",lineHeight:"2rem",borderSpacing:0};return t.jsx("div",{style:h,children:t.jsxs("table",{style:g,children:[t.jsx("thead",{children:l(n.data[0].data)}),t.jsx("tbody",{children:n.data.map(function(j){return m(j)})})]})})}function y(h){const j=document.getElementById("form-"+e.data.id).querySelector("input[name=page]");j&&(j.value=h),N(),k()}function b(){const h=document.getElementById("form-"+e.data.id);if(h){const g=h.querySelector("input[name=page]");g&&(g.value=n.pagination.page.current)}return t.jsx(Lt,{data:n.pagination,onChange:y,total:n.total})}function D(){return t.jsx("div",{align:"right",style:{marginTop:20,marginBottom:20},children:n.actions.map(function(h){return t.jsx(W,{data:h,primary:!0},Math.random())})})}function k(){const h=document.getElementById(e.data.id).getBoundingClientRect().top+window.scrollY;console.log(h),console.log(e.data.id),window.scrollTo({top:h,behavior:"smooth"})}function L(){const h={backgroundColor:"#f8f8f8",borderBottom:"solid 1px #DDD",marginBottom:10,padding:10},g=n.search.length>0,j=n.filters.length>0;if((n.bi||n.data.length>=0)&&(g||j)){const C={name:"q",mask:null,type:"text",label:"Palavras-chaves",value:n.q};return t.jsxs("div",{style:h,children:[t.jsxs(Y,{width:250,children:[g&&t.jsx("div",{children:t.jsx(ae,{data:C})}),j&&n.filters.map(function(q){return q.type!="hidden"&&t.jsx("div",{children:t.jsx(ae,{data:q})},Math.random())}),t.jsx("div",{children:t.jsx(_,{onClick:N,label:"Filtrar",icon:"filter"})})]}),j&&n.filters.map(function(q){return q.type=="hidden"&&t.jsx("div",{children:t.jsx(ae,{data:q})},Math.random())})]})}}function N(){o(!0);var h;const g=new URLSearchParams(new FormData(document.getElementById("form-"+e.data.id))).toString();e.data.url.indexOf("?")>0?h=e.data.url+"&"+g:h=e.data.url+"?"+g,B("GET",h,function(j){a(j),o(!1)})}function v(){const h={color:p.colors.primary};return e.data.reloadable&&t.jsxs("div",{align:"center",children:[t.jsxs("i",{children:["Ultima atualização em ",new Date().toLocaleTimeString()]}),t.jsx("div",{children:t.jsx(F,{style:h,onClick:g=>{g.preventDefault(),N()},children:"Atualizar agora"})})]})}function M(){return n.bi?t.jsxs(t.Fragment,{children:[L(),n.bi.map(function(h){return t.jsx(Y,{width:300,alignItems:"start",children:h.map(function(g){return t.jsx("div",{children:t.jsx(x,{data:g})},Math.random())})},Math.random())})]}):t.jsxs("div",{className:"content",children:[v(),D(),d(),L(),u(),f(),b()]})}function S(){window[e.data.id]=()=>N();const h={backgroundColor:"white",padding:20};return t.jsx("div",{className:"reloadable queryset",id:e.data.id,sytle:h,children:t.jsxs("form",{id:"form-"+e.data.id,children:[t.jsx("div",{children:!1}),t.jsx("input",{type:"hidden",name:"subset",id:"subset-"+e.data.id}),i(),M()]})})}return S()}function oe(e){var n=Math.random();function a(){var r=document.getElementById(n);if(r){var i=echarts.init(r);i.setOption(e.option)}else setTimeout(a,1e3)}return setTimeout(a,1e3),t.jsx("div",{id:n,style:{width:"100%",height:300}})}function me(e){var n=[["70%","78%"],["60%","68%"],["50%","58%"],["40%","48%"],["30%","48%"],["20%","28%"],["10%","18%"]];function a(){return e.headers?e.headers.slice(1).map(function(i,o){return{name:i,type:"pie",radius:n[o],emphasis:{label:{show:!0,formatter:function(d){return d.value.toLocaleString("pt-BR")},fontWeight:"bold"}},roseType:null,data:e.rows.map(function(d){return{name:d[0],value:d[o+1]}})}}):{name:null,type:"pie",radius:e.donut?["25%","65%"]:["0%","75%"],emphasis:{label:{show:!0,formatter:function(i){return i.value.toLocaleString("pt-BR")},fontWeight:"bold"}},roseType:e.area?"area":null,data:e.rows.map(function(i,o){return{name:i[0],value:i[1]}})}}function r(){var i={tooltip:{trigger:"item",formatter:function(o){return`${o.name}: <b>${o.data.value.toLocaleString("pt-BR")}</b> (${o.percent.toLocaleString("pt-BR")}%)`}},legend:{},label:{show:!0,formatter(o){return o.name+" ("+o.percent.toLocaleString("pt-BR")+"%)"}},series:a()};return t.jsx(oe,{option:i})}return r()}function At(e){return t.jsx(me,{donut:!0,headers:e.headers,rows:e.rows})}function Rt(e){return t.jsx(me,{area:!0,headers:e.headers,rows:e.rows})}function X(e){var n=e.invert||!1,a=e.type||"bar",r=e.stack,i={type:"value"},o={show:!0,feature:{mark:{show:!0},saveAsImage:{show:!0}}},d=e.area?{}:null;function c(){return e.headers?{type:"category",data:e.headers.slice(1)}:{type:"category",data:e.rows.map(function(l){return l[0]})}}function s(){return e.headers?e.rows.map(function(l){return{name:l[0],data:l.slice(1),type:a,stack:r,areaStyle:d}}):[{name:null,data:e.rows.map(function(l){return l[1]}),type:a,stack:r,areaStyle:d}]}function u(){var l={toolbox:o,tooltip:{trigger:"axis",axisPointer:{type:"shadow"},formatter:function(m){return`${m[0].name}: <b>${m[0].value.toLocaleString("pt-BR")}</b>`}},legend:{},label:{show:!0,formatter:function(m){return m.value.toLocaleString("pt-BR")}},xAxis:n?i:c(),yAxis:n?c():i,series:s()};return t.jsx(oe,{option:l})}return u()}function Ot(e){return t.jsx(X,{headers:e.headers,rows:e.rows})}function _t(e){return t.jsx(X,{type:"line",headers:e.headers,rows:e.rows})}function Ft(e){return t.jsx(X,{area:!0,type:"line",headers:e.headers,rows:e.rows})}function Wt(e){return t.jsx(X,{stack:"1",headers:e.headers,rows:e.rows})}function zt(e){return t.jsx(X,{invert:!0,headers:e.headers,rows:e.rows})}function Ht(e){return t.jsx(X,{invert:!0,stack:"1",headers:e.headers,rows:e.rows})}function Pt(e){function n(){return e.headers?[{type:"treemap",roam:"move",nodeClick:!0,data:e.headers.slice(1).map(function(r,i){return{name:r,type:"pie",children:e.rows.map(function(o){return{name:o[0],value:o[i+1]}})}})}]:[{type:"treemap",roam:"move",nodeClick:!1,data:e.rows.map(function(r){return{name:r[0],value:r[1]}})}]}function a(){var r={tooltip:{trigger:"item"},legend:{},label:{show:!0,formatter(i){return i.name+" ("+i.value.toLocaleString("pt-BR")+")"}},series:n()};return t.jsx(oe,{option:r})}return a()}function Ut(e){function n(){var a={series:[{type:"gauge",startAngle:0,endAngle:360,min:0,max:100,progress:{show:!0,width:38},pointer:null,axisTick:null,splitLine:{length:0},axisLine:{lineStyle:{width:38}},axisLabel:null,detail:{backgroundColor:"#fff",fontSize:"2.5rem",width:"60%",lineHeight:40,height:40,borderRadius:8,offsetCenter:[0,"0%"],valueAnimation:!0,formatter:function(r){return r.toFixed(0)+"%"}},data:[{value:e.value}]}]};return t.jsx(oe,{option:a})}return n()}function be(e){function n(){switch(e.type){case"pie":return t.jsx(me,{headers:e.headers,rows:e.rows});case"polar":return t.jsx(Rt,{headers:e.headers,rows:e.rows});case"donut":return t.jsx(At,{headers:e.headers,rows:e.rows});case"bar":return t.jsx(Ot,{headers:e.headers,rows:e.rows});case"stacked_bar":return t.jsx(Wt,{headers:e.headers,rows:e.rows});case"column":return t.jsx(zt,{headers:e.headers,rows:e.rows});case"stacked_column":return t.jsx(Ht,{headers:e.headers,rows:e.rows});case"tree_map":return t.jsx(Pt,{headers:e.headers,rows:e.rows});case"line":return t.jsx(_t,{headers:e.headers,rows:e.rows});case"area":return t.jsx(Ft,{headers:e.headers,rows:e.rows});case"progress":return t.jsx(Ut,{headers:e.headers,rows:e.rows});default:return t.jsx(X,{headers:e.headers,rows:e.rows})}}function a(){return t.jsxs("div",{style:{width:"100%",margin:"auto"},children:[e.title&&t.jsx("h2",{className:"title",children:e.title}),n()]})}return a()}function Gt(e){A(`
217
217
  .statistics .odd {
218
218
  background-color: #EEE;
219
219
  }
220
- `);function n(){for(var r=[],i=0;i<e.data.series.length;i++)r.push([e.data.series[i][0],e.data.series[i][1]]);return e.data.chart?t.jsx(be,{type:e.data.chart,title:e.data.title,rows:r}):t.jsxs("div",{className:"statistics",children:[e.data.title&&t.jsx("h2",{"data-label":T(e.data.title),children:e.data.title}),t.jsx("table",{style:{width:"100%",borderSpacing:0},children:t.jsx("tbody",{children:r.map((o,d)=>t.jsx("tr",{children:o.map((c,s)=>s==0?t.jsx("th",{style:{textAlign:"left",lineHeight:"2rem",padding:5},className:d%2==0?"even":"odd",children:c},Math.random()):t.jsx("td",{className:d%2==0?"even":"odd",children:H(c)},Math.random()))},Math.random()))})})]})}function a(){for(var r=[],i=[],o=Object.keys(e.data.series),d=[],c=0;c<o.length;c++){c==0&&r.push("");for(var s=[o[c]],u=0,l=0;l<e.data.series[o[c]].length;l++){var m=e.data.series[o[c]];c==0&&r.push(m[l][0]),s.push(m[l][1]),u+=m[l][1],o.length>1&&(c==0?d.push(m[l][1]):d[l]+=m[l][1],l>0&&l==e.data.series[o[c]].length-1&&(c==0?d.push(u):d[l+1]+=u))}s.length>2&&(c==0&&r.push(""),s.push(u)),i.push(s)}return e.data.chart?t.jsx(be,{type:e.data.chart,title:e.data.title,headers:r,rows:i}):t.jsxs("div",{className:"statistics",children:[e.data.title&&t.jsx("h2",{"data-label":T(e.data.title),children:e.data.title}),t.jsxs("table",{style:{width:"100%",borderSpacing:0},children:[r&&t.jsx("thead",{children:t.jsx("tr",{children:r.map(f=>t.jsx("th",{className:"bold",style:{textAlign:"left",padding:5},children:f},Math.random()))})}),t.jsxs("tbody",{children:[i.map((f,w)=>t.jsx("tr",{children:f.map((y,b)=>b==0?t.jsx("th",{className:w%2==0?"even":"odd",style:{textAlign:"left",padding:5},children:y},Math.random()):t.jsx("td",{align:"center",className:(b==f.length-1&&r&&r[r.length-1]==""?"bold":"")+" "+(w%2==0?"even":"odd"),children:H(y)},Math.random()))},Math.random())),d.length>0&&t.jsxs("tr",{children:[t.jsx("th",{}),d.map(f=>t.jsxs("td",{align:"center",className:"bold",children:[H(f)," "]},Math.random()))]},Math.random())]})]})]})}return Array.isArray(e.data.series)?n():a()}function Yt(){function e(){const o={width:150,height:150,borderRadius:"50%",objectFit:"cover",backgroundColor:p.colors.success};return window.application.menu.user&&t.jsxs("div",{align:"center",children:[window.application.menu.image&&t.jsx("div",{children:t.jsx("img",{src:window.application.menu.image,style:o})}),t.jsx("div",{children:t.jsx(F,{dataLabel:"Editar Perfil",href:"/api/profile/userprofile/",style:{textDecoration:"none"},children:window.application.menu.user})})]})}function n(o){var d=o.target;const c=d.querySelector(":scope > ul, :scope > li");if(c){c.offsetParent===null?d.querySelectorAll(":scope > ul, :scope > li, :scope > ul > li").forEach(function(l){l.style.display="block"}):d.querySelectorAll(":scope > ul, :scope > li").forEach(function(l){l.style.display="none"});const s=d.querySelector(":scope > i.fa-solid.fa-chevron-right"),u=d.querySelector(":scope > i.fa-solid.fa-chevron-up");return s&&(s.classList.remove("fa-chevron-right"),s.classList.add("fa-chevron-up")),u&&(u.classList.remove("fa-chevron-up"),u.classList.add("fa-chevron-right")),o.preventDefault(),o.stopPropagation(),o.cancelBubble=!0,!1}else{const s=document.querySelector("aside");s.style.display=window.innerWidth<800?"none":"inline-block"}}function a(o,d){const c={display:d==0?"block":"none",cursor:"pointer",paddingLeft:15,paddingRight:20,paddingTop:10,paddingBottom:10,lineHeight:"2rem",color:p.colors.primary},s={padding:5,fontSize:"1.2rem"};return o.url?t.jsx("li",{style:c,onClick:n,className:"item",children:t.jsxs(F,{href:o.url,dataLabel:T(o.label),style:{textDecoration:"none",display:"block",width:"100%"},children:[d==0&&t.jsx(E,{icon:o.icon||"dot-circle",style:s}),o.label]})},Math.random()):o.items.length>0&&t.jsxs("li",{onClick:n,style:c,"data-label":T(o.label),children:[d==0&&t.jsx(E,{icon:o.icon||"dot-circle",style:s}),o.label,t.jsx(E,{icon:"chevron-right",style:{float:"right",paddingTop:8}}),t.jsx("ul",{style:{display:"none",paddingLeft:15},children:o.items.map(function(u){return a(u,d+1)})})]},Math.random())}function r(){const o={padding:0};return window.application.menu.items.length>0&&t.jsx("ul",{style:o,children:window.application.menu.items.map(function(d){return a(d,0)})})}function i(){const o={marginTop:10,height:"100%",borderRight:"solid 1px #EEE"};return t.jsxs("div",{style:o,className:"menu",children:[e(),r()]})}return i()}function Vt(e){var n;function a(o){const d="=".repeat((4-o.length%4)%4),c=(o+d).replace(/\-/g,"+").replace(/_/g,"/"),s=window.atob(c),u=new Uint8Array(s.length);for(let l=0;l<s.length;++l)u[l]=s.charCodeAt(l);return u}function r(){"serviceWorker"in navigator&&"PushManager"in window?navigator.serviceWorker.getRegistration().then(function(o){if(o){const d=a("BFvGgHYReJWJuSyOChUCEs1VYqZVs3TLJAvSkMW8jVqqgdWVbArBL4Kd6ibPKWlQo8Q3BuWwomybqwzs-1Ic8GU");o.pushManager.getSubscription(function(c){c&&(c.unsubscribe(),console.log("unsubscribed"))}),o.pushManager.subscribe({userVisibleOnly:!0,applicationServerKey:d}).then(function(c){if(console.log(c),n=JSON.stringify(c),console.log(n),c){alert("Notificação ativada com sucesso.");var s=new FormData;s.append("subscription",n),B("POST","/api/pushsubscription/subscribe/",function(u){console.log(u)},s)}else{alert("Problema ao ativar notificações.");return}}).catch(function(c){alert("Problema ao tentar ativar notificações."),console.log("Failed to subscribe the user: ",c)})}else console.log("No registered service worker.")}).catch(function(o){alert("Erro"),console.error("Service Worker Error",o)}):alert("Push messaging is not supported")}function i(){return t.jsx(E,{onClick:r,icon:"bell",style:{cursor:"pointer",color:p.colors.primary}})}return i()}function Xt(e,n){var a={startX:0,startY:0,endX:0,endY:0,minX:30,maxX:30,minY:50,maxY:60},r=null;e.addEventListener("touchstart",function(i){var o=i.touches[0];a.startX=o.screenX,a.startY=o.screenY}),e.addEventListener("touchmove",function(i){var o=i.touches[0];a.endX=o.screenX,a.endY=o.screenY}),e.addEventListener("touchend",function(i){Math.abs(a.endX-a.startX)>a.minX&&Math.abs(a.endY-a.startY)<a.maxY?r=a.endX>a.startX?"right":"left":Math.abs(a.endY-a.startY)>a.minY&&Math.abs(a.endX-a.startX)<a.maxX&&(r=a.endY>a.startY?"down":"up"),r!==null&&typeof n=="function"&&n(e,r)})}function $t(e){function n(){if(window.innerWidth>800)return;const a={position:"fixed",display:"flex",width:50,height:50,backgroundColor:p.colors.primary,color:"white",right:10,borderRadius:"50%",cursor:"pointer"},r={paddingLeft:14,paddingTop:12,fontSize:"1.8rem"};return t.jsxs(t.Fragment,{children:[t.jsx("div",{style:{...a,bottom:100},onClick:()=>history.back(),children:t.jsx(E,{icon:"arrow-left",style:r})}),t.jsx("div",{style:{...a,bottom:20},onClick:()=>window.scrollTo({top:0,behavior:"smooth"}),children:t.jsx(E,{icon:"arrow-up",style:r})})]})}return n()}function Jt(e){const[n,a]=N.useState(e.data);window.loaddata=i=>a(i);function r(){const i={minHeight:400,margin:window.innerWidth>800?20:5};return t.jsx("div",{style:i,id:"container",children:t.jsx(x,{data:n},Math.random())})}return r()}function Qt(e){N.useEffect(()=>{const l=localStorage.getItem("message");l&&(localStorage.removeItem("message"),z(l)),window.addEventListener("resize",()=>{const m=document.querySelector("aside");m&&(m.style.display=window.innerWidth<800?"none":"inline-block")}),Xt(document.querySelector("main"),function(m,f){console.log(m,f)})},[]);function a(){const l=document.querySelector("aside"),m=document.querySelector("main");l.style.display=l.style.display=="none"?"inline-block":"none",m.style.width=l.style.display=="none"?"100%":"calc(100% - 350px)"}function r(l){const m=l.target.tagName=="A"?l.target:l.target.closest("a");l.preventDefault(),window.load(m.href)}function i(){const l={display:"flex",width:"100%",justifyContent:"space-between",boxShadow:"0px 15px 10px -15px #DDD",overflowX:"hidden"},m={choices:"/api/search/",help_text:null,label:null,mask:null,name:"search",required:!1,type:"choice",icon:"search"};return e.data.navbar?t.jsxs("div",{style:l,children:[t.jsxs("div",{style:{padding:20},children:[e.data.menu&&t.jsx(E,{icon:"navicon",style:{fontSize:"1.5rem",marginRight:10,cursor:"pointer"},onClick:a}),t.jsxs("a",{className:"brand",href:"/app/home/",onClick:r,style:{fontSize:"1.5rem",textDecoration:"none"},children:[e.data.navbar.logo&&t.jsx("img",{src:e.data.navbar.logo,height:20,style:{marginRight:10}}),t.jsx("span",{children:e.data.navbar.title})]}),t.jsx("div",{children:e.data.navbar.subtitle})]}),t.jsxs("div",{style:{display:"flex",alignItems:"center"},children:[e.data.navbar.adder.length>0&&t.jsx("div",{style:{padding:10},children:t.jsx(ne,{actions:e.data.navbar.adder,position:{},dataLabel:"plus",children:t.jsx(E,{icon:"plus",style:{cursor:"pointer",color:p.colors.primary}})})}),t.jsx("div",{style:{padding:10},children:t.jsx(Vt,{})}),e.data.navbar.toolbar&&window.innerWidth>800&&e.data.navbar.toolbar.length>0&&t.jsx("div",{className:"toolbar",children:e.data.navbar.toolbar.map(function(f){return t.jsx(W,{data:f,primary:!0,compact:!0},Math.random())})}),e.data.navbar.actions&&e.data.navbar.actions.length>0&&e.data.navbar.actions.map(function(f){return f.url=="/api/auth/login/"&&(e.data.navbar.user||document.location.pathname=="/app/auth/login/")?null:t.jsx("div",{children:t.jsx(W,{data:f,primary:!0},Math.random())},Math.random())}),e.data.oauth&&e.data.oauth.length>0&&e.data.navbar.user==null&&e.data.oauth.map(function(f){return t.jsx(F,{href:f.url,style:{marginRight:10},children:f.label},Math.random())}),e.data.navbar.tools.length>0&&t.jsx("div",{style:{padding:10},children:t.jsx(ne,{actions:e.data.navbar.tools,position:{},dataLabel:"tools",children:t.jsx(E,{icon:"tools",style:{cursor:"pointer",color:p.colors.primary}})})}),e.data.navbar.settings.length>0&&t.jsx("div",{style:{padding:10},children:t.jsx(ne,{actions:e.data.navbar.settings,position:{},dataLabel:"gear",children:t.jsx(E,{icon:"gear",style:{cursor:"pointer",color:p.colors.primary}})})}),window.innerWidth>800&&e.data.navbar.user&&e.data.navbar.search&&t.jsx("div",{children:t.jsx(Te,{data:m,style:{padding:10},onSelect:f=>document.location.href=V(f.id)})}),e.data.navbar.user&&e.data.navbar.usermenu.length>0&&t.jsx("div",{style:{padding:10},children:t.jsx(ne,{actions:e.data.navbar.usermenu,position:{},dataLabel:T(e.data.navbar.user),children:t.jsx("img",{src:"/static/images/user.svg",style:{width:30,height:30,borderRadius:"50%",objectFit:"cover",backgroundColor:p.colors.primary}})})})]})]}):null}function o(){return window.application.menu&&window.application.menu.items.length>0&&t.jsx("aside",{style:{verticalAlign:"top",maxWidth:"350px",minWidth:"350px",display:window.innerWidth<800?"none":"inline-block"},children:t.jsx(Yt,{})})}function d(){const l={margin:15,display:"flex",justifyContent:"space-between"},m={color:p.colors.primary};return e.data.navbar&&e.data.navbar.user&&t.jsxs("div",{style:l,children:[t.jsxs("div",{children:[t.jsx(F,{href:"/app/dashboard/",style:{marginRight:10},children:t.jsx(E,{icon:"home",style:m})}),"Área Administrativa"]}),t.jsx("div",{title:e.data.navbar.roles,children:e.data.navbar.user})]})}function c(){const l=e.data.menu&&e.data.menu.items.length>0?350:0;return t.jsxs("main",{id:"main",style:{display:"inline-block",width:"calc(100% - "+l+"px)"},children:[d(),t.jsx(Jt,{data:e.data.content}),t.jsx("footer",{children:s()}),t.jsx($t,{})]})}function s(){return e.data.footer?t.jsxs("div",{align:"center",children:[t.jsx("div",{children:window.application.sponsors&&window.application.sponsors.length>0&&t.jsx("div",{children:window.application.sponsors.map(function(l){return t.jsx("img",{src:l,style:{height:30,padding:5}},Math.random())})})}),t.jsx("div",{children:Intl.DateTimeFormat().resolvedOptions().timeZone}),t.jsx("div",{children:"Todos os direitos reservados"}),t.jsx("div",{children:e.data.footer.version})]}):null}function u(){return t.jsxs("div",{children:[t.jsx("header",{children:i()}),t.jsxs("div",{style:{width:"100%",display:"block",minHeight:window.innerHeight-70},children:[o(),c()]})]})}return u()}function Zt(e){var n=null,a=null,r=null,i=!1,o=null,d=navigator.getUserMedia||navigator.webkitGetUserMedia||navigator.mozGetUserMedia,c={constraints:{mandatory:{OfferToReceiveAudio:!0,OfferToReceiveVideo:!0},offerToReceiveAudio:1,offerToReceiveVideo:1},sdpTransform:y=>y.replace("a=fmtp:111 minptime=10;useinbandfec=1","a=fmtp:111 ptime=5;useinbandfec=1;stereo=1;maxplaybackrate=48000;maxaveragebitrat=128000;sprop-stereo=1")};function s(){console.log("Trying to connect..."),n=new Peer("999123"+e.data.caller.replaceAll(".","").replaceAll("-","")),n.on("open",function(y){document.getElementById("callerid").innerHTML=e.data.caller,f(),o=setInterval(function(){i?z("Em conexão com "+e.data.receiver+"."):(z("Tentando estabeler conexão com "+e.data.receiver+"..."),f())},15e3)}),n.on("call",function(y){var b=document.getElementById("video2");b.addEventListener("loadedmetadata",function(D){b.style.width=this.videoWidth/4+"px",b.style.height=this.videoHeight/4+"px",b.style.marginLeft=-this.videoWidth/4+"px",b.style.visibility="visible"},!1),b.srcObject=a,y.answer(a),y.on("stream",function(D){r=D,document.getElementById("video1").srcObject=r,i=!0}),y.on("close",function(){console.log("Closed!"),i=!1})}),n.on("error",function(y){y.type=="browser-incompatible"?alert("Navegador incompatível."):y.type=="invalid-id"?alert("Usuário inexistente."):y.type=="network"?(i=!1,console.log("Problema na conexão do usuário. Tentando novamente em 5 segundos."),setTimeout(s,5e3)):y.type=="peer-unavailable"&&(console.log("Usuário indisponível!"),i=!1)})}N.useEffect(()=>(s(),function(){clearInterval(o),u(),z("Desconectado!")}),[]);function u(){l(a,"audio"),l(a,"video"),l(r,"audio"),l(r,"video"),a=null,r=null;const y=document.getElementById("video1"),b=document.getElementById("video2");y&&(y.srcObject=null),b&&(b.srcObject=null),console.log("Stopped!"),i=!1}function l(y,b){y!=null&&y.getTracks().forEach(D=>{D.kind===b&&D.stop()})}function m(){var y=n.call("999123"+e.data.receiver.replaceAll(".","").replaceAll("-",""),a,c);y&&(y.on("stream",function(b){r=b,document.getElementById("video1").srcObject=r,i=!0}),y.on("close",function(){console.log("Closed!"),i=!1}))}function f(){if(a!=null&&!i)return m();a==null&&d({video:!0,audio:{autoGainControl:!1,echoCancellation:!1,googGainControl:!1,noiseSuppression:!1}},function(y){a=y;var b=document.getElementById("video2");b.addEventListener("loadedmetadata",function(D){b.style.width=this.videoWidth/4+"px",b.style.height=this.videoHeight/4+"px",b.style.marginLeft=-this.videoWidth/4+"px",b.style.visibility="visible"},!1),b.srcObject=a,m()},function(y){alert("Failed to get local stream.")})}function w(){return t.jsx("iframe",{width:"100%",height:700,style:{border:0},src:"https://us05web.zoom.us/j/82130251231?pwd=o46UhcNlDRq13oO1maHiaRLVOaxxnZ.1",allow:"camera; microphone; display-capture"})}return w()}function Kt(e){A(`
220
+ `);function n(){for(var r=[],i=0;i<e.data.series.length;i++)r.push([e.data.series[i][0],e.data.series[i][1]]);return e.data.chart?t.jsx(be,{type:e.data.chart,title:e.data.title,rows:r}):t.jsxs("div",{className:"statistics",children:[e.data.title&&t.jsx("h2",{"data-label":T(e.data.title),children:e.data.title}),t.jsx("table",{style:{width:"100%",borderSpacing:0},children:t.jsx("tbody",{children:r.map((o,d)=>t.jsx("tr",{children:o.map((c,s)=>s==0?t.jsx("th",{style:{textAlign:"left",lineHeight:"2rem",padding:5},className:d%2==0?"even":"odd",children:c},Math.random()):t.jsx("td",{className:d%2==0?"even":"odd",children:H(c)},Math.random()))},Math.random()))})})]})}function a(){for(var r=[],i=[],o=Object.keys(e.data.series),d=[],c=0;c<o.length;c++){c==0&&r.push("");for(var s=[o[c]],u=0,l=0;l<e.data.series[o[c]].length;l++){var m=e.data.series[o[c]];c==0&&r.push(m[l][0]),s.push(m[l][1]),u+=m[l][1],o.length>1&&(c==0?d.push(m[l][1]):d[l]+=m[l][1],l>0&&l==e.data.series[o[c]].length-1&&(c==0?d.push(u):d[l+1]+=u))}s.length>2&&(c==0&&r.push(""),s.push(u)),i.push(s)}return e.data.chart?t.jsx(be,{type:e.data.chart,title:e.data.title,headers:r,rows:i}):t.jsxs("div",{className:"statistics",children:[e.data.title&&t.jsx("h2",{"data-label":T(e.data.title),children:e.data.title}),t.jsxs("table",{style:{width:"100%",borderSpacing:0},children:[r&&t.jsx("thead",{children:t.jsx("tr",{children:r.map(f=>t.jsx("th",{className:"bold",style:{textAlign:"left",padding:5},children:f},Math.random()))})}),t.jsxs("tbody",{children:[i.map((f,w)=>t.jsx("tr",{children:f.map((y,b)=>b==0?t.jsx("th",{className:w%2==0?"even":"odd",style:{textAlign:"left",padding:5},children:y},Math.random()):t.jsx("td",{align:"center",className:(b==f.length-1&&r&&r[r.length-1]==""?"bold":"")+" "+(w%2==0?"even":"odd"),children:H(y)},Math.random()))},Math.random())),d.length>0&&t.jsxs("tr",{children:[t.jsx("th",{}),d.map(f=>t.jsxs("td",{align:"center",className:"bold",children:[H(f)," "]},Math.random()))]},Math.random())]})]})]})}return Array.isArray(e.data.series)?n():a()}function Yt(){function e(){const o={width:150,height:150,borderRadius:"50%",objectFit:"cover",backgroundColor:p.colors.success};return window.application.menu.user&&t.jsxs("div",{align:"center",children:[window.application.menu.image&&t.jsx("div",{children:t.jsx("img",{src:window.application.menu.image,style:o})}),t.jsx("div",{children:t.jsx(F,{dataLabel:"Editar Perfil",href:"/api/profile/userprofile/",style:{textDecoration:"none"},children:window.application.menu.user})})]})}function n(o){var d=o.target;const c=d.querySelector(":scope > ul, :scope > li");if(c){c.offsetParent===null?d.querySelectorAll(":scope > ul, :scope > li, :scope > ul > li").forEach(function(l){l.style.display="block"}):d.querySelectorAll(":scope > ul, :scope > li").forEach(function(l){l.style.display="none"});const s=d.querySelector(":scope > i.fa-solid.fa-chevron-right"),u=d.querySelector(":scope > i.fa-solid.fa-chevron-up");return s&&(s.classList.remove("fa-chevron-right"),s.classList.add("fa-chevron-up")),u&&(u.classList.remove("fa-chevron-up"),u.classList.add("fa-chevron-right")),o.preventDefault(),o.stopPropagation(),o.cancelBubble=!0,!1}else{const s=document.querySelector("aside");s.style.display=window.innerWidth<800?"none":"inline-block"}}function a(o,d){const c={display:d==0?"block":"none",cursor:"pointer",paddingLeft:15,paddingRight:20,paddingTop:10,paddingBottom:10,lineHeight:"2rem",color:p.colors.primary},s={padding:5,fontSize:"1.2rem"};return o.url?t.jsx("li",{style:c,onClick:n,className:"item",children:t.jsxs(F,{href:o.url,dataLabel:T(o.label),style:{textDecoration:"none",display:"block",width:"100%"},children:[d==0&&t.jsx(E,{icon:o.icon||"dot-circle",style:s}),o.label]})},Math.random()):o.items.length>0&&t.jsxs("li",{onClick:n,style:c,"data-label":T(o.label),children:[d==0&&t.jsx(E,{icon:o.icon||"dot-circle",style:s}),o.label,t.jsx(E,{icon:"chevron-right",style:{float:"right",paddingTop:8}}),t.jsx("ul",{style:{display:"none",paddingLeft:15},children:o.items.map(function(u){return a(u,d+1)})})]},Math.random())}function r(){const o={padding:0};return window.application.menu.items.length>0&&t.jsx("ul",{style:o,children:window.application.menu.items.map(function(d){return a(d,0)})})}function i(){const o={marginTop:10,height:"100%",borderRight:"solid 1px #EEE"};return t.jsxs("div",{style:o,className:"menu",children:[e(),r()]})}return i()}function Vt(e){var n;function a(o){const d="=".repeat((4-o.length%4)%4),c=(o+d).replace(/\-/g,"+").replace(/_/g,"/"),s=window.atob(c),u=new Uint8Array(s.length);for(let l=0;l<s.length;++l)u[l]=s.charCodeAt(l);return u}function r(){"serviceWorker"in navigator&&"PushManager"in window?navigator.serviceWorker.getRegistration().then(function(o){if(o){const d=a("BFvGgHYReJWJuSyOChUCEs1VYqZVs3TLJAvSkMW8jVqqgdWVbArBL4Kd6ibPKWlQo8Q3BuWwomybqwzs-1Ic8GU");o.pushManager.getSubscription(function(c){c&&(c.unsubscribe(),console.log("unsubscribed"))}),o.pushManager.subscribe({userVisibleOnly:!0,applicationServerKey:d}).then(function(c){if(console.log(c),n=JSON.stringify(c),console.log(n),c){alert("Notificação ativada com sucesso.");var s=new FormData;s.append("subscription",n),B("POST","/api/pushsubscription/subscribe/",function(u){console.log(u)},s)}else{alert("Problema ao ativar notificações.");return}}).catch(function(c){alert("Problema ao tentar ativar notificações."),console.log("Failed to subscribe the user: ",c)})}else console.log("No registered service worker.")}).catch(function(o){alert("Erro"),console.error("Service Worker Error",o)}):alert("Push messaging is not supported")}function i(){return t.jsx(E,{onClick:r,icon:"bell",style:{cursor:"pointer",color:p.colors.primary}})}return i()}function Xt(e,n){var a={startX:0,startY:0,endX:0,endY:0,minX:30,maxX:30,minY:50,maxY:60},r=null;e.addEventListener("touchstart",function(i){var o=i.touches[0];a.startX=o.screenX,a.startY=o.screenY}),e.addEventListener("touchmove",function(i){var o=i.touches[0];a.endX=o.screenX,a.endY=o.screenY}),e.addEventListener("touchend",function(i){Math.abs(a.endX-a.startX)>a.minX&&Math.abs(a.endY-a.startY)<a.maxY?r=a.endX>a.startX?"right":"left":Math.abs(a.endY-a.startY)>a.minY&&Math.abs(a.endX-a.startX)<a.maxX&&(r=a.endY>a.startY?"down":"up"),r!==null&&typeof n=="function"&&n(e,r)})}function $t(e){function n(){if(window.innerWidth>800)return;const a={position:"fixed",display:"flex",width:50,height:50,backgroundColor:p.colors.primary,color:"white",right:10,borderRadius:"50%",cursor:"pointer"},r={paddingLeft:14,paddingTop:12,fontSize:"1.8rem"};return t.jsxs(t.Fragment,{children:[t.jsx("div",{style:{...a,bottom:100},onClick:()=>history.back(),children:t.jsx(E,{icon:"arrow-left",style:r})}),t.jsx("div",{style:{...a,bottom:20},onClick:()=>window.scrollTo({top:0,behavior:"smooth"}),children:t.jsx(E,{icon:"arrow-up",style:r})})]})}return n()}function Jt(e){const[n,a]=I.useState(e.data);window.loaddata=i=>a(i);function r(){const i={minHeight:400,margin:window.innerWidth>800?20:5};return t.jsx("div",{style:i,id:"container",children:t.jsx(x,{data:n},Math.random())})}return r()}function Qt(e){I.useEffect(()=>{const l=localStorage.getItem("message");l&&(localStorage.removeItem("message"),z(l)),window.addEventListener("resize",()=>{const m=document.querySelector("aside");m&&(m.style.display=window.innerWidth<800?"none":"inline-block")}),Xt(document.querySelector("main"),function(m,f){console.log(m,f)})},[]);function a(){const l=document.querySelector("aside"),m=document.querySelector("main");l.style.display=l.style.display=="none"?"inline-block":"none",m.style.width=l.style.display=="none"?"100%":"calc(100% - 350px)"}function r(l){const m=l.target.tagName=="A"?l.target:l.target.closest("a");l.preventDefault(),window.load(m.href)}function i(){const l={display:"flex",width:"100%",justifyContent:"space-between",boxShadow:"0px 15px 10px -15px #DDD",overflowX:"hidden"},m={choices:"/api/search/",help_text:null,label:null,mask:null,name:"search",required:!1,type:"choice",icon:"search"};return e.data.navbar?t.jsxs("div",{style:l,children:[t.jsxs("div",{style:{padding:20},children:[e.data.menu&&t.jsx(E,{icon:"navicon",style:{fontSize:"1.5rem",marginRight:10,cursor:"pointer"},onClick:a}),t.jsxs("a",{className:"brand",href:"/app/home/",onClick:r,style:{fontSize:"1.5rem",textDecoration:"none"},children:[e.data.navbar.logo&&t.jsx("img",{src:e.data.navbar.logo,height:20,style:{marginRight:10}}),t.jsx("span",{children:e.data.navbar.title})]}),t.jsx("div",{children:e.data.navbar.subtitle})]}),t.jsxs("div",{style:{display:"flex",alignItems:"center"},children:[e.data.navbar.adder.length>0&&t.jsx("div",{style:{padding:10},children:t.jsx(ne,{actions:e.data.navbar.adder,position:{},dataLabel:"plus",children:t.jsx(E,{icon:"plus",style:{cursor:"pointer",color:p.colors.primary}})})}),t.jsx("div",{style:{padding:10},children:t.jsx(Vt,{})}),e.data.navbar.toolbar&&window.innerWidth>800&&e.data.navbar.toolbar.length>0&&t.jsx("div",{className:"toolbar",children:e.data.navbar.toolbar.map(function(f){return t.jsx(W,{data:f,primary:!0,compact:!0},Math.random())})}),e.data.navbar.actions&&e.data.navbar.actions.length>0&&e.data.navbar.actions.map(function(f){return f.url=="/api/auth/login/"&&(e.data.navbar.user||document.location.pathname=="/app/auth/login/")?null:t.jsx("div",{children:t.jsx(W,{data:f,primary:!0},Math.random())},Math.random())}),e.data.oauth&&e.data.oauth.length>0&&e.data.navbar.user==null&&e.data.oauth.map(function(f){return t.jsx(F,{href:f.url,style:{marginRight:10},children:f.label},Math.random())}),e.data.navbar.tools.length>0&&t.jsx("div",{style:{padding:10},children:t.jsx(ne,{actions:e.data.navbar.tools,position:{},dataLabel:"tools",children:t.jsx(E,{icon:"tools",style:{cursor:"pointer",color:p.colors.primary}})})}),e.data.navbar.settings.length>0&&t.jsx("div",{style:{padding:10},children:t.jsx(ne,{actions:e.data.navbar.settings,position:{},dataLabel:"gear",children:t.jsx(E,{icon:"gear",style:{cursor:"pointer",color:p.colors.primary}})})}),window.innerWidth>800&&e.data.navbar.user&&e.data.navbar.search&&t.jsx("div",{children:t.jsx(Te,{data:m,style:{padding:10},onSelect:f=>document.location.href=V(f.id)})}),e.data.navbar.user&&e.data.navbar.usermenu.length>0&&t.jsx("div",{style:{padding:10},children:t.jsx(ne,{actions:e.data.navbar.usermenu,position:{},dataLabel:T(e.data.navbar.user),children:t.jsx("img",{src:"/static/images/user.svg",style:{width:30,height:30,borderRadius:"50%",objectFit:"cover",backgroundColor:p.colors.primary}})})})]})]}):null}function o(){return window.application.menu&&window.application.menu.items.length>0&&t.jsx("aside",{style:{verticalAlign:"top",maxWidth:"350px",minWidth:"350px",display:window.innerWidth<800?"none":"inline-block"},children:t.jsx(Yt,{})})}function d(){const l={margin:15,display:"flex",justifyContent:"space-between"},m={color:p.colors.primary};return e.data.navbar&&e.data.navbar.user&&t.jsxs("div",{style:l,children:[t.jsxs("div",{children:[t.jsx(F,{href:"/app/dashboard/",style:{marginRight:10},children:t.jsx(E,{icon:"home",style:m})}),"Área Administrativa"]}),t.jsx("div",{title:e.data.navbar.roles,children:e.data.navbar.user})]})}function c(){const l=e.data.menu&&e.data.menu.items.length>0?350:0;return t.jsxs("main",{id:"main",style:{display:"inline-block",width:"calc(100% - "+l+"px)"},children:[d(),t.jsx(Jt,{data:e.data.content}),t.jsx("footer",{children:s()}),t.jsx($t,{})]})}function s(){return e.data.footer?t.jsxs("div",{align:"center",children:[t.jsx("div",{children:window.application.sponsors&&window.application.sponsors.length>0&&t.jsx("div",{children:window.application.sponsors.map(function(l){return t.jsx("img",{src:l,style:{height:30,padding:5}},Math.random())})})}),t.jsx("div",{children:Intl.DateTimeFormat().resolvedOptions().timeZone}),t.jsx("div",{children:"Todos os direitos reservados"}),t.jsx("div",{children:e.data.footer.version})]}):null}function u(){return t.jsxs("div",{children:[t.jsx("header",{children:i()}),t.jsxs("div",{style:{width:"100%",display:"block",minHeight:window.innerHeight-70},children:[o(),c()]})]})}return u()}function Zt(e){var n=null,a=null,r=null,i=!1,o=null,d=navigator.getUserMedia||navigator.webkitGetUserMedia||navigator.mozGetUserMedia,c={constraints:{mandatory:{OfferToReceiveAudio:!0,OfferToReceiveVideo:!0},offerToReceiveAudio:1,offerToReceiveVideo:1},sdpTransform:y=>y.replace("a=fmtp:111 minptime=10;useinbandfec=1","a=fmtp:111 ptime=5;useinbandfec=1;stereo=1;maxplaybackrate=48000;maxaveragebitrat=128000;sprop-stereo=1")};function s(){console.log("Trying to connect..."),n=new Peer("999123"+e.data.caller.replaceAll(".","").replaceAll("-","")),n.on("open",function(y){document.getElementById("callerid").innerHTML=e.data.caller,f(),o=setInterval(function(){i?z("Em conexão com "+e.data.receiver+"."):(z("Tentando estabeler conexão com "+e.data.receiver+"..."),f())},15e3)}),n.on("call",function(y){var b=document.getElementById("video2");b.addEventListener("loadedmetadata",function(D){b.style.width=this.videoWidth/4+"px",b.style.height=this.videoHeight/4+"px",b.style.marginLeft=-this.videoWidth/4+"px",b.style.visibility="visible"},!1),b.srcObject=a,y.answer(a),y.on("stream",function(D){r=D,document.getElementById("video1").srcObject=r,i=!0}),y.on("close",function(){console.log("Closed!"),i=!1})}),n.on("error",function(y){y.type=="browser-incompatible"?alert("Navegador incompatível."):y.type=="invalid-id"?alert("Usuário inexistente."):y.type=="network"?(i=!1,console.log("Problema na conexão do usuário. Tentando novamente em 5 segundos."),setTimeout(s,5e3)):y.type=="peer-unavailable"&&(console.log("Usuário indisponível!"),i=!1)})}I.useEffect(()=>(s(),function(){clearInterval(o),u(),z("Desconectado!")}),[]);function u(){l(a,"audio"),l(a,"video"),l(r,"audio"),l(r,"video"),a=null,r=null;const y=document.getElementById("video1"),b=document.getElementById("video2");y&&(y.srcObject=null),b&&(b.srcObject=null),console.log("Stopped!"),i=!1}function l(y,b){y!=null&&y.getTracks().forEach(D=>{D.kind===b&&D.stop()})}function m(){var y=n.call("999123"+e.data.receiver.replaceAll(".","").replaceAll("-",""),a,c);y&&(y.on("stream",function(b){r=b,document.getElementById("video1").srcObject=r,i=!0}),y.on("close",function(){console.log("Closed!"),i=!1}))}function f(){if(a!=null&&!i)return m();a==null&&d({video:!0,audio:{autoGainControl:!1,echoCancellation:!1,googGainControl:!1,noiseSuppression:!1}},function(y){a=y;var b=document.getElementById("video2");b.addEventListener("loadedmetadata",function(D){b.style.width=this.videoWidth/4+"px",b.style.height=this.videoHeight/4+"px",b.style.marginLeft=-this.videoWidth/4+"px",b.style.visibility="visible"},!1),b.srcObject=a,m()},function(y){alert("Failed to get local stream.")})}function w(){return t.jsx("iframe",{width:"100%",height:700,style:{border:0},src:"https://us05web.zoom.us/j/82130251231?pwd=o46UhcNlDRq13oO1maHiaRLVOaxxnZ.1",allow:"camera; microphone; display-capture"})}return w()}function Kt(e){A(`
221
221
  .container {
222
222
  position: relative;
223
223
  width: 100%;
@@ -3,7 +3,7 @@ from django.template.engine import Engine
3
3
 
4
4
 
5
5
  def build_url(request, path=None):
6
- return path or request.path if request else ''
6
+ return path or getattr(request, 'subpath', request.path) if request else ''
7
7
 
8
8
  def absolute_url(request, *querystrings):
9
9
  url = build_url(request)
@@ -18,7 +18,8 @@ from django.views.decorators.cache import never_cache, cache_control
18
18
 
19
19
  @cache_control(max_age=0, no_cache=True, no_store=True, must_revalidate=True)
20
20
  def index(request, path=None):
21
- vite = not socket.socket(socket.AF_INET, socket.SOCK_STREAM).connect_ex(('127.0.0.1',5173))
21
+ # host.docker.internal
22
+ vite = not socket.socket(socket.AF_INET, socket.SOCK_STREAM).connect_ex(('localhost',5173))
22
23
  return render(request, 'index.html', dict(vite=vite, application=APPLICATON))
23
24
 
24
25
  def service_worker(request):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: slthcore
3
- Version: 0.2.9
3
+ Version: 0.3.0
4
4
  Summary: API generator based on yml file
5
5
  Home-page: https://github.com/brenokcc
6
6
  Author: Breno Silva
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes